@ngrok/mantle 0.89.0 → 0.90.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/agent.json +1529 -1
  2. package/dist/alert-DO00UiQe.js +1 -0
  3. package/dist/{alert-CZYYlx9q.js → alert-ZaUBtgno.js} +1 -1
  4. package/dist/alert-center.js +1 -1
  5. package/dist/alert-dialog.js +1 -1
  6. package/dist/alert.js +1 -1
  7. package/dist/app-layout.d.ts +68 -13
  8. package/dist/app-layout.js +1 -1
  9. package/dist/card.d.ts +7 -0
  10. package/dist/combobox.d.ts +1 -1
  11. package/dist/command.js +1 -1
  12. package/dist/{dialog-BDzapPLR.js → dialog-CaGJD02w.js} +1 -1
  13. package/dist/dialog.js +1 -1
  14. package/dist/{dropdown-menu-CpRsyt_F.d.ts → dropdown-menu-Cef0Cz2B.d.ts} +1 -1
  15. package/dist/dropdown-menu-DMA8dGxZ.d.ts +1 -0
  16. package/dist/dropdown-menu.d.ts +2 -2
  17. package/dist/empty.d.ts +7 -0
  18. package/dist/flag.d.ts +1 -1
  19. package/dist/flag.js +1 -1
  20. package/dist/hooks.d.ts +251 -1
  21. package/dist/hooks.js +1 -1
  22. package/dist/{icons-BMZnm4hM.js → icons-CAtjMNti.js} +1 -1
  23. package/dist/icons.js +1 -1
  24. package/dist/input.js +1 -1
  25. package/dist/llms.txt +117 -2
  26. package/dist/mantle.css +9 -0
  27. package/dist/migrations/0002-data-table-action-header.yml +526 -0
  28. package/dist/migrations/0003-dialog-footer-dom-order.yml +271 -0
  29. package/dist/migrations/0004-priority-to-intent.yml +1728 -0
  30. package/dist/migrations/0005-field-item-owns-control-id.yml +234 -0
  31. package/dist/migrations/0006-data-table-tanstack-v9.yml +423 -0
  32. package/dist/migrations/0008-tabs-separator.yml +1212 -0
  33. package/dist/migrations/0009-chart-root-mode.yml +871 -0
  34. package/dist/multi-select.d.ts +1 -1
  35. package/dist/multi-select.js +1 -1
  36. package/dist/pagination.d.ts +1 -1
  37. package/dist/{primitive-B-6XILB2.js → primitive-AGoxSJBI.js} +1 -1
  38. package/dist/sandbar.js +1 -1
  39. package/dist/{select-CxXb3aiC.d.ts → select-DlohFa54.d.ts} +1 -1
  40. package/dist/select.d.ts +1 -1
  41. package/dist/{separator-HzGvuD0B.d.ts → separator-BWGjCIl7.d.ts} +7 -0
  42. package/dist/separator.d.ts +1 -1
  43. package/dist/{sheet-DND_KjmS.js → sheet-H8zvhSuA.js} +1 -1
  44. package/dist/sheet.js +1 -1
  45. package/dist/sidebar.d.ts +17 -10
  46. package/dist/sidebar.js +1 -1
  47. package/dist/split-button.d.ts +1 -1
  48. package/dist/strata.d.ts +544 -0
  49. package/dist/strata.js +1 -0
  50. package/dist/tabs.d.ts +1 -1
  51. package/dist/tabs.js +1 -1
  52. package/dist/theme-6Q65C1Rx.js +1 -0
  53. package/dist/theme-switcher.d.ts +2 -2
  54. package/dist/theme-switcher.js +1 -1
  55. package/dist/theme.js +1 -1
  56. package/dist/toast.js +1 -1
  57. package/dist/use-prefers-reduced-motion-DimzRx-M.js +1 -0
  58. package/dist/use-swipe-to-dismiss-Cj-AayFd.js +1 -0
  59. package/dist/well.d.ts +7 -0
  60. package/package.json +4 -3
  61. package/dist/alert-vfeV_hso.js +0 -1
  62. package/dist/dropdown-menu-CWUzGFgf.d.ts +0 -1
  63. package/dist/theme-BlCZHClJ.js +0 -1
  64. package/dist/use-prefers-reduced-motion-Cj9tJ181.js +0 -1
