@ngrok/mantle 0.77.0 → 0.79.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 (192) 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 +102 -70
  5. package/dist/alert-dialog.js +1 -1
  6. package/dist/alert.d.ts +39 -39
  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-ClC60Nzg.js +1 -0
  19. package/dist/button-DcXOWUYo.d.ts +131 -0
  20. package/dist/button.d.ts +6 -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 +71 -49
  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 +77 -137
  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-ZCgG41hx.js} +1 -1
  52. package/dist/dialog.d.ts +213 -88
  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-DMNw8ItM.d.ts} +26 -27
  57. package/dist/dropdown-menu.d.ts +2 -1
  58. package/dist/dropdown-menu.js +1 -1
  59. package/dist/empty.d.ts +139 -59
  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 +41 -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 +42 -20
  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-D7hs6bX2.d.ts → icon-button-B7uEj1qq.d.ts} +73 -11
  73. package/dist/icon-button-DV2-GZHf.js +1 -0
  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-CTU6apE6.d.ts → index-BivvYYs-.d.ts} +8 -7
  80. package/dist/{index-Bed_XLWa.d.ts → index-D47aqlpz.d.ts} +3 -2
  81. package/dist/index-DZRbVkZa.d.ts +1 -0
  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/intents-DdSKSj1c.d.ts +28 -0
  87. package/dist/{kbd-D6k4Dnrf.js → kbd-K8iaZ-Ti.js} +1 -1
  88. package/dist/kbd.d.ts +3 -8
  89. package/dist/kbd.js +1 -1
  90. package/dist/{label-BLXfnQmn.js → label-BMlHW_2D.js} +1 -1
  91. package/dist/{label-PY0qM0G5.d.ts → label-v2-bv98k.d.ts} +1 -1
  92. package/dist/label.d.ts +1 -1
  93. package/dist/label.js +1 -1
  94. package/dist/list.d.ts +18 -60
  95. package/dist/list.js +1 -1
  96. package/dist/llms.txt +4 -1
  97. package/dist/main.d.ts +4 -27
  98. package/dist/main.js +1 -1
  99. package/dist/mantle.css +6 -6
  100. package/dist/media-object.d.ts +6 -7
  101. package/dist/media-object.js +1 -1
  102. package/dist/multi-select.d.ts +80 -33
  103. package/dist/multi-select.js +1 -1
  104. package/dist/otp-input.d.ts +7 -8
  105. package/dist/otp-input.js +1 -1
  106. package/dist/pagination.d.ts +11 -22
  107. package/dist/pagination.js +1 -1
  108. package/dist/{popover-Bq52EC7X.js → popover-D5WxxnBY.js} +1 -1
  109. package/dist/popover.d.ts +17 -18
  110. package/dist/popover.js +1 -1
  111. package/dist/{primitive-FoWela9a.d.ts → primitive-C64-m48O.d.ts} +0 -1
  112. package/dist/{primitive-BuVqb6zf.js → primitive-M-kZdNIS.js} +1 -1
  113. package/dist/progress.d.ts +55 -46
  114. package/dist/progress.js +1 -1
  115. package/dist/qr-code.d.ts +10 -9
  116. package/dist/qr-code.js +1 -1
  117. package/dist/radio-group.d.ts +71 -60
  118. package/dist/radio-group.js +1 -1
  119. package/dist/{resolve-pre-rendered-props-DxJ9-DAl.d.ts → resolve-pre-rendered-props-B6OlZrSI.d.ts} +13 -26
  120. package/dist/{resolve-pre-rendered-props-DwIF_M_K.js → resolve-pre-rendered-props-C3e5Auo3.js} +1 -1
  121. package/dist/sandboxed-on-click.d.ts +4 -8
  122. package/dist/sandboxed-on-click.js +1 -1
  123. package/dist/{select-BUGOJMER.d.ts → select-Bwt2YduR.d.ts} +11 -12
  124. package/dist/{select-Bxq_N-_o.js → select-D-5u0Blc.js} +1 -1
  125. package/dist/select.d.ts +1 -1
  126. package/dist/select.js +1 -1
  127. package/dist/selectable-list.d.ts +160 -146
  128. package/dist/selectable-list.js +1 -1
  129. package/dist/{separator-CqohKk4z.js → separator-kBnnv3Cw.js} +1 -1
  130. package/dist/separator.d.ts +6 -37
  131. package/dist/separator.js +1 -1
  132. package/dist/sheet.d.ts +302 -89
  133. package/dist/sheet.js +1 -1
  134. package/dist/sizes-BCoI4bhP.d.ts +29 -0
  135. package/dist/skeleton-Bu3tgNcW.js +1 -0
  136. package/dist/skeleton.d.ts +2 -2
  137. package/dist/skeleton.js +1 -1
  138. package/dist/skip-to-main-link.d.ts +4 -34
  139. package/dist/skip-to-main-link.js +1 -1
  140. package/dist/slider.d.ts +2 -21
  141. package/dist/slider.js +1 -1
  142. package/dist/slot-DmPrjM7N.js +1 -0
  143. package/dist/slot.d.ts +1 -1
  144. package/dist/slot.js +1 -1
  145. package/dist/split-button.d.ts +21 -13
  146. package/dist/split-button.js +1 -1
  147. package/dist/{svg-only-f6ToFLH0.d.ts → svg-only-BFeFS1aa.d.ts} +2 -3
  148. package/dist/{svg-only-CSOaF1tL.js → svg-only-DDx6FtJd.js} +1 -1
  149. package/dist/switch.d.ts +4 -5
  150. package/dist/switch.js +1 -1
  151. package/dist/{table-CAitdL78.js → table-CPH2md2-.js} +1 -1
  152. package/dist/{table-BWD9IlIN.d.ts → table-CwFHXC-G.d.ts} +10 -10
  153. package/dist/table.d.ts +1 -1
  154. package/dist/table.js +1 -1
  155. package/dist/tabs.d.ts +29 -15
  156. package/dist/tabs.js +1 -1
  157. package/dist/text-area.d.ts +2 -3
  158. package/dist/text-area.js +1 -1
  159. package/dist/theme-D8kZCOzM.js +1 -0
  160. package/dist/theme-provider-Djj_jBo6.js +1 -0
  161. package/dist/theme-switcher.d.ts +53 -0
  162. package/dist/theme-switcher.js +1 -0
  163. package/dist/theme.d.ts +15 -101
  164. package/dist/theme.js +1 -1
  165. package/dist/toast-D3ntBmn4.js +1 -0
  166. package/dist/toast.d.ts +32 -50
  167. package/dist/toast.js +1 -1
  168. package/dist/tooltip.d.ts +16 -50
  169. package/dist/tooltip.js +1 -1
  170. package/dist/{types-CTam1uIW.d.ts → types-C19IR7jf.d.ts} +1 -0
  171. package/dist/{types-BvUzforF.d.ts → types-D1RY5Tcj.d.ts} +0 -1
  172. package/dist/types.d.ts +3 -3
  173. package/dist/use-prefers-reduced-motion-CagaNRgm.js +1 -0
  174. package/dist/utils.d.ts +2 -3
  175. package/dist/{validation-xyX_6kph.d.ts → validation-7QeiTFwl.d.ts} +3 -12
  176. package/dist/{validation-DCyx-ceH.js → validation-Bpptk_9t.js} +1 -1
  177. package/dist/{virtual-PBNiHjMK.js → virtual-DZMBu7Ch.js} +1 -1
  178. package/dist/well.d.ts +3 -3
  179. package/dist/well.js +1 -1
  180. package/dist/{with-style-props-CyImx7vd.d.ts → with-style-props-Dq5Vntqy.d.ts} +0 -1
  181. package/package.json +17 -14
  182. package/dist/button-C9GW9nAr.js +0 -1
  183. package/dist/button-mfYak6Rx.d.ts +0 -71
  184. package/dist/checkbox-Apow0ipK.js +0 -1
  185. package/dist/cx-C1UYP5We.js +0 -1
  186. package/dist/icon-SUx16Sl3.js +0 -1
  187. package/dist/icon-button-DiX9iZ9n.js +0 -1
  188. package/dist/index-CJbKEKr2.d.ts +0 -20
  189. package/dist/slot-DT_E5BQx.js +0 -1
  190. package/dist/theme-provider-C5XYi2-H.js +0 -1
  191. package/dist/toast-CZBWjXcP.js +0 -1
  192. package/dist/use-prefers-reduced-motion-DBqNw1wB.js +0 -1
