@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,976 +1,24 @@
1
- import { _ as _extends } from './_rollupPluginBabelHelpers-e8fb2e5c.js';
1
+ import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
2
2
  import React__default, { forwardRef, useContext, useRef, useState, useMemo, useEffect, useCallback } from 'react';
3
- import { c as commonjsGlobal } from './_commonjsHelpers-24198af3.js';
3
+ import { c as commonjsGlobal } from '../_commonjsHelpers-24198af3.js';
4
+ import { j as jsxRuntimeExports } from '../jsx-runtime-57b40d9e.js';
4
5
  import ReactDOM__default from 'react-dom';
5
- import { u as useSwipeable } from './index-122432cd.js';
6
- import { c as classnames } from './index-6ff23041.js';
7
- import { p as propTypesExports } from './index-e0af0caf.js';
8
- import { n as noop, s as stopEvent } from './index-ac59cb10.js';
9
- import { u as useDeviceType } from './useDeviceType-dd51db38.js';
10
- import { u as useClickOutside } from './useClickOutside-5183e396.js';
11
- import { e as popoverV2Config, s as screenTypes } from './configs-91c86664.js';
12
- import CustomScrollbar from './Scrollbar.js';
13
- import './globalStyling-9c60a159.js';
14
- import { s as styleInject } from './style-inject.es-746bb8ed.js';
15
- import { GeneUIDesignSystemContext } from './GeneUIProvider.js';
16
- import { d as debounce } from './debounce-4419bc2f.js';
6
+ import { u as useSwipeable } from '../index-122432cd.js';
7
+ import { c as classnames } from '../index-6ff23041.js';
8
+ import PropTypes from 'prop-types';
9
+ import { n as noop, s as stopEvent } from '../index-a0e4e333.js';
10
+ import useDeviceType from '../hooks/useDeviceType.js';
11
+ import useClickOutside from '../hooks/useClickOutside.js';
12
+ import { g as popoverV2Config, s as screenTypes } from '../configs-fed6ac34.js';
13
+ import CustomScrollbar from '../Scrollbar/index.js';
14
+ import { GeneUIDesignSystemContext } from '../GeneUIProvider/index.js';
15
+ import { s as styleInject } from '../style-inject.es-746bb8ed.js';
16
+ import { d as debounce } from '../debounce-4419bc2f.js';
17
+ import '../dateValidation-67caec66.js';
18
+ import '../hooks/useWindowSize.js';
17
19
 
18
20
  var Popover = {};
19
21
 
