@councilbox/councilbox-ui 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/build-index.js +26 -2
- package/dist/components/Avatar/Avatar.js +42 -55
- package/dist/components/Avatar/Avatar.stories.js +10 -0
- package/dist/components/Avatar/DesignAvatar.stories.js +104 -4
- package/dist/components/Avatar/DesignAvatarText.stories.js +65 -4
- package/dist/components/AvatarGroup/AvatarGroup.css +33 -0
- package/dist/components/AvatarGroup/AvatarGroup.js +4 -7
- package/dist/components/AvatarGroup/DesignAvatarGroup.stories.js +73 -4
- package/dist/components/Button/Button.js +90 -16
- package/dist/components/Button/Button.stories.js +25 -25
- package/dist/components/Button/button.css +34 -0
- package/dist/components/Checkbox/Checkbox.css +0 -0
- package/dist/components/Checkbox/Checkbox.js +94 -0
- package/dist/components/Checkbox/Checkbox.stories.js +28 -0
- package/dist/components/InputPassword/InputPassword.css +26 -0
- package/dist/components/InputPassword/InputPassword.js +78 -107
- package/dist/components/InputPassword/InputPassword.stories.js +33 -2
- package/dist/components/InputText/InputText.css +13 -0
- package/dist/components/InputText/InputText.js +118 -44
- package/dist/components/InputText/InputText.stories.js +26 -2
- package/dist/components/RadioButton/Radio.css +0 -0
- package/dist/components/RadioButton/Radio.js +94 -0
- package/dist/components/RadioButton/Radio.stories.js +28 -0
- package/dist/components/Spacing/Spacing.css +0 -0
- package/dist/components/Spacing/Spacing.js +137 -0
- package/dist/components/Spacing/Spacing.stories.js +28 -0
- package/dist/components/ThemeProvider/Colors.js +102 -0
- package/dist/components/ThemeProvider/ThemeProvider.js +17 -8
- package/dist/components/Typography/Typography.js +37 -13
- package/dist/components/Typography/Typography.stories.js +11 -2
- package/dist/styles/main.css +96 -30
- package/dist/styles/stylesheet.js +40 -9
- package/dist/testing/TestComponents.js +57 -24
- package/package.json +3 -2
- package/dist/components/Button/ButtonV1.js +0 -63
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.colorsThemeWarnig = exports.colorsThemeSuccess = exports.colorsThemeSecondary = exports.colorsThemePrimary = exports.colorsThemeNeutral = exports.colorsThemeInfo = exports.colorsThemeError = exports.colorsThemeBrand = void 0;
|
|
7
|
+
var colorsThemeBrand = {
|
|
8
|
+
primary: '#38398C',
|
|
9
|
+
secondary: '#6BEAF2'
|
|
10
|
+
};
|
|
11
|
+
exports.colorsThemeBrand = colorsThemeBrand;
|
|
12
|
+
var colorsThemePrimary = {
|
|
13
|
+
primary900: '#1F2073',
|
|
14
|
+
primary800: '#38398C',
|
|
15
|
+
primary700: '#5152A5',
|
|
16
|
+
primary600: '#696ABD',
|
|
17
|
+
primary500: '#8889DA',
|
|
18
|
+
primary400: '#A6A7F8',
|
|
19
|
+
primary300: '#BCBDFF',
|
|
20
|
+
primary200: '#CECFF8',
|
|
21
|
+
primary100: '#E1E5FF',
|
|
22
|
+
primary50: '#F2F4FF'
|
|
23
|
+
};
|
|
24
|
+
exports.colorsThemePrimary = colorsThemePrimary;
|
|
25
|
+
var colorsThemeSecondary = {
|
|
26
|
+
secondary900: '#0A6169',
|
|
27
|
+
secondary800: '#047A82',
|
|
28
|
+
secondary700: '#1A99A1',
|
|
29
|
+
secondary600: '#3DBCC4',
|
|
30
|
+
secondary500: '#5AD9E1',
|
|
31
|
+
secondary400: '#A6A7F8',
|
|
32
|
+
secondary300: '#89F5FC',
|
|
33
|
+
secondary200: '#B5F5F9',
|
|
34
|
+
secondary100: '#D6FDFF',
|
|
35
|
+
secondary50: '#EAFDFF'
|
|
36
|
+
};
|
|
37
|
+
exports.colorsThemeSecondary = colorsThemeSecondary;
|
|
38
|
+
var colorsThemeNeutral = {
|
|
39
|
+
neutral900: '#222222',
|
|
40
|
+
neutral800: '#363636',
|
|
41
|
+
neutral700: '#4D4D4D',
|
|
42
|
+
neutral600: '#616161',
|
|
43
|
+
neutral500: '#767676',
|
|
44
|
+
neutral400: '#8C8C8C',
|
|
45
|
+
neutral300: '#AAAAAA',
|
|
46
|
+
neutral200: '#C7C7C7',
|
|
47
|
+
neutral100: '#E5E5E5',
|
|
48
|
+
neutral50: '#F6F6F6'
|
|
49
|
+
};
|
|
50
|
+
exports.colorsThemeNeutral = colorsThemeNeutral;
|
|
51
|
+
var colorsThemeInfo = {
|
|
52
|
+
info900: '#004BA1',
|
|
53
|
+
info800: '#0064B7',
|
|
54
|
+
info700: '#007AD1',
|
|
55
|
+
info600: '#0B8CE4',
|
|
56
|
+
info500: '#1CA2F9',
|
|
57
|
+
info400: '#55B9F9',
|
|
58
|
+
info300: '#86CAF5',
|
|
59
|
+
info200: '#B8E3FF',
|
|
60
|
+
info100: '#CFEDFF',
|
|
61
|
+
info50: '#E5F5FF'
|
|
62
|
+
};
|
|
63
|
+
exports.colorsThemeInfo = colorsThemeInfo;
|
|
64
|
+
var colorsThemeError = {
|
|
65
|
+
error900: '#960000',
|
|
66
|
+
error800: '#B60000',
|
|
67
|
+
error700: '#D50000',
|
|
68
|
+
error600: '#E80000',
|
|
69
|
+
error500: '#F63D3D',
|
|
70
|
+
error400: '#FE6A6A',
|
|
71
|
+
error300: '#FF8989',
|
|
72
|
+
error200: '#FFB5B5',
|
|
73
|
+
error100: '#FFCFCF',
|
|
74
|
+
error50: '#FFE5E5'
|
|
75
|
+
};
|
|
76
|
+
exports.colorsThemeError = colorsThemeError;
|
|
77
|
+
var colorsThemeWarnig = {
|
|
78
|
+
warnig900: '#843D00',
|
|
79
|
+
warnig800: '#A44D00',
|
|
80
|
+
warnig700: '#C75D00',
|
|
81
|
+
warnig600: '#EA7405',
|
|
82
|
+
warnig500: '#F98C25',
|
|
83
|
+
warnig400: '#FF9D42',
|
|
84
|
+
warnig300: '#FFB65E',
|
|
85
|
+
warnig200: '#FFC988',
|
|
86
|
+
warnig100: '#FDE2B4',
|
|
87
|
+
warnig50: '#FEF4E1'
|
|
88
|
+
};
|
|
89
|
+
exports.colorsThemeWarnig = colorsThemeWarnig;
|
|
90
|
+
var colorsThemeSuccess = {
|
|
91
|
+
success900: '#004800',
|
|
92
|
+
success800: '#006500',
|
|
93
|
+
success700: '#007A00',
|
|
94
|
+
success600: '#138A00',
|
|
95
|
+
success500: '#039928',
|
|
96
|
+
success400: '#43B952',
|
|
97
|
+
success300: '#6AC572',
|
|
98
|
+
success200: '#97D59B',
|
|
99
|
+
success100: '#C0E5C2',
|
|
100
|
+
success50: '#E2F5E3'
|
|
101
|
+
};
|
|
102
|
+
exports.colorsThemeSuccess = colorsThemeSuccess;
|
|
@@ -17,6 +17,12 @@ var _stylesheet = require("../../styles/stylesheet");
|
|
|
17
17
|
|
|
18
18
|
var _CouncilboxThemeContext = require("./CouncilboxThemeContext");
|
|
19
19
|
|
|
20
|
+
var _Colors = require("./Colors");
|
|
21
|
+
|
|
22
|
+
var _useWindowSize2 = _interopRequireDefault(require("../../HOCs/useWindowSize"));
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
|
|
20
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
27
|
|
|
22
28
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -39,24 +45,24 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
39
45
|
|
|
40
46
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
47
|
|
|
42
|
-
var defaultTheme = {
|
|
43
|
-
colors: {
|
|
44
|
-
primary: '#38398C',
|
|
45
|
-
secondary: '#61ABB7'
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
+
var defaultTheme = {};
|
|
48
49
|
|
|
49
50
|
var _default = function _default(_ref) {
|
|
50
51
|
var children = _ref.children,
|
|
51
52
|
colors = _ref.colors;
|
|
52
53
|
|
|
53
54
|
var _React$useState = React.useState(_objectSpread(_objectSpread({}, defaultTheme), {}, {
|
|
54
|
-
colors: _objectSpread(_objectSpread({},
|
|
55
|
+
colors: _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, _Colors.colorsThemeBrand), _Colors.colorsThemePrimary), _Colors.colorsThemeSecondary), _Colors.colorsThemeNeutral), _Colors.colorsThemeInfo), _Colors.colorsThemeError), _Colors.colorsThemeWarnig), _Colors.colorsThemeSuccess), colors)
|
|
55
56
|
})),
|
|
56
57
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
57
58
|
state = _React$useState2[0],
|
|
58
59
|
setState = _React$useState2[1];
|
|
59
60
|
|
|
61
|
+
var _useWindowSize = (0, _useWindowSize2.default)(),
|
|
62
|
+
size = _useWindowSize.size,
|
|
63
|
+
innerWidth = _useWindowSize.innerWidth,
|
|
64
|
+
innerHeight = _useWindowSize.innerHeight;
|
|
65
|
+
|
|
60
66
|
var updateColors = function updateColors(newColors) {
|
|
61
67
|
setState(_objectSpread(_objectSpread({}, state), {}, {
|
|
62
68
|
colors: _objectSpread(_objectSpread({}, state.colors), newColors)
|
|
@@ -66,7 +72,10 @@ var _default = function _default(_ref) {
|
|
|
66
72
|
return /*#__PURE__*/React.createElement(_CouncilboxThemeContext.CouncilTheme.Provider, {
|
|
67
73
|
value: {
|
|
68
74
|
theme: state,
|
|
69
|
-
updateColors: updateColors
|
|
75
|
+
updateColors: updateColors,
|
|
76
|
+
size: size,
|
|
77
|
+
innerWidth: innerWidth,
|
|
78
|
+
innerHeight: innerHeight
|
|
70
79
|
}
|
|
71
80
|
}, /*#__PURE__*/React.createElement(_styles.ThemeProvider, {
|
|
72
81
|
theme: (0, _stylesheet.theme)({
|
|
@@ -13,15 +13,26 @@ require("../../styles/main.css");
|
|
|
13
13
|
|
|
14
14
|
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
15
15
|
|
|
16
|
+
var _CouncilboxThemeContext = require("../ThemeProvider/CouncilboxThemeContext");
|
|
17
|
+
|
|
18
|
+
var _excluded = ["children", "styles", "variant", "fontWeight", "textAlign", "color", "secondaryFont"];
|
|
19
|
+
|
|
16
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
21
|
|
|
22
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
|
+
|
|
18
24
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
19
25
|
|
|
20
26
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
21
27
|
|
|
22
28
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
29
|
|
|
30
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
31
|
+
|
|
32
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
33
|
+
|
|
24
34
|
var nameVariant = {
|
|
35
|
+
'5XL': 'h1',
|
|
25
36
|
'4XL': 'h2',
|
|
26
37
|
'3XL': 'h3',
|
|
27
38
|
'2XL': 'h4',
|
|
@@ -33,6 +44,10 @@ var nameVariant = {
|
|
|
33
44
|
'2XS': 'subtitle2'
|
|
34
45
|
};
|
|
35
46
|
var stylesVariants = {
|
|
47
|
+
'5XL': {
|
|
48
|
+
fontSize: '48px',
|
|
49
|
+
lineHeight: '64px'
|
|
50
|
+
},
|
|
36
51
|
'4XL': {
|
|
37
52
|
fontSize: '40px',
|
|
38
53
|
lineHeight: '56px'
|
|
@@ -77,15 +92,22 @@ var Typography = function Typography(_ref) {
|
|
|
77
92
|
variant = _ref.variant,
|
|
78
93
|
fontWeight = _ref.fontWeight,
|
|
79
94
|
textAlign = _ref.textAlign,
|
|
80
|
-
color = _ref.color
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
95
|
+
color = _ref.color,
|
|
96
|
+
secondaryFont = _ref.secondaryFont,
|
|
97
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
98
|
+
|
|
99
|
+
var _useCouncilboxTheme = (0, _CouncilboxThemeContext.useCouncilboxTheme)(),
|
|
100
|
+
theme = _useCouncilboxTheme.theme;
|
|
101
|
+
|
|
102
|
+
return /*#__PURE__*/_react.default.createElement(_Typography.default, _extends({
|
|
103
|
+
sx: _objectSpread(_objectSpread({}, stylesVariants[variant || 'M']), {}, {
|
|
104
|
+
color: color || theme.colors.neutral600,
|
|
105
|
+
fontWeight: fontWeight || '400',
|
|
106
|
+
textAlign: textAlign,
|
|
107
|
+
fontFamily: secondaryFont && 'var(--font-secondary)'
|
|
86
108
|
}, styles),
|
|
87
|
-
variant: nameVariant[variant]
|
|
88
|
-
}, children);
|
|
109
|
+
variant: nameVariant[variant || 'M']
|
|
110
|
+
}, props), children);
|
|
89
111
|
};
|
|
90
112
|
|
|
91
113
|
Typography.displayName = "Typography";
|
|
@@ -95,15 +117,17 @@ Typography.propTypes = {
|
|
|
95
117
|
styles: _propTypes.default.object,
|
|
96
118
|
children: _propTypes.default.string,
|
|
97
119
|
fontWeight: _propTypes.default.string,
|
|
98
|
-
textAlign: _propTypes.default.string
|
|
120
|
+
textAlign: _propTypes.default.string,
|
|
121
|
+
secondaryFont: _propTypes.default.bool
|
|
99
122
|
};
|
|
100
123
|
Typography.defaultProps = {
|
|
101
|
-
variant: '
|
|
102
|
-
color: '
|
|
124
|
+
variant: '',
|
|
125
|
+
color: '',
|
|
103
126
|
styles: {},
|
|
104
127
|
children: 'texto',
|
|
105
|
-
fontWeight: '
|
|
106
|
-
textAlign: ''
|
|
128
|
+
fontWeight: '',
|
|
129
|
+
textAlign: '',
|
|
130
|
+
secondaryFont: false
|
|
107
131
|
};
|
|
108
132
|
var _default = Typography;
|
|
109
133
|
exports.default = _default;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.Default = void 0;
|
|
6
|
+
exports.default = exports.Secondary = exports.Default = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -16,7 +16,7 @@ var _default = {
|
|
|
16
16
|
component: _Typography.default,
|
|
17
17
|
argTypes: {
|
|
18
18
|
variant: {
|
|
19
|
-
options: ['4XL', '3XL', '2XL', 'XL', 'L', 'M', 'S', 'XS', '2XS'],
|
|
19
|
+
options: ['5XL', '4XL', '3XL', '2XL', 'XL', 'L', 'M', 'S', 'XS', '2XS'],
|
|
20
20
|
control: {
|
|
21
21
|
type: 'radio'
|
|
22
22
|
}
|
|
@@ -57,4 +57,13 @@ Default.args = {
|
|
|
57
57
|
fontWeight: '400',
|
|
58
58
|
styles: {},
|
|
59
59
|
children: 'texto'
|
|
60
|
+
};
|
|
61
|
+
var Secondary = Template.bind({});
|
|
62
|
+
exports.Secondary = Secondary;
|
|
63
|
+
Secondary.args = {
|
|
64
|
+
variant: 'M',
|
|
65
|
+
fontWeight: '400',
|
|
66
|
+
secondaryFont: true,
|
|
67
|
+
styles: {},
|
|
68
|
+
children: 'texto'
|
|
60
69
|
};
|
package/dist/styles/main.css
CHANGED
|
@@ -1,13 +1,104 @@
|
|
|
1
1
|
@import './reset.css';
|
|
2
2
|
|
|
3
3
|
:root {
|
|
4
|
-
--font-
|
|
4
|
+
--font-primary: 'Lato', sans-serif;
|
|
5
|
+
--font-secondary: 'Montserrat', sans-serif;
|
|
5
6
|
--primary: #38398C;
|
|
6
|
-
--secondary: #
|
|
7
|
+
--secondary: #6BEAF2;
|
|
8
|
+
--primary900: #1F2073;
|
|
9
|
+
--primary800: #38398C;
|
|
10
|
+
--primary700: #5152A5;
|
|
11
|
+
--primary600: #696ABD;
|
|
12
|
+
--primary500: #8889DA;
|
|
13
|
+
--primary400: #A6A7F8;
|
|
14
|
+
--primary300: #BCBDFF;
|
|
15
|
+
--primary200: #CECFF8;
|
|
16
|
+
--primary100: #E1E5FF;
|
|
17
|
+
--primary50: #F2F4FF;
|
|
18
|
+
--secondary900: #0A6169;
|
|
19
|
+
--secondary800: #047A82;
|
|
20
|
+
--secondary700: #1A99A1;
|
|
21
|
+
--secondary600: #3DBCC4;
|
|
22
|
+
--secondary500: #5AD9E1;
|
|
23
|
+
--secondary400: #A6A7F8;
|
|
24
|
+
--secondary300: #89F5FC;
|
|
25
|
+
--secondary200: #B5F5F9;
|
|
26
|
+
--secondary100: #D6FDFF;
|
|
27
|
+
--secondary50: #EAFDFF;
|
|
28
|
+
--neutral900: #222222;
|
|
29
|
+
--neutral800: #363636;
|
|
30
|
+
--neutral700: #4D4D4D;
|
|
31
|
+
--neutral600: #616161;
|
|
32
|
+
--neutral500: #767676;
|
|
33
|
+
--neutral400: #8C8C8C;
|
|
34
|
+
--neutral300: #AAAAAA;
|
|
35
|
+
--neutral200: #C7C7C7;
|
|
36
|
+
--neutral100: #E5E5E5;
|
|
37
|
+
--neutral50: #F6F6F6;
|
|
38
|
+
--info900: #004BA1;
|
|
39
|
+
--info800: #0064B7;
|
|
40
|
+
--info700: #007AD1;
|
|
41
|
+
--info600: #0B8CE4;
|
|
42
|
+
--info500: #1CA2F9;
|
|
43
|
+
--info400: #55B9F9;
|
|
44
|
+
--info300: #86CAF5;
|
|
45
|
+
--info200: #B8E3FF;
|
|
46
|
+
--info100: #CFEDFF;
|
|
47
|
+
--info50: #E5F5FF;
|
|
48
|
+
--error900: #960000;
|
|
49
|
+
--error800: #B60000;
|
|
50
|
+
--error700: #D50000;
|
|
51
|
+
--error600: #E80000;
|
|
52
|
+
--error500: #F63D3D;
|
|
53
|
+
--error400: #FE6A6A;
|
|
54
|
+
--error300: #FF8989;
|
|
55
|
+
--error200: #FFB5B5;
|
|
56
|
+
--error100: #FFCFCF;
|
|
57
|
+
--error50: #FFE5E5;
|
|
58
|
+
--warnig900: #843D00;
|
|
59
|
+
--warnig800: #A44D00;
|
|
60
|
+
--warnig700: #C75D00;
|
|
61
|
+
--warnig600: #EA7405;
|
|
62
|
+
--warnig500: #F98C25;
|
|
63
|
+
--warnig400: #FF9D42;
|
|
64
|
+
--warnig300: #FFB65E;
|
|
65
|
+
--warnig200: #FFC988;
|
|
66
|
+
--warnig100: #FDE2B4;
|
|
67
|
+
--warnig50: #FEF4E1;
|
|
68
|
+
--success900: #004800;
|
|
69
|
+
--success800: #006500;
|
|
70
|
+
--success700: #007A00;
|
|
71
|
+
--success600: #138A00;
|
|
72
|
+
--success500: #039928;
|
|
73
|
+
--success400: #43B952;
|
|
74
|
+
--success300: #6AC572;
|
|
75
|
+
--success200: #97D59B;
|
|
76
|
+
--success100: #C0E5C2;
|
|
77
|
+
--success50: #E2F5E3;
|
|
78
|
+
--spacing4: 0.25rem;
|
|
79
|
+
--spacing8: 0.5rem;
|
|
80
|
+
--spacing12: 0.75rem;
|
|
81
|
+
--spacing16: 1rem;
|
|
82
|
+
--spacing20: 1.25rem;
|
|
83
|
+
--spacing24: 1.5rem;
|
|
84
|
+
--spacing32: 2rem;
|
|
85
|
+
--spacing40: 2.5rem;
|
|
86
|
+
--spacing48: 3rem;
|
|
87
|
+
--spacing56: 3.5rem;
|
|
88
|
+
--spacing64: 4rem;
|
|
89
|
+
--spacing72: 4.5rem;
|
|
90
|
+
--spacing80: 5rem;
|
|
91
|
+
--spacing96: 6rem;
|
|
92
|
+
--spacing112: 7rem;
|
|
93
|
+
--spacing128: 8rem;
|
|
94
|
+
--spacing144: 9rem;
|
|
95
|
+
--spacing160: 10rem;
|
|
96
|
+
--spacing176: 11rem;
|
|
97
|
+
--spacing192: 12rem;
|
|
7
98
|
}
|
|
8
99
|
|
|
9
100
|
html, body {
|
|
10
|
-
font-family:
|
|
101
|
+
font-family: var(--font-primary);
|
|
11
102
|
height: 100%;
|
|
12
103
|
}
|
|
13
104
|
|
|
@@ -20,7 +111,7 @@ html, body {
|
|
|
20
111
|
}
|
|
21
112
|
|
|
22
113
|
html {
|
|
23
|
-
font-family: var(--font-
|
|
114
|
+
font-family: var(--font-primary);
|
|
24
115
|
height: 100%;
|
|
25
116
|
overflow: hidden !important;
|
|
26
117
|
}
|
|
@@ -29,30 +120,5 @@ body {
|
|
|
29
120
|
margin: 0;
|
|
30
121
|
padding: 0;
|
|
31
122
|
height: 100%;
|
|
32
|
-
font-family: var(--font-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.gapAvatar {
|
|
36
|
-
gap: 16px
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.gapAvatarCompressed > div:not(:first-child){
|
|
40
|
-
margin-left: -16px
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
.gapAvatarCompressedsm > div:not(:first-child){
|
|
45
|
-
margin-left: -6px
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.gapAvatarCompressedxs > div:not(:first-child){
|
|
49
|
-
margin-left: -8px
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.gapAvatarCompressedsm > div:not(:first-child) > div {
|
|
53
|
-
border: 0.571429px solid white;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.gapAvatarCompressedxs > div:not(:first-child) > div {
|
|
57
|
-
border: 0.428571px solid white;
|
|
123
|
+
font-family: var(--font-primary);
|
|
58
124
|
}
|
|
@@ -7,14 +7,14 @@ exports.theme = exports.getSecondary = exports.getPrimary = exports.defaultBreak
|
|
|
7
7
|
|
|
8
8
|
var _styles = require("@mui/material/styles");
|
|
9
9
|
|
|
10
|
+
var _Colors = require("../components/ThemeProvider/Colors");
|
|
11
|
+
|
|
10
12
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11
13
|
|
|
12
14
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
15
|
|
|
14
16
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
17
|
|
|
16
|
-
var primary = '#38398C';
|
|
17
|
-
var secondary = '#61ABB7';
|
|
18
18
|
var defaultBreakpoints = {
|
|
19
19
|
xs: 320,
|
|
20
20
|
sm: 768,
|
|
@@ -25,14 +25,16 @@ var defaultBreakpoints = {
|
|
|
25
25
|
exports.defaultBreakpoints = defaultBreakpoints;
|
|
26
26
|
|
|
27
27
|
var getPrimary = function getPrimary() {
|
|
28
|
-
var actual = document.documentElement.style.getPropertyValue('--primary') || primary;
|
|
28
|
+
var actual = document.documentElement.style.getPropertyValue('--primary') || _Colors.colorsThemeBrand.primary;
|
|
29
|
+
|
|
29
30
|
return actual;
|
|
30
31
|
};
|
|
31
32
|
|
|
32
33
|
exports.getPrimary = getPrimary;
|
|
33
34
|
|
|
34
35
|
var getSecondary = function getSecondary() {
|
|
35
|
-
var actual = document.documentElement.style.getPropertyValue('--secondary') || secondary;
|
|
36
|
+
var actual = document.documentElement.style.getPropertyValue('--secondary') || _Colors.colorsThemeBrand.secondary;
|
|
37
|
+
|
|
36
38
|
return actual;
|
|
37
39
|
};
|
|
38
40
|
|
|
@@ -50,7 +52,7 @@ var theme = function theme() {
|
|
|
50
52
|
values: _objectSpread(_objectSpread({}, defaultBreakpoints), breakpoints)
|
|
51
53
|
},
|
|
52
54
|
typography: {
|
|
53
|
-
fontFamily: '
|
|
55
|
+
fontFamily: 'var(--font-primary)',
|
|
54
56
|
fontSize: 16,
|
|
55
57
|
body1: {
|
|
56
58
|
color: '#616161',
|
|
@@ -59,20 +61,49 @@ var theme = function theme() {
|
|
|
59
61
|
}
|
|
60
62
|
},
|
|
61
63
|
spacing: [0, 4, 8, 16, 32, 64],
|
|
62
|
-
palette: {
|
|
64
|
+
palette: _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
63
65
|
primary: {
|
|
64
66
|
main: colors.primary || getPrimary()
|
|
65
67
|
},
|
|
66
68
|
secondary: {
|
|
67
69
|
main: colors.secondary || getSecondary()
|
|
68
70
|
}
|
|
69
|
-
},
|
|
71
|
+
}, _Colors.colorsThemePrimary), _Colors.colorsThemeSecondary), _Colors.colorsThemeNeutral), _Colors.colorsThemeInfo), _Colors.colorsThemeError), _Colors.colorsThemeWarnig), _Colors.colorsThemeSuccess),
|
|
70
72
|
components: {
|
|
71
73
|
MuiAvatar: {
|
|
72
74
|
styleOverrides: {
|
|
73
75
|
root: {
|
|
74
|
-
width: '
|
|
75
|
-
height: '
|
|
76
|
+
width: 'var(--spacing56)',
|
|
77
|
+
height: 'var(--spacing56)'
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
MuiButton: {
|
|
82
|
+
styleOverrides: {
|
|
83
|
+
root: {
|
|
84
|
+
paddingTop: 'var(--spacing12)',
|
|
85
|
+
paddingBottom: 'var(--spacing12)',
|
|
86
|
+
paddingLeft: 'var(--spacing24)'
|
|
87
|
+
},
|
|
88
|
+
containedPrimary: {
|
|
89
|
+
paddingRight: 'var(--spacing16)'
|
|
90
|
+
},
|
|
91
|
+
outlinedPrimary: {
|
|
92
|
+
paddingRight: 'var(--spacing24)',
|
|
93
|
+
'&:hover': {
|
|
94
|
+
boxShadow: '0 0 0 1px var(--primary)'
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
textPrimary: {
|
|
98
|
+
paddingRight: 'var(--spacing24)',
|
|
99
|
+
'&:hover': {
|
|
100
|
+
backgroundColor: '#FFF',
|
|
101
|
+
boxShadow: '0 0 0 1px white, 0 2px 6px 2px rgba(0,0,0,0.38)'
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
startIcon: {
|
|
105
|
+
paddingRight: 'var(--spacing8)',
|
|
106
|
+
margin: '0'
|
|
76
107
|
}
|
|
77
108
|
}
|
|
78
109
|
}
|
|
@@ -7,8 +7,6 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
-
var _material = require("@mui/material");
|
|
11
|
-
|
|
12
10
|
var _ThemeProvider = _interopRequireDefault(require("../components/ThemeProvider/ThemeProvider"));
|
|
13
11
|
|
|
14
12
|
var _CouncilboxThemeContext = require("../components/ThemeProvider/CouncilboxThemeContext");
|
|
@@ -19,43 +17,78 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
19
17
|
|
|
20
18
|
var Body = function Body() {
|
|
21
19
|
var cbxTheme = (0, _CouncilboxThemeContext.useCouncilboxTheme)();
|
|
22
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(
|
|
20
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
21
|
+
text: "texto",
|
|
22
|
+
variant: "primary",
|
|
23
|
+
disabled: true
|
|
24
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
23
25
|
style: {
|
|
24
|
-
|
|
25
|
-
height: '10em'
|
|
26
|
+
padding: '1.5em'
|
|
26
27
|
}
|
|
27
|
-
}
|
|
28
|
-
color: "primary",
|
|
28
|
+
}), /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
29
29
|
text: "texto",
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
variant: "success",
|
|
31
|
+
loading: true
|
|
32
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
33
|
+
style: {
|
|
34
|
+
padding: '1.5em'
|
|
34
35
|
}
|
|
35
36
|
}), /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
36
|
-
color: "secondary",
|
|
37
37
|
text: "texto",
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
variant: "primary"
|
|
39
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
40
|
+
style: {
|
|
41
|
+
padding: '1.5em'
|
|
42
|
+
}
|
|
43
|
+
}), /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
44
|
+
text: "texto",
|
|
45
|
+
variant: "error"
|
|
46
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
47
|
+
style: {
|
|
48
|
+
padding: '1.5em'
|
|
49
|
+
}
|
|
50
|
+
}), /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
51
|
+
text: "texto",
|
|
52
|
+
variant: "success"
|
|
53
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
54
|
+
style: {
|
|
55
|
+
padding: '1.5em'
|
|
42
56
|
}
|
|
43
57
|
}), /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
44
|
-
|
|
45
|
-
|
|
58
|
+
text: "texto",
|
|
59
|
+
variant: "warning"
|
|
60
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
61
|
+
style: {
|
|
62
|
+
padding: '1.5em'
|
|
63
|
+
}
|
|
64
|
+
}), /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
65
|
+
text: "texto",
|
|
66
|
+
variant: "tertiary",
|
|
46
67
|
onClick: function onClick() {
|
|
47
68
|
return cbxTheme.setDarkMode(true);
|
|
48
69
|
}
|
|
70
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
71
|
+
style: {
|
|
72
|
+
padding: '1.5em'
|
|
73
|
+
}
|
|
74
|
+
}), /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
75
|
+
text: "texto",
|
|
76
|
+
variant: "secondary",
|
|
77
|
+
icon: /*#__PURE__*/_react.default.createElement("i", {
|
|
78
|
+
className: "ri-save-line"
|
|
79
|
+
})
|
|
80
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
81
|
+
style: {
|
|
82
|
+
padding: '1.5em'
|
|
83
|
+
}
|
|
84
|
+
}), /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
85
|
+
text: "texto",
|
|
86
|
+
variant: "secondary"
|
|
49
87
|
}));
|
|
50
88
|
};
|
|
51
89
|
|
|
52
90
|
var TestComponents = function TestComponents() {
|
|
53
|
-
return /*#__PURE__*/_react.default.createElement(_ThemeProvider.default,
|
|
54
|
-
colors: {
|
|
55
|
-
primary: '#000088',
|
|
56
|
-
secondary: '#ff0000'
|
|
57
|
-
}
|
|
58
|
-
}, /*#__PURE__*/_react.default.createElement(Body, null));
|
|
91
|
+
return /*#__PURE__*/_react.default.createElement(_ThemeProvider.default, null, /*#__PURE__*/_react.default.createElement(Body, null));
|
|
59
92
|
};
|
|
60
93
|
|
|
61
94
|
TestComponents.displayName = "TestComponents";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@councilbox/councilbox-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"main": "dist/build-index.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"@mui/material": "^5.2.8",
|
|
20
20
|
"cross-env": "^7.0.3",
|
|
21
21
|
"prop-types": "^15.8.1",
|
|
22
|
+
"remixicon": "^2.5.0",
|
|
22
23
|
"web-vitals": "^2.1.0"
|
|
23
24
|
},
|
|
24
25
|
"scripts": {
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
"build-storybook": "build-storybook -s public",
|
|
32
33
|
"lint": "eslint . --quiet --ext .js --ext .jsx",
|
|
33
34
|
"clean": "rimraf dist",
|
|
34
|
-
"compile": "yarn run clean && cross-env NODE_ENV=production babel src --out-dir dist --copy-files --ignore testing/*,__tests__,spec.js,test.js
|
|
35
|
+
"compile": "yarn run clean && cross-env NODE_ENV=production babel src --out-dir dist --copy-files --ignore testing/*,__tests__,spec.js,test.js,stories.js,__snapshots__"
|
|
35
36
|
},
|
|
36
37
|
"babel": {
|
|
37
38
|
"presets": [
|