@ngrok/mantle 0.80.0 → 0.81.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/dist/accordion.d.ts +19 -37
  2. package/dist/accordion.js +1 -1
  3. package/dist/agent.json +5 -1
  4. package/dist/alert-dialog.d.ts +15 -48
  5. package/dist/alert-dialog.js +1 -1
  6. package/dist/alert.d.ts +167 -83
  7. package/dist/alert.js +1 -1
  8. package/dist/{anchor-_2meGDfj.js → anchor-DfeXTpKW.js} +1 -1
  9. package/dist/anchor.js +1 -1
  10. package/dist/area-chart.d.ts +505 -0
  11. package/dist/area-chart.js +1 -0
  12. package/dist/badge.js +1 -1
  13. package/dist/bar-chart.d.ts +492 -0
  14. package/dist/bar-chart.js +1 -0
  15. package/dist/breadcrumb.d.ts +6 -24
  16. package/dist/breadcrumb.js +1 -1
  17. package/dist/button-BAno7KIU.js +1 -0
  18. package/dist/{index-C2jj8U4a.d.ts → button-C-gMbPso.d.ts} +2 -2
  19. package/dist/{icon-button-C1AfGnQx.d.ts → button-C7vAl6lS.d.ts} +16 -3
  20. package/dist/{button-BPMwa2jN.d.ts → button-DARFK2KJ.d.ts} +1 -1
  21. package/dist/{button-5WsvzIQ6.js → button-DjpEKt2X.js} +1 -1
  22. package/dist/button-DvHMWAPl.js +1 -0
  23. package/dist/button.d.ts +5 -5
  24. package/dist/button.js +1 -1
  25. package/dist/calendar.js +1 -1
  26. package/dist/card.d.ts +5 -20
  27. package/dist/card.js +1 -1
  28. package/dist/centered-layout.d.ts +5 -20
  29. package/dist/centered-layout.js +1 -1
  30. package/dist/chart-1cVjAcj8.d.ts +334 -0
  31. package/dist/chart-Do2qkrxl.js +2 -0
  32. package/dist/checkbox-0EoxOyMA.js +1 -0
  33. package/dist/checkbox.d.ts +13 -1
  34. package/dist/checkbox.js +1 -1
  35. package/dist/choice-BHwFSSyv.js +1 -0
  36. package/dist/{choice-Ct0KK8jw.d.ts → choice-BNRQXszu.d.ts} +5 -20
  37. package/dist/choice.d.ts +1 -1
  38. package/dist/choice.js +1 -1
  39. package/dist/code-block.d.ts +60 -44
  40. package/dist/code-block.js +6 -6
  41. package/dist/code-block_highlight-utils.d.ts +1 -1
  42. package/dist/code-block_highlight-utils.js +1 -1
  43. package/dist/combobox.d.ts +9 -33
  44. package/dist/combobox.js +1 -1
  45. package/dist/command.d.ts +70 -18
  46. package/dist/command.js +1 -1
  47. package/dist/data-table.d.ts +6 -12
  48. package/dist/data-table.js +1 -1
  49. package/dist/description-list.d.ts +40 -32
  50. package/dist/description-list.js +1 -1
  51. package/dist/{primitive-CJRIlrLz.d.ts → dialog-BM4wPCft.d.ts} +9 -16
  52. package/dist/dialog-DWZWd5Jt.js +1 -0
  53. package/dist/dialog.d.ts +13 -43
  54. package/dist/dialog.js +1 -1
  55. package/dist/dropdown-menu-BbbQuae2.d.ts +1 -0
  56. package/dist/{dropdown-menu-CoyozLzy.d.ts → dropdown-menu-D6pMAY7I.d.ts} +156 -54
  57. package/dist/dropdown-menu-RyDWoKHx.js +1 -0
  58. package/dist/dropdown-menu.d.ts +2 -2
  59. package/dist/dropdown-menu.js +1 -1
  60. package/dist/empty.d.ts +6 -21
  61. package/dist/empty.js +1 -1
  62. package/dist/field-B1wqeZr4.js +1 -0
  63. package/dist/field.d.ts +26 -53
  64. package/dist/field.js +1 -1
  65. package/dist/flag.d.ts +1 -1
  66. package/dist/hooks.js +1 -1
  67. package/dist/hover-card.d.ts +3 -12
  68. package/dist/hover-card.js +1 -1
  69. package/dist/{svg-only-CdI_v82i.d.ts → icon-CX_gj6sW.d.ts} +1 -1
  70. package/dist/{icon-BDqpcZ-n.d.ts → icon-k4E9yNWD.d.ts} +1 -1
  71. package/dist/icon-lZ48P8Nn.js +1 -0
  72. package/dist/icon.d.ts +3 -3
  73. package/dist/icon.js +1 -1
  74. package/dist/icons-DLCs1hLP.js +1 -0
  75. package/dist/icons.d.ts +53 -2
  76. package/dist/icons.js +1 -1
  77. package/dist/input-BnlpQF0c.js +1 -0
  78. package/dist/{input-DV9M6K4v.d.ts → input-BuYDU6CF.d.ts} +1 -1
  79. package/dist/input.d.ts +2 -2
  80. package/dist/input.js +1 -1
  81. package/dist/line-chart.d.ts +491 -0
  82. package/dist/line-chart.js +1 -0
  83. package/dist/{virtual-UrzmaSQm.js → list-51KQvENW.js} +1 -1
  84. package/dist/list.d.ts +5 -20
  85. package/dist/list.js +1 -1
  86. package/dist/llms.txt +5 -1
  87. package/dist/mantle-dark-high-contrast.css +17 -0
  88. package/dist/mantle-dark.css +13 -0
  89. package/dist/mantle-light-high-contrast.css +15 -0
  90. package/dist/mantle.css +29 -0
  91. package/dist/media-object.d.ts +45 -12
  92. package/dist/media-object.js +1 -1
  93. package/dist/multi-select.d.ts +14 -53
  94. package/dist/multi-select.js +1 -1
  95. package/dist/otp-input.d.ts +5 -17
  96. package/dist/otp-input.js +1 -1
  97. package/dist/pagination.d.ts +11 -21
  98. package/dist/pagination.js +1 -1
  99. package/dist/{index-B8mIWKIU.d.ts → popover-CE4OlWkd.d.ts} +1 -4
  100. package/dist/popover-CQ9s7jG5.js +1 -0
  101. package/dist/popover.d.ts +1 -1
  102. package/dist/popover.js +1 -1
  103. package/dist/primitive-trJDqIXJ.js +1 -0
  104. package/dist/progress.d.ts +2 -8
  105. package/dist/progress.js +1 -1
  106. package/dist/qr-code.d.ts +4 -16
  107. package/dist/qr-code.js +1 -1
  108. package/dist/radio-group.d.ts +129 -40
  109. package/dist/radio-group.js +1 -1
  110. package/dist/sandboxed-on-click.d.ts +2 -2
  111. package/dist/scatter-plot.d.ts +495 -0
  112. package/dist/scatter-plot.js +1 -0
  113. package/dist/{select-idm1jy7y.d.ts → select-0z7HVS6r.d.ts} +8 -29
  114. package/dist/select-BCHWvmyC.js +1 -0
  115. package/dist/select.d.ts +1 -1
  116. package/dist/select.js +1 -1
  117. package/dist/selectable-list.d.ts +11 -38
  118. package/dist/selectable-list.js +1 -1
  119. package/dist/sheet.d.ts +22 -49
  120. package/dist/sheet.js +1 -1
  121. package/dist/skip-to-main-link.js +1 -1
  122. package/dist/slider.js +1 -1
  123. package/dist/slot.d.ts +1 -1
  124. package/dist/split-button.d.ts +155 -31
  125. package/dist/split-button.js +1 -1
  126. package/dist/switch.d.ts +1 -1
  127. package/dist/switch.js +1 -1
  128. package/dist/table-CGxJwtbL.js +1 -0
  129. package/dist/{table-DUSvU_Jw.d.ts → table-CZBYEmyK.d.ts} +11 -38
  130. package/dist/table.d.ts +1 -1
  131. package/dist/table.js +1 -1
  132. package/dist/tabs.d.ts +21 -36
  133. package/dist/tabs.js +1 -1
  134. package/dist/text-area.d.ts +2 -2
  135. package/dist/text-area.js +1 -1
  136. package/dist/theme-C26-Xolp.js +1 -0
  137. package/dist/{themes-CYNpplwN.d.ts → theme-FbfjYiD3.d.ts} +16 -0
  138. package/dist/theme-switcher.d.ts +6 -15
  139. package/dist/theme-switcher.js +1 -1
  140. package/dist/theme.d.ts +42 -2
  141. package/dist/theme.js +1 -1
  142. package/dist/toast.d.ts +9 -17
  143. package/dist/toast.js +1 -1
  144. package/dist/tooltip.d.ts +26 -8
  145. package/dist/tooltip.js +1 -1
  146. package/dist/types.js +1 -1
  147. package/package.json +20 -14
  148. package/dist/checkbox-Cq17y0-R.js +0 -1
  149. package/dist/choice-Cc8dA5r8.js +0 -1
  150. package/dist/dialog-CQ2C6vkE.js +0 -1
  151. package/dist/dropdown-menu-CSCDdA3K.js +0 -1
  152. package/dist/field-context-BR01g789.js +0 -1
  153. package/dist/icon-CGgMKpJg.js +0 -1
  154. package/dist/icon-button-DiOhreJD.js +0 -1
  155. package/dist/index-CdPXa9h1.d.ts +0 -1
  156. package/dist/input-CVyAVbim.js +0 -1
  157. package/dist/popover-CBMADtjV.js +0 -1
  158. package/dist/primitive-DCPHJsRs.js +0 -1
  159. package/dist/select-SR_9-bxA.js +0 -1
  160. package/dist/table-GDkapNFi.js +0 -1
  161. package/dist/theme-provider-BftkIiZn.js +0 -1
  162. package/dist/theme-wVnzzx2F.js +0 -1
  163. package/dist/toast-DKgMRv4F.js +0 -1
  164. /package/dist/{sizes-BCoI4bhP.d.ts → button-BCoI4bhP.d.ts} +0 -0
  165. /package/dist/{intents-DdSKSj1c.d.ts → button-DdSKSj1c.d.ts} +0 -0
  166. /package/dist/{resolve-pre-rendered-props-B6OlZrSI.d.ts → code-block-B6OlZrSI.d.ts} +0 -0
  167. /package/dist/{resolve-pre-rendered-props-C9uaM9-V.js → code-block-C9uaM9-V.js} +0 -0
  168. /package/dist/{validation-7QeiTFwl.d.ts → field-7QeiTFwl.d.ts} +0 -0
  169. /package/dist/{validation-Bpptk_9t.js → field-Bpptk_9t.js} +0 -0
  170. /package/dist/{types-D1RY5Tcj.d.ts → icon-D1RY5Tcj.d.ts} +0 -0
  171. /package/dist/{svg-only-d-nMCfAI.js → icon-d-nMCfAI.js} +0 -0
  172. /package/dist/{sort-B_DDQcVD.js → icons-B_DDQcVD.js} +0 -0
  173. /package/dist/{traffic-policy-file-CF1lbWtp.js → icons-CF1lbWtp.js} +0 -0
  174. /package/dist/{is-input-CXmS0OFN.js → input-CXmS0OFN.js} +0 -0
  175. /package/dist/{index-BtwKJTLq.d.ts → slot-BtwKJTLq.d.ts} +0 -0
