@fluentui/react-utilities 9.7.1 → 9.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/.swcrc +30 -0
  2. package/CHANGELOG.json +34 -1
  3. package/CHANGELOG.md +14 -2
  4. package/dist/index.d.ts +15 -3
  5. package/lib/compose/getSlots.js +3 -3
  6. package/lib/compose/getSlots.js.map +1 -1
  7. package/lib/compose/index.js.map +1 -1
  8. package/lib/compose/isResolvedShorthand.js.map +1 -1
  9. package/lib/compose/resolveShorthand.js.map +1 -1
  10. package/lib/compose/types.js +1 -1
  11. package/lib/compose/types.js.map +1 -1
  12. package/lib/events/index.js.map +1 -1
  13. package/lib/events/mouseTouchHelpers.js +1 -0
  14. package/lib/events/mouseTouchHelpers.js.map +1 -1
  15. package/lib/hooks/index.js.map +1 -1
  16. package/lib/hooks/useControllableState.js.map +1 -1
  17. package/lib/hooks/useEventCallback.js.map +1 -1
  18. package/lib/hooks/useFirstMount.js.map +1 -1
  19. package/lib/hooks/useForceUpdate.js.map +1 -1
  20. package/lib/hooks/useId.js.map +1 -1
  21. package/lib/hooks/useIsomorphicLayoutEffect.js +1 -2
  22. package/lib/hooks/useIsomorphicLayoutEffect.js.map +1 -1
  23. package/lib/hooks/useMergedRefs.js.map +1 -1
  24. package/lib/hooks/useOnClickOutside.js +16 -9
  25. package/lib/hooks/useOnClickOutside.js.map +1 -1
  26. package/lib/hooks/useOnScrollOutside.js +3 -1
  27. package/lib/hooks/useOnScrollOutside.js.map +1 -1
  28. package/lib/hooks/usePrevious.js.map +1 -1
  29. package/lib/hooks/useScrollbarWidth.js.map +1 -1
  30. package/lib/hooks/useTimeout.js.map +1 -1
  31. package/lib/index.js.map +1 -1
  32. package/lib/ssr/SSRContext.js +2 -2
  33. package/lib/ssr/SSRContext.js.map +1 -1
  34. package/lib/ssr/canUseDOM.js +1 -2
  35. package/lib/ssr/canUseDOM.js.map +1 -1
  36. package/lib/ssr/index.js.map +1 -1
  37. package/lib/trigger/applyTriggerPropsToChildren.js.map +1 -1
  38. package/lib/trigger/getTriggerChild.js.map +1 -1
  39. package/lib/trigger/index.js.map +1 -1
  40. package/lib/trigger/isFluentTrigger.js +1 -0
  41. package/lib/trigger/isFluentTrigger.js.map +1 -1
  42. package/lib/trigger/types.js +1 -1
  43. package/lib/trigger/types.js.map +1 -1
  44. package/lib/utils/clamp.js +1 -2
  45. package/lib/utils/clamp.js.map +1 -1
  46. package/lib/utils/getNativeElementProps.js +2 -2
  47. package/lib/utils/getNativeElementProps.js.map +1 -1
  48. package/lib/utils/getRTLSafeKey.js +1 -2
  49. package/lib/utils/getRTLSafeKey.js.map +1 -1
  50. package/lib/utils/getReactCallbackName.js +1 -0
  51. package/lib/utils/getReactCallbackName.js.map +1 -1
  52. package/lib/utils/index.js.map +1 -1
  53. package/lib/utils/isHTMLElement.js +12 -7
  54. package/lib/utils/isHTMLElement.js.map +1 -1
  55. package/lib/utils/isInteractiveHTMLElement.js.map +1 -1
  56. package/lib/utils/mergeCallbacks.js +1 -2
  57. package/lib/utils/mergeCallbacks.js.map +1 -1
  58. package/lib/utils/omit.js +1 -2
  59. package/lib/utils/omit.js.map +1 -1
  60. package/lib/utils/properties.js +24 -51
  61. package/lib/utils/properties.js.map +1 -1
  62. package/lib-commonjs/compose/getSlots.js +48 -55
  63. package/lib-commonjs/compose/getSlots.js.map +1 -1
  64. package/lib-commonjs/compose/index.js +8 -7
  65. package/lib-commonjs/compose/index.js.map +1 -1
  66. package/lib-commonjs/compose/isResolvedShorthand.js +9 -37
  67. package/lib-commonjs/compose/isResolvedShorthand.js.map +1 -1
  68. package/lib-commonjs/compose/resolveShorthand.js +25 -32
  69. package/lib-commonjs/compose/resolveShorthand.js.map +1 -1
  70. package/lib-commonjs/compose/types.js +5 -2
  71. package/lib-commonjs/compose/types.js.map +1 -1
  72. package/lib-commonjs/events/index.js +5 -4
  73. package/lib-commonjs/events/index.js.map +1 -1
  74. package/lib-commonjs/events/mouseTouchHelpers.js +40 -37
  75. package/lib-commonjs/events/mouseTouchHelpers.js.map +1 -1
  76. package/lib-commonjs/hooks/index.js +16 -15
  77. package/lib-commonjs/hooks/index.js.map +1 -1
  78. package/lib-commonjs/hooks/useControllableState.js +63 -64
  79. package/lib-commonjs/hooks/useControllableState.js.map +1 -1
  80. package/lib-commonjs/hooks/useEventCallback.js +25 -31
  81. package/lib-commonjs/hooks/useEventCallback.js.map +1 -1
  82. package/lib-commonjs/hooks/useFirstMount.js +15 -23
  83. package/lib-commonjs/hooks/useFirstMount.js.map +1 -1
  84. package/lib-commonjs/hooks/useForceUpdate.js +9 -11
  85. package/lib-commonjs/hooks/useForceUpdate.js.map +1 -1
  86. package/lib-commonjs/hooks/useId.js +47 -46
  87. package/lib-commonjs/hooks/useId.js.map +1 -1
  88. package/lib-commonjs/hooks/useIsomorphicLayoutEffect.js +10 -16
  89. package/lib-commonjs/hooks/useIsomorphicLayoutEffect.js.map +1 -1
  90. package/lib-commonjs/hooks/useMergedRefs.js +25 -27
  91. package/lib-commonjs/hooks/useMergedRefs.js.map +1 -1
  92. package/lib-commonjs/hooks/useOnClickOutside.js +118 -114
  93. package/lib-commonjs/hooks/useOnClickOutside.js.map +1 -1
  94. package/lib-commonjs/hooks/useOnScrollOutside.js +35 -36
  95. package/lib-commonjs/hooks/useOnScrollOutside.js.map +1 -1
  96. package/lib-commonjs/hooks/usePrevious.js +17 -15
  97. package/lib-commonjs/hooks/usePrevious.js.map +1 -1
  98. package/lib-commonjs/hooks/useScrollbarWidth.js +32 -32
  99. package/lib-commonjs/hooks/useScrollbarWidth.js.map +1 -1
  100. package/lib-commonjs/hooks/useTimeout.js +30 -30
  101. package/lib-commonjs/hooks/useTimeout.js.map +1 -1
  102. package/lib-commonjs/index.js +52 -214
  103. package/lib-commonjs/index.js.map +1 -1
  104. package/lib-commonjs/ssr/SSRContext.js +57 -59
  105. package/lib-commonjs/ssr/SSRContext.js.map +1 -1
  106. package/lib-commonjs/ssr/canUseDOM.js +12 -12
  107. package/lib-commonjs/ssr/canUseDOM.js.map +1 -1
  108. package/lib-commonjs/ssr/index.js +6 -5
  109. package/lib-commonjs/ssr/index.js.map +1 -1
  110. package/lib-commonjs/trigger/applyTriggerPropsToChildren.js +29 -31
  111. package/lib-commonjs/trigger/applyTriggerPropsToChildren.js.map +1 -1
  112. package/lib-commonjs/trigger/getTriggerChild.js +16 -36
  113. package/lib-commonjs/trigger/getTriggerChild.js.map +1 -1
  114. package/lib-commonjs/trigger/index.js +8 -7
  115. package/lib-commonjs/trigger/index.js.map +1 -1
  116. package/lib-commonjs/trigger/isFluentTrigger.js +10 -11
  117. package/lib-commonjs/trigger/isFluentTrigger.js.map +1 -1
  118. package/lib-commonjs/trigger/types.js +5 -2
  119. package/lib-commonjs/trigger/types.js.map +1 -1
  120. package/lib-commonjs/utils/clamp.js +10 -9
  121. package/lib-commonjs/utils/clamp.js.map +1 -1
  122. package/lib-commonjs/utils/getNativeElementProps.js +54 -61
  123. package/lib-commonjs/utils/getNativeElementProps.js.map +1 -1
  124. package/lib-commonjs/utils/getRTLSafeKey.js +22 -21
  125. package/lib-commonjs/utils/getRTLSafeKey.js.map +1 -1
  126. package/lib-commonjs/utils/getReactCallbackName.js +24 -24
  127. package/lib-commonjs/utils/getReactCallbackName.js.map +1 -1
  128. package/lib-commonjs/utils/index.js +12 -11
  129. package/lib-commonjs/utils/index.js.map +1 -1
  130. package/lib-commonjs/utils/isHTMLElement.js +22 -15
  131. package/lib-commonjs/utils/isHTMLElement.js.map +1 -1
  132. package/lib-commonjs/utils/isInteractiveHTMLElement.js +20 -24
  133. package/lib-commonjs/utils/isInteractiveHTMLElement.js.map +1 -1
  134. package/lib-commonjs/utils/mergeCallbacks.js +14 -13
  135. package/lib-commonjs/utils/mergeCallbacks.js.map +1 -1
  136. package/lib-commonjs/utils/omit.js +18 -17
  137. package/lib-commonjs/utils/omit.js.map +1 -1
  138. package/lib-commonjs/utils/properties.js +327 -223
  139. package/lib-commonjs/utils/properties.js.map +1 -1
  140. package/package.json +5 -4
  141. package/lib-amd/compose/getSlots.js +0 -58
  142. package/lib-amd/compose/getSlots.js.map +0 -1
  143. package/lib-amd/compose/index.js +0 -9
  144. package/lib-amd/compose/index.js.map +0 -1
  145. package/lib-amd/compose/isResolvedShorthand.js +0 -40
  146. package/lib-amd/compose/isResolvedShorthand.js.map +0 -1
  147. package/lib-amd/compose/resolveShorthand.js +0 -27
  148. package/lib-amd/compose/resolveShorthand.js.map +0 -1
  149. package/lib-amd/compose/types.js +0 -5
  150. package/lib-amd/compose/types.js.map +0 -1
  151. package/lib-amd/events/index.js +0 -6
  152. package/lib-amd/events/index.js.map +0 -1
  153. package/lib-amd/events/mouseTouchHelpers.js +0 -39
  154. package/lib-amd/events/mouseTouchHelpers.js.map +0 -1
  155. package/lib-amd/hooks/index.js +0 -17
  156. package/lib-amd/hooks/index.js.map +0 -1
  157. package/lib-amd/hooks/useControllableState.js +0 -81
  158. package/lib-amd/hooks/useControllableState.js.map +0 -1
  159. package/lib-amd/hooks/useEventCallback.js +0 -36
  160. package/lib-amd/hooks/useEventCallback.js.map +0 -1
  161. package/lib-amd/hooks/useFirstMount.js +0 -26
  162. package/lib-amd/hooks/useFirstMount.js.map +0 -1
  163. package/lib-amd/hooks/useForceUpdate.js +0 -14
  164. package/lib-amd/hooks/useForceUpdate.js.map +0 -1
  165. package/lib-amd/hooks/useId.js +0 -54
  166. package/lib-amd/hooks/useId.js.map +0 -1
  167. package/lib-amd/hooks/useIsomorphicLayoutEffect.js +0 -17
  168. package/lib-amd/hooks/useIsomorphicLayoutEffect.js.map +0 -1
  169. package/lib-amd/hooks/useMergedRefs.js +0 -34
  170. package/lib-amd/hooks/useMergedRefs.js.map +0 -1
  171. package/lib-amd/hooks/useOnClickOutside.js +0 -114
  172. package/lib-amd/hooks/useOnClickOutside.js.map +0 -1
  173. package/lib-amd/hooks/useOnScrollOutside.js +0 -31
  174. package/lib-amd/hooks/useOnScrollOutside.js.map +0 -1
  175. package/lib-amd/hooks/usePrevious.js +0 -17
  176. package/lib-amd/hooks/usePrevious.js.map +0 -1
  177. package/lib-amd/hooks/useScrollbarWidth.js +0 -32
  178. package/lib-amd/hooks/useScrollbarWidth.js.map +0 -1
  179. package/lib-amd/hooks/useTimeout.js +0 -33
  180. package/lib-amd/hooks/useTimeout.js.map +0 -1
  181. package/lib-amd/index.js +0 -40
  182. package/lib-amd/index.js.map +0 -1
  183. package/lib-amd/ssr/SSRContext.js +0 -69
  184. package/lib-amd/ssr/SSRContext.js.map +0 -1
  185. package/lib-amd/ssr/canUseDOM.js +0 -16
  186. package/lib-amd/ssr/canUseDOM.js.map +0 -1
  187. package/lib-amd/ssr/index.js +0 -7
  188. package/lib-amd/ssr/index.js.map +0 -1
  189. package/lib-amd/trigger/applyTriggerPropsToChildren.js +0 -40
  190. package/lib-amd/trigger/applyTriggerPropsToChildren.js.map +0 -1
  191. package/lib-amd/trigger/getTriggerChild.js +0 -40
  192. package/lib-amd/trigger/getTriggerChild.js.map +0 -1
  193. package/lib-amd/trigger/index.js +0 -9
  194. package/lib-amd/trigger/index.js.map +0 -1
  195. package/lib-amd/trigger/isFluentTrigger.js +0 -15
  196. package/lib-amd/trigger/isFluentTrigger.js.map +0 -1
  197. package/lib-amd/trigger/types.js +0 -5
  198. package/lib-amd/trigger/types.js.map +0 -1
  199. package/lib-amd/utils/clamp.js +0 -16
  200. package/lib-amd/utils/clamp.js.map +0 -1
  201. package/lib-amd/utils/getNativeElementProps.js +0 -64
  202. package/lib-amd/utils/getNativeElementProps.js.map +0 -1
  203. package/lib-amd/utils/getRTLSafeKey.js +0 -24
  204. package/lib-amd/utils/getRTLSafeKey.js.map +0 -1
  205. package/lib-amd/utils/index.js +0 -13
  206. package/lib-amd/utils/index.js.map +0 -1
  207. package/lib-amd/utils/isHTMLElement.js +0 -22
  208. package/lib-amd/utils/isHTMLElement.js.map +0 -1
  209. package/lib-amd/utils/isInteractiveHTMLElement.js +0 -25
  210. package/lib-amd/utils/isInteractiveHTMLElement.js.map +0 -1
  211. package/lib-amd/utils/mergeCallbacks.js +0 -40
  212. package/lib-amd/utils/mergeCallbacks.js.map +0 -1
  213. package/lib-amd/utils/omit.js +0 -31
  214. package/lib-amd/utils/omit.js.map +0 -1
  215. package/lib-amd/utils/properties.js +0 -450
  216. package/lib-amd/utils/properties.js.map +0 -1
