@councilbox/councilbox-ui 0.1.0 → 0.1.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/HOCs/useWindowSize.js +8 -5
- package/dist/build-index.js +56 -0
- package/dist/components/Avatar/Avatar.js +1 -6
- package/dist/components/Button/Button.js +85 -21
- package/dist/components/Button/Button.stories.js +2 -1
- package/dist/components/Button/button.css +34 -6
- package/dist/components/ButtonBasic/ButtonBasic.css +3 -0
- package/dist/components/ButtonBasic/ButtonBasic.js +117 -0
- package/dist/components/ButtonBasic/ButtonBasic.stories.js +72 -0
- package/dist/components/DrawerPanel/DrawerPanel.css +33 -0
- package/dist/components/DrawerPanel/DrawerPanel.js +165 -0
- package/dist/components/DrawerPanel/DrawerPanel.stories.js +38 -0
- package/dist/components/DrawerPanel/DrawerPanelPrueba.js +52 -0
- package/dist/components/DropDown/DesignDropDown.stories.js +82 -0
- package/dist/components/DropDown/DropDown.css +0 -0
- package/dist/components/DropDown/DropDown.js +162 -0
- package/dist/components/DropDown/DropDown.stories.js +43 -0
- package/dist/components/Header/Header.js +246 -43
- package/dist/components/Header/Header.stories.js +31 -10
- package/dist/components/Header/header.css +121 -19
- package/dist/components/IconButton/IconButton.css +0 -0
- package/dist/components/IconButton/IconButton.js +72 -0
- package/dist/components/IconButton/IconButton.stories.js +27 -0
- package/dist/components/InputPassword/InputPassword.css +28 -0
- package/dist/components/InputPassword/InputPassword.js +38 -163
- package/dist/components/InputPassword/InputPassword.stories.js +33 -2
- package/dist/components/InputText/InputText.css +18 -0
- package/dist/components/InputText/InputText.js +84 -74
- package/dist/components/InputText/InputText.stories.js +26 -2
- package/dist/components/MenuLateralRight/MenuLateralRight.css +0 -0
- package/dist/components/MenuLateralRight/MenuLateralRight.js +30 -0
- package/dist/components/MenuLateralRight/MenuLateralRight.stories.js +34 -0
- package/dist/components/Modal/Modal.css +0 -0
- package/dist/components/Modal/Modal.js +166 -0
- package/dist/components/Modal/Modal.stories.js +49 -0
- package/dist/components/Spacing/Spacing.js +1 -1
- package/dist/components/TextInput/TextInput.css +12 -0
- package/dist/components/TextInput/TextInput.js +214 -0
- package/dist/components/TextInput/TextInput.stories.js +52 -0
- package/dist/components/ThemeProvider/Colors.js +24 -95
- package/dist/components/ThemeProvider/ThemeProvider.js +1 -1
- package/dist/components/Typography/Typography.js +7 -8
- package/dist/styles/main.css +21 -71
- package/dist/styles/stylesheet.js +6 -39
- package/package.json +1 -1
|
@@ -9,8 +9,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
|
-
var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
|
|
13
|
-
|
|
14
12
|
var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
|
|
15
13
|
|
|
16
14
|
var _Visibility = _interopRequireDefault(require("@mui/icons-material/Visibility"));
|
|
@@ -19,15 +17,13 @@ var _VisibilityOff = _interopRequireDefault(require("@mui/icons-material/Visibil
|
|
|
19
17
|
|
|
20
18
|
require("../../styles/main.css");
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var _info = require("../../assets/img/info.svg");
|
|
25
|
-
|
|
26
|
-
var _Typography = _interopRequireDefault(require("../Typography/Typography"));
|
|
20
|
+
require("./InputPassword.css");
|
|
27
21
|
|
|
28
22
|
var _CouncilboxThemeContext = require("../ThemeProvider/CouncilboxThemeContext");
|
|
29
23
|
|
|
30
|
-
var
|
|
24
|
+
var _InputText = _interopRequireDefault(require("../InputText/InputText"));
|
|
25
|
+
|
|
26
|
+
var _excluded = ["id", "className", "onChange", "onClick", "label", "disabled", "error", "helper", "width", "validation", "percentageError", "helperText", "fullWidth"];
|
|
31
27
|
|
|
32
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
29
|
|
|
@@ -49,106 +45,21 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
49
45
|
|
|
50
46
|
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; }
|
|
51
47
|
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
marginLeft: '0px',
|
|
68
|
-
marginRight: '0'
|
|
69
|
-
},
|
|
70
|
-
'& .MuiInputBase-input': {
|
|
71
|
-
height: '15px'
|
|
72
|
-
},
|
|
73
|
-
'& .MuiFormLabel-root': {
|
|
74
|
-
lineHeight: '18px',
|
|
75
|
-
top: '-2px'
|
|
76
|
-
},
|
|
77
|
-
'& .Mui-error': {
|
|
78
|
-
color: theme.palette.error600
|
|
79
|
-
},
|
|
80
|
-
'& .MuiInputLabel-shrink': {
|
|
81
|
-
top: '1px'
|
|
82
|
-
},
|
|
83
|
-
'& .MuiOutlinedInput-root': {
|
|
84
|
-
'& fieldset': {
|
|
85
|
-
borderColor: theme.palette.neutral400
|
|
86
|
-
},
|
|
87
|
-
'&:hover fieldset': {
|
|
88
|
-
borderColor: theme.palette.neutral400,
|
|
89
|
-
borderWidth: '2px'
|
|
90
|
-
},
|
|
91
|
-
'&:active fieldset': {
|
|
92
|
-
borderColor: theme.palette.primary700,
|
|
93
|
-
borderWidth: '2px'
|
|
94
|
-
},
|
|
95
|
-
'&.Mui-focused fieldset': {
|
|
96
|
-
borderColor: theme.palette.primary700,
|
|
97
|
-
borderWidth: '2px',
|
|
98
|
-
boxShadow: "0 0 0 3px white, 0 0 7px 4px ".concat(theme.palette.primary.main)
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
'& .MuiOutlinedInput-root.Mui-error': {
|
|
102
|
-
'& fieldset': {
|
|
103
|
-
borderColor: theme.palette.error600
|
|
104
|
-
},
|
|
105
|
-
'&:hover fieldset': {
|
|
106
|
-
borderColor: theme.palette.error600,
|
|
107
|
-
borderWidth: '2px'
|
|
108
|
-
},
|
|
109
|
-
'&:active fieldset': {
|
|
110
|
-
borderColor: theme.palette.error600,
|
|
111
|
-
borderWidth: '2px'
|
|
112
|
-
},
|
|
113
|
-
'&.Mui-focused fieldset': {
|
|
114
|
-
borderColor: theme.palette.error600,
|
|
115
|
-
borderWidth: '2px',
|
|
116
|
-
boxShadow: "0 0 0 3px white, 0 0 7px 4px ".concat(theme.palette.error600)
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
'& .MuiOutlinedInput-root.Mui-disabled': {
|
|
120
|
-
'& fieldset': {
|
|
121
|
-
borderColor: 'rgba(0,0,0,0.38)'
|
|
122
|
-
},
|
|
123
|
-
'&:hover fieldset': {
|
|
124
|
-
borderColor: 'rgba(0,0,0,0.38)',
|
|
125
|
-
borderWidth: '1px'
|
|
126
|
-
},
|
|
127
|
-
'&:active fieldset': {
|
|
128
|
-
borderColor: 'rgba(0,0,0,0.38)',
|
|
129
|
-
borderWidth: '1px'
|
|
130
|
-
},
|
|
131
|
-
'&.Mui-focused fieldset': {
|
|
132
|
-
borderColor: 'rgba(0,0,0,0.38)',
|
|
133
|
-
borderWidth: '1px',
|
|
134
|
-
boxShadow: '0 0 0 3px white, 0 0 7px 4px rgba(0,0,0,0.38)'
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
var InputText = function InputText(_ref2) {
|
|
141
|
-
var id = _ref2.id,
|
|
142
|
-
className = _ref2.className,
|
|
143
|
-
onChange = _ref2.onChange,
|
|
144
|
-
label = _ref2.label,
|
|
145
|
-
disabled = _ref2.disabled,
|
|
146
|
-
error = _ref2.error,
|
|
147
|
-
helper = _ref2.helper,
|
|
148
|
-
width = _ref2.width,
|
|
149
|
-
validation = _ref2.validation,
|
|
150
|
-
percentageError = _ref2.percentageError,
|
|
151
|
-
props = _objectWithoutProperties(_ref2, _excluded);
|
|
48
|
+
var InputPassword = function InputPassword(_ref) {
|
|
49
|
+
var id = _ref.id,
|
|
50
|
+
className = _ref.className,
|
|
51
|
+
onChange = _ref.onChange,
|
|
52
|
+
onClick = _ref.onClick,
|
|
53
|
+
label = _ref.label,
|
|
54
|
+
disabled = _ref.disabled,
|
|
55
|
+
error = _ref.error,
|
|
56
|
+
helper = _ref.helper,
|
|
57
|
+
width = _ref.width,
|
|
58
|
+
validation = _ref.validation,
|
|
59
|
+
percentageError = _ref.percentageError,
|
|
60
|
+
helperText = _ref.helperText,
|
|
61
|
+
fullWidth = _ref.fullWidth,
|
|
62
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
152
63
|
|
|
153
64
|
var _React$useState = _react.default.useState(false),
|
|
154
65
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -158,98 +69,62 @@ var InputText = function InputText(_ref2) {
|
|
|
158
69
|
var themeData = (0, _CouncilboxThemeContext.useCouncilboxTheme)();
|
|
159
70
|
|
|
160
71
|
var getColorPercent = function getColorPercent(percent) {
|
|
161
|
-
var color = themeData.theme.colors.
|
|
72
|
+
var color = themeData.theme.colors.error;
|
|
162
73
|
|
|
163
74
|
if (percent > 30 && percent < 90) {
|
|
164
|
-
color =
|
|
75
|
+
color = 'var(--warning)';
|
|
165
76
|
}
|
|
166
77
|
|
|
167
78
|
if (percent >= 90) {
|
|
168
|
-
color = themeData.theme.colors.
|
|
79
|
+
color = themeData.theme.colors.success;
|
|
169
80
|
}
|
|
170
81
|
|
|
171
82
|
return color;
|
|
172
83
|
};
|
|
173
84
|
|
|
174
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
85
|
+
return /*#__PURE__*/_react.default.createElement(_InputText.default, _extends({
|
|
175
86
|
id: id,
|
|
87
|
+
fullWidth: fullWidth,
|
|
176
88
|
className: className,
|
|
177
|
-
sx: {
|
|
178
|
-
width: width || '240px',
|
|
179
|
-
height: '48px'
|
|
180
|
-
},
|
|
181
89
|
label: label,
|
|
182
90
|
onChange: onChange,
|
|
183
91
|
disabled: disabled,
|
|
184
92
|
error: error,
|
|
93
|
+
helper: helper,
|
|
185
94
|
type: showPassword ? 'text' : 'password',
|
|
186
|
-
helperText:
|
|
187
|
-
|
|
188
|
-
display: 'flex',
|
|
189
|
-
alignItems: 'center'
|
|
190
|
-
}
|
|
191
|
-
}, /*#__PURE__*/_react.default.createElement(_info.ReactComponent, {
|
|
192
|
-
style: {
|
|
193
|
-
marginRight: 'var(--spacing4)'
|
|
194
|
-
},
|
|
195
|
-
fill: themeData.theme.colors.error600
|
|
196
|
-
}), " ", /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
197
|
-
variant: "S",
|
|
198
|
-
color: themeData.theme.colors.error600
|
|
199
|
-
}, error)) : /*#__PURE__*/_react.default.createElement("div", null, validation && /*#__PURE__*/_react.default.createElement("div", {
|
|
200
|
-
style: {
|
|
201
|
-
width: '100%',
|
|
202
|
-
background: '#DBDBDB',
|
|
203
|
-
height: '8px',
|
|
204
|
-
borderRadius: '20px',
|
|
205
|
-
marginTop: 'var(--spacing4)'
|
|
206
|
-
}
|
|
95
|
+
helperText: validation && /*#__PURE__*/_react.default.createElement("div", {
|
|
96
|
+
className: "cbx-inputPassword-validation"
|
|
207
97
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
208
98
|
style: {
|
|
209
99
|
width: "".concat(percentageError, "%"),
|
|
210
|
-
background: getColorPercent(percentageError)
|
|
211
|
-
height: '8px',
|
|
212
|
-
borderRadius: '20px',
|
|
213
|
-
transition: 'all .5s'
|
|
214
|
-
}
|
|
215
|
-
})), helper && /*#__PURE__*/_react.default.createElement("div", {
|
|
216
|
-
style: {
|
|
217
|
-
display: 'flex',
|
|
218
|
-
alignItems: 'center'
|
|
100
|
+
background: getColorPercent(percentageError)
|
|
219
101
|
}
|
|
220
|
-
},
|
|
221
|
-
style: {
|
|
222
|
-
marginRight: 'var(--spacing4)'
|
|
223
|
-
},
|
|
224
|
-
fill: themeData.theme.colors.neutral500
|
|
225
|
-
}), " ", /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
226
|
-
variant: "S"
|
|
227
|
-
}, helper))),
|
|
102
|
+
})),
|
|
228
103
|
InputProps: {
|
|
229
104
|
endAdornment: /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
230
105
|
disabled: disabled,
|
|
231
106
|
"aria-label": "Toggle password visibility",
|
|
232
|
-
|
|
233
|
-
outline: 0
|
|
234
|
-
},
|
|
107
|
+
className: "cbx-inputPassword-icon-button",
|
|
235
108
|
onClick: function onClick() {
|
|
236
109
|
return !disabled && setShowPassword(!showPassword);
|
|
237
110
|
}
|
|
238
111
|
}, showPassword ? /*#__PURE__*/_react.default.createElement(_VisibilityOff.default, {
|
|
112
|
+
className: "cbx-inputPassword-icon-size",
|
|
239
113
|
sx: {
|
|
240
|
-
color: disabled ? '
|
|
114
|
+
color: disabled ? 'var(--gray3)' : 'black'
|
|
241
115
|
}
|
|
242
116
|
}) : /*#__PURE__*/_react.default.createElement(_Visibility.default, {
|
|
117
|
+
className: "cbx-inputPassword-icon-size",
|
|
243
118
|
sx: {
|
|
244
|
-
color: disabled ? '
|
|
119
|
+
color: disabled ? 'var(--gray3)' : 'black'
|
|
245
120
|
}
|
|
246
121
|
}))
|
|
247
122
|
}
|
|
248
123
|
}, props));
|
|
249
124
|
};
|
|
250
125
|
|
|
251
|
-
|
|
252
|
-
|
|
126
|
+
InputPassword.displayName = "InputPassword";
|
|
127
|
+
InputPassword.propTypes = {
|
|
253
128
|
label: _propTypes.default.string,
|
|
254
129
|
helper: _propTypes.default.string,
|
|
255
130
|
width: _propTypes.default.string,
|
|
@@ -261,7 +136,7 @@ InputText.propTypes = {
|
|
|
261
136
|
validation: _propTypes.default.bool,
|
|
262
137
|
percentageError: _propTypes.default.number
|
|
263
138
|
};
|
|
264
|
-
|
|
139
|
+
InputPassword.defaultProps = {
|
|
265
140
|
label: 'Caption',
|
|
266
141
|
helper: '',
|
|
267
142
|
width: '',
|
|
@@ -273,5 +148,5 @@ InputText.defaultProps = {
|
|
|
273
148
|
validation: false,
|
|
274
149
|
percentageError: 0
|
|
275
150
|
};
|
|
276
|
-
var _default =
|
|
151
|
+
var _default = InputPassword;
|
|
277
152
|
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.Validation = exports.Helper = exports.Error = exports.Disabled = exports.Default = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -25,4 +25,35 @@ var Template = function Template(args) {
|
|
|
25
25
|
Template.displayName = "Template";
|
|
26
26
|
var Default = Template.bind({});
|
|
27
27
|
exports.Default = Default;
|
|
28
|
-
Default.args = {
|
|
28
|
+
Default.args = {
|
|
29
|
+
label: 'password',
|
|
30
|
+
value: 'abc123.'
|
|
31
|
+
};
|
|
32
|
+
var Helper = Template.bind({});
|
|
33
|
+
exports.Helper = Helper;
|
|
34
|
+
Helper.args = {
|
|
35
|
+
label: 'password',
|
|
36
|
+
value: 'abc123.',
|
|
37
|
+
helper: 'Enim anim occaecat'
|
|
38
|
+
};
|
|
39
|
+
var Validation = Template.bind({});
|
|
40
|
+
exports.Validation = Validation;
|
|
41
|
+
Validation.args = {
|
|
42
|
+
label: 'password',
|
|
43
|
+
value: 'abc123.',
|
|
44
|
+
validation: true,
|
|
45
|
+
percentageError: 54
|
|
46
|
+
};
|
|
47
|
+
var Error = Template.bind({});
|
|
48
|
+
exports.Error = Error;
|
|
49
|
+
Error.args = {
|
|
50
|
+
label: 'password',
|
|
51
|
+
value: 'abc123.',
|
|
52
|
+
error: 'Enim anim occaecat'
|
|
53
|
+
};
|
|
54
|
+
var Disabled = Template.bind({});
|
|
55
|
+
exports.Disabled = Disabled;
|
|
56
|
+
Disabled.args = {
|
|
57
|
+
value: 'Occaecat',
|
|
58
|
+
disabled: true
|
|
59
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.cbx-inputText-items-center {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
}
|
|
5
|
+
.cbx-inputText-infoBtn {
|
|
6
|
+
margin-right: var(--spacing4);
|
|
7
|
+
height: 14px;
|
|
8
|
+
line-height: 1.1;
|
|
9
|
+
font-size: 14px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.cbx-inputText-endAdornment {
|
|
13
|
+
margin-right: var(--spacing4);
|
|
14
|
+
margin-top: var(--spacing12);
|
|
15
|
+
margin-bottom: var(--spacing12);
|
|
16
|
+
color: var(--success);
|
|
17
|
+
font-size: 19px;
|
|
18
|
+
}
|
|
@@ -13,17 +13,13 @@ var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
|
|
|
13
13
|
|
|
14
14
|
require("../../styles/main.css");
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var _info = require("../../assets/img/info.svg");
|
|
16
|
+
require("./InputText.css");
|
|
19
17
|
|
|
20
|
-
var
|
|
18
|
+
var _styled = _interopRequireDefault(require("@mui/material/styles/styled"));
|
|
21
19
|
|
|
22
20
|
var _Typography = _interopRequireDefault(require("../Typography/Typography"));
|
|
23
21
|
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
var _excluded = ["id", "className", "onChange", "label", "disabled", "error", "helper", "endAdornment", "width"];
|
|
22
|
+
var _excluded = ["id", "className", "onChange", "label", "disabled", "error", "helper", "success", "width", "helperText", "fullWidth"];
|
|
27
23
|
|
|
28
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
25
|
|
|
@@ -33,8 +29,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
33
29
|
|
|
34
30
|
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; }
|
|
35
31
|
|
|
36
|
-
var CssTextField = (0, _styled.default)(_TextField.default)(function (
|
|
37
|
-
var theme = _ref.theme;
|
|
32
|
+
var CssTextField = (0, _styled.default)(_TextField.default)(function () {
|
|
38
33
|
return {
|
|
39
34
|
'& label.Mui-focused': {
|
|
40
35
|
color: 'primary',
|
|
@@ -43,65 +38,90 @@ var CssTextField = (0, _styled.default)(_TextField.default)(function (_ref) {
|
|
|
43
38
|
top: '1px'
|
|
44
39
|
},
|
|
45
40
|
'& .MuiInput-underline:after': {
|
|
46
|
-
borderBottomColor:
|
|
41
|
+
borderBottomColor: 'var(--gray5)',
|
|
47
42
|
borderWidth: '2px'
|
|
48
43
|
},
|
|
49
44
|
'& .MuiFormHelperText-root': {
|
|
50
45
|
marginTop: 'var(--spacing4)',
|
|
51
|
-
marginLeft: '0px'
|
|
46
|
+
marginLeft: '0px',
|
|
47
|
+
marginRight: '0px'
|
|
52
48
|
},
|
|
53
49
|
'& .MuiInputBase-input': {
|
|
54
|
-
height: '
|
|
50
|
+
height: '24px',
|
|
51
|
+
lineHeight: 'var(--spacing12)',
|
|
52
|
+
padding: 'var(--spacing12)',
|
|
53
|
+
paddingRight: 'var(--spacing8)'
|
|
55
54
|
},
|
|
56
55
|
'& .MuiFormLabel-root': {
|
|
57
|
-
|
|
58
|
-
top: '-2px'
|
|
56
|
+
top: '-4px'
|
|
59
57
|
},
|
|
60
58
|
'& .Mui-error': {
|
|
61
|
-
color:
|
|
59
|
+
color: 'var(--error)'
|
|
62
60
|
},
|
|
63
61
|
'& .MuiInputLabel-shrink': {
|
|
64
62
|
top: '1px'
|
|
65
63
|
},
|
|
66
64
|
'& .MuiOutlinedInput-root': {
|
|
65
|
+
color: 'var(--gray5)',
|
|
66
|
+
paddingRight: 'var(--spacing8)',
|
|
67
67
|
'& fieldset': {
|
|
68
|
-
borderColor:
|
|
68
|
+
borderColor: 'var(--gray3)',
|
|
69
|
+
borderWidth: '1px',
|
|
70
|
+
'& legend': {
|
|
71
|
+
'& span': {
|
|
72
|
+
paddingLeft: 'var(--spacing4)',
|
|
73
|
+
paddingRight: 'var(--spacing4)'
|
|
74
|
+
}
|
|
75
|
+
}
|
|
69
76
|
},
|
|
70
77
|
'&:hover fieldset': {
|
|
71
|
-
borderColor:
|
|
78
|
+
borderColor: 'var(--gray3)',
|
|
72
79
|
borderWidth: '2px'
|
|
73
80
|
},
|
|
74
81
|
'&:active fieldset': {
|
|
75
|
-
borderColor:
|
|
82
|
+
borderColor: 'var(--gray3)',
|
|
76
83
|
borderWidth: '2px'
|
|
77
84
|
},
|
|
78
85
|
'&.Mui-focused fieldset': {
|
|
79
|
-
borderColor:
|
|
80
|
-
borderWidth: '2px'
|
|
81
|
-
|
|
86
|
+
borderColor: 'var(--primary)',
|
|
87
|
+
borderWidth: '2px'
|
|
88
|
+
},
|
|
89
|
+
'&:focus-visible': {
|
|
90
|
+
outline: 'none',
|
|
91
|
+
'& fieldset': {
|
|
92
|
+
outline: 'none',
|
|
93
|
+
boxShadow: '0 0 0 3px white, 0 0 7px 4px var(--primary)',
|
|
94
|
+
border: '2px solid var(--gray4)'
|
|
95
|
+
}
|
|
82
96
|
}
|
|
83
97
|
},
|
|
84
98
|
'& .MuiOutlinedInput-root.Mui-error': {
|
|
85
99
|
'& fieldset': {
|
|
86
|
-
borderColor:
|
|
100
|
+
borderColor: 'var(--error)'
|
|
87
101
|
},
|
|
88
102
|
'&:hover fieldset': {
|
|
89
|
-
borderColor:
|
|
103
|
+
borderColor: 'var(--error)',
|
|
90
104
|
borderWidth: '2px'
|
|
91
105
|
},
|
|
92
106
|
'&:active fieldset': {
|
|
93
|
-
borderColor:
|
|
107
|
+
borderColor: 'var(--error)',
|
|
94
108
|
borderWidth: '2px'
|
|
95
109
|
},
|
|
96
110
|
'&.Mui-focused fieldset': {
|
|
97
|
-
borderColor:
|
|
111
|
+
borderColor: 'var(--error)',
|
|
112
|
+
borderWidth: '2px'
|
|
113
|
+
},
|
|
114
|
+
'&:focus-visible': {
|
|
115
|
+
// falta revisar esto
|
|
116
|
+
borderColor: 'var(--gray4)',
|
|
98
117
|
borderWidth: '2px',
|
|
99
|
-
boxShadow:
|
|
118
|
+
boxShadow: '0 0 0 3px white, 0 0 7px 4px var(--primary)'
|
|
100
119
|
}
|
|
101
120
|
},
|
|
102
121
|
'& .MuiOutlinedInput-root.Mui-disabled': {
|
|
103
122
|
'& fieldset': {
|
|
104
|
-
borderColor: 'rgba(0,0,0,0.38)'
|
|
123
|
+
borderColor: 'rgba(0,0,0,0.38)',
|
|
124
|
+
borderWidth: '1px'
|
|
105
125
|
},
|
|
106
126
|
'&:hover fieldset': {
|
|
107
127
|
borderColor: 'rgba(0,0,0,0.38)',
|
|
@@ -113,67 +133,58 @@ var CssTextField = (0, _styled.default)(_TextField.default)(function (_ref) {
|
|
|
113
133
|
},
|
|
114
134
|
'&.Mui-focused fieldset': {
|
|
115
135
|
borderColor: 'rgba(0,0,0,0.38)',
|
|
116
|
-
borderWidth: '1px'
|
|
117
|
-
boxShadow: '0 0 0 3px white, 0 0 7px 4px rgba(0,0,0,0.38)'
|
|
136
|
+
borderWidth: '1px'
|
|
118
137
|
}
|
|
119
138
|
}
|
|
120
139
|
};
|
|
121
140
|
});
|
|
122
141
|
|
|
123
|
-
var InputText = function InputText(
|
|
124
|
-
var id =
|
|
125
|
-
className =
|
|
126
|
-
onChange =
|
|
127
|
-
label =
|
|
128
|
-
disabled =
|
|
129
|
-
error =
|
|
130
|
-
helper =
|
|
131
|
-
|
|
132
|
-
width =
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
142
|
+
var InputText = function InputText(_ref) {
|
|
143
|
+
var id = _ref.id,
|
|
144
|
+
className = _ref.className,
|
|
145
|
+
onChange = _ref.onChange,
|
|
146
|
+
label = _ref.label,
|
|
147
|
+
disabled = _ref.disabled,
|
|
148
|
+
error = _ref.error,
|
|
149
|
+
helper = _ref.helper,
|
|
150
|
+
success = _ref.success,
|
|
151
|
+
width = _ref.width,
|
|
152
|
+
helperText = _ref.helperText,
|
|
153
|
+
fullWidth = _ref.fullWidth,
|
|
154
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
155
|
+
|
|
136
156
|
return /*#__PURE__*/_react.default.createElement(CssTextField, _extends({
|
|
137
157
|
id: id,
|
|
138
158
|
className: className,
|
|
139
159
|
sx: {
|
|
140
|
-
|
|
160
|
+
minWidth: width || '240px',
|
|
141
161
|
height: '48px'
|
|
142
162
|
},
|
|
143
163
|
label: label,
|
|
164
|
+
fullWidth: fullWidth,
|
|
144
165
|
onChange: onChange,
|
|
145
166
|
disabled: disabled,
|
|
146
167
|
error: error,
|
|
147
|
-
helperText: error ? /*#__PURE__*/_react.default.createElement("div", {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
},
|
|
156
|
-
fill: themeData.theme.colors.error600
|
|
157
|
-
}), " ", /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
158
|
-
variant: "S",
|
|
159
|
-
color: themeData.theme.colors.error600
|
|
168
|
+
helperText: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, helperText, error ? /*#__PURE__*/_react.default.createElement("div", {
|
|
169
|
+
className: "cbx-inputText-items-center"
|
|
170
|
+
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
171
|
+
className: 'cbx-inputText-infoBtn ri-information-line',
|
|
172
|
+
color: 'var(--error)'
|
|
173
|
+
}), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
174
|
+
variant: "XS",
|
|
175
|
+
color: 'var(--error)'
|
|
160
176
|
}, error)) : helper && /*#__PURE__*/_react.default.createElement("div", {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
},
|
|
169
|
-
fill: themeData.theme.colors.neutral500
|
|
170
|
-
}), " ", /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
171
|
-
variant: "S"
|
|
172
|
-
}, helper)),
|
|
177
|
+
className: "cbx-inputText-items-center"
|
|
178
|
+
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
179
|
+
className: 'cbx-inputText-infoBtn ri-information-line'
|
|
180
|
+
}), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
181
|
+
color: !disabled ? 'var(--gray4)' : 'var(--gray3)',
|
|
182
|
+
variant: "XS"
|
|
183
|
+
}, helper))),
|
|
173
184
|
InputProps: {
|
|
174
|
-
endAdornment:
|
|
175
|
-
|
|
176
|
-
})
|
|
185
|
+
endAdornment: success && /*#__PURE__*/_react.default.createElement("i", {
|
|
186
|
+
className: "cbx-inputText-endAdornment ri-check-line"
|
|
187
|
+
})
|
|
177
188
|
}
|
|
178
189
|
}, props));
|
|
179
190
|
};
|
|
@@ -188,7 +199,7 @@ InputText.propTypes = {
|
|
|
188
199
|
onChange: _propTypes.default.func,
|
|
189
200
|
disabled: _propTypes.default.bool,
|
|
190
201
|
error: _propTypes.default.string,
|
|
191
|
-
|
|
202
|
+
success: _propTypes.default.bool
|
|
192
203
|
};
|
|
193
204
|
InputText.defaultProps = {
|
|
194
205
|
label: 'Caption',
|
|
@@ -198,8 +209,7 @@ InputText.defaultProps = {
|
|
|
198
209
|
className: '',
|
|
199
210
|
onChange: undefined,
|
|
200
211
|
disabled: false,
|
|
201
|
-
error: ''
|
|
202
|
-
endAdornment: ''
|
|
212
|
+
error: ''
|
|
203
213
|
};
|
|
204
214
|
var _default = InputText;
|
|
205
215
|
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.Success = exports.Helper = exports.Error = exports.Disabled = exports.Default = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -25,4 +25,28 @@ var Template = function Template(args) {
|
|
|
25
25
|
Template.displayName = "Template";
|
|
26
26
|
var Default = Template.bind({});
|
|
27
27
|
exports.Default = Default;
|
|
28
|
-
Default.args = {};
|
|
28
|
+
Default.args = {};
|
|
29
|
+
var Helper = Template.bind({});
|
|
30
|
+
exports.Helper = Helper;
|
|
31
|
+
Helper.args = {
|
|
32
|
+
value: 'Occaecat',
|
|
33
|
+
helper: 'Helper'
|
|
34
|
+
};
|
|
35
|
+
var Success = Template.bind({});
|
|
36
|
+
exports.Success = Success;
|
|
37
|
+
Success.args = {
|
|
38
|
+
value: 'Occaecat',
|
|
39
|
+
success: true
|
|
40
|
+
};
|
|
41
|
+
var Disabled = Template.bind({});
|
|
42
|
+
exports.Disabled = Disabled;
|
|
43
|
+
Disabled.args = {
|
|
44
|
+
value: 'Occaecat',
|
|
45
|
+
disabled: true
|
|
46
|
+
};
|
|
47
|
+
var Error = Template.bind({});
|
|
48
|
+
exports.Error = Error;
|
|
49
|
+
Error.args = {
|
|
50
|
+
value: 'Occaecat',
|
|
51
|
+
error: 'Error'
|
|
52
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
require("../../styles/main.css");
|
|
13
|
+
|
|
14
|
+
require("./MenuLateralRight.css");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
var MenuLateralRight = function MenuLateralRight() {
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement("div", null);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
MenuLateralRight.displayName = "MenuLateralRight";
|
|
23
|
+
MenuLateralRight.propTypes = {
|
|
24
|
+
id: _propTypes.default.string
|
|
25
|
+
};
|
|
26
|
+
MenuLateralRight.defaultProps = {
|
|
27
|
+
id: ''
|
|
28
|
+
};
|
|
29
|
+
var _default = MenuLateralRight;
|
|
30
|
+
exports.default = _default;
|