@ngrok/mantle 0.80.0 → 0.81.0

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 (172) hide show
  1. package/dist/accordion.d.ts +13 -31
  2. package/dist/accordion.js +1 -1
  3. package/dist/agent.json +5 -1
  4. package/dist/alert-dialog.d.ts +15 -48
  5. package/dist/alert-dialog.js +1 -1
  6. package/dist/alert.d.ts +8 -26
  7. package/dist/alert.js +1 -1
  8. package/dist/{anchor-_2meGDfj.js → anchor-DfeXTpKW.js} +1 -1
  9. package/dist/anchor.js +1 -1
  10. package/dist/area-chart.d.ts +504 -0
  11. package/dist/area-chart.js +1 -0
  12. package/dist/badge.js +1 -1
  13. package/dist/bar-chart.d.ts +491 -0
  14. package/dist/bar-chart.js +1 -0
  15. package/dist/breadcrumb.d.ts +6 -24
  16. package/dist/breadcrumb.js +1 -1
  17. package/dist/button-BAno7KIU.js +1 -0
  18. package/dist/{index-C2jj8U4a.d.ts → button-C-gMbPso.d.ts} +2 -2
  19. package/dist/{icon-button-C1AfGnQx.d.ts → button-C7vAl6lS.d.ts} +16 -3
  20. package/dist/{button-BPMwa2jN.d.ts → button-DARFK2KJ.d.ts} +1 -1
  21. package/dist/{button-5WsvzIQ6.js → button-DjpEKt2X.js} +1 -1
  22. package/dist/button-DvHMWAPl.js +1 -0
  23. package/dist/button.d.ts +5 -5
  24. package/dist/button.js +1 -1
  25. package/dist/calendar.js +1 -1
  26. package/dist/card.d.ts +5 -20
  27. package/dist/card.js +1 -1
  28. package/dist/centered-layout.d.ts +5 -20
  29. package/dist/centered-layout.js +1 -1
  30. package/dist/chart-BROa2gqt.js +2 -0
  31. package/dist/chart-BcOC6Qj0.d.ts +275 -0
  32. package/dist/checkbox-0EoxOyMA.js +1 -0
  33. package/dist/checkbox.d.ts +1 -1
  34. package/dist/checkbox.js +1 -1
  35. package/dist/choice-BHwFSSyv.js +1 -0
  36. package/dist/{choice-Ct0KK8jw.d.ts → choice-BNRQXszu.d.ts} +5 -20
  37. package/dist/choice.d.ts +1 -1
  38. package/dist/choice.js +1 -1
  39. package/dist/code-block.d.ts +14 -44
  40. package/dist/code-block.js +6 -6
  41. package/dist/code-block_highlight-utils.d.ts +1 -1
  42. package/dist/code-block_highlight-utils.js +1 -1
  43. package/dist/combobox.d.ts +9 -33
  44. package/dist/combobox.js +1 -1
  45. package/dist/command.d.ts +3 -9
  46. package/dist/command.js +1 -1
  47. package/dist/data-table.d.ts +6 -12
  48. package/dist/data-table.js +1 -1
  49. package/dist/description-list.d.ts +4 -16
  50. package/dist/description-list.js +1 -1
  51. package/dist/{primitive-CJRIlrLz.d.ts → dialog-BM4wPCft.d.ts} +9 -16
  52. package/dist/dialog-DWZWd5Jt.js +1 -0
  53. package/dist/dialog.d.ts +13 -43
  54. package/dist/dialog.js +1 -1
  55. package/dist/{dropdown-menu-CoyozLzy.d.ts → dropdown-menu-DZg-Cd69.d.ts} +18 -54
  56. package/dist/dropdown-menu-Dw-OtXPm.d.ts +1 -0
  57. package/dist/dropdown-menu-RyDWoKHx.js +1 -0
  58. package/dist/dropdown-menu.d.ts +2 -2
  59. package/dist/dropdown-menu.js +1 -1
  60. package/dist/empty.d.ts +6 -21
  61. package/dist/empty.js +1 -1
  62. package/dist/field-B1wqeZr4.js +1 -0
  63. package/dist/field.d.ts +15 -45
  64. package/dist/field.js +1 -1
  65. package/dist/hooks.js +1 -1
  66. package/dist/hover-card.d.ts +3 -12
  67. package/dist/hover-card.js +1 -1
  68. package/dist/{svg-only-CdI_v82i.d.ts → icon-CX_gj6sW.d.ts} +1 -1
  69. package/dist/{icon-BDqpcZ-n.d.ts → icon-k4E9yNWD.d.ts} +1 -1
  70. package/dist/icon-lZ48P8Nn.js +1 -0
  71. package/dist/icon.d.ts +3 -3
  72. package/dist/icon.js +1 -1
  73. package/dist/icons-DLCs1hLP.js +1 -0
  74. package/dist/icons.d.ts +2 -2
  75. package/dist/icons.js +1 -1
  76. package/dist/input-BnlpQF0c.js +1 -0
  77. package/dist/{input-DV9M6K4v.d.ts → input-BuYDU6CF.d.ts} +1 -1
  78. package/dist/input.d.ts +2 -2
  79. package/dist/input.js +1 -1
  80. package/dist/line-chart.d.ts +490 -0
  81. package/dist/line-chart.js +1 -0
  82. package/dist/{virtual-UrzmaSQm.js → list-51KQvENW.js} +1 -1
  83. package/dist/list.d.ts +5 -20
  84. package/dist/list.js +1 -1
  85. package/dist/llms.txt +5 -1
  86. package/dist/mantle-dark-high-contrast.css +17 -0
  87. package/dist/mantle-dark.css +13 -0
  88. package/dist/mantle-light-high-contrast.css +15 -0
  89. package/dist/mantle.css +29 -0
  90. package/dist/media-object.d.ts +3 -12
  91. package/dist/media-object.js +1 -1
  92. package/dist/multi-select.d.ts +14 -53
  93. package/dist/multi-select.js +1 -1
  94. package/dist/otp-input.d.ts +5 -17
  95. package/dist/otp-input.js +1 -1
  96. package/dist/pagination.d.ts +5 -14
  97. package/dist/pagination.js +1 -1
  98. package/dist/{index-B8mIWKIU.d.ts → popover-CE4OlWkd.d.ts} +1 -4
  99. package/dist/popover-CQ9s7jG5.js +1 -0
  100. package/dist/popover.d.ts +1 -1
  101. package/dist/popover.js +1 -1
  102. package/dist/primitive-trJDqIXJ.js +1 -0
  103. package/dist/progress.d.ts +2 -8
  104. package/dist/progress.js +1 -1
  105. package/dist/qr-code.d.ts +4 -16
  106. package/dist/qr-code.js +1 -1
  107. package/dist/radio-group.d.ts +10 -40
  108. package/dist/radio-group.js +1 -1
  109. package/dist/scatter-plot.d.ts +495 -0
  110. package/dist/scatter-plot.js +1 -0
  111. package/dist/{select-idm1jy7y.d.ts → select-0z7HVS6r.d.ts} +8 -29
  112. package/dist/select-BCHWvmyC.js +1 -0
  113. package/dist/select.d.ts +1 -1
  114. package/dist/select.js +1 -1
  115. package/dist/selectable-list.d.ts +11 -38
  116. package/dist/selectable-list.js +1 -1
  117. package/dist/sheet.d.ts +12 -39
  118. package/dist/sheet.js +1 -1
  119. package/dist/skip-to-main-link.js +1 -1
  120. package/dist/slider.js +1 -1
  121. package/dist/slot.d.ts +1 -1
  122. package/dist/split-button.d.ts +9 -24
  123. package/dist/split-button.js +1 -1
  124. package/dist/switch.d.ts +1 -1
  125. package/dist/switch.js +1 -1
  126. package/dist/{table-DUSvU_Jw.d.ts → table-Bo0vNxIJ.d.ts} +9 -36
  127. package/dist/table-CGxJwtbL.js +1 -0
  128. package/dist/table.d.ts +1 -1
  129. package/dist/table.js +1 -1
  130. package/dist/tabs.d.ts +21 -36
  131. package/dist/tabs.js +1 -1
  132. package/dist/text-area.d.ts +1 -1
  133. package/dist/text-area.js +1 -1
  134. package/dist/theme-C26-Xolp.js +1 -0
  135. package/dist/theme-switcher.d.ts +6 -15
  136. package/dist/theme-switcher.js +1 -1
  137. package/dist/theme.d.ts +1 -1
  138. package/dist/theme.js +1 -1
  139. package/dist/toast.d.ts +5 -17
  140. package/dist/toast.js +1 -1
  141. package/dist/tooltip.d.ts +26 -8
  142. package/dist/tooltip.js +1 -1
  143. package/package.json +7 -1
  144. package/dist/checkbox-Cq17y0-R.js +0 -1
  145. package/dist/choice-Cc8dA5r8.js +0 -1
  146. package/dist/dialog-CQ2C6vkE.js +0 -1
  147. package/dist/dropdown-menu-CSCDdA3K.js +0 -1
  148. package/dist/field-context-BR01g789.js +0 -1
  149. package/dist/icon-CGgMKpJg.js +0 -1
  150. package/dist/icon-button-DiOhreJD.js +0 -1
  151. package/dist/index-CdPXa9h1.d.ts +0 -1
  152. package/dist/input-CVyAVbim.js +0 -1
  153. package/dist/popover-CBMADtjV.js +0 -1
  154. package/dist/primitive-DCPHJsRs.js +0 -1
  155. package/dist/select-SR_9-bxA.js +0 -1
  156. package/dist/table-GDkapNFi.js +0 -1
  157. package/dist/theme-provider-BftkIiZn.js +0 -1
  158. package/dist/theme-wVnzzx2F.js +0 -1
  159. package/dist/toast-DKgMRv4F.js +0 -1
  160. /package/dist/{sizes-BCoI4bhP.d.ts → button-BCoI4bhP.d.ts} +0 -0
  161. /package/dist/{intents-DdSKSj1c.d.ts → button-DdSKSj1c.d.ts} +0 -0
  162. /package/dist/{resolve-pre-rendered-props-B6OlZrSI.d.ts → code-block-B6OlZrSI.d.ts} +0 -0
  163. /package/dist/{resolve-pre-rendered-props-C9uaM9-V.js → code-block-C9uaM9-V.js} +0 -0
  164. /package/dist/{validation-7QeiTFwl.d.ts → field-7QeiTFwl.d.ts} +0 -0
  165. /package/dist/{validation-Bpptk_9t.js → field-Bpptk_9t.js} +0 -0
  166. /package/dist/{types-D1RY5Tcj.d.ts → icon-D1RY5Tcj.d.ts} +0 -0
  167. /package/dist/{svg-only-d-nMCfAI.js → icon-d-nMCfAI.js} +0 -0
  168. /package/dist/{sort-B_DDQcVD.js → icons-B_DDQcVD.js} +0 -0
  169. /package/dist/{traffic-policy-file-CF1lbWtp.js → icons-CF1lbWtp.js} +0 -0
  170. /package/dist/{is-input-CXmS0OFN.js → input-CXmS0OFN.js} +0 -0
  171. /package/dist/{index-BtwKJTLq.d.ts → slot-BtwKJTLq.d.ts} +0 -0
  172. /package/dist/{themes-CYNpplwN.d.ts → theme-CYNpplwN.d.ts} +0 -0
