hrm_ui_lib 1.3.7-alpha.1 → 1.3.7-alpha.2

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.
Files changed (96) hide show
  1. package/Button-f483692b.js +436 -0
  2. package/components/Alert/Alert.js +1 -1
  3. package/components/Alert/index.js +1 -1
  4. package/components/Avatar/Avatar.js +1 -1
  5. package/components/Avatar/AvatarGroup.js +1 -1
  6. package/components/Avatar/index.js +1 -1
  7. package/components/Button/Button.js +1 -1
  8. package/components/Button/index.js +1 -1
  9. package/components/ButtonIcon/ButtonIcon.js +1 -1
  10. package/components/ButtonIcon/index.js +1 -1
  11. package/components/CardBody/CardBody.js +1 -1
  12. package/components/CardBody/index.js +1 -1
  13. package/components/CardSelect/CardSelect.js +1 -1
  14. package/components/CardSelect/CardSelectGroup.js +1 -1
  15. package/components/CardSelect/components/CardInput.js +1 -1
  16. package/components/CardSelect/components/index.js +1 -1
  17. package/components/CardSelect/index.js +1 -1
  18. package/components/Checkbox/Checkbox.js +1 -1
  19. package/components/Checkbox/index.js +1 -1
  20. package/components/Copy/Copy.js +1 -1
  21. package/components/Copy/index.js +1 -1
  22. package/components/Counter/Counter.js +1 -1
  23. package/components/Counter/index.js +1 -1
  24. package/components/DatePicker/CustomHeader/CustomHeader.js +1 -1
  25. package/components/DatePicker/RangeDatePicker.js +1 -1
  26. package/components/DatePicker/SimpleDatePicker/SimpleDatePicker.js +1 -1
  27. package/components/DatePicker/SimpleDatePicker/SimpleDatePickerDesktop.js +1 -1
  28. package/components/DatePicker/SimpleDatePicker/SimpleDatePickerMobile.js +1 -1
  29. package/components/DatePicker/SimpleDatePicker/index.js +1 -1
  30. package/components/DatePicker/TimePicker.js +1 -1
  31. package/components/DatePicker/index.js +1 -1
  32. package/components/Empty/Empty.js +1 -1
  33. package/components/Empty/index.js +1 -1
  34. package/components/FileUpload/FileUpload.js +1 -1
  35. package/components/FileUpload/UploadItems.js +1 -1
  36. package/components/FileUpload/index.js +1 -1
  37. package/components/FormContainer/FormContainer.js +1 -1
  38. package/components/FormContainer/index.js +1 -1
  39. package/components/FormField/FormField.js +1 -1
  40. package/components/FormField/index.js +1 -1
  41. package/components/Input/Input.js +1 -1
  42. package/components/Input/index.js +1 -1
  43. package/components/ItemSelect/ItemSelect.js +1 -1
  44. package/components/ItemSelect/ItemSelectGroup.js +1 -1
  45. package/components/ItemSelect/index.js +1 -1
  46. package/components/Menu/Menu.js +1 -1
  47. package/components/Menu/NestedMenu.js +1 -1
  48. package/components/Menu/index.js +1 -1
  49. package/components/Modal/Modal.js +1 -1
  50. package/components/Modal/ModalConfirmation.js +1 -1
  51. package/components/Modal/ModalContent.js +1 -1
  52. package/components/Modal/index.js +1 -1
  53. package/components/More/More.js +1 -1
  54. package/components/More/index.js +1 -1
  55. package/components/Popover/Popover.js +1 -1
  56. package/components/Popover/PopoverMobile.js +1 -1
  57. package/components/Popover/index.js +1 -1
  58. package/components/Radio/RadioGroup.js +1 -1
  59. package/components/Radio/index.js +1 -1
  60. package/components/Select/ButtonSelect/ButtonSelect.js +1 -1
  61. package/components/Select/FilterSelect/FilterDropdown.js +1 -1
  62. package/components/Select/FilterSelect/FilterGroupDropdown.js +1 -1
  63. package/components/Select/FilterSelect/FilterSelect.js +1 -1
  64. package/components/Select/MultiSelect/MultiBase/MultiBase.js +1 -1
  65. package/components/Select/MultiSelect/MultiSelect.js +1 -1
  66. package/components/Select/MultiSelect/MultiSelectGrouped/MultiSelectGrouped.js +1 -1
  67. package/components/Select/MultiSelect/MultiSelectWithTabs/MultiSelectWithTabs.js +1 -1
  68. package/components/Select/MultiSelect/OptionsWrapper.js +1 -1
  69. package/components/Select/NestedSelect/NestedSelect.js +1 -1
  70. package/components/Select/Select/Select.js +1 -1
  71. package/components/Select/SharedComponents/Actions.js +1 -1
  72. package/components/Select/SharedComponents/ContentTop.js +1 -1
  73. package/components/Select/SharedComponents/Footer.js +1 -1
  74. package/components/Select/SharedComponents/InputSelectWrapper/InputSelectWrapper.js +1 -1
  75. package/components/Select/SharedComponents/index.js +1 -1
  76. package/components/Select/index.js +1 -1
  77. package/components/SideSheet/Footer/Footer.js +1 -1
  78. package/components/SideSheet/SideSheet.js +1 -1
  79. package/components/SideSheet/index.js +1 -1
  80. package/components/Snackbar/Snackbar.js +1 -1
  81. package/components/Snackbar/index.js +1 -1
  82. package/components/Switcher/Switcher.js +1 -1
  83. package/components/Switcher/index.js +1 -1
  84. package/components/Table/Header.js +1 -1
  85. package/components/Table/IndeterminateCheckbox.js +1 -1
  86. package/components/Table/Row.js +1 -1
  87. package/components/Table/Table.js +1 -1
  88. package/components/Table/index.js +1 -1
  89. package/components/Table/utils.js +1 -1
  90. package/components/Textarea/Textarea.js +1 -1
  91. package/components/Textarea/index.js +1 -1
  92. package/helperComponents/OptionItem/OptionItem.js +1 -1
  93. package/helperComponents/OptionItem/index.js +1 -1
  94. package/helperComponents/index.js +1 -1
  95. package/index.js +1 -1
  96. package/package.json +1 -1
