@xaypay/tui 0.0.66 → 0.0.68
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 +94 -53
- package/dist/index.js +94 -53
- package/package.json +1 -1
- package/src/assets/icons/dots.svg +3 -0
- package/src/assets/icons/nextarrow.svg +3 -0
- package/src/assets/pdf.svg +3 -0
- package/src/components/file/file.module.css +1 -1
- package/src/components/file/index.js +4 -4
- package/src/components/icon/Dots.js +19 -0
- package/src/components/icon/NextArrow.js +19 -0
- package/src/components/input/index.js +42 -30
- package/src/components/pagination/index.js +15 -10
- package/src/components/textarea/index.js +153 -0
- package/src/components/textarea/textarea.module.css +21 -0
- package/src/components/textarea/textarea.stories.js +49 -0
- package/src/stories/configuration.stories.mdx +30 -0
- package/src/stories/static/textarea-usage.png +0 -0
- package/src/stories/usage.stories.mdx +6 -1
- package/tui.config.js +25 -0
package/dist/index.es.js
CHANGED
|
@@ -32,13 +32,15 @@ function styleInject(css, ref) {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
var css_248z$d = ".file-module_file-form__l13d5{align-items:center;background:#fbfbfb;border:2px dashed;border-radius:6px;cursor:pointer;display:flex;flex-direction:column;height:190px;justify-content:space-between;overflow:hidden;padding:4px 0;position:relative;width:100%}.file-module_file-form-wrap__qY--B:before{background:rgba(60,57,62,.4);border-radius:6px;content:\"\";height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition:opacity .24s;width:100%;z-index:1}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover:before{opacity:1;pointer-events:unset}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover .file-module_delete-upload-icon__PWN66{opacity:1}.file-module_file-form-inner-upload__tq3Dn{align-items:center;display:flex;flex-direction:column;justify-content:space-between;padding-bottom:16px;padding-top:48px}.file-module_file-form-inner-upload__tq3Dn>img{display:block;margin-bottom:14px}.file-module_upload-info__a8GFs{margin-bottom:40px;max-width:150px;text-align:center}.file-module_upload-info-txt__l11uN{color:#0da574}.file-module_file-form__l13d5.file-module_default__t7KU0{border-color:#d1d1d1}.file-module_file-form__l13d5.file-module_error__H-M4Z{border-color:#e00!important}.file-module_file-form__l13d5.file-module_accept__WTW6V{border-color:#00236a}.file-module_delete-upload-icon__PWN66{align-items:center;background:#fff;border-radius:6px;cursor:pointer;display:flex;height:26px;justify-content:center;opacity:0;position:absolute;right:10px;top:10px;transition:opacity .24s;width:26px;z-index:11}.file-module_delete-upload-icon__PWN66>i{color:#00236a;font-size:16px}.file-module_upload-file-content__QHMjn{align-items:center;display:flex;height:100%;justify-content:center;max-height:190px;overflow:hidden;position:relative;width:100%}.file-module_upload-file-content__QHMjn>img{display:block;height:auto;max-height:95%;object-fit:contain;width:
|
|
35
|
+
var css_248z$d = ".file-module_file-form__l13d5{align-items:center;background:#fbfbfb;border:2px dashed;border-radius:6px;cursor:pointer;display:flex;flex-direction:column;height:190px;justify-content:space-between;overflow:hidden;padding:4px 0;position:relative;width:100%}.file-module_file-form-wrap__qY--B:before{background:rgba(60,57,62,.4);border-radius:6px;content:\"\";height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition:opacity .24s;width:100%;z-index:1}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover:before{opacity:1;pointer-events:unset}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover .file-module_delete-upload-icon__PWN66{opacity:1}.file-module_file-form-inner-upload__tq3Dn{align-items:center;display:flex;flex-direction:column;justify-content:space-between;padding-bottom:16px;padding-top:48px}.file-module_file-form-inner-upload__tq3Dn>img{display:block;margin-bottom:14px}.file-module_upload-info__a8GFs{margin-bottom:40px;max-width:150px;text-align:center}.file-module_upload-info-txt__l11uN{color:#0da574}.file-module_file-form__l13d5.file-module_default__t7KU0{border-color:#d1d1d1}.file-module_file-form__l13d5.file-module_error__H-M4Z{border-color:#e00!important}.file-module_file-form__l13d5.file-module_accept__WTW6V{border-color:#00236a}.file-module_delete-upload-icon__PWN66{align-items:center;background:#fff;border-radius:6px;cursor:pointer;display:flex;height:26px;justify-content:center;opacity:0;position:absolute;right:10px;top:10px;transition:opacity .24s;width:26px;z-index:11}.file-module_delete-upload-icon__PWN66>i{color:#00236a;font-size:16px}.file-module_upload-file-content__QHMjn{align-items:center;display:flex;height:100%;justify-content:center;max-height:190px;overflow:hidden;position:relative;width:100%}.file-module_upload-file-content__QHMjn>img{display:block;height:auto;max-height:95%;object-fit:contain;width:2.5rem}.file-module_file-form-title__zWTSB{margin-bottom:10px;max-width:390px;word-break:break-all}.file-module_file-form-wrap__qY--B{position:relative;transform:translateZ(0)}";
|
|
36
36
|
var styles$c = {"file-form-wrap":"file-module_file-form-wrap__qY--B","file-form":"file-module_file-form__l13d5","active":"file-module_active__L1gPt","delete-upload-icon":"file-module_delete-upload-icon__PWN66","file-form-inner-upload":"file-module_file-form-inner-upload__tq3Dn","upload-info":"file-module_upload-info__a8GFs","upload-info-txt":"file-module_upload-info-txt__l11uN","default":"file-module_default__t7KU0","error":"file-module_error__H-M4Z","accept":"file-module_accept__WTW6V","upload-file-content":"file-module_upload-file-content__QHMjn","file-form-title":"file-module_file-form-title__zWTSB"};
|
|
37
37
|
styleInject(css_248z$d);
|
|
38
38
|
|
|
39
39
|
var css_248z$c = "";
|
|
40
40
|
styleInject(css_248z$c);
|
|
41
41
|
|
|
42
|
+
var pdfImage = "<svg width=\"40\" height=\"52\" viewBox=\"0 0 40 52\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M39.1304 13.1106V36.2849V36.2853C39.394 36.4388 39.6133 36.6599 39.7659 36.9263C39.9189 37.1931 39.9992 37.4956 40 37.8037V47.5932C39.9984 48.7614 39.54 49.8816 38.7252 50.7079C37.91 51.5337 36.8048 51.9984 35.6522 52H4.34783C3.19523 51.9984 2.09005 51.5338 1.27483 50.7079C0.460015 49.8816 0.0015528 48.7614 0 47.5932V34.7817C0.000775155 34.4736 0.0815204 34.1714 0.234087 33.9051C0.386643 33.6383 0.605983 33.4176 0.869565 33.2641V3.52545C0.869565 2.5906 1.23602 1.69387 1.8882 1.03245C2.54072 0.371431 3.42547 0 4.34783 0H26.1953L39.1304 13.1106ZM13.872 45.3893C14.6037 45.4385 15.3293 45.2261 15.9225 44.7893C16.4303 44.3463 16.7036 43.6872 16.6605 43.0096C16.671 42.6272 16.598 42.2471 16.4478 41.8965C16.3154 41.6026 16.1136 41.3464 15.8597 41.1509C15.5976 40.9542 15.2991 40.8137 14.9816 40.7385C14.6225 40.6512 14.2541 40.6083 13.8849 40.6115H11.0258V48.4741H12.6849V45.3893H13.872ZM22.6954 47.4563C23.0149 47.1041 23.2498 46.6815 23.3814 46.2224C23.5347 45.6809 23.6084 45.1195 23.5999 44.5564C23.6065 44.008 23.5362 43.4614 23.3918 42.933C23.2672 42.477 23.0475 42.0532 22.7474 41.6904C22.4465 41.3379 22.0669 41.064 21.6398 40.8917C21.1305 40.6934 20.5882 40.5982 20.0432 40.6116H17.506V48.4821H20.0642C21.0475 48.5494 22.0103 48.1743 22.6954 47.4563ZM26.1252 42.05H29.4956L29.4956 40.6115H24.4661V48.4804L26.1287 48.4808V45.1068L28.6505 45.0962L28.64 43.6577H26.1252V42.05ZM18.3352 36.0407H37.3911L37.3908 14.3567H28.4428C27.5205 14.3567 26.6358 13.9852 25.9836 13.3238C25.331 12.6628 24.9646 11.7661 24.9646 10.8312V1.76186H4.34743C3.88625 1.76186 3.4437 1.94758 3.11762 2.27808C2.79153 2.60859 2.6083 3.05715 2.6083 3.52458V33.0185H14.9392C15.4408 33.0185 15.9179 33.238 16.2482 33.6205L18.3352 36.0407ZM6.08594 13.7151C6.08594 13.2283 6.48054 12.8337 6.9673 12.8337H20.6043C21.0911 12.8337 21.4857 13.2283 21.4857 13.7151C21.4857 14.2019 21.0911 14.5965 20.6043 14.5965H6.9673C6.48054 14.5965 6.08594 14.2019 6.08594 13.7151ZM18.5137 25.3369C18.5137 24.8502 18.9083 24.4556 19.395 24.4556H33.0321C33.5188 24.4556 33.9134 24.8502 33.9134 25.3369C33.9134 25.8237 33.5188 26.2183 33.0321 26.2183H19.395C18.9083 26.2183 18.5137 25.8237 18.5137 25.3369ZM6.9673 16.7056C6.48054 16.7056 6.08594 17.1002 6.08594 17.5869C6.08594 18.0737 6.48054 18.4683 6.9673 18.4683H33.0307C33.5174 18.4683 33.912 18.0737 33.912 17.5869C33.912 17.1002 33.5174 16.7056 33.0307 16.7056H6.9673ZM6.08594 21.4618C6.08594 20.975 6.48054 20.5804 6.9673 20.5804H33.0307C33.5174 20.5804 33.912 20.975 33.912 21.4618C33.912 21.9486 33.5174 22.3432 33.0307 22.3432H6.9673C6.48054 22.3432 6.08594 21.9486 6.08594 21.4618ZM21.4704 42.6691C21.1241 42.239 20.5919 42.0085 20.0457 42.0521H19.166V47.0441H20.0251C20.352 47.0567 20.6773 46.9886 20.9727 46.8469C21.213 46.7226 21.4156 46.5345 21.5589 46.3032C21.7076 46.0577 21.8089 45.7862 21.8582 45.5029C21.9164 45.1846 21.9455 44.8615 21.9451 44.5377C21.951 44.1698 21.9106 43.8023 21.8252 43.4446C21.758 43.1653 21.6373 42.9016 21.4704 42.6691ZM13.7445 42.0508C14.085 42.0213 14.4258 42.1008 14.7193 42.2782C14.8136 42.3518 14.8858 42.4501 14.9282 42.5627C14.9825 42.7134 15.0077 42.8731 15.0019 43.0333C15.0093 43.1969 14.9728 43.3594 14.8967 43.5039C14.8311 43.6211 14.7352 43.7175 14.6195 43.7832C14.4961 43.8525 14.361 43.8981 14.2212 43.9182C14.0636 43.9426 13.9041 43.9548 13.7445 43.9544H12.6855V42.0508H13.7445Z\" fill=\"#00236A\"/>\n</svg>";
|
|
43
|
+
|
|
42
44
|
const File = ({
|
|
43
45
|
name,
|
|
44
46
|
label,
|
|
@@ -52,8 +54,7 @@ const File = ({
|
|
|
52
54
|
fileExtensions,
|
|
53
55
|
...props
|
|
54
56
|
}) => {
|
|
55
|
-
const
|
|
56
|
-
const [image, setImage] = useState(defaultData ? defaultData.type != 'application/pdf' ? defaultData.url : pdfImageName : null);
|
|
57
|
+
const [image, setImage] = useState(defaultData ? defaultData.type != 'application/pdf' ? defaultData.url : pdfImage : null);
|
|
57
58
|
const [error, setError] = useState('');
|
|
58
59
|
const [fileName, setFileName] = useState('no selected file');
|
|
59
60
|
const handleCheckFile = e => {
|
|
@@ -66,7 +67,7 @@ const File = ({
|
|
|
66
67
|
onChange({
|
|
67
68
|
file
|
|
68
69
|
});
|
|
69
|
-
setImage(
|
|
70
|
+
setImage(pdfImage);
|
|
70
71
|
} else {
|
|
71
72
|
setError('');
|
|
72
73
|
onChange({
|
|
@@ -636,19 +637,32 @@ const Input = ({
|
|
|
636
637
|
`;
|
|
637
638
|
const handleChange = event => {
|
|
638
639
|
const currentValue = event.target.value;
|
|
639
|
-
if (onChange) {
|
|
640
|
-
currentValue.length > maxLength ? onChange(currentValue.substr(0, maxLength)) : onChange(currentValue);
|
|
641
|
-
}
|
|
642
640
|
setInnerValue(currentValue);
|
|
643
641
|
if (type === 'tel') {
|
|
644
|
-
|
|
642
|
+
if (currentValue.length > 8) {
|
|
643
|
+
setInnerValue(currentValue.substr(0, 8));
|
|
644
|
+
}
|
|
645
|
+
if (!phoneNumberRegex.test(currentValue) && telErrorMessage) {
|
|
646
|
+
setInnerErrorMessage(telErrorMessage);
|
|
647
|
+
} else {
|
|
648
|
+
setInnerErrorMessage('');
|
|
649
|
+
}
|
|
645
650
|
}
|
|
646
|
-
if (maxLength) {
|
|
647
|
-
|
|
651
|
+
if (maxLength && currentValue.length > maxLength && type !== 'tel') {
|
|
652
|
+
setInnerValue(currentValue.substr(0, maxLength));
|
|
648
653
|
}
|
|
649
|
-
if (regexp) {
|
|
654
|
+
if (regexp && regexpErrorMessage && !maxLength && type !== 'tel') {
|
|
650
655
|
!regexp.test(currentValue) ? setInnerErrorMessage(regexpErrorMessage) : setInnerErrorMessage('');
|
|
651
656
|
}
|
|
657
|
+
if (onChange) {
|
|
658
|
+
onChange(currentValue);
|
|
659
|
+
if (type === 'tel' && currentValue.length > 8) {
|
|
660
|
+
onChange(currentValue.substr(0, 8));
|
|
661
|
+
}
|
|
662
|
+
if (maxLength && currentValue.length > maxLength && type !== 'tel') {
|
|
663
|
+
onChange(currentValue.substr(0, maxLength));
|
|
664
|
+
}
|
|
665
|
+
}
|
|
652
666
|
};
|
|
653
667
|
const handleMouseEnter = () => {
|
|
654
668
|
setIsHover(true);
|
|
@@ -657,34 +671,31 @@ const Input = ({
|
|
|
657
671
|
setIsHover(false);
|
|
658
672
|
};
|
|
659
673
|
useEffect(() => {
|
|
660
|
-
if (value && value !==
|
|
674
|
+
if (value !== undefined && value !== null) {
|
|
661
675
|
setInnerValue(value);
|
|
662
676
|
if (type === 'tel') {
|
|
663
|
-
|
|
677
|
+
if (value.length > 8) {
|
|
678
|
+
setInnerValue(value.substr(0, 8));
|
|
679
|
+
}
|
|
680
|
+
if (!phoneNumberRegex.test(value) && telErrorMessage) {
|
|
681
|
+
setInnerErrorMessage(telErrorMessage);
|
|
682
|
+
} else {
|
|
683
|
+
setInnerErrorMessage('');
|
|
684
|
+
}
|
|
664
685
|
}
|
|
665
|
-
if (maxLength) {
|
|
666
|
-
|
|
686
|
+
if (maxLength && value.length > maxLength && type !== 'tel') {
|
|
687
|
+
setInnerValue(value.substr(0, maxLength));
|
|
667
688
|
}
|
|
668
|
-
if (regexp) {
|
|
689
|
+
if (regexp && regexpErrorMessage && !maxLength && type !== 'tel') {
|
|
669
690
|
!regexp.test(value) ? setInnerErrorMessage(regexpErrorMessage) : setInnerErrorMessage('');
|
|
670
691
|
}
|
|
671
692
|
}
|
|
672
|
-
}, [value]);
|
|
673
|
-
useEffect(() => {
|
|
674
693
|
if (errorMessage) {
|
|
675
694
|
setInnerErrorMessage(errorMessage);
|
|
695
|
+
} else {
|
|
696
|
+
setInnerErrorMessage('');
|
|
676
697
|
}
|
|
677
|
-
}, [errorMessage]);
|
|
678
|
-
useEffect(() => {
|
|
679
|
-
if (type === 'tel' && !telErrorMessage) {
|
|
680
|
-
alert('Please add telErrorMessage on input component');
|
|
681
|
-
}
|
|
682
|
-
}, [type]);
|
|
683
|
-
useEffect(() => {
|
|
684
|
-
if (regexp && !regexpErrorMessage) {
|
|
685
|
-
alert('Please add regexpErrorMessage prop on input component');
|
|
686
|
-
}
|
|
687
|
-
}, [regexp]);
|
|
698
|
+
}, [type, value, regexp, maxLength, errorMessage, regexpErrorMessage]);
|
|
688
699
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
689
700
|
className: `${styles$8["input-wrap"]}`
|
|
690
701
|
}, label ? /*#__PURE__*/React__default.createElement("label", {
|
|
@@ -1949,7 +1960,7 @@ styleInject(css_248z$1);
|
|
|
1949
1960
|
|
|
1950
1961
|
// import styles from "./pagination.module.scss";
|
|
1951
1962
|
|
|
1952
|
-
const Dots = "...";
|
|
1963
|
+
const Dots$1 = "...";
|
|
1953
1964
|
const range = (start, end) => {
|
|
1954
1965
|
const length = end - start + 1;
|
|
1955
1966
|
return Array.from({
|
|
@@ -1979,22 +1990,58 @@ const PaginationRange = ({
|
|
|
1979
1990
|
if (!shouldShowLeftDots && shouldShowRightDots) {
|
|
1980
1991
|
let leftItemCount = currentPageNumber === 4 && lastPageIndex > 7 ? 4 + siblingCountNumber : 3 + siblingCountNumber;
|
|
1981
1992
|
let leftRange = range(1, leftItemCount);
|
|
1982
|
-
return [...leftRange, Dots, totalPageCount];
|
|
1993
|
+
return [...leftRange, Dots$1, totalPageCount];
|
|
1983
1994
|
}
|
|
1984
1995
|
if (shouldShowLeftDots && !shouldShowRightDots) {
|
|
1985
1996
|
let rightItemCount = 0;
|
|
1986
1997
|
currentPageNumber === lastPageIndex - 3 && lastPageIndex > 7 ? rightItemCount = 4 + siblingCountNumber : rightItemCount = 3 + siblingCountNumber;
|
|
1987
1998
|
let rightRange = range(totalPageCount - rightItemCount + 1, totalPageCount);
|
|
1988
|
-
return [firstPageIndex, Dots, ...rightRange];
|
|
1999
|
+
return [firstPageIndex, Dots$1, ...rightRange];
|
|
1989
2000
|
}
|
|
1990
2001
|
if (shouldShowLeftDots && shouldShowRightDots) {
|
|
1991
2002
|
let middleRange = range(leftSiblingIndex, rightSiblingIndex);
|
|
1992
|
-
return [firstPageIndex, Dots, ...middleRange, Dots, lastPageIndex];
|
|
2003
|
+
return [firstPageIndex, Dots$1, ...middleRange, Dots$1, lastPageIndex];
|
|
1993
2004
|
}
|
|
1994
2005
|
}, [currentTotalCount, offset, siblingCountNumber, currentPageNumber]);
|
|
1995
2006
|
return paginationRange;
|
|
1996
2007
|
};
|
|
1997
2008
|
|
|
2009
|
+
const Dots = ({
|
|
2010
|
+
title,
|
|
2011
|
+
titleId,
|
|
2012
|
+
...props
|
|
2013
|
+
}) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
2014
|
+
width: "1em",
|
|
2015
|
+
height: "1em",
|
|
2016
|
+
viewBox: "0 0 11 3",
|
|
2017
|
+
fill: "none",
|
|
2018
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2019
|
+
"aria-labelledby": titleId
|
|
2020
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
2021
|
+
id: titleId
|
|
2022
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
2023
|
+
d: "M0.230125 1.13624C0.230125 0.741577 0.326125 0.464244 0.518125 0.304244C0.710125 0.144244 0.939458 0.064244 1.20613 0.064244C1.48346 0.064244 1.71813 0.144244 1.91013 0.304244C2.11279 0.464244 2.21413 0.741577 2.21413 1.13624C2.21413 1.52024 2.11279 1.79758 1.91013 1.96824C1.71813 2.13891 1.48346 2.22424 1.20613 2.22424C0.939458 2.22424 0.710125 2.13891 0.518125 1.96824C0.326125 1.79758 0.230125 1.52024 0.230125 1.13624ZM4.51138 1.13624C4.51138 0.741577 4.60738 0.464244 4.79938 0.304244C4.99138 0.144244 5.22071 0.064244 5.48738 0.064244C5.76471 0.064244 5.99938 0.144244 6.19138 0.304244C6.39404 0.464244 6.49538 0.741577 6.49538 1.13624C6.49538 1.52024 6.39404 1.79758 6.19138 1.96824C5.99938 2.13891 5.76471 2.22424 5.48738 2.22424C5.22071 2.22424 4.99138 2.13891 4.79938 1.96824C4.60738 1.79758 4.51138 1.52024 4.51138 1.13624ZM8.79263 1.13624C8.79263 0.741577 8.88863 0.464244 9.08063 0.304244C9.27263 0.144244 9.50196 0.064244 9.76863 0.064244C10.046 0.064244 10.2806 0.144244 10.4726 0.304244C10.6753 0.464244 10.7766 0.741577 10.7766 1.13624C10.7766 1.52024 10.6753 1.79758 10.4726 1.96824C10.2806 2.13891 10.046 2.22424 9.76863 2.22424C9.50196 2.22424 9.27263 2.13891 9.08063 1.96824C8.88863 1.79758 8.79263 1.52024 8.79263 1.13624Z",
|
|
2024
|
+
fill: "#3C393E"
|
|
2025
|
+
}));
|
|
2026
|
+
|
|
2027
|
+
const SvgNextArrow = ({
|
|
2028
|
+
title,
|
|
2029
|
+
titleId,
|
|
2030
|
+
...props
|
|
2031
|
+
}) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
2032
|
+
width: "1em",
|
|
2033
|
+
height: "1em",
|
|
2034
|
+
viewBox: "0 0 6 12",
|
|
2035
|
+
fill: "none",
|
|
2036
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2037
|
+
"aria-labelledby": titleId
|
|
2038
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
2039
|
+
id: titleId
|
|
2040
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
2041
|
+
d: "M0.851445 11.9985C0.652853 11.9988 0.460393 11.9292 0.307477 11.8017C0.221413 11.7299 0.150271 11.6418 0.0981246 11.5423C0.0459785 11.4428 0.0138536 11.3339 0.0035897 11.2219C-0.00667418 11.1098 0.00512483 10.9969 0.0383107 10.8895C0.0714965 10.7821 0.125416 10.6823 0.196984 10.5958L4.00476 6.01173L0.332976 1.41906C0.262375 1.33158 0.209651 1.23092 0.177836 1.12286C0.146021 1.01481 0.135741 0.901501 0.147589 0.789439C0.159437 0.677378 0.193177 0.568777 0.246871 0.469879C0.300566 0.370982 0.373156 0.283737 0.460468 0.213159C0.548409 0.135301 0.651394 0.0765731 0.76296 0.0406621C0.874526 0.00475112 0.992266 -0.00756759 1.10879 0.00447845C1.22531 0.0165245 1.3381 0.0526755 1.44008 0.110663C1.54206 0.16865 1.63102 0.247221 1.70139 0.341446L5.80665 5.47292C5.93166 5.62596 6 5.81791 6 6.01601C6 6.2141 5.93166 6.40606 5.80665 6.55909L1.5569 11.6906C1.47164 11.7941 1.36333 11.8759 1.24075 11.9294C1.11818 11.9829 0.984807 12.0065 0.851445 11.9985Z",
|
|
2042
|
+
fill: "#3C393E"
|
|
2043
|
+
}));
|
|
2044
|
+
|
|
1998
2045
|
const Pagination = ({
|
|
1999
2046
|
onChange,
|
|
2000
2047
|
totalCount,
|
|
@@ -2049,13 +2096,14 @@ const Pagination = ({
|
|
|
2049
2096
|
return /*#__PURE__*/React__default.createElement("ul", {
|
|
2050
2097
|
className: classProps
|
|
2051
2098
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
2099
|
+
style: {
|
|
2100
|
+
transform: 'rotate(180deg)'
|
|
2101
|
+
},
|
|
2052
2102
|
className: `${styles$1["pagination-btn"]} pagination-btn-rem`,
|
|
2053
2103
|
onClick: onPrevious,
|
|
2054
2104
|
disabled: currentPage === 1 ? true : false
|
|
2055
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
2056
|
-
|
|
2057
|
-
})), paginationRange.map((pageNumber, id) => {
|
|
2058
|
-
if (pageNumber === Dots) {
|
|
2105
|
+
}, /*#__PURE__*/React__default.createElement(SvgNextArrow, null)), paginationRange.map((pageNumber, id) => {
|
|
2106
|
+
if (pageNumber === Dots$1) {
|
|
2059
2107
|
let currentPageIndex = paginationRange.indexOf(currentPageNumber);
|
|
2060
2108
|
return /*#__PURE__*/React__default.createElement("li", {
|
|
2061
2109
|
key: id,
|
|
@@ -2064,21 +2112,16 @@ const Pagination = ({
|
|
|
2064
2112
|
disabled: currentPageIndex === 0 ? true : false
|
|
2065
2113
|
}, id < currentPageIndex ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("span", {
|
|
2066
2114
|
className: `${styles$1["pagination-jump-next-txt"]} pagination-jump-next-txt-rem`
|
|
2067
|
-
}, /*#__PURE__*/React__default.createElement("
|
|
2068
|
-
className: "
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
}))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("span", {
|
|
2115
|
+
}, /*#__PURE__*/React__default.createElement(Dots, null)), /*#__PURE__*/React__default.createElement("span", {
|
|
2116
|
+
className: `${styles$1["pagination-jump-next-arrow"]} pagination-jump-next-arrow-rem`,
|
|
2117
|
+
style: {
|
|
2118
|
+
transform: 'rotate(180deg)'
|
|
2119
|
+
}
|
|
2120
|
+
}, /*#__PURE__*/React__default.createElement(SvgNextArrow, null))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("span", {
|
|
2074
2121
|
className: `${styles$1["pagination-jump-next-txt"]} pagination-jump-next-txt-rem`
|
|
2075
|
-
}, /*#__PURE__*/React__default.createElement("
|
|
2076
|
-
className: "icon-text"
|
|
2077
|
-
})), /*#__PURE__*/React__default.createElement("span", {
|
|
2122
|
+
}, /*#__PURE__*/React__default.createElement(Dots, null)), /*#__PURE__*/React__default.createElement("span", {
|
|
2078
2123
|
className: `${styles$1["pagination-jump-next-arrow"]} pagination-jump-next-arrow-rem`
|
|
2079
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
2080
|
-
className: "icon-arrow-jump-next"
|
|
2081
|
-
}))));
|
|
2124
|
+
}, /*#__PURE__*/React__default.createElement(SvgNextArrow, null))));
|
|
2082
2125
|
}
|
|
2083
2126
|
return /*#__PURE__*/React__default.createElement("li", {
|
|
2084
2127
|
onClick: () => onPageChange(pageNumber),
|
|
@@ -2089,9 +2132,7 @@ const Pagination = ({
|
|
|
2089
2132
|
onClick: onNext,
|
|
2090
2133
|
className: `${styles$1["pagination-btn"]} pagination-btn-rem`,
|
|
2091
2134
|
disabled: currentPageNumber === lastPage ? true : false
|
|
2092
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
2093
|
-
className: "icon-arrow"
|
|
2094
|
-
})));
|
|
2135
|
+
}, /*#__PURE__*/React__default.createElement(SvgNextArrow, null)));
|
|
2095
2136
|
};
|
|
2096
2137
|
Pagination.propTypes = {
|
|
2097
2138
|
offset: PropTypes.number,
|
package/dist/index.js
CHANGED
|
@@ -62,13 +62,15 @@ function styleInject(css, ref) {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
var css_248z$d = ".file-module_file-form__l13d5{align-items:center;background:#fbfbfb;border:2px dashed;border-radius:6px;cursor:pointer;display:flex;flex-direction:column;height:190px;justify-content:space-between;overflow:hidden;padding:4px 0;position:relative;width:100%}.file-module_file-form-wrap__qY--B:before{background:rgba(60,57,62,.4);border-radius:6px;content:\"\";height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition:opacity .24s;width:100%;z-index:1}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover:before{opacity:1;pointer-events:unset}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover .file-module_delete-upload-icon__PWN66{opacity:1}.file-module_file-form-inner-upload__tq3Dn{align-items:center;display:flex;flex-direction:column;justify-content:space-between;padding-bottom:16px;padding-top:48px}.file-module_file-form-inner-upload__tq3Dn>img{display:block;margin-bottom:14px}.file-module_upload-info__a8GFs{margin-bottom:40px;max-width:150px;text-align:center}.file-module_upload-info-txt__l11uN{color:#0da574}.file-module_file-form__l13d5.file-module_default__t7KU0{border-color:#d1d1d1}.file-module_file-form__l13d5.file-module_error__H-M4Z{border-color:#e00!important}.file-module_file-form__l13d5.file-module_accept__WTW6V{border-color:#00236a}.file-module_delete-upload-icon__PWN66{align-items:center;background:#fff;border-radius:6px;cursor:pointer;display:flex;height:26px;justify-content:center;opacity:0;position:absolute;right:10px;top:10px;transition:opacity .24s;width:26px;z-index:11}.file-module_delete-upload-icon__PWN66>i{color:#00236a;font-size:16px}.file-module_upload-file-content__QHMjn{align-items:center;display:flex;height:100%;justify-content:center;max-height:190px;overflow:hidden;position:relative;width:100%}.file-module_upload-file-content__QHMjn>img{display:block;height:auto;max-height:95%;object-fit:contain;width:
|
|
65
|
+
var css_248z$d = ".file-module_file-form__l13d5{align-items:center;background:#fbfbfb;border:2px dashed;border-radius:6px;cursor:pointer;display:flex;flex-direction:column;height:190px;justify-content:space-between;overflow:hidden;padding:4px 0;position:relative;width:100%}.file-module_file-form-wrap__qY--B:before{background:rgba(60,57,62,.4);border-radius:6px;content:\"\";height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition:opacity .24s;width:100%;z-index:1}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover:before{opacity:1;pointer-events:unset}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover .file-module_delete-upload-icon__PWN66{opacity:1}.file-module_file-form-inner-upload__tq3Dn{align-items:center;display:flex;flex-direction:column;justify-content:space-between;padding-bottom:16px;padding-top:48px}.file-module_file-form-inner-upload__tq3Dn>img{display:block;margin-bottom:14px}.file-module_upload-info__a8GFs{margin-bottom:40px;max-width:150px;text-align:center}.file-module_upload-info-txt__l11uN{color:#0da574}.file-module_file-form__l13d5.file-module_default__t7KU0{border-color:#d1d1d1}.file-module_file-form__l13d5.file-module_error__H-M4Z{border-color:#e00!important}.file-module_file-form__l13d5.file-module_accept__WTW6V{border-color:#00236a}.file-module_delete-upload-icon__PWN66{align-items:center;background:#fff;border-radius:6px;cursor:pointer;display:flex;height:26px;justify-content:center;opacity:0;position:absolute;right:10px;top:10px;transition:opacity .24s;width:26px;z-index:11}.file-module_delete-upload-icon__PWN66>i{color:#00236a;font-size:16px}.file-module_upload-file-content__QHMjn{align-items:center;display:flex;height:100%;justify-content:center;max-height:190px;overflow:hidden;position:relative;width:100%}.file-module_upload-file-content__QHMjn>img{display:block;height:auto;max-height:95%;object-fit:contain;width:2.5rem}.file-module_file-form-title__zWTSB{margin-bottom:10px;max-width:390px;word-break:break-all}.file-module_file-form-wrap__qY--B{position:relative;transform:translateZ(0)}";
|
|
66
66
|
var styles$c = {"file-form-wrap":"file-module_file-form-wrap__qY--B","file-form":"file-module_file-form__l13d5","active":"file-module_active__L1gPt","delete-upload-icon":"file-module_delete-upload-icon__PWN66","file-form-inner-upload":"file-module_file-form-inner-upload__tq3Dn","upload-info":"file-module_upload-info__a8GFs","upload-info-txt":"file-module_upload-info-txt__l11uN","default":"file-module_default__t7KU0","error":"file-module_error__H-M4Z","accept":"file-module_accept__WTW6V","upload-file-content":"file-module_upload-file-content__QHMjn","file-form-title":"file-module_file-form-title__zWTSB"};
|
|
67
67
|
styleInject(css_248z$d);
|
|
68
68
|
|
|
69
69
|
var css_248z$c = "";
|
|
70
70
|
styleInject(css_248z$c);
|
|
71
71
|
|
|
72
|
+
var pdfImage = "<svg width=\"40\" height=\"52\" viewBox=\"0 0 40 52\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M39.1304 13.1106V36.2849V36.2853C39.394 36.4388 39.6133 36.6599 39.7659 36.9263C39.9189 37.1931 39.9992 37.4956 40 37.8037V47.5932C39.9984 48.7614 39.54 49.8816 38.7252 50.7079C37.91 51.5337 36.8048 51.9984 35.6522 52H4.34783C3.19523 51.9984 2.09005 51.5338 1.27483 50.7079C0.460015 49.8816 0.0015528 48.7614 0 47.5932V34.7817C0.000775155 34.4736 0.0815204 34.1714 0.234087 33.9051C0.386643 33.6383 0.605983 33.4176 0.869565 33.2641V3.52545C0.869565 2.5906 1.23602 1.69387 1.8882 1.03245C2.54072 0.371431 3.42547 0 4.34783 0H26.1953L39.1304 13.1106ZM13.872 45.3893C14.6037 45.4385 15.3293 45.2261 15.9225 44.7893C16.4303 44.3463 16.7036 43.6872 16.6605 43.0096C16.671 42.6272 16.598 42.2471 16.4478 41.8965C16.3154 41.6026 16.1136 41.3464 15.8597 41.1509C15.5976 40.9542 15.2991 40.8137 14.9816 40.7385C14.6225 40.6512 14.2541 40.6083 13.8849 40.6115H11.0258V48.4741H12.6849V45.3893H13.872ZM22.6954 47.4563C23.0149 47.1041 23.2498 46.6815 23.3814 46.2224C23.5347 45.6809 23.6084 45.1195 23.5999 44.5564C23.6065 44.008 23.5362 43.4614 23.3918 42.933C23.2672 42.477 23.0475 42.0532 22.7474 41.6904C22.4465 41.3379 22.0669 41.064 21.6398 40.8917C21.1305 40.6934 20.5882 40.5982 20.0432 40.6116H17.506V48.4821H20.0642C21.0475 48.5494 22.0103 48.1743 22.6954 47.4563ZM26.1252 42.05H29.4956L29.4956 40.6115H24.4661V48.4804L26.1287 48.4808V45.1068L28.6505 45.0962L28.64 43.6577H26.1252V42.05ZM18.3352 36.0407H37.3911L37.3908 14.3567H28.4428C27.5205 14.3567 26.6358 13.9852 25.9836 13.3238C25.331 12.6628 24.9646 11.7661 24.9646 10.8312V1.76186H4.34743C3.88625 1.76186 3.4437 1.94758 3.11762 2.27808C2.79153 2.60859 2.6083 3.05715 2.6083 3.52458V33.0185H14.9392C15.4408 33.0185 15.9179 33.238 16.2482 33.6205L18.3352 36.0407ZM6.08594 13.7151C6.08594 13.2283 6.48054 12.8337 6.9673 12.8337H20.6043C21.0911 12.8337 21.4857 13.2283 21.4857 13.7151C21.4857 14.2019 21.0911 14.5965 20.6043 14.5965H6.9673C6.48054 14.5965 6.08594 14.2019 6.08594 13.7151ZM18.5137 25.3369C18.5137 24.8502 18.9083 24.4556 19.395 24.4556H33.0321C33.5188 24.4556 33.9134 24.8502 33.9134 25.3369C33.9134 25.8237 33.5188 26.2183 33.0321 26.2183H19.395C18.9083 26.2183 18.5137 25.8237 18.5137 25.3369ZM6.9673 16.7056C6.48054 16.7056 6.08594 17.1002 6.08594 17.5869C6.08594 18.0737 6.48054 18.4683 6.9673 18.4683H33.0307C33.5174 18.4683 33.912 18.0737 33.912 17.5869C33.912 17.1002 33.5174 16.7056 33.0307 16.7056H6.9673ZM6.08594 21.4618C6.08594 20.975 6.48054 20.5804 6.9673 20.5804H33.0307C33.5174 20.5804 33.912 20.975 33.912 21.4618C33.912 21.9486 33.5174 22.3432 33.0307 22.3432H6.9673C6.48054 22.3432 6.08594 21.9486 6.08594 21.4618ZM21.4704 42.6691C21.1241 42.239 20.5919 42.0085 20.0457 42.0521H19.166V47.0441H20.0251C20.352 47.0567 20.6773 46.9886 20.9727 46.8469C21.213 46.7226 21.4156 46.5345 21.5589 46.3032C21.7076 46.0577 21.8089 45.7862 21.8582 45.5029C21.9164 45.1846 21.9455 44.8615 21.9451 44.5377C21.951 44.1698 21.9106 43.8023 21.8252 43.4446C21.758 43.1653 21.6373 42.9016 21.4704 42.6691ZM13.7445 42.0508C14.085 42.0213 14.4258 42.1008 14.7193 42.2782C14.8136 42.3518 14.8858 42.4501 14.9282 42.5627C14.9825 42.7134 15.0077 42.8731 15.0019 43.0333C15.0093 43.1969 14.9728 43.3594 14.8967 43.5039C14.8311 43.6211 14.7352 43.7175 14.6195 43.7832C14.4961 43.8525 14.361 43.8981 14.2212 43.9182C14.0636 43.9426 13.9041 43.9548 13.7445 43.9544H12.6855V42.0508H13.7445Z\" fill=\"#00236A\"/>\n</svg>";
|
|
73
|
+
|
|
72
74
|
const File = ({
|
|
73
75
|
name,
|
|
74
76
|
label,
|
|
@@ -82,8 +84,7 @@ const File = ({
|
|
|
82
84
|
fileExtensions,
|
|
83
85
|
...props
|
|
84
86
|
}) => {
|
|
85
|
-
const
|
|
86
|
-
const [image, setImage] = React.useState(defaultData ? defaultData.type != 'application/pdf' ? defaultData.url : pdfImageName : null);
|
|
87
|
+
const [image, setImage] = React.useState(defaultData ? defaultData.type != 'application/pdf' ? defaultData.url : pdfImage : null);
|
|
87
88
|
const [error, setError] = React.useState('');
|
|
88
89
|
const [fileName, setFileName] = React.useState('no selected file');
|
|
89
90
|
const handleCheckFile = e => {
|
|
@@ -96,7 +97,7 @@ const File = ({
|
|
|
96
97
|
onChange({
|
|
97
98
|
file
|
|
98
99
|
});
|
|
99
|
-
setImage(
|
|
100
|
+
setImage(pdfImage);
|
|
100
101
|
} else {
|
|
101
102
|
setError('');
|
|
102
103
|
onChange({
|
|
@@ -666,19 +667,32 @@ const Input = ({
|
|
|
666
667
|
`;
|
|
667
668
|
const handleChange = event => {
|
|
668
669
|
const currentValue = event.target.value;
|
|
669
|
-
if (onChange) {
|
|
670
|
-
currentValue.length > maxLength ? onChange(currentValue.substr(0, maxLength)) : onChange(currentValue);
|
|
671
|
-
}
|
|
672
670
|
setInnerValue(currentValue);
|
|
673
671
|
if (type === 'tel') {
|
|
674
|
-
|
|
672
|
+
if (currentValue.length > 8) {
|
|
673
|
+
setInnerValue(currentValue.substr(0, 8));
|
|
674
|
+
}
|
|
675
|
+
if (!phoneNumberRegex.test(currentValue) && telErrorMessage) {
|
|
676
|
+
setInnerErrorMessage(telErrorMessage);
|
|
677
|
+
} else {
|
|
678
|
+
setInnerErrorMessage('');
|
|
679
|
+
}
|
|
675
680
|
}
|
|
676
|
-
if (maxLength) {
|
|
677
|
-
|
|
681
|
+
if (maxLength && currentValue.length > maxLength && type !== 'tel') {
|
|
682
|
+
setInnerValue(currentValue.substr(0, maxLength));
|
|
678
683
|
}
|
|
679
|
-
if (regexp) {
|
|
684
|
+
if (regexp && regexpErrorMessage && !maxLength && type !== 'tel') {
|
|
680
685
|
!regexp.test(currentValue) ? setInnerErrorMessage(regexpErrorMessage) : setInnerErrorMessage('');
|
|
681
686
|
}
|
|
687
|
+
if (onChange) {
|
|
688
|
+
onChange(currentValue);
|
|
689
|
+
if (type === 'tel' && currentValue.length > 8) {
|
|
690
|
+
onChange(currentValue.substr(0, 8));
|
|
691
|
+
}
|
|
692
|
+
if (maxLength && currentValue.length > maxLength && type !== 'tel') {
|
|
693
|
+
onChange(currentValue.substr(0, maxLength));
|
|
694
|
+
}
|
|
695
|
+
}
|
|
682
696
|
};
|
|
683
697
|
const handleMouseEnter = () => {
|
|
684
698
|
setIsHover(true);
|
|
@@ -687,34 +701,31 @@ const Input = ({
|
|
|
687
701
|
setIsHover(false);
|
|
688
702
|
};
|
|
689
703
|
React.useEffect(() => {
|
|
690
|
-
if (value && value !==
|
|
704
|
+
if (value !== undefined && value !== null) {
|
|
691
705
|
setInnerValue(value);
|
|
692
706
|
if (type === 'tel') {
|
|
693
|
-
|
|
707
|
+
if (value.length > 8) {
|
|
708
|
+
setInnerValue(value.substr(0, 8));
|
|
709
|
+
}
|
|
710
|
+
if (!phoneNumberRegex.test(value) && telErrorMessage) {
|
|
711
|
+
setInnerErrorMessage(telErrorMessage);
|
|
712
|
+
} else {
|
|
713
|
+
setInnerErrorMessage('');
|
|
714
|
+
}
|
|
694
715
|
}
|
|
695
|
-
if (maxLength) {
|
|
696
|
-
|
|
716
|
+
if (maxLength && value.length > maxLength && type !== 'tel') {
|
|
717
|
+
setInnerValue(value.substr(0, maxLength));
|
|
697
718
|
}
|
|
698
|
-
if (regexp) {
|
|
719
|
+
if (regexp && regexpErrorMessage && !maxLength && type !== 'tel') {
|
|
699
720
|
!regexp.test(value) ? setInnerErrorMessage(regexpErrorMessage) : setInnerErrorMessage('');
|
|
700
721
|
}
|
|
701
722
|
}
|
|
702
|
-
}, [value]);
|
|
703
|
-
React.useEffect(() => {
|
|
704
723
|
if (errorMessage) {
|
|
705
724
|
setInnerErrorMessage(errorMessage);
|
|
725
|
+
} else {
|
|
726
|
+
setInnerErrorMessage('');
|
|
706
727
|
}
|
|
707
|
-
}, [errorMessage]);
|
|
708
|
-
React.useEffect(() => {
|
|
709
|
-
if (type === 'tel' && !telErrorMessage) {
|
|
710
|
-
alert('Please add telErrorMessage on input component');
|
|
711
|
-
}
|
|
712
|
-
}, [type]);
|
|
713
|
-
React.useEffect(() => {
|
|
714
|
-
if (regexp && !regexpErrorMessage) {
|
|
715
|
-
alert('Please add regexpErrorMessage prop on input component');
|
|
716
|
-
}
|
|
717
|
-
}, [regexp]);
|
|
728
|
+
}, [type, value, regexp, maxLength, errorMessage, regexpErrorMessage]);
|
|
718
729
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
719
730
|
className: `${styles$8["input-wrap"]}`
|
|
720
731
|
}, label ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
@@ -1979,7 +1990,7 @@ styleInject(css_248z$1);
|
|
|
1979
1990
|
|
|
1980
1991
|
// import styles from "./pagination.module.scss";
|
|
1981
1992
|
|
|
1982
|
-
const Dots = "...";
|
|
1993
|
+
const Dots$1 = "...";
|
|
1983
1994
|
const range = (start, end) => {
|
|
1984
1995
|
const length = end - start + 1;
|
|
1985
1996
|
return Array.from({
|
|
@@ -2009,22 +2020,58 @@ const PaginationRange = ({
|
|
|
2009
2020
|
if (!shouldShowLeftDots && shouldShowRightDots) {
|
|
2010
2021
|
let leftItemCount = currentPageNumber === 4 && lastPageIndex > 7 ? 4 + siblingCountNumber : 3 + siblingCountNumber;
|
|
2011
2022
|
let leftRange = range(1, leftItemCount);
|
|
2012
|
-
return [...leftRange, Dots, totalPageCount];
|
|
2023
|
+
return [...leftRange, Dots$1, totalPageCount];
|
|
2013
2024
|
}
|
|
2014
2025
|
if (shouldShowLeftDots && !shouldShowRightDots) {
|
|
2015
2026
|
let rightItemCount = 0;
|
|
2016
2027
|
currentPageNumber === lastPageIndex - 3 && lastPageIndex > 7 ? rightItemCount = 4 + siblingCountNumber : rightItemCount = 3 + siblingCountNumber;
|
|
2017
2028
|
let rightRange = range(totalPageCount - rightItemCount + 1, totalPageCount);
|
|
2018
|
-
return [firstPageIndex, Dots, ...rightRange];
|
|
2029
|
+
return [firstPageIndex, Dots$1, ...rightRange];
|
|
2019
2030
|
}
|
|
2020
2031
|
if (shouldShowLeftDots && shouldShowRightDots) {
|
|
2021
2032
|
let middleRange = range(leftSiblingIndex, rightSiblingIndex);
|
|
2022
|
-
return [firstPageIndex, Dots, ...middleRange, Dots, lastPageIndex];
|
|
2033
|
+
return [firstPageIndex, Dots$1, ...middleRange, Dots$1, lastPageIndex];
|
|
2023
2034
|
}
|
|
2024
2035
|
}, [currentTotalCount, offset, siblingCountNumber, currentPageNumber]);
|
|
2025
2036
|
return paginationRange;
|
|
2026
2037
|
};
|
|
2027
2038
|
|
|
2039
|
+
const Dots = ({
|
|
2040
|
+
title,
|
|
2041
|
+
titleId,
|
|
2042
|
+
...props
|
|
2043
|
+
}) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
2044
|
+
width: "1em",
|
|
2045
|
+
height: "1em",
|
|
2046
|
+
viewBox: "0 0 11 3",
|
|
2047
|
+
fill: "none",
|
|
2048
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2049
|
+
"aria-labelledby": titleId
|
|
2050
|
+
}, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
|
|
2051
|
+
id: titleId
|
|
2052
|
+
}, title) : null, /*#__PURE__*/React__namespace.createElement("path", {
|
|
2053
|
+
d: "M0.230125 1.13624C0.230125 0.741577 0.326125 0.464244 0.518125 0.304244C0.710125 0.144244 0.939458 0.064244 1.20613 0.064244C1.48346 0.064244 1.71813 0.144244 1.91013 0.304244C2.11279 0.464244 2.21413 0.741577 2.21413 1.13624C2.21413 1.52024 2.11279 1.79758 1.91013 1.96824C1.71813 2.13891 1.48346 2.22424 1.20613 2.22424C0.939458 2.22424 0.710125 2.13891 0.518125 1.96824C0.326125 1.79758 0.230125 1.52024 0.230125 1.13624ZM4.51138 1.13624C4.51138 0.741577 4.60738 0.464244 4.79938 0.304244C4.99138 0.144244 5.22071 0.064244 5.48738 0.064244C5.76471 0.064244 5.99938 0.144244 6.19138 0.304244C6.39404 0.464244 6.49538 0.741577 6.49538 1.13624C6.49538 1.52024 6.39404 1.79758 6.19138 1.96824C5.99938 2.13891 5.76471 2.22424 5.48738 2.22424C5.22071 2.22424 4.99138 2.13891 4.79938 1.96824C4.60738 1.79758 4.51138 1.52024 4.51138 1.13624ZM8.79263 1.13624C8.79263 0.741577 8.88863 0.464244 9.08063 0.304244C9.27263 0.144244 9.50196 0.064244 9.76863 0.064244C10.046 0.064244 10.2806 0.144244 10.4726 0.304244C10.6753 0.464244 10.7766 0.741577 10.7766 1.13624C10.7766 1.52024 10.6753 1.79758 10.4726 1.96824C10.2806 2.13891 10.046 2.22424 9.76863 2.22424C9.50196 2.22424 9.27263 2.13891 9.08063 1.96824C8.88863 1.79758 8.79263 1.52024 8.79263 1.13624Z",
|
|
2054
|
+
fill: "#3C393E"
|
|
2055
|
+
}));
|
|
2056
|
+
|
|
2057
|
+
const SvgNextArrow = ({
|
|
2058
|
+
title,
|
|
2059
|
+
titleId,
|
|
2060
|
+
...props
|
|
2061
|
+
}) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
2062
|
+
width: "1em",
|
|
2063
|
+
height: "1em",
|
|
2064
|
+
viewBox: "0 0 6 12",
|
|
2065
|
+
fill: "none",
|
|
2066
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2067
|
+
"aria-labelledby": titleId
|
|
2068
|
+
}, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
|
|
2069
|
+
id: titleId
|
|
2070
|
+
}, title) : null, /*#__PURE__*/React__namespace.createElement("path", {
|
|
2071
|
+
d: "M0.851445 11.9985C0.652853 11.9988 0.460393 11.9292 0.307477 11.8017C0.221413 11.7299 0.150271 11.6418 0.0981246 11.5423C0.0459785 11.4428 0.0138536 11.3339 0.0035897 11.2219C-0.00667418 11.1098 0.00512483 10.9969 0.0383107 10.8895C0.0714965 10.7821 0.125416 10.6823 0.196984 10.5958L4.00476 6.01173L0.332976 1.41906C0.262375 1.33158 0.209651 1.23092 0.177836 1.12286C0.146021 1.01481 0.135741 0.901501 0.147589 0.789439C0.159437 0.677378 0.193177 0.568777 0.246871 0.469879C0.300566 0.370982 0.373156 0.283737 0.460468 0.213159C0.548409 0.135301 0.651394 0.0765731 0.76296 0.0406621C0.874526 0.00475112 0.992266 -0.00756759 1.10879 0.00447845C1.22531 0.0165245 1.3381 0.0526755 1.44008 0.110663C1.54206 0.16865 1.63102 0.247221 1.70139 0.341446L5.80665 5.47292C5.93166 5.62596 6 5.81791 6 6.01601C6 6.2141 5.93166 6.40606 5.80665 6.55909L1.5569 11.6906C1.47164 11.7941 1.36333 11.8759 1.24075 11.9294C1.11818 11.9829 0.984807 12.0065 0.851445 11.9985Z",
|
|
2072
|
+
fill: "#3C393E"
|
|
2073
|
+
}));
|
|
2074
|
+
|
|
2028
2075
|
const Pagination = ({
|
|
2029
2076
|
onChange,
|
|
2030
2077
|
totalCount,
|
|
@@ -2079,13 +2126,14 @@ const Pagination = ({
|
|
|
2079
2126
|
return /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
2080
2127
|
className: classProps
|
|
2081
2128
|
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
2129
|
+
style: {
|
|
2130
|
+
transform: 'rotate(180deg)'
|
|
2131
|
+
},
|
|
2082
2132
|
className: `${styles$1["pagination-btn"]} pagination-btn-rem`,
|
|
2083
2133
|
onClick: onPrevious,
|
|
2084
2134
|
disabled: currentPage === 1 ? true : false
|
|
2085
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
2086
|
-
|
|
2087
|
-
})), paginationRange.map((pageNumber, id) => {
|
|
2088
|
-
if (pageNumber === Dots) {
|
|
2135
|
+
}, /*#__PURE__*/React__default["default"].createElement(SvgNextArrow, null)), paginationRange.map((pageNumber, id) => {
|
|
2136
|
+
if (pageNumber === Dots$1) {
|
|
2089
2137
|
let currentPageIndex = paginationRange.indexOf(currentPageNumber);
|
|
2090
2138
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
2091
2139
|
key: id,
|
|
@@ -2094,21 +2142,16 @@ const Pagination = ({
|
|
|
2094
2142
|
disabled: currentPageIndex === 0 ? true : false
|
|
2095
2143
|
}, id < currentPageIndex ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2096
2144
|
className: `${styles$1["pagination-jump-next-txt"]} pagination-jump-next-txt-rem`
|
|
2097
|
-
}, /*#__PURE__*/React__default["default"].createElement("
|
|
2098
|
-
className: "
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
}))) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2145
|
+
}, /*#__PURE__*/React__default["default"].createElement(Dots, null)), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2146
|
+
className: `${styles$1["pagination-jump-next-arrow"]} pagination-jump-next-arrow-rem`,
|
|
2147
|
+
style: {
|
|
2148
|
+
transform: 'rotate(180deg)'
|
|
2149
|
+
}
|
|
2150
|
+
}, /*#__PURE__*/React__default["default"].createElement(SvgNextArrow, null))) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2104
2151
|
className: `${styles$1["pagination-jump-next-txt"]} pagination-jump-next-txt-rem`
|
|
2105
|
-
}, /*#__PURE__*/React__default["default"].createElement("
|
|
2106
|
-
className: "icon-text"
|
|
2107
|
-
})), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2152
|
+
}, /*#__PURE__*/React__default["default"].createElement(Dots, null)), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2108
2153
|
className: `${styles$1["pagination-jump-next-arrow"]} pagination-jump-next-arrow-rem`
|
|
2109
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
2110
|
-
className: "icon-arrow-jump-next"
|
|
2111
|
-
}))));
|
|
2154
|
+
}, /*#__PURE__*/React__default["default"].createElement(SvgNextArrow, null))));
|
|
2112
2155
|
}
|
|
2113
2156
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
2114
2157
|
onClick: () => onPageChange(pageNumber),
|
|
@@ -2119,9 +2162,7 @@ const Pagination = ({
|
|
|
2119
2162
|
onClick: onNext,
|
|
2120
2163
|
className: `${styles$1["pagination-btn"]} pagination-btn-rem`,
|
|
2121
2164
|
disabled: currentPageNumber === lastPage ? true : false
|
|
2122
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
2123
|
-
className: "icon-arrow"
|
|
2124
|
-
})));
|
|
2165
|
+
}, /*#__PURE__*/React__default["default"].createElement(SvgNextArrow, null)));
|
|
2125
2166
|
};
|
|
2126
2167
|
Pagination.propTypes = {
|
|
2127
2168
|
offset: PropTypes__default["default"].number,
|
package/package.json
CHANGED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="11" height="3" viewBox="0 0 11 3" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M0.230125 1.13624C0.230125 0.741577 0.326125 0.464244 0.518125 0.304244C0.710125 0.144244 0.939458 0.064244 1.20613 0.064244C1.48346 0.064244 1.71813 0.144244 1.91013 0.304244C2.11279 0.464244 2.21413 0.741577 2.21413 1.13624C2.21413 1.52024 2.11279 1.79758 1.91013 1.96824C1.71813 2.13891 1.48346 2.22424 1.20613 2.22424C0.939458 2.22424 0.710125 2.13891 0.518125 1.96824C0.326125 1.79758 0.230125 1.52024 0.230125 1.13624ZM4.51138 1.13624C4.51138 0.741577 4.60738 0.464244 4.79938 0.304244C4.99138 0.144244 5.22071 0.064244 5.48738 0.064244C5.76471 0.064244 5.99938 0.144244 6.19138 0.304244C6.39404 0.464244 6.49538 0.741577 6.49538 1.13624C6.49538 1.52024 6.39404 1.79758 6.19138 1.96824C5.99938 2.13891 5.76471 2.22424 5.48738 2.22424C5.22071 2.22424 4.99138 2.13891 4.79938 1.96824C4.60738 1.79758 4.51138 1.52024 4.51138 1.13624ZM8.79263 1.13624C8.79263 0.741577 8.88863 0.464244 9.08063 0.304244C9.27263 0.144244 9.50196 0.064244 9.76863 0.064244C10.046 0.064244 10.2806 0.144244 10.4726 0.304244C10.6753 0.464244 10.7766 0.741577 10.7766 1.13624C10.7766 1.52024 10.6753 1.79758 10.4726 1.96824C10.2806 2.13891 10.046 2.22424 9.76863 2.22424C9.50196 2.22424 9.27263 2.13891 9.08063 1.96824C8.88863 1.79758 8.79263 1.52024 8.79263 1.13624Z" fill="#3C393E"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="6" height="12" viewBox="0 0 6 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M0.851445 11.9985C0.652853 11.9988 0.460393 11.9292 0.307477 11.8017C0.221413 11.7299 0.150271 11.6418 0.0981246 11.5423C0.0459785 11.4428 0.0138536 11.3339 0.0035897 11.2219C-0.00667418 11.1098 0.00512483 10.9969 0.0383107 10.8895C0.0714965 10.7821 0.125416 10.6823 0.196984 10.5958L4.00476 6.01173L0.332976 1.41906C0.262375 1.33158 0.209651 1.23092 0.177836 1.12286C0.146021 1.01481 0.135741 0.901501 0.147589 0.789439C0.159437 0.677378 0.193177 0.568777 0.246871 0.469879C0.300566 0.370982 0.373156 0.283737 0.460468 0.213159C0.548409 0.135301 0.651394 0.0765731 0.76296 0.0406621C0.874526 0.00475112 0.992266 -0.00756759 1.10879 0.00447845C1.22531 0.0165245 1.3381 0.0526755 1.44008 0.110663C1.54206 0.16865 1.63102 0.247221 1.70139 0.341446L5.80665 5.47292C5.93166 5.62596 6 5.81791 6 6.01601C6 6.2141 5.93166 6.40606 5.80665 6.55909L1.5569 11.6906C1.47164 11.7941 1.36333 11.8759 1.24075 11.9294C1.11818 11.9829 0.984807 12.0065 0.851445 11.9985Z" fill="#3C393E"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="40" height="52" viewBox="0 0 40 52" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M39.1304 13.1106V36.2849V36.2853C39.394 36.4388 39.6133 36.6599 39.7659 36.9263C39.9189 37.1931 39.9992 37.4956 40 37.8037V47.5932C39.9984 48.7614 39.54 49.8816 38.7252 50.7079C37.91 51.5337 36.8048 51.9984 35.6522 52H4.34783C3.19523 51.9984 2.09005 51.5338 1.27483 50.7079C0.460015 49.8816 0.0015528 48.7614 0 47.5932V34.7817C0.000775155 34.4736 0.0815204 34.1714 0.234087 33.9051C0.386643 33.6383 0.605983 33.4176 0.869565 33.2641V3.52545C0.869565 2.5906 1.23602 1.69387 1.8882 1.03245C2.54072 0.371431 3.42547 0 4.34783 0H26.1953L39.1304 13.1106ZM13.872 45.3893C14.6037 45.4385 15.3293 45.2261 15.9225 44.7893C16.4303 44.3463 16.7036 43.6872 16.6605 43.0096C16.671 42.6272 16.598 42.2471 16.4478 41.8965C16.3154 41.6026 16.1136 41.3464 15.8597 41.1509C15.5976 40.9542 15.2991 40.8137 14.9816 40.7385C14.6225 40.6512 14.2541 40.6083 13.8849 40.6115H11.0258V48.4741H12.6849V45.3893H13.872ZM22.6954 47.4563C23.0149 47.1041 23.2498 46.6815 23.3814 46.2224C23.5347 45.6809 23.6084 45.1195 23.5999 44.5564C23.6065 44.008 23.5362 43.4614 23.3918 42.933C23.2672 42.477 23.0475 42.0532 22.7474 41.6904C22.4465 41.3379 22.0669 41.064 21.6398 40.8917C21.1305 40.6934 20.5882 40.5982 20.0432 40.6116H17.506V48.4821H20.0642C21.0475 48.5494 22.0103 48.1743 22.6954 47.4563ZM26.1252 42.05H29.4956L29.4956 40.6115H24.4661V48.4804L26.1287 48.4808V45.1068L28.6505 45.0962L28.64 43.6577H26.1252V42.05ZM18.3352 36.0407H37.3911L37.3908 14.3567H28.4428C27.5205 14.3567 26.6358 13.9852 25.9836 13.3238C25.331 12.6628 24.9646 11.7661 24.9646 10.8312V1.76186H4.34743C3.88625 1.76186 3.4437 1.94758 3.11762 2.27808C2.79153 2.60859 2.6083 3.05715 2.6083 3.52458V33.0185H14.9392C15.4408 33.0185 15.9179 33.238 16.2482 33.6205L18.3352 36.0407ZM6.08594 13.7151C6.08594 13.2283 6.48054 12.8337 6.9673 12.8337H20.6043C21.0911 12.8337 21.4857 13.2283 21.4857 13.7151C21.4857 14.2019 21.0911 14.5965 20.6043 14.5965H6.9673C6.48054 14.5965 6.08594 14.2019 6.08594 13.7151ZM18.5137 25.3369C18.5137 24.8502 18.9083 24.4556 19.395 24.4556H33.0321C33.5188 24.4556 33.9134 24.8502 33.9134 25.3369C33.9134 25.8237 33.5188 26.2183 33.0321 26.2183H19.395C18.9083 26.2183 18.5137 25.8237 18.5137 25.3369ZM6.9673 16.7056C6.48054 16.7056 6.08594 17.1002 6.08594 17.5869C6.08594 18.0737 6.48054 18.4683 6.9673 18.4683H33.0307C33.5174 18.4683 33.912 18.0737 33.912 17.5869C33.912 17.1002 33.5174 16.7056 33.0307 16.7056H6.9673ZM6.08594 21.4618C6.08594 20.975 6.48054 20.5804 6.9673 20.5804H33.0307C33.5174 20.5804 33.912 20.975 33.912 21.4618C33.912 21.9486 33.5174 22.3432 33.0307 22.3432H6.9673C6.48054 22.3432 6.08594 21.9486 6.08594 21.4618ZM21.4704 42.6691C21.1241 42.239 20.5919 42.0085 20.0457 42.0521H19.166V47.0441H20.0251C20.352 47.0567 20.6773 46.9886 20.9727 46.8469C21.213 46.7226 21.4156 46.5345 21.5589 46.3032C21.7076 46.0577 21.8089 45.7862 21.8582 45.5029C21.9164 45.1846 21.9455 44.8615 21.9451 44.5377C21.951 44.1698 21.9106 43.8023 21.8252 43.4446C21.758 43.1653 21.6373 42.9016 21.4704 42.6691ZM13.7445 42.0508C14.085 42.0213 14.4258 42.1008 14.7193 42.2782C14.8136 42.3518 14.8858 42.4501 14.9282 42.5627C14.9825 42.7134 15.0077 42.8731 15.0019 43.0333C15.0093 43.1969 14.9728 43.3594 14.8967 43.5039C14.8311 43.6211 14.7352 43.7175 14.6195 43.7832C14.4961 43.8525 14.361 43.8981 14.2212 43.9182C14.0636 43.9426 13.9041 43.9548 13.7445 43.9544H12.6855V42.0508H13.7445Z" fill="#00236A"/>
|
|
3
|
+
</svg>
|
|
@@ -2,7 +2,8 @@ import React, { useState } from "react";
|
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import classnames from "classnames";
|
|
4
4
|
import styles from "./file.module.css";
|
|
5
|
-
import Icon from '../icon/Icon'
|
|
5
|
+
import Icon from '../icon/Icon';
|
|
6
|
+
import pdfImage from './../../assets/pdf.svg';
|
|
6
7
|
|
|
7
8
|
export const File = ({
|
|
8
9
|
name,
|
|
@@ -17,8 +18,7 @@ export const File = ({
|
|
|
17
18
|
fileExtensions,
|
|
18
19
|
...props
|
|
19
20
|
}) => {
|
|
20
|
-
const
|
|
21
|
-
const [image, setImage] = useState(defaultData ? defaultData.type != 'application/pdf' ? defaultData.url : pdfImageName : null);
|
|
21
|
+
const [image, setImage] = useState(defaultData ? defaultData.type != 'application/pdf' ? defaultData.url : pdfImage : null);
|
|
22
22
|
const [error, setError] = useState('');
|
|
23
23
|
const [fileName, setFileName] = useState('no selected file');
|
|
24
24
|
|
|
@@ -31,7 +31,7 @@ export const File = ({
|
|
|
31
31
|
if (file[0].type === 'application/pdf') {
|
|
32
32
|
setError('');
|
|
33
33
|
onChange({file});
|
|
34
|
-
setImage(
|
|
34
|
+
setImage(pdfImage);
|
|
35
35
|
} else {
|
|
36
36
|
setError('');
|
|
37
37
|
onChange({file});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
const Dots = ({ title, titleId, ...props }) => (
|
|
3
|
+
<svg
|
|
4
|
+
width="1em"
|
|
5
|
+
height="1em"
|
|
6
|
+
viewBox="0 0 11 3"
|
|
7
|
+
fill="none"
|
|
8
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
+
aria-labelledby={titleId}
|
|
10
|
+
{...props}
|
|
11
|
+
>
|
|
12
|
+
{title ? <title id={titleId}>{title}</title> : null}
|
|
13
|
+
<path
|
|
14
|
+
d="M0.230125 1.13624C0.230125 0.741577 0.326125 0.464244 0.518125 0.304244C0.710125 0.144244 0.939458 0.064244 1.20613 0.064244C1.48346 0.064244 1.71813 0.144244 1.91013 0.304244C2.11279 0.464244 2.21413 0.741577 2.21413 1.13624C2.21413 1.52024 2.11279 1.79758 1.91013 1.96824C1.71813 2.13891 1.48346 2.22424 1.20613 2.22424C0.939458 2.22424 0.710125 2.13891 0.518125 1.96824C0.326125 1.79758 0.230125 1.52024 0.230125 1.13624ZM4.51138 1.13624C4.51138 0.741577 4.60738 0.464244 4.79938 0.304244C4.99138 0.144244 5.22071 0.064244 5.48738 0.064244C5.76471 0.064244 5.99938 0.144244 6.19138 0.304244C6.39404 0.464244 6.49538 0.741577 6.49538 1.13624C6.49538 1.52024 6.39404 1.79758 6.19138 1.96824C5.99938 2.13891 5.76471 2.22424 5.48738 2.22424C5.22071 2.22424 4.99138 2.13891 4.79938 1.96824C4.60738 1.79758 4.51138 1.52024 4.51138 1.13624ZM8.79263 1.13624C8.79263 0.741577 8.88863 0.464244 9.08063 0.304244C9.27263 0.144244 9.50196 0.064244 9.76863 0.064244C10.046 0.064244 10.2806 0.144244 10.4726 0.304244C10.6753 0.464244 10.7766 0.741577 10.7766 1.13624C10.7766 1.52024 10.6753 1.79758 10.4726 1.96824C10.2806 2.13891 10.046 2.22424 9.76863 2.22424C9.50196 2.22424 9.27263 2.13891 9.08063 1.96824C8.88863 1.79758 8.79263 1.52024 8.79263 1.13624Z"
|
|
15
|
+
fill="#3C393E"
|
|
16
|
+
/>
|
|
17
|
+
</svg>
|
|
18
|
+
);
|
|
19
|
+
export default Dots;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
const SvgNextArrow = ({ title, titleId, ...props }) => (
|
|
3
|
+
<svg
|
|
4
|
+
width="1em"
|
|
5
|
+
height="1em"
|
|
6
|
+
viewBox="0 0 6 12"
|
|
7
|
+
fill="none"
|
|
8
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
+
aria-labelledby={titleId}
|
|
10
|
+
{...props}
|
|
11
|
+
>
|
|
12
|
+
{title ? <title id={titleId}>{title}</title> : null}
|
|
13
|
+
<path
|
|
14
|
+
d="M0.851445 11.9985C0.652853 11.9988 0.460393 11.9292 0.307477 11.8017C0.221413 11.7299 0.150271 11.6418 0.0981246 11.5423C0.0459785 11.4428 0.0138536 11.3339 0.0035897 11.2219C-0.00667418 11.1098 0.00512483 10.9969 0.0383107 10.8895C0.0714965 10.7821 0.125416 10.6823 0.196984 10.5958L4.00476 6.01173L0.332976 1.41906C0.262375 1.33158 0.209651 1.23092 0.177836 1.12286C0.146021 1.01481 0.135741 0.901501 0.147589 0.789439C0.159437 0.677378 0.193177 0.568777 0.246871 0.469879C0.300566 0.370982 0.373156 0.283737 0.460468 0.213159C0.548409 0.135301 0.651394 0.0765731 0.76296 0.0406621C0.874526 0.00475112 0.992266 -0.00756759 1.10879 0.00447845C1.22531 0.0165245 1.3381 0.0526755 1.44008 0.110663C1.54206 0.16865 1.63102 0.247221 1.70139 0.341446L5.80665 5.47292C5.93166 5.62596 6 5.81791 6 6.01601C6 6.2141 5.93166 6.40606 5.80665 6.55909L1.5569 11.6906C1.47164 11.7941 1.36333 11.8759 1.24075 11.9294C1.11818 11.9829 0.984807 12.0065 0.851445 11.9985Z"
|
|
15
|
+
fill="#3C393E"
|
|
16
|
+
/>
|
|
17
|
+
</svg>
|
|
18
|
+
);
|
|
19
|
+
export default SvgNextArrow;
|
|
@@ -97,21 +97,37 @@ export const Input = ({
|
|
|
97
97
|
|
|
98
98
|
const handleChange = (event) => {
|
|
99
99
|
const currentValue = event.target.value;
|
|
100
|
-
if (onChange) {
|
|
101
|
-
currentValue.length > maxLength ? onChange(currentValue.substr(0, maxLength)) : onChange(currentValue);
|
|
102
|
-
}
|
|
103
100
|
|
|
104
101
|
setInnerValue(currentValue);
|
|
105
102
|
if (type === 'tel') {
|
|
106
|
-
|
|
103
|
+
if (currentValue.length > 8) {
|
|
104
|
+
setInnerValue(currentValue.substr(0, 8));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (!phoneNumberRegex.test(currentValue) && telErrorMessage) {
|
|
108
|
+
setInnerErrorMessage(telErrorMessage);
|
|
109
|
+
} else {
|
|
110
|
+
setInnerErrorMessage('');
|
|
111
|
+
}
|
|
107
112
|
}
|
|
108
113
|
|
|
109
|
-
if (maxLength) {
|
|
110
|
-
|
|
114
|
+
if (maxLength && currentValue.length > maxLength && type !== 'tel') {
|
|
115
|
+
setInnerValue(currentValue.substr(0, maxLength));
|
|
111
116
|
}
|
|
112
117
|
|
|
113
|
-
if (regexp) {
|
|
114
|
-
!regexp.test(currentValue) ? setInnerErrorMessage(regexpErrorMessage) : setInnerErrorMessage('')
|
|
118
|
+
if (regexp && regexpErrorMessage && !maxLength && type !== 'tel') {
|
|
119
|
+
!regexp.test(currentValue) ? setInnerErrorMessage(regexpErrorMessage) : setInnerErrorMessage('')
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (onChange) {
|
|
123
|
+
onChange(currentValue);
|
|
124
|
+
if (type === 'tel' && currentValue.length > 8) {
|
|
125
|
+
onChange(currentValue.substr(0, 8));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (maxLength && currentValue.length > maxLength && type !== 'tel') {
|
|
129
|
+
onChange(currentValue.substr(0, maxLength));
|
|
130
|
+
}
|
|
115
131
|
}
|
|
116
132
|
};
|
|
117
133
|
|
|
@@ -124,39 +140,35 @@ export const Input = ({
|
|
|
124
140
|
};
|
|
125
141
|
|
|
126
142
|
useEffect(() => {
|
|
127
|
-
if (value && value !==
|
|
143
|
+
if (value !== undefined && value !== null) {
|
|
128
144
|
setInnerValue(value);
|
|
129
145
|
if (type === 'tel') {
|
|
130
|
-
|
|
131
|
-
|
|
146
|
+
if (value.length > 8) {
|
|
147
|
+
setInnerValue(value.substr(0, 8));
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
if (!phoneNumberRegex.test(value) && telErrorMessage) {
|
|
151
|
+
setInnerErrorMessage(telErrorMessage);
|
|
152
|
+
} else {
|
|
153
|
+
setInnerErrorMessage('');
|
|
154
|
+
}
|
|
155
|
+
}
|
|
132
156
|
|
|
133
|
-
if (maxLength) {
|
|
134
|
-
|
|
157
|
+
if (maxLength && value.length > maxLength && type !== 'tel') {
|
|
158
|
+
setInnerValue(value.substr(0, maxLength));
|
|
135
159
|
}
|
|
136
160
|
|
|
137
|
-
if (regexp) {
|
|
138
|
-
!regexp.test(value) ? setInnerErrorMessage(regexpErrorMessage) : setInnerErrorMessage('')
|
|
161
|
+
if (regexp && regexpErrorMessage && !maxLength && type !== 'tel') {
|
|
162
|
+
!regexp.test(value) ? setInnerErrorMessage(regexpErrorMessage) : setInnerErrorMessage('')
|
|
139
163
|
}
|
|
140
164
|
}
|
|
141
|
-
}, [value]);
|
|
142
165
|
|
|
143
|
-
useEffect(() => {
|
|
144
166
|
if (errorMessage) {
|
|
145
167
|
setInnerErrorMessage(errorMessage);
|
|
168
|
+
} else {
|
|
169
|
+
setInnerErrorMessage('');
|
|
146
170
|
}
|
|
147
|
-
}, [errorMessage]);
|
|
148
|
-
|
|
149
|
-
useEffect(() => {
|
|
150
|
-
if (type === 'tel' && !telErrorMessage) {
|
|
151
|
-
alert('Please add telErrorMessage on input component');
|
|
152
|
-
}
|
|
153
|
-
}, [type]);
|
|
154
|
-
|
|
155
|
-
useEffect(() => {
|
|
156
|
-
if (regexp && !regexpErrorMessage) {
|
|
157
|
-
alert('Please add regexpErrorMessage prop on input component');
|
|
158
|
-
}
|
|
159
|
-
}, [regexp]);
|
|
171
|
+
}, [type, value, regexp, maxLength, errorMessage, regexpErrorMessage]);
|
|
160
172
|
|
|
161
173
|
return (
|
|
162
174
|
<div className={`${styles["input-wrap"]}`}>
|
|
@@ -5,6 +5,9 @@ import styles from "./pagination.module.css";
|
|
|
5
5
|
import { PaginationRange, Dots } from "./paginationRange";
|
|
6
6
|
import Icon from "../icon/Icon";
|
|
7
7
|
|
|
8
|
+
import DotsIcon from './../../components/icon/Dots';
|
|
9
|
+
import SvgNextArrow from './../../components/icon/NextArrow';
|
|
10
|
+
|
|
8
11
|
export const Pagination = ({
|
|
9
12
|
onChange,
|
|
10
13
|
totalCount,
|
|
@@ -68,12 +71,14 @@ export const Pagination = ({
|
|
|
68
71
|
return (
|
|
69
72
|
<ul className={classProps}>
|
|
70
73
|
<button
|
|
74
|
+
style={{
|
|
75
|
+
transform: 'rotate(180deg)'
|
|
76
|
+
}}
|
|
71
77
|
className={`${styles["pagination-btn"]} pagination-btn-rem`}
|
|
72
78
|
onClick={onPrevious}
|
|
73
79
|
disabled={currentPage === 1 ? true : false}
|
|
74
80
|
>
|
|
75
|
-
|
|
76
|
-
<i className="icon-arrow-back"></i>
|
|
81
|
+
<SvgNextArrow />
|
|
77
82
|
</button>
|
|
78
83
|
|
|
79
84
|
{paginationRange.map((pageNumber, id) => {
|
|
@@ -100,15 +105,17 @@ export const Pagination = ({
|
|
|
100
105
|
`${styles["pagination-jump-next-txt"]} pagination-jump-next-txt-rem`
|
|
101
106
|
}
|
|
102
107
|
>
|
|
103
|
-
<
|
|
108
|
+
<DotsIcon />
|
|
104
109
|
</span>
|
|
105
110
|
<span
|
|
106
111
|
className={
|
|
107
112
|
`${styles["pagination-jump-next-arrow"]} pagination-jump-next-arrow-rem`
|
|
108
113
|
}
|
|
114
|
+
style={{
|
|
115
|
+
transform: 'rotate(180deg)'
|
|
116
|
+
}}
|
|
109
117
|
>
|
|
110
|
-
|
|
111
|
-
<i className="icon-arrow-jump-back"></i>
|
|
118
|
+
<SvgNextArrow />
|
|
112
119
|
</span>
|
|
113
120
|
</>
|
|
114
121
|
) : (
|
|
@@ -118,15 +125,14 @@ export const Pagination = ({
|
|
|
118
125
|
`${styles["pagination-jump-next-txt"]} pagination-jump-next-txt-rem`
|
|
119
126
|
}
|
|
120
127
|
>
|
|
121
|
-
<
|
|
128
|
+
<DotsIcon />
|
|
122
129
|
</span>
|
|
123
130
|
<span
|
|
124
131
|
className={
|
|
125
132
|
`${styles["pagination-jump-next-arrow"]} pagination-jump-next-arrow-rem`
|
|
126
133
|
}
|
|
127
134
|
>
|
|
128
|
-
|
|
129
|
-
<i className="icon-arrow-jump-next"></i>
|
|
135
|
+
<SvgNextArrow />
|
|
130
136
|
</span>
|
|
131
137
|
</>
|
|
132
138
|
)}
|
|
@@ -156,8 +162,7 @@ export const Pagination = ({
|
|
|
156
162
|
className={`${styles["pagination-btn"]} pagination-btn-rem`}
|
|
157
163
|
disabled={currentPageNumber === lastPage ? true : false}
|
|
158
164
|
>
|
|
159
|
-
|
|
160
|
-
<i className="icon-arrow"></i>
|
|
165
|
+
<SvgNextArrow />
|
|
161
166
|
</button>
|
|
162
167
|
</ul>
|
|
163
168
|
);
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
|
|
4
|
+
import { compereConfigs } from "./../../utils";
|
|
5
|
+
|
|
6
|
+
import './textarea.module.css';
|
|
7
|
+
|
|
8
|
+
export const Textarea = ({
|
|
9
|
+
size,
|
|
10
|
+
label,
|
|
11
|
+
width,
|
|
12
|
+
value,
|
|
13
|
+
height,
|
|
14
|
+
resize,
|
|
15
|
+
border,
|
|
16
|
+
radius,
|
|
17
|
+
padding,
|
|
18
|
+
required,
|
|
19
|
+
onChange,
|
|
20
|
+
minWidth,
|
|
21
|
+
maxWidth,
|
|
22
|
+
minHeight,
|
|
23
|
+
maxHeight,
|
|
24
|
+
boxSizing,
|
|
25
|
+
maxLength,
|
|
26
|
+
labelSize,
|
|
27
|
+
labelColor,
|
|
28
|
+
borderColor,
|
|
29
|
+
labelWeight,
|
|
30
|
+
placeholder,
|
|
31
|
+
labelDisplay,
|
|
32
|
+
backgroundColor,
|
|
33
|
+
borderFocusColor,
|
|
34
|
+
borderHoverColor,
|
|
35
|
+
labelRequiredColor
|
|
36
|
+
}) => {
|
|
37
|
+
const [isHover, setIsHover] = useState(false);
|
|
38
|
+
const [isFocus, setIsFocus] = useState(false);
|
|
39
|
+
|
|
40
|
+
const configStyles = compereConfigs();
|
|
41
|
+
|
|
42
|
+
const handleMouseEnter = () => {
|
|
43
|
+
setIsHover(true);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const handleMouseLeave = () => {
|
|
47
|
+
setIsHover(false);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const handleFocus = () => {
|
|
51
|
+
setIsFocus(true);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const handleBlur = () => {
|
|
55
|
+
setIsFocus(false);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
if (value === undefined) {
|
|
60
|
+
alert('Please add value prop on Textarea component');
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (!onChange) {
|
|
64
|
+
alert('Please add onChange function on Textarea component');
|
|
65
|
+
}
|
|
66
|
+
}, [value, onChange]);
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<>
|
|
70
|
+
{
|
|
71
|
+
label
|
|
72
|
+
? <label
|
|
73
|
+
style={{
|
|
74
|
+
color: labelColor ? labelColor : configStyles.TEXTAREA.labelColor,
|
|
75
|
+
fontSize: labelSize ? labelSize : configStyles.TEXTAREA.labelSize,
|
|
76
|
+
display: labelDisplay ? labelDisplay : configStyles.TEXTAREA.labelDisplay,
|
|
77
|
+
fontWeight: labelWeight ? labelWeight : configStyles.TEXTAREA.labelWeight
|
|
78
|
+
}}
|
|
79
|
+
>
|
|
80
|
+
{label}
|
|
81
|
+
{
|
|
82
|
+
required &&
|
|
83
|
+
<sup style={{color: labelRequiredColor ? labelRequiredColor : configStyles.TEXTAREA.labelRequiredColor}}>*</sup>
|
|
84
|
+
}
|
|
85
|
+
</label>
|
|
86
|
+
: ''
|
|
87
|
+
}
|
|
88
|
+
<textarea
|
|
89
|
+
style={{
|
|
90
|
+
outline: 'none',
|
|
91
|
+
overflow: 'auto',
|
|
92
|
+
fontSize: size ? size : configStyles.TEXTAREA.size,
|
|
93
|
+
width: width ? width : configStyles.TEXTAREA.width,
|
|
94
|
+
height: height ? height : configStyles.TEXTAREA.height,
|
|
95
|
+
border: border ? border : configStyles.TEXTAREA.border,
|
|
96
|
+
padding: padding ? padding : configStyles.TEXTAREA.padding,
|
|
97
|
+
borderRadius: radius ? radius : configStyles.TEXTAREA.radius,
|
|
98
|
+
minWidth: minWidth ? minWidth : configStyles.TEXTAREA.minWidth,
|
|
99
|
+
maxWidth: maxWidth ? maxWidth : configStyles.TEXTAREA.maxWidth,
|
|
100
|
+
minHeight: minHeight ? minHeight : configStyles.TEXTAREA.minHeight,
|
|
101
|
+
maxHeight: maxHeight ? maxHeight : configStyles.TEXTAREA.maxHeight,
|
|
102
|
+
boxSizing: boxSizing ? boxSizing : configStyles.TEXTAREA.boxSizing,
|
|
103
|
+
backgroundColor: backgroundColor ? backgroundColor : configStyles.TEXTAREA.backgroundColor,
|
|
104
|
+
borderColor: isFocus ? borderFocusColor ? borderFocusColor : configStyles.TEXTAREA.borderFocusColor :
|
|
105
|
+
isHover ? borderHoverColor ? borderHoverColor : configStyles.TEXTAREA.borderHoverColor :
|
|
106
|
+
borderColor ? borderColor : configStyles.TEXTAREA.borderColor,
|
|
107
|
+
resize: resize ? resize : configStyles.TEXTAREA.resize,
|
|
108
|
+
}}
|
|
109
|
+
onBlur={handleBlur}
|
|
110
|
+
onChange={onChange}
|
|
111
|
+
onFocus={handleFocus}
|
|
112
|
+
placeholder={placeholder}
|
|
113
|
+
onMouseEnter={handleMouseEnter}
|
|
114
|
+
onMouseLeave={handleMouseLeave}
|
|
115
|
+
value={
|
|
116
|
+
maxLength ? value.length > maxLength ? value.substr(0, maxLength) : value :
|
|
117
|
+
configStyles.TEXTAREA.maxLength ? value.length > configStyles.TEXTAREA.maxLength ? value.substr(0, configStyles.TEXTAREA.maxLength) : value :
|
|
118
|
+
value
|
|
119
|
+
}
|
|
120
|
+
></textarea>
|
|
121
|
+
</>
|
|
122
|
+
);
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
Textarea.propTypes = {
|
|
126
|
+
size: PropTypes.string,
|
|
127
|
+
label: PropTypes.string,
|
|
128
|
+
width: PropTypes.string,
|
|
129
|
+
height: PropTypes.string,
|
|
130
|
+
resize: PropTypes.string,
|
|
131
|
+
border: PropTypes.string,
|
|
132
|
+
radius: PropTypes.string,
|
|
133
|
+
required: PropTypes.bool,
|
|
134
|
+
padding: PropTypes.string,
|
|
135
|
+
minWidth: PropTypes.string,
|
|
136
|
+
maxWidth: PropTypes.string,
|
|
137
|
+
boxSizing: PropTypes.string,
|
|
138
|
+
minHeight: PropTypes.string,
|
|
139
|
+
maxHeight: PropTypes.string,
|
|
140
|
+
maxLength: PropTypes.number,
|
|
141
|
+
labelSize: PropTypes.string,
|
|
142
|
+
labelColor: PropTypes.string,
|
|
143
|
+
labelWeight: PropTypes.string,
|
|
144
|
+
borderColor: PropTypes.string,
|
|
145
|
+
placeholder: PropTypes.string,
|
|
146
|
+
labelDisplay: PropTypes.string,
|
|
147
|
+
backgroundColor: PropTypes.string,
|
|
148
|
+
value: PropTypes.string.isRequired,
|
|
149
|
+
borderFocusColor: PropTypes.string,
|
|
150
|
+
borderHoverColor: PropTypes.string,
|
|
151
|
+
onChange: PropTypes.func.isRequired,
|
|
152
|
+
labelRequiredColor: PropTypes.string
|
|
153
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
textarea::-webkit-scrollbar {
|
|
2
|
+
width: 6px;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
textarea::-webkit-scrollbar-track {
|
|
6
|
+
background: #EEEEEE;
|
|
7
|
+
border-radius: 3px;
|
|
8
|
+
-webkit-border-radius: 3px;
|
|
9
|
+
-moz-border-radius: 3px;
|
|
10
|
+
-ms-border-radius: 3px;
|
|
11
|
+
-o-border-radius: 3px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
textarea::-webkit-scrollbar-thumb {
|
|
15
|
+
background: #D1D1D1;
|
|
16
|
+
border-radius: 3px;
|
|
17
|
+
-webkit-border-radius: 3px;
|
|
18
|
+
-moz-border-radius: 3px;
|
|
19
|
+
-ms-border-radius: 3px;
|
|
20
|
+
-o-border-radius: 3px;
|
|
21
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Textarea } from '.';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
Comment: Textarea,
|
|
6
|
+
title: 'Components/Textarea'
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const Template = (args) => {
|
|
10
|
+
const [val, setVal] = useState('');
|
|
11
|
+
|
|
12
|
+
const handleChangeValue = (e) => {
|
|
13
|
+
setVal(e.target.value);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<Textarea value={val} onChange={handleChangeValue} {...args} />
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const Default = Template.bind({});
|
|
22
|
+
Default.args = {
|
|
23
|
+
label: 'Label for textarea',
|
|
24
|
+
required: true,
|
|
25
|
+
size: '16px',
|
|
26
|
+
radius: '6px',
|
|
27
|
+
width: '400px',
|
|
28
|
+
noResize: false,
|
|
29
|
+
height: '134px',
|
|
30
|
+
maxLength: 1500,
|
|
31
|
+
color: '#3C393E',
|
|
32
|
+
minWidth: '200px',
|
|
33
|
+
maxWidth: '500px',
|
|
34
|
+
labelSize: '16px',
|
|
35
|
+
resize: 'vertical',
|
|
36
|
+
minHeight: '100px',
|
|
37
|
+
maxHeight: '300px',
|
|
38
|
+
border: '2px solid',
|
|
39
|
+
padding: '12px 15px',
|
|
40
|
+
labelColor: '#3C393E',
|
|
41
|
+
labelWeight: 'normal',
|
|
42
|
+
labelDisplay: 'block',
|
|
43
|
+
borderColor: '#D1D1D1',
|
|
44
|
+
boxSizing: 'border-box',
|
|
45
|
+
backgroundColor: 'white',
|
|
46
|
+
borderHoverColor: '#3C393E',
|
|
47
|
+
borderFocusColor: '#00236A',
|
|
48
|
+
labelRequiredColor: '#ee0000',
|
|
49
|
+
}
|
|
@@ -403,3 +403,33 @@ import StackAlt from './assets/stackalt.svg';
|
|
|
403
403
|
});
|
|
404
404
|
}
|
|
405
405
|
```
|
|
406
|
+
|
|
407
|
+
### Textarea
|
|
408
|
+
|
|
409
|
+
```
|
|
410
|
+
{
|
|
411
|
+
size: '16px', // for font size
|
|
412
|
+
radius: '6px', // for border radius
|
|
413
|
+
width: '400px', // for width
|
|
414
|
+
resize: 'none', // for resize
|
|
415
|
+
height: '134px', // for height
|
|
416
|
+
maxLength: 1500, // for characters maximum count
|
|
417
|
+
color: '#3C393E', // for color
|
|
418
|
+
minWidth: '200px', // for minimum width
|
|
419
|
+
maxWidth: '500px', // for maximum width
|
|
420
|
+
labelSize: '16px', // for label font size
|
|
421
|
+
minHeight: '100px', // for minimum height
|
|
422
|
+
maxHeight: '300px', // for maximum height
|
|
423
|
+
border: '2px solid', // for border
|
|
424
|
+
padding: '12px 15px', // for padding
|
|
425
|
+
labelColor: '#3C393E', // for label color
|
|
426
|
+
labelWeight: 'normal', // for label font weight
|
|
427
|
+
labelDisplay: 'block', // for label display
|
|
428
|
+
borderColor: '#D1D1D1', // for border color
|
|
429
|
+
boxSizing: 'border-box', // for box sizing
|
|
430
|
+
backgroundColor: 'white', // for background color
|
|
431
|
+
borderHoverColor: '#3C393E', // for border color when hover action is happaning
|
|
432
|
+
borderFocusColor: '#00236A', // for boredr color when focus action is happaning
|
|
433
|
+
labelRequiredColor: '#ee0000', // for label required mark color
|
|
434
|
+
}
|
|
435
|
+
```
|
|
Binary file
|
|
@@ -12,7 +12,8 @@ import buttonImage from './static/button-usage.png';
|
|
|
12
12
|
import selectImage from './static/select-usage.png';
|
|
13
13
|
import inputTooltipImage from './static/input-tooltip-usage.png';
|
|
14
14
|
import toasterImage from './static/toaster-container-usage.png';
|
|
15
|
-
import toastImage from './static/toaster-usage.png'
|
|
15
|
+
import toastImage from './static/toaster-usage.png';
|
|
16
|
+
import textareaImage from './static/textarea-usage.png';
|
|
16
17
|
|
|
17
18
|
<Meta title="Intro/Usage" />
|
|
18
19
|
|
|
@@ -145,3 +146,7 @@ import toastImage from './static/toaster-usage.png'
|
|
|
145
146
|
|
|
146
147
|
#### createToast function usage
|
|
147
148
|
<img src={toastImage} alt="toaster image" />
|
|
149
|
+
|
|
150
|
+
### Textarea
|
|
151
|
+
|
|
152
|
+
<img src={textareaImage} alt="textarea image" />
|
package/tui.config.js
CHANGED
|
@@ -225,5 +225,30 @@ module.exports = {
|
|
|
225
225
|
optionItemBoxSizing: 'border-box', // for option box sizing
|
|
226
226
|
optionItemBackgroudColor: '#ffffff', // for option background color
|
|
227
227
|
optionItemBackgroudColorHover: 'unset', // for option background color ( when hover )
|
|
228
|
+
},
|
|
229
|
+
// default properties for <Textarea /> component
|
|
230
|
+
TEXTAREA: {
|
|
231
|
+
size: '16px',
|
|
232
|
+
radius: '6px',
|
|
233
|
+
width: '400px',
|
|
234
|
+
height: '134px',
|
|
235
|
+
color: '#3C393E',
|
|
236
|
+
minWidth: '200px',
|
|
237
|
+
maxWidth: '500px',
|
|
238
|
+
labelSize: '16px',
|
|
239
|
+
resize: 'vertical',
|
|
240
|
+
minHeight: '100px',
|
|
241
|
+
maxHeight: '300px',
|
|
242
|
+
border: '2px solid',
|
|
243
|
+
padding: '12px 15px',
|
|
244
|
+
labelColor: '#3C393E',
|
|
245
|
+
labelWeight: 'normal',
|
|
246
|
+
labelDisplay: 'block',
|
|
247
|
+
borderColor: '#D1D1D1',
|
|
248
|
+
boxSizing: 'border-box',
|
|
249
|
+
backgroundColor: 'white',
|
|
250
|
+
borderHoverColor: '#3C393E',
|
|
251
|
+
borderFocusColor: '#00236A',
|
|
252
|
+
labelRequiredColor: '#ee0000',
|
|
228
253
|
}
|
|
229
254
|
};
|