@dmsi/wedgekit-react 1.0.1 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (282) hide show
  1. package/dist/classNames.d.ts +1 -0
  2. package/dist/classNames.d.ts.map +1 -1
  3. package/dist/classNames.js +150 -0
  4. package/dist/components/AccessCard.js +63 -0
  5. package/dist/components/AccessCardGroup.js +73 -0
  6. package/dist/components/AccessChangerTabItem.js +51 -0
  7. package/dist/components/Accordion.js +99 -0
  8. package/dist/components/Alert.d.ts.map +1 -1
  9. package/dist/components/Alert.js +78 -0
  10. package/dist/components/Breadcrumbs.js +111 -0
  11. package/dist/components/Button.js +137 -0
  12. package/dist/components/CalendarRange.js +405 -0
  13. package/dist/components/Caption.js +99 -0
  14. package/dist/components/Card.js +50 -0
  15. package/dist/components/Checkbox.js +108 -0
  16. package/dist/components/CompactImagesPreview.d.ts.map +1 -1
  17. package/dist/components/CompactImagesPreview.js +120 -0
  18. package/dist/components/ContentTab.js +68 -0
  19. package/dist/components/ContentTabs.js +96 -0
  20. package/dist/components/DMSiLogo.js +54 -0
  21. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +27 -0
  22. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +79 -0
  23. package/dist/components/DataGrid/PinnedColumns.d.ts +9 -2
  24. package/dist/components/DataGrid/PinnedColumns.d.ts.map +1 -1
  25. package/dist/components/DataGrid/PinnedColumns.js +165 -0
  26. package/dist/components/DataGrid/SummaryRow/SummaryCell.d.ts +18 -0
  27. package/dist/components/DataGrid/SummaryRow/SummaryCell.d.ts.map +1 -0
  28. package/dist/components/DataGrid/SummaryRow/SummaryCell.js +51 -0
  29. package/dist/components/DataGrid/SummaryRow/aggregations.d.ts +39 -0
  30. package/dist/components/DataGrid/SummaryRow/aggregations.d.ts.map +1 -0
  31. package/dist/components/DataGrid/SummaryRow/aggregations.js +55 -0
  32. package/dist/components/DataGrid/SummaryRow/index.d.ts +18 -0
  33. package/dist/components/DataGrid/SummaryRow/index.d.ts.map +1 -0
  34. package/dist/components/DataGrid/SummaryRow/index.js +86 -0
  35. package/dist/components/DataGrid/TableBody/GroupRow.d.ts +18 -0
  36. package/dist/components/DataGrid/TableBody/GroupRow.d.ts.map +1 -0
  37. package/dist/components/DataGrid/TableBody/GroupRow.js +243 -0
  38. package/dist/components/DataGrid/TableBody/LoadingCell.js +33 -0
  39. package/dist/components/DataGrid/TableBody/TableBodyRow.d.ts +3 -2
  40. package/dist/components/DataGrid/TableBody/TableBodyRow.d.ts.map +1 -1
  41. package/dist/components/DataGrid/TableBody/TableBodyRow.js +136 -0
  42. package/dist/components/DataGrid/TableBody/index.d.ts +3 -1
  43. package/dist/components/DataGrid/TableBody/index.d.ts.map +1 -1
  44. package/dist/components/DataGrid/TableBody/index.js +161 -0
  45. package/dist/components/DataGrid/index.d.ts +1 -1
  46. package/dist/components/DataGrid/index.d.ts.map +1 -1
  47. package/dist/components/DataGrid/index.js +696 -0
  48. package/dist/components/DataGrid/types.d.ts +141 -1
  49. package/dist/components/DataGrid/types.d.ts.map +1 -1
  50. package/dist/components/DataGrid/utils.d.ts +2 -0
  51. package/dist/components/DataGrid/utils.d.ts.map +1 -1
  52. package/dist/components/DataGrid/utils.js +20 -0
  53. package/dist/components/DataGridCell.d.ts +5 -2
  54. package/dist/components/DataGridCell.d.ts.map +1 -1
  55. package/dist/components/DataGridCell.js +412 -0
  56. package/dist/components/DataTable.js +700 -0
  57. package/dist/components/DateInput.js +193 -0
  58. package/dist/components/DateRangeInput.js +368 -0
  59. package/dist/components/DebugJson.js +28 -0
  60. package/dist/components/Display.js +46 -0
  61. package/dist/components/EditingContext.js +34 -0
  62. package/dist/components/EmblaCarousel/ArrowButtons.js +83 -0
  63. package/dist/components/EmblaCarousel/SelectedSnapDisplay.js +12 -0
  64. package/dist/components/EmblaCarousel/index.js +153 -0
  65. package/dist/components/EmblaCarousel/usePrevNextButtons.js +21 -0
  66. package/dist/components/EmblaCarousel/useSelectedSnapDisplay.js +15 -0
  67. package/dist/components/EmptyCartIcon.js +25 -0
  68. package/dist/components/FilterGroup.d.ts +5 -3
  69. package/dist/components/FilterGroup.d.ts.map +1 -1
  70. package/dist/components/FilterGroup.js +198 -0
  71. package/dist/components/FullViewportBox.js +19 -0
  72. package/dist/components/Grid.js +54 -0
  73. package/dist/components/Heading.js +50 -0
  74. package/dist/components/HorizontalDivider.js +20 -0
  75. package/dist/components/Icon.d.ts +5 -2
  76. package/dist/components/Icon.d.ts.map +1 -1
  77. package/dist/components/Icon.js +73 -0
  78. package/dist/components/ImagePlaceholder.js +22 -0
  79. package/dist/components/Input.d.ts +11 -9
  80. package/dist/components/Input.d.ts.map +1 -1
  81. package/dist/components/Input.js +469 -0
  82. package/dist/components/InputGroup.js +45 -0
  83. package/dist/components/Label.js +37 -0
  84. package/dist/components/Link.js +69 -0
  85. package/dist/components/List.js +12 -0
  86. package/dist/components/ListGroup.d.ts.map +1 -1
  87. package/dist/components/ListGroup.js +54 -0
  88. package/dist/components/LiveChatComponent.js +25 -0
  89. package/dist/components/LoadingScrim.js +22 -0
  90. package/dist/components/LogoAgilityTopBar.js +90 -0
  91. package/dist/components/LogoDMSiTopBar.js +54 -0
  92. package/dist/components/LogoMillworkTopBar.js +196 -0
  93. package/dist/components/MainBar.js +58 -0
  94. package/dist/components/MaxViewportBox.js +19 -0
  95. package/dist/components/Menu.d.ts.map +1 -1
  96. package/dist/components/Menu.js +202 -0
  97. package/dist/components/MenuOption.js +161 -0
  98. package/dist/components/MobileDataGrid/ColumnList.js +85 -0
  99. package/dist/components/MobileDataGrid/ColumnSelector/index.js +100 -0
  100. package/dist/components/MobileDataGrid/GridContextProvider/GridContext.d.ts.map +1 -1
  101. package/dist/components/MobileDataGrid/GridContextProvider/GridContext.js +6 -0
  102. package/dist/components/MobileDataGrid/GridContextProvider/index.js +80 -0
  103. package/dist/components/MobileDataGrid/GridContextProvider/useGridContext.js +11 -0
  104. package/dist/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.js +18 -0
  105. package/dist/components/MobileDataGrid/MobileDataGridCard/index.d.ts +2 -1
  106. package/dist/components/MobileDataGrid/MobileDataGridCard/index.d.ts.map +1 -1
  107. package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +130 -0
  108. package/dist/components/MobileDataGrid/MobileDataGridHeader.d.ts.map +1 -1
  109. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +67 -0
  110. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +42 -0
  111. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.d.ts.map +1 -1
  112. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +58 -0
  113. package/dist/components/MobileDataGrid/dataGridReducer.js +28 -0
  114. package/dist/components/MobileDataGrid/index.d.ts +1 -1
  115. package/dist/components/MobileDataGrid/index.d.ts.map +1 -1
  116. package/dist/components/MobileDataGrid/index.js +78 -0
  117. package/dist/components/MobileNavMenu.d.ts.map +1 -1
  118. package/dist/components/MobileNavMenu.js +173 -0
  119. package/dist/components/Modal.d.ts +1 -2
  120. package/dist/components/Modal.d.ts.map +1 -1
  121. package/dist/components/Modal.js +201 -0
  122. package/dist/components/ModalButtons.d.ts.map +1 -1
  123. package/dist/components/ModalButtons.js +57 -0
  124. package/dist/components/ModalContent.d.ts +1 -2
  125. package/dist/components/ModalContent.d.ts.map +1 -1
  126. package/dist/components/ModalContent.js +24 -0
  127. package/dist/components/ModalHeader.js +74 -0
  128. package/dist/components/ModalScrim.js +32 -0
  129. package/dist/components/NavigationTab.js +72 -0
  130. package/dist/components/NavigationTabs.js +45 -0
  131. package/dist/components/NestedMenu.d.ts.map +1 -1
  132. package/dist/components/NestedMenu.js +119 -0
  133. package/dist/components/Notification.js +91 -0
  134. package/dist/components/OptionPill.d.ts +2 -1
  135. package/dist/components/OptionPill.d.ts.map +1 -1
  136. package/dist/components/OptionPill.js +103 -0
  137. package/dist/components/OrderCheckIcon.js +28 -0
  138. package/dist/components/PDFViewer/DownloadIcon.js +25 -0
  139. package/dist/components/PDFViewer/PDFElement.js +77 -0
  140. package/dist/components/PDFViewer/PDFNavigation.js +64 -0
  141. package/dist/components/PDFViewer/PDFPage.js +28 -0
  142. package/dist/components/PDFViewer/index.d.ts.map +1 -1
  143. package/dist/components/PDFViewer/index.js +124 -0
  144. package/dist/components/Pagination.d.ts.map +1 -1
  145. package/dist/components/Pagination.js +117 -0
  146. package/dist/components/Paragraph.js +43 -0
  147. package/dist/components/Password.js +47 -0
  148. package/dist/components/ProductImagePreview/CarouselPagination.js +48 -0
  149. package/dist/components/ProductImagePreview/MobileImageCarousel.d.ts +2 -1
  150. package/dist/components/ProductImagePreview/MobileImageCarousel.d.ts.map +1 -1
  151. package/dist/components/ProductImagePreview/MobileImageCarousel.js +146 -0
  152. package/dist/components/ProductImagePreview/ProductPrimaryImage.d.ts +2 -1
  153. package/dist/components/ProductImagePreview/ProductPrimaryImage.d.ts.map +1 -1
  154. package/dist/components/ProductImagePreview/ProductPrimaryImage.js +138 -0
  155. package/dist/components/ProductImagePreview/Thumbnail.d.ts +2 -1
  156. package/dist/components/ProductImagePreview/Thumbnail.d.ts.map +1 -1
  157. package/dist/components/ProductImagePreview/Thumbnail.js +46 -0
  158. package/dist/components/ProductImagePreview/ZoomWindow.js +74 -0
  159. package/dist/components/ProductImagePreview/index.d.ts.map +1 -1
  160. package/dist/components/ProductImagePreview/index.js +189 -0
  161. package/dist/components/ProductImagePreview/useProductImagePreview.js +85 -0
  162. package/dist/components/ProjectBar.d.ts +1 -1
  163. package/dist/components/ProjectBar.js +54 -0
  164. package/dist/components/Radio.js +113 -0
  165. package/dist/components/Search.js +89 -0
  166. package/dist/components/SearchResultImage/index.js +26 -0
  167. package/dist/components/Select.js +122 -0
  168. package/dist/components/SideMenu.js +24 -0
  169. package/dist/components/SideMenuGroup.js +80 -0
  170. package/dist/components/SideMenuItem.js +79 -0
  171. package/dist/components/SimpleTable.js +60 -0
  172. package/dist/components/SkeletonParagraph.js +24 -0
  173. package/dist/components/Spinner.d.ts +1 -1
  174. package/dist/components/Spinner.d.ts.map +1 -1
  175. package/dist/components/Spinner.js +30 -0
  176. package/dist/components/Stack.js +174 -0
  177. package/dist/components/StatusPill.js +44 -0
  178. package/dist/components/Stepper.js +138 -0
  179. package/dist/components/Subheader.d.ts +2 -1
  180. package/dist/components/Subheader.d.ts.map +1 -1
  181. package/dist/components/Subheader.js +41 -0
  182. package/dist/components/Surface.js +30 -0
  183. package/dist/components/Swatch.js +1498 -0
  184. package/dist/components/Textarea.js +106 -0
  185. package/dist/components/Theme.d.ts +1 -1
  186. package/dist/components/Theme.d.ts.map +1 -1
  187. package/dist/components/Theme.js +25 -0
  188. package/dist/components/Time.d.ts +2 -1
  189. package/dist/components/Time.d.ts.map +1 -1
  190. package/dist/components/Time.js +225 -0
  191. package/dist/components/Toast.d.ts +4 -3
  192. package/dist/components/Toast.d.ts.map +1 -1
  193. package/dist/components/Toast.js +170 -0
  194. package/dist/components/Tooltip.js +102 -0
  195. package/dist/components/TopBar.d.ts.map +1 -1
  196. package/dist/components/TopBar.js +119 -0
  197. package/dist/components/Upload.js +107 -0
  198. package/dist/components/WorldpayIframe.d.ts.map +1 -1
  199. package/dist/components/WorldpayIframe.js +19 -0
  200. package/dist/hooks/useEditCell.js +23 -0
  201. package/dist/hooks/useInfiniteScroll.js +25 -0
  202. package/dist/hooks/useKeydown.js +20 -0
  203. package/dist/hooks/useMatchesMedia.js +15 -0
  204. package/dist/hooks/useMenuSystem.js +186 -0
  205. package/dist/hooks/useMounted.js +9 -0
  206. package/dist/hooks/useTableLayout/computeColumns.js +59 -0
  207. package/dist/hooks/useTableLayout/storage.js +64 -0
  208. package/dist/hooks/useTableLayout/useTableLayout.js +163 -0
  209. package/dist/index.js +249 -52864
  210. package/dist/lib/loadFonts.js +11 -0
  211. package/dist/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js +56 -0
  212. package/dist/node_modules/@dnd-kit/core/dist/core.esm.js +2299 -0
  213. package/dist/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js +13 -0
  214. package/dist/node_modules/@dnd-kit/sortable/dist/sortable.esm.js +367 -0
  215. package/dist/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +235 -0
  216. package/dist/node_modules/@headlessui/react/dist/components/description/description.js +45 -0
  217. package/dist/node_modules/@headlessui/react/dist/components/keyboard.js +4 -0
  218. package/dist/node_modules/@headlessui/react/dist/components/label/label.js +62 -0
  219. package/dist/node_modules/@headlessui/react/dist/components/switch/switch.js +56 -0
  220. package/dist/node_modules/@headlessui/react/dist/hooks/use-active-press.js +33 -0
  221. package/dist/node_modules/@headlessui/react/dist/hooks/use-controllable.js +10 -0
  222. package/dist/node_modules/@headlessui/react/dist/hooks/use-default-value.js +8 -0
  223. package/dist/node_modules/@headlessui/react/dist/hooks/use-disposables.js +9 -0
  224. package/dist/node_modules/@headlessui/react/dist/hooks/use-event.js +9 -0
  225. package/dist/node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.js +8 -0
  226. package/dist/node_modules/@headlessui/react/dist/hooks/use-latest-value.js +11 -0
  227. package/dist/node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.js +12 -0
  228. package/dist/node_modules/@headlessui/react/dist/hooks/use-slot.js +7 -0
  229. package/dist/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js +16 -0
  230. package/dist/node_modules/@headlessui/react/dist/internal/disabled.js +8 -0
  231. package/dist/node_modules/@headlessui/react/dist/internal/form-fields.js +35 -0
  232. package/dist/node_modules/@headlessui/react/dist/internal/hidden.js +13 -0
  233. package/dist/node_modules/@headlessui/react/dist/internal/id.js +8 -0
  234. package/dist/node_modules/@headlessui/react/dist/utils/bugs.js +19 -0
  235. package/dist/node_modules/@headlessui/react/dist/utils/class-names.js +6 -0
  236. package/dist/node_modules/@headlessui/react/dist/utils/disposables.js +40 -0
  237. package/dist/node_modules/@headlessui/react/dist/utils/dom.js +34 -0
  238. package/dist/node_modules/@headlessui/react/dist/utils/env.js +34 -0
  239. package/dist/node_modules/@headlessui/react/dist/utils/form.js +32 -0
  240. package/dist/node_modules/@headlessui/react/dist/utils/match.js +11 -0
  241. package/dist/node_modules/@headlessui/react/dist/utils/micro-task.js +8 -0
  242. package/dist/node_modules/@headlessui/react/dist/utils/owner.js +8 -0
  243. package/dist/node_modules/@headlessui/react/dist/utils/render.js +126 -0
  244. package/dist/node_modules/@js-temporal/polyfill/dist/index.esm.js +3913 -0
  245. package/dist/node_modules/@mikecousins/react-pdf/dist/index.js +83 -0
  246. package/dist/node_modules/@react-aria/focus/dist/useFocusRing.js +38 -0
  247. package/dist/node_modules/@react-aria/interactions/dist/useFocus.js +31 -0
  248. package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.js +99 -0
  249. package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.js +59 -0
  250. package/dist/node_modules/@react-aria/interactions/dist/useHover.js +86 -0
  251. package/dist/node_modules/@react-aria/interactions/dist/utils.js +68 -0
  252. package/dist/node_modules/@react-aria/utils/dist/DOMFunctions.js +32 -0
  253. package/dist/node_modules/@react-aria/utils/dist/domHelpers.js +15 -0
  254. package/dist/node_modules/@react-aria/utils/dist/focusWithoutScrolling.js +45 -0
  255. package/dist/node_modules/@react-aria/utils/dist/isVirtualEvent.js +7 -0
  256. package/dist/node_modules/@react-aria/utils/dist/openLink.js +28 -0
  257. package/dist/node_modules/@react-aria/utils/dist/platform.js +47 -0
  258. package/dist/node_modules/@react-aria/utils/dist/useGlobalListeners.js +34 -0
  259. package/dist/node_modules/@react-aria/utils/dist/useLayoutEffect.js +6 -0
  260. package/dist/node_modules/@react-stately/flags/dist/import.js +7 -0
  261. package/dist/node_modules/@tanstack/react-table/build/lib/index.js +94 -0
  262. package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +38 -0
  263. package/dist/node_modules/@tanstack/table-core/build/lib/index.js +1954 -0
  264. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +575 -0
  265. package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +52 -0
  266. package/dist/node_modules/clsx/dist/clsx.js +17 -0
  267. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1204 -0
  268. package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js +126 -0
  269. package/dist/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +24 -0
  270. package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +35 -0
  271. package/dist/node_modules/jsbi/dist/jsbi.js +1040 -0
  272. package/dist/node_modules/react-use/esm/usePrevious.js +10 -0
  273. package/dist/static/no-results-image.png.js +4 -0
  274. package/dist/styles.css +1 -1
  275. package/dist/utils/date-patch-dashes.js +28 -0
  276. package/dist/utils/date.js +95 -0
  277. package/dist/utils/formatting.js +22 -0
  278. package/dist/utils/index.js +4 -0
  279. package/dist/utils/mergeObjectArrays.js +18 -0
  280. package/dist/utils.js +20 -0
  281. package/package.json +1 -1
  282. /package/dist/{pdf-l6QfMa5e.js → node_modules/pdfjs-dist/build/pdf.js} +0 -0