@@ -0,0 +1,544 @@
1
+ import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
+ import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
3
+ import { ComponentProps } from "react";
4
+ //#region src/components/strata/strata.d.ts
5
+ /**
6
+ * The stack of sections. Renders a `<div>` with `divide-card-muted divide-y`, so
7
+ * a hairline falls between adjacent `Strata.Section` children and never above
8
+ * the first or below the last. Vertical rhythm belongs to `Section`
9
+ * (`py-8 first:pt-0`) rather than here, which keeps a lone `Section` usable
10
+ * without a `Root` around it. Set `--strata-columns` on `Root` to re-split
11
+ * every section at once — custom properties inherit, so one declaration reaches
12
+ * all of them.
13
+ *
14
+ * | Data Attribute | Value | Description |
15
+ * | -------------- | ----------- | ------------------------------------------------------------------ |
16
+ * | `data-slot` | `"strata"` | Stable styling hook. Survives `className` overrides and `asChild`. |
17
+ *
18
+ * @see https://mantle.ngrok.com/components/structure/strata#strataroot
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * <Strata.Root>
23
+ * <Strata.Section>
24
+ * <Strata.Header>
25
+ * <Strata.Title>Providers</Strata.Title>
26
+ * <Strata.Description>What providers keys may call.</Strata.Description>
27
+ * </Strata.Header>
28
+ * <Strata.Body>
29
+ * <ProviderScopePicker />
30
+ * </Strata.Body>
31
+ * </Strata.Section>
32
+ * <Strata.Section>
33
+ * <Strata.Header>
34
+ * <Strata.Title>Routing rules</Strata.Title>
35
+ * <Strata.Description>Define how requests are authenticated.</Strata.Description>
36
+ * </Strata.Header>
37
+ * <Strata.Body>
38
+ * <RoutingRuleList />
39
+ * </Strata.Body>
40
+ * </Strata.Section>
41
+ * </Strata.Root>
42
+ * ```
43
+ */
44
+ declare const Root: ({ asChild, children, className, "data-slot": dataSlot, ...props }: ComponentProps<"div"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
45
+ /**
46
+ * One titled band of the page. Renders a `<section>` that stacks
47
+ * `Strata.Header` above `Strata.Body` below the `md` breakpoint, then splits
48
+ * the two into a `1fr 2fr` grid at `md` and up. It carries its own vertical
49
+ * rhythm (`py-8 first:pt-0`), so it reads correctly as the only child of a
50
+ * `Root` and as one of many.
51
+ *
52
+ * The `<section>` takes no accessible name, which keeps it generic in the
53
+ * accessibility tree instead of adding one `region` landmark per band — the
54
+ * `Strata.Title` headings already carry the page outline, and a landmark list
55
+ * only stays useful while `main` and `nav` are easy to find in it. Set
56
+ * `aria-labelledby` to the `Title`'s `id` only when the section is a
57
+ * destination a reader jumps back to, not merely a division of the page. To
58
+ * tell apart controls that read alike across two sections, reach for
59
+ * `Field.Set` and `Field.Legend` instead — assistive technology announces a
60
+ * landmark on entry, never per control.
61
+ *
62
+ * | CSS Variable | Default | Description |
63
+ * | ------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------- |
64
+ * | `--strata-columns` | `1fr 2fr` | The `grid-template-columns` value at `md` and up. Set it on `Strata.Root` to re-split every section, or here for this section alone. |
65
+ *
66
+ * | Data Attribute | Value | Description |
67
+ * | -------------- | ------------------- | ------------------------------------------------------------------ |
68
+ * | `data-slot` | `"strata-section"` | Stable styling hook. Survives `className` overrides and `asChild`. |
69
+ *
70
+ * @see https://mantle.ngrok.com/components/structure/strata#stratasection
71
+ *
72
+ * @example
73
+ * ```tsx
74
+ * <Strata.Root>
75
+ * <Strata.Section>
76
+ * <Strata.Header>
77
+ * <Strata.Title>Providers</Strata.Title>
78
+ * <Strata.Description>What providers keys may call.</Strata.Description>
79
+ * </Strata.Header>
80
+ * <Strata.Body>
81
+ * <ProviderScopePicker />
82
+ * </Strata.Body>
83
+ * </Strata.Section>
84
+ * <Strata.Section>
85
+ * <Strata.Header>
86
+ * <Strata.Title>Routing rules</Strata.Title>
87
+ * <Strata.Description>Define how requests are authenticated.</Strata.Description>
88
+ * </Strata.Header>
89
+ * <Strata.Body>
90
+ * <RoutingRuleList />
91
+ * </Strata.Body>
92
+ * </Strata.Section>
93
+ * </Strata.Root>
94
+ * ```
95
+ */
96
+ declare const Section: ({ asChild, children, className, "data-slot": dataSlot, ...props }: ComponentProps<"section"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
97
+ /**
98
+ * A section's introductory column — its `Strata.Title` and
99
+ * `Strata.Description`. Renders a `<header>` with `flex flex-col gap-2`, so
100
+ * anything else composed in (a `Badge`, a count) picks up the same spacing. At
101
+ * `md` and up it takes the grid's first column; below the breakpoint it stacks
102
+ * above `Strata.Body`.
103
+ *
104
+ * Why `<header>`: it groups the introductory content of its nearest sectioning
105
+ * ancestor, which is `Strata.Section`'s `<section>`. Nested inside sectioning
106
+ * content, a `<header>` is not the `banner` landmark, so a page carries as many
107
+ * as it has sections.
108
+ *
109
+ * | Data Attribute | Value | Description |
110
+ * | -------------- | ------------------ | ------------------------------------------------------------------ |
111
+ * | `data-slot` | `"strata-header"` | Stable styling hook. Survives `className` overrides and `asChild`. |
112
+ *
113
+ * @see https://mantle.ngrok.com/components/structure/strata#strataheader
114
+ *
115
+ * @example
116
+ * ```tsx
117
+ * <Strata.Root>
118
+ * <Strata.Section>
119
+ * <Strata.Header>
120
+ * <Strata.Title>Providers</Strata.Title>
121
+ * <Strata.Description>What providers keys may call.</Strata.Description>
122
+ * </Strata.Header>
123
+ * <Strata.Body>
124
+ * <ProviderScopePicker />
125
+ * </Strata.Body>
126
+ * </Strata.Section>
127
+ * <Strata.Section>
128
+ * <Strata.Header>
129
+ * <Strata.Title>Routing rules</Strata.Title>
130
+ * <Strata.Description>Define how requests are authenticated.</Strata.Description>
131
+ * </Strata.Header>
132
+ * <Strata.Body>
133
+ * <RoutingRuleList />
134
+ * </Strata.Body>
135
+ * </Strata.Section>
136
+ * </Strata.Root>
137
+ * ```
138
+ */
139
+ declare const Header: ({ asChild, children, className, "data-slot": dataSlot, ...props }: ComponentProps<"header"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
140
+ /**
141
+ * The section's heading. Renders an `<h2>`, one level below the page's `<h1>`,
142
+ * because a `Strata.Section` is a top-level division of its page. Compose
143
+ * `asChild` with the right element when a page nests its sections deeper —
144
+ * heading level is document structure, so mantle does not guess it.
145
+ *
146
+ * | Data Attribute | Value | Description |
147
+ * | -------------- | ----------------- | ------------------------------------------------------------------ |
148
+ * | `data-slot` | `"strata-title"` | Stable styling hook. Survives `className` overrides and `asChild`. |
149
+ *
150
+ * @see https://mantle.ngrok.com/components/structure/strata#stratatitle
151
+ *
152
+ * @example
153
+ * ```tsx
154
+ * <Strata.Root>
155
+ * <Strata.Section>
156
+ * <Strata.Header>
157
+ * <Strata.Title>Providers</Strata.Title>
158
+ * <Strata.Description>What providers keys may call.</Strata.Description>
159
+ * </Strata.Header>
160
+ * <Strata.Body>
161
+ * <ProviderScopePicker />
162
+ * </Strata.Body>
163
+ * </Strata.Section>
164
+ * <Strata.Section>
165
+ * <Strata.Header>
166
+ * <Strata.Title>Routing rules</Strata.Title>
167
+ * <Strata.Description>Define how requests are authenticated.</Strata.Description>
168
+ * </Strata.Header>
169
+ * <Strata.Body>
170
+ * <RoutingRuleList />
171
+ * </Strata.Body>
172
+ * </Strata.Section>
173
+ * </Strata.Root>
174
+ * ```
175
+ */
176
+ declare const Title: ({ asChild, children, className, "data-slot": dataSlot, ...props }: ComponentProps<"h2"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
177
+ /**
178
+ * The sentence that says what the section's controls do, and what changing them
179
+ * costs. Renders a `<p>` in muted body text beneath `Strata.Title`. Optional —
180
+ * a section whose title says everything may omit it.
181
+ *
182
+ * | Data Attribute | Value | Description |
183
+ * | -------------- | ----------------------- | ------------------------------------------------------------------ |
184
+ * | `data-slot` | `"strata-description"` | Stable styling hook. Survives `className` overrides and `asChild`. |
185
+ *
186
+ * @see https://mantle.ngrok.com/components/structure/strata#stratadescription
187
+ *
188
+ * @example
189
+ * ```tsx
190
+ * <Strata.Root>
191
+ * <Strata.Section>
192
+ * <Strata.Header>
193
+ * <Strata.Title>Providers</Strata.Title>
194
+ * <Strata.Description>What providers keys may call.</Strata.Description>
195
+ * </Strata.Header>
196
+ * <Strata.Body>
197
+ * <ProviderScopePicker />
198
+ * </Strata.Body>
199
+ * </Strata.Section>
200
+ * <Strata.Section>
201
+ * <Strata.Header>
202
+ * <Strata.Title>Routing rules</Strata.Title>
203
+ * <Strata.Description>Define how requests are authenticated.</Strata.Description>
204
+ * </Strata.Header>
205
+ * <Strata.Body>
206
+ * <RoutingRuleList />
207
+ * </Strata.Body>
208
+ * </Strata.Section>
209
+ * </Strata.Root>
210
+ * ```
211
+ */
212
+ declare const Description: ({ asChild, children, className, "data-slot": dataSlot, ...props }: ComponentProps<"p"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
213
+ /**
214
+ * The section's content column — the controls, cards, or table that
215
+ * `Strata.Header` describes. Renders a `<div>` with `flex flex-col gap-4`, so
216
+ * stacked controls space themselves and a consumer's own `gap-*` replaces the
217
+ * default cleanly. At `md` and up it takes the grid's second column; below the
218
+ * breakpoint it stacks under the header.
219
+ *
220
+ * | Data Attribute | Value | Description |
221
+ * | -------------- | ---------------- | ------------------------------------------------------------------ |
222
+ * | `data-slot` | `"strata-body"` | Stable styling hook. Survives `className` overrides and `asChild`. |
223
+ *
224
+ * @see https://mantle.ngrok.com/components/structure/strata#stratabody
225
+ *
226
+ * @example
227
+ * ```tsx
228
+ * <Strata.Root>
229
+ * <Strata.Section>
230
+ * <Strata.Header>
231
+ * <Strata.Title>Providers</Strata.Title>
232
+ * <Strata.Description>What providers keys may call.</Strata.Description>
233
+ * </Strata.Header>
234
+ * <Strata.Body>
235
+ * <ProviderScopePicker />
236
+ * </Strata.Body>
237
+ * </Strata.Section>
238
+ * <Strata.Section>
239
+ * <Strata.Header>
240
+ * <Strata.Title>Routing rules</Strata.Title>
241
+ * <Strata.Description>Define how requests are authenticated.</Strata.Description>
242
+ * </Strata.Header>
243
+ * <Strata.Body>
244
+ * <RoutingRuleList />
245
+ * </Strata.Body>
246
+ * </Strata.Section>
247
+ * </Strata.Root>
248
+ * ```
249
+ */
250
+ declare const Body: ({ asChild, children, className, "data-slot": dataSlot, ...props }: ComponentProps<"div"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
251
+ /**
252
+ * A page of titled sections, each one explained beside its content. Every
253
+ * section pairs a `Strata.Header` — its `Title` and `Description` — with a
254
+ * `Strata.Body` of controls. `Strata.Root` stacks the sections with a
255
+ * hairline between them. Below the `md` breakpoint the header stacks above its
256
+ * own content, so the pairing survives a narrow viewport. It is the shape of a
257
+ * settings page, a resource configuration editor, and any form long enough that
258
+ * each group needs its own explanation.
259
+ *
260
+ * It owns structure only — the grid, the rhythm, and the rules between sections.
261
+ * Reach for [Card](https://mantle.ngrok.com/components/structure/card) when a
262
+ * group needs a raised surface of its own, for
263
+ * [MediaObject](https://mantle.ngrok.com/components/structure/media-object)
264
+ * when the thing beside the text is an image or an icon, and for
265
+ * [DescriptionList](https://mantle.ngrok.com/components/data-display/description-list)
266
+ * when the pairs are read-only term/value data rather than headed sections.
267
+ *
268
+ * @see https://mantle.ngrok.com/components/structure/strata
269
+ *
270
+ * @example
271
+ * Composition:
272
+ * ```
273
+ * Strata.Root
274
+ * └── Strata.Section
275
+ * ├── Strata.Header
276
+ * │ ├── Strata.Title
277
+ * │ └── Strata.Description
278
+ * └── Strata.Body
279
+ * ```
280
+ *
281
+ * @example
282
+ * ```tsx
283
+ * <Strata.Root>
284
+ * <Strata.Section>
285
+ * <Strata.Header>
286
+ * <Strata.Title>Providers</Strata.Title>
287
+ * <Strata.Description>What providers keys may call.</Strata.Description>
288
+ * </Strata.Header>
289
+ * <Strata.Body>
290
+ * <ProviderScopePicker />
291
+ * </Strata.Body>
292
+ * </Strata.Section>
293
+ * <Strata.Section>
294
+ * <Strata.Header>
295
+ * <Strata.Title>Routing rules</Strata.Title>
296
+ * <Strata.Description>Define how requests are authenticated.</Strata.Description>
297
+ * </Strata.Header>
298
+ * <Strata.Body>
299
+ * <RoutingRuleList />
300
+ * </Strata.Body>
301
+ * </Strata.Section>
302
+ * </Strata.Root>
303
+ * ```
304
+ */
305
+ declare const Strata: {
306
+ /**
307
+ * The stack of sections. Renders a `<div>` with `divide-card-muted divide-y`,
308
+ * so a hairline falls between adjacent `Section` children and never above the
309
+ * first or below the last. Vertical rhythm belongs to `Section`
310
+ * (`py-8 first:pt-0`) rather than here, which keeps a lone `Section` usable
311
+ * without a `Root` around it. Set `--strata-columns` on `Root` to re-split
312
+ * every section at once.
313
+ *
314
+ * | Data Attribute | Value | Description |
315
+ * | -------------- | ----------- | ------------------------------------------------------------------ |
316
+ * | `data-slot` | `"strata"` | Stable styling hook. Survives `className` overrides and `asChild`. |
317
+ *
318
+ * @see https://mantle.ngrok.com/components/structure/strata#strataroot
319
+ *
320
+ * @example
321
+ * ```tsx
322
+ * <Strata.Root>
323
+ * <Strata.Section>
324
+ * <Strata.Header>
325
+ * <Strata.Title>Providers</Strata.Title>
326
+ * <Strata.Description>What providers keys may call.</Strata.Description>
327
+ * </Strata.Header>
328
+ * <Strata.Body>
329
+ * <ProviderScopePicker />
330
+ * </Strata.Body>
331
+ * </Strata.Section>
332
+ * <Strata.Section>
333
+ * <Strata.Header>
334
+ * <Strata.Title>Routing rules</Strata.Title>
335
+ * <Strata.Description>Define how requests are authenticated.</Strata.Description>
336
+ * </Strata.Header>
337
+ * <Strata.Body>
338
+ * <RoutingRuleList />
339
+ * </Strata.Body>
340
+ * </Strata.Section>
341
+ * </Strata.Root>
342
+ * ```
343
+ */
344
+ readonly Root: typeof Root;
345
+ /**
346
+ * One titled band of the page. Renders a `<section>` that stacks `Header`
347
+ * above `Body` below the `md` breakpoint, then splits the two into a
348
+ * `1fr 2fr` grid at `md` and up, and carries its own vertical rhythm
349
+ * (`py-8 first:pt-0`). It takes no accessible name, which keeps it generic in
350
+ * the accessibility tree instead of adding one `region` landmark per band —
351
+ * the `Title` headings already carry the page outline. Set `aria-labelledby`
352
+ * to the `Title`'s `id` only when the section is a destination a reader jumps
353
+ * back to, not merely a division of the page. To tell apart controls that read
354
+ * alike across two sections, reach for `Field.Set` and `Field.Legend` instead
355
+ * — assistive technology announces a landmark on entry, never per control.
356
+ *
357
+ * | CSS Variable | Default | Description |
358
+ * | ------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------- |
359
+ * | `--strata-columns` | `1fr 2fr` | The `grid-template-columns` value at `md` and up. Set it on `Root` to re-split every section, or here for this section alone. |
360
+ *
361
+ * | Data Attribute | Value | Description |
362
+ * | -------------- | ------------------- | ------------------------------------------------------------------ |
363
+ * | `data-slot` | `"strata-section"` | Stable styling hook. Survives `className` overrides and `asChild`. |
364
+ *
365
+ * @see https://mantle.ngrok.com/components/structure/strata#stratasection
366
+ *
367
+ * @example
368
+ * ```tsx
369
+ * <Strata.Root>
370
+ * <Strata.Section>
371
+ * <Strata.Header>
372
+ * <Strata.Title>Providers</Strata.Title>
373
+ * <Strata.Description>What providers keys may call.</Strata.Description>
374
+ * </Strata.Header>
375
+ * <Strata.Body>
376
+ * <ProviderScopePicker />
377
+ * </Strata.Body>
378
+ * </Strata.Section>
379
+ * <Strata.Section>
380
+ * <Strata.Header>
381
+ * <Strata.Title>Routing rules</Strata.Title>
382
+ * <Strata.Description>Define how requests are authenticated.</Strata.Description>
383
+ * </Strata.Header>
384
+ * <Strata.Body>
385
+ * <RoutingRuleList />
386
+ * </Strata.Body>
387
+ * </Strata.Section>
388
+ * </Strata.Root>
389
+ * ```
390
+ */
391
+ readonly Section: typeof Section;
392
+ /**
393
+ * A section's introductory column — its `Title` and `Description`. Renders a
394
+ * `<header>` with `flex flex-col gap-2`, so anything else composed in picks
395
+ * up the same spacing. At `md` and up it takes the grid's first column; below
396
+ * the breakpoint it stacks above `Body`. Nested inside `Section`'s
397
+ * `<section>`, a `<header>` is not the `banner` landmark, so a page carries
398
+ * as many as it has sections.
399
+ *
400
+ * | Data Attribute | Value | Description |
401
+ * | -------------- | ------------------ | ------------------------------------------------------------------ |
402
+ * | `data-slot` | `"strata-header"` | Stable styling hook. Survives `className` overrides and `asChild`. |
403
+ *
404
+ * @see https://mantle.ngrok.com/components/structure/strata#strataheader
405
+ *
406
+ * @example
407
+ * ```tsx
408
+ * <Strata.Root>
409
+ * <Strata.Section>
410
+ * <Strata.Header>
411
+ * <Strata.Title>Providers</Strata.Title>
412
+ * <Strata.Description>What providers keys may call.</Strata.Description>
413
+ * </Strata.Header>
414
+ * <Strata.Body>
415
+ * <ProviderScopePicker />
416
+ * </Strata.Body>
417
+ * </Strata.Section>
418
+ * <Strata.Section>
419
+ * <Strata.Header>
420
+ * <Strata.Title>Routing rules</Strata.Title>
421
+ * <Strata.Description>Define how requests are authenticated.</Strata.Description>
422
+ * </Strata.Header>
423
+ * <Strata.Body>
424
+ * <RoutingRuleList />
425
+ * </Strata.Body>
426
+ * </Strata.Section>
427
+ * </Strata.Root>
428
+ * ```
429
+ */
430
+ readonly Header: typeof Header;
431
+ /**
432
+ * The section's heading. Renders an `<h2>`, one level below the page's
433
+ * `<h1>`, because a `Section` is a top-level division of its page. Compose
434
+ * `asChild` with the right element when a page nests its sections deeper —
435
+ * heading level is document structure, so mantle does not guess it.
436
+ *
437
+ * | Data Attribute | Value | Description |
438
+ * | -------------- | ----------------- | ------------------------------------------------------------------ |
439
+ * | `data-slot` | `"strata-title"` | Stable styling hook. Survives `className` overrides and `asChild`. |
440
+ *
441
+ * @see https://mantle.ngrok.com/components/structure/strata#stratatitle
442
+ *
443
+ * @example
444
+ * ```tsx
445
+ * <Strata.Root>
446
+ * <Strata.Section>
447
+ * <Strata.Header>
448
+ * <Strata.Title>Providers</Strata.Title>
449
+ * <Strata.Description>What providers keys may call.</Strata.Description>
450
+ * </Strata.Header>
451
+ * <Strata.Body>
452
+ * <ProviderScopePicker />
453
+ * </Strata.Body>
454
+ * </Strata.Section>
455
+ * <Strata.Section>
456
+ * <Strata.Header>
457
+ * <Strata.Title>Routing rules</Strata.Title>
458
+ * <Strata.Description>Define how requests are authenticated.</Strata.Description>
459
+ * </Strata.Header>
460
+ * <Strata.Body>
461
+ * <RoutingRuleList />
462
+ * </Strata.Body>
463
+ * </Strata.Section>
464
+ * </Strata.Root>
465
+ * ```
466
+ */
467
+ readonly Title: typeof Title;
468
+ /**
469
+ * The sentence that says what the section's controls do, and what changing
470
+ * them costs. Renders a `<p>` in muted body text beneath `Title`. Optional —
471
+ * a section whose title says everything may omit it.
472
+ *
473
+ * | Data Attribute | Value | Description |
474
+ * | -------------- | ----------------------- | ------------------------------------------------------------------ |
475
+ * | `data-slot` | `"strata-description"` | Stable styling hook. Survives `className` overrides and `asChild`. |
476
+ *
477
+ * @see https://mantle.ngrok.com/components/structure/strata#stratadescription
478
+ *
479
+ * @example
480
+ * ```tsx
481
+ * <Strata.Root>
482
+ * <Strata.Section>
483
+ * <Strata.Header>
484
+ * <Strata.Title>Providers</Strata.Title>
485
+ * <Strata.Description>What providers keys may call.</Strata.Description>
486
+ * </Strata.Header>
487
+ * <Strata.Body>
488
+ * <ProviderScopePicker />
489
+ * </Strata.Body>
490
+ * </Strata.Section>
491
+ * <Strata.Section>
492
+ * <Strata.Header>
493
+ * <Strata.Title>Routing rules</Strata.Title>
494
+ * <Strata.Description>Define how requests are authenticated.</Strata.Description>
495
+ * </Strata.Header>
496
+ * <Strata.Body>
497
+ * <RoutingRuleList />
498
+ * </Strata.Body>
499
+ * </Strata.Section>
500
+ * </Strata.Root>
501
+ * ```
502
+ */
503
+ readonly Description: typeof Description;
504
+ /**
505
+ * The section's content column — the controls, cards, or table that `Header`
506
+ * describes. Renders a `<div>` with `flex flex-col gap-4`, so stacked
507
+ * controls space themselves and a consumer's own `gap-*` replaces the default
508
+ * cleanly. At `md` and up it takes the grid's second column; below the
509
+ * breakpoint it stacks under the header.
510
+ *
511
+ * | Data Attribute | Value | Description |
512
+ * | -------------- | ---------------- | ------------------------------------------------------------------ |
513
+ * | `data-slot` | `"strata-body"` | Stable styling hook. Survives `className` overrides and `asChild`. |
514
+ *
515
+ * @see https://mantle.ngrok.com/components/structure/strata#stratabody
516
+ *
517
+ * @example
518
+ * ```tsx
519
+ * <Strata.Root>
520
+ * <Strata.Section>
521
+ * <Strata.Header>
522
+ * <Strata.Title>Providers</Strata.Title>
523
+ * <Strata.Description>What providers keys may call.</Strata.Description>
524
+ * </Strata.Header>
525
+ * <Strata.Body>
526
+ * <ProviderScopePicker />
527
+ * </Strata.Body>
528
+ * </Strata.Section>
529
+ * <Strata.Section>
530
+ * <Strata.Header>
531
+ * <Strata.Title>Routing rules</Strata.Title>
532
+ * <Strata.Description>Define how requests are authenticated.</Strata.Description>
533
+ * </Strata.Header>
534
+ * <Strata.Body>
535
+ * <RoutingRuleList />
536
+ * </Strata.Body>
537
+ * </Strata.Section>
538
+ * </Strata.Root>
539
+ * ```
540
+ */
541
+ readonly Body: typeof Body;
542
+ };
543
+ //#endregion
544
+ export { Strata };
package/dist/strata.js ADDED
@@ -0,0 +1 @@
1
+ import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-DdYN1L1C.js";import{c as r}from"react/compiler-runtime";import{jsx as i}from"react/jsx-runtime";const a={Root:a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`div`,p;o[6]===u?p=o[7]:(p=t(u,`strata`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`divide-card-muted divide-y`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h},Section:a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`section`,p;o[6]===u?p=o[7]:(p=t(u,`strata-section`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`grid gap-6 py-8 first:pt-0`,`md:grid-cols-(--strata-columns,1fr_2fr) md:gap-12`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h},Header:a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`header`,p;o[6]===u?p=o[7]:(p=t(u,`strata-header`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`flex flex-col gap-2`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h},Title:a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`h2`,p;o[6]===u?p=o[7]:(p=t(u,`strata-title`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`text-strong text-base font-medium`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h},Description:a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`p`,p;o[6]===u?p=o[7]:(p=t(u,`strata-description`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`text-body text-sm`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h},Body:a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`div`,p;o[6]===u?p=o[7]:(p=t(u,`strata-body`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`flex flex-col gap-4`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h}};export{a as Strata};
package/dist/tabs.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { t as SelfClosingWithAsChild } from "./as-child-D23mGo4f.js";
2
2
  import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
3
- import { n as Separator } from "./separator-HzGvuD0B.js";
3
+ import { n as Separator } from "./separator-BWGjCIl7.js";
4
4
  import { ComponentProps } from "react";
5
5
  import { Content, List, Root, Trigger } from "@radix-ui/react-tabs";
6
6
  //#region src/components/tabs/tabs.d.ts
package/dist/tabs.js CHANGED
@@ -1 +1 @@
1
- import{n as e}from"./compose-refs-sFdxsL7k.js";import{t}from"./cx-CK7o_rVv.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{t as r}from"./booleanish-BfvnW6vy.js";import{t as i}from"./clsx-DUGZgXfJ.js";import{n as a}from"./separator-DvPe27fH.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=/* @__PURE__ */ _(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=/* @__PURE__ */ _(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=/* @__PURE__ */ _(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=/* @__PURE__ */ _(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=/* @__PURE__ */ _(`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=/* @__PURE__ */ _(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?/* @__PURE__ */ _(`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=/* @__PURE__ */ _(j,{}),i[34]=o):o=i[34];let s;i[35]===t?s=i[36]:(s=/* @__PURE__ */ v(g,{children:[o,/* @__PURE__ */ _(`span`,{"data-slot":`tabs-trigger-label`,className:`contents`,children:t})]}),i[35]=t,i[36]=s),n=/* @__PURE__ */ _(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=/* @__PURE__ */ _(j,{}),i[37]=I):I=i[37];let L;i[38]===u?L=i[39]:(L=/* @__PURE__ */ _(`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=/* @__PURE__ */ 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=/* @__PURE__ */ _(`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};
1
+ import{n as e}from"./compose-refs-sFdxsL7k.js";import{t}from"./cx-CK7o_rVv.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{t as r}from"./booleanish-BfvnW6vy.js";import{t as i}from"./clsx-DUGZgXfJ.js";import{n as a}from"./separator-DvPe27fH.js";import{t as o}from"./use-prefers-reduced-motion-DimzRx-M.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=/* @__PURE__ */ _(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=/* @__PURE__ */ _(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=/* @__PURE__ */ _(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=/* @__PURE__ */ _(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=/* @__PURE__ */ _(`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=/* @__PURE__ */ _(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?/* @__PURE__ */ _(`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=/* @__PURE__ */ _(j,{}),i[34]=o):o=i[34];let s;i[35]===t?s=i[36]:(s=/* @__PURE__ */ v(g,{children:[o,/* @__PURE__ */ _(`span`,{"data-slot":`tabs-trigger-label`,className:`contents`,children:t})]}),i[35]=t,i[36]=s),n=/* @__PURE__ */ _(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=/* @__PURE__ */ _(j,{}),i[37]=I):I=i[37];let L;i[38]===u?L=i[39]:(L=/* @__PURE__ */ _(`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=/* @__PURE__ */ 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=/* @__PURE__ */ _(`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{t as e}from"./cx-CK7o_rVv.js";import{t}from"./use-matches-media-query-m860lols.js";import{n,t as r}from"./cookie-ca4g5CKp.js";import{n as i}from"./browser-only-Crr3sgA0.js";import{c as a}from"react/compiler-runtime";import{createContext as o,useContext as s,useEffect as c,useRef as l,useState as u}from"react";import d from"tiny-invariant";import{jsx as f}from"react/jsx-runtime";const p=[`light`,`dark`,`light-high-contrast`,`dark-high-contrast`],m=[`system`,...p],h=e=>e;function g(e){return typeof e==`string`&&m.includes(e)}const _=e=>e;function v(e){return typeof e==`string`&&p.includes(e)}const y=`(prefers-color-scheme: dark)`,b=`(prefers-contrast: more)`,x=`mantle-ui-theme`,S=`system`,C=o(null);function w(e){let t=a(14),{children:n,forceTheme:r,ssrCookie:o}=e,s;t[0]!==r||t[1]!==o?(s=()=>{let e=F({cookie:i()?document.cookie:o});return E(e,{forceTheme:r}),e},t[0]=r,t[1]=o,t[2]=s):s=t[2];let[d,p]=u(s),m=l(null),h,_;t[3]===r?(h=t[4],_=t[5]):(h=()=>{let e=function(e){let t=e??F({cookie:document.cookie});p(t),E(t,{forceTheme:r})};e();try{`BroadcastChannel`in window&&(m.current=new BroadcastChannel(x),m.current.addEventListener(`message`,t=>{let n=t?.data?.theme;g(n)&&e(n)}))}catch{}let t=function(t){t.key===`${x}__ping`&&e()};window.addEventListener(`storage`,t);let n=window.matchMedia(y),i=window.matchMedia(b),a=function(){e()},o=function(){document.visibilityState===`visible`&&e()};return n.addEventListener(`change`,a),i.addEventListener(`change`,a),window.addEventListener(`pageshow`,a),document.addEventListener(`visibilitychange`,o),()=>{window.removeEventListener(`storage`,t),n.removeEventListener(`change`,a),i.removeEventListener(`change`,a),window.removeEventListener(`pageshow`,a),document.removeEventListener(`visibilitychange`,o),B(m.current),m.current=null}},_=[r],t[3]=r,t[4]=h,t[5]=_),c(h,_);let v;t[6]===r?v=t[7]:(v=e=>{z(e),p(e),E(e,{forceTheme:r}),L(e,{broadcastChannel:m.current,pingKey:`${x}__ping`})},t[6]=r,t[7]=v);let S;t[8]!==v||t[9]!==d?(S=[d,v],t[8]=v,t[9]=d,t[10]=S):S=t[10];let w=S,T;return t[11]!==n||t[12]!==w?(T=/* @__PURE__ */ f(C.Provider,{value:w,children:n}),t[11]=n,t[12]=w,t[13]=T):T=t[13],T}function T(){let e=s(C);return d(e,`useTheme must be used within a ThemeProvider`),e}function E(e,{forceTheme:t}={}){if(!i())return;let n=window.document.documentElement,r=window.matchMedia(y).matches,a=window.matchMedia(b).matches,o=t??O(e,{prefersDarkMode:r,prefersHighContrast:a}),s=n.dataset.theme,c=n.dataset.appliedTheme,l=g(s)?s:void 0,u=v(c)?c:void 0;(l!==e||u!==o)&&(n.classList.remove(...p),n.classList.add(o),n.dataset.theme=e,n.dataset.appliedTheme=o)}function D(){if(!i())return{appliedTheme:void 0,theme:void 0};let e=window.document.documentElement,t=g(e.dataset.theme)?e.dataset.theme:void 0;return{appliedTheme:v(e.dataset.appliedTheme)?e.dataset.appliedTheme:void 0,theme:t}}function O(e,{prefersDarkMode:t,prefersHighContrast:n}){return e===`system`?A({prefersDarkMode:t,prefersHighContrast:n}):e}function k(){let e=a(4),n=s(C),r=n==null?`system`:n[0],i=t(y),o=t(b),c;return e[0]!==i||e[1]!==o||e[2]!==r?(c=O(r,{prefersDarkMode:i,prefersHighContrast:o}),e[0]=i,e[1]=o,e[2]=r,e[3]=c):c=e[3],c}function A({prefersDarkMode:e,prefersHighContrast:t}){return t?e?`dark-high-contrast`:`light-high-contrast`:e?`dark`:`light`}function j(e){let{storageKey:t,defaultTheme:n,themes:r,resolvedThemes:i,prefersDarkModeMediaQuery:a,prefersHighContrastMediaQuery:o,forceTheme:s}=e;function c(e){return typeof e==`string`&&r.includes(e)}function l(e){let t=document.cookie;if(!t)return null;try{let n=t.split(`;`).find(t=>t.trim().startsWith(`${e}=`))?.trim().slice(e.length+1);return n?decodeURIComponent(n):null}catch{return null}}function u(e,t){let n=/* @__PURE__ */ new Date;n.setFullYear(n.getFullYear()+1);let r=window.location.hostname,i=window.location.protocol,a=r===`ngrok.com`||r.endsWith(`.ngrok.com`)?`; domain=.ngrok.com`:``,o=i===`https:`?`; Secure`:``;return`${e}=${encodeURIComponent(t)}; expires=${n.toUTCString()}; path=/${a}; SameSite=Lax${o}`}function d(e,t){try{document.cookie=u(e,t)}catch{}}function f(e,t,n){return e===`system`?n?t?`dark-high-contrast`:`light-high-contrast`:t?`dark`:`light`:e}let p=null,m=null,h=null;try{p=l(t)}catch{}if(c(p))h=p;else{try{m=window.localStorage?.getItem(t)??null}catch{}c(m)&&(h=m)}let g=c(h)?h:n,_=matchMedia(a).matches,v=matchMedia(o).matches,y=s??f(g,_,v),b=document.documentElement;if(b.dataset.appliedTheme!==y||b.dataset.theme!==g){for(let e of i)b.classList.remove(e);b.classList.add(y),b.dataset.theme=g,b.dataset.appliedTheme=y}let x=c(p);try{if(c(m)&&!x){d(t,m);try{window.localStorage.removeItem(t)}catch{}}else x||d(t,g)}catch{}}function M(e){let t={storageKey:x,defaultTheme:S,themes:m,resolvedThemes:p,prefersDarkModeMediaQuery:y,prefersHighContrastMediaQuery:b,forceTheme:e};return`(${j.toString()})(${JSON.stringify(t)})`}const N=e=>{let t=a(7),{forceTheme:n,nonce:r}=e,i;t[0]===n?i=t[1]:(i=M(n),t[0]=n,t[1]=i);let o;t[2]===i?o=t[3]:(o={__html:i},t[2]=i,t[3]=o);let s;return t[4]!==r||t[5]!==o?(s=/* @__PURE__ */ f(`script`,{dangerouslySetInnerHTML:o,nonce:r,suppressHydrationWarning:!0}),t[4]=r,t[5]=o,t[6]=s):s=t[6],s};function P(t){let n=a(16),r;n[0]===t?r=n[1]:(r=t===void 0?{}:t,n[0]=t,n[1]=r);let o=r,s;n[2]===o?s=n[3]:(s=o??{},n[2]=o,n[3]=s);let{className:c,forceTheme:l,ssrCookie:u}=s,d=c===void 0?``:c,f,p;if(i()){let e;if(n[7]===Symbol.for(`react.memo_cache_sentinel`)){let t=window.matchMedia(y).matches,r=window.matchMedia(b).matches;f=F({cookie:document.cookie}),e=O(f,{prefersDarkMode:t,prefersHighContrast:r}),n[7]=e,n[8]=f}else e=n[7],f=n[8];p=e}else{let e;n[4]===u?(e=n[5],f=n[6]):(f=F({cookie:u}),e=O(f,{prefersDarkMode:!1,prefersHighContrast:!1}),n[4]=u,n[5]=e,n[6]=f),p=e}let m=l??p,h;n[9]!==m||n[10]!==d?(h=e(d,m),n[9]=m,n[10]=d,n[11]=h):h=n[11];let g;return n[12]!==m||n[13]!==f||n[14]!==h?(g={className:h,"data-applied-theme":m,"data-theme":f},n[12]=m,n[13]=f,n[14]=h,n[15]=g):g=n[15],g}function F({cookie:e}){if(!e)return S;let t=n(e,x);return g(t)?t:S}function I(e){return r(e,x)}function L(e,t){let{broadcastChannel:n,pingKey:r}=t;try{if(n){n.postMessage({theme:e,timestamp:Date.now()});return}}catch{}try{localStorage.setItem(r,JSON.stringify({theme:e,timestamp:Date.now()}))}catch{}}function R(e){let t=/* @__PURE__ */ new Date;t.setFullYear(t.getFullYear()+1);let{hostname:n,protocol:r}=window.location,i=n===`ngrok.com`||n.endsWith(`.ngrok.com`)?`; domain=.ngrok.com`:``,a=r===`https:`?`; Secure`:``;return`${x}=${encodeURIComponent(e)}; expires=${t.toUTCString()}; path=/${i}; SameSite=Lax${a}`}function z(e){if(i())try{document.cookie=R(e)}catch{}}function B(e){if(e!=null)try{e.close()}catch{}}export{M as a,P as c,h as d,v as f,m as h,F as i,T as l,p as m,w as n,D as o,g as p,I as r,k as s,N as t,_ as u};
@@ -1,8 +1,8 @@
1
1
  import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
2
2
  import { t as WithStyleProps } from "./with-style-props-Dq5Vntqy.js";
3
3
  import { n as IconButtonProps, r as IconButtonAppearance } from "./button-DL7V4bzW.js";
4
- import { t as DropdownMenu } from "./dropdown-menu-CpRsyt_F.js";
5
- import "./dropdown-menu-CWUzGFgf.js";
4
+ import { t as DropdownMenu } from "./dropdown-menu-Cef0Cz2B.js";
5
+ import "./dropdown-menu-DMA8dGxZ.js";
6
6
  import { ComponentProps } from "react";
7
7
  //#region src/components/theme-switcher/theme-switcher.d.ts
8
8
  /**
@@ -1 +1 @@
1
- import{t as e}from"./data-slot-EM6s2WEU.js";import{t}from"./icon-kK0c-POG.js";import{t as n}from"./button-BMfUxs_j.js";import{t as r}from"./browser-only-Crr3sgA0.js";import{t as i}from"./skeleton-zfqoDAxT.js";import{t as a}from"./dropdown-menu-CutWQ0bl.js";import{d as o,h as s,l as c,p as l}from"./theme-BlCZHClJ.js";import{n as u,t as d}from"./icons-BMZnm4hM.js";import{c as f}from"react/compiler-runtime";import{jsx as p,jsxs as m}from"react/jsx-runtime";const h={system:`System Preference`,light:`Light Mode`,dark:`Dark Mode`,"light-high-contrast":`Light High Contrast`,"dark-high-contrast":`Dark High Contrast`},g=e=>{let t=f(10),{"aria-label":n,"aria-labelledby":r,className:i,style:o}=e,[u,d]=c(),m=r==null?n??`Theme`:n,h;t[0]===d?h=t[1]:(h=e=>{l(e)&&d(e)},t[0]=d,t[1]=h);let g;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=s.map(v),t[2]=g):g=t[2];let _;return t[3]!==r||t[4]!==i||t[5]!==u||t[6]!==o||t[7]!==m||t[8]!==h?(_=/* @__PURE__ */ p(a.RadioGroup,{"aria-label":m,"aria-labelledby":r,"data-slot":`theme-dropdown-menu-radio-group`,className:i,style:o,value:u,onValueChange:h,children:g}),t[3]=r,t[4]=i,t[5]=u,t[6]=o,t[7]=m,t[8]=h,t[9]=_):_=t[9],_},_={Root:e=>{let t=f(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ p(a.Root,{...e}),t[0]=e,t[1]=n),n},Trigger:t=>{let o=f(20),s,c,l,u,d,m;o[0]===t?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],m=o[6]):({appearance:d,"data-slot":s,disabled:c,label:m,ref:u,...l}=t,o[0]=t,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=m);let h=d===void 0?`ghost`:d,g=m===void 0?`Change Theme`:m,_;o[7]===s?_=o[8]:(_=e(s,`theme-switcher-trigger`),o[7]=s,o[8]=_);let v;o[9]===Symbol.for(`react.memo_cache_sentinel`)?(v=/* @__PURE__ */ p(r,{fallback:/* @__PURE__ */ p(i,{asChild:!0,className:`rounded-full size-5`,children:/* @__PURE__ */ p(`span`,{})}),children:y}),o[9]=v):v=o[9];let b;o[10]!==h||o[11]!==c||o[12]!==g||o[13]!==l||o[14]!==u||o[15]!==_?(b=/* @__PURE__ */ p(n,{ref:u,appearance:h,disabled:c,"data-slot":_,intent:`neutral`,icon:v,label:g,...l}),o[10]=h,o[11]=c,o[12]=g,o[13]=l,o[14]=u,o[15]=_,o[16]=b):b=o[16];let x;return o[17]!==c||o[18]!==b?(x=/* @__PURE__ */ p(a.Trigger,{asChild:!0,disabled:c,children:b}),o[17]=c,o[18]=b,o[19]=x):x=o[19],x},Content:t=>{let n=f(12),r,i,o;n[0]===t?(r=n[1],i=n[2],o=n[3]):({children:r,"data-slot":i,...o}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=o);let s;n[4]===i?s=n[5]:(s=e(i,`theme-switcher-content`),n[4]=i,n[5]=s);let c;n[6]===r?c=n[7]:(c=r??/* @__PURE__ */ p(g,{}),n[6]=r,n[7]=c);let l;return n[8]!==o||n[9]!==s||n[10]!==c?(l=/* @__PURE__ */ p(a.Content,{"data-slot":s,...o,children:c}),n[8]=o,n[9]=s,n[10]=c,n[11]=l):l=n[11],l}};function v(e){return/* @__PURE__ */ m(a.RadioItem,{value:o(e),children:[/* @__PURE__ */ p(t,{svg:/* @__PURE__ */ p(u,{theme:e})}),h[e]]},e)}function y(){return/* @__PURE__ */ p(d,{className:`size-5`})}export{g as ThemeDropdownMenuRadioGroup,_ as ThemeSwitcher};
1
+ import{t as e}from"./data-slot-EM6s2WEU.js";import{t}from"./icon-kK0c-POG.js";import{t as n}from"./button-BMfUxs_j.js";import{t as r}from"./browser-only-Crr3sgA0.js";import{t as i}from"./skeleton-zfqoDAxT.js";import{t as a}from"./dropdown-menu-CutWQ0bl.js";import{d as o,h as s,l as c,p as l}from"./theme-6Q65C1Rx.js";import{n as u,t as d}from"./icons-CAtjMNti.js";import{c as f}from"react/compiler-runtime";import{jsx as p,jsxs as m}from"react/jsx-runtime";const h={system:`System Preference`,light:`Light Mode`,dark:`Dark Mode`,"light-high-contrast":`Light High Contrast`,"dark-high-contrast":`Dark High Contrast`},g=e=>{let t=f(10),{"aria-label":n,"aria-labelledby":r,className:i,style:o}=e,[u,d]=c(),m=r==null?n??`Theme`:n,h;t[0]===d?h=t[1]:(h=e=>{l(e)&&d(e)},t[0]=d,t[1]=h);let g;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=s.map(v),t[2]=g):g=t[2];let _;return t[3]!==r||t[4]!==i||t[5]!==u||t[6]!==o||t[7]!==m||t[8]!==h?(_=/* @__PURE__ */ p(a.RadioGroup,{"aria-label":m,"aria-labelledby":r,"data-slot":`theme-dropdown-menu-radio-group`,className:i,style:o,value:u,onValueChange:h,children:g}),t[3]=r,t[4]=i,t[5]=u,t[6]=o,t[7]=m,t[8]=h,t[9]=_):_=t[9],_},_={Root:e=>{let t=f(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ p(a.Root,{...e}),t[0]=e,t[1]=n),n},Trigger:t=>{let o=f(20),s,c,l,u,d,m;o[0]===t?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],m=o[6]):({appearance:d,"data-slot":s,disabled:c,label:m,ref:u,...l}=t,o[0]=t,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=m);let h=d===void 0?`ghost`:d,g=m===void 0?`Change Theme`:m,_;o[7]===s?_=o[8]:(_=e(s,`theme-switcher-trigger`),o[7]=s,o[8]=_);let v;o[9]===Symbol.for(`react.memo_cache_sentinel`)?(v=/* @__PURE__ */ p(r,{fallback:/* @__PURE__ */ p(i,{asChild:!0,className:`rounded-full size-5`,children:/* @__PURE__ */ p(`span`,{})}),children:y}),o[9]=v):v=o[9];let b;o[10]!==h||o[11]!==c||o[12]!==g||o[13]!==l||o[14]!==u||o[15]!==_?(b=/* @__PURE__ */ p(n,{ref:u,appearance:h,disabled:c,"data-slot":_,intent:`neutral`,icon:v,label:g,...l}),o[10]=h,o[11]=c,o[12]=g,o[13]=l,o[14]=u,o[15]=_,o[16]=b):b=o[16];let x;return o[17]!==c||o[18]!==b?(x=/* @__PURE__ */ p(a.Trigger,{asChild:!0,disabled:c,children:b}),o[17]=c,o[18]=b,o[19]=x):x=o[19],x},Content:t=>{let n=f(12),r,i,o;n[0]===t?(r=n[1],i=n[2],o=n[3]):({children:r,"data-slot":i,...o}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=o);let s;n[4]===i?s=n[5]:(s=e(i,`theme-switcher-content`),n[4]=i,n[5]=s);let c;n[6]===r?c=n[7]:(c=r??/* @__PURE__ */ p(g,{}),n[6]=r,n[7]=c);let l;return n[8]!==o||n[9]!==s||n[10]!==c?(l=/* @__PURE__ */ p(a.Content,{"data-slot":s,...o,children:c}),n[8]=o,n[9]=s,n[10]=c,n[11]=l):l=n[11],l}};function v(e){return/* @__PURE__ */ m(a.RadioItem,{value:o(e),children:[/* @__PURE__ */ p(t,{svg:/* @__PURE__ */ p(u,{theme:e})}),h[e]]},e)}function y(){return/* @__PURE__ */ p(d,{className:`size-5`})}export{g as ThemeDropdownMenuRadioGroup,_ as ThemeSwitcher};