20
- var jsxRuntimeExports = {};
21
- var jsxRuntime = {
22
- get exports(){ return jsxRuntimeExports; },
23
- set exports(v){ jsxRuntimeExports = v; },
24
- };
25
-
26
- var reactJsxRuntime_production_min = {};
27
-
28
- /** @license React v16.14.0
29
- * react-jsx-runtime.production.min.js
30
- *
31
- * Copyright (c) Facebook, Inc. and its affiliates.
32
- *
33
- * This source code is licensed under the MIT license found in the
34
- * LICENSE file in the root directory of this source tree.
35
- */
36
-
37
- var hasRequiredReactJsxRuntime_production_min;
38
-
39
- function requireReactJsxRuntime_production_min () {
40
- if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
41
- hasRequiredReactJsxRuntime_production_min = 1;
42
- var f=React__default,g=60103;reactJsxRuntime_production_min.Fragment=60107;if("function"===typeof Symbol&&Symbol.for){var h=Symbol.for;g=h("react.element");reactJsxRuntime_production_min.Fragment=h("react.fragment");}var m=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,n=Object.prototype.hasOwnProperty,p={key:!0,ref:!0,__self:!0,__source:!0};
43
- function q(c,a,k){var b,d={},e=null,l=null;void 0!==k&&(e=""+k);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(l=a.ref);for(b in a)n.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return {$$typeof:g,type:c,key:e,ref:l,props:d,_owner:m.current}}reactJsxRuntime_production_min.jsx=q;reactJsxRuntime_production_min.jsxs=q;
44
- return reactJsxRuntime_production_min;
45
- }
46
-
47
- var reactJsxRuntime_development = {};
48
-
49
- /** @license React v16.14.0
50
- * react-jsx-runtime.development.js
51
- *
52
- * Copyright (c) Facebook, Inc. and its affiliates.
53
- *
54
- * This source code is licensed under the MIT license found in the
55
- * LICENSE file in the root directory of this source tree.
56
- */
57
-
58
- var hasRequiredReactJsxRuntime_development;
59
-
60
- function requireReactJsxRuntime_development () {
61
- if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
62
- hasRequiredReactJsxRuntime_development = 1;
63
- (function (exports) {
64
-
65
- if (process.env.NODE_ENV !== "production") {
66
- (function() {
67
-
68
- var React = React__default;
69
-
70
- // ATTENTION
71
- // When adding new symbols to this file,
72
- // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
73
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
74
- // nor polyfill, then a plain number is used for performance.
75
- var REACT_ELEMENT_TYPE = 0xeac7;
76
- var REACT_PORTAL_TYPE = 0xeaca;
77
- exports.Fragment = 0xeacb;
78
- var REACT_STRICT_MODE_TYPE = 0xeacc;
79
- var REACT_PROFILER_TYPE = 0xead2;
80
- var REACT_PROVIDER_TYPE = 0xeacd;
81
- var REACT_CONTEXT_TYPE = 0xeace;
82
- var REACT_FORWARD_REF_TYPE = 0xead0;
83
- var REACT_SUSPENSE_TYPE = 0xead1;
84
- var REACT_SUSPENSE_LIST_TYPE = 0xead8;
85
- var REACT_MEMO_TYPE = 0xead3;
86
- var REACT_LAZY_TYPE = 0xead4;
87
- var REACT_BLOCK_TYPE = 0xead9;
88
- var REACT_SERVER_BLOCK_TYPE = 0xeada;
89
- var REACT_FUNDAMENTAL_TYPE = 0xead5;
90
- var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
91
- var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
92
-
93
- if (typeof Symbol === 'function' && Symbol.for) {
94
- var symbolFor = Symbol.for;
95
- REACT_ELEMENT_TYPE = symbolFor('react.element');
96
- REACT_PORTAL_TYPE = symbolFor('react.portal');
97
- exports.Fragment = symbolFor('react.fragment');
98
- REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
99
- REACT_PROFILER_TYPE = symbolFor('react.profiler');
100
- REACT_PROVIDER_TYPE = symbolFor('react.provider');
101
- REACT_CONTEXT_TYPE = symbolFor('react.context');
102
- REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
103
- REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
104
- REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
105
- REACT_MEMO_TYPE = symbolFor('react.memo');
106
- REACT_LAZY_TYPE = symbolFor('react.lazy');
107
- REACT_BLOCK_TYPE = symbolFor('react.block');
108
- REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
109
- REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
110
- symbolFor('react.scope');
111
- symbolFor('react.opaque.id');
112
- REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
113
- symbolFor('react.offscreen');
114
- REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
115
- }
116
-
117
- var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
118
- var FAUX_ITERATOR_SYMBOL = '@@iterator';
119
- function getIteratorFn(maybeIterable) {
120
- if (maybeIterable === null || typeof maybeIterable !== 'object') {
121
- return null;
122
- }
123
-
124
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
125
-
126
- if (typeof maybeIterator === 'function') {
127
- return maybeIterator;
128
- }
129
-
130
- return null;
131
- }
132
-
133
- var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
134
-
135
- function error(format) {
136
- {
137
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
138
- args[_key2 - 1] = arguments[_key2];
139
- }
140
-
141
- printWarning('error', format, args);
142
- }
143
- }
144
-
145
- function printWarning(level, format, args) {
146
- // When changing this logic, you might want to also
147
- // update consoleWithStackDev.www.js as well.
148
- {
149
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
150
- var stack = '';
151
-
152
- if (currentlyValidatingElement) {
153
- var name = getComponentName(currentlyValidatingElement.type);
154
- var owner = currentlyValidatingElement._owner;
155
- stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));
156
- }
157
-
158
- stack += ReactDebugCurrentFrame.getStackAddendum();
159
-
160
- if (stack !== '') {
161
- format += '%s';
162
- args = args.concat([stack]);
163
- }
164
-
165
- var argsWithFormat = args.map(function (item) {
166
- return '' + item;
167
- }); // Careful: RN currently depends on this prefix
168
-
169
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
170
- // breaks IE9: https://github.com/facebook/react/issues/13610
171
- // eslint-disable-next-line react-internal/no-production-logging
172
-
173
- Function.prototype.apply.call(console[level], console, argsWithFormat);
174
- }
175
- }
176
-
177
- // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
178
-
179
- var enableScopeAPI = false; // Experimental Create Event Handle API.
180
-
181
- function isValidElementType(type) {
182
- if (typeof type === 'string' || typeof type === 'function') {
183
- return true;
184
- } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
185
-
186
-
187
- if (type === exports.Fragment || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {
188
- return true;
189
- }
190
-
191
- if (typeof type === 'object' && type !== null) {
192
- if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {
193
- return true;
194
- }
195
- }
196
-
197
- return false;
198
- }
199
-
200
-
201
- var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
202
- function describeComponentFrame (name, source, ownerName) {
203
- var sourceInfo = '';
204
-
205
- if (source) {
206
- var path = source.fileName;
207
- var fileName = path.replace(BEFORE_SLASH_RE, '');
208
-
209
- {
210
- // In DEV, include code for a common special case:
211
- // prefer "folder/index.js" instead of just "index.js".
212
- if (/^index\./.test(fileName)) {
213
- var match = path.match(BEFORE_SLASH_RE);
214
-
215
- if (match) {
216
- var pathBeforeSlash = match[1];
217
-
218
- if (pathBeforeSlash) {
219
- var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
220
- fileName = folderName + '/' + fileName;
221
- }
222
- }
223
- }
224
- }
225
-
226
- sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
227
- } else if (ownerName) {
228
- sourceInfo = ' (created by ' + ownerName + ')';
229
- }
230
-
231
- return '\n in ' + (name || 'Unknown') + sourceInfo;
232
- }
233
-
234
- var Resolved = 1;
235
- function refineResolvedLazyComponent(lazyComponent) {
236
- return lazyComponent._status === Resolved ? lazyComponent._result : null;
237
- }
238
-
239
- function getWrappedName(outerType, innerType, wrapperName) {
240
- var functionName = innerType.displayName || innerType.name || '';
241
- return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
242
- }
243
-
244
- function getComponentName(type) {
245
- if (type == null) {
246
- // Host root, text node or just invalid type.
247
- return null;
248
- }
249
-
250
- {
251
- if (typeof type.tag === 'number') {
252
- error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
253
- }
254
- }
255
-
256
- if (typeof type === 'function') {
257
- return type.displayName || type.name || null;
258
- }
259
-
260
- if (typeof type === 'string') {
261
- return type;
262
- }
263
-
264
- switch (type) {
265
- case exports.Fragment:
266
- return 'Fragment';
267
-
268
- case REACT_PORTAL_TYPE:
269
- return 'Portal';
270
-
271
- case REACT_PROFILER_TYPE:
272
- return "Profiler";
273
-
274
- case REACT_STRICT_MODE_TYPE:
275
- return 'StrictMode';
276
-
277
- case REACT_SUSPENSE_TYPE:
278
- return 'Suspense';
279
-
280
- case REACT_SUSPENSE_LIST_TYPE:
281
- return 'SuspenseList';
282
- }
283
-
284
- if (typeof type === 'object') {
285
- switch (type.$$typeof) {
286
- case REACT_CONTEXT_TYPE:
287
- return 'Context.Consumer';
288
-
289
- case REACT_PROVIDER_TYPE:
290
- return 'Context.Provider';
291
-
292
- case REACT_FORWARD_REF_TYPE:
293
- return getWrappedName(type, type.render, 'ForwardRef');
294
-
295
- case REACT_MEMO_TYPE:
296
- return getComponentName(type.type);
297
-
298
- case REACT_BLOCK_TYPE:
299
- return getComponentName(type.render);
300
-
301
- case REACT_LAZY_TYPE:
302
- {
303
- var thenable = type;
304
- var resolvedThenable = refineResolvedLazyComponent(thenable);
305
-
306
- if (resolvedThenable) {
307
- return getComponentName(resolvedThenable);
308
- }
309
-
310
- break;
311
- }
312
- }
313
- }
314
-
315
- return null;
316
- }
317
-
318
- var loggedTypeFailures = {};
319
- ReactSharedInternals.ReactDebugCurrentFrame;
320
- var currentlyValidatingElement = null;
321
-
322
- function setCurrentlyValidatingElement(element) {
323
- {
324
- currentlyValidatingElement = element;
325
- }
326
- }
327
-
328
- function checkPropTypes(typeSpecs, values, location, componentName, element) {
329
- {
330
- // $FlowFixMe This is okay but Flow doesn't know it.
331
- var has = Function.call.bind(Object.prototype.hasOwnProperty);
332
-
333
- for (var typeSpecName in typeSpecs) {
334
- if (has(typeSpecs, typeSpecName)) {
335
- var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
336
- // fail the render phase where it didn't fail before. So we log it.
337
- // After these have been cleaned up, we'll let them throw.
338
-
339
- try {
340
- // This is intentionally an invariant that gets caught. It's the same
341
- // behavior as without this statement except with a better message.
342
- if (typeof typeSpecs[typeSpecName] !== 'function') {
343
- var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
344
- err.name = 'Invariant Violation';
345
- throw err;
346
- }
347
-
348
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
349
- } catch (ex) {
350
- error$1 = ex;
351
- }
352
-
353
- if (error$1 && !(error$1 instanceof Error)) {
354
- setCurrentlyValidatingElement(element);
355
-
356
- error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
357
-
358
- setCurrentlyValidatingElement(null);
359
- }
360
-
361
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
362
- // Only monitor this failure once because there tends to be a lot of the
363
- // same error.
364
- loggedTypeFailures[error$1.message] = true;
365
- setCurrentlyValidatingElement(element);
366
-
367
- error('Failed %s type: %s', location, error$1.message);
368
-
369
- setCurrentlyValidatingElement(null);
370
- }
371
- }
372
- }
373
- }
374
- }
375
-
376
- var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
377
- var hasOwnProperty = Object.prototype.hasOwnProperty;
378
- var RESERVED_PROPS = {
379
- key: true,
380
- ref: true,
381
- __self: true,
382
- __source: true
383
- };
384
- var specialPropKeyWarningShown;
385
- var specialPropRefWarningShown;
386
- var didWarnAboutStringRefs;
387
-
388
- {
389
- didWarnAboutStringRefs = {};
390
- }
391
-
392
- function hasValidRef(config) {
393
- {
394
- if (hasOwnProperty.call(config, 'ref')) {
395
- var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
396
-
397
- if (getter && getter.isReactWarning) {
398
- return false;
399
- }
400
- }
401
- }
402
-
403
- return config.ref !== undefined;
404
- }
405
-
406
- function hasValidKey(config) {
407
- {
408
- if (hasOwnProperty.call(config, 'key')) {
409
- var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
410
-
411
- if (getter && getter.isReactWarning) {
412
- return false;
413
- }
414
- }
415
- }
416
-
417
- return config.key !== undefined;
418
- }
419
-
420
- function warnIfStringRefCannotBeAutoConverted(config, self) {
421
- {
422
- if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
423
- var componentName = getComponentName(ReactCurrentOwner.current.type);
424
-
425
- if (!didWarnAboutStringRefs[componentName]) {
426
- error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentName(ReactCurrentOwner.current.type), config.ref);
427
-
428
- didWarnAboutStringRefs[componentName] = true;
429
- }
430
- }
431
- }
432
- }
433
-
434
- function defineKeyPropWarningGetter(props, displayName) {
435
- {
436
- var warnAboutAccessingKey = function () {
437
- if (!specialPropKeyWarningShown) {
438
- specialPropKeyWarningShown = true;
439
-
440
- error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
441
- }
442
- };
443
-
444
- warnAboutAccessingKey.isReactWarning = true;
445
- Object.defineProperty(props, 'key', {
446
- get: warnAboutAccessingKey,
447
- configurable: true
448
- });
449
- }
450
- }
451
-
452
- function defineRefPropWarningGetter(props, displayName) {
453
- {
454
- var warnAboutAccessingRef = function () {
455
- if (!specialPropRefWarningShown) {
456
- specialPropRefWarningShown = true;
457
-
458
- error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
459
- }
460
- };
461
-
462
- warnAboutAccessingRef.isReactWarning = true;
463
- Object.defineProperty(props, 'ref', {
464
- get: warnAboutAccessingRef,
465
- configurable: true
466
- });
467
- }
468
- }
469
- /**
470
- * Factory method to create a new React element. This no longer adheres to
471
- * the class pattern, so do not use new to call it. Also, instanceof check
472
- * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
473
- * if something is a React Element.
474
- *
475
- * @param {*} type
476
- * @param {*} props
477
- * @param {*} key
478
- * @param {string|object} ref
479
- * @param {*} owner
480
- * @param {*} self A *temporary* helper to detect places where `this` is
481
- * different from the `owner` when React.createElement is called, so that we
482
- * can warn. We want to get rid of owner and replace string `ref`s with arrow
483
- * functions, and as long as `this` and owner are the same, there will be no
484
- * change in behavior.
485
- * @param {*} source An annotation object (added by a transpiler or otherwise)
486
- * indicating filename, line number, and/or other information.
487
- * @internal
488
- */
489
-
490
-
491
- var ReactElement = function (type, key, ref, self, source, owner, props) {
492
- var element = {
493
- // This tag allows us to uniquely identify this as a React Element
494
- $$typeof: REACT_ELEMENT_TYPE,
495
- // Built-in properties that belong on the element
496
- type: type,
497
- key: key,
498
- ref: ref,
499
- props: props,
500
- // Record the component responsible for creating this element.
501
- _owner: owner
502
- };
503
-
504
- {
505
- // The validation flag is currently mutative. We put it on
506
- // an external backing store so that we can freeze the whole object.
507
- // This can be replaced with a WeakMap once they are implemented in
508
- // commonly used development environments.
509
- element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
510
- // the validation flag non-enumerable (where possible, which should
511
- // include every environment we run tests in), so the test framework
512
- // ignores it.
513
-
514
- Object.defineProperty(element._store, 'validated', {
515
- configurable: false,
516
- enumerable: false,
517
- writable: true,
518
- value: false
519
- }); // self and source are DEV only properties.
520
-
521
- Object.defineProperty(element, '_self', {
522
- configurable: false,
523
- enumerable: false,
524
- writable: false,
525
- value: self
526
- }); // Two elements created in two different places should be considered
527
- // equal for testing purposes and therefore we hide it from enumeration.
528
-
529
- Object.defineProperty(element, '_source', {
530
- configurable: false,
531
- enumerable: false,
532
- writable: false,
533
- value: source
534
- });
535
-
536
- if (Object.freeze) {
537
- Object.freeze(element.props);
538
- Object.freeze(element);
539
- }
540
- }
541
-
542
- return element;
543
- };
544
- /**
545
- * https://github.com/reactjs/rfcs/pull/107
546
- * @param {*} type
547
- * @param {object} props
548
- * @param {string} key
549
- */
550
-
551
- function jsxDEV(type, config, maybeKey, source, self) {
552
- {
553
- var propName; // Reserved names are extracted
554
-
555
- var props = {};
556
- var key = null;
557
- var ref = null; // Currently, key can be spread in as a prop. This causes a potential
558
- // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
559
- // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
560
- // but as an intermediary step, we will use jsxDEV for everything except
561
- // <div {...props} key="Hi" />, because we aren't currently able to tell if
562
- // key is explicitly declared to be undefined or not.
563
-
564
- if (maybeKey !== undefined) {
565
- key = '' + maybeKey;
566
- }
567
-
568
- if (hasValidKey(config)) {
569
- key = '' + config.key;
570
- }
571
-
572
- if (hasValidRef(config)) {
573
- ref = config.ref;
574
- warnIfStringRefCannotBeAutoConverted(config, self);
575
- } // Remaining properties are added to a new props object
576
-
577
-
578
- for (propName in config) {
579
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
580
- props[propName] = config[propName];
581
- }
582
- } // Resolve default props
583
-
584
-
585
- if (type && type.defaultProps) {
586
- var defaultProps = type.defaultProps;
587
-
588
- for (propName in defaultProps) {
589
- if (props[propName] === undefined) {
590
- props[propName] = defaultProps[propName];
591
- }
592
- }
593
- }
594
-
595
- if (key || ref) {
596
- var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
597
-
598
- if (key) {
599
- defineKeyPropWarningGetter(props, displayName);
600
- }
601
-
602
- if (ref) {
603
- defineRefPropWarningGetter(props, displayName);
604
- }
605
- }
606
-
607
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
608
- }
609
- }
610
-
611
- var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
612
- ReactSharedInternals.ReactDebugCurrentFrame;
613
-
614
- function setCurrentlyValidatingElement$1(element) {
615
- currentlyValidatingElement = element;
616
- }
617
-
618
- var propTypesMisspellWarningShown;
619
-
620
- {
621
- propTypesMisspellWarningShown = false;
622
- }
623
- /**
624
- * Verifies the object is a ReactElement.
625
- * See https://reactjs.org/docs/react-api.html#isvalidelement
626
- * @param {?object} object
627
- * @return {boolean} True if `object` is a ReactElement.
628
- * @final
629
- */
630
-
631
- function isValidElement(object) {
632
- {
633
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
634
- }
635
- }
636
-
637
- function getDeclarationErrorAddendum() {
638
- {
639
- if (ReactCurrentOwner$1.current) {
640
- var name = getComponentName(ReactCurrentOwner$1.current.type);
641
-
642
- if (name) {
643
- return '\n\nCheck the render method of `' + name + '`.';
644
- }
645
- }
646
-
647
- return '';
648
- }
649
- }
650
-
651
- function getSourceInfoErrorAddendum(source) {
652
- {
653
- if (source !== undefined) {
654
- var fileName = source.fileName.replace(/^.*[\\\/]/, '');
655
- var lineNumber = source.lineNumber;
656
- return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
657
- }
658
-
659
- return '';
660
- }
661
- }
662
- /**
663
- * Warn if there's no key explicitly set on dynamic arrays of children or
664
- * object keys are not valid. This allows us to keep track of children between
665
- * updates.
666
- */
667
-
668
-
669
- var ownerHasKeyUseWarning = {};
670
-
671
- function getCurrentComponentErrorInfo(parentType) {
672
- {
673
- var info = getDeclarationErrorAddendum();
674
-
675
- if (!info) {
676
- var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
677
-
678
- if (parentName) {
679
- info = "\n\nCheck the top-level render call using <" + parentName + ">.";
680
- }
681
- }
682
-
683
- return info;
684
- }
685
- }
686
- /**
687
- * Warn if the element doesn't have an explicit key assigned to it.
688
- * This element is in an array. The array could grow and shrink or be
689
- * reordered. All children that haven't already been validated are required to
690
- * have a "key" property assigned to it. Error statuses are cached so a warning
691
- * will only be shown once.
692
- *
693
- * @internal
694
- * @param {ReactElement} element Element that requires a key.
695
- * @param {*} parentType element's parent's type.
696
- */
697
-
698
-
699
- function validateExplicitKey(element, parentType) {
700
- {
701
- if (!element._store || element._store.validated || element.key != null) {
702
- return;
703
- }
704
-
705
- element._store.validated = true;
706
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
707
-
708
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
709
- return;
710
- }
711
-
712
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
713
- // property, it may be the creator of the child that's responsible for
714
- // assigning it a key.
715
-
716
- var childOwner = '';
717
-
718
- if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
719
- // Give the component that originally created this child.
720
- childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
721
- }
722
-
723
- setCurrentlyValidatingElement$1(element);
724
-
725
- error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
726
-
727
- setCurrentlyValidatingElement$1(null);
728
- }
729
- }
730
- /**
731
- * Ensure that every element either is passed in a static location, in an
732
- * array with an explicit keys property defined, or in an object literal
733
- * with valid key property.
734
- *
735
- * @internal
736
- * @param {ReactNode} node Statically passed child of any type.
737
- * @param {*} parentType node's parent's type.
738
- */
739
-
740
-
741
- function validateChildKeys(node, parentType) {
742
- {
743
- if (typeof node !== 'object') {
744
- return;
745
- }
746
-
747
- if (Array.isArray(node)) {
748
- for (var i = 0; i < node.length; i++) {
749
- var child = node[i];
750
-
751
- if (isValidElement(child)) {
752
- validateExplicitKey(child, parentType);
753
- }
754
- }
755
- } else if (isValidElement(node)) {
756
- // This element was passed in a valid location.
757
- if (node._store) {
758
- node._store.validated = true;
759
- }
760
- } else if (node) {
761
- var iteratorFn = getIteratorFn(node);
762
-
763
- if (typeof iteratorFn === 'function') {
764
- // Entry iterators used to provide implicit keys,
765
- // but now we print a separate warning for them later.
766
- if (iteratorFn !== node.entries) {
767
- var iterator = iteratorFn.call(node);
768
- var step;
769
-
770
- while (!(step = iterator.next()).done) {
771
- if (isValidElement(step.value)) {
772
- validateExplicitKey(step.value, parentType);
773
- }
774
- }
775
- }
776
- }
777
- }
778
- }
779
- }
780
- /**
781
- * Given an element, validate that its props follow the propTypes definition,
782
- * provided by the type.
783
- *
784
- * @param {ReactElement} element
785
- */
786
-
787
-
788
- function validatePropTypes(element) {
789
- {
790
- var type = element.type;
791
-
792
- if (type === null || type === undefined || typeof type === 'string') {
793
- return;
794
- }
795
-
796
- var propTypes;
797
-
798
- if (typeof type === 'function') {
799
- propTypes = type.propTypes;
800
- } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
801
- // Inner props are checked in the reconciler.
802
- type.$$typeof === REACT_MEMO_TYPE)) {
803
- propTypes = type.propTypes;
804
- } else {
805
- return;
806
- }
807
-
808
- if (propTypes) {
809
- // Intentionally inside to avoid triggering lazy initializers:
810
- var name = getComponentName(type);
811
- checkPropTypes(propTypes, element.props, 'prop', name, element);
812
- } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
813
- propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
814
-
815
- var _name = getComponentName(type);
816
-
817
- error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
818
- }
819
-
820
- if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
821
- error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
822
- }
823
- }
824
- }
825
- /**
826
- * Given a fragment, validate that it can only be provided with fragment props
827
- * @param {ReactElement} fragment
828
- */
829
-
830
-
831
- function validateFragmentProps(fragment) {
832
- {
833
- var keys = Object.keys(fragment.props);
834
-
835
- for (var i = 0; i < keys.length; i++) {
836
- var key = keys[i];
837
-
838
- if (key !== 'children' && key !== 'key') {
839
- setCurrentlyValidatingElement$1(fragment);
840
-
841
- error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
842
-
843
- setCurrentlyValidatingElement$1(null);
844
- break;
845
- }
846
- }
847
-
848
- if (fragment.ref !== null) {
849
- setCurrentlyValidatingElement$1(fragment);
850
-
851
- error('Invalid attribute `ref` supplied to `React.Fragment`.');
852
-
853
- setCurrentlyValidatingElement$1(null);
854
- }
855
- }
856
- }
857
-
858
- function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
859
- {
860
- var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
861
- // succeed and there will likely be errors in render.
862
-
863
- if (!validType) {
864
- var info = '';
865
-
866
- if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
867
- info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
868
- }
869
-
870
- var sourceInfo = getSourceInfoErrorAddendum(source);
871
-
872
- if (sourceInfo) {
873
- info += sourceInfo;
874
- } else {
875
- info += getDeclarationErrorAddendum();
876
- }
877
-
878
- var typeString;
879
-
880
- if (type === null) {
881
- typeString = 'null';
882
- } else if (Array.isArray(type)) {
883
- typeString = 'array';
884
- } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
885
- typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />";
886
- info = ' Did you accidentally export a JSX literal instead of a component?';
887
- } else {
888
- typeString = typeof type;
889
- }
890
-
891
- error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
892
- }
893
-
894
- var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
895
- // TODO: Drop this when these are no longer allowed as the type argument.
896
-
897
- if (element == null) {
898
- return element;
899
- } // Skip key warning if the type isn't valid since our key validation logic
900
- // doesn't expect a non-string/function type and can throw confusing errors.
901
- // We don't want exception behavior to differ between dev and prod.
902
- // (Rendering will throw with a helpful message and as soon as the type is
903
- // fixed, the key warnings will appear.)
904
-
905
-
906
- if (validType) {
907
- var children = props.children;
908
-
909
- if (children !== undefined) {
910
- if (isStaticChildren) {
911
- if (Array.isArray(children)) {
912
- for (var i = 0; i < children.length; i++) {
913
- validateChildKeys(children[i], type);
914
- }
915
-
916
- if (Object.freeze) {
917
- Object.freeze(children);
918
- }
919
- } else {
920
- error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
921
- }
922
- } else {
923
- validateChildKeys(children, type);
924
- }
925
- }
926
- }
927
-
928
- if (type === exports.Fragment) {
929
- validateFragmentProps(element);
930
- } else {
931
- validatePropTypes(element);
932
- }
933
-
934
- return element;
935
- }
936
- } // These two functions exist to still get child warnings in dev
937
- // even with the prod transform. This means that jsxDEV is purely
938
- // opt-in behavior for better messages but that we won't stop
939
- // giving you warnings if you use production apis.
940
-
941
- function jsxWithValidationStatic(type, props, key) {
942
- {
943
- return jsxWithValidation(type, props, key, true);
944
- }
945
- }
946
- function jsxWithValidationDynamic(type, props, key) {
947
- {
948
- return jsxWithValidation(type, props, key, false);
949
- }
950
- }
951
-
952
- var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
953
- // for now we can ship identical prod functions
954
-
955
- var jsxs = jsxWithValidationStatic ;
956
-
957
- exports.jsx = jsx;
958
- exports.jsxs = jsxs;
959
- })();
960
- }
961
- } (reactJsxRuntime_development));
962
- return reactJsxRuntime_development;
963
- }
964
-
965
- (function (module) {
966
-
967
- if (process.env.NODE_ENV === 'production') {
968
- module.exports = requireReactJsxRuntime_production_min();
969
- } else {
970
- module.exports = requireReactJsxRuntime_development();
971
- }
972
- } (jsxRuntime));
973
-
974
22
  var PopoverPortal$1 = {};
