@ngrok/mantle 0.76.11 → 0.78.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 +63 -21
- package/dist/accordion.js +1 -1
- package/dist/agent.json +7 -1
- package/dist/alert-dialog.d.ts +19 -26
- package/dist/alert-dialog.js +1 -1
- package/dist/alert.d.ts +16 -24
- package/dist/alert.js +1 -1
- package/dist/{anchor-BtgEJoPN.js → anchor-C_tjSVy6.js} +1 -1
- package/dist/anchor.d.ts +3 -4
- package/dist/anchor.js +1 -1
- package/dist/{as-child-uN_018tj.d.ts → as-child-CYEVu1WY.d.ts} +0 -7
- package/dist/badge.d.ts +5 -56
- package/dist/badge.js +1 -1
- package/dist/breadcrumb.d.ts +212 -0
- package/dist/breadcrumb.js +1 -0
- package/dist/browser-only-CPH56Xw_.js +1 -0
- package/dist/browser-only.d.ts +2 -6
- package/dist/browser-only.js +1 -1
- package/dist/{button-CERx95KE.js → button-5t6-JS_I.js} +1 -1
- package/dist/button-AS5Ir3DE.js +1 -0
- package/dist/{button-mfYak6Rx.d.ts → button-Bw9MpShl.d.ts} +26 -8
- package/dist/button.d.ts +5 -4
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +2 -8
- package/dist/calendar.js +1 -1
- package/dist/card.d.ts +8 -8
- package/dist/card.js +1 -1
- package/dist/centered-layout.d.ts +147 -0
- package/dist/centered-layout.js +1 -0
- package/dist/checkbox-DJ2xl7Rc.js +1 -0
- package/dist/checkbox.d.ts +11 -9
- package/dist/checkbox.js +1 -1
- package/dist/choice-DOdyNzFC.js +1 -0
- package/dist/choice.d.ts +253 -0
- package/dist/choice.js +1 -0
- package/dist/code-block.d.ts +5 -17
- package/dist/code-block.js +1 -1
- package/dist/code-block_highlight-utils.d.ts +1 -1
- package/dist/code-block_highlight-utils.js +1 -1
- package/dist/code.d.ts +4 -5
- package/dist/code.js +1 -1
- package/dist/combobox.d.ts +40 -19
- package/dist/combobox.js +1 -1
- package/dist/command.d.ts +60 -38
- package/dist/command.js +1 -1
- package/dist/{copy-to-clipboard-Baw30q9O.js → copy-to-clipboard-BsCQ9m6K.js} +1 -1
- package/dist/cx-IiQEAKf5.js +1 -0
- package/dist/cx.js +1 -1
- package/dist/data-slot-CChfb_cv.d.ts +17 -0
- package/dist/data-table.d.ts +45 -131
- package/dist/data-table.js +1 -1
- package/dist/description-list.d.ts +7 -7
- package/dist/description-list.js +1 -1
- package/dist/{dialog-Cp0S2jsG.js → dialog-DVDFVT_-.js} +1 -1
- package/dist/dialog.d.ts +155 -48
- package/dist/dialog.js +1 -1
- package/dist/{direction-CcTY0FmA.d.ts → direction-BjU0bPST.d.ts} +1 -1
- package/dist/{dropdown-menu-OEuW4GLp.js → dropdown-menu-ByUQkAvJ.js} +1 -1
- package/dist/{dropdown-menu-CADgs9gz.d.ts → dropdown-menu-DT30TQzL.d.ts} +21 -24
- package/dist/dropdown-menu.d.ts +2 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.d.ts +133 -53
- package/dist/empty.js +1 -1
- package/dist/{field-context-4k1kI7Bo.js → field-context-BR01g789.js} +1 -1
- package/dist/field.d.ts +24 -36
- package/dist/field.js +1 -1
- package/dist/flag.d.ts +2 -9
- package/dist/flag.js +1 -1
- package/dist/hooks.d.ts +139 -81
- package/dist/hooks.js +1 -1
- package/dist/hover-card.d.ts +34 -14
- package/dist/hover-card.js +1 -1
- package/dist/icon-CDtYjF_H.js +1 -0
- package/dist/{icon-n49kOh4_.d.ts → icon-Cevjo93X.d.ts} +2 -3
- package/dist/{icon-button-DiX9iZ9n.js → icon-button-CxVsZ2N1.js} +1 -1
- package/dist/{icon-button-D7hs6bX2.d.ts → icon-button-DuRSCsPh.d.ts} +5 -6
- package/dist/icon.d.ts +3 -3
- package/dist/icon.js +1 -1
- package/dist/icons.d.ts +7 -19
- package/dist/icons.js +1 -1
- package/dist/{in-view-BC3wmz-a.d.ts → in-view-nkSOdED2.d.ts} +21 -10
- package/dist/index-BnI3OppC.d.ts +1 -0
- package/dist/{index-CTU6apE6.d.ts → index-CDwfBOAA.d.ts} +5 -4
- package/dist/{index-Bed_XLWa.d.ts → index-D47aqlpz.d.ts} +3 -2
- package/dist/index-Rv8RL7xy.d.ts +25 -0
- package/dist/input-Ct1YOqSy.js +1 -0
- package/dist/input.d.ts +10 -56
- package/dist/input.js +1 -1
- package/dist/{kbd-D6k4Dnrf.js → kbd-K8iaZ-Ti.js} +1 -1
- package/dist/kbd.d.ts +3 -8
- package/dist/kbd.js +1 -1
- package/dist/{label-BLXfnQmn.js → label-BMlHW_2D.js} +1 -1
- package/dist/label-v2-bv98k.d.ts +69 -0
- package/dist/label.d.ts +1 -68
- package/dist/label.js +1 -1
- package/dist/list.d.ts +295 -0
- package/dist/list.js +1 -0
- package/dist/llms.txt +7 -1
- package/dist/main.d.ts +4 -27
- package/dist/main.js +1 -1
- package/dist/mantle.css +6 -6
- package/dist/media-object.d.ts +6 -7
- package/dist/media-object.js +1 -1
- package/dist/multi-select.d.ts +80 -33
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.d.ts +7 -8
- package/dist/otp-input.js +1 -1
- package/dist/pagination.d.ts +11 -22
- package/dist/pagination.js +1 -1
- package/dist/{popover-Bq52EC7X.js → popover-D5WxxnBY.js} +1 -1
- package/dist/popover.d.ts +6 -7
- package/dist/popover.js +1 -1
- package/dist/{primitive-FoWela9a.d.ts → primitive-C64-m48O.d.ts} +0 -1
- package/dist/{primitive-BFUir4UB.js → primitive-wm7Wk-gy.js} +1 -1
- package/dist/progress.d.ts +55 -46
- package/dist/progress.js +1 -1
- package/dist/qr-code.d.ts +10 -9
- package/dist/qr-code.js +1 -1
- package/dist/radio-group.d.ts +71 -60
- package/dist/radio-group.js +1 -1
- package/dist/{resolve-pre-rendered-props-DxJ9-DAl.d.ts → resolve-pre-rendered-props-B6OlZrSI.d.ts} +13 -26
- package/dist/{resolve-pre-rendered-props-DwIF_M_K.js → resolve-pre-rendered-props-C3e5Auo3.js} +1 -1
- package/dist/sandboxed-on-click.d.ts +4 -8
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/{select-BUGOJMER.d.ts → select-Bwt2YduR.d.ts} +11 -12
- package/dist/{select-xfyY5Vt1.js → select-D-5u0Blc.js} +1 -1
- package/dist/select.d.ts +1 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list.d.ts +725 -0
- package/dist/selectable-list.js +1 -0
- package/dist/{separator-CqohKk4z.js → separator-kBnnv3Cw.js} +1 -1
- package/dist/separator.d.ts +6 -37
- package/dist/separator.js +1 -1
- package/dist/sheet.d.ts +231 -47
- package/dist/sheet.js +1 -1
- package/dist/sizes-Dje_rwKc.d.ts +29 -0
- package/dist/skeleton-Bu3tgNcW.js +1 -0
- package/dist/skeleton.d.ts +2 -2
- package/dist/skeleton.js +1 -1
- package/dist/skip-to-main-link.d.ts +4 -34
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slider.d.ts +2 -21
- package/dist/slider.js +1 -1
- package/dist/slot-DmPrjM7N.js +1 -0
- package/dist/slot.d.ts +1 -1
- package/dist/slot.js +1 -1
- package/dist/split-button.d.ts +20 -12
- package/dist/split-button.js +1 -1
- package/dist/{svg-only-f6ToFLH0.d.ts → svg-only-BFeFS1aa.d.ts} +2 -3
- package/dist/{svg-only-CSOaF1tL.js → svg-only-DDx6FtJd.js} +1 -1
- package/dist/switch.d.ts +6 -3
- package/dist/switch.js +1 -1
- package/dist/{table-CAitdL78.js → table-CPH2md2-.js} +1 -1
- package/dist/{table-BWD9IlIN.d.ts → table-CwFHXC-G.d.ts} +10 -10
- package/dist/table.d.ts +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +29 -15
- package/dist/tabs.js +1 -1
- package/dist/text-area.d.ts +2 -3
- package/dist/text-area.js +1 -1
- package/dist/theme-D8kZCOzM.js +1 -0
- package/dist/theme-provider-Djj_jBo6.js +1 -0
- package/dist/theme-switcher.d.ts +45 -0
- package/dist/theme-switcher.js +1 -0
- package/dist/theme.d.ts +15 -101
- package/dist/theme.js +1 -1
- package/dist/{toast-Bwno5LUs.js → toast-RkhbliFh.js} +1 -1
- package/dist/toast.d.ts +13 -37
- package/dist/toast.js +1 -1
- package/dist/tooltip.d.ts +10 -44
- package/dist/tooltip.js +1 -1
- package/dist/types-C19IR7jf.d.ts +48 -0
- package/dist/{types-BvUzforF.d.ts → types-D1RY5Tcj.d.ts} +0 -1
- package/dist/types.d.ts +3 -3
- package/dist/use-copy-to-clipboard-DqQ0_N3E.js +1 -0
- package/dist/use-prefers-reduced-motion-CagaNRgm.js +1 -0
- package/dist/utils.d.ts +2 -3
- package/dist/utils.js +1 -1
- package/dist/{validation-xyX_6kph.d.ts → validation-7QeiTFwl.d.ts} +3 -12
- package/dist/{validation-DCyx-ceH.js → validation-Bpptk_9t.js} +1 -1
- package/dist/virtual-DZMBu7Ch.js +1 -0
- package/dist/well.d.ts +3 -3
- package/dist/well.js +1 -1
- package/dist/{with-style-props-CyImx7vd.d.ts → with-style-props-Dq5Vntqy.d.ts} +0 -1
- package/package.json +79 -344
- package/dist/browser-only-BSl_hruR.js +0 -1
- package/dist/button-C9GW9nAr.js +0 -1
- package/dist/cx-C1UYP5We.js +0 -1
- package/dist/icon-SUx16Sl3.js +0 -1
- package/dist/index-CJbKEKr2.d.ts +0 -20
- package/dist/slot-DT_E5BQx.js +0 -1
- package/dist/theme-provider-BNFS3Acf.js +0 -1
- package/dist/use-copy-to-clipboard-BLpquU9d.js +0 -1
- package/dist/use-prefers-reduced-motion-CWIoFA6W.js +0 -1
package/dist/list.d.ts
ADDED
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import { t as WithAsChild } from "./as-child-CYEVu1WY.js";
|
|
2
|
+
import { CSSProperties, ComponentProps, ReactNode, Ref } from "react";
|
|
3
|
+
//#region src/components/list/primitive.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* ARIA semantics for a {@link Root} / `VirtualRoot` collection and its
|
|
6
|
+
* {@link Item}s. The element is always a `<div>` — per WAI-ARIA the *role*
|
|
7
|
+
* carries the semantics, not the tag — so both flavors share one implementation.
|
|
8
|
+
*
|
|
9
|
+
* - `"list"` → `<div role="list">` of `<div role="listitem">` rows: a
|
|
10
|
+
* non-selecting list of actions/links (e.g. `List`). Native tab
|
|
11
|
+
* order, with `ArrowUp` / `ArrowDown` / `Home` / `End` moving real focus
|
|
12
|
+
* between the rows' controls (skipping disabled rows).
|
|
13
|
+
* - `"grid"` → `<div role="grid">` of `<div role="row">` rows carrying
|
|
14
|
+
* `aria-selected`, whose children are the `role="gridcell"`s (e.g.
|
|
15
|
+
* `SelectableList`): a single tab stop with `aria-activedescendant`
|
|
16
|
+
* navigation that works across a virtualized window.
|
|
17
|
+
*
|
|
18
|
+
* @see https://mantle.ngrok.com/components/data-display/list
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* <Root semantics="grid" aria-label="Access keys" onActivate={toggleByIndex}>
|
|
23
|
+
* <Item selected>
|
|
24
|
+
* <div role="gridcell">Onboarding key</div>
|
|
25
|
+
* </Item>
|
|
26
|
+
* </Root>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
type ListSemantics = "list" | "grid";
|
|
30
|
+
/**
|
|
31
|
+
* Props for {@link Root} / `VirtualRoot`. Standard `<div>` props (on the scroll
|
|
32
|
+
* viewport) plus the collection `semantics` and the grid activation callback;
|
|
33
|
+
* `aria-label` / `aria-labelledby` name the inner collection element, and
|
|
34
|
+
* `children` are the composed {@link Item}s.
|
|
35
|
+
*
|
|
36
|
+
* @see https://mantle.ngrok.com/components/data-display/list
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```tsx
|
|
40
|
+
* <Root semantics="list" aria-label="Accounts" className="max-h-80">
|
|
41
|
+
* <Item>
|
|
42
|
+
* <button type="button">Acme Inc</button>
|
|
43
|
+
* </Item>
|
|
44
|
+
* </Root>
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
type ListRootProps$1 = ComponentProps<"div"> & {
|
|
48
|
+
/** ARIA semantics for the collection and its rows. Defaults to `"list"`. */
|
|
49
|
+
semantics?: ListSemantics;
|
|
50
|
+
/**
|
|
51
|
+
* Called with the active row's index when it is activated under `"grid"`
|
|
52
|
+
* semantics — by keyboard (`Space` / `Enter`) or by a bare click anywhere on
|
|
53
|
+
* the row that isn't handled by an interactive descendant (a checkbox, a
|
|
54
|
+
* label, a nested link/button). Wire it to selection.
|
|
55
|
+
*/
|
|
56
|
+
onActivate?: (index: number) => void;
|
|
57
|
+
/**
|
|
58
|
+
* The DOM id that `aria-activedescendant` resolves to for a given row index.
|
|
59
|
+
* Defaults to a per-collection row id set on the {@link Item} element. Override
|
|
60
|
+
* it to reference an element you own (e.g. the row's checkbox) when your row
|
|
61
|
+
* element can't take that id.
|
|
62
|
+
*/
|
|
63
|
+
itemId?: (index: number) => string;
|
|
64
|
+
/**
|
|
65
|
+
* Whether the row at an index is disabled — skipped by keyboard navigation
|
|
66
|
+
* and excluded from grid activation. Defaults to reading the composed row
|
|
67
|
+
* element's `disabled` prop (covering `<Item disabled>`); pass it when
|
|
68
|
+
* disabled state lives in your data rather than on the row elements (e.g.
|
|
69
|
+
* `SelectableList` reads it off `options[].disabled`).
|
|
70
|
+
*/
|
|
71
|
+
isItemDisabled?: (index: number) => boolean;
|
|
72
|
+
};
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region src/components/list/virtual.d.ts
|
|
75
|
+
/**
|
|
76
|
+
* Props for {@link VirtualRoot}. The same surface as the plain `Root` plus the
|
|
77
|
+
* virtualizer knobs.
|
|
78
|
+
*
|
|
79
|
+
* @see https://mantle.ngrok.com/components/data-display/list
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ```tsx
|
|
83
|
+
* <VirtualRoot aria-label="Accounts" className="max-h-80" estimateItemHeight={36} overscan={12}>
|
|
84
|
+
* <Item>
|
|
85
|
+
* <button type="button">Acme Inc</button>
|
|
86
|
+
* </Item>
|
|
87
|
+
* </VirtualRoot>
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
type VirtualRootProps = ListRootProps$1 & {
|
|
91
|
+
/** Estimated item height in px, used to seed the virtualizer before items are measured. */
|
|
92
|
+
estimateItemHeight?: number;
|
|
93
|
+
/** Rows rendered beyond the visible window on each side. The buffer keeps the active row mounted for `aria-activedescendant`. */
|
|
94
|
+
overscan?: number;
|
|
95
|
+
};
|
|
96
|
+
//#endregion
|
|
97
|
+
//#region src/components/list/list.d.ts
|
|
98
|
+
/**
|
|
99
|
+
* Props for `List.Root` — the internal list primitive's `Root` props, minus
|
|
100
|
+
* `semantics` (a `List` is always a `role="list"`) and the grid-only
|
|
101
|
+
* `onActivate` / `itemId` knobs (inert under list semantics).
|
|
102
|
+
*
|
|
103
|
+
* @see https://mantle.ngrok.com/components/data-display/list
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* ```tsx
|
|
107
|
+
* <List.Root aria-label="Your accounts" className="max-h-80">
|
|
108
|
+
* <List.Item onClick={() => {}}>
|
|
109
|
+
* <List.ItemTitle>Acme Inc</List.ItemTitle>
|
|
110
|
+
* <List.ItemDescription>Pay-as-you-go</List.ItemDescription>
|
|
111
|
+
* </List.Item>
|
|
112
|
+
* </List.Root>
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
115
|
+
type ListRootProps = Omit<ListRootProps$1, "semantics" | "onActivate" | "itemId" | "isItemDisabled">;
|
|
116
|
+
/**
|
|
117
|
+
* Props for `List.VirtualRoot` — the internal list primitive's
|
|
118
|
+
* `VirtualRoot` props (viewport props plus `estimateItemHeight` / `overscan`),
|
|
119
|
+
* minus `semantics` and the grid-only `onActivate` / `itemId` knobs.
|
|
120
|
+
*
|
|
121
|
+
* @see https://mantle.ngrok.com/components/data-display/list
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* ```tsx
|
|
125
|
+
* <List.VirtualRoot aria-label="Your accounts" className="max-h-80" estimateItemHeight={44}>
|
|
126
|
+
* <List.Item onClick={() => {}}>
|
|
127
|
+
* <List.ItemTitle>Acme Inc</List.ItemTitle>
|
|
128
|
+
* <List.ItemDescription>Pay-as-you-go</List.ItemDescription>
|
|
129
|
+
* </List.Item>
|
|
130
|
+
* </List.VirtualRoot>
|
|
131
|
+
* ```
|
|
132
|
+
*/
|
|
133
|
+
type ListVirtualRootProps = Omit<VirtualRootProps, "semantics" | "onActivate" | "itemId" | "isItemDisabled">;
|
|
134
|
+
/**
|
|
135
|
+
* Props for `List.Item`. Extends `<button>` props (minus `type`, which is fixed
|
|
136
|
+
* to `"button"`) with `asChild` and the optional `current` accent.
|
|
137
|
+
*
|
|
138
|
+
* @see https://mantle.ngrok.com/components/data-display/list
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* ```tsx
|
|
142
|
+
* <List.Root aria-label="Your accounts" className="max-h-80">
|
|
143
|
+
* <List.Item current onClick={() => {}}>
|
|
144
|
+
* <List.ItemTitle>Acme Inc</List.ItemTitle>
|
|
145
|
+
* <List.ItemDescription>Pay-as-you-go</List.ItemDescription>
|
|
146
|
+
* </List.Item>
|
|
147
|
+
* </List.Root>
|
|
148
|
+
* ```
|
|
149
|
+
*/
|
|
150
|
+
type ListItemProps = Omit<ComponentProps<"button">, "type"> & WithAsChild & {
|
|
151
|
+
/**
|
|
152
|
+
* Marks the item as the current one (e.g. the active account) — gives its
|
|
153
|
+
* pill the accent tint and sets `aria-current` so the state is announced,
|
|
154
|
+
* not just shown. Optional; omit it for a plain action/navigation list.
|
|
155
|
+
*/
|
|
156
|
+
current?: boolean;
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* A scrollable, optionally-virtualized list of clickable items — the action /
|
|
160
|
+
* navigation counterpart to `SelectableList` (e.g. an account switcher or SSO
|
|
161
|
+
* provider picker). Compose `List.Item` children directly inside a
|
|
162
|
+
* `List.Root`; each item is a `<button>` (or your own element via
|
|
163
|
+
* `asChild`, e.g. an `<a>`), with an optional `current` accent.
|
|
164
|
+
*
|
|
165
|
+
* It is a **non-selecting** semantic list (`role="list"` of `role="listitem"`),
|
|
166
|
+
* not a selection widget — selection is `SelectableList`'s job. Non-virtualized
|
|
167
|
+
* by default; swap `Root` → `VirtualRoot` (same children) for windowing.
|
|
168
|
+
* Both public list components are built on the same internal list primitive
|
|
169
|
+
* (`./primitive.js`, deliberately unexported — like `dialog/primitive`). Items
|
|
170
|
+
* keep their native tab order, and `ArrowUp` / `ArrowDown` / `Home` / `End`
|
|
171
|
+
* also move focus between them — the focused item tints like hover instead of
|
|
172
|
+
* drawing a focus ring.
|
|
173
|
+
*
|
|
174
|
+
* @see https://mantle.ngrok.com/components/data-display/list
|
|
175
|
+
*
|
|
176
|
+
* @example
|
|
177
|
+
* Composition:
|
|
178
|
+
* ```
|
|
179
|
+
* List.Root (or .VirtualRoot)
|
|
180
|
+
* └── List.Item
|
|
181
|
+
* ├── List.ItemTitle
|
|
182
|
+
* └── List.ItemDescription
|
|
183
|
+
* ```
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* ```tsx
|
|
187
|
+
* <List.Root aria-label="Your accounts" className="max-h-80">
|
|
188
|
+
* {accounts.map((account) => (
|
|
189
|
+
* <List.Item key={account.id} onClick={() => switchTo(account.id)}>
|
|
190
|
+
* <List.ItemTitle>{account.name}</List.ItemTitle>
|
|
191
|
+
* <List.ItemDescription>
|
|
192
|
+
* {account.plan} · {account.memberCount} members
|
|
193
|
+
* </List.ItemDescription>
|
|
194
|
+
* </List.Item>
|
|
195
|
+
* ))}
|
|
196
|
+
* </List.Root>
|
|
197
|
+
* ```
|
|
198
|
+
*/
|
|
199
|
+
declare const List: {
|
|
200
|
+
/**
|
|
201
|
+
* The scrollable container (non-virtualized). Give it an `aria-label` and
|
|
202
|
+
* bound its height. Compose `Item` children.
|
|
203
|
+
*
|
|
204
|
+
* @see https://mantle.ngrok.com/components/data-display/list
|
|
205
|
+
*
|
|
206
|
+
* @example
|
|
207
|
+
* ```tsx
|
|
208
|
+
* <List.Root aria-label="Your accounts" className="max-h-80">
|
|
209
|
+
* {accounts.map((account) => (
|
|
210
|
+
* <List.Item key={account.id} onClick={() => switchTo(account.id)}>
|
|
211
|
+
* <List.ItemTitle>{account.name}</List.ItemTitle>
|
|
212
|
+
* <List.ItemDescription>{account.plan}</List.ItemDescription>
|
|
213
|
+
* </List.Item>
|
|
214
|
+
* ))}
|
|
215
|
+
* </List.Root>
|
|
216
|
+
* ```
|
|
217
|
+
*/
|
|
218
|
+
readonly Root: import("react").ForwardRefExoticComponent<Omit<ListRootProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
219
|
+
/**
|
|
220
|
+
* The virtualized container — windows the same `Item` children. Opt in for
|
|
221
|
+
* long lists; authored identically to `Root`.
|
|
222
|
+
*
|
|
223
|
+
* @see https://mantle.ngrok.com/components/data-display/list
|
|
224
|
+
*
|
|
225
|
+
* @example
|
|
226
|
+
* ```tsx
|
|
227
|
+
* <List.VirtualRoot aria-label="Your accounts" className="max-h-80">
|
|
228
|
+
* {accounts.map((account) => (
|
|
229
|
+
* <List.Item key={account.id} onClick={() => switchTo(account.id)}>
|
|
230
|
+
* <List.ItemTitle>{account.name}</List.ItemTitle>
|
|
231
|
+
* <List.ItemDescription>{account.plan}</List.ItemDescription>
|
|
232
|
+
* </List.Item>
|
|
233
|
+
* ))}
|
|
234
|
+
* </List.VirtualRoot>
|
|
235
|
+
* ```
|
|
236
|
+
*/
|
|
237
|
+
readonly VirtualRoot: import("react").ForwardRefExoticComponent<Omit<ListVirtualRootProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
238
|
+
/**
|
|
239
|
+
* A clickable item — a `<button>` by default, or your own element via
|
|
240
|
+
* `asChild` (e.g. an `<a>`). Optional `current` gives the accent treatment.
|
|
241
|
+
*
|
|
242
|
+
* @see https://mantle.ngrok.com/components/data-display/list
|
|
243
|
+
*
|
|
244
|
+
* @example
|
|
245
|
+
* ```tsx
|
|
246
|
+
* <List.Root aria-label="Your accounts" className="max-h-80">
|
|
247
|
+
* {accounts.map((account) => (
|
|
248
|
+
* <List.Item key={account.id} onClick={() => switchTo(account.id)}>
|
|
249
|
+
* <List.ItemTitle>{account.name}</List.ItemTitle>
|
|
250
|
+
* <List.ItemDescription>{account.plan}</List.ItemDescription>
|
|
251
|
+
* </List.Item>
|
|
252
|
+
* ))}
|
|
253
|
+
* </List.Root>
|
|
254
|
+
* ```
|
|
255
|
+
*/
|
|
256
|
+
readonly Item: import("react").ForwardRefExoticComponent<Omit<ListItemProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
257
|
+
/**
|
|
258
|
+
* Emphasized title line inside a `List.Item`.
|
|
259
|
+
*
|
|
260
|
+
* @see https://mantle.ngrok.com/components/data-display/list
|
|
261
|
+
*
|
|
262
|
+
* @example
|
|
263
|
+
* ```tsx
|
|
264
|
+
* <List.Root aria-label="Your accounts" className="max-h-80">
|
|
265
|
+
* {accounts.map((account) => (
|
|
266
|
+
* <List.Item key={account.id} onClick={() => switchTo(account.id)}>
|
|
267
|
+
* <List.ItemTitle>{account.name}</List.ItemTitle>
|
|
268
|
+
* <List.ItemDescription>{account.plan}</List.ItemDescription>
|
|
269
|
+
* </List.Item>
|
|
270
|
+
* ))}
|
|
271
|
+
* </List.Root>
|
|
272
|
+
* ```
|
|
273
|
+
*/
|
|
274
|
+
readonly ItemTitle: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
275
|
+
/**
|
|
276
|
+
* De-emphasized sub-line inside a `List.Item`.
|
|
277
|
+
*
|
|
278
|
+
* @see https://mantle.ngrok.com/components/data-display/list
|
|
279
|
+
*
|
|
280
|
+
* @example
|
|
281
|
+
* ```tsx
|
|
282
|
+
* <List.Root aria-label="Your accounts" className="max-h-80">
|
|
283
|
+
* {accounts.map((account) => (
|
|
284
|
+
* <List.Item key={account.id} onClick={() => switchTo(account.id)}>
|
|
285
|
+
* <List.ItemTitle>{account.name}</List.ItemTitle>
|
|
286
|
+
* <List.ItemDescription>{account.plan}</List.ItemDescription>
|
|
287
|
+
* </List.Item>
|
|
288
|
+
* ))}
|
|
289
|
+
* </List.Root>
|
|
290
|
+
* ```
|
|
291
|
+
*/
|
|
292
|
+
readonly ItemDescription: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
293
|
+
};
|
|
294
|
+
//#endregion
|
|
295
|
+
export { List, type ListItemProps, type ListRootProps, type ListVirtualRootProps };
|
package/dist/list.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-DmPrjM7N.js";import{n,r,t as i}from"./virtual-DZMBu7Ch.js";import{forwardRef as a}from"react";import{jsx as o}from"react/jsx-runtime";const s=a((e,t)=>o(r,{ref:t,semantics:`list`,...e}));s.displayName=`ListRoot`;const c=a((e,t)=>o(i,{ref:t,semantics:`list`,...e}));c.displayName=`ListVirtualRoot`;const l=a(({asChild:r,className:i,current:a,disabled:s,onClick:c,...l},u)=>o(n,{selected:a,disabled:s,children:o(r?t:`button`,{ref:u,"data-slot":`list-item-control`,"aria-current":a||void 0,...r?{"aria-disabled":s||void 0,tabIndex:s?-1:void 0}:{type:`button`,disabled:s},onClick:e=>{if(r&&s){e.preventDefault(),e.stopPropagation();return}c?.(e)},className:e(`flex w-full cursor-pointer flex-col gap-0.5 rounded-md bg-transparent px-2 py-1.5 text-left text-sm`,`disabled:cursor-default disabled:opacity-50 aria-disabled:cursor-default aria-disabled:opacity-50 aria-disabled:pointer-events-none`,`focus-visible:outline-hidden`,i),...l,onClickCapture:r&&s?e=>{e.preventDefault(),e.stopPropagation()}:l.onClickCapture})}));l.displayName=`ListItem`;const u=a(({className:t,...n},r)=>o(`span`,{ref:r,"data-slot":`list-item-title`,className:e(`text-strong font-medium`,t),...n}));u.displayName=`ListItemTitle`;const d=a(({className:t,...n},r)=>o(`span`,{ref:r,"data-slot":`list-item-description`,className:e(`text-body leading-4`,t),...n}));d.displayName=`ListItemDescription`;const f={Root:s,VirtualRoot:c,Item:l,ItemTitle:u,ItemDescription:d};export{f as List};
|
package/dist/llms.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @ngrok/mantle (0.
|
|
1
|
+
# @ngrok/mantle (0.78.0)
|
|
2
2
|
|
|
3
3
|
> Offline discovery hint shipped inside the @ngrok/mantle npm package. Authoritative metadata lives at https://mantle.ngrok.com/for-ai-agents.
|
|
4
4
|
|
|
@@ -24,11 +24,14 @@ Full text: https://mantle.ngrok.com/llms-full.txt
|
|
|
24
24
|
- `@ngrok/mantle/alert-dialog`
|
|
25
25
|
- `@ngrok/mantle/anchor`
|
|
26
26
|
- `@ngrok/mantle/badge`
|
|
27
|
+
- `@ngrok/mantle/breadcrumb`
|
|
27
28
|
- `@ngrok/mantle/browser-only`
|
|
28
29
|
- `@ngrok/mantle/button`
|
|
29
30
|
- `@ngrok/mantle/calendar`
|
|
30
31
|
- `@ngrok/mantle/card`
|
|
32
|
+
- `@ngrok/mantle/centered-layout`
|
|
31
33
|
- `@ngrok/mantle/checkbox`
|
|
34
|
+
- `@ngrok/mantle/choice`
|
|
32
35
|
- `@ngrok/mantle/code`
|
|
33
36
|
- `@ngrok/mantle/code-block`
|
|
34
37
|
- `@ngrok/mantle/color`
|
|
@@ -50,6 +53,7 @@ Full text: https://mantle.ngrok.com/llms-full.txt
|
|
|
50
53
|
- `@ngrok/mantle/input`
|
|
51
54
|
- `@ngrok/mantle/kbd`
|
|
52
55
|
- `@ngrok/mantle/label`
|
|
56
|
+
- `@ngrok/mantle/list`
|
|
53
57
|
- `@ngrok/mantle/main`
|
|
54
58
|
- `@ngrok/mantle/media-object`
|
|
55
59
|
- `@ngrok/mantle/multi-select`
|
|
@@ -61,6 +65,7 @@ Full text: https://mantle.ngrok.com/llms-full.txt
|
|
|
61
65
|
- `@ngrok/mantle/radio-group`
|
|
62
66
|
- `@ngrok/mantle/sandboxed-on-click`
|
|
63
67
|
- `@ngrok/mantle/select`
|
|
68
|
+
- `@ngrok/mantle/selectable-list`
|
|
64
69
|
- `@ngrok/mantle/separator`
|
|
65
70
|
- `@ngrok/mantle/sheet`
|
|
66
71
|
- `@ngrok/mantle/skeleton`
|
|
@@ -73,6 +78,7 @@ Full text: https://mantle.ngrok.com/llms-full.txt
|
|
|
73
78
|
- `@ngrok/mantle/tabs`
|
|
74
79
|
- `@ngrok/mantle/text-area`
|
|
75
80
|
- `@ngrok/mantle/theme`
|
|
81
|
+
- `@ngrok/mantle/theme-switcher`
|
|
76
82
|
- `@ngrok/mantle/toast`
|
|
77
83
|
- `@ngrok/mantle/tooltip`
|
|
78
84
|
- `@ngrok/mantle/types`
|
package/dist/main.d.ts
CHANGED
|
@@ -1,31 +1,8 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
|
-
|
|
3
2
|
//#region src/components/main/main.d.ts
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* a visible focus ring on the region itself (`focus:outline-hidden`).
|
|
9
|
-
*
|
|
10
|
-
* Pair with the `<SkipToMainLink>` component at the top of the document.
|
|
11
|
-
*
|
|
12
|
-
* @see https://mantle.ngrok.com/components/main
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```tsx
|
|
16
|
-
* <SkipToMainLink />
|
|
17
|
-
* <Header />
|
|
18
|
-
* <Main>
|
|
19
|
-
* <h1>Page title</h1>
|
|
20
|
-
* </Main>
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
declare const Main: {
|
|
24
|
-
({
|
|
25
|
-
className,
|
|
26
|
-
...props
|
|
27
|
-
}: ComponentProps<"main">): import("react").JSX.Element;
|
|
28
|
-
displayName: string;
|
|
29
|
-
};
|
|
3
|
+
declare function Main({ className, ...props }: ComponentProps<"main">): import("react").JSX.Element;
|
|
4
|
+
declare namespace Main {
|
|
5
|
+
var displayName: string;
|
|
6
|
+
}
|
|
30
7
|
//#endregion
|
|
31
8
|
export { Main };
|
package/dist/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{jsx as t}from"react/jsx-runtime";const n=({className:n,...r})=>t(`main`,{...r,"data-slot":`main`,id:`main`,tabIndex:-1,className:e(`focus:outline-hidden`,n)});n.displayName=`Main`;export{n as Main};
|
package/dist/mantle.css
CHANGED
|
@@ -501,12 +501,12 @@ MARK: UTILITIES
|
|
|
501
501
|
linear-gradient(var(--background-color-base) 30%, --alpha(var(--background-color-base) / 0%))
|
|
502
502
|
center top,
|
|
503
503
|
/* Shadow Cover BOTTOM */
|
|
504
|
-
|
|
504
|
+
linear-gradient(--alpha(var(--background-color-base) / 0%), var(--background-color-base) 70%)
|
|
505
505
|
center bottom,
|
|
506
506
|
/* Shadow TOP */
|
|
507
|
-
|
|
507
|
+
radial-gradient(farthest-side at 50% 0, var(--navigation-shadow), rgb(0 0 0 / 0%)) center top,
|
|
508
508
|
/* Shadow BOTTOM */
|
|
509
|
-
|
|
509
|
+
radial-gradient(farthest-side at 50% 100%, var(--navigation-shadow), rgb(0 0 0 / 0%)) center
|
|
510
510
|
bottom;
|
|
511
511
|
background-repeat: no-repeat;
|
|
512
512
|
background-size:
|
|
@@ -719,15 +719,15 @@ MARK: UTILITIES
|
|
|
719
719
|
)
|
|
720
720
|
center top,
|
|
721
721
|
/* Shadow Cover BOTTOM */
|
|
722
|
-
|
|
722
|
+
linear-gradient(
|
|
723
723
|
--alpha(var(--background-color-popover) / 0%),
|
|
724
724
|
var(--background-color-popover) 70%
|
|
725
725
|
)
|
|
726
726
|
center bottom,
|
|
727
727
|
/* Shadow TOP */
|
|
728
|
-
|
|
728
|
+
radial-gradient(farthest-side at 50% 0, var(--navigation-shadow), rgb(0 0 0 / 0%)) center top,
|
|
729
729
|
/* Shadow BOTTOM */
|
|
730
|
-
|
|
730
|
+
radial-gradient(farthest-side at 50% 100%, var(--navigation-shadow), rgb(0 0 0 / 0%)) center
|
|
731
731
|
bottom;
|
|
732
732
|
background-repeat: no-repeat;
|
|
733
733
|
background-size:
|
package/dist/media-object.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { t as WithAsChild } from "./as-child-
|
|
1
|
+
import { t as WithAsChild } from "./as-child-CYEVu1WY.js";
|
|
2
2
|
import { ComponentProps } from "react";
|
|
3
|
-
|
|
4
3
|
//#region src/components/media-object/media-object.d.ts
|
|
5
4
|
type Props = ComponentProps<"div"> & WithAsChild;
|
|
6
5
|
/**
|
|
@@ -17,7 +16,7 @@ type Props = ComponentProps<"div"> & WithAsChild;
|
|
|
17
16
|
* - Feature lists, profile cards, attachment previews.
|
|
18
17
|
*
|
|
19
18
|
* **When not to use**
|
|
20
|
-
* - For complex multi-region layouts — reach for {@link https://mantle.ngrok.com/components/card Card} or build a bespoke flex/grid.
|
|
19
|
+
* - For complex multi-region layouts — reach for {@link https://mantle.ngrok.com/components/structure/card Card} or build a bespoke flex/grid.
|
|
21
20
|
* - When the media is purely decorative and adds no information — drop it
|
|
22
21
|
* and use a plain block.
|
|
23
22
|
*
|
|
@@ -29,7 +28,7 @@ type Props = ComponentProps<"div"> & WithAsChild;
|
|
|
29
28
|
* **Polymorphism.** Each part accepts `asChild` for swapping the rendered
|
|
30
29
|
* element (e.g. render `Root` as an `<a>` to make the whole row clickable).
|
|
31
30
|
*
|
|
32
|
-
* @see https://mantle.ngrok.com/components/media-object
|
|
31
|
+
* @see https://mantle.ngrok.com/components/structure/media-object
|
|
33
32
|
*
|
|
34
33
|
* @example
|
|
35
34
|
* Composition:
|
|
@@ -68,7 +67,7 @@ declare const MediaObject: {
|
|
|
68
67
|
* Compose the media object with the `MediaObject.Media` and `MediaObject.Content`
|
|
69
68
|
* components as direct children.
|
|
70
69
|
*
|
|
71
|
-
* @see https://mantle.ngrok.com/components/media-object#mediaobjectroot
|
|
70
|
+
* @see https://mantle.ngrok.com/components/structure/media-object#mediaobjectroot
|
|
72
71
|
*
|
|
73
72
|
* @example
|
|
74
73
|
* ```tsx
|
|
@@ -86,7 +85,7 @@ declare const MediaObject: {
|
|
|
86
85
|
/**
|
|
87
86
|
* The container for an image or icon to display in the media slot of the media object.
|
|
88
87
|
*
|
|
89
|
-
* @see https://mantle.ngrok.com/components/media-object#mediaobjectmedia
|
|
88
|
+
* @see https://mantle.ngrok.com/components/structure/media-object#mediaobjectmedia
|
|
90
89
|
*
|
|
91
90
|
* @example
|
|
92
91
|
* ```tsx
|
|
@@ -104,7 +103,7 @@ declare const MediaObject: {
|
|
|
104
103
|
/**
|
|
105
104
|
* The container for the content slot of a media object.
|
|
106
105
|
*
|
|
107
|
-
* @see https://mantle.ngrok.com/components/media-object#mediaobjectcontent
|
|
106
|
+
* @see https://mantle.ngrok.com/components/structure/media-object#mediaobjectcontent
|
|
108
107
|
*
|
|
109
108
|
* @example
|
|
110
109
|
* ```tsx
|
package/dist/media-object.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-DmPrjM7N.js";import{forwardRef as n}from"react";import{jsx as r}from"react/jsx-runtime";const i=n(({asChild:n=!1,className:i,children:a,style:o},s)=>r(n?t:`div`,{ref:s,"data-slot":`media-object`,className:e(`flex gap-4`,i),style:o,children:a}));i.displayName=`MediaObject`;const a=n(({asChild:n=!1,className:i,children:a,style:o},s)=>r(n?t:`div`,{ref:s,"data-slot":`media-object-media`,className:e(`shrink-0 leading-none`,i),style:o,children:a}));a.displayName=`MediaObjectMedia`;const o=n(({asChild:n=!1,className:i,children:a,style:o},s)=>r(n?t:`div`,{ref:s,"data-slot":`media-object-content`,className:e(`min-w-0 flex-1`,i),style:o,children:a}));o.displayName=`MediaObject.Content`;const s={Root:i,Media:a,Content:o};export{s as MediaObject};
|