@xaypay/tui 0.0.62 → 0.0.63
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 +348 -74
- package/dist/index.js +350 -73
- package/package.json +1 -1
- package/src/assets/icons/toaster-close.svg +3 -0
- package/src/assets/icons/toaster-error.svg +3 -0
- package/src/assets/icons/toaster-info.svg +3 -0
- package/src/assets/icons/toaster-success.svg +3 -0
- package/src/assets/icons/toaster-warning.svg +3 -0
- package/src/components/file/index.js +9 -6
- package/src/components/icon/ToasterClose.js +19 -0
- package/src/components/icon/ToasterError.js +19 -0
- package/src/components/icon/ToasterInfo.js +19 -0
- package/src/components/icon/ToasterSuccess.js +19 -0
- package/src/components/icon/ToasterWarning.js +19 -0
- package/src/components/icon/index.js +5 -0
- package/src/components/input/index.js +3 -1
- package/src/components/input/input.stories.js +5 -0
- package/src/components/select/index.js +10 -3
- package/src/components/select/select.module.css +2 -2
- package/src/components/toaster/Toast.js +179 -0
- package/src/components/toaster/index.js +72 -0
- package/src/components/toaster/toaster.module.css +188 -0
- package/src/components/toaster/toaster.stories.js +296 -0
- package/src/index.js +2 -1
- package/src/stories/configuration.stories.mdx +16 -0
- package/src/stories/static/select-usage.png +0 -0
- package/src/stories/static/toaster-container-usage.png +0 -0
- package/src/stories/static/toaster-usage.png +0 -0
- package/src/stories/usage.stories.mdx +16 -1
package/dist/index.es.js
CHANGED
|
@@ -3,6 +3,7 @@ import React__default, { useState, useEffect, useRef, createRef, useMemo } from
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import classnames from 'classnames';
|
|
5
5
|
import styled, { keyframes, css } from 'styled-components';
|
|
6
|
+
import ReactDOM from 'react-dom';
|
|
6
7
|
|
|
7
8
|
function styleInject(css, ref) {
|
|
8
9
|
if ( ref === void 0 ) ref = {};
|
|
@@ -31,12 +32,12 @@ function styleInject(css, ref) {
|
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
|
|
34
|
-
var css_248z$
|
|
35
|
-
var styles$
|
|
36
|
-
styleInject(css_248z$
|
|
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{bottom:0;display:block;height:190px;left:0;margin:auto;max-height:190px;position:absolute;right:0;top:0;width:auto}.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
|
+
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
|
+
styleInject(css_248z$d);
|
|
37
38
|
|
|
38
|
-
var css_248z$
|
|
39
|
-
styleInject(css_248z$
|
|
39
|
+
var css_248z$c = "";
|
|
40
|
+
styleInject(css_248z$c);
|
|
40
41
|
|
|
41
42
|
const File = ({
|
|
42
43
|
name,
|
|
@@ -99,16 +100,16 @@ const File = ({
|
|
|
99
100
|
document.querySelector(`.${name}`).value = "";
|
|
100
101
|
};
|
|
101
102
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("p", {
|
|
102
|
-
className: `${styles$
|
|
103
|
+
className: `${styles$c['file-form-title']} ile-form-title-rem`
|
|
103
104
|
}, label, " ", required && /*#__PURE__*/React__default.createElement("sup", {
|
|
104
105
|
style: {
|
|
105
106
|
color: "#ee0000"
|
|
106
107
|
}
|
|
107
108
|
}, "*")), /*#__PURE__*/React__default.createElement("div", {
|
|
108
|
-
className: classnames(`${styles$
|
|
109
|
+
className: classnames(`${styles$c['file-form-wrap']} file-form-wrap-rem`, image ? styles$c['active'] : '')
|
|
109
110
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
110
111
|
onChange: e => console.log(e),
|
|
111
|
-
className: `${styles$
|
|
112
|
+
className: `${styles$c['file-form']} file-form-rem ${errorMessage ? styles$c['error'] : ''}`,
|
|
112
113
|
onClick: () => document.querySelector(`.${name}`).click()
|
|
113
114
|
}, /*#__PURE__*/React__default.createElement("input", {
|
|
114
115
|
hidden: true,
|
|
@@ -117,23 +118,23 @@ const File = ({
|
|
|
117
118
|
disabled: disabled,
|
|
118
119
|
onChange: e => handleCheckFile(e)
|
|
119
120
|
}), image ? /*#__PURE__*/React__default.createElement("div", {
|
|
120
|
-
className: `${styles$
|
|
121
|
+
className: `${styles$c['upload-file-content']} upload-file-content-rem`
|
|
121
122
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
122
123
|
src: image,
|
|
123
124
|
alt: fileName
|
|
124
125
|
})) : /*#__PURE__*/React__default.createElement("div", {
|
|
125
|
-
className: `${styles$
|
|
126
|
+
className: `${styles$c['file-form-inner-upload']} ile-form-inner-upload-rem`
|
|
126
127
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
127
128
|
src: "../../assets/upload.svg",
|
|
128
129
|
alt: ""
|
|
129
130
|
}), /*#__PURE__*/React__default.createElement("span", {
|
|
130
|
-
className: `${styles$
|
|
131
|
+
className: `${styles$c['upload-info']} upload-info-rem`
|
|
131
132
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
132
|
-
className: `${styles$
|
|
133
|
+
className: `${styles$c['upload-info-txt']} upload-info-txt-rem`
|
|
133
134
|
}, "\u0532\u0565\u057C\u0576\u0565\u056C")), /*#__PURE__*/React__default.createElement("span", {
|
|
134
|
-
className: `${styles$
|
|
135
|
-
}, "\u0531\u057C\u0561\u057E\u0565\u056C\u0561\u0563\u0578\u0582\u0575\u0576\u0568 ", maxSize, "\u0544\u0532 ( ", fileExtensions.toString().split(',').join(', '), " )"))), /*#__PURE__*/React__default.createElement("div", {
|
|
136
|
-
className: `${styles$
|
|
135
|
+
className: `${styles$c['upload-info-size']} upload-info-size-rem`
|
|
136
|
+
}, "\u0531\u057C\u0561\u057E\u0565\u056C\u0561\u0563\u0578\u0582\u0575\u0576\u0568 ", maxSize, "\u0544\u0532 ( ", fileExtensions.toString().split(',').join(', '), " )"))), !disabled && /*#__PURE__*/React__default.createElement("div", {
|
|
137
|
+
className: `${styles$c['delete-upload-icon']} delete-upload-icon-rem`,
|
|
137
138
|
onClick: handleRemoveFile
|
|
138
139
|
}, /*#__PURE__*/React__default.createElement("i", {
|
|
139
140
|
className: "icon-delete"
|
|
@@ -160,9 +161,9 @@ File.defaultProps = {
|
|
|
160
161
|
fileExtensions: ['jpg', 'jpeg', 'png', 'pdf']
|
|
161
162
|
};
|
|
162
163
|
|
|
163
|
-
var css_248z$
|
|
164
|
-
var styles$
|
|
165
|
-
styleInject(css_248z$
|
|
164
|
+
var css_248z$b = ".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}";
|
|
165
|
+
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"};
|
|
166
|
+
styleInject(css_248z$b);
|
|
166
167
|
|
|
167
168
|
function _extends() {
|
|
168
169
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -179,9 +180,9 @@ function _extends() {
|
|
|
179
180
|
return _extends.apply(this, arguments);
|
|
180
181
|
}
|
|
181
182
|
|
|
182
|
-
var css_248z$
|
|
183
|
-
var styles$
|
|
184
|
-
styleInject(css_248z$
|
|
183
|
+
var css_248z$a = ".checkbox-module_checkbox-wrap__Xrg-m{align-items:center;cursor:pointer;display:inline-flex;flex-direction:row;flex-wrap:nowrap;margin:0 6px;padding-left:24px;position:relative}.checkbox-module_checkbox-wrap__Xrg-m>input{height:0;opacity:0;position:absolute;width:0}.checkbox-module_checkbox-wrap__Xrg-m .checkbox-module_checkmark__M8DY6{border:1px solid #d9d9d9;border-radius:3px;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}";
|
|
184
|
+
var styles$a = {"checkbox-wrap":"checkbox-module_checkbox-wrap__Xrg-m","checkmark":"checkbox-module_checkmark__M8DY6"};
|
|
185
|
+
styleInject(css_248z$a);
|
|
185
186
|
|
|
186
187
|
const Checkbox = ({
|
|
187
188
|
disabled,
|
|
@@ -196,7 +197,7 @@ const Checkbox = ({
|
|
|
196
197
|
onClick,
|
|
197
198
|
...props
|
|
198
199
|
}) => {
|
|
199
|
-
const classProps = classnames(styles$
|
|
200
|
+
const classProps = classnames(styles$a.checkbox, className, 'checkbox-input-rem');
|
|
200
201
|
const parseData = jsonData.length !== 0 ? JSON.parse(jsonData) : [];
|
|
201
202
|
const [data, setData] = useState(parseData);
|
|
202
203
|
useEffect(() => {
|
|
@@ -229,7 +230,7 @@ const Checkbox = ({
|
|
|
229
230
|
} : '';
|
|
230
231
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, data.map(element => {
|
|
231
232
|
return /*#__PURE__*/React__default.createElement("label", {
|
|
232
|
-
className: `${styles$
|
|
233
|
+
className: `${styles$a["checkbox-wrap"]} checkbox-wrap-rem`,
|
|
233
234
|
key: element.value
|
|
234
235
|
}, /*#__PURE__*/React__default.createElement("input", _extends({
|
|
235
236
|
type: "checkbox",
|
|
@@ -243,9 +244,9 @@ const Checkbox = ({
|
|
|
243
244
|
onClick: onClick ? onClick : () => {},
|
|
244
245
|
defaultChecked: element.checked
|
|
245
246
|
}, props)), /*#__PURE__*/React__default.createElement("span", {
|
|
246
|
-
className: `${styles$
|
|
247
|
+
className: `${styles$a["checkmark"]} checkmark-rem`
|
|
247
248
|
}), element[keyNames.label] ? /*#__PURE__*/React__default.createElement("label", {
|
|
248
|
-
className: styles$
|
|
249
|
+
className: styles$a.labelCheckbox,
|
|
249
250
|
for: element[keyNames.id]
|
|
250
251
|
}, element[keyNames.label]) : "");
|
|
251
252
|
}));
|
|
@@ -287,23 +288,23 @@ const Table = ({
|
|
|
287
288
|
return true;
|
|
288
289
|
} : "";
|
|
289
290
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
290
|
-
className: `${styles$
|
|
291
|
+
className: `${styles$b["table-wrap"]} table-wrap-rem`
|
|
291
292
|
}, config.isHeader && hearderData.map((header, key) => {
|
|
292
293
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
293
|
-
className: `${styles$
|
|
294
|
+
className: `${styles$b["table-top"]} table-top-rem`,
|
|
294
295
|
key: key
|
|
295
296
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
296
|
-
className: `${styles$
|
|
297
|
+
className: `${styles$b["table-items"]} table-items-rem`
|
|
297
298
|
}, header));
|
|
298
299
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
299
|
-
className: `${styles$
|
|
300
|
+
className: `${styles$b["table-bottom"]} table-bottom-rem`
|
|
300
301
|
}, tbodyData.map((item, key) => {
|
|
301
302
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
302
|
-
className: `${styles$
|
|
303
|
+
className: `${styles$b["table-bottom-inner"]} table-bottom-inner-rem`,
|
|
303
304
|
key: key
|
|
304
305
|
}, keyNames.map((keyName, keyNameKey) => {
|
|
305
306
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
306
|
-
className: `${styles$
|
|
307
|
+
className: `${styles$b["table-items"]} table-items-rem`,
|
|
307
308
|
key: keyNameKey
|
|
308
309
|
}, config.isCheckbox && config.isCheckbox.showCheckbox && config.isCheckbox.showCheckbox(item) && keyNameKey == 0 && /*#__PURE__*/React__default.createElement(Checkbox, {
|
|
309
310
|
onClick: e => {
|
|
@@ -319,7 +320,7 @@ const Table = ({
|
|
|
319
320
|
className: keyName.icon
|
|
320
321
|
}), item[keyName.name]));
|
|
321
322
|
}), actions && /*#__PURE__*/React__default.createElement("div", {
|
|
322
|
-
className: `${styles$
|
|
323
|
+
className: `${styles$b["table-items"]} table-items-rem`
|
|
323
324
|
}, actions.filter(a => a.show && a.show(item) || a.show === undefined).map((action, key) => {
|
|
324
325
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
325
326
|
key: key
|
|
@@ -355,9 +356,9 @@ Table.defaultProps = {
|
|
|
355
356
|
hearderData: []
|
|
356
357
|
};
|
|
357
358
|
|
|
358
|
-
var css_248z$
|
|
359
|
-
var styles$
|
|
360
|
-
styleInject(css_248z$
|
|
359
|
+
var css_248z$9 = ".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)}}";
|
|
360
|
+
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"};
|
|
361
|
+
styleInject(css_248z$9);
|
|
361
362
|
|
|
362
363
|
const _ = require('lodash');
|
|
363
364
|
const compereConfigs = () => {
|
|
@@ -487,42 +488,42 @@ const Modal = ({
|
|
|
487
488
|
selected,
|
|
488
489
|
children
|
|
489
490
|
}) => {
|
|
490
|
-
classnames(styles$
|
|
491
|
+
classnames(styles$9.modal, className);
|
|
491
492
|
const [select, setSelect] = useState(selected);
|
|
492
493
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
493
|
-
className: `${styles$
|
|
494
|
+
className: `${styles$9["modal-wrap"]} modal-wrap-rem`,
|
|
494
495
|
onClick: () => setShow(false)
|
|
495
496
|
}, type == "content" ? /*#__PURE__*/React__default.createElement("div", {
|
|
496
|
-
className: `${styles$
|
|
497
|
+
className: `${styles$9["modal-content"]} modal-content-rem`,
|
|
497
498
|
onClick: e => {
|
|
498
499
|
e.stopPropagation();
|
|
499
500
|
}
|
|
500
501
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
501
|
-
className: `${styles$
|
|
502
|
+
className: `${styles$9["modal-top"]} modal-top-rem`
|
|
502
503
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
503
|
-
className: `${styles$
|
|
504
|
+
className: `${styles$9["modal-title"]} modal-title-rem`
|
|
504
505
|
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
505
506
|
variant: TypographyType.p,
|
|
506
507
|
color: "#00236A"
|
|
507
508
|
}, headerText)), /*#__PURE__*/React__default.createElement("div", {
|
|
508
|
-
className: `${styles$
|
|
509
|
+
className: `${styles$9["close-btn"]} close-btn-rem`,
|
|
509
510
|
onClick: () => setShow(false)
|
|
510
511
|
}, /*#__PURE__*/React__default.createElement("i", {
|
|
511
512
|
className: "icon-close"
|
|
512
513
|
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
513
|
-
className: `${styles$
|
|
514
|
+
className: `${styles$9["modal-section"]} modal-section-rem`
|
|
514
515
|
}, children)) : type == "images" ? /*#__PURE__*/React__default.createElement("div", {
|
|
515
|
-
className: `${styles$
|
|
516
|
+
className: `${styles$9["modal-content"]} modal-content-rem`,
|
|
516
517
|
onClick: e => {
|
|
517
518
|
e.stopPropagation();
|
|
518
519
|
}
|
|
519
520
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
520
|
-
className: `${styles$
|
|
521
|
+
className: `${styles$9["close-btn"]} close-btn-rem`,
|
|
521
522
|
onClick: () => setShow(false)
|
|
522
523
|
}, /*#__PURE__*/React__default.createElement("i", {
|
|
523
524
|
className: "icon-close"
|
|
524
525
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
525
|
-
className: `${styles$
|
|
526
|
+
className: `${styles$9["modal-section"]} modal-section-rem`
|
|
526
527
|
}, /*#__PURE__*/React__default.createElement("div", null, select > 1 ? /*#__PURE__*/React__default.createElement("h1", {
|
|
527
528
|
onClick: () => setSelect(select - 1)
|
|
528
529
|
}, "-") : null, data.map(elem => {
|
|
@@ -548,9 +549,9 @@ Modal.propTypes = {
|
|
|
548
549
|
data: PropTypes.array
|
|
549
550
|
};
|
|
550
551
|
|
|
551
|
-
var css_248z$
|
|
552
|
-
var styles$
|
|
553
|
-
styleInject(css_248z$
|
|
552
|
+
var css_248z$8 = ".input-module_input-wrap__NunrE{position:relative;width:100%}.input-module_input-content__kP7lZ{display:flex;width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{background-color:inherit!important}.input-module_error-message-show__OrVSo{animation-fill-mode:forwards;animation-name:input-module_error-show__9MP6k}@keyframes input-module_error-show__9MP6k{to{bottom:-20px;transform:scaleX(1);-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);-o-transform:scaleX(1)}}";
|
|
553
|
+
var styles$8 = {"input-wrap":"input-module_input-wrap__NunrE","input-content":"input-module_input-content__kP7lZ","error-message-show":"input-module_error-message-show__OrVSo","error-show":"input-module_error-show__9MP6k"};
|
|
554
|
+
styleInject(css_248z$8);
|
|
554
555
|
|
|
555
556
|
const InputTypes = {
|
|
556
557
|
TEL: 'tel',
|
|
@@ -582,6 +583,7 @@ const Input = ({
|
|
|
582
583
|
errorLeft,
|
|
583
584
|
errorSize,
|
|
584
585
|
labelSize,
|
|
586
|
+
maxLength,
|
|
585
587
|
labelColor,
|
|
586
588
|
errorColor,
|
|
587
589
|
placeholder,
|
|
@@ -636,9 +638,9 @@ const Input = ({
|
|
|
636
638
|
setIsHover(false);
|
|
637
639
|
};
|
|
638
640
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
639
|
-
className: `${styles$
|
|
641
|
+
className: `${styles$8["input-wrap"]}`
|
|
640
642
|
}, label ? /*#__PURE__*/React__default.createElement("label", {
|
|
641
|
-
className: `${styles$
|
|
643
|
+
className: `${styles$8["input-title"]}`,
|
|
642
644
|
style: {
|
|
643
645
|
color: labelColor ? labelColor : configStyles.INPUT.labelColor,
|
|
644
646
|
fontSize: labelSize ? labelSize : configStyles.INPUT.labelSize,
|
|
@@ -652,7 +654,7 @@ const Input = ({
|
|
|
652
654
|
color: "#ee0000"
|
|
653
655
|
}
|
|
654
656
|
}, "*")) : '', /*#__PURE__*/React__default.createElement("div", {
|
|
655
|
-
className: `${styles$
|
|
657
|
+
className: `${styles$8["input-content"]}`,
|
|
656
658
|
style: {
|
|
657
659
|
width: width ? width : configStyles.INPUT.width,
|
|
658
660
|
borderRadius: radius ? radius : configStyles.INPUT.radius,
|
|
@@ -690,7 +692,7 @@ const Input = ({
|
|
|
690
692
|
backgroundColor: disabled ? '#FBFBFB' : backgroundColor ? backgroundColor : configStyles.INPUT.backgroundColor
|
|
691
693
|
}
|
|
692
694
|
}, "+374") : '', /*#__PURE__*/React__default.createElement("input", _extends({}, props, {
|
|
693
|
-
value: value,
|
|
695
|
+
value: maxLength && value && value.length > maxLength ? value.substr(0, maxLength) : value,
|
|
694
696
|
className: classProps,
|
|
695
697
|
onChange: handleChange,
|
|
696
698
|
type: show ? 'text' : type,
|
|
@@ -761,6 +763,7 @@ Input.propTypes = {
|
|
|
761
763
|
errorSize: PropTypes.string,
|
|
762
764
|
errorLeft: PropTypes.string,
|
|
763
765
|
labelSize: PropTypes.string,
|
|
766
|
+
maxLength: PropTypes.number,
|
|
764
767
|
errorColor: PropTypes.string,
|
|
765
768
|
labelColor: PropTypes.string,
|
|
766
769
|
placeholder: PropTypes.string,
|
|
@@ -790,9 +793,9 @@ Input.defaultProps = {
|
|
|
790
793
|
type: "text"
|
|
791
794
|
};
|
|
792
795
|
|
|
793
|
-
var css_248z$
|
|
794
|
-
var styles$
|
|
795
|
-
styleInject(css_248z$
|
|
796
|
+
var css_248z$7 = ".radio-module_radio-wrap__-lO7V{align-items:center;cursor:pointer;display:inline-flex;flex-direction:row;flex-wrap:nowrap;margin:0 6px;padding-left:24px;position:relative}.radio-module_radio-wrap__-lO7V>input{height:0;opacity:0;position:absolute;width:0}.radio-module_radio-wrap__-lO7V .radio-module_radio-checkmark__Kvol0{border:1px solid #d9d9d9;border-radius:50%;display:inline-block;height:14px;left:0;margin-right:4px;position:absolute;top:0;transition:border-color .24s;vertical-align:top;width:14px}.radio-module_radio-wrap__-lO7V>.radio-module_radio-checkmark__Kvol0:after{background-color:#d9d9d9;border-radius:50%;bottom:0;content:\"\";height:8px;left:0;margin:auto;opacity:0;position:absolute;right:0;top:0;transition:opacity .24s,background-color .24s;width:8px}.radio-module_radio-wrap__-lO7V input:checked~.radio-module_radio-checkmark__Kvol0:after{background-color:#1890ff;opacity:1}.radio-module_radio-wrap__-lO7V:hover input~.radio-module_radio-checkmark__Kvol0:after{opacity:1}.radio-module_radio-wrap__-lO7V input:checked~.radio-module_radio-checkmark__Kvol0{border-color:#1890ff}";
|
|
797
|
+
var styles$7 = {"radio-wrap":"radio-module_radio-wrap__-lO7V","radio-checkmark":"radio-module_radio-checkmark__Kvol0"};
|
|
798
|
+
styleInject(css_248z$7);
|
|
796
799
|
|
|
797
800
|
const Radio = ({
|
|
798
801
|
disabled,
|
|
@@ -806,11 +809,11 @@ const Radio = ({
|
|
|
806
809
|
keyNames,
|
|
807
810
|
...props
|
|
808
811
|
}) => {
|
|
809
|
-
const classProps = classnames(styles$
|
|
812
|
+
const classProps = classnames(styles$7.checkbox, className);
|
|
810
813
|
const parseData = jsonData.length !== 0 ? JSON.parse(jsonData) : [];
|
|
811
814
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, parseData.map((element, id) => {
|
|
812
815
|
return /*#__PURE__*/React__default.createElement("label", {
|
|
813
|
-
className: `${styles$
|
|
816
|
+
className: `${styles$7["radio-wrap"]} radio-wrap-rem`,
|
|
814
817
|
key: element.value
|
|
815
818
|
}, /*#__PURE__*/React__default.createElement("input", _extends({
|
|
816
819
|
type: "radio",
|
|
@@ -821,9 +824,9 @@ const Radio = ({
|
|
|
821
824
|
value: value ? value : element.value,
|
|
822
825
|
name: name ? name : element.name
|
|
823
826
|
}, props)), /*#__PURE__*/React__default.createElement("span", {
|
|
824
|
-
className: `${styles$
|
|
827
|
+
className: `${styles$7["radio-checkmark"]} radio-checkmark-rem`
|
|
825
828
|
}), element.label ? /*#__PURE__*/React__default.createElement("span", {
|
|
826
|
-
className: styles$
|
|
829
|
+
className: styles$7.labelRadio
|
|
827
830
|
}, label ? label : element.label) : "");
|
|
828
831
|
}));
|
|
829
832
|
};
|
|
@@ -995,9 +998,9 @@ const SvgCloseIcon = ({
|
|
|
995
998
|
fill: "#3C393E"
|
|
996
999
|
}));
|
|
997
1000
|
|
|
998
|
-
var css_248z$
|
|
999
|
-
var styles$
|
|
1000
|
-
styleInject(css_248z$
|
|
1001
|
+
var css_248z$6 = ".select-module_select-content__GCMDX{display:flex;flex-direction:column;position:relative}.select-module_select-content-top__Aw-fB{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.select-module_select-content-bottom__ueZCR{animation:select-module_select-show__391hQ .64s linear forwards;-webkit-animation:select-module_select-show__391hQ .64s linear forwards;left:0;max-height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.select-module_select-content-bottom-inner__NWy2X{display:flex;flex-direction:column;max-height:234px;overflow-x:hidden;overflow-y:auto}.select-module_select-content-top-icon__MBrGK{align-items:center;box-sizing:border-box;display:flex;flex:0 0 auto;padding:0 5px 0 20px}.select-module_select-content-top-icon__MBrGK>div{align-items:center;display:flex;height:14px;justify-content:center;width:14px}.select-module_close-icon__SFNaJ{border-right:1px solid #eee;box-sizing:content-box;padding-right:9px}.select-module_arrow-icon__rjHt-{margin-left:9px;transform-origin:center;transition:all .64s ease;-webkit-transition:all .64s ease;-moz-transition:all .64s ease;-ms-transition:all .64s ease;-o-transition:all .64s ease}.select-module_select-content-bottom-row__eKq5L{align-items:center;display:flex;transition:background-color .24s,color .24s;-webkit-transition:background-color .24s,color .24s;-moz-transition:background-color .24s,color .24s;-ms-transition:background-color .24s,color .24s;-o-transition:background-color .24s,color .24s}.select-module_select-content-bottom-row__eKq5L:last-child{margin-bottom:0}@keyframes select-module_select-show__391hQ{to{max-height:234px}}";
|
|
1002
|
+
var styles$6 = {"select-content":"select-module_select-content__GCMDX","select-content-top":"select-module_select-content-top__Aw-fB","select-content-bottom":"select-module_select-content-bottom__ueZCR","select-show":"select-module_select-show__391hQ","select-content-bottom-inner":"select-module_select-content-bottom-inner__NWy2X","select-content-top-icon":"select-module_select-content-top-icon__MBrGK","close-icon":"select-module_close-icon__SFNaJ","arrow-icon":"select-module_arrow-icon__rjHt-","select-content-bottom-row":"select-module_select-content-bottom-row__eKq5L"};
|
|
1003
|
+
styleInject(css_248z$6);
|
|
1001
1004
|
|
|
1002
1005
|
const Select = ({
|
|
1003
1006
|
options,
|
|
@@ -1171,7 +1174,7 @@ const Select = ({
|
|
|
1171
1174
|
}, "*")) : "", /*#__PURE__*/React__default.createElement("div", {
|
|
1172
1175
|
ref: ref
|
|
1173
1176
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1174
|
-
className: styles$
|
|
1177
|
+
className: styles$6['select-content']
|
|
1175
1178
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1176
1179
|
style: {
|
|
1177
1180
|
cursor: disabled ? 'not-allowed' : cursor ? cursor : configStyles.SELECT.cursor,
|
|
@@ -1189,9 +1192,9 @@ const Select = ({
|
|
|
1189
1192
|
onClick: disabled ? _ => _ : _ => handleOpenClose(),
|
|
1190
1193
|
onMouseEnter: disabled ? _ => _ : _ => handleMouseEnter(),
|
|
1191
1194
|
onMouseLeave: disabled ? _ => _ : _ => handleMouseLeave(),
|
|
1192
|
-
className: `${styles$
|
|
1195
|
+
className: `${styles$6['select-content-top']}`
|
|
1193
1196
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1194
|
-
className: `${styles$
|
|
1197
|
+
className: `${styles$6['select-content-top-text']}`,
|
|
1195
1198
|
style: {
|
|
1196
1199
|
color: errorMessage ? errorColor ? errorColor : configStyles.SELECT.errorColor : isHover ? selectedHoverColor ? selectedHoverColor : configStyles.SELECT.selectedHoverColor : selectedColor ? selectedColor : configStyles.SELECT.selectedColor
|
|
1197
1200
|
}
|
|
@@ -1204,9 +1207,9 @@ const Select = ({
|
|
|
1204
1207
|
}
|
|
1205
1208
|
}
|
|
1206
1209
|
}) : defaultOption ? defaultOption : ''), /*#__PURE__*/React__default.createElement("div", {
|
|
1207
|
-
className: `${styles$
|
|
1208
|
-
}, multiple && newSelected.length > 1 && /*#__PURE__*/React__default.createElement("span", null, newSelected.length), newSelected && newSelected.length > 0 && /*#__PURE__*/React__default.createElement("div", {
|
|
1209
|
-
className: `${styles$
|
|
1210
|
+
className: `${styles$6['select-content-top-icon']}`
|
|
1211
|
+
}, !disabled && multiple && newSelected.length > 1 && /*#__PURE__*/React__default.createElement("span", null, newSelected.length), !disabled && newSelected && newSelected.length > 0 && /*#__PURE__*/React__default.createElement("div", {
|
|
1212
|
+
className: `${styles$6['close-icon']}`,
|
|
1210
1213
|
onClick: disabled ? _ => _ : handleClearSelect,
|
|
1211
1214
|
style: {
|
|
1212
1215
|
marginLeft: multiple && newSelected.length > 1 ? '17px' : '0px'
|
|
@@ -1215,17 +1218,17 @@ const Select = ({
|
|
|
1215
1218
|
style: {
|
|
1216
1219
|
transform: opened ? 'rotate(180deg)' : 'rotate(0deg)'
|
|
1217
1220
|
},
|
|
1218
|
-
className: `${styles$
|
|
1221
|
+
className: `${styles$6['arrow-icon']}`
|
|
1219
1222
|
}, arrowIcon ? arrowIcon : /*#__PURE__*/React__default.createElement(SvgArrow, null)))), opened && !disabled ? /*#__PURE__*/React__default.createElement("div", {
|
|
1220
1223
|
style: {
|
|
1221
1224
|
boxShadow: optionsBoxShadow ? optionsBoxShadow : configStyles.SELECT.optionsBoxShadow,
|
|
1222
1225
|
borderRadius: optionsBorderRadius ? optionsBorderRadius : configStyles.SELECT.optionsBorderRadius,
|
|
1223
1226
|
backgroundColor: optionsBackgroundColor ? optionsBackgroundColor : configStyles.SELECT.optionsBackgroundColor,
|
|
1224
|
-
top: parseFloat(selectedMinHeight
|
|
1227
|
+
top: selectedMinHeight ? selectedMinHeight.includes('rem') ? parseFloat(selectedMinHeight.substr(0, selectedMinHeight.length - 3)) + 0.6 + 'rem' : parseFloat(selectedMinHeight.substr(0, selectedMinHeight.length - 2)) + 6 + 'px' : configStyles.SELECT.selectedMinHeight.includes('rem') ? parseFloat(configStyles.SELECT.selectedMinHeight.substr(0, configStyles.SELECT.selectedMinHeight - 3)) + 0.6 + 'rem' : parseFloat(configStyles.SELECT.selectedMinHeight.substr(0, configStyles.SELECT.selectedMinHeight - 2)) + 6 + 'px'
|
|
1225
1228
|
},
|
|
1226
|
-
className: `${styles$
|
|
1229
|
+
className: `${styles$6['select-content-bottom']}`
|
|
1227
1230
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1228
|
-
className: `${styles$
|
|
1231
|
+
className: `${styles$6['select-content-bottom-inner']}`
|
|
1229
1232
|
}, existOptions && existOptions.length > 0 && existOptions.map((option, i) => {
|
|
1230
1233
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
1231
1234
|
key: i,
|
|
@@ -1234,7 +1237,7 @@ const Select = ({
|
|
|
1234
1237
|
onClick: disabled ? _ => _ : _ => handleSelectItem(option),
|
|
1235
1238
|
onMouseEnter: disabled ? _ => _ : e => handleMouseEnterOption(e),
|
|
1236
1239
|
onMouseLeave: disabled ? _ => _ : e => handleMouseLeaveOption(e),
|
|
1237
|
-
className: `${styles$
|
|
1240
|
+
className: `${styles$6['select-content-bottom-row']}`,
|
|
1238
1241
|
style: {
|
|
1239
1242
|
color: optionItemColor ? optionItemColor : configStyles.SELECT.optionItemColor,
|
|
1240
1243
|
cursor: optionItemCursor ? optionItemCursor : configStyles.SELECT.optionItemCursor,
|
|
@@ -1311,6 +1314,277 @@ Select.propTypes = {
|
|
|
1311
1314
|
optionItemBackgroudColorHover: PropTypes.string
|
|
1312
1315
|
};
|
|
1313
1316
|
|
|
1317
|
+
const SvgToasterInfo = ({
|
|
1318
|
+
title,
|
|
1319
|
+
titleId,
|
|
1320
|
+
...props
|
|
1321
|
+
}) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
1322
|
+
width: "1em",
|
|
1323
|
+
height: "1em",
|
|
1324
|
+
viewBox: "0 0 24 24",
|
|
1325
|
+
fill: "none",
|
|
1326
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1327
|
+
"aria-labelledby": titleId
|
|
1328
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
1329
|
+
id: titleId
|
|
1330
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
1331
|
+
d: "M12 18c.34 0 .625-.115.856-.346.23-.23.345-.515.344-.854v-4.83c0-.34-.115-.62-.346-.84A1.19 1.19 0 0 0 12 10.8c-.34 0-.625.115-.856.346-.23.23-.345.515-.344.854v4.83c0 .34.115.62.346.84.23.22.515.33.854.33Zm0-9.6c.34 0 .625-.115.856-.346.23-.23.345-.515.344-.854 0-.34-.115-.625-.346-.856A1.157 1.157 0 0 0 12 6c-.34 0-.625.115-.856.346-.23.23-.345.515-.344.854 0 .34.115.625.346.856.23.23.515.345.854.344ZM12 24c-1.66 0-3.22-.315-4.68-.946a12.137 12.137 0 0 1-3.81-2.564 12.11 12.11 0 0 1-2.564-3.81C.316 15.22 0 13.66 0 12c0-1.66.315-3.22.946-4.68.63-1.46 1.485-2.73 2.564-3.81A12.11 12.11 0 0 1 7.32.946C8.78.316 10.34 0 12 0c1.66 0 3.22.315 4.68.946 1.46.63 2.73 1.485 3.81 2.564a12.127 12.127 0 0 1 2.566 3.81c.63 1.46.945 3.02.944 4.68 0 1.66-.315 3.22-.946 4.68a12.137 12.137 0 0 1-2.564 3.81 12.127 12.127 0 0 1-3.81 2.566c-1.46.63-3.02.945-4.68.944Z",
|
|
1332
|
+
fill: "#00236A"
|
|
1333
|
+
}));
|
|
1334
|
+
|
|
1335
|
+
const SvgToasterError = ({
|
|
1336
|
+
title,
|
|
1337
|
+
titleId,
|
|
1338
|
+
...props
|
|
1339
|
+
}) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
1340
|
+
width: "1em",
|
|
1341
|
+
height: "1em",
|
|
1342
|
+
viewBox: "0 0 24 24",
|
|
1343
|
+
fill: "none",
|
|
1344
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1345
|
+
"aria-labelledby": titleId
|
|
1346
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
1347
|
+
id: titleId
|
|
1348
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
1349
|
+
d: "M12 0a12 12 0 1 1 0 24 12 12 0 0 1 0-24Zm0 16a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Zm0-11a1 1 0 0 0-.984.82L11 6v7l.016.18a1 1 0 0 0 1.968 0L13 13V6l-.016-.18A1 1 0 0 0 12 5Z",
|
|
1350
|
+
fill: "#E00"
|
|
1351
|
+
}));
|
|
1352
|
+
|
|
1353
|
+
const SvgToasterClose = ({
|
|
1354
|
+
title,
|
|
1355
|
+
titleId,
|
|
1356
|
+
...props
|
|
1357
|
+
}) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
1358
|
+
width: "1em",
|
|
1359
|
+
height: "1em",
|
|
1360
|
+
viewBox: "0 0 18 18",
|
|
1361
|
+
fill: "none",
|
|
1362
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1363
|
+
"aria-labelledby": titleId
|
|
1364
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
1365
|
+
id: titleId
|
|
1366
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
1367
|
+
d: "m10.47 8.95 7.29-7.29A1 1 0 0 0 16.35.25L9.06 7.54 1.77.24A1 1 0 0 0 .36 1.65l7.29 7.3-7.3 7.29a.999.999 0 1 0 1.41 1.41l7.3-7.29 7.29 7.29a1 1 0 0 0 1.41-1.41l-7.29-7.29Z",
|
|
1368
|
+
fill: "#D1D1D1"
|
|
1369
|
+
}));
|
|
1370
|
+
|
|
1371
|
+
const SvgToasterWarning = ({
|
|
1372
|
+
title,
|
|
1373
|
+
titleId,
|
|
1374
|
+
...props
|
|
1375
|
+
}) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
1376
|
+
width: "1em",
|
|
1377
|
+
height: "1em",
|
|
1378
|
+
viewBox: "0 0 24 21",
|
|
1379
|
+
fill: "none",
|
|
1380
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1381
|
+
"aria-labelledby": titleId
|
|
1382
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
1383
|
+
id: titleId
|
|
1384
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
1385
|
+
d: "M1.156 21a1.143 1.143 0 0 1-.994-.583 1.285 1.285 0 0 1-.16-.57c-.01-.204.043-.403.16-.597L10.978.583c.117-.194.268-.34.454-.437C11.616.049 11.806 0 12 0c.194 0 .384.049.57.146.185.097.336.243.452.437L23.838 19.25c.116.194.17.394.161.599a1.26 1.26 0 0 1-.161.568 1.14 1.14 0 0 1-.41.423 1.09 1.09 0 0 1-.584.16H1.156ZM12 17.5c.331 0 .61-.112.834-.336.224-.224.336-.5.335-.83 0-.331-.112-.608-.337-.832a1.128 1.128 0 0 0-.832-.335c-.331 0-.609.112-.834.336-.224.224-.336.5-.335.83 0 .33.112.608.337.832.224.224.502.336.832.335Zm0-3.5c.331 0 .61-.112.834-.336.224-.224.336-.5.335-.83v-3.5c0-.331-.112-.608-.337-.832A1.128 1.128 0 0 0 12 8.166c-.331 0-.609.112-.834.336-.224.224-.336.5-.335.83v3.5c0 .33.112.608.337.832.224.224.502.336.832.335Z",
|
|
1386
|
+
fill: "#FF8A00"
|
|
1387
|
+
}));
|
|
1388
|
+
|
|
1389
|
+
const SvgToasterSuccess = ({
|
|
1390
|
+
title,
|
|
1391
|
+
titleId,
|
|
1392
|
+
...props
|
|
1393
|
+
}) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
1394
|
+
width: "1em",
|
|
1395
|
+
height: "1em",
|
|
1396
|
+
viewBox: "0 0 24 24",
|
|
1397
|
+
fill: "none",
|
|
1398
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1399
|
+
"aria-labelledby": titleId
|
|
1400
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
1401
|
+
id: titleId
|
|
1402
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
1403
|
+
d: "M12 0a12 12 0 1 1 0 24 12 12 0 0 1 0-24Zm-1.495 14.367L7.84 11.7a1.028 1.028 0 1 0-1.455 1.455l3.394 3.395a1.024 1.024 0 0 0 1.456 0l7.028-7.03a1.03 1.03 0 1 0-1.453-1.456l-6.304 6.303Z",
|
|
1404
|
+
fill: "#0DA574"
|
|
1405
|
+
}));
|
|
1406
|
+
|
|
1407
|
+
var css_248z$5 = "#toaster-module_top-left__q0LcN{left:0;top:1em}#toaster-module_top-right__f-AFL{right:0;top:1em}#toaster-module_top-center__eVRbc{left:50%;top:1em;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}#toaster-module_bottom-left__b-YHI{bottom:1em;left:0}#toaster-module_bottom-right__g9ACP{bottom:1em;right:0}#toaster-module_bottom-center__4KcFe{bottom:1em;left:50%;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_top-left__q0LcN{left:0;top:1em}.toaster-module_top-right__f-AFL{right:0;top:1em}.toaster-module_top-center__eVRbc{left:50%;top:1em;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_bottom-left__b-YHI{bottom:1em;left:0}.toaster-module_bottom-right__g9ACP{bottom:1em;right:0}.toaster-module_bottom-center__4KcFe{bottom:1em;left:50%;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_notify-block__pRnEB{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.toaster-module_bounce-in-right__shR2D{-webkit-animation-name:toaster-module_bounceInRight__rSk5p;animation-name:toaster-module_bounceInRight__rSk5p}.toaster-module_bounce-out-right__48pyA{-webkit-animation-name:toaster-module_bounceOutRight__bmFGS;animation-name:toaster-module_bounceOutRight__bmFGS}@keyframes toaster-module_bounceInRight__rSk5p{0%{opacity:0;right:-100%}60%{opacity:1;right:40px}75%{right:0}90%{right:30px}to{right:20px}}@keyframes toaster-module_bounceOutRight__bmFGS{0%{opacity:1;right:20px}60%{opacity:1;right:60px}to{opacity:0;right:-100%}}.toaster-module_bounce-in-left__xoF-M{-webkit-animation-name:toaster-module_bounceInLeft__to59v;animation-name:toaster-module_bounceInLeft__to59v}.toaster-module_bounce-out-left__fDOZw{-webkit-animation-name:toaster-module_bounceOutLeft__k5QgO;animation-name:toaster-module_bounceOutLeft__k5QgO}@keyframes toaster-module_bounceInLeft__to59v{0%{left:-100%;opacity:0}60%{left:40px;opacity:1}75%{left:0}90%{left:30px}to{left:20px}}@keyframes toaster-module_bounceOutLeft__k5QgO{0%{left:20px;opacity:1}60%{left:60px;opacity:1}to{left:-100%;opacity:0}}";
|
|
1408
|
+
var styles$5 = {"top-left":"toaster-module_top-left__q0LcN","top-right":"toaster-module_top-right__f-AFL","top-center":"toaster-module_top-center__eVRbc","bottom-left":"toaster-module_bottom-left__b-YHI","bottom-right":"toaster-module_bottom-right__g9ACP","bottom-center":"toaster-module_bottom-center__4KcFe","notify-block":"toaster-module_notify-block__pRnEB","bounce-in-right":"toaster-module_bounce-in-right__shR2D","bounceInRight":"toaster-module_bounceInRight__rSk5p","bounce-out-right":"toaster-module_bounce-out-right__48pyA","bounceOutRight":"toaster-module_bounceOutRight__bmFGS","bounce-in-left":"toaster-module_bounce-in-left__xoF-M","bounceInLeft":"toaster-module_bounceInLeft__to59v","bounce-out-left":"toaster-module_bounce-out-left__fDOZw","bounceOutLeft":"toaster-module_bounceOutLeft__k5QgO"};
|
|
1409
|
+
styleInject(css_248z$5);
|
|
1410
|
+
|
|
1411
|
+
const ToasterType = {
|
|
1412
|
+
info: 'info',
|
|
1413
|
+
warn: 'warn',
|
|
1414
|
+
error: 'error',
|
|
1415
|
+
success: 'success'
|
|
1416
|
+
};
|
|
1417
|
+
const ToasterPosition = {
|
|
1418
|
+
topLeft: 'top-left',
|
|
1419
|
+
topRight: 'top-right',
|
|
1420
|
+
topCenter: 'top-center',
|
|
1421
|
+
bottomLeft: 'bottom-left',
|
|
1422
|
+
bottomRight: 'bottom-right',
|
|
1423
|
+
bottomCenter: 'bottom-center'
|
|
1424
|
+
};
|
|
1425
|
+
const Toast = ({
|
|
1426
|
+
type,
|
|
1427
|
+
title,
|
|
1428
|
+
timer,
|
|
1429
|
+
position,
|
|
1430
|
+
removeToast,
|
|
1431
|
+
description
|
|
1432
|
+
}) => {
|
|
1433
|
+
let timeoutCall;
|
|
1434
|
+
let timeoutClick;
|
|
1435
|
+
const ref = useRef(null);
|
|
1436
|
+
const [showToaster, setShowToaster] = useState(true);
|
|
1437
|
+
const handleToasterClick = e => {
|
|
1438
|
+
e.stopPropagation();
|
|
1439
|
+
};
|
|
1440
|
+
const handleCloseToaster = ref => {
|
|
1441
|
+
setShowToaster(false);
|
|
1442
|
+
timeoutClick = setTimeout(() => {
|
|
1443
|
+
removeToast(ref, position);
|
|
1444
|
+
}, 300);
|
|
1445
|
+
clearTimeout(timeoutCall);
|
|
1446
|
+
};
|
|
1447
|
+
useEffect(() => {
|
|
1448
|
+
timeoutCall = setTimeout(() => {
|
|
1449
|
+
handleCloseToaster(ref);
|
|
1450
|
+
}, timer);
|
|
1451
|
+
return () => {
|
|
1452
|
+
setShowToaster(true);
|
|
1453
|
+
clearTimeout(timeoutCall);
|
|
1454
|
+
clearTimeout(timeoutClick);
|
|
1455
|
+
};
|
|
1456
|
+
}, []);
|
|
1457
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
1458
|
+
ref: ref,
|
|
1459
|
+
onClick: handleToasterClick,
|
|
1460
|
+
style: {
|
|
1461
|
+
position: 'absolute',
|
|
1462
|
+
display: 'flex',
|
|
1463
|
+
width: '440px',
|
|
1464
|
+
height: '83px',
|
|
1465
|
+
borderRadius: '40px',
|
|
1466
|
+
alignItems: 'center',
|
|
1467
|
+
boxSizing: 'border-box',
|
|
1468
|
+
backgroundColor: '#FFFFFF',
|
|
1469
|
+
border: '2px solid #EEEEEE',
|
|
1470
|
+
padding: '14px 29px 14px 12px',
|
|
1471
|
+
justifyContent: 'space-between'
|
|
1472
|
+
},
|
|
1473
|
+
className: `
|
|
1474
|
+
${styles$5['notify-block']}
|
|
1475
|
+
${position === 'top-left' ? showToaster ? styles$5['bounce-in-left'] : styles$5['bounce-out-left'] : position === 'top-right' ? showToaster ? styles$5['bounce-in-right'] : styles$5['bounce-out-right'] : position === 'top-center' ? showToaster ? styles$5['bounce-in-left'] : styles$5['bounce-out-left'] : position === 'bottom-left' ? showToaster ? styles$5['bounce-in-left'] : styles$5['bounce-out-left'] : position === 'bottom-right' ? showToaster ? styles$5['bounce-in-right'] : styles$5['bounce-out-right'] : position === 'bottom-center' ? showToaster ? styles$5['bounce-in-left'] : styles$5['bounce-out-left'] : ''}
|
|
1476
|
+
`
|
|
1477
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1478
|
+
style: {
|
|
1479
|
+
display: 'flex',
|
|
1480
|
+
width: '60px',
|
|
1481
|
+
height: '60px',
|
|
1482
|
+
borderRadius: '30px',
|
|
1483
|
+
alignItems: 'center',
|
|
1484
|
+
justifyContent: 'center',
|
|
1485
|
+
backgroundColor: type === 'info' ? 'rgba(0, 35, 106, 0.05)' : type === 'warn' ? 'rgba(255, 138, 0, 0.05)' : type === 'error' ? 'rgba(238, 0, 0, 0.05)' : type === 'success' ? 'rgba(13, 165, 116, 0.05)' : ''
|
|
1486
|
+
}
|
|
1487
|
+
}, type === 'info' ? /*#__PURE__*/React__default.createElement(SvgToasterInfo, null) : type === 'warn' ? /*#__PURE__*/React__default.createElement(SvgToasterWarning, null) : type === 'error' ? /*#__PURE__*/React__default.createElement(SvgToasterError, null) : type === 'success' ? /*#__PURE__*/React__default.createElement(SvgToasterSuccess, null) : ''), /*#__PURE__*/React__default.createElement("div", {
|
|
1488
|
+
style: {
|
|
1489
|
+
height: '100%',
|
|
1490
|
+
width: 'calc(100% - 90px)'
|
|
1491
|
+
}
|
|
1492
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
1493
|
+
style: {
|
|
1494
|
+
fontWeight: 600,
|
|
1495
|
+
color: '#3C393E',
|
|
1496
|
+
fontSize: '16px',
|
|
1497
|
+
lineHeight: '22px',
|
|
1498
|
+
fontStyle: 'normal',
|
|
1499
|
+
fontFamily: ''
|
|
1500
|
+
}
|
|
1501
|
+
}, title ? title.length > 25 ? title.substr(0, 25) + '...' : title : ''), /*#__PURE__*/React__default.createElement("span", {
|
|
1502
|
+
style: {
|
|
1503
|
+
fontWeight: 500,
|
|
1504
|
+
color: '#3C393E',
|
|
1505
|
+
fontSize: '12px',
|
|
1506
|
+
lineHeight: '16px',
|
|
1507
|
+
fontStyle: 'normal',
|
|
1508
|
+
fontFamily: '',
|
|
1509
|
+
opacity: 0.8
|
|
1510
|
+
}
|
|
1511
|
+
}, description ? description.length > 120 ? description.substr(0, 120) + '...' : description : '')), /*#__PURE__*/React__default.createElement("div", {
|
|
1512
|
+
onClick: () => handleCloseToaster(ref),
|
|
1513
|
+
style: {
|
|
1514
|
+
width: '18px',
|
|
1515
|
+
height: '18px',
|
|
1516
|
+
cursor: 'pointer'
|
|
1517
|
+
}
|
|
1518
|
+
}, /*#__PURE__*/React__default.createElement(SvgToasterClose, null)));
|
|
1519
|
+
};
|
|
1520
|
+
Toast.propTypes = {
|
|
1521
|
+
description: PropTypes.string,
|
|
1522
|
+
title: PropTypes.string.isRequired,
|
|
1523
|
+
timer: PropTypes.number.isRequired,
|
|
1524
|
+
removeToast: PropTypes.func.isRequired,
|
|
1525
|
+
type: PropTypes.oneOf(Object.values(ToasterType)).isRequired,
|
|
1526
|
+
position: PropTypes.oneOf(Object.values(ToasterPosition)).isRequired
|
|
1527
|
+
};
|
|
1528
|
+
|
|
1529
|
+
let toastify;
|
|
1530
|
+
const removeToast = (ref, position) => {
|
|
1531
|
+
const parent = document.getElementById(styles$5[position]);
|
|
1532
|
+
const node = ReactDOM.findDOMNode(ref.current);
|
|
1533
|
+
const removeElem = node.parentNode;
|
|
1534
|
+
parent.removeChild(removeElem);
|
|
1535
|
+
if (!parent.hasChildNodes()) {
|
|
1536
|
+
toastify.removeChild(parent);
|
|
1537
|
+
}
|
|
1538
|
+
};
|
|
1539
|
+
const createToast = ({
|
|
1540
|
+
type,
|
|
1541
|
+
title,
|
|
1542
|
+
timer,
|
|
1543
|
+
position,
|
|
1544
|
+
description
|
|
1545
|
+
}) => {
|
|
1546
|
+
let toastParentBlock;
|
|
1547
|
+
const toastBlock = document.createElement('div');
|
|
1548
|
+
toastBlock.style.position = 'relative';
|
|
1549
|
+
toastBlock.style.flexShrink = 0;
|
|
1550
|
+
toastBlock.style.width = '440px';
|
|
1551
|
+
toastBlock.style.height = '83px';
|
|
1552
|
+
toastBlock.style.marginBottom = '20px';
|
|
1553
|
+
const newElem = /*#__PURE__*/React__default.createElement(Toast, {
|
|
1554
|
+
type,
|
|
1555
|
+
timer,
|
|
1556
|
+
title,
|
|
1557
|
+
position,
|
|
1558
|
+
removeToast,
|
|
1559
|
+
description
|
|
1560
|
+
});
|
|
1561
|
+
ReactDOM.render(newElem, toastBlock);
|
|
1562
|
+
if (!toastify) {
|
|
1563
|
+
toastify = document.getElementById('toastify');
|
|
1564
|
+
}
|
|
1565
|
+
if (!document.getElementById(styles$5[position])) {
|
|
1566
|
+
toastParentBlock = document.createElement('div');
|
|
1567
|
+
toastParentBlock.style.position = 'fixed';
|
|
1568
|
+
toastParentBlock.style.display = 'flex';
|
|
1569
|
+
toastParentBlock.style.zIndex = 99999;
|
|
1570
|
+
toastParentBlock.style.flexDirection = position === 'top-left' || position === 'top-right' || position === 'top-center' ? 'column-reverse' : 'column';
|
|
1571
|
+
toastParentBlock.setAttribute('id', styles$5[position]);
|
|
1572
|
+
toastParentBlock.appendChild(toastBlock);
|
|
1573
|
+
toastify.appendChild(toastParentBlock);
|
|
1574
|
+
} else {
|
|
1575
|
+
document.getElementById(styles$5[position]).appendChild(toastBlock);
|
|
1576
|
+
}
|
|
1577
|
+
};
|
|
1578
|
+
const Toaster = () => {
|
|
1579
|
+
const handleToasterClick = e => {
|
|
1580
|
+
e.stopPropagation();
|
|
1581
|
+
};
|
|
1582
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
1583
|
+
onClick: handleToasterClick,
|
|
1584
|
+
id: "toastify"
|
|
1585
|
+
});
|
|
1586
|
+
};
|
|
1587
|
+
|
|
1314
1588
|
var ReactInfoIcon = "<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M8 0C3.58214 0 0 3.58214 0 8C0 12.4179 3.58214 16 8 16C12.4179 16 16 12.4179 16 8C16 3.58214 12.4179 0 8 0ZM8.57143 11.8571C8.57143 11.9357 8.50714 12 8.42857 12H7.57143C7.49286 12 7.42857 11.9357 7.42857 11.8571V7C7.42857 6.92143 7.49286 6.85714 7.57143 6.85714H8.42857C8.50714 6.85714 8.57143 6.92143 8.57143 7V11.8571ZM8 5.71429C7.7757 5.70971 7.56213 5.61739 7.40513 5.45714C7.24812 5.2969 7.16018 5.08149 7.16018 4.85714C7.16018 4.6328 7.24812 4.41739 7.40513 4.25714C7.56213 4.0969 7.7757 4.00458 8 4C8.2243 4.00458 8.43787 4.0969 8.59488 4.25714C8.75189 4.41739 8.83982 4.6328 8.83982 4.85714C8.83982 5.08149 8.75189 5.2969 8.59488 5.45714C8.43787 5.61739 8.2243 5.70971 8 5.71429Z\" fill=\"#D1D1D1\"/>\n</svg>";
|
|
1315
1589
|
|
|
1316
1590
|
var css_248z$4 = ".tooltip-module_tooltip-block__v8U9u{align-items:center;display:flex;justify-content:center;position:relative}.tooltip-module_tooltip__emM6A{padding:10px;position:absolute;z-index:1}.tooltip-module_tooltip-rel__to9gq{align-items:center;border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;display:flex;height:auto;justify-content:center;min-height:10px;min-width:30px;position:relative;width:auto}.tooltip-module_tooltip-decor__qvt7t{border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;height:10px;position:absolute;transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);width:10px;z-index:-1}";
|
|
@@ -1806,4 +2080,4 @@ Autocomplate.defaultProps = {
|
|
|
1806
2080
|
required: false
|
|
1807
2081
|
};
|
|
1808
2082
|
|
|
1809
|
-
export { Autocomplate, Button, Captcha, Checkbox, File, Input, InputTypes, Modal, Pagination, Radio, Select, SelectCheckbox, Stepper, Table, Tooltip, Typography, TypographyType };
|
|
2083
|
+
export { Autocomplate, Button, Captcha, Checkbox, File, Input, InputTypes, Modal, Pagination, Radio, Select, SelectCheckbox, Stepper, Table, Toaster, Tooltip, Typography, TypographyType, createToast };
|