@ngrok/mantle 0.79.3 → 0.80.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 (193) hide show
  1. package/dist/accordion.d.ts +169 -12
  2. package/dist/accordion.js +1 -1
  3. package/dist/agent.json +1 -1
  4. package/dist/alert-dialog.d.ts +496 -30
  5. package/dist/alert-dialog.js +1 -1
  6. package/dist/alert.d.ts +129 -9
  7. package/dist/alert.js +1 -1
  8. package/dist/anchor-_2meGDfj.js +1 -0
  9. package/dist/anchor.d.ts +2 -2
  10. package/dist/anchor.js +1 -1
  11. package/dist/as-child-D23mGo4f.d.ts +49 -0
  12. package/dist/badge.d.ts +44 -5
  13. package/dist/badge.js +1 -1
  14. package/dist/breadcrumb.d.ts +214 -14
  15. package/dist/breadcrumb.js +1 -1
  16. package/dist/button-5WsvzIQ6.js +1 -0
  17. package/dist/{button-DcXOWUYo.d.ts → button-BPMwa2jN.d.ts} +3 -3
  18. package/dist/button-D9n09xUg.js +1 -0
  19. package/dist/button.d.ts +3 -3
  20. package/dist/button.js +1 -1
  21. package/dist/calendar.d.ts +0 -3
  22. package/dist/calendar.js +1 -1
  23. package/dist/card.d.ts +146 -9
  24. package/dist/card.js +1 -1
  25. package/dist/centered-layout.d.ts +224 -8
  26. package/dist/centered-layout.js +1 -1
  27. package/dist/checkbox-Cq17y0-R.js +1 -0
  28. package/dist/checkbox.d.ts +12 -10
  29. package/dist/checkbox.js +1 -1
  30. package/dist/choice-Cc8dA5r8.js +1 -0
  31. package/dist/choice-Ct0KK8jw.d.ts +269 -0
  32. package/dist/choice.d.ts +1 -252
  33. package/dist/choice.js +1 -1
  34. package/dist/code-block.d.ts +270 -50
  35. package/dist/code-block.js +6 -6
  36. package/dist/code.d.ts +3 -2
  37. package/dist/code.js +1 -1
  38. package/dist/combobox.d.ts +190 -11
  39. package/dist/combobox.js +1 -1
  40. package/dist/command.d.ts +285 -81
  41. package/dist/command.js +1 -1
  42. package/dist/compose-refs-BdBMM9ga.js +1 -0
  43. package/dist/data-table.d.ts +33 -5
  44. package/dist/data-table.js +1 -1
  45. package/dist/description-list.d.ts +79 -6
  46. package/dist/description-list.js +1 -1
  47. package/dist/dialog-CQ2C6vkE.js +1 -0
  48. package/dist/dialog.d.ts +239 -18
  49. package/dist/dialog.js +1 -1
  50. package/dist/dropdown-menu-CSCDdA3K.js +1 -0
  51. package/dist/{dropdown-menu-DP_Ne9Mr.d.ts → dropdown-menu-CoyozLzy.d.ts} +170 -29
  52. package/dist/dropdown-menu.d.ts +2 -2
  53. package/dist/dropdown-menu.js +1 -1
  54. package/dist/empty.d.ts +1 -1
  55. package/dist/empty.js +1 -1
  56. package/dist/field.d.ts +596 -45
  57. package/dist/field.js +1 -1
  58. package/dist/flag.d.ts +0 -3
  59. package/dist/flag.js +1 -1
  60. package/dist/hooks.d.ts +3 -4
  61. package/dist/hooks.js +1 -1
  62. package/dist/hover-card.d.ts +54 -4
  63. package/dist/hover-card.js +1 -1
  64. package/dist/{icon-Cevjo93X.d.ts → icon-BDqpcZ-n.d.ts} +1 -1
  65. package/dist/icon-CGgMKpJg.js +1 -0
  66. package/dist/{icon-button-BvQvT790.d.ts → icon-button-C1AfGnQx.d.ts} +6 -60
  67. package/dist/icon-button-DiOhreJD.js +1 -0
  68. package/dist/icon.d.ts +2 -2
  69. package/dist/icon.js +1 -1
  70. package/dist/icons.d.ts +5 -13
  71. package/dist/icons.js +1 -1
  72. package/dist/{in-view-nkSOdED2.d.ts → in-view-DDEGUKDR.d.ts} +17 -9
  73. package/dist/index-B8mIWKIU.d.ts +211 -0
  74. package/dist/{index-Rv8RL7xy.d.ts → index-BtwKJTLq.d.ts} +1 -1
  75. package/dist/{index-BSAizFod.d.ts → index-C2jj8U4a.d.ts} +5 -5
  76. package/dist/index-CdPXa9h1.d.ts +1 -0
  77. package/dist/{index-D47aqlpz.d.ts → index-DA4ig3gj.d.ts} +1 -1
  78. package/dist/input-CVyAVbim.js +1 -0
  79. package/dist/{types-C19IR7jf.d.ts → input-DV9M6K4v.d.ts} +42 -2
  80. package/dist/input.d.ts +4 -55
  81. package/dist/input.js +1 -1
  82. package/dist/{label-v2-bv98k.d.ts → label-C6YH9skg.d.ts} +8 -6
  83. package/dist/label-D-D11mlp.js +1 -0
  84. package/dist/label.d.ts +1 -1
  85. package/dist/label.js +1 -1
  86. package/dist/list.d.ts +150 -6
  87. package/dist/list.js +1 -1
  88. package/dist/llms.txt +1 -1
  89. package/dist/main.d.ts +20 -4
  90. package/dist/main.js +1 -1
  91. package/dist/media-object.d.ts +27 -4
  92. package/dist/media-object.js +1 -1
  93. package/dist/multi-select.d.ts +312 -15
  94. package/dist/multi-select.js +1 -1
  95. package/dist/otp-input.d.ts +129 -5
  96. package/dist/otp-input.js +1 -1
  97. package/dist/pagination.d.ts +70 -6
  98. package/dist/pagination.js +1 -1
  99. package/dist/popover-CBMADtjV.js +1 -0
  100. package/dist/popover.d.ts +1 -181
  101. package/dist/popover.js +1 -1
  102. package/dist/primitive-CJRIlrLz.d.ts +31 -0
  103. package/dist/primitive-DCPHJsRs.js +1 -0
  104. package/dist/progress.js +1 -1
  105. package/dist/qr-code.d.ts +113 -5
  106. package/dist/qr-code.js +1 -1
  107. package/dist/radio-group.d.ts +128 -23
  108. package/dist/radio-group.js +1 -1
  109. package/dist/sandboxed-on-click.d.ts +2 -2
  110. package/dist/sandboxed-on-click.js +1 -1
  111. package/dist/select-SR_9-bxA.js +1 -0
  112. package/dist/select-idm1jy7y.d.ts +600 -0
  113. package/dist/select.d.ts +1 -1
  114. package/dist/select.js +1 -1
  115. package/dist/selectable-list.d.ts +252 -298
  116. package/dist/selectable-list.js +1 -1
  117. package/dist/separator-B5UmkVRL.d.ts +75 -0
  118. package/dist/separator-bpE_kooz.js +1 -0
  119. package/dist/separator.d.ts +1 -52
  120. package/dist/separator.js +1 -1
  121. package/dist/sheet.d.ts +295 -21
  122. package/dist/sheet.js +1 -1
  123. package/dist/skeleton-CsbUHbBA.js +1 -0
  124. package/dist/skeleton.d.ts +4 -7
  125. package/dist/skeleton.js +1 -1
  126. package/dist/skip-to-main-link.d.ts +24 -4
  127. package/dist/skip-to-main-link.js +1 -1
  128. package/dist/slot-CDk0Bb9z.js +1 -0
  129. package/dist/slot.d.ts +1 -1
  130. package/dist/slot.js +1 -1
  131. package/dist/{sort-BPX2Fk9t.js → sort-B_DDQcVD.js} +1 -1
  132. package/dist/split-button.d.ts +28 -13
  133. package/dist/split-button.js +1 -1
  134. package/dist/{svg-only-BFeFS1aa.d.ts → svg-only-CdI_v82i.d.ts} +1 -1
  135. package/dist/svg-only-d-nMCfAI.js +1 -0
  136. package/dist/switch.d.ts +9 -6
  137. package/dist/switch.js +1 -1
  138. package/dist/table-DUSvU_Jw.d.ts +875 -0
  139. package/dist/table-GDkapNFi.js +1 -0
  140. package/dist/table.d.ts +1 -1
  141. package/dist/table.js +1 -1
  142. package/dist/tabs.d.ts +135 -21
  143. package/dist/tabs.js +1 -1
  144. package/dist/text-area.d.ts +1 -1
  145. package/dist/text-area.js +1 -1
  146. package/dist/theme-provider-BftkIiZn.js +1 -0
  147. package/dist/theme-switcher.d.ts +110 -29
  148. package/dist/theme-switcher.js +1 -1
  149. package/dist/theme-wVnzzx2F.js +1 -0
  150. package/dist/theme.d.ts +53 -14
  151. package/dist/theme.js +1 -1
  152. package/dist/toast-DKgMRv4F.js +1 -0
  153. package/dist/toast.d.ts +98 -10
  154. package/dist/toast.js +1 -1
  155. package/dist/tooltip.d.ts +28 -1
  156. package/dist/tooltip.js +1 -1
  157. package/dist/{traffic-policy-file-0g5RXFqu.js → traffic-policy-file-CF1lbWtp.js} +1 -1
  158. package/dist/types.d.ts +2 -2
  159. package/dist/utils.d.ts +1 -1
  160. package/dist/utils.js +1 -1
  161. package/dist/virtual-UrzmaSQm.js +1 -0
  162. package/dist/well.d.ts +3 -3
  163. package/dist/well.js +1 -1
  164. package/package.json +3 -3
  165. package/dist/anchor-C_tjSVy6.js +0 -1
  166. package/dist/as-child-CYEVu1WY.d.ts +0 -23
  167. package/dist/button-5t6-JS_I.js +0 -1
  168. package/dist/button-ClC60Nzg.js +0 -1
  169. package/dist/checkbox-DJ2xl7Rc.js +0 -1
  170. package/dist/choice-DOdyNzFC.js +0 -1
  171. package/dist/compose-refs-Cjf2gfB8.js +0 -1
  172. package/dist/dialog-vxLIvB8M.js +0 -1
  173. package/dist/dropdown-menu-Bt1aKF1g.js +0 -1
  174. package/dist/icon-CDtYjF_H.js +0 -1
  175. package/dist/icon-button-DV2-GZHf.js +0 -1
  176. package/dist/index-g2rfwNCH.d.ts +0 -1
  177. package/dist/input-Ct1YOqSy.js +0 -1
  178. package/dist/label-BMlHW_2D.js +0 -1
  179. package/dist/popover-D5WxxnBY.js +0 -1
  180. package/dist/primitive-C64-m48O.d.ts +0 -13
  181. package/dist/primitive-IKruV2iB.js +0 -1
  182. package/dist/select-Bwt2YduR.d.ts +0 -345
  183. package/dist/select-D-5u0Blc.js +0 -1
  184. package/dist/separator-kBnnv3Cw.js +0 -1
  185. package/dist/skeleton-Bu3tgNcW.js +0 -1
  186. package/dist/slot-DmPrjM7N.js +0 -1
  187. package/dist/svg-only-DDx6FtJd.js +0 -1
  188. package/dist/table-CPH2md2-.js +0 -1
  189. package/dist/table-CwFHXC-G.d.ts +0 -414
  190. package/dist/theme-D3MDng6U.js +0 -1
  191. package/dist/theme-provider-C9zpDyJW.js +0 -1
  192. package/dist/toast-BsCjaMVS.js +0 -1
  193. package/dist/virtual-DZMBu7Ch.js +0 -1
