@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
package/dist/alert.d.ts CHANGED
@@ -1,19 +1,19 @@
1
- import { t as WithAsChild } from "./as-child-uN_018tj.js";
2
- import { t as SvgAttributes } from "./types-BvUzforF.js";
3
- import { n as IconButtonProps } from "./icon-button-D7hs6bX2.js";
1
+ import { t as WithAsChild } from "./as-child-CYEVu1WY.js";
2
+ import { t as SvgAttributes } from "./types-D1RY5Tcj.js";
3
+ import "./index-D47aqlpz.js";
4
+ import { n as IconButtonAppearance, r as IconButtonProps } from "./icon-button-B7uEj1qq.js";
4
5
  import { ComponentProps, HTMLAttributes, ReactNode } from "react";
5
-
6
6
  //#region src/components/alert/alert.d.ts
7
- declare const priorities: readonly ["danger", "important", "info", "success", "warning"];
8
- type Priority = (typeof priorities)[number];
7
+ declare const intents: readonly ["danger", "important", "info", "success", "warning"];
8
+ type AlertIntent = (typeof intents)[number];
9
9
  declare const appearances: readonly ["banner", "default"];
10
10
  type Appearance = (typeof appearances)[number];
11
11
  type AlertProps = ComponentProps<"div"> & {
12
12
  /**
13
- * Indicates the importance or impact level of the Alert, affecting its
14
- * color and styling to communicate its purpose to the user.
13
+ * The intent of the Alert the status its color communicates to the user,
14
+ * determining the color and styling of the Alert.
15
15
  */
16
- priority: Priority;
16
+ intent: AlertIntent;
17
17
  /**
18
18
  * Controls the visual style of the Alert.
19
19
  * - "default" provides standard rounded corners and borders.
@@ -25,21 +25,33 @@ type AlertProps = ComponentProps<"div"> & {
25
25
  };
26
26
  type AlertIconProps = Omit<SvgAttributes, "children"> & {
27
27
  /**
28
- * An optional icon that renders in place of the default icon for the Alert priority.
28
+ * An optional icon that renders in place of the default icon for the Alert intent.
29
29
  */
30
30
  svg?: ReactNode;
31
31
  };
32
32
  type AlertDescriptionProps = ComponentProps<"div"> & WithAsChild;
