@ngrok/mantle 0.87.0 → 0.89.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 (234) hide show
  1. package/dist/accordion.d.ts +10 -9
  2. package/dist/accordion.js +1 -1
  3. package/dist/agent.json +2 -1
  4. package/dist/{alert-DCVfviBx.d.ts → alert-BzPDUaU7.d.ts} +16 -15
  5. package/dist/alert-CZYYlx9q.js +1 -0
  6. package/dist/alert-center.d.ts +7 -7
  7. package/dist/alert-center.js +1 -1
  8. package/dist/alert-dialog.d.ts +17 -16
  9. package/dist/alert-dialog.js +1 -1
  10. package/dist/alert-vfeV_hso.js +1 -0
  11. package/dist/alert.d.ts +1 -1
  12. package/dist/alert.js +1 -1
  13. package/dist/anchor-CgcbWEUs.js +1 -0
  14. package/dist/anchor.js +1 -1
  15. package/dist/app-layout.d.ts +1128 -45
  16. package/dist/app-layout.js +1 -1
  17. package/dist/area-chart.d.ts +41 -18
  18. package/dist/area-chart.js +1 -1
  19. package/dist/avatar.js +1 -1
  20. package/dist/badge.d.ts +3 -2
  21. package/dist/badge.js +1 -1
  22. package/dist/bar-chart.d.ts +37 -13
  23. package/dist/bar-chart.js +1 -1
  24. package/dist/breadcrumb.js +1 -1
  25. package/dist/browser-only.js +1 -1
  26. package/dist/button-69InNC_m.js +1 -0
  27. package/dist/button-BMfUxs_j.js +1 -0
  28. package/dist/{button-DO53OA70.d.ts → button-CHoYpOzx.d.ts} +5 -4
  29. package/dist/{button-B52_vczK.js → button-D8rr-1AB.js} +1 -1
  30. package/dist/{button-crUf0hbR.d.ts → button-DL7V4bzW.d.ts} +5 -4
  31. package/dist/button-b2HKEIE2.js +1 -0
  32. package/dist/{button-B5i9n7Qp.d.ts → button-mzUR1U0Y.d.ts} +5 -4
  33. package/dist/button.d.ts +3 -3
  34. package/dist/button.js +1 -1
  35. package/dist/calendar.d.ts +3 -2
  36. package/dist/calendar.js +1 -1
  37. package/dist/card.d.ts +8 -7
  38. package/dist/card.js +1 -1
  39. package/dist/centered-layout.js +1 -1
  40. package/dist/{chart-DgaWVBqi.d.ts → chart-23KQ1ZNO.d.ts} +128 -62
  41. package/dist/chart-BRkJfptA.js +2 -0
  42. package/dist/checkbox-C3N2afhB.js +1 -0
  43. package/dist/checkbox.d.ts +3 -2
  44. package/dist/checkbox.js +1 -1
  45. package/dist/{choice-PESu-9s8.d.ts → choice-BCiyqLgO.d.ts} +12 -11
  46. package/dist/choice-DQmecLfy.js +1 -0
  47. package/dist/choice.d.ts +1 -1
  48. package/dist/choice.js +1 -1
  49. package/dist/code-block-4Esx_gV-.js +12 -0
  50. package/dist/code-block.d.ts +17 -16
  51. package/dist/code-block.js +6 -6
  52. package/dist/code-block_highlight-utils.js +1 -1
  53. package/dist/code.d.ts +2 -1
  54. package/dist/code.js +1 -1
  55. package/dist/combobox.d.ts +15 -14
  56. package/dist/combobox.js +1 -1
  57. package/dist/command.d.ts +13 -13
  58. package/dist/command.js +1 -1
  59. package/dist/cx-CK7o_rVv.js +1 -0
  60. package/dist/cx.js +1 -1
  61. package/dist/data-table.d.ts +32 -31
  62. package/dist/data-table.js +1 -1
  63. package/dist/description-list.d.ts +10 -6
  64. package/dist/description-list.js +1 -1
  65. package/dist/dialog-BDzapPLR.js +1 -0
  66. package/dist/{dialog-DXpqpdJj.d.ts → dialog-DQdeqvq-.d.ts} +28 -15
  67. package/dist/dialog.d.ts +1 -1
  68. package/dist/dialog.js +1 -1
  69. package/dist/dropdown-menu-CWUzGFgf.d.ts +1 -0
  70. package/dist/{dropdown-menu-BloQKE_y.d.ts → dropdown-menu-CpRsyt_F.d.ts} +17 -17
  71. package/dist/dropdown-menu-CutWQ0bl.js +1 -0
  72. package/dist/dropdown-menu.d.ts +2 -2
  73. package/dist/dropdown-menu.js +1 -1
  74. package/dist/empty.d.ts +7 -6
  75. package/dist/empty.js +1 -1
  76. package/dist/field.d.ts +16 -15
  77. package/dist/field.js +1 -1
  78. package/dist/flag.d.ts +3 -2
  79. package/dist/flag.js +1 -1
  80. package/dist/hooks.d.ts +36 -1
  81. package/dist/hooks.js +1 -1
  82. package/dist/hover-card.d.ts +5 -4
  83. package/dist/hover-card.js +1 -1
  84. package/dist/icon-BudQMD2S.js +1 -0
  85. package/dist/icon-kK0c-POG.js +1 -0
  86. package/dist/{icon-w0HUe7tr.d.ts → icon-r2NvfTWW.d.ts} +3 -2
  87. package/dist/{icon-BmJ57Tgh.d.ts → icon-ucVgZeXn.d.ts} +3 -2
  88. package/dist/icon.d.ts +2 -2
  89. package/dist/icon.js +1 -1
  90. package/dist/icons-BMZnm4hM.js +1 -0
  91. package/dist/{icons-Bu-2boul.js → icons-CH3tD_wq.js} +1 -1
  92. package/dist/icons-CSwTVV2m.js +1 -0
  93. package/dist/icons.js +1 -1
  94. package/dist/in-view-Dxv_GrUU.js +1 -0
  95. package/dist/input-D_DjD9lT.js +1 -0
  96. package/dist/{input-DpnC3Xgj.d.ts → input-bbB1tC0h.d.ts} +3 -2
  97. package/dist/input.d.ts +5 -4
  98. package/dist/input.js +1 -1
  99. package/dist/kbd-CLHsJ99p.js +1 -0
  100. package/dist/kbd.d.ts +2 -1
  101. package/dist/kbd.js +1 -1
  102. package/dist/label-5T8i7I4X.js +1 -0
  103. package/dist/{label-Bnfe9YJ6.d.ts → label-C-KbNls8.d.ts} +3 -2
  104. package/dist/label.d.ts +1 -1
  105. package/dist/label.js +1 -1
  106. package/dist/{layer-container-R7aux3n8.js → layer-container-DLf-6eBz.js} +1 -1
  107. package/dist/layer-container.js +1 -1
  108. package/dist/line-chart.d.ts +40 -15
  109. package/dist/line-chart.js +1 -1
  110. package/dist/list-DOVZoz9t.js +1 -0
  111. package/dist/list.d.ts +3 -2
  112. package/dist/list.js +1 -1
  113. package/dist/live-region-DQ1QLv3L.js +1 -0
  114. package/dist/live-region.d.ts +3 -2
  115. package/dist/live-region.js +1 -1
  116. package/dist/llms.txt +2 -1
  117. package/dist/{main-Dv2zuT_b.js → main-CC1L9IsH.js} +1 -1
  118. package/dist/main.js +1 -1
  119. package/dist/mantle.css +12 -20
  120. package/dist/media-object.js +1 -1
  121. package/dist/multi-select.d.ts +23 -22
  122. package/dist/multi-select.js +1 -1
  123. package/dist/otp-input.d.ts +9 -8
  124. package/dist/otp-input.js +1 -1
  125. package/dist/pagination.d.ts +9 -8
  126. package/dist/pagination.js +1 -1
  127. package/dist/{popover-Cco1nw8I.d.ts → popover-Dvls7-j4.d.ts} +5 -4
  128. package/dist/popover-oQDUvcZ2.js +1 -0
  129. package/dist/popover.d.ts +1 -1
  130. package/dist/popover.js +1 -1
  131. package/dist/primitive-B-6XILB2.js +1 -0
  132. package/dist/progress.d.ts +9 -8
  133. package/dist/progress.js +1 -1
  134. package/dist/qr-code.d.ts +9 -8
  135. package/dist/qr-code.js +1 -1
  136. package/dist/radio-group.d.ts +19 -18
  137. package/dist/radio-group.js +1 -1
  138. package/dist/sandbar.d.ts +7 -7
  139. package/dist/sandbar.js +1 -1
  140. package/dist/{sandboxed-on-click-BLvvSqOP.js → sandboxed-on-click-C7pPu-2M.js} +1 -1
  141. package/dist/sandboxed-on-click.js +1 -1
  142. package/dist/scatter-plot.d.ts +39 -14
  143. package/dist/scatter-plot.js +1 -1
  144. package/dist/{select-BITJP7I5.d.ts → select-CxXb3aiC.d.ts} +3 -3
  145. package/dist/select-DcL0-duV.js +1 -0
  146. package/dist/select.d.ts +1 -1
  147. package/dist/select.js +1 -1
  148. package/dist/selectable-list.d.ts +16 -15
  149. package/dist/selectable-list.js +1 -1
  150. package/dist/separator-DvPe27fH.js +1 -0
  151. package/dist/{separator-Bo4nY_3M.d.ts → separator-HzGvuD0B.d.ts} +4 -3
  152. package/dist/separator.d.ts +1 -1
  153. package/dist/separator.js +1 -1
  154. package/dist/sheet-DND_KjmS.js +1 -0
  155. package/dist/sheet.d.ts +13 -12
  156. package/dist/sheet.js +1 -1
  157. package/dist/sidebar.d.ts +149 -95
  158. package/dist/sidebar.js +1 -1
  159. package/dist/skeleton-zfqoDAxT.js +1 -0
  160. package/dist/skeleton.d.ts +3 -2
  161. package/dist/skeleton.js +1 -1
  162. package/dist/skip-to-main-link.js +1 -1
  163. package/dist/slider.d.ts +3 -2
  164. package/dist/slider.js +1 -1
  165. package/dist/{slot-BsvE2ntj.js → slot-DdYN1L1C.js} +1 -1
  166. package/dist/{slot-DdgxmuI5.d.ts → slot-Q996Hqk9.d.ts} +1 -1
  167. package/dist/slot.d.ts +1 -1
  168. package/dist/slot.js +1 -1
  169. package/dist/split-button.d.ts +6 -5
  170. package/dist/split-button.js +1 -1
  171. package/dist/switch.d.ts +3 -2
  172. package/dist/switch.js +1 -1
  173. package/dist/{table-DEI-qvSC.d.ts → table-BhzITa19.d.ts} +10 -9
  174. package/dist/table-DBbKqOVq.js +1 -0
  175. package/dist/table.d.ts +1 -1
  176. package/dist/table.js +1 -1
  177. package/dist/tabs.d.ts +172 -33
  178. package/dist/tabs.js +1 -1
  179. package/dist/text-area.d.ts +3 -2
  180. package/dist/text-area.js +1 -1
  181. package/dist/theme-BlCZHClJ.js +1 -0
  182. package/dist/theme-switcher.d.ts +3 -3
  183. package/dist/theme-switcher.js +1 -1
  184. package/dist/theme.js +1 -1
  185. package/dist/toast.d.ts +10 -9
  186. package/dist/toast.js +1 -1
  187. package/dist/{tooltip-nuUCoqq8.d.ts → tooltip-CngH7Kl6.d.ts} +7 -6
  188. package/dist/tooltip-NhYXqStK.js +1 -0
  189. package/dist/tooltip.d.ts +1 -1
  190. package/dist/tooltip.js +1 -1
  191. package/dist/truncated-text.d.ts +138 -0
  192. package/dist/truncated-text.js +1 -0
  193. package/dist/types.js +1 -1
  194. package/dist/{use-breakpoint-CjyNk0fi.js → use-breakpoint--mo7kr9d.js} +1 -1
  195. package/dist/use-is-hydrated-after-paint-r9Cl2mGp.js +1 -0
  196. package/dist/utils.js +1 -1
  197. package/dist/visually-hidden.d.ts +2 -1
  198. package/dist/visually-hidden.js +1 -1
  199. package/dist/well.d.ts +3 -2
  200. package/dist/well.js +1 -1
  201. package/package.json +17 -16
  202. package/dist/alert-OP_-aGJD.js +0 -1
  203. package/dist/anchor-BnMhJYS4.js +0 -1
  204. package/dist/button-BFpCB99R.js +0 -1
  205. package/dist/button-Dij5vCQG.js +0 -1
  206. package/dist/button-pwkdtR3U.js +0 -1
  207. package/dist/chart-aZLMj4xx.js +0 -2
  208. package/dist/checkbox-DbJSqSNN.js +0 -1
  209. package/dist/choice-SRyLguqU.js +0 -1
  210. package/dist/code-block-BE3Q0iAo.js +0 -12
  211. package/dist/cx-0HCjnNv1.js +0 -1
  212. package/dist/dialog-HIdb5d3I.js +0 -1
  213. package/dist/dropdown-menu-BR_AQNMj.js +0 -1
  214. package/dist/dropdown-menu-Dlpb7600.d.ts +0 -1
  215. package/dist/icon-BT8FnkkJ.js +0 -1
  216. package/dist/icon-U24NfYv7.js +0 -1
  217. package/dist/icons-BQRcOU6J.js +0 -1
  218. package/dist/icons-C3rVfpx9.js +0 -1
  219. package/dist/in-view-T_AAYaaF.js +0 -1
  220. package/dist/input-yq0jLE4e.js +0 -1
  221. package/dist/kbd-CJ8hNZfS.js +0 -1
  222. package/dist/label-BAy0Mg59.js +0 -1
  223. package/dist/list-BleZ-43e.js +0 -1
  224. package/dist/live-region-B2vJRvPH.js +0 -1
  225. package/dist/popover-BJ5XNwzD.js +0 -1
  226. package/dist/primitive-w3wFk2La.js +0 -1
  227. package/dist/select-CUWLEeuf.js +0 -1
  228. package/dist/separator-D98be0gY.js +0 -1
  229. package/dist/sheet-B5x8EO9Y.js +0 -1
  230. package/dist/skeleton-bVDP8BzY.js +0 -1
  231. package/dist/table-D2jh52KA.js +0 -1
  232. package/dist/theme-C1kFFdIk.js +0 -1
  233. package/dist/tooltip-H03l7E4Y.js +0 -1
  234. /package/dist/{types-D85fCNV3.js → css-properties-D85fCNV3.js} +0 -0