@@ -0,0 +1,62 @@
1
+ "use client";
2
+ import $, { useState as I, useMemo as k, useId as S, useContext as L, createContext as F } from "react";
3
+ import { useEvent as E } from "../../hooks/use-event.js";
4
+ import { useIsoMorphicEffect as j } from "../../hooks/use-iso-morphic-effect.js";
5
+ import { useSlot as w } from "../../hooks/use-slot.js";
6
+ import { useSyncRefs as B } from "../../hooks/use-sync-refs.js";
7
+ import { useDisabled as M } from "../../internal/disabled.js";
8
+ import { useProvidedId as P } from "../../internal/id.js";
9
+ import { isInteractiveElement as R, isHTMLLabelElement as C, isHTMLInputElement as A } from "../../utils/dom.js";
10
+ import { forwardRefWithAs as D, useRender as H } from "../../utils/render.js";
11
+ let b = F(null);
12
+ b.displayName = "LabelContext";
13
+ function y() {
14
+ let o = L(b);
15
+ if (o === null) {
16
+ let l = new Error("You used a <Label /> component, but it is not inside a relevant parent.");
17
+ throw Error.captureStackTrace && Error.captureStackTrace(l, y), l;
18
+ }
19
+ return o;
20
+ }
21
+ function N(o) {
22
+ var l, a, i;
23
+ let e = (a = (l = L(b)) == null ? void 0 : l.value) != null ? a : void 0;
24
+ return ((i = void 0) != null ? i : 0) > 0 ? [e, ...o].filter(Boolean).join(" ") : e;
25
+ }
26
+ function Q({ inherit: o = !1 } = {}) {
27
+ let l = N(), [a, i] = I([]), e = o ? [l, ...a].filter(Boolean) : a;
28
+ return [e.length > 0 ? e.join(" ") : void 0, k(() => function(t) {
29
+ let d = E((p) => (i((c) => [...c, p]), () => i((c) => {
30
+ let n = c.slice(), f = n.indexOf(p);
31
+ return f !== -1 && n.splice(f, 1), n;
32
+ }))), u = k(() => ({ register: d, slot: t.slot, name: t.name, props: t.props, value: t.value }), [d, t.slot, t.name, t.props, t.value]);
33
+ return $.createElement(b.Provider, { value: u }, t.children);
34
+ }, [i])];
35
+ }
36
+ let O = "label";
37
+ function Y(o, l) {
38
+ var a;
39
+ let i = S(), e = y(), t = P(), d = M(), { id: u = `headlessui-label-${i}`, htmlFor: p = t ?? ((a = e.props) == null ? void 0 : a.htmlFor), passive: c = !1, ...n } = o, f = B(l);
40
+ j(() => e.register(u), [u, e.register]);
41
+ let x = E((s) => {
42
+ let v = s.currentTarget;
43
+ if (!(s.target !== s.currentTarget && R(s.target)) && (C(v) && s.preventDefault(), e.props && "onClick" in e.props && typeof e.props.onClick == "function" && e.props.onClick(s), C(v))) {
44
+ let r = document.getElementById(v.htmlFor);
45
+ if (r) {
46
+ let h = r.getAttribute("disabled");
47
+ if (h === "true" || h === "") return;
48
+ let g = r.getAttribute("aria-disabled");
49
+ if (g === "true" || g === "") return;
50
+ (A(r) && (r.type === "file" || r.type === "radio" || r.type === "checkbox") || r.role === "radio" || r.role === "checkbox" || r.role === "switch") && r.click(), r.focus({ preventScroll: !0 });
51
+ }
52
+ }
53
+ }), T = w({ ...e.slot, disabled: d || !1 }), m = { ref: f, ...e.props, id: u, htmlFor: p, onClick: x };
54
+ return c && ("onClick" in m && (delete m.htmlFor, delete m.onClick), "onClick" in n && delete n.onClick), H()({ ourProps: m, theirProps: n, slot: T, defaultTag: p ? O : "div", name: e.name || "Label" });
55
+ }
56
+ let _ = D(Y), X = Object.assign(_, {});
57
+ export {
58
+ X as Label,
59
+ y as useLabelContext,
60
+ N as useLabelledBy,
61
+ Q as useLabels
62
+ };
@@ -0,0 +1,56 @@
1
+ "use client";
2
+ import { useFocusRing as Y } from "../../../../../@react-aria/focus/dist/useFocusRing.js";
3
+ import { useHover as Z } from "../../../../../@react-aria/interactions/dist/useHover.js";
4
+ import a, { useState as y, useMemo as z, Fragment as Q, createContext as ee, useId as te, useContext as re, useRef as se, useCallback as ae } from "react";
5
+ import { useActivePress as oe } from "../../hooks/use-active-press.js";
6
+ import { useControllable as le } from "../../hooks/use-controllable.js";
7
+ import { useDefaultValue as ie } from "../../hooks/use-default-value.js";
8
+ import { useDisposables as ue } from "../../hooks/use-disposables.js";
9
+ import { useEvent as f } from "../../hooks/use-event.js";
10
+ import { useResolveButtonType as ne } from "../../hooks/use-resolve-button-type.js";
11
+ import { useSlot as ce } from "../../hooks/use-slot.js";
12
+ import { useSyncRefs as me } from "../../hooks/use-sync-refs.js";
13
+ import { useDisabled as pe } from "../../internal/disabled.js";
14
+ import { FormFields as fe } from "../../internal/form-fields.js";
15
+ import { useProvidedId as de } from "../../internal/id.js";
16
+ import { isDisabledReactIssue7711 as be } from "../../utils/bugs.js";
17
+ import { isHTMLLabelElement as he } from "../../utils/dom.js";
18
+ import { attemptSubmit as ve } from "../../utils/form.js";
19
+ import { forwardRefWithAs as $e, useRender as P, mergeProps as we } from "../../utils/render.js";
20
+ import { Description as ye, useDescriptions as De, useDescribedBy as Se } from "../description/description.js";
21
+ import { Keys as F } from "../keyboard.js";
22
+ import { Label as ge, useLabels as ke, useLabelledBy as Fe } from "../label/label.js";
23
+ let D = ee(null);
24
+ D.displayName = "GroupContext";
25
+ let Pe = Q;
26
+ function xe(s) {
27
+ var i;
28
+ let [t, u] = y(null), [d, b] = ke(), [h, r] = De(), n = z(() => ({ switch: t, setSwitch: u }), [t, u]), v = {}, $ = s, c = P();
29
+ return a.createElement(r, { name: "Switch.Description", value: h }, a.createElement(b, { name: "Switch.Label", value: d, props: { htmlFor: (i = n.switch) == null ? void 0 : i.id, onClick(m) {
30
+ t && (he(m.currentTarget) && m.preventDefault(), t.click(), t.focus({ preventScroll: !0 }));
31
+ } } }, a.createElement(D.Provider, { value: n }, c({ ourProps: v, theirProps: $, slot: {}, defaultTag: Pe, name: "Switch.Group" }))));
32
+ }
33
+ let Ce = "button";
34
+ function Re(s, i) {
35
+ var t;
36
+ let u = te(), d = de(), b = pe(), { id: h = d || `headlessui-switch-${u}`, disabled: r = b || !1, checked: n, defaultChecked: v, onChange: $, name: c, value: m, form: x, autoFocus: w = !1, ...C } = s, S = re(D), [R, L] = y(null), E = se(null), T = me(E, i, S === null ? null : S.setSwitch, L), o = ie(v), [p, l] = le(n, $, o ?? !1), I = ue(), [G, g] = y(!1), k = f(() => {
37
+ g(!0), l?.(!p), I.nextFrame(() => {
38
+ g(!1);
39
+ });
40
+ }), H = f((e) => {
41
+ if (be(e.currentTarget)) return e.preventDefault();
42
+ e.preventDefault(), k();
43
+ }), K = f((e) => {
44
+ e.key === F.Space ? (e.preventDefault(), k()) : e.key === F.Enter && ve(e.currentTarget);
45
+ }), V = f((e) => e.preventDefault()), A = Fe(), B = Se(), { isFocusVisible: M, focusProps: j } = Y({ autoFocus: w }), { isHovered: N, hoverProps: _ } = Z({ isDisabled: r }), { pressed: O, pressProps: U } = oe({ disabled: r }), W = ce({ checked: p, disabled: r, hover: N, focus: M, active: O, autofocus: w, changing: G }), q = we({ id: h, ref: T, role: "switch", type: ne(s, R), tabIndex: s.tabIndex === -1 ? 0 : (t = s.tabIndex) != null ? t : 0, "aria-checked": p, "aria-labelledby": A, "aria-describedby": B, disabled: r || void 0, autoFocus: w, onClick: H, onKeyUp: K, onKeyPress: V }, j, _, U), J = ae(() => {
46
+ if (o !== void 0) return l?.(o);
47
+ }, [l, o]), X = P();
48
+ return a.createElement(a.Fragment, null, c != null && a.createElement(fe, { disabled: r, data: { [c]: m || "on" }, overrides: { type: "checkbox", checked: p }, form: x, onReset: J }), X({ ourProps: q, theirProps: C, slot: W, defaultTag: Ce, name: "Switch" }));
49
+ }
50
+ let Le = $e(Re), Ee = xe, Te = ge, Ie = ye, tt = Object.assign(Le, { Group: Ee, Label: Te, Description: Ie });
51
+ export {
52
+ tt as Switch,
53
+ Ie as SwitchDescription,
54
+ Ee as SwitchGroup,
55
+ Te as SwitchLabel
56
+ };
@@ -0,0 +1,33 @@
1
+ import { useRef as a, useState as d } from "react";
2
+ import { getOwnerDocument as m } from "../utils/owner.js";
3
+ import { useDisposables as g } from "./use-disposables.js";
4
+ import { useEvent as u } from "./use-event.js";
5
+ function h(t) {
6
+ let e = t.width / 2, n = t.height / 2;
7
+ return { top: t.clientY - n, right: t.clientX + e, bottom: t.clientY + n, left: t.clientX - e };
8
+ }
9
+ function v(t, e) {
10
+ return !(!t || !e || t.right < e.left || t.left > e.right || t.bottom < e.top || t.top > e.bottom);
11
+ }
12
+ function D({ disabled: t = !1 } = {}) {
13
+ let e = a(null), [n, i] = d(!1), r = g(), o = u(() => {
14
+ e.current = null, i(!1), r.dispose();
15
+ }), p = u((l) => {
16
+ if (r.dispose(), e.current === null) {
17
+ e.current = l.currentTarget, i(!0);
18
+ {
19
+ let s = m(l.currentTarget);
20
+ r.addEventListener(s, "pointerup", o, !1), r.addEventListener(s, "pointermove", (c) => {
21
+ if (e.current) {
22
+ let f = h(c);
23
+ i(v(f, e.current.getBoundingClientRect()));
24
+ }
25
+ }, !1), r.addEventListener(s, "pointercancel", o, !1);
26
+ }
27
+ }
28
+ });
29
+ return { pressed: n, pressProps: t ? {} : { onPointerDown: p, onPointerUp: o, onClick: o } };
30
+ }
31
+ export {
32
+ D as useActivePress
33
+ };
@@ -0,0 +1,10 @@
1
+ import { useState as d, useRef as o } from "react";
2
+ import { flushSync as h } from "react-dom";
3
+ import { useEvent as f } from "./use-event.js";
4
+ function v(r, t, a) {
5
+ let [i, s] = d(a), e = r !== void 0, n = o(e), u = o(!1), c = o(!1);
6
+ return e && !n.current && !u.current ? (u.current = !0, n.current = e, console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")) : !e && n.current && !c.current && (c.current = !0, n.current = e, console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")), [e ? r : i, f((l) => (e || h(() => s(l)), t?.(l)))];
7
+ }
8
+ export {
9
+ v as useControllable
10
+ };
@@ -0,0 +1,8 @@
1
+ import { useState as u } from "react";
2
+ function a(t) {
3
+ let [e] = u(t);
4
+ return e;
5
+ }
6
+ export {
7
+ a as useDefaultValue
8
+ };
@@ -0,0 +1,9 @@
1
+ import { useState as e, useEffect as o } from "react";
2
+ import { disposables as t } from "../utils/disposables.js";
3
+ function i() {
4
+ let [s] = e(t);
5
+ return o(() => () => s.dispose(), [s]), s;
6
+ }
7
+ export {
8
+ i as useDisposables
9
+ };
@@ -0,0 +1,9 @@
1
+ import a from "react";
2
+ import { useLatestValue as u } from "./use-latest-value.js";
3
+ let l = function(t) {
4
+ let e = u(t);
5
+ return a.useCallback((...r) => e.current(...r), [e]);
6
+ };
7
+ export {
8
+ l as useEvent
9
+ };
@@ -0,0 +1,8 @@
1
+ import { useEffect as o, useLayoutEffect as r } from "react";
2
+ import { env as s } from "../utils/env.js";
3
+ let i = (e, f) => {
4
+ s.isServer ? o(e, f) : r(e, f);
5
+ };
6
+ export {
7
+ i as useIsoMorphicEffect
8
+ };
@@ -0,0 +1,11 @@
1
+ import { useRef as e } from "react";
2
+ import { useIsoMorphicEffect as o } from "./use-iso-morphic-effect.js";
3
+ function f(r) {
4
+ let t = e(r);
5
+ return o(() => {
6
+ t.current = r;
7
+ }, [r]), t;
8
+ }
9
+ export {
10
+ f as useLatestValue
11
+ };
@@ -0,0 +1,12 @@
1
+ import { useMemo as n } from "react";
2
+ function s(t, e) {
3
+ return n(() => {
4
+ var o;
5
+ if (t.type) return t.type;
6
+ let r = (o = t.as) != null ? o : "button";
7
+ if (typeof r == "string" && r.toLowerCase() === "button" || e?.tagName === "BUTTON" && !e.hasAttribute("type")) return "button";
8
+ }, [t.type, t.as, e]);
9
+ }
10
+ export {
11
+ s as useResolveButtonType
12
+ };
@@ -0,0 +1,7 @@
1
+ import { useMemo as o } from "react";
2
+ function r(e) {
3
+ return o(() => e, Object.values(e));
4
+ }
5
+ export {
6
+ r as useSlot
7
+ };
@@ -0,0 +1,16 @@
1
+ import { useRef as t, useEffect as f } from "react";
2
+ import { useEvent as l } from "./use-event.js";
3
+ let c = /* @__PURE__ */ Symbol();
4
+ function m(...o) {
5
+ let n = t(o);
6
+ f(() => {
7
+ n.current = o;
8
+ }, [o]);
9
+ let u = l((e) => {
10
+ for (let r of n.current) r != null && (typeof r == "function" ? r(e) : r.current = e);
11
+ });
12
+ return o.every((e) => e == null || e?.[c]) ? void 0 : u;
13
+ }
14
+ export {
15
+ m as useSyncRefs
16
+ };
@@ -0,0 +1,8 @@
1
+ import { useContext as e, createContext as t } from "react";
2
+ let o = t(void 0);
3
+ function n() {
4
+ return e(o);
5
+ }
6
+ export {
7
+ n as useDisabled
8
+ };
@@ -0,0 +1,35 @@
1
+ import n, { useState as p, useEffect as m, useContext as E, createContext as F } from "react";
2
+ import { createPortal as y } from "react-dom";
3
+ import { useDisposables as h } from "../hooks/use-disposables.js";
4
+ import { objectToFormEntries as H } from "../utils/form.js";
5
+ import { compact as b } from "../utils/render.js";
6
+ import { Hidden as d, HiddenFeatures as i } from "./hidden.js";
7
+ let g = F(null);
8
+ function v({ children: r }) {
9
+ let e = E(g);
10
+ if (!e) return n.createElement(n.Fragment, null, r);
11
+ let { target: t } = e;
12
+ return t ? y(n.createElement(n.Fragment, null, r), t) : null;
13
+ }
14
+ function $({ data: r, form: e, disabled: t, onReset: a, overrides: s }) {
15
+ let [l, u] = p(null), f = h();
16
+ return m(() => {
17
+ if (a && l) return f.addEventListener(l, "reset", a);
18
+ }, [l, e, a]), n.createElement(v, null, n.createElement(x, { setForm: u, formId: e }), H(r).map(([o, c]) => n.createElement(d, { features: i.Hidden, ...b({ key: o, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: e, disabled: t, name: o, value: c, ...s }) })));
19
+ }
20
+ function x({ setForm: r, formId: e }) {
21
+ return m(() => {
22
+ if (e) {
23
+ let t = document.getElementById(e);
24
+ t && r(t);
25
+ }
26
+ }, [r, e]), e ? null : n.createElement(d, { features: i.Hidden, as: "input", type: "hidden", hidden: !0, readOnly: !0, ref: (t) => {
27
+ if (!t) return;
28
+ let a = t.closest("form");
29
+ a && r(a);
30
+ } });
31
+ }
32
+ export {
33
+ $ as FormFields,
34
+ v as HoistFormFields
35
+ };
@@ -0,0 +1,13 @@
1
+ import { forwardRefWithAs as o, useRender as t } from "../utils/render.js";
2
+ let s = "span";
3
+ var l = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(l || {});
4
+ function p(e, a) {
5
+ var i;
6
+ let { features: d = 1, ...r } = e, n = { ref: a, "aria-hidden": (d & 2) === 2 ? !0 : (i = r["aria-hidden"]) != null ? i : void 0, hidden: (d & 4) === 4 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(d & 4) === 4 && (d & 2) !== 2 && { display: "none" } } };
7
+ return t()({ ourProps: n, theirProps: r, slot: {}, defaultTag: s, name: "Hidden" });
8
+ }
9
+ let f = o(p);
10
+ export {
11
+ f as Hidden,
12
+ l as HiddenFeatures
13
+ };
@@ -0,0 +1,8 @@
1
+ import { useContext as e, createContext as t } from "react";
2
+ let o = t(void 0);
3
+ function n() {
4
+ return e(o);
5
+ }
6
+ export {
7
+ n as useProvidedId
8
+ };
@@ -0,0 +1,19 @@
1
+ import { isHTMLFieldSetElement as r, isHTMLLegendElement as i } from "./dom.js";
2
+ function a(t) {
3
+ let e = t.parentElement, l = null;
4
+ for (; e && !r(e); ) i(e) && (l = e), e = e.parentElement;
5
+ let n = e?.getAttribute("disabled") === "";
6
+ return n && s(l) ? !1 : n;
7
+ }
8
+ function s(t) {
9
+ if (!t) return !1;
10
+ let e = t.previousElementSibling;
11
+ for (; e !== null; ) {
12
+ if (i(e)) return !1;
13
+ e = e.previousElementSibling;
14
+ }
15
+ return !0;
16
+ }
17
+ export {
18
+ a as isDisabledReactIssue7711
19
+ };
@@ -0,0 +1,6 @@
1
+ function r(...e) {
2
+ return Array.from(new Set(e.flatMap((t) => typeof t == "string" ? t.split(" ") : []))).filter(Boolean).join(" ");
3
+ }
4
+ export {
5
+ r as classNames
6
+ };
@@ -0,0 +1,40 @@
1
+ import { microTask as a } from "./micro-task.js";
2
+ function o() {
3
+ let s = [], r = { addEventListener(e, t, n, i) {
4
+ return e.addEventListener(t, n, i), r.add(() => e.removeEventListener(t, n, i));
5
+ }, requestAnimationFrame(...e) {
6
+ let t = requestAnimationFrame(...e);
7
+ return r.add(() => cancelAnimationFrame(t));
8
+ }, nextFrame(...e) {
9
+ return r.requestAnimationFrame(() => r.requestAnimationFrame(...e));
10
+ }, setTimeout(...e) {
11
+ let t = setTimeout(...e);
12
+ return r.add(() => clearTimeout(t));
13
+ }, microTask(...e) {
14
+ let t = { current: !0 };
15
+ return a(() => {
16
+ t.current && e[0]();
17
+ }), r.add(() => {
18
+ t.current = !1;
19
+ });
20
+ }, style(e, t, n) {
21
+ let i = e.style.getPropertyValue(t);
22
+ return Object.assign(e.style, { [t]: n }), this.add(() => {
23
+ Object.assign(e.style, { [t]: i });
24
+ });
25
+ }, group(e) {
26
+ let t = o();
27
+ return e(t), this.add(() => t.dispose());
28
+ }, add(e) {
29
+ return s.includes(e) || s.push(e), () => {
30
+ let t = s.indexOf(e);
31
+ if (t >= 0) for (let n of s.splice(t, 1)) n();
32
+ };
33
+ }, dispose() {
34
+ for (let e of s.splice(0)) e();
35
+ } };
36
+ return r;
37
+ }
38
+ export {
39
+ o as disposables
40
+ };
@@ -0,0 +1,34 @@
1
+ function a(e) {
2
+ return typeof e != "object" || e === null ? !1 : "nodeType" in e;
3
+ }
4
+ function t(e) {
5
+ return a(e) && "tagName" in e;
6
+ }
7
+ function n(e) {
8
+ return t(e) && "accessKey" in e;
9
+ }
10
+ function i(e) {
11
+ return n(e) && e.nodeName === "INPUT";
12
+ }
13
+ function o(e) {
14
+ return n(e) && e.nodeName === "LABEL";
15
+ }
16
+ function s(e) {
17
+ return n(e) && e.nodeName === "FIELDSET";
18
+ }
19
+ function r(e) {
20
+ return n(e) && e.nodeName === "LEGEND";
21
+ }
22
+ function u(e) {
23
+ return t(e) ? e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]') : !1;
24
+ }
25
+ export {
26
+ t as isElement,
27
+ n as isHTMLElement,
28
+ s as isHTMLFieldSetElement,
29
+ i as isHTMLInputElement,
30
+ o as isHTMLLabelElement,
31
+ r as isHTMLLegendElement,
32
+ u as isInteractiveElement,
33
+ a as isNode
34
+ };
@@ -0,0 +1,34 @@
1
+ var i = Object.defineProperty, s = (t, e, r) => e in t ? i(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, n = (t, e, r) => (s(t, typeof e != "symbol" ? e + "" : e, r), r);
2
+ class d {
3
+ constructor() {
4
+ n(this, "current", this.detect()), n(this, "handoffState", "pending"), n(this, "currentId", 0);
5
+ }
6
+ set(e) {
7
+ this.current !== e && (this.handoffState = "pending", this.currentId = 0, this.current = e);
8
+ }
9
+ reset() {
10
+ this.set(this.detect());
11
+ }
12
+ nextId() {
13
+ return ++this.currentId;
14
+ }
15
+ get isServer() {
16
+ return this.current === "server";
17
+ }
18
+ get isClient() {
19
+ return this.current === "client";
20
+ }
21
+ detect() {
22
+ return typeof window > "u" || typeof document > "u" ? "server" : "client";
23
+ }
24
+ handoff() {
25
+ this.handoffState === "pending" && (this.handoffState = "complete");
26
+ }
27
+ get isHandoffComplete() {
28
+ return this.handoffState === "complete";
29
+ }
30
+ }
31
+ let u = new d();
32
+ export {
33
+ u as env
34
+ };
@@ -0,0 +1,32 @@
1
+ import { isValidElement as i } from "react";
2
+ function n(e = {}, o = null, t = []) {
3
+ for (let [l, r] of Object.entries(e)) f(t, u(o, l), r);
4
+ return t;
5
+ }
6
+ function u(e, o) {
7
+ return e ? e + "[" + o + "]" : o;
8
+ }
9
+ function f(e, o, t) {
10
+ if (Array.isArray(t)) for (let [l, r] of t.entries()) f(e, u(o, l.toString()), r);
11
+ else t instanceof Date ? e.push([o, t.toISOString()]) : typeof t == "boolean" ? e.push([o, t ? "1" : "0"]) : typeof t == "string" ? e.push([o, t]) : typeof t == "number" ? e.push([o, `${t}`]) : t == null ? e.push([o, ""]) : s(t) && !i(t) && n(t, o, e);
12
+ }
13
+ function c(e) {
14
+ var o, t;
15
+ let l = (o = e?.form) != null ? o : e.closest("form");
16
+ if (l) {
17
+ for (let r of l.elements) if (r !== e && (r.tagName === "INPUT" && r.type === "submit" || r.tagName === "BUTTON" && r.type === "submit" || r.nodeName === "INPUT" && r.type === "image")) {
18
+ r.click();
19
+ return;
20
+ }
21
+ (t = l.requestSubmit) == null || t.call(l);
22
+ }
23
+ }
24
+ function s(e) {
25
+ if (Object.prototype.toString.call(e) !== "[object Object]") return !1;
26
+ let o = Object.getPrototypeOf(e);
27
+ return o === null || Object.getPrototypeOf(o) === null;
28
+ }
29
+ export {
30
+ c as attemptSubmit,
31
+ n as objectToFormEntries
32
+ };
@@ -0,0 +1,11 @@
1
+ function o(r, t, ...n) {
2
+ if (r in t) {
3
+ let e = t[r];
4
+ return typeof e == "function" ? e(...n) : e;
5
+ }
6
+ let a = new Error(`Tried to handle "${r}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e) => `"${e}"`).join(", ")}.`);
7
+ throw Error.captureStackTrace && Error.captureStackTrace(a, o), a;
8
+ }
9
+ export {
10
+ o as match
11
+ };
@@ -0,0 +1,8 @@
1
+ function o(t) {
2
+ typeof queueMicrotask == "function" ? queueMicrotask(t) : Promise.resolve().then(t).catch((e) => setTimeout(() => {
3
+ throw e;
4
+ }));
5
+ }
6
+ export {
7
+ o as microTask
8
+ };
@@ -0,0 +1,8 @@
1
+ import { env as u } from "./env.js";
2
+ function r(e) {
3
+ var n;
4
+ return u.isServer ? null : e == null ? document : (n = e?.ownerDocument) != null ? n : document;
5
+ }
6
+ export {
7
+ r as getOwnerDocument
8
+ };
@@ -0,0 +1,126 @@
1
+ import $, { forwardRef as F, useCallback as O, useRef as P, isValidElement as k, cloneElement as E, createElement as A, Fragment as S } from "react";
2
+ import { classNames as w } from "./class-names.js";
3
+ import { match as C } from "./match.js";
4
+ var H = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(H || {}), T = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(T || {});
5
+ function x() {
6
+ let e = D();
7
+ return O((n) => U({ mergeRefs: e, ...n }), [e]);
8
+ }
9
+ function U({ ourProps: e, theirProps: n, slot: t, defaultTag: r, features: l, visible: a = !0, name: s, mergeRefs: u }) {
10
+ u = u ?? W;
11
+ let o = R(n, e);
12
+ if (a) return v(o, t, r, s, u);
13
+ let p = l ?? 0;
14
+ if (p & 2) {
15
+ let { static: i = !1, ...f } = o;
16
+ if (i) return v(f, t, r, s, u);
17
+ }
18
+ if (p & 1) {
19
+ let { unmount: i = !0, ...f } = o;
20
+ return C(i ? 0 : 1, { 0() {
21
+ return null;
22
+ }, 1() {
23
+ return v({ ...f, hidden: !0, style: { display: "none" } }, t, r, s, u);
24
+ } });
25
+ }
26
+ return v(o, t, r, s, u);
27
+ }
28
+ function v(e, n = {}, t, r, l) {
29
+ let { as: a = t, children: s, refName: u = "ref", ...o } = N(e, ["unmount", "static"]), p = e.ref !== void 0 ? { [u]: e.ref } : {}, i = typeof s == "function" ? s(n) : s;
30
+ "className" in o && o.className && typeof o.className == "function" && (o.className = o.className(n)), o["aria-labelledby"] && o["aria-labelledby"] === o.id && (o["aria-labelledby"] = void 0);
31
+ let f = {};
32
+ if (n) {
33
+ let c = !1, d = [];
34
+ for (let [m, y] of Object.entries(n)) typeof y == "boolean" && (c = !0), y === !0 && d.push(m.replace(/([A-Z])/g, (h) => `-${h.toLowerCase()}`));
35
+ if (c) {
36
+ f["data-headlessui-state"] = d.join(" ");
37
+ for (let m of d) f[`data-${m}`] = "";
38
+ }
39
+ }
40
+ if (j(a) && (Object.keys(g(o)).length > 0 || Object.keys(g(f)).length > 0)) if (!k(i) || Array.isArray(i) && i.length > 1 || K(i)) {
41
+ if (Object.keys(g(o)).length > 0) throw new Error(['Passing props on "Fragment"!', "", `The current component <${r} /> is rendering a "Fragment".`, "However we need to passthrough the following props:", Object.keys(g(o)).concat(Object.keys(g(f))).map((c) => ` - ${c}`).join(`
42
+ `), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".', "Render a single element as the child so that we can forward the props onto that element."].map((c) => ` - ${c}`).join(`
43
+ `)].join(`
44
+ `));
45
+ } else {
46
+ let c = i.props, d = c?.className, m = typeof d == "function" ? (...b) => w(d(...b), o.className) : w(d, o.className), y = m ? { className: m } : {}, h = R(i.props, g(N(o, ["ref"])));
47
+ for (let b in f) b in h && delete f[b];
48
+ return E(i, Object.assign({}, h, f, p, { ref: l(I(i), p.ref) }, y));
49
+ }
50
+ return A(a, Object.assign({}, N(o, ["ref"]), !j(a) && p, !j(a) && f), i);
51
+ }
52
+ function D() {
53
+ let e = P([]), n = O((t) => {
54
+ for (let r of e.current) r != null && (typeof r == "function" ? r(t) : r.current = t);
55
+ }, []);
56
+ return (...t) => {
57
+ if (!t.every((r) => r == null)) return e.current = t, n;
58
+ };
59
+ }
60
+ function W(...e) {
61
+ return e.every((n) => n == null) ? void 0 : (n) => {
62
+ for (let t of e) t != null && (typeof t == "function" ? t(n) : t.current = n);
63
+ };
64
+ }
65
+ function R(...e) {
66
+ if (e.length === 0) return {};
67
+ if (e.length === 1) return e[0];
68
+ let n = {}, t = {};
69
+ for (let r of e) for (let l in r) l.startsWith("on") && typeof r[l] == "function" ? (t[l] != null || (t[l] = []), t[l].push(r[l])) : n[l] = r[l];
70
+ if (n.disabled || n["aria-disabled"]) for (let r in t) /^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r) && (t[r] = [(l) => {
71
+ var a;
72
+ return (a = l?.preventDefault) == null ? void 0 : a.call(l);
73
+ }]);
74
+ for (let r in t) Object.assign(n, { [r](l, ...a) {
75
+ let s = t[r];
76
+ for (let u of s) {
77
+ if ((l instanceof Event || l?.nativeEvent instanceof Event) && l.defaultPrevented) return;
78
+ u(l, ...a);
79
+ }
80
+ } });
81
+ return n;
82
+ }
83
+ function L(...e) {
84
+ if (e.length === 0) return {};
85
+ if (e.length === 1) return e[0];
86
+ let n = {}, t = {};
87
+ for (let r of e) for (let l in r) l.startsWith("on") && typeof r[l] == "function" ? (t[l] != null || (t[l] = []), t[l].push(r[l])) : n[l] = r[l];
88
+ for (let r in t) Object.assign(n, { [r](...l) {
89
+ let a = t[r];
90
+ for (let s of a) s?.(...l);
91
+ } });
92
+ return n;
93
+ }
94
+ function M(e) {
95
+ var n;
96
+ return Object.assign(F(e), { displayName: (n = e.displayName) != null ? n : e.name });
97
+ }
98
+ function g(e) {
99
+ let n = Object.assign({}, e);
100
+ for (let t in n) n[t] === void 0 && delete n[t];
101
+ return n;
102
+ }
103
+ function N(e, n = []) {
104
+ let t = Object.assign({}, e);
105
+ for (let r of n) r in t && delete t[r];
106
+ return t;
107
+ }
108
+ function I(e) {
109
+ return $.version.split(".")[0] >= "19" ? e.props.ref : e.ref;
110
+ }
111
+ function j(e) {
112
+ return e === S || e === /* @__PURE__ */ Symbol.for("react.fragment");
113
+ }
114
+ function K(e) {
115
+ return j(e.type);
116
+ }
117
+ export {
118
+ H as RenderFeatures,
119
+ T as RenderStrategy,
120
+ g as compact,
121
+ M as forwardRefWithAs,
122
+ j as isFragment,
123
+ K as isFragmentInstance,
124
+ L as mergeProps,
125
+ x as useRender
126
+ };