diginet-core-ui 1.4.14-beta.2 → 1.4.14-beta.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/components/accordion/details.js +36 -25
- package/components/accordion/group.js +33 -18
- package/components/accordion/index.js +42 -28
- package/components/accordion/summary.js +60 -52
- package/components/alert/index.js +84 -75
- package/components/alert/notify.js +53 -41
- package/components/avatar/index.js +97 -94
- package/components/badge/index.js +80 -78
- package/components/breadcrumb/index.js +62 -44
- package/components/button/icon.js +90 -70
- package/components/button/index.js +110 -88
- package/components/button/more.js +60 -39
- package/components/button/ripple-effect.js +1 -1
- package/components/card/body.js +38 -28
- package/components/card/extra.js +38 -28
- package/components/card/footer.js +38 -28
- package/components/card/header.js +39 -28
- package/components/card/index.js +79 -70
- package/components/chart/bar/Labels.js +14 -8
- package/components/chart/bar-v2/Labels.js +14 -8
- package/components/chart/line/Labels.js +14 -8
- package/components/chart/line/Path.js +3 -3
- package/components/chart/line/Point.js +12 -11
- package/components/chart/line-v2/Labels.js +14 -8
- package/components/check-text/index.js +21 -16
- package/components/check-text/interview-confirmation.js +21 -15
- package/components/check-text/interview-status.js +21 -15
- package/components/chip/attach.js +11 -7
- package/components/chip/index.js +83 -82
- package/components/collapse/index.js +1 -1
- package/components/dialogs/colors.js +13 -11
- package/components/divider/index.js +40 -22
- package/components/form-control/attachment/index.js +94 -57
- package/components/form-control/calendar/function.js +173 -169
- package/components/form-control/calendar/index.js +48 -36
- package/components/form-control/calendar/range.js +38 -22
- package/components/form-control/checkbox/index.js +87 -63
- package/components/form-control/control/index.js +9 -10
- package/components/form-control/date-picker/index.js +81 -64
- package/components/form-control/date-range-picker/index.js +98 -81
- package/components/form-control/dropdown/index.js +240 -215
- package/components/form-control/dropdown-box/index.js +56 -43
- package/components/form-control/form-group/index.js +7 -6
- package/components/form-control/helper-text/index.js +45 -41
- package/components/form-control/input-base/index.js +165 -133
- package/components/form-control/label/index.js +48 -41
- package/components/form-control/money-input/index.js +87 -79
- package/components/form-control/number-input/index.js +579 -521
- package/components/form-control/number-input/index2.js +107 -87
- package/components/form-control/password-input/index.js +71 -63
- package/components/form-control/radio/index.js +90 -74
- package/components/form-control/text-input/index.js +83 -74
- package/components/form-control/time-picker/index.js +79 -56
- package/components/form-control/time-picker/v2/index.js +90 -84
- package/components/form-control/toggle/index.js +144 -133
- package/components/form-view/helper-text.js +2 -2
- package/components/form-view/index.js +34 -31
- package/components/form-view/input.js +70 -69
- package/components/form-view/label.js +14 -9
- package/components/grid/Col.js +48 -39
- package/components/grid/Container.js +31 -38
- package/components/grid/Row.js +28 -32
- package/components/grid/index.js +66 -54
- package/components/image/index.js +37 -27
- package/components/list/list-item-action.js +36 -26
- package/components/list/list-item-icon.js +34 -29
- package/components/list/list-item-text.js +27 -22
- package/components/list/list-item.js +42 -36
- package/components/list/list.js +46 -38
- package/components/list/sub-header.js +33 -26
- package/components/modal/body.js +24 -14
- package/components/modal/footer.js +23 -13
- package/components/modal/header.js +39 -28
- package/components/modal/index.js +3 -3
- package/components/modal/modal.js +60 -49
- package/components/others/extra/index.js +31 -30
- package/components/others/import/index.js +2 -2
- package/components/others/scrollbar/index.js +32 -26
- package/components/paging/page-info.js +67 -68
- package/components/paging/page-selector.js +49 -49
- package/components/paper/index.js +32 -28
- package/components/popover/body.js +14 -8
- package/components/popover/footer.js +13 -8
- package/components/popover/header.js +17 -15
- package/components/popover/index.js +103 -92
- package/components/popup/danger_popup.js +17 -16
- package/components/popup/index.js +16 -17
- package/components/popup/v2/index.js +41 -54
- package/components/progress/circular.js +65 -80
- package/components/progress/linear.js +73 -58
- package/components/rating/index.js +49 -63
- package/components/slider/slider-container.js +49 -57
- package/components/slider/slider-item.js +30 -29
- package/components/status/index.js +23 -34
- package/components/tab/tab-header.js +20 -11
- package/components/tab/tab-panel.js +12 -7
- package/components/tab/tab.js +35 -22
- package/components/tooltip/index.js +24 -35
- package/components/transfer/index.js +105 -106
- package/components/tree-view/index.js +133 -115
- package/components/typography/index.js +72 -55
- package/global/index.js +2 -17
- package/icons/basic.js +975 -972
- package/icons/effect.js +21 -20
- package/package.json +3 -1
- package/styles/color-helper.js +105 -105
- package/styles/colors.js +168 -30
- package/styles/general.js +84 -16
- package/styles/sx/index.js +7 -4
- package/styles/utils.js +20 -19
- package/theme/createSpacing.js +10 -0
- package/theme/createTheme.js +26 -0
- package/theme/createZIndex.js +9 -0
- package/theme/index.js +13 -2
- package/theme/make-styles.js +2 -1
- package/theme/settings.js +699 -8
- package/theme/theme-provider.js +32 -15
- package/theme/theme.js +57 -56
- package/theme/use-classes.js +15 -0
- package/theme/utils/getThemeProps.js +12 -0
- package/theme/utils/resolveProps.js +17 -0
- package/theme/utils/useThemeProps.js +14 -0
- package/utils/handleBreakpoints.js +2 -2
- package/utils/hexToRGBA/index.js +7 -7
- package/utils/object/deepmerge.js +104 -0
- package/utils/object/object.js +7 -12
- package/utils/render-portal.js +4 -3
- package/theme/set-theme.js +0 -38
package/theme/settings.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { color } from "../styles/colors";
|
|
2
2
|
import { font } from "../styles/font";
|
|
3
|
-
import { getSpacing, setZIndex, zIndex } from "../styles/general";
|
|
4
3
|
import { typography as typographies } from "../styles/typography";
|
|
5
|
-
import
|
|
4
|
+
import createTheme from "./createTheme";
|
|
5
|
+
import locale from "../locale";
|
|
6
|
+
import { getGlobal } from "../global";
|
|
6
7
|
const {
|
|
7
8
|
fontSize,
|
|
8
9
|
fontFamily,
|
|
@@ -10,6 +11,8 @@ const {
|
|
|
10
11
|
fontFamilyMedium,
|
|
11
12
|
fontFamilySecurity
|
|
12
13
|
} = font;
|
|
14
|
+
delete color.lightMode;
|
|
15
|
+
delete color.lightMode;
|
|
13
16
|
const settings = {
|
|
14
17
|
border: {
|
|
15
18
|
radius: '4px',
|
|
@@ -23,7 +26,7 @@ const settings = {
|
|
|
23
26
|
...color,
|
|
24
27
|
disabled: color.system.disabled,
|
|
25
28
|
hover: color.fill.hover,
|
|
26
|
-
label: color.text.
|
|
29
|
+
label: color.text.label,
|
|
27
30
|
placeholder: color.text.sub,
|
|
28
31
|
primary: color.system.active,
|
|
29
32
|
secondary: color.system.rest,
|
|
@@ -52,7 +55,7 @@ const settings = {
|
|
|
52
55
|
},
|
|
53
56
|
...typographies
|
|
54
57
|
},
|
|
55
|
-
breakpoints:
|
|
58
|
+
breakpoints: {
|
|
56
59
|
values: {
|
|
57
60
|
xs: 0,
|
|
58
61
|
// extra-small
|
|
@@ -64,10 +67,698 @@ const settings = {
|
|
|
64
67
|
// large
|
|
65
68
|
xl: 1536 // extra-large
|
|
66
69
|
}
|
|
67
|
-
}
|
|
70
|
+
},
|
|
68
71
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
+
mode: 'light',
|
|
73
|
+
components: {
|
|
74
|
+
Accordion: {
|
|
75
|
+
defaultProps: {
|
|
76
|
+
boxShadow: true,
|
|
77
|
+
className: '',
|
|
78
|
+
disabled: false,
|
|
79
|
+
expand: false,
|
|
80
|
+
fullHeight: false,
|
|
81
|
+
style: {}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
AccordionDetails: {
|
|
85
|
+
defaultProps: {
|
|
86
|
+
className: '',
|
|
87
|
+
id: '',
|
|
88
|
+
style: {}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
AccordionGroup: {
|
|
92
|
+
defaultProps: {
|
|
93
|
+
className: '',
|
|
94
|
+
id: '',
|
|
95
|
+
style: {}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
AccordionSummary: {
|
|
99
|
+
defaultProps: {
|
|
100
|
+
background: 'system/standard',
|
|
101
|
+
className: '',
|
|
102
|
+
expandIcon: 'ArrowRight',
|
|
103
|
+
expandIconAt: 'start',
|
|
104
|
+
expandIconProps: {},
|
|
105
|
+
style: {}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
Alert: {
|
|
109
|
+
defaultProps: {
|
|
110
|
+
autoDisappear: false,
|
|
111
|
+
className: '',
|
|
112
|
+
clearAble: true,
|
|
113
|
+
color: 'semantic/info',
|
|
114
|
+
duration: 2000,
|
|
115
|
+
progressing: false,
|
|
116
|
+
size: 'medium'
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
Avatar: {
|
|
120
|
+
defaultProps: {
|
|
121
|
+
actionIconHeight: 24,
|
|
122
|
+
actionIconWidth: 24,
|
|
123
|
+
allowEdit: false,
|
|
124
|
+
className: '',
|
|
125
|
+
clearAble: true,
|
|
126
|
+
data: {},
|
|
127
|
+
direction: 'bottom',
|
|
128
|
+
disabled: false,
|
|
129
|
+
height: 48,
|
|
130
|
+
hoverAble: false,
|
|
131
|
+
lazyLoading: false,
|
|
132
|
+
matchType: /^image\/(gif|jpe?g|tiff?|png|webp|bmp|svg(\+xml)?)$/i,
|
|
133
|
+
maxSizeError: `File ${getGlobal(['errorDefault', 'maxSize'])}`,
|
|
134
|
+
outlined: false,
|
|
135
|
+
readOnly: false,
|
|
136
|
+
style: {},
|
|
137
|
+
width: 48,
|
|
138
|
+
wrongTypeError: `File ${getGlobal(['errorDefault', 'fileType'])}`
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
Attachment: {
|
|
142
|
+
defaultProps: {
|
|
143
|
+
allowSort: true,
|
|
144
|
+
className: '',
|
|
145
|
+
data: [],
|
|
146
|
+
deleteNotifyText: getGlobal('deleteNotifyText'),
|
|
147
|
+
disabled: false,
|
|
148
|
+
height: 280,
|
|
149
|
+
hintText: getGlobal('dropFileHere'),
|
|
150
|
+
label: getGlobal('attachText'),
|
|
151
|
+
maxSize: getGlobal('maxSizeUpload'),
|
|
152
|
+
maxFile: Infinity,
|
|
153
|
+
multiple: true,
|
|
154
|
+
style: {},
|
|
155
|
+
uploadErrorInfo: {
|
|
156
|
+
maxFile: getGlobal(['errorDefault', 'maxFile']),
|
|
157
|
+
maxSize: getGlobal(['errorDefault', 'maxSize']),
|
|
158
|
+
fileType: getGlobal(['errorDefault', 'fileType']),
|
|
159
|
+
existingFile: getGlobal(['errorDefault', 'existingFile'])
|
|
160
|
+
},
|
|
161
|
+
viewType: 'detail'
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
Badge: {
|
|
165
|
+
defaultProps: {
|
|
166
|
+
anchorOrigin: {
|
|
167
|
+
vertical: 'top',
|
|
168
|
+
horizontal: 'right'
|
|
169
|
+
},
|
|
170
|
+
className: '',
|
|
171
|
+
color: 'default',
|
|
172
|
+
content: null,
|
|
173
|
+
contentDirection: 'left',
|
|
174
|
+
invisible: false,
|
|
175
|
+
max: 99,
|
|
176
|
+
showZero: false,
|
|
177
|
+
size: 'medium',
|
|
178
|
+
style: {}
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
Breadcrumb: {
|
|
182
|
+
defaultProps: {
|
|
183
|
+
className: '',
|
|
184
|
+
color: 'default',
|
|
185
|
+
itemsAfterCollapse: 1,
|
|
186
|
+
itemsBeforeCollapse: 1,
|
|
187
|
+
maxItems: 8,
|
|
188
|
+
separator: 'ArrowRight',
|
|
189
|
+
size: 'medium',
|
|
190
|
+
style: {}
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
Button: {
|
|
194
|
+
defaultProps: {
|
|
195
|
+
className: '',
|
|
196
|
+
color: 'default',
|
|
197
|
+
disabled: false,
|
|
198
|
+
label: '',
|
|
199
|
+
loading: false,
|
|
200
|
+
size: 'medium',
|
|
201
|
+
stopPropagation: true,
|
|
202
|
+
viewType: 'text'
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
ButtonIcon: {
|
|
206
|
+
defaultProps: {
|
|
207
|
+
circular: false,
|
|
208
|
+
className: '',
|
|
209
|
+
color: 'default',
|
|
210
|
+
colorHover: 'system/active',
|
|
211
|
+
disabled: false,
|
|
212
|
+
size: 'medium',
|
|
213
|
+
viewBox: true,
|
|
214
|
+
viewType: 'outlined'
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
ButtonMore: {
|
|
218
|
+
defaultProps: {
|
|
219
|
+
buttonProps: {},
|
|
220
|
+
className: '',
|
|
221
|
+
disabled: false,
|
|
222
|
+
options: [],
|
|
223
|
+
optionType: 'full',
|
|
224
|
+
style: {}
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
Calendar: {
|
|
228
|
+
defaultProps: {
|
|
229
|
+
actions: null,
|
|
230
|
+
defaultValue: new Date(),
|
|
231
|
+
displayAnotherMonth: true
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
CalendarRange: {
|
|
235
|
+
defaultProps: {
|
|
236
|
+
actions: null,
|
|
237
|
+
displayAnotherMonth: true
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
Card: {
|
|
241
|
+
defaultProps: {
|
|
242
|
+
bodyStyle: {},
|
|
243
|
+
className: '',
|
|
244
|
+
dividerColor: 'line/category',
|
|
245
|
+
direction: 'vertical',
|
|
246
|
+
footerDivider: false,
|
|
247
|
+
footerStyle: {},
|
|
248
|
+
headerDivider: true,
|
|
249
|
+
headerStyle: {},
|
|
250
|
+
style: {},
|
|
251
|
+
width: 258,
|
|
252
|
+
height: 'max-content'
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
CardBody: {
|
|
256
|
+
defaultProps: {
|
|
257
|
+
className: '',
|
|
258
|
+
style: {}
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
CardExtra: {
|
|
262
|
+
defaultProps: {
|
|
263
|
+
className: '',
|
|
264
|
+
style: {}
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
CardFooter: {
|
|
268
|
+
defaultProps: {
|
|
269
|
+
className: '',
|
|
270
|
+
style: {}
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
CardHeader: {
|
|
274
|
+
defaultProps: {
|
|
275
|
+
className: '',
|
|
276
|
+
style: {}
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
Checkbox: {
|
|
280
|
+
defaultProps: {
|
|
281
|
+
className: '',
|
|
282
|
+
color: 'primary',
|
|
283
|
+
defaultChecked: false,
|
|
284
|
+
determinate: true,
|
|
285
|
+
disabled: false,
|
|
286
|
+
inputProps: {},
|
|
287
|
+
label: '',
|
|
288
|
+
labelProps: {},
|
|
289
|
+
readOnly: false,
|
|
290
|
+
stopPropagation: true,
|
|
291
|
+
width: 18
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
Chip: {
|
|
295
|
+
defaultProps: {
|
|
296
|
+
viewType: 'outlined',
|
|
297
|
+
size: 'medium',
|
|
298
|
+
color: 'default'
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
Col: {
|
|
302
|
+
defaultProps: {
|
|
303
|
+
className: '',
|
|
304
|
+
columns: 12,
|
|
305
|
+
lg: false,
|
|
306
|
+
md: false,
|
|
307
|
+
sm: false,
|
|
308
|
+
style: {},
|
|
309
|
+
verticalAlign: 'auto',
|
|
310
|
+
wrap: 'wrap',
|
|
311
|
+
xl: false,
|
|
312
|
+
xs: true,
|
|
313
|
+
zeroMinWidth: false
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
Container: {
|
|
317
|
+
defaultProps: {
|
|
318
|
+
className: '',
|
|
319
|
+
columns: 12,
|
|
320
|
+
columnSpacing: {
|
|
321
|
+
xs: 4,
|
|
322
|
+
sm: 4,
|
|
323
|
+
md: 4,
|
|
324
|
+
lg: 4,
|
|
325
|
+
xl: 6
|
|
326
|
+
},
|
|
327
|
+
direction: 'row',
|
|
328
|
+
lg: false,
|
|
329
|
+
md: false,
|
|
330
|
+
rowSpacing: {
|
|
331
|
+
xs: 4,
|
|
332
|
+
sm: 4,
|
|
333
|
+
md: 4,
|
|
334
|
+
lg: 4,
|
|
335
|
+
xl: 4
|
|
336
|
+
},
|
|
337
|
+
sm: false,
|
|
338
|
+
spacing: 0,
|
|
339
|
+
style: {},
|
|
340
|
+
topSpacing: {
|
|
341
|
+
xs: 2,
|
|
342
|
+
sm: 2,
|
|
343
|
+
md: 2,
|
|
344
|
+
lg: 2,
|
|
345
|
+
xl: 2
|
|
346
|
+
},
|
|
347
|
+
wrap: 'wrap',
|
|
348
|
+
xl: false,
|
|
349
|
+
xs: false,
|
|
350
|
+
zeroMinWidth: false
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
DatePicker: {
|
|
354
|
+
defaultProps: {
|
|
355
|
+
actionIconAt: 'end',
|
|
356
|
+
clearAble: false,
|
|
357
|
+
controls: false,
|
|
358
|
+
disabled: false,
|
|
359
|
+
displayAnotherMonth: true,
|
|
360
|
+
displayFormat: locale.get() === 'vi' ? 'DD/MM/YYYY' : 'MM/DD/YYYY',
|
|
361
|
+
pressESCToClose: true,
|
|
362
|
+
readOnly: false,
|
|
363
|
+
required: false,
|
|
364
|
+
returnFormat: 'YYYY-MM-DD',
|
|
365
|
+
textAlign: 'start',
|
|
366
|
+
viewType: 'underlined'
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
DateRangePicker: {
|
|
370
|
+
defaultProps: {
|
|
371
|
+
actionIconAt: 'end',
|
|
372
|
+
clearAble: false,
|
|
373
|
+
controls: false,
|
|
374
|
+
disabled: false,
|
|
375
|
+
displayFormat: 'DD/MM/YY',
|
|
376
|
+
onShowTooltip: true,
|
|
377
|
+
pressESCToClose: true,
|
|
378
|
+
readOnly: false,
|
|
379
|
+
required: false,
|
|
380
|
+
returnFormat: 'YYYY-MM-DD',
|
|
381
|
+
showUnitCount: true,
|
|
382
|
+
startFromZero: false,
|
|
383
|
+
textAlign: 'start',
|
|
384
|
+
unitCount: 'day',
|
|
385
|
+
viewType: 'underlined'
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
Divider: {
|
|
389
|
+
defaultProps: {
|
|
390
|
+
className: '',
|
|
391
|
+
color: 'system/disabled',
|
|
392
|
+
direction: 'horizontal',
|
|
393
|
+
style: {}
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
Dropdown: {
|
|
397
|
+
defaultProps: {
|
|
398
|
+
allowSearch: true,
|
|
399
|
+
className: '',
|
|
400
|
+
clearAble: false,
|
|
401
|
+
dataSource: [],
|
|
402
|
+
disabled: false,
|
|
403
|
+
displayExpr: 'name',
|
|
404
|
+
error: '',
|
|
405
|
+
iconExpr: 'none',
|
|
406
|
+
inputProps: {},
|
|
407
|
+
itemMode: 'normal',
|
|
408
|
+
label: '',
|
|
409
|
+
limit: 50,
|
|
410
|
+
loading: false,
|
|
411
|
+
multilineSelectedItem: false,
|
|
412
|
+
multiple: false,
|
|
413
|
+
noDataText: getGlobal('noDataText'),
|
|
414
|
+
placeholder: getGlobal('dropdownPlaceholder'),
|
|
415
|
+
readOnly: false,
|
|
416
|
+
required: false,
|
|
417
|
+
searchDelayTime: getGlobal('delayOnInput'),
|
|
418
|
+
searchMode: 'contains',
|
|
419
|
+
total: Number.MAX_SAFE_INTEGER,
|
|
420
|
+
valueExpr: 'id',
|
|
421
|
+
viewType: 'underlined'
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
DropdownBox: {
|
|
425
|
+
defaultProps: {
|
|
426
|
+
className: '',
|
|
427
|
+
label: '',
|
|
428
|
+
placeholder: '',
|
|
429
|
+
startIcon: 'Search',
|
|
430
|
+
endIcon: 'ArrowDown',
|
|
431
|
+
openOnClickAt: 'icon',
|
|
432
|
+
viewType: 'underlined',
|
|
433
|
+
inputProps: {},
|
|
434
|
+
delayOnInput: 700
|
|
435
|
+
}
|
|
436
|
+
},
|
|
437
|
+
Grid: {
|
|
438
|
+
defaultProps: {
|
|
439
|
+
className: '',
|
|
440
|
+
columns: 12,
|
|
441
|
+
container: false,
|
|
442
|
+
direction: 'row',
|
|
443
|
+
item: false,
|
|
444
|
+
lg: false,
|
|
445
|
+
md: false,
|
|
446
|
+
sm: false,
|
|
447
|
+
spacing: 0,
|
|
448
|
+
style: {},
|
|
449
|
+
verticalAlign: 'auto',
|
|
450
|
+
wrap: 'wrap',
|
|
451
|
+
xl: false,
|
|
452
|
+
xs: false,
|
|
453
|
+
zeroMinWidth: false
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
HelperText: {
|
|
457
|
+
defaultProps: {
|
|
458
|
+
disabled: false,
|
|
459
|
+
status: 'default',
|
|
460
|
+
className: '',
|
|
461
|
+
style: {},
|
|
462
|
+
children: ''
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
Image: {
|
|
466
|
+
defaultProps: {
|
|
467
|
+
circular: false,
|
|
468
|
+
className: '',
|
|
469
|
+
height: 200,
|
|
470
|
+
lazyLoading: false,
|
|
471
|
+
objectFit: 'cover',
|
|
472
|
+
style: {},
|
|
473
|
+
width: 200
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
InputBase: {
|
|
477
|
+
defaultProps: {
|
|
478
|
+
autoComplete: 'off',
|
|
479
|
+
autoFocus: false,
|
|
480
|
+
className: '',
|
|
481
|
+
defaultValue: '',
|
|
482
|
+
delayOnChange: getGlobal('delayOnInput'),
|
|
483
|
+
disabled: false,
|
|
484
|
+
endIconProps: {},
|
|
485
|
+
hoverTooltip: false,
|
|
486
|
+
iconStyle: {},
|
|
487
|
+
inputProps: {},
|
|
488
|
+
inputStyle: {},
|
|
489
|
+
multiline: false,
|
|
490
|
+
nonStyle: false,
|
|
491
|
+
placeholder: getGlobal('inputPlaceholder'),
|
|
492
|
+
readOnly: false,
|
|
493
|
+
required: false,
|
|
494
|
+
resize: 'none',
|
|
495
|
+
startIconProps: {},
|
|
496
|
+
status: 'default',
|
|
497
|
+
type: 'text',
|
|
498
|
+
viewType: 'underlined'
|
|
499
|
+
}
|
|
500
|
+
},
|
|
501
|
+
Label: {
|
|
502
|
+
defaultProps: {
|
|
503
|
+
children: '',
|
|
504
|
+
className: '',
|
|
505
|
+
color: 'text/label',
|
|
506
|
+
disabled: false,
|
|
507
|
+
lineClamp: 1,
|
|
508
|
+
readOnly: false,
|
|
509
|
+
required: false,
|
|
510
|
+
type: 'h6'
|
|
511
|
+
}
|
|
512
|
+
},
|
|
513
|
+
Modal: {
|
|
514
|
+
defaultProps: {
|
|
515
|
+
alignment: 'top',
|
|
516
|
+
autoFocus: true,
|
|
517
|
+
className: '',
|
|
518
|
+
dragAnyWhere: false,
|
|
519
|
+
moveable: false,
|
|
520
|
+
moveOutScreen: false,
|
|
521
|
+
open: false,
|
|
522
|
+
pressESCToClose: true,
|
|
523
|
+
style: {},
|
|
524
|
+
width: '80%'
|
|
525
|
+
}
|
|
526
|
+
},
|
|
527
|
+
ModalBody: {
|
|
528
|
+
defaultProps: {
|
|
529
|
+
className: '',
|
|
530
|
+
style: {}
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
ModalFooter: {
|
|
534
|
+
defaultProps: {
|
|
535
|
+
boxShadow: '0px -1px 1px rgba(0, 0, 0, 0.25)',
|
|
536
|
+
className: '',
|
|
537
|
+
style: {}
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
ModalHeader: {
|
|
541
|
+
defaultProps: {
|
|
542
|
+
className: '',
|
|
543
|
+
showClose: true,
|
|
544
|
+
style: {},
|
|
545
|
+
title: ''
|
|
546
|
+
}
|
|
547
|
+
},
|
|
548
|
+
MoneyInput: {
|
|
549
|
+
defaultProps: {
|
|
550
|
+
allowZero: false,
|
|
551
|
+
autoFocus: false,
|
|
552
|
+
className: '',
|
|
553
|
+
convertToWords: false,
|
|
554
|
+
disabled: false,
|
|
555
|
+
disabledNegative: false,
|
|
556
|
+
endIcon: '',
|
|
557
|
+
error: '',
|
|
558
|
+
inputProps: {},
|
|
559
|
+
label: '',
|
|
560
|
+
multiline: false,
|
|
561
|
+
nonStyle: false,
|
|
562
|
+
readOnly: false,
|
|
563
|
+
required: false,
|
|
564
|
+
startIcon: '',
|
|
565
|
+
thousandSeparator: false,
|
|
566
|
+
valueTypeReturn: 'number',
|
|
567
|
+
viewType: 'underlined'
|
|
568
|
+
}
|
|
569
|
+
},
|
|
570
|
+
Notify: {
|
|
571
|
+
defaultProps: {
|
|
572
|
+
className: '',
|
|
573
|
+
position: {
|
|
574
|
+
vertical: 'bottom',
|
|
575
|
+
horizontal: 'center'
|
|
576
|
+
},
|
|
577
|
+
style: {}
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
NumberInput: {
|
|
581
|
+
defaultProps: {
|
|
582
|
+
autoFocus: false,
|
|
583
|
+
className: '',
|
|
584
|
+
decimalDigit: Infinity,
|
|
585
|
+
decimalSymbol: locale.get() === 'vi' ? ',' : '.',
|
|
586
|
+
disabled: false,
|
|
587
|
+
disabledNegative: false,
|
|
588
|
+
endIcon: '',
|
|
589
|
+
error: '',
|
|
590
|
+
fixedDecimalDigit: false,
|
|
591
|
+
label: '',
|
|
592
|
+
max: Infinity,
|
|
593
|
+
min: -Infinity,
|
|
594
|
+
readOnly: false,
|
|
595
|
+
required: false,
|
|
596
|
+
startIcon: '',
|
|
597
|
+
step: 1,
|
|
598
|
+
style: {},
|
|
599
|
+
thousandSeparator: false,
|
|
600
|
+
viewType: 'underlined'
|
|
601
|
+
}
|
|
602
|
+
},
|
|
603
|
+
PasswordInput: {
|
|
604
|
+
defaultProps: {
|
|
605
|
+
autoComplete: 'new-password',
|
|
606
|
+
autoFocus: false,
|
|
607
|
+
autoWidth: false,
|
|
608
|
+
className: '',
|
|
609
|
+
defaultValue: '',
|
|
610
|
+
disabled: false,
|
|
611
|
+
error: '',
|
|
612
|
+
label: '',
|
|
613
|
+
readOnly: false,
|
|
614
|
+
required: false,
|
|
615
|
+
status: 'default',
|
|
616
|
+
viewType: 'underlined',
|
|
617
|
+
visibilityToggle: true
|
|
618
|
+
}
|
|
619
|
+
},
|
|
620
|
+
Popover: {
|
|
621
|
+
defaultProps: {
|
|
622
|
+
anchorOrigin: {
|
|
623
|
+
vertical: 'bottom',
|
|
624
|
+
horizontal: 'center'
|
|
625
|
+
},
|
|
626
|
+
arrow: false,
|
|
627
|
+
bgColor: 'system/standard',
|
|
628
|
+
className: '',
|
|
629
|
+
clickOutsideToClose: true,
|
|
630
|
+
fullScreen: true,
|
|
631
|
+
height: 'max-content',
|
|
632
|
+
pressESCToClose: true,
|
|
633
|
+
style: {},
|
|
634
|
+
transformOrigin: {
|
|
635
|
+
vertical: 'top',
|
|
636
|
+
horizontal: 'center'
|
|
637
|
+
},
|
|
638
|
+
trigger: 'click',
|
|
639
|
+
width: 'max-content'
|
|
640
|
+
}
|
|
641
|
+
},
|
|
642
|
+
Radio: {
|
|
643
|
+
defaultProps: {
|
|
644
|
+
disabled: false,
|
|
645
|
+
readOnly: false,
|
|
646
|
+
defaultChecked: false,
|
|
647
|
+
className: '',
|
|
648
|
+
width: 20,
|
|
649
|
+
labelProps: {}
|
|
650
|
+
}
|
|
651
|
+
},
|
|
652
|
+
Row: {
|
|
653
|
+
defaultProps: {
|
|
654
|
+
className: '',
|
|
655
|
+
columns: 12,
|
|
656
|
+
columnSpacing: {
|
|
657
|
+
xs: 4,
|
|
658
|
+
sm: 4,
|
|
659
|
+
md: 4,
|
|
660
|
+
lg: 4,
|
|
661
|
+
xl: 6
|
|
662
|
+
},
|
|
663
|
+
direction: 'row',
|
|
664
|
+
lg: false,
|
|
665
|
+
md: false,
|
|
666
|
+
rowSpacing: {
|
|
667
|
+
xs: 4,
|
|
668
|
+
sm: 4,
|
|
669
|
+
md: 4,
|
|
670
|
+
lg: 4,
|
|
671
|
+
xl: 4
|
|
672
|
+
},
|
|
673
|
+
sm: false,
|
|
674
|
+
spacing: 0,
|
|
675
|
+
style: {},
|
|
676
|
+
wrap: 'wrap',
|
|
677
|
+
xl: false,
|
|
678
|
+
xs: false,
|
|
679
|
+
zeroMinWidth: false
|
|
680
|
+
}
|
|
681
|
+
},
|
|
682
|
+
TextInput: {
|
|
683
|
+
defaultProps: {
|
|
684
|
+
autoComplete: 'off',
|
|
685
|
+
autoFocus: false,
|
|
686
|
+
autoWidth: false,
|
|
687
|
+
className: '',
|
|
688
|
+
defaultValue: '',
|
|
689
|
+
disabled: false,
|
|
690
|
+
hoverTooltip: false,
|
|
691
|
+
error: '',
|
|
692
|
+
label: '',
|
|
693
|
+
multiline: false,
|
|
694
|
+
readOnly: false,
|
|
695
|
+
required: false,
|
|
696
|
+
status: 'default',
|
|
697
|
+
type: 'text',
|
|
698
|
+
viewType: 'underlined'
|
|
699
|
+
}
|
|
700
|
+
},
|
|
701
|
+
Toggle: {
|
|
702
|
+
defaultProps: {
|
|
703
|
+
disabled: false,
|
|
704
|
+
readOnly: false,
|
|
705
|
+
defaultChecked: false,
|
|
706
|
+
label: '',
|
|
707
|
+
value: '',
|
|
708
|
+
id: '',
|
|
709
|
+
width: 40,
|
|
710
|
+
height: 20,
|
|
711
|
+
lineClamp: null,
|
|
712
|
+
required: false
|
|
713
|
+
}
|
|
714
|
+
},
|
|
715
|
+
TreeView: {
|
|
716
|
+
defaultProps: {
|
|
717
|
+
allowSearch: false,
|
|
718
|
+
autoExpandToResult: true,
|
|
719
|
+
className: '',
|
|
720
|
+
dataSource: [],
|
|
721
|
+
disabled: false,
|
|
722
|
+
disabledBoldResult: false,
|
|
723
|
+
disabledRelevantValue: false,
|
|
724
|
+
displayExpr: 'name',
|
|
725
|
+
expand: false,
|
|
726
|
+
expandIcon: 'ArrowDown',
|
|
727
|
+
id: 'id',
|
|
728
|
+
multiple: false,
|
|
729
|
+
multipleValueMode: 'multiple',
|
|
730
|
+
parentID: 'parentID',
|
|
731
|
+
renderAsyncFromLevel: 2,
|
|
732
|
+
renderAsyncWithLength: 200,
|
|
733
|
+
searchMode: 'contains',
|
|
734
|
+
searchProps: {},
|
|
735
|
+
selectAll: false,
|
|
736
|
+
selectAllLabel: getGlobal('selectAll'),
|
|
737
|
+
selectBox: false,
|
|
738
|
+
showChildrenOfResult: false,
|
|
739
|
+
showSelectedItems: false,
|
|
740
|
+
value: [],
|
|
741
|
+
valueExpr: ''
|
|
742
|
+
}
|
|
743
|
+
},
|
|
744
|
+
Typography: {
|
|
745
|
+
defaultProps: {
|
|
746
|
+
center: false,
|
|
747
|
+
className: '',
|
|
748
|
+
color: 'default',
|
|
749
|
+
format: [],
|
|
750
|
+
fullWidth: true,
|
|
751
|
+
hoverTooltip: false,
|
|
752
|
+
mapping: 'span',
|
|
753
|
+
tooltipDirection: 'bottom',
|
|
754
|
+
type: 'p1'
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
},
|
|
758
|
+
spacing: 4,
|
|
759
|
+
zIndex: 1500
|
|
72
760
|
};
|
|
761
|
+
export const useTheme = () => createTheme(settings);
|
|
762
|
+
export const useColor = settings.colors;
|
|
763
|
+
export const useTypography = settings.typography;
|
|
73
764
|
export default settings;
|