@ngrok/mantle 0.77.0 → 0.78.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 (188) hide show
  1. package/dist/accordion.d.ts +63 -21
  2. package/dist/accordion.js +1 -1
  3. package/dist/agent.json +4 -1
  4. package/dist/alert-dialog.d.ts +19 -26
  5. package/dist/alert-dialog.js +1 -1
  6. package/dist/alert.d.ts +16 -24
  7. package/dist/alert.js +1 -1
  8. package/dist/{anchor-BtgEJoPN.js → anchor-C_tjSVy6.js} +1 -1
  9. package/dist/anchor.d.ts +3 -4
  10. package/dist/anchor.js +1 -1
  11. package/dist/{as-child-uN_018tj.d.ts → as-child-CYEVu1WY.d.ts} +0 -7
  12. package/dist/badge.d.ts +5 -56
  13. package/dist/badge.js +1 -1
  14. package/dist/breadcrumb.d.ts +212 -0
  15. package/dist/breadcrumb.js +1 -0
  16. package/dist/browser-only.d.ts +2 -6
  17. package/dist/{button-CERx95KE.js → button-5t6-JS_I.js} +1 -1
  18. package/dist/button-AS5Ir3DE.js +1 -0
  19. package/dist/{button-mfYak6Rx.d.ts → button-Bw9MpShl.d.ts} +26 -8
  20. package/dist/button.d.ts +5 -4
  21. package/dist/button.js +1 -1
  22. package/dist/calendar.d.ts +2 -8
  23. package/dist/calendar.js +1 -1
  24. package/dist/card.d.ts +8 -8
  25. package/dist/card.js +1 -1
  26. package/dist/centered-layout.d.ts +147 -0
  27. package/dist/centered-layout.js +1 -0
  28. package/dist/checkbox-DJ2xl7Rc.js +1 -0
  29. package/dist/checkbox.d.ts +9 -11
  30. package/dist/checkbox.js +1 -1
  31. package/dist/{choice-D6S38dPs.js → choice-DOdyNzFC.js} +1 -1
  32. package/dist/choice.d.ts +16 -14
  33. package/dist/choice.js +1 -1
  34. package/dist/code-block.d.ts +5 -17
  35. package/dist/code-block.js +1 -1
  36. package/dist/code-block_highlight-utils.d.ts +1 -1
  37. package/dist/code-block_highlight-utils.js +1 -1
  38. package/dist/code.d.ts +4 -5
  39. package/dist/code.js +1 -1
  40. package/dist/combobox.d.ts +40 -19
  41. package/dist/combobox.js +1 -1
  42. package/dist/command.d.ts +60 -38
  43. package/dist/command.js +1 -1
  44. package/dist/cx-IiQEAKf5.js +1 -0
  45. package/dist/cx.js +1 -1
  46. package/dist/data-slot-CChfb_cv.d.ts +17 -0
  47. package/dist/data-table.d.ts +45 -131
  48. package/dist/data-table.js +1 -1
  49. package/dist/description-list.d.ts +7 -7
  50. package/dist/description-list.js +1 -1
  51. package/dist/{dialog-uyJcNks7.js → dialog-DVDFVT_-.js} +1 -1
  52. package/dist/dialog.d.ts +155 -48
  53. package/dist/dialog.js +1 -1
  54. package/dist/{direction-CcTY0FmA.d.ts → direction-BjU0bPST.d.ts} +1 -1
  55. package/dist/{dropdown-menu-OEuW4GLp.js → dropdown-menu-ByUQkAvJ.js} +1 -1
  56. package/dist/{dropdown-menu-CADgs9gz.d.ts → dropdown-menu-DT30TQzL.d.ts} +21 -24
  57. package/dist/dropdown-menu.d.ts +2 -1
  58. package/dist/dropdown-menu.js +1 -1
  59. package/dist/empty.d.ts +133 -53
  60. package/dist/empty.js +1 -1
  61. package/dist/{field-context-4k1kI7Bo.js → field-context-BR01g789.js} +1 -1
  62. package/dist/field.d.ts +24 -36
  63. package/dist/field.js +1 -1
  64. package/dist/flag.d.ts +2 -9
  65. package/dist/flag.js +1 -1
  66. package/dist/hooks.d.ts +13 -15
  67. package/dist/hooks.js +1 -1
  68. package/dist/hover-card.d.ts +34 -14
  69. package/dist/hover-card.js +1 -1
  70. package/dist/icon-CDtYjF_H.js +1 -0
  71. package/dist/{icon-n49kOh4_.d.ts → icon-Cevjo93X.d.ts} +2 -3
  72. package/dist/{icon-button-DiX9iZ9n.js → icon-button-CxVsZ2N1.js} +1 -1
  73. package/dist/{icon-button-D7hs6bX2.d.ts → icon-button-DuRSCsPh.d.ts} +5 -6
  74. package/dist/icon.d.ts +3 -3
  75. package/dist/icon.js +1 -1
  76. package/dist/icons.d.ts +7 -19
  77. package/dist/icons.js +1 -1
  78. package/dist/{in-view-bItE1fkG.d.ts → in-view-nkSOdED2.d.ts} +1 -6
  79. package/dist/index-BnI3OppC.d.ts +1 -0
  80. package/dist/{index-CTU6apE6.d.ts → index-CDwfBOAA.d.ts} +5 -4
  81. package/dist/{index-Bed_XLWa.d.ts → index-D47aqlpz.d.ts} +3 -2
  82. package/dist/index-Rv8RL7xy.d.ts +25 -0
  83. package/dist/{input-B3TS9yAP.js → input-Ct1YOqSy.js} +1 -1
  84. package/dist/input.d.ts +10 -11
  85. package/dist/input.js +1 -1
  86. package/dist/{kbd-D6k4Dnrf.js → kbd-K8iaZ-Ti.js} +1 -1
  87. package/dist/kbd.d.ts +3 -8
  88. package/dist/kbd.js +1 -1
  89. package/dist/{label-BLXfnQmn.js → label-BMlHW_2D.js} +1 -1
  90. package/dist/{label-PY0qM0G5.d.ts → label-v2-bv98k.d.ts} +1 -1
  91. package/dist/label.d.ts +1 -1
  92. package/dist/label.js +1 -1
  93. package/dist/list.d.ts +18 -60
  94. package/dist/list.js +1 -1
  95. package/dist/llms.txt +4 -1
  96. package/dist/main.d.ts +4 -27
  97. package/dist/main.js +1 -1
  98. package/dist/mantle.css +6 -6
  99. package/dist/media-object.d.ts +6 -7
  100. package/dist/media-object.js +1 -1
  101. package/dist/multi-select.d.ts +80 -33
  102. package/dist/multi-select.js +1 -1
  103. package/dist/otp-input.d.ts +7 -8
  104. package/dist/otp-input.js +1 -1
  105. package/dist/pagination.d.ts +11 -22
  106. package/dist/pagination.js +1 -1
  107. package/dist/{popover-Bq52EC7X.js → popover-D5WxxnBY.js} +1 -1
  108. package/dist/popover.d.ts +6 -7
  109. package/dist/popover.js +1 -1
  110. package/dist/{primitive-FoWela9a.d.ts → primitive-C64-m48O.d.ts} +0 -1
  111. package/dist/{primitive-BuVqb6zf.js → primitive-wm7Wk-gy.js} +1 -1
  112. package/dist/progress.d.ts +55 -46
  113. package/dist/progress.js +1 -1
  114. package/dist/qr-code.d.ts +10 -9
  115. package/dist/qr-code.js +1 -1
  116. package/dist/radio-group.d.ts +71 -60
  117. package/dist/radio-group.js +1 -1
  118. package/dist/{resolve-pre-rendered-props-DxJ9-DAl.d.ts → resolve-pre-rendered-props-B6OlZrSI.d.ts} +13 -26
  119. package/dist/{resolve-pre-rendered-props-DwIF_M_K.js → resolve-pre-rendered-props-C3e5Auo3.js} +1 -1
  120. package/dist/sandboxed-on-click.d.ts +4 -8
  121. package/dist/sandboxed-on-click.js +1 -1
  122. package/dist/{select-BUGOJMER.d.ts → select-Bwt2YduR.d.ts} +11 -12
  123. package/dist/{select-Bxq_N-_o.js → select-D-5u0Blc.js} +1 -1
  124. package/dist/select.d.ts +1 -1
  125. package/dist/select.js +1 -1
  126. package/dist/selectable-list.d.ts +160 -146
  127. package/dist/selectable-list.js +1 -1
  128. package/dist/{separator-CqohKk4z.js → separator-kBnnv3Cw.js} +1 -1
  129. package/dist/separator.d.ts +6 -37
  130. package/dist/separator.js +1 -1
  131. package/dist/sheet.d.ts +231 -47
  132. package/dist/sheet.js +1 -1
  133. package/dist/sizes-Dje_rwKc.d.ts +29 -0
  134. package/dist/skeleton-Bu3tgNcW.js +1 -0
  135. package/dist/skeleton.d.ts +2 -2
  136. package/dist/skeleton.js +1 -1
  137. package/dist/skip-to-main-link.d.ts +4 -34
  138. package/dist/skip-to-main-link.js +1 -1
  139. package/dist/slider.d.ts +2 -21
  140. package/dist/slider.js +1 -1
  141. package/dist/slot-DmPrjM7N.js +1 -0
  142. package/dist/slot.d.ts +1 -1
  143. package/dist/slot.js +1 -1
  144. package/dist/split-button.d.ts +20 -12
  145. package/dist/split-button.js +1 -1
  146. package/dist/{svg-only-f6ToFLH0.d.ts → svg-only-BFeFS1aa.d.ts} +2 -3
  147. package/dist/{svg-only-CSOaF1tL.js → svg-only-DDx6FtJd.js} +1 -1
  148. package/dist/switch.d.ts +4 -5
  149. package/dist/switch.js +1 -1
  150. package/dist/{table-CAitdL78.js → table-CPH2md2-.js} +1 -1
  151. package/dist/{table-BWD9IlIN.d.ts → table-CwFHXC-G.d.ts} +10 -10
  152. package/dist/table.d.ts +1 -1
  153. package/dist/table.js +1 -1
  154. package/dist/tabs.d.ts +29 -15
  155. package/dist/tabs.js +1 -1
  156. package/dist/text-area.d.ts +2 -3
  157. package/dist/text-area.js +1 -1
  158. package/dist/theme-D8kZCOzM.js +1 -0
  159. package/dist/theme-provider-Djj_jBo6.js +1 -0
  160. package/dist/theme-switcher.d.ts +45 -0
  161. package/dist/theme-switcher.js +1 -0
  162. package/dist/theme.d.ts +15 -101
  163. package/dist/theme.js +1 -1
  164. package/dist/{toast-CZBWjXcP.js → toast-RkhbliFh.js} +1 -1
  165. package/dist/toast.d.ts +13 -37
  166. package/dist/toast.js +1 -1
  167. package/dist/tooltip.d.ts +10 -44
  168. package/dist/tooltip.js +1 -1
  169. package/dist/{types-CTam1uIW.d.ts → types-C19IR7jf.d.ts} +1 -0
  170. package/dist/{types-BvUzforF.d.ts → types-D1RY5Tcj.d.ts} +0 -1
  171. package/dist/types.d.ts +3 -3
  172. package/dist/use-prefers-reduced-motion-CagaNRgm.js +1 -0
  173. package/dist/utils.d.ts +2 -3
  174. package/dist/{validation-xyX_6kph.d.ts → validation-7QeiTFwl.d.ts} +3 -12
  175. package/dist/{validation-DCyx-ceH.js → validation-Bpptk_9t.js} +1 -1
  176. package/dist/{virtual-PBNiHjMK.js → virtual-DZMBu7Ch.js} +1 -1
  177. package/dist/well.d.ts +3 -3
  178. package/dist/well.js +1 -1
  179. package/dist/{with-style-props-CyImx7vd.d.ts → with-style-props-Dq5Vntqy.d.ts} +0 -1
  180. package/package.json +17 -14
  181. package/dist/button-C9GW9nAr.js +0 -1
  182. package/dist/checkbox-Apow0ipK.js +0 -1
  183. package/dist/cx-C1UYP5We.js +0 -1
  184. package/dist/icon-SUx16Sl3.js +0 -1
  185. package/dist/index-CJbKEKr2.d.ts +0 -20
  186. package/dist/slot-DT_E5BQx.js +0 -1
  187. package/dist/theme-provider-C5XYi2-H.js +0 -1
  188. package/dist/use-prefers-reduced-motion-DBqNw1wB.js +0 -1
