@ngrok/mantle 0.79.3 → 0.81.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.
- package/dist/accordion.d.ts +158 -19
- package/dist/accordion.js +1 -1
- package/dist/agent.json +5 -1
- package/dist/alert-dialog.d.ts +465 -32
- package/dist/alert-dialog.js +1 -1
- package/dist/alert.d.ts +116 -14
- package/dist/alert.js +1 -1
- package/dist/anchor-DfeXTpKW.js +1 -0
- package/dist/anchor.d.ts +2 -2
- package/dist/anchor.js +1 -1
- package/dist/area-chart.d.ts +504 -0
- package/dist/area-chart.js +1 -0
- package/dist/as-child-D23mGo4f.d.ts +49 -0
- package/dist/badge.d.ts +44 -5
- package/dist/badge.js +1 -1
- package/dist/bar-chart.d.ts +491 -0
- package/dist/bar-chart.js +1 -0
- package/dist/breadcrumb.d.ts +196 -14
- package/dist/breadcrumb.js +1 -1
- package/dist/button-BAno7KIU.js +1 -0
- package/dist/{index-BSAizFod.d.ts → button-C-gMbPso.d.ts} +5 -5
- package/dist/{icon-button-BvQvT790.d.ts → button-C7vAl6lS.d.ts} +22 -63
- package/dist/button-D9n09xUg.js +1 -0
- package/dist/{button-DcXOWUYo.d.ts → button-DARFK2KJ.d.ts} +4 -4
- package/dist/button-DjpEKt2X.js +1 -0
- package/dist/button-DvHMWAPl.js +1 -0
- package/dist/button.d.ts +5 -5
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +0 -3
- package/dist/calendar.js +1 -1
- package/dist/card.d.ts +131 -9
- package/dist/card.js +1 -1
- package/dist/centered-layout.d.ts +209 -8
- package/dist/centered-layout.js +1 -1
- package/dist/chart-BROa2gqt.js +2 -0
- package/dist/chart-BcOC6Qj0.d.ts +275 -0
- package/dist/checkbox-0EoxOyMA.js +1 -0
- package/dist/checkbox.d.ts +13 -11
- package/dist/checkbox.js +1 -1
- package/dist/choice-BHwFSSyv.js +1 -0
- package/dist/choice-BNRQXszu.d.ts +254 -0
- package/dist/choice.d.ts +1 -252
- package/dist/choice.js +1 -1
- package/dist/code-block.d.ts +242 -52
- package/dist/code-block.js +6 -6
- package/dist/code-block_highlight-utils.d.ts +1 -1
- package/dist/code-block_highlight-utils.js +1 -1
- package/dist/code.d.ts +3 -2
- package/dist/code.js +1 -1
- package/dist/combobox.d.ts +171 -16
- package/dist/combobox.js +1 -1
- package/dist/command.d.ts +279 -81
- package/dist/command.js +1 -1
- package/dist/compose-refs-BdBMM9ga.js +1 -0
- package/dist/data-table.d.ts +28 -6
- package/dist/data-table.js +1 -1
- package/dist/description-list.d.ts +67 -6
- package/dist/description-list.js +1 -1
- package/dist/dialog-BM4wPCft.d.ts +24 -0
- package/dist/dialog-DWZWd5Jt.js +1 -0
- package/dist/dialog.d.ts +226 -35
- package/dist/dialog.js +1 -1
- package/dist/{dropdown-menu-DP_Ne9Mr.d.ts → dropdown-menu-DZg-Cd69.d.ts} +137 -32
- package/dist/dropdown-menu-Dw-OtXPm.d.ts +1 -0
- package/dist/dropdown-menu-RyDWoKHx.js +1 -0
- package/dist/dropdown-menu.d.ts +2 -2
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.d.ts +7 -22
- package/dist/empty.js +1 -1
- package/dist/field-B1wqeZr4.js +1 -0
- package/dist/field.d.ts +568 -47
- package/dist/field.js +1 -1
- package/dist/flag.d.ts +0 -3
- package/dist/flag.js +1 -1
- package/dist/hooks.d.ts +3 -4
- package/dist/hooks.js +1 -1
- package/dist/hover-card.d.ts +48 -7
- package/dist/hover-card.js +1 -1
- package/dist/{svg-only-BFeFS1aa.d.ts → icon-CX_gj6sW.d.ts} +2 -2
- package/dist/icon-d-nMCfAI.js +1 -0
- package/dist/{icon-Cevjo93X.d.ts → icon-k4E9yNWD.d.ts} +2 -2
- package/dist/icon-lZ48P8Nn.js +1 -0
- package/dist/icon.d.ts +3 -3
- package/dist/icon.js +1 -1
- package/dist/{sort-BPX2Fk9t.js → icons-B_DDQcVD.js} +1 -1
- package/dist/{traffic-policy-file-0g5RXFqu.js → icons-CF1lbWtp.js} +1 -1
- package/dist/icons-DLCs1hLP.js +1 -0
- package/dist/icons.d.ts +7 -15
- package/dist/icons.js +1 -1
- package/dist/{in-view-nkSOdED2.d.ts → in-view-DDEGUKDR.d.ts} +17 -9
- package/dist/{index-D47aqlpz.d.ts → index-DA4ig3gj.d.ts} +1 -1
- package/dist/input-BnlpQF0c.js +1 -0
- package/dist/{types-C19IR7jf.d.ts → input-BuYDU6CF.d.ts} +42 -2
- package/dist/input.d.ts +5 -56
- package/dist/input.js +1 -1
- package/dist/{label-v2-bv98k.d.ts → label-C6YH9skg.d.ts} +8 -6
- package/dist/label-D-D11mlp.js +1 -0
- package/dist/label.d.ts +1 -1
- package/dist/label.js +1 -1
- package/dist/line-chart.d.ts +490 -0
- package/dist/line-chart.js +1 -0
- package/dist/list-51KQvENW.js +1 -0
- package/dist/list.d.ts +135 -6
- package/dist/list.js +1 -1
- package/dist/llms.txt +5 -1
- package/dist/main.d.ts +20 -4
- package/dist/main.js +1 -1
- package/dist/mantle-dark-high-contrast.css +17 -0
- package/dist/mantle-dark.css +13 -0
- package/dist/mantle-light-high-contrast.css +15 -0
- package/dist/mantle.css +29 -0
- package/dist/media-object.d.ts +18 -4
- package/dist/media-object.js +1 -1
- package/dist/multi-select.d.ts +282 -24
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.d.ts +118 -6
- package/dist/otp-input.js +1 -1
- package/dist/pagination.d.ts +61 -6
- package/dist/pagination.js +1 -1
- package/dist/popover-CE4OlWkd.d.ts +208 -0
- package/dist/popover-CQ9s7jG5.js +1 -0
- package/dist/popover.d.ts +1 -181
- package/dist/popover.js +1 -1
- package/dist/primitive-trJDqIXJ.js +1 -0
- package/dist/progress.d.ts +2 -8
- package/dist/progress.js +1 -1
- package/dist/qr-code.d.ts +101 -5
- package/dist/qr-code.js +1 -1
- package/dist/radio-group.d.ts +110 -35
- package/dist/radio-group.js +1 -1
- package/dist/sandboxed-on-click.d.ts +2 -2
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/scatter-plot.d.ts +495 -0
- package/dist/scatter-plot.js +1 -0
- package/dist/select-0z7HVS6r.d.ts +579 -0
- package/dist/select-BCHWvmyC.js +1 -0
- package/dist/select.d.ts +1 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list.d.ts +225 -298
- package/dist/selectable-list.js +1 -1
- package/dist/separator-B5UmkVRL.d.ts +75 -0
- package/dist/separator-bpE_kooz.js +1 -0
- package/dist/separator.d.ts +1 -52
- package/dist/separator.js +1 -1
- package/dist/sheet.d.ts +285 -38
- package/dist/sheet.js +1 -1
- package/dist/skeleton-CsbUHbBA.js +1 -0
- package/dist/skeleton.d.ts +4 -7
- package/dist/skeleton.js +1 -1
- package/dist/skip-to-main-link.d.ts +24 -4
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slider.js +1 -1
- package/dist/{index-Rv8RL7xy.d.ts → slot-BtwKJTLq.d.ts} +1 -1
- package/dist/slot-CDk0Bb9z.js +1 -0
- package/dist/slot.d.ts +1 -1
- package/dist/slot.js +1 -1
- package/dist/split-button.d.ts +14 -14
- package/dist/split-button.js +1 -1
- package/dist/switch.d.ts +10 -7
- package/dist/switch.js +1 -1
- package/dist/table-Bo0vNxIJ.d.ts +848 -0
- package/dist/table-CGxJwtbL.js +1 -0
- package/dist/table.d.ts +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +124 -25
- package/dist/tabs.js +1 -1
- package/dist/text-area.d.ts +2 -2
- package/dist/text-area.js +1 -1
- package/dist/theme-C26-Xolp.js +1 -0
- package/dist/theme-switcher.d.ts +105 -33
- package/dist/theme-switcher.js +1 -1
- package/dist/theme.d.ts +54 -15
- package/dist/theme.js +1 -1
- package/dist/toast.d.ts +86 -10
- package/dist/toast.js +1 -1
- package/dist/tooltip.d.ts +50 -5
- package/dist/tooltip.js +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/dist/well.d.ts +3 -3
- package/dist/well.js +1 -1
- package/package.json +9 -3
- package/dist/anchor-C_tjSVy6.js +0 -1
- package/dist/as-child-CYEVu1WY.d.ts +0 -23
- package/dist/button-5t6-JS_I.js +0 -1
- package/dist/button-ClC60Nzg.js +0 -1
- package/dist/checkbox-DJ2xl7Rc.js +0 -1
- package/dist/choice-DOdyNzFC.js +0 -1
- package/dist/compose-refs-Cjf2gfB8.js +0 -1
- package/dist/dialog-vxLIvB8M.js +0 -1
- package/dist/dropdown-menu-Bt1aKF1g.js +0 -1
- package/dist/field-context-BR01g789.js +0 -1
- package/dist/icon-CDtYjF_H.js +0 -1
- package/dist/icon-button-DV2-GZHf.js +0 -1
- package/dist/index-g2rfwNCH.d.ts +0 -1
- package/dist/input-Ct1YOqSy.js +0 -1
- package/dist/label-BMlHW_2D.js +0 -1
- package/dist/popover-D5WxxnBY.js +0 -1
- package/dist/primitive-C64-m48O.d.ts +0 -13
- package/dist/primitive-IKruV2iB.js +0 -1
- package/dist/select-Bwt2YduR.d.ts +0 -345
- package/dist/select-D-5u0Blc.js +0 -1
- package/dist/separator-kBnnv3Cw.js +0 -1
- package/dist/skeleton-Bu3tgNcW.js +0 -1
- package/dist/slot-DmPrjM7N.js +0 -1
- package/dist/svg-only-DDx6FtJd.js +0 -1
- package/dist/table-CPH2md2-.js +0 -1
- package/dist/table-CwFHXC-G.d.ts +0 -414
- package/dist/theme-D3MDng6U.js +0 -1
- package/dist/theme-provider-C9zpDyJW.js +0 -1
- package/dist/toast-BsCjaMVS.js +0 -1
- package/dist/virtual-DZMBu7Ch.js +0 -1
- /package/dist/{sizes-BCoI4bhP.d.ts → button-BCoI4bhP.d.ts} +0 -0
- /package/dist/{intents-DdSKSj1c.d.ts → button-DdSKSj1c.d.ts} +0 -0
- /package/dist/{resolve-pre-rendered-props-B6OlZrSI.d.ts → code-block-B6OlZrSI.d.ts} +0 -0
- /package/dist/{resolve-pre-rendered-props-C9uaM9-V.js → code-block-C9uaM9-V.js} +0 -0
- /package/dist/{validation-7QeiTFwl.d.ts → field-7QeiTFwl.d.ts} +0 -0
- /package/dist/{validation-Bpptk_9t.js → field-Bpptk_9t.js} +0 -0
- /package/dist/{types-D1RY5Tcj.d.ts → icon-D1RY5Tcj.d.ts} +0 -0
- /package/dist/{is-input-CXmS0OFN.js → input-CXmS0OFN.js} +0 -0
- /package/dist/{themes-CYNpplwN.d.ts → theme-CYNpplwN.d.ts} +0 -0
package/dist/accordion.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as IconProps } from "./icon-
|
|
3
|
-
import {
|
|
1
|
+
import { n as WithAsChild } from "./as-child-D23mGo4f.js";
|
|
2
|
+
import { n as IconProps } from "./icon-k4E9yNWD.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,94 @@ 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<
|
|
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: (props: AccordionRootProps) => import("react").JSX.Element;
|
|
97
|
+
/**
|
|
98
|
+
* A single collapsible section, rendered as a plain `<div role="group">` — the
|
|
99
|
+
* same accessibility role the browser gives a native `<details>`. Derives its
|
|
100
|
+
* open state from {@link Root}.
|
|
101
|
+
*
|
|
102
|
+
* Because the item is just a `<div>`, its header can be any layout — e.g. a flex
|
|
103
|
+
* row with the {@link Trigger} alongside a separate, non-toggling action button.
|
|
104
|
+
*
|
|
105
|
+
* @see https://mantle.ngrok.com/components/data-display/accordion#api-accordion-item
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* <Accordion.Root type="single" defaultValue="item-1">
|
|
109
|
+
* <Accordion.Item value="item-1">
|
|
110
|
+
* <Accordion.Trigger>
|
|
111
|
+
* Is it accessible?
|
|
112
|
+
* <Accordion.TriggerIcon />
|
|
113
|
+
* </Accordion.Trigger>
|
|
114
|
+
* <Accordion.Content>
|
|
115
|
+
* <Accordion.Body>Yes. It adheres to the WAI-ARIA disclosure pattern.</Accordion.Body>
|
|
116
|
+
* </Accordion.Content>
|
|
117
|
+
* </Accordion.Item>
|
|
118
|
+
* </Accordion.Root>
|
|
119
|
+
*/
|
|
120
|
+
declare const Item: ({ children, value, ref, ...props }: ComponentProps<"div"> & {
|
|
121
|
+
/** The unique value identifying this item within its accordion. */
|
|
122
|
+
value: string;
|
|
123
|
+
}) => import("react").JSX.Element;
|
|
124
|
+
/**
|
|
125
|
+
* The interactive header that toggles its section, rendered as a `<button>` with
|
|
126
|
+
* `aria-expanded` — the disclosure semantics a native `<summary>` provides, but
|
|
127
|
+
* via a real button so the role is consistent across browsers (native summary's
|
|
128
|
+
* role varies). Place the {@link TriggerIcon} as the last child so the default
|
|
129
|
+
* `justify-between` layout pushes it to the trailing edge.
|
|
130
|
+
*
|
|
131
|
+
* @see https://mantle.ngrok.com/components/data-display/accordion#api-accordion-trigger
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* <Accordion.Root type="single" defaultValue="item-1">
|
|
135
|
+
* <Accordion.Item value="item-1">
|
|
136
|
+
* <Accordion.Trigger>
|
|
137
|
+
* Is it accessible?
|
|
138
|
+
* <Accordion.TriggerIcon />
|
|
139
|
+
* </Accordion.Trigger>
|
|
140
|
+
* <Accordion.Content>
|
|
141
|
+
* <Accordion.Body>Yes. It adheres to the WAI-ARIA disclosure pattern.</Accordion.Body>
|
|
142
|
+
* </Accordion.Content>
|
|
143
|
+
* </Accordion.Item>
|
|
144
|
+
* </Accordion.Root>
|
|
145
|
+
*/
|
|
146
|
+
declare const Trigger: ({ className, children, onClick, ref, ...props }: Omit<ComponentProps<"button">, "type">) => import("react").JSX.Element;
|
|
60
147
|
/**
|
|
61
148
|
* The icon that indicates the open/closed state of its {@link Trigger}. Defaults
|
|
62
149
|
* to a downward caret that rotates 180° when the section is open. Pass `svg` to
|
|
@@ -95,13 +182,68 @@ type AccordionRootProps = (AccordionSingleProps | AccordionMultipleProps) & Omit
|
|
|
95
182
|
* </Accordion.Item>
|
|
96
183
|
* </Accordion.Root>
|
|
97
184
|
*/
|
|
98
|
-
declare const TriggerIcon: {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
185
|
+
declare const TriggerIcon: ({ className, svg, ...props }: Omit<IconProps, "svg"> & {
|
|
186
|
+
/** The icon to render. Defaults to a downward caret that rotates open. */
|
|
187
|
+
svg?: IconProps["svg"];
|
|
188
|
+
}) => import("react").JSX.Element;
|
|
189
|
+
/**
|
|
190
|
+
* The collapsible region of an {@link Item} — the zero-padding viewport that
|
|
191
|
+
* slides open and closed. Wrap its children in {@link Body} for the standard
|
|
192
|
+
* padding (text inherits the ambient size); `Content` itself stays unpadded so
|
|
193
|
+
* its `h-0` collapse can reach zero height. Always rendered into the DOM; when
|
|
194
|
+
* collapsed (in
|
|
195
|
+
* supporting browsers) it carries `hidden="until-found"` so its text stays
|
|
196
|
+
* discoverable by the browser's find-in-page, and a `beforematch` listener opens
|
|
197
|
+
* the section when the browser reveals a match. It is flow content, so it may
|
|
198
|
+
* contain anything — including interactive elements.
|
|
199
|
+
*
|
|
200
|
+
* @see https://mantle.ngrok.com/components/data-display/accordion#api-accordion-content
|
|
201
|
+
*
|
|
202
|
+
* @example
|
|
203
|
+
* <Accordion.Root type="single" defaultValue="item-1">
|
|
204
|
+
* <Accordion.Item value="item-1">
|
|
205
|
+
* <Accordion.Trigger>
|
|
206
|
+
* Is it accessible?
|
|
207
|
+
* <Accordion.TriggerIcon />
|
|
208
|
+
* </Accordion.Trigger>
|
|
209
|
+
* <Accordion.Content>
|
|
210
|
+
* <Accordion.Body>Yes. It adheres to the WAI-ARIA disclosure pattern.</Accordion.Body>
|
|
211
|
+
* </Accordion.Content>
|
|
212
|
+
* </Accordion.Item>
|
|
213
|
+
* </Accordion.Root>
|
|
214
|
+
*/
|
|
215
|
+
declare const Content: ({ className, children, ref, ...props }: ComponentProps<"div">) => import("react").JSX.Element;
|
|
216
|
+
/**
|
|
217
|
+
* The padded inner region of an {@link Item}'s {@link Content} — where the
|
|
218
|
+
* section's body content lives. Owns the body's padding so {@link Content} can
|
|
219
|
+
* stay a zero-padding animation viewport: a padded `h-0` border-box can't
|
|
220
|
+
* collapse below its padding, so keeping the padding here lets the closed slide
|
|
221
|
+
* reach zero height. The `pt-2` doubles as the focus ring's vertical clearance —
|
|
222
|
+
* it pairs with the trigger's open-state `pb-2` so the gap below the trigger
|
|
223
|
+
* stays a uniform 16px while 8px of it sits outside the button box, keeping the
|
|
224
|
+
* ring off the body's first line (see {@link Trigger}). Text inherits the ambient
|
|
225
|
+
* size — it isn't forced — so set a size on the content where you need one.
|
|
226
|
+
* Override `className` to retune the padding (e.g. `pb-0`, `px-6`); `cx` resolves
|
|
227
|
+
* last-wins.
|
|
228
|
+
*
|
|
229
|
+
* @see https://mantle.ngrok.com/components/data-display/accordion#api-accordion-body
|
|
230
|
+
*
|
|
231
|
+
* @example
|
|
232
|
+
* <Accordion.Root type="single" defaultValue="item-1">
|
|
233
|
+
* <Accordion.Item value="item-1">
|
|
234
|
+
* <Accordion.Trigger>
|
|
235
|
+
* Is it accessible?
|
|
236
|
+
* <Accordion.TriggerIcon />
|
|
237
|
+
* </Accordion.Trigger>
|
|
238
|
+
* <Accordion.Content>
|
|
239
|
+
* <Accordion.Body className="pb-6">
|
|
240
|
+
* Yes. It adheres to the WAI-ARIA disclosure pattern.
|
|
241
|
+
* </Accordion.Body>
|
|
242
|
+
* </Accordion.Content>
|
|
243
|
+
* </Accordion.Item>
|
|
244
|
+
* </Accordion.Root>
|
|
245
|
+
*/
|
|
246
|
+
declare const Body: ({ className, ref, ...props }: ComponentProps<"div">) => import("react").JSX.Element;
|
|
105
247
|
/**
|
|
106
248
|
* A vertically stacked set of disclosure sections styled after the shadcn /
|
|
107
249
|
* ngrok.com accordion.
|
|
@@ -159,7 +301,7 @@ declare const Accordion: {
|
|
|
159
301
|
* </Accordion.Item>
|
|
160
302
|
* </Accordion.Root>
|
|
161
303
|
*/
|
|
162
|
-
readonly Root:
|
|
304
|
+
readonly Root: typeof Root;
|
|
163
305
|
/**
|
|
164
306
|
* A single collapsible section. See {@link Item}.
|
|
165
307
|
*
|
|
@@ -176,10 +318,7 @@ declare const Accordion: {
|
|
|
176
318
|
* </Accordion.Item>
|
|
177
319
|
* </Accordion.Root>
|
|
178
320
|
*/
|
|
179
|
-
readonly Item:
|
|
180
|
-
/** The unique value identifying this item within its accordion. */
|
|
181
|
-
value: string;
|
|
182
|
-
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
321
|
+
readonly Item: typeof Item;
|
|
183
322
|
/**
|
|
184
323
|
* The `<button>` header that toggles a section. See {@link Trigger}.
|
|
185
324
|
*
|
|
@@ -196,7 +335,7 @@ declare const Accordion: {
|
|
|
196
335
|
* </Accordion.Item>
|
|
197
336
|
* </Accordion.Root>
|
|
198
337
|
*/
|
|
199
|
-
readonly Trigger:
|
|
338
|
+
readonly Trigger: typeof Trigger;
|
|
200
339
|
/**
|
|
201
340
|
* The caret indicating open/closed state. See {@link TriggerIcon}.
|
|
202
341
|
*
|
|
@@ -230,7 +369,7 @@ declare const Accordion: {
|
|
|
230
369
|
* </Accordion.Item>
|
|
231
370
|
* </Accordion.Root>
|
|
232
371
|
*/
|
|
233
|
-
readonly Content:
|
|
372
|
+
readonly Content: typeof Content;
|
|
234
373
|
/**
|
|
235
374
|
* The padded inner region of a {@link Content}. See {@link Body}.
|
|
236
375
|
*
|
|
@@ -249,7 +388,7 @@ declare const Accordion: {
|
|
|
249
388
|
* </Accordion.Item>
|
|
250
389
|
* </Accordion.Root>
|
|
251
390
|
*/
|
|
252
|
-
readonly Body:
|
|
391
|
+
readonly Body: typeof Body;
|
|
253
392
|
};
|
|
254
393
|
//#endregion
|
|
255
394
|
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-
|
|
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-lZ48P8Nn.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})})},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})})},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})},D=m(a,{weight:`bold`}),O={Root:w,Item:T,Trigger:E,TriggerIcon:({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)}),Content:({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})},Body:({className:e,ref:t,...r})=>m(`div`,{ref:t,...r,"data-slot":`accordion-body`,className:n(`pt-2 pb-4`,e)})};export{O as Accordion};
|
package/dist/agent.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngrok/mantle",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.81.0",
|
|
4
4
|
"origin": "https://mantle.ngrok.com",
|
|
5
5
|
"endpoints": {
|
|
6
6
|
"docs": "https://mantle.ngrok.com/",
|
|
@@ -20,7 +20,9 @@
|
|
|
20
20
|
"@ngrok/mantle/alert",
|
|
21
21
|
"@ngrok/mantle/alert-dialog",
|
|
22
22
|
"@ngrok/mantle/anchor",
|
|
23
|
+
"@ngrok/mantle/area-chart",
|
|
23
24
|
"@ngrok/mantle/badge",
|
|
25
|
+
"@ngrok/mantle/bar-chart",
|
|
24
26
|
"@ngrok/mantle/breadcrumb",
|
|
25
27
|
"@ngrok/mantle/browser-only",
|
|
26
28
|
"@ngrok/mantle/button",
|
|
@@ -50,6 +52,7 @@
|
|
|
50
52
|
"@ngrok/mantle/input",
|
|
51
53
|
"@ngrok/mantle/kbd",
|
|
52
54
|
"@ngrok/mantle/label",
|
|
55
|
+
"@ngrok/mantle/line-chart",
|
|
53
56
|
"@ngrok/mantle/list",
|
|
54
57
|
"@ngrok/mantle/main",
|
|
55
58
|
"@ngrok/mantle/media-object",
|
|
@@ -61,6 +64,7 @@
|
|
|
61
64
|
"@ngrok/mantle/qr-code",
|
|
62
65
|
"@ngrok/mantle/radio-group",
|
|
63
66
|
"@ngrok/mantle/sandboxed-on-click",
|
|
67
|
+
"@ngrok/mantle/scatter-plot",
|
|
64
68
|
"@ngrok/mantle/select",
|
|
65
69
|
"@ngrok/mantle/selectable-list",
|
|
66
70
|
"@ngrok/mantle/separator",
|