975
23
 
976
24
  Object.defineProperty(PopoverPortal$1, "__esModule", { value: true });
@@ -1593,11 +641,11 @@ ArrowContainer$1.ArrowContainer = ArrowContainer;
1593
641
 
1594
642
  } (Popover));
1595
643
 
1596
- var css_248z = "[data-gene-ui-version=\"1.0.0\"] .popover-positioner{--popover-border-radius:1rem;--popover-shadow:0 0.2rem 0.4rem 0 #0000000d,0 0 0 1px rgba(var(--background-sc-rgb),0.08);z-index:400}[data-gene-ui-version=\"1.0.0\"] .popover-positioner.cr-smooth-radius{--popover-border-radius:0.4rem}[data-gene-ui-version=\"1.0.0\"] .popover-positioner.mobile-view{--popover-border-radius:0.8rem 0.8rem 0 0;--popover-shadow:0 -1px 0.2rem 0 #0000000d;bottom:0;left:0!important;overflow:hidden;position:fixed!important;top:0!important;transform:translate(0)!important;width:100%}[data-gene-ui-version=\"1.0.0\"] .popover-positioner .popover-top-bottom-padding{padding:1rem 0;width:100%}[data-gene-ui-version=\"1.0.0\"] .popover-positioner .popover-top-bottom-padding>div[style*=width]{width:100%!important}[data-gene-ui-version=\"1.0.0\"] .popover{width:100%}[data-gene-ui-version=\"1.0.0\"] .popover-positioner.mobile-view .popover{height:100%;position:relative}[data-gene-ui-version=\"1.0.0\"] .popover-positioner-disable{margin-top:5px;position:inherit!important;transform:none!important}[data-gene-ui-version=\"1.0.0\"] .popover-track{width:100%}[data-gene-ui-version=\"1.0.0\"] .popover-content{background:var(--background);border-radius:var(--popover-border-radius);box-shadow:var(--popover-shadow);overflow:hidden;padding:0 0 env(safe-area-inset-bottom);transition:padding .4s;width:100%}[data-gene-ui-version=\"1.0.0\"] .popover-positioner.mobile-view .popover-content{-webkit-overflow-scrolling:auto;bottom:0;left:0;max-height:calc(100% - 10rem);overflow-x:hidden;overflow-y:auto;position:absolute;z-index:1}[data-gene-ui-version=\"1.0.0\"] .popover-positioner.mobile-view[style*=\"opacity: 0\"] .popover-content{transform:translateY(100%)}[data-gene-ui-version=\"1.0.0\"] .popover-positioner.mobile-view .popover-content{transform:translateY(0)}[data-gene-ui-version=\"1.0.0\"] .popover-mobile-backdrop{background:#0003;height:100%;left:0;opacity:1;position:absolute;top:0;width:100%;z-index:0}[data-gene-ui-version=\"1.0.0\"] .popover-footer,[data-gene-ui-version=\"1.0.0\"] .popover-header{background:var(--background);position:-webkit-sticky;position:sticky;z-index:1}[data-gene-ui-version=\"1.0.0\"] .popover-header{border-bottom:1px solid rgba(var(--background-sc-rgb),.1);top:0}[data-gene-ui-version=\"1.0.0\"] .popover-footer{align-items:stretch;border-top:1px solid rgba(var(--background-sc-rgb),.1);bottom:calc(env(safe-area-inset-bottom)*-1);display:flex;padding:0 0 env(safe-area-inset-bottom);transition:padding .4s}[data-gene-ui-version=\"1.0.0\"] .popover-body{position:relative;z-index:0}[data-gene-ui-version=\"1.0.0\"] .popover-search{padding:1.4rem 1.5rem}[data-gene-ui-version=\"1.0.0\"] .empty-data-holder{align-items:center;display:flex;height:19rem;justify-content:center;width:100%}[data-gene-ui-version=\"1.0.0\"] .popover-disabled{opacity:.5;pointer-events:none;transition:opacity .5s}";
644
+ var css_248z = "[data-gene-ui-version=\"2.12.1\"] .popover-positioner{--popover-border-radius:1rem;--popover-shadow:0 0.2rem 0.4rem 0 #0000000d,0 0 0 1px rgba(var(--background-sc-rgb),0.08);z-index:400}[data-gene-ui-version=\"2.12.1\"] .popover-positioner.cr-smooth-radius{--popover-border-radius:0.4rem}[data-gene-ui-version=\"2.12.1\"] .popover-positioner.mobile-view{--popover-border-radius:0.8rem 0.8rem 0 0;--popover-shadow:0 -1px 0.2rem 0 #0000000d;bottom:0;left:0!important;overflow:hidden;position:fixed!important;top:0!important;transform:translate(0)!important;width:100%}[data-gene-ui-version=\"2.12.1\"] .popover-positioner .popover-top-bottom-padding{padding:1rem 0;width:100%}[data-gene-ui-version=\"2.12.1\"] .popover-positioner .popover-top-bottom-padding>div[style*=width]{width:100%!important}[data-gene-ui-version=\"2.12.1\"] .popover{width:100%}[data-gene-ui-version=\"2.12.1\"] .popover-positioner.mobile-view .popover{height:100%;position:relative}[data-gene-ui-version=\"2.12.1\"] .popover-positioner-disable{margin-top:5px;position:inherit!important;transform:none!important}[data-gene-ui-version=\"2.12.1\"] .popover-track{width:100%}[data-gene-ui-version=\"2.12.1\"] .popover-content{background:var(--background);border-radius:var(--popover-border-radius);box-shadow:var(--popover-shadow);overflow:hidden;padding:0 0 env(safe-area-inset-bottom);transition:padding .4s;width:100%}[data-gene-ui-version=\"2.12.1\"] .popover-positioner.mobile-view .popover-content{-webkit-overflow-scrolling:auto;bottom:0;left:0;max-height:calc(100% - 10rem);overflow-x:hidden;overflow-y:auto;position:absolute;z-index:1}[data-gene-ui-version=\"2.12.1\"] .popover-positioner.mobile-view[style*=\"opacity: 0\"] .popover-content{transform:translateY(100%)}[data-gene-ui-version=\"2.12.1\"] .popover-positioner.mobile-view .popover-content{transform:translateY(0)}[data-gene-ui-version=\"2.12.1\"] .popover-mobile-backdrop{background:#0003;height:100%;left:0;opacity:1;position:absolute;top:0;width:100%;z-index:0}[data-gene-ui-version=\"2.12.1\"] .popover-footer,[data-gene-ui-version=\"2.12.1\"] .popover-header{background:var(--background);position:-webkit-sticky;position:sticky;z-index:1}[data-gene-ui-version=\"2.12.1\"] .popover-header{border-bottom:1px solid rgba(var(--background-sc-rgb),.1);top:0}[data-gene-ui-version=\"2.12.1\"] .popover-footer{align-items:stretch;border-top:1px solid rgba(var(--background-sc-rgb),.1);bottom:calc(env(safe-area-inset-bottom)*-1);display:flex;padding:0 0 env(safe-area-inset-bottom);transition:padding .4s}[data-gene-ui-version=\"2.12.1\"] .popover-body{position:relative;z-index:0}[data-gene-ui-version=\"2.12.1\"] .popover-search{padding:1.4rem 1.5rem}[data-gene-ui-version=\"2.12.1\"] .empty-data-holder{align-items:center;display:flex;height:19rem;justify-content:center;width:100%}[data-gene-ui-version=\"2.12.1\"] .popover-disabled{opacity:.5;pointer-events:none;transition:opacity .5s}";
1597
645
  styleInject(css_248z);