package/dist/sheet.d.ts CHANGED
@@ -1,10 +1,221 @@
1
- import { t as Root } from "./primitive-FoWela9a.js";
2
- import { n as IconButtonProps } from "./icon-button-D7hs6bX2.js";
1
+ import { t as Root } from "./primitive-C64-m48O.js";
2
+ import { n as IconButtonProps } from "./icon-button-DuRSCsPh.js";
3
3
  import { HTMLAttributes } from "react";
4
4
  import { VariantProps } from "class-variance-authority";
5
-
6
5
  //#region src/components/sheet/sheet.d.ts
7
6
  type SheetCloseIconButtonProps = Partial<Omit<IconButtonProps, "icon">>;
7
+ /**
8
+ * An icon button that closes the `Sheet` when clicked.
9
+ * Should be rendered within the `Sheet.Header` as a child of `Sheet.Actions`.
10
+ *
11
+ * @see https://mantle.ngrok.com/components/overlays/sheet#sheetcloseiconbutton
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * // Sheet without a trigger (e.g. router controlled)
16
+ * <Sheet open onOpenChange={() => onClose()}>
17
+ * <Sheet.Content>
18
+ * <Sheet.Header>
19
+ * <Sheet.TitleGroup>
20
+ * <Sheet.Title>Are you absolutely sure?</Sheet.Title>
21
+ * <Sheet.Actions>
22
+ * <IconButton
23
+ * appearance="ghost"
24
+ * type="button"
25
+ * icon={<TrashSimple />}
26
+ * label="Delete"
27
+ * />
28
+ * <Separator orientation="vertical" className="h-[80%]" />
29
+ * <Sheet.CloseIconButton />
30
+ * </Sheet.Actions>
31
+ * </Sheet.TitleGroup>
32
+ * <Sheet.Description>
33
+ * This action cannot be undone. This will permanently delete your account and remove your data from our servers.
34
+ * </Sheet.Description>
35
+ * </Sheet.Header>
36
+ * <Sheet.Body>
37
+ * <p>
38
+ * Consequat do voluptate culpa fugiat consequat nostrud duis
39
+ * aliqua minim. Tempor voluptate cillum elit velit. Voluptate
40
+ * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit
41
+ * proident amet.
42
+ * </p>
43
+ * </Sheet.Body>
44
+ * <Sheet.Footer>
45
+ * <Sheet.Close asChild>
46
+ * <Button type="button">Close</Button>
47
+ * </Sheet.Close>
48
+ * <Button type="button" appearance="filled">
49
+ * Save
50
+ * </Button>
51
+ * </Sheet.Footer>
52
+ * </Sheet.Content>
53
+ * </Sheet.Root>
54
+ * ```
55
+ */
56
+ declare const CloseIconButton: {
57
+ ({ size, type, label, appearance, ...props }: SheetCloseIconButtonProps): import("react").JSX.Element;
58
+ displayName: string;
59
+ };
60
+ /**
61
+ * The body container for a `Sheet`. This is where you would typically place the main content of the sheet, such as forms or text.
62
+ * Should be rendered as a child of `Sheet.Content`.
63
+ *
64
+ * @see https://mantle.ngrok.com/components/overlays/sheet#sheetbody
65
+ *
66
+ * @example
67
+ * ```tsx
68
+ * // Sheet without a trigger (e.g. router controlled)
69
+ * <Sheet open onOpenChange={() => onClose()}>
70
+ * <Sheet.Content>
71
+ * <Sheet.Header>
72
+ * <Sheet.TitleGroup>
73
+ * <Sheet.Title>Are you absolutely sure?</Sheet.Title>
74
+ * <Sheet.Actions>
75
+ * <IconButton
76
+ * appearance="ghost"
77
+ * type="button"
78
+ * icon={<TrashSimple />}
79
+ * label="Delete"
80
+ * />
81
+ * <Separator orientation="vertical" className="h-[80%]" />
82
+ * <Sheet.CloseIconButton />
83
+ * </Sheet.Actions>
84
+ * </Sheet.TitleGroup>
85
+ * <Sheet.Description>
86
+ * This action cannot be undone. This will permanently delete your account and remove your data from our servers.
87
+ * </Sheet.Description>
88
+ * </Sheet.Header>
89
+ * <Sheet.Body>
90
+ * <p>
91
+ * Consequat do voluptate culpa fugiat consequat nostrud duis
92
+ * aliqua minim. Tempor voluptate cillum elit velit. Voluptate
93
+ * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit
94
+ * proident amet.
95
+ * </p>
96
+ * </Sheet.Body>
97
+ * <Sheet.Footer>
98
+ * <Sheet.Close asChild>
99
+ * <Button type="button">Close</Button>
100
+ * </Sheet.Close>
101
+ * <Button type="button" appearance="filled">
102
+ * Save
103
+ * </Button>
104
+ * </Sheet.Footer>
105
+ * </Sheet.Content>
106
+ * </Sheet.Root>
107
+ * ```
108
+ */
109
+ declare const Body: {
110
+ ({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
111
+ displayName: string;
112
+ };
113
+ /**
114
+ * The header container for a `Sheet`. This is where you would typically place the title, description, and actions.
115
+ * Should be rendered as a child of `Sheet.Content`.
116
+ *
117
+ * @see https://mantle.ngrok.com/components/overlays/sheet#sheetheader
118
+ *
119
+ * @example
120
+ * ```tsx
121
+ * // Sheet without a trigger (e.g. router controlled)
122
+ * <Sheet open onOpenChange={() => onClose()}>
123
+ * <Sheet.Content>
124
+ * <Sheet.Header>
125
+ * <Sheet.TitleGroup>
126
+ * <Sheet.Title>Are you absolutely sure?</Sheet.Title>
127
+ * <Sheet.Actions>
128
+ * <IconButton
129
+ * appearance="ghost"
130
+ * type="button"
131
+ * icon={<TrashSimple />}
132
+ * label="Delete"
133
+ * />
134
+ * <Separator orientation="vertical" className="h-[80%]" />
135
+ * <Sheet.CloseIconButton />
136
+ * </Sheet.Actions>
137
+ * </Sheet.TitleGroup>
138
+ * <Sheet.Description>
139
+ * This action cannot be undone. This will permanently delete your account and remove your data from our servers.
140
+ * </Sheet.Description>
141
+ * </Sheet.Header>
142
+ * <Sheet.Body>
143
+ * <p>
144
+ * Consequat do voluptate culpa fugiat consequat nostrud duis
145
+ * aliqua minim. Tempor voluptate cillum elit velit. Voluptate
146
+ * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit
147
+ * proident amet.
148
+ * </p>
149
+ * </Sheet.Body>
150
+ * <Sheet.Footer>
151
+ * <Sheet.Close asChild>
152
+ * <Button type="button">Close</Button>
153
+ * </Sheet.Close>
154
+ * <Button type="button" appearance="filled">
155
+ * Save
156
+ * </Button>
157
+ * </Sheet.Footer>
158
+ * </Sheet.Content>
159
+ * </Sheet.Root>
160
+ * ```
161
+ */
162
+ declare const Header: {
163
+ ({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
164
+ displayName: string;
165
+ };
166
+ /**
167
+ * The footer container for a `Sheet`. This is where you would typically place close and submit buttons.
168
+ * Should be rendered as a child of `Sheet.Content`.
169
+ *
170
+ * @see https://mantle.ngrok.com/components/overlays/sheet#sheetfooter
171
+ *
172
+ * @example
173
+ * ```tsx
174
+ * // Sheet without a trigger (e.g. router controlled)
175
+ * <Sheet open onOpenChange={() => onClose()}>
176
+ * <Sheet.Content>
177
+ * <Sheet.Header>
178
+ * <Sheet.TitleGroup>
179
+ * <Sheet.Title>Are you absolutely sure?</Sheet.Title>
180
+ * <Sheet.Actions>
181
+ * <IconButton
182
+ * appearance="ghost"
183
+ * type="button"
184
+ * icon={<TrashSimple />}
185
+ * label="Delete"
186
+ * />
187
+ * <Separator orientation="vertical" className="h-[80%]" />
188
+ * <Sheet.CloseIconButton />
189
+ * </Sheet.Actions>
190
+ * </Sheet.TitleGroup>
191
+ * <Sheet.Description>
192
+ * This action cannot be undone. This will permanently delete your account and remove your data from our servers.
193
+ * </Sheet.Description>
194
+ * </Sheet.Header>
195
+ * <Sheet.Body>
196
+ * <p>
197
+ * Consequat do voluptate culpa fugiat consequat nostrud duis
198
+ * aliqua minim. Tempor voluptate cillum elit velit. Voluptate
199
+ * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit
200
+ * proident amet.
201
+ * </p>
202
+ * </Sheet.Body>
203
+ * <Sheet.Footer>
204
+ * <Sheet.Close asChild>
205
+ * <Button type="button">Close</Button>
206
+ * </Sheet.Close>
207
+ * <Button type="button" appearance="filled">
208
+ * Save
209
+ * </Button>
210
+ * </Sheet.Footer>
211
+ * </Sheet.Content>
212
+ * </Sheet.Root>
213
+ * ```
214
+ */
215
+ declare const Footer: {
216
+ ({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
217
+ displayName: string;
218
+ };
8
219
  /**
9
220
  * A container that overlays the current view from the edge of the screen.
10
221
  * It is a lightweight way of allowing users to complete a task without losing
@@ -18,7 +229,7 @@ type SheetCloseIconButtonProps = Partial<Omit<IconButtonProps, "icon">>;
18
229
  * floating z-index. When multiple shared layers are open, the most recently
19
230
  * mounted layer renders on top.
20
231
  *
21
- * @see https://mantle.ngrok.com/components/sheet
232
+ * @see https://mantle.ngrok.com/components/overlays/sheet
22
233
  *
23
234
  * @example
24
235
  * Composition:
@@ -136,7 +347,7 @@ declare const Sheet: {
136
347
  * floating z-index. When multiple shared layers are open, the most recently
137
348
  * mounted layer renders on top.
138
349
  *
139
- * @see https://mantle.ngrok.com/components/sheet#sheetroot
350
+ * @see https://mantle.ngrok.com/components/overlays/sheet#sheetroot
140
351
  *
141
352
  * @example
142
353
  * ```tsx
@@ -173,7 +384,7 @@ declare const Sheet: {
173
384
  /**
174
385
  * A group container for the actions of a `Sheet`. Typically rendered as a child of `Sheet.TitleGroup`.
175
386
  *
176
- * @see https://mantle.ngrok.com/components/sheet#sheetactions
387
+ * @see https://mantle.ngrok.com/components/overlays/sheet#sheetactions
177
388
  *
178
389
  * @example
179
390
  * ```tsx
@@ -211,7 +422,7 @@ declare const Sheet: {
211
422
  * The body container for a `Sheet`. This is where you would typically place the main content of the sheet, such as forms or text.
212
423
  * Should be rendered as a child of `Sheet.Content`.
213
424
  *
214
- * @see https://mantle.ngrok.com/components/sheet#sheetbody
425
+ * @see https://mantle.ngrok.com/components/overlays/sheet#sheetbody
215
426
  *
216
427
  * @example
217
428
  * ```tsx
@@ -244,19 +455,13 @@ declare const Sheet: {
244
455
  * </Sheet.Root>
245
456
  * ```
246
457
  */
247
- readonly Body: {
248
- ({
249
- className,
250
- ...props
251
- }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
252
- displayName: string;
253
- };
458
+ readonly Body: typeof Body;
254
459
  /**
255
460
  * The close button for a `Sheet`. Should be rendered as a child of the `Sheet.Content` component.
256
461
  * Usually contained within the `Sheet.Footer` component.
257
462
  * Renders an unstyled button by default, but can be customized with the `asChild` prop.
258
463
  *
259
- * @see https://mantle.ngrok.com/components/sheet#sheetclose
464
+ * @see https://mantle.ngrok.com/components/overlays/sheet#sheetclose
260
465
  *
261
466
  * @example
262
467
  * ```tsx
@@ -294,7 +499,7 @@ declare const Sheet: {
294
499
  * An icon button that closes the `Sheet` when clicked.
295
500
  * Should be rendered within the `Sheet.Header` as a child of `Sheet.Actions`.
296
501
  *
297
- * @see https://mantle.ngrok.com/components/sheet#sheetcloseiconbutton
502
+ * @see https://mantle.ngrok.com/components/overlays/sheet#sheetcloseiconbutton
298
503
  *
299
504
  * @example
300
505
  * ```tsx
@@ -327,16 +532,7 @@ declare const Sheet: {
327
532
  * </Sheet.Root>
328
533
  * ```
329
534
  */
330
- readonly CloseIconButton: {
331
- ({
332
- size,
333
- type,
334
- label,
335
- appearance,
336
- ...props
337
- }: SheetCloseIconButtonProps): import("react").JSX.Element;
338
- displayName: string;
339
- };
535
+ readonly CloseIconButton: typeof CloseIconButton;
340
536
  /**
341
537
  * The main container for a `Sheet`. Should be rendered as a child of the `Sheet` component.
342
538
  * Renders on top of the overlay backdrop.
@@ -346,7 +542,7 @@ declare const Sheet: {
346
542
  * shared floating z-index. When multiple shared layers are open, the most
347
543
  * recently mounted layer renders on top.
348
544
  *
349
- * @see https://mantle.ngrok.com/components/sheet#sheetcontent
545
+ * @see https://mantle.ngrok.com/components/overlays/sheet#sheetcontent
350
546
  *
351
547
  * @example
352
548
  * ```tsx
@@ -396,7 +592,7 @@ declare const Sheet: {
396
592
  /**
397
593
  * A description for a sheet. Typically rendered as a child of `Sheet.Header`.
398
594
  *
399
- * @see https://mantle.ngrok.com/components/sheet#sheetdescription
595
+ * @see https://mantle.ngrok.com/components/overlays/sheet#sheetdescription
400
596
  *
401
597
  * @example
402
598
  * ```tsx
@@ -434,7 +630,7 @@ declare const Sheet: {
434
630
  * The footer container for a `Sheet`. This is where you would typically place close and submit buttons.
435
631
  * Should be rendered as a child of `Sheet.Content`.
436
632
  *
437
- * @see https://mantle.ngrok.com/components/sheet#sheetfooter
633
+ * @see https://mantle.ngrok.com/components/overlays/sheet#sheetfooter
438
634
  *
439
635
  * @example
440
636
  * ```tsx
@@ -467,18 +663,12 @@ declare const Sheet: {
467
663
  * </Sheet.Root>
468
664
  * ```
469
665
  */
470
- readonly Footer: {
471
- ({
472
- className,
473
- ...props
474
- }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
475
- displayName: string;
476
- };
666
+ readonly Footer: typeof Footer;
477
667
  /**
478
668
  * The header container for a `Sheet`. This is where you would typically place the title, description, and actions.
479
669
  * Should be rendered as a child of `Sheet.Content`.
480
670
  *
481
- * @see https://mantle.ngrok.com/components/sheet#sheetheader
671
+ * @see https://mantle.ngrok.com/components/overlays/sheet#sheetheader
482
672
  *
483
673
  * @example
484
674
  * ```tsx
@@ -511,18 +701,12 @@ declare const Sheet: {
511
701
  * </Sheet.Root>
512
702
  * ```
513
703
  */
514
- readonly Header: {
515
- ({
516
- className,
517
- ...props
518
- }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
519
- displayName: string;
520
- };
704
+ readonly Header: typeof Header;
521
705
  /**
522
706
  * The title for a `Sheet`. Typically rendered as a child of `Sheet.TitleGroup`.
523
707
  * Defaults to an `h2` element, but can be changed via the `asChild` prop.
524
708
  *
525
- * @see https://mantle.ngrok.com/components/sheet#sheettitle
709
+ * @see https://mantle.ngrok.com/components/overlays/sheet#sheettitle
526
710
  *
527
711
  * @example
528
712
  * ```tsx
@@ -559,7 +743,7 @@ declare const Sheet: {
559
743
  /**
560
744
  * A group container for the title and actions of a sheet. Typically rendered as a child of `Sheet.Header`.
561
745
  *
562
- * @see https://mantle.ngrok.com/components/sheet#sheettitlegroup
746
+ * @see https://mantle.ngrok.com/components/overlays/sheet#sheettitlegroup
563
747
  *
564
748
  * @example
565
749
  * ```tsx
@@ -597,7 +781,7 @@ declare const Sheet: {
597
781
  * The button trigger for a `Sheet`. Should be rendered as a child of the `Sheet` component.
598
782
  * Renders an unstyled button by default, but can be customized with the `asChild` prop.
599
783
  *
600
- * @see https://mantle.ngrok.com/components/sheet#sheettrigger
784
+ * @see https://mantle.ngrok.com/components/overlays/sheet#sheettrigger
601
785
  *
602
786
  * @example
603
787
  * ```tsx
package/dist/sheet.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-C1UYP5We.js";import{t}from"./icon-button-DiX9iZ9n.js";import{a as n,c as r,i,n as a,o,r as s,s as c,t as l}from"./primitive-BuVqb6zf.js";import{forwardRef as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{XIcon as p}from"@phosphor-icons/react/X";import{cva as m}from"class-variance-authority";const h=o;h.displayName=`Sheet`;const g=r;g.displayName=`SheetTrigger`;const _=l;_.displayName=`SheetClose`;const v=n;v.displayName=`SheetPortal`;const y=u(({className:t,...n},r)=>d(i,{"data-slot":`sheet-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),...n,ref:r}));y.displayName=i.displayName;const b=m(`bg-dialog border-dialog inset-y-0 h-full w-full fixed z-50 flex flex-col shadow-lg outline-hidden transition ease-in-out focus-within:outline-hidden data-state-closed:duration-100 data-state-closed:animate-out data-state-open:duration-100 data-state-open:animate-in`,{variants:{side:{left:`data-state-closed:slide-out-to-left data-state-open:slide-in-from-left left-0 border-r`,right:`data-state-closed:slide-out-to-right data-state-open:slide-in-from-right right-0 border-l`}},defaultVariants:{side:`right`}}),x=u(({children:t,className:n,preferredWidth:r=`sm:max-w-[30rem]`,side:i=`right`,...o},s)=>f(v,{children:[d(y,{}),d(a,{"data-slot":`sheet-content`,"data-mantle-modal-content":!0,className:e(b({side:i}),r,n),ref:s,...o,children:t})]}));x.displayName=a.displayName;const S=({size:e=`md`,type:n=`button`,label:r=`Close Sheet`,appearance:i=`ghost`,...a})=>d(l,{asChild:!0,children:d(t,{"data-slot":`sheet-close-icon-button`,appearance:i,icon:d(p,{}),label:r,size:e,type:n,...a})});S.displayName=`SheetCloseIconButton`;const C=({className:t,...n})=>d(`div`,{"data-slot":`sheet-body`,className:e(`scrollbar scrollbar-gutter-stable text-body flex-1 overflow-y-auto p-6`,t),...n});C.displayName=`SheetBody`;const w=({className:t,...n})=>d(`div`,{"data-slot":`sheet-header`,className:e(`border-dialog-muted flex shrink-0 flex-col gap-2 border-b py-4 pl-6 pr-4`,`has-[.icon-button]:pr-4`,t),...n});w.displayName=`SheetHeader`;const T=({className:t,...n})=>d(`div`,{"data-slot":`sheet-footer`,className:e(`border-dialog-muted flex shrink-0 justify-end gap-2 border-t px-6 py-2.5`,t),...n});T.displayName=`SheetFooter`;const E=u(({className:t,...n},r)=>d(c,{"data-slot":`sheet-title`,ref:r,className:e(`text-strong flex-1 truncate text-lg font-medium`,t),...n}));E.displayName=c.displayName;const D=u(({children:t,className:n,...r},i)=>d(`div`,{"data-slot":`sheet-title-group`,className:e(`flex items-center justify-between gap-2`,n),...r,ref:i,children:t}));D.displayName=`SheetTitleGroup`;const O=u(({className:t,...n},r)=>d(s,{"data-slot":`sheet-description`,ref:r,className:e(`text-body text-sm`,t),...n}));O.displayName=s.displayName;const k=u(({children:t,className:n,...r},i)=>d(`div`,{"data-slot":`sheet-actions`,className:e(`flex h-full items-center gap-2`,n),...r,ref:i,children:t}));k.displayName=`SheetActions`;const A={Root:h,Actions:k,Body:C,Close:_,CloseIconButton:S,Content:x,Description:O,Footer:T,Header:w,Title:E,TitleGroup:D,Trigger:g};export{A as Sheet};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-button-CxVsZ2N1.js";import{a as n,c as r,i,n as a,o,r as s,s as c,t as l}from"./primitive-wm7Wk-gy.js";import{forwardRef as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{XIcon as p}from"@phosphor-icons/react/X";import{cva as m}from"class-variance-authority";const h=o;h.displayName=`Sheet`;const g=r;g.displayName=`SheetTrigger`;const _=l;_.displayName=`SheetClose`;const v=n;v.displayName=`SheetPortal`;const y=u(({className:t,...n},r)=>d(i,{"data-slot":`sheet-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),...n,ref:r}));y.displayName=i.displayName;const b=m(`bg-dialog border-dialog inset-y-0 h-full w-full fixed z-50 flex flex-col shadow-lg outline-hidden transition ease-in-out focus-within:outline-hidden data-state-closed:duration-100 data-state-closed:animate-out data-state-open:duration-100 data-state-open:animate-in`,{variants:{side:{left:`data-state-closed:slide-out-to-left data-state-open:slide-in-from-left left-0 border-r`,right:`data-state-closed:slide-out-to-right data-state-open:slide-in-from-right right-0 border-l`}},defaultVariants:{side:`right`}}),x=u(({children:t,className:n,preferredWidth:r=`sm:max-w-[30rem]`,side:i=`right`,...o},s)=>f(v,{children:[d(y,{}),d(a,{"data-slot":`sheet-content`,"data-mantle-modal-content":!0,className:e(b({side:i}),r,n),ref:s,...o,children:t})]}));x.displayName=a.displayName;const S=({size:e=`md`,type:n=`button`,label:r=`Close Sheet`,appearance:i=`ghost`,...a})=>d(l,{asChild:!0,children:d(t,{"data-slot":`sheet-close-icon-button`,appearance:i,icon:d(p,{}),label:r,size:e,type:n,...a})});S.displayName=`SheetCloseIconButton`;const C=({className:t,...n})=>d(`div`,{"data-slot":`sheet-body`,className:e(`scrollbar scrollbar-gutter-stable text-body flex-1 overflow-y-auto p-6`,t),...n});C.displayName=`SheetBody`;const w=({className:t,...n})=>d(`div`,{"data-slot":`sheet-header`,className:e(`border-dialog-muted flex shrink-0 flex-col gap-2 border-b py-4 pl-6 pr-4`,`has-[.icon-button]:pr-4`,t),...n});w.displayName=`SheetHeader`;const T=({className:t,...n})=>d(`div`,{"data-slot":`sheet-footer`,className:e(`border-dialog-muted flex shrink-0 justify-end gap-2 border-t px-6 py-2.5`,t),...n});T.displayName=`SheetFooter`;const E=u(({className:t,...n},r)=>d(c,{"data-slot":`sheet-title`,ref:r,className:e(`text-strong flex-1 truncate text-lg font-medium`,t),...n}));E.displayName=c.displayName;const D=u(({children:t,className:n,...r},i)=>d(`div`,{"data-slot":`sheet-title-group`,className:e(`flex items-center justify-between gap-2`,n),...r,ref:i,children:t}));D.displayName=`SheetTitleGroup`;const O=u(({className:t,...n},r)=>d(s,{"data-slot":`sheet-description`,ref:r,className:e(`text-body text-sm`,t),...n}));O.displayName=s.displayName;const k=u(({children:t,className:n,...r},i)=>d(`div`,{"data-slot":`sheet-actions`,className:e(`flex h-full items-center gap-2`,n),...r,ref:i,children:t}));k.displayName=`SheetActions`;const A={Root:h,Actions:k,Body:C,Close:_,CloseIconButton:S,Content:x,Description:O,Footer:T,Header:w,Title:E,TitleGroup:D,Trigger:g};export{A as Sheet};
@@ -0,0 +1,29 @@
1
+ //#region src/components/button/sizes.d.ts
2
+ /**
3
+ * The single size scale shared by the button family (`Button`, `IconButton`,
4
+ * and `SplitButton.Root`). Sizes with the same name always render the same
5
+ * box height across components:
6
+ *
7
+ * - `xs` → 1.5rem (24px)
8
+ * - `sm` → 1.75rem (28px)
9
+ * - `md` → 2.25rem (36px, the default)
10
+ * - `lg` → 2.5rem (40px)
11
+ * - `xl` → 3rem (48px)
12
+ *
13
+ * See `decisions/2026-07-13-button-size-and-intent-api.md`.
14
+ */
15
+ declare const buttonSizes: readonly ["xs", "sm", "md", "lg", "xl"];
16
+ /**
17
+ * The size of a button-family component (`Button`, `IconButton`, and
18
+ * `SplitButton.Root`), controlling its box height and horizontal padding.
19
+ * Defaults to `"md"` everywhere.
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * <Button size="sm">Dense action</Button>
24
+ * <IconButton size="sm" label="Copy" icon={<CopyIcon />} />
25
+ * ```
26
+ */
27
+ type ButtonSize = (typeof buttonSizes)[number];
28
+ //#endregion
29
+ export { ButtonSize as t };
@@ -0,0 +1 @@
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-DmPrjM7N.js";import{forwardRef as n}from"react";import{jsx as r}from"react/jsx-runtime";const i=n(({asChild:n=!1,className:i,...a},o)=>r(n?t:`div`,{"data-slot":`skeleton`,className:e(`dark-high-contrast:bg-black/30 high-contrast:bg-black/30 h-4 animate-pulse rounded-md bg-gray-300/25 dark:bg-gray-950/10`,i),ref:o,...a}));i.displayName=`Skeleton`;export{i as t};
@@ -13,7 +13,7 @@
13
13
  * **When not to use**
14
14
  * - For very short fetches (< 200 ms) — a flash of skeleton is more
15
15
  * distracting than helpful.
16
- * - To convey error or empty states. Use {@link https://mantle.ngrok.com/components/empty Empty} instead.
16
+ * - To convey error or empty states. Use {@link https://mantle.ngrok.com/components/feedback/empty Empty} instead.
17
17
  * - As a permanent decorative shape.
18
18
  *
19
19
  * **Sizing.** Default height is `1rem`. Override `className` with `h-*`,
@@ -25,7 +25,7 @@
25
25
  * announce it to screen readers — e.g. wrap in an element with
26
26
  * `role="status"` and a visually-hidden "Loading…" label.
27
27
  *
28
- * @see https://mantle.ngrok.com/components/skeleton
28
+ * @see https://mantle.ngrok.com/components/feedback/skeleton
29
29
  *
30
30
  * @example
31
31
  * ```tsx
package/dist/skeleton.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-C1UYP5We.js";import{t}from"./slot-DT_E5BQx.js";import{forwardRef as n}from"react";import{jsx as r}from"react/jsx-runtime";const i=n(({asChild:n=!1,className:i,...a},o)=>r(n?t:`div`,{"data-slot":`skeleton`,className:e(`dark-high-contrast:bg-black/30 high-contrast:bg-black/30 h-4 animate-pulse rounded-md bg-gray-300/25 dark:bg-gray-950/10`,i),ref:o,...a}));i.displayName=`Skeleton`;export{i as Skeleton};
1
+ import{t as e}from"./skeleton-Bu3tgNcW.js";export{e as Skeleton};
@@ -1,5 +1,4 @@
1
1
  import { ComponentProps } from "react";
2
-
3
2
  //#region src/components/skip-to-main-link/skip-to-main-link.d.ts
4
3
  type SkipToMainLinkProps = Omit<ComponentProps<"a">, "href"> & {
5
4
  /**
@@ -11,38 +10,9 @@ type SkipToMainLinkProps = Omit<ComponentProps<"a">, "href"> & {
11
10
  */
12
11
  targetId?: string;
13
12
  };
14
- /**
15
- * A visually-hidden-until-focused "skip link" that lets keyboard users jump
16
- * past repeated navigation and land directly on the page's main content
17
- * landmark. When activated, it updates the URL hash and focuses the element
18
- * identified by `targetId` (defaulting to `"main"`) without scrolling. It
19
- * still renders a plain anchor with `href="#${targetId}"` to preserve link
20
- * semantics, support copy-link / no-JavaScript fallback behavior, and avoid
21
- * any router dependency in React Router, Next.js, or plain HTML.
22
- *
23
- * Pair with the `<Main>` component (or any element with a matching `id`
24
- * and `tabIndex={-1}`) so it can receive focus.
25
- *
26
- * @see https://mantle.ngrok.com/components/skip-to-main-link
27
- *
28
- * @example
29
- * ```tsx
30
- * <SkipToMainLink />
31
- * <Header />
32
- * <Main>
33
- * <h1>Page title</h1>
34
- * </Main>
35
- * ```
36
- */
37
- declare const SkipToMainLink: {
38
- ({
39
- children,
40
- className,
41
- onClick,
42
- targetId,
43
- ...props
44
- }: SkipToMainLinkProps): import("react").JSX.Element;
45
- displayName: string;
46
- };
13
+ declare function SkipToMainLink({ children, className, onClick, targetId, ...props }: SkipToMainLinkProps): import("react").JSX.Element;
14
+ declare namespace SkipToMainLink {
15
+ var displayName: string;
16
+ }
47
17
  //#endregion
48
18
  export { SkipToMainLink };
@@ -1 +1 @@
1
- import{t as e}from"./cx-C1UYP5We.js";import{t}from"./anchor-BtgEJoPN.js";import{jsx as n}from"react/jsx-runtime";const r=({children:r=`Skip to main content`,className:i,onClick:a,targetId:o=`main`,...s})=>n(t,{...s,"data-slot":`skip-to-main-link`,href:`#${o}`,onClick:e=>{e.preventDefault(),window.history.replaceState(null,``,`#${o}`),document.getElementById(o)?.focus({preventScroll:!0}),a?.(e)},className:e(`not-focus:sr-only bg-card fixed top-2 left-2 z-max px-4 py-2 shadow-lg`,i),children:r});r.displayName=`SkipToMainLink`;export{r as SkipToMainLink};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./anchor-C_tjSVy6.js";import{jsx as n}from"react/jsx-runtime";const r=({children:r=`Skip to main content`,className:i,onClick:a,targetId:o=`main`,...s})=>n(t,{...s,"data-slot":`skip-to-main-link`,href:`#${o}`,onClick:e=>{e.preventDefault(),window.history.replaceState(null,``,`#${o}`),document.getElementById(o)?.focus({preventScroll:!0}),a?.(e)},className:e(`not-focus:sr-only bg-card fixed top-2 left-2 z-max px-4 py-2 shadow-lg`,i),children:r});r.displayName=`SkipToMainLink`;export{r as SkipToMainLink};
package/dist/slider.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { ComponentProps } from "react";
2
2
  import * as SliderPrimitive from "@radix-ui/react-slider";
3
-
4
3
  //#region src/components/slider/slider.d.ts
5
4
  type SliderBaseProps = Omit<ComponentProps<typeof SliderPrimitive.Root>, "defaultValue" | "value">;
6
5
  /**
@@ -56,7 +55,7 @@ type SliderProps = SliderBaseProps & SliderValueProps & {
56
55
  * pass `aria-label` or `aria-labelledby` to `Slider`; Mantle forwards those
57
56
  * labels to the rendered thumb(s).
58
57
  *
59
- * @see https://mantle.ngrok.com/components/slider
58
+ * @see https://mantle.ngrok.com/components/forms/slider
60
59
  *
61
60
  * @example
62
61
  * ```tsx
@@ -91,24 +90,6 @@ type SliderProps = SliderBaseProps & SliderValueProps & {
91
90
  * />
92
91
  * ```
93
92
  */
94
- declare function Slider({
95
- "aria-describedby": ariaDescribedBy,
96
- "aria-errormessage": ariaErrorMessage,
97
- "aria-invalid": ariaInvalid,
98
- "aria-label": ariaLabel,
99
- "aria-labelledby": ariaLabelledBy,
100
- className,
101
- color,
102
- defaultValue,
103
- id,
104
- max,
105
- min,
106
- minStepsBetweenThumbs,
107
- name,
108
- step,
109
- showTicks,
110
- value,
111
- ...props
112
- }: SliderProps): import("react").JSX.Element;
93
+ declare function Slider({ "aria-describedby": ariaDescribedBy, "aria-errormessage": ariaErrorMessage, "aria-invalid": ariaInvalid, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, className, color, defaultValue, id, max, min, minStepsBetweenThumbs, name, step, showTicks, value, ...props }: SliderProps): import("react").JSX.Element;
113
94
  //#endregion
114
95
  export { Slider, type SliderProps };
package/dist/slider.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-C1UYP5We.js";import{t}from"./field-context-4k1kI7Bo.js";import{useContext as n}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";import*as a from"@radix-ui/react-slider";function o({"aria-describedby":o,"aria-errormessage":l,"aria-invalid":u,"aria-label":d,"aria-labelledby":f,className:p,color:m=`bg-accent-600`,defaultValue:h,id:g,max:_=100,min:v=0,minStepsBetweenThumbs:y=1,name:b,step:x=1,showTicks:S=!1,value:C,...w}){let T=n(t),E=C==null?void 0:Array.isArray(C)?C:[C],D=h==null?void 0:Array.isArray(h)?h:[h],O=E??D??[v],k=s(S,v,_,x);return i(a.Root,{"data-slot":`slider`,defaultValue:D,value:E,...T?{}:{"aria-describedby":o,"aria-errormessage":l,"aria-invalid":u,id:g},min:v,minStepsBetweenThumbs:y,max:_,name:b,step:x,className:e(`[--slider-thumb-size:--spacing(4.5)]`,`data-orientation-vertical:min-h-40 relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-orientation-vertical:h-full data-orientation-vertical:w-auto data-orientation-vertical:flex-col`,k>0&&`mb-3`,p),...w,children:[r(a.Track,{"data-slot":`slider-track`,className:e(`bg-neutral-300 rounded-full relative grow overflow-hidden`,`data-orientation-horizontal:h-1.5 data-orientation-horizontal:w-full`,`data-orientation-vertical:w-1.5 data-orientation-vertical:h-full`),children:r(a.Range,{"data-slot":`slider-range`,className:e(`absolute select-none data-orientation-horizontal:h-full data-orientation-vertical:w-full`,m)})}),Array.from({length:O.length},(t,n)=>r(a.Thumb,{"data-slot":`slider-thumb`,"aria-describedby":T?.[`aria-describedby`]??o,"aria-errormessage":T?.[`aria-errormessage`]??l,"aria-invalid":T?.[`aria-invalid`]??u,"aria-label":c({ariaLabel:d,index:n,thumbCount:O.length}),"aria-labelledby":f,id:n===0?T?.id:void 0,className:e(`bg-card border-card relative size-(--slider-thumb-size) rounded-full border`,`shadow-md transition-[color,box-shadow]`,`after:absolute after:-inset-2`,`focus-visible:ring-3 focus-visible:ring-accent-500/20 focus-visible:outline-hidden`,`block shrink-0 cursor-pointer select-none`,`data-disabled:pointer-events-none data-disabled:cursor-default`)},n)),k>0&&r(`div`,{"data-slot":`slider-ticks`,className:`absolute top-full mt-1.5 flex w-full justify-between px-[calc(var(--slider-thumb-size)/2)]`,"aria-hidden":`true`,children:Array.from({length:k},(e,t)=>r(`span`,{"data-slot":`slider-tick`,className:`bg-card-border h-1.5 w-px`},t))})]})}function s(e,t,n,r){let i=n-t;return!e||!Number.isFinite(i)||!Number.isFinite(r)||r<=0||i<=0?0:Math.floor(i/r)+1}function c({ariaLabel:e,index:t,thumbCount:n}){if(e)return n===1?e:n===2?`${t===0?`Minimum`:`Maximum`} ${e}`:`${e} ${t+1} of ${n}`}export{o as Slider};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./field-context-BR01g789.js";import{useContext as n}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";import*as a from"@radix-ui/react-slider";function o({"aria-describedby":o,"aria-errormessage":l,"aria-invalid":u,"aria-label":d,"aria-labelledby":f,className:p,color:m=`bg-accent-600`,defaultValue:h,id:g,max:_=100,min:v=0,minStepsBetweenThumbs:y=1,name:b,step:x=1,showTicks:S=!1,value:C,...w}){let T=n(t),E=C==null?void 0:Array.isArray(C)?C:[C],D=h==null?void 0:Array.isArray(h)?h:[h],O=E??D??[v],k=s(S,v,_,x);return i(a.Root,{"data-slot":`slider`,defaultValue:D,value:E,...T?{}:{"aria-describedby":o,"aria-errormessage":l,"aria-invalid":u,id:g},min:v,minStepsBetweenThumbs:y,max:_,name:b,step:x,className:e(`[--slider-thumb-size:--spacing(4.5)]`,`data-orientation-vertical:min-h-40 relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-orientation-vertical:h-full data-orientation-vertical:w-auto data-orientation-vertical:flex-col`,k>0&&`mb-3`,p),...w,children:[r(a.Track,{"data-slot":`slider-track`,className:e(`bg-neutral-300 rounded-full relative grow overflow-hidden`,`data-orientation-horizontal:h-1.5 data-orientation-horizontal:w-full`,`data-orientation-vertical:w-1.5 data-orientation-vertical:h-full`),children:r(a.Range,{"data-slot":`slider-range`,className:e(`absolute select-none data-orientation-horizontal:h-full data-orientation-vertical:w-full`,m)})}),Array.from({length:O.length},(t,n)=>r(a.Thumb,{"data-slot":`slider-thumb`,"aria-describedby":T?.[`aria-describedby`]??o,"aria-errormessage":T?.[`aria-errormessage`]??l,"aria-invalid":T?.[`aria-invalid`]??u,"aria-label":c({ariaLabel:d,index:n,thumbCount:O.length}),"aria-labelledby":f,id:n===0?T?.id:void 0,className:e(`bg-card border-card relative size-(--slider-thumb-size) rounded-full border`,`shadow-md transition-[color,box-shadow]`,`after:absolute after:-inset-2`,`focus-visible:ring-3 focus-visible:ring-accent-500/20 focus-visible:outline-hidden`,`block shrink-0 cursor-pointer select-none`,`data-disabled:pointer-events-none data-disabled:cursor-default`)},n)),k>0&&r(`div`,{"data-slot":`slider-ticks`,className:`absolute top-full mt-1.5 flex w-full justify-between px-[calc(var(--slider-thumb-size)/2)]`,"aria-hidden":`true`,children:Array.from({length:k},(e,t)=>r(`span`,{"data-slot":`slider-tick`,className:`bg-card-border h-1.5 w-px`},t))})]})}function s(e,t,n,r){let i=n-t;return!e||!Number.isFinite(i)||!Number.isFinite(r)||r<=0||i<=0?0:Math.floor(i/r)+1}function c({ariaLabel:e,index:t,thumbCount:n}){if(e)return n===1?e:n===2?`${t===0?`Minimum`:`Maximum`} ${e}`:`${e} ${t+1} of ${n}`}export{o as Slider};
@@ -0,0 +1 @@
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{Children as t,cloneElement as n,forwardRef as r,isValidElement as i}from"react";import{jsx as a}from"react/jsx-runtime";import{Slot as o}from"@radix-ui/react-slot";function s(...e){let t=e.filter(e=>e!=null&&e!==``).join(` `);return t===``?void 0:t}const c=r(function({children:r,className:c,"data-slot":l,...u},d){return i(r)?a(o,{ref:d,...u,children:n(r,{...r.props,className:e(c,r.props.className),"data-slot":s(l,r.props[`data-slot`])})}):t.only(r)});export{s as n,c as t};
package/dist/slot.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { t as Slot } from "./index-CJbKEKr2.js";
1
+ import { t as Slot } from "./index-Rv8RL7xy.js";
2
2
  export { Slot };
package/dist/slot.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./slot-DT_E5BQx.js";export{e as Slot};
1
+ import{t as e}from"./slot-DmPrjM7N.js";export{e as Slot};