@@ -3,26 +3,19 @@ import * as DialogPrimitive from "@radix-ui/react-dialog";
3
3
  //#region src/components/dialog/primitive.d.ts
4
4
  type DialogPrimitiveContentProps = ComponentProps<typeof DialogPrimitive.Content>;
5
5
  declare function Root(props: ComponentPropsWithoutRef<typeof DialogPrimitive.Root>): import("react").JSX.Element;
6
- declare namespace Root {
7
- var displayName: string;
8
- }
9
6
  declare const Trigger: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
10
7
  declare const Close: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
11
- declare function Overlay(props: ComponentProps<typeof DialogPrimitive.Overlay>): import("react").JSX.Element;
12
- declare namespace Overlay {
13
- var displayName: string;
14
- }
15
- declare function Content({ onEscapeKeyDown, onInteractOutside, onPointerDownOutside, ref, ...props }: DialogPrimitiveContentProps): import("react").JSX.Element;
16
- declare namespace Content {
17
- var displayName: string;
18
- }
8
+ declare const Overlay: (props: ComponentProps<typeof DialogPrimitive.Overlay>) => import("react").JSX.Element;
9
+ declare const Content: ({ onEscapeKeyDown, onInteractOutside, onPointerDownOutside, ref, ...props }: DialogPrimitiveContentProps) => import("react").JSX.Element;
19
10
  declare const Title: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
20
- declare function Description({ asChild, children, ref, ...props }: ComponentPropsWithoutRef<typeof DialogPrimitive.Description> & {
11
+ /**
12
+ * An accessible description for the dialog primitive.
13
+ * This is a low-level primitive used by higher-level dialog components.
14
+ * Renders as a `div` by default, but can be changed to any other element using the `asChild` prop.
15
+ */
16
+ declare const Description: ({ asChild, children, ref, ...props }: ComponentPropsWithoutRef<typeof DialogPrimitive.Description> & {
21
17
  ref?: Ref<HTMLDivElement>;
22
- }): import("react").JSX.Element;
23
- declare namespace Description {
24
- var displayName: string;
25
- }
18
+ }) => import("react").JSX.Element;
26
19
  /**
27
20
  * Type guard to check if the event target is the overlay component
28
21
  */
@@ -0,0 +1 @@
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./button-BAno7KIU.js";import{a as n,c as r,i,n as a,o,r as s,s as c,t as l}from"./primitive-trJDqIXJ.js";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{XIcon as f}from"@phosphor-icons/react/X";const p=o,m=e=>u(r,{"data-slot":`dialog-trigger`,...e}),h=n,g=e=>u(l,{"data-slot":`dialog-close`,...e}),_=({className:t,ref:n,...r})=>u(i,{ref:n,"data-slot":`dialog-overlay`,className:e(`bg-overlay data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:animate-in data-state-open:fade-in-0 fixed inset-0 z-50 backdrop-blur-xs`,t),...r}),v={Root:p,Body:({className:t,...n})=>u(`div`,{"data-slot":`dialog-body`,className:e(`scrollbar scrollbar-gutter-stable text-body flex-1 overflow-y-auto p-6`,t),...n}),Close:g,CloseIconButton:({size:e=`md`,type:n=`button`,label:r=`Close Dialog`,appearance:i=`ghost`,intent:a=`neutral`,...o})=>u(l,{asChild:!0,children:u(t,{appearance:i,"data-slot":`dialog-close-icon-button`,icon:u(f,{}),intent:a,label:r,size:e,type:n,...o})}),Content:({children:t,className:n,preferredWidth:r=`max-w-lg`,ref:i,...o})=>d(h,{children:[u(_,{}),u(`div`,{className:`fixed inset-4 z-50 flex items-center justify-center`,children:u(a,{"data-mantle-modal-content":!0,"data-slot":`dialog-content`,className:e(`flex max-h-full w-full flex-1 flex-col`,`outline-hidden focus-within:outline-hidden`,`border-dialog bg-dialog rounded-xl border shadow-lg transition-transform duration-200`,`data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95`,r,n),ref:i,...o,children:t})})]}),Description:({className:t,ref:n,...r})=>u(s,{ref:n,"data-slot":`dialog-description`,className:e(`text-muted`,t),...r}),Footer:({className:t,...n})=>u(`div`,{"data-slot":`dialog-footer`,className:e(`border-dialog-muted flex shrink-0 justify-end gap-2 border-t px-6 py-4`,t),...n}),Header:({className:t,children:n,...r})=>u(`div`,{"data-slot":`dialog-header`,className:e(`border-dialog-muted text-strong relative flex shrink-0 items-center justify-between gap-2 border-b px-6 py-4`,`has-[.icon-button]:pr-4`,t),...r,children:n}),Overlay:_,Portal:h,Title:({className:t,ref:n,...r})=>u(c,{ref:n,"data-slot":`dialog-title`,className:e(`text-strong truncate text-lg font-medium`,t),...r}),Trigger:m};export{v as t};
package/dist/dialog.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { t as ButtonIntent } from "./intents-DdSKSj1c.js";
2
- import { a as Root, c as isDialogOverlayTarget, i as Overlay$1, n as Content$1, o as Title$1, r as Description$1, s as Trigger$1, t as Close$1 } from "./primitive-CJRIlrLz.js";
3
- import { n as IconButtonAppearance, r as IconButtonProps } from "./icon-button-C1AfGnQx.js";
1
+ import { t as ButtonIntent } from "./button-DdSKSj1c.js";
2
+ import { a as Root, c as isDialogOverlayTarget, i as Overlay$1, n as Content$1, o as Title$1, r as Description$1, s as Trigger$1, t as Close$1 } from "./dialog-BM4wPCft.js";
3
+ import { n as IconButtonProps, r as IconButtonAppearance } from "./button-C7vAl6lS.js";
4
4
  import { ComponentProps } from "react";
5
5
  //#region src/components/dialog/dialog.d.ts
6
6
  /**
@@ -33,10 +33,7 @@ import { ComponentProps } from "react";
33
33
  * </Dialog.Root>
34
34
  * ```
35
35
  */
36
- declare const Trigger: {
37
- (props: ComponentProps<typeof Trigger$1>): import("react").JSX.Element;
38
- displayName: string;
39
- };
36
+ declare const Trigger: (props: ComponentProps<typeof Trigger$1>) => import("react").JSX.Element;
40
37
  /**
41
38
  * A button that closes the dialog when clicked. Wrap an interactive element
42
39
  * with `asChild` to delegate the close behavior to your own button.
@@ -68,10 +65,7 @@ declare const Trigger: {
68
65
  * </Dialog.Root>
69
66
  * ```
70
67
  */
71
- declare const Close: {
72
- (props: ComponentProps<typeof Close$1>): import("react").JSX.Element;
73
- displayName: string;
74
- };
68
+ declare const Close: (props: ComponentProps<typeof Close$1>) => import("react").JSX.Element;
75
69
  /**
76
70
  * The backdrop overlay for the dialog. Sits between the page and the dialog
77
71
  * content and applies a blur and dim effect.
@@ -110,10 +104,7 @@ declare const Close: {
110
104
  * </Dialog.Root>
111
105
  * ```
112
106
  */
