@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.js
CHANGED
|
@@ -107,11 +107,9 @@ const File = ({
|
|
|
107
107
|
required,
|
|
108
108
|
disabled,
|
|
109
109
|
onChange,
|
|
110
|
-
className,
|
|
111
110
|
defaultData,
|
|
112
111
|
errorMessage,
|
|
113
|
-
fileExtensions
|
|
114
|
-
...props
|
|
112
|
+
fileExtensions
|
|
115
113
|
}) => {
|
|
116
114
|
const [error, setError] = React.useState('');
|
|
117
115
|
const [fileName, setFileName] = React.useState('no selected file');
|
|
@@ -157,13 +155,13 @@ const File = ({
|
|
|
157
155
|
target: null
|
|
158
156
|
});
|
|
159
157
|
setFileName('no selected file');
|
|
160
|
-
document.querySelector(`.${name}`).value =
|
|
158
|
+
document.querySelector(`.${name}`).value = '';
|
|
161
159
|
};
|
|
162
160
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
163
161
|
className: `${styles$c['file-form-title']} ile-form-title-rem`
|
|
164
162
|
}, label, " ", required && /*#__PURE__*/React__default["default"].createElement("sup", {
|
|
165
163
|
style: {
|
|
166
|
-
color:
|
|
164
|
+
color: '#ee0000'
|
|
167
165
|
}
|
|
168
166
|
}, "*")), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
169
167
|
className: classnames__default["default"](`${styles$c['file-form-wrap']} file-form-wrap-rem`, image ? styles$c['active'] : '')
|
|
@@ -320,7 +318,7 @@ const Checkbox$1 = ({
|
|
|
320
318
|
fillColor: checkedColor ? checkedColor : configStyles.SINGLECHECKBOX.checkedColor
|
|
321
319
|
}) : /*#__PURE__*/React__default["default"].createElement(SvgCheckboxUnchecked, {
|
|
322
320
|
fillColor: unCheckedColor ? unCheckedColor : configStyles.SINGLECHECKBOX.unCheckedColor
|
|
323
|
-
}));
|
|
321
|
+
}), data?.label && /*#__PURE__*/React__default["default"].createElement("span", null, data.label));
|
|
324
322
|
};
|
|
325
323
|
|
|
326
324
|
const SingleCheckbox = ({
|
|
@@ -356,12 +354,12 @@ const SingleCheckbox = ({
|
|
|
356
354
|
});
|
|
357
355
|
};
|
|
358
356
|
SingleCheckbox.propTypes = {
|
|
357
|
+
data: PropTypes__default["default"].object,
|
|
359
358
|
onClick: PropTypes__default["default"].func,
|
|
360
359
|
styles: PropTypes__default["default"].object,
|
|
361
360
|
disabled: PropTypes__default["default"].bool,
|
|
362
361
|
checkedColor: PropTypes__default["default"].string,
|
|
363
|
-
unCheckedColor: PropTypes__default["default"].string
|
|
364
|
-
data: PropTypes__default["default"].oneOfType([PropTypes__default["default"].object, PropTypes__default["default"].array]).isRequired
|
|
362
|
+
unCheckedColor: PropTypes__default["default"].string
|
|
365
363
|
};
|
|
366
364
|
|
|
367
365
|
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}";
|
|
@@ -383,10 +381,13 @@ styleInject(css_248z$e);
|
|
|
383
381
|
tBodyFontWeight: PropTypes__default["default"].string,
|
|
384
382
|
tBodyFontFamily: PropTypes__default["default"].string,
|
|
385
383
|
tBodyRowBorder: PropTypes__default["default"].string,
|
|
386
|
-
handleCheckedBody:
|
|
387
|
-
handleCheckedHeader:
|
|
388
|
-
handleHeaderItemClick:
|
|
389
|
-
handleBodyActionClick:
|
|
384
|
+
// handleCheckedBody: PropTypes.func,
|
|
385
|
+
// handleCheckedHeader: PropTypes.func,
|
|
386
|
+
// handleHeaderItemClick: PropTypes.func,
|
|
387
|
+
// handleBodyActionClick: PropTypes.func
|
|
388
|
+
|
|
389
|
+
setTableDataBody: PropTypes__default["default"].func,
|
|
390
|
+
setTableDataHeader: PropTypes__default["default"].func
|
|
390
391
|
});
|
|
391
392
|
|
|
392
393
|
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)}}";
|
|
@@ -507,7 +508,8 @@ const Modal = ({
|
|
|
507
508
|
justifyContent,
|
|
508
509
|
backgroundColor,
|
|
509
510
|
grayDecorHeight,
|
|
510
|
-
layerBackgroundColor
|
|
511
|
+
layerBackgroundColor,
|
|
512
|
+
imageWrapHeight
|
|
511
513
|
}) => {
|
|
512
514
|
const [select, setSelect] = React.useState(0);
|
|
513
515
|
const [innerData, setInnerData] = React.useState([]);
|
|
@@ -680,10 +682,12 @@ const Modal = ({
|
|
|
680
682
|
}
|
|
681
683
|
}, /*#__PURE__*/React__default["default"].createElement(SvgCloseSlide, null))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
682
684
|
style: {
|
|
683
|
-
|
|
685
|
+
width: '100%',
|
|
686
|
+
height: imageWrapHeight ? imageWrapHeight : configStyles.MODAL.imageWrapHeight
|
|
684
687
|
}
|
|
685
688
|
}, innerData && innerData.length > 0 && innerData.map((item, index) => {
|
|
686
689
|
if (select === index) {
|
|
690
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
687
691
|
if (!item.hasOwnProperty('url')) {
|
|
688
692
|
alert('Please add url property in data prop on each element');
|
|
689
693
|
} else {
|
|
@@ -702,7 +706,7 @@ const Modal = ({
|
|
|
702
706
|
}
|
|
703
707
|
}
|
|
704
708
|
}), innerData && innerData.length > 1 && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
705
|
-
onClick:
|
|
709
|
+
onClick: () => handleGoTo('prev'),
|
|
706
710
|
style: {
|
|
707
711
|
position: 'absolute',
|
|
708
712
|
left: '14px',
|
|
@@ -716,7 +720,7 @@ const Modal = ({
|
|
|
716
720
|
backgroundColor: 'transparent'
|
|
717
721
|
}
|
|
718
722
|
}, /*#__PURE__*/React__default["default"].createElement(SvgPrev, null)), /*#__PURE__*/React__default["default"].createElement("button", {
|
|
719
|
-
onClick:
|
|
723
|
+
onClick: () => handleGoTo('next'),
|
|
720
724
|
style: {
|
|
721
725
|
position: 'absolute',
|
|
722
726
|
width: '24px',
|
|
@@ -771,9 +775,9 @@ styleInject(css_248z$c);
|
|
|
771
775
|
|
|
772
776
|
const InputTypes = {
|
|
773
777
|
TEL: 'tel',
|
|
774
|
-
TEXT:
|
|
778
|
+
TEXT: 'text',
|
|
775
779
|
NUMBER: 'number',
|
|
776
|
-
PASSWORD:
|
|
780
|
+
PASSWORD: 'password'
|
|
777
781
|
};
|
|
778
782
|
const P = styled__default["default"].span`
|
|
779
783
|
animation: ${props => props.errorAnimation ? props.animation : 'none'};
|
|
@@ -819,7 +823,6 @@ const Input = ({
|
|
|
819
823
|
errorMessage,
|
|
820
824
|
autoComplete,
|
|
821
825
|
labelDisplay,
|
|
822
|
-
errorPosition,
|
|
823
826
|
boxShadowHover,
|
|
824
827
|
errorClassName,
|
|
825
828
|
errorAnimation,
|
|
@@ -855,7 +858,7 @@ const Input = ({
|
|
|
855
858
|
-o-transform: scale3d(1,1,1);
|
|
856
859
|
}
|
|
857
860
|
`;
|
|
858
|
-
const animation =
|
|
861
|
+
const animation = () => styled.css`
|
|
859
862
|
${errorShow} ${errorAnimationDuration ? errorAnimationDuration : configStyles.INPUT.errorAnimationDuration} forwards
|
|
860
863
|
`;
|
|
861
864
|
const handleChange = event => {
|
|
@@ -1106,9 +1109,9 @@ const Input = ({
|
|
|
1106
1109
|
}
|
|
1107
1110
|
}, [type, value, regexp, maxLength, errorMessage, regexpErrorMessage, telErrorMessage]);
|
|
1108
1111
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1109
|
-
className: `${styles$a[
|
|
1112
|
+
className: `${styles$a['input-wrap']}`
|
|
1110
1113
|
}, label ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
1111
|
-
className: `${styles$a[
|
|
1114
|
+
className: `${styles$a['input-title']}`,
|
|
1112
1115
|
style: {
|
|
1113
1116
|
color: labelColor ? labelColor : configStyles.INPUT.labelColor,
|
|
1114
1117
|
fontSize: labelSize ? labelSize : configStyles.INPUT.labelSize,
|
|
@@ -1119,10 +1122,10 @@ const Input = ({
|
|
|
1119
1122
|
}
|
|
1120
1123
|
}, label, " ", required && /*#__PURE__*/React__default["default"].createElement("sup", {
|
|
1121
1124
|
style: {
|
|
1122
|
-
color: errorColor ? errorColor :
|
|
1125
|
+
color: errorColor ? errorColor : '#ee0000'
|
|
1123
1126
|
}
|
|
1124
1127
|
}, "*")) : '', /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1125
|
-
className: `${styles$a[
|
|
1128
|
+
className: `${styles$a['input-content']}`,
|
|
1126
1129
|
style: {
|
|
1127
1130
|
width: width ? width : configStyles.INPUT.width,
|
|
1128
1131
|
borderRadius: radius ? radius : configStyles.INPUT.radius,
|
|
@@ -1166,7 +1169,7 @@ const Input = ({
|
|
|
1166
1169
|
value: innerValue,
|
|
1167
1170
|
className: classProps,
|
|
1168
1171
|
onInput: handleChange,
|
|
1169
|
-
disabled: disabled ? disabled :
|
|
1172
|
+
disabled: disabled ? disabled : '',
|
|
1170
1173
|
name: name ? name : `tui_${random}_tui`,
|
|
1171
1174
|
placeholder: placeholder ? placeholder : '',
|
|
1172
1175
|
type: show || type === 'number' ? 'text' : type,
|
|
@@ -1278,7 +1281,7 @@ Input.propTypes = {
|
|
|
1278
1281
|
value: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].object])
|
|
1279
1282
|
};
|
|
1280
1283
|
Input.defaultProps = {
|
|
1281
|
-
type:
|
|
1284
|
+
type: 'text'
|
|
1282
1285
|
};
|
|
1283
1286
|
|
|
1284
1287
|
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}";
|
|
@@ -1294,28 +1297,27 @@ const Radio = ({
|
|
|
1294
1297
|
value,
|
|
1295
1298
|
jsonData,
|
|
1296
1299
|
label,
|
|
1297
|
-
keyNames,
|
|
1298
1300
|
...props
|
|
1299
1301
|
}) => {
|
|
1300
1302
|
const classProps = classnames__default["default"](styles$9.checkbox, className);
|
|
1301
1303
|
const parseData = jsonData.length !== 0 ? JSON.parse(jsonData) : [];
|
|
1302
1304
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, parseData.map((element, id) => {
|
|
1303
1305
|
return /*#__PURE__*/React__default["default"].createElement("label", {
|
|
1304
|
-
className: `${styles$9[
|
|
1306
|
+
className: `${styles$9['radio-wrap']} radio-wrap-rem`,
|
|
1305
1307
|
key: element.value
|
|
1306
1308
|
}, /*#__PURE__*/React__default["default"].createElement("input", _extends({
|
|
1307
1309
|
type: "radio",
|
|
1308
1310
|
className: classProps,
|
|
1309
1311
|
disabled: disabled,
|
|
1310
1312
|
required: required,
|
|
1311
|
-
defaultChecked: id === 0 ? defaultChecked :
|
|
1313
|
+
defaultChecked: id === 0 ? defaultChecked : '',
|
|
1312
1314
|
value: value ? value : element.value,
|
|
1313
1315
|
name: name ? name : element.name
|
|
1314
1316
|
}, props)), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1315
|
-
className: `${styles$9[
|
|
1317
|
+
className: `${styles$9['radio-checkmark']} radio-checkmark-rem`
|
|
1316
1318
|
}), element.label ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1317
1319
|
className: styles$9.labelRadio
|
|
1318
|
-
}, label ? label : element.label) :
|
|
1320
|
+
}, label ? label : element.label) : '');
|
|
1319
1321
|
}));
|
|
1320
1322
|
};
|
|
1321
1323
|
Radio.propTypes = {
|
|
@@ -1337,6 +1339,7 @@ Radio.defaultProps = {
|
|
|
1337
1339
|
|
|
1338
1340
|
const Button = ({
|
|
1339
1341
|
icon,
|
|
1342
|
+
hoverIcon,
|
|
1340
1343
|
size,
|
|
1341
1344
|
type,
|
|
1342
1345
|
font,
|
|
@@ -1403,21 +1406,22 @@ const Button = ({
|
|
|
1403
1406
|
},
|
|
1404
1407
|
type: type ? type : configStyles.BUTTON.type,
|
|
1405
1408
|
disabled: disabled ? disabled : configStyles.BUTTON.disabled,
|
|
1406
|
-
onClick: disabled ? _ => _ : type !== 'submit' ? onClick ? onClick :
|
|
1409
|
+
onClick: disabled ? _ => _ : type !== 'submit' ? onClick ? onClick : () => alert('Add click event handler on Button component') : _ => _,
|
|
1407
1410
|
onMouseEnter: handleMouseEnter,
|
|
1408
1411
|
onMouseLeave: handleMouseLeave,
|
|
1409
1412
|
className: classProps
|
|
1410
|
-
}, props),
|
|
1413
|
+
}, props), isHover && hoverIcon ? hoverIcon : icon ?? null, ' ', label && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1411
1414
|
style: {
|
|
1412
1415
|
marginLeft: icon ? btnIconMarginRight ? btnIconMarginRight : configStyles.BUTTON.btnIconMarginRight : '0px'
|
|
1413
1416
|
}
|
|
1414
|
-
}, label),
|
|
1417
|
+
}, label), ' ', !icon && !label && 'Add icon or label prop on Button component');
|
|
1415
1418
|
};
|
|
1416
1419
|
Button.propTypes = {
|
|
1417
1420
|
type: PropTypes__default["default"].string,
|
|
1418
1421
|
size: PropTypes__default["default"].string,
|
|
1419
1422
|
font: PropTypes__default["default"].string,
|
|
1420
1423
|
icon: PropTypes__default["default"].element,
|
|
1424
|
+
hoverIcon: PropTypes__default["default"].element,
|
|
1421
1425
|
color: PropTypes__default["default"].string,
|
|
1422
1426
|
width: PropTypes__default["default"].string,
|
|
1423
1427
|
outline: PropTypes__default["default"].bool,
|
|
@@ -1588,6 +1592,7 @@ const Select = ({
|
|
|
1588
1592
|
};
|
|
1589
1593
|
const isObjectEmpty = obj => {
|
|
1590
1594
|
for (var key in obj) {
|
|
1595
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
1591
1596
|
if (obj.hasOwnProperty(key)) {
|
|
1592
1597
|
return false;
|
|
1593
1598
|
}
|
|
@@ -1601,9 +1606,9 @@ const Select = ({
|
|
|
1601
1606
|
setOpened(false);
|
|
1602
1607
|
}
|
|
1603
1608
|
};
|
|
1604
|
-
document.addEventListener(
|
|
1609
|
+
document.addEventListener('mousedown', checkIfClickedOutside);
|
|
1605
1610
|
return () => {
|
|
1606
|
-
document.removeEventListener(
|
|
1611
|
+
document.removeEventListener('mousedown', checkIfClickedOutside);
|
|
1607
1612
|
};
|
|
1608
1613
|
}
|
|
1609
1614
|
}, [opened]);
|
|
@@ -1618,7 +1623,7 @@ const Select = ({
|
|
|
1618
1623
|
if (!multiple) {
|
|
1619
1624
|
options && options.length > 0 && setExistOptions(options);
|
|
1620
1625
|
} else {
|
|
1621
|
-
const modifiedOptions = options && options.length > 0 && options.map(
|
|
1626
|
+
const modifiedOptions = options && options.length > 0 && options.map(item => {
|
|
1622
1627
|
item.checked = false;
|
|
1623
1628
|
if (selected && selected.length > 0) {
|
|
1624
1629
|
selected.map(innerItem => {
|
|
@@ -1635,7 +1640,8 @@ const Select = ({
|
|
|
1635
1640
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1636
1641
|
className: classProps,
|
|
1637
1642
|
style: {
|
|
1638
|
-
position: 'relative'
|
|
1643
|
+
position: 'relative',
|
|
1644
|
+
width: '100%'
|
|
1639
1645
|
}
|
|
1640
1646
|
}, label ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
1641
1647
|
style: {
|
|
@@ -1649,9 +1655,9 @@ const Select = ({
|
|
|
1649
1655
|
}
|
|
1650
1656
|
}, label, required && /*#__PURE__*/React__default["default"].createElement("sup", {
|
|
1651
1657
|
style: {
|
|
1652
|
-
color:
|
|
1658
|
+
color: '#ee0000'
|
|
1653
1659
|
}
|
|
1654
|
-
}, "*")) :
|
|
1660
|
+
}, "*")) : '', /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1655
1661
|
ref: ref
|
|
1656
1662
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1657
1663
|
className: styles$8['select-content']
|
|
@@ -1669,14 +1675,14 @@ const Select = ({
|
|
|
1669
1675
|
backgroundColor: disabled ? selectedDisableBackgroundColor ? selectedDisableBackgroundColor : configStyles.SELECT.selectedDisableBackgroundColor : selectedBackgroundColor ? selectedBackgroundColor : configStyles.SELECT.selectedBackgroundColor,
|
|
1670
1676
|
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
|
|
1671
1677
|
},
|
|
1672
|
-
onClick: disabled ? _ => _ :
|
|
1673
|
-
onMouseEnter: disabled ? _ => _ :
|
|
1674
|
-
onMouseLeave: disabled ? _ => _ :
|
|
1678
|
+
onClick: disabled ? _ => _ : () => handleOpenClose(),
|
|
1679
|
+
onMouseEnter: disabled ? _ => _ : () => handleMouseEnter(),
|
|
1680
|
+
onMouseLeave: disabled ? _ => _ : () => handleMouseLeave(),
|
|
1675
1681
|
className: `${styles$8['select-content-top']}`
|
|
1676
1682
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1677
1683
|
className: `${styles$8['select-content-top-text']}`,
|
|
1678
1684
|
style: {
|
|
1679
|
-
whiteSpace: 'nowrap',
|
|
1685
|
+
whiteSpace: disabled ? 'pre-wrap' : 'nowrap',
|
|
1680
1686
|
overflow: 'hidden',
|
|
1681
1687
|
textOverflow: 'ellipsis',
|
|
1682
1688
|
color: errorMessage ? errorColor ? errorColor : configStyles.SELECT.errorColor : isHover ? selectedHoverColor ? selectedHoverColor : configStyles.SELECT.selectedHoverColor : selectedColor ? selectedColor : configStyles.SELECT.selectedColor
|
|
@@ -1717,7 +1723,7 @@ const Select = ({
|
|
|
1717
1723
|
key: i,
|
|
1718
1724
|
disabled: true,
|
|
1719
1725
|
defaultValue: option[keyNames.id],
|
|
1720
|
-
onClick: disabled ? _ => _ :
|
|
1726
|
+
onClick: disabled ? _ => _ : () => handleSelectItem(option),
|
|
1721
1727
|
onMouseEnter: disabled ? _ => _ : e => handleMouseEnterOption(e),
|
|
1722
1728
|
onMouseLeave: disabled ? _ => _ : e => handleMouseLeaveOption(e),
|
|
1723
1729
|
className: `${styles$8['select-content-bottom-row']} ${dots || configStyles.SELECT.dots ? styles$8['ellipsis'] : ''}`,
|
|
@@ -1902,10 +1908,11 @@ const SvgToasterSuccess = ({
|
|
|
1902
1908
|
fill: fillColor ? fillColor : '#0DA574'
|
|
1903
1909
|
}));
|
|
1904
1910
|
|
|
1905
|
-
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}}";
|
|
1906
|
-
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"};
|
|
1911
|
+
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}}";
|
|
1912
|
+
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"};
|
|
1907
1913
|
styleInject(css_248z$9);
|
|
1908
1914
|
|
|
1915
|
+
let wWidth$1 = window.innerWidth;
|
|
1909
1916
|
const ToasterType = {
|
|
1910
1917
|
info: 'info',
|
|
1911
1918
|
warn: 'warn',
|
|
@@ -1958,7 +1965,7 @@ const Toast = ({
|
|
|
1958
1965
|
style: {
|
|
1959
1966
|
position: 'absolute',
|
|
1960
1967
|
display: 'flex',
|
|
1961
|
-
width: '440px',
|
|
1968
|
+
width: wWidth$1 > 480 ? '440px' : '300px',
|
|
1962
1969
|
height: '83px',
|
|
1963
1970
|
borderRadius: '40px',
|
|
1964
1971
|
alignItems: 'center',
|
|
@@ -1995,8 +2002,9 @@ const Toast = ({
|
|
|
1995
2002
|
fontSize: '16px',
|
|
1996
2003
|
lineHeight: '22px',
|
|
1997
2004
|
fontStyle: 'normal'
|
|
1998
|
-
}
|
|
1999
|
-
|
|
2005
|
+
},
|
|
2006
|
+
className: styles$7['notify-title']
|
|
2007
|
+
}, title ? title : ''), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2000
2008
|
style: {
|
|
2001
2009
|
fontWeight: 500,
|
|
2002
2010
|
color: '#3C393E',
|
|
@@ -2005,8 +2013,9 @@ const Toast = ({
|
|
|
2005
2013
|
fontStyle: 'normal',
|
|
2006
2014
|
fontFamily: '',
|
|
2007
2015
|
opacity: 0.8
|
|
2008
|
-
}
|
|
2009
|
-
|
|
2016
|
+
},
|
|
2017
|
+
className: styles$7['notify-desc']
|
|
2018
|
+
}, description ? description : '')), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2010
2019
|
onClick: () => handleCloseToaster(ref),
|
|
2011
2020
|
style: {
|
|
2012
2021
|
width: '18px',
|
|
@@ -2031,7 +2040,9 @@ Toast.defaultProps = {
|
|
|
2031
2040
|
|
|
2032
2041
|
let toastify;
|
|
2033
2042
|
let path = window.location.href;
|
|
2043
|
+
let wWidth = window.innerWidth;
|
|
2034
2044
|
const removeToast = ref => {
|
|
2045
|
+
// eslint-disable-next-line react/no-find-dom-node
|
|
2035
2046
|
const node = ReactDOM__default["default"].findDOMNode(ref.current);
|
|
2036
2047
|
const removeElem = node.parentNode;
|
|
2037
2048
|
const parent = removeElem.parentNode;
|
|
@@ -2054,7 +2065,7 @@ const createToast = ({
|
|
|
2054
2065
|
const toastBlock = document.createElement('div');
|
|
2055
2066
|
toastBlock.style.position = 'relative';
|
|
2056
2067
|
toastBlock.style.flexShrink = 0;
|
|
2057
|
-
toastBlock.style.width = '440px';
|
|
2068
|
+
toastBlock.style.width = wWidth > 480 ? '440px' : '300px';
|
|
2058
2069
|
toastBlock.style.height = '83px';
|
|
2059
2070
|
toastBlock.style.marginBottom = '20px';
|
|
2060
2071
|
const newElem = /*#__PURE__*/React__default["default"].createElement(Toast, {
|
|
@@ -2206,7 +2217,7 @@ const Tooltip = ({
|
|
|
2206
2217
|
const handleShow = () => {
|
|
2207
2218
|
setShowTooltip(!showTooltip);
|
|
2208
2219
|
};
|
|
2209
|
-
React.useEffect(
|
|
2220
|
+
React.useEffect(() => {
|
|
2210
2221
|
if (!text) {
|
|
2211
2222
|
alert('Add text on tooltip');
|
|
2212
2223
|
}
|
|
@@ -2384,7 +2395,6 @@ const Captcha = ({
|
|
|
2384
2395
|
right: '0px',
|
|
2385
2396
|
width: '100%',
|
|
2386
2397
|
height: '4px',
|
|
2387
|
-
borderRadius: '2px',
|
|
2388
2398
|
backgroundColor: '#EEEEEE',
|
|
2389
2399
|
borderRadius: '10px',
|
|
2390
2400
|
zIndex: -2
|
|
@@ -2416,7 +2426,6 @@ const Captcha = ({
|
|
|
2416
2426
|
height: '4px',
|
|
2417
2427
|
borderRadius: '2px',
|
|
2418
2428
|
backgroundColor: +rangeProgress === rangeNumber ? '#0DA574' : +rangeProgress !== rangeNumber && +rangeProgress > 0 ? '#EE0000' : 'transparent',
|
|
2419
|
-
borderRadius: '2px',
|
|
2420
2429
|
zIndex: -1
|
|
2421
2430
|
}
|
|
2422
2431
|
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -2440,12 +2449,9 @@ var styles$4 = {"stepper-container":"stepper-module_stepper-container__-OVGy","b
|
|
|
2440
2449
|
styleInject(css_248z$6);
|
|
2441
2450
|
|
|
2442
2451
|
const Stepper = ({
|
|
2443
|
-
className,
|
|
2444
|
-
onChange,
|
|
2445
2452
|
stepLength,
|
|
2446
2453
|
activeSteps
|
|
2447
2454
|
}) => {
|
|
2448
|
-
classnames__default["default"](className, 'stepper-inner-rem');
|
|
2449
2455
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2450
2456
|
className: `${styles$4['stepper-container']} stepper-container-rem`
|
|
2451
2457
|
}, (() => {
|
|
@@ -2456,7 +2462,7 @@ const Stepper = ({
|
|
|
2456
2462
|
key: step
|
|
2457
2463
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2458
2464
|
className: classnames__default["default"](`${step <= activeSteps ? styles$4.smallActiveRing : styles$4.smallRing}`)
|
|
2459
|
-
}, step <= activeSteps ? step :
|
|
2465
|
+
}, step <= activeSteps ? step : '')));
|
|
2460
2466
|
}
|
|
2461
2467
|
return steppers;
|
|
2462
2468
|
})());
|
|
@@ -2501,7 +2507,7 @@ for (let i = 0; i < 256; ++i) {
|
|
|
2501
2507
|
function unsafeStringify(arr, offset = 0) {
|
|
2502
2508
|
// Note: Be careful editing this code! It's been tuned for performance
|
|
2503
2509
|
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
2504
|
-
return
|
|
2510
|
+
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]];
|
|
2505
2511
|
}
|
|
2506
2512
|
|
|
2507
2513
|
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
@@ -2636,6 +2642,7 @@ const SvgListItemDelete = ({
|
|
|
2636
2642
|
fill: fillColor ? fillColor : '#051942'
|
|
2637
2643
|
}));
|
|
2638
2644
|
|
|
2645
|
+
// eslint-disable-next-line react/display-name
|
|
2639
2646
|
const FileItem = /*#__PURE__*/React__default["default"].memo(({
|
|
2640
2647
|
size,
|
|
2641
2648
|
name,
|
|
@@ -2650,6 +2657,7 @@ const FileItem = /*#__PURE__*/React__default["default"].memo(({
|
|
|
2650
2657
|
listItemPadding,
|
|
2651
2658
|
progressFontSize,
|
|
2652
2659
|
listItemErrorSize,
|
|
2660
|
+
timeForRemoveError,
|
|
2653
2661
|
listItemErrorColor,
|
|
2654
2662
|
progressTrackColor,
|
|
2655
2663
|
progressFailedColor,
|
|
@@ -2702,7 +2710,7 @@ const FileItem = /*#__PURE__*/React__default["default"].memo(({
|
|
|
2702
2710
|
if (check !== '') {
|
|
2703
2711
|
setT(setTimeout(() => {
|
|
2704
2712
|
removeFile(uuid);
|
|
2705
|
-
},
|
|
2713
|
+
}, timeForRemoveError));
|
|
2706
2714
|
}
|
|
2707
2715
|
}, [check]);
|
|
2708
2716
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -2909,6 +2917,7 @@ const NewFile = ({
|
|
|
2909
2917
|
fileAreaImageWidth,
|
|
2910
2918
|
listItemErrorColor,
|
|
2911
2919
|
labelRequiredColor,
|
|
2920
|
+
timeForRemoveError,
|
|
2912
2921
|
progressFailedColor,
|
|
2913
2922
|
fileAreaImageHeight,
|
|
2914
2923
|
progressSuccessColor,
|
|
@@ -2927,6 +2936,7 @@ const NewFile = ({
|
|
|
2927
2936
|
const [image, setImage] = React.useState(!multiple ? defaultData ? defaultData.type !== 'application/pdf' ? defaultData.url : 'pdf' : null : null);
|
|
2928
2937
|
const configStyles = compereConfigs();
|
|
2929
2938
|
const handleRemoveComponent = () => {
|
|
2939
|
+
// eslint-disable-next-line react/no-find-dom-node
|
|
2930
2940
|
const node = ReactDOM__default["default"].findDOMNode(ref.current);
|
|
2931
2941
|
const parent = node.parentNode;
|
|
2932
2942
|
parent.removeChild(node);
|
|
@@ -3147,7 +3157,7 @@ const NewFile = ({
|
|
|
3147
3157
|
style: {
|
|
3148
3158
|
margin: '0px'
|
|
3149
3159
|
}
|
|
3150
|
-
}, putFileHere ? putFileHere : configStyles.File.putFileHere, /*#__PURE__*/React__default["default"].createElement("br", null), or ? or : configStyles.File.or,
|
|
3160
|
+
}, putFileHere ? putFileHere : configStyles.File.putFileHere, /*#__PURE__*/React__default["default"].createElement("br", null), or ? or : configStyles.File.or, ' ', /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3151
3161
|
style: {
|
|
3152
3162
|
color: uploadColor ? uploadColor : configStyles.File.uploadColor
|
|
3153
3163
|
}
|
|
@@ -3159,7 +3169,7 @@ const NewFile = ({
|
|
|
3159
3169
|
style: {
|
|
3160
3170
|
margin: '0px'
|
|
3161
3171
|
}
|
|
3162
|
-
}, fileSizeText ? fileSizeText : configStyles.File.fileSizeText, " ", maxSize, "\u0544\u0532 (
|
|
3172
|
+
}, fileSizeText ? fileSizeText : configStyles.File.fileSizeText, " ", maxSize, "\u0544\u0532 (", ' ', fileExtensions.toString().split(',').join(', '), " )")))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3163
3173
|
style: {
|
|
3164
3174
|
position: 'absolute',
|
|
3165
3175
|
top: '0px',
|
|
@@ -3197,9 +3207,10 @@ const NewFile = ({
|
|
|
3197
3207
|
status: item.status,
|
|
3198
3208
|
size: item.file.size,
|
|
3199
3209
|
name: item.file.name,
|
|
3210
|
+
timeForRemoveError: timeForRemoveError,
|
|
3200
3211
|
removeFile: removeFile ? removeFile : _ => _,
|
|
3201
3212
|
radius: radius ? radius : configStyles.File.radius,
|
|
3202
|
-
fileFormat: item.file.type.split('/')[1]
|
|
3213
|
+
fileFormat: item.file.type.split('/')[1]?.toLowerCase(),
|
|
3203
3214
|
progressColor: progressColor ? progressColor : configStyles.File.progressColor,
|
|
3204
3215
|
listItemHeight: listItemHeight ? listItemHeight : configStyles.File.listItemHeight,
|
|
3205
3216
|
listItemPadding: listItemPadding ? listItemPadding : configStyles.File.listItemPadding,
|
|
@@ -3252,6 +3263,7 @@ NewFile.propTypes = {
|
|
|
3252
3263
|
progressFontSize: PropTypes__default["default"].string,
|
|
3253
3264
|
borderHoverColor: PropTypes__default["default"].string,
|
|
3254
3265
|
listItemErrorSize: PropTypes__default["default"].string,
|
|
3266
|
+
timeForRemoveError: PropTypes__default["default"].number,
|
|
3255
3267
|
labelRequiredColor: PropTypes__default["default"].string,
|
|
3256
3268
|
progressTrackColor: PropTypes__default["default"].string,
|
|
3257
3269
|
fileAreaImageWidth: PropTypes__default["default"].string,
|
|
@@ -3269,6 +3281,7 @@ NewFile.propTypes = {
|
|
|
3269
3281
|
};
|
|
3270
3282
|
NewFile.defaultProps = {
|
|
3271
3283
|
maxSize: 10,
|
|
3284
|
+
timeForRemoveError: 4000,
|
|
3272
3285
|
fileExtensions: ['jpg', 'jpeg', 'png', 'pdf']
|
|
3273
3286
|
};
|
|
3274
3287
|
|
|
@@ -3280,11 +3293,8 @@ const Checkbox = ({
|
|
|
3280
3293
|
disabled,
|
|
3281
3294
|
required,
|
|
3282
3295
|
className,
|
|
3283
|
-
name,
|
|
3284
|
-
value,
|
|
3285
3296
|
jsonData,
|
|
3286
3297
|
onChange,
|
|
3287
|
-
label,
|
|
3288
3298
|
keyNames,
|
|
3289
3299
|
onClick,
|
|
3290
3300
|
...props
|
|
@@ -3322,7 +3332,7 @@ const Checkbox = ({
|
|
|
3322
3332
|
} : '';
|
|
3323
3333
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, data.map(element => {
|
|
3324
3334
|
return /*#__PURE__*/React__default["default"].createElement("label", {
|
|
3325
|
-
className: `${styles$3[
|
|
3335
|
+
className: `${styles$3['checkbox-wrap']} checkbox-wrap-rem`,
|
|
3326
3336
|
key: element.value
|
|
3327
3337
|
}, /*#__PURE__*/React__default["default"].createElement("input", _extends({
|
|
3328
3338
|
type: "checkbox",
|
|
@@ -3336,11 +3346,11 @@ const Checkbox = ({
|
|
|
3336
3346
|
onClick: onClick ? onClick : () => {},
|
|
3337
3347
|
defaultChecked: element.checked
|
|
3338
3348
|
}, props)), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3339
|
-
className: `${styles$3[
|
|
3349
|
+
className: `${styles$3['checkmark']} checkmark-rem`
|
|
3340
3350
|
}), element[keyNames.label] ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
3341
3351
|
className: styles$3.labelCheckbox,
|
|
3342
|
-
|
|
3343
|
-
}, element[keyNames.label]) :
|
|
3352
|
+
htmlFor: element[keyNames.id]
|
|
3353
|
+
}, element[keyNames.label]) : '');
|
|
3344
3354
|
}));
|
|
3345
3355
|
};
|
|
3346
3356
|
Checkbox.propTypes = {
|
|
@@ -3622,7 +3632,7 @@ const Typography = ({
|
|
|
3622
3632
|
return validVariant ? 'Please set Typography valid variant' : tagT;
|
|
3623
3633
|
};
|
|
3624
3634
|
Typography.propTypes = {
|
|
3625
|
-
size: PropTypes__default["default"].string,
|
|
3635
|
+
size: PropTypes__default["default"].oneOf(PropTypes__default["default"].string, PropTypes__default["default"].number),
|
|
3626
3636
|
color: PropTypes__default["default"].string,
|
|
3627
3637
|
onClick: PropTypes__default["default"].func,
|
|
3628
3638
|
weight: PropTypes__default["default"].string,
|
|
@@ -3649,7 +3659,7 @@ var css_248z$2 = ".pagination-module_listItem__b1-WN:focus{background-color:#4ca
|
|
|
3649
3659
|
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"};
|
|
3650
3660
|
styleInject(css_248z$2);
|
|
3651
3661
|
|
|
3652
|
-
const Dots =
|
|
3662
|
+
const Dots = '...';
|
|
3653
3663
|
const range = (start, end) => {
|
|
3654
3664
|
const length = end - start + 1;
|
|
3655
3665
|
return Array.from({
|
|
@@ -3762,7 +3772,7 @@ const Pagination = ({
|
|
|
3762
3772
|
if (currentPageNumber === 0 || paginationRange?.length < 2) {
|
|
3763
3773
|
return null;
|
|
3764
3774
|
}
|
|
3765
|
-
const classProps = classnames__default["default"](styles$2.list, className ? className : `${styles$2[
|
|
3775
|
+
const classProps = classnames__default["default"](styles$2.list, className ? className : `${styles$2['pagination-bar']} pagination-bar-rem`);
|
|
3766
3776
|
const onNext = () => {
|
|
3767
3777
|
onPageChange(currentPageNumber + 1);
|
|
3768
3778
|
};
|
|
@@ -3772,7 +3782,7 @@ const Pagination = ({
|
|
|
3772
3782
|
const onNextFive = () => {
|
|
3773
3783
|
currentPageNumber !== lastPage - 4 ? onPageChange(currentPageNumber + 5) : onPageChange(currentPageNumber + 4);
|
|
3774
3784
|
};
|
|
3775
|
-
const onPreviousFive =
|
|
3785
|
+
const onPreviousFive = () => {
|
|
3776
3786
|
currentPageNumber !== 5 ? onPageChange(currentPageNumber - 5) : onPageChange(currentPageNumber - 4);
|
|
3777
3787
|
};
|
|
3778
3788
|
const handleChangeInput = e => {
|
|
@@ -3789,7 +3799,7 @@ const Pagination = ({
|
|
|
3789
3799
|
}
|
|
3790
3800
|
};
|
|
3791
3801
|
const handleKeyDown = e => {
|
|
3792
|
-
const forbiddenKeys = [
|
|
3802
|
+
const forbiddenKeys = ['e', '.', '+', '-'];
|
|
3793
3803
|
if (forbiddenKeys.includes(e.key)) {
|
|
3794
3804
|
e.preventDefault();
|
|
3795
3805
|
}
|
|
@@ -3825,37 +3835,37 @@ const Pagination = ({
|
|
|
3825
3835
|
},
|
|
3826
3836
|
onClick: onPrevious,
|
|
3827
3837
|
disabled: currentPageNumber === 1 ? true : false,
|
|
3828
|
-
className: `${styles$2[
|
|
3838
|
+
className: `${styles$2['pagination-btn']} pagination-btn-rem`
|
|
3829
3839
|
}, /*#__PURE__*/React__default["default"].createElement(SvgNextarrow, null)), paginationRange.map((pageNumber, id) => {
|
|
3830
3840
|
if (pageNumber === Dots) {
|
|
3831
3841
|
let currentPageIndex = paginationRange.indexOf(currentPageNumber);
|
|
3832
3842
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
3833
3843
|
key: id,
|
|
3834
|
-
className: classnames__default["default"](`${styles$2[
|
|
3844
|
+
className: classnames__default["default"](`${styles$2['pagination-jump-next']} pagination-jump-next-rem`, styles$2.listItem),
|
|
3835
3845
|
onClick: id < currentPageIndex ? onPreviousFive : onNextFive,
|
|
3836
3846
|
disabled: currentPageIndex === 0 ? true : false
|
|
3837
3847
|
}, id < currentPageIndex ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3838
|
-
className: `${styles$2[
|
|
3848
|
+
className: `${styles$2['pagination-jump-next-txt']} pagination-jump-next-txt-rem`
|
|
3839
3849
|
}, /*#__PURE__*/React__default["default"].createElement(SvgDots, null)), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3840
|
-
className: `${styles$2[
|
|
3850
|
+
className: `${styles$2['pagination-jump-next-arrow']} pagination-jump-next-arrow-rem`,
|
|
3841
3851
|
style: {
|
|
3842
3852
|
transform: 'rotate(180deg)'
|
|
3843
3853
|
}
|
|
3844
3854
|
}, /*#__PURE__*/React__default["default"].createElement(SvgNextarrow, null))) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3845
|
-
className: `${styles$2[
|
|
3855
|
+
className: `${styles$2['pagination-jump-next-txt']} pagination-jump-next-txt-rem`
|
|
3846
3856
|
}, /*#__PURE__*/React__default["default"].createElement(SvgDots, null)), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3847
|
-
className: `${styles$2[
|
|
3857
|
+
className: `${styles$2['pagination-jump-next-arrow']} pagination-jump-next-arrow-rem`
|
|
3848
3858
|
}, /*#__PURE__*/React__default["default"].createElement(SvgNextarrow, null))));
|
|
3849
3859
|
}
|
|
3850
3860
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
3851
3861
|
onClick: () => onPageChange(pageNumber),
|
|
3852
3862
|
key: id,
|
|
3853
|
-
className: classnames__default["default"](`${pageNumber === currentPageNumber ? styles$2.selected : styles$2.listItem}`, `${styles$2[
|
|
3863
|
+
className: classnames__default["default"](`${pageNumber === currentPageNumber ? styles$2.selected : styles$2.listItem}`, `${styles$2['pagination-item']} pagination-item-rem`)
|
|
3854
3864
|
}, pageNumber);
|
|
3855
3865
|
}), /*#__PURE__*/React__default["default"].createElement("button", {
|
|
3856
3866
|
onClick: onNext,
|
|
3857
3867
|
disabled: currentPageNumber === lastPage ? true : false,
|
|
3858
|
-
className: `${styles$2[
|
|
3868
|
+
className: `${styles$2['pagination-btn']} pagination-btn-rem`
|
|
3859
3869
|
}, /*#__PURE__*/React__default["default"].createElement(SvgNextarrow, null))), goTo && /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement("input", {
|
|
3860
3870
|
onKeyDown: handleKeyDown,
|
|
3861
3871
|
onInput: handleChangeInput,
|
|
@@ -3898,12 +3908,10 @@ styleInject(css_248z$1);
|
|
|
3898
3908
|
|
|
3899
3909
|
const Autocomplate = ({
|
|
3900
3910
|
label,
|
|
3901
|
-
value,
|
|
3902
3911
|
required,
|
|
3903
3912
|
disabled,
|
|
3904
3913
|
keyNames,
|
|
3905
3914
|
onChange,
|
|
3906
|
-
className,
|
|
3907
3915
|
searchCount,
|
|
3908
3916
|
placeHolder,
|
|
3909
3917
|
errorMessage,
|
|
@@ -3913,7 +3921,6 @@ const Autocomplate = ({
|
|
|
3913
3921
|
...props
|
|
3914
3922
|
}) => {
|
|
3915
3923
|
const configStyles = compereConfigs();
|
|
3916
|
-
classnames__default["default"](styles$1.searchBox, className);
|
|
3917
3924
|
const parseSelectedOptionsData = jsonSelectedOptionsData ? JSON.parse(jsonSelectedOptionsData) : {
|
|
3918
3925
|
name: '',
|
|
3919
3926
|
id: ''
|
|
@@ -3955,7 +3962,7 @@ const Autocomplate = ({
|
|
|
3955
3962
|
}, parseOptionsData.map((optionName, index) => {
|
|
3956
3963
|
let className;
|
|
3957
3964
|
if (index === activeOption) {
|
|
3958
|
-
className =
|
|
3965
|
+
className = 'option-active';
|
|
3959
3966
|
}
|
|
3960
3967
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3961
3968
|
className: `${styles$1[className]} autocomplate-content-click-rem`,
|
|
@@ -3986,9 +3993,9 @@ const Autocomplate = ({
|
|
|
3986
3993
|
className: `${styles$1['autocomplate-title']} autocomplate-title-rem`
|
|
3987
3994
|
}, label, " ", required && /*#__PURE__*/React__default["default"].createElement("sup", {
|
|
3988
3995
|
style: {
|
|
3989
|
-
color:
|
|
3996
|
+
color: '#ee0000'
|
|
3990
3997
|
}
|
|
3991
|
-
}, "*")) :
|
|
3998
|
+
}, "*")) : '', /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3992
3999
|
className: `${styles$1['autocomplate-content']} autocomplate-content-rem`
|
|
3993
4000
|
}, /*#__PURE__*/React__default["default"].createElement("input", _extends({
|
|
3994
4001
|
id: inputId,
|
|
@@ -4107,6 +4114,7 @@ const NewAutocomplete = ({
|
|
|
4107
4114
|
contentBottomRowMarginBottom,
|
|
4108
4115
|
contentBottomRowBackgroundColor,
|
|
4109
4116
|
contentBottomRowHoverBackgroundColor,
|
|
4117
|
+
backgroundDisableColor,
|
|
4110
4118
|
...props
|
|
4111
4119
|
}) => {
|
|
4112
4120
|
const [id, setId] = React.useState('');
|
|
@@ -4123,7 +4131,7 @@ const NewAutocomplete = ({
|
|
|
4123
4131
|
max-height: 400px;
|
|
4124
4132
|
}
|
|
4125
4133
|
`;
|
|
4126
|
-
const animation =
|
|
4134
|
+
const animation = () => styled.css`
|
|
4127
4135
|
${showOption} ${showOptionDuration ? showOptionDuration : configStyles.NEWAUTOCOMPLETE.showOptionDuration} linear forwards
|
|
4128
4136
|
`;
|
|
4129
4137
|
const handleMouseEnter = () => {
|
|
@@ -4219,7 +4227,7 @@ const NewAutocomplete = ({
|
|
|
4219
4227
|
}))) : innerOptions.length <= 0 ? innerError ? '' : /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4220
4228
|
style: {
|
|
4221
4229
|
position: 'absolute',
|
|
4222
|
-
zIndex: '
|
|
4230
|
+
zIndex: '1',
|
|
4223
4231
|
color: errorColor ? errorColor : configStyles.NEWAUTOCOMPLETE.errorColor,
|
|
4224
4232
|
fontSize: errorSize ? errorSize : configStyles.NEWAUTOCOMPLETE.errorSize,
|
|
4225
4233
|
top: marginTop ? `calc(100% + ${marginTop})` : `calc(100% + ${configStyles.INPUT.marginTop})`,
|
|
@@ -4234,6 +4242,7 @@ const NewAutocomplete = ({
|
|
|
4234
4242
|
alert('Please add options prop');
|
|
4235
4243
|
}
|
|
4236
4244
|
options && options.length > 0 && options.map(item => {
|
|
4245
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
4237
4246
|
if (!item.hasOwnProperty(keyNames.name)) {
|
|
4238
4247
|
alert(`Please add ${keyNames.name} property in items of options array`);
|
|
4239
4248
|
}
|
|
@@ -4303,6 +4312,7 @@ const NewAutocomplete = ({
|
|
|
4303
4312
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
4304
4313
|
color: contentTopColor ? contentTopColor : configStyles.NEWAUTOCOMPLETE.contentTopColor,
|
|
4305
4314
|
fontSize: contentTopSize ? contentTopSize : configStyles.NEWAUTOCOMPLETE.contentTopSize,
|
|
4315
|
+
backgroundColor: disabled && (backgroundDisableColor ?? configStyles.NEWAUTOCOMPLETE.backgroundDisableColor),
|
|
4306
4316
|
height: contentTopHeight ? contentTopHeight : configStyles.NEWAUTOCOMPLETE.contentTopHeight,
|
|
4307
4317
|
padding: contentTopPadding ? contentTopPadding : configStyles.NEWAUTOCOMPLETE.contentTopPadding,
|
|
4308
4318
|
display: contentTopDisplay ? contentTopDisplay : configStyles.NEWAUTOCOMPLETE.contentTopDisplay,
|
|
@@ -4398,7 +4408,8 @@ NewAutocomplete.propTypes = {
|
|
|
4398
4408
|
contentBottomRowMarginBottom: PropTypes__default["default"].string,
|
|
4399
4409
|
contentBottomBackgroundColor: PropTypes__default["default"].string,
|
|
4400
4410
|
contentBottomRowBackgroundColor: PropTypes__default["default"].string,
|
|
4401
|
-
contentBottomRowHoverBackgroundColor: PropTypes__default["default"].string
|
|
4411
|
+
contentBottomRowHoverBackgroundColor: PropTypes__default["default"].string,
|
|
4412
|
+
backgroundDisableColor: PropTypes__default["default"].string
|
|
4402
4413
|
};
|
|
4403
4414
|
NewAutocomplete.defaultProps = {
|
|
4404
4415
|
searchCount: 3,
|