@elliemae/ds-utilities 3.16.0-next.11 → 3.16.0-next.13

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 (116) hide show
  1. package/dist/cjs/algorithms/crossTypeSort.js +4 -0
  2. package/dist/cjs/algorithms/crossTypeSort.js.map +1 -1
  3. package/dist/cjs/capitalize.js +4 -0
  4. package/dist/cjs/capitalize.js.map +1 -1
  5. package/dist/cjs/compose.js +4 -0
  6. package/dist/cjs/compose.js.map +1 -1
  7. package/dist/cjs/deprecated/deprecatedMsg.js +4 -0
  8. package/dist/cjs/deprecated/deprecatedMsg.js.map +1 -1
  9. package/dist/cjs/deprecated/index.js +4 -0
  10. package/dist/cjs/deprecated/index.js.map +1 -1
  11. package/dist/cjs/deprecated/reactTypesUtility.js +4 -0
  12. package/dist/cjs/deprecated/reactTypesUtility.js.map +1 -1
  13. package/dist/cjs/deprecated/scrollingTimer.js +4 -0
  14. package/dist/cjs/deprecated/scrollingTimer.js.map +1 -1
  15. package/dist/cjs/deprecated/useParentElement.js +4 -0
  16. package/dist/cjs/deprecated/useParentElement.js.map +1 -1
  17. package/dist/cjs/deprecated/useSetRef.js +4 -0
  18. package/dist/cjs/deprecated/useSetRef.js.map +1 -1
  19. package/dist/cjs/deprecated/useUncontrolled.js +4 -0
  20. package/dist/cjs/deprecated/useUncontrolled.js.map +1 -1
  21. package/dist/cjs/deprecated/useWindowSize.js +4 -0
  22. package/dist/cjs/deprecated/useWindowSize.js.map +1 -1
  23. package/dist/cjs/getComponentFromProps.js +5 -0
  24. package/dist/cjs/getComponentFromProps.js.map +1 -1
  25. package/dist/cjs/hooks/index.js +6 -0
  26. package/dist/cjs/hooks/index.js.map +2 -2
  27. package/dist/cjs/hooks/useCallbackAfterRender.js +4 -0
  28. package/dist/cjs/hooks/useCallbackAfterRender.js.map +1 -1
  29. package/dist/cjs/hooks/useCancellableDelayedCallback.js +4 -0
  30. package/dist/cjs/hooks/useCancellableDelayedCallback.js.map +1 -1
  31. package/dist/cjs/hooks/useDerivedStateFromProps.js +4 -0
  32. package/dist/cjs/hooks/useDerivedStateFromProps.js.map +1 -1
  33. package/dist/cjs/hooks/useDimensions.js +4 -0
  34. package/dist/cjs/hooks/useDimensions.js.map +1 -1
  35. package/dist/cjs/hooks/useExecutionTimer.js +4 -0
  36. package/dist/cjs/hooks/useExecutionTimer.js.map +1 -1
  37. package/dist/cjs/hooks/useExpandState.js +4 -0
  38. package/dist/cjs/hooks/useExpandState.js.map +1 -1
  39. package/dist/cjs/hooks/useFocusTrap.js +4 -0
  40. package/dist/cjs/hooks/useFocusTrap.js.map +1 -1
  41. package/dist/cjs/hooks/useHeadlessTooltip.js +140 -0
  42. package/dist/cjs/hooks/useHeadlessTooltip.js.map +7 -0
  43. package/dist/cjs/hooks/useHotkeys.js +4 -0
  44. package/dist/cjs/hooks/useHotkeys.js.map +1 -1
  45. package/dist/cjs/hooks/useHoverHandlersDelay.js +4 -0
  46. package/dist/cjs/hooks/useHoverHandlersDelay.js.map +1 -1
  47. package/dist/cjs/hooks/useIsMobile.js +4 -0
  48. package/dist/cjs/hooks/useIsMobile.js.map +1 -1
  49. package/dist/cjs/hooks/useIsShowingEllipsis.js +4 -0
  50. package/dist/cjs/hooks/useIsShowingEllipsis.js.map +1 -1
  51. package/dist/cjs/hooks/useMakeMutable.js +4 -0
  52. package/dist/cjs/hooks/useMakeMutable.js.map +1 -1
  53. package/dist/cjs/hooks/useNativeResizeObserver.js +4 -0
  54. package/dist/cjs/hooks/useNativeResizeObserver.js.map +1 -1
  55. package/dist/cjs/hooks/useOnBlurOut.js +4 -0
  56. package/dist/cjs/hooks/useOnBlurOut.js.map +1 -1
  57. package/dist/cjs/hooks/useOnElementResize.js +4 -0
  58. package/dist/cjs/hooks/useOnElementResize.js.map +1 -1
  59. package/dist/cjs/hooks/useOnFirstFocusIn.js +4 -0
  60. package/dist/cjs/hooks/useOnFirstFocusIn.js.map +1 -1
  61. package/dist/cjs/hooks/useOnSpecificFocus.js +4 -0
  62. package/dist/cjs/hooks/useOnSpecificFocus.js.map +1 -1
  63. package/dist/cjs/hooks/usePrevious.js +4 -0
  64. package/dist/cjs/hooks/usePrevious.js.map +1 -1
  65. package/dist/cjs/hooks/useResizeObserver.js +4 -0
  66. package/dist/cjs/hooks/useResizeObserver.js.map +1 -1
  67. package/dist/cjs/hooks/useShouldRecalculate.js +4 -0
  68. package/dist/cjs/hooks/useShouldRecalculate.js.map +1 -1
  69. package/dist/cjs/hooks/useWindowScrollerList.js +4 -0
  70. package/dist/cjs/hooks/useWindowScrollerList.js.map +1 -1
  71. package/dist/cjs/index.js +5 -0
  72. package/dist/cjs/index.js.map +2 -2
  73. package/dist/cjs/objectUtilities.js +4 -0
  74. package/dist/cjs/objectUtilities.js.map +1 -1
  75. package/dist/cjs/onClickHandlerForNonInteractiveElements.js +4 -0
  76. package/dist/cjs/onClickHandlerForNonInteractiveElements.js.map +1 -1
  77. package/dist/cjs/operators.js +8 -1
  78. package/dist/cjs/operators.js.map +1 -1
  79. package/dist/cjs/platform.js +4 -0
  80. package/dist/cjs/platform.js.map +1 -1
  81. package/dist/cjs/props-helpers/index.js +4 -0
  82. package/dist/cjs/props-helpers/index.js.map +1 -1
  83. package/dist/cjs/reactTypesUtility.js +4 -0
  84. package/dist/cjs/reactTypesUtility.js.map +1 -1
  85. package/dist/cjs/system.js +4 -0
  86. package/dist/cjs/system.js.map +1 -1
  87. package/dist/cjs/timeUtils.js +4 -0
  88. package/dist/cjs/timeUtils.js.map +1 -1
  89. package/dist/cjs/utils.js +4 -0
  90. package/dist/cjs/utils.js.map +1 -1
  91. package/dist/cjs/validations.js +4 -0
  92. package/dist/cjs/validations.js.map +1 -1
  93. package/dist/esm/compose.js.map +1 -1
  94. package/dist/esm/getComponentFromProps.js +1 -0
  95. package/dist/esm/getComponentFromProps.js.map +1 -1
  96. package/dist/esm/hooks/index.js +2 -0
  97. package/dist/esm/hooks/index.js.map +2 -2
  98. package/dist/esm/hooks/useExpandState.js.map +1 -1
  99. package/dist/esm/hooks/useFocusTrap.js.map +1 -1
  100. package/dist/esm/hooks/useHeadlessTooltip.js +110 -0
  101. package/dist/esm/hooks/useHeadlessTooltip.js.map +7 -0
  102. package/dist/esm/hooks/useIsMobile.js.map +1 -1
  103. package/dist/esm/hooks/useNativeResizeObserver.js.map +1 -1
  104. package/dist/esm/hooks/useResizeObserver.js.map +1 -1
  105. package/dist/esm/index.js +3 -1
  106. package/dist/esm/index.js.map +2 -2
  107. package/dist/esm/objectUtilities.js.map +1 -1
  108. package/dist/esm/operators.js +4 -1
  109. package/dist/esm/operators.js.map +1 -1
  110. package/dist/esm/utils.js.map +1 -1
  111. package/dist/types/hooks/index.d.ts +1 -0
  112. package/dist/types/hooks/tests/useHeadlessTooltip.func.test.d.ts +1 -0
  113. package/dist/types/hooks/tests/useHeadlessTooltip.render.test.d.ts +1 -0
  114. package/dist/types/hooks/useHeadlessTooltip.d.ts +85 -0
  115. package/dist/types/index.d.ts +1 -1
  116. package/package.json +4 -4
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/algorithms/crossTypeSort.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["type ComparisonTerm = string | number | null | undefined;\ntype Direction = 'ASC' | 'DESC';\ntype SortCB = Required<Parameters<(typeof Array.prototype)['sort']>>[0];\ntype SortingHelper = (a: ComparisonTerm, b: ComparisonTerm, direction?: Direction) => ReturnType<SortCB> | false;\n\nconst canBeParsedAsNumber = (val: ComparisonTerm): val is string => !Number.isNaN(parseFloat(val as string));\n\nconst numberSort: SortingHelper = (a, b, direction = 'ASC') => {\n if (canBeParsedAsNumber(a) && canBeParsedAsNumber(b)) {\n const aAsNum = parseFloat(a);\n const bAsNum = parseFloat(b);\n if (direction === 'ASC') return aAsNum - bAsNum;\n else return bAsNum - aAsNum;\n }\n if (canBeParsedAsNumber(a)) return direction === 'ASC' ? -1 : 1;\n if (canBeParsedAsNumber(b)) return direction === 'ASC' ? 1 : -1;\n return false;\n};\nconst voidishSort: SortingHelper = (a, b) => {\n // voids are always sorted the same way no matter the direction since it's more ux intuitive\n // order of execution matters, this ensure the order '-' , '', null, undefined\n if (a === undefined) return 1;\n if (b === undefined) return -1;\n if (a === null) return 1;\n if (b === null) return -1;\n if (a === '') return 1;\n if (b === '') return -1;\n if (a === '-') return 1;\n if (b === '-') return -1;\n return false;\n};\nconst stringSort: SortingHelper = (a, b, direction = 'ASC') => {\n if (typeof a === 'string' && typeof b === 'string')\n return direction === 'ASC'\n ? a.localeCompare(b, undefined, { numeric: true })\n : b.localeCompare(a, undefined, { numeric: true });\n return false;\n};\n\nexport const crossTypeSort = (\n a: ComparisonTerm,\n b: ComparisonTerm,\n direction: Direction = 'ASC',\n): ReturnType<SortCB> => {\n if (a === b) return 0;\n const voidishSorted = voidishSort(a, b, direction);\n if (voidishSorted !== false) return voidishSorted;\n\n const numberSorted = numberSort(a, b, direction);\n if (numberSorted !== false) return numberSorted;\n\n const stringSorted = stringSort(a, b, direction);\n if (stringSorted !== false) return stringSorted;\n return -1;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADKvB,MAAM,sBAAsB,CAAC,QAAuC,CAAC,OAAO,MAAM,WAAW,GAAa,CAAC;AAE3G,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eAAe,WAAW,GAAG,GAAG,SAAS;AAC/C,MAAI,iBAAiB;AAAO,WAAO;AAEnC,QAAM,eAAe,WAAW,GAAG,GAAG,SAAS;AAC/C,MAAI,iBAAiB;AAAO,WAAO;AACnC,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/capitalize.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export const capitalize = (string: string): string => string.charAt(0).toUpperCase() + string.slice(1);\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,aAAa,CAAC,WAA2B,OAAO,OAAO,CAAC,EAAE,YAAY,IAAI,OAAO,MAAM,CAAC;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,aAAa,CAAC,WAA2B,OAAO,OAAO,CAAC,EAAE,YAAY,IAAI,OAAO,MAAM,CAAC;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/compose.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function. [From redux v4.0.5]\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\n\ntype UnknownFunctionT = (...args: unknown[]) => unknown;\n\nexport const compose = (...funcs: UnknownFunctionT[]): UnknownFunctionT => {\n if (funcs.length === 0) {\n return (arg) => arg;\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(\n (a, b) =>\n (...args) =>\n a(b(...args)),\n );\n};\n\nexport default compose;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADahB,MAAM,UAAU,IAAI,UAAgD;AACzE,MAAI,MAAM,WAAW,GAAG;AACtB,WAAO,CAAC,QAAQ;AAAA,EAClB;AAEA,MAAI,MAAM,WAAW,GAAG;AACtB,WAAO,MAAM;AAAA,EACf;AAEA,SAAO,MAAM;AAAA,IACX,CAAC,GAAG,MACF,IAAI,SACF,EAAE,EAAE,GAAG,IAAI,CAAC;AAAA,EAClB;AACF;AAEA,IAAO,kBAAQ;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADahB,MAAM,UAAU,IAAI,UAAgD;AACzE,MAAI,MAAM,WAAW,GAAG;AACtB,WAAO,CAAC,QAAQ;AAAA,EAClB;AAEA,MAAI,MAAM,WAAW,GAAG;AACtB,WAAO,MAAM,CAAC;AAAA,EAChB;AAEA,SAAO,MAAM;AAAA,IACX,CAAC,GAAG,MACF,IAAI,SACF,EAAE,EAAE,GAAG,IAAI,CAAC;AAAA,EAClB;AACF;AAEA,IAAO,kBAAQ;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/deprecated/deprecatedMsg.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export const deprecatedMsg = 'is going to be deprecated, please consider removing it from your project';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,gBAAgB;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,gBAAgB;",
6
6
  "names": []
7
7
  }
