Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
8e2985a
refactor: move `datetime.jsx` to `/utils`
Bad-Company Jun 16, 2017
6ad2ee8
refactor: replace propTypes with Flow
Bad-Company Jun 16, 2017
ed66de5
open
Diokuz Jun 16, 2017
6f9114f
Add fonts and rework bell button
Diokuz Jun 9, 2017
0dce966
Handle core fonts
Diokuz Jun 10, 2017
059b651
rename colors.css to variables.css
Diokuz Jun 14, 2017
53c4e6e
Add docs
Diokuz Jun 14, 2017
714cd8c
replace postcss-assets with postcss-url
Diokuz Jun 15, 2017
ba00425
Remove less from styleguide
Diokuz Jun 15, 2017
3af14de
cr fix
Diokuz Jun 16, 2017
fa1831d
feat: add `datetime.jsx` to Styleguide
Bad-Company Jun 16, 2017
7ba48b5
fix variables.css usage
tonypizzicato Jun 16, 2017
0f936c9
Merge pull request #2191 from FoxComm/typos
tonypizzicato Jun 16, 2017
f6ec175
refactor: move Currency component to `/utils`
Bad-Company Jun 15, 2017
a46d37b
fix: change missed path's
Bad-Company Jun 15, 2017
bcd40d4
refactor: add flow & replace less with css-modules
Bad-Company Jun 15, 2017
d355e76
refactor: remove _currency.less
Bad-Company Jun 15, 2017
b64d29c
fix: flow
Bad-Company Jun 15, 2017
6e5faaa
refactor: use `Change` component for transaction mode.
Bad-Company Jun 15, 2017
8849ce1
chore: change prop description
Bad-Company Jun 16, 2017
40386c2
feat: add currency to styleguide
Bad-Company Jun 16, 2017
acf85f8
feat: add mocha-tests
Bad-Company Jun 16, 2017
ff77401
formatting and import fixes
tonypizzicato Jun 16, 2017
26673da
chore: remove duplicated test
Bad-Company Jun 19, 2017
8b47e33
Merge pull request #2206 from FoxComm/refactor/currency
tonypizzicato Jun 19, 2017
04acd11
feat: add mocha-test for `datetime`
Bad-Company Jun 19, 2017
a892c37
Merge branch 'feature/ashes-styleguide-phase-3'
Bad-Company Jun 19, 2017
2dfb084
fix: paths after merge feature branch
Bad-Company Jun 19, 2017
7e105ba
fix: input/expected time format
Bad-Company Jun 19, 2017
098bdcd
Merge remote-tracking branch 'origin/master' into feature/ashes-style…
Diokuz Jun 19, 2017
9e2b895
merge fix
Diokuz Jun 19, 2017
6045a1a
Merge remote-tracking branch 'origin/master' into feature/ashes-style…
Diokuz Jun 21, 2017
1c6aa9a
Merge remote-tracking branch 'origin/master' into feature/ashes-style…
Diokuz Jun 22, 2017
09f1955
Merge remote-tracking branch 'origin/master' into feature/ashes-style…
Diokuz Jun 22, 2017
1240ba2
Merge branch 'feature/ashes-styleguide-phase-3'
Bad-Company Jun 23, 2017
4b9d935
fix: remove weird aftermerge double lines
Bad-Company Jun 23, 2017
2a09d49
refactor: make Moment not exportable
Bad-Company Jun 23, 2017
45aa970
fix: expected result
Bad-Company Jun 23, 2017
f0a4778
fix: lint
Bad-Company Jun 23, 2017
794c128
Merge remote-tracking branch 'origin/master' into feature/ashes-style…
Diokuz Jun 23, 2017
844498e
Merge pull request #2228 from FoxComm/refactor/move-datetime-to-utils
tonypizzicato Jun 26, 2017
0ca11fb
Merge remote-tracking branch 'origin/master' into feature/ashes-style…
Diokuz Jun 27, 2017
51950cc
fix datetime path
Diokuz Jun 28, 2017
7b1dc0c
Fix prop mutation
Diokuz Jun 29, 2017
94201f8
Merge pull request #2323 from FoxComm/fix/1899-address-bug
tonypizzicato Jun 29, 2017
9f0c678
styleguidist styles update
tonypizzicato Jun 20, 2017
1bbe7f2
update examples styles
tonypizzicato Jun 20, 2017
4f0df20
components styles fixes
tonypizzicato Jun 20, 2017
8cc530d
get rid of dev docs in styleguide
tonypizzicato Jun 20, 2017
6f2addc
cleanup fonts/colors examples
tonypizzicato Jun 20, 2017
f63c39a
experiments
tonypizzicato Jun 6, 2017
6f1336e
cleanup sidebar
tonypizzicato Jun 21, 2017
732bbd9
update sidebar styles
tonypizzicato Jun 22, 2017
1ca7ef6
expand/collapse sidebar
tonypizzicato Jun 22, 2017
a32cdec
sidebar animation
tonypizzicato Jun 22, 2017
a65446d
fix heading styles
tonypizzicato Jun 22, 2017
83467f5
fix example code style
tonypizzicato Jun 23, 2017
23ad334
move scroll/expand logic to TableOfContents
tonypizzicato Jun 23, 2017
dc79d21
cleanup
tonypizzicato Jun 26, 2017
8790564
update sg design
tonypizzicato Jun 29, 2017
6955354
add smoothscroll-polyfill
tonypizzicato Jul 6, 2017
9e3218b
Merge pull request #2290 from FoxComm/feature/styleguidist-ui
tonypizzicato Jul 6, 2017
140f390
update docs
tonypizzicato Jul 6, 2017
142b1fd
fix actions dd
tonypizzicato Jul 6, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ashes/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
include ../makelib
header = $(call baseheader, $(1), ashes)


