@geneui/components 2.11.2 → 2.12.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 (213) hide show
  1. package/{ActionableList.js → ActionableList/index.js} +83 -152
  2. package/{AdvancedSearch.js → AdvancedSearch/index.js} +290 -304
  3. package/Alert/index.js +97 -0
  4. package/Avatar/index.js +30 -0
  5. package/Badge/index.js +75 -0
  6. package/{Breadcrumb.js → Breadcrumb/index.js} +32 -31
  7. package/BusyLoader/index.js +68 -0
  8. package/Button/index.js +129 -0
  9. package/CHANGELOG.md +53 -0
  10. package/{Card.js → Card/index.js} +82 -94
  11. package/{CardList.js → CardList/index.js} +120 -165
  12. package/{CellMeasurerCache-b786dd93.js → CellMeasurerCache-3741d716.js} +2 -2
  13. package/{index-9164a86d.js → Charts/index.js} +17103 -30447
  14. package/{Checkbox.js → Checkbox/index.js} +37 -38
  15. package/{CheckboxGroup.js → CheckboxGroup/index.js} +41 -42
  16. package/{CheckboxGroupWithSearch.js → CheckboxGroupWithSearch/index.js} +64 -65
  17. package/{Collapse.js → Collapse/index.js} +28 -29
  18. package/{ColorPicker.js → ColorPicker/index.js} +16 -16
  19. package/ComboBox/index.js +525 -0
  20. package/Counter/index.js +310 -0
  21. package/{DateFilter.js → DateFilter/index.js} +45 -43
  22. package/{DatePicker.js → DatePicker/index.js} +106 -108
  23. package/{index-0199942c.js → DatePickerInput/index.js} +114 -100
  24. package/{Divider.js → Divider/index.js} +9 -10
  25. package/{Drawer.js → Drawer/index.js} +40 -41
  26. package/Dropdown/index.js +41 -0
  27. package/{Editor.js → Editor/index.js} +165 -164
  28. package/{Empty.js → Empty/index.js} +12 -13
  29. package/{ExtendedInput.js → ExtendedInput/index.js} +81 -71
  30. package/Form/index.js +83 -0
  31. package/{FormContainer.js → FormContainer/index.js} +25 -26
  32. package/FormableCheckbox/index.js +26 -0
  33. package/FormableDatePicker/index.js +41 -0
  34. package/FormableDropdown/index.js +48 -0
  35. package/FormableEditor/index.js +24 -0
  36. package/{FormableHOC-21051057.js → FormableHOC-55263162.js} +3 -3
  37. package/FormableMultiSelectDropdown/index.js +48 -0
  38. package/FormableNumberInput/index.js +32 -0
  39. package/FormableRadio/index.js +22 -0
  40. package/FormableSwitcher/index.js +22 -0
  41. package/FormableTextInput/index.js +32 -0
  42. package/FormableUploader/index.js +42 -0
  43. package/GeneUIProvider/index.js +282 -0
  44. package/{Grid.js → Grid/index.js} +27 -27
  45. package/Holder/index.js +261 -0
  46. package/{Icon.js → Icon/index.js} +9 -10
  47. package/Image/index.js +129 -0
  48. package/ImagePreview/index.js +481 -0
  49. package/{KeyValue.js → KeyValue/index.js} +11 -12
  50. package/LICENSE +21 -0
  51. package/Label/index.js +57 -0
  52. package/LinkButton/index.js +67 -0
  53. package/{Menu.js → Menu/index.js} +27 -28
  54. package/MobileNavigation/index.js +94 -0
  55. package/{MobilePopup.js → MobilePopup/index.js} +42 -41
  56. package/{Modal.js → Modal/index.js} +39 -40
  57. package/ModuleTitle/index.js +143 -0
  58. package/{NavigationMenu.js → NavigationMenu/index.js} +30 -29
  59. package/Notification/index.js +119 -0
  60. package/Option/index.js +184 -0
  61. package/Overlay/index.js +189 -0
  62. package/Overspread/index.js +289 -0
  63. package/{Pagination.js → Pagination/index.js} +35 -34
  64. package/Paper/index.js +96 -0
  65. package/{index-084588e9.js → Popover/index.js} +48 -58
  66. package/PopoverV2/index.js +18 -0
  67. package/{Portal.js → Portal/index.js} +7 -8
  68. package/{Products.js → Products/index.js} +20 -21
  69. package/Profile/index.js +585 -0
  70. package/Progress/index.js +199 -0
  71. package/{QRCode.js → QRCode/index.js} +4 -6
  72. package/{Radio.js → Radio/index.js} +25 -26
  73. package/{RadioGroup.js → RadioGroup/index.js} +17 -18
  74. package/{index-00fe8887.js → Range/index.js} +29 -32
  75. package/RichEditor/index.js +13 -0
  76. package/{RichEditor-98accead.js → RichEditor-8b0f7ccd.js} +18 -18
  77. package/{Scrollbar.js → Scrollbar/index.js} +15 -17
  78. package/{Search.js → Search/index.js} +25 -24
  79. package/SearchWithDropdown/index.js +138 -0
  80. package/Section/index.js +61 -0
  81. package/{SkeletonLoader.js → SkeletonLoader/index.js} +13 -14
  82. package/{Slider.js → Slider/index.js} +46 -43
  83. package/Status/index.js +103 -0
  84. package/Steps/index.js +313 -0
  85. package/{index-897d8240.js → SuggestionList/index.js} +15 -38
  86. package/{Switcher.js → Switcher/index.js} +30 -31
  87. package/Table/index.js +53 -0
  88. package/{TableCompositions.js → TableCompositions/index.js} +131 -168
  89. package/Tabs/index.js +235 -0
  90. package/Tag/index.js +102 -0
  91. package/{TextLink.js → TextLink/index.js} +3 -3
  92. package/{Textarea.js → Textarea/index.js} +66 -65
  93. package/{Time.js → Time/index.js} +13 -14
  94. package/TimePicker/index.js +555 -0
  95. package/Timeline/index.js +113 -0
  96. package/Title/index.js +65 -0
  97. package/{Toaster.js → Toaster/index.js} +19 -20
  98. package/{Tooltip.js → Tooltip/index.js} +27 -28
  99. package/{TransferList.js → TransferList/index.js} +44 -55
  100. package/{index-135b9d17.js → Uploader/index.js} +119 -116
  101. package/{ValidatableCheckbox.js → ValidatableCheckbox/index.js} +23 -24
  102. package/{ValidatableDatePicker.js → ValidatableDatePicker/index.js} +44 -42
  103. package/ValidatableDropdown/index.js +139 -0
  104. package/ValidatableElements/index.js +65 -0
  105. package/ValidatableMultiSelectDropdown/index.js +150 -0
  106. package/{ValidatableNumberInput.js → ValidatableNumberInput/index.js} +41 -33
  107. package/{ValidatableRadio.js → ValidatableRadio/index.js} +19 -20
  108. package/{ValidatableSwitcher.js → ValidatableSwitcher/index.js} +19 -20
  109. package/{ValidatableTextInput.js → ValidatableTextInput/index.js} +32 -31
  110. package/{ValidatableTimeInput.js → ValidatableTimeInput/index.js} +31 -30
  111. package/{ValidatableUploader.js → ValidatableUploader/index.js} +36 -34
  112. package/Widget/index.js +227 -0
  113. package/config-0ca92874.js +31 -0
  114. package/{configs-91c86664.js → configs-fed6ac34.js} +28 -1
  115. package/hooks/useBodyScroll.js +16 -0
  116. package/hooks/useClick.js +18 -0
  117. package/{useClickOutside-5183e396.js → hooks/useClickOutside.js} +1 -1
  118. package/hooks/useDebounceHook.js +16 -0
  119. package/{useDeviceType-dd51db38.js → hooks/useDeviceType.js} +4 -3
  120. package/hooks/useDidMount.js +15 -0
  121. package/{useEllipsisDetection-ef536015.js → hooks/useEllipsisDetection.js} +1 -1
  122. package/hooks/useForceUpdate.js +8 -0
  123. package/hooks/useImgDownload.js +18 -0
  124. package/{useKeyDown-38102ae7.js → hooks/useKeyDown.js} +1 -1
  125. package/hooks/useMount.js +13 -0
  126. package/hooks/useMutationObserver.js +21 -0
  127. package/hooks/usePrevious.js +10 -0
  128. package/hooks/useThrottle.js +16 -0
  129. package/hooks/useToggle.js +11 -0
  130. package/hooks/useUpdatableRef.js +14 -0
  131. package/hooks/useUpdate.js +10 -0
  132. package/{useWidth-9f4647f8.js → hooks/useWidth.js} +2 -2
  133. package/{useWindowSize-80369d76.js → hooks/useWindowSize.js} +1 -1
  134. package/{index-8c98317a.js → index-11eea761.js} +678 -752
  135. package/index-2ad83e03.js +4 -0
  136. package/index-34e47647.js +10054 -0
  137. package/index-45eafea6.js +90 -0
  138. package/{index-5e96cb4d.js → index-462461c0.js} +50 -48
  139. package/{index-ac59cb10.js → index-a0e4e333.js} +6 -6
  140. package/{index-e8776f3d.js → index-b1e429a7.js} +1 -1
  141. package/index.d.ts +115 -0
  142. package/index.js +137 -113
  143. package/index.mobile.d.ts +16 -0
  144. package/lib/atoms/Avatar/Avatar.d.ts +34 -0
  145. package/lib/atoms/Avatar/index.d.ts +1 -0
  146. package/lib/atoms/LinkButton/LinkButton.d.ts +46 -0
  147. package/lib/atoms/LinkButton/index.d.ts +1 -0
  148. package/{objectWithoutPropertiesLoose-299691d8.js → objectWithoutPropertiesLoose-d8a4a68c.js} +12 -12
  149. package/package.json +42 -22
  150. package/{rangeAndSlider-20599da4.js → rangeAndSlider-0301a458.js} +220 -375
  151. package/{react-beautiful-dnd.esm-38c37304.js → react-beautiful-dnd.esm-04c14563.js} +9 -9
  152. package/react-lifecycles-compat.es-6e1f3768.js +158 -0
  153. package/Alert.js +0 -98
  154. package/Avatar.js +0 -77
  155. package/Badge.js +0 -76
  156. package/BusyLoader.js +0 -69
  157. package/Button.js +0 -130
  158. package/Charts.js +0 -99
  159. package/ComboBox.js +0 -99
  160. package/Counter.js +0 -99
  161. package/DatePickerInput.js +0 -30
  162. package/Dropdown.js +0 -99
  163. package/Form.js +0 -116
  164. package/FormableCheckbox.js +0 -27
  165. package/FormableDatePicker.js +0 -39
  166. package/FormableDropdown.js +0 -105
  167. package/FormableEditor.js +0 -24
  168. package/FormableMultiSelectDropdown.js +0 -105
  169. package/FormableNumberInput.js +0 -31
  170. package/FormableRadio.js +0 -23
  171. package/FormableSwitcher.js +0 -23
  172. package/FormableTextInput.js +0 -31
  173. package/FormableUploader.js +0 -40
  174. package/GeneUIProvider.js +0 -256
  175. package/Holder.js +0 -99
  176. package/Image.js +0 -130
  177. package/ImagePreview.js +0 -99
  178. package/Label.js +0 -58
  179. package/LinkButton.js +0 -104
  180. package/MobileNavigation.js +0 -95
  181. package/ModuleTitle.js +0 -99
  182. package/Notification.js +0 -120
  183. package/Option.js +0 -186
  184. package/Overlay.js +0 -99
  185. package/Overspread.js +0 -343
  186. package/Paper.js +0 -97
  187. package/Popover.js +0 -20
  188. package/PopoverV2.js +0 -19
  189. package/Profile.js +0 -99
  190. package/Progress.js +0 -200
  191. package/Range.js +0 -14
  192. package/RichEditor.js +0 -13
  193. package/SearchWithDropdown.js +0 -195
  194. package/Section.js +0 -62
  195. package/Status.js +0 -104
  196. package/Steps.js +0 -312
  197. package/SuggestionList.js +0 -15
  198. package/Table.js +0 -102
  199. package/Tabs.js +0 -236
  200. package/Tag.js +0 -103
  201. package/TimePicker.js +0 -99
  202. package/Timeline.js +0 -114
  203. package/Title.js +0 -66
  204. package/Uploader.js +0 -32
  205. package/ValidatableDropdown.js +0 -99
  206. package/ValidatableElements.js +0 -99
  207. package/ValidatableMultiSelectDropdown.js +0 -99
  208. package/Widget.js +0 -99
  209. package/globalStyling-9c60a159.js +0 -4
  210. package/index-2030e31c.js +0 -4
  211. package/index-b7a33c58.js +0 -11
  212. package/index-e0af0caf.js +0 -1182
  213. package/useMount-6fef51a5.js +0 -9