@@ -1,6 +1,6 @@
1
- import { t as WithAsChild } from "./as-child-CYEVu1WY.js";
2
- import { n as IconProps } from "./icon-Cevjo93X.js";
3
- import { ComponentPropsWithoutRef } from "react";
1
+ import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
+ import { n as IconProps } from "./icon-BDqpcZ-n.js";
3
+ import { ComponentProps } from "react";
4
4
  //#region src/components/accordion/accordion.d.ts
5
5
  /**
6
6
  * `"single"` mode props: at most one item open at a time — opening a section
@@ -56,7 +56,103 @@ type AccordionMultipleProps = {
56
56
  * accordion that keeps at most one section open at a time. Also accepts all
57
57
  * standard `<div>` props (forwarded to the container) plus `asChild`.
58
58
  */
59
- type AccordionRootProps = (AccordionSingleProps | AccordionMultipleProps) & Omit<ComponentPropsWithoutRef<"div">, "defaultValue"> & WithAsChild;
59
+ type AccordionRootProps = (AccordionSingleProps | AccordionMultipleProps) & Omit<ComponentProps<"div">, "defaultValue"> & WithAsChild;
60
+ /**
61
+ * A vertically stacked set of disclosure sections. The root owns the open/closed
62
+ * state and provides it to its items.
63
+ *
64
+ * Built without a UI framework's collapsible: each section's collapsed content
65
+ * stays in the DOM with `hidden="until-found"`, so the browser's find-in-page
66
+ * (⌘F / Ctrl-F) can discover and auto-reveal matches inside closed sections (the
67
+ * `beforematch` event syncs that reveal back into this component's state). Works
68
+ * with controlled (`value` + `onValueChange`) and uncontrolled (`defaultValue`)
69
+ * usage in both `"single"` and `"multiple"` modes.
70
+ *
71
+ * `type` is optional and **defaults to `"multiple"`** — sections open
72
+ * independently and opening one never closes another. Pass `type="single"` for
73
+ * the classic accordion where opening a section auto-closes the previously open
74
+ * one.
75
+ *
76
+ * Items are separated by a hairline divider drawn with `divide-y` on the root,
77
+ * colored with the shared `separator` token so it matches `Separator` and every
78
+ * other divider in the system. Disable the dividers with `divide-y-0` on the root
79
+ * (e.g. pair it with `space-y-*` for a spaced-card layout).
80
+ *
81
+ * @see https://mantle.ngrok.com/components/data-display/accordion#api-accordion
82
+ *
83
+ * @example
84
+ * <Accordion.Root type="single" defaultValue="shipping">
85
+ * <Accordion.Item value="shipping">
86
+ * <Accordion.Trigger>
87
+ * How long does shipping take?
88
+ * <Accordion.TriggerIcon />
89
+ * </Accordion.Trigger>
90
+ * <Accordion.Content>
91
+ * <Accordion.Body>Two to five business days.</Accordion.Body>
92
+ * </Accordion.Content>
93
+ * </Accordion.Item>
94
+ * </Accordion.Root>
95
+ */
96
+ declare const Root: {
97
+ (props: AccordionRootProps): import("react").JSX.Element;
98
+ displayName: string;
99
+ };
100
+ /**
101
+ * A single collapsible section, rendered as a plain `<div role="group">` — the
102
+ * same accessibility role the browser gives a native `<details>`. Derives its
103
+ * open state from {@link Root}.
104
+ *
105
+ * Because the item is just a `<div>`, its header can be any layout — e.g. a flex
106
+ * row with the {@link Trigger} alongside a separate, non-toggling action button.
107
+ *
108
+ * @see https://mantle.ngrok.com/components/data-display/accordion#api-accordion-item
109
+ *
110
+ * @example
111
+ * <Accordion.Root type="single" defaultValue="item-1">
112
+ * <Accordion.Item value="item-1">
113
+ * <Accordion.Trigger>
114
+ * Is it accessible?
115
+ * <Accordion.TriggerIcon />
116
+ * </Accordion.Trigger>
117
+ * <Accordion.Content>
118
+ * <Accordion.Body>Yes. It adheres to the WAI-ARIA disclosure pattern.</Accordion.Body>
119
+ * </Accordion.Content>
120
+ * </Accordion.Item>
121
+ * </Accordion.Root>
122
+ */
123
+ declare const Item: {
124
+ ({ children, value, ref, ...props }: ComponentProps<"div"> & {
125
+ /** The unique value identifying this item within its accordion. */
126
+ value: string;
127
+ }): import("react").JSX.Element;
128
+ displayName: string;
129
+ };
130
+ /**
131
+ * The interactive header that toggles its section, rendered as a `<button>` with
132
+ * `aria-expanded` — the disclosure semantics a native `<summary>` provides, but
133
+ * via a real button so the role is consistent across browsers (native summary's
134
+ * role varies). Place the {@link TriggerIcon} as the last child so the default
135
+ * `justify-between` layout pushes it to the trailing edge.
136
+ *
137
+ * @see https://mantle.ngrok.com/components/data-display/accordion#api-accordion-trigger
138
+ *
139
+ * @example
140
+ * <Accordion.Root type="single" defaultValue="item-1">
141
+ * <Accordion.Item value="item-1">
142
+ * <Accordion.Trigger>
143
+ * Is it accessible?
144
+ * <Accordion.TriggerIcon />
145
+ * </Accordion.Trigger>
146
+ * <Accordion.Content>
147
+ * <Accordion.Body>Yes. It adheres to the WAI-ARIA disclosure pattern.</Accordion.Body>
148
+ * </Accordion.Content>
149
+ * </Accordion.Item>
150
+ * </Accordion.Root>
151
+ */
152
+ declare const Trigger: {
153
+ ({ className, children, onClick, ref, ...props }: Omit<ComponentProps<"button">, "type">): import("react").JSX.Element;
154
+ displayName: string;
155
+ };
60
156
  /**
61
157
  * The icon that indicates the open/closed state of its {@link Trigger}. Defaults
62
158
  * to a downward caret that rotates 180° when the section is open. Pass `svg` to
@@ -102,6 +198,70 @@ declare const TriggerIcon: {
102
198
  }): import("react").JSX.Element;
103
199
  displayName: string;
104
200
  };
201
+ /**
202
+ * The collapsible region of an {@link Item} — the zero-padding viewport that
203
+ * slides open and closed. Wrap its children in {@link Body} for the standard
204
+ * padding (text inherits the ambient size); `Content` itself stays unpadded so
205
+ * its `h-0` collapse can reach zero height. Always rendered into the DOM; when
206
+ * collapsed (in
207
+ * supporting browsers) it carries `hidden="until-found"` so its text stays
208
+ * discoverable by the browser's find-in-page, and a `beforematch` listener opens
209
+ * the section when the browser reveals a match. It is flow content, so it may
210
+ * contain anything — including interactive elements.
211
+ *
212
+ * @see https://mantle.ngrok.com/components/data-display/accordion#api-accordion-content
213
+ *
214
+ * @example
215
+ * <Accordion.Root type="single" defaultValue="item-1">
216
+ * <Accordion.Item value="item-1">
217
+ * <Accordion.Trigger>
218
+ * Is it accessible?
219
+ * <Accordion.TriggerIcon />
220
+ * </Accordion.Trigger>
221
+ * <Accordion.Content>
222
+ * <Accordion.Body>Yes. It adheres to the WAI-ARIA disclosure pattern.</Accordion.Body>
223
+ * </Accordion.Content>
224
+ * </Accordion.Item>
225
+ * </Accordion.Root>
226
+ */
227
+ declare const Content: {
228
+ ({ className, children, ref, ...props }: ComponentProps<"div">): import("react").JSX.Element;
229
+ displayName: string;
230
+ };
231
+ /**
232
+ * The padded inner region of an {@link Item}'s {@link Content} — where the
233
+ * section's body content lives. Owns the body's padding so {@link Content} can
234
+ * stay a zero-padding animation viewport: a padded `h-0` border-box can't
235
+ * collapse below its padding, so keeping the padding here lets the closed slide
236
+ * reach zero height. The `pt-2` doubles as the focus ring's vertical clearance —
237
+ * it pairs with the trigger's open-state `pb-2` so the gap below the trigger
238
+ * stays a uniform 16px while 8px of it sits outside the button box, keeping the
239
+ * ring off the body's first line (see {@link Trigger}). Text inherits the ambient
240
+ * size — it isn't forced — so set a size on the content where you need one.
241
+ * Override `className` to retune the padding (e.g. `pb-0`, `px-6`); `cx` resolves
242
+ * last-wins.
243
+ *
244
+ * @see https://mantle.ngrok.com/components/data-display/accordion#api-accordion-body
245
+ *
246
+ * @example
247
+ * <Accordion.Root type="single" defaultValue="item-1">
248
+ * <Accordion.Item value="item-1">
249
+ * <Accordion.Trigger>
250
+ * Is it accessible?
251
+ * <Accordion.TriggerIcon />
252
+ * </Accordion.Trigger>
253
+ * <Accordion.Content>
254
+ * <Accordion.Body className="pb-6">
255
+ * Yes. It adheres to the WAI-ARIA disclosure pattern.
256
+ * </Accordion.Body>
257
+ * </Accordion.Content>
258
+ * </Accordion.Item>
259
+ * </Accordion.Root>
260
+ */
261
+ declare const Body: {
262
+ ({ className, ref, ...props }: ComponentProps<"div">): import("react").JSX.Element;
263
+ displayName: string;
264
+ };
105
265
  /**
106
266
  * A vertically stacked set of disclosure sections styled after the shadcn /
107
267
  * ngrok.com accordion.
@@ -159,7 +319,7 @@ declare const Accordion: {
159
319
  * </Accordion.Item>
160
320
  * </Accordion.Root>
161
321
  */
