@xaypay/tui 0.0.14 → 0.0.16

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 CHANGED
@@ -1,4 +1,4 @@
1
- import React$1, { useState, useMemo, useEffect, React as React$2 } from 'react';
1
+ import React, { useState, useMemo, useEffect } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classnames from 'classnames';
4
4
  import styled from 'styled-components';
@@ -7,14 +7,12 @@ function _extends() {
7
7
  _extends = Object.assign ? Object.assign.bind() : function (target) {
8
8
  for (var i = 1; i < arguments.length; i++) {
9
9
  var source = arguments[i];
10
-
11
10
  for (var key in source) {
12
11
  if (Object.prototype.hasOwnProperty.call(source, key)) {
13
12
  target[key] = source[key];
14
13
  }
15
14
  }
16
15
  }
17
-
18
16
  return target;
19
17
  };
20
18
  return _extends.apply(this, arguments);
@@ -47,9 +45,9 @@ function styleInject(css, ref) {
47
45
  }
48
46
  }
49
47
 
50
- var css_248z$9 = ".button-module_btn__ffRtT{border:none;border-radius:6px;box-sizing:border-box;cursor:pointer;font-size:16px;line-height:20px;min-height:46px;outline:none;overflow:hidden;padding:12px 20px;text-transform:capitalize;transition:background-color .24s,color .24s}.button-module_btn__ffRtT.button-module_full-size__vmV2E{width:100%}.button-module_btn__ffRtT.button-module_content-size__f7JSE{width:auto}.button-module_btn__ffRtT.button-module_type-filled__BiyVo{background-color:#00236a;color:#fff}.button-module_btn__ffRtT.button-module_type-filled__BiyVo:hover{background-color:#001745}.button-module_btn__ffRtT.button-module_type-filled__BiyVo:disabled{background-color:#eee;color:#3c393e;pointer-events:none}.button-module_btn__ffRtT.button-module_type-outline__RpZ2V{background-color:#fff;box-shadow:inset 0 0 0 2px #00236a}.button-module_btn__ffRtT.button-module_type-outline__RpZ2V:hover{background-color:#001745;color:#fff}.button-module_btn__ffRtT.button-module_type-outline__RpZ2V:disabled{box-shadow:inset 0 0 0 2px #eee;color:#3c393e;pointer-events:none}";
51
- var styles$7 = {"btn":"button-module_btn__ffRtT","full-size":"button-module_full-size__vmV2E","content-size":"button-module_content-size__f7JSE","size-default":"button-module_size-default__ydEgl","type-filled":"button-module_type-filled__BiyVo","with-icon":"button-module_with-icon__mfKU-","type-outline":"button-module_type-outline__RpZ2V"};
52
- styleInject(css_248z$9);
48
+ var css_248z$a = ".button-module_btn__ffRtT{border:none;border-radius:6px;box-sizing:border-box;cursor:pointer;font-size:16px;line-height:20px;min-height:46px;outline:none;overflow:hidden;padding:12px 20px;text-transform:capitalize;transition:background-color .24s,color .24s}.button-module_btn__ffRtT.button-module_full-size__vmV2E{width:100%}.button-module_btn__ffRtT.button-module_content-size__f7JSE{width:auto}.button-module_btn__ffRtT.button-module_type-filled__BiyVo{background-color:#00236a;color:#fff}.button-module_btn__ffRtT.button-module_type-filled__BiyVo:hover{background-color:#001745}.button-module_btn__ffRtT.button-module_type-filled__BiyVo:disabled{background-color:#eee;color:#3c393e;pointer-events:none}.button-module_btn__ffRtT.button-module_type-outline__RpZ2V{background-color:#fff;box-shadow:inset 0 0 0 2px #00236a}.button-module_btn__ffRtT.button-module_type-outline__RpZ2V:hover{background-color:#001745;color:#fff}.button-module_btn__ffRtT.button-module_type-outline__RpZ2V:disabled{box-shadow:inset 0 0 0 2px #eee;color:#3c393e;pointer-events:none}";
49
+ var styles$8 = {"btn":"button-module_btn__ffRtT","full-size":"button-module_full-size__vmV2E","content-size":"button-module_content-size__f7JSE","size-default":"button-module_size-default__ydEgl","type-filled":"button-module_type-filled__BiyVo","with-icon":"button-module_with-icon__mfKU-","type-outline":"button-module_type-outline__RpZ2V"};
50
+ styleInject(css_248z$a);
53
51
 
