@xaypay/tui 0.0.15 → 0.0.17

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.js CHANGED
@@ -2,14 +2,14 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var React$1 = require('react');
5
+ var React = require('react');
6
6
  var PropTypes = require('prop-types');
7
7
  var classnames = require('classnames');
8
8
  var styled = require('styled-components');
9
9
 
10
10
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
11
 
12
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React$1);
12
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
13
13
  var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
14
14
  var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
15
15
  var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
@@ -18,14 +18,12 @@ function _extends() {
18
18
  _extends = Object.assign ? Object.assign.bind() : function (target) {
19
19
  for (var i = 1; i < arguments.length; i++) {
20
20
  var source = arguments[i];
21
-
22
21
  for (var key in source) {
23
22
  if (Object.prototype.hasOwnProperty.call(source, key)) {
24
23
  target[key] = source[key];
25
24
  }
26
25
  }
27
26
  }
28
-
29
27
  return target;
30
28
  };
31
29
  return _extends.apply(this, arguments);
@@ -58,9 +56,9 @@ function styleInject(css, ref) {
58
56
  }
59
57
  }
60
58
 
61
- 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}";
62
- 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"};
63
- styleInject(css_248z$9);
59
+ 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}";
60
+ 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"};
61
+ styleInject(css_248z$a);
64
62
 