@@ -1,40 +1,39 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "useOnScrollOutside", {
6
+ enumerable: true,
7
+ get: ()=>useOnScrollOutside
5
8
  });
6
- exports.useOnScrollOutside = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const useEventCallback_1 = /*#__PURE__*/require("./useEventCallback");
9
- /**
10
- * @internal
11
- * Utility to perform checks where a click/touch event was made outside a component
12
- */
13
- const useOnScrollOutside = options => {
14
- const {
15
- refs,
16
- callback,
17
- element,
18
- disabled,
19
- contains: containsProp
20
- } = options;
21
- const listener = useEventCallback_1.useEventCallback(ev => {
22
- const contains = containsProp || ((parent, child) => !!(parent === null || parent === void 0 ? void 0 : parent.contains(child)));
23
- const isOutside = refs.every(ref => !contains(ref.current || null, ev.target));
24
- if (isOutside && !disabled) {
25
- callback(ev);
26
- }
27
- });
28
- React.useEffect(() => {
29
- if (!disabled) {
30
- element === null || element === void 0 ? void 0 : element.addEventListener('wheel', listener);
31
- element === null || element === void 0 ? void 0 : element.addEventListener('touchmove', listener);
32
- }
33
- return () => {
34
- element === null || element === void 0 ? void 0 : element.removeEventListener('wheel', listener);
35
- element === null || element === void 0 ? void 0 : element.removeEventListener('touchmove', listener);
36
- };
37
- }, [listener, element, disabled]);
38
- };
39
- exports.useOnScrollOutside = useOnScrollOutside;
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _useEventCallback = require("./useEventCallback");
12
+ const useOnScrollOutside = (options)=>{
13
+ const { refs , callback , element , disabled , contains: containsProp } = options;
14
+ const listener = (0, _useEventCallback.useEventCallback)((ev)=>{
15
+ const contains = containsProp || ((parent, child)=>{
16
+ return !!(parent === null || parent === void 0 ? void 0 : parent.contains(child));
17
+ });
18
+ const isOutside = refs.every((ref)=>!contains(ref.current || null, ev.target));
19
+ if (isOutside && !disabled) {
20
+ callback(ev);
21
+ }
22
+ });
23
+ _react.useEffect(()=>{
24
+ if (!disabled) {
25
+ element === null || element === void 0 ? void 0 : element.addEventListener('wheel', listener);
26
+ element === null || element === void 0 ? void 0 : element.addEventListener('touchmove', listener);
27
+ }
28
+ return ()=>{
29
+ element === null || element === void 0 ? void 0 : element.removeEventListener('wheel', listener);
30
+ element === null || element === void 0 ? void 0 : element.removeEventListener('touchmove', listener);
31
+ };
32
+ }, [
33
+ listener,
34
+ element,
35
+ disabled
36
+ ]);
37
+ }; //# sourceMappingURL=useOnScrollOutside.js.map
38
+
40
39
  //# sourceMappingURL=useOnScrollOutside.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","useEventCallback_1","useOnScrollOutside","options","refs","callback","element","disabled","contains","containsProp","listener","useEventCallback","ev","parent","child","isOutside","every","ref","current","target","useEffect","addEventListener","removeEventListener","exports"],"sources":["../src/packages/react-components/react-utilities/src/hooks/useOnScrollOutside.ts"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback } from './useEventCallback';\nimport type { UseOnClickOrScrollOutsideOptions } from './useOnClickOutside';\n\n/**\n * @internal\n * Utility to perform checks where a click/touch event was made outside a component\n */\nexport const useOnScrollOutside = (options: UseOnClickOrScrollOutsideOptions) => {\n const { refs, callback, element, disabled, contains: containsProp } = options;\n\n const listener = useEventCallback((ev: MouseEvent | TouchEvent) => {\n const contains: UseOnClickOrScrollOutsideOptions['contains'] =\n containsProp || ((parent, child) => !!parent?.contains(child));\n\n const isOutside = refs.every(ref => !contains(ref.current || null, ev.target as HTMLElement));\n if (isOutside && !disabled) {\n callback(ev);\n }\n });\n\n React.useEffect(() => {\n if (!disabled) {\n element?.addEventListener('wheel', listener);\n element?.addEventListener('touchmove', listener);\n }\n\n return () => {\n element?.removeEventListener('wheel', listener);\n element?.removeEventListener('touchmove', listener);\n };\n }, [listener, element, disabled]);\n};\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,kBAAA,gBAAAD,OAAA;AAGA;;;;AAIO,MAAME,kBAAkB,GAAIC,OAAyC,IAAI;EAC9E,MAAM;IAAEC,IAAI;IAAEC,QAAQ;IAAEC,OAAO;IAAEC,QAAQ;IAAEC,QAAQ,EAAEC;EAAY,CAAE,GAAGN,OAAO;EAE7E,MAAMO,QAAQ,GAAGT,kBAAA,CAAAU,gBAAgB,CAAEC,EAA2B,IAAI;IAChE,MAAMJ,QAAQ,GACZC,YAAY,KAAK,CAACI,MAAM,EAAEC,KAAK,KAAK,CAAC,EAACD,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEL,QAAQ,CAACM,KAAK,CAAC,EAAC;IAEhE,MAAMC,SAAS,GAAGX,IAAI,CAACY,KAAK,CAACC,GAAG,IAAI,CAACT,QAAQ,CAACS,GAAG,CAACC,OAAO,IAAI,IAAI,EAAEN,EAAE,CAACO,MAAqB,CAAC,CAAC;IAC7F,IAAIJ,SAAS,IAAI,CAACR,QAAQ,EAAE;MAC1BF,QAAQ,CAACO,EAAE,CAAC;;EAEhB,CAAC,CAAC;EAEFb,KAAK,CAACqB,SAAS,CAAC,MAAK;IACnB,IAAI,CAACb,QAAQ,EAAE;MACbD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEe,gBAAgB,CAAC,OAAO,EAAEX,QAAQ,CAAC;MAC5CJ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEe,gBAAgB,CAAC,WAAW,EAAEX,QAAQ,CAAC;;IAGlD,OAAO,MAAK;MACVJ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEgB,mBAAmB,CAAC,OAAO,EAAEZ,QAAQ,CAAC;MAC/CJ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEgB,mBAAmB,CAAC,WAAW,EAAEZ,QAAQ,CAAC;IACrD,CAAC;EACH,CAAC,EAAE,CAACA,QAAQ,EAAEJ,OAAO,EAAEC,QAAQ,CAAC,CAAC;AACnC,CAAC;AAxBYgB,OAAA,CAAArB,kBAAkB,GAAAA,kBAAA"}
