@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
@@ -1,35 +1,36 @@
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 { P as PopoverV2 } from '../index-462461c0.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 '../index-122432cd.js';
20
+ import '../hooks/useClickOutside.js';
21
+ import '../Scrollbar/index.js';
22
+ import '../GeneUIProvider/index.js';
23
+ import '../debounce-4419bc2f.js';
24
+ import '../hooks/useEllipsisDetection.js';
25
+ import '../Icon/index.js';
26
+ import '../SuggestionList/index.js';
27
+ import '../config-0ca92874.js';
28
+ import '../Tooltip/index.js';
29
+ import '../Popover-f4d1cac0.js';
30
+ import '../guid-8ddf77b3.js';
31
+ import '../Button/index.js';
16
32
 
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%}";
33
+ var css_248z = "[data-gene-ui-version=\"2.12.2\"] .mobile-date-ranges-holder{width:100%}[data-gene-ui-version=\"2.12.2\"] .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.2\"] .default-cursor{cursor:default!important}[data-gene-ui-version=\"2.12.2\"] .text-cursor{cursor:text}[data-gene-ui-version=\"2.12.2\"] .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.2\"] .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.2\"] .mobile-date-ranges-picker .m-start-date{grid-area:m-start-date}[data-gene-ui-version=\"2.12.2\"] .mobile-date-ranges-picker .m-end-date{grid-area:m-end-date}[data-gene-ui-version=\"2.12.2\"] .mobile-date-ranges-picker .m-start-time{grid-area:m-start-time}[data-gene-ui-version=\"2.12.2\"] .mobile-date-ranges-picker .m-end-time{grid-area:m-end-time}[data-gene-ui-version=\"2.12.2\"] .mobile-date-ranges-picker i[class*=calendar],[data-gene-ui-version=\"2.12.2\"] .mobile-single-date-picker i[class*=calendar]{order:-2;pointer-events:none}[data-gene-ui-version=\"2.12.2\"] .mobile-date-ranges-picker i[class*=clear],[data-gene-ui-version=\"2.12.2\"] .mobile-single-date-picker i[class*=clear]{order:-1}[data-gene-ui-version=\"2.12.2\"] .date-input .input-structure>label{height:var(--input-element-height)}[data-gene-ui-version=\"2.12.2\"] .date-input .input-structure>.icon+label input{padding-inline:2rem 4.4rem}[data-gene-ui-version=\"2.12.2\"] .date-input .input-structure .input-element-relative{left:0;position:absolute;width:100%}[data-gene-ui-version=\"2.12.2\"] .date-input .input-structure .input-element-relative>input{padding-inline:2rem 1.5rem;padding-inline-end:6.4rem}[data-gene-ui-version=\"2.12.2\"] .date-input .input-structure .input-element-relative>.read-only{padding-inline:2rem 1.5rem}[data-gene-ui-version=\"2.12.2\"] .date-input i[class*=calendar]{order:-2}[data-gene-ui-version=\"2.12.2\"] .date-input i[class*=clear]{order:-1}[data-gene-ui-version=\"2.12.2\"] .mobile-date-ranges-picker .bc-icon-calendar,[data-gene-ui-version=\"2.12.2\"] .mobile-date-ranges-picker .bc-icon.clock,[data-gene-ui-version=\"2.12.2\"] .mobile-single-date-picker .bc-icon-calendar,[data-gene-ui-version=\"2.12.2\"] .mobile-single-date-picker .bc-icon.clock{pointer-events:none}";
33
34
  styleInject(css_248z);
34
35
 
35
36
  const getLastValidValue$1 = (date, validFormat) => date && date.isValid() ? date.format(validFormat) : '';
