@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
|
@@ -0,0 +1,725 @@
|
|
|
1
|
+
import { t as WithAsChild } from "./as-child-CYEVu1WY.js";
|
|
2
|
+
import { o as WithValidation } from "./validation-7QeiTFwl.js";
|
|
3
|
+
import { i as WithInputType, r as WithAutoComplete } from "./types-C19IR7jf.js";
|
|
4
|
+
import { ComponentProps, ReactElement, ReactNode } from "react";
|
|
5
|
+
//#region src/components/selectable-list/selectable-list.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* A single selectable row in a {@link SelectableList}. The list is data-driven:
|
|
8
|
+
* map your domain objects into these options once, and the list owns filtering,
|
|
9
|
+
* selection, and (optionally) virtualization. Item *rendering* stays composable —
|
|
10
|
+
* pass a render-prop child to a viewport to draw your own layout.
|
|
11
|
+
*
|
|
12
|
+
* A `label` may be any ReactNode; when it isn't a plain string, `labelText` is
|
|
13
|
+
* required so the default filter has text to match.
|
|
14
|
+
*
|
|
15
|
+
* @see https://mantle.ngrok.com/components/data-display/selectable-list
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const option: SelectableListOption = {
|
|
20
|
+
* value: "key_123",
|
|
21
|
+
* label: "Onboarding key",
|
|
22
|
+
* description: "sk-…4f2a",
|
|
23
|
+
* };
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* // A rich label pairs with labelText (the filter's match target).
|
|
29
|
+
* const option: SelectableListOption = {
|
|
30
|
+
* value: "key_123",
|
|
31
|
+
* label: (
|
|
32
|
+
* <>
|
|
33
|
+
* <KeyIcon /> Onboarding key
|
|
34
|
+
* </>
|
|
35
|
+
* ),
|
|
36
|
+
* labelText: "Onboarding key",
|
|
37
|
+
* };
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
type SelectableListOption = {
|
|
41
|
+
/** Stable, unique selection value. This is what flows through `value` / `onValueChange`. */
|
|
42
|
+
value: string;
|
|
43
|
+
/** Optional de-emphasized sub-line under the title in the default row (e.g. a masked identifier). */
|
|
44
|
+
description?: ReactNode;
|
|
45
|
+
/** When `true`, the row renders dimmed and cannot be toggled or selected by "select all". */
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
} & ({
|
|
48
|
+
/**
|
|
49
|
+
* Plain-text title — rendered in the default row and, as the checkbox's
|
|
50
|
+
* `<label>`, its accessible name. Also what the default filter matches
|
|
51
|
+
* (override that with `labelText`).
|
|
52
|
+
*/
|
|
53
|
+
label: string;
|
|
54
|
+
/** Optional plain-text override for what the default filter matches. */
|
|
55
|
+
labelText?: string;
|
|
56
|
+
} | {
|
|
57
|
+
/**
|
|
58
|
+
* A rich title (any ReactNode). Keep readable text inside — the rendered
|
|
59
|
+
* content is the checkbox's accessible name.
|
|
60
|
+
*/
|
|
61
|
+
label: ReactNode;
|
|
62
|
+
/** The plain-text form of the label. Required for a rich label so the default filter has text to match. */
|
|
63
|
+
labelText: string;
|
|
64
|
+
});
|
|
65
|
+
/**
|
|
66
|
+
* The plain-text form of an option's label: `labelText` when provided,
|
|
67
|
+
* otherwise the `label` itself when it is a string. This is what the default
|
|
68
|
+
* filter matches; reuse it in a custom `filter` predicate to keep label
|
|
69
|
+
* matching consistent while adding your own criteria. The option type requires
|
|
70
|
+
* `labelText` whenever `label` isn't a string, so the empty-string fallback
|
|
71
|
+
* only guards untyped callers.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```ts
|
|
75
|
+
* optionLabelText({ value: "a", label: "Onboarding key" }); // → "Onboarding key"
|
|
76
|
+
* optionLabelText({ value: "b", label: <em>prod</em>, labelText: "prod" }); // → "prod"
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
declare function optionLabelText(option: SelectableListOption): string;
|
|
80
|
+
/**
|
|
81
|
+
* Case-insensitive substring filter over each option's plain text (see
|
|
82
|
+
* {@link optionLabelText}: `labelText`, or a string `label`). Returns the input
|
|
83
|
+
* untouched for an empty/whitespace query so the common "no filter" path does no
|
|
84
|
+
* work. Pure — safe to unit test and to call from `useMemo`.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```ts
|
|
88
|
+
* filterSelectableOptions(
|
|
89
|
+
* [{ value: "a", label: "Onboarding Key" }, { value: "b", label: "prod" }],
|
|
90
|
+
* "prod",
|
|
91
|
+
* ); // → [{ value: "b", label: "prod" }]
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
declare function filterSelectableOptions(options: readonly SelectableListOption[], query: string): readonly SelectableListOption[];
|
|
95
|
+
/**
|
|
96
|
+
* Add `value` to `values` if absent, or remove it if present. Returns a new
|
|
97
|
+
* array (never mutates) so it composes cleanly with controlled state setters.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```ts
|
|
101
|
+
* toggleSelectionValue(["a"], "b"); // → ["a", "b"]
|
|
102
|
+
* toggleSelectionValue(["a", "b"], "a"); // → ["b"]
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
declare function toggleSelectionValue(values: readonly string[], value: string): string[];
|
|
106
|
+
/**
|
|
107
|
+
* Summarize how much of a set of options is selected, ignoring disabled options
|
|
108
|
+
* (they can't be selected by "select all"). Feeds straight into
|
|
109
|
+
* {@link selectAllChecked} to drive a tri-state header checkbox.
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```ts
|
|
113
|
+
* summarizeSelection(
|
|
114
|
+
* [{ value: "a", label: "A" }, { value: "b", label: "B" }],
|
|
115
|
+
* new Set(["a"]),
|
|
116
|
+
* ); // → { allSelected: false, someSelected: true }
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
119
|
+
declare function summarizeSelection(options: readonly SelectableListOption[], selected: ReadonlySet<string>): {
|
|
120
|
+
allSelected: boolean;
|
|
121
|
+
someSelected: boolean;
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* Props for `SelectableList.Root`. Extends `<div>` props (minus `onChange`,
|
|
125
|
+
* which is replaced by `onValueChange`) with the option set and the
|
|
126
|
+
* controlled/uncontrolled selection state.
|
|
127
|
+
*
|
|
128
|
+
* @see https://mantle.ngrok.com/components/data-display/selectable-list
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* ```tsx
|
|
132
|
+
* <SelectableList.Root options={options} value={selected} onValueChange={setSelected}>
|
|
133
|
+
* <SelectableList.Viewport aria-label="Access keys" />
|
|
134
|
+
* </SelectableList.Root>
|
|
135
|
+
* ```
|
|
136
|
+
*/
|
|
137
|
+
type SelectableListRootProps = Omit<ComponentProps<"div">, "onChange"> & {
|
|
138
|
+
/** The full set of selectable rows. Map your domain data into these once. */
|
|
139
|
+
options: readonly SelectableListOption[];
|
|
140
|
+
/** Controlled selected values. Pair with `onValueChange`. */
|
|
141
|
+
value?: readonly string[];
|
|
142
|
+
/** Initial selected values for the uncontrolled case. */
|
|
143
|
+
defaultValue?: readonly string[];
|
|
144
|
+
/** Called with the next selection whenever it changes. */
|
|
145
|
+
onValueChange?: (values: string[]) => void;
|
|
146
|
+
/** Controlled filter query. Pair with `onQueryChange`. */
|
|
147
|
+
query?: string;
|
|
148
|
+
/** Initial filter query for the uncontrolled case. */
|
|
149
|
+
defaultQuery?: string;
|
|
150
|
+
/** Called with the next query whenever it changes (e.g. typing in `SelectableList.Filter`). */
|
|
151
|
+
onQueryChange?: (query: string) => void;
|
|
152
|
+
/**
|
|
153
|
+
* Custom filter predicate, called per option with the raw query; return
|
|
154
|
+
* `true` to keep the option. Defaults to a trimmed, case-insensitive
|
|
155
|
+
* substring match over each option's plain text (`labelText`, or a string
|
|
156
|
+
* `label`).
|
|
157
|
+
*/
|
|
158
|
+
filter?: (option: SelectableListOption, query: string) => boolean;
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Props for `SelectableList.Item`. Extends `<div>` props with the option
|
|
162
|
+
* `value` the row represents; selection and disabled state are read from the
|
|
163
|
+
* list by that value (`options[].disabled` is the single source of truth).
|
|
164
|
+
*
|
|
165
|
+
* @see https://mantle.ngrok.com/components/data-display/selectable-list
|
|
166
|
+
*
|
|
167
|
+
* @example
|
|
168
|
+
* ```tsx
|
|
169
|
+
* <SelectableList.Item value={option.value}>
|
|
170
|
+
* <SelectableList.ItemTitle>{option.label}</SelectableList.ItemTitle>
|
|
171
|
+
* <SelectableList.ItemDescription>{option.description}</SelectableList.ItemDescription>
|
|
172
|
+
* </SelectableList.Item>
|
|
173
|
+
* ```
|
|
174
|
+
*/
|
|
175
|
+
type SelectableListItemProps = Omit<ComponentProps<"div">, "children" | "id"> & {
|
|
176
|
+
/** The option's selection value. Selection state is read from, and toggled in, the list. */
|
|
177
|
+
value: string;
|
|
178
|
+
/**
|
|
179
|
+
* Item content — typically `SelectableList.ItemTitle` over a
|
|
180
|
+
* `SelectableList.ItemDescription`, or any layout you like. It fills the row's
|
|
181
|
+
* content `gridcell`; nested interactive content (links, buttons) is allowed.
|
|
182
|
+
*/
|
|
183
|
+
children: ReactNode;
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* Props for `SelectableList.Viewport`. Extends `<div>` props (the scroll
|
|
187
|
+
* viewport) with an optional render-prop child for custom row layouts.
|
|
188
|
+
*
|
|
189
|
+
* @see https://mantle.ngrok.com/components/data-display/selectable-list
|
|
190
|
+
*
|
|
191
|
+
* @example
|
|
192
|
+
* ```tsx
|
|
193
|
+
* <SelectableList.Viewport aria-label="Access keys" className="max-h-80" />
|
|
194
|
+
* ```
|
|
195
|
+
*/
|
|
196
|
+
type SelectableListViewportProps = Omit<ComponentProps<"div">, "children"> & {
|
|
197
|
+
/**
|
|
198
|
+
* Optional render-prop for custom row content, called per filtered option.
|
|
199
|
+
* Return a `SelectableList.Item` with your own layout, or `null` to skip
|
|
200
|
+
* the row. Non-element returns are dropped at runtime, so the type requires
|
|
201
|
+
* an element (or `null`) rather than any `ReactNode`. Defaults to a
|
|
202
|
+
* title + description row built from the option.
|
|
203
|
+
*/
|
|
204
|
+
children?: (option: SelectableListOption) => ReactElement | null;
|
|
205
|
+
};
|
|
206
|
+
/**
|
|
207
|
+
* Props for `SelectableList.VirtualViewport` — the `Viewport` props plus the
|
|
208
|
+
* virtualizer knobs.
|
|
209
|
+
*
|
|
210
|
+
* @see https://mantle.ngrok.com/components/data-display/selectable-list
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* ```tsx
|
|
214
|
+
* <SelectableList.VirtualViewport aria-label="Access keys" className="max-h-80" estimateItemHeight={44} />
|
|
215
|
+
* ```
|
|
216
|
+
*/
|
|
217
|
+
type SelectableListVirtualViewportProps = SelectableListViewportProps & {
|
|
218
|
+
/** Estimated item height in px, used to seed the virtualizer before items are measured. */
|
|
219
|
+
estimateItemHeight?: number;
|
|
220
|
+
/** Rows rendered beyond the visible window on each side. */
|
|
221
|
+
overscan?: number;
|
|
222
|
+
};
|
|
223
|
+
/**
|
|
224
|
+
* A filterable, multi-select **grid** of checkbox rows — the inline
|
|
225
|
+
* (non-popover) counterpart to `MultiSelect`/`Combobox`. Map your data into
|
|
226
|
+
* `options` once; the list owns filtering, selection, and (optionally)
|
|
227
|
+
* virtualization. Each row is an APG grid `role="row"` (`aria-selected`) whose
|
|
228
|
+
* cells hold a real `Checkbox` and a `Choice`-laid-out title + description — the
|
|
229
|
+
* pattern that lets a selectable row carry a real control and nested interactive
|
|
230
|
+
* content. Non-virtualized by default; swap `Viewport` → `VirtualViewport` (same
|
|
231
|
+
* props) for windowing. Built on the shared `list` primitive.
|
|
232
|
+
*
|
|
233
|
+
* Keyboard: the grid is a single tab stop — `Arrow`/`Home`/`End` move an active
|
|
234
|
+
* row (tracked via `aria-activedescendant`, so navigation works across the full
|
|
235
|
+
* option set even when virtualized) and `Space`/`Enter` toggles it.
|
|
236
|
+
*
|
|
237
|
+
* @see https://mantle.ngrok.com/components/data-display/selectable-list
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* Composition:
|
|
241
|
+
* ```
|
|
242
|
+
* SelectableList.Root
|
|
243
|
+
* ├── SelectableList.Filter
|
|
244
|
+
* ├── SelectableList.SelectAll
|
|
245
|
+
* ├── SelectableList.Viewport (or .VirtualViewport)
|
|
246
|
+
* │ └── SelectableList.Item (optional render-prop; auto-rendered by default)
|
|
247
|
+
* │ ├── SelectableList.ItemTitle
|
|
248
|
+
* │ └── SelectableList.ItemDescription
|
|
249
|
+
* └── SelectableList.Empty
|
|
250
|
+
* ```
|
|
251
|
+
*
|
|
252
|
+
* @example
|
|
253
|
+
* ```tsx
|
|
254
|
+
* const options = accessKeys.map((key) => ({
|
|
255
|
+
* value: key.id,
|
|
256
|
+
* label: key.name,
|
|
257
|
+
* description: key.maskedToken,
|
|
258
|
+
* }));
|
|
259
|
+
*
|
|
260
|
+
* <SelectableList.Root options={options} value={selected} onValueChange={setSelected}>
|
|
261
|
+
* <SelectableList.Filter placeholder="Filter access keys…" />
|
|
262
|
+
* <SelectableList.SelectAll>Select all</SelectableList.SelectAll>
|
|
263
|
+
* <SelectableList.Viewport aria-label="Access keys" className="max-h-80" />
|
|
264
|
+
* <SelectableList.Empty>No access keys found.</SelectableList.Empty>
|
|
265
|
+
* </SelectableList.Root>
|
|
266
|
+
* ```
|
|
267
|
+
*/
|
|
268
|
+
declare const SelectableList: {
|
|
269
|
+
/**
|
|
270
|
+
* Root: owns selection + filter state and the derived filtered options.
|
|
271
|
+
*
|
|
272
|
+
* @see https://mantle.ngrok.com/components/data-display/selectable-list
|
|
273
|
+
*
|
|
274
|
+
* @example
|
|
275
|
+
* ```tsx
|
|
276
|
+
* <SelectableList.Root options={options} value={selected} onValueChange={setSelected}>
|
|
277
|
+
* <SelectableList.Filter placeholder="Filter access keys…" />
|
|
278
|
+
* <SelectableList.SelectAll>Select all</SelectableList.SelectAll>
|
|
279
|
+
* <SelectableList.Viewport aria-label="Access keys" className="max-h-80" />
|
|
280
|
+
* <SelectableList.Empty>No access keys found.</SelectableList.Empty>
|
|
281
|
+
* </SelectableList.Root>
|
|
282
|
+
* ```
|
|
283
|
+
*/
|
|
284
|
+
readonly Root: import("react").ForwardRefExoticComponent<Omit<SelectableListRootProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
285
|
+
/**
|
|
286
|
+
* Optional filter/search box (mantle `Input` + magnifying-glass icon).
|
|
287
|
+
*
|
|
288
|
+
* @see https://mantle.ngrok.com/components/data-display/selectable-list
|
|
289
|
+
*
|
|
290
|
+
* @example
|
|
291
|
+
* ```tsx
|
|
292
|
+
* <SelectableList.Root options={options} value={selected} onValueChange={setSelected}>
|
|
293
|
+
* <SelectableList.Filter placeholder="Filter access keys…" />
|
|
294
|
+
* <SelectableList.SelectAll>Select all</SelectableList.SelectAll>
|
|
295
|
+
* <SelectableList.Viewport aria-label="Access keys" className="max-h-80" />
|
|
296
|
+
* <SelectableList.Empty>No access keys found.</SelectableList.Empty>
|
|
297
|
+
* </SelectableList.Root>
|
|
298
|
+
* ```
|
|
299
|
+
*/
|
|
300
|
+
readonly Filter: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "autoComplete" | "type"> & WithAutoComplete & WithInputType & WithValidation & {
|
|
301
|
+
children?: ReactNode | undefined;
|
|
302
|
+
} & import("react").RefAttributes<HTMLInputElement>, "ref">, "children" | "defaultValue" | "onChange" | "type" | "value"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
303
|
+
/**
|
|
304
|
+
* Optional tri-state "select all" header over the filtered options.
|
|
305
|
+
*
|
|
306
|
+
* @see https://mantle.ngrok.com/components/data-display/selectable-list
|
|
307
|
+
*
|
|
308
|
+
* @example
|
|
309
|
+
* ```tsx
|
|
310
|
+
* <SelectableList.Root options={options} value={selected} onValueChange={setSelected}>
|
|
311
|
+
* <SelectableList.Filter placeholder="Filter access keys…" />
|
|
312
|
+
* <SelectableList.SelectAll>Select all</SelectableList.SelectAll>
|
|
313
|
+
* <SelectableList.Viewport aria-label="Access keys" className="max-h-80" />
|
|
314
|
+
* <SelectableList.Empty>No access keys found.</SelectableList.Empty>
|
|
315
|
+
* </SelectableList.Root>
|
|
316
|
+
* ```
|
|
317
|
+
*/
|
|
318
|
+
readonly SelectAll: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "htmlFor">, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
319
|
+
/**
|
|
320
|
+
* The scrollable grid of rows (non-virtualized). Give it an `aria-label`;
|
|
321
|
+
* pass a render-prop child for a custom row layout, or omit it for the default.
|
|
322
|
+
*
|
|
323
|
+
* @see https://mantle.ngrok.com/components/data-display/selectable-list
|
|
324
|
+
*
|
|
325
|
+
* @example
|
|
326
|
+
* ```tsx
|
|
327
|
+
* <SelectableList.Root options={options} value={selected} onValueChange={setSelected}>
|
|
328
|
+
* <SelectableList.Filter placeholder="Filter access keys…" />
|
|
329
|
+
* <SelectableList.SelectAll>Select all</SelectableList.SelectAll>
|
|
330
|
+
* <SelectableList.Viewport aria-label="Access keys" className="max-h-80" />
|
|
331
|
+
* <SelectableList.Empty>No access keys found.</SelectableList.Empty>
|
|
332
|
+
* </SelectableList.Root>
|
|
333
|
+
* ```
|
|
334
|
+
*/
|
|
335
|
+
readonly Viewport: import("react").ForwardRefExoticComponent<Omit<SelectableListViewportProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
336
|
+
/**
|
|
337
|
+
* The windowed grid of rows — same surface as `Viewport`, for long lists.
|
|
338
|
+
*
|
|
339
|
+
* @see https://mantle.ngrok.com/components/data-display/selectable-list
|
|
340
|
+
*
|
|
341
|
+
* @example
|
|
342
|
+
* ```tsx
|
|
343
|
+
* <SelectableList.Root options={options} value={selected} onValueChange={setSelected}>
|
|
344
|
+
* <SelectableList.Filter placeholder="Filter access keys…" />
|
|
345
|
+
* <SelectableList.SelectAll>Select all</SelectableList.SelectAll>
|
|
346
|
+
* <SelectableList.VirtualViewport aria-label="Access keys" className="max-h-80" />
|
|
347
|
+
* <SelectableList.Empty>No access keys found.</SelectableList.Empty>
|
|
348
|
+
* </SelectableList.Root>
|
|
349
|
+
* ```
|
|
350
|
+
*/
|
|
351
|
+
readonly VirtualViewport: import("react").ForwardRefExoticComponent<Omit<SelectableListVirtualViewportProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
352
|
+
/**
|
|
353
|
+
* A selectable grid row for custom viewport rendering. Reads its selection
|
|
354
|
+
* and disabled state from the list by `value`.
|
|
355
|
+
*
|
|
356
|
+
* @see https://mantle.ngrok.com/components/data-display/selectable-list
|
|
357
|
+
*
|
|
358
|
+
* @example
|
|
359
|
+
* ```tsx
|
|
360
|
+
* <SelectableList.Root options={options} value={selected} onValueChange={setSelected}>
|
|
361
|
+
* <SelectableList.Filter placeholder="Filter access keys…" />
|
|
362
|
+
* <SelectableList.SelectAll>Select all</SelectableList.SelectAll>
|
|
363
|
+
* <SelectableList.Viewport aria-label="Access keys" className="max-h-80">
|
|
364
|
+
* {(option) => (
|
|
365
|
+
* <SelectableList.Item value={option.value}>
|
|
366
|
+
* <SelectableList.ItemTitle>{option.label}</SelectableList.ItemTitle>
|
|
367
|
+
* <SelectableList.ItemDescription>{option.description}</SelectableList.ItemDescription>
|
|
368
|
+
* </SelectableList.Item>
|
|
369
|
+
* )}
|
|
370
|
+
* </SelectableList.Viewport>
|
|
371
|
+
* <SelectableList.Empty>No access keys found.</SelectableList.Empty>
|
|
372
|
+
* </SelectableList.Root>
|
|
373
|
+
* ```
|
|
374
|
+
*/
|
|
375
|
+
readonly Item: import("react").ForwardRefExoticComponent<Omit<SelectableListItemProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
376
|
+
/**
|
|
377
|
+
* Emphasized title (`Choice.Label`) for a `SelectableList.Item`.
|
|
378
|
+
*
|
|
379
|
+
* @see https://mantle.ngrok.com/components/data-display/selectable-list
|
|
380
|
+
*
|
|
381
|
+
* @example
|
|
382
|
+
* ```tsx
|
|
383
|
+
* <SelectableList.Root options={options} value={selected} onValueChange={setSelected}>
|
|
384
|
+
* <SelectableList.Filter placeholder="Filter access keys…" />
|
|
385
|
+
* <SelectableList.SelectAll>Select all</SelectableList.SelectAll>
|
|
386
|
+
* <SelectableList.Viewport aria-label="Access keys" className="max-h-80">
|
|
387
|
+
* {(option) => (
|
|
388
|
+
* <SelectableList.Item value={option.value}>
|
|
389
|
+
* <SelectableList.ItemTitle>{option.label}</SelectableList.ItemTitle>
|
|
390
|
+
* <SelectableList.ItemDescription>{option.description}</SelectableList.ItemDescription>
|
|
391
|
+
* </SelectableList.Item>
|
|
392
|
+
* )}
|
|
393
|
+
* </SelectableList.Viewport>
|
|
394
|
+
* <SelectableList.Empty>No access keys found.</SelectableList.Empty>
|
|
395
|
+
* </SelectableList.Root>
|
|
396
|
+
* ```
|
|
397
|
+
*/
|
|
398
|
+
readonly ItemTitle: import("react").ForwardRefExoticComponent<Omit<Omit<{
|
|
399
|
+
key?: import("react").Key | null | undefined;
|
|
400
|
+
ref?: import("react").Ref<HTMLLabelElement> | undefined;
|
|
401
|
+
children?: ReactNode | undefined;
|
|
402
|
+
dangerouslySetInnerHTML?: {
|
|
403
|
+
__html: string | TrustedHTML;
|
|
404
|
+
} | undefined;
|
|
405
|
+
onCopy?: import("react").ClipboardEventHandler<HTMLLabelElement> | undefined;
|
|
406
|
+
onCopyCapture?: import("react").ClipboardEventHandler<HTMLLabelElement> | undefined;
|
|
407
|
+
onCut?: import("react").ClipboardEventHandler<HTMLLabelElement> | undefined;
|
|
408
|
+
onCutCapture?: import("react").ClipboardEventHandler<HTMLLabelElement> | undefined;
|
|
409
|
+
onPaste?: import("react").ClipboardEventHandler<HTMLLabelElement> | undefined;
|
|
410
|
+
onPasteCapture?: import("react").ClipboardEventHandler<HTMLLabelElement> | undefined;
|
|
411
|
+
onCompositionEnd?: import("react").CompositionEventHandler<HTMLLabelElement> | undefined;
|
|
412
|
+
onCompositionEndCapture?: import("react").CompositionEventHandler<HTMLLabelElement> | undefined;
|
|
413
|
+
onCompositionStart?: import("react").CompositionEventHandler<HTMLLabelElement> | undefined;
|
|
414
|
+
onCompositionStartCapture?: import("react").CompositionEventHandler<HTMLLabelElement> | undefined;
|
|
415
|
+
onCompositionUpdate?: import("react").CompositionEventHandler<HTMLLabelElement> | undefined;
|
|
416
|
+
onCompositionUpdateCapture?: import("react").CompositionEventHandler<HTMLLabelElement> | undefined;
|
|
417
|
+
onFocus?: import("react").FocusEventHandler<HTMLLabelElement> | undefined;
|
|
418
|
+
onFocusCapture?: import("react").FocusEventHandler<HTMLLabelElement> | undefined;
|
|
419
|
+
onBlur?: import("react").FocusEventHandler<HTMLLabelElement> | undefined;
|
|
420
|
+
onBlurCapture?: import("react").FocusEventHandler<HTMLLabelElement> | undefined;
|
|
421
|
+
onChange?: import("react").ChangeEventHandler<HTMLLabelElement, Element> | undefined;
|
|
422
|
+
onChangeCapture?: import("react").ChangeEventHandler<HTMLLabelElement, Element> | undefined;
|
|
423
|
+
onBeforeInput?: import("react").InputEventHandler<HTMLLabelElement> | undefined;
|
|
424
|
+
onBeforeInputCapture?: import("react").InputEventHandler<HTMLLabelElement> | undefined;
|
|
425
|
+
onInput?: import("react").InputEventHandler<HTMLLabelElement> | undefined;
|
|
426
|
+
onInputCapture?: import("react").InputEventHandler<HTMLLabelElement> | undefined;
|
|
427
|
+
onReset?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
428
|
+
onResetCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
429
|
+
onSubmit?: import("react").SubmitEventHandler<HTMLLabelElement> | undefined;
|
|
430
|
+
onSubmitCapture?: import("react").SubmitEventHandler<HTMLLabelElement> | undefined;
|
|
431
|
+
onInvalid?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
432
|
+
onInvalidCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
433
|
+
onLoad?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
434
|
+
onLoadCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
435
|
+
onError?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
436
|
+
onErrorCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
437
|
+
onKeyDown?: import("react").KeyboardEventHandler<HTMLLabelElement> | undefined;
|
|
438
|
+
onKeyDownCapture?: import("react").KeyboardEventHandler<HTMLLabelElement> | undefined;
|
|
439
|
+
onKeyPress?: import("react").KeyboardEventHandler<HTMLLabelElement> | undefined;
|
|
440
|
+
onKeyPressCapture?: import("react").KeyboardEventHandler<HTMLLabelElement> | undefined;
|
|
441
|
+
onKeyUp?: import("react").KeyboardEventHandler<HTMLLabelElement> | undefined;
|
|
442
|
+
onKeyUpCapture?: import("react").KeyboardEventHandler<HTMLLabelElement> | undefined;
|
|
443
|
+
onAbort?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
444
|
+
onAbortCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
445
|
+
onCanPlay?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
446
|
+
onCanPlayCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
447
|
+
onCanPlayThrough?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
448
|
+
onCanPlayThroughCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
449
|
+
onDurationChange?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
450
|
+
onDurationChangeCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
451
|
+
onEmptied?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
452
|
+
onEmptiedCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
453
|
+
onEncrypted?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
454
|
+
onEncryptedCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
455
|
+
onEnded?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
456
|
+
onEndedCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
457
|
+
onLoadedData?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
458
|
+
onLoadedDataCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
459
|
+
onLoadedMetadata?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
460
|
+
onLoadedMetadataCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
461
|
+
onLoadStart?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
462
|
+
onLoadStartCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
463
|
+
onPause?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
464
|
+
onPauseCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
465
|
+
onPlay?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
466
|
+
onPlayCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
467
|
+
onPlaying?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
468
|
+
onPlayingCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
469
|
+
onProgress?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
470
|
+
onProgressCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
471
|
+
onRateChange?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
472
|
+
onRateChangeCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
473
|
+
onSeeked?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
474
|
+
onSeekedCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
475
|
+
onSeeking?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
476
|
+
onSeekingCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
477
|
+
onStalled?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
478
|
+
onStalledCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
479
|
+
onSuspend?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
480
|
+
onSuspendCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
481
|
+
onTimeUpdate?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
482
|
+
onTimeUpdateCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
483
|
+
onVolumeChange?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
484
|
+
onVolumeChangeCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
485
|
+
onWaiting?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
486
|
+
onWaitingCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
487
|
+
onAuxClick?: import("react").MouseEventHandler<HTMLLabelElement> | undefined;
|
|
488
|
+
onAuxClickCapture?: import("react").MouseEventHandler<HTMLLabelElement> | undefined;
|
|
489
|
+
onClick?: import("react").MouseEventHandler<HTMLLabelElement> | undefined;
|
|
490
|
+
onClickCapture?: import("react").MouseEventHandler<HTMLLabelElement> | undefined;
|
|
491
|
+
onContextMenu?: import("react").MouseEventHandler<HTMLLabelElement> | undefined;
|
|
492
|
+
onContextMenuCapture?: import("react").MouseEventHandler<HTMLLabelElement> | undefined;
|
|
493
|
+
onDoubleClick?: import("react").MouseEventHandler<HTMLLabelElement> | undefined;
|
|
494
|
+
onDoubleClickCapture?: import("react").MouseEventHandler<HTMLLabelElement> | undefined;
|
|
495
|
+
onDrag?: import("react").DragEventHandler<HTMLLabelElement> | undefined;
|
|
496
|
+
onDragCapture?: import("react").DragEventHandler<HTMLLabelElement> | undefined;
|
|
497
|
+
onDragEnd?: import("react").DragEventHandler<HTMLLabelElement> | undefined;
|
|
498
|
+
onDragEndCapture?: import("react").DragEventHandler<HTMLLabelElement> | undefined;
|
|
499
|
+
onDragEnter?: import("react").DragEventHandler<HTMLLabelElement> | undefined;
|
|
500
|
+
onDragEnterCapture?: import("react").DragEventHandler<HTMLLabelElement> | undefined;
|
|
501
|
+
onDragExit?: import("react").DragEventHandler<HTMLLabelElement> | undefined;
|
|
502
|
+
onDragExitCapture?: import("react").DragEventHandler<HTMLLabelElement> | undefined;
|
|
503
|
+
onDragLeave?: import("react").DragEventHandler<HTMLLabelElement> | undefined;
|
|
504
|
+
onDragLeaveCapture?: import("react").DragEventHandler<HTMLLabelElement> | undefined;
|
|
505
|
+
onDragOver?: import("react").DragEventHandler<HTMLLabelElement> | undefined;
|
|
506
|
+
onDragOverCapture?: import("react").DragEventHandler<HTMLLabelElement> | undefined;
|
|
507
|
+
onDragStart?: import("react").DragEventHandler<HTMLLabelElement> | undefined;
|
|
508
|
+
onDragStartCapture?: import("react").DragEventHandler<HTMLLabelElement> | undefined;
|
|
509
|
+
onDrop?: import("react").DragEventHandler<HTMLLabelElement> | undefined;
|
|
510
|
+
onDropCapture?: import("react").DragEventHandler<HTMLLabelElement> | undefined;
|
|
511
|
+
onMouseDown?: import("react").MouseEventHandler<HTMLLabelElement> | undefined;
|
|
512
|
+
onMouseDownCapture?: import("react").MouseEventHandler<HTMLLabelElement> | undefined;
|
|
513
|
+
onMouseEnter?: import("react").MouseEventHandler<HTMLLabelElement> | undefined;
|
|
514
|
+
onMouseLeave?: import("react").MouseEventHandler<HTMLLabelElement> | undefined;
|
|
515
|
+
onMouseMove?: import("react").MouseEventHandler<HTMLLabelElement> | undefined;
|
|
516
|
+
onMouseMoveCapture?: import("react").MouseEventHandler<HTMLLabelElement> | undefined;
|
|
517
|
+
onMouseOut?: import("react").MouseEventHandler<HTMLLabelElement> | undefined;
|
|
518
|
+
onMouseOutCapture?: import("react").MouseEventHandler<HTMLLabelElement> | undefined;
|
|
519
|
+
onMouseOver?: import("react").MouseEventHandler<HTMLLabelElement> | undefined;
|
|
520
|
+
onMouseOverCapture?: import("react").MouseEventHandler<HTMLLabelElement> | undefined;
|
|
521
|
+
onMouseUp?: import("react").MouseEventHandler<HTMLLabelElement> | undefined;
|
|
522
|
+
onMouseUpCapture?: import("react").MouseEventHandler<HTMLLabelElement> | undefined;
|
|
523
|
+
onSelect?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
524
|
+
onSelectCapture?: import("react").ReactEventHandler<HTMLLabelElement> | undefined;
|
|
525
|
+
onTouchCancel?: import("react").TouchEventHandler<HTMLLabelElement> | undefined;
|
|
526
|
+
onTouchCancelCapture?: import("react").TouchEventHandler<HTMLLabelElement> | undefined;
|
|
527
|
+
onTouchEnd?: import("react").TouchEventHandler<HTMLLabelElement> | undefined;
|
|
528
|
+
onTouchEndCapture?: import("react").TouchEventHandler<HTMLLabelElement> | undefined;
|
|
529
|
+
onTouchMove?: import("react").TouchEventHandler<HTMLLabelElement> | undefined;
|
|
530
|
+
onTouchMoveCapture?: import("react").TouchEventHandler<HTMLLabelElement> | undefined;
|
|
531
|
+
onTouchStart?: import("react").TouchEventHandler<HTMLLabelElement> | undefined;
|
|
532
|
+
onTouchStartCapture?: import("react").TouchEventHandler<HTMLLabelElement> | undefined;
|
|
533
|
+
onPointerDown?: import("react").PointerEventHandler<HTMLLabelElement> | undefined;
|
|
534
|
+
onPointerDownCapture?: import("react").PointerEventHandler<HTMLLabelElement> | undefined;
|
|
535
|
+
onPointerMove?: import("react").PointerEventHandler<HTMLLabelElement> | undefined;
|
|
536
|
+
onPointerMoveCapture?: import("react").PointerEventHandler<HTMLLabelElement> | undefined;
|
|
537
|
+
onPointerUp?: import("react").PointerEventHandler<HTMLLabelElement> | undefined;
|
|
538
|
+
onPointerUpCapture?: import("react").PointerEventHandler<HTMLLabelElement> | undefined;
|
|
539
|
+
onPointerCancel?: import("react").PointerEventHandler<HTMLLabelElement> | undefined;
|
|
540
|
+
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLLabelElement> | undefined;
|
|
541
|
+
onPointerEnter?: import("react").PointerEventHandler<HTMLLabelElement> | undefined;
|
|
542
|
+
onPointerLeave?: import("react").PointerEventHandler<HTMLLabelElement> | undefined;
|
|
543
|
+
onPointerOver?: import("react").PointerEventHandler<HTMLLabelElement> | undefined;
|
|
544
|
+
onPointerOverCapture?: import("react").PointerEventHandler<HTMLLabelElement> | undefined;
|
|
545
|
+
onPointerOut?: import("react").PointerEventHandler<HTMLLabelElement> | undefined;
|
|
546
|
+
onPointerOutCapture?: import("react").PointerEventHandler<HTMLLabelElement> | undefined;
|
|
547
|
+
onGotPointerCapture?: import("react").PointerEventHandler<HTMLLabelElement> | undefined;
|
|
548
|
+
onGotPointerCaptureCapture?: import("react").PointerEventHandler<HTMLLabelElement> | undefined;
|
|
549
|
+
onLostPointerCapture?: import("react").PointerEventHandler<HTMLLabelElement> | undefined;
|
|
550
|
+
onLostPointerCaptureCapture?: import("react").PointerEventHandler<HTMLLabelElement> | undefined;
|
|
551
|
+
onScroll?: import("react").UIEventHandler<HTMLLabelElement> | undefined;
|
|
552
|
+
onScrollCapture?: import("react").UIEventHandler<HTMLLabelElement> | undefined;
|
|
553
|
+
onScrollEnd?: import("react").UIEventHandler<HTMLLabelElement> | undefined;
|
|
554
|
+
onScrollEndCapture?: import("react").UIEventHandler<HTMLLabelElement> | undefined;
|
|
555
|
+
onWheel?: import("react").WheelEventHandler<HTMLLabelElement> | undefined;
|
|
556
|
+
onWheelCapture?: import("react").WheelEventHandler<HTMLLabelElement> | undefined;
|
|
557
|
+
onAnimationStart?: import("react").AnimationEventHandler<HTMLLabelElement> | undefined;
|
|
558
|
+
onAnimationStartCapture?: import("react").AnimationEventHandler<HTMLLabelElement> | undefined;
|
|
559
|
+
onAnimationEnd?: import("react").AnimationEventHandler<HTMLLabelElement> | undefined;
|
|
560
|
+
onAnimationEndCapture?: import("react").AnimationEventHandler<HTMLLabelElement> | undefined;
|
|
561
|
+
onAnimationIteration?: import("react").AnimationEventHandler<HTMLLabelElement> | undefined;
|
|
562
|
+
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLLabelElement> | undefined;
|
|
563
|
+
onToggle?: import("react").ToggleEventHandler<HTMLLabelElement> | undefined;
|
|
564
|
+
onBeforeToggle?: import("react").ToggleEventHandler<HTMLLabelElement> | undefined;
|
|
565
|
+
onTransitionCancel?: import("react").TransitionEventHandler<HTMLLabelElement> | undefined;
|
|
566
|
+
onTransitionCancelCapture?: import("react").TransitionEventHandler<HTMLLabelElement> | undefined;
|
|
567
|
+
onTransitionEnd?: import("react").TransitionEventHandler<HTMLLabelElement> | undefined;
|
|
568
|
+
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLLabelElement> | undefined;
|
|
569
|
+
onTransitionRun?: import("react").TransitionEventHandler<HTMLLabelElement> | undefined;
|
|
570
|
+
onTransitionRunCapture?: import("react").TransitionEventHandler<HTMLLabelElement> | undefined;
|
|
571
|
+
onTransitionStart?: import("react").TransitionEventHandler<HTMLLabelElement> | undefined;
|
|
572
|
+
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLLabelElement> | undefined;
|
|
573
|
+
"aria-activedescendant"?: string | undefined;
|
|
574
|
+
"aria-atomic"?: ("false" | "true" | boolean) | undefined;
|
|
575
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
576
|
+
"aria-braillelabel"?: string | undefined;
|
|
577
|
+
"aria-brailleroledescription"?: string | undefined;
|
|
578
|
+
"aria-busy"?: ("false" | "true" | boolean) | undefined;
|
|
579
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
580
|
+
"aria-colcount"?: number | undefined;
|
|
581
|
+
"aria-colindex"?: number | undefined;
|
|
582
|
+
"aria-colindextext"?: string | undefined;
|
|
583
|
+
"aria-colspan"?: number | undefined;
|
|
584
|
+
"aria-controls"?: string | undefined;
|
|
585
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
586
|
+
"aria-describedby"?: string | undefined;
|
|
587
|
+
"aria-description"?: string | undefined;
|
|
588
|
+
"aria-details"?: string | undefined;
|
|
589
|
+
"aria-disabled"?: ("false" | "true" | boolean) | undefined;
|
|
590
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
|
591
|
+
"aria-errormessage"?: string | undefined;
|
|
592
|
+
"aria-expanded"?: ("false" | "true" | boolean) | undefined;
|
|
593
|
+
"aria-flowto"?: string | undefined;
|
|
594
|
+
"aria-grabbed"?: ("false" | "true" | boolean) | undefined;
|
|
595
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
|
596
|
+
"aria-hidden"?: ("false" | "true" | boolean) | undefined;
|
|
597
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
598
|
+
"aria-keyshortcuts"?: string | undefined;
|
|
599
|
+
"aria-label"?: string | undefined;
|
|
600
|
+
"aria-labelledby"?: string | undefined;
|
|
601
|
+
"aria-level"?: number | undefined;
|
|
602
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
603
|
+
"aria-modal"?: ("false" | "true" | boolean) | undefined;
|
|
604
|
+
"aria-multiline"?: ("false" | "true" | boolean) | undefined;
|
|
605
|
+
"aria-multiselectable"?: ("false" | "true" | boolean) | undefined;
|
|
606
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
607
|
+
"aria-owns"?: string | undefined;
|
|
608
|
+
"aria-placeholder"?: string | undefined;
|
|
609
|
+
"aria-posinset"?: number | undefined;
|
|
610
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
611
|
+
"aria-readonly"?: ("false" | "true" | boolean) | undefined;
|
|
612
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
|
|
613
|
+
"aria-required"?: ("false" | "true" | boolean) | undefined;
|
|
614
|
+
"aria-roledescription"?: string | undefined;
|
|
615
|
+
"aria-rowcount"?: number | undefined;
|
|
616
|
+
"aria-rowindex"?: number | undefined;
|
|
617
|
+
"aria-rowindextext"?: string | undefined;
|
|
618
|
+
"aria-rowspan"?: number | undefined;
|
|
619
|
+
"aria-selected"?: ("false" | "true" | boolean) | undefined;
|
|
620
|
+
"aria-setsize"?: number | undefined;
|
|
621
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
622
|
+
"aria-valuemax"?: number | undefined;
|
|
623
|
+
"aria-valuemin"?: number | undefined;
|
|
624
|
+
"aria-valuenow"?: number | undefined;
|
|
625
|
+
"aria-valuetext"?: string | undefined;
|
|
626
|
+
defaultChecked?: boolean | undefined;
|
|
627
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
628
|
+
suppressContentEditableWarning?: boolean | undefined;
|
|
629
|
+
suppressHydrationWarning?: boolean | undefined;
|
|
630
|
+
accessKey?: string | undefined;
|
|
631
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
|
|
632
|
+
autoFocus?: boolean | undefined;
|
|
633
|
+
className?: string | undefined;
|
|
634
|
+
contentEditable?: ("false" | "true" | boolean) | "inherit" | "plaintext-only" | undefined;
|
|
635
|
+
contextMenu?: string | undefined;
|
|
636
|
+
dir?: string | undefined;
|
|
637
|
+
draggable?: ("false" | "true" | boolean) | undefined;
|
|
638
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
639
|
+
hidden?: boolean | undefined;
|
|
640
|
+
id?: string | undefined;
|
|
641
|
+
lang?: string | undefined;
|
|
642
|
+
nonce?: string | undefined;
|
|
643
|
+
slot?: string | undefined;
|
|
644
|
+
spellCheck?: ("false" | "true" | boolean) | undefined;
|
|
645
|
+
style?: import("react").CSSProperties | undefined;
|
|
646
|
+
tabIndex?: number | undefined;
|
|
647
|
+
title?: string | undefined;
|
|
648
|
+
translate?: "yes" | "no" | undefined;
|
|
649
|
+
radioGroup?: string | undefined;
|
|
650
|
+
role?: import("react").AriaRole | undefined;
|
|
651
|
+
about?: string | undefined;
|
|
652
|
+
content?: string | undefined;
|
|
653
|
+
datatype?: string | undefined;
|
|
654
|
+
inlist?: any;
|
|
655
|
+
prefix?: string | undefined;
|
|
656
|
+
property?: string | undefined;
|
|
657
|
+
rel?: string | undefined;
|
|
658
|
+
resource?: string | undefined;
|
|
659
|
+
rev?: string | undefined;
|
|
660
|
+
typeof?: string | undefined;
|
|
661
|
+
vocab?: string | undefined;
|
|
662
|
+
autoCorrect?: string | undefined;
|
|
663
|
+
autoSave?: string | undefined;
|
|
664
|
+
color?: string | undefined;
|
|
665
|
+
itemProp?: string | undefined;
|
|
666
|
+
itemScope?: boolean | undefined;
|
|
667
|
+
itemType?: string | undefined;
|
|
668
|
+
itemID?: string | undefined;
|
|
669
|
+
itemRef?: string | undefined;
|
|
670
|
+
results?: number | undefined;
|
|
671
|
+
security?: string | undefined;
|
|
672
|
+
unselectable?: "on" | "off" | undefined;
|
|
673
|
+
popover?: "" | "auto" | "manual" | "hint" | undefined;
|
|
674
|
+
popoverTargetAction?: "toggle" | "show" | "hide" | undefined;
|
|
675
|
+
popoverTarget?: string | undefined;
|
|
676
|
+
inert?: boolean | undefined;
|
|
677
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
678
|
+
is?: string | undefined;
|
|
679
|
+
exportparts?: string | undefined;
|
|
680
|
+
part?: string | undefined;
|
|
681
|
+
form?: string | undefined;
|
|
682
|
+
}, "ref"> & import("react").RefAttributes<HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
683
|
+
/**
|
|
684
|
+
* De-emphasized sub-line (`Choice.Description`) for a `SelectableList.Item`.
|
|
685
|
+
*
|
|
686
|
+
* @see https://mantle.ngrok.com/components/data-display/selectable-list
|
|
687
|
+
*
|
|
688
|
+
* @example
|
|
689
|
+
* ```tsx
|
|
690
|
+
* <SelectableList.Root options={options} value={selected} onValueChange={setSelected}>
|
|
691
|
+
* <SelectableList.Filter placeholder="Filter access keys…" />
|
|
692
|
+
* <SelectableList.SelectAll>Select all</SelectableList.SelectAll>
|
|
693
|
+
* <SelectableList.Viewport aria-label="Access keys" className="max-h-80">
|
|
694
|
+
* {(option) => (
|
|
695
|
+
* <SelectableList.Item value={option.value}>
|
|
696
|
+
* <SelectableList.ItemTitle>{option.label}</SelectableList.ItemTitle>
|
|
697
|
+
* <SelectableList.ItemDescription>{option.description}</SelectableList.ItemDescription>
|
|
698
|
+
* </SelectableList.Item>
|
|
699
|
+
* )}
|
|
700
|
+
* </SelectableList.Viewport>
|
|
701
|
+
* <SelectableList.Empty>No access keys found.</SelectableList.Empty>
|
|
702
|
+
* </SelectableList.Root>
|
|
703
|
+
* ```
|
|
704
|
+
*/
|
|
705
|
+
readonly ItemDescription: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").ClassAttributes<HTMLParagraphElement> & import("react").HTMLAttributes<HTMLParagraphElement> & WithAsChild, "ref"> & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
706
|
+
/**
|
|
707
|
+
* Shown when the filter matches no options — a polite `role="status"` live
|
|
708
|
+
* region, so the empty state is announced as the filter narrows.
|
|
709
|
+
*
|
|
710
|
+
* @see https://mantle.ngrok.com/components/data-display/selectable-list
|
|
711
|
+
*
|
|
712
|
+
* @example
|
|
713
|
+
* ```tsx
|
|
714
|
+
* <SelectableList.Root options={options} value={selected} onValueChange={setSelected}>
|
|
715
|
+
* <SelectableList.Filter placeholder="Filter access keys…" />
|
|
716
|
+
* <SelectableList.SelectAll>Select all</SelectableList.SelectAll>
|
|
717
|
+
* <SelectableList.Viewport aria-label="Access keys" className="max-h-80" />
|
|
718
|
+
* <SelectableList.Empty>No access keys found.</SelectableList.Empty>
|
|
719
|
+
* </SelectableList.Root>
|
|
720
|
+
* ```
|
|
721
|
+
*/
|
|
722
|
+
readonly Empty: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
723
|
+
};
|
|
724
|
+
//#endregion
|
|
725
|
+
export { SelectableList, type SelectableListItemProps, type SelectableListOption, type SelectableListRootProps, type SelectableListViewportProps, type SelectableListVirtualViewportProps, filterSelectableOptions, optionLabelText, summarizeSelection, toggleSelectionValue };
|