@@ -15,6 +15,10 @@ var __copyProps = (to, from, except, desc) => {
15
15
  };
16
16
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
17
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
18
+ // If the importer is in node compatibility mode or this is not an ESM
19
+ // file that has been converted to a CommonJS file using a Babel-
20
+ // compatible transform (i.e. "__esModule" has not been set), then set
21
+ // "default" to the CommonJS "module.exports" for node compatibility.
18
22
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
19
23
  mod
20
24
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/deprecated/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export * from './reactTypesUtility.js';\nexport * from './scrollingTimer.js';\nexport * from './useParentElement.js';\nexport * from './useSetRef.js';\nexport * from './useUncontrolled.js';\nexport * from './useWindowSize.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAc,mCAAd;AACA,+BAAc,gCADd;AAEA,+BAAc,kCAFd;AAGA,+BAAc,2BAHd;AAIA,+BAAc,iCAJd;AAKA,+BAAc,+BALd;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAc,mCAAd;AACA,+BAAc,gCADd;AAEA,+BAAc,kCAFd;AAGA,+BAAc,2BAHd;AAIA,+BAAc,iCAJd;AAKA,+BAAc,+BALd;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/deprecated/reactTypesUtility.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable no-console */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport React from 'react';\nimport { deprecatedMsg } from './deprecatedMsg.js';\n\nexport function isClassComponent(component: any) {\n console.warn(`isClassComponent ${deprecatedMsg}`);\n return !!(typeof component === 'function' && !!component.prototype.isReactComponent);\n}\n\nexport function isFunctionComponent(component: any) {\n console.warn(`isFunctionComponent ${deprecatedMsg}`);\n return typeof component === 'function' && String(component).includes('return React.createElement');\n}\n\nexport function isReactComponent(component: any) {\n console.warn(`isReactComponent ${deprecatedMsg}`);\n return !!(isClassComponent(component) || isFunctionComponent(component));\n}\n\nexport function isElement(element: Record<string, unknown> | null | undefined) {\n console.warn(`isElement ${deprecatedMsg}`);\n return React.isValidElement(element);\n}\n\nexport function isCompositeTypeElement(element: Record<string, unknown> | null | undefined) {\n console.warn(`isCompositeTypeElement ${deprecatedMsg}`);\n return isElement(element) && typeof element?.type === 'function';\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,mBAAkB;AAClB,2BAA8B;AAEvB,SAAS,iBAAiB,WAAgB;AAC/C,UAAQ,KAAK,oBAAoB,oCAAe;AAChD,SAAO,CAAC,EAAE,OAAO,cAAc,cAAc,CAAC,CAAC,UAAU,UAAU;AACrE;AAEO,SAAS,oBAAoB,WAAgB;AAClD,UAAQ,KAAK,uBAAuB,oCAAe;AACnD,SAAO,OAAO,cAAc,cAAc,OAAO,SAAS,EAAE,SAAS,4BAA4B;AACnG;AAEO,SAAS,iBAAiB,WAAgB;AAC/C,UAAQ,KAAK,oBAAoB,oCAAe;AAChD,SAAO,CAAC,EAAE,iBAAiB,SAAS,KAAK,oBAAoB,SAAS;AACxE;AAEO,SAAS,UAAU,SAAqD;AAC7E,UAAQ,KAAK,aAAa,oCAAe;AACzC,SAAO,aAAAA,QAAM,eAAe,OAAO;AACrC;AAEO,SAAS,uBAAuB,SAAqD;AAC1F,UAAQ,KAAK,0BAA0B,oCAAe;AACtD,SAAO,UAAU,OAAO,KAAK,OAAO,SAAS,SAAS;AACxD;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,mBAAkB;AAClB,2BAA8B;AAEvB,SAAS,iBAAiB,WAAgB;AAC/C,UAAQ,KAAK,oBAAoB,oCAAe;AAChD,SAAO,CAAC,EAAE,OAAO,cAAc,cAAc,CAAC,CAAC,UAAU,UAAU;AACrE;AAEO,SAAS,oBAAoB,WAAgB;AAClD,UAAQ,KAAK,uBAAuB,oCAAe;AACnD,SAAO,OAAO,cAAc,cAAc,OAAO,SAAS,EAAE,SAAS,4BAA4B;AACnG;AAEO,SAAS,iBAAiB,WAAgB;AAC/C,UAAQ,KAAK,oBAAoB,oCAAe;AAChD,SAAO,CAAC,EAAE,iBAAiB,SAAS,KAAK,oBAAoB,SAAS;AACxE;AAEO,SAAS,UAAU,SAAqD;AAC7E,UAAQ,KAAK,aAAa,oCAAe;AACzC,SAAO,aAAAA,QAAM,eAAe,OAAO;AACrC;AAEO,SAAS,uBAAuB,SAAqD;AAC1F,UAAQ,KAAK,0BAA0B,oCAAe;AACtD,SAAO,UAAU,OAAO,KAAK,OAAO,SAAS,SAAS;AACxD;",
6
6
  "names": ["React"]
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/deprecated/scrollingTimer.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable no-console */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable func-names */\nimport { deprecatedMsg } from './deprecatedMsg.js';\n\nexport const resetTimer = (func: (...args: unknown[]) => unknown) => {\n console.warn(`resetTimer ${deprecatedMsg}`);\n let timeout: NodeJS.Timeout | null;\n return function (this: any, ...args: unknown[]) {\n const lastCall = () => {\n timeout = null;\n func.apply(this, args);\n };\n\n if (timeout) clearTimeout(timeout);\n timeout = setTimeout(lastCall, 300);\n };\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,2BAA8B;AAEvB,MAAM,aAAa,CAAC,SAA0C;AACnE,UAAQ,KAAK,cAAc,oCAAe;AAC1C,MAAI;AACJ,SAAO,YAAwB,MAAiB;AAC9C,UAAM,WAAW,MAAM;AACrB,gBAAU;AACV,WAAK,MAAM,MAAM,IAAI;AAAA,IACvB;AAEA,QAAI;AAAS,mBAAa,OAAO;AACjC,cAAU,WAAW,UAAU,GAAG;AAAA,EACpC;AACF;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,2BAA8B;AAEvB,MAAM,aAAa,CAAC,SAA0C;AACnE,UAAQ,KAAK,cAAc,oCAAe;AAC1C,MAAI;AACJ,SAAO,YAAwB,MAAiB;AAC9C,UAAM,WAAW,MAAM;AACrB,gBAAU;AACV,WAAK,MAAM,MAAM,IAAI;AAAA,IACvB;AAEA,QAAI;AAAS,mBAAa,OAAO;AACjC,cAAU,WAAW,UAAU,GAAG;AAAA,EACpC;AACF;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/deprecated/useParentElement.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import type React from 'react';\nimport { useEffect, useState } from 'react';\n\nexport const useParentElement = (ref: React.RefObject<HTMLElement>) => {\n const [parent, setParent] = useState<ParentNode | null>(ref.current);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => {\n if (ref.current) setParent(ref.current.parentNode);\n });\n return parent;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAoC;AAE7B,MAAM,mBAAmB,CAAC,QAAsC;AACrE,QAAM,CAAC,QAAQ,SAAS,QAAI,uBAA4B,IAAI,OAAO;AAGnE,8BAAU,MAAM;AACd,QAAI,IAAI;AAAS,gBAAU,IAAI,QAAQ,UAAU;AAAA,EACnD,CAAC;AACD,SAAO;AACT;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAoC;AAE7B,MAAM,mBAAmB,CAAC,QAAsC;AACrE,QAAM,CAAC,QAAQ,SAAS,QAAI,uBAA4B,IAAI,OAAO;AAGnE,8BAAU,MAAM;AACd,QAAI,IAAI;AAAS,gBAAU,IAAI,QAAQ,UAAU;AAAA,EACnD,CAAC;AACD,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/deprecated/useSetRef.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable no-console, @typescript-eslint/ban-ts-comment */\n// @ts-nocheck\nimport { useCallback, useRef } from 'react';\nimport { deprecatedMsg } from './deprecatedMsg.js';\n\nexport const useSetRef = (initial: unknown) => {\n console.warn(`useSetRef ${deprecatedMsg}`);\n const ref = useRef(initial);\n const setRef = useCallback((node) => {\n ref.current = node;\n }, []);\n return [ref, setRef];\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAAoC;AACpC,2BAA8B;AAEvB,MAAM,YAAY,CAAC,YAAqB;AAC7C,UAAQ,KAAK,aAAa,oCAAe;AACzC,QAAM,UAAM,qBAAO,OAAO;AAC1B,QAAM,aAAS,0BAAY,CAAC,SAAS;AACnC,QAAI,UAAU;AAAA,EAChB,GAAG,CAAC,CAAC;AACL,SAAO,CAAC,KAAK,MAAM;AACrB;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAAoC;AACpC,2BAA8B;AAEvB,MAAM,YAAY,CAAC,YAAqB;AAC7C,UAAQ,KAAK,aAAa,oCAAe;AACzC,QAAM,UAAM,qBAAO,OAAO;AAC1B,QAAM,aAAS,0BAAY,CAAC,SAAS;AACnC,QAAI,UAAU;AAAA,EAChB,GAAG,CAAC,CAAC;AACL,SAAO,CAAC,KAAK,MAAM;AACrB;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/deprecated/useUncontrolled.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable no-console */\n/* eslint-disable @typescript-eslint/no-unsafe-argument */\n/* eslint-disable @typescript-eslint/no-unsafe-call */\n/* eslint-disable @typescript-eslint/no-unsafe-return */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { useUncontrolled as useUncontrolledImplementation } from 'uncontrollable';\nimport { deprecatedMsg } from './deprecatedMsg.js';\n\nexport const useUncontrolled = (...args: any[]) => {\n console.warn(`useUncontrolled ${deprecatedMsg}`);\n return useUncontrolledImplementation(...args);\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADKvB,4BAAiE;AACjE,2BAA8B;AAEvB,MAAM,kBAAkB,IAAI,SAAgB;AACjD,UAAQ,KAAK,mBAAmB,oCAAe;AAC/C,aAAO,sBAAAA,iBAA8B,GAAG,IAAI;AAC9C;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADKvB,4BAAiE;AACjE,2BAA8B;AAEvB,MAAM,kBAAkB,IAAI,SAAgB;AACjD,UAAQ,KAAK,mBAAmB,oCAAe;AAC/C,aAAO,sBAAAA,iBAA8B,GAAG,IAAI;AAC9C;",
6
6
  "names": ["useUncontrolledImplementation"]
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/deprecated/useWindowSize.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable no-console */\nimport { useLayoutEffect, useState } from 'react';\nimport { deprecatedMsg } from './deprecatedMsg.js';\n\nconst noop = () => {};\n\nexport const useWindowSize = () => {\n console.warn(`useWindowSize ${deprecatedMsg}`);\n const [size, setSize] = useState([0, 0]);\n useLayoutEffect(() => {\n if (!window) return noop;\n function updateSize() {\n setSize([window.innerWidth, window.innerHeight]);\n }\n window.addEventListener('resize', updateSize);\n window.addEventListener('orientationchange', updateSize);\n updateSize();\n return () => {\n window.removeEventListener('resize', updateSize);\n window.removeEventListener('orientationchange', updateSize);\n };\n }, []);\n if (!window) return noop;\n return size;\n};\n\nexport default useWindowSize;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAA0C;AAC1C,2BAA8B;AAE9B,MAAM,OAAO,MAAM;AAAC;AAEb,MAAM,gBAAgB,MAAM;AACjC,UAAQ,KAAK,iBAAiB,oCAAe;AAC7C,QAAM,CAAC,MAAM,OAAO,QAAI,uBAAS,CAAC,GAAG,CAAC,CAAC;AACvC,oCAAgB,MAAM;AACpB,QAAI,CAAC;AAAQ,aAAO;AACpB,aAAS,aAAa;AACpB,cAAQ,CAAC,OAAO,YAAY,OAAO,WAAW,CAAC;AAAA,IACjD;AACA,WAAO,iBAAiB,UAAU,UAAU;AAC5C,WAAO,iBAAiB,qBAAqB,UAAU;AACvD,eAAW;AACX,WAAO,MAAM;AACX,aAAO,oBAAoB,UAAU,UAAU;AAC/C,aAAO,oBAAoB,qBAAqB,UAAU;AAAA,IAC5D;AAAA,EACF,GAAG,CAAC,CAAC;AACL,MAAI,CAAC;AAAQ,WAAO;AACpB,SAAO;AACT;AAEA,IAAO,wBAAQ;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAA0C;AAC1C,2BAA8B;AAE9B,MAAM,OAAO,MAAM;AAAC;AAEb,MAAM,gBAAgB,MAAM;AACjC,UAAQ,KAAK,iBAAiB,oCAAe;AAC7C,QAAM,CAAC,MAAM,OAAO,QAAI,uBAAS,CAAC,GAAG,CAAC,CAAC;AACvC,oCAAgB,MAAM;AACpB,QAAI,CAAC;AAAQ,aAAO;AACpB,aAAS,aAAa;AACpB,cAAQ,CAAC,OAAO,YAAY,OAAO,WAAW,CAAC;AAAA,IACjD;AACA,WAAO,iBAAiB,UAAU,UAAU;AAC5C,WAAO,iBAAiB,qBAAqB,UAAU;AACvD,eAAW;AACX,WAAO,MAAM;AACX,aAAO,oBAAoB,UAAU,UAAU;AAC/C,aAAO,oBAAoB,qBAAqB,UAAU;AAAA,IAC5D;AAAA,EACF,GAAG,CAAC,CAAC;AACL,MAAI,CAAC;AAAQ,WAAO;AACpB,SAAO;AACT;AAEA,IAAO,wBAAQ;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -41,6 +45,7 @@ const getComponentFromProps = (Component, props, children = []) => {
41
45
  ...Component.props,
42
46
  ...props
43
47
  },
48
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
44
49
  componentChildren ? [...componentChildren, ...children] : [...children]
45
50
  );