1
+ {"version":3,"sources":["../../lib/hooks/useOnScrollOutside.js"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback } from './useEventCallback';\n/**\n * @internal\n * Utility to perform checks where a click/touch event was made outside a component\n */\nexport const useOnScrollOutside = options => {\n const {\n refs,\n callback,\n element,\n disabled,\n contains: containsProp\n } = options;\n const listener = useEventCallback(ev => {\n const contains = containsProp || ((parent, child) => {\n return !!(parent === null || parent === void 0 ? void 0 : parent.contains(child));\n });\n const isOutside = refs.every(ref => !contains(ref.current || null, ev.target));\n if (isOutside && !disabled) {\n callback(ev);\n }\n });\n React.useEffect(() => {\n if (!disabled) {\n element === null || element === void 0 ? void 0 : element.addEventListener('wheel', listener);\n element === null || element === void 0 ? void 0 : element.addEventListener('touchmove', listener);\n }\n return () => {\n element === null || element === void 0 ? void 0 : element.removeEventListener('wheel', listener);\n element === null || element === void 0 ? void 0 : element.removeEventListener('touchmove', listener);\n };\n }, [listener, element, disabled]);\n};\n//# sourceMappingURL=useOnScrollOutside.js.map"],"names":["useOnScrollOutside","options","refs","callback","element","disabled","contains","containsProp","listener","useEventCallback","ev","parent","child","isOutside","every","ref","current","target","React","useEffect","addEventListener","removeEventListener"],"mappings":";;;;+BAMaA;;aAAAA;;;6DANU;kCACU;AAK1B,MAAMA,qBAAqBC,CAAAA,UAAW;IAC3C,MAAM,EACJC,KAAI,EACJC,SAAQ,EACRC,QAAO,EACPC,SAAQ,EACRC,UAAUC,aAAY,EACvB,GAAGN;IACJ,MAAMO,WAAWC,IAAAA,kCAAgB,EAACC,CAAAA,KAAM;QACtC,MAAMJ,WAAWC,gBAAiB,CAAA,CAACI,QAAQC,QAAU;YACnD,OAAO,CAAC,CAAED,CAAAA,WAAW,IAAI,IAAIA,WAAW,KAAK,IAAI,KAAK,IAAIA,OAAOL,QAAQ,CAACM,MAAM,AAAD;QACjF,CAAA;QACA,MAAMC,YAAYX,KAAKY,KAAK,CAACC,CAAAA,MAAO,CAACT,SAASS,IAAIC,OAAO,IAAI,IAAI,EAAEN,GAAGO,MAAM;QAC5E,IAAIJ,aAAa,CAACR,UAAU;YAC1BF,SAASO;QACX,CAAC;IACH;IACAQ,OAAMC,SAAS,CAAC,IAAM;QACpB,IAAI,CAACd,UAAU;YACbD,YAAY,IAAI,IAAIA,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQgB,gBAAgB,CAAC,SAASZ,SAAS;YAC7FJ,YAAY,IAAI,IAAIA,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQgB,gBAAgB,CAAC,aAAaZ,SAAS;QACnG,CAAC;QACD,OAAO,IAAM;YACXJ,YAAY,IAAI,IAAIA,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQiB,mBAAmB,CAAC,SAASb,SAAS;YAChGJ,YAAY,IAAI,IAAIA,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQiB,mBAAmB,CAAC,aAAab,SAAS;QACtG;IACF,GAAG;QAACA;QAAUJ;QAASC;KAAS;AAClC,GACA,8CAA8C"}
@@ -1,19 +1,21 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "usePrevious", {
6
+ enumerable: true,
7
+ get: ()=>usePrevious
5
8
  });