@@ -0,0 +1,436 @@
1
+ import { _ as _extends } from './extends-d40233e7.js';
2
+ import { _ as _defineProperty } from './defineProperty-cc02b516.js';
3
+ import { _ as _objectWithoutProperties } from './objectWithoutProperties-8b2251e9.js';
4
+ import React, { useState, useId, useEffect, forwardRef, useRef, useMemo } from 'react';
5
+ import classNames from 'classnames';
6
+ import 'dayjs';
7
+ import { Loader } from './helperComponents/Loader/Loader.js';
8
+ import './consts/index.js';
9
+ import './hooks/useScreenSize.js';
10
+ import 'react-hook-form';
11
+ import { _ as _slicedToArray } from './slicedToArray-0c287559.js';
12
+ import { useIsMobile } from './hooks/useGetIsMobile.js';
13
+ import { motion } from 'framer-motion';
14
+ import { AnimatePresenceWrapper } from './helperComponents/AnimatePresenceWrapper/AnimatePresenceWrapper.js';
15
+ import { useOnOutsideClick } from './hooks/useOnOutsideClick.js';
16
+ import { useHideBodyScroll } from './hooks/useHideBodyScroll.js';
17
+ import 'react-syntax-highlighter';
18
+ import { IconDismiss } from './components/SVGIcons/IconDismiss.js';
19
+ import { Positions } from './components/Tooltip/types.js';
20
+ import { Text } from './components/Text/Text.js';
21
+ import { Tooltip } from './components/Tooltip/Tooltip.js';
22
+ import { noop } from './utils/helpers.js';
23
+ import { Link } from './components/Link/Link.js';
24
+ import { PopoverDesktop } from './components/Popover/PopoverDesktop.js';
25
+ import { IconInfo } from './components/SVGIcons/IconInfo.js';
26
+ import { IconDynamicComponent } from './helperComponents/IconDynamicComponent/IconDynamicComponent.js';
27
+ import { LITE_LOADER_TYPES, ICON_SIZE_MAPPING, ICON_TYPE_MAPPING } from './components/Button/consts.js';
28
+
29
+ var _excluded$3 = ["size", "className", "iconProps", "buttonActionType", "disabled", "isLoading", "formId", "dataId", "onClick", "refHandler"];
30
+ var ButtonIcon = function ButtonIcon(props) {
31
+ var _props$size = props.size,
32
+ size = _props$size === void 0 ? 'medium' : _props$size,
33
+ _props$className = props.className,
34
+ className = _props$className === void 0 ? '' : _props$className,
35
+ iconProps = props.iconProps,
36
+ _props$buttonActionTy = props.buttonActionType,
37
+ buttonActionType = _props$buttonActionTy === void 0 ? 'button' : _props$buttonActionTy,
38
+ disabled = props.disabled,
39
+ isLoading = props.isLoading,
40
+ formId = props.formId,
41
+ _props$dataId = props.dataId,
42
+ dataId = _props$dataId === void 0 ? '' : _props$dataId,
43
+ onClick = props.onClick,
44
+ _props$refHandler = props.refHandler,
45
+ refHandler = _props$refHandler === void 0 ? null : _props$refHandler,
46
+ rest = _objectWithoutProperties(props, _excluded$3);
47
+ return /*#__PURE__*/React.createElement("button", _extends({
48
+ ref: refHandler,
49
+ "data-id": dataId,
50
+ disabled: disabled,
51
+ type: buttonActionType,
52
+ className: classNames('btn-icon', "btn-icon--".concat(size), className),
53
+ onClick: onClick,
54
+ form: formId
55
+ }, rest), isLoading ? /*#__PURE__*/React.createElement(Loader, {
56
+ size: size,
57
+ type: 'dark'
58
+ }) : /*#__PURE__*/React.createElement(iconProps.Component, {
59
+ size: size,
60
+ type: disabled ? 'disabled' : 'tertiary'
61
+ }));
62
+ };
63
+
64
+ var ModalContent = function ModalContent(_ref) {
65
+ var title = _ref.title,
66
+ subtitle = _ref.subtitle,
67
+ dataIdPrefix = _ref.dataIdPrefix,
68
+ closeIcon = _ref.closeIcon,
69
+ onClose = _ref.onClose,
70
+ children = _ref.children,
71
+ _ref$withFooter = _ref.withFooter,
72
+ withFooter = _ref$withFooter === void 0 ? true : _ref$withFooter,
73
+ confirmBtnTooltipText = _ref.confirmBtnTooltipText,
74
+ buttonProps = _ref.buttonProps,
75
+ onSubmit = _ref.onSubmit;
76
+ return /*#__PURE__*/React.createElement(React.Fragment, null, title ? /*#__PURE__*/React.createElement("div", {
77
+ className: "modal__header"
78
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Text, {
79
+ lineHeight: "large",
80
+ size: "large",
81
+ weight: 'bolder',
82
+ dataId: dataIdPrefix ? "".concat(dataIdPrefix, "-modal-title") : ''
83
+ }, title), subtitle ? /*#__PURE__*/React.createElement(Text, {
84
+ className: 'mt-12',
85
+ dataId: dataIdPrefix ? "".concat(dataIdPrefix, "-modal-title") : ''
86
+ }, subtitle) : null), closeIcon ? /*#__PURE__*/React.createElement(ButtonIcon, {
87
+ className: 'modal__close ml-16',
88
+ dataId: dataIdPrefix ? "".concat(dataIdPrefix, "-modal-close-button") : '',
89
+ iconProps: {
90
+ Component: IconDismiss
91
+ },
92
+ onClick: onClose
93
+ }) : null) : null, /*#__PURE__*/React.createElement("div", {
94
+ className: "modal__content scrollbar scrollbar--vertical"
95
+ }, children), withFooter && buttonProps ? /*#__PURE__*/React.createElement("div", {
96
+ className: "modal__footer"
97
+ }, /*#__PURE__*/React.createElement(Button, _extends({
98
+ type: "tertiary",
99
+ className: "modal__footer__btn mr-16",
100
+ onClick: onClose,
101
+ dataId: dataIdPrefix ? "".concat(dataIdPrefix, "-modal-cancel-button") : ''
102
+ }, buttonProps.cancel || {})), confirmBtnTooltipText ? /*#__PURE__*/React.createElement(Tooltip, {
103
+ text: confirmBtnTooltipText,
104
+ id: 'confirm-btn-tooltip',
105
+ position: Positions.TOP_CENTER
106
+ }) : null, /*#__PURE__*/React.createElement(Button, _extends({
107
+ id: 'confirm-btn-tooltip',
108
+ className: 'modal__footer__btn',
109
+ type: "primary",
110
+ onClick: onSubmit ? onSubmit : noop,
111
+ dataId: dataIdPrefix ? "".concat(dataIdPrefix, "-modal-confirm-button") : ''
112
+ }, buttonProps.confirm))) : null);
113
+ };
114
+
115
+ var _excluded$2 = ["isOpen", "onClose", "className", "size", "closeOnOutsideClick"];
116
+ var DESKTOP_ANIMATION = {
117
+ initial: {
118
+ opacity: 0.5,
119
+ scale: 0.65
120
+ },
121
+ animate: {
122
+ opacity: 1,
123
+ scale: [0.95, 1]
124
+ },
125
+ exit: {
126
+ opacity: 0,
127
+ scale: 0.7,
128
+ transition: {
129
+ duration: 0.2
130
+ }
131
+ },
132
+ transition: {
133
+ duration: 0.4,
134
+ type: 'spring',
135
+ damping: 55,
136
+ stiffness: 700
137
+ }
138
+ };
139
+ var MOBILE_ANIMATION = {
140
+ initial: {
141
+ height: 0,
142
+ bottom: 0
143
+ },
144
+ animate: {
145
+ height: 'auto',
146
+ bottom: 10
147
+ },
148
+ exit: {
149
+ height: 0,
150
+ bottom: 0
151
+ },
152
+ transition: {
153
+ duration: 0.6
154
+ }
155
+ };
156
+ var Modal = function Modal(props) {
157
+ var isOpen = props.isOpen,
158
+ onClose = props.onClose,
159
+ _props$className = props.className,
160
+ className = _props$className === void 0 ? '' : _props$className,
161
+ _props$size = props.size,
162
+ size = _props$size === void 0 ? 'medium' : _props$size,
163
+ _props$closeOnOutside = props.closeOnOutsideClick,
164
+ closeOnOutsideClick = _props$closeOnOutside === void 0 ? true : _props$closeOnOutside,
165
+ rest = _objectWithoutProperties(props, _excluded$2);
166
+ var isMobile = useIsMobile();
167
+ var _useState = useState(null),
168
+ _useState2 = _slicedToArray(_useState, 2),
169
+ containerRef = _useState2[0],
170
+ setContainerRef = _useState2[1];
171
+ useOnOutsideClick(containerRef, onClose, closeOnOutsideClick && isOpen, useId());
172
+ useHideBodyScroll(isOpen);
173
+ return /*#__PURE__*/React.createElement(AnimatePresenceWrapper, null, isOpen ? /*#__PURE__*/React.createElement(motion.div, {
174
+ className: classNames('modal', "modal--".concat(size), className),
175
+ initial: {
176
+ opacity: 0
177
+ },
178
+ animate: {
179
+ opacity: 1
180
+ },
181
+ exit: {
182
+ opacity: 0
183
+ },
184
+ transition: {
185
+ duration: 0.4
186
+ }
187
+ }, /*#__PURE__*/React.createElement(motion.div, _extends({
188
+ className: classNames('modal__container', {
189
+ modal__container_mobile: isMobile
190
+ }),
191
+ ref: setContainerRef
192
+ }, isMobile ? MOBILE_ANIMATION : DESKTOP_ANIMATION), /*#__PURE__*/React.createElement(ModalContent, _extends({}, rest, {
193
+ onClose: onClose
194
+ })))) : null);
195
+ };
196
+
197
+ var PopoverMobile = function PopoverMobile(props) {
198
+ var dataId = props.dataId,
199
+ text = props.text,
200
+ linkAddons = props.linkAddons,
201
+ mobileTitle = props.mobileTitle,
202
+ hideMessage = props.hideMessage,
203
+ _props$clicked = props.clicked,
204
+ clicked = _props$clicked === void 0 ? false : _props$clicked,
205
+ children = props.children;
206
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Modal, {
207
+ closeIcon: true,
208
+ title: mobileTitle,
209
+ onClose: hideMessage,
210
+ isOpen: clicked
211
+ }, clicked && /*#__PURE__*/React.createElement(React.Fragment, null, linkAddons ? /*#__PURE__*/React.createElement(Link, {
212
+ dataId: linkAddons.dataId,
213
+ url: linkAddons.url,
214
+ beforeLink: linkAddons.beforeLink,
215
+ afterLink: linkAddons.afterLink,
216
+ target: linkAddons.target,
217
+ className: 'popover__link'
218
+ }, text) : /*#__PURE__*/React.createElement(Text, {
219
+ dataId: "".concat(dataId, "-text"),
220
+ type: "primary",
221
+ weight: "regular",
222
+ lineHeight: "medium",
223
+ size: "small"
224
+ }, text))), children);
225
+ };
226
+
227
+ var _excluded$1 = ["elemRef", "id", "clicked"];
228
+ var Popover = function Popover(props) {
229
+ var elemRef = props.elemRef,
230
+ id = props.id,
231
+ clicked = props.clicked,
232
+ rest = _objectWithoutProperties(props, _excluded$1);
233
+ var isMobile = useIsMobile();
234
+ var _useState = useState(clicked),
235
+ _useState2 = _slicedToArray(_useState, 2),
236
+ isClicked = _useState2[0],
237
+ setIsClicked = _useState2[1];
238
+ var _useState3 = useState(elemRef || null),
239
+ _useState4 = _slicedToArray(_useState3, 2),
240
+ parent = _useState4[0],
241
+ setElement = _useState4[1];
242
+ var showMessage = function showMessage() {
243
+ return setIsClicked(true);
244
+ };
245
+ var hideMessage = function hideMessage() {
246
+ return setIsClicked(false);
247
+ };
248
+ useEffect(function () {
249
+ if (parent) {
250
+ parent.addEventListener('click', showMessage);
251
+ }
252
+ }, [parent]);
253
+ useEffect(function () {
254
+ if (id) {
255
+ var element = document.getElementById(id.toString());
256
+ setElement(element);
257
+ }
258
+ }, [id]);
259
+ useEffect(function () {
260
+ if (clicked !== isClicked) {
261
+ setIsClicked(clicked);
262
+ }
263
+ }, [clicked, isClicked]);
264
+ return isMobile ? /*#__PURE__*/React.createElement(PopoverMobile, _extends({}, rest, {
265
+ clicked: isClicked,
266
+ hideMessage: hideMessage
267
+ })) : /*#__PURE__*/React.createElement(PopoverDesktop, _extends({}, rest, {
268
+ parent: parent,
269
+ clicked: isClicked,
270
+ showMessage: showMessage,
271
+ hideMessage: hideMessage
272
+ }));
273
+ };
274
+
275
+ var Checkbox = /*#__PURE__*/forwardRef(function (props, ref) {
276
+ var label = props.label,
277
+ disabled = props.disabled,
278
+ _props$required = props.required,
279
+ required = _props$required === void 0 ? false : _props$required,
280
+ link = props.link,
281
+ name = props.name,
282
+ setFieldValue = props.setFieldValue,
283
+ selectedValue = props.selectedValue,
284
+ value = props.value,
285
+ _props$className = props.className,
286
+ className = _props$className === void 0 ? '' : _props$className,
287
+ _props$iconProps = props.iconProps,
288
+ iconProps = _props$iconProps === void 0 ? {
289
+ name: 'checkmark'
290
+ } : _props$iconProps,
291
+ _props$dataId = props.dataId,
292
+ dataId = _props$dataId === void 0 ? '' : _props$dataId,
293
+ onClick = props.onClick,
294
+ beforeLink = props.beforeLink,
295
+ afterLink = props.afterLink,
296
+ _props$helperText = props.helperText,
297
+ helperText = _props$helperText === void 0 ? '' : _props$helperText,
298
+ popoverAddons = props.popoverAddons,
299
+ isInvalid = props.isInvalid;
300
+ var localRef = useRef(null);
301
+ var inputRef = ref && Object.keys(ref).length ? ref : localRef;
302
+ var isChecked = !!value || selectedValue;
303
+ var changeHandler = function changeHandler() {
304
+ if (name && setFieldValue) {
305
+ setFieldValue(name, !isChecked, {
306
+ shouldValidate: !isChecked
307
+ });
308
+ }
309
+ if (onClick) {
310
+ onClick(!isChecked);
311
+ }
312
+ };
313
+ var checkboxLabelPopover = popoverAddons ? /*#__PURE__*/React.createElement(Popover, _extends({
314
+ id: "".concat(popoverAddons.id)
315
+ }, popoverAddons), /*#__PURE__*/React.createElement("div", {
316
+ id: "".concat(popoverAddons.id)
317
+ }, /*#__PURE__*/React.createElement(IconInfo, {
318
+ dataId: "".concat(dataId, "-icon"),
319
+ type: "information",
320
+ size: "xsmall",
321
+ className: 'ml-4 pointer',
322
+ onClick: function onClick(e) {
323
+ e.stopPropagation();
324
+ changeHandler();
325
+ }
326
+ }))) : null;
327
+ var checkboxLabel = useMemo(function () {
328
+ if (!label) {
329
+ return null;
330
+ }
331
+ if (typeof label !== 'string') {
332
+ return label;
333
+ }
334
+ if (!link) {
335
+ return /*#__PURE__*/React.createElement(Text, {
336
+ type: disabled ? 'disabled' : 'primary',
337
+ className: "controller__label"
338
+ }, /*#__PURE__*/React.createElement(React.Fragment, null, label, required && /*#__PURE__*/React.createElement("sup", null, "*")));
339
+ }
340
+ return /*#__PURE__*/React.createElement(Text, {
341
+ type: disabled ? 'disabled' : 'primary',
342
+ className: "controller__label"
343
+ }, /*#__PURE__*/React.createElement(React.Fragment, null, beforeLink && /*#__PURE__*/React.createElement("span", {
344
+ className: "mr-4"
345
+ }, beforeLink), /*#__PURE__*/React.createElement(Link, {
346
+ dataId: dataId,
347
+ url: link,
348
+ target: "_blank"
349
+ }, label), afterLink && /*#__PURE__*/React.createElement("span", {
350
+ className: "ml-4"
351
+ }, afterLink), required && /*#__PURE__*/React.createElement("sup", null, "*")));
352
+ }, [label, link]);
353
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("label", {
354
+ className: classNames('controller', _defineProperty({
355
+ 'controller--checkbox': true,
356
+ 'controller--disabled': disabled,
357
+ 'controller--error': isInvalid
358
+ }, className, !!className))
359
+ }, /*#__PURE__*/React.createElement("input", {
360
+ "data-id": dataId,
361
+ type: "checkbox",
362
+ ref: inputRef,
363
+ tabIndex: 0,
364
+ onChange: changeHandler,
365
+ checked: Boolean(isChecked),
366
+ disabled: disabled
367
+ }), /*#__PURE__*/React.createElement("span", {
368
+ className: "controller__icon"
369
+ }, /*#__PURE__*/React.createElement(IconDynamicComponent, {
370
+ componentName: iconProps.name,
371
+ size: "xxsmall",
372
+ type: disabled ? 'disabled' : 'inverse',
373
+ className: "controller__mark"
374
+ })), checkboxLabel ? /*#__PURE__*/React.createElement("div", {
375
+ className: "controller__right"
376
+ }, /*#__PURE__*/React.createElement("div", {
377
+ className: "flexbox"
378
+ }, checkboxLabel, checkboxLabelPopover), helperText ? /*#__PURE__*/React.createElement(Text, {
379
+ size: "small",
380
+ type: disabled ? 'disabled' : 'secondary'
381
+ }, helperText) : null) : null));
382
+ });
383
+ Checkbox.displayName = 'Checkbox';
384
+
385
+ var _excluded = ["buttonText", "type", "size", "className", "iconProps", "buttonActionType", "disabled", "isLoading", "formId", "dataId", "onClick", "refHandler", "children"];
386
+ var Button = function Button(props) {
387
+ var buttonText = props.buttonText,
388
+ _props$type = props.type,
389
+ type = _props$type === void 0 ? 'primary' : _props$type,
390
+ _props$size = props.size,
391
+ size = _props$size === void 0 ? 'large' : _props$size,
392
+ _props$className = props.className,
393
+ className = _props$className === void 0 ? '' : _props$className,
394
+ iconProps = props.iconProps,
395
+ _props$buttonActionTy = props.buttonActionType,
396
+ buttonActionType = _props$buttonActionTy === void 0 ? 'button' : _props$buttonActionTy,
397
+ disabled = props.disabled,
398
+ isLoading = props.isLoading,
399
+ formId = props.formId,
400
+ _props$dataId = props.dataId,
401
+ dataId = _props$dataId === void 0 ? '' : _props$dataId,
402
+ onClick = props.onClick,
403
+ _props$refHandler = props.refHandler,
404
+ refHandler = _props$refHandler === void 0 ? null : _props$refHandler,
405
+ children = props.children,
406
+ rest = _objectWithoutProperties(props, _excluded);
407
+ var justIcon = !buttonText && !children && iconProps !== undefined;
408
+ var clickHandler = function clickHandler(e) {
409
+ if (disabled || isLoading) {
410
+ return;
411
+ }
412
+ onClick === null || onClick === void 0 || onClick(e);
413
+ };
414
+ return /*#__PURE__*/React.createElement("button", _extends({
415
+ ref: refHandler,
416
+ "data-id": dataId,
417
+ disabled: disabled,
418
+ type: buttonActionType,
419
+ className: classNames('btn', "btn--".concat(type), "btn--".concat(size), _defineProperty({
420
+ 'btn--icon': justIcon
421
+ }, "btn--icon-".concat((iconProps === null || iconProps === void 0 ? void 0 : iconProps.alignment) || 'left'), !isLoading && !justIcon && (iconProps === null || iconProps === void 0 ? void 0 : iconProps.Component)), className),
422
+ onClick: clickHandler,
423
+ form: formId
424
+ }, rest), isLoading ? /*#__PURE__*/React.createElement(Loader, {
425
+ size: size,
426
+ type: LITE_LOADER_TYPES.indexOf(type) === -1 ? 'dark' : 'lite'
427
+ }) : /*#__PURE__*/React.createElement(React.Fragment, null, iconProps !== null && iconProps !== void 0 && iconProps.Component ? /*#__PURE__*/React.createElement(iconProps.Component, {
428
+ size: ICON_SIZE_MAPPING[size],
429
+ type: ICON_TYPE_MAPPING[iconProps.type || type],
430
+ className: "btn__icon"
431
+ }) : null, buttonText || children ? /*#__PURE__*/React.createElement("span", {
432
+ className: "btn__text"
433
+ }, buttonText || children) : null));
434
+ };
435
+
436
+ export { Button as B, Checkbox as C, Modal as M, Popover as P, ButtonIcon as a, MOBILE_ANIMATION as b, ModalContent as c, PopoverMobile as d };
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import { ICONS_MAPPING, TYPE_MAPPING } from './consts.js';
4
4
  import classNames from 'classnames';
