@geneui/components 2.11.2 → 2.12.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 (213) hide show
  1. package/{ActionableList.js → ActionableList/index.js} +83 -152
  2. package/{AdvancedSearch.js → AdvancedSearch/index.js} +291 -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 +40 -0
  10. package/{Card.js → Card/index.js} +82 -94
  11. package/{CardList.js → CardList/index.js} +118 -165
  12. package/{CellMeasurerCache-b786dd93.js → CellMeasurerCache-bc2163c1.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} +46 -43
  22. package/{DatePicker.js → DatePicker/index.js} +106 -108
  23. package/{index-0199942c.js → DatePickerInput/index.js} +103 -89
  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 +86 -0
  31. package/{FormContainer.js → FormContainer/index.js} +25 -26
  32. package/FormableCheckbox/index.js +26 -0
  33. package/FormableDatePicker/index.js +42 -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 +287 -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/{index-5e96cb4d.js → PopoverV2/index.js} +57 -1006
  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-8b9c3afa.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} +132 -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 +556 -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} +45 -42
  103. package/ValidatableDropdown/index.js +139 -0
  104. package/ValidatableElements/index.js +68 -0
  105. package/ValidatableMultiSelectDropdown/index.js +150 -0
  106. package/{ValidatableNumberInput.js → ValidatableNumberInput/index.js} +34 -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-45eafea6.js +90 -0
  135. package/index-583e0b30.js +4 -0
  136. package/{index-8c98317a.js → index-78d2ea5b.js} +678 -752
  137. package/{index-ac59cb10.js → index-a0e4e333.js} +6 -6
  138. package/{index-e8776f3d.js → index-b1e429a7.js} +1 -1
  139. package/index-bd525a3a.js +10054 -0
  140. package/index.d.ts +115 -0
  141. package/index.js +138 -113
  142. package/index.mobile.d.ts +16 -0
  143. package/jsx-runtime-57b40d9e.js +957 -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
@@ -1,35 +1,37 @@
1
- import './globalStyling-9c60a159.js';
2
- import { s as styleInject } from './style-inject.es-746bb8ed.js';
3
- import { _ as _extends } from './_rollupPluginBabelHelpers-e8fb2e5c.js';
4
- import React__default, { useRef, useCallback, useEffect, useMemo, useState } from 'react';
5
- import { p as propTypesExports } from './index-e0af0caf.js';
6
- import { d as dayjsWithPlugins, a as dayjs } from './dateValidation-67caec66.js';
7
- import { d as popoverConfig, i as inputConfig } from './configs-91c86664.js';
8
- import { n as noop, s as stopEvent } from './index-ac59cb10.js';
9
- import { u as useKeyDown } from './useKeyDown-38102ae7.js';
10
- import { u as useDeviceType } from './useDeviceType-dd51db38.js';
11
- import { c as classnames } from './index-6ff23041.js';
12
- import { P as PopoverV2 } from './index-5e96cb4d.js';
13
- import DatePicker from './DatePicker.js';
14
- import ExtendedInput from './ExtendedInput.js';
15
- import { g as getBrowserDateFormat } from './localization-4ba17032.js';
1
+ import { s as styleInject } from '../style-inject.es-746bb8ed.js';
2
+ import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
3
+ import React__default, { useMemo, useState, useRef, useCallback, useEffect } from 'react';
4
+ import PropTypes from 'prop-types';
5
+ import { d as dayjsWithPlugins, a as dayjs } from '../dateValidation-67caec66.js';
6
+ import { c as classnames } from '../index-6ff23041.js';
7
+ import { e as popoverConfig, i as inputConfig } from '../configs-fed6ac34.js';
8
+ import { n as noop, s as stopEvent } from '../index-a0e4e333.js';
9
+ import useClick from '../hooks/useClick.js';
10
+ import useKeyDown from '../hooks/useKeyDown.js';
11
+ import useDeviceType from '../hooks/useDeviceType.js';
12
+ import PopoverV2 from '../PopoverV2/index.js';
13
+ import ExtendedInput from '../ExtendedInput/index.js';
14
+ import DatePicker from '../DatePicker/index.js';
15
+ import { g as getBrowserDateFormat } from '../localization-4ba17032.js';
16
+ import '../_commonjsHelpers-24198af3.js';
17
+ import 'react-dom';
18
+ import '../hooks/useWindowSize.js';
19
+ import '../jsx-runtime-57b40d9e.js';
20
+ import '../index-122432cd.js';
21
+ import '../hooks/useClickOutside.js';
22
+ import '../Scrollbar/index.js';
23
+ import '../GeneUIProvider/index.js';
24
+ import '../debounce-4419bc2f.js';
25
+ import '../hooks/useEllipsisDetection.js';
26
+ import '../Icon/index.js';
27
+ import '../SuggestionList/index.js';
28
+ import '../config-0ca92874.js';
29
+ import '../Tooltip/index.js';
30
+ import '../Popover-f4d1cac0.js';
31
+ import '../guid-8ddf77b3.js';
32
+ import '../Button/index.js';
16
33
 