33
- type AlertDismissIconButtonProps = Partial<Omit<IconButtonProps, "icon">> & {
33
+ type AlertDismissIconButtonProps = Partial<Omit<IconButtonProps, "appearance" | "icon" | "intent">> & {
34
+ /**
35
+ * The visual style of the dismiss button. Optional here —
36
+ * `Alert.DismissIconButton` defaults to `"ghost"` so the dismiss affordance
37
+ * stays visually quiet inside the Alert.
38
+ *
39
+ * @default "ghost"
40
+ */
41
+ appearance?: IconButtonAppearance;
34
42
  /**
35
43
  * An optional icon to render inside the dismiss button. Defaults to an X icon.
36
44
  */
37
45
  icon?: ReactNode;
38
46
  };
47
+ declare const DismissIconButton: {
48
+ ({ size, type, label, appearance, className, icon, style, ...props }: AlertDismissIconButtonProps): import("react").JSX.Element;
49
+ displayName: string;
50
+ };
39
51
  /**
40
52
  * Displays a callout for user attention.
41
53
  *
42
- * @see https://mantle.ngrok.com/components/alert
54
+ * @see https://mantle.ngrok.com/components/feedback/alert
43
55
  *
44
56
  * @example
45
57
  * Composition:
@@ -54,7 +66,7 @@ type AlertDismissIconButtonProps = Partial<Omit<IconButtonProps, "icon">> & {
54
66
  *
55
67
  * @example
56
68
  * ```tsx
57
- * <Alert priority="info">
69
+ * <Alert intent="info">
58
70
  * <AlertIcon />
59
71
  * <AlertContent>
60
72
  * <AlertTitle>Alert Title</AlertTitle>
@@ -70,11 +82,11 @@ declare const Alert: {
70
82
  /**
71
83
  * The root container of the alert component.
72
84
  *
73
- * @see https://mantle.ngrok.com/components/alert#alertroot
85
+ * @see https://mantle.ngrok.com/components/feedback/alert#alertroot
74
86
  *
75
87
  * @example
76
88
  * ```tsx
77
- * <Alert.Root priority="info">
89
+ * <Alert.Root intent="info">
78
90
  * <Alert.Icon />
79
91
  * <Alert.Content>
80
92
  * <Alert.Title>Alert Title</Alert.Title>
@@ -87,11 +99,11 @@ declare const Alert: {
87
99
  /**
88
100
  * The container for the content slot of an alert.
89
101
  *
90
- * @see https://mantle.ngrok.com/components/alert#alertcontent
102
+ * @see https://mantle.ngrok.com/components/feedback/alert#alertcontent
91
103
  *
92
104
  * @example
93
105
  * ```tsx
94
- * <Alert.Root priority="info">
106
+ * <Alert.Root intent="info">
95
107
  * <Alert.Icon />
96
108
  * <Alert.Content>
97
109
  * <Alert.Title>Alert Title</Alert.Title>
@@ -104,11 +116,11 @@ declare const Alert: {
104
116
  /**
105
117
  * The optional description of an alert.
106
118
  *
107
- * @see https://mantle.ngrok.com/components/alert#alertdescription
119
+ * @see https://mantle.ngrok.com/components/feedback/alert#alertdescription
108
120
  *
109
121
  * @example
110
122
  * ```tsx
111
- * <Alert.Root priority="info">
123
+ * <Alert.Root intent="info">
112
124
  * <Alert.Icon />
113
125
  * <Alert.Content>
114
126
  * <Alert.Title>Alert Title</Alert.Title>
@@ -121,11 +133,11 @@ declare const Alert: {
121
133
  /**
122
134
  * An optional dismiss button that can be used to close the alert.
123
135
  *
124
- * @see https://mantle.ngrok.com/components/alert#alertdismissiconbutton
136
+ * @see https://mantle.ngrok.com/components/feedback/alert#alertdismissiconbutton
125
137
  *
126
138
  * @example
127
139
  * ```tsx
128
- * <Alert.Root priority="info">
140
+ * <Alert.Root intent="info">
129
141
  * <Alert.Icon />
130
142
  * <Alert.Content>
131
143
  * <Alert.Title>Alert Title</Alert.Title>
@@ -135,27 +147,15 @@ declare const Alert: {
135
147
  * </Alert.Root>
136
148
  * ```
137
149
  */
138
- readonly DismissIconButton: {
139
- ({
140
- size,
141
- type,
142
- label,
143
- appearance,
144
- className,
145
- icon,
146
- style,
147
- ...props
148
- }: AlertDismissIconButtonProps): import("react").JSX.Element;
149
- displayName: string;
150
- };
150
+ readonly DismissIconButton: typeof DismissIconButton;
151
151
  /**
152
- * An optional icon that visually represents the priority of the Alert.
152
+ * An optional icon that visually represents the intent of the Alert.
153
153
  *
154
- * @see https://mantle.ngrok.com/components/alert#alerticon
154
+ * @see https://mantle.ngrok.com/components/feedback/alert#alerticon
155
155
  *
156
156
  * @example
157
157
  * ```tsx
158
- * <Alert.Root priority="info">
158
+ * <Alert.Root intent="info">
159
159
  * <Alert.Icon />
160
160
  * <Alert.Content>
161
161
  * <Alert.Title>Alert Title</Alert.Title>
@@ -168,11 +168,11 @@ declare const Alert: {
168
168
  /**
169
169
  * The title of an alert.
170
170
  *
171
- * @see https://mantle.ngrok.com/components/alert#alerttitle
171
+ * @see https://mantle.ngrok.com/components/feedback/alert#alerttitle
172
172
  *
173
173
  * @example
174
174
  * ```tsx
175
- * <Alert.Root priority="info">
175
+ * <Alert.Root intent="info">
176
176
  * <Alert.Icon />
177
177
  * <Alert.Content>
178
178
  * <Alert.Title>Alert Title</Alert.Title>
package/dist/alert.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-C1UYP5We.js";import{t}from"./svg-only-CSOaF1tL.js";import{t as n}from"./slot-DT_E5BQx.js";import{t as r}from"./types-D85fCNV3.js";import{t as i}from"./icon-button-DiX9iZ9n.js";import{createContext as a,forwardRef as o,useContext as s,useMemo as c}from"react";import l from"tiny-invariant";import{jsx as u}from"react/jsx-runtime";import{CheckCircleIcon as d}from"@phosphor-icons/react/CheckCircle";import{InfoIcon as f}from"@phosphor-icons/react/Info";import{MegaphoneIcon as p}from"@phosphor-icons/react/Megaphone";import{WarningIcon as m}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as h}from"@phosphor-icons/react/WarningDiamond";import{XIcon as g}from"@phosphor-icons/react/X";import{cva as _}from"class-variance-authority";const v=a(null),y=u(g,{});function b(){let e=s(v);return l(e,`useAlertContext hook used outside of Alert parent!`),e}const x=_(`relative flex w-full gap-1.5 rounded-md border p-2.5 text-sm font-sans`,{variants:{priority:{danger:`border-danger-500/50 bg-danger-500/10 text-danger-700 [&_code]:bg-danger-500/10 [&_code]:border-danger-500/20 [&_code]:text-danger-900 [&_a]:text-danger-700 [&_a]:underline`,important:`border-important-500/50 bg-important-500/10 text-important-700 [&_code]:bg-important-500/10 [&_code]:border-important-500/20 [&_code]:text-important-900 [&_a]:text-important-700 [&_a]:underline`,info:`border-info-500/50 bg-info-500/10 text-info-700 [&_code]:bg-info-500/10 [&_code]:border-info-500/20 [&_code]:text-info-900 [&_a]:text-info-700 [&_a]:underline`,success:`border-success-500/50 bg-success-500/10 text-success-700 [&_code]:bg-success-500/10 [&_code]:border-success-500/20 [&_code]:text-success-900 [&_a]:text-success-700 [&_a]:underline`,warning:`border-warning-500/50 bg-warning-500/10 text-warning-700 [&_code]:bg-warning-500/10 [&_code]:border-warning-500/20 [&_code]:text-warning-900 [&_a]:text-warning-700 [&_a]:underline`},appearance:{banner:`border-x-0 border-t-0 rounded-none z-50 sticky`,default:``}},compoundVariants:[{priority:`danger`,appearance:`banner`,className:``},{priority:`important`,appearance:`banner`,className:``},{priority:`info`,appearance:`banner`,className:``},{priority:`success`,appearance:`banner`,className:``},{priority:`warning`,appearance:`banner`,className:``}]}),S=o(({appearance:t=`default`,className:n,priority:r,...i},a)=>{let o=c(()=>({priority:r}),[r]);return u(v.Provider,{value:o,children:u(`div`,{ref:a,"data-slot":`alert`,className:e(x({appearance:t,priority:r}),n),...i})})});S.displayName=`Alert`;const C={danger:u(m,{}),important:u(p,{mirrored:!0}),info:u(f,{}),success:u(d,{}),warning:u(h,{})},w=o(({className:n,svg:r,...i},a)=>{let o=C[b().priority];return u(t,{ref:a,"data-slot":`alert-icon`,className:e(`size-5`,n),svg:r??o,...i})});w.displayName=`AlertIcon`;const T=o(({className:t,...n},r)=>u(`div`,{ref:r,"data-slot":`alert-content`,className:e(`min-w-0 flex-1 has-data-alert-dismiss:pr-6`,t),...n}));T.displayName=`AlertContent`;const E=o(({asChild:t=!1,className:r,...i},a)=>u(t?n:`h5`,{ref:a,"data-slot":`alert-title`,className:e(`font-medium`,r),...i}));E.displayName=`AlertTitle`;const D=o(({asChild:t=!1,className:r,...i},a)=>u(t?n:`div`,{ref:a,"data-slot":`alert-description`,className:e(`text-sm`,r),...i}));D.displayName=`AlertDescription`;const O=e=>`var(--color-${e}-700)`,k=e=>`var(--color-${e}-800)`,A=e=>`color-mix(in oklab, var(--color-${e}-500) 10%, transparent)`,j=({size:t=`sm`,type:n=`button`,label:a=`Dismiss Alert`,appearance:o=`ghost`,className:s,icon:c=y,style:l,...d})=>{let f=b();return u(i,{appearance:o,icon:c,label:a,size:t,"data-slot":`alert-dismiss-icon-button`,"data-alert-dismiss":!0,className:e(`right-1.5 top-1.5 absolute`,`text-(--alert-dismiss-icon-color)`,`not-disabled:hover:bg-(--alert-dismiss-hover-bg) not-disabled:hover:text-(--alert-dismiss-icon-hover-color)`,s),type:n,style:r({...l,"--alert-dismiss-icon-color":O(f.priority),"--alert-dismiss-icon-hover-color":k(f.priority),"--alert-dismiss-hover-bg":A(f.priority)}),...d})};j.displayName=`AlertDismissIconButton`;const M={Root:S,Content:T,Description:D,DismissIconButton:j,Icon:w,Title:E};export{M as Alert};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./svg-only-DDx6FtJd.js";import{t as n}from"./slot-DmPrjM7N.js";import{t as r}from"./types-D85fCNV3.js";import{t as i}from"./icon-button-DV2-GZHf.js";import{createContext as a,forwardRef as o,useContext as s,useMemo as c}from"react";import l from"tiny-invariant";import{jsx as u}from"react/jsx-runtime";import{CheckCircleIcon as d}from"@phosphor-icons/react/CheckCircle";import{InfoIcon as f}from"@phosphor-icons/react/Info";import{MegaphoneIcon as p}from"@phosphor-icons/react/Megaphone";import{WarningIcon as m}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as h}from"@phosphor-icons/react/WarningDiamond";import{XIcon as g}from"@phosphor-icons/react/X";import{cva as _}from"class-variance-authority";const v=a(null),y=u(g,{});function b(){let e=s(v);return l(e,`useAlertContext hook used outside of Alert parent!`),e}const x=_(`relative flex w-full gap-1.5 rounded-md border p-2.5 text-sm font-sans`,{variants:{intent:{danger:`border-danger-500/50 bg-danger-500/10 text-danger-700 [&_code]:bg-danger-500/10 [&_code]:border-danger-500/20 [&_code]:text-danger-900 [&_a]:text-danger-700 [&_a]:underline`,important:`border-important-500/50 bg-important-500/10 text-important-700 [&_code]:bg-important-500/10 [&_code]:border-important-500/20 [&_code]:text-important-900 [&_a]:text-important-700 [&_a]:underline`,info:`border-info-500/50 bg-info-500/10 text-info-700 [&_code]:bg-info-500/10 [&_code]:border-info-500/20 [&_code]:text-info-900 [&_a]:text-info-700 [&_a]:underline`,success:`border-success-500/50 bg-success-500/10 text-success-700 [&_code]:bg-success-500/10 [&_code]:border-success-500/20 [&_code]:text-success-900 [&_a]:text-success-700 [&_a]:underline`,warning:`border-warning-500/50 bg-warning-500/10 text-warning-700 [&_code]:bg-warning-500/10 [&_code]:border-warning-500/20 [&_code]:text-warning-900 [&_a]:text-warning-700 [&_a]:underline`},appearance:{banner:`border-x-0 border-t-0 rounded-none z-50 sticky`,default:``}}}),S=o(({appearance:t=`default`,className:n,intent:r,...i},a)=>{let o=c(()=>({intent:r}),[r]);return u(v.Provider,{value:o,children:u(`div`,{ref:a,"data-slot":`alert`,className:e(x({appearance:t,intent:r}),n),...i})})});S.displayName=`Alert`;const C={danger:u(m,{}),important:u(p,{mirrored:!0}),info:u(f,{}),success:u(d,{}),warning:u(h,{})},w=o(({className:n,svg:r,...i},a)=>{let o=b(),s=C[o.intent];return u(t,{ref:a,"data-slot":`alert-icon`,className:e(`size-5`,n),svg:r??s,...i})});w.displayName=`AlertIcon`;const T=o(({className:t,...n},r)=>u(`div`,{ref:r,"data-slot":`alert-content`,className:e(`min-w-0 flex-1 has-data-alert-dismiss:pr-6`,t),...n}));T.displayName=`AlertContent`;const E=o(({asChild:t=!1,className:r,...i},a)=>u(t?n:`h5`,{ref:a,"data-slot":`alert-title`,className:e(`font-medium`,r),...i}));E.displayName=`AlertTitle`;const D=o(({asChild:t=!1,className:r,...i},a)=>u(t?n:`div`,{ref:a,"data-slot":`alert-description`,className:e(`text-sm`,r),...i}));D.displayName=`AlertDescription`;const O=e=>`var(--color-${e}-700)`,k=e=>`var(--color-${e}-800)`,A=e=>`color-mix(in oklab, var(--color-${e}-500) 10%, transparent)`,j=({size:t=`sm`,type:n=`button`,label:a=`Dismiss Alert`,appearance:o=`ghost`,className:s,icon:c=y,style:l,...d})=>{let f=b();return u(i,{appearance:o,icon:c,intent:`neutral`,label:a,size:t,"data-slot":`alert-dismiss-icon-button`,"data-alert-dismiss":!0,className:e(`right-1.5 top-1.5 absolute`,`text-(--alert-dismiss-icon-color)`,`not-disabled:hover:bg-(--alert-dismiss-hover-bg) not-disabled:hover:text-(--alert-dismiss-icon-hover-color)`,s),type:n,style:r({...l,"--alert-dismiss-icon-color":O(f.intent),"--alert-dismiss-icon-hover-color":k(f.intent),"--alert-dismiss-hover-bg":A(f.intent)}),...d})};j.displayName=`AlertDismissIconButton`;const M={Root:S,Content:T,Description:D,DismissIconButton:j,Icon:w,Title:E};export{M as Alert};
@@ -1 +1 @@
1
- import{t as e}from"./cx-C1UYP5We.js";import{t}from"./icon-SUx16Sl3.js";import{t as n}from"./slot-DT_E5BQx.js";import{Children as r,cloneElement as i,forwardRef as a,isValidElement as o}from"react";import s from"tiny-invariant";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";const d=t=>e(`cursor-pointer rounded bg-transparent text-accent-600 hover:underline focus:outline-hidden focus-visible:ring-3 focus-visible:ring-focus-accent`,t),f=a(({asChild:e,children:a,className:f,rel:m,icon:h,iconPlacement:g=`start`,..._},v)=>{let y=p(m),b={"data-slot":`anchor`,className:d(f),ref:v,rel:y,..._};if(e){let e=r.only(a);s(o(e),"When using `asChild`, Anchor must be passed a single child as a JSX tag.");let d=e.props?.children;return l(n,{...b,children:i(e,{},u(c,{children:[h&&g===`start`&&l(t,{className:`inline-block mr-1.5`,svg:h}),d,h&&g===`end`&&l(t,{className:`inline-block ml-1.5`,svg:h})]}))})}return u(`a`,{...b,children:[h&&g===`start`&&l(t,{className:`inline-block mr-1.5`,svg:h}),a,h&&g===`end`&&l(t,{className:`inline-block ml-1.5`,svg:h})]})});f.displayName=`Anchor`;function p(e){return Array.isArray(e)?[...new Set(e)].map(e=>e?.trim()).filter(Boolean).toSorted().join(` `)||void 0:e?.trim()||void 0}export{d as n,p as r,f as t};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-CDtYjF_H.js";import{t as n}from"./slot-DmPrjM7N.js";import{Children as r,cloneElement as i,forwardRef as a,isValidElement as o}from"react";import s from"tiny-invariant";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";const d=t=>e(`cursor-pointer rounded bg-transparent text-accent-600 hover:underline focus:outline-hidden focus-visible:ring-3 focus-visible:ring-focus-accent`,t),f=a(({asChild:e,children:a,className:f,rel:m,icon:h,iconPlacement:g=`start`,..._},v)=>{let y=p(m),b={"data-slot":`anchor`,className:d(f),ref:v,rel:y,..._};if(e){let e=r.only(a);s(o(e),"When using `asChild`, Anchor must be passed a single child as a JSX tag.");let d=e.props?.children;return l(n,{...b,children:i(e,{},u(c,{children:[h&&g===`start`&&l(t,{className:`inline-block mr-1.5`,svg:h}),d,h&&g===`end`&&l(t,{className:`inline-block ml-1.5`,svg:h})]}))})}return u(`a`,{...b,children:[h&&g===`start`&&l(t,{className:`inline-block mr-1.5`,svg:h}),a,h&&g===`end`&&l(t,{className:`inline-block ml-1.5`,svg:h})]})});f.displayName=`Anchor`;function p(e){return Array.isArray(e)?[...new Set(e)].map(e=>e?.trim()).filter(Boolean).toSorted().join(` `)||void 0:e?.trim()||void 0}export{d as n,p as r,f as t};
package/dist/anchor.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { t as WithAsChild } from "./as-child-uN_018tj.js";
1
+ import { t as WithAsChild } from "./as-child-CYEVu1WY.js";
2
2
  import { ComponentProps, ReactNode } from "react";
3
-
4
3
  //#region src/components/anchor/types.d.ts
5
4
  /**
6
5
  * The rel attribute defines the relationship between a linked resource and the current document. Valid on <link>, <a>, <area>, and <form>, the supported values depend on the element on which the attribute is found.
@@ -53,7 +52,7 @@ type AnchorProps = Omit<ComponentProps<"a">, "rel"> & WithAsChild & {
53
52
  * primitive ({@link https://reactrouter.com/en/main/components/link `react-router` `<Link>`})
54
53
  * so client-side navigation kicks in. You can keep mantle's styling by
55
54
  * composing: `<Anchor asChild><Link to="/foo">…</Link></Anchor>`.
56
- * - For triggering an action — use a {@link https://mantle.ngrok.com/components/button Button}
55
+ * - For triggering an action — use a {@link https://mantle.ngrok.com/components/actions/button Button}
57
56
  * instead. If it doesn't navigate, it's not a link.
58
57
  *
59
58
  * **Icons.** Pass `icon` (a phosphor or custom SVG) and optionally
@@ -69,7 +68,7 @@ type AnchorProps = Omit<ComponentProps<"a">, "rel"> & WithAsChild & {
69
68
  * here" / "read more". For purely decorative icons, no extra labeling is
70
69
  * needed; for icon-only links, provide an `aria-label`.
71
70
  *
72
- * @see https://mantle.ngrok.com/components/anchor
71
+ * @see https://mantle.ngrok.com/components/navigation/anchor
73
72
  *
74
73
  * @example
75
74
  * ```tsx
package/dist/anchor.js CHANGED
@@ -1 +1 @@
1
- import{n as e,r as t,t as n}from"./anchor-BtgEJoPN.js";export{n as Anchor,e as anchorClassNames,t as resolveRel};
1
+ import{n as e,r as t,t as n}from"./anchor-C_tjSVy6.js";export{n as Anchor,e as anchorClassNames,t as resolveRel};
@@ -1,5 +1,4 @@
1
1
  import { ReactNode } from "react";
2
-
3
2
  //#region src/types/as-child.d.ts
4
3
  /**
5
4
  * Utility type for adding the optional `asChild` boolean prop to a component.
@@ -20,11 +19,5 @@ type WithAsChild = {
20
19
  */
21
20
  asChild?: boolean;
22
21
  };