6
- exports.usePrevious = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- /**
9
- * @internal
10
- */
11
- const usePrevious = value => {
12
- const ref = React.useRef(null);
13
- React.useEffect(() => {
14
- ref.current = value;
15
- }, [value]);
16
- return ref.current;
17
- };
18
- exports.usePrevious = usePrevious;
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const usePrevious = (value)=>{
12
+ const ref = _react.useRef(null);
13
+ _react.useEffect(()=>{
14
+ ref.current = value;
15
+ }, [
16
+ value
17
+ ]);
18
+ return ref.current;
19
+ }; //# sourceMappingURL=usePrevious.js.map
20
+
19
21
  //# sourceMappingURL=usePrevious.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","usePrevious","value","ref","useRef","useEffect","current","exports"],"sources":["../src/packages/react-components/react-utilities/src/hooks/usePrevious.ts"],"sourcesContent":["import * as React from 'react';\n\n/**\n * @internal\n */\nexport const usePrevious = <ValueType = unknown>(value: ValueType) => {\n const ref = React.useRef<ValueType | null>(null);\n React.useEffect(() => {\n ref.current = value;\n }, [value]);\n return ref.current;\n};\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AAEA;;;AAGO,MAAMC,WAAW,GAAyBC,KAAgB,IAAI;EACnE,MAAMC,GAAG,GAAGJ,KAAK,CAACK,MAAM,CAAmB,IAAI,CAAC;EAChDL,KAAK,CAACM,SAAS,CAAC,MAAK;IACnBF,GAAG,CAACG,OAAO,GAAGJ,KAAK;EACrB,CAAC,EAAE,CAACA,KAAK,CAAC,CAAC;EACX,OAAOC,GAAG,CAACG,OAAO;AACpB,CAAC;AANYC,OAAA,CAAAN,WAAW,GAAAA,WAAA"}
1
+ {"version":3,"sources":["../../lib/hooks/usePrevious.js"],"sourcesContent":["import * as React from 'react';\n/**\n * @internal\n */\nexport const usePrevious = value => {\n const ref = React.useRef(null);\n React.useEffect(() => {\n ref.current = value;\n }, [value]);\n return ref.current;\n};\n//# sourceMappingURL=usePrevious.js.map"],"names":["usePrevious","value","ref","React","useRef","useEffect","current"],"mappings":";;;;+BAIaA;;aAAAA;;;6DAJU;AAIhB,MAAMA,cAAcC,CAAAA,QAAS;IAClC,MAAMC,MAAMC,OAAMC,MAAM,CAAC,IAAI;IAC7BD,OAAME,SAAS,CAAC,IAAM;QACpBH,IAAII,OAAO,GAAGL;IAChB,GAAG;QAACA;KAAM;IACV,OAAOC,IAAII,OAAO;AACpB,GACA,uCAAuC"}
@@ -1,37 +1,37 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "useScrollbarWidth", {
6
+ enumerable: true,
7
+ get: ()=>useScrollbarWidth
5
8
  });