17
- function useClick(callback) {
18
- const ref = useRef();
19
- const handleClick = useCallback(e => {
20
- if (ref.current && ref.current.contains(e.target)) {
21
- callback && callback(e);
22
- }
23
- }, [ref.current, callback]);
24
- useEffect(() => {
25
- document.addEventListener('mousedown', handleClick);
26
- return () => document.removeEventListener('mousedown', handleClick);
27
- }, [handleClick]);
28
- const setRef = node => ref.current = node;
29
- return setRef;
30
- }
31
-
32
- var css_248z = "[data-gene-ui-version=\"1.0.0\"] .mobile-date-ranges-holder{width:100%}[data-gene-ui-version=\"1.0.0\"] .md-range-title{font:600 1.6rem/2.2rem var(--font-family);margin:0 0 1.5rem;padding:0 1rem}[data-gene-ui-version=\"1.0.0\"] .default-cursor{cursor:default!important}[data-gene-ui-version=\"1.0.0\"] .mobile-date-ranges-picker{grid-column-gap:2rem;grid-row-gap:2rem;display:grid;grid-template-areas:\"m-start-date m-end-date\";grid-template-columns:repeat(2,calc(50% - 1rem));width:100%}[data-gene-ui-version=\"1.0.0\"] .mobile-date-ranges-picker.with-time{grid-template-areas:\"m-start-date m-start-time\" \"m-end-date m-end-time\";grid-template-columns:calc(55% - 1rem) calc(45% - 1rem)}[data-gene-ui-version=\"1.0.0\"] .mobile-date-ranges-picker .m-start-date{grid-area:m-start-date}[data-gene-ui-version=\"1.0.0\"] .mobile-date-ranges-picker .m-end-date{grid-area:m-end-date}[data-gene-ui-version=\"1.0.0\"] .mobile-date-ranges-picker .m-start-time{grid-area:m-start-time}[data-gene-ui-version=\"1.0.0\"] .mobile-date-ranges-picker .m-end-time{grid-area:m-end-time}[data-gene-ui-version=\"1.0.0\"] .mobile-date-ranges-picker i[class*=calendar],[data-gene-ui-version=\"1.0.0\"] .mobile-single-date-picker i[class*=calendar]{order:-2;pointer-events:none}[data-gene-ui-version=\"1.0.0\"] .mobile-date-ranges-picker i[class*=clear],[data-gene-ui-version=\"1.0.0\"] .mobile-single-date-picker i[class*=clear]{order:-1}[data-gene-ui-version=\"1.0.0\"] .date-input .input-structure>label{height:var(--input-element-height)}[data-gene-ui-version=\"1.0.0\"] .date-input .input-structure>.icon+label input{padding-inline:2rem 4.4rem}[data-gene-ui-version=\"1.0.0\"] .date-input .input-structure .input-element-relative{inset-inline-start:0;position:absolute;top:0;width:90%}[data-gene-ui-version=\"1.0.0\"] .date-input .input-structure .input-element-relative>input{padding-inline:2rem 1.5rem;padding-inline-end:2.4rem}[data-gene-ui-version=\"1.0.0\"] .date-input .input-structure .input-element-relative>.read-only{padding-inline:2rem 1.5rem}[data-gene-ui-version=\"1.0.0\"] .date-input i[class*=calendar]{order:-2}[data-gene-ui-version=\"1.0.0\"] .date-input i[class*=clear]{order:-1}[data-gene-ui-version=\"1.0.0\"] .mobile-date-ranges-picker .bc-icon-calendar,[data-gene-ui-version=\"1.0.0\"] .mobile-date-ranges-picker .bc-icon.clock,[data-gene-ui-version=\"1.0.0\"] .mobile-single-date-picker .bc-icon-calendar,[data-gene-ui-version=\"1.0.0\"] .mobile-single-date-picker .bc-icon.clock{pointer-events:none}[data-gene-ui-version=\"1.0.0\"] .clearable-date-picker input{width:85%}";
34
+ var css_248z = "[data-gene-ui-version=\"2.12.1\"] .mobile-date-ranges-holder{width:100%}[data-gene-ui-version=\"2.12.1\"] .md-range-title{font:600 1.6rem/2.2rem var(--font-family);margin:0 0 1.5rem;padding:0 1rem}[data-gene-ui-version=\"2.12.1\"] .default-cursor{cursor:default!important}[data-gene-ui-version=\"2.12.1\"] .mobile-date-ranges-picker{grid-column-gap:2rem;grid-row-gap:2rem;display:grid;grid-template-areas:\"m-start-date m-end-date\";grid-template-columns:repeat(2,calc(50% - 1rem));width:100%}[data-gene-ui-version=\"2.12.1\"] .mobile-date-ranges-picker.with-time{grid-template-areas:\"m-start-date m-start-time\" \"m-end-date m-end-time\";grid-template-columns:calc(55% - 1rem) calc(45% - 1rem)}[data-gene-ui-version=\"2.12.1\"] .mobile-date-ranges-picker .m-start-date{grid-area:m-start-date}[data-gene-ui-version=\"2.12.1\"] .mobile-date-ranges-picker .m-end-date{grid-area:m-end-date}[data-gene-ui-version=\"2.12.1\"] .mobile-date-ranges-picker .m-start-time{grid-area:m-start-time}[data-gene-ui-version=\"2.12.1\"] .mobile-date-ranges-picker .m-end-time{grid-area:m-end-time}[data-gene-ui-version=\"2.12.1\"] .mobile-date-ranges-picker i[class*=calendar],[data-gene-ui-version=\"2.12.1\"] .mobile-single-date-picker i[class*=calendar]{order:-2;pointer-events:none}[data-gene-ui-version=\"2.12.1\"] .mobile-date-ranges-picker i[class*=clear],[data-gene-ui-version=\"2.12.1\"] .mobile-single-date-picker i[class*=clear]{order:-1}[data-gene-ui-version=\"2.12.1\"] .date-input .input-structure>label{height:var(--input-element-height)}[data-gene-ui-version=\"2.12.1\"] .date-input .input-structure>.icon+label input{padding-inline:2rem 4.4rem}[data-gene-ui-version=\"2.12.1\"] .date-input .input-structure .input-element-relative{inset-inline-start:0;position:absolute;top:0;width:90%}[data-gene-ui-version=\"2.12.1\"] .date-input .input-structure .input-element-relative>input{padding-inline:2rem 1.5rem;padding-inline-end:2.4rem}[data-gene-ui-version=\"2.12.1\"] .date-input .input-structure .input-element-relative>.read-only{padding-inline:2rem 1.5rem}[data-gene-ui-version=\"2.12.1\"] .date-input i[class*=calendar]{order:-2}[data-gene-ui-version=\"2.12.1\"] .date-input i[class*=clear]{order:-1}[data-gene-ui-version=\"2.12.1\"] .mobile-date-ranges-picker .bc-icon-calendar,[data-gene-ui-version=\"2.12.1\"] .mobile-date-ranges-picker .bc-icon.clock,[data-gene-ui-version=\"2.12.1\"] .mobile-single-date-picker .bc-icon-calendar,[data-gene-ui-version=\"2.12.1\"] .mobile-single-date-picker .bc-icon.clock{pointer-events:none}[data-gene-ui-version=\"2.12.1\"] .clearable-date-picker input{width:85%}";
33
35
  styleInject(css_248z);
