@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,19 +1,18 @@
1
- import { _ as _extends } from './_rollupPluginBabelHelpers-e8fb2e5c.js';
1
+ import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
2
2
  import React__default, { forwardRef, useState, useCallback, useEffect } from 'react';
3
- import { p as propTypesExports } from './index-e0af0caf.js';
4
- import { n as noop } from './index-ac59cb10.js';
5
- import { u as useMount } from './useMount-6fef51a5.js';
6
- import './configs-91c86664.js';
7
- import Switcher from './Switcher.js';
8
- import './dateValidation-67caec66.js';
9
- import './_commonjsHelpers-24198af3.js';
3
+ import PropTypes from 'prop-types';
4
+ import { n as noop } from '../index-a0e4e333.js';
5
+ import useMount from '../hooks/useMount.js';
6
+ import '../configs-fed6ac34.js';
7
+ import Switcher from '../Switcher/index.js';
8
+ import '../dateValidation-67caec66.js';
9
+ import '../_commonjsHelpers-24198af3.js';
10
10
  import 'react-dom';
11
- import './index-6ff23041.js';
12
- import './useKeyDown-38102ae7.js';
13
- import './globalStyling-9c60a159.js';
14
- import './style-inject.es-746bb8ed.js';
15
- import './checkboxRadioSwitcher-5b69d7bd.js';
16
- import './guid-8ddf77b3.js';
11
+ import '../index-6ff23041.js';
12
+ import '../hooks/useKeyDown.js';
13
+ import '../checkboxRadioSwitcher-5b69d7bd.js';
14
+ import '../style-inject.es-746bb8ed.js';
15
+ import '../guid-8ddf77b3.js';
17
16
 
18
17
  function checkValidation(value, required, isValid) {
19
18
  if (required && !value) return {
@@ -78,12 +77,12 @@ const SwitcherElement = /*#__PURE__*/forwardRef((props, ref) => {
78
77
  }, restProps));
79
78
  });
80
79
  SwitcherElement.propTypes = {
81
- onChange: propTypesExports.func,
82
- required: propTypesExports.bool,
83
- checked: propTypesExports.bool,
84
- isFieldValid: propTypesExports.func,
85
- isValid: propTypesExports.bool,
86
- forceAllowValidation: propTypesExports.bool
80
+ onChange: PropTypes.func,
81
+ required: PropTypes.bool,
82
+ checked: PropTypes.bool,
83
+ isFieldValid: PropTypes.func,
84
+ isValid: PropTypes.bool,
85
+ forceAllowValidation: PropTypes.bool
87
86
  };
