@xaypay/tui 0.0.74 → 0.0.76

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
@@ -65,9 +65,9 @@ function styleInject(css, ref) {
65
65
  }
66
66
  }
67
67
 
68
- var css_248z$d = ".file-module_file-form__l13d5{align-items:center;background:#fbfbfb;border:2px dashed;border-radius:6px;cursor:pointer;display:flex;flex-direction:column;height:190px;justify-content:space-between;overflow:hidden;padding:4px 0;position:relative;width:100%}.file-module_file-form-wrap__qY--B:before{background:rgba(60,57,62,.4);border-radius:6px;content:\"\";height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition:opacity .24s;width:100%;z-index:1}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover:before{opacity:1;pointer-events:unset}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover .file-module_delete-upload-icon__PWN66{opacity:1}.file-module_file-form-inner-upload__tq3Dn{align-items:center;display:flex;flex-direction:column;justify-content:space-between;padding-bottom:16px;padding-top:48px}.file-module_file-form-inner-upload__tq3Dn>img{display:block;margin-bottom:14px}.file-module_upload-info__a8GFs{margin-bottom:40px;max-width:150px;text-align:center}.file-module_upload-info-txt__l11uN{color:#0da574}.file-module_file-form__l13d5.file-module_default__t7KU0{border-color:#d1d1d1}.file-module_file-form__l13d5.file-module_error__H-M4Z{border-color:#e00!important}.file-module_file-form__l13d5.file-module_accept__WTW6V{border-color:#00236a}.file-module_delete-upload-icon__PWN66{align-items:center;background:#fff;border-radius:6px;cursor:pointer;display:flex;height:26px;justify-content:center;opacity:0;position:absolute;right:10px;top:10px;transition:opacity .24s;width:26px;z-index:11}.file-module_delete-upload-icon__PWN66>i{color:#00236a;font-size:16px}.file-module_upload-file-content__QHMjn{align-items:center;display:flex;height:100%;justify-content:center;max-height:190px;overflow:hidden;position:relative;width:100%}.file-module_upload-file-content__QHMjn>img{display:block;height:auto;max-height:95%;object-fit:contain;width:27.8rem}.file-module_file-form-title__zWTSB{margin-bottom:10px;max-width:390px;word-break:break-all}.file-module_file-form-wrap__qY--B{position:relative;transform:translateZ(0)}";
69
- var styles$b = {"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"};
70
- styleInject(css_248z$d);
68
+ var css_248z$e = ".file-module_file-form__l13d5{align-items:center;background:#fbfbfb;border:2px dashed;border-radius:6px;cursor:pointer;display:flex;flex-direction:column;height:190px;justify-content:space-between;overflow:hidden;padding:4px 0;position:relative;width:100%}.file-module_file-form-wrap__qY--B:before{background:rgba(60,57,62,.4);border-radius:6px;content:\"\";height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition:opacity .24s;width:100%;z-index:1}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover:before{opacity:1;pointer-events:unset}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover .file-module_delete-upload-icon__PWN66{opacity:1}.file-module_file-form-inner-upload__tq3Dn{align-items:center;display:flex;flex-direction:column;justify-content:space-between;padding-bottom:16px;padding-top:48px}.file-module_file-form-inner-upload__tq3Dn>img{display:block;margin-bottom:14px}.file-module_upload-info__a8GFs{margin-bottom:40px;max-width:150px;text-align:center}.file-module_upload-info-txt__l11uN{color:#0da574}.file-module_file-form__l13d5.file-module_default__t7KU0{border-color:#d1d1d1}.file-module_file-form__l13d5.file-module_error__H-M4Z{border-color:#e00!important}.file-module_file-form__l13d5.file-module_accept__WTW6V{border-color:#00236a}.file-module_delete-upload-icon__PWN66{align-items:center;background:#fff;border-radius:6px;cursor:pointer;display:flex;height:26px;justify-content:center;opacity:0;position:absolute;right:10px;top:10px;transition:opacity .24s;width:26px;z-index:11}.file-module_delete-upload-icon__PWN66>i{color:#00236a;font-size:16px}.file-module_upload-file-content__QHMjn{align-items:center;display:flex;height:100%;justify-content:center;max-height:190px;overflow:hidden;position:relative;width:100%}.file-module_upload-file-content__QHMjn>img{display:block;height:auto;max-height:95%;object-fit:contain;width:27.8rem}.file-module_file-form-title__zWTSB{margin-bottom:10px;max-width:390px;word-break:break-all}.file-module_file-form-wrap__qY--B{position:relative;transform:translateZ(0)}";
69
+ var styles$c = {"file-form-wrap":"file-module_file-form-wrap__qY--B","file-form":"file-module_file-form__l13d5","active":"file-module_active__L1gPt","delete-upload-icon":"file-module_delete-upload-icon__PWN66","file-form-inner-upload":"file-module_file-form-inner-upload__tq3Dn","upload-info":"file-module_upload-info__a8GFs","upload-info-txt":"file-module_upload-info-txt__l11uN","default":"file-module_default__t7KU0","error":"file-module_error__H-M4Z","accept":"file-module_accept__WTW6V","upload-file-content":"file-module_upload-file-content__QHMjn","file-form-title":"file-module_file-form-title__zWTSB"};
70
+ styleInject(css_248z$e);
71
71
 