package/dist/alert.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
- import { t as SvgAttributes } from "./types-D1RY5Tcj.js";
3
- import "./index-DA4ig3gj.js";
4
- import { n as IconButtonAppearance, r as IconButtonProps } from "./icon-button-C1AfGnQx.js";
2
+ import { t as SvgAttributes } from "./icon-D1RY5Tcj.js";
3
+ import { r as ButtonProps } from "./button-DARFK2KJ.js";
4
+ import { n as IconButtonProps, r as IconButtonAppearance } from "./button-C7vAl6lS.js";
5
5
  import { ComponentProps, ReactNode } from "react";
6
6
  //#region src/components/alert/alert.d.ts
7
7
  declare const intents: readonly ["danger", "important", "info", "success", "warning"];
@@ -26,26 +26,32 @@ type AlertProps = ComponentProps<"div"> & {
26
26
  /**
27
27
  * Displays a callout for user attention. Root container for all Alert sub-components.
28
28
  *
29
+ * Trailing controls inherit these public CSS variables:
30
+ *
31
+ * | Variable | Default | Purpose |
32
+ * | --- | --- | --- |
33
+ * | `--alert-control-color` | `var(--color-<intent>-700)` | Control text and icon color. |
34
+ * | `--alert-control-hover-color` | `var(--color-<intent>-800)` | Control text and icon color on hover. |
35
+ * | `--alert-control-hover-bg` | `color-mix(in oklab, var(--color-<intent>-500) 10%, transparent)` | Control background on hover. |
36
+ *
29
37
  * @see https://mantle.ngrok.com/components/feedback/alert#alertroot
30
38
  *
31
39
  * @example
32
40
  * ```tsx
33
- * <Alert intent="info">
34
- * <AlertIcon />
35
- * <AlertContent>
36
- * <AlertTitle>Alert Title</AlertTitle>
37
- * <AlertDismissIconButton />
38
- * <AlertDescription>
41
+ * <Alert.Root intent="info">
42
+ * <Alert.Icon />
43
+ * <Alert.Content>
44
+ * <Alert.Title>Alert Title</Alert.Title>
45
+ * <Alert.Description>
39
46
  * Alert description text.
40
- * </AlertDescription>
41
- * </AlertContent>
42
- * </Alert>
47
+ * </Alert.Description>
48
+ * <Alert.DismissIconButton />
49
+ * <Alert.ExpandButton count={2} expanded={false} />
50
+ * </Alert.Content>
51
+ * </Alert.Root>
43
52
  *```
44
53
  */
45
- declare const Root: {
46
- ({ appearance, className, intent, ref, ...props }: AlertProps): import("react").JSX.Element;
47
- displayName: string;
48
- };
54
+ declare const Root: ({ appearance, className, intent, ref, style, ...props }: AlertProps) => import("react").JSX.Element;
49
55
  type AlertIconProps = Omit<SvgAttributes, "children"> & {
50
56
  /**
51
57
  * An optional icon that renders in place of the default icon for the Alert intent.
@@ -61,45 +67,42 @@ type AlertIconProps = Omit<SvgAttributes, "children"> & {
61
67
  *
62
68
  * @example
63
69
  * ```tsx
64
- * <Alert intent="info">
65
- * <AlertIcon />
66
- * <AlertContent>
67
- * <AlertTitle>Alert Title</AlertTitle>
68
- * <AlertDismissIconButton />
69
- * <AlertDescription>
70
+ * <Alert.Root intent="info">
71
+ * <Alert.Icon />
72
+ * <Alert.Content>
73
+ * <Alert.Title>Alert Title</Alert.Title>
74
+ * <Alert.Description>
70
75
  * Alert description text.
71
- * </AlertDescription>
72
- * </AlertContent>
73
- * </Alert>
76
+ * </Alert.Description>
77
+ * <Alert.DismissIconButton />
78
+ * <Alert.ExpandButton count={2} expanded={false} />
79
+ * </Alert.Content>
80
+ * </Alert.Root>
74
81
  * ```
75
82
  */
76
- declare const Icon: {
77
- ({ className, ref, svg, ...props }: AlertIconProps): import("react").JSX.Element;
78
- displayName: string;
79
- };
83
+ declare const Icon: ({ className, ref, svg, ...props }: AlertIconProps) => import("react").JSX.Element;
80
84
  /**
81
- * The container for the content slot of an alert. Place the title and description as direct children.
85
+ * The container for the content slot of an alert. Place the title, description,
86
+ * and trailing controls as direct children.
82
87
  *
83
88
  * @see https://mantle.ngrok.com/components/feedback/alert#alertcontent
84
89
  *
85
90
  * @example
86
91
  * ```tsx
87
- * <Alert intent="info">
88
- * <AlertIcon />
89
- * <AlertContent>
90
- * <AlertTitle>Alert Title</AlertTitle>
91
- * <AlertDismissIconButton />
92
- * <AlertDescription>
92
+ * <Alert.Root intent="info">
93
+ * <Alert.Icon />
94
+ * <Alert.Content>
95
+ * <Alert.Title>Alert Title</Alert.Title>
96
+ * <Alert.Description>
93
97
  * Alert description text.
94
- * </AlertDescription>
95
- * </AlertContent>
96
- * </Alert>
98
+ * </Alert.Description>
99
+ * <Alert.DismissIconButton />
100
+ * <Alert.ExpandButton count={2} expanded={false} />
101
+ * </Alert.Content>
102
+ * </Alert.Root>
97
103
  *```
98
104
  */
99
- declare const Content: {
100
- ({ className, ref, ...props }: ComponentProps<"div">): import("react").JSX.Element;
101
- displayName: string;
102
- };
105
+ declare const Content: ({ className, ref, ...props }: ComponentProps<"div">) => import("react").JSX.Element;
103
106
  type AlertTitleProps = ComponentProps<"h5"> & WithAsChild;
104
107
  /**
105
108
  * The title of an alert. Default renders as an h5 element, use asChild to render something else.
@@ -108,22 +111,20 @@ type AlertTitleProps = ComponentProps<"h5"> & WithAsChild;
108
111
  *
109
112
  * @example
110
113
  * ```tsx
111
- * <Alert intent="info">
112
- * <AlertIcon />
113
- * <AlertContent>
114
- * <AlertTitle>Alert Title</AlertTitle>
115
- * <AlertDismissIconButton />
116
- * <AlertDescription>
114
+ * <Alert.Root intent="info">
115
+ * <Alert.Icon />
116
+ * <Alert.Content>
117
+ * <Alert.Title>Alert Title</Alert.Title>
118
+ * <Alert.Description>
117
119
  * Alert description text.
118
- * </AlertDescription>
119
- * </AlertContent>
120
- * </Alert>
120
+ * </Alert.Description>
121
+ * <Alert.DismissIconButton />
122
+ * <Alert.ExpandButton count={2} expanded={false} />
123
+ * </Alert.Content>
124
+ * </Alert.Root>
121
125
  *```
122
126
  */
123
- declare const Title: {
124
- ({ asChild, className, ref, ...props }: AlertTitleProps): import("react").JSX.Element;
125
- displayName: string;
126
- };
127
+ declare const Title: ({ asChild, className, ref, ...props }: AlertTitleProps) => import("react").JSX.Element;
127
128
  type AlertDescriptionProps = ComponentProps<"div"> & WithAsChild;
128
129
  /**
129
130
  * The optional description of an alert.
@@ -134,22 +135,20 @@ type AlertDescriptionProps = ComponentProps<"div"> & WithAsChild;
134
135
  *
135
136
  * @example
136
137
  * ```tsx
137
- * <Alert intent="info">
138
- * <AlertIcon />
139
- * <AlertContent>
140
- * <AlertTitle>Alert Title</AlertTitle>
141
- * <AlertDismissIconButton />
142
- * <AlertDescription>
138
+ * <Alert.Root intent="info">
139
+ * <Alert.Icon />
140
+ * <Alert.Content>
141
+ * <Alert.Title>Alert Title</Alert.Title>
142
+ * <Alert.Description>
143
143
  * Alert description text.
144
- * </AlertDescription>
145
- * </AlertContent>
146
- * </Alert>
144
+ * </Alert.Description>
145
+ * <Alert.DismissIconButton />
146
+ * <Alert.ExpandButton count={2} expanded={false} />
147
+ * </Alert.Content>
148
+ * </Alert.Root>
147
149
  * ```
148
150
  */
149
- declare const Description: {
150
- ({ asChild, className, ref, ...props }: AlertDescriptionProps): import("react").JSX.Element;
151
- displayName: string;
152
- };
151
+ declare const Description: ({ asChild, className, ref, ...props }: AlertDescriptionProps) => import("react").JSX.Element;
153
152
  type AlertDismissIconButtonProps = Partial<Omit<IconButtonProps, "appearance" | "icon" | "intent">> & {
154
153
  /**
155
154
  * The visual style of the dismiss button. Optional here —
@@ -164,10 +163,58 @@ type AlertDismissIconButtonProps = Partial<Omit<IconButtonProps, "appearance" |
164
163
  */
165
164
  icon?: ReactNode;
166
165
  };
167
- declare const DismissIconButton: {
168
- ({ size, type, label, appearance, className, icon, style, ...props }: AlertDismissIconButtonProps): import("react").JSX.Element;
169
- displayName: string;
166
+ /**
167
+ * A compact, trailing control for dismissing an alert.
168
+ *
169
+ * It inherits `--alert-control-color`, `--alert-control-hover-color`, and
170
+ * `--alert-control-hover-bg` from `Alert.Root`, shared with
171
+ * `Alert.ExpandButton` when both controls are composed together.
172
+ *
173
+ * @see https://mantle.ngrok.com/components/feedback/alert#alertdismissiconbutton
174
+ *
175
+ * @example
176
+ * ```tsx
177
+ * <Alert.Root intent="warning">
178
+ * <Alert.Icon />
179
+ * <Alert.Content>
180
+ * <Alert.Title>Usage limit approaching</Alert.Title>
181
+ * <Alert.DismissIconButton onClick={dismiss} />
182
+ * <Alert.ExpandButton count={2} expanded={isExpanded} onClick={toggle} />
183
+ * </Alert.Content>
184
+ * </Alert.Root>
185
+ * ```
186
+ */
187
+ declare const DismissIconButton: ({ size, type, label, appearance, className, icon, ...props }: AlertDismissIconButtonProps) => import("react").JSX.Element;
188
+ type AlertExpandButtonProps = Omit<ButtonProps, "appearance" | "asChild" | "children" | "icon" | "iconPlacement" | "intent" | "size"> & {
189
+ /** The number of alerts hidden by a collapsed alert center. */
190
+ count: number;
191
+ /** Whether the alerts controlled by this button are currently visible. */
192
+ expanded: boolean;
170
193
  };
194
+ /**
195
+ * A compact, trailing control for expanding or collapsing related alerts.
196
+ *
197
+ * It occupies the trailing control area alongside `Alert.DismissIconButton`
198
+ * when both are present, and marks the alert so `Alert.Content` reserves room
199
+ * for its plus-prefixed count and caret on narrow viewports. It shares the
200
+ * `--alert-control-*` color variables from `Alert.Root` with the dismiss
201
+ * control.
202
+ *
203
+ * @see https://mantle.ngrok.com/components/feedback/alert#alertexpandbutton
204
+ *
205
+ * @example
206
+ * ```tsx
207
+ * <Alert.Root intent="warning">
208
+ * <Alert.Icon />
209
+ * <Alert.Content>
210
+ * <Alert.Title>Usage limit approaching</Alert.Title>
211
+ * <Alert.DismissIconButton />
212
+ * <Alert.ExpandButton count={2} expanded={isExpanded} onClick={toggle} />
213
+ * </Alert.Content>
214
+ * </Alert.Root>
215
+ * ```
216
+ */
217
+ declare const ExpandButton: ({ count, expanded, className, ...props }: AlertExpandButtonProps) => import("react").JSX.Element;
171
218
  /**
172
219
  * Displays a callout for user attention.
173
220
  *
@@ -178,24 +225,26 @@ declare const DismissIconButton: {
178
225
  * ```
179
226
  * Alert.Root
180
227
  * ├── Alert.Icon
181
- * └── Alert.Content
228
+ * ├── Alert.Content
182
229
  * ├── Alert.Title
183
230
  * ├── Alert.Description
184
- * └── Alert.DismissIconButton
231
+ * ├── Alert.DismissIconButton
232
+ * └── Alert.ExpandButton
185
233
  * ```
186
234
  *
187
235
  * @example
188
236
  * ```tsx
189
- * <Alert intent="info">
190
- * <AlertIcon />
191
- * <AlertContent>
192
- * <AlertTitle>Alert Title</AlertTitle>
193
- * <AlertDismissIconButton />
194
- * <AlertDescription>
237
+ * <Alert.Root intent="info">
238
+ * <Alert.Icon />
239
+ * <Alert.Content>
240
+ * <Alert.Title>Alert Title</Alert.Title>
241
+ * <Alert.Description>
195
242
  * Alert description text.
196
- * </AlertDescription>
197
- * </AlertContent>
198
- * </Alert>
243
+ * </Alert.Description>
244
+ * <Alert.DismissIconButton />
245
+ * <Alert.ExpandButton count={2} expanded={false} />
246
+ * </Alert.Content>
247
+ * </Alert.Root>
199
248
  *```
200
249
  */
201
250
  declare const Alert: {
@@ -211,6 +260,8 @@ declare const Alert: {
211
260
  * <Alert.Content>
212
261
  * <Alert.Title>Alert Title</Alert.Title>
213
262
  * <Alert.Description>Alert description</Alert.Description>
263
+ * <Alert.DismissIconButton />
264
+ * <Alert.ExpandButton count={2} expanded={false} />
214
265
  * </Alert.Content>
215
266
  * </Alert.Root>
216
267
  * ```
@@ -228,11 +279,34 @@ declare const Alert: {
228
279
  * <Alert.Content>
229
280
  * <Alert.Title>Alert Title</Alert.Title>
230
281
  * <Alert.Description>Alert description text.</Alert.Description>
282
+ * <Alert.DismissIconButton />
283
+ * <Alert.ExpandButton count={2} expanded={false} />
231
284
  * </Alert.Content>
232
285
  * </Alert.Root>
233
286
  * ```
234
287
  */
235
288
  readonly Content: typeof Content;
289
+ /**
290
+ * A compact trailing control for expanding or collapsing related alerts.
291
+ * It inherits the `--alert-control-color`, `--alert-control-hover-color`, and
292
+ * `--alert-control-hover-bg` variables from `Alert.Root`, shared with the
293
+ * dismiss control.
294
+ *
295
+ * @see https://mantle.ngrok.com/components/feedback/alert#alertexpandbutton
296
+ *
297
+ * @example
298
+ * ```tsx
299
+ * <Alert.Root intent="warning">
300
+ * <Alert.Icon />
301
+ * <Alert.Content>
302
+ * <Alert.Title>Usage limit approaching</Alert.Title>
303
+ * <Alert.DismissIconButton />
304
+ * <Alert.ExpandButton count={2} expanded={isExpanded} onClick={toggle} />
305
+ * </Alert.Content>
306
+ * </Alert.Root>
307
+ * ```
308
+ */
309
+ readonly ExpandButton: typeof ExpandButton;
236
310
  /**
237
311
  * The optional description of an alert.
238
312
  *
@@ -245,6 +319,8 @@ declare const Alert: {
245
319
  * <Alert.Content>
246
320
  * <Alert.Title>Alert Title</Alert.Title>
247
321
  * <Alert.Description>Alert description text.</Alert.Description>
322
+ * <Alert.DismissIconButton />
323
+ * <Alert.ExpandButton count={2} expanded={false} />
248
324
  * </Alert.Content>
249
325
  * </Alert.Root>
250
326
  * ```
@@ -252,6 +328,9 @@ declare const Alert: {
252
328
  readonly Description: typeof Description;
253
329
  /**
254
330
  * An optional dismiss button that can be used to close the alert.
331
+ * It inherits the `--alert-control-color`, `--alert-control-hover-color`, and
332
+ * `--alert-control-hover-bg` variables from `Alert.Root`, shared with the
333
+ * expand control.
255
334
  *
256
335
  * @see https://mantle.ngrok.com/components/feedback/alert#alertdismissiconbutton
257
336
  *
@@ -263,6 +342,7 @@ declare const Alert: {
263
342
  * <Alert.Title>Alert Title</Alert.Title>
264
343
  * <Alert.DismissIconButton />
265
344
  * <Alert.Description>Alert description text.</Alert.Description>
345
+ * <Alert.ExpandButton count={2} expanded={false} />
266
346
  * </Alert.Content>
267
347
  * </Alert.Root>
268
348
  * ```
@@ -280,6 +360,8 @@ declare const Alert: {
280
360
  * <Alert.Content>
281
361
  * <Alert.Title>Alert Title</Alert.Title>
282
362
  * <Alert.Description>Alert description text.</Alert.Description>
363
+ * <Alert.DismissIconButton />
364
+ * <Alert.ExpandButton count={2} expanded={false} />
283
365
  * </Alert.Content>
284
366
  * </Alert.Root>
285
367
  * ```
@@ -297,6 +379,8 @@ declare const Alert: {
297
379
  * <Alert.Content>
298
380
  * <Alert.Title>Alert Title</Alert.Title>
299
381
  * <Alert.Description>Alert description text.</Alert.Description>
382
+ * <Alert.DismissIconButton />
383
+ * <Alert.ExpandButton count={2} expanded={false} />
300
384
  * </Alert.Content>
301
385
  * </Alert.Root>
302
386
  * ```
package/dist/alert.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./svg-only-d-nMCfAI.js";import{t as n}from"./slot-CDk0Bb9z.js";import{t as r}from"./types-D85fCNV3.js";import{t as i}from"./icon-button-DiOhreJD.js";import{createContext as a,useContext as o,useMemo as s}from"react";import c from"tiny-invariant";import{jsx as l}from"react/jsx-runtime";import{CheckCircleIcon as u}from"@phosphor-icons/react/CheckCircle";import{InfoIcon as d}from"@phosphor-icons/react/Info";import{MegaphoneIcon as f}from"@phosphor-icons/react/Megaphone";import{WarningIcon as p}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as m}from"@phosphor-icons/react/WarningDiamond";import{XIcon as h}from"@phosphor-icons/react/X";import{cva as g}from"class-variance-authority";const _=a(null),v=l(h,{});function y(){let e=o(_);return c(e,`useAlertContext hook used outside of Alert parent!`),e}const b=g(`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:``}}}),x=({appearance:t=`default`,className:n,intent:r,ref:i,...a})=>{let o=s(()=>({intent:r}),[r]);return l(_.Provider,{value:o,children:l(`div`,{ref:i,"data-slot":`alert`,className:e(b({appearance:t,intent:r}),n),...a})})};x.displayName=`Alert`;const S={danger:l(p,{}),important:l(f,{mirrored:!0}),info:l(d,{}),success:l(u,{}),warning:l(m,{})},C=({className:n,ref:r,svg:i,...a})=>{let o=y(),s=S[o.intent];return l(t,{ref:r,"data-slot":`alert-icon`,className:e(`size-5`,n),svg:i??s,...a})};C.displayName=`AlertIcon`;const w=({className:t,ref:n,...r})=>l(`div`,{ref:n,"data-slot":`alert-content`,className:e(`min-w-0 flex-1 has-data-alert-dismiss:pr-6`,t),...r});w.displayName=`AlertContent`;const T=({asChild:t=!1,className:r,ref:i,...a})=>l(t?n:`h5`,{ref:i,"data-slot":`alert-title`,className:e(`font-medium`,r),...a});T.displayName=`AlertTitle`;const E=({asChild:t=!1,className:r,ref:i,...a})=>l(t?n:`div`,{ref:i,"data-slot":`alert-description`,className:e(`text-sm`,r),...a});E.displayName=`AlertDescription`;const D=e=>`var(--color-${e}-700)`,O=e=>`var(--color-${e}-800)`,k=e=>`color-mix(in oklab, var(--color-${e}-500) 10%, transparent)`,A=({size:t=`sm`,type:n=`button`,label:a=`Dismiss Alert`,appearance:o=`ghost`,className:s,icon:c=v,style:u,...d})=>{let f=y();return l(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({...u,"--alert-dismiss-icon-color":D(f.intent),"--alert-dismiss-icon-hover-color":O(f.intent),"--alert-dismiss-hover-bg":k(f.intent)}),...d})};A.displayName=`AlertDismissIconButton`;const j={Root:x,Content:w,Description:E,DismissIconButton:A,Icon:C,Title:T};export{j as Alert};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-d-nMCfAI.js";import{t as n}from"./slot-CDk0Bb9z.js";import{t as r}from"./types-D85fCNV3.js";import{t as i}from"./button-DjpEKt2X.js";import{t as a}from"./button-BAno7KIU.js";import{CaretDownIcon as o}from"@phosphor-icons/react/CaretDown";import{createContext as s,useContext as c,useMemo as l}from"react";import u from"tiny-invariant";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{CheckCircleIcon as p}from"@phosphor-icons/react/CheckCircle";import{InfoIcon as m}from"@phosphor-icons/react/Info";import{MegaphoneIcon as h}from"@phosphor-icons/react/Megaphone";import{WarningIcon as g}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as _}from"@phosphor-icons/react/WarningDiamond";import{XIcon as v}from"@phosphor-icons/react/X";import{cva as y}from"class-variance-authority";const b=s(null),x=d(v,{});function S(){let e=c(b);return u(e,`useAlertContext hook used outside of Alert parent!`),e}const C=y(`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:not([data-slot=button])]:text-danger-700 [&_a:not([data-slot=button])]: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:not([data-slot=button])]:text-important-700 [&_a:not([data-slot=button])]: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:not([data-slot=button])]:text-info-700 [&_a:not([data-slot=button])]: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:not([data-slot=button])]:text-success-700 [&_a:not([data-slot=button])]: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:not([data-slot=button])]:text-warning-700 [&_a:not([data-slot=button])]:underline`},appearance:{banner:`border-x-0 border-t-0 rounded-none z-50 sticky`,default:``}}}),w=({appearance:t=`default`,className:n,intent:i,ref:a,style:o,...s})=>{let c=l(()=>({intent:i}),[i]);return d(b.Provider,{value:c,children:d(`div`,{ref:a,"data-slot":`alert`,className:e(C({appearance:t,intent:i}),`has-data-alert-dismiss:pr-10`,`has-data-alert-expand:[&_[data-slot=alert-dismiss-icon-button]]:right-16`,`md:has-data-alert-expand:[&_[data-slot=alert-dismiss-icon-button]]:right-24`,`has-data-alert-expand:[&_[data-slot=alert-content]]:pr-12`,`md:has-data-alert-expand:[&_[data-slot=alert-content]]:pr-[5.5rem]`,n),style:r({"--alert-control-color":A(i),"--alert-control-hover-color":j(i),"--alert-control-hover-bg":M(i),...o}),...s})})},T={danger:d(g,{}),important:d(h,{mirrored:!0}),info:d(m,{}),success:d(p,{}),warning:d(_,{})},E=({className:n,ref:r,svg:i,...a})=>{let o=S(),s=T[o.intent];return d(t,{ref:r,"data-slot":`alert-icon`,className:e(`size-5`,n),svg:i??s,...a})},D=({className:t,ref:n,...r})=>d(`div`,{ref:n,"data-slot":`alert-content`,className:e(`min-w-0 flex-1 has-data-alert-dismiss:pr-6`,t),...r}),O=({asChild:t=!1,className:r,ref:i,...a})=>d(t?n:`h5`,{ref:i,"data-slot":`alert-title`,className:e(`font-medium`,r),...a}),k=({asChild:t=!1,className:r,ref:i,...a})=>d(t?n:`div`,{ref:i,"data-slot":`alert-description`,className:e(`text-sm`,r),...a}),A=e=>`var(--color-${e}-700)`,j=e=>`var(--color-${e}-800)`,M=e=>`color-mix(in oklab, var(--color-${e}-500) 10%, transparent)`,N={Root:w,Content:D,ExpandButton:({count:t,expanded:n,className:r,...a})=>f(i,{type:`button`,appearance:`ghost`,intent:`neutral`,size:`sm`,"aria-expanded":n,"aria-label":n?`Collapse additional alerts`:`Show ${t} more ${t===1?`alert`:`alerts`}`,"data-slot":`alert-expand-button`,"data-alert-expand":!0,className:e(`right-1.5 top-1.5 absolute gap-1 px-1.5`,`text-[var(--alert-control-color,currentColor)]`,`not-disabled:hover:bg-[var(--alert-control-hover-bg,transparent)] not-disabled:hover:text-[var(--alert-control-hover-color,currentColor)]`,r),...a,children:[f(`span`,{className:`min-w-[2ch] text-center tabular-nums`,children:[`+`,t]}),d(`span`,{className:`hidden md:inline`,children:`more`}),d(o,{weight:`bold`,className:e(`size-4 transition-transform ease-out duration-150`,n&&`-rotate-180`)})]}),Description:k,DismissIconButton:({size:t=`sm`,type:n=`button`,label:r=`Dismiss Alert`,appearance:i=`ghost`,className:o,icon:s=x,...c})=>d(a,{appearance:i,icon:s,intent:`neutral`,label:r,size:t,"data-slot":`alert-dismiss-icon-button`,"data-alert-dismiss":!0,className:e(`right-1.5 top-1.5 absolute`,`text-[var(--alert-control-color,currentColor)]`,`not-disabled:hover:bg-[var(--alert-control-hover-bg,transparent)] not-disabled:hover:text-[var(--alert-control-hover-color,currentColor)]`,o),type:n,...c}),Icon:E,Title:O};export{N as Alert};
@@ -1 +1 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-CGgMKpJg.js";import{t as n}from"./slot-CDk0Bb9z.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=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),d=({asChild:e,children:d,className:p,rel:m,icon:h,iconPlacement:g=`start`,ref:_,...v})=>{let y=f(m),b={"data-slot":`anchor`,className:u(p),ref:_,rel:y,...v};if(e){let e=r.only(d);o(a(e),"When using `asChild`, Anchor must be passed a single child as a JSX tag.");let u=e.props?.children;return c(n,{...b,children:i(e,{},l(s,{children:[h&&g===`start`&&c(t,{className:`inline-block mr-1.5`,svg:h}),u,h&&g===`end`&&c(t,{className:`inline-block ml-1.5`,svg:h})]}))})}return l(`a`,{...b,children:[h&&g===`start`&&c(t,{className:`inline-block mr-1.5`,svg:h}),d,h&&g===`end`&&c(t,{className:`inline-block ml-1.5`,svg:h})]})};function f(e){return Array.isArray(e)?[...new Set(e)].map(e=>e?.trim()).filter(Boolean).toSorted().join(` `)||void 0:e?.trim()||void 0}export{u as n,f as r,d as t};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-lZ48P8Nn.js";import{t as n}from"./slot-CDk0Bb9z.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=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),d=({asChild:e,children:d,className:p,rel:m,icon:h,iconPlacement:g=`start`,ref:_,...v})=>{let y=f(m),b={"data-slot":`anchor`,className:u(p),ref:_,rel:y,...v};if(e){let e=r.only(d);o(a(e),"When using `asChild`, Anchor must be passed a single child as a JSX tag.");let u=e.props?.children;return c(n,{...b,children:i(e,{},l(s,{children:[h&&g===`start`&&c(t,{className:`inline-block mr-1.5`,svg:h}),u,h&&g===`end`&&c(t,{className:`inline-block ml-1.5`,svg:h})]}))})}return l(`a`,{...b,children:[h&&g===`start`&&c(t,{className:`inline-block mr-1.5`,svg:h}),d,h&&g===`end`&&c(t,{className:`inline-block ml-1.5`,svg:h})]})};function f(e){return Array.isArray(e)?[...new Set(e)].map(e=>e?.trim()).filter(Boolean).toSorted().join(` `)||void 0:e?.trim()||void 0}export{u as n,f as r,d as t};
package/dist/anchor.js CHANGED
@@ -1 +1 @@
1
- import{n as e,r as t,t as n}from"./anchor-_2meGDfj.js";export{n as Anchor,e as anchorClassNames,t as resolveRel};
1
+ import{n as e,r as t,t as n}from"./anchor-DfeXTpKW.js";export{n as Anchor,e as anchorClassNames,t as resolveRel};