65
63
  /**
66
64
  * Primary UI component for user interaction
@@ -96,11 +94,8 @@ const Button = ({
96
94
  outline,
97
95
  ...props
98
96
  }) => {
99
- console.log(styles$7);
100
- console.log(backgroundColor);
101
- const classProps = classnames__default["default"](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'
102
-
103
- console.log(classProps);
97
+ const classProps = classnames__default["default"](styles$8.btn, styles$8[theme], styles$8[size], outline ? styles$8['type-outline'] : styles$8['type-filled'], className);
98
+ // className='btn type-outline size-default'
104
99
  return /*#__PURE__*/React__default["default"].createElement("button", _extends({
105
100
  type: "button",
106
101
  className: classProps,
@@ -114,27 +109,22 @@ Button.propTypes = {
114
109
  type: PropTypes__default["default"].oneOf(Object.values(ButtonType)),
115
110
  theme: PropTypes__default["default"].oneOf(Object.values(ButtonTheme)),
116
111
  size: PropTypes__default["default"].oneOf(Object.values(ButtonSize)),
117
-
118
112
  /**
119
113
  * What background color to use
120
114
  */
121
115
  backgroundColor: PropTypes__default["default"].string,
122
-
123
116
  /**
124
117
  * How large should the button be?
125
118
  */
126
119
  // size: PropTypes.oneOf(['small', 'medium', 'large']),
127
-
128
120
  /**
129
121
  * Button contents
130
122
  */
131
123
  label: PropTypes__default["default"].string.isRequired,
132
-
133
124
  /**
134
125
  * Optional click handler
135
126
  */
136
127
  onClick: PropTypes__default["default"].func,
137
-
138
128
  /**
139
129
  * disabled
140
130
  */
@@ -150,8 +140,8 @@ Button.defaultProps = {
150
140
  outline: false
151
141
  };
152
142
 
153
- 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}";
154
- styleInject(css_248z$8);
143
+ 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}";
144
+ styleInject(css_248z$9);
155
145
 
156
146
  const TypographyType = {
157
147
  h1: 'h1',
@@ -173,7 +163,9 @@ const Typography = ({
173
163
  ...props
174
164
  }) => {
175
165
  const classProps = classnames__default["default"](className, bold ? 'bold' : '');
176
- const CustomTag = variant; // const Tag = ({ className, children }) => (
166
+ const CustomTag = variant;
167
+
168
+ // const Tag = ({ className, children }) => (
177
169
  // <CustomTag
178
170
  // className={className}
179
171
  // {...props}
@@ -200,9 +192,9 @@ Typography.defaultProps = {
200
192
  variant: 'h1'
201
193
  };
202
194
 
203
- 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}";
204
- 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"};
205
- styleInject(css_248z$7);
195
+ 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}";
196
+ 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"};
197
+ styleInject(css_248z$8);
206
198
 
207
199
  const Autocomplate = ({
208
200
  className,
@@ -215,13 +207,12 @@ const Autocomplate = ({
215
207
  searchCount,
216
208
  ...props
217
209
  }) => {
218
- classnames__default["default"](styles$6.searchBox, className);
219
- const [inputValue, setInputValue] = React$1.useState("");
220
- const [activeOption, setActiveOption] = React$1.useState(0);
221
- const [filteredOptions, setFilteredOptions] = React$1.useState([]);
222
- const [showOptions, setShowOptions] = React$1.useState(false);
210
+ classnames__default["default"](styles$7.searchBox, className);
211
+ const [inputValue, setInputValue] = React.useState("");
212
+ const [activeOption, setActiveOption] = React.useState(0);
213
+ const [filteredOptions, setFilteredOptions] = React.useState([]);
214
+ const [showOptions, setShowOptions] = React.useState(false);
223
215
  const parseOptionsData = jsonOptionsData.length !== 0 ? JSON.parse(jsonOptionsData).sort() : [];
224
-
225
216
  const handleChange = e => {
226
217
  const currentInputValue = e.currentTarget.value;
227
218
  const filteredOptions = parseOptionsData.filter(optionName => optionName.toLowerCase().indexOf(currentInputValue.toLowerCase()) > -1);
@@ -230,57 +221,51 @@ const Autocomplate = ({
230
221
  setFilteredOptions(filteredOptions);
231
222
  setShowOptions(true);
232
223
  };
233
-
234
224
  const handleClick = e => {
235
225
  setInputValue(e.currentTarget.innerText);
236
226
  setActiveOption(0);
237
227
  setFilteredOptions([]);
238
228
  setShowOptions(false);
239
229
  };
240
-
241
230
  let optionList;
242
-
243
231
  if (showOptions && inputValue) {
244
232
  if (filteredOptions.length && inputValue.length >= searchCount) {
245
233
  optionList = /*#__PURE__*/React__default["default"].createElement("div", {
246
- className: styles$6['autocomplate-content-bottom']
234
+ className: styles$7['autocomplate-content-bottom']
247
235
  }, /*#__PURE__*/React__default["default"].createElement("div", {
248
- className: styles$6['autocomplate-content-bottom-inner']
236
+ className: styles$7['autocomplate-content-bottom-inner']
249
237
  }, filteredOptions.map((optionName, index) => {
250
238
  let className;
251
-
252
239
  if (index === activeOption) {
253
240
  className = "option-active";
254
241
  }
255
-
256
242
  return /*#__PURE__*/React__default["default"].createElement("div", {
257
- className: styles$6[className],
243
+ className: styles$7[className],
258
244
  key: optionName,
259
245
  onClick: handleClick
260
246
  }, /*#__PURE__*/React__default["default"].createElement("div", {
261
- className: styles$6['autocomplate-content-bottom-row']
247
+ className: styles$7['autocomplate-content-bottom-row']
262
248
  }, optionName));
263
249
  })));
264
250
  } else {
265
251
  optionList = /*#__PURE__*/React__default["default"].createElement("div", {
266
- className: styles$6['autocomplate-content-bottom']
252
+ className: styles$7['autocomplate-content-bottom']
267
253
  }, /*#__PURE__*/React__default["default"].createElement("div", {
268
- className: styles$6['autocomplate-content-bottom-inner']
254
+ className: styles$7['autocomplate-content-bottom-inner']
269
255
  }, /*#__PURE__*/React__default["default"].createElement("div", {
270
- className: styles$6['autocomplate-content-bottom-row']
256
+ className: styles$7['autocomplate-content-bottom-row']
271
257
  }, /*#__PURE__*/React__default["default"].createElement("div", {
272
- className: styles$6['no-option']
258
+ className: styles$7['no-option']
273
259
  }, "No Option!"))));
274
260
  }
275
261
  }
276
-
277
262
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, label ? /*#__PURE__*/React__default["default"].createElement("label", {
278
- className: styles$6.labelInput
263
+ className: styles$7.labelInput
279
264
  }, label) : "", /*#__PURE__*/React__default["default"].createElement("div", {
280
- className: styles$6['autocomplate-content']
265
+ className: styles$7['autocomplate-content']
281
266
  }, /*#__PURE__*/React__default["default"].createElement("input", _extends({
282
267
  type: "text",
283
- className: styles$6['autocomplate-content-top'],
268
+ className: styles$7['autocomplate-content-top'],
284
269
  required: required,
285
270
  disabled: disabled,
286
271
  onChange: handleChange,
@@ -303,9 +288,9 @@ Autocomplate.defaultProps = {
303
288
  searchCount: 2
304
289
  };
305
290
 
306
- 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}";
307
- var styles$5 = {"checkbox-wrap":"checkbox-module_checkbox-wrap__Xrg-m","checkmark":"checkbox-module_checkmark__M8DY6"};
308
- styleInject(css_248z$6);
291
+ 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}";
292
+ var styles$6 = {"checkbox-wrap":"checkbox-module_checkbox-wrap__Xrg-m","checkmark":"checkbox-module_checkmark__M8DY6"};
293
+ styleInject(css_248z$7);
309
294
 
310
295
  const Checkbox = ({
311
296
  disabled,
@@ -319,10 +304,9 @@ const Checkbox = ({
319
304
  keyNames,
320
305
  ...props
321
306
  }) => {
322
- const classProps = classnames__default["default"](styles$5.checkbox, className);
307
+ const classProps = classnames__default["default"](styles$6.checkbox, className);
323
308
  const parseData = jsonData.length !== 0 ? JSON.parse(jsonData) : [];
324
- const [data, setData] = React$1.useState(parseData);
325
-
309
+ const [data, setData] = React.useState(parseData);
326
310
  const handleChange = e => {
327
311
  if (e.target.checked) {
328
312
  data.forEach(item => {
@@ -340,10 +324,9 @@ const Checkbox = ({
340
324
  });
341
325
  }
342
326
  };
343
-
344
327
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, data.map(element => {
345
328
  return /*#__PURE__*/React__default["default"].createElement("label", {
346
- className: styles$5["checkbox-wrap"],
329
+ className: styles$6["checkbox-wrap"],
347
330
  key: element.value
348
331
  }, /*#__PURE__*/React__default["default"].createElement("input", _extends({
349
332
  type: "checkbox",
@@ -354,9 +337,9 @@ const Checkbox = ({
354
337
  name: name ? name : element.name,
355
338
  onChange: handleChange
356
339
  }, props)), /*#__PURE__*/React__default["default"].createElement("span", {
357
- className: styles$5["checkmark"]
340
+ className: styles$6["checkmark"]
358
341
  }), element.label ? /*#__PURE__*/React__default["default"].createElement("span", {
359
- className: styles$5.labelRadio
342
+ className: styles$6.labelRadio
360
343
  }, label ? label : element.label) : "");
361
344
  }));
362
345
  };
@@ -377,20 +360,21 @@ Checkbox.defaultProps = {
377
360
  jsonData: '[{"value":"email", "name":"contact1", "label":"Email", "id":"contactChoice1"}, {"value":"phone", "name":"contact2", "label":"Phone", "id":"contactChoice2"}]'
378
361
  };
379
362
 
380
- 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\"}";
381
- styleInject(css_248z$5);
363
+ 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\"}";
364
+ styleInject(css_248z$6);
382
365
 
383
366
  /**
384
367
  * Created by aleksanyan.tigran on 10/7/2022.
385
368
  */
369
+ const Icon = props => {
370
+ return /*#__PURE__*/React__default["default"].createElement("i", {
371
+ className: css_248z$6[props.className]
372
+ });
373
+ };
386
374
 
387
- const Icon = props => /*#__PURE__*/React.createElement("i", {
388
- className: css_248z$5[props.className]
389
- });
390
-
391
- 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)}}";
392
- 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"};
393
- styleInject(css_248z$4);
375
+ 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)}}";
376
+ 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"};
377
+ styleInject(css_248z$5);
394
378
 
395
379
  const InputTypes = {
396
380
  TEXT: "text",
@@ -416,29 +400,26 @@ const Input = ({
416
400
  disabled,
417
401
  type,
418
402
  onChange,
403
+ value,
419
404
  ...props
420
405
  }) => {
421
- const [inputValue, setInputValue] = React$1.useState("");
422
-
406
+ const [inputValue, setInputValue] = React.useState(value);
423
407
  const handleChange = event => {
424
408
  setInputValue(event.target.value);
425
409
  onChange ? onChange(event.target.value) : '';
426
410
  };
427
-
428
411
  let eMessage = "";
429
-
430
412
  if (errorMesage) {
431
413
  eMessage = errorMesage;
432
414
  } else if (regexp) {
433
415
  const regex = new RegExp(regexp);
434
416
  eMessage = regex.test(inputValue) ? "" : regexpError;
435
417
  }
436
-
437
- const classProps = classnames__default["default"](styles$4.input, styles$4[size], eMessage != '' ? styles$4['error-message'] : "", className);
418
+ const classProps = classnames__default["default"](styles$5.input, styles$5[size], eMessage != '' ? styles$5['error-message'] : "", className);
438
419
  return /*#__PURE__*/React__default["default"].createElement("div", {
439
- className: styles$4['input-wrap']
420
+ className: styles$5['input-wrap']
440
421
  }, label ? /*#__PURE__*/React__default["default"].createElement("label", {
441
- className: styles$4.labelInput
422
+ className: styles$5.labelInput
442
423
  }, label) : "", /*#__PURE__*/React__default["default"].createElement("input", _extends({}, props, {
443
424
  type: type,
444
425
  className: classProps,
@@ -449,7 +430,7 @@ const Input = ({
449
430
  onChange: handleChange,
450
431
  value: inputValue
451
432
  })), eMessage ? /*#__PURE__*/React__default["default"].createElement("span", {
452
- className: styles$4.inputErrorMessages
433
+ className: styles$5.inputErrorMessages
453
434
  }, eMessage) : "");
454
435
  };
455
436
  Input.propTypes = {
@@ -463,7 +444,8 @@ Input.propTypes = {
463
444
  regexp: PropTypes__default["default"].string,
464
445
  regexpError: PropTypes__default["default"].string,
465
446
  label: PropTypes__default["default"].string.isRequired,
466
- disabled: PropTypes__default["default"].bool
447
+ disabled: PropTypes__default["default"].bool,
448
+ value: PropTypes__default["default"].string
467
449
  };
468
450
  Input.defaultProps = {
469
451
  label: "",
@@ -472,56 +454,53 @@ Input.defaultProps = {
472
454
  onChange: undefined,
473
455
  required: true,
474
456
  errorMesage: "",
475
- type: "text"
457
+ type: "text",
458
+ value: ""
476
459
  };
477
460
 
478
- 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}";
479
- 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"};
480
- styleInject(css_248z$3);
461
+ 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}";
462
+ 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"};
463
+ styleInject(css_248z$4);
481
464
 
482
- const Dots = "...";
465
+ // import styles from "./pagination.module.scss";
483
466
 
467
+ const Dots = "...";
484
468
  const range = (start, end) => {
485
469
  const length = end - start + 1;
486
470
  return Array.from({
487
471
  length
488
472
  }, (_, idx) => idx + start);
489
473
  };
490
-
491
474
  const PaginationRange = ({
492
475
  currentTotalCount,
493
476
  offset,
494
477
  siblingCountNumber,
495
478
  currentPageNumber
496
479
  }) => {
497
- const paginationRange = React$1.useMemo(() => {
498
- const totalPageCount = Math.ceil(currentTotalCount / offset); //currentPage + 2*Dots + start + end = 5
480
+ const paginationRange = React.useMemo(() => {
481
+ const totalPageCount = Math.ceil(currentTotalCount / offset);
499
482
 
483
+ //currentPage + 2*Dots + start + end = 5
500
484
  const totalPageNumber = siblingCountNumber + 5;
501
-
502
485
  if (totalPageNumber >= totalPageCount) {
503
486
  return range(1, totalPageCount);
504
487
  }
505
-
506
488
  const rightSiblingIndex = Math.min(currentPageNumber + siblingCountNumber, totalPageCount);
507
489
  const leftSiblingIndex = Math.max(currentPageNumber - siblingCountNumber, 1);
508
490
  const shouldShowLeftDots = leftSiblingIndex > 2;
509
491
  const shouldShowRightDots = rightSiblingIndex < totalPageCount - 2;
510
492
  const firstPageIndex = 1;
511
493
  const lastPageIndex = totalPageCount;
512
-
513
494
  if (!shouldShowLeftDots && shouldShowRightDots) {
514
495
  let leftItemCount = currentPageNumber === 4 && lastPageIndex > 7 ? 4 + siblingCountNumber : 3 + siblingCountNumber;
515
496
  let leftRange = range(1, leftItemCount);
516
497
  return [...leftRange, Dots, totalPageCount];
517
498
  }
518
-
519
499
  if (shouldShowLeftDots && !shouldShowRightDots) {
520
500
  let rightItemCount = currentPageNumber === lastPageIndex - 3 && lastPageIndex > 7 ? rightItemCount = 4 + siblingCountNumber : rightItemCount = 3 + siblingCountNumber;
521
501
  let rightRange = range(totalPageCount - rightItemCount + 1, totalPageCount);
522
502
  return [firstPageIndex, Dots, ...rightRange];
523
503
  }
524
-
525
504
  if (shouldShowLeftDots && shouldShowRightDots) {
526
505
  let middleRange = range(leftSiblingIndex, rightSiblingIndex);
527
506
  return [firstPageIndex, Dots, ...middleRange, Dots, lastPageIndex];
@@ -538,89 +517,81 @@ const Pagination = ({
538
517
  offset,
539
518
  className
540
519
  }) => {
541
- const [siblingCountNumber, setSibilingCountNumber] = React$1.useState(2);
542
- const [currentPageNumber, setCurrentPage] = React$1.useState(1);
543
- const [currentTotalCount, setcurrentTotalCount] = React$1.useState(10);
544
- React$1.useEffect(() => {
520
+ const [siblingCountNumber, setSibilingCountNumber] = React.useState(siblingCount);
521
+ const [currentPageNumber, setCurrentPage] = React.useState(currentPage);
522
+ const [currentTotalCount, setcurrentTotalCount] = React.useState(totalCount);
523
+ React.useEffect(() => {
545
524
  setcurrentTotalCount(totalCount);
546
525
  }, [totalCount]);
547
- React$1.useEffect(() => {
526
+ React.useEffect(() => {
548
527
  setSibilingCountNumber(siblingCount);
549
528
  }, [siblingCount]);
550
- React$1.useEffect(() => {
529
+ React.useEffect(() => {
551
530
  setCurrentPage(currentPage);
552
531
  }, [currentPage]);
553
-
554
532
  const onPageChange = page => {
555
533
  setCurrentPage(page);
556
534
  };
557
-
558
- onChange(currentPageNumber);
535
+ React.useEffect(() => {
536
+ onChange(currentPageNumber);
537
+ }, [currentPageNumber]);
559
538
  const paginationRange = PaginationRange({
560
539
  currentPageNumber,
561
540
  currentTotalCount,
562
541
  siblingCountNumber,
563
542
  offset
564
543
  });
565
-
566
544
  if (currentPageNumber === 0 || paginationRange.length < 2) {
567
545
  return null;
568
546
  }
569
-
570
- const classProps = classnames__default["default"](styles$3.list, className ? className : styles$3["pagination-bar"]);
571
-
547
+ const classProps = classnames__default["default"](styles$4.list, className ? className : styles$4["pagination-bar"]);
572
548
  const onNext = () => {
573
549
  onPageChange(currentPageNumber + 1);
574
550
  };
575
-
576
551
  const onPrevious = () => {
577
552
  onPageChange(currentPageNumber - 1);
578
553
  };
579
-
580
554
  const onNextFive = () => {
581
555
  currentPageNumber !== lastPage - 4 ? onPageChange(currentPageNumber + 5) : onPageChange(currentPageNumber + 4);
582
556
  };
583
-
584
557
  const onPreviousFive = e => {
585
558
  currentPageNumber !== 5 ? onPageChange(currentPageNumber - 5) : onPageChange(currentPageNumber - 4);
586
559
  };
587
-
588
560
  let lastPage = paginationRange[paginationRange.length - 1];
589
- return /*#__PURE__*/React$1.React.createElement("ul", {
561
+ return /*#__PURE__*/React__default["default"].createElement("ul", {
590
562
  className: classProps
591
- }, /*#__PURE__*/React$1.React.createElement("button", {
592
- className: styles$3["pagination-btn"],
563
+ }, /*#__PURE__*/React__default["default"].createElement("button", {
564
+ className: styles$4["pagination-btn"],
593
565
  onClick: onPrevious,
594
566
  disabled: currentPage === 1 ? true : false
595
- }, /*#__PURE__*/React$1.React.createElement(Icon, {
567
+ }, /*#__PURE__*/React__default["default"].createElement(Icon, {
596
568
  className: "icon-arrow-back"
597
569
  })), paginationRange.map((pageNumber, id) => {
598
570
  if (pageNumber === Dots) {
599
571
  let currentPageIndex = paginationRange.indexOf(currentPageNumber);
600
- return /*#__PURE__*/React$1.React.createElement("li", {
572
+ return /*#__PURE__*/React__default["default"].createElement("li", {
601
573
  key: id,
602
- className: classnames__default["default"](styles$3['pagination-jump-next'], styles$3.listItem),
574
+ className: classnames__default["default"](styles$4['pagination-jump-next'], styles$4.listItem),
603
575
  onClick: id < currentPageIndex ? onPreviousFive : onNextFive,
604
576
  disabled: currentPageIndex === 0 ? true : false
605
- }, /*#__PURE__*/React$1.React.createElement("span", {
606
- className: styles$3['pagination-jump-next-txt']
607
- }, "..."), /*#__PURE__*/React$1.React.createElement("span", {
608
- className: styles$3['pagination-jump-next-arrow']
609
- }, /*#__PURE__*/React$1.React.createElement(Icon, {
577
+ }, /*#__PURE__*/React__default["default"].createElement("span", {
578
+ className: styles$4['pagination-jump-next-txt']
579
+ }, "..."), /*#__PURE__*/React__default["default"].createElement("span", {
580
+ className: styles$4['pagination-jump-next-arrow']
581
+ }, /*#__PURE__*/React__default["default"].createElement(Icon, {
610
582
  className: "icon-arrow-jump-next"
611
583
  })));
612
584
  }
613
-
614
- return /*#__PURE__*/React$1.React.createElement("li", {
585
+ return /*#__PURE__*/React__default["default"].createElement("li", {
615
586
  onClick: () => onPageChange(pageNumber),
616
587
  key: id,
617
- className: classnames__default["default"](`${pageNumber === currentPageNumber ? styles$3.selected : styles$3.listItem}`, styles$3['pagination-item'])
588
+ className: classnames__default["default"](`${pageNumber === currentPageNumber ? styles$4.selected : styles$4.listItem}`, styles$4['pagination-item'])
618
589
  }, pageNumber);
619
- }), /*#__PURE__*/React$1.React.createElement("button", {
590
+ }), /*#__PURE__*/React__default["default"].createElement("button", {
620
591
  onClick: onNext,
621
- className: styles$3["pagination-btn"],
592
+ className: styles$4["pagination-btn"],
622
593
  disabled: currentPageNumber === lastPage ? true : false
623
- }, /*#__PURE__*/React$1.React.createElement(Icon, {
594
+ }, /*#__PURE__*/React__default["default"].createElement(Icon, {
624
595
  className: "icon-arrow"
625
596
  })));
626
597
  };
@@ -636,9 +607,9 @@ Pagination.defaultProps = {
636
607
  siblingCount: 2
637
608
  };
638
609
 
639
- 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}";
640
- var styles$2 = {"radio-wrap":"radio-module_radio-wrap__-lO7V","radio-checkmark":"radio-module_radio-checkmark__Kvol0"};
641
- styleInject(css_248z$2);
610
+ 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}";
611
+ var styles$3 = {"radio-wrap":"radio-module_radio-wrap__-lO7V","radio-checkmark":"radio-module_radio-checkmark__Kvol0"};
612
+ styleInject(css_248z$3);
642
613
 
643
614
  const Radio = ({
644
615
  disabled,
@@ -652,11 +623,11 @@ const Radio = ({
652
623
  keyNames,
653
624
  ...props
654
625
  }) => {
655
- const classProps = classnames__default["default"](styles$2.checkbox, className);
626
+ const classProps = classnames__default["default"](styles$3.checkbox, className);
656
627
  const parseData = jsonData.length !== 0 ? JSON.parse(jsonData) : [];
657
628
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, parseData.map((element, id) => {
658
629
  return /*#__PURE__*/React__default["default"].createElement("label", {
659
- className: styles$2["radio-wrap"],
630
+ className: styles$3["radio-wrap"],
660
631
  key: element.value
661
632
  }, /*#__PURE__*/React__default["default"].createElement("input", _extends({
662
633
  type: "radio",
@@ -667,9 +638,9 @@ const Radio = ({
667
638
  value: value ? value : element.value,
668
639
  name: name ? name : element.name
669
640
  }, props)), /*#__PURE__*/React__default["default"].createElement("span", {
670
- className: styles$2["radio-checkmark"]
641
+ className: styles$3["radio-checkmark"]
671
642
  }), element.label ? /*#__PURE__*/React__default["default"].createElement("span", {
672
- className: styles$2.labelRadio
643
+ className: styles$3.labelRadio
673
644
  }, label ? label : element.label) : "");
674
645
  }));
675
646
  };
@@ -690,62 +661,58 @@ Radio.defaultProps = {
690
661
  jsonData: '[{"value":"email", "name":"contact", "label":"Email", "id":"contactChoice1"}, {"value":"phone", "name":"contact", "label":"Phone", "id":"contactChoice2"}]'
691
662
  };
692
663
 
693
- 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}";
694
- 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"};
695
- styleInject(css_248z$1);
664
+ 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}";
665
+ 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"};
666
+ styleInject(css_248z$2);
696
667
 
697
668
  const Captcha = ({
698
669
  onclick,
699
670
  rangeCount
700
671
  }) => {
701
- const [data, setData] = React$1.useState("");
702
- const [right, setRight] = React$1.useState(false);
672
+ const [data, setData] = React.useState("");
673
+ const [right, setRight] = React.useState(false);
703
674
  let range = rangeCount <= 100 ? rangeCount : 0;
704
- let rangeElement = document.getElementsByClassName(styles$1.range);
705
- React$1.useEffect(() => {
675
+ let rangeElement = document.getElementsByClassName(styles$2.range);
676
+ React.useEffect(() => {
706
677
  for (let element of rangeElement) {
707
678
  element.style.marginLeft = `${range - 3}%`;
708
679
  element.style.color = data;
709
680
  }
710
681
  }, [range, data]);
711
-
712
682
  function sliderInput(event) {
713
683
  setData(rangeCount == event.target.value ? 'green' : 'indianred');
714
- let selector = document.getElementsByClassName(styles$1.selector);
715
- let selectBtn = document.getElementsByClassName(styles$1.selectBtn);
716
- let progressBar = document.getElementsByClassName(styles$1.progressBar);
684
+ let selector = document.getElementsByClassName(styles$2.selector);
685
+ let selectBtn = document.getElementsByClassName(styles$2.selectBtn);
686
+ let progressBar = document.getElementsByClassName(styles$2.progressBar);
717
687
  selector[0].style.left = event.target.value + '%';
718
688
  progressBar[0].style.width = event.target.value + '%';
719
-
720
689
  if (rangeCount == event.target.value) {
721
690
  selectBtn[0].style.backgroundImage = "url('https://i.ibb.co/b1HDRtd/green.png')";
722
691
  } else {
723
692
  selectBtn[0].style.backgroundImage = "url('https://i.ibb.co/QvXjjLM/red.png')";
724
693
  }
725
694
  }
726
-
727
695
  function sliderChange(e) {
728
696
  setRight(rangeCount == e.target.value ? true : false);
729
697
  }
730
-
731
698
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
732
- className: styles$1.main
699
+ className: styles$2.main
733
700
  }, /*#__PURE__*/React__default["default"].createElement("div", {
734
- className: styles$1.range
701
+ className: styles$2.range
735
702
  }, "\u25BC"), /*#__PURE__*/React__default["default"].createElement("input", {
736
703
  type: "range",
737
- className: styles$1.slider,
704
+ className: styles$2.slider,
738
705
  onClick: right ? onclick : null,
739
706
  onInput: sliderInput,
740
707
  onMouseUp: sliderChange
741
708
  }), /*#__PURE__*/React__default["default"].createElement("div", {
742
- className: styles$1.selector
709
+ className: styles$2.selector
743
710
  }, /*#__PURE__*/React__default["default"].createElement("div", {
744
- className: styles$1.selectBtn
711
+ className: styles$2.selectBtn
745
712
  })), /*#__PURE__*/React__default["default"].createElement("div", {
746
- className: styles$1.progressBar
713
+ className: styles$2.progressBar
747
714
  }), /*#__PURE__*/React__default["default"].createElement("div", {
748
- className: styles$1.range
715
+ className: styles$2.range
749
716
  }, "\u25B2")));
750
717
  };
751
718
  Captcha.propTypes = {
@@ -757,9 +724,9 @@ Captcha.defaultProps = {
757
724
  onclick: undefined
758
725
  };
759
726
 
760
- 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%}";
761
- var styles = {"bigRing":"stepper-module_bigRing__5GBm0","smallRing":"stepper-module_smallRing__u-5a8","activeRing":"stepper-module_activeRing__Lzvh1","smallActiveRing":"stepper-module_smallActiveRing__im-XG"};
762
- styleInject(css_248z);
727
+ 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%}";
728
+ 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"};
729
+ styleInject(css_248z$1);
763
730
 
764
731
  const Stepper = ({
765
732
  className,
@@ -770,16 +737,14 @@ const Stepper = ({
770
737
  classnames__default["default"](className);
771
738
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, (() => {
772
739
  let steppers = [];
773
-
774
740
  for (let step = 1; step <= stepLength; step++) {
775
741
  steppers.push( /*#__PURE__*/React__default["default"].createElement("div", {
776
- className: classnames__default["default"](`${step <= activeSteps ? styles.activeRing : styles.bigRing}`),
742
+ className: classnames__default["default"](`${step <= activeSteps ? styles$1.activeRing : styles$1.bigRing}`),
777
743
  key: step
778
744
  }, /*#__PURE__*/React__default["default"].createElement("div", {
779
- className: classnames__default["default"](`${step <= activeSteps ? styles.smallActiveRing : styles.smallRing}`)
745
+ className: classnames__default["default"](`${step <= activeSteps ? styles$1.smallActiveRing : styles$1.smallRing}`)
780
746
  }, step <= activeSteps ? step : "")));
781
747
  }
782
-
783
748
  return steppers;
784
749
  })());
785
750
  };
@@ -790,6 +755,111 @@ Stepper.propTypes = {
790
755
  activeSteps: PropTypes__default["default"].number
791
756
  };
792
757
 
758
+ 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}";
759
+ 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"};
760
+ styleInject(css_248z);
761
+
762
+ const SelectTheme = {
763
+ DEFAULT: 'select-default',
764
+ PRIMARY: 'select-primary',
765
+ SUCCESS: 'select-success',
766
+ INFO: 'select-info',
767
+ WARNING: 'select-warning',
768
+ DANGER: 'select-danger',
769
+ LINK: 'select-link'
770
+ };
771
+ const SelectSize = {
772
+ SMALL: 'small',
773
+ MEDIUM: 'medium',
774
+ LARGE: 'large'
775
+ };
776
+ const Select = ({
777
+ theme,
778
+ size,
779
+ className,
780
+ disabled,
781
+ label,
782
+ jsonData,
783
+ eMessage,
784
+ required,
785
+ defaultOption,
786
+ onChange,
787
+ keyNames,
788
+ selected
789
+ }) => {
790
+ const options = jsonData.length ? JSON.parse(jsonData) : [];
791
+ const parseSelectedData = selected.length !== 0 ? JSON.parse(selected) : {};
792
+ let [opened, setOpened] = React.useState(false);
793
+ let [newSelected, setNewSelected] = React.useState(parseSelectedData);
794
+ classnames__default["default"](styles[theme], styles[size], {
795
+ [styles.disabled]: disabled,
796
+ [styles.required]: required
797
+ }, className);
798
+ return /*#__PURE__*/React__default["default"].createElement("div", null, label ? /*#__PURE__*/React__default["default"].createElement("label", {
799
+ className: styles['select-title']
800
+ }, label) : "", /*#__PURE__*/React__default["default"].createElement("div", {
801
+ className: styles['select-wrap']
802
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
803
+ className: styles['select-content'],
804
+ id: styles.selector
805
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
806
+ className: styles['select-content-top'],
807
+ onClick: () => {
808
+ setOpened(!opened);
809
+ }
810
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
811
+ className: styles['select-content-top-text']
812
+ }, newSelected && newSelected[keyNames.name] ? newSelected[keyNames.name] : defaultOption), /*#__PURE__*/React__default["default"].createElement("div", {
813
+ className: styles['select-content-top-icon']
814
+ }, /*#__PURE__*/React__default["default"].createElement(Icon, {
815
+ className: opened ? 'icon-arrow-up' : 'icon-arrow-down'
816
+ }))), opened && !disabled ? /*#__PURE__*/React__default["default"].createElement("div", {
817
+ className: styles['select-content-bottom']
818
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
819
+ className: styles['select-content-bottom-inner']
820
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
821
+ className: styles['select-content-bottom-row'],
822
+ onClick: () => {
823
+ if (!required && !selected) {
824
+ setNewSelected(defaultOption);
825
+ onChange(defaultOption);
826
+ setOpened(!opened);
827
+ }
828
+ }
829
+ }, defaultOption), options.map((option, i) => {
830
+ return /*#__PURE__*/React__default["default"].createElement("div", {
831
+ key: i,
832
+ className: styles['select-content-bottom-row'],
833
+ disabled: true,
834
+ onClick: () => {
835
+ setNewSelected(option);
836
+ onChange(option);
837
+ setOpened(!opened);
838
+ },
839
+ defaultValue: option[keyNames.id]
840
+ }, option[keyNames.name]);
841
+ }))) : null)), eMessage ? /*#__PURE__*/React__default["default"].createElement("span", {
842
+ className: styles.eMessage
843
+ }, eMessage) : null);
844
+ };
845
+ Select.propTypes = {
846
+ theme: PropTypes__default["default"].oneOf(Object.values(SelectTheme)),
847
+ size: PropTypes__default["default"].oneOf(Object.values(SelectSize)),
848
+ label: PropTypes__default["default"].string,
849
+ eMessage: PropTypes__default["default"].string,
850
+ defaultOption: PropTypes__default["default"].string,
851
+ onChange: PropTypes__default["default"].func,
852
+ required: PropTypes__default["default"].bool,
853
+ disabled: PropTypes__default["default"].bool,
854
+ className: PropTypes__default["default"].string,
855
+ selected: PropTypes__default["default"].string,
856
+ jsonData: PropTypes__default["default"].string,
857
+ keyNames: PropTypes__default["default"].object
858
+ };
859
+ Select.defaultProps = {
860
+ size: 'medium'
861
+ };
862
+
793
863
  exports.Autocomplate = Autocomplate;
794
864
  exports.Button = Button;
795
865
  exports.ButtonSize = ButtonSize;
@@ -802,6 +872,9 @@ exports.InputSizes = InputSizes;
802
872
  exports.InputTypes = InputTypes;
803
873
  exports.Pagination = Pagination;
804
874
  exports.Radio = Radio;
875
+ exports.Select = Select;
876
+ exports.SelectSize = SelectSize;
877
+ exports.SelectTheme = SelectTheme;
805
878
  exports.Stepper = Stepper;
806
879
  exports.Typography = Typography;
807
880
  exports.TypographyType = TypographyType;