@councilbox/councilbox-ui 0.0.5 → 0.0.8
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 +104 -16
- package/dist/components/Button/Button.stories.js +23 -25
- package/dist/components/Button/button.css +47 -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 +19 -0
- package/dist/components/InputText/InputText.js +114 -52
- 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
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.8",
|
|
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": [
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
|
-
var _Button = _interopRequireDefault(require("@mui/material/Button"));
|
|
13
|
-
|
|
14
|
-
require("../../styles/main.css");
|
|
15
|
-
|
|
16
|
-
var _excluded = ["text", "onClick", "disabled", "loading", "variant", "id"];
|
|
17
|
-
|
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
|
|
20
|
-
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); }
|
|
21
|
-
|
|
22
|
-
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; }
|
|
23
|
-
|
|
24
|
-
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; }
|
|
25
|
-
|
|
26
|
-
var Button = function Button(_ref) {
|
|
27
|
-
var text = _ref.text,
|
|
28
|
-
onClick = _ref.onClick,
|
|
29
|
-
disabled = _ref.disabled,
|
|
30
|
-
loading = _ref.loading,
|
|
31
|
-
variant = _ref.variant,
|
|
32
|
-
id = _ref.id,
|
|
33
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
34
|
-
|
|
35
|
-
return /*#__PURE__*/_react.default.createElement(_Button.default, _extends({
|
|
36
|
-
id: id,
|
|
37
|
-
variant: variant,
|
|
38
|
-
className: "councilbox-button",
|
|
39
|
-
disabled: loading || disabled,
|
|
40
|
-
onClick: onClick
|
|
41
|
-
}, props), text);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
Button.displayName = "Button";
|
|
45
|
-
Button.propTypes = {
|
|
46
|
-
id: _propTypes.default.string,
|
|
47
|
-
backgroundColor: _propTypes.default.string,
|
|
48
|
-
text: _propTypes.default.string.isRequired,
|
|
49
|
-
onClick: _propTypes.default.func,
|
|
50
|
-
disabled: _propTypes.default.bool,
|
|
51
|
-
loading: _propTypes.default.bool,
|
|
52
|
-
variant: _propTypes.default.string
|
|
53
|
-
};
|
|
54
|
-
Button.defaultProps = {
|
|
55
|
-
backgroundColor: null,
|
|
56
|
-
text: null,
|
|
57
|
-
onClick: undefined,
|
|
58
|
-
disabled: false,
|
|
59
|
-
loading: false,
|
|
60
|
-
variant: 'contained'
|
|
61
|
-
};
|
|
62
|
-
var _default = Button;
|
|
63
|
-
exports.default = _default;
|