6
- exports.useScrollbarWidth = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const cache = /*#__PURE__*/new WeakMap();
9
- /**
10
- * @returns The width in pixels of the scrollbar in the user agent
11
- */
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const cache = /*#__PURE__*/ new WeakMap();
12
12
  function useScrollbarWidth(options) {
13
- const {
14
- targetDocument,
15
- force
16
- } = options;
17
- return React.useMemo(() => {
18
- if (!targetDocument) {
19
- return 0;
20
- }
21
- if (!force && cache.has(targetDocument)) {
22
- return cache.get(targetDocument);
23
- }
24
- const outer = targetDocument.createElement('div');
25
- outer.style.visibility = 'hidden';
26
- outer.style.overflow = 'scroll';
27
- const inner = targetDocument.createElement('div');
28
- outer.appendChild(inner);
29
- targetDocument.body.appendChild(outer);
30
- const scrollbarWidth = outer.offsetWidth - inner.offsetWidth;
31
- outer.remove();
32
- cache.set(targetDocument, scrollbarWidth);
33
- return scrollbarWidth;
34
- }, [targetDocument, force]);
35
- }
36
- exports.useScrollbarWidth = useScrollbarWidth;
13
+ const { targetDocument , force } = options;
14
+ return _react.useMemo(()=>{
15
+ if (!targetDocument) {
16
+ return 0;
17
+ }
18
+ if (!force && cache.has(targetDocument)) {
19
+ return cache.get(targetDocument);
20
+ }
21
+ const outer = targetDocument.createElement('div');
22
+ outer.style.visibility = 'hidden';
23
+ outer.style.overflow = 'scroll';
24
+ const inner = targetDocument.createElement('div');
25
+ outer.appendChild(inner);
26
+ targetDocument.body.appendChild(outer);
27
+ const scrollbarWidth = outer.offsetWidth - inner.offsetWidth;
28
+ outer.remove();
29
+ cache.set(targetDocument, scrollbarWidth);
30
+ return scrollbarWidth;
31
+ }, [
32
+ targetDocument,
33
+ force
34
+ ]);
35
+ } //# sourceMappingURL=useScrollbarWidth.js.map
36
+
37
37
  //# sourceMappingURL=useScrollbarWidth.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","cache","WeakMap","useScrollbarWidth","options","targetDocument","force","useMemo","has","get","outer","createElement","style","visibility","overflow","inner","appendChild","body","scrollbarWidth","offsetWidth","remove","set","exports"],"sources":["../src/packages/react-components/react-utilities/src/hooks/useScrollbarWidth.ts"],"sourcesContent":["import * as React from 'react';\n\nconst cache = new WeakMap<Document, number>();\n\ninterface UseScrollbarWidthOptions {\n /**\n * Reference document to measure the scrollbar width\n */\n targetDocument: Document | null | undefined;\n\n /**\n * Does not use the cache and recalculates the scrollbar width\n */\n force?: boolean;\n}\n\n/**\n * @returns The width in pixels of the scrollbar in the user agent\n */\nexport function useScrollbarWidth(options: UseScrollbarWidthOptions) {\n const { targetDocument, force } = options;\n return React.useMemo(() => {\n if (!targetDocument) {\n return 0;\n }\n\n if (!force && cache.has(targetDocument)) {\n return cache.get(targetDocument);\n }\n\n const outer = targetDocument.createElement('div');\n outer.style.visibility = 'hidden';\n outer.style.overflow = 'scroll';\n\n const inner = targetDocument.createElement('div');\n outer.appendChild(inner);\n\n targetDocument.body.appendChild(outer);\n const scrollbarWidth = outer.offsetWidth - inner.offsetWidth;\n outer.remove();\n cache.set(targetDocument, scrollbarWidth);\n return scrollbarWidth;\n }, [targetDocument, force]);\n}\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AAEA,MAAMC,KAAK,gBAAG,IAAIC,OAAO,EAAoB;AAc7C;;;AAGA,SAAgBC,iBAAiBA,CAACC,OAAiC;EACjE,MAAM;IAAEC,cAAc;IAAEC;EAAK,CAAE,GAAGF,OAAO;EACzC,OAAOL,KAAK,CAACQ,OAAO,CAAC,MAAK;IACxB,IAAI,CAACF,cAAc,EAAE;MACnB,OAAO,CAAC;;IAGV,IAAI,CAACC,KAAK,IAAIL,KAAK,CAACO,GAAG,CAACH,cAAc,CAAC,EAAE;MACvC,OAAOJ,KAAK,CAACQ,GAAG,CAACJ,cAAc,CAAC;;IAGlC,MAAMK,KAAK,GAAGL,cAAc,CAACM,aAAa,CAAC,KAAK,CAAC;IACjDD,KAAK,CAACE,KAAK,CAACC,UAAU,GAAG,QAAQ;IACjCH,KAAK,CAACE,KAAK,CAACE,QAAQ,GAAG,QAAQ;IAE/B,MAAMC,KAAK,GAAGV,cAAc,CAACM,aAAa,CAAC,KAAK,CAAC;IACjDD,KAAK,CAACM,WAAW,CAACD,KAAK,CAAC;IAExBV,cAAc,CAACY,IAAI,CAACD,WAAW,CAACN,KAAK,CAAC;IACtC,MAAMQ,cAAc,GAAGR,KAAK,CAACS,WAAW,GAAGJ,KAAK,CAACI,WAAW;IAC5DT,KAAK,CAACU,MAAM,EAAE;IACdnB,KAAK,CAACoB,GAAG,CAAChB,cAAc,EAAEa,cAAc,CAAC;IACzC,OAAOA,cAAc;EACvB,CAAC,EAAE,CAACb,cAAc,EAAEC,KAAK,CAAC,CAAC;AAC7B;AAxBAgB,OAAA,CAAAnB,iBAAA,GAAAA,iBAAA"}
1
+ {"version":3,"sources":["../../lib/hooks/useScrollbarWidth.js"],"sourcesContent":["import * as React from 'react';\nconst cache = /*#__PURE__*/new WeakMap();\n/**\n * @returns The width in pixels of the scrollbar in the user agent\n */\nexport function useScrollbarWidth(options) {\n const {\n targetDocument,\n force\n } = options;\n return React.useMemo(() => {\n if (!targetDocument) {\n return 0;\n }\n if (!force && cache.has(targetDocument)) {\n return cache.get(targetDocument);\n }\n const outer = targetDocument.createElement('div');\n outer.style.visibility = 'hidden';\n outer.style.overflow = 'scroll';\n const inner = targetDocument.createElement('div');\n outer.appendChild(inner);\n targetDocument.body.appendChild(outer);\n const scrollbarWidth = outer.offsetWidth - inner.offsetWidth;\n outer.remove();\n cache.set(targetDocument, scrollbarWidth);\n return scrollbarWidth;\n }, [targetDocument, force]);\n}\n//# sourceMappingURL=useScrollbarWidth.js.map"],"names":["useScrollbarWidth","cache","WeakMap","options","targetDocument","force","React","useMemo","has","get","outer","createElement","style","visibility","overflow","inner","appendChild","body","scrollbarWidth","offsetWidth","remove","set"],"mappings":";;;;+BAKgBA;;aAAAA;;;6DALO;AACvB,MAAMC,QAAQ,WAAW,GAAE,IAAIC;AAIxB,SAASF,kBAAkBG,OAAO,EAAE;IACzC,MAAM,EACJC,eAAc,EACdC,MAAK,EACN,GAAGF;IACJ,OAAOG,OAAMC,OAAO,CAAC,IAAM;QACzB,IAAI,CAACH,gBAAgB;YACnB,OAAO;QACT,CAAC;QACD,IAAI,CAACC,SAASJ,MAAMO,GAAG,CAACJ,iBAAiB;YACvC,OAAOH,MAAMQ,GAAG,CAACL;QACnB,CAAC;QACD,MAAMM,QAAQN,eAAeO,aAAa,CAAC;QAC3CD,MAAME,KAAK,CAACC,UAAU,GAAG;QACzBH,MAAME,KAAK,CAACE,QAAQ,GAAG;QACvB,MAAMC,QAAQX,eAAeO,aAAa,CAAC;QAC3CD,MAAMM,WAAW,CAACD;QAClBX,eAAea,IAAI,CAACD,WAAW,CAACN;QAChC,MAAMQ,iBAAiBR,MAAMS,WAAW,GAAGJ,MAAMI,WAAW;QAC5DT,MAAMU,MAAM;QACZnB,MAAMoB,GAAG,CAACjB,gBAAgBc;QAC1B,OAAOA;IACT,GAAG;QAACd;QAAgBC;KAAM;AAC5B,EACA,6CAA6C"}
@@ -1,35 +1,35 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "useTimeout", {
6
+ enumerable: true,
7
+ get: ()=>useTimeout
5
8
  });
