@xaypay/tui 0.0.39 → 0.0.41

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 CHANGED
@@ -271,7 +271,11 @@ const Autocomplate = ({
271
271
  }
272
272
  return /*#__PURE__*/React.createElement(React.Fragment, null, label ? /*#__PURE__*/React.createElement("label", {
273
273
  className: styles$a['autocomplate-title']
274
- }, label) : "", /*#__PURE__*/React.createElement("div", {
274
+ }, label, " ", required && /*#__PURE__*/React.createElement("sup", {
275
+ style: {
276
+ color: "#ee0000"
277
+ }
278
+ }, "*")) : "", /*#__PURE__*/React.createElement("div", {
275
279
  className: styles$a['autocomplate-content']
276
280
  }, /*#__PURE__*/React.createElement("input", _extends({
277
281
  id: inputId,
@@ -303,6 +307,9 @@ Autocomplate.propTypes = {
303
307
  keyNames: PropTypes.object,
304
308
  errorMesage: PropTypes.string
305
309
  };
310
+ Autocomplate.defaultProps = {
311
+ required: false
312
+ };
306
313
 
307
314
  var css_248z$a = ".checkbox-module_checkbox-wrap__Xrg-m{align-items:center;cursor:pointer;display:inline-flex;flex-direction:row;flex-wrap:nowrap;margin:0 6px;padding-left:24px;position:relative}.checkbox-module_checkbox-wrap__Xrg-m>input{height:0;opacity:0;position:absolute;width:0}.checkbox-module_checkbox-wrap__Xrg-m .checkbox-module_checkmark__M8DY6{border:1px solid #d9d9d9;border-radius:3px;bottom:0;display:inline-block;height:14px;left:0;margin:auto 4px auto auto;position:absolute;top:0;transition:border-color .24s;vertical-align:top;width:14px}.checkbox-module_checkbox-wrap__Xrg-m>.checkbox-module_checkmark__M8DY6:after{border:solid #1890ff;border-width:0 2px 2px 0;content:\"\";display:block;height:8px;left:4px;opacity:0;position:absolute;top:1px;transform:rotate(45deg);transition:opacity .24s;width:4px}.checkbox-module_checkbox-wrap__Xrg-m input:checked~.checkbox-module_checkmark__M8DY6:after{opacity:1}.checkbox-module_checkbox-wrap__Xrg-m input:checked~.checkbox-module_checkmark__M8DY6,.checkbox-module_checkbox-wrap__Xrg-m:hover input~.checkbox-module_checkmark__M8DY6{border-color:#1890ff}";
308
315
  var styles$9 = {"checkbox-wrap":"checkbox-module_checkbox-wrap__Xrg-m","checkmark":"checkbox-module_checkmark__M8DY6"};
@@ -455,7 +462,11 @@ const Input = ({
455
462
  className: styles$8['input-wrap']
456
463
  }, label ? /*#__PURE__*/React.createElement("label", {
457
464
  className: styles$8['input-title']
458
- }, label) : "", /*#__PURE__*/React.createElement("input", _extends({}, props, {
465
+ }, label, " ", required && /*#__PURE__*/React.createElement("sup", {
466
+ style: {
467
+ color: "#ee0000"
468
+ }
469
+ }, "*")) : "", /*#__PURE__*/React.createElement("input", _extends({}, props, {
459
470
  type: type,
460
471
  className: classProps,
461
472
  style: color && {
@@ -487,7 +498,7 @@ Input.defaultProps = {
487
498
  color: null,
488
499
  size: InputSizes.MEDIUM,
489
500
  onChange: undefined,
490
- required: true,
501
+ required: false,
491
502
  errorMesage: "",
492
503
  type: "text",
493
504
  value: ""
@@ -868,7 +879,11 @@ const Select = ({
868
879
  }, className);
869
880
  return /*#__PURE__*/React.createElement("div", null, label ? /*#__PURE__*/React.createElement("label", {
870
881
  className: styles$3['select-title']
871
- }, label) : "", /*#__PURE__*/React.createElement("div", {
882
+ }, label, " ", required && /*#__PURE__*/React.createElement("sup", {
883
+ style: {
884
+ color: "#ee0000"
885
+ }
886
+ }, "*")) : "", /*#__PURE__*/React.createElement("div", {
872
887
  className: styles$3['select-wrap'],
873
888
  ref: ref
874
889
  }, /*#__PURE__*/React.createElement("div", {
@@ -927,7 +942,8 @@ Select.propTypes = {
927
942
  keyNames: PropTypes.object
928
943
  };
929
944
  Select.defaultProps = {
930
- size: 'medium'
945
+ size: 'medium',
946
+ required: false
931
947
  };
932
948
 
933
949
  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:100%;justify-content:space-between;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;position:relative;width:100%}.file-module_upload-file-content__QHMjn>img{display:block;height:190px;max-width:400px}.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)}";
@@ -970,7 +986,11 @@ const File = ({
970
986
  }
971
987
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("p", {
972
988
  className: styles$2['file-form-title']
973
- }, label), /*#__PURE__*/React.createElement("div", {
989
+ }, label, " ", required && /*#__PURE__*/React.createElement("sup", {
990
+ style: {
991
+ color: "#ee0000"
992
+ }
993
+ }, "*")), /*#__PURE__*/React.createElement("div", {
974
994
  className: classnames(styles$2['file-form-wrap'], image ? styles$2['active'] : '')
975
995
  }, /*#__PURE__*/React.createElement("div", {
976
996
  className: styles$2['file-form'],
@@ -1043,6 +1063,9 @@ File.propTypes = {
1043
1063
  errorMesage: PropTypes.string,
1044
1064
  defaultData: PropTypes.object
1045
1065
  };
1066
+ File.defaultProps = {
1067
+ required: false
1068
+ };
1046
1069
 
1047
1070
  var css_248z$1 = ".modal-module_modal-wrap__IsXXf{background:rgba(0,0,0,.4);height:100%;left:0;position:fixed;top:0;width:100%;z-index:9}.modal-module_modal-top__ntDBi{background:#fbfbfb;box-sizing:border-box;display:flex;flex-direction:row;height:44px;padding:4px 10px 4px 24px;width:100%}.modal-module_modal-title__r-WKl{align-items:center;color:#3c393e;display:flex;flex:1 1;font-size:20px;font-weight:500;line-height:24px;padding-right:20px}.modal-module_close-btn__Qf2UD{cursor:pointer;flex:0 0 auto;width:24px}.modal-module_close-btn__Qf2UD,.modal-module_modal-section__Bp8jN{align-items:center;display:flex;height:100%;justify-content:center}.modal-module_modal-section__Bp8jN{flex:1 1;padding:10px 0;width:100%}.modal-module_modal-content__1F-uE{align-items:center;animation:modal-module_show-popup__WrH7a .24s;background:#fff;border-radius:8px;display:flex;flex-direction:column;height:auto;left:0;margin:auto;min-height:130px;overflow:hidden;padding:10px;position:absolute;right:0;top:110px;width:fit-content}@keyframes modal-module_show-popup__WrH7a{0%{transform:translate3d(0,-30%,0)}to{opacity:1;transform:translateZ(0)}}";
1048
1071
  var styles$1 = {"modal-wrap":"modal-module_modal-wrap__IsXXf","modal-top":"modal-module_modal-top__ntDBi","modal-title":"modal-module_modal-title__r-WKl","close-btn":"modal-module_close-btn__Qf2UD","modal-section":"modal-module_modal-section__Bp8jN","modal-content":"modal-module_modal-content__1F-uE","show-popup":"modal-module_show-popup__WrH7a"};
package/dist/index.js CHANGED
@@ -282,7 +282,11 @@ const Autocomplate = ({
282
282
  }
283
283
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, label ? /*#__PURE__*/React__default["default"].createElement("label", {
284
284
  className: styles$a['autocomplate-title']
285
- }, label) : "", /*#__PURE__*/React__default["default"].createElement("div", {
285
+ }, label, " ", required && /*#__PURE__*/React__default["default"].createElement("sup", {
286
+ style: {
287
+ color: "#ee0000"
288
+ }
289
+ }, "*")) : "", /*#__PURE__*/React__default["default"].createElement("div", {
286
290
  className: styles$a['autocomplate-content']
287
291
  }, /*#__PURE__*/React__default["default"].createElement("input", _extends({
288
292
  id: inputId,
@@ -314,6 +318,9 @@ Autocomplate.propTypes = {
314
318
  keyNames: PropTypes__default["default"].object,
315
319
  errorMesage: PropTypes__default["default"].string
316
320
  };
321
+ Autocomplate.defaultProps = {
322
+ required: false
323
+ };
317
324
 
318
325
  var css_248z$a = ".checkbox-module_checkbox-wrap__Xrg-m{align-items:center;cursor:pointer;display:inline-flex;flex-direction:row;flex-wrap:nowrap;margin:0 6px;padding-left:24px;position:relative}.checkbox-module_checkbox-wrap__Xrg-m>input{height:0;opacity:0;position:absolute;width:0}.checkbox-module_checkbox-wrap__Xrg-m .checkbox-module_checkmark__M8DY6{border:1px solid #d9d9d9;border-radius:3px;bottom:0;display:inline-block;height:14px;left:0;margin:auto 4px auto auto;position:absolute;top:0;transition:border-color .24s;vertical-align:top;width:14px}.checkbox-module_checkbox-wrap__Xrg-m>.checkbox-module_checkmark__M8DY6:after{border:solid #1890ff;border-width:0 2px 2px 0;content:\"\";display:block;height:8px;left:4px;opacity:0;position:absolute;top:1px;transform:rotate(45deg);transition:opacity .24s;width:4px}.checkbox-module_checkbox-wrap__Xrg-m input:checked~.checkbox-module_checkmark__M8DY6:after{opacity:1}.checkbox-module_checkbox-wrap__Xrg-m input:checked~.checkbox-module_checkmark__M8DY6,.checkbox-module_checkbox-wrap__Xrg-m:hover input~.checkbox-module_checkmark__M8DY6{border-color:#1890ff}";
319
326
  var styles$9 = {"checkbox-wrap":"checkbox-module_checkbox-wrap__Xrg-m","checkmark":"checkbox-module_checkmark__M8DY6"};
@@ -466,7 +473,11 @@ const Input = ({
466
473
  className: styles$8['input-wrap']
467
474
  }, label ? /*#__PURE__*/React__default["default"].createElement("label", {
468
475
  className: styles$8['input-title']
469
- }, label) : "", /*#__PURE__*/React__default["default"].createElement("input", _extends({}, props, {
476
+ }, label, " ", required && /*#__PURE__*/React__default["default"].createElement("sup", {
477
+ style: {
478
+ color: "#ee0000"
479
+ }
480
+ }, "*")) : "", /*#__PURE__*/React__default["default"].createElement("input", _extends({}, props, {
470
481
  type: type,
471
482
  className: classProps,
472
483
  style: color && {
@@ -498,7 +509,7 @@ Input.defaultProps = {
498
509
  color: null,
499
510
  size: InputSizes.MEDIUM,
500
511
  onChange: undefined,
501
- required: true,
512
+ required: false,
502
513
  errorMesage: "",
503
514
  type: "text",
504
515
  value: ""
@@ -879,7 +890,11 @@ const Select = ({
879
890
  }, className);
880
891
  return /*#__PURE__*/React__default["default"].createElement("div", null, label ? /*#__PURE__*/React__default["default"].createElement("label", {
881
892
  className: styles$3['select-title']
882
- }, label) : "", /*#__PURE__*/React__default["default"].createElement("div", {
893
+ }, label, " ", required && /*#__PURE__*/React__default["default"].createElement("sup", {
894
+ style: {
895
+ color: "#ee0000"
896
+ }
897
+ }, "*")) : "", /*#__PURE__*/React__default["default"].createElement("div", {
883
898
  className: styles$3['select-wrap'],
884
899
  ref: ref
885
900
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -938,7 +953,8 @@ Select.propTypes = {
938
953
  keyNames: PropTypes__default["default"].object
939
954
  };
940
955
  Select.defaultProps = {
941
- size: 'medium'
956
+ size: 'medium',
957
+ required: false
942
958
  };
943
959
 
944
960
  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:100%;justify-content:space-between;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;position:relative;width:100%}.file-module_upload-file-content__QHMjn>img{display:block;height:190px;max-width:400px}.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)}";
@@ -981,7 +997,11 @@ const File = ({
981
997
  }
982
998
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("p", {
983
999
  className: styles$2['file-form-title']
984
- }, label), /*#__PURE__*/React__default["default"].createElement("div", {
1000
+ }, label, " ", required && /*#__PURE__*/React__default["default"].createElement("sup", {
1001
+ style: {
1002
+ color: "#ee0000"
1003
+ }
1004
+ }, "*")), /*#__PURE__*/React__default["default"].createElement("div", {
985
1005
  className: classnames__default["default"](styles$2['file-form-wrap'], image ? styles$2['active'] : '')
986
1006
  }, /*#__PURE__*/React__default["default"].createElement("div", {
987
1007
  className: styles$2['file-form'],
@@ -1054,6 +1074,9 @@ File.propTypes = {
1054
1074
  errorMesage: PropTypes__default["default"].string,
1055
1075
  defaultData: PropTypes__default["default"].object
1056
1076
  };
1077
+ File.defaultProps = {
1078
+ required: false
1079
+ };
1057
1080
 
1058
1081
  var css_248z$1 = ".modal-module_modal-wrap__IsXXf{background:rgba(0,0,0,.4);height:100%;left:0;position:fixed;top:0;width:100%;z-index:9}.modal-module_modal-top__ntDBi{background:#fbfbfb;box-sizing:border-box;display:flex;flex-direction:row;height:44px;padding:4px 10px 4px 24px;width:100%}.modal-module_modal-title__r-WKl{align-items:center;color:#3c393e;display:flex;flex:1 1;font-size:20px;font-weight:500;line-height:24px;padding-right:20px}.modal-module_close-btn__Qf2UD{cursor:pointer;flex:0 0 auto;width:24px}.modal-module_close-btn__Qf2UD,.modal-module_modal-section__Bp8jN{align-items:center;display:flex;height:100%;justify-content:center}.modal-module_modal-section__Bp8jN{flex:1 1;padding:10px 0;width:100%}.modal-module_modal-content__1F-uE{align-items:center;animation:modal-module_show-popup__WrH7a .24s;background:#fff;border-radius:8px;display:flex;flex-direction:column;height:auto;left:0;margin:auto;min-height:130px;overflow:hidden;padding:10px;position:absolute;right:0;top:110px;width:fit-content}@keyframes modal-module_show-popup__WrH7a{0%{transform:translate3d(0,-30%,0)}to{opacity:1;transform:translateZ(0)}}";
1059
1082
  var styles$1 = {"modal-wrap":"modal-module_modal-wrap__IsXXf","modal-top":"modal-module_modal-top__ntDBi","modal-title":"modal-module_modal-title__r-WKl","close-btn":"modal-module_close-btn__Qf2UD","modal-section":"modal-module_modal-section__Bp8jN","modal-content":"modal-module_modal-content__1F-uE","show-popup":"modal-module_show-popup__WrH7a"};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xaypay/tui",
3
- "version": "0.0.39",
3
+ "version": "0.0.41",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
@@ -91,7 +91,7 @@ export const Autocomplate = ({
91
91
 
92
92
  return (
93
93
  <>
94
- {label ? <label className={styles['autocomplate-title']}>{label}</label> : ""}
94
+ {label ? <label className={styles['autocomplate-title']}>{label} {required && <sup style={{color: "#ee0000"}}>*</sup>}</label> : ""}
95
95
  <div className={styles['autocomplate-content']}>
96
96
  <input
97
97
  id={inputId}
@@ -128,3 +128,6 @@ Autocomplate.propTypes = {
128
128
  };
129
129
 
130
130
 
131
+ Autocomplate.defaultProps = {
132
+ required: false,
133
+ };
@@ -48,7 +48,7 @@ export const File = ({
48
48
 
49
49
  return (
50
50
  <>
51
- <p className={styles['file-form-title']}>{label}</p>
51
+ <p className={styles['file-form-title']}>{label} {required && <sup style={{color: "#ee0000"}}>*</sup>}</p>
52
52
  <div className={classnames(styles['file-form-wrap'],image ? styles['active'] : '')}>
53
53
  <div
54
54
  className={styles['file-form']}
@@ -109,3 +109,7 @@ File.propTypes = {
109
109
  };
110
110
 
111
111
 
112
+
113
+ File.defaultProps = {
114
+ required: false,
115
+ };
@@ -53,7 +53,7 @@ export const Input = ({
53
53
  const classProps = classnames(styles.input, styles[size], eMessage != '' ? styles['error-message'] :"" , className);
54
54
  return (
55
55
  <div className={styles['input-wrap']}>
56
- {label ? <label className={styles['input-title']}>{label}</label> : ""}
56
+ {label ? <label className={styles['input-title']}>{label} {required && <sup style={{color: "#ee0000"}}>*</sup>}</label> : ""}
57
57
  <input
58
58
  {...props}
59
59
  type={type}
@@ -92,7 +92,7 @@ Input.defaultProps = {
92
92
  color: null,
93
93
  size: InputSizes.MEDIUM,
94
94
  onChange: undefined,
95
- required: true,
95
+ required: false,
96
96
  errorMesage: "",
97
97
  type: "text",
98
98
  value: ""
@@ -18,7 +18,7 @@ export const Multiselect = ({
18
18
  const [opened, setOpened] = useState(false);
19
19
  return (
20
20
  <div className={styles.main}>
21
- {label ? <label className={styles['multi-select-title']}>վարչական շրջան <span>*</span></label> : ""}
21
+ {label ? <label className={styles['multi-select-title']}>{label} {required && <sup style={{color: "#ee0000"}}>*</sup>}</label> : ""}
22
22
  <div className={styles['multi-select-content-top']} onClick={() => { setOpened(!opened) }}>
23
23
  {
24
24
  options.map((option, i) => {
@@ -90,3 +90,6 @@ Multiselect.propTypes = {
90
90
  keyNames: PropTypes.object,
91
91
  };
92
92
 
93
+ Multiselect.defaultProps = {
94
+ required: false,
95
+ };
@@ -74,7 +74,7 @@ export const Select = ({
74
74
 
75
75
  return (
76
76
  <div>
77
- {label ? <label className={styles['select-title']}>{label}</label> : ""}
77
+ {label ? <label className={styles['select-title']}>{label} {required && <sup style={{color: "#ee0000"}}>*</sup>}</label> : ""}
78
78
  <div className={styles['select-wrap']} ref={ref}>
79
79
  <div className={styles['select-content']} id={styles.selector}>
80
80
  <div
@@ -161,5 +161,6 @@ Select.propTypes = {
161
161
  };
162
162
 
163
163
  Select.defaultProps = {
164
- size: 'medium'
164
+ size: 'medium',
165
+ required: false
165
166
  };