@councilbox/councilbox-ui 0.4.1 → 0.4.3
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/build-index.js +51 -3
- package/dist/components/1.Introduction.stories.mdx +50 -0
- package/dist/components/2.Changelog.stories.mdx +62 -0
- package/dist/components/3.Guide.stories.mdx +179 -0
- package/dist/components/Accordion/Accordion.js +1 -1
- package/dist/components/Accordion/Accordion.stories.js +4 -2
- package/dist/components/Alert/Alert.css +10 -0
- package/dist/components/Alert/Alert.js +134 -0
- package/dist/components/Alert/Alert.stories.js +38 -0
- package/dist/components/Avatar/Avatar.stories.js +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.stories.js +1 -1
- package/dist/components/Button/Button.stories.js +1 -1
- package/dist/components/ButtonBasic/ButtonBasic.js +3 -3
- package/dist/components/ButtonBasic/ButtonBasic.stories.js +1 -1
- package/dist/components/Checkbox/Checkbox.css +1 -1
- package/dist/components/Checkbox/Checkbox.js +24 -16
- package/dist/components/Checkbox/Checkbox.stories.js +1 -1
- package/dist/components/DrawerPanel/DesignDrawerPanel.js +46 -12
- package/dist/components/DrawerPanel/DrawerPanel.stories.js +1 -1
- package/dist/components/DropDown/DropDown.js +9 -1
- package/dist/components/DropDown/DropDown.stories.js +1 -1
- package/dist/components/EnhancedTable/DesignEnhancedTable.stories.js +109 -0
- package/dist/components/EnhancedTable/EnhancedTable.js +280 -0
- package/dist/components/EnhancedTable/EnhancedTable.stories.js +39 -0
- package/dist/components/Grid/Grid.stories.js +1 -1
- package/dist/components/Header/Header.js +10 -10
- package/dist/components/Header/Header.stories.js +1 -1
- package/dist/components/IconButton/IconButton.stories.js +1 -1
- package/dist/components/IconButtonSquare/IconButtonSquare.stories.js +1 -1
- package/dist/components/IconFont/IconFont.css +0 -0
- package/dist/components/IconFont/IconFont.js +100 -0
- package/dist/components/{FontCBX/FontCBX.stories.js → IconFont/IconFont.stories.js} +4 -4
- package/dist/components/InputAutocomplete/InputAutocomplete.css +0 -0
- package/dist/components/InputAutocomplete/InputAutocomplete.js +137 -0
- package/dist/components/InputAutocomplete/InputAutocomplete.stories.js +61 -0
- package/dist/components/InputPassword/InputPassword.stories.js +10 -2
- package/dist/components/InputText/InputText.css +2 -10
- package/dist/components/InputText/InputText.js +98 -59
- package/dist/components/InputText/InputText.stories.js +14 -3
- package/dist/components/LoadingSection/LoadingSection.css +7 -0
- package/dist/components/LoadingSection/LoadingSection.js +36 -0
- package/dist/components/LoadingSection/LoadingSection.stories.js +34 -0
- package/dist/components/MenuItem/DesignMenuItem.stories.js +67 -0
- package/dist/components/MenuItem/MenuItem.css +57 -0
- package/dist/components/MenuItem/MenuItem.js +131 -0
- package/dist/components/MenuItem/MenuItem.stories.js +48 -0
- package/dist/components/MenuLateralLeft/MenuLateralLeft.stories.js +1 -1
- package/dist/components/MenuLateralRight/MenuLateralRight.stories.js +1 -1
- package/dist/components/Modal/Modal.js +15 -4
- package/dist/components/Modal/Modal.stories.js +1 -1
- package/dist/components/PaginationFooter/DesignPaginationFooter.stories.js +20 -0
- package/dist/components/PaginationFooter/PaginationFooter.css +0 -0
- package/dist/components/PaginationFooter/PaginationFooter.js +271 -0
- package/dist/components/PaginationFooter/PaginationFooter.stories.js +45 -0
- package/dist/components/RadioButton/Radio.css +31 -0
- package/dist/components/RadioButton/Radio.js +67 -19
- package/dist/components/RadioButton/Radio.stories.js +1 -1
- package/dist/components/Scrollbar/Scrollbar.stories.js +1 -1
- package/dist/components/SelectInput/DesignSelectInput.js +2 -1
- package/dist/components/SelectInput/SelectInput.js +109 -56
- package/dist/components/SelectInput/SelectInput.stories.js +41 -4
- package/dist/components/Spacing/Spacing.stories.js +1 -1
- package/dist/components/Stars/Stars.js +1 -1
- package/dist/components/Stars/Stars.stories.js +1 -1
- package/dist/components/Table/DesignTable.stories.js +22 -0
- package/dist/components/Table/Table.css +0 -0
- package/dist/components/Table/Table.js +166 -0
- package/dist/components/Table/Table.stories.js +49 -0
- package/dist/components/Tabs/Tabs.stories.js +1 -1
- package/dist/components/Tag/Tag.stories.js +1 -1
- package/dist/components/TextInput/TextInput.stories.js +1 -1
- package/dist/components/Toggle/Toggle.stories.js +1 -1
- package/dist/components/Typography/Typography.js +1 -1
- package/dist/components/Typography/Typography.stories.js +1 -1
- package/dist/config.js +8 -0
- package/dist/fonts/IconNames.json +6848 -0
- package/package.json +1 -1
- package/dist/components/FontCBX/FontCBX.js +0 -36
- package/dist/components/Introduction.stories.mdx +0 -211
- /package/dist/components/{FontCBX/FontCBX.css → EnhancedTable/EnhancedTable.css} +0 -0
|
@@ -25,7 +25,7 @@ var _styled = _interopRequireDefault(require("@mui/material/styles/styled"));
|
|
|
25
25
|
|
|
26
26
|
var _Typography = _interopRequireDefault(require("../Typography/Typography"));
|
|
27
27
|
|
|
28
|
-
var _excluded = ["id", "className", "onChange", "label", "disabled", "width", "fullWidth", "children", "error", "helperText", "helper"];
|
|
28
|
+
var _excluded = ["id", "className", "onChange", "label", "disabled", "width", "fullWidth", "children", "error", "helperText", "helper", "variant", "endAdornment", "success"];
|
|
29
29
|
|
|
30
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
31
|
|
|
@@ -50,6 +50,13 @@ var CssSelect = (0, _styled.default)(_Select.default)(function () {
|
|
|
50
50
|
'&.MuiInputBase-root.Mui-error': {
|
|
51
51
|
color: 'var(--error)'
|
|
52
52
|
},
|
|
53
|
+
'&.MuiInputBase-root.Mui-error input, &.MuiInputBase-root.Mui-error div, .MuiOutlinedInput-input.Mui-disabled': {
|
|
54
|
+
color: 'var(--gray5)',
|
|
55
|
+
WebkitTextFillColor: 'unset'
|
|
56
|
+
},
|
|
57
|
+
'&.Mui-disabled svg': {
|
|
58
|
+
display: 'none'
|
|
59
|
+
},
|
|
53
60
|
'& .MuiOutlinedInput-notchedOutline': {
|
|
54
61
|
color: 'var(--gray5)',
|
|
55
62
|
paddingRight: 'var(--spacing8)',
|
|
@@ -84,46 +91,29 @@ var CssSelect = (0, _styled.default)(_Select.default)(function () {
|
|
|
84
91
|
}
|
|
85
92
|
}
|
|
86
93
|
},
|
|
87
|
-
'
|
|
88
|
-
'
|
|
89
|
-
borderColor: 'var(--error)'
|
|
90
|
-
},
|
|
91
|
-
'&:hover fieldset': {
|
|
92
|
-
borderColor: 'var(--error)',
|
|
93
|
-
borderWidth: '2px'
|
|
94
|
-
},
|
|
95
|
-
'&:active fieldset': {
|
|
96
|
-
borderColor: 'var(--error)',
|
|
97
|
-
borderWidth: '2px'
|
|
98
|
-
},
|
|
99
|
-
'&.Mui-focused fieldset': {
|
|
100
|
-
borderColor: 'var(--error)',
|
|
101
|
-
borderWidth: '2px'
|
|
102
|
-
},
|
|
103
|
-
'&:focus-visible': {
|
|
104
|
-
// falta revisar esto
|
|
105
|
-
borderColor: 'var(--gray4)',
|
|
106
|
-
borderWidth: '2px',
|
|
107
|
-
boxShadow: '0 0 0 3px white, 0 0 7px 4px var(--primary)'
|
|
108
|
-
}
|
|
94
|
+
'&.MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline': {
|
|
95
|
+
border: '1px dashed var(--gray2)'
|
|
109
96
|
},
|
|
110
|
-
'
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
97
|
+
'&.MuiInputLabel-root.Mui-disabled': {
|
|
98
|
+
color: 'var(--gray3)'
|
|
99
|
+
},
|
|
100
|
+
'&.MuiFormHelperText-root.Mui-focused div h6': {
|
|
101
|
+
color: 'var(--primary)'
|
|
102
|
+
},
|
|
103
|
+
'&.MuiInputBase-root.MuiOutlinedInput-root': {
|
|
104
|
+
color: 'var(--gray5)'
|
|
105
|
+
},
|
|
106
|
+
'&.MuiFilledInput-root .MuiSelect-nativeInput': {
|
|
107
|
+
height: '1.5rem',
|
|
108
|
+
lineHeight: 'var(--spacing12)',
|
|
109
|
+
padding: 'var(--spacing12)',
|
|
110
|
+
paddingRight: 'var(--spacing8)'
|
|
111
|
+
},
|
|
112
|
+
'& .MuiSelect-filled.MuiFilledInput-input': {
|
|
113
|
+
paddingTop: 'var(--spacing12)'
|
|
114
|
+
},
|
|
115
|
+
'& .MuiSelect-select.MuiSelect-standard': {
|
|
116
|
+
paddingBottom: 'var(--spacing12)'
|
|
127
117
|
}
|
|
128
118
|
};
|
|
129
119
|
});
|
|
@@ -140,24 +130,90 @@ var SelectInput = function SelectInput(_ref) {
|
|
|
140
130
|
error = _ref.error,
|
|
141
131
|
helperText = _ref.helperText,
|
|
142
132
|
helper = _ref.helper,
|
|
133
|
+
variant = _ref.variant,
|
|
134
|
+
endAdornment = _ref.endAdornment,
|
|
135
|
+
success = _ref.success,
|
|
143
136
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
144
137
|
|
|
138
|
+
var getIcon = function getIcon() {
|
|
139
|
+
var icon = /*#__PURE__*/_react.default.createElement("i", {
|
|
140
|
+
className: "cbx-inputText-endAdornment ".concat(endAdornment)
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
if (success) {
|
|
144
|
+
icon = /*#__PURE__*/_react.default.createElement("i", {
|
|
145
|
+
className: "cbx-inputText-endAdornment ri-check-line",
|
|
146
|
+
style: {
|
|
147
|
+
color: 'var(--success)'
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
if (error) {
|
|
153
|
+
icon = /*#__PURE__*/_react.default.createElement("i", {
|
|
154
|
+
className: 'cbx-inputText-endAdornment ri-information-line',
|
|
155
|
+
style: {
|
|
156
|
+
color: 'var(--error)'
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (helper) {
|
|
162
|
+
icon = /*#__PURE__*/_react.default.createElement("i", {
|
|
163
|
+
className: 'cbx-inputText-endAdornment ri-information-line'
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return icon;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
var getVariant = function getVariant() {
|
|
171
|
+
var variantInput = 'outlined';
|
|
172
|
+
|
|
173
|
+
if (variant === 'outlined') {
|
|
174
|
+
variantInput = variant;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
if (variant === 'filled') {
|
|
178
|
+
variantInput = variant;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
if (variant === 'standard') {
|
|
182
|
+
variantInput = variant;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return variantInput;
|
|
186
|
+
};
|
|
187
|
+
|
|
145
188
|
return /*#__PURE__*/_react.default.createElement(_FormControl.default, {
|
|
146
|
-
fullWidth: fullWidth
|
|
189
|
+
fullWidth: fullWidth,
|
|
190
|
+
sx: {
|
|
191
|
+
minWidth: width || '15rem',
|
|
192
|
+
minHeight: '3rem'
|
|
193
|
+
}
|
|
147
194
|
}, label && /*#__PURE__*/_react.default.createElement(_InputLabel.default, {
|
|
195
|
+
variant: getVariant(),
|
|
148
196
|
disabled: disabled,
|
|
149
197
|
error: error,
|
|
150
198
|
sx: {
|
|
151
|
-
|
|
199
|
+
'&.MuiInputLabel-outlined.MuiFormLabel-root:not(.MuiInputLabel-shrink)': {
|
|
200
|
+
top: '-0.25rem'
|
|
201
|
+
},
|
|
202
|
+
'&.MuiInputLabel-root': {
|
|
203
|
+
color: 'var(--gray5)'
|
|
204
|
+
},
|
|
152
205
|
'&.MuiInputLabel-root.Mui-focused': {
|
|
153
206
|
top: '0',
|
|
154
|
-
color: 'var(--primary)
|
|
207
|
+
color: 'var(--primary)'
|
|
155
208
|
},
|
|
156
209
|
'&.MuiInputLabel-root.Mui-error': {
|
|
157
210
|
color: 'var(--error)'
|
|
158
211
|
},
|
|
159
|
-
'&.MuiInputLabel-root.
|
|
160
|
-
|
|
212
|
+
'&.MuiInputLabel-root.Mui-disabled': {
|
|
213
|
+
color: 'var(--gray3)'
|
|
214
|
+
},
|
|
215
|
+
'&.MuiInputLabel-filled.MuiInputLabel-shrink': {
|
|
216
|
+
top: '-0.625rem'
|
|
161
217
|
}
|
|
162
218
|
}
|
|
163
219
|
}, label), /*#__PURE__*/_react.default.createElement(CssSelect, _extends({
|
|
@@ -165,7 +221,6 @@ var SelectInput = function SelectInput(_ref) {
|
|
|
165
221
|
className: className,
|
|
166
222
|
sx: {
|
|
167
223
|
minWidth: width || '15rem',
|
|
168
|
-
minHeight: '3rem',
|
|
169
224
|
maxHeight: '3rem',
|
|
170
225
|
'& .MuiOutlinedInput-notchedOutline': {
|
|
171
226
|
'& legend': {
|
|
@@ -173,31 +228,29 @@ var SelectInput = function SelectInput(_ref) {
|
|
|
173
228
|
}
|
|
174
229
|
}
|
|
175
230
|
},
|
|
231
|
+
variant: getVariant(),
|
|
176
232
|
label: label,
|
|
177
233
|
fullWidth: fullWidth,
|
|
178
234
|
onChange: onChange,
|
|
179
235
|
disabled: disabled,
|
|
180
236
|
error: error
|
|
181
|
-
}, props
|
|
237
|
+
}, props, {
|
|
238
|
+
InputProps: {
|
|
239
|
+
endAdornment: getIcon()
|
|
240
|
+
}
|
|
241
|
+
}), children), /*#__PURE__*/_react.default.createElement(_material.FormHelperText, {
|
|
182
242
|
sx: {
|
|
183
243
|
marginLeft: '0',
|
|
184
244
|
marginRight: '0px'
|
|
185
245
|
}
|
|
186
246
|
}, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, helperText, error ? /*#__PURE__*/_react.default.createElement("div", {
|
|
187
247
|
className: "cbx-selectInput-items-center"
|
|
188
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
189
|
-
className: 'cbx-selectInput-infoBtn ri-information-line',
|
|
190
|
-
style: {
|
|
191
|
-
color: 'var(--error)'
|
|
192
|
-
}
|
|
193
|
-
}), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
248
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
194
249
|
variant: "XS",
|
|
195
250
|
color: 'var(--error)'
|
|
196
251
|
}, error)) : helper && /*#__PURE__*/_react.default.createElement("div", {
|
|
197
252
|
className: "cbx-inputText-items-center"
|
|
198
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
199
|
-
className: 'cbx-selectInput-infoBtn ri-information-line'
|
|
200
|
-
}), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
253
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
201
254
|
color: !disabled ? 'var(--gray4)' : 'var(--gray3)',
|
|
202
255
|
variant: "XS"
|
|
203
256
|
}, helper)))));
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.DesignSelectInputTemplate = exports.Default = void 0;
|
|
6
|
+
exports.default = exports.Success = exports.Helper = exports.Error = exports.Disabled = exports.DesignSelectInputTemplate = exports.Default = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -14,9 +14,16 @@ var _DesignSelectInput = _interopRequireDefault(require("./DesignSelectInput"));
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
16
|
var _default = {
|
|
17
|
-
title: '
|
|
17
|
+
title: 'Components/SelectInput',
|
|
18
18
|
component: _SelectInput.default,
|
|
19
|
-
argTypes: {
|
|
19
|
+
argTypes: {
|
|
20
|
+
variant: {
|
|
21
|
+
options: ['outlined', 'filled', 'standard'],
|
|
22
|
+
control: {
|
|
23
|
+
type: 'radio'
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
20
27
|
};
|
|
21
28
|
exports.default = _default;
|
|
22
29
|
|
|
@@ -27,7 +34,37 @@ var Template = function Template(args) {
|
|
|
27
34
|
Template.displayName = "Template";
|
|
28
35
|
var Default = Template.bind({});
|
|
29
36
|
exports.Default = Default;
|
|
30
|
-
Default.args = {
|
|
37
|
+
Default.args = {
|
|
38
|
+
variant: 'outlined'
|
|
39
|
+
};
|
|
40
|
+
var Helper = Template.bind({});
|
|
41
|
+
exports.Helper = Helper;
|
|
42
|
+
Helper.args = {
|
|
43
|
+
value: 'Occaecat',
|
|
44
|
+
helper: 'Helper',
|
|
45
|
+
label: 'Example'
|
|
46
|
+
};
|
|
47
|
+
var Success = Template.bind({});
|
|
48
|
+
exports.Success = Success;
|
|
49
|
+
Success.args = {
|
|
50
|
+
value: 'Occaecat',
|
|
51
|
+
success: true,
|
|
52
|
+
label: 'Example'
|
|
53
|
+
};
|
|
54
|
+
var Disabled = Template.bind({});
|
|
55
|
+
exports.Disabled = Disabled;
|
|
56
|
+
Disabled.args = {
|
|
57
|
+
value: 'Occaecat',
|
|
58
|
+
disabled: true,
|
|
59
|
+
label: 'Example'
|
|
60
|
+
};
|
|
61
|
+
var Error = Template.bind({});
|
|
62
|
+
exports.Error = Error;
|
|
63
|
+
Error.args = {
|
|
64
|
+
value: 'Occaecat',
|
|
65
|
+
error: 'Error',
|
|
66
|
+
label: 'Example'
|
|
67
|
+
};
|
|
31
68
|
|
|
32
69
|
var TemplateSelectInput = function TemplateSelectInput(args) {
|
|
33
70
|
return /*#__PURE__*/_react.default.createElement(_DesignSelectInput.default, args);
|
|
@@ -12,7 +12,7 @@ var _Spacing = _interopRequireDefault(require("./Spacing"));
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
14
|
var _default = {
|
|
15
|
-
title: '
|
|
15
|
+
title: 'Components/Spacing',
|
|
16
16
|
component: _Spacing.default,
|
|
17
17
|
argTypes: {}
|
|
18
18
|
};
|
|
@@ -87,7 +87,7 @@ Stars.propTypes = {
|
|
|
87
87
|
lowStars: _propTypes.default.bool,
|
|
88
88
|
onClick: _propTypes.default.func,
|
|
89
89
|
value: _propTypes.default.number,
|
|
90
|
-
error: _propTypes.default.
|
|
90
|
+
error: _propTypes.default.bool,
|
|
91
91
|
disabled: _propTypes.default.bool,
|
|
92
92
|
lengthtStars: _propTypes.default.number,
|
|
93
93
|
variant: _propTypes.default.string
|
|
@@ -14,7 +14,7 @@ var _DesignStars = _interopRequireDefault(require("./DesignStars"));
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
16
|
var _default = {
|
|
17
|
-
title: '
|
|
17
|
+
title: 'Components/Stars',
|
|
18
18
|
component: _Stars.default,
|
|
19
19
|
argTypes: {}
|
|
20
20
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
require("../../styles/main.css");
|
|
11
|
+
|
|
12
|
+
var _Table = require("./Table");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
var DesignTable = function DesignTable() {
|
|
17
|
+
return /*#__PURE__*/_react.default.createElement(_Table.Table, null, /*#__PURE__*/_react.default.createElement(_Table.TableHead, null, /*#__PURE__*/_react.default.createElement(_Table.TableRow, null, /*#__PURE__*/_react.default.createElement(_Table.TableCell, null, "1111"), /*#__PURE__*/_react.default.createElement(_Table.TableCell, null, "2222"))), /*#__PURE__*/_react.default.createElement(_Table.TableBody, null, /*#__PURE__*/_react.default.createElement(_Table.TableRow, null, /*#__PURE__*/_react.default.createElement(_Table.TableCell, null, "AAAA"), /*#__PURE__*/_react.default.createElement(_Table.TableCell, null, "BBBB"))));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
DesignTable.displayName = "DesignTable";
|
|
21
|
+
var _default = DesignTable;
|
|
22
|
+
exports.default = _default;
|
|
File without changes
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TableSortLabel = exports.TableRow = exports.TableHead = exports.TableContainer = exports.TableCell = exports.TableBody = exports.Table = void 0;
|
|
7
|
+
|
|
8
|
+
var _Table = _interopRequireDefault(require("@mui/material/Table"));
|
|
9
|
+
|
|
10
|
+
var _TableBody = _interopRequireDefault(require("@mui/material/TableBody"));
|
|
11
|
+
|
|
12
|
+
var _TableCell = _interopRequireDefault(require("@mui/material/TableCell"));
|
|
13
|
+
|
|
14
|
+
var _TableContainer = _interopRequireDefault(require("@mui/material/TableContainer"));
|
|
15
|
+
|
|
16
|
+
var _TableHead = _interopRequireDefault(require("@mui/material/TableHead"));
|
|
17
|
+
|
|
18
|
+
var _TableRow = _interopRequireDefault(require("@mui/material/TableRow"));
|
|
19
|
+
|
|
20
|
+
var _TableSortLabel = _interopRequireDefault(require("@mui/material/TableSortLabel"));
|
|
21
|
+
|
|
22
|
+
var _excluded = ["children", "component", "hover", "selected", "onClick", "className"],
|
|
23
|
+
_excluded2 = ["children", "component"],
|
|
24
|
+
_excluded3 = ["children", "component"],
|
|
25
|
+
_excluded4 = ["children", "active", "direction", "onClick", "hideSortIcon", "IconComponent"],
|
|
26
|
+
_excluded5 = ["children", "component", "padding", "scope", "size", "sortDirection", "variant", "align", "style", "sx"],
|
|
27
|
+
_excluded6 = ["children", "component"];
|
|
28
|
+
|
|
29
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
30
|
+
|
|
31
|
+
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; }
|
|
32
|
+
|
|
33
|
+
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; }
|
|
34
|
+
|
|
35
|
+
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; }
|
|
36
|
+
|
|
37
|
+
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; }
|
|
38
|
+
|
|
39
|
+
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; }
|
|
40
|
+
|
|
41
|
+
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); }
|
|
42
|
+
|
|
43
|
+
var Table = function Table(_ref) {
|
|
44
|
+
var props = _extends({}, _ref);
|
|
45
|
+
|
|
46
|
+
return /*#__PURE__*/React.createElement(_Table.default, props);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
exports.Table = Table;
|
|
50
|
+
Table.displayName = "Table";
|
|
51
|
+
|
|
52
|
+
var TableRow = function TableRow(_ref2) {
|
|
53
|
+
var children = _ref2.children,
|
|
54
|
+
component = _ref2.component,
|
|
55
|
+
hover = _ref2.hover,
|
|
56
|
+
selected = _ref2.selected,
|
|
57
|
+
onClick = _ref2.onClick,
|
|
58
|
+
className = _ref2.className,
|
|
59
|
+
props = _objectWithoutProperties(_ref2, _excluded);
|
|
60
|
+
|
|
61
|
+
return /*#__PURE__*/React.createElement(_TableRow.default, _extends({
|
|
62
|
+
className: className,
|
|
63
|
+
component: component,
|
|
64
|
+
hover: hover,
|
|
65
|
+
selected: selected,
|
|
66
|
+
onClick: onClick
|
|
67
|
+
}, props), children);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
exports.TableRow = TableRow;
|
|
71
|
+
TableRow.displayName = "TableRow";
|
|
72
|
+
|
|
73
|
+
var TableBody = function TableBody(_ref3) {
|
|
74
|
+
var children = _ref3.children,
|
|
75
|
+
component = _ref3.component,
|
|
76
|
+
props = _objectWithoutProperties(_ref3, _excluded2);
|
|
77
|
+
|
|
78
|
+
return /*#__PURE__*/React.createElement(_TableBody.default, _extends({
|
|
79
|
+
component: component
|
|
80
|
+
}, props), children);
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
exports.TableBody = TableBody;
|
|
84
|
+
TableBody.displayName = "TableBody";
|
|
85
|
+
|
|
86
|
+
var TableHead = function TableHead(_ref4) {
|
|
87
|
+
var children = _ref4.children,
|
|
88
|
+
component = _ref4.component,
|
|
89
|
+
props = _objectWithoutProperties(_ref4, _excluded3);
|
|
90
|
+
|
|
91
|
+
return /*#__PURE__*/React.createElement(_TableHead.default, _extends({
|
|
92
|
+
component: component
|
|
93
|
+
}, props), children);
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
exports.TableHead = TableHead;
|
|
97
|
+
TableHead.displayName = "TableHead";
|
|
98
|
+
|
|
99
|
+
var TableSortLabel = function TableSortLabel(_ref5) {
|
|
100
|
+
var children = _ref5.children,
|
|
101
|
+
active = _ref5.active,
|
|
102
|
+
direction = _ref5.direction,
|
|
103
|
+
onClick = _ref5.onClick,
|
|
104
|
+
hideSortIcon = _ref5.hideSortIcon,
|
|
105
|
+
IconComponent = _ref5.IconComponent,
|
|
106
|
+
props = _objectWithoutProperties(_ref5, _excluded4);
|
|
107
|
+
|
|
108
|
+
return /*#__PURE__*/React.createElement(_TableSortLabel.default, _extends({
|
|
109
|
+
onClick: onClick,
|
|
110
|
+
active: active,
|
|
111
|
+
direction: direction,
|
|
112
|
+
hideSortIcon: hideSortIcon,
|
|
113
|
+
IconComponent: IconComponent
|
|
114
|
+
}, props), children);
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
exports.TableSortLabel = TableSortLabel;
|
|
118
|
+
TableSortLabel.displayName = "TableSortLabel";
|
|
119
|
+
|
|
120
|
+
var TableCell = function TableCell(_ref6) {
|
|
121
|
+
var children = _ref6.children,
|
|
122
|
+
component = _ref6.component,
|
|
123
|
+
padding = _ref6.padding,
|
|
124
|
+
scope = _ref6.scope,
|
|
125
|
+
size = _ref6.size,
|
|
126
|
+
sortDirection = _ref6.sortDirection,
|
|
127
|
+
variant = _ref6.variant,
|
|
128
|
+
align = _ref6.align,
|
|
129
|
+
_ref6$style = _ref6.style,
|
|
130
|
+
style = _ref6$style === void 0 ? {} : _ref6$style,
|
|
131
|
+
sx = _ref6.sx,
|
|
132
|
+
props = _objectWithoutProperties(_ref6, _excluded5);
|
|
133
|
+
|
|
134
|
+
return /*#__PURE__*/React.createElement(_TableCell.default, _extends({
|
|
135
|
+
component: component,
|
|
136
|
+
padding: padding,
|
|
137
|
+
scope: scope,
|
|
138
|
+
size: size,
|
|
139
|
+
sortDirection: sortDirection,
|
|
140
|
+
variant: variant,
|
|
141
|
+
align: align,
|
|
142
|
+
sx: _objectSpread({
|
|
143
|
+
padding: '1rem',
|
|
144
|
+
color: 'var(--gray3)'
|
|
145
|
+
}, sx),
|
|
146
|
+
style: _objectSpread({
|
|
147
|
+
zIndex: '10'
|
|
148
|
+
}, style)
|
|
149
|
+
}, props), children);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
exports.TableCell = TableCell;
|
|
153
|
+
TableCell.displayName = "TableCell";
|
|
154
|
+
|
|
155
|
+
var TableContainer = function TableContainer(_ref7) {
|
|
156
|
+
var children = _ref7.children,
|
|
157
|
+
component = _ref7.component,
|
|
158
|
+
props = _objectWithoutProperties(_ref7, _excluded6);
|
|
159
|
+
|
|
160
|
+
return /*#__PURE__*/React.createElement(_TableContainer.default, _extends({
|
|
161
|
+
component: component
|
|
162
|
+
}, props), children);
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
exports.TableContainer = TableContainer;
|
|
166
|
+
TableContainer.displayName = "TableContainer";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.DesignTemplateTable = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _Table = _interopRequireDefault(require("./Table"));
|
|
11
|
+
|
|
12
|
+
var _DesignTable = _interopRequireDefault(require("./DesignTable.stories"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
var _default = {
|
|
17
|
+
title: 'Components/Table',
|
|
18
|
+
component: _Table.default,
|
|
19
|
+
argTypes: {
|
|
20
|
+
text: {
|
|
21
|
+
control: {
|
|
22
|
+
type: 'text'
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
label: {
|
|
26
|
+
control: {
|
|
27
|
+
type: 'text'
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}; // const Template = args => <Table {...args} />;
|
|
32
|
+
|
|
33
|
+
exports.default = _default;
|
|
34
|
+
|
|
35
|
+
var TemplateTable = function TemplateTable(args) {
|
|
36
|
+
return /*#__PURE__*/_react.default.createElement(_DesignTable.default, args);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
TemplateTable.displayName = "TemplateTable";
|
|
40
|
+
// export const Default = Template.bind({});
|
|
41
|
+
// Default.args = {
|
|
42
|
+
// };
|
|
43
|
+
var DesignTemplateTable = TemplateTable.bind({});
|
|
44
|
+
exports.DesignTemplateTable = DesignTemplateTable;
|
|
45
|
+
DesignTemplateTable.parameters = {
|
|
46
|
+
controls: {
|
|
47
|
+
disable: true
|
|
48
|
+
}
|
|
49
|
+
};
|
|
@@ -14,7 +14,7 @@ var _DesignTabs = _interopRequireDefault(require("./DesignTabs"));
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
16
|
var _default = {
|
|
17
|
-
title: '
|
|
17
|
+
title: 'Components/Tabs',
|
|
18
18
|
component: _Tabs.default,
|
|
19
19
|
argTypes: {}
|
|
20
20
|
};
|
|
@@ -14,7 +14,7 @@ var _DesignTags = _interopRequireDefault(require("./DesignTags.stories"));
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
16
|
var _default = {
|
|
17
|
-
title: '
|
|
17
|
+
title: 'Components/Tag',
|
|
18
18
|
component: _Tag.default,
|
|
19
19
|
argTypes: {
|
|
20
20
|
variant: {
|
|
@@ -12,7 +12,7 @@ var _TextInput = _interopRequireDefault(require("./TextInput"));
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
14
|
var _default = {
|
|
15
|
-
title: '
|
|
15
|
+
title: 'Components/TextInput',
|
|
16
16
|
component: _TextInput.default,
|
|
17
17
|
argTypes: {}
|
|
18
18
|
};
|
|
@@ -12,7 +12,7 @@ var _Toggle = _interopRequireDefault(require("./Toggle"));
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
14
|
var _default = {
|
|
15
|
-
title: '
|
|
15
|
+
title: 'Components/Toggle',
|
|
16
16
|
component: _Toggle.default,
|
|
17
17
|
argTypes: {}
|
|
18
18
|
};
|
|
@@ -12,7 +12,7 @@ var _Typography = _interopRequireDefault(require("./Typography"));
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
14
|
var _default = {
|
|
15
|
-
title: '
|
|
15
|
+
title: 'Components/Typography',
|
|
16
16
|
component: _Typography.default,
|
|
17
17
|
argTypes: {
|
|
18
18
|
variant: {
|