@xaypay/tui 0.0.114 → 0.0.116
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/index.es.js +359 -257
- package/dist/index.js +359 -257
- package/package.json +1 -1
- package/src/components/button/index.js +3 -2
- package/src/components/captcha/index.js +5 -4
- package/src/components/checkbox/checkbox.module.css +0 -59
- package/src/components/checkbox/checkbox.stories.js +70 -4
- package/src/components/checkbox/index.js +103 -70
- package/src/components/input/index.js +27 -7
- package/src/components/modal/index.js +15 -3
- package/src/components/newAutocomplete/index.js +4 -5
- package/src/components/newFile/index.js +45 -42
- package/src/components/pagination/index.js +9 -2
- package/src/components/select/index.js +4 -2
- package/src/components/singleCheckbox/Checkbox.js +30 -19
- package/src/components/singleCheckbox/index.js +15 -9
- package/src/components/stepper/index.js +9 -2
- package/src/components/table/index.js +45 -4
- package/src/components/table/table.stories.js +2 -11
- package/src/components/table/td.js +38 -5
- package/src/components/table/th.js +19 -3
- package/src/components/textarea/index.js +5 -1
- package/src/components/toaster/index.js +7 -2
- package/src/components/tooltip/index.js +3 -3
- package/src/components/typography/index.js +1 -1
- package/src/index.js +0 -1
- package/src/stories/configuration.stories.mdx +40 -3
- package/src/stories/static/checkbox-group-usage-2.png +0 -0
- package/src/stories/static/checkbox-group-usage.png +0 -0
- package/src/stories/static/single-checkbox-usage.png +0 -0
- package/src/stories/usage.stories.mdx +11 -1
- package/tui.config.js +39 -7
package/dist/index.es.js
CHANGED
|
@@ -84,9 +84,9 @@ function styleInject(css, ref) {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
var css_248z$
|
|
88
|
-
var styles$
|
|
89
|
-
styleInject(css_248z$
|
|
87
|
+
var css_248z$e = ".file-module_file-form__l13d5{align-items:center;background:#fbfbfb;border:2px dashed;border-radius:6px;cursor:pointer;display:flex;flex-direction:column;height:190px;justify-content:space-between;overflow:hidden;padding:4px 0;position:relative;width:100%}.file-module_file-form-wrap__qY--B:before{background:rgba(60,57,62,.4);border-radius:6px;content:\"\";height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition:opacity .24s;width:100%;z-index:1}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover:before{opacity:1;pointer-events:unset}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover .file-module_delete-upload-icon__PWN66{opacity:1}.file-module_file-form-inner-upload__tq3Dn{align-items:center;display:flex;flex-direction:column;justify-content:space-between;padding-bottom:16px;padding-top:48px}.file-module_file-form-inner-upload__tq3Dn>img{display:block;margin-bottom:14px}.file-module_upload-info__a8GFs{margin-bottom:40px;max-width:150px;text-align:center}.file-module_upload-info-txt__l11uN{color:#0da574}.file-module_file-form__l13d5.file-module_default__t7KU0{border-color:#d1d1d1}.file-module_file-form__l13d5.file-module_error__H-M4Z{border-color:#e00!important}.file-module_file-form__l13d5.file-module_accept__WTW6V{border-color:#00236a}.file-module_delete-upload-icon__PWN66{align-items:center;background:#fff;border-radius:6px;cursor:pointer;display:flex;height:26px;justify-content:center;opacity:0;position:absolute;right:10px;top:10px;transition:opacity .24s;width:26px;z-index:11}.file-module_delete-upload-icon__PWN66>i{color:#00236a;font-size:16px}.file-module_upload-file-content__QHMjn{align-items:center;display:flex;height:100%;justify-content:center;max-height:190px;overflow:hidden;position:relative;width:100%}.file-module_upload-file-content__QHMjn>img{display:block;height:auto;max-height:95%;object-fit:contain;width:27.8rem}.file-module_file-form-title__zWTSB{margin-bottom:10px;max-width:390px;word-break:break-all}.file-module_file-form-wrap__qY--B{position:relative;transform:translateZ(0)}";
|
|
88
|
+
var styles$c = {"file-form-wrap":"file-module_file-form-wrap__qY--B","file-form":"file-module_file-form__l13d5","active":"file-module_active__L1gPt","delete-upload-icon":"file-module_delete-upload-icon__PWN66","file-form-inner-upload":"file-module_file-form-inner-upload__tq3Dn","upload-info":"file-module_upload-info__a8GFs","upload-info-txt":"file-module_upload-info-txt__l11uN","default":"file-module_default__t7KU0","error":"file-module_error__H-M4Z","accept":"file-module_accept__WTW6V","upload-file-content":"file-module_upload-file-content__QHMjn","file-form-title":"file-module_file-form-title__zWTSB"};
|
|
89
|
+
styleInject(css_248z$e);
|
|
90
90
|
|
|
91
91
|
const File = ({
|
|
92
92
|
name,
|
|
@@ -146,11 +146,11 @@ const File = ({
|
|
|
146
146
|
document.querySelector(`.${name}`).value = '';
|
|
147
147
|
};
|
|
148
148
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("p", {
|
|
149
|
-
className: `${styles$
|
|
149
|
+
className: `${styles$c['file-form-title']} ile-form-title-rem`
|
|
150
150
|
}, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))), /*#__PURE__*/React__default.createElement("div", {
|
|
151
|
-
className: classnames(`${styles$
|
|
151
|
+
className: classnames(`${styles$c['file-form-wrap']} file-form-wrap-rem`, image ? styles$c['active'] : '')
|
|
152
152
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
153
|
-
className: `${styles$
|
|
153
|
+
className: `${styles$c['file-form']} file-form-rem ${error || errorMessage ? styles$c['error'] : ''}`,
|
|
154
154
|
onClick: () => document.querySelector(`.${name}`).click()
|
|
155
155
|
}, /*#__PURE__*/React__default.createElement("input", {
|
|
156
156
|
hidden: true,
|
|
@@ -159,23 +159,23 @@ const File = ({
|
|
|
159
159
|
disabled: disabled,
|
|
160
160
|
onChange: e => handleCheckFile(e)
|
|
161
161
|
}), image ? /*#__PURE__*/React__default.createElement("div", {
|
|
162
|
-
className: `${styles$
|
|
162
|
+
className: `${styles$c['upload-file-content']} upload-file-content-rem`
|
|
163
163
|
}, image === 'pdf' ? /*#__PURE__*/React__default.createElement(SvgPdf, null) : /*#__PURE__*/React__default.createElement("img", {
|
|
164
164
|
src: image,
|
|
165
165
|
alt: fileName
|
|
166
166
|
})) : /*#__PURE__*/React__default.createElement("div", {
|
|
167
|
-
className: `${styles$
|
|
167
|
+
className: `${styles$c['file-form-inner-upload']} ile-form-inner-upload-rem`
|
|
168
168
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
169
169
|
src: "../../assets/upload.svg",
|
|
170
170
|
alt: ""
|
|
171
171
|
}), /*#__PURE__*/React__default.createElement("span", {
|
|
172
|
-
className: `${styles$
|
|
172
|
+
className: `${styles$c['upload-info']} upload-info-rem`
|
|
173
173
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
174
|
-
className: `${styles$
|
|
174
|
+
className: `${styles$c['upload-info-txt']} upload-info-txt-rem`
|
|
175
175
|
}, "\u0532\u0565\u057C\u0576\u0565\u056C")), /*#__PURE__*/React__default.createElement("span", {
|
|
176
|
-
className: `${styles$
|
|
176
|
+
className: `${styles$c['upload-info-size']} upload-info-size-rem`
|
|
177
177
|
}, "\u0531\u057C\u0561\u057E\u0565\u056C\u0561\u0563\u0578\u0582\u0575\u0576\u0568 ", maxSize, "\u0544\u0532 ( ", fileExtensions.toString().split(',').join(', '), " )"))), !disabled && /*#__PURE__*/React__default.createElement("div", {
|
|
178
|
-
className: `${styles$
|
|
178
|
+
className: `${styles$c['delete-upload-icon']} delete-upload-icon-rem`,
|
|
179
179
|
onClick: handleRemoveFile
|
|
180
180
|
}, /*#__PURE__*/React__default.createElement("i", {
|
|
181
181
|
className: "icon-delete"
|
|
@@ -273,24 +273,24 @@ const SvgCheckboxChecked = ({
|
|
|
273
273
|
const Checkbox$1 = ({
|
|
274
274
|
data,
|
|
275
275
|
index,
|
|
276
|
+
label,
|
|
276
277
|
styles,
|
|
277
278
|
checked,
|
|
278
279
|
disabled,
|
|
279
280
|
innerIndex,
|
|
281
|
+
checkedIcon,
|
|
280
282
|
checkedColor,
|
|
283
|
+
unCheckedIcon,
|
|
281
284
|
handleChecked,
|
|
282
285
|
unCheckedColor,
|
|
286
|
+
labelMarginLeft,
|
|
283
287
|
ignoreDisabledForChecked
|
|
284
288
|
}) => {
|
|
285
289
|
const configStyles = compereConfigs();
|
|
286
290
|
const [innerChecked, setInnerChecked] = useState(false);
|
|
287
291
|
const [innerDisabled, setInnerDisabled] = useState(false);
|
|
288
292
|
const handleClick = e => {
|
|
289
|
-
|
|
290
|
-
handleChecked(data, e, index, innerIndex);
|
|
291
|
-
} else {
|
|
292
|
-
handleChecked(data, e);
|
|
293
|
-
}
|
|
293
|
+
handleChecked(data, e, index, innerIndex);
|
|
294
294
|
};
|
|
295
295
|
useEffect(() => {
|
|
296
296
|
setInnerDisabled(disabled);
|
|
@@ -298,83 +298,103 @@ const Checkbox$1 = ({
|
|
|
298
298
|
useEffect(() => {
|
|
299
299
|
setInnerChecked(checked);
|
|
300
300
|
}, [checked]);
|
|
301
|
+
useEffect(() => {
|
|
302
|
+
if (index && typeof index !== 'number') {
|
|
303
|
+
alert('Please set index value as valid number');
|
|
304
|
+
}
|
|
305
|
+
}, [index]);
|
|
306
|
+
useEffect(() => {
|
|
307
|
+
if (innerIndex && typeof innerIndex !== 'number') {
|
|
308
|
+
alert('Please set index value as valid number');
|
|
309
|
+
}
|
|
310
|
+
}, [innerIndex]);
|
|
301
311
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
302
312
|
style: {
|
|
303
|
-
width: '16px',
|
|
313
|
+
width: label ? 'fit-content' : '16px',
|
|
304
314
|
height: '16px',
|
|
305
315
|
marginRight: '9px',
|
|
306
|
-
display: 'inline-block',
|
|
316
|
+
display: label ? 'flex' : 'inline-block',
|
|
307
317
|
cursor: !innerDisabled ? 'pointer' : 'not-allowed',
|
|
308
318
|
...styles
|
|
309
319
|
},
|
|
310
320
|
onClick: !innerDisabled && handleChecked ? handleClick : _ => _
|
|
311
|
-
}, innerChecked && (ignoreDisabledForChecked ? ignoreDisabledForChecked : !innerDisabled) ? /*#__PURE__*/React__default.createElement(SvgCheckboxChecked, {
|
|
312
|
-
fillColor: checkedColor ? checkedColor : configStyles.
|
|
313
|
-
}) : /*#__PURE__*/React__default.createElement(SvgCheckboxUnchecked, {
|
|
314
|
-
fillColor: unCheckedColor ? unCheckedColor : configStyles.
|
|
315
|
-
}),
|
|
321
|
+
}, innerChecked && (ignoreDisabledForChecked ? ignoreDisabledForChecked : !innerDisabled) ? checkedIcon ? checkedIcon : /*#__PURE__*/React__default.createElement(SvgCheckboxChecked, {
|
|
322
|
+
fillColor: checkedColor ? checkedColor : configStyles.CHECKBOX.checkedColor
|
|
323
|
+
}) : unCheckedIcon ? unCheckedIcon : /*#__PURE__*/React__default.createElement(SvgCheckboxUnchecked, {
|
|
324
|
+
fillColor: unCheckedColor ? unCheckedColor : configStyles.CHECKBOX.unCheckedColor
|
|
325
|
+
}), label && /*#__PURE__*/React__default.createElement("span", {
|
|
326
|
+
style: {
|
|
327
|
+
marginLeft: labelMarginLeft
|
|
328
|
+
}
|
|
329
|
+
}, label));
|
|
316
330
|
};
|
|
317
331
|
|
|
318
332
|
const SingleCheckbox = ({
|
|
319
333
|
data,
|
|
320
334
|
index,
|
|
335
|
+
label,
|
|
321
336
|
styles,
|
|
322
337
|
checked,
|
|
323
338
|
disabled,
|
|
324
339
|
innerIndex,
|
|
340
|
+
checkedIcon,
|
|
325
341
|
checkedColor,
|
|
342
|
+
unCheckedIcon,
|
|
326
343
|
handleChecked,
|
|
327
344
|
unCheckedColor,
|
|
345
|
+
labelMarginLeft,
|
|
328
346
|
ignoreDisabledForChecked
|
|
329
347
|
}) => {
|
|
348
|
+
const configStyles = compereConfigs();
|
|
330
349
|
const [innerData, setInnerData] = useState(null);
|
|
331
350
|
useEffect(() => {
|
|
332
|
-
// if (data) {
|
|
333
|
-
// if (typeof data === 'object' && data.constructor === Object) {
|
|
334
|
-
// setInnerData(data);
|
|
335
|
-
// } else {
|
|
336
|
-
// alert('Data props on Checkbox component must be an object');
|
|
337
|
-
// }
|
|
338
|
-
// } else {
|
|
339
|
-
// alert('Please add data props on Checkbox component');
|
|
340
|
-
// }
|
|
341
351
|
setInnerData(data);
|
|
342
352
|
}, [data]);
|
|
343
353
|
return /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
344
354
|
index: index,
|
|
355
|
+
label: label,
|
|
345
356
|
styles: styles,
|
|
346
357
|
data: innerData,
|
|
347
358
|
checked: checked,
|
|
348
359
|
disabled: disabled,
|
|
349
360
|
innerIndex: innerIndex,
|
|
361
|
+
checkedIcon: checkedIcon,
|
|
350
362
|
checkedColor: checkedColor,
|
|
363
|
+
unCheckedIcon: unCheckedIcon,
|
|
351
364
|
handleChecked: handleChecked,
|
|
352
365
|
unCheckedColor: unCheckedColor,
|
|
353
|
-
ignoreDisabledForChecked: ignoreDisabledForChecked
|
|
366
|
+
ignoreDisabledForChecked: ignoreDisabledForChecked,
|
|
367
|
+
labelMarginLeft: labelMarginLeft ? labelMarginLeft : configStyles.CHECKBOX.labelMarginLeft
|
|
354
368
|
});
|
|
355
369
|
};
|
|
356
370
|
SingleCheckbox.propTypes = {
|
|
357
371
|
data: PropTypes.object,
|
|
372
|
+
label: PropTypes.string,
|
|
358
373
|
onClick: PropTypes.func,
|
|
359
374
|
index: PropTypes.number,
|
|
360
375
|
styles: PropTypes.object,
|
|
361
376
|
disabled: PropTypes.bool,
|
|
362
377
|
innerIndex: PropTypes.number,
|
|
363
378
|
checkedColor: PropTypes.string,
|
|
379
|
+
checkedIcon: PropTypes.element,
|
|
380
|
+
unCheckedIcon: PropTypes.element,
|
|
364
381
|
unCheckedColor: PropTypes.string,
|
|
382
|
+
labelMarginLeft: PropTypes.string,
|
|
365
383
|
ignoreDisabledForChecked: PropTypes.bool
|
|
366
384
|
};
|
|
367
385
|
|
|
368
|
-
var css_248z$
|
|
369
|
-
var styles$
|
|
370
|
-
styleInject(css_248z$
|
|
386
|
+
var css_248z$d = ".table-module_sorting-arrows__BaN-G:after{content:\"▲\";font-size:11px;position:absolute;right:0;top:calc(50% - 12px)}.table-module_sorting-arrows__BaN-G:before{bottom:calc(50% - 12px);content:\"▼\";font-size:11px;position:absolute;right:0}.table-module_td-span__XHo6k{display:inline-block;position:relative}.table-module_td-span__XHo6k>svg{left:0;position:absolute;top:0;z-index:-1}.table-module_list-text__kmKIq{cursor:pointer;margin:0 0 8px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.table-module_dots-option-item__jNOxO{box-sizing:border-box;cursor:pointer;display:flex;height:39px;margin-bottom:2px;padding:10px;position:relative;width:100%}.table-module_dots-option-item__jNOxO:after{background-color:#eee;border-radius:1px;-webkit-border-radius:1px;-moz-border-radius:1px;-ms-border-radius:1px;-o-border-radius:1px;content:\"\";height:2px;left:10px;position:absolute;top:calc(100% - 2px);width:calc(100% - 20px)}.table-module_dots-option-item__jNOxO:last-child:after{display:none}";
|
|
387
|
+
var styles$b = {"sorting-arrows":"table-module_sorting-arrows__BaN-G","td-span":"table-module_td-span__XHo6k","list-text":"table-module_list-text__kmKIq","dots-option-item":"table-module_dots-option-item__jNOxO"};
|
|
388
|
+
styleInject(css_248z$d);
|
|
371
389
|
|
|
372
390
|
/* eslint-disable no-prototype-builtins */
|
|
373
391
|
const TH = ({
|
|
374
392
|
item,
|
|
393
|
+
hideBorder,
|
|
375
394
|
tHeadFamily,
|
|
376
395
|
tHeadPadding,
|
|
377
396
|
tHeadFontSize,
|
|
397
|
+
tHeadTextAlign,
|
|
378
398
|
tHeadFontWeight,
|
|
379
399
|
handleCheckedHeader,
|
|
380
400
|
borderTopLeftRadius,
|
|
@@ -398,19 +418,19 @@ const TH = ({
|
|
|
398
418
|
fontFamily: tHeadFamily,
|
|
399
419
|
fontWeight: tHeadFontWeight,
|
|
400
420
|
borderTopLeftRadius: borderTopLeftRadius,
|
|
401
|
-
borderTopRightRadius: borderTopRightRadius
|
|
421
|
+
borderTopRightRadius: borderTopRightRadius,
|
|
422
|
+
borderColor: hideBorder ? 'transparent' : '#eeeeee'
|
|
402
423
|
},
|
|
403
424
|
onClick: handleHeaderItemClick,
|
|
404
|
-
className: `${item.sortingArrows
|
|
425
|
+
className: `${hasOwnerProperty(item, 'sortingArrows') ? item.sortingArrows === true ? styles$b['sorting-arrows'] : '' : ''}`
|
|
405
426
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
406
427
|
style: {
|
|
407
428
|
display: 'flex',
|
|
408
429
|
alignItems: 'flex-start',
|
|
409
|
-
justifyContent: hasOwnerProperty(item, 'checkBox') ? 'space-between' : 'center'
|
|
430
|
+
justifyContent: hasOwnerProperty(item, 'checkBox') ? 'space-between' : tHeadTextAlign ? tHeadTextAlign === 'left' ? 'flex-start' : tHeadTextAlign === 'right' ? 'flex-end' : 'center' : 'center'
|
|
410
431
|
}
|
|
411
432
|
}, hasOwnerProperty(item, 'checkBox') ? /*#__PURE__*/React__default.createElement(SingleCheckbox, {
|
|
412
433
|
data: item,
|
|
413
|
-
float: "left",
|
|
414
434
|
checked: item.checkBox.checked,
|
|
415
435
|
disabled: item.checkBox.disabled,
|
|
416
436
|
handleChecked: !item.checkBox.disabled ? handleCheckedHeader : _ => _,
|
|
@@ -425,8 +445,12 @@ const TH = ({
|
|
|
425
445
|
};
|
|
426
446
|
|
|
427
447
|
const TD = ({
|
|
448
|
+
row,
|
|
428
449
|
item,
|
|
429
450
|
index,
|
|
451
|
+
rowItem,
|
|
452
|
+
rowRadius,
|
|
453
|
+
hideBorder,
|
|
430
454
|
innerIndex,
|
|
431
455
|
tBodyColor,
|
|
432
456
|
borderRight,
|
|
@@ -494,7 +518,12 @@ const TD = ({
|
|
|
494
518
|
textAlign: tBodyTextAlign,
|
|
495
519
|
fontFamily: tBodyFontFamily,
|
|
496
520
|
fontWeight: tBodyFontWeight,
|
|
497
|
-
|
|
521
|
+
borderColor: hideBorder ? 'transparent' : '#eeeeee',
|
|
522
|
+
boxShadow: hasOwnerProperty(item, 'colorStatus') ? `inset 3px 0px 0px 0px ${item.colorStatus}` : '',
|
|
523
|
+
borderTopLeftRadius: rowItem && innerIndex === 0 ? rowRadius : '0px',
|
|
524
|
+
borderBottomLeftRadius: rowItem && innerIndex === 0 ? rowRadius : '0px',
|
|
525
|
+
borderTopRightRadius: rowItem && innerIndex === row.length - 1 ? rowRadius : '0px',
|
|
526
|
+
borderBottomRightRadius: rowItem && innerIndex === row.length - 1 ? rowRadius : '0px'
|
|
498
527
|
}
|
|
499
528
|
}, Array.isArray(item) ? item.length > 0 ? item.map((newItem, newIndex) => {
|
|
500
529
|
if (newItem && !Array.isArray(newItem) && typeof newItem === 'object') {
|
|
@@ -507,10 +536,10 @@ const TD = ({
|
|
|
507
536
|
},
|
|
508
537
|
id: newItem.id,
|
|
509
538
|
type: newItem.type,
|
|
510
|
-
className: styles$
|
|
539
|
+
className: styles$b['td-span'],
|
|
511
540
|
key: `${newItem.id}_${newIndex}`,
|
|
512
541
|
onClick: e => handleCheckActions(e, newItem, 'type', newIndex)
|
|
513
|
-
}, newItem.content);
|
|
542
|
+
}, newItem.content === 0 ? newItem.content.toString() : newItem.content ? newItem.content : '');
|
|
514
543
|
} else if (newItem && Array.isArray(newItem)) {
|
|
515
544
|
return /*#__PURE__*/React__default.createElement("span", {
|
|
516
545
|
key: `${newItem.id}_${newIndex}`,
|
|
@@ -529,10 +558,10 @@ const TD = ({
|
|
|
529
558
|
},
|
|
530
559
|
id: iT.id ? iT.id : '',
|
|
531
560
|
type: iT.type ? iT.type : '',
|
|
532
|
-
className: styles$
|
|
561
|
+
className: styles$b['td-span'],
|
|
533
562
|
onClick: e => handleCheckActions(e, iT, 'type', iN),
|
|
534
563
|
key: `${iT.id || iT.content}_${iN}`
|
|
535
|
-
}, iT.content);
|
|
564
|
+
}, iT.content === 0 ? iT.content.toString() : iT.content ? iT.content : '');
|
|
536
565
|
}));
|
|
537
566
|
} else {
|
|
538
567
|
return /*#__PURE__*/React__default.createElement("span", {
|
|
@@ -543,7 +572,7 @@ const TD = ({
|
|
|
543
572
|
style: {
|
|
544
573
|
display: 'flex',
|
|
545
574
|
alignItems: 'flex-start',
|
|
546
|
-
justifyContent: hasOwnerProperty(item, 'checkBox') ? 'space-between' : 'center'
|
|
575
|
+
justifyContent: hasOwnerProperty(item, 'checkBox') ? 'space-between' : tBodyTextAlign ? tBodyTextAlign === 'left' ? 'flex-start' : tBodyTextAlign === 'right' ? 'flex-end' : 'center' : 'center'
|
|
547
576
|
}
|
|
548
577
|
}, !hasOwnerProperty(item, 'hideArrow') && item.hideArrow !== false && (!hasOwnerProperty(item, 'rightArrow') || item.rightArrow !== true) ? hasOwnerProperty(item, 'contentList') && (hasOwnerProperty(item, 'closeArrow') || hasOwnerProperty(item, 'openArrow')) && /*#__PURE__*/React__default.createElement("div", {
|
|
549
578
|
id: item.id,
|
|
@@ -553,7 +582,7 @@ const TD = ({
|
|
|
553
582
|
cursor: 'pointer'
|
|
554
583
|
},
|
|
555
584
|
onClick: () => handleOpenCloseRowSingleArrow(index, innerIndex, item),
|
|
556
|
-
className: styles$
|
|
585
|
+
className: styles$b['td-span']
|
|
557
586
|
}, hasOwnerProperty(item, 'status') && item.status === 'close' ? item.closeArrow : item.openArrow) : '', hasOwnerProperty(item, 'checkBox') && /*#__PURE__*/React__default.createElement(SingleCheckbox, {
|
|
558
587
|
data: item,
|
|
559
588
|
index: index,
|
|
@@ -598,7 +627,7 @@ const TD = ({
|
|
|
598
627
|
}, hasOwnerProperty(item, 'options') && item.options.map((optionItem, optionIndex) => {
|
|
599
628
|
return /*#__PURE__*/React__default.createElement("span", {
|
|
600
629
|
key: `${optionItem.content}_${optionIndex}`,
|
|
601
|
-
className: styles$
|
|
630
|
+
className: styles$b['dots-option-item'],
|
|
602
631
|
style: {
|
|
603
632
|
color: '#3C393E',
|
|
604
633
|
fontSize: '14px',
|
|
@@ -619,7 +648,7 @@ const TD = ({
|
|
|
619
648
|
marginBottom: '5px'
|
|
620
649
|
},
|
|
621
650
|
title: optionItem.content
|
|
622
|
-
}, optionItem.content));
|
|
651
|
+
}, optionItem.content === 0 ? optionItem.content.toString() : optionItem.content ? optionItem.content : ''));
|
|
623
652
|
}))) : ''), hasOwnerProperty(item, 'contentList') && /*#__PURE__*/React__default.createElement("div", {
|
|
624
653
|
style: {
|
|
625
654
|
overflow: 'auto',
|
|
@@ -631,13 +660,13 @@ const TD = ({
|
|
|
631
660
|
}, item.contentList.map((innerItem, innerItemIndex) => {
|
|
632
661
|
return /*#__PURE__*/React__default.createElement("p", {
|
|
633
662
|
key: `${innerItem}_${innerItemIndex}`,
|
|
634
|
-
className: styles$
|
|
663
|
+
className: styles$b['list-text'],
|
|
635
664
|
style: {
|
|
636
665
|
color: openListColor,
|
|
637
666
|
maxWidth: (item.content.length * 9 <= 100 ? 100 : item.content.length * 9) + 'px'
|
|
638
667
|
},
|
|
639
668
|
onClick: e => handleContentList(e, item, index, innerIndex, innerItem.id, innerItem.content, innerItemIndex)
|
|
640
|
-
}, innerItem.content);
|
|
669
|
+
}, innerItem.content === 0 ? innerItem.content.toString() : innerItem.content ? innerItem.content : '');
|
|
641
670
|
}))), !hasOwnerProperty(item, 'hideArrow') && item.hideArrow !== false && hasOwnerProperty(item, 'rightArrow') && item.rightArrow === true ? hasOwnerProperty(item, 'contentList') && (hasOwnerProperty(item, 'closeArrow') || hasOwnerProperty(item, 'openArrow')) && /*#__PURE__*/React__default.createElement("div", {
|
|
642
671
|
id: item.id,
|
|
643
672
|
style: {
|
|
@@ -646,7 +675,7 @@ const TD = ({
|
|
|
646
675
|
cursor: 'pointer'
|
|
647
676
|
},
|
|
648
677
|
onClick: () => handleOpenCloseRowSingleArrow(index, innerIndex, item),
|
|
649
|
-
className: styles$
|
|
678
|
+
className: styles$b['td-span']
|
|
650
679
|
}, hasOwnerProperty(item, 'status') && item.status === 'close' ? item.closeArrow : item.openArrow) : '') : '');
|
|
651
680
|
};
|
|
652
681
|
|
|
@@ -708,10 +737,15 @@ const Table = ({
|
|
|
708
737
|
arrowShow,
|
|
709
738
|
dataHeader,
|
|
710
739
|
arrowColumn,
|
|
740
|
+
tableRowItem,
|
|
741
|
+
tableRowRadius,
|
|
742
|
+
tableRowBGColor,
|
|
743
|
+
tableRowBoxShadow,
|
|
711
744
|
tHeadColor,
|
|
712
745
|
tHeadFamily,
|
|
713
746
|
tHeadPadding,
|
|
714
747
|
tHeadFontSize,
|
|
748
|
+
tHeadTextAlign,
|
|
715
749
|
tHeadFontWeight,
|
|
716
750
|
tHeadBorderRadius,
|
|
717
751
|
tHeadBackgroundColor,
|
|
@@ -719,10 +753,14 @@ const Table = ({
|
|
|
719
753
|
tBodyPadding,
|
|
720
754
|
tBodyFontSize,
|
|
721
755
|
tBodyTextAlign,
|
|
756
|
+
tBodyRowBorder,
|
|
757
|
+
tBodyBoxShadow,
|
|
722
758
|
tBodyFontWeight,
|
|
723
759
|
tBodyFontFamily,
|
|
724
|
-
|
|
725
|
-
|
|
760
|
+
tBodyRowMarginTop,
|
|
761
|
+
className,
|
|
762
|
+
openListColor,
|
|
763
|
+
hideBorder
|
|
726
764
|
}) => {
|
|
727
765
|
const [body, setBody] = useState([]);
|
|
728
766
|
const [header, setHeader] = useState([]);
|
|
@@ -1003,7 +1041,6 @@ const Table = ({
|
|
|
1003
1041
|
});
|
|
1004
1042
|
};
|
|
1005
1043
|
const handleOpenCloseRowSingleArrow = (arrowRowIndex, arrowIndex, clickableItem) => {
|
|
1006
|
-
console.log(clickableItem, 'clickableItem');
|
|
1007
1044
|
let single = {};
|
|
1008
1045
|
const allArrows = [];
|
|
1009
1046
|
const checkedOpenableRow = body[arrowRowIndex].map((item, index) => {
|
|
@@ -1198,17 +1235,21 @@ const Table = ({
|
|
|
1198
1235
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("table", {
|
|
1199
1236
|
style: {
|
|
1200
1237
|
width: '100%',
|
|
1201
|
-
borderCollapse: 'collapse'
|
|
1238
|
+
borderCollapse: (tableRowItem ? tableRowItem : configStyles.TABLE.tableRowItem) ? 'separate' : 'collapse',
|
|
1239
|
+
borderSpacing: `0 ${tBodyRowMarginTop ? tBodyRowMarginTop : configStyles.TABLE.tBodyRowMarginTop}`
|
|
1202
1240
|
},
|
|
1203
|
-
onClick: handleTableClick
|
|
1241
|
+
onClick: handleTableClick,
|
|
1242
|
+
className: className ? className : configStyles.TABLE.className
|
|
1204
1243
|
}, header && header.length > 0 && /*#__PURE__*/React__default.createElement("thead", null, /*#__PURE__*/React__default.createElement("tr", {
|
|
1205
1244
|
style: {
|
|
1206
1245
|
color: tHeadColor ? tHeadColor : configStyles.TABLE.tHeadColor,
|
|
1207
|
-
backgroundColor: tHeadBackgroundColor ? tHeadBackgroundColor : configStyles.TABLE.tHeadBackgroundColor
|
|
1246
|
+
backgroundColor: tHeadBackgroundColor ? tHeadBackgroundColor : configStyles.TABLE.tHeadBackgroundColor,
|
|
1247
|
+
borderColor: hideBorder ? 'transparent' : '#eeeeee'
|
|
1208
1248
|
}
|
|
1209
1249
|
}, header.map((item, index) => {
|
|
1210
1250
|
return /*#__PURE__*/React__default.createElement(TH, {
|
|
1211
1251
|
item: item,
|
|
1252
|
+
hideBorder: hideBorder,
|
|
1212
1253
|
key: `${item}_${index}`,
|
|
1213
1254
|
handleCheckedHeader: handleCheckedHeader,
|
|
1214
1255
|
handleHeaderItemClick: handleHeaderItemClick,
|
|
@@ -1216,25 +1257,31 @@ const Table = ({
|
|
|
1216
1257
|
tHeadFamily: tHeadFamily ? tHeadFamily : configStyles.TABLE.tHeadFamily,
|
|
1217
1258
|
tHeadPadding: tHeadPadding ? tHeadPadding : configStyles.TABLE.tHeadPadding,
|
|
1218
1259
|
tHeadFontSize: tHeadFontSize ? tHeadFontSize : configStyles.TABLE.tHeadFontSize,
|
|
1260
|
+
tHeadTextAlign: tHeadTextAlign ? tHeadTextAlign : configStyles.TABLE.tHeadTextAlign,
|
|
1219
1261
|
tHeadFontWeight: tHeadFontWeight ? tHeadFontWeight : configStyles.TABLE.tHeadFontWeight,
|
|
1220
1262
|
borderTopLeftRadius: index === 0 ? tHeadBorderRadius ? tHeadBorderRadius : configStyles.TABLE.tHeadBorderRadius : '0px',
|
|
1221
1263
|
borderTopRightRadius: index === header.length - 1 ? tHeadBorderRadius ? tHeadBorderRadius : configStyles.TABLE.tHeadBorderRadius : '0px'
|
|
1222
1264
|
});
|
|
1223
1265
|
}))), body && body.length > 0 && /*#__PURE__*/React__default.createElement("tbody", {
|
|
1224
1266
|
style: {
|
|
1225
|
-
boxShadow:
|
|
1267
|
+
boxShadow: tBodyBoxShadow ? tBodyBoxShadow : configStyles.TABLE.tBodyBoxShadow
|
|
1226
1268
|
}
|
|
1227
1269
|
}, body.map((item, index) => {
|
|
1228
1270
|
return /*#__PURE__*/React__default.createElement("tr", {
|
|
1229
1271
|
key: `${item}_${index}`,
|
|
1230
1272
|
style: {
|
|
1231
|
-
|
|
1273
|
+
backgroundColor: tableRowBGColor ? tableRowBGColor : configStyles.TABLE.tableRowBGColor,
|
|
1274
|
+
borderBottom: index === body.length - 1 ? 'none' : tBodyRowBorder ? tBodyRowBorder : configStyles.TABLE.tBodyRowBorder,
|
|
1275
|
+
borderColor: hideBorder ? 'transparent' : '#eeeeee',
|
|
1276
|
+
boxShadow: (tableRowItem ? tableRowItem : configStyles.TABLE.tableRowItem) ? tableRowBoxShadow ? tableRowBoxShadow : configStyles.TABLE.tableRowBoxShadow : 'none'
|
|
1232
1277
|
}
|
|
1233
1278
|
}, Object.values(item).map((innerItem, innerIndex) => {
|
|
1234
1279
|
return /*#__PURE__*/React__default.createElement(TD, {
|
|
1235
1280
|
index: index,
|
|
1236
1281
|
item: innerItem,
|
|
1282
|
+
hideBorder: hideBorder,
|
|
1237
1283
|
innerIndex: innerIndex,
|
|
1284
|
+
row: Object.values(item),
|
|
1238
1285
|
id: item.id ? item.id : '',
|
|
1239
1286
|
handleCheckDots: handleCheckDots,
|
|
1240
1287
|
key: `${innerItem}_${index}_${innerIndex}`,
|
|
@@ -1244,6 +1291,8 @@ const Table = ({
|
|
|
1244
1291
|
handleMoreOptionsClick: handleMoreOptionsClick,
|
|
1245
1292
|
handleContentListClick: handleContentListClick,
|
|
1246
1293
|
tBodyColor: tBodyColor ? tBodyColor : configStyles.TABLE.tBodyColor,
|
|
1294
|
+
rowItem: tableRowItem ? tableRowItem : configStyles.TABLE.tableRowItem,
|
|
1295
|
+
rowRadius: tableRowRadius ? tableRowRadius : configStyles.TABLE.tableRowRadius,
|
|
1247
1296
|
tBodyPadding: tBodyPadding ? tBodyPadding : configStyles.TABLE.tBodyPadding,
|
|
1248
1297
|
tBodyFontSize: tBodyFontSize ? tBodyFontSize : configStyles.TABLE.tBodyFontSize,
|
|
1249
1298
|
tBodyTextAlign: tBodyTextAlign ? tBodyTextAlign : configStyles.TABLE.tBodyTextAlign,
|
|
@@ -1262,26 +1311,35 @@ Table.propTypes = {
|
|
|
1262
1311
|
arrowShow: PropTypes.bool,
|
|
1263
1312
|
dataHeader: PropTypes.array,
|
|
1264
1313
|
arrowColumn: PropTypes.number,
|
|
1314
|
+
tableRowItem: PropTypes.bool,
|
|
1315
|
+
tableRowRadius: PropTypes.string,
|
|
1316
|
+
tableRowBGColor: PropTypes.string,
|
|
1317
|
+
tableRowBoxShadow: PropTypes.string,
|
|
1265
1318
|
tHeadColor: PropTypes.string,
|
|
1266
1319
|
tHeadFamily: PropTypes.string,
|
|
1267
1320
|
tHeadPadding: PropTypes.string,
|
|
1268
1321
|
tHeadFontSize: PropTypes.string,
|
|
1322
|
+
tHeadTextAlign: PropTypes.string,
|
|
1269
1323
|
tHeadFontWeight: PropTypes.number,
|
|
1270
1324
|
tHeadBorderRadius: PropTypes.string,
|
|
1271
1325
|
tHeadBackgroundColor: PropTypes.string,
|
|
1272
1326
|
tBodyColor: PropTypes.string,
|
|
1273
1327
|
tBodyPadding: PropTypes.string,
|
|
1274
1328
|
tBodyFontSize: PropTypes.string,
|
|
1329
|
+
tBodyBoxShadow: PropTypes.string,
|
|
1275
1330
|
tBodyTextAlign: PropTypes.string,
|
|
1276
1331
|
tBodyFontWeight: PropTypes.string,
|
|
1277
1332
|
tBodyFontFamily: PropTypes.string,
|
|
1333
|
+
tBodyRowMarginTop: PropTypes.string,
|
|
1334
|
+
className: PropTypes.string,
|
|
1278
1335
|
tBodyRowBorder: PropTypes.string,
|
|
1279
|
-
openListColor: PropTypes.string
|
|
1336
|
+
openListColor: PropTypes.string,
|
|
1337
|
+
hideBorder: PropTypes.bool
|
|
1280
1338
|
};
|
|
1281
1339
|
|
|
1282
|
-
var css_248z$
|
|
1283
|
-
var styles$
|
|
1284
|
-
styleInject(css_248z$
|
|
1340
|
+
var css_248z$c = ".modal-module_animation__modal__3mt48{animation:modal-module_show-popup__WrH7a .15s;-webkit-animation:modal-module_show-popup__WrH7a .15s}@keyframes modal-module_show-popup__WrH7a{0%{transform:translate3d(0,-50%,0);-webkit-transform:translate3d(0,-50%,0);-moz-transform:translate3d(0,-50%,0);-ms-transform:translate3d(0,-50%,0);-o-transform:translate3d(0,-50%,0)}to{opacity:1;transform:translateZ(0);-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-ms-transform:translateZ(0);-o-transform:translateZ(0)}}";
|
|
1341
|
+
var styles$a = {"animation__modal":"modal-module_animation__modal__3mt48","show-popup":"modal-module_show-popup__WrH7a"};
|
|
1342
|
+
styleInject(css_248z$c);
|
|
1285
1343
|
|
|
1286
1344
|
const SvgNext = ({
|
|
1287
1345
|
title,
|
|
@@ -1426,9 +1484,10 @@ const Modal = ({
|
|
|
1426
1484
|
layerBackgroundColor
|
|
1427
1485
|
}) => {
|
|
1428
1486
|
const [select, setSelect] = useState(0);
|
|
1487
|
+
const [isHover, setIsHover] = useState(false);
|
|
1429
1488
|
const [innerData, setInnerData] = useState([]);
|
|
1430
1489
|
const configStyles = compereConfigs();
|
|
1431
|
-
const classProps = classnames(className);
|
|
1490
|
+
const classProps = classnames(className ? className : configStyles.MODAL.className);
|
|
1432
1491
|
const handleCloseModal = () => {
|
|
1433
1492
|
setShow(false);
|
|
1434
1493
|
};
|
|
@@ -1460,6 +1519,12 @@ const Modal = ({
|
|
|
1460
1519
|
imageLink.href = url, imageLink.target = '_blank';
|
|
1461
1520
|
imageLink.click();
|
|
1462
1521
|
};
|
|
1522
|
+
const handleMouseEnter = () => {
|
|
1523
|
+
setIsHover(true);
|
|
1524
|
+
};
|
|
1525
|
+
const handleMouseLeave = () => {
|
|
1526
|
+
setIsHover(false);
|
|
1527
|
+
};
|
|
1463
1528
|
useEffect(() => {
|
|
1464
1529
|
if (type === 'images') {
|
|
1465
1530
|
if (data) {
|
|
@@ -1493,6 +1558,7 @@ const Modal = ({
|
|
|
1493
1558
|
};
|
|
1494
1559
|
}, []);
|
|
1495
1560
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
1561
|
+
className: classProps,
|
|
1496
1562
|
onClick: outsideClose || configStyles.MODAL.outsideClose ? handleCloseModal : _ => _,
|
|
1497
1563
|
style: {
|
|
1498
1564
|
top: '0px',
|
|
@@ -1513,7 +1579,7 @@ const Modal = ({
|
|
|
1513
1579
|
justifyContent: justifyContent ? justifyContent : configStyles.MODAL.justifyContent
|
|
1514
1580
|
}
|
|
1515
1581
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1516
|
-
className: `${
|
|
1582
|
+
className: `${styles$a['animation__modal']}`,
|
|
1517
1583
|
onClick: handleStopClosing,
|
|
1518
1584
|
style: {
|
|
1519
1585
|
position: 'relative',
|
|
@@ -1573,7 +1639,9 @@ const Modal = ({
|
|
|
1573
1639
|
borderWidth: borderWidth ? borderWidth : configStyles.MODAL.borderWidth,
|
|
1574
1640
|
borderStyle: borderStyle ? borderStyle : configStyles.MODAL.borderStyle,
|
|
1575
1641
|
borderColor: borderColor ? borderColor : configStyles.MODAL.borderColor
|
|
1576
|
-
}
|
|
1642
|
+
},
|
|
1643
|
+
onMouseEnter: handleMouseEnter,
|
|
1644
|
+
onMouseLeave: handleMouseLeave
|
|
1577
1645
|
}, type === 'content' ? children ? children : '' : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
1578
1646
|
style: {
|
|
1579
1647
|
position: 'absolute',
|
|
@@ -1624,7 +1692,7 @@ const Modal = ({
|
|
|
1624
1692
|
maxWidth: imageMaxWidth ? imageMaxWidth : configStyles.MODAL.imageMaxWidth
|
|
1625
1693
|
},
|
|
1626
1694
|
src: item.url
|
|
1627
|
-
}), showZoomIcon ? /*#__PURE__*/React__default.createElement("div", {
|
|
1695
|
+
}), isHover && showZoomIcon ? /*#__PURE__*/React__default.createElement("div", {
|
|
1628
1696
|
style: {
|
|
1629
1697
|
top: '0px',
|
|
1630
1698
|
left: '0px',
|
|
@@ -1715,9 +1783,9 @@ Modal.defaultProps = {
|
|
|
1715
1783
|
type: 'content'
|
|
1716
1784
|
};
|
|
1717
1785
|
|
|
1718
|
-
var css_248z$
|
|
1719
|
-
var styles$
|
|
1720
|
-
styleInject(css_248z$
|
|
1786
|
+
var css_248z$b = ".input-module_input-wrap__NunrE{position:relative;width:100%}.input-module_input-content__kP7lZ{appearance:none!important;-webkit-appearance:none!important;display:flex;width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{background-color:inherit!important}input::-ms-clear,input::-ms-reveal{display:none}.input-module_error-message-show__OrVSo{animation-fill-mode:forwards;animation-name:input-module_error-show__9MP6k}.input-module_inp-num__vH7HL::-webkit-inner-spin-button,.input-module_inp-num__vH7HL::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.input-module_inp-num__vH7HL[type=number]{-moz-appearance:textfield}@keyframes input-module_error-show__9MP6k{to{bottom:-20px;transform:scaleX(1);-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);-o-transform:scaleX(1)}}";
|
|
1787
|
+
var styles$9 = {"input-wrap":"input-module_input-wrap__NunrE","input-content":"input-module_input-content__kP7lZ","error-message-show":"input-module_error-message-show__OrVSo","error-show":"input-module_error-show__9MP6k","inp-num":"input-module_inp-num__vH7HL"};
|
|
1788
|
+
styleInject(css_248z$b);
|
|
1721
1789
|
|
|
1722
1790
|
const InputTypes = {
|
|
1723
1791
|
TEL: 'tel',
|
|
@@ -1794,7 +1862,7 @@ const Input = ({
|
|
|
1794
1862
|
const [innerErrorMessage, setInnerErrorMessage] = useState('');
|
|
1795
1863
|
const random = Math.floor(Math.random() * 1000 + 1);
|
|
1796
1864
|
const configStyles = compereConfigs();
|
|
1797
|
-
const classProps = classnames(className ? className : configStyles.INPUT.className, type === 'number' ? styles$
|
|
1865
|
+
const classProps = classnames(className ? className : configStyles.INPUT.className, type === 'number' ? styles$9['inp-num'] : '', styles$9['input-wrap']);
|
|
1798
1866
|
const errorShow = keyframes`
|
|
1799
1867
|
100% {
|
|
1800
1868
|
bottom: '-20px';
|
|
@@ -1923,10 +1991,11 @@ const Input = ({
|
|
|
1923
1991
|
}
|
|
1924
1992
|
}
|
|
1925
1993
|
}
|
|
1926
|
-
|
|
1927
|
-
|
|
1994
|
+
const max = configStyles.INPUT.maxLength || maxLength;
|
|
1995
|
+
if (max && currentValue.length > max && type !== 'tel' && type !== 'number') {
|
|
1996
|
+
setInnerValue(currentValue.substr(0, max));
|
|
1928
1997
|
if (change) {
|
|
1929
|
-
change(currentValue.substr(0,
|
|
1998
|
+
change(currentValue.substr(0, max));
|
|
1930
1999
|
}
|
|
1931
2000
|
}
|
|
1932
2001
|
if (regexp && regexpErrorMessage && !maxLength && type !== 'tel') {
|
|
@@ -2067,16 +2136,23 @@ const Input = ({
|
|
|
2067
2136
|
if (maxLength && value.length > maxLength && type !== 'tel') {
|
|
2068
2137
|
setInnerValue(value.substr(0, maxLength));
|
|
2069
2138
|
}
|
|
2139
|
+
const max = configStyles.INPUT.maxLength || maxLength;
|
|
2140
|
+
if (max && value.length > max && type !== 'tel' && type !== 'number') {
|
|
2141
|
+
setInnerValue(value.substr(0, max));
|
|
2142
|
+
if (change) {
|
|
2143
|
+
change(value.substr(0, max));
|
|
2144
|
+
}
|
|
2145
|
+
}
|
|
2070
2146
|
if (regexp && regexpErrorMessage && !maxLength && type !== 'tel') {
|
|
2071
2147
|
!regexp.test(value) ? setInnerErrorMessage(regexpErrorMessage) : setInnerErrorMessage('');
|
|
2072
2148
|
}
|
|
2073
2149
|
}
|
|
2074
2150
|
}
|
|
2075
|
-
}, [type, value, regexp, maxLength, errorMessage, regexpErrorMessage, telErrorMessage]);
|
|
2151
|
+
}, [type, value, regexp, maxLength, errorMessage, regexpErrorMessage, telErrorMessage, configStyles.INPUT.maxLength]);
|
|
2076
2152
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2077
|
-
className:
|
|
2153
|
+
className: classProps
|
|
2078
2154
|
}, label ? /*#__PURE__*/React__default.createElement("label", {
|
|
2079
|
-
className: `${styles$
|
|
2155
|
+
className: `${styles$9['input-title']}`,
|
|
2080
2156
|
style: {
|
|
2081
2157
|
color: labelColor ? labelColor : configStyles.INPUT.labelColor,
|
|
2082
2158
|
fontSize: labelSize ? labelSize : configStyles.INPUT.labelSize,
|
|
@@ -2086,7 +2162,7 @@ const Input = ({
|
|
|
2086
2162
|
marginBottom: labelMarginBottom ? labelMarginBottom : configStyles.INPUT.labelMarginBottom
|
|
2087
2163
|
}
|
|
2088
2164
|
}, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default.createElement("div", {
|
|
2089
|
-
className: `${styles$
|
|
2165
|
+
className: `${styles$9['input-content']}`,
|
|
2090
2166
|
style: {
|
|
2091
2167
|
width: width ? width : configStyles.INPUT.width,
|
|
2092
2168
|
borderRadius: radius ? radius : configStyles.INPUT.radius,
|
|
@@ -2128,7 +2204,6 @@ const Input = ({
|
|
|
2128
2204
|
}
|
|
2129
2205
|
}, "+374") : '', /*#__PURE__*/React__default.createElement("input", _extends({}, props, {
|
|
2130
2206
|
value: innerValue,
|
|
2131
|
-
className: classProps,
|
|
2132
2207
|
onInput: handleChange,
|
|
2133
2208
|
disabled: disabled ? disabled : '',
|
|
2134
2209
|
name: name ? name : `tui_${random}_tui`,
|
|
@@ -2246,9 +2321,9 @@ Input.defaultProps = {
|
|
|
2246
2321
|
type: 'text'
|
|
2247
2322
|
};
|
|
2248
2323
|
|
|
2249
|
-
var css_248z$
|
|
2250
|
-
var styles$
|
|
2251
|
-
styleInject(css_248z$
|
|
2324
|
+
var css_248z$a = ".radio-module_radio-wrap__-lO7V{align-items:center;cursor:pointer;display:inline-flex;flex-direction:row;flex-wrap:nowrap;margin:0 6px;padding-left:24px;position:relative}.radio-module_radio-wrap__-lO7V>input{height:0;opacity:0;position:absolute;width:0}.radio-module_radio-wrap__-lO7V .radio-module_radio-checkmark__Kvol0{border:1px solid #d9d9d9;border-radius:50%;display:inline-block;height:14px;left:0;margin-right:4px;position:absolute;top:0;transition:border-color .24s;vertical-align:top;width:14px}.radio-module_radio-wrap__-lO7V>.radio-module_radio-checkmark__Kvol0:after{background-color:#d9d9d9;border-radius:50%;bottom:0;content:\"\";height:8px;left:0;margin:auto;opacity:0;position:absolute;right:0;top:0;transition:opacity .24s,background-color .24s;width:8px}.radio-module_radio-wrap__-lO7V input:checked~.radio-module_radio-checkmark__Kvol0:after{background-color:#1890ff;opacity:1}.radio-module_radio-wrap__-lO7V:hover input~.radio-module_radio-checkmark__Kvol0:after{opacity:1}.radio-module_radio-wrap__-lO7V input:checked~.radio-module_radio-checkmark__Kvol0{border-color:#1890ff}";
|
|
2325
|
+
var styles$8 = {"radio-wrap":"radio-module_radio-wrap__-lO7V","radio-checkmark":"radio-module_radio-checkmark__Kvol0"};
|
|
2326
|
+
styleInject(css_248z$a);
|
|
2252
2327
|
|
|
2253
2328
|
const Radio = ({
|
|
2254
2329
|
disabled,
|
|
@@ -2261,11 +2336,11 @@ const Radio = ({
|
|
|
2261
2336
|
label,
|
|
2262
2337
|
...props
|
|
2263
2338
|
}) => {
|
|
2264
|
-
const classProps = classnames(styles$
|
|
2339
|
+
const classProps = classnames(styles$8.checkbox, className);
|
|
2265
2340
|
const parseData = jsonData.length !== 0 ? JSON.parse(jsonData) : [];
|
|
2266
2341
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, parseData.map((element, id) => {
|
|
2267
2342
|
return /*#__PURE__*/React__default.createElement("label", {
|
|
2268
|
-
className: `${styles$
|
|
2343
|
+
className: `${styles$8['radio-wrap']} radio-wrap-rem`,
|
|
2269
2344
|
key: element.value
|
|
2270
2345
|
}, /*#__PURE__*/React__default.createElement("input", _extends({
|
|
2271
2346
|
type: "radio",
|
|
@@ -2276,9 +2351,9 @@ const Radio = ({
|
|
|
2276
2351
|
value: value ? value : element.value,
|
|
2277
2352
|
name: name ? name : element.name
|
|
2278
2353
|
}, props)), /*#__PURE__*/React__default.createElement("span", {
|
|
2279
|
-
className: `${styles$
|
|
2354
|
+
className: `${styles$8['radio-checkmark']} radio-checkmark-rem`
|
|
2280
2355
|
}), element.label ? /*#__PURE__*/React__default.createElement("span", {
|
|
2281
|
-
className: styles$
|
|
2356
|
+
className: styles$8.labelRadio
|
|
2282
2357
|
}, label ? label : element.label) : '');
|
|
2283
2358
|
}));
|
|
2284
2359
|
};
|
|
@@ -2301,7 +2376,6 @@ Radio.defaultProps = {
|
|
|
2301
2376
|
|
|
2302
2377
|
const Button = ({
|
|
2303
2378
|
icon,
|
|
2304
|
-
hoverIcon,
|
|
2305
2379
|
size,
|
|
2306
2380
|
type,
|
|
2307
2381
|
font,
|
|
@@ -2319,6 +2393,7 @@ const Button = ({
|
|
|
2319
2393
|
disabled,
|
|
2320
2394
|
className,
|
|
2321
2395
|
boxSizing,
|
|
2396
|
+
hoverIcon,
|
|
2322
2397
|
hoverColor,
|
|
2323
2398
|
transition,
|
|
2324
2399
|
contentWidth,
|
|
@@ -2338,7 +2413,7 @@ const Button = ({
|
|
|
2338
2413
|
}
|
|
2339
2414
|
}, []);
|
|
2340
2415
|
const configStyles = compereConfigs();
|
|
2341
|
-
const classProps = classnames(className);
|
|
2416
|
+
const classProps = classnames(className ? className : configStyles.BUTTON.className);
|
|
2342
2417
|
const handleMouseEnter = () => {
|
|
2343
2418
|
setIsHover(true);
|
|
2344
2419
|
};
|
|
@@ -2348,6 +2423,7 @@ const Button = ({
|
|
|
2348
2423
|
return /*#__PURE__*/React__default.createElement("button", _extends({
|
|
2349
2424
|
style: {
|
|
2350
2425
|
display: 'flex',
|
|
2426
|
+
outline: 'none',
|
|
2351
2427
|
alignItems: 'center',
|
|
2352
2428
|
justifyContent: 'center',
|
|
2353
2429
|
fontSize: size ? size : configStyles.BUTTON.size,
|
|
@@ -2429,9 +2505,9 @@ const SvgArrow = ({
|
|
|
2429
2505
|
fill: fillColor ? fillColor : '#3C393E'
|
|
2430
2506
|
}));
|
|
2431
2507
|
|
|
2432
|
-
var css_248z$
|
|
2433
|
-
var styles$
|
|
2434
|
-
styleInject(css_248z$
|
|
2508
|
+
var css_248z$9 = ".select-module_select-content__GCMDX{-webkit-appearance:none;display:flex;flex-direction:column;position:relative}.select-module_select-content-top__Aw-fB{align-items:center;-webkit-appearance:none;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.select-module_select-content-bottom__ueZCR{animation:select-module_select-show__391hQ .64s linear forwards;-webkit-animation:select-module_select-show__391hQ .64s linear forwards;left:0;max-height:0;overflow:hidden;position:absolute;width:100%;z-index:99999999999}.select-module_select-content-bottom-inner__NWy2X{display:flex;flex-direction:column;max-height:234px;overflow-x:hidden;overflow-y:auto}.select-module_select-content-top-icon__MBrGK{align-items:center;box-sizing:border-box;display:flex;flex:0 0 auto;padding:0 5px 0 20px}.select-module_select-content-top-icon__MBrGK>div{align-items:center;display:flex;height:14px;justify-content:center;width:14px}.select-module_close-icon__SFNaJ{border-right:1px solid #eee;box-sizing:content-box;padding-right:9px}.select-module_arrow-icon__rjHt-{margin-left:9px;transform-origin:center;transition:all .64s ease;-webkit-transition:all .64s ease;-moz-transition:all .64s ease;-ms-transition:all .64s ease;-o-transition:all .64s ease}.select-module_select-content-bottom-row__eKq5L{align-items:center;display:flex;transition:background-color .24s,color .24s;-webkit-transition:background-color .24s,color .24s;-moz-transition:background-color .24s,color .24s;-ms-transition:background-color .24s,color .24s;-o-transition:background-color .24s,color .24s}.select-module_select-content-bottom-row__eKq5L:last-child{margin-bottom:0}.select-module_ellipsis__uNgol{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@keyframes select-module_select-show__391hQ{to{max-height:234px}}";
|
|
2509
|
+
var styles$7 = {"select-content":"select-module_select-content__GCMDX","select-content-top":"select-module_select-content-top__Aw-fB","select-content-bottom":"select-module_select-content-bottom__ueZCR","select-show":"select-module_select-show__391hQ","select-content-bottom-inner":"select-module_select-content-bottom-inner__NWy2X","select-content-top-icon":"select-module_select-content-top-icon__MBrGK","close-icon":"select-module_close-icon__SFNaJ","arrow-icon":"select-module_arrow-icon__rjHt-","select-content-bottom-row":"select-module_select-content-bottom-row__eKq5L","ellipsis":"select-module_ellipsis__uNgol"};
|
|
2510
|
+
styleInject(css_248z$9);
|
|
2435
2511
|
|
|
2436
2512
|
const Select = ({
|
|
2437
2513
|
dots,
|
|
@@ -2498,7 +2574,7 @@ const Select = ({
|
|
|
2498
2574
|
const [newSelected, setNewSelected] = useState([]);
|
|
2499
2575
|
const [existOptions, setExistOptions] = useState([]);
|
|
2500
2576
|
const configStyles = compereConfigs();
|
|
2501
|
-
const classProps = classnames(className);
|
|
2577
|
+
const classProps = classnames(className ? className : configStyles.SELECT.className);
|
|
2502
2578
|
const handleOpenClose = () => {
|
|
2503
2579
|
setOpened(!opened);
|
|
2504
2580
|
};
|
|
@@ -2506,7 +2582,9 @@ const Select = ({
|
|
|
2506
2582
|
onChange({});
|
|
2507
2583
|
setNewSelected([]);
|
|
2508
2584
|
const clearedOptions = existOptions && existOptions.length > 0 && existOptions.map(item => {
|
|
2509
|
-
item
|
|
2585
|
+
if (hasOwnerProperty(item, 'checked')) {
|
|
2586
|
+
item.checked = false;
|
|
2587
|
+
}
|
|
2510
2588
|
return item;
|
|
2511
2589
|
});
|
|
2512
2590
|
setExistOptions(clearedOptions);
|
|
@@ -2617,7 +2695,7 @@ const Select = ({
|
|
|
2617
2695
|
}, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default.createElement("div", {
|
|
2618
2696
|
ref: ref
|
|
2619
2697
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2620
|
-
className: styles$
|
|
2698
|
+
className: styles$7['select-content']
|
|
2621
2699
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2622
2700
|
style: {
|
|
2623
2701
|
cursor: disabled ? 'not-allowed' : cursor ? cursor : configStyles.SELECT.cursor,
|
|
@@ -2635,9 +2713,9 @@ const Select = ({
|
|
|
2635
2713
|
onClick: disabled ? _ => _ : () => handleOpenClose(),
|
|
2636
2714
|
onMouseEnter: disabled ? _ => _ : () => handleMouseEnter(),
|
|
2637
2715
|
onMouseLeave: disabled ? _ => _ : () => handleMouseLeave(),
|
|
2638
|
-
className: `${styles$
|
|
2716
|
+
className: `${styles$7['select-content-top']}`
|
|
2639
2717
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2640
|
-
className: `${styles$
|
|
2718
|
+
className: `${styles$7['select-content-top-text']}`,
|
|
2641
2719
|
style: {
|
|
2642
2720
|
whiteSpace: disabled ? 'pre-wrap' : 'nowrap',
|
|
2643
2721
|
overflow: 'hidden',
|
|
@@ -2653,9 +2731,9 @@ const Select = ({
|
|
|
2653
2731
|
}
|
|
2654
2732
|
}
|
|
2655
2733
|
}) : defaultOption ? defaultOption : ''), /*#__PURE__*/React__default.createElement("div", {
|
|
2656
|
-
className: `${styles$
|
|
2734
|
+
className: `${styles$7['select-content-top-icon']}`
|
|
2657
2735
|
}, !disabled && multiple && newSelected.length > 1 && /*#__PURE__*/React__default.createElement("span", null, newSelected.length), (showCloseIcon === true || showCloseIcon === false ? showCloseIcon : configStyles.SELECT.showCloseIcon) && !disabled && newSelected && newSelected.length > 0 && /*#__PURE__*/React__default.createElement("div", {
|
|
2658
|
-
className: `${styles$
|
|
2736
|
+
className: `${styles$7['close-icon']}`,
|
|
2659
2737
|
onClick: disabled ? _ => _ : handleClearSelect,
|
|
2660
2738
|
style: {
|
|
2661
2739
|
marginLeft: multiple && newSelected.length > 1 ? '17px' : '0px'
|
|
@@ -2664,7 +2742,7 @@ const Select = ({
|
|
|
2664
2742
|
style: {
|
|
2665
2743
|
transform: opened ? 'rotate(180deg)' : 'rotate(0deg)'
|
|
2666
2744
|
},
|
|
2667
|
-
className: `${styles$
|
|
2745
|
+
className: `${styles$7['arrow-icon']}`
|
|
2668
2746
|
}, arrowIcon ? arrowIcon : /*#__PURE__*/React__default.createElement(SvgArrow, null)) : '')), opened && !disabled ? /*#__PURE__*/React__default.createElement("div", {
|
|
2669
2747
|
style: {
|
|
2670
2748
|
boxShadow: optionsBoxShadow ? optionsBoxShadow : configStyles.SELECT.optionsBoxShadow,
|
|
@@ -2672,9 +2750,9 @@ const Select = ({
|
|
|
2672
2750
|
backgroundColor: optionsBackgroundColor ? optionsBackgroundColor : configStyles.SELECT.optionsBackgroundColor,
|
|
2673
2751
|
top: selectedMinHeight ? selectedMinHeight.includes('rem') ? parseFloat(selectedMinHeight.substr(0, selectedMinHeight.length - 3)) + 0.6 + 'rem' : parseFloat(selectedMinHeight.substr(0, selectedMinHeight.length - 2)) + 6 + 'px' : configStyles.SELECT.selectedMinHeight.includes('rem') ? parseFloat(configStyles.SELECT.selectedMinHeight.substr(0, configStyles.SELECT.selectedMinHeight.length - 3)) + 0.6 + 'rem' : parseFloat(configStyles.SELECT.selectedMinHeight.substr(0, configStyles.SELECT.selectedMinHeight.length - 2)) + 6 + 'px'
|
|
2674
2752
|
},
|
|
2675
|
-
className: `${styles$
|
|
2753
|
+
className: `${styles$7['select-content-bottom']}`
|
|
2676
2754
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2677
|
-
className: `${styles$
|
|
2755
|
+
className: `${styles$7['select-content-bottom-inner']}`
|
|
2678
2756
|
}, existOptions && existOptions.length > 0 && existOptions.map((option, i) => {
|
|
2679
2757
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2680
2758
|
key: i,
|
|
@@ -2683,7 +2761,7 @@ const Select = ({
|
|
|
2683
2761
|
onClick: disabled ? _ => _ : () => handleSelectItem(option),
|
|
2684
2762
|
onMouseEnter: disabled ? _ => _ : e => handleMouseEnterOption(e),
|
|
2685
2763
|
onMouseLeave: disabled ? _ => _ : e => handleMouseLeaveOption(e),
|
|
2686
|
-
className: `${styles$
|
|
2764
|
+
className: `${styles$7['select-content-bottom-row']} ${dots || configStyles.SELECT.dots ? styles$7['ellipsis'] : ''}`,
|
|
2687
2765
|
style: {
|
|
2688
2766
|
overflowWrap: !dots && !configStyles.SELECT.dots ? 'anywhere' : 'break-word',
|
|
2689
2767
|
color: optionItemColor ? optionItemColor : configStyles.SELECT.optionItemColor,
|
|
@@ -2865,9 +2943,9 @@ const SvgToasterSuccess = ({
|
|
|
2865
2943
|
fill: fillColor ? fillColor : '#0DA574'
|
|
2866
2944
|
}));
|
|
2867
2945
|
|
|
2868
|
-
var css_248z$
|
|
2869
|
-
var styles$
|
|
2870
|
-
styleInject(css_248z$
|
|
2946
|
+
var css_248z$8 = "#toaster-module_top-left__q0LcN{left:0;top:1em}#toaster-module_top-right__f-AFL{right:0;top:1em}#toaster-module_top-center__eVRbc{left:50%;top:1em;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}#toaster-module_bottom-left__b-YHI{bottom:1em;left:0}#toaster-module_bottom-right__g9ACP{bottom:1em;right:0}#toaster-module_bottom-center__4KcFe{bottom:1em;left:50%;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_top-left__q0LcN{left:0;top:1em}.toaster-module_top-right__f-AFL{right:0;top:1em}.toaster-module_top-center__eVRbc{left:50%;top:1em;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_bottom-left__b-YHI{bottom:1em;left:0}.toaster-module_bottom-right__g9ACP{bottom:1em;right:0}.toaster-module_bottom-center__4KcFe{bottom:1em;left:50%;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_notify-block__pRnEB{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.toaster-module_bounce-in-right__shR2D{-webkit-animation-name:toaster-module_bounceInRight__rSk5p;animation-name:toaster-module_bounceInRight__rSk5p}.toaster-module_bounce-out-right__48pyA{-webkit-animation-name:toaster-module_bounceOutRight__bmFGS;animation-name:toaster-module_bounceOutRight__bmFGS}.toaster-module_notify-desc__bcWe2,.toaster-module_notify-title__8lFLy{overflow:hidden;text-overflow:ellipsis}.toaster-module_notify-desc__bcWe2{-webkit-box-orient:vertical;-webkit-line-clamp:2;display:-webkit-box}@keyframes toaster-module_bounceInRight__rSk5p{0%{opacity:0;right:-100%}60%{opacity:1;right:40px}75%{right:0}90%{right:30px}to{right:20px}}@keyframes toaster-module_bounceOutRight__bmFGS{0%{opacity:1;right:20px}60%{opacity:1;right:60px}to{opacity:0;right:-100%}}.toaster-module_bounce-in-left__xoF-M{-webkit-animation-name:toaster-module_bounceInLeft__to59v;animation-name:toaster-module_bounceInLeft__to59v}.toaster-module_bounce-out-left__fDOZw{-webkit-animation-name:toaster-module_bounceOutLeft__k5QgO;animation-name:toaster-module_bounceOutLeft__k5QgO}@keyframes toaster-module_bounceInLeft__to59v{0%{left:-100%;opacity:0}60%{left:40px;opacity:1}75%{left:0}90%{left:30px}to{left:20px}}@keyframes toaster-module_bounceOutLeft__k5QgO{0%{left:20px;opacity:1}60%{left:60px;opacity:1}to{left:-100%;opacity:0}}";
|
|
2947
|
+
var styles$6 = {"top-left":"toaster-module_top-left__q0LcN","top-right":"toaster-module_top-right__f-AFL","top-center":"toaster-module_top-center__eVRbc","bottom-left":"toaster-module_bottom-left__b-YHI","bottom-right":"toaster-module_bottom-right__g9ACP","bottom-center":"toaster-module_bottom-center__4KcFe","notify-block":"toaster-module_notify-block__pRnEB","bounce-in-right":"toaster-module_bounce-in-right__shR2D","bounceInRight":"toaster-module_bounceInRight__rSk5p","bounce-out-right":"toaster-module_bounce-out-right__48pyA","bounceOutRight":"toaster-module_bounceOutRight__bmFGS","notify-title":"toaster-module_notify-title__8lFLy","notify-desc":"toaster-module_notify-desc__bcWe2","bounce-in-left":"toaster-module_bounce-in-left__xoF-M","bounceInLeft":"toaster-module_bounceInLeft__to59v","bounce-out-left":"toaster-module_bounce-out-left__fDOZw","bounceOutLeft":"toaster-module_bounceOutLeft__k5QgO"};
|
|
2948
|
+
styleInject(css_248z$8);
|
|
2871
2949
|
|
|
2872
2950
|
let wWidth$1 = window.innerWidth;
|
|
2873
2951
|
const ToasterType = {
|
|
@@ -2933,8 +3011,8 @@ const Toast = ({
|
|
|
2933
3011
|
justifyContent: 'space-between'
|
|
2934
3012
|
},
|
|
2935
3013
|
className: `
|
|
2936
|
-
${styles$
|
|
2937
|
-
${position === 'top-left' ? showToaster ? styles$
|
|
3014
|
+
${styles$6['notify-block']}
|
|
3015
|
+
${position === 'top-left' ? showToaster ? styles$6['bounce-in-left'] : styles$6['bounce-out-left'] : position === 'top-right' ? showToaster ? styles$6['bounce-in-right'] : styles$6['bounce-out-right'] : position === 'top-center' ? showToaster ? styles$6['bounce-in-left'] : styles$6['bounce-out-left'] : position === 'bottom-left' ? showToaster ? styles$6['bounce-in-left'] : styles$6['bounce-out-left'] : position === 'bottom-right' ? showToaster ? styles$6['bounce-in-right'] : styles$6['bounce-out-right'] : position === 'bottom-center' ? showToaster ? styles$6['bounce-in-left'] : styles$6['bounce-out-left'] : ''}
|
|
2938
3016
|
`
|
|
2939
3017
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2940
3018
|
style: {
|
|
@@ -2960,7 +3038,7 @@ const Toast = ({
|
|
|
2960
3038
|
lineHeight: '22px',
|
|
2961
3039
|
fontStyle: 'normal'
|
|
2962
3040
|
},
|
|
2963
|
-
className: styles$
|
|
3041
|
+
className: styles$6['notify-title']
|
|
2964
3042
|
}, title ? title : ''), /*#__PURE__*/React__default.createElement("span", {
|
|
2965
3043
|
style: {
|
|
2966
3044
|
fontWeight: 500,
|
|
@@ -2971,7 +3049,7 @@ const Toast = ({
|
|
|
2971
3049
|
fontFamily: '',
|
|
2972
3050
|
opacity: 0.8
|
|
2973
3051
|
},
|
|
2974
|
-
className: styles$
|
|
3052
|
+
className: styles$6['notify-desc']
|
|
2975
3053
|
}, description ? description : '')), /*#__PURE__*/React__default.createElement("div", {
|
|
2976
3054
|
onClick: () => handleCloseToaster(ref),
|
|
2977
3055
|
style: {
|
|
@@ -3034,17 +3112,17 @@ const createToast = ({
|
|
|
3034
3112
|
description
|
|
3035
3113
|
});
|
|
3036
3114
|
ReactDOM.render(newElem, toastBlock);
|
|
3037
|
-
if (!document.getElementById(styles$
|
|
3115
|
+
if (!document.getElementById(styles$6[position]) || document.getElementById(styles$6[position]) == null) {
|
|
3038
3116
|
toastParentBlock = document.createElement('div');
|
|
3039
3117
|
toastParentBlock.style.position = 'fixed';
|
|
3040
3118
|
toastParentBlock.style.display = 'flex';
|
|
3041
3119
|
toastParentBlock.style.zIndex = 999999999999;
|
|
3042
3120
|
toastParentBlock.style.flexDirection = position === 'top-left' || position === 'top-right' || position === 'top-center' ? 'column-reverse' : 'column';
|
|
3043
|
-
toastParentBlock.setAttribute('id', styles$
|
|
3121
|
+
toastParentBlock.setAttribute('id', styles$6[position]);
|
|
3044
3122
|
toastParentBlock.appendChild(toastBlock);
|
|
3045
3123
|
toastify.appendChild(toastParentBlock);
|
|
3046
3124
|
} else {
|
|
3047
|
-
document.getElementById(styles$
|
|
3125
|
+
document.getElementById(styles$6[position]).appendChild(toastBlock);
|
|
3048
3126
|
}
|
|
3049
3127
|
};
|
|
3050
3128
|
const toast = {
|
|
@@ -3105,7 +3183,11 @@ const toast = {
|
|
|
3105
3183
|
});
|
|
3106
3184
|
}
|
|
3107
3185
|
};
|
|
3108
|
-
const Toaster = (
|
|
3186
|
+
const Toaster = ({
|
|
3187
|
+
className
|
|
3188
|
+
}) => {
|
|
3189
|
+
const configStyles = compereConfigs();
|
|
3190
|
+
const classProps = classnames(className ? className : configStyles.TOASTER.className);
|
|
3109
3191
|
window.addEventListener('popstate', () => {
|
|
3110
3192
|
if (path !== window.location.href) {
|
|
3111
3193
|
if (!toastify) {
|
|
@@ -3122,6 +3204,7 @@ const Toaster = () => {
|
|
|
3122
3204
|
};
|
|
3123
3205
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
3124
3206
|
onClick: handleToasterClick,
|
|
3207
|
+
className: classProps,
|
|
3125
3208
|
id: "toastify"
|
|
3126
3209
|
});
|
|
3127
3210
|
};
|
|
@@ -3145,9 +3228,9 @@ const SvgTooltip = ({
|
|
|
3145
3228
|
fill: fillColor ? fillColor : '#D1D1D1'
|
|
3146
3229
|
}));
|
|
3147
3230
|
|
|
3148
|
-
var css_248z$
|
|
3149
|
-
var styles$
|
|
3150
|
-
styleInject(css_248z$
|
|
3231
|
+
var css_248z$7 = ".tooltip-module_tooltip-block__v8U9u{align-items:center;display:flex;justify-content:center;position:relative}.tooltip-module_tooltip__emM6A{padding:10px;position:absolute;z-index:1}.tooltip-module_tooltip-rel__to9gq{align-items:center;border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;display:flex;height:auto;justify-content:center;min-height:10px;min-width:30px;position:relative;width:auto}.tooltip-module_tooltip-decor__qvt7t{border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;height:10px;position:absolute;transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);width:10px;z-index:-1}";
|
|
3232
|
+
var styles$5 = {"tooltip-block":"tooltip-module_tooltip-block__v8U9u","tooltip":"tooltip-module_tooltip__emM6A","tooltip-rel":"tooltip-module_tooltip-rel__to9gq","tooltip-decor":"tooltip-module_tooltip-decor__qvt7t"};
|
|
3233
|
+
styleInject(css_248z$7);
|
|
3151
3234
|
|
|
3152
3235
|
const Tooltip = ({
|
|
3153
3236
|
type,
|
|
@@ -3170,7 +3253,7 @@ const Tooltip = ({
|
|
|
3170
3253
|
const [checkTooltipHeight, setCheckTooltipHeight] = useState(0);
|
|
3171
3254
|
const [showTooltip, setShowTooltip] = useState(false);
|
|
3172
3255
|
const configStyles = compereConfigs();
|
|
3173
|
-
const classProps = classnames(styles$
|
|
3256
|
+
const classProps = classnames(styles$5['tooltip-block'], className ? className : configStyles.TOOLTIP.className);
|
|
3174
3257
|
const handleShow = () => {
|
|
3175
3258
|
setShowTooltip(!showTooltip);
|
|
3176
3259
|
};
|
|
@@ -3182,7 +3265,7 @@ const Tooltip = ({
|
|
|
3182
3265
|
tooltipRef.current && tooltipRef.current.clientHeight && tooltipRef.current.clientHeight > 0 && setCheckTooltipHeight(tooltipRef.current.clientHeight);
|
|
3183
3266
|
}, [text, tooltipRef, checkTooltipWidth, checkTooltipHeight]);
|
|
3184
3267
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
3185
|
-
className:
|
|
3268
|
+
className: classProps,
|
|
3186
3269
|
style: {
|
|
3187
3270
|
width: width ? width : configStyles.TOOLTIP.width,
|
|
3188
3271
|
height: height ? height : configStyles.TOOLTIP.height,
|
|
@@ -3191,7 +3274,7 @@ const Tooltip = ({
|
|
|
3191
3274
|
}
|
|
3192
3275
|
}, showTooltip ? /*#__PURE__*/React__default.createElement("div", {
|
|
3193
3276
|
ref: tooltipRef,
|
|
3194
|
-
className:
|
|
3277
|
+
className: `${styles$5['tooltip']}`,
|
|
3195
3278
|
style: {
|
|
3196
3279
|
width: tooltipWidth ? tooltipWidth : configStyles.TOOLTIP.tooltipWidth,
|
|
3197
3280
|
borderRadius: tooltipRadius ? tooltipRadius : configStyles.TOOLTIP.tooltipRadius,
|
|
@@ -3200,9 +3283,9 @@ const Tooltip = ({
|
|
|
3200
3283
|
left: type === 'top' || type === 'bottom' ? `calc(50% - ${checkTooltipWidth / 2}px)` : type === 'left' ? `-${checkTooltipWidth + 7}px` : type === 'right' ? 'calc(100% + 7px)' : '0px'
|
|
3201
3284
|
}
|
|
3202
3285
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3203
|
-
className: `${styles$
|
|
3286
|
+
className: `${styles$5['tooltip-rel']}`
|
|
3204
3287
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3205
|
-
className: `${styles$
|
|
3288
|
+
className: `${styles$5['tooltip-decor']}`,
|
|
3206
3289
|
style: {
|
|
3207
3290
|
backgroundColor: tooltipBackgroundColor ? tooltipBackgroundColor : configStyles.TOOLTIP.tooltipBackgroundColor,
|
|
3208
3291
|
left: type === 'top' || type === 'bottom' ? 'calc(50% - 5px)' : type === 'right' ? '-15px' : type === 'left' ? 'calc(100% + 5px)' : '0px',
|
|
@@ -3279,19 +3362,21 @@ const SvgCaptchaArrowDown = ({
|
|
|
3279
3362
|
fill: fillColor ? fillColor : '#00236A'
|
|
3280
3363
|
}));
|
|
3281
3364
|
|
|
3282
|
-
var css_248z$
|
|
3283
|
-
var styles$
|
|
3284
|
-
styleInject(css_248z$
|
|
3365
|
+
var css_248z$6 = ".captcha-module_start-point__LkOqy:after{background-color:#d1d1d1;border:2px solid #fff;border-radius:6px;-webkit-border-radius:6px;-moz-border-radius:6px;-ms-border-radius:6px;-o-border-radius:6px;content:\"\";height:10px;left:0;position:absolute;top:7.5px;width:10px;z-index:-1}.captcha-module_range__k24I2{-webkit-appearance:none;margin:0}.captcha-module_range__k24I2::-webkit-slider-runnable-track{-webkit-appearance:none;width:100%}.captcha-module_range-default__-O0QD::-webkit-slider-thumb{background-image:url(../../assets/range-arrow-default.svg)}.captcha-module_range-default__-O0QD::-webkit-slider-thumb,.captcha-module_range-error__FKMfG::-webkit-slider-thumb{-webkit-appearance:none;background-position:-5px;background-repeat:no-repeat;background-size:46px 46px;border-radius:17px;-webkit-border-radius:17px;-moz-border-radius:17px;-ms-border-radius:17px;-o-border-radius:17px;cursor:ew-resize;height:34px;width:34px}.captcha-module_range-error__FKMfG::-webkit-slider-thumb{background-image:url(../../assets/range-arrow-error.svg)}.captcha-module_range-success__VzLPq::-webkit-slider-thumb{-webkit-appearance:none;background-image:url(../../assets/range-arrow-success.svg);background-position:-5px;background-repeat:no-repeat;background-size:46px 46px;border-radius:17px;-webkit-border-radius:17px;-moz-border-radius:17px;-ms-border-radius:17px;-o-border-radius:17px;cursor:ew-resize;height:34px;width:34px}";
|
|
3366
|
+
var styles$4 = {"start-point":"captcha-module_start-point__LkOqy","range":"captcha-module_range__k24I2","range-default":"captcha-module_range-default__-O0QD","range-error":"captcha-module_range-error__FKMfG","range-success":"captcha-module_range-success__VzLPq"};
|
|
3367
|
+
styleInject(css_248z$6);
|
|
3285
3368
|
|
|
3286
3369
|
const Captcha = ({
|
|
3287
3370
|
size,
|
|
3288
3371
|
color,
|
|
3289
3372
|
range,
|
|
3290
3373
|
label,
|
|
3374
|
+
className,
|
|
3291
3375
|
getRange
|
|
3292
3376
|
}) => {
|
|
3293
3377
|
const [rangeNumber, setRangeNumber] = useState(0);
|
|
3294
3378
|
const [rangeProgress, setRangeProgress] = useState(0);
|
|
3379
|
+
const classProps = classnames(className ? className : configStyles.CAPTCHA.className);
|
|
3295
3380
|
const configStyles = compereConfigs();
|
|
3296
3381
|
const handleRange = e => {
|
|
3297
3382
|
const value = e.target.value;
|
|
@@ -3314,7 +3399,9 @@ const Captcha = ({
|
|
|
3314
3399
|
setRangeNumber(Math.min(roundedRange, 100));
|
|
3315
3400
|
}
|
|
3316
3401
|
}, [range, getRange]);
|
|
3317
|
-
return /*#__PURE__*/React__default.createElement(
|
|
3402
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3403
|
+
className: classProps
|
|
3404
|
+
}, label && /*#__PURE__*/React__default.createElement("p", {
|
|
3318
3405
|
style: {
|
|
3319
3406
|
fontSize: size ? size : configStyles.Captcha.size,
|
|
3320
3407
|
color: color ? color : configStyles.Captcha.color
|
|
@@ -3344,7 +3431,7 @@ const Captcha = ({
|
|
|
3344
3431
|
alignItems: 'center',
|
|
3345
3432
|
zIndex: 1
|
|
3346
3433
|
},
|
|
3347
|
-
className: styles$
|
|
3434
|
+
className: styles$4['start-point']
|
|
3348
3435
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3349
3436
|
style: {
|
|
3350
3437
|
position: 'absolute',
|
|
@@ -3370,8 +3457,8 @@ const Captcha = ({
|
|
|
3370
3457
|
backgroundColor: 'transparent'
|
|
3371
3458
|
},
|
|
3372
3459
|
className: `
|
|
3373
|
-
${styles$
|
|
3374
|
-
${+rangeProgress === rangeNumber ? styles$
|
|
3460
|
+
${styles$4['range']}
|
|
3461
|
+
${+rangeProgress === rangeNumber ? styles$4['range-success'] : +rangeProgress !== rangeNumber && +rangeProgress > 0 ? styles$4['range-error'] : styles$4['range-default']}
|
|
3375
3462
|
`,
|
|
3376
3463
|
onInput: handleRange
|
|
3377
3464
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -3401,24 +3488,26 @@ Captcha.propTypes = {
|
|
|
3401
3488
|
getRange: PropTypes.func.isRequired
|
|
3402
3489
|
};
|
|
3403
3490
|
|
|
3404
|
-
var css_248z$
|
|
3405
|
-
var styles$
|
|
3406
|
-
styleInject(css_248z$
|
|
3491
|
+
var css_248z$5 = ".stepper-module_stepper-container__-OVGy>div:last-child:before{display:none}.stepper-module_activeRing__Lzvh1,.stepper-module_bigRing__5GBm0{border-radius:50%;height:36px;margin-bottom:36px;position:relative;width:36px}.stepper-module_bigRing__5GBm0{box-shadow:0 0 0 2px #d1d1d1}.stepper-module_bigRing__5GBm0:before{background:#d1d1d1}.stepper-module_activeRing__Lzvh1{box-shadow:0 0 0 2px #00236a}.stepper-module_activeRing__Lzvh1:before{background:#00236a}.stepper-module_activeRing__Lzvh1:before,.stepper-module_bigRing__5GBm0:before{border-radius:20px;bottom:-32px;content:\"\";height:28px;left:0;margin:auto;overflow:hidden;position:absolute;right:0;width:2px}.stepper-module_smallActiveRing__im-XG,.stepper-module_smallRing__u-5a8{border-radius:50%;bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.stepper-module_smallRing__u-5a8{background-color:#d1d1d1;height:14px;width:14px}.stepper-module_smallActiveRing__im-XG{align-items:center;background-color:#00236a;color:#fff;display:flex;height:28px;justify-content:center;width:28px}";
|
|
3492
|
+
var styles$3 = {"stepper-container":"stepper-module_stepper-container__-OVGy","bigRing":"stepper-module_bigRing__5GBm0","activeRing":"stepper-module_activeRing__Lzvh1","smallRing":"stepper-module_smallRing__u-5a8","smallActiveRing":"stepper-module_smallActiveRing__im-XG"};
|
|
3493
|
+
styleInject(css_248z$5);
|
|
3407
3494
|
|
|
3408
3495
|
const Stepper = ({
|
|
3409
3496
|
stepLength,
|
|
3410
|
-
activeSteps
|
|
3497
|
+
activeSteps,
|
|
3498
|
+
className
|
|
3411
3499
|
}) => {
|
|
3500
|
+
const configStyles = compereConfigs();
|
|
3412
3501
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
3413
|
-
className: `${styles$
|
|
3502
|
+
className: classnames(className ? className : configStyles.STEPPER.className, `${styles$3['stepper-container']} stepper-container-rem`)
|
|
3414
3503
|
}, (() => {
|
|
3415
3504
|
let steppers = [];
|
|
3416
3505
|
for (let step = 1; step <= stepLength; step++) {
|
|
3417
3506
|
steppers.push( /*#__PURE__*/React__default.createElement("div", {
|
|
3418
|
-
className: classnames(`${step <= activeSteps ? styles$
|
|
3507
|
+
className: classnames(`${step <= activeSteps ? styles$3.activeRing : styles$3.bigRing}`),
|
|
3419
3508
|
key: step
|
|
3420
3509
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3421
|
-
className: classnames(`${step <= activeSteps ? styles$
|
|
3510
|
+
className: classnames(`${step <= activeSteps ? styles$3.smallActiveRing : styles$3.smallRing}`)
|
|
3422
3511
|
}, step <= activeSteps ? step : '')));
|
|
3423
3512
|
}
|
|
3424
3513
|
return steppers;
|
|
@@ -3919,6 +4008,7 @@ const NewFile = ({
|
|
|
3919
4008
|
disabled,
|
|
3920
4009
|
multiple,
|
|
3921
4010
|
required,
|
|
4011
|
+
className,
|
|
3922
4012
|
errorSize,
|
|
3923
4013
|
labelSize,
|
|
3924
4014
|
removeFile,
|
|
@@ -3963,13 +4053,14 @@ const NewFile = ({
|
|
|
3963
4053
|
}) => {
|
|
3964
4054
|
const ref = useRef(null);
|
|
3965
4055
|
const inpRef = useRef(null);
|
|
4056
|
+
const configStyles = compereConfigs();
|
|
3966
4057
|
const memoizedItems = useMemo(() => filesArray, [filesArray]);
|
|
4058
|
+
const classProps = classnames(className ? className : configStyles.FILE.className);
|
|
3967
4059
|
const [error, setError] = useState('');
|
|
3968
4060
|
const [isHover, setIsHover] = useState(false);
|
|
3969
4061
|
const [singleFile, setSingleFile] = useState(null);
|
|
3970
4062
|
const [choosenFileCount, setChoosenFileCount] = useState(0);
|
|
3971
4063
|
const [image, setImage] = useState(!multiple ? defaultData ? defaultData.type !== 'application/pdf' ? defaultData.url : 'pdf' : null : null);
|
|
3972
|
-
const configStyles = compereConfigs();
|
|
3973
4064
|
const handleRemoveComponent = () => {
|
|
3974
4065
|
if (!multiple) {
|
|
3975
4066
|
removeFile && removeFile(singleFile);
|
|
@@ -4172,8 +4263,9 @@ const NewFile = ({
|
|
|
4172
4263
|
ref: ref,
|
|
4173
4264
|
style: {
|
|
4174
4265
|
width: '100%',
|
|
4175
|
-
maxWidth: maxWidth ? maxWidth : configStyles.
|
|
4176
|
-
}
|
|
4266
|
+
maxWidth: maxWidth ? maxWidth : configStyles.FILE.maxWidth
|
|
4267
|
+
},
|
|
4268
|
+
className: classProps
|
|
4177
4269
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
4178
4270
|
style: {
|
|
4179
4271
|
display: 'flex',
|
|
@@ -4183,8 +4275,8 @@ const NewFile = ({
|
|
|
4183
4275
|
}
|
|
4184
4276
|
}, label && /*#__PURE__*/React__default.createElement("label", {
|
|
4185
4277
|
style: {
|
|
4186
|
-
color: labelColor ? labelColor : configStyles.
|
|
4187
|
-
fontSize: labelSize ? labelSize : configStyles.
|
|
4278
|
+
color: labelColor ? labelColor : configStyles.FILE.labelColor,
|
|
4279
|
+
fontSize: labelSize ? labelSize : configStyles.FILE.labelSize
|
|
4188
4280
|
}
|
|
4189
4281
|
}, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))), deleteComponent && /*#__PURE__*/React__default.createElement("span", {
|
|
4190
4282
|
style: {
|
|
@@ -4200,11 +4292,11 @@ const NewFile = ({
|
|
|
4200
4292
|
boxSizing: 'border-box',
|
|
4201
4293
|
justifyContent: 'center',
|
|
4202
4294
|
cursor: !disabled ? 'pointer' : 'not-allowed',
|
|
4203
|
-
height: height ? height : configStyles.
|
|
4204
|
-
border: border ? border : configStyles.
|
|
4205
|
-
borderRadius: radius ? radius : configStyles.
|
|
4206
|
-
backgroundColor: backgroundColor ? backgroundColor : configStyles.
|
|
4207
|
-
borderColor: error ? errorColor ? errorColor : configStyles.
|
|
4295
|
+
height: height ? height : configStyles.FILE.height,
|
|
4296
|
+
border: border ? border : configStyles.FILE.border,
|
|
4297
|
+
borderRadius: radius ? radius : configStyles.FILE.radius,
|
|
4298
|
+
backgroundColor: backgroundColor ? backgroundColor : configStyles.FILE.backgroundColor,
|
|
4299
|
+
borderColor: error ? errorColor ? errorColor : configStyles.FILE.errorColor : disabled ? borderColor ? borderColor : configStyles.FILE.borderColor : isHover ? borderHoverColor ? borderHoverColor : configStyles.FILE.borderHoverColor : borderColor ? borderColor : configStyles.FILE.borderColor
|
|
4208
4300
|
},
|
|
4209
4301
|
onDrop: handleDrop,
|
|
4210
4302
|
onClick: handleClick,
|
|
@@ -4228,9 +4320,9 @@ const NewFile = ({
|
|
|
4228
4320
|
alignItems: 'center',
|
|
4229
4321
|
flexDirection: 'column',
|
|
4230
4322
|
justifyContent: 'center',
|
|
4231
|
-
color: color ? color : configStyles.
|
|
4232
|
-
fontSize: size ? size : configStyles.
|
|
4233
|
-
fontWeight: weight ? weight : configStyles.
|
|
4323
|
+
color: color ? color : configStyles.FILE.color,
|
|
4324
|
+
fontSize: size ? size : configStyles.FILE.size,
|
|
4325
|
+
fontWeight: weight ? weight : configStyles.FILE.weight
|
|
4234
4326
|
}
|
|
4235
4327
|
}, !multiple && image ? image === 'pdf' ? /*#__PURE__*/React__default.createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? /*#__PURE__*/React__default.createElement(SvgHeic, null) : /*#__PURE__*/React__default.createElement("img", {
|
|
4236
4328
|
src: image,
|
|
@@ -4239,27 +4331,27 @@ const NewFile = ({
|
|
|
4239
4331
|
maxWidth: '100%',
|
|
4240
4332
|
maxHeight: '95%',
|
|
4241
4333
|
objectFit: 'contain',
|
|
4242
|
-
width: fileAreaImageWidth ? fileAreaImageWidth : configStyles.
|
|
4243
|
-
height: fileAreaImageHeight ? fileAreaImageHeight : configStyles.
|
|
4334
|
+
width: fileAreaImageWidth ? fileAreaImageWidth : configStyles.FILE.fileAreaImageWidth,
|
|
4335
|
+
height: fileAreaImageHeight ? fileAreaImageHeight : configStyles.FILE.fileAreaImageHeight
|
|
4244
4336
|
},
|
|
4245
4337
|
alt: "file preview"
|
|
4246
4338
|
}) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(SvgUpload, null)), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("p", {
|
|
4247
4339
|
style: {
|
|
4248
4340
|
margin: '0px'
|
|
4249
4341
|
}
|
|
4250
|
-
}, putFileHere ? putFileHere : configStyles.
|
|
4342
|
+
}, putFileHere ? putFileHere : configStyles.FILE.putFileHere, /*#__PURE__*/React__default.createElement("br", null), or ? or : configStyles.FILE.or, ' ', /*#__PURE__*/React__default.createElement("span", {
|
|
4251
4343
|
style: {
|
|
4252
|
-
color: uploadColor ? uploadColor : configStyles.
|
|
4344
|
+
color: uploadColor ? uploadColor : configStyles.FILE.uploadColor
|
|
4253
4345
|
}
|
|
4254
|
-
}, upload ? upload : configStyles.
|
|
4346
|
+
}, upload ? upload : configStyles.FILE.upload))), /*#__PURE__*/React__default.createElement("div", {
|
|
4255
4347
|
style: {
|
|
4256
|
-
marginTop: extentionsRowMarginTop ? extentionsRowMarginTop : configStyles.
|
|
4348
|
+
marginTop: extentionsRowMarginTop ? extentionsRowMarginTop : configStyles.FILE.extentionsRowMarginTop
|
|
4257
4349
|
}
|
|
4258
4350
|
}, /*#__PURE__*/React__default.createElement("p", {
|
|
4259
4351
|
style: {
|
|
4260
4352
|
margin: '0px'
|
|
4261
4353
|
}
|
|
4262
|
-
}, fileSizeText ? fileSizeText : configStyles.
|
|
4354
|
+
}, fileSizeText ? fileSizeText : configStyles.FILE.fileSizeText, " ", maxSize, "\u0544\u0532 (", ' ', fileExtensions.toString().split(',').join(', '), " )")))), /*#__PURE__*/React__default.createElement("div", {
|
|
4263
4355
|
style: {
|
|
4264
4356
|
position: 'absolute',
|
|
4265
4357
|
top: '0px',
|
|
@@ -4272,9 +4364,9 @@ const NewFile = ({
|
|
|
4272
4364
|
boxSizing: 'border-box',
|
|
4273
4365
|
alignItems: 'flex-start',
|
|
4274
4366
|
justifyContent: 'flex-end',
|
|
4275
|
-
borderRadius: radius ? radius : configStyles.
|
|
4367
|
+
borderRadius: radius ? radius : configStyles.FILE.radius,
|
|
4276
4368
|
display: !multiple && !disabled && image && !error && isHover ? 'flex' : 'none',
|
|
4277
|
-
backgroundColor: hiddenBackgroundColor ? hiddenBackgroundColor : configStyles.
|
|
4369
|
+
backgroundColor: hiddenBackgroundColor ? hiddenBackgroundColor : configStyles.FILE.hiddenBackgroundColor
|
|
4278
4370
|
},
|
|
4279
4371
|
onClick: handleStopPropagation
|
|
4280
4372
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -4286,8 +4378,8 @@ const NewFile = ({
|
|
|
4286
4378
|
style: {
|
|
4287
4379
|
marginTop: '6px',
|
|
4288
4380
|
display: 'inline-block',
|
|
4289
|
-
color: errorColor ? errorColor : configStyles.
|
|
4290
|
-
fontSize: errorSize ? errorSize : configStyles.
|
|
4381
|
+
color: errorColor ? errorColor : configStyles.FILE.errorColor,
|
|
4382
|
+
fontSize: errorSize ? errorSize : configStyles.FILE.errorSize
|
|
4291
4383
|
}
|
|
4292
4384
|
}, error) : '', multiple && memoizedItems && memoizedItems.length > 0 && memoizedItems.map(item => {
|
|
4293
4385
|
return /*#__PURE__*/React__default.createElement(FileItem, {
|
|
@@ -4299,20 +4391,20 @@ const NewFile = ({
|
|
|
4299
4391
|
name: item.file.name,
|
|
4300
4392
|
timeForRemoveError: timeForRemoveError,
|
|
4301
4393
|
removeFile: removeFile ? removeFile : _ => _,
|
|
4302
|
-
radius: radius ? radius : configStyles.
|
|
4394
|
+
radius: radius ? radius : configStyles.FILE.radius,
|
|
4303
4395
|
fileFormat: item.file.type.split('/')[1]?.toLowerCase(),
|
|
4304
|
-
progressColor: progressColor ? progressColor : configStyles.
|
|
4305
|
-
listItemHeight: listItemHeight ? listItemHeight : configStyles.
|
|
4306
|
-
listItemPadding: listItemPadding ? listItemPadding : configStyles.
|
|
4307
|
-
progressFontSize: progressFontSize ? progressFontSize : configStyles.
|
|
4308
|
-
listItemErrorSize: listItemErrorSize ? listItemErrorSize : configStyles.
|
|
4309
|
-
listItemErrorColor: listItemErrorColor ? listItemErrorColor : configStyles.
|
|
4310
|
-
progressTrackColor: progressTrackColor ? progressTrackColor : configStyles.
|
|
4311
|
-
progressFailedColor: progressFailedColor ? progressFailedColor : configStyles.
|
|
4312
|
-
progressSuccessColor: progressSuccessColor ? progressSuccessColor : configStyles.
|
|
4313
|
-
progressLoadingColor: progressLoadingColor ? progressLoadingColor : configStyles.
|
|
4314
|
-
listItemBackgroundColor: listItemBackgroundColor ? listItemBackgroundColor : configStyles.
|
|
4315
|
-
listItemBackgroundErrorColor: listItemBackgroundErrorColor ? listItemBackgroundErrorColor : configStyles.
|
|
4396
|
+
progressColor: progressColor ? progressColor : configStyles.FILE.progressColor,
|
|
4397
|
+
listItemHeight: listItemHeight ? listItemHeight : configStyles.FILE.listItemHeight,
|
|
4398
|
+
listItemPadding: listItemPadding ? listItemPadding : configStyles.FILE.listItemPadding,
|
|
4399
|
+
progressFontSize: progressFontSize ? progressFontSize : configStyles.FILE.progressFontSize,
|
|
4400
|
+
listItemErrorSize: listItemErrorSize ? listItemErrorSize : configStyles.FILE.listItemErrorSize,
|
|
4401
|
+
listItemErrorColor: listItemErrorColor ? listItemErrorColor : configStyles.FILE.listItemErrorColor,
|
|
4402
|
+
progressTrackColor: progressTrackColor ? progressTrackColor : configStyles.FILE.progressTrackColor,
|
|
4403
|
+
progressFailedColor: progressFailedColor ? progressFailedColor : configStyles.FILE.progressFailedColor,
|
|
4404
|
+
progressSuccessColor: progressSuccessColor ? progressSuccessColor : configStyles.FILE.progressSuccessColor,
|
|
4405
|
+
progressLoadingColor: progressLoadingColor ? progressLoadingColor : configStyles.FILE.progressLoadingColor,
|
|
4406
|
+
listItemBackgroundColor: listItemBackgroundColor ? listItemBackgroundColor : configStyles.FILE.listItemBackgroundColor,
|
|
4407
|
+
listItemBackgroundErrorColor: listItemBackgroundErrorColor ? listItemBackgroundErrorColor : configStyles.FILE.listItemBackgroundErrorColor
|
|
4316
4408
|
});
|
|
4317
4409
|
}));
|
|
4318
4410
|
};
|
|
@@ -4329,8 +4421,8 @@ NewFile.propTypes = {
|
|
|
4329
4421
|
upload: PropTypes.string,
|
|
4330
4422
|
weight: PropTypes.number,
|
|
4331
4423
|
maxSize: PropTypes.number,
|
|
4332
|
-
maxWidth: PropTypes.string,
|
|
4333
4424
|
removeFile: PropTypes.func,
|
|
4425
|
+
className: PropTypes.string,
|
|
4334
4426
|
errorSize: PropTypes.string,
|
|
4335
4427
|
labelSize: PropTypes.string,
|
|
4336
4428
|
labelColor: PropTypes.string,
|
|
@@ -4379,89 +4471,94 @@ NewFile.defaultProps = {
|
|
|
4379
4471
|
fileExtensions: ['jpg', 'jpeg', 'png', 'pdf', 'heic']
|
|
4380
4472
|
};
|
|
4381
4473
|
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4474
|
+
const DirectionMode = {
|
|
4475
|
+
VERTICAL: 'vertical',
|
|
4476
|
+
HORINZONTAL: 'horizontal'
|
|
4477
|
+
};
|
|
4386
4478
|
const Checkbox = ({
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
className,
|
|
4390
|
-
jsonData,
|
|
4391
|
-
onChange,
|
|
4479
|
+
data,
|
|
4480
|
+
getData,
|
|
4392
4481
|
keyNames,
|
|
4393
|
-
|
|
4394
|
-
|
|
4482
|
+
className,
|
|
4483
|
+
direction,
|
|
4484
|
+
checkedIcon,
|
|
4485
|
+
unCheckedIcon,
|
|
4486
|
+
labelMarginLeft,
|
|
4487
|
+
checkBoxMarginBottom
|
|
4395
4488
|
}) => {
|
|
4396
|
-
const
|
|
4397
|
-
const
|
|
4398
|
-
const
|
|
4399
|
-
|
|
4400
|
-
const
|
|
4401
|
-
|
|
4402
|
-
|
|
4489
|
+
const configStyles = compereConfigs();
|
|
4490
|
+
const [innerData, setInnerData] = useState([]);
|
|
4491
|
+
const classProps = classnames(className ? className : configStyles.CHECKBOX.className);
|
|
4492
|
+
const handleSendData = (_, e, index) => {
|
|
4493
|
+
const dataForSend = {};
|
|
4494
|
+
setInnerData(prev => prev.map((innerItem, innerIndex) => {
|
|
4495
|
+
if (innerIndex === index) {
|
|
4496
|
+
innerItem[keyNames.checked] = !innerItem[keyNames.checked];
|
|
4497
|
+
dataForSend.item = innerItem;
|
|
4498
|
+
dataForSend.itemIndex = innerIndex;
|
|
4499
|
+
dataForSend.itemId = innerItem[keyNames.id];
|
|
4500
|
+
}
|
|
4501
|
+
return innerItem;
|
|
4502
|
+
}));
|
|
4503
|
+
dataForSend.checkboxArr = innerData;
|
|
4504
|
+
getData && getData(dataForSend);
|
|
4505
|
+
};
|
|
4403
4506
|
useEffect(() => {
|
|
4404
|
-
|
|
4507
|
+
if (Array.isArray(data)) {
|
|
4508
|
+
setInnerData(data);
|
|
4509
|
+
} else {
|
|
4510
|
+
setInnerData([data]);
|
|
4511
|
+
}
|
|
4405
4512
|
}, [data]);
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4513
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
4514
|
+
style: {
|
|
4515
|
+
width: '100%',
|
|
4516
|
+
display: 'flex',
|
|
4517
|
+
flexDirection: direction === 'vertical' ? 'column' : 'row'
|
|
4518
|
+
},
|
|
4519
|
+
className: classProps
|
|
4520
|
+
}, innerData && innerData.length > 0 && innerData.map((item, index) => {
|
|
4521
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
4522
|
+
key: `TUI_${index}_checkbox`,
|
|
4523
|
+
style: {
|
|
4524
|
+
width: 'fit-content',
|
|
4525
|
+
marginBottom: direction === 'vertical' ? checkBoxMarginBottom ? checkBoxMarginBottom : configStyles.CHECKBOX.checkBoxMarginBottom : '0px'
|
|
4411
4526
|
}
|
|
4412
|
-
}
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
} : '';
|
|
4427
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, data.map(element => {
|
|
4428
|
-
return /*#__PURE__*/React__default.createElement("label", {
|
|
4429
|
-
className: `${styles$3['checkbox-wrap']} checkbox-wrap-rem`,
|
|
4430
|
-
key: element.value
|
|
4431
|
-
}, /*#__PURE__*/React__default.createElement("input", _extends({
|
|
4432
|
-
type: "checkbox",
|
|
4433
|
-
className: classProps,
|
|
4434
|
-
disabled: disabled,
|
|
4435
|
-
required: required,
|
|
4436
|
-
value: keyNames.value ? element[keyNames.value] : '',
|
|
4437
|
-
name: keyNames.name ? element[keyNames.name] : '',
|
|
4438
|
-
id: keyNames.id ? element[keyNames.id] : '',
|
|
4439
|
-
onChange: handleChange,
|
|
4440
|
-
onClick: onClick ? onClick : () => {},
|
|
4441
|
-
defaultChecked: element.checked
|
|
4442
|
-
}, props)), /*#__PURE__*/React__default.createElement("span", {
|
|
4443
|
-
className: `${styles$3['checkmark']} checkmark-rem`
|
|
4444
|
-
}), element[keyNames.label] ? /*#__PURE__*/React__default.createElement("label", {
|
|
4445
|
-
className: styles$3.labelCheckbox,
|
|
4446
|
-
htmlFor: element[keyNames.id]
|
|
4447
|
-
}, element[keyNames.label]) : '');
|
|
4527
|
+
}, /*#__PURE__*/React__default.createElement(SingleCheckbox, {
|
|
4528
|
+
data: item,
|
|
4529
|
+
index: index,
|
|
4530
|
+
checkedColor: "#00236A",
|
|
4531
|
+
unCheckedColor: "#D1D1D1",
|
|
4532
|
+
checkedIcon: checkedIcon,
|
|
4533
|
+
label: item[keyNames.label],
|
|
4534
|
+
unCheckedIcon: unCheckedIcon,
|
|
4535
|
+
handleChecked: handleSendData,
|
|
4536
|
+
checked: item[keyNames.checked],
|
|
4537
|
+
disabled: item[keyNames.disabled],
|
|
4538
|
+
ignoreDisabledForChecked: item[keyNames.ignoreDisabledForChecked],
|
|
4539
|
+
labelMarginLeft: labelMarginLeft ? labelMarginLeft : configStyles.CHECKBOX.labelMarginLeft
|
|
4540
|
+
}));
|
|
4448
4541
|
}));
|
|
4449
4542
|
};
|
|
4450
4543
|
Checkbox.propTypes = {
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
label: PropTypes.string,
|
|
4460
|
-
keyNames: PropTypes.object
|
|
4544
|
+
getData: PropTypes.func,
|
|
4545
|
+
keyNames: PropTypes.object,
|
|
4546
|
+
checkedIcon: PropTypes.element,
|
|
4547
|
+
unCheckedIcon: PropTypes.element,
|
|
4548
|
+
labelMarginLeft: PropTypes.string,
|
|
4549
|
+
checkBoxMarginBottom: PropTypes.string,
|
|
4550
|
+
direction: PropTypes.oneOf(Object.values(DirectionMode)),
|
|
4551
|
+
data: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.object), PropTypes.object])
|
|
4461
4552
|
};
|
|
4462
4553
|
Checkbox.defaultProps = {
|
|
4463
|
-
|
|
4464
|
-
|
|
4554
|
+
direction: 'vertical',
|
|
4555
|
+
keyNames: {
|
|
4556
|
+
id: 'id',
|
|
4557
|
+
label: 'label',
|
|
4558
|
+
checked: 'checked',
|
|
4559
|
+
disabled: 'disabled',
|
|
4560
|
+
ignoreDisabledForChecked: 'ignoreDisabledForChecked'
|
|
4561
|
+
}
|
|
4465
4562
|
};
|
|
4466
4563
|
|
|
4467
4564
|
var css_248z$4 = "textarea{-webkit-appearance:none}textarea::-webkit-scrollbar{width:6px}textarea::-webkit-scrollbar-track{background:#eee}textarea::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-track{border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px}textarea::-webkit-scrollbar-thumb{background:#d1d1d1}";
|
|
@@ -4489,6 +4586,7 @@ const Textarea = ({
|
|
|
4489
4586
|
labelSize,
|
|
4490
4587
|
errorSize,
|
|
4491
4588
|
marginTop,
|
|
4589
|
+
className,
|
|
4492
4590
|
labelColor,
|
|
4493
4591
|
errorColor,
|
|
4494
4592
|
labelWeight,
|
|
@@ -4505,6 +4603,7 @@ const Textarea = ({
|
|
|
4505
4603
|
const [isHover, setIsHover] = useState(false);
|
|
4506
4604
|
const [isFocus, setIsFocus] = useState(false);
|
|
4507
4605
|
const [innerValue, setInnerValue] = useState('');
|
|
4606
|
+
const classProps = classnames(className ? className : configStyles.TEXTAREA.className);
|
|
4508
4607
|
const configStyles = compereConfigs();
|
|
4509
4608
|
const handleMouseEnter = () => {
|
|
4510
4609
|
setIsHover(true);
|
|
@@ -4553,7 +4652,8 @@ const Textarea = ({
|
|
|
4553
4652
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
4554
4653
|
style: {
|
|
4555
4654
|
width: width ? width : configStyles.TEXTAREA.width
|
|
4556
|
-
}
|
|
4655
|
+
},
|
|
4656
|
+
className: classProps
|
|
4557
4657
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
4558
4658
|
style: {
|
|
4559
4659
|
display: 'flex',
|
|
@@ -4630,6 +4730,7 @@ Textarea.propTypes = {
|
|
|
4630
4730
|
maxLength: PropTypes.number,
|
|
4631
4731
|
labelSize: PropTypes.string,
|
|
4632
4732
|
errorSize: PropTypes.string,
|
|
4733
|
+
className: PropTypes.string,
|
|
4633
4734
|
labelColor: PropTypes.string,
|
|
4634
4735
|
errorColor: PropTypes.string,
|
|
4635
4736
|
labelWeight: PropTypes.string,
|
|
@@ -4681,7 +4782,7 @@ const Typography = ({
|
|
|
4681
4782
|
...props
|
|
4682
4783
|
}) => {
|
|
4683
4784
|
const configStyles = compereConfigs();
|
|
4684
|
-
const classProps = classnames(className);
|
|
4785
|
+
const classProps = classnames(className ? className : configStyles.TYPOGRAPHY.className);
|
|
4685
4786
|
const [isHover, setIsHover] = useState(false);
|
|
4686
4787
|
const [validVariant, setValidVariant] = useState(false);
|
|
4687
4788
|
useEffect(() => {
|
|
@@ -4835,6 +4936,7 @@ const Pagination = ({
|
|
|
4835
4936
|
totalCount,
|
|
4836
4937
|
currentPage
|
|
4837
4938
|
}) => {
|
|
4939
|
+
const configStyles = compereConfigs();
|
|
4838
4940
|
const [inpVal, setInpVal] = useState('');
|
|
4839
4941
|
const [error, setError] = useState(false);
|
|
4840
4942
|
const [currentPageNumber, setCurrentPage] = useState(currentPage);
|
|
@@ -4861,7 +4963,7 @@ const Pagination = ({
|
|
|
4861
4963
|
if (currentPageNumber === 0 || paginationRange?.length < 2) {
|
|
4862
4964
|
return null;
|
|
4863
4965
|
}
|
|
4864
|
-
const classProps = classnames(styles$2.list, className ? className : `${styles$2['pagination-bar']} pagination-bar-rem`);
|
|
4966
|
+
const classProps = classnames(styles$2.list, className ? className : configStyles.PAGINATION.className, `${styles$2['pagination-bar']} pagination-bar-rem`);
|
|
4865
4967
|
const onNext = () => {
|
|
4866
4968
|
onPageChange(currentPageNumber + 1);
|
|
4867
4969
|
};
|
|
@@ -4915,10 +5017,9 @@ const Pagination = ({
|
|
|
4915
5017
|
margin: '0 auto',
|
|
4916
5018
|
alignItems: 'center',
|
|
4917
5019
|
justifyContent: 'center'
|
|
4918
|
-
}
|
|
4919
|
-
}, /*#__PURE__*/React__default.createElement("ul", {
|
|
5020
|
+
},
|
|
4920
5021
|
className: classProps
|
|
4921
|
-
}, /*#__PURE__*/React__default.createElement("button", {
|
|
5022
|
+
}, /*#__PURE__*/React__default.createElement("ul", null, /*#__PURE__*/React__default.createElement("button", {
|
|
4922
5023
|
style: {
|
|
4923
5024
|
transform: 'rotate(180deg)'
|
|
4924
5025
|
},
|
|
@@ -5262,7 +5363,7 @@ const NewAutocomplete = ({
|
|
|
5262
5363
|
setInnerValue(selectedValue[keyNames.name]);
|
|
5263
5364
|
getItem(selectedValue);
|
|
5264
5365
|
};
|
|
5265
|
-
const optionList = /*#__PURE__*/React__default.createElement(
|
|
5366
|
+
const optionList = /*#__PURE__*/React__default.createElement("div", null, show && innerOptions && !disabled ? innerOptions.length > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
5266
5367
|
style: {
|
|
5267
5368
|
left: contentBottomLeft ? contentBottomLeft : configStyles.NEWAUTOCOMPLETE.contentBottomLeft,
|
|
5268
5369
|
width: contentBottomWidth ? contentBottomWidth : configStyles.NEWAUTOCOMPLETE.contentBottomWidth,
|
|
@@ -5352,7 +5453,9 @@ const NewAutocomplete = ({
|
|
|
5352
5453
|
useEffect(() => {
|
|
5353
5454
|
setInnerError(errorMessage);
|
|
5354
5455
|
}, [errorMessage]);
|
|
5355
|
-
return /*#__PURE__*/React__default.createElement(
|
|
5456
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
5457
|
+
className: classProps
|
|
5458
|
+
}, label ? /*#__PURE__*/React__default.createElement("label", {
|
|
5356
5459
|
style: {
|
|
5357
5460
|
color: labelColor ? labelColor : configStyles.NEWAUTOCOMPLETE.labelColor,
|
|
5358
5461
|
fontSize: labelSize ? labelSize : configStyles.NEWAUTOCOMPLETE.labelSize,
|
|
@@ -5380,7 +5483,6 @@ const NewAutocomplete = ({
|
|
|
5380
5483
|
onInput: handleChange,
|
|
5381
5484
|
onMouseEnter: handleMouseEnter,
|
|
5382
5485
|
onMouseLeave: handleMouseLeave,
|
|
5383
|
-
className: classProps,
|
|
5384
5486
|
placeholder: placeHolder ? placeHolder : '',
|
|
5385
5487
|
autoComplete: autoComplete ? autoComplete : configStyles.NEWAUTOCOMPLETE.autoComplete,
|
|
5386
5488
|
style: {
|
|
@@ -5494,4 +5596,4 @@ NewAutocomplete.defaultProps = {
|
|
|
5494
5596
|
disabled: false
|
|
5495
5597
|
};
|
|
5496
5598
|
|
|
5497
|
-
export { Autocomplate, Button, Captcha, Checkbox, File, Input, InputTypes, Modal, NewAutocomplete, NewFile, Pagination, Radio, Select,
|
|
5599
|
+
export { Autocomplate, Button, Captcha, Checkbox, DirectionMode, File, Input, InputTypes, Modal, NewAutocomplete, NewFile, Pagination, Radio, Select, Stepper, Table, Textarea, Toaster, Tooltip, Typography, TypographyType, toast };
|