5
5
  import { Text } from '../Text/Text.js';
6
- import { B as Button } from '../../Button-67c716bc.js';
6
+ import { B as Button } from '../../Button-f483692b.js';
7
7
  import { IconDismissFilled } from '../SVGIcons/IconDismissFilled.js';
8
8
  import { IconDynamicComponent } from '../../helperComponents/IconDynamicComponent/IconDynamicComponent.js';
9
9
  import 'dayjs';
@@ -6,7 +6,7 @@ import 'classnames';
6
6
  import '../Text/Text.js';
7
7
  import '../../utils/helpers.js';
8
8
  import 'dayjs';
9
- import '../../Button-67c716bc.js';
9
+ import '../../Button-f483692b.js';
10
10
  import '../../defineProperty-cc02b516.js';
11
11
  import '../../typeof-a777dcdc.js';
12
12
  import '../../objectWithoutProperties-8b2251e9.js';
@@ -4,7 +4,7 @@ import classNames from 'classnames';
4
4
  import { FileUpload } from '../FileUpload/FileUpload.js';
5
5
  import { FileUploadMode } from '../FileUpload/types.js';
6
6
  import '../../toConsumableArray-074caac7.js';
7
- import '../../Button-67c716bc.js';
7
+ import '../../Button-f483692b.js';
8
8
  import '../../extends-d40233e7.js';