23
- /**
24
- * Utility type for adding the optional `asChild` boolean prop to a component
25
- * that is self-closing.
26
- * This is useful for components that do not have children, but still need to
27
- * support the `asChild` prop.
28
- */
29
22
  //#endregion
30
23
  export { WithAsChild as t };
package/dist/badge.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import { t as WithAsChild } from "./as-child-uN_018tj.js";
1
+ import { t as WithAsChild } from "./as-child-CYEVu1WY.js";
2
2
  import { t as Color } from "./index-DorCusfG.js";
3
3
  import { ComponentProps, ReactNode } from "react";
4
-
5
4
  //#region src/components/badge/badge.d.ts
6
5
  declare const appearances: readonly ["muted"];
7
6
  type Appearance = (typeof appearances)[number];
@@ -19,59 +18,9 @@ type BadgeProps = ComponentProps<"span"> & WithAsChild & {
19
18
  */
20
19
  appearance: Appearance;
21
20
  };
22
- /**
23
- * A non-interactive label used to highlight short, scannable information —
24
- * a status, a category tag, or a count — in the smallest possible footprint.
25
- *
26
- * **When to use**
27
- * - Status indicators: `Succeeded`, `Failed`, `Pending`, `Beta`.
28
- * - Category or tag chips alongside list items, table rows, or cards.
29
- * - Counts (e.g. `12 new`) when paired with brief context.
30
- *
31
- * **When not to use**
32
- * - For interactive UI. Badges are not buttons or links — use {@link https://mantle.ngrok.com/components/button Button}
33
- * or {@link https://mantle.ngrok.com/components/anchor Anchor} (optionally with `asChild` styling) instead.
34
- * - For long-form text. Keep labels to one or two short words.
35
- * - As the sole signal of meaning. Pair color with a label or icon so the
36
- * distinction works without color (color blindness, monochrome themes).
37
- *
38
- * **Choosing a `color`.** Prefer functional colors (`success`, `warning`,
39
- * `danger`, `info`, `accent`, `neutral`) for status meaning so theming
40
- * stays coherent. Reach for named hues only when the badge's semantic role
41
- * isn't already covered.
42
- *
43
- * **Polymorphism.** Pass `asChild` to render the badge as a single child
44
- * element — useful when the badge wraps a link or other semantic element
45
- * while keeping the badge styling.
46
- *
47
- * @see https://mantle.ngrok.com/components/badge
48
- *
49
- * @example
50
- * ```tsx
51
- * import { Badge } from "@ngrok/mantle/badge";
52
- * import { CheckCircleIcon } from "@phosphor-icons/react/CheckCircle";
53
- *
54
- * <Badge appearance="muted" color="success" icon={<CheckCircleIcon />}>
55
- * Succeeded
56
- * </Badge>
57
- *
58
- * // Polymorphic — render the badge as a link, preserving its styling.
59
- * <Badge appearance="muted" color="info" asChild>
60
- * <a href="/status">Operational</a>
61
- * </Badge>
62
- * ```
63
- */
64
- declare const Badge: {
65
- ({
66
- appearance,
67
- asChild,
68
- children,
69
- className,
70
- color,
71
- icon,
72
- ...props
73
- }: BadgeProps): import("react").JSX.Element;
74
- displayName: string;
75
- };
21
+ declare function Badge({ appearance, asChild, children, className, color, icon, ...props }: BadgeProps): import("react").JSX.Element;
22
+ declare namespace Badge {
23
+ var displayName: string;
24
+ }
76
25
  //#endregion
