@helpwave/hightide 0.1.11 → 0.1.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 (277) hide show
  1. package/dist/components/date/DatePicker.js +37 -7
  2. package/dist/components/date/DatePicker.js.map +1 -1
  3. package/dist/components/date/DatePicker.mjs +37 -7
  4. package/dist/components/date/DatePicker.mjs.map +1 -1
  5. package/dist/components/date/DayPicker.js.map +1 -1
  6. package/dist/components/date/DayPicker.mjs.map +1 -1
  7. package/dist/components/date/TimePicker.js +27 -6
  8. package/dist/components/date/TimePicker.js.map +1 -1
  9. package/dist/components/date/TimePicker.mjs +27 -6
  10. package/dist/components/date/TimePicker.mjs.map +1 -1
  11. package/dist/components/date/YearMonthPicker.js +36 -6
  12. package/dist/components/date/YearMonthPicker.js.map +1 -1
  13. package/dist/components/date/YearMonthPicker.mjs +36 -6
  14. package/dist/components/date/YearMonthPicker.mjs.map +1 -1
  15. package/dist/components/dialogs/ConfirmDialog.js +16 -2
  16. package/dist/components/dialogs/ConfirmDialog.js.map +1 -1
  17. package/dist/components/dialogs/ConfirmDialog.mjs +16 -2
  18. package/dist/components/dialogs/ConfirmDialog.mjs.map +1 -1
  19. package/dist/components/layout-and-navigation/Carousel.js +42 -9
  20. package/dist/components/layout-and-navigation/Carousel.js.map +1 -1
  21. package/dist/components/layout-and-navigation/Carousel.mjs +42 -9
  22. package/dist/components/layout-and-navigation/Carousel.mjs.map +1 -1
  23. package/dist/components/layout-and-navigation/Expandable.js +1 -1
  24. package/dist/components/layout-and-navigation/Expandable.js.map +1 -1
  25. package/dist/components/layout-and-navigation/Expandable.mjs +1 -1
  26. package/dist/components/layout-and-navigation/Expandable.mjs.map +1 -1
  27. package/dist/components/layout-and-navigation/FAQSection.js +1 -1
  28. package/dist/components/layout-and-navigation/FAQSection.js.map +1 -1
  29. package/dist/components/layout-and-navigation/FAQSection.mjs +1 -1
  30. package/dist/components/layout-and-navigation/FAQSection.mjs.map +1 -1
  31. package/dist/components/layout-and-navigation/Overlay.js +16 -2
  32. package/dist/components/layout-and-navigation/Overlay.js.map +1 -1
  33. package/dist/components/layout-and-navigation/Overlay.mjs +16 -2
  34. package/dist/components/layout-and-navigation/Overlay.mjs.map +1 -1
  35. package/dist/components/layout-and-navigation/Pagination.d.mts +6 -3
  36. package/dist/components/layout-and-navigation/Pagination.d.ts +6 -3
  37. package/dist/components/layout-and-navigation/Pagination.js +404 -19
  38. package/dist/components/layout-and-navigation/Pagination.js.map +1 -1
  39. package/dist/components/layout-and-navigation/Pagination.mjs +404 -19
  40. package/dist/components/layout-and-navigation/Pagination.mjs.map +1 -1
  41. package/dist/components/layout-and-navigation/SearchableList.js +187 -67
  42. package/dist/components/layout-and-navigation/SearchableList.js.map +1 -1
  43. package/dist/components/layout-and-navigation/SearchableList.mjs +183 -63
  44. package/dist/components/layout-and-navigation/SearchableList.mjs.map +1 -1
  45. package/dist/components/layout-and-navigation/StepperBar.js +37 -5
  46. package/dist/components/layout-and-navigation/StepperBar.js.map +1 -1
  47. package/dist/components/layout-and-navigation/StepperBar.mjs +37 -5
  48. package/dist/components/layout-and-navigation/StepperBar.mjs.map +1 -1
  49. package/dist/components/layout-and-navigation/TextImage.js +2 -0
  50. package/dist/components/layout-and-navigation/TextImage.js.map +1 -1
  51. package/dist/components/layout-and-navigation/TextImage.mjs +2 -0
  52. package/dist/components/layout-and-navigation/TextImage.mjs.map +1 -1
  53. package/dist/components/loading-states/LoadingAndErrorComponent.js +2 -0
  54. package/dist/components/loading-states/LoadingAndErrorComponent.js.map +1 -1
  55. package/dist/components/loading-states/LoadingAndErrorComponent.mjs +2 -0
  56. package/dist/components/loading-states/LoadingAndErrorComponent.mjs.map +1 -1
  57. package/dist/components/loading-states/LoadingAnimation.js +2 -0
  58. package/dist/components/loading-states/LoadingAnimation.js.map +1 -1
  59. package/dist/components/loading-states/LoadingAnimation.mjs +2 -0
  60. package/dist/components/loading-states/LoadingAnimation.mjs.map +1 -1
  61. package/dist/components/loading-states/LoadingButton.js +9 -0
  62. package/dist/components/loading-states/LoadingButton.js.map +1 -1
  63. package/dist/components/loading-states/LoadingButton.mjs +9 -0
  64. package/dist/components/loading-states/LoadingButton.mjs.map +1 -1
  65. package/dist/components/modals/ConfirmModal.js +16 -2
  66. package/dist/components/modals/ConfirmModal.js.map +1 -1
  67. package/dist/components/modals/ConfirmModal.mjs +16 -2
  68. package/dist/components/modals/ConfirmModal.mjs.map +1 -1
  69. package/dist/components/modals/DiscardChangesModal.js +16 -2
  70. package/dist/components/modals/DiscardChangesModal.js.map +1 -1
  71. package/dist/components/modals/DiscardChangesModal.mjs +16 -2
  72. package/dist/components/modals/DiscardChangesModal.mjs.map +1 -1
  73. package/dist/components/modals/InputModal.d.mts +1 -0
  74. package/dist/components/modals/InputModal.d.ts +1 -0
  75. package/dist/components/modals/InputModal.js +196 -76
  76. package/dist/components/modals/InputModal.js.map +1 -1
  77. package/dist/components/modals/InputModal.mjs +189 -69
  78. package/dist/components/modals/InputModal.mjs.map +1 -1
  79. package/dist/components/modals/LanguageModal.js +203 -83
  80. package/dist/components/modals/LanguageModal.js.map +1 -1
  81. package/dist/components/modals/LanguageModal.mjs +192 -72
  82. package/dist/components/modals/LanguageModal.mjs.map +1 -1
  83. package/dist/components/modals/ThemeModal.js +206 -86
  84. package/dist/components/modals/ThemeModal.js.map +1 -1
  85. package/dist/components/modals/ThemeModal.mjs +193 -73
  86. package/dist/components/modals/ThemeModal.mjs.map +1 -1
  87. package/dist/components/properties/CheckboxProperty.js +17 -5
  88. package/dist/components/properties/CheckboxProperty.js.map +1 -1
  89. package/dist/components/properties/CheckboxProperty.mjs +17 -5
  90. package/dist/components/properties/CheckboxProperty.mjs.map +1 -1
  91. package/dist/components/properties/DateProperty.js +182 -65
  92. package/dist/components/properties/DateProperty.js.map +1 -1
  93. package/dist/components/properties/DateProperty.mjs +179 -62
  94. package/dist/components/properties/DateProperty.mjs.map +1 -1
  95. package/dist/components/properties/MultiSelectProperty.js +194 -74
  96. package/dist/components/properties/MultiSelectProperty.js.map +1 -1
  97. package/dist/components/properties/MultiSelectProperty.mjs +187 -67
  98. package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
  99. package/dist/components/properties/NumberProperty.js +182 -65
  100. package/dist/components/properties/NumberProperty.js.map +1 -1
  101. package/dist/components/properties/NumberProperty.mjs +179 -62
  102. package/dist/components/properties/NumberProperty.mjs.map +1 -1
  103. package/dist/components/properties/PropertyBase.js +12 -1
  104. package/dist/components/properties/PropertyBase.js.map +1 -1
  105. package/dist/components/properties/PropertyBase.mjs +12 -1
  106. package/dist/components/properties/PropertyBase.mjs.map +1 -1
  107. package/dist/components/properties/SelectProperty.js +194 -74
  108. package/dist/components/properties/SelectProperty.js.map +1 -1
  109. package/dist/components/properties/SelectProperty.mjs +187 -67
  110. package/dist/components/properties/SelectProperty.mjs.map +1 -1
  111. package/dist/components/properties/TextProperty.js +43 -34
  112. package/dist/components/properties/TextProperty.js.map +1 -1
  113. package/dist/components/properties/TextProperty.mjs +43 -34
  114. package/dist/components/properties/TextProperty.mjs.map +1 -1
  115. package/dist/components/table/FillerRowElement.d.mts +8 -0
  116. package/dist/components/table/FillerRowElement.d.ts +8 -0
  117. package/dist/components/table/FillerRowElement.js +36 -0
  118. package/dist/components/table/FillerRowElement.js.map +1 -0
  119. package/dist/components/table/FillerRowElement.mjs +12 -0
  120. package/dist/components/table/FillerRowElement.mjs.map +1 -0
  121. package/dist/components/table/Filter.d.mts +5 -0
  122. package/dist/components/table/Filter.d.ts +5 -0
  123. package/dist/components/table/Filter.js +41 -0
  124. package/dist/components/table/Filter.js.map +1 -0
  125. package/dist/components/table/Filter.mjs +17 -0
  126. package/dist/components/table/Filter.mjs.map +1 -0
  127. package/dist/components/table/Table.d.mts +41 -0
  128. package/dist/components/table/Table.d.ts +41 -0
  129. package/dist/components/table/Table.js +1549 -0
  130. package/dist/components/table/Table.js.map +1 -0
  131. package/dist/components/table/Table.mjs +1520 -0
  132. package/dist/components/table/Table.mjs.map +1 -0
  133. package/dist/components/table/TableCell.d.mts +9 -0
  134. package/dist/components/table/TableCell.d.ts +9 -0
  135. package/dist/components/table/TableCell.js +37 -0
  136. package/dist/components/table/TableCell.js.map +1 -0
  137. package/dist/components/table/TableCell.mjs +13 -0
  138. package/dist/components/table/TableCell.mjs.map +1 -0
  139. package/dist/components/table/TableFilterButton.d.mts +11 -0
  140. package/dist/components/table/TableFilterButton.d.ts +11 -0
  141. package/dist/components/table/TableFilterButton.js +888 -0
  142. package/dist/components/table/TableFilterButton.js.map +1 -0
  143. package/dist/components/table/TableFilterButton.mjs +852 -0
  144. package/dist/components/table/TableFilterButton.mjs.map +1 -0
  145. package/dist/components/table/TableSortButton.d.mts +15 -0
  146. package/dist/components/table/TableSortButton.d.ts +15 -0
  147. package/dist/components/table/TableSortButton.js +136 -0
  148. package/dist/components/table/TableSortButton.js.map +1 -0
  149. package/dist/components/table/TableSortButton.mjs +102 -0
  150. package/dist/components/table/TableSortButton.mjs.map +1 -0
  151. package/dist/components/user-action/Button.d.mts +20 -5
  152. package/dist/components/user-action/Button.d.ts +20 -5
  153. package/dist/components/user-action/Button.js +12 -3
  154. package/dist/components/user-action/Button.js.map +1 -1
  155. package/dist/components/user-action/Button.mjs +11 -3
  156. package/dist/components/user-action/Button.mjs.map +1 -1
  157. package/dist/components/user-action/Checkbox.js +5 -4
  158. package/dist/components/user-action/Checkbox.js.map +1 -1
  159. package/dist/components/user-action/Checkbox.mjs +5 -4
  160. package/dist/components/user-action/Checkbox.mjs.map +1 -1
  161. package/dist/components/user-action/DateAndTimePicker.js +41 -9
  162. package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
  163. package/dist/components/user-action/DateAndTimePicker.mjs +41 -9
  164. package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
  165. package/dist/components/user-action/Input.d.mts +27 -7
  166. package/dist/components/user-action/Input.d.ts +27 -7
  167. package/dist/components/user-action/Input.js +173 -64
  168. package/dist/components/user-action/Input.js.map +1 -1
  169. package/dist/components/user-action/Input.mjs +172 -63
  170. package/dist/components/user-action/Input.mjs.map +1 -1
  171. package/dist/components/user-action/MultiSelect.js +195 -75
  172. package/dist/components/user-action/MultiSelect.js.map +1 -1
  173. package/dist/components/user-action/MultiSelect.mjs +187 -67
  174. package/dist/components/user-action/MultiSelect.mjs.map +1 -1
  175. package/dist/components/user-action/ScrollPicker.js +26 -5
  176. package/dist/components/user-action/ScrollPicker.js.map +1 -1
  177. package/dist/components/user-action/ScrollPicker.mjs +26 -5
  178. package/dist/components/user-action/ScrollPicker.mjs.map +1 -1
  179. package/dist/components/user-action/Select.js +195 -75
  180. package/dist/components/user-action/Select.js.map +1 -1
  181. package/dist/components/user-action/Select.mjs +187 -67
  182. package/dist/components/user-action/Select.mjs.map +1 -1
  183. package/dist/components/user-action/Textarea.d.mts +3 -1
  184. package/dist/components/user-action/Textarea.d.ts +3 -1
  185. package/dist/components/user-action/Textarea.js +31 -33
  186. package/dist/components/user-action/Textarea.js.map +1 -1
  187. package/dist/components/user-action/Textarea.mjs +31 -33
  188. package/dist/components/user-action/Textarea.mjs.map +1 -1
  189. package/dist/components/user-action/ToggleableInput.d.mts +3 -1
  190. package/dist/components/user-action/ToggleableInput.d.ts +3 -1
  191. package/dist/components/user-action/ToggleableInput.js +31 -33
  192. package/dist/components/user-action/ToggleableInput.js.map +1 -1
  193. package/dist/components/user-action/ToggleableInput.mjs +31 -33
  194. package/dist/components/user-action/ToggleableInput.mjs.map +1 -1
  195. package/dist/css/globals.css +431 -186
  196. package/dist/css/uncompiled/globals.css +36 -493
  197. package/dist/css/uncompiled/textstyles.css +69 -0
  198. package/dist/css/uncompiled/theme/colors-basic.css +72 -0
  199. package/dist/css/uncompiled/theme/colors-component.css +143 -0
  200. package/dist/css/uncompiled/theme/colors-semantic.css +99 -0
  201. package/dist/css/uncompiled/theme/index.css +5 -0
  202. package/dist/css/uncompiled/theme/theme.css +0 -0
  203. package/dist/css/uncompiled/theme/variants.css +3 -0
  204. package/dist/css/uncompiled/utitlity/animation.css +111 -0
  205. package/dist/css/uncompiled/utitlity/borderradius.css +23 -0
  206. package/dist/css/uncompiled/utitlity/general.css +11 -0
  207. package/dist/css/uncompiled/utitlity/index.css +4 -0
  208. package/dist/css/uncompiled/utitlity/shadow.css +29 -0
  209. package/dist/hooks/useDelay.d.mts +11 -0
  210. package/dist/hooks/useDelay.d.ts +11 -0
  211. package/dist/hooks/useDelay.js +64 -0
  212. package/dist/hooks/useDelay.js.map +1 -0
  213. package/dist/hooks/useDelay.mjs +40 -0
  214. package/dist/hooks/useDelay.mjs.map +1 -0
  215. package/dist/hooks/useFocusManagement.d.mts +9 -0
  216. package/dist/hooks/useFocusManagement.d.ts +9 -0
  217. package/dist/hooks/useFocusManagement.js +84 -0
  218. package/dist/hooks/useFocusManagement.js.map +1 -0
  219. package/dist/hooks/useFocusManagement.mjs +60 -0
  220. package/dist/hooks/useFocusManagement.mjs.map +1 -0
  221. package/dist/hooks/useFocusOnceVisible.d.mts +5 -0
  222. package/dist/hooks/useFocusOnceVisible.d.ts +5 -0
  223. package/dist/hooks/useFocusOnceVisible.js +60 -0
  224. package/dist/hooks/useFocusOnceVisible.js.map +1 -0
  225. package/dist/hooks/useFocusOnceVisible.mjs +26 -0
  226. package/dist/hooks/useFocusOnceVisible.mjs.map +1 -0
  227. package/dist/hooks/useRerender.d.mts +5 -0
  228. package/dist/hooks/useRerender.d.ts +5 -0
  229. package/dist/hooks/useRerender.js +33 -0
  230. package/dist/hooks/useRerender.js.map +1 -0
  231. package/dist/hooks/useRerender.mjs +9 -0
  232. package/dist/hooks/useRerender.mjs.map +1 -0
  233. package/dist/hooks/useResizeCallbackWrapper.d.mts +11 -0
  234. package/dist/hooks/useResizeCallbackWrapper.d.ts +11 -0
  235. package/dist/hooks/useResizeCallbackWrapper.js +38 -0
  236. package/dist/hooks/useResizeCallbackWrapper.js.map +1 -0
  237. package/dist/hooks/useResizeCallbackWrapper.mjs +14 -0
  238. package/dist/hooks/useResizeCallbackWrapper.mjs.map +1 -0
  239. package/dist/index.d.mts +16 -5
  240. package/dist/index.d.ts +16 -5
  241. package/dist/index.js +1428 -860
  242. package/dist/index.js.map +1 -1
  243. package/dist/index.mjs +1370 -799
  244. package/dist/index.mjs.map +1 -1
  245. package/dist/localization/defaults/form.d.mts +1 -0
  246. package/dist/localization/defaults/form.d.ts +1 -0
  247. package/dist/localization/defaults/form.js +2 -0
  248. package/dist/localization/defaults/form.js.map +1 -1
  249. package/dist/localization/defaults/form.mjs +2 -0
  250. package/dist/localization/defaults/form.mjs.map +1 -1
  251. package/dist/util/array.d.mts +11 -5
  252. package/dist/util/array.d.ts +11 -5
  253. package/dist/util/array.js +25 -4
  254. package/dist/util/array.js.map +1 -1
  255. package/dist/util/array.mjs +25 -4
  256. package/dist/util/array.mjs.map +1 -1
  257. package/dist/util/date.js.map +1 -1
  258. package/dist/util/date.mjs.map +1 -1
  259. package/dist/util/resolveSetState.d.mts +5 -0
  260. package/dist/util/resolveSetState.d.ts +5 -0
  261. package/dist/util/resolveSetState.js +32 -0
  262. package/dist/util/resolveSetState.js.map +1 -0
  263. package/dist/util/resolveSetState.mjs +8 -0
  264. package/dist/util/resolveSetState.mjs.map +1 -0
  265. package/package.json +4 -2
  266. package/dist/components/layout-and-navigation/Table.d.mts +0 -99
  267. package/dist/components/layout-and-navigation/Table.d.ts +0 -99
  268. package/dist/components/layout-and-navigation/Table.js +0 -688
  269. package/dist/components/layout-and-navigation/Table.js.map +0 -1
  270. package/dist/components/layout-and-navigation/Table.mjs +0 -645
  271. package/dist/components/layout-and-navigation/Table.mjs.map +0 -1
  272. package/dist/hooks/useSaveDelay.d.mts +0 -6
  273. package/dist/hooks/useSaveDelay.d.ts +0 -6
  274. package/dist/hooks/useSaveDelay.js +0 -67
  275. package/dist/hooks/useSaveDelay.js.map +0 -1
  276. package/dist/hooks/useSaveDelay.mjs +0 -43
  277. package/dist/hooks/useSaveDelay.mjs.map +0 -1