package/ModuleTitle.js DELETED
@@ -1,99 +0,0 @@
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 './Icon.js';
8
- import './globalStyling-9c60a159.js';
9
- export { M as default } from './index-9164a86d.js';
10
- import './Grid.js';
11
- import './Tabs.js';
12
- import './Steps.js';
13
- import './Timeline.js';
14
- import './RadioGroup.js';
15
- import './Checkbox.js';
16
- import './Card.js';
17
- import './Tag.js';
18
- import './Alert.js';
19
- import './Tooltip.js';
20
- import './index-00fe8887.js';
21
- import './Slider.js';
22
- import './Pagination.js';
23
- import './ExtendedInput.js';
24
- import './Editor.js';
25
- import './ValidatableUploader.js';
26
- import './ValidatableRadio.js';
27
- import './ValidatableCheckbox.js';
28
- import './ValidatableSwitcher.js';
29
- import './ValidatableNumberInput.js';
30
- import './ValidatableTextInput.js';
31
- import './ValidatableDatePicker.js';
32
- import './Notification.js';
33
- import './Modal.js';
34
- import './Collapse.js';
35
- import './Status.js';
36
- import './Menu.js';
37
- import './Progress.js';
38
- import './MobileNavigation.js';
39
- import './MobilePopup.js';
40
- import './index-135b9d17.js';
41
- import './Products.js';
42
- import './Search.js';
43
- import './index-0199942c.js';
44
- import './Breadcrumb.js';
45
- import './Section.js';
46
- import './ColorPicker.js';
47
- import './NavigationMenu.js';
48
- import './Textarea.js';
49
- import './AdvancedSearch.js';
50
- import './dateValidation-67caec66.js';
51
- import './_commonjsHelpers-24198af3.js';
52
- import 'react-dom';
53
- import './style-inject.es-746bb8ed.js';
54
- import './useEllipsisDetection-ef536015.js';
55
- import './Switcher.js';
56
- import './useKeyDown-38102ae7.js';
57
- import './checkboxRadioSwitcher-5b69d7bd.js';
58
- import './guid-8ddf77b3.js';
59
- import './useMount-6fef51a5.js';
60
- import './objectWithoutPropertiesLoose-299691d8.js';
61
- import './rangeAndSlider-20599da4.js';
62
- import './clsx.m-2bb6df4b.js';
63
- import './useDeviceType-dd51db38.js';
64
- import './useWindowSize-80369d76.js';
65
- import './useClickOutside-5183e396.js';
66
- import './index-084588e9.js';
67
- import './Popover-f4d1cac0.js';
68
- import './index-122432cd.js';
69
- import './GeneUIProvider.js';
70
- import './Portal.js';
71
- import './Scrollbar.js';
72
- import './index-897d8240.js';
73
- import './BusyLoader.js';
74
- import './index-5e96cb4d.js';
75
- import './debounce-4419bc2f.js';
76
- import './Empty.js';
77
- import './index-2030e31c.js';
78
- import './Button.js';
79
- import './Divider.js';
80
- import './Avatar.js';
81
- import './TextLink.js';
82
- import './Label.js';
83
- import './Radio.js';
84
- import './Paper.js';
85
- import './Badge.js';
86
- import './configs.js';
87
- import './SkeletonLoader.js';
88
- import './Time.js';
89
- import './localization-4ba17032.js';
90
- import './Title.js';
91
- import './Image.js';
92
- import './KeyValue.js';
93
- import './Option.js';
94
- import './index-b7a33c58.js';
95
- import './QRCode.js';
96
- import './useWidth-9f4647f8.js';
97
- import './checkTimeValidation-e56771be.js';
98
- import './DatePicker.js';
99
- import './LinkButton.js';
package/Notification.js DELETED
@@ -1,120 +0,0 @@
1
- import { _ as _extends } from './_rollupPluginBabelHelpers-e8fb2e5c.js';
2
- import React__default from 'react';
3
- import { c as classnames } from './index-6ff23041.js';
4
- import { p as propTypesExports } from './index-e0af0caf.js';
5
- import './dateValidation-67caec66.js';
6
- import 'react-dom';
7
- import { u as useDeviceType } from './useDeviceType-dd51db38.js';
8
- import { s as screenTypes } from './configs-91c86664.js';
9
- import Icon from './Icon.js';
10
- import './globalStyling-9c60a159.js';
11
- import { s as styleInject } from './style-inject.es-746bb8ed.js';
12
- import './_commonjsHelpers-24198af3.js';
13
- import './useWindowSize-80369d76.js';
14
-
15
- var css_248z = "[data-gene-ui-version=\"1.0.0\"] .notifier-block{align-items:flex-start;background:var(--background);border:1px solid rgba(var(--background-sc-rgb),.1);border-radius:1rem;box-shadow:0 .2rem .4rem 0 #0000001a;cursor:pointer;display:flex;height:8.5rem;transition:border-color .3s;width:100%}[data-gene-ui-version=\"1.0.0\"] .notifier-block.mobile-view{border-radius:0;border-width:0 0 1px;box-shadow:none}[data-gene-ui-version=\"1.0.0\"] .notifier-block>li{flex-shrink:0}[data-gene-ui-version=\"1.0.0\"] .notifier-block>li.notifier-icon{align-self:stretch}[data-gene-ui-version=\"1.0.0\"] .notifier-block>li.notifier-content{flex:auto;overflow:hidden;padding:1.2rem 1.4rem;width:10rem}[data-gene-ui-version=\"1.0.0\"] .notifier-block>li.notifier-action{padding:1rem 1.5rem 0 0}html[dir=rtl] .notifier-block>li.notifier-action{padding:1rem 0 0 1.5rem}[data-gene-ui-version=\"1.0.0\"] .notifier-block>li.notifier-action .icon{cursor:pointer}@media (hover:hover){[data-gene-ui-version=\"1.0.0\"] .notifier-block>li.notifier-action .icon:hover{color:var(--hero)}[data-gene-ui-version=\"1.0.0\"] .notifier-block:hover{border-color:var(--hero)}}[data-gene-ui-version=\"1.0.0\"] .notifier-icon{align-items:center;background:rgba(var(--hero-rgb),.28);border-radius:.9rem 0 0 .9rem;color:var(--background);display:flex;font-size:4.2rem;justify-content:center;width:8.5rem}html[dir=rtl] .notifier-icon{border-radius:0 .9rem .9rem 0}[data-gene-ui-version=\"1.0.0\"] .notifier-block.mobile-view .notifier-icon{border-radius:0}[data-gene-ui-version=\"1.0.0\"] .type-clean .notifier-icon{background:none;color:rgba(var(--hero-rgb),.48)}html:not([dir=rtl]) .type-clean .notifier-icon{border-right:1px solid rgba(var(--background-sc-rgb),.1)}html[dir=rtl] .type-clean .notifier-icon{border-left:1px solid rgba(var(--background-sc-rgb),.1)}[data-gene-ui-version=\"1.0.0\"] .notifier-title{font:600 1.4rem/1.36 var(--font-family);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-gene-ui-version=\"1.0.0\"] .notifier-c-t{margin:.8rem 0 0}[data-gene-ui-version=\"1.0.0\"] .notifier-c-t>ul{display:grid;font:600 1.2rem/1.42 var(--font-family);grid-template-areas:\"c1 c2\";grid-template-columns:auto 1fr}[data-gene-ui-version=\"1.0.0\"] .notifier-c-t>ul>li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-gene-ui-version=\"1.0.0\"] .notifier-c-t>ul>li:first-child{grid-area:c1;opacity:.5;width:6.4rem}[data-gene-ui-version=\"1.0.0\"] .notifier-c-t>ul>li:nth-child(2){grid-area:c2}";
16
- styleInject(css_248z);
17
-
18
- const notificationTypes = ['default', 'clean'];
19
- function Notification(_ref) {
20
- let {
21
- type,
22
- onClose,
23
- closable,
24
- content,
25
- title,
26
- heading,
27
- className,
28
- screenType,
29
- additionalHeading,
30
- notificationIcon,
31
- onContentClick,
32
- description,
33
- additionalDescription,
34
- ...restProps
35
- } = _ref;
36
- const {
37
- isMobile
38
- } = useDeviceType(screenType);
39
- return /*#__PURE__*/React__default.createElement("ul", _extends({
40
- onClick: onContentClick,
41
- className: classnames('notifier-block', className, "type-".concat(type), {
42
- 'mobile-view': isMobile
43
- })
44
- }, restProps), type && /*#__PURE__*/React__default.createElement("li", {
45
- className: classnames('notifier-icon', notificationIcon)
46
- }), /*#__PURE__*/React__default.createElement("li", {
47
- className: "notifier-content"
48
- }, /*#__PURE__*/React__default.createElement("div", {
49
- className: "notifier-title"
50
- }, title), content || /*#__PURE__*/React__default.createElement("div", {
51
- className: "notifier-c-t"
52
- }, heading && /*#__PURE__*/React__default.createElement("ul", null, /*#__PURE__*/React__default.createElement("li", null, /*#__PURE__*/React__default.createElement("span", null, heading)), /*#__PURE__*/React__default.createElement("li", null, description)), additionalHeading && /*#__PURE__*/React__default.createElement("ul", null, /*#__PURE__*/React__default.createElement("li", null, /*#__PURE__*/React__default.createElement("span", null, additionalHeading)), /*#__PURE__*/React__default.createElement("li", null, additionalDescription)))), closable && /*#__PURE__*/React__default.createElement("li", {
53
- className: "notifier-action",
54
- onClick: onClose
55
- }, /*#__PURE__*/React__default.createElement(Icon, {
56
- type: "bc-icon-close"
57
- })));
58
- }
59
- Notification.propTypes = {
60
- /**
61
- * Type of the Notification component.
62
- */
63
- type: propTypesExports.oneOf(notificationTypes),
64
- /**
65
- * If true displays close button
66
- */
67
- closable: propTypesExports.bool,
68
- /**
69
- * CSS class name for element
70
- */
71
- className: propTypesExports.string,
72
- /**
73
- * Fires event when user clicks on close button
74
- * (event: Event) => void
75
- */
76
- onClose: propTypesExports.func,
77
- /**
78
- * Custom content form notification
79
- */
80
- content: propTypesExports.element,
81
- /**
82
- * Fires when user click on notification modal
83
- * (event: Event) => void
84
- */
85
- onContentClick: propTypesExports.func,
86
- /**
87
- * Heading text for notification modal
88
- */
89
- heading: propTypesExports.string,
90
- /**
91
- * Descriptions text fro notification
92
- */
93
- description: propTypesExports.string,
94
- /**
95
- * Controls screen type
96
- */
97
- screenType: propTypesExports.oneOf(screenTypes),
98
- /**
99
- * Additional heading text for notification
100
- */
101
- additionalHeading: propTypesExports.string,
102
- /**
103
- * Notification icon
104
- */
105
- notificationIcon: propTypesExports.string.isRequired,
106
- /**
107
- * Additional info for notification
108
- */
109
- additionalDescription: propTypesExports.string,
110
- /**
111
- * Title for notification
112
- */
113
- title: propTypesExports.string.isRequired
114
- };
115
- Notification.defaultProps = {
116
- type: notificationTypes[0],
117
- closable: false
118
- };
119
-
120
- export { Notification as default, notificationTypes };
package/Option.js DELETED
@@ -1,186 +0,0 @@
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=\"1.0.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=\"1.0.0\"] .option-container>*{transition:color .4s}[data-gene-ui-version=\"1.0.0\"] .option-container.mobile-view{min-height:4.8rem;padding:0 2rem}[data-gene-ui-version=\"1.0.0\"] .option-container.border-top{border-top:1px solid}[data-gene-ui-version=\"1.0.0\"] .option-container.border-bottom{border-bottom:1px solid}[data-gene-ui-version=\"1.0.0\"] .option-container.border-bottom,[data-gene-ui-version=\"1.0.0\"] .option-container.border-top{border-color:rgba(var(--background-sc-rgb),.1)}[data-gene-ui-version=\"1.0.0\"] .option-container.sticky-bottom,[data-gene-ui-version=\"1.0.0\"] .option-container.sticky-top{position:-webkit-sticky;position:sticky;z-index:1}[data-gene-ui-version=\"1.0.0\"] .option-container.sticky-top{top:0}[data-gene-ui-version=\"1.0.0\"] .option-container.sticky-bottom{bottom:0}@media (hover:hover){[data-gene-ui-version=\"1.0.0\"] .option-container.hovered:hover,[data-gene-ui-version=\"1.0.0\"] .option-container:hover:hover{background:rgba(var(--background-sc-rgb),.05)}}[data-gene-ui-version=\"1.0.0\"] .option-container.hovered{background:rgba(var(--background-sc-rgb),.05)}[data-gene-ui-version=\"1.0.0\"] .option-container.active,[data-gene-ui-version=\"1.0.0\"] .option-container.c-hero{color:var(--hero)}[data-gene-ui-version=\"1.0.0\"] .option-container.disabled{opacity:.5;pointer-events:none}[data-gene-ui-version=\"1.0.0\"] .option-container a{display:block;line-height:4rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-gene-ui-version=\"1.0.0\"] .option-container a.active~*{color:var(--hero)}[data-gene-ui-version=\"1.0.0\"] .option-container-relative{position:relative}[data-gene-ui-version=\"1.0.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=\"1.0.0\"] .option-right-elements{flex-shrink:0;margin-inline-start:1.2rem}[data-gene-ui-version=\"1.0.0\"] .option-right-elements .bc-icon-selected{transition:transform .4s}[data-gene-ui-version=\"1.0.0\"] .option-container:not(.mobile-view) .option-right-elements .bc-icon-selected{margin-inline-end:-.4rem}[data-gene-ui-version=\"1.0.0\"] .option-container:not(.active) .option-right-elements .bc-icon-selected{transform:scale(0)}[data-gene-ui-version=\"1.0.0\"] .mobile-view .bc-icon-selected{margin-inline-end:.8rem!important}[data-gene-ui-version=\"1.0.0\"] .option-texts{align-items:center;display:flex;flex:auto;font:600 1.4rem/2rem var(--font-family);overflow:hidden}[data-gene-ui-version=\"1.0.0\"] .option-texts>li{flex-shrink:0}[data-gene-ui-version=\"1.0.0\"] .option-texts>li:first-child{flex:auto;overflow:hidden}[data-gene-ui-version=\"1.0.0\"] .option-texts>li.assigned-value{margin-inline-start:1rem;opacity:.7}[data-gene-ui-version=\"1.0.0\"] .option-description{font:600 1.2rem/1.6rem var(--font-family);opacity:.7}[data-gene-ui-version=\"1.0.0\"] .option-title-center{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}[data-gene-ui-version=\"1.0.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 DELETED
@@ -1,99 +0,0 @@
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-9164a86d.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-135b9d17.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-897d8240.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-0199942c.js';
48
- import './index-5e96cb4d.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-084588e9.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-2030e31c.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';