@councilbox/councilbox-ui 1.0.1 → 2.0.1
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/useDynamicStyles.js +99 -0
- package/dist/HOCs/useRipple.js +91 -0
- package/dist/build-index.js +8 -0
- package/dist/components/1.Introduction.stories.mdx +2 -1
- package/dist/components/2.Changelog.stories.mdx +3 -0
- package/dist/components/3.Guide.stories.mdx +56 -0
- package/dist/components/Accordion/Accordion.css +39 -1
- package/dist/components/Accordion/Accordion.js +84 -45
- package/dist/components/Accordion/Accordion.stories.js +4 -2
- package/dist/components/Accordion/AccordionOld.css +16 -0
- package/dist/components/Accordion/AccordionOld.js +115 -0
- package/dist/components/Accordion/DesignAccordion.stories.js +38 -0
- package/dist/components/Alert/Alert.css +5 -0
- package/dist/components/Alert/Alert.js +17 -6
- package/dist/components/Avatar/Avatar.css +3 -3
- package/dist/components/Avatar/Avatar.js +36 -20
- package/dist/components/Avatar/AvatarOld.js +138 -0
- package/dist/components/Avatar/DesignAvatar.stories.js +1 -1
- package/dist/components/Block/Block.js +17 -2
- package/dist/components/ButtonBasic/ButtonBasic.css +264 -20
- package/dist/components/ButtonBasic/ButtonBasic.js +85 -110
- package/dist/components/ButtonBasic/ButtonBasicOld.css +41 -0
- package/dist/components/ButtonBasic/ButtonBasicOld.js +231 -0
- package/dist/components/Checkbox/Checkbox.css +101 -22
- package/dist/components/Checkbox/Checkbox.js +119 -63
- package/dist/components/Checkbox/CheckboxOld.css +31 -0
- package/dist/components/Checkbox/CheckboxOld.js +112 -0
- package/dist/components/DragDrop/DragDrop.js +24 -9
- package/dist/components/DrawerPanel/DesignDrawerPanel.js +4 -2
- package/dist/components/DrawerPanel/DrawerPanel.css +76 -36
- package/dist/components/DrawerPanel/DrawerPanel.js +137 -115
- package/dist/components/DrawerPanel/DrawerPanelOld.css +56 -0
- package/dist/components/DrawerPanel/DrawerPanelOld.js +233 -0
- package/dist/components/DropDown/DesignDropDown.stories.js +146 -17
- package/dist/components/DropDown/DropDown.css +96 -1
- package/dist/components/DropDown/DropDown.js +308 -82
- package/dist/components/DropDown/DropDown.stories.js +1 -0
- package/dist/components/DropDown/DropDownOld.css +3 -0
- package/dist/components/DropDown/DropDownOld.js +186 -0
- package/dist/components/DropDown/PopoverPlayground.css +22 -0
- package/dist/components/DropDown/PopoverPlayground.js +235 -0
- package/dist/components/EnhancedTable/EnhancedTable.js +5 -6
- package/dist/components/FabButton/DesignFabButton.stories.js +3 -1
- package/dist/components/FabButton/FabButton.js +25 -5
- package/dist/components/Grid/DesignGrid.stories.js +9 -3
- package/dist/components/Grid/Grid.css +325 -0
- package/dist/components/Grid/Grid.js +57 -16
- package/dist/components/Grid/GridItem.js +31 -13
- package/dist/components/Grid/GridItemOld.js +43 -0
- package/dist/components/Grid/GridOld.css +0 -0
- package/dist/components/Grid/GridOld.js +53 -0
- package/dist/components/Header/Header.js +95 -116
- package/dist/components/IconButton/DesignIconButton.stories.js +22 -2
- package/dist/components/IconButton/IconButton.css +121 -1
- package/dist/components/IconButton/IconButton.js +98 -53
- package/dist/components/IconButton/IconButtonOld.css +0 -0
- package/dist/components/IconButton/IconButtonOld.js +138 -0
- package/dist/components/IconButtonSquare/IconButtonSquare.js +20 -90
- package/dist/components/IconButtonSquare/IconButtonSquareOld.css +43 -0
- package/dist/components/IconButtonSquare/IconButtonSquareOld.js +133 -0
- package/dist/components/InputAutocomplete/InputAutocomplete.css +109 -0
- package/dist/components/InputAutocomplete/InputAutocomplete.js +382 -76
- package/dist/components/InputAutocomplete/InputAutocomplete.stories.js +118 -6
- package/dist/components/InputAutocomplete/InputAutocompleteOld.css +5 -0
- package/dist/components/InputAutocomplete/InputAutocompleteOld.js +178 -0
- package/dist/components/InputPassword/InputPassword.js +10 -20
- package/dist/components/InputText/InputText.css +442 -1
- package/dist/components/InputText/InputText.js +298 -239
- package/dist/components/InputText/InputText.stories.js +12 -3
- package/dist/components/InputText/InputTextOld.css +10 -0
- package/dist/components/InputText/InputTextOld.js +340 -0
- package/dist/components/InputTextArea/DesignInputTextArea.stories.js +30 -4
- package/dist/components/InputTextArea/InputTextArea.js +13 -6
- package/dist/components/LoadingSection/LoadingSection.css +44 -2
- package/dist/components/LoadingSection/LoadingSection.js +63 -9
- package/dist/components/MenuItem/DesignMenuItem.stories.js +1 -0
- package/dist/components/MenuItem/MenuItem.css +35 -6
- package/dist/components/MenuItem/MenuItem.js +99 -50
- package/dist/components/MenuItem/MenuItemOld.js +139 -0
- package/dist/components/MenuLateralLeft/MenuLateralLeft.js +60 -40
- package/dist/components/MenuLateralRight/MenuLateralRight.js +23 -8
- package/dist/components/Modal/DesignModal.stories.js +54 -0
- package/dist/components/Modal/Modal.css +81 -2
- package/dist/components/Modal/Modal.js +112 -80
- package/dist/components/Modal/Modal.stories.js +13 -2
- package/dist/components/Modal/ModalOld.css +3 -0
- package/dist/components/Modal/ModalOld.js +230 -0
- package/dist/components/PaginationFooter/DesignPaginationFooter.stories.js +9 -1
- package/dist/components/PaginationFooter/PaginationFooter.css +73 -0
- package/dist/components/PaginationFooter/PaginationFooter.js +45 -87
- package/dist/components/RadioButton/Radio.css +115 -16
- package/dist/components/RadioButton/Radio.js +70 -94
- package/dist/components/RadioButton/Radio.stories.js +42 -18
- package/dist/components/RadioButton/RadioOld.css +31 -0
- package/dist/components/RadioButton/RadioOld.js +142 -0
- package/dist/components/Ripple/DesignRipple.js +77 -0
- package/dist/components/Ripple/Ripple.stories.js +45 -0
- package/dist/components/Scrollbar/Scrollbar.js +21 -6
- package/dist/components/SelectInput/DesignSelectInput.js +62 -23
- package/dist/components/SelectInput/SelectInput.css +128 -10
- package/dist/components/SelectInput/SelectInput.js +265 -244
- package/dist/components/SelectInput/SelectInputOld.css +17 -0
- package/dist/components/SelectInput/SelectInputOld.js +325 -0
- package/dist/components/Stars/Stars.css +28 -28
- package/dist/components/Stars/Stars.js +22 -12
- package/dist/components/Stepper/Stepper.css +1 -0
- package/dist/components/Stepper/Stepper.js +81 -24
- package/dist/components/Table/DesignTable.stories.js +1 -0
- package/dist/components/Table/Table.css +56 -53
- package/dist/components/Table/Table.js +55 -75
- package/dist/components/Table/TableOld.css +79 -0
- package/dist/components/Table/TableOld.js +165 -0
- package/dist/components/Tabs/DesignTabs.js +37 -12
- package/dist/components/Tabs/Tabs.css +39 -4
- package/dist/components/Tabs/Tabs.js +194 -30
- package/dist/components/Tabs/Tabs.stories.js +8 -1
- package/dist/components/Tabs/TabsOld.js +92 -0
- package/dist/components/Tag/Tag.js +19 -9
- package/dist/components/Toggle/Toggle.css +122 -3
- package/dist/components/Toggle/Toggle.js +95 -68
- package/dist/components/Tooltip/DesignTooltip.stories.js +48 -0
- package/dist/components/Tooltip/Tooltip.css +75 -0
- package/dist/components/Tooltip/Tooltip.js +126 -0
- package/dist/components/Tooltip/Tooltip.stories.js +40 -0
- package/dist/components/Typography/Typography.css +9 -0
- package/dist/components/Typography/Typography.js +30 -21
- package/dist/components/Typography/TypographyOld.js +132 -0
- package/dist/styles/colorConsts.css +24 -0
- package/dist/styles/main.css +41 -49
- package/dist/styles/scpacingConsts.css +26 -0
- package/dist/styles/zIndexConsts.css +9 -0
- package/dist/testing/TestAutocomplete.js +369 -0
- package/dist/testing/TestComponents.js +3 -114
- package/dist/testing/TestDropdown.js +225 -0
- package/dist/utils/autoDetectScroll.js +127 -0
- package/dist/utils/index.js +141 -0
- package/package.json +2 -1
|
@@ -0,0 +1,340 @@
|
|
|
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 _TextField = _interopRequireDefault(require("@mui/material/TextField"));
|
|
13
|
+
|
|
14
|
+
require("../../styles/main.css");
|
|
15
|
+
|
|
16
|
+
require("./InputTextOld.css");
|
|
17
|
+
|
|
18
|
+
var _styled = _interopRequireDefault(require("@mui/material/styles/styled"));
|
|
19
|
+
|
|
20
|
+
var _Typography = _interopRequireDefault(require("../Typography/Typography"));
|
|
21
|
+
|
|
22
|
+
var _excluded = ["id", "className", "onChange", "label", "disabled", "error", "helper", "success", "width", "helperText", "fullWidth", "sx", "endAdornment", "variant", "value", "multiline"];
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
|
|
26
|
+
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); }
|
|
27
|
+
|
|
28
|
+
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; }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
32
|
+
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; }
|
|
33
|
+
|
|
34
|
+
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; }
|
|
35
|
+
|
|
36
|
+
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; }
|
|
37
|
+
|
|
38
|
+
var CssTextField = (0, _styled.default)(_TextField.default)(function () {
|
|
39
|
+
return {
|
|
40
|
+
'& label.Mui-focused': {
|
|
41
|
+
color: 'var(--primary)',
|
|
42
|
+
borderWidth: '0px!important',
|
|
43
|
+
background: 'white!important',
|
|
44
|
+
transform: 'translate(0 ,-0.625rem) scale(0.75)!important'
|
|
45
|
+
},
|
|
46
|
+
'& .MuiInput-underline:after': {
|
|
47
|
+
borderColor: 'var(--primary)',
|
|
48
|
+
borderBottomColor: 'var(--primary)',
|
|
49
|
+
borderWidth: '2px'
|
|
50
|
+
},
|
|
51
|
+
'& .MuiInputBase-root.MuiInput-root': {
|
|
52
|
+
height: '3rem'
|
|
53
|
+
},
|
|
54
|
+
'& .MuiInputBase-root.MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline': {
|
|
55
|
+
borderColor: 'var(--primary)'
|
|
56
|
+
},
|
|
57
|
+
'& .MuiFormHelperText-root': {
|
|
58
|
+
marginTop: 'var(--spacing4)',
|
|
59
|
+
marginLeft: '0px',
|
|
60
|
+
marginRight: '0px'
|
|
61
|
+
},
|
|
62
|
+
'& input.MuiOutlinedInput-input.MuiInputBase-input': {
|
|
63
|
+
height: '1.5rem',
|
|
64
|
+
lineHeight: 'var(--spacing12)',
|
|
65
|
+
padding: 'var(--spacing12) var(--spacing12) var(--spacing12) var(--spacing12)!important',
|
|
66
|
+
paddingRight: 'var(--spacing8)!important'
|
|
67
|
+
},
|
|
68
|
+
'& input.MuiFilledInput-input.MuiInputBase-input': {
|
|
69
|
+
height: '1.5rem',
|
|
70
|
+
lineHeight: 'var(--spacing12)',
|
|
71
|
+
padding: 'var(--spacing12) var(--spacing12) var(--spacing12) 0!important',
|
|
72
|
+
paddingRight: 'var(--spacing8)!important'
|
|
73
|
+
},
|
|
74
|
+
'& .MuiInputLabel-filled.MuiInputLabel-shrink': {
|
|
75
|
+
transform: 'translate(0 ,-0.625rem) scale(0.75)!important'
|
|
76
|
+
},
|
|
77
|
+
'& .MuiInputLabel-outlined.MuiFormLabel-root:not(.MuiInputLabel-shrink)': {
|
|
78
|
+
transform: 'translate(0.875rem ,0.75rem) scale(1)!important'
|
|
79
|
+
},
|
|
80
|
+
'& .MuiInputLabel-outlined.MuiFormLabel-root.MuiInputLabel-shrink': {
|
|
81
|
+
transform: 'translate(0.875rem ,-0.625rem) scale(0.75)!important'
|
|
82
|
+
},
|
|
83
|
+
'& .MuiFormLabel-root.MuiInputLabel-root.MuiInputLabel-formControl.MuiInputLabel-animated.MuiInputLabel-filled:not(.MuiInputLabel-shrink)': {
|
|
84
|
+
transform: 'translate(0 ,0.75rem) scale(1)!important'
|
|
85
|
+
},
|
|
86
|
+
'& .MuiFormLabel-root.MuiInputLabel-root.MuiInputLabel-formControl.MuiInputLabel-animated.MuiInputLabel-standard:not(.MuiInputLabel-shrink)': {
|
|
87
|
+
transform: 'translate(0 ,0.75rem) scale(1)!important'
|
|
88
|
+
},
|
|
89
|
+
'& label.Mui-error': {
|
|
90
|
+
color: 'var(--error)!important'
|
|
91
|
+
},
|
|
92
|
+
'& .MuiInputLabel-shrink': {
|
|
93
|
+
transform: 'translate(0 ,-0.625rem) scale(0.75)!important',
|
|
94
|
+
zIndex: '1'
|
|
95
|
+
},
|
|
96
|
+
'& .MuiOutlinedInput-notchedOutline': {
|
|
97
|
+
transition: '0.2s',
|
|
98
|
+
color: 'var(--gray5)',
|
|
99
|
+
paddingRight: 'var(--spacing8)',
|
|
100
|
+
'& fieldset': {
|
|
101
|
+
borderColor: 'var(--gray3)',
|
|
102
|
+
borderWidth: '0.063rem',
|
|
103
|
+
'& legend': {
|
|
104
|
+
'& span': {
|
|
105
|
+
paddingLeft: 'var(--spacing4)',
|
|
106
|
+
paddingRight: 'var(--spacing4)'
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
'&:hover fieldset': {
|
|
111
|
+
borderColor: 'var(--gray3)',
|
|
112
|
+
borderWidth: '0.125rem'
|
|
113
|
+
},
|
|
114
|
+
'&:active fieldset': {
|
|
115
|
+
borderColor: 'var(--gray3)',
|
|
116
|
+
borderWidth: '0.125rem'
|
|
117
|
+
},
|
|
118
|
+
'&.Mui-focused fieldset': {
|
|
119
|
+
borderColor: 'var(--primary)',
|
|
120
|
+
borderWidth: '0.125rem'
|
|
121
|
+
},
|
|
122
|
+
'&:focus-visible': {
|
|
123
|
+
outline: 'none',
|
|
124
|
+
'& fieldset': {
|
|
125
|
+
outline: 'none',
|
|
126
|
+
boxShadow: '0 0 0 3px white, 0 0 7px 4px var(--primary)',
|
|
127
|
+
border: '0.125rem solid var(--gray4)'
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
'& .MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline': {
|
|
132
|
+
border: '0.063rem dashed var(--gray2)'
|
|
133
|
+
},
|
|
134
|
+
'& .MuiOutlinedInput-input.Mui-disabled': {
|
|
135
|
+
color: 'var(--gray5)',
|
|
136
|
+
WebkitTextFillColor: 'unset'
|
|
137
|
+
},
|
|
138
|
+
'& .MuiInputBase-input.Mui-disabled': {
|
|
139
|
+
color: 'var(--gray5)',
|
|
140
|
+
WebkitTextFillColor: 'unset'
|
|
141
|
+
},
|
|
142
|
+
'& .MuiInputLabel-root, .MuiInputBase-root.MuiOutlinedInput-root': {
|
|
143
|
+
color: 'var(--gray5)'
|
|
144
|
+
},
|
|
145
|
+
'& .MuiInputLabel-root.Mui-disabled': {
|
|
146
|
+
color: 'var(--gray3)'
|
|
147
|
+
},
|
|
148
|
+
'& .MuiFormHelperText-root.Mui-focused div h6': {
|
|
149
|
+
color: 'var(--primary)'
|
|
150
|
+
},
|
|
151
|
+
'& .MuiInput-input.MuiInputBase-input': {
|
|
152
|
+
height: '1.5rem',
|
|
153
|
+
lineHeight: 'var(--spacing12)',
|
|
154
|
+
padding: 'var(--spacing12) var(--spacing12) var(--spacing12) 0!important',
|
|
155
|
+
paddingRight: 'var(--spacing8)!important'
|
|
156
|
+
},
|
|
157
|
+
'& input.MuiInputBase-root.MuiOutlinedInput-root': {
|
|
158
|
+
padding: '0'
|
|
159
|
+
},
|
|
160
|
+
'& .MuiInputBase-multiline': {
|
|
161
|
+
fontWeight: '400',
|
|
162
|
+
fontSize: '1rem',
|
|
163
|
+
lineHeight: '1.4375em',
|
|
164
|
+
letterSpacing: '0.00938em',
|
|
165
|
+
boxSizing: 'border-box',
|
|
166
|
+
cursor: 'text',
|
|
167
|
+
display: 'inline-flex',
|
|
168
|
+
alignItems: 'center',
|
|
169
|
+
position: 'relative',
|
|
170
|
+
borderRadius: '0.25rem',
|
|
171
|
+
padding: 'var(--spacing12)!important'
|
|
172
|
+
},
|
|
173
|
+
'& .MuiInputBase-multiline textarea': {
|
|
174
|
+
font: 'inherit',
|
|
175
|
+
letterSpacing: 'inherit',
|
|
176
|
+
color: 'currentcolor',
|
|
177
|
+
border: '0px',
|
|
178
|
+
boxSizing: 'content-box',
|
|
179
|
+
background: 'none',
|
|
180
|
+
height: 'auto',
|
|
181
|
+
margin: '0px',
|
|
182
|
+
display: 'block',
|
|
183
|
+
minWidth: '0px',
|
|
184
|
+
width: '100%',
|
|
185
|
+
animationName: 'mui-auto-fill-cancel',
|
|
186
|
+
animationDuration: '10ms',
|
|
187
|
+
resize: 'none',
|
|
188
|
+
padding: '0px',
|
|
189
|
+
minHeight: '1.5rem'
|
|
190
|
+
},
|
|
191
|
+
'& .MuiInput-underline.MuiInputBase-multiline': {
|
|
192
|
+
paddingLeft: '0!important'
|
|
193
|
+
},
|
|
194
|
+
'& .MuiFormControl-root .MuiFormLabel-root.MuiInputBase-root': {
|
|
195
|
+
marginTop: '0rem!important'
|
|
196
|
+
},
|
|
197
|
+
'& label + .MuiInputBase-root.MuiInput-root': {
|
|
198
|
+
marginTop: '0'
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
var InputTextOld = function InputTextOld(_ref) {
|
|
204
|
+
var id = _ref.id,
|
|
205
|
+
className = _ref.className,
|
|
206
|
+
onChange = _ref.onChange,
|
|
207
|
+
label = _ref.label,
|
|
208
|
+
disabled = _ref.disabled,
|
|
209
|
+
error = _ref.error,
|
|
210
|
+
helper = _ref.helper,
|
|
211
|
+
success = _ref.success,
|
|
212
|
+
width = _ref.width,
|
|
213
|
+
helperText = _ref.helperText,
|
|
214
|
+
fullWidth = _ref.fullWidth,
|
|
215
|
+
sx = _ref.sx,
|
|
216
|
+
endAdornment = _ref.endAdornment,
|
|
217
|
+
variant = _ref.variant,
|
|
218
|
+
value = _ref.value,
|
|
219
|
+
multiline = _ref.multiline,
|
|
220
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
221
|
+
|
|
222
|
+
var getIcon = function getIcon() {
|
|
223
|
+
var icon = endAdornment ? /*#__PURE__*/_react.default.createElement("i", {
|
|
224
|
+
className: "cbx-inputText-endAdornment ".concat(endAdornment)
|
|
225
|
+
}) : '';
|
|
226
|
+
|
|
227
|
+
if (success) {
|
|
228
|
+
icon = /*#__PURE__*/_react.default.createElement("i", {
|
|
229
|
+
className: "cbx-inputText-endAdornment ri-check-line",
|
|
230
|
+
style: {
|
|
231
|
+
color: 'var(--success)'
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
if (error) {
|
|
237
|
+
icon = /*#__PURE__*/_react.default.createElement("i", {
|
|
238
|
+
className: 'cbx-inputText-endAdornment ri-information-line',
|
|
239
|
+
style: {
|
|
240
|
+
color: 'var(--error)'
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
if (helper) {
|
|
246
|
+
icon = /*#__PURE__*/_react.default.createElement("i", {
|
|
247
|
+
className: 'cbx-inputText-endAdornment ri-information-line'
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
return icon;
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
var getVariant = function getVariant() {
|
|
255
|
+
var variantInput = 'outlined';
|
|
256
|
+
|
|
257
|
+
if (variant === 'outlined') {
|
|
258
|
+
variantInput = variant;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
if (variant === 'filled') {
|
|
262
|
+
variantInput = variant;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
if (variant === 'standard') {
|
|
266
|
+
variantInput = variant;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
return variantInput;
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
return /*#__PURE__*/_react.default.createElement(CssTextField, _extends({
|
|
273
|
+
id: id,
|
|
274
|
+
className: className,
|
|
275
|
+
sx: _objectSpread(_objectSpread({
|
|
276
|
+
minWidth: width || '15rem'
|
|
277
|
+
}, width ? {
|
|
278
|
+
width: width || ''
|
|
279
|
+
} : {}), {}, {
|
|
280
|
+
minHeight: '3rem',
|
|
281
|
+
'& .MuiOutlinedInput-notchedOutline': {
|
|
282
|
+
'& legend': {
|
|
283
|
+
width: label ? 'auto' : '0px'
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}, sx),
|
|
287
|
+
variant: getVariant(),
|
|
288
|
+
label: label,
|
|
289
|
+
fullWidth: fullWidth,
|
|
290
|
+
onChange: onChange,
|
|
291
|
+
disabled: disabled,
|
|
292
|
+
error: error,
|
|
293
|
+
value: value || '',
|
|
294
|
+
multiline: multiline,
|
|
295
|
+
helperText: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, helperText, error ? /*#__PURE__*/_react.default.createElement("div", {
|
|
296
|
+
className: "cbx-inputText-items-center"
|
|
297
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
298
|
+
variant: "XS",
|
|
299
|
+
color: 'var(--error)!important'
|
|
300
|
+
}, error)) : helper && /*#__PURE__*/_react.default.createElement("div", {
|
|
301
|
+
className: "cbx-inputText-items-center"
|
|
302
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
303
|
+
color: !disabled ? 'var(--gray4)' : 'var(--gray3)',
|
|
304
|
+
variant: "XS"
|
|
305
|
+
}, helper))),
|
|
306
|
+
InputProps: {
|
|
307
|
+
endAdornment: !multiline && getIcon()
|
|
308
|
+
}
|
|
309
|
+
}, props));
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
InputTextOld.displayName = "InputTextOld";
|
|
313
|
+
InputTextOld.propTypes = {
|
|
314
|
+
label: _propTypes.default.string,
|
|
315
|
+
helper: _propTypes.default.string,
|
|
316
|
+
width: _propTypes.default.string,
|
|
317
|
+
id: _propTypes.default.string,
|
|
318
|
+
className: _propTypes.default.string,
|
|
319
|
+
onChange: _propTypes.default.func,
|
|
320
|
+
disabled: _propTypes.default.bool,
|
|
321
|
+
error: _propTypes.default.node,
|
|
322
|
+
success: _propTypes.default.bool,
|
|
323
|
+
fullWidth: _propTypes.default.bool
|
|
324
|
+
};
|
|
325
|
+
InputTextOld.defaultProps = {
|
|
326
|
+
label: '',
|
|
327
|
+
helper: '',
|
|
328
|
+
width: '',
|
|
329
|
+
id: '',
|
|
330
|
+
value: '',
|
|
331
|
+
className: '',
|
|
332
|
+
onChange: undefined,
|
|
333
|
+
disabled: false,
|
|
334
|
+
error: undefined,
|
|
335
|
+
fullWidth: false,
|
|
336
|
+
endAdornment: '',
|
|
337
|
+
helperText: ''
|
|
338
|
+
};
|
|
339
|
+
var _default = InputTextOld;
|
|
340
|
+
exports.default = _default;
|
|
@@ -31,8 +31,11 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
31
31
|
|
|
32
32
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
33
33
|
|
|
34
|
-
var DesignInputTextArea = function DesignInputTextArea() {
|
|
34
|
+
var DesignInputTextArea = function DesignInputTextArea(_ref) {
|
|
35
|
+
var variant = _ref.variant;
|
|
36
|
+
|
|
35
37
|
var _React$useState = _react.default.useState({
|
|
38
|
+
textArea0: '',
|
|
36
39
|
textArea1: '',
|
|
37
40
|
textArea2: '',
|
|
38
41
|
textArea3: '',
|
|
@@ -45,6 +48,25 @@ var DesignInputTextArea = function DesignInputTextArea() {
|
|
|
45
48
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
46
49
|
style: {}
|
|
47
50
|
}, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_InputTextArea.default, {
|
|
51
|
+
id: "id-reason-text-area",
|
|
52
|
+
label: 'translate.reason',
|
|
53
|
+
required: true,
|
|
54
|
+
maxSize: 200,
|
|
55
|
+
value: 'sdzfgsgsdfg',
|
|
56
|
+
variant: 'standard'
|
|
57
|
+
})), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_InputTextArea.default, {
|
|
58
|
+
id: 'hola',
|
|
59
|
+
label: 'label',
|
|
60
|
+
name: "observation",
|
|
61
|
+
value: state.textArea0,
|
|
62
|
+
onChange: function onChange(data) {
|
|
63
|
+
setState(_objectSpread(_objectSpread({}, state), {}, {
|
|
64
|
+
textArea0: data
|
|
65
|
+
}));
|
|
66
|
+
} // rows={1}
|
|
67
|
+
,
|
|
68
|
+
variant: variant
|
|
69
|
+
})), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_InputTextArea.default, {
|
|
48
70
|
id: 'hola',
|
|
49
71
|
label: 'label',
|
|
50
72
|
name: "observation",
|
|
@@ -53,7 +75,9 @@ var DesignInputTextArea = function DesignInputTextArea() {
|
|
|
53
75
|
setState(_objectSpread(_objectSpread({}, state), {}, {
|
|
54
76
|
textArea1: data
|
|
55
77
|
}));
|
|
56
|
-
}
|
|
78
|
+
},
|
|
79
|
+
rows: 1,
|
|
80
|
+
variant: variant
|
|
57
81
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
58
82
|
style: {}
|
|
59
83
|
}, /*#__PURE__*/_react.default.createElement(_InputTextArea.default, {
|
|
@@ -66,7 +90,8 @@ var DesignInputTextArea = function DesignInputTextArea() {
|
|
|
66
90
|
textArea2: data
|
|
67
91
|
}));
|
|
68
92
|
},
|
|
69
|
-
error: 'Error text'
|
|
93
|
+
error: 'Error text',
|
|
94
|
+
variant: variant
|
|
70
95
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
71
96
|
style: {}
|
|
72
97
|
}, /*#__PURE__*/_react.default.createElement(_InputTextArea.default, {
|
|
@@ -80,6 +105,7 @@ var DesignInputTextArea = function DesignInputTextArea() {
|
|
|
80
105
|
textArea4: data
|
|
81
106
|
}));
|
|
82
107
|
},
|
|
108
|
+
variant: variant,
|
|
83
109
|
rows: 3
|
|
84
110
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
85
111
|
style: {
|
|
@@ -87,7 +113,7 @@ var DesignInputTextArea = function DesignInputTextArea() {
|
|
|
87
113
|
}
|
|
88
114
|
}, /*#__PURE__*/_react.default.createElement(_InputTextArea.default, {
|
|
89
115
|
label: 'label',
|
|
90
|
-
variant:
|
|
116
|
+
variant: variant || 'standard',
|
|
91
117
|
name: "observation",
|
|
92
118
|
value: state.textArea3,
|
|
93
119
|
onChange: function onChange(data) {
|
|
@@ -17,7 +17,9 @@ var _InputText = _interopRequireDefault(require("../InputText/InputText"));
|
|
|
17
17
|
|
|
18
18
|
var _Typography = _interopRequireDefault(require("../Typography/Typography"));
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _useDynamicStyles2 = _interopRequireDefault(require("../../HOCs/useDynamicStyles"));
|
|
21
|
+
|
|
22
|
+
var _excluded = ["value", "onChange", "label", "maxSize", "hideCount", "disabled", "autoComplete", "placeholder", "error", "rows", "maxRows", "variant", "id", "helper", "helperText", "sx"];
|
|
21
23
|
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
25
|
|
|
@@ -59,8 +61,12 @@ var InputTextArea = function InputTextArea(_ref) {
|
|
|
59
61
|
id = _ref.id,
|
|
60
62
|
helper = _ref.helper,
|
|
61
63
|
helperText = _ref.helperText,
|
|
64
|
+
sx = _ref.sx,
|
|
62
65
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
63
66
|
|
|
67
|
+
var _useDynamicStyles = (0, _useDynamicStyles2.default)(sx),
|
|
68
|
+
prefixClass = _useDynamicStyles.prefixClass;
|
|
69
|
+
|
|
64
70
|
var _React$useState = _react.default.useState(value === null || value === void 0 ? void 0 : value.length),
|
|
65
71
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
66
72
|
characterCount = _React$useState2[0],
|
|
@@ -91,6 +97,7 @@ var InputTextArea = function InputTextArea(_ref) {
|
|
|
91
97
|
|
|
92
98
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_InputText.default, _extends({
|
|
93
99
|
id: id,
|
|
100
|
+
prefixClass: prefixClass,
|
|
94
101
|
size: "small",
|
|
95
102
|
fullWidth: true,
|
|
96
103
|
label: label,
|
|
@@ -104,7 +111,7 @@ var InputTextArea = function InputTextArea(_ref) {
|
|
|
104
111
|
inputProps: {
|
|
105
112
|
maxLength: maxSize
|
|
106
113
|
},
|
|
107
|
-
type: "
|
|
114
|
+
type: "textArea",
|
|
108
115
|
onFocus: onFocus,
|
|
109
116
|
onBlur: onBlur,
|
|
110
117
|
placeholder: placeholder,
|
|
@@ -119,12 +126,12 @@ var InputTextArea = function InputTextArea(_ref) {
|
|
|
119
126
|
justifyContent: 'space-between'
|
|
120
127
|
}
|
|
121
128
|
}, /*#__PURE__*/_react.default.createElement("div", null, helperText, error ? /*#__PURE__*/_react.default.createElement("div", {
|
|
122
|
-
className:
|
|
129
|
+
className: prefixClass('cbx-inputText-items-center')
|
|
123
130
|
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
124
131
|
variant: "XS",
|
|
125
|
-
color: 'var(--error)
|
|
132
|
+
color: 'var(--error)'
|
|
126
133
|
}, error)) : helper && /*#__PURE__*/_react.default.createElement("div", {
|
|
127
|
-
className:
|
|
134
|
+
className: prefixClass('cbx-inputText-items-center')
|
|
128
135
|
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
129
136
|
color: !disabled ? 'var(--gray4)' : 'var(--gray3)',
|
|
130
137
|
variant: "XS"
|
|
@@ -167,7 +174,7 @@ InputTextArea.defaultProps = {
|
|
|
167
174
|
disabled: false,
|
|
168
175
|
id: '',
|
|
169
176
|
autoComplete: 'off',
|
|
170
|
-
type: '
|
|
177
|
+
type: 'textArea',
|
|
171
178
|
placeholder: '',
|
|
172
179
|
error: false,
|
|
173
180
|
variant: ''
|
|
@@ -1,7 +1,49 @@
|
|
|
1
|
-
.cbx-
|
|
1
|
+
.cbx-LoadingSection-container {
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
5
5
|
align-items: center;
|
|
6
6
|
justify-content: center;
|
|
7
|
-
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.cbx-LoadingSection-block {
|
|
10
|
+
width: 60px;
|
|
11
|
+
height: 60px;
|
|
12
|
+
color: var(--primary);
|
|
13
|
+
animation: progressContainer 1.4s linear infinite;
|
|
14
|
+
animation-name: progressContainer;
|
|
15
|
+
display: inline-block;
|
|
16
|
+
line-height: 0.083em;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.cbx-LoadingSection-circle {
|
|
20
|
+
stroke-dasharray: 6.667em, 16.667em;
|
|
21
|
+
stroke-dashoffset: 0em;
|
|
22
|
+
animation: 1.4s ease-in-out infinite;
|
|
23
|
+
animation-name: progressCircle;
|
|
24
|
+
stroke: currentColor;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@keyframes progressContainer {
|
|
28
|
+
from {
|
|
29
|
+
transform: rotate(0deg);
|
|
30
|
+
}
|
|
31
|
+
to {
|
|
32
|
+
transform: rotate(359deg);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@keyframes progressCircle {
|
|
37
|
+
0% {
|
|
38
|
+
stroke-dasharray: 0.083em, 16.667em;
|
|
39
|
+
stroke-dashoffset: 0em;
|
|
40
|
+
}
|
|
41
|
+
50% {
|
|
42
|
+
stroke-dasharray: 8.333em, 16.667em;
|
|
43
|
+
stroke-dashoffset: -1.250em;
|
|
44
|
+
}
|
|
45
|
+
100% {
|
|
46
|
+
stroke-dasharray: 8.333em, 16.667em;
|
|
47
|
+
stroke-dashoffset: -10.000em;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -7,32 +7,86 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
10
12
|
require("../../styles/main.css");
|
|
11
13
|
|
|
12
14
|
require("./LoadingSection.css");
|
|
13
15
|
|
|
14
|
-
var
|
|
16
|
+
var _useDynamicStyles2 = _interopRequireDefault(require("../../HOCs/useDynamicStyles"));
|
|
17
|
+
|
|
18
|
+
var _excluded = ["size", "color", "thickness", "style", "sx", "id", "prefixClass"];
|
|
15
19
|
|
|
16
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
21
|
|
|
22
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
|
+
|
|
24
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
25
|
+
|
|
26
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
27
|
+
|
|
28
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
29
|
+
|
|
30
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
31
|
+
|
|
32
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
33
|
+
|
|
18
34
|
var LoadingSection = function LoadingSection(_ref) {
|
|
19
35
|
var _ref$size = _ref.size,
|
|
20
36
|
size = _ref$size === void 0 ? 60 : _ref$size,
|
|
21
37
|
_ref$color = _ref.color,
|
|
22
38
|
color = _ref$color === void 0 ? 'var(--primary)' : _ref$color,
|
|
23
39
|
_ref$thickness = _ref.thickness,
|
|
24
|
-
thickness = _ref$thickness === void 0 ? 7 : _ref$thickness
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
40
|
+
thickness = _ref$thickness === void 0 ? 7 : _ref$thickness,
|
|
41
|
+
style = _ref.style,
|
|
42
|
+
sx = _ref.sx,
|
|
43
|
+
id = _ref.id,
|
|
44
|
+
propPrefixClass = _ref.prefixClass,
|
|
45
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
46
|
+
|
|
47
|
+
var _useDynamicStyles = (0, _useDynamicStyles2.default)(sx),
|
|
48
|
+
stylesInLine = _useDynamicStyles.stylesInLine,
|
|
49
|
+
dynamicPrefixClass = _useDynamicStyles.prefixClass;
|
|
50
|
+
|
|
51
|
+
var prefixClass = propPrefixClass || dynamicPrefixClass;
|
|
52
|
+
return /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
53
|
+
id: id,
|
|
54
|
+
className: prefixClass('cbx-LoadingSection-container'),
|
|
55
|
+
style: _objectSpread(_objectSpread({}, style), stylesInLine)
|
|
56
|
+
}, props), /*#__PURE__*/_react.default.createElement("div", {
|
|
57
|
+
className: prefixClass('cbx-LoadingSection-block'),
|
|
58
|
+
role: "progressbar",
|
|
30
59
|
style: {
|
|
31
|
-
color: color
|
|
60
|
+
color: color,
|
|
61
|
+
width: size,
|
|
62
|
+
height: size
|
|
32
63
|
}
|
|
33
|
-
}
|
|
64
|
+
}, /*#__PURE__*/_react.default.createElement("svg", {
|
|
65
|
+
viewBox: "22 22 44 44"
|
|
66
|
+
}, /*#__PURE__*/_react.default.createElement("circle", {
|
|
67
|
+
className: prefixClass('cbx-LoadingSection-circle'),
|
|
68
|
+
cx: "44",
|
|
69
|
+
cy: "44",
|
|
70
|
+
r: "18.5",
|
|
71
|
+
fill: "none",
|
|
72
|
+
strokeWidth: thickness
|
|
73
|
+
}))));
|
|
34
74
|
};
|
|
35
75
|
|
|
36
76
|
LoadingSection.displayName = "LoadingSection";
|
|
77
|
+
LoadingSection.propTypes = {
|
|
78
|
+
id: _propTypes.default.string,
|
|
79
|
+
size: _propTypes.default.number,
|
|
80
|
+
color: _propTypes.default.string,
|
|
81
|
+
thickness: _propTypes.default.number,
|
|
82
|
+
style: _propTypes.default.node
|
|
83
|
+
};
|
|
84
|
+
LoadingSection.defaultProps = {
|
|
85
|
+
id: '',
|
|
86
|
+
size: 60,
|
|
87
|
+
color: 'var(--primary)',
|
|
88
|
+
thickness: 7,
|
|
89
|
+
style: null
|
|
90
|
+
};
|
|
37
91
|
var _default = LoadingSection;
|
|
38
92
|
exports.default = _default;
|
|
@@ -38,6 +38,7 @@ var DesignMenuItem = function DesignMenuItem() {
|
|
|
38
38
|
color: "transparent",
|
|
39
39
|
type: "text",
|
|
40
40
|
text: 'Click',
|
|
41
|
+
variantButton: 'tertiary',
|
|
41
42
|
items: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_MenuItem.default, null, "1111"), /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
|
|
42
43
|
endIcon: 'ri-align-bottom'
|
|
43
44
|
}, "Lorem ipsum dolor sit amet"), /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
|