88
87
  SwitcherElement.defaultProps = {
89
88
  isValid: true,
@@ -1,26 +1,27 @@
1
- import { _ as _extends } from './_rollupPluginBabelHelpers-e8fb2e5c.js';
1
+ import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
2
2
  import React__default, { forwardRef, useState, useCallback, useEffect } from 'react';
3
- import { p as propTypesExports } from './index-e0af0caf.js';
4
- import { n as noop } from './index-ac59cb10.js';
5
- import { u as useMount } from './useMount-6fef51a5.js';
6
- import './configs-91c86664.js';
7
- import ExtendedInput from './ExtendedInput.js';
8
- import './dateValidation-67caec66.js';
9
- import './_commonjsHelpers-24198af3.js';
3
+ import PropTypes from 'prop-types';
4
+ import { n as noop } from '../index-a0e4e333.js';
5
+ import useMount from '../hooks/useMount.js';
6
+ import '../configs-fed6ac34.js';
7
+ import ExtendedInput from '../ExtendedInput/index.js';
8
+ import '../dateValidation-67caec66.js';
9
+ import '../_commonjsHelpers-24198af3.js';
10
10
  import 'react-dom';
11
- import './index-6ff23041.js';
12
- import './useDeviceType-dd51db38.js';
13
- import './useWindowSize-80369d76.js';
14
- import './index-897d8240.js';
15
- import './useKeyDown-38102ae7.js';
16
- import './useClickOutside-5183e396.js';
17
- import './Scrollbar.js';
18
- import './globalStyling-9c60a159.js';
19
- import './style-inject.es-746bb8ed.js';
20
- import './Icon.js';
21
- import './Tooltip.js';
22
- import './Popover-f4d1cac0.js';
23
- import './GeneUIProvider.js';
11
+ import '../index-6ff23041.js';
12
+ import '../hooks/useDeviceType.js';
13
+ import '../hooks/useWindowSize.js';
14
+ import '../hooks/useEllipsisDetection.js';
15
+ import '../Icon/index.js';
16
+ import '../style-inject.es-746bb8ed.js';
17
+ import '../SuggestionList/index.js';
18
+ import '../hooks/useKeyDown.js';
19
+ import '../hooks/useClickOutside.js';
20
+ import '../config-0ca92874.js';
21
+ import '../Scrollbar/index.js';
22
+ import '../Tooltip/index.js';
23
+ import '../Popover-f4d1cac0.js';
24
+ import '../GeneUIProvider/index.js';
24
25
 
25
26
  const emailRegExp = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
26
27
  function checkValidation(required, isValid, maxLength, minLength, isEmail) {
@@ -117,43 +118,43 @@ TextInput.propTypes = {
117
118
  /**
118
119
  * Value for text input
119
120
  */
120
- value: propTypesExports.string,
121
+ value: PropTypes.string,
121
122
  /**
122
123
  * Callback fires when field changes
123
124
  */
124
- onChange: propTypesExports.func,
125
+ onChange: PropTypes.func,
125
126
  /**
126
127
  * Callback fires when field blured
127
128
  */
128
- onBlur: propTypesExports.func,
129
+ onBlur: PropTypes.func,
129
130
  /**
130
131
  * Define is field required or no.
131
132
  */
132
- required: propTypesExports.bool,
133
+ required: PropTypes.bool,
133
134
  /**
134
135
  * Is field accept only email or no
135
136
  */
136
- isEmail: propTypesExports.bool,
137
+ isEmail: PropTypes.bool,
137
138
  /**
138
139
  * Maximum length of value
139
140
  */
140
- maxLength: propTypesExports.number,
141
+ maxLength: PropTypes.number,
141
142
  /**
142
143
  * Minimum length of value
143
144
  */
144
- minLength: propTypesExports.number,
145
+ minLength: PropTypes.number,
145
146
  /**
146
147
  * Callback fires when field validation state changes
147
148
  */
148
- isFieldValid: propTypesExports.func,
149
+ isFieldValid: PropTypes.func,
149
150
  /**
150
151
  * Additional validation state
151
152
  */
152
- isValid: propTypesExports.bool,
153
+ isValid: PropTypes.bool,
153
154
  /**
154
155
  * Allow validation without onBlur, validate field when mount
155
156
  */
156
- forceAllowValidation: propTypesExports.bool
157
+ forceAllowValidation: PropTypes.bool
157
158
  };
158
159
  TextInput.defaultProps = {
159
160
  isValid: true,
@@ -1,27 +1,28 @@
1
- import { _ as _extends } from './_rollupPluginBabelHelpers-e8fb2e5c.js';
1
+ import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
2
2
  import React__default, { forwardRef, useState, useCallback, useEffect } from 'react';
3
- import { p as propTypesExports } from './index-e0af0caf.js';
4
- import { d as dayjsWithPlugins } from './dateValidation-67caec66.js';
5
- import { g as getBrowserDateFormat } from './localization-4ba17032.js';
6
- import { c as checkTimeValidation } from './checkTimeValidation-e56771be.js';
3
+ import PropTypes from 'prop-types';
4
+ import { d as dayjsWithPlugins } from '../dateValidation-67caec66.js';
5
+ import { g as getBrowserDateFormat } from '../localization-4ba17032.js';
6
+ import { c as checkTimeValidation } from '../checkTimeValidation-e56771be.js';
7
7
  import 'react-dom';
8
- import ExtendedInput from './ExtendedInput.js';
9
- import './_commonjsHelpers-24198af3.js';
10
- import './index-6ff23041.js';
11
- import './configs-91c86664.js';
12
- import './index-ac59cb10.js';
13
- import './useDeviceType-dd51db38.js';
14
- import './useWindowSize-80369d76.js';
15
- import './index-897d8240.js';
16
- import './useKeyDown-38102ae7.js';
17
- import './useClickOutside-5183e396.js';
18
- import './Scrollbar.js';
19
- import './globalStyling-9c60a159.js';
20
- import './style-inject.es-746bb8ed.js';
21
- import './Icon.js';
22
- import './Tooltip.js';
23
- import './Popover-f4d1cac0.js';
24
- import './GeneUIProvider.js';
8
+ import ExtendedInput from '../ExtendedInput/index.js';
9
+ import '../_commonjsHelpers-24198af3.js';
10
+ import '../index-6ff23041.js';
11
+ import '../configs-fed6ac34.js';
12
+ import '../index-a0e4e333.js';
13
+ import '../hooks/useDeviceType.js';
14
+ import '../hooks/useWindowSize.js';
15
+ import '../hooks/useEllipsisDetection.js';
16
+ import '../Icon/index.js';
17
+ import '../style-inject.es-746bb8ed.js';
18
+ import '../SuggestionList/index.js';
19
+ import '../hooks/useKeyDown.js';
20
+ import '../hooks/useClickOutside.js';
21
+ import '../config-0ca92874.js';
22
+ import '../Scrollbar/index.js';
23
+ import '../Tooltip/index.js';
24
+ import '../Popover-f4d1cac0.js';
25
+ import '../GeneUIProvider/index.js';
25
26
 
26
27
  const nonLettersRegex = /[\W_]+/g;
27
28
  const getFormatSeparator = format => format[format.search(nonLettersRegex)];
@@ -155,14 +156,14 @@ const DateInput = /*#__PURE__*/forwardRef((_ref6, ref) => {
155
156
  }, restProps));
156
157
  });
