@councilbox/councilbox-ui 0.0.4 → 0.0.5
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/dist/HOCs/useWindowSize.js +78 -0
- package/dist/assets/img/check.svg +3 -0
- package/dist/assets/img/info.svg +5 -0
- package/dist/build-index.js +10 -2
- package/dist/components/Avatar/Avatar.js +13 -11
- package/dist/components/Avatar/Avatar.stories.js +5 -23
- package/dist/components/Avatar/{DesignAvatar.js → DesignAvatar.stories.js} +0 -0
- package/dist/components/Avatar/{DesignAvatarText.js → DesignAvatarText.stories.js} +0 -0
- package/dist/components/AvatarGroup/AvatarGroup.css +0 -0
- package/dist/components/AvatarGroup/AvatarGroup.js +43 -0
- package/dist/components/AvatarGroup/AvatarGroup.stories.js +32 -0
- package/dist/components/{Avatar/DesignAvatarGroup.js → AvatarGroup/DesignAvatarGroup.stories.js} +4 -2
- package/dist/components/Button/Button.stories.js +1 -12
- package/dist/components/Button/ButtonV1.js +63 -0
- package/dist/components/Grid/DesignGrid.js +1 -5
- package/dist/components/Grid/Grid.js +1 -5
- package/dist/components/Grid/GridItem.js +1 -5
- package/dist/components/Header/Header.js +4 -4
- package/dist/components/InputPassword/InputPassword.js +160 -32
- package/dist/components/InputPassword/InputPassword.stories.js +2 -34
- package/dist/components/InputText/InputText.js +124 -28
- package/dist/components/InputText/InputText.stories.js +3 -35
- package/dist/components/ThemeProvider/ThemeProvider.js +3 -3
- package/dist/index.js +6 -18
- package/dist/setupTests.js +6 -3
- package/dist/styles/main.css +2 -2
- package/dist/styles/reset.css +69 -37
- package/dist/styles/stylesheet.js +83 -0
- package/dist/testing/TestComponents.js +14 -2
- package/package.json +4 -3
- package/dist/Button/Button.js +0 -36
- package/dist/Button/Button.stories.js +0 -71
- package/dist/Button/button.css +0 -30
- package/dist/HOCs/withWindowSize.js +0 -122
- package/dist/Header/Header.js +0 -68
- package/dist/Header/Header.stories.js +0 -31
- package/dist/Header/header.css +0 -26
- package/dist/Introduction.stories.mdx +0 -211
- package/dist/styles/stylesheet.ts +0 -49
|
@@ -9,49 +9,177 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
|
|
13
|
+
|
|
14
|
+
var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
|
|
15
|
+
|
|
16
|
+
var _InputAdornment = _interopRequireDefault(require("@mui/material/InputAdornment"));
|
|
17
|
+
|
|
18
|
+
var _Visibility = _interopRequireDefault(require("@mui/icons-material/Visibility"));
|
|
19
|
+
|
|
20
|
+
var _VisibilityOff = _interopRequireDefault(require("@mui/icons-material/VisibilityOff"));
|
|
13
21
|
|
|
14
22
|
require("../../styles/main.css");
|
|
15
23
|
|
|
24
|
+
var _styled = _interopRequireDefault(require("@mui/material/styles/styled"));
|
|
25
|
+
|
|
26
|
+
var _info = require("../../assets/img/info.svg");
|
|
27
|
+
|
|
28
|
+
var _Typography = _interopRequireDefault(require("../Typography/Typography"));
|
|
29
|
+
|
|
16
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
31
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
33
|
+
|
|
34
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
35
|
+
|
|
36
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
37
|
+
|
|
38
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
39
|
+
|
|
40
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
41
|
+
|
|
42
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
43
|
+
|
|
44
|
+
var CssTextField = (0, _styled.default)(_TextField.default)(function (_ref) {
|
|
45
|
+
var theme = _ref.theme;
|
|
46
|
+
return {
|
|
47
|
+
'& label.Mui-focused': {
|
|
48
|
+
color: 'primary',
|
|
49
|
+
borderWidth: '2px',
|
|
50
|
+
background: 'white',
|
|
51
|
+
top: '1px'
|
|
52
|
+
},
|
|
53
|
+
'& .MuiInput-underline:after': {
|
|
54
|
+
borderBottomColor: '#5152A5',
|
|
55
|
+
borderWidth: '2px'
|
|
56
|
+
},
|
|
57
|
+
'& .MuiFormHelperText-root': {
|
|
58
|
+
marginTop: '4px',
|
|
59
|
+
marginLeft: '0px'
|
|
60
|
+
},
|
|
61
|
+
'& .MuiInputBase-input': {
|
|
62
|
+
height: '15px'
|
|
63
|
+
},
|
|
64
|
+
'& .MuiFormLabel-root': {
|
|
65
|
+
lineHeight: '18px',
|
|
66
|
+
top: '-2px'
|
|
67
|
+
},
|
|
68
|
+
'& .MuiInputLabel-shrink': {
|
|
69
|
+
top: '1px'
|
|
70
|
+
},
|
|
71
|
+
'& .MuiOutlinedInput-root': {
|
|
72
|
+
'& fieldset': {
|
|
73
|
+
borderColor: '#8C8C8C'
|
|
74
|
+
},
|
|
75
|
+
'&:hover fieldset': {
|
|
76
|
+
borderColor: '#8C8C8C',
|
|
77
|
+
borderWidth: '2px'
|
|
78
|
+
},
|
|
79
|
+
'&:active fieldset': {
|
|
80
|
+
borderColor: '#5152A5',
|
|
81
|
+
borderWidth: '2px'
|
|
82
|
+
},
|
|
83
|
+
'&.Mui-focused fieldset': {
|
|
84
|
+
borderColor: '#5152A5',
|
|
85
|
+
borderWidth: '2px',
|
|
86
|
+
boxShadow: "0 0 0 3px white, 0 0 7px 4px ".concat(theme.palette.primary.main)
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
var InputText = function InputText(_ref2) {
|
|
93
|
+
var id = _ref2.id,
|
|
94
|
+
className = _ref2.className,
|
|
95
|
+
onClick = _ref2.onClick,
|
|
96
|
+
label = _ref2.label,
|
|
97
|
+
disabled = _ref2.disabled,
|
|
98
|
+
error = _ref2.error,
|
|
99
|
+
helper = _ref2.helper,
|
|
100
|
+
width = _ref2.width;
|
|
101
|
+
|
|
102
|
+
var _React$useState = _react.default.useState(false),
|
|
103
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
104
|
+
showPassword = _React$useState2[0],
|
|
105
|
+
setShowPassword = _React$useState2[1];
|
|
106
|
+
|
|
107
|
+
return /*#__PURE__*/_react.default.createElement(CssTextField, {
|
|
108
|
+
id: id,
|
|
109
|
+
className: className,
|
|
110
|
+
sx: {
|
|
111
|
+
width: width || '240px',
|
|
112
|
+
height: '48px'
|
|
113
|
+
},
|
|
114
|
+
label: label,
|
|
115
|
+
onClick: onClick,
|
|
116
|
+
disabled: disabled,
|
|
117
|
+
error: error,
|
|
118
|
+
type: showPassword ? 'text' : 'password',
|
|
119
|
+
helperText: error ? /*#__PURE__*/_react.default.createElement("div", {
|
|
120
|
+
style: {
|
|
121
|
+
display: 'flex',
|
|
122
|
+
alignItems: 'center'
|
|
123
|
+
}
|
|
124
|
+
}, /*#__PURE__*/_react.default.createElement(_info.ReactComponent, {
|
|
125
|
+
style: {
|
|
126
|
+
marginRight: '4px'
|
|
127
|
+
},
|
|
128
|
+
fill: "#E80000"
|
|
129
|
+
}), " ", /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
130
|
+
variant: "S",
|
|
131
|
+
color: '#E80000'
|
|
132
|
+
}, error)) : helper && /*#__PURE__*/_react.default.createElement("div", {
|
|
133
|
+
style: {
|
|
134
|
+
display: 'flex',
|
|
135
|
+
alignItems: 'center'
|
|
136
|
+
}
|
|
137
|
+
}, /*#__PURE__*/_react.default.createElement(_info.ReactComponent, {
|
|
138
|
+
style: {
|
|
139
|
+
marginRight: '4px'
|
|
140
|
+
},
|
|
141
|
+
fill: "#767676"
|
|
142
|
+
}), " ", /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
143
|
+
variant: "S"
|
|
144
|
+
}, helper)),
|
|
145
|
+
InputProps: {
|
|
146
|
+
endAdornment: /*#__PURE__*/_react.default.createElement(_InputAdornment.default, {
|
|
147
|
+
position: "end",
|
|
148
|
+
onClick: function onClick() {
|
|
149
|
+
return setShowPassword(!showPassword);
|
|
150
|
+
}
|
|
151
|
+
}, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
152
|
+
"aria-label": "Toggle password visibility",
|
|
153
|
+
style: {
|
|
154
|
+
outline: 0
|
|
155
|
+
}
|
|
156
|
+
}, showPassword ? /*#__PURE__*/_react.default.createElement(_VisibilityOff.default, null) : /*#__PURE__*/_react.default.createElement(_Visibility.default, null)))
|
|
157
|
+
}
|
|
158
|
+
});
|
|
35
159
|
};
|
|
36
160
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
161
|
+
InputText.displayName = "InputText";
|
|
162
|
+
InputText.propTypes = {
|
|
163
|
+
label: _propTypes.default.string,
|
|
164
|
+
helper: _propTypes.default.string,
|
|
165
|
+
width: _propTypes.default.string,
|
|
166
|
+
id: _propTypes.default.string,
|
|
167
|
+
className: _propTypes.default.string,
|
|
42
168
|
onClick: _propTypes.default.func,
|
|
43
169
|
disabled: _propTypes.default.bool,
|
|
44
|
-
|
|
45
|
-
|
|
170
|
+
error: _propTypes.default.string,
|
|
171
|
+
passwordToggler: _propTypes.default.bool
|
|
46
172
|
};
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
173
|
+
InputText.defaultProps = {
|
|
174
|
+
label: 'Caption',
|
|
175
|
+
helper: '',
|
|
176
|
+
width: '',
|
|
177
|
+
id: '',
|
|
178
|
+
className: '',
|
|
50
179
|
onClick: undefined,
|
|
51
|
-
color: 'primary',
|
|
52
180
|
disabled: false,
|
|
53
|
-
|
|
54
|
-
|
|
181
|
+
error: '',
|
|
182
|
+
passwordToggler: true
|
|
55
183
|
};
|
|
56
|
-
var _default =
|
|
184
|
+
var _default = InputText;
|
|
57
185
|
exports.default = _default;
|
|
@@ -14,35 +14,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
14
14
|
var _default = {
|
|
15
15
|
title: 'Example/Input Password',
|
|
16
16
|
component: _InputPassword.default,
|
|
17
|
-
argTypes: {
|
|
18
|
-
backgroundColor: {
|
|
19
|
-
control: 'color'
|
|
20
|
-
},
|
|
21
|
-
color: {
|
|
22
|
-
options: ['primary', 'secondary'],
|
|
23
|
-
control: {
|
|
24
|
-
type: 'radio'
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
loading: {
|
|
28
|
-
options: [true, false],
|
|
29
|
-
control: {
|
|
30
|
-
type: 'radio'
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
disabled: {
|
|
34
|
-
options: [true, false],
|
|
35
|
-
control: {
|
|
36
|
-
type: 'radio'
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
variant: {
|
|
40
|
-
options: ['contained', 'outlined', 'text'],
|
|
41
|
-
control: {
|
|
42
|
-
type: 'radio'
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
17
|
+
argTypes: {}
|
|
46
18
|
};
|
|
47
19
|
exports.default = _default;
|
|
48
20
|
|
|
@@ -53,8 +25,4 @@ var Template = function Template(args) {
|
|
|
53
25
|
Template.displayName = "Template";
|
|
54
26
|
var Default = Template.bind({});
|
|
55
27
|
exports.Default = Default;
|
|
56
|
-
Default.args = {
|
|
57
|
-
text: 'Label',
|
|
58
|
-
color: 'primary',
|
|
59
|
-
variant: 'contained'
|
|
60
|
-
};
|
|
28
|
+
Default.args = {};
|
|
@@ -9,49 +9,145 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
|
|
13
13
|
|
|
14
14
|
require("../../styles/main.css");
|
|
15
15
|
|
|
16
|
+
var _styled = _interopRequireDefault(require("@mui/material/styles/styled"));
|
|
17
|
+
|
|
18
|
+
var _info = require("../../assets/img/info.svg");
|
|
19
|
+
|
|
20
|
+
var _check = require("../../assets/img/check.svg");
|
|
21
|
+
|
|
22
|
+
var _Typography = _interopRequireDefault(require("../Typography/Typography"));
|
|
23
|
+
|
|
16
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
25
|
|
|
18
|
-
var
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
var CssTextField = (0, _styled.default)(_TextField.default)(function (_ref) {
|
|
27
|
+
var theme = _ref.theme;
|
|
28
|
+
return {
|
|
29
|
+
'& label.Mui-focused': {
|
|
30
|
+
color: 'primary',
|
|
31
|
+
borderWidth: '2px',
|
|
32
|
+
background: 'white',
|
|
33
|
+
top: '1px'
|
|
34
|
+
},
|
|
35
|
+
'& .MuiInput-underline:after': {
|
|
36
|
+
borderBottomColor: '#5152A5',
|
|
37
|
+
borderWidth: '2px'
|
|
38
|
+
},
|
|
39
|
+
'& .MuiFormHelperText-root': {
|
|
40
|
+
marginTop: '4px',
|
|
41
|
+
marginLeft: '0px'
|
|
42
|
+
},
|
|
43
|
+
'& .MuiInputBase-input': {
|
|
44
|
+
height: '15px'
|
|
45
|
+
},
|
|
46
|
+
'& .MuiFormLabel-root': {
|
|
47
|
+
lineHeight: '18px',
|
|
48
|
+
top: '-2px'
|
|
49
|
+
},
|
|
50
|
+
'& .MuiInputLabel-shrink': {
|
|
51
|
+
top: '1px'
|
|
52
|
+
},
|
|
53
|
+
'& .MuiOutlinedInput-root': {
|
|
54
|
+
'& fieldset': {
|
|
55
|
+
borderColor: '#8C8C8C'
|
|
56
|
+
},
|
|
57
|
+
'&:hover fieldset': {
|
|
58
|
+
borderColor: '#8C8C8C',
|
|
59
|
+
borderWidth: '2px'
|
|
60
|
+
},
|
|
61
|
+
'&:active fieldset': {
|
|
62
|
+
borderColor: '#5152A5',
|
|
63
|
+
borderWidth: '2px'
|
|
64
|
+
},
|
|
65
|
+
'&.Mui-focused fieldset': {
|
|
66
|
+
borderColor: '#5152A5',
|
|
67
|
+
borderWidth: '2px',
|
|
68
|
+
boxShadow: "0 0 0 3px white, 0 0 7px 4px ".concat(theme.palette.primary.main)
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
var InputText = function InputText(_ref2) {
|
|
75
|
+
var id = _ref2.id,
|
|
76
|
+
className = _ref2.className,
|
|
77
|
+
onClick = _ref2.onClick,
|
|
78
|
+
label = _ref2.label,
|
|
79
|
+
disabled = _ref2.disabled,
|
|
80
|
+
error = _ref2.error,
|
|
81
|
+
helper = _ref2.helper,
|
|
82
|
+
endAdornment = _ref2.endAdornment,
|
|
83
|
+
width = _ref2.width;
|
|
84
|
+
return /*#__PURE__*/_react.default.createElement(CssTextField, {
|
|
85
|
+
id: id,
|
|
86
|
+
className: className,
|
|
87
|
+
sx: {
|
|
88
|
+
width: width || '240px',
|
|
89
|
+
height: '48px'
|
|
90
|
+
},
|
|
91
|
+
label: label,
|
|
92
|
+
onClick: onClick,
|
|
93
|
+
disabled: disabled,
|
|
94
|
+
error: error,
|
|
95
|
+
helperText: error ? /*#__PURE__*/_react.default.createElement("div", {
|
|
96
|
+
style: {
|
|
97
|
+
display: 'flex',
|
|
98
|
+
alignItems: 'center'
|
|
99
|
+
}
|
|
100
|
+
}, /*#__PURE__*/_react.default.createElement(_info.ReactComponent, {
|
|
101
|
+
style: {
|
|
102
|
+
marginRight: '4px'
|
|
103
|
+
},
|
|
104
|
+
fill: "#E80000"
|
|
105
|
+
}), " ", /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
106
|
+
variant: "S",
|
|
107
|
+
color: '#E80000'
|
|
108
|
+
}, error)) : helper && /*#__PURE__*/_react.default.createElement("div", {
|
|
109
|
+
style: {
|
|
110
|
+
display: 'flex',
|
|
111
|
+
alignItems: 'center'
|
|
112
|
+
}
|
|
113
|
+
}, /*#__PURE__*/_react.default.createElement(_info.ReactComponent, {
|
|
114
|
+
style: {
|
|
115
|
+
marginRight: '4px'
|
|
116
|
+
},
|
|
117
|
+
fill: "#767676"
|
|
118
|
+
}), " ", /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
119
|
+
variant: "S"
|
|
120
|
+
}, helper)),
|
|
121
|
+
InputProps: {
|
|
122
|
+
endAdornment: endAdornment && endAdornment
|
|
123
|
+
}
|
|
124
|
+
});
|
|
35
125
|
};
|
|
36
126
|
|
|
37
127
|
InputText.displayName = "InputText";
|
|
38
128
|
InputText.propTypes = {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
129
|
+
label: _propTypes.default.string,
|
|
130
|
+
helper: _propTypes.default.string,
|
|
131
|
+
width: _propTypes.default.string,
|
|
132
|
+
id: _propTypes.default.string,
|
|
133
|
+
className: _propTypes.default.string,
|
|
42
134
|
onClick: _propTypes.default.func,
|
|
43
135
|
disabled: _propTypes.default.bool,
|
|
44
|
-
|
|
45
|
-
|
|
136
|
+
error: _propTypes.default.string,
|
|
137
|
+
endAdornment: _propTypes.default.string
|
|
46
138
|
};
|
|
47
139
|
InputText.defaultProps = {
|
|
48
|
-
|
|
49
|
-
|
|
140
|
+
label: 'Caption',
|
|
141
|
+
helper: '',
|
|
142
|
+
width: '',
|
|
143
|
+
id: '',
|
|
144
|
+
className: '',
|
|
50
145
|
onClick: undefined,
|
|
51
|
-
color: 'primary',
|
|
52
146
|
disabled: false,
|
|
53
|
-
|
|
54
|
-
|
|
147
|
+
error: '',
|
|
148
|
+
endAdornment: /*#__PURE__*/_react.default.createElement(_check.ReactComponent, {
|
|
149
|
+
fill: '#138A00'
|
|
150
|
+
})
|
|
55
151
|
};
|
|
56
152
|
var _default = InputText;
|
|
57
153
|
exports.default = _default;
|
|
@@ -12,37 +12,9 @@ var _InputText = _interopRequireDefault(require("./InputText"));
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
14
|
var _default = {
|
|
15
|
-
title: 'Example/
|
|
15
|
+
title: 'Example/InputText',
|
|
16
16
|
component: _InputText.default,
|
|
17
|
-
argTypes: {
|
|
18
|
-
backgroundColor: {
|
|
19
|
-
control: 'color'
|
|
20
|
-
},
|
|
21
|
-
color: {
|
|
22
|
-
options: ['primary', 'secondary'],
|
|
23
|
-
control: {
|
|
24
|
-
type: 'radio'
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
loading: {
|
|
28
|
-
options: [true, false],
|
|
29
|
-
control: {
|
|
30
|
-
type: 'radio'
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
disabled: {
|
|
34
|
-
options: [true, false],
|
|
35
|
-
control: {
|
|
36
|
-
type: 'radio'
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
variant: {
|
|
40
|
-
options: ['contained', 'outlined', 'text'],
|
|
41
|
-
control: {
|
|
42
|
-
type: 'radio'
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
17
|
+
argTypes: {}
|
|
46
18
|
};
|
|
47
19
|
exports.default = _default;
|
|
48
20
|
|
|
@@ -53,8 +25,4 @@ var Template = function Template(args) {
|
|
|
53
25
|
Template.displayName = "Template";
|
|
54
26
|
var Default = Template.bind({});
|
|
55
27
|
exports.Default = Default;
|
|
56
|
-
Default.args = {
|
|
57
|
-
text: 'Label',
|
|
58
|
-
color: 'primary',
|
|
59
|
-
variant: 'contained'
|
|
60
|
-
};
|
|
28
|
+
Default.args = {};
|
|
@@ -13,7 +13,7 @@ var _styles = require("@mui/material/styles");
|
|
|
13
13
|
|
|
14
14
|
require("../../styles/main.css");
|
|
15
15
|
|
|
16
|
-
var _stylesheet = require("../../styles/stylesheet
|
|
16
|
+
var _stylesheet = require("../../styles/stylesheet");
|
|
17
17
|
|
|
18
18
|
var _CouncilboxThemeContext = require("./CouncilboxThemeContext");
|
|
19
19
|
|
|
@@ -41,8 +41,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
41
41
|
|
|
42
42
|
var defaultTheme = {
|
|
43
43
|
colors: {
|
|
44
|
-
primary: '#
|
|
45
|
-
secondary: '#
|
|
44
|
+
primary: '#38398C',
|
|
45
|
+
secondary: '#61ABB7'
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
|
package/dist/index.js
CHANGED
|
@@ -1,23 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "Button", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _Button.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "Header", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _Header.default;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
3
|
+
var _react = _interopRequireDefault(require("react"));
|
|
18
4
|
|
|
19
|
-
var
|
|
5
|
+
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
20
6
|
|
|
21
|
-
var
|
|
7
|
+
var _TestComponents = _interopRequireDefault(require("./testing/TestComponents"));
|
|
22
8
|
|
|
23
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
|
|
11
|
+
_reactDom.default.render( /*#__PURE__*/_react.default.createElement(_TestComponents.default, null), document.getElementById('root'));
|
package/dist/setupTests.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
// jest-dom adds custom jest matchers for asserting on DOM nodes.
|
|
2
|
+
// allows you to do things like:
|
|
3
|
+
// expect(element).toHaveTextContent(/react/i)
|
|
4
|
+
// learn more: https://github.com/testing-library/jest-dom
|
|
5
|
+
// import '@testing-library/jest-dom';
|
|
6
|
+
"use strict";
|
package/dist/styles/main.css
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
:root {
|
|
4
4
|
--font-family: 'Lato';
|
|
5
5
|
--primary: #38398C;
|
|
6
|
-
/* --primary: #9C27B0; */
|
|
7
6
|
--secondary: #61ABB7;
|
|
8
7
|
}
|
|
9
8
|
|
|
@@ -14,7 +13,8 @@ html, body {
|
|
|
14
13
|
|
|
15
14
|
#root {
|
|
16
15
|
overflow: hidden;
|
|
17
|
-
padding: 0;
|
|
16
|
+
padding: 0.5em;
|
|
17
|
+
/* padding: 0; */
|
|
18
18
|
height: 100%;
|
|
19
19
|
margin: 0;
|
|
20
20
|
}
|
package/dist/styles/reset.css
CHANGED
|
@@ -1,43 +1,75 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
b, u, i, center,
|
|
7
|
-
dl, dt, dd, ol, ul, li,
|
|
8
|
-
fieldset, form, label, legend,
|
|
9
|
-
table, caption, tbody, tfoot, thead, tr, th, td,
|
|
10
|
-
article, aside, canvas, details, embed,
|
|
11
|
-
figure, figcaption, footer, header, hgroup,
|
|
12
|
-
menu, nav, output, ruby, section, summary,
|
|
13
|
-
time, mark, audio, video {
|
|
14
|
-
margin: 0;
|
|
15
|
-
padding: 0;
|
|
16
|
-
border: 0;
|
|
17
|
-
font-size: 100%;
|
|
18
|
-
font: inherit;
|
|
19
|
-
vertical-align: baseline;
|
|
20
|
-
}
|
|
21
|
-
/* HTML5 display-role reset for older browsers */
|
|
22
|
-
article, aside, details, figcaption, figure,
|
|
23
|
-
footer, header, hgroup, menu, nav, section {
|
|
24
|
-
display: block;
|
|
1
|
+
/* Box sizing rules */
|
|
2
|
+
*,
|
|
3
|
+
*::before,
|
|
4
|
+
*::after {
|
|
5
|
+
box-sizing: border-box;
|
|
25
6
|
}
|
|
7
|
+
|
|
8
|
+
/* Remove default margin */
|
|
9
|
+
body,
|
|
10
|
+
h1,
|
|
11
|
+
h2,
|
|
12
|
+
h3,
|
|
13
|
+
h4,
|
|
14
|
+
p,
|
|
15
|
+
figure,
|
|
16
|
+
blockquote,
|
|
17
|
+
dl,
|
|
18
|
+
dd {
|
|
19
|
+
margin: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
|
|
23
|
+
ul[role='list'],
|
|
24
|
+
ol[role='list'] {
|
|
25
|
+
list-style: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Set core root defaults */
|
|
29
|
+
html:focus-within {
|
|
30
|
+
scroll-behavior: smooth;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Set core body defaults, line-height 1.5 it's easier to read, 'default' per se is 1.2 */
|
|
26
34
|
body {
|
|
27
|
-
|
|
35
|
+
min-height: 100vh;
|
|
36
|
+
text-rendering: optimizeSpeed;
|
|
37
|
+
line-height: 1.5;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* A elements that don't have a class get default styles */
|
|
41
|
+
a:not([class]) {
|
|
42
|
+
text-decoration-skip-ink: auto;
|
|
28
43
|
}
|
|
29
|
-
|
|
30
|
-
|
|
44
|
+
|
|
45
|
+
/* Make images easier to work with */
|
|
46
|
+
img,
|
|
47
|
+
picture {
|
|
48
|
+
max-width: 100%;
|
|
49
|
+
display: block;
|
|
31
50
|
}
|
|
32
|
-
|
|
33
|
-
|
|
51
|
+
|
|
52
|
+
/* Inherit fonts for inputs and buttons */
|
|
53
|
+
input,
|
|
54
|
+
button,
|
|
55
|
+
textarea,
|
|
56
|
+
select {
|
|
57
|
+
font: inherit;
|
|
34
58
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
59
|
+
|
|
60
|
+
/* Remove transitions for people that prefer not to see them */
|
|
61
|
+
/* Animations should be handled manually */
|
|
62
|
+
@media (prefers-reduced-motion: reduce) {
|
|
63
|
+
html:focus-within {
|
|
64
|
+
scroll-behavior: auto;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
*,
|
|
68
|
+
*::before,
|
|
69
|
+
*::after {
|
|
70
|
+
animation-duration: 0.01ms !important;
|
|
71
|
+
animation-iteration-count: 1 !important;
|
|
72
|
+
transition-duration: 0.01ms !important;
|
|
73
|
+
scroll-behavior: auto !important;
|
|
74
|
+
}
|
|
39
75
|
}
|
|
40
|
-
table {
|
|
41
|
-
border-collapse: collapse;
|
|
42
|
-
border-spacing: 0;
|
|
43
|
-
}
|