export PATH := $(CURDIR)/node_modules/.bin:$(PATH)
SHELL := env PATH=$(PATH) /bin/sh

Expand Down
30 changes: 30 additions & 0 deletions ashes/docs/styles.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,33 @@ If you need to use global classnames in selectors, which should not be transform
```

Please, try to avoid `:global()` usage.

### Colors

We are using limited set of text colors, background colors and fonts. There are very few exceptions (socials, charts),
but it is highly recommended to use only existing variables for `color`, `background-color` and `font` css properties.
If mockups didn't match them, discuss that with designer.

To use variables, just import them to your css file:

```css
@import 'variables.css';

.block {
color: #123456; /* prohibited! */

color: var(--color-text); /* allowed */
background-color: var(--bg-grey);
}

.label {
color: var(--color-additional-text);
background: var(--bg-white);
border: 1px solid var(--color-border);
}

.clickableText {
color: var(--color-action-text);
}
```

4 changes: 3 additions & 1 deletion ashes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,16 @@
"node-notifier": "^4.2.3",
"nodemon": "^1.11.0",
"optimize-css-assets-webpack-plugin": "^1.3.1",
"postcss-assets": "^4.1.0",
"postcss-css-variables": "^0.7.0",
"postcss-cssnext": "^2.10.0",
"postcss-debug": "^0.4.2",
"postcss-import": "^9.1.0",
"postcss-loader": "^1.3.3",
"postcss-mixins": "^5.4.1",
"postcss-modules-local-by-default": "^1.0.1",
"postcss-modules-scope": "^1.0.0",
"postcss-nested": "^1.0.1",
"postcss-url": "^7.0.0",
"prettier": "^1.4.4",
"prop-types": "^15.5.8",
"query-string": "^4.3.4",
Expand Down Expand Up @@ -143,6 +144,7 @@
"run-sequence": "^1.2.2",
"simulant": "^0.2.2",
"sinon": "^1.16.1",
"smoothscroll-polyfill": "^0.3.5",
"sprout-data": "^0.2.3",
"strip-ansi": "^3.0.0",
"style-loader": "^0.16.1",
Expand Down
14 changes: 10 additions & 4 deletions ashes/postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ const plugins = [
require('postcss-import')({
path: ['src/css', 'node_modules'],
}),
require('postcss-assets')({
loadPaths: ['src/images/'],
}),
require('postcss-url')({ url: 'inline', maxSize: 4 }),
// @todo remove second `postcss-url` after https://github.com/postcss/postcss-url/issues/104
require('postcss-url')({ url: 'rebase', to: './src' }),

require('postcss-cssnext')({
features: {
Expand All @@ -51,4 +51,10 @@ const plugins = [
}),
];

exports.plugins = plugins;
// uncomment and then
// ./node_modules/.bin/postcss-debug -c ./postcss.config.js ./styleguide/styleguide.css
// module.exports = function(postcss) {
// return postcss(plugins);
// };

module.exports.plugins = plugins;
2 changes: 1 addition & 1 deletion ashes/src/components/activity-notifications/block.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'colors.css';
@import 'variables.css';

.block {
height: 100%;
Expand Down
6 changes: 5 additions & 1 deletion ashes/src/components/activity-notifications/indicator.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'colors.css';
@import 'variables.css';

.block {
width: 85px;
Expand Down Expand Up @@ -34,10 +34,14 @@
}

.toggle {
display: flex;
justify-content: center;
align-items: center;
position: relative;
color: var(--color-additional-text);
background-color: transparent;
height: 100%;
cursor: pointer;

& i {
vertical-align: sub;
Expand Down
12 changes: 7 additions & 5 deletions ashes/src/components/activity-notifications/indicator.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ import _ from 'lodash';
import React, { Component } from 'react';
import classNames from 'classnames';
import { autobind } from 'core-decorators';

// components
import { Button } from 'components/core/button';
import Icon from 'components/core/icon';

// styles
import s from './indicator.css';
Expand Down Expand Up @@ -61,9 +59,13 @@ export default class NotificationIndicator extends Component {

return (
<div className={s.block}>
<Button icon="bell" className={classes} onClick={this.toggleNotifications} fullWidth>
<div
className={classes}
onClick={this.toggleNotifications}
>
<Icon name="bell" />
{this.indicator}
</Button>
</div>
</div>
);
}
Expand Down
2 changes: 1 addition & 1 deletion ashes/src/components/activity-notifications/item.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'colors.css';
@import 'variables.css';

.block {
padding: 10px;
Expand Down
2 changes: 1 addition & 1 deletion ashes/src/components/activity-notifications/item.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import React from 'react';
import classNames from 'classnames';

// components
import { DateTime } from '../common/datetime';
import { DateTime } from 'components/utils/datetime';
import AuthorTitle from '../activity-trail/activities/base/author-title';
import AuthorIcon from '../activity-trail/activities/base/author-icon';
import { representatives } from '../activity-trail/activities/index';
Expand Down
2 changes: 1 addition & 1 deletion ashes/src/components/activity-notifications/item.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#### Basic usage
##### Basic usage

```javascript
<NotificationItem displayed count={2} />
Expand Down
2 changes: 1 addition & 1 deletion ashes/src/components/activity-notifications/panel.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'colors.css';
@import 'variables.css';