157
158
  DateInput.propTypes = {
158
- value: propTypesExports.string,
159
- onChange: propTypesExports.func,
160
- required: propTypesExports.bool,
161
- getInitialState: propTypesExports.func,
162
- customValidation: propTypesExports.func,
163
- min: propTypesExports.string,
164
- max: propTypesExports.string,
165
- format: propTypesExports.string
159
+ value: PropTypes.string,
160
+ onChange: PropTypes.func,
161
+ required: PropTypes.bool,
162
+ getInitialState: PropTypes.func,
163
+ customValidation: PropTypes.func,
164
+ min: PropTypes.string,
165
+ max: PropTypes.string,
166
+ format: PropTypes.string
166
167
  };
167
168
  DateInput.defaultProps = {
168
169
  format: getBrowserDateFormat()
@@ -1,36 +1,38 @@
1
- import { _ as _extends } from './_rollupPluginBabelHelpers-e8fb2e5c.js';
1
+ import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
2
2
  import React__default, { forwardRef, useState, useCallback, useEffect } from 'react';
3
- import { p as propTypesExports } from './index-e0af0caf.js';
4
- import { u as useMount } from './useMount-6fef51a5.js';
5
- import './configs-91c86664.js';
6
- import { U as Uploader } from './index-135b9d17.js';
7
- import './index-ac59cb10.js';
8
- import './dateValidation-67caec66.js';
9
- import './_commonjsHelpers-24198af3.js';
3
+ import PropTypes from 'prop-types';
4
+ import useMount from '../hooks/useMount.js';
5
+ import '../configs-fed6ac34.js';
6
+ import Uploader from '../Uploader/index.js';
7
+ import '../index-a0e4e333.js';
8
+ import '../dateValidation-67caec66.js';
9
+ import '../_commonjsHelpers-24198af3.js';
10
10
  import 'react-dom';
11
- import './index-6ff23041.js';
12
- import './Grid.js';
13
- import './useWidth-9f4647f8.js';
14
- import './useWindowSize-80369d76.js';
15
- import './style-inject.es-746bb8ed.js';
16
- import './Button.js';
17
- import './Icon.js';
18
- import './globalStyling-9c60a159.js';
19
- import './useKeyDown-38102ae7.js';
20
- import './BusyLoader.js';
21
- import './Image.js';
22
- import './Empty.js';
23
- import './Tooltip.js';
24
- import './Popover-f4d1cac0.js';
25
- import './useDeviceType-dd51db38.js';
26
- import './GeneUIProvider.js';
27
- import './Checkbox.js';
28
- import './checkboxRadioSwitcher-5b69d7bd.js';
29
- import './guid-8ddf77b3.js';
30
- import './ExtendedInput.js';
31
- import './index-897d8240.js';
32
- import './useClickOutside-5183e396.js';
33
- import './Scrollbar.js';
11
+ import '../index-6ff23041.js';
12
+ import '../Button/index.js';
13
+ import '../Icon/index.js';
14
+ import '../style-inject.es-746bb8ed.js';
15
+ import '../ExtendedInput/index.js';
16
+ import '../hooks/useDeviceType.js';
17
+ import '../hooks/useWindowSize.js';
18
+ import '../hooks/useEllipsisDetection.js';
19
+ import '../SuggestionList/index.js';
20
+ import '../hooks/useKeyDown.js';
21
+ import '../hooks/useClickOutside.js';
22
+ import '../config-0ca92874.js';
23
+ import '../Scrollbar/index.js';
24
+ import '../Tooltip/index.js';
25
+ import '../Popover-f4d1cac0.js';
26
+ import '../GeneUIProvider/index.js';
27
+ import '../Grid/index.js';
28
+ import '../hooks/useWidth.js';
29
+ import '../hooks/useImgDownload.js';
30
+ import '../BusyLoader/index.js';
31
+ import '../Image/index.js';
32
+ import '../Empty/index.js';
33
+ import '../Checkbox/index.js';
34
+ import '../checkboxRadioSwitcher-5b69d7bd.js';
35
+ import '../guid-8ddf77b3.js';
34
36
 
35
37
  function checkValidation(required, isValid) {
36
38
  let value = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
@@ -83,12 +85,12 @@ const UploaderField = /*#__PURE__*/forwardRef((_ref, ref) => {
83
85
  }, restProps));
84
86
  });
