@xaypay/tui 0.0.29 → 0.0.30
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 +216 -123
- package/dist/index.js +216 -122
- package/package.json +1 -1
- package/src/components/checkbox/index.js +1 -0
- package/src/components/table/index.js +125 -0
- package/src/components/table/table.module.css +80 -0
- package/src/components/table/table.stories.js +36 -0
- package/src/index.js +2 -1
package/dist/index.js
CHANGED
|
@@ -56,9 +56,9 @@ function styleInject(css, ref) {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
var css_248z$
|
|
60
|
-
var styles$
|
|
61
|
-
styleInject(css_248z$
|
|
59
|
+
var css_248z$d = ".button-module_btn__ffRtT{border:none;border-radius:6px;box-sizing:border-box;cursor:pointer;font-size:16px;line-height:20px;max-height:46px;min-height:46px;outline:none;overflow:hidden;padding:12px 20px;text-transform:none;transition:background-color .24s,color .24s}.button-module_btn__ffRtT.button-module_full-size__vmV2E{width:100%}.button-module_btn__ffRtT.button-module_content-size__f7JSE{width:auto}.button-module_btn__ffRtT.button-module_type-filled__BiyVo{background-color:#00236a;color:#fff}.button-module_btn__ffRtT.button-module_type-filled__BiyVo:hover{background-color:#001745}.button-module_btn__ffRtT.button-module_type-filled__BiyVo:disabled{background-color:#eee;color:#3c393e;pointer-events:none}.button-module_btn__ffRtT.button-module_type-outline__RpZ2V{background-color:#fff;box-shadow:inset 0 0 0 2px #00236a}.button-module_btn__ffRtT.button-module_type-outline__RpZ2V:hover{background-color:#001745;color:#fff}.button-module_btn__ffRtT.button-module_type-outline__RpZ2V:disabled{box-shadow:inset 0 0 0 2px #eee;color:#3c393e;pointer-events:none}";
|
|
60
|
+
var styles$b = {"btn":"button-module_btn__ffRtT","full-size":"button-module_full-size__vmV2E","content-size":"button-module_content-size__f7JSE","size-default":"button-module_size-default__ydEgl","type-filled":"button-module_type-filled__BiyVo","with-icon":"button-module_with-icon__mfKU-","type-outline":"button-module_type-outline__RpZ2V"};
|
|
61
|
+
styleInject(css_248z$d);
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
64
|
* Primary UI component for user interaction
|
|
@@ -94,7 +94,7 @@ const Button = ({
|
|
|
94
94
|
outline,
|
|
95
95
|
...props
|
|
96
96
|
}) => {
|
|
97
|
-
const classProps = classnames__default["default"](styles$
|
|
97
|
+
const classProps = classnames__default["default"](styles$b.btn, styles$b[theme], styles$b[size], outline ? styles$b['type-outline'] : styles$b['type-filled'], className);
|
|
98
98
|
// className='btn type-outline size-default'
|
|
99
99
|
return /*#__PURE__*/React__default["default"].createElement("button", _extends({
|
|
100
100
|
type: "button",
|
|
@@ -140,8 +140,8 @@ Button.defaultProps = {
|
|
|
140
140
|
outline: false
|
|
141
141
|
};
|
|
142
142
|
|
|
143
|
-
var css_248z$
|
|
144
|
-
styleInject(css_248z$
|
|
143
|
+
var css_248z$c = "h1{font-size:70px;line-height:70px}h1,h2{font-weight:400;text-transform:uppercase}h2{font-size:50px;line-height:50px}h3{font-size:38px;font-weight:400;line-height:38px;text-transform:uppercase}h4{font-size:24px;line-height:24px}h4,h5{font-weight:600;text-transform:uppercase}h5{font-size:20px;line-height:26px}h6{font-size:14px;font-weight:600;line-height:20px;text-transform:none}p{font-size:16px;line-height:22px}p,span{color:#3c393e;font-weight:500;text-transform:none}span{font-size:12px;line-height:16px}i{font-family:icomoon;font-style:inherit}";
|
|
144
|
+
styleInject(css_248z$c);
|
|
145
145
|
|
|
146
146
|
const TypographyType = {
|
|
147
147
|
h1: 'h1',
|
|
@@ -192,9 +192,9 @@ Typography.defaultProps = {
|
|
|
192
192
|
variant: 'h1'
|
|
193
193
|
};
|
|
194
194
|
|
|
195
|
-
var css_248z$
|
|
196
|
-
var styles$
|
|
197
|
-
styleInject(css_248z$
|
|
195
|
+
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}";
|
|
196
|
+
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"};
|
|
197
|
+
styleInject(css_248z$b);
|
|
198
198
|
|
|
199
199
|
const Autocomplate = ({
|
|
200
200
|
className,
|
|
@@ -211,7 +211,7 @@ const Autocomplate = ({
|
|
|
211
211
|
errorMesage,
|
|
212
212
|
...props
|
|
213
213
|
}) => {
|
|
214
|
-
classnames__default["default"](styles$
|
|
214
|
+
classnames__default["default"](styles$a.searchBox, className);
|
|
215
215
|
const parseSelectedOptionsData = jsonSelectedOptionsData ? JSON.parse(jsonSelectedOptionsData) : {
|
|
216
216
|
name: '',
|
|
217
217
|
id: ''
|
|
@@ -251,43 +251,43 @@ const Autocomplate = ({
|
|
|
251
251
|
if (showOptions && inputValue) {
|
|
252
252
|
if (parseOptionsData.length && inputValue.length >= searchCount) {
|
|
253
253
|
optionList = /*#__PURE__*/React__default["default"].createElement("div", {
|
|
254
|
-
className: styles$
|
|
254
|
+
className: styles$a['autocomplate-content-bottom']
|
|
255
255
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
256
|
-
className: styles$
|
|
256
|
+
className: styles$a['autocomplate-content-bottom-inner']
|
|
257
257
|
}, parseOptionsData.map((optionName, index) => {
|
|
258
258
|
let className;
|
|
259
259
|
if (index === activeOption) {
|
|
260
260
|
className = "option-active";
|
|
261
261
|
}
|
|
262
262
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
263
|
-
className: styles$
|
|
263
|
+
className: styles$a[className],
|
|
264
264
|
key: optionName[keyNames.id],
|
|
265
265
|
onClick: handleClick
|
|
266
266
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
267
267
|
id: optionName[keyNames.id],
|
|
268
|
-
className: styles$
|
|
268
|
+
className: styles$a['autocomplate-content-bottom-row']
|
|
269
269
|
}, optionName[keyNames.name]));
|
|
270
270
|
})));
|
|
271
271
|
} else {
|
|
272
272
|
optionList = /*#__PURE__*/React__default["default"].createElement("div", {
|
|
273
|
-
className: styles$
|
|
273
|
+
className: styles$a['autocomplate-content-bottom']
|
|
274
274
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
275
|
-
className: styles$
|
|
275
|
+
className: styles$a['autocomplate-content-bottom-inner']
|
|
276
276
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
277
|
-
className: styles$
|
|
277
|
+
className: styles$a['autocomplate-content-bottom-row']
|
|
278
278
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
279
|
-
className: styles$
|
|
279
|
+
className: styles$a['no-option']
|
|
280
280
|
}, "No Option!"))));
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, label ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
284
|
-
className: styles$
|
|
284
|
+
className: styles$a['autocomplate-title']
|
|
285
285
|
}, label) : "", /*#__PURE__*/React__default["default"].createElement("div", {
|
|
286
|
-
className: styles$
|
|
286
|
+
className: styles$a['autocomplate-content']
|
|
287
287
|
}, /*#__PURE__*/React__default["default"].createElement("input", _extends({
|
|
288
288
|
id: inputId,
|
|
289
289
|
type: "text",
|
|
290
|
-
className: styles$
|
|
290
|
+
className: styles$a['autocomplate-content-top'],
|
|
291
291
|
required: required,
|
|
292
292
|
disabled: disabled,
|
|
293
293
|
onChange: handleChange,
|
|
@@ -297,7 +297,7 @@ const Autocomplate = ({
|
|
|
297
297
|
value: inputValue,
|
|
298
298
|
placeholder: placeHolder
|
|
299
299
|
}, props)), errorMesage ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
300
|
-
className: styles$
|
|
300
|
+
className: styles$a.errorMessage
|
|
301
301
|
}, errorMesage) : null, optionList));
|
|
302
302
|
};
|
|
303
303
|
Autocomplate.propTypes = {
|
|
@@ -315,9 +315,9 @@ Autocomplate.propTypes = {
|
|
|
315
315
|
errorMesage: PropTypes__default["default"].string
|
|
316
316
|
};
|
|
317
317
|
|
|
318
|
-
var css_248z$
|
|
319
|
-
var styles$
|
|
320
|
-
styleInject(css_248z$
|
|
318
|
+
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;display:inline-block;height:14px;left:0;margin-right:4px;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
|
+
var styles$9 = {"checkbox-wrap":"checkbox-module_checkbox-wrap__Xrg-m","checkmark":"checkbox-module_checkmark__M8DY6"};
|
|
320
|
+
styleInject(css_248z$a);
|
|
321
321
|
|
|
322
322
|
const Checkbox = ({
|
|
323
323
|
disabled,
|
|
@@ -332,7 +332,7 @@ const Checkbox = ({
|
|
|
332
332
|
onClick,
|
|
333
333
|
...props
|
|
334
334
|
}) => {
|
|
335
|
-
const classProps = classnames__default["default"](styles$
|
|
335
|
+
const classProps = classnames__default["default"](styles$9.checkbox, className);
|
|
336
336
|
const parseData = jsonData.length !== 0 ? JSON.parse(jsonData) : [];
|
|
337
337
|
const [data, setData] = React.useState(parseData);
|
|
338
338
|
React.useEffect(() => {
|
|
@@ -365,7 +365,7 @@ const Checkbox = ({
|
|
|
365
365
|
} : '';
|
|
366
366
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, data.map(element => {
|
|
367
367
|
return /*#__PURE__*/React__default["default"].createElement("label", {
|
|
368
|
-
className: styles$
|
|
368
|
+
className: styles$9["checkbox-wrap"],
|
|
369
369
|
key: element.value
|
|
370
370
|
}, /*#__PURE__*/React__default["default"].createElement("input", _extends({
|
|
371
371
|
type: "checkbox",
|
|
@@ -376,11 +376,12 @@ const Checkbox = ({
|
|
|
376
376
|
name: keyNames.name ? element[keyNames.name] : '',
|
|
377
377
|
id: keyNames.id ? element[keyNames.id] : '',
|
|
378
378
|
onChange: handleChange,
|
|
379
|
-
onClick: onClick ? onClick : () => {}
|
|
379
|
+
onClick: onClick ? onClick : () => {},
|
|
380
|
+
defaultChecked: element.checked
|
|
380
381
|
}, props)), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
381
|
-
className: styles$
|
|
382
|
+
className: styles$9["checkmark"]
|
|
382
383
|
}), element[keyNames.label] ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
383
|
-
className: styles$
|
|
384
|
+
className: styles$9.labelCheckbox,
|
|
384
385
|
for: element[keyNames.id]
|
|
385
386
|
}, element[keyNames.label]) : "");
|
|
386
387
|
}));
|
|
@@ -402,21 +403,21 @@ Checkbox.defaultProps = {
|
|
|
402
403
|
jsonData: '[{"value":"email", "name":"contact1", "label":"Email", "id":"contactChoice1"}, {"value":"phone", "name":"contact2", "label":"Phone", "id":"contactChoice2"}]'
|
|
403
404
|
};
|
|
404
405
|
|
|
405
|
-
var css_248z$
|
|
406
|
-
styleInject(css_248z$
|
|
406
|
+
var css_248z$9 = "";
|
|
407
|
+
styleInject(css_248z$9);
|
|
407
408
|
|
|
408
409
|
/**
|
|
409
410
|
* Created by aleksanyan.tigran on 10/7/2022.
|
|
410
411
|
*/
|
|
411
412
|
const Icon = props => {
|
|
412
413
|
return /*#__PURE__*/React__default["default"].createElement("i", {
|
|
413
|
-
className: css_248z$
|
|
414
|
+
className: css_248z$9[props.className]
|
|
414
415
|
});
|
|
415
416
|
};
|
|
416
417
|
|
|
417
|
-
var css_248z$
|
|
418
|
-
var styles$
|
|
419
|
-
styleInject(css_248z$
|
|
418
|
+
var css_248z$8 = ".input-module_input-wrap__NunrE{position:relative}.input-module_input__-ipHD{border:none;border-radius:6px;box-shadow:inset 0 0 0 2px #d1d1d1;box-sizing:border-box;color:#3c393e;cursor:pointer;font-size:16px;line-height:20px;outline:none;overflow:hidden;text-transform:none;transition:background-color .24s,color .24s}.input-module_input__-ipHD.input-module_full-size__38YG7{width:100%}.input-module_input__-ipHD.input-module_content-size__rZ5EA{width:auto}.input-module_input__-ipHD.input-module_size-medium__frTDq{max-width:400px;min-height:46px;padding:12px 15px}.input-module_input__-ipHD:hover{box-shadow:inset 0 0 0 2px #3c393e}.input-module_input__-ipHD:active{box-shadow:inset 0 0 0 2px #00236a}.input-module_inputErrorMessages__hx490{animation:input-module_error-message-show__OrVSo .24s forwards;bottom:0;color:#e00;font-size:14px;left:0;line-height:19px;position:absolute;transform:scale3d(0,0,0);z-index:1}.input-module_labelInput__sUMKQ{color:#000}.input-module_input__-ipHD.input-module_state-disabled__402v0{background-color:#fbfbfb;pointer-events:none}.input-module_input__-ipHD.input-module_error-message__7NphF{box-shadow:inset 0 0 0 2px #e00}.input-module_input-title__giCsY{color:#3c393e;display:block;font-size:16px;font-weight:500;line-height:22px;margin-bottom:6px;text-transform:none}@keyframes input-module_error-message-show__OrVSo{to{bottom:-20px;transform:scaleX(1)}}";
|
|
419
|
+
var styles$8 = {"input-wrap":"input-module_input-wrap__NunrE","input":"input-module_input__-ipHD","full-size":"input-module_full-size__38YG7","content-size":"input-module_content-size__rZ5EA","size-medium":"input-module_size-medium__frTDq","with-icon":"input-module_with-icon__w3jTW","inputErrorMessages":"input-module_inputErrorMessages__hx490","error-message-show":"input-module_error-message-show__OrVSo","labelInput":"input-module_labelInput__sUMKQ","state-disabled":"input-module_state-disabled__402v0","error-message":"input-module_error-message__7NphF","input-title":"input-module_input-title__giCsY"};
|
|
420
|
+
styleInject(css_248z$8);
|
|
420
421
|
|
|
421
422
|
const InputTypes = {
|
|
422
423
|
TEXT: "text",
|
|
@@ -460,11 +461,11 @@ const Input = ({
|
|
|
460
461
|
const regex = new RegExp(regexp);
|
|
461
462
|
eMessage = regex.test(inputValue) ? "" : regexpError;
|
|
462
463
|
}
|
|
463
|
-
const classProps = classnames__default["default"](styles$
|
|
464
|
+
const classProps = classnames__default["default"](styles$8.input, styles$8[size], eMessage != '' ? styles$8['error-message'] : "", className);
|
|
464
465
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
465
|
-
className: styles$
|
|
466
|
+
className: styles$8['input-wrap']
|
|
466
467
|
}, label ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
467
|
-
className: styles$
|
|
468
|
+
className: styles$8['input-title']
|
|
468
469
|
}, label) : "", /*#__PURE__*/React__default["default"].createElement("input", _extends({}, props, {
|
|
469
470
|
type: type,
|
|
470
471
|
className: classProps,
|
|
@@ -475,7 +476,7 @@ const Input = ({
|
|
|
475
476
|
onChange: handleChange,
|
|
476
477
|
value: inputValue
|
|
477
478
|
})), eMessage ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
478
|
-
className: styles$
|
|
479
|
+
className: styles$8.inputErrorMessages
|
|
479
480
|
}, eMessage) : "");
|
|
480
481
|
};
|
|
481
482
|
Input.propTypes = {
|
|
@@ -503,9 +504,9 @@ Input.defaultProps = {
|
|
|
503
504
|
value: ""
|
|
504
505
|
};
|
|
505
506
|
|
|
506
|
-
var css_248z$
|
|
507
|
-
var styles$
|
|
508
|
-
styleInject(css_248z$
|
|
507
|
+
var css_248z$7 = ".pagination-module_listItem__b1-WN:focus{background-color:#4caf50;color:#fff}.pagination-module_listItem__b1-WN:hover:not(.pagination-module_active__KwBDp){background-color:#ddd}.pagination-module_pagination-bar__MrtYT{display:flex;flex-direction:row;flex-wrap:nowrap;gap:8px}.pagination-module_pagination-btn__w8Yh8{border:none;border-radius:6px;outline:none}.pagination-module_pagination-btn__w8Yh8,.pagination-module_pagination-item__t3emS,.pagination-module_pagination-jump-next__LAb9Z{align-items:center;background-color:#fff;box-shadow:0 0 0 1px #eee;cursor:pointer;display:flex;height:34px;justify-content:center;width:34px}.pagination-module_pagination-item__t3emS,.pagination-module_pagination-jump-next__LAb9Z{border-radius:6px;flex:0 0 auto;font-size:16px;line-height:22px;position:relative;transition:background-color .24s}.pagination-module_pagination-item__t3emS:hover{background-color:#eee}.pagination-module_pagination-item__t3emS.pagination-module_selected__EXzCA{background-color:#00236a;color:#fff}.pagination-module_pagination-jump-next-arrow__aEVD8,.pagination-module_pagination-jump-next-txt__e7nFj{align-items:center;bottom:0;display:flex;font-size:12px;justify-content:center;left:0;line-height:14px;margin:auto;position:absolute;right:0;top:0;transition:opacity .24s,color .24s}.pagination-module_pagination-jump-next-arrow__aEVD8{opacity:0}.pagination-module_pagination-jump-next__LAb9Z:hover .pagination-module_pagination-jump-next-arrow__aEVD8{opacity:1}.pagination-module_pagination-jump-next__LAb9Z:hover .pagination-module_pagination-jump-next-txt__e7nFj{opacity:0}i{color:#3c393e;font-size:12px;line-height:12px}";
|
|
508
|
+
var styles$7 = {"listItem":"pagination-module_listItem__b1-WN","active":"pagination-module_active__KwBDp","pagination-bar":"pagination-module_pagination-bar__MrtYT","pagination-btn":"pagination-module_pagination-btn__w8Yh8","pagination-item":"pagination-module_pagination-item__t3emS","pagination-jump-next":"pagination-module_pagination-jump-next__LAb9Z","selected":"pagination-module_selected__EXzCA","pagination-jump-next-txt":"pagination-module_pagination-jump-next-txt__e7nFj","pagination-jump-next-arrow":"pagination-module_pagination-jump-next-arrow__aEVD8"};
|
|
509
|
+
styleInject(css_248z$7);
|
|
509
510
|
|
|
510
511
|
// import styles from "./pagination.module.scss";
|
|
511
512
|
|
|
@@ -592,7 +593,7 @@ const Pagination = ({
|
|
|
592
593
|
if (currentPageNumber === 0 || paginationRange.length < 2) {
|
|
593
594
|
return null;
|
|
594
595
|
}
|
|
595
|
-
const classProps = classnames__default["default"](styles$
|
|
596
|
+
const classProps = classnames__default["default"](styles$7.list, className ? className : styles$7["pagination-bar"]);
|
|
596
597
|
const onNext = () => {
|
|
597
598
|
onPageChange(currentPageNumber + 1);
|
|
598
599
|
};
|
|
@@ -609,7 +610,7 @@ const Pagination = ({
|
|
|
609
610
|
return /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
610
611
|
className: classProps
|
|
611
612
|
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
612
|
-
className: styles$
|
|
613
|
+
className: styles$7["pagination-btn"],
|
|
613
614
|
onClick: onPrevious,
|
|
614
615
|
disabled: currentPage === 1 ? true : false
|
|
615
616
|
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
@@ -619,23 +620,23 @@ const Pagination = ({
|
|
|
619
620
|
let currentPageIndex = paginationRange.indexOf(currentPageNumber);
|
|
620
621
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
621
622
|
key: id,
|
|
622
|
-
className: classnames__default["default"](styles$
|
|
623
|
+
className: classnames__default["default"](styles$7["pagination-jump-next"], styles$7.listItem),
|
|
623
624
|
onClick: id < currentPageIndex ? onPreviousFive : onNextFive,
|
|
624
625
|
disabled: currentPageIndex === 0 ? true : false
|
|
625
626
|
}, id < currentPageIndex ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
626
|
-
className: styles$
|
|
627
|
+
className: styles$7["pagination-jump-next-txt"]
|
|
627
628
|
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
628
629
|
className: "icon-text"
|
|
629
630
|
})), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
630
|
-
className: styles$
|
|
631
|
+
className: styles$7["pagination-jump-next-arrow"]
|
|
631
632
|
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
632
633
|
className: "icon-arrow-jump-back"
|
|
633
634
|
}))) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
634
|
-
className: styles$
|
|
635
|
+
className: styles$7["pagination-jump-next-txt"]
|
|
635
636
|
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
636
637
|
className: "icon-text"
|
|
637
638
|
})), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
638
|
-
className: styles$
|
|
639
|
+
className: styles$7["pagination-jump-next-arrow"]
|
|
639
640
|
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
640
641
|
className: "icon-arrow-jump-next"
|
|
641
642
|
}))));
|
|
@@ -643,11 +644,11 @@ const Pagination = ({
|
|
|
643
644
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
644
645
|
onClick: () => onPageChange(pageNumber),
|
|
645
646
|
key: id,
|
|
646
|
-
className: classnames__default["default"](`${pageNumber === currentPageNumber ? styles$
|
|
647
|
+
className: classnames__default["default"](`${pageNumber === currentPageNumber ? styles$7.selected : styles$7.listItem}`, styles$7["pagination-item"])
|
|
647
648
|
}, pageNumber);
|
|
648
649
|
}), /*#__PURE__*/React__default["default"].createElement("button", {
|
|
649
650
|
onClick: onNext,
|
|
650
|
-
className: styles$
|
|
651
|
+
className: styles$7["pagination-btn"],
|
|
651
652
|
disabled: currentPageNumber === lastPage ? true : false
|
|
652
653
|
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
653
654
|
className: "icon-arrow"
|
|
@@ -665,9 +666,9 @@ Pagination.defaultProps = {
|
|
|
665
666
|
siblingCount: 2
|
|
666
667
|
};
|
|
667
668
|
|
|
668
|
-
var css_248z$
|
|
669
|
-
var styles$
|
|
670
|
-
styleInject(css_248z$
|
|
669
|
+
var css_248z$6 = ".radio-module_radio-wrap__-lO7V{align-items:center;cursor:pointer;display:inline-flex;flex-direction:row;flex-wrap:nowrap;margin:0 6px;padding-left:24px;position:relative}.radio-module_radio-wrap__-lO7V>input{height:0;opacity:0;position:absolute;width:0}.radio-module_radio-wrap__-lO7V .radio-module_radio-checkmark__Kvol0{border:1px solid #d9d9d9;border-radius:50%;display:inline-block;height:14px;left:0;margin-right:4px;position:absolute;top:0;transition:border-color .24s;vertical-align:top;width:14px}.radio-module_radio-wrap__-lO7V>.radio-module_radio-checkmark__Kvol0:after{background-color:#d9d9d9;border-radius:50%;bottom:0;content:\"\";height:8px;left:0;margin:auto;opacity:0;position:absolute;right:0;top:0;transition:opacity .24s,background-color .24s;width:8px}.radio-module_radio-wrap__-lO7V input:checked~.radio-module_radio-checkmark__Kvol0:after{background-color:#1890ff;opacity:1}.radio-module_radio-wrap__-lO7V:hover input~.radio-module_radio-checkmark__Kvol0:after{opacity:1}.radio-module_radio-wrap__-lO7V input:checked~.radio-module_radio-checkmark__Kvol0{border-color:#1890ff}";
|
|
670
|
+
var styles$6 = {"radio-wrap":"radio-module_radio-wrap__-lO7V","radio-checkmark":"radio-module_radio-checkmark__Kvol0"};
|
|
671
|
+
styleInject(css_248z$6);
|
|
671
672
|
|
|
672
673
|
const Radio = ({
|
|
673
674
|
disabled,
|
|
@@ -681,11 +682,11 @@ const Radio = ({
|
|
|
681
682
|
keyNames,
|
|
682
683
|
...props
|
|
683
684
|
}) => {
|
|
684
|
-
const classProps = classnames__default["default"](styles$
|
|
685
|
+
const classProps = classnames__default["default"](styles$6.checkbox, className);
|
|
685
686
|
const parseData = jsonData.length !== 0 ? JSON.parse(jsonData) : [];
|
|
686
687
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, parseData.map((element, id) => {
|
|
687
688
|
return /*#__PURE__*/React__default["default"].createElement("label", {
|
|
688
|
-
className: styles$
|
|
689
|
+
className: styles$6["radio-wrap"],
|
|
689
690
|
key: element.value
|
|
690
691
|
}, /*#__PURE__*/React__default["default"].createElement("input", _extends({
|
|
691
692
|
type: "radio",
|
|
@@ -696,9 +697,9 @@ const Radio = ({
|
|
|
696
697
|
value: value ? value : element.value,
|
|
697
698
|
name: name ? name : element.name
|
|
698
699
|
}, props)), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
699
|
-
className: styles$
|
|
700
|
+
className: styles$6["radio-checkmark"]
|
|
700
701
|
}), element.label ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
701
|
-
className: styles$
|
|
702
|
+
className: styles$6.labelRadio
|
|
702
703
|
}, label ? label : element.label) : "");
|
|
703
704
|
}));
|
|
704
705
|
};
|
|
@@ -719,9 +720,9 @@ Radio.defaultProps = {
|
|
|
719
720
|
jsonData: '[{"value":"email", "name":"contact", "label":"Email", "id":"contactChoice1"}, {"value":"phone", "name":"contact", "label":"Phone", "id":"contactChoice2"}]'
|
|
720
721
|
};
|
|
721
722
|
|
|
722
|
-
var css_248z$
|
|
723
|
-
var styles$
|
|
724
|
-
styleInject(css_248z$
|
|
723
|
+
var css_248z$5 = "*{margin:0;padding:0}.captcha-module_main__Ys3EH{height:74px;max-width:400px;position:relative;width:100%}.captcha-module_slider__KLYny{-webkit-appearance:none;background:#eee;border-radius:2px;bottom:0;height:4px;left:0;margin:auto 0;outline:none;position:absolute;top:0;width:100%}.captcha-module_slider__KLYny::-webkit-slider-thumb{-webkit-appearance:none;height:30px;position:relative;width:30px;z-index:3}.captcha-module_selector__JFhb4{left:0;z-index:2}.captcha-module_selectBtn__GP1iH,.captcha-module_selector__JFhb4{bottom:0;height:30px;margin:auto 0;position:absolute;top:0;width:30px}.captcha-module_selectBtn__GP1iH{background:#00236a;border:2px solid #fff;border-radius:50%;box-shadow:1px 0 6px rgba(60,57,62,.15);cursor:pointer}.captcha-module_progressBar__mhdtM{background:red;bottom:0;height:4px;left:0;margin:auto 0;position:absolute;top:0;width:auto}.captcha-module_range__k24I2{color:blue;margin-bottom:15px;margin-top:15px}";
|
|
724
|
+
var styles$5 = {"main":"captcha-module_main__Ys3EH","slider":"captcha-module_slider__KLYny","selector":"captcha-module_selector__JFhb4","selectBtn":"captcha-module_selectBtn__GP1iH","progressBar":"captcha-module_progressBar__mhdtM","range":"captcha-module_range__k24I2"};
|
|
725
|
+
styleInject(css_248z$5);
|
|
725
726
|
|
|
726
727
|
const Captcha = ({
|
|
727
728
|
onclick,
|
|
@@ -730,7 +731,7 @@ const Captcha = ({
|
|
|
730
731
|
const [data, setData] = React.useState("");
|
|
731
732
|
const [right, setRight] = React.useState(false);
|
|
732
733
|
let range = rangeCount <= 100 ? rangeCount : 0;
|
|
733
|
-
let rangeElement = document.getElementsByClassName(styles$
|
|
734
|
+
let rangeElement = document.getElementsByClassName(styles$5.range);
|
|
734
735
|
React.useEffect(() => {
|
|
735
736
|
for (let element of rangeElement) {
|
|
736
737
|
element.style.marginLeft = `${range + 60}%`;
|
|
@@ -739,9 +740,9 @@ const Captcha = ({
|
|
|
739
740
|
}, [range, data]);
|
|
740
741
|
function sliderInput(event) {
|
|
741
742
|
setData(rangeCount == event.target.value ? 'green' : 'indianred');
|
|
742
|
-
let selector = document.getElementsByClassName(styles$
|
|
743
|
-
let selectBtn = document.getElementsByClassName(styles$
|
|
744
|
-
let progressBar = document.getElementsByClassName(styles$
|
|
743
|
+
let selector = document.getElementsByClassName(styles$5.selector);
|
|
744
|
+
let selectBtn = document.getElementsByClassName(styles$5.selectBtn);
|
|
745
|
+
let progressBar = document.getElementsByClassName(styles$5.progressBar);
|
|
745
746
|
selector[0].style.left = event.target.value + '%';
|
|
746
747
|
progressBar[0].style.width = event.target.value + '%';
|
|
747
748
|
if (rangeCount == event.target.value) {
|
|
@@ -754,25 +755,25 @@ const Captcha = ({
|
|
|
754
755
|
setRight(rangeCount == e.target.value ? true : false);
|
|
755
756
|
}
|
|
756
757
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
757
|
-
className: styles$
|
|
758
|
+
className: styles$5.main
|
|
758
759
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
759
|
-
className: styles$
|
|
760
|
+
className: styles$5.range
|
|
760
761
|
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
761
762
|
className: "icon-vector-down"
|
|
762
763
|
})), /*#__PURE__*/React__default["default"].createElement("input", {
|
|
763
764
|
type: "range",
|
|
764
|
-
className: styles$
|
|
765
|
+
className: styles$5.slider,
|
|
765
766
|
onClick: right ? onclick : null,
|
|
766
767
|
onInput: sliderInput,
|
|
767
768
|
onMouseUp: sliderChange
|
|
768
769
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
769
|
-
className: styles$
|
|
770
|
+
className: styles$5.selector
|
|
770
771
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
771
|
-
className: styles$
|
|
772
|
+
className: styles$5.selectBtn
|
|
772
773
|
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
773
|
-
className: styles$
|
|
774
|
+
className: styles$5.progressBar
|
|
774
775
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
775
|
-
className: styles$
|
|
776
|
+
className: styles$5.range
|
|
776
777
|
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
777
778
|
className: "icon-vector-up"
|
|
778
779
|
}))));
|
|
@@ -786,9 +787,9 @@ Captcha.defaultProps = {
|
|
|
786
787
|
onclick: undefined
|
|
787
788
|
};
|
|
788
789
|
|
|
789
|
-
var css_248z$
|
|
790
|
-
var styles$
|
|
791
|
-
styleInject(css_248z$
|
|
790
|
+
var css_248z$4 = ".stepper-module_stepper-container__-OVGy>div:last-child:before{display:none}.stepper-module_activeRing__Lzvh1,.stepper-module_bigRing__5GBm0{border-radius:50%;cursor:pointer;height:36px;margin-bottom:36px;position:relative;width:36px}.stepper-module_bigRing__5GBm0{box-shadow:0 0 0 2px #d1d1d1}.stepper-module_bigRing__5GBm0:before{background:#d1d1d1}.stepper-module_activeRing__Lzvh1{box-shadow:0 0 0 2px #00236a}.stepper-module_activeRing__Lzvh1:before{background:#00236a}.stepper-module_activeRing__Lzvh1:before,.stepper-module_bigRing__5GBm0:before{border-radius:20px;bottom:-32px;content:\"\";height:28px;left:0;margin:auto;overflow:hidden;position:absolute;right:0;width:2px}.stepper-module_smallActiveRing__im-XG,.stepper-module_smallRing__u-5a8{border-radius:50%;bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.stepper-module_smallRing__u-5a8{background-color:#d1d1d1;height:14px;width:14px}.stepper-module_smallActiveRing__im-XG{align-items:center;background-color:#00236a;color:#fff;display:flex;height:28px;justify-content:center;width:28px}";
|
|
791
|
+
var styles$4 = {"stepper-container":"stepper-module_stepper-container__-OVGy","bigRing":"stepper-module_bigRing__5GBm0","activeRing":"stepper-module_activeRing__Lzvh1","smallRing":"stepper-module_smallRing__u-5a8","smallActiveRing":"stepper-module_smallActiveRing__im-XG"};
|
|
792
|
+
styleInject(css_248z$4);
|
|
792
793
|
|
|
793
794
|
const Stepper = ({
|
|
794
795
|
className,
|
|
@@ -798,15 +799,15 @@ const Stepper = ({
|
|
|
798
799
|
}) => {
|
|
799
800
|
classnames__default["default"](className);
|
|
800
801
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
801
|
-
className: styles$
|
|
802
|
+
className: styles$4['stepper-container']
|
|
802
803
|
}, (() => {
|
|
803
804
|
let steppers = [];
|
|
804
805
|
for (let step = 1; step <= stepLength; step++) {
|
|
805
806
|
steppers.push( /*#__PURE__*/React__default["default"].createElement("div", {
|
|
806
|
-
className: classnames__default["default"](`${step <= activeSteps ? styles$
|
|
807
|
+
className: classnames__default["default"](`${step <= activeSteps ? styles$4.activeRing : styles$4.bigRing}`),
|
|
807
808
|
key: step
|
|
808
809
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
809
|
-
className: classnames__default["default"](`${step <= activeSteps ? styles$
|
|
810
|
+
className: classnames__default["default"](`${step <= activeSteps ? styles$4.smallActiveRing : styles$4.smallRing}`)
|
|
810
811
|
}, step <= activeSteps ? step : "")));
|
|
811
812
|
}
|
|
812
813
|
return steppers;
|
|
@@ -819,9 +820,9 @@ Stepper.propTypes = {
|
|
|
819
820
|
activeSteps: PropTypes__default["default"].number
|
|
820
821
|
};
|
|
821
822
|
|
|
822
|
-
var css_248z$
|
|
823
|
-
var styles$
|
|
824
|
-
styleInject(css_248z$
|
|
823
|
+
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: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}";
|
|
824
|
+
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"};
|
|
825
|
+
styleInject(css_248z$3);
|
|
825
826
|
|
|
826
827
|
const SelectTheme = {
|
|
827
828
|
DEFAULT: 'select-default',
|
|
@@ -858,34 +859,34 @@ const Select = ({
|
|
|
858
859
|
const parseSelectedData = selected.length !== 0 ? JSON.parse(selected) : {};
|
|
859
860
|
setNewSelected(parseSelectedData);
|
|
860
861
|
}, [selected]);
|
|
861
|
-
classnames__default["default"](styles$
|
|
862
|
-
[styles$
|
|
863
|
-
[styles$
|
|
862
|
+
classnames__default["default"](styles$3[theme], styles$3[size], {
|
|
863
|
+
[styles$3.disabled]: disabled,
|
|
864
|
+
[styles$3.required]: required
|
|
864
865
|
}, className);
|
|
865
866
|
return /*#__PURE__*/React__default["default"].createElement("div", null, label ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
866
|
-
className: styles$
|
|
867
|
+
className: styles$3['select-title']
|
|
867
868
|
}, label) : "", /*#__PURE__*/React__default["default"].createElement("div", {
|
|
868
|
-
className: styles$
|
|
869
|
+
className: styles$3['select-wrap']
|
|
869
870
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
870
|
-
className: styles$
|
|
871
|
-
id: styles$
|
|
871
|
+
className: styles$3['select-content'],
|
|
872
|
+
id: styles$3.selector
|
|
872
873
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
873
|
-
className: styles$
|
|
874
|
+
className: styles$3['select-content-top'],
|
|
874
875
|
onClick: () => {
|
|
875
876
|
setOpened(!opened);
|
|
876
877
|
}
|
|
877
878
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
878
|
-
className: styles$
|
|
879
|
+
className: styles$3['select-content-top-text']
|
|
879
880
|
}, newSelected && newSelected[keyNames.name] ? newSelected[keyNames.name] : defaultOption), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
880
|
-
className: styles$
|
|
881
|
+
className: styles$3['select-content-top-icon']
|
|
881
882
|
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
882
883
|
className: opened ? 'icon-arrow-up' : 'icon-arrow-down'
|
|
883
884
|
}))), opened && !disabled ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
884
|
-
className: styles$
|
|
885
|
+
className: styles$3['select-content-bottom']
|
|
885
886
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
886
|
-
className: styles$
|
|
887
|
+
className: styles$3['select-content-bottom-inner']
|
|
887
888
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
888
|
-
className: styles$
|
|
889
|
+
className: styles$3['select-content-bottom-row'],
|
|
889
890
|
onClick: () => {
|
|
890
891
|
if (!required && !selected) {
|
|
891
892
|
setNewSelected(defaultOption);
|
|
@@ -896,7 +897,7 @@ const Select = ({
|
|
|
896
897
|
}, defaultOption), options.map((option, i) => {
|
|
897
898
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
898
899
|
key: i,
|
|
899
|
-
className: styles$
|
|
900
|
+
className: styles$3['select-content-bottom-row'],
|
|
900
901
|
disabled: true,
|
|
901
902
|
onClick: () => {
|
|
902
903
|
setNewSelected(option);
|
|
@@ -906,7 +907,7 @@ const Select = ({
|
|
|
906
907
|
defaultValue: option[keyNames.id]
|
|
907
908
|
}, option[keyNames.name]);
|
|
908
909
|
}))) : null)), eMessage ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
909
|
-
className: styles$
|
|
910
|
+
className: styles$3.eMessage
|
|
910
911
|
}, eMessage) : null);
|
|
911
912
|
};
|
|
912
913
|
Select.propTypes = {
|
|
@@ -927,9 +928,9 @@ Select.defaultProps = {
|
|
|
927
928
|
size: 'medium'
|
|
928
929
|
};
|
|
929
930
|
|
|
930
|
-
var css_248z$
|
|
931
|
-
var styles$
|
|
932
|
-
styleInject(css_248z$
|
|
931
|
+
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__l13d5:hover .file-module_delete-upload-file__DirSm{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-file__DirSm{background:rgba(60,57,62,.4);height:100%;left:0;opacity:0;position:absolute;top:0;transition:opacity .24s;width:100%;z-index:1}.file-module_delete-upload-icon__PWN66{align-items:center;background:#fff;border-radius:6px;display:flex;height:26px;justify-content:center;position:absolute;right:10px;top:10px;width:26px;z-index:2}.file-module_delete-upload-icon__PWN66>i{color:#00236a;font-size:16px}.file-module_upload-file-content__QHMjn>img{display:block}.file-module_file-form-title__zWTSB{margin-bottom:10px;max-width:390px;word-break:break-all}";
|
|
932
|
+
var styles$2 = {"file-form":"file-module_file-form__l13d5","delete-upload-file":"file-module_delete-upload-file__DirSm","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","delete-upload-icon":"file-module_delete-upload-icon__PWN66","upload-file-content":"file-module_upload-file-content__QHMjn","file-form-title":"file-module_file-form-title__zWTSB"};
|
|
933
|
+
styleInject(css_248z$2);
|
|
933
934
|
|
|
934
935
|
const File = ({
|
|
935
936
|
className,
|
|
@@ -966,9 +967,9 @@ const File = ({
|
|
|
966
967
|
}
|
|
967
968
|
}
|
|
968
969
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
969
|
-
className: styles$
|
|
970
|
+
className: styles$2['file-form-title']
|
|
970
971
|
}, label), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
971
|
-
className: styles$
|
|
972
|
+
className: styles$2['file-form'],
|
|
972
973
|
onChange: e => {
|
|
973
974
|
console.log(e);
|
|
974
975
|
},
|
|
@@ -999,16 +1000,16 @@ const File = ({
|
|
|
999
1000
|
}
|
|
1000
1001
|
}
|
|
1001
1002
|
}), image ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1002
|
-
className: styles$
|
|
1003
|
+
className: styles$2['upload-file-content']
|
|
1003
1004
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1004
1005
|
onClick: () => {
|
|
1005
1006
|
setFileName('no selected file');
|
|
1006
1007
|
setImage(null);
|
|
1007
1008
|
}
|
|
1008
1009
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1009
|
-
className: styles$
|
|
1010
|
+
className: styles$2['delete-upload-file']
|
|
1010
1011
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1011
|
-
className: styles$
|
|
1012
|
+
className: styles$2['delete-upload-icon']
|
|
1012
1013
|
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
1013
1014
|
className: "icon-delete"
|
|
1014
1015
|
})))), /*#__PURE__*/React__default["default"].createElement("img", {
|
|
@@ -1016,16 +1017,16 @@ const File = ({
|
|
|
1016
1017
|
height: 190,
|
|
1017
1018
|
alt: fileName
|
|
1018
1019
|
})) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1019
|
-
className: styles$
|
|
1020
|
+
className: styles$2['file-form-inner-upload']
|
|
1020
1021
|
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
1021
1022
|
src: "../../assets/upload.svg",
|
|
1022
1023
|
alt: ""
|
|
1023
1024
|
}), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1024
|
-
className: styles$
|
|
1025
|
+
className: styles$2['upload-info']
|
|
1025
1026
|
}, "\u054F\u0565\u0572\u0561\u0564\u0580\u0565\u056C \u0586\u0561\u0575\u056C\u0568 \u0561\u0575\u057D\u057F\u0565\u0572 \u056F\u0561\u0574 ", /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1026
|
-
className: styles$
|
|
1027
|
+
className: styles$2['upload-info-txt']
|
|
1027
1028
|
}, "\u0532\u0565\u057C\u0576\u0565\u056C")), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1028
|
-
className: styles$
|
|
1029
|
+
className: styles$2['upload-info-size']
|
|
1029
1030
|
}, "\u0531\u057C\u0561\u057E\u0565\u056C\u0561\u0563\u0578\u0582\u0575\u0576\u0568 5\u0544\u0532 ( jpg, jpeg, png, pdf)"))), error ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1030
1031
|
style: {
|
|
1031
1032
|
color: 'red'
|
|
@@ -1042,9 +1043,9 @@ File.propTypes = {
|
|
|
1042
1043
|
defaultData: PropTypes__default["default"].object
|
|
1043
1044
|
};
|
|
1044
1045
|
|
|
1045
|
-
var css_248z = ".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{box-shadow:0 1px 0 0 rgba(0,0,0,.08);box-sizing:border-box;display:flex;flex-direction:row;height:30px;padding-left: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;justify-content:center;line-height:24px}.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;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;padding:0 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)}}";
|
|
1046
|
-
var styles = {"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"};
|
|
1047
|
-
styleInject(css_248z);
|
|
1046
|
+
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{box-shadow:0 1px 0 0 rgba(0,0,0,.08);box-sizing:border-box;display:flex;flex-direction:row;height:30px;padding-left: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;justify-content:center;line-height:24px}.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;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;padding:0 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)}}";
|
|
1047
|
+
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"};
|
|
1048
|
+
styleInject(css_248z$1);
|
|
1048
1049
|
|
|
1049
1050
|
const Modal = ({
|
|
1050
1051
|
setShow,
|
|
@@ -1055,34 +1056,34 @@ const Modal = ({
|
|
|
1055
1056
|
selected,
|
|
1056
1057
|
children
|
|
1057
1058
|
}) => {
|
|
1058
|
-
classnames__default["default"](styles.modal, className);
|
|
1059
|
+
classnames__default["default"](styles$1.modal, className);
|
|
1059
1060
|
const [select, setSelect] = React.useState(selected);
|
|
1060
1061
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1061
|
-
className: styles["modal-wrap"]
|
|
1062
|
+
className: styles$1["modal-wrap"]
|
|
1062
1063
|
}, type == "content" ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1063
|
-
className: styles["modal-content"]
|
|
1064
|
+
className: styles$1["modal-content"]
|
|
1064
1065
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1065
|
-
className: styles["modal-top"]
|
|
1066
|
+
className: styles$1["modal-top"]
|
|
1066
1067
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1067
|
-
className: styles["modal-title"]
|
|
1068
|
+
className: styles$1["modal-title"]
|
|
1068
1069
|
}, /*#__PURE__*/React__default["default"].createElement(Typography, {
|
|
1069
1070
|
variant: TypographyType.h5
|
|
1070
1071
|
}, headerText)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1071
|
-
className: styles["close-btn"],
|
|
1072
|
+
className: styles$1["close-btn"],
|
|
1072
1073
|
onClick: () => setShow(false)
|
|
1073
1074
|
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
1074
1075
|
className: "icon-close"
|
|
1075
1076
|
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1076
|
-
className: styles["modal-section"]
|
|
1077
|
+
className: styles$1["modal-section"]
|
|
1077
1078
|
}, children)) : type == "images" ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1078
|
-
className: styles["modal-content"]
|
|
1079
|
+
className: styles$1["modal-content"]
|
|
1079
1080
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1080
|
-
className: styles["close-btn"],
|
|
1081
|
+
className: styles$1["close-btn"],
|
|
1081
1082
|
onClick: () => setShow(false)
|
|
1082
1083
|
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
1083
1084
|
className: "icon-close"
|
|
1084
1085
|
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1085
|
-
className: styles["modal-section"]
|
|
1086
|
+
className: styles$1["modal-section"]
|
|
1086
1087
|
}, /*#__PURE__*/React__default["default"].createElement("div", null, select > 1 ? /*#__PURE__*/React__default["default"].createElement("h1", {
|
|
1087
1088
|
onClick: () => setSelect(select - 1)
|
|
1088
1089
|
}, "-") : null, data.map(elem => {
|
|
@@ -1108,6 +1109,98 @@ Modal.propTypes = {
|
|
|
1108
1109
|
data: PropTypes__default["default"].array
|
|
1109
1110
|
};
|
|
1110
1111
|
|
|
1112
|
+
var css_248z = ".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}";
|
|
1113
|
+
var styles = {"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"};
|
|
1114
|
+
styleInject(css_248z);
|
|
1115
|
+
|
|
1116
|
+
const Table = ({
|
|
1117
|
+
className,
|
|
1118
|
+
onChange,
|
|
1119
|
+
config,
|
|
1120
|
+
jsonData,
|
|
1121
|
+
hearderData,
|
|
1122
|
+
keyNames,
|
|
1123
|
+
actions,
|
|
1124
|
+
...props
|
|
1125
|
+
}) => {
|
|
1126
|
+
classnames__default["default"](className);
|
|
1127
|
+
let tbodyData = jsonData.length ? JSON.parse(jsonData) : [];
|
|
1128
|
+
React.useEffect(() => {
|
|
1129
|
+
tbodyData = jsonData.length ? JSON.parse(jsonData) : [];
|
|
1130
|
+
}, [jsonData]);
|
|
1131
|
+
const [checked, setChecked] = React.useState(config.isCheckbox && config.isCheckbox.checked ? config.isCheckbox.checked : []);
|
|
1132
|
+
config.isCheckbox && config.isCheckbox.showCheckbox == undefined ? config.isCheckbox.showCheckbox = () => {
|
|
1133
|
+
return true;
|
|
1134
|
+
} : "";
|
|
1135
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1136
|
+
className: styles["table-wrap"]
|
|
1137
|
+
}, config.isHeader && hearderData.map((header, key) => {
|
|
1138
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1139
|
+
className: styles["table-top"],
|
|
1140
|
+
key: key
|
|
1141
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1142
|
+
className: styles["table-items"]
|
|
1143
|
+
}, header));
|
|
1144
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1145
|
+
className: styles["table-bottom"]
|
|
1146
|
+
}, tbodyData.map((item, key) => {
|
|
1147
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1148
|
+
className: styles["table-bottom-inner"],
|
|
1149
|
+
key: key
|
|
1150
|
+
}, keyNames.map((keyName, keyNameKey) => {
|
|
1151
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1152
|
+
className: styles["table-items"],
|
|
1153
|
+
key: keyNameKey
|
|
1154
|
+
}, config.isCheckbox && config.isCheckbox.showCheckbox && config.isCheckbox.showCheckbox(item) && keyNameKey == 0 && /*#__PURE__*/React__default["default"].createElement(Checkbox, {
|
|
1155
|
+
onClick: e => {
|
|
1156
|
+
const id = e.target.id;
|
|
1157
|
+
const checkedValue = e.target.checked;
|
|
1158
|
+
let ch = [...checked];
|
|
1159
|
+
checkedValue ? ch.push(Number(id)) : ch.splice(ch.indexOf(id), 1);
|
|
1160
|
+
setChecked(ch);
|
|
1161
|
+
config.isCheckbox.onChange(ch);
|
|
1162
|
+
},
|
|
1163
|
+
jsonData: `[{"value":"", "name":"", "label":"", "id":${item.id}, "checked":${checked.indexOf(item.id) > -1 ? true : false}}]`
|
|
1164
|
+
}), typeof keyName === "string" ? item[keyName] : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
1165
|
+
className: keyName.icon
|
|
1166
|
+
}), item[keyName.name]));
|
|
1167
|
+
}), actions && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1168
|
+
className: styles["table-items"]
|
|
1169
|
+
}, actions.filter(a => a.show && a.show(item) || a.show === undefined).map((action, key) => {
|
|
1170
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1171
|
+
key: key
|
|
1172
|
+
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
1173
|
+
className: action.icon,
|
|
1174
|
+
onClick: action.click ? action.click : () => {}
|
|
1175
|
+
}, action.icon));
|
|
1176
|
+
})));
|
|
1177
|
+
})));
|
|
1178
|
+
};
|
|
1179
|
+
Table.propTypes = {
|
|
1180
|
+
className: PropTypes__default["default"].string,
|
|
1181
|
+
onChange: PropTypes__default["default"].func,
|
|
1182
|
+
config: PropTypes__default["default"].object,
|
|
1183
|
+
actions: PropTypes__default["default"].arrayOf(PropTypes__default["default"].object),
|
|
1184
|
+
jsonData: PropTypes__default["default"].string,
|
|
1185
|
+
keyNames: PropTypes__default["default"].arrayOf(PropTypes__default["default"].oneOf([PropTypes__default["default"].string, PropTypes__default["default"].object])),
|
|
1186
|
+
hearderData: PropTypes__default["default"].array
|
|
1187
|
+
};
|
|
1188
|
+
Table.defaultProps = {
|
|
1189
|
+
className: "",
|
|
1190
|
+
onChange: undefined,
|
|
1191
|
+
errorMesage: "",
|
|
1192
|
+
config: {
|
|
1193
|
+
isHeader: true,
|
|
1194
|
+
isCheckbox: {
|
|
1195
|
+
checked: []
|
|
1196
|
+
}
|
|
1197
|
+
},
|
|
1198
|
+
actions: [],
|
|
1199
|
+
jsonData: "",
|
|
1200
|
+
keyNames: [],
|
|
1201
|
+
hearderData: []
|
|
1202
|
+
};
|
|
1203
|
+
|
|
1111
1204
|
exports.Autocomplate = Autocomplate;
|
|
1112
1205
|
exports.Button = Button;
|
|
1113
1206
|
exports.ButtonSize = ButtonSize;
|
|
@@ -1126,5 +1219,6 @@ exports.Select = Select;
|
|
|
1126
1219
|
exports.SelectSize = SelectSize;
|
|
1127
1220
|
exports.SelectTheme = SelectTheme;
|
|
1128
1221
|
exports.Stepper = Stepper;
|
|
1222
|
+
exports.Table = Table;
|
|
1129
1223
|
exports.Typography = Typography;
|
|
1130
1224
|
exports.TypographyType = TypographyType;
|