1598
646
 
1599
647
  const PopoverV2 = /*#__PURE__*/forwardRef((props, ref) => {
1600
- var _popoverRef$current;
648
+ var _popoverRef$current4;
1601
649
  const {
1602
650
  nativeOutsideClick,
1603
651
  extendTargetWidth,
@@ -1653,15 +701,18 @@ const PopoverV2 = /*#__PURE__*/forwardRef((props, ref) => {
1653
701
  setUpdateKey(Date.now());
1654
702
  }, [isMobile, cornerRadius]);
1655
703
  useEffect(() => {
1656
- if (popoverRef.current && popoverRef.current.offsetWidth) {
1657
- setTargetWidth(popoverRef.current.offsetWidth);
704
+ var _popoverRef$current;
705
+ if (popoverRef.current && (_popoverRef$current = popoverRef.current) !== null && _popoverRef$current !== void 0 && _popoverRef$current.offsetWidth) {
706
+ var _popoverRef$current2;
707
+ setTargetWidth((_popoverRef$current2 = popoverRef.current) === null || _popoverRef$current2 === void 0 ? void 0 : _popoverRef$current2.offsetWidth);
1658
708
  const debouncedHandleResize = debounce(() => {
1659
- setTargetWidth(popoverRef.current.offsetWidth);
709
+ var _popoverRef$current3;
710
+ setTargetWidth((_popoverRef$current3 = popoverRef.current) === null || _popoverRef$current3 === void 0 ? void 0 : _popoverRef$current3.offsetWidth);
1660
711
  }, 20);
1661
712
  window.addEventListener('resize', debouncedHandleResize);
1662
713
  return () => window.removeEventListener('resize', debouncedHandleResize);
1663
714
  }
1664
- }, [(_popoverRef$current = popoverRef.current) === null || _popoverRef$current === void 0 ? void 0 : _popoverRef$current.offsetWidth]);
715
+ }, [(_popoverRef$current4 = popoverRef.current) === null || _popoverRef$current4 === void 0 ? void 0 : _popoverRef$current4.offsetWidth]);
1665
716
 
1666
717
  /* *** START SWIPE FUNCTIONALITY *** */
1667
718
  const checkBodyContains = event => popoverBodyRef.current.contains(event.target);
@@ -1794,126 +845,126 @@ PopoverV2.propTypes = {
1794
845
  /**
1795
846
  * The component that need to be displayed in the Popover. Any valid React node
1796
847
  */
1797
- Content: propTypesExports.oneOfType([propTypesExports.node, propTypesExports.func]),
848
+ Content: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
1798
849
  /**
1799
850
  * The component that need to be displayed as Popover header. Any valid React node
1800
851
  */
1801
- Header: propTypesExports.oneOfType([propTypesExports.node, propTypesExports.func]),
852
+ Header: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
1802
853
  /**
1803
854
  * The component that need to be displayed as Popover footer. Any valid React node
1804
855
  */
1805
- Footer: propTypesExports.oneOfType([propTypesExports.node, propTypesExports.func]),
856
+ Footer: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
1806
857
  /**
1807
858
  * The component which click needs to trigger the Popover to open. Need to passed as child to Popover. Any valid React node
1808
859
  */
1809
- children: propTypesExports.node,
860
+ children: PropTypes.node,
1810
861
  /**
1811
862
  * The Popover will get the width of its child. The property will not work when "width" prop is specified
1812
863
  */
1813
- extendTargetWidth: propTypesExports.bool,
864
+ extendTargetWidth: PropTypes.bool,
1814
865
  /**
1815
866
  * The Popover "Content" minimum scroll height
1816
867
  */
1817
- minHeight: propTypesExports.number,
868
+ minHeight: PropTypes.number,
1818
869
  /**
1819
870
  * The Popover "Content" maximum scroll height. Will not work when the "screenType" is "mobile"
1820
871
  */
1821
- maxHeight: propTypesExports.number,
872
+ maxHeight: PropTypes.number,
1822
873
  /**
1823
874
  * Use this prop to control the Popover. Note the component will start not to open and close automatically
1824
875
  */
1825
- isOpen: propTypesExports.bool,
876
+ isOpen: PropTypes.bool,
1826
877
  /**
1827
878
  * Popover position to be displayed
1828
879
  */
1829
- position: propTypesExports.oneOfType([propTypesExports.oneOf(popoverV2Config.position), propTypesExports.arrayOf(propTypesExports.oneOf(popoverV2Config.position))]),
880
+ position: PropTypes.oneOfType([PropTypes.oneOf(popoverV2Config.position), PropTypes.arrayOf(PropTypes.oneOf(popoverV2Config.position))]),
1830
881
  /**
1831
882
  * Will called each time the popover need to be toggled(child click, close button click, backdrop click).
1832
883
  * (event: Event, isOpen: bool) => void
1833
884
  */
1834
- toggleHandler: propTypesExports.func,
885
+ toggleHandler: PropTypes.func,
1835
886
  /**
1836
887
  * Possible values are start, center, and end.
1837
888
  * If start is specified, the popover content's top or left location is aligned with its target's.
1838
889
  * With end specified, the content's bottom or right location is aligned with its target's.
1839
890
  * If center is specified, the popover content and target's centers are aligned.
1840
891
  */
1841
- align: propTypesExports.oneOf(popoverV2Config.align),
892
+ align: PropTypes.oneOf(popoverV2Config.align),
1842
893
  /**
1843
894
  * If you'd like to apply styles to the single container div that your popover content is rendered within via stylesheets,
1844
895
  * you can specify a custom className for the container here.
1845
896
  */
1846
- className: propTypesExports.string,
897
+ className: PropTypes.string,
1847
898
  /**
1848
899
  * This number determines the gap, in pixels, between your target content and your popover content
1849
900
  */
1850
- padding: propTypesExports.number,
901
+ padding: PropTypes.number,
1851
902
  /**
1852
903
  * If this property is enabled, rather than the popover content repositioning on a boundary collision,
1853
904
  * the popover content container will move beyond the window's bounds.
1854
905
  * You are, however, supplied with nudgedLeft and nudgedTop values, so you may choose to handle content overflow as you wish.
1855
906
  */
1856
- disableReposition: propTypesExports.bool,
907
+ disableReposition: PropTypes.bool,
1857
908
  /**
1858
909
  * Popover corner radius
1859
910
  */
1860
- cornerRadius: propTypesExports.oneOf(popoverV2Config.cornerRadius),
911
+ cornerRadius: PropTypes.oneOf(popoverV2Config.cornerRadius),
1861
912
  /**
1862
913
  * The switch between mobile and desktop version of Popover will be applied automatically, when the prop is not specified.
1863
914
  * When the prop is present it must be changed from outside.
1864
915
  */
1865
- screenType: propTypesExports.oneOf(screenTypes),
916
+ screenType: PropTypes.oneOf(screenTypes),
1866
917
  /**
1867
918
  * Specify does Popover needs to be toggled on child click
1868
919
  */
1869
- behave: propTypesExports.oneOf(popoverV2Config.behave),
920
+ behave: PropTypes.oneOf(popoverV2Config.behave),
1870
921
  /**
1871
922
  * Given content prop can have its own scroll, and with this props we can use/not use default scroll that has popover
1872
923
  */
1873
- scrollbarNeeded: propTypesExports.bool,
924
+ scrollbarNeeded: PropTypes.bool,
1874
925
  /**
1875
926
  * Popover content ref
1876
927
  */
1877
- contentRef: propTypesExports.oneOfType([propTypesExports.func, propTypesExports.shape({
1878
- current: propTypesExports.any
928
+ contentRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
929
+ current: PropTypes.any
1879
930
  })]),
1880
- disabled: propTypesExports.bool,
1881
- getScrollRef: propTypesExports.func,
931
+ disabled: PropTypes.bool,
932
+ getScrollRef: PropTypes.func,
1882
933
  /**
1883
934
  * This number specifies the inset around your containerParent's border
1884
935
  * that boundary violations are determined at. Defaults to 0. Can be negative.
1885
936
  */
1886
- boundaryInset: propTypesExports.number,
937
+ boundaryInset: PropTypes.number,
1887
938
  /**
1888
939
  * If you want to apply styles to the popup tracker div where your children are using
1889
940
  * stylesheets, you can provide a custom class name for the container here.
1890
941
  */
1891
- trackClassName: propTypesExports.string,
942
+ trackClassName: PropTypes.string,
1892
943
  /*
1893
944
  * After DOWN swipe (SwipeEventData) => void
1894
945
  */
1895
- onSwipedDown: propTypesExports.func,
1896
- swipeable: propTypesExports.bool,
946
+ onSwipedDown: PropTypes.func,
947
+ swipeable: PropTypes.bool,
1897
948
  /*
1898
949
  * If react-tiny-popover detects a click event outside of the target and outside
1899
950
  * of the popover, you may handle this event here, in the form of (e: MouseEvent) => void.
1900
951
  */
1901
- onClickOutside: propTypesExports.func,
1902
- nativeOutsideClick: propTypesExports.func,
952
+ onClickOutside: PropTypes.func,
953
+ nativeOutsideClick: PropTypes.func,
1903
954
  /*
1904
955
  * props for scrollbar
1905
956
  */
1906
- scrollbarProps: propTypesExports.shape({
957
+ scrollbarProps: PropTypes.shape({
1907
958
  ...CustomScrollbar.propTypes
1908
959
  }),
1909
960
  /*
1910
961
  * When disableTransform is true and containerParent has ref.current, the popover generates in a dropdown wrapper instead of closing the body tag, and the position will not calculate.
1911
962
  */
1912
- disableTransform: propTypesExports.bool,
963
+ disableTransform: PropTypes.bool,
1913
964
  /*
1914
965
  * Provide an HTML element ref here to have your popover content appended to that element rather than document.body. This is useful if you'd like your popover to sit at a particular place within the DOM.
1915
966
  */
1916
- containerParent: propTypesExports.object
967
+ containerParent: PropTypes.object
1917
968
  };
1918
969
  PopoverV2.defaultProps = {
1919
970
  cornerRadius: popoverV2Config.cornerRadius[0],
@@ -1935,4 +986,4 @@ PopoverV2.defaultProps = {
1935
986
  nativeOutsideClick: noop
1936
987
  };
1937
988
 
1938
- export { PopoverV2 as P, jsxRuntimeExports as j };
989
+ export { PopoverV2 as default };