6
- exports.useTimeout = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- /**
9
- * @internal
10
- * Helper to manage a browser timeout.
11
- * Ensures that the timeout isn't set multiple times at once,
12
- * and is cleaned up when the component is unloaded.
13
- *
14
- * @returns A pair of [setTimeout, clearTimeout] that are stable between renders.
15
- */
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
16
11
  function useTimeout() {
17
- const [timeout] = React.useState(() => ({
18
- id: undefined,
19
- set: (fn, delay) => {
20
- timeout.clear();
21
- timeout.id = setTimeout(fn, delay);
22
- },
23
- clear: () => {
24
- if (timeout.id !== undefined) {
25
- clearTimeout(timeout.id);
26
- timeout.id = undefined;
27
- }
28
- }
29
- }));
30
- // Clean up the timeout when the component is unloaded
31
- React.useEffect(() => timeout.clear, [timeout]);
32
- return [timeout.set, timeout.clear];
33
- }
34
- exports.useTimeout = useTimeout;
12
+ const [timeout] = _react.useState(()=>({
13
+ id: undefined,
14
+ set: (fn, delay)=>{
15
+ timeout.clear();
16
+ timeout.id = setTimeout(fn, delay);
17
+ },
18
+ clear: ()=>{
19
+ if (timeout.id !== undefined) {
20
+ clearTimeout(timeout.id);
21
+ timeout.id = undefined;
22
+ }
23
+ }
24
+ }));
25
+ // Clean up the timeout when the component is unloaded
26
+ _react.useEffect(()=>timeout.clear, [
27
+ timeout
28
+ ]);
29
+ return [
30
+ timeout.set,
31
+ timeout.clear
32
+ ];
33
+ } //# sourceMappingURL=useTimeout.js.map
34
+
35
35
  //# sourceMappingURL=useTimeout.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","useTimeout","timeout","useState","id","undefined","set","fn","delay","clear","setTimeout","clearTimeout","useEffect","exports"],"sources":["../src/packages/react-components/react-utilities/src/hooks/useTimeout.ts"],"sourcesContent":["import * as React from 'react';\n\n/**\n * @internal\n * Helper to manage a browser timeout.\n * Ensures that the timeout isn't set multiple times at once,\n * and is cleaned up when the component is unloaded.\n *\n * @returns A pair of [setTimeout, clearTimeout] that are stable between renders.\n */\nexport function useTimeout() {\n const [timeout] = React.useState(() => ({\n id: undefined as ReturnType<typeof setTimeout> | undefined,\n set: (fn: () => void, delay: number) => {\n timeout.clear();\n timeout.id = setTimeout(fn, delay);\n },\n clear: () => {\n if (timeout.id !== undefined) {\n clearTimeout(timeout.id);\n timeout.id = undefined;\n }\n },\n }));\n\n // Clean up the timeout when the component is unloaded\n React.useEffect(() => timeout.clear, [timeout]);\n\n return [timeout.set, timeout.clear] as const;\n}\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AAEA;;;;;;;;AAQA,SAAgBC,UAAUA,CAAA;EACxB,MAAM,CAACC,OAAO,CAAC,GAAGH,KAAK,CAACI,QAAQ,CAAC,OAAO;IACtCC,EAAE,EAAEC,SAAsD;IAC1DC,GAAG,EAAEA,CAACC,EAAc,EAAEC,KAAa,KAAI;MACrCN,OAAO,CAACO,KAAK,EAAE;MACfP,OAAO,CAACE,EAAE,GAAGM,UAAU,CAACH,EAAE,EAAEC,KAAK,CAAC;IACpC,CAAC;IACDC,KAAK,EAAEA,CAAA,KAAK;MACV,IAAIP,OAAO,CAACE,EAAE,KAAKC,SAAS,EAAE;QAC5BM,YAAY,CAACT,OAAO,CAACE,EAAE,CAAC;QACxBF,OAAO,CAACE,EAAE,GAAGC,SAAS;;IAE1B;GACD,CAAC,CAAC;EAEH;EACAN,KAAK,CAACa,SAAS,CAAC,MAAMV,OAAO,CAACO,KAAK,EAAE,CAACP,OAAO,CAAC,CAAC;EAE/C,OAAO,CAACA,OAAO,CAACI,GAAG,EAAEJ,OAAO,CAACO,KAAK,CAAU;AAC9C;AAnBAI,OAAA,CAAAZ,UAAA,GAAAA,UAAA"}
