@ngrok/mantle 0.88.0 → 0.90.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 +10 -9
- package/dist/accordion.js +1 -1
- package/dist/agent.json +1530 -1
- package/dist/{alert-DCVfviBx.d.ts → alert-BzPDUaU7.d.ts} +16 -15
- package/dist/alert-DO00UiQe.js +1 -0
- package/dist/alert-ZaUBtgno.js +1 -0
- package/dist/alert-center.d.ts +7 -7
- package/dist/alert-center.js +1 -1
- package/dist/alert-dialog.d.ts +17 -16
- package/dist/alert-dialog.js +1 -1
- package/dist/alert.d.ts +1 -1
- package/dist/alert.js +1 -1
- package/dist/anchor-CgcbWEUs.js +1 -0
- package/dist/anchor.js +1 -1
- package/dist/app-layout.d.ts +1183 -45
- package/dist/app-layout.js +1 -1
- package/dist/area-chart.d.ts +41 -18
- package/dist/area-chart.js +1 -1
- package/dist/avatar.js +1 -1
- package/dist/badge.d.ts +3 -2
- package/dist/badge.js +1 -1
- package/dist/bar-chart.d.ts +37 -13
- package/dist/bar-chart.js +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/browser-only.js +1 -1
- package/dist/button-69InNC_m.js +1 -0
- package/dist/button-BMfUxs_j.js +1 -0
- package/dist/{button-DO53OA70.d.ts → button-CHoYpOzx.d.ts} +5 -4
- package/dist/{button-B52_vczK.js → button-D8rr-1AB.js} +1 -1
- package/dist/{button-crUf0hbR.d.ts → button-DL7V4bzW.d.ts} +5 -4
- package/dist/button-b2HKEIE2.js +1 -0
- package/dist/{button-B5i9n7Qp.d.ts → button-mzUR1U0Y.d.ts} +5 -4
- package/dist/button.d.ts +3 -3
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +3 -2
- package/dist/calendar.js +1 -1
- package/dist/card.d.ts +15 -7
- package/dist/card.js +1 -1
- package/dist/centered-layout.js +1 -1
- package/dist/{chart-DgaWVBqi.d.ts → chart-23KQ1ZNO.d.ts} +128 -62
- package/dist/chart-BRkJfptA.js +2 -0
- package/dist/checkbox-C3N2afhB.js +1 -0
- package/dist/checkbox.d.ts +3 -2
- package/dist/checkbox.js +1 -1
- package/dist/{choice-PESu-9s8.d.ts → choice-BCiyqLgO.d.ts} +12 -11
- package/dist/choice-DQmecLfy.js +1 -0
- package/dist/choice.d.ts +1 -1
- package/dist/choice.js +1 -1
- package/dist/code-block-4Esx_gV-.js +12 -0
- package/dist/code-block.d.ts +17 -16
- package/dist/code-block.js +6 -6
- package/dist/code-block_highlight-utils.js +1 -1
- package/dist/code.d.ts +2 -1
- package/dist/code.js +1 -1
- package/dist/combobox.d.ts +15 -14
- package/dist/combobox.js +1 -1
- package/dist/command.d.ts +13 -13
- package/dist/command.js +1 -1
- package/dist/cx-CK7o_rVv.js +1 -0
- package/dist/cx.js +1 -1
- package/dist/data-table.d.ts +32 -31
- package/dist/data-table.js +1 -1
- package/dist/description-list.d.ts +6 -6
- package/dist/description-list.js +1 -1
- package/dist/dialog-CaGJD02w.js +1 -0
- package/dist/{dialog-DXpqpdJj.d.ts → dialog-DQdeqvq-.d.ts} +28 -15
- package/dist/dialog.d.ts +1 -1
- package/dist/dialog.js +1 -1
- package/dist/{dropdown-menu-BloQKE_y.d.ts → dropdown-menu-Cef0Cz2B.d.ts} +17 -17
- package/dist/dropdown-menu-CutWQ0bl.js +1 -0
- package/dist/dropdown-menu-DMA8dGxZ.d.ts +1 -0
- package/dist/dropdown-menu.d.ts +2 -2
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.d.ts +14 -6
- package/dist/empty.js +1 -1
- package/dist/field.d.ts +16 -15
- package/dist/field.js +1 -1
- package/dist/flag.d.ts +4 -3
- package/dist/flag.js +1 -1
- package/dist/hooks.d.ts +251 -1
- package/dist/hooks.js +1 -1
- package/dist/hover-card.d.ts +5 -4
- package/dist/hover-card.js +1 -1
- package/dist/icon-BudQMD2S.js +1 -0
- package/dist/icon-kK0c-POG.js +1 -0
- package/dist/{icon-w0HUe7tr.d.ts → icon-r2NvfTWW.d.ts} +3 -2
- package/dist/{icon-BmJ57Tgh.d.ts → icon-ucVgZeXn.d.ts} +3 -2
- package/dist/icon.d.ts +2 -2
- package/dist/icon.js +1 -1
- package/dist/icons-CAtjMNti.js +1 -0
- package/dist/{icons-Bu-2boul.js → icons-CH3tD_wq.js} +1 -1
- package/dist/icons-CSwTVV2m.js +1 -0
- package/dist/icons.js +1 -1
- package/dist/in-view-Dxv_GrUU.js +1 -0
- package/dist/input-D_DjD9lT.js +1 -0
- package/dist/{input-DpnC3Xgj.d.ts → input-bbB1tC0h.d.ts} +3 -2
- package/dist/input.d.ts +5 -4
- package/dist/input.js +1 -1
- package/dist/kbd-CLHsJ99p.js +1 -0
- package/dist/kbd.d.ts +2 -1
- package/dist/kbd.js +1 -1
- package/dist/label-5T8i7I4X.js +1 -0
- package/dist/{label-Bnfe9YJ6.d.ts → label-C-KbNls8.d.ts} +3 -2
- package/dist/label.d.ts +1 -1
- package/dist/label.js +1 -1
- package/dist/{layer-container-R7aux3n8.js → layer-container-DLf-6eBz.js} +1 -1
- package/dist/layer-container.js +1 -1
- package/dist/line-chart.d.ts +40 -15
- package/dist/line-chart.js +1 -1
- package/dist/list-DOVZoz9t.js +1 -0
- package/dist/list.d.ts +3 -2
- package/dist/list.js +1 -1
- package/dist/live-region-DQ1QLv3L.js +1 -0
- package/dist/live-region.d.ts +3 -2
- package/dist/live-region.js +1 -1
- package/dist/llms.txt +118 -2
- package/dist/{main-Dv2zuT_b.js → main-CC1L9IsH.js} +1 -1
- package/dist/main.js +1 -1
- package/dist/mantle.css +12 -0
- package/dist/media-object.js +1 -1
- package/dist/migrations/0002-data-table-action-header.yml +526 -0
- package/dist/migrations/0003-dialog-footer-dom-order.yml +271 -0
- package/dist/migrations/0004-priority-to-intent.yml +1728 -0
- package/dist/migrations/0005-field-item-owns-control-id.yml +234 -0
- package/dist/migrations/0006-data-table-tanstack-v9.yml +423 -0
- package/dist/migrations/0008-tabs-separator.yml +1212 -0
- package/dist/migrations/0009-chart-root-mode.yml +871 -0
- package/dist/multi-select.d.ts +23 -22
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.d.ts +9 -8
- package/dist/otp-input.js +1 -1
- package/dist/pagination.d.ts +9 -8
- package/dist/pagination.js +1 -1
- package/dist/{popover-Cco1nw8I.d.ts → popover-Dvls7-j4.d.ts} +5 -4
- package/dist/popover-oQDUvcZ2.js +1 -0
- package/dist/popover.d.ts +1 -1
- package/dist/popover.js +1 -1
- package/dist/primitive-AGoxSJBI.js +1 -0
- package/dist/progress.d.ts +9 -8
- package/dist/progress.js +1 -1
- package/dist/qr-code.d.ts +9 -8
- package/dist/qr-code.js +1 -1
- package/dist/radio-group.d.ts +19 -18
- package/dist/radio-group.js +1 -1
- package/dist/sandbar.d.ts +7 -7
- package/dist/sandbar.js +1 -1
- package/dist/{sandboxed-on-click-BLvvSqOP.js → sandboxed-on-click-C7pPu-2M.js} +1 -1
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/scatter-plot.d.ts +39 -14
- package/dist/scatter-plot.js +1 -1
- package/dist/select-DcL0-duV.js +1 -0
- package/dist/{select-BITJP7I5.d.ts → select-DlohFa54.d.ts} +3 -3
- package/dist/select.d.ts +1 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list.d.ts +16 -15
- package/dist/selectable-list.js +1 -1
- package/dist/{separator-Bo4nY_3M.d.ts → separator-BWGjCIl7.d.ts} +11 -3
- package/dist/separator-DvPe27fH.js +1 -0
- package/dist/separator.d.ts +1 -1
- package/dist/separator.js +1 -1
- package/dist/sheet-H8zvhSuA.js +1 -0
- package/dist/sheet.d.ts +13 -12
- package/dist/sheet.js +1 -1
- package/dist/sidebar.d.ts +163 -102
- package/dist/sidebar.js +1 -1
- package/dist/skeleton-zfqoDAxT.js +1 -0
- package/dist/skeleton.d.ts +3 -2
- package/dist/skeleton.js +1 -1
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slider.d.ts +3 -2
- package/dist/slider.js +1 -1
- package/dist/{slot-BsvE2ntj.js → slot-DdYN1L1C.js} +1 -1
- package/dist/{slot-DdgxmuI5.d.ts → slot-Q996Hqk9.d.ts} +1 -1
- package/dist/slot.d.ts +1 -1
- package/dist/slot.js +1 -1
- package/dist/split-button.d.ts +6 -5
- package/dist/split-button.js +1 -1
- package/dist/strata.d.ts +544 -0
- package/dist/strata.js +1 -0
- package/dist/switch.d.ts +3 -2
- package/dist/switch.js +1 -1
- package/dist/{table-DEI-qvSC.d.ts → table-BhzITa19.d.ts} +10 -9
- package/dist/table-DBbKqOVq.js +1 -0
- package/dist/table.d.ts +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +2 -2
- package/dist/tabs.js +1 -1
- package/dist/text-area.d.ts +3 -2
- package/dist/text-area.js +1 -1
- package/dist/theme-6Q65C1Rx.js +1 -0
- package/dist/theme-switcher.d.ts +3 -3
- package/dist/theme-switcher.js +1 -1
- package/dist/theme.js +1 -1
- package/dist/toast.d.ts +10 -9
- package/dist/toast.js +1 -1
- package/dist/{tooltip-nuUCoqq8.d.ts → tooltip-CngH7Kl6.d.ts} +7 -6
- package/dist/tooltip-NhYXqStK.js +1 -0
- package/dist/tooltip.d.ts +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/truncated-text.d.ts +138 -0
- package/dist/truncated-text.js +1 -0
- package/dist/types.js +1 -1
- package/dist/use-breakpoint--mo7kr9d.js +1 -0
- package/dist/use-is-hydrated-after-paint-r9Cl2mGp.js +1 -0
- package/dist/use-prefers-reduced-motion-DimzRx-M.js +1 -0
- package/dist/use-swipe-to-dismiss-Cj-AayFd.js +1 -0
- package/dist/utils.js +1 -1
- package/dist/visually-hidden.d.ts +2 -1
- package/dist/visually-hidden.js +1 -1
- package/dist/well.d.ts +10 -2
- package/dist/well.js +1 -1
- package/package.json +17 -15
- package/dist/alert-OP_-aGJD.js +0 -1
- package/dist/anchor-BnMhJYS4.js +0 -1
- package/dist/button-BFpCB99R.js +0 -1
- package/dist/button-Dij5vCQG.js +0 -1
- package/dist/button-pwkdtR3U.js +0 -1
- package/dist/chart-aZLMj4xx.js +0 -2
- package/dist/checkbox-DbJSqSNN.js +0 -1
- package/dist/choice-SRyLguqU.js +0 -1
- package/dist/code-block-BE3Q0iAo.js +0 -12
- package/dist/cx-0HCjnNv1.js +0 -1
- package/dist/dialog-HIdb5d3I.js +0 -1
- package/dist/dropdown-menu-BR_AQNMj.js +0 -1
- package/dist/dropdown-menu-Dlpb7600.d.ts +0 -1
- package/dist/icon-BT8FnkkJ.js +0 -1
- package/dist/icon-U24NfYv7.js +0 -1
- package/dist/icons-BQRcOU6J.js +0 -1
- package/dist/icons-C3rVfpx9.js +0 -1
- package/dist/in-view-T_AAYaaF.js +0 -1
- package/dist/input-yq0jLE4e.js +0 -1
- package/dist/kbd-CJ8hNZfS.js +0 -1
- package/dist/label-BAy0Mg59.js +0 -1
- package/dist/list-BleZ-43e.js +0 -1
- package/dist/live-region-B2vJRvPH.js +0 -1
- package/dist/popover-BJ5XNwzD.js +0 -1
- package/dist/primitive-w3wFk2La.js +0 -1
- package/dist/select-CUWLEeuf.js +0 -1
- package/dist/separator-D98be0gY.js +0 -1
- package/dist/sheet-B5x8EO9Y.js +0 -1
- package/dist/skeleton-bVDP8BzY.js +0 -1
- package/dist/table-D2jh52KA.js +0 -1
- package/dist/theme-C1kFFdIk.js +0 -1
- package/dist/tooltip-H03l7E4Y.js +0 -1
- package/dist/use-is-hydrated-after-paint-Drj0lNi4.js +0 -1
- package/dist/use-prefers-reduced-motion-Cj9tJ181.js +0 -1
- /package/dist/{types-D85fCNV3.js → css-properties-D85fCNV3.js} +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
|
|
1
2
|
import { ComponentProps } from "react";
|
|
2
3
|
//#region src/components/label/label.d.ts
|
|
3
4
|
type LabelProps = ComponentProps<"label"> & {
|
|
@@ -5,7 +6,7 @@ type LabelProps = ComponentProps<"label"> & {
|
|
|
5
6
|
* If set, the label will appear disabled.
|
|
6
7
|
*/
|
|
7
8
|
disabled?: boolean;
|
|
8
|
-
};
|
|
9
|
+
} & WithDataSlot;
|
|
9
10
|
/**
|
|
10
11
|
* A caption for a form control — input, checkbox, radio, switch, select.
|
|
11
12
|
* Renders a native `<label>`. Pair every form control with a `Label` so the
|
|
@@ -68,6 +69,6 @@ type LabelProps = ComponentProps<"label"> & {
|
|
|
68
69
|
* </Label>
|
|
69
70
|
* ```
|
|
70
71
|
*/
|
|
71
|
-
declare const Label: ({ "aria-disabled": _ariaDisabled, children, className, disabled, onMouseDown, ref, ...props }: LabelProps) => import("react").JSX.Element;
|
|
72
|
+
declare const Label: ({ "data-slot": dataSlot, "aria-disabled": _ariaDisabled, children, className, disabled, onMouseDown, ref, ...props }: LabelProps) => import("react").JSX.Element;
|
|
72
73
|
//#endregion
|
|
73
74
|
export { Label as t };
|
package/dist/label.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Label } from "./label-
|
|
1
|
+
import { t as Label } from "./label-C-KbNls8.js";
|
|
2
2
|
export { Label };
|
package/dist/label.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{t as Label}from"./label-5T8i7I4X.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./compose-refs-sFdxsL7k.js";import{c as t}from"react/compiler-runtime";import{createContext as n,useContext as r,useState as i}from"react";import{jsx as a}from"react/jsx-runtime";const o=n(null);function s(){return r(o)}function c(n){let r=t(11),s,c,l;r[0]===n?(s=r[1],c=r[2],l=r[3]):({children:s,ref:l,...c}=n,r[0]=n,r[1]=s,r[2]=c,r[3]=l);let[u,d]=i(null),f=e(l,d),p;r[4]!==s||r[5]!==u?(p
|
|
1
|
+
import{n as e}from"./compose-refs-sFdxsL7k.js";import{c as t}from"react/compiler-runtime";import{createContext as n,useContext as r,useState as i}from"react";import{jsx as a}from"react/jsx-runtime";const o=n(null);function s(){return r(o)}function c(n){let r=t(11),s,c,l;r[0]===n?(s=r[1],c=r[2],l=r[3]):({children:s,ref:l,...c}=n,r[0]=n,r[1]=s,r[2]=c,r[3]=l);let[u,d]=i(null),f=e(l,d),p;r[4]!==s||r[5]!==u?(p=/* @__PURE__ */ a(o.Provider,{value:u,children:s}),r[4]=s,r[5]=u,r[6]=p):p=r[6];let m;return r[7]!==f||r[8]!==c||r[9]!==p?(m=/* @__PURE__ */ a(`div`,{ref:f,...c,children:p}),r[7]=f,r[8]=c,r[9]=p,r[10]=m):m=r[10],m}export{o as n,s as r,c as t};
|
package/dist/layer-container.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{t as LayerContainer,n as LayerContainerContext,r as useLayerContainer}from"./layer-container-DLf-6eBz.js";
|
package/dist/line-chart.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as CurveKind, a as GridPrimitiveProps, c as TooltipPrimitiveProps, g as ContinuousXScale, h as ChartSeriesSlot, i as CopyButtonPrimitiveProps, l as XAxisPrimitiveProps, m as ChartDatumEvent, n as ChartMode, o as LegendPrimitiveProps, p as ChartDatum, r as ChartRootBaseProps, s as ReferenceLinePrimitiveProps, t as ChartAccessibilityProps, u as YAxisPrimitiveProps, v as PointShape, y as SeriesColor } from "./chart-23KQ1ZNO.js";
|
|
2
2
|
//#region src/components/line-chart/line-chart.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Props for {@link LineChart.Root}. Lines encode value by vertical position,
|
|
5
5
|
* not length from a baseline, so the full y domain stays overridable via
|
|
6
6
|
* `yDomain` — and lines never stack, so there is no `stacked` prop.
|
|
7
7
|
*/
|
|
8
|
-
type LineChartRootProps<TDatum extends ChartDatum = ChartDatum> = Omit<ChartRootBaseProps, "stacked"> & ChartAccessibilityProps & {
|
|
8
|
+
type LineChartRootProps<TDatum extends ChartDatum = ChartDatum, TMode extends ChartMode = "interactive"> = Omit<ChartRootBaseProps, "stacked"> & ChartAccessibilityProps<TMode> & {
|
|
9
9
|
/** Rows of data; each `LineChart.Line` reads one numeric key per row. */
|
|
10
10
|
data: readonly TDatum[];
|
|
11
11
|
/** The key of each row's x value. */
|
|
@@ -106,19 +106,41 @@ type LineChartCopyButtonProps = CopyButtonPrimitiveProps;
|
|
|
106
106
|
* The root of a line chart: owns the data, the scales, the canvas renderer,
|
|
107
107
|
* and the entire interaction contract (a crosshair snapped to the nearest x
|
|
108
108
|
* with a tooltip reading every series, keyboard stepping with polite
|
|
109
|
-
* announcements, an sr-only data table, Enter/Space +
|
|
110
|
-
* Rendering is canvas with min/max decimation, so series
|
|
111
|
-
* smooth. Compose the chrome and series parts as
|
|
109
|
+
* announcements, an sr-only description, an sr-only data table, Enter/Space +
|
|
110
|
+
* click activation). Rendering is canvas with min/max decimation, so series
|
|
111
|
+
* of 100k+ points stay smooth. Compose the chrome and series parts as
|
|
112
|
+
* children.
|
|
113
|
+
*
|
|
114
|
+
* A Root mounts dormant: a shell of the plot, the named overlay, and its
|
|
115
|
+
* sr-only description. It builds its canvas, its hover layers, and its engine
|
|
116
|
+
* once it comes within one viewport of the visible area, takes focus, or
|
|
117
|
+
* prints (on-screen charts first, a few milliseconds at a time), and it mounts
|
|
118
|
+
* the sr-only data table once focus lands inside it. A list of charts pays
|
|
119
|
+
* for the ones a reader can see, and a page of sparklines holds no hidden
|
|
120
|
+
* tables until a reader asks for one.
|
|
112
121
|
*
|
|
113
122
|
* The Root's own subtree is addressable by slot: `line-chart` on the wrapper,
|
|
114
123
|
* then `line-chart-plot`, `line-chart-canvas`, `line-chart-crosshair`,
|
|
115
|
-
* `line-chart-hover-band`, `line-chart-markers`, `line-chart-tooltip`,
|
|
116
|
-
* `line-chart-
|
|
117
|
-
*
|
|
124
|
+
* `line-chart-hover-band`, `line-chart-markers`, `line-chart-tooltip`,
|
|
125
|
+
* `line-chart-description`, and, once focus lands inside the chart,
|
|
126
|
+
* `line-chart-data-table`. A line chart shows the crosshair and one marker
|
|
127
|
+
* dot per series, and never the band. The canvas and the three layers are
|
|
128
|
+
* engine-owned: absent from server HTML and from a dormant chart, inserted at
|
|
129
|
+
* activation (near the viewport, on focus, or before print). A static or
|
|
130
|
+
* decorative chart inserts the canvas alone. The tooltip
|
|
131
|
+
* surface mounts on the first hover or keyboard step and stays.
|
|
118
132
|
* Each hover dot carries `chart-active-point` plus a `data-shape` of
|
|
119
133
|
* `"circle"`, `"square"`, `"triangle"`, `"diamond"`, `"triangle-down"`,
|
|
120
134
|
* `"plus"`, `"cross"`, or `"star"`, naming the glyph its series wears.
|
|
121
135
|
*
|
|
136
|
+
* **Data attributes:**
|
|
137
|
+
*
|
|
138
|
+
* | Data Attribute | Value | Description |
|
|
139
|
+
* | --- | --- | --- |
|
|
140
|
+
* | `data-slot` | `"line-chart-description"` | The `sr-only` description the overlay's `aria-describedby` points at: the chart kind, the point count, the x range, the series labels, and, on an interactive chart, the keyboard instructions. Omitted when `mode="decorative"`. |
|
|
141
|
+
* | `data-slot` | `"line-chart-data-table"` | The `sr-only` data table. Mounts once focus lands inside the chart (`data-state` flips to `"engaged"`) and stays. Interactive charts only. |
|
|
142
|
+
* | `data-state` | `"dormant"` \| `"engaged"` | On the Root. Flips to `"engaged"` once focus lands inside the chart, and never flips back. The data table mounts with it. Visibility paints the chart but never flips it. Interactive charts only. |
|
|
143
|
+
*
|
|
122
144
|
* @see https://mantle.ngrok.com/components/charts/line-chart#linechartroot
|
|
123
145
|
*
|
|
124
146
|
* @example
|
|
@@ -140,7 +162,7 @@ type LineChartCopyButtonProps = CopyButtonPrimitiveProps;
|
|
|
140
162
|
* </LineChart.Root>
|
|
141
163
|
* ```
|
|
142
164
|
*/
|
|
143
|
-
declare const Root: <TDatum extends ChartDatum = ChartDatum>(props: LineChartRootProps<TDatum>) => import("react").JSX.Element;
|
|
165
|
+
declare const Root: <TDatum extends ChartDatum = ChartDatum, TMode extends ChartMode = "interactive">(props: LineChartRootProps<TDatum, TMode>) => import("react").JSX.Element;
|
|
144
166
|
/**
|
|
145
167
|
* One line series. Renders nothing itself — it registers the series with the
|
|
146
168
|
* chart, which paints it on canvas. Compose one `Line` per series; `null` and
|
|
@@ -329,10 +351,13 @@ declare const CopyButton: (props: LineChartCopyButtonProps) => import("react").J
|
|
|
329
351
|
* A canvas-rendered line chart for trends over a continuous x — time above
|
|
330
352
|
* all. Series colors come from the theme's validated `--color-chart-*`
|
|
331
353
|
* tokens; lines keep a fixed slot color for the chart's lifetime even as
|
|
332
|
-
* other series are filtered in and out. Interaction
|
|
333
|
-
* the nearest x with an every-series
|
|
334
|
-
* announcements, and an sr-only
|
|
335
|
-
*
|
|
354
|
+
* other series are filtered in and out. Interaction ships with `Root`
|
|
355
|
+
* unconditionally: a crosshair snapped to the nearest x with an every-series
|
|
356
|
+
* tooltip, keyboard stepping, aria-live announcements, and an sr-only
|
|
357
|
+
* description. A Root paints and allocates its canvas once it comes within
|
|
358
|
+
* one viewport of the visible area or takes focus, and it mounts its sr-only
|
|
359
|
+
* data table once focus lands inside it. Min/max decimation keeps 100k+ point
|
|
360
|
+
* series smooth.
|
|
336
361
|
*
|
|
337
362
|
* **CSS variables (public API):**
|
|
338
363
|
*
|
|
@@ -345,7 +370,7 @@ declare const CopyButton: (props: LineChartCopyButtonProps) => import("react").J
|
|
|
345
370
|
* `LineChart.Line` sets one series and takes any CSS color. To restyle a slot itself,
|
|
346
371
|
* redeclare its token on `Root` —
|
|
347
372
|
* `className="[--color-chart-1:var(--color-brand)]"`. The engine resolves every
|
|
348
|
-
* token
|
|
373
|
+
* token from `Root`'s computed style, so a declaration scoped there wins for
|
|
349
374
|
* that chart and leaves every other chart on the page alone.
|
|
350
375
|
*
|
|
351
376
|
* @see https://mantle.ngrok.com/components/charts/line-chart
|
|
@@ -556,4 +581,4 @@ declare const LineChart: {
|
|
|
556
581
|
readonly CopyButton: typeof CopyButton;
|
|
557
582
|
};
|
|
558
583
|
//#endregion
|
|
559
|
-
export { type ChartDatumEvent, LineChart, type LineChartCopyButtonProps, type LineChartGridProps, type LineChartLegendProps, type LineChartLineProps, type LineChartReferenceLineProps, type LineChartRootProps, type LineChartTooltipProps, type LineChartXAxisProps, type LineChartYAxisProps };
|
|
584
|
+
export { type ChartDatumEvent, type ChartMode, LineChart, type LineChartCopyButtonProps, type LineChartGridProps, type LineChartLegendProps, type LineChartLineProps, type LineChartReferenceLineProps, type LineChartRootProps, type LineChartTooltipProps, type LineChartXAxisProps, type LineChartYAxisProps };
|
package/dist/line-chart.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"./chart-
|
|
1
|
+
import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"./chart-BRkJfptA.js";import{c as l}from"react/compiler-runtime";import{jsx as u}from"react/jsx-runtime";const d={Root:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ u(o,{kind:`line`,componentName:`LineChart`,slotName:`line-chart`,...e}),t[0]=e,t[1]=n),n},Line:e=>a(`LineChart.Line`,`line`,e),Grid:e=>n(`LineChart.Grid`,e),XAxis:e=>t(`LineChart.XAxis`,e),YAxis:e=>r(`LineChart.YAxis`,e),ReferenceLine:t=>e(`LineChart.ReferenceLine`,t),Tooltip:e=>s(`LineChart.Tooltip`,e),Legend:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ u(i,{partName:`LineChart.Legend`,slotName:`line-chart`,...e}),t[0]=e,t[1]=n),n},CopyButton:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ u(c,{partName:`LineChart.CopyButton`,slotName:`line-chart`,...e}),t[0]=e,t[1]=n),n}};export{d as LineChart};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./compose-refs-sFdxsL7k.js";import{t}from"./cx-CK7o_rVv.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{t as r}from"./slot-DdYN1L1C.js";import{t as i}from"./interactive-target-BXScNeOr.js";import{c as a}from"react/compiler-runtime";import{Children as o,createContext as s,isValidElement as c,useContext as l,useEffect as u,useId as d,useRef as f,useState as p}from"react";import m from"tiny-invariant";import{jsx as h}from"react/jsx-runtime";import{useVirtualizer as g}from"@tanstack/react-virtual";const _=s(null);function v(e){let t=l(_);return m(t,`List.${e} must be composed inside List.Root / List.VirtualRoot (or a SelectableList viewport).`),t}const y=s(null),b=s(null);function x(e){return c(e)?e.props.disabled===!0:!1}function S({start:e,step:t,count:n,isItemDisabled:r}){for(let i=e;i>=0&&i<n;i+=t)if(!r(i))return i;return-1}const C=`a[href]:not([tabindex="-1"]), button:not(:disabled):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])`;function w(e){let t=e.matches(C)?e:e.querySelector(C);return t instanceof HTMLElement?t:null}function T(e){let t=e instanceof Element?e.closest(`[data-index]`):null;if(t==null)return null;let n=Number(t.getAttribute(`data-index`));return!Number.isInteger(n)||n<0?null:{item:t,index:n}}function E({count:e,isItemDisabled:t,focusItemAt:n}){return{onKeyDown:r=>{if(r.target instanceof HTMLElement&&(r.target.isContentEditable||r.target.tagName===`INPUT`||r.target.tagName===`TEXTAREA`||r.target.tagName===`SELECT`)||r.altKey||r.ctrlKey||r.metaKey)return;let i=T(r.target);if(i==null)return;let a=-1,o=1;switch(r.key){case`ArrowDown`:o=1,a=S({start:i.index+1,step:o,count:e,isItemDisabled:t});break;case`ArrowUp`:o=-1,a=S({start:i.index-1,step:o,count:e,isItemDisabled:t});break;case`Home`:o=1,a=S({start:0,step:o,count:e,isItemDisabled:t});break;case`End`:o=-1,a=S({start:e-1,step:o,count:e,isItemDisabled:t});break;default:return}r.preventDefault(),a>=0&&a!==i.index&&n(a,o)}}}function D(e){let t=a(41),{count:n,enabled:r,isItemDisabled:o,onActivate:s,itemId:c,scrollToIndex:l}=e,[d,m]=p(-1),h=f(!1),g=d>=n?n-1:d,_,v;if(t[0]!==d||t[1]!==n?(_=()=>{d>=n&&m(n-1)},v=[d,n],t[0]=d,t[1]=n,t[2]=_,t[3]=v):(_=t[2],v=t[3]),u(_,v),!r){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e={activeIndex:-1,collectionProps:{}},t[4]=e):e=t[4],e}let y;t[5]===o?y=t[6]:(y=e=>o?.(e)??!1,t[5]=o,t[6]=y);let b=y,x;t[7]!==n||t[8]!==b?(x=(e,t)=>S({start:e,step:t,count:n,isItemDisabled:b}),t[7]=n,t[8]=b,t[9]=x):x=t[9];let C=x,w;t[10]===l?w=t[11]:(w=e=>{e<0||(m(e),l(e))},t[10]=l,t[11]=w);let E=w,D;t[12]!==g||t[13]!==c?(D=g>=0?c(g):void 0,t[12]=g,t[13]=c,t[14]=D):D=t[14];let O;t[15]===b?O=t[16]:(O=e=>{let t=T(e.target);t!=null&&!b(t.index)?(m(t.index),h.current=!1):h.current=!0},t[15]=b,t[16]=O);let k;t[17]!==b||t[18]!==s?(k=e=>{if(e.defaultPrevented)return;let t=T(e.target);t==null||b(t.index)||i(e.target,t.item)||(m(t.index),s?.(t.index))},t[17]=b,t[18]=s,t[19]=k):k=t[19];let A;t[20]!==n||t[21]!==C||t[22]!==b?(A=e=>{if(e.target!==e.currentTarget){let t=T(e.target);t!=null&&!b(t.index)&&m(t.index),e.target instanceof HTMLElement&&e.target.tabIndex>=0||e.currentTarget.focus({preventScroll:!0}),h.current=!1;return}let t=h.current;h.current=!1,n>0&&!t&&m(e=>e<0?C(0,1):e)},t[20]=n,t[21]=C,t[22]=b,t[23]=A):A=t[23];let j;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(j=e=>{e.currentTarget.contains(e.relatedTarget)||(m(-1),h.current=!1)},t[24]=j):j=t[24];let M;t[25]!==E||t[26]!==g||t[27]!==n||t[28]!==C||t[29]!==b||t[30]!==s?(M=e=>{if(e.target===e.currentTarget&&!(e.altKey||e.ctrlKey||e.metaKey)){h.current=!1;bb104:switch(e.key){case`ArrowDown`:e.preventDefault(),E(C(g<0?0:g+1,1));break bb104;case`ArrowUp`:e.preventDefault(),E(g<0?C(0,1):C(g-1,-1));break bb104;case`Home`:e.preventDefault(),E(C(0,1));break bb104;case`End`:e.preventDefault(),E(C(n-1,-1));break bb104;case` `:case`Enter`:!e.repeat&&g>=0&&!b(g)&&(e.preventDefault(),s?.(g));break bb104}}},t[25]=E,t[26]=g,t[27]=n,t[28]=C,t[29]=b,t[30]=s,t[31]=M):M=t[31];let N;t[32]!==M||t[33]!==D||t[34]!==O||t[35]!==k||t[36]!==A?(N={tabIndex:0,"aria-activedescendant":D,onMouseDown:O,onClick:k,onFocus:A,onBlur:j,onKeyDown:M},t[32]=M,t[33]=D,t[34]=O,t[35]=k,t[36]=A,t[37]=N):N=t[37];let P;return t[38]!==g||t[39]!==N?(P={activeIndex:g,collectionProps:N},t[38]=g,t[39]=N,t[40]=P):P=t[40],P}function O(e){let t=a(25),{count:n,focusItemAt:r,isItemDisabled:i,onActivate:o,itemId:s,scrollToIndex:c,semantics:l}=e,u=d(),f;t[0]===l?f=t[1]:(f={semantics:l},t[0]=l,t[1]=f);let p=f,m;t[2]!==u||t[3]!==s?(m=s??(e=>`${u}-item-${e}`),t[2]=u,t[3]=s,t[4]=m):m=t[4];let h=m,g=l===`grid`,_;t[5]!==n||t[6]!==i||t[7]!==o||t[8]!==h||t[9]!==c||t[10]!==g?(_={count:n,enabled:g,isItemDisabled:i,onActivate:o,itemId:h,scrollToIndex:c},t[5]=n,t[6]=i,t[7]=o,t[8]=h,t[9]=c,t[10]=g,t[11]=_):_=t[11];let{activeIndex:v,collectionProps:y}=D(_),b=s==null?h:null,x;t[12]!==v||t[13]!==b?(x={activeIndex:v,stampItemId:b},t[12]=v,t[13]=b,t[14]=x):x=t[14];let S=x,C;t[15]!==n||t[16]!==r||t[17]!==y||t[18]!==i||t[19]!==l?(C=l===`list`?E({count:n,isItemDisabled:i,focusItemAt:r}):y,t[15]=n,t[16]=r,t[17]=y,t[18]=i,t[19]=l,t[20]=C):C=t[20];let w=C,T;return t[21]!==w||t[22]!==S||t[23]!==p?(T={collectionProps:w,gridNav:S,listContext:p},t[21]=w,t[22]=S,t[23]=p,t[24]=T):T=t[24],T}function k(e){let r=a(26),{"aria-label":i,"aria-labelledby":o,"aria-multiselectable":s,children:c,className:l,collectionProps:u,gridNav:d,listContext:f,viewportProps:p,ref:m}=e,g,v;r[0]===p?(g=r[1],v=r[2]):({"data-slot":g,...v}=p,r[0]=p,r[1]=g,r[2]=v);let y;r[3]===g?y=r[4]:(y=n(g,`list`),r[3]=g,r[4]=y);let x;r[5]===l?x=r[6]:(x=t(`border-popover bg-popover scrollbar overscroll-none overflow-x-hidden overflow-y-auto rounded-md border p-1`,l),r[5]=l,r[6]=x);let S=f.semantics===`grid`?`grid`:`list`,C;r[7]!==i||r[8]!==o||r[9]!==s||r[10]!==c||r[11]!==u||r[12]!==S?(C=/* @__PURE__ */ h(`div`,{"data-slot":`list-collection`,role:S,"aria-label":i,"aria-labelledby":o,"aria-multiselectable":s,className:`relative flex w-full flex-col gap-px outline-hidden`,...u,children:c}),r[7]=i,r[8]=o,r[9]=s,r[10]=c,r[11]=u,r[12]=S,r[13]=C):C=r[13];let w;r[14]!==m||r[15]!==y||r[16]!==x||r[17]!==C||r[18]!==v?(w=/* @__PURE__ */ h(`div`,{ref:m,"data-slot":y,className:x,...v,children:C}),r[14]=m,r[15]=y,r[16]=x,r[17]=C,r[18]=v,r[19]=w):w=r[19];let T;r[20]!==d||r[21]!==w?(T=/* @__PURE__ */ h(b.Provider,{value:d,children:w}),r[20]=d,r[21]=w,r[22]=T):T=r[22];let E;return r[23]!==f||r[24]!==T?(E=/* @__PURE__ */ h(_.Provider,{value:f,children:T}),r[23]=f,r[24]=T,r[25]=E):E=r[25],E}const A=i=>{let o=a(43),s,c,u,d,f,p,m,g,_;o[0]===i?(s=o[1],c=o[2],u=o[3],d=o[4],f=o[5],p=o[6],m=o[7],g=o[8],_=o[9]):({"data-slot":d,asChild:s,children:c,className:u,disabled:g,ref:p,selected:_,style:m,...f}=i,o[0]=i,o[1]=s,o[2]=c,o[3]=u,o[4]=d,o[5]=f,o[6]=p,o[7]=m,o[8]=g,o[9]=_);let x=g!==void 0&&g,S=_!==void 0&&_,{semantics:C}=v(`Item`),w=l(y),T=l(b),E=C===`grid`,D=s?r:`div`,O=w?.placement??null,k=w?.index,A=E&&T!=null&&k!=null&&T.activeIndex===k,j=O?.measureRef??null,M=e(p,j),N;o[10]===d?N=o[11]:(N=n(d,`list-item`),o[10]=d,o[11]=N);let P;o[12]!==T||o[13]!==k||o[14]!==E||o[15]!==f?(P=E&&k!=null&&T?.stampItemId!=null?T.stampItemId(k):f.id,o[12]=T,o[13]=k,o[14]=E,o[15]=f,o[16]=P):P=o[16];let F=S?`selected`:`unselected`,I=x||void 0,L=A||void 0,R=E?`row`:`listitem`,z=E?S:void 0,B=E&&x?!0:f[`aria-disabled`],V=E?O?.posInSet:void 0,H=E?void 0:O?.posInSet,U=E?void 0:O?.setSize,W=!x&&`hover:bg-active-menu-item hover:data-[state=selected]:bg-active-selected-menu-item`,G=!E&&!x&&`has-[:focus-visible]:bg-active-menu-item has-[:focus-visible]:data-[state=selected]:bg-active-selected-menu-item`,K;o[17]!==u||o[18]!==W||o[19]!==G?(K=t(`rounded-md data-[state=selected]:bg-selected-menu-item data-[active]:bg-active-menu-item data-[active]:data-[state=selected]:bg-active-selected-menu-item`,W,G,u),o[17]=u,o[18]=W,o[19]=G,o[20]=K):K=o[20];let q;o[21]!==O||o[22]!==m?(q=O?{...m,...O.style}:m,o[21]=O,o[22]=m,o[23]=q):q=o[23];let J;return o[24]!==D||o[25]!==c||o[26]!==M||o[27]!==k||o[28]!==f||o[29]!==B||o[30]!==V||o[31]!==H||o[32]!==U||o[33]!==K||o[34]!==q||o[35]!==N||o[36]!==P||o[37]!==F||o[38]!==I||o[39]!==L||o[40]!==R||o[41]!==z?(J=/* @__PURE__ */ h(D,{ref:M,"data-slot":N,...f,id:P,"data-index":k,"data-state":F,"data-disabled":I,"data-active":L,role:R,"aria-selected":z,"aria-disabled":B,"aria-rowindex":V,"aria-posinset":H,"aria-setsize":U,className:K,style:q,children:c}),o[24]=D,o[25]=c,o[26]=M,o[27]=k,o[28]=f,o[29]=B,o[30]=V,o[31]=H,o[32]=U,o[33]=K,o[34]=q,o[35]=N,o[36]=P,o[37]=F,o[38]=I,o[39]=L,o[40]=R,o[41]=z,o[42]=J):J=o[42],J};function j(e){let t=a(5),{children:n,index:r}=e,i;t[0]===r?i=t[1]:(i={index:r,placement:null},t[0]=r,t[1]=i);let o=i,s;return t[2]!==n||t[3]!==o?(s=/* @__PURE__ */ h(y.Provider,{value:o,children:n}),t[2]=n,t[3]=o,t[4]=s):s=t[4],s}const M=t=>{let n=a(40),r,i,s,l,u,d,p,m,g,_,v;n[0]===t?(r=n[1],i=n[2],s=n[3],l=n[4],u=n[5],d=n[6],p=n[7],m=n[8],g=n[9],_=n[10],v=n[11]):({"aria-label":r,"aria-labelledby":i,"aria-multiselectable":s,children:l,className:u,isItemDisabled:d,onActivate:m,itemId:p,ref:_,semantics:v,...g}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=s,n[4]=l,n[5]=u,n[6]=d,n[7]=p,n[8]=m,n[9]=g,n[10]=_,n[11]=v);let y=v===void 0?`list`:v,b=f(null),S=e(b,_),C;n[12]===l?C=n[13]:(C=o.toArray(l).filter(c),n[12]=l,n[13]=C);let T=C,E;n[14]===Symbol.for(`react.memo_cache_sentinel`)?(E=e=>{b.current?.querySelector(`[data-index="${e}"]`)?.scrollIntoView({block:`nearest`})},n[14]=E):E=n[14];let D=E,A;n[15]===T.length?A=n[16]:(A=(e,t)=>{let n=b.current;if(n!=null)for(let r=e;r>=0&&r<T.length;r+=t){let e=n.querySelector(`[data-index="${r}"]`);if(e==null)continue;let t=w(e);if(t!=null){t.focus({preventScroll:!0}),e.scrollIntoView({block:`nearest`});return}}},n[15]=T.length,n[16]=A);let j=A,M;n[17]!==d||n[18]!==T?(M=d??(e=>x(T[e])),n[17]=d,n[18]=T,n[19]=M):M=n[19];let P;n[20]!==j||n[21]!==T.length||n[22]!==p||n[23]!==m||n[24]!==y||n[25]!==M?(P={count:T.length,focusItemAt:j,isItemDisabled:M,onActivate:m,itemId:p,scrollToIndex:D,semantics:y},n[20]=j,n[21]=T.length,n[22]=p,n[23]=m,n[24]=y,n[25]=M,n[26]=P):P=n[26];let{collectionProps:F,gridNav:I,listContext:L}=O(P),R;n[27]===T?R=n[28]:(R=T.map(N),n[27]=T,n[28]=R);let z;return n[29]!==r||n[30]!==i||n[31]!==s||n[32]!==u||n[33]!==F||n[34]!==S||n[35]!==I||n[36]!==L||n[37]!==g||n[38]!==R?(z=/* @__PURE__ */ h(k,{"aria-label":r,"aria-labelledby":i,"aria-multiselectable":s,className:u,collectionProps:F,gridNav:I,listContext:L,viewportProps:g,ref:S,children:R}),n[29]=r,n[30]=i,n[31]=s,n[32]=u,n[33]=F,n[34]=S,n[35]=I,n[36]=L,n[37]=g,n[38]=R,n[39]=z):z=n[39],z};function N(e,t){return/* @__PURE__ */ h(j,{index:t,children:e},e.key??t)}function P({virtualItem:e,count:t,measureRef:n}){return{posInSet:e.index+1,setSize:t,measureRef:n,style:{position:`absolute`,left:0,top:0,width:`100%`,transform:`translateY(${e.start}px)`}}}function F(e){let t=a(10),{children:n,count:r,measureRef:i,virtualItem:o}=e,s=o.index,c;t[0]!==r||t[1]!==i||t[2]!==o?(c=P({virtualItem:o,count:r,measureRef:i}),t[0]=r,t[1]=i,t[2]=o,t[3]=c):c=t[3];let l;t[4]!==c||t[5]!==o.index?(l={index:s,placement:c},t[4]=c,t[5]=o.index,t[6]=l):l=t[6];let u=l,d;return t[7]!==n||t[8]!==u?(d=/* @__PURE__ */ h(y.Provider,{value:u,children:n}),t[7]=n,t[8]=u,t[9]=d):d=t[9],d}function I({count:e,estimateItemHeight:t,getItemKey:n,overscan:r,scrollRef:i}){"use no memo";let a=g({count:e,getScrollElement:()=>i.current,estimateSize:()=>t,getItemKey:n,overscan:r,gap:1,initialRect:{width:0,height:t*(r+1)}});return{virtualItems:a.getVirtualItems(),totalSize:a.getTotalSize(),measureElement:a.measureElement,scrollToIndex:a.scrollToIndex}}const L=t=>{let n=a(68),r,i,s,l,d,p,m,g,_,v,y,b,S;n[0]===t?(r=n[1],i=n[2],s=n[3],l=n[4],d=n[5],p=n[6],m=n[7],g=n[8],_=n[9],v=n[10],y=n[11],b=n[12],S=n[13]):({"aria-label":r,"aria-labelledby":i,"aria-multiselectable":s,children:l,className:d,estimateItemHeight:y,isItemDisabled:p,onActivate:g,overscan:b,itemId:m,ref:v,semantics:S,..._}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=s,n[4]=l,n[5]=d,n[6]=p,n[7]=m,n[8]=g,n[9]=_,n[10]=v,n[11]=y,n[12]=b,n[13]=S);let C=y===void 0?44:y,T=b===void 0?8:b,E=S===void 0?`list`:S,D=f(null),A=e(D,v),j;n[14]===l?j=n[15]:(j=o.toArray(l).filter(c),n[14]=l,n[15]=j);let M=j,N=M.length,P;n[16]===M?P=n[17]:(P=e=>M[e]?.key??e,n[16]=M,n[17]=P);let L=P,R;n[18]!==N||n[19]!==C||n[20]!==L||n[21]!==T?(R={count:N,estimateItemHeight:C,getItemKey:L,overscan:T,scrollRef:D},n[18]=N,n[19]=C,n[20]=L,n[21]=T,n[22]=R):R=n[22];let{virtualItems:z,totalSize:B,measureElement:V,scrollToIndex:H}=I(R),U;n[23]===H?U=n[24]:(U=e=>H(e,{align:`auto`}),n[23]=H,n[24]=U);let W=U,G=f(null),K,q;n[25]===Symbol.for(`react.memo_cache_sentinel`)?(K=()=>()=>{G.current!=null&&cancelAnimationFrame(G.current)},q=[],n[25]=K,n[26]=q):(K=n[25],q=n[26]),u(K,q);let J;n[27]!==N||n[28]!==W?(J=(e,t)=>{G.current!=null&&(cancelAnimationFrame(G.current),G.current=null);let n=e,r=0,i=()=>{G.current=null;let e=D.current;if(e==null||n<0||n>=N)return;W(n);let a=e.querySelector(`[data-index="${n}"]`);if(a!=null){let e=w(a);if(e!=null){e.focus({preventScroll:!0});return}n+=t,r=0}r+=1,r<10&&(G.current=requestAnimationFrame(i))};i()},n[27]=N,n[28]=W,n[29]=J):J=n[29];let ee=J,Y;n[30]!==p||n[31]!==M?(Y=p??(e=>x(M[e])),n[30]=p,n[31]=M,n[32]=Y):Y=n[32];let X;n[33]!==N||n[34]!==ee||n[35]!==m||n[36]!==g||n[37]!==W||n[38]!==E||n[39]!==Y?(X={count:N,focusItemAt:ee,isItemDisabled:Y,onActivate:g,itemId:m,scrollToIndex:W,semantics:E},n[33]=N,n[34]=ee,n[35]=m,n[36]=g,n[37]=W,n[38]=E,n[39]=Y,n[40]=X):X=n[40];let{collectionProps:te,gridNav:ne,listContext:re}=O(X),ie=z.some(e=>e.index===ne.activeIndex)?te[`aria-activedescendant`]:void 0,ae=E===`grid`?N:void 0,oe=`${B}px`,Z;n[41]===oe?Z=n[42]:(Z={height:oe},n[41]=oe,n[42]=Z);let Q;n[43]!==te||n[44]!==ie||n[45]!==ae||n[46]!==Z?(Q={...te,"aria-activedescendant":ie,"aria-rowcount":ae,style:Z},n[43]=te,n[44]=ie,n[45]=ae,n[46]=Z,n[47]=Q):Q=n[47];let $;if(n[48]!==N||n[49]!==M||n[50]!==V||n[51]!==z){let e;n[53]!==N||n[54]!==M||n[55]!==V?(e=e=>{let t=M[e.index];return t==null?null:/* @__PURE__ */ h(F,{virtualItem:e,count:N,measureRef:V,children:t},e.key)},n[53]=N,n[54]=M,n[55]=V,n[56]=e):e=n[56],$=z.map(e),n[48]=N,n[49]=M,n[50]=V,n[51]=z,n[52]=$}else $=n[52];let se;return n[57]!==r||n[58]!==i||n[59]!==s||n[60]!==d||n[61]!==A||n[62]!==ne||n[63]!==re||n[64]!==_||n[65]!==Q||n[66]!==$?(se=/* @__PURE__ */ h(k,{"aria-label":r,"aria-labelledby":i,"aria-multiselectable":s,className:d,collectionProps:Q,gridNav:ne,listContext:re,viewportProps:_,ref:A,children:$}),n[57]=r,n[58]=i,n[59]=s,n[60]=d,n[61]=A,n[62]=ne,n[63]=re,n[64]=_,n[65]=Q,n[66]=$,n[67]=se):se=n[67],se};export{A as n,M as r,L as t};
|
package/dist/list.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { n as WithAsChild } from "./as-child-D23mGo4f.js";
|
|
2
|
+
import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
|
|
2
3
|
import { CSSProperties, ComponentProps, ReactNode, Ref } from "react";
|
|
3
4
|
//#region src/components/list/primitive.d.ts
|
|
4
5
|
/**
|
|
@@ -267,7 +268,7 @@ declare const Item: ({ asChild, className, current, disabled, onClick, ref, ...p
|
|
|
267
268
|
* </List.Root>
|
|
268
269
|
* ```
|
|
269
270
|
*/
|
|
270
|
-
declare const ItemTitle: ({ className, ref, ...props }: ComponentProps<"span">) => import("react").JSX.Element;
|
|
271
|
+
declare const ItemTitle: ({ "data-slot": dataSlot, className, ref, ...props }: ComponentProps<"span"> & WithDataSlot) => import("react").JSX.Element;
|
|
271
272
|
/**
|
|
272
273
|
* The de-emphasized sub-line inside a `List.Item`, in the muted body color. A
|
|
273
274
|
* styled `<span>`.
|
|
@@ -286,7 +287,7 @@ declare const ItemTitle: ({ className, ref, ...props }: ComponentProps<"span">)
|
|
|
286
287
|
* </List.Root>
|
|
287
288
|
* ```
|
|
288
289
|
*/
|
|
289
|
-
declare const ItemDescription: ({ className, ref, ...props }: ComponentProps<"span">) => import("react").JSX.Element;
|
|
290
|
+
declare const ItemDescription: ({ "data-slot": dataSlot, className, ref, ...props }: ComponentProps<"span"> & WithDataSlot) => import("react").JSX.Element;
|
|
290
291
|
/**
|
|
291
292
|
* A scrollable, optionally-virtualized list of clickable items — the action /
|
|
292
293
|
* navigation counterpart to `SelectableList` (e.g. an account switcher or SSO
|
package/dist/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-DdYN1L1C.js";import{n as r,r as i,t as a}from"./list-DOVZoz9t.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(i,{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(a,{semantics:`list`,...e}),t[0]=e,t[1]=n),n},Item:t=>{let i=o(34),a,c,u,d,f,p,m;i[0]===t?(a=i[1],c=i[2],u=i[3],d=i[4],f=i[5],p=i[6],m=i[7]):({asChild:a,className:c,current:u,disabled:d,onClick:f,ref:m,...p}=t,i[0]=t,i[1]=a,i[2]=c,i[3]=u,i[4]=d,i[5]=f,i[6]=p,i[7]=m);let h=a?n:`button`,g=u||void 0,_;i[8]!==a||i[9]!==d?(_=a?{"aria-disabled":d||void 0,tabIndex:d?-1:void 0}:{type:`button`,disabled:d},i[8]=a,i[9]=d,i[10]=_):_=i[10];let v;i[11]!==a||i[12]!==d||i[13]!==f?(v=e=>{a&&d?(e.preventDefault(),e.stopPropagation()):f?.(e)},i[11]=a,i[12]=d,i[13]=f,i[14]=v):v=i[14];let y;i[15]===c?y=i[16]:(y=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`,c),i[15]=c,i[16]=y);let b;i[17]!==a||i[18]!==d||i[19]!==p?(b=a&&d?l:p.onClickCapture,i[17]=a,i[18]=d,i[19]=p,i[20]=b):b=i[20];let x;i[21]!==h||i[22]!==p||i[23]!==m||i[24]!==g||i[25]!==_||i[26]!==v||i[27]!==y||i[28]!==b?(x=/* @__PURE__ */ s(h,{ref:m,"data-slot":`list-item-control`,"aria-current":g,..._,onClick:v,className:y,...p,onClickCapture:b}),i[21]=h,i[22]=p,i[23]=m,i[24]=g,i[25]=_,i[26]=v,i[27]=y,i[28]=b,i[29]=x):x=i[29];let S;return i[30]!==u||i[31]!==d||i[32]!==x?(S=/* @__PURE__ */ s(r,{selected:u,disabled:d,children:x}),i[30]=u,i[31]=d,i[32]=x,i[33]=S):S=i[33],S},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
|
+
import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-DdYN1L1C.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,4 +1,5 @@
|
|
|
1
1
|
import { n as WithAsChild } from "./as-child-D23mGo4f.js";
|
|
2
|
+
import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
|
|
2
3
|
import { ComponentProps } from "react";
|
|
3
4
|
//#region src/components/live-region/live-region.d.ts
|
|
4
5
|
type LiveRegionProps = ComponentProps<"span"> & WithAsChild & {
|
|
@@ -10,7 +11,7 @@ type LiveRegionProps = ComponentProps<"span"> & WithAsChild & {
|
|
|
10
11
|
* @default "polite"
|
|
11
12
|
*/
|
|
12
13
|
politeness?: "polite" | "assertive";
|
|
13
|
-
};
|
|
14
|
+
} & WithDataSlot;
|
|
14
15
|
/**
|
|
15
16
|
* Announces its text to screen readers when the text changes. Renders a
|
|
16
17
|
* persistent, visually hidden `<span>` live region with `role="status"` and
|
|
@@ -63,6 +64,6 @@ type LiveRegionProps = ComponentProps<"span"> & WithAsChild & {
|
|
|
63
64
|
* }
|
|
64
65
|
* ```
|
|
65
66
|
*/
|
|
66
|
-
declare const LiveRegion: ({ asChild, className, politeness, ref, ...props }: LiveRegionProps) => import("react").JSX.Element;
|
|
67
|
+
declare const LiveRegion: ({ "data-slot": dataSlot, asChild, className, politeness, ref, ...props }: LiveRegionProps) => import("react").JSX.Element;
|
|
67
68
|
//#endregion
|
|
68
69
|
export { LiveRegion };
|
package/dist/live-region.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{t as LiveRegion}from"./live-region-DQ1QLv3L.js";
|
package/dist/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# @ngrok/mantle (0.
|
|
1
|
+
# @ngrok/mantle (0.90.0)
|
|
2
2
|
|
|
3
|
-
> Offline
|
|
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. 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
|
|
@@ -17,6 +17,120 @@ Full text: https://mantle.ngrok.com/llms-full.txt
|
|
|
17
17
|
- Search index: https://mantle.ngrok.com/api/search-index.json
|
|
18
18
|
- Schemas: https://mantle.ngrok.com/api/schema.json
|
|
19
19
|
|
|
20
|
+
## Components
|
|
21
|
+
|
|
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`): Fundamental component for rendering links to external addresses.
|
|
27
|
+
- **Area Chart** (`@ngrok/mantle/area-chart`): A canvas-rendered area chart for showing how values — and, when stacked, a total and its parts — change over a continuous x axis.
|
|
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 — a status, a category tag, or a count — in the smallest possible footprint.
|
|
30
|
+
- **Bar Chart** (`@ngrok/mantle/bar-chart`): A canvas-rendered bar chart for comparing values across categories, with grouped and stacked variants.
|
|
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 allows the user to toggle between checked and not checked. Supports indeterminate state.
|
|
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 — a function name, a variable, a CLI flag, a key.
|
|
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`): Fill in a React input field with autocomplete & autosuggest functionalities. Choose from a list of suggested values with full keyboard support. Also called: autocomplete, typeahead.
|
|
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 Label represents a caption for an item in a user interface. Renders an accessible label associated with controls.
|
|
56
|
+
- **Line Chart** (`@ngrok/mantle/line-chart`): A canvas-rendered line chart for trends over a continuous x axis — time above all. Min/max decimation keeps 100,000+ point series smooth.
|
|
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, designed to be paired with a skip link.
|
|
60
|
+
- **Media Object** (`@ngrok/mantle/media-object`): The Media Object is an image/icon (media) to the left, with descriptive content (title and subtitle/description) to the right.
|
|
61
|
+
- **Multi Select** (`@ngrok/mantle/multi-select`): A typeahead multi-select combobox that allows users to select multiple values with filtering. Selected values are displayed as removable tags.
|
|
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.
|
|
68
|
+
- **QR Code** (`@ngrok/mantle/qr-code`): Render a scannable QR code, optionally branded with a centered logo.
|
|
69
|
+
- **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.
|
|
70
|
+
- **Sandbar** (`@ngrok/mantle/sandbar`): A floating save bar for unsaved changes. Batch save form state with save and discard actions, announce pending state to screen readers, and block navigation until changes are resolved.
|
|
71
|
+
- **SandboxedOnClick** (`@ngrok/mantle/sandboxed-on-click`): A container that prevents the click event from bubbling out of it.
|
|
72
|
+
- **Scatter Plot** (`@ngrok/mantle/scatter-plot`): A canvas-rendered scatter plot for correlating two continuous measures (three with the rotatable 3D projection).
|
|
73
|
+
- **Select** (`@ngrok/mantle/select`): Displays a list of options for the user to pick from—triggered by a button. Also called: dropdown.
|
|
74
|
+
- **Selectable List** (`@ngrok/mantle/selectable-list`): A filterable, multi-select grid of checkbox rows.
|
|
75
|
+
- **Separator** (`@ngrok/mantle/separator`): Visually or semantically separates content.
|
|
76
|
+
- **Sheet** (`@ngrok/mantle/sheet`): A container that overlays the current view from the edge of the screen. Also called: drawer, side panel.
|
|
77
|
+
- **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.
|
|
78
|
+
- **Skeleton** (`@ngrok/mantle/skeleton`): Use to show a placeholder while content is loading.
|
|
79
|
+
- **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.
|
|
80
|
+
- **Slider** (`@ngrok/mantle/slider`): An input where the user selects a value from within a given range.
|
|
81
|
+
- **Slot** (`@ngrok/mantle/slot`): Merges its props onto its immediate child.
|
|
82
|
+
- **Split Button** (`@ngrok/mantle/split-button`): A button group that pairs a one-click default action with a dropdown menu of related alternatives.
|
|
83
|
+
- **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.
|
|
84
|
+
- **Switch** (`@ngrok/mantle/switch`): A form control that toggles one setting on or off. Unlike Checkbox, it has no indeterminate state. Also called: toggle.
|
|
85
|
+
- **Table** (`@ngrok/mantle/table`): A structured way to display data in rows and columns.
|
|
86
|
+
- **Tabs** (`@ngrok/mantle/tabs`): Layered sections of content, called tab panels, that show one at a time.
|
|
87
|
+
- **Text Area** (`@ngrok/mantle/text-area`): A multi-line plain-text editing control.
|
|
88
|
+
- **Theme** (`@ngrok/mantle/theme`): Theme primitives (ThemeProvider, MantleStyleSheets, and FOUC prevention) for light, dark, and high-contrast modes.
|
|
89
|
+
- **Theme Switcher** (`@ngrok/mantle/theme-switcher`): The canonical picker for mantle's five themes (a compact dropdown switcher), plus a radio group that embeds theme selection in any dropdown menu.
|
|
90
|
+
- **Toast** (`@ngrok/mantle/toast`): A succinct message that appears temporarily. Also called: notification, snackbar.
|
|
91
|
+
- **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.
|
|
92
|
+
- **Truncated Text** (`@ngrok/mantle/truncated-text`): Renders one long opaque value on a single line and keeps its tail visible when it overflows.
|
|
93
|
+
- **Visually Hidden** (`@ngrok/mantle/visually-hidden`): Render content that screen readers announce and sighted users never see.
|
|
94
|
+
- **Well** (`@ngrok/mantle/well`): A recessed, inset container used to group and de-emphasize content.
|
|
95
|
+
|
|
96
|
+
## Layouts
|
|
97
|
+
|
|
98
|
+
- **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.
|
|
99
|
+
- **Centered Layout** (`@ngrok/mantle/centered-layout`): A viewport-filling centered page flow, with utility header and footer strips around a growing, centered content region.
|
|
100
|
+
|
|
101
|
+
## Hooks
|
|
102
|
+
|
|
103
|
+
- **getPrefersReducedMotion** (`@ngrok/mantle/hooks`): Imperatively reads the current `prefers-reduced-motion` preference once at the time of the call.
|
|
104
|
+
- **useBreakpoint** (`@ngrok/mantle/hooks`): The largest Tailwind breakpoint the viewport width matches, or `"default"` below `2xs`.
|
|
105
|
+
- **useCallbackRef** (`@ngrok/mantle/hooks`)
|
|
106
|
+
- **useComposedRefs** (`@ngrok/mantle/hooks`): A custom hook that composes up to three refs into a single callback ref.
|
|
107
|
+
- **useCopyToClipboard** (`@ngrok/mantle/hooks`): React hook that returns a stable async function for copying a string to the system clipboard.
|
|
108
|
+
- **useDebounce** (`@ngrok/mantle/hooks`): Returns a debounced copy of `value`: it only updates after `value` has stopped changing for `options.waitMs` milliseconds.
|
|
109
|
+
- **useDebouncedCallback** (`@ngrok/mantle/hooks`): Returns a debounced version of `callbackFn`.
|
|
110
|
+
- **useFocusTrap** (`@ngrok/mantle/hooks`): Keeps keyboard focus inside the element `ref` points at while `active` is `true`.
|
|
111
|
+
- **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.
|
|
112
|
+
- **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.
|
|
113
|
+
- **useIsBelowBreakpoint** (`@ngrok/mantle/hooks`): `true` while the viewport is narrower than the given breakpoint.
|
|
114
|
+
- **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.
|
|
115
|
+
- **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.
|
|
116
|
+
- **useIsomorphicLayoutEffect** (`@ngrok/mantle/hooks`): A drop-in replacement for `useLayoutEffect` that does not warn during server-side rendering.
|
|
117
|
+
- **useLocalStorage** (`@ngrok/mantle/hooks`): SSR-safe `useSyncExternalStore`-backed localStorage string state.
|
|
118
|
+
- **useMatchesMediaQuery** (`@ngrok/mantle/hooks`): React hook that subscribes to a CSS media query and returns whether it currently matches, re-rendering whenever the result changes.
|
|
119
|
+
- **usePrefersReducedMotion** (`@ngrok/mantle/hooks`): React hook that subscribes to the user's `prefers-reduced-motion` media query and re-renders when it changes.
|
|
120
|
+
- **useScrollBehavior** (`@ngrok/mantle/hooks`): React hook that returns a ScrollBehavior value (`"auto"` or `"smooth"`) that respects the user's motion preference.
|
|
121
|
+
- **useSessionStorage** (`@ngrok/mantle/hooks`): SSR-safe `useSyncExternalStore`-backed sessionStorage string state.
|
|
122
|
+
- **useSwipeToDismiss** (`@ngrok/mantle/hooks`): Makes the element `handle` points at a swipe handle that drags `target` toward one edge and calls `onDismiss` when the drag crosses `threshold` of the target's size or ends in a flick.
|
|
123
|
+
- **useUndoRedo** (`@ngrok/mantle/hooks`): Generic undo/redo hook that maintains two history stacks (undo and redo).
|
|
124
|
+
|
|
125
|
+
## Utilities
|
|
126
|
+
|
|
127
|
+
- **color** (`@ngrok/mantle/color`): Color palette named colors
|
|
128
|
+
- **composeRefs** (`@ngrok/mantle/utils`): A utility that composes multiple refs into a single callback ref.
|
|
129
|
+
- **cx** (`@ngrok/mantle/cx`): Conditionally compose class names and resolve Tailwind CSS conflicts, so later classes override earlier ones (the same precedence model as inline styles).
|
|
130
|
+
- **highlight-utils** (`@ngrok/mantle/highlight-utils`): React-free highlighting utilities for use in build tools, server-side rendering, and Web Workers.
|
|
131
|
+
- **inView** (`@ngrok/mantle/utils`): Observe when a DOM element enters or leaves the viewport (or a scrollable container) using the `IntersectionObserver` API.
|
|
132
|
+
- **sorting** (`@ngrok/mantle/utils`): Compare dates in newest-to-oldest (descending) order.
|
|
133
|
+
|
|
20
134
|
## Importable subpaths
|
|
21
135
|
|
|
22
136
|
- `@ngrok/mantle/accordion`
|
|
@@ -83,6 +197,7 @@ Full text: https://mantle.ngrok.com/llms-full.txt
|
|
|
83
197
|
- `@ngrok/mantle/slider`
|
|
84
198
|
- `@ngrok/mantle/slot`
|
|
85
199
|
- `@ngrok/mantle/split-button`
|
|
200
|
+
- `@ngrok/mantle/strata`
|
|
86
201
|
- `@ngrok/mantle/switch`
|
|
87
202
|
- `@ngrok/mantle/table`
|
|
88
203
|
- `@ngrok/mantle/tabs`
|
|
@@ -91,6 +206,7 @@ Full text: https://mantle.ngrok.com/llms-full.txt
|
|
|
91
206
|
- `@ngrok/mantle/theme-switcher`
|
|
92
207
|
- `@ngrok/mantle/toast`
|
|
93
208
|
- `@ngrok/mantle/tooltip`
|
|
209
|
+
- `@ngrok/mantle/truncated-text`
|
|
94
210
|
- `@ngrok/mantle/types`
|
|
95
211
|
- `@ngrok/mantle/utils`
|
|
96
212
|
- `@ngrok/mantle/visually-hidden`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
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.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{t as Main}from"./main-CC1L9IsH.js";
|
package/dist/mantle.css
CHANGED
|
@@ -171,6 +171,18 @@ MARK: THEME
|
|
|
171
171
|
|
|
172
172
|
@theme inline {
|
|
173
173
|
/* Static values that never change across themes */
|
|
174
|
+
/* A strong ease-out for UI that enters, exits, or changes shape in under 300ms.
|
|
175
|
+
Tailwind's `--ease-out` is too shallow to read as a settle at 200ms. */
|
|
176
|
+
--ease-out-strong: cubic-bezier(0.23, 1, 0.32, 1);
|
|
177
|
+
/* The narrowest workspace row that holds the expanded rail (13rem), the content card at
|
|
178
|
+
the side panel's floor (21rem), the panel itself (21rem), and the three gutters (1.5rem).
|
|
179
|
+
Below it `AppLayout.SidePanel` floats over the card, so the page is never narrower than
|
|
180
|
+
the panel beside it. The budget holds whatever the viewport is: the panel's default width
|
|
181
|
+
reads the row (`24cqw`), so it sits at the floor in every row up to 87.5rem. */
|
|
182
|
+
--container-side-panel-lane: 56.5rem;
|
|
183
|
+
/* The same row with the icon rail (3.25rem) in place of the expanded one, or with no rail.
|
|
184
|
+
`AppLayout.SidePanel` reads this threshold when the row holds no expanded `Sidebar.Nav`. */
|
|
185
|
+
--container-side-panel-lane-icon-rail: 46.75rem;
|
|
174
186
|
--font-sans: "Roobert", ui-sans-serif, system-ui, sans-serif;
|
|
175
187
|
--font-mono:
|
|
176
188
|
"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono,
|
package/dist/media-object.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-DdYN1L1C.js";import{c as r}from"react/compiler-runtime";import{jsx as i}from"react/jsx-runtime";const a={Root:a=>{let o=r(18),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]):({asChild:f,className:c,children:s,"data-slot":l,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&&f?n:`div`,m;o[7]===l?m=o[8]:(m=t(l,`media-object`),o[7]=l,o[8]=m);let h;o[9]===c?h=o[10]:(h=e(`flex gap-4`,c),o[9]=c,o[10]=h);let g;return o[11]!==p||o[12]!==s||o[13]!==u||o[14]!==d||o[15]!==m||o[16]!==h?(g=/* @__PURE__ */ i(p,{ref:d,"data-slot":m,className:h,...u,children:s}),o[11]=p,o[12]=s,o[13]=u,o[14]=d,o[15]=m,o[16]=h,o[17]=g):g=o[17],g},Media:a=>{let o=r(18),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]):({asChild:f,className:c,children:s,"data-slot":l,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&&f?n:`div`,m;o[7]===l?m=o[8]:(m=t(l,`media-object-media`),o[7]=l,o[8]=m);let h;o[9]===c?h=o[10]:(h=e(`shrink-0 leading-none`,c),o[9]=c,o[10]=h);let g;return o[11]!==p||o[12]!==s||o[13]!==u||o[14]!==d||o[15]!==m||o[16]!==h?(g=/* @__PURE__ */ i(p,{ref:d,"data-slot":m,className:h,...u,children:s}),o[11]=p,o[12]=s,o[13]=u,o[14]=d,o[15]=m,o[16]=h,o[17]=g):g=o[17],g},Content:a=>{let o=r(18),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]):({asChild:f,className:c,children:s,"data-slot":l,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&&f?n:`div`,m;o[7]===l?m=o[8]:(m=t(l,`media-object-content`),o[7]=l,o[8]=m);let h;o[9]===c?h=o[10]:(h=e(`min-w-0 flex-1`,c),o[9]=c,o[10]=h);let g;return o[11]!==p||o[12]!==s||o[13]!==u||o[14]!==d||o[15]!==m||o[16]!==h?(g=/* @__PURE__ */ i(p,{ref:d,"data-slot":m,className:h,...u,children:s}),o[11]=p,o[12]=s,o[13]=u,o[14]=d,o[15]=m,o[16]=h,o[17]=g):g=o[17],g}};export{a as MediaObject};
|