@xaypay/tui 0.0.27 → 0.0.29
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 +69 -46
- package/dist/index.js +69 -46
- package/package.json +1 -1
- package/src/components/checkbox/index.js +36 -27
- package/src/components/file/index.js +1 -2
- package/src/components/modal/index.js +75 -45
- package/src/components/modal/modal.module.css +2 -2
- package/src/components/pagination/index.js +125 -70
- package/src/components/typography/typography.module.css +3 -3
package/dist/index.es.js
CHANGED
|
@@ -129,7 +129,7 @@ Button.defaultProps = {
|
|
|
129
129
|
outline: false
|
|
130
130
|
};
|
|
131
131
|
|
|
132
|
-
var css_248z$b = "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
|
|
132
|
+
var css_248z$b = "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}";
|
|
133
133
|
styleInject(css_248z$b);
|
|
134
134
|
|
|
135
135
|
const TypographyType = {
|
|
@@ -324,26 +324,34 @@ const Checkbox = ({
|
|
|
324
324
|
const classProps = classnames(styles$8.checkbox, className);
|
|
325
325
|
const parseData = jsonData.length !== 0 ? JSON.parse(jsonData) : [];
|
|
326
326
|
const [data, setData] = useState(parseData);
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
327
|
+
useEffect(() => {
|
|
328
|
+
const parseData = jsonData.length !== 0 ? JSON.parse(jsonData) : [];
|
|
329
|
+
setData(parseData);
|
|
330
|
+
}, [jsonData]);
|
|
331
|
+
useEffect(() => {
|
|
332
|
+
onChange ? onChange(data.filter(d => d.checked)) : '';
|
|
333
|
+
}, [data]);
|
|
330
334
|
const handleChange = e => {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
});
|
|
345
|
-
}
|
|
335
|
+
let id;
|
|
336
|
+
data.forEach((value, key) => {
|
|
337
|
+
if (value[keyNames.value] === e.target.value) {
|
|
338
|
+
id = key;
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
let items = [...data];
|
|
342
|
+
let item = {
|
|
343
|
+
...items[id]
|
|
344
|
+
};
|
|
345
|
+
item.checked = !item.checked;
|
|
346
|
+
items[id] = item;
|
|
347
|
+
setData(items);
|
|
346
348
|
};
|
|
349
|
+
!keyNames ? keyNames = {
|
|
350
|
+
id: 'id',
|
|
351
|
+
name: 'name',
|
|
352
|
+
value: 'value',
|
|
353
|
+
label: 'label'
|
|
354
|
+
} : '';
|
|
347
355
|
return /*#__PURE__*/React.createElement(React.Fragment, null, data.map(element => {
|
|
348
356
|
return /*#__PURE__*/React.createElement("label", {
|
|
349
357
|
className: styles$8["checkbox-wrap"],
|
|
@@ -353,27 +361,29 @@ const Checkbox = ({
|
|
|
353
361
|
className: classProps,
|
|
354
362
|
disabled: disabled,
|
|
355
363
|
required: required,
|
|
356
|
-
value: value ? value :
|
|
357
|
-
name: name ? name :
|
|
364
|
+
value: keyNames.value ? element[keyNames.value] : '',
|
|
365
|
+
name: keyNames.name ? element[keyNames.name] : '',
|
|
366
|
+
id: keyNames.id ? element[keyNames.id] : '',
|
|
358
367
|
onChange: handleChange,
|
|
359
|
-
onClick:
|
|
368
|
+
onClick: onClick ? onClick : () => {}
|
|
360
369
|
}, props)), /*#__PURE__*/React.createElement("span", {
|
|
361
370
|
className: styles$8["checkmark"]
|
|
362
|
-
}), element.label ? /*#__PURE__*/React.createElement("
|
|
363
|
-
className: styles$8.
|
|
364
|
-
|
|
371
|
+
}), element[keyNames.label] ? /*#__PURE__*/React.createElement("label", {
|
|
372
|
+
className: styles$8.labelCheckbox,
|
|
373
|
+
for: element[keyNames.id]
|
|
374
|
+
}, element[keyNames.label]) : "");
|
|
365
375
|
}));
|
|
366
376
|
};
|
|
367
377
|
Checkbox.propTypes = {
|
|
368
378
|
className: PropTypes.string,
|
|
369
379
|
onChange: PropTypes.func,
|
|
380
|
+
onClick: PropTypes.func,
|
|
370
381
|
required: PropTypes.bool,
|
|
371
382
|
disabled: PropTypes.bool,
|
|
372
383
|
name: PropTypes.string,
|
|
373
384
|
value: PropTypes.string,
|
|
374
385
|
jsonData: PropTypes.string,
|
|
375
386
|
label: PropTypes.string,
|
|
376
|
-
onClick: PropTypes.func,
|
|
377
387
|
keyNames: PropTypes.object
|
|
378
388
|
};
|
|
379
389
|
Checkbox.defaultProps = {
|
|
@@ -555,7 +565,9 @@ const Pagination = ({
|
|
|
555
565
|
setCurrentPage(currentPage);
|
|
556
566
|
}, [currentPage]);
|
|
557
567
|
const onPageChange = page => {
|
|
558
|
-
|
|
568
|
+
if (page > 0) {
|
|
569
|
+
setCurrentPage(page);
|
|
570
|
+
}
|
|
559
571
|
};
|
|
560
572
|
useEffect(() => {
|
|
561
573
|
onChange(currentPageNumber);
|
|
@@ -596,23 +608,31 @@ const Pagination = ({
|
|
|
596
608
|
let currentPageIndex = paginationRange.indexOf(currentPageNumber);
|
|
597
609
|
return /*#__PURE__*/React.createElement("li", {
|
|
598
610
|
key: id,
|
|
599
|
-
className: classnames(styles$6[
|
|
611
|
+
className: classnames(styles$6["pagination-jump-next"], styles$6.listItem),
|
|
600
612
|
onClick: id < currentPageIndex ? onPreviousFive : onNextFive,
|
|
601
613
|
disabled: currentPageIndex === 0 ? true : false
|
|
602
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
603
|
-
className: styles$6[
|
|
614
|
+
}, id < currentPageIndex ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
615
|
+
className: styles$6["pagination-jump-next-txt"]
|
|
616
|
+
}, /*#__PURE__*/React.createElement("i", {
|
|
617
|
+
className: "icon-text"
|
|
618
|
+
})), /*#__PURE__*/React.createElement("span", {
|
|
619
|
+
className: styles$6["pagination-jump-next-arrow"]
|
|
620
|
+
}, /*#__PURE__*/React.createElement("i", {
|
|
621
|
+
className: "icon-arrow-jump-back"
|
|
622
|
+
}))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
623
|
+
className: styles$6["pagination-jump-next-txt"]
|
|
604
624
|
}, /*#__PURE__*/React.createElement("i", {
|
|
605
625
|
className: "icon-text"
|
|
606
626
|
})), /*#__PURE__*/React.createElement("span", {
|
|
607
|
-
className: styles$6[
|
|
627
|
+
className: styles$6["pagination-jump-next-arrow"]
|
|
608
628
|
}, /*#__PURE__*/React.createElement("i", {
|
|
609
629
|
className: "icon-arrow-jump-next"
|
|
610
|
-
})));
|
|
630
|
+
}))));
|
|
611
631
|
}
|
|
612
632
|
return /*#__PURE__*/React.createElement("li", {
|
|
613
633
|
onClick: () => onPageChange(pageNumber),
|
|
614
634
|
key: id,
|
|
615
|
-
className: classnames(`${pageNumber === currentPageNumber ? styles$6.selected : styles$6.listItem}`, styles$6[
|
|
635
|
+
className: classnames(`${pageNumber === currentPageNumber ? styles$6.selected : styles$6.listItem}`, styles$6["pagination-item"])
|
|
616
636
|
}, pageNumber);
|
|
617
637
|
}), /*#__PURE__*/React.createElement("button", {
|
|
618
638
|
onClick: onNext,
|
|
@@ -979,7 +999,7 @@ const File = ({
|
|
|
979
999
|
}, /*#__PURE__*/React.createElement("div", {
|
|
980
1000
|
className: styles$1['delete-upload-icon']
|
|
981
1001
|
}, /*#__PURE__*/React.createElement("i", {
|
|
982
|
-
className: "icon-
|
|
1002
|
+
className: "icon-delete"
|
|
983
1003
|
})))), /*#__PURE__*/React.createElement("img", {
|
|
984
1004
|
src: image,
|
|
985
1005
|
height: 190,
|
|
@@ -1011,7 +1031,7 @@ File.propTypes = {
|
|
|
1011
1031
|
defaultData: PropTypes.object
|
|
1012
1032
|
};
|
|
1013
1033
|
|
|
1014
|
-
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;
|
|
1034
|
+
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)}}";
|
|
1015
1035
|
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"};
|
|
1016
1036
|
styleInject(css_248z);
|
|
1017
1037
|
|
|
@@ -1021,33 +1041,38 @@ const Modal = ({
|
|
|
1021
1041
|
className,
|
|
1022
1042
|
type,
|
|
1023
1043
|
data,
|
|
1024
|
-
selected
|
|
1044
|
+
selected,
|
|
1045
|
+
children
|
|
1025
1046
|
}) => {
|
|
1026
1047
|
classnames(styles.modal, className);
|
|
1027
1048
|
const [select, setSelect] = useState(selected);
|
|
1028
1049
|
return /*#__PURE__*/React.createElement("div", {
|
|
1029
1050
|
className: styles["modal-wrap"]
|
|
1030
|
-
}, type ==
|
|
1051
|
+
}, type == "content" ? /*#__PURE__*/React.createElement("div", {
|
|
1031
1052
|
className: styles["modal-content"]
|
|
1032
1053
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1033
1054
|
className: styles["modal-top"]
|
|
1034
1055
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1035
|
-
className: styles[
|
|
1036
|
-
},
|
|
1056
|
+
className: styles["modal-title"]
|
|
1057
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
1058
|
+
variant: TypographyType.h5
|
|
1059
|
+
}, headerText)), /*#__PURE__*/React.createElement("div", {
|
|
1037
1060
|
className: styles["close-btn"],
|
|
1038
1061
|
onClick: () => setShow(false)
|
|
1039
|
-
}, /*#__PURE__*/React.createElement(
|
|
1062
|
+
}, /*#__PURE__*/React.createElement("i", {
|
|
1040
1063
|
className: "icon-close"
|
|
1041
1064
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
1042
1065
|
className: styles["modal-section"]
|
|
1043
|
-
})) : type ==
|
|
1066
|
+
}, children)) : type == "images" ? /*#__PURE__*/React.createElement("div", {
|
|
1044
1067
|
className: styles["modal-content"]
|
|
1045
1068
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1046
1069
|
className: styles["close-btn"],
|
|
1047
1070
|
onClick: () => setShow(false)
|
|
1048
|
-
}, /*#__PURE__*/React.createElement(
|
|
1071
|
+
}, /*#__PURE__*/React.createElement("i", {
|
|
1049
1072
|
className: "icon-close"
|
|
1050
|
-
})), /*#__PURE__*/React.createElement("div",
|
|
1073
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
1074
|
+
className: styles["modal-section"]
|
|
1075
|
+
}, /*#__PURE__*/React.createElement("div", null, select > 1 ? /*#__PURE__*/React.createElement("h1", {
|
|
1051
1076
|
onClick: () => setSelect(select - 1)
|
|
1052
1077
|
}, "-") : null, data.map(elem => {
|
|
1053
1078
|
if (select == elem.id) {
|
|
@@ -1061,9 +1086,7 @@ const Modal = ({
|
|
|
1061
1086
|
onClick: () => {
|
|
1062
1087
|
setSelect(select + 1);
|
|
1063
1088
|
}
|
|
1064
|
-
}, "+") : null)
|
|
1065
|
-
className: styles["modal-section"]
|
|
1066
|
-
})) : null);
|
|
1089
|
+
}, "+") : null))) : null);
|
|
1067
1090
|
};
|
|
1068
1091
|
Modal.propTypes = {
|
|
1069
1092
|
setShow: PropTypes.func,
|
package/dist/index.js
CHANGED
|
@@ -140,7 +140,7 @@ Button.defaultProps = {
|
|
|
140
140
|
outline: false
|
|
141
141
|
};
|
|
142
142
|
|
|
143
|
-
var css_248z$b = "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
|
|
143
|
+
var css_248z$b = "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
144
|
styleInject(css_248z$b);
|
|
145
145
|
|
|
146
146
|
const TypographyType = {
|
|
@@ -335,26 +335,34 @@ const Checkbox = ({
|
|
|
335
335
|
const classProps = classnames__default["default"](styles$8.checkbox, className);
|
|
336
336
|
const parseData = jsonData.length !== 0 ? JSON.parse(jsonData) : [];
|
|
337
337
|
const [data, setData] = React.useState(parseData);
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
338
|
+
React.useEffect(() => {
|
|
339
|
+
const parseData = jsonData.length !== 0 ? JSON.parse(jsonData) : [];
|
|
340
|
+
setData(parseData);
|
|
341
|
+
}, [jsonData]);
|
|
342
|
+
React.useEffect(() => {
|
|
343
|
+
onChange ? onChange(data.filter(d => d.checked)) : '';
|
|
344
|
+
}, [data]);
|
|
341
345
|
const handleChange = e => {
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
});
|
|
356
|
-
}
|
|
346
|
+
let id;
|
|
347
|
+
data.forEach((value, key) => {
|
|
348
|
+
if (value[keyNames.value] === e.target.value) {
|
|
349
|
+
id = key;
|
|
350
|
+
}
|
|
351
|
+
});
|
|
352
|
+
let items = [...data];
|
|
353
|
+
let item = {
|
|
354
|
+
...items[id]
|
|
355
|
+
};
|
|
356
|
+
item.checked = !item.checked;
|
|
357
|
+
items[id] = item;
|
|
358
|
+
setData(items);
|
|
357
359
|
};
|
|
360
|
+
!keyNames ? keyNames = {
|
|
361
|
+
id: 'id',
|
|
362
|
+
name: 'name',
|
|
363
|
+
value: 'value',
|
|
364
|
+
label: 'label'
|
|
365
|
+
} : '';
|
|
358
366
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, data.map(element => {
|
|
359
367
|
return /*#__PURE__*/React__default["default"].createElement("label", {
|
|
360
368
|
className: styles$8["checkbox-wrap"],
|
|
@@ -364,27 +372,29 @@ const Checkbox = ({
|
|
|
364
372
|
className: classProps,
|
|
365
373
|
disabled: disabled,
|
|
366
374
|
required: required,
|
|
367
|
-
value: value ? value :
|
|
368
|
-
name: name ? name :
|
|
375
|
+
value: keyNames.value ? element[keyNames.value] : '',
|
|
376
|
+
name: keyNames.name ? element[keyNames.name] : '',
|
|
377
|
+
id: keyNames.id ? element[keyNames.id] : '',
|
|
369
378
|
onChange: handleChange,
|
|
370
|
-
onClick:
|
|
379
|
+
onClick: onClick ? onClick : () => {}
|
|
371
380
|
}, props)), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
372
381
|
className: styles$8["checkmark"]
|
|
373
|
-
}), element.label ? /*#__PURE__*/React__default["default"].createElement("
|
|
374
|
-
className: styles$8.
|
|
375
|
-
|
|
382
|
+
}), element[keyNames.label] ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
383
|
+
className: styles$8.labelCheckbox,
|
|
384
|
+
for: element[keyNames.id]
|
|
385
|
+
}, element[keyNames.label]) : "");
|
|
376
386
|
}));
|
|
377
387
|
};
|
|
378
388
|
Checkbox.propTypes = {
|
|
379
389
|
className: PropTypes__default["default"].string,
|
|
380
390
|
onChange: PropTypes__default["default"].func,
|
|
391
|
+
onClick: PropTypes__default["default"].func,
|
|
381
392
|
required: PropTypes__default["default"].bool,
|
|
382
393
|
disabled: PropTypes__default["default"].bool,
|
|
383
394
|
name: PropTypes__default["default"].string,
|
|
384
395
|
value: PropTypes__default["default"].string,
|
|
385
396
|
jsonData: PropTypes__default["default"].string,
|
|
386
397
|
label: PropTypes__default["default"].string,
|
|
387
|
-
onClick: PropTypes__default["default"].func,
|
|
388
398
|
keyNames: PropTypes__default["default"].object
|
|
389
399
|
};
|
|
390
400
|
Checkbox.defaultProps = {
|
|
@@ -566,7 +576,9 @@ const Pagination = ({
|
|
|
566
576
|
setCurrentPage(currentPage);
|
|
567
577
|
}, [currentPage]);
|
|
568
578
|
const onPageChange = page => {
|
|
569
|
-
|
|
579
|
+
if (page > 0) {
|
|
580
|
+
setCurrentPage(page);
|
|
581
|
+
}
|
|
570
582
|
};
|
|
571
583
|
React.useEffect(() => {
|
|
572
584
|
onChange(currentPageNumber);
|
|
@@ -607,23 +619,31 @@ const Pagination = ({
|
|
|
607
619
|
let currentPageIndex = paginationRange.indexOf(currentPageNumber);
|
|
608
620
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
609
621
|
key: id,
|
|
610
|
-
className: classnames__default["default"](styles$6[
|
|
622
|
+
className: classnames__default["default"](styles$6["pagination-jump-next"], styles$6.listItem),
|
|
611
623
|
onClick: id < currentPageIndex ? onPreviousFive : onNextFive,
|
|
612
624
|
disabled: currentPageIndex === 0 ? true : false
|
|
613
|
-
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
614
|
-
className: styles$6[
|
|
625
|
+
}, id < currentPageIndex ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
626
|
+
className: styles$6["pagination-jump-next-txt"]
|
|
627
|
+
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
628
|
+
className: "icon-text"
|
|
629
|
+
})), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
630
|
+
className: styles$6["pagination-jump-next-arrow"]
|
|
631
|
+
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
632
|
+
className: "icon-arrow-jump-back"
|
|
633
|
+
}))) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
634
|
+
className: styles$6["pagination-jump-next-txt"]
|
|
615
635
|
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
616
636
|
className: "icon-text"
|
|
617
637
|
})), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
618
|
-
className: styles$6[
|
|
638
|
+
className: styles$6["pagination-jump-next-arrow"]
|
|
619
639
|
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
620
640
|
className: "icon-arrow-jump-next"
|
|
621
|
-
})));
|
|
641
|
+
}))));
|
|
622
642
|
}
|
|
623
643
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
624
644
|
onClick: () => onPageChange(pageNumber),
|
|
625
645
|
key: id,
|
|
626
|
-
className: classnames__default["default"](`${pageNumber === currentPageNumber ? styles$6.selected : styles$6.listItem}`, styles$6[
|
|
646
|
+
className: classnames__default["default"](`${pageNumber === currentPageNumber ? styles$6.selected : styles$6.listItem}`, styles$6["pagination-item"])
|
|
627
647
|
}, pageNumber);
|
|
628
648
|
}), /*#__PURE__*/React__default["default"].createElement("button", {
|
|
629
649
|
onClick: onNext,
|
|
@@ -990,7 +1010,7 @@ const File = ({
|
|
|
990
1010
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
991
1011
|
className: styles$1['delete-upload-icon']
|
|
992
1012
|
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
993
|
-
className: "icon-
|
|
1013
|
+
className: "icon-delete"
|
|
994
1014
|
})))), /*#__PURE__*/React__default["default"].createElement("img", {
|
|
995
1015
|
src: image,
|
|
996
1016
|
height: 190,
|
|
@@ -1022,7 +1042,7 @@ File.propTypes = {
|
|
|
1022
1042
|
defaultData: PropTypes__default["default"].object
|
|
1023
1043
|
};
|
|
1024
1044
|
|
|
1025
|
-
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;
|
|
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)}}";
|
|
1026
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"};
|
|
1027
1047
|
styleInject(css_248z);
|
|
1028
1048
|
|
|
@@ -1032,33 +1052,38 @@ const Modal = ({
|
|
|
1032
1052
|
className,
|
|
1033
1053
|
type,
|
|
1034
1054
|
data,
|
|
1035
|
-
selected
|
|
1055
|
+
selected,
|
|
1056
|
+
children
|
|
1036
1057
|
}) => {
|
|
1037
1058
|
classnames__default["default"](styles.modal, className);
|
|
1038
1059
|
const [select, setSelect] = React.useState(selected);
|
|
1039
1060
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1040
1061
|
className: styles["modal-wrap"]
|
|
1041
|
-
}, type ==
|
|
1062
|
+
}, type == "content" ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1042
1063
|
className: styles["modal-content"]
|
|
1043
1064
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1044
1065
|
className: styles["modal-top"]
|
|
1045
1066
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1046
|
-
className: styles[
|
|
1047
|
-
},
|
|
1067
|
+
className: styles["modal-title"]
|
|
1068
|
+
}, /*#__PURE__*/React__default["default"].createElement(Typography, {
|
|
1069
|
+
variant: TypographyType.h5
|
|
1070
|
+
}, headerText)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1048
1071
|
className: styles["close-btn"],
|
|
1049
1072
|
onClick: () => setShow(false)
|
|
1050
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
1073
|
+
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
1051
1074
|
className: "icon-close"
|
|
1052
1075
|
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1053
1076
|
className: styles["modal-section"]
|
|
1054
|
-
})) : type ==
|
|
1077
|
+
}, children)) : type == "images" ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1055
1078
|
className: styles["modal-content"]
|
|
1056
1079
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1057
1080
|
className: styles["close-btn"],
|
|
1058
1081
|
onClick: () => setShow(false)
|
|
1059
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
1082
|
+
}, /*#__PURE__*/React__default["default"].createElement("i", {
|
|
1060
1083
|
className: "icon-close"
|
|
1061
|
-
})), /*#__PURE__*/React__default["default"].createElement("div",
|
|
1084
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1085
|
+
className: styles["modal-section"]
|
|
1086
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", null, select > 1 ? /*#__PURE__*/React__default["default"].createElement("h1", {
|
|
1062
1087
|
onClick: () => setSelect(select - 1)
|
|
1063
1088
|
}, "-") : null, data.map(elem => {
|
|
1064
1089
|
if (select == elem.id) {
|
|
@@ -1072,9 +1097,7 @@ const Modal = ({
|
|
|
1072
1097
|
onClick: () => {
|
|
1073
1098
|
setSelect(select + 1);
|
|
1074
1099
|
}
|
|
1075
|
-
}, "+") : null)
|
|
1076
|
-
className: styles["modal-section"]
|
|
1077
|
-
})) : null);
|
|
1100
|
+
}, "+") : null))) : null);
|
|
1078
1101
|
};
|
|
1079
1102
|
Modal.propTypes = {
|
|
1080
1103
|
setShow: PropTypes__default["default"].func,
|
package/package.json
CHANGED
|
@@ -2,6 +2,7 @@ import React, { useState } from "react";
|
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import styles from "./checkbox.module.css";
|
|
5
|
+
import { useEffect } from "react";
|
|
5
6
|
|
|
6
7
|
export const Checkbox = ({
|
|
7
8
|
disabled,
|
|
@@ -20,28 +21,32 @@ export const Checkbox = ({
|
|
|
20
21
|
const parseData = jsonData.length !== 0 ? JSON.parse(jsonData) : [];
|
|
21
22
|
const [data, setData] = useState(parseData);
|
|
22
23
|
|
|
23
|
-
const handleClick = (e) => {
|
|
24
|
-
onClick(e)
|
|
25
|
-
}
|
|
26
24
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
const parseData = jsonData.length !== 0 ? JSON.parse(jsonData) : [];
|
|
27
|
+
setData(parseData);
|
|
28
|
+
},[jsonData])
|
|
29
|
+
useEffect(()=>{
|
|
30
|
+
onChange ? onChange(data.filter(d => d.checked)) : '';
|
|
31
|
+
},[data])
|
|
32
|
+
|
|
33
|
+
const handleChange = e => {
|
|
34
|
+
let id;
|
|
35
|
+
data.forEach((value,key) => {
|
|
36
|
+
if (value[keyNames.value] === e.target.value){
|
|
37
|
+
id = key;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
let items = [...data];
|
|
42
|
+
let item = {...items[id]};
|
|
43
|
+
item.checked = !item.checked;
|
|
44
|
+
items[id] = item;
|
|
45
|
+
setData(items);
|
|
43
46
|
};
|
|
44
47
|
|
|
48
|
+
!keyNames ? keyNames = {id:'id',name:'name',value:'value', label: 'label'} : ''
|
|
49
|
+
|
|
45
50
|
return (
|
|
46
51
|
<>
|
|
47
52
|
{data.map((element) => {
|
|
@@ -52,17 +57,21 @@ export const Checkbox = ({
|
|
|
52
57
|
className={classProps}
|
|
53
58
|
disabled={disabled}
|
|
54
59
|
required={required}
|
|
55
|
-
value={value ? value :
|
|
56
|
-
name={name ? name :
|
|
60
|
+
value={keyNames.value ? element[keyNames.value] : ''}
|
|
61
|
+
name={keyNames.name ? element[keyNames.name] : ''}
|
|
62
|
+
id={keyNames.id ? element[keyNames.id] : ''}
|
|
57
63
|
onChange={handleChange}
|
|
58
|
-
onClick={
|
|
64
|
+
onClick={onClick ? onClick: ()=>{}}
|
|
59
65
|
{...props}
|
|
60
66
|
/>
|
|
61
67
|
<span className={styles["checkmark"]} />
|
|
62
|
-
{element.label ? (
|
|
63
|
-
<
|
|
64
|
-
{
|
|
65
|
-
|
|
68
|
+
{element[keyNames.label] ? (
|
|
69
|
+
<label
|
|
70
|
+
className={styles.labelCheckbox}
|
|
71
|
+
for={element[keyNames.id]}
|
|
72
|
+
>
|
|
73
|
+
{element[keyNames.label]}
|
|
74
|
+
</label>
|
|
66
75
|
) : (
|
|
67
76
|
""
|
|
68
77
|
)}
|
|
@@ -76,13 +85,13 @@ export const Checkbox = ({
|
|
|
76
85
|
Checkbox.propTypes = {
|
|
77
86
|
className: PropTypes.string,
|
|
78
87
|
onChange: PropTypes.func,
|
|
88
|
+
onClick: PropTypes.func,
|
|
79
89
|
required: PropTypes.bool,
|
|
80
90
|
disabled: PropTypes.bool,
|
|
81
91
|
name: PropTypes.string,
|
|
82
92
|
value: PropTypes.string,
|
|
83
93
|
jsonData: PropTypes.string,
|
|
84
94
|
label: PropTypes.string,
|
|
85
|
-
onClick: PropTypes.func,
|
|
86
95
|
keyNames: PropTypes.object,
|
|
87
96
|
};
|
|
88
97
|
|
|
@@ -77,8 +77,7 @@ export const File = ({
|
|
|
77
77
|
>
|
|
78
78
|
<div className={styles['delete-upload-file']}>
|
|
79
79
|
<div className={styles['delete-upload-icon']}>
|
|
80
|
-
|
|
81
|
-
<i className="icon-arrow"/>
|
|
80
|
+
<i className="icon-delete"/>
|
|
82
81
|
</div>
|
|
83
82
|
</div>
|
|
84
83
|
</div>
|
|
@@ -2,54 +2,84 @@ import React, { useState } from "react";
|
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import classnames from "classnames";
|
|
4
4
|
import styles from "./modal.module.css";
|
|
5
|
-
import Icon from
|
|
5
|
+
import Icon from "../icon/Icon";
|
|
6
|
+
import { Typography, TypographyType } from "../typography";
|
|
6
7
|
|
|
7
|
-
export const Modal = ({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
export const Modal = ({
|
|
9
|
+
setShow,
|
|
10
|
+
headerText,
|
|
11
|
+
className,
|
|
12
|
+
type,
|
|
13
|
+
data,
|
|
14
|
+
selected,
|
|
15
|
+
children,
|
|
16
|
+
}) => {
|
|
17
|
+
const classProps = classnames(styles.modal, className);
|
|
18
|
+
const [select, setSelect] = useState(selected);
|
|
19
|
+
return (
|
|
20
|
+
<div className={styles["modal-wrap"]}>
|
|
21
|
+
{type == "content" ? (
|
|
22
|
+
<div className={styles["modal-content"]}>
|
|
23
|
+
<div className={styles["modal-top"]}>
|
|
24
|
+
<div className={styles["modal-title"]}>
|
|
25
|
+
<Typography variant={TypographyType.h5}>{headerText}</Typography>
|
|
26
|
+
</div>
|
|
27
|
+
<div
|
|
28
|
+
className={styles["close-btn"]}
|
|
29
|
+
onClick={() => setShow(false)}
|
|
30
|
+
>
|
|
31
|
+
<i className="icon-close" />
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
<div className={styles["modal-section"]}>{children}</div>
|
|
35
|
+
</div>
|
|
36
|
+
) : type == "images" ? (
|
|
37
|
+
<div className={styles["modal-content"]}>
|
|
38
|
+
<div
|
|
39
|
+
className={styles["close-btn"]}
|
|
40
|
+
onClick={() => setShow(false)}
|
|
41
|
+
>
|
|
42
|
+
<i className="icon-close" />
|
|
43
|
+
</div>
|
|
12
44
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
</div>
|
|
45
|
-
);
|
|
45
|
+
<div className={styles["modal-section"]}>
|
|
46
|
+
<div>
|
|
47
|
+
{select > 1 ? (
|
|
48
|
+
<h1 onClick={() => setSelect(select - 1)}>-</h1>
|
|
49
|
+
) : null}
|
|
50
|
+
{data.map((elem) => {
|
|
51
|
+
if (select == elem.id) {
|
|
52
|
+
return (
|
|
53
|
+
<img
|
|
54
|
+
width="600px"
|
|
55
|
+
key={elem.id}
|
|
56
|
+
src={elem.url}
|
|
57
|
+
/>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
})}
|
|
61
|
+
{select < data.length ? (
|
|
62
|
+
<h1
|
|
63
|
+
onClick={() => {
|
|
64
|
+
setSelect(select + 1);
|
|
65
|
+
}}
|
|
66
|
+
>
|
|
67
|
+
+
|
|
68
|
+
</h1>
|
|
69
|
+
) : null}
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
) : null}
|
|
74
|
+
</div>
|
|
75
|
+
);
|
|
46
76
|
};
|
|
47
77
|
|
|
48
78
|
Modal.propTypes = {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
79
|
+
setShow: PropTypes.func,
|
|
80
|
+
headerText: PropTypes.string,
|
|
81
|
+
className: PropTypes.string,
|
|
82
|
+
type: PropTypes.string,
|
|
83
|
+
selected: PropTypes.string,
|
|
84
|
+
data: PropTypes.array,
|
|
55
85
|
};
|
|
@@ -3,15 +3,15 @@ import PropTypes from "prop-types";
|
|
|
3
3
|
import classnames from "classnames";
|
|
4
4
|
import styles from "./pagination.module.css";
|
|
5
5
|
import { PaginationRange, Dots } from "./paginationRange";
|
|
6
|
-
import Icon from
|
|
6
|
+
import Icon from "../icon/Icon";
|
|
7
7
|
|
|
8
8
|
export const Pagination = ({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
onChange,
|
|
10
|
+
totalCount,
|
|
11
|
+
siblingCount,
|
|
12
|
+
currentPage,
|
|
13
|
+
offset,
|
|
14
|
+
className,
|
|
15
15
|
}) => {
|
|
16
16
|
const [siblingCountNumber, setSibilingCountNumber] = useState(siblingCount);
|
|
17
17
|
const [currentPageNumber, setCurrentPage] = useState(currentPage);
|
|
@@ -25,9 +25,10 @@ export const Pagination = ({
|
|
|
25
25
|
useEffect(() => {
|
|
26
26
|
setCurrentPage(currentPage);
|
|
27
27
|
}, [currentPage]);
|
|
28
|
-
|
|
29
28
|
const onPageChange = (page) => {
|
|
29
|
+
if(page > 0){
|
|
30
30
|
setCurrentPage(page);
|
|
31
|
+
}
|
|
31
32
|
};
|
|
32
33
|
useEffect(() => {
|
|
33
34
|
onChange(currentPageNumber);
|
|
@@ -43,77 +44,131 @@ export const Pagination = ({
|
|
|
43
44
|
}
|
|
44
45
|
const classProps = classnames(styles.list, className ? className : styles["pagination-bar"]);
|
|
45
46
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
const onNext = () => {
|
|
48
|
+
onPageChange(currentPageNumber + 1);
|
|
49
|
+
};
|
|
49
50
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
const onPrevious = () => {
|
|
52
|
+
onPageChange(currentPageNumber - 1);
|
|
53
|
+
};
|
|
53
54
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
const onNextFive = () => {
|
|
56
|
+
currentPageNumber !== lastPage - 4
|
|
57
|
+
? onPageChange(currentPageNumber + 5)
|
|
58
|
+
: onPageChange(currentPageNumber + 4);
|
|
59
|
+
};
|
|
58
60
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
const onPreviousFive = (e) => {
|
|
62
|
+
currentPageNumber !== 5
|
|
63
|
+
? onPageChange(currentPageNumber - 5)
|
|
64
|
+
: onPageChange(currentPageNumber - 4);
|
|
65
|
+
};
|
|
64
66
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
let lastPage = paginationRange[paginationRange.length - 1];
|
|
68
|
+
return (
|
|
69
|
+
<ul className={classProps}>
|
|
70
|
+
<button
|
|
71
|
+
className={styles["pagination-btn"]}
|
|
72
|
+
onClick={onPrevious}
|
|
73
|
+
disabled={currentPage === 1 ? true : false}
|
|
74
|
+
>
|
|
75
|
+
{/* <Icon className="icon-arrow-back"/> */}
|
|
76
|
+
<i className="icon-arrow-back"></i>
|
|
77
|
+
</button>
|
|
72
78
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
79
|
+
{paginationRange.map((pageNumber, id) => {
|
|
80
|
+
if (pageNumber === Dots) {
|
|
81
|
+
let currentPageIndex = paginationRange.indexOf(currentPageNumber);
|
|
82
|
+
return (
|
|
83
|
+
<li
|
|
84
|
+
key={id}
|
|
85
|
+
className={classnames(
|
|
86
|
+
styles["pagination-jump-next"],
|
|
87
|
+
styles.listItem
|
|
88
|
+
)}
|
|
89
|
+
onClick={
|
|
90
|
+
id < currentPageIndex
|
|
91
|
+
? onPreviousFive
|
|
92
|
+
: onNextFive
|
|
93
|
+
}
|
|
94
|
+
disabled={currentPageIndex === 0 ? true : false}
|
|
95
|
+
>
|
|
96
|
+
{id < currentPageIndex ? (
|
|
97
|
+
<>
|
|
98
|
+
<span
|
|
99
|
+
className={
|
|
100
|
+
styles["pagination-jump-next-txt"]
|
|
101
|
+
}
|
|
102
|
+
>
|
|
103
|
+
<i className="icon-text" />
|
|
104
|
+
</span>
|
|
105
|
+
<span
|
|
106
|
+
className={
|
|
107
|
+
styles["pagination-jump-next-arrow"]
|
|
108
|
+
}
|
|
109
|
+
>
|
|
110
|
+
{/* <Icon className="icon-arrow-jump-next"/> */}
|
|
111
|
+
<i className="icon-arrow-jump-back"></i>
|
|
112
|
+
</span>
|
|
113
|
+
</>
|
|
114
|
+
) : (
|
|
115
|
+
<>
|
|
116
|
+
<span
|
|
117
|
+
className={
|
|
118
|
+
styles["pagination-jump-next-txt"]
|
|
119
|
+
}
|
|
120
|
+
>
|
|
121
|
+
<i className="icon-text" />
|
|
122
|
+
</span>
|
|
123
|
+
<span
|
|
124
|
+
className={
|
|
125
|
+
styles["pagination-jump-next-arrow"]
|
|
126
|
+
}
|
|
127
|
+
>
|
|
128
|
+
{/* <Icon className="icon-arrow-jump-next"/> */}
|
|
129
|
+
<i className="icon-arrow-jump-next"></i>
|
|
130
|
+
</span>
|
|
131
|
+
</>
|
|
132
|
+
)}
|
|
133
|
+
</li>
|
|
134
|
+
);
|
|
135
|
+
}
|
|
89
136
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
137
|
+
return (
|
|
138
|
+
<li
|
|
139
|
+
onClick={() => onPageChange(pageNumber)}
|
|
140
|
+
key={id}
|
|
141
|
+
className={classnames(
|
|
142
|
+
`${
|
|
143
|
+
pageNumber === currentPageNumber
|
|
144
|
+
? styles.selected
|
|
145
|
+
: styles.listItem
|
|
146
|
+
}`,
|
|
147
|
+
styles["pagination-item"]
|
|
148
|
+
)}
|
|
149
|
+
>
|
|
150
|
+
{pageNumber}
|
|
151
|
+
</li>
|
|
152
|
+
);
|
|
153
|
+
})}
|
|
154
|
+
<button
|
|
155
|
+
onClick={onNext}
|
|
156
|
+
className={styles["pagination-btn"]}
|
|
157
|
+
disabled={currentPageNumber === lastPage ? true : false}
|
|
158
|
+
>
|
|
159
|
+
{/* <Icon className='icon-arrow'/> */}
|
|
160
|
+
<i className="icon-arrow"></i>
|
|
161
|
+
</button>
|
|
162
|
+
</ul>
|
|
163
|
+
);
|
|
109
164
|
};
|
|
110
165
|
|
|
111
166
|
Pagination.propTypes = {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
167
|
+
offset: PropTypes.number,
|
|
168
|
+
totalCount: PropTypes.number,
|
|
169
|
+
className: PropTypes.string,
|
|
170
|
+
siblingCount: PropTypes.number,
|
|
171
|
+
currentPage: PropTypes.number,
|
|
117
172
|
};
|
|
118
173
|
|
|
119
174
|
Pagination.defaultProps = { offset: 2, siblingCount: 2 };
|
|
@@ -29,11 +29,11 @@ h4 {
|
|
|
29
29
|
h5 {
|
|
30
30
|
text-transform: uppercase;
|
|
31
31
|
font-size: 20px;
|
|
32
|
-
line-height:
|
|
32
|
+
line-height: 26px;
|
|
33
33
|
font-weight: 600;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
h6 {
|
|
37
37
|
text-transform: none;
|
|
38
38
|
font-size: 14px;
|
|
39
39
|
line-height: 20px;
|
|
@@ -44,7 +44,7 @@ p {
|
|
|
44
44
|
text-transform: none;
|
|
45
45
|
font-size: 16px;
|
|
46
46
|
line-height: 22px;
|
|
47
|
-
font-weight:
|
|
47
|
+
font-weight: 500;
|
|
48
48
|
color: #3C393E;
|
|
49
49
|
}
|
|
50
50
|
|