.markAll {
width: 310px;
Expand Down
4 changes: 1 addition & 3 deletions ashes/src/components/activity-notifications/panel.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
```
<div className="demo">
<NotificationPanel displayed />
</div>
<NotificationPanel displayed />
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import classNames from 'classnames';

// components
import { Button } from 'components/core/button';
import { Time } from '../../../common/datetime';
import { Time } from 'components/utils/datetime';
import AuthorTitle from './author-title';
import AuthorIcon from './author-icon';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { joinEntities } from '../base/utils';
// components
import GiftCardLink from '../base/gift-card-link';
import CordTarget from '../base/cord-target';
import Currency from '../../../common/currency';
import Currency from 'components/utils/currency';
import Title from '../base/title';

const authorizedAndCapturedDesc = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
import types from '../base/types';

import CordTarget from '../base/cord-target';
import Currency from '../../../common/currency';
import Currency from 'components/utils/currency';
import GiftCardLink from '../base/gift-card-link';
import Title from '../base/title';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import types from '../base/types';
// components
import GiftCardLink from '../base/gift-card-link';
import CordTarget from '../base/cord-target';
import Currency from '../../../common/currency';
import Currency from 'components/utils/currency';
import Title from '../base/title';

const representatives = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export default class AddressForm extends React.Component {

return res;
},
this.props.address
{ ...this.props.address }
);

submitAction(formData);
Expand Down
2 changes: 1 addition & 1 deletion ashes/src/components/analytics/analytics.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Spinner from 'components/core/spinner';
import { ApiErrors } from 'components/utils/errors';
import QuestionBoxList from './question-box-list';
import type { Props as QuestionBoxType } from './question-box';
import Currency from '../common/currency';
import Currency from 'components/utils/currency';
import TrendButton, { TrendType } from './trend-button';
import StaticColumnSelector from './static-column-selector';
import { Dropdown } from '../dropdown';
Expand Down
2 changes: 1 addition & 1 deletion ashes/src/components/analytics/question-box.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'colors.css';
@import 'variables.css';

.question-box-container-active {
width: 225px;
Expand Down
2 changes: 1 addition & 1 deletion ashes/src/components/analytics/segment-control-list.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'colors.css';
@import 'variables.css';

.segment-control-list-legend {
margin-top: 51px;
Expand Down
2 changes: 1 addition & 1 deletion ashes/src/components/analytics/segment-control.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'colors.css';
@import 'variables.css';

.segment-control-container-active {
width: 66px;
Expand Down
2 changes: 1 addition & 1 deletion ashes/src/components/analytics/static-column-selector.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'colors.css';
@import 'variables.css';

.column-selector {
position: relative;
Expand Down
2 changes: 1 addition & 1 deletion ashes/src/components/analytics/trend-button.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'colors.css';
@import 'variables.css';

.trend-button-container-gain {
display: inline-block;
Expand Down
2 changes: 1 addition & 1 deletion ashes/src/components/auth/css/auth.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'colors.css';
@import 'variables.css';

.title {
font-size: 20px;
Expand Down
2 changes: 1 addition & 1 deletion ashes/src/components/auth/css/wrap-to-lines.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'colors.css';
@import 'variables.css';

.block {
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion ashes/src/components/bulk-actions/modal/modal.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'colors.css';
@import 'variables.css';

.cancelReason {
margin: 30px 0 0;
Expand Down
2 changes: 1 addition & 1 deletion ashes/src/components/carts/line-item.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Link } from 'components/link';
import ConfirmationModal from 'components/core/confirmation-modal';
import Counter from 'components/core/counter';
import { DeleteButton } from 'components/core/button';
import Currency from 'components/common/currency';
import Currency from 'components/utils/currency';
import ProductImage from 'components/imgix/product-image';

// actions
Expand Down
2 changes: 1 addition & 1 deletion ashes/src/components/carts/sku-result.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @flow

import React, { Component } from 'react';
import Currency from '../common/currency';
import Currency from 'components/utils/currency';
import ProductImage from 'components/imgix/product-image';

type Props = {
Expand Down
34 changes: 0 additions & 34 deletions ashes/src/components/common/currency.jsx

This file was deleted.

Loading