77
26
  export { Badge, type BadgeProps };
package/dist/badge.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-C1UYP5We.js";import{t}from"./svg-only-CSOaF1tL.js";import{t as n}from"./slot-DT_E5BQx.js";import{Children as r,cloneElement as i,isValidElement as a}from"react";import o from"tiny-invariant";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";const u=({appearance:u,asChild:d=!1,children:p,className:h,color:g=`neutral`,icon:_,...v})=>{let y=f(g,u),b=m(g,u),x=e(`inline-flex w-fit shrink-0 cursor-default items-center gap-1 rounded px-1.5 py-0.5 font-medium text-xs font-sans`,_&&`ps-1`,y,b,h);if(d){let e=r.only(p);o(a(e),"When using `asChild`, Badge must be passed a single child as a JSX tag.");let u=e.props?.children;return c(n,{"data-slot":`badge`,className:x,...v,children:i(e,{},l(s,{children:[_&&c(t,{className:`size-4`,svg:_}),u]}))})}return l(`span`,{"data-slot":`badge`,className:x,...v,children:[_&&c(t,{className:`size-4`,svg:_}),p]})};u.displayName=`Badge`;const d={amber:`bg-amber-500/20`,blue:`bg-blue-500/20`,cyan:`bg-cyan-500/20`,emerald:`bg-emerald-500/20`,fuchsia:`bg-fuchsia-500/20`,gray:`bg-gray-500/20`,green:`bg-green-500/20`,indigo:`bg-indigo-500/20`,lime:`bg-lime-500/20`,orange:`bg-orange-500/20`,pink:`bg-pink-500/20`,purple:`bg-purple-500/20`,red:`bg-red-500/20`,rose:`bg-rose-500/20`,sky:`bg-sky-500/20`,teal:`bg-teal-500/20`,violet:`bg-violet-500/20`,yellow:`bg-yellow-500/20`,accent:`bg-accent-500/20`,danger:`bg-danger-500/20`,important:`bg-important-500/20`,info:`bg-info-500/20`,neutral:`bg-neutral-500/20`,success:`bg-success-500/20`,warning:`bg-warning-500/20`};function f(e,t){switch(t){case`muted`:return d[e];default:o(!1,`Invalid appearance: ${String(t)}`)}}const p={amber:`text-amber-700`,blue:`text-blue-700`,cyan:`text-cyan-700`,emerald:`text-emerald-700`,fuchsia:`text-fuchsia-700`,gray:`text-gray-700`,green:`text-green-700`,indigo:`text-indigo-700`,lime:`text-lime-700`,orange:`text-orange-700`,pink:`text-pink-700`,purple:`text-purple-700`,red:`text-red-700`,rose:`text-rose-700`,sky:`text-sky-700`,teal:`text-teal-700`,violet:`text-violet-700`,yellow:`text-yellow-700`,accent:`text-accent-700`,danger:`text-danger-700`,important:`text-important-700`,info:`text-info-700`,neutral:`text-neutral-700`,success:`text-success-700`,warning:`text-warning-700`};function m(e,t){switch(t){case`muted`:return p[e];default:o(!1,`Invalid appearance: ${String(t)}`)}}export{u as Badge};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./svg-only-DDx6FtJd.js";import{t as n}from"./slot-DmPrjM7N.js";import{Children as r,cloneElement as i,isValidElement as a}from"react";import o from"tiny-invariant";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";const u=({appearance:u,asChild:d=!1,children:p,className:h,color:g=`neutral`,icon:_,...v})=>{let y=f(g,u),b=m(g,u),x=e(`inline-flex w-fit shrink-0 cursor-default items-center gap-1 rounded px-1.5 py-0.5 font-medium text-xs font-sans`,_&&`ps-1`,y,b,h);if(d){let e=r.only(p);o(a(e),"When using `asChild`, Badge must be passed a single child as a JSX tag.");let u=e.props?.children;return c(n,{"data-slot":`badge`,className:x,...v,children:i(e,{},l(s,{children:[_&&c(t,{className:`size-4`,svg:_}),u]}))})}return l(`span`,{"data-slot":`badge`,className:x,...v,children:[_&&c(t,{className:`size-4`,svg:_}),p]})};u.displayName=`Badge`;const d={amber:`bg-amber-500/20`,blue:`bg-blue-500/20`,cyan:`bg-cyan-500/20`,emerald:`bg-emerald-500/20`,fuchsia:`bg-fuchsia-500/20`,gray:`bg-gray-500/20`,green:`bg-green-500/20`,indigo:`bg-indigo-500/20`,lime:`bg-lime-500/20`,orange:`bg-orange-500/20`,pink:`bg-pink-500/20`,purple:`bg-purple-500/20`,red:`bg-red-500/20`,rose:`bg-rose-500/20`,sky:`bg-sky-500/20`,teal:`bg-teal-500/20`,violet:`bg-violet-500/20`,yellow:`bg-yellow-500/20`,accent:`bg-accent-500/20`,danger:`bg-danger-500/20`,important:`bg-important-500/20`,info:`bg-info-500/20`,neutral:`bg-neutral-500/20`,success:`bg-success-500/20`,warning:`bg-warning-500/20`};function f(e,t){switch(t){case`muted`:return d[e];default:o(!1,`Invalid appearance: ${String(t)}`)}}const p={amber:`text-amber-700`,blue:`text-blue-700`,cyan:`text-cyan-700`,emerald:`text-emerald-700`,fuchsia:`text-fuchsia-700`,gray:`text-gray-700`,green:`text-green-700`,indigo:`text-indigo-700`,lime:`text-lime-700`,orange:`text-orange-700`,pink:`text-pink-700`,purple:`text-purple-700`,red:`text-red-700`,rose:`text-rose-700`,sky:`text-sky-700`,teal:`text-teal-700`,violet:`text-violet-700`,yellow:`text-yellow-700`,accent:`text-accent-700`,danger:`text-danger-700`,important:`text-important-700`,info:`text-info-700`,neutral:`text-neutral-700`,success:`text-success-700`,warning:`text-warning-700`};function m(e,t){switch(t){case`muted`:return p[e];default:o(!1,`Invalid appearance: ${String(t)}`)}}export{u as Badge};
@@ -0,0 +1,212 @@
1
+ import { t as WithAsChild } from "./as-child-CYEVu1WY.js";
2
+ import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
3
+ import { ReactNode } from "react";
4
+ //#region src/components/breadcrumb/breadcrumb.d.ts
5
+ /**
6
+ * Compound component for WAI-ARIA breadcrumb navigation — the path from a
7
+ * root to the current page as an ordered list of links inside a labeled
8
+ * `<nav>` landmark. Router-agnostic: compose `Breadcrumb.Link` onto your app
9
+ * router's link via `asChild`.
10
+ *
11
+ * @see https://mantle.ngrok.com/components/navigation/breadcrumb
12
+ *
13
+ * @example
14
+ * Composition:
15
+ * ```
16
+ * Breadcrumb.Root
17
+ * └── Breadcrumb.List
18
+ * ├── Breadcrumb.Item
19
+ * │ └── Breadcrumb.Link
20
+ * ├── Breadcrumb.Separator
21
+ * └── Breadcrumb.Item
22
+ * └── Breadcrumb.Page
23
+ * ```
24
+ *
25
+ * @example
26
+ * ```tsx
27
+ * <Breadcrumb.Root>
28
+ * <Breadcrumb.List>
29
+ * <Breadcrumb.Item>
30
+ * <Breadcrumb.Link href="/">Home</Breadcrumb.Link>
31
+ * </Breadcrumb.Item>
32
+ * <Breadcrumb.Separator />
33
+ * <Breadcrumb.Item>
34
+ * <Breadcrumb.Link href="/endpoints">Endpoints</Breadcrumb.Link>
35
+ * </Breadcrumb.Item>
36
+ * <Breadcrumb.Separator />
37
+ * <Breadcrumb.Item>
38
+ * <Breadcrumb.Page>ep_2h8…</Breadcrumb.Page>
39
+ * </Breadcrumb.Item>
40
+ * </Breadcrumb.List>
41
+ * </Breadcrumb.Root>
42
+ * ```
43
+ */
44
+ declare const Breadcrumb: {
45
+ /**
46
+ * The breadcrumb landmark. Renders a `<nav>` with a default
47
+ * `aria-label="Breadcrumb"` — pass your own `aria-label` to override it.
48
+ * Carries no visual styling of its own.
49
+ *
50
+ * @see https://mantle.ngrok.com/components/navigation/breadcrumb
51
+ *
52
+ * @example
53
+ * ```tsx
54
+ * <Breadcrumb.Root>
55
+ * <Breadcrumb.List>
56
+ * <Breadcrumb.Item>
57
+ * <Breadcrumb.Link href="/">Home</Breadcrumb.Link>
58
+ * </Breadcrumb.Item>
59
+ * <Breadcrumb.Separator />
60
+ * <Breadcrumb.Item>
61
+ * <Breadcrumb.Link href="/endpoints">Endpoints</Breadcrumb.Link>
62
+ * </Breadcrumb.Item>
63
+ * <Breadcrumb.Separator />
64
+ * <Breadcrumb.Item>
65
+ * <Breadcrumb.Page>ep_2h8…</Breadcrumb.Page>
66
+ * </Breadcrumb.Item>
67
+ * </Breadcrumb.List>
68
+ * </Breadcrumb.Root>
69
+ * ```
70
+ */
71
+ readonly Root: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLElement> & import("react").HTMLAttributes<HTMLElement> & WithAsChild & WithDataSlot, "ref"> & import("react").RefAttributes<HTMLElement>>;
72
+ /**
73
+ * The ordered list of crumbs. Renders an `<ol>` — the order of the items
74
+ * is the hierarchy, from the root to the current page.
75
+ *
76
+ * @see https://mantle.ngrok.com/components/navigation/breadcrumb
77
+ *
78
+ * @example
79
+ * ```tsx
80
+ * <Breadcrumb.Root>
81
+ * <Breadcrumb.List>
82
+ * <Breadcrumb.Item>
83
+ * <Breadcrumb.Link href="/">Home</Breadcrumb.Link>
84
+ * </Breadcrumb.Item>
85
+ * <Breadcrumb.Separator />
86
+ * <Breadcrumb.Item>
87
+ * <Breadcrumb.Link href="/endpoints">Endpoints</Breadcrumb.Link>
88
+ * </Breadcrumb.Item>
89
+ * <Breadcrumb.Separator />
90
+ * <Breadcrumb.Item>
91
+ * <Breadcrumb.Page>ep_2h8…</Breadcrumb.Page>
92
+ * </Breadcrumb.Item>
93
+ * </Breadcrumb.List>
94
+ * </Breadcrumb.Root>
95
+ * ```
96
+ */
97
+ readonly List: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLOListElement> & import("react").OlHTMLAttributes<HTMLOListElement> & WithAsChild & WithDataSlot, "ref"> & import("react").RefAttributes<HTMLOListElement>>;
98
+ /**
99
+ * A single crumb. Renders an `<li>` containing a `Breadcrumb.Link` or
100
+ * `Breadcrumb.Page`.
101
+ *
102
+ * @see https://mantle.ngrok.com/components/navigation/breadcrumb
103
+ *
104
+ * @example
105
+ * ```tsx
106
+ * <Breadcrumb.Root>
107
+ * <Breadcrumb.List>
108
+ * <Breadcrumb.Item>
109
+ * <Breadcrumb.Link href="/">Home</Breadcrumb.Link>
110
+ * </Breadcrumb.Item>
111
+ * <Breadcrumb.Separator />
112
+ * <Breadcrumb.Item>
113
+ * <Breadcrumb.Link href="/endpoints">Endpoints</Breadcrumb.Link>
114
+ * </Breadcrumb.Item>
115
+ * <Breadcrumb.Separator />
116
+ * <Breadcrumb.Item>
117
+ * <Breadcrumb.Page>ep_2h8…</Breadcrumb.Page>
118
+ * </Breadcrumb.Item>
119
+ * </Breadcrumb.List>
120
+ * </Breadcrumb.Root>
121
+ * ```
122
+ */
123
+ readonly Item: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLLIElement> & import("react").LiHTMLAttributes<HTMLLIElement> & WithAsChild & WithDataSlot, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
124
+ /**
125
+ * A link to an ancestor page. Renders an `<a>` by default; use `asChild`
126
+ * to compose onto your app router's link (e.g. react-router's `<Link>`).
127
+ *
128
+ * @see https://mantle.ngrok.com/components/navigation/breadcrumb
129
+ *
130
+ * @example
131
+ * ```tsx
132
+ * <Breadcrumb.Root>
133
+ * <Breadcrumb.List>
134
+ * <Breadcrumb.Item>
135
+ * <Breadcrumb.Link href="/">Home</Breadcrumb.Link>
136
+ * </Breadcrumb.Item>
137
+ * <Breadcrumb.Separator />
138
+ * <Breadcrumb.Item>
139
+ * <Breadcrumb.Link href="/endpoints">Endpoints</Breadcrumb.Link>
140
+ * </Breadcrumb.Item>
141
+ * <Breadcrumb.Separator />
142
+ * <Breadcrumb.Item>
143
+ * <Breadcrumb.Page>ep_2h8…</Breadcrumb.Page>
144
+ * </Breadcrumb.Item>
145
+ * </Breadcrumb.List>
146
+ * </Breadcrumb.Root>
147
+ * ```
148
+ */
149
+ readonly Link: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLAnchorElement> & import("react").AnchorHTMLAttributes<HTMLAnchorElement> & WithAsChild & WithDataSlot, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
150
+ /**
151
+ * The current page — the last crumb. Renders a `<span>` (not a link) with
152
+ * `aria-current="page"`; the ARIA is the part's whole contract and is not
153
+ * overridable.
154
+ *
155
+ * @see https://mantle.ngrok.com/components/navigation/breadcrumb
156
+ *
157
+ * @example
158
+ * ```tsx
159
+ * <Breadcrumb.Root>
160
+ * <Breadcrumb.List>
161
+ * <Breadcrumb.Item>
162
+ * <Breadcrumb.Link href="/">Home</Breadcrumb.Link>
163
+ * </Breadcrumb.Item>
164
+ * <Breadcrumb.Separator />
165
+ * <Breadcrumb.Item>
166
+ * <Breadcrumb.Link href="/endpoints">Endpoints</Breadcrumb.Link>
167
+ * </Breadcrumb.Item>
168
+ * <Breadcrumb.Separator />
169
+ * <Breadcrumb.Item>
170
+ * <Breadcrumb.Page>ep_2h8…</Breadcrumb.Page>
171
+ * </Breadcrumb.Item>
172
+ * </Breadcrumb.List>
173
+ * </Breadcrumb.Root>
174
+ * ```
175
+ */
176
+ readonly Page: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & WithAsChild & WithDataSlot, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
177
+ /**
178
+ * A purely visual divider between crumbs, hidden from assistive
179
+ * technology (`role="presentation"` + `aria-hidden`). Children default to
180
+ * a caret icon; pass your own (e.g. a slash) to replace it.
181
+ *
182
+ * @see https://mantle.ngrok.com/components/navigation/breadcrumb
183
+ *
184
+ * @example
185
+ * ```tsx
186
+ * <Breadcrumb.Root>
187
+ * <Breadcrumb.List>
188
+ * <Breadcrumb.Item>
189
+ * <Breadcrumb.Link href="/">Home</Breadcrumb.Link>
190
+ * </Breadcrumb.Item>
191
+ * <Breadcrumb.Separator />
192
+ * <Breadcrumb.Item>
193
+ * <Breadcrumb.Link href="/endpoints">Endpoints</Breadcrumb.Link>
194
+ * </Breadcrumb.Item>
195
+ * <Breadcrumb.Separator />
196
+ * <Breadcrumb.Item>
197
+ * <Breadcrumb.Page>ep_2h8…</Breadcrumb.Page>
198
+ * </Breadcrumb.Item>
199
+ * </Breadcrumb.List>
200
+ * </Breadcrumb.Root>
201
+ * ```
202
+ */
203
+ readonly Separator: import("react").ForwardRefExoticComponent<(Omit<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "children"> & {
204
+ asChild: true;
205
+ children: ReactNode;
206
+ } & WithDataSlot, "ref"> | Omit<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "children"> & {
207
+ asChild?: false | undefined;
208
+ children?: ReactNode;
209
+ } & WithDataSlot, "ref">) & import("react").RefAttributes<HTMLLIElement>>;
210
+ };
211
+ //#endregion
212
+ export { Breadcrumb };
@@ -0,0 +1 @@
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-CDtYjF_H.js";import{n,t as r}from"./slot-DmPrjM7N.js";import{cloneElement as i,forwardRef as a,isValidElement as o}from"react";import{jsx as s}from"react/jsx-runtime";import{CaretRightIcon as c}from"@phosphor-icons/react/CaretRight";const l=a(({asChild:e,children:t,"data-slot":i,...a},o)=>s(e?r:`nav`,{ref:o,"data-slot":n(i,`breadcrumb`),"aria-label":`Breadcrumb`,...a,children:t}));l.displayName=`Breadcrumb`;const u=a(({asChild:t,children:i,className:a,"data-slot":o,...c},l)=>s(t?r:`ol`,{ref:l,"data-slot":n(o,`breadcrumb-list`),className:e(`text-muted flex flex-wrap items-center gap-1.5 text-sm`,a),...c,children:i}));u.displayName=`BreadcrumbList`;const d=a(({asChild:t,children:i,className:a,"data-slot":o,...c},l)=>s(t?r:`li`,{ref:l,"data-slot":n(o,`breadcrumb-item`),className:e(`inline-flex items-center gap-1.5`,a),...c,children:i}));d.displayName=`BreadcrumbItem`;const f=a(({asChild:t,children:i,className:a,"data-slot":o,...c},l)=>s(t?r:`a`,{ref:l,"data-slot":n(o,`breadcrumb-link`),className:e(`hover:text-strong transition-colors`,a),...c,children:i}));f.displayName=`BreadcrumbLink`;const p=a(({asChild:t,children:a,className:c,"data-slot":l,...u},d)=>{let f=t?r:`span`,p=t&&o(a)?i(a,{"aria-current":`page`}):a;return s(f,{ref:d,"data-slot":n(l,`breadcrumb-page`),className:e(`text-strong`,c),...u,"aria-current":`page`,children:p})});p.displayName=`BreadcrumbPage`;const m=a(({asChild:e,children:a,className:l,"data-slot":u,...d},f)=>{let p=e?r:`li`,m=e&&o(a)?i(a,{role:`presentation`,"aria-hidden":`true`}):a??s(t,{svg:s(c,{}),className:`size-3.5`});return s(p,{ref:f,"data-slot":n(u,`breadcrumb-separator`),className:l,...d,role:`presentation`,"aria-hidden":`true`,children:m})});m.displayName=`BreadcrumbSeparator`;const h={Root:l,List:u,Item:d,Link:f,Page:p,Separator:m};export{h as Breadcrumb};
@@ -1,5 +1,4 @@
1
1
  import { ReactNode } from "react";