113
- declare const Overlay: {
114
- ({ className, ref, ...props }: ComponentProps<typeof Overlay$1>): import("react").JSX.Element;
115
- displayName: string;
116
- };
107
+ declare const Overlay: ({ className, ref, ...props }: ComponentProps<typeof Overlay$1>) => import("react").JSX.Element;
117
108
  type ContentProps = ComponentProps<typeof Content$1> & {
118
109
  /**
119
110
  * The preferred width of the `Dialog.Content` as a tailwind `max-w-` class.
@@ -160,10 +151,7 @@ type ContentProps = ComponentProps<typeof Content$1> & {
160
151
  * </Dialog.Root>
161
152
  * ```
162
153
  */
163
- declare const Content: {
164
- ({ children, className, preferredWidth, ref, ...props }: ContentProps): import("react").JSX.Element;
165
- displayName: string;
166
- };
154
+ declare const Content: ({ children, className, preferredWidth, ref, ...props }: ContentProps) => import("react").JSX.Element;
167
155
  /**
168
156
  * Contains the header content of the dialog, including the title and close button.
169
157
  *
@@ -194,10 +182,7 @@ declare const Content: {
194
182
  * </Dialog.Root>
195
183
  * ```
196
184
  */
197
- declare const Header: {
198
- ({ className, children, ...props }: ComponentProps<"div">): import("react").JSX.Element;
199
- displayName: string;
200
- };
185
+ declare const Header: ({ className, children, ...props }: ComponentProps<"div">) => import("react").JSX.Element;
201
186
  type CloseIconButtonProps = Partial<Omit<IconButtonProps, "appearance" | "icon" | "intent">> & {
202
187
  /**
203
188
  * The visual style of the close icon button. Optional here —
@@ -246,10 +231,7 @@ type CloseIconButtonProps = Partial<Omit<IconButtonProps, "appearance" | "icon"
246
231
  * </Dialog.Root>
247
232
  * ```
248
233
  */
249
- declare const CloseIconButton: {
250
- ({ size, type, label, appearance, intent, ...props }: CloseIconButtonProps): import("react").JSX.Element;
251
- displayName: string;
252
- };
234
+ declare const CloseIconButton: ({ size, type, label, appearance, intent, ...props }: CloseIconButtonProps) => import("react").JSX.Element;
253
235
  /**
254
236
  * Contains the main content of the dialog.
255
237
  *
@@ -280,10 +262,7 @@ declare const CloseIconButton: {
280
262
  * </Dialog.Root>
281
263
  * ```
282
264
  */
283
- declare const Body: {
284
- ({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
285
- displayName: string;
286
- };
265
+ declare const Body: ({ className, ...props }: ComponentProps<"div">) => import("react").JSX.Element;
287
266
  /**
288
267
  * Contains the footer content of the dialog, including action buttons.
289
268
  *
@@ -314,10 +293,7 @@ declare const Body: {
314
293
  * </Dialog.Root>
315
294
  * ```
316
295
  */
317
- declare const Footer: {
318
- ({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
319
- displayName: string;
320
- };
296
+ declare const Footer: ({ className, ...props }: ComponentProps<"div">) => import("react").JSX.Element;
321
297
  /**
322
298
  * An accessible name to be announced when the dialog is opened.
323
299
  *
@@ -348,10 +324,7 @@ declare const Footer: {
348
324
  * </Dialog.Root>
349
325
  * ```
350
326
  */
351
- declare const Title: {
352
- ({ className, ref, ...props }: ComponentProps<typeof Title$1>): import("react").JSX.Element;
353
- displayName: string;
354
- };
327
+ declare const Title: ({ className, ref, ...props }: ComponentProps<typeof Title$1>) => import("react").JSX.Element;
355
328
  /**
356
329
  * An accessible description to be announced when the dialog is opened.
357
330
  * Renders as a `div` by default, but can be changed to any other element using
@@ -384,10 +357,7 @@ declare const Title: {
384
357
  * </Dialog.Root>
385
358
  * ```
386
359
  */
387
- declare const Description: {
388
- ({ className, ref, ...props }: ComponentProps<typeof Description$1>): import("react").JSX.Element;
389
- displayName: string;
390
- };
360
+ declare const Description: ({ className, ref, ...props }: ComponentProps<typeof Description$1>) => import("react").JSX.Element;
391
361
  /**
392
362
  * A window overlaid on either the primary window or another dialog window. Use
393
363
  * Dialog for a focused modal that interrupts the user to gather input or
package/dist/dialog.js CHANGED
@@ -1 +1 @@
1
- import{l as e}from"./primitive-DCPHJsRs.js";import{t}from"./dialog-CQ2C6vkE.js";export{t as Dialog,e as isDialogOverlayTarget};
1
+ import{l as e}from"./primitive-trJDqIXJ.js";import{t}from"./dialog-DWZWd5Jt.js";export{t as Dialog,e as isDialogOverlayTarget};
@@ -22,29 +22,17 @@ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
22
22
  * </DropdownMenu.Root>
23
23
  * ```
24
24
  */
25
- declare const Trigger: {
26
- (props: ComponentProps<typeof DropdownMenuPrimitive.Trigger>): import("react").JSX.Element;
27
- displayName: string;
28
- };
29
- declare const Group: {
30
- ({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Group>): import("react").JSX.Element;
31
- displayName: string;
32
- };
33
- declare const RadioGroup: {
34
- ({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): import("react").JSX.Element;
35
- displayName: string;
36
- };
25
+ declare const Trigger: (props: ComponentProps<typeof DropdownMenuPrimitive.Trigger>) => import("react").JSX.Element;
26
+ declare const Group: ({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Group>) => import("react").JSX.Element;
27
+ declare const RadioGroup: ({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) => import("react").JSX.Element;
37
28
  /**
38
29
  * A trigger for a dropdown menu sub-menu.
39
30
  *
40
31
  * @see https://mantle.ngrok.com/components/overlays/dropdown-menu#dropdownmenusubtrigger
41
32
  */
42
- declare const SubTrigger: {
43
- ({ className, inset, children, ...props }: ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
44
- inset?: boolean;
45
- }): import("react").JSX.Element;
46
- displayName: string;
47
- };
33
+ declare const SubTrigger: ({ className, inset, children, ...props }: ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
34
+ inset?: boolean;
35
+ }) => import("react").JSX.Element;
48
36
  /**
49
37
  * The content container for a dropdown menu sub-menu.
50
38
  *
@@ -54,10 +42,7 @@ declare const SubTrigger: {
54
42
  *
55
43
  * @see https://mantle.ngrok.com/components/overlays/dropdown-menu#dropdownmenusubcontent
56
44
  */
57
- declare const SubContent: {
58
- ({ className, loop, ...props }: ComponentProps<typeof DropdownMenuPrimitive.SubContent>): import("react").JSX.Element;
59
- displayName: string;
60
- };
45
+ declare const SubContent: ({ className, loop, ...props }: ComponentProps<typeof DropdownMenuPrimitive.SubContent>) => import("react").JSX.Element;
61
46
  type DropdownMenuContentProps = ComponentProps<typeof DropdownMenuPrimitive.Content> & WithDataSlot & {
62
47
  /**
63
48
  * Whether the DropdownMenuContent should match the width of the trigger or use the intrinsic content width.
@@ -88,10 +73,7 @@ type DropdownMenuContentProps = ComponentProps<typeof DropdownMenuPrimitive.Cont
88
73
  * </DropdownMenu.Root>
89
74
  * ```
90
75
  */
91
- declare const Content: {
92
- ({ className, "data-slot": dataSlot, onClick, loop, width, ...props }: DropdownMenuContentProps): import("react").JSX.Element;
93
- displayName: string;
94
- };
76
+ declare const Content: ({ className, "data-slot": dataSlot, onClick, loop, width, ...props }: DropdownMenuContentProps) => import("react").JSX.Element;
95
77
  /**
96
78
  * An item in the dropdown menu.
97
79
  *
@@ -112,21 +94,15 @@ declare const Content: {
112
94
  * </DropdownMenu.Root>
113
95
  * ```
114
96
  */
115
- declare const Item: {
116
- ({ className, inset, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Item> & {
117
- inset?: boolean;
118
- }): import("react").JSX.Element;
119
- displayName: string;
120
- };
97
+ declare const Item: ({ className, inset, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Item> & {
98
+ inset?: boolean;
99
+ }) => import("react").JSX.Element;
121
100
  /**
122
101
  * A menu item with a checkbox that can be controlled or uncontrolled.
123
102
  *
124
103
  * @see https://mantle.ngrok.com/components/overlays/dropdown-menu#dropdownmenucheckboxitem
125
104
  */
126
- declare const CheckboxItem: {
127
- ({ className, children, checked, ...props }: ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): import("react").JSX.Element;
128
- displayName: string;
129
- };
105
+ declare const CheckboxItem: ({ className, children, checked, ...props }: ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) => import("react").JSX.Element;
130
106
  type DropdownMenuRadioItemProps = ComponentProps<typeof DropdownMenuPrimitive.RadioItem> & {
131
107
  name?: string;
132
108
  id?: string;
@@ -137,34 +113,22 @@ type DropdownMenuRadioItemProps = ComponentProps<typeof DropdownMenuPrimitive.Ra
137
113
  *
138
114
  * @see https://mantle.ngrok.com/components/overlays/dropdown-menu#dropdownmenuradioitem
139
115
  */
140
- declare const RadioItem: {
141
- ({ className, children, ...props }: DropdownMenuRadioItemProps): import("react").JSX.Element;
142
- displayName: string;
143
- };
116
+ declare const RadioItem: ({ className, children, ...props }: DropdownMenuRadioItemProps) => import("react").JSX.Element;
144
117
  /**
145
118
  * A label for a group of dropdown menu items.
146
119
  *
147
120
  * @see https://mantle.ngrok.com/components/overlays/dropdown-menu#dropdownmenulabel
148
121
  */
149
- declare const Label: {
150
- ({ className, inset, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Label> & {
151
- inset?: boolean;
152
- }): import("react").JSX.Element;
153
- displayName: string;
154
- };
122
+ declare const Label: ({ className, inset, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Label> & {
123
+ inset?: boolean;
124
+ }) => import("react").JSX.Element;
155
125
  /**
156
126
  * A visual separator between dropdown menu items or groups.
157
127
  *
158
128
  * @see https://mantle.ngrok.com/components/overlays/dropdown-menu#dropdownmenuseparator
159
129
  */
160
- declare const DropdownSeparator: {
161
- ({ className, ...props }: ComponentProps<typeof Separator>): import("react").JSX.Element;
162
- displayName: string;
163
- };
164
- declare const Shortcut: {
165
- ({ className, ...props }: ComponentProps<"span">): import("react").JSX.Element;
166
- displayName: string;
167
- };
130
+ declare const DropdownSeparator: ({ className, ...props }: ComponentProps<typeof Separator>) => import("react").JSX.Element;
131
+ declare const Shortcut: ({ className, ...props }: ComponentProps<"span">) => import("react").JSX.Element;
168
132
  /**
169
133
  * A menu of options or actions, triggered by a button.
170
134
  *
@@ -0,0 +1 @@
1
+ import "./dropdown-menu-DZg-Cd69.js";
@@ -0,0 +1 @@
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-lZ48P8Nn.js";import{n}from"./slot-CDk0Bb9z.js";import{n as r}from"./separator-bpE_kooz.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{CheckIcon as o}from"@phosphor-icons/react/Check";import{CaretRightIcon as s}from"@phosphor-icons/react/CaretRight";import*as c from"@radix-ui/react-dropdown-menu";const l=c.Root,u=e=>i(c.Trigger,{"data-slot":`dropdown-menu-trigger`,...e}),d=({className:t,...n})=>i(c.Group,{"data-slot":`dropdown-menu-group`,className:e(`space-y-px`,t),...n}),f=c.Portal,p={Root:l,CheckboxItem:({className:n,children:r,checked:s,...l})=>a(c.CheckboxItem,{"data-slot":`dropdown-menu-checkbox-item`,className:e(`text-strong data-disabled:pointer-events-none data-disabled:opacity-50 relative flex cursor-pointer select-none items-center gap-2 rounded-md py-1.5 pl-2 pr-9 text-sm font-normal outline-hidden`,`data-highlighted:bg-active-menu-item`,`aria-checked:bg-selected-menu-item`,`data-highlighted:aria-checked:bg-active-selected-menu-item!`,`[&>svg]:size-5 [&_svg]:shrink-0`,n),checked:s,...l,children:[i(`span`,{className:`absolute right-2 flex items-center`,children:i(c.ItemIndicator,{children:i(t,{svg:i(o,{weight:`bold`}),className:`size-4 text-accent-600`})})}),r]}),Content:({className:t,"data-slot":r,onClick:a,loop:o=!0,width:s,...l})=>i(f,{children:i(c.Content,{"data-slot":n(r,`dropdown-menu-content`),className:e(`scrollbar`,`text-popover-foreground border-popover bg-popover p-1.25 z-50 min-w-32 overflow-hidden rounded-md border shadow-xl outline-hidden space-y-px font-sans`,`data-side-bottom:slide-in-from-top-2 data-side-left:slide-in-from-right-2 data-side-right:slide-in-from-left-2 data-side-top:slide-in-from-bottom-2 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95`,`my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)-16px)] overflow-auto`,s===`trigger`&&`w-(--radix-dropdown-menu-trigger-width)`,t),loop:o,onClick:e=>{e.stopPropagation(),a?.(e)},...l})}),Group:d,Item:({className:t,inset:n,...r})=>i(c.Item,{"data-slot":`dropdown-menu-item`,className:e(`relative flex cursor-pointer select-none items-center rounded-md px-2 py-1.5 text-strong text-sm font-normal outline-hidden transition-colors`,`data-highlighted:bg-active-menu-item`,`focus:bg-accent focus:text-accent-foreground`,`data-disabled:cursor-default data-disabled:opacity-50`,`[&>svg]:size-5 [&_svg]:shrink-0`,n&&`pl-8`,t),...r}),Label:({className:t,inset:n,...r})=>i(c.Label,{"data-slot":`dropdown-menu-label`,className:e(`px-2 py-1.5 text-sm font-medium`,n&&`pl-8`,t),...r}),RadioGroup:({className:t,...n})=>i(c.RadioGroup,{"data-slot":`dropdown-menu-radio-group`,className:e(`space-y-px`,t),...n}),RadioItem:({className:n,children:r,...s})=>a(c.RadioItem,{"data-slot":`dropdown-menu-radio-item`,className:e(`group/dropdown-menu-radio-item`,`text-strong data-disabled:pointer-events-none data-disabled:opacity-50 relative flex cursor-pointer select-none items-center gap-2 rounded-md py-1.5 px-2 text-sm font-normal outline-none`,`data-highlighted:bg-active-menu-item`,`aria-checked:bg-selected-menu-item aria-checked:pr-9`,`data-highlighted:aria-checked:bg-active-selected-menu-item!`,`[&>svg]:size-5 [&_svg]:shrink-0`,n),...s,children:[i(`span`,{className:`absolute right-2 items-center hidden group-aria-checked/dropdown-menu-radio-item:flex`,children:i(c.ItemIndicator,{children:i(t,{svg:i(o,{weight:`bold`}),className:`size-4 text-accent-600`})})}),r]}),Separator:({className:t,...n})=>i(r,{"data-slot":`dropdown-menu-separator`,className:e(`-mx-1.25 my-1 w-auto`,t),...n}),Shortcut:({className:t,...n})=>i(`span`,{"data-slot":`dropdown-menu-shortcut`,className:e(`ml-auto text-xs tracking-widest opacity-60`,t),...n}),Sub:c.Sub,SubContent:({className:t,loop:n=!0,...r})=>i(f,{children:i(c.SubContent,{"data-slot":`dropdown-menu-sub-content`,className:e(`scrollbar`,`text-popover-foreground border-popover bg-popover p-1.25 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95 data-side-bottom:slide-in-from-top-2 data-side-left:slide-in-from-right-2 data-side-right:slide-in-from-left-2 data-side-top:slide-in-from-bottom-2 z-50 min-w-32 overflow-hidden rounded-md border shadow-xl space-y-px font-sans`,`my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)-16px)] overflow-auto`,t),loop:n,...r})}),SubTrigger:({className:n,inset:r,children:o,...l})=>a(c.SubTrigger,{"data-slot":`dropdown-menu-sub-trigger`,className:e(`focus:bg-accent data-state-open:bg-accent relative flex select-none items-center rounded-md py-1.5 pl-2 pr-9 text-sm outline-hidden`,`data-highlighted:bg-active-menu-item data-state-open:bg-active-menu-item`,`[&>svg]:size-5 [&_svg]:shrink-0`,r&&`pl-8`,n),...l,children:[o,i(`span`,{className:`absolute right-2 flex items-center`,children:i(t,{svg:i(s,{weight:`bold`}),className:`size-4`})})]}),Trigger:u};export{p as t};
@@ -1,3 +1,3 @@
1
- import { t as DropdownMenu } from "./dropdown-menu-CoyozLzy.js";
2
- import "./index-CdPXa9h1.js";
1
+ import { t as DropdownMenu } from "./dropdown-menu-DZg-Cd69.js";
2
+ import "./dropdown-menu-Dw-OtXPm.js";
3
3
  export { DropdownMenu };
@@ -1 +1 @@
1
- import{t as e}from"./dropdown-menu-CSCDdA3K.js";export{e as DropdownMenu};
1
+ import{t as e}from"./dropdown-menu-RyDWoKHx.js";export{e as DropdownMenu};
package/dist/empty.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
- import { t as SvgAttributes } from "./types-D1RY5Tcj.js";
2
+ import { t as SvgAttributes } from "./icon-D1RY5Tcj.js";
3
3
  import { ComponentProps, HTMLAttributes, ReactNode } from "react";
4
4
  //#region src/components/empty/empty.d.ts
5
5
  /**
@@ -20,10 +20,7 @@ import { ComponentProps, HTMLAttributes, ReactNode } from "react";
20
20
  * </Empty.Root>
21
21
  * ```
22
22
  */
23
- declare const Root: {
24
- ({ asChild, children, className, ...props }: ComponentProps<"div"> & WithAsChild): import("react").JSX.Element;
25
- displayName: string;
26
- };
23
+ declare const Root: ({ asChild, children, className, ...props }: ComponentProps<"div"> & WithAsChild) => import("react").JSX.Element;
27
24
  type EmptyIconProps = Omit<SvgAttributes, "children"> & {
28
25
  /**
29
26
  * A single SVG icon element.
@@ -48,10 +45,7 @@ type EmptyIconProps = Omit<SvgAttributes, "children"> & {
48
45
  * </Empty.Root>
49
46
  * ```
50
47
  */
51
- declare const Icon: {
52
- ({ className, svg, ...props }: EmptyIconProps): import("react").JSX.Element;
53
- displayName: string;
54
- };
48
+ declare const Icon: ({ className, svg, ...props }: EmptyIconProps) => import("react").JSX.Element;
55
49
  /**
56
50
  * The heading text for the empty state. Renders as an `h3` by default. Use the
57
51
  * `asChild` prop to render as a different heading level (e.g. `h1`, `h2`).
@@ -74,10 +68,7 @@ declare const Icon: {
74
68
  * </Empty.Title>
75
69
  * ```
76
70
  */
77
- declare const Title: {
78
- ({ asChild, children, className, ...props }: HTMLAttributes<HTMLHeadingElement> & WithAsChild): import("react").JSX.Element;
79
- displayName: string;
80
- };
71
+ declare const Title: ({ asChild, children, className, ...props }: HTMLAttributes<HTMLHeadingElement> & WithAsChild) => import("react").JSX.Element;
81
72
  /**
82
73
  * Supporting descriptive text below the title. Renders as a `div` with
83
74
  * `space-y-4` so multiple paragraphs can be placed inside. Use the `asChild`
@@ -102,10 +93,7 @@ declare const Title: {
102
93
  * </Empty.Description>
103
94
  * ```
104
95
  */
105
- declare const Description: {
106
- ({ asChild, children, className, ...props }: ComponentProps<"div"> & WithAsChild): import("react").JSX.Element;
107
- displayName: string;
108
- };
96
+ declare const Description: ({ asChild, children, className, ...props }: ComponentProps<"div"> & WithAsChild) => import("react").JSX.Element;
109
97
  /**
110
98
  * A container for action buttons or links in the empty state.
111
99
  *
@@ -124,10 +112,7 @@ declare const Description: {
124
112
  * </Empty.Root>
125
113
  * ```
126
114
  */
127
- declare const Actions: {
128
- ({ asChild, children, className, ...props }: ComponentProps<"div"> & WithAsChild): import("react").JSX.Element;
129
- displayName: string;
130
- };
115
+ declare const Actions: ({ asChild, children, className, ...props }: ComponentProps<"div"> & WithAsChild) => import("react").JSX.Element;
131
116
  /**
132
117
  * Compound component for rendering empty states. Use with `Empty.Root`,
133
118
  * `Empty.Icon`, `Empty.Title`, `Empty.Description`, and `Empty.Actions`.
package/dist/empty.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./svg-only-d-nMCfAI.js";import{t as n}from"./slot-CDk0Bb9z.js";import{jsx as r}from"react/jsx-runtime";const i=({asChild:t,children:i,className:a,...o})=>r(t?n:`div`,{"data-slot":`empty`,className:e(`mx-auto flex max-w-lg flex-col items-center p-6 text-center`,a),...o,children:i});i.displayName=`Empty`;const a=({className:n,svg:i,...a})=>r(t,{"data-slot":`empty-icon`,className:e(`mb-1 size-10 text-neutral-400`,n),svg:i,...a});a.displayName=`EmptyIcon`;const o=({asChild:t,children:i,className:a,...o})=>r(t?n:`h3`,{"data-slot":`empty-title`,className:e(`text-strong text-sm font-medium font-sans`,a),...o,children:i});o.displayName=`EmptyTitle`;const s=({asChild:t,children:i,className:a,...o})=>r(t?n:`div`,{"data-slot":`empty-description`,className:e(`text-muted space-y-4 text-sm font-sans`,a),...o,children:i});s.displayName=`EmptyDescription`;const c=({asChild:t,children:i,className:a,...o})=>r(t?n:`div`,{"data-slot":`empty-actions`,className:e(`mt-4 flex items-center gap-2`,a),...o,children:i});c.displayName=`EmptyActions`;const l={Root:i,Icon:a,Title:o,Description:s,Actions:c};export{l as Empty};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-d-nMCfAI.js";import{t as n}from"./slot-CDk0Bb9z.js";import{jsx as r}from"react/jsx-runtime";const i={Root:({asChild:t,children:i,className:a,...o})=>r(t?n:`div`,{"data-slot":`empty`,className:e(`mx-auto flex max-w-lg flex-col items-center p-6 text-center`,a),...o,children:i}),Icon:({className:n,svg:i,...a})=>r(t,{"data-slot":`empty-icon`,className:e(`mb-1 size-10 text-neutral-400`,n),svg:i,...a}),Title:({asChild:t,children:i,className:a,...o})=>r(t?n:`h3`,{"data-slot":`empty-title`,className:e(`text-strong text-sm font-medium font-sans`,a),...o,children:i}),Description:({asChild:t,children:i,className:a,...o})=>r(t?n:`div`,{"data-slot":`empty-description`,className:e(`text-muted space-y-4 text-sm font-sans`,a),...o,children:i}),Actions:({asChild:t,children:i,className:a,...o})=>r(t?n:`div`,{"data-slot":`empty-actions`,className:e(`mt-4 flex items-center gap-2`,a),...o,children:i})};export{i as Empty};
@@ -0,0 +1 @@
1
+ import{r as e}from"./field-Bpptk_9t.js";import{createContext as t}from"react";const n=t(null),r=t(null),i=({context:t})=>{if(!t)return{ariaProps:{},validation:void 0};let n=e({defaultAriaInvalid:!1,validation:t.validation});return{ariaProps:{"aria-describedby":`${t.descriptionId} ${t.errorId}`,"aria-errormessage":n.isInvalid?t.errorId:void 0,"aria-invalid":n.ariaInvalid,id:t.controlId,name:t.name},validation:n.validation}};export{n,i as r,r as t};
package/dist/field.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
- import { t as ButtonIntent } from "./intents-DdSKSj1c.js";
3
- import { n as IconButtonAppearance, r as IconButtonProps } from "./icon-button-C1AfGnQx.js";
4
- import { a as ValidationState, c as parseValidation, i as ValidationProp, l as resolveValidation, n as ParsedValidation, o as WithValidation, r as Validation, s as isAriaInvalid, t as AriaInvalid } from "./validation-7QeiTFwl.js";
2
+ import { t as ButtonIntent } from "./button-DdSKSj1c.js";
3
+ import { n as IconButtonProps, r as IconButtonAppearance } from "./button-C7vAl6lS.js";
4
+ import { a as ValidationState, c as parseValidation, i as ValidationProp, l as resolveValidation, n as ParsedValidation, o as WithValidation, r as Validation, s as isAriaInvalid, t as AriaInvalid } from "./field-7QeiTFwl.js";
5
5
  import { t as Label } from "./label-C6YH9skg.js";
6
- import { t as Popover } from "./index-B8mIWKIU.js";
7
- import { t as Slot } from "./index-BtwKJTLq.js";
6
+ import { t as Popover } from "./popover-CE4OlWkd.js";
7
+ import { t as Slot } from "./slot-BtwKJTLq.js";
8
8
  import { ComponentProps, ReactElement, ReactNode } from "react";
9
9
  //#region src/components/field/field-context.d.ts
10
10
  /**
@@ -96,10 +96,7 @@ declare const FieldSet: ({ className, ref, ...props }: ComponentProps<"fieldset"
96
96
  * </Field.Set>
97
97
  * ```
98
98
  */
99
- declare const Legend: {
100
- ({ className, ref, ...props }: ComponentProps<"legend">): import("react").JSX.Element;
101
- displayName: string;
102
- };
99
+ declare const Legend: ({ className, ref, ...props }: ComponentProps<"legend">) => import("react").JSX.Element;
103
100
  /**
104
101
  * Caption for a `Field.Item`. Renders the Mantle `Label` with the same
105
102
  * `htmlFor`, click-to-focus, disabled, and typography behavior — but inside a
@@ -170,10 +167,7 @@ declare const FieldLabel: ({ htmlFor, ref, ...props }: ComponentProps<typeof Lab
170
167
  * </Field.Item>
171
168
  * ```
172
169
  */
173
- declare const LabelText: {
174
- ({ asChild, className, ref, ...props }: ComponentProps<"p"> & WithAsChild): import("react").JSX.Element;
175
- displayName: string;
176
- };
170
+ declare const LabelText: ({ asChild, className, ref, ...props }: ComponentProps<"p"> & WithAsChild) => import("react").JSX.Element;
177
171
  /**
178
172
  * Horizontal layout container for the label area of a field. Aligns a
179
173
  * `<Field.Label>` (which may contain `Field.Optional`) with adjacent affordances
@@ -212,10 +206,7 @@ declare const LabelText: {
212
206
  * </Field.Group>
213
207
  * ```
214
208
  */
215
- declare const LabelRow: {
216
- ({ asChild, className, ref, ...props }: ComponentProps<"div"> & WithAsChild): import("react").JSX.Element;
217
- displayName: string;
218
- };
209
+ declare const LabelRow: ({ asChild, className, ref, ...props }: ComponentProps<"div"> & WithAsChild) => import("react").JSX.Element;
219
210
  /**
220
211
  * Props for the default help popover trigger. A contextual label is required
221
212
  * so repeated help affordances do not all share the same accessible name.
@@ -280,10 +271,7 @@ type FieldHelpTriggerProps = Partial<Omit<IconButtonProps, "appearance" | "icon"
280
271
  * </Field.Group>
281
272
  * ```
282
273
  */
283
- declare const HelpTrigger: {
284
- ({ appearance, className, icon, intent, label, ref, size, type, ...props }: FieldHelpTriggerProps): import("react").JSX.Element;
285
- displayName: string;
286
- };
274
+ declare const HelpTrigger: ({ appearance, className, icon, intent, label, ref, size, type, ...props }: FieldHelpTriggerProps) => import("react").JSX.Element;
287
275
  /**
288
276
  * The popover body for a `Field.Help`. Wraps `Popover.Content` so all
289
277
  * positioning / sizing options (`side`, `align`, `preferredWidth`, etc.)
@@ -315,10 +303,7 @@ declare const HelpTrigger: {
315
303
  * </Field.Group>
316
304
  * ```
317
305
  */
318
- declare const HelpContent: {
319
- ({ ref, ...props }: ComponentProps<typeof Popover.Content>): import("react").JSX.Element;
320
- displayName: string;
321
- };
306
+ declare const HelpContent: ({ ref, ...props }: ComponentProps<typeof Popover.Content>) => import("react").JSX.Element;
322
307
  /**
323
308
  * Inline "(Optional)" suffix to mark a field as optional. Defaults to the
324
309
  * literal string `(Optional)` so the common case is `<Field.Optional />` with
@@ -354,10 +339,7 @@ declare const HelpContent: {
354
339
  * </Field.Group>
355
340
  * ```
356
341
  */
357
- declare const Optional: {
358
- ({ asChild, children, className, ref, ...props }: ComponentProps<"span"> & WithAsChild): import("react").JSX.Element;
359
- displayName: string;
360
- };
342
+ declare const Optional: ({ asChild, children, className, ref, ...props }: ComponentProps<"span"> & WithAsChild) => import("react").JSX.Element;
361
343
  /**
362
344
  * Layout container that stacks multiple `Field.Item`s vertically with
363
345
  * `gap-4` between them. This is the default way to compose multiple fields
@@ -389,10 +371,7 @@ declare const Optional: {
389
371
  * </Field.Group>
390
372
  * ```
391
373
  */
392
- declare const Group: {
393
- ({ asChild, className, ref, ...props }: ComponentProps<"div"> & WithAsChild): import("react").JSX.Element;
394
- displayName: string;
395
- };
374
+ declare const Group: ({ asChild, className, ref, ...props }: ComponentProps<"div"> & WithAsChild) => import("react").JSX.Element;
396
375
  /**
397
376
  * A single form field — `Label`, a control (`Input`, `Select`, `Checkbox`,
398
377
  * etc.), and any `Field.Description`, `Field.Errors`, or `Field.ErrorList` siblings stacked
@@ -445,10 +424,7 @@ type FieldItemProps = ComponentProps<"div"> & WithAsChild & WithValidation & {
445
424
  */
446
425
  name: string;
447
426
  };
448
- declare const Item: {
449
- ({ asChild, children, className, name, ref, validation: validationProp, ...props }: FieldItemProps): import("react").JSX.Element;
450
- displayName: string;
451
- };
427
+ declare const Item: ({ asChild, children, className, name, ref, validation: validationProp, ...props }: FieldItemProps) => import("react").JSX.Element;
452
428
  type FieldControlSlotProps = Omit<ComponentProps<typeof Slot>, "aria-describedby" | "aria-errormessage" | "aria-invalid" | "children">;
453
429
  /**
454
430
  * Element-child form of `Field.Control`. Renders via `Slot`, so it accepts
@@ -550,10 +526,7 @@ type FieldControlProps = FieldControlElementProps | FieldControlRenderProps;
550
526
  * </Field.Group>
551
527
  * ```
552
528
  */
553
- declare const Control: {
554
- ({ children, ref, ...props }: FieldControlProps): import("react").JSX.Element;
555
- displayName: string;
556
- };
529
+ declare const Control: ({ children, ref, ...props }: FieldControlProps) => import("react").JSX.Element;
557
530
  /**
558
531
  * Helper / hint text. Renders a `<p>` in the muted body color so it reads
559
532
  * as secondary to the bolder content above it. Use inside `Field.Item`, below
@@ -593,10 +566,7 @@ declare const Control: {
593
566
  * </Field.Group>
594
567
  * ```
595
568
  */
596
- declare const Description: {
597
- ({ asChild, className, ref, ...props }: Omit<ComponentProps<"p">, "id"> & WithAsChild): import("react").JSX.Element;
598
- displayName: string;
599
- };
569
+ declare const Description: ({ asChild, className, ref, ...props }: Omit<ComponentProps<"p">, "id"> & WithAsChild) => import("react").JSX.Element;
600
570
  /**
601
571
  * A single error message list item for a field. Renders an `<li>` in
602
572
  * `text-danger-600` so it stands out from a sibling `Field.Description`.
package/dist/field.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{t}from"./cx-IiQEAKf5.js";import{t as n}from"./slot-CDk0Bb9z.js";import{t as r}from"./icon-button-DiOhreJD.js";import{i,n as a,r as o,t as s}from"./validation-Bpptk_9t.js";import{n as c,r as l,t as u}from"./field-context-BR01g789.js";import{t as d}from"./label-D-D11mlp.js";import{t as f}from"./popover-CBMADtjV.js";import{Children as p,Fragment as m,cloneElement as h,isValidElement as g,useCallback as _,useContext as v,useId as y,useMemo as b,useState as x}from"react";import S from"tiny-invariant";import{jsx as C}from"react/jsx-runtime";import{QuestionIcon as w}from"@phosphor-icons/react/Question";const T=e=>{let t=[],n=new Set;for(let r of e??[]){if(typeof r!=`string`)continue;let e=r.trim();e.length===0||n.has(e)||(n.add(e),t.push(e))}return t},E=e=>!(e==null||typeof e==`boolean`||typeof e==`string`&&e.trim().length===0),D=({children:e,errorItemType:t})=>{let n=!1;return p.forEach(e,e=>{if(!(n||e==null||typeof e==`boolean`)){if(typeof e==`string`){e.trim().length>0&&(n=!0);return}if(!g(e)){n=!0;return}if(e.type===t){n=E(e.props.children);return}if(e.type===m){n=D({children:e.props.children,errorItemType:t});return}n=!0}}),n},O=({className:e,ref:n,...r})=>C(`fieldset`,{ref:n,"data-slot":`field-set`,className:t(`flex w-full min-w-0 flex-col gap-4 border-0 p-0`,e),...r}),k=({className:e,ref:n,...r})=>C(`legend`,{ref:n,"data-slot":`field-legend`,className:t(`text-strong mb-1.5 text-sm font-medium font-sans`,e),...r});k.displayName=`FieldLegend`;const A=({htmlFor:e,ref:t,...n})=>{let r=v(c);return C(d,{ref:t,htmlFor:e??r?.controlId,...n})},j=({asChild:e,className:r,ref:i,...a})=>C(e?n:`p`,{ref:i,"data-slot":`field-label-text`,className:t(`text-strong text-sm font-medium font-sans`,r),...a});j.displayName=`FieldLabelText`;const M=({asChild:e,className:r,ref:i,...a})=>C(e?n:`div`,{ref:i,"data-slot":`field-label-row`,className:t(`flex items-center gap-1`,r),...a});M.displayName=`FieldLabelRow`;const N=f.Root,P=C(w,{}),F=({appearance:e=`ghost`,className:n,icon:i=P,intent:a=`neutral`,label:o,ref:s,size:c=`xs`,type:l=`button`,...u})=>C(f.Trigger,{asChild:!0,children:C(r,{ref:s,appearance:e,className:t(`text-body -my-0.5`,n),icon:i,intent:a,label:o,size:c,type:l,...u})});F.displayName=`FieldHelpTrigger`;const I=({ref:e,...t})=>C(f.Content,{ref:e,"data-slot":`field-help-content`,...t});I.displayName=`FieldHelpContent`;const L=({asChild:e,children:r,className:i,ref:a,...o})=>C(e?n:`span`,{ref:a,"data-slot":`field-optional`,className:t(`text-muted text-sm font-normal font-sans`,i),...o,children:r??`(Optional)`});L.displayName=`FieldOptional`;const R=({asChild:e,className:r,ref:i,...a})=>C(e?n:`div`,{ref:i,"data-slot":`field-group`,className:t(`flex w-full flex-col gap-4`,r),...a});R.displayName=`FieldGroup`;const z=({asChild:e,children:r,className:a,name:o,ref:l,validation:u,...d})=>{let f=e?n:`div`,p=y(),m=y(),h=y(),[g,v]=x(!1),S=i(u??(g?`error`:void 0)),w=_(()=>(v(!0),()=>{v(!1)}),[]),T=b(()=>({controlId:p,descriptionId:m,errorId:h,hasErrors:g,name:o,registerError:w,validation:S}),[p,m,h,g,o,w,S]);return C(c.Provider,{value:T,children:C(s,{validation:S,children:C(f,{ref:l,"data-slot":`field-item`,"data-validation":S,className:t(`flex w-full flex-col gap-1.5`,a),...d,children:r})})})};z.displayName=`FieldItem`;const B=({children:e,ref:t,...r})=>{let i=v(c),a=l({context:i});return typeof e==`function`?C(s,{validation:a.validation,children:C(u.Provider,{value:i?a.ariaProps:null,children:e(a.ariaProps)})}):(S(g(e),`Field.Control expects a single React element child (or a render-prop function). Got a non-element value (string, array, fragment, null, or undefined). Wrap the control in a single element, or use the function child form: <Field.Control>{(props) => <YourControl {...props} />}</Field.Control>.`),C(s,{validation:a.validation,children:C(u.Provider,{value:i?a.ariaProps:null,children:C(n,{ref:t,...r,children:h(e,a.ariaProps)})})}))};B.displayName=`FieldControl`;const V=({asChild:e,className:r,ref:i,...a})=>C(e?n:`p`,{ref:i,"data-slot":`field-description`,id:v(c)?.descriptionId,className:t(`text-body text-sm leading-4`,`[:where([data-slot=field-error-list]+&)]:-mt-1.5`,r),...a});V.displayName=`FieldDescription`;const H=({children:e,className:n,ref:r,...i})=>E(e)?C(`li`,{ref:r,"data-slot":`field-error`,className:t(`text-danger-600 text-sm leading-4`,n),...i,children:e}):null,U=({messages:e,ref:t,...n})=>C(W,{ref:t,...n,children:T(e).map(e=>C(H,{children:e},e))}),W=({asChild:r,children:i,className:a,ref:o,...s})=>{let l=D({children:i,errorItemType:H}),u=v(c),d=u?.registerError;return e(()=>{if(!(!l||d==null))return d()},[l,d]),l?C(r?n:`ul`,{ref:o,"data-slot":`field-error-list`,id:u?.errorId,role:`list`,className:t(`m-0 flex w-full flex-col list-none p-0`,a),...s,children:i}):null},G={Item:z,Control:B,Group:R,Set:O,Legend:k,Label:A,LabelText:j,LabelRow:M,Help:N,HelpTrigger:F,HelpContent:I,Optional:L,Description:V,Errors:U,ErrorList:W,ErrorItem:H},K=e=>T(e?.map(e=>typeof e==`string`||!e?e:e.message));export{G as Field,a as isAriaInvalid,o as parseValidation,i as resolveValidation,K as toErrorMessages};
1
+ import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{t}from"./cx-IiQEAKf5.js";import{t as n}from"./slot-CDk0Bb9z.js";import{t as r}from"./button-BAno7KIU.js";import{i,n as a,r as o,t as s}from"./field-Bpptk_9t.js";import{n as c,r as l,t as u}from"./field-B1wqeZr4.js";import{t as d}from"./label-D-D11mlp.js";import{t as f}from"./popover-CQ9s7jG5.js";import{Children as p,Fragment as m,cloneElement as h,isValidElement as g,useCallback as _,useContext as v,useId as y,useMemo as b,useState as x}from"react";import S from"tiny-invariant";import{jsx as C}from"react/jsx-runtime";import{QuestionIcon as w}from"@phosphor-icons/react/Question";const T=e=>{let t=[],n=new Set;for(let r of e??[]){if(typeof r!=`string`)continue;let e=r.trim();e.length===0||n.has(e)||(n.add(e),t.push(e))}return t},E=e=>!(e==null||typeof e==`boolean`||typeof e==`string`&&e.trim().length===0),D=({children:e,errorItemType:t})=>{let n=!1;return p.forEach(e,e=>{if(!(n||e==null||typeof e==`boolean`)){if(typeof e==`string`){e.trim().length>0&&(n=!0);return}if(!g(e)){n=!0;return}if(e.type===t){n=E(e.props.children);return}if(e.type===m){n=D({children:e.props.children,errorItemType:t});return}n=!0}}),n},O=({className:e,ref:n,...r})=>C(`fieldset`,{ref:n,"data-slot":`field-set`,className:t(`flex w-full min-w-0 flex-col gap-4 border-0 p-0`,e),...r}),k=({className:e,ref:n,...r})=>C(`legend`,{ref:n,"data-slot":`field-legend`,className:t(`text-strong mb-1.5 text-sm font-medium font-sans`,e),...r}),A=({htmlFor:e,ref:t,...n})=>{let r=v(c);return C(d,{ref:t,htmlFor:e??r?.controlId,...n})},j=({asChild:e,className:r,ref:i,...a})=>C(e?n:`p`,{ref:i,"data-slot":`field-label-text`,className:t(`text-strong text-sm font-medium font-sans`,r),...a}),M=({asChild:e,className:r,ref:i,...a})=>C(e?n:`div`,{ref:i,"data-slot":`field-label-row`,className:t(`flex items-center gap-1`,r),...a}),N=f.Root,P=C(w,{}),F=({appearance:e=`ghost`,className:n,icon:i=P,intent:a=`neutral`,label:o,ref:s,size:c=`xs`,type:l=`button`,...u})=>C(f.Trigger,{asChild:!0,children:C(r,{ref:s,appearance:e,className:t(`text-body -my-0.5`,n),icon:i,intent:a,label:o,size:c,type:l,...u})}),I=({ref:e,...t})=>C(f.Content,{ref:e,"data-slot":`field-help-content`,...t}),L=({asChild:e,children:r,className:i,ref:a,...o})=>C(e?n:`span`,{ref:a,"data-slot":`field-optional`,className:t(`text-muted text-sm font-normal font-sans`,i),...o,children:r??`(Optional)`}),R=({asChild:e,className:r,ref:i,...a})=>C(e?n:`div`,{ref:i,"data-slot":`field-group`,className:t(`flex w-full flex-col gap-4`,r),...a}),z=({asChild:e,children:r,className:a,name:o,ref:l,validation:u,...d})=>{let f=e?n:`div`,p=y(),m=y(),h=y(),[g,v]=x(!1),S=i(u??(g?`error`:void 0)),w=_(()=>(v(!0),()=>{v(!1)}),[]),T=b(()=>({controlId:p,descriptionId:m,errorId:h,hasErrors:g,name:o,registerError:w,validation:S}),[p,m,h,g,o,w,S]);return C(c.Provider,{value:T,children:C(s,{validation:S,children:C(f,{ref:l,"data-slot":`field-item`,"data-validation":S,className:t(`flex w-full flex-col gap-1.5`,a),...d,children:r})})})},B=({children:e,ref:t,...r})=>{let i=v(c),a=l({context:i});return typeof e==`function`?C(s,{validation:a.validation,children:C(u.Provider,{value:i?a.ariaProps:null,children:e(a.ariaProps)})}):(S(g(e),`Field.Control expects a single React element child (or a render-prop function). Got a non-element value (string, array, fragment, null, or undefined). Wrap the control in a single element, or use the function child form: <Field.Control>{(props) => <YourControl {...props} />}</Field.Control>.`),C(s,{validation:a.validation,children:C(u.Provider,{value:i?a.ariaProps:null,children:C(n,{ref:t,...r,children:h(e,a.ariaProps)})})}))},V=({asChild:e,className:r,ref:i,...a})=>C(e?n:`p`,{ref:i,"data-slot":`field-description`,id:v(c)?.descriptionId,className:t(`text-body text-sm leading-4`,`[:where([data-slot=field-error-list]+&)]:-mt-1.5`,r),...a}),H=({children:e,className:n,ref:r,...i})=>E(e)?C(`li`,{ref:r,"data-slot":`field-error`,className:t(`text-danger-600 text-sm leading-4`,n),...i,children:e}):null,U=({messages:e,ref:t,...n})=>C(W,{ref:t,...n,children:T(e).map(e=>C(H,{children:e},e))}),W=({asChild:r,children:i,className:a,ref:o,...s})=>{let l=D({children:i,errorItemType:H}),u=v(c),d=u?.registerError;return e(()=>{if(!(!l||d==null))return d()},[l,d]),l?C(r?n:`ul`,{ref:o,"data-slot":`field-error-list`,id:u?.errorId,role:`list`,className:t(`m-0 flex w-full flex-col list-none p-0`,a),...s,children:i}):null},G={Item:z,Control:B,Group:R,Set:O,Legend:k,Label:A,LabelText:j,LabelRow:M,Help:N,HelpTrigger:F,HelpContent:I,Optional:L,Description:V,Errors:U,ErrorList:W,ErrorItem:H},K=e=>T(e?.map(e=>typeof e==`string`||!e?e:e.message));export{G as Field,a as isAriaInvalid,o as parseValidation,i as resolveValidation,K as toErrorMessages};
package/dist/hooks.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-BdBMM9ga.js";import{t as n}from"./use-matches-media-query-CMSxHR9n.js";import{r}from"./browser-only-CPH56Xw_.js";import{t as i}from"./use-copy-to-clipboard-DqQ0_N3E.js";import{n as a,t as o}from"./use-prefers-reduced-motion-CagaNRgm.js";import{t as s}from"./in-view-C2DpZ6s0.js";import{useCallback as c,useEffect as l,useMemo as u,useReducer as d,useRef as f,useState as p,useSyncExternalStore as m}from"react";const h=[`2xl`,`xl`,`lg`,`md`,`sm`,`xs`,`2xs`],g=[`default`,...h];function _(){return m(j,M,()=>`default`)}function v(e){return m(P(e),I(e),()=>!1)}const y={"2xl":`(min-width: 96rem)`,xl:`(min-width: 80rem)`,lg:`(min-width: 64rem)`,md:`(min-width: 48rem)`,sm:`(min-width: 40rem)`,xs:`(min-width: 30rem)`,"2xs":`(min-width: 22.5rem)`},b={"2xl":`(max-width: 95.99rem)`,xl:`(max-width: 79.99rem)`,lg:`(max-width: 63.99rem)`,md:`(max-width: 47.99rem)`,sm:`(max-width: 39.99rem)`,xs:`(max-width: 29.99rem)`,"2xs":`(max-width: 22.49rem)`};let x=null,S=null;function C(){return x||={"2xl":window.matchMedia(y[`2xl`]),xl:window.matchMedia(y.xl),lg:window.matchMedia(y.lg),md:window.matchMedia(y.md),sm:window.matchMedia(y.sm),xs:window.matchMedia(y.xs),"2xs":window.matchMedia(y[`2xs`])},x}function w(e){return S||={"2xl":window.matchMedia(b[`2xl`]),xl:window.matchMedia(b.xl),lg:window.matchMedia(b.lg),md:window.matchMedia(b.md),sm:window.matchMedia(b.sm),xs:window.matchMedia(b.xs),"2xs":window.matchMedia(b[`2xs`])},S[e]}let T=`default`;const E=new Set;let D=!1;function O(){let e=C();for(let t of h)if(e[t].matches)return t;return`default`}let k=!1;function A(){k||(k=!0,requestAnimationFrame(()=>{k=!1;let e=O();if(e!==T){T=e;for(let e of E)e()}}))}function j(e){if(E.add(e),!D){D=!0;let e=C();T=O();for(let t of Object.values(e))t.addEventListener(`change`,A)}return e(),()=>{if(E.delete(e),E.size===0&&D){D=!1;let e=C();for(let t of Object.values(e))t.removeEventListener(`change`,A)}}}function M(){return T}const N=new Map;function P(e){let t=N.get(e);return t||(t=t=>{let n=w(e),r=!1,i=()=>{r||(r=!0,requestAnimationFrame(()=>{r=!1,t()}))};return n.addEventListener(`change`,i),()=>{n.removeEventListener(`change`,i)}},N.set(e,t),t)}const F=new Map;function I(e){let t=F.get(e);return t||(t=()=>w(e).matches,F.set(e,t),t)}function L(e){let t=f(e);return l(()=>{t.current=e}),u(()=>((...e)=>t.current?.(...e)),[])}function R(e,t){let[n,r]=p(e);return l(()=>{let n=window.setTimeout(()=>{r(e)},t.waitMs);return()=>{window.clearTimeout(n)}},[e,t.waitMs]),n}function z(e,t){let n=L(e),r=f(0);return l(()=>()=>window.clearTimeout(r.current),[]),c((...e)=>{window.clearTimeout(r.current),r.current=window.setTimeout(()=>n(...e),t.waitMs)},[n,t.waitMs])}function B(e){return function(t){function n(n){let r=n.storageArea==null||n.storageArea===window.localStorage,i=n.key==null||n.key===e;r&&i&&t()}return window.addEventListener(`storage`,n),()=>{window.removeEventListener(`storage`,n)}}}function V(){return null}function H(e,t){try{let n=JSON.parse(e);return typeof n==`string`?n:t}catch{return t}}function U(e,t){let n=m(u(()=>B(e),[e]),()=>window.localStorage.getItem(e),V);return[n==null?t:H(n,t),c(t=>{let n=JSON.stringify(t);window.localStorage.setItem(e,n),window.dispatchEvent(new StorageEvent(`storage`,{key:e,newValue:n,storageArea:window.localStorage}))},[e])]}function W(e){return function(t){function n(n){let r=n.storageArea==null||n.storageArea===window.sessionStorage,i=n.key==null||n.key===e;r&&i&&t()}return window.addEventListener(`storage`,n),()=>{window.removeEventListener(`storage`,n)}}}function G(){return null}function K(e,t){try{let n=JSON.parse(e);return typeof n==`string`?n:t}catch{return t}}function q(e,t){let n=m(u(()=>W(e),[e]),()=>window.sessionStorage.getItem(e),G);return[n==null?t:K(n,t),c(t=>{let n=JSON.stringify(t);window.sessionStorage.setItem(e,n),window.dispatchEvent(new StorageEvent(`storage`,{key:e,newValue:n,storageArea:window.sessionStorage}))},[e])]}function J(){let e=a();return u(()=>e?`auto`:`smooth`,[e])}function Y(e,{root:t,margin:n,amount:r,once:i=!1,initial:a=!1}={}){let[o,c]=p(a);return l(()=>{if(!e.current||i&&o)return;function a(){return c(!0),i?void 0:()=>c(!1)}let l={root:t&&t.current||void 0,margin:n,amount:r};return s(e.current,a,l)},[t,e,n,i,r]),o}function X(){let e=f([]),t=f([]),[,n]=d(e=>e+1,0),r=c(r=>{e.current.push(r),t.current=[],n()},[]),i=c(r=>{let i=e.current[e.current.length-1];if(i!==void 0)return e.current.pop(),t.current.push(r),n(),i},[]),a=c(r=>{let i=t.current[t.current.length-1];if(i!==void 0)return t.current.pop(),e.current.push(r),n(),i},[]),o=e.current.length>0,s=t.current.length>0;return u(()=>({canUndo:o,canRedo:s,push:r,undo:i,redo:a}),[o,s,r,i,a])}export{g as breakpoints,o as getPrefersReducedMotion,_ as useBreakpoint,L as useCallbackRef,t as useComposedRefs,i as useCopyToClipboard,R as useDebounce,z as useDebouncedCallback,Y as useInView,v as useIsBelowBreakpoint,r as useIsHydrated,e as useIsomorphicLayoutEffect,U as useLocalStorage,n as useMatchesMediaQuery,a as usePrefersReducedMotion,J as useScrollBehavior,q as useSessionStorage,X as useUndoRedo};
1
+ import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-BdBMM9ga.js";import{r as n}from"./browser-only-CPH56Xw_.js";import{t as r}from"./use-copy-to-clipboard-DqQ0_N3E.js";import{t as i}from"./use-matches-media-query-CMSxHR9n.js";import{n as a,t as o}from"./use-prefers-reduced-motion-CagaNRgm.js";import{t as s}from"./in-view-C2DpZ6s0.js";import{useCallback as c,useEffect as l,useMemo as u,useReducer as d,useRef as f,useState as p,useSyncExternalStore as m}from"react";const h=[`2xl`,`xl`,`lg`,`md`,`sm`,`xs`,`2xs`],g=[`default`,...h];function _(){return m(j,M,()=>`default`)}function v(e){return m(P(e),I(e),()=>!1)}const y={"2xl":`(min-width: 96rem)`,xl:`(min-width: 80rem)`,lg:`(min-width: 64rem)`,md:`(min-width: 48rem)`,sm:`(min-width: 40rem)`,xs:`(min-width: 30rem)`,"2xs":`(min-width: 22.5rem)`},b={"2xl":`(max-width: 95.99rem)`,xl:`(max-width: 79.99rem)`,lg:`(max-width: 63.99rem)`,md:`(max-width: 47.99rem)`,sm:`(max-width: 39.99rem)`,xs:`(max-width: 29.99rem)`,"2xs":`(max-width: 22.49rem)`};let x=null,S=null;function C(){return x||={"2xl":window.matchMedia(y[`2xl`]),xl:window.matchMedia(y.xl),lg:window.matchMedia(y.lg),md:window.matchMedia(y.md),sm:window.matchMedia(y.sm),xs:window.matchMedia(y.xs),"2xs":window.matchMedia(y[`2xs`])},x}function w(e){return S||={"2xl":window.matchMedia(b[`2xl`]),xl:window.matchMedia(b.xl),lg:window.matchMedia(b.lg),md:window.matchMedia(b.md),sm:window.matchMedia(b.sm),xs:window.matchMedia(b.xs),"2xs":window.matchMedia(b[`2xs`])},S[e]}let T=`default`;const E=new Set;let D=!1;function O(){let e=C();for(let t of h)if(e[t].matches)return t;return`default`}let k=!1;function A(){k||(k=!0,requestAnimationFrame(()=>{k=!1;let e=O();if(e!==T){T=e;for(let e of E)e()}}))}function j(e){if(E.add(e),!D){D=!0;let e=C();T=O();for(let t of Object.values(e))t.addEventListener(`change`,A)}return e(),()=>{if(E.delete(e),E.size===0&&D){D=!1;let e=C();for(let t of Object.values(e))t.removeEventListener(`change`,A)}}}function M(){return T}const N=new Map;function P(e){let t=N.get(e);return t||(t=t=>{let n=w(e),r=!1,i=()=>{r||(r=!0,requestAnimationFrame(()=>{r=!1,t()}))};return n.addEventListener(`change`,i),()=>{n.removeEventListener(`change`,i)}},N.set(e,t),t)}const F=new Map;function I(e){let t=F.get(e);return t||(t=()=>w(e).matches,F.set(e,t),t)}function L(e){let t=f(e);return l(()=>{t.current=e}),u(()=>((...e)=>t.current?.(...e)),[])}function R(e,t){let[n,r]=p(e);return l(()=>{let n=window.setTimeout(()=>{r(e)},t.waitMs);return()=>{window.clearTimeout(n)}},[e,t.waitMs]),n}function z(e,t){let n=L(e),r=f(0);return l(()=>()=>window.clearTimeout(r.current),[]),c((...e)=>{window.clearTimeout(r.current),r.current=window.setTimeout(()=>n(...e),t.waitMs)},[n,t.waitMs])}function B(e){return function(t){function n(n){let r=n.storageArea==null||n.storageArea===window.localStorage,i=n.key==null||n.key===e;r&&i&&t()}return window.addEventListener(`storage`,n),()=>{window.removeEventListener(`storage`,n)}}}function V(){return null}function H(e,t){try{let n=JSON.parse(e);return typeof n==`string`?n:t}catch{return t}}function U(e,t){let n=m(u(()=>B(e),[e]),()=>window.localStorage.getItem(e),V);return[n==null?t:H(n,t),c(t=>{let n=JSON.stringify(t);window.localStorage.setItem(e,n),window.dispatchEvent(new StorageEvent(`storage`,{key:e,newValue:n,storageArea:window.localStorage}))},[e])]}function W(e){return function(t){function n(n){let r=n.storageArea==null||n.storageArea===window.sessionStorage,i=n.key==null||n.key===e;r&&i&&t()}return window.addEventListener(`storage`,n),()=>{window.removeEventListener(`storage`,n)}}}function G(){return null}function K(e,t){try{let n=JSON.parse(e);return typeof n==`string`?n:t}catch{return t}}function q(e,t){let n=m(u(()=>W(e),[e]),()=>window.sessionStorage.getItem(e),G);return[n==null?t:K(n,t),c(t=>{let n=JSON.stringify(t);window.sessionStorage.setItem(e,n),window.dispatchEvent(new StorageEvent(`storage`,{key:e,newValue:n,storageArea:window.sessionStorage}))},[e])]}function J(){let e=a();return u(()=>e?`auto`:`smooth`,[e])}function Y(e,{root:t,margin:n,amount:r,once:i=!1,initial:a=!1}={}){let[o,c]=p(a);return l(()=>{if(!e.current||i&&o)return;function a(){return c(!0),i?void 0:()=>c(!1)}let l={root:t&&t.current||void 0,margin:n,amount:r};return s(e.current,a,l)},[t,e,n,i,r]),o}function X(){let e=f([]),t=f([]),[,n]=d(e=>e+1,0),r=c(r=>{e.current.push(r),t.current=[],n()},[]),i=c(r=>{let i=e.current[e.current.length-1];if(i!==void 0)return e.current.pop(),t.current.push(r),n(),i},[]),a=c(r=>{let i=t.current[t.current.length-1];if(i!==void 0)return t.current.pop(),e.current.push(r),n(),i},[]),o=e.current.length>0,s=t.current.length>0;return u(()=>({canUndo:o,canRedo:s,push:r,undo:i,redo:a}),[o,s,r,i,a])}export{g as breakpoints,o as getPrefersReducedMotion,_ as useBreakpoint,L as useCallbackRef,t as useComposedRefs,r as useCopyToClipboard,R as useDebounce,z as useDebouncedCallback,Y as useInView,v as useIsBelowBreakpoint,n as useIsHydrated,e as useIsomorphicLayoutEffect,U as useLocalStorage,i as useMatchesMediaQuery,a as usePrefersReducedMotion,J as useScrollBehavior,q as useSessionStorage,X as useUndoRedo};
@@ -25,10 +25,7 @@ import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
25
25
  * </HoverCard.Root>
26
26
  * ```
27
27
  */
28
- declare const Root: {
29
- ({ closeDelay, openDelay, ...props }: ComponentProps<typeof HoverCardPrimitive.Root>): import("react").JSX.Element;
30
- displayName: string;
31
- };
28
+ declare const Root: ({ closeDelay, openDelay, ...props }: ComponentProps<typeof HoverCardPrimitive.Root>) => import("react").JSX.Element;
32
29
  /**
33
30
  * The trigger element that opens the hover card when hovered.
34
31
  *
@@ -48,10 +45,7 @@ declare const Root: {
48
45
  * </HoverCard.Root>
49
46
  * ```
50
47
  */
51
- declare const Trigger: {
52
- (props: ComponentProps<typeof HoverCardPrimitive.Trigger>): import("react").JSX.Element;
53
- displayName: string;
54
- };
48
+ declare const Trigger: (props: ComponentProps<typeof HoverCardPrimitive.Trigger>) => import("react").JSX.Element;
55
49
  /**
56
50
  * The content to render inside the hover card.
57
51
  *
@@ -75,10 +69,7 @@ declare const Trigger: {
75
69
  * </HoverCard.Root>
76
70
  * ```
77
71
  */
78
- declare const Content: {
79
- ({ className, onClick, align, sideOffset, ...props }: ComponentProps<typeof HoverCardPrimitive.Content>): import("react").JSX.Element;
80
- displayName: string | undefined;
81
- };
72
+ declare const Content: ({ className, onClick, align, sideOffset, ...props }: ComponentProps<typeof HoverCardPrimitive.Content>) => import("react").JSX.Element;
82
73
  /**
83
74
  * A floating card that appears when a user hovers over a trigger element.
84
75
  *