@xaypay/tui 0.0.105 → 0.0.107
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/.eslintrc.js +30 -0
- package/.husky/pre-commit +4 -0
- package/.prettierrc +10 -0
- package/.storybook/main.js +42 -45
- package/.storybook/preview.js +7 -7
- package/cli-command.js +1 -1
- package/dist/index.es.js +105 -94
- package/dist/index.js +105 -94
- package/package.json +16 -4
- package/rollup.config.js +11 -11
- package/src/assets_old/icons/demo-files/demo.js +16 -18
- package/src/components/autocomplate/autocomplate.stories.js +30 -28
- package/src/components/autocomplate/index.js +145 -127
- package/src/components/button/button.stories.js +6 -6
- package/src/components/button/index.js +176 -126
- package/src/components/captcha/captcha.stories.js +12 -8
- package/src/components/captcha/index.js +47 -50
- package/src/components/checkbox/checkbox.stories.js +7 -7
- package/src/components/checkbox/index.js +77 -93
- package/src/components/file/file.stories.js +15 -15
- package/src/components/file/index.js +114 -116
- package/src/components/icon/Arrow.js +18 -18
- package/src/components/icon/CaptchaArrowDown.js +18 -18
- package/src/components/icon/CaptchaArrowUp.js +18 -18
- package/src/components/icon/CheckboxChecked.js +20 -20
- package/src/components/icon/CheckboxUnchecked.js +20 -20
- package/src/components/icon/Close.js +18 -18
- package/src/components/icon/CloseIcon.js +18 -18
- package/src/components/icon/CloseSlide.js +18 -18
- package/src/components/icon/DeleteComponent.js +19 -19
- package/src/components/icon/Dots.js +18 -18
- package/src/components/icon/HeartFilled.js +22 -23
- package/src/components/icon/HeartOutline.js +22 -22
- package/src/components/icon/Icon.js +3 -5
- package/src/components/icon/ListItemDelete.js +18 -18
- package/src/components/icon/ListItemJpeg.js +20 -20
- package/src/components/icon/ListItemJpg.js +20 -20
- package/src/components/icon/ListItemPdf.js +20 -20
- package/src/components/icon/ListItemPng.js +20 -20
- package/src/components/icon/Next.js +19 -19
- package/src/components/icon/Nextarrow.js +18 -18
- package/src/components/icon/PDF.js +18 -18
- package/src/components/icon/Prev.js +19 -19
- package/src/components/icon/RangeArrowDefault.js +41 -52
- package/src/components/icon/RangeArrowError.js +41 -52
- package/src/components/icon/RangeArrowSuccess.js +41 -52
- package/src/components/icon/RemoveFile.js +19 -19
- package/src/components/icon/ToasterClose.js +18 -18
- package/src/components/icon/ToasterError.js +18 -18
- package/src/components/icon/ToasterInfo.js +18 -18
- package/src/components/icon/ToasterSuccess.js +18 -18
- package/src/components/icon/ToasterWarning.js +18 -18
- package/src/components/icon/Tooltip.js +18 -18
- package/src/components/icon/Upload.js +24 -24
- package/src/components/input/index.js +267 -224
- package/src/components/input/input.stories.js +20 -21
- package/src/components/modal/index.js +172 -159
- package/src/components/modal/modal.stories.js +79 -78
- package/src/components/newAutocomplete/NewAutocomplete.stories.js +93 -51
- package/src/components/newAutocomplete/index.js +342 -216
- package/src/components/newFile/fileItem.js +214 -191
- package/src/components/newFile/index.js +235 -173
- package/src/components/newFile/newFile.stories.js +32 -35
- package/src/components/pagination/index.js +97 -122
- package/src/components/pagination/pagination.stories.js +362 -362
- package/src/components/pagination/paginationRange.js +42 -53
- package/src/components/radio/index.js +49 -62
- package/src/components/radio/radio.stories.js +7 -7
- package/src/components/select/index.js +318 -223
- package/src/components/select/select.stories.js +25 -14
- package/src/components/singleCheckbox/Checkbox.js +31 -34
- package/src/components/singleCheckbox/index.js +36 -45
- package/src/components/singleCheckbox/singleCheckbox.stories.js +16 -16
- package/src/components/stepper/index.js +35 -30
- package/src/components/stepper/stepper.stories.js +11 -11
- package/src/components/table/index.js +280 -148
- package/src/components/table/table.stories.js +105 -217
- package/src/components/table/td.js +80 -72
- package/src/components/table/th.js +19 -16
- package/src/components/textarea/index.js +86 -62
- package/src/components/textarea/textarea.stories.js +10 -13
- package/src/components/toaster/Toast.js +180 -158
- package/src/components/toaster/index.js +108 -111
- package/src/components/toaster/toaster.module.css +13 -0
- package/src/components/toaster/toaster.stories.js +582 -367
- package/src/components/tooltip/index.js +79 -46
- package/src/components/tooltip/tooltip.stories.js +9 -10
- package/src/components/typography/index.js +108 -101
- package/src/components/typography/typography.stories.js +16 -19
- package/src/index.js +20 -20
- package/src/stories/configuration.stories.mdx +1 -0
- package/src/utils/index.js +11 -11
- package/tui.config.js +343 -340
package/dist/index.es.js
CHANGED
|
@@ -77,11 +77,9 @@ const File = ({
|
|
|
77
77
|
required,
|
|
78
78
|
disabled,
|
|
79
79
|
onChange,
|
|
80
|
-
className,
|
|
81
80
|
defaultData,
|
|
82
81
|
errorMessage,
|
|
83
|
-
fileExtensions
|
|
84
|
-
...props
|
|
82
|
+
fileExtensions
|
|
85
83
|
}) => {
|
|
86
84
|
const [error, setError] = useState('');
|
|
87
85
|
const [fileName, setFileName] = useState('no selected file');
|
|
@@ -127,13 +125,13 @@ const File = ({
|
|
|
127
125
|
target: null
|
|
128
126
|
});
|
|
129
127
|
setFileName('no selected file');
|
|
130
|
-
document.querySelector(`.${name}`).value =
|
|
128
|
+
document.querySelector(`.${name}`).value = '';
|
|
131
129
|
};
|
|
132
130
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("p", {
|
|
133
131
|
className: `${styles$c['file-form-title']} ile-form-title-rem`
|
|
134
132
|
}, label, " ", required && /*#__PURE__*/React__default.createElement("sup", {
|
|
135
133
|
style: {
|
|
136
|
-
color:
|
|
134
|
+
color: '#ee0000'
|
|
137
135
|
}
|
|
138
136
|
}, "*")), /*#__PURE__*/React__default.createElement("div", {
|
|
139
137
|
className: classnames(`${styles$c['file-form-wrap']} file-form-wrap-rem`, image ? styles$c['active'] : '')
|
|
@@ -290,7 +288,7 @@ const Checkbox$1 = ({
|
|
|
290
288
|
fillColor: checkedColor ? checkedColor : configStyles.SINGLECHECKBOX.checkedColor
|
|
291
289
|
}) : /*#__PURE__*/React__default.createElement(SvgCheckboxUnchecked, {
|
|
292
290
|
fillColor: unCheckedColor ? unCheckedColor : configStyles.SINGLECHECKBOX.unCheckedColor
|
|
293
|
-
}));
|
|
291
|
+
}), data?.label && /*#__PURE__*/React__default.createElement("span", null, data.label));
|
|
294
292
|
};
|
|
295
293
|
|
|
296
294
|
const SingleCheckbox = ({
|
|
@@ -326,12 +324,12 @@ const SingleCheckbox = ({
|
|
|
326
324
|
});
|
|
327
325
|
};
|
|
328
326
|
SingleCheckbox.propTypes = {
|
|
327
|
+
data: PropTypes.object,
|
|
329
328
|
onClick: PropTypes.func,
|
|
330
329
|
styles: PropTypes.object,
|
|
331
330
|
disabled: PropTypes.bool,
|
|
332
331
|
checkedColor: PropTypes.string,
|
|
333
|
-
unCheckedColor: PropTypes.string
|
|
334
|
-
data: PropTypes.oneOfType([PropTypes.object, PropTypes.array]).isRequired
|
|
332
|
+
unCheckedColor: PropTypes.string
|
|
335
333
|
};
|
|
336
334
|
|
|
337
335
|
var css_248z$e = ".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{cursor:pointer;display:inline-block;position:relative}.table-module_td-span__XHo6k>svg{left:0;position:absolute;top:0;z-index:-1}";
|
|
@@ -353,10 +351,13 @@ styleInject(css_248z$e);
|
|
|
353
351
|
tBodyFontWeight: PropTypes.string,
|
|
354
352
|
tBodyFontFamily: PropTypes.string,
|
|
355
353
|
tBodyRowBorder: PropTypes.string,
|
|
356
|
-
handleCheckedBody: PropTypes.func,
|
|
357
|
-
handleCheckedHeader: PropTypes.func,
|
|
358
|
-
handleHeaderItemClick: PropTypes.func,
|
|
359
|
-
handleBodyActionClick: PropTypes.func
|
|
354
|
+
// handleCheckedBody: PropTypes.func,
|
|
355
|
+
// handleCheckedHeader: PropTypes.func,
|
|
356
|
+
// handleHeaderItemClick: PropTypes.func,
|
|
357
|
+
// handleBodyActionClick: PropTypes.func
|
|
358
|
+
|
|
359
|
+
setTableDataBody: PropTypes.func,
|
|
360
|
+
setTableDataHeader: PropTypes.func
|
|
360
361
|
});
|
|
361
362
|
|
|
362
363
|
var css_248z$d = ".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)}}";
|
|
@@ -477,7 +478,8 @@ const Modal = ({
|
|
|
477
478
|
justifyContent,
|
|
478
479
|
backgroundColor,
|
|
479
480
|
grayDecorHeight,
|
|
480
|
-
layerBackgroundColor
|
|
481
|
+
layerBackgroundColor,
|
|
482
|
+
imageWrapHeight
|
|
481
483
|
}) => {
|
|
482
484
|
const [select, setSelect] = useState(0);
|
|
483
485
|
const [innerData, setInnerData] = useState([]);
|
|
@@ -650,10 +652,12 @@ const Modal = ({
|
|
|
650
652
|
}
|
|
651
653
|
}, /*#__PURE__*/React__default.createElement(SvgCloseSlide, null))), /*#__PURE__*/React__default.createElement("div", {
|
|
652
654
|
style: {
|
|
653
|
-
|
|
655
|
+
width: '100%',
|
|
656
|
+
height: imageWrapHeight ? imageWrapHeight : configStyles.MODAL.imageWrapHeight
|
|
654
657
|
}
|
|
655
658
|
}, innerData && innerData.length > 0 && innerData.map((item, index) => {
|
|
656
659
|
if (select === index) {
|
|
660
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
657
661
|
if (!item.hasOwnProperty('url')) {
|
|
658
662
|
alert('Please add url property in data prop on each element');
|
|
659
663
|
} else {
|
|
@@ -672,7 +676,7 @@ const Modal = ({
|
|
|
672
676
|
}
|
|
673
677
|
}
|
|
674
678
|
}), innerData && innerData.length > 1 && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("button", {
|
|
675
|
-
onClick:
|
|
679
|
+
onClick: () => handleGoTo('prev'),
|
|
676
680
|
style: {
|
|
677
681
|
position: 'absolute',
|
|
678
682
|
left: '14px',
|
|
@@ -686,7 +690,7 @@ const Modal = ({
|
|
|
686
690
|
backgroundColor: 'transparent'
|
|
687
691
|
}
|
|
688
692
|
}, /*#__PURE__*/React__default.createElement(SvgPrev, null)), /*#__PURE__*/React__default.createElement("button", {
|
|
689
|
-
onClick:
|
|
693
|
+
onClick: () => handleGoTo('next'),
|
|
690
694
|
style: {
|
|
691
695
|
position: 'absolute',
|
|
692
696
|
width: '24px',
|
|
@@ -741,9 +745,9 @@ styleInject(css_248z$c);
|
|
|
741
745
|
|
|
742
746
|
const InputTypes = {
|
|
743
747
|
TEL: 'tel',
|
|
744
|
-
TEXT:
|
|
748
|
+
TEXT: 'text',
|
|
745
749
|
NUMBER: 'number',
|
|
746
|
-
PASSWORD:
|
|
750
|
+
PASSWORD: 'password'
|
|
747
751
|
};
|
|
748
752
|
const P = styled.span`
|
|
749
753
|
animation: ${props => props.errorAnimation ? props.animation : 'none'};
|
|
@@ -789,7 +793,6 @@ const Input = ({
|
|
|
789
793
|
errorMessage,
|
|
790
794
|
autoComplete,
|
|
791
795
|
labelDisplay,
|
|
792
|
-
errorPosition,
|
|
793
796
|
boxShadowHover,
|
|
794
797
|
errorClassName,
|
|
795
798
|
errorAnimation,
|
|
@@ -825,7 +828,7 @@ const Input = ({
|
|
|
825
828
|
-o-transform: scale3d(1,1,1);
|
|
826
829
|
}
|
|
827
830
|
`;
|
|
828
|
-
const animation =
|
|
831
|
+
const animation = () => css`
|
|
829
832
|
${errorShow} ${errorAnimationDuration ? errorAnimationDuration : configStyles.INPUT.errorAnimationDuration} forwards
|
|
830
833
|
`;
|
|
831
834
|
const handleChange = event => {
|
|
@@ -1076,9 +1079,9 @@ const Input = ({
|
|
|
1076
1079
|
}
|
|
1077
1080
|
}, [type, value, regexp, maxLength, errorMessage, regexpErrorMessage, telErrorMessage]);
|
|
1078
1081
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
1079
|
-
className: `${styles$a[
|
|
1082
|
+
className: `${styles$a['input-wrap']}`
|
|
1080
1083
|
}, label ? /*#__PURE__*/React__default.createElement("label", {
|
|
1081
|
-
className: `${styles$a[
|
|
1084
|
+
className: `${styles$a['input-title']}`,
|
|
1082
1085
|
style: {
|
|
1083
1086
|
color: labelColor ? labelColor : configStyles.INPUT.labelColor,
|
|
1084
1087
|
fontSize: labelSize ? labelSize : configStyles.INPUT.labelSize,
|
|
@@ -1089,10 +1092,10 @@ const Input = ({
|
|
|
1089
1092
|
}
|
|
1090
1093
|
}, label, " ", required && /*#__PURE__*/React__default.createElement("sup", {
|
|
1091
1094
|
style: {
|
|
1092
|
-
color: errorColor ? errorColor :
|
|
1095
|
+
color: errorColor ? errorColor : '#ee0000'
|
|
1093
1096
|
}
|
|
1094
1097
|
}, "*")) : '', /*#__PURE__*/React__default.createElement("div", {
|
|
1095
|
-
className: `${styles$a[
|
|
1098
|
+
className: `${styles$a['input-content']}`,
|
|
1096
1099
|
style: {
|
|
1097
1100
|
width: width ? width : configStyles.INPUT.width,
|
|
1098
1101
|
borderRadius: radius ? radius : configStyles.INPUT.radius,
|
|
@@ -1136,7 +1139,7 @@ const Input = ({
|
|
|
1136
1139
|
value: innerValue,
|
|
1137
1140
|
className: classProps,
|
|
1138
1141
|
onInput: handleChange,
|
|
1139
|
-
disabled: disabled ? disabled :
|
|
1142
|
+
disabled: disabled ? disabled : '',
|
|
1140
1143
|
name: name ? name : `tui_${random}_tui`,
|
|
1141
1144
|
placeholder: placeholder ? placeholder : '',
|
|
1142
1145
|
type: show || type === 'number' ? 'text' : type,
|
|
@@ -1248,7 +1251,7 @@ Input.propTypes = {
|
|
|
1248
1251
|
value: PropTypes.oneOfType([PropTypes.string, PropTypes.object])
|
|
1249
1252
|
};
|
|
1250
1253
|
Input.defaultProps = {
|
|
1251
|
-
type:
|
|
1254
|
+
type: 'text'
|
|
1252
1255
|
};
|
|
1253
1256
|
|
|
1254
1257
|
var css_248z$b = ".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}";
|
|
@@ -1264,28 +1267,27 @@ const Radio = ({
|
|
|
1264
1267
|
value,
|
|
1265
1268
|
jsonData,
|
|
1266
1269
|
label,
|
|
1267
|
-
keyNames,
|
|
1268
1270
|
...props
|
|
1269
1271
|
}) => {
|
|
1270
1272
|
const classProps = classnames(styles$9.checkbox, className);
|
|
1271
1273
|
const parseData = jsonData.length !== 0 ? JSON.parse(jsonData) : [];
|
|
1272
1274
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, parseData.map((element, id) => {
|
|
1273
1275
|
return /*#__PURE__*/React__default.createElement("label", {
|
|
1274
|
-
className: `${styles$9[
|
|
1276
|
+
className: `${styles$9['radio-wrap']} radio-wrap-rem`,
|
|
1275
1277
|
key: element.value
|
|
1276
1278
|
}, /*#__PURE__*/React__default.createElement("input", _extends({
|
|
1277
1279
|
type: "radio",
|
|
1278
1280
|
className: classProps,
|
|
1279
1281
|
disabled: disabled,
|
|
1280
1282
|
required: required,
|
|
1281
|
-
defaultChecked: id === 0 ? defaultChecked :
|
|
1283
|
+
defaultChecked: id === 0 ? defaultChecked : '',
|
|
1282
1284
|
value: value ? value : element.value,
|
|
1283
1285
|
name: name ? name : element.name
|
|
1284
1286
|
}, props)), /*#__PURE__*/React__default.createElement("span", {
|
|
1285
|
-
className: `${styles$9[
|
|
1287
|
+
className: `${styles$9['radio-checkmark']} radio-checkmark-rem`
|
|
1286
1288
|
}), element.label ? /*#__PURE__*/React__default.createElement("span", {
|
|
1287
1289
|
className: styles$9.labelRadio
|
|
1288
|
-
}, label ? label : element.label) :
|
|
1290
|
+
}, label ? label : element.label) : '');
|
|
1289
1291
|
}));
|
|
1290
1292
|
};
|
|
1291
1293
|
Radio.propTypes = {
|
|
@@ -1307,6 +1309,7 @@ Radio.defaultProps = {
|
|
|
1307
1309
|
|
|
1308
1310
|
const Button = ({
|
|
1309
1311
|
icon,
|
|
1312
|
+
hoverIcon,
|
|
1310
1313
|
size,
|
|
1311
1314
|
type,
|
|
1312
1315
|
font,
|
|
@@ -1373,21 +1376,22 @@ const Button = ({
|
|
|
1373
1376
|
},
|
|
1374
1377
|
type: type ? type : configStyles.BUTTON.type,
|
|
1375
1378
|
disabled: disabled ? disabled : configStyles.BUTTON.disabled,
|
|
1376
|
-
onClick: disabled ? _ => _ : type !== 'submit' ? onClick ? onClick :
|
|
1379
|
+
onClick: disabled ? _ => _ : type !== 'submit' ? onClick ? onClick : () => alert('Add click event handler on Button component') : _ => _,
|
|
1377
1380
|
onMouseEnter: handleMouseEnter,
|
|
1378
1381
|
onMouseLeave: handleMouseLeave,
|
|
1379
1382
|
className: classProps
|
|
1380
|
-
}, props),
|
|
1383
|
+
}, props), isHover && hoverIcon ? hoverIcon : icon ?? null, ' ', label && /*#__PURE__*/React__default.createElement("span", {
|
|
1381
1384
|
style: {
|
|
1382
1385
|
marginLeft: icon ? btnIconMarginRight ? btnIconMarginRight : configStyles.BUTTON.btnIconMarginRight : '0px'
|
|
1383
1386
|
}
|
|
1384
|
-
}, label),
|
|
1387
|
+
}, label), ' ', !icon && !label && 'Add icon or label prop on Button component');
|
|
1385
1388
|
};
|
|
1386
1389
|
Button.propTypes = {
|
|
1387
1390
|
type: PropTypes.string,
|
|
1388
1391
|
size: PropTypes.string,
|
|
1389
1392
|
font: PropTypes.string,
|
|
1390
1393
|
icon: PropTypes.element,
|
|
1394
|
+
hoverIcon: PropTypes.element,
|
|
1391
1395
|
color: PropTypes.string,
|
|
1392
1396
|
width: PropTypes.string,
|
|
1393
1397
|
outline: PropTypes.bool,
|
|
@@ -1558,6 +1562,7 @@ const Select = ({
|
|
|
1558
1562
|
};
|
|
1559
1563
|
const isObjectEmpty = obj => {
|
|
1560
1564
|
for (var key in obj) {
|
|
1565
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
1561
1566
|
if (obj.hasOwnProperty(key)) {
|
|
1562
1567
|
return false;
|
|
1563
1568
|
}
|
|
@@ -1571,9 +1576,9 @@ const Select = ({
|
|
|
1571
1576
|
setOpened(false);
|
|
1572
1577
|
}
|
|
1573
1578
|
};
|
|
1574
|
-
document.addEventListener(
|
|
1579
|
+
document.addEventListener('mousedown', checkIfClickedOutside);
|
|
1575
1580
|
return () => {
|
|
1576
|
-
document.removeEventListener(
|
|
1581
|
+
document.removeEventListener('mousedown', checkIfClickedOutside);
|
|
1577
1582
|
};
|
|
1578
1583
|
}
|
|
1579
1584
|
}, [opened]);
|
|
@@ -1588,7 +1593,7 @@ const Select = ({
|
|
|
1588
1593
|
if (!multiple) {
|
|
1589
1594
|
options && options.length > 0 && setExistOptions(options);
|
|
1590
1595
|
} else {
|
|
1591
|
-
const modifiedOptions = options && options.length > 0 && options.map(
|
|
1596
|
+
const modifiedOptions = options && options.length > 0 && options.map(item => {
|
|
1592
1597
|
item.checked = false;
|
|
1593
1598
|
if (selected && selected.length > 0) {
|
|
1594
1599
|
selected.map(innerItem => {
|
|
@@ -1605,7 +1610,8 @@ const Select = ({
|
|
|
1605
1610
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
1606
1611
|
className: classProps,
|
|
1607
1612
|
style: {
|
|
1608
|
-
position: 'relative'
|
|
1613
|
+
position: 'relative',
|
|
1614
|
+
width: '100%'
|
|
1609
1615
|
}
|
|
1610
1616
|
}, label ? /*#__PURE__*/React__default.createElement("label", {
|
|
1611
1617
|
style: {
|
|
@@ -1619,9 +1625,9 @@ const Select = ({
|
|
|
1619
1625
|
}
|
|
1620
1626
|
}, label, required && /*#__PURE__*/React__default.createElement("sup", {
|
|
1621
1627
|
style: {
|
|
1622
|
-
color:
|
|
1628
|
+
color: '#ee0000'
|
|
1623
1629
|
}
|
|
1624
|
-
}, "*")) :
|
|
1630
|
+
}, "*")) : '', /*#__PURE__*/React__default.createElement("div", {
|
|
1625
1631
|
ref: ref
|
|
1626
1632
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1627
1633
|
className: styles$8['select-content']
|
|
@@ -1639,14 +1645,14 @@ const Select = ({
|
|
|
1639
1645
|
backgroundColor: disabled ? selectedDisableBackgroundColor ? selectedDisableBackgroundColor : configStyles.SELECT.selectedDisableBackgroundColor : selectedBackgroundColor ? selectedBackgroundColor : configStyles.SELECT.selectedBackgroundColor,
|
|
1640
1646
|
boxShadow: errorMessage ? errorColor ? `0 0 0 2px ${errorColor}` : `0 0 0 2px ${configStyles.SELECT.errorColor}` : isHover ? boxShadowHover ? boxShadowHover : configStyles.SELECT.boxShadowHover : boxShadow ? boxShadow : configStyles.SELECT.boxShadow
|
|
1641
1647
|
},
|
|
1642
|
-
onClick: disabled ? _ => _ :
|
|
1643
|
-
onMouseEnter: disabled ? _ => _ :
|
|
1644
|
-
onMouseLeave: disabled ? _ => _ :
|
|
1648
|
+
onClick: disabled ? _ => _ : () => handleOpenClose(),
|
|
1649
|
+
onMouseEnter: disabled ? _ => _ : () => handleMouseEnter(),
|
|
1650
|
+
onMouseLeave: disabled ? _ => _ : () => handleMouseLeave(),
|
|
1645
1651
|
className: `${styles$8['select-content-top']}`
|
|
1646
1652
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1647
1653
|
className: `${styles$8['select-content-top-text']}`,
|
|
1648
1654
|
style: {
|
|
1649
|
-
whiteSpace: 'nowrap',
|
|
1655
|
+
whiteSpace: disabled ? 'pre-wrap' : 'nowrap',
|
|
1650
1656
|
overflow: 'hidden',
|
|
1651
1657
|
textOverflow: 'ellipsis',
|
|
1652
1658
|
color: errorMessage ? errorColor ? errorColor : configStyles.SELECT.errorColor : isHover ? selectedHoverColor ? selectedHoverColor : configStyles.SELECT.selectedHoverColor : selectedColor ? selectedColor : configStyles.SELECT.selectedColor
|
|
@@ -1687,7 +1693,7 @@ const Select = ({
|
|
|
1687
1693
|
key: i,
|
|
1688
1694
|
disabled: true,
|
|
1689
1695
|
defaultValue: option[keyNames.id],
|
|
1690
|
-
onClick: disabled ? _ => _ :
|
|
1696
|
+
onClick: disabled ? _ => _ : () => handleSelectItem(option),
|
|
1691
1697
|
onMouseEnter: disabled ? _ => _ : e => handleMouseEnterOption(e),
|
|
1692
1698
|
onMouseLeave: disabled ? _ => _ : e => handleMouseLeaveOption(e),
|
|
1693
1699
|
className: `${styles$8['select-content-bottom-row']} ${dots || configStyles.SELECT.dots ? styles$8['ellipsis'] : ''}`,
|
|
@@ -1872,10 +1878,11 @@ const SvgToasterSuccess = ({
|
|
|
1872
1878
|
fill: fillColor ? fillColor : '#0DA574'
|
|
1873
1879
|
}));
|
|
1874
1880
|
|
|
1875
|
-
var css_248z$9 = "#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}@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}}";
|
|
1876
|
-
var styles$7 = {"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","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"};
|
|
1881
|
+
var css_248z$9 = "#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}}";
|
|
1882
|
+
var styles$7 = {"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"};
|
|
1877
1883
|
styleInject(css_248z$9);
|
|
1878
1884
|
|
|
1885
|
+
let wWidth$1 = window.innerWidth;
|
|
1879
1886
|
const ToasterType = {
|
|
1880
1887
|
info: 'info',
|
|
1881
1888
|
warn: 'warn',
|
|
@@ -1928,7 +1935,7 @@ const Toast = ({
|
|
|
1928
1935
|
style: {
|
|
1929
1936
|
position: 'absolute',
|
|
1930
1937
|
display: 'flex',
|
|
1931
|
-
width: '440px',
|
|
1938
|
+
width: wWidth$1 > 480 ? '440px' : '300px',
|
|
1932
1939
|
height: '83px',
|
|
1933
1940
|
borderRadius: '40px',
|
|
1934
1941
|
alignItems: 'center',
|
|
@@ -1965,8 +1972,9 @@ const Toast = ({
|
|
|
1965
1972
|
fontSize: '16px',
|
|
1966
1973
|
lineHeight: '22px',
|
|
1967
1974
|
fontStyle: 'normal'
|
|
1968
|
-
}
|
|
1969
|
-
|
|
1975
|
+
},
|
|
1976
|
+
className: styles$7['notify-title']
|
|
1977
|
+
}, title ? title : ''), /*#__PURE__*/React__default.createElement("span", {
|
|
1970
1978
|
style: {
|
|
1971
1979
|
fontWeight: 500,
|
|
1972
1980
|
color: '#3C393E',
|
|
@@ -1975,8 +1983,9 @@ const Toast = ({
|
|
|
1975
1983
|
fontStyle: 'normal',
|
|
1976
1984
|
fontFamily: '',
|
|
1977
1985
|
opacity: 0.8
|
|
1978
|
-
}
|
|
1979
|
-
|
|
1986
|
+
},
|
|
1987
|
+
className: styles$7['notify-desc']
|
|
1988
|
+
}, description ? description : '')), /*#__PURE__*/React__default.createElement("div", {
|
|
1980
1989
|
onClick: () => handleCloseToaster(ref),
|
|
1981
1990
|
style: {
|
|
1982
1991
|
width: '18px',
|
|
@@ -2001,7 +2010,9 @@ Toast.defaultProps = {
|
|
|
2001
2010
|
|
|
2002
2011
|
let toastify;
|
|
2003
2012
|
let path = window.location.href;
|
|
2013
|
+
let wWidth = window.innerWidth;
|
|
2004
2014
|
const removeToast = ref => {
|
|
2015
|
+
// eslint-disable-next-line react/no-find-dom-node
|
|
2005
2016
|
const node = ReactDOM.findDOMNode(ref.current);
|
|
2006
2017
|
const removeElem = node.parentNode;
|
|
2007
2018
|
const parent = removeElem.parentNode;
|
|
@@ -2024,7 +2035,7 @@ const createToast = ({
|
|
|
2024
2035
|
const toastBlock = document.createElement('div');
|
|
2025
2036
|
toastBlock.style.position = 'relative';
|
|
2026
2037
|
toastBlock.style.flexShrink = 0;
|
|
2027
|
-
toastBlock.style.width = '440px';
|
|
2038
|
+
toastBlock.style.width = wWidth > 480 ? '440px' : '300px';
|
|
2028
2039
|
toastBlock.style.height = '83px';
|
|
2029
2040
|
toastBlock.style.marginBottom = '20px';
|
|
2030
2041
|
const newElem = /*#__PURE__*/React__default.createElement(Toast, {
|
|
@@ -2176,7 +2187,7 @@ const Tooltip = ({
|
|
|
2176
2187
|
const handleShow = () => {
|
|
2177
2188
|
setShowTooltip(!showTooltip);
|
|
2178
2189
|
};
|
|
2179
|
-
useEffect(
|
|
2190
|
+
useEffect(() => {
|
|
2180
2191
|
if (!text) {
|
|
2181
2192
|
alert('Add text on tooltip');
|
|
2182
2193
|
}
|
|
@@ -2354,7 +2365,6 @@ const Captcha = ({
|
|
|
2354
2365
|
right: '0px',
|
|
2355
2366
|
width: '100%',
|
|
2356
2367
|
height: '4px',
|
|
2357
|
-
borderRadius: '2px',
|
|
2358
2368
|
backgroundColor: '#EEEEEE',
|
|
2359
2369
|
borderRadius: '10px',
|
|
2360
2370
|
zIndex: -2
|
|
@@ -2386,7 +2396,6 @@ const Captcha = ({
|
|
|
2386
2396
|
height: '4px',
|
|
2387
2397
|
borderRadius: '2px',
|
|
2388
2398
|
backgroundColor: +rangeProgress === rangeNumber ? '#0DA574' : +rangeProgress !== rangeNumber && +rangeProgress > 0 ? '#EE0000' : 'transparent',
|
|
2389
|
-
borderRadius: '2px',
|
|
2390
2399
|
zIndex: -1
|
|
2391
2400
|
}
|
|
2392
2401
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -2410,12 +2419,9 @@ var styles$4 = {"stepper-container":"stepper-module_stepper-container__-OVGy","b
|
|
|
2410
2419
|
styleInject(css_248z$6);
|
|
2411
2420
|
|
|
2412
2421
|
const Stepper = ({
|
|
2413
|
-
className,
|
|
2414
|
-
onChange,
|
|
2415
2422
|
stepLength,
|
|
2416
2423
|
activeSteps
|
|
2417
2424
|
}) => {
|
|
2418
|
-
classnames(className, 'stepper-inner-rem');
|
|
2419
2425
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2420
2426
|
className: `${styles$4['stepper-container']} stepper-container-rem`
|
|
2421
2427
|
}, (() => {
|
|
@@ -2426,7 +2432,7 @@ const Stepper = ({
|
|
|
2426
2432
|
key: step
|
|
2427
2433
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2428
2434
|
className: classnames(`${step <= activeSteps ? styles$4.smallActiveRing : styles$4.smallRing}`)
|
|
2429
|
-
}, step <= activeSteps ? step :
|
|
2435
|
+
}, step <= activeSteps ? step : '')));
|
|
2430
2436
|
}
|
|
2431
2437
|
return steppers;
|
|
2432
2438
|
})());
|
|
@@ -2471,7 +2477,7 @@ for (let i = 0; i < 256; ++i) {
|
|
|
2471
2477
|
function unsafeStringify(arr, offset = 0) {
|
|
2472
2478
|
// Note: Be careful editing this code! It's been tuned for performance
|
|
2473
2479
|
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
2474
|
-
return
|
|
2480
|
+
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
|
2475
2481
|
}
|
|
2476
2482
|
|
|
2477
2483
|
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
@@ -2606,6 +2612,7 @@ const SvgListItemDelete = ({
|
|
|
2606
2612
|
fill: fillColor ? fillColor : '#051942'
|
|
2607
2613
|
}));
|
|
2608
2614
|
|
|
2615
|
+
// eslint-disable-next-line react/display-name
|
|
2609
2616
|
const FileItem = /*#__PURE__*/React__default.memo(({
|
|
2610
2617
|
size,
|
|
2611
2618
|
name,
|
|
@@ -2620,6 +2627,7 @@ const FileItem = /*#__PURE__*/React__default.memo(({
|
|
|
2620
2627
|
listItemPadding,
|
|
2621
2628
|
progressFontSize,
|
|
2622
2629
|
listItemErrorSize,
|
|
2630
|
+
timeForRemoveError,
|
|
2623
2631
|
listItemErrorColor,
|
|
2624
2632
|
progressTrackColor,
|
|
2625
2633
|
progressFailedColor,
|
|
@@ -2672,7 +2680,7 @@ const FileItem = /*#__PURE__*/React__default.memo(({
|
|
|
2672
2680
|
if (check !== '') {
|
|
2673
2681
|
setT(setTimeout(() => {
|
|
2674
2682
|
removeFile(uuid);
|
|
2675
|
-
},
|
|
2683
|
+
}, timeForRemoveError));
|
|
2676
2684
|
}
|
|
2677
2685
|
}, [check]);
|
|
2678
2686
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -2879,6 +2887,7 @@ const NewFile = ({
|
|
|
2879
2887
|
fileAreaImageWidth,
|
|
2880
2888
|
listItemErrorColor,
|
|
2881
2889
|
labelRequiredColor,
|
|
2890
|
+
timeForRemoveError,
|
|
2882
2891
|
progressFailedColor,
|
|
2883
2892
|
fileAreaImageHeight,
|
|
2884
2893
|
progressSuccessColor,
|
|
@@ -2897,6 +2906,7 @@ const NewFile = ({
|
|
|
2897
2906
|
const [image, setImage] = useState(!multiple ? defaultData ? defaultData.type !== 'application/pdf' ? defaultData.url : 'pdf' : null : null);
|
|
2898
2907
|
const configStyles = compereConfigs();
|
|
2899
2908
|
const handleRemoveComponent = () => {
|
|
2909
|
+
// eslint-disable-next-line react/no-find-dom-node
|
|
2900
2910
|
const node = ReactDOM.findDOMNode(ref.current);
|
|
2901
2911
|
const parent = node.parentNode;
|
|
2902
2912
|
parent.removeChild(node);
|
|
@@ -3117,7 +3127,7 @@ const NewFile = ({
|
|
|
3117
3127
|
style: {
|
|
3118
3128
|
margin: '0px'
|
|
3119
3129
|
}
|
|
3120
|
-
}, putFileHere ? putFileHere : configStyles.File.putFileHere, /*#__PURE__*/React__default.createElement("br", null), or ? or : configStyles.File.or,
|
|
3130
|
+
}, putFileHere ? putFileHere : configStyles.File.putFileHere, /*#__PURE__*/React__default.createElement("br", null), or ? or : configStyles.File.or, ' ', /*#__PURE__*/React__default.createElement("span", {
|
|
3121
3131
|
style: {
|
|
3122
3132
|
color: uploadColor ? uploadColor : configStyles.File.uploadColor
|
|
3123
3133
|
}
|
|
@@ -3129,7 +3139,7 @@ const NewFile = ({
|
|
|
3129
3139
|
style: {
|
|
3130
3140
|
margin: '0px'
|
|
3131
3141
|
}
|
|
3132
|
-
}, fileSizeText ? fileSizeText : configStyles.File.fileSizeText, " ", maxSize, "\u0544\u0532 (
|
|
3142
|
+
}, fileSizeText ? fileSizeText : configStyles.File.fileSizeText, " ", maxSize, "\u0544\u0532 (", ' ', fileExtensions.toString().split(',').join(', '), " )")))), /*#__PURE__*/React__default.createElement("div", {
|
|
3133
3143
|
style: {
|
|
3134
3144
|
position: 'absolute',
|
|
3135
3145
|
top: '0px',
|
|
@@ -3167,9 +3177,10 @@ const NewFile = ({
|
|
|
3167
3177
|
status: item.status,
|
|
3168
3178
|
size: item.file.size,
|
|
3169
3179
|
name: item.file.name,
|
|
3180
|
+
timeForRemoveError: timeForRemoveError,
|
|
3170
3181
|
removeFile: removeFile ? removeFile : _ => _,
|
|
3171
3182
|
radius: radius ? radius : configStyles.File.radius,
|
|
3172
|
-
fileFormat: item.file.type.split('/')[1]
|
|
3183
|
+
fileFormat: item.file.type.split('/')[1]?.toLowerCase(),
|
|
3173
3184
|
progressColor: progressColor ? progressColor : configStyles.File.progressColor,
|
|
3174
3185
|
listItemHeight: listItemHeight ? listItemHeight : configStyles.File.listItemHeight,
|
|
3175
3186
|
listItemPadding: listItemPadding ? listItemPadding : configStyles.File.listItemPadding,
|
|
@@ -3222,6 +3233,7 @@ NewFile.propTypes = {
|
|
|
3222
3233
|
progressFontSize: PropTypes.string,
|
|
3223
3234
|
borderHoverColor: PropTypes.string,
|
|
3224
3235
|
listItemErrorSize: PropTypes.string,
|
|
3236
|
+
timeForRemoveError: PropTypes.number,
|
|
3225
3237
|
labelRequiredColor: PropTypes.string,
|
|
3226
3238
|
progressTrackColor: PropTypes.string,
|
|
3227
3239
|
fileAreaImageWidth: PropTypes.string,
|
|
@@ -3239,6 +3251,7 @@ NewFile.propTypes = {
|
|
|
3239
3251
|
};
|
|
3240
3252
|
NewFile.defaultProps = {
|
|
3241
3253
|
maxSize: 10,
|
|
3254
|
+
timeForRemoveError: 4000,
|
|
3242
3255
|
fileExtensions: ['jpg', 'jpeg', 'png', 'pdf']
|
|
3243
3256
|
};
|
|
3244
3257
|
|
|
@@ -3250,11 +3263,8 @@ const Checkbox = ({
|
|
|
3250
3263
|
disabled,
|
|
3251
3264
|
required,
|
|
3252
3265
|
className,
|
|
3253
|
-
name,
|
|
3254
|
-
value,
|
|
3255
3266
|
jsonData,
|
|
3256
3267
|
onChange,
|
|
3257
|
-
label,
|
|
3258
3268
|
keyNames,
|
|
3259
3269
|
onClick,
|
|
3260
3270
|
...props
|
|
@@ -3292,7 +3302,7 @@ const Checkbox = ({
|
|
|
3292
3302
|
} : '';
|
|
3293
3303
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, data.map(element => {
|
|
3294
3304
|
return /*#__PURE__*/React__default.createElement("label", {
|
|
3295
|
-
className: `${styles$3[
|
|
3305
|
+
className: `${styles$3['checkbox-wrap']} checkbox-wrap-rem`,
|
|
3296
3306
|
key: element.value
|
|
3297
3307
|
}, /*#__PURE__*/React__default.createElement("input", _extends({
|
|
3298
3308
|
type: "checkbox",
|
|
@@ -3306,11 +3316,11 @@ const Checkbox = ({
|
|
|
3306
3316
|
onClick: onClick ? onClick : () => {},
|
|
3307
3317
|
defaultChecked: element.checked
|
|
3308
3318
|
}, props)), /*#__PURE__*/React__default.createElement("span", {
|
|
3309
|
-
className: `${styles$3[
|
|
3319
|
+
className: `${styles$3['checkmark']} checkmark-rem`
|
|
3310
3320
|
}), element[keyNames.label] ? /*#__PURE__*/React__default.createElement("label", {
|
|
3311
3321
|
className: styles$3.labelCheckbox,
|
|
3312
|
-
|
|
3313
|
-
}, element[keyNames.label]) :
|
|
3322
|
+
htmlFor: element[keyNames.id]
|
|
3323
|
+
}, element[keyNames.label]) : '');
|
|
3314
3324
|
}));
|
|
3315
3325
|
};
|
|
3316
3326
|
Checkbox.propTypes = {
|
|
@@ -3592,7 +3602,7 @@ const Typography = ({
|
|
|
3592
3602
|
return validVariant ? 'Please set Typography valid variant' : tagT;
|
|
3593
3603
|
};
|
|
3594
3604
|
Typography.propTypes = {
|
|
3595
|
-
size: PropTypes.string,
|
|
3605
|
+
size: PropTypes.oneOf(PropTypes.string, PropTypes.number),
|
|
3596
3606
|
color: PropTypes.string,
|
|
3597
3607
|
onClick: PropTypes.func,
|
|
3598
3608
|
weight: PropTypes.string,
|
|
@@ -3619,7 +3629,7 @@ var css_248z$2 = ".pagination-module_listItem__b1-WN:focus{background-color:#4ca
|
|
|
3619
3629
|
var styles$2 = {"listItem":"pagination-module_listItem__b1-WN","active":"pagination-module_active__KwBDp","pagination-bar":"pagination-module_pagination-bar__MrtYT","pagination-btn":"pagination-module_pagination-btn__w8Yh8","pagination-item":"pagination-module_pagination-item__t3emS","pagination-jump-next":"pagination-module_pagination-jump-next__LAb9Z","selected":"pagination-module_selected__EXzCA","pagination-jump-next-txt":"pagination-module_pagination-jump-next-txt__e7nFj","pagination-jump-next-arrow":"pagination-module_pagination-jump-next-arrow__aEVD8"};
|
|
3620
3630
|
styleInject(css_248z$2);
|
|
3621
3631
|
|
|
3622
|
-
const Dots =
|
|
3632
|
+
const Dots = '...';
|
|
3623
3633
|
const range = (start, end) => {
|
|
3624
3634
|
const length = end - start + 1;
|
|
3625
3635
|
return Array.from({
|
|
@@ -3732,7 +3742,7 @@ const Pagination = ({
|
|
|
3732
3742
|
if (currentPageNumber === 0 || paginationRange?.length < 2) {
|
|
3733
3743
|
return null;
|
|
3734
3744
|
}
|
|
3735
|
-
const classProps = classnames(styles$2.list, className ? className : `${styles$2[
|
|
3745
|
+
const classProps = classnames(styles$2.list, className ? className : `${styles$2['pagination-bar']} pagination-bar-rem`);
|
|
3736
3746
|
const onNext = () => {
|
|
3737
3747
|
onPageChange(currentPageNumber + 1);
|
|
3738
3748
|
};
|
|
@@ -3742,7 +3752,7 @@ const Pagination = ({
|
|
|
3742
3752
|
const onNextFive = () => {
|
|
3743
3753
|
currentPageNumber !== lastPage - 4 ? onPageChange(currentPageNumber + 5) : onPageChange(currentPageNumber + 4);
|
|
3744
3754
|
};
|
|
3745
|
-
const onPreviousFive =
|
|
3755
|
+
const onPreviousFive = () => {
|
|
3746
3756
|
currentPageNumber !== 5 ? onPageChange(currentPageNumber - 5) : onPageChange(currentPageNumber - 4);
|
|
3747
3757
|
};
|
|
3748
3758
|
const handleChangeInput = e => {
|
|
@@ -3759,7 +3769,7 @@ const Pagination = ({
|
|
|
3759
3769
|
}
|
|
3760
3770
|
};
|
|
3761
3771
|
const handleKeyDown = e => {
|
|
3762
|
-
const forbiddenKeys = [
|
|
3772
|
+
const forbiddenKeys = ['e', '.', '+', '-'];
|
|
3763
3773
|
if (forbiddenKeys.includes(e.key)) {
|
|
3764
3774
|
e.preventDefault();
|
|
3765
3775
|
}
|
|
@@ -3795,37 +3805,37 @@ const Pagination = ({
|
|
|
3795
3805
|
},
|
|
3796
3806
|
onClick: onPrevious,
|
|
3797
3807
|
disabled: currentPageNumber === 1 ? true : false,
|
|
3798
|
-
className: `${styles$2[
|
|
3808
|
+
className: `${styles$2['pagination-btn']} pagination-btn-rem`
|
|
3799
3809
|
}, /*#__PURE__*/React__default.createElement(SvgNextarrow, null)), paginationRange.map((pageNumber, id) => {
|
|
3800
3810
|
if (pageNumber === Dots) {
|
|
3801
3811
|
let currentPageIndex = paginationRange.indexOf(currentPageNumber);
|
|
3802
3812
|
return /*#__PURE__*/React__default.createElement("li", {
|
|
3803
3813
|
key: id,
|
|
3804
|
-
className: classnames(`${styles$2[
|
|
3814
|
+
className: classnames(`${styles$2['pagination-jump-next']} pagination-jump-next-rem`, styles$2.listItem),
|
|
3805
3815
|
onClick: id < currentPageIndex ? onPreviousFive : onNextFive,
|
|
3806
3816
|
disabled: currentPageIndex === 0 ? true : false
|
|
3807
3817
|
}, id < currentPageIndex ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("span", {
|
|
3808
|
-
className: `${styles$2[
|
|
3818
|
+
className: `${styles$2['pagination-jump-next-txt']} pagination-jump-next-txt-rem`
|
|
3809
3819
|
}, /*#__PURE__*/React__default.createElement(SvgDots, null)), /*#__PURE__*/React__default.createElement("span", {
|
|
3810
|
-
className: `${styles$2[
|
|
3820
|
+
className: `${styles$2['pagination-jump-next-arrow']} pagination-jump-next-arrow-rem`,
|
|
3811
3821
|
style: {
|
|
3812
3822
|
transform: 'rotate(180deg)'
|
|
3813
3823
|
}
|
|
3814
3824
|
}, /*#__PURE__*/React__default.createElement(SvgNextarrow, null))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("span", {
|
|
3815
|
-
className: `${styles$2[
|
|
3825
|
+
className: `${styles$2['pagination-jump-next-txt']} pagination-jump-next-txt-rem`
|
|
3816
3826
|
}, /*#__PURE__*/React__default.createElement(SvgDots, null)), /*#__PURE__*/React__default.createElement("span", {
|
|
3817
|
-
className: `${styles$2[
|
|
3827
|
+
className: `${styles$2['pagination-jump-next-arrow']} pagination-jump-next-arrow-rem`
|
|
3818
3828
|
}, /*#__PURE__*/React__default.createElement(SvgNextarrow, null))));
|
|
3819
3829
|
}
|
|
3820
3830
|
return /*#__PURE__*/React__default.createElement("li", {
|
|
3821
3831
|
onClick: () => onPageChange(pageNumber),
|
|
3822
3832
|
key: id,
|
|
3823
|
-
className: classnames(`${pageNumber === currentPageNumber ? styles$2.selected : styles$2.listItem}`, `${styles$2[
|
|
3833
|
+
className: classnames(`${pageNumber === currentPageNumber ? styles$2.selected : styles$2.listItem}`, `${styles$2['pagination-item']} pagination-item-rem`)
|
|
3824
3834
|
}, pageNumber);
|
|
3825
3835
|
}), /*#__PURE__*/React__default.createElement("button", {
|
|
3826
3836
|
onClick: onNext,
|
|
3827
3837
|
disabled: currentPageNumber === lastPage ? true : false,
|
|
3828
|
-
className: `${styles$2[
|
|
3838
|
+
className: `${styles$2['pagination-btn']} pagination-btn-rem`
|
|
3829
3839
|
}, /*#__PURE__*/React__default.createElement(SvgNextarrow, null))), goTo && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("input", {
|
|
3830
3840
|
onKeyDown: handleKeyDown,
|
|
3831
3841
|
onInput: handleChangeInput,
|
|
@@ -3868,12 +3878,10 @@ styleInject(css_248z$1);
|
|
|
3868
3878
|
|
|
3869
3879
|
const Autocomplate = ({
|
|
3870
3880
|
label,
|
|
3871
|
-
value,
|
|
3872
3881
|
required,
|
|
3873
3882
|
disabled,
|
|
3874
3883
|
keyNames,
|
|
3875
3884
|
onChange,
|
|
3876
|
-
className,
|
|
3877
3885
|
searchCount,
|
|
3878
3886
|
placeHolder,
|
|
3879
3887
|
errorMessage,
|
|
@@ -3883,7 +3891,6 @@ const Autocomplate = ({
|
|
|
3883
3891
|
...props
|
|
3884
3892
|
}) => {
|
|
3885
3893
|
const configStyles = compereConfigs();
|
|
3886
|
-
classnames(styles$1.searchBox, className);
|
|
3887
3894
|
const parseSelectedOptionsData = jsonSelectedOptionsData ? JSON.parse(jsonSelectedOptionsData) : {
|
|
3888
3895
|
name: '',
|
|
3889
3896
|
id: ''
|
|
@@ -3925,7 +3932,7 @@ const Autocomplate = ({
|
|
|
3925
3932
|
}, parseOptionsData.map((optionName, index) => {
|
|
3926
3933
|
let className;
|
|
3927
3934
|
if (index === activeOption) {
|
|
3928
|
-
className =
|
|
3935
|
+
className = 'option-active';
|
|
3929
3936
|
}
|
|
3930
3937
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
3931
3938
|
className: `${styles$1[className]} autocomplate-content-click-rem`,
|
|
@@ -3956,9 +3963,9 @@ const Autocomplate = ({
|
|
|
3956
3963
|
className: `${styles$1['autocomplate-title']} autocomplate-title-rem`
|
|
3957
3964
|
}, label, " ", required && /*#__PURE__*/React__default.createElement("sup", {
|
|
3958
3965
|
style: {
|
|
3959
|
-
color:
|
|
3966
|
+
color: '#ee0000'
|
|
3960
3967
|
}
|
|
3961
|
-
}, "*")) :
|
|
3968
|
+
}, "*")) : '', /*#__PURE__*/React__default.createElement("div", {
|
|
3962
3969
|
className: `${styles$1['autocomplate-content']} autocomplate-content-rem`
|
|
3963
3970
|
}, /*#__PURE__*/React__default.createElement("input", _extends({
|
|
3964
3971
|
id: inputId,
|
|
@@ -4077,6 +4084,7 @@ const NewAutocomplete = ({
|
|
|
4077
4084
|
contentBottomRowMarginBottom,
|
|
4078
4085
|
contentBottomRowBackgroundColor,
|
|
4079
4086
|
contentBottomRowHoverBackgroundColor,
|
|
4087
|
+
backgroundDisableColor,
|
|
4080
4088
|
...props
|
|
4081
4089
|
}) => {
|
|
4082
4090
|
const [id, setId] = useState('');
|
|
@@ -4093,7 +4101,7 @@ const NewAutocomplete = ({
|
|
|
4093
4101
|
max-height: 400px;
|
|
4094
4102
|
}
|
|
4095
4103
|
`;
|
|
4096
|
-
const animation =
|
|
4104
|
+
const animation = () => css`
|
|
4097
4105
|
${showOption} ${showOptionDuration ? showOptionDuration : configStyles.NEWAUTOCOMPLETE.showOptionDuration} linear forwards
|
|
4098
4106
|
`;
|
|
4099
4107
|
const handleMouseEnter = () => {
|
|
@@ -4189,7 +4197,7 @@ const NewAutocomplete = ({
|
|
|
4189
4197
|
}))) : innerOptions.length <= 0 ? innerError ? '' : /*#__PURE__*/React__default.createElement("span", {
|
|
4190
4198
|
style: {
|
|
4191
4199
|
position: 'absolute',
|
|
4192
|
-
zIndex: '
|
|
4200
|
+
zIndex: '1',
|
|
4193
4201
|
color: errorColor ? errorColor : configStyles.NEWAUTOCOMPLETE.errorColor,
|
|
4194
4202
|
fontSize: errorSize ? errorSize : configStyles.NEWAUTOCOMPLETE.errorSize,
|
|
4195
4203
|
top: marginTop ? `calc(100% + ${marginTop})` : `calc(100% + ${configStyles.INPUT.marginTop})`,
|
|
@@ -4204,6 +4212,7 @@ const NewAutocomplete = ({
|
|
|
4204
4212
|
alert('Please add options prop');
|
|
4205
4213
|
}
|
|
4206
4214
|
options && options.length > 0 && options.map(item => {
|
|
4215
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
4207
4216
|
if (!item.hasOwnProperty(keyNames.name)) {
|
|
4208
4217
|
alert(`Please add ${keyNames.name} property in items of options array`);
|
|
4209
4218
|
}
|
|
@@ -4273,6 +4282,7 @@ const NewAutocomplete = ({
|
|
|
4273
4282
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
4274
4283
|
color: contentTopColor ? contentTopColor : configStyles.NEWAUTOCOMPLETE.contentTopColor,
|
|
4275
4284
|
fontSize: contentTopSize ? contentTopSize : configStyles.NEWAUTOCOMPLETE.contentTopSize,
|
|
4285
|
+
backgroundColor: disabled && (backgroundDisableColor ?? configStyles.NEWAUTOCOMPLETE.backgroundDisableColor),
|
|
4276
4286
|
height: contentTopHeight ? contentTopHeight : configStyles.NEWAUTOCOMPLETE.contentTopHeight,
|
|
4277
4287
|
padding: contentTopPadding ? contentTopPadding : configStyles.NEWAUTOCOMPLETE.contentTopPadding,
|
|
4278
4288
|
display: contentTopDisplay ? contentTopDisplay : configStyles.NEWAUTOCOMPLETE.contentTopDisplay,
|
|
@@ -4368,7 +4378,8 @@ NewAutocomplete.propTypes = {
|
|
|
4368
4378
|
contentBottomRowMarginBottom: PropTypes.string,
|
|
4369
4379
|
contentBottomBackgroundColor: PropTypes.string,
|
|
4370
4380
|
contentBottomRowBackgroundColor: PropTypes.string,
|
|
4371
|
-
contentBottomRowHoverBackgroundColor: PropTypes.string
|
|
4381
|
+
contentBottomRowHoverBackgroundColor: PropTypes.string,
|
|
4382
|
+
backgroundDisableColor: PropTypes.string
|
|
4372
4383
|
};
|
|
4373
4384
|
NewAutocomplete.defaultProps = {
|
|
4374
4385
|
searchCount: 3,
|