34
36
 
35
37
  const getLastValidValue$1 = (date, validFormat) => date && date.isValid() ? date.format(validFormat) : '';
@@ -80,6 +82,10 @@ function DatePickerInput(_ref) {
80
82
  const inputRef = useRef();
81
83
  const handleChange = useCallback(value => {
82
84
  const date = dayjsWithPlugins(value);
85
+ if (!withTime) {
86
+ setPopoverState(false);
87
+ inputRef.current.blur();
88
+ }
83
89
  setDate(date);
84
90
  onChange(date.toDate());
85
91
  setInputValue(date.format(validFormat));
@@ -116,6 +122,9 @@ function DatePickerInput(_ref) {
116
122
  }, [frozenDateRange, validFormat, onChange, required]);
117
123
  const checkDateInerval = useCallback(() => {
118
124
  let value = getLastValidValue$1(date, validFormat);
125
+ if (!value) {
126
+ return null;
127
+ }
119
128
  const minUnix = minDate && minDate.valueOf();
120
129
  const maxUnix = maxDate && maxDate.valueOf();
121
130
  const dateUnix = date && dayjs(date, validFormat).valueOf();
@@ -246,96 +255,96 @@ DatePickerInput.propTypes = {
246
255
  /**
247
256
  * Controls alignment of popover
248
257
  */
249
- popoverAlign: propTypesExports.oneOf(popoverConfig.align),
258
+ popoverAlign: PropTypes.oneOf(popoverConfig.align),
250
259
  /**
251
260
  * Controls flexibility of input element
252
261
  */
253
- flexibility: propTypesExports.oneOf(flexibility$1),
262
+ flexibility: PropTypes.oneOf(flexibility$1),
254
263
  /**
255
264
  * Controls appearance of input element
256
265
  */
257
- appearance: propTypesExports.oneOf(appearances$1),
266
+ appearance: PropTypes.oneOf(appearances$1),
258
267
  /**
259
268
  * Placeholder text for input
260
269
  */
261
- placeholder: propTypesExports.string,
270
+ placeholder: PropTypes.string,
262
271
  /**
263
272
  * Disables datepicker when input is focused
264
273
  */
265
- withoutPicker: propTypesExports.bool,
274
+ withoutPicker: PropTypes.bool,
266
275
  /**
267
276
  * Accepts same props as DatePicker component(organisms)
268
277
  */
269
- pickerProps: propTypesExports.object,
278
+ pickerProps: PropTypes.object,
270
279
  /**
271
280
  * Min specifies the minimum value allowed for datepicker
272
281
  */
273
- min: propTypesExports.oneOfType([propTypesExports.instanceOf(dayjsWithPlugins), propTypesExports.instanceOf(Date), propTypesExports.string, propTypesExports.number]),
282
+ min: PropTypes.oneOfType([PropTypes.instanceOf(dayjsWithPlugins), PropTypes.instanceOf(Date), PropTypes.string, PropTypes.number]),
274
283
  /**
275
284
  * Max specifies the maximum value allowed for datepicker
276
285
  */
277
- max: propTypesExports.oneOfType([propTypesExports.instanceOf(dayjsWithPlugins), propTypesExports.instanceOf(Date), propTypesExports.string, propTypesExports.number]),
286
+ max: PropTypes.oneOfType([PropTypes.instanceOf(dayjsWithPlugins), PropTypes.instanceOf(Date), PropTypes.string, PropTypes.number]),
278
287
  /**
279
288
  * The value of the input element, required for a controlled component.
280
289
  */
281
- value: propTypesExports.oneOfType([propTypesExports.instanceOf(dayjsWithPlugins), propTypesExports.instanceOf(Date), propTypesExports.string, propTypesExports.number]),
290
+ value: PropTypes.oneOfType([PropTypes.instanceOf(dayjsWithPlugins), PropTypes.instanceOf(Date), PropTypes.string, PropTypes.number]),
282
291
  /**
283
292
  * The CSS class name of the wrapper element.
284
293
  */
285
- className: propTypesExports.string,
294
+ className: PropTypes.string,
286
295
  /**
287
296
  * Controls input size
288
297
  */
289
- size: propTypesExports.oneOf(size$1),
298
+ size: PropTypes.oneOf(size$1),
290
299
  /**
291
300
  * Custom date format
292
301
  */
293
- format: propTypesExports.string,
302
+ format: PropTypes.string,
294
303
  /**
295
304
  * If true, the input element will be disabled.
296
305
  */
297
- disabled: propTypesExports.bool,
306
+ disabled: PropTypes.bool,
298
307
  /**
299
308
  * It prevents the user from changing the value of the field.
300
309
  */
301
- readOnly: propTypesExports.bool,
310
+ readOnly: PropTypes.bool,
302
311
  /**
303
312
  * If true, the input element will show icon which can reset selected date.
304
313
  */
305
- clearable: propTypesExports.bool,
314
+ clearable: PropTypes.bool,
306
315
  /**
307
316
  * Callback fired when the value is changed.
308
317
  * function(date: Date) => void
309
318
  */
310
- onChange: propTypesExports.func,
319
+ onChange: PropTypes.func,
311
320
  /**
312
321
  * Callback fired when the input looses focus.
313
322
  * function(e: Event) => void
314
323
  */
315
- onBlur: propTypesExports.func,
324
+ onBlur: PropTypes.func,
316
325
  /**
317
326
  * Callback fired when the input get focused.
318
327
  * function(e: Event) => void
319
328
  */
320
- onFocus: propTypesExports.func,
329
+ onFocus: PropTypes.func,
321
330
  /**
322
331
  * If false, the input will indicate an error.
323
332
  */
324
- isValid: propTypesExports.bool,
333
+ isValid: PropTypes.bool,
325
334
  /**
326
335
  * Title for input
327
336
  */
328
- title: propTypesExports.string,
337
+ title: PropTypes.string,
329
338
  /**
330
339
  * MarkedDate specifies the default mark date
331
340
  */
332
- markedDate: propTypesExports.oneOfType([propTypesExports.instanceOf(dayjs), propTypesExports.instanceOf(Date), propTypesExports.string, propTypesExports.number]),
341
+ markedDate: PropTypes.oneOfType([PropTypes.instanceOf(dayjs), PropTypes.instanceOf(Date), PropTypes.string, PropTypes.number]),
333
342
  /**
334
343
  * Prop is responsible for disabling selected range
335
344
  */
336
- frozenDateRange: propTypesExports.arrayOf(propTypesExports.shape({
337
- from: propTypesExports.oneOfType([propTypesExports.instanceOf(dayjs), propTypesExports.instanceOf(Date), propTypesExports.string, propTypesExports.number]).isRequired,
338
- to: propTypesExports.oneOfType([propTypesExports.instanceOf(dayjs), propTypesExports.instanceOf(Date), propTypesExports.string, propTypesExports.number]).isRequired
345
+ frozenDateRange: PropTypes.arrayOf(PropTypes.shape({
346
+ from: PropTypes.oneOfType([PropTypes.instanceOf(dayjs), PropTypes.instanceOf(Date), PropTypes.string, PropTypes.number]).isRequired,
347
+ to: PropTypes.oneOfType([PropTypes.instanceOf(dayjs), PropTypes.instanceOf(Date), PropTypes.string, PropTypes.number]).isRequired
339
348
  }))
340
349
  };
341
350
  DatePickerInput.defaultProps = {
@@ -466,10 +475,14 @@ function DateRangePickerInput(_ref) {
466
475
  const end = dayjsWithPlugins(endDate);
467
476
  setStartDate(start);
468
477
  setEndDate(end);
478
+ if (!withTime) {
479
+ inputRef.current.blur();
480
+ setPopoverState(false);
481
+ }
469
482
  setInputValue("".concat(start.format(validFormat)).concat(rangeSeparator).concat(end.format(validFormat)));
470
483
  onChange(value);
471
484
  }
472
- }, [validFormat, rangeSeparator, onChange]);
485
+ }, [validFormat, rangeSeparator, onChange, withTime]);
473
486
  const handleInputChange = useCallback(e => {
474
487
  var _value, _value2, _value3;
475
488
  let {
@@ -716,128 +729,128 @@ DateRangePickerInput.propTypes = {
716
729
  /**
717
730
  * Controls appearance of input element
718
731
  */
719
- appearance: propTypesExports.oneOf(appearances),
732
+ appearance: PropTypes.oneOf(appearances),
720
733
  /**
721
734
  * Placeholder text for input
722
735
  */
723
- placeholder: propTypesExports.string,
736
+ placeholder: PropTypes.string,
724
737
  /**
725
738
  * Title for input
726
739
  */
727
- title: propTypesExports.string,
740
+ title: PropTypes.string,
728
741
  /**
729
742
  * The CSS class name of the wrapper element.
730
743
  */
731
- className: propTypesExports.string,
744
+ className: PropTypes.string,
732
745
  /**
733
746
  * Custom date format
734
747
  */
735
- format: propTypesExports.string,
748
+ format: PropTypes.string,
736
749
  /**
737
750
  * Controls flexibility of input element
738
751
  */
739
- flexibility: propTypesExports.oneOf(flexibility),
752
+ flexibility: PropTypes.oneOf(flexibility),
740
753
  /**
741
754
  * Define range picker is with time or no.
742
755
  */
743
- withTime: propTypesExports.bool,
756
+ withTime: PropTypes.bool,
744
757
  /**
745
758
  * If true, the input element will show icon which can reset selected date.
746
759
  */
747
- clearable: propTypesExports.bool,
760
+ clearable: PropTypes.bool,
748
761
  /**
749
762
  * If true, the input element will be disabled.
750
763
  */
751
- disabled: propTypesExports.bool,
764
+ disabled: PropTypes.bool,
752
765
  /**
753
766
  * It prevents the user from changing the value of the field.
754
767
  */
755
- readOnly: propTypesExports.bool,
768
+ readOnly: PropTypes.bool,
756
769
  /**
757
770
  * Callback fired when the value is changed.
758
771
  * function([startDate: Date, endDate: Date) => void
759
772
  */
760
- onChange: propTypesExports.func,
773
+ onChange: PropTypes.func,
761
774
  /**
762
775
  * Callback fired when the input looses focus.
763
776
  * function(e: Event) => void
764
777
  */
765
- onBlur: propTypesExports.func,
778
+ onBlur: PropTypes.func,
766
779
  /**
767
780
  * Callback fired when the input get focused.
768
781
  * function(e: Event) => void
769
782
  */
770
- onFocus: propTypesExports.func,
783
+ onFocus: PropTypes.func,
771
784
  /**
772
785
  * The value of the input element, required for a controlled component.
773
786
  */
774
- value: propTypesExports.oneOfType([propTypesExports.arrayOf(propTypesExports.instanceOf(dayjsWithPlugins)), propTypesExports.arrayOf(propTypesExports.instanceOf(Date)), propTypesExports.arrayOf(propTypesExports.string), propTypesExports.arrayOf(propTypesExports.number)]),
787
+ value: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.instanceOf(dayjsWithPlugins)), PropTypes.arrayOf(PropTypes.instanceOf(Date)), PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.number)]),
775
788
  /**
776
789
  * If false, the input will indicate an error.
777
790
  */
778
- isValid: propTypesExports.bool,
791
+ isValid: PropTypes.bool,
779
792
  /**
780
793
  * Disables datepicker when input is focused
781
794
  */
782
- withoutPicker: propTypesExports.bool,
795
+ withoutPicker: PropTypes.bool,
783
796
  /**
784
797
  * Accepts same props as DatePicker component(organisms)
785
798
  */
786
- pickerProps: propTypesExports.object,
799
+ pickerProps: PropTypes.object,
787
800
  /**
788
801
  * Min specifies the minimum value allowed for datepicker
789
802
  */
790
- min: propTypesExports.oneOfType([propTypesExports.instanceOf(dayjsWithPlugins), propTypesExports.instanceOf(Date), propTypesExports.string, propTypesExports.number]),
803
+ min: PropTypes.oneOfType([PropTypes.instanceOf(dayjsWithPlugins), PropTypes.instanceOf(Date), PropTypes.string, PropTypes.number]),
791
804
  /**
792
805
  * Max specifies the maximum value allowed for datepicker
793
806
  */
794
- max: propTypesExports.oneOfType([propTypesExports.instanceOf(dayjsWithPlugins), propTypesExports.instanceOf(Date), propTypesExports.string, propTypesExports.number]),
807
+ max: PropTypes.oneOfType([PropTypes.instanceOf(dayjsWithPlugins), PropTypes.instanceOf(Date), PropTypes.string, PropTypes.number]),
795
808
  /**
796
809
  * Controls input size
797
810
  */
798
- size: propTypesExports.oneOf(size),
811
+ size: PropTypes.oneOf(size),
799
812
  /**
800
813
  * Controls alignment of popover
801
814
  */
802
- popoverAlign: propTypesExports.oneOf(popoverConfig.align),
815
+ popoverAlign: PropTypes.oneOf(popoverConfig.align),
803
816
  /**
804
817
  * Placeholder text for start date input, which is used in mobile version
805
818
  */
806
- startDatePlaceholder: propTypesExports.string,
819
+ startDatePlaceholder: PropTypes.string,
807
820
  /**
808
821
  * Placeholder text for end date input, which is used in mobile version
809
822
  */
810
- endDatePlaceholder: propTypesExports.string,
823
+ endDatePlaceholder: PropTypes.string,
811
824
  /**
812
825
  * Placeholder text for start time input, which is used in mobile version
813
826
  */
814
- startTimePlaceholder: propTypesExports.string,
827
+ startTimePlaceholder: PropTypes.string,
815
828
  /**
816
829
  * Placeholder text for end time input, which is used in mobile version
817
830
  */
818
- endTimePlaceholder: propTypesExports.string,
831
+ endTimePlaceholder: PropTypes.string,
819
832
  /**
820
833
  * Set default start time when date changed
821
834
  */
822
- defaultStartTime: propTypesExports.string,
835
+ defaultStartTime: PropTypes.string,
823
836
  /**
824
837
  * Set default end time when date changed
825
838
  */
826
- defaultEndTime: propTypesExports.string,
839
+ defaultEndTime: PropTypes.string,
827
840
  /**
828
841
  * Prop is responsible for add one second to end date time value in case of true parameter
829
842
  */
830
- isIncludeEndDateLastSecond: propTypesExports.bool,
843
+ isIncludeEndDateLastSecond: PropTypes.bool,
831
844
  /**
832
845
  * MarkedDate specifies the default mark date
833
846
  */
834
- markedDate: propTypesExports.oneOfType([propTypesExports.instanceOf(dayjs), propTypesExports.instanceOf(Date), propTypesExports.string, propTypesExports.number]),
847
+ markedDate: PropTypes.oneOfType([PropTypes.instanceOf(dayjs), PropTypes.instanceOf(Date), PropTypes.string, PropTypes.number]),
835
848
  /**
836
849
  * Prop is responsible for disabling selected range
837
850
  */
838
- frozenDateRange: propTypesExports.arrayOf(propTypesExports.shape({
839
- from: propTypesExports.oneOfType([propTypesExports.instanceOf(dayjs), propTypesExports.instanceOf(Date), propTypesExports.string, propTypesExports.number]).isRequired,
840
- to: propTypesExports.oneOfType([propTypesExports.instanceOf(dayjs), propTypesExports.instanceOf(Date), propTypesExports.string, propTypesExports.number]).isRequired
851
+ frozenDateRange: PropTypes.arrayOf(PropTypes.shape({
852
+ from: PropTypes.oneOfType([PropTypes.instanceOf(dayjs), PropTypes.instanceOf(Date), PropTypes.string, PropTypes.number]).isRequired,
853
+ to: PropTypes.oneOfType([PropTypes.instanceOf(dayjs), PropTypes.instanceOf(Date), PropTypes.string, PropTypes.number]).isRequired
841
854
  }))
842
855
  };
843
856
  DateRangePickerInput.defaultProps = {
@@ -862,6 +875,7 @@ DateRangePickerInput.defaultProps = {
862
875
  clearable: false
863
876
  };
864
877
 
878
+ // Styles
865
879
  DatePickerInput.WithRange = DateRangePickerInput;
866
880
 
867
- export { DatePickerInput as D, useClick as u };
881
+ export { DatePickerInput as default };
@@ -1,11 +1,10 @@
1
- import { _ as _extends } from './_rollupPluginBabelHelpers-e8fb2e5c.js';
1
+ import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
2
2
  import React__default, { useMemo } from 'react';
3
- import { p as propTypesExports } from './index-e0af0caf.js';
4
- import { c as classnames } from './index-6ff23041.js';
5
- import './globalStyling-9c60a159.js';
6
- import { s as styleInject } from './style-inject.es-746bb8ed.js';
3
+ import PropTypes from 'prop-types';
4
+ import { c as classnames } from '../index-6ff23041.js';
5
+ import { s as styleInject } from '../style-inject.es-746bb8ed.js';
7
6
 
8
- var css_248z = "[data-gene-ui-version=\"1.0.0\"] .divider{background:rgba(var(--background-sc-rgb),.05);height:2.6rem;width:1px}[data-gene-ui-version=\"1.0.0\"] .divider:not(.divider-withNoSpace){margin:0 1.5rem}[data-gene-ui-version=\"1.0.0\"] .divider:not(.divider-withNoSpace).type-horizontal{margin:1.5rem 0}[data-gene-ui-version=\"1.0.0\"] .divider.type-horizontal{height:1px;width:2.6rem}[data-gene-ui-version=\"1.0.0\"] .divider.type-horizontal.full-width{width:100%}";
7
+ var css_248z = "[data-gene-ui-version=\"2.12.1\"] .divider{background:rgba(var(--background-sc-rgb),.05);height:2.6rem;width:1px}[data-gene-ui-version=\"2.12.1\"] .divider:not(.divider-withNoSpace){margin:0 1.5rem}[data-gene-ui-version=\"2.12.1\"] .divider:not(.divider-withNoSpace).type-horizontal{margin:1.5rem 0}[data-gene-ui-version=\"2.12.1\"] .divider.type-horizontal{height:1px;width:2.6rem}[data-gene-ui-version=\"2.12.1\"] .divider.type-horizontal.full-width{width:100%}";
9
8
  styleInject(css_248z);
10
9
 
11
10
  function Divider(_ref) {
@@ -33,19 +32,19 @@ Divider.propTypes = {
33
32
  /**
34
33
  * Divider direction
35
34
  */
36
- type: propTypesExports.oneOf(['horizontal', 'vertical']),
35
+ type: PropTypes.oneOf(['horizontal', 'vertical']),
37
36
  /**
38
37
  * Divider additional className
39
38
  */
40
- className: propTypesExports.string,
39
+ className: PropTypes.string,
41
40
  /**
42
41
  * Divider size will be applied to height(when "type" is set to "vertical") or to width(when "type" is set to "horizontal")
43
42
  */
44
- size: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.number]),
43
+ size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
45
44
  /**
46
45
  * withSpace by default true. If you want to remove the divider`s spacing, switch to false
47
46
  */
48
- withSpace: propTypesExports.bool
47
+ withSpace: PropTypes.bool
49
48
  };
50
49
  Divider.defaultProps = {
51
50
  type: 'vertical',
@@ -1,24 +1,23 @@
1
1
  import React__default, { useRef, useState, useEffect, useCallback, useMemo, Fragment } from 'react';
2
- import { p as propTypesExports } from './index-e0af0caf.js';
3
- import { c as clsx } from './clsx.m-2bb6df4b.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 Tooltip from './Tooltip.js';
9
- import { s as styleInject } from './style-inject.es-746bb8ed.js';
10
- import './dateValidation-67caec66.js';
11
- import './_commonjsHelpers-24198af3.js';
2
+ import PropTypes from 'prop-types';
3
+ import { c as clsx } from '../clsx.m-2bb6df4b.js';
4
+ import { n as noop } from '../index-a0e4e333.js';
5
+ import '../configs-fed6ac34.js';
6
+ import useClickOutside from '../hooks/useClickOutside.js';
7
+ import Icon from '../Icon/index.js';
8
+ import Tooltip from '../Tooltip/index.js';
9
+ import { s as styleInject } from '../style-inject.es-746bb8ed.js';
10
+ import '../dateValidation-67caec66.js';
11
+ import '../_commonjsHelpers-24198af3.js';
12
12
  import 'react-dom';
13
- import './_rollupPluginBabelHelpers-e8fb2e5c.js';
14
- import './index-6ff23041.js';
15
- import './globalStyling-9c60a159.js';
16
- import './Popover-f4d1cac0.js';
17
- import './useDeviceType-dd51db38.js';
18
- import './useWindowSize-80369d76.js';
19
- import './GeneUIProvider.js';
13
+ import '../_rollupPluginBabelHelpers-e8fb2e5c.js';
14
+ import '../index-6ff23041.js';
15
+ import '../Popover-f4d1cac0.js';
16
+ import '../hooks/useDeviceType.js';
17
+ import '../hooks/useWindowSize.js';
18
+ import '../GeneUIProvider/index.js';
20
19
 
21
- var css_248z = "[data-gene-ui-version=\"1.0.0\"] .bc-drawer{--width:7.2rem;--head-justify:center;--item-width:4.2rem;--item-padding:0;--item-justify:center;--item-title-display:none;--item-icon-margin:0;background:var(--background);border-right:1px solid rgba(var(--background-sc-rgb),.1);left:0;overflow:hidden;top:0;transition:width .15s cubic-bezier(.4,0,.2,1);width:var(--width);z-index:200}[data-gene-ui-version=\"1.0.0\"] .bc-drawer.open{--width:30rem;--head-justify:space-between;--item-width:100%;--item-padding:0 14px;--item-justify:flex-start;--item-title-display:block;--item-icon-margin:17px}[data-gene-ui-version=\"1.0.0\"] .bc-drawer.open .bc-drawer-head:after{background-color:#1473e6;bottom:0;content:\"\";height:3px;left:20px;margin:17px 198px 0 0;position:absolute;width:34px}[data-gene-ui-version=\"1.0.0\"] .bc-drawer .bc-drawer-head{align-items:center;border-bottom:1px solid rgba(var(--background-sc-rgb),.1);display:flex;height:64px;justify-content:var(--head-justify);padding:20px;position:relative;width:var(--width)}[data-gene-ui-version=\"1.0.0\"] .bc-drawer .bc-drawer-head .bc-drawer-head-title{font-size:16px;font-weight:600}[data-gene-ui-version=\"1.0.0\"] .bc-drawer .bc-drawer-head .bc-drawer-head-icon{cursor:pointer}[data-gene-ui-version=\"1.0.0\"] .bc-drawer .bc-drawer-head .bc-drawer-head-icon:hover{color:#1473e6}[data-gene-ui-version=\"1.0.0\"] .bc-drawer .bc-drawer-content{display:flex;flex-direction:column;height:calc(100% - 64px);overflow-x:hidden;overflow-y:auto;padding:10px 12px;width:var(--width)}[data-gene-ui-version=\"1.0.0\"] .bc-drawer .bc-drawer-item{align-items:center;border-radius:21px;cursor:pointer;display:flex;height:42px;justify-content:var(--item-justify);min-height:42px;overflow:hidden;padding:var(--item-padding);position:relative;transition:width .15s cubic-bezier(.4,0,.2,1);transition:color .3s,background .3s,opacity .2s;width:var(--item-width)}[data-gene-ui-version=\"1.0.0\"] .bc-drawer .bc-drawer-item:hover{background-color:#00000008}[data-gene-ui-version=\"1.0.0\"] .bc-drawer .bc-drawer-item.disabled{opacity:.5;pointer-events:none}[data-gene-ui-version=\"1.0.0\"] .bc-drawer .bc-drawer-item.active:not(.nested){background-color:#1473e6;color:#fff}[data-gene-ui-version=\"1.0.0\"] .bc-drawer .bc-drawer-item.active.nested{background-color:#1473e608;color:#1473e6}[data-gene-ui-version=\"1.0.0\"] .bc-drawer .bc-drawer-item.nested{padding-left:57px}[data-gene-ui-version=\"1.0.0\"] .bc-drawer .bc-drawer-item .bc-drawer-item-icon{margin-right:var(--item-icon-margin)}[data-gene-ui-version=\"1.0.0\"] .bc-drawer .bc-drawer-item .bc-drawer-item-title{display:var(--item-title-display);font-weight:600}[data-gene-ui-version=\"1.0.0\"] .bc-drawer .bc-drawer-item .bc-drawer-item-arrow{position:absolute;right:17px;transition:.15s cubic-bezier(.4,0,.2,1)}[data-gene-ui-version=\"1.0.0\"] .bc-drawer .bc-drawer-item .bc-drawer-item-arrow.open{transform:rotate(-180deg)}[data-gene-ui-version=\"1.0.0\"] .bc-drawer .bc-drawer-item-nested-list{max-height:0;overflow:hidden;transition:.15s cubic-bezier(.4,0,.2,1);width:100%}[data-gene-ui-version=\"1.0.0\"] .bc-drawer .bc-drawer-item-nested-list.open{max-height:100%}";
20
+ var css_248z = "[data-gene-ui-version=\"2.12.1\"] .bc-drawer{--width:7.2rem;--head-justify:center;--item-width:4.2rem;--item-padding:0;--item-justify:center;--item-title-display:none;--item-icon-margin:0;background:var(--background);border-right:1px solid rgba(var(--background-sc-rgb),.1);left:0;overflow:hidden;top:0;transition:width .15s cubic-bezier(.4,0,.2,1);width:var(--width);z-index:200}[data-gene-ui-version=\"2.12.1\"] .bc-drawer.open{--width:30rem;--head-justify:space-between;--item-width:100%;--item-padding:0 14px;--item-justify:flex-start;--item-title-display:block;--item-icon-margin:17px}[data-gene-ui-version=\"2.12.1\"] .bc-drawer.open .bc-drawer-head:after{background-color:#1473e6;bottom:0;content:\"\";height:3px;left:20px;margin:17px 198px 0 0;position:absolute;width:34px}[data-gene-ui-version=\"2.12.1\"] .bc-drawer .bc-drawer-head{align-items:center;border-bottom:1px solid rgba(var(--background-sc-rgb),.1);display:flex;height:64px;justify-content:var(--head-justify);padding:20px;position:relative;width:var(--width)}[data-gene-ui-version=\"2.12.1\"] .bc-drawer .bc-drawer-head .bc-drawer-head-title{font-size:16px;font-weight:600}[data-gene-ui-version=\"2.12.1\"] .bc-drawer .bc-drawer-head .bc-drawer-head-icon{cursor:pointer}[data-gene-ui-version=\"2.12.1\"] .bc-drawer .bc-drawer-head .bc-drawer-head-icon:hover{color:#1473e6}[data-gene-ui-version=\"2.12.1\"] .bc-drawer .bc-drawer-content{display:flex;flex-direction:column;height:calc(100% - 64px);overflow-x:hidden;overflow-y:auto;padding:10px 12px;width:var(--width)}[data-gene-ui-version=\"2.12.1\"] .bc-drawer .bc-drawer-item{align-items:center;border-radius:21px;cursor:pointer;display:flex;height:42px;justify-content:var(--item-justify);min-height:42px;overflow:hidden;padding:var(--item-padding);position:relative;transition:width .15s cubic-bezier(.4,0,.2,1);transition:color .3s,background .3s,opacity .2s;width:var(--item-width)}[data-gene-ui-version=\"2.12.1\"] .bc-drawer .bc-drawer-item:hover{background-color:#00000008}[data-gene-ui-version=\"2.12.1\"] .bc-drawer .bc-drawer-item.disabled{opacity:.5;pointer-events:none}[data-gene-ui-version=\"2.12.1\"] .bc-drawer .bc-drawer-item.active:not(.nested){background-color:#1473e6;color:#fff}[data-gene-ui-version=\"2.12.1\"] .bc-drawer .bc-drawer-item.active.nested{background-color:#1473e608;color:#1473e6}[data-gene-ui-version=\"2.12.1\"] .bc-drawer .bc-drawer-item.nested{padding-left:57px}[data-gene-ui-version=\"2.12.1\"] .bc-drawer .bc-drawer-item .bc-drawer-item-icon{margin-right:var(--item-icon-margin)}[data-gene-ui-version=\"2.12.1\"] .bc-drawer .bc-drawer-item .bc-drawer-item-title{display:var(--item-title-display);font-weight:600}[data-gene-ui-version=\"2.12.1\"] .bc-drawer .bc-drawer-item .bc-drawer-item-arrow{position:absolute;right:17px;transition:.15s cubic-bezier(.4,0,.2,1)}[data-gene-ui-version=\"2.12.1\"] .bc-drawer .bc-drawer-item .bc-drawer-item-arrow.open{transform:rotate(-180deg)}[data-gene-ui-version=\"2.12.1\"] .bc-drawer .bc-drawer-item-nested-list{max-height:0;overflow:hidden;transition:.15s cubic-bezier(.4,0,.2,1);width:100%}[data-gene-ui-version=\"2.12.1\"] .bc-drawer .bc-drawer-item-nested-list.open{max-height:100%}";
22
21
  styleInject(css_248z);
23
22
 
24
23
  function Drawer(_ref) {
@@ -179,33 +178,33 @@ Drawer.propTypes = {
179
178
  /**
180
179
  * Date for display the menu
181
180
  */
182
- menu: propTypesExports.arrayOf(propTypesExports.shape({
183
- title: propTypesExports.string,
184
- icon: propTypesExports.string,
185
- id: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.number]),
186
- disabled: propTypesExports.bool,
187
- nested: propTypesExports.arrayOf(propTypesExports.shape({
188
- title: propTypesExports.string,
189
- id: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.number]),
190
- disabled: propTypesExports.bool
181
+ menu: PropTypes.arrayOf(PropTypes.shape({
182
+ title: PropTypes.string,
183
+ icon: PropTypes.string,
184
+ id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
185
+ disabled: PropTypes.bool,
186
+ nested: PropTypes.arrayOf(PropTypes.shape({
187
+ title: PropTypes.string,
188
+ id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
189
+ disabled: PropTypes.bool
191
190
  }))
192
191
  })),
193
192
  /**
194
193
  * If you want to control the selected item in the menu, you must date id of one of the 'menu' items.
195
194
  */
196
- value: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.number]),
195
+ value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
197
196
  /**
198
197
  * If you want not to control the menu from the top but have a default value, you can send it using defaultValue
199
198
  */
200
- defaultValue: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.number]),
199
+ defaultValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
201
200
  /**
202
201
  * Label is displayed at the top in the driver
203
202
  */
204
- title: propTypesExports.string,
203
+ title: PropTypes.string,
205
204
  /**
206
205
  * Override or extend the className applied to the component.
207
206
  */
208
- className: propTypesExports.string,
207
+ className: PropTypes.string,
209
208
  /**
210
209
  * Callback fired when a menu item is selected.
211
210
  Signature:
@@ -213,52 +212,52 @@ Drawer.propTypes = {
213
212
  item: Item is the element that was select from the menu
214
213
  nested: If you select an item from the submenu, it will be sent as the second argument, and the first will be the item of its parent.
215
214
  */
216
- onChange: propTypesExports.func,
215
+ onChange: PropTypes.func,
217
216
  /**
218
217
  * Callback fired when a drawer is opened.
219
218
  Signature:
220
219
  function(event: object) => void
221
220
  event: The event source of the callback.
222
221
  */
223
- onOpen: propTypesExports.func,
222
+ onOpen: PropTypes.func,
224
223
  /**
225
224
  * Callback fired when a drawer is closed.
226
225
  Signature:
227
226
  function(event: object) => void
228
227
  event: The event source of the callback.
229
228
  */
230
- onClose: propTypesExports.func,
229
+ onClose: PropTypes.func,
231
230
  /**
232
231
  * If true, the component is shown by default.
233
232
  */
234
- defaultOpen: propTypesExports.bool,
233
+ defaultOpen: PropTypes.bool,
235
234
  /**
236
235
  * Height for the component
237
236
  by default: 100vh
238
237
  */
239
- height: propTypesExports.string,
238
+ height: PropTypes.string,
240
239
  /**
241
240
  * The positioning type. The behavior of the different options is described in the MDN web docs.
242
241
  'absolute' | 'fixed' | 'relative' | 'static' | 'sticky'
243
242
  */
244
- position: propTypesExports.string,
243
+ position: PropTypes.string,
245
244
  /**
246
245
  * With this prop you can control Drawer opening and closing from parent component
247
246
  */
248
- isOpen: propTypesExports.bool,
247
+ isOpen: PropTypes.bool,
249
248
  /**
250
249
  * Drawer to close after item select
251
250
  */
252
- closeAfterSelect: propTypesExports.bool,
251
+ closeAfterSelect: PropTypes.bool,
253
252
  /**
254
253
  * Closes when click outside
255
254
  */
256
- closeWithOutsideClick: propTypesExports.bool,
255
+ closeWithOutsideClick: PropTypes.bool,
257
256
  /**
258
257
  * Callback fired when a outside click.
259
258
  * (event: MouseEvent) => void.
260
259
  */
261
- onOutsideClick: propTypesExports.func
260
+ onOutsideClick: PropTypes.func
262
261
  };
263
262
 
264
263
  export { Drawer as default };