Skip to content

Commit

Permalink
Fix: 'Dist' files build
Browse files Browse the repository at this point in the history
  • Loading branch information
jsilverize committed Oct 5, 2018
1 parent 9aa7393 commit 9e27afc
Show file tree
Hide file tree
Showing 18 changed files with 107 additions and 25 deletions.
5 changes: 5 additions & 0 deletions .docz/app/db.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@
"depth": 2,
"slug": "block",
"value": "Block"
},
{
"depth": 2,
"slug": "disabled",
"value": "Disabled"
}
]
}
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Aphrodite
# Aphrodite React
### UI framework from ingresse.com

A front-end framework with Ingresse styles, using `React` 16.
Expand Down Expand Up @@ -38,16 +38,17 @@ _

## Development
```
yarn docz
yarn dev
```

_


## Build Documentation
## Build
```
yarn docz:build
yarn build
```
Distribution files will be in `dist` folder.

_

Expand Down
7 changes: 6 additions & 1 deletion dist/components/Button/Bordered/Bordered.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ var StyledButton =
return _objectSpread({}, props.styles, {
borderColor: props.color ? _constants.COLORS[props.color.toUpperCase()] : _constants.COLORS.PRIMARY,
color: props.color ? _constants.COLORS[props.color.toUpperCase()] : _constants.COLORS.PRIMARY,
background: 'transparent'
background: 'transparent',
'&:disabled': {
cursor: 'not-allowed',
color: _constants.COLORS.GREY,
borderColor: _constants.COLORS.GREY
}
});
});
/* Component */
Expand Down
10 changes: 8 additions & 2 deletions dist/components/Button/Regular/Regular.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,15 @@ var StyledButton =
target: "e1bfgx1g0"
})(function (props) {
return _objectSpread({}, props.styles, {
borderColor: props.color ? _constants.COLORS[props.color.toUpperCase()] : _constants.COLORS.PRIMARY,
color: props.color && props.color !== 'white' ? _constants.COLORS.WHITE : _constants.COLORS.BLACK,
background: props.color ? _constants.COLORS[props.color.toUpperCase()] : _constants.COLORS.PRIMARY
background: props.color ? _constants.COLORS[props.color.toUpperCase()] : _constants.COLORS.PRIMARY,
borderColor: props.color ? _constants.COLORS[props.color.toUpperCase()] : _constants.COLORS.PRIMARY,
'&:disabled': {
cursor: 'not-allowed',
color: _constants.COLORS.GREY,
background: _constants.COLORS.LIGHT_GREY,
borderColor: _constants.COLORS.LIGHT_GREY
}
});
});
/* Component */
Expand Down
1 change: 1 addition & 0 deletions dist/components/Button/constants/buttonStyles.constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ var BUTTON_STYLES = {
minWidth: '140px',
borderRadius: '25px',
textTransform: 'uppercase',
userSelect: 'none',
'&:hover,&:focus,&:active,&:disabled': {
outline: 0
}
Expand Down
27 changes: 25 additions & 2 deletions dist/constants/colors.constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,36 @@ Object.defineProperty(exports, "__esModule", {
});
exports.COLORS = void 0;
var _COLORS = {
BLACK: 'rgb(42, 42, 42)',
BLACK: 'rgb(45, 45, 45)',
// #2D2D2D
WHITE: 'rgb(255, 255, 255)',
// #FFFFFF
SMOKE: 'rgb(248, 248, 248)',
// #F8F8F8
GREY_SMOKE: 'rgb(238, 238, 238)',
// #EEEEEE
LIGHT_GREY: 'rgb(212, 215, 217)',
// #D4D7D9
GREY: 'rgb(157, 166, 173)',
// #9DA6AD
DARK_GREY: 'rgb(122, 128, 133)',
// #7A8085
ORANGE: 'rgb(252, 163, 17)',
// #FCA311
LIGHT_ORANGE: 'rgb(255, 141, 80)',
// #FF8D50
YELLOW: 'rgb(255, 198, 30)',
// #FFC61E
RED: 'rgb(241, 51, 53)',
// #F13335
GREEN: 'rgb(96,198,89)',
BLUE: 'rgb(0, 165, 219)'
// #60C659
BLUE: 'rgb(0, 165, 219)',
// #00A5DB
PURPLE: 'rgb(172, 108, 184)',
// #AC6CB8
LIGHT_PINK: 'rgb(248, 130, 184)' // #F882B8

};
var COLORS = Object.assign({}, _COLORS, {
PRIMARY: _COLORS.BLUE,
Expand Down
6 changes: 3 additions & 3 deletions docs/assets.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"app.js": "/aphrodite-react/static/js/app.88e81424.js",
"app.js": "/aphrodite-react/static/js/app.90134ebc.js",
"index.js": "/aphrodite-react/static/js/index.b08238ea.js",
"components-button-button.js": "/aphrodite-react/static/js/components-button-button.448c39e5.js",
"components-button-button.js": "/aphrodite-react/static/js/components-button-button.524e7864.js",
"vendors.js": "/aphrodite-react/static/js/vendors.575afc31.js",
"runtime~app.js": "/aphrodite-react/static/js/runtime~app.c533064f040ed52505ba.js",
"runtime~app.js": "/aphrodite-react/static/js/runtime~app.aa6bf30e95bcfb462a9d.js",
"index.html": "/aphrodite-react/index.html"
}
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="description" content="UI framework from ingresse.com"><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>APHRODITE</title><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,600,700"></head><body><div id="root"/><script src="/aphrodite-react/static/js/runtime~app.c533064f040ed52505ba.js"></script><script src="/aphrodite-react/static/js/vendors.575afc31.js"></script><script src="/aphrodite-react/static/js/app.88e81424.js"></script></body></html>
<!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="description" content="UI framework from ingresse.com"><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>APHRODITE</title><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,600,700"></head><body><div id="root"/><script src="/aphrodite-react/static/js/runtime~app.aa6bf30e95bcfb462a9d.js"></script><script src="/aphrodite-react/static/js/vendors.575afc31.js"></script><script src="/aphrodite-react/static/js/app.90134ebc.js"></script></body></html>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion docs/static/js/components-button-button.448c39e5.js

This file was deleted.

1 change: 1 addition & 0 deletions docs/static/js/components-button-button.524e7864.js

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"test": "react-scripts test",
"docz": "docz build",
"start": "docz dev",
"dev": "npm run start",
"build": "npm run docz && rimraf dist && NODE_ENV=production babel src --out-dir dist --ignore \"src/setupTests.js\",\"src/**/*.test.js\",\"src/**/*.test.jsx\",\"src/**/**/*.test.jsx\",\"src/*.mdx\",\"src/**/*.mdx\",\"src/**/**/*.mdx\""
},
"eslintConfig": {
Expand Down
6 changes: 6 additions & 0 deletions src/components/Button/Bordered/Bordered.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ const StyledButton = styled('button')(props => ({
borderColor: (props.color ? COLORS[props.color.toUpperCase()] : COLORS.PRIMARY),
color : (props.color ? COLORS[props.color.toUpperCase()] : COLORS.PRIMARY),
background : 'transparent',

'&:disabled': {
cursor : 'not-allowed',
color : COLORS.GREY,
borderColor: COLORS.GREY,
},
}));

/* Component */
Expand Down
14 changes: 14 additions & 0 deletions src/components/Button/Button.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,17 @@ import { Button } from '../';
Block
</Button>
</Playground>

## Disabled
Ignore `color` attribute

.

<Playground>
<Button color="black" disabled>
Regular Disabled
</Button>
<Button color="red" bordered disabled>
Bordered Disabled
</Button>
</Playground>
9 changes: 8 additions & 1 deletion src/components/Button/Regular/Regular.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,16 @@ import { COLORS } from '../../../constants';
const StyledButton = styled('button')(props => ({
...props.styles,

borderColor: (props.color ? COLORS[props.color.toUpperCase()] : COLORS.PRIMARY),
color : (props.color && props.color !== 'white' ? COLORS.WHITE : COLORS.BLACK),
background : (props.color ? COLORS[props.color.toUpperCase()] : COLORS.PRIMARY),
borderColor: (props.color ? COLORS[props.color.toUpperCase()] : COLORS.PRIMARY),

'&:disabled': {
cursor : 'not-allowed',
color : COLORS.GREY,
background : COLORS.LIGHT_GREY,
borderColor: COLORS.LIGHT_GREY,
},
}));

/* Component */
Expand Down
2 changes: 2 additions & 0 deletions src/components/Button/constants/buttonStyles.constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export const BUTTON_STYLES = {

textTransform: 'uppercase',

userSelect: 'none',

'&:hover,&:focus,&:active,&:disabled': {
outline: 0,
},
Expand Down
27 changes: 19 additions & 8 deletions src/constants/colors.constants.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@

const _COLORS = {
BLACK: 'rgb(42, 42, 42)',
WHITE: 'rgb(255, 255, 255)',

ORANGE: 'rgb(252, 163, 17)',
YELLOW: 'rgb(255, 198, 30)',
RED : 'rgb(241, 51, 53)',
GREEN : 'rgb(96,198,89)',
BLUE : 'rgb(0, 165, 219)',
BLACK: 'rgb(45, 45, 45)', // #2D2D2D
WHITE: 'rgb(255, 255, 255)', // #FFFFFF

SMOKE: 'rgb(248, 248, 248)', // #F8F8F8

GREY_SMOKE: 'rgb(238, 238, 238)', // #EEEEEE

LIGHT_GREY: 'rgb(212, 215, 217)', // #D4D7D9
GREY : 'rgb(157, 166, 173)', // #9DA6AD
DARK_GREY : 'rgb(122, 128, 133)', // #7A8085

ORANGE : 'rgb(252, 163, 17)', // #FCA311
LIGHT_ORANGE: 'rgb(255, 141, 80)', // #FF8D50
YELLOW : 'rgb(255, 198, 30)', // #FFC61E
RED : 'rgb(241, 51, 53)', // #F13335
GREEN : 'rgb(96,198,89)', // #60C659
BLUE : 'rgb(0, 165, 219)', // #00A5DB
PURPLE : 'rgb(172, 108, 184)', // #AC6CB8
LIGHT_PINK : 'rgb(248, 130, 184)', // #F882B8
};

export const COLORS = Object.assign({}, _COLORS, {
Expand Down

0 comments on commit 9e27afc

Please sign in to comment.