9
9
  import '../../defineProperty-cc02b516.js';
10
10
  import '../../typeof-a777dcdc.js';
@@ -19,7 +19,7 @@ import '../../hooks/useHideOnScroll.js';
19
19
  import '../FileUpload/FileUpload.js';
20
20
  import '../../toConsumableArray-074caac7.js';
21
21
  import '../FileUpload/types.js';
22
- import '../../Button-67c716bc.js';
22
+ import '../../Button-f483692b.js';
23
23
  import '../../extends-d40233e7.js';
24
24
  import '../../defineProperty-cc02b516.js';
25
25
  import '../../typeof-a777dcdc.js';
@@ -6,7 +6,7 @@ import 'classnames';
6
6
  import '../FileUpload/FileUpload.js';
7
7
  import '../../toConsumableArray-074caac7.js';
8
8
  import '../FileUpload/types.js';
9
- import '../../Button-67c716bc.js';
9
+ import '../../Button-f483692b.js';
10
10
  import '../../extends-d40233e7.js';
11
11
  import '../../defineProperty-cc02b516.js';
12
12
  import '../../typeof-a777dcdc.js';
@@ -5,7 +5,7 @@ import 'react';
5
5
  import 'classnames';
6
6
  import 'dayjs';
7
7
  import '../../helperComponents/Loader/Loader.js';
8
- export { B as Button } from '../../Button-67c716bc.js';
8
+ export { B as Button } from '../../Button-f483692b.js';
9
9
  import '../../consts/index.js';
10
10
  import '../../hooks/useScreenSize.js';
11
11
  import 'react-hook-form';
@@ -1,4 +1,4 @@
1
- export { B as Button } from '../../Button-67c716bc.js';
1
+ export { B as Button } from '../../Button-f483692b.js';
2
2
  import '../../extends-d40233e7.js';
3
3
  import '../../defineProperty-cc02b516.js';
4
4
  import '../../typeof-a777dcdc.js';
@@ -7,7 +7,7 @@ import '../../helperComponents/Loader/Loader.js';
7
7
  import '../../consts/index.js';
8
8
  import '../../hooks/useScreenSize.js';
9
9
  import 'react-hook-form';
10
- export { a as ButtonIcon } from '../../Button-67c716bc.js';
10
+ export { a as ButtonIcon } from '../../Button-f483692b.js';
11
11
  import 'react-syntax-highlighter';
12
12
  import '../../slicedToArray-0c287559.js';
13
13
  import '../../defineProperty-cc02b516.js';
@@ -1,4 +1,4 @@
1
- export { a as ButtonIcon } from '../../Button-67c716bc.js';
1
+ export { a as ButtonIcon } from '../../Button-f483692b.js';
2
2
  import '../../extends-d40233e7.js';
3
3
  import '../../defineProperty-cc02b516.js';
4
4
  import '../../typeof-a777dcdc.js';
@@ -2,7 +2,7 @@ import { _ as _extends } from '../../extends-d40233e7.js';
2
2
  import React from 'react';
3
3
  import { Text } from '../Text/Text.js';
4
4
  import { Image } from '../Image/Image.js';
5
- import { B as Button } from '../../Button-67c716bc.js';
5
+ import { B as Button } from '../../Button-f483692b.js';
6
6
  import classNames from 'classnames';
7
7
  import '../../utils/helpers.js';
8
8
  import 'dayjs';
@@ -6,7 +6,7 @@ import 'classnames';
6
6
  import '../../utils/helpers.js';
7
7
  import 'dayjs';
8
8
  import '../Image/Image.js';
9
- import '../../Button-67c716bc.js';
9
+ import '../../Button-f483692b.js';
10
10
  import '../../defineProperty-cc02b516.js';
11
11
  import '../../typeof-a777dcdc.js';
12
12
  import '../../objectWithoutProperties-8b2251e9.js';
@@ -29,7 +29,7 @@ import '../../helperComponents/IconDynamicComponent/constants.js';
29
29
  import '../../hooks/useScreenSize.js';
30
30
  import '../../slicedToArray-0c287559.js';
31
31
  import 'react-hook-form';
32
- import '../../Button-67c716bc.js';
32
+ import '../../Button-f483692b.js';
33
33
  import '../../helperComponents/Loader/Loader.js';
34
34
  import '../../hooks/useGetIsMobile.js';
35
35
  import 'framer-motion';
@@ -25,7 +25,7 @@ import '../../consts/index.js';
25
25
  import '../../hooks/useScreenSize.js';
26
26
  import '../../slicedToArray-0c287559.js';
27
27
  import 'react-hook-form';
28
- import '../../Button-67c716bc.js';
28
+ import '../../Button-f483692b.js';
29
29
  import '../../helperComponents/Loader/Loader.js';
30
30
  import '../../hooks/useGetIsMobile.js';
31
31
  import 'framer-motion';
@@ -18,7 +18,7 @@ import '../../../consts/index.js';
18
18
  import '../../../hooks/useScreenSize.js';
19
19
  import '../../../slicedToArray-0c287559.js';
20
20
  import 'react-hook-form';
21
- import '../../../Button-67c716bc.js';
21
+ import '../../../Button-f483692b.js';
22
22
  import '../../../helperComponents/Loader/Loader.js';
23
23
  import '../../../hooks/useGetIsMobile.js';
24
24
  import 'framer-motion';
@@ -26,7 +26,7 @@ import '../../../consts/index.js';
26
26
  import '../../../hooks/useScreenSize.js';
27
27
  import '../../../slicedToArray-0c287559.js';
28
28
  import 'react-hook-form';
29
- import '../../../Button-67c716bc.js';
29
+ import '../../../Button-f483692b.js';
30
30
  import '../../../helperComponents/Loader/Loader.js';
31
31
  import '../../../hooks/useGetIsMobile.js';
32
32
  import 'framer-motion';
@@ -26,7 +26,7 @@ import '../../consts/index.js';
26
26
  import '../../hooks/useScreenSize.js';
27
27
  import '../../slicedToArray-0c287559.js';
28
28
  import 'react-hook-form';
29
- import '../../Button-67c716bc.js';
29
+ import '../../Button-f483692b.js';
30
30
  import '../../helperComponents/Loader/Loader.js';
31
31
  import '../../hooks/useGetIsMobile.js';
32
32
  import 'framer-motion';
@@ -2,7 +2,7 @@ import '../../defineProperty-cc02b516.js';
2
2
  import '../../extends-d40233e7.js';
3
3
  import 'react';
4
4
  import 'classnames';
5
- export { C as Checkbox } from '../../Button-67c716bc.js';
5
+ export { C as Checkbox } from '../../Button-f483692b.js';
6
6
  import '../Link/Link.js';
7
7
  import '../Text/Text.js';
8
8
  import '../SVGIcons/IconInfo.js';
@@ -1,4 +1,4 @@
1
- export { C as Checkbox } from '../../Button-67c716bc.js';
1
+ export { C as Checkbox } from '../../Button-f483692b.js';
2
2
  import '../../extends-d40233e7.js';
3
3
  import '../../defineProperty-cc02b516.js';
4
4
  import '../../typeof-a777dcdc.js';
@@ -1,6 +1,6 @@
1
1
  import { _ as _slicedToArray } from '../../slicedToArray-0c287559.js';
2
2
  import React, { useState, useRef } from 'react';
3
- import { B as Button, P as Popover } from '../../Button-67c716bc.js';
3
+ import { B as Button, P as Popover } from '../../Button-f483692b.js';
4
4
  import { IconCopy } from '../SVGIcons/IconCopy.js';
5
5
  import '../../extends-d40233e7.js';
6
6
  import '../../defineProperty-cc02b516.js';
@@ -1,7 +1,7 @@
1
1
  export { Copy } from './Copy.js';
2
2
  import '../../slicedToArray-0c287559.js';
3
3
  import 'react';
4
- import '../../Button-67c716bc.js';
4
+ import '../../Button-f483692b.js';
5
5
  import '../../extends-d40233e7.js';
6
6
  import '../../defineProperty-cc02b516.js';
7
7
  import '../../typeof-a777dcdc.js';
@@ -20,7 +20,7 @@ import '../../consts/index.js';
20
20
  import '../../hooks/useScreenSize.js';
21
21
  import '../../slicedToArray-0c287559.js';
22
22
  import 'react-hook-form';
23
- import '../../Button-67c716bc.js';
23
+ import '../../Button-f483692b.js';
24
24
  import '../../helperComponents/Loader/Loader.js';
25
25
  import '../../hooks/useGetIsMobile.js';
26
26
  import 'framer-motion';
@@ -19,7 +19,7 @@ import '../../consts/index.js';
19
19
  import '../../hooks/useScreenSize.js';
20
20
  import '../../slicedToArray-0c287559.js';
21
21
  import 'react-hook-form';
22
- import '../../Button-67c716bc.js';
22
+ import '../../Button-f483692b.js';
23
23
  import '../../helperComponents/Loader/Loader.js';
24
24
  import '../../hooks/useGetIsMobile.js';
25
25
  import 'framer-motion';
@@ -5,7 +5,7 @@ import '../../../consts/index.js';
5
5
  import { noop, getYearOptions } from '../../../utils/helpers.js';
6
6
  import '../../../hooks/useScreenSize.js';
7
7
  import 'react-hook-form';
8
- import '../../../Button-67c716bc.js';
8
+ import '../../../Button-f483692b.js';
9
9
  import 'react-syntax-highlighter';
10
10
  import '../../Input/Input.js';
11
11
  import 'react-dom';