@@ -0,0 +1,84 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/hooks/useFocusManagement.ts
20
+ var useFocusManagement_exports = {};
21
+ __export(useFocusManagement_exports, {
22
+ useFocusManagement: () => useFocusManagement
23
+ });
24
+ module.exports = __toCommonJS(useFocusManagement_exports);
25
+ var import_react = require("react");
26
+ function useFocusManagement() {
27
+ const getFocusableElements = (0, import_react.useCallback)(() => {
28
+ return Array.from(
29
+ document.querySelectorAll(
30
+ 'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
31
+ )
32
+ ).filter(
33
+ (el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
34
+ );
35
+ }, []);
36
+ const getNextFocusElement = (0, import_react.useCallback)(() => {
37
+ const elements = getFocusableElements();
38
+ if (elements.length === 0) {
39
+ return void 0;
40
+ }
41
+ let nextElement = elements[0];
42
+ if (document.activeElement instanceof HTMLElement) {
43
+ const currentIndex = elements.indexOf(document.activeElement);
44
+ nextElement = elements[(currentIndex + 1) % elements.length];
45
+ }
46
+ return nextElement;
47
+ }, [getFocusableElements]);
48
+ const focusNext = (0, import_react.useCallback)(() => {
49
+ const nextElement = getNextFocusElement();
50
+ nextElement?.focus();
51
+ }, [getNextFocusElement]);
52
+ const getPreviousFocusElement = (0, import_react.useCallback)(() => {
53
+ const elements = getFocusableElements();
54
+ if (elements.length === 0) {
55
+ return void 0;
56
+ }
57
+ let previousElement = elements[0];
58
+ if (document.activeElement instanceof HTMLElement) {
59
+ const currentIndex = elements.indexOf(document.activeElement);
60
+ if (currentIndex === 0) {
61
+ previousElement = elements[elements.length - 1];
62
+ } else {
63
+ previousElement = elements[currentIndex - 1];
64
+ }
65
+ }
66
+ return previousElement;
67
+ }, [getFocusableElements]);
68
+ const focusPrevious = (0, import_react.useCallback)(() => {
69
+ const previousElement = getPreviousFocusElement();
70
+ if (previousElement) previousElement.focus();
71
+ }, [getPreviousFocusElement]);
72
+ return {
73
+ getFocusableElements,
74
+ getNextFocusElement,
75
+ getPreviousFocusElement,
76
+ focusNext,
77
+ focusPrevious
78
+ };
79
+ }
80
+ // Annotate the CommonJS export names for ESM import in node:
81
+ 0 && (module.exports = {
82
+ useFocusManagement
83
+ });
84
+ //# sourceMappingURL=useFocusManagement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/useFocusManagement.ts"],"sourcesContent":["import { useCallback } from 'react'\n\nexport function useFocusManagement() {\n const getFocusableElements = useCallback((): HTMLElement[] => {\n return Array.from(\n document.querySelectorAll(\n 'input, button, select, textarea, a[href], [tabindex]:not([tabindex=\"-1\"])'\n )\n ).filter(\n (el): el is HTMLElement =>\n el instanceof HTMLElement &&\n !el.hasAttribute('disabled') &&\n !el.hasAttribute('hidden') &&\n el.tabIndex !== -1\n )\n }, [])\n\n const getNextFocusElement = useCallback((): HTMLElement | undefined => {\n const elements = getFocusableElements()\n if(elements.length === 0) {\n return undefined\n }\n let nextElement = elements[0]\n if(document.activeElement instanceof HTMLElement) {\n const currentIndex = elements.indexOf(document.activeElement)\n nextElement = elements[(currentIndex + 1) % elements.length]\n }\n return nextElement\n }, [getFocusableElements])\n\n const focusNext = useCallback(() => {\n const nextElement = getNextFocusElement()\n nextElement?.focus()\n }, [getNextFocusElement])\n\n const getPreviousFocusElement = useCallback((): HTMLElement | undefined => {\n const elements = getFocusableElements()\n if(elements.length === 0) {\n return undefined\n }\n let previousElement = elements[0]\n if(document.activeElement instanceof HTMLElement) {\n const currentIndex = elements.indexOf(document.activeElement)\n if(currentIndex === 0) {\n previousElement = elements[elements.length - 1]\n } else {\n previousElement = elements[currentIndex - 1]\n }\n }\n return previousElement\n }, [getFocusableElements])\n\n const focusPrevious = useCallback(() => {\n const previousElement = getPreviousFocusElement()\n if (previousElement) previousElement.focus()\n }, [getPreviousFocusElement])\n\n return {\n getFocusableElements,\n getNextFocusElement,\n getPreviousFocusElement,\n focusNext,\n focusPrevious,\n }\n}"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA4B;AAErB,SAAS,qBAAqB;AACnC,QAAM,2BAAuB,0BAAY,MAAqB;AAC5D,WAAO,MAAM;AAAA,MACX,SAAS;AAAA,QACP;AAAA,MACF;AAAA,IACF,EAAE;AAAA,MACA,CAAC,OACC,cAAc,eACd,CAAC,GAAG,aAAa,UAAU,KAC3B,CAAC,GAAG,aAAa,QAAQ,KACzB,GAAG,aAAa;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,QAAM,0BAAsB,0BAAY,MAA+B;AACrE,UAAM,WAAW,qBAAqB;AACtC,QAAG,SAAS,WAAW,GAAG;AACxB,aAAO;AAAA,IACT;AACA,QAAI,cAAc,SAAS,CAAC;AAC5B,QAAG,SAAS,yBAAyB,aAAa;AAChD,YAAM,eAAe,SAAS,QAAQ,SAAS,aAAa;AAC5D,oBAAc,UAAU,eAAe,KAAK,SAAS,MAAM;AAAA,IAC7D;AACA,WAAO;AAAA,EACT,GAAG,CAAC,oBAAoB,CAAC;AAEzB,QAAM,gBAAY,0BAAY,MAAM;AAClC,UAAM,cAAc,oBAAoB;AACxC,iBAAa,MAAM;AAAA,EACrB,GAAG,CAAC,mBAAmB,CAAC;AAExB,QAAM,8BAA0B,0BAAY,MAA+B;AACzE,UAAM,WAAW,qBAAqB;AACtC,QAAG,SAAS,WAAW,GAAG;AACxB,aAAO;AAAA,IACT;AACA,QAAI,kBAAkB,SAAS,CAAC;AAChC,QAAG,SAAS,yBAAyB,aAAa;AAChD,YAAM,eAAe,SAAS,QAAQ,SAAS,aAAa;AAC5D,UAAG,iBAAiB,GAAG;AACrB,0BAAkB,SAAS,SAAS,SAAS,CAAC;AAAA,MAChD,OAAO;AACL,0BAAkB,SAAS,eAAe,CAAC;AAAA,MAC7C;AAAA,IACF;AACA,WAAO;AAAA,EACT,GAAG,CAAC,oBAAoB,CAAC;AAEzB,QAAM,oBAAgB,0BAAY,MAAM;AACtC,UAAM,kBAAkB,wBAAwB;AAChD,QAAI,gBAAiB,iBAAgB,MAAM;AAAA,EAC7C,GAAG,CAAC,uBAAuB,CAAC;AAE5B,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
@@ -0,0 +1,60 @@
1
+ // src/hooks/useFocusManagement.ts
2
+ import { useCallback } from "react";
3
+ function useFocusManagement() {
4
+ const getFocusableElements = useCallback(() => {
5
+ return Array.from(
6
+ document.querySelectorAll(
7
+ 'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
8
+ )
9
+ ).filter(
10
+ (el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
11
+ );
12
+ }, []);
13
+ const getNextFocusElement = useCallback(() => {
14
+ const elements = getFocusableElements();
15
+ if (elements.length === 0) {
16
+ return void 0;
17
+ }
18
+ let nextElement = elements[0];
19
+ if (document.activeElement instanceof HTMLElement) {
20
+ const currentIndex = elements.indexOf(document.activeElement);
21
+ nextElement = elements[(currentIndex + 1) % elements.length];
22
+ }
23
+ return nextElement;
24
+ }, [getFocusableElements]);
25
+ const focusNext = useCallback(() => {
26
+ const nextElement = getNextFocusElement();
27
+ nextElement?.focus();
28
+ }, [getNextFocusElement]);
29
+ const getPreviousFocusElement = useCallback(() => {
30
+ const elements = getFocusableElements();
31
+ if (elements.length === 0) {
32
+ return void 0;
33
+ }
34
+ let previousElement = elements[0];
35
+ if (document.activeElement instanceof HTMLElement) {
36
+ const currentIndex = elements.indexOf(document.activeElement);
37
+ if (currentIndex === 0) {
38
+ previousElement = elements[elements.length - 1];
39
+ } else {
40
+ previousElement = elements[currentIndex - 1];
41
+ }
42
+ }
43
+ return previousElement;
44
+ }, [getFocusableElements]);
45
+ const focusPrevious = useCallback(() => {
46
+ const previousElement = getPreviousFocusElement();
47
+ if (previousElement) previousElement.focus();
48
+ }, [getPreviousFocusElement]);
49
+ return {
50
+ getFocusableElements,
51
+ getNextFocusElement,
52
+ getPreviousFocusElement,
53
+ focusNext,
54
+ focusPrevious
55
+ };
56
+ }
57
+ export {
58
+ useFocusManagement
59
+ };
60
+ //# sourceMappingURL=useFocusManagement.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/useFocusManagement.ts"],"sourcesContent":["import { useCallback } from 'react'\n\nexport function useFocusManagement() {\n const getFocusableElements = useCallback((): HTMLElement[] => {\n return Array.from(\n document.querySelectorAll(\n 'input, button, select, textarea, a[href], [tabindex]:not([tabindex=\"-1\"])'\n )\n ).filter(\n (el): el is HTMLElement =>\n el instanceof HTMLElement &&\n !el.hasAttribute('disabled') &&\n !el.hasAttribute('hidden') &&\n el.tabIndex !== -1\n )\n }, [])\n\n const getNextFocusElement = useCallback((): HTMLElement | undefined => {\n const elements = getFocusableElements()\n if(elements.length === 0) {\n return undefined\n }\n let nextElement = elements[0]\n if(document.activeElement instanceof HTMLElement) {\n const currentIndex = elements.indexOf(document.activeElement)\n nextElement = elements[(currentIndex + 1) % elements.length]\n }\n return nextElement\n }, [getFocusableElements])\n\n const focusNext = useCallback(() => {\n const nextElement = getNextFocusElement()\n nextElement?.focus()\n }, [getNextFocusElement])\n\n const getPreviousFocusElement = useCallback((): HTMLElement | undefined => {\n const elements = getFocusableElements()\n if(elements.length === 0) {\n return undefined\n }\n let previousElement = elements[0]\n if(document.activeElement instanceof HTMLElement) {\n const currentIndex = elements.indexOf(document.activeElement)\n if(currentIndex === 0) {\n previousElement = elements[elements.length - 1]\n } else {\n previousElement = elements[currentIndex - 1]\n }\n }\n return previousElement\n }, [getFocusableElements])\n\n const focusPrevious = useCallback(() => {\n const previousElement = getPreviousFocusElement()\n if (previousElement) previousElement.focus()\n }, [getPreviousFocusElement])\n\n return {\n getFocusableElements,\n getNextFocusElement,\n getPreviousFocusElement,\n focusNext,\n focusPrevious,\n }\n}"],"mappings":";AAAA,SAAS,mBAAmB;AAErB,SAAS,qBAAqB;AACnC,QAAM,uBAAuB,YAAY,MAAqB;AAC5D,WAAO,MAAM;AAAA,MACX,SAAS;AAAA,QACP;AAAA,MACF;AAAA,IACF,EAAE;AAAA,MACA,CAAC,OACC,cAAc,eACd,CAAC,GAAG,aAAa,UAAU,KAC3B,CAAC,GAAG,aAAa,QAAQ,KACzB,GAAG,aAAa;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,QAAM,sBAAsB,YAAY,MAA+B;AACrE,UAAM,WAAW,qBAAqB;AACtC,QAAG,SAAS,WAAW,GAAG;AACxB,aAAO;AAAA,IACT;AACA,QAAI,cAAc,SAAS,CAAC;AAC5B,QAAG,SAAS,yBAAyB,aAAa;AAChD,YAAM,eAAe,SAAS,QAAQ,SAAS,aAAa;AAC5D,oBAAc,UAAU,eAAe,KAAK,SAAS,MAAM;AAAA,IAC7D;AACA,WAAO;AAAA,EACT,GAAG,CAAC,oBAAoB,CAAC;AAEzB,QAAM,YAAY,YAAY,MAAM;AAClC,UAAM,cAAc,oBAAoB;AACxC,iBAAa,MAAM;AAAA,EACrB,GAAG,CAAC,mBAAmB,CAAC;AAExB,QAAM,0BAA0B,YAAY,MAA+B;AACzE,UAAM,WAAW,qBAAqB;AACtC,QAAG,SAAS,WAAW,GAAG;AACxB,aAAO;AAAA,IACT;AACA,QAAI,kBAAkB,SAAS,CAAC;AAChC,QAAG,SAAS,yBAAyB,aAAa;AAChD,YAAM,eAAe,SAAS,QAAQ,SAAS,aAAa;AAC5D,UAAG,iBAAiB,GAAG;AACrB,0BAAkB,SAAS,SAAS,SAAS,CAAC;AAAA,MAChD,OAAO;AACL,0BAAkB,SAAS,eAAe,CAAC;AAAA,MAC7C;AAAA,IACF;AACA,WAAO;AAAA,EACT,GAAG,CAAC,oBAAoB,CAAC;AAEzB,QAAM,gBAAgB,YAAY,MAAM;AACtC,UAAM,kBAAkB,wBAAwB;AAChD,QAAI,gBAAiB,iBAAgB,MAAM;AAAA,EAC7C,GAAG,CAAC,uBAAuB,CAAC;AAE5B,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
@@ -0,0 +1,5 @@
1
+ import { MutableRefObject } from 'react';
2
+
3
+ declare const useFocusOnceVisible: (ref: MutableRefObject<HTMLElement>, disable?: boolean) => void;
4
+
5
+ export { useFocusOnceVisible };
@@ -0,0 +1,5 @@
1
+ import { MutableRefObject } from 'react';
2
+
3
+ declare const useFocusOnceVisible: (ref: MutableRefObject<HTMLElement>, disable?: boolean) => void;
4
+
5
+ export { useFocusOnceVisible };
@@ -0,0 +1,60 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/hooks/useFocusOnceVisible.ts
30
+ var useFocusOnceVisible_exports = {};
31
+ __export(useFocusOnceVisible_exports, {
32
+ useFocusOnceVisible: () => useFocusOnceVisible
33
+ });
34
+ module.exports = __toCommonJS(useFocusOnceVisible_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var useFocusOnceVisible = (ref, disable = false) => {
37
+ const [hasUsedFocus, setHasUsedFocus] = import_react.default.useState(false);
38
+ (0, import_react.useEffect)(() => {
39
+ if (disable || hasUsedFocus) {
40
+ return;
41
+ }
42
+ const observer = new IntersectionObserver(([entry]) => {
43
+ if (entry.isIntersecting && !hasUsedFocus) {
44
+ ref.current?.focus();
45
+ setHasUsedFocus(hasUsedFocus);
46
+ }
47
+ }, {
48
+ threshold: 0.1
49
+ });
50
+ if (ref.current) {
51
+ observer.observe(ref.current);
52
+ }
53
+ return () => observer.disconnect();
54
+ }, [disable, hasUsedFocus, ref]);
55
+ };
56
+ // Annotate the CommonJS export names for ESM import in node:
57
+ 0 && (module.exports = {
58
+ useFocusOnceVisible
59
+ });
60
+ //# sourceMappingURL=useFocusOnceVisible.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/useFocusOnceVisible.ts"],"sourcesContent":["import type { MutableRefObject } from 'react'\nimport React, { useEffect } from 'react'\n\nexport const useFocusOnceVisible = (\n ref: MutableRefObject<HTMLElement>,\n disable: boolean = false\n) => {\n const [hasUsedFocus, setHasUsedFocus] = React.useState(false)\n\n useEffect(() => {\n if (disable || hasUsedFocus) {\n return\n }\n const observer = new IntersectionObserver(([entry]) => {\n if (entry.isIntersecting && !hasUsedFocus) {\n ref.current?.focus()\n setHasUsedFocus(hasUsedFocus)\n }\n }, {\n threshold: 0.1,\n })\n\n if (ref.current) {\n observer.observe(ref.current)\n }\n\n return () => observer.disconnect()\n }, [disable, hasUsedFocus, ref])\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAiC;AAE1B,IAAM,sBAAsB,CACjC,KACA,UAAmB,UAChB;AACH,QAAM,CAAC,cAAc,eAAe,IAAI,aAAAA,QAAM,SAAS,KAAK;AAE5D,8BAAU,MAAM;AACd,QAAI,WAAW,cAAc;AAC3B;AAAA,IACF;AACA,UAAM,WAAW,IAAI,qBAAqB,CAAC,CAAC,KAAK,MAAM;AACrD,UAAI,MAAM,kBAAkB,CAAC,cAAc;AACzC,YAAI,SAAS,MAAM;AACnB,wBAAgB,YAAY;AAAA,MAC9B;AAAA,IACF,GAAG;AAAA,MACD,WAAW;AAAA,IACb,CAAC;AAED,QAAI,IAAI,SAAS;AACf,eAAS,QAAQ,IAAI,OAAO;AAAA,IAC9B;AAEA,WAAO,MAAM,SAAS,WAAW;AAAA,EACnC,GAAG,CAAC,SAAS,cAAc,GAAG,CAAC;AACjC;","names":["React"]}
@@ -0,0 +1,26 @@
1
+ // src/hooks/useFocusOnceVisible.ts
2
+ import React, { useEffect } from "react";
3
+ var useFocusOnceVisible = (ref, disable = false) => {
4
+ const [hasUsedFocus, setHasUsedFocus] = React.useState(false);
5
+ useEffect(() => {
6
+ if (disable || hasUsedFocus) {
7
+ return;
8
+ }
9
+ const observer = new IntersectionObserver(([entry]) => {
10
+ if (entry.isIntersecting && !hasUsedFocus) {
11
+ ref.current?.focus();
12
+ setHasUsedFocus(hasUsedFocus);
13
+ }
14
+ }, {
15
+ threshold: 0.1
16
+ });
17
+ if (ref.current) {
18
+ observer.observe(ref.current);
19
+ }
20
+ return () => observer.disconnect();
21
+ }, [disable, hasUsedFocus, ref]);
22
+ };
23
+ export {
24
+ useFocusOnceVisible
25
+ };
26
+ //# sourceMappingURL=useFocusOnceVisible.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/useFocusOnceVisible.ts"],"sourcesContent":["import type { MutableRefObject } from 'react'\nimport React, { useEffect } from 'react'\n\nexport const useFocusOnceVisible = (\n ref: MutableRefObject<HTMLElement>,\n disable: boolean = false\n) => {\n const [hasUsedFocus, setHasUsedFocus] = React.useState(false)\n\n useEffect(() => {\n if (disable || hasUsedFocus) {\n return\n }\n const observer = new IntersectionObserver(([entry]) => {\n if (entry.isIntersecting && !hasUsedFocus) {\n ref.current?.focus()\n setHasUsedFocus(hasUsedFocus)\n }\n }, {\n threshold: 0.1,\n })\n\n if (ref.current) {\n observer.observe(ref.current)\n }\n\n return () => observer.disconnect()\n }, [disable, hasUsedFocus, ref])\n}"],"mappings":";AACA,OAAO,SAAS,iBAAiB;AAE1B,IAAM,sBAAsB,CACjC,KACA,UAAmB,UAChB;AACH,QAAM,CAAC,cAAc,eAAe,IAAI,MAAM,SAAS,KAAK;AAE5D,YAAU,MAAM;AACd,QAAI,WAAW,cAAc;AAC3B;AAAA,IACF;AACA,UAAM,WAAW,IAAI,qBAAqB,CAAC,CAAC,KAAK,MAAM;AACrD,UAAI,MAAM,kBAAkB,CAAC,cAAc;AACzC,YAAI,SAAS,MAAM;AACnB,wBAAgB,YAAY;AAAA,MAC9B;AAAA,IACF,GAAG;AAAA,MACD,WAAW;AAAA,IACb,CAAC;AAED,QAAI,IAAI,SAAS;AACf,eAAS,QAAQ,IAAI,OAAO;AAAA,IAC9B;AAEA,WAAO,MAAM,SAAS,WAAW;AAAA,EACnC,GAAG,CAAC,SAAS,cAAc,GAAG,CAAC;AACjC;","names":[]}
@@ -0,0 +1,5 @@
1
+ import * as react from 'react';
2
+
3
+ declare const useRerender: () => react.DispatchWithoutAction;
4
+
5
+ export { useRerender };
@@ -0,0 +1,5 @@
1
+ import * as react from 'react';
2
+
3
+ declare const useRerender: () => react.DispatchWithoutAction;
4
+
5
+ export { useRerender };
@@ -0,0 +1,33 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/hooks/useRerender.ts
20
+ var useRerender_exports = {};
21
+ __export(useRerender_exports, {
22
+ useRerender: () => useRerender
23
+ });
24
+ module.exports = __toCommonJS(useRerender_exports);
25
+ var import_react = require("react");
26
+ var useRerender = () => {
27
+ return (0, import_react.useReducer)(() => ({}), {})[1];
28
+ };
29
+ // Annotate the CommonJS export names for ESM import in node:
30
+ 0 && (module.exports = {
31
+ useRerender
32
+ });
33
+ //# sourceMappingURL=useRerender.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/useRerender.ts"],"sourcesContent":["import { useReducer } from 'react'\n\nexport const useRerender = () => {\n return useReducer(() => ({}), {})[1]\n}"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA2B;AAEpB,IAAM,cAAc,MAAM;AAC/B,aAAO,yBAAW,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;AACrC;","names":[]}
@@ -0,0 +1,9 @@
1
+ // src/hooks/useRerender.ts
2
+ import { useReducer } from "react";
3
+ var useRerender = () => {
4
+ return useReducer(() => ({}), {})[1];
5
+ };
6
+ export {
7
+ useRerender
8
+ };
9
+ //# sourceMappingURL=useRerender.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/useRerender.ts"],"sourcesContent":["import { useReducer } from 'react'\n\nexport const useRerender = () => {\n return useReducer(() => ({}), {})[1]\n}"],"mappings":";AAAA,SAAS,kBAAkB;AAEpB,IAAM,cAAc,MAAM;AAC/B,SAAO,WAAW,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;AACrC;","names":[]}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * A hook that wraps the event listener attachment
3
+ *
4
+ * Make sure your callback is stable (doesn't change every render)
5
+ * This can easily be achieved by wrapping it in a useCallback() and using it inside the useResizeCallbackWrapper
6
+ *
7
+ * @param callback Called when the window resizes
8
+ */
9
+ declare const useResizeCallbackWrapper: (callback: (event: UIEvent) => void) => void;
10
+
11
+ export { useResizeCallbackWrapper };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * A hook that wraps the event listener attachment
3
+ *
4
+ * Make sure your callback is stable (doesn't change every render)
5
+ * This can easily be achieved by wrapping it in a useCallback() and using it inside the useResizeCallbackWrapper
6
+ *
7
+ * @param callback Called when the window resizes
8
+ */
9
+ declare const useResizeCallbackWrapper: (callback: (event: UIEvent) => void) => void;
10
+
11
+ export { useResizeCallbackWrapper };
@@ -0,0 +1,38 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/hooks/useResizeCallbackWrapper.ts
20
+ var useResizeCallbackWrapper_exports = {};
21
+ __export(useResizeCallbackWrapper_exports, {
22
+ useResizeCallbackWrapper: () => useResizeCallbackWrapper
23
+ });
24
+ module.exports = __toCommonJS(useResizeCallbackWrapper_exports);
25
+ var import_react = require("react");
26
+ var useResizeCallbackWrapper = (callback) => {
27
+ (0, import_react.useEffect)(() => {
28
+ window.addEventListener("resize", callback);
29
+ return () => {
30
+ window.removeEventListener("resize", callback);
31
+ };
32
+ }, [callback]);
33
+ };
34
+ // Annotate the CommonJS export names for ESM import in node:
35
+ 0 && (module.exports = {
36
+ useResizeCallbackWrapper
37
+ });
38
+ //# sourceMappingURL=useResizeCallbackWrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/useResizeCallbackWrapper.ts"],"sourcesContent":["import { useEffect } from 'react'\n\n/**\n * A hook that wraps the event listener attachment\n *\n * Make sure your callback is stable (doesn't change every render)\n * This can easily be achieved by wrapping it in a useCallback() and using it inside the useResizeCallbackWrapper\n *\n * @param callback Called when the window resizes\n */\nexport const useResizeCallbackWrapper = (callback: (event: UIEvent) => void) => {\n useEffect(() => {\n window.addEventListener('resize', callback)\n\n return () => {\n window.removeEventListener('resize', callback)\n }\n }, [callback])\n}"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0B;AAUnB,IAAM,2BAA2B,CAAC,aAAuC;AAC9E,8BAAU,MAAM;AACd,WAAO,iBAAiB,UAAU,QAAQ;AAE1C,WAAO,MAAM;AACX,aAAO,oBAAoB,UAAU,QAAQ;AAAA,IAC/C;AAAA,EACF,GAAG,CAAC,QAAQ,CAAC;AACf;","names":[]}
@@ -0,0 +1,14 @@
1
+ // src/hooks/useResizeCallbackWrapper.ts
2
+ import { useEffect } from "react";
3
+ var useResizeCallbackWrapper = (callback) => {
4
+ useEffect(() => {
5
+ window.addEventListener("resize", callback);
6
+ return () => {
7
+ window.removeEventListener("resize", callback);
8
+ };
9
+ }, [callback]);
10
+ };
11
+ export {
12
+ useResizeCallbackWrapper
13
+ };
14
+ //# sourceMappingURL=useResizeCallbackWrapper.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/useResizeCallbackWrapper.ts"],"sourcesContent":["import { useEffect } from 'react'\n\n/**\n * A hook that wraps the event listener attachment\n *\n * Make sure your callback is stable (doesn't change every render)\n * This can easily be achieved by wrapping it in a useCallback() and using it inside the useResizeCallbackWrapper\n *\n * @param callback Called when the window resizes\n */\nexport const useResizeCallbackWrapper = (callback: (event: UIEvent) => void) => {\n useEffect(() => {\n window.addEventListener('resize', callback)\n\n return () => {\n window.removeEventListener('resize', callback)\n }\n }, [callback])\n}"],"mappings":";AAAA,SAAS,iBAAiB;AAUnB,IAAM,2BAA2B,CAAC,aAAuC;AAC9E,YAAU,MAAM;AACd,WAAO,iBAAiB,UAAU,QAAQ;AAE1C,WAAO,MAAM;AACX,aAAO,oBAAoB,UAAU,QAAQ;AAAA,IAC/C;AAAA,EACF,GAAG,CAAC,QAAQ,CAAC;AACf;","names":[]}
package/dist/index.d.mts CHANGED
@@ -23,7 +23,6 @@ export { Dialog, DialogProps, Modal, ModalProps, Overlay, OverlayHeader, Overlay
23
23
  export { Pagination, PaginationProps } from './components/layout-and-navigation/Pagination.mjs';
24
24
  export { SearchableList, SearchableListProps } from './components/layout-and-navigation/SearchableList.mjs';
25
25
  export { StepperBar, StepperBarProps, StepperBarUncontrolled, StepperState } from './components/layout-and-navigation/StepperBar.mjs';
26
- export { SortButton, SortButtonProps, Table, TableProps, TableSortingFunctionType, TableSortingType, TableState, TableStatePagination, TableStateSelection, addElementToTable, changeTableSelectionSingle, defaultTableStatePagination, defaultTableStateSelection, isDataObjectSelected, pageForItem, removeFromTableSelection, updatePagination } from './components/layout-and-navigation/Table.mjs';
27
26
  export { TextImage, TextImageProps } from './components/layout-and-navigation/TextImage.mjs';
28
27
  export { Tile, TileProps } from './components/layout-and-navigation/Tile.mjs';
29
28
  export { VerticalDivider, VerticalDividerProps } from './components/layout-and-navigation/VerticalDivider.mjs';
@@ -44,10 +43,16 @@ export { NumberProperty, NumberPropertyProps } from './components/properties/Num
44
43
  export { PropertyBase, PropertyBaseProps } from './components/properties/PropertyBase.mjs';
45
44
  export { SingleSelectProperty, SingleSelectPropertyProps } from './components/properties/SelectProperty.mjs';
46
45
  export { TextProperty, TextPropertyProps } from './components/properties/TextProperty.mjs';
47
- export { ButtonColorUtil, ButtonProps, ButtonUtil, IconButton, IconButtonProps, OutlineButton, OutlineButtonColor, OutlineButtonProps, SolidButton, SolidButtonColor, SolidButtonProps, TextButton, TextButtonColor, TextButtonProps } from './components/user-action/Button.mjs';
46
+ export { FillerRowElement, FillerRowElementProps } from './components/table/FillerRowElement.mjs';
47
+ export { TableFilters } from './components/table/Filter.mjs';
48
+ export { Table, TableProps, TableUncontrolled, TableUncontrolledProps, TableWithSelection, TableWithSelectionProps } from './components/table/Table.mjs';
49
+ export { TableCell, TableCellProps } from './components/table/TableCell.mjs';
50
+ export { TableFilterButton, TableFilterButtonProps, TableFilterType } from './components/table/TableFilterButton.mjs';
51
+ export { TableSortButton, TableSortButtonProps } from './components/table/TableSortButton.mjs';
52
+ export { ButtonColorUtil, ButtonProps, ButtonUtil, IconButton, IconButtonColor, IconButtonProps, IconButtonUtil, OutlineButton, OutlineButtonColor, OutlineButtonProps, SolidButton, SolidButtonColor, SolidButtonProps, TextButton, TextButtonColor, TextButtonProps } from './components/user-action/Button.mjs';
48
53
  export { Checkbox, CheckboxProps, CheckboxUncontrolled } from './components/user-action/Checkbox.mjs';
49
54
  export { DateTimePicker, DateTimePickerMode, DateTimePickerProps } from './components/user-action/DateAndTimePicker.mjs';
50
- export { FormInput, FormInputProps, Input, InputProps, InputUncontrolled } from './components/user-action/Input.mjs';
55
+ export { EditCompleteOptions, EditCompleteOptionsResolved, FormInput, FormInputProps, Input, InputProps, InputUncontrolled } from './components/user-action/Input.mjs';
51
56
  export { Label, LabelProps, LabelType } from './components/user-action/Label.mjs';
52
57
  export { Menu, MenuItem, MenuItemProps, MenuProps } from './components/user-action/Menu.mjs';
53
58
  export { MultiSelect, MultiSelectOption, MultiSelectProps, MultiSelectUncontrolled } from './components/user-action/MultiSelect.mjs';
@@ -56,10 +61,14 @@ export { Select, SelectOption, SelectProps, SelectUncontrolled } from './compone
56
61
  export { Textarea, TextareaProps, TextareaUncontrolled } from './components/user-action/Textarea.mjs';
57
62
  export { ToggleableInput, ToggleableInputUncontrolled } from './components/user-action/ToggleableInput.mjs';
58
63
  export { Tooltip, TooltipProps } from './components/user-action/Tooltip.mjs';
64
+ export { UseDelayOptions, UseDelayOptionsResolved, useDelay } from './hooks/useDelay.mjs';
65
+ export { useFocusManagement } from './hooks/useFocusManagement.mjs';
66
+ export { useFocusOnceVisible } from './hooks/useFocusOnceVisible.mjs';
59
67
  export { useHoverState } from './hooks/useHoverState.mjs';
60
68
  export { useLocalStorage } from './hooks/useLocalStorage.mjs';
61
69
  export { useOutsideClick } from './hooks/useOutsideClick.mjs';
62
- export { useSaveDelay } from './hooks/useSaveDelay.mjs';
70
+ export { useRerender } from './hooks/useRerender.mjs';
71
+ export { useResizeCallbackWrapper } from './hooks/useResizeCallbackWrapper.mjs';
63
72
  export { UseSearchProps, useSearch } from './hooks/useSearch.mjs';
64
73
  export { LanguageContext, LanguageContextValue, LanguageProvider, useLanguage, useLocale } from './localization/LanguageProvider.mjs';
65
74
  export { PropsForTranslation, Translation, TranslationPlural, TranslationPluralCount, TranslationType, useTranslation } from './localization/useTranslation.mjs';
@@ -68,7 +77,7 @@ export { FormTranslationType, formTranslation } from './localization/defaults/fo
68
77
  export { MonthTranslationType, TimeTranslationType, monthTranslation, timeTranslation } from './localization/defaults/time.mjs';
69
78
  export { ThemeContext, ThemeProvider, ThemeType, ThemeTypeTranslation, ThemeUtil, useTheme } from './theming/useTheme.mjs';
70
79
  export { BagFunction, BagFunctionUtil, PropsWithBagFunction, PropsWithBagFunctionOrChildren } from './util/PropsWithFunctionChildren.mjs';
71
- export { ArrayUtil, closestMatch, createLoopingList, createLoopingListWithIndex, equalSizeGroups, getNeighbours, range } from './util/array.mjs';
80
+ export { ArrayUtil, RangeOptions, closestMatch, createLoopingList, createLoopingListWithIndex, equalSizeGroups, getNeighbours, range } from './util/array.mjs';
72
81
  export { builder } from './util/builder.mjs';
73
82
  export { Duration, Month, WeekDay, addDuration, changeDuration, equalDate, formatDate, formatDateTime, getBetweenDuration, getDaysInMonth, getWeeksForCalenderMonth, isInTimeSpan, monthsList, subtractDuration, weekDayList } from './util/date.mjs';
74
83
  export { EaseFunction, EaseFunctions } from './util/easeFunctions.mjs';
@@ -77,10 +86,12 @@ export { Direction, LoopingArrayCalculator } from './util/loopingArray.mjs';
77
86
  export { clamp } from './util/math.mjs';
78
87
  export { LocalizedNews, News, filterNews, localizedNewsSchema, newsListSchema, newsSchema } from './util/news.mjs';
79
88
  export { noop } from './util/noop.mjs';
89
+ export { resolveSetState } from './util/resolveSetState.mjs';
80
90
  export { MultiSearchWithMapping, MultiSubjectSearchWithMapping, SimpleSearch, SimpleSearchWithMapping } from './util/simpleSearch.mjs';
81
91
  export { LocalStorageService, SessionStorageService } from './util/storage.mjs';
82
92
  export { NativeProps } from './util/types.mjs';
83
93
  import 'react/jsx-runtime';
84
94
  import 'react';
95
+ import '@tanstack/react-table';
85
96
  import '@radix-ui/react-checkbox';
86
97
  import 'zod';
package/dist/index.d.ts CHANGED
@@ -23,7 +23,6 @@ export { Dialog, DialogProps, Modal, ModalProps, Overlay, OverlayHeader, Overlay
23
23
  export { Pagination, PaginationProps } from './components/layout-and-navigation/Pagination.js';
24
24
  export { SearchableList, SearchableListProps } from './components/layout-and-navigation/SearchableList.js';
25
25
  export { StepperBar, StepperBarProps, StepperBarUncontrolled, StepperState } from './components/layout-and-navigation/StepperBar.js';
26
- export { SortButton, SortButtonProps, Table, TableProps, TableSortingFunctionType, TableSortingType, TableState, TableStatePagination, TableStateSelection, addElementToTable, changeTableSelectionSingle, defaultTableStatePagination, defaultTableStateSelection, isDataObjectSelected, pageForItem, removeFromTableSelection, updatePagination } from './components/layout-and-navigation/Table.js';
27
26
  export { TextImage, TextImageProps } from './components/layout-and-navigation/TextImage.js';
28
27
  export { Tile, TileProps } from './components/layout-and-navigation/Tile.js';
29
28
  export { VerticalDivider, VerticalDividerProps } from './components/layout-and-navigation/VerticalDivider.js';
@@ -44,10 +43,16 @@ export { NumberProperty, NumberPropertyProps } from './components/properties/Num
44
43
  export { PropertyBase, PropertyBaseProps } from './components/properties/PropertyBase.js';
45
44
  export { SingleSelectProperty, SingleSelectPropertyProps } from './components/properties/SelectProperty.js';
46
45
  export { TextProperty, TextPropertyProps } from './components/properties/TextProperty.js';
47
- export { ButtonColorUtil, ButtonProps, ButtonUtil, IconButton, IconButtonProps, OutlineButton, OutlineButtonColor, OutlineButtonProps, SolidButton, SolidButtonColor, SolidButtonProps, TextButton, TextButtonColor, TextButtonProps } from './components/user-action/Button.js';
46
+ export { FillerRowElement, FillerRowElementProps } from './components/table/FillerRowElement.js';
47
+ export { TableFilters } from './components/table/Filter.js';
48
+ export { Table, TableProps, TableUncontrolled, TableUncontrolledProps, TableWithSelection, TableWithSelectionProps } from './components/table/Table.js';
49
+ export { TableCell, TableCellProps } from './components/table/TableCell.js';
50
+ export { TableFilterButton, TableFilterButtonProps, TableFilterType } from './components/table/TableFilterButton.js';
51
+ export { TableSortButton, TableSortButtonProps } from './components/table/TableSortButton.js';
52
+ export { ButtonColorUtil, ButtonProps, ButtonUtil, IconButton, IconButtonColor, IconButtonProps, IconButtonUtil, OutlineButton, OutlineButtonColor, OutlineButtonProps, SolidButton, SolidButtonColor, SolidButtonProps, TextButton, TextButtonColor, TextButtonProps } from './components/user-action/Button.js';
48
53
  export { Checkbox, CheckboxProps, CheckboxUncontrolled } from './components/user-action/Checkbox.js';
49
54
  export { DateTimePicker, DateTimePickerMode, DateTimePickerProps } from './components/user-action/DateAndTimePicker.js';
50
- export { FormInput, FormInputProps, Input, InputProps, InputUncontrolled } from './components/user-action/Input.js';
55
+ export { EditCompleteOptions, EditCompleteOptionsResolved, FormInput, FormInputProps, Input, InputProps, InputUncontrolled } from './components/user-action/Input.js';
51
56
  export { Label, LabelProps, LabelType } from './components/user-action/Label.js';
52
57
  export { Menu, MenuItem, MenuItemProps, MenuProps } from './components/user-action/Menu.js';
53
58
  export { MultiSelect, MultiSelectOption, MultiSelectProps, MultiSelectUncontrolled } from './components/user-action/MultiSelect.js';
@@ -56,10 +61,14 @@ export { Select, SelectOption, SelectProps, SelectUncontrolled } from './compone
56
61
  export { Textarea, TextareaProps, TextareaUncontrolled } from './components/user-action/Textarea.js';
57
62
  export { ToggleableInput, ToggleableInputUncontrolled } from './components/user-action/ToggleableInput.js';
58
63
  export { Tooltip, TooltipProps } from './components/user-action/Tooltip.js';
64
+ export { UseDelayOptions, UseDelayOptionsResolved, useDelay } from './hooks/useDelay.js';
65
+ export { useFocusManagement } from './hooks/useFocusManagement.js';
66
+ export { useFocusOnceVisible } from './hooks/useFocusOnceVisible.js';
59
67
  export { useHoverState } from './hooks/useHoverState.js';
60
68
  export { useLocalStorage } from './hooks/useLocalStorage.js';
61
69
  export { useOutsideClick } from './hooks/useOutsideClick.js';
62
- export { useSaveDelay } from './hooks/useSaveDelay.js';
70
+ export { useRerender } from './hooks/useRerender.js';
71
+ export { useResizeCallbackWrapper } from './hooks/useResizeCallbackWrapper.js';
63
72
  export { UseSearchProps, useSearch } from './hooks/useSearch.js';
64
73
  export { LanguageContext, LanguageContextValue, LanguageProvider, useLanguage, useLocale } from './localization/LanguageProvider.js';
65
74
  export { PropsForTranslation, Translation, TranslationPlural, TranslationPluralCount, TranslationType, useTranslation } from './localization/useTranslation.js';
@@ -68,7 +77,7 @@ export { FormTranslationType, formTranslation } from './localization/defaults/fo
68
77
  export { MonthTranslationType, TimeTranslationType, monthTranslation, timeTranslation } from './localization/defaults/time.js';
69
78
  export { ThemeContext, ThemeProvider, ThemeType, ThemeTypeTranslation, ThemeUtil, useTheme } from './theming/useTheme.js';
70
79
  export { BagFunction, BagFunctionUtil, PropsWithBagFunction, PropsWithBagFunctionOrChildren } from './util/PropsWithFunctionChildren.js';
71
- export { ArrayUtil, closestMatch, createLoopingList, createLoopingListWithIndex, equalSizeGroups, getNeighbours, range } from './util/array.js';
80
+ export { ArrayUtil, RangeOptions, closestMatch, createLoopingList, createLoopingListWithIndex, equalSizeGroups, getNeighbours, range } from './util/array.js';
72
81
  export { builder } from './util/builder.js';
73
82
  export { Duration, Month, WeekDay, addDuration, changeDuration, equalDate, formatDate, formatDateTime, getBetweenDuration, getDaysInMonth, getWeeksForCalenderMonth, isInTimeSpan, monthsList, subtractDuration, weekDayList } from './util/date.js';
74
83
  export { EaseFunction, EaseFunctions } from './util/easeFunctions.js';
@@ -77,10 +86,12 @@ export { Direction, LoopingArrayCalculator } from './util/loopingArray.js';
77
86
  export { clamp } from './util/math.js';
78
87
  export { LocalizedNews, News, filterNews, localizedNewsSchema, newsListSchema, newsSchema } from './util/news.js';
79
88
  export { noop } from './util/noop.js';
89
+ export { resolveSetState } from './util/resolveSetState.js';
80
90
  export { MultiSearchWithMapping, MultiSubjectSearchWithMapping, SimpleSearch, SimpleSearchWithMapping } from './util/simpleSearch.js';
81
91
  export { LocalStorageService, SessionStorageService } from './util/storage.js';
82
92
  export { NativeProps } from './util/types.js';
83
93
  import 'react/jsx-runtime';
84
94
  import 'react';
95
+ import '@tanstack/react-table';
85
96
  import '@radix-ui/react-checkbox';
86
97
  import 'zod';