@xaypay/tui 0.0.69 → 0.0.70
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 +595 -166
- package/dist/index.js +596 -166
- package/package.json +1 -1
- package/src/assets/icons/range-arrow-default.svg +19 -0
- package/src/assets/icons/range-arrow-error.svg +19 -0
- package/src/assets/icons/range-arrow-success.svg +19 -0
- package/src/components/captcha/captcha.module.css +61 -62
- package/src/components/captcha/captcha.stories.js +5 -4
- package/src/components/captcha/index.js +143 -56
- package/src/components/file/file.module.css +1 -1
- package/src/components/file/index.js +8 -5
- package/src/components/icon/CaptchaArrowDown.js +19 -0
- package/src/components/icon/CaptchaArrowUp.js +19 -0
- package/src/components/icon/PDF.js +19 -0
- package/src/components/icon/index.js +15 -10
- package/src/components/newAutocomplete/NewAutocomplete.stories.js +50 -0
- package/src/components/newAutocomplete/index.js +407 -0
- package/src/index.js +2 -1
- package/src/stories/configuration.stories.mdx +86 -0
- package/src/stories/static/captcha-usage.png +0 -0
- package/src/stories/static/new-autocomplete-usage.png +0 -0
- package/src/stories/usage.stories.mdx +10 -3
- package/tui.config.js +98 -22
- package/src/components/captcha/blue.png +0 -0
- package/src/components/captcha/green.png +0 -0
- package/src/components/captcha/red.png +0 -0
package/dist/index.es.js
CHANGED
|
@@ -5,6 +5,39 @@ import classnames from 'classnames';
|
|
|
5
5
|
import styled, { keyframes, css } from 'styled-components';
|
|
6
6
|
import ReactDOM from 'react-dom';
|
|
7
7
|
|
|
8
|
+
function _extends() {
|
|
9
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
10
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
11
|
+
var source = arguments[i];
|
|
12
|
+
for (var key in source) {
|
|
13
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
14
|
+
target[key] = source[key];
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
return _extends.apply(this, arguments);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const SvgPdf = ({
|
|
24
|
+
title,
|
|
25
|
+
titleId,
|
|
26
|
+
...props
|
|
27
|
+
}) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
28
|
+
width: "40",
|
|
29
|
+
height: "52",
|
|
30
|
+
viewBox: "0 0 40 52",
|
|
31
|
+
fill: "none",
|
|
32
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
33
|
+
"aria-labelledby": titleId
|
|
34
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
35
|
+
id: titleId
|
|
36
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
37
|
+
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",
|
|
38
|
+
fill: "#00236A"
|
|
39
|
+
}));
|
|
40
|
+
|
|
8
41
|
function styleInject(css, ref) {
|
|
9
42
|
if ( ref === void 0 ) ref = {};
|
|
10
43
|
var insertAt = ref.insertAt;
|
|
@@ -32,15 +65,10 @@ function styleInject(css, ref) {
|
|
|
32
65
|
}
|
|
33
66
|
}
|
|
34
67
|
|
|
35
|
-
var css_248z$e = ".file-module_file-form__l13d5{align-items:center;background:#fbfbfb;border:2px dashed;border-radius:6px;cursor:pointer;display:flex;flex-direction:column;height:190px;justify-content:space-between;overflow:hidden;padding:4px 0;position:relative;width:100%}.file-module_file-form-wrap__qY--B:before{background:rgba(60,57,62,.4);border-radius:6px;content:\"\";height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition:opacity .24s;width:100%;z-index:1}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover:before{opacity:1;pointer-events:unset}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover .file-module_delete-upload-icon__PWN66{opacity:1}.file-module_file-form-inner-upload__tq3Dn{align-items:center;display:flex;flex-direction:column;justify-content:space-between;padding-bottom:16px;padding-top:48px}.file-module_file-form-inner-upload__tq3Dn>img{display:block;margin-bottom:14px}.file-module_upload-info__a8GFs{margin-bottom:40px;max-width:150px;text-align:center}.file-module_upload-info-txt__l11uN{color:#0da574}.file-module_file-form__l13d5.file-module_default__t7KU0{border-color:#d1d1d1}.file-module_file-form__l13d5.file-module_error__H-M4Z{border-color:#e00!important}.file-module_file-form__l13d5.file-module_accept__WTW6V{border-color:#00236a}.file-module_delete-upload-icon__PWN66{align-items:center;background:#fff;border-radius:6px;cursor:pointer;display:flex;height:26px;justify-content:center;opacity:0;position:absolute;right:10px;top:10px;transition:opacity .24s;width:26px;z-index:11}.file-module_delete-upload-icon__PWN66>i{color:#00236a;font-size:16px}.file-module_upload-file-content__QHMjn{align-items:center;display:flex;height:100%;justify-content:center;max-height:190px;overflow:hidden;position:relative;width:100%}.file-module_upload-file-content__QHMjn>img{display:block;height:auto;max-height:95%;object-fit:contain;width:
|
|
68
|
+
var css_248z$e = ".file-module_file-form__l13d5{align-items:center;background:#fbfbfb;border:2px dashed;border-radius:6px;cursor:pointer;display:flex;flex-direction:column;height:190px;justify-content:space-between;overflow:hidden;padding:4px 0;position:relative;width:100%}.file-module_file-form-wrap__qY--B:before{background:rgba(60,57,62,.4);border-radius:6px;content:\"\";height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition:opacity .24s;width:100%;z-index:1}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover:before{opacity:1;pointer-events:unset}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover .file-module_delete-upload-icon__PWN66{opacity:1}.file-module_file-form-inner-upload__tq3Dn{align-items:center;display:flex;flex-direction:column;justify-content:space-between;padding-bottom:16px;padding-top:48px}.file-module_file-form-inner-upload__tq3Dn>img{display:block;margin-bottom:14px}.file-module_upload-info__a8GFs{margin-bottom:40px;max-width:150px;text-align:center}.file-module_upload-info-txt__l11uN{color:#0da574}.file-module_file-form__l13d5.file-module_default__t7KU0{border-color:#d1d1d1}.file-module_file-form__l13d5.file-module_error__H-M4Z{border-color:#e00!important}.file-module_file-form__l13d5.file-module_accept__WTW6V{border-color:#00236a}.file-module_delete-upload-icon__PWN66{align-items:center;background:#fff;border-radius:6px;cursor:pointer;display:flex;height:26px;justify-content:center;opacity:0;position:absolute;right:10px;top:10px;transition:opacity .24s;width:26px;z-index:11}.file-module_delete-upload-icon__PWN66>i{color:#00236a;font-size:16px}.file-module_upload-file-content__QHMjn{align-items:center;display:flex;height:100%;justify-content:center;max-height:190px;overflow:hidden;position:relative;width:100%}.file-module_upload-file-content__QHMjn>img{display:block;height:auto;max-height:95%;object-fit:contain;width:27.8rem}.file-module_file-form-title__zWTSB{margin-bottom:10px;max-width:390px;word-break:break-all}.file-module_file-form-wrap__qY--B{position:relative;transform:translateZ(0)}";
|
|
36
69
|
var styles$c = {"file-form-wrap":"file-module_file-form-wrap__qY--B","file-form":"file-module_file-form__l13d5","active":"file-module_active__L1gPt","delete-upload-icon":"file-module_delete-upload-icon__PWN66","file-form-inner-upload":"file-module_file-form-inner-upload__tq3Dn","upload-info":"file-module_upload-info__a8GFs","upload-info-txt":"file-module_upload-info-txt__l11uN","default":"file-module_default__t7KU0","error":"file-module_error__H-M4Z","accept":"file-module_accept__WTW6V","upload-file-content":"file-module_upload-file-content__QHMjn","file-form-title":"file-module_file-form-title__zWTSB"};
|
|
37
70
|
styleInject(css_248z$e);
|
|
38
71
|
|
|
39
|
-
var css_248z$d = "";
|
|
40
|
-
styleInject(css_248z$d);
|
|
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
|
-
|
|
44
72
|
const File = ({
|
|
45
73
|
name,
|
|
46
74
|
label,
|
|
@@ -54,9 +82,9 @@ const File = ({
|
|
|
54
82
|
fileExtensions,
|
|
55
83
|
...props
|
|
56
84
|
}) => {
|
|
57
|
-
const [image, setImage] = useState(defaultData ? defaultData.type != 'application/pdf' ? defaultData.url : pdfImage : null);
|
|
58
85
|
const [error, setError] = useState('');
|
|
59
86
|
const [fileName, setFileName] = useState('no selected file');
|
|
87
|
+
const [image, setImage] = useState(defaultData ? defaultData.type != 'application/pdf' ? defaultData.url : 'pdf' : null);
|
|
60
88
|
const handleCheckFile = e => {
|
|
61
89
|
const file = e.target.files;
|
|
62
90
|
if (file[0]) {
|
|
@@ -67,7 +95,7 @@ const File = ({
|
|
|
67
95
|
onChange({
|
|
68
96
|
file
|
|
69
97
|
});
|
|
70
|
-
setImage(
|
|
98
|
+
setImage('pdf');
|
|
71
99
|
} else {
|
|
72
100
|
setError('');
|
|
73
101
|
onChange({
|
|
@@ -120,7 +148,7 @@ const File = ({
|
|
|
120
148
|
onChange: e => handleCheckFile(e)
|
|
121
149
|
}), image ? /*#__PURE__*/React__default.createElement("div", {
|
|
122
150
|
className: `${styles$c['upload-file-content']} upload-file-content-rem`
|
|
123
|
-
}, /*#__PURE__*/React__default.createElement("img", {
|
|
151
|
+
}, image === 'pdf' ? /*#__PURE__*/React__default.createElement(SvgPdf, null) : /*#__PURE__*/React__default.createElement("img", {
|
|
124
152
|
src: image,
|
|
125
153
|
alt: fileName
|
|
126
154
|
})) : /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -162,28 +190,13 @@ File.defaultProps = {
|
|
|
162
190
|
fileExtensions: ['jpg', 'jpeg', 'png', 'pdf']
|
|
163
191
|
};
|
|
164
192
|
|
|
165
|
-
var css_248z$
|
|
193
|
+
var css_248z$d = ".table-module_table-wrap__KKAnM{background:#fff;border-radius:14px 14px 0 0;box-shadow:0 10px 30px rgba(0,35,106,.06);overflow:hidden;width:100%}.table-module_table-wrap__KKAnM:not(:first-child){margin-top:30px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:first-child,.table-module_table-top__tfEKM .table-module_table-items__UpFg2:first-child{flex:0 0 auto;width:60px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(2),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(2){flex:0 0 auto;width:120px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(3),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(3){flex:0 0 auto;width:170px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(4),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(4){flex:0 0 auto;width:126px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(5),.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(6),.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(8),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(5),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(6),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(8){flex:0 0 auto;width:100px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:last-child,.table-module_table-top__tfEKM .table-module_table-items__UpFg2:last-child{flex:0 0 auto;width:104px}.table-module_table-top__tfEKM{background:#00236a;height:44px;width:100%}.table-module_table-top__tfEKM .table-module_table-items__UpFg2{align-items:center;color:#fff;display:flex;flex:1 1;font-size:15px;justify-content:center;line-height:17px;text-align:center}.table-module_table-bottom-inner__0Pus0{background:#fff;min-height:40px;width:100%}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2{align-items:center;border-bottom:1px solid #eee;display:flex;flex:1 1;font-size:14px;justify-content:center;line-height:16px;padding:4px;text-align:center}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:not(:last-child){border-right:1px solid #eee}";
|
|
166
194
|
var styles$b = {"table-wrap":"table-module_table-wrap__KKAnM","table-bottom-inner":"table-module_table-bottom-inner__0Pus0","table-items":"table-module_table-items__UpFg2","table-top":"table-module_table-top__tfEKM"};
|
|
167
|
-
styleInject(css_248z$
|
|
168
|
-
|
|
169
|
-
function _extends() {
|
|
170
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
171
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
172
|
-
var source = arguments[i];
|
|
173
|
-
for (var key in source) {
|
|
174
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
175
|
-
target[key] = source[key];
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
return target;
|
|
180
|
-
};
|
|
181
|
-
return _extends.apply(this, arguments);
|
|
182
|
-
}
|
|
195
|
+
styleInject(css_248z$d);
|
|
183
196
|
|
|
184
|
-
var css_248z$
|
|
197
|
+
var css_248z$c = ".checkbox-module_checkbox-wrap__Xrg-m{align-items:center;cursor:pointer;display:inline-flex;flex-direction:row;flex-wrap:nowrap;margin:0 6px;padding-left:24px;position:relative}.checkbox-module_checkbox-wrap__Xrg-m>input{height:0;opacity:0;position:absolute;width:0}.checkbox-module_checkbox-wrap__Xrg-m .checkbox-module_checkmark__M8DY6{border:1px solid #d9d9d9;border-radius:3px;bottom:0;display:inline-block;height:14px;left:0;margin:auto 4px auto auto;position:absolute;top:0;transition:border-color .24s;vertical-align:top;width:14px}.checkbox-module_checkbox-wrap__Xrg-m>.checkbox-module_checkmark__M8DY6:after{border:solid #1890ff;border-width:0 2px 2px 0;content:\"\";display:block;height:8px;left:4px;opacity:0;position:absolute;top:1px;transform:rotate(45deg);transition:opacity .24s;width:4px}.checkbox-module_checkbox-wrap__Xrg-m input:checked~.checkbox-module_checkmark__M8DY6:after{opacity:1}.checkbox-module_checkbox-wrap__Xrg-m input:checked~.checkbox-module_checkmark__M8DY6,.checkbox-module_checkbox-wrap__Xrg-m:hover input~.checkbox-module_checkmark__M8DY6{border-color:#1890ff}";
|
|
185
198
|
var styles$a = {"checkbox-wrap":"checkbox-module_checkbox-wrap__Xrg-m","checkmark":"checkbox-module_checkmark__M8DY6"};
|
|
186
|
-
styleInject(css_248z$
|
|
199
|
+
styleInject(css_248z$c);
|
|
187
200
|
|
|
188
201
|
const Checkbox = ({
|
|
189
202
|
disabled,
|
|
@@ -357,8 +370,11 @@ Table.defaultProps = {
|
|
|
357
370
|
hearderData: []
|
|
358
371
|
};
|
|
359
372
|
|
|
360
|
-
var css_248z$
|
|
373
|
+
var css_248z$b = ".modal-module_modal-wrap__IsXXf{background:rgba(0,0,0,.4);height:100%;left:0;position:fixed;top:0;width:100%;z-index:9}.modal-module_modal-top__ntDBi{background:#fbfbfb;box-sizing:border-box;display:flex;flex-direction:row;height:44px;padding:4px 10px 4px 0;width:100%}.modal-module_modal-title__r-WKl{align-items:center;color:#3c393e;display:flex;flex:1 1;font-size:20px;font-weight:500;line-height:24px;padding-right:20px}.modal-module_close-btn__Qf2UD{cursor:pointer;flex:0 0 auto;width:24px}.modal-module_close-btn__Qf2UD,.modal-module_modal-section__Bp8jN{align-items:center;display:flex;height:100%;justify-content:center}.modal-module_modal-section__Bp8jN{flex:1 1;padding:10px 0;width:100%}.modal-module_modal-content__1F-uE{align-items:center;animation:modal-module_show-popup__WrH7a .24s;background:#fff;border-radius:8px;display:flex;flex-direction:column;height:auto;left:0;margin:auto;min-height:130px;overflow:hidden;padding:10px;position:absolute;right:0;top:110px;width:fit-content}@keyframes modal-module_show-popup__WrH7a{0%{transform:translate3d(0,-30%,0)}to{opacity:1;transform:translateZ(0)}}";
|
|
361
374
|
var styles$9 = {"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"};
|
|
375
|
+
styleInject(css_248z$b);
|
|
376
|
+
|
|
377
|
+
var css_248z$a = "";
|
|
362
378
|
styleInject(css_248z$a);
|
|
363
379
|
|
|
364
380
|
const _ = require('lodash');
|
|
@@ -1854,71 +1870,161 @@ Tooltip.defaultProps = {
|
|
|
1854
1870
|
type: 'top'
|
|
1855
1871
|
};
|
|
1856
1872
|
|
|
1857
|
-
|
|
1858
|
-
|
|
1873
|
+
const SvgCaptchaArrowUp = ({
|
|
1874
|
+
title,
|
|
1875
|
+
titleId,
|
|
1876
|
+
...props
|
|
1877
|
+
}) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
1878
|
+
width: "12",
|
|
1879
|
+
height: "15",
|
|
1880
|
+
viewBox: "0 0 12 15",
|
|
1881
|
+
fill: "none",
|
|
1882
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1883
|
+
"aria-labelledby": titleId
|
|
1884
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
1885
|
+
id: titleId
|
|
1886
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
1887
|
+
d: "M6 14.9988C6.22729 14.9988 6.44527 14.9066 6.60598 14.7425C6.7667 14.5785 6.85699 14.3559 6.85699 14.1239L6.85699 3.98726L10.5352 7.74409C10.6149 7.82543 10.7095 7.88996 10.8136 7.93398C10.9177 7.97801 11.0292 8.00067 11.1419 8.00067C11.2546 8.00067 11.3662 7.97801 11.4703 7.93398C11.5744 7.88996 11.669 7.82543 11.7487 7.74409C11.8284 7.66274 11.8916 7.56617 11.9347 7.45989C11.9778 7.35361 12 7.2397 12 7.12466C12 7.00962 11.9778 6.89571 11.9347 6.78943C11.8916 6.68314 11.8284 6.58657 11.7487 6.50523L6.60675 1.25581C6.52714 1.17434 6.43257 1.1097 6.32845 1.06559C6.22434 1.02148 6.11272 0.998779 6 0.998779C5.88728 0.998779 5.77566 1.02148 5.67154 1.06559C5.56743 1.1097 5.47286 1.17434 5.39325 1.25581L0.251323 6.50523C0.0904038 6.66951 0 6.89233 0 7.12466C0 7.35699 0.0904038 7.57981 0.251323 7.74409C0.412243 7.90837 0.630497 8.00067 0.858071 8.00067C1.08565 8.00067 1.3039 7.90837 1.46482 7.74409L5.14301 3.98726L5.14301 14.1239C5.14301 14.3559 5.2333 14.5785 5.39402 14.7425C5.55473 14.9066 5.77271 14.9988 6 14.9988Z",
|
|
1888
|
+
fill: "#00236A"
|
|
1889
|
+
}));
|
|
1890
|
+
|
|
1891
|
+
const SvgCaptchaArrowDown = ({
|
|
1892
|
+
title,
|
|
1893
|
+
titleId,
|
|
1894
|
+
...props
|
|
1895
|
+
}) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
1896
|
+
width: "12",
|
|
1897
|
+
height: "15",
|
|
1898
|
+
viewBox: "0 0 12 15",
|
|
1899
|
+
fill: "none",
|
|
1900
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1901
|
+
"aria-labelledby": titleId
|
|
1902
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
1903
|
+
id: titleId
|
|
1904
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
1905
|
+
d: "M6 0.00146537C5.77271 0.00146539 5.55473 0.0936418 5.39402 0.257718C5.2333 0.421795 5.14301 0.64433 5.14301 0.876368L5.14301 11.013L1.46482 7.25615C1.38514 7.17481 1.29055 7.11028 1.18644 7.06626C1.08233 7.02224 0.970753 6.99958 0.85807 6.99958C0.745386 6.99958 0.633807 7.02224 0.529701 7.06626C0.425595 7.11028 0.331002 7.17481 0.251322 7.25616C0.171643 7.3375 0.108438 7.43407 0.0653156 7.54035C0.0221934 7.64663 -5.45598e-07 7.76055 -5.35541e-07 7.87559C-5.25484e-07 7.99063 0.0221934 8.10454 0.0653157 8.21082C0.108438 8.3171 0.171643 8.41367 0.251322 8.49502L5.39325 13.7444C5.47286 13.8259 5.56743 13.8905 5.67155 13.9347C5.77566 13.9788 5.88728 14.0015 6 14.0015C6.11272 14.0015 6.22434 13.9788 6.32846 13.9347C6.43257 13.8905 6.52714 13.8259 6.60675 13.7444L11.7487 8.49502C11.9096 8.33073 12 8.10792 12 7.87559C12 7.64325 11.9096 7.42044 11.7487 7.25615C11.5878 7.09187 11.3695 6.99958 11.1419 6.99958C10.9144 6.99958 10.6961 7.09187 10.5352 7.25615L6.85699 11.013L6.85699 0.876368C6.85699 0.64433 6.7667 0.421794 6.60598 0.257718C6.44526 0.0936418 6.22729 0.00146535 6 0.00146537Z",
|
|
1906
|
+
fill: "#00236A"
|
|
1907
|
+
}));
|
|
1908
|
+
|
|
1909
|
+
var css_248z$4 = ".captcha-module_start-point__LkOqy:after{background-color:#d1d1d1;border:2px solid #fff;border-radius:6px;-webkit-border-radius:6px;-moz-border-radius:6px;-ms-border-radius:6px;-o-border-radius:6px;content:\"\";height:10px;left:0;position:absolute;top:7.5px;width:10px;z-index:-1}.captcha-module_range__k24I2{-webkit-appearance:none;margin:0}.captcha-module_range__k24I2::-webkit-slider-runnable-track{-webkit-appearance:none;width:100%}.captcha-module_range-default__-O0QD::-webkit-slider-thumb{background-image:url(../../assets/icons/range-arrow-default.svg)}.captcha-module_range-default__-O0QD::-webkit-slider-thumb,.captcha-module_range-error__FKMfG::-webkit-slider-thumb{-webkit-appearance:none;background-position:-5px;background-repeat:no-repeat;background-size:46px 46px;border-radius:17px;-webkit-border-radius:17px;-moz-border-radius:17px;-ms-border-radius:17px;-o-border-radius:17px;cursor:ew-resize;height:34px;width:34px}.captcha-module_range-error__FKMfG::-webkit-slider-thumb{background-image:url(../../assets/icons/range-arrow-error.svg)}.captcha-module_range-success__VzLPq::-webkit-slider-thumb{-webkit-appearance:none;background-image:url(../../assets/icons/range-arrow-success.svg);background-position:-5px;background-repeat:no-repeat;background-size:46px 46px;border-radius:17px;-webkit-border-radius:17px;-moz-border-radius:17px;-ms-border-radius:17px;-o-border-radius:17px;cursor:ew-resize;height:34px;width:34px}";
|
|
1910
|
+
var styles$3 = {"start-point":"captcha-module_start-point__LkOqy","range":"captcha-module_range__k24I2","range-default":"captcha-module_range-default__-O0QD","range-error":"captcha-module_range-error__FKMfG","range-success":"captcha-module_range-success__VzLPq"};
|
|
1859
1911
|
styleInject(css_248z$4);
|
|
1860
1912
|
|
|
1861
1913
|
const Captcha = ({
|
|
1862
|
-
|
|
1863
|
-
|
|
1914
|
+
size,
|
|
1915
|
+
color,
|
|
1916
|
+
range,
|
|
1917
|
+
label,
|
|
1918
|
+
getRange
|
|
1864
1919
|
}) => {
|
|
1865
|
-
const [
|
|
1866
|
-
const [
|
|
1867
|
-
|
|
1868
|
-
|
|
1920
|
+
const [rangeNumber, setRangeNumber] = useState(0);
|
|
1921
|
+
const [rangeProgress, setRangeProgress] = useState(0);
|
|
1922
|
+
const configStyles = compereConfigs();
|
|
1923
|
+
const handleRange = e => {
|
|
1924
|
+
const value = e.target.value;
|
|
1925
|
+
getRange(value);
|
|
1926
|
+
setRangeProgress(value);
|
|
1927
|
+
};
|
|
1869
1928
|
useEffect(() => {
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
selector[0].style.left = event.target.value + '%';
|
|
1881
|
-
progressBar[0].style.width = event.target.value + '%';
|
|
1882
|
-
if (rangeCount == event.target.value) {
|
|
1883
|
-
selectBtn[0].style.background = "pink";
|
|
1929
|
+
if (range === undefined || range === null) {
|
|
1930
|
+
alert('Please add range property on Captcha component');
|
|
1931
|
+
}
|
|
1932
|
+
if (!getRange) {
|
|
1933
|
+
alert('Please add getRange property on Captcha component');
|
|
1934
|
+
}
|
|
1935
|
+
if (range > 100) {
|
|
1936
|
+
setRangeNumber(100);
|
|
1937
|
+
} else if (range < 0) {
|
|
1938
|
+
setRangeNumber(0);
|
|
1884
1939
|
} else {
|
|
1885
|
-
|
|
1940
|
+
setRangeNumber(range);
|
|
1941
|
+
}
|
|
1942
|
+
}, [range, getRange]);
|
|
1943
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, label && /*#__PURE__*/React__default.createElement("p", {
|
|
1944
|
+
style: {
|
|
1945
|
+
fontSize: size ? size : configStyles.Captcha.size,
|
|
1946
|
+
color: color ? color : configStyles.Captcha.color
|
|
1947
|
+
}
|
|
1948
|
+
}, label), /*#__PURE__*/React__default.createElement("div", {
|
|
1949
|
+
style: {
|
|
1950
|
+
width: '100%',
|
|
1951
|
+
height: '76px',
|
|
1952
|
+
maxWidth: '400px',
|
|
1953
|
+
position: 'relative'
|
|
1886
1954
|
}
|
|
1887
|
-
}
|
|
1888
|
-
function sliderChange(e) {
|
|
1889
|
-
setRight(rangeCount == e.target.value ? true : false);
|
|
1890
|
-
}
|
|
1891
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
1892
|
-
className: styles$3.main
|
|
1893
1955
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1956
|
+
style: {
|
|
1957
|
+
position: 'absolute',
|
|
1958
|
+
top: '0px',
|
|
1959
|
+
height: '15px',
|
|
1960
|
+
left: `calc(${rangeNumber}% - 6px)`
|
|
1961
|
+
}
|
|
1962
|
+
}, /*#__PURE__*/React__default.createElement(SvgCaptchaArrowDown, null)), /*#__PURE__*/React__default.createElement("div", {
|
|
1963
|
+
style: {
|
|
1964
|
+
position: 'absolute',
|
|
1965
|
+
display: 'flex',
|
|
1966
|
+
top: '23px',
|
|
1967
|
+
left: '0px',
|
|
1968
|
+
width: '100%',
|
|
1969
|
+
height: '30px',
|
|
1970
|
+
alignItems: 'center',
|
|
1971
|
+
zIndex: 1
|
|
1972
|
+
},
|
|
1973
|
+
className: styles$3['start-point']
|
|
1974
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1975
|
+
style: {
|
|
1976
|
+
position: 'absolute',
|
|
1977
|
+
top: '13px',
|
|
1978
|
+
right: '0px',
|
|
1979
|
+
width: '100%',
|
|
1980
|
+
height: '4px',
|
|
1981
|
+
borderRadius: '2px',
|
|
1982
|
+
backgroundColor: '#EEEEEE',
|
|
1983
|
+
borderRadius: '10px',
|
|
1984
|
+
zIndex: -2
|
|
1985
|
+
}
|
|
1986
|
+
}), /*#__PURE__*/React__default.createElement("input", {
|
|
1987
|
+
min: 0,
|
|
1988
|
+
max: 100,
|
|
1898
1989
|
type: "range",
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1990
|
+
value: rangeProgress,
|
|
1991
|
+
style: {
|
|
1992
|
+
height: '4px',
|
|
1993
|
+
width: '100%',
|
|
1994
|
+
borderRadius: '2px',
|
|
1995
|
+
cursor: 'pointer',
|
|
1996
|
+
backgroundColor: 'transparent'
|
|
1997
|
+
},
|
|
1998
|
+
className: `
|
|
1999
|
+
${styles$3['range']}
|
|
2000
|
+
${rangeProgress >= rangeNumber ? styles$3['range-success'] : rangeProgress < rangeNumber && rangeProgress > 0 ? styles$3['range-error'] : styles$3['range-default']}
|
|
2001
|
+
`,
|
|
2002
|
+
onInput: handleRange
|
|
1903
2003
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
2004
|
+
style: {
|
|
2005
|
+
position: 'absolute',
|
|
2006
|
+
top: '13px',
|
|
2007
|
+
left: '0px',
|
|
2008
|
+
width: rangeProgress + '%',
|
|
2009
|
+
height: '4px',
|
|
2010
|
+
borderRadius: '2px',
|
|
2011
|
+
backgroundColor: rangeProgress >= rangeNumber ? '#0DA574' : rangeProgress < rangeNumber && rangeProgress > 0 ? '#EE0000' : 'transparent',
|
|
2012
|
+
borderRadius: '2px',
|
|
2013
|
+
zIndex: -1
|
|
2014
|
+
}
|
|
1907
2015
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
2016
|
+
style: {
|
|
2017
|
+
position: 'absolute',
|
|
2018
|
+
bottom: '0px',
|
|
2019
|
+
height: '15px',
|
|
2020
|
+
left: `calc(${rangeNumber}% - 6px)`
|
|
2021
|
+
}
|
|
2022
|
+
}, /*#__PURE__*/React__default.createElement(SvgCaptchaArrowUp, null))));
|
|
1914
2023
|
};
|
|
1915
2024
|
Captcha.propTypes = {
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
};
|
|
1920
|
-
Captcha.defaultProps = {
|
|
1921
|
-
onclick: undefined
|
|
2025
|
+
label: PropTypes.string,
|
|
2026
|
+
range: PropTypes.number.isRequired,
|
|
2027
|
+
getRange: PropTypes.func.isRequired
|
|
1922
2028
|
};
|
|
1923
2029
|
|
|
1924
2030
|
var css_248z$3 = ".stepper-module_stepper-container__-OVGy>div:last-child:before{display:none}.stepper-module_activeRing__Lzvh1,.stepper-module_bigRing__5GBm0{border-radius:50%;cursor:pointer;height:36px;margin-bottom:36px;position:relative;width:36px}.stepper-module_bigRing__5GBm0{box-shadow:0 0 0 2px #d1d1d1}.stepper-module_bigRing__5GBm0:before{background:#d1d1d1}.stepper-module_activeRing__Lzvh1{box-shadow:0 0 0 2px #00236a}.stepper-module_activeRing__Lzvh1:before{background:#00236a}.stepper-module_activeRing__Lzvh1:before,.stepper-module_bigRing__5GBm0:before{border-radius:20px;bottom:-32px;content:\"\";height:28px;left:0;margin:auto;overflow:hidden;position:absolute;right:0;width:2px}.stepper-module_smallActiveRing__im-XG,.stepper-module_smallRing__u-5a8{border-radius:50%;bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.stepper-module_smallRing__u-5a8{background-color:#d1d1d1;height:14px;width:14px}.stepper-module_smallActiveRing__im-XG{align-items:center;background-color:#00236a;color:#fff;display:flex;height:28px;justify-content:center;width:28px}";
|
|
@@ -1954,10 +2060,134 @@ Stepper.propTypes = {
|
|
|
1954
2060
|
activeSteps: PropTypes.number
|
|
1955
2061
|
};
|
|
1956
2062
|
|
|
1957
|
-
var css_248z$2 = "
|
|
1958
|
-
var styles$1 = {"listItem":"pagination-module_listItem__b1-WN","active":"pagination-module_active__KwBDp","pagination-bar":"pagination-module_pagination-bar__MrtYT","pagination-btn":"pagination-module_pagination-btn__w8Yh8","pagination-item":"pagination-module_pagination-item__t3emS","pagination-jump-next":"pagination-module_pagination-jump-next__LAb9Z","selected":"pagination-module_selected__EXzCA","pagination-jump-next-txt":"pagination-module_pagination-jump-next-txt__e7nFj","pagination-jump-next-arrow":"pagination-module_pagination-jump-next-arrow__aEVD8"};
|
|
2063
|
+
var css_248z$2 = "textarea::-webkit-scrollbar{width:6px}textarea::-webkit-scrollbar-track{background:#eee}textarea::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-track{border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px}textarea::-webkit-scrollbar-thumb{background:#d1d1d1}";
|
|
1959
2064
|
styleInject(css_248z$2);
|
|
1960
2065
|
|
|
2066
|
+
const Textarea = ({
|
|
2067
|
+
size,
|
|
2068
|
+
label,
|
|
2069
|
+
width,
|
|
2070
|
+
value,
|
|
2071
|
+
height,
|
|
2072
|
+
resize,
|
|
2073
|
+
border,
|
|
2074
|
+
radius,
|
|
2075
|
+
padding,
|
|
2076
|
+
required,
|
|
2077
|
+
onChange,
|
|
2078
|
+
minWidth,
|
|
2079
|
+
maxWidth,
|
|
2080
|
+
minHeight,
|
|
2081
|
+
maxHeight,
|
|
2082
|
+
boxSizing,
|
|
2083
|
+
maxLength,
|
|
2084
|
+
labelSize,
|
|
2085
|
+
labelColor,
|
|
2086
|
+
borderColor,
|
|
2087
|
+
labelWeight,
|
|
2088
|
+
placeholder,
|
|
2089
|
+
labelDisplay,
|
|
2090
|
+
backgroundColor,
|
|
2091
|
+
borderFocusColor,
|
|
2092
|
+
borderHoverColor,
|
|
2093
|
+
labelRequiredColor
|
|
2094
|
+
}) => {
|
|
2095
|
+
const [isHover, setIsHover] = useState(false);
|
|
2096
|
+
const [isFocus, setIsFocus] = useState(false);
|
|
2097
|
+
const configStyles = compereConfigs();
|
|
2098
|
+
const handleMouseEnter = () => {
|
|
2099
|
+
setIsHover(true);
|
|
2100
|
+
};
|
|
2101
|
+
const handleMouseLeave = () => {
|
|
2102
|
+
setIsHover(false);
|
|
2103
|
+
};
|
|
2104
|
+
const handleFocus = () => {
|
|
2105
|
+
setIsFocus(true);
|
|
2106
|
+
};
|
|
2107
|
+
const handleBlur = () => {
|
|
2108
|
+
setIsFocus(false);
|
|
2109
|
+
};
|
|
2110
|
+
useEffect(() => {
|
|
2111
|
+
if (value === undefined) {
|
|
2112
|
+
alert('Please add value prop on Textarea component');
|
|
2113
|
+
}
|
|
2114
|
+
if (!onChange) {
|
|
2115
|
+
alert('Please add onChange function on Textarea component');
|
|
2116
|
+
}
|
|
2117
|
+
}, [value, onChange]);
|
|
2118
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, label ? /*#__PURE__*/React__default.createElement("label", {
|
|
2119
|
+
style: {
|
|
2120
|
+
color: labelColor ? labelColor : configStyles.TEXTAREA.labelColor,
|
|
2121
|
+
fontSize: labelSize ? labelSize : configStyles.TEXTAREA.labelSize,
|
|
2122
|
+
display: labelDisplay ? labelDisplay : configStyles.TEXTAREA.labelDisplay,
|
|
2123
|
+
fontWeight: labelWeight ? labelWeight : configStyles.TEXTAREA.labelWeight
|
|
2124
|
+
}
|
|
2125
|
+
}, label, required && /*#__PURE__*/React__default.createElement("sup", {
|
|
2126
|
+
style: {
|
|
2127
|
+
color: labelRequiredColor ? labelRequiredColor : configStyles.TEXTAREA.labelRequiredColor
|
|
2128
|
+
}
|
|
2129
|
+
}, "*")) : '', /*#__PURE__*/React__default.createElement("textarea", {
|
|
2130
|
+
style: {
|
|
2131
|
+
outline: 'none',
|
|
2132
|
+
overflow: 'auto',
|
|
2133
|
+
fontSize: size ? size : configStyles.TEXTAREA.size,
|
|
2134
|
+
width: width ? width : configStyles.TEXTAREA.width,
|
|
2135
|
+
height: height ? height : configStyles.TEXTAREA.height,
|
|
2136
|
+
border: border ? border : configStyles.TEXTAREA.border,
|
|
2137
|
+
padding: padding ? padding : configStyles.TEXTAREA.padding,
|
|
2138
|
+
borderRadius: radius ? radius : configStyles.TEXTAREA.radius,
|
|
2139
|
+
minWidth: minWidth ? minWidth : configStyles.TEXTAREA.minWidth,
|
|
2140
|
+
maxWidth: maxWidth ? maxWidth : configStyles.TEXTAREA.maxWidth,
|
|
2141
|
+
minHeight: minHeight ? minHeight : configStyles.TEXTAREA.minHeight,
|
|
2142
|
+
maxHeight: maxHeight ? maxHeight : configStyles.TEXTAREA.maxHeight,
|
|
2143
|
+
boxSizing: boxSizing ? boxSizing : configStyles.TEXTAREA.boxSizing,
|
|
2144
|
+
backgroundColor: backgroundColor ? backgroundColor : configStyles.TEXTAREA.backgroundColor,
|
|
2145
|
+
borderColor: isFocus ? borderFocusColor ? borderFocusColor : configStyles.TEXTAREA.borderFocusColor : isHover ? borderHoverColor ? borderHoverColor : configStyles.TEXTAREA.borderHoverColor : borderColor ? borderColor : configStyles.TEXTAREA.borderColor,
|
|
2146
|
+
resize: resize ? resize : configStyles.TEXTAREA.resize
|
|
2147
|
+
},
|
|
2148
|
+
onBlur: handleBlur,
|
|
2149
|
+
onChange: onChange,
|
|
2150
|
+
onFocus: handleFocus,
|
|
2151
|
+
placeholder: placeholder,
|
|
2152
|
+
onMouseEnter: handleMouseEnter,
|
|
2153
|
+
onMouseLeave: handleMouseLeave,
|
|
2154
|
+
value: maxLength ? value.length > maxLength ? value.substr(0, maxLength) : value : configStyles.TEXTAREA.maxLength ? value.length > configStyles.TEXTAREA.maxLength ? value.substr(0, configStyles.TEXTAREA.maxLength) : value : value
|
|
2155
|
+
}));
|
|
2156
|
+
};
|
|
2157
|
+
Textarea.propTypes = {
|
|
2158
|
+
size: PropTypes.string,
|
|
2159
|
+
label: PropTypes.string,
|
|
2160
|
+
width: PropTypes.string,
|
|
2161
|
+
height: PropTypes.string,
|
|
2162
|
+
resize: PropTypes.string,
|
|
2163
|
+
border: PropTypes.string,
|
|
2164
|
+
radius: PropTypes.string,
|
|
2165
|
+
required: PropTypes.bool,
|
|
2166
|
+
padding: PropTypes.string,
|
|
2167
|
+
minWidth: PropTypes.string,
|
|
2168
|
+
maxWidth: PropTypes.string,
|
|
2169
|
+
boxSizing: PropTypes.string,
|
|
2170
|
+
minHeight: PropTypes.string,
|
|
2171
|
+
maxHeight: PropTypes.string,
|
|
2172
|
+
maxLength: PropTypes.number,
|
|
2173
|
+
labelSize: PropTypes.string,
|
|
2174
|
+
labelColor: PropTypes.string,
|
|
2175
|
+
labelWeight: PropTypes.string,
|
|
2176
|
+
borderColor: PropTypes.string,
|
|
2177
|
+
placeholder: PropTypes.string,
|
|
2178
|
+
labelDisplay: PropTypes.string,
|
|
2179
|
+
backgroundColor: PropTypes.string,
|
|
2180
|
+
value: PropTypes.string.isRequired,
|
|
2181
|
+
borderFocusColor: PropTypes.string,
|
|
2182
|
+
borderHoverColor: PropTypes.string,
|
|
2183
|
+
onChange: PropTypes.func.isRequired,
|
|
2184
|
+
labelRequiredColor: PropTypes.string
|
|
2185
|
+
};
|
|
2186
|
+
|
|
2187
|
+
var css_248z$1 = ".pagination-module_listItem__b1-WN:focus{background-color:#4caf50;color:#fff}.pagination-module_listItem__b1-WN:hover:not(.pagination-module_active__KwBDp){background-color:#ddd}.pagination-module_pagination-bar__MrtYT{display:flex;flex-direction:row;flex-wrap:nowrap;gap:8px;justify-content:center}.pagination-module_pagination-btn__w8Yh8{border:none;border-radius:6px;outline:none}.pagination-module_pagination-btn__w8Yh8,.pagination-module_pagination-item__t3emS,.pagination-module_pagination-jump-next__LAb9Z{align-items:center;background-color:#fff;box-shadow:0 0 0 1px #eee;cursor:pointer;display:flex;height:34px;justify-content:center;width:34px}.pagination-module_pagination-item__t3emS,.pagination-module_pagination-jump-next__LAb9Z{border-radius:6px;flex:0 0 auto;font-size:13px;line-height:16px;position:relative;transition:background-color .24s}.pagination-module_pagination-item__t3emS:hover{background-color:#eee}.pagination-module_pagination-item__t3emS.pagination-module_selected__EXzCA{background-color:#00236a;color:#fff}.pagination-module_pagination-jump-next-arrow__aEVD8,.pagination-module_pagination-jump-next-txt__e7nFj{align-items:center;bottom:0;display:flex;font-size:12px;justify-content:center;left:0;line-height:14px;margin:auto;position:absolute;right:0;top:0;transition:opacity .24s,color .24s}.pagination-module_pagination-jump-next-arrow__aEVD8{opacity:0}.pagination-module_pagination-jump-next__LAb9Z:hover .pagination-module_pagination-jump-next-arrow__aEVD8{opacity:1}.pagination-module_pagination-jump-next__LAb9Z:hover .pagination-module_pagination-jump-next-txt__e7nFj{opacity:0}i{color:#3c393e;font-size:12px;line-height:12px}";
|
|
2188
|
+
var styles$1 = {"listItem":"pagination-module_listItem__b1-WN","active":"pagination-module_active__KwBDp","pagination-bar":"pagination-module_pagination-bar__MrtYT","pagination-btn":"pagination-module_pagination-btn__w8Yh8","pagination-item":"pagination-module_pagination-item__t3emS","pagination-jump-next":"pagination-module_pagination-jump-next__LAb9Z","selected":"pagination-module_selected__EXzCA","pagination-jump-next-txt":"pagination-module_pagination-jump-next-txt__e7nFj","pagination-jump-next-arrow":"pagination-module_pagination-jump-next-arrow__aEVD8"};
|
|
2189
|
+
styleInject(css_248z$1);
|
|
2190
|
+
|
|
1961
2191
|
// import styles from "./pagination.module.scss";
|
|
1962
2192
|
|
|
1963
2193
|
const Dots$1 = "...";
|
|
@@ -2146,9 +2376,9 @@ Pagination.defaultProps = {
|
|
|
2146
2376
|
siblingCount: 2
|
|
2147
2377
|
};
|
|
2148
2378
|
|
|
2149
|
-
var css_248z
|
|
2379
|
+
var css_248z = ".autocomplate-module_autocomplate-content__UbIUT{display:flex;flex-direction:column;position:relative}.autocomplate-module_autocomplate-content-top__FVgCp{border:2px solid #d1d1d1;border-radius:6px;box-sizing:border-box;color:#3c393e;cursor:pointer;display:flex;flex-direction:row;font-size:16px;font-weight:500;height:46px;line-height:22px;max-width:400px;padding:0 15px;transition:border-color .24s}.autocomplate-module_autocomplate-content-top__FVgCp.autocomplate-module_active__40fdV{border-color:#00236a}.autocomplate-module_autocomplate-content-top__FVgCp:hover{border-color:#3c393e}.autocomplate-module_autocomplate-content-bottom__yk0zP{animation:autocomplate-module_select-show__7Uap4 .64s linear forwards;background:#fbfbfb;border-radius:6px;box-shadow:0 0 10px rgba(60,57,62,.08);left:0;max-height:0;max-width:400px;overflow:hidden;position:absolute;top:52px;width:100%;z-index:1}.autocomplate-module_autocomplate-content-bottom-inner__rF5IF{display:flex;flex-direction:column;max-height:234px;overflow-x:hidden;overflow-y:auto}@keyframes autocomplate-module_select-show__7Uap4{to{max-height:400px}}.autocomplate-module_autocomplate-content-bottom-row__dRsZa{align-items:center;background:#fff;box-sizing:border-box;color:#3c393e;cursor:pointer;display:flex;font-size:16px;font-weight:500;height:46px;line-height:22px;margin-bottom:2px;padding:0 15px;transition:background .24s,color .24s}.autocomplate-module_autocomplate-content-bottom-row__dRsZa .autocomplate-module_no-option__xv0-E{color:red}.autocomplate-module_autocomplate-content-bottom-row__dRsZa:hover{background:unset;color:#00236a}.autocomplate-module_option-active__WuH4I .autocomplate-module_autocomplate-content-bottom-row__dRsZa{color:#00236a}.autocomplate-module_autocomplate-title__3Qxqz{color:#3c393e;display:block;font-size:16px;font-weight:500;line-height:22px;margin-bottom:6px;text-transform:none}.autocomplate-module_errorBorder__LV-nb{border:2px solid #e00!important}.autocomplate-module_errorMessage__Gchpc{color:#e00!important}";
|
|
2150
2380
|
var styles = {"autocomplate-content":"autocomplate-module_autocomplate-content__UbIUT","autocomplate-content-top":"autocomplate-module_autocomplate-content-top__FVgCp","active":"autocomplate-module_active__40fdV","autocomplate-content-bottom":"autocomplate-module_autocomplate-content-bottom__yk0zP","select-show":"autocomplate-module_select-show__7Uap4","autocomplate-content-bottom-inner":"autocomplate-module_autocomplate-content-bottom-inner__rF5IF","autocomplate-content-bottom-row":"autocomplate-module_autocomplate-content-bottom-row__dRsZa","no-option":"autocomplate-module_no-option__xv0-E","option-active":"autocomplate-module_option-active__WuH4I","autocomplate-title":"autocomplate-module_autocomplate-title__3Qxqz","errorBorder":"autocomplate-module_errorBorder__LV-nb","errorMessage":"autocomplate-module_errorMessage__Gchpc"};
|
|
2151
|
-
styleInject(css_248z
|
|
2381
|
+
styleInject(css_248z);
|
|
2152
2382
|
|
|
2153
2383
|
const Autocomplate = ({
|
|
2154
2384
|
label,
|
|
@@ -2282,128 +2512,327 @@ Autocomplate.defaultProps = {
|
|
|
2282
2512
|
required: false
|
|
2283
2513
|
};
|
|
2284
2514
|
|
|
2285
|
-
|
|
2286
|
-
styleInject(css_248z);
|
|
2287
|
-
|
|
2288
|
-
const Textarea = ({
|
|
2289
|
-
size,
|
|
2515
|
+
const NewAutocomplete = ({
|
|
2290
2516
|
label,
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
height,
|
|
2294
|
-
resize,
|
|
2295
|
-
border,
|
|
2296
|
-
radius,
|
|
2297
|
-
padding,
|
|
2517
|
+
options,
|
|
2518
|
+
getItem,
|
|
2298
2519
|
required,
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
maxWidth,
|
|
2302
|
-
minHeight,
|
|
2303
|
-
maxHeight,
|
|
2304
|
-
boxSizing,
|
|
2305
|
-
maxLength,
|
|
2520
|
+
disabled,
|
|
2521
|
+
errorSize,
|
|
2306
2522
|
labelSize,
|
|
2523
|
+
errorColor,
|
|
2307
2524
|
labelColor,
|
|
2308
|
-
borderColor,
|
|
2309
2525
|
labelWeight,
|
|
2310
|
-
|
|
2526
|
+
searchCount,
|
|
2527
|
+
placeHolder,
|
|
2528
|
+
errorMessage,
|
|
2529
|
+
autoComplete,
|
|
2311
2530
|
labelDisplay,
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2531
|
+
contentDisplay,
|
|
2532
|
+
contentTopSize,
|
|
2533
|
+
contentPosition,
|
|
2534
|
+
contentTopColor,
|
|
2535
|
+
labelLineHeight,
|
|
2536
|
+
contentDirection,
|
|
2537
|
+
contentTopWeight,
|
|
2538
|
+
contentTopRadius,
|
|
2539
|
+
contentTopHeight,
|
|
2540
|
+
contentTopBorder,
|
|
2541
|
+
labelMarginBottom,
|
|
2542
|
+
contentTopDisplay,
|
|
2543
|
+
contentTopPadding,
|
|
2544
|
+
contentBottomLeft,
|
|
2545
|
+
showOptionDuration,
|
|
2546
|
+
labelRequiredColor,
|
|
2547
|
+
contentTopMaxWidth,
|
|
2548
|
+
labelTextTransform,
|
|
2549
|
+
contentBottomWidth,
|
|
2550
|
+
contentBottomZindex,
|
|
2551
|
+
contentBottomRadius,
|
|
2552
|
+
contentTopDirection,
|
|
2553
|
+
contentTopBoxSizing,
|
|
2554
|
+
contentTopLineHeight,
|
|
2555
|
+
contentTopBorderColor,
|
|
2556
|
+
contentBottomMaxWidth,
|
|
2557
|
+
contentBottomOverflow,
|
|
2558
|
+
contentBottomPosition,
|
|
2559
|
+
contentBottomRowColor,
|
|
2560
|
+
contentBottomMinHeight,
|
|
2561
|
+
contentBottomBoxShadow,
|
|
2562
|
+
contentBottomRowHeight,
|
|
2563
|
+
contentBottomRowCursor,
|
|
2564
|
+
contentBottomRowDisplay,
|
|
2565
|
+
contentBottomRowPadding,
|
|
2566
|
+
contentBottomRowFontSize,
|
|
2567
|
+
contentBottomRowBoxSizing,
|
|
2568
|
+
contentBottomInnerDisplay,
|
|
2569
|
+
contentBottomRowFontWeight,
|
|
2570
|
+
contentBottomRowLineHeight,
|
|
2571
|
+
contentBottomRowAlignItems,
|
|
2572
|
+
contentBottomRowTransition,
|
|
2573
|
+
contentBottomRowHoverColor,
|
|
2574
|
+
contentTopBorderHoverColor,
|
|
2575
|
+
contentTopBorderActiveColor,
|
|
2576
|
+
contentBottomInnerOverflowY,
|
|
2577
|
+
contentBottomInnerOverflowX,
|
|
2578
|
+
contentBottomInnerMaxHeight,
|
|
2579
|
+
contentBottomInnerDirection,
|
|
2580
|
+
contentBottomBackgroundColor,
|
|
2581
|
+
contentBottomRowMarginBottom,
|
|
2582
|
+
contentBottomRowBackgroundColor,
|
|
2583
|
+
contentBottomRowHoverBackgroundColor,
|
|
2584
|
+
...props
|
|
2316
2585
|
}) => {
|
|
2586
|
+
const [show, setShow] = useState(false);
|
|
2317
2587
|
const [isHover, setIsHover] = useState(false);
|
|
2318
2588
|
const [isFocus, setIsFocus] = useState(false);
|
|
2589
|
+
const [innerValue, setInnerValue] = useState('');
|
|
2319
2590
|
const configStyles = compereConfigs();
|
|
2591
|
+
const showOption = keyframes`
|
|
2592
|
+
100% {
|
|
2593
|
+
max-height: 400px;
|
|
2594
|
+
}
|
|
2595
|
+
`;
|
|
2596
|
+
const animation = _ => css`
|
|
2597
|
+
${showOption} ${showOptionDuration ? showOptionDuration : configStyles.NEWAUTOCOMPLETE.showOptionDuration} linear forwards
|
|
2598
|
+
`;
|
|
2320
2599
|
const handleMouseEnter = () => {
|
|
2321
2600
|
setIsHover(true);
|
|
2322
2601
|
};
|
|
2323
2602
|
const handleMouseLeave = () => {
|
|
2324
2603
|
setIsHover(false);
|
|
2325
2604
|
};
|
|
2605
|
+
const handleRowMouseEnter = e => {
|
|
2606
|
+
e.target.style.color = contentBottomRowHoverColor ? contentBottomRowHoverColor : configStyles.NEWAUTOCOMPLETE.contentBottomRowHoverColor;
|
|
2607
|
+
e.target.style.backgroundColor = contentBottomRowHoverBackgroundColor ? contentBottomRowHoverBackgroundColor : configStyles.NEWAUTOCOMPLETE.contentBottomRowHoverBackgroundColor;
|
|
2608
|
+
};
|
|
2609
|
+
const handleRowMouseLeave = e => {
|
|
2610
|
+
e.target.style.color = contentBottomRowColor ? contentBottomRowColor : configStyles.NEWAUTOCOMPLETE.contentBottomRowColor;
|
|
2611
|
+
e.target.style.backgroundColor = contentBottomRowBackgroundColor ? contentBottomRowBackgroundColor : configStyles.NEWAUTOCOMPLETE.contentBottomRowBackgroundColor;
|
|
2612
|
+
};
|
|
2326
2613
|
const handleFocus = () => {
|
|
2327
2614
|
setIsFocus(true);
|
|
2328
2615
|
};
|
|
2329
2616
|
const handleBlur = () => {
|
|
2330
2617
|
setIsFocus(false);
|
|
2331
2618
|
};
|
|
2619
|
+
const handleChange = e => {
|
|
2620
|
+
const value = e.target.value;
|
|
2621
|
+
value.length > 0 ? setShow(true) : setShow(false);
|
|
2622
|
+
setInnerValue(value);
|
|
2623
|
+
};
|
|
2624
|
+
const handleClick = selectedValue => {
|
|
2625
|
+
setShow(false);
|
|
2626
|
+
getItem(selectedValue);
|
|
2627
|
+
setInnerValue(selectedValue.value);
|
|
2628
|
+
};
|
|
2629
|
+
const optionList = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, show && options && options.length > 0 && /*#__PURE__*/React__default.createElement("div", {
|
|
2630
|
+
style: {
|
|
2631
|
+
left: contentBottomLeft ? contentBottomLeft : configStyles.NEWAUTOCOMPLETE.contentBottomLeft,
|
|
2632
|
+
width: contentBottomWidth ? contentBottomWidth : configStyles.NEWAUTOCOMPLETE.contentBottomWidth,
|
|
2633
|
+
zIndex: contentBottomZindex ? contentBottomZindex : configStyles.NEWAUTOCOMPLETE.contentBottomZindex,
|
|
2634
|
+
borderRadius: contentBottomRadius ? contentBottomRadius : configStyles.NEWAUTOCOMPLETE.contentBottomRadius,
|
|
2635
|
+
maxWidth: contentBottomMaxWidth ? contentBottomMaxWidth : configStyles.NEWAUTOCOMPLETE.contentBottomMaxWidth,
|
|
2636
|
+
overflow: contentBottomOverflow ? contentBottomOverflow : configStyles.NEWAUTOCOMPLETE.contentBottomOverflow,
|
|
2637
|
+
position: contentBottomPosition ? contentBottomPosition : configStyles.NEWAUTOCOMPLETE.contentBottomPosition,
|
|
2638
|
+
minHeight: contentBottomMinHeight ? contentBottomMinHeight : configStyles.NEWAUTOCOMPLETE.contentBottomMinHeight,
|
|
2639
|
+
boxShadow: contentBottomBoxShadow ? contentBottomBoxShadow : configStyles.NEWAUTOCOMPLETE.contentBottomBoxShadow,
|
|
2640
|
+
backgroundColor: contentBottomBackgroundColor ? contentBottomBackgroundColor : configStyles.NEWAUTOCOMPLETE.contentBottomBackgroundColor,
|
|
2641
|
+
top: contentTopHeight ? contentTopHeight.includes('rem') ? parseFloat(contentTopHeight.substr(0, contentTopHeight.length - 3)) + 0.6 + 'rem' : parseFloat(contentTopHeight.substr(0, contentTopHeight.length - 2)) + 6 + 'px' : configStyles.NEWAUTOCOMPLETE.contentTopHeight.includes('rem') ? parseFloat(configStyles.NEWAUTOCOMPLETE.contentTopHeight.substr(0, configStyles.NEWAUTOCOMPLETE.contentTopHeight.length - 3)) + 0.6 + 'rem' : parseFloat(configStyles.NEWAUTOCOMPLETE.contentTopHeight.substr(0, configStyles.NEWAUTOCOMPLETE.contentTopHeight.length - 2)) + 6 + 'px',
|
|
2642
|
+
animation
|
|
2643
|
+
}
|
|
2644
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2645
|
+
style: {
|
|
2646
|
+
display: contentBottomInnerDisplay ? contentBottomInnerDisplay : configStyles.NEWAUTOCOMPLETE.contentBottomInnerDisplay,
|
|
2647
|
+
overflowY: contentBottomInnerOverflowY ? contentBottomInnerOverflowY : configStyles.NEWAUTOCOMPLETE.contentBottomInnerOverflowY,
|
|
2648
|
+
overflowX: contentBottomInnerOverflowX ? contentBottomInnerOverflowX : configStyles.NEWAUTOCOMPLETE.contentBottomInnerOverflowX,
|
|
2649
|
+
maxHeight: contentBottomInnerMaxHeight ? contentBottomInnerMaxHeight : configStyles.NEWAUTOCOMPLETE.contentBottomInnerMaxHeight,
|
|
2650
|
+
flexDirection: contentBottomInnerDirection ? contentBottomInnerDirection : configStyles.NEWAUTOCOMPLETE.contentBottomInnerDirection
|
|
2651
|
+
}
|
|
2652
|
+
}, innerValue.length >= searchCount ? options.filter(item => item.value.includes(innerValue)).length > 0 ? options.filter(item => item.value.includes(innerValue)).map((item, index) => {
|
|
2653
|
+
return /*#__PURE__*/React__default.createElement("p", {
|
|
2654
|
+
key: `${item}_${index}`,
|
|
2655
|
+
onMouseEnter: handleRowMouseEnter,
|
|
2656
|
+
onMouseLeave: handleRowMouseLeave,
|
|
2657
|
+
onClick: () => handleClick(item),
|
|
2658
|
+
style: {
|
|
2659
|
+
flexShrink: 0,
|
|
2660
|
+
color: contentBottomRowColor ? contentBottomRowColor : configStyles.NEWAUTOCOMPLETE.contentBottomRowColor,
|
|
2661
|
+
height: contentBottomRowHeight ? contentBottomRowHeight : configStyles.NEWAUTOCOMPLETE.contentBottomRowHeight,
|
|
2662
|
+
cursor: contentBottomRowCursor ? contentBottomRowCursor : configStyles.NEWAUTOCOMPLETE.contentBottomRowCursor,
|
|
2663
|
+
display: contentBottomRowDisplay ? contentBottomRowDisplay : configStyles.NEWAUTOCOMPLETE.contentBottomRowDisplay,
|
|
2664
|
+
padding: contentBottomRowPadding ? contentBottomRowPadding : configStyles.NEWAUTOCOMPLETE.contentBottomRowPadding,
|
|
2665
|
+
fontSize: contentBottomRowFontSize ? contentBottomRowFontSize : configStyles.NEWAUTOCOMPLETE.contentBottomRowFontSize,
|
|
2666
|
+
boxSizing: contentBottomRowBoxSizing ? contentBottomRowBoxSizing : configStyles.NEWAUTOCOMPLETE.contentBottomRowBoxSizing,
|
|
2667
|
+
fontWeight: contentBottomRowFontWeight ? contentBottomRowFontWeight : configStyles.NEWAUTOCOMPLETE.contentBottomRowFontWeight,
|
|
2668
|
+
lineHeight: contentBottomRowLineHeight ? contentBottomRowLineHeight : configStyles.NEWAUTOCOMPLETE.contentBottomRowLineHeight,
|
|
2669
|
+
alignItems: contentBottomRowAlignItems ? contentBottomRowAlignItems : configStyles.NEWAUTOCOMPLETE.contentBottomRowAlignItems,
|
|
2670
|
+
transition: contentBottomRowTransition ? contentBottomRowTransition : configStyles.NEWAUTOCOMPLETE.contentBottomRowTransition,
|
|
2671
|
+
marginBottom: contentBottomRowMarginBottom ? contentBottomRowMarginBottom : configStyles.NEWAUTOCOMPLETE.contentBottomRowMarginBottom,
|
|
2672
|
+
backgroundColor: contentBottomRowBackgroundColor ? contentBottomRowBackgroundColor : configStyles.NEWAUTOCOMPLETE.contentBottomRowBackgroundColor
|
|
2673
|
+
}
|
|
2674
|
+
}, item.value);
|
|
2675
|
+
}) : /*#__PURE__*/React__default.createElement("p", {
|
|
2676
|
+
style: {
|
|
2677
|
+
color: errorColor ? errorColor : configStyles.NEWAUTOCOMPLETE.errorColor,
|
|
2678
|
+
fontSize: errorSize ? errorSize : configStyles.NEWAUTOCOMPLETE.errorSize,
|
|
2679
|
+
height: contentBottomRowHeight ? contentBottomRowHeight : configStyles.NEWAUTOCOMPLETE.contentBottomRowHeight,
|
|
2680
|
+
padding: contentBottomRowPadding ? contentBottomRowPadding : configStyles.NEWAUTOCOMPLETE.contentBottomRowPadding,
|
|
2681
|
+
lineHeight: contentBottomRowHeight ? contentBottomRowHeight : configStyles.NEWAUTOCOMPLETE.contentBottomRowHeight
|
|
2682
|
+
}
|
|
2683
|
+
}, "\u0546\u0574\u0561\u0576 \u057F\u057E\u0575\u0561\u056C \u0561\u057C\u056F\u0561 \u0579\u0567") : /*#__PURE__*/React__default.createElement("p", {
|
|
2684
|
+
style: {
|
|
2685
|
+
color: errorColor ? errorColor : configStyles.NEWAUTOCOMPLETE.errorColor,
|
|
2686
|
+
fontSize: errorSize ? errorSize : configStyles.NEWAUTOCOMPLETE.errorSize,
|
|
2687
|
+
height: contentBottomRowHeight ? contentBottomRowHeight : configStyles.NEWAUTOCOMPLETE.contentBottomRowHeight,
|
|
2688
|
+
padding: contentBottomRowPadding ? contentBottomRowPadding : configStyles.NEWAUTOCOMPLETE.contentBottomRowPadding,
|
|
2689
|
+
lineHeight: contentBottomRowHeight ? contentBottomRowHeight : configStyles.NEWAUTOCOMPLETE.contentBottomRowHeight
|
|
2690
|
+
}
|
|
2691
|
+
}, innerValue.length < searchCount && `Լրացնել առնվազն ${searchCount} նիշ`))));
|
|
2332
2692
|
useEffect(() => {
|
|
2333
|
-
if (
|
|
2334
|
-
alert('Please add
|
|
2693
|
+
if (!options) {
|
|
2694
|
+
alert('Please add array of options');
|
|
2335
2695
|
}
|
|
2336
|
-
if (
|
|
2337
|
-
alert('Please
|
|
2696
|
+
if (options.length === 0) {
|
|
2697
|
+
alert('Please fill options array');
|
|
2338
2698
|
}
|
|
2339
|
-
|
|
2699
|
+
options && options.length > 0 && options.map(item => {
|
|
2700
|
+
if (!item.hasOwnProperty('value')) {
|
|
2701
|
+
alert('Please add value property in items of options array');
|
|
2702
|
+
}
|
|
2703
|
+
});
|
|
2704
|
+
if (!getItem) {
|
|
2705
|
+
alert('Please add getItem function for get choosen item from autocomplete');
|
|
2706
|
+
}
|
|
2707
|
+
}, [options, getItem]);
|
|
2340
2708
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, label ? /*#__PURE__*/React__default.createElement("label", {
|
|
2341
2709
|
style: {
|
|
2342
|
-
color: labelColor ? labelColor : configStyles.
|
|
2343
|
-
fontSize: labelSize ? labelSize : configStyles.
|
|
2344
|
-
display: labelDisplay ? labelDisplay : configStyles.
|
|
2345
|
-
fontWeight: labelWeight ? labelWeight : configStyles.
|
|
2710
|
+
color: labelColor ? labelColor : configStyles.NEWAUTOCOMPLETE.labelColor,
|
|
2711
|
+
fontSize: labelSize ? labelSize : configStyles.NEWAUTOCOMPLETE.labelSize,
|
|
2712
|
+
display: labelDisplay ? labelDisplay : configStyles.NEWAUTOCOMPLETE.labelDisplay,
|
|
2713
|
+
fontWeight: labelWeight ? labelWeight : configStyles.NEWAUTOCOMPLETE.labelWeight,
|
|
2714
|
+
lineHeight: labelLineHeight ? labelLineHeight : configStyles.NEWAUTOCOMPLETE.labelLineHeight,
|
|
2715
|
+
marginBottom: labelMarginBottom ? labelMarginBottom : configStyles.NEWAUTOCOMPLETE.labelMarginBottom,
|
|
2716
|
+
textTransform: labelTextTransform ? labelTextTransform : configStyles.NEWAUTOCOMPLETE.labelTextTransform
|
|
2346
2717
|
}
|
|
2347
2718
|
}, label, required && /*#__PURE__*/React__default.createElement("sup", {
|
|
2348
2719
|
style: {
|
|
2349
|
-
color: labelRequiredColor ? labelRequiredColor : configStyles.
|
|
2720
|
+
color: labelRequiredColor ? labelRequiredColor : configStyles.NEWAUTOCOMPLETE.labelRequiredColor
|
|
2350
2721
|
}
|
|
2351
|
-
}, "*")) : '', /*#__PURE__*/React__default.createElement("
|
|
2722
|
+
}, "*")) : '', /*#__PURE__*/React__default.createElement("div", {
|
|
2352
2723
|
style: {
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
minWidth: minWidth ? minWidth : configStyles.TEXTAREA.minWidth,
|
|
2362
|
-
maxWidth: maxWidth ? maxWidth : configStyles.TEXTAREA.maxWidth,
|
|
2363
|
-
minHeight: minHeight ? minHeight : configStyles.TEXTAREA.minHeight,
|
|
2364
|
-
maxHeight: maxHeight ? maxHeight : configStyles.TEXTAREA.maxHeight,
|
|
2365
|
-
boxSizing: boxSizing ? boxSizing : configStyles.TEXTAREA.boxSizing,
|
|
2366
|
-
backgroundColor: backgroundColor ? backgroundColor : configStyles.TEXTAREA.backgroundColor,
|
|
2367
|
-
borderColor: isFocus ? borderFocusColor ? borderFocusColor : configStyles.TEXTAREA.borderFocusColor : isHover ? borderHoverColor ? borderHoverColor : configStyles.TEXTAREA.borderHoverColor : borderColor ? borderColor : configStyles.TEXTAREA.borderColor,
|
|
2368
|
-
resize: resize ? resize : configStyles.TEXTAREA.resize
|
|
2369
|
-
},
|
|
2724
|
+
display: contentDisplay ? contentDisplay : configStyles.NEWAUTOCOMPLETE.contentDisplay,
|
|
2725
|
+
position: contentPosition ? contentPosition : configStyles.NEWAUTOCOMPLETE.contentPosition,
|
|
2726
|
+
flexDirection: contentDirection ? contentDirection : configStyles.NEWAUTOCOMPLETE.contentDirection
|
|
2727
|
+
}
|
|
2728
|
+
}, /*#__PURE__*/React__default.createElement("input", _extends({
|
|
2729
|
+
type: "text",
|
|
2730
|
+
value: innerValue,
|
|
2731
|
+
disabled: disabled,
|
|
2370
2732
|
onBlur: handleBlur,
|
|
2371
|
-
onChange: onChange,
|
|
2372
2733
|
onFocus: handleFocus,
|
|
2373
|
-
|
|
2734
|
+
onInput: handleChange,
|
|
2735
|
+
placeholder: placeHolder ? placeHolder : '',
|
|
2736
|
+
autoComplete: autoComplete ? autoComplete : configStyles.NEWAUTOCOMPLETE.autoComplete,
|
|
2374
2737
|
onMouseEnter: handleMouseEnter,
|
|
2375
2738
|
onMouseLeave: handleMouseLeave,
|
|
2376
|
-
|
|
2377
|
-
|
|
2739
|
+
style: {
|
|
2740
|
+
transition: 'all 240ms',
|
|
2741
|
+
cursor: disabled ? 'not-allowed' : 'auto',
|
|
2742
|
+
color: contentTopColor ? contentTopColor : configStyles.NEWAUTOCOMPLETE.contentTopColor,
|
|
2743
|
+
fontSize: contentTopSize ? contentTopSize : configStyles.NEWAUTOCOMPLETE.contentTopSize,
|
|
2744
|
+
height: contentTopHeight ? contentTopHeight : configStyles.NEWAUTOCOMPLETE.contentTopHeight,
|
|
2745
|
+
border: contentTopBorder ? contentTopBorder : configStyles.NEWAUTOCOMPLETE.contentTopBorder,
|
|
2746
|
+
padding: contentTopPadding ? contentTopPadding : configStyles.NEWAUTOCOMPLETE.contentTopPadding,
|
|
2747
|
+
display: contentTopDisplay ? contentTopDisplay : configStyles.NEWAUTOCOMPLETE.contentTopDisplay,
|
|
2748
|
+
fontWeight: contentTopWeight ? contentTopWeight : configStyles.NEWAUTOCOMPLETE.contentTopWeight,
|
|
2749
|
+
borderRadius: contentTopRadius ? contentTopRadius : configStyles.NEWAUTOCOMPLETE.contentTopRadius,
|
|
2750
|
+
maxWidth: contentTopMaxWidth ? contentTopMaxWidth : configStyles.NEWAUTOCOMPLETE.contentTopMaxWidth,
|
|
2751
|
+
boxSizing: contentTopBoxSizing ? contentTopBoxSizing : configStyles.NEWAUTOCOMPLETE.contentTopBoxSizing,
|
|
2752
|
+
lineHeight: contentTopLineHeight ? contentTopLineHeight : configStyles.NEWAUTOCOMPLETE.contentTopLineHeight,
|
|
2753
|
+
flexDirection: contentTopDirection ? contentTopDirection : configStyles.NEWAUTOCOMPLETE.contentTopDirection,
|
|
2754
|
+
borderColor: errorMessage ? errorColor ? errorColor : configStyles.NEWAUTOCOMPLETE.errorColor : isFocus ? contentTopBorderActiveColor ? contentTopBorderActiveColor : configStyles.NEWAUTOCOMPLETE.contentTopBorderActiveColor : isHover ? contentTopBorderHoverColor ? contentTopBorderHoverColor : configStyles.NEWAUTOCOMPLETE.contentTopBorderHoverColor : contentTopBorderColor ? contentTopBorderColor : configStyles.NEWAUTOCOMPLETE.contentTopBorderColor
|
|
2755
|
+
}
|
|
2756
|
+
}, props)), errorMessage ? /*#__PURE__*/React__default.createElement("span", {
|
|
2757
|
+
style: {
|
|
2758
|
+
color: errorColor ? errorColor : configStyles.NEWAUTOCOMPLETE.errorColor,
|
|
2759
|
+
fontSize: errorSize ? errorSize : configStyles.NEWAUTOCOMPLETE.errorSize
|
|
2760
|
+
}
|
|
2761
|
+
}, errorMessage) : '', optionList));
|
|
2378
2762
|
};
|
|
2379
|
-
|
|
2380
|
-
size: PropTypes.string,
|
|
2763
|
+
NewAutocomplete.propTypes = {
|
|
2381
2764
|
label: PropTypes.string,
|
|
2382
|
-
width: PropTypes.string,
|
|
2383
|
-
height: PropTypes.string,
|
|
2384
|
-
resize: PropTypes.string,
|
|
2385
|
-
border: PropTypes.string,
|
|
2386
|
-
radius: PropTypes.string,
|
|
2387
2765
|
required: PropTypes.bool,
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
maxWidth: PropTypes.string,
|
|
2391
|
-
boxSizing: PropTypes.string,
|
|
2392
|
-
minHeight: PropTypes.string,
|
|
2393
|
-
maxHeight: PropTypes.string,
|
|
2394
|
-
maxLength: PropTypes.number,
|
|
2766
|
+
disabled: PropTypes.bool,
|
|
2767
|
+
errorSize: PropTypes.string,
|
|
2395
2768
|
labelSize: PropTypes.string,
|
|
2769
|
+
errorColor: PropTypes.string,
|
|
2396
2770
|
labelColor: PropTypes.string,
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2771
|
+
searchCount: PropTypes.number,
|
|
2772
|
+
placeHolder: PropTypes.string,
|
|
2773
|
+
labelWeight: PropTypes.number,
|
|
2774
|
+
errorMessage: PropTypes.string,
|
|
2400
2775
|
labelDisplay: PropTypes.string,
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2776
|
+
autoComplete: PropTypes.string,
|
|
2777
|
+
contentDisplay: PropTypes.string,
|
|
2778
|
+
contentTopSize: PropTypes.string,
|
|
2779
|
+
contentPosition: PropTypes.string,
|
|
2780
|
+
labelLineHeight: PropTypes.string,
|
|
2781
|
+
contentTopColor: PropTypes.string,
|
|
2782
|
+
contentDirection: PropTypes.string,
|
|
2783
|
+
contentTopWeight: PropTypes.number,
|
|
2784
|
+
contentTopRadius: PropTypes.string,
|
|
2785
|
+
contentTopHeight: PropTypes.string,
|
|
2786
|
+
contentTopBorder: PropTypes.string,
|
|
2787
|
+
getItem: PropTypes.func.isRequired,
|
|
2788
|
+
contentTopDisplay: PropTypes.string,
|
|
2789
|
+
contentTopPadding: PropTypes.string,
|
|
2790
|
+
contentBottomLeft: PropTypes.string,
|
|
2791
|
+
options: PropTypes.array.isRequired,
|
|
2792
|
+
labelMarginBottom: PropTypes.string,
|
|
2793
|
+
labelRequiredColor: PropTypes.string,
|
|
2794
|
+
labelTextTransform: PropTypes.string,
|
|
2795
|
+
showOptionDuration: PropTypes.string,
|
|
2796
|
+
contentTopMaxWidth: PropTypes.string,
|
|
2797
|
+
contentBottomWidth: PropTypes.string,
|
|
2798
|
+
contentTopDirection: PropTypes.string,
|
|
2799
|
+
contentTopBoxSizing: PropTypes.string,
|
|
2800
|
+
contentBottomZindex: PropTypes.number,
|
|
2801
|
+
contentBottomRadius: PropTypes.string,
|
|
2802
|
+
contentTopLineHeight: PropTypes.string,
|
|
2803
|
+
contentTopBorderColor: PropTypes.string,
|
|
2804
|
+
contentBottomRowColor: PropTypes.string,
|
|
2805
|
+
contentBottomMaxWidth: PropTypes.string,
|
|
2806
|
+
contentBottomOverflow: PropTypes.string,
|
|
2807
|
+
contentBottomPosition: PropTypes.string,
|
|
2808
|
+
contentBottomMinHeight: PropTypes.string,
|
|
2809
|
+
contentBottomBoxShadow: PropTypes.string,
|
|
2810
|
+
contentBottomRowHeight: PropTypes.string,
|
|
2811
|
+
contentBottomRowCursor: PropTypes.string,
|
|
2812
|
+
contentBottomRowDisplay: PropTypes.string,
|
|
2813
|
+
contentBottomRowPadding: PropTypes.string,
|
|
2814
|
+
contentBottomRowFontSize: PropTypes.string,
|
|
2815
|
+
contentBottomRowBoxSizing: PropTypes.string,
|
|
2816
|
+
contentBottomInnerDisplay: PropTypes.string,
|
|
2817
|
+
contentBottomRowFontWeight: PropTypes.number,
|
|
2818
|
+
contentBottomRowLineHeight: PropTypes.string,
|
|
2819
|
+
contentBottomRowAlignItems: PropTypes.string,
|
|
2820
|
+
contentBottomRowTransition: PropTypes.string,
|
|
2821
|
+
contentBottomRowHoverColor: PropTypes.string,
|
|
2822
|
+
contentTopBorderHoverColor: PropTypes.string,
|
|
2823
|
+
contentTopBorderActiveColor: PropTypes.string,
|
|
2824
|
+
contentBottomInnerOverflowY: PropTypes.string,
|
|
2825
|
+
contentBottomInnerOverflowX: PropTypes.string,
|
|
2826
|
+
contentBottomInnerMaxHeight: PropTypes.string,
|
|
2827
|
+
contentBottomInnerDirection: PropTypes.string,
|
|
2828
|
+
contentBottomRowMarginBottom: PropTypes.string,
|
|
2829
|
+
contentBottomBackgroundColor: PropTypes.string,
|
|
2830
|
+
contentBottomRowBackgroundColor: PropTypes.string,
|
|
2831
|
+
contentBottomRowHoverBackgroundColor: PropTypes.string
|
|
2832
|
+
};
|
|
2833
|
+
NewAutocomplete.defaultProps = {
|
|
2834
|
+
searchCount: 3,
|
|
2835
|
+
disabled: false
|
|
2407
2836
|
};
|
|
2408
2837
|
|
|
2409
|
-
export { Autocomplate, Button, Captcha, Checkbox, File, Input, InputTypes, Modal, Pagination, Radio, Select, SingleCheckbox, Stepper, Table, Textarea, Toaster, Tooltip, Typography, TypographyType, toast };
|
|
2838
|
+
export { Autocomplate, Button, Captcha, Checkbox, File, Input, InputTypes, Modal, NewAutocomplete, Pagination, Radio, Select, SingleCheckbox, Stepper, Table, Textarea, Toaster, Tooltip, Typography, TypographyType, toast };
|