162
- readonly Root: import("react").ForwardRefExoticComponent<AccordionRootProps & import("react").RefAttributes<HTMLDivElement>>;
322
+ readonly Root: typeof Root;
163
323
  /**
164
324
  * A single collapsible section. See {@link Item}.
165
325
  *
@@ -176,10 +336,7 @@ declare const Accordion: {
176
336
  * </Accordion.Item>
177
337
  * </Accordion.Root>
178
338
  */
179
- readonly Item: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
180
- /** The unique value identifying this item within its accordion. */
181
- value: string;
182
- } & import("react").RefAttributes<HTMLDivElement>>;
339
+ readonly Item: typeof Item;
183
340
  /**
184
341
  * The `<button>` header that toggles a section. See {@link Trigger}.
185
342
  *
@@ -196,7 +353,7 @@ declare const Accordion: {
196
353
  * </Accordion.Item>
197
354
  * </Accordion.Root>
198
355
  */
199
- readonly Trigger: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "type"> & import("react").RefAttributes<HTMLButtonElement>>;
356
+ readonly Trigger: typeof Trigger;
200
357
  /**
201
358
  * The caret indicating open/closed state. See {@link TriggerIcon}.
202
359
  *
@@ -230,7 +387,7 @@ declare const Accordion: {
230
387
  * </Accordion.Item>
231
388
  * </Accordion.Root>
232
389
  */
