@ngrok/mantle 0.82.0 → 0.83.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 +7 -7
- package/dist/accordion.js +1 -1
- package/dist/agent.json +3 -1
- package/dist/{alert-BWwNPOMI.d.ts → alert-B1HXfkYn.d.ts} +9 -7
- package/dist/{alert-QMs0PqMq.js → alert-BuG2qS5l.js} +1 -1
- package/dist/alert-center.d.ts +220 -22
- package/dist/alert-center.js +1 -1
- package/dist/alert-dialog.d.ts +18 -18
- package/dist/alert-dialog.js +1 -1
- package/dist/alert.d.ts +1 -1
- package/dist/alert.js +1 -1
- package/dist/{anchor-DvbNsphX.js → anchor-3OGK2UKU.js} +1 -1
- package/dist/anchor.d.ts +2 -2
- package/dist/anchor.js +1 -1
- package/dist/app-layout.d.ts +296 -213
- package/dist/app-layout.js +1 -1
- package/dist/area-chart.d.ts +67 -19
- package/dist/area-chart.js +1 -1
- package/dist/avatar.d.ts +319 -0
- package/dist/avatar.js +1 -0
- package/dist/badge.js +1 -1
- package/dist/bar-chart.d.ts +73 -20
- package/dist/bar-chart.js +1 -1
- package/dist/breadcrumb.d.ts +50 -17
- package/dist/breadcrumb.js +1 -1
- package/dist/browser-only.d.ts +3 -3
- package/dist/{button-C-gMbPso.d.ts → button-BIf69CSV.d.ts} +2 -2
- package/dist/button-BLDjW1u9.js +1 -0
- package/dist/{button-C0S8RbaJ.js → button-CCkGqE1t.js} +1 -1
- package/dist/{button-BUospUB3.js → button-Cnja9Bsr.js} +1 -1
- package/dist/{button-C7vAl6lS.d.ts → button-DJ7AAgII.d.ts} +4 -6
- package/dist/{button-BO2CKsz6.js → button-DmJkYfyl.js} +1 -1
- package/dist/{button-DARFK2KJ.d.ts → button-PoIujPMX.d.ts} +2 -2
- package/dist/button.d.ts +3 -3
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +1 -1
- package/dist/calendar.js +1 -1
- package/dist/card.d.ts +15 -15
- package/dist/card.js +1 -1
- package/dist/centered-layout.js +1 -1
- package/dist/{chart-1cVjAcj8.d.ts → chart-0zcFJh4n.d.ts} +75 -22
- package/dist/chart-DBxT9BNl.js +2 -0
- package/dist/{choice-BNRQXszu.d.ts → choice-CVdQrs-m.d.ts} +118 -6
- package/dist/{choice-C9gLKECf.js → choice-CnwfjSEu.js} +1 -1
- package/dist/choice.d.ts +1 -1
- package/dist/choice.js +1 -1
- package/dist/{code-block-C9uaM9-V.js → code-block-CIE0F2fu.js} +1 -1
- package/dist/{code-block-B6OlZrSI.d.ts → code-block-CZWPrV4k.d.ts} +3 -3
- package/dist/code-block.d.ts +10 -7
- package/dist/code-block.js +2 -2
- package/dist/code-block_highlight-utils.d.ts +1 -1
- package/dist/code-block_highlight-utils.js +1 -1
- package/dist/code.js +1 -1
- package/dist/combobox.d.ts +8 -9
- package/dist/combobox.js +1 -1
- package/dist/command.d.ts +668 -106
- package/dist/command.js +1 -1
- package/dist/cookie-ca4g5CKp.js +1 -0
- package/dist/data-table.d.ts +6 -6
- package/dist/data-table.js +1 -1
- package/dist/description-list.js +1 -1
- package/dist/dialog-02mNrAT1.d.ts +806 -0
- package/dist/{dialog-Bsj_dX6r.js → dialog-BRjTD83p.js} +1 -1
- package/dist/dialog.d.ts +2 -805
- package/dist/dialog.js +1 -1
- package/dist/{dropdown-menu-fUMqjRC0.js → dropdown-menu-BRH0Wd_z.js} +1 -1
- package/dist/dropdown-menu-BcALUQMp.d.ts +1 -0
- package/dist/{dropdown-menu-D6pMAY7I.d.ts → dropdown-menu-DZOfj6HB.d.ts} +1 -1
- package/dist/dropdown-menu.d.ts +2 -2
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.js +1 -1
- package/dist/field.d.ts +5 -5
- package/dist/field.js +1 -1
- package/dist/flag.js +1 -1
- package/dist/hooks.d.ts +16 -17
- package/dist/hooks.js +1 -1
- package/dist/icons-DEVx1oP9.js +1 -0
- package/dist/icons.d.ts +7 -6
- package/dist/icons.js +1 -1
- package/dist/{in-view-DDEGUKDR.d.ts → in-view-gxyc9Q1_.d.ts} +1 -1
- package/dist/{input-BuYDU6CF.d.ts → input-DpnC3Xgj.d.ts} +2 -2
- package/dist/input.d.ts +1 -1
- package/dist/kbd.d.ts +1 -1
- package/dist/line-chart.d.ts +60 -13
- package/dist/line-chart.js +1 -1
- package/dist/list-CwL23L_B.js +1 -0
- package/dist/list.d.ts +2 -2
- package/dist/list.js +1 -1
- package/dist/llms.txt +3 -1
- package/dist/main.d.ts +32 -1
- package/dist/mantle-dark-high-contrast.css +30 -17
- package/dist/mantle-dark.css +48 -13
- package/dist/mantle-light-high-contrast.css +33 -15
- package/dist/mantle.css +436 -26
- package/dist/media-object.d.ts +5 -1
- package/dist/media-object.js +1 -1
- package/dist/multi-select.d.ts +7 -7
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.d.ts +4 -4
- package/dist/otp-input.js +1 -1
- package/dist/pagination.d.ts +2 -2
- package/dist/pagination.js +1 -1
- package/dist/{primitive-Dv-3snU3.js → primitive-D-9GIFWb.js} +1 -1
- package/dist/progress.d.ts +4 -4
- package/dist/qr-code.d.ts +2 -2
- package/dist/qr-code.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/sandbar.d.ts +471 -0
- package/dist/sandbar.js +1 -0
- package/dist/sandboxed-on-click.d.ts +4 -6
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/scatter-plot.d.ts +69 -24
- package/dist/scatter-plot.js +1 -1
- package/dist/{select-0z7HVS6r.d.ts → select-DVHmgih8.d.ts} +13 -7
- package/dist/select-LK9NX-vV.js +1 -0
- package/dist/select.d.ts +1 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list.d.ts +4 -4
- package/dist/selectable-list.js +1 -1
- package/dist/{separator-B5UmkVRL.d.ts → separator-CNDs98Dv.d.ts} +2 -2
- package/dist/{separator-BepAcFFy.js → separator-D0D6VyyM.js} +1 -1
- package/dist/separator.d.ts +1 -1
- package/dist/separator.js +1 -1
- package/dist/{sheet-_fXLjiq2.js → sheet-BOSknSN9.js} +1 -1
- package/dist/sheet.d.ts +1 -1
- package/dist/sheet.js +1 -1
- package/dist/sidebar.d.ts +783 -328
- package/dist/sidebar.js +1 -1
- package/dist/{skeleton-DsHXIa9j.js → skeleton-BhcJMpem.js} +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slider.d.ts +1 -1
- package/dist/slot-DdgxmuI5.d.ts +67 -0
- package/dist/slot-DpNWVci8.js +1 -0
- package/dist/slot.d.ts +1 -1
- package/dist/slot.js +1 -1
- package/dist/split-button.d.ts +12 -12
- package/dist/split-button.js +1 -1
- package/dist/switch.d.ts +2 -1
- package/dist/{table-CGxJwtbL.js → table-C_Nm_RSV.js} +1 -1
- package/dist/{table-CZBYEmyK.d.ts → table-D51ZtV4U.d.ts} +18 -8
- package/dist/table.d.ts +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +8 -13
- package/dist/tabs.js +1 -1
- package/dist/{theme-FbfjYiD3.d.ts → theme-6OxNhf6l.d.ts} +6 -6
- package/dist/theme-CVfq037P.js +1 -0
- package/dist/theme-switcher.d.ts +4 -4
- package/dist/theme-switcher.js +1 -1
- package/dist/theme.d.ts +86 -23
- package/dist/theme.js +1 -1
- package/dist/toast.d.ts +9 -9
- package/dist/toast.js +1 -1
- package/dist/tooltip-Dnu35cjU.js +1 -0
- package/dist/tooltip-DuXGxIse.d.ts +220 -0
- package/dist/tooltip.d.ts +1 -217
- package/dist/tooltip.js +1 -1
- package/dist/use-breakpoint-Dqu12Szq.js +1 -0
- package/dist/use-callback-ref-IYti9y7x.js +1 -0
- package/dist/use-is-apple-platform-Cxwrb86L.js +1 -0
- package/dist/use-matches-media-query-Bd_GhhVd.js +1 -0
- package/dist/utils.d.ts +1 -1
- package/dist/well.js +1 -1
- package/package.json +4 -2
- package/dist/button-DvHMWAPl.js +0 -1
- package/dist/chart-DdBQ3xwx.js +0 -2
- package/dist/dropdown-menu-BbbQuae2.d.ts +0 -1
- package/dist/icons-CPbOq7cF.js +0 -1
- package/dist/list-CQFWx6Z8.js +0 -1
- package/dist/select-B-9yWrif.js +0 -1
- package/dist/slot-BtwKJTLq.d.ts +0 -25
- package/dist/slot-Dpsqz16D.js +0 -1
- package/dist/theme-IAnQ35bd.js +0 -1
- package/dist/use-breakpoint-Wd7_5-Mu.js +0 -1
- package/dist/use-matches-media-query-CMSxHR9n.js +0 -1
package/dist/bar-chart.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as LegendPrimitiveProps, c as XAxisPrimitiveProps, d as BarTexture, f as ChartDatum, i as GridPrimitiveProps, l as YAxisPrimitiveProps, m as ChartSeriesSlot, n as ChartRootBaseProps, o as ReferenceLinePrimitiveProps, p as ChartDatumEvent, r as CopyButtonPrimitiveProps, s as TooltipPrimitiveProps, t as ChartAccessibilityProps, u as BarOrientation, v as SeriesColor } from "./chart-0zcFJh4n.js";
|
|
2
2
|
//#region src/components/bar-chart/bar-chart.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Props for {@link BarChart.Root}. Bars encode value by length from a shared
|
|
@@ -18,7 +18,8 @@ type BarChartRootProps<TDatum extends ChartDatum = ChartDatum> = Omit<ChartRootB
|
|
|
18
18
|
* categories along the x axis; `"horizontal"` bars run rightward from a
|
|
19
19
|
* left baseline with categories down the y axis — better for long category
|
|
20
20
|
* labels or many categories. The value axis, baseline, reference lines, and
|
|
21
|
-
* `"perpendicular"`
|
|
21
|
+
* the two rung textures (`"perpendicular"` and `"parallel"`) all flip to
|
|
22
|
+
* match.
|
|
22
23
|
*/
|
|
23
24
|
orientation?: BarOrientation;
|
|
24
25
|
};
|
|
@@ -31,25 +32,49 @@ type BarChartBarProps = {
|
|
|
31
32
|
/** Display name for the legend, tooltip, and data table. Defaults to `dataKey`. */
|
|
32
33
|
label?: string;
|
|
33
34
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
35
|
+
* A fixed visual identity slot. Slots `1` through `8` select a chart color.
|
|
36
|
+
* `"other"` selects the shared neutral treatment.
|
|
37
|
+
*
|
|
38
|
+
* Series receive unreserved slots in composition order. Set `seriesSlot` to
|
|
39
|
+
* give a series a fixed visual identity. Several series may share one slot;
|
|
40
|
+
* use distinct textures to tell those bars apart.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```tsx
|
|
44
|
+
* <BarChart.Bar dataKey="errors" seriesSlot={4} />
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
seriesSlot?: ChartSeriesSlot;
|
|
48
|
+
/**
|
|
49
|
+
* Override the color channel with a chart token or any CSS color. This does
|
|
50
|
+
* not change the series slot. When omitted, the series paints the color from
|
|
51
|
+
* its slot.
|
|
52
|
+
*
|
|
53
|
+
* A static color (raw hex) cannot follow the four themes, so prefer a
|
|
54
|
+
* `var(--your-token)` declared per theme. A series that carries good/bad
|
|
55
|
+
* meaning should wear the semantic status colors, never a categorical slot.
|
|
40
56
|
*/
|
|
41
57
|
color?: SeriesColor;
|
|
42
58
|
/**
|
|
43
59
|
* The fill texture the series wears, on canvas and on its legend key:
|
|
44
60
|
* `"solid"` (default), diagonal hatch lines at 45° (`"hatch"`), the 135°
|
|
45
61
|
* mirror (`"hatch-reverse"`), both (`"crosshatch"`), rungs perpendicular
|
|
46
|
-
* to the bar's length (`"perpendicular"`
|
|
47
|
-
* (`"
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
62
|
+
* to the bar's length (`"perpendicular"` — horizontal lines on vertical
|
|
63
|
+
* bars), rungs parallel to it (`"parallel"` — vertical lines on vertical
|
|
64
|
+
* bars), the orthogonal lattice of both rung directions (`"grid"`), or an
|
|
65
|
+
* offset dot field (`"dots"`).
|
|
66
|
+
*
|
|
67
|
+
* The two rung textures flip with the Root's `orientation`, in opposite
|
|
68
|
+
* senses. Every other value is direction-free, `"grid"` included — it is the
|
|
69
|
+
* orthogonal lattice against `"crosshatch"`'s diagonal one. Eight values
|
|
70
|
+
* match the palette's eight series slots.
|
|
71
|
+
*
|
|
72
|
+
* Texture is a redundant identity encoding alongside color — tone-on-tone
|
|
73
|
+
* ink from the series' own fill — so grouped and stacked series stay
|
|
74
|
+
* distinguishable without color vision, in grayscale print, and under
|
|
75
|
+
* forced colors. Keep it opt-in and purposeful, never decorative: leave the
|
|
76
|
+
* first series solid and texture the rest, or texture only the series in a
|
|
77
|
+
* pair that color alone cannot separate.
|
|
53
78
|
*/
|
|
54
79
|
texture?: BarTexture;
|
|
55
80
|
};
|
|
@@ -89,6 +114,12 @@ type BarChartCopyButtonProps = CopyButtonPrimitiveProps;
|
|
|
89
114
|
* table, Enter/Space + click activation). Compose the chrome and series parts
|
|
90
115
|
* as children.
|
|
91
116
|
*
|
|
117
|
+
* The Root's own subtree is addressable by slot: `bar-chart` on the wrapper,
|
|
118
|
+
* then `bar-chart-plot`, `bar-chart-canvas`, `bar-chart-crosshair`,
|
|
119
|
+
* `bar-chart-hover-band`, `bar-chart-markers`, `bar-chart-tooltip`, and
|
|
120
|
+
* `bar-chart-data-table`. A bar chart shows the band and never the crosshair
|
|
121
|
+
* or the markers, but all three layers mount on every kind.
|
|
122
|
+
*
|
|
92
123
|
* @see https://mantle.ngrok.com/components/charts/bar-chart#barchartroot
|
|
93
124
|
*
|
|
94
125
|
* @example
|
|
@@ -113,8 +144,9 @@ declare const Root: <TDatum extends ChartDatum = ChartDatum>(props: BarChartRoot
|
|
|
113
144
|
/**
|
|
114
145
|
* One bar series. Renders nothing itself — it registers the series with the
|
|
115
146
|
* chart, which paints it on canvas. Compose one `Bar` per series; with
|
|
116
|
-
* `stacked` on the Root, bars stack
|
|
117
|
-
* `
|
|
147
|
+
* `stacked` on the Root, bars stack from the baseline up in registration
|
|
148
|
+
* order, so a `Bar` that mounts later stacks on top whatever its position in
|
|
149
|
+
* the JSX. `texture` adds a pattern fill as a redundant identity encoding
|
|
118
150
|
* alongside color, worn by the bars and the series' legend key alike.
|
|
119
151
|
*
|
|
120
152
|
* @see https://mantle.ngrok.com/components/charts/bar-chart#barchartbar
|
|
@@ -212,9 +244,9 @@ declare const YAxis: (props: BarChartYAxisProps) => null;
|
|
|
212
244
|
declare const ReferenceLine: (props: BarChartReferenceLineProps) => null;
|
|
213
245
|
/**
|
|
214
246
|
* Customizes the hover/keyboard tooltip readout. The tooltip itself is part
|
|
215
|
-
* of `BarChart.Root`'s interaction contract and renders
|
|
216
|
-
*
|
|
217
|
-
*
|
|
247
|
+
* of `BarChart.Root`'s interaction contract and renders even when this part is
|
|
248
|
+
* absent — compose it to format the label or values, append a footer, or
|
|
249
|
+
* replace the content entirely via the render-prop `children`.
|
|
218
250
|
*
|
|
219
251
|
* @see https://mantle.ngrok.com/components/charts/bar-chart#barcharttooltip
|
|
220
252
|
*
|
|
@@ -237,6 +269,13 @@ declare const Tooltip: (props: BarChartTooltipProps) => null;
|
|
|
237
269
|
* must never rely on color-matching alone. It renders nothing for a single
|
|
238
270
|
* series (the chart's title already names it).
|
|
239
271
|
*
|
|
272
|
+
* **Data attributes:**
|
|
273
|
+
*
|
|
274
|
+
* | Data Attribute | Value | Description |
|
|
275
|
+
* | --- | --- | --- |
|
|
276
|
+
* | `data-slot` | `"bar-chart-legend"` | The legend list. `BarChart.Legend` renders it in flow below the plot. |
|
|
277
|
+
* | `data-texture` | `"solid"` \| `"hatch"` \| `"hatch-reverse"` \| `"crosshatch"` \| `"perpendicular"` \| `"parallel"` \| `"grid"` \| `"dots"` | On each series' swatch, naming the `texture` its `BarChart.Bar` registered. The swatch paints the pattern itself, so target this only to restyle a key. |
|
|
278
|
+
*
|
|
240
279
|
* @see https://mantle.ngrok.com/components/charts/bar-chart#barchartlegend
|
|
241
280
|
*
|
|
242
281
|
* @example
|
|
@@ -281,6 +320,20 @@ declare const CopyButton: (props: BarChartCopyButtonProps) => import("react").JS
|
|
|
281
320
|
* per-category tooltip, keyboard stepping, aria-live announcements, and an
|
|
282
321
|
* sr-only data table — ships with `Root` unconditionally.
|
|
283
322
|
*
|
|
323
|
+
* **CSS variables (public API):**
|
|
324
|
+
*
|
|
325
|
+
* | CSS Variable | Default | Description |
|
|
326
|
+
* | --- | --- | --- |
|
|
327
|
+
* | `--color-chart-1` … `--color-chart-8` | per theme | The validated categorical series slots, in assignment order. |
|
|
328
|
+
* | `--color-chart-other` | `--color-neutral-500` | The neutral overflow slot a series wears once every slot is held. |
|
|
329
|
+
*
|
|
330
|
+
* Two ways to change a series color, both public API. The `color` prop on
|
|
331
|
+
* `BarChart.Bar` sets one series and takes any CSS color. To restyle a slot
|
|
332
|
+
* itself, redeclare its token on `Root` —
|
|
333
|
+
* `className="[--color-chart-1:var(--color-brand)]"`. The engine resolves every
|
|
334
|
+
* token through a probe inside `Root`, so a declaration scoped there wins for
|
|
335
|
+
* that chart and leaves every other chart on the page alone.
|
|
336
|
+
*
|
|
284
337
|
* @see https://mantle.ngrok.com/components/charts/bar-chart
|
|
285
338
|
*
|
|
286
339
|
* @example
|
package/dist/bar-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-DBxT9BNl.js";import{jsx as l}from"react/jsx-runtime";const u={Root:e=>l(o,{kind:`bar`,componentName:`BarChart`,slotName:`bar-chart`,...e}),Bar:e=>a(`BarChart.Bar`,`bar`,e),Grid:e=>n(`BarChart.Grid`,e),XAxis:e=>t(`BarChart.XAxis`,e),YAxis:e=>r(`BarChart.YAxis`,e),ReferenceLine:t=>e(`BarChart.ReferenceLine`,t),Tooltip:e=>s(`BarChart.Tooltip`,e),Legend:e=>l(i,{partName:`BarChart.Legend`,slotName:`bar-chart`,...e}),CopyButton:e=>l(c,{partName:`BarChart.CopyButton`,slotName:`bar-chart`,...e})};export{u as BarChart};
|
package/dist/breadcrumb.d.ts
CHANGED
|
@@ -6,9 +6,12 @@ import { ComponentProps, ReactNode } from "react";
|
|
|
6
6
|
* The breadcrumb landmark. Renders a `<nav>` with a default
|
|
7
7
|
* `aria-label="Breadcrumb"` per the WAI-ARIA breadcrumb pattern — pass your
|
|
8
8
|
* own `aria-label` to override it (e.g. for localization or when a page has
|
|
9
|
-
* multiple breadcrumb trails). Carries no visual styling
|
|
9
|
+
* multiple breadcrumb trails). Carries no visual styling. Its one layout class
|
|
10
|
+
* is `min-w-0`: inside a flex row such as `AppLayout.Header` the landmark must
|
|
11
|
+
* shrink below the trail's width, or `Breadcrumb.List` never scrolls and the
|
|
12
|
+
* crumbs push their siblings out of the row.
|
|
10
13
|
*
|
|
11
|
-
* @see https://mantle.ngrok.com/components/navigation/breadcrumb
|
|
14
|
+
* @see https://mantle.ngrok.com/components/navigation/breadcrumb#breadcrumbroot
|
|
12
15
|
*
|
|
13
16
|
* @example
|
|
14
17
|
* ```tsx
|
|
@@ -29,13 +32,30 @@ import { ComponentProps, ReactNode } from "react";
|
|
|
29
32
|
* </Breadcrumb.Root>
|
|
30
33
|
* ```
|
|
31
34
|
*/
|
|
32
|
-
declare const Root: ({ asChild, children, "data-slot": dataSlot, ref, ...props }: ComponentProps<"nav"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
|
|
35
|
+
declare const Root: ({ asChild, children, className, "data-slot": dataSlot, ref, ...props }: ComponentProps<"nav"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
|
|
33
36
|
/**
|
|
34
37
|
* The ordered list of crumbs. Renders an `<ol>` — an **ordered** list, because
|
|
35
38
|
* the order of the items is the hierarchy, from the root to the current page.
|
|
36
|
-
* Lays crumbs out
|
|
39
|
+
* Lays the crumbs out in one row of muted, small text.
|
|
37
40
|
*
|
|
38
|
-
*
|
|
41
|
+
* A trail wider than its container scrolls sideways instead of wrapping to a
|
|
42
|
+
* second row, which a one-row app header has no space for. Its edges carry the
|
|
43
|
+
* same `scroll-fade-x` mask as `Tabs.List`: an edge with crumbs beyond it fades
|
|
44
|
+
* out, and an edge with nothing beyond it stays flush.
|
|
45
|
+
*
|
|
46
|
+
* The trail keeps its end in view, because the end is the current page. It
|
|
47
|
+
* scrolls itself there whenever that end moves — on mount, when a navigation
|
|
48
|
+
* swaps the crumbs, and when the row around it resizes — and leaves the reader's
|
|
49
|
+
* own scroll position alone the rest of the time, including while a crumb holds
|
|
50
|
+
* focus. Tabbing to a crumb the trail has scrolled past is the browser's own
|
|
51
|
+
* job, and `scroll-padding` the width of the fade zone is what lands that crumb
|
|
52
|
+
* clear of the fade rather than under it.
|
|
53
|
+
*
|
|
54
|
+
* To wrap instead, pass `className="flex-wrap overflow-x-visible"`. The mask
|
|
55
|
+
* needs a scrollport to animate against, so without one it renders fully
|
|
56
|
+
* opaque and the row wraps as it did before.
|
|
57
|
+
*
|
|
58
|
+
* @see https://mantle.ngrok.com/components/navigation/breadcrumb#breadcrumblist
|
|
39
59
|
*
|
|
40
60
|
* @example
|
|
41
61
|
* ```tsx
|
|
@@ -61,7 +81,11 @@ declare const List: ({ asChild, children, className, "data-slot": dataSlot, ref,
|
|
|
61
81
|
* A single crumb. Renders an `<li>` (`role="listitem"`) that lays out its
|
|
62
82
|
* content — a `Breadcrumb.Link` or `Breadcrumb.Page` — inline.
|
|
63
83
|
*
|
|
64
|
-
*
|
|
84
|
+
* The crumb never shrinks (`shrink-0`). A squeezed crumb would break its own
|
|
85
|
+
* label across two lines, so a trail too wide for its container scrolls in
|
|
86
|
+
* `Breadcrumb.List` instead.
|
|
87
|
+
*
|
|
88
|
+
* @see https://mantle.ngrok.com/components/navigation/breadcrumb#breadcrumbitem
|
|
65
89
|
*
|
|
66
90
|
* @example
|
|
67
91
|
* ```tsx
|
|
@@ -168,7 +192,10 @@ type BreadcrumbSeparatorProps = Omit<ComponentProps<"li">, "children"> & ({
|
|
|
168
192
|
* your own children (e.g. a slash) to replace it. With `asChild`, children
|
|
169
193
|
* are required — the child element is what renders.
|
|
170
194
|
*
|
|
171
|
-
*
|
|
195
|
+
* Like `Breadcrumb.Item`, the divider never shrinks (`shrink-0`), so a trail
|
|
196
|
+
* too wide for its container scrolls in `Breadcrumb.List` instead.
|
|
197
|
+
*
|
|
198
|
+
* @see https://mantle.ngrok.com/components/navigation/breadcrumb#breadcrumbseparator
|
|
172
199
|
*
|
|
173
200
|
* @example
|
|
174
201
|
* ```tsx
|
|
@@ -189,12 +216,13 @@ type BreadcrumbSeparatorProps = Omit<ComponentProps<"li">, "children"> & ({
|
|
|
189
216
|
* </Breadcrumb.Root>
|
|
190
217
|
* ```
|
|
191
218
|
*/
|
|
192
|
-
declare const Separator: ({ asChild, children, "data-slot": dataSlot, ref, ...props }: BreadcrumbSeparatorProps & WithDataSlot) => import("react").JSX.Element;
|
|
219
|
+
declare const Separator: ({ asChild, children, className, "data-slot": dataSlot, ref, ...props }: BreadcrumbSeparatorProps & WithDataSlot) => import("react").JSX.Element;
|
|
193
220
|
/**
|
|
194
221
|
* Compound component for WAI-ARIA breadcrumb navigation — the path from a
|
|
195
222
|
* root to the current page as an ordered list of links inside a labeled
|
|
196
223
|
* `<nav>` landmark. Router-agnostic: compose `Breadcrumb.Link` onto your app
|
|
197
|
-
* router's link via `asChild`.
|
|
224
|
+
* router's link via `asChild`. A trail too wide for its row scrolls sideways
|
|
225
|
+
* with faded edges instead of wrapping, and starts at the current page.
|
|
198
226
|
*
|
|
199
227
|
* @see https://mantle.ngrok.com/components/navigation/breadcrumb
|
|
200
228
|
*
|
|
@@ -233,9 +261,10 @@ declare const Breadcrumb: {
|
|
|
233
261
|
/**
|
|
234
262
|
* The breadcrumb landmark. Renders a `<nav>` with a default
|
|
235
263
|
* `aria-label="Breadcrumb"` — pass your own `aria-label` to override it.
|
|
236
|
-
* Carries no visual styling
|
|
264
|
+
* Carries no visual styling; `min-w-0` is what lets the landmark shrink
|
|
265
|
+
* inside a flex row so the trail scrolls.
|
|
237
266
|
*
|
|
238
|
-
* @see https://mantle.ngrok.com/components/navigation/breadcrumb
|
|
267
|
+
* @see https://mantle.ngrok.com/components/navigation/breadcrumb#breadcrumbroot
|
|
239
268
|
*
|
|
240
269
|
* @example
|
|
241
270
|
* ```tsx
|
|
@@ -259,9 +288,11 @@ declare const Breadcrumb: {
|
|
|
259
288
|
readonly Root: typeof Root;
|
|
260
289
|
/**
|
|
261
290
|
* The ordered list of crumbs. Renders an `<ol>` — the order of the items
|
|
262
|
-
* is the hierarchy, from the root to the current page.
|
|
291
|
+
* is the hierarchy, from the root to the current page. A trail wider than
|
|
292
|
+
* its container scrolls sideways with a faded edge instead of wrapping, and
|
|
293
|
+
* starts at the current page.
|
|
263
294
|
*
|
|
264
|
-
* @see https://mantle.ngrok.com/components/navigation/breadcrumb
|
|
295
|
+
* @see https://mantle.ngrok.com/components/navigation/breadcrumb#breadcrumblist
|
|
265
296
|
*
|
|
266
297
|
* @example
|
|
267
298
|
* ```tsx
|
|
@@ -285,9 +316,10 @@ declare const Breadcrumb: {
|
|
|
285
316
|
readonly List: typeof List;
|
|
286
317
|
/**
|
|
287
318
|
* A single crumb. Renders an `<li>` containing a `Breadcrumb.Link` or
|
|
288
|
-
* `Breadcrumb.Page`.
|
|
319
|
+
* `Breadcrumb.Page`. The crumb never shrinks, so a wide trail scrolls
|
|
320
|
+
* instead of breaking a label across two lines.
|
|
289
321
|
*
|
|
290
|
-
* @see https://mantle.ngrok.com/components/navigation/breadcrumb
|
|
322
|
+
* @see https://mantle.ngrok.com/components/navigation/breadcrumb#breadcrumbitem
|
|
291
323
|
*
|
|
292
324
|
* @example
|
|
293
325
|
* ```tsx
|
|
@@ -365,9 +397,10 @@ declare const Breadcrumb: {
|
|
|
365
397
|
/**
|
|
366
398
|
* A purely visual divider between crumbs, hidden from assistive
|
|
367
399
|
* technology (`role="presentation"` + `aria-hidden`). Children default to
|
|
368
|
-
* a caret icon; pass your own (e.g. a slash) to replace it.
|
|
400
|
+
* a caret icon; pass your own (e.g. a slash) to replace it. Like the crumbs
|
|
401
|
+
* it divides, it never shrinks.
|
|
369
402
|
*
|
|
370
|
-
* @see https://mantle.ngrok.com/components/navigation/breadcrumb
|
|
403
|
+
* @see https://mantle.ngrok.com/components/navigation/breadcrumb#breadcrumbseparator
|
|
371
404
|
*
|
|
372
405
|
* @example
|
|
373
406
|
* ```tsx
|
package/dist/breadcrumb.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-lZ48P8Nn.js";import{t as
|
|
1
|
+
import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-BdBMM9ga.js";import{t as n}from"./cx-IiQEAKf5.js";import{t as r}from"./icon-lZ48P8Nn.js";import{t as i}from"./data-slot-EM6s2WEU.js";import{t as a}from"./slot-DpNWVci8.js";import{cloneElement as o,isValidElement as s,useEffect as c,useRef as l}from"react";import{jsx as u}from"react/jsx-runtime";import{CaretRightIcon as d}from"@phosphor-icons/react/CaretRight";const f=({asChild:e,children:t,className:r,"data-slot":o,ref:s,...c})=>u(e?a:`nav`,{ref:s,"data-slot":i(o,`breadcrumb`),"aria-label":`Breadcrumb`,className:n(`min-w-0`,r),...c,children:t});function p(e,t){let n=e.scrollWidth-e.clientWidth;return n===t||e.contains(document.activeElement)?t:(e.scrollLeft=n,n)}const m={Root:f,List:({asChild:r,children:o,className:s,"data-slot":d,ref:f,...m})=>{let h=r?a:`ol`,g=l(null),_=t(g,f),v=l(void 0);return e(()=>{let e=g.current;e!=null&&(v.current=p(e,v.current))}),c(()=>{let e=g.current;if(e==null)return;let t=new ResizeObserver(()=>{v.current=p(e,v.current)});return t.observe(e),()=>{t.disconnect()}},[]),u(h,{ref:_,"data-slot":i(d,`breadcrumb-list`),className:n(`text-muted flex items-center gap-1.5 text-sm`,`scroll-fade-x min-w-0 overflow-x-auto overscroll-x-none`,`-m-1 p-1`,`scroll-px-10`,s),...m,children:o})},Item:({asChild:e,children:t,className:r,"data-slot":o,ref:s,...c})=>u(e?a:`li`,{ref:s,"data-slot":i(o,`breadcrumb-item`),className:n(`inline-flex shrink-0 items-center gap-1.5`,r),...c,children:t}),Link:({asChild:e,children:t,className:r,"data-slot":o,ref:s,...c})=>u(e?a:`a`,{ref:s,"data-slot":i(o,`breadcrumb-link`),className:n(`hover:text-strong transition-colors`,r),...c,children:t}),Page:({asChild:e,children:t,className:r,"data-slot":c,ref:l,...d})=>{let f=e?a:`span`,p=e&&s(t)?o(t,{"aria-current":`page`}):t;return u(f,{ref:l,"data-slot":i(c,`breadcrumb-page`),className:n(`text-muted`,r),...d,"aria-current":`page`,children:p})},Separator:({asChild:e,children:t,className:c,"data-slot":l,ref:f,...p})=>{let m=e?a:`li`,h=e&&s(t)?o(t,{role:`presentation`,"aria-hidden":`true`}):t??u(r,{svg:u(d,{}),className:`size-3.5`});return u(m,{ref:f,"data-slot":i(l,`breadcrumb-separator`),className:n(`shrink-0`,c),...p,role:`presentation`,"aria-hidden":`true`,children:h})}};export{m as Breadcrumb};
|
package/dist/browser-only.d.ts
CHANGED
|
@@ -15,8 +15,8 @@ type Props = {
|
|
|
15
15
|
fallback?: ReactNode;
|
|
16
16
|
};
|
|
17
17
|
/**
|
|
18
|
-
* A wrapper component that
|
|
19
|
-
* after hydration
|
|
18
|
+
* A wrapper component that renders its children in the browser only,
|
|
19
|
+
* after hydration completes.
|
|
20
20
|
*
|
|
21
21
|
* This is useful for components that rely on browser-only APIs
|
|
22
22
|
* (e.g. `window`, `document`, `localStorage`, media queries) or that
|
|
@@ -45,7 +45,7 @@ declare function BrowserOnly({ children, fallback }: Props): ReactNode;
|
|
|
45
45
|
* Returns `true` when running in a windowed browser context where both
|
|
46
46
|
* `window` and a real `document` exist. This will be `false` in SSR/Node.
|
|
47
47
|
*
|
|
48
|
-
* Note:
|
|
48
|
+
* Note: In a test environment with a DOM shim (e.g. JSDOM), this returns `true`.
|
|
49
49
|
*
|
|
50
50
|
* @returns {boolean} `true` if DOM APIs are available; otherwise `false`.
|
|
51
51
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as WithAsChild } from "./as-child-D23mGo4f.js";
|
|
2
2
|
import { r as VariantProps } from "./index-DA4ig3gj.js";
|
|
3
|
-
import "./button-
|
|
4
|
-
import "./button-
|
|
3
|
+
import "./button-PoIujPMX.js";
|
|
4
|
+
import "./button-DJ7AAgII.js";
|
|
5
5
|
import { ComponentProps } from "react";
|
|
6
6
|
//#region src/components/button/button-group.d.ts
|
|
7
7
|
declare const buttonGroupVariants: (props?: ({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{cva as t}from"class-variance-authority";const n=e(`icon-button`,`inline-flex shrink-0 items-center justify-center rounded-[var(--icon-button-border-radius,0.375rem)] border`,`focus:outline-hidden focus-visible:ring-4`,`disabled:cursor-default disabled:opacity-50`,`not-disabled:active:scale-97 ease-out transition-transform duration-150`),r=t(n,{variants:{appearance:{ghost:`text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700 border-transparent`,outlined:`border-accent-600 bg-form text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-accent-700 not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700`},intent:{accent:``,danger:``,neutral:``},isLoading:{false:``,true:`opacity-50`},size:{xs:`size-6`,sm:`size-7`,md:`size-9`,lg:`size-10`,xl:`size-12`}},defaultVariants:{intent:`neutral`,size:`md`},compoundVariants:[{appearance:`ghost`,intent:`danger`,class:`text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700 border-transparent`},{appearance:`outlined`,intent:`danger`,class:`border-danger-600 bg-form text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:border-danger-700 not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700`},{appearance:`ghost`,intent:`neutral`,class:`text-strong focus-visible:ring-focus-accent not-disabled:hover:bg-neutral-500/10 not-disabled:hover:text-strong border-transparent`},{appearance:`outlined`,intent:`neutral`,class:`border-form bg-form text-strong focus-visible:border-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-neutral-400 not-disabled:hover:bg-form-hover not-disabled:hover:text-strong focus-visible:not-disabled:hover:border-accent-600 focus-visible:not-disabled:active:border-accent-600`}]});export{r as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-lZ48P8Nn.js";import{t as n}from"./slot-
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-lZ48P8Nn.js";import{t as n}from"./slot-DpNWVci8.js";import{t as r}from"./booleanish-BfvnW6vy.js";import{t as i}from"./button-BLDjW1u9.js";import{Children as a,cloneElement as o,isValidElement as s}from"react";import c from"tiny-invariant";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";import{CircleNotchIcon as f}from"@phosphor-icons/react/CircleNotch";const p=({"aria-disabled":p,appearance:m,asChild:h=!1,children:g,className:_,disabled:v,icon:y,intent:b,isLoading:x=!1,label:S,ref:C,size:w=`md`,type:T,...E})=>{let D=r(p??v??x),O=x?u(f,{className:`animate-spin`}):y,k={"aria-disabled":D,"data-slot":`icon-button`,className:e(i({appearance:m,intent:b,isLoading:x,size:w}),_),"data-appearance":m,"data-disabled":D,"data-icon-button":!0,"data-intent":b,"data-loading":x,"data-size":w,disabled:D,ref:C,...E},A=d(l,{children:[u(`span`,{className:`sr-only`,children:S}),u(t,{svg:O})]});return h?(c(s(g)&&a.only(g),"When using `asChild`, IconButton must be passed a single child as a JSX tag."),u(n,{...k,children:o(g,{},A)})):u(`button`,{...k,type:T??`button`,children:A})};export{p as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-lZ48P8Nn.js";import{t as n}from"./slot-
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-lZ48P8Nn.js";import{t as n}from"./slot-DpNWVci8.js";import{t as r}from"./booleanish-BfvnW6vy.js";import{t as i}from"./clsx-DUGZgXfJ.js";import{Children as a,cloneElement as o,isValidElement as s}from"react";import c from"tiny-invariant";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";import{cva as f}from"class-variance-authority";import{CircleNotchIcon as p}from"@phosphor-icons/react/CircleNotch";const m=f(``,{variants:{appearance:{filled:`bg-filled-accent text-white focus-visible:ring-focus-accent not-disabled:hover:bg-filled-accent-hover border border-transparent text-sm font-medium`,ghost:`text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700 border border-transparent text-sm font-medium`,outlined:`border-accent-600 bg-form text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-accent-700 not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700 border text-sm font-medium`,link:`text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:underline group/button-link border-transparent`},isLoading:{false:``,true:`opacity-50`},intent:{accent:``,danger:``,neutral:``},size:{xs:``,sm:``,md:``,lg:``,xl:``}},defaultVariants:{isLoading:!1,size:`md`},compoundVariants:[{appearance:[`filled`,`ghost`,`outlined`],size:`xs`,class:`h-6 px-2`},{appearance:[`filled`,`ghost`,`outlined`],size:`sm`,class:`h-7 px-2.5`},{appearance:[`filled`,`ghost`,`outlined`],size:`md`,class:`h-9 px-3`},{appearance:[`filled`,`ghost`,`outlined`],size:`lg`,class:`h-10 px-3.5`},{appearance:[`filled`,`ghost`,`outlined`],size:`xl`,class:`h-12 px-4`},{appearance:`ghost`,intent:`danger`,class:`text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700 border-transparent`},{appearance:`outlined`,intent:`danger`,class:`border-danger-600 bg-form text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:border-danger-700 not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700`},{appearance:`filled`,intent:`danger`,class:`bg-filled-danger focus-visible:ring-focus-danger not-disabled:hover:bg-filled-danger-hover border-transparent`},{appearance:`link`,intent:`danger`,class:`text-danger-600 focus-visible:ring-focus-danger`},{appearance:`ghost`,intent:`neutral`,class:`text-strong focus-visible:ring-focus-accent not-disabled:hover:bg-neutral-500/10 not-disabled:hover:text-strong border-transparent`},{appearance:`outlined`,intent:`neutral`,class:`border-form bg-form text-strong focus-visible:border-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-neutral-400 not-disabled:hover:bg-form-hover not-disabled:hover:text-strong focus-visible:not-disabled:hover:border-accent-600`},{appearance:`filled`,intent:`neutral`,class:`bg-filled-neutral not-disabled:hover:bg-filled-neutral-hover border-transparent focus-visible:border-transparent text-neutral-50`},{appearance:`link`,intent:`neutral`,class:`text-strong focus-visible:ring-focus-accent`}]}),h={xs:`ps-1.5`,sm:`ps-2`,md:`ps-2.5`,lg:`ps-3`,xl:`ps-3.5`},g={xs:`pe-1.5`,sm:`pe-2`,md:`pe-2.5`,lg:`pe-3`,xl:`pe-3.5`},_=({"aria-disabled":f,appearance:_,asChild:v,children:y,className:b,disabled:x,icon:S,iconPlacement:C=`start`,intent:w,isLoading:T=!1,ref:E,size:D=`md`,type:O,...k})=>{let A=r(f??x??T),j=T?u(p,{className:`animate-spin`}):S,M=j&&_!==`link`,N={"aria-disabled":A,"data-slot":`button`,className:e(`inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md`,`focus:outline-hidden focus-visible:ring-4`,`disabled:cursor-default disabled:opacity-50`,`not-disabled:active:scale-97 ease-out transition-transform duration-150`,m({appearance:_,intent:w,isLoading:T,size:D}),_!==`link`&&`font-sans`,M&&C===`start`&&h[D],M&&C===`end`&&g[D],b),"data-appearance":_,"data-disabled":A,"data-intent":w,"data-loading":T,"data-size":_===`link`?void 0:D,disabled:A,ref:E,...k};return v?(c(s(y)&&a.only(y),"When using `asChild`, Button must be passed a single child as a JSX tag."),u(n,{...N,children:o(y,{},d(l,{children:[j&&u(t,{svg:j,className:i(C===`end`&&`order-last`)}),y.props.children]}))})):d(`button`,{...N,type:O??`button`,children:[j&&u(t,{svg:j,className:i(C===`end`&&`order-last`)}),y]})};export{_ as t};
|
|
@@ -56,7 +56,8 @@ type IconButtonProps = ComponentProps<"button"> & WithAsChild & Omit<IconButtonV
|
|
|
56
56
|
*/
|
|
57
57
|
intent: ButtonIntent;
|
|
58
58
|
/**
|
|
59
|
-
* The accessible label for the icon.
|
|
59
|
+
* The accessible label for the icon. `IconButton` hides this label visually
|
|
60
|
+
* and announces it to screen readers, like the `alt` text on an `<img>`.
|
|
60
61
|
*/
|
|
61
62
|
label: string;
|
|
62
63
|
/**
|
|
@@ -84,11 +85,8 @@ type IconButtonProps = ComponentProps<"button"> & WithAsChild & Omit<IconButtonV
|
|
|
84
85
|
type?: ComponentProps<"button">["type"];
|
|
85
86
|
};
|
|
86
87
|
/**
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
* other assistive technology. Once activated, it then performs an action, such
|
|
90
|
-
* as submitting a form or opening a dialog.
|
|
91
|
-
* Renders only a single icon as children with an accessible, screen-reader-only label.
|
|
88
|
+
* A button that renders one icon and nothing else. Its required `label` prop
|
|
89
|
+
* carries the accessible name.
|
|
92
90
|
*
|
|
93
91
|
* `appearance` (visual weight) and `intent` (tone) are required — every call
|
|
94
92
|
* site states what it means; there are no implicit defaults. `intent="neutral"`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-DpNWVci8.js";import{jsx as n}from"react/jsx-runtime";import{cva as r}from"class-variance-authority";const i=r(`border-form inline-flex items-center rounded-md`,{variants:{appearance:{panel:`bg-form gap-0.5 border p-0.75 [--icon-button-border-radius:0.125rem] [&>.separator]:mx-px`,ghost:`gap-0.5`,outlined:``}}}),a=({appearance:r,asChild:a,className:o,children:s,ref:c,...l})=>n(a?t:`div`,{"data-slot":`button-group`,className:e(i({appearance:r}),o),ref:c,...l,children:s});export{a as t};
|
|
@@ -11,7 +11,7 @@ import { ComponentProps, ReactNode } from "react";
|
|
|
11
11
|
* - `"outlined"` — bordered on the form background
|
|
12
12
|
* - `"ghost"` — no border or fill until hovered
|
|
13
13
|
* - `"link"` — renders like an inline link (inherits surrounding typography)
|
|
14
|
-
* while remaining a button that
|
|
14
|
+
* while remaining a button that runs an action
|
|
15
15
|
*/
|
|
16
16
|
type ButtonAppearance = "filled" | "ghost" | "link" | "outlined";
|
|
17
17
|
declare const buttonVariants: (props?: ({
|
|
@@ -85,7 +85,7 @@ type ButtonProps = ComponentProps<"button"> & Omit<ButtonVariants, "appearance"
|
|
|
85
85
|
/**
|
|
86
86
|
* Renders a button or a component that looks like a button, an interactive
|
|
87
87
|
* element activated by a user with a mouse, keyboard, finger, voice command, or
|
|
88
|
-
* other assistive technology. Once activated, it then
|
|
88
|
+
* other assistive technology. Once activated, it then runs an action, such
|
|
89
89
|
* as submitting a form or opening a dialog.
|
|
90
90
|
*
|
|
91
91
|
* `appearance` (visual weight) and `intent` (tone) are required — every call
|
package/dist/button.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as ButtonIntent } from "./button-DdSKSj1c.js";
|
|
2
|
-
import { n as ButtonAppearance, r as ButtonProps, t as Button } from "./button-
|
|
3
|
-
import { n as IconButtonProps, r as IconButtonAppearance, t as IconButton } from "./button-
|
|
4
|
-
import { n as ButtonGroupProps, t as ButtonGroup } from "./button-
|
|
2
|
+
import { n as ButtonAppearance, r as ButtonProps, t as Button } from "./button-PoIujPMX.js";
|
|
3
|
+
import { n as IconButtonProps, r as IconButtonAppearance, t as IconButton } from "./button-DJ7AAgII.js";
|
|
4
|
+
import { n as ButtonGroupProps, t as ButtonGroup } from "./button-BIf69CSV.js";
|
|
5
5
|
import { t as ButtonSize } from "./button-BCoI4bhP.js";
|
|
6
6
|
export { Button, type ButtonAppearance, ButtonGroup, type ButtonGroupProps, type ButtonIntent, type ButtonProps, type ButtonSize, IconButton, type IconButtonAppearance, type IconButtonProps };
|
package/dist/button.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./button-
|
|
1
|
+
import{t as e}from"./button-Cnja9Bsr.js";import{t}from"./button-CCkGqE1t.js";import{t as n}from"./button-DmJkYfyl.js";export{e as Button,n as ButtonGroup,t as IconButton};
|
package/dist/calendar.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ type CalendarProps = ComponentProps<typeof DayPicker>;
|
|
|
5
5
|
/**
|
|
6
6
|
* A calendar component that allows users to select a date or a range of dates.
|
|
7
7
|
*
|
|
8
|
-
* @preview
|
|
8
|
+
* @preview The API is not stable and may change.
|
|
9
9
|
* There may also be bugs! Please file an issue if you find any! <3
|
|
10
10
|
*
|
|
11
11
|
* @see https://mantle.ngrok.com/components/preview/calendar
|
package/dist/calendar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-lZ48P8Nn.js";import{t as n}from"./button-
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-lZ48P8Nn.js";import{t as n}from"./button-BLDjW1u9.js";import{jsx as r}from"react/jsx-runtime";import{CaretRightIcon as i}from"@phosphor-icons/react/CaretRight";import{CaretLeftIcon as a}from"@phosphor-icons/react/CaretLeft";import{DayPicker as o}from"react-day-picker";const s=n({appearance:`ghost`,intent:`neutral`,size:`sm`});function c({className:n,classNames:c,showOutsideDays:l=!1,...u}){return r(o,{"data-slot":`calendar`,animate:!1,components:{Chevron:e=>{let n=e.orientation===`left`?r(a,{}):r(i,{});return r(t,{svg:n,className:`size-4`})}},classNames:{root:e(`isolate`,n),button_next:e(s,`absolute right-0`),button_previous:e(s,`absolute left-0`),caption_label:`text-sm font-medium`,day:e(`overflow-hidden text-center text-sm p-0 relative focus-within:relative focus-within:z-20 size-7 rounded-md`,u.mode===`range`&&`first:has-aria-selected:rounded-l-md last:has-aria-selected:rounded-r-md`),day_button:`day size-full rounded-md not-aria-selected:not-disabled:hover:bg-filled-accent/15`,disabled:`text-muted opacity-50`,hidden:`invisible`,month:`space-y-4`,month_caption:`flex justify-center pt-1 relative items-center`,month_grid:`w-full border-collapse space-y-1`,months:`flex flex-col sm:flex-row gap-y-4 sm:gap-x-4 sm:gap-y-0 relative max-w-min`,nav:`flex items-center absolute inset-x-0 top-1 h-5 justify-between z-10`,outside:`day-outside aria-selected:text-on-filled opacity-50 text-muted`,range_end:`day-range-end [&:not(.day-range-start)]:rounded-l-none`,range_middle:`day-range-middle not-disabled:aria-selected:bg-filled-accent/15 aria-selected:text-strong rounded-none not-disabled:aria-selected:hover:bg-filled-accent/25`,range_start:`day-range-start [&:not(.day-range-end)]:rounded-r-none`,selected:`not-disabled:bg-filled-accent text-on-filled not-disabled:hover:bg-filled-accent`,today:`not-aria-selected:not-disabled:text-accent-600 font-medium not-aria-selected:not-disabled:bg-filled-accent/10 rounded-md`,week:`flex w-full mt-1`,weekday:`text-body w-7 text-[0.8rem] text-center font-normal`,weekdays:`flex`,...c},showOutsideDays:l,...u})}export{c as Calendar};
|
package/dist/card.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { ComponentProps } from "react";
|
|
|
4
4
|
//#region src/components/card/card.d.ts
|
|
5
5
|
type CardProps = ComponentProps<"div"> & WithAsChild;
|
|
6
6
|
/**
|
|
7
|
-
* A container that
|
|
8
|
-
*
|
|
7
|
+
* A container that displays content in a box resembling a physical card. The
|
|
8
|
+
* outermost part — every other `Card` part nests inside it.
|
|
9
9
|
*
|
|
10
10
|
* @see https://mantle.ngrok.com/components/structure/card#cardroot
|
|
11
11
|
*
|
|
@@ -59,7 +59,8 @@ declare const Root: ({ asChild, className, children, ref, ...rest }: CardProps)
|
|
|
59
59
|
*/
|
|
60
60
|
declare const Body: ({ asChild, className, children, ref, ...rest }: CardProps) => import("react").JSX.Element;
|
|
61
61
|
/**
|
|
62
|
-
* The
|
|
62
|
+
* The band below `Card.Body`. Unless it is the first child, it draws a top border
|
|
63
|
+
* dividing the two. Pass it as a direct child of `Card.Root`.
|
|
63
64
|
*
|
|
64
65
|
* @see https://mantle.ngrok.com/components/structure/card#cardfooter
|
|
65
66
|
*
|
|
@@ -80,7 +81,8 @@ declare const Body: ({ asChild, className, children, ref, ...rest }: CardProps)
|
|
|
80
81
|
*/
|
|
81
82
|
declare const Footer: ({ asChild, className, children, ref, ...rest }: CardProps) => import("react").JSX.Element;
|
|
82
83
|
/**
|
|
83
|
-
* The
|
|
84
|
+
* The band above `Card.Body` that holds `Card.Title`. Pass it as a direct child
|
|
85
|
+
* of `Card.Root`.
|
|
84
86
|
*
|
|
85
87
|
* @see https://mantle.ngrok.com/components/structure/card#cardheader
|
|
86
88
|
*
|
|
@@ -102,11 +104,9 @@ declare const Footer: ({ asChild, className, children, ref, ...rest }: CardProps
|
|
|
102
104
|
declare const Header: ({ asChild, className, children, ref, ...rest }: CardProps) => import("react").JSX.Element;
|
|
103
105
|
type CardTitleProps = ComponentProps<"h3"> & WithAsChild;
|
|
104
106
|
/**
|
|
105
|
-
* The
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
* element by using the `asChild` prop. It is preferred to use a heading element
|
|
109
|
-
* (h1-h6) for accessibility reasons.
|
|
107
|
+
* The heading inside `Card.Header`. Renders an `h3` by default — pass `asChild`
|
|
108
|
+
* to fit the surrounding document outline. Keep it a heading element
|
|
109
|
+
* (`h1`-`h6`) for accessibility.
|
|
110
110
|
*
|
|
111
111
|
* @see https://mantle.ngrok.com/components/structure/card#cardtitle
|
|
112
112
|
*
|
|
@@ -127,8 +127,7 @@ type CardTitleProps = ComponentProps<"h3"> & WithAsChild;
|
|
|
127
127
|
*/
|
|
128
128
|
declare const Title: ({ className, asChild, ref, ...props }: CardTitleProps) => import("react").JSX.Element;
|
|
129
129
|
/**
|
|
130
|
-
* A container that
|
|
131
|
-
* physical card.
|
|
130
|
+
* A container that displays content in a box resembling a physical card.
|
|
132
131
|
*
|
|
133
132
|
* @see https://mantle.ngrok.com/components/structure/card
|
|
134
133
|
*
|
|
@@ -165,7 +164,7 @@ declare const Title: ({ className, asChild, ref, ...props }: CardTitleProps) =>
|
|
|
165
164
|
*/
|
|
166
165
|
declare const Card: {
|
|
167
166
|
/**
|
|
168
|
-
* A container that
|
|
167
|
+
* A container that displays content in a box resembling a physical card.
|
|
169
168
|
*
|
|
170
169
|
* @see https://mantle.ngrok.com/components/structure/card#cardroot
|
|
171
170
|
*
|
|
@@ -195,7 +194,8 @@ declare const Card: {
|
|
|
195
194
|
*/
|
|
196
195
|
readonly Body: typeof Body;
|
|
197
196
|
/**
|
|
198
|
-
* The
|
|
197
|
+
* The band below `Card.Body`. Unless it is the first child, it draws a top border
|
|
198
|
+
* dividing the two. Pass it as a direct child of `Card.Root`.
|
|
199
199
|
*
|
|
200
200
|
* @see https://mantle.ngrok.com/components/structure/card#cardfooter
|
|
201
201
|
*
|
|
@@ -216,7 +216,7 @@ declare const Card: {
|
|
|
216
216
|
*/
|
|
217
217
|
readonly Footer: typeof Footer;
|
|
218
218
|
/**
|
|
219
|
-
* The
|
|
219
|
+
* The band above `Card.Body` that holds `Card.Title`.
|
|
220
220
|
*
|
|
221
221
|
* @see https://mantle.ngrok.com/components/structure/card#cardheader
|
|
222
222
|
*
|
|
@@ -237,7 +237,7 @@ declare const Card: {
|
|
|
237
237
|
*/
|
|
238
238
|
readonly Header: typeof Header;
|
|
239
239
|
/**
|
|
240
|
-
* The
|
|
240
|
+
* The heading inside `Card.Header`. Renders an `h3` by default.
|
|
241
241
|
*
|
|
242
242
|
* @see https://mantle.ngrok.com/components/structure/card#cardtitle
|
|
243
243
|
*
|
package/dist/card.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-DpNWVci8.js";import{jsx as n}from"react/jsx-runtime";const r={Root:({asChild:r=!1,className:i,children:a,ref:o,...s})=>n(r?t:`div`,{ref:o,"data-slot":`card`,className:e(`border-card bg-card relative rounded-md border`,i),...s,children:a}),Body:({asChild:r=!1,className:i,children:a,ref:o,...s})=>n(r?t:`div`,{ref:o,"data-slot":`card-body`,className:e(`p-6 border-t border-card-muted first:border-t-0`,i),...s,children:a}),Footer:({asChild:r=!1,className:i,children:a,ref:o,...s})=>n(r?t:`div`,{ref:o,"data-slot":`card-footer`,className:e(`px-6 py-3 border-t border-card-muted first:border-t-0`,i),...s,children:a}),Header:({asChild:r=!1,className:i,children:a,ref:o,...s})=>n(r?t:`div`,{ref:o,"data-slot":`card-header`,className:e(`px-6 py-3 border-t border-card-muted first:border-t-0`,i),...s,children:a}),Title:({className:r,asChild:i,ref:a,...o})=>n(i?t:`h3`,{ref:a,"data-slot":`card-title`,className:e(`text-strong text-base font-medium`,r),...o})};export{r as Card};
|
package/dist/centered-layout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-DpNWVci8.js";import{jsx as r}from"react/jsx-runtime";const i={Root:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`div`,{"data-slot":t(s,`centered-layout`),className:e(`flex min-h-full flex-col`,o),...c,children:a}),Notice:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`div`,{"data-slot":t(s,`centered-layout-notice`),className:e(`w-full shrink-0`,o),...c,children:a}),Header:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`header`,{"data-slot":t(s,`centered-layout-header`),className:e(`flex shrink-0 items-center px-4 py-4`,o),...c,children:a}),Body:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`div`,{"data-slot":t(s,`centered-layout-body`),className:e(`flex flex-1 flex-col items-center justify-center gap-6 py-4`,o),...c,children:a}),Footer:({asChild:i,children:a,className:o,"data-slot":s,...c})=>r(i?n:`footer`,{"data-slot":t(s,`centered-layout-footer`),className:e(`flex shrink-0 items-center px-4 py-4`,o),...c,children:a})};export{i as CenteredLayout};
|