85
87
  UploaderField.propTypes = {
86
- onChange: propTypesExports.func,
87
- customValidation: propTypesExports.func,
88
+ onChange: PropTypes.func,
89
+ customValidation: PropTypes.func,
88
90
  /**
89
91
  * Additional validation state
90
92
  */
91
- isValid: propTypesExports.bool
93
+ isValid: PropTypes.bool
92
94
  };
93
95
 
94
96
  export { UploaderField as default };
@@ -0,0 +1,227 @@
1
+ import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
2
+ import React__default, { useMemo } from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import { c as classnames } from '../index-6ff23041.js';
5
+ import { w as widgetConfig } from '../configs-fed6ac34.js';
6
+ import Icon from '../Icon/index.js';
7
+ import KeyValue from '../KeyValue/index.js';
8
+ import ModuleTitle from '../ModuleTitle/index.js';
9
+ import { s as styleInject } from '../style-inject.es-746bb8ed.js';
10
+ import '../index-a0e4e333.js';
11
+ import '../dateValidation-67caec66.js';
12
+ import '../_commonjsHelpers-24198af3.js';
13
+ import 'react-dom';
14
+ import '../Tooltip/index.js';
15
+ import '../Popover-f4d1cac0.js';
16
+ import '../hooks/useDeviceType.js';
17
+ import '../hooks/useWindowSize.js';
18
+ import '../GeneUIProvider/index.js';
19
+
20
+ var css_248z = "[data-gene-ui-version=\"2.12.1\"] .widget-holder{background:var(--background);border-radius:2rem;height:6rem;width:100%}[data-gene-ui-version=\"2.12.1\"] .widget-holder.s-small{--font-size:1.6rem;border-radius:1rem}[data-gene-ui-version=\"2.12.1\"] .widget-holder.s-medium{border-radius:1rem;height:8rem}[data-gene-ui-version=\"2.12.1\"] .widget-holder.s-big{height:11rem}[data-gene-ui-version=\"2.12.1\"] .widget-holder .no-data{opacity:.5}[data-gene-ui-version=\"2.12.1\"] .widget-holder.shadow{box-shadow:0 .3rem .6rem 0 #0000000d}[data-gene-ui-version=\"2.12.1\"] .widget-holder.border{border:1px solid rgba(var(--background-sc-rgb),.05)}[data-gene-ui-version=\"2.12.1\"] .widget-holder .module-title{text-transform:uppercase}[data-gene-ui-version=\"2.12.1\"] .widget-holder.widget-grid{display:grid;grid-template-areas:\"image head\" \"image text\";grid-template-columns:auto 1fr;grid-template-rows:1fr 1fr}[data-gene-ui-version=\"2.12.1\"] .widget-holder.widget-grid.t-default{padding:0 2rem 0 0}html[dir=rtl] .widget-holder.widget-grid.t-default{padding:0 0 0 2rem}[data-gene-ui-version=\"2.12.1\"] .widget-holder.widget-grid.t-default .module-title{font-size:1.2rem}[data-gene-ui-version=\"2.12.1\"] .widget-holder.widget-grid.t-default .module-header{padding:0}[data-gene-ui-version=\"2.12.1\"] .widget-holder.widget-grid.t-default .image{padding:0 3.5rem}[data-gene-ui-version=\"2.12.1\"] .widget-holder.widget-grid.t-default .image img{height:5rem;width:5rem}[data-gene-ui-version=\"2.12.1\"] .s-small.widget-holder.widget-grid.t-default .image{padding:0 1.5rem}[data-gene-ui-version=\"2.12.1\"] .s-small.widget-holder.widget-grid.t-default .image img{height:3.4rem;width:3.4rem}[data-gene-ui-version=\"2.12.1\"] .s-medium.widget-holder.widget-grid.t-default .image{padding:0 2rem}[data-gene-ui-version=\"2.12.1\"] .s-medium.widget-holder.widget-grid.t-default .image img{height:4.8rem;width:4.8rem}[data-gene-ui-version=\"2.12.1\"] .widget-holder.widget-grid.t-compact .text.key-values,[data-gene-ui-version=\"2.12.1\"] .widget-holder.widget-grid.t-default .text.key-values{display:grid;gap:1.6rem;grid-template-columns:.5fr .4fr 1fr}[data-gene-ui-version=\"2.12.1\"] .widget-holder.widget-grid.t-compact .text .widget-timeline-holder,[data-gene-ui-version=\"2.12.1\"] .widget-holder.widget-grid.t-default .text .widget-timeline-holder{align-items:center;border-left:1px solid rgba(var(--background-sc-rgb),.05);display:flex;justify-content:space-between;text-align:center}[data-gene-ui-version=\"2.12.1\"] .widget-holder.widget-grid.t-compact{grid-template-areas:\"head head\" \"image text\";grid-template-rows:auto 1fr}[data-gene-ui-version=\"2.12.1\"] .widget-holder.widget-grid.t-compact .image{padding:0 1.5rem}[data-gene-ui-version=\"2.12.1\"] .widget-holder.widget-grid.t-compact .image img{height:4.8rem;width:4.8rem}[data-gene-ui-version=\"2.12.1\"] .s-small.widget-holder.widget-grid.t-compact .image{display:none}[data-gene-ui-version=\"2.12.1\"] .s-medium.widget-holder.widget-grid.t-compact .image{padding:0 2rem}[data-gene-ui-version=\"2.12.1\"] .s-medium.widget-holder.widget-grid.t-compact .image img{height:3rem;width:3rem}[data-gene-ui-version=\"2.12.1\"] .widget-holder.widget-grid.t-compact .text{padding:0 2rem}[data-gene-ui-version=\"2.12.1\"] .widget-holder.widget-grid.t-compact .text:not(.bobol)>p{text-align:end}[data-gene-ui-version=\"2.12.1\"] .widget-holder>li{align-items:center;display:flex}[data-gene-ui-version=\"2.12.1\"] .widget-holder>li.image{grid-area:image;justify-content:center}[data-gene-ui-version=\"2.12.1\"] .widget-holder>li.head{grid-area:head;overflow:hidden;padding:0 0 1px}[data-gene-ui-version=\"2.12.1\"] .widget-holder>li.text{grid-area:text;overflow:hidden}[data-gene-ui-version=\"2.12.1\"] .widget-holder>li.text>p{flex:auto;font:700 var(--font-size,1.8rem)/3rem var(--font-family)}[data-gene-ui-version=\"2.12.1\"] .widget-holder>li.text .icon{flex-shrink:0}[data-gene-ui-version=\"2.12.1\"] .widget-holder.t-minimal{align-items:center;border-radius:1rem;display:flex;flex-direction:column;justify-content:center;padding:0 .8rem;text-align:center}[data-gene-ui-version=\"2.12.1\"] .widget-holder.t-minimal.shadow{box-shadow:0 .2rem .4rem 0 #0000000d}[data-gene-ui-version=\"2.12.1\"] .widget-holder.t-minimal>li{justify-content:center;width:100%}[data-gene-ui-version=\"2.12.1\"] .widget-holder.t-minimal>li:first-child{color:rgba(var(--background-sc-rgb),.61);font:600 1.2rem/1.6rem var(--font-family)}[data-gene-ui-version=\"2.12.1\"] .widget-holder.t-minimal>li:nth-child(2){font-weight:600;margin:1rem 0 0}[data-gene-ui-version=\"2.12.1\"] .widget-holder.t-minimal>li>i{border-radius:100%;display:block;flex-shrink:0;height:.8rem;width:.8rem}html:not([dir=rtl]) .widget-holder.t-minimal>li>i{margin-right:.8rem}html[dir=rtl] .widget-holder.t-minimal>li>i{margin-left:.8rem}[data-gene-ui-version=\"2.12.1\"] .widget-holder.t-colorful{border:1px solid var(--hero);display:block;max-width:100%;min-width:14rem;padding:1rem 1.4rem .8rem;position:relative;width:auto}[data-gene-ui-version=\"2.12.1\"] .widget-holder.t-colorful:before{background:var(--hero);border-radius:inherit;content:\"\";display:block;height:100%;left:0;opacity:.03;position:absolute;top:0;width:100%}[data-gene-ui-version=\"2.12.1\"] .widget-holder.t-colorful>li{position:relative}[data-gene-ui-version=\"2.12.1\"] .widget-holder.t-colorful .widget-c-title{font:600 1.2rem/1.6rem var(--font-family);margin:0 0 .4rem;opacity:.8}[data-gene-ui-version=\"2.12.1\"] .widget-holder.t-colorful .widget-c-text{font:700 1.6rem/2.2rem var(--font-family)}[data-gene-ui-version=\"2.12.1\"] .comparison-icons-holder{--status-color:inherit;align-items:center;color:var(--status-color);display:flex;flex-shrink:0;font:700 1.4rem/1.8rem var(--font-family);margin-inline-start:.6rem;transition:color .4s}[data-gene-ui-version=\"2.12.1\"] .comparison-icons-holder.cs-up{--status-color:#51cf78}[data-gene-ui-version=\"2.12.1\"] .comparison-icons-holder.cs-up .bc-icon-comparison-down{color:rgba(var(--background-sc-rgb),.1)}[data-gene-ui-version=\"2.12.1\"] .comparison-icons-holder.cs-down{--status-color:#e84855}[data-gene-ui-version=\"2.12.1\"] .comparison-icons-holder.cs-down .bc-icon-comparison-up{color:rgba(var(--background-sc-rgb),.1)}[data-gene-ui-version=\"2.12.1\"] .comparison-icons-holder .icon+.icon{left:0;position:absolute;top:0}[data-gene-ui-version=\"2.12.1\"] .comparison-icons{position:relative}";
21
+ styleInject(css_248z);
22
+
23
+ function Widget(_ref) {
24
+ let {
25
+ type,
26
+ img,
27
+ title,
28
+ text,
29
+ color,
30
+ headerActions,
31
+ noDataText,
32
+ noData,
33
+ className,
34
+ withShadow,
35
+ withBorder,
36
+ titleIcon,
37
+ showComparisonIcons,
38
+ comparisonText,
39
+ comparisonStatus,
40
+ size,
41
+ titleProps,
42
+ keyValues,
43
+ ...restProps
44
+ } = _ref;
45
+ const isCompact = type === widgetConfig.type[1];
46
+ const showKeyValues = useMemo(() => !!keyValues.length && size === widgetConfig.size[2], [size, keyValues]);
47
+ return /*#__PURE__*/React__default.createElement("ul", _extends({}, restProps, {
48
+ className: classnames(className, 'widget-holder', "t-".concat(type), "s-".concat(size), {
49
+ 'widget-grid': type !== widgetConfig.type[2] && type !== widgetConfig.type[3],
50
+ shadow: withShadow,
51
+ border: withBorder
52
+ }),
53
+ style: {
54
+ '--hero': color
55
+ }
56
+ }), type === widgetConfig.type[2] ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("li", null, /*#__PURE__*/React__default.createElement("i", {
57
+ style: {
58
+ background: color
59
+ }
60
+ }), /*#__PURE__*/React__default.createElement("span", {
61
+ className: "ellipsis-text"
62
+ }, title)), /*#__PURE__*/React__default.createElement("li", null, /*#__PURE__*/React__default.createElement("span", {
63
+ className: classnames('ellipsis-text', {
64
+ 'no-data': noData
65
+ })
66
+ }, noData ? noDataText : text), !noData && (showComparisonIcons || comparisonText) && /*#__PURE__*/React__default.createElement("div", {
67
+ className: classnames('comparison-icons-holder', "cs-".concat(comparisonStatus))
68
+ }, comparisonText && /*#__PURE__*/React__default.createElement("div", {
69
+ className: "comparison-text"
70
+ }, comparisonText), showComparisonIcons && /*#__PURE__*/React__default.createElement("div", {
71
+ className: "comparison-icons"
72
+ }, /*#__PURE__*/React__default.createElement(Icon, {
73
+ type: "bc-icon-comparison-up"
74
+ }), /*#__PURE__*/React__default.createElement(Icon, {
75
+ type: "bc-icon-comparison-down"
76
+ }))))) : type === widgetConfig.type[3] ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("li", {
77
+ className: "widget-c-title"
78
+ }, /*#__PURE__*/React__default.createElement("p", {
79
+ className: "ellipsis-text"
80
+ }, title)), /*#__PURE__*/React__default.createElement("li", {
81
+ className: "widget-c-text"
82
+ }, /*#__PURE__*/React__default.createElement("p", {
83
+ className: classnames('ellipsis-text', {
84
+ 'no-data': noData
85
+ })
86
+ }, noData ? noDataText : text))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("li", {
87
+ className: "image"
88
+ }, img && /*#__PURE__*/React__default.createElement("img", {
89
+ src: img,
90
+ alt: ""
91
+ })), /*#__PURE__*/React__default.createElement("li", {
92
+ className: "head"
93
+ }, /*#__PURE__*/React__default.createElement(ModuleTitle, _extends({
94
+ title: title,
95
+ color: color,
96
+ size: size,
97
+ cornerRadius: "position-radius",
98
+ titleIcon: titleIcon
99
+ }, titleProps), !isCompact && headerActions)), /*#__PURE__*/React__default.createElement("li", {
100
+ className: classnames('text', {
101
+ 'key-values': showKeyValues
102
+ })
103
+ }, /*#__PURE__*/React__default.createElement("p", {
104
+ className: classnames('ellipsis-text', {
105
+ 'no-data': noData
106
+ })
107
+ }, noData ? noDataText : text), !noData && (showComparisonIcons || comparisonText) && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
108
+ className: classnames('comparison-icons-holder', "cs-".concat(comparisonStatus))
109
+ }, comparisonText && /*#__PURE__*/React__default.createElement("div", {
110
+ className: "comparison-text"
111
+ }, comparisonText), showComparisonIcons && /*#__PURE__*/React__default.createElement("div", {
112
+ className: "comparison-icons"
113
+ }, /*#__PURE__*/React__default.createElement(Icon, {
114
+ type: "bc-icon-comparison-up"
115
+ }), /*#__PURE__*/React__default.createElement(Icon, {
116
+ type: "bc-icon-comparison-down"
117
+ }))), showKeyValues && /*#__PURE__*/React__default.createElement("div", {
118
+ className: "widget-timeline-holder"
119
+ }, keyValues.map((_ref2, index) => {
120
+ let {
121
+ label,
122
+ value,
123
+ className,
124
+ ...rest
125
+ } = _ref2;
126
+ return /*#__PURE__*/React__default.createElement(KeyValue, _extends({
127
+ key: index,
128
+ label: label,
129
+ value: value,
130
+ className: className
131
+ }, rest));
132
+ }))))));
133
+ }
134
+ Widget.propTypes = {
135
+ /**
136
+ * Switching to different types of widget's view, can be
137
+ * default, minimal, compact
138
+ */
139
+ type: PropTypes.oneOf(widgetConfig.type),
140
+ /**
141
+ * Setting image to widget
142
+ */
143
+ img: PropTypes.string,
144
+ /**
145
+ * Title for widget
146
+ */
147
+ title: PropTypes.node.isRequired,
148
+ /**
149
+ * Main text for widget
150
+ */
151
+ text: PropTypes.node,
152
+ /**
153
+ * Theme color for widget
154
+ */
155
+ color: PropTypes.string,
156
+ /**
157
+ * Header of widget can have actions, so with this prop can be set actions
158
+ */
159
+ headerActions: PropTypes.node,
160
+ /**
161
+ * Text for No data state
162
+ */
163
+ noDataText: PropTypes.string,
164
+ /**
165
+ * Show/hide No data state
166
+ */
167
+ noData: PropTypes.bool,
168
+ /**
169
+ * Additional className
170
+ */
171
+ className: PropTypes.string,
172
+ /**
173
+ * Show/Hide shadow effect for widget
174
+ */
175
+ withShadow: PropTypes.bool,
176
+ /**
177
+ * Show/Hide bordered effect
178
+ */
179
+ withBorder: PropTypes.bool,
180
+ /**
181
+ * Title can have icon, defining with this prop
182
+ */
183
+ titleIcon: PropTypes.string,
184
+ /**
185
+ * Show/Hide comparison icons
186
+ */
187
+ showComparisonIcons: PropTypes.bool,
188
+ /**
189
+ * Props for title component
190
+ */
191
+ titleProps: PropTypes.object,
192
+ /**
193
+ * Comparison text
194
+ */
195
+ comparisonText: PropTypes.string,
196
+ /**
197
+ * Defining status/state of comparison icon
198
+ * can be one of `'initial','up','down'`
199
+ */
200
+ comparisonStatus: PropTypes.oneOf(widgetConfig.comparisonStatus),
201
+ /**
202
+ * Widget size
203
+ * `small, big, medium`
204
+ */
205
+ size: PropTypes.oneOf(widgetConfig.size),
206
+ /**
207
+ * Widget keyValues is an array of keyValue
208
+ * it will appear when the size is big
209
+ */
210
+ keyValues: PropTypes.arrayOf(PropTypes.shape({
211
+ ...KeyValue.propTypes
212
+ }))
213
+ };
214
+ Widget.defaultProps = {
215
+ type: widgetConfig.type[0],
216
+ noDataText: 'No Data',
217
+ noData: false,
218
+ titleProps: {},
219
+ withShadow: true,
220
+ withBorder: false,
221
+ showComparisonIcons: false,
222
+ comparisonStatus: widgetConfig.comparisonStatus[0],
223
+ size: widgetConfig.size[1],
224
+ keyValues: []
225
+ };
226
+
227
+ export { Widget as default };
@@ -0,0 +1,31 @@
1
+ import ReactDOM__default from 'react-dom';
2
+
3
+ const callAfterDelay = (callBack, time) => {
4
+ const timerId = setTimeout(() => {
5
+ clearTimeout(timerId);
6
+ ReactDOM__default.unstable_batchedUpdates(() => {
7
+ callBack();
8
+ });
9
+ }, time);
10
+ };
11
+
12
+ const actionTypes = {
13
+ add: 'add',
14
+ edit: 'edit',
15
+ delete: 'delete'
16
+ };
17
+ const keyDownKeys = {
18
+ space: ' ',
19
+ enter: 'Enter',
20
+ escape: 'Escape',
21
+ arrowDown: 'ArrowDown',
22
+ arrowUp: 'ArrowUp',
23
+ arrowLeft: 'ArrowLeft',
24
+ arrowRight: 'ArrowRight',
25
+ backspace: 'Backspace',
26
+ delete: 'Delete',
27
+ tab: 'Tab'
28
+ };
29
+ const SPACE_HEIGHT = 8;
30
+
31
+ export { SPACE_HEIGHT as S, actionTypes as a, callAfterDelay as c, keyDownKeys as k };
@@ -79,6 +79,7 @@ const widgetConfig = {
79
79
  const customScrollbarConfig = {
80
80
  size: ['medium', 'small']
81
81
  };
82
+ const noDataConfig = ['data', 'image', 'search'];
82
83
  const timePickerConfig = {
83
84
  appearance: ['multipleInputs', 'singleInput']
84
85
  };
@@ -92,5 +93,31 @@ const optionConfig = {
92
93
  end: 'end'
93
94
  }
94
95
  };
