@ngrok/mantle 0.77.0 → 0.78.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion.d.ts +63 -21
- package/dist/accordion.js +1 -1
- package/dist/agent.json +4 -1
- package/dist/alert-dialog.d.ts +19 -26
- package/dist/alert-dialog.js +1 -1
- package/dist/alert.d.ts +16 -24
- package/dist/alert.js +1 -1
- package/dist/{anchor-BtgEJoPN.js → anchor-C_tjSVy6.js} +1 -1
- package/dist/anchor.d.ts +3 -4
- package/dist/anchor.js +1 -1
- package/dist/{as-child-uN_018tj.d.ts → as-child-CYEVu1WY.d.ts} +0 -7
- package/dist/badge.d.ts +5 -56
- package/dist/badge.js +1 -1
- package/dist/breadcrumb.d.ts +212 -0
- package/dist/breadcrumb.js +1 -0
- package/dist/browser-only.d.ts +2 -6
- package/dist/{button-CERx95KE.js → button-5t6-JS_I.js} +1 -1
- package/dist/button-AS5Ir3DE.js +1 -0
- package/dist/{button-mfYak6Rx.d.ts → button-Bw9MpShl.d.ts} +26 -8
- package/dist/button.d.ts +5 -4
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +2 -8
- package/dist/calendar.js +1 -1
- package/dist/card.d.ts +8 -8
- package/dist/card.js +1 -1
- package/dist/centered-layout.d.ts +147 -0
- package/dist/centered-layout.js +1 -0
- package/dist/checkbox-DJ2xl7Rc.js +1 -0
- package/dist/checkbox.d.ts +9 -11
- package/dist/checkbox.js +1 -1
- package/dist/{choice-D6S38dPs.js → choice-DOdyNzFC.js} +1 -1
- package/dist/choice.d.ts +16 -14
- package/dist/choice.js +1 -1
- package/dist/code-block.d.ts +5 -17
- package/dist/code-block.js +1 -1
- package/dist/code-block_highlight-utils.d.ts +1 -1
- package/dist/code-block_highlight-utils.js +1 -1
- package/dist/code.d.ts +4 -5
- package/dist/code.js +1 -1
- package/dist/combobox.d.ts +40 -19
- package/dist/combobox.js +1 -1
- package/dist/command.d.ts +60 -38
- package/dist/command.js +1 -1
- package/dist/cx-IiQEAKf5.js +1 -0
- package/dist/cx.js +1 -1
- package/dist/data-slot-CChfb_cv.d.ts +17 -0
- package/dist/data-table.d.ts +45 -131
- package/dist/data-table.js +1 -1
- package/dist/description-list.d.ts +7 -7
- package/dist/description-list.js +1 -1
- package/dist/{dialog-uyJcNks7.js → dialog-DVDFVT_-.js} +1 -1
- package/dist/dialog.d.ts +155 -48
- package/dist/dialog.js +1 -1
- package/dist/{direction-CcTY0FmA.d.ts → direction-BjU0bPST.d.ts} +1 -1
- package/dist/{dropdown-menu-OEuW4GLp.js → dropdown-menu-ByUQkAvJ.js} +1 -1
- package/dist/{dropdown-menu-CADgs9gz.d.ts → dropdown-menu-DT30TQzL.d.ts} +21 -24
- package/dist/dropdown-menu.d.ts +2 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.d.ts +133 -53
- package/dist/empty.js +1 -1
- package/dist/{field-context-4k1kI7Bo.js → field-context-BR01g789.js} +1 -1
- package/dist/field.d.ts +24 -36
- package/dist/field.js +1 -1
- package/dist/flag.d.ts +2 -9
- package/dist/flag.js +1 -1
- package/dist/hooks.d.ts +13 -15
- package/dist/hooks.js +1 -1
- package/dist/hover-card.d.ts +34 -14
- package/dist/hover-card.js +1 -1
- package/dist/icon-CDtYjF_H.js +1 -0
- package/dist/{icon-n49kOh4_.d.ts → icon-Cevjo93X.d.ts} +2 -3
- package/dist/{icon-button-DiX9iZ9n.js → icon-button-CxVsZ2N1.js} +1 -1
- package/dist/{icon-button-D7hs6bX2.d.ts → icon-button-DuRSCsPh.d.ts} +5 -6
- package/dist/icon.d.ts +3 -3
- package/dist/icon.js +1 -1
- package/dist/icons.d.ts +7 -19
- package/dist/icons.js +1 -1
- package/dist/{in-view-bItE1fkG.d.ts → in-view-nkSOdED2.d.ts} +1 -6
- package/dist/index-BnI3OppC.d.ts +1 -0
- package/dist/{index-CTU6apE6.d.ts → index-CDwfBOAA.d.ts} +5 -4
- package/dist/{index-Bed_XLWa.d.ts → index-D47aqlpz.d.ts} +3 -2
- package/dist/index-Rv8RL7xy.d.ts +25 -0
- package/dist/{input-B3TS9yAP.js → input-Ct1YOqSy.js} +1 -1
- package/dist/input.d.ts +10 -11
- package/dist/input.js +1 -1
- package/dist/{kbd-D6k4Dnrf.js → kbd-K8iaZ-Ti.js} +1 -1
- package/dist/kbd.d.ts +3 -8
- package/dist/kbd.js +1 -1
- package/dist/{label-BLXfnQmn.js → label-BMlHW_2D.js} +1 -1
- package/dist/{label-PY0qM0G5.d.ts → label-v2-bv98k.d.ts} +1 -1
- package/dist/label.d.ts +1 -1
- package/dist/label.js +1 -1
- package/dist/list.d.ts +18 -60
- package/dist/list.js +1 -1
- package/dist/llms.txt +4 -1
- package/dist/main.d.ts +4 -27
- package/dist/main.js +1 -1
- package/dist/mantle.css +6 -6
- package/dist/media-object.d.ts +6 -7
- package/dist/media-object.js +1 -1
- package/dist/multi-select.d.ts +80 -33
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.d.ts +7 -8
- package/dist/otp-input.js +1 -1
- package/dist/pagination.d.ts +11 -22
- package/dist/pagination.js +1 -1
- package/dist/{popover-Bq52EC7X.js → popover-D5WxxnBY.js} +1 -1
- package/dist/popover.d.ts +6 -7
- package/dist/popover.js +1 -1
- package/dist/{primitive-FoWela9a.d.ts → primitive-C64-m48O.d.ts} +0 -1
- package/dist/{primitive-BuVqb6zf.js → primitive-wm7Wk-gy.js} +1 -1
- package/dist/progress.d.ts +55 -46
- package/dist/progress.js +1 -1
- package/dist/qr-code.d.ts +10 -9
- package/dist/qr-code.js +1 -1
- package/dist/radio-group.d.ts +71 -60
- package/dist/radio-group.js +1 -1
- package/dist/{resolve-pre-rendered-props-DxJ9-DAl.d.ts → resolve-pre-rendered-props-B6OlZrSI.d.ts} +13 -26
- package/dist/{resolve-pre-rendered-props-DwIF_M_K.js → resolve-pre-rendered-props-C3e5Auo3.js} +1 -1
- package/dist/sandboxed-on-click.d.ts +4 -8
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/{select-BUGOJMER.d.ts → select-Bwt2YduR.d.ts} +11 -12
- package/dist/{select-Bxq_N-_o.js → select-D-5u0Blc.js} +1 -1
- package/dist/select.d.ts +1 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list.d.ts +160 -146
- package/dist/selectable-list.js +1 -1
- package/dist/{separator-CqohKk4z.js → separator-kBnnv3Cw.js} +1 -1
- package/dist/separator.d.ts +6 -37
- package/dist/separator.js +1 -1
- package/dist/sheet.d.ts +231 -47
- package/dist/sheet.js +1 -1
- package/dist/sizes-Dje_rwKc.d.ts +29 -0
- package/dist/skeleton-Bu3tgNcW.js +1 -0
- package/dist/skeleton.d.ts +2 -2
- package/dist/skeleton.js +1 -1
- package/dist/skip-to-main-link.d.ts +4 -34
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slider.d.ts +2 -21
- package/dist/slider.js +1 -1
- package/dist/slot-DmPrjM7N.js +1 -0
- package/dist/slot.d.ts +1 -1
- package/dist/slot.js +1 -1
- package/dist/split-button.d.ts +20 -12
- package/dist/split-button.js +1 -1
- package/dist/{svg-only-f6ToFLH0.d.ts → svg-only-BFeFS1aa.d.ts} +2 -3
- package/dist/{svg-only-CSOaF1tL.js → svg-only-DDx6FtJd.js} +1 -1
- package/dist/switch.d.ts +4 -5
- package/dist/switch.js +1 -1
- package/dist/{table-CAitdL78.js → table-CPH2md2-.js} +1 -1
- package/dist/{table-BWD9IlIN.d.ts → table-CwFHXC-G.d.ts} +10 -10
- package/dist/table.d.ts +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +29 -15
- package/dist/tabs.js +1 -1
- package/dist/text-area.d.ts +2 -3
- package/dist/text-area.js +1 -1
- package/dist/theme-D8kZCOzM.js +1 -0
- package/dist/theme-provider-Djj_jBo6.js +1 -0
- package/dist/theme-switcher.d.ts +45 -0
- package/dist/theme-switcher.js +1 -0
- package/dist/theme.d.ts +15 -101
- package/dist/theme.js +1 -1
- package/dist/{toast-CZBWjXcP.js → toast-RkhbliFh.js} +1 -1
- package/dist/toast.d.ts +13 -37
- package/dist/toast.js +1 -1
- package/dist/tooltip.d.ts +10 -44
- package/dist/tooltip.js +1 -1
- package/dist/{types-CTam1uIW.d.ts → types-C19IR7jf.d.ts} +1 -0
- package/dist/{types-BvUzforF.d.ts → types-D1RY5Tcj.d.ts} +0 -1
- package/dist/types.d.ts +3 -3
- package/dist/use-prefers-reduced-motion-CagaNRgm.js +1 -0
- package/dist/utils.d.ts +2 -3
- package/dist/{validation-xyX_6kph.d.ts → validation-7QeiTFwl.d.ts} +3 -12
- package/dist/{validation-DCyx-ceH.js → validation-Bpptk_9t.js} +1 -1
- package/dist/{virtual-PBNiHjMK.js → virtual-DZMBu7Ch.js} +1 -1
- package/dist/well.d.ts +3 -3
- package/dist/well.js +1 -1
- package/dist/{with-style-props-CyImx7vd.d.ts → with-style-props-Dq5Vntqy.d.ts} +0 -1
- package/package.json +17 -14
- package/dist/button-C9GW9nAr.js +0 -1
- package/dist/checkbox-Apow0ipK.js +0 -1
- package/dist/cx-C1UYP5We.js +0 -1
- package/dist/icon-SUx16Sl3.js +0 -1
- package/dist/index-CJbKEKr2.d.ts +0 -20
- package/dist/slot-DT_E5BQx.js +0 -1
- package/dist/theme-provider-C5XYi2-H.js +0 -1
- package/dist/use-prefers-reduced-motion-DBqNw1wB.js +0 -1
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { t as WithAsChild } from "./as-child-CYEVu1WY.js";
|
|
2
|
+
import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
//#region src/components/breadcrumb/breadcrumb.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Compound component for WAI-ARIA breadcrumb navigation — the path from a
|
|
7
|
+
* root to the current page as an ordered list of links inside a labeled
|
|
8
|
+
* `<nav>` landmark. Router-agnostic: compose `Breadcrumb.Link` onto your app
|
|
9
|
+
* router's link via `asChild`.
|
|
10
|
+
*
|
|
11
|
+
* @see https://mantle.ngrok.com/components/navigation/breadcrumb
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* Composition:
|
|
15
|
+
* ```
|
|
16
|
+
* Breadcrumb.Root
|
|
17
|
+
* └── Breadcrumb.List
|
|
18
|
+
* ├── Breadcrumb.Item
|
|
19
|
+
* │ └── Breadcrumb.Link
|
|
20
|
+
* ├── Breadcrumb.Separator
|
|
21
|
+
* └── Breadcrumb.Item
|
|
22
|
+
* └── Breadcrumb.Page
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* <Breadcrumb.Root>
|
|
28
|
+
* <Breadcrumb.List>
|
|
29
|
+
* <Breadcrumb.Item>
|
|
30
|
+
* <Breadcrumb.Link href="/">Home</Breadcrumb.Link>
|
|
31
|
+
* </Breadcrumb.Item>
|
|
32
|
+
* <Breadcrumb.Separator />
|
|
33
|
+
* <Breadcrumb.Item>
|
|
34
|
+
* <Breadcrumb.Link href="/endpoints">Endpoints</Breadcrumb.Link>
|
|
35
|
+
* </Breadcrumb.Item>
|
|
36
|
+
* <Breadcrumb.Separator />
|
|
37
|
+
* <Breadcrumb.Item>
|
|
38
|
+
* <Breadcrumb.Page>ep_2h8…</Breadcrumb.Page>
|
|
39
|
+
* </Breadcrumb.Item>
|
|
40
|
+
* </Breadcrumb.List>
|
|
41
|
+
* </Breadcrumb.Root>
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
declare const Breadcrumb: {
|
|
45
|
+
/**
|
|
46
|
+
* The breadcrumb landmark. Renders a `<nav>` with a default
|
|
47
|
+
* `aria-label="Breadcrumb"` — pass your own `aria-label` to override it.
|
|
48
|
+
* Carries no visual styling of its own.
|
|
49
|
+
*
|
|
50
|
+
* @see https://mantle.ngrok.com/components/navigation/breadcrumb
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```tsx
|
|
54
|
+
* <Breadcrumb.Root>
|
|
55
|
+
* <Breadcrumb.List>
|
|
56
|
+
* <Breadcrumb.Item>
|
|
57
|
+
* <Breadcrumb.Link href="/">Home</Breadcrumb.Link>
|
|
58
|
+
* </Breadcrumb.Item>
|
|
59
|
+
* <Breadcrumb.Separator />
|
|
60
|
+
* <Breadcrumb.Item>
|
|
61
|
+
* <Breadcrumb.Link href="/endpoints">Endpoints</Breadcrumb.Link>
|
|
62
|
+
* </Breadcrumb.Item>
|
|
63
|
+
* <Breadcrumb.Separator />
|
|
64
|
+
* <Breadcrumb.Item>
|
|
65
|
+
* <Breadcrumb.Page>ep_2h8…</Breadcrumb.Page>
|
|
66
|
+
* </Breadcrumb.Item>
|
|
67
|
+
* </Breadcrumb.List>
|
|
68
|
+
* </Breadcrumb.Root>
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
readonly Root: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLElement> & import("react").HTMLAttributes<HTMLElement> & WithAsChild & WithDataSlot, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
72
|
+
/**
|
|
73
|
+
* The ordered list of crumbs. Renders an `<ol>` — the order of the items
|
|
74
|
+
* is the hierarchy, from the root to the current page.
|
|
75
|
+
*
|
|
76
|
+
* @see https://mantle.ngrok.com/components/navigation/breadcrumb
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```tsx
|
|
80
|
+
* <Breadcrumb.Root>
|
|
81
|
+
* <Breadcrumb.List>
|
|
82
|
+
* <Breadcrumb.Item>
|
|
83
|
+
* <Breadcrumb.Link href="/">Home</Breadcrumb.Link>
|
|
84
|
+
* </Breadcrumb.Item>
|
|
85
|
+
* <Breadcrumb.Separator />
|
|
86
|
+
* <Breadcrumb.Item>
|
|
87
|
+
* <Breadcrumb.Link href="/endpoints">Endpoints</Breadcrumb.Link>
|
|
88
|
+
* </Breadcrumb.Item>
|
|
89
|
+
* <Breadcrumb.Separator />
|
|
90
|
+
* <Breadcrumb.Item>
|
|
91
|
+
* <Breadcrumb.Page>ep_2h8…</Breadcrumb.Page>
|
|
92
|
+
* </Breadcrumb.Item>
|
|
93
|
+
* </Breadcrumb.List>
|
|
94
|
+
* </Breadcrumb.Root>
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
readonly List: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLOListElement> & import("react").OlHTMLAttributes<HTMLOListElement> & WithAsChild & WithDataSlot, "ref"> & import("react").RefAttributes<HTMLOListElement>>;
|
|
98
|
+
/**
|
|
99
|
+
* A single crumb. Renders an `<li>` containing a `Breadcrumb.Link` or
|
|
100
|
+
* `Breadcrumb.Page`.
|
|
101
|
+
*
|
|
102
|
+
* @see https://mantle.ngrok.com/components/navigation/breadcrumb
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* ```tsx
|
|
106
|
+
* <Breadcrumb.Root>
|
|
107
|
+
* <Breadcrumb.List>
|
|
108
|
+
* <Breadcrumb.Item>
|
|
109
|
+
* <Breadcrumb.Link href="/">Home</Breadcrumb.Link>
|
|
110
|
+
* </Breadcrumb.Item>
|
|
111
|
+
* <Breadcrumb.Separator />
|
|
112
|
+
* <Breadcrumb.Item>
|
|
113
|
+
* <Breadcrumb.Link href="/endpoints">Endpoints</Breadcrumb.Link>
|
|
114
|
+
* </Breadcrumb.Item>
|
|
115
|
+
* <Breadcrumb.Separator />
|
|
116
|
+
* <Breadcrumb.Item>
|
|
117
|
+
* <Breadcrumb.Page>ep_2h8…</Breadcrumb.Page>
|
|
118
|
+
* </Breadcrumb.Item>
|
|
119
|
+
* </Breadcrumb.List>
|
|
120
|
+
* </Breadcrumb.Root>
|
|
121
|
+
* ```
|
|
122
|
+
*/
|
|
123
|
+
readonly Item: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLLIElement> & import("react").LiHTMLAttributes<HTMLLIElement> & WithAsChild & WithDataSlot, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
|
|
124
|
+
/**
|
|
125
|
+
* A link to an ancestor page. Renders an `<a>` by default; use `asChild`
|
|
126
|
+
* to compose onto your app router's link (e.g. react-router's `<Link>`).
|
|
127
|
+
*
|
|
128
|
+
* @see https://mantle.ngrok.com/components/navigation/breadcrumb
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* ```tsx
|
|
132
|
+
* <Breadcrumb.Root>
|
|
133
|
+
* <Breadcrumb.List>
|
|
134
|
+
* <Breadcrumb.Item>
|
|
135
|
+
* <Breadcrumb.Link href="/">Home</Breadcrumb.Link>
|
|
136
|
+
* </Breadcrumb.Item>
|
|
137
|
+
* <Breadcrumb.Separator />
|
|
138
|
+
* <Breadcrumb.Item>
|
|
139
|
+
* <Breadcrumb.Link href="/endpoints">Endpoints</Breadcrumb.Link>
|
|
140
|
+
* </Breadcrumb.Item>
|
|
141
|
+
* <Breadcrumb.Separator />
|
|
142
|
+
* <Breadcrumb.Item>
|
|
143
|
+
* <Breadcrumb.Page>ep_2h8…</Breadcrumb.Page>
|
|
144
|
+
* </Breadcrumb.Item>
|
|
145
|
+
* </Breadcrumb.List>
|
|
146
|
+
* </Breadcrumb.Root>
|
|
147
|
+
* ```
|
|
148
|
+
*/
|
|
149
|
+
readonly Link: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLAnchorElement> & import("react").AnchorHTMLAttributes<HTMLAnchorElement> & WithAsChild & WithDataSlot, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
150
|
+
/**
|
|
151
|
+
* The current page — the last crumb. Renders a `<span>` (not a link) with
|
|
152
|
+
* `aria-current="page"`; the ARIA is the part's whole contract and is not
|
|
153
|
+
* overridable.
|
|
154
|
+
*
|
|
155
|
+
* @see https://mantle.ngrok.com/components/navigation/breadcrumb
|
|
156
|
+
*
|
|
157
|
+
* @example
|
|
158
|
+
* ```tsx
|
|
159
|
+
* <Breadcrumb.Root>
|
|
160
|
+
* <Breadcrumb.List>
|
|
161
|
+
* <Breadcrumb.Item>
|
|
162
|
+
* <Breadcrumb.Link href="/">Home</Breadcrumb.Link>
|
|
163
|
+
* </Breadcrumb.Item>
|
|
164
|
+
* <Breadcrumb.Separator />
|
|
165
|
+
* <Breadcrumb.Item>
|
|
166
|
+
* <Breadcrumb.Link href="/endpoints">Endpoints</Breadcrumb.Link>
|
|
167
|
+
* </Breadcrumb.Item>
|
|
168
|
+
* <Breadcrumb.Separator />
|
|
169
|
+
* <Breadcrumb.Item>
|
|
170
|
+
* <Breadcrumb.Page>ep_2h8…</Breadcrumb.Page>
|
|
171
|
+
* </Breadcrumb.Item>
|
|
172
|
+
* </Breadcrumb.List>
|
|
173
|
+
* </Breadcrumb.Root>
|
|
174
|
+
* ```
|
|
175
|
+
*/
|
|
176
|
+
readonly Page: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & WithAsChild & WithDataSlot, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
177
|
+
/**
|
|
178
|
+
* A purely visual divider between crumbs, hidden from assistive
|
|
179
|
+
* technology (`role="presentation"` + `aria-hidden`). Children default to
|
|
180
|
+
* a caret icon; pass your own (e.g. a slash) to replace it.
|
|
181
|
+
*
|
|
182
|
+
* @see https://mantle.ngrok.com/components/navigation/breadcrumb
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```tsx
|
|
186
|
+
* <Breadcrumb.Root>
|
|
187
|
+
* <Breadcrumb.List>
|
|
188
|
+
* <Breadcrumb.Item>
|
|
189
|
+
* <Breadcrumb.Link href="/">Home</Breadcrumb.Link>
|
|
190
|
+
* </Breadcrumb.Item>
|
|
191
|
+
* <Breadcrumb.Separator />
|
|
192
|
+
* <Breadcrumb.Item>
|
|
193
|
+
* <Breadcrumb.Link href="/endpoints">Endpoints</Breadcrumb.Link>
|
|
194
|
+
* </Breadcrumb.Item>
|
|
195
|
+
* <Breadcrumb.Separator />
|
|
196
|
+
* <Breadcrumb.Item>
|
|
197
|
+
* <Breadcrumb.Page>ep_2h8…</Breadcrumb.Page>
|
|
198
|
+
* </Breadcrumb.Item>
|
|
199
|
+
* </Breadcrumb.List>
|
|
200
|
+
* </Breadcrumb.Root>
|
|
201
|
+
* ```
|
|
202
|
+
*/
|
|
203
|
+
readonly Separator: import("react").ForwardRefExoticComponent<(Omit<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "children"> & {
|
|
204
|
+
asChild: true;
|
|
205
|
+
children: ReactNode;
|
|
206
|
+
} & WithDataSlot, "ref"> | Omit<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "children"> & {
|
|
207
|
+
asChild?: false | undefined;
|
|
208
|
+
children?: ReactNode;
|
|
209
|
+
} & WithDataSlot, "ref">) & import("react").RefAttributes<HTMLLIElement>>;
|
|
210
|
+
};
|
|
211
|
+
//#endregion
|
|
212
|
+
export { Breadcrumb };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-CDtYjF_H.js";import{n,t as r}from"./slot-DmPrjM7N.js";import{cloneElement as i,forwardRef as a,isValidElement as o}from"react";import{jsx as s}from"react/jsx-runtime";import{CaretRightIcon as c}from"@phosphor-icons/react/CaretRight";const l=a(({asChild:e,children:t,"data-slot":i,...a},o)=>s(e?r:`nav`,{ref:o,"data-slot":n(i,`breadcrumb`),"aria-label":`Breadcrumb`,...a,children:t}));l.displayName=`Breadcrumb`;const u=a(({asChild:t,children:i,className:a,"data-slot":o,...c},l)=>s(t?r:`ol`,{ref:l,"data-slot":n(o,`breadcrumb-list`),className:e(`text-muted flex flex-wrap items-center gap-1.5 text-sm`,a),...c,children:i}));u.displayName=`BreadcrumbList`;const d=a(({asChild:t,children:i,className:a,"data-slot":o,...c},l)=>s(t?r:`li`,{ref:l,"data-slot":n(o,`breadcrumb-item`),className:e(`inline-flex items-center gap-1.5`,a),...c,children:i}));d.displayName=`BreadcrumbItem`;const f=a(({asChild:t,children:i,className:a,"data-slot":o,...c},l)=>s(t?r:`a`,{ref:l,"data-slot":n(o,`breadcrumb-link`),className:e(`hover:text-strong transition-colors`,a),...c,children:i}));f.displayName=`BreadcrumbLink`;const p=a(({asChild:t,children:a,className:c,"data-slot":l,...u},d)=>{let f=t?r:`span`,p=t&&o(a)?i(a,{"aria-current":`page`}):a;return s(f,{ref:d,"data-slot":n(l,`breadcrumb-page`),className:e(`text-strong`,c),...u,"aria-current":`page`,children:p})});p.displayName=`BreadcrumbPage`;const m=a(({asChild:e,children:a,className:l,"data-slot":u,...d},f)=>{let p=e?r:`li`,m=e&&o(a)?i(a,{role:`presentation`,"aria-hidden":`true`}):a??s(t,{svg:s(c,{}),className:`size-3.5`});return s(p,{ref:f,"data-slot":n(u,`breadcrumb-separator`),className:l,...d,role:`presentation`,"aria-hidden":`true`,children:m})});m.displayName=`BreadcrumbSeparator`;const h={Root:l,List:u,Item:d,Link:f,Page:p,Separator:m};export{h as Breadcrumb};
|
package/dist/browser-only.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
|
|
3
2
|
//#region src/components/browser-only/browser-only.d.ts
|
|
4
3
|
type Props = {
|
|
5
4
|
/**
|
|
@@ -27,7 +26,7 @@ type Props = {
|
|
|
27
26
|
* the `fallback` is rendered.
|
|
28
27
|
* - On the client, after hydration, the `children` render function is called.
|
|
29
28
|
*
|
|
30
|
-
* @see https://mantle.ngrok.com/components/browser-only
|
|
29
|
+
* @see https://mantle.ngrok.com/components/primitives/browser-only
|
|
31
30
|
*
|
|
32
31
|
* @example
|
|
33
32
|
* ```tsx
|
|
@@ -38,10 +37,7 @@ type Props = {
|
|
|
38
37
|
*
|
|
39
38
|
* @see useIsHydrated
|
|
40
39
|
*/
|
|
41
|
-
declare function BrowserOnly({
|
|
42
|
-
children,
|
|
43
|
-
fallback
|
|
44
|
-
}: Props): ReactNode;
|
|
40
|
+
declare function BrowserOnly({ children, fallback }: Props): ReactNode;
|
|
45
41
|
/**
|
|
46
42
|
* Detects whether DOM APIs are available.
|
|
47
43
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-DmPrjM7N.js";import{forwardRef as n}from"react";import{jsx as r}from"react/jsx-runtime";import{cva as i}from"class-variance-authority";const a=i(`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:``}}}),o=n(({appearance:n,asChild:i,className:o,children:s,...c},l)=>r(i?t:`div`,{"data-slot":`button-group`,className:e(a({appearance:n}),o),ref:l,...c,children:s}));o.displayName=`ButtonGroup`;export{o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-CDtYjF_H.js";import{t as n}from"./slot-DmPrjM7N.js";import{t as r}from"./booleanish-BfvnW6vy.js";import{t as i}from"./clsx-DUGZgXfJ.js";import{Children as a,cloneElement as o,forwardRef as s,isValidElement as c}from"react";import l from"tiny-invariant";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";import{cva as p}from"class-variance-authority";import{CircleNotchIcon as m}from"@phosphor-icons/react/CircleNotch";const h=p(``,{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`},priority:{danger:``,default:``,neutral:``},size:{xs:``,sm:``,md:``,lg:``,xl:``}},defaultVariants:{appearance:`outlined`,isLoading:!1,priority:`default`,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`,priority:`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`,priority:`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`,priority:`danger`,class:`bg-filled-danger focus-visible:ring-focus-danger not-disabled:hover:bg-filled-danger-hover border-transparent`},{appearance:`link`,priority:`danger`,class:`text-danger-600 focus-visible:ring-focus-danger`},{appearance:`ghost`,priority:`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`,priority:`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`,priority:`neutral`,class:`bg-filled-neutral not-disabled:hover:bg-filled-neutral-hover border-transparent focus-visible:border-transparent text-neutral-50`},{appearance:`link`,priority:`neutral`,class:`text-strong focus-visible:ring-focus-accent`}]}),g={xs:`ps-1.5`,sm:`ps-2`,md:`ps-2.5`,lg:`ps-3`,xl:`ps-3.5`},_={xs:`pe-1.5`,sm:`pe-2`,md:`pe-2.5`,lg:`pe-3`,xl:`pe-3.5`},v=s(({"aria-disabled":s,appearance:p=`outlined`,asChild:v,children:y,className:b,disabled:x,icon:S,iconPlacement:C=`start`,isLoading:w=!1,priority:T=`default`,size:E=`md`,type:D,...O},k)=>{let A=r(s??x??w),j=w?d(m,{className:`animate-spin`}):S,M=j&&p!==`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`,h({appearance:p,priority:T,isLoading:w,size:E}),p!==`link`&&`font-sans`,M&&C===`start`&&g[E],M&&C===`end`&&_[E],b),"data-appearance":p,"data-disabled":A,"data-loading":w,"data-priority":T,"data-size":p===`link`?void 0:E,disabled:A,ref:k,...O};return v?(l(c(y)&&a.only(y),"When using `asChild`, Button must be passed a single child as a JSX tag."),d(n,{...N,children:o(y,{},f(u,{children:[j&&d(t,{svg:j,className:i(C===`end`&&`order-last`)}),y.props.children]}))})):f(`button`,{...N,type:D??`button`,children:[j&&d(t,{svg:j,className:i(C===`end`&&`order-last`)}),y]})});v.displayName=`Button`;export{v as t};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { t as WithAsChild } from "./as-child-
|
|
2
|
-
import { r as VariantProps } from "./index-
|
|
1
|
+
import { t as WithAsChild } from "./as-child-CYEVu1WY.js";
|
|
2
|
+
import { r as VariantProps } from "./index-D47aqlpz.js";
|
|
3
3
|
import { ComponentProps, ReactNode } from "react";
|
|
4
|
-
|
|
5
4
|
//#region src/components/button/button.d.ts
|
|
6
5
|
declare const buttonVariants: (props?: ({
|
|
7
|
-
appearance?: "
|
|
6
|
+
appearance?: "filled" | "ghost" | "link" | "outlined" | null | undefined;
|
|
8
7
|
isLoading?: boolean | null | undefined;
|
|
9
|
-
priority?: "danger" | "
|
|
8
|
+
priority?: "danger" | "default" | "neutral" | null | undefined;
|
|
9
|
+
size?: "lg" | "md" | "sm" | "xl" | "xs" | null | undefined;
|
|
10
10
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
11
|
type ButtonVariants = VariantProps<typeof buttonVariants>;
|
|
12
12
|
/**
|
|
@@ -14,8 +14,13 @@ type ButtonVariants = VariantProps<typeof buttonVariants>;
|
|
|
14
14
|
*/
|
|
15
15
|
type ButtonProps = ComponentProps<"button"> & ButtonVariants & WithAsChild & {
|
|
16
16
|
/**
|
|
17
|
-
* An icon to render inside the button
|
|
18
|
-
* the
|
|
17
|
+
* An icon to render inside the button, beside the button's text
|
|
18
|
+
* children. If the `state` is `"pending"`, then the icon will
|
|
19
|
+
* automatically be replaced with a spinner.
|
|
20
|
+
*
|
|
21
|
+
* For an icon-only button, do not use `Button` — use `IconButton`
|
|
22
|
+
* instead: it requires an accessible `label` and renders a square box
|
|
23
|
+
* on the same shared size scale.
|
|
19
24
|
*/
|
|
20
25
|
icon?: ReactNode;
|
|
21
26
|
/**
|
|
@@ -49,7 +54,12 @@ type ButtonProps = ComponentProps<"button"> & ButtonVariants & WithAsChild & {
|
|
|
49
54
|
* other assistive technology. Once activated, it then performs an action, such
|
|
50
55
|
* as submitting a form or opening a dialog.
|
|
51
56
|
*
|
|
52
|
-
*
|
|
57
|
+
* An icon-only button is not a `Button` — use `IconButton` instead: an
|
|
58
|
+
* icon-only `Button` has no accessible name and keeps its text-box padding,
|
|
59
|
+
* while `IconButton` requires a screen-reader `label` and renders a square
|
|
60
|
+
* box on the same shared size scale.
|
|
61
|
+
*
|
|
62
|
+
* @see https://mantle.ngrok.com/components/actions/button
|
|
53
63
|
*
|
|
54
64
|
* @example
|
|
55
65
|
* ```tsx
|
|
@@ -65,6 +75,14 @@ type ButtonProps = ComponentProps<"button"> & ButtonVariants & WithAsChild & {
|
|
|
65
75
|
* Save
|
|
66
76
|
* </Button>
|
|
67
77
|
* ```
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* Icon-only buttons are not `Button`s — use `IconButton` instead (an icon-only
|
|
81
|
+
* `Button` has no accessible name and keeps its text-box padding):
|
|
82
|
+
* ```tsx
|
|
83
|
+
* // ❌ <Button icon={<CopyIcon />} onClick={copyPage} />
|
|
84
|
+
* <IconButton icon={<CopyIcon />} label="Copy page" onClick={copyPage} />
|
|
85
|
+
* ```
|
|
68
86
|
*/
|
|
69
87
|
declare const Button: import("react").ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
70
88
|
//#endregion
|
package/dist/button.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { n as ButtonProps, t as Button } from "./button-
|
|
2
|
-
import { n as IconButtonProps, t as IconButton } from "./icon-button-
|
|
3
|
-
import { n as ButtonGroupProps, t as ButtonGroup } from "./index-
|
|
4
|
-
|
|
1
|
+
import { n as ButtonProps, t as Button } from "./button-Bw9MpShl.js";
|
|
2
|
+
import { n as IconButtonProps, t as IconButton } from "./icon-button-DuRSCsPh.js";
|
|
3
|
+
import { n as ButtonGroupProps, t as ButtonGroup } from "./index-CDwfBOAA.js";
|
|
4
|
+
import { t as ButtonSize } from "./sizes-Dje_rwKc.js";
|
|
5
|
+
export { Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonSize, IconButton, type IconButtonProps };
|
package/dist/button.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./icon-button-
|
|
1
|
+
import{t as e}from"./icon-button-CxVsZ2N1.js";import{t}from"./button-AS5Ir3DE.js";import{t as n}from"./button-5t6-JS_I.js";export{t as Button,n as ButtonGroup,e as IconButton};
|
package/dist/calendar.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
2
|
import { DateRange, DayPicker } from "react-day-picker";
|
|
3
|
-
|
|
4
3
|
//#region src/components/calendar/calendar.d.ts
|
|
5
4
|
type CalendarProps = ComponentProps<typeof DayPicker>;
|
|
6
5
|
/**
|
|
@@ -9,7 +8,7 @@ type CalendarProps = ComponentProps<typeof DayPicker>;
|
|
|
9
8
|
* @preview This component is in `preview` mode which means the API is not stable and may change.
|
|
10
9
|
* There may also be bugs! Please file an issue if you find any! <3
|
|
11
10
|
*
|
|
12
|
-
* @see https://mantle.ngrok.com/components/calendar#api-calendar
|
|
11
|
+
* @see https://mantle.ngrok.com/components/preview/calendar#api-calendar
|
|
13
12
|
*
|
|
14
13
|
* @example
|
|
15
14
|
* ```tsx
|
|
@@ -28,12 +27,7 @@ type CalendarProps = ComponentProps<typeof DayPicker>;
|
|
|
28
27
|
*
|
|
29
28
|
* https://github.com/ngrok/mantle/issues
|
|
30
29
|
*/
|
|
31
|
-
declare function Calendar({
|
|
32
|
-
className,
|
|
33
|
-
classNames,
|
|
34
|
-
showOutsideDays,
|
|
35
|
-
...props
|
|
36
|
-
}: CalendarProps): import("react").JSX.Element;
|
|
30
|
+
declare function Calendar({ className, classNames, showOutsideDays, ...props }: CalendarProps): import("react").JSX.Element;
|
|
37
31
|
declare namespace Calendar {
|
|
38
32
|
var displayName: string;
|
|
39
33
|
}
|
package/dist/calendar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-CDtYjF_H.js";import{n,r}from"./icon-button-CxVsZ2N1.js";import{jsx as i}from"react/jsx-runtime";import{CaretRightIcon as a}from"@phosphor-icons/react/CaretRight";import{CaretLeftIcon as o}from"@phosphor-icons/react/CaretLeft";import{DayPicker as s}from"react-day-picker";function c({className:c,classNames:l,showOutsideDays:u=!1,...d}){return i(s,{"data-slot":`calendar`,animate:!1,components:{Chevron:e=>i(t,{svg:e.orientation===`left`?i(o,{}):i(a,{}),className:`size-4`})},classNames:{root:e(`isolate`,c),button_next:e(n,r({appearance:`ghost`,size:`sm`}),`absolute right-0`),button_previous:e(n,r({appearance:`ghost`,size:`sm`}),`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`,d.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`,...l},showOutsideDays:u,...d})}c.displayName=`Calendar`;export{c as Calendar};
|
package/dist/card.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as WithAsChild } from "./as-child-
|
|
1
|
+
import { t as WithAsChild } from "./as-child-CYEVu1WY.js";
|
|
2
|
+
import "./index-D47aqlpz.js";
|
|
2
3
|
import { ComponentProps, HTMLAttributes } from "react";
|
|
3
|
-
|
|
4
4
|
//#region src/components/card/card.d.ts
|
|
5
5
|
type CardProps = ComponentProps<"div"> & WithAsChild;
|
|
6
6
|
type CardTitleProps = HTMLAttributes<HTMLHeadingElement> & WithAsChild;
|
|
@@ -8,7 +8,7 @@ type CardTitleProps = HTMLAttributes<HTMLHeadingElement> & WithAsChild;
|
|
|
8
8
|
* A container that can be used to display content in a box resembling a
|
|
9
9
|
* physical card.
|
|
10
10
|
*
|
|
11
|
-
* @see https://mantle.ngrok.com/components/card
|
|
11
|
+
* @see https://mantle.ngrok.com/components/structure/card
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
* Composition:
|
|
@@ -45,7 +45,7 @@ declare const Card: {
|
|
|
45
45
|
/**
|
|
46
46
|
* A container that can be used to display content in a box resembling a physical card.
|
|
47
47
|
*
|
|
48
|
-
* @see https://mantle.ngrok.com/components/card#cardroot
|
|
48
|
+
* @see https://mantle.ngrok.com/components/structure/card#cardroot
|
|
49
49
|
*
|
|
50
50
|
* @example
|
|
51
51
|
* ```tsx
|
|
@@ -60,7 +60,7 @@ declare const Card: {
|
|
|
60
60
|
/**
|
|
61
61
|
* The main content of a card.
|
|
62
62
|
*
|
|
63
|
-
* @see https://mantle.ngrok.com/components/card#cardbody
|
|
63
|
+
* @see https://mantle.ngrok.com/components/structure/card#cardbody
|
|
64
64
|
*
|
|
65
65
|
* @example
|
|
66
66
|
* ```tsx
|
|
@@ -75,7 +75,7 @@ declare const Card: {
|
|
|
75
75
|
/**
|
|
76
76
|
* The footer container of a card.
|
|
77
77
|
*
|
|
78
|
-
* @see https://mantle.ngrok.com/components/card#cardfooter
|
|
78
|
+
* @see https://mantle.ngrok.com/components/structure/card#cardfooter
|
|
79
79
|
*
|
|
80
80
|
* @example
|
|
81
81
|
* ```tsx
|
|
@@ -96,7 +96,7 @@ declare const Card: {
|
|
|
96
96
|
/**
|
|
97
97
|
* The header container of a card.
|
|
98
98
|
*
|
|
99
|
-
* @see https://mantle.ngrok.com/components/card#cardheader
|
|
99
|
+
* @see https://mantle.ngrok.com/components/structure/card#cardheader
|
|
100
100
|
*
|
|
101
101
|
* @example
|
|
102
102
|
* ```tsx
|
|
@@ -117,7 +117,7 @@ declare const Card: {
|
|
|
117
117
|
/**
|
|
118
118
|
* The title of a card.
|
|
119
119
|
*
|
|
120
|
-
* @see https://mantle.ngrok.com/components/card#cardtitle
|
|
120
|
+
* @see https://mantle.ngrok.com/components/structure/card#cardtitle
|
|
121
121
|
*
|
|
122
122
|
* @example
|
|
123
123
|
* ```tsx
|
package/dist/card.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-DmPrjM7N.js";import{forwardRef as n}from"react";import{jsx as r}from"react/jsx-runtime";const i=n(({asChild:n=!1,className:i,children:a,...o},s)=>r(n?t:`div`,{ref:s,"data-slot":`card`,className:e(`border-card bg-card relative rounded-md border`,i),...o,children:a}));i.displayName=`Card`;const a=n(({asChild:n=!1,className:i,children:a,...o},s)=>r(n?t:`div`,{ref:s,"data-slot":`card-body`,className:e(`p-6 border-t border-card-muted first:border-t-0`,i),...o,children:a}));a.displayName=`CardBody`;const o=n(({asChild:n=!1,className:i,children:a,...o},s)=>r(n?t:`div`,{ref:s,"data-slot":`card-footer`,className:e(`px-6 py-3 border-t border-card-muted first:border-t-0`,i),...o,children:a}));o.displayName=`CardFooter`;const s=n(({asChild:n=!1,className:i,children:a,...o},s)=>r(n?t:`div`,{ref:s,"data-slot":`card-header`,className:e(`px-6 py-3 border-t border-card-muted first:border-t-0`,i),...o,children:a}));s.displayName=`CardHeader`;const c=n(({className:n,asChild:i,...a},o)=>r(i?t:`h3`,{ref:o,"data-slot":`card-title`,className:e(`text-strong text-base font-medium`,n),...a}));c.displayName=`CardTitle`;const l={Root:i,Body:a,Footer:o,Header:s,Title:c};export{l as Card};
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { t as WithAsChild } from "./as-child-CYEVu1WY.js";
|
|
2
|
+
import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
|
|
3
|
+
//#region src/components/centered-layout/centered-layout.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* A viewport-filling centered page flow for sign-in, sign-up, onboarding,
|
|
6
|
+
* 404, checkout, and other focused full-page states. It owns structure only —
|
|
7
|
+
* the flex/overflow skeleton and region ordering. App state (routing,
|
|
8
|
+
* sessions) never enters it, and landmark semantics stay compositional:
|
|
9
|
+
* brand marks, links, and the `Main` landmark arrive as composed JSX.
|
|
10
|
+
*
|
|
11
|
+
* @see https://mantle.ngrok.com/layouts/centered-layout
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* Composition:
|
|
15
|
+
* ```
|
|
16
|
+
* CenteredLayout.Root
|
|
17
|
+
* ├── CenteredLayout.Header
|
|
18
|
+
* ├── CenteredLayout.Body
|
|
19
|
+
* └── CenteredLayout.Footer
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* <CenteredLayout.Root>
|
|
25
|
+
* <SkipToMainLink />
|
|
26
|
+
* <CenteredLayout.Body>
|
|
27
|
+
* <a href="https://ngrok.com">
|
|
28
|
+
* <NgrokWordmarkIcon className="h-auto w-24" />
|
|
29
|
+
* </a>
|
|
30
|
+
* <Main>
|
|
31
|
+
* <SignInCard />
|
|
32
|
+
* </Main>
|
|
33
|
+
* </CenteredLayout.Body>
|
|
34
|
+
* <CenteredLayout.Footer>
|
|
35
|
+
* <ThemeSwitcher />
|
|
36
|
+
* </CenteredLayout.Footer>
|
|
37
|
+
* </CenteredLayout.Root>
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
declare const CenteredLayout: {
|
|
41
|
+
/**
|
|
42
|
+
* The outer frame of a centered page flow. Fills its nearest sized ancestor
|
|
43
|
+
* (`min-h-full`) and stacks `Header` (pinned top), `Body` (which grows),
|
|
44
|
+
* and `Footer` (pinned bottom). Merge `h-full` via `className` when the
|
|
45
|
+
* host requires an exact height.
|
|
46
|
+
*
|
|
47
|
+
* @see https://mantle.ngrok.com/layouts/centered-layout
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```tsx
|
|
51
|
+
* <CenteredLayout.Root>
|
|
52
|
+
* <SkipToMainLink />
|
|
53
|
+
* <CenteredLayout.Body>
|
|
54
|
+
* <a href="https://ngrok.com">
|
|
55
|
+
* <NgrokWordmarkIcon className="h-auto w-24" />
|
|
56
|
+
* </a>
|
|
57
|
+
* <Main>
|
|
58
|
+
* <SignInCard />
|
|
59
|
+
* </Main>
|
|
60
|
+
* </CenteredLayout.Body>
|
|
61
|
+
* <CenteredLayout.Footer>
|
|
62
|
+
* <ThemeSwitcher />
|
|
63
|
+
* </CenteredLayout.Footer>
|
|
64
|
+
* </CenteredLayout.Root>
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
readonly Root: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & WithAsChild & WithDataSlot, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
68
|
+
/**
|
|
69
|
+
* A utility strip at the top of the layout (account chip, close button)
|
|
70
|
+
* rendered as a semantic `<header>` (`banner` landmark) outside the
|
|
71
|
+
* centered `flex-1` region — the mirror of `Footer`. Merge
|
|
72
|
+
* `sticky top-0 z-10` via `className` to pin it to the window while the
|
|
73
|
+
* page scrolls. Optional — omitting it is fine.
|
|
74
|
+
*
|
|
75
|
+
* @see https://mantle.ngrok.com/layouts/centered-layout
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```tsx
|
|
79
|
+
* <CenteredLayout.Root>
|
|
80
|
+
* <CenteredLayout.Header className="sticky top-0 z-10 justify-between">
|
|
81
|
+
* <AccountChip />
|
|
82
|
+
* <IconButton type="button" label="Close" icon={<XIcon />} />
|
|
83
|
+
* </CenteredLayout.Header>
|
|
84
|
+
* <CenteredLayout.Body>
|
|
85
|
+
* <div className="w-full max-w-5xl">
|
|
86
|
+
* <PlanPicker />
|
|
87
|
+
* </div>
|
|
88
|
+
* </CenteredLayout.Body>
|
|
89
|
+
* </CenteredLayout.Root>
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
readonly Header: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLElement> & import("react").HTMLAttributes<HTMLElement> & WithAsChild & WithDataSlot, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
93
|
+
/**
|
|
94
|
+
* The growing, centered region of the layout. By convention the brand mark
|
|
95
|
+
* (a fully-styled logo/wordmark anchor) is its **first child** — spacing
|
|
96
|
+
* comes from `Body`'s `gap-6`, so no dedicated `Logo` part exists.
|
|
97
|
+
*
|
|
98
|
+
* @see https://mantle.ngrok.com/layouts/centered-layout
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```tsx
|
|
102
|
+
* <CenteredLayout.Root>
|
|
103
|
+
* <SkipToMainLink />
|
|
104
|
+
* <CenteredLayout.Body>
|
|
105
|
+
* <a href="https://ngrok.com">
|
|
106
|
+
* <NgrokWordmarkIcon className="h-auto w-24" />
|
|
107
|
+
* </a>
|
|
108
|
+
* <Main>
|
|
109
|
+
* <SignInCard />
|
|
110
|
+
* </Main>
|
|
111
|
+
* </CenteredLayout.Body>
|
|
112
|
+
* <CenteredLayout.Footer>
|
|
113
|
+
* <ThemeSwitcher />
|
|
114
|
+
* </CenteredLayout.Footer>
|
|
115
|
+
* </CenteredLayout.Root>
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
readonly Body: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & WithAsChild & WithDataSlot, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
119
|
+
/**
|
|
120
|
+
* A pinned utility strip (theme switcher, legal links) rendered as a
|
|
121
|
+
* semantic `<footer>` (`contentinfo` landmark) outside the centered
|
|
122
|
+
* `flex-1` region. Optional — omitting it is fine.
|
|
123
|
+
*
|
|
124
|
+
* @see https://mantle.ngrok.com/layouts/centered-layout
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* ```tsx
|
|
128
|
+
* <CenteredLayout.Root>
|
|
129
|
+
* <SkipToMainLink />
|
|
130
|
+
* <CenteredLayout.Body>
|
|
131
|
+
* <a href="https://ngrok.com">
|
|
132
|
+
* <NgrokWordmarkIcon className="h-auto w-24" />
|
|
133
|
+
* </a>
|
|
134
|
+
* <Main>
|
|
135
|
+
* <SignInCard />
|
|
136
|
+
* </Main>
|
|
137
|
+
* </CenteredLayout.Body>
|
|
138
|
+
* <CenteredLayout.Footer>
|
|
139
|
+
* <ThemeSwitcher />
|
|
140
|
+
* </CenteredLayout.Footer>
|
|
141
|
+
* </CenteredLayout.Root>
|
|
142
|
+
* ```
|
|
143
|
+
*/
|
|
144
|
+
readonly Footer: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLElement> & import("react").HTMLAttributes<HTMLElement> & WithAsChild & WithDataSlot, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
145
|
+
};
|
|
146
|
+
//#endregion
|
|
147
|
+
export { CenteredLayout };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{n as t,t as n}from"./slot-DmPrjM7N.js";import{forwardRef as r}from"react";import{jsx as i}from"react/jsx-runtime";const a=r(({asChild:r,children:a,className:o,"data-slot":s,...c},l)=>i(r?n:`div`,{ref:l,"data-slot":t(s,`centered-layout`),className:e(`flex min-h-full flex-col`,o),...c,children:a}));a.displayName=`CenteredLayout`;const o=r(({asChild:r,children:a,className:o,"data-slot":s,...c},l)=>i(r?n:`header`,{ref:l,"data-slot":t(s,`centered-layout-header`),className:e(`flex shrink-0 items-center px-4 py-4`,o),...c,children:a}));o.displayName=`CenteredLayoutHeader`;const s=r(({asChild:r,children:a,className:o,"data-slot":s,...c},l)=>i(r?n:`div`,{ref:l,"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}));s.displayName=`CenteredLayoutBody`;const c=r(({asChild:r,children:a,className:o,"data-slot":s,...c},l)=>i(r?n:`footer`,{ref:l,"data-slot":t(s,`centered-layout-footer`),className:e(`flex shrink-0 items-center px-4 py-4`,o),...c,children:a}));c.displayName=`CenteredLayoutFooter`;const l={Root:a,Header:o,Body:s,Footer:c};export{l as CenteredLayout};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./compose-refs-Cjf2gfB8.js";import{t}from"./clsx-DUGZgXfJ.js";import{a as n,r}from"./validation-Bpptk_9t.js";import{forwardRef as i,useEffect as a,useRef as o,useState as s}from"react";import{jsx as c}from"react/jsx-runtime";const l=e=>e===`indeterminate`,u=i(({"aria-invalid":i,className:u,checked:d,defaultChecked:f,defaultValue:p=`on`,onClick:m,readOnly:h,validation:g,..._},v)=>{let y=o(null),[b]=s(f),x=n(),{ariaInvalid:S,validation:C}=r({"aria-invalid":i,validation:g??x}),w=d??b;a(()=>{y.current&&(y.current.indeterminate=l(w))},[w]);let T=d==null?{defaultChecked:l(b)?void 0:b}:{checked:!l(d)&&d};return c(`input`,{"aria-checked":l(d)?`mixed`:d,"aria-invalid":S,"data-slot":`checkbox`,className:t(`border-form bg-form shrink-0 cursor-pointer select-none appearance-none rounded border disabled:cursor-default disabled:opacity-50`,`bg-center bg-no-repeat focus:outline-hidden`,`focus-visible:border-accent-600 focus-visible:ring-focus-accent focus-visible:outline-hidden focus-visible:ring-4`,`checked:border-accent-600 checked:bg-accent-600 checked:bg-checked-icon`,`indeterminate:border-accent-600 indeterminate:bg-accent-600 indeterminate:bg-indeterminate-icon`,`data-validation-success:border-success-600 data-validation-success:checked:bg-success-600 data-validation-success:indeterminate:bg-success-600 focus-visible:data-validation-success:border-success-600 focus-visible:data-validation-success:ring-focus-success`,`data-validation-warning:border-warning-600 data-validation-warning:checked:bg-warning-600 data-validation-warning:indeterminate:bg-warning-600 focus-visible:data-validation-warning:border-warning-600 focus-visible:data-validation-warning:ring-focus-warning`,`data-validation-error:border-danger-600 data-validation-error:checked:bg-danger-600 data-validation-error:indeterminate:bg-danger-600 focus-visible:data-validation-error:border-danger-600 focus-visible:data-validation-error:ring-focus-danger`,`where:block where:size-4 where:p-0`,u),...T,"data-validation":C||void 0,defaultValue:p,onClick:e=>{if(h){e.preventDefault();return}m?.(e)},readOnly:h,ref:e(y,v),type:`checkbox`,..._})});u.displayName=`Checkbox`;function d({allSelected:e,someSelected:t}){return e?!0:t?`indeterminate`:!1}export{d as n,u as t};
|