@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
package/dist/strata.d.ts
ADDED
|
@@ -0,0 +1,544 @@
|
|
|
1
|
+
import { n as WithAsChild } from "./as-child-D23mGo4f.js";
|
|
2
|
+
import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
|
|
3
|
+
import { ComponentProps } from "react";
|
|
4
|
+
//#region src/components/strata/strata.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* The stack of sections. Renders a `<div>` with `divide-card-muted divide-y`, so
|
|
7
|
+
* a hairline falls between adjacent `Strata.Section` children and never above
|
|
8
|
+
* the first or below the last. Vertical rhythm belongs to `Section`
|
|
9
|
+
* (`py-8 first:pt-0`) rather than here, which keeps a lone `Section` usable
|
|
10
|
+
* without a `Root` around it. Set `--strata-columns` on `Root` to re-split
|
|
11
|
+
* every section at once — custom properties inherit, so one declaration reaches
|
|
12
|
+
* all of them.
|
|
13
|
+
*
|
|
14
|
+
* | Data Attribute | Value | Description |
|
|
15
|
+
* | -------------- | ----------- | ------------------------------------------------------------------ |
|
|
16
|
+
* | `data-slot` | `"strata"` | Stable styling hook. Survives `className` overrides and `asChild`. |
|
|
17
|
+
*
|
|
18
|
+
* @see https://mantle.ngrok.com/components/structure/strata#strataroot
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* <Strata.Root>
|
|
23
|
+
* <Strata.Section>
|
|
24
|
+
* <Strata.Header>
|
|
25
|
+
* <Strata.Title>Providers</Strata.Title>
|
|
26
|
+
* <Strata.Description>What providers keys may call.</Strata.Description>
|
|
27
|
+
* </Strata.Header>
|
|
28
|
+
* <Strata.Body>
|
|
29
|
+
* <ProviderScopePicker />
|
|
30
|
+
* </Strata.Body>
|
|
31
|
+
* </Strata.Section>
|
|
32
|
+
* <Strata.Section>
|
|
33
|
+
* <Strata.Header>
|
|
34
|
+
* <Strata.Title>Routing rules</Strata.Title>
|
|
35
|
+
* <Strata.Description>Define how requests are authenticated.</Strata.Description>
|
|
36
|
+
* </Strata.Header>
|
|
37
|
+
* <Strata.Body>
|
|
38
|
+
* <RoutingRuleList />
|
|
39
|
+
* </Strata.Body>
|
|
40
|
+
* </Strata.Section>
|
|
41
|
+
* </Strata.Root>
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
declare const Root: ({ asChild, children, className, "data-slot": dataSlot, ...props }: ComponentProps<"div"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
|
|
45
|
+
/**
|
|
46
|
+
* One titled band of the page. Renders a `<section>` that stacks
|
|
47
|
+
* `Strata.Header` above `Strata.Body` below the `md` breakpoint, then splits
|
|
48
|
+
* the two into a `1fr 2fr` grid at `md` and up. It carries its own vertical
|
|
49
|
+
* rhythm (`py-8 first:pt-0`), so it reads correctly as the only child of a
|
|
50
|
+
* `Root` and as one of many.
|
|
51
|
+
*
|
|
52
|
+
* The `<section>` takes no accessible name, which keeps it generic in the
|
|
53
|
+
* accessibility tree instead of adding one `region` landmark per band — the
|
|
54
|
+
* `Strata.Title` headings already carry the page outline, and a landmark list
|
|
55
|
+
* only stays useful while `main` and `nav` are easy to find in it. Set
|
|
56
|
+
* `aria-labelledby` to the `Title`'s `id` only when the section is a
|
|
57
|
+
* destination a reader jumps back to, not merely a division of the page. To
|
|
58
|
+
* tell apart controls that read alike across two sections, reach for
|
|
59
|
+
* `Field.Set` and `Field.Legend` instead — assistive technology announces a
|
|
60
|
+
* landmark on entry, never per control.
|
|
61
|
+
*
|
|
62
|
+
* | CSS Variable | Default | Description |
|
|
63
|
+
* | ------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------- |
|
|
64
|
+
* | `--strata-columns` | `1fr 2fr` | The `grid-template-columns` value at `md` and up. Set it on `Strata.Root` to re-split every section, or here for this section alone. |
|
|
65
|
+
*
|
|
66
|
+
* | Data Attribute | Value | Description |
|
|
67
|
+
* | -------------- | ------------------- | ------------------------------------------------------------------ |
|
|
68
|
+
* | `data-slot` | `"strata-section"` | Stable styling hook. Survives `className` overrides and `asChild`. |
|
|
69
|
+
*
|
|
70
|
+
* @see https://mantle.ngrok.com/components/structure/strata#stratasection
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```tsx
|
|
74
|
+
* <Strata.Root>
|
|
75
|
+
* <Strata.Section>
|
|
76
|
+
* <Strata.Header>
|
|
77
|
+
* <Strata.Title>Providers</Strata.Title>
|
|
78
|
+
* <Strata.Description>What providers keys may call.</Strata.Description>
|
|
79
|
+
* </Strata.Header>
|
|
80
|
+
* <Strata.Body>
|
|
81
|
+
* <ProviderScopePicker />
|
|
82
|
+
* </Strata.Body>
|
|
83
|
+
* </Strata.Section>
|
|
84
|
+
* <Strata.Section>
|
|
85
|
+
* <Strata.Header>
|
|
86
|
+
* <Strata.Title>Routing rules</Strata.Title>
|
|
87
|
+
* <Strata.Description>Define how requests are authenticated.</Strata.Description>
|
|
88
|
+
* </Strata.Header>
|
|
89
|
+
* <Strata.Body>
|
|
90
|
+
* <RoutingRuleList />
|
|
91
|
+
* </Strata.Body>
|
|
92
|
+
* </Strata.Section>
|
|
93
|
+
* </Strata.Root>
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
declare const Section: ({ asChild, children, className, "data-slot": dataSlot, ...props }: ComponentProps<"section"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
|
|
97
|
+
/**
|
|
98
|
+
* A section's introductory column — its `Strata.Title` and
|
|
99
|
+
* `Strata.Description`. Renders a `<header>` with `flex flex-col gap-2`, so
|
|
100
|
+
* anything else composed in (a `Badge`, a count) picks up the same spacing. At
|
|
101
|
+
* `md` and up it takes the grid's first column; below the breakpoint it stacks
|
|
102
|
+
* above `Strata.Body`.
|
|
103
|
+
*
|
|
104
|
+
* Why `<header>`: it groups the introductory content of its nearest sectioning
|
|
105
|
+
* ancestor, which is `Strata.Section`'s `<section>`. Nested inside sectioning
|
|
106
|
+
* content, a `<header>` is not the `banner` landmark, so a page carries as many
|
|
107
|
+
* as it has sections.
|
|
108
|
+
*
|
|
109
|
+
* | Data Attribute | Value | Description |
|
|
110
|
+
* | -------------- | ------------------ | ------------------------------------------------------------------ |
|
|
111
|
+
* | `data-slot` | `"strata-header"` | Stable styling hook. Survives `className` overrides and `asChild`. |
|
|
112
|
+
*
|
|
113
|
+
* @see https://mantle.ngrok.com/components/structure/strata#strataheader
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```tsx
|
|
117
|
+
* <Strata.Root>
|
|
118
|
+
* <Strata.Section>
|
|
119
|
+
* <Strata.Header>
|
|
120
|
+
* <Strata.Title>Providers</Strata.Title>
|
|
121
|
+
* <Strata.Description>What providers keys may call.</Strata.Description>
|
|
122
|
+
* </Strata.Header>
|
|
123
|
+
* <Strata.Body>
|
|
124
|
+
* <ProviderScopePicker />
|
|
125
|
+
* </Strata.Body>
|
|
126
|
+
* </Strata.Section>
|
|
127
|
+
* <Strata.Section>
|
|
128
|
+
* <Strata.Header>
|
|
129
|
+
* <Strata.Title>Routing rules</Strata.Title>
|
|
130
|
+
* <Strata.Description>Define how requests are authenticated.</Strata.Description>
|
|
131
|
+
* </Strata.Header>
|
|
132
|
+
* <Strata.Body>
|
|
133
|
+
* <RoutingRuleList />
|
|
134
|
+
* </Strata.Body>
|
|
135
|
+
* </Strata.Section>
|
|
136
|
+
* </Strata.Root>
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
139
|
+
declare const Header: ({ asChild, children, className, "data-slot": dataSlot, ...props }: ComponentProps<"header"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
|
|
140
|
+
/**
|
|
141
|
+
* The section's heading. Renders an `<h2>`, one level below the page's `<h1>`,
|
|
142
|
+
* because a `Strata.Section` is a top-level division of its page. Compose
|
|
143
|
+
* `asChild` with the right element when a page nests its sections deeper —
|
|
144
|
+
* heading level is document structure, so mantle does not guess it.
|
|
145
|
+
*
|
|
146
|
+
* | Data Attribute | Value | Description |
|
|
147
|
+
* | -------------- | ----------------- | ------------------------------------------------------------------ |
|
|
148
|
+
* | `data-slot` | `"strata-title"` | Stable styling hook. Survives `className` overrides and `asChild`. |
|
|
149
|
+
*
|
|
150
|
+
* @see https://mantle.ngrok.com/components/structure/strata#stratatitle
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* ```tsx
|
|
154
|
+
* <Strata.Root>
|
|
155
|
+
* <Strata.Section>
|
|
156
|
+
* <Strata.Header>
|
|
157
|
+
* <Strata.Title>Providers</Strata.Title>
|
|
158
|
+
* <Strata.Description>What providers keys may call.</Strata.Description>
|
|
159
|
+
* </Strata.Header>
|
|
160
|
+
* <Strata.Body>
|
|
161
|
+
* <ProviderScopePicker />
|
|
162
|
+
* </Strata.Body>
|
|
163
|
+
* </Strata.Section>
|
|
164
|
+
* <Strata.Section>
|
|
165
|
+
* <Strata.Header>
|
|
166
|
+
* <Strata.Title>Routing rules</Strata.Title>
|
|
167
|
+
* <Strata.Description>Define how requests are authenticated.</Strata.Description>
|
|
168
|
+
* </Strata.Header>
|
|
169
|
+
* <Strata.Body>
|
|
170
|
+
* <RoutingRuleList />
|
|
171
|
+
* </Strata.Body>
|
|
172
|
+
* </Strata.Section>
|
|
173
|
+
* </Strata.Root>
|
|
174
|
+
* ```
|
|
175
|
+
*/
|
|
176
|
+
declare const Title: ({ asChild, children, className, "data-slot": dataSlot, ...props }: ComponentProps<"h2"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
|
|
177
|
+
/**
|
|
178
|
+
* The sentence that says what the section's controls do, and what changing them
|
|
179
|
+
* costs. Renders a `<p>` in muted body text beneath `Strata.Title`. Optional —
|
|
180
|
+
* a section whose title says everything may omit it.
|
|
181
|
+
*
|
|
182
|
+
* | Data Attribute | Value | Description |
|
|
183
|
+
* | -------------- | ----------------------- | ------------------------------------------------------------------ |
|
|
184
|
+
* | `data-slot` | `"strata-description"` | Stable styling hook. Survives `className` overrides and `asChild`. |
|
|
185
|
+
*
|
|
186
|
+
* @see https://mantle.ngrok.com/components/structure/strata#stratadescription
|
|
187
|
+
*
|
|
188
|
+
* @example
|
|
189
|
+
* ```tsx
|
|
190
|
+
* <Strata.Root>
|
|
191
|
+
* <Strata.Section>
|
|
192
|
+
* <Strata.Header>
|
|
193
|
+
* <Strata.Title>Providers</Strata.Title>
|
|
194
|
+
* <Strata.Description>What providers keys may call.</Strata.Description>
|
|
195
|
+
* </Strata.Header>
|
|
196
|
+
* <Strata.Body>
|
|
197
|
+
* <ProviderScopePicker />
|
|
198
|
+
* </Strata.Body>
|
|
199
|
+
* </Strata.Section>
|
|
200
|
+
* <Strata.Section>
|
|
201
|
+
* <Strata.Header>
|
|
202
|
+
* <Strata.Title>Routing rules</Strata.Title>
|
|
203
|
+
* <Strata.Description>Define how requests are authenticated.</Strata.Description>
|
|
204
|
+
* </Strata.Header>
|
|
205
|
+
* <Strata.Body>
|
|
206
|
+
* <RoutingRuleList />
|
|
207
|
+
* </Strata.Body>
|
|
208
|
+
* </Strata.Section>
|
|
209
|
+
* </Strata.Root>
|
|
210
|
+
* ```
|
|
211
|
+
*/
|
|
212
|
+
declare const Description: ({ asChild, children, className, "data-slot": dataSlot, ...props }: ComponentProps<"p"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
|
|
213
|
+
/**
|
|
214
|
+
* The section's content column — the controls, cards, or table that
|
|
215
|
+
* `Strata.Header` describes. Renders a `<div>` with `flex flex-col gap-4`, so
|
|
216
|
+
* stacked controls space themselves and a consumer's own `gap-*` replaces the
|
|
217
|
+
* default cleanly. At `md` and up it takes the grid's second column; below the
|
|
218
|
+
* breakpoint it stacks under the header.
|
|
219
|
+
*
|
|
220
|
+
* | Data Attribute | Value | Description |
|
|
221
|
+
* | -------------- | ---------------- | ------------------------------------------------------------------ |
|
|
222
|
+
* | `data-slot` | `"strata-body"` | Stable styling hook. Survives `className` overrides and `asChild`. |
|
|
223
|
+
*
|
|
224
|
+
* @see https://mantle.ngrok.com/components/structure/strata#stratabody
|
|
225
|
+
*
|
|
226
|
+
* @example
|
|
227
|
+
* ```tsx
|
|
228
|
+
* <Strata.Root>
|
|
229
|
+
* <Strata.Section>
|
|
230
|
+
* <Strata.Header>
|
|
231
|
+
* <Strata.Title>Providers</Strata.Title>
|
|
232
|
+
* <Strata.Description>What providers keys may call.</Strata.Description>
|
|
233
|
+
* </Strata.Header>
|
|
234
|
+
* <Strata.Body>
|
|
235
|
+
* <ProviderScopePicker />
|
|
236
|
+
* </Strata.Body>
|
|
237
|
+
* </Strata.Section>
|
|
238
|
+
* <Strata.Section>
|
|
239
|
+
* <Strata.Header>
|
|
240
|
+
* <Strata.Title>Routing rules</Strata.Title>
|
|
241
|
+
* <Strata.Description>Define how requests are authenticated.</Strata.Description>
|
|
242
|
+
* </Strata.Header>
|
|
243
|
+
* <Strata.Body>
|
|
244
|
+
* <RoutingRuleList />
|
|
245
|
+
* </Strata.Body>
|
|
246
|
+
* </Strata.Section>
|
|
247
|
+
* </Strata.Root>
|
|
248
|
+
* ```
|
|
249
|
+
*/
|
|
250
|
+
declare const Body: ({ asChild, children, className, "data-slot": dataSlot, ...props }: ComponentProps<"div"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
|
|
251
|
+
/**
|
|
252
|
+
* A page of titled sections, each one explained beside its content. Every
|
|
253
|
+
* section pairs a `Strata.Header` — its `Title` and `Description` — with a
|
|
254
|
+
* `Strata.Body` of controls. `Strata.Root` stacks the sections with a
|
|
255
|
+
* hairline between them. Below the `md` breakpoint the header stacks above its
|
|
256
|
+
* own content, so the pairing survives a narrow viewport. It is the shape of a
|
|
257
|
+
* settings page, a resource configuration editor, and any form long enough that
|
|
258
|
+
* each group needs its own explanation.
|
|
259
|
+
*
|
|
260
|
+
* It owns structure only — the grid, the rhythm, and the rules between sections.
|
|
261
|
+
* Reach for [Card](https://mantle.ngrok.com/components/structure/card) when a
|
|
262
|
+
* group needs a raised surface of its own, for
|
|
263
|
+
* [MediaObject](https://mantle.ngrok.com/components/structure/media-object)
|
|
264
|
+
* when the thing beside the text is an image or an icon, and for
|
|
265
|
+
* [DescriptionList](https://mantle.ngrok.com/components/data-display/description-list)
|
|
266
|
+
* when the pairs are read-only term/value data rather than headed sections.
|
|
267
|
+
*
|
|
268
|
+
* @see https://mantle.ngrok.com/components/structure/strata
|
|
269
|
+
*
|
|
270
|
+
* @example
|
|
271
|
+
* Composition:
|
|
272
|
+
* ```
|
|
273
|
+
* Strata.Root
|
|
274
|
+
* └── Strata.Section
|
|
275
|
+
* ├── Strata.Header
|
|
276
|
+
* │ ├── Strata.Title
|
|
277
|
+
* │ └── Strata.Description
|
|
278
|
+
* └── Strata.Body
|
|
279
|
+
* ```
|
|
280
|
+
*
|
|
281
|
+
* @example
|
|
282
|
+
* ```tsx
|
|
283
|
+
* <Strata.Root>
|
|
284
|
+
* <Strata.Section>
|
|
285
|
+
* <Strata.Header>
|
|
286
|
+
* <Strata.Title>Providers</Strata.Title>
|
|
287
|
+
* <Strata.Description>What providers keys may call.</Strata.Description>
|
|
288
|
+
* </Strata.Header>
|
|
289
|
+
* <Strata.Body>
|
|
290
|
+
* <ProviderScopePicker />
|
|
291
|
+
* </Strata.Body>
|
|
292
|
+
* </Strata.Section>
|
|
293
|
+
* <Strata.Section>
|
|
294
|
+
* <Strata.Header>
|
|
295
|
+
* <Strata.Title>Routing rules</Strata.Title>
|
|
296
|
+
* <Strata.Description>Define how requests are authenticated.</Strata.Description>
|
|
297
|
+
* </Strata.Header>
|
|
298
|
+
* <Strata.Body>
|
|
299
|
+
* <RoutingRuleList />
|
|
300
|
+
* </Strata.Body>
|
|
301
|
+
* </Strata.Section>
|
|
302
|
+
* </Strata.Root>
|
|
303
|
+
* ```
|
|
304
|
+
*/
|
|
305
|
+
declare const Strata: {
|
|
306
|
+
/**
|
|
307
|
+
* The stack of sections. Renders a `<div>` with `divide-card-muted divide-y`,
|
|
308
|
+
* so a hairline falls between adjacent `Section` children and never above the
|
|
309
|
+
* first or below the last. Vertical rhythm belongs to `Section`
|
|
310
|
+
* (`py-8 first:pt-0`) rather than here, which keeps a lone `Section` usable
|
|
311
|
+
* without a `Root` around it. Set `--strata-columns` on `Root` to re-split
|
|
312
|
+
* every section at once.
|
|
313
|
+
*
|
|
314
|
+
* | Data Attribute | Value | Description |
|
|
315
|
+
* | -------------- | ----------- | ------------------------------------------------------------------ |
|
|
316
|
+
* | `data-slot` | `"strata"` | Stable styling hook. Survives `className` overrides and `asChild`. |
|
|
317
|
+
*
|
|
318
|
+
* @see https://mantle.ngrok.com/components/structure/strata#strataroot
|
|
319
|
+
*
|
|
320
|
+
* @example
|
|
321
|
+
* ```tsx
|
|
322
|
+
* <Strata.Root>
|
|
323
|
+
* <Strata.Section>
|
|
324
|
+
* <Strata.Header>
|
|
325
|
+
* <Strata.Title>Providers</Strata.Title>
|
|
326
|
+
* <Strata.Description>What providers keys may call.</Strata.Description>
|
|
327
|
+
* </Strata.Header>
|
|
328
|
+
* <Strata.Body>
|
|
329
|
+
* <ProviderScopePicker />
|
|
330
|
+
* </Strata.Body>
|
|
331
|
+
* </Strata.Section>
|
|
332
|
+
* <Strata.Section>
|
|
333
|
+
* <Strata.Header>
|
|
334
|
+
* <Strata.Title>Routing rules</Strata.Title>
|
|
335
|
+
* <Strata.Description>Define how requests are authenticated.</Strata.Description>
|
|
336
|
+
* </Strata.Header>
|
|
337
|
+
* <Strata.Body>
|
|
338
|
+
* <RoutingRuleList />
|
|
339
|
+
* </Strata.Body>
|
|
340
|
+
* </Strata.Section>
|
|
341
|
+
* </Strata.Root>
|
|
342
|
+
* ```
|
|
343
|
+
*/
|
|
344
|
+
readonly Root: typeof Root;
|
|
345
|
+
/**
|
|
346
|
+
* One titled band of the page. Renders a `<section>` that stacks `Header`
|
|
347
|
+
* above `Body` below the `md` breakpoint, then splits the two into a
|
|
348
|
+
* `1fr 2fr` grid at `md` and up, and carries its own vertical rhythm
|
|
349
|
+
* (`py-8 first:pt-0`). It takes no accessible name, which keeps it generic in
|
|
350
|
+
* the accessibility tree instead of adding one `region` landmark per band —
|
|
351
|
+
* the `Title` headings already carry the page outline. Set `aria-labelledby`
|
|
352
|
+
* to the `Title`'s `id` only when the section is a destination a reader jumps
|
|
353
|
+
* back to, not merely a division of the page. To tell apart controls that read
|
|
354
|
+
* alike across two sections, reach for `Field.Set` and `Field.Legend` instead
|
|
355
|
+
* — assistive technology announces a landmark on entry, never per control.
|
|
356
|
+
*
|
|
357
|
+
* | CSS Variable | Default | Description |
|
|
358
|
+
* | ------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
359
|
+
* | `--strata-columns` | `1fr 2fr` | The `grid-template-columns` value at `md` and up. Set it on `Root` to re-split every section, or here for this section alone. |
|
|
360
|
+
*
|
|
361
|
+
* | Data Attribute | Value | Description |
|
|
362
|
+
* | -------------- | ------------------- | ------------------------------------------------------------------ |
|
|
363
|
+
* | `data-slot` | `"strata-section"` | Stable styling hook. Survives `className` overrides and `asChild`. |
|
|
364
|
+
*
|
|
365
|
+
* @see https://mantle.ngrok.com/components/structure/strata#stratasection
|
|
366
|
+
*
|
|
367
|
+
* @example
|
|
368
|
+
* ```tsx
|
|
369
|
+
* <Strata.Root>
|
|
370
|
+
* <Strata.Section>
|
|
371
|
+
* <Strata.Header>
|
|
372
|
+
* <Strata.Title>Providers</Strata.Title>
|
|
373
|
+
* <Strata.Description>What providers keys may call.</Strata.Description>
|
|
374
|
+
* </Strata.Header>
|
|
375
|
+
* <Strata.Body>
|
|
376
|
+
* <ProviderScopePicker />
|
|
377
|
+
* </Strata.Body>
|
|
378
|
+
* </Strata.Section>
|
|
379
|
+
* <Strata.Section>
|
|
380
|
+
* <Strata.Header>
|
|
381
|
+
* <Strata.Title>Routing rules</Strata.Title>
|
|
382
|
+
* <Strata.Description>Define how requests are authenticated.</Strata.Description>
|
|
383
|
+
* </Strata.Header>
|
|
384
|
+
* <Strata.Body>
|
|
385
|
+
* <RoutingRuleList />
|
|
386
|
+
* </Strata.Body>
|
|
387
|
+
* </Strata.Section>
|
|
388
|
+
* </Strata.Root>
|
|
389
|
+
* ```
|
|
390
|
+
*/
|
|
391
|
+
readonly Section: typeof Section;
|
|
392
|
+
/**
|
|
393
|
+
* A section's introductory column — its `Title` and `Description`. Renders a
|
|
394
|
+
* `<header>` with `flex flex-col gap-2`, so anything else composed in picks
|
|
395
|
+
* up the same spacing. At `md` and up it takes the grid's first column; below
|
|
396
|
+
* the breakpoint it stacks above `Body`. Nested inside `Section`'s
|
|
397
|
+
* `<section>`, a `<header>` is not the `banner` landmark, so a page carries
|
|
398
|
+
* as many as it has sections.
|
|
399
|
+
*
|
|
400
|
+
* | Data Attribute | Value | Description |
|
|
401
|
+
* | -------------- | ------------------ | ------------------------------------------------------------------ |
|
|
402
|
+
* | `data-slot` | `"strata-header"` | Stable styling hook. Survives `className` overrides and `asChild`. |
|
|
403
|
+
*
|
|
404
|
+
* @see https://mantle.ngrok.com/components/structure/strata#strataheader
|
|
405
|
+
*
|
|
406
|
+
* @example
|
|
407
|
+
* ```tsx
|
|
408
|
+
* <Strata.Root>
|
|
409
|
+
* <Strata.Section>
|
|
410
|
+
* <Strata.Header>
|
|
411
|
+
* <Strata.Title>Providers</Strata.Title>
|
|
412
|
+
* <Strata.Description>What providers keys may call.</Strata.Description>
|
|
413
|
+
* </Strata.Header>
|
|
414
|
+
* <Strata.Body>
|
|
415
|
+
* <ProviderScopePicker />
|
|
416
|
+
* </Strata.Body>
|
|
417
|
+
* </Strata.Section>
|
|
418
|
+
* <Strata.Section>
|
|
419
|
+
* <Strata.Header>
|
|
420
|
+
* <Strata.Title>Routing rules</Strata.Title>
|
|
421
|
+
* <Strata.Description>Define how requests are authenticated.</Strata.Description>
|
|
422
|
+
* </Strata.Header>
|
|
423
|
+
* <Strata.Body>
|
|
424
|
+
* <RoutingRuleList />
|
|
425
|
+
* </Strata.Body>
|
|
426
|
+
* </Strata.Section>
|
|
427
|
+
* </Strata.Root>
|
|
428
|
+
* ```
|
|
429
|
+
*/
|
|
430
|
+
readonly Header: typeof Header;
|
|
431
|
+
/**
|
|
432
|
+
* The section's heading. Renders an `<h2>`, one level below the page's
|
|
433
|
+
* `<h1>`, because a `Section` is a top-level division of its page. Compose
|
|
434
|
+
* `asChild` with the right element when a page nests its sections deeper —
|
|
435
|
+
* heading level is document structure, so mantle does not guess it.
|
|
436
|
+
*
|
|
437
|
+
* | Data Attribute | Value | Description |
|
|
438
|
+
* | -------------- | ----------------- | ------------------------------------------------------------------ |
|
|
439
|
+
* | `data-slot` | `"strata-title"` | Stable styling hook. Survives `className` overrides and `asChild`. |
|
|
440
|
+
*
|
|
441
|
+
* @see https://mantle.ngrok.com/components/structure/strata#stratatitle
|
|
442
|
+
*
|
|
443
|
+
* @example
|
|
444
|
+
* ```tsx
|
|
445
|
+
* <Strata.Root>
|
|
446
|
+
* <Strata.Section>
|
|
447
|
+
* <Strata.Header>
|
|
448
|
+
* <Strata.Title>Providers</Strata.Title>
|
|
449
|
+
* <Strata.Description>What providers keys may call.</Strata.Description>
|
|
450
|
+
* </Strata.Header>
|
|
451
|
+
* <Strata.Body>
|
|
452
|
+
* <ProviderScopePicker />
|
|
453
|
+
* </Strata.Body>
|
|
454
|
+
* </Strata.Section>
|
|
455
|
+
* <Strata.Section>
|
|
456
|
+
* <Strata.Header>
|
|
457
|
+
* <Strata.Title>Routing rules</Strata.Title>
|
|
458
|
+
* <Strata.Description>Define how requests are authenticated.</Strata.Description>
|
|
459
|
+
* </Strata.Header>
|
|
460
|
+
* <Strata.Body>
|
|
461
|
+
* <RoutingRuleList />
|
|
462
|
+
* </Strata.Body>
|
|
463
|
+
* </Strata.Section>
|
|
464
|
+
* </Strata.Root>
|
|
465
|
+
* ```
|
|
466
|
+
*/
|
|
467
|
+
readonly Title: typeof Title;
|
|
468
|
+
/**
|
|
469
|
+
* The sentence that says what the section's controls do, and what changing
|
|
470
|
+
* them costs. Renders a `<p>` in muted body text beneath `Title`. Optional —
|
|
471
|
+
* a section whose title says everything may omit it.
|
|
472
|
+
*
|
|
473
|
+
* | Data Attribute | Value | Description |
|
|
474
|
+
* | -------------- | ----------------------- | ------------------------------------------------------------------ |
|
|
475
|
+
* | `data-slot` | `"strata-description"` | Stable styling hook. Survives `className` overrides and `asChild`. |
|
|
476
|
+
*
|
|
477
|
+
* @see https://mantle.ngrok.com/components/structure/strata#stratadescription
|
|
478
|
+
*
|
|
479
|
+
* @example
|
|
480
|
+
* ```tsx
|
|
481
|
+
* <Strata.Root>
|
|
482
|
+
* <Strata.Section>
|
|
483
|
+
* <Strata.Header>
|
|
484
|
+
* <Strata.Title>Providers</Strata.Title>
|
|
485
|
+
* <Strata.Description>What providers keys may call.</Strata.Description>
|
|
486
|
+
* </Strata.Header>
|
|
487
|
+
* <Strata.Body>
|
|
488
|
+
* <ProviderScopePicker />
|
|
489
|
+
* </Strata.Body>
|
|
490
|
+
* </Strata.Section>
|
|
491
|
+
* <Strata.Section>
|
|
492
|
+
* <Strata.Header>
|
|
493
|
+
* <Strata.Title>Routing rules</Strata.Title>
|
|
494
|
+
* <Strata.Description>Define how requests are authenticated.</Strata.Description>
|
|
495
|
+
* </Strata.Header>
|
|
496
|
+
* <Strata.Body>
|
|
497
|
+
* <RoutingRuleList />
|
|
498
|
+
* </Strata.Body>
|
|
499
|
+
* </Strata.Section>
|
|
500
|
+
* </Strata.Root>
|
|
501
|
+
* ```
|
|
502
|
+
*/
|
|
503
|
+
readonly Description: typeof Description;
|
|
504
|
+
/**
|
|
505
|
+
* The section's content column — the controls, cards, or table that `Header`
|
|
506
|
+
* describes. Renders a `<div>` with `flex flex-col gap-4`, so stacked
|
|
507
|
+
* controls space themselves and a consumer's own `gap-*` replaces the default
|
|
508
|
+
* cleanly. At `md` and up it takes the grid's second column; below the
|
|
509
|
+
* breakpoint it stacks under the header.
|
|
510
|
+
*
|
|
511
|
+
* | Data Attribute | Value | Description |
|
|
512
|
+
* | -------------- | ---------------- | ------------------------------------------------------------------ |
|
|
513
|
+
* | `data-slot` | `"strata-body"` | Stable styling hook. Survives `className` overrides and `asChild`. |
|
|
514
|
+
*
|
|
515
|
+
* @see https://mantle.ngrok.com/components/structure/strata#stratabody
|
|
516
|
+
*
|
|
517
|
+
* @example
|
|
518
|
+
* ```tsx
|
|
519
|
+
* <Strata.Root>
|
|
520
|
+
* <Strata.Section>
|
|
521
|
+
* <Strata.Header>
|
|
522
|
+
* <Strata.Title>Providers</Strata.Title>
|
|
523
|
+
* <Strata.Description>What providers keys may call.</Strata.Description>
|
|
524
|
+
* </Strata.Header>
|
|
525
|
+
* <Strata.Body>
|
|
526
|
+
* <ProviderScopePicker />
|
|
527
|
+
* </Strata.Body>
|
|
528
|
+
* </Strata.Section>
|
|
529
|
+
* <Strata.Section>
|
|
530
|
+
* <Strata.Header>
|
|
531
|
+
* <Strata.Title>Routing rules</Strata.Title>
|
|
532
|
+
* <Strata.Description>Define how requests are authenticated.</Strata.Description>
|
|
533
|
+
* </Strata.Header>
|
|
534
|
+
* <Strata.Body>
|
|
535
|
+
* <RoutingRuleList />
|
|
536
|
+
* </Strata.Body>
|
|
537
|
+
* </Strata.Section>
|
|
538
|
+
* </Strata.Root>
|
|
539
|
+
* ```
|
|
540
|
+
*/
|
|
541
|
+
readonly Body: typeof Body;
|
|
542
|
+
};
|
|
543
|
+
//#endregion
|
|
544
|
+
export { Strata };
|
package/dist/strata.js
ADDED
|
@@ -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={Root:a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`div`,p;o[6]===u?p=o[7]:(p=t(u,`strata`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`divide-card-muted divide-y`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h},Section:a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`section`,p;o[6]===u?p=o[7]:(p=t(u,`strata-section`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`grid gap-6 py-8 first:pt-0`,`md:grid-cols-(--strata-columns,1fr_2fr) md:gap-12`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h},Header:a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`header`,p;o[6]===u?p=o[7]:(p=t(u,`strata-header`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`flex flex-col gap-2`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h},Title:a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`h2`,p;o[6]===u?p=o[7]:(p=t(u,`strata-title`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`text-strong text-base font-medium`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h},Description:a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`p`,p;o[6]===u?p=o[7]:(p=t(u,`strata-description`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`text-body text-sm`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h},Body:a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`div`,p;o[6]===u?p=o[7]:(p=t(u,`strata-body`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`flex flex-col gap-4`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h}};export{a as Strata};
|
package/dist/switch.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
|
|
1
2
|
import { o as WithValidation } from "./field-7QeiTFwl.js";
|
|
2
3
|
import { ComponentProps } from "react";
|
|
3
4
|
import { Root } from "@radix-ui/react-switch";
|
|
@@ -7,7 +8,7 @@ type SwitchProps = ComponentProps<typeof Root> & WithValidation & {
|
|
|
7
8
|
* Makes the switch immutable, meaning the user can not edit the control.
|
|
8
9
|
*/
|
|
9
10
|
readOnly?: boolean;
|
|
10
|
-
};
|
|
11
|
+
} & WithDataSlot;
|
|
11
12
|
/**
|
|
12
13
|
* A form control that toggles one setting on or off. Unlike `Checkbox`, it has no
|
|
13
14
|
* indeterminate state.
|
|
@@ -28,6 +29,6 @@ type SwitchProps = ComponentProps<typeof Root> & WithValidation & {
|
|
|
28
29
|
* </form>
|
|
29
30
|
* ```
|
|
30
31
|
*/
|
|
31
|
-
declare const Switch: ({ "aria-invalid": _ariaInvalid, "aria-readonly": _ariaReadOnly, className, readOnly: _readOnly, onClick, ref, validation: _validation, ...props }: SwitchProps) => import("react").JSX.Element;
|
|
32
|
+
declare const Switch: ({ "data-slot": dataSlot, "aria-invalid": _ariaInvalid, "aria-readonly": _ariaReadOnly, className, readOnly: _readOnly, onClick, ref, validation: _validation, ...props }: SwitchProps) => import("react").JSX.Element;
|
|
32
33
|
//#endregion
|
|
33
34
|
export { Switch };
|
package/dist/switch.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"./booleanish-BfvnW6vy.js";import{t as r}from"./clsx-DUGZgXfJ.js";import{a as i,r as a}from"./field-Bpptk_9t.js";import{c as o}from"react/compiler-runtime";import{jsx as s}from"react/jsx-runtime";import{Root as c,Thumb as l}from"@radix-ui/react-switch";const u=u=>{let d=o(32),f,p,m,h,g,_,v,y,b;d[0]===u?(f=d[1],p=d[2],m=d[3],h=d[4],g=d[5],_=d[6],v=d[7],y=d[8],b=d[9]):({"data-slot":_,"aria-invalid":f,"aria-readonly":p,className:g,readOnly:m,onClick:v,ref:b,validation:h,...y}=u,d[0]=u,d[1]=f,d[2]=p,d[3]=m,d[4]=h,d[5]=g,d[6]=_,d[7]=v,d[8]=y,d[9]=b);let x=m??p,S;d[10]===x?S=d[11]:(S=n(x),d[10]=x,d[11]=S);let C=S,w=i(),T=h??w,E;d[12]!==f||d[13]!==T?(E=a({"aria-invalid":f,validation:T}),d[12]=f,d[13]=T,d[14]=E):E=d[14];let{ariaInvalid:D,validation:O}=E,k;d[15]===_?k=d[16]:(k=t(_,`switch`),d[15]=_,d[16]=k);let A=O||void 0,j;d[17]===g?j=d[18]:(j=e(`peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full outline-hidden`,`disabled:cursor-default disabled:opacity-50`,`focus-visible:border-accent-600 focus-visible:ring-focus-accent focus-visible:outline-hidden focus-visible:ring-4`,`data-state-checked:bg-accent-600 data-state-unchecked:bg-gray-400`,`data-validation-success:data-state-checked:bg-success-600 focus-visible:data-validation-success:ring-focus-success`,`data-validation-warning:data-state-checked:bg-warning-600 focus-visible:data-validation-warning:ring-focus-warning`,`data-validation-error:data-state-checked:bg-danger-600 focus-visible:data-validation-error:ring-focus-danger`,g),d[17]=g,d[18]=j);let M;d[19]!==v||d[20]!==C?(M=e=>{C?e.preventDefault():v?.(e)},d[19]=v,d[20]=C,d[21]=M):M=d[21];let N;d[22]===Symbol.for(`react.memo_cache_sentinel`)?(N=/* @__PURE__ */ s(l,{className:r(`pointer-events-none block size-4 rounded-full bg-[#fff] shadow-md ring-0 transition-transform`,`data-state-checked:translate-x-4.5 data-state-unchecked:translate-x-0.5`)}),d[22]=N):N=d[22];let P;return d[23]!==D||d[24]!==y||d[25]!==C||d[26]!==b||d[27]!==k||d[28]!==A||d[29]!==j||d[30]!==M?(P=/* @__PURE__ */ s(c,{"aria-invalid":D,"aria-readonly":C,"data-slot":k,"data-validation":A,className:j,onClick:M,ref:b,...y,children:N}),d[23]=D,d[24]=y,d[25]=C,d[26]=b,d[27]=k,d[28]=A,d[29]=j,d[30]=M,d[31]=P):P=d[31],P};export{u as Switch};
|