96
+ const keyValueConfig = {
97
+ appearance: {
98
+ horizontal: {
99
+ _key: 'horizontal',
100
+ parentItemClassName: 'geneKeyValue--horizontal',
101
+ labelClassName: 'geneKeyValue__label--horizontal',
102
+ valueClassName: 'geneKeyValue__value--horizontal',
103
+ iconClassName: 'geneKeyValue__icon--horizontal'
104
+ },
105
+ vertical: {
106
+ _key: 'vertical',
107
+ parentItemClassName: '',
108
+ itemClassName: ''
109
+ }
110
+ }
111
+ };
112
+ const advancedSearchConfig = {
113
+ positions: {
114
+ right: 'right',
115
+ left: 'left'
116
+ }
117
+ };
118
+ const badgeConfig = {
119
+ color: ['danger', 'primary'],
120
+ size: ['default', 'medium', 'big', 'huge']
121
+ };
95
122
 
96
- export { clientConfigs as a, titleConfig as b, checkboxRadioSwitcherConfig as c, popoverConfig as d, popoverV2Config as e, customScrollbarConfig as f, breakPoints as g, stepsConfig as h, inputConfig as i, moduleTitleConfig as j, timePickerConfig as k, mobileScreenSize as m, optionConfig as o, positions as p, screenTypes as s, tagConfig as t, uploaderConfig as u, widgetConfig as w };
123
+ export { clientConfigs as a, badgeConfig as b, checkboxRadioSwitcherConfig as c, moduleTitleConfig as d, popoverConfig as e, tagConfig as f, popoverV2Config as g, timePickerConfig as h, inputConfig as i, advancedSearchConfig as j, keyValueConfig as k, customScrollbarConfig as l, mobileScreenSize as m, noDataConfig as n, optionConfig as o, positions as p, breakPoints as q, stepsConfig as r, screenTypes as s, titleConfig as t, uploaderConfig as u, widgetConfig as w };
@@ -0,0 +1,16 @@
1
+ import { useCallback } from 'react';
2
+
3
+ function useBodyScroll() {
4
+ const lock = useCallback(() => {
5
+ document.body.style.overflow = 'hidden';
6
+ }, []);
7
+ const unlock = useCallback(() => {
8
+ document.body.style.overflow = 'auto';
9
+ }, []);
10
+ return {
11
+ lock,
12
+ unlock
13
+ };
14
+ }
15
+
16
+ export { useBodyScroll as default };