package/dist/tabs.d.ts CHANGED
@@ -1,11 +1,28 @@
1
- import { ComponentProps, HTMLAttributes } from "react";
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-HzGvuD0B.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
- * A set of layered sections of content—known as tab panels—that are displayed one at a time.
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
- * By default a horizontal classic tablist draws a 1px bottom border in the
39
- * `separator` color token, and a vertical classic tablist draws the matching
40
- * side border. Pass `hideBorder` to remove it; the pill appearance never
41
- * draws a border.
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 separator"` | On the separator element, joined ahead of `Separator`'s own slot. |
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
- * // render the tablist without its border
61
- * <Tabs.List hideBorder>
62
- * <Tabs.Trigger value="account">Account</Tabs.Trigger>
63
- * <Tabs.Trigger value="password">Password</Tabs.Trigger>
64
- * </Tabs.List>
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 List$1: ({ className, hideBorder, ref, ...props }: ComponentProps<typeof List> & {
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 — `[&>[data-slot=tabs-trigger-label]>svg]:size-4`. A `[&_svg]`
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 }: HTMLAttributes<HTMLSpanElement>) => import("react").JSX.Element;
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
- * A set of layered sections of content—known as tab panels—that are displayed one at a time.
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
- * A set of layered sections of content—known as tab panels—that are displayed one at a time.
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
- * By default a classic tablist draws a 1px border in the `separator` color
233
- * token (bottom border when horizontal, side border when vertical); pass
234
- * `hideBorder` to remove it. The pill appearance never draws a border.
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 — `[&>[data-slot=tabs-trigger-label]>svg]:size-4`. A `[&_svg]`
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 r}from"./clsx-DUGZgXfJ.js";import{t as i}from"./use-prefers-reduced-motion-Cj9tJ181.js";import{c as a}from"react/compiler-runtime";import{Children as o,cloneElement as s,createContext as c,isValidElement as l,useContext as u,useEffect as d,useRef as f}from"react";import p from"tiny-invariant";import{Fragment as m,jsx as h,jsxs as g}from"react/jsx-runtime";import{cva as _}from"class-variance-authority";import{Content as v,List as y,Root as b,Trigger as x}from"@radix-ui/react-tabs";const S=c({orientation:`horizontal`,appearance:`classic`}),C=e=>{let n=a(21),r,i,o,s,c;n[0]===e?(r=n[1],i=n[2],o=n[3],s=n[4],c=n[5]):({className:i,children:r,orientation:s,appearance:c,...o}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=o,n[4]=s,n[5]=c);let l=s===void 0?`horizontal`:s,u=c===void 0?`classic`:c,d;n[6]!==u||n[7]!==l?(d={orientation:l,appearance:u},n[6]=u,n[7]=l,n[8]=d):d=n[8];let f=d,p=l===`horizontal`?`flex-col`:`flex-row`,m;n[9]!==i||n[10]!==p?(m=t(`flex gap-4`,p,i),n[9]=i,n[10]=p,n[11]=m):m=n[11];let g;n[12]!==r||n[13]!==f?(g=h(S.Provider,{value:f,children:r}),n[12]=r,n[13]=f,n[14]=g):g=n[14];let _;return n[15]!==u||n[16]!==l||n[17]!==o||n[18]!==m||n[19]!==g?(_=h(b,{"data-slot":`tabs`,"data-appearance":u,className:m,orientation:l,...o,children:g}),n[15]=u,n[16]=l,n[17]=o,n[18]=m,n[19]=g,n[20]=_):_=n[20],_},w=t(`pb-px bg-origin-content bg-no-repeat bg-size-[100%_1px] bg-position-[0_calc(100%+1px)]`,`bg-[image:linear-gradient(var(--color-separator),var(--color-separator))]`,`[--_fade-bottom-border:black]`),T=_(`flex`,{variants:{orientation:{horizontal:`scroll-fade-x flex-row items-center overflow-x-auto overscroll-x-none w-full min-w-0 pt-1 -mt-1 px-1 -mx-1`,vertical:`flex-col items-end gap-3.5 self-stretch`},appearance:{classic:``,pill:``},hideBorder:{true:``,false:``}},compoundVariants:[{orientation:`horizontal`,appearance:`pill`,className:`gap-1 pb-1 -mb-1`},{orientation:`horizontal`,appearance:`classic`,className:`gap-6`},{orientation:`horizontal`,appearance:`classic`,hideBorder:!1,className:w},{orientation:`vertical`,appearance:`classic`,hideBorder:!1,className:`border-r border-separator`}],defaultVariants:{hideBorder:!1}}),E=n=>{let r=a(19),o,s,c,l;r[0]===n?(o=r[1],s=r[2],c=r[3],l=r[4]):({className:o,hideBorder:l,ref:c,...s}=n,r[0]=n,r[1]=o,r[2]=s,r[3]=c,r[4]=l);let p=l!==void 0&&l,{orientation:m,appearance:g}=u(S),_=f(null),v=e(_,c),b,x;r[5]===m?(b=r[6],x=r[7]):(b=()=>{let e=_.current;if(!e||m!==`horizontal`)return;let t=new AbortController,{signal:n}=t,r=!1;e.addEventListener(`pointerdown`,()=>{r=!0},{signal:n});let a=()=>{r=!1};return e.addEventListener(`pointerup`,a,{signal:n}),e.addEventListener(`pointercancel`,a,{signal:n}),e.addEventListener(`keydown`,a,{signal:n}),e.addEventListener(`focusin`,t=>{if(!r&&t.target instanceof Element&&t.target!==e){let e=i()?`auto`:`smooth`;t.target.scrollIntoView({behavior:e,inline:`center`,block:`nearest`})}},{signal:n}),()=>{t.abort()}},x=[m],r[5]=m,r[6]=b,r[7]=x),d(b,x);let C=p?``:void 0,w;r[8]!==g||r[9]!==o||r[10]!==p||r[11]!==m?(w=t(T({orientation:m,appearance:g,hideBorder:p}),o),r[8]=g,r[9]=o,r[10]=p,r[11]=m,r[12]=w):w=r[12];let E;return r[13]!==v||r[14]!==m||r[15]!==s||r[16]!==C||r[17]!==w?(E=h(y,{"aria-orientation":m,"data-slot":`tabs-list`,"data-hide-border":C,className:w,ref:v,...s}),r[13]=v,r[14]=m,r[15]=s,r[16]=C,r[17]=w,r[18]=E):E=r[18],E},D=_(`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`}}}),O=()=>{let e=a(5),{orientation:t,appearance:n}=u(S),i;e[0]!==n||e[1]!==t?(i=r(D({orientation:t,appearance:n})),e[0]=n,e[1]=t,e[2]=i):i=e[2];let o;return e[3]===i?o=e[4]:(o=h(`span`,{"aria-hidden":!0,className:i}),e[3]=i,e[4]=o),o},k=_(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`)}}}),A={Root:C,Content:e=>{let n=a(8),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let o;n[3]===r?o=n[4]:(o=t(`focus-visible:ring-focus-accent outline-hidden focus-visible:ring-4`,r),n[3]=r,n[4]=o);let s;return n[5]!==i||n[6]!==o?(s=h(v,{"data-slot":`tabs-content`,className:o,...i}),n[5]=i,n[6]=o,n[7]=s):s=n[7],s},List:E,Trigger:e=>{let r=a(40),i,c,d,f,_,v,y;r[0]===e?(i=r[1],c=r[2],d=r[3],f=r[4],_=r[5],v=r[6],y=r[7]):({"aria-disabled":i,asChild:y,children:d,className:f,disabled:c,ref:v,..._}=e,r[0]=e,r[1]=i,r[2]=c,r[3]=d,r[4]=f,r[5]=_,r[6]=v,r[7]=y);let b=y!==void 0&&y,{orientation:C,appearance:w}=u(S),T=i??c,E;r[8]===T?E=r[9]:(E=n(T),r[8]=T,r[9]=E);let D=E,A=i??c,j;r[10]!==w||r[11]!==f||r[12]!==C?(j=t(k({orientation:C,appearance:w}),f),r[10]=w,r[11]=f,r[12]=C,r[13]=j):j=r[13];let M;r[14]!==D||r[15]!==_||r[16]!==A||r[17]!==j?(M={"aria-disabled":A,className:j,disabled:D,..._},r[14]=D,r[15]=_,r[16]=A,r[17]=j,r[18]=M):M=r[18];let N=M;if(b){let e;r[19]===d?e=r[20]:(e=o.only(d),p(l(e),"When using `asChild`, TabsTrigger must be passed a single child as a JSX tag."),r[19]=d,r[20]=e);let t=e.props?.children,n;if(r[21]!==D||r[22]!==t||r[23]!==v||r[24]!==e||r[25]!==N){let i=D?{href:void 0,to:void 0}:{},a;r[27]!==D||r[28]!==e?(a=D?h(`button`,{type:`button`}):e,r[27]=D,r[28]=e,r[29]=a):a=r[29];let o;r[30]===Symbol.for(`react.memo_cache_sentinel`)?(o=h(O,{}),r[30]=o):o=r[30];let c;r[31]===t?c=r[32]:(c=g(m,{children:[o,h(`span`,{"data-slot":`tabs-trigger-label`,className:`contents`,children:t})]}),r[31]=t,r[32]=c),n=h(x,{asChild:!0,"data-slot":`tabs-trigger`,...N,ref:v,children:s(a,i,c)}),r[21]=D,r[22]=t,r[23]=v,r[24]=e,r[25]=N,r[26]=n}else n=r[26];return n}let P;r[33]===Symbol.for(`react.memo_cache_sentinel`)?(P=h(O,{}),r[33]=P):P=r[33];let F;r[34]===d?F=r[35]:(F=h(`span`,{"data-slot":`tabs-trigger-label`,className:`contents`,children:d}),r[34]=d,r[35]=F);let I;return r[36]!==v||r[37]!==F||r[38]!==N?(I=g(x,{"data-slot":`tabs-trigger`,ref:v,...N,children:[P,F]}),r[36]=v,r[37]=F,r[38]=N,r[39]=I):I=r[39],I},Badge:e=>{let n=a(10),r,i,o;n[0]===e?(r=n[1],i=n[2],o=n[3]):({className:i,children:r,...o}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=o);let s;n[4]===i?s=n[5]:(s=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`,i),n[4]=i,n[5]=s);let c;return n[6]!==r||n[7]!==o||n[8]!==s?(c=h(`span`,{"data-slot":`tabs-badge`,className:s,...o,children:r}),n[6]=r,n[7]=o,n[8]=s,n[9]=c):c=n[9],c}};export{A 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-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,3 +1,4 @@
1
+ import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
1
2
  import { o as WithValidation } from "./field-7QeiTFwl.js";
2
3
  import { ComponentProps } from "react";
3
4
  //#region src/components/text-area/text-area.d.ts
@@ -6,7 +7,7 @@ type Props = ComponentProps<"textarea"> & WithValidation & {
6
7
  * The visual style of the textarea.
7
8
  */
8
9
  appearance?: "monospaced";
9
- };
10
+ } & WithDataSlot;
10
11
  /**
11
12
  * A multi-line plain-text editing control, useful when you want to allow users
12
13
  * to enter a sizeable amount of free-form text, for example a comment on a
@@ -28,6 +29,6 @@ type Props = ComponentProps<"textarea"> & WithValidation & {
28
29
  * </form>
29
30
  * ```
30
31
  */
