@geneui/components 2.11.1

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 (154) hide show
  1. package/ActionableList.js +1761 -0
  2. package/AdvancedSearch.js +872 -0
  3. package/Alert.js +98 -0
  4. package/Avatar.js +77 -0
  5. package/Badge.js +76 -0
  6. package/Breadcrumb.js +128 -0
  7. package/BusyLoader.js +69 -0
  8. package/Button.js +130 -0
  9. package/CHANGELOG.md +424 -0
  10. package/Card.js +513 -0
  11. package/CardList.js +705 -0
  12. package/CellMeasurerCache-c11cec83.js +229 -0
  13. package/Charts.js +99 -0
  14. package/Checkbox.js +232 -0
  15. package/CheckboxGroup.js +206 -0
  16. package/CheckboxGroupWithSearch.js +279 -0
  17. package/Collapse.js +196 -0
  18. package/ColorPicker.js +210 -0
  19. package/ComboBox.js +99 -0
  20. package/Counter.js +99 -0
  21. package/DateFilter.js +179 -0
  22. package/DatePicker.js +1231 -0
  23. package/DatePickerInput.js +30 -0
  24. package/Divider.js +56 -0
  25. package/Drawer.js +264 -0
  26. package/Dropdown.js +99 -0
  27. package/Editor.js +22965 -0
  28. package/Empty.js +132 -0
  29. package/ExtendedInput.js +578 -0
  30. package/Form.js +116 -0
  31. package/FormContainer.js +189 -0
  32. package/FormableCheckbox.js +27 -0
  33. package/FormableDatePicker.js +39 -0
  34. package/FormableDropdown.js +105 -0
  35. package/FormableEditor.js +24 -0
  36. package/FormableHOC-21051057.js +83 -0
  37. package/FormableMultiSelectDropdown.js +105 -0
  38. package/FormableNumberInput.js +31 -0
  39. package/FormableRadio.js +23 -0
  40. package/FormableSwitcher.js +23 -0
  41. package/FormableTextInput.js +31 -0
  42. package/FormableUploader.js +40 -0
  43. package/GeneUIProvider.js +256 -0
  44. package/Grid.js +166 -0
  45. package/Holder.js +99 -0
  46. package/Icon.js +63 -0
  47. package/Image.js +130 -0
  48. package/ImagePreview.js +99 -0
  49. package/KeyValue.js +63 -0
  50. package/Label.js +58 -0
  51. package/LinkButton.js +104 -0
  52. package/Menu.js +277 -0
  53. package/MobileNavigation.js +95 -0
  54. package/MobilePopup.js +180 -0
  55. package/Modal.js +251 -0
  56. package/ModuleTitle.js +99 -0
  57. package/NavigationMenu.js +212 -0
  58. package/Notification.js +120 -0
  59. package/Option.js +186 -0
  60. package/Overlay.js +99 -0
  61. package/Overspread.js +343 -0
  62. package/Pagination.js +258 -0
  63. package/Paper.js +97 -0
  64. package/Popover-f4d1cac0.js +411 -0
  65. package/Popover.js +20 -0
  66. package/PopoverV2.js +19 -0
  67. package/Portal.js +58 -0
  68. package/Products.js +115 -0
  69. package/Profile.js +99 -0
  70. package/Progress.js +200 -0
  71. package/QRCode.js +816 -0
  72. package/README.md +90 -0
  73. package/Radio.js +152 -0
  74. package/RadioGroup.js +105 -0
  75. package/Range.js +14 -0
  76. package/RichEditor-b7928765.js +228 -0
  77. package/RichEditor.js +13 -0
  78. package/Scrollbar.js +1587 -0
  79. package/Search.js +72 -0
  80. package/SearchWithDropdown.js +195 -0
  81. package/Section.js +62 -0
  82. package/SkeletonLoader.js +82 -0
  83. package/Slider.js +256 -0
  84. package/Status.js +104 -0
  85. package/Steps.js +312 -0
  86. package/SuggestionList.js +15 -0
  87. package/Switcher.js +194 -0
  88. package/Table.js +102 -0
  89. package/TableCompositions.js +17028 -0
  90. package/Tabs.js +236 -0
  91. package/Tag.js +103 -0
  92. package/TextLink.js +22 -0
  93. package/Textarea.js +239 -0
  94. package/Time.js +63 -0
  95. package/TimePicker.js +99 -0
  96. package/Timeline.js +114 -0
  97. package/Title.js +66 -0
  98. package/Toaster.js +116 -0
  99. package/Tooltip.js +157 -0
  100. package/TransferList.js +502 -0
  101. package/Uploader.js +32 -0
  102. package/ValidatableCheckbox.js +126 -0
  103. package/ValidatableDatePicker.js +312 -0
  104. package/ValidatableDropdown.js +99 -0
  105. package/ValidatableElements.js +99 -0
  106. package/ValidatableMultiSelectDropdown.js +99 -0
  107. package/ValidatableNumberInput.js +194 -0
  108. package/ValidatableRadio.js +117 -0
  109. package/ValidatableSwitcher.js +94 -0
  110. package/ValidatableTextInput.js +164 -0
  111. package/ValidatableTimeInput.js +171 -0
  112. package/ValidatableUploader.js +94 -0
  113. package/Widget.js +99 -0
  114. package/_commonjsHelpers-24198af3.js +35 -0
  115. package/_rollupPluginBabelHelpers-e8fb2e5c.js +16 -0
  116. package/checkTimeValidation-e56771be.js +16 -0
  117. package/checkboxRadioSwitcher-5b69d7bd.js +4 -0
  118. package/clsx.m-2bb6df4b.js +3 -0
  119. package/configs-91c86664.js +96 -0
  120. package/configs.js +131 -0
  121. package/dateValidation-67caec66.js +225 -0
  122. package/debounce-4419bc2f.js +17 -0
  123. package/globalStyling-9c60a159.js +4 -0
  124. package/guid-8ddf77b3.js +16 -0
  125. package/index-00fe8887.js +193 -0
  126. package/index-0cf65939.js +30991 -0
  127. package/index-122432cd.js +270 -0
  128. package/index-262edd7a.js +77 -0
  129. package/index-5cea9a7d.js +407 -0
  130. package/index-5e722d91.js +867 -0
  131. package/index-67f4d4d1.js +6568 -0
  132. package/index-6ff23041.js +66 -0
  133. package/index-702bf24a.js +1938 -0
  134. package/index-a4635754.js +329 -0
  135. package/index-a59530cd.js +4 -0
  136. package/index-ac59cb10.js +169 -0
  137. package/index-b7a33c58.js +11 -0
  138. package/index-d9e8a888.js +987 -0
  139. package/index-e0af0caf.js +1182 -0
  140. package/index-e8776f3d.js +807 -0
  141. package/index.js +128 -0
  142. package/localization-4ba17032.js +46 -0
  143. package/objectWithoutPropertiesLoose-299691d8.js +78 -0
  144. package/package.json +190 -0
  145. package/rangeAndSlider-20599da4.js +8839 -0
  146. package/react-beautiful-dnd.esm-38c37304.js +10117 -0
  147. package/style-inject.es-746bb8ed.js +28 -0
  148. package/useClickOutside-5183e396.js +25 -0
  149. package/useDeviceType-dd51db38.js +15 -0
  150. package/useEllipsisDetection-ef536015.js +23 -0
  151. package/useKeyDown-38102ae7.js +21 -0
  152. package/useMount-6fef51a5.js +9 -0
  153. package/useWidth-9f4647f8.js +15 -0
  154. package/useWindowSize-80369d76.js +33 -0
