@ngrok/mantle 0.93.7 → 0.94.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -2
- package/dist/accordion.d.ts +73 -21
- package/dist/accordion.js +1 -1
- package/dist/agent.json +1234 -84
- package/dist/alert-BkJHDx9X.js +1 -0
- package/dist/{alert-BcSBNR3S.d.ts → alert-D0zRRUHV.d.ts} +35 -25
- package/dist/alert-center.d.ts +67 -55
- package/dist/alert-center.js +1 -1
- package/dist/alert-dialog.d.ts +35 -10
- package/dist/alert-dialog.js +1 -1
- package/dist/alert.d.ts +6 -1
- package/dist/alert.js +1 -1
- package/dist/anchor-Dc6IgvXV.js +1 -0
- package/dist/anchor.d.ts +17 -5
- package/dist/anchor.js +1 -1
- package/dist/app-layout.d.ts +33 -18
- package/dist/app-layout.js +1 -1
- package/dist/area-chart.d.ts +153 -97
- package/dist/area-chart.js +1 -1
- package/dist/avatar.d.ts +36 -24
- package/dist/avatar.js +1 -1
- package/dist/badge.d.ts +19 -7
- package/dist/badge.js +1 -1
- package/dist/bar-chart.d.ts +155 -100
- package/dist/bar-chart.js +1 -1
- package/dist/breadcrumb.d.ts +47 -36
- package/dist/breadcrumb.js +1 -1
- package/dist/browser-only-CZfkNw5A.js +1 -0
- package/dist/browser-only-ymFoM3Ya.js +1 -0
- package/dist/browser-only.d.ts +8 -0
- package/dist/browser-only.js +1 -1
- package/dist/{button-BX-4lYUn.d.ts → button-5Pc7Mby_.d.ts} +4 -4
- package/dist/button-B9bChDgl.js +1 -0
- package/dist/button-D8jixIbH.js +1 -0
- package/dist/button-DNLTJ32M.js +1 -0
- package/dist/{button-CPsKGDK0.d.ts → button-Ddj6yr10.d.ts} +34 -27
- package/dist/{button-Yxyu1XMd.d.ts → button-DnYv7IOT.d.ts} +29 -22
- package/dist/button.d.ts +9 -3
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +8 -1
- package/dist/calendar.js +1 -1
- package/dist/card.d.ts +7 -2
- package/dist/card.js +1 -1
- package/dist/centered-layout.d.ts +34 -23
- package/dist/centered-layout.js +1 -1
- package/dist/chart-BLCqzt56.js +1 -0
- package/dist/chart-CChZiCrt.js +1 -0
- package/dist/chart-CUmSu9d7.js +1 -0
- package/dist/{chart-BpfbtOUN.d.ts → chart-Dl8gFo_D.d.ts} +117 -121
- package/dist/chart-DtgZBAas.js +2 -0
- package/dist/checkbox-Cu5cgZmk.js +1 -0
- package/dist/checkbox.d.ts +15 -2
- package/dist/checkbox.js +1 -1
- package/dist/choice-CCVG2hb9.js +1 -0
- package/dist/{choice-BLR0_MeB.d.ts → choice-CNiOSzqV.d.ts} +26 -20
- package/dist/choice.d.ts +6 -1
- package/dist/choice.js +1 -1
- package/dist/code-BPKNY1_w.js +1 -0
- package/dist/{code-block-BGdV4Yty.d.ts → code-block-BDw6MEwH.d.ts} +9 -9
- package/dist/{code-block-W3kWPxCJ.js → code-block-CKzsAMzj.js} +3 -3
- package/dist/code-block.d.ts +28 -19
- package/dist/code-block.js +1 -1
- package/dist/code-block_highlight-utils.d.ts +6 -1
- package/dist/code-block_highlight-utils.js +1 -1
- package/dist/code.d.ts +16 -3
- package/dist/code.js +1 -1
- package/dist/color-CHZbU1Ww.js +1 -0
- package/dist/color.js +1 -1
- package/dist/combobox.d.ts +42 -28
- package/dist/combobox.js +1 -1
- package/dist/command.d.ts +59 -47
- package/dist/command.js +1 -1
- package/dist/compose-refs-BdRUneoc.js +1 -0
- package/dist/{copy-to-clipboard-DInu78k_.js → copy-to-clipboard-Dd83caRw.js} +1 -1
- package/dist/cx.d.ts +4 -4
- package/dist/cx.js +1 -1
- package/dist/{data-slot-B-LqAcBB.d.ts → data-slot-BW8KQ9Xo.d.ts} +2 -2
- package/dist/data-table.d.ts +83 -52
- package/dist/data-table.js +1 -1
- package/dist/description-list.d.ts +13 -2
- package/dist/description-list.js +1 -1
- package/dist/{dialog-2fRO4ca4.d.ts → dialog-CIEuwNys.d.ts} +32 -8
- package/dist/dialog-CbEEA0fl.d.ts +32 -0
- package/dist/dialog-DmzoDfY3.js +1 -0
- package/dist/dialog.d.ts +7 -2
- package/dist/dialog.js +1 -1
- package/dist/{dropdown-menu-CpjRwMWe.d.ts → dropdown-menu-CeY498yk.d.ts} +41 -33
- package/dist/dropdown-menu-uheL0prz.js +1 -0
- package/dist/dropdown-menu.d.ts +6 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.d.ts +7 -2
- package/dist/empty.js +1 -1
- package/dist/field-Bpvn4tQp.js +1 -0
- package/dist/{field-V_gnkcmN.d.ts → field-BshcNVe_.d.ts} +1 -1
- package/dist/field-Cai_4c1l.js +1 -0
- package/dist/field.d.ts +53 -42
- package/dist/field.js +1 -1
- package/dist/flag.d.ts +11 -3
- package/dist/flag.js +1 -1
- package/dist/hooks.d.ts +35 -10
- package/dist/hooks.js +1 -1
- package/dist/hover-card.d.ts +25 -14
- package/dist/hover-card.js +1 -1
- package/dist/{icon-CgNqu-fl.d.ts → icon--purqHRo.d.ts} +1 -1
- package/dist/{icon-ByLVhdYq.d.ts → icon-DuIYoyft.d.ts} +8 -2
- package/dist/{icon-DXDyhy2N.d.ts → icon-QCm1ui29.d.ts} +2 -2
- package/dist/icon-xb7d9M7X.js +1 -0
- package/dist/icon.d.ts +8 -3
- package/dist/icon.js +1 -1
- package/dist/icons-DEDCLZ8B.js +1 -0
- package/dist/icons-DXadFwpo.js +1 -0
- package/dist/icons-DcesO4Ng.js +1 -0
- package/dist/icons.d.ts +13 -1
- package/dist/icons.js +1 -1
- package/dist/{in-view-B3nMAzfE.d.ts → in-view-C_daNafg.d.ts} +4 -23
- package/dist/{index-BhfgyurF.d.ts → index-KJ06KK6t.d.ts} +3 -3
- package/dist/input-BjCDSOPA.js +1 -0
- package/dist/{input-Dx5owTCc.d.ts → input-DC4nW0Sr.d.ts} +12 -2
- package/dist/input-fW8QSZEO.js +1 -0
- package/dist/input.d.ts +37 -5
- package/dist/input.js +1 -1
- package/dist/kbd-P1nQshWo.js +1 -0
- package/dist/kbd.d.ts +17 -5
- package/dist/kbd.js +1 -1
- package/dist/label-DO1RlMKl.js +1 -0
- package/dist/{label-Dn5CPJUj.d.ts → label-epgtywRz.d.ts} +14 -8
- package/dist/label.d.ts +6 -1
- package/dist/label.js +1 -1
- package/dist/layer-container-DL4yclOu.js +1 -0
- package/dist/layer-container.d.ts +2 -2
- package/dist/layer-container.js +1 -1
- package/dist/line-chart.d.ts +147 -90
- package/dist/line-chart.js +1 -1
- package/dist/list-cQZPSjfz.js +1 -0
- package/dist/list.d.ts +34 -16
- package/dist/list.js +1 -1
- package/dist/live-region-Dhapu8a5.js +1 -0
- package/dist/live-region.d.ts +15 -2
- package/dist/live-region.js +1 -1
- package/dist/llms.txt +82 -79
- package/dist/main-CHyWYDak.js +1 -0
- package/dist/main.d.ts +13 -1
- package/dist/main.js +1 -1
- package/dist/mantle.css +133 -88
- package/dist/media-object.d.ts +16 -4
- package/dist/media-object.js +1 -1
- package/dist/migrations/0014-chart-named-colors.yml +1389 -0
- package/dist/migrations/0015-segmented-control.yml +788 -0
- package/dist/multi-select.d.ts +42 -29
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.d.ts +20 -8
- package/dist/otp-input.js +1 -1
- package/dist/pagination.d.ts +93 -4
- package/dist/pagination.js +1 -1
- package/dist/{popover-BfB2I9G0.d.ts → popover-Bei0jyfH.d.ts} +87 -12
- package/dist/popover-DhgunktK.js +1 -0
- package/dist/popover-T2EyaqGK.d.ts +1 -0
- package/dist/popover.d.ts +7 -2
- package/dist/popover.js +1 -1
- package/dist/primitive-D8CzV_Ft.js +1 -0
- package/dist/progress.d.ts +28 -11
- package/dist/progress.js +1 -1
- package/dist/qr-code.d.ts +11 -3
- package/dist/qr-code.js +1 -1
- package/dist/query-filter.d.ts +6 -6
- package/dist/query.d.ts +9 -4
- package/dist/query.js +1 -1
- package/dist/radio-group-BJQ6EOqh.d.ts +27 -0
- package/dist/radio-group-BliblUqe.js +1 -0
- package/dist/radio-group-ggEkCi0V.js +1 -0
- package/dist/radio-group.d.ts +21 -100
- package/dist/radio-group.js +1 -1
- package/dist/sandbar.d.ts +43 -30
- package/dist/sandbar.js +1 -1
- package/dist/sandboxed-on-click-D4PL5_GR.js +1 -0
- package/dist/sandboxed-on-click.d.ts +8 -0
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/scatter-plot.d.ts +137 -76
- package/dist/scatter-plot.js +1 -1
- package/dist/segmented-control.d.ts +136 -0
- package/dist/segmented-control.js +1 -0
- package/dist/select-1xuUx_os.js +1 -0
- package/dist/{select-BkhBxtOT.d.ts → select-BpaXHxJm.d.ts} +33 -25
- package/dist/select.d.ts +6 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list.d.ts +29 -18
- package/dist/selectable-list.js +1 -1
- package/dist/{separator-D9AWEkcJ.d.ts → separator-Ck4sPrdN.d.ts} +4 -2
- package/dist/separator-DnvhwY2J.js +1 -0
- package/dist/separator.d.ts +6 -1
- package/dist/separator.js +1 -1
- package/dist/{shake-DL6WhMXM.js → shake-CAUpKBHe.js} +1 -1
- package/dist/sheet-DHy_vlme.js +1 -0
- package/dist/sheet.d.ts +36 -7
- package/dist/sheet.js +1 -1
- package/dist/sidebar.d.ts +53 -37
- package/dist/sidebar.js +1 -1
- package/dist/skeleton-DHfyjuQi.js +1 -0
- package/dist/skeleton.d.ts +15 -4
- package/dist/skeleton.js +1 -1
- package/dist/skip-to-main-link.d.ts +12 -1
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slider.d.ts +11 -1
- package/dist/slider.js +1 -1
- package/dist/slot-B7rwscwd.js +1 -0
- package/dist/{slot-C0OCJjdJ.d.ts → slot-BEMQMbk3.d.ts} +6 -4
- package/dist/slot.d.ts +6 -1
- package/dist/slot.js +1 -1
- package/dist/source-all.css +5 -1
- package/dist/split-button.d.ts +20 -9
- package/dist/split-button.js +1 -1
- package/dist/strata.d.ts +35 -22
- package/dist/strata.js +1 -1
- package/dist/{suggestions-NkqYTT49.d.ts → suggestions-BJeGvwDa.d.ts} +7 -7
- package/dist/switch.d.ts +14 -2
- package/dist/switch.js +1 -1
- package/dist/table-BnLdXUai.js +1 -0
- package/dist/{table-vT6Okwfa.d.ts → table-Ii9hHUWN.d.ts} +84 -5
- package/dist/table.d.ts +6 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +24 -12
- package/dist/tabs.js +1 -1
- package/dist/text-area.d.ts +12 -2
- package/dist/text-area.js +1 -1
- package/dist/theme-BNdZl352.js +1 -0
- package/dist/theme-switcher.d.ts +18 -4
- package/dist/theme-switcher.js +1 -1
- package/dist/theme.d.ts +25 -11
- package/dist/theme.js +1 -1
- package/dist/toast.d.ts +15 -2
- package/dist/toast.js +1 -1
- package/dist/tokens.dark.json +3261 -0
- package/dist/tokens.json +4933 -0
- package/dist/tokens.resolver.json +37 -0
- package/dist/{tooltip-NcLIeBy5.d.ts → tooltip-CstGDKwy.d.ts} +18 -11
- package/dist/tooltip-DQO40Mrq.js +1 -0
- package/dist/tooltip.d.ts +6 -1
- package/dist/tooltip.js +1 -1
- package/dist/truncated-text.d.ts +28 -14
- package/dist/truncated-text.js +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/dist/use-breakpoint-B4Kh0xE6.js +1 -0
- package/dist/use-callback-ref-DiOXFQzM.js +1 -0
- package/dist/use-composed-refs-DPYmLDSe.js +1 -0
- package/dist/use-copy-to-clipboard-hBL6_65i.js +1 -0
- package/dist/use-inert-siblings-C4RHXrZc.js +1 -0
- package/dist/use-is-apple-platform-Bq6_KbVX.js +1 -0
- package/dist/use-is-hydrated-BeLOGKwE.js +1 -0
- package/dist/use-is-hydrated-after-paint-CrHt3OHw.js +1 -0
- package/dist/use-isomorphic-layout-effect-CL6iq0Bj.js +1 -0
- package/dist/use-matches-media-query-FfvtNKQe.js +1 -0
- package/dist/use-prefers-reduced-motion-Ck6dnOM9.js +1 -0
- package/dist/use-swipe-to-dismiss-BYdlca8r.js +1 -0
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/dist/visually-hidden.d.ts +14 -1
- package/dist/visually-hidden.js +1 -1
- package/dist/well.d.ts +7 -2
- package/dist/well.js +1 -1
- package/package.json +21 -7
- package/src/components/chart/d3-license.md +25 -0
- package/dist/alert-P9lwn25X.js +0 -1
- package/dist/anchor-CgcbWEUs.js +0 -1
- package/dist/browser-only-BTSrYWLj.js +0 -1
- package/dist/button-69InNC_m.js +0 -1
- package/dist/button-B8k98Pby.js +0 -1
- package/dist/button-Dge0D5bl.js +0 -1
- package/dist/chart-BpWfQAwf.js +0 -2
- package/dist/checkbox-DmSQXs26.js +0 -1
- package/dist/choice-2Lrv8_nl.js +0 -1
- package/dist/code-DUJzSl4K.js +0 -1
- package/dist/compose-refs-sFdxsL7k.js +0 -1
- package/dist/dialog-7TUgiSzX.js +0 -1
- package/dist/dialog-Dp0QGWwo.d.ts +0 -28
- package/dist/dropdown-menu-BHBzCDSZ.js +0 -1
- package/dist/field-Bihblt8U.js +0 -1
- package/dist/field-CPvjazWN.js +0 -1
- package/dist/icon-kK0c-POG.js +0 -1
- package/dist/icons-CDLz5lpI.js +0 -1
- package/dist/icons-CSwTVV2m.js +0 -1
- package/dist/icons-DP3lQw5O.js +0 -1
- package/dist/input-CpQ6jlpI.js +0 -1
- package/dist/kbd-CLHsJ99p.js +0 -1
- package/dist/label-nHqqYS7e.js +0 -1
- package/dist/layer-container-kEQiE4zV.js +0 -1
- package/dist/list-RFRIQxU2.js +0 -1
- package/dist/live-region-DQ1QLv3L.js +0 -1
- package/dist/main-CC1L9IsH.js +0 -1
- package/dist/popover-C96V8SXi.d.ts +0 -1
- package/dist/popover-DxOqLKxy.js +0 -1
- package/dist/primitive-Dz9Al-us.js +0 -1
- package/dist/radio-group-HDVxTNPi.js +0 -1
- package/dist/sandboxed-on-click-C7pPu-2M.js +0 -1
- package/dist/select-CAAYk4Yj.js +0 -1
- package/dist/separator-DfzxVutO.js +0 -1
- package/dist/sheet-CSJc_sB4.js +0 -1
- package/dist/skeleton-DBpI-ko5.js +0 -1
- package/dist/slot-DdYN1L1C.js +0 -1
- package/dist/table-CFHiDBW8.js +0 -1
- package/dist/theme-C-glc5Q-.js +0 -1
- package/dist/tooltip-b6oiTaWq.js +0 -1
- package/dist/use-breakpoint--mo7kr9d.js +0 -1
- package/dist/use-callback-ref-BvVyI5K1.js +0 -1
- package/dist/use-copy-to-clipboard-Dy_0Qzb7.js +0 -1
- package/dist/use-is-apple-platform-D4nifHMx.js +0 -1
- package/dist/use-is-hydrated-after-paint-r9Cl2mGp.js +0 -1
- package/dist/use-isomorphic-layout-effect-CLSmHzo4.js +0 -1
- package/dist/use-matches-media-query-m860lols.js +0 -1
- package/dist/use-prefers-reduced-motion-CU6mWmOe.js +0 -1
- package/dist/use-swipe-to-dismiss-DceYk1Id.js +0 -1
package/dist/list.d.ts
CHANGED
|
@@ -1,10 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-exports for the List component: a scrollable, optionally-virtualized
|
|
3
|
+
* list of clickable items (account switchers, SSO provider pickers).
|
|
4
|
+
*
|
|
5
|
+
* The list primitive backing it (and `SelectableList`) lives in
|
|
6
|
+
* `./primitive.js` / `./virtual.js` and is deliberately **not** exported. It
|
|
7
|
+
* is internal shared implementation, mirroring how `dialog/primitive` backs
|
|
8
|
+
* the dialog family.
|
|
9
|
+
*
|
|
10
|
+
* @see https://mantle.ngrok.com/components/data-display/list
|
|
11
|
+
*/
|
|
1
12
|
import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
|
|
2
|
-
import { t as WithDataSlot } from "./data-slot-
|
|
3
|
-
import {
|
|
13
|
+
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
14
|
+
import { ComponentProps } from "react";
|
|
4
15
|
/**
|
|
5
16
|
* ARIA semantics for a {@link Root} / `VirtualRoot` collection and its
|
|
6
|
-
* {@link Item}s. The element is always a `<div>`
|
|
7
|
-
* carries the semantics, not the tag
|
|
17
|
+
* {@link Item}s. The element is always a `<div>` (per WAI-ARIA the *role*
|
|
18
|
+
* carries the semantics, not the tag), so both flavors share one implementation.
|
|
8
19
|
*
|
|
9
20
|
* - `"list"` → `<div role="list">` of `<div role="listitem">` rows: a
|
|
10
21
|
* non-selecting list of actions/links (e.g. `List`). Native tab
|
|
@@ -49,7 +60,7 @@ type ListRootProps$1 = ComponentProps<"div"> & {
|
|
|
49
60
|
semantics?: ListSemantics;
|
|
50
61
|
/**
|
|
51
62
|
* Called with the active row's index when it is activated under `"grid"`
|
|
52
|
-
* semantics
|
|
63
|
+
* semantics, by keyboard (`Space` / `Enter`) or by a bare click anywhere on
|
|
53
64
|
* the row that isn't handled by an interactive descendant (a checkbox, a
|
|
54
65
|
* label, a nested link/button). Wire it to selection.
|
|
55
66
|
*/
|
|
@@ -62,8 +73,8 @@ type ListRootProps$1 = ComponentProps<"div"> & {
|
|
|
62
73
|
*/
|
|
63
74
|
itemId?: (index: number) => string;
|
|
64
75
|
/**
|
|
65
|
-
* Whether the row at an index is disabled
|
|
66
|
-
* and excluded from grid activation. Defaults to reading the composed row
|
|
76
|
+
* Whether the row at an index is disabled. Keyboard navigation skips it,
|
|
77
|
+
* and it is excluded from grid activation. Defaults to reading the composed row
|
|
67
78
|
* element's `disabled` prop (covering `<Item disabled>`); pass it when
|
|
68
79
|
* disabled state lives in your data rather than on the row elements (e.g.
|
|
69
80
|
* `SelectableList` reads it off `options[].disabled`).
|
|
@@ -92,7 +103,7 @@ type VirtualRootProps = ListRootProps$1 & {
|
|
|
92
103
|
overscan?: number;
|
|
93
104
|
};
|
|
94
105
|
/**
|
|
95
|
-
* Props for `List.Root
|
|
106
|
+
* Props for `List.Root`: the internal list primitive's `Root` props, minus
|
|
96
107
|
* `semantics` (a `List` is always a `role="list"`) and the grid-only
|
|
97
108
|
* `onActivate` / `itemId` / `isItemDisabled` knobs (inert under list semantics).
|
|
98
109
|
*
|
|
@@ -139,7 +150,7 @@ type ListRootProps = Omit<ListRootProps$1, "semantics" | "onActivate" | "itemId"
|
|
|
139
150
|
*/
|
|
140
151
|
declare const Root: (props: ListRootProps) => import("react").JSX.Element;
|
|
141
152
|
/**
|
|
142
|
-
* Props for `List.VirtualRoot
|
|
153
|
+
* Props for `List.VirtualRoot`: the internal list primitive's
|
|
143
154
|
* `VirtualRoot` props (viewport props plus `estimateItemHeight` / `overscan`),
|
|
144
155
|
* minus `semantics` and the grid-only `onActivate` / `itemId` / `isItemDisabled`
|
|
145
156
|
* knobs.
|
|
@@ -198,9 +209,9 @@ declare const VirtualRoot: (props: ListVirtualRootProps) => import("react").JSX.
|
|
|
198
209
|
* </List.Root>
|
|
199
210
|
* ```
|
|
200
211
|
*/
|
|
201
|
-
type ListItemProps = Omit<ComponentProps<"button">, "type"> & WithAsChild & {
|
|
212
|
+
type ListItemProps = Omit<ComponentProps<"button">, "type"> & WithAsChild & WithDataSlot & {
|
|
202
213
|
/**
|
|
203
|
-
* Marks the item as the current one (e.g. the active account)
|
|
214
|
+
* Marks the item as the current one (e.g. the active account). Gives its
|
|
204
215
|
* pill the accent tint and sets `aria-current` so the state is announced,
|
|
205
216
|
* not just shown. Optional; omit it for a plain action/navigation list.
|
|
206
217
|
*/
|
|
@@ -244,7 +255,7 @@ type ListItemProps = Omit<ComponentProps<"button">, "type"> & WithAsChild & {
|
|
|
244
255
|
* </List.Root>
|
|
245
256
|
* ```
|
|
246
257
|
*/
|
|
247
|
-
declare const Item: ({ asChild, className, current, disabled, onClick, ref, ...props }: ListItemProps) => import("react").JSX.Element;
|
|
258
|
+
declare const Item: ({ asChild, className, current, "data-slot": dataSlot, disabled, onClick, ref, ...props }: ListItemProps) => import("react").JSX.Element;
|
|
248
259
|
/**
|
|
249
260
|
* The emphasized title line inside a `List.Item`, in the stronger foreground
|
|
250
261
|
* color. A styled `<span>`.
|
|
@@ -284,21 +295,28 @@ declare const ItemTitle: ({ "data-slot": dataSlot, className, ref, ...props }: C
|
|
|
284
295
|
*/
|
|
285
296
|
declare const ItemDescription: ({ "data-slot": dataSlot, className, ref, ...props }: ComponentProps<"span"> & WithDataSlot) => import("react").JSX.Element;
|
|
286
297
|
/**
|
|
287
|
-
* A scrollable, optionally-virtualized list of clickable items
|
|
298
|
+
* A scrollable, optionally-virtualized list of clickable items: the action /
|
|
288
299
|
* navigation counterpart to `SelectableList` (e.g. an account switcher or SSO
|
|
289
300
|
* provider picker). Compose `List.Item` children directly inside a
|
|
290
301
|
* `List.Root`; each item is a `<button>` (or your own element via
|
|
291
302
|
* `asChild`, e.g. an `<a>`), with an optional `current` accent.
|
|
292
303
|
*
|
|
293
304
|
* It is a **non-selecting** semantic list (`role="list"` of `role="listitem"`),
|
|
294
|
-
* not a selection widget
|
|
305
|
+
* not a selection widget; selection is `SelectableList`'s job. Non-virtualized
|
|
295
306
|
* by default; swap `Root` → `VirtualRoot` (same children) for windowing.
|
|
296
307
|
* Both public list components are built on the same internal list primitive
|
|
297
|
-
* (`./primitive.js`, deliberately unexported
|
|
308
|
+
* (`./primitive.js`, deliberately unexported, like `dialog/primitive`). Items
|
|
298
309
|
* keep their native tab order, and `ArrowUp` / `ArrowDown` / `Home` / `End`
|
|
299
|
-
* also move focus between them
|
|
310
|
+
* also move focus between them. The focused item tints like hover instead of
|
|
300
311
|
* drawing a focus ring.
|
|
301
312
|
*
|
|
313
|
+
* @useWhen Show a scrollable list of items that each run an action or navigate, such as an account
|
|
314
|
+
* switcher.
|
|
315
|
+
*
|
|
316
|
+
* @siblings
|
|
317
|
+
* - `SelectableList`: the user selects rows with checkboxes.
|
|
318
|
+
* - `DropdownMenu`: the actions open in a menu from a button.
|
|
319
|
+
*
|
|
302
320
|
* @see https://mantle.ngrok.com/components/data-display/list
|
|
303
321
|
*
|
|
304
322
|
* @example
|
package/dist/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as
|
|
1
|
+
"use client";import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{n,r,t as i}from"./list-cQZPSjfz.js";import{t as a}from"./slot-B7rwscwd.js";import{c as o}from"react/compiler-runtime";import{jsx as s}from"react/jsx-runtime";const c={Root:e=>{let t=o(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ s(r,{semantics:`list`,...e}),t[0]=e,t[1]=n),n},VirtualRoot:e=>{let t=o(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ s(i,{semantics:`list`,...e}),t[0]=e,t[1]=n),n},Item:r=>{let i=o(38),c,u,d,f,p,m,h,g;i[0]===r?(c=i[1],u=i[2],d=i[3],f=i[4],p=i[5],m=i[6],h=i[7],g=i[8]):({asChild:c,className:u,current:d,"data-slot":f,disabled:p,onClick:m,ref:g,...h}=r,i[0]=r,i[1]=c,i[2]=u,i[3]=d,i[4]=f,i[5]=p,i[6]=m,i[7]=h,i[8]=g);let _=c?a:`button`,v;i[9]===f?v=i[10]:(v=t(f,`list-item-control`),i[9]=f,i[10]=v);let y=d||void 0,b;i[11]!==c||i[12]!==p?(b=c?{"aria-disabled":p||void 0,tabIndex:p?-1:void 0}:{type:`button`,disabled:p},i[11]=c,i[12]=p,i[13]=b):b=i[13];let x;i[14]!==c||i[15]!==p||i[16]!==m?(x=e=>{c&&p?(e.preventDefault(),e.stopPropagation()):m?.(e)},i[14]=c,i[15]=p,i[16]=m,i[17]=x):x=i[17];let S;i[18]===u?S=i[19]:(S=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`,u),i[18]=u,i[19]=S);let C;i[20]!==c||i[21]!==p||i[22]!==h?(C=c&&p?l:h.onClickCapture,i[20]=c,i[21]=p,i[22]=h,i[23]=C):C=i[23];let w;i[24]!==_||i[25]!==h||i[26]!==g||i[27]!==v||i[28]!==y||i[29]!==b||i[30]!==x||i[31]!==S||i[32]!==C?(w=/* @__PURE__ */ s(_,{ref:g,"data-slot":v,"aria-current":y,...b,onClick:x,className:S,...h,onClickCapture:C}),i[24]=_,i[25]=h,i[26]=g,i[27]=v,i[28]=y,i[29]=b,i[30]=x,i[31]=S,i[32]=C,i[33]=w):w=i[33];let T;return i[34]!==d||i[35]!==p||i[36]!==w?(T=/* @__PURE__ */ s(n,{selected:d,disabled:p,children:w}),i[34]=d,i[35]=p,i[36]=w,i[37]=T):T=i[37],T},ItemTitle:n=>{let r=o(14),i,a,c,l;r[0]===n?(i=r[1],a=r[2],c=r[3],l=r[4]):({"data-slot":a,className:i,ref:l,...c}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=c,r[4]=l);let u;r[5]===a?u=r[6]:(u=t(a,`list-item-title`),r[5]=a,r[6]=u);let d;r[7]===i?d=r[8]:(d=e(`text-strong font-medium`,i),r[7]=i,r[8]=d);let f;return r[9]!==c||r[10]!==l||r[11]!==u||r[12]!==d?(f=/* @__PURE__ */ s(`span`,{ref:l,"data-slot":u,className:d,...c}),r[9]=c,r[10]=l,r[11]=u,r[12]=d,r[13]=f):f=r[13],f},ItemDescription:n=>{let r=o(14),i,a,c,l;r[0]===n?(i=r[1],a=r[2],c=r[3],l=r[4]):({"data-slot":a,className:i,ref:l,...c}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=c,r[4]=l);let u;r[5]===a?u=r[6]:(u=t(a,`list-item-description`),r[5]=a,r[6]=u);let d;r[7]===i?d=r[8]:(d=e(`text-body leading-4`,i),r[7]=i,r[8]=d);let f;return r[9]!==c||r[10]!==l||r[11]!==u||r[12]!==d?(f=/* @__PURE__ */ s(`span`,{ref:l,"data-slot":u,className:d,...c}),r[9]=c,r[10]=l,r[11]=u,r[12]=d,r[13]=f):f=r[13],f}};function l(e){e.preventDefault(),e.stopPropagation()}export{c as List};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-B7rwscwd.js";import{c as r}from"react/compiler-runtime";import{jsx as i}from"react/jsx-runtime";const a=a=>{let o=r(19),s,c,l,u,d,f;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],f=o[6]):({"data-slot":l,asChild:s,className:c,politeness:f,ref:d,...u}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=f);let p=f===void 0?`polite`:f,m=s?n:`span`,h;o[7]===l?h=o[8]:(h=t(l,`live-region`),o[7]=l,o[8]=h);let g=p===`assertive`?`alert`:`status`,_=p===`assertive`?void 0:`polite`,v;o[9]===c?v=o[10]:(v=e(`sr-only`,c),o[9]=c,o[10]=v);let y;return o[11]!==m||o[12]!==u||o[13]!==d||o[14]!==h||o[15]!==g||o[16]!==_||o[17]!==v?(y=/* @__PURE__ */ i(m,{ref:d,"data-slot":h,role:g,"aria-live":_,"aria-atomic":`true`,className:v,...u}),o[11]=m,o[12]=u,o[13]=d,o[14]=h,o[15]=g,o[16]=_,o[17]=v,o[18]=y):y=o[18],y};export{a as t};
|
package/dist/live-region.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-exports for the LiveRegion component.
|
|
3
|
+
*
|
|
4
|
+
* @see https://mantle.ngrok.com/components/primitives/live-region
|
|
5
|
+
*/
|
|
1
6
|
import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
|
|
2
|
-
import { t as WithDataSlot } from "./data-slot-
|
|
7
|
+
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
3
8
|
import { ComponentProps } from "react";
|
|
4
9
|
type LiveRegionProps = ComponentProps<"span"> & WithAsChild & {
|
|
5
10
|
/**
|
|
@@ -31,7 +36,7 @@ type LiveRegionProps = ComponentProps<"span"> & WithAsChild & {
|
|
|
31
36
|
* - Announce an async result that moves focus nowhere: "3 results found", "Draft saved".
|
|
32
37
|
*
|
|
33
38
|
* **When not to use**
|
|
34
|
-
* - For status the user must see. Use {@link https://mantle.ngrok.com/components/feedback/
|
|
39
|
+
* - For status the user must see. Use {@link https://mantle.ngrok.com/components/feedback/toast Toast}, which announces its message, or {@link https://mantle.ngrok.com/components/feedback/alert Alert}, which announces only when you pass it a `role`.
|
|
35
40
|
* - For hidden text that never changes. Use {@link https://mantle.ngrok.com/components/primitives/visually-hidden VisuallyHidden}.
|
|
36
41
|
*
|
|
37
42
|
* **Polymorphism.** Pass `asChild` to render the live region as a different
|
|
@@ -41,6 +46,14 @@ type LiveRegionProps = ComponentProps<"span"> & WithAsChild & {
|
|
|
41
46
|
* | -------------- | --------------- | ------------------------------------------------------------------------- |
|
|
42
47
|
* | `data-slot` | `"live-region"` | Stamped on the rendered element, and joined onto the child via `asChild`. |
|
|
43
48
|
*
|
|
49
|
+
* @useWhen Announce a change to screen readers with no visible message, such as a save result or a
|
|
50
|
+
* count of search results.
|
|
51
|
+
*
|
|
52
|
+
* @siblings
|
|
53
|
+
* - `Toast`: sighted users also need to see the message.
|
|
54
|
+
* - `Alert`: the message stays visible in the page. It announces only when you pass it a `role`.
|
|
55
|
+
* - `VisuallyHidden`: the hidden text is static and needs no announcement.
|
|
56
|
+
*
|
|
44
57
|
* @see https://mantle.ngrok.com/components/primitives/live-region
|
|
45
58
|
* @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Guides/Live_regions
|
|
46
59
|
*
|
package/dist/live-region.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{t as LiveRegion}from"./live-region-
|
|
1
|
+
export{t as LiveRegion}from"./live-region-Dhapu8a5.js";
|
package/dist/llms.txt
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
# @ngrok/mantle (0.
|
|
1
|
+
# @ngrok/mantle (0.94.1)
|
|
2
2
|
|
|
3
|
-
> Offline index shipped inside the @ngrok/mantle npm package. The full records, with examples and sibling boundaries, are in agent.json beside this file. Neither file lists props: read the
|
|
3
|
+
> Offline index shipped inside the @ngrok/mantle npm package. The full records, with examples and sibling boundaries, are in agent.json beside this file. Neither file lists props: read the type declarations that `package.json#exports` names for each subpath (for example `button.d.ts` beside this file), and follow their imports, for every prop and its JSDoc. Live docs: https://mantle.ngrok.com/for-ai-agents.
|
|
4
4
|
|
|
5
5
|
Docs: https://mantle.ngrok.com/
|
|
6
6
|
Agent guide: https://mantle.ngrok.com/for-ai-agents
|
|
7
|
+
MCP server: https://mantle.ngrok.com/mcp
|
|
7
8
|
Index: https://mantle.ngrok.com/llms.txt
|
|
8
9
|
Full text: https://mantle.ngrok.com/llms-full.txt
|
|
9
10
|
|
|
@@ -19,91 +20,92 @@ Full text: https://mantle.ngrok.com/llms-full.txt
|
|
|
19
20
|
|
|
20
21
|
## Components
|
|
21
22
|
|
|
22
|
-
- **Accordion** (`@ngrok/mantle/accordion`): A vertically stacked set of disclosure sections whose collapsed content stays in the DOM, so browser find-in-page (⌘F) can reveal it.
|
|
23
|
-
- **Alert** (`@ngrok/mantle/alert`): Displays a callout for user attention.
|
|
24
|
-
- **Alert Center** (`@ngrok/mantle/alert-center`): A single top-level bar that surfaces one-to-many account alerts and their upgrade CTAs, expanding additional alerts inline.
|
|
25
|
-
- **Alert Dialog** (`@ngrok/mantle/alert-dialog`): A modal dialog that interrupts the user with important content and expects a response.
|
|
26
|
-
- **Anchor** (`@ngrok/mantle/anchor`):
|
|
27
|
-
- **Area Chart** (`@ngrok/mantle/area-chart`):
|
|
28
|
-
- **Avatar** (`@ngrok/mantle/avatar`): A small image representing a person or an account, with a text or icon fallback.
|
|
29
|
-
- **Badge** (`@ngrok/mantle/badge`): A non-interactive label used to highlight short, scannable information
|
|
30
|
-
- **Bar Chart** (`@ngrok/mantle/bar-chart`): A
|
|
31
|
-
- **Breadcrumb** (`@ngrok/mantle/breadcrumb`): Hierarchy-path navigation, an ordered list of links from a root to the current page, in a labeled nav landmark.
|
|
32
|
-
- **Browser Only** (`@ngrok/mantle/browser-only`): A wrapper component that renders its children in the browser only, after hydration completes.
|
|
33
|
-
- **Button** (`@ngrok/mantle/button`): Initiates an action, such as completing a task or submitting information.
|
|
34
|
-
- **Calendar** (`@ngrok/mantle/calendar`, preview): A calendar component that allows users to select a date or a range of dates.
|
|
35
|
-
- **Card** (`@ngrok/mantle/card`): A container used to display content in a box, resembling a physical card.
|
|
36
|
-
- **Checkbox** (`@ngrok/mantle/checkbox`): A form control that
|
|
37
|
-
- **Choice** (`@ngrok/mantle/choice`): A reusable indicator-left / content-right layout for a single choice (a control beside a titled, multi-line label).
|
|
38
|
-
- **Code** (`@ngrok/mantle/code`): Marks a short fragment of inline computer code
|
|
39
|
-
- **Code Block** (`@ngrok/mantle/code-block`): Code blocks render and apply syntax highlighting to blocks of code using Shiki at build time.
|
|
40
|
-
- **Combobox** (`@ngrok/mantle/combobox`):
|
|
41
|
-
- **Command** (`@ngrok/mantle/command`): A command palette that allows users to search and execute commands.
|
|
42
|
-
- **Data Table** (`@ngrok/mantle/data-table`): Tables purposefully designed for dynamic, application data with features like sorting, filtering, and pagination.
|
|
43
|
-
- **Description List** (`@ngrok/mantle/description-list`): A semantically correct description list built on the HTML dl element. Renders a list of label/value pairs, commonly used in detail views to display metadata about a resource.
|
|
44
|
-
- **Dialog** (`@ngrok/mantle/dialog`): A window overlaid on either the primary window or another dialog window, rendering the content underneath inert. Also called: modal.
|
|
45
|
-
- **Dropdown Menu** (`@ngrok/mantle/dropdown-menu`): Displays a menu to the user (such as a set of actions or functions), triggered by a button.
|
|
46
|
-
- **Empty** (`@ngrok/mantle/empty`): Display a placeholder when there is no data or content to show. Also called: empty state, zero state.
|
|
47
|
-
- **Field** (`@ngrok/mantle/field`): Layout primitive for a single form field: label, control, helper text, and error messaging stacked together with consistent spacing.
|
|
48
|
-
- **Flag** (`@ngrok/mantle/flag`): Displays a flag as an SVG for the country code you pass.
|
|
49
|
-
- **Hover Card** (`@ngrok/mantle/hover-card`): For sighted users to preview content available behind a link.
|
|
50
|
-
- **Icon** (`@ngrok/mantle/icon`): Decorates an svg icon with automatic sizing. Useful when applying base styles to phosphor icons.
|
|
51
|
-
- **Icon Button** (`@ngrok/mantle/button`): Initiates an action, such as completing a task or submitting information. Renders one icon and nothing else, with a required label prop that carries the accessible name.
|
|
52
|
-
- **Icons** (`@ngrok/mantle/icons`): Custom icons used throughout ngrok UI.
|
|
53
|
-
- **Input** (`@ngrok/mantle/input`): Fundamental component for inputs.
|
|
54
|
-
- **Kbd** (`@ngrok/mantle/kbd`): A square, centered keyboard "key" chip for rendering keyboard shortcut hints.
|
|
55
|
-
- **Label** (`@ngrok/mantle/label`): A
|
|
56
|
-
- **Line Chart** (`@ngrok/mantle/line-chart`): A
|
|
57
|
-
- **List** (`@ngrok/mantle/list`): A scrollable, optionally-virtualized list of clickable items.
|
|
58
|
-
- **Live Region** (`@ngrok/mantle/live-region`): A persistent, visually hidden region that announces its text to screen readers when the text changes.
|
|
59
|
-
- **Main** (`@ngrok/mantle/main`): A focusable `<main>` landmark for the page's primary content
|
|
60
|
-
- **Media Object** (`@ngrok/mantle/media-object`): The Media Object is an image
|
|
61
|
-
- **Multi Select** (`@ngrok/mantle/multi-select`): A typeahead multi-select combobox
|
|
62
|
-
- **OTP Input** (`@ngrok/mantle/otp-input`): Accessible one-time passcode (OTP) input with paste, autofill, and IME support.
|
|
63
|
-
- **Pagination** (`@ngrok/mantle/pagination`): Components and hooks for navigating through paged data with cursor-based and offset-based pagination strategies.
|
|
64
|
-
- **Password Input** (`@ngrok/mantle/input`): Fundamental component for password inputs.
|
|
65
|
-
- **Popover** (`@ngrok/mantle/popover`): Displays rich content in a portal, triggered by a button. Also called: popup.
|
|
66
|
-
- **Progress Bar** (`@ngrok/mantle/progress`): Displays an indicator showing the completion progress of a task as a linear progress bar with customizable colors.
|
|
67
|
-
- **Progress Donut** (`@ngrok/mantle/progress`): Displays an indicator showing the completion progress of a task as a circular progress bar.
|
|
23
|
+
- **Accordion** (`@ngrok/mantle/accordion`): A vertically stacked set of disclosure sections whose collapsed content stays in the DOM, so browser find-in-page (⌘F) can reveal it. Also called: collapsible, collapse, disclosure, expansion panel.
|
|
24
|
+
- **Alert** (`@ngrok/mantle/alert`): Displays a callout for user attention. Also called: callout, notice, admonition.
|
|
25
|
+
- **Alert Center** (`@ngrok/mantle/alert-center`): A single top-level bar that surfaces one-to-many account alerts and their upgrade CTAs, expanding additional alerts inline. Also called: banner, announcement bar, global banner.
|
|
26
|
+
- **Alert Dialog** (`@ngrok/mantle/alert-dialog`): A modal dialog that interrupts the user with important content and expects a response. Also called: confirm, confirmation, confirm dialog.
|
|
27
|
+
- **Anchor** (`@ngrok/mantle/anchor`): A fundamental component for rendering links to external addresses. Also called: link, hyperlink.
|
|
28
|
+
- **Area Chart** (`@ngrok/mantle/area-chart`): An area chart for showing how values (and, when stacked, a total and its parts) change over a continuous x axis. Also called: sparkline, area graph.
|
|
29
|
+
- **Avatar** (`@ngrok/mantle/avatar`): A small image representing a person or an account, with a text or icon fallback. Also called: profile picture, profile photo.
|
|
30
|
+
- **Badge** (`@ngrok/mantle/badge`): A non-interactive label used to highlight short, scannable information (a status, a category tag, or a count) in the smallest possible footprint. Also called: tag, chip, pill, lozenge.
|
|
31
|
+
- **Bar Chart** (`@ngrok/mantle/bar-chart`): A bar chart for comparing values across categories, with grouped and stacked variants. Also called: sparkline, bar graph, column chart, histogram.
|
|
32
|
+
- **Breadcrumb** (`@ngrok/mantle/breadcrumb`): Hierarchy-path navigation, an ordered list of links from a root to the current page, in a labeled nav landmark. Also called: breadcrumbs, crumbs.
|
|
33
|
+
- **Browser Only** (`@ngrok/mantle/browser-only`): A wrapper component that renders its children in the browser only, after hydration completes. Also called: client only, no ssr.
|
|
34
|
+
- **Button** (`@ngrok/mantle/button`): Initiates an action, such as completing a task or submitting information. Also called: cta, call to action.
|
|
35
|
+
- **Calendar** (`@ngrok/mantle/calendar`, preview): A calendar component that allows users to select a date or a range of dates. Also called: date picker, datepicker, date range picker.
|
|
36
|
+
- **Card** (`@ngrok/mantle/card`): A container used to display content in a box, resembling a physical card. Also called: panel, tile, paper.
|
|
37
|
+
- **Checkbox** (`@ngrok/mantle/checkbox`): A form control that toggles between checked and not checked, with an indeterminate state. Also called: check box, tickbox.
|
|
38
|
+
- **Choice** (`@ngrok/mantle/choice`): A reusable indicator-left / content-right layout for a single choice (a control beside a titled, multi-line label). Also called: checkbox with description, radio with description, switch with description.
|
|
39
|
+
- **Code** (`@ngrok/mantle/code`): Marks a short fragment of inline computer code, such as a function name, a variable, a CLI flag, or a key. Also called: inline code, monospace.
|
|
40
|
+
- **Code Block** (`@ngrok/mantle/code-block`): Code blocks render and apply syntax highlighting to blocks of code using Shiki at build time. Also called: syntax highlighter, code snippet, code sample.
|
|
41
|
+
- **Combobox** (`@ngrok/mantle/combobox`): A text input with autocomplete: the user types to filter a list of suggested values and picks one, with full keyboard support. Also called: autocomplete, typeahead, searchable select, autosuggest.
|
|
42
|
+
- **Command** (`@ngrok/mantle/command`): A command palette that allows users to search and execute commands, built on top of cmdk. Also called: command palette, command menu, cmdk, spotlight.
|
|
43
|
+
- **Data Table** (`@ngrok/mantle/data-table`): Tables purposefully designed for dynamic, application data with features like sorting, filtering, and pagination. Also called: data grid, datagrid, grid, sortable table.
|
|
44
|
+
- **Description List** (`@ngrok/mantle/description-list`): A semantically correct description list built on the HTML dl element. Renders a list of label/value pairs, commonly used in detail views to display metadata about a resource. Also called: key value list, definition list, property list.
|
|
45
|
+
- **Dialog** (`@ngrok/mantle/dialog`): A window overlaid on either the primary window or another dialog window, rendering the content underneath inert. Also called: modal, modal dialog.
|
|
46
|
+
- **Dropdown Menu** (`@ngrok/mantle/dropdown-menu`): Displays a menu to the user (such as a set of actions or functions), triggered by a button. Also called: menu, action menu, overflow menu, kebab menu, menu button.
|
|
47
|
+
- **Empty** (`@ngrok/mantle/empty`): Display a placeholder when there is no data or content to show. Also called: empty state, zero state, blank slate, no data, no results.
|
|
48
|
+
- **Field** (`@ngrok/mantle/field`): Layout primitive for a single form field: label, control, helper text, and error messaging stacked together with consistent spacing. Also called: form field, form group, form item.
|
|
49
|
+
- **Flag** (`@ngrok/mantle/flag`): Displays a flag as an SVG for the country code you pass. Also called: country flag.
|
|
50
|
+
- **Hover Card** (`@ngrok/mantle/hover-card`): For sighted users to preview content available behind a link. Also called: hovercard, link preview, preview card.
|
|
51
|
+
- **Icon** (`@ngrok/mantle/icon`): Decorates an svg icon with automatic sizing. Useful when applying base styles to phosphor icons. Also called: svg icon.
|
|
52
|
+
- **Icon Button** (`@ngrok/mantle/button`): Initiates an action, such as completing a task or submitting information. Renders one icon and nothing else, with a required label prop that carries the accessible name. Also called: icon only button, action icon.
|
|
53
|
+
- **Icons** (`@ngrok/mantle/icons`): Custom icons used throughout ngrok UI. Also called: icon set, icon library.
|
|
54
|
+
- **Input** (`@ngrok/mantle/input`): Fundamental component for inputs. Also called: text input, text field, textfield, textbox.
|
|
55
|
+
- **Kbd** (`@ngrok/mantle/kbd`): A square, centered keyboard "key" chip for rendering keyboard shortcut hints, such as K, ⌘, ⌃, or Enter. Also called: keyboard shortcut, hotkey, keycap, keyboard key.
|
|
56
|
+
- **Label** (`@ngrok/mantle/label`): A caption for a form control, such as an input, a checkbox, a radio, a switch, or a select. Also called: form label.
|
|
57
|
+
- **Line Chart** (`@ngrok/mantle/line-chart`): A line chart for trends over a continuous x axis, time above all. Also called: sparkline, line graph, time series chart.
|
|
58
|
+
- **List** (`@ngrok/mantle/list`): A scrollable, optionally-virtualized list of clickable items. Also called: virtual list, virtualized list.
|
|
59
|
+
- **Live Region** (`@ngrok/mantle/live-region`): A persistent, visually hidden region that announces its text to screen readers when the text changes. Also called: aria live, announcer.
|
|
60
|
+
- **Main** (`@ngrok/mantle/main`): A focusable `<main>` landmark for the page's primary content. Also called: main landmark.
|
|
61
|
+
- **Media Object** (`@ngrok/mantle/media-object`): The Media Object is an image or an icon (media) on the left, with descriptive content (a title and a subtitle or description) on the right. Also called: media block.
|
|
62
|
+
- **Multi Select** (`@ngrok/mantle/multi-select`): A typeahead multi-select combobox: the user picks several values with filtering, and the picks show as removable tags. Also called: tag input, tags input, multiple select, chip input.
|
|
63
|
+
- **OTP Input** (`@ngrok/mantle/otp-input`): Accessible one-time passcode (OTP) input with paste, autofill, and IME support. Also called: one time password, verification code, pin input, 2fa.
|
|
64
|
+
- **Pagination** (`@ngrok/mantle/pagination`): Components and hooks for navigating through paged data with cursor-based and offset-based pagination strategies. Also called: pager, paginator.
|
|
65
|
+
- **Password Input** (`@ngrok/mantle/input`): Fundamental component for password inputs. Also called: password field.
|
|
66
|
+
- **Popover** (`@ngrok/mantle/popover`): Displays rich content in a portal, triggered by a button. Also called: popup, flyout.
|
|
67
|
+
- **Progress Bar** (`@ngrok/mantle/progress`): Displays an indicator showing the completion progress of a task as a linear progress bar with customizable colors. Also called: linear progress, loading bar, meter.
|
|
68
|
+
- **Progress Donut** (`@ngrok/mantle/progress`): Displays an indicator showing the completion progress of a task as a circular progress bar. Also called: circular progress, progress ring, progress circle, radial progress.
|
|
68
69
|
- **QR Code** (`@ngrok/mantle/qr-code`): Render a scannable QR code, optionally branded with a centered logo.
|
|
69
|
-
- **Query** (`@ngrok/mantle/query`): A filter field where free text and key:value qualifiers interleave, with in-place highlighting and suggestions.
|
|
70
|
-
- **Radio Group** (`@ngrok/mantle/radio-group`): A set of checkable buttons (known as radio buttons) where no more than one of the buttons can be checked at a time.
|
|
71
|
-
- **Sandbar** (`@ngrok/mantle/sandbar`): A floating save bar for unsaved changes.
|
|
72
|
-
- **SandboxedOnClick** (`@ngrok/mantle/sandboxed-on-click`): A container that prevents the click event from bubbling out of it.
|
|
73
|
-
- **Scatter Plot** (`@ngrok/mantle/scatter-plot`): A canvas-rendered scatter plot for correlating two continuous measures (three with the rotatable 3D projection).
|
|
74
|
-
- **
|
|
75
|
-
- **
|
|
76
|
-
- **
|
|
77
|
-
- **
|
|
78
|
-
- **
|
|
79
|
-
- **
|
|
80
|
-
- **
|
|
81
|
-
- **
|
|
82
|
-
- **
|
|
83
|
-
- **
|
|
84
|
-
- **
|
|
85
|
-
- **
|
|
86
|
-
- **
|
|
87
|
-
- **
|
|
88
|
-
- **
|
|
89
|
-
- **
|
|
90
|
-
- **Theme
|
|
91
|
-
- **
|
|
92
|
-
- **
|
|
93
|
-
- **
|
|
94
|
-
- **
|
|
95
|
-
- **
|
|
70
|
+
- **Query** (`@ngrok/mantle/query`): A filter field where free text and key:value qualifiers interleave, with in-place highlighting and suggestions. Also called: search bar, search input, filter bar, filter syntax.
|
|
71
|
+
- **Radio Group** (`@ngrok/mantle/radio-group`): A set of checkable buttons (known as radio buttons) where no more than one of the buttons can be checked at a time. Also called: radio button, radio.
|
|
72
|
+
- **Sandbar** (`@ngrok/mantle/sandbar`): A floating save bar for unsaved changes. Also called: save bar, contextual save bar, unsaved changes.
|
|
73
|
+
- **SandboxedOnClick** (`@ngrok/mantle/sandboxed-on-click`): A container that prevents the click event from bubbling out of it. Also called: stop propagation.
|
|
74
|
+
- **Scatter Plot** (`@ngrok/mantle/scatter-plot`): A canvas-rendered scatter plot for correlating two continuous measures (three with the rotatable 3D projection). Also called: scatter chart, scatter graph.
|
|
75
|
+
- **Segmented Control** (`@ngrok/mantle/segmented-control`): A row of segments that switches between a few short options, like a view or an environment. A raised thumb slides to the checked segment. Also called: segmented button, view switcher, toggle group, button group radio.
|
|
76
|
+
- **Select** (`@ngrok/mantle/select`): Displays a list of options for the user to pick from, triggered by a button. Also called: dropdown, select box.
|
|
77
|
+
- **Selectable List** (`@ngrok/mantle/selectable-list`): A filterable, multi-select grid of checkbox rows. Also called: checkbox list, checklist.
|
|
78
|
+
- **Separator** (`@ngrok/mantle/separator`): Visually or semantically separates content. Also called: divider, horizontal rule, hr.
|
|
79
|
+
- **Sheet** (`@ngrok/mantle/sheet`): A container that overlays the current view from the edge of the screen. Also called: drawer, side panel, offcanvas, slide over.
|
|
80
|
+
- **Sidebar** (`@ngrok/mantle/sidebar`): A composable, collapsible app-navigation sidebar with a mobile sheet presentation and a trigger that mounts anywhere in your app shell. Also called: side nav, side navigation, navigation drawer.
|
|
81
|
+
- **Skeleton** (`@ngrok/mantle/skeleton`): Use Skeleton to show a placeholder while content is loading. Also called: shimmer, loading placeholder, content loader.
|
|
82
|
+
- **Skip to Main Link** (`@ngrok/mantle/skip-to-main-link`): A visually-hidden-until-focused "skip link" that lets keyboard users jump to the page's main content landmark. Also called: skip link, skip nav.
|
|
83
|
+
- **Slider** (`@ngrok/mantle/slider`): An input where the user selects a value from within a given range. Also called: range slider, range input.
|
|
84
|
+
- **Slot** (`@ngrok/mantle/slot`): Merges its props onto its immediate child. Also called: as child, polymorphic.
|
|
85
|
+
- **Split Button** (`@ngrok/mantle/split-button`): A button group that pairs a one-click default action with a dropdown menu of related alternatives. Also called: dropdown button, split dropdown, combo button.
|
|
86
|
+
- **Strata** (`@ngrok/mantle/strata`): A page of titled sections, each one explained beside its content: the shape of a settings page or a configuration editor. Also called: settings page, settings layout.
|
|
87
|
+
- **Switch** (`@ngrok/mantle/switch`): A form control that toggles one setting on or off. Also called: toggle, toggle switch.
|
|
88
|
+
- **Table** (`@ngrok/mantle/table`): A structured way to display data in rows and columns. Also called: html table, basic table.
|
|
89
|
+
- **Tabs** (`@ngrok/mantle/tabs`): Layered sections of content, called tab panels, that show one at a time. Also called: tab bar, tab list, tab strip.
|
|
90
|
+
- **Text Area** (`@ngrok/mantle/text-area`): A multi-line plain-text editing control. Also called: multiline input, multiline text field.
|
|
91
|
+
- **Theme** (`@ngrok/mantle/theme`): Theme primitives (ThemeProvider and FOUC prevention) for light and dark modes that follow the OS by default. Also called: theme provider, color scheme.
|
|
92
|
+
- **Theme Switcher** (`@ngrok/mantle/theme-switcher`): The canonical light/dark toggle for headers and toolbars, plus the same toggle as one item for account menus. Also called: theme toggle, dark mode toggle, color mode toggle.
|
|
93
|
+
- **Toast** (`@ngrok/mantle/toast`): A succinct message that appears temporarily. Also called: notification, snackbar, toaster, flash message.
|
|
94
|
+
- **Tooltip** (`@ngrok/mantle/tooltip`): A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it. Also called: hint.
|
|
95
|
+
- **Truncated Text** (`@ngrok/mantle/truncated-text`): Renders one long opaque value, such as a URL, a resource ID, a container image reference, or a token, on a single line and keeps its tail visible when it overflows. Also called: ellipsis, middle truncation, truncate.
|
|
96
|
+
- **Visually Hidden** (`@ngrok/mantle/visually-hidden`): Render content that screen readers announce and sighted users never see. Also called: sr only, screen reader only.
|
|
97
|
+
- **Well** (`@ngrok/mantle/well`): A recessed, inset container used to group and de-emphasize content. Also called: inset.
|
|
96
98
|
|
|
97
99
|
## Layouts
|
|
98
100
|
|
|
99
|
-
- **App Layout** (`@ngrok/mantle/app-layout`): A viewport-locked application shell: a full-width notice strip, a toolbar header, and a rounded content card whose page region is the shell's only scroll container.
|
|
100
|
-
- **Centered Layout** (`@ngrok/mantle/centered-layout`): A viewport-filling centered page flow, with utility header and footer strips around a growing, centered content region.
|
|
101
|
+
- **App Layout** (`@ngrok/mantle/app-layout`): A viewport-locked application shell: a full-width notice strip, a toolbar header, and a rounded content card whose page region is the shell's only scroll container. Also called: app shell, application shell, dashboard shell.
|
|
102
|
+
- **Centered Layout** (`@ngrok/mantle/centered-layout`): A viewport-filling centered page flow, with utility header and footer strips around a growing, centered content region. Also called: auth page, login page, sign in page.
|
|
101
103
|
|
|
102
104
|
## Hooks
|
|
103
105
|
|
|
104
106
|
- **getPrefersReducedMotion** (`@ngrok/mantle/hooks`): Imperatively reads the current `prefers-reduced-motion` preference once at the time of the call.
|
|
105
107
|
- **useBreakpoint** (`@ngrok/mantle/hooks`): The largest Tailwind breakpoint the viewport width matches, or `"default"` below `2xs`.
|
|
106
|
-
- **useCallbackRef** (`@ngrok/mantle/hooks`)
|
|
108
|
+
- **useCallbackRef** (`@ngrok/mantle/hooks`): Returns a memoized callback that always invokes the latest version of `callback`, while preserving a stable function identity across renders.
|
|
107
109
|
- **useComposedRefs** (`@ngrok/mantle/hooks`): A custom hook that composes up to three refs into a single callback ref.
|
|
108
110
|
- **useCopyToClipboard** (`@ngrok/mantle/hooks`): React hook that returns a stable async function for copying a string to the system clipboard.
|
|
109
111
|
- **useDebounce** (`@ngrok/mantle/hooks`): Returns a debounced copy of `value`: it only updates after `value` has stopped changing for `options.waitMs` milliseconds.
|
|
@@ -112,7 +114,7 @@ Full text: https://mantle.ngrok.com/llms-full.txt
|
|
|
112
114
|
- **useInertSiblings** (`@ngrok/mantle/hooks`): Sets `inert` on every other child of the element's parent while `active` is `true`, so nothing beside the element is clickable, focusable, or read by assistive technology.
|
|
113
115
|
- **useInView** (`@ngrok/mantle/hooks`): React hook that tracks whether a DOM element is visible within the viewport (or a scrollable container) using the `IntersectionObserver` API.
|
|
114
116
|
- **useIsBelowBreakpoint** (`@ngrok/mantle/hooks`): `true` while the viewport is narrower than the given breakpoint.
|
|
115
|
-
- **useIsHydrated** (`@ngrok/mantle/hooks`): Returns `false` during server rendering and the initial hydration render, then `true` on the client
|
|
117
|
+
- **useIsHydrated** (`@ngrok/mantle/hooks`): Returns `false` during server rendering and the initial hydration render, then `true` on the client, without hydration mismatches, because React uses the server snapshot for the hydration pass and re-renders once with the client snapshot afterwards.
|
|
116
118
|
- **useIsHydratedAfterPaint** (`@ngrok/mantle/hooks`): Returns `false` on the server, in the hydration render, and in the mount commit, then `true` from the next animation frame.
|
|
117
119
|
- **useIsomorphicLayoutEffect** (`@ngrok/mantle/hooks`): A drop-in replacement for `useLayoutEffect` that does not warn during server-side rendering.
|
|
118
120
|
- **useLocalStorage** (`@ngrok/mantle/hooks`): SSR-safe `useSyncExternalStore`-backed localStorage string state.
|
|
@@ -191,6 +193,7 @@ Full text: https://mantle.ngrok.com/llms-full.txt
|
|
|
191
193
|
- `@ngrok/mantle/sandbar`
|
|
192
194
|
- `@ngrok/mantle/sandboxed-on-click`
|
|
193
195
|
- `@ngrok/mantle/scatter-plot`
|
|
196
|
+
- `@ngrok/mantle/segmented-control`
|
|
194
197
|
- `@ngrok/mantle/select`
|
|
195
198
|
- `@ngrok/mantle/selectable-list`
|
|
196
199
|
- `@ngrok/mantle/separator`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{c as n}from"react/compiler-runtime";import{jsx as r}from"react/jsx-runtime";const i=i=>{let a=n(12),o,s,c;a[0]===i?(o=a[1],s=a[2],c=a[3]):({className:o,"data-slot":s,...c}=i,a[0]=i,a[1]=o,a[2]=s,a[3]=c);let l;a[4]===s?l=a[5]:(l=t(s,`main`),a[4]=s,a[5]=l);let u;a[6]===o?u=a[7]:(u=e(`focus:outline-hidden`,o),a[6]=o,a[7]=u);let d;return a[8]!==c||a[9]!==l||a[10]!==u?(d=/* @__PURE__ */ r(`main`,{...c,"data-slot":l,id:`main`,tabIndex:-1,className:u}),a[8]=c,a[9]=l,a[10]=u,a[11]=d):d=a[11],d};export{i as t};
|
package/dist/main.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Re-exports for the Main component.
|
|
3
|
+
*
|
|
4
|
+
* @see https://mantle.ngrok.com/components/primitives/main
|
|
5
|
+
*/
|
|
6
|
+
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
2
7
|
import { ComponentProps } from "react";
|
|
3
8
|
/**
|
|
4
9
|
* A focusable `<main>` landmark for the page's primary content. Renders with
|
|
@@ -16,6 +21,13 @@ import { ComponentProps } from "react";
|
|
|
16
21
|
* it on the `AppLayout.Content` card around the body. Focus then lands on an
|
|
17
22
|
* element that cannot scroll, and the keyboard user is stranded.
|
|
18
23
|
*
|
|
24
|
+
* @useWhen Mark the primary content of a page as a focusable `<main>` landmark that a skip link can
|
|
25
|
+
* move focus to.
|
|
26
|
+
*
|
|
27
|
+
* @siblings
|
|
28
|
+
* - `SkipToMainLink`: keyboard users need the link that jumps to the landmark.
|
|
29
|
+
* - `AppLayout`: the page sits in the app shell, where `AppLayout.Body` already renders the landmark.
|
|
30
|
+
*
|
|
19
31
|
* @see https://mantle.ngrok.com/components/primitives/main
|
|
20
32
|
*
|
|
21
33
|
* @example
|
package/dist/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{t as Main}from"./main-
|
|
1
|
+
export{t as Main}from"./main-CHyWYDak.js";
|