233
- readonly Content: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
390
+ readonly Content: typeof Content;
234
391
  /**
235
392
  * The padded inner region of a {@link Content}. See {@link Body}.
236
393
  *
@@ -249,7 +406,7 @@ declare const Accordion: {
249
406
  * </Accordion.Item>
250
407
  * </Accordion.Root>
251
408
  */
252
- readonly Body: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
409
+ readonly Body: typeof Body;
253
410
  };
254
411
  //#endregion
255
412
  export { Accordion };
package/dist/accordion.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-Cjf2gfB8.js";import{t as n}from"./cx-IiQEAKf5.js";import{t as r}from"./icon-CDtYjF_H.js";import{t as i}from"./slot-DmPrjM7N.js";import{CaretDownIcon as a}from"@phosphor-icons/react/CaretDown";import{createContext as o,forwardRef as s,useCallback as c,useContext as l,useEffect as u,useMemo as d,useRef as f,useState as p}from"react";import m from"tiny-invariant";import{jsx as h}from"react/jsx-runtime";function g(e,t){return e.includes(t)}function _(e,t,n,r){let i=e.includes(t);return n?r===`single`?i&&e.length===1?e:[t]:i?e:[...e,t]:i?e.filter(e=>e!==t):e}function v(e){return e==null?[]:typeof e==`string`?e===``?[]:[e]:e}function y(e,t){e.type===`single`?e.onValueChange?.(t[0]??``):e.onValueChange?.([...t])}function b(){return typeof document<`u`&&document.body!=null&&`onbeforematch`in document.body}const x=o(null);function S(e){let t=l(x);return m(t,`\`${e}\` must be rendered within \`Accordion.Root\`.`),t}const C=o(null);function w(e){let t=l(C);return m(t,`\`${e}\` must be rendered within \`Accordion.Item\`.`),t}const T=s((e,t)=>{let{type:r=`multiple`,value:a,defaultValue:o,onValueChange:s,asChild:c,children:l,className:u,...f}=e,m=a!=null,[g,b]=p(()=>v(o)),S=m?v(a):g,C=d(()=>({type:r,openValues:S,setItemOpen:(t,n)=>{let i=_(S,t,n,r);i!==S&&(m||b(i),y(e,i))}}),[r,S,m,e]),w={...f,"data-slot":`accordion`,className:n(`w-full divide-y divide-separator`,u)};return h(x.Provider,{value:C,children:h(c?i:`div`,{ref:t,...w,children:l})})});T.displayName=`Accordion`;const E=s(({children:e,value:t,...n},r)=>{let{openValues:i,setItemOpen:a}=S(`Accordion.Item`),o=g(i,t),s=c(e=>{a(t,e)},[a,t]),l=d(()=>({open:o,setOpen:s}),[o,s]);return h(C.Provider,{value:l,children:h(`div`,{ref:r,...n,role:`group`,"data-slot":`accordion-item`,"data-state":o?`open`:`closed`,children:e})})});E.displayName=`AccordionItem`;const D=s(({className:e,children:t,onClick:r,...i},a)=>{let{open:o,setOpen:s}=w(`Accordion.Trigger`);return h(`button`,{ref:a,type:`button`,...i,"data-slot":`accordion-trigger`,"data-state":o?`open`:`closed`,"aria-expanded":o,className:n(`group flex w-full cursor-pointer items-center justify-between gap-4 py-4 text-left font-medium outline-none`,`-mx-2 rounded-md px-2`,`transition-[padding] duration-200 ease-out data-state-open:pb-2 motion-reduce:transition-none`,`focus:outline-hidden focus-visible:ring-4 focus-visible:ring-focus-accent`,e),onClick:e=>{r?.(e),s(!o)},children:t})});D.displayName=`AccordionTrigger`;const O=h(a,{weight:`bold`}),k=({className:e,svg:t=O,...i})=>h(r,{...i,"data-slot":`accordion-trigger-icon`,svg:t,className:n(`size-4 shrink-0 text-muted transition-transform duration-200 group-data-state-open:rotate-180`,e)});k.displayName=`AccordionTriggerIcon`;const A=s(({className:r,children:i,...a},o)=>{let{open:s,setOpen:c}=w(`Accordion.Content`),l=f(null),d=t(l,o);return u(()=>{let e=l.current;if(!e||!b())return;let t=()=>{e.removeAttribute(`hidden`),e.style.height=`auto`,c(!0)};return e.addEventListener(`beforematch`,t),()=>{e.removeEventListener(`beforematch`,t)}},[c]),e(()=>{let e=l.current;e&&(s||!b()?e.removeAttribute(`hidden`):(e.setAttribute(`hidden`,`until-found`),e.style.height=``))},[s]),h(`div`,{ref:d,...a,"data-slot":`accordion-content`,"data-state":s?`open`:`closed`,className:n(`h-0 overflow-hidden transition-[height,content-visibility] duration-200 ease-out [interpolate-size:allow-keywords] transition-discrete data-state-open:h-auto motion-reduce:transition-none`,r),children:i})});A.displayName=`AccordionContent`;const j=s(({className:e,...t},r)=>h(`div`,{ref:r,...t,"data-slot":`accordion-body`,className:n(`pt-2 pb-4`,e)}));j.displayName=`AccordionBody`;const M={Root:T,Item:E,Trigger:D,TriggerIcon:k,Content:A,Body:j};export{M as Accordion};
1
+ import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-BdBMM9ga.js";import{t as n}from"./cx-IiQEAKf5.js";import{t as r}from"./icon-CGgMKpJg.js";import{t as i}from"./slot-CDk0Bb9z.js";import{CaretDownIcon as a}from"@phosphor-icons/react/CaretDown";import{createContext as o,useCallback as s,useContext as c,useEffect as l,useMemo as u,useRef as d,useState as f}from"react";import p from"tiny-invariant";import{jsx as m}from"react/jsx-runtime";function h(e,t){return e.includes(t)}function g(e,t,n,r){let i=e.includes(t);return n?r===`single`?i&&e.length===1?e:[t]:i?e:[...e,t]:i?e.filter(e=>e!==t):e}function _(e){return e==null?[]:typeof e==`string`?e===``?[]:[e]:e}function v(e,t){e.type===`single`?e.onValueChange?.(t[0]??``):e.onValueChange?.([...t])}function y(){return typeof document<`u`&&document.body!=null&&`onbeforematch`in document.body}const b=o(null);function x(e){let t=c(b);return p(t,`\`${e}\` must be rendered within \`Accordion.Root\`.`),t}const S=o(null);function C(e){let t=c(S);return p(t,`\`${e}\` must be rendered within \`Accordion.Item\`.`),t}const w=e=>{let{type:t=`multiple`,value:r,defaultValue:a,onValueChange:o,asChild:s,children:c,className:l,ref:d,...p}=e,h=r!=null,[y,x]=f(()=>_(a)),S=h?_(r):y,C=u(()=>({type:t,openValues:S,setItemOpen:(n,r)=>{let i=g(S,n,r,t);i!==S&&(h||x(i),v(e,i))}}),[t,S,h,e]),w={...p,"data-slot":`accordion`,className:n(`w-full divide-y divide-separator`,l)};return m(b.Provider,{value:C,children:m(s?i:`div`,{ref:d,...w,children:c})})};w.displayName=`Accordion`;const T=({children:e,value:t,ref:n,...r})=>{let{openValues:i,setItemOpen:a}=x(`Accordion.Item`),o=h(i,t),c=s(e=>{a(t,e)},[a,t]),l=u(()=>({open:o,setOpen:c}),[o,c]);return m(S.Provider,{value:l,children:m(`div`,{ref:n,...r,role:`group`,"data-slot":`accordion-item`,"data-state":o?`open`:`closed`,children:e})})};T.displayName=`AccordionItem`;const E=({className:e,children:t,onClick:r,ref:i,...a})=>{let{open:o,setOpen:s}=C(`Accordion.Trigger`);return m(`button`,{ref:i,type:`button`,...a,"data-slot":`accordion-trigger`,"data-state":o?`open`:`closed`,"aria-expanded":o,className:n(`group flex w-full cursor-pointer items-center justify-between gap-4 py-4 text-left font-medium outline-none`,`-mx-2 rounded-md px-2`,`transition-[padding] duration-200 ease-out data-state-open:pb-2 motion-reduce:transition-none`,`focus:outline-hidden focus-visible:ring-4 focus-visible:ring-focus-accent`,e),onClick:e=>{r?.(e),s(!o)},children:t})};E.displayName=`AccordionTrigger`;const D=m(a,{weight:`bold`}),O=({className:e,svg:t=D,...i})=>m(r,{...i,"data-slot":`accordion-trigger-icon`,svg:t,className:n(`size-4 shrink-0 text-muted transition-transform duration-200 group-data-state-open:rotate-180`,e)});O.displayName=`AccordionTriggerIcon`;const k=({className:r,children:i,ref:a,...o})=>{let{open:s,setOpen:c}=C(`Accordion.Content`),u=d(null),f=t(u,a);return l(()=>{let e=u.current;if(!e||!y())return;let t=()=>{e.removeAttribute(`hidden`),e.style.height=`auto`,c(!0)};return e.addEventListener(`beforematch`,t),()=>{e.removeEventListener(`beforematch`,t)}},[c]),e(()=>{let e=u.current;e&&(s||!y()?e.removeAttribute(`hidden`):(e.setAttribute(`hidden`,`until-found`),e.style.height=``))},[s]),m(`div`,{ref:f,...o,"data-slot":`accordion-content`,"data-state":s?`open`:`closed`,className:n(`h-0 overflow-hidden transition-[height,content-visibility] duration-200 ease-out [interpolate-size:allow-keywords] transition-discrete data-state-open:h-auto motion-reduce:transition-none`,r),children:i})};k.displayName=`AccordionContent`;const A=({className:e,ref:t,...r})=>m(`div`,{ref:t,...r,"data-slot":`accordion-body`,className:n(`pt-2 pb-4`,e)});A.displayName=`AccordionBody`;const j={Root:w,Item:T,Trigger:E,TriggerIcon:O,Content:k,Body:A};export{j as Accordion};
package/dist/agent.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngrok/mantle",
3
- "version": "0.79.3",
3
+ "version": "0.80.0",
4
4
  "origin": "https://mantle.ngrok.com",
5
5
  "endpoints": {
6
6
  "docs": "https://mantle.ngrok.com/",