@@ -80,6 +81,10 @@ function DatePickerInput(_ref) {
80
81
  const inputRef = useRef();
81
82
  const handleChange = useCallback(value => {
82
83
  const date = dayjsWithPlugins(value);
84
+ if (!withTime) {
85
+ setPopoverState(false);
86
+ inputRef.current.blur();
87
+ }
83
88
  setDate(date);
84
89
  onChange(date.toDate());
85
90
  setInputValue(date.format(validFormat));
@@ -116,6 +121,9 @@ function DatePickerInput(_ref) {
116
121
  }, [frozenDateRange, validFormat, onChange, required]);
117
122
  const checkDateInerval = useCallback(() => {
118
123
  let value = getLastValidValue$1(date, validFormat);
124
+ if (!value) {
125
+ return null;
126
+ }
119
127
  const minUnix = minDate && minDate.valueOf();
120
128
  const maxUnix = maxDate && maxDate.valueOf();
121
129
  const dateUnix = date && dayjs(date, validFormat).valueOf();
@@ -144,10 +152,10 @@ function DatePickerInput(_ref) {
144
152
  const handleIconClick = useCallback((e, isBlurInitiatorCalendarIcon) => {
145
153
  e.stopPropagation();
146
154
  e.preventDefault();
147
- if (!popoverOpened && !isBlurInitiatorCalendarIcon) {
155
+ if (!popoverOpened && !isBlurInitiatorCalendarIcon || withoutPicker) {
148
156
  inputRef.current.focus();
149
157
  }
150
- }, [popoverOpened]);
158
+ }, [popoverOpened, withoutPicker]);
151
159
  useEffect(() => {
152
160
  const date = dayjsWithPlugins(value);
153
161
  if (value) {
@@ -219,8 +227,7 @@ function DatePickerInput(_ref) {
219
227
  className: readOnly ? 'pointer-events-none' : ''
220
228
  }, pickerProps, {
221
229
  markedDate: markedDate,
222
- frozenDateRange: frozenDateRange,
223
- autocomplete: "off"
230
+ frozenDateRange: frozenDateRange
224
231
  }))
225
232
  }, /*#__PURE__*/React__default.createElement(ExtendedInput, _extends({
226
233
  clickableIcon: true,
@@ -232,8 +239,9 @@ function DatePickerInput(_ref) {
232
239
  onChange: handleInputChange,
233
240
  icon: readOnly ? '' : 'bc-icon-calendar',
234
241
  className: classnames(className, 'date-input', {
235
- 'default-cursor': readOnly,
236
- 'clearable-date-picker': clearable
242
+ 'default-cursor': readOnly || disabled,
243
+ 'clearable-date-picker': clearable,
244
+ 'text-cursor': withoutPicker
237
245
  })
238
246
  }, sharedProps)));
239
247
  }
@@ -246,96 +254,96 @@ DatePickerInput.propTypes = {
246
254
  /**
247
255
  * Controls alignment of popover
248
256
  */
249
- popoverAlign: propTypesExports.oneOf(popoverConfig.align),
257
+ popoverAlign: PropTypes.oneOf(popoverConfig.align),
250
258
  /**
251
259
  * Controls flexibility of input element
252
260
  */
253
- flexibility: propTypesExports.oneOf(flexibility$1),
261
+ flexibility: PropTypes.oneOf(flexibility$1),
254
262
  /**
255
263
  * Controls appearance of input element
256
264
  */
257
- appearance: propTypesExports.oneOf(appearances$1),
265
+ appearance: PropTypes.oneOf(appearances$1),
258
266
  /**
259
267
  * Placeholder text for input
260
268
  */
261
- placeholder: propTypesExports.string,
269
+ placeholder: PropTypes.string,
262
270
  /**
263
271
  * Disables datepicker when input is focused
264
272
  */
265
- withoutPicker: propTypesExports.bool,
273
+ withoutPicker: PropTypes.bool,
266
274
  /**
267
275
  * Accepts same props as DatePicker component(organisms)
268
276
  */
269
- pickerProps: propTypesExports.object,
277
+ pickerProps: PropTypes.object,
270
278
  /**
271
279
  * Min specifies the minimum value allowed for datepicker
272
280
  */
273
- min: propTypesExports.oneOfType([propTypesExports.instanceOf(dayjsWithPlugins), propTypesExports.instanceOf(Date), propTypesExports.string, propTypesExports.number]),
281
+ min: PropTypes.oneOfType([PropTypes.instanceOf(dayjsWithPlugins), PropTypes.instanceOf(Date), PropTypes.string, PropTypes.number]),
274
282
  /**
275
283
  * Max specifies the maximum value allowed for datepicker
276
284
  */
277
- max: propTypesExports.oneOfType([propTypesExports.instanceOf(dayjsWithPlugins), propTypesExports.instanceOf(Date), propTypesExports.string, propTypesExports.number]),
285
+ max: PropTypes.oneOfType([PropTypes.instanceOf(dayjsWithPlugins), PropTypes.instanceOf(Date), PropTypes.string, PropTypes.number]),
278
286
  /**
279
287
  * The value of the input element, required for a controlled component.
280
288
  */
281
- value: propTypesExports.oneOfType([propTypesExports.instanceOf(dayjsWithPlugins), propTypesExports.instanceOf(Date), propTypesExports.string, propTypesExports.number]),
289
+ value: PropTypes.oneOfType([PropTypes.instanceOf(dayjsWithPlugins), PropTypes.instanceOf(Date), PropTypes.string, PropTypes.number]),
282
290
  /**
283
291
  * The CSS class name of the wrapper element.
284
292
  */
285
- className: propTypesExports.string,
293
+ className: PropTypes.string,
286
294
  /**
287
295
  * Controls input size
288
296
  */
289
- size: propTypesExports.oneOf(size$1),
297
+ size: PropTypes.oneOf(size$1),
290
298
  /**
291
299
  * Custom date format
292
300
  */
293
- format: propTypesExports.string,
301
+ format: PropTypes.string,
294
302
  /**
295
303
  * If true, the input element will be disabled.
296
304
  */
297
- disabled: propTypesExports.bool,
305
+ disabled: PropTypes.bool,
298
306
  /**
299
307
  * It prevents the user from changing the value of the field.
300
308
  */
301
- readOnly: propTypesExports.bool,
309
+ readOnly: PropTypes.bool,
302
310
  /**
303
311
  * If true, the input element will show icon which can reset selected date.
304
312
  */
305
- clearable: propTypesExports.bool,
313
+ clearable: PropTypes.bool,
306
314
  /**
307
315
  * Callback fired when the value is changed.
308
316
  * function(date: Date) => void
309
317
  */
310
- onChange: propTypesExports.func,
318
+ onChange: PropTypes.func,
311
319
  /**
312
320
  * Callback fired when the input looses focus.
313
321
  * function(e: Event) => void
314
322
  */
315
- onBlur: propTypesExports.func,
323
+ onBlur: PropTypes.func,
316
324
  /**
317
325
  * Callback fired when the input get focused.
318
326
  * function(e: Event) => void
319
327
  */
320
- onFocus: propTypesExports.func,
328
+ onFocus: PropTypes.func,
321
329
  /**
322
330
  * If false, the input will indicate an error.
323
331
  */
324
- isValid: propTypesExports.bool,
332
+ isValid: PropTypes.bool,
325
333
  /**
326
334
  * Title for input
327
335
  */
328
- title: propTypesExports.string,
336
+ title: PropTypes.string,
329
337
  /**
330
338
  * MarkedDate specifies the default mark date
331
339
  */
332
- markedDate: propTypesExports.oneOfType([propTypesExports.instanceOf(dayjs), propTypesExports.instanceOf(Date), propTypesExports.string, propTypesExports.number]),
340
+ markedDate: PropTypes.oneOfType([PropTypes.instanceOf(dayjs), PropTypes.instanceOf(Date), PropTypes.string, PropTypes.number]),
333
341
  /**
334
342
  * Prop is responsible for disabling selected range
335
343
  */
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
344
+ frozenDateRange: PropTypes.arrayOf(PropTypes.shape({
345
+ from: PropTypes.oneOfType([PropTypes.instanceOf(dayjs), PropTypes.instanceOf(Date), PropTypes.string, PropTypes.number]).isRequired,
346
+ to: PropTypes.oneOfType([PropTypes.instanceOf(dayjs), PropTypes.instanceOf(Date), PropTypes.string, PropTypes.number]).isRequired
339
347
  }))
340
348
  };
341
349
  DatePickerInput.defaultProps = {
@@ -466,10 +474,14 @@ function DateRangePickerInput(_ref) {
466
474
  const end = dayjsWithPlugins(endDate);
467
475
  setStartDate(start);
468
476
  setEndDate(end);
477
+ if (!withTime) {
478
+ inputRef.current.blur();
479
+ setPopoverState(false);
480
+ }
469
481
  setInputValue("".concat(start.format(validFormat)).concat(rangeSeparator).concat(end.format(validFormat)));
470
482
  onChange(value);
471
483
  }
472
- }, [validFormat, rangeSeparator, onChange]);
484
+ }, [validFormat, rangeSeparator, onChange, withTime]);
473
485
  const handleInputChange = useCallback(e => {
474
486
  var _value, _value2, _value3;
475
487
  let {
@@ -569,10 +581,10 @@ function DateRangePickerInput(_ref) {
569
581
  const handleIconClick = useCallback((e, isBlurInitiatorCalendarIcon) => {
570
582
  e.stopPropagation();
571
583
  e.preventDefault();
572
- if (!popoverOpened && !isBlurInitiatorCalendarIcon) {
584
+ if (!popoverOpened && !isBlurInitiatorCalendarIcon || withoutPicker) {
573
585
  inputRef.current.focus();
574
586
  }
575
- }, [popoverOpened]);
587
+ }, [popoverOpened, withoutPicker]);
576
588
  useEffect(() => {
577
589
  const [first, second] = value;
578
590
  const startDate = dayjsWithPlugins(first);
@@ -701,10 +713,11 @@ function DateRangePickerInput(_ref) {
701
713
  icon: readOnly ? '' : 'bc-icon-calendar',
702
714
  onIconClick: handleIconClick,
703
715
  className: classnames(className, 'date-input', {
704
- 'default-cursor': readOnly,
705
- 'clearable-date-picker': clearable
716
+ 'default-cursor': readOnly || disabled,
717
+ 'clearable-date-picker': clearable,
718
+ 'text-cursor': withoutPicker
706
719
  }),
707
- autoComplete: "off"
720
+ autocomplete: "off"
708
721
  }, sharedProps)));
709
722
  }
710
723
  const {
@@ -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.2\"] .divider{background:rgba(var(--background-sc-rgb),.05);height:2.6rem;width:1px}[data-gene-ui-version=\"2.12.2\"] .divider:not(.divider-withNoSpace){margin:0 1.5rem}[data-gene-ui-version=\"2.12.2\"] .divider:not(.divider-withNoSpace).type-horizontal{margin:1.5rem 0}[data-gene-ui-version=\"2.12.2\"] .divider.type-horizontal{height:1px;width:2.6rem}[data-gene-ui-version=\"2.12.2\"] .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',