54
52
  /**
55
53
  * Primary UI component for user interaction
@@ -85,12 +83,9 @@ const Button = ({
85
83
  outline,
86
84
  ...props
87
85
  }) => {
88
- console.log(styles$7);
89
- console.log(backgroundColor);
90
- const classProps = classnames(styles$7.btn, styles$7[theme], styles$7[size], outline ? styles$7['type-outline'] : styles$7['type-filled'], className); // className='btn type-outline size-default'
91
-
92
- console.log(classProps);
93
- return /*#__PURE__*/React$1.createElement("button", _extends({
86
+ const classProps = classnames(styles$8.btn, styles$8[theme], styles$8[size], outline ? styles$8['type-outline'] : styles$8['type-filled'], className);
87
+ // className='btn type-outline size-default'
88
+ return /*#__PURE__*/React.createElement("button", _extends({
94
89
  type: "button",
95
90
  className: classProps,
96
91
  style: backgroundColor && {
@@ -103,27 +98,22 @@ Button.propTypes = {
103
98
  type: PropTypes.oneOf(Object.values(ButtonType)),
104
99
  theme: PropTypes.oneOf(Object.values(ButtonTheme)),
105
100
  size: PropTypes.oneOf(Object.values(ButtonSize)),
106
-
107
101
  /**
108
102
  * What background color to use
109
103
  */
110
104
  backgroundColor: PropTypes.string,
111
-
112
105
  /**
113
106
  * How large should the button be?
114
107
  */
115
108
  // size: PropTypes.oneOf(['small', 'medium', 'large']),
116
-
117
109
  /**
118
110
  * Button contents
119
111
  */
120
112
  label: PropTypes.string.isRequired,
121
-
122
113
  /**
123
114
  * Optional click handler
124
115
  */
125
116
  onClick: PropTypes.func,
126
-
127
117
  /**
128
118
  * disabled
129
119
  */
@@ -139,8 +129,8 @@ Button.defaultProps = {
139
129
  outline: false
140
130
  };
141
131
 
142
- var css_248z$8 = "h1{font-size:70px;line-height:70px}h1,h2{font-weight:400;text-transform:uppercase}h2{font-size:50px;line-height:50px}h3{font-size:38px;font-weight:400;line-height:38px}h3,h4{text-transform:uppercase}h4{font-size:24px;font-weight:600;line-height:24px}h5{font-size:20px;font-size:16px;line-height:20px;line-height:22px;text-transform:uppercase}h5,p{font-weight:600;text-transform:capitalize}p{font-size:14px;line-height:20px}span{font-size:12px;font-weight:500;line-height:16px;text-transform:capitalize}i{font-family:icomoon;font-style:inherit}";
143
- styleInject(css_248z$8);
132
+ var css_248z$9 = "h1{font-size:70px;line-height:70px}h1,h2{font-weight:400;text-transform:uppercase}h2{font-size:50px;line-height:50px}h3{font-size:38px;font-weight:400;line-height:38px}h3,h4{text-transform:uppercase}h4{font-size:24px;font-weight:600;line-height:24px}h5{font-size:20px;font-size:16px;line-height:20px;line-height:22px;text-transform:uppercase}h5,p{font-weight:600;text-transform:capitalize}p{font-size:14px;line-height:20px}span{font-size:12px;font-weight:500;line-height:16px;text-transform:capitalize}i{font-family:icomoon;font-style:inherit}";
133
+ styleInject(css_248z$9);
144
134
 
145
135
  const TypographyType = {
146
136
  h1: 'h1',
@@ -162,7 +152,9 @@ const Typography = ({
162
152
  ...props
163
153
  }) => {
164
154
  const classProps = classnames(className, bold ? 'bold' : '');
165
- const CustomTag = variant; // const Tag = ({ className, children }) => (
155
+ const CustomTag = variant;
156
+
157
+ // const Tag = ({ className, children }) => (
166
158
  // <CustomTag
167
159
  // className={className}
168
160
  // {...props}
@@ -175,7 +167,7 @@ const Typography = ({
175
167
  ${color ? 'color: ' + color + ';' : ''}
176
168
  ${bold ? 'font-weight: bold;' : ''}
177
169
  `;
178
- return /*#__PURE__*/React$1.createElement(StyledTypograpy, {
170
+ return /*#__PURE__*/React.createElement(StyledTypograpy, {
179
171
  className: classProps
180
172
  }, " ", children, " ");
181
173
  };
@@ -189,9 +181,9 @@ Typography.defaultProps = {
189
181
  variant: 'h1'
190
182
  };
191
183
 
192
- var css_248z$7 = ".autocomplate-module_autocomplate-content__UbIUT{display:flex;flex-direction:column}.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);max-height:0;max-width:400px;overflow:hidden;position:relative;top:6px}.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}";
193
- var styles$6 = {"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"};
194
- styleInject(css_248z$7);
184
+ var css_248z$8 = ".autocomplate-module_autocomplate-content__UbIUT{display:flex;flex-direction:column}.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);max-height:0;max-width:400px;overflow:hidden;position:relative;top:6px}.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}";
185
+ var styles$7 = {"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"};
186
+ styleInject(css_248z$8);
195
187
 
196
188
  const Autocomplate = ({
197
189
  className,
@@ -204,13 +196,12 @@ const Autocomplate = ({
204
196
  searchCount,
205
197
  ...props
206
198
  }) => {
207
- classnames(styles$6.searchBox, className);
199
+ classnames(styles$7.searchBox, className);
208
200
  const [inputValue, setInputValue] = useState("");
209
201
  const [activeOption, setActiveOption] = useState(0);
210
202
  const [filteredOptions, setFilteredOptions] = useState([]);
211
203
  const [showOptions, setShowOptions] = useState(false);
212
204
  const parseOptionsData = jsonOptionsData.length !== 0 ? JSON.parse(jsonOptionsData).sort() : [];
213
-
214
205
  const handleChange = e => {
215
206
  const currentInputValue = e.currentTarget.value;
216
207
  const filteredOptions = parseOptionsData.filter(optionName => optionName.toLowerCase().indexOf(currentInputValue.toLowerCase()) > -1);
@@ -219,57 +210,51 @@ const Autocomplate = ({
219
210
  setFilteredOptions(filteredOptions);
220
211
  setShowOptions(true);
221
212
  };
222
-
223
213
  const handleClick = e => {
224
214
  setInputValue(e.currentTarget.innerText);
225
215
  setActiveOption(0);
226
216
  setFilteredOptions([]);
227
217
  setShowOptions(false);
228
218
  };
229
-
230
219
  let optionList;
231
-
232
220
  if (showOptions && inputValue) {
233
221
  if (filteredOptions.length && inputValue.length >= searchCount) {
234
- optionList = /*#__PURE__*/React$1.createElement("div", {
235
- className: styles$6['autocomplate-content-bottom']
236
- }, /*#__PURE__*/React$1.createElement("div", {
237
- className: styles$6['autocomplate-content-bottom-inner']
222
+ optionList = /*#__PURE__*/React.createElement("div", {
223
+ className: styles$7['autocomplate-content-bottom']
224
+ }, /*#__PURE__*/React.createElement("div", {
225
+ className: styles$7['autocomplate-content-bottom-inner']
238
226
  }, filteredOptions.map((optionName, index) => {
239
227
  let className;
240
-
241
228
  if (index === activeOption) {
242
229
  className = "option-active";
243
230
  }
244
-
245
- return /*#__PURE__*/React$1.createElement("div", {
246
- className: styles$6[className],
231
+ return /*#__PURE__*/React.createElement("div", {
232
+ className: styles$7[className],
247
233
  key: optionName,
248
234
  onClick: handleClick
249
- }, /*#__PURE__*/React$1.createElement("div", {
250
- className: styles$6['autocomplate-content-bottom-row']
235
+ }, /*#__PURE__*/React.createElement("div", {
236
+ className: styles$7['autocomplate-content-bottom-row']
251
237
  }, optionName));
252
238
  })));
253
239
  } else {
254
- optionList = /*#__PURE__*/React$1.createElement("div", {
255
- className: styles$6['autocomplate-content-bottom']
256
- }, /*#__PURE__*/React$1.createElement("div", {
257
- className: styles$6['autocomplate-content-bottom-inner']
258
- }, /*#__PURE__*/React$1.createElement("div", {
259
- className: styles$6['autocomplate-content-bottom-row']
260
- }, /*#__PURE__*/React$1.createElement("div", {
261
- className: styles$6['no-option']
240
+ optionList = /*#__PURE__*/React.createElement("div", {
241
+ className: styles$7['autocomplate-content-bottom']
242
+ }, /*#__PURE__*/React.createElement("div", {
243
+ className: styles$7['autocomplate-content-bottom-inner']
244
+ }, /*#__PURE__*/React.createElement("div", {
245
+ className: styles$7['autocomplate-content-bottom-row']
246
+ }, /*#__PURE__*/React.createElement("div", {
247
+ className: styles$7['no-option']
262
248
  }, "No Option!"))));
263
249
  }
264
250
  }
265
-
266
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, label ? /*#__PURE__*/React$1.createElement("label", {
267
- className: styles$6.labelInput
268
- }, label) : "", /*#__PURE__*/React$1.createElement("div", {
269
- className: styles$6['autocomplate-content']
270
- }, /*#__PURE__*/React$1.createElement("input", _extends({
251
+ return /*#__PURE__*/React.createElement(React.Fragment, null, label ? /*#__PURE__*/React.createElement("label", {
252
+ className: styles$7.labelInput
253
+ }, label) : "", /*#__PURE__*/React.createElement("div", {
254
+ className: styles$7['autocomplate-content']
255
+ }, /*#__PURE__*/React.createElement("input", _extends({
271
256
  type: "text",
272
- className: styles$6['autocomplate-content-top'],
257
+ className: styles$7['autocomplate-content-top'],
273
258
  required: required,
274
259
  disabled: disabled,
275
260
  onChange: handleChange,
@@ -292,9 +277,9 @@ Autocomplate.defaultProps = {
292
277
  searchCount: 2
293
278
  };
294
279
 
295
- var css_248z$6 = ".checkbox-module_checkbox-wrap__Xrg-m{align-items:center;cursor:pointer;display:inline-flex;flex-direction:row;flex-wrap:nowrap;margin:0 6px;padding-left:24px;position:relative}.checkbox-module_checkbox-wrap__Xrg-m>input{height:0;opacity:0;position:absolute;width:0}.checkbox-module_checkbox-wrap__Xrg-m .checkbox-module_checkmark__M8DY6{border:1px solid #d9d9d9;border-radius:3px;display:inline-block;height:14px;left:0;margin-right:4px;position:absolute;top:0;transition:border-color .24s;vertical-align:top;width:14px}.checkbox-module_checkbox-wrap__Xrg-m>.checkbox-module_checkmark__M8DY6:after{border:solid #1890ff;border-width:0 2px 2px 0;content:\"\";display:block;height:8px;left:4px;opacity:0;position:absolute;top:1px;transform:rotate(45deg);transition:opacity .24s;width:4px}.checkbox-module_checkbox-wrap__Xrg-m input:checked~.checkbox-module_checkmark__M8DY6:after{opacity:1}.checkbox-module_checkbox-wrap__Xrg-m input:checked~.checkbox-module_checkmark__M8DY6,.checkbox-module_checkbox-wrap__Xrg-m:hover input~.checkbox-module_checkmark__M8DY6{border-color:#1890ff}";
296
- var styles$5 = {"checkbox-wrap":"checkbox-module_checkbox-wrap__Xrg-m","checkmark":"checkbox-module_checkmark__M8DY6"};
297
- styleInject(css_248z$6);
280
+ var css_248z$7 = ".checkbox-module_checkbox-wrap__Xrg-m{align-items:center;cursor:pointer;display:inline-flex;flex-direction:row;flex-wrap:nowrap;margin:0 6px;padding-left:24px;position:relative}.checkbox-module_checkbox-wrap__Xrg-m>input{height:0;opacity:0;position:absolute;width:0}.checkbox-module_checkbox-wrap__Xrg-m .checkbox-module_checkmark__M8DY6{border:1px solid #d9d9d9;border-radius:3px;display:inline-block;height:14px;left:0;margin-right:4px;position:absolute;top:0;transition:border-color .24s;vertical-align:top;width:14px}.checkbox-module_checkbox-wrap__Xrg-m>.checkbox-module_checkmark__M8DY6:after{border:solid #1890ff;border-width:0 2px 2px 0;content:\"\";display:block;height:8px;left:4px;opacity:0;position:absolute;top:1px;transform:rotate(45deg);transition:opacity .24s;width:4px}.checkbox-module_checkbox-wrap__Xrg-m input:checked~.checkbox-module_checkmark__M8DY6:after{opacity:1}.checkbox-module_checkbox-wrap__Xrg-m input:checked~.checkbox-module_checkmark__M8DY6,.checkbox-module_checkbox-wrap__Xrg-m:hover input~.checkbox-module_checkmark__M8DY6{border-color:#1890ff}";
281
+ var styles$6 = {"checkbox-wrap":"checkbox-module_checkbox-wrap__Xrg-m","checkmark":"checkbox-module_checkmark__M8DY6"};
282
+ styleInject(css_248z$7);
298
283
 
299
284
  const Checkbox = ({
300
285
  disabled,
@@ -308,10 +293,9 @@ const Checkbox = ({
308
293
  keyNames,
309
294
  ...props
310
295
  }) => {
311
- const classProps = classnames(styles$5.checkbox, className);
296
+ const classProps = classnames(styles$6.checkbox, className);
312
297
  const parseData = jsonData.length !== 0 ? JSON.parse(jsonData) : [];
313
298
  const [data, setData] = useState(parseData);
314
-
315
299
  const handleChange = e => {
316
300
  if (e.target.checked) {
317
301
  data.forEach(item => {
@@ -329,12 +313,11 @@ const Checkbox = ({
329
313
  });
330
314
  }
331
315
  };
332
-
333
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, data.map(element => {
334
- return /*#__PURE__*/React$1.createElement("label", {
335
- className: styles$5["checkbox-wrap"],
316
+ return /*#__PURE__*/React.createElement(React.Fragment, null, data.map(element => {
317
+ return /*#__PURE__*/React.createElement("label", {
318
+ className: styles$6["checkbox-wrap"],
336
319
  key: element.value
337
- }, /*#__PURE__*/React$1.createElement("input", _extends({
320
+ }, /*#__PURE__*/React.createElement("input", _extends({
338
321
  type: "checkbox",
339
322
  className: classProps,
340
323
  disabled: disabled,
@@ -342,10 +325,10 @@ const Checkbox = ({
342
325
  value: value ? value : element.value,
343
326
  name: name ? name : element.name,
344
327
  onChange: handleChange
345
- }, props)), /*#__PURE__*/React$1.createElement("span", {
346
- className: styles$5["checkmark"]
347
- }), element.label ? /*#__PURE__*/React$1.createElement("span", {
348
- className: styles$5.labelRadio
328
+ }, props)), /*#__PURE__*/React.createElement("span", {
329
+ className: styles$6["checkmark"]
330
+ }), element.label ? /*#__PURE__*/React.createElement("span", {
331
+ className: styles$6.labelRadio
349
332
  }, label ? label : element.label) : "");
350
333
  }));
351
334
  };
@@ -366,20 +349,21 @@ Checkbox.defaultProps = {
366
349
  jsonData: '[{"value":"email", "name":"contact1", "label":"Email", "id":"contactChoice1"}, {"value":"phone", "name":"contact2", "label":"Phone", "id":"contactChoice2"}]'
367
350
  };
368
351
 
369
- var css_248z$5 = "@font-face{font-display:block;font-family:icomoon;font-style:normal;font-weight:400;src:url(fonts/icomoon.eot?b29ky3);src:url(fonts/icomoon.eot?b29ky3#iefix) format(\"embedded-opentype\"),url(fonts/icomoon.ttf?b29ky3) format(\"truetype\"),url(fonts/icomoon.woff?b29ky3) format(\"woff\"),url(fonts/icomoon.svg?b29ky3#icomoon) format(\"svg\")}[class*=\" icon-\"],[class^=icon-]{speak:never;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:icomoon!important;font-style:normal;font-variant:normal;font-weight:400;line-height:1;text-transform:none}.icon-close:before{content:\"\\e907\"}.icon-arrow-up:before{content:\"\\e905\"}.icon-arrow-down:before{content:\"\\e906\"}.icon-arrow:before{content:\"\\e900\"}.icon-arrow-jump-next:before{content:\"\\e901\"}.icon-arrow-jump-back:before{content:\"\\e902\"}.icon-text:before{content:\"\\e903\"}.icon-arrow-back:before{content:\"\\e904\"}";
370
- styleInject(css_248z$5);
352
+ var css_248z$6 = "@font-face{font-display:block;font-family:icomoon;font-style:normal;font-weight:400;src:url(fonts/icomoon.eot?b29ky3);src:url(fonts/icomoon.eot?b29ky3#iefix) format(\"embedded-opentype\"),url(fonts/icomoon.ttf?b29ky3) format(\"truetype\"),url(fonts/icomoon.woff?b29ky3) format(\"woff\"),url(fonts/icomoon.svg?b29ky3#icomoon) format(\"svg\")}[class*=\" icon-\"],[class^=icon-]{speak:never;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:icomoon!important;font-style:normal;font-variant:normal;font-weight:400;line-height:1;text-transform:none}.icon-close:before{content:\"\\e907\"}.icon-arrow-up:before{content:\"\\e905\"}.icon-arrow-down:before{content:\"\\e906\"}.icon-arrow:before{content:\"\\e900\"}.icon-arrow-jump-next:before{content:\"\\e901\"}.icon-arrow-jump-back:before{content:\"\\e902\"}.icon-text:before{content:\"\\e903\"}.icon-arrow-back:before{content:\"\\e904\"}";
353
+ styleInject(css_248z$6);
371
354
 
372
355
  /**
373
356
  * Created by aleksanyan.tigran on 10/7/2022.
374
357
  */
358
+ const Icon = props => {
359
+ return /*#__PURE__*/React.createElement("i", {
360
+ className: css_248z$6[props.className]
361
+ });
362
+ };
375
363
 
376
- const Icon = props => /*#__PURE__*/React.createElement("i", {
377
- className: css_248z$5[props.className]
378
- });
379
-
380
- var css_248z$4 = ".input-module_input-wrap__NunrE{position:relative}.input-module_input__-ipHD{border:none;border-radius:6px;box-shadow:inset 0 0 0 2px #d1d1d1;box-sizing:border-box;color:#3c393e;cursor:pointer;font-size:16px;line-height:20px;outline:none;overflow:hidden;text-transform:capitalize;transition:background-color .24s,color .24s}.input-module_input__-ipHD.input-module_full-size__38YG7{width:100%}.input-module_input__-ipHD.input-module_content-size__rZ5EA{width:auto}.input-module_input__-ipHD.input-module_size-medium__frTDq{min-height:46px;padding:12px 15px}.input-module_input__-ipHD:hover{box-shadow:inset 0 0 0 2px #3c393e}.input-module_input__-ipHD:active{box-shadow:inset 0 0 0 2px #00236a}.input-module_inputErrorMessages__hx490{animation:input-module_error-message-show__OrVSo .24s forwards;bottom:0;color:#e00;font-size:14px;left:0;line-height:19px;position:absolute;transform:scale3d(0,0,0);z-index:1}.input-module_labelInput__sUMKQ{color:#000}.input-module_input__-ipHD.input-module_state-disabled__402v0{background-color:#fbfbfb;pointer-events:none}.input-module_input__-ipHD.input-module_error-message__7NphF{box-shadow:inset 0 0 0 2px #e00}@keyframes input-module_error-message-show__OrVSo{to{bottom:-20px;transform:scaleX(1)}}";
381
- var styles$4 = {"input-wrap":"input-module_input-wrap__NunrE","input":"input-module_input__-ipHD","full-size":"input-module_full-size__38YG7","content-size":"input-module_content-size__rZ5EA","size-medium":"input-module_size-medium__frTDq","with-icon":"input-module_with-icon__w3jTW","inputErrorMessages":"input-module_inputErrorMessages__hx490","error-message-show":"input-module_error-message-show__OrVSo","labelInput":"input-module_labelInput__sUMKQ","state-disabled":"input-module_state-disabled__402v0","error-message":"input-module_error-message__7NphF"};
382
- styleInject(css_248z$4);
364
+ var css_248z$5 = ".input-module_input-wrap__NunrE{position:relative}.input-module_input__-ipHD{border:none;border-radius:6px;box-shadow:inset 0 0 0 2px #d1d1d1;box-sizing:border-box;color:#3c393e;cursor:pointer;font-size:16px;line-height:20px;outline:none;overflow:hidden;text-transform:capitalize;transition:background-color .24s,color .24s}.input-module_input__-ipHD.input-module_full-size__38YG7{width:100%}.input-module_input__-ipHD.input-module_content-size__rZ5EA{width:auto}.input-module_input__-ipHD.input-module_size-medium__frTDq{min-height:46px;padding:12px 15px}.input-module_input__-ipHD:hover{box-shadow:inset 0 0 0 2px #3c393e}.input-module_input__-ipHD:active{box-shadow:inset 0 0 0 2px #00236a}.input-module_inputErrorMessages__hx490{animation:input-module_error-message-show__OrVSo .24s forwards;bottom:0;color:#e00;font-size:14px;left:0;line-height:19px;position:absolute;transform:scale3d(0,0,0);z-index:1}.input-module_labelInput__sUMKQ{color:#000}.input-module_input__-ipHD.input-module_state-disabled__402v0{background-color:#fbfbfb;pointer-events:none}.input-module_input__-ipHD.input-module_error-message__7NphF{box-shadow:inset 0 0 0 2px #e00}@keyframes input-module_error-message-show__OrVSo{to{bottom:-20px;transform:scaleX(1)}}";
365
+ var styles$5 = {"input-wrap":"input-module_input-wrap__NunrE","input":"input-module_input__-ipHD","full-size":"input-module_full-size__38YG7","content-size":"input-module_content-size__rZ5EA","size-medium":"input-module_size-medium__frTDq","with-icon":"input-module_with-icon__w3jTW","inputErrorMessages":"input-module_inputErrorMessages__hx490","error-message-show":"input-module_error-message-show__OrVSo","labelInput":"input-module_labelInput__sUMKQ","state-disabled":"input-module_state-disabled__402v0","error-message":"input-module_error-message__7NphF"};
366
+ styleInject(css_248z$5);
383
367
 
384
368
  const InputTypes = {
385
369
  TEXT: "text",
@@ -405,30 +389,27 @@ const Input = ({
405
389
  disabled,
406
390
  type,
407
391
  onChange,
392
+ value,
408
393
  ...props
409
394
  }) => {
410
- const [inputValue, setInputValue] = useState("");
411
-
395
+ const [inputValue, setInputValue] = useState(value);
412
396
  const handleChange = event => {
413
397
  setInputValue(event.target.value);
414
- onChange(event.target.value);
398
+ onChange ? onChange(event.target.value) : '';
415
399
  };
416
-
417
400
  let eMessage = "";
418
-
419
401
  if (errorMesage) {
420
402
  eMessage = errorMesage;
421
403
  } else if (regexp) {
422
404
  const regex = new RegExp(regexp);
423
405
  eMessage = regex.test(inputValue) ? "" : regexpError;
424
406
  }
425
-
426
- const classProps = classnames(styles$4.input, styles$4[size], eMessage != '' ? styles$4['error-message'] : "", className);
427
- return /*#__PURE__*/React$1.createElement("div", {
428
- className: styles$4['input-wrap']
429
- }, label ? /*#__PURE__*/React$1.createElement("label", {
430
- className: styles$4.labelInput
431
- }, label) : "", /*#__PURE__*/React$1.createElement("input", _extends({}, props, {
407
+ const classProps = classnames(styles$5.input, styles$5[size], eMessage != '' ? styles$5['error-message'] : "", className);
408
+ return /*#__PURE__*/React.createElement("div", {
409
+ className: styles$5['input-wrap']
410
+ }, label ? /*#__PURE__*/React.createElement("label", {
411
+ className: styles$5.labelInput
412
+ }, label) : "", /*#__PURE__*/React.createElement("input", _extends({}, props, {
432
413
  type: type,
433
414
  className: classProps,
434
415
  style: color && {
@@ -437,8 +418,8 @@ const Input = ({
437
418
  disabled: disabled ? disabled : "",
438
419
  onChange: handleChange,
439
420
  value: inputValue
440
- })), eMessage ? /*#__PURE__*/React$1.createElement("span", {
441
- className: styles$4.inputErrorMessages
421
+ })), eMessage ? /*#__PURE__*/React.createElement("span", {
422
+ className: styles$5.inputErrorMessages
442
423
  }, eMessage) : "");
443
424
  };
444
425
  Input.propTypes = {
@@ -452,7 +433,8 @@ Input.propTypes = {
452
433
  regexp: PropTypes.string,
453
434
  regexpError: PropTypes.string,
454
435
  label: PropTypes.string.isRequired,
455
- disabled: PropTypes.bool
436
+ disabled: PropTypes.bool,
437
+ value: PropTypes.string
456
438
  };
457
439
  Input.defaultProps = {
458
440
  label: "",
@@ -461,22 +443,23 @@ Input.defaultProps = {
461
443
  onChange: undefined,
462
444
  required: true,
463
445
  errorMesage: "",
464
- type: "text"
446
+ type: "text",
447
+ value: ""
465
448
  };
466
449
 
467
- var css_248z$3 = ".pagination-module_listItem__b1-WN:focus{background-color:#4caf50;color:#fff}.pagination-module_listItem__b1-WN:hover:not(.pagination-module_active__KwBDp){background-color:#ddd}.pagination-module_pagination-bar__MrtYT{display:flex;flex-direction:row;flex-wrap:nowrap;gap:8px}.pagination-module_pagination-btn__w8Yh8{border:none;border-radius:6px;outline:none}.pagination-module_pagination-btn__w8Yh8,.pagination-module_pagination-item__t3emS,.pagination-module_pagination-jump-next__LAb9Z{align-items:center;background-color:#fff;box-shadow:0 0 0 1px #eee;cursor:pointer;display:flex;height:34px;justify-content:center;width:34px}.pagination-module_pagination-item__t3emS,.pagination-module_pagination-jump-next__LAb9Z{border-radius:6px;flex:0 0 auto;font-size:16px;line-height:22px;position:relative;transition:background-color .24s}.pagination-module_pagination-item__t3emS:hover{background-color:#eee}.pagination-module_pagination-item__t3emS.pagination-module_selected__EXzCA{background-color:#00236a;color:#fff}.pagination-module_pagination-jump-next-arrow__aEVD8,.pagination-module_pagination-jump-next-txt__e7nFj{align-items:center;bottom:0;display:flex;font-size:12px;justify-content:center;left:0;line-height:14px;margin:auto;position:absolute;right:0;top:0;transition:opacity .24s,color .24s}.pagination-module_pagination-jump-next-arrow__aEVD8{opacity:0}.pagination-module_pagination-jump-next__LAb9Z:hover .pagination-module_pagination-jump-next-arrow__aEVD8{opacity:1}.pagination-module_pagination-jump-next__LAb9Z:hover .pagination-module_pagination-jump-next-txt__e7nFj{opacity:0}i{color:#3c393e;font-size:12px;line-height:12px}";
468
- var styles$3 = {"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"};
469
- styleInject(css_248z$3);
450
+ var css_248z$4 = ".pagination-module_listItem__b1-WN:focus{background-color:#4caf50;color:#fff}.pagination-module_listItem__b1-WN:hover:not(.pagination-module_active__KwBDp){background-color:#ddd}.pagination-module_pagination-bar__MrtYT{display:flex;flex-direction:row;flex-wrap:nowrap;gap:8px}.pagination-module_pagination-btn__w8Yh8{border:none;border-radius:6px;outline:none}.pagination-module_pagination-btn__w8Yh8,.pagination-module_pagination-item__t3emS,.pagination-module_pagination-jump-next__LAb9Z{align-items:center;background-color:#fff;box-shadow:0 0 0 1px #eee;cursor:pointer;display:flex;height:34px;justify-content:center;width:34px}.pagination-module_pagination-item__t3emS,.pagination-module_pagination-jump-next__LAb9Z{border-radius:6px;flex:0 0 auto;font-size:16px;line-height:22px;position:relative;transition:background-color .24s}.pagination-module_pagination-item__t3emS:hover{background-color:#eee}.pagination-module_pagination-item__t3emS.pagination-module_selected__EXzCA{background-color:#00236a;color:#fff}.pagination-module_pagination-jump-next-arrow__aEVD8,.pagination-module_pagination-jump-next-txt__e7nFj{align-items:center;bottom:0;display:flex;font-size:12px;justify-content:center;left:0;line-height:14px;margin:auto;position:absolute;right:0;top:0;transition:opacity .24s,color .24s}.pagination-module_pagination-jump-next-arrow__aEVD8{opacity:0}.pagination-module_pagination-jump-next__LAb9Z:hover .pagination-module_pagination-jump-next-arrow__aEVD8{opacity:1}.pagination-module_pagination-jump-next__LAb9Z:hover .pagination-module_pagination-jump-next-txt__e7nFj{opacity:0}i{color:#3c393e;font-size:12px;line-height:12px}";
451
+ var styles$4 = {"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"};
452
+ styleInject(css_248z$4);
470
453
 
471
- const Dots = "...";
454
+ // import styles from "./pagination.module.scss";
472
455
 
456
+ const Dots = "...";
473
457
  const range = (start, end) => {
474
458
  const length = end - start + 1;
475
459
  return Array.from({
476
460
  length
477
461
  }, (_, idx) => idx + start);
478
462
  };
479
-
480
463
  const PaginationRange = ({
481
464
  currentTotalCount,
482
465
  offset,
@@ -484,33 +467,29 @@ const PaginationRange = ({
484
467
  currentPageNumber
485
468
  }) => {
486
469
  const paginationRange = useMemo(() => {
487
- const totalPageCount = Math.ceil(currentTotalCount / offset); //currentPage + 2*Dots + start + end = 5
470
+ const totalPageCount = Math.ceil(currentTotalCount / offset);
488
471
 
472
+ //currentPage + 2*Dots + start + end = 5
489
473
  const totalPageNumber = siblingCountNumber + 5;
490
-
491
474
  if (totalPageNumber >= totalPageCount) {
492
475
  return range(1, totalPageCount);
493
476
  }
494
-
495
477
  const rightSiblingIndex = Math.min(currentPageNumber + siblingCountNumber, totalPageCount);
496
478
  const leftSiblingIndex = Math.max(currentPageNumber - siblingCountNumber, 1);
497
479
  const shouldShowLeftDots = leftSiblingIndex > 2;
498
480
  const shouldShowRightDots = rightSiblingIndex < totalPageCount - 2;
499
481
  const firstPageIndex = 1;
500
482
  const lastPageIndex = totalPageCount;
501
-
502
483
  if (!shouldShowLeftDots && shouldShowRightDots) {
503
484
  let leftItemCount = currentPageNumber === 4 && lastPageIndex > 7 ? 4 + siblingCountNumber : 3 + siblingCountNumber;
504
485
  let leftRange = range(1, leftItemCount);
505
486
  return [...leftRange, Dots, totalPageCount];
506
487
  }
507
-
508
488
  if (shouldShowLeftDots && !shouldShowRightDots) {
509
489
  let rightItemCount = currentPageNumber === lastPageIndex - 3 && lastPageIndex > 7 ? rightItemCount = 4 + siblingCountNumber : rightItemCount = 3 + siblingCountNumber;
510
490
  let rightRange = range(totalPageCount - rightItemCount + 1, totalPageCount);
511
491
  return [firstPageIndex, Dots, ...rightRange];
512
492
  }
513
-
514
493
  if (shouldShowLeftDots && shouldShowRightDots) {
515
494
  let middleRange = range(leftSiblingIndex, rightSiblingIndex);
516
495
  return [firstPageIndex, Dots, ...middleRange, Dots, lastPageIndex];
@@ -539,77 +518,69 @@ const Pagination = ({
539
518
  useEffect(() => {
540
519
  setCurrentPage(currentPage);
541
520
  }, [currentPage]);
542
-
543
521
  const onPageChange = page => {
544
522
  setCurrentPage(page);
545
523
  };
546
-
547
- onChange(currentPageNumber);
524
+ useEffect(() => {
525
+ onChange(currentPageNumber);
526
+ }, []);
548
527
  const paginationRange = PaginationRange({
549
528
  currentPageNumber,
550
529
  currentTotalCount,
551
530
  siblingCountNumber,
552
531
  offset
553
532
  });
554
-
555
533
  if (currentPageNumber === 0 || paginationRange.length < 2) {
556
534
  return null;
557
535
  }
558
-
559
- const classProps = classnames(styles$3.list, className ? className : styles$3["pagination-bar"]);
560
-
536
+ const classProps = classnames(styles$4.list, className ? className : styles$4["pagination-bar"]);
561
537
  const onNext = () => {
562
538
  onPageChange(currentPageNumber + 1);
563
539
  };
564
-
565
540
  const onPrevious = () => {
566
541
  onPageChange(currentPageNumber - 1);
567
542
  };
568
-
569
543
  const onNextFive = () => {
570
544
  currentPageNumber !== lastPage - 4 ? onPageChange(currentPageNumber + 5) : onPageChange(currentPageNumber + 4);
571
545
  };
572
-
573
546
  const onPreviousFive = e => {
574
547
  currentPageNumber !== 5 ? onPageChange(currentPageNumber - 5) : onPageChange(currentPageNumber - 4);
575
548
  };
576
-
577
549
  let lastPage = paginationRange[paginationRange.length - 1];
578
- return /*#__PURE__*/React$2.createElement("ul", {
550
+ return /*#__PURE__*/React.createElement("ul", {
579
551
  className: classProps
580
- }, /*#__PURE__*/React$2.createElement("button", {
581
- className: styles$3["pagination-btn"],
552
+ }, /*#__PURE__*/React.createElement("button", {
553
+ className: styles$4["pagination-btn"],
582
554
  onClick: onPrevious,
583
555
  disabled: currentPage === 1 ? true : false
584
- }, /*#__PURE__*/React$2.createElement(Icon, {
556
+ }, /*#__PURE__*/React.createElement(Icon, {
585
557
  className: "icon-arrow-back"
586
558
  })), paginationRange.map((pageNumber, id) => {
587
559
  if (pageNumber === Dots) {
588
560
  let currentPageIndex = paginationRange.indexOf(currentPageNumber);
589
- return /*#__PURE__*/React$2.createElement("li", {
561
+ return /*#__PURE__*/React.createElement("li", {
590
562
  key: id,
591
- className: classnames(styles$3['pagination-jump-next'], styles$3.listItem),
563
+ className: classnames(styles$4['pagination-jump-next'], styles$4.listItem),
592
564
  onClick: id < currentPageIndex ? onPreviousFive : onNextFive,
593
565
  disabled: currentPageIndex === 0 ? true : false
594
- }, /*#__PURE__*/React$2.createElement("span", {
595
- className: styles$3['pagination-jump-next-txt']
596
- }, "..."), /*#__PURE__*/React$2.createElement("span", {
597
- className: styles$3['pagination-jump-next-arrow']
598
- }, /*#__PURE__*/React$2.createElement(Icon, {
566
+ }, /*#__PURE__*/React.createElement("span", {
567
+ className: styles$4['pagination-jump-next-txt']
568
+ }, "..."), /*#__PURE__*/React.createElement("span", {
569
+ className: styles$4['pagination-jump-next-arrow']
570
+ }, /*#__PURE__*/React.createElement(Icon, {
599
571
  className: "icon-arrow-jump-next"
600
572
  })));
601
573
  }
602
-
603
- return /*#__PURE__*/React$2.createElement("li", {
574
+ return /*#__PURE__*/React.createElement("li", {
604
575
  onClick: () => onPageChange(pageNumber),
605
576
  key: id,
606
- className: classnames(`${pageNumber === currentPageNumber ? styles$3.selected : styles$3.listItem}`, styles$3['pagination-item'])
577
+ className: classnames(`${pageNumber === currentPageNumber ? styles$4.selected : styles$4.listItem}`, styles$4['pagination-item'])
607
578
  }, pageNumber);
608
- }), /*#__PURE__*/React$2.createElement("button", {
579
+ }), /*#__PURE__*/React.createElement("button", {
609
580
  onClick: onNext,
610
- className: styles$3["pagination-btn"],
581
+ className: styles$4["pagination-btn"],
611
582
  disabled: currentPageNumber === lastPage ? true : false
612
- }, /*#__PURE__*/React$2.createElement(Icon, {
583
+ }, /*#__PURE__*/React.createElement(Icon, {
613
584
  className: "icon-arrow"
614
585
  })));
615
586
  };
@@ -625,9 +596,9 @@ Pagination.defaultProps = {
625
596
  siblingCount: 2
626
597
  };
627
598
 
628
- var css_248z$2 = ".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}";
629
- var styles$2 = {"radio-wrap":"radio-module_radio-wrap__-lO7V","radio-checkmark":"radio-module_radio-checkmark__Kvol0"};
630
- styleInject(css_248z$2);
599
+ var css_248z$3 = ".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}";
600
+ var styles$3 = {"radio-wrap":"radio-module_radio-wrap__-lO7V","radio-checkmark":"radio-module_radio-checkmark__Kvol0"};
601
+ styleInject(css_248z$3);
631
602
 
632
603
  const Radio = ({
633
604
  disabled,
@@ -641,13 +612,13 @@ const Radio = ({
641
612
  keyNames,
642
613
  ...props
643
614
  }) => {
644
- const classProps = classnames(styles$2.checkbox, className);
615
+ const classProps = classnames(styles$3.checkbox, className);
645
616
  const parseData = jsonData.length !== 0 ? JSON.parse(jsonData) : [];
646
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, parseData.map((element, id) => {
647
- return /*#__PURE__*/React$1.createElement("label", {
648
- className: styles$2["radio-wrap"],
617
+ return /*#__PURE__*/React.createElement(React.Fragment, null, parseData.map((element, id) => {
618
+ return /*#__PURE__*/React.createElement("label", {
619
+ className: styles$3["radio-wrap"],
649
620
  key: element.value
650
- }, /*#__PURE__*/React$1.createElement("input", _extends({
621
+ }, /*#__PURE__*/React.createElement("input", _extends({
651
622
  type: "radio",
652
623
  className: classProps,
653
624
  disabled: disabled,
@@ -655,10 +626,10 @@ const Radio = ({
655
626
  defaultChecked: id === 0 ? defaultChecked : "",
656
627
  value: value ? value : element.value,
657
628
  name: name ? name : element.name
658
- }, props)), /*#__PURE__*/React$1.createElement("span", {
659
- className: styles$2["radio-checkmark"]
660
- }), element.label ? /*#__PURE__*/React$1.createElement("span", {
661
- className: styles$2.labelRadio
629
+ }, props)), /*#__PURE__*/React.createElement("span", {
630
+ className: styles$3["radio-checkmark"]
631
+ }), element.label ? /*#__PURE__*/React.createElement("span", {
632
+ className: styles$3.labelRadio
662
633
  }, label ? label : element.label) : "");
663
634
  }));
664
635
  };
@@ -679,9 +650,9 @@ Radio.defaultProps = {
679
650
  jsonData: '[{"value":"email", "name":"contact", "label":"Email", "id":"contactChoice1"}, {"value":"phone", "name":"contact", "label":"Phone", "id":"contactChoice2"}]'
680
651
  };
681
652
 
682
- var css_248z$1 = "*{margin:0;padding:0}.captcha-module_main__Ys3EH{margin:0;padding:0;position:relative;width:40%}.captcha-module_slider__KLYny{-webkit-appearance:none;background-color:hsla(0,0%,100%,.575);border:.1px solid hsla(0,0%,59%,.432);height:7px;outline:none;width:100%}.captcha-module_slider__KLYny::-webkit-slider-thumb{-webkit-appearance:none;height:48px;position:relative;width:48px;z-index:3}.captcha-module_selector__JFhb4{bottom:-20px;height:48px;left:50%;position:absolute;width:48px;z-index:2}.captcha-module_selectBtn__GP1iH{background-image:url(https://i.ibb.co/rQZNNzN/blue.png);background-position:50%;background-size:cover;border-radius:50%;bottom:40px;height:40px;position:absolute;right:30px;width:40px}.captcha-module_progressBar__mhdtM{background:#7070ee;bottom:38px;height:7px;left:0;margin:0;padding:0;position:absolute;width:50%}.captcha-module_range__k24I2{color:blue;margin-bottom:15px;margin-top:15px}";
683
- var styles$1 = {"main":"captcha-module_main__Ys3EH","slider":"captcha-module_slider__KLYny","selector":"captcha-module_selector__JFhb4","selectBtn":"captcha-module_selectBtn__GP1iH","progressBar":"captcha-module_progressBar__mhdtM","range":"captcha-module_range__k24I2"};
684
- styleInject(css_248z$1);
653
+ var css_248z$2 = "*{margin:0;padding:0}.captcha-module_main__Ys3EH{margin:0;padding:0;position:relative;width:40%}.captcha-module_slider__KLYny{-webkit-appearance:none;background-color:hsla(0,0%,100%,.575);border:.1px solid hsla(0,0%,59%,.432);height:7px;outline:none;width:100%}.captcha-module_slider__KLYny::-webkit-slider-thumb{-webkit-appearance:none;height:48px;position:relative;width:48px;z-index:3}.captcha-module_selector__JFhb4{bottom:-20px;height:48px;left:50%;position:absolute;width:48px;z-index:2}.captcha-module_selectBtn__GP1iH{background-image:url(https://i.ibb.co/rQZNNzN/blue.png);background-position:50%;background-size:cover;border-radius:50%;bottom:40px;height:40px;position:absolute;right:30px;width:40px}.captcha-module_progressBar__mhdtM{background:#7070ee;bottom:38px;height:7px;left:0;margin:0;padding:0;position:absolute;width:50%}.captcha-module_range__k24I2{color:blue;margin-bottom:15px;margin-top:15px}";
654
+ var styles$2 = {"main":"captcha-module_main__Ys3EH","slider":"captcha-module_slider__KLYny","selector":"captcha-module_selector__JFhb4","selectBtn":"captcha-module_selectBtn__GP1iH","progressBar":"captcha-module_progressBar__mhdtM","range":"captcha-module_range__k24I2"};
655
+ styleInject(css_248z$2);
685
656
 
686
657
  const Captcha = ({
687
658
  onclick,
@@ -690,51 +661,47 @@ const Captcha = ({
690
661
  const [data, setData] = useState("");
691
662
  const [right, setRight] = useState(false);
692
663
  let range = rangeCount <= 100 ? rangeCount : 0;
693
- let rangeElement = document.getElementsByClassName(styles$1.range);
664
+ let rangeElement = document.getElementsByClassName(styles$2.range);
694
665
  useEffect(() => {
695
666
  for (let element of rangeElement) {
696
667
  element.style.marginLeft = `${range - 3}%`;
697
668
  element.style.color = data;
698
669
  }
699
670
  }, [range, data]);
700
-
701
671
  function sliderInput(event) {
702
672
  setData(rangeCount == event.target.value ? 'green' : 'indianred');
703
- let selector = document.getElementsByClassName(styles$1.selector);
704
- let selectBtn = document.getElementsByClassName(styles$1.selectBtn);
705
- let progressBar = document.getElementsByClassName(styles$1.progressBar);
673
+ let selector = document.getElementsByClassName(styles$2.selector);
674
+ let selectBtn = document.getElementsByClassName(styles$2.selectBtn);
675
+ let progressBar = document.getElementsByClassName(styles$2.progressBar);
706
676
  selector[0].style.left = event.target.value + '%';
707
677
  progressBar[0].style.width = event.target.value + '%';
708
-
709
678
  if (rangeCount == event.target.value) {
710
679
  selectBtn[0].style.backgroundImage = "url('https://i.ibb.co/b1HDRtd/green.png')";
711
680
  } else {
712
681
  selectBtn[0].style.backgroundImage = "url('https://i.ibb.co/QvXjjLM/red.png')";
713
682
  }
714
683
  }
715
-
716
684
  function sliderChange(e) {
717
685
  setRight(rangeCount == e.target.value ? true : false);
718
686
  }
719
-
720
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("div", {
721
- className: styles$1.main
722
- }, /*#__PURE__*/React$1.createElement("div", {
723
- className: styles$1.range
724
- }, "\u25BC"), /*#__PURE__*/React$1.createElement("input", {
687
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
688
+ className: styles$2.main
689
+ }, /*#__PURE__*/React.createElement("div", {
690
+ className: styles$2.range
691
+ }, "\u25BC"), /*#__PURE__*/React.createElement("input", {
725
692
  type: "range",
726
- className: styles$1.slider,
693
+ className: styles$2.slider,
727
694
  onClick: right ? onclick : null,
728
695
  onInput: sliderInput,
729
696
  onMouseUp: sliderChange
730
- }), /*#__PURE__*/React$1.createElement("div", {
731
- className: styles$1.selector
732
- }, /*#__PURE__*/React$1.createElement("div", {
733
- className: styles$1.selectBtn
734
- })), /*#__PURE__*/React$1.createElement("div", {
735
- className: styles$1.progressBar
736
- }), /*#__PURE__*/React$1.createElement("div", {
737
- className: styles$1.range
697
+ }), /*#__PURE__*/React.createElement("div", {
698
+ className: styles$2.selector
699
+ }, /*#__PURE__*/React.createElement("div", {
700
+ className: styles$2.selectBtn
701
+ })), /*#__PURE__*/React.createElement("div", {
702
+ className: styles$2.progressBar
703
+ }), /*#__PURE__*/React.createElement("div", {
704
+ className: styles$2.range
738
705
  }, "\u25B2")));
739
706
  };
740
707
  Captcha.propTypes = {
@@ -746,9 +713,9 @@ Captcha.defaultProps = {
746
713
  onclick: undefined
747
714
  };
748
715
 
749
- var css_248z = ".stepper-module_bigRing__5GBm0{border:1px solid gray;border-radius:50%;cursor:pointer;height:30px;margin:10px;position:relative;width:30px}.stepper-module_smallRing__u-5a8{background-color:gray;border-radius:50%;color:#fff;font-size:12px;height:50%;left:50%;position:absolute;text-align:center;top:50%;transform:translate(-50%,-50%);width:50%}.stepper-module_activeRing__Lzvh1{border:1px solid blue;border-radius:50%;cursor:pointer;height:30px;margin:10px;position:relative;width:30px}.stepper-module_smallActiveRing__im-XG{background-color:blue;border-radius:50%;color:#fff;font-size:12px;height:50%;left:50%;position:absolute;text-align:center;top:50%;transform:translate(-50%,-50%);width:50%}";
750
- var styles = {"bigRing":"stepper-module_bigRing__5GBm0","smallRing":"stepper-module_smallRing__u-5a8","activeRing":"stepper-module_activeRing__Lzvh1","smallActiveRing":"stepper-module_smallActiveRing__im-XG"};
751
- styleInject(css_248z);
716
+ var css_248z$1 = ".stepper-module_bigRing__5GBm0{border:1px solid gray;border-radius:50%;cursor:pointer;height:30px;margin:10px;position:relative;width:30px}.stepper-module_smallRing__u-5a8{background-color:gray;border-radius:50%;color:#fff;font-size:12px;height:50%;left:50%;position:absolute;text-align:center;top:50%;transform:translate(-50%,-50%);width:50%}.stepper-module_activeRing__Lzvh1{border:1px solid blue;border-radius:50%;cursor:pointer;height:30px;margin:10px;position:relative;width:30px}.stepper-module_smallActiveRing__im-XG{background-color:blue;border-radius:50%;color:#fff;font-size:12px;height:50%;left:50%;position:absolute;text-align:center;top:50%;transform:translate(-50%,-50%);width:50%}";
717
+ var styles$1 = {"bigRing":"stepper-module_bigRing__5GBm0","smallRing":"stepper-module_smallRing__u-5a8","activeRing":"stepper-module_activeRing__Lzvh1","smallActiveRing":"stepper-module_smallActiveRing__im-XG"};
718
+ styleInject(css_248z$1);
752
719
 
753
720
  const Stepper = ({
754
721
  className,
@@ -757,18 +724,16 @@ const Stepper = ({
757
724
  activeSteps
758
725
  }) => {
759
726
  classnames(className);
760
- return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, (() => {
727
+ return /*#__PURE__*/React.createElement(React.Fragment, null, (() => {
761
728
  let steppers = [];
762
-
763
729
  for (let step = 1; step <= stepLength; step++) {
764
- steppers.push( /*#__PURE__*/React$1.createElement("div", {
765
- className: classnames(`${step <= activeSteps ? styles.activeRing : styles.bigRing}`),
730
+ steppers.push( /*#__PURE__*/React.createElement("div", {
731
+ className: classnames(`${step <= activeSteps ? styles$1.activeRing : styles$1.bigRing}`),
766
732
  key: step
767
- }, /*#__PURE__*/React$1.createElement("div", {
768
- className: classnames(`${step <= activeSteps ? styles.smallActiveRing : styles.smallRing}`)
733
+ }, /*#__PURE__*/React.createElement("div", {
734
+ className: classnames(`${step <= activeSteps ? styles$1.smallActiveRing : styles$1.smallRing}`)
769
735
  }, step <= activeSteps ? step : "")));
770
736
  }
771
-
772
737
  return steppers;
773
738
  })());
774
739
  };
@@ -779,4 +744,106 @@ Stepper.propTypes = {
779
744
  activeSteps: PropTypes.number
780
745
  };
781
746
 
782
- export { Autocomplate, Button, ButtonSize, ButtonTheme, ButtonType, Captcha, Checkbox, Input, InputSizes, InputTypes, Pagination, Radio, Stepper, Typography, TypographyType };
747
+ var css_248z = ".select-module_select-title__c8bR7{color:#3c393e;display:block;font-size:16px;font-weight:500;line-height:22px;margin-bottom:6px;text-transform:capitalize}.select-module_select-content__GCMDX{display:flex;flex-direction:column}.select-module_select-content-top__Aw-fB{border:2px solid #d1d1d1;border-radius:6px;box-sizing:border-box;color:#3c393e;cursor:pointer;display:flex;flex-direction:row;font-size:16px;font-weight:500;height:46px;line-height:22px;max-width:400px;padding:0 15px;transition:border-color .24s}.select-module_select-content-top__Aw-fB.select-module_active__v2Dce{border-color:#00236a}.select-module_select-content-top__Aw-fB:hover{border-color:#3c393e}.select-module_select-content-bottom__ueZCR{animation:select-module_select-show__391hQ .64s linear forwards;background:#fbfbfb;border-radius:6px;box-shadow:0 0 10px rgba(60,57,62,.08);max-height:0;max-width:400px;overflow:hidden;position:relative;top:6px}.select-module_select-content-bottom-inner__NWy2X{display:flex;flex-direction:column;max-height:234px;overflow-x:hidden;overflow-y:auto}@keyframes select-module_select-show__391hQ{to{max-height:400px}}.select-module_select-content-top-text__euajq{align-items:center;display:flex;flex:1;flex-direction:row;flex-wrap:nowrap}.select-module_select-content-top-icon__MBrGK{align-items:center;box-sizing:border-box;display:flex;flex:0 0 auto;padding:0 5px 0 20px}.select-module_select-content-top-icon__MBrGK>i{color:#3c393e;font-size:8px}.select-module_select-content-bottom-row__eKq5L{align-items:center;background:#fff;box-sizing:border-box;color:#3c393e;cursor:pointer;display:flex;font-size:16px;font-weight:500;height:46px;line-height:22px;margin-bottom:2px;padding:0 15px;transition:background .24s,color .24s}.select-module_select-content-bottom-row__eKq5L:last-child{margin-bottom:0}.select-module_select-content-bottom-row__eKq5L:hover{background:unset;color:#00236a}";
748
+ var styles = {"select-title":"select-module_select-title__c8bR7","select-content":"select-module_select-content__GCMDX","select-content-top":"select-module_select-content-top__Aw-fB","active":"select-module_active__v2Dce","select-content-bottom":"select-module_select-content-bottom__ueZCR","select-show":"select-module_select-show__391hQ","select-content-bottom-inner":"select-module_select-content-bottom-inner__NWy2X","select-content-top-text":"select-module_select-content-top-text__euajq","select-content-top-icon":"select-module_select-content-top-icon__MBrGK","select-content-bottom-row":"select-module_select-content-bottom-row__eKq5L"};
749
+ styleInject(css_248z);
750
+
751
+ const SelectTheme = {
752
+ DEFAULT: 'select-default',
753
+ PRIMARY: 'select-primary',
754
+ SUCCESS: 'select-success',
755
+ INFO: 'select-info',
756
+ WARNING: 'select-warning',
757
+ DANGER: 'select-danger',
758
+ LINK: 'select-link'
759
+ };
760
+ const SelectSize = {
761
+ SMALL: 'small',
762
+ MEDIUM: 'medium',
763
+ LARGE: 'large'
764
+ };
765
+ const Select = ({
766
+ theme,
767
+ size,
768
+ className,
769
+ disabled,
770
+ label,
771
+ jsonData,
772
+ eMessage,
773
+ required,
774
+ defaultOption,
775
+ onChange,
776
+ selected
777
+ }) => {
778
+ const options = jsonData.length ? JSON.parse(jsonData) : [];
779
+ let [opened, setOpened] = useState(false);
780
+ let [newSelected, setNewSelected] = useState(selected);
781
+ classnames(styles[theme], styles[size], {
782
+ [styles.disabled]: disabled,
783
+ [styles.required]: required
784
+ }, className);
785
+ return /*#__PURE__*/React.createElement("div", null, label ? /*#__PURE__*/React.createElement("label", {
786
+ className: styles['select-title']
787
+ }, label) : "", /*#__PURE__*/React.createElement("div", {
788
+ className: styles['select-wrap']
789
+ }, /*#__PURE__*/React.createElement("div", {
790
+ className: styles['select-content'],
791
+ id: styles.selector
792
+ }, /*#__PURE__*/React.createElement("div", {
793
+ className: styles['select-content-top'],
794
+ onClick: () => {
795
+ setOpened(!opened);
796
+ }
797
+ }, /*#__PURE__*/React.createElement("div", {
798
+ className: styles['select-content-top-text']
799
+ }, newSelected && newSelected.name ? newSelected.name : defaultOption), /*#__PURE__*/React.createElement("div", {
800
+ className: styles['select-content-top-icon']
801
+ }, /*#__PURE__*/React.createElement(Icon, {
802
+ className: opened ? 'icon-arrow-up' : 'icon-arrow-down'
803
+ }))), opened && !disabled ? /*#__PURE__*/React.createElement("div", {
804
+ className: styles['select-content-bottom']
805
+ }, /*#__PURE__*/React.createElement("div", {
806
+ className: styles['select-content-bottom-inner']
807
+ }, /*#__PURE__*/React.createElement("div", {
808
+ className: styles['select-content-bottom-row'],
809
+ onClick: () => {
810
+ if (!required && !selected) {
811
+ setNewSelected(defaultOption);
812
+ onChange(defaultOption);
813
+ setOpened(!opened);
814
+ }
815
+ }
816
+ }, defaultOption), options.map((option, i) => {
817
+ return /*#__PURE__*/React.createElement("div", {
818
+ key: i,
819
+ className: styles['select-content-bottom-row'],
820
+ disabled: true,
821
+ onClick: () => {
822
+ setNewSelected(option);
823
+ onChange(option);
824
+ setOpened(!opened);
825
+ },
826
+ defaultValue: option.id
827
+ }, option.name);
828
+ }))) : null)), eMessage ? /*#__PURE__*/React.createElement("span", {
829
+ className: styles.eMessage
830
+ }, eMessage) : null);
831
+ };
832
+ Select.propTypes = {
833
+ theme: PropTypes.oneOf(Object.values(SelectTheme)),
834
+ size: PropTypes.oneOf(Object.values(SelectSize)),
835
+ label: PropTypes.string,
836
+ eMessage: PropTypes.string,
837
+ defaultOption: PropTypes.string,
838
+ onChange: PropTypes.func,
839
+ required: PropTypes.bool,
840
+ disabled: PropTypes.bool,
841
+ className: PropTypes.string,
842
+ selected: PropTypes.object,
843
+ jsonData: PropTypes.string
844
+ };
845
+ Select.defaultProps = {
846
+ size: 'medium'
847
+ };
848
+
849
+ export { Autocomplate, Button, ButtonSize, ButtonTheme, ButtonType, Captcha, Checkbox, Input, InputSizes, InputTypes, Pagination, Radio, Select, SelectSize, SelectTheme, Stepper, Typography, TypographyType };