2
-
3
2
  //#region src/components/browser-only/browser-only.d.ts
4
3
  type Props = {
5
4
  /**
@@ -27,7 +26,7 @@ type Props = {
27
26
  * the `fallback` is rendered.
28
27
  * - On the client, after hydration, the `children` render function is called.
29
28
  *
30
- * @see https://mantle.ngrok.com/components/browser-only
29
+ * @see https://mantle.ngrok.com/components/primitives/browser-only
31
30
  *
32
31
  * @example
33
32
  * ```tsx
@@ -38,10 +37,7 @@ type Props = {
38
37
  *
39
38
  * @see useIsHydrated
40
39
  */
41
- declare function BrowserOnly({
42
- children,
43
- fallback
44
- }: Props): ReactNode;
40
+ declare function BrowserOnly({ children, fallback }: Props): ReactNode;
45
41
  /**
46
42
  * Detects whether DOM APIs are available.
47
43
  *
@@ -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";import{cva as i}from"class-variance-authority";const a=i(`border-form inline-flex items-center rounded-md`,{variants:{appearance:{panel:`bg-form gap-0.5 border p-0.75 [--icon-button-border-radius:0.125rem] [&>.separator]:mx-px`,ghost:`gap-0.5`,outlined:``}}}),o=n(({appearance:n,asChild:i,className:o,children:s,...c},l)=>r(i?t:`div`,{"data-slot":`button-group`,className:e(a({appearance:n}),o),ref:l,...c,children:s}));o.displayName=`ButtonGroup`;export{o as t};
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";import{cva as i}from"class-variance-authority";const a=i(`border-form inline-flex items-center rounded-md`,{variants:{appearance:{panel:`bg-form gap-0.5 border p-0.75 [--icon-button-border-radius:0.125rem] [&>.separator]:mx-px`,ghost:`gap-0.5`,outlined:``}}}),o=n(({appearance:n,asChild:i,className:o,children:s,...c},l)=>r(i?t:`div`,{"data-slot":`button-group`,className:e(a({appearance:n}),o),ref:l,...c,children:s}));o.displayName=`ButtonGroup`;export{o as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-CDtYjF_H.js";import{t as n}from"./slot-DmPrjM7N.js";import{t as r}from"./booleanish-BfvnW6vy.js";import{t as i}from"./clsx-DUGZgXfJ.js";import{Children as a,cloneElement as o,forwardRef as s,isValidElement as c}from"react";import l from"tiny-invariant";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";import{cva as p}from"class-variance-authority";import{CircleNotchIcon as m}from"@phosphor-icons/react/CircleNotch";const h=p(``,{variants:{appearance:{filled:`bg-filled-accent text-white focus-visible:ring-focus-accent not-disabled:hover:bg-filled-accent-hover border border-transparent text-sm font-medium`,ghost:`text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700 border border-transparent text-sm font-medium`,outlined:`border-accent-600 bg-form text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-accent-700 not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700 border text-sm font-medium`,link:`text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:underline group/button-link border-transparent`},isLoading:{false:``,true:`opacity-50`},intent:{accent:``,danger:``,neutral:``},size:{xs:``,sm:``,md:``,lg:``,xl:``}},defaultVariants:{isLoading:!1,size:`md`},compoundVariants:[{appearance:[`filled`,`ghost`,`outlined`],size:`xs`,class:`h-6 px-2`},{appearance:[`filled`,`ghost`,`outlined`],size:`sm`,class:`h-7 px-2.5`},{appearance:[`filled`,`ghost`,`outlined`],size:`md`,class:`h-9 px-3`},{appearance:[`filled`,`ghost`,`outlined`],size:`lg`,class:`h-10 px-3.5`},{appearance:[`filled`,`ghost`,`outlined`],size:`xl`,class:`h-12 px-4`},{appearance:`ghost`,intent:`danger`,class:`text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700 border-transparent`},{appearance:`outlined`,intent:`danger`,class:`border-danger-600 bg-form text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:border-danger-700 not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700`},{appearance:`filled`,intent:`danger`,class:`bg-filled-danger focus-visible:ring-focus-danger not-disabled:hover:bg-filled-danger-hover border-transparent`},{appearance:`link`,intent:`danger`,class:`text-danger-600 focus-visible:ring-focus-danger`},{appearance:`ghost`,intent:`neutral`,class:`text-strong focus-visible:ring-focus-accent not-disabled:hover:bg-neutral-500/10 not-disabled:hover:text-strong border-transparent`},{appearance:`outlined`,intent:`neutral`,class:`border-form bg-form text-strong focus-visible:border-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-neutral-400 not-disabled:hover:bg-form-hover not-disabled:hover:text-strong focus-visible:not-disabled:hover:border-accent-600`},{appearance:`filled`,intent:`neutral`,class:`bg-filled-neutral not-disabled:hover:bg-filled-neutral-hover border-transparent focus-visible:border-transparent text-neutral-50`},{appearance:`link`,intent:`neutral`,class:`text-strong focus-visible:ring-focus-accent`}]}),g={xs:`ps-1.5`,sm:`ps-2`,md:`ps-2.5`,lg:`ps-3`,xl:`ps-3.5`},_={xs:`pe-1.5`,sm:`pe-2`,md:`pe-2.5`,lg:`pe-3`,xl:`pe-3.5`},v=s(({"aria-disabled":s,appearance:p,asChild:v,children:y,className:b,disabled:x,icon:S,iconPlacement:C=`start`,intent:w,isLoading:T=!1,size:E=`md`,type:D,...O},k)=>{let A=r(s??x??T),j=T?d(m,{className:`animate-spin`}):S,M=j&&p!==`link`,N={"aria-disabled":A,"data-slot":`button`,className:e(`inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md`,`focus:outline-hidden focus-visible:ring-4`,`disabled:cursor-default disabled:opacity-50`,`not-disabled:active:scale-97 ease-out transition-transform duration-150`,h({appearance:p,intent:w,isLoading:T,size:E}),p!==`link`&&`font-sans`,M&&C===`start`&&g[E],M&&C===`end`&&_[E],b),"data-appearance":p,"data-disabled":A,"data-intent":w,"data-loading":T,"data-size":p===`link`?void 0:E,disabled:A,ref:k,...O};return v?(l(c(y)&&a.only(y),"When using `asChild`, Button must be passed a single child as a JSX tag."),d(n,{...N,children:o(y,{},f(u,{children:[j&&d(t,{svg:j,className:i(C===`end`&&`order-last`)}),y.props.children]}))})):f(`button`,{...N,type:D??`button`,children:[j&&d(t,{svg:j,className:i(C===`end`&&`order-last`)}),y]})});v.displayName=`Button`;export{v as t};