72
72
  const File = ({
73
73
  name,
@@ -129,15 +129,15 @@ const File = ({
129
129
  document.querySelector(`.${name}`).value = "";
130
130
  };
131
131
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("p", {
132
- className: `${styles$b['file-form-title']} ile-form-title-rem`
132
+ className: `${styles$c['file-form-title']} ile-form-title-rem`
133
133
  }, label, " ", required && /*#__PURE__*/React__default.createElement("sup", {
134
134
  style: {
135
135
  color: "#ee0000"
136
136
  }
137
137
  }, "*")), /*#__PURE__*/React__default.createElement("div", {
138
- className: classnames(`${styles$b['file-form-wrap']} file-form-wrap-rem`, image ? styles$b['active'] : '')
138
+ className: classnames(`${styles$c['file-form-wrap']} file-form-wrap-rem`, image ? styles$c['active'] : '')
139
139
  }, /*#__PURE__*/React__default.createElement("div", {
140
- className: `${styles$b['file-form']} file-form-rem ${error || errorMessage ? styles$b['error'] : ''}`,
140
+ className: `${styles$c['file-form']} file-form-rem ${error || errorMessage ? styles$c['error'] : ''}`,
141
141
  onClick: () => document.querySelector(`.${name}`).click()
142
142
  }, /*#__PURE__*/React__default.createElement("input", {
143
143
  hidden: true,
@@ -146,23 +146,23 @@ const File = ({
146
146
  disabled: disabled,
147
147
  onChange: e => handleCheckFile(e)
148
148
  }), image ? /*#__PURE__*/React__default.createElement("div", {
149
- className: `${styles$b['upload-file-content']} upload-file-content-rem`
149
+ className: `${styles$c['upload-file-content']} upload-file-content-rem`
150
150
  }, image === 'pdf' ? /*#__PURE__*/React__default.createElement(SvgPdf, null) : /*#__PURE__*/React__default.createElement("img", {
151
151
  src: image,
152
152
  alt: fileName
153
153
  })) : /*#__PURE__*/React__default.createElement("div", {
154
- className: `${styles$b['file-form-inner-upload']} ile-form-inner-upload-rem`
154
+ className: `${styles$c['file-form-inner-upload']} ile-form-inner-upload-rem`
155
155
  }, /*#__PURE__*/React__default.createElement("img", {
156
156
  src: "../../assets/upload.svg",
157
157
  alt: ""
158
158
  }), /*#__PURE__*/React__default.createElement("span", {
159
- className: `${styles$b['upload-info']} upload-info-rem`
159
+ className: `${styles$c['upload-info']} upload-info-rem`
160
160
  }, /*#__PURE__*/React__default.createElement("span", {
161
- className: `${styles$b['upload-info-txt']} upload-info-txt-rem`
161
+ className: `${styles$c['upload-info-txt']} upload-info-txt-rem`
162
162
  }, "\u0532\u0565\u057C\u0576\u0565\u056C")), /*#__PURE__*/React__default.createElement("span", {
163
- className: `${styles$b['upload-info-size']} upload-info-size-rem`
163
+ className: `${styles$c['upload-info-size']} upload-info-size-rem`
164
164
  }, "\u0531\u057C\u0561\u057E\u0565\u056C\u0561\u0563\u0578\u0582\u0575\u0576\u0568 ", maxSize, "\u0544\u0532 ( ", fileExtensions.toString().split(',').join(', '), " )"))), !disabled && /*#__PURE__*/React__default.createElement("div", {
165
- className: `${styles$b['delete-upload-icon']} delete-upload-icon-rem`,
165
+ className: `${styles$c['delete-upload-icon']} delete-upload-icon-rem`,
166
166
  onClick: handleRemoveFile
167
167
  }, /*#__PURE__*/React__default.createElement("i", {
168
168
  className: "icon-delete"
@@ -189,13 +189,13 @@ File.defaultProps = {
189
189
  fileExtensions: ['jpg', 'jpeg', 'png', 'pdf']
190
190
  };
191
191
 
192
- var css_248z$c = ".table-module_table-wrap__KKAnM{background:#fff;border-radius:14px 14px 0 0;box-shadow:0 10px 30px rgba(0,35,106,.06);overflow:hidden;width:100%}.table-module_table-wrap__KKAnM:not(:first-child){margin-top:30px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:first-child,.table-module_table-top__tfEKM .table-module_table-items__UpFg2:first-child{flex:0 0 auto;width:60px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(2),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(2){flex:0 0 auto;width:120px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(3),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(3){flex:0 0 auto;width:170px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(4),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(4){flex:0 0 auto;width:126px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(5),.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(6),.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(8),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(5),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(6),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(8){flex:0 0 auto;width:100px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:last-child,.table-module_table-top__tfEKM .table-module_table-items__UpFg2:last-child{flex:0 0 auto;width:104px}.table-module_table-top__tfEKM{background:#00236a;height:44px;width:100%}.table-module_table-top__tfEKM .table-module_table-items__UpFg2{align-items:center;color:#fff;display:flex;flex:1 1;font-size:15px;justify-content:center;line-height:17px;text-align:center}.table-module_table-bottom-inner__0Pus0{background:#fff;min-height:40px;width:100%}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2{align-items:center;border-bottom:1px solid #eee;display:flex;flex:1 1;font-size:14px;justify-content:center;line-height:16px;padding:4px;text-align:center}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:not(:last-child){border-right:1px solid #eee}";
193
- var styles$a = {"table-wrap":"table-module_table-wrap__KKAnM","table-bottom-inner":"table-module_table-bottom-inner__0Pus0","table-items":"table-module_table-items__UpFg2","table-top":"table-module_table-top__tfEKM"};
194
- styleInject(css_248z$c);
192
+ var css_248z$d = ".table-module_table-wrap__KKAnM{background:#fff;border-radius:14px 14px 0 0;box-shadow:0 10px 30px rgba(0,35,106,.06);overflow:hidden;width:100%}.table-module_table-wrap__KKAnM:not(:first-child){margin-top:30px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:first-child,.table-module_table-top__tfEKM .table-module_table-items__UpFg2:first-child{flex:0 0 auto;width:60px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(2),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(2){flex:0 0 auto;width:120px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(3),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(3){flex:0 0 auto;width:170px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(4),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(4){flex:0 0 auto;width:126px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(5),.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(6),.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(8),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(5),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(6),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(8){flex:0 0 auto;width:100px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:last-child,.table-module_table-top__tfEKM .table-module_table-items__UpFg2:last-child{flex:0 0 auto;width:104px}.table-module_table-top__tfEKM{background:#00236a;height:44px;width:100%}.table-module_table-top__tfEKM .table-module_table-items__UpFg2{align-items:center;color:#fff;display:flex;flex:1 1;font-size:15px;justify-content:center;line-height:17px;text-align:center}.table-module_table-bottom-inner__0Pus0{background:#fff;min-height:40px;width:100%}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2{align-items:center;border-bottom:1px solid #eee;display:flex;flex:1 1;font-size:14px;justify-content:center;line-height:16px;padding:4px;text-align:center}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:not(:last-child){border-right:1px solid #eee}";
193
+ var styles$b = {"table-wrap":"table-module_table-wrap__KKAnM","table-bottom-inner":"table-module_table-bottom-inner__0Pus0","table-items":"table-module_table-items__UpFg2","table-top":"table-module_table-top__tfEKM"};
194
+ styleInject(css_248z$d);
195
195
 
196
- var css_248z$b = ".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}";
197
- var styles$9 = {"checkbox-wrap":"checkbox-module_checkbox-wrap__Xrg-m","checkmark":"checkbox-module_checkmark__M8DY6"};
198
- styleInject(css_248z$b);
196
+ var css_248z$c = ".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}";
197
+ var styles$a = {"checkbox-wrap":"checkbox-module_checkbox-wrap__Xrg-m","checkmark":"checkbox-module_checkmark__M8DY6"};
198
+ styleInject(css_248z$c);
199
199
 
200
200
  const Checkbox = ({
201
201
  disabled,
@@ -210,7 +210,7 @@ const Checkbox = ({
210
210
  onClick,
211
211
  ...props
212
212
  }) => {
213
- const classProps = classnames(styles$9.checkbox, className, 'checkbox-input-rem');
213
+ const classProps = classnames(styles$a.checkbox, className, 'checkbox-input-rem');
214
214
  const parseData = jsonData.length !== 0 ? JSON.parse(jsonData) : [];
215
215
  const [data, setData] = useState(parseData);
216
216
  useEffect(() => {
@@ -243,7 +243,7 @@ const Checkbox = ({
243
243
  } : '';
244
244
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, data.map(element => {
245
245
  return /*#__PURE__*/React__default.createElement("label", {
246
- className: `${styles$9["checkbox-wrap"]} checkbox-wrap-rem`,
246
+ className: `${styles$a["checkbox-wrap"]} checkbox-wrap-rem`,
247
247
  key: element.value
248
248
  }, /*#__PURE__*/React__default.createElement("input", _extends({
249
249
  type: "checkbox",
@@ -257,9 +257,9 @@ const Checkbox = ({
257
257
  onClick: onClick ? onClick : () => {},
258
258
  defaultChecked: element.checked
259
259
  }, props)), /*#__PURE__*/React__default.createElement("span", {
260
- className: `${styles$9["checkmark"]} checkmark-rem`
260
+ className: `${styles$a["checkmark"]} checkmark-rem`
261
261
  }), element[keyNames.label] ? /*#__PURE__*/React__default.createElement("label", {
262
- className: styles$9.labelCheckbox,
262
+ className: styles$a.labelCheckbox,
263
263
  for: element[keyNames.id]
264
264
  }, element[keyNames.label]) : "");
265
265
  }));
@@ -301,23 +301,23 @@ const Table = ({
301
301
  return true;
302
302
  } : "";
303
303
  return /*#__PURE__*/React__default.createElement("div", {
304
- className: `${styles$a["table-wrap"]} table-wrap-rem`
304
+ className: `${styles$b["table-wrap"]} table-wrap-rem`
305
305
  }, config.isHeader && hearderData.map((header, key) => {
306
306
  return /*#__PURE__*/React__default.createElement("div", {
307
- className: `${styles$a["table-top"]} table-top-rem`,
307
+ className: `${styles$b["table-top"]} table-top-rem`,
308
308
  key: key
309
309
  }, /*#__PURE__*/React__default.createElement("div", {
310
- className: `${styles$a["table-items"]} table-items-rem`
310
+ className: `${styles$b["table-items"]} table-items-rem`
311
311
  }, header));
312
312
  }), /*#__PURE__*/React__default.createElement("div", {
313
- className: `${styles$a["table-bottom"]} table-bottom-rem`
313
+ className: `${styles$b["table-bottom"]} table-bottom-rem`
314
314
  }, tbodyData.map((item, key) => {
315
315
  return /*#__PURE__*/React__default.createElement("div", {
316
- className: `${styles$a["table-bottom-inner"]} table-bottom-inner-rem`,
316
+ className: `${styles$b["table-bottom-inner"]} table-bottom-inner-rem`,
317
317
  key: key
318
318
  }, keyNames.map((keyName, keyNameKey) => {
319
319
  return /*#__PURE__*/React__default.createElement("div", {
320
- className: `${styles$a["table-items"]} table-items-rem`,
320
+ className: `${styles$b["table-items"]} table-items-rem`,
321
321
  key: keyNameKey
322
322
  }, config.isCheckbox && config.isCheckbox.showCheckbox && config.isCheckbox.showCheckbox(item) && keyNameKey == 0 && /*#__PURE__*/React__default.createElement(Checkbox, {
323
323
  onClick: e => {
@@ -333,7 +333,7 @@ const Table = ({
333
333
  className: keyName.icon
334
334
  }), item[keyName.name]));
335
335
  }), actions && /*#__PURE__*/React__default.createElement("div", {
336
- className: `${styles$a["table-items"]} table-items-rem`
336
+ className: `${styles$b["table-items"]} table-items-rem`
337
337
  }, actions.filter(a => a.show && a.show(item) || a.show === undefined).map((action, key) => {
338
338
  return /*#__PURE__*/React__default.createElement("div", {
339
339
  key: key
@@ -369,6 +369,73 @@ Table.defaultProps = {
369
369
  hearderData: []
370
370
  };
371
371
 
372
+ const _ = require('lodash');
373
+ const compereConfigs = () => {
374
+ let projectConfig = {};
375
+ let packageConfig = {};
376
+ try {
377
+ packageConfig = require('../tui.config.js');
378
+ } catch (e) {
379
+ try {
380
+ packageConfig = require('../../tui.config.js');
381
+ } catch (err) {
382
+ packageConfig = {};
383
+ }
384
+ }
385
+ try {
386
+ projectConfig = require('../../../../tui.config.js');
387
+ } catch (error) {
388
+ projectConfig = {};
389
+ // console.log(error, 'Project: if you want to use custom styles, create tui.config.js file in your project root');
390
+ }
391
+
392
+ return _.merge(packageConfig, projectConfig);
393
+ };
394
+
395
+ var css_248z$b = ".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)}}";
396
+ var styles$9 = {"animation__modal":"modal-module_animation__modal__3mt48","show-popup":"modal-module_show-popup__WrH7a"};
397
+ styleInject(css_248z$b);
398
+
399
+ const SvgNext = ({
400
+ title,
401
+ titleId,
402
+ ...props
403
+ }) => /*#__PURE__*/React.createElement("svg", _extends({
404
+ width: "24",
405
+ height: "24",
406
+ viewBox: "0 0 24 24",
407
+ fill: "none",
408
+ xmlns: "http://www.w3.org/2000/svg",
409
+ "aria-labelledby": titleId
410
+ }, props), title ? /*#__PURE__*/React.createElement("title", {
411
+ id: titleId
412
+ }, title) : null, /*#__PURE__*/React.createElement("path", {
413
+ fillRule: "evenodd",
414
+ clipRule: "evenodd",
415
+ d: "M12 24c6.627 0 12-5.373 12-12S18.627 0 12 0 0 5.373 0 12s5.373 12 12 12Zm3.4-11.443a.854.854 0 0 0 .198-.548.855.855 0 0 0-.146-.539l-4.137-5.134a.857.857 0 0 0-1.251-.12.856.856 0 0 0-.129 1.207l3.701 4.586-3.838 4.587a.856.856 0 0 0 .739 1.4.858.858 0 0 0 .58-.305l4.284-5.134Z",
416
+ fill: "#fff"
417
+ }));
418
+
419
+ const SvgPrev = ({
420
+ title,
421
+ titleId,
422
+ ...props
423
+ }) => /*#__PURE__*/React.createElement("svg", _extends({
424
+ width: "24",
425
+ height: "24",
426
+ viewBox: "0 0 24 24",
427
+ fill: "none",
428
+ xmlns: "http://www.w3.org/2000/svg",
429
+ "aria-labelledby": titleId
430
+ }, props), title ? /*#__PURE__*/React.createElement("title", {
431
+ id: titleId
432
+ }, title) : null, /*#__PURE__*/React.createElement("path", {
433
+ fillRule: "evenodd",
434
+ clipRule: "evenodd",
435
+ d: "M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0ZM8.6 11.443a.855.855 0 0 0-.198.548c-.013.19.038.38.146.539l4.137 5.133a.857.857 0 0 0 1.251.12.856.856 0 0 0 .129-1.206l-3.701-4.586 3.838-4.587a.856.856 0 0 0-.739-1.4.858.858 0 0 0-.58.305l-4.284 5.134Z",
436
+ fill: "#fff"
437
+ }));
438
+
372
439
  const SvgCloseIcon = ({
373
440
  title,
374
441
  titleId,
@@ -387,36 +454,49 @@ const SvgCloseIcon = ({
387
454
  fill: "#3C393E"
388
455
  }));
389
456
 
390
- const SvgNextarrow = ({
457
+ const SvgCloseSlide = ({
391
458
  title,
392
459
  titleId,
393
460
  ...props
394
461
  }) => /*#__PURE__*/React.createElement("svg", _extends({
395
- width: "6",
396
- height: "12",
397
- viewBox: "0 0 6 12",
462
+ width: "18",
463
+ height: "18",
464
+ viewBox: "0 0 18 18",
398
465
  fill: "none",
399
466
  xmlns: "http://www.w3.org/2000/svg",
400
467
  "aria-labelledby": titleId
401
468
  }, props), title ? /*#__PURE__*/React.createElement("title", {
402
469
  id: titleId
403
470
  }, title) : null, /*#__PURE__*/React.createElement("path", {
404
- d: "M.851 11.998a.847.847 0 0 1-.847-.776.86.86 0 0 1 .193-.626l3.808-4.584L.333 1.419A.857.857 0 0 1 .46.213a.849.849 0 0 1 1.241.128l4.106 5.132a.859.859 0 0 1 0 1.086l-4.25 5.132a.85.85 0 0 1-.706.307Z",
405
- fill: "#3C393E"
471
+ d: "m10.47 8.95 7.29-7.29A1 1 0 0 0 16.35.25L9.06 7.54 1.77.24A1 1 0 0 0 .36 1.65l7.29 7.3-7.3 7.29a.999.999 0 1 0 1.41 1.41l7.3-7.29 7.29 7.29a1 1 0 0 0 1.41-1.41l-7.29-7.29Z",
472
+ fill: "#fff"
406
473
  }));
407
474
 
408
475
  const Modal = ({
409
476
  type,
410
477
  data,
478
+ radius,
479
+ padding,
411
480
  setShow,
412
481
  selected,
413
482
  children,
483
+ minWidth,
484
+ minHeight,
414
485
  className,
415
- headerText
486
+ headerText,
487
+ imageWidth,
488
+ headerSize,
489
+ imageHeight,
490
+ headerColor,
491
+ headerWeight,
492
+ headerHeight,
493
+ backgroundColor,
494
+ layerBackgroundColor
416
495
  }) => {
417
- const classProps = classnames(className);
418
496
  const [select, setSelect] = useState(0);
419
497
  const [innerData, setInnerData] = useState([]);
498
+ const configStyles = compereConfigs();
499
+ const classProps = classnames(className);
420
500
  const handleCloseModal = () => {
421
501
  setShow(false);
422
502
  };
@@ -472,13 +552,13 @@ const Modal = ({
472
552
  return /*#__PURE__*/React__default.createElement("div", {
473
553
  onClick: handleCloseModal,
474
554
  style: {
475
- position: 'fixed',
476
555
  top: '0px',
477
556
  left: '0px',
478
557
  zIndex: 999,
479
558
  width: '100%',
480
559
  height: '100vh',
481
- backgroundColor: 'rgba(0,0,0,0.4)' // TODO: config
560
+ position: 'fixed',
561
+ backgroundColor: layerBackgroundColor ? layerBackgroundColor : configStyles.MODAL.layerBackgroundColor
482
562
  }
483
563
  }, /*#__PURE__*/React__default.createElement("div", {
484
564
  style: {
@@ -487,10 +567,9 @@ const Modal = ({
487
567
  height: '100vh'
488
568
  }
489
569
  }, /*#__PURE__*/React__default.createElement("div", {
490
- className: classProps,
570
+ className: `${classProps} ${styles$9['animation__modal']}`,
491
571
  onClick: handleStopClosing,
492
572
  style: {
493
- position: 'absolute',
494
573
  top: '0px',
495
574
  left: '0px',
496
575
  right: '0px',
@@ -499,33 +578,40 @@ const Modal = ({
499
578
  maxWidth: '95%',
500
579
  overflow: 'auto',
501
580
  maxHeight: '95vh',
581
+ position: 'absolute',
502
582
  width: 'fit-content',
503
- borderRadius: '14px',
504
583
  height: 'fit-content',
505
584
  boxSizing: 'border-box',
506
- backgroundColor: 'white',
507
- padding: '10px 20px 20px'
508
- // TODO: animation
585
+ borderRadius: radius ? radius : configStyles.MODAL.radius,
586
+ minWidth: type === 'content' ? minWidth ? minWidth : '' : '',
587
+ minHeight: type === 'content' ? minHeight ? minHeight : '' : '',
588
+ padding: type === 'content' ? padding ? padding : configStyles.MODAL.padding : '10px',
589
+ backgroundColor: backgroundColor ? backgroundColor : configStyles.MODAL.backgroundColor
509
590
  }
510
591
  }, /*#__PURE__*/React__default.createElement("div", {
511
592
  style: {
512
- display: 'flex',
593
+ position: 'relative',
513
594
  width: '100%',
514
- height: '27px',
595
+ height: '100%'
596
+ }
597
+ }, type === 'content' ? /*#__PURE__*/React__default.createElement("div", {
598
+ style: {
599
+ width: '100%',
600
+ display: 'flex',
515
601
  alignItems: 'center',
516
- backgroundColor: '#fbfbfb',
602
+ height: headerHeight ? headerHeight : configStyles.MODAL.headerHeight,
517
603
  justifyContent: headerText && type === 'content' ? 'space-between' : 'flex-end'
518
604
  }
519
605
  }, headerText && type === 'content' && /*#__PURE__*/React__default.createElement("p", {
520
606
  style: {
521
- color: '#00236a',
522
- fontSize: '20px',
523
- fontWeight: '600',
524
607
  overflow: 'hidden',
525
608
  whiteSpace: 'nowrap',
526
609
  textOverflow: 'ellipsis',
527
610
  margin: '0px 16px 0px 0px',
528
- maxWidth: 'calc(100% - 30px)'
611
+ maxWidth: 'calc(100% - 30px)',
612
+ fontSize: headerSize ? headerSize : configStyles.MODAL.headerSize,
613
+ color: headerColor ? headerColor : configStyles.MODAL.headerColor,
614
+ fontWeight: headerWeight ? headerWeight : configStyles.MODAL.headerWeight
529
615
  }
530
616
  }, headerText), /*#__PURE__*/React__default.createElement("div", {
531
617
  onClick: handleCloseModal,
@@ -534,17 +620,32 @@ const Modal = ({
534
620
  height: '14px',
535
621
  cursor: 'pointer'
536
622
  }
537
- }, /*#__PURE__*/React__default.createElement(SvgCloseIcon, null))), /*#__PURE__*/React__default.createElement("div", {
623
+ }, /*#__PURE__*/React__default.createElement(SvgCloseIcon, null))) : /*#__PURE__*/React__default.createElement("button", {
624
+ onClick: handleCloseModal,
625
+ style: {
626
+ position: 'absolute',
627
+ top: '23px',
628
+ width: '18px',
629
+ right: '23px',
630
+ height: '18px',
631
+ border: 'none',
632
+ outline: 'none',
633
+ cursor: 'pointer',
634
+ backgroundColor: 'transparent'
635
+ }
636
+ }, /*#__PURE__*/React__default.createElement(SvgCloseSlide, null)), /*#__PURE__*/React__default.createElement("div", {
538
637
  style: {
539
638
  display: 'flex',
540
- paddingTop: '10px',
541
639
  alignItems: 'center',
542
640
  boxSizing: 'border-box',
543
- justifyContent: 'center'
641
+ justifyContent: 'center',
642
+ paddingTop: type === 'content' ? '10px' : '0px'
544
643
  }
545
644
  }, type === 'content' ? children ? children : '' : /*#__PURE__*/React__default.createElement("div", {
546
645
  style: {
547
- width: '100%'
646
+ width: '100%',
647
+ display: 'flex',
648
+ alignItems: 'center'
548
649
  }
549
650
  }, innerData && innerData.length > 0 && innerData.map((item, index) => {
550
651
  if (select === index) {
@@ -553,86 +654,73 @@ const Modal = ({
553
654
  } else {
554
655
  return /*#__PURE__*/React__default.createElement("img", {
555
656
  style: {
556
- width: '600px',
557
- height: '300px',
558
657
  objectFit: 'cover',
559
- objectPosition: 'center'
658
+ objectPosition: 'center',
659
+ borderRadius: radius ? radius : configStyles.MODAL.radius,
660
+ width: imageWidth ? imageWidth : configStyles.MODAL.imageWidth,
661
+ height: imageHeight ? imageHeight : configStyles.MODAL.imageHeight
560
662
  },
561
- src: item.url
663
+ src: item.url,
664
+ key: item.id ? item.id : index
562
665
  });
563
666
  }
564
667
  }
565
- }), /*#__PURE__*/React__default.createElement("div", {
566
- style: {
567
- marginTop: '10px'
568
- }
569
- }, /*#__PURE__*/React__default.createElement("button", {
668
+ }), innerData && innerData.length > 1 && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("button", {
570
669
  onClick: handleGoTo,
571
670
  "data-go": "prev",
572
671
  style: {
573
- padding: '8px',
672
+ position: 'absolute',
673
+ left: '14px',
674
+ width: '24px',
675
+ height: '24px',
676
+ padding: '0px',
677
+ border: 'none',
574
678
  outline: 'none',
575
679
  cursor: 'pointer',
576
- marginRight: '10px',
577
- borderRadius: '6px',
578
- alignItems: 'center',
579
- display: 'inline-flex',
580
- justifyContent: 'center',
581
- backgroundColor: 'white',
582
- transform: 'rotate(180deg)',
583
- border: '1px solid #979090'
680
+ top: 'calc(50% - 12px)',
681
+ backgroundColor: 'transparent'
584
682
  }
585
- }, /*#__PURE__*/React__default.createElement(SvgNextarrow, null)), /*#__PURE__*/React__default.createElement("button", {
683
+ }, /*#__PURE__*/React__default.createElement(SvgPrev, null)), /*#__PURE__*/React__default.createElement("button", {
586
684
  onClick: handleGoTo,
587
685
  "data-go": "next",
588
686
  style: {
589
- padding: '8px',
687
+ position: 'absolute',
688
+ width: '24px',
689
+ right: '14px',
690
+ height: '24px',
691
+ border: 'none',
692
+ padding: '0px',
590
693
  outline: 'none',
591
694
  cursor: 'pointer',
592
- borderRadius: '6px',
593
- alignItems: 'center',
594
- display: 'inline-flex',
595
- justifyContent: 'center',
596
- backgroundColor: 'white',
597
- border: '1px solid #979090'
695
+ top: 'calc(50% - 12px)',
696
+ backgroundColor: 'transparent'
598
697
  }
599
- }, /*#__PURE__*/React__default.createElement(SvgNextarrow, null))))))));
698
+ }, /*#__PURE__*/React__default.createElement(SvgNext, null)))))))));
600
699
  };
601
700
  Modal.propTypes = {
602
701
  data: PropTypes.array,
603
702
  type: PropTypes.string,
604
703
  setShow: PropTypes.func,
704
+ radius: PropTypes.string,
705
+ padding: PropTypes.string,
605
706
  selected: PropTypes.number,
707
+ minWidth: PropTypes.string,
708
+ minHeight: PropTypes.string,
606
709
  className: PropTypes.string,
607
- headerText: PropTypes.string
710
+ headerText: PropTypes.string,
711
+ imageWidth: PropTypes.string,
712
+ headerSize: PropTypes.string,
713
+ headerColor: PropTypes.string,
714
+ imageHeight: PropTypes.string,
715
+ headerWeight: PropTypes.string,
716
+ headerHeight: PropTypes.string,
717
+ backgroundColor: PropTypes.string,
718
+ layerBackgroundColor: PropTypes.string
608
719
  };
609
720
  Modal.defaultProps = {
610
721
  type: 'content'
611
722
  };
612
723
 
613
- const _ = require('lodash');
614
- const compereConfigs = () => {
615
- let projectConfig = {};
616
- let packageConfig = {};
617
- try {
618
- packageConfig = require('../tui.config.js');
619
- } catch (e) {
620
- try {
621
- packageConfig = require('../../tui.config.js');
622
- } catch (err) {
623
- packageConfig = {};
624
- }
625
- }
626
- try {
627
- projectConfig = require('../../../../tui.config.js');
628
- } catch (error) {
629
- projectConfig = {};
630
- // console.log(error, 'Project: if you want to use custom styles, create tui.config.js file in your project root');
631
- }
632
-
633
- return _.merge(packageConfig, projectConfig);
634
- };
635
-
636
724
  var css_248z$a = ".input-module_input-wrap__NunrE{position:relative;width:100%}.input-module_input-content__kP7lZ{display:flex;width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{background-color:inherit!important}.input-module_error-message-show__OrVSo{animation-fill-mode:forwards;animation-name:input-module_error-show__9MP6k}@keyframes input-module_error-show__9MP6k{to{bottom:-20px;transform:scaleX(1);-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);-o-transform:scaleX(1)}}";
637
725
  var styles$8 = {"input-wrap":"input-module_input-wrap__NunrE","input-content":"input-module_input-content__kP7lZ","error-message-show":"input-module_error-message-show__OrVSo","error-show":"input-module_error-show__9MP6k"};
638
726
  styleInject(css_248z$a);
@@ -768,26 +856,30 @@ const Input = ({
768
856
  } else {
769
857
  setInnerErrorMessage('');
770
858
  }
771
- if (value !== undefined && value !== null) {
772
- setInnerValue(value);
773
- if (type === 'tel') {
774
- if (!phoneNumberRegex.test(value)) {
775
- telErrorMessage && setInnerErrorMessage(telErrorMessage);
776
- setInnerValue('');
777
- } else {
778
- setInnerErrorMessage('');
779
- if (value.length > 8) {
780
- setInnerValue(value.substr(0, 8));
859
+ if (value !== undefined) {
860
+ if (value === null) {
861
+ setInnerValue('');
862
+ } else {
863
+ setInnerValue(value);
864
+ if (type === 'tel') {
865
+ if (!phoneNumberRegex.test(value)) {
866
+ telErrorMessage && setInnerErrorMessage(telErrorMessage);
867
+ setInnerValue('');
781
868
  } else {
782
- setInnerValue(value);
869
+ setInnerErrorMessage('');
870
+ if (value.length > 8) {
871
+ setInnerValue(value.substr(0, 8));
872
+ } else {
873
+ setInnerValue(value);
874
+ }
783
875
  }
784
876
  }
785
- }
786
- if (maxLength && value.length > maxLength && type !== 'tel') {
787
- setInnerValue(value.substr(0, maxLength));
788
- }
789
- if (regexp && regexpErrorMessage && !maxLength && type !== 'tel') {
790
- !regexp.test(value) ? setInnerErrorMessage(regexpErrorMessage) : setInnerErrorMessage('');
877
+ if (maxLength && value.length > maxLength && type !== 'tel') {
878
+ setInnerValue(value.substr(0, maxLength));
879
+ }
880
+ if (regexp && regexpErrorMessage && !maxLength && type !== 'tel') {
881
+ !regexp.test(value) ? setInnerErrorMessage(regexpErrorMessage) : setInnerErrorMessage('');
882
+ }
791
883
  }
792
884
  }
793
885
  }, [type, value, regexp, maxLength, errorMessage, regexpErrorMessage]);
@@ -902,7 +994,6 @@ Input.propTypes = {
902
994
  name: PropTypes.string,
903
995
  change: PropTypes.func,
904
996
  color: PropTypes.string,
905
- value: PropTypes.string,
906
997
  width: PropTypes.string,
907
998
  label: PropTypes.string,
908
999
  required: PropTypes.bool,
@@ -947,7 +1038,8 @@ Input.propTypes = {
947
1038
  errorAnimationDuration: PropTypes.string,
948
1039
  leftIcon: PropTypes.arrayOf(PropTypes.element),
949
1040
  rightIcon: PropTypes.arrayOf(PropTypes.element),
950
- type: PropTypes.oneOf(Object.values(InputTypes))
1041
+ type: PropTypes.oneOf(Object.values(InputTypes)),
1042
+ value: PropTypes.oneOfType([PropTypes.string, PropTypes.object])
951
1043
  };
952
1044
  Input.defaultProps = {
953
1045
  type: "text"
@@ -3293,6 +3385,24 @@ const SvgDots = ({
3293
3385
  fill: "#3C393E"
3294
3386
  }));
3295
3387
 
3388
+ const SvgNextarrow = ({
3389
+ title,
3390
+ titleId,
3391
+ ...props
3392
+ }) => /*#__PURE__*/React.createElement("svg", _extends({
3393
+ width: "6",
3394
+ height: "12",
3395
+ viewBox: "0 0 6 12",
3396
+ fill: "none",
3397
+ xmlns: "http://www.w3.org/2000/svg",
3398
+ "aria-labelledby": titleId
3399
+ }, props), title ? /*#__PURE__*/React.createElement("title", {
3400
+ id: titleId
3401
+ }, title) : null, /*#__PURE__*/React.createElement("path", {
3402
+ d: "M.851 11.998a.847.847 0 0 1-.847-.776.86.86 0 0 1 .193-.626l3.808-4.584L.333 1.419A.857.857 0 0 1 .46.213a.849.849 0 0 1 1.241.128l4.106 5.132a.859.859 0 0 1 0 1.086l-4.25 5.132a.85.85 0 0 1-.706.307Z",
3403
+ fill: "#3C393E"
3404
+ }));
3405
+
3296
3406
  const Pagination = ({
3297
3407
  goTo,
3298
3408
  onChange,