@xaypay/tui 0.0.49 → 0.0.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +37 -18
- package/dist/index.js +37 -18
- package/package.json +1 -1
- package/src/components/autocomplate/autocomplate.module.css +8 -0
- package/src/components/autocomplate/index.js +2 -2
- package/src/components/file/file.module.css +1 -1
- package/src/components/file/index.js +1 -2
- package/src/components/input/index.js +113 -77
- package/src/components/modal/index.js +1 -1
- package/src/components/select/select.module.css +1 -1
package/dist/index.es.js
CHANGED
|
@@ -185,8 +185,8 @@ Typography.defaultProps = {
|
|
|
185
185
|
onClick: () => {}
|
|
186
186
|
};
|
|
187
187
|
|
|
188
|
-
var css_248z$b = ".autocomplate-module_autocomplate-content__UbIUT{display:flex;flex-direction:column;position:relative}.autocomplate-module_autocomplate-content-top__FVgCp{border:2px solid #d1d1d1;border-radius:6px;box-sizing:border-box;color:#3c393e;cursor:pointer;display:flex;flex-direction:row;font-size:16px;font-weight:500;height:46px;line-height:22px;max-width:400px;padding:0 15px;transition:border-color .24s}.autocomplate-module_autocomplate-content-top__FVgCp.autocomplate-module_active__40fdV{border-color:#00236a}.autocomplate-module_autocomplate-content-top__FVgCp:hover{border-color:#3c393e}.autocomplate-module_autocomplate-content-bottom__yk0zP{animation:autocomplate-module_select-show__7Uap4 .64s linear forwards;background:#fbfbfb;border-radius:6px;box-shadow:0 0 10px rgba(60,57,62,.08);left:0;max-height:0;max-width:400px;overflow:hidden;position:absolute;top:52px;width:100%;z-index:1}.autocomplate-module_autocomplate-content-bottom-inner__rF5IF{display:flex;flex-direction:column;max-height:234px;overflow-x:hidden;overflow-y:auto}@keyframes autocomplate-module_select-show__7Uap4{to{max-height:400px}}.autocomplate-module_autocomplate-content-bottom-row__dRsZa{align-items:center;background:#fff;box-sizing:border-box;color:#3c393e;cursor:pointer;display:flex;font-size:16px;font-weight:500;height:46px;line-height:22px;margin-bottom:2px;padding:0 15px;transition:background .24s,color .24s}.autocomplate-module_autocomplate-content-bottom-row__dRsZa .autocomplate-module_no-option__xv0-E{color:red}.autocomplate-module_autocomplate-content-bottom-row__dRsZa:hover{background:unset;color:#00236a}.autocomplate-module_option-active__WuH4I .autocomplate-module_autocomplate-content-bottom-row__dRsZa{color:#00236a}.autocomplate-module_autocomplate-title__3Qxqz{color:#3c393e;display:block;font-size:16px;font-weight:500;line-height:22px;margin-bottom:6px;text-transform:none}";
|
|
189
|
-
var styles$a = {"autocomplate-content":"autocomplate-module_autocomplate-content__UbIUT","autocomplate-content-top":"autocomplate-module_autocomplate-content-top__FVgCp","active":"autocomplate-module_active__40fdV","autocomplate-content-bottom":"autocomplate-module_autocomplate-content-bottom__yk0zP","select-show":"autocomplate-module_select-show__7Uap4","autocomplate-content-bottom-inner":"autocomplate-module_autocomplate-content-bottom-inner__rF5IF","autocomplate-content-bottom-row":"autocomplate-module_autocomplate-content-bottom-row__dRsZa","no-option":"autocomplate-module_no-option__xv0-E","option-active":"autocomplate-module_option-active__WuH4I","autocomplate-title":"autocomplate-module_autocomplate-title__3Qxqz"};
|
|
188
|
+
var css_248z$b = ".autocomplate-module_autocomplate-content__UbIUT{display:flex;flex-direction:column;position:relative}.autocomplate-module_autocomplate-content-top__FVgCp{border:2px solid #d1d1d1;border-radius:6px;box-sizing:border-box;color:#3c393e;cursor:pointer;display:flex;flex-direction:row;font-size:16px;font-weight:500;height:46px;line-height:22px;max-width:400px;padding:0 15px;transition:border-color .24s}.autocomplate-module_autocomplate-content-top__FVgCp.autocomplate-module_active__40fdV{border-color:#00236a}.autocomplate-module_autocomplate-content-top__FVgCp:hover{border-color:#3c393e}.autocomplate-module_autocomplate-content-bottom__yk0zP{animation:autocomplate-module_select-show__7Uap4 .64s linear forwards;background:#fbfbfb;border-radius:6px;box-shadow:0 0 10px rgba(60,57,62,.08);left:0;max-height:0;max-width:400px;overflow:hidden;position:absolute;top:52px;width:100%;z-index:1}.autocomplate-module_autocomplate-content-bottom-inner__rF5IF{display:flex;flex-direction:column;max-height:234px;overflow-x:hidden;overflow-y:auto}@keyframes autocomplate-module_select-show__7Uap4{to{max-height:400px}}.autocomplate-module_autocomplate-content-bottom-row__dRsZa{align-items:center;background:#fff;box-sizing:border-box;color:#3c393e;cursor:pointer;display:flex;font-size:16px;font-weight:500;height:46px;line-height:22px;margin-bottom:2px;padding:0 15px;transition:background .24s,color .24s}.autocomplate-module_autocomplate-content-bottom-row__dRsZa .autocomplate-module_no-option__xv0-E{color:red}.autocomplate-module_autocomplate-content-bottom-row__dRsZa:hover{background:unset;color:#00236a}.autocomplate-module_option-active__WuH4I .autocomplate-module_autocomplate-content-bottom-row__dRsZa{color:#00236a}.autocomplate-module_autocomplate-title__3Qxqz{color:#3c393e;display:block;font-size:16px;font-weight:500;line-height:22px;margin-bottom:6px;text-transform:none}.autocomplate-module_errorBorder__LV-nb{border:2px solid #e00!important}.autocomplate-module_errorMessage__Gchpc{color:#e00!important}";
|
|
189
|
+
var styles$a = {"autocomplate-content":"autocomplate-module_autocomplate-content__UbIUT","autocomplate-content-top":"autocomplate-module_autocomplate-content-top__FVgCp","active":"autocomplate-module_active__40fdV","autocomplate-content-bottom":"autocomplate-module_autocomplate-content-bottom__yk0zP","select-show":"autocomplate-module_select-show__7Uap4","autocomplate-content-bottom-inner":"autocomplate-module_autocomplate-content-bottom-inner__rF5IF","autocomplate-content-bottom-row":"autocomplate-module_autocomplate-content-bottom-row__dRsZa","no-option":"autocomplate-module_no-option__xv0-E","option-active":"autocomplate-module_option-active__WuH4I","autocomplate-title":"autocomplate-module_autocomplate-title__3Qxqz","errorBorder":"autocomplate-module_errorBorder__LV-nb","errorMessage":"autocomplate-module_errorMessage__Gchpc"};
|
|
190
190
|
styleInject(css_248z$b);
|
|
191
191
|
|
|
192
192
|
const Autocomplate = ({
|
|
@@ -270,7 +270,7 @@ const Autocomplate = ({
|
|
|
270
270
|
className: `${styles$a['autocomplate-content-bottom-row']} autocomplate-content-bottom-row-rem`
|
|
271
271
|
}, /*#__PURE__*/React.createElement("div", {
|
|
272
272
|
className: `${styles$a['no-option']} autocomplate-no-option`
|
|
273
|
-
}, inputValue.length
|
|
273
|
+
}, inputValue.length < searchCount ? `Լրացնել առնվազն ${searchCount} նիշ` : 'Նման տվյալ առկա չէ'))));
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
return /*#__PURE__*/React.createElement(React.Fragment, null, label ? /*#__PURE__*/React.createElement("label", {
|
|
@@ -284,7 +284,7 @@ const Autocomplate = ({
|
|
|
284
284
|
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
285
285
|
id: inputId,
|
|
286
286
|
type: "text",
|
|
287
|
-
className: `${styles$a['autocomplate-content-top']} autocomplate-content-top-rem`,
|
|
287
|
+
className: `${styles$a['autocomplate-content-top']} autocomplate-content-top-rem ${errorMesage ? styles$a.errorBorder : ''}`,
|
|
288
288
|
disabled: disabled,
|
|
289
289
|
onChange: handleChange,
|
|
290
290
|
onClick: () => {
|
|
@@ -430,16 +430,23 @@ const Input = ({
|
|
|
430
430
|
regexpError,
|
|
431
431
|
errorMesage,
|
|
432
432
|
required,
|
|
433
|
+
showEye,
|
|
433
434
|
disabled,
|
|
434
435
|
type,
|
|
436
|
+
tooltip,
|
|
435
437
|
onChange,
|
|
436
438
|
value,
|
|
437
439
|
...props
|
|
438
440
|
}) => {
|
|
439
441
|
const [inputValue, setInputValue] = useState(value);
|
|
442
|
+
const [eyeStatus, setEyeStatus] = useState("");
|
|
443
|
+
const [tooltipStatus, setTooltipStatus] = useState(false);
|
|
440
444
|
const handleChange = event => {
|
|
441
445
|
setInputValue(event.target.value);
|
|
442
|
-
onChange ? onChange(event.target.value) :
|
|
446
|
+
onChange ? onChange(event.target.value) : "";
|
|
447
|
+
};
|
|
448
|
+
document.onmouseup = () => {
|
|
449
|
+
setEyeStatus("");
|
|
443
450
|
};
|
|
444
451
|
useEffect(() => {
|
|
445
452
|
setInputValue(value);
|
|
@@ -451,17 +458,17 @@ const Input = ({
|
|
|
451
458
|
const regex = new RegExp(regexp);
|
|
452
459
|
eMessage = regex.test(inputValue) ? "" : regexpError;
|
|
453
460
|
}
|
|
454
|
-
const classProps = classnames(styles$8.input, styles$8[size], eMessage !=
|
|
461
|
+
const classProps = classnames(styles$8.input, styles$8[size], eMessage != "" ? styles$8["error-message"] : "", className, "input-inner-rem");
|
|
455
462
|
return /*#__PURE__*/React.createElement("div", {
|
|
456
|
-
className: `${styles$8[
|
|
463
|
+
className: `${styles$8["input-wrap"]} input-wrap-rem`
|
|
457
464
|
}, label ? /*#__PURE__*/React.createElement("label", {
|
|
458
|
-
className: `${styles$8[
|
|
465
|
+
className: `${styles$8["input-title"]} input-title-rem`
|
|
459
466
|
}, label, " ", required && /*#__PURE__*/React.createElement("sup", {
|
|
460
467
|
style: {
|
|
461
468
|
color: "#ee0000"
|
|
462
469
|
}
|
|
463
470
|
}, "*")) : "", /*#__PURE__*/React.createElement("input", _extends({}, props, {
|
|
464
|
-
type: type,
|
|
471
|
+
type: eyeStatus || type,
|
|
465
472
|
className: classProps,
|
|
466
473
|
style: color && {
|
|
467
474
|
color
|
|
@@ -469,7 +476,19 @@ const Input = ({
|
|
|
469
476
|
disabled: disabled ? disabled : "",
|
|
470
477
|
onChange: handleChange,
|
|
471
478
|
value: inputValue
|
|
472
|
-
})),
|
|
479
|
+
})), type === "password" && showEye ? /*#__PURE__*/React.createElement("p", {
|
|
480
|
+
onMouseDown: () => {
|
|
481
|
+
setEyeStatus("text");
|
|
482
|
+
},
|
|
483
|
+
onMouseUp: () => {
|
|
484
|
+
setEyeStatus("");
|
|
485
|
+
}
|
|
486
|
+
}, "\uD83D\uDC41") : null, tooltip ? /*#__PURE__*/React.createElement(Typography, {
|
|
487
|
+
variant: "p",
|
|
488
|
+
onClick: () => {
|
|
489
|
+
setTooltipStatus(!tooltipStatus);
|
|
490
|
+
}
|
|
491
|
+
}, "\u24D8") : null, tooltipStatus ? /*#__PURE__*/React.createElement("p", null, tooltip) : null, eMessage ? /*#__PURE__*/React.createElement("span", {
|
|
473
492
|
className: styles$8.inputErrorMessages
|
|
474
493
|
}, eMessage) : "");
|
|
475
494
|
};
|
|
@@ -485,7 +504,9 @@ Input.propTypes = {
|
|
|
485
504
|
regexpError: PropTypes.string,
|
|
486
505
|
label: PropTypes.string.isRequired,
|
|
487
506
|
disabled: PropTypes.bool,
|
|
488
|
-
value: PropTypes.string
|
|
507
|
+
value: PropTypes.string,
|
|
508
|
+
showEye: PropTypes.bool,
|
|
509
|
+
tooltip: PropTypes.string
|
|
489
510
|
};
|
|
490
511
|
Input.defaultProps = {
|
|
491
512
|
label: "",
|
|
@@ -814,7 +835,7 @@ Stepper.propTypes = {
|
|
|
814
835
|
activeSteps: PropTypes.number
|
|
815
836
|
};
|
|
816
837
|
|
|
817
|
-
var css_248z$3 = ".select-module_select-title__c8bR7{color:#3c393e;display:block;font-size:16px;font-weight:500;line-height:22px;margin-bottom:6px;text-transform:none}.select-module_select-content__GCMDX{display:flex;flex-direction:column;position:relative}.select-module_select-content-top__Aw-fB{border:2px solid #d1d1d1;border-radius:6px;box-sizing:border-box;color:#3c393e;cursor:pointer;display:flex;flex-direction:row;font-size:16px;font-weight:500;height:46px;line-height:22px;max-width:400px;padding:0 15px;transition:border-color .24s}.select-module_select-content-top__Aw-fB.select-module_active__v2Dce{border-color:#00236a}.select-module_select-content-top__Aw-fB:hover{border-color:#3c393e}.select-module_select-content-bottom__ueZCR{animation:select-module_select-show__391hQ .64s linear forwards;background:#fbfbfb;border-radius:6px;box-shadow:0 0 10px rgba(60,57,62,.08);left:0;max-height:0;max-width:400px;overflow:hidden;position:absolute;top:52px;width:100%;z-index:1}.select-module_select-content-bottom-inner__NWy2X{display:flex;flex-direction:column;max-height:234px;overflow-x:hidden;overflow-y:auto}@keyframes select-module_select-show__391hQ{to{max-height:400px}}.select-module_select-content-top-text__euajq{align-items:center;display:flex;flex:1;flex-direction:row;flex-wrap:nowrap}.select-module_select-content-top-icon__MBrGK{align-items:center;box-sizing:border-box;display:flex;flex:0 0 auto;padding:0 5px 0 20px}.select-module_select-content-top-icon__MBrGK>i{color:#3c393e;font-size:12px!important}.select-module_select-content-top-icon__MBrGK>i:not(:last-child){align-items:center;border-right:1px solid #eee;display:flex;height:22px;margin-right:8px;padding:0 8px}.select-module_select-content-bottom-row__eKq5L{align-items:center;background:#fff;box-sizing:border-box;color:#3c393e;cursor:pointer;display:flex;font-size:16px;font-weight:500;line-height:22px;margin-bottom:2px;min-height:46px;padding:0 15px;transition:background .24s,color .24s}.select-module_select-content-bottom-row__eKq5L:last-child{margin-bottom:0}.select-module_select-content-bottom-row__eKq5L:hover{background:unset;color:#00236a}.select-module_error-message__-ac6X{border:2px solid #e00}.select-module_eMessage__Mm-F7{color:#e00}";
|
|
838
|
+
var css_248z$3 = ".select-module_select-title__c8bR7{color:#3c393e;display:block;font-size:16px;font-weight:500;line-height:22px;margin-bottom:6px;text-transform:none}.select-module_select-content__GCMDX{display:flex;flex-direction:column;position:relative}.select-module_select-content-top__Aw-fB{border:2px solid #d1d1d1;border-radius:6px;box-sizing:border-box;color:#3c393e;cursor:pointer;display:flex;flex-direction:row;font-size:16px;font-weight:500;height:46px;line-height:22px;max-width:400px;padding:0 15px;transition:border-color .24s}.select-module_select-content-top__Aw-fB.select-module_active__v2Dce{border-color:#00236a}.select-module_select-content-top__Aw-fB:hover{border-color:#3c393e}.select-module_select-content-bottom__ueZCR{animation:select-module_select-show__391hQ .64s linear forwards;background:#fbfbfb;border-radius:6px;box-shadow:0 0 10px rgba(60,57,62,.08);left:0;max-height:0;max-width:400px;overflow:hidden;position:absolute;top:52px;width:100%;z-index:1}.select-module_select-content-bottom-inner__NWy2X{display:flex;flex-direction:column;max-height:234px;overflow-x:hidden;overflow-y:auto}@keyframes select-module_select-show__391hQ{to{max-height:400px}}.select-module_select-content-top-text__euajq{align-items:center;display:flex;flex:1;flex-direction:row;flex-wrap:nowrap}.select-module_select-content-top-icon__MBrGK{align-items:center;box-sizing:border-box;display:flex;flex:0 0 auto;padding:0 5px 0 20px}.select-module_select-content-top-icon__MBrGK>i{color:#3c393e;font-size:12px!important}.select-module_select-content-top-icon__MBrGK>i:not(:last-child){align-items:center;border-right:1px solid #eee;display:flex;height:22px;margin-right:8px;padding:0 8px}.select-module_select-content-bottom-row__eKq5L{align-items:center;background:#fff;box-sizing:border-box;color:#3c393e;cursor:pointer;display:flex;font-size:16px;font-weight:500;line-height:22px;margin-bottom:2px;min-height:46px;padding:0 15px;transition:background .24s,color .24s}.select-module_select-content-bottom-row__eKq5L:last-child{margin-bottom:0}.select-module_select-content-bottom-row__eKq5L:hover{background:unset;color:#00236a}.select-module_error-message__-ac6X{border:2px solid #e00!important}.select-module_eMessage__Mm-F7{color:#e00}";
|
|
818
839
|
var styles$3 = {"select-title":"select-module_select-title__c8bR7","select-content":"select-module_select-content__GCMDX","select-content-top":"select-module_select-content-top__Aw-fB","active":"select-module_active__v2Dce","select-content-bottom":"select-module_select-content-bottom__ueZCR","select-show":"select-module_select-show__391hQ","select-content-bottom-inner":"select-module_select-content-bottom-inner__NWy2X","select-content-top-text":"select-module_select-content-top-text__euajq","select-content-top-icon":"select-module_select-content-top-icon__MBrGK","select-content-bottom-row":"select-module_select-content-bottom-row__eKq5L","error-message":"select-module_error-message__-ac6X","eMessage":"select-module_eMessage__Mm-F7"};
|
|
819
840
|
styleInject(css_248z$3);
|
|
820
841
|
|
|
@@ -940,7 +961,7 @@ Select.defaultProps = {
|
|
|
940
961
|
required: false
|
|
941
962
|
};
|
|
942
963
|
|
|
943
|
-
var css_248z$2 = ".file-module_file-form__l13d5{align-items:center;background:#fbfbfb;border:2px dashed;border-radius:6px;cursor:pointer;display:flex;flex-direction:column;height:190px;justify-content:space-between;overflow:hidden;padding:4px 0;position:relative;width:100%}.file-module_file-form-wrap__qY--B:before{background:rgba(60,57,62,.4);border-radius:6px;content:\"\";height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition:opacity .24s;width:100%;z-index:1}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover:before{opacity:1;pointer-events:unset}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover .file-module_delete-upload-icon__PWN66{opacity:1}.file-module_file-form-inner-upload__tq3Dn{align-items:center;display:flex;flex-direction:column;justify-content:space-between;padding-bottom:16px;padding-top:48px}.file-module_file-form-inner-upload__tq3Dn>img{display:block;margin-bottom:14px}.file-module_upload-info__a8GFs{margin-bottom:40px;max-width:150px;text-align:center}.file-module_upload-info-txt__l11uN{color:#0da574}.file-module_file-form__l13d5.file-module_default__t7KU0{border-color:#d1d1d1}.file-module_file-form__l13d5.file-module_error__H-M4Z{border-color:#e00}.file-module_file-form__l13d5.file-module_accept__WTW6V{border-color:#00236a}.file-module_delete-upload-icon__PWN66{align-items:center;background:#fff;border-radius:6px;cursor:pointer;display:flex;height:26px;justify-content:center;opacity:0;position:absolute;right:10px;top:10px;transition:opacity .24s;width:26px;z-index:11}.file-module_delete-upload-icon__PWN66>i{color:#00236a;font-size:16px}.file-module_upload-file-content__QHMjn{align-items:center;display:flex;height:100%;justify-content:center;max-height:190px;overflow:hidden;position:relative;width:100%}.file-module_upload-file-content__QHMjn>img{bottom:0;display:block;height:190px;left:0;margin:auto;max-height:190px;position:absolute;right:0;top:0;width:auto}.file-module_file-form-title__zWTSB{margin-bottom:10px;max-width:390px;word-break:break-all}.file-module_file-form-wrap__qY--B{position:relative;transform:translateZ(0)}";
|
|
964
|
+
var css_248z$2 = ".file-module_file-form__l13d5{align-items:center;background:#fbfbfb;border:2px dashed;border-radius:6px;cursor:pointer;display:flex;flex-direction:column;height:190px;justify-content:space-between;overflow:hidden;padding:4px 0;position:relative;width:100%}.file-module_file-form-wrap__qY--B:before{background:rgba(60,57,62,.4);border-radius:6px;content:\"\";height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition:opacity .24s;width:100%;z-index:1}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover:before{opacity:1;pointer-events:unset}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover .file-module_delete-upload-icon__PWN66{opacity:1}.file-module_file-form-inner-upload__tq3Dn{align-items:center;display:flex;flex-direction:column;justify-content:space-between;padding-bottom:16px;padding-top:48px}.file-module_file-form-inner-upload__tq3Dn>img{display:block;margin-bottom:14px}.file-module_upload-info__a8GFs{margin-bottom:40px;max-width:150px;text-align:center}.file-module_upload-info-txt__l11uN{color:#0da574}.file-module_file-form__l13d5.file-module_default__t7KU0{border-color:#d1d1d1}.file-module_file-form__l13d5.file-module_error__H-M4Z{border-color:#e00!important}.file-module_file-form__l13d5.file-module_accept__WTW6V{border-color:#00236a}.file-module_delete-upload-icon__PWN66{align-items:center;background:#fff;border-radius:6px;cursor:pointer;display:flex;height:26px;justify-content:center;opacity:0;position:absolute;right:10px;top:10px;transition:opacity .24s;width:26px;z-index:11}.file-module_delete-upload-icon__PWN66>i{color:#00236a;font-size:16px}.file-module_upload-file-content__QHMjn{align-items:center;display:flex;height:100%;justify-content:center;max-height:190px;overflow:hidden;position:relative;width:100%}.file-module_upload-file-content__QHMjn>img{bottom:0;display:block;height:190px;left:0;margin:auto;max-height:190px;position:absolute;right:0;top:0;width:auto}.file-module_file-form-title__zWTSB{margin-bottom:10px;max-width:390px;word-break:break-all}.file-module_file-form-wrap__qY--B{position:relative;transform:translateZ(0)}";
|
|
944
965
|
var styles$2 = {"file-form-wrap":"file-module_file-form-wrap__qY--B","file-form":"file-module_file-form__l13d5","active":"file-module_active__L1gPt","delete-upload-icon":"file-module_delete-upload-icon__PWN66","file-form-inner-upload":"file-module_file-form-inner-upload__tq3Dn","upload-info":"file-module_upload-info__a8GFs","upload-info-txt":"file-module_upload-info-txt__l11uN","default":"file-module_default__t7KU0","error":"file-module_error__H-M4Z","accept":"file-module_accept__WTW6V","upload-file-content":"file-module_upload-file-content__QHMjn","file-form-title":"file-module_file-form-title__zWTSB"};
|
|
945
966
|
styleInject(css_248z$2);
|
|
946
967
|
|
|
@@ -1014,10 +1035,7 @@ const File = ({
|
|
|
1014
1035
|
className: classnames(`${styles$2['file-form-wrap']} file-form-wrap-rem`, image ? styles$2['active'] : '')
|
|
1015
1036
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1016
1037
|
onChange: e => console.log(e),
|
|
1017
|
-
className: `${styles$2['file-form']} file-form-rem`,
|
|
1018
|
-
style: error || errorMesage ? {
|
|
1019
|
-
borderColor: 'red'
|
|
1020
|
-
} : {},
|
|
1038
|
+
className: `${styles$2['file-form']} file-form-rem ${errorMesage ? styles$2['error'] : ''}`,
|
|
1021
1039
|
onClick: () => document.querySelector(`.${name}`).click()
|
|
1022
1040
|
}, /*#__PURE__*/React.createElement("input", {
|
|
1023
1041
|
hidden: true,
|
|
@@ -1085,7 +1103,8 @@ const Modal = ({
|
|
|
1085
1103
|
classnames(styles$1.modal, className);
|
|
1086
1104
|
const [select, setSelect] = useState(selected);
|
|
1087
1105
|
return /*#__PURE__*/React.createElement("div", {
|
|
1088
|
-
className: `${styles$1["modal-wrap"]} modal-wrap-rem
|
|
1106
|
+
className: `${styles$1["modal-wrap"]} modal-wrap-rem`,
|
|
1107
|
+
onClick: () => setShow(false)
|
|
1089
1108
|
}, type == "content" ? /*#__PURE__*/React.createElement("div", {
|
|
1090
1109
|
className: `${styles$1["modal-content"]} modal-content-rem`
|
|
1091
1110
|
}, /*#__PURE__*/React.createElement("div", {
|
package/dist/index.js
CHANGED
|
@@ -196,8 +196,8 @@ Typography.defaultProps = {
|
|
|
196
196
|
onClick: () => {}
|
|
197
197
|
};
|
|
198
198
|
|
|
199
|
-
var css_248z$b = ".autocomplate-module_autocomplate-content__UbIUT{display:flex;flex-direction:column;position:relative}.autocomplate-module_autocomplate-content-top__FVgCp{border:2px solid #d1d1d1;border-radius:6px;box-sizing:border-box;color:#3c393e;cursor:pointer;display:flex;flex-direction:row;font-size:16px;font-weight:500;height:46px;line-height:22px;max-width:400px;padding:0 15px;transition:border-color .24s}.autocomplate-module_autocomplate-content-top__FVgCp.autocomplate-module_active__40fdV{border-color:#00236a}.autocomplate-module_autocomplate-content-top__FVgCp:hover{border-color:#3c393e}.autocomplate-module_autocomplate-content-bottom__yk0zP{animation:autocomplate-module_select-show__7Uap4 .64s linear forwards;background:#fbfbfb;border-radius:6px;box-shadow:0 0 10px rgba(60,57,62,.08);left:0;max-height:0;max-width:400px;overflow:hidden;position:absolute;top:52px;width:100%;z-index:1}.autocomplate-module_autocomplate-content-bottom-inner__rF5IF{display:flex;flex-direction:column;max-height:234px;overflow-x:hidden;overflow-y:auto}@keyframes autocomplate-module_select-show__7Uap4{to{max-height:400px}}.autocomplate-module_autocomplate-content-bottom-row__dRsZa{align-items:center;background:#fff;box-sizing:border-box;color:#3c393e;cursor:pointer;display:flex;font-size:16px;font-weight:500;height:46px;line-height:22px;margin-bottom:2px;padding:0 15px;transition:background .24s,color .24s}.autocomplate-module_autocomplate-content-bottom-row__dRsZa .autocomplate-module_no-option__xv0-E{color:red}.autocomplate-module_autocomplate-content-bottom-row__dRsZa:hover{background:unset;color:#00236a}.autocomplate-module_option-active__WuH4I .autocomplate-module_autocomplate-content-bottom-row__dRsZa{color:#00236a}.autocomplate-module_autocomplate-title__3Qxqz{color:#3c393e;display:block;font-size:16px;font-weight:500;line-height:22px;margin-bottom:6px;text-transform:none}";
|
|
200
|
-
var styles$a = {"autocomplate-content":"autocomplate-module_autocomplate-content__UbIUT","autocomplate-content-top":"autocomplate-module_autocomplate-content-top__FVgCp","active":"autocomplate-module_active__40fdV","autocomplate-content-bottom":"autocomplate-module_autocomplate-content-bottom__yk0zP","select-show":"autocomplate-module_select-show__7Uap4","autocomplate-content-bottom-inner":"autocomplate-module_autocomplate-content-bottom-inner__rF5IF","autocomplate-content-bottom-row":"autocomplate-module_autocomplate-content-bottom-row__dRsZa","no-option":"autocomplate-module_no-option__xv0-E","option-active":"autocomplate-module_option-active__WuH4I","autocomplate-title":"autocomplate-module_autocomplate-title__3Qxqz"};
|
|
199
|
+
var css_248z$b = ".autocomplate-module_autocomplate-content__UbIUT{display:flex;flex-direction:column;position:relative}.autocomplate-module_autocomplate-content-top__FVgCp{border:2px solid #d1d1d1;border-radius:6px;box-sizing:border-box;color:#3c393e;cursor:pointer;display:flex;flex-direction:row;font-size:16px;font-weight:500;height:46px;line-height:22px;max-width:400px;padding:0 15px;transition:border-color .24s}.autocomplate-module_autocomplate-content-top__FVgCp.autocomplate-module_active__40fdV{border-color:#00236a}.autocomplate-module_autocomplate-content-top__FVgCp:hover{border-color:#3c393e}.autocomplate-module_autocomplate-content-bottom__yk0zP{animation:autocomplate-module_select-show__7Uap4 .64s linear forwards;background:#fbfbfb;border-radius:6px;box-shadow:0 0 10px rgba(60,57,62,.08);left:0;max-height:0;max-width:400px;overflow:hidden;position:absolute;top:52px;width:100%;z-index:1}.autocomplate-module_autocomplate-content-bottom-inner__rF5IF{display:flex;flex-direction:column;max-height:234px;overflow-x:hidden;overflow-y:auto}@keyframes autocomplate-module_select-show__7Uap4{to{max-height:400px}}.autocomplate-module_autocomplate-content-bottom-row__dRsZa{align-items:center;background:#fff;box-sizing:border-box;color:#3c393e;cursor:pointer;display:flex;font-size:16px;font-weight:500;height:46px;line-height:22px;margin-bottom:2px;padding:0 15px;transition:background .24s,color .24s}.autocomplate-module_autocomplate-content-bottom-row__dRsZa .autocomplate-module_no-option__xv0-E{color:red}.autocomplate-module_autocomplate-content-bottom-row__dRsZa:hover{background:unset;color:#00236a}.autocomplate-module_option-active__WuH4I .autocomplate-module_autocomplate-content-bottom-row__dRsZa{color:#00236a}.autocomplate-module_autocomplate-title__3Qxqz{color:#3c393e;display:block;font-size:16px;font-weight:500;line-height:22px;margin-bottom:6px;text-transform:none}.autocomplate-module_errorBorder__LV-nb{border:2px solid #e00!important}.autocomplate-module_errorMessage__Gchpc{color:#e00!important}";
|
|
200
|
+
var styles$a = {"autocomplate-content":"autocomplate-module_autocomplate-content__UbIUT","autocomplate-content-top":"autocomplate-module_autocomplate-content-top__FVgCp","active":"autocomplate-module_active__40fdV","autocomplate-content-bottom":"autocomplate-module_autocomplate-content-bottom__yk0zP","select-show":"autocomplate-module_select-show__7Uap4","autocomplate-content-bottom-inner":"autocomplate-module_autocomplate-content-bottom-inner__rF5IF","autocomplate-content-bottom-row":"autocomplate-module_autocomplate-content-bottom-row__dRsZa","no-option":"autocomplate-module_no-option__xv0-E","option-active":"autocomplate-module_option-active__WuH4I","autocomplate-title":"autocomplate-module_autocomplate-title__3Qxqz","errorBorder":"autocomplate-module_errorBorder__LV-nb","errorMessage":"autocomplate-module_errorMessage__Gchpc"};
|
|
201
201
|
styleInject(css_248z$b);
|
|
202
202
|
|
|
203
203
|
const Autocomplate = ({
|
|
@@ -281,7 +281,7 @@ const Autocomplate = ({
|
|
|
281
281
|
className: `${styles$a['autocomplate-content-bottom-row']} autocomplate-content-bottom-row-rem`
|
|
282
282
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
283
283
|
className: `${styles$a['no-option']} autocomplate-no-option`
|
|
284
|
-
}, inputValue.length
|
|
284
|
+
}, inputValue.length < searchCount ? `Լրացնել առնվազն ${searchCount} նիշ` : 'Նման տվյալ առկա չէ'))));
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, label ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
@@ -295,7 +295,7 @@ const Autocomplate = ({
|
|
|
295
295
|
}, /*#__PURE__*/React__default["default"].createElement("input", _extends({
|
|
296
296
|
id: inputId,
|
|
297
297
|
type: "text",
|
|
298
|
-
className: `${styles$a['autocomplate-content-top']} autocomplate-content-top-rem`,
|
|
298
|
+
className: `${styles$a['autocomplate-content-top']} autocomplate-content-top-rem ${errorMesage ? styles$a.errorBorder : ''}`,
|
|
299
299
|
disabled: disabled,
|
|
300
300
|
onChange: handleChange,
|
|
301
301
|
onClick: () => {
|
|
@@ -441,16 +441,23 @@ const Input = ({
|
|
|
441
441
|
regexpError,
|
|
442
442
|
errorMesage,
|
|
443
443
|
required,
|
|
444
|
+
showEye,
|
|
444
445
|
disabled,
|
|
445
446
|
type,
|
|
447
|
+
tooltip,
|
|
446
448
|
onChange,
|
|
447
449
|
value,
|
|
448
450
|
...props
|
|
449
451
|
}) => {
|
|
450
452
|
const [inputValue, setInputValue] = React.useState(value);
|
|
453
|
+
const [eyeStatus, setEyeStatus] = React.useState("");
|
|
454
|
+
const [tooltipStatus, setTooltipStatus] = React.useState(false);
|
|
451
455
|
const handleChange = event => {
|
|
452
456
|
setInputValue(event.target.value);
|
|
453
|
-
onChange ? onChange(event.target.value) :
|
|
457
|
+
onChange ? onChange(event.target.value) : "";
|
|
458
|
+
};
|
|
459
|
+
document.onmouseup = () => {
|
|
460
|
+
setEyeStatus("");
|
|
454
461
|
};
|
|
455
462
|
React.useEffect(() => {
|
|
456
463
|
setInputValue(value);
|
|
@@ -462,17 +469,17 @@ const Input = ({
|
|
|
462
469
|
const regex = new RegExp(regexp);
|
|
463
470
|
eMessage = regex.test(inputValue) ? "" : regexpError;
|
|
464
471
|
}
|
|
465
|
-
const classProps = classnames__default["default"](styles$8.input, styles$8[size], eMessage !=
|
|
472
|
+
const classProps = classnames__default["default"](styles$8.input, styles$8[size], eMessage != "" ? styles$8["error-message"] : "", className, "input-inner-rem");
|
|
466
473
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
467
|
-
className: `${styles$8[
|
|
474
|
+
className: `${styles$8["input-wrap"]} input-wrap-rem`
|
|
468
475
|
}, label ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
469
|
-
className: `${styles$8[
|
|
476
|
+
className: `${styles$8["input-title"]} input-title-rem`
|
|
470
477
|
}, label, " ", required && /*#__PURE__*/React__default["default"].createElement("sup", {
|
|
471
478
|
style: {
|
|
472
479
|
color: "#ee0000"
|
|
473
480
|
}
|
|
474
481
|
}, "*")) : "", /*#__PURE__*/React__default["default"].createElement("input", _extends({}, props, {
|
|
475
|
-
type: type,
|
|
482
|
+
type: eyeStatus || type,
|
|
476
483
|
className: classProps,
|
|
477
484
|
style: color && {
|
|
478
485
|
color
|
|
@@ -480,7 +487,19 @@ const Input = ({
|
|
|
480
487
|
disabled: disabled ? disabled : "",
|
|
481
488
|
onChange: handleChange,
|
|
482
489
|
value: inputValue
|
|
483
|
-
})),
|
|
490
|
+
})), type === "password" && showEye ? /*#__PURE__*/React__default["default"].createElement("p", {
|
|
491
|
+
onMouseDown: () => {
|
|
492
|
+
setEyeStatus("text");
|
|
493
|
+
},
|
|
494
|
+
onMouseUp: () => {
|
|
495
|
+
setEyeStatus("");
|
|
496
|
+
}
|
|
497
|
+
}, "\uD83D\uDC41") : null, tooltip ? /*#__PURE__*/React__default["default"].createElement(Typography, {
|
|
498
|
+
variant: "p",
|
|
499
|
+
onClick: () => {
|
|
500
|
+
setTooltipStatus(!tooltipStatus);
|
|
501
|
+
}
|
|
502
|
+
}, "\u24D8") : null, tooltipStatus ? /*#__PURE__*/React__default["default"].createElement("p", null, tooltip) : null, eMessage ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
484
503
|
className: styles$8.inputErrorMessages
|
|
485
504
|
}, eMessage) : "");
|
|
486
505
|
};
|
|
@@ -496,7 +515,9 @@ Input.propTypes = {
|
|
|
496
515
|
regexpError: PropTypes__default["default"].string,
|
|
497
516
|
label: PropTypes__default["default"].string.isRequired,
|
|
498
517
|
disabled: PropTypes__default["default"].bool,
|
|
499
|
-
value: PropTypes__default["default"].string
|
|
518
|
+
value: PropTypes__default["default"].string,
|
|
519
|
+
showEye: PropTypes__default["default"].bool,
|
|
520
|
+
tooltip: PropTypes__default["default"].string
|
|
500
521
|
};
|
|
501
522
|
Input.defaultProps = {
|
|
502
523
|
label: "",
|
|
@@ -825,7 +846,7 @@ Stepper.propTypes = {
|
|
|
825
846
|
activeSteps: PropTypes__default["default"].number
|
|
826
847
|
};
|
|
827
848
|
|
|
828
|
-
var css_248z$3 = ".select-module_select-title__c8bR7{color:#3c393e;display:block;font-size:16px;font-weight:500;line-height:22px;margin-bottom:6px;text-transform:none}.select-module_select-content__GCMDX{display:flex;flex-direction:column;position:relative}.select-module_select-content-top__Aw-fB{border:2px solid #d1d1d1;border-radius:6px;box-sizing:border-box;color:#3c393e;cursor:pointer;display:flex;flex-direction:row;font-size:16px;font-weight:500;height:46px;line-height:22px;max-width:400px;padding:0 15px;transition:border-color .24s}.select-module_select-content-top__Aw-fB.select-module_active__v2Dce{border-color:#00236a}.select-module_select-content-top__Aw-fB:hover{border-color:#3c393e}.select-module_select-content-bottom__ueZCR{animation:select-module_select-show__391hQ .64s linear forwards;background:#fbfbfb;border-radius:6px;box-shadow:0 0 10px rgba(60,57,62,.08);left:0;max-height:0;max-width:400px;overflow:hidden;position:absolute;top:52px;width:100%;z-index:1}.select-module_select-content-bottom-inner__NWy2X{display:flex;flex-direction:column;max-height:234px;overflow-x:hidden;overflow-y:auto}@keyframes select-module_select-show__391hQ{to{max-height:400px}}.select-module_select-content-top-text__euajq{align-items:center;display:flex;flex:1;flex-direction:row;flex-wrap:nowrap}.select-module_select-content-top-icon__MBrGK{align-items:center;box-sizing:border-box;display:flex;flex:0 0 auto;padding:0 5px 0 20px}.select-module_select-content-top-icon__MBrGK>i{color:#3c393e;font-size:12px!important}.select-module_select-content-top-icon__MBrGK>i:not(:last-child){align-items:center;border-right:1px solid #eee;display:flex;height:22px;margin-right:8px;padding:0 8px}.select-module_select-content-bottom-row__eKq5L{align-items:center;background:#fff;box-sizing:border-box;color:#3c393e;cursor:pointer;display:flex;font-size:16px;font-weight:500;line-height:22px;margin-bottom:2px;min-height:46px;padding:0 15px;transition:background .24s,color .24s}.select-module_select-content-bottom-row__eKq5L:last-child{margin-bottom:0}.select-module_select-content-bottom-row__eKq5L:hover{background:unset;color:#00236a}.select-module_error-message__-ac6X{border:2px solid #e00}.select-module_eMessage__Mm-F7{color:#e00}";
|
|
849
|
+
var css_248z$3 = ".select-module_select-title__c8bR7{color:#3c393e;display:block;font-size:16px;font-weight:500;line-height:22px;margin-bottom:6px;text-transform:none}.select-module_select-content__GCMDX{display:flex;flex-direction:column;position:relative}.select-module_select-content-top__Aw-fB{border:2px solid #d1d1d1;border-radius:6px;box-sizing:border-box;color:#3c393e;cursor:pointer;display:flex;flex-direction:row;font-size:16px;font-weight:500;height:46px;line-height:22px;max-width:400px;padding:0 15px;transition:border-color .24s}.select-module_select-content-top__Aw-fB.select-module_active__v2Dce{border-color:#00236a}.select-module_select-content-top__Aw-fB:hover{border-color:#3c393e}.select-module_select-content-bottom__ueZCR{animation:select-module_select-show__391hQ .64s linear forwards;background:#fbfbfb;border-radius:6px;box-shadow:0 0 10px rgba(60,57,62,.08);left:0;max-height:0;max-width:400px;overflow:hidden;position:absolute;top:52px;width:100%;z-index:1}.select-module_select-content-bottom-inner__NWy2X{display:flex;flex-direction:column;max-height:234px;overflow-x:hidden;overflow-y:auto}@keyframes select-module_select-show__391hQ{to{max-height:400px}}.select-module_select-content-top-text__euajq{align-items:center;display:flex;flex:1;flex-direction:row;flex-wrap:nowrap}.select-module_select-content-top-icon__MBrGK{align-items:center;box-sizing:border-box;display:flex;flex:0 0 auto;padding:0 5px 0 20px}.select-module_select-content-top-icon__MBrGK>i{color:#3c393e;font-size:12px!important}.select-module_select-content-top-icon__MBrGK>i:not(:last-child){align-items:center;border-right:1px solid #eee;display:flex;height:22px;margin-right:8px;padding:0 8px}.select-module_select-content-bottom-row__eKq5L{align-items:center;background:#fff;box-sizing:border-box;color:#3c393e;cursor:pointer;display:flex;font-size:16px;font-weight:500;line-height:22px;margin-bottom:2px;min-height:46px;padding:0 15px;transition:background .24s,color .24s}.select-module_select-content-bottom-row__eKq5L:last-child{margin-bottom:0}.select-module_select-content-bottom-row__eKq5L:hover{background:unset;color:#00236a}.select-module_error-message__-ac6X{border:2px solid #e00!important}.select-module_eMessage__Mm-F7{color:#e00}";
|
|
829
850
|
var styles$3 = {"select-title":"select-module_select-title__c8bR7","select-content":"select-module_select-content__GCMDX","select-content-top":"select-module_select-content-top__Aw-fB","active":"select-module_active__v2Dce","select-content-bottom":"select-module_select-content-bottom__ueZCR","select-show":"select-module_select-show__391hQ","select-content-bottom-inner":"select-module_select-content-bottom-inner__NWy2X","select-content-top-text":"select-module_select-content-top-text__euajq","select-content-top-icon":"select-module_select-content-top-icon__MBrGK","select-content-bottom-row":"select-module_select-content-bottom-row__eKq5L","error-message":"select-module_error-message__-ac6X","eMessage":"select-module_eMessage__Mm-F7"};
|
|
830
851
|
styleInject(css_248z$3);
|
|
831
852
|
|
|
@@ -951,7 +972,7 @@ Select.defaultProps = {
|
|
|
951
972
|
required: false
|
|
952
973
|
};
|
|
953
974
|
|
|
954
|
-
var css_248z$2 = ".file-module_file-form__l13d5{align-items:center;background:#fbfbfb;border:2px dashed;border-radius:6px;cursor:pointer;display:flex;flex-direction:column;height:190px;justify-content:space-between;overflow:hidden;padding:4px 0;position:relative;width:100%}.file-module_file-form-wrap__qY--B:before{background:rgba(60,57,62,.4);border-radius:6px;content:\"\";height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition:opacity .24s;width:100%;z-index:1}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover:before{opacity:1;pointer-events:unset}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover .file-module_delete-upload-icon__PWN66{opacity:1}.file-module_file-form-inner-upload__tq3Dn{align-items:center;display:flex;flex-direction:column;justify-content:space-between;padding-bottom:16px;padding-top:48px}.file-module_file-form-inner-upload__tq3Dn>img{display:block;margin-bottom:14px}.file-module_upload-info__a8GFs{margin-bottom:40px;max-width:150px;text-align:center}.file-module_upload-info-txt__l11uN{color:#0da574}.file-module_file-form__l13d5.file-module_default__t7KU0{border-color:#d1d1d1}.file-module_file-form__l13d5.file-module_error__H-M4Z{border-color:#e00}.file-module_file-form__l13d5.file-module_accept__WTW6V{border-color:#00236a}.file-module_delete-upload-icon__PWN66{align-items:center;background:#fff;border-radius:6px;cursor:pointer;display:flex;height:26px;justify-content:center;opacity:0;position:absolute;right:10px;top:10px;transition:opacity .24s;width:26px;z-index:11}.file-module_delete-upload-icon__PWN66>i{color:#00236a;font-size:16px}.file-module_upload-file-content__QHMjn{align-items:center;display:flex;height:100%;justify-content:center;max-height:190px;overflow:hidden;position:relative;width:100%}.file-module_upload-file-content__QHMjn>img{bottom:0;display:block;height:190px;left:0;margin:auto;max-height:190px;position:absolute;right:0;top:0;width:auto}.file-module_file-form-title__zWTSB{margin-bottom:10px;max-width:390px;word-break:break-all}.file-module_file-form-wrap__qY--B{position:relative;transform:translateZ(0)}";
|
|
975
|
+
var css_248z$2 = ".file-module_file-form__l13d5{align-items:center;background:#fbfbfb;border:2px dashed;border-radius:6px;cursor:pointer;display:flex;flex-direction:column;height:190px;justify-content:space-between;overflow:hidden;padding:4px 0;position:relative;width:100%}.file-module_file-form-wrap__qY--B:before{background:rgba(60,57,62,.4);border-radius:6px;content:\"\";height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition:opacity .24s;width:100%;z-index:1}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover:before{opacity:1;pointer-events:unset}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover .file-module_delete-upload-icon__PWN66{opacity:1}.file-module_file-form-inner-upload__tq3Dn{align-items:center;display:flex;flex-direction:column;justify-content:space-between;padding-bottom:16px;padding-top:48px}.file-module_file-form-inner-upload__tq3Dn>img{display:block;margin-bottom:14px}.file-module_upload-info__a8GFs{margin-bottom:40px;max-width:150px;text-align:center}.file-module_upload-info-txt__l11uN{color:#0da574}.file-module_file-form__l13d5.file-module_default__t7KU0{border-color:#d1d1d1}.file-module_file-form__l13d5.file-module_error__H-M4Z{border-color:#e00!important}.file-module_file-form__l13d5.file-module_accept__WTW6V{border-color:#00236a}.file-module_delete-upload-icon__PWN66{align-items:center;background:#fff;border-radius:6px;cursor:pointer;display:flex;height:26px;justify-content:center;opacity:0;position:absolute;right:10px;top:10px;transition:opacity .24s;width:26px;z-index:11}.file-module_delete-upload-icon__PWN66>i{color:#00236a;font-size:16px}.file-module_upload-file-content__QHMjn{align-items:center;display:flex;height:100%;justify-content:center;max-height:190px;overflow:hidden;position:relative;width:100%}.file-module_upload-file-content__QHMjn>img{bottom:0;display:block;height:190px;left:0;margin:auto;max-height:190px;position:absolute;right:0;top:0;width:auto}.file-module_file-form-title__zWTSB{margin-bottom:10px;max-width:390px;word-break:break-all}.file-module_file-form-wrap__qY--B{position:relative;transform:translateZ(0)}";
|
|
955
976
|
var styles$2 = {"file-form-wrap":"file-module_file-form-wrap__qY--B","file-form":"file-module_file-form__l13d5","active":"file-module_active__L1gPt","delete-upload-icon":"file-module_delete-upload-icon__PWN66","file-form-inner-upload":"file-module_file-form-inner-upload__tq3Dn","upload-info":"file-module_upload-info__a8GFs","upload-info-txt":"file-module_upload-info-txt__l11uN","default":"file-module_default__t7KU0","error":"file-module_error__H-M4Z","accept":"file-module_accept__WTW6V","upload-file-content":"file-module_upload-file-content__QHMjn","file-form-title":"file-module_file-form-title__zWTSB"};
|
|
956
977
|
styleInject(css_248z$2);
|
|
957
978
|
|
|
@@ -1025,10 +1046,7 @@ const File = ({
|
|
|
1025
1046
|
className: classnames__default["default"](`${styles$2['file-form-wrap']} file-form-wrap-rem`, image ? styles$2['active'] : '')
|
|
1026
1047
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1027
1048
|
onChange: e => console.log(e),
|
|
1028
|
-
className: `${styles$2['file-form']} file-form-rem`,
|
|
1029
|
-
style: error || errorMesage ? {
|
|
1030
|
-
borderColor: 'red'
|
|
1031
|
-
} : {},
|
|
1049
|
+
className: `${styles$2['file-form']} file-form-rem ${errorMesage ? styles$2['error'] : ''}`,
|
|
1032
1050
|
onClick: () => document.querySelector(`.${name}`).click()
|
|
1033
1051
|
}, /*#__PURE__*/React__default["default"].createElement("input", {
|
|
1034
1052
|
hidden: true,
|
|
@@ -1096,7 +1114,8 @@ const Modal = ({
|
|
|
1096
1114
|
classnames__default["default"](styles$1.modal, className);
|
|
1097
1115
|
const [select, setSelect] = React.useState(selected);
|
|
1098
1116
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1099
|
-
className: `${styles$1["modal-wrap"]} modal-wrap-rem
|
|
1117
|
+
className: `${styles$1["modal-wrap"]} modal-wrap-rem`,
|
|
1118
|
+
onClick: () => setShow(false)
|
|
1100
1119
|
}, type == "content" ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1101
1120
|
className: `${styles$1["modal-content"]} modal-content-rem`
|
|
1102
1121
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
package/package.json
CHANGED
|
@@ -81,7 +81,7 @@ export const Autocomplate = ({
|
|
|
81
81
|
<div className={`${styles['autocomplate-content-bottom']} autocomplate-content-bottom-rem`}>
|
|
82
82
|
<div className={`${styles['autocomplate-content-bottom-inner']} autocomplate-content-bottom-inner-rem`}>
|
|
83
83
|
<div className={`${styles['autocomplate-content-bottom-row']} autocomplate-content-bottom-row-rem`}>
|
|
84
|
-
<div className={`${styles['no-option']} autocomplate-no-option`}>{inputValue.length
|
|
84
|
+
<div className={`${styles['no-option']} autocomplate-no-option`}>{inputValue.length < searchCount ? `Լրացնել առնվազն ${searchCount} նիշ` : 'Նման տվյալ առկա չէ'}</div>
|
|
85
85
|
</div>
|
|
86
86
|
</div>
|
|
87
87
|
</div>
|
|
@@ -96,7 +96,7 @@ export const Autocomplate = ({
|
|
|
96
96
|
<input
|
|
97
97
|
id={inputId}
|
|
98
98
|
type="text"
|
|
99
|
-
className={`${styles['autocomplate-content-top']} autocomplate-content-top-rem`}
|
|
99
|
+
className={`${styles['autocomplate-content-top']} autocomplate-content-top-rem ${errorMesage ? styles.errorBorder : ''}`}
|
|
100
100
|
disabled={disabled}
|
|
101
101
|
onChange={handleChange}
|
|
102
102
|
onClick={() => { setShowOptions(!showOptions) }}
|
|
@@ -70,8 +70,7 @@ export const File = ({
|
|
|
70
70
|
<div className={classnames(`${styles['file-form-wrap']} file-form-wrap-rem`,image ? styles['active'] : '')}>
|
|
71
71
|
<div
|
|
72
72
|
onChange={(e) => console.log(e)}
|
|
73
|
-
className={`${styles['file-form']} file-form-rem`}
|
|
74
|
-
style={error || errorMesage ? { borderColor: 'red' } : {}}
|
|
73
|
+
className={`${styles['file-form']} file-form-rem ${errorMesage ? styles['error'] : '' }`}
|
|
75
74
|
onClick={() => document.querySelector(`.${name}`).click()}
|
|
76
75
|
>
|
|
77
76
|
<input
|
|
@@ -2,98 +2,134 @@ import React, { useEffect, useState } from "react";
|
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import classnames from "classnames";
|
|
4
4
|
import styles from "./input.module.css";
|
|
5
|
+
import {Typography} from "../typography"
|
|
5
6
|
|
|
6
7
|
export const InputTypes = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
TEXT: "text",
|
|
9
|
+
PASSWORD: "password",
|
|
10
|
+
EMAIL: "email",
|
|
11
|
+
NUMBER: "number",
|
|
12
|
+
TEL: "tel",
|
|
12
13
|
};
|
|
13
14
|
|
|
14
15
|
export const InputSizes = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
SMALL: "size-small",
|
|
17
|
+
MEDIUM: "size-medium",
|
|
18
|
+
LARGE: "size-large",
|
|
18
19
|
};
|
|
19
20
|
|
|
20
21
|
export const Input = ({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
size,
|
|
23
|
+
color,
|
|
24
|
+
className,
|
|
25
|
+
label,
|
|
26
|
+
regexp,
|
|
27
|
+
regexpError,
|
|
28
|
+
errorMesage,
|
|
29
|
+
required,
|
|
30
|
+
showEye,
|
|
31
|
+
disabled,
|
|
32
|
+
type,
|
|
33
|
+
tooltip,
|
|
34
|
+
onChange,
|
|
35
|
+
value,
|
|
36
|
+
...props
|
|
34
37
|
}) => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
const [inputValue, setInputValue] = useState(value);
|
|
39
|
+
const [eyeStatus, setEyeStatus] = useState("");
|
|
40
|
+
const [tooltipStatus, setTooltipStatus] = useState(false);
|
|
41
|
+
const handleChange = (event) => {
|
|
42
|
+
setInputValue(event.target.value);
|
|
43
|
+
onChange ? onChange(event.target.value) : "";
|
|
44
|
+
};
|
|
45
|
+
document.onmouseup = () => {
|
|
46
|
+
setEyeStatus("");
|
|
47
|
+
};
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
setInputValue(value);
|
|
50
|
+
}, [value]);
|
|
40
51
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
52
|
+
let eMessage = "";
|
|
53
|
+
if (errorMesage) {
|
|
54
|
+
eMessage = errorMesage;
|
|
55
|
+
} else if (regexp) {
|
|
56
|
+
const regex = new RegExp(regexp);
|
|
57
|
+
eMessage = regex.test(inputValue) ? "" : regexpError;
|
|
58
|
+
}
|
|
44
59
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
60
|
+
const classProps = classnames(
|
|
61
|
+
styles.input,
|
|
62
|
+
styles[size],
|
|
63
|
+
eMessage != "" ? styles["error-message"] : "",
|
|
64
|
+
className,
|
|
65
|
+
"input-inner-rem"
|
|
66
|
+
);
|
|
67
|
+
return (
|
|
68
|
+
<div className={`${styles["input-wrap"]} input-wrap-rem`}>
|
|
69
|
+
{label ? (
|
|
70
|
+
<label className={`${styles["input-title"]} input-title-rem`}>
|
|
71
|
+
{label} {required && <sup style={{ color: "#ee0000" }}>*</sup>}
|
|
72
|
+
</label>
|
|
73
|
+
) : (
|
|
74
|
+
""
|
|
75
|
+
)}
|
|
76
|
+
|
|
77
|
+
<input
|
|
78
|
+
{...props}
|
|
79
|
+
type={eyeStatus || type}
|
|
80
|
+
className={classProps}
|
|
81
|
+
style={color && { color }}
|
|
82
|
+
disabled={disabled ? disabled : ""}
|
|
83
|
+
onChange={handleChange}
|
|
84
|
+
value={inputValue}
|
|
85
|
+
/>
|
|
86
|
+
{type === "password" && showEye ? (
|
|
87
|
+
<p
|
|
88
|
+
onMouseDown={() => {
|
|
89
|
+
setEyeStatus("text");
|
|
90
|
+
}}
|
|
91
|
+
onMouseUp={() => {
|
|
92
|
+
setEyeStatus("");
|
|
93
|
+
}}
|
|
94
|
+
>
|
|
95
|
+
👁
|
|
96
|
+
</p>
|
|
97
|
+
) : null}
|
|
98
|
+
{tooltip ? <Typography variant="p"
|
|
99
|
+
onClick={()=> {
|
|
100
|
+
setTooltipStatus(!tooltipStatus)
|
|
101
|
+
}}
|
|
102
|
+
>ⓘ</Typography>: null}
|
|
103
|
+
{tooltipStatus ? <p>{tooltip}</p> : null}
|
|
104
|
+
{eMessage ? <span className={styles.inputErrorMessages}>{eMessage}</span> : ""}
|
|
105
|
+
</div>
|
|
106
|
+
);
|
|
73
107
|
};
|
|
74
108
|
|
|
75
109
|
Input.propTypes = {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
110
|
+
type: PropTypes.oneOf(Object.values(InputTypes)),
|
|
111
|
+
size: PropTypes.oneOf(Object.values(InputSizes)),
|
|
112
|
+
color: PropTypes.string,
|
|
113
|
+
className: PropTypes.string,
|
|
114
|
+
onChange: PropTypes.func,
|
|
115
|
+
required: PropTypes.bool,
|
|
116
|
+
errorMesage: PropTypes.string,
|
|
117
|
+
regexp: PropTypes.string,
|
|
118
|
+
regexpError: PropTypes.string,
|
|
119
|
+
label: PropTypes.string.isRequired,
|
|
120
|
+
disabled: PropTypes.bool,
|
|
121
|
+
value: PropTypes.string,
|
|
122
|
+
showEye: PropTypes.bool,
|
|
123
|
+
tooltip: PropTypes.string,
|
|
88
124
|
};
|
|
89
125
|
|
|
90
126
|
Input.defaultProps = {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
127
|
+
label: "",
|
|
128
|
+
color: null,
|
|
129
|
+
size: InputSizes.MEDIUM,
|
|
130
|
+
onChange: undefined,
|
|
131
|
+
required: false,
|
|
132
|
+
errorMesage: "",
|
|
133
|
+
type: "text",
|
|
134
|
+
value: ""
|
|
99
135
|
};
|
|
@@ -17,7 +17,7 @@ export const Modal = ({
|
|
|
17
17
|
const classProps = classnames(styles.modal, className);
|
|
18
18
|
const [select, setSelect] = useState(selected);
|
|
19
19
|
return (
|
|
20
|
-
<div className={`${styles["modal-wrap"]} modal-wrap-rem`}>
|
|
20
|
+
<div className={`${styles["modal-wrap"]} modal-wrap-rem`} onClick={() => setShow(false)}>
|
|
21
21
|
{type == "content" ? (
|
|
22
22
|
<div className={`${styles["modal-content"]} modal-content-rem`}>
|
|
23
23
|
<div className={`${styles["modal-top"]} modal-top-rem`}>
|