46
51
  };
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/getComponentFromProps.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable no-nested-ternary, @typescript-eslint/ban-ts-comment */\n// @ts-nocheck\nimport type { PropsWithChildren } from 'react';\nimport React from 'react';\n\nexport const getComponentFromProps = (\n Component: React.ReactElement<PropsWithChildren<unknown>> | React.ComponentType<unknown>,\n props: Record<string, unknown>,\n children = [],\n) => {\n if (!Component) return null;\n const componentChildren =\n typeof Component !== 'function' && Component.props\n ? Array.isArray(Component.props.children)\n ? Component.props.children\n : [Component.props.children]\n : null;\n return typeof Component === 'function' ? (\n <Component {...props}>{children}</Component>\n ) : (\n React.cloneElement(\n Component,\n {\n ...Component.props,\n ...props,\n },\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n componentChildren ? [...componentChildren, ...children] : [...children],\n )\n );\n};\n\nexport default getComponentFromProps;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkBnB;AAfJ,mBAAkB;AAEX,MAAM,wBAAwB,CACnC,WACA,OACA,WAAW,CAAC,MACT;AACH,MAAI,CAAC;AAAW,WAAO;AACvB,QAAM,oBACJ,OAAO,cAAc,cAAc,UAAU,QACzC,MAAM,QAAQ,UAAU,MAAM,QAAQ,IACpC,UAAU,MAAM,WAChB,CAAC,UAAU,MAAM,QAAQ,IAC3B;AACN,SAAO,OAAO,cAAc,aAC1B,4CAAC,aAAW,GAAG,OAAQ,UAAS,IAEhC,aAAAA,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,MACE,GAAG,UAAU;AAAA,MACb,GAAG;AAAA,IACL;AAAA,IAEA,oBAAoB,CAAC,GAAG,mBAAmB,GAAG,QAAQ,IAAI,CAAC,GAAG,QAAQ;AAAA,EACxE;AAEJ;AAEA,IAAO,gCAAQ;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkBnB;AAfJ,mBAAkB;AAEX,MAAM,wBAAwB,CACnC,WACA,OACA,WAAW,CAAC,MACT;AACH,MAAI,CAAC;AAAW,WAAO;AACvB,QAAM,oBACJ,OAAO,cAAc,cAAc,UAAU,QACzC,MAAM,QAAQ,UAAU,MAAM,QAAQ,IACpC,UAAU,MAAM,WAChB,CAAC,UAAU,MAAM,QAAQ,IAC3B;AACN,SAAO,OAAO,cAAc,aAC1B,4CAAC,aAAW,GAAG,OAAQ,UAAS,IAEhC,aAAAA,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,MACE,GAAG,UAAU;AAAA,MACb,GAAG;AAAA,IACL;AAAA;AAAA,IAEA,oBAAoB,CAAC,GAAG,mBAAmB,GAAG,QAAQ,IAAI,CAAC,GAAG,QAAQ;AAAA,EACxE;AAEJ;AAEA,IAAO,gCAAQ;",
6
6
  "names": ["React"]
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -35,6 +39,7 @@ __export(hooks_exports, {
35
39
  useExpandState: () => import_useExpandState.useExpandState,
36
40
  useFocusTrap: () => import_useFocusTrap.useFocusTrap,
37
41
  useForceUpdate: () => import_use_force_update.default,
42
+ useHeadlessTooltip: () => import_useHeadlessTooltip.useHeadlessTooltip,
38
43
  useHotkeys: () => import_useHotkeys.useHotkeys,
39
44
  useHoverHandlersDelay: () => import_useHoverHandlersDelay.useHoverHandlersDelay,
40
45
  useIsMobile: () => import_useIsMobile.useIsMobile,
@@ -62,6 +67,7 @@ var import_useDerivedStateFromProps = require("./useDerivedStateFromProps.js");
62
67
  var import_useExecutionTimer = require("./useExecutionTimer.js");
63
68
  var import_useExpandState = require("./useExpandState.js");
64
69
  var import_useFocusTrap = require("./useFocusTrap.js");
70
+ var import_useHeadlessTooltip = require("./useHeadlessTooltip.js");
65
71
  var import_useHotkeys = require("./useHotkeys.js");
66
72
  var import_useHoverHandlersDelay = require("./useHoverHandlersDelay.js");
67
73
  var import_useIsMobile = require("./useIsMobile.js");
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export { default as useMeasure } from 'use-measure';\nexport { default as useForceUpdate } from 'use-force-update';\nexport { default as useOnClickOutside } from 'use-onclickoutside';\n\nexport { useCallbackAfterRender } from './useCallbackAfterRender.js';\nexport { useCancellableDelayedCallback } from './useCancellableDelayedCallback.js';\nexport { useDerivedStateFromProps } from './useDerivedStateFromProps.js';\nexport { useExecutionTimer } from './useExecutionTimer.js';\nexport { useExpandState } from './useExpandState.js';\nexport { useFocusTrap, UseFocusTrapWithSchema } from './useFocusTrap.js';\nexport { useHotkeys } from './useHotkeys.js';\nexport { useHoverHandlersDelay } from './useHoverHandlersDelay.js';\nexport { useIsMobile } from './useIsMobile.js';\nexport { useIsShowingEllipsis } from './useIsShowingEllipsis.js';\nexport { useMakeMutable } from './useMakeMutable.js';\nexport { useOnBlurOut, UseOnBlurOutWithSchema } from './useOnBlurOut.js';\nexport { useOnElementResize } from './useOnElementResize.js';\nexport { useOnFirstFocusIn, UseOnFirstFocusInWithSchema } from './useOnFirstFocusIn.js';\nexport { useOnSpecificFocus, UseOnSpecificFocusWithSchema } from './useOnSpecificFocus.js';\nexport { usePrevious } from './usePrevious.js';\nexport { useResizeObserver } from './useResizeObserver.js';\nexport { useShouldRecalculate } from './useShouldRecalculate.js';\nexport { useWindowScrollerList } from './useWindowScrollerList.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,yBAAsC;AACtC,8BAA0C;AAC1C,gCAA6C;AAE7C,oCAAuC;AACvC,2CAA8C;AAC9C,sCAAyC;AACzC,+BAAkC;AAClC,4BAA+B;AAC/B,0BAAqD;AACrD,wBAA2B;AAC3B,mCAAsC;AACtC,yBAA4B;AAC5B,kCAAqC;AACrC,4BAA+B;AAC/B,0BAAqD;AACrD,gCAAmC;AACnC,+BAA+D;AAC/D,gCAAiE;AACjE,yBAA4B;AAC5B,+BAAkC;AAClC,kCAAqC;AACrC,mCAAsC;",
4
+ "sourcesContent": ["export { default as useMeasure } from 'use-measure';\nexport { default as useForceUpdate } from 'use-force-update';\nexport { default as useOnClickOutside } from 'use-onclickoutside';\n\nexport { useCallbackAfterRender } from './useCallbackAfterRender.js';\nexport { useCancellableDelayedCallback } from './useCancellableDelayedCallback.js';\nexport { useDerivedStateFromProps } from './useDerivedStateFromProps.js';\nexport { useExecutionTimer } from './useExecutionTimer.js';\nexport { useExpandState } from './useExpandState.js';\nexport { useFocusTrap, UseFocusTrapWithSchema } from './useFocusTrap.js';\nexport { useHeadlessTooltip } from './useHeadlessTooltip.js';\nexport { useHotkeys } from './useHotkeys.js';\nexport { useHoverHandlersDelay } from './useHoverHandlersDelay.js';\nexport { useIsMobile } from './useIsMobile.js';\nexport { useIsShowingEllipsis } from './useIsShowingEllipsis.js';\nexport { useMakeMutable } from './useMakeMutable.js';\nexport { useOnBlurOut, UseOnBlurOutWithSchema } from './useOnBlurOut.js';\nexport { useOnElementResize } from './useOnElementResize.js';\nexport { useOnFirstFocusIn, UseOnFirstFocusInWithSchema } from './useOnFirstFocusIn.js';\nexport { useOnSpecificFocus, UseOnSpecificFocusWithSchema } from './useOnSpecificFocus.js';\nexport { usePrevious } from './usePrevious.js';\nexport { useResizeObserver } from './useResizeObserver.js';\nexport { useShouldRecalculate } from './useShouldRecalculate.js';\nexport { useWindowScrollerList } from './useWindowScrollerList.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,yBAAsC;AACtC,8BAA0C;AAC1C,gCAA6C;AAE7C,oCAAuC;AACvC,2CAA8C;AAC9C,sCAAyC;AACzC,+BAAkC;AAClC,4BAA+B;AAC/B,0BAAqD;AACrD,gCAAmC;AACnC,wBAA2B;AAC3B,mCAAsC;AACtC,yBAA4B;AAC5B,kCAAqC;AACrC,4BAA+B;AAC/B,0BAAqD;AACrD,gCAAmC;AACnC,+BAA+D;AAC/D,gCAAiE;AACjE,yBAA4B;AAC5B,+BAAkC;AAClC,kCAAqC;AACrC,mCAAsC;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useCallbackAfterRender.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { useRef, useLayoutEffect, useMemo, useEffect } from 'react';\n\ntype Callback = (callback: () => void) => void;\n\n// Inspired in https://github.com/ryuuji3/react-hooks/blob/4b183d61c30abf17efeab2240f8ff652a5dbb8e2/packages/use-callback-after-render/src/hooks/useCallbackAfterRender.ts\nexport const useCallbackAfterRender = (isLayout = false): Callback => {\n const lastRun = useRef<(() => void) | null>(null);\n\n const effect = useMemo(() => (isLayout ? useLayoutEffect : useEffect), [isLayout]);\n\n effect(() => {\n lastRun.current?.();\n lastRun.current = null;\n });\n\n return (callback) => {\n lastRun.current = callback; // schedule callback after render\n };\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA4D;AAKrD,MAAM,yBAAyB,CAAC,WAAW,UAAoB;AACpE,QAAM,cAAU,qBAA4B,IAAI;AAEhD,QAAM,aAAS,sBAAQ,MAAO,WAAW,+BAAkB,wBAAY,CAAC,QAAQ,CAAC;AAEjF,SAAO,MAAM;AACX,YAAQ,UAAU;AAClB,YAAQ,UAAU;AAAA,EACpB,CAAC;AAED,SAAO,CAAC,aAAa;AACnB,YAAQ,UAAU;AAAA,EACpB;AACF;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA4D;AAKrD,MAAM,yBAAyB,CAAC,WAAW,UAAoB;AACpE,QAAM,cAAU,qBAA4B,IAAI;AAEhD,QAAM,aAAS,sBAAQ,MAAO,WAAW,+BAAkB,wBAAY,CAAC,QAAQ,CAAC;AAEjF,SAAO,MAAM;AACX,YAAQ,UAAU;AAClB,YAAQ,UAAU;AAAA,EACpB,CAAC;AAED,SAAO,CAAC,aAAa;AACnB,YAAQ,UAAU;AAAA,EACpB;AACF;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useCancellableDelayedCallback.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { useCallback, useRef } from 'react';\n\ntype Callback = (...args: unknown[]) => unknown;\n\nexport const useCancellableDelayedCallback = (cb: Callback, delay: number) => {\n const timeoutRef = useRef<NodeJS.Timeout>();\n const cancel = useCallback(() => {\n const timeoutId = timeoutRef.current;\n if (timeoutId) {\n timeoutRef.current = undefined;\n clearTimeout(timeoutId);\n }\n }, [timeoutRef]);\n const delayedCb: Callback = useCallback(\n (...args) => {\n timeoutRef.current = setTimeout(() => cb(...args), delay);\n },\n [cb, delay],\n );\n\n return [delayedCb, cancel];\n};\n\nexport default useCancellableDelayedCallback;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAoC;AAI7B,MAAM,gCAAgC,CAAC,IAAc,UAAkB;AAC5E,QAAM,iBAAa,qBAAuB;AAC1C,QAAM,aAAS,0BAAY,MAAM;AAC/B,UAAM,YAAY,WAAW;AAC7B,QAAI,WAAW;AACb,iBAAW,UAAU;AACrB,mBAAa,SAAS;AAAA,IACxB;AAAA,EACF,GAAG,CAAC,UAAU,CAAC;AACf,QAAM,gBAAsB;AAAA,IAC1B,IAAI,SAAS;AACX,iBAAW,UAAU,WAAW,MAAM,GAAG,GAAG,IAAI,GAAG,KAAK;AAAA,IAC1D;AAAA,IACA,CAAC,IAAI,KAAK;AAAA,EACZ;AAEA,SAAO,CAAC,WAAW,MAAM;AAC3B;AAEA,IAAO,wCAAQ;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAoC;AAI7B,MAAM,gCAAgC,CAAC,IAAc,UAAkB;AAC5E,QAAM,iBAAa,qBAAuB;AAC1C,QAAM,aAAS,0BAAY,MAAM;AAC/B,UAAM,YAAY,WAAW;AAC7B,QAAI,WAAW;AACb,iBAAW,UAAU;AACrB,mBAAa,SAAS;AAAA,IACxB;AAAA,EACF,GAAG,CAAC,UAAU,CAAC;AACf,QAAM,gBAAsB;AAAA,IAC1B,IAAI,SAAS;AACX,iBAAW,UAAU,WAAW,MAAM,GAAG,GAAG,IAAI,GAAG,KAAK;AAAA,IAC1D;AAAA,IACA,CAAC,IAAI,KAAK;AAAA,EACZ;AAEA,SAAO,CAAC,WAAW,MAAM;AAC3B;AAEA,IAAO,wCAAQ;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useDerivedStateFromProps.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import type React from 'react';\nimport { useRef, useState } from 'react';\nimport { isEqual, isFunction } from '../utils.js';\n\ninterface ShouldUpdateArg {\n prop: unknown;\n prevProp: unknown;\n stateValue: unknown;\n}\n\ntype OnUpdateT<T> = (prop: T, prevProp?: T | Record<string, never>) => T;\n\ninterface OptionsT<T> {\n onUpdate?: OnUpdateT<T>;\n shouldUpdate?: (arg: ShouldUpdateArg) => boolean;\n updateOnStateChange?: boolean;\n}\n\nconst defaultPropUpdateOnChange = <T,>(prop: T) => prop;\n\nfunction defaultShouldUpdate({ prop, prevProp, stateValue }: ShouldUpdateArg) {\n return !isEqual(prop, prevProp) && !isEqual(prop, stateValue);\n}\n\nfunction setStateWithUpdate<T>(onUpdate: OnUpdateT<T>, setState: React.Dispatch<React.SetStateAction<T>>) {\n return (state: React.SetStateAction<T>) => {\n setState((prevState: T) => onUpdate(isFunction(state) ? state(prevState) : state, prevState));\n };\n}\n\nexport const useDerivedStateFromProps = <T,>(\n prop: T,\n options: OptionsT<T> = {},\n): [T, React.Dispatch<React.SetStateAction<T>>] => {\n const {\n onUpdate = defaultPropUpdateOnChange as OnUpdateT<T>,\n shouldUpdate = defaultShouldUpdate,\n updateOnStateChange = false,\n } = options;\n\n const [stateValue, setState] = useState(onUpdate(prop, {}));\n const handleSetState = updateOnStateChange ? setStateWithUpdate(onUpdate, setState) : setState;\n const prevProp = useRef(prop);\n\n if (\n shouldUpdate({\n prop,\n prevProp: prevProp.current,\n stateValue,\n })\n ) {\n const nextProp = onUpdate(prop, prevProp.current);\n setState(nextProp);\n }\n prevProp.current = prop;\n return [stateValue, handleSetState];\n};\n\nexport default useDerivedStateFromProps;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAiC;AACjC,mBAAoC;AAgBpC,MAAM,4BAA4B,CAAK,SAAY;AAEnD,SAAS,oBAAoB,EAAE,MAAM,UAAU,WAAW,GAAoB;AAC5E,SAAO,KAAC,sBAAQ,MAAM,QAAQ,KAAK,KA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MACyB;AACjD,QAAM;AAAA,IACJ,WAAW;AAAA,IACX,eAAe;AAAA,IACf,sBAAsB;AAAA,EACxB,IAAI;AAEJ,QAAM,CAAC,YAAY,QAAQ,QAAI,uBAAS,SAAS,MAAM,CAAC,CAAC,CAAC;AAC1D,QAAM,iBAAiB,sBAAsB,mBAAmB,UAAU,QAAQ,IAAI;AACtF,QAAM,eAAW,qBAAO,IAAI;AAE5B,MACE,aAAa;AAAA,IACX;AAAA,IACA,UAAU,SAAS;AAAA,IACnB;AAAA,EACF,CAAC,GACD;AACA,UAAM,WAAW,SAAS,MAAM,SAAS,OAAO;AAChD,aAAS,QAAQ;AAAA,EACnB;AACA,WAAS,UAAU;AACnB,SAAO,CAAC,YAAY,cAAc;AACpC;AAEA,IAAO,mCAAQ;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useDimensions.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { useEffect, useState } from 'react';\nimport ResizeObserver from 'resize-observer-polyfill';\n\nexport const useDimensions = (domNode: HTMLElement) => {\n const [dimensions, setDimensions] = useState<DOMRectReadOnly>();\n\n useEffect(() => {\n const resizeObserver = new ResizeObserver(([entry]) => setDimensions(entry.contentRect));\n if (domNode) {\n resizeObserver.observe(domNode);\n return () => resizeObserver.unobserve(domNode);\n }\n\n return undefined;\n }, [domNode]);\n\n return dimensions;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAoC;AACpC,sCAA2B;AAEpB,MAAM,gBAAgB,CAAC,YAAyB;AACrD,QAAM,CAAC,YAAY,aAAa,QAAI,uBAA0B;AAE9D,8BAAU,MAAM;AACd,UAAM,iBAAiB,IAAI,gCAAAA,QAAe,CAAC,CAAC,KAAK,MAAM,cAAc,MAAM,WAAW,CAAC;AACvF,QAAI,SAAS;AACX,qBAAe,QAAQ,OAAO;AAC9B,aAAO,MAAM,eAAe,UAAU,OAAO;AAAA,IAC/C;AAEA,WAAO;AAAA,EACT,GAAG,CAAC,OAAO,CAAC;AAEZ,SAAO;AACT;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAoC;AACpC,sCAA2B;AAEpB,MAAM,gBAAgB,CAAC,YAAyB;AACrD,QAAM,CAAC,YAAY,aAAa,QAAI,uBAA0B;AAE9D,8BAAU,MAAM;AACd,UAAM,iBAAiB,IAAI,gCAAAA,QAAe,CAAC,CAAC,KAAK,MAAM,cAAc,MAAM,WAAW,CAAC;AACvF,QAAI,SAAS;AACX,qBAAe,QAAQ,OAAO;AAC9B,aAAO,MAAM,eAAe,UAAU,OAAO;AAAA,IAC/C;AAEA,WAAO;AAAA,EACT,GAAG,CAAC,OAAO,CAAC;AAEZ,SAAO;AACT;",
6
6
  "names": ["ResizeObserver"]
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useExecutionTimer.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { useRef } from 'react';\n\ntype Callback = (...args: unknown[]) => unknown;\n\nexport const useExecutionTimer = (startFn: Callback, cleanFn: Callback, delayTime: number) => {\n const startTimer = useRef<NodeJS.Timeout>();\n const closeTimer = useRef<NodeJS.Timeout>();\n\n const startFunction: Callback = (...args) => {\n if (closeTimer.current) clearTimeout(closeTimer.current);\n startTimer.current = setTimeout(() => startFn(...args), delayTime);\n };\n\n const cleanFunction: Callback = (...args) => {\n if (startTimer.current) clearTimeout(startTimer.current);\n closeTimer.current = setTimeout(() => cleanFn(...args), 30);\n };\n return [startFunction, cleanFunction];\n};\n\nexport default useExecutionTimer;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAuB;AAIhB,MAAM,oBAAoB,CAAC,SAAmB,SAAmB,cAAsB;AAC5F,QAAM,iBAAa,qBAAuB;AAC1C,QAAM,iBAAa,qBAAuB;AAE1C,QAAM,gBAA0B,IAAI,SAAS;AAC3C,QAAI,WAAW;AAAS,mBAAa,WAAW,OAAO;AACvD,eAAW,UAAU,WAAW,MAAM,QAAQ,GAAG,IAAI,GAAG,SAAS;AAAA,EACnE;AAEA,QAAM,gBAA0B,IAAI,SAAS;AAC3C,QAAI,WAAW;AAAS,mBAAa,WAAW,OAAO;AACvD,eAAW,UAAU,WAAW,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAE;AAAA,EAC5D;AACA,SAAO,CAAC,eAAe,aAAa;AACtC;AAEA,IAAO,4BAAQ;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAuB;AAIhB,MAAM,oBAAoB,CAAC,SAAmB,SAAmB,cAAsB;AAC5F,QAAM,iBAAa,qBAAuB;AAC1C,QAAM,iBAAa,qBAAuB;AAE1C,QAAM,gBAA0B,IAAI,SAAS;AAC3C,QAAI,WAAW;AAAS,mBAAa,WAAW,OAAO;AACvD,eAAW,UAAU,WAAW,MAAM,QAAQ,GAAG,IAAI,GAAG,SAAS;AAAA,EACnE;AAEA,QAAM,gBAA0B,IAAI,SAAS;AAC3C,QAAI,WAAW;AAAS,mBAAa,WAAW,OAAO;AACvD,eAAW,UAAU,WAAW,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAE;AAAA,EAC5D;AACA,SAAO,CAAC,eAAe,aAAa;AACtC;AAEA,IAAO,4BAAQ;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useExpandState.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { useMemo } from 'react';\nimport { isFunction } from '../utils.js';\nimport { useDerivedStateFromProps } from './useDerivedStateFromProps.js';\n\ntype ItemT = Record<string, string>;\ninterface UseExpandStateArg {\n items?: ItemT[];\n itemKey?: keyof ItemT;\n expanded?: Record<string, boolean>;\n onExpand: (item: ItemT) => void;\n onExpandChange: (nextState: Record<string, boolean>, item?: ItemT) => void;\n onExpandAll: (nextState: Record<string, boolean>) => void;\n onToggleExpand: (item: ItemT) => void;\n onCollapse: (item: ItemT) => void;\n}\n\nconst toggleStateInObject = <T,>(obj: Record<string, T>, key: string, value: T) => {\n const nextObj = { ...obj };\n if (nextObj[key]) {\n delete nextObj[key];\n } else {\n nextObj[key] = value;\n }\n return nextObj;\n};\n\nconst noop = () => null;\n\nexport const useExpandState = ({\n items = [],\n itemKey = 'id',\n expanded: expandedProp = {},\n onExpand,\n onExpandChange = noop,\n onExpandAll = noop,\n onToggleExpand,\n onCollapse,\n}: UseExpandStateArg) => {\n const [expanded, setExpanded] = useDerivedStateFromProps(expandedProp);\n\n const isExpandedAll = useMemo(() => Object.keys(expanded).length === items.length, [expanded, items]);\n\n const toggleExpandAll = (stateData = true) => {\n setExpanded(() => {\n const nextState: Record<string, boolean> = {};\n if (!isExpandedAll) {\n items.forEach((item) => {\n nextState[item[itemKey]] = stateData;\n });\n }\n onExpandChange(nextState);\n onExpandAll(nextState);\n return nextState;\n });\n };\n\n const expand = (item: ItemT, stateData = true) => {\n if (!item) return;\n if (isFunction(onExpand)) {\n onExpand(item);\n }\n setExpanded((prevState) => {\n const key = item[itemKey];\n const nextState = { ...prevState, [key]: stateData };\n onExpandChange(nextState, item);\n return nextState;\n });\n };\n\n const toggleExpand = (item: ItemT, stateData = true) => {\n if (isFunction(onToggleExpand)) {\n onToggleExpand(item);\n }\n setExpanded((prevState) => {\n const key = item[itemKey];\n const nextState = toggleStateInObject(prevState, key, stateData);\n onExpandChange(nextState, item);\n return nextState;\n });\n };\n\n const collapse = (item: ItemT) => {\n if (isFunction(onCollapse)) {\n onCollapse(item);\n }\n setExpanded((prevState) => {\n const nextState = { ...prevState };\n delete nextState[item[itemKey]];\n onExpandChange(nextState, item);\n return nextState;\n });\n };\n\n return {\n state: { expanded, isExpandedAll },\n actions: {\n expand,\n toggleExpandAll,\n toggleExpand,\n collapse,\n },\n setExpanded,\n };\n};\n\nexport default useExpandState;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAwB;AACxB,mBAA2B;AAC3B,sCAAyC;AAczC,MAAM,sBAAsB,CAAK,KAAwB,KAAa,UAAa;AACjF,QAAM,UAAU,EAAE,GAAG,IAAI;AACzB,MAAI,QAAQ,MAAM;AAChB,WAAO,QAAQ;AAAA,EACjB,OAAO;AACL,YAAQ,OAAO;AAAA,EACjB;AACA,SAAO;AACT;AAEA,MAAM,OAAO,MAAM;AAEZ,MAAM,iBAAiB,CAAC;AAAA,EAC7B,QAAQ,CAAC;AAAA,EACT,UAAU;AAAA,EACV,UAAU,eAAe,CAAC;AAAA,EAC1B;AAAA,EACA,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd;AAAA,EACA;AACF,MAAyB;AACvB,QAAM,CAAC,UAAU,WAAW,QAAI,0DAAyB,YAAY;AAErE,QAAM,oBAAgB,sBAAQ,MAAM,OAAO,KAAK,QAAQ,EAAE,WAAW,MAAM,QAAQ,CAAC,UAAU,KAAK,CAAC;AAEpG,QAAM,kBAAkB,CAAC,YAAY,SAAS;AAC5C,gBAAY,MAAM;AAChB,YAAM,YAAqC,CAAC;AAC5C,UAAI,CAAC,eAAe;AAClB,cAAM,QAAQ,CAAC,SAAS;AACtB,oBAAU,KAAK,YAAY;AAAA,QAC7B,CAAC;AAAA,MACH;AACA,qBAAe,SAAS;AACxB,kBAAY,SAAS;AACrB,aAAO;AAAA,IACT,CAAC;AAAA,EACH;AAEA,QAAM,SAAS,CAAC,MAAa,YAAY,SAAS;AAChD,QAAI,CAAC;AAAM;AACX,YAAI,yBAAW,QAAQ,GAAG;AACxB,eAAS,IAAI;AAAA,IACf;AACA,gBAAY,CAAC,cAAc;AACzB,YAAM,M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IAAI;AAAA,IACjB;AACA,gBAAY,CAAC,cAAc;AACzB,YAAM,YAAY,EAAE,GAAG,UAAU;AACjC,aAAO,UAAU,KAAK,OAAO,CAAC;AAC9B,qBAAe,WAAW,IAAI;AAC9B,aAAO;AAAA,IACT,CAAC;AAAA,EACH;AAEA,SAAO;AAAA,IACL,OAAO,EAAE,UAAU,cAAc;AAAA,IACjC,SAAS;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,EACF;AACF;AAEA,IAAO,yBAAQ;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useFocusTrap.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport type React from 'react';\nimport { useCallback, useEffect } from 'react';\nimport { describe, PropTypes } from '../props-helpers/index.js';\n\nconst useFocusTrapProps: { [index: string]: string } = {\n firstElementRef: 'object',\n lastElementRef: 'object',\n onKeyDown: 'function',\n};\n\nconst getVariableType = (arg: unknown): string => {\n if (Array.isArray(arg)) return 'array';\n if (arg === null) return 'null';\n if (arg === undefined) return 'undefined';\n return typeof arg;\n};\n\nconst throwTypeError = (validPropKey: string, invalidProp: unknown): void => {\n throw new Error(\n `Warning: You are trying to pass a not valid \"${validPropKey}\" property to use a useFocusTrap hook, please provide a valid type.\n\n Received: ${getVariableType(invalidProp)}\n Expected: ${useFocusTrapProps[validPropKey]}\n `,\n );\n};\n\nconst throwRequiredError = (validPropKey: string): void => {\n throw new Error(\n `Warning: Please provide a \"${validPropKey}\" property to use a useFocusTrap hook, this property is required.`,\n );\n};\n\nconst validateProps = (componentProps: Record<string, unknown>): void => {\n if (componentProps.firstElementRef === undefined) {\n throwRequiredError('firstElementRef');\n }\n if (componentProps.lastElementRef === undefined) {\n throwRequiredError('lastElementRef');\n }\n if (componentProps.firstElementRef && typeof componentProps.firstElementRef !== 'object') {\n throwTypeError('firstElementRef', componentProps.firstElementRef);\n }\n if (componentProps.lastElementRef && typeof componentProps.lastElementRef !== 'object') {\n throwTypeError('lastElementRef', componentProps.lastElementRef);\n }\n if (componentProps.onKeyDown && typeof componentProps.onKeyDown !== 'function') {\n throwTypeError('onKeyDown', componentProps.onKeyDown);\n }\n};\n\nconst propTypes = {\n firstElementRef: PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.node]).description(\n 'Reference to the first element in the focus trap.',\n ).isRequired,\n lastElementRef: PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.node]).description(\n 'Reference to the second element in the focus trap.',\n ).isRequired,\n onKeyDown: PropTypes.func.description('Optional onKeyDown callback.'),\n} as WeakValidationMap<unknown>;\n\ntype UseFocusTrapFunctionT = <T extends HTMLElement = HTMLElement, K extends HTMLElement = HTMLElement>({\n firstElementRef,\n lastElementRef,\n onKeyDown,\n}: {\n firstElementRef: React.MutableRefObject<T | null>;\n lastElementRef: React.MutableRefObject<K | null>;\n onKeyDown?: (e: KeyboardEvent) => void;\n}) => (e: KeyboardEvent) => void;\n\ninterface UseFocusTrapT extends UseFocusTrapFunctionT {\n displayName: 'useFocusTrap';\n}\n\nconst useFocusTrap: UseFocusTrapT = (props) => {\n // We need to investigate how to validate references with useValidateTypescriptPropTypes.\n useEffect(() => validateProps(props), [props]);\n\n const { firstElementRef, lastElementRef, onKeyDown } = props;\n\n return useCallback(\n (e: KeyboardEvent) => {\n if (onKeyDown) onKeyDown(e);\n // we need to check all the condition before preventing default\n // because we want last-element/first-element tab/shift-tab to keep working\n\n if (e.key === 'Tab' && !e.shiftKey && e.target === lastElementRef.current && firstElementRef.current) {\n e.preventDefault();\n e.stopPropagation();\n firstElementRef.current.focus();\n }\n if (e.key === 'Tab' && e.shiftKey && e.target === firstElementRef.current && lastElementRef.current) {\n e.preventDefault();\n e.stopPropagation();\n lastElementRef.current.focus();\n }\n },\n [firstElementRef, lastElementRef, onKeyDown],\n );\n};\n\nuseFocusTrap.displayName = 'useFocusTrap';\nconst UseFocusTrapWithSchema = describe(useFocusTrap);\n\nUseFocusTrapWithSchema.propTypes = propTypes;\n\nexport { useFocusTrap, UseFocusTrapWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAAuC;AACvC,2BAAoC;AAEpC,MAAM,oBAAiD;AAAA,EACrD,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,WAAW;AACb;AAEA,MAAM,kBAAkB,CAAC,QAAyB;AAChD,MAAI,MAAM,QAAQ,GAAG;AAAG,WAAO;AAC/B,MAAI,QAAQ;AAAM,WAAO;AACzB,MAAI,QAAQ;AAAW,WAAO;AAC9B,SAAO,OAAO;AAChB;AAEA,MAAM,iBAAiB,CAAC,cAAsB,gBAA+B;AAC3E,QAAM,IAAI;AAAA,IACR,gDAAgD;AAAA;AAAA,cAEtC,gBAAgB,WAAW;AAAA,cAC3B,kBAAkB;AAAA;AAAA,EAE9B;AACF;AAEA,MAAM,qBAAqB,CAAC,iBAA+B;AACzD,QAAM,IAAI;AAAA,IACR,8BAA8B;AAAA,EAChC;AACF;AAEA,MAAM,gBAAgB,CAAC,mBAAkD;AACvE,MAAI,eAAe,oBAAoB,QAAW;AAChD,uBAAmB,iBAAiB;AAAA,EACtC;AACA,M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