@ngrok/mantle 0.86.3 → 0.88.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/agent.json +1 -1
- package/dist/alert-dialog.js +1 -1
- package/dist/app-layout.d.ts +412 -104
- package/dist/app-layout.js +1 -1
- package/dist/command.d.ts +30 -19
- package/dist/command.js +1 -1
- package/dist/description-list.d.ts +4 -0
- package/dist/description-list.js +1 -1
- package/dist/{dialog-D8Bb_pil.js → dialog-HIdb5d3I.js} +1 -1
- package/dist/dialog.js +1 -1
- package/dist/hooks.d.ts +36 -1
- package/dist/hooks.js +1 -1
- package/dist/llms.txt +1 -1
- package/dist/main-Dv2zuT_b.js +1 -0
- package/dist/main.d.ts +8 -12
- package/dist/main.js +1 -1
- package/dist/mantle.css +9 -20
- package/dist/primitive-w3wFk2La.js +1 -0
- package/dist/sheet-B5x8EO9Y.js +1 -0
- package/dist/sheet.d.ts +213 -4
- package/dist/sheet.js +1 -1
- package/dist/sidebar.d.ts +64 -64
- package/dist/sidebar.js +1 -1
- package/dist/tabs.d.ts +172 -33
- package/dist/tabs.js +1 -1
- package/dist/use-is-hydrated-after-paint-Drj0lNi4.js +1 -0
- package/package.json +2 -2
- package/dist/primitive-vXDjYdbu.js +0 -1
- package/dist/sheet-CIgu6vwS.js +0 -1
- package/dist/use-breakpoint-CjyNk0fi.js +0 -1
package/dist/tabs.d.ts
CHANGED
|
@@ -1,11 +1,28 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as SelfClosingWithAsChild } from "./as-child-D23mGo4f.js";
|
|
2
|
+
import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
|
|
3
|
+
import { n as Separator } from "./separator-Bo4nY_3M.js";
|
|
4
|
+
import { ComponentProps } from "react";
|
|
2
5
|
import { Content, List, Root, Trigger } from "@radix-ui/react-tabs";
|
|
3
6
|
//#region src/components/tabs/tabs.d.ts
|
|
4
7
|
/**
|
|
5
|
-
*
|
|
8
|
+
* Layered sections of content, called tab panels, that show one at a time.
|
|
6
9
|
* The outermost part; it owns `orientation` and `appearance`. It stamps both as
|
|
7
10
|
* `data-orientation` and `data-appearance` for the parts below to style against.
|
|
8
11
|
*
|
|
12
|
+
* **Data attributes:**
|
|
13
|
+
*
|
|
14
|
+
* | Data Attribute | Value | Description |
|
|
15
|
+
* | ------------------ | ------------------------------ | --------------------------------------------------------- |
|
|
16
|
+
* | `data-slot` | `"tabs"` | On the root element. |
|
|
17
|
+
* | `data-orientation` | `"horizontal"` \| `"vertical"` | The `orientation` prop. Set by Radix. |
|
|
18
|
+
* | `data-appearance` | `"classic"` \| `"pill"` | The `appearance` prop. Descendant parts style against it. |
|
|
19
|
+
*
|
|
20
|
+
* **CSS variables:**
|
|
21
|
+
*
|
|
22
|
+
* | CSS Variable | Default | Description |
|
|
23
|
+
* | ------------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
|
24
|
+
* | `--tabs-gap` | `1rem` | The space between the list and the content. `Tabs.Separator` pulls itself up by it, so set the variable here instead of a `gap-*` class. |
|
|
25
|
+
*
|
|
9
26
|
* @see https://mantle.ngrok.com/components/navigation/tabs#tabsroot
|
|
10
27
|
*
|
|
11
28
|
* @example
|
|
@@ -15,6 +32,7 @@ import { Content, List, Root, Trigger } from "@radix-ui/react-tabs";
|
|
|
15
32
|
* <Tabs.Trigger value="account">Account</Tabs.Trigger>
|
|
16
33
|
* <Tabs.Trigger value="password">Password</Tabs.Trigger>
|
|
17
34
|
* </Tabs.List>
|
|
35
|
+
* <Tabs.Separator />
|
|
18
36
|
* <Tabs.Content value="account">
|
|
19
37
|
* <p>Make changes to your account here.</p>
|
|
20
38
|
* </Tabs.Content>
|
|
@@ -24,7 +42,7 @@ import { Content, List, Root, Trigger } from "@radix-ui/react-tabs";
|
|
|
24
42
|
* </Tabs.Root>
|
|
25
43
|
* ```
|
|
26
44
|
*/
|
|
27
|
-
declare const Root$1: ({ className, children, orientation, appearance, ...props }: ComponentProps<typeof Root> & {
|
|
45
|
+
declare const Root$1: ({ className, children, "data-slot": dataSlot, orientation, appearance, ...props }: ComponentProps<typeof Root> & WithDataSlot & {
|
|
28
46
|
/**
|
|
29
47
|
* The appearance of the tabs. Classic appearance shows the tab
|
|
30
48
|
* list with an underline; pill appearance shows each tab as a pill.
|
|
@@ -34,11 +52,15 @@ declare const Root$1: ({ className, children, orientation, appearance, ...props
|
|
|
34
52
|
}) => import("react").JSX.Element;
|
|
35
53
|
/**
|
|
36
54
|
* Contains the triggers that are aligned along the edge of the active content.
|
|
55
|
+
* The list draws no border of its own: compose `Tabs.Separator` after it for
|
|
56
|
+
* the hairline between the triggers and the content.
|
|
57
|
+
*
|
|
58
|
+
* **Data attributes:**
|
|
37
59
|
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
60
|
+
* | Data Attribute | Value | Description |
|
|
61
|
+
* | ------------------ | ------------------------------ | ------------------------------------- |
|
|
62
|
+
* | `data-slot` | `"tabs-list"` | On the tablist element. |
|
|
63
|
+
* | `data-orientation` | `"horizontal"` \| `"vertical"` | The root's orientation. Set by Radix. |
|
|
42
64
|
*
|
|
43
65
|
* @see https://mantle.ngrok.com/components/navigation/tabs#tabslist
|
|
44
66
|
*
|
|
@@ -49,32 +71,61 @@ declare const Root$1: ({ className, children, orientation, appearance, ...props
|
|
|
49
71
|
* <Tabs.Trigger value="account">Account</Tabs.Trigger>
|
|
50
72
|
* <Tabs.Trigger value="password">Password</Tabs.Trigger>
|
|
51
73
|
* </Tabs.List>
|
|
74
|
+
* <Tabs.Separator />
|
|
52
75
|
* <Tabs.Content value="account">
|
|
53
76
|
* <p>Make changes to your account here.</p>
|
|
54
77
|
* </Tabs.Content>
|
|
55
78
|
* </Tabs.Root>
|
|
56
79
|
* ```
|
|
80
|
+
*/
|
|
81
|
+
declare const List$1: ({ className, "data-slot": dataSlot, ref, ...props }: ComponentProps<typeof List> & WithDataSlot) => import("react").JSX.Element;
|
|
82
|
+
type TabsSeparatorProps = Omit<ComponentProps<typeof Separator>, "asChild" | "children" | "orientation"> & SelfClosingWithAsChild & WithDataSlot;
|
|
83
|
+
/**
|
|
84
|
+
* The hairline between the list and the content, in the `separator` color
|
|
85
|
+
* token. Compose it directly after `Tabs.List`. It follows the root's
|
|
86
|
+
* `orientation`: a horizontal root draws it under the list, a vertical root
|
|
87
|
+
* draws it beside the list. It is a sibling of the list and not a child, so it
|
|
88
|
+
* spans the root's full width and neither scrolls nor fades with the triggers.
|
|
89
|
+
*
|
|
90
|
+
* As the root's direct child it pulls itself up by `--tabs-gap` and sits flush
|
|
91
|
+
* against the list, while the content keeps the gap. Inside a wrapper of your
|
|
92
|
+
* own, the offset stays off.
|
|
93
|
+
*
|
|
94
|
+
* The separator is decorative (`role="none"`). Pass `semantic` for
|
|
95
|
+
* `role="separator"`. Outside `Tabs.Root` it throws.
|
|
96
|
+
*
|
|
97
|
+
* **CSS variables:**
|
|
98
|
+
*
|
|
99
|
+
* | CSS Variable | Default | Description |
|
|
100
|
+
* | ------------ | ------- | --------------------------------------------------------------------------------------------- |
|
|
101
|
+
* | `--tabs-gap` | `1rem` | Read, not owned. `Tabs.Root` sets it; the separator cancels it to sit flush against the list. |
|
|
102
|
+
*
|
|
103
|
+
* **Data attributes:**
|
|
104
|
+
*
|
|
105
|
+
* | Data Attribute | Value | Description |
|
|
106
|
+
* | ------------------ | ------------------------------ | --------------------------------------------- |
|
|
107
|
+
* | `data-slot` | `"tabs-separator"` | On the separator element. |
|
|
108
|
+
* | `data-orientation` | `"horizontal"` \| `"vertical"` | The root's orientation. |
|
|
109
|
+
* | `data-separator` | present | Presence-only. Set by the mantle `Separator`. |
|
|
110
|
+
*
|
|
111
|
+
* @see https://mantle.ngrok.com/components/navigation/tabs#tabsseparator
|
|
57
112
|
*
|
|
58
113
|
* @example
|
|
59
114
|
* ```tsx
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
115
|
+
* <Tabs.Root defaultValue="account">
|
|
116
|
+
* <Tabs.List>
|
|
117
|
+
* <Tabs.Trigger value="account">Account</Tabs.Trigger>
|
|
118
|
+
* <Tabs.Trigger value="password">Password</Tabs.Trigger>
|
|
119
|
+
* </Tabs.List>
|
|
120
|
+
* <Tabs.Separator />
|
|
121
|
+
* <Tabs.Content value="account">
|
|
122
|
+
* <p>Make changes to your account here.</p>
|
|
123
|
+
* </Tabs.Content>
|
|
124
|
+
* </Tabs.Root>
|
|
65
125
|
* ```
|
|
66
126
|
*/
|
|
67
|
-
declare const
|
|
68
|
-
|
|
69
|
-
* Hide the tablist's border — the bottom border of a horizontal classic
|
|
70
|
-
* tablist, or the side border of a vertical one. Also rendered as a
|
|
71
|
-
* `data-hide-border` attribute on the tablist element. Has no effect on
|
|
72
|
-
* the pill appearance, which never draws a border.
|
|
73
|
-
* @default false
|
|
74
|
-
*/
|
|
75
|
-
hideBorder?: boolean;
|
|
76
|
-
}) => import("react").JSX.Element;
|
|
77
|
-
type TabsTriggerProps = ComponentProps<typeof Trigger>;
|
|
127
|
+
declare const TabsSeparator: ({ className, "data-slot": dataSlot, ...props }: TabsSeparatorProps) => import("react").JSX.Element;
|
|
128
|
+
type TabsTriggerProps = ComponentProps<typeof Trigger> & WithDataSlot;
|
|
78
129
|
/**
|
|
79
130
|
* The button that activates its associated content.
|
|
80
131
|
*
|
|
@@ -87,7 +138,7 @@ type TabsTriggerProps = ComponentProps<typeof Trigger>;
|
|
|
87
138
|
* so the icon, the label, and `Tabs.Badge` stay flex items of the trigger and
|
|
88
139
|
* keep its `gap`. A `[&>svg]` class of your own no longer reaches an icon you
|
|
89
140
|
* pass as a child, because that icon is now a grandchild. Match the part's own
|
|
90
|
-
* variant instead
|
|
141
|
+
* variant instead: `[&>[data-slot=tabs-trigger-label]>svg]:size-4`. A `[&_svg]`
|
|
91
142
|
* or a class on the icon loses to the default, which is more specific.
|
|
92
143
|
*
|
|
93
144
|
* **Data attributes:**
|
|
@@ -96,6 +147,9 @@ type TabsTriggerProps = ComponentProps<typeof Trigger>;
|
|
|
96
147
|
* | -------------- | ------------------------ | ------------------------------------ |
|
|
97
148
|
* | `data-slot` | `"tabs-trigger"` | On the trigger element. |
|
|
98
149
|
* | `data-slot` | `"tabs-trigger-label"` | On the `<span>` wrapping `children`. |
|
|
150
|
+
* | `data-orientation` | `"horizontal"` \| `"vertical"` | The root's orientation. Set by Radix. |
|
|
151
|
+
* | `data-state` | `"active"` \| `"inactive"` | Whether the trigger's panel is shown. Set by Radix. |
|
|
152
|
+
* | `data-disabled` | present when `disabled` | Presence-only. Set by Radix. |
|
|
99
153
|
*
|
|
100
154
|
* @see https://mantle.ngrok.com/components/navigation/tabs#tabstrigger
|
|
101
155
|
*
|
|
@@ -106,16 +160,23 @@ type TabsTriggerProps = ComponentProps<typeof Trigger>;
|
|
|
106
160
|
* <Tabs.Trigger value="account">Account</Tabs.Trigger>
|
|
107
161
|
* <Tabs.Trigger value="password">Password</Tabs.Trigger>
|
|
108
162
|
* </Tabs.List>
|
|
163
|
+
* <Tabs.Separator />
|
|
109
164
|
* <Tabs.Content value="account">
|
|
110
165
|
* <p>Make changes to your account here.</p>
|
|
111
166
|
* </Tabs.Content>
|
|
112
167
|
* </Tabs.Root>
|
|
113
168
|
* ```
|
|
114
169
|
*/
|
|
115
|
-
declare const Trigger$1: ({ "aria-disabled": _ariaDisabled, asChild, children, className, disabled: _disabled, ref, ...props }: TabsTriggerProps) => import("react").JSX.Element;
|
|
170
|
+
declare const Trigger$1: ({ "aria-disabled": _ariaDisabled, asChild, children, className, "data-slot": dataSlot, disabled: _disabled, ref, ...props }: TabsTriggerProps) => import("react").JSX.Element;
|
|
116
171
|
/**
|
|
117
172
|
* A badge to render inside a tab trigger, typically a count or a status indicator.
|
|
118
173
|
*
|
|
174
|
+
* **Data attributes:**
|
|
175
|
+
*
|
|
176
|
+
* | Data Attribute | Value | Description |
|
|
177
|
+
* | -------------- | -------------- | --------------------- |
|
|
178
|
+
* | `data-slot` | `"tabs-badge"` | On the badge element. |
|
|
179
|
+
*
|
|
119
180
|
* @see https://mantle.ngrok.com/components/navigation/tabs#tabsbadge
|
|
120
181
|
*
|
|
121
182
|
* @example
|
|
@@ -127,14 +188,23 @@ declare const Trigger$1: ({ "aria-disabled": _ariaDisabled, asChild, children, c
|
|
|
127
188
|
* </Tabs.Trigger>
|
|
128
189
|
* <Tabs.Trigger value="password">Password</Tabs.Trigger>
|
|
129
190
|
* </Tabs.List>
|
|
191
|
+
* <Tabs.Separator />
|
|
130
192
|
* </Tabs.Root>
|
|
131
193
|
* ```
|
|
132
194
|
*/
|
|
133
|
-
declare const Badge: ({ className, children, ...props }:
|
|
195
|
+
declare const Badge: ({ className, children, "data-slot": dataSlot, ...props }: ComponentProps<"span"> & WithDataSlot) => import("react").JSX.Element;
|
|
134
196
|
/**
|
|
135
197
|
* Contains the content associated with each trigger.
|
|
136
198
|
* It renders when that trigger is active.
|
|
137
199
|
*
|
|
200
|
+
* **Data attributes:**
|
|
201
|
+
*
|
|
202
|
+
* | Data Attribute | Value | Description |
|
|
203
|
+
* | ------------------ | ------------------------------ | ----------------------------------------- |
|
|
204
|
+
* | `data-slot` | `"tabs-content"` | On the panel element. |
|
|
205
|
+
* | `data-orientation` | `"horizontal"` \| `"vertical"` | The root's orientation. Set by Radix. |
|
|
206
|
+
* | `data-state` | `"active"` \| `"inactive"` | Whether the panel is shown. Set by Radix. |
|
|
207
|
+
*
|
|
138
208
|
* @see https://mantle.ngrok.com/components/navigation/tabs#tabscontent
|
|
139
209
|
*
|
|
140
210
|
* @example
|
|
@@ -144,6 +214,7 @@ declare const Badge: ({ className, children, ...props }: HTMLAttributes<HTMLSpan
|
|
|
144
214
|
* <Tabs.Trigger value="account">Account</Tabs.Trigger>
|
|
145
215
|
* <Tabs.Trigger value="password">Password</Tabs.Trigger>
|
|
146
216
|
* </Tabs.List>
|
|
217
|
+
* <Tabs.Separator />
|
|
147
218
|
* <Tabs.Content value="account">
|
|
148
219
|
* <p>Make changes to your account here.</p>
|
|
149
220
|
* </Tabs.Content>
|
|
@@ -153,9 +224,9 @@ declare const Badge: ({ className, children, ...props }: HTMLAttributes<HTMLSpan
|
|
|
153
224
|
* </Tabs.Root>
|
|
154
225
|
* ```
|
|
155
226
|
*/
|
|
156
|
-
declare const Content$1: ({ className, ...props }: ComponentProps<typeof Content>) => import("react").JSX.Element;
|
|
227
|
+
declare const Content$1: ({ className, "data-slot": dataSlot, ...props }: ComponentProps<typeof Content> & WithDataSlot) => import("react").JSX.Element;
|
|
157
228
|
/**
|
|
158
|
-
*
|
|
229
|
+
* Layered sections of content, called tab panels, that show one at a time.
|
|
159
230
|
*
|
|
160
231
|
* @see https://mantle.ngrok.com/components/navigation/tabs
|
|
161
232
|
*
|
|
@@ -166,6 +237,7 @@ declare const Content$1: ({ className, ...props }: ComponentProps<typeof Content
|
|
|
166
237
|
* ├── Tabs.List
|
|
167
238
|
* │ └── Tabs.Trigger
|
|
168
239
|
* │ └── Tabs.Badge
|
|
240
|
+
* ├── Tabs.Separator
|
|
169
241
|
* └── Tabs.Content
|
|
170
242
|
* ```
|
|
171
243
|
*
|
|
@@ -176,6 +248,7 @@ declare const Content$1: ({ className, ...props }: ComponentProps<typeof Content
|
|
|
176
248
|
* <Tabs.Trigger value="account">Account</Tabs.Trigger>
|
|
177
249
|
* <Tabs.Trigger value="password">Password</Tabs.Trigger>
|
|
178
250
|
* </Tabs.List>
|
|
251
|
+
* <Tabs.Separator />
|
|
179
252
|
* <Tabs.Content value="account">
|
|
180
253
|
* <p>Make changes to your account here.</p>
|
|
181
254
|
* </Tabs.Content>
|
|
@@ -187,10 +260,18 @@ declare const Content$1: ({ className, ...props }: ComponentProps<typeof Content
|
|
|
187
260
|
*/
|
|
188
261
|
declare const Tabs: {
|
|
189
262
|
/**
|
|
190
|
-
*
|
|
263
|
+
* Layered sections of content, called tab panels, that show one at a time.
|
|
191
264
|
* The outermost part; it owns `orientation` and `appearance`. It stamps both as
|
|
192
265
|
* `data-orientation` and `data-appearance` for the parts below to style against.
|
|
193
266
|
*
|
|
267
|
+
* **Data attributes:**
|
|
268
|
+
*
|
|
269
|
+
* | Data Attribute | Value | Description |
|
|
270
|
+
* | ------------------ | ------------------------------ | --------------------------------------------------------- |
|
|
271
|
+
* | `data-slot` | `"tabs"` | On the root element. |
|
|
272
|
+
* | `data-orientation` | `"horizontal"` \| `"vertical"` | The `orientation` prop. Set by Radix. |
|
|
273
|
+
* | `data-appearance` | `"classic"` \| `"pill"` | The `appearance` prop. Descendant parts style against it. |
|
|
274
|
+
*
|
|
194
275
|
* @see https://mantle.ngrok.com/components/navigation/tabs#tabsroot
|
|
195
276
|
*
|
|
196
277
|
* @example
|
|
@@ -200,6 +281,7 @@ declare const Tabs: {
|
|
|
200
281
|
* <Tabs.Trigger value="account">Account</Tabs.Trigger>
|
|
201
282
|
* <Tabs.Trigger value="password">Password</Tabs.Trigger>
|
|
202
283
|
* </Tabs.List>
|
|
284
|
+
* <Tabs.Separator />
|
|
203
285
|
* <Tabs.Content value="account">
|
|
204
286
|
* <p>Make changes to your account here.</p>
|
|
205
287
|
* </Tabs.Content>
|
|
@@ -211,6 +293,14 @@ declare const Tabs: {
|
|
|
211
293
|
* Contains the content associated with each trigger.
|
|
212
294
|
* It renders when that trigger is active.
|
|
213
295
|
*
|
|
296
|
+
* **Data attributes:**
|
|
297
|
+
*
|
|
298
|
+
* | Data Attribute | Value | Description |
|
|
299
|
+
* | ------------------ | ------------------------------ | ----------------------------------------- |
|
|
300
|
+
* | `data-slot` | `"tabs-content"` | On the panel element. |
|
|
301
|
+
* | `data-orientation` | `"horizontal"` \| `"vertical"` | The root's orientation. Set by Radix. |
|
|
302
|
+
* | `data-state` | `"active"` \| `"inactive"` | Whether the panel is shown. Set by Radix. |
|
|
303
|
+
*
|
|
214
304
|
* @see https://mantle.ngrok.com/components/navigation/tabs#tabscontent
|
|
215
305
|
*
|
|
216
306
|
* @example
|
|
@@ -219,6 +309,7 @@ declare const Tabs: {
|
|
|
219
309
|
* <Tabs.List>
|
|
220
310
|
* <Tabs.Trigger value="account">Account</Tabs.Trigger>
|
|
221
311
|
* </Tabs.List>
|
|
312
|
+
* <Tabs.Separator />
|
|
222
313
|
* <Tabs.Content value="account">
|
|
223
314
|
* <p>Make changes to your account here.</p>
|
|
224
315
|
* </Tabs.Content>
|
|
@@ -228,10 +319,15 @@ declare const Tabs: {
|
|
|
228
319
|
readonly Content: typeof Content$1;
|
|
229
320
|
/**
|
|
230
321
|
* Contains the triggers that are aligned along the edge of the active content.
|
|
322
|
+
* The list draws no border of its own: compose `Tabs.Separator` after it for
|
|
323
|
+
* the hairline between the triggers and the content.
|
|
324
|
+
*
|
|
325
|
+
* **Data attributes:**
|
|
231
326
|
*
|
|
232
|
-
*
|
|
233
|
-
*
|
|
234
|
-
* `
|
|
327
|
+
* | Data Attribute | Value | Description |
|
|
328
|
+
* | ------------------ | ------------------------------ | ------------------------------------- |
|
|
329
|
+
* | `data-slot` | `"tabs-list"` | On the tablist element. |
|
|
330
|
+
* | `data-orientation` | `"horizontal"` \| `"vertical"` | The root's orientation. Set by Radix. |
|
|
235
331
|
*
|
|
236
332
|
* @see https://mantle.ngrok.com/components/navigation/tabs#tabslist
|
|
237
333
|
*
|
|
@@ -242,10 +338,42 @@ declare const Tabs: {
|
|
|
242
338
|
* <Tabs.Trigger value="account">Account</Tabs.Trigger>
|
|
243
339
|
* <Tabs.Trigger value="password">Password</Tabs.Trigger>
|
|
244
340
|
* </Tabs.List>
|
|
341
|
+
* <Tabs.Separator />
|
|
245
342
|
* </Tabs.Root>
|
|
246
343
|
* ```
|
|
247
344
|
*/
|
|
248
345
|
readonly List: typeof List$1;
|
|
346
|
+
/**
|
|
347
|
+
* The hairline between the list and the content, in the `separator` color
|
|
348
|
+
* token. Compose it directly after `Tabs.List`. It follows the root's
|
|
349
|
+
* `orientation`: a horizontal root draws it under the list, a vertical root
|
|
350
|
+
* draws it beside the list. It is a sibling of the list and not a child, so it
|
|
351
|
+
* spans the root's full width and neither scrolls nor fades with the triggers.
|
|
352
|
+
*
|
|
353
|
+
* As the root's direct child it pulls itself up by `--tabs-gap` and sits flush
|
|
354
|
+
* against the list, while the content keeps the gap. Inside a wrapper of your
|
|
355
|
+
* own, the offset stays off.
|
|
356
|
+
*
|
|
357
|
+
* The separator is decorative (`role="none"`). Pass `semantic` for
|
|
358
|
+
* `role="separator"`. Outside `Tabs.Root` it throws.
|
|
359
|
+
*
|
|
360
|
+
* @see https://mantle.ngrok.com/components/navigation/tabs#tabsseparator
|
|
361
|
+
*
|
|
362
|
+
* @example
|
|
363
|
+
* ```tsx
|
|
364
|
+
* <Tabs.Root defaultValue="account">
|
|
365
|
+
* <Tabs.List>
|
|
366
|
+
* <Tabs.Trigger value="account">Account</Tabs.Trigger>
|
|
367
|
+
* <Tabs.Trigger value="password">Password</Tabs.Trigger>
|
|
368
|
+
* </Tabs.List>
|
|
369
|
+
* <Tabs.Separator />
|
|
370
|
+
* <Tabs.Content value="account">
|
|
371
|
+
* <p>Make changes to your account here.</p>
|
|
372
|
+
* </Tabs.Content>
|
|
373
|
+
* </Tabs.Root>
|
|
374
|
+
* ```
|
|
375
|
+
*/
|
|
376
|
+
readonly Separator: typeof TabsSeparator;
|
|
249
377
|
/**
|
|
250
378
|
* The button that activates its associated content.
|
|
251
379
|
*
|
|
@@ -258,7 +386,7 @@ declare const Tabs: {
|
|
|
258
386
|
* so the icon, the label, and `Tabs.Badge` stay flex items of the trigger and
|
|
259
387
|
* keep its `gap`. A `[&>svg]` class of your own no longer reaches an icon you
|
|
260
388
|
* pass as a child, because that icon is now a grandchild. Match the part's own
|
|
261
|
-
* variant instead
|
|
389
|
+
* variant instead: `[&>[data-slot=tabs-trigger-label]>svg]:size-4`. A `[&_svg]`
|
|
262
390
|
* or a class on the icon loses to the default, which is more specific.
|
|
263
391
|
*
|
|
264
392
|
* **Data attributes:**
|
|
@@ -267,6 +395,9 @@ declare const Tabs: {
|
|
|
267
395
|
* | -------------- | ------------------------ | ------------------------------------ |
|
|
268
396
|
* | `data-slot` | `"tabs-trigger"` | On the trigger element. |
|
|
269
397
|
* | `data-slot` | `"tabs-trigger-label"` | On the `<span>` wrapping `children`. |
|
|
398
|
+
* | `data-orientation` | `"horizontal"` \| `"vertical"` | The root's orientation. Set by Radix. |
|
|
399
|
+
* | `data-state` | `"active"` \| `"inactive"` | Whether the trigger's panel is shown. Set by Radix. |
|
|
400
|
+
* | `data-disabled` | present when `disabled` | Presence-only. Set by Radix. |
|
|
270
401
|
*
|
|
271
402
|
* @see https://mantle.ngrok.com/components/navigation/tabs#tabstrigger
|
|
272
403
|
*
|
|
@@ -277,6 +408,7 @@ declare const Tabs: {
|
|
|
277
408
|
* <Tabs.Trigger value="account">Account</Tabs.Trigger>
|
|
278
409
|
* <Tabs.Trigger value="password">Password</Tabs.Trigger>
|
|
279
410
|
* </Tabs.List>
|
|
411
|
+
* <Tabs.Separator />
|
|
280
412
|
* </Tabs.Root>
|
|
281
413
|
* ```
|
|
282
414
|
*/
|
|
@@ -284,6 +416,12 @@ declare const Tabs: {
|
|
|
284
416
|
/**
|
|
285
417
|
* A badge to render inside a tab trigger, typically a count or a status indicator.
|
|
286
418
|
*
|
|
419
|
+
* **Data attributes:**
|
|
420
|
+
*
|
|
421
|
+
* | Data Attribute | Value | Description |
|
|
422
|
+
* | -------------- | -------------- | --------------------- |
|
|
423
|
+
* | `data-slot` | `"tabs-badge"` | On the badge element. |
|
|
424
|
+
*
|
|
287
425
|
* @see https://mantle.ngrok.com/components/navigation/tabs#tabsbadge
|
|
288
426
|
*
|
|
289
427
|
* @example
|
|
@@ -294,6 +432,7 @@ declare const Tabs: {
|
|
|
294
432
|
* Account <Tabs.Badge>5</Tabs.Badge>
|
|
295
433
|
* </Tabs.Trigger>
|
|
296
434
|
* </Tabs.List>
|
|
435
|
+
* <Tabs.Separator />
|
|
297
436
|
* </Tabs.Root>
|
|
298
437
|
* ```
|
|
299
438
|
*/
|
package/dist/tabs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./compose-refs-sFdxsL7k.js";import{t}from"./cx-0HCjnNv1.js";import{t as n}from"./booleanish-BfvnW6vy.js";import{t as
|
|
1
|
+
import{n as e}from"./compose-refs-sFdxsL7k.js";import{t}from"./cx-0HCjnNv1.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{t as r}from"./booleanish-BfvnW6vy.js";import{t as i}from"./clsx-DUGZgXfJ.js";import{n as a}from"./separator-D98be0gY.js";import{t as o}from"./use-prefers-reduced-motion-Cj9tJ181.js";import{c as s}from"react/compiler-runtime";import{Children as c,cloneElement as l,createContext as u,isValidElement as d,useContext as f,useEffect as p,useRef as m}from"react";import h from"tiny-invariant";import{Fragment as g,jsx as _,jsxs as v}from"react/jsx-runtime";import{cva as y}from"class-variance-authority";import{Content as b,List as x,Root as S,Trigger as C}from"@radix-ui/react-tabs";const w=u(null);function T(e){let t=f(w);return h(t!=null,`${e} must be rendered inside Tabs.Root.`),t}const E=e=>{let r=s(25),i,a,o,c,l,u;r[0]===e?(i=r[1],a=r[2],o=r[3],c=r[4],l=r[5],u=r[6]):({className:a,children:i,"data-slot":o,orientation:l,appearance:u,...c}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=c,r[5]=l,r[6]=u);let d=l===void 0?`horizontal`:l,f=u===void 0?`classic`:u,p;r[7]!==f||r[8]!==d?(p={orientation:d,appearance:f},r[7]=f,r[8]=d,r[9]=p):p=r[9];let m=p,h;r[10]===o?h=r[11]:(h=n(o,`tabs`),r[10]=o,r[11]=h);let g=d===`horizontal`?`flex-col`:`flex-row`,v;r[12]!==a||r[13]!==g?(v=t(`flex [--tabs-gap:--spacing(4)] gap-(--tabs-gap)`,g,a),r[12]=a,r[13]=g,r[14]=v):v=r[14];let y;r[15]!==f||r[16]!==i||r[17]!==d||r[18]!==c||r[19]!==h||r[20]!==v?(y=_(S,{"data-slot":h,"data-appearance":f,className:v,orientation:d,...c,children:i}),r[15]=f,r[16]=i,r[17]=d,r[18]=c,r[19]=h,r[20]=v,r[21]=y):y=r[21];let b;return r[22]!==m||r[23]!==y?(b=_(w.Provider,{value:m,children:y}),r[22]=m,r[23]=y,r[24]=b):b=r[24],b},D=y(`flex`,{variants:{orientation:{horizontal:`scroll-fade-x flex-row items-center overflow-x-auto overscroll-x-none self-stretch min-w-0 pt-1 -mt-1 px-1 -mx-1`,vertical:`flex-col items-end gap-3.5 self-stretch`},appearance:{classic:``,pill:``}},compoundVariants:[{orientation:`horizontal`,appearance:`pill`,className:`gap-1 pb-1 -mb-1`},{orientation:`horizontal`,appearance:`classic`,className:`gap-6`}]}),O=r=>{let i=s(20),a,c,l,u;i[0]===r?(a=i[1],c=i[2],l=i[3],u=i[4]):({className:a,"data-slot":c,ref:u,...l}=r,i[0]=r,i[1]=a,i[2]=c,i[3]=l,i[4]=u);let{orientation:d,appearance:f}=T(`Tabs.List`),h=m(null),g=e(h,u),v,y;i[5]===d?(v=i[6],y=i[7]):(v=()=>{let e=h.current;if(!e||d!==`horizontal`)return;let t=new AbortController,{signal:n}=t,r=!1;e.addEventListener(`pointerdown`,()=>{r=!0},{signal:n});let i=()=>{r=!1};return e.addEventListener(`pointerup`,i,{signal:n}),e.addEventListener(`pointercancel`,i,{signal:n}),e.addEventListener(`keydown`,i,{signal:n}),e.addEventListener(`focusin`,t=>{if(!r&&t.target instanceof Element&&t.target!==e){let e=o()?`auto`:`smooth`;t.target.scrollIntoView({behavior:e,inline:`center`,block:`nearest`})}},{signal:n}),()=>{t.abort()}},y=[d],i[5]=d,i[6]=v,i[7]=y),p(v,y);let b;i[8]===c?b=i[9]:(b=n(c,`tabs-list`),i[8]=c,i[9]=b);let S;i[10]!==f||i[11]!==a||i[12]!==d?(S=t(D({orientation:d,appearance:f}),a),i[10]=f,i[11]=a,i[12]=d,i[13]=S):S=i[13];let C;return i[14]!==g||i[15]!==d||i[16]!==l||i[17]!==b||i[18]!==S?(C=_(x,{"aria-orientation":d,"data-slot":b,className:S,ref:g,...l}),i[14]=g,i[15]=d,i[16]=l,i[17]=b,i[18]=S,i[19]=C):C=i[19],C},k=e=>{let r=s(14),i,o,c;r[0]===e?(i=r[1],o=r[2],c=r[3]):({className:i,"data-slot":o,...c}=e,r[0]=e,r[1]=i,r[2]=o,r[3]=c);let{orientation:l}=T(`Tabs.Separator`),u=l===`horizontal`?`[[data-slot~=tabs]>&]:-mt-(--tabs-gap)`:`h-auto self-stretch [[data-slot~=tabs]>&]:-ml-(--tabs-gap)`,d;r[4]===o?d=r[5]:(d=n(o,`tabs-separator`),r[4]=o,r[5]=d);let f;r[6]!==i||r[7]!==u?(f=t(u,i),r[6]=i,r[7]=u,r[8]=f):f=r[8];let p;return r[9]!==l||r[10]!==c||r[11]!==d||r[12]!==f?(p=_(a,{"data-slot":d,orientation:l,className:f,...c}),r[9]=l,r[10]=c,r[11]=d,r[12]=f,r[13]=p):p=r[13],p},A=y(`absolute z-0`,{variants:{orientation:{horizontal:`bottom-0 left-0 right-0 h-0.75`,vertical:`-right-px bottom-0 top-0 w-0.75`},appearance:{classic:`group-data-state-active/tab-trigger:bg-neutral-950`,pill:`hidden`}}}),j=()=>{let e=s(5),{orientation:t,appearance:n}=T(`Tabs.Trigger`),r;e[0]!==n||e[1]!==t?(r=i(A({orientation:t,appearance:n})),e[0]=n,e[1]=t,e[2]=r):r=e[2];let a;return e[3]===r?a=e[4]:(a=_(`span`,{"aria-hidden":!0,className:r}),e[3]=r,e[4]=a),a},M=y(t(`group/tab-trigger relative flex cursor-pointer items-center gap-1 whitespace-nowrap py-3 text-sm font-medium text-gray-600`,`ring-focus-accent outline-hidden`,`aria-disabled:cursor-default aria-disabled:opacity-50`,`focus-visible:ring-4`,`[&>[data-slot=tabs-trigger-label]>svg]:shrink-0 [&>[data-slot=tabs-trigger-label]>svg]:size-5`,`not-aria-disabled:hover:text-gray-900`),{variants:{orientation:{horizontal:`rounded-tl-md rounded-tr-md`,vertical:`rounded-bl-md rounded-tl-md pr-3`},appearance:{classic:t(`not-aria-disabled:hover:data-state-active:text-strong`,`data-state-active:text-strong`),pill:t(`not-aria-disabled:hover:data-state-active:text-strong`,`not-aria-disabled:hover:data-state-active:bg-neutral-500/15`,`data-state-active:text-strong`,`data-state-active:bg-neutral-500/15`,`rounded-full py-2 px-3`)}}}),N={Root:E,Content:e=>{let r=s(12),i,a,o;r[0]===e?(i=r[1],a=r[2],o=r[3]):({className:i,"data-slot":a,...o}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o);let c;r[4]===a?c=r[5]:(c=n(a,`tabs-content`),r[4]=a,r[5]=c);let l;r[6]===i?l=r[7]:(l=t(`focus-visible:ring-focus-accent outline-hidden focus-visible:ring-4`,i),r[6]=i,r[7]=l);let u;return r[8]!==o||r[9]!==c||r[10]!==l?(u=_(b,{"data-slot":c,className:l,...o}),r[8]=o,r[9]=c,r[10]=l,r[11]=u):u=r[11],u},List:O,Separator:k,Trigger:e=>{let i=s(44),a,o,u,f,p,m,y,b;i[0]===e?(a=i[1],o=i[2],u=i[3],f=i[4],p=i[5],m=i[6],y=i[7],b=i[8]):({"aria-disabled":a,asChild:b,children:u,className:f,"data-slot":p,disabled:o,ref:y,...m}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=u,i[4]=f,i[5]=p,i[6]=m,i[7]=y,i[8]=b);let x=b!==void 0&&b,{orientation:S,appearance:w}=T(`Tabs.Trigger`),E=a??o,D;i[9]===E?D=i[10]:(D=r(E),i[9]=E,i[10]=D);let O=D,k=a??o,A;i[11]!==w||i[12]!==f||i[13]!==S?(A=t(M({orientation:S,appearance:w}),f),i[11]=w,i[12]=f,i[13]=S,i[14]=A):A=i[14];let N;i[15]===p?N=i[16]:(N=n(p,`tabs-trigger`),i[15]=p,i[16]=N);let P;i[17]!==O||i[18]!==m||i[19]!==k||i[20]!==A||i[21]!==N?(P={"aria-disabled":k,className:A,"data-slot":N,disabled:O,...m},i[17]=O,i[18]=m,i[19]=k,i[20]=A,i[21]=N,i[22]=P):P=i[22];let F=P;if(x){let e;i[23]===u?e=i[24]:(e=c.only(u),h(d(e),"When using `asChild`, TabsTrigger must be passed a single child as a JSX tag."),i[23]=u,i[24]=e);let t=e.props?.children,n;if(i[25]!==O||i[26]!==t||i[27]!==y||i[28]!==e||i[29]!==F){let r=O?{href:void 0,to:void 0}:{},a;i[31]!==O||i[32]!==e?(a=O?_(`button`,{type:`button`}):e,i[31]=O,i[32]=e,i[33]=a):a=i[33];let o;i[34]===Symbol.for(`react.memo_cache_sentinel`)?(o=_(j,{}),i[34]=o):o=i[34];let s;i[35]===t?s=i[36]:(s=v(g,{children:[o,_(`span`,{"data-slot":`tabs-trigger-label`,className:`contents`,children:t})]}),i[35]=t,i[36]=s),n=_(C,{asChild:!0,...F,ref:y,children:l(a,r,s)}),i[25]=O,i[26]=t,i[27]=y,i[28]=e,i[29]=F,i[30]=n}else n=i[30];return n}let I;i[37]===Symbol.for(`react.memo_cache_sentinel`)?(I=_(j,{}),i[37]=I):I=i[37];let L;i[38]===u?L=i[39]:(L=_(`span`,{"data-slot":`tabs-trigger-label`,className:`contents`,children:u}),i[38]=u,i[39]=L);let R;return i[40]!==y||i[41]!==L||i[42]!==F?(R=v(C,{ref:y,...F,children:[I,L]}),i[40]=y,i[41]=L,i[42]=F,i[43]=R):R=i[43],R},Badge:e=>{let r=s(14),i,a,o,c;r[0]===e?(i=r[1],a=r[2],o=r[3],c=r[4]):({className:a,children:i,"data-slot":o,...c}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=c);let l;r[5]===o?l=r[6]:(l=n(o,`tabs-badge`),r[5]=o,r[6]=l);let u;r[7]===a?u=r[8]:(u=t(`rounded-full bg-neutral-500/20 px-1.5 text-xs font-medium text-gray-600`,`group-data-state-active/tab-trigger:bg-neutral-950/10 group-data-state-active/tab-trigger:text-strong group-hover/tab-trigger:group-enabled/tab-trigger:group-data-state-active/tab-trigger:text-strong`,`group-hover/tab-trigger:group-enabled/tab-trigger:text-gray-700`,a),r[7]=a,r[8]=u);let d;return r[9]!==i||r[10]!==c||r[11]!==l||r[12]!==u?(d=_(`span`,{"data-slot":l,className:u,...c,children:i}),r[9]=i,r[10]=c,r[11]=l,r[12]=u,r[13]=d):d=r[13],d}};export{N as Tabs};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e}from"react/compiler-runtime";import{useEffect as t,useState as n,useSyncExternalStore as r}from"react";const i=[`2xl`,`xl`,`lg`,`md`,`sm`,`xs`,`2xs`],a=[`default`,...i];function o(){return r(S,C,s)}function s(){return`default`}function c(t){let n=e(4),i;n[0]===t?i=n[1]:(i=T(t),n[0]=t,n[1]=i);let a;return n[2]===t?a=n[3]:(a=D(t),n[2]=t,n[3]=a),r(i,a,l)}function l(){return!1}const u={"2xl":`(min-width: 96rem)`,xl:`(min-width: 80rem)`,lg:`(min-width: 64rem)`,md:`(min-width: 48rem)`,sm:`(min-width: 40rem)`,xs:`(min-width: 30rem)`,"2xs":`(min-width: 22.5rem)`},d={"2xl":`(max-width: 95.99rem)`,xl:`(max-width: 79.99rem)`,lg:`(max-width: 63.99rem)`,md:`(max-width: 47.99rem)`,sm:`(max-width: 39.99rem)`,xs:`(max-width: 29.99rem)`,"2xs":`(max-width: 22.49rem)`};let f=null,p=null;function m(){return f||={"2xl":window.matchMedia(u[`2xl`]),xl:window.matchMedia(u.xl),lg:window.matchMedia(u.lg),md:window.matchMedia(u.md),sm:window.matchMedia(u.sm),xs:window.matchMedia(u.xs),"2xs":window.matchMedia(u[`2xs`])},f}function h(e){return p||={"2xl":window.matchMedia(d[`2xl`]),xl:window.matchMedia(d.xl),lg:window.matchMedia(d.lg),md:window.matchMedia(d.md),sm:window.matchMedia(d.sm),xs:window.matchMedia(d.xs),"2xs":window.matchMedia(d[`2xs`])},p[e]}let g=`default`;const _=new Set;let v=!1;function y(){let e=m();for(let t of i)if(e[t].matches)return t;return`default`}let b=!1;function x(){b||(b=!0,requestAnimationFrame(()=>{b=!1;let e=y();if(e!==g){g=e;for(let e of _)e()}}))}function S(e){if(_.add(e),!v){v=!0;let e=m();g=y();for(let t of Object.values(e))t.addEventListener(`change`,x)}return e(),()=>{if(_.delete(e),_.size===0&&v){v=!1;let e=m();for(let t of Object.values(e))t.removeEventListener(`change`,x)}}}function C(){return v||(g=y()),g}const w=new Map;function T(e){let t=w.get(e);return t||(t=t=>{let n=h(e),r=!1,i=()=>{r||(r=!0,requestAnimationFrame(()=>{r=!1,t()}))};return n.addEventListener(`change`,i),()=>{n.removeEventListener(`change`,i)}},w.set(e,t),t)}const E=new Map;function D(e){let t=E.get(e);return t||(t=()=>h(e).matches,E.set(e,t),t)}function O(){let r=e(2),[i,a]=n(!1),o,s;return r[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>{let e=requestAnimationFrame(()=>{a(!0)});return()=>{cancelAnimationFrame(e)}},s=[],r[0]=o,r[1]=s):(o=r[0],s=r[1]),t(o,s),i}export{c as i,a as n,o as r,O as t};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngrok/mantle",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.88.0",
|
|
4
4
|
"description": "mantle is ngrok's UI library and design system.",
|
|
5
5
|
"homepage": "https://mantle.ngrok.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"d3-scale": "4.0.2",
|
|
140
140
|
"d3-shape": "3.2.0",
|
|
141
141
|
"input-otp": "1.5.0",
|
|
142
|
-
"react-day-picker": "10.0.
|
|
142
|
+
"react-day-picker": "10.0.2",
|
|
143
143
|
"sonner": "2.0.8",
|
|
144
144
|
"tiny-invariant": "1.3.3",
|
|
145
145
|
"tw-animate-css": "1.4.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./slot-BsvE2ntj.js";import{t}from"./booleanish-BfvnW6vy.js";import{n,r}from"./layer-container-R7aux3n8.js";import{c as i}from"react/compiler-runtime";import{jsx as a}from"react/jsx-runtime";import{Close as o,Content as s,Description as c,Overlay as l,Portal as u,Root as d,Title as f,Trigger as p}from"@radix-ui/react-dialog";function m(e){e.target instanceof Element&&e.target.closest(`.overlay-prompt`)&&e.preventDefault()}const h=d,g=p,_=e=>{let t=i(9),o,s;t[0]===e?(o=t[1],s=t[2]):({container:o,...s}=e,t[0]=e,t[1]=o,t[2]=s);let c=r(),l=o??c,d;t[3]!==s||t[4]!==l?(d=a(u,{container:l,...s}),t[3]=s,t[4]=l,t[5]=d):d=t[5];let f;return t[6]!==l||t[7]!==d?(f=a(n.Provider,{value:l,children:d}),t[6]=l,t[7]=d,t[8]=f):f=t[8],f},v=o,y=e=>{let t=i(2),n;return t[0]===e?n=t[1]:(n=a(l,{"data-overlay":!0,...e}),t[0]=e,t[1]=n),n},b=e=>{let t=i(18),n,r,o,c,l;t[0]===e?(n=t[1],r=t[2],o=t[3],c=t[4],l=t[5]):({onEscapeKeyDown:n,onInteractOutside:r,onPointerDownOutside:o,ref:l,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=c,t[5]=l);let u;t[6]===n?u=t[7]:(u=e=>{w(e),n?.(e)},t[6]=n,t[7]=u);let d;t[8]===r?d=t[9]:(d=e=>{m(e),r?.(e)},t[8]=r,t[9]=d);let f;t[10]===o?f=t[11]:(f=e=>{m(e),o?.(e)},t[10]=o,t[11]=f);let p;return t[12]!==c||t[13]!==l||t[14]!==u||t[15]!==d||t[16]!==f?(p=a(s,{ref:l,onEscapeKeyDown:u,onInteractOutside:d,onPointerDownOutside:f,...c}),t[12]=c,t[13]=l,t[14]=u,t[15]=d,t[16]=f,t[17]=p):p=t[17],p},x=f,S=t=>{let n=i(12),r,o,s,l;n[0]===t?(r=n[1],o=n[2],s=n[3],l=n[4]):({asChild:r,children:o,ref:l,...s}=t,n[0]=t,n[1]=r,n[2]=o,n[3]=s,n[4]=l);let u=r?e:`div`,d;n[5]!==u||n[6]!==o||n[7]!==s?(d=a(u,{...s,children:o}),n[5]=u,n[6]=o,n[7]=s,n[8]=d):d=n[8];let f;return n[9]!==l||n[10]!==d?(f=a(c,{ref:l,asChild:!0,children:d}),n[9]=l,n[10]=d,n[11]=f):f=n[11],f};function C(e){return e instanceof HTMLElement&&e.hasAttribute(`data-overlay`)}function w(e){if(!O(e.currentTarget))return;let n=e.currentTarget,r=n instanceof Document?n.activeElement:n.ownerDocument?.activeElement??null,i=T(e.target)??T(r),a=i?E(i):null;i!=null&&t(i.getAttribute(`aria-expanded`))&&a!=null&&n.contains(i)&&n.contains(a)&&(a.getAttribute(`data-open`)===`true`||a.getAttribute(`data-state`)===`open`)&&e.preventDefault()}function T(e){return D(e)?e.closest(`[aria-expanded='true'][aria-controls]`):null}function E(e){let t=e.getAttribute(`aria-controls`);if(!t)return null;let n=e.ownerDocument.getElementById(t);return n instanceof HTMLElement?n:null}function D(e){return e instanceof HTMLElement}function O(e){return e instanceof Node&&`querySelector`in e}export{_ as a,g as c,y as i,C as l,b as n,h as o,S as r,x as s,v as t};
|
package/dist/sheet-CIgu6vwS.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./button-pwkdtR3U.js";import{t as n}from"./layer-container-R7aux3n8.js";import{a as r,c as i,i as a,n as o,o as s,r as c,s as l,t as u}from"./primitive-vXDjYdbu.js";import{c as d}from"react/compiler-runtime";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{XIcon as m}from"@phosphor-icons/react/X";import{cva as h}from"class-variance-authority";const g=s,_=i,v=u,y=r,b=t=>{let n=d(10),r,i,o;n[0]===t?(r=n[1],i=n[2],o=n[3]):({className:r,ref:o,...i}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=o);let s;n[4]===r?s=n[5]:(s=e(`bg-overlay data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:animate-in data-state-open:fade-in-0 fixed inset-0 z-60 backdrop-blur-xs`,r),n[4]=r,n[5]=s);let c;return n[6]!==i||n[7]!==o||n[8]!==s?(c=f(a,{"data-slot":`sheet-overlay`,className:s,...i,ref:o}),n[6]=i,n[7]=o,n[8]=s,n[9]=c):c=n[9],c},x=h(`bg-dialog border-dialog inset-y-0 h-full w-full fixed flex flex-col shadow-lg outline-hidden transition ease-in-out focus-within:outline-hidden data-state-closed:duration-100 data-state-closed:animate-out data-state-open:duration-100 data-state-open:animate-in`,{variants:{side:{left:`data-state-closed:slide-out-to-left data-state-open:slide-in-from-left left-0 border-r`,right:`data-state-closed:slide-out-to-right data-state-open:slide-in-from-right right-0 border-l`}},defaultVariants:{side:`right`}}),S={Root:g,Actions:t=>{let n=d(12),r,i,a,o;n[0]===t?(r=n[1],i=n[2],a=n[3],o=n[4]):({children:r,className:i,ref:o,...a}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=a,n[4]=o);let s;n[5]===i?s=n[6]:(s=e(`flex h-full items-center gap-2`,i),n[5]=i,n[6]=s);let c;return n[7]!==r||n[8]!==a||n[9]!==o||n[10]!==s?(c=f(`div`,{"data-slot":`sheet-actions`,className:s,...a,ref:o,children:r}),n[7]=r,n[8]=a,n[9]=o,n[10]=s,n[11]=c):c=n[11],c},Body:t=>{let n=d(8),r,i;n[0]===t?(r=n[1],i=n[2]):({className:r,...i}=t,n[0]=t,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=e(`scrollbar scrollbar-gutter-stable text-body flex-1 overflow-y-auto p-6`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==a?(o=f(`div`,{"data-slot":`sheet-body`,className:a,...i}),n[5]=i,n[6]=a,n[7]=o):o=n[7],o},Close:v,CloseIconButton:e=>{let n=d(15),r,i,a,o,s,c;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6]):({size:i,type:a,label:o,appearance:s,intent:c,...r}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=s,n[6]=c);let l=i===void 0?`md`:i,p=a===void 0?`button`:a,h=o===void 0?`Close Sheet`:o,g=s===void 0?`ghost`:s,_=c===void 0?`neutral`:c,v;n[7]===Symbol.for(`react.memo_cache_sentinel`)?(v=f(m,{}),n[7]=v):v=n[7];let y;return n[8]!==g||n[9]!==_||n[10]!==h||n[11]!==r||n[12]!==l||n[13]!==p?(y=f(u,{asChild:!0,children:f(t,{"data-slot":`sheet-close-icon-button`,appearance:g,icon:v,intent:_,label:h,size:l,type:p,...r})}),n[8]=g,n[9]=_,n[10]=h,n[11]=r,n[12]=l,n[13]=p,n[14]=y):y=n[14],y},Content:t=>{let r=d(17),i,a,s,c,l,u;r[0]===t?(i=r[1],a=r[2],s=r[3],c=r[4],l=r[5],u=r[6]):({children:i,className:a,preferredWidth:l,side:u,ref:c,...s}=t,r[0]=t,r[1]=i,r[2]=a,r[3]=s,r[4]=c,r[5]=l,r[6]=u);let m=l===void 0?`sm:max-w-[30rem]`:l,h=u===void 0?`right`:u,g;r[7]===Symbol.for(`react.memo_cache_sentinel`)?(g=f(b,{}),r[7]=g):g=r[7];let _;r[8]!==a||r[9]!==m||r[10]!==h?(_=e(x({side:h}),m,a),r[8]=a,r[9]=m,r[10]=h,r[11]=_):_=r[11];let v;return r[12]!==i||r[13]!==s||r[14]!==c||r[15]!==_?(v=p(y,{children:[g,f(n,{"data-slot":`sheet-positioner`,className:`fixed z-60`,children:f(o,{"data-slot":`sheet-content`,"data-mantle-modal-content":!0,className:_,ref:c,...s,children:i})})]}),r[12]=i,r[13]=s,r[14]=c,r[15]=_,r[16]=v):v=r[16],v},Description:t=>{let n=d(10),r,i,a;n[0]===t?(r=n[1],i=n[2],a=n[3]):({className:r,ref:a,...i}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=a);let o;n[4]===r?o=n[5]:(o=e(`text-body text-sm`,r),n[4]=r,n[5]=o);let s;return n[6]!==i||n[7]!==a||n[8]!==o?(s=f(c,{"data-slot":`sheet-description`,ref:a,className:o,...i}),n[6]=i,n[7]=a,n[8]=o,n[9]=s):s=n[9],s},Footer:t=>{let n=d(8),r,i;n[0]===t?(r=n[1],i=n[2]):({className:r,...i}=t,n[0]=t,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=e(`border-dialog-muted flex shrink-0 justify-end gap-2 border-t px-6 py-2.5`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==a?(o=f(`div`,{"data-slot":`sheet-footer`,className:a,...i}),n[5]=i,n[6]=a,n[7]=o):o=n[7],o},Header:t=>{let n=d(8),r,i;n[0]===t?(r=n[1],i=n[2]):({className:r,...i}=t,n[0]=t,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=e(`border-dialog-muted flex shrink-0 flex-col gap-2 border-b py-4 pl-6 pr-4`,`has-[.icon-button]:pr-4`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==a?(o=f(`div`,{"data-slot":`sheet-header`,className:a,...i}),n[5]=i,n[6]=a,n[7]=o):o=n[7],o},Title:t=>{let n=d(10),r,i,a;n[0]===t?(r=n[1],i=n[2],a=n[3]):({className:r,ref:a,...i}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=a);let o;n[4]===r?o=n[5]:(o=e(`text-strong flex-1 truncate text-lg font-medium`,r),n[4]=r,n[5]=o);let s;return n[6]!==i||n[7]!==a||n[8]!==o?(s=f(l,{"data-slot":`sheet-title`,ref:a,className:o,...i}),n[6]=i,n[7]=a,n[8]=o,n[9]=s):s=n[9],s},TitleGroup:t=>{let n=d(12),r,i,a,o;n[0]===t?(r=n[1],i=n[2],a=n[3],o=n[4]):({children:r,className:i,ref:o,...a}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=a,n[4]=o);let s;n[5]===i?s=n[6]:(s=e(`flex items-center justify-between gap-2`,i),n[5]=i,n[6]=s);let c;return n[7]!==r||n[8]!==a||n[9]!==o||n[10]!==s?(c=f(`div`,{"data-slot":`sheet-title-group`,className:s,...a,ref:o,children:r}),n[7]=r,n[8]=a,n[9]=o,n[10]=s,n[11]=c):c=n[11],c},Trigger:_};export{S as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e}from"react/compiler-runtime";import{useSyncExternalStore as t}from"react";const n=[`2xl`,`xl`,`lg`,`md`,`sm`,`xs`,`2xs`],r=[`default`,...n];function i(){return t(b,x,a)}function a(){return`default`}function o(n){let r=e(4),i;r[0]===n?i=r[1]:(i=C(n),r[0]=n,r[1]=i);let a;return r[2]===n?a=r[3]:(a=T(n),r[2]=n,r[3]=a),t(i,a,s)}function s(){return!1}const c={"2xl":`(min-width: 96rem)`,xl:`(min-width: 80rem)`,lg:`(min-width: 64rem)`,md:`(min-width: 48rem)`,sm:`(min-width: 40rem)`,xs:`(min-width: 30rem)`,"2xs":`(min-width: 22.5rem)`},l={"2xl":`(max-width: 95.99rem)`,xl:`(max-width: 79.99rem)`,lg:`(max-width: 63.99rem)`,md:`(max-width: 47.99rem)`,sm:`(max-width: 39.99rem)`,xs:`(max-width: 29.99rem)`,"2xs":`(max-width: 22.49rem)`};let u=null,d=null;function f(){return u||={"2xl":window.matchMedia(c[`2xl`]),xl:window.matchMedia(c.xl),lg:window.matchMedia(c.lg),md:window.matchMedia(c.md),sm:window.matchMedia(c.sm),xs:window.matchMedia(c.xs),"2xs":window.matchMedia(c[`2xs`])},u}function p(e){return d||={"2xl":window.matchMedia(l[`2xl`]),xl:window.matchMedia(l.xl),lg:window.matchMedia(l.lg),md:window.matchMedia(l.md),sm:window.matchMedia(l.sm),xs:window.matchMedia(l.xs),"2xs":window.matchMedia(l[`2xs`])},d[e]}let m=`default`;const h=new Set;let g=!1;function _(){let e=f();for(let t of n)if(e[t].matches)return t;return`default`}let v=!1;function y(){v||(v=!0,requestAnimationFrame(()=>{v=!1;let e=_();if(e!==m){m=e;for(let e of h)e()}}))}function b(e){if(h.add(e),!g){g=!0;let e=f();m=_();for(let t of Object.values(e))t.addEventListener(`change`,y)}return e(),()=>{if(h.delete(e),h.size===0&&g){g=!1;let e=f();for(let t of Object.values(e))t.removeEventListener(`change`,y)}}}function x(){return g||(m=_()),m}const S=new Map;function C(e){let t=S.get(e);return t||(t=t=>{let n=p(e),r=!1,i=()=>{r||(r=!0,requestAnimationFrame(()=>{r=!1,t()}))};return n.addEventListener(`change`,i),()=>{n.removeEventListener(`change`,i)}},S.set(e,t),t)}const w=new Map;function T(e){let t=w.get(e);return t||(t=()=>p(e).matches,w.set(e,t),t)}export{i as n,o as r,r as t};
|