31
- declare const TextArea: ({ appearance, "aria-invalid": _ariaInvalid, className, onDragEnter, onDragLeave, onDropCapture, ref, validation: _validation, ...props }: Props) => import("react").JSX.Element;
32
+ declare const TextArea: ({ "data-slot": dataSlot, appearance, "aria-invalid": _ariaInvalid, className, onDragEnter, onDragLeave, onDropCapture, ref, validation: _validation, ...props }: Props) => import("react").JSX.Element;
32
33
  //#endregion
33
34
  export { TextArea, type Props as TextAreaProps };
package/dist/text-area.js CHANGED
@@ -1 +1 @@
1
- import{n as e}from"./compose-refs-sFdxsL7k.js";import{t}from"./cx-0HCjnNv1.js";import{a as n,r}from"./field-Bpptk_9t.js";import{c as i}from"react/compiler-runtime";import{useRef as a,useState as o}from"react";import{jsx as s}from"react/jsx-runtime";const c=c=>{let l=i(32),u,d,f,p,m,h,g,_,v;l[0]===c?(u=l[1],d=l[2],f=l[3],p=l[4],m=l[5],h=l[6],g=l[7],_=l[8],v=l[9]):({appearance:f,"aria-invalid":u,className:p,onDragEnter:m,onDragLeave:h,onDropCapture:g,ref:v,validation:d,..._}=c,l[0]=c,l[1]=u,l[2]=d,l[3]=f,l[4]=p,l[5]=m,l[6]=h,l[7]=g,l[8]=_,l[9]=v);let y=n(),b=d??y,x;l[10]!==u||l[11]!==b?(x=r({"aria-invalid":u,validation:b}),l[10]=u,l[11]=b,l[12]=x):x=l[12];let{ariaInvalid:S,validation:C}=x,[w,T]=o(!1),E=a(null),D=e(E,v),O=C||void 0,k=f===`monospaced`&&`font-mono pointer-coarse:text-base text-xs/5`,A;l[13]!==p||l[14]!==k?(A=t(`border-input bg-form data-drag-over:border-dashed data-drag-over:ring-4 pointer-coarse:py-[calc(theme(spacing[2.5])-1px)] pointer-coarse:text-base text-sm flex min-h-24 w-full rounded-md border px-3 py-[calc(theme(spacing[2])-1px)] focus-visible:outline-hidden focus-visible:ring-4 disabled:pointer-events-none disabled:opacity-50`,`placeholder:text-placeholder data-drag-over:border-dashed`,`border-form text-strong ring-focus-accent focus:border-accent-600 data-drag-over:border-accent-600`,`data-validation-error:border-danger-600 data-validation-error:ring-focus-danger data-validation-error:focus-visible:border-danger-600 data-validation-error:data-drag-over:border-danger-600`,`data-validation-success:border-success-600 data-validation-success:ring-focus-success data-validation-success:focus-visible:border-success-600 data-validation-success:data-drag-over:border-success-600`,`data-validation-warning:border-warning-600 data-validation-warning:ring-focus-warning data-validation-warning:focus-visible:border-warning-600 data-validation-warning:data-drag-over:border-warning-600`,k,p),l[13]=p,l[14]=k,l[15]=A):A=l[15];let j;l[16]===m?j=l[17]:(j=e=>{T(!0),m?.(e)},l[16]=m,l[17]=j);let M;l[18]===h?M=l[19]:(M=e=>{T(!1),h?.(e)},l[18]=h,l[19]=M);let N;l[20]===g?N=l[21]:(N=e=>{T(!1),E.current?.focus(),g?.(e)},l[20]=g,l[21]=N);let P;return l[22]!==S||l[23]!==D||l[24]!==w||l[25]!==_||l[26]!==O||l[27]!==A||l[28]!==j||l[29]!==M||l[30]!==N?(P=s(`textarea`,{"aria-invalid":S,"data-validation":O,"data-slot":`text-area`,className:A,"data-drag-over":w,onDragEnter:j,onDragLeave:M,onDropCapture:N,ref:D,..._}),l[22]=S,l[23]=D,l[24]=w,l[25]=_,l[26]=O,l[27]=A,l[28]=j,l[29]=M,l[30]=N,l[31]=P):P=l[31],P};export{c as TextArea};
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{a as r,r as i}from"./field-Bpptk_9t.js";import{c as a}from"react/compiler-runtime";import{useRef as o,useState as s}from"react";import{jsx as c}from"react/jsx-runtime";const l=l=>{let u=a(36),d,f,p,m,h,g,_,v,y,b;u[0]===l?(d=u[1],f=u[2],p=u[3],m=u[4],h=u[5],g=u[6],_=u[7],v=u[8],y=u[9],b=u[10]):({"data-slot":h,appearance:p,"aria-invalid":d,className:m,onDragEnter:g,onDragLeave:_,onDropCapture:v,ref:b,validation:f,...y}=l,u[0]=l,u[1]=d,u[2]=f,u[3]=p,u[4]=m,u[5]=h,u[6]=g,u[7]=_,u[8]=v,u[9]=y,u[10]=b);let x=r(),S=f??x,C;u[11]!==d||u[12]!==S?(C=i({"aria-invalid":d,validation:S}),u[11]=d,u[12]=S,u[13]=C):C=u[13];let{ariaInvalid:w,validation:T}=C,[E,D]=s(!1),O=o(null),k=e(O,b),A=T||void 0,j;u[14]===h?j=u[15]:(j=n(h,`text-area`),u[14]=h,u[15]=j);let M=p===`monospaced`&&`font-mono pointer-coarse:text-base text-xs/5`,N;u[16]!==m||u[17]!==M?(N=t(`border-input bg-form data-drag-over:border-dashed data-drag-over:ring-4 pointer-coarse:py-[calc(theme(spacing[2.5])-1px)] pointer-coarse:text-base text-sm flex min-h-24 w-full rounded-md border px-3 py-[calc(theme(spacing[2])-1px)] focus-visible:outline-hidden focus-visible:ring-4 disabled:pointer-events-none disabled:opacity-50`,`placeholder:text-placeholder data-drag-over:border-dashed`,`border-form text-strong ring-focus-accent focus:border-accent-600 data-drag-over:border-accent-600`,`data-validation-error:border-danger-600 data-validation-error:ring-focus-danger data-validation-error:focus-visible:border-danger-600 data-validation-error:data-drag-over:border-danger-600`,`data-validation-success:border-success-600 data-validation-success:ring-focus-success data-validation-success:focus-visible:border-success-600 data-validation-success:data-drag-over:border-success-600`,`data-validation-warning:border-warning-600 data-validation-warning:ring-focus-warning data-validation-warning:focus-visible:border-warning-600 data-validation-warning:data-drag-over:border-warning-600`,M,m),u[16]=m,u[17]=M,u[18]=N):N=u[18];let P;u[19]===g?P=u[20]:(P=e=>{D(!0),g?.(e)},u[19]=g,u[20]=P);let F;u[21]===_?F=u[22]:(F=e=>{D(!1),_?.(e)},u[21]=_,u[22]=F);let I;u[23]===v?I=u[24]:(I=e=>{D(!1),O.current?.focus(),v?.(e)},u[23]=v,u[24]=I);let L;return u[25]!==w||u[26]!==k||u[27]!==E||u[28]!==y||u[29]!==A||u[30]!==j||u[31]!==N||u[32]!==P||u[33]!==F||u[34]!==I?(L=/* @__PURE__ */ c(`textarea`,{"aria-invalid":w,"data-validation":A,"data-slot":j,className:N,"data-drag-over":E,onDragEnter:P,onDragLeave:F,onDropCapture:I,ref:k,...y}),u[25]=w,u[26]=k,u[27]=E,u[28]=y,u[29]=A,u[30]=j,u[31]=N,u[32]=P,u[33]=F,u[34]=I,u[35]=L):L=u[35],L};export{l as TextArea};
@@ -0,0 +1 @@
1
+ import{t as e}from"./cx-CK7o_rVv.js";import{n as t,t as n}from"./cookie-ca4g5CKp.js";import{n as r}from"./browser-only-Crr3sgA0.js";import{t as i}from"./use-matches-media-query-m860lols.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:i,ssrCookie:o}=e,s;t[0]!==i||t[1]!==o?(s=()=>{let e=F({cookie:r()?document.cookie:o});return E(e,{forceTheme:i}),e},t[0]=i,t[1]=o,t[2]=s):s=t[2];let[d,p]=u(s),m=l(null),h,_;t[3]===i?(h=t[4],_=t[5]):(h=()=>{let e=function(e){let t=e??F({cookie:document.cookie});p(t),E(t,{forceTheme:i})};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),r=window.matchMedia(b),a=function(){e()},o=function(){document.visibilityState===`visible`&&e()};return n.addEventListener(`change`,a),r.addEventListener(`change`,a),window.addEventListener(`pageshow`,a),document.addEventListener(`visibilitychange`,o),()=>{window.removeEventListener(`storage`,t),n.removeEventListener(`change`,a),r.removeEventListener(`change`,a),window.removeEventListener(`pageshow`,a),document.removeEventListener(`visibilitychange`,o),B(m.current),m.current=null}},_=[i],t[3]=i,t[4]=h,t[5]=_),c(h,_);let v;t[6]===i?v=t[7]:(v=e=>{z(e),p(e),E(e,{forceTheme:i}),L(e,{broadcastChannel:m.current,pingKey:`${x}__ping`})},t[6]=i,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(!r())return;let n=window.document.documentElement,i=window.matchMedia(y).matches,a=window.matchMedia(b).matches,o=t??O(e,{prefersDarkMode:i,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(!r())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),t=s(C),n=t==null?`system`:t[0],r=i(y),o=i(b),c;return e[0]!==r||e[1]!==o||e[2]!==n?(c=O(n,{prefersDarkMode:r,prefersHighContrast:o}),e[0]=r,e[1]=o,e[2]=n,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),i;n[0]===t?i=n[1]:(i=t===void 0?{}:t,n[0]=t,n[1]=i);let o=i,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(r()){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 n=t(e,x);return g(n)?n:S}function I(e){return n(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(r())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
- import { n as IconButtonProps, r as IconButtonAppearance } from "./button-crUf0hbR.js";
4
- import { t as DropdownMenu } from "./dropdown-menu-BloQKE_y.js";
5
- import "./dropdown-menu-Dlpb7600.js";
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";
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"./icon-BT8FnkkJ.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./button-pwkdtR3U.js";import{t as r}from"./browser-only-Crr3sgA0.js";import{t as i}from"./skeleton-bVDP8BzY.js";import{t as a}from"./dropdown-menu-BR_AQNMj.js";import{d as o,h as s,l as c,p as l}from"./theme-C1kFFdIk.js";import{n as u,t as d}from"./icons-BQRcOU6J.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?(_=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=p(a.Root,{...e}),t[0]=e,t[1]=n),n},Trigger:e=>{let o=f(20),s,c,l,u,d,m;o[0]===e?(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}=e,o[0]=e,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]:(_=t(s,`theme-switcher-trigger`),o[7]=s,o[8]=_);let v;o[9]===Symbol.for(`react.memo_cache_sentinel`)?(v=p(r,{fallback:p(i,{asChild:!0,className:`rounded-full size-5`,children: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=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=p(a.Trigger,{asChild:!0,disabled:c,children:b}),o[17]=c,o[18]=b,o[19]=x):x=o[19],x},Content:e=>{let n=f(12),r,i,o;n[0]===e?(r=n[1],i=n[2],o=n[3]):({children:r,"data-slot":i,...o}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=o);let s;n[4]===i?s=n[5]:(s=t(i,`theme-switcher-content`),n[4]=i,n[5]=s);let c;n[6]===r?c=n[7]:(c=r??p(g,{}),n[6]=r,n[7]=c);let l;return n[8]!==o||n[9]!==s||n[10]!==c?(l=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(t){return m(a.RadioItem,{value:o(t),children:[p(e,{svg:p(u,{theme:t})}),h[t]]},t)}function y(){return 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-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};
package/dist/theme.js CHANGED
@@ -1 +1 @@
1
- import{a as e,c as t,d as n,f as r,h as i,i as a,l as o,m as s,n as c,o as l,p as u,r as d,s as f,t as p,u as m}from"./theme-C1kFFdIk.js";import{c as h}from"react/compiler-runtime";import{useEffect as g}from"react";import{Fragment as _,jsx as v,jsxs as y}from"react/jsx-runtime";const b=`mantle-dark-styles`,x=`mantle-light-high-contrast-styles`,S=`mantle-dark-high-contrast-styles`,C=`(prefers-color-scheme: dark)`,w=`(prefers-contrast: more) and (prefers-color-scheme: light)`,T=`(prefers-contrast: more) and (prefers-color-scheme: dark)`;function E(e,t){let n=t??e,r=n===`light`||n===`dark`,i=n===`light-high-contrast`||n===`dark-high-contrast`;return{dark:r?`all`:C,lightHighContrast:i?`all`:w,darkHighContrast:i?`all`:T}}function D(e){return e}function O(e){let{darkLinkId:t,lightHcLinkId:n,darkHcLinkId:r,mediaDark:i,mediaLightHc:a,mediaDarkHc:o,forceTheme:s}=e,c=document.documentElement.dataset.appliedTheme,l=s??c,u=l===`light`||l===`dark`,d=l===`light-high-contrast`||l===`dark-high-contrast`,f=document.getElementById(t),p=document.getElementById(n),m=document.getElementById(r);f&&(f.media=u?`all`:i),p&&(p.media=d?`all`:a),m&&(m.media=d?`all`:o)}function k(e){let t={darkLinkId:b,lightHcLinkId:x,darkHcLinkId:S,mediaDark:C,mediaLightHc:w,mediaDarkHc:T,forceTheme:e};return`(${O.toString()})(${JSON.stringify(t)})`}function A(e){let t=h(28),{darkCssUrl:n,lightHighContrastCssUrl:i,darkHighContrastCssUrl:o,forceTheme:s,nonce:c,ssrCookie:l}=e,u,d;t[0]===s?(u=t[1],d=t[2]):(u=()=>{let e=function(){let e=document.documentElement.dataset.appliedTheme;return r(e)?e:void 0},t=function(){let{dark:t,lightHighContrast:n,darkHighContrast:r}=E(e(),s),i=document.getElementById(b),a=document.getElementById(x),o=document.getElementById(S);i&&(i.media=t),a&&(a.media=n),o&&(o.media=r)};t();let n=new MutationObserver(t);return n.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-applied-theme`]}),()=>{n.disconnect()}},d=[s],t[0]=s,t[1]=u,t[2]=d),g(u,d);let f,p;if(t[3]!==s||t[4]!==l){let e=l==null?void 0:a({cookie:l});f=e===`system`?void 0:e,p=E(f,s),t[3]=s,t[4]=l,t[5]=f,t[6]=p}else f=t[5],p=t[6];let{dark:m,lightHighContrast:C,darkHighContrast:w}=p,T=!s&&f==null,D=!s||s!==`light-high-contrast`&&s!==`dark-high-contrast`,O=!s||s===`light-high-contrast`||s===`dark-high-contrast`,A;t[7]!==n||t[8]!==m||t[9]!==D?(A=D&&v(`link`,{rel:`stylesheet`,id:b,href:n,media:m,suppressHydrationWarning:!0}),t[7]=n,t[8]=m,t[9]=D,t[10]=A):A=t[10];let j;t[11]!==i||t[12]!==C||t[13]!==O?(j=O&&v(`link`,{rel:`stylesheet`,id:x,href:i,media:C,suppressHydrationWarning:!0}),t[11]=i,t[12]=C,t[13]=O,t[14]=j):j=t[14];let M;t[15]!==o||t[16]!==w||t[17]!==O?(M=O&&v(`link`,{rel:`stylesheet`,id:S,href:o,media:w,suppressHydrationWarning:!0}),t[15]=o,t[16]=w,t[17]=O,t[18]=M):M=t[18];let N;t[19]!==s||t[20]!==T||t[21]!==c?(N=T&&v(`script`,{dangerouslySetInnerHTML:{__html:k(s)},nonce:c,suppressHydrationWarning:!0}),t[19]=s,t[20]=T,t[21]=c,t[22]=N):N=t[22];let P;return t[23]!==A||t[24]!==j||t[25]!==M||t[26]!==N?(P=y(_,{children:[A,j,M,N]}),t[23]=A,t[24]=j,t[25]=M,t[26]=N,t[27]=P):P=t[27],P}const j=`https://assets.ngrok.com`,M=`${j}/fonts`,N={roobert:`/roobert/roobert-proportional-vf.woff2`,"jetbrains-mono":`/jetbrains/jetbrainsmono-wght.woff2`,"jetbrains-mono-italic":`/jetbrains/jetbrainsmono-italic-wght.woff2`,"family-regular":`/family/family-regular.woff2`,"family-italic":`/family/family-italic.woff2`};function P(e){let t=e.startsWith(`/`)?e:`/${e}`;return`${M}${t}`}function F(e){return`<${P(N[e])}>; rel=preload; as=font; type="font/woff2"; crossorigin`}const I=e=>{let t=h(4),{name:n}=e,r=N[n],i;t[0]===r?i=t[1]:(i=P(r),t[0]=r,t[1]=i);let a;return t[2]===i?a=t[3]:(a=v(`link`,{rel:`preload`,href:i,as:`font`,type:`font/woff2`,crossOrigin:`anonymous`}),t[2]=i,t[3]=a),a};export{m as $resolvedTheme,n as $theme,A as MantleStyleSheets,I as PreloadFont,p as PreventWrongThemeFlashScript,c as ThemeProvider,j as assetsCdnOrigin,d as extractThemeCookie,k as fixMediaScriptContent,P as fontHref,a as getStoredTheme,r as isResolvedTheme,u as isTheme,D as mantleStyleSheetUrls,F as preloadFontLink,e as preventWrongThemeFlashScriptContent,l as readThemeFromHtmlElement,s as resolvedThemes,i as themes,f as useAppliedTheme,t as useInitialHtmlThemeProps,o as useTheme};
1
+ import{a as e,c as t,d as n,f as r,h as i,i as a,l as o,m as s,n as c,o as l,p as u,r as d,s as f,t as p,u as m}from"./theme-BlCZHClJ.js";import{c as h}from"react/compiler-runtime";import{useEffect as g}from"react";import{Fragment as _,jsx as v,jsxs as y}from"react/jsx-runtime";const b=`mantle-dark-styles`,x=`mantle-light-high-contrast-styles`,S=`mantle-dark-high-contrast-styles`,C=`(prefers-color-scheme: dark)`,w=`(prefers-contrast: more) and (prefers-color-scheme: light)`,T=`(prefers-contrast: more) and (prefers-color-scheme: dark)`;function E(e,t){let n=t??e,r=n===`light`||n===`dark`,i=n===`light-high-contrast`||n===`dark-high-contrast`;return{dark:r?`all`:C,lightHighContrast:i?`all`:w,darkHighContrast:i?`all`:T}}function D(e){return e}function O(e){let{darkLinkId:t,lightHcLinkId:n,darkHcLinkId:r,mediaDark:i,mediaLightHc:a,mediaDarkHc:o,forceTheme:s}=e,c=document.documentElement.dataset.appliedTheme,l=s??c,u=l===`light`||l===`dark`,d=l===`light-high-contrast`||l===`dark-high-contrast`,f=document.getElementById(t),p=document.getElementById(n),m=document.getElementById(r);f&&(f.media=u?`all`:i),p&&(p.media=d?`all`:a),m&&(m.media=d?`all`:o)}function k(e){let t={darkLinkId:b,lightHcLinkId:x,darkHcLinkId:S,mediaDark:C,mediaLightHc:w,mediaDarkHc:T,forceTheme:e};return`(${O.toString()})(${JSON.stringify(t)})`}function A(e){let t=h(28),{darkCssUrl:n,lightHighContrastCssUrl:i,darkHighContrastCssUrl:o,forceTheme:s,nonce:c,ssrCookie:l}=e,u,d;t[0]===s?(u=t[1],d=t[2]):(u=()=>{let e=function(){let e=document.documentElement.dataset.appliedTheme;return r(e)?e:void 0},t=function(){let{dark:t,lightHighContrast:n,darkHighContrast:r}=E(e(),s),i=document.getElementById(b),a=document.getElementById(x),o=document.getElementById(S);i&&(i.media=t),a&&(a.media=n),o&&(o.media=r)};t();let n=new MutationObserver(t);return n.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-applied-theme`]}),()=>{n.disconnect()}},d=[s],t[0]=s,t[1]=u,t[2]=d),g(u,d);let f,p;if(t[3]!==s||t[4]!==l){let e=l==null?void 0:a({cookie:l});f=e===`system`?void 0:e,p=E(f,s),t[3]=s,t[4]=l,t[5]=f,t[6]=p}else f=t[5],p=t[6];let{dark:m,lightHighContrast:C,darkHighContrast:w}=p,T=!s&&f==null,D=!s||s!==`light-high-contrast`&&s!==`dark-high-contrast`,O=!s||s===`light-high-contrast`||s===`dark-high-contrast`,A;t[7]!==n||t[8]!==m||t[9]!==D?(A=D&&/* @__PURE__ */ v(`link`,{rel:`stylesheet`,id:b,href:n,media:m,suppressHydrationWarning:!0}),t[7]=n,t[8]=m,t[9]=D,t[10]=A):A=t[10];let j;t[11]!==i||t[12]!==C||t[13]!==O?(j=O&&/* @__PURE__ */ v(`link`,{rel:`stylesheet`,id:x,href:i,media:C,suppressHydrationWarning:!0}),t[11]=i,t[12]=C,t[13]=O,t[14]=j):j=t[14];let M;t[15]!==o||t[16]!==w||t[17]!==O?(M=O&&/* @__PURE__ */ v(`link`,{rel:`stylesheet`,id:S,href:o,media:w,suppressHydrationWarning:!0}),t[15]=o,t[16]=w,t[17]=O,t[18]=M):M=t[18];let N;t[19]!==s||t[20]!==T||t[21]!==c?(N=T&&/* @__PURE__ */ v(`script`,{dangerouslySetInnerHTML:{__html:k(s)},nonce:c,suppressHydrationWarning:!0}),t[19]=s,t[20]=T,t[21]=c,t[22]=N):N=t[22];let P;return t[23]!==A||t[24]!==j||t[25]!==M||t[26]!==N?(P=/* @__PURE__ */ y(_,{children:[A,j,M,N]}),t[23]=A,t[24]=j,t[25]=M,t[26]=N,t[27]=P):P=t[27],P}const j=`https://assets.ngrok.com`,M=`${j}/fonts`,N={roobert:`/roobert/roobert-proportional-vf.woff2`,"jetbrains-mono":`/jetbrains/jetbrainsmono-wght.woff2`,"jetbrains-mono-italic":`/jetbrains/jetbrainsmono-italic-wght.woff2`,"family-regular":`/family/family-regular.woff2`,"family-italic":`/family/family-italic.woff2`};function P(e){let t=e.startsWith(`/`)?e:`/${e}`;return`${M}${t}`}function F(e){return`<${P(N[e])}>; rel=preload; as=font; type="font/woff2"; crossorigin`}const I=e=>{let t=h(4),{name:n}=e,r=N[n],i;t[0]===r?i=t[1]:(i=P(r),t[0]=r,t[1]=i);let a;return t[2]===i?a=t[3]:(a=/* @__PURE__ */ v(`link`,{rel:`preload`,href:i,as:`font`,type:`font/woff2`,crossOrigin:`anonymous`}),t[2]=i,t[3]=a),a};export{m as $resolvedTheme,n as $theme,A as MantleStyleSheets,I as PreloadFont,p as PreventWrongThemeFlashScript,c as ThemeProvider,j as assetsCdnOrigin,d as extractThemeCookie,k as fixMediaScriptContent,P as fontHref,a as getStoredTheme,r as isResolvedTheme,u as isTheme,D as mantleStyleSheetUrls,F as preloadFontLink,e as preventWrongThemeFlashScriptContent,l as readThemeFromHtmlElement,s as resolvedThemes,i as themes,f as useAppliedTheme,t as useInitialHtmlThemeProps,o as useTheme};