@@ -0,0 +1,131 @@
1
+ import { t as WithAsChild } from "./as-child-CYEVu1WY.js";
2
+ import { r as VariantProps } from "./index-D47aqlpz.js";
3
+ import { t as ButtonIntent } from "./intents-DdSKSj1c.js";
4
+ import { ComponentProps, ReactNode } from "react";
5
+ //#region src/components/button/button.d.ts
6
+ /**
7
+ * The visual style of a `Button`: how much visual weight the button carries,
8
+ * independent of its tone (`intent`).
9
+ *
10
+ * - `"filled"` — solid fill; the heaviest weight on the page
11
+ * - `"outlined"` — bordered on the form background
12
+ * - `"ghost"` — no border or fill until hovered
13
+ * - `"link"` — renders like an inline link (inherits surrounding typography)
14
+ * while remaining a button that performs an action
15
+ */
16
+ type ButtonAppearance = "filled" | "ghost" | "link" | "outlined";
17
+ declare const buttonVariants: (props?: ({
18
+ appearance?: "filled" | "ghost" | "link" | "outlined" | null | undefined;
19
+ isLoading?: boolean | null | undefined;
20
+ intent?: "accent" | "danger" | "neutral" | null | undefined;
21
+ size?: "lg" | "md" | "sm" | "xl" | "xs" | null | undefined;
22
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
23
+ type ButtonVariants = VariantProps<typeof buttonVariants>;
24
+ /**
25
+ * The props for the `Button` component.
26
+ */
27
+ type ButtonProps = ComponentProps<"button"> & Omit<ButtonVariants, "appearance" | "intent"> & WithAsChild & {
28
+ /**
29
+ * The visual style of the Button. Required — there is no default, so
30
+ * every call site states the weight it means.
31
+ *
32
+ * @enum
33
+ * - `"filled"`: solid fill; the heaviest visual weight
34
+ * - `"outlined"`: bordered on the form background
35
+ * - `"ghost"`: no border or fill until hovered
36
+ * - `"link"`: renders like an inline link (inherits surrounding typography) while remaining a button
37
+ */
38
+ appearance: ButtonAppearance;
39
+ /**
40
+ * The tone of the Button — the purpose its color communicates to the
41
+ * user. Required — there is no default, so every call site states the
42
+ * tone it means.
43
+ *
44
+ * @enum
45
+ * - `"neutral"`: the workhorse tone — routine and secondary actions, and the default primary action (`appearance="filled" intent="neutral"`)
46
+ * - `"accent"`: deliberate brand emphasis; reach for it when an action should carry the brand color, not as the routine primary
47
+ * - `"danger"`: a destructive or irreversible action
48
+ */
49
+ intent: ButtonIntent;
50
+ /**
51
+ * An icon to render inside the button, beside the button's text
52
+ * children. If the `state` is `"pending"`, then the icon will
53
+ * automatically be replaced with a spinner.
54
+ *
55
+ * For an icon-only button, do not use `Button` — use `IconButton`
56
+ * instead: it requires an accessible `label` and renders a square box
57
+ * on the same shared size scale.
58
+ */
59
+ icon?: ReactNode;
60
+ /**
61
+ * The side that the icon will render on, if one is present. If `state="pending"`,
62
+ * then the loading icon will also render on this side.
63
+ * @default "start"
64
+ */
65
+ iconPlacement?: "start" | "end";
66
+ /**
67
+ * The behavior of the button when activated. Defaults to `"button"`, so the
68
+ * button does not accidentally submit a surrounding `<form>` — pass
69
+ * `type="submit"` to submit a form, or `type="reset"` to reset it.
70
+ *
71
+ * When `asChild` is used, `type` has no effect and is not forwarded to the
72
+ * child, so a wrapped anchor never inherits a `button` `type`. See:
73
+ * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#type
74
+ *
75
+ * @default "button"
76
+ * @enum
77
+ * - `"button"`: The button has no default behavior, and does nothing when pressed by default. It can have client-side scripts listen to the element's events, which are triggered when the events occur.
78
+ * - `"reset"`: The button resets all the controls to their initial values.
79
+ * - `"submit"`: The button submits the form data to the server.
80
+ *
81
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type
82
+ */
83
+ type?: ComponentProps<"button">["type"];
84
+ };
85
+ /**
86
+ * Renders a button or a component that looks like a button, an interactive
87
+ * element activated by a user with a mouse, keyboard, finger, voice command, or
88
+ * other assistive technology. Once activated, it then performs an action, such
89
+ * as submitting a form or opening a dialog.
90
+ *
91
+ * `appearance` (visual weight) and `intent` (tone) are required — every call
92
+ * site states what it means; there are no implicit defaults.
93
+ *
94
+ * The primary action button should be `appearance="filled" intent="neutral"` —
95
+ * the system's default primary action. Reserve `intent="accent"` for
96
+ * deliberate brand emphasis.
97
+ *
98
+ * An icon-only button is not a `Button` — use `IconButton` instead: an
99
+ * icon-only `Button` has no accessible name and keeps its text-box padding,
100
+ * while `IconButton` requires a screen-reader `label` and renders a square
101
+ * box on the same shared size scale.
102
+ *
103
+ * @see https://mantle.ngrok.com/components/actions/button
104
+ *
105
+ * @example
106
+ * The default primary action — filled + neutral:
107
+ * ```tsx
108
+ * <Button appearance="filled" intent="neutral" onClick={handleClick}>
109
+ * Click me
110
+ * </Button>
111
+ * ```
112
+ *
113
+ * @example
114
+ * Submit a form — opt in with `type="submit"` (the default `"button"` does not submit):
115
+ * ```tsx
116
+ * <Button type="submit" appearance="filled" intent="neutral">
117
+ * Save
118
+ * </Button>
119
+ * ```
120
+ *
121
+ * @example
122
+ * Icon-only buttons are not `Button`s — use `IconButton` instead (an icon-only
123
+ * `Button` has no accessible name and keeps its text-box padding):
124
+ * ```tsx
125
+ * // ❌ <Button appearance="outlined" intent="neutral" icon={<CopyIcon />} onClick={copyPage} />
126
+ * <IconButton appearance="outlined" intent="neutral" icon={<CopyIcon />} label="Copy page" onClick={copyPage} />
127
+ * ```
128
+ */
129
+ declare const Button: import("react").ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
130
+ //#endregion
131
+ export { ButtonAppearance as n, ButtonProps as r, Button as t };
package/dist/button.d.ts CHANGED
@@ -1,4 +1,6 @@
1
- import { n as ButtonProps, t as Button } from "./button-mfYak6Rx.js";
2
- import { n as IconButtonProps, t as IconButton } from "./icon-button-D7hs6bX2.js";
3
- import { n as ButtonGroupProps, t as ButtonGroup } from "./index-CTU6apE6.js";
4
- export { Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, IconButton, type IconButtonProps };
1
+ import { t as ButtonIntent } from "./intents-DdSKSj1c.js";
2
+ import { n as ButtonAppearance, r as ButtonProps, t as Button } from "./button-DcXOWUYo.js";
3
+ import { n as IconButtonAppearance, r as IconButtonProps, t as IconButton } from "./icon-button-B7uEj1qq.js";
4
+ import { n as ButtonGroupProps, t as ButtonGroup } from "./index-BivvYYs-.js";
5
+ import { t as ButtonSize } from "./sizes-BCoI4bhP.js";
6
+ export { Button, type ButtonAppearance, ButtonGroup, type ButtonGroupProps, type ButtonIntent, type ButtonProps, type ButtonSize, IconButton, type IconButtonAppearance, type IconButtonProps };
package/dist/button.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./icon-button-DiX9iZ9n.js";import{t}from"./button-C9GW9nAr.js";import{t as n}from"./button-CERx95KE.js";export{t as Button,n as ButtonGroup,e as IconButton};
1
+ import{t as e}from"./icon-button-DV2-GZHf.js";import{t}from"./button-ClC60Nzg.js";import{t as n}from"./button-5t6-JS_I.js";export{t as Button,n as ButtonGroup,e as IconButton};
@@ -1,6 +1,5 @@
1
1
  import { ComponentProps } from "react";
2
2
  import { DateRange, DayPicker } from "react-day-picker";
3
-
4
3
  //#region src/components/calendar/calendar.d.ts
5
4
  type CalendarProps = ComponentProps<typeof DayPicker>;
6
5
  /**
@@ -9,7 +8,7 @@ type CalendarProps = ComponentProps<typeof DayPicker>;
9
8
  * @preview This component is in `preview` mode which means the API is not stable and may change.
10
9
  * There may also be bugs! Please file an issue if you find any! <3
11
10
  *
12
- * @see https://mantle.ngrok.com/components/calendar#api-calendar
11
+ * @see https://mantle.ngrok.com/components/preview/calendar#api-calendar
13
12
  *
14
13
  * @example
15
14
  * ```tsx
@@ -28,12 +27,7 @@ type CalendarProps = ComponentProps<typeof DayPicker>;
28
27
  *
29
28
  * https://github.com/ngrok/mantle/issues
30
29
  */
31
- declare function Calendar({
32
- className,
33
- classNames,
34
- showOutsideDays,
35
- ...props
36
- }: CalendarProps): import("react").JSX.Element;
30
+ declare function Calendar({ className, classNames, showOutsideDays, ...props }: CalendarProps): import("react").JSX.Element;
37
31
  declare namespace Calendar {
38
32
  var displayName: string;
39
33
  }
package/dist/calendar.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-C1UYP5We.js";import{t}from"./icon-SUx16Sl3.js";import{n,r}from"./icon-button-DiX9iZ9n.js";import{jsx as i}from"react/jsx-runtime";import{CaretLeftIcon as a}from"@phosphor-icons/react/CaretLeft";import{CaretRightIcon as o}from"@phosphor-icons/react/CaretRight";import{DayPicker as s}from"react-day-picker";function c({className:c,classNames:l,showOutsideDays:u=!1,...d}){return i(s,{"data-slot":`calendar`,animate:!1,components:{Chevron:e=>i(t,{svg:e.orientation===`left`?i(a,{}):i(o,{}),className:`size-4`})},classNames:{root:e(`isolate`,c),button_next:e(n,r({appearance:`ghost`,size:`sm`}),`absolute right-0`),button_previous:e(n,r({appearance:`ghost`,size:`sm`}),`absolute left-0`),caption_label:`text-sm font-medium`,day:e(`overflow-hidden text-center text-sm p-0 relative focus-within:relative focus-within:z-20 size-7 rounded-md`,d.mode===`range`?`first:has-aria-selected:rounded-l-md last:has-aria-selected:rounded-r-md`:``),day_button:`day size-full rounded-md not-aria-selected:not-disabled:hover:bg-filled-accent/15`,disabled:`text-muted opacity-50`,hidden:`invisible`,month:`space-y-4`,month_caption:`flex justify-center pt-1 relative items-center`,month_grid:`w-full border-collapse space-y-1`,months:`flex flex-col sm:flex-row gap-y-4 sm:gap-x-4 sm:gap-y-0 relative max-w-min`,nav:`flex items-center absolute inset-x-0 top-1 h-5 justify-between z-10`,outside:`day-outside aria-selected:text-on-filled opacity-50 text-muted`,range_end:`day-range-end [&:not(.day-range-start)]:rounded-l-none`,range_middle:`day-range-middle not-disabled:aria-selected:bg-filled-accent/15 aria-selected:text-strong rounded-none not-disabled:aria-selected:hover:bg-filled-accent/25`,range_start:`day-range-start [&:not(.day-range-end)]:rounded-r-none`,selected:`not-disabled:bg-filled-accent text-on-filled not-disabled:hover:bg-filled-accent`,today:`not-aria-selected:not-disabled:text-accent-600 font-medium not-aria-selected:not-disabled:bg-filled-accent/10 rounded-md`,week:`flex w-full mt-1`,weekday:`text-body w-7 text-[0.8rem] text-center font-normal`,weekdays:`flex`,...l},showOutsideDays:u,...d})}c.displayName=`Calendar`;export{c as Calendar};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-CDtYjF_H.js";import{n}from"./icon-button-DV2-GZHf.js";import{jsx as r}from"react/jsx-runtime";import{CaretRightIcon as i}from"@phosphor-icons/react/CaretRight";import{CaretLeftIcon as a}from"@phosphor-icons/react/CaretLeft";import{DayPicker as o}from"react-day-picker";const s=n({appearance:`ghost`,intent:`neutral`,size:`sm`});function c({className:n,classNames:c,showOutsideDays:l=!1,...u}){return r(o,{"data-slot":`calendar`,animate:!1,components:{Chevron:e=>r(t,{svg:e.orientation===`left`?r(a,{}):r(i,{}),className:`size-4`})},classNames:{root:e(`isolate`,n),button_next:e(s,`absolute right-0`),button_previous:e(s,`absolute left-0`),caption_label:`text-sm font-medium`,day:e(`overflow-hidden text-center text-sm p-0 relative focus-within:relative focus-within:z-20 size-7 rounded-md`,u.mode===`range`?`first:has-aria-selected:rounded-l-md last:has-aria-selected:rounded-r-md`:``),day_button:`day size-full rounded-md not-aria-selected:not-disabled:hover:bg-filled-accent/15`,disabled:`text-muted opacity-50`,hidden:`invisible`,month:`space-y-4`,month_caption:`flex justify-center pt-1 relative items-center`,month_grid:`w-full border-collapse space-y-1`,months:`flex flex-col sm:flex-row gap-y-4 sm:gap-x-4 sm:gap-y-0 relative max-w-min`,nav:`flex items-center absolute inset-x-0 top-1 h-5 justify-between z-10`,outside:`day-outside aria-selected:text-on-filled opacity-50 text-muted`,range_end:`day-range-end [&:not(.day-range-start)]:rounded-l-none`,range_middle:`day-range-middle not-disabled:aria-selected:bg-filled-accent/15 aria-selected:text-strong rounded-none not-disabled:aria-selected:hover:bg-filled-accent/25`,range_start:`day-range-start [&:not(.day-range-end)]:rounded-r-none`,selected:`not-disabled:bg-filled-accent text-on-filled not-disabled:hover:bg-filled-accent`,today:`not-aria-selected:not-disabled:text-accent-600 font-medium not-aria-selected:not-disabled:bg-filled-accent/10 rounded-md`,week:`flex w-full mt-1`,weekday:`text-body w-7 text-[0.8rem] text-center font-normal`,weekdays:`flex`,...c},showOutsideDays:l,...u})}c.displayName=`Calendar`;export{c as Calendar};
package/dist/card.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { t as WithAsChild } from "./as-child-uN_018tj.js";
1
+ import { t as WithAsChild } from "./as-child-CYEVu1WY.js";
2
+ import "./index-D47aqlpz.js";
2
3
  import { ComponentProps, HTMLAttributes } from "react";
3
-
4
4
  //#region src/components/card/card.d.ts
5
5
  type CardProps = ComponentProps<"div"> & WithAsChild;
6
6
  type CardTitleProps = HTMLAttributes<HTMLHeadingElement> & WithAsChild;
@@ -8,7 +8,7 @@ type CardTitleProps = HTMLAttributes<HTMLHeadingElement> & WithAsChild;
8
8
  * A container that can be used to display content in a box resembling a
9
9
  * physical card.
10
10
  *
11
- * @see https://mantle.ngrok.com/components/card
11
+ * @see https://mantle.ngrok.com/components/structure/card
12
12
  *
13
13
  * @example
14
14
  * Composition:
@@ -45,7 +45,7 @@ declare const Card: {
45
45
  /**
46
46
  * A container that can be used to display content in a box resembling a physical card.
47
47
  *
48
- * @see https://mantle.ngrok.com/components/card#cardroot
48
+ * @see https://mantle.ngrok.com/components/structure/card#cardroot
49
49
  *
50
50
  * @example
51
51
  * ```tsx
@@ -60,7 +60,7 @@ declare const Card: {
60
60
  /**
61
61
  * The main content of a card.
62
62
  *
63
- * @see https://mantle.ngrok.com/components/card#cardbody
63
+ * @see https://mantle.ngrok.com/components/structure/card#cardbody
64
64
  *
65
65
  * @example
66
66
  * ```tsx
@@ -75,7 +75,7 @@ declare const Card: {
75
75
  /**
76
76
  * The footer container of a card.
77
77
  *
78
- * @see https://mantle.ngrok.com/components/card#cardfooter
78
+ * @see https://mantle.ngrok.com/components/structure/card#cardfooter
79
79
  *
80
80
  * @example
81
81
  * ```tsx
@@ -96,7 +96,7 @@ declare const Card: {
96
96
  /**
97
97
  * The header container of a card.
98
98
  *
99
- * @see https://mantle.ngrok.com/components/card#cardheader
99
+ * @see https://mantle.ngrok.com/components/structure/card#cardheader
100
100
  *
101
101
  * @example
102
102
  * ```tsx
@@ -117,7 +117,7 @@ declare const Card: {
117
117
  /**
118
118
  * The title of a card.
119
119
  *
120
- * @see https://mantle.ngrok.com/components/card#cardtitle
120
+ * @see https://mantle.ngrok.com/components/structure/card#cardtitle
121
121
  *
122
122
  * @example
123
123
  * ```tsx
package/dist/card.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,children:a,...o},s)=>r(n?t:`div`,{ref:s,"data-slot":`card`,className:e(`border-card bg-card relative rounded-md border`,i),...o,children:a}));i.displayName=`Card`;const a=n(({asChild:n=!1,className:i,children:a,...o},s)=>r(n?t:`div`,{ref:s,"data-slot":`card-body`,className:e(`p-6 border-t border-card-muted first:border-t-0`,i),...o,children:a}));a.displayName=`CardBody`;const o=n(({asChild:n=!1,className:i,children:a,...o},s)=>r(n?t:`div`,{ref:s,"data-slot":`card-footer`,className:e(`px-6 py-3 border-t border-card-muted first:border-t-0`,i),...o,children:a}));o.displayName=`CardFooter`;const s=n(({asChild:n=!1,className:i,children:a,...o},s)=>r(n?t:`div`,{ref:s,"data-slot":`card-header`,className:e(`px-6 py-3 border-t border-card-muted first:border-t-0`,i),...o,children:a}));s.displayName=`CardHeader`;const c=n(({className:n,asChild:i,...a},o)=>r(i?t:`h3`,{ref:o,"data-slot":`card-title`,className:e(`text-strong text-base font-medium`,n),...a}));c.displayName=`CardTitle`;const l={Root:i,Body:a,Footer:o,Header:s,Title:c};export{l as Card};
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,children:a,...o},s)=>r(n?t:`div`,{ref:s,"data-slot":`card`,className:e(`border-card bg-card relative rounded-md border`,i),...o,children:a}));i.displayName=`Card`;const a=n(({asChild:n=!1,className:i,children:a,...o},s)=>r(n?t:`div`,{ref:s,"data-slot":`card-body`,className:e(`p-6 border-t border-card-muted first:border-t-0`,i),...o,children:a}));a.displayName=`CardBody`;const o=n(({asChild:n=!1,className:i,children:a,...o},s)=>r(n?t:`div`,{ref:s,"data-slot":`card-footer`,className:e(`px-6 py-3 border-t border-card-muted first:border-t-0`,i),...o,children:a}));o.displayName=`CardFooter`;const s=n(({asChild:n=!1,className:i,children:a,...o},s)=>r(n?t:`div`,{ref:s,"data-slot":`card-header`,className:e(`px-6 py-3 border-t border-card-muted first:border-t-0`,i),...o,children:a}));s.displayName=`CardHeader`;const c=n(({className:n,asChild:i,...a},o)=>r(i?t:`h3`,{ref:o,"data-slot":`card-title`,className:e(`text-strong text-base font-medium`,n),...a}));c.displayName=`CardTitle`;const l={Root:i,Body:a,Footer:o,Header:s,Title:c};export{l as Card};
@@ -0,0 +1,147 @@
1
+ import { t as WithAsChild } from "./as-child-CYEVu1WY.js";
2
+ import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
3
+ //#region src/components/centered-layout/centered-layout.d.ts
4
+ /**
5
+ * A viewport-filling centered page flow for sign-in, sign-up, onboarding,
6
+ * 404, checkout, and other focused full-page states. It owns structure only —
7
+ * the flex/overflow skeleton and region ordering. App state (routing,
8
+ * sessions) never enters it, and landmark semantics stay compositional:
9
+ * brand marks, links, and the `Main` landmark arrive as composed JSX.
10
+ *
11
+ * @see https://mantle.ngrok.com/layouts/centered-layout
12
+ *
13
+ * @example
14
+ * Composition:
15
+ * ```
16
+ * CenteredLayout.Root
17
+ * ├── CenteredLayout.Header
18
+ * ├── CenteredLayout.Body
19
+ * └── CenteredLayout.Footer
20
+ * ```
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * <CenteredLayout.Root>
25
+ * <SkipToMainLink />
26
+ * <CenteredLayout.Body>
27
+ * <a href="https://ngrok.com">
28
+ * <NgrokWordmarkIcon className="h-auto w-24" />
29
+ * </a>
30
+ * <Main>
31
+ * <SignInCard />
32
+ * </Main>
33
+ * </CenteredLayout.Body>
34
+ * <CenteredLayout.Footer>
35
+ * <ThemeSwitcher />
36
+ * </CenteredLayout.Footer>
37
+ * </CenteredLayout.Root>
38
+ * ```
39
+ */
40
+ declare const CenteredLayout: {
41
+ /**
42
+ * The outer frame of a centered page flow. Fills its nearest sized ancestor
43
+ * (`min-h-full`) and stacks `Header` (pinned top), `Body` (which grows),
44
+ * and `Footer` (pinned bottom). Merge `h-full` via `className` when the
45
+ * host requires an exact height.
46
+ *
47
+ * @see https://mantle.ngrok.com/layouts/centered-layout
48
+ *
49
+ * @example
50
+ * ```tsx
51
+ * <CenteredLayout.Root>
52
+ * <SkipToMainLink />
53
+ * <CenteredLayout.Body>
54
+ * <a href="https://ngrok.com">
55
+ * <NgrokWordmarkIcon className="h-auto w-24" />
56
+ * </a>
57
+ * <Main>
58
+ * <SignInCard />
59
+ * </Main>
60
+ * </CenteredLayout.Body>
61
+ * <CenteredLayout.Footer>
62
+ * <ThemeSwitcher />
63
+ * </CenteredLayout.Footer>
64
+ * </CenteredLayout.Root>
65
+ * ```
66
+ */
67
+ readonly Root: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & WithAsChild & WithDataSlot, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
68
+ /**
69
+ * A utility strip at the top of the layout (account chip, close button)
70
+ * rendered as a semantic `<header>` (`banner` landmark) outside the
71
+ * centered `flex-1` region — the mirror of `Footer`. Merge
72
+ * `sticky top-0 z-10` via `className` to pin it to the window while the
73
+ * page scrolls. Optional — omitting it is fine.
74
+ *
75
+ * @see https://mantle.ngrok.com/layouts/centered-layout
76
+ *
77
+ * @example
78
+ * ```tsx
79
+ * <CenteredLayout.Root>
80
+ * <CenteredLayout.Header className="sticky top-0 z-10 justify-between">
81
+ * <AccountChip />
82
+ * <IconButton appearance="ghost" intent="neutral" type="button" label="Close" icon={<XIcon />} />
83
+ * </CenteredLayout.Header>
84
+ * <CenteredLayout.Body>
85
+ * <div className="w-full max-w-5xl">
86
+ * <PlanPicker />
87
+ * </div>
88
+ * </CenteredLayout.Body>
89
+ * </CenteredLayout.Root>
90
+ * ```
91
+ */
92
+ readonly Header: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLElement> & import("react").HTMLAttributes<HTMLElement> & WithAsChild & WithDataSlot, "ref"> & import("react").RefAttributes<HTMLElement>>;
93
+ /**
94
+ * The growing, centered region of the layout. By convention the brand mark
95
+ * (a fully-styled logo/wordmark anchor) is its **first child** — spacing
96
+ * comes from `Body`'s `gap-6`, so no dedicated `Logo` part exists.
97
+ *
98
+ * @see https://mantle.ngrok.com/layouts/centered-layout
99
+ *
100
+ * @example
101
+ * ```tsx
102
+ * <CenteredLayout.Root>
103
+ * <SkipToMainLink />
104
+ * <CenteredLayout.Body>
105
+ * <a href="https://ngrok.com">
106
+ * <NgrokWordmarkIcon className="h-auto w-24" />
107
+ * </a>
108
+ * <Main>
109
+ * <SignInCard />
110
+ * </Main>
111
+ * </CenteredLayout.Body>
112
+ * <CenteredLayout.Footer>
113
+ * <ThemeSwitcher />
114
+ * </CenteredLayout.Footer>
115
+ * </CenteredLayout.Root>
116
+ * ```
117
+ */
118
+ readonly Body: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & WithAsChild & WithDataSlot, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
119
+ /**
120
+ * A pinned utility strip (theme switcher, legal links) rendered as a
121
+ * semantic `<footer>` (`contentinfo` landmark) outside the centered
122
+ * `flex-1` region. Optional — omitting it is fine.
123
+ *
124
+ * @see https://mantle.ngrok.com/layouts/centered-layout
125
+ *
126
+ * @example
127
+ * ```tsx
128
+ * <CenteredLayout.Root>
129
+ * <SkipToMainLink />
130
+ * <CenteredLayout.Body>
131
+ * <a href="https://ngrok.com">
132
+ * <NgrokWordmarkIcon className="h-auto w-24" />
133
+ * </a>
134
+ * <Main>
135
+ * <SignInCard />
136
+ * </Main>
137
+ * </CenteredLayout.Body>
138
+ * <CenteredLayout.Footer>
139
+ * <ThemeSwitcher />
140
+ * </CenteredLayout.Footer>
141
+ * </CenteredLayout.Root>
142
+ * ```
143
+ */
144
+ readonly Footer: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLElement> & import("react").HTMLAttributes<HTMLElement> & WithAsChild & WithDataSlot, "ref"> & import("react").RefAttributes<HTMLElement>>;
145
+ };
146
+ //#endregion
147
+ export { CenteredLayout };
@@ -0,0 +1 @@
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{n as t,t as n}from"./slot-DmPrjM7N.js";import{forwardRef as r}from"react";import{jsx as i}from"react/jsx-runtime";const a=r(({asChild:r,children:a,className:o,"data-slot":s,...c},l)=>i(r?n:`div`,{ref:l,"data-slot":t(s,`centered-layout`),className:e(`flex min-h-full flex-col`,o),...c,children:a}));a.displayName=`CenteredLayout`;const o=r(({asChild:r,children:a,className:o,"data-slot":s,...c},l)=>i(r?n:`header`,{ref:l,"data-slot":t(s,`centered-layout-header`),className:e(`flex shrink-0 items-center px-4 py-4`,o),...c,children:a}));o.displayName=`CenteredLayoutHeader`;const s=r(({asChild:r,children:a,className:o,"data-slot":s,...c},l)=>i(r?n:`div`,{ref:l,"data-slot":t(s,`centered-layout-body`),className:e(`flex flex-1 flex-col items-center justify-center gap-6 py-4`,o),...c,children:a}));s.displayName=`CenteredLayoutBody`;const c=r(({asChild:r,children:a,className:o,"data-slot":s,...c},l)=>i(r?n:`footer`,{ref:l,"data-slot":t(s,`centered-layout-footer`),className:e(`flex shrink-0 items-center px-4 py-4`,o),...c,children:a}));c.displayName=`CenteredLayoutFooter`;const l={Root:a,Header:o,Body:s,Footer:c};export{l as CenteredLayout};
@@ -0,0 +1 @@
1
+ import{t as e}from"./compose-refs-Cjf2gfB8.js";import{t}from"./clsx-DUGZgXfJ.js";import{a as n,r}from"./validation-Bpptk_9t.js";import{forwardRef as i,useEffect as a,useRef as o,useState as s}from"react";import{jsx as c}from"react/jsx-runtime";const l=e=>e===`indeterminate`,u=i(({"aria-invalid":i,className:u,checked:d,defaultChecked:f,defaultValue:p=`on`,onClick:m,readOnly:h,validation:g,..._},v)=>{let y=o(null),[b]=s(f),x=n(),{ariaInvalid:S,validation:C}=r({"aria-invalid":i,validation:g??x}),w=d??b;a(()=>{y.current&&(y.current.indeterminate=l(w))},[w]);let T=d==null?{defaultChecked:l(b)?void 0:b}:{checked:!l(d)&&d};return c(`input`,{"aria-checked":l(d)?`mixed`:d,"aria-invalid":S,"data-slot":`checkbox`,className:t(`border-form bg-form shrink-0 cursor-pointer select-none appearance-none rounded border disabled:cursor-default disabled:opacity-50`,`bg-center bg-no-repeat focus:outline-hidden`,`focus-visible:border-accent-600 focus-visible:ring-focus-accent focus-visible:outline-hidden focus-visible:ring-4`,`checked:border-accent-600 checked:bg-accent-600 checked:bg-checked-icon`,`indeterminate:border-accent-600 indeterminate:bg-accent-600 indeterminate:bg-indeterminate-icon`,`data-validation-success:border-success-600 data-validation-success:checked:bg-success-600 data-validation-success:indeterminate:bg-success-600 focus-visible:data-validation-success:border-success-600 focus-visible:data-validation-success:ring-focus-success`,`data-validation-warning:border-warning-600 data-validation-warning:checked:bg-warning-600 data-validation-warning:indeterminate:bg-warning-600 focus-visible:data-validation-warning:border-warning-600 focus-visible:data-validation-warning:ring-focus-warning`,`data-validation-error:border-danger-600 data-validation-error:checked:bg-danger-600 data-validation-error:indeterminate:bg-danger-600 focus-visible:data-validation-error:border-danger-600 focus-visible:data-validation-error:ring-focus-danger`,`where:block where:size-4 where:p-0`,u),...T,"data-validation":C||void 0,defaultValue:p,onClick:e=>{if(h){e.preventDefault();return}m?.(e)},readOnly:h,ref:e(y,v),type:`checkbox`,..._})});u.displayName=`Checkbox`;function d({allSelected:e,someSelected:t}){return e?!0:t?`indeterminate`:!1}export{d as n,u as t};
@@ -1,16 +1,15 @@
1
- import { o as WithValidation } from "./validation-xyX_6kph.js";
2
-
1
+ import { o as WithValidation } from "./validation-7QeiTFwl.js";
3
2
  //#region src/components/checkbox/checkbox.d.ts
4
3
  type CheckedState = boolean | "indeterminate";
5
4
  /**
6
5
  * A form control that allows the user to toggle between checked and not checked.
7
6
  * Supports indeterminate state.
8
7
  *
9
- * Pair it with a [`Label`](/components/label) for a single-line caption, or
10
- * compose it inside [`Choice`](/components/choice) for a titled, multi-line
8
+ * Pair it with a [`Label`](/components/forms/label) for a single-line caption, or
9
+ * compose it inside [`Choice`](/components/forms/choice) for a titled, multi-line
11
10
  * label with a supplementary description.
12
11
  *
13
- * @see https://mantle.ngrok.com/components/checkbox
12
+ * @see https://mantle.ngrok.com/components/forms/checkbox
14
13
  *
15
14
  * @example
16
15
  * ```tsx
@@ -22,7 +21,7 @@ type CheckedState = boolean | "indeterminate";
22
21
  * </form>
23
22
  * ```
24
23
  */
25
- declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "defaultChecked" | "checked" | "type"> & WithValidation & {
24
+ declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "checked" | "defaultChecked" | "type"> & WithValidation & {
26
25
  /**
27
26
  * The controlled checked state of the checkbox. Must be used in conjunction with onChange.
28
27
  */
@@ -54,11 +53,10 @@ declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<Omit<impo
54
53
  * />
55
54
  * ```
56
55
  */
57
- declare function selectAllChecked({
58
- allSelected,
59
- someSelected
60
- }: {
61
- /** Whether every selectable item is currently selected. */allSelected: boolean; /** Whether some (but not necessarily all) items are selected. */
56
+ declare function selectAllChecked({ allSelected, someSelected }: {
57
+ /** Whether every selectable item is currently selected. */
58
+ allSelected: boolean;
59
+ /** Whether some (but not necessarily all) items are selected. */
62
60
  someSelected: boolean;
63
61
  }): CheckedState;
64
62
  //#endregion
package/dist/checkbox.js CHANGED
@@ -1 +1 @@
1
- import{n as e,t}from"./checkbox-Apow0ipK.js";export{t as Checkbox,e as selectAllChecked};
1
+ import{n as e,t}from"./checkbox-DJ2xl7Rc.js";export{t as Checkbox,e as selectAllChecked};
@@ -1 +1 @@
1
- import{t as e}from"./cx-C1UYP5We.js";import{t}from"./slot-DT_E5BQx.js";import{t as n}from"./field-context-4k1kI7Bo.js";import{t as r}from"./label-BLXfnQmn.js";import{cloneElement as i,createContext as a,forwardRef as o,isValidElement as s,useContext as c,useId as l,useMemo as u}from"react";import d from"tiny-invariant";import{jsx as f}from"react/jsx-runtime";const p=a(null);function m(e){let t=c(p);return d(t,`Choice.${e} must be rendered inside Choice.Root.`),t}const h=o(({"aria-describedby":t,"aria-errormessage":r,"aria-invalid":i,children:a,className:o,disabled:s=!1,id:d,name:m,...h},g)=>{let _=c(n),v=_?.id,y=_?.name,b=_?.[`aria-describedby`],x=_?.[`aria-invalid`],S=_?.[`aria-errormessage`],C=l(),w=l(),T=v??d??C,E=[b??t,w].filter(Boolean).join(` `)||void 0,D=u(()=>({controlId:T,descriptionId:w,disabled:s,controlProps:{id:T,name:y??m,disabled:s,"aria-describedby":E,"aria-invalid":x??i,"aria-errormessage":S??r}}),[T,w,s,E,y,m,x,i,S,r]);return f(p.Provider,{value:D,children:f(`div`,{ref:g,"data-slot":`choice`,className:e(`flex w-full items-start gap-2`,o),...h,children:a})})});h.displayName=`Choice`;const g=o(({children:t,className:n,...r},a)=>{let{controlProps:o}=m(`Indicator`),c=s(t)?i(t,{...o,disabled:o.disabled||t.props.disabled===!0,name:o.name??t.props.name,"aria-invalid":o[`aria-invalid`]??t.props[`aria-invalid`],"aria-errormessage":o[`aria-errormessage`]??t.props[`aria-errormessage`]}):t;return f(`span`,{ref:a,"data-slot":`choice-indicator`,className:e(`flex h-lh shrink-0 items-center text-sm`,n),...r,children:c})});g.displayName=`ChoiceIndicator`;const _=o(({asChild:n,className:r,...i},a)=>f(n?t:`div`,{ref:a,"data-slot":`choice-content`,className:e(`flex min-w-0 flex-1 flex-col gap-0.5`,r),...i}));_.displayName=`ChoiceContent`;const v=o(({className:t,...n},i)=>{let{controlId:a,disabled:o}=m(`Label`);return f(r,{ref:i,"data-slot":`choice-label`,className:e(o&&`opacity-50`,t),...n,htmlFor:a,disabled:o})});v.displayName=`ChoiceLabel`;const y=o(({asChild:n,className:r,...i},a)=>{let{disabled:o}=m(`Title`);return f(n?t:`p`,{ref:a,"data-slot":`choice-title`,className:e(`text-strong text-sm font-medium font-sans`,o&&`opacity-50`,r),...i})});y.displayName=`ChoiceTitle`;const b=o(({asChild:n,className:r,...i},a)=>{let{descriptionId:o,disabled:s}=m(`Description`);return f(n?t:`p`,{ref:a,id:o,"data-slot":`choice-description`,className:e(`text-body text-sm leading-4`,s&&`opacity-50`,r),...i})});b.displayName=`ChoiceDescription`;const x={Root:h,Indicator:g,Content:_,Label:v,Title:y,Description:b};export{x as t};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-DmPrjM7N.js";import{t as n}from"./field-context-BR01g789.js";import{t as r}from"./label-BMlHW_2D.js";import{cloneElement as i,createContext as a,forwardRef as o,isValidElement as s,useContext as c,useId as l,useMemo as u}from"react";import d from"tiny-invariant";import{jsx as f}from"react/jsx-runtime";const p=a(null);function m(e){let t=c(p);return d(t,`Choice.${e} must be rendered inside Choice.Root.`),t}const h=o(({"aria-describedby":t,"aria-errormessage":r,"aria-invalid":i,children:a,className:o,disabled:s=!1,id:d,name:m,...h},g)=>{let _=c(n),v=_?.id,y=_?.name,b=_?.[`aria-describedby`],x=_?.[`aria-invalid`],S=_?.[`aria-errormessage`],C=l(),w=l(),T=v??d??C,E=[b??t,w].filter(Boolean).join(` `)||void 0,D=u(()=>({controlId:T,descriptionId:w,disabled:s,controlProps:{id:T,name:y??m,disabled:s,"aria-describedby":E,"aria-invalid":x??i,"aria-errormessage":S??r}}),[T,w,s,E,y,m,x,i,S,r]);return f(p.Provider,{value:D,children:f(`div`,{ref:g,"data-slot":`choice`,className:e(`flex w-full items-start gap-2`,o),...h,children:a})})});h.displayName=`Choice`;const g=o(({children:t,className:n,...r},a)=>{let{controlProps:o}=m(`Indicator`),c=s(t)?i(t,{...o,disabled:o.disabled||t.props.disabled===!0,name:o.name??t.props.name,"aria-invalid":o[`aria-invalid`]??t.props[`aria-invalid`],"aria-errormessage":o[`aria-errormessage`]??t.props[`aria-errormessage`]}):t;return f(`span`,{ref:a,"data-slot":`choice-indicator`,className:e(`flex h-lh shrink-0 items-center text-sm`,n),...r,children:c})});g.displayName=`ChoiceIndicator`;const _=o(({asChild:n,className:r,...i},a)=>f(n?t:`div`,{ref:a,"data-slot":`choice-content`,className:e(`flex min-w-0 flex-1 flex-col gap-0.5`,r),...i}));_.displayName=`ChoiceContent`;const v=o(({className:t,...n},i)=>{let{controlId:a,disabled:o}=m(`Label`);return f(r,{ref:i,"data-slot":`choice-label`,className:e(o&&`opacity-50`,t),...n,htmlFor:a,disabled:o})});v.displayName=`ChoiceLabel`;const y=o(({asChild:n,className:r,...i},a)=>{let{disabled:o}=m(`Title`);return f(n?t:`p`,{ref:a,"data-slot":`choice-title`,className:e(`text-strong text-sm font-medium font-sans`,o&&`opacity-50`,r),...i})});y.displayName=`ChoiceTitle`;const b=o(({asChild:n,className:r,...i},a)=>{let{descriptionId:o,disabled:s}=m(`Description`);return f(n?t:`p`,{ref:a,id:o,"data-slot":`choice-description`,className:e(`text-body text-sm leading-4`,s&&`opacity-50`,r),...i})});b.displayName=`ChoiceDescription`;const x={Root:h,Indicator:g,Content:_,Label:v,Title:y,Description:b};export{x as t};
package/dist/choice.d.ts CHANGED
@@ -1,14 +1,13 @@
1
- import { t as WithAsChild } from "./as-child-uN_018tj.js";
2
- import { t as Label } from "./label-PY0qM0G5.js";
1
+ import { t as WithAsChild } from "./as-child-CYEVu1WY.js";
2
+ import { t as Label } from "./label-v2-bv98k.js";
3
3
  import { ComponentProps, ReactNode } from "react";
4
-
5
4
  //#region src/components/choice/choice.d.ts
6
5
  /**
7
6
  * Props for `Choice.Root`. Extends `<div>` props (minus `id`, narrowed below)
8
7
  * with the disabled / id / name controls. Inside a `Field.Control`, the field's
9
8
  * `id` / `name` / `aria-*` take precedence over these.
10
9
  *
11
- * @see https://mantle.ngrok.com/components/choice
10
+ * @see https://mantle.ngrok.com/components/forms/choice
12
11
  *
13
12
  * @example
14
13
  * ```tsx
@@ -24,14 +23,17 @@ import { ComponentProps, ReactNode } from "react";
24
23
  * ```
25
24
  */
26
25
  type ChoiceRootProps = Omit<ComponentProps<"div">, "id"> & {
27
- /** Marks the choice disabled — dims the text and is injected onto the control. */disabled?: boolean;
26
+ /** Marks the choice disabled — dims the text and is injected onto the control. */
27
+ disabled?: boolean;
28
28
  /**
29
29
  * Explicit control id. Defaults to a generated id, or — when composed inside a
30
30
  * `Field.Control` — the field's id, so `Field.Label` and `Choice.Label` resolve
31
31
  * to the same control.
32
32
  */
33
- id?: string; /** Form value name for the control. Inherited from `Field` when composed within one. */
34
- name?: string; /** `Choice.Indicator`, a `Choice.Content` (with `Label` / `Title` + `Description`). */
33
+ id?: string;
34
+ /** Form value name for the control. Inherited from `Field` when composed within one. */
35
+ name?: string;
36
+ /** `Choice.Indicator`, a `Choice.Content` (with `Label` / `Title` + `Description`). */
35
37
  children: ReactNode;
36
38
  };
37
39
  /**
@@ -44,7 +46,7 @@ type ChoiceRootProps = Omit<ComponentProps<"div">, "id"> & {
44
46
  * Outside a `Field` it falls back to its own generated ids, so the two compose
45
47
  * but neither requires the other.
46
48
  *
47
- * @see https://mantle.ngrok.com/components/choice
49
+ * @see https://mantle.ngrok.com/components/forms/choice
48
50
  *
49
51
  * @example
50
52
  * ```tsx
@@ -71,7 +73,7 @@ declare const Root: import("react").ForwardRefExoticComponent<Omit<ChoiceRootPro
71
73
  * title, and centers its child — so the control sits centered on the title's
72
74
  * first line and stays put when the title wraps.
73
75
  *
74
- * @see https://mantle.ngrok.com/components/choice
76
+ * @see https://mantle.ngrok.com/components/forms/choice
75
77
  *
76
78
  * @example
77
79
  * ```tsx
@@ -93,7 +95,7 @@ type ChoiceContentProps = ComponentProps<"div"> & WithAsChild;
93
95
  * an optional `Choice.Description`. `min-w-0` so long titles truncate instead of
94
96
  * pushing the row wide.
95
97
  *
96
- * @see https://mantle.ngrok.com/components/choice
98
+ * @see https://mantle.ngrok.com/components/forms/choice
97
99
  *
98
100
  * @example
99
101
  * ```tsx
@@ -129,7 +131,7 @@ type ChoiceLabelProps = Omit<ComponentProps<typeof Label>, "htmlFor" | "disabled
129
131
  * row or a Headless radio item), use `Choice.Title` instead — a label-less `<p>`
130
132
  * (it accepts `asChild`) — so labels never nest or compete.
131
133
  *
132
- * @see https://mantle.ngrok.com/components/choice
134
+ * @see https://mantle.ngrok.com/components/forms/choice
133
135
  *
134
136
  * @example
135
137
  * ```tsx
@@ -154,7 +156,7 @@ declare const ChoiceLabel: import("react").ForwardRefExoticComponent<Omit<Choice
154
156
  * control — or inside a `Field` — where the title can be the label, use
155
157
  * `Choice.Label`.
156
158
  *
157
- * @see https://mantle.ngrok.com/components/choice
159
+ * @see https://mantle.ngrok.com/components/forms/choice
158
160
  *
159
161
  * @example
160
162
  * ```tsx
@@ -175,7 +177,7 @@ declare const Title: import("react").ForwardRefExoticComponent<Omit<import("reac
175
177
  * and wired to the control via `aria-describedby` (never a second label).
176
178
  * Renders a `<p>`; pass `asChild` to supply your own element.
177
179
  *
178
- * @see https://mantle.ngrok.com/components/choice
180
+ * @see https://mantle.ngrok.com/components/forms/choice
179
181
  *
180
182
  * @example
181
183
  * ```tsx
@@ -214,7 +216,7 @@ declare const Description: import("react").ForwardRefExoticComponent<Omit<import
214
216
  * `aria-describedby`. Outside a `Field` it uses its own generated ids — the two
215
217
  * are aware of each other but neither is required.
216
218
  *
217
- * @see https://mantle.ngrok.com/components/choice
219
+ * @see https://mantle.ngrok.com/components/forms/choice
218
220
  *
219
221
  * @example
220
222
  * Composition:
package/dist/choice.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./choice-D6S38dPs.js";export{e as Choice};
1
+ import{t as e}from"./choice-DOdyNzFC.js";export{e as Choice};
@@ -1,9 +1,8 @@
1
- import { t as WithAsChild } from "./as-child-uN_018tj.js";
2
- import { t as SvgAttributes } from "./types-BvUzforF.js";
3
- import { A as FoldStrategy, B as computeJsonFoldRanges, C as Indentation, D as FoldExplanation, E as ComputeFoldRangesInput, F as isSupportedLanguage, H as finalizeFoldRanges, I as parseLanguage, L as supportedLanguages, M as computeFoldRanges, N as foldStrategyFor, O as FoldLine, P as SupportedLanguage, S as normalizeIndentation, T as isIndentation, U as LineRange, V as FoldableRange, _ as MantleCodeBlockValue, a as Mode, c as ResolvedPreRenderedCodeBlockProps, d as parseMetastring, f as resolvePreRenderedCodeBlockProps, g as parseCodeBlockShowLineNumbers, h as parseCodeBlockLineNumberStart, i as MetaInput, j as FoldToken, k as FoldScope, l as defaultMeta, m as parseCodeBlockHighlightLines, n as DefaultMeta, o as ResolvePreRenderedCodeBlockPropsInput, p as tokenizeMetastring, r as Meta, s as ResolvePreRenderedCodeBlockPropsResult, t as CodeBlockPreElementInput, u as normalizeValue, v as MantleCodeOptions, w as inferIndentation, x as mantleCode, y as createMantleCodeBlockValue, z as decorateHighlightedHtml } from "./resolve-pre-rendered-props-DxJ9-DAl.js";
1
+ import { t as WithAsChild } from "./as-child-CYEVu1WY.js";
2
+ import { t as SvgAttributes } from "./types-D1RY5Tcj.js";
3
+ import { A as FoldStrategy, B as computeJsonFoldRanges, C as Indentation, D as FoldExplanation, E as ComputeFoldRangesInput, F as isSupportedLanguage, H as finalizeFoldRanges, I as parseLanguage, L as supportedLanguages, M as computeFoldRanges, N as foldStrategyFor, O as FoldLine, P as SupportedLanguage, S as normalizeIndentation, T as isIndentation, U as LineRange, V as FoldableRange, _ as MantleCodeBlockValue, a as Mode, c as ResolvedPreRenderedCodeBlockProps, d as parseMetastring, f as resolvePreRenderedCodeBlockProps, g as parseCodeBlockShowLineNumbers, h as parseCodeBlockLineNumberStart, i as MetaInput, j as FoldToken, k as FoldScope, l as defaultMeta, m as parseCodeBlockHighlightLines, n as DefaultMeta, o as ResolvePreRenderedCodeBlockPropsInput, p as tokenizeMetastring, r as Meta, s as ResolvePreRenderedCodeBlockPropsResult, t as CodeBlockPreElementInput, u as normalizeValue, v as MantleCodeOptions, w as inferIndentation, x as mantleCode, y as createMantleCodeBlockValue, z as decorateHighlightedHtml } from "./resolve-pre-rendered-props-B6OlZrSI.js";
4
4
  import { ComponentProps, HTMLAttributes, ReactNode } from "react";
5
5
  import { Content, List, Trigger } from "@radix-ui/react-tabs";
6
-
7
6
  //#region src/components/code-block/code-block.d.ts
8
7
  type CodeBlockRootProps = Omit<ComponentProps<"div">, "align"> & WithAsChild & {
9
8
  /**
@@ -73,15 +72,7 @@ type CodeBlockIconProps = Omit<SvgAttributes, "children"> & ({
73
72
  * </CodeBlock.Root>
74
73
  * ```
75
74
  */
76
- declare function CodeBlockIconComponent({
77
- className,
78
- preset,
79
- svg: _svgProp,
80
- ...props
81
- }: CodeBlockIconProps): import("react").JSX.Element;
82
- declare namespace CodeBlockIconComponent {
83
- var displayName: string;
84
- }
75
+ declare function CodeBlockIconComponent({ className, preset, svg: _svgProp, ...props }: CodeBlockIconProps): import("react").JSX.Element;
85
76
  type CodeBlockTabListProps = Omit<ComponentProps<typeof List>, "asChild" | "loop">;
86
77
  type CodeBlockTabTriggerProps = Omit<ComponentProps<typeof Trigger>, "asChild">;
87
78
  type CodeBlockTabContentProps = Omit<ComponentProps<typeof Content>, "asChild" | "forceMount">;
@@ -486,10 +477,7 @@ type JsonCodeBlockValueOptions = {
486
477
  * </CodeBlock.Root>
487
478
  * ```
488
479
  */
489
- declare function jsonCodeBlockValue(value: unknown, {
490
- showLineNumbers,
491
- foldable
492
- }?: JsonCodeBlockValueOptions): MantleCodeBlockValue;
480
+ declare function jsonCodeBlockValue(value: unknown, { showLineNumbers, foldable }?: JsonCodeBlockValueOptions): MantleCodeBlockValue;
493
481
  //#endregion
494
482
  //#region src/components/code-block/escape-html.d.ts
495
483
  /**