1
+ {"version":3,"sources":["../../lib/hooks/useTimeout.js"],"sourcesContent":["import * as React from 'react';\n/**\n * @internal\n * Helper to manage a browser timeout.\n * Ensures that the timeout isn't set multiple times at once,\n * and is cleaned up when the component is unloaded.\n *\n * @returns A pair of [setTimeout, clearTimeout] that are stable between renders.\n */\nexport function useTimeout() {\n const [timeout] = React.useState(() => ({\n id: undefined,\n set: (fn, delay) => {\n timeout.clear();\n timeout.id = setTimeout(fn, delay);\n },\n clear: () => {\n if (timeout.id !== undefined) {\n clearTimeout(timeout.id);\n timeout.id = undefined;\n }\n }\n }));\n // Clean up the timeout when the component is unloaded\n React.useEffect(() => timeout.clear, [timeout]);\n return [timeout.set, timeout.clear];\n}\n//# sourceMappingURL=useTimeout.js.map"],"names":["useTimeout","timeout","React","useState","id","undefined","set","fn","delay","clear","setTimeout","clearTimeout","useEffect"],"mappings":";;;;+BASgBA;;aAAAA;;;6DATO;AAShB,SAASA,aAAa;IAC3B,MAAM,CAACC,QAAQ,GAAGC,OAAMC,QAAQ,CAAC,IAAO,CAAA;YACtCC,IAAIC;YACJC,KAAK,CAACC,IAAIC,QAAU;gBAClBP,QAAQQ,KAAK;gBACbR,QAAQG,EAAE,GAAGM,WAAWH,IAAIC;YAC9B;YACAC,OAAO,IAAM;gBACX,IAAIR,QAAQG,EAAE,KAAKC,WAAW;oBAC5BM,aAAaV,QAAQG,EAAE;oBACvBH,QAAQG,EAAE,GAAGC;gBACf,CAAC;YACH;QACF,CAAA;IACA,sDAAsD;IACtDH,OAAMU,SAAS,CAAC,IAAMX,QAAQQ,KAAK,EAAE;QAACR;KAAQ;IAC9C,OAAO;QAACA,QAAQK,GAAG;QAAEL,QAAQQ,KAAK;KAAC;AACrC,EACA,sCAAsC"}
@@ -1,217 +1,55 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getEventClientCoords = exports.isMouseEvent = exports.isTouchEvent = exports.isFluentTrigger = exports.getTriggerChild = exports.applyTriggerPropsToChildren = exports.omit = exports.isInteractiveHTMLElement = exports.isHTMLElement = exports.mergeCallbacks = exports.getRTLSafeKey = exports.getPartitionedNativeProps = exports.getNativeElementProps = exports.clamp = exports.SSRProvider = exports.useIsSSR = exports.canUseDOM = exports.useTimeout = exports.useScrollbarWidth = exports.usePrevious = exports.useOnScrollOutside = exports.useOnClickOutside = exports.useMergedRefs = exports.useIsomorphicLayoutEffect = exports.useId = exports.useForceUpdate = exports.useFirstMount = exports.useEventCallback = exports.useControllableState = exports.resetIdsForTests = exports.IdPrefixProvider = exports.isResolvedShorthand = exports.resolveShorthand = exports.getSlots = void 0;
7
- var index_1 = /*#__PURE__*/require("./compose/index");
8
- Object.defineProperty(exports, "getSlots", {
9
- enumerable: true,
10
- get: function () {
11
- return index_1.getSlots;
12
- }
13
- });
14
- Object.defineProperty(exports, "resolveShorthand", {
15
- enumerable: true,
16
- get: function () {
17
- return index_1.resolveShorthand;
18
- }
19
- });
20
- Object.defineProperty(exports, "isResolvedShorthand", {
21
- enumerable: true,
22
- get: function () {
23
- return index_1.isResolvedShorthand;
24
- }
25
- });
26
- var index_2 = /*#__PURE__*/require("./hooks/index");
27
- Object.defineProperty(exports, "IdPrefixProvider", {
28
- enumerable: true,
29
- get: function () {
30
- return index_2.IdPrefixProvider;
31
- }
32
- });
33
- Object.defineProperty(exports, "resetIdsForTests", {
34
- enumerable: true,
35
- get: function () {
36
- return index_2.resetIdsForTests;
37
- }
38
- });
39
- Object.defineProperty(exports, "useControllableState", {
40
- enumerable: true,
41
- get: function () {
42
- return index_2.useControllableState;
43
- }
44
- });
45
- Object.defineProperty(exports, "useEventCallback", {
46
- enumerable: true,
47
- get: function () {
48
- return index_2.useEventCallback;
49
- }
50
- });
51
- Object.defineProperty(exports, "useFirstMount", {
52
- enumerable: true,
53
- get: function () {
54
- return index_2.useFirstMount;
55
- }
56
- });
57
- Object.defineProperty(exports, "useForceUpdate", {
58
- enumerable: true,
59
- get: function () {
60
- return index_2.useForceUpdate;
61
- }
62
- });
63
- Object.defineProperty(exports, "useId", {
64
- enumerable: true,
65
- get: function () {
66
- return index_2.useId;
67
- }
68
- });
69
- Object.defineProperty(exports, "useIsomorphicLayoutEffect", {
70
- enumerable: true,
71
- get: function () {
72
- return index_2.useIsomorphicLayoutEffect;
73
- }
74
- });
75
- Object.defineProperty(exports, "useMergedRefs", {
76
- enumerable: true,
77
- get: function () {
78
- return index_2.useMergedRefs;
79
- }
80
- });
81
- Object.defineProperty(exports, "useOnClickOutside", {
82
- enumerable: true,
83
- get: function () {
84
- return index_2.useOnClickOutside;
85
- }
86
- });
87
- Object.defineProperty(exports, "useOnScrollOutside", {
88
- enumerable: true,
89
- get: function () {
90
- return index_2.useOnScrollOutside;
91
- }
92
- });
93
- Object.defineProperty(exports, "usePrevious", {
94
- enumerable: true,
95
- get: function () {
96
- return index_2.usePrevious;
97
- }
98
- });
99
- Object.defineProperty(exports, "useScrollbarWidth", {
100
- enumerable: true,
101
- get: function () {
102
- return index_2.useScrollbarWidth;
103
- }
104
- });
105
- Object.defineProperty(exports, "useTimeout", {
106
- enumerable: true,
107
- get: function () {
108
- return index_2.useTimeout;
109
- }
110
- });
111
- var index_3 = /*#__PURE__*/require("./ssr/index");
112
- Object.defineProperty(exports, "canUseDOM", {
113
- enumerable: true,
114
- get: function () {
115
- return index_3.canUseDOM;
116
- }
117
- });
118
- Object.defineProperty(exports, "useIsSSR", {
119
- enumerable: true,
120
- get: function () {
121
- return index_3.useIsSSR;
122
- }
123
- });
124
- Object.defineProperty(exports, "SSRProvider", {
125
- enumerable: true,
126
- get: function () {
127
- return index_3.SSRProvider;
128
- }
129
- });
130
- var index_4 = /*#__PURE__*/require("./utils/index");
131
- Object.defineProperty(exports, "clamp", {
132
- enumerable: true,
133
- get: function () {
134
- return index_4.clamp;
135
- }
136
- });
137
- Object.defineProperty(exports, "getNativeElementProps", {
138
- enumerable: true,
139
- get: function () {
140
- return index_4.getNativeElementProps;
141
- }
142
- });
143
- Object.defineProperty(exports, "getPartitionedNativeProps", {
144
- enumerable: true,
145
- get: function () {
146
- return index_4.getPartitionedNativeProps;
147
- }
148
- });
149
- Object.defineProperty(exports, "getRTLSafeKey", {
150
- enumerable: true,
151
- get: function () {
152
- return index_4.getRTLSafeKey;
153
- }
154
- });
155
- Object.defineProperty(exports, "mergeCallbacks", {
156
- enumerable: true,
157
- get: function () {
158
- return index_4.mergeCallbacks;
159
- }
160
- });
161
- Object.defineProperty(exports, "isHTMLElement", {
162
- enumerable: true,
163
- get: function () {
164
- return index_4.isHTMLElement;
165
- }
166
- });
167
- Object.defineProperty(exports, "isInteractiveHTMLElement", {
168
- enumerable: true,
169
- get: function () {
170
- return index_4.isInteractiveHTMLElement;
171
- }
172
- });
173
- Object.defineProperty(exports, "omit", {
174
- enumerable: true,
175
- get: function () {
176
- return index_4.omit;
177
- }
178
- });
179
- var index_5 = /*#__PURE__*/require("./trigger/index");
180
- Object.defineProperty(exports, "applyTriggerPropsToChildren", {
181
- enumerable: true,
182
- get: function () {
183
- return index_5.applyTriggerPropsToChildren;
184
- }
185
- });
186
- Object.defineProperty(exports, "getTriggerChild", {
187
- enumerable: true,
188
- get: function () {
189
- return index_5.getTriggerChild;
190
- }
191
- });
192
- Object.defineProperty(exports, "isFluentTrigger", {
193
- enumerable: true,
194
- get: function () {
195
- return index_5.isFluentTrigger;
196
- }
197
- });
198
- var index_6 = /*#__PURE__*/require("./events/index");
199
- Object.defineProperty(exports, "isTouchEvent", {
200
- enumerable: true,
201
- get: function () {
202
- return index_6.isTouchEvent;
203
- }
204
- });
205
- Object.defineProperty(exports, "isMouseEvent", {
206
- enumerable: true,
207
- get: function () {
208
- return index_6.isMouseEvent;
209
- }
210
- });
211
- Object.defineProperty(exports, "getEventClientCoords", {
212
- enumerable: true,
213
- get: function () {
214
- return index_6.getEventClientCoords;
215
- }
216
- });
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ getSlots: ()=>_index.getSlots,
13
+ resolveShorthand: ()=>_index.resolveShorthand,
14
+ isResolvedShorthand: ()=>_index.isResolvedShorthand,
15
+ IdPrefixProvider: ()=>_index1.IdPrefixProvider,
16
+ resetIdsForTests: ()=>_index1.resetIdsForTests,
17
+ useControllableState: ()=>_index1.useControllableState,
18
+ useEventCallback: ()=>_index1.useEventCallback,
19
+ useFirstMount: ()=>_index1.useFirstMount,
20
+ useForceUpdate: ()=>_index1.useForceUpdate,
21
+ useId: ()=>_index1.useId,
22
+ useIsomorphicLayoutEffect: ()=>_index1.useIsomorphicLayoutEffect,
23
+ useMergedRefs: ()=>_index1.useMergedRefs,
24
+ useOnClickOutside: ()=>_index1.useOnClickOutside,
25
+ useOnScrollOutside: ()=>_index1.useOnScrollOutside,
26
+ usePrevious: ()=>_index1.usePrevious,
27
+ useScrollbarWidth: ()=>_index1.useScrollbarWidth,
28
+ useTimeout: ()=>_index1.useTimeout,
29
+ canUseDOM: ()=>_index2.canUseDOM,
30
+ useIsSSR: ()=>_index2.useIsSSR,
31
+ SSRProvider: ()=>_index2.SSRProvider,
32
+ clamp: ()=>_index3.clamp,
33
+ getNativeElementProps: ()=>_index3.getNativeElementProps,
34
+ getPartitionedNativeProps: ()=>_index3.getPartitionedNativeProps,
35
+ getRTLSafeKey: ()=>_index3.getRTLSafeKey,
36
+ mergeCallbacks: ()=>_index3.mergeCallbacks,
37
+ isHTMLElement: ()=>_index3.isHTMLElement,
38
+ isInteractiveHTMLElement: ()=>_index3.isInteractiveHTMLElement,
39
+ omit: ()=>_index3.omit,
40
+ applyTriggerPropsToChildren: ()=>_index4.applyTriggerPropsToChildren,
41
+ getTriggerChild: ()=>_index4.getTriggerChild,
42
+ isFluentTrigger: ()=>_index4.isFluentTrigger,
43
+ isTouchEvent: ()=>_index5.isTouchEvent,
44
+ isMouseEvent: ()=>_index5.isMouseEvent,
45
+ getEventClientCoords: ()=>_index5.getEventClientCoords
46
+ });
47
+ const _index = require("./compose/index");
48
+ const _index1 = require("./hooks/index");
49
+ const _index2 = require("./ssr/index");
50
+ const _index3 = require("./utils/index");
51
+ const _index4 = require("./trigger/index");
52
+ const _index5 = require("./events/index");
53
+ //# sourceMappingURL=index.js.map
54
+
217
55
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["index_1","require","Object","defineProperty","exports","enumerable","get","getSlots","resolveShorthand","isResolvedShorthand","index_2","IdPrefixProvider","resetIdsForTests","useControllableState","useEventCallback","useFirstMount","useForceUpdate","useId","useIsomorphicLayoutEffect","useMergedRefs","useOnClickOutside","useOnScrollOutside","usePrevious","useScrollbarWidth","useTimeout","index_3","canUseDOM","useIsSSR","SSRProvider","index_4","clamp","getNativeElementProps","getPartitionedNativeProps","getRTLSafeKey","mergeCallbacks","isHTMLElement","isInteractiveHTMLElement","omit","index_5","applyTriggerPropsToChildren","getTriggerChild","isFluentTrigger","index_6","isTouchEvent","isMouseEvent","getEventClientCoords"],"sources":["../src/packages/react-components/react-utilities/src/index.ts"],"sourcesContent":["export { getSlots, resolveShorthand, isResolvedShorthand } from './compose/index';\nexport type {\n ExtractSlotProps,\n ComponentProps,\n ComponentState,\n ForwardRefComponent,\n ResolveShorthandFunction,\n ResolveShorthandOptions,\n Slot,\n Slots,\n SlotClassNames,\n SlotPropsRecord,\n SlotRenderFunction,\n SlotShorthandValue,\n} from './compose/index';\n\nexport {\n IdPrefixProvider,\n resetIdsForTests,\n useControllableState,\n useEventCallback,\n useFirstMount,\n useForceUpdate,\n useId,\n useIsomorphicLayoutEffect,\n useMergedRefs,\n useOnClickOutside,\n useOnScrollOutside,\n usePrevious,\n useScrollbarWidth,\n useTimeout,\n} from './hooks/index';\nexport type { RefObjectFunction, UseControllableStateOptions, UseOnClickOrScrollOutsideOptions } from './hooks/index';\n\nexport { canUseDOM, useIsSSR, SSRProvider } from './ssr/index';\n\nexport {\n clamp,\n getNativeElementProps,\n getPartitionedNativeProps,\n getRTLSafeKey,\n mergeCallbacks,\n isHTMLElement,\n isInteractiveHTMLElement,\n omit,\n} from './utils/index';\n\nexport { applyTriggerPropsToChildren, getTriggerChild, isFluentTrigger } from './trigger/index';\n\nexport type { FluentTriggerComponent, TriggerProps } from './trigger/index';\n\n/**\n * Event utils\n */\nexport type { NativeTouchOrMouseEvent, ReactTouchOrMouseEvent, TouchOrMouseEvent } from './events/index';\nexport { isTouchEvent, isMouseEvent, getEventClientCoords } from './events/index';\n"],"mappings":"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"}
1
+ {"version":3,"sources":["../lib/index.js"],"sourcesContent":["export { getSlots, resolveShorthand, isResolvedShorthand } from './compose/index';\nexport { IdPrefixProvider, resetIdsForTests, useControllableState, useEventCallback, useFirstMount, useForceUpdate, useId, useIsomorphicLayoutEffect, useMergedRefs, useOnClickOutside, useOnScrollOutside, usePrevious, useScrollbarWidth, useTimeout } from './hooks/index';\nexport { canUseDOM, useIsSSR, SSRProvider } from './ssr/index';\nexport { clamp, getNativeElementProps, getPartitionedNativeProps, getRTLSafeKey, mergeCallbacks, isHTMLElement, isInteractiveHTMLElement, omit } from './utils/index';\nexport { applyTriggerPropsToChildren, getTriggerChild, isFluentTrigger } from './trigger/index';\nexport { isTouchEvent, isMouseEvent, getEventClientCoords } from './events/index';\n//# sourceMappingURL=index.js.map"],"names":["getSlots","resolveShorthand","isResolvedShorthand","IdPrefixProvider","resetIdsForTests","useControllableState","useEventCallback","useFirstMount","useForceUpdate","useId","useIsomorphicLayoutEffect","useMergedRefs","useOnClickOutside","useOnScrollOutside","usePrevious","useScrollbarWidth","useTimeout","canUseDOM","useIsSSR","SSRProvider","clamp","getNativeElementProps","getPartitionedNativeProps","getRTLSafeKey","mergeCallbacks","isHTMLElement","isInteractiveHTMLElement","omit","applyTriggerPropsToChildren","getTriggerChild","isFluentTrigger","isTouchEvent","isMouseEvent","getEventClientCoords"],"mappings":";;;;;;;;;;;IAASA,QAAQ,MAARA,eAAQ;IAAEC,gBAAgB,MAAhBA,uBAAgB;IAAEC,mBAAmB,MAAnBA,0BAAmB;IAC/CC,gBAAgB,MAAhBA,wBAAgB;IAAEC,gBAAgB,MAAhBA,wBAAgB;IAAEC,oBAAoB,MAApBA,4BAAoB;IAAEC,gBAAgB,MAAhBA,wBAAgB;IAAEC,aAAa,MAAbA,qBAAa;IAAEC,cAAc,MAAdA,sBAAc;IAAEC,KAAK,MAALA,aAAK;IAAEC,yBAAyB,MAAzBA,iCAAyB;IAAEC,aAAa,MAAbA,qBAAa;IAAEC,iBAAiB,MAAjBA,yBAAiB;IAAEC,kBAAkB,MAAlBA,0BAAkB;IAAEC,WAAW,MAAXA,mBAAW;IAAEC,iBAAiB,MAAjBA,yBAAiB;IAAEC,UAAU,MAAVA,kBAAU;IAC7OC,SAAS,MAATA,iBAAS;IAAEC,QAAQ,MAARA,gBAAQ;IAAEC,WAAW,MAAXA,mBAAW;IAChCC,KAAK,MAALA,aAAK;IAAEC,qBAAqB,MAArBA,6BAAqB;IAAEC,yBAAyB,MAAzBA,iCAAyB;IAAEC,aAAa,MAAbA,qBAAa;IAAEC,cAAc,MAAdA,sBAAc;IAAEC,aAAa,MAAbA,qBAAa;IAAEC,wBAAwB,MAAxBA,gCAAwB;IAAEC,IAAI,MAAJA,YAAI;IACrIC,2BAA2B,MAA3BA,mCAA2B;IAAEC,eAAe,MAAfA,uBAAe;IAAEC,eAAe,MAAfA,uBAAe;IAC7DC,YAAY,MAAZA,oBAAY;IAAEC,YAAY,MAAZA,oBAAY;IAAEC,oBAAoB,MAApBA,4BAAoB;;uBALO;wBAC8L;wBAC7M;wBACqG;wBACxE;wBACb;CACjE,iCAAiC"}