package/Option.js ADDED
@@ -0,0 +1,186 @@
1
+ import { _ as _extends } from './_rollupPluginBabelHelpers-e8fb2e5c.js';
2
+ import React__default, { useRef } from 'react';
3
+ import { p as propTypesExports } from './index-e0af0caf.js';
4
+ import { c as classnames } from './index-6ff23041.js';
5
+ import { o as optionConfig, s as screenTypes } from './configs-91c86664.js';
6
+ import './dateValidation-67caec66.js';
7
+ import 'react-dom';
8
+ import { u as useDeviceType } from './useDeviceType-dd51db38.js';
9
+ import { u as useEllipsisDetection } from './useEllipsisDetection-ef536015.js';
10
+ import Tooltip from './Tooltip.js';
11
+ import Icon from './Icon.js';
12
+ import './globalStyling-9c60a159.js';
13
+ import { s as styleInject } from './style-inject.es-746bb8ed.js';
14
+ import './_commonjsHelpers-24198af3.js';
15
+ import './useWindowSize-80369d76.js';
16
+ import './Popover-f4d1cac0.js';
17
+ import './index-ac59cb10.js';
18
+ import './GeneUIProvider.js';
19
+
20
+ var css_248z = "[data-gene-ui-version=\"2.11.0\"] .option-container{align-items:center;cursor:pointer;display:flex;min-height:4rem;overflow:hidden;padding:0 1.4rem;position:relative;transition:background .4s;-webkit-user-select:none;user-select:none;width:100%;z-index:0}[data-gene-ui-version=\"2.11.0\"] .option-container>*{transition:color .4s}[data-gene-ui-version=\"2.11.0\"] .option-container.mobile-view{min-height:4.8rem;padding:0 2rem}[data-gene-ui-version=\"2.11.0\"] .option-container.border-top{border-top:1px solid}[data-gene-ui-version=\"2.11.0\"] .option-container.border-bottom{border-bottom:1px solid}[data-gene-ui-version=\"2.11.0\"] .option-container.border-bottom,[data-gene-ui-version=\"2.11.0\"] .option-container.border-top{border-color:rgba(var(--background-sc-rgb),.1)}[data-gene-ui-version=\"2.11.0\"] .option-container.sticky-bottom,[data-gene-ui-version=\"2.11.0\"] .option-container.sticky-top{position:-webkit-sticky;position:sticky;z-index:1}[data-gene-ui-version=\"2.11.0\"] .option-container.sticky-top{top:0}[data-gene-ui-version=\"2.11.0\"] .option-container.sticky-bottom{bottom:0}@media (hover:hover){[data-gene-ui-version=\"2.11.0\"] .option-container.hovered:hover,[data-gene-ui-version=\"2.11.0\"] .option-container:hover:hover{background:rgba(var(--background-sc-rgb),.05)}}[data-gene-ui-version=\"2.11.0\"] .option-container.hovered{background:rgba(var(--background-sc-rgb),.05)}[data-gene-ui-version=\"2.11.0\"] .option-container.active,[data-gene-ui-version=\"2.11.0\"] .option-container.c-hero{color:var(--hero)}[data-gene-ui-version=\"2.11.0\"] .option-container.disabled{opacity:.5;pointer-events:none}[data-gene-ui-version=\"2.11.0\"] .option-container a{display:block;height:100%;left:0;line-height:4rem;overflow:hidden;padding:0 1.4rem;position:absolute;text-overflow:ellipsis;top:0;white-space:nowrap;width:100%;z-index:1}[data-gene-ui-version=\"2.11.0\"] .option-container a.active~*{color:var(--hero)}[data-gene-ui-version=\"2.11.0\"] .option-container-relative{position:relative}[data-gene-ui-version=\"2.11.0\"] .option-left-elements{align-items:center;display:flex;flex-shrink:0;justify-content:center;margin-inline-end:1.2rem;min-height:2.4rem;min-width:2.4rem}[data-gene-ui-version=\"2.11.0\"] .option-right-elements{flex-shrink:0;margin-inline-start:1.2rem}[data-gene-ui-version=\"2.11.0\"] .option-right-elements .bc-icon-selected{transition:transform .4s}[data-gene-ui-version=\"2.11.0\"] .option-container:not(.mobile-view) .option-right-elements .bc-icon-selected{margin-inline-end:-.4rem}[data-gene-ui-version=\"2.11.0\"] .option-container:not(.active) .option-right-elements .bc-icon-selected{transform:scale(0)}[data-gene-ui-version=\"2.11.0\"] .mobile-view .bc-icon-selected{margin-inline-end:.8rem!important}[data-gene-ui-version=\"2.11.0\"] .option-texts{align-items:center;display:flex;flex:auto;font:600 1.4rem/2rem var(--font-family);overflow:hidden}[data-gene-ui-version=\"2.11.0\"] .option-texts>li{flex-shrink:0}[data-gene-ui-version=\"2.11.0\"] .option-texts>li:first-child{flex:auto;overflow:hidden}[data-gene-ui-version=\"2.11.0\"] .option-texts>li.assigned-value{margin-inline-start:1rem;opacity:.7}[data-gene-ui-version=\"2.11.0\"] .option-description{font:600 1.2rem/1.6rem var(--font-family);opacity:.7}[data-gene-ui-version=\"2.11.0\"] .option-title-center{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}[data-gene-ui-version=\"2.11.0\"] .option-title-end{text-align:end}";
21
+ styleInject(css_248z);
22
+
23
+ function Option(props) {
24
+ const {
25
+ title,
26
+ description,
27
+ className,
28
+ icon,
29
+ color,
30
+ active,
31
+ checkMark,
32
+ forwardMark,
33
+ leftCustomElement,
34
+ rightCustomElement,
35
+ assignedValue,
36
+ border,
37
+ sticky,
38
+ content,
39
+ onClick,
40
+ screenType,
41
+ forwardedRef,
42
+ disabled,
43
+ titlePosition,
44
+ ...restProps
45
+ } = props;
46
+ const titleRef = useRef(null);
47
+ const hasTooltip = useEllipsisDetection(titleRef);
48
+ const descriptionRef = useRef(null);
49
+ const hasDescriptionTooltip = useEllipsisDetection(descriptionRef);
50
+ const {
51
+ isMobile
52
+ } = useDeviceType(screenType);
53
+ return /*#__PURE__*/React__default.createElement("label", _extends({
54
+ className: classnames('option-container', className, "border-".concat(border), "sticky-".concat(sticky), "c-".concat(color), {
55
+ 'mobile-view': isMobile,
56
+ 'option-container-relative': titlePosition === optionConfig.titlePosition.center,
57
+ active,
58
+ disabled
59
+ }),
60
+ onClick: onClick,
61
+ ref: forwardedRef
62
+ }, restProps), content, (icon || leftCustomElement) && /*#__PURE__*/React__default.createElement("div", {
63
+ className: "option-left-elements"
64
+ }, icon && /*#__PURE__*/React__default.createElement(Icon, {
65
+ type: icon
66
+ }), leftCustomElement), /*#__PURE__*/React__default.createElement("ul", {
67
+ className: "option-texts"
68
+ }, /*#__PURE__*/React__default.createElement("li", null, title && /*#__PURE__*/React__default.createElement(Tooltip, {
69
+ text: title,
70
+ isVisible: hasTooltip
71
+ }, /*#__PURE__*/React__default.createElement("div", {
72
+ className: classnames('option-title', 'ellipsis-text', {
73
+ 'option-title-center': titlePosition === optionConfig.titlePosition.center,
74
+ 'option-title-end': titlePosition === optionConfig.titlePosition.end
75
+ }),
76
+ ref: titleRef
77
+ }, title)), description && /*#__PURE__*/React__default.createElement(Tooltip, {
78
+ text: description,
79
+ isVisible: hasDescriptionTooltip
80
+ }, /*#__PURE__*/React__default.createElement("div", {
81
+ ref: descriptionRef,
82
+ className: "option-description ellipsis-text"
83
+ }, description))), assignedValue && /*#__PURE__*/React__default.createElement("li", {
84
+ className: "assigned-value"
85
+ }, assignedValue)), (checkMark || forwardMark || rightCustomElement) && /*#__PURE__*/React__default.createElement("div", {
86
+ className: "option-right-elements"
87
+ }, checkMark && /*#__PURE__*/React__default.createElement(Icon, {
88
+ type: "bc-icon-selected"
89
+ }), forwardMark && /*#__PURE__*/React__default.createElement(Icon, {
90
+ type: "bc-icon-arrow-right"
91
+ }), rightCustomElement));
92
+ }
93
+ Option.defaultProps = {
94
+ color: optionConfig.color[0],
95
+ border: optionConfig.border[0],
96
+ sticky: optionConfig.sticky[0],
97
+ titlePosition: optionConfig.titlePosition.start,
98
+ screenType: screenTypes[0]
99
+ };
100
+ Option.propTypes = {
101
+ /**
102
+ * Title of the option
103
+ */
104
+ title: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.node]),
105
+ /**
106
+ * Description of the option which is displayed on the bottom of the title with small caps
107
+ */
108
+ description: propTypesExports.string,
109
+ /**
110
+ * Adds additional className to the option
111
+ */
112
+ className: propTypesExports.string,
113
+ /**
114
+ * Adds icon on the right side of the option
115
+ */
116
+ icon: propTypesExports.string,
117
+ /**
118
+ * Changes text colors
119
+ */
120
+ color: propTypesExports.oneOf(optionConfig.color),
121
+ /**
122
+ * Changes color to hero
123
+ */
124
+ active: propTypesExports.bool,
125
+ /**
126
+ * Adds check icon and displays it when the option is active
127
+ */
128
+ checkMark: propTypesExports.bool,
129
+ /**
130
+ * Adds to right arrow icon
131
+ */
132
+ forwardMark: propTypesExports.bool,
133
+ /**
134
+ * Any element you can add to the left side
135
+ */
136
+ leftCustomElement: propTypesExports.any,
137
+ /**
138
+ * Any element you can add to the right side
139
+ */
140
+ rightCustomElement: propTypesExports.any,
141
+ /**
142
+ * Information you can display on the right side of the option
143
+ */
144
+ assignedValue: propTypesExports.string,
145
+ /**
146
+ * Adds border to the option
147
+ */
148
+ border: propTypesExports.oneOf(optionConfig.border),
149
+ /**
150
+ * Makes item sticky to scrolling element based on the position you choose
151
+ */
152
+ sticky: propTypesExports.oneOf(optionConfig.sticky),
153
+ /**
154
+ * Additional elements for rendering in option
155
+ */
156
+ content: propTypesExports.any,
157
+ /**
158
+ * Fires event when user click on one of the menu items;
159
+ * (event: Event, item: Object) => void
160
+ */
161
+ onClick: propTypesExports.func,
162
+ /**
163
+ * Controls screen type
164
+ */
165
+ screenType: propTypesExports.oneOf(screenTypes),
166
+ /**
167
+ * Controls button disable state
168
+ */
169
+ disabled: propTypesExports.bool,
170
+ /**
171
+ * ref for label
172
+ */
173
+ forwardedRef: propTypesExports.oneOfType([propTypesExports.func,
174
+ // for callback ref
175
+ propTypesExports.shape({
176
+ current: propTypesExports.instanceOf(Element)
177
+ }) // for createRef() object
178
+ ]),
179
+
180
+ /**
181
+ * Chose position for title
182
+ */
183
+ titlePosition: propTypesExports.oneOf(['start', 'center', 'end'])
184
+ };
185
+
186
+ export { Option as default };
package/Overlay.js ADDED
@@ -0,0 +1,99 @@
1
+ import './_rollupPluginBabelHelpers-e8fb2e5c.js';
2
+ import 'react';
3
+ import './index-e0af0caf.js';
4
+ import './index-6ff23041.js';
5
+ import './configs-91c86664.js';
6
+ import './index-ac59cb10.js';
7
+ import './useKeyDown-38102ae7.js';
8
+ import './useClickOutside-5183e396.js';
9
+ import './Scrollbar.js';
10
+ import './Button.js';
11
+ import './Divider.js';
12
+ export { O as default } from './index-0cf65939.js';
13
+ import './globalStyling-9c60a159.js';
14
+ import './dateValidation-67caec66.js';
15
+ import './_commonjsHelpers-24198af3.js';
16
+ import 'react-dom';
17
+ import './style-inject.es-746bb8ed.js';
18
+ import './Icon.js';
19
+ import './Editor.js';
20
+ import './useMount-6fef51a5.js';
21
+ import './useDeviceType-dd51db38.js';
22
+ import './useWindowSize-80369d76.js';
23
+ import './ValidatableUploader.js';
24
+ import './index-d9e8a888.js';
25
+ import './Grid.js';
26
+ import './useWidth-9f4647f8.js';
27
+ import './BusyLoader.js';
28
+ import './Image.js';
29
+ import './Empty.js';
30
+ import './Tooltip.js';
31
+ import './Popover-f4d1cac0.js';
32
+ import './GeneUIProvider.js';
33
+ import './Checkbox.js';
34
+ import './checkboxRadioSwitcher-5b69d7bd.js';
35
+ import './guid-8ddf77b3.js';
36
+ import './ExtendedInput.js';
37
+ import './index-5cea9a7d.js';
38
+ import './ValidatableRadio.js';
39
+ import './RadioGroup.js';
40
+ import './Radio.js';
41
+ import './ValidatableCheckbox.js';
42
+ import './ValidatableSwitcher.js';
43
+ import './Switcher.js';
44
+ import './ValidatableNumberInput.js';
45
+ import './ValidatableTextInput.js';
46
+ import './ValidatableDatePicker.js';
47
+ import './index-5e722d91.js';
48
+ import './index-702bf24a.js';
49
+ import './index-122432cd.js';
50
+ import './debounce-4419bc2f.js';
51
+ import './DatePicker.js';
52
+ import './localization-4ba17032.js';
53
+ import './checkTimeValidation-e56771be.js';
54
+ import './useEllipsisDetection-ef536015.js';
55
+ import './Tabs.js';
56
+ import './Steps.js';
57
+ import './index-a4635754.js';
58
+ import './Portal.js';
59
+ import './Timeline.js';
60
+ import './Card.js';
61
+ import './MobilePopup.js';
62
+ import './Menu.js';
63
+ import './Option.js';
64
+ import './SkeletonLoader.js';
65
+ import './KeyValue.js';
66
+ import './configs.js';
67
+ import './Tag.js';
68
+ import './Alert.js';
69
+ import './index-00fe8887.js';
70
+ import './rangeAndSlider-20599da4.js';
71
+ import './Slider.js';
72
+ import './Pagination.js';
73
+ import './objectWithoutPropertiesLoose-299691d8.js';
74
+ import './clsx.m-2bb6df4b.js';
75
+ import './index-a59530cd.js';
76
+ import './Notification.js';
77
+ import './Modal.js';
78
+ import './Collapse.js';
79
+ import './Status.js';
80
+ import './Avatar.js';
81
+ import './Search.js';
82
+ import './TextLink.js';
83
+ import './Label.js';
84
+ import './Paper.js';
85
+ import './Badge.js';
86
+ import './Time.js';
87
+ import './Title.js';
88
+ import './index-b7a33c58.js';
89
+ import './QRCode.js';
90
+ import './Progress.js';
91
+ import './MobileNavigation.js';
92
+ import './Products.js';
93
+ import './Breadcrumb.js';
94
+ import './Section.js';
95
+ import './ColorPicker.js';
96
+ import './NavigationMenu.js';
97
+ import './Textarea.js';
98
+ import './AdvancedSearch.js';
99
+ import './LinkButton.js';
package/Overspread.js ADDED
@@ -0,0 +1,343 @@
1
+ import { _ as _extends } from './_rollupPluginBabelHelpers-e8fb2e5c.js';
2
+ import React__default, { useState, useRef, useEffect, useCallback } from 'react';
3
+ import { p as propTypesExports } from './index-e0af0caf.js';
4
+ import { n as noop } from './index-ac59cb10.js';
5
+ import './configs-91c86664.js';
6
+ import { u as useClickOutside } from './useClickOutside-5183e396.js';
7
+ import Icon from './Icon.js';
8
+ import Portal from './Portal.js';
9
+ import { m as Dropdown } from './index-0cf65939.js';
10
+ import { P as Popover } from './index-a4635754.js';
11
+ import Menu from './Menu.js';
12
+ import './globalStyling-9c60a159.js';
13
+ import { s as styleInject } from './style-inject.es-746bb8ed.js';
14
+ import './dateValidation-67caec66.js';
15
+ import './_commonjsHelpers-24198af3.js';
16
+ import 'react-dom';
17
+ import './index-6ff23041.js';
18
+ import './GeneUIProvider.js';
19
+ import './Editor.js';
20
+ import './useMount-6fef51a5.js';
21
+ import './useDeviceType-dd51db38.js';
22
+ import './useWindowSize-80369d76.js';
23
+ import './Button.js';
24
+ import './ValidatableUploader.js';
25
+ import './index-d9e8a888.js';
26
+ import './Grid.js';
27
+ import './useWidth-9f4647f8.js';
28
+ import './useKeyDown-38102ae7.js';
29
+ import './BusyLoader.js';
30
+ import './Image.js';
31
+ import './Empty.js';
32
+ import './Tooltip.js';
33
+ import './Popover-f4d1cac0.js';
34
+ import './Checkbox.js';
35
+ import './checkboxRadioSwitcher-5b69d7bd.js';
36
+ import './guid-8ddf77b3.js';
37
+ import './ExtendedInput.js';
38
+ import './index-5cea9a7d.js';
39
+ import './Scrollbar.js';
40
+ import './ValidatableRadio.js';
41
+ import './RadioGroup.js';
42
+ import './Radio.js';
43
+ import './ValidatableCheckbox.js';
44
+ import './ValidatableSwitcher.js';
45
+ import './Switcher.js';
46
+ import './ValidatableNumberInput.js';
47
+ import './ValidatableTextInput.js';
48
+ import './ValidatableDatePicker.js';
49
+ import './index-5e722d91.js';
50
+ import './index-702bf24a.js';
51
+ import './index-122432cd.js';
52
+ import './debounce-4419bc2f.js';
53
+ import './DatePicker.js';
54
+ import './localization-4ba17032.js';
55
+ import './checkTimeValidation-e56771be.js';
56
+ import './useEllipsisDetection-ef536015.js';
57
+ import './Tabs.js';
58
+ import './Steps.js';
59
+ import './Timeline.js';
60
+ import './Card.js';
61
+ import './MobilePopup.js';
62
+ import './SkeletonLoader.js';
63
+ import './KeyValue.js';
64
+ import './configs.js';
65
+ import './Tag.js';
66
+ import './Alert.js';
67
+ import './index-00fe8887.js';
68
+ import './rangeAndSlider-20599da4.js';
69
+ import './Slider.js';
70
+ import './Pagination.js';
71
+ import './Divider.js';
72
+ import './objectWithoutPropertiesLoose-299691d8.js';
73
+ import './clsx.m-2bb6df4b.js';
74
+ import './index-a59530cd.js';
75
+ import './Notification.js';
76
+ import './Modal.js';
77
+ import './Collapse.js';
78
+ import './Status.js';
79
+ import './Avatar.js';
80
+ import './Search.js';
81
+ import './TextLink.js';
82
+ import './Label.js';
83
+ import './Paper.js';
84
+ import './Badge.js';
85
+ import './Time.js';
86
+ import './Title.js';
87
+ import './Option.js';
88
+ import './index-b7a33c58.js';
89
+ import './QRCode.js';
90
+ import './Progress.js';
91
+ import './MobileNavigation.js';
92
+ import './Products.js';
93
+ import './Breadcrumb.js';
94
+ import './Section.js';
95
+ import './ColorPicker.js';
96
+ import './NavigationMenu.js';
97
+ import './Textarea.js';
98
+ import './AdvancedSearch.js';
99
+ import './LinkButton.js';
100
+
101
+ var css_248z = "[data-gene-ui-version=\"2.11.0\"] .overspread-container{height:100%;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:300}[data-gene-ui-version=\"2.11.0\"] .overspread-holder{animation:overspread-reveal .5s forwards;background:var(--background);display:grid;grid-template-columns:100%;grid-template-rows:auto 1fr;height:100%;transform:translate3d(0,100%,0);width:100%}@keyframes overspread-reveal{to{transform:translateZ(0)}}[data-gene-ui-version=\"2.11.0\"] .overspread-head{border-bottom:1px solid rgba(var(--background-sc-rgb),.05);display:grid;grid-template-areas:\"left center right\";grid-template-columns:1fr auto 1fr;padding:0 1rem;position:relative;width:100%}[data-gene-ui-version=\"2.11.0\"] .overspread-head>li{align-items:center;display:flex;height:4.6rem;overflow:hidden}[data-gene-ui-version=\"2.11.0\"] .overspread-head>li.over-h-act{font:600 1.5rem/2.3rem var(--font-family);grid-area:left;min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content;width:100%}[data-gene-ui-version=\"2.11.0\"] .overspread-head>li.over-h-act:last-child{grid-area:right;justify-content:flex-end}[data-gene-ui-version=\"2.11.0\"] .overspread-head>li.over-h-tt{font:600 1.7rem/2.3rem var(--font-family);grid-area:center}[data-gene-ui-version=\"2.11.0\"] .overspread-head>li>*{margin:0 .5rem}[data-gene-ui-version=\"2.11.0\"] .overspread-head>li .color-hero{color:var(--hero)}[data-gene-ui-version=\"2.11.0\"] .overspread-head button{transition:opacity .4s}[data-gene-ui-version=\"2.11.0\"] .overspread-head button:disabled{opacity:.5;pointer-events:none}[data-gene-ui-version=\"2.11.0\"] .overspread-body{-webkit-overflow-scrolling:touch;overflow-y:auto;padding:1.5rem}[data-gene-ui-version=\"2.11.0\"] .overspread-search{position:relative}[data-gene-ui-version=\"2.11.0\"] .overspread-search:not(:focus-within,.show-search) input{height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}[data-gene-ui-version=\"2.11.0\"] .overspread-search:not(:focus-within,.show-search) .bc-icon-search{pointer-events:none}[data-gene-ui-version=\"2.11.0\"] .overspread-search:not(:focus-within,.show-search) .bc-icon-close{display:none}[data-gene-ui-version=\"2.11.0\"] .overspread-search.show-search,[data-gene-ui-version=\"2.11.0\"] .overspread-search:focus-within{background:var(--background);display:flex;left:0;margin:0;padding:0 1rem;position:absolute;top:50%;transform:translateY(-50%);width:100%;z-index:10}[data-gene-ui-version=\"2.11.0\"] .overspread-search.show-search>*,[data-gene-ui-version=\"2.11.0\"] .overspread-search:focus-within>*{padding:0 .5rem}[data-gene-ui-version=\"2.11.0\"] .overspread-search.show-search .bc-icon-search,[data-gene-ui-version=\"2.11.0\"] .overspread-search:focus-within .bc-icon-search{display:none}[data-gene-ui-version=\"2.11.0\"] .overspread-search.show-search input,[data-gene-ui-version=\"2.11.0\"] .overspread-search:focus-within input{font:600 1.4rem var(--font-family);height:2.4rem;width:100%}[data-gene-ui-version=\"2.11.0\"] .overspread-search.show-search input::input-placeholder,[data-gene-ui-version=\"2.11.0\"] .overspread-search:focus-within input::input-placeholder{color:rgba(var(--background-sc-rgb),.5);font-size:1.4rem;font-weight:600}[data-gene-ui-version=\"2.11.0\"] .overspread-search.show-search input:placeholder,[data-gene-ui-version=\"2.11.0\"] .overspread-search:focus-within input:placeholder{color:rgba(var(--background-sc-rgb),.5);font-size:1.4rem;font-weight:600}[data-gene-ui-version=\"2.11.0\"] .overspread-search.show-search input::placeholder,[data-gene-ui-version=\"2.11.0\"] .overspread-search:focus-within input::placeholder{color:rgba(var(--background-sc-rgb),.5);font-size:1.4rem;font-weight:600}[data-gene-ui-version=\"2.11.0\"] .overspread-search.show-search input:input-placeholder,[data-gene-ui-version=\"2.11.0\"] .overspread-search:focus-within input:input-placeholder{color:rgba(var(--background-sc-rgb),.5);font-size:1.4rem;font-weight:600}[data-gene-ui-version=\"2.11.0\"] .back-button-holder{align-items:center;cursor:pointer;display:flex}";
102
+ styleInject(css_248z);
103
+
104
+ function Overspread(props) {
105
+ const {
106
+ opened,
107
+ title,
108
+ hasDone,
109
+ disabledDone,
110
+ children,
111
+ hasSearch,
112
+ hasOptions,
113
+ titleHasOptions,
114
+ searchOutput,
115
+ hasBack,
116
+ doneText,
117
+ backWithIcon,
118
+ backText,
119
+ doneWithIcon,
120
+ onClose,
121
+ onDone,
122
+ onBack,
123
+ onSelectingOption,
124
+ onSelectingTitleOption,
125
+ dataForOptions,
126
+ dataForTitleWithOptions,
127
+ defaultValueForTitleWithOptions,
128
+ onAnimationEnd,
129
+ ...restProps
130
+ } = props;
131
+ const isControlled = ('opened' in props);
132
+ const [isOpen, setIsOpen] = useState(opened);
133
+ const [optionsPopoverIsOpen, setOptionsPopoverIsOpen] = useState(false);
134
+ const portalRef = useRef(null);
135
+ useEffect(() => setIsOpen(opened), [opened]);
136
+ const handleSearchOutput = useCallback(e => {
137
+ searchOutput && searchOutput(e.target.value);
138
+ }, [searchOutput]);
139
+ const handleClose = useCallback(e => {
140
+ !isControlled && setIsOpen(isOpen => !isOpen);
141
+ onClose && onClose(e);
142
+ }, [onClose, isControlled]);
143
+ const handleDone = useCallback(e => {
144
+ !isControlled && setIsOpen(isOpen => !isOpen);
145
+ onDone && onDone(e);
146
+ }, [onDone, isControlled]);
147
+ const outsideClickHandler = useCallback(() => {
148
+ setOptionsPopoverIsOpen(false);
149
+ }, []);
150
+ const outsideClickRef = useClickOutside(outsideClickHandler);
151
+ const onAnimationEndHandler = useCallback(() => {
152
+ onAnimationEnd && onAnimationEnd();
153
+ }, [onAnimationEnd]);
154
+ useEffect(() => {
155
+ var _portalRef$current;
156
+ portalRef === null || portalRef === void 0 ? void 0 : (_portalRef$current = portalRef.current) === null || _portalRef$current === void 0 ? void 0 : _portalRef$current.addEventListener('animationend', onAnimationEndHandler);
157
+ }, [portalRef.current, isOpen]);
158
+ const cleanup = () => {
159
+ var _portalRef$current2;
160
+ portalRef === null || portalRef === void 0 ? void 0 : (_portalRef$current2 = portalRef.current) === null || _portalRef$current2 === void 0 ? void 0 : _portalRef$current2.removeEventListener('animationend', onAnimationEndHandler);
161
+ };
162
+ useEffect(() => cleanup, []);
163
+ return /*#__PURE__*/React__default.createElement(Portal, {
164
+ isOpen: isOpen
165
+ }, /*#__PURE__*/React__default.createElement("div", _extends({
166
+ className: "overspread-container"
167
+ }, restProps), /*#__PURE__*/React__default.createElement("div", {
168
+ className: "overspread-holder",
169
+ ref: portalRef
170
+ }, /*#__PURE__*/React__default.createElement("ul", {
171
+ className: "overspread-head"
172
+ }, /*#__PURE__*/React__default.createElement("li", {
173
+ className: "over-h-act"
174
+ }, hasBack ? /*#__PURE__*/React__default.createElement("p", {
175
+ onClick: onBack,
176
+ className: "back-button-holder cursor-pointer"
177
+ }, backWithIcon && /*#__PURE__*/React__default.createElement(Icon, {
178
+ type: "bc-icon-arrow-left"
179
+ }), /*#__PURE__*/React__default.createElement("span", null, backText)) : /*#__PURE__*/React__default.createElement(Icon, {
180
+ type: "bc-icon-close",
181
+ onClick: handleClose,
182
+ className: "cursor-pointer"
183
+ })), /*#__PURE__*/React__default.createElement("li", {
184
+ className: "over-h-tt"
185
+ }, titleHasOptions ? /*#__PURE__*/React__default.createElement(Dropdown, {
186
+ hasSearch: false,
187
+ value: defaultValueForTitleWithOptions.value,
188
+ data: dataForTitleWithOptions,
189
+ placeholder: " ",
190
+ appearance: "light",
191
+ onChange: onSelectingTitleOption,
192
+ flexibility: "content-size"
193
+ }) : /*#__PURE__*/React__default.createElement("p", {
194
+ className: "ellipsis-text"
195
+ }, title)), /*#__PURE__*/React__default.createElement("li", {
196
+ className: "over-h-act"
197
+ }, hasSearch && /*#__PURE__*/React__default.createElement("div", {
198
+ className: "overspread-search cursor-pointer"
199
+ }, /*#__PURE__*/React__default.createElement(Icon, {
200
+ type: "bc-icon-close"
201
+ }), /*#__PURE__*/React__default.createElement("input", {
202
+ onChange: handleSearchOutput,
203
+ placeholder: "Search"
204
+ }), /*#__PURE__*/React__default.createElement(Icon, {
205
+ type: "bc-icon-search"
206
+ })), hasOptions && /*#__PURE__*/React__default.createElement(Popover, {
207
+ isOpen: optionsPopoverIsOpen,
208
+ extendTargetWidth: false,
209
+ Content: /*#__PURE__*/React__default.createElement(Menu, {
210
+ ref: outsideClickRef,
211
+ data: dataForOptions,
212
+ onSelect: function () {
213
+ setOptionsPopoverIsOpen(false);
214
+ onSelectingOption(...arguments);
215
+ }
216
+ }),
217
+ align: "end"
218
+ }, /*#__PURE__*/React__default.createElement(Icon, {
219
+ type: "bc-icon-more-vertical",
220
+ onClick: () => setOptionsPopoverIsOpen(true)
221
+ })), hasDone && /*#__PURE__*/React__default.createElement("button", {
222
+ disabled: disabledDone,
223
+ onClick: handleDone,
224
+ className: "color-hero cursor-pointer"
225
+ }, doneWithIcon ? /*#__PURE__*/React__default.createElement(Icon, {
226
+ type: "bc-icon-checkbox-checked"
227
+ }) : doneText))), children && /*#__PURE__*/React__default.createElement("div", {
228
+ className: "overspread-body"
229
+ }, children))));
230
+ }
231
+ Overspread.propTypes = {
232
+ title: propTypesExports.string,
233
+ /**
234
+ * Enables title's dropdown,
235
+ */
236
+ titleHasOptions: propTypesExports.bool,
237
+ /**
238
+ * Fires event for handling change of value/selected option
239
+ * ((event: Event) => void)
240
+ */
241
+ onSelectingTitleOption: propTypesExports.func,
242
+ /**
243
+ * Title's dropdown data
244
+ */
245
+ dataForTitleWithOptions: propTypesExports.array,
246
+ /**
247
+ * Default value for title's dropdown
248
+ */
249
+ defaultValueForTitleWithOptions: propTypesExports.object,
250
+ /**
251
+ * Enables search,
252
+ */
253
+ hasSearch: propTypesExports.bool,
254
+ /**
255
+ * Fires event when user types in search field
256
+ * (event: Event) => void
257
+ */
258
+ searchOutput: propTypesExports.func,
259
+ /**
260
+ * Displays dropdown on the right corner,
261
+ */
262
+ hasOptions: propTypesExports.bool,
263
+ /**
264
+ * Right corner dropdown's data
265
+ */
266
+ dataForOptions: propTypesExports.array,
267
+ /**
268
+ * Fires event for handling change of value/selected option
269
+ * ((event: Event) => void)
270
+ */
271
+ onSelectingOption: propTypesExports.func,
272
+ /** Opened state */
273
+ opened: propTypesExports.bool,
274
+ /**
275
+ * Any valid node
276
+ */
277
+ children: propTypesExports.node,
278
+ /**
279
+ * Enables done button on the right corner,
280
+ */
281
+ hasDone: propTypesExports.bool,
282
+ /**
283
+ * Shows done icon instead of text
284
+ */
285
+ doneWithIcon: propTypesExports.bool,
286
+ /**
287
+ * Done button disabled state
288
+ */
289
+ disabledDone: propTypesExports.bool,
290
+ /**
291
+ * Custom text for done button
292
+ */
293
+ doneText: propTypesExports.string,
294
+ /**
295
+ * Fires event when done button is clicked
296
+ * ((event: Event) => void)
297
+ */
298
+ onDone: propTypesExports.func,
299
+ /**
300
+ * Enables back button on the left corner,
301
+ */
302
+ hasBack: propTypesExports.bool,
303
+ /**
304
+ * Custom text for back button
305
+ */
306
+ backText: propTypesExports.string,
307
+ /**
308
+ * Displays chevron icon in back button
309
+ */
310
+ backWithIcon: propTypesExports.bool,
311
+ /**
312
+ * Fires event when back button is clicked
313
+ * ((event: Event) => void)
314
+ */
315
+ onBack: propTypesExports.func,
316
+ /**
317
+ * Fires event when close icon is clicked
318
+ * ((event: Event) => void)
319
+ */
320
+ onClose: propTypesExports.func,
321
+ /**
322
+ * Function calls when the animation ends.
323
+ */
324
+ onAnimationEnd: propTypesExports.func
325
+ };
326
+ Overspread.defaultProps = {
327
+ hasSearch: false,
328
+ hasBack: false,
329
+ hasOptions: false,
330
+ doneText: 'Done',
331
+ titleHasOptions: false,
332
+ backWithIcon: false,
333
+ doneWithIcon: false,
334
+ hasDone: true,
335
+ onDone: noop,
336
+ onBack: noop,
337
+ onClose: noop,
338
+ onSelectingOption: noop,
339
+ onSelectingTitleOption: noop,
340
+ onAnimationEnd: noop
341
+ };
342
+
343
+ export { Overspread as default };