raft-ui 0.0.1

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 (134) hide show
  1. package/README.md +24 -0
  2. package/dist/cn.d.mts +2 -0
  3. package/dist/cn.mjs +2 -0
  4. package/dist/index.d.mts +2710 -0
  5. package/dist/index.mjs +4821 -0
  6. package/dist/label-DWq4ia5I.mjs +115 -0
  7. package/dist/styled-props-B3SNekJg.d.mts +16 -0
  8. package/dist/wip.d.mts +1238 -0
  9. package/dist/wip.mjs +1416 -0
  10. package/package.json +70 -0
  11. package/src/components/avatar/avatar.tsx +375 -0
  12. package/src/components/avatar/index.ts +17 -0
  13. package/src/components/badge/badge.tsx +393 -0
  14. package/src/components/badge/index.ts +2 -0
  15. package/src/components/banner/banner.tsx +269 -0
  16. package/src/components/banner/index.ts +8 -0
  17. package/src/components/bottom-sheet/bottom-sheet.tsx +152 -0
  18. package/src/components/bottom-sheet/index.ts +22 -0
  19. package/src/components/button/button.tsx +497 -0
  20. package/src/components/button/index.ts +2 -0
  21. package/src/components/checkbox/checkbox-indicator.tsx +128 -0
  22. package/src/components/checkbox/checkbox.tsx +350 -0
  23. package/src/components/checkbox/index.ts +2 -0
  24. package/src/components/combobox/combobox.tsx +603 -0
  25. package/src/components/combobox/index.ts +52 -0
  26. package/src/components/context-menu/context-menu.tsx +380 -0
  27. package/src/components/context-menu/index.ts +34 -0
  28. package/src/components/conversation-preview-card/conversation-preview-card.tsx +336 -0
  29. package/src/components/conversation-preview-card/index.ts +32 -0
  30. package/src/components/description-list/description-list.tsx +116 -0
  31. package/src/components/description-list/index.ts +14 -0
  32. package/src/components/dropdown-menu/dropdown-menu.tsx +405 -0
  33. package/src/components/dropdown-menu/index.ts +38 -0
  34. package/src/components/empty-state/empty-state.tsx +177 -0
  35. package/src/components/empty-state/index.ts +16 -0
  36. package/src/components/field/field.tsx +125 -0
  37. package/src/components/field/index.ts +18 -0
  38. package/src/components/inline-code/index.ts +2 -0
  39. package/src/components/inline-code/inline-code.tsx +33 -0
  40. package/src/components/input/index.ts +2 -0
  41. package/src/components/input/input.tsx +76 -0
  42. package/src/components/input-group/index.ts +7 -0
  43. package/src/components/input-group/input-group.tsx +215 -0
  44. package/src/components/kbd/index.ts +2 -0
  45. package/src/components/kbd/kbd.tsx +43 -0
  46. package/src/components/label/index.ts +7 -0
  47. package/src/components/label/label.tsx +99 -0
  48. package/src/components/lightbox/index.ts +24 -0
  49. package/src/components/lightbox/lightbox.tsx +245 -0
  50. package/src/components/list-item/index.ts +20 -0
  51. package/src/components/list-item/list-item.tsx +263 -0
  52. package/src/components/media-list-item/index.ts +20 -0
  53. package/src/components/media-list-item/media-list-item.tsx +169 -0
  54. package/src/components/notification-center/index.ts +39 -0
  55. package/src/components/notification-center/notification-center.tsx +558 -0
  56. package/src/components/panel-header/index.ts +22 -0
  57. package/src/components/panel-header/panel-header.tsx +199 -0
  58. package/src/components/popover/index.ts +30 -0
  59. package/src/components/popover/popover.tsx +248 -0
  60. package/src/components/preview-shell/index.ts +2 -0
  61. package/src/components/preview-shell/preview-shell.tsx +51 -0
  62. package/src/components/quoted-message-card/index.ts +36 -0
  63. package/src/components/quoted-message-card/quoted-message-card.tsx +391 -0
  64. package/src/components/radio-group/index.ts +6 -0
  65. package/src/components/radio-group/radio-group.tsx +119 -0
  66. package/src/components/section-header/index.ts +16 -0
  67. package/src/components/section-header/section-header.tsx +117 -0
  68. package/src/components/section-label/index.ts +2 -0
  69. package/src/components/section-label/section-label.tsx +38 -0
  70. package/src/components/segmented-control/index.ts +12 -0
  71. package/src/components/segmented-control/segmented-control.tsx +129 -0
  72. package/src/components/select/index.ts +40 -0
  73. package/src/components/select/select.tsx +382 -0
  74. package/src/components/spinner/index.ts +2 -0
  75. package/src/components/spinner/spinner.tsx +228 -0
  76. package/src/components/status/index.ts +2 -0
  77. package/src/components/status/status.tsx +152 -0
  78. package/src/components/tabs/index.ts +24 -0
  79. package/src/components/tabs/tabs.tsx +417 -0
  80. package/src/components/text/index.ts +2 -0
  81. package/src/components/text/text.tsx +130 -0
  82. package/src/components/textarea/index.ts +2 -0
  83. package/src/components/textarea/textarea.tsx +136 -0
  84. package/src/components/toggle-group/index.ts +12 -0
  85. package/src/components/toggle-group/toggle-group.tsx +111 -0
  86. package/src/components/tooltip/index.ts +14 -0
  87. package/src/components/tooltip/tooltip.tsx +186 -0
  88. package/src/fonts/brutal.css +2 -0
  89. package/src/index.ts +404 -0
  90. package/src/legacy/AttentionDot.tsx +28 -0
  91. package/src/legacy/AvatarListRow.tsx +87 -0
  92. package/src/legacy/AvatarSlot.tsx +157 -0
  93. package/src/legacy/Badge.tsx +95 -0
  94. package/src/legacy/Banner.tsx +74 -0
  95. package/src/legacy/BottomSheet.tsx +76 -0
  96. package/src/legacy/CheckMarker.tsx +72 -0
  97. package/src/legacy/Checkbox.tsx +81 -0
  98. package/src/legacy/ConversationPreviewCard.tsx +169 -0
  99. package/src/legacy/DismissBackdrop.tsx +68 -0
  100. package/src/legacy/EmptyState.tsx +63 -0
  101. package/src/legacy/ExperimentalBadge.tsx +19 -0
  102. package/src/legacy/FormField.tsx +106 -0
  103. package/src/legacy/KeyValueRow.tsx +67 -0
  104. package/src/legacy/Lightbox.tsx +119 -0
  105. package/src/legacy/NotificationCenter.tsx +217 -0
  106. package/src/legacy/PanelHeader.tsx +94 -0
  107. package/src/legacy/PreviewShell.tsx +40 -0
  108. package/src/legacy/QuotedMessageCard.tsx +181 -0
  109. package/src/legacy/ReorderablePanelTabs.tsx +151 -0
  110. package/src/legacy/SandboxedPreviewFrame.tsx +59 -0
  111. package/src/legacy/SearchInput.tsx +23 -0
  112. package/src/legacy/SectionEyebrow.tsx +60 -0
  113. package/src/legacy/SectionHeader.tsx +68 -0
  114. package/src/legacy/SegmentedControl.tsx +74 -0
  115. package/src/legacy/SlugInput.tsx +29 -0
  116. package/src/legacy/Spinner.tsx +89 -0
  117. package/src/legacy/StatusDot.tsx +51 -0
  118. package/src/legacy/SurfaceListItem.tsx +32 -0
  119. package/src/legacy/Textarea.tsx +137 -0
  120. package/src/legacy/button.tsx +100 -0
  121. package/src/legacy/context-menu-divider.tsx +12 -0
  122. package/src/legacy/menu-item.tsx +66 -0
  123. package/src/legacy/selection-popover.tsx +212 -0
  124. package/src/legacy/server-switcher-menu.tsx +203 -0
  125. package/src/legacy/source.css +240 -0
  126. package/src/lib/cn.ts +1 -0
  127. package/src/lib/styled-props.ts +11 -0
  128. package/src/lib/theme/theme-context.ts +28 -0
  129. package/src/lib/theme/theme-provider.tsx +181 -0
  130. package/src/lib/theme/use-theme.ts +12 -0
  131. package/src/lib/tv.ts +29 -0
  132. package/src/lib/without-children.ts +6 -0
  133. package/src/styles.css +467 -0
  134. package/src/wip.ts +255 -0
package/dist/index.mjs ADDED
@@ -0,0 +1,4821 @@
1
+ import { a as useTheme, c as ThemeStateContext, i as LabelSub, l as tv, n as LabelAsterisk, o as useThemeFamily, r as LabelOptional, s as ThemeContext, t as Label } from "./label-DWq4ia5I.mjs";
2
+ import { cn } from "./cn.mjs";
3
+ import { Button as Button$1 } from "@base-ui/react/button";
4
+ import { createContext, use, useCallback, useEffect, useId, useMemo, useState, useSyncExternalStore } from "react";
5
+ import { mergeProps } from "@base-ui/react/merge-props";
6
+ import { useRender } from "@base-ui/react/use-render";
7
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
+ import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
9
+ import { AlertTriangle, Check, CheckCircle2, ChevronDown, Info, Minus, X } from "lucide-react";
10
+ import { Avatar as Avatar$1, ContextMenu as ContextMenu$1 } from "@base-ui/react";
11
+ import { Menu } from "@base-ui/react/menu";
12
+ import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
13
+ import { Popover as Popover$1 } from "@base-ui/react/popover";
14
+ import { Input as Input$1 } from "@base-ui/react/input";
15
+ import { Combobox as Combobox$1 } from "@base-ui/react/combobox";
16
+ import { Select as Select$1 } from "@base-ui/react/select";
17
+ import { Radio } from "@base-ui/react/radio";
18
+ import { RadioGroup as RadioGroup$1 } from "@base-ui/react/radio-group";
19
+ import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
20
+ import { DndContext, PointerSensor, TouchSensor, closestCenter, useSensor, useSensors } from "@dnd-kit/core";
21
+ import { SortableContext, arrayMove, horizontalListSortingStrategy, useSortable } from "@dnd-kit/sortable";
22
+ //#region src/components/spinner/spinner.tsx
23
+ const SPINNER_STYLE = `
24
+ @keyframes raft-braille-spinner {
25
+ 0%,
26
+ 9.99% {
27
+ content: "⠋";
28
+ }
29
+ 10%,
30
+ 19.99% {
31
+ content: "⠙";
32
+ }
33
+ 20%,
34
+ 29.99% {
35
+ content: "⠹";
36
+ }
37
+ 30%,
38
+ 39.99% {
39
+ content: "⠸";
40
+ }
41
+ 40%,
42
+ 49.99% {
43
+ content: "⠼";
44
+ }
45
+ 50%,
46
+ 59.99% {
47
+ content: "⠴";
48
+ }
49
+ 60%,
50
+ 69.99% {
51
+ content: "⠦";
52
+ }
53
+ 70%,
54
+ 79.99% {
55
+ content: "⠧";
56
+ }
57
+ 80%,
58
+ 89.99% {
59
+ content: "⠇";
60
+ }
61
+ 90%,
62
+ 100% {
63
+ content: "⠏";
64
+ }
65
+ }
66
+
67
+ [data-slot="spinner"] [data-spinner-glyph]::before {
68
+ content: "⠋";
69
+ animation: raft-braille-spinner 800ms steps(1, end) infinite;
70
+ }
71
+
72
+ @media (prefers-reduced-motion: reduce) {
73
+ [data-slot="spinner"] [data-spinner-glyph]::before {
74
+ animation-duration: 1600ms;
75
+ }
76
+ }
77
+
78
+ @keyframes raft-elegant-spinner-spin {
79
+ to {
80
+ transform: rotate(360deg);
81
+ }
82
+ }
83
+
84
+ @keyframes raft-elegant-spinner-dash {
85
+ 0% {
86
+ stroke-dasharray: 1 150;
87
+ stroke-dashoffset: 0;
88
+ }
89
+ 50% {
90
+ stroke-dasharray: 90 150;
91
+ stroke-dashoffset: -35;
92
+ }
93
+ 100% {
94
+ stroke-dasharray: 90 150;
95
+ stroke-dashoffset: -124;
96
+ }
97
+ }
98
+
99
+ [data-slot="spinner"] [data-spinner-ring] {
100
+ animation: raft-elegant-spinner-spin 1600ms linear infinite;
101
+ transform-box: fill-box;
102
+ transform-origin: center;
103
+ will-change: transform;
104
+ }
105
+
106
+ [data-slot="spinner"] [data-spinner-arc] {
107
+ animation: raft-elegant-spinner-dash 1400ms cubic-bezier(0.42, 0, 0.58, 1) infinite;
108
+ stroke-dasharray: 1 150;
109
+ stroke-dashoffset: 0;
110
+ }
111
+
112
+ @media (prefers-reduced-motion: reduce) {
113
+ [data-slot="spinner"] [data-spinner-ring] {
114
+ animation-duration: 2400ms;
115
+ will-change: auto;
116
+ }
117
+
118
+ [data-slot="spinner"] [data-spinner-arc] {
119
+ animation: none;
120
+ stroke-dasharray: 72 150;
121
+ stroke-dashoffset: -30;
122
+ }
123
+ }
124
+ `;
125
+ const spinner = tv({
126
+ slots: {
127
+ root: ["relative inline-flex shrink-0 items-center justify-center", "leading-none text-current"],
128
+ glyph: "inline-block min-w-[1ch] font-mono tabular-nums",
129
+ ring: "block size-full shrink-0"
130
+ },
131
+ variants: {
132
+ theme: {
133
+ brutal: {},
134
+ elegant: {}
135
+ },
136
+ size: {
137
+ sm: {},
138
+ lg: {}
139
+ }
140
+ },
141
+ defaultVariants: { size: "sm" },
142
+ compoundVariants: [
143
+ {
144
+ theme: "brutal",
145
+ size: "sm",
146
+ class: { root: "h-4 text-base" }
147
+ },
148
+ {
149
+ theme: "brutal",
150
+ size: "lg",
151
+ class: { root: "h-6 text-xl" }
152
+ },
153
+ {
154
+ theme: "elegant",
155
+ size: "sm",
156
+ class: { root: "size-3.5" }
157
+ },
158
+ {
159
+ theme: "elegant",
160
+ size: "lg",
161
+ class: { root: "size-[18px]" }
162
+ }
163
+ ]
164
+ });
165
+ const spinnerStyle = /* @__PURE__ */ jsx("style", {
166
+ href: "raft-ui-spinner",
167
+ precedence: "default",
168
+ children: SPINNER_STYLE
169
+ });
170
+ function Spinner({ size = "sm", className, render, ...props }) {
171
+ const theme = useThemeFamily();
172
+ const { root, glyph, ring } = spinner({
173
+ theme,
174
+ size
175
+ });
176
+ const children = theme === "elegant" ? /* @__PURE__ */ jsxs(Fragment, { children: [spinnerStyle, /* @__PURE__ */ jsxs("svg", {
177
+ "data-spinner-ring": "",
178
+ "aria-hidden": "true",
179
+ className: ring(),
180
+ xmlns: "http://www.w3.org/2000/svg",
181
+ fill: "none",
182
+ viewBox: "0 0 24 24",
183
+ children: [/* @__PURE__ */ jsx("circle", {
184
+ className: "opacity-20",
185
+ cx: "12",
186
+ cy: "12",
187
+ r: "10",
188
+ stroke: "currentColor",
189
+ strokeWidth: "2.5"
190
+ }), /* @__PURE__ */ jsx("circle", {
191
+ "data-spinner-arc": "",
192
+ className: "opacity-80",
193
+ cx: "12",
194
+ cy: "12",
195
+ r: "10",
196
+ fill: "none",
197
+ pathLength: "150",
198
+ stroke: "currentColor",
199
+ strokeLinecap: "round",
200
+ strokeWidth: "2.5"
201
+ })]
202
+ })] }) : /* @__PURE__ */ jsxs(Fragment, { children: [spinnerStyle, /* @__PURE__ */ jsx("span", {
203
+ "data-spinner-glyph": "",
204
+ "aria-hidden": "true",
205
+ className: glyph()
206
+ })] });
207
+ return useRender({
208
+ defaultTagName: "span",
209
+ render,
210
+ props: mergeProps({
211
+ role: "status",
212
+ "aria-label": "Loading",
213
+ className: root({ className }),
214
+ children
215
+ }, props),
216
+ state: {
217
+ slot: "spinner",
218
+ size
219
+ }
220
+ });
221
+ }
222
+ //#endregion
223
+ //#region src/components/button/button.tsx
224
+ const buttonVariants = tv({
225
+ slots: {
226
+ root: [
227
+ "relative inline-flex shrink-0 items-center justify-center",
228
+ "font-heading leading-none whitespace-nowrap select-none",
229
+ "border-line rounded-none",
230
+ "shadow-sm transition-all duration-100",
231
+ "outline outline-[1px] outline-offset-2 outline-transparent",
232
+ "data-[loading=true]:cursor-wait",
233
+ "disabled:pointer-events-none disabled:opacity-40 data-[loading=true]:opacity-100",
234
+ "disabled:transform-none",
235
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
236
+ ],
237
+ content: "relative z-10 inline-flex items-center justify-center gap-[inherit] data-[loading=true]:invisible",
238
+ loadingIndicator: "pointer-events-none absolute inset-0 z-10 flex items-center justify-center"
239
+ },
240
+ variants: {
241
+ theme: {
242
+ brutal: { root: ["border-2 font-bold focus-visible:outline-transparent"] },
243
+ elegant: { root: [
244
+ "overflow-clip border-0 font-sans font-medium antialiased",
245
+ "focus-visible:outline-[var(--button-focus-outline,transparent)]",
246
+ "shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.05),0_0_0_1px_var(--line-subtle)]",
247
+ "before:pointer-events-none before:absolute before:inset-0 before:z-0 before:rounded-[inherit]",
248
+ "active:not-aria-[haspopup]:scale-[0.985]"
249
+ ] }
250
+ },
251
+ variant: {
252
+ primary: { root: ["border-line-strong bg-primary-400 text-primary-950", "hover:bg-primary-500"] },
253
+ default: { root: ["border-line-strong bg-layer-panel text-foreground-strong", "hover:bg-layer-panel"] },
254
+ information: { root: ["border-line-strong bg-info-base text-foreground-inverse", "hover:bg-info-base"] },
255
+ muted: { root: ["border-line-strong bg-secondary-400 text-secondary-950", "hover:border-line-strong hover:bg-secondary-400"] },
256
+ accent: { root: ["border-line-strong bg-accent-400 text-accent-950", "hover:bg-accent-500"] },
257
+ warning: { root: ["border-line-strong bg-warning-base text-foreground-inverse", "hover:bg-warning-base"] },
258
+ outline: { root: [
259
+ "border-line-strong bg-transparent text-foreground-strong",
260
+ "hover:bg-layer-muted",
261
+ "shadow-none"
262
+ ] },
263
+ ghost: { root: ["border-transparent bg-transparent text-foreground shadow-none", "hover:border-line-strong hover:bg-layer-muted"] },
264
+ link: { root: ["border-transparent bg-transparent text-foreground-strong shadow-none underline-offset-4", "hover:underline"] },
265
+ "danger-secondary": { root: ["border-line-strong bg-danger-lighter text-danger-base", "hover:bg-danger-lighter"] },
266
+ danger: { root: ["border-line-strong bg-danger-base text-foreground-inverse", "hover:border-[oklch(0.595_0.241_26.758)] hover:bg-[oklch(0.595_0.241_26.758)]"] },
267
+ "danger-outline": { root: [
268
+ "border-line-strong bg-transparent text-danger-base",
269
+ "hover:bg-layer-muted",
270
+ "shadow-none"
271
+ ] }
272
+ },
273
+ size: {
274
+ xs: { root: [
275
+ "gap-1 px-2 py-[5px] text-[11px]",
276
+ "has-data-[icon=inline-start]:pl-1.5 has-data-[icon=inline-end]:pr-1.5",
277
+ "[&_svg:not([class*='size-'])]:size-3"
278
+ ] },
279
+ sm: { root: [
280
+ "gap-1.5 px-2.5 py-[6px] text-xs",
281
+ "has-data-[icon=inline-start]:pl-2 has-data-[icon=inline-end]:pr-2",
282
+ "[&_svg:not([class*='size-'])]:size-3.5"
283
+ ] },
284
+ md: { root: ["gap-2 px-3 py-2 text-sm", "has-data-[icon=inline-start]:pl-2.5 has-data-[icon=inline-end]:pr-2.5"] },
285
+ lg: { root: [
286
+ "gap-2 px-3.5 py-2.5 text-base",
287
+ "has-data-[icon=inline-start]:pl-3 has-data-[icon=inline-end]:pr-3",
288
+ "[&_svg:not([class*='size-'])]:size-4"
289
+ ] },
290
+ "icon-xs": { root: ["p-[5px] text-[11px]", "[&_svg:not([class*='size-'])]:size-3"] },
291
+ "icon-sm": { root: ["p-[6px] text-xs", "[&_svg:not([class*='size-'])]:size-3.5"] },
292
+ "icon-md": { root: ["p-2 text-sm", "[&_svg:not([class*='size-'])]:size-4"] },
293
+ "icon-lg": { root: ["p-3 text-sm", "[&_svg:not([class*='size-'])]:size-4"] }
294
+ }
295
+ },
296
+ defaultVariants: {
297
+ variant: "default",
298
+ size: "md"
299
+ },
300
+ compoundVariants: [
301
+ {
302
+ theme: "elegant",
303
+ size: ["xs", "icon-xs"],
304
+ class: { root: "rounded-sm" }
305
+ },
306
+ {
307
+ theme: "elegant",
308
+ size: ["sm", "icon-sm"],
309
+ class: { root: "rounded" }
310
+ },
311
+ {
312
+ theme: "elegant",
313
+ size: ["md", "icon-md"],
314
+ class: { root: "rounded-md" }
315
+ },
316
+ {
317
+ theme: "elegant",
318
+ size: ["lg", "icon-lg"],
319
+ class: { root: "rounded-md" }
320
+ },
321
+ {
322
+ theme: "brutal",
323
+ variant: "primary",
324
+ class: { root: "bg-brutal-yellow text-black hover:bg-brutal-yellow" }
325
+ },
326
+ {
327
+ theme: "brutal",
328
+ variant: "default",
329
+ class: { root: "bg-white text-black hover:bg-white" }
330
+ },
331
+ {
332
+ theme: "brutal",
333
+ variant: "outline",
334
+ class: { root: "bg-white text-black shadow-sm hover:bg-white" }
335
+ },
336
+ {
337
+ theme: "brutal",
338
+ variant: "information",
339
+ class: { root: "bg-brutal-cyan text-black hover:bg-brutal-cyan" }
340
+ },
341
+ {
342
+ theme: "brutal",
343
+ variant: "muted",
344
+ class: { root: "bg-brutal-stone text-black hover:bg-brutal-stone" }
345
+ },
346
+ {
347
+ theme: "brutal",
348
+ variant: "accent",
349
+ class: { root: "bg-brutal-pink text-black hover:bg-brutal-pink" }
350
+ },
351
+ {
352
+ theme: "brutal",
353
+ variant: "danger",
354
+ class: { root: "bg-brutal-red text-black hover:bg-brutal-red" }
355
+ },
356
+ {
357
+ theme: "brutal",
358
+ variant: "warning",
359
+ class: { root: "bg-warning-base text-black hover:bg-warning-base" }
360
+ },
361
+ {
362
+ theme: "brutal",
363
+ size: "xs",
364
+ class: { root: "h-6 px-2 py-0 text-[11px]" }
365
+ },
366
+ {
367
+ theme: "brutal",
368
+ size: "sm",
369
+ class: { root: "h-7 px-2.5 py-0 text-xs" }
370
+ },
371
+ {
372
+ theme: "brutal",
373
+ size: "md",
374
+ class: { root: "h-8 px-3 py-0 text-sm" }
375
+ },
376
+ {
377
+ theme: "brutal",
378
+ size: "lg",
379
+ class: { root: "h-10 px-4 py-0 text-sm" }
380
+ },
381
+ {
382
+ theme: "brutal",
383
+ size: "icon-xs",
384
+ class: { root: "size-6 p-0 text-[11px]" }
385
+ },
386
+ {
387
+ theme: "brutal",
388
+ size: "icon-sm",
389
+ class: { root: "size-7 p-0 text-xs" }
390
+ },
391
+ {
392
+ theme: "brutal",
393
+ size: "icon-md",
394
+ class: { root: "size-8 p-0 text-sm" }
395
+ },
396
+ {
397
+ theme: "brutal",
398
+ size: "icon-lg",
399
+ class: { root: "size-10 p-0 text-sm" }
400
+ },
401
+ {
402
+ theme: "elegant",
403
+ variant: "default",
404
+ class: { root: [
405
+ "bg-foreground-strong text-foreground-inverse",
406
+ "[--button-focus-outline:var(--foreground-strong)]",
407
+ "shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.12),0_0_0_1px_var(--foreground-strong)]",
408
+ "before:bg-[linear-gradient(in_oklab_180deg,oklab(100%_0_0_/_8%)_0%,oklab(0%_0_0_/_0%)_100%)]",
409
+ "hover:bg-[oklch(0.31_0.006_285)]"
410
+ ] }
411
+ },
412
+ {
413
+ theme: "elegant",
414
+ variant: "primary",
415
+ class: { root: [
416
+ "bg-primary-400 text-primary-950",
417
+ "[--button-focus-outline:var(--primary-400)]",
418
+ "shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.15),0_0_0_1px_oklch(0.83_0.14_91.89_/_0.83)]",
419
+ "before:bg-[linear-gradient(in_oklab_180deg,oklab(100%_0_0_/_11%)_0%,oklab(100%_0_0_/_0%)_0%,oklab(0%_0_0_/_0%)_100%)]",
420
+ "hover:bg-[oklch(0.86_0.15_91.89)]"
421
+ ] }
422
+ },
423
+ {
424
+ theme: "elegant",
425
+ variant: "outline",
426
+ class: { root: [
427
+ "bg-layer-panel text-foreground-strong",
428
+ "[--button-focus-outline:var(--layer-panel)]",
429
+ "shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.05),0_0_0_1px_var(--line-subtle)]",
430
+ "before:bg-[linear-gradient(in_oklab_180deg,oklab(0%_0_0_/_0%)_30%,oklab(0%_0_0_/_1%)_100%)]",
431
+ "hover:bg-layer-muted"
432
+ ] }
433
+ },
434
+ {
435
+ theme: "elegant",
436
+ variant: "ghost",
437
+ class: { root: [
438
+ "bg-transparent text-foreground-muted shadow-none",
439
+ "[--button-focus-outline:var(--line-muted)]",
440
+ "before:bg-transparent hover:bg-line-muted"
441
+ ] }
442
+ },
443
+ {
444
+ theme: "elegant",
445
+ variant: "danger-secondary",
446
+ class: { root: [
447
+ "bg-danger-lighter text-danger-base",
448
+ "[--button-focus-outline:var(--state-danger-lighter)]",
449
+ "shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.18),0_0_0_1px_var(--state-danger-light)]",
450
+ "before:bg-[linear-gradient(in_oklab_180deg,oklab(100%_0_0_/_9%)_0%,oklab(0%_0_0_/_1%)_100%)]",
451
+ "hover:bg-danger-light"
452
+ ] }
453
+ },
454
+ {
455
+ theme: "elegant",
456
+ variant: "danger",
457
+ class: { root: [
458
+ "bg-danger-base text-foreground-inverse",
459
+ "[--button-focus-outline:var(--state-danger-base)]",
460
+ "shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.12),0_0_0_1px_var(--state-danger-base)]",
461
+ "before:bg-[linear-gradient(in_oklab_180deg,oklab(100%_0_0_/_10%)_0%,oklab(0%_0_0_/_0%)_100%)]",
462
+ "hover:bg-[oklch(0.56_0.23_26.758)]"
463
+ ] }
464
+ },
465
+ {
466
+ theme: "brutal",
467
+ variant: "danger",
468
+ class: { root: [
469
+ "border-line-strong bg-brutal-red text-black",
470
+ "shadow-sm",
471
+ "hover:border-line-strong hover:bg-brutal-red",
472
+ "hover:-translate-y-px hover:shadow-md",
473
+ "active:not-aria-[haspopup]:translate-x-px active:not-aria-[haspopup]:translate-y-px",
474
+ "active:shadow-xs"
475
+ ] }
476
+ },
477
+ {
478
+ theme: "brutal",
479
+ variant: "danger-secondary",
480
+ class: { root: [
481
+ "border-line-strong bg-danger-lighter text-[color-mix(in_oklab,var(--state-danger-base)_72%,transparent)]",
482
+ "shadow-sm",
483
+ "hover:border-line-strong hover:bg-danger-lighter",
484
+ "hover:-translate-y-px hover:shadow-md",
485
+ "active:not-aria-[haspopup]:translate-x-px active:not-aria-[haspopup]:translate-y-px",
486
+ "active:shadow-xs"
487
+ ] }
488
+ },
489
+ {
490
+ theme: "elegant",
491
+ variant: "danger-outline",
492
+ class: { root: [
493
+ "bg-layer-panel text-danger-base",
494
+ "[--button-focus-outline:var(--layer-panel)]",
495
+ "shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.05),0_0_0_1px_var(--state-danger-light)]",
496
+ "before:bg-[linear-gradient(in_oklab_180deg,oklab(0%_0_0_/_0%)_30%,oklab(0%_0_0_/_1%)_100%)]",
497
+ "hover:bg-danger-lighter"
498
+ ] }
499
+ },
500
+ {
501
+ theme: "elegant",
502
+ variant: "accent",
503
+ class: { root: [
504
+ "bg-accent-400 text-white",
505
+ "[--button-focus-outline:var(--accent-400)]",
506
+ "shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.12),0_0_0_1px_var(--accent-400)]",
507
+ "before:bg-[linear-gradient(in_oklab_180deg,oklab(100%_0_0_/_8%)_0%,oklab(0%_0_0_/_0%)_100%)]",
508
+ "hover:bg-[oklch(0.72_0.15_0.71)]"
509
+ ] }
510
+ },
511
+ {
512
+ theme: "elegant",
513
+ variant: "warning",
514
+ class: { root: [
515
+ "bg-warning-base text-foreground-inverse",
516
+ "[--button-focus-outline:var(--state-warning-base)]",
517
+ "shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.14),0_0_0_1px_var(--state-warning-base)]",
518
+ "before:bg-[linear-gradient(in_oklab_180deg,oklab(100%_0_0_/_10%)_0%,oklab(0%_0_0_/_0%)_100%)]",
519
+ "hover:bg-[oklch(0.65_0.19_44.441)]"
520
+ ] }
521
+ },
522
+ {
523
+ theme: "elegant",
524
+ variant: "link",
525
+ class: { root: [
526
+ "bg-transparent text-foreground-muted shadow-none",
527
+ "[--button-focus-outline:transparent]",
528
+ "before:bg-transparent hover:bg-transparent hover:text-foreground-muted"
529
+ ] }
530
+ },
531
+ {
532
+ theme: "elegant",
533
+ variant: "information",
534
+ class: { root: [
535
+ "bg-info-base text-foreground-inverse",
536
+ "[--button-focus-outline:var(--state-info-base)]",
537
+ "shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.12),0_0_0_1px_var(--state-info-base)]",
538
+ "before:bg-[linear-gradient(in_oklab_180deg,oklab(100%_0_0_/_8%)_0%,oklab(0%_0_0_/_0%)_100%)]",
539
+ "hover:bg-[oklch(0.74_0.13_219.2)]"
540
+ ] }
541
+ },
542
+ {
543
+ theme: "elegant",
544
+ variant: "muted",
545
+ class: { root: [
546
+ "bg-layer-muted text-foreground-placeholder",
547
+ "[--button-focus-outline:var(--layer-muted)]",
548
+ "shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.05),0_0_0_1px_var(--line-subtle)]",
549
+ "before:bg-[linear-gradient(in_oklab_180deg,oklab(100%_0_0_/_5%)_0%,oklab(0%_0_0_/_1%)_100%)]",
550
+ "hover:bg-line-subtle"
551
+ ] }
552
+ },
553
+ {
554
+ theme: "brutal",
555
+ variant: [
556
+ "primary",
557
+ "default",
558
+ "information",
559
+ "muted",
560
+ "accent",
561
+ "warning",
562
+ "outline"
563
+ ],
564
+ class: { root: [
565
+ "hover:-translate-y-px hover:shadow-md",
566
+ "active:not-aria-[haspopup]:translate-x-px active:not-aria-[haspopup]:translate-y-px",
567
+ "active:shadow-xs"
568
+ ] }
569
+ }
570
+ ]
571
+ });
572
+ function defaultNativeButton(render) {
573
+ if (!render || typeof render !== "object" || !("type" in render)) return;
574
+ const element = render;
575
+ if (typeof element.type === "string") return element.type === "button";
576
+ }
577
+ function Button({ variant, size, loading = false, loadingLabel = "Loading", disabled, className, children, render, nativeButton, ...props }) {
578
+ const { root, content, loadingIndicator } = buttonVariants({
579
+ theme: useThemeFamily(),
580
+ variant,
581
+ size
582
+ });
583
+ return /* @__PURE__ */ jsxs(Button$1, {
584
+ ...props,
585
+ render,
586
+ nativeButton: nativeButton ?? defaultNativeButton(render),
587
+ "data-slot": "button",
588
+ className: root({ className }),
589
+ "data-loading": loading ? "true" : void 0,
590
+ disabled: disabled || loading,
591
+ "aria-disabled": loading || void 0,
592
+ children: [loading ? /* @__PURE__ */ jsx("span", {
593
+ "data-slot": "button-loading-indicator",
594
+ className: loadingIndicator(),
595
+ children: /* @__PURE__ */ jsx(Spinner, { "aria-label": loadingLabel })
596
+ }) : null, /* @__PURE__ */ jsx("span", {
597
+ "data-slot": "button-content",
598
+ "data-loading": loading ? "true" : void 0,
599
+ className: content(),
600
+ children
601
+ })]
602
+ });
603
+ }
604
+ //#endregion
605
+ //#region src/components/checkbox/checkbox-indicator.tsx
606
+ const checkboxIndicator = tv({
607
+ slots: { root: [
608
+ "inline-flex shrink-0 items-center justify-center",
609
+ "transition-colors",
610
+ "[&_svg]:shrink-0"
611
+ ] },
612
+ variants: {
613
+ theme: {
614
+ brutal: { root: ["border-2 border-line-strong"] },
615
+ elegant: {}
616
+ },
617
+ shape: {
618
+ square: { root: "" },
619
+ circle: { root: "rounded-full" }
620
+ },
621
+ size: {
622
+ sm: { root: ["size-3.5", "[&_svg:not([class*='size-'])]:size-2.5 [&_svg]:[stroke-width:4]"] },
623
+ md: { root: ["size-4", "[&_svg:not([class*='size-'])]:size-3 [&_svg]:[stroke-width:4]"] },
624
+ lg: { root: ["size-5", "[&_svg:not([class*='size-'])]:size-[13px] [&_svg]:[stroke-width:3]"] }
625
+ },
626
+ fill: {
627
+ black: { root: "" },
628
+ yellow: { root: "" }
629
+ },
630
+ checked: {
631
+ true: { root: "" },
632
+ false: { root: "bg-layer-panel text-transparent" }
633
+ },
634
+ disabled: {
635
+ true: { root: "opacity-50" },
636
+ false: { root: "" }
637
+ },
638
+ previewOnHover: {
639
+ true: { root: "" },
640
+ false: { root: "" }
641
+ }
642
+ },
643
+ compoundVariants: [
644
+ {
645
+ checked: true,
646
+ fill: "black",
647
+ class: { root: "bg-line-strong text-foreground-inverse" }
648
+ },
649
+ {
650
+ checked: true,
651
+ fill: "yellow",
652
+ class: { root: "bg-primary-400 text-foreground-strong" }
653
+ },
654
+ {
655
+ checked: false,
656
+ previewOnHover: true,
657
+ class: { root: "group-hover:text-foreground/20" }
658
+ }
659
+ ],
660
+ defaultVariants: {
661
+ shape: "square",
662
+ size: "sm",
663
+ fill: "black",
664
+ disabled: false,
665
+ previewOnHover: false
666
+ }
667
+ });
668
+ function CheckboxIndicator({ checked, mark = "check", shape, size, fill, disabled, previewOnHover, className, ...props }) {
669
+ const { root } = checkboxIndicator({
670
+ theme: useThemeFamily(),
671
+ shape,
672
+ size,
673
+ fill,
674
+ checked,
675
+ disabled,
676
+ previewOnHover
677
+ });
678
+ const Icon = mark === "minus" ? Minus : Check;
679
+ return /* @__PURE__ */ jsx("span", {
680
+ ...props,
681
+ "data-slot": "checkbox-indicator-graphic",
682
+ "aria-hidden": true,
683
+ className: root({ className }),
684
+ children: (checked || previewOnHover) && /* @__PURE__ */ jsx(Icon, {})
685
+ });
686
+ }
687
+ //#endregion
688
+ //#region src/components/checkbox/checkbox.tsx
689
+ const checkbox = tv({
690
+ slots: {
691
+ root: [
692
+ "relative inline-flex shrink-0 touch-manipulation items-center justify-center outline-none",
693
+ "focus-visible:ring-2 focus-visible:ring-line-focus",
694
+ "data-disabled:cursor-not-allowed",
695
+ "after:absolute after:-inset-x-3 after:-inset-y-2 after:content-['']"
696
+ ],
697
+ indicator: ["pointer-events-none"],
698
+ graphic: ["pointer-events-none"],
699
+ outerRect: ["transition-[fill,stroke] duration-[160ms] ease-out motion-reduce:transition-none"],
700
+ overlayRect: [
701
+ "pointer-events-none opacity-0 transition-opacity duration-[160ms] ease-out motion-reduce:transition-none",
702
+ "group-data-[disabled]/checkbox:opacity-0",
703
+ "group-hover/checkbox:group-data-[disabled]/checkbox:opacity-0 group-focus-visible/checkbox:group-data-[disabled]/checkbox:opacity-0"
704
+ ],
705
+ mark: ["absolute left-1/2 top-1/2 shrink-0 origin-center -translate-x-1/2 -translate-y-1/2"],
706
+ checkMark: [
707
+ "-rotate-6 scale-[0.82] opacity-0",
708
+ "transition-[opacity,transform] duration-[180ms] ease-out motion-reduce:transition-none",
709
+ "motion-reduce:rotate-0 motion-reduce:scale-100"
710
+ ],
711
+ indeterminateMark: [
712
+ "invisible scale-x-50 opacity-0",
713
+ "transition-[opacity,transform] duration-[160ms] ease-out motion-reduce:transition-none",
714
+ "motion-reduce:scale-x-100"
715
+ ]
716
+ },
717
+ variants: {
718
+ theme: {
719
+ brutal: {},
720
+ elegant: {
721
+ root: [
722
+ "group/checkbox rounded-[3px] focus:outline-none",
723
+ "shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.05),0_2px_2px_-1px_oklch(0_0_0_/_0.04),0_4px_4px_-2px_oklch(0_0_0_/_0.02),0_0_0_1px_var(--line-subtle)]",
724
+ "transition-[box-shadow,transform] duration-100 ease-out motion-reduce:transition-none",
725
+ "active:scale-[0.96] data-[disabled]:active:scale-100 motion-reduce:active:scale-100"
726
+ ],
727
+ graphic: ["absolute inset-0 size-full"]
728
+ }
729
+ },
730
+ variant: {
731
+ default: {},
732
+ primary: {}
733
+ },
734
+ color: {
735
+ default: {},
736
+ primary: {}
737
+ },
738
+ size: {
739
+ sm: { root: "size-3.5" },
740
+ md: { root: "size-4" }
741
+ }
742
+ },
743
+ compoundVariants: [
744
+ {
745
+ theme: "elegant",
746
+ size: "sm",
747
+ class: { root: "size-4" }
748
+ },
749
+ {
750
+ theme: "elegant",
751
+ size: "md",
752
+ class: { root: "size-[18px]" }
753
+ },
754
+ {
755
+ theme: "elegant",
756
+ variant: "default",
757
+ color: "default",
758
+ class: {
759
+ root: [
760
+ "data-[checked]:shadow-[0_2px_2px_-1px_oklch(0_0_0_/_0.04),0_4px_4px_-2px_oklch(0_0_0_/_0.02)]",
761
+ "data-[indeterminate]:shadow-[0_2px_2px_-1px_oklch(0_0_0_/_0.04),0_4px_4px_-2px_oklch(0_0_0_/_0.02)]",
762
+ "data-[disabled]:shadow-[0_1px_1px_-1px_oklch(0_0_0_/_0.02),0_0_0_1px_var(--line-subtle)]",
763
+ "data-[checked]:data-[disabled]:shadow-[0_1px_1px_-1px_oklch(0_0_0_/_0.02),0_0_0_1px_var(--line-subtle)]",
764
+ "data-[indeterminate]:data-[disabled]:shadow-[0_1px_1px_-1px_oklch(0_0_0_/_0.02),0_0_0_1px_var(--line-subtle)]"
765
+ ],
766
+ outerRect: [
767
+ "fill-layer-panel",
768
+ "stroke-transparent",
769
+ "group-hover/checkbox:fill-[oklch(0.976_0.001_286)]",
770
+ "group-focus-visible/checkbox:fill-foreground-strong",
771
+ "group-hover/checkbox:group-data-[checked]/checkbox:fill-[oklch(0.38_0.006_285)]",
772
+ "group-hover/checkbox:group-data-[indeterminate]/checkbox:fill-[oklch(0.38_0.006_285)]",
773
+ "group-focus-visible/checkbox:group-data-[checked]/checkbox:fill-foreground-strong",
774
+ "group-focus-visible/checkbox:group-data-[indeterminate]/checkbox:fill-foreground-strong",
775
+ "group-data-[checked]/checkbox:fill-foreground-strong",
776
+ "group-data-[indeterminate]/checkbox:fill-foreground-strong",
777
+ "group-data-[disabled]/checkbox:fill-layer-muted",
778
+ "group-data-[checked]/checkbox:group-data-[disabled]/checkbox:fill-layer-muted",
779
+ "group-data-[indeterminate]/checkbox:group-data-[disabled]/checkbox:fill-layer-muted",
780
+ "group-hover/checkbox:group-data-[checked]/checkbox:group-data-[disabled]/checkbox:fill-layer-muted",
781
+ "group-hover/checkbox:group-data-[indeterminate]/checkbox:group-data-[disabled]/checkbox:fill-layer-muted",
782
+ "group-focus-visible/checkbox:group-data-[checked]/checkbox:group-data-[disabled]/checkbox:fill-layer-muted",
783
+ "group-focus-visible/checkbox:group-data-[indeterminate]/checkbox:group-data-[disabled]/checkbox:fill-layer-muted"
784
+ ],
785
+ mark: ["text-foreground-inverse group-data-[disabled]/checkbox:text-line"]
786
+ }
787
+ },
788
+ {
789
+ theme: "elegant",
790
+ variant: "primary",
791
+ class: {
792
+ root: [
793
+ "data-[checked]:shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.2),0_1px_1px_-0.5px_oklch(0.85_0.162_91.89_/_0.1),0_2px_2px_-1px_oklch(0.85_0.162_91.89_/_0.06),0_0_0_1px_oklch(0.83_0.14_91.89_/_0.7)]",
794
+ "data-[indeterminate]:shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.2),0_1px_1px_-0.5px_oklch(0.85_0.162_91.89_/_0.1),0_2px_2px_-1px_oklch(0.85_0.162_91.89_/_0.06),0_0_0_1px_oklch(0.83_0.14_91.89_/_0.7)]",
795
+ "data-[disabled]:shadow-[0_1px_1px_-1px_oklch(0_0_0_/_0.02),0_0_0_1px_var(--line-subtle)]",
796
+ "data-[checked]:data-[disabled]:shadow-[0_1px_1px_-1px_oklch(0_0_0_/_0.02),0_0_0_1px_var(--line-subtle)]",
797
+ "data-[indeterminate]:data-[disabled]:shadow-[0_1px_1px_-1px_oklch(0_0_0_/_0.02),0_0_0_1px_var(--line-subtle)]"
798
+ ],
799
+ outerRect: [
800
+ "fill-layer-panel",
801
+ "stroke-transparent",
802
+ "group-hover/checkbox:fill-[oklch(0.976_0.001_286)]",
803
+ "group-focus-visible/checkbox:fill-primary-400",
804
+ "group-hover/checkbox:group-data-[checked]/checkbox:fill-[oklch(0.86_0.15_91.89)]",
805
+ "group-hover/checkbox:group-data-[indeterminate]/checkbox:fill-[oklch(0.86_0.15_91.89)]",
806
+ "group-focus-visible/checkbox:group-data-[checked]/checkbox:fill-primary-400",
807
+ "group-focus-visible/checkbox:group-data-[indeterminate]/checkbox:fill-primary-400",
808
+ "group-data-[checked]/checkbox:fill-primary-400",
809
+ "group-data-[indeterminate]/checkbox:fill-primary-400",
810
+ "group-data-[disabled]/checkbox:fill-layer-muted",
811
+ "group-data-[checked]/checkbox:group-data-[disabled]/checkbox:fill-layer-muted",
812
+ "group-data-[indeterminate]/checkbox:group-data-[disabled]/checkbox:fill-layer-muted",
813
+ "group-hover/checkbox:group-data-[checked]/checkbox:group-data-[disabled]/checkbox:fill-layer-muted",
814
+ "group-hover/checkbox:group-data-[indeterminate]/checkbox:group-data-[disabled]/checkbox:fill-layer-muted",
815
+ "group-focus-visible/checkbox:group-data-[checked]/checkbox:group-data-[disabled]/checkbox:fill-layer-muted",
816
+ "group-focus-visible/checkbox:group-data-[indeterminate]/checkbox:group-data-[disabled]/checkbox:fill-layer-muted"
817
+ ],
818
+ overlayRect: ["group-hover/checkbox:group-data-[checked]/checkbox:opacity-100 group-focus-visible/checkbox:group-data-[checked]/checkbox:opacity-100", "group-hover/checkbox:group-data-[indeterminate]/checkbox:opacity-100 group-focus-visible/checkbox:group-data-[indeterminate]/checkbox:opacity-100"],
819
+ mark: ["text-primary-950 group-data-[disabled]/checkbox:text-line"]
820
+ }
821
+ },
822
+ {
823
+ theme: "elegant",
824
+ variant: "default",
825
+ color: "primary",
826
+ class: {
827
+ root: [
828
+ "data-[checked]:shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.2),0_1px_1px_-0.5px_oklch(0.85_0.162_91.89_/_0.1),0_2px_2px_-1px_oklch(0.85_0.162_91.89_/_0.06),0_0_0_1px_oklch(0.83_0.14_91.89_/_0.7)]",
829
+ "data-[indeterminate]:shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.2),0_1px_1px_-0.5px_oklch(0.85_0.162_91.89_/_0.1),0_2px_2px_-1px_oklch(0.85_0.162_91.89_/_0.06),0_0_0_1px_oklch(0.83_0.14_91.89_/_0.7)]",
830
+ "data-[disabled]:shadow-[0_1px_1px_-1px_oklch(0_0_0_/_0.02),0_0_0_1px_var(--line-subtle)]",
831
+ "data-[checked]:data-[disabled]:shadow-[0_1px_1px_-1px_oklch(0_0_0_/_0.02),0_0_0_1px_var(--line-subtle)]",
832
+ "data-[indeterminate]:data-[disabled]:shadow-[0_1px_1px_-1px_oklch(0_0_0_/_0.02),0_0_0_1px_var(--line-subtle)]"
833
+ ],
834
+ outerRect: [
835
+ "fill-layer-panel",
836
+ "stroke-transparent",
837
+ "group-hover/checkbox:fill-[oklch(0.976_0.001_286)]",
838
+ "group-focus-visible/checkbox:fill-primary-400",
839
+ "group-hover/checkbox:group-data-[checked]/checkbox:fill-[oklch(0.86_0.15_91.89)]",
840
+ "group-hover/checkbox:group-data-[indeterminate]/checkbox:fill-[oklch(0.86_0.15_91.89)]",
841
+ "group-focus-visible/checkbox:group-data-[checked]/checkbox:fill-primary-400",
842
+ "group-focus-visible/checkbox:group-data-[indeterminate]/checkbox:fill-primary-400",
843
+ "group-data-[checked]/checkbox:fill-primary-400",
844
+ "group-data-[indeterminate]/checkbox:fill-primary-400",
845
+ "group-data-[disabled]/checkbox:fill-layer-muted",
846
+ "group-data-[checked]/checkbox:group-data-[disabled]/checkbox:fill-layer-muted",
847
+ "group-data-[indeterminate]/checkbox:group-data-[disabled]/checkbox:fill-layer-muted",
848
+ "group-hover/checkbox:group-data-[checked]/checkbox:group-data-[disabled]/checkbox:fill-layer-muted",
849
+ "group-hover/checkbox:group-data-[indeterminate]/checkbox:group-data-[disabled]/checkbox:fill-layer-muted",
850
+ "group-focus-visible/checkbox:group-data-[checked]/checkbox:group-data-[disabled]/checkbox:fill-layer-muted",
851
+ "group-focus-visible/checkbox:group-data-[indeterminate]/checkbox:group-data-[disabled]/checkbox:fill-layer-muted"
852
+ ],
853
+ overlayRect: ["group-hover/checkbox:group-data-[checked]/checkbox:opacity-100 group-focus-visible/checkbox:group-data-[checked]/checkbox:opacity-100", "group-hover/checkbox:group-data-[indeterminate]/checkbox:opacity-100 group-focus-visible/checkbox:group-data-[indeterminate]/checkbox:opacity-100"],
854
+ mark: ["text-primary-950 group-data-[disabled]/checkbox:text-line"]
855
+ }
856
+ }
857
+ ],
858
+ defaultVariants: {
859
+ color: "default",
860
+ size: "sm",
861
+ variant: "default"
862
+ }
863
+ });
864
+ function CheckboxCheckIcon({ className }) {
865
+ return /* @__PURE__ */ jsx("svg", {
866
+ width: "10",
867
+ height: "8",
868
+ viewBox: "0 0 10 8",
869
+ fill: "none",
870
+ xmlns: "http://www.w3.org/2000/svg",
871
+ "aria-hidden": true,
872
+ className,
873
+ children: /* @__PURE__ */ jsx("path", {
874
+ d: "M1 3.5L4 6.5L9 1.5",
875
+ stroke: "currentColor",
876
+ strokeWidth: "1",
877
+ strokeLinecap: "round",
878
+ strokeLinejoin: "round"
879
+ })
880
+ });
881
+ }
882
+ function CheckboxIndeterminateIcon({ className }) {
883
+ return /* @__PURE__ */ jsx("svg", {
884
+ width: "8",
885
+ height: "2",
886
+ viewBox: "0 0 8 2",
887
+ fill: "none",
888
+ xmlns: "http://www.w3.org/2000/svg",
889
+ "aria-hidden": true,
890
+ className,
891
+ children: /* @__PURE__ */ jsx("path", {
892
+ d: "M0 1H8",
893
+ stroke: "currentColor",
894
+ strokeWidth: "1",
895
+ strokeLinecap: "round"
896
+ })
897
+ });
898
+ }
899
+ function ElegantCheckboxGraphic({ classNames }) {
900
+ const gradientId = `checkbox-hover-${useId().replace(/:/g, "")}`;
901
+ return /* @__PURE__ */ jsxs("svg", {
902
+ width: "16",
903
+ height: "16",
904
+ viewBox: "0 0 16 16",
905
+ fill: "none",
906
+ xmlns: "http://www.w3.org/2000/svg",
907
+ "aria-hidden": true,
908
+ className: classNames.graphic,
909
+ children: [
910
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("linearGradient", {
911
+ id: gradientId,
912
+ x1: "0",
913
+ y1: "0",
914
+ x2: "0",
915
+ y2: "1",
916
+ children: [/* @__PURE__ */ jsx("stop", {
917
+ offset: "0%",
918
+ stopColor: "oklab(100% 0 0 / 14%)"
919
+ }), /* @__PURE__ */ jsx("stop", {
920
+ offset: "100%",
921
+ stopColor: "oklab(0% 0 0 / 3%)"
922
+ })]
923
+ }) }),
924
+ /* @__PURE__ */ jsx("rect", {
925
+ width: "16",
926
+ height: "16",
927
+ rx: "3",
928
+ className: classNames.outerRect
929
+ }),
930
+ /* @__PURE__ */ jsx("rect", {
931
+ width: "16",
932
+ height: "16",
933
+ rx: "3",
934
+ fill: `url(#${gradientId})`,
935
+ className: classNames.overlayRect
936
+ })
937
+ ]
938
+ });
939
+ }
940
+ function Checkbox({ size, color = "default", variant = "default", className, ...props }) {
941
+ const theme = useThemeFamily();
942
+ const { root, indicator, graphic, outerRect, overlayRect, mark, checkMark, indeterminateMark } = checkbox({
943
+ theme,
944
+ size,
945
+ color,
946
+ variant
947
+ });
948
+ if (theme === "elegant") return /* @__PURE__ */ jsxs(Checkbox$1.Root, {
949
+ "data-slot": "checkbox",
950
+ className: root({ className }),
951
+ ...props,
952
+ children: [/* @__PURE__ */ jsx(ElegantCheckboxGraphic, { classNames: {
953
+ graphic: graphic(),
954
+ outerRect: outerRect(),
955
+ overlayRect: overlayRect()
956
+ } }), /* @__PURE__ */ jsx(Checkbox$1.Indicator, {
957
+ keepMounted: true,
958
+ "data-slot": "checkbox-indicator",
959
+ className: indicator(),
960
+ render: (indicatorProps, state) => /* @__PURE__ */ jsxs("span", {
961
+ ...indicatorProps,
962
+ className: indicator({ className: indicatorProps.className }),
963
+ children: [/* @__PURE__ */ jsx(CheckboxCheckIcon, { className: mark({ className: checkMark({ className: state.checked && !state.indeterminate ? "rotate-0 scale-100 opacity-100" : "" }) }) }), /* @__PURE__ */ jsx(CheckboxIndeterminateIcon, { className: mark({ className: indeterminateMark({ className: state.indeterminate ? "visible scale-x-100 opacity-100" : "" }) }) })]
964
+ })
965
+ })]
966
+ });
967
+ return /* @__PURE__ */ jsx(Checkbox$1.Root, {
968
+ "data-slot": "checkbox",
969
+ className: root({ className }),
970
+ ...props,
971
+ children: /* @__PURE__ */ jsx(Checkbox$1.Indicator, {
972
+ keepMounted: true,
973
+ "data-slot": "checkbox-indicator",
974
+ className: indicator(),
975
+ render: (indicatorProps, state) => /* @__PURE__ */ jsx(CheckboxIndicator, {
976
+ ...indicatorProps,
977
+ checked: state.checked || state.indeterminate,
978
+ disabled: state.disabled,
979
+ mark: state.indeterminate ? "minus" : "check",
980
+ size,
981
+ fill: variant === "primary" || color === "primary" ? "yellow" : "black"
982
+ })
983
+ })
984
+ });
985
+ }
986
+ //#endregion
987
+ //#region src/components/kbd/kbd.tsx
988
+ const kbd = tv({
989
+ slots: {
990
+ root: [
991
+ "pointer-events-none inline-flex w-fit shrink-0 items-center justify-center gap-1",
992
+ "whitespace-nowrap font-sans text-sm font-medium leading-none select-none",
993
+ "[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-3"
994
+ ],
995
+ group: ["inline-flex items-center gap-1"]
996
+ },
997
+ variants: { theme: {
998
+ brutal: { root: ["text-[13px] text-foreground/70"] },
999
+ elegant: { root: ["min-w-5 rounded bg-layer-panel px-1.5 py-1 text-[10px]", "font-medium text-foreground-muted ring-1 ring-inset ring-line-muted"] }
1000
+ } }
1001
+ });
1002
+ function Kbd({ className, ...props }) {
1003
+ const { root } = kbd({ theme: useThemeFamily() });
1004
+ return /* @__PURE__ */ jsx("kbd", {
1005
+ "data-slot": "kbd",
1006
+ className: root({ className }),
1007
+ ...props
1008
+ });
1009
+ }
1010
+ function KbdGroup({ className, ...props }) {
1011
+ const { group } = kbd({ theme: useThemeFamily() });
1012
+ return /* @__PURE__ */ jsx("span", {
1013
+ "data-slot": "kbd-group",
1014
+ className: group({ className }),
1015
+ ...props
1016
+ });
1017
+ }
1018
+ //#endregion
1019
+ //#region src/components/context-menu/context-menu.tsx
1020
+ const contextMenu = tv({
1021
+ slots: {
1022
+ trigger: ["select-none"],
1023
+ positioner: ["isolate z-50 outline-none"],
1024
+ content: ["max-h-[var(--available-height)] min-w-48 overflow-hidden bg-layer-panel", "outline-none"],
1025
+ item: ["flex w-full cursor-default select-none items-center gap-2 px-3 py-2 [@media(max-height:600px)]:py-1", "text-left text-sm outline-none transition-colors"],
1026
+ radioItem: ["flex w-full cursor-default select-none items-center gap-2 px-3", "text-left outline-none transition-colors"],
1027
+ submenuTrigger: ["flex w-full cursor-default select-none items-center gap-2 px-3 py-2 [@media(max-height:600px)]:py-1", "text-left text-sm outline-none transition-colors"],
1028
+ label: [],
1029
+ shortcut: ["ml-auto"],
1030
+ separator: ["border-t-2"],
1031
+ indicator: ["pointer-events-none ml-auto flex size-3 shrink-0 items-center justify-center"]
1032
+ },
1033
+ variants: { theme: {
1034
+ brutal: {
1035
+ content: ["border-2 border-black bg-white shadow-lg"],
1036
+ item: [
1037
+ "py-1.5 font-sans text-sm font-semibold leading-6 text-black hover:bg-brutal-yellow/30 data-[highlighted]:bg-brutal-yellow/30",
1038
+ "data-[disabled]:pointer-events-none data-[disabled]:text-black/30",
1039
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:stroke-2 [&_svg_*]:stroke-2 [&_svg:not([class*='size-'])]:size-3.5"
1040
+ ],
1041
+ radioItem: [
1042
+ "h-9 overflow-hidden font-sans text-sm font-semibold leading-6 text-black",
1043
+ "border-b border-black/10 last:border-b-0",
1044
+ "hover:bg-brutal-yellow/30 data-[highlighted]:bg-brutal-yellow/30",
1045
+ "data-[disabled]:pointer-events-none data-[disabled]:text-black/30",
1046
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:stroke-2 [&_svg_*]:stroke-2 [&_svg:not([class*='size-'])]:size-3.5"
1047
+ ],
1048
+ submenuTrigger: [
1049
+ "py-1.5 font-sans text-sm font-semibold leading-6 text-black hover:bg-brutal-yellow/30 data-[highlighted]:bg-brutal-yellow/30 data-[popup-open]:bg-brutal-yellow/30",
1050
+ "data-[disabled]:pointer-events-none data-[disabled]:text-black/30",
1051
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:stroke-2 [&_svg_*]:stroke-2 [&_svg:not([class*='size-'])]:size-3.5"
1052
+ ],
1053
+ label: ["border-b border-black px-3 py-2", "font-sans text-[10px] font-bold uppercase leading-none tracking-wide text-black/60"],
1054
+ shortcut: ["font-sans text-sm font-semibold leading-6"],
1055
+ separator: ["border-black"],
1056
+ indicator: []
1057
+ },
1058
+ elegant: {
1059
+ content: [
1060
+ "gap-0.5 rounded-md bg-layer-popover p-1",
1061
+ "shadow-lg outline-none",
1062
+ "flex flex-col"
1063
+ ],
1064
+ item: [
1065
+ "gap-2.5 rounded-sm px-3 py-2 text-[13px] font-medium tracking-[-0.005em]",
1066
+ "text-foreground-muted",
1067
+ "transition-[background-color,color] duration-150",
1068
+ "hover:bg-foreground/[0.04] hover:text-foreground-strong",
1069
+ "data-[highlighted]:bg-foreground/[0.04] data-[highlighted]:text-foreground-strong",
1070
+ "data-[disabled]:pointer-events-none data-[disabled]:text-foreground-disabled",
1071
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:stroke-[1.5] [&_svg_*]:stroke-[1.5] [&>svg]:size-4",
1072
+ "[&>svg:last-child]:size-3",
1073
+ "[&>svg]:text-foreground-muted",
1074
+ "hover:[&>svg]:text-foreground-strong",
1075
+ "data-[highlighted]:[&>svg]:text-foreground-strong"
1076
+ ],
1077
+ radioItem: [
1078
+ "gap-2.5 rounded-sm px-3 py-2 text-[13px] font-medium tracking-[-0.005em]",
1079
+ "text-foreground-muted",
1080
+ "transition-[background-color,color] duration-150",
1081
+ "hover:bg-foreground/[0.04] hover:text-foreground-strong",
1082
+ "data-[highlighted]:bg-foreground/[0.04] data-[highlighted]:text-foreground-strong",
1083
+ "data-[disabled]:pointer-events-none data-[disabled]:text-foreground-disabled",
1084
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:stroke-[1.5] [&_svg_*]:stroke-[1.5] [&>svg]:size-4",
1085
+ "[&>svg:last-child]:size-3",
1086
+ "[&>svg]:text-foreground-muted",
1087
+ "hover:[&>svg]:text-foreground-strong",
1088
+ "data-[highlighted]:[&>svg]:text-foreground-strong"
1089
+ ],
1090
+ submenuTrigger: [
1091
+ "gap-2.5 rounded-sm px-3 py-2 text-[13px] font-medium tracking-[-0.005em]",
1092
+ "text-foreground-muted",
1093
+ "transition-[background-color,color] duration-150",
1094
+ "hover:bg-foreground/[0.04] hover:text-foreground-strong",
1095
+ "data-[highlighted]:bg-foreground/[0.04] data-[highlighted]:text-foreground-strong",
1096
+ "data-[popup-open]:bg-foreground/[0.04] data-[popup-open]:text-foreground-strong",
1097
+ "data-[disabled]:pointer-events-none data-[disabled]:text-foreground-disabled",
1098
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:stroke-[1.5] [&_svg_*]:stroke-[1.5] [&>svg]:size-4",
1099
+ "[&>svg:last-child]:size-3",
1100
+ "[&>svg]:text-foreground-muted",
1101
+ "hover:[&>svg]:text-foreground-strong",
1102
+ "data-[highlighted]:[&>svg]:text-foreground-strong",
1103
+ "data-[popup-open]:[&>svg]:text-foreground-strong"
1104
+ ],
1105
+ label: ["-mx-1 border-b border-line-muted px-3 py-2", "text-[11px] font-medium leading-none tracking-[-0.005em] text-foreground/45"],
1106
+ shortcut: ["text-foreground-muted"],
1107
+ separator: ["my-1 -mx-1 h-px border-0 bg-line-muted"],
1108
+ indicator: []
1109
+ }
1110
+ } }
1111
+ });
1112
+ function ContextMenu(props) {
1113
+ return /* @__PURE__ */ jsx(ContextMenu$1.Root, {
1114
+ "data-slot": "context-menu",
1115
+ ...props
1116
+ });
1117
+ }
1118
+ function ContextMenuSubmenu(props) {
1119
+ return /* @__PURE__ */ jsx(ContextMenu$1.SubmenuRoot, {
1120
+ "data-slot": "context-menu-submenu",
1121
+ ...props
1122
+ });
1123
+ }
1124
+ function ContextMenuTrigger({ className, ...props }) {
1125
+ const { trigger } = contextMenu({ theme: useThemeFamily() });
1126
+ return /* @__PURE__ */ jsx(ContextMenu$1.Trigger, {
1127
+ "data-slot": "context-menu-trigger",
1128
+ className: trigger({ className }),
1129
+ ...props
1130
+ });
1131
+ }
1132
+ function ContextMenuPortal(props) {
1133
+ return /* @__PURE__ */ jsx(ContextMenu$1.Portal, {
1134
+ "data-slot": "context-menu-portal",
1135
+ ...props
1136
+ });
1137
+ }
1138
+ function ContextMenuContent({ align = "start", alignOffset = 0, anchor, arrowPadding, collisionAvoidance = {
1139
+ side: "none",
1140
+ align: "none",
1141
+ fallbackAxisSide: "none"
1142
+ }, collisionBoundary, collisionPadding, disableAnchorTracking = true, positionMethod = "fixed", side = "right", sideOffset = 0, sticky, portalProps, className, ...props }) {
1143
+ const { positioner, content } = contextMenu({ theme: useThemeFamily() });
1144
+ return /* @__PURE__ */ jsx(ContextMenu$1.Portal, {
1145
+ ...portalProps,
1146
+ children: /* @__PURE__ */ jsx(ContextMenu$1.Positioner, {
1147
+ align,
1148
+ alignOffset,
1149
+ anchor,
1150
+ arrowPadding,
1151
+ collisionAvoidance,
1152
+ collisionBoundary,
1153
+ collisionPadding,
1154
+ disableAnchorTracking,
1155
+ positionMethod,
1156
+ side,
1157
+ sideOffset,
1158
+ sticky,
1159
+ className: positioner(),
1160
+ children: /* @__PURE__ */ jsx(ContextMenu$1.Popup, {
1161
+ "data-slot": "context-menu-content",
1162
+ className: content({ className }),
1163
+ ...props
1164
+ })
1165
+ })
1166
+ });
1167
+ }
1168
+ function ContextMenuItem({ className, ...props }) {
1169
+ const { item } = contextMenu({ theme: useThemeFamily() });
1170
+ return /* @__PURE__ */ jsx(ContextMenu$1.Item, {
1171
+ "data-slot": "context-menu-item",
1172
+ className: item({ className }),
1173
+ ...props
1174
+ });
1175
+ }
1176
+ function ContextMenuSubmenuTrigger({ className, ...props }) {
1177
+ const { submenuTrigger } = contextMenu({ theme: useThemeFamily() });
1178
+ return /* @__PURE__ */ jsx(ContextMenu$1.SubmenuTrigger, {
1179
+ "data-slot": "context-menu-submenu-trigger",
1180
+ className: submenuTrigger({ className }),
1181
+ ...props
1182
+ });
1183
+ }
1184
+ function ContextMenuLabel({ className, ...props }) {
1185
+ const { label } = contextMenu({ theme: useThemeFamily() });
1186
+ return /* @__PURE__ */ jsx("div", {
1187
+ "data-slot": "context-menu-label",
1188
+ className: label({ className }),
1189
+ ...props
1190
+ });
1191
+ }
1192
+ function ContextMenuShortcut({ className, ...props }) {
1193
+ const { shortcut } = contextMenu({ theme: useThemeFamily() });
1194
+ return /* @__PURE__ */ jsx(Kbd, {
1195
+ "data-slot": "context-menu-shortcut",
1196
+ className: shortcut({ className }),
1197
+ ...props
1198
+ });
1199
+ }
1200
+ function ContextMenuSeparator({ className, ...props }) {
1201
+ const { separator } = contextMenu({ theme: useThemeFamily() });
1202
+ return /* @__PURE__ */ jsx(ContextMenu$1.Separator, {
1203
+ "data-slot": "context-menu-separator",
1204
+ className: separator({ className }),
1205
+ ...props
1206
+ });
1207
+ }
1208
+ function ContextMenuCheckIcon() {
1209
+ return /* @__PURE__ */ jsx("svg", {
1210
+ width: "12",
1211
+ height: "12",
1212
+ viewBox: "0 0 12 12",
1213
+ "aria-hidden": true,
1214
+ className: "size-3 shrink-0",
1215
+ children: /* @__PURE__ */ jsx("g", {
1216
+ fill: "none",
1217
+ strokeLinecap: "round",
1218
+ strokeLinejoin: "round",
1219
+ strokeWidth: "1",
1220
+ stroke: "currentColor",
1221
+ children: /* @__PURE__ */ jsx("path", { d: "M1.75391 6.41392L4.4001 9.24985L10.2467 2.98532" })
1222
+ })
1223
+ });
1224
+ }
1225
+ function ContextMenuRadioGroup({ ...props }) {
1226
+ return /* @__PURE__ */ jsx(ContextMenu$1.RadioGroup, {
1227
+ "data-slot": "context-menu-radio-group",
1228
+ ...props
1229
+ });
1230
+ }
1231
+ function ContextMenuRadioItem({ className, children, ...props }) {
1232
+ const { radioItem, indicator } = contextMenu({ theme: useThemeFamily() });
1233
+ return /* @__PURE__ */ jsxs(ContextMenu$1.RadioItem, {
1234
+ "data-slot": "context-menu-radio-item",
1235
+ className: radioItem({ className }),
1236
+ ...props,
1237
+ children: [children, /* @__PURE__ */ jsx("span", {
1238
+ className: indicator(),
1239
+ children: /* @__PURE__ */ jsx(ContextMenu$1.RadioItemIndicator, { children: /* @__PURE__ */ jsx(ContextMenuCheckIcon, {}) })
1240
+ })]
1241
+ });
1242
+ }
1243
+ function ContextMenuRadioItemIndicator({ className, ...props }) {
1244
+ return /* @__PURE__ */ jsx(ContextMenu$1.RadioItemIndicator, {
1245
+ "data-slot": "context-menu-radio-item-indicator",
1246
+ className,
1247
+ ...props
1248
+ });
1249
+ }
1250
+ function ContextMenuCheckboxItem({ className, children, ...props }) {
1251
+ const { item, indicator } = contextMenu({ theme: useThemeFamily() });
1252
+ return /* @__PURE__ */ jsxs(ContextMenu$1.CheckboxItem, {
1253
+ "data-slot": "context-menu-checkbox-item",
1254
+ className: item({ className }),
1255
+ ...props,
1256
+ children: [children, /* @__PURE__ */ jsx("span", {
1257
+ className: indicator(),
1258
+ children: /* @__PURE__ */ jsx(ContextMenu$1.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(ContextMenuCheckIcon, {}) })
1259
+ })]
1260
+ });
1261
+ }
1262
+ function ContextMenuCheckboxItemIndicator({ className, ...props }) {
1263
+ return /* @__PURE__ */ jsx(ContextMenu$1.CheckboxItemIndicator, {
1264
+ "data-slot": "context-menu-checkbox-item-indicator",
1265
+ className,
1266
+ ...props
1267
+ });
1268
+ }
1269
+ //#endregion
1270
+ //#region src/components/badge/badge.tsx
1271
+ const badge = tv({
1272
+ slots: { root: [
1273
+ "inline-flex h-5 w-fit shrink-0 min-w-0 max-w-full items-center gap-1 px-1.5",
1274
+ "overflow-hidden whitespace-nowrap",
1275
+ "text-[10px] font-bold leading-none",
1276
+ "[&_[data-slot='spinner']]:!size-3 [&_[data-slot='spinner']]:!text-xs"
1277
+ ] },
1278
+ variants: {
1279
+ theme: {
1280
+ brutal: { root: ["border border-line-strong"] },
1281
+ elegant: { root: [
1282
+ "gap-1.5 rounded-full border border-transparent px-2.5 py-0.5",
1283
+ "[&:has(svg)]:px-2",
1284
+ "[&_svg]:shrink-0 [&_svg]:translate-y-[0.5px]",
1285
+ "text-[11px] font-medium leading-3 tracking-[0.22px]"
1286
+ ] }
1287
+ },
1288
+ appearance: {
1289
+ solid: { root: "" },
1290
+ soft: { root: "" },
1291
+ outline: { root: "" }
1292
+ },
1293
+ variant: {
1294
+ default: { root: "bg-layer-panel text-foreground-strong" },
1295
+ primary: { root: "bg-primary-400 text-primary-950" },
1296
+ information: { root: "bg-info-base text-foreground-inverse" },
1297
+ muted: { root: "bg-secondary-400 text-foreground-strong" },
1298
+ accent: { root: "bg-accent-400 text-accent-950" },
1299
+ success: { root: "bg-success-base text-success-dark" },
1300
+ warning: { root: "bg-warning-base text-foreground-inverse" },
1301
+ danger: { root: "bg-[oklch(0.66_0.19_31)] text-foreground-strong" }
1302
+ },
1303
+ uppercase: {
1304
+ true: { root: "uppercase tracking-wide" },
1305
+ false: { root: "" }
1306
+ }
1307
+ },
1308
+ defaultVariants: {
1309
+ appearance: "solid",
1310
+ variant: "default",
1311
+ uppercase: false
1312
+ },
1313
+ compoundVariants: [
1314
+ {
1315
+ theme: "brutal",
1316
+ appearance: "solid",
1317
+ variant: "success",
1318
+ class: { root: "bg-brutal-lime text-black" }
1319
+ },
1320
+ {
1321
+ theme: "brutal",
1322
+ appearance: "solid",
1323
+ variant: "danger",
1324
+ class: { root: "bg-brutal-red text-black" }
1325
+ },
1326
+ {
1327
+ theme: "brutal",
1328
+ appearance: "solid",
1329
+ variant: "information",
1330
+ class: { root: "bg-info-base text-info-dark" }
1331
+ },
1332
+ {
1333
+ theme: "brutal",
1334
+ appearance: "solid",
1335
+ variant: "warning",
1336
+ class: { root: "bg-warning-base text-black" }
1337
+ },
1338
+ {
1339
+ theme: "brutal",
1340
+ appearance: "soft",
1341
+ variant: "default",
1342
+ class: { root: "bg-layer-muted text-foreground-strong" }
1343
+ },
1344
+ {
1345
+ theme: "brutal",
1346
+ appearance: "soft",
1347
+ variant: "muted",
1348
+ class: { root: "bg-secondary-100 text-secondary-900" }
1349
+ },
1350
+ {
1351
+ theme: "brutal",
1352
+ appearance: "soft",
1353
+ variant: "primary",
1354
+ class: { root: "bg-[oklch(0.958_0.047_86)] text-primary-950" }
1355
+ },
1356
+ {
1357
+ theme: "brutal",
1358
+ appearance: "soft",
1359
+ variant: "information",
1360
+ class: { root: "bg-info-lighter text-info-dark" }
1361
+ },
1362
+ {
1363
+ theme: "brutal",
1364
+ appearance: "soft",
1365
+ variant: "accent",
1366
+ class: { root: "bg-accent-100 text-accent-950" }
1367
+ },
1368
+ {
1369
+ theme: "brutal",
1370
+ appearance: "soft",
1371
+ variant: "success",
1372
+ class: { root: "bg-success-lighter text-success-dark" }
1373
+ },
1374
+ {
1375
+ theme: "brutal",
1376
+ appearance: "soft",
1377
+ variant: "warning",
1378
+ class: { root: "bg-warning-lighter text-warning-dark" }
1379
+ },
1380
+ {
1381
+ theme: "brutal",
1382
+ appearance: "soft",
1383
+ variant: "danger",
1384
+ class: { root: "bg-danger-lighter text-danger-dark" }
1385
+ },
1386
+ {
1387
+ theme: "brutal",
1388
+ appearance: "outline",
1389
+ variant: "default",
1390
+ class: { root: "bg-transparent text-foreground-strong" }
1391
+ },
1392
+ {
1393
+ theme: "brutal",
1394
+ appearance: "outline",
1395
+ variant: "muted",
1396
+ class: { root: "bg-transparent text-secondary-900" }
1397
+ },
1398
+ {
1399
+ theme: "brutal",
1400
+ appearance: "outline",
1401
+ variant: "primary",
1402
+ class: { root: "bg-transparent text-primary-700" }
1403
+ },
1404
+ {
1405
+ theme: "brutal",
1406
+ appearance: "outline",
1407
+ variant: "information",
1408
+ class: { root: "bg-transparent text-info-dark" }
1409
+ },
1410
+ {
1411
+ theme: "brutal",
1412
+ appearance: "outline",
1413
+ variant: "accent",
1414
+ class: { root: "bg-transparent text-accent-700" }
1415
+ },
1416
+ {
1417
+ theme: "brutal",
1418
+ appearance: "outline",
1419
+ variant: "success",
1420
+ class: { root: "bg-transparent text-[oklch(0.48_0.12_153.079)]" }
1421
+ },
1422
+ {
1423
+ theme: "brutal",
1424
+ appearance: "outline",
1425
+ variant: "warning",
1426
+ class: { root: "bg-transparent text-warning-dark" }
1427
+ },
1428
+ {
1429
+ theme: "brutal",
1430
+ appearance: "outline",
1431
+ variant: "danger",
1432
+ class: { root: "bg-transparent text-[oklch(0.54_0.19_31)]" }
1433
+ },
1434
+ {
1435
+ theme: "elegant",
1436
+ appearance: "solid",
1437
+ variant: "default",
1438
+ class: { root: "bg-line-muted text-foreground-muted" }
1439
+ },
1440
+ {
1441
+ theme: "elegant",
1442
+ appearance: "solid",
1443
+ variant: "muted",
1444
+ class: { root: "bg-[oklch(0.46_0.004_286)] text-[oklch(0.94_0.001_286)]" }
1445
+ },
1446
+ {
1447
+ theme: "elegant",
1448
+ appearance: "solid",
1449
+ variant: "primary",
1450
+ class: { root: "bg-primary-400 text-primary-950" }
1451
+ },
1452
+ {
1453
+ theme: "elegant",
1454
+ appearance: "solid",
1455
+ variant: "information",
1456
+ class: { root: "bg-info-base text-foreground-inverse" }
1457
+ },
1458
+ {
1459
+ theme: "elegant",
1460
+ appearance: "solid",
1461
+ variant: "accent",
1462
+ class: { root: "bg-accent-400 text-foreground-inverse" }
1463
+ },
1464
+ {
1465
+ theme: "elegant",
1466
+ appearance: "solid",
1467
+ variant: "success",
1468
+ class: { root: "bg-success-base text-foreground-inverse" }
1469
+ },
1470
+ {
1471
+ theme: "elegant",
1472
+ appearance: "solid",
1473
+ variant: "warning",
1474
+ class: { root: "bg-warning-base text-foreground-inverse" }
1475
+ },
1476
+ {
1477
+ theme: "elegant",
1478
+ appearance: "solid",
1479
+ variant: "danger",
1480
+ class: { root: "bg-[oklch(0.68_0.22_26.758)] text-foreground-inverse" }
1481
+ },
1482
+ {
1483
+ theme: "elegant",
1484
+ appearance: "soft",
1485
+ variant: "default",
1486
+ class: { root: "border-transparent bg-layer-muted text-foreground-strong" }
1487
+ },
1488
+ {
1489
+ theme: "elegant",
1490
+ appearance: "soft",
1491
+ variant: "muted",
1492
+ class: { root: "border-transparent bg-secondary-100 text-secondary-900" }
1493
+ },
1494
+ {
1495
+ theme: "elegant",
1496
+ appearance: "soft",
1497
+ variant: "primary",
1498
+ class: { root: "border-transparent bg-[oklch(0.958_0.047_86)] text-primary-950" }
1499
+ },
1500
+ {
1501
+ theme: "elegant",
1502
+ appearance: "soft",
1503
+ variant: "information",
1504
+ class: { root: "border-transparent bg-info-lighter text-info-dark" }
1505
+ },
1506
+ {
1507
+ theme: "elegant",
1508
+ appearance: "soft",
1509
+ variant: "accent",
1510
+ class: { root: "border-transparent bg-accent-100 text-accent-950" }
1511
+ },
1512
+ {
1513
+ theme: "elegant",
1514
+ appearance: "soft",
1515
+ variant: "success",
1516
+ class: { root: "border-transparent bg-success-lighter text-success-dark" }
1517
+ },
1518
+ {
1519
+ theme: "elegant",
1520
+ appearance: "soft",
1521
+ variant: "warning",
1522
+ class: { root: "border-transparent bg-warning-lighter text-warning-dark" }
1523
+ },
1524
+ {
1525
+ theme: "elegant",
1526
+ appearance: "soft",
1527
+ variant: "danger",
1528
+ class: { root: "border-transparent bg-danger-lighter text-danger-dark" }
1529
+ },
1530
+ {
1531
+ theme: "elegant",
1532
+ appearance: "outline",
1533
+ variant: "default",
1534
+ class: { root: "border-line-subtle bg-transparent text-foreground-strong" }
1535
+ },
1536
+ {
1537
+ theme: "elegant",
1538
+ appearance: "outline",
1539
+ variant: "muted",
1540
+ class: { root: "border-secondary-500 bg-transparent text-secondary-900" }
1541
+ },
1542
+ {
1543
+ theme: "elegant",
1544
+ appearance: "outline",
1545
+ variant: "primary",
1546
+ class: { root: "border-primary-500 bg-transparent text-primary-800" }
1547
+ },
1548
+ {
1549
+ theme: "elegant",
1550
+ appearance: "outline",
1551
+ variant: "information",
1552
+ class: { root: "border-info-base bg-transparent text-[oklch(0.48_0.09_219.2)]" }
1553
+ },
1554
+ {
1555
+ theme: "elegant",
1556
+ appearance: "outline",
1557
+ variant: "accent",
1558
+ class: { root: "border-accent-500 bg-transparent text-accent-800" }
1559
+ },
1560
+ {
1561
+ theme: "elegant",
1562
+ appearance: "outline",
1563
+ variant: "success",
1564
+ class: { root: "border-success-base bg-transparent text-success-dark" }
1565
+ },
1566
+ {
1567
+ theme: "elegant",
1568
+ appearance: "outline",
1569
+ variant: "warning",
1570
+ class: { root: "border-warning-base bg-transparent text-warning-dark" }
1571
+ },
1572
+ {
1573
+ theme: "elegant",
1574
+ appearance: "outline",
1575
+ variant: "danger",
1576
+ class: { root: "border-danger-base bg-transparent text-danger-dark" }
1577
+ }
1578
+ ]
1579
+ });
1580
+ function BadgeRoot({ appearance, variant, uppercase, className, render, ...props }) {
1581
+ const theme = useThemeFamily();
1582
+ const resolvedAppearance = appearance ?? "solid";
1583
+ const resolvedUppercase = uppercase ?? false;
1584
+ const { root } = badge({
1585
+ theme,
1586
+ appearance: resolvedAppearance,
1587
+ variant,
1588
+ uppercase: resolvedUppercase
1589
+ });
1590
+ return useRender({
1591
+ defaultTagName: "span",
1592
+ render,
1593
+ props: mergeProps({ className: root({ className }) }, props),
1594
+ state: {
1595
+ slot: "badge",
1596
+ appearance: resolvedAppearance,
1597
+ variant,
1598
+ uppercase: resolvedUppercase
1599
+ }
1600
+ });
1601
+ }
1602
+ function Experimental(props) {
1603
+ return /* @__PURE__ */ jsx(BadgeRoot, {
1604
+ variant: "success",
1605
+ uppercase: true,
1606
+ ...props,
1607
+ children: "Experimental"
1608
+ });
1609
+ }
1610
+ const Badge = Object.assign(BadgeRoot, { Experimental });
1611
+ //#endregion
1612
+ //#region src/components/dropdown-menu/dropdown-menu.tsx
1613
+ const dropdownMenu = tv({
1614
+ slots: {
1615
+ trigger: ["select-none"],
1616
+ positioner: ["isolate z-50 outline-none"],
1617
+ content: ["max-h-[var(--available-height)] min-w-48 overflow-hidden bg-layer-panel", "outline-none"],
1618
+ item: ["flex w-full cursor-default select-none items-center gap-2 px-3 py-2 [@media(max-height:600px)]:py-1", "text-left text-sm outline-none transition-colors"],
1619
+ radioItem: ["flex w-full cursor-default select-none items-center gap-2 px-3", "text-left outline-none transition-colors"],
1620
+ submenuTrigger: ["flex w-full cursor-default select-none items-center gap-2 px-3 py-2 [@media(max-height:600px)]:py-1", "text-left text-sm outline-none transition-colors"],
1621
+ label: [],
1622
+ shortcut: ["ml-auto"],
1623
+ itemCount: ["ml-auto tabular-nums"],
1624
+ separator: ["border-t-2"],
1625
+ indicator: ["pointer-events-none ml-auto flex size-3 shrink-0 items-center justify-center"]
1626
+ },
1627
+ variants: { theme: {
1628
+ brutal: {
1629
+ trigger: ["data-[popup-open]:translate-x-0 data-[popup-open]:translate-y-0", "data-[popup-open]:hover:translate-x-0 data-[popup-open]:hover:translate-y-0"],
1630
+ content: ["border-2 border-black bg-white shadow-lg"],
1631
+ item: [
1632
+ "py-1.5 font-sans text-sm font-semibold leading-6 text-black hover:bg-brutal-yellow data-[highlighted]:bg-brutal-yellow",
1633
+ "data-[disabled]:pointer-events-none data-[disabled]:text-black/30",
1634
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:stroke-2 [&_svg_*]:stroke-2 [&_svg:not([class*='size-'])]:size-3.5"
1635
+ ],
1636
+ radioItem: [
1637
+ "h-9 overflow-hidden font-sans text-sm font-semibold leading-6 text-black",
1638
+ "border-b border-black/10 last:border-b-0",
1639
+ "hover:bg-brutal-yellow/30 data-[highlighted]:bg-brutal-yellow/30",
1640
+ "data-[disabled]:pointer-events-none data-[disabled]:text-black/30",
1641
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:stroke-2 [&_svg_*]:stroke-2 [&_svg:not([class*='size-'])]:size-3.5"
1642
+ ],
1643
+ submenuTrigger: [
1644
+ "py-1.5 font-sans text-sm font-semibold leading-6 text-black hover:bg-brutal-yellow data-[highlighted]:bg-brutal-yellow data-[popup-open]:bg-brutal-yellow",
1645
+ "data-[disabled]:pointer-events-none data-[disabled]:text-black/30",
1646
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:stroke-2 [&_svg_*]:stroke-2 [&_svg:not([class*='size-'])]:size-3.5"
1647
+ ],
1648
+ label: ["border-b border-black px-3 py-2", "font-sans text-[10px] font-bold uppercase leading-none tracking-wide text-black/60"],
1649
+ shortcut: ["font-sans text-sm font-semibold leading-6"],
1650
+ itemCount: ["rounded border border-black bg-brutal-pink px-1.5 py-0.5", "font-sans text-[10px] leading-none font-bold text-white"],
1651
+ separator: ["border-black"],
1652
+ indicator: []
1653
+ },
1654
+ elegant: {
1655
+ content: [
1656
+ "gap-0.5 rounded-md bg-layer-popover p-1",
1657
+ "shadow-lg outline-none",
1658
+ "flex flex-col"
1659
+ ],
1660
+ item: [
1661
+ "gap-2.5 rounded-sm px-3 py-2 text-[13px] font-medium tracking-[-0.005em]",
1662
+ "text-foreground-muted",
1663
+ "transition-[background-color,color] duration-150",
1664
+ "hover:bg-foreground/[0.04] hover:text-foreground-strong",
1665
+ "data-[highlighted]:bg-foreground/[0.04] data-[highlighted]:text-foreground-strong",
1666
+ "data-[disabled]:pointer-events-none data-[disabled]:text-foreground-disabled",
1667
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:stroke-[1.5] [&_svg_*]:stroke-[1.5] [&>svg]:size-4",
1668
+ "[&>svg:last-child]:size-3",
1669
+ "[&>svg]:text-foreground-muted",
1670
+ "hover:[&>svg]:text-foreground-strong",
1671
+ "data-[highlighted]:[&>svg]:text-foreground-strong"
1672
+ ],
1673
+ radioItem: [
1674
+ "gap-2.5 rounded-sm px-3 py-2 text-[13px] font-medium tracking-[-0.005em]",
1675
+ "text-foreground-muted",
1676
+ "transition-[background-color,color] duration-150",
1677
+ "hover:bg-foreground/[0.04] hover:text-foreground-strong",
1678
+ "data-[highlighted]:bg-foreground/[0.04] data-[highlighted]:text-foreground-strong",
1679
+ "data-[disabled]:pointer-events-none data-[disabled]:text-foreground-disabled",
1680
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:stroke-[1.5] [&_svg_*]:stroke-[1.5] [&>svg]:size-4",
1681
+ "[&>svg:last-child]:size-3",
1682
+ "[&>svg]:text-foreground-muted",
1683
+ "hover:[&>svg]:text-foreground-strong",
1684
+ "data-[highlighted]:[&>svg]:text-foreground-strong"
1685
+ ],
1686
+ submenuTrigger: [
1687
+ "gap-2.5 rounded-sm px-3 py-2 text-[13px] font-medium tracking-[-0.005em]",
1688
+ "text-foreground-muted",
1689
+ "transition-[background-color,color] duration-150",
1690
+ "hover:bg-foreground/[0.04] hover:text-foreground-strong",
1691
+ "data-[highlighted]:bg-foreground/[0.04] data-[highlighted]:text-foreground-strong",
1692
+ "data-[popup-open]:bg-foreground/[0.04] data-[popup-open]:text-foreground-strong",
1693
+ "data-[disabled]:pointer-events-none data-[disabled]:text-foreground-disabled",
1694
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:stroke-[1.5] [&_svg_*]:stroke-[1.5] [&>svg]:size-4",
1695
+ "[&>svg:last-child]:size-3",
1696
+ "[&>svg]:text-foreground-muted",
1697
+ "hover:[&>svg]:text-foreground-strong",
1698
+ "data-[highlighted]:[&>svg]:text-foreground-strong",
1699
+ "data-[popup-open]:[&>svg]:text-foreground-strong"
1700
+ ],
1701
+ label: ["-mx-1 border-b border-line-muted px-3 py-2", "text-[11px] font-medium leading-none tracking-[-0.005em] text-foreground/45"],
1702
+ shortcut: ["text-foreground-muted"],
1703
+ itemCount: [],
1704
+ separator: ["my-1 -mx-1 h-px border-0 bg-line-muted"],
1705
+ indicator: []
1706
+ }
1707
+ } }
1708
+ });
1709
+ function DropdownMenu(props) {
1710
+ return /* @__PURE__ */ jsx(Menu.Root, {
1711
+ "data-slot": "dropdown-menu",
1712
+ ...props
1713
+ });
1714
+ }
1715
+ function DropdownMenuSubmenu(props) {
1716
+ return /* @__PURE__ */ jsx(Menu.SubmenuRoot, {
1717
+ "data-slot": "dropdown-menu-submenu",
1718
+ ...props
1719
+ });
1720
+ }
1721
+ function DropdownMenuTrigger({ className, ...props }) {
1722
+ const { trigger } = dropdownMenu({ theme: useThemeFamily() });
1723
+ return /* @__PURE__ */ jsx(Menu.Trigger, {
1724
+ "data-slot": "dropdown-menu-trigger",
1725
+ className: trigger({ className }),
1726
+ ...props
1727
+ });
1728
+ }
1729
+ function DropdownMenuPortal(props) {
1730
+ return /* @__PURE__ */ jsx(Menu.Portal, {
1731
+ "data-slot": "dropdown-menu-portal",
1732
+ ...props
1733
+ });
1734
+ }
1735
+ function DropdownMenuPopup({ className, ...props }) {
1736
+ const { content } = dropdownMenu({ theme: useThemeFamily() });
1737
+ return /* @__PURE__ */ jsx("div", {
1738
+ "data-slot": "dropdown-menu-content",
1739
+ className: content({ className }),
1740
+ ...props
1741
+ });
1742
+ }
1743
+ function DropdownMenuContent({ align = "start", alignOffset = 0, anchor, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, disableAnchorTracking = false, positionMethod = "fixed", side = "bottom", sideOffset = 4, sticky, portalProps, className, ...props }) {
1744
+ const { positioner, content } = dropdownMenu({ theme: useThemeFamily() });
1745
+ return /* @__PURE__ */ jsx(Menu.Portal, {
1746
+ ...portalProps,
1747
+ children: /* @__PURE__ */ jsx(Menu.Positioner, {
1748
+ align,
1749
+ alignOffset,
1750
+ anchor,
1751
+ arrowPadding,
1752
+ collisionAvoidance,
1753
+ collisionBoundary,
1754
+ collisionPadding,
1755
+ disableAnchorTracking,
1756
+ positionMethod,
1757
+ side,
1758
+ sideOffset,
1759
+ sticky,
1760
+ className: positioner(),
1761
+ children: /* @__PURE__ */ jsx(Menu.Popup, {
1762
+ "data-slot": "dropdown-menu-content",
1763
+ className: content({ className }),
1764
+ ...props
1765
+ })
1766
+ })
1767
+ });
1768
+ }
1769
+ function DropdownMenuItem({ className, ...props }) {
1770
+ const { item } = dropdownMenu({ theme: useThemeFamily() });
1771
+ return /* @__PURE__ */ jsx(Menu.Item, {
1772
+ "data-slot": "dropdown-menu-item",
1773
+ className: item({ className }),
1774
+ ...props
1775
+ });
1776
+ }
1777
+ function DropdownMenuSubmenuTrigger({ className, ...props }) {
1778
+ const { submenuTrigger } = dropdownMenu({ theme: useThemeFamily() });
1779
+ return /* @__PURE__ */ jsx(Menu.SubmenuTrigger, {
1780
+ "data-slot": "dropdown-menu-submenu-trigger",
1781
+ className: submenuTrigger({ className }),
1782
+ ...props
1783
+ });
1784
+ }
1785
+ function DropdownMenuLabel({ className, ...props }) {
1786
+ const { label } = dropdownMenu({ theme: useThemeFamily() });
1787
+ return /* @__PURE__ */ jsx("div", {
1788
+ "data-slot": "dropdown-menu-label",
1789
+ className: label({ className }),
1790
+ ...props
1791
+ });
1792
+ }
1793
+ function DropdownMenuShortcut({ className, ...props }) {
1794
+ const { shortcut } = dropdownMenu({ theme: useThemeFamily() });
1795
+ return /* @__PURE__ */ jsx(Kbd, {
1796
+ "data-slot": "dropdown-menu-shortcut",
1797
+ className: shortcut({ className }),
1798
+ ...props
1799
+ });
1800
+ }
1801
+ function DropdownMenuItemCount({ className, ...props }) {
1802
+ const { itemCount } = dropdownMenu({ theme: useThemeFamily() });
1803
+ return /* @__PURE__ */ jsx(Badge, {
1804
+ "data-slot": "dropdown-menu-item-count",
1805
+ className: itemCount({ className }),
1806
+ ...props
1807
+ });
1808
+ }
1809
+ function DropdownMenuSeparator({ className, ...props }) {
1810
+ const { separator } = dropdownMenu({ theme: useThemeFamily() });
1811
+ return /* @__PURE__ */ jsx(Menu.Separator, {
1812
+ "data-slot": "dropdown-menu-separator",
1813
+ className: separator({ className }),
1814
+ ...props
1815
+ });
1816
+ }
1817
+ function DropdownMenuCheckIcon() {
1818
+ return /* @__PURE__ */ jsx("svg", {
1819
+ width: "12",
1820
+ height: "12",
1821
+ viewBox: "0 0 12 12",
1822
+ "aria-hidden": true,
1823
+ className: "size-3 shrink-0",
1824
+ children: /* @__PURE__ */ jsx("g", {
1825
+ fill: "none",
1826
+ strokeLinecap: "round",
1827
+ strokeLinejoin: "round",
1828
+ strokeWidth: "1",
1829
+ stroke: "currentColor",
1830
+ children: /* @__PURE__ */ jsx("path", { d: "M1.75391 6.41392L4.4001 9.24985L10.2467 2.98532" })
1831
+ })
1832
+ });
1833
+ }
1834
+ function DropdownMenuRadioGroup({ ...props }) {
1835
+ return /* @__PURE__ */ jsx(Menu.RadioGroup, {
1836
+ "data-slot": "dropdown-menu-radio-group",
1837
+ ...props
1838
+ });
1839
+ }
1840
+ function DropdownMenuRadioItem({ className, children, ...props }) {
1841
+ const { radioItem, indicator } = dropdownMenu({ theme: useThemeFamily() });
1842
+ return /* @__PURE__ */ jsxs(Menu.RadioItem, {
1843
+ "data-slot": "dropdown-menu-radio-item",
1844
+ className: radioItem({ className }),
1845
+ ...props,
1846
+ children: [children, /* @__PURE__ */ jsx("span", {
1847
+ className: indicator(),
1848
+ children: /* @__PURE__ */ jsx(Menu.RadioItemIndicator, { children: /* @__PURE__ */ jsx(DropdownMenuCheckIcon, {}) })
1849
+ })]
1850
+ });
1851
+ }
1852
+ function DropdownMenuRadioItemIndicator({ className, ...props }) {
1853
+ return /* @__PURE__ */ jsx(Menu.RadioItemIndicator, {
1854
+ "data-slot": "dropdown-menu-radio-item-indicator",
1855
+ className,
1856
+ ...props
1857
+ });
1858
+ }
1859
+ function DropdownMenuCheckboxItem({ className, children, ...props }) {
1860
+ const { item, indicator } = dropdownMenu({ theme: useThemeFamily() });
1861
+ return /* @__PURE__ */ jsxs(Menu.CheckboxItem, {
1862
+ "data-slot": "dropdown-menu-checkbox-item",
1863
+ className: item({ className }),
1864
+ ...props,
1865
+ children: [children, /* @__PURE__ */ jsx("span", {
1866
+ className: indicator(),
1867
+ children: /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(DropdownMenuCheckIcon, {}) })
1868
+ })]
1869
+ });
1870
+ }
1871
+ function DropdownMenuCheckboxItemIndicator({ className, ...props }) {
1872
+ return /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, {
1873
+ "data-slot": "dropdown-menu-checkbox-item-indicator",
1874
+ className,
1875
+ ...props
1876
+ });
1877
+ }
1878
+ //#endregion
1879
+ //#region src/components/tooltip/tooltip.tsx
1880
+ const tooltip = tv({
1881
+ slots: {
1882
+ trigger: ["select-none"],
1883
+ positioner: ["isolate z-50 outline-none"],
1884
+ content: [
1885
+ "relative inline-flex max-w-xs items-center gap-1.5 px-2.5 py-1.5",
1886
+ "text-xs leading-4 whitespace-normal",
1887
+ "origin-[var(--transform-origin)] outline-none",
1888
+ "transition-[opacity,transform] duration-100",
1889
+ "data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
1890
+ "data-[ending-style]:scale-95 data-[ending-style]:opacity-0",
1891
+ "data-[instant]:transition-none",
1892
+ "[&>svg]:size-3.5 [&>svg]:shrink-0",
1893
+ "has-[[data-slot=kbd]]:py-1.5 has-[[data-slot=kbd]]:pr-1.5",
1894
+ "[&_[data-slot=kbd]]:relative [&_[data-slot=kbd]]:z-10",
1895
+ "[&_[data-slot=kbd]]:h-4 [&_[data-slot=kbd]]:min-w-4 [&_[data-slot=kbd]]:px-1 [&_[data-slot=kbd]]:py-0",
1896
+ "[&_[data-slot=kbd]]:text-[10px] [&_[data-slot=kbd]]:font-semibold [&_[data-slot=kbd]]:leading-none"
1897
+ ],
1898
+ arrow: [
1899
+ "pointer-events-none flex",
1900
+ "data-[side=top]:bottom-[-6px]",
1901
+ "data-[side=bottom]:top-[-6px] data-[side=bottom]:rotate-180",
1902
+ "data-[side=left]:right-[-8px] data-[side=left]:-rotate-90",
1903
+ "data-[side=right]:left-[-8px] data-[side=right]:rotate-90",
1904
+ "data-[side=inline-start]:right-[-8px] data-[side=inline-start]:-rotate-90",
1905
+ "data-[side=inline-end]:left-[-8px] data-[side=inline-end]:rotate-90"
1906
+ ]
1907
+ },
1908
+ variants: { theme: {
1909
+ brutal: {
1910
+ content: [
1911
+ "border-2 border-black bg-white",
1912
+ "font-sans font-bold text-black",
1913
+ "shadow-none",
1914
+ "[&_[data-slot=kbd]]:text-black/60"
1915
+ ],
1916
+ arrow: ["hidden"]
1917
+ },
1918
+ elegant: {
1919
+ content: [
1920
+ "rounded-md bg-layer-popover",
1921
+ "font-sans text-xs font-medium tracking-[-0.005em] text-foreground-strong",
1922
+ "shadow-[0_0_0_1px_oklch(0.21_0.006_285_/_0.10),0_1px_1px_oklch(0.21_0.006_285_/_0.04),0_1px_4px_-3px_oklch(0.21_0.006_285_/_0.10)]",
1923
+ "[&_[data-slot=kbd]]:bg-foreground-muted/10 [&_[data-slot=kbd]]:text-foreground-muted [&_[data-slot=kbd]]:ring-0"
1924
+ ],
1925
+ arrow: []
1926
+ }
1927
+ } }
1928
+ });
1929
+ function TooltipProvider({ delay = 0, ...props }) {
1930
+ return /* @__PURE__ */ jsx(Tooltip$1.Provider, {
1931
+ delay,
1932
+ ...props
1933
+ });
1934
+ }
1935
+ function Tooltip(props) {
1936
+ return /* @__PURE__ */ jsx(Tooltip$1.Root, { ...props });
1937
+ }
1938
+ function TooltipTrigger({ className, ...props }) {
1939
+ const { trigger } = tooltip({ theme: useThemeFamily() });
1940
+ return /* @__PURE__ */ jsx(Tooltip$1.Trigger, {
1941
+ "data-slot": "tooltip-trigger",
1942
+ className: trigger({ className }),
1943
+ ...props
1944
+ });
1945
+ }
1946
+ function TooltipPortal(props) {
1947
+ return /* @__PURE__ */ jsx(Tooltip$1.Portal, {
1948
+ "data-slot": "tooltip-portal",
1949
+ ...props
1950
+ });
1951
+ }
1952
+ function TooltipArrow({ className, ...props }) {
1953
+ const { arrow } = tooltip({ theme: useThemeFamily() });
1954
+ return /* @__PURE__ */ jsx(Tooltip$1.Arrow, {
1955
+ "data-slot": "tooltip-arrow",
1956
+ className: arrow({ className }),
1957
+ ...props,
1958
+ children: /* @__PURE__ */ jsx(TooltipArrowSvg, {})
1959
+ });
1960
+ }
1961
+ function TooltipArrowSvg(props) {
1962
+ return /* @__PURE__ */ jsxs("svg", {
1963
+ width: "12",
1964
+ height: "6",
1965
+ viewBox: "0 0 12 6",
1966
+ fill: "none",
1967
+ ...props,
1968
+ children: [/* @__PURE__ */ jsx("path", {
1969
+ d: "M1 0H11L6 5.25Z",
1970
+ className: "fill-layer-popover"
1971
+ }), /* @__PURE__ */ jsx("path", {
1972
+ d: "M1 0.5L6 5.25L11 0.5",
1973
+ className: "stroke-[oklch(0.21_0.006_285_/_0.10)]",
1974
+ strokeLinecap: "round",
1975
+ strokeLinejoin: "round",
1976
+ vectorEffect: "non-scaling-stroke"
1977
+ })]
1978
+ });
1979
+ }
1980
+ function TooltipContent({ align = "center", alignOffset = 0, anchor, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, disableAnchorTracking = false, positionMethod = "fixed", side = "top", sideOffset = 6, sticky, portalProps, className, children, ...props }) {
1981
+ const { positioner, content } = tooltip({ theme: useThemeFamily() });
1982
+ return /* @__PURE__ */ jsx(Tooltip$1.Portal, {
1983
+ ...portalProps,
1984
+ children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, {
1985
+ align,
1986
+ alignOffset,
1987
+ anchor,
1988
+ arrowPadding,
1989
+ collisionAvoidance,
1990
+ collisionBoundary,
1991
+ collisionPadding,
1992
+ disableAnchorTracking,
1993
+ positionMethod,
1994
+ side,
1995
+ sideOffset,
1996
+ sticky,
1997
+ className: positioner(),
1998
+ children: /* @__PURE__ */ jsxs(Tooltip$1.Popup, {
1999
+ "data-slot": "tooltip-content",
2000
+ className: content({ className }),
2001
+ ...props,
2002
+ children: [children, /* @__PURE__ */ jsx(TooltipArrow, {})]
2003
+ })
2004
+ })
2005
+ });
2006
+ }
2007
+ //#endregion
2008
+ //#region src/components/popover/popover.tsx
2009
+ const popover = tv({
2010
+ slots: {
2011
+ trigger: ["select-none"],
2012
+ positioner: ["isolate z-50 outline-none"],
2013
+ content: ["max-h-[var(--available-height)] min-w-[220px] overflow-hidden bg-layer-panel", "outline-none"],
2014
+ header: ["flex items-center justify-between px-3 py-2"],
2015
+ separator: ["border-t"],
2016
+ title: ["m-0 text-[10px] font-bold leading-none"],
2017
+ description: ["m-0 text-xs leading-5"],
2018
+ close: [
2019
+ "inline-flex items-center justify-center",
2020
+ "text-[10px] font-bold",
2021
+ "outline-none transition-colors"
2022
+ ],
2023
+ arrow: ["size-2 rotate-45"],
2024
+ backdrop: ["fixed inset-0"],
2025
+ viewport: ["block"]
2026
+ },
2027
+ variants: { theme: {
2028
+ brutal: {
2029
+ content: ["border-2 border-black bg-white shadow-lg"],
2030
+ separator: ["border-black"],
2031
+ title: ["font-sans uppercase tracking-wide text-black/60"],
2032
+ description: ["font-sans text-black"],
2033
+ close: ["font-sans uppercase tracking-wide text-black/60 hover:text-black"],
2034
+ arrow: ["border-l-2 border-t-2 border-black bg-white"],
2035
+ backdrop: ["bg-transparent"]
2036
+ },
2037
+ elegant: {
2038
+ content: ["rounded-md bg-layer-popover", "shadow-xl"],
2039
+ separator: ["border-line-muted"],
2040
+ title: ["text-[11px] font-medium tracking-[-0.005em] text-foreground/45"],
2041
+ description: ["text-xs leading-5 text-foreground-muted"],
2042
+ close: ["text-[11px] font-medium tracking-[-0.005em]", "text-foreground-muted transition-colors duration-150 hover:text-foreground-strong"],
2043
+ arrow: ["border-l border-t border-line-muted bg-layer-popover"],
2044
+ backdrop: ["bg-black/20"]
2045
+ }
2046
+ } }
2047
+ });
2048
+ function Popover(props) {
2049
+ return /* @__PURE__ */ jsx(Popover$1.Root, {
2050
+ "data-slot": "popover",
2051
+ ...props
2052
+ });
2053
+ }
2054
+ function PopoverTrigger({ className, ...props }) {
2055
+ const { trigger } = popover({ theme: useThemeFamily() });
2056
+ return /* @__PURE__ */ jsx(Popover$1.Trigger, {
2057
+ "data-slot": "popover-trigger",
2058
+ className: trigger({ className }),
2059
+ ...props
2060
+ });
2061
+ }
2062
+ function PopoverPortal(props) {
2063
+ return /* @__PURE__ */ jsx(Popover$1.Portal, {
2064
+ "data-slot": "popover-portal",
2065
+ ...props
2066
+ });
2067
+ }
2068
+ function PopoverPopup({ className, ...props }) {
2069
+ const { content } = popover({ theme: useThemeFamily() });
2070
+ return /* @__PURE__ */ jsx("div", {
2071
+ "data-slot": "popover-content",
2072
+ className: content({ className }),
2073
+ ...props
2074
+ });
2075
+ }
2076
+ function PopoverContent({ align = "start", alignOffset = 0, anchor, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, disableAnchorTracking = true, positionMethod = "fixed", side = "bottom", sideOffset = 4, sticky, portalProps, className, ...props }) {
2077
+ const { positioner, content } = popover({ theme: useThemeFamily() });
2078
+ return /* @__PURE__ */ jsx(Popover$1.Portal, {
2079
+ ...portalProps,
2080
+ children: /* @__PURE__ */ jsx(Popover$1.Positioner, {
2081
+ align,
2082
+ alignOffset,
2083
+ anchor,
2084
+ arrowPadding,
2085
+ collisionAvoidance,
2086
+ collisionBoundary,
2087
+ collisionPadding,
2088
+ disableAnchorTracking,
2089
+ positionMethod,
2090
+ side,
2091
+ sideOffset,
2092
+ sticky,
2093
+ className: positioner(),
2094
+ children: /* @__PURE__ */ jsx(Popover$1.Popup, {
2095
+ "data-slot": "popover-content",
2096
+ className: content({ className }),
2097
+ ...props
2098
+ })
2099
+ })
2100
+ });
2101
+ }
2102
+ function PopoverViewport({ className, ...props }) {
2103
+ const { viewport } = popover({ theme: useThemeFamily() });
2104
+ return /* @__PURE__ */ jsx(Popover$1.Viewport, {
2105
+ "data-slot": "popover-viewport",
2106
+ className: viewport({ className }),
2107
+ ...props
2108
+ });
2109
+ }
2110
+ function PopoverHeader({ className, ...props }) {
2111
+ const { header } = popover({ theme: useThemeFamily() });
2112
+ return /* @__PURE__ */ jsx("div", {
2113
+ "data-slot": "popover-header",
2114
+ className: header({ className }),
2115
+ ...props
2116
+ });
2117
+ }
2118
+ function PopoverSeparator({ className, ...props }) {
2119
+ const { separator } = popover({ theme: useThemeFamily() });
2120
+ return /* @__PURE__ */ jsx("div", {
2121
+ role: "separator",
2122
+ "aria-orientation": "horizontal",
2123
+ "data-slot": "popover-separator",
2124
+ className: separator({ className }),
2125
+ ...props
2126
+ });
2127
+ }
2128
+ function PopoverTitle({ className, ...props }) {
2129
+ const { title } = popover({ theme: useThemeFamily() });
2130
+ return /* @__PURE__ */ jsx(Popover$1.Title, {
2131
+ "data-slot": "popover-title",
2132
+ className: title({ className }),
2133
+ ...props
2134
+ });
2135
+ }
2136
+ function PopoverDescription({ className, ...props }) {
2137
+ const { description } = popover({ theme: useThemeFamily() });
2138
+ return /* @__PURE__ */ jsx(Popover$1.Description, {
2139
+ "data-slot": "popover-description",
2140
+ className: description({ className }),
2141
+ ...props
2142
+ });
2143
+ }
2144
+ function PopoverClose({ className, ...props }) {
2145
+ const { close } = popover({ theme: useThemeFamily() });
2146
+ return /* @__PURE__ */ jsx(Popover$1.Close, {
2147
+ "data-slot": "popover-close",
2148
+ className: close({ className }),
2149
+ ...props
2150
+ });
2151
+ }
2152
+ function PopoverArrow({ className, ...props }) {
2153
+ const { arrow } = popover({ theme: useThemeFamily() });
2154
+ return /* @__PURE__ */ jsx(Popover$1.Arrow, {
2155
+ "data-slot": "popover-arrow",
2156
+ className: arrow({ className }),
2157
+ ...props
2158
+ });
2159
+ }
2160
+ function PopoverBackdrop({ className, ...props }) {
2161
+ const { backdrop } = popover({ theme: useThemeFamily() });
2162
+ return /* @__PURE__ */ jsx(Popover$1.Backdrop, {
2163
+ "data-slot": "popover-backdrop",
2164
+ className: backdrop({ className }),
2165
+ ...props
2166
+ });
2167
+ }
2168
+ //#endregion
2169
+ //#region src/components/input/input.tsx
2170
+ const input = tv({
2171
+ slots: { root: ["w-full px-3 py-2 font-heading outline-none"] },
2172
+ variants: { theme: {
2173
+ brutal: {},
2174
+ elegant: {}
2175
+ } },
2176
+ compoundVariants: [{
2177
+ theme: "brutal",
2178
+ class: { root: [
2179
+ "border-2 border-line-strong bg-layer-panel",
2180
+ "shadow-sm focus:shadow-md",
2181
+ "aria-invalid:border-brutal-red aria-invalid:bg-brutal-red/5 aria-invalid:shadow-none aria-invalid:ring-2 aria-invalid:ring-brutal-red/60"
2182
+ ] }
2183
+ }, {
2184
+ theme: "elegant",
2185
+ class: { root: [
2186
+ "rounded-md border border-[oklch(0.94_0_0)] bg-layer-field",
2187
+ "px-3 py-2 text-sm text-[oklch(0.205_0_0)] transition duration-200 ease-out dark:text-foreground",
2188
+ "placeholder:text-foreground-placeholder/70",
2189
+ "shadow-none hover:not-aria-invalid:border-[oklch(0.91_0_0)] hover:shadow-[oklch(0_0_0_/_0)_0px_0px_0px_0px,oklch(0_0_0_/_0)_0px_0px_0px_0px,oklch(0.159_0.016_266.594_/_0.03)_0px_1px_2px_0px]",
2190
+ "focus:border-line-strong/25 focus:bg-layer-field",
2191
+ "focus-visible:ring-2 focus-visible:ring-line-strong/8",
2192
+ "aria-invalid:border-danger-base/45 aria-invalid:hover:border-danger-base/75 aria-invalid:focus-visible:border-danger-base/75 aria-invalid:focus-visible:ring-3 aria-invalid:focus-visible:ring-danger-base/12",
2193
+ "disabled:cursor-not-allowed disabled:border-line-subtle/60 disabled:bg-layer-muted/50 disabled:text-foreground-disabled disabled:placeholder:text-foreground-disabled",
2194
+ "disabled:hover:border-line-subtle/60 disabled:hover:shadow-none",
2195
+ "aria-invalid:disabled:border-line-subtle/60 aria-invalid:disabled:ring-0"
2196
+ ] }
2197
+ }]
2198
+ });
2199
+ function Input({ suppressPasswordManager, className, ...props }) {
2200
+ const { root } = input({ theme: useThemeFamily() });
2201
+ return /* @__PURE__ */ jsx(Input$1, {
2202
+ "data-slot": "input",
2203
+ className: root({ className: [suppressPasswordManager && "keeper-ignore", className] }),
2204
+ "data-1p-ignore": suppressPasswordManager ? "true" : void 0,
2205
+ "data-bwignore": suppressPasswordManager ? "true" : void 0,
2206
+ "data-form-type": suppressPasswordManager ? "other" : void 0,
2207
+ "data-lpignore": suppressPasswordManager ? "true" : void 0,
2208
+ ...props
2209
+ });
2210
+ }
2211
+ //#endregion
2212
+ //#region src/components/input-group/input-group.tsx
2213
+ const inputGroup = tv({
2214
+ slots: {
2215
+ root: ["group/input-group relative flex w-full min-w-0 items-center", "has-[[data-input-group-trim=inline-end]]:[&_[data-slot=input-group-control]]:pr-0"],
2216
+ addon: [
2217
+ "flex shrink-0 items-center justify-center gap-2 px-3",
2218
+ "select-none",
2219
+ "[&>svg:not([class*='size-'])]:size-3.5"
2220
+ ],
2221
+ text: ["flex shrink-0 items-center px-3 text-sm", "select-none whitespace-nowrap"],
2222
+ control: ["min-w-0 flex-1 bg-transparent px-3 py-2 text-sm outline-none"]
2223
+ },
2224
+ variants: {
2225
+ theme: {
2226
+ brutal: {
2227
+ root: [
2228
+ "border-2 border-line-strong bg-layer-panel shadow-sm",
2229
+ "has-[[data-slot=input-group-control]:focus]:not-has-[[data-slot=input-group-control][aria-invalid=true]]:shadow-md",
2230
+ "has-[[data-slot=input-group-control][aria-invalid=true]]:border-brutal-red has-[[data-slot=input-group-control][aria-invalid=true]]:bg-brutal-red/5 has-[[data-slot=input-group-control][aria-invalid=true]]:shadow-none has-[[data-slot=input-group-control][aria-invalid=true]]:ring-2 has-[[data-slot=input-group-control][aria-invalid=true]]:ring-brutal-red/60"
2231
+ ],
2232
+ addon: ["text-foreground/50"],
2233
+ text: ["font-heading text-foreground/50"],
2234
+ control: ["font-heading"]
2235
+ },
2236
+ elegant: {
2237
+ root: [
2238
+ "overflow-hidden rounded-md border border-[oklch(0.94_0_0)] bg-layer-field shadow-none",
2239
+ "text-[oklch(0.205_0_0)] transition duration-200 ease-out dark:text-foreground",
2240
+ "hover:border-[oklch(0.91_0_0)] hover:shadow-[oklch(0_0_0_/_0)_0px_0px_0px_0px,oklch(0_0_0_/_0)_0px_0px_0px_0px,oklch(0.159_0.016_266.594_/_0.03)_0px_1px_2px_0px]",
2241
+ "has-[[data-slot=input-group-control]:focus]:border-line-strong/25 has-[[data-slot=input-group-control]:focus]:bg-layer-field",
2242
+ "has-[[data-slot=input-group-control]:focus-visible]:ring-2 has-[[data-slot=input-group-control]:focus-visible]:ring-line-strong/8",
2243
+ "has-[[data-slot=input-group-control][aria-invalid=true]]:border-danger-base/45 has-[[data-slot=input-group-control][aria-invalid=true]]:hover:border-danger-base/75 has-[[data-slot=input-group-control][aria-invalid=true]:focus]:border-danger-base/75",
2244
+ "has-[[data-slot=input-group-control][aria-invalid=true]:focus-visible]:ring-3 has-[[data-slot=input-group-control][aria-invalid=true]:focus-visible]:ring-danger-base/12",
2245
+ "has-[[data-slot=input-group-control]:disabled]:cursor-not-allowed has-[[data-slot=input-group-control]:disabled]:border-line-subtle/60 has-[[data-slot=input-group-control]:disabled]:bg-layer-muted/50",
2246
+ "has-[[data-slot=input-group-control]:disabled]:hover:border-line-subtle/60 has-[[data-slot=input-group-control]:disabled]:hover:shadow-none",
2247
+ "has-[[data-slot=input-group-control][aria-invalid=true]:disabled]:border-line-subtle/60 has-[[data-slot=input-group-control][aria-invalid=true]:disabled]:ring-0"
2248
+ ],
2249
+ addon: [
2250
+ "text-foreground-muted transition duration-200 ease-out",
2251
+ "group-has-[[data-slot=input-group-control]:focus]/input-group:text-foreground",
2252
+ "group-has-[[data-slot=input-group-control]:disabled]/input-group:text-foreground-disabled"
2253
+ ],
2254
+ text: [
2255
+ "text-foreground-placeholder transition duration-200 ease-out",
2256
+ "group-has-[[data-slot=input-group-control]:focus]/input-group:text-foreground-muted",
2257
+ "group-has-[[data-slot=input-group-control]:disabled]/input-group:text-foreground-disabled"
2258
+ ],
2259
+ control: [
2260
+ "text-[oklch(0.205_0_0)] placeholder:text-foreground-placeholder/70 dark:text-foreground",
2261
+ "transition duration-200 ease-out placeholder:transition placeholder:duration-200 placeholder:ease-out",
2262
+ "disabled:cursor-not-allowed disabled:text-foreground-disabled disabled:placeholder:text-foreground-disabled"
2263
+ ]
2264
+ }
2265
+ },
2266
+ align: {
2267
+ "inline-start": {
2268
+ addon: "order-first",
2269
+ text: "order-first"
2270
+ },
2271
+ "inline-end": {
2272
+ addon: "order-last",
2273
+ text: "order-last"
2274
+ }
2275
+ },
2276
+ variant: {
2277
+ default: {},
2278
+ container: {
2279
+ addon: ["self-stretch border-line-subtle/90 bg-layer-muted/35", "text-foreground-placeholder"],
2280
+ text: ["self-stretch border-line-subtle/90 bg-layer-muted/35", "text-foreground-placeholder"]
2281
+ }
2282
+ }
2283
+ },
2284
+ compoundVariants: [
2285
+ {
2286
+ theme: "brutal",
2287
+ variant: "container",
2288
+ class: {
2289
+ addon: "bg-brutal-yellow/30 font-bold text-black/70",
2290
+ text: "bg-brutal-yellow/30 font-bold text-black/70"
2291
+ }
2292
+ },
2293
+ {
2294
+ variant: "default",
2295
+ align: "inline-start",
2296
+ class: {
2297
+ addon: "[&~[data-slot=input-group-control]]:pl-0",
2298
+ text: "[&~[data-slot=input-group-control]]:pl-0"
2299
+ }
2300
+ },
2301
+ {
2302
+ variant: "container",
2303
+ align: "inline-start",
2304
+ class: {
2305
+ addon: "border-r",
2306
+ text: "border-r"
2307
+ }
2308
+ },
2309
+ {
2310
+ theme: "brutal",
2311
+ variant: "container",
2312
+ align: "inline-start",
2313
+ class: {
2314
+ addon: "border-r-2 border-black",
2315
+ text: "border-r-2 border-black"
2316
+ }
2317
+ },
2318
+ {
2319
+ variant: "container",
2320
+ align: "inline-end",
2321
+ class: {
2322
+ addon: "border-l",
2323
+ text: "border-l"
2324
+ }
2325
+ },
2326
+ {
2327
+ theme: "brutal",
2328
+ variant: "container",
2329
+ align: "inline-end",
2330
+ class: {
2331
+ addon: "border-l-2 border-black",
2332
+ text: "border-l-2 border-black"
2333
+ }
2334
+ }
2335
+ ],
2336
+ defaultVariants: {
2337
+ align: "inline-start",
2338
+ variant: "default"
2339
+ }
2340
+ });
2341
+ function InputGroup({ className, ...props }) {
2342
+ const { root } = inputGroup({ theme: useThemeFamily() });
2343
+ return /* @__PURE__ */ jsx("div", {
2344
+ "data-slot": "input-group",
2345
+ className: root({ className }),
2346
+ ...props
2347
+ });
2348
+ }
2349
+ function InputGroupAddonRoot({ align = "inline-start", variant = "default", className, ...props }) {
2350
+ const { addon } = inputGroup({
2351
+ theme: useThemeFamily(),
2352
+ align,
2353
+ variant
2354
+ });
2355
+ return /* @__PURE__ */ jsx("div", {
2356
+ "data-slot": "input-group-addon",
2357
+ "data-align": align,
2358
+ "data-variant": variant,
2359
+ "data-input-group-trim": variant === "default" && align === "inline-end" ? align : void 0,
2360
+ className: addon({ className }),
2361
+ ...props
2362
+ });
2363
+ }
2364
+ function TextAddon({ align = "inline-start", variant = "default", className, ...props }) {
2365
+ const { text } = inputGroup({
2366
+ theme: useThemeFamily(),
2367
+ align,
2368
+ variant
2369
+ });
2370
+ return /* @__PURE__ */ jsx("span", {
2371
+ "data-slot": "input-group-text",
2372
+ "data-align": align,
2373
+ "data-variant": variant,
2374
+ "data-input-group-trim": variant === "default" && align === "inline-end" ? align : void 0,
2375
+ className: text({ className }),
2376
+ ...props
2377
+ });
2378
+ }
2379
+ const InputGroupAddon = Object.assign(InputGroupAddonRoot, { Text: TextAddon });
2380
+ function InputGroupInput({ className, suppressPasswordManager, ...props }) {
2381
+ const { control } = inputGroup({ theme: useThemeFamily() });
2382
+ return /* @__PURE__ */ jsx(Input$1, {
2383
+ "data-slot": "input-group-control",
2384
+ className: control({ className: [suppressPasswordManager && "keeper-ignore", className] }),
2385
+ "data-1p-ignore": suppressPasswordManager ? "true" : void 0,
2386
+ "data-bwignore": suppressPasswordManager ? "true" : void 0,
2387
+ "data-form-type": suppressPasswordManager ? "other" : void 0,
2388
+ "data-lpignore": suppressPasswordManager ? "true" : void 0,
2389
+ ...props
2390
+ });
2391
+ }
2392
+ //#endregion
2393
+ //#region src/components/combobox/combobox.tsx
2394
+ const combobox = tv({
2395
+ slots: {
2396
+ trigger: [
2397
+ "inline-flex select-none items-center justify-between gap-2",
2398
+ "outline-none transition-colors",
2399
+ "[&_[data-slot='button-content']]:w-full [&_[data-slot='button-content']]:justify-between",
2400
+ "[&>span[data-slot='combobox-trigger-content']]:min-w-0 [&>span[data-slot='combobox-trigger-content']]:flex-1",
2401
+ "[&_[data-slot='combobox-trigger-content']_svg]:!size-3 [&_[data-slot='combobox-trigger-content']_svg]:shrink-0 [&_[data-slot='combobox-trigger-content']_svg]:!stroke-[1.5] [&_[data-slot='combobox-trigger-content']_svg_*]:!stroke-[1.5]",
2402
+ "[&_[data-slot='combobox-trigger-indicator']]:!stroke-[1.5] [&_[data-slot='combobox-trigger-indicator']_*]:!stroke-[1.5]"
2403
+ ],
2404
+ triggerIndicator: ["ml-auto flex shrink-0 items-center justify-center opacity-60"],
2405
+ control: [
2406
+ "flex min-w-0 items-center gap-2",
2407
+ "outline-none transition-colors",
2408
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",
2409
+ "[&_[data-slot='combobox-input']]:min-w-0 [&_[data-slot='combobox-input']]:flex-1",
2410
+ "[&_[data-slot='combobox-input']]:border-0 [&_[data-slot='combobox-input']]:bg-transparent [&_[data-slot='combobox-input']]:p-0",
2411
+ "[&_[data-slot='combobox-input']]:shadow-none [&_[data-slot='combobox-input']]:outline-none [&_[data-slot='combobox-input']]:ring-0",
2412
+ "[&_[data-slot='combobox-input']]:focus:border-transparent [&_[data-slot='combobox-input']]:focus:ring-0 [&_[data-slot='combobox-input']]:focus-visible:ring-0",
2413
+ "[&_[data-slot='combobox-clear']]:size-5 [&_[data-slot='combobox-clear']]:min-w-5 [&_[data-slot='combobox-clear']]:shrink-0",
2414
+ "[&_[data-slot='combobox-trigger-indicator']]:size-4",
2415
+ "[&_[data-slot='combobox-trigger-indicator']_svg]:!size-3.5 [&_[data-slot='combobox-trigger-indicator']_svg]:shrink-0"
2416
+ ],
2417
+ inputGroup: ["flex items-center gap-2 border-b px-2 py-2"],
2418
+ input: ["w-full outline-none"],
2419
+ positioner: ["isolate z-50 outline-none"],
2420
+ content: ["h-auto max-h-[var(--available-height)] min-w-[220px] overflow-hidden bg-layer-panel", "outline-none"],
2421
+ header: ["flex items-center justify-between px-3 py-2"],
2422
+ separator: ["h-px shrink-0 border-0"],
2423
+ list: ["max-h-64 overflow-y-auto overscroll-contain scroll-py-1"],
2424
+ item: ["flex w-full shrink-0 cursor-default select-none items-center justify-between gap-2 overflow-hidden px-3 py-1.5", "text-left outline-none transition-colors"],
2425
+ itemIndicator: ["pointer-events-none ml-auto flex shrink-0 items-center justify-center"],
2426
+ label: ["m-0 font-medium"],
2427
+ clear: [
2428
+ "inline-flex h-5 min-w-8 items-center justify-center",
2429
+ "pointer-events-none opacity-0 outline-none transition-colors",
2430
+ "data-[visible]:pointer-events-auto data-[visible]:opacity-100"
2431
+ ],
2432
+ empty: ["px-3 py-4 text-center text-sm"],
2433
+ groupLabel: ["px-3 py-2"],
2434
+ chips: ["flex min-h-9 flex-wrap items-center gap-1"],
2435
+ chip: ["inline-flex items-center gap-1"],
2436
+ chipRemove: ["inline-flex items-center justify-center outline-none transition-colors"]
2437
+ },
2438
+ variants: { theme: {
2439
+ brutal: {
2440
+ trigger: [
2441
+ "font-sans text-sm font-semibold text-black",
2442
+ "data-[popup-open]:translate-x-0 data-[popup-open]:translate-y-0",
2443
+ "data-[popup-open]:hover:translate-x-0 data-[popup-open]:hover:translate-y-0"
2444
+ ],
2445
+ inputGroup: ["border-black bg-white"],
2446
+ input: ["border-2 border-line-strong bg-layer-panel px-2 py-1 font-mono text-xs", "shadow-[var(--shadow)] focus:shadow-[var(--shadow-hover)]"],
2447
+ content: ["border-2 border-black bg-white shadow-lg"],
2448
+ separator: ["bg-black"],
2449
+ item: [
2450
+ "border-b border-black/10 bg-white font-sans text-sm font-semibold leading-6 text-black last:border-b-0",
2451
+ "hover:bg-brutal-yellow/30 data-[highlighted]:bg-brutal-yellow/30",
2452
+ "data-[disabled]:pointer-events-none data-[disabled]:text-black/30",
2453
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:stroke-2 [&_svg_*]:stroke-2 [&_svg:not([class*='size-'])]:size-3"
2454
+ ],
2455
+ itemIndicator: ["text-black"],
2456
+ label: ["font-sans text-[10px] font-bold uppercase leading-none tracking-wide text-black"],
2457
+ clear: ["font-sans text-[10px] font-bold uppercase tracking-wide text-black hover:text-black", "[&_svg]:![stroke-width:2] [&_svg_*]:![stroke-width:2]"],
2458
+ triggerIndicator: ["text-black opacity-100", "[&_svg]:![stroke-width:2] [&_svg_*]:![stroke-width:2]"],
2459
+ control: [
2460
+ "border-2 border-line-strong bg-white px-2 py-1",
2461
+ "font-sans text-sm font-semibold text-black shadow-[var(--shadow)]",
2462
+ "focus-within:shadow-[var(--shadow-hover)]",
2463
+ "data-[popup-open]:translate-x-0 data-[popup-open]:translate-y-0",
2464
+ "[&_svg]:![stroke-width:1.5] [&_svg_*]:![stroke-width:1.5] [&_svg_*]:fill-none",
2465
+ "[&_[data-slot='combobox-input']]:font-sans [&_[data-slot='combobox-input']]:text-sm [&_[data-slot='combobox-input']]:font-semibold [&_[data-slot='combobox-input']]:text-black",
2466
+ "[&_[data-slot='combobox-input']::placeholder]:text-black/40"
2467
+ ],
2468
+ empty: ["font-sans text-sm font-semibold text-black/50"],
2469
+ groupLabel: ["font-sans text-[10px] font-bold uppercase leading-none tracking-wide text-black/60"],
2470
+ chips: ["border-2 border-line-strong bg-white px-2 py-1"],
2471
+ chip: ["border border-black bg-brutal-yellow px-1.5 py-0.5 font-sans text-xs font-bold"],
2472
+ chipRemove: ["text-black/50 hover:text-black"]
2473
+ },
2474
+ elegant: {
2475
+ trigger: ["text-sm font-medium tracking-[-0.005em] text-foreground-muted", "[&_svg]:stroke-[1.5] [&_svg_*]:stroke-[1.5]"],
2476
+ inputGroup: ["border-line-muted bg-layer-popover px-1.5 pt-1 pb-2"],
2477
+ input: [
2478
+ "rounded-sm border border-line-subtle bg-layer-field px-2 py-1 text-sm",
2479
+ "text-foreground outline-none transition duration-150",
2480
+ "placeholder:text-foreground-placeholder/70",
2481
+ "focus:border-line-strong/25 focus-visible:ring-2 focus-visible:ring-line-strong/8"
2482
+ ],
2483
+ content: ["rounded-md bg-layer-popover", "shadow-lg"],
2484
+ header: ["pl-2 pr-1.5 pt-2.5 pb-0.5"],
2485
+ separator: ["hidden bg-line-muted"],
2486
+ list: ["flex flex-col gap-0.5 px-1.5 py-1"],
2487
+ item: [
2488
+ "rounded-sm bg-transparent px-2 text-sm font-normal tracking-[-0.005em] text-foreground-muted",
2489
+ "transition-[background-color,color] duration-150",
2490
+ "hover:bg-foreground/[0.04] hover:text-foreground-strong",
2491
+ "data-[highlighted]:bg-foreground/[0.04] data-[highlighted]:text-foreground-strong",
2492
+ "data-[disabled]:pointer-events-none data-[disabled]:text-foreground-disabled",
2493
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:stroke-[1.5] [&_svg_*]:stroke-[1.5] [&_svg:not([class*='size-'])]:size-3.5"
2494
+ ],
2495
+ itemIndicator: ["text-foreground-strong"],
2496
+ label: ["text-[11px] leading-none tracking-[-0.005em] text-foreground-strong"],
2497
+ clear: ["text-[11px] font-medium tracking-[-0.005em] text-foreground-muted hover:text-foreground-strong", "[&_svg]:![stroke-width:1.5] [&_svg_*]:![stroke-width:1.5]"],
2498
+ triggerIndicator: ["text-foreground-muted opacity-100", "[&_svg]:![stroke-width:1.5] [&_svg_*]:![stroke-width:1.5]"],
2499
+ control: [
2500
+ "rounded-md border border-line-subtle bg-layer-field px-2.5 py-1.5",
2501
+ "text-sm font-normal text-foreground shadow-[0_1px_1px_oklch(0.21_0.006_285_/_0.05)]",
2502
+ "focus-within:border-line-strong/25 focus-within:ring-2 focus-within:ring-line-strong/8",
2503
+ "[&_svg]:shrink-0 [&_svg]:stroke-[1.5] [&_svg_*]:stroke-[1.5]",
2504
+ "[&_[data-slot='combobox-input']]:text-sm [&_[data-slot='combobox-input']]:font-normal [&_[data-slot='combobox-input']]:text-foreground",
2505
+ "[&_[data-slot='combobox-input']::placeholder]:text-foreground-placeholder/70"
2506
+ ],
2507
+ empty: ["text-foreground-muted"],
2508
+ groupLabel: ["text-[11px] font-medium leading-none tracking-[-0.005em] text-foreground/45"],
2509
+ chips: ["rounded-md border border-line-subtle bg-layer-field px-2 py-1", "focus-within:border-line-strong/25 focus-within:ring-2 focus-within:ring-line-strong/8"],
2510
+ chip: ["rounded-sm bg-layer-muted px-1.5 py-0.5 text-xs font-medium text-foreground"],
2511
+ chipRemove: ["text-foreground-muted hover:text-foreground-strong"]
2512
+ }
2513
+ } }
2514
+ });
2515
+ const ComboboxClearContext = createContext({ visible: false });
2516
+ function hasClearableValue(value) {
2517
+ if (Array.isArray(value)) return value.length > 0;
2518
+ return value != null;
2519
+ }
2520
+ function hasClearableInputValue(value) {
2521
+ if (Array.isArray(value)) return value.length > 0;
2522
+ if (typeof value === "string") return value.length > 0;
2523
+ if (typeof value === "number") return true;
2524
+ return value != null;
2525
+ }
2526
+ function Combobox({ defaultInputValue, defaultValue, inputValue, onInputValueChange, onValueChange, value, ...props }) {
2527
+ const [uncontrolledInputValue, setUncontrolledInputValue] = useState(defaultInputValue ?? "");
2528
+ const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue);
2529
+ const resolvedInputValue = inputValue === void 0 ? uncontrolledInputValue : inputValue;
2530
+ const resolvedValue = value === void 0 ? uncontrolledValue : value;
2531
+ return /* @__PURE__ */ jsx(ComboboxClearContext.Provider, {
2532
+ value: { visible: hasClearableValue(resolvedValue) || hasClearableInputValue(resolvedInputValue) },
2533
+ children: /* @__PURE__ */ jsx(Combobox$1.Root, {
2534
+ "data-slot": "combobox",
2535
+ defaultInputValue,
2536
+ defaultValue,
2537
+ inputValue,
2538
+ value,
2539
+ onInputValueChange: (nextInputValue, eventDetails) => {
2540
+ if (inputValue === void 0) setUncontrolledInputValue(nextInputValue);
2541
+ onInputValueChange?.(nextInputValue, eventDetails);
2542
+ },
2543
+ onValueChange: (nextValue, eventDetails) => {
2544
+ if (value === void 0) setUncontrolledValue(nextValue);
2545
+ onValueChange?.(nextValue, eventDetails);
2546
+ },
2547
+ ...props
2548
+ })
2549
+ });
2550
+ }
2551
+ function ComboboxLabel({ className, ...props }) {
2552
+ const { label } = combobox({ theme: useThemeFamily() });
2553
+ return /* @__PURE__ */ jsx(Combobox$1.Label, {
2554
+ "data-slot": "combobox-label",
2555
+ className: label({ className }),
2556
+ ...props
2557
+ });
2558
+ }
2559
+ function ComboboxValue(props) {
2560
+ return /* @__PURE__ */ jsx(Combobox$1.Value, {
2561
+ "data-slot": "combobox-value",
2562
+ ...props
2563
+ });
2564
+ }
2565
+ function ComboboxTrigger({ className, children, render = /* @__PURE__ */ jsx(Button, {
2566
+ variant: "outline",
2567
+ size: "md"
2568
+ }), ...props }) {
2569
+ const { trigger } = combobox({ theme: useThemeFamily() });
2570
+ return /* @__PURE__ */ jsx(Combobox$1.Trigger, {
2571
+ "data-slot": "combobox-trigger",
2572
+ render,
2573
+ className: trigger({ className }),
2574
+ ...props,
2575
+ children: /* @__PURE__ */ jsx("span", {
2576
+ "data-slot": "combobox-trigger-content",
2577
+ className: "flex min-w-0 flex-1 items-center gap-1.5",
2578
+ children
2579
+ })
2580
+ });
2581
+ }
2582
+ function ComboboxTriggerIndicator({ className, ...props }) {
2583
+ const { triggerIndicator } = combobox({ theme: useThemeFamily() });
2584
+ return /* @__PURE__ */ jsx("span", {
2585
+ "data-slot": "combobox-trigger-indicator",
2586
+ className: triggerIndicator({ className }),
2587
+ ...props
2588
+ });
2589
+ }
2590
+ function ComboboxInputGroup({ className, ...props }) {
2591
+ const { inputGroup } = combobox({ theme: useThemeFamily() });
2592
+ return /* @__PURE__ */ jsx(Combobox$1.InputGroup, {
2593
+ "data-slot": "combobox-input-group",
2594
+ className: inputGroup({ className }),
2595
+ ...props
2596
+ });
2597
+ }
2598
+ function ComboboxControl({ className, ...props }) {
2599
+ const { control } = combobox({ theme: useThemeFamily() });
2600
+ return /* @__PURE__ */ jsx(Combobox$1.InputGroup, {
2601
+ "data-slot": "combobox-control",
2602
+ className: control({ className }),
2603
+ ...props
2604
+ });
2605
+ }
2606
+ function ComboboxInput({ suppressPasswordManager, className, ...props }) {
2607
+ const { input } = combobox({ theme: useThemeFamily() });
2608
+ return /* @__PURE__ */ jsx(Combobox$1.Input, {
2609
+ "data-slot": "combobox-input",
2610
+ className: input({ className: [suppressPasswordManager && "keeper-ignore", className] }),
2611
+ "data-1p-ignore": suppressPasswordManager ? "true" : void 0,
2612
+ "data-bwignore": suppressPasswordManager ? "true" : void 0,
2613
+ "data-form-type": suppressPasswordManager ? "other" : void 0,
2614
+ "data-lpignore": suppressPasswordManager ? "true" : void 0,
2615
+ ...props
2616
+ });
2617
+ }
2618
+ function ComboboxPortal(props) {
2619
+ return /* @__PURE__ */ jsx(Combobox$1.Portal, {
2620
+ "data-slot": "combobox-portal",
2621
+ ...props
2622
+ });
2623
+ }
2624
+ function ComboboxPopup({ className, ...props }) {
2625
+ const { content } = combobox({ theme: useThemeFamily() });
2626
+ return /* @__PURE__ */ jsx("div", {
2627
+ "data-slot": "combobox-content",
2628
+ className: content({ className }),
2629
+ ...props
2630
+ });
2631
+ }
2632
+ function ComboboxHeader({ className, ...props }) {
2633
+ const { header } = combobox({ theme: useThemeFamily() });
2634
+ return /* @__PURE__ */ jsx("div", {
2635
+ "data-slot": "combobox-header",
2636
+ className: header({ className }),
2637
+ ...props
2638
+ });
2639
+ }
2640
+ function ComboboxSeparator({ className, ...props }) {
2641
+ const { separator } = combobox({ theme: useThemeFamily() });
2642
+ return /* @__PURE__ */ jsx("div", {
2643
+ role: "separator",
2644
+ "aria-orientation": "horizontal",
2645
+ "data-slot": "combobox-separator",
2646
+ className: separator({ className }),
2647
+ ...props
2648
+ });
2649
+ }
2650
+ function ComboboxContent({ align = "start", alignOffset = 0, anchor, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, disableAnchorTracking = true, positionMethod = "fixed", side = "bottom", sideOffset = 4, sticky, portalProps, className, initialFocus = false, finalFocus = false, ...props }) {
2651
+ const { positioner, content } = combobox({ theme: useThemeFamily() });
2652
+ return /* @__PURE__ */ jsx(Combobox$1.Portal, {
2653
+ ...portalProps,
2654
+ children: /* @__PURE__ */ jsx(Combobox$1.Positioner, {
2655
+ align,
2656
+ alignOffset,
2657
+ anchor,
2658
+ arrowPadding,
2659
+ collisionAvoidance,
2660
+ collisionBoundary,
2661
+ collisionPadding,
2662
+ disableAnchorTracking,
2663
+ positionMethod,
2664
+ side,
2665
+ sideOffset,
2666
+ sticky,
2667
+ className: positioner(),
2668
+ children: /* @__PURE__ */ jsx(Combobox$1.Popup, {
2669
+ "data-slot": "combobox-content",
2670
+ className: content({ className }),
2671
+ initialFocus,
2672
+ finalFocus,
2673
+ ...props
2674
+ })
2675
+ })
2676
+ });
2677
+ }
2678
+ function ComboboxList({ className, ...props }) {
2679
+ const { list } = combobox({ theme: useThemeFamily() });
2680
+ return /* @__PURE__ */ jsx(Combobox$1.List, {
2681
+ "data-slot": "combobox-list",
2682
+ className: list({ className }),
2683
+ ...props
2684
+ });
2685
+ }
2686
+ function ComboboxItem({ className, ...props }) {
2687
+ const { item } = combobox({ theme: useThemeFamily() });
2688
+ return /* @__PURE__ */ jsx(Combobox$1.Item, {
2689
+ "data-slot": "combobox-item",
2690
+ className: item({ className }),
2691
+ ...props
2692
+ });
2693
+ }
2694
+ function ComboboxItemIndicator({ className, children, ...props }) {
2695
+ const { itemIndicator } = combobox({ theme: useThemeFamily() });
2696
+ return /* @__PURE__ */ jsx(Combobox$1.ItemIndicator, {
2697
+ "data-slot": "combobox-item-indicator",
2698
+ className: itemIndicator({ className }),
2699
+ ...props,
2700
+ children: children ?? /* @__PURE__ */ jsx(Check, {
2701
+ "aria-hidden": true,
2702
+ className: "size-3.5 shrink-0 stroke-[1.5]"
2703
+ })
2704
+ });
2705
+ }
2706
+ function ComboboxClear({ className, children, keepMounted = true, ...props }) {
2707
+ const theme = useThemeFamily();
2708
+ const { visible } = use(ComboboxClearContext);
2709
+ const { clear } = combobox({ theme });
2710
+ return /* @__PURE__ */ jsx(Combobox$1.Clear, {
2711
+ "data-slot": "combobox-clear",
2712
+ "data-visible": visible ? "" : void 0,
2713
+ "aria-hidden": visible ? props["aria-hidden"] : true,
2714
+ keepMounted,
2715
+ className: clear({ className }),
2716
+ ...props,
2717
+ children: children ?? /* @__PURE__ */ jsx(X, {
2718
+ "aria-hidden": true,
2719
+ className: "size-3.5 shrink-0"
2720
+ })
2721
+ });
2722
+ }
2723
+ function ComboboxEmpty({ className, children, ...props }) {
2724
+ const { empty } = combobox({ theme: useThemeFamily() });
2725
+ return /* @__PURE__ */ jsx(Combobox$1.Empty, {
2726
+ "data-slot": "combobox-empty",
2727
+ ...props,
2728
+ children: children == null ? null : /* @__PURE__ */ jsx("div", {
2729
+ "data-slot": "combobox-empty-content",
2730
+ className: empty({ className }),
2731
+ children
2732
+ })
2733
+ });
2734
+ }
2735
+ function ComboboxGroup({ className, ...props }) {
2736
+ return /* @__PURE__ */ jsx(Combobox$1.Group, {
2737
+ "data-slot": "combobox-group",
2738
+ className,
2739
+ ...props
2740
+ });
2741
+ }
2742
+ function ComboboxGroupLabel({ className, ...props }) {
2743
+ const { groupLabel } = combobox({ theme: useThemeFamily() });
2744
+ return /* @__PURE__ */ jsx(Combobox$1.GroupLabel, {
2745
+ "data-slot": "combobox-group-label",
2746
+ className: groupLabel({ className }),
2747
+ ...props
2748
+ });
2749
+ }
2750
+ function ComboboxRow({ className, ...props }) {
2751
+ return /* @__PURE__ */ jsx(Combobox$1.Row, {
2752
+ "data-slot": "combobox-row",
2753
+ className,
2754
+ ...props
2755
+ });
2756
+ }
2757
+ function ComboboxCollection(props) {
2758
+ return /* @__PURE__ */ jsx(Combobox$1.Collection, {
2759
+ "data-slot": "combobox-collection",
2760
+ ...props
2761
+ });
2762
+ }
2763
+ function ComboboxChips({ className, ...props }) {
2764
+ const { chips } = combobox({ theme: useThemeFamily() });
2765
+ return /* @__PURE__ */ jsx(Combobox$1.Chips, {
2766
+ "data-slot": "combobox-chips",
2767
+ className: chips({ className }),
2768
+ ...props
2769
+ });
2770
+ }
2771
+ function ComboboxChip({ className, ...props }) {
2772
+ const { chip } = combobox({ theme: useThemeFamily() });
2773
+ return /* @__PURE__ */ jsx(Combobox$1.Chip, {
2774
+ "data-slot": "combobox-chip",
2775
+ className: chip({ className }),
2776
+ ...props
2777
+ });
2778
+ }
2779
+ function ComboboxChipRemove({ className, children, ...props }) {
2780
+ const { chipRemove } = combobox({ theme: useThemeFamily() });
2781
+ return /* @__PURE__ */ jsx(Combobox$1.ChipRemove, {
2782
+ "data-slot": "combobox-chip-remove",
2783
+ className: chipRemove({ className }),
2784
+ ...props,
2785
+ children: children ?? /* @__PURE__ */ jsx(X, {
2786
+ "aria-hidden": true,
2787
+ className: "size-3 shrink-0"
2788
+ })
2789
+ });
2790
+ }
2791
+ //#endregion
2792
+ //#region src/components/select/select.tsx
2793
+ const select = tv({
2794
+ slots: {
2795
+ trigger: [
2796
+ "inline-flex select-none items-center justify-between gap-2",
2797
+ "outline-none transition-colors",
2798
+ "data-[placeholder]:text-foreground-placeholder",
2799
+ "aria-invalid:border-danger-base/45 aria-invalid:hover:border-danger-base/75 aria-invalid:focus-visible:border-danger-base/75 aria-invalid:focus-visible:ring-3 aria-invalid:focus-visible:ring-danger-base/12",
2800
+ "[&_[data-slot='button-content']]:w-full [&_[data-slot='button-content']]:justify-between",
2801
+ "[&>span[data-slot='select-trigger-content']]:min-w-0 [&>span[data-slot='select-trigger-content']]:flex-1",
2802
+ "[&_[data-slot='select-trigger-content']_svg]:!size-3.5 [&_[data-slot='select-trigger-content']_svg]:shrink-0 [&_[data-slot='select-trigger-content']_svg]:!stroke-[1.5] [&_[data-slot='select-trigger-content']_svg_*]:!stroke-[1.5]",
2803
+ "[&_[data-slot='select-icon']]:!stroke-[1.5] [&_[data-slot='select-icon']_*]:!stroke-[1.5]"
2804
+ ],
2805
+ icon: ["ml-auto flex shrink-0 items-center justify-center opacity-80"],
2806
+ value: ["flex min-w-0 flex-1 truncate text-left"],
2807
+ positioner: ["isolate z-50 outline-none"],
2808
+ content: ["relative max-h-[var(--available-height)] min-w-[max(var(--anchor-width),220px)] overflow-hidden bg-layer-panel", "outline-none"],
2809
+ list: ["max-h-64 overflow-y-auto overscroll-contain scroll-py-6"],
2810
+ item: ["flex h-8 w-full shrink-0 cursor-default select-none items-center justify-between gap-2 overflow-hidden px-3", "text-left outline-none transition-colors"],
2811
+ itemIndicator: ["pointer-events-none ml-auto flex shrink-0 items-center justify-center"],
2812
+ itemText: ["min-w-0 flex-1 truncate font-normal"],
2813
+ label: ["m-0 font-medium"],
2814
+ groupLabel: ["px-3 py-2"],
2815
+ separator: ["h-px shrink-0 border-0"],
2816
+ scrollArrow: [
2817
+ "absolute inset-x-0 z-10 flex h-6 w-full cursor-default items-center justify-center",
2818
+ "outline-none transition-colors",
2819
+ "data-[direction=up]:top-0 data-[direction=down]:bottom-0",
2820
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0"
2821
+ ],
2822
+ empty: ["px-3 py-4 text-center text-sm"]
2823
+ },
2824
+ variants: { theme: {
2825
+ brutal: {
2826
+ trigger: [
2827
+ "font-sans text-sm font-semibold text-black",
2828
+ "[&_[data-slot='button-content']]:font-semibold [&_[data-slot='select-value']]:font-semibold",
2829
+ "[&_[data-slot='select-value']_svg]:!stroke-2 [&_[data-slot='select-value']_svg_*]:!stroke-2",
2830
+ "data-[popup-open]:translate-x-0 data-[popup-open]:translate-y-0",
2831
+ "data-[popup-open]:hover:translate-x-0 data-[popup-open]:hover:translate-y-0"
2832
+ ],
2833
+ content: ["border-2 border-black bg-white shadow-lg"],
2834
+ item: [
2835
+ "border-b border-black/10 bg-white font-sans text-sm font-semibold leading-6 text-black last:border-b-0",
2836
+ "[&_[data-slot='select-item-text']]:font-semibold",
2837
+ "hover:bg-brutal-yellow/30 data-[highlighted]:bg-brutal-yellow/30",
2838
+ "data-[selected]:bg-brutal-yellow/30",
2839
+ "data-[disabled]:pointer-events-none data-[disabled]:text-black/30",
2840
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:stroke-[1.5] [&_svg_*]:stroke-[1.5] [&_svg:not([class*='size-'])]:size-3",
2841
+ "[&>svg]:!stroke-2 [&>svg_*]:!stroke-2"
2842
+ ],
2843
+ itemIndicator: ["text-black [&_svg]:!stroke-[2.25] [&_svg_*]:!stroke-[2.25]"],
2844
+ label: ["font-sans text-[10px] font-semibold uppercase leading-none tracking-wide text-black"],
2845
+ groupLabel: ["font-sans text-[10px] font-semibold uppercase leading-none tracking-wide text-black/60"],
2846
+ separator: ["bg-black"],
2847
+ scrollArrow: ["border-black bg-white text-black", "data-[direction=up]:border-b data-[direction=down]:border-t"],
2848
+ empty: ["font-sans text-sm font-semibold text-black/50"]
2849
+ },
2850
+ elegant: {
2851
+ trigger: [
2852
+ "text-sm font-medium tracking-[-0.005em] text-foreground-muted",
2853
+ "[&_[data-slot='button-content']]:font-medium [&_[data-slot='select-value']]:font-medium",
2854
+ "[&_svg]:stroke-[1.5] [&_svg_*]:stroke-[1.5]"
2855
+ ],
2856
+ content: ["rounded-md bg-layer-popover", "shadow-lg"],
2857
+ list: ["flex flex-col gap-0.5 px-1 py-1"],
2858
+ item: [
2859
+ "rounded-sm bg-transparent px-2 text-sm font-normal tracking-[-0.005em] text-foreground-muted",
2860
+ "transition-[background-color,color] duration-150",
2861
+ "hover:bg-foreground/[0.04] hover:text-foreground-strong",
2862
+ "data-[highlighted]:bg-foreground/[0.04] data-[highlighted]:text-foreground-strong",
2863
+ "data-[selected]:bg-foreground/[0.04] data-[selected]:text-foreground-strong",
2864
+ "data-[disabled]:pointer-events-none data-[disabled]:text-foreground-disabled",
2865
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:stroke-[1.5] [&_svg_*]:stroke-[1.5] [&_svg:not([class*='size-'])]:size-3.5"
2866
+ ],
2867
+ itemIndicator: ["text-foreground-strong"],
2868
+ label: ["text-[11px] leading-none tracking-[-0.005em] text-foreground-strong"],
2869
+ groupLabel: ["px-2 text-[11px] font-medium leading-none tracking-[-0.005em] text-foreground/45"],
2870
+ separator: ["hidden bg-line-muted"],
2871
+ scrollArrow: ["bg-layer-popover text-foreground-placeholder hover:text-foreground-muted"],
2872
+ empty: ["text-foreground-muted"]
2873
+ }
2874
+ } }
2875
+ });
2876
+ function Select(props) {
2877
+ return /* @__PURE__ */ jsx(Select$1.Root, {
2878
+ "data-slot": "select",
2879
+ ...props
2880
+ });
2881
+ }
2882
+ function SelectTrigger({ className, children, render = /* @__PURE__ */ jsx(Button, {
2883
+ variant: "outline",
2884
+ size: "md"
2885
+ }), ...props }) {
2886
+ const { trigger } = select({ theme: useThemeFamily() });
2887
+ return /* @__PURE__ */ jsx(Select$1.Trigger, {
2888
+ "data-slot": "select-trigger",
2889
+ render,
2890
+ className: trigger({ className }),
2891
+ ...props,
2892
+ children: /* @__PURE__ */ jsx("span", {
2893
+ "data-slot": "select-trigger-content",
2894
+ className: "flex min-w-0 flex-1 items-center gap-1.5",
2895
+ children
2896
+ })
2897
+ });
2898
+ }
2899
+ function SelectValue({ className, ...props }) {
2900
+ const { value } = select({ theme: useThemeFamily() });
2901
+ return /* @__PURE__ */ jsx(Select$1.Value, {
2902
+ "data-slot": "select-value",
2903
+ className: value({ className }),
2904
+ ...props
2905
+ });
2906
+ }
2907
+ function SelectIcon({ className, children, ...props }) {
2908
+ const { icon } = select({ theme: useThemeFamily() });
2909
+ return /* @__PURE__ */ jsx(Select$1.Icon, {
2910
+ "data-slot": "select-icon",
2911
+ className: icon({ className }),
2912
+ ...props,
2913
+ children: children ?? /* @__PURE__ */ jsx(ChevronDown, {
2914
+ "aria-hidden": true,
2915
+ className: "size-3.5 shrink-0"
2916
+ })
2917
+ });
2918
+ }
2919
+ function SelectPortal(props) {
2920
+ return /* @__PURE__ */ jsx(Select$1.Portal, {
2921
+ "data-slot": "select-portal",
2922
+ ...props
2923
+ });
2924
+ }
2925
+ function SelectPopup({ className, ...props }) {
2926
+ const { content } = select({ theme: useThemeFamily() });
2927
+ return /* @__PURE__ */ jsx("div", {
2928
+ "data-slot": "select-content",
2929
+ className: content({ className }),
2930
+ ...props
2931
+ });
2932
+ }
2933
+ function SelectContent({ align = "start", alignItemWithTrigger = false, alignOffset = 0, anchor, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, disableAnchorTracking = true, positionMethod = "fixed", side = "bottom", sideOffset = 4, sticky, portalProps, className, ...props }) {
2934
+ const { positioner, content } = select({ theme: useThemeFamily() });
2935
+ const positionerNode = /* @__PURE__ */ jsx(Select$1.Positioner, {
2936
+ align,
2937
+ alignItemWithTrigger,
2938
+ alignOffset,
2939
+ anchor,
2940
+ arrowPadding,
2941
+ collisionAvoidance,
2942
+ collisionBoundary,
2943
+ collisionPadding,
2944
+ disableAnchorTracking,
2945
+ positionMethod,
2946
+ side,
2947
+ sideOffset,
2948
+ sticky,
2949
+ className: positioner(),
2950
+ children: /* @__PURE__ */ jsx(Select$1.Popup, {
2951
+ "data-slot": "select-content",
2952
+ className: content({ className }),
2953
+ ...props
2954
+ })
2955
+ });
2956
+ return /* @__PURE__ */ jsx(Select$1.Portal, {
2957
+ ...portalProps,
2958
+ children: positionerNode
2959
+ });
2960
+ }
2961
+ function SelectList({ className, ...props }) {
2962
+ const { list } = select({ theme: useThemeFamily() });
2963
+ return /* @__PURE__ */ jsx(Select$1.List, {
2964
+ "data-slot": "select-list",
2965
+ className: list({ className }),
2966
+ ...props
2967
+ });
2968
+ }
2969
+ function SelectItem({ className, ...props }) {
2970
+ const { item } = select({ theme: useThemeFamily() });
2971
+ return /* @__PURE__ */ jsx(Select$1.Item, {
2972
+ "data-slot": "select-item",
2973
+ className: item({ className }),
2974
+ ...props
2975
+ });
2976
+ }
2977
+ function SelectItemIndicator({ className, children, ...props }) {
2978
+ const theme = useThemeFamily();
2979
+ const { itemIndicator } = select({ theme });
2980
+ const defaultIndicator = theme === "brutal" ? /* @__PURE__ */ jsx(Check, {
2981
+ "aria-hidden": true,
2982
+ size: 12,
2983
+ className: "shrink-0 !stroke-[2.25]"
2984
+ }) : /* @__PURE__ */ jsx(Check, {
2985
+ "aria-hidden": true,
2986
+ className: "size-3 shrink-0"
2987
+ });
2988
+ return /* @__PURE__ */ jsx(Select$1.ItemIndicator, {
2989
+ "data-slot": "select-item-indicator",
2990
+ className: itemIndicator({ className }),
2991
+ ...props,
2992
+ children: children ?? defaultIndicator
2993
+ });
2994
+ }
2995
+ function SelectItemText({ className, ...props }) {
2996
+ const { itemText } = select({ theme: useThemeFamily() });
2997
+ return /* @__PURE__ */ jsx(Select$1.ItemText, {
2998
+ "data-slot": "select-item-text",
2999
+ className: itemText({ className }),
3000
+ ...props
3001
+ });
3002
+ }
3003
+ function SelectLabel({ className, ...props }) {
3004
+ const { label } = select({ theme: useThemeFamily() });
3005
+ return /* @__PURE__ */ jsx(Select$1.Label, {
3006
+ "data-slot": "select-label",
3007
+ className: label({ className }),
3008
+ ...props
3009
+ });
3010
+ }
3011
+ function SelectGroup({ className, ...props }) {
3012
+ return /* @__PURE__ */ jsx(Select$1.Group, {
3013
+ "data-slot": "select-group",
3014
+ className,
3015
+ ...props
3016
+ });
3017
+ }
3018
+ function SelectGroupLabel({ className, ...props }) {
3019
+ const { groupLabel } = select({ theme: useThemeFamily() });
3020
+ return /* @__PURE__ */ jsx(Select$1.GroupLabel, {
3021
+ "data-slot": "select-group-label",
3022
+ className: groupLabel({ className }),
3023
+ ...props
3024
+ });
3025
+ }
3026
+ function SelectSeparator({ className, ...props }) {
3027
+ const { separator } = select({ theme: useThemeFamily() });
3028
+ return /* @__PURE__ */ jsx("div", {
3029
+ role: "separator",
3030
+ "aria-orientation": "horizontal",
3031
+ "data-slot": "select-separator",
3032
+ className: separator({ className }),
3033
+ ...props
3034
+ });
3035
+ }
3036
+ function SelectScrollUpArrow({ className, children, ...props }) {
3037
+ const { scrollArrow } = select({ theme: useThemeFamily() });
3038
+ return /* @__PURE__ */ jsx(Select$1.ScrollUpArrow, {
3039
+ "data-slot": "select-scroll-up-arrow",
3040
+ "data-direction": "up",
3041
+ className: scrollArrow({ className }),
3042
+ ...props,
3043
+ children: children ?? /* @__PURE__ */ jsx(ChevronDown, {
3044
+ "aria-hidden": true,
3045
+ className: "size-3.5 shrink-0 rotate-180"
3046
+ })
3047
+ });
3048
+ }
3049
+ function SelectScrollDownArrow({ className, children, ...props }) {
3050
+ const { scrollArrow } = select({ theme: useThemeFamily() });
3051
+ return /* @__PURE__ */ jsx(Select$1.ScrollDownArrow, {
3052
+ "data-slot": "select-scroll-down-arrow",
3053
+ "data-direction": "down",
3054
+ className: scrollArrow({ className }),
3055
+ ...props,
3056
+ children: children ?? /* @__PURE__ */ jsx(ChevronDown, {
3057
+ "aria-hidden": true,
3058
+ className: "size-3.5 shrink-0"
3059
+ })
3060
+ });
3061
+ }
3062
+ function SelectArrow({ className, ...props }) {
3063
+ return /* @__PURE__ */ jsx(Select$1.Arrow, {
3064
+ "data-slot": "select-arrow",
3065
+ className,
3066
+ ...props
3067
+ });
3068
+ }
3069
+ //#endregion
3070
+ //#region src/components/radio-group/radio-group.tsx
3071
+ const radioGroup = tv({
3072
+ slots: {
3073
+ root: [
3074
+ "grid w-full gap-2",
3075
+ "data-[disabled]:[&>label]:cursor-not-allowed data-[disabled]:[&>label]:text-foreground-disabled",
3076
+ "data-[disabled]:[&>label_*]:text-foreground-disabled"
3077
+ ],
3078
+ item: [
3079
+ "relative inline-flex shrink-0 touch-manipulation items-center justify-center rounded-full outline-none",
3080
+ "data-[disabled]:cursor-not-allowed",
3081
+ "after:absolute after:-inset-x-3 after:-inset-y-2 after:content-['']"
3082
+ ],
3083
+ indicator: ["pointer-events-none flex size-full items-center justify-center"],
3084
+ dot: ["block rounded-full bg-current"]
3085
+ },
3086
+ variants: { theme: {
3087
+ brutal: {
3088
+ root: ["font-sans [&>label]:font-medium"],
3089
+ item: [
3090
+ "size-4 border-2 border-line-strong bg-layer-panel text-foreground-strong",
3091
+ "hover:bg-primary-400/30 data-[checked]:bg-primary-400",
3092
+ "data-[disabled]:border-line-muted data-[disabled]:bg-layer-muted data-[disabled]:text-line data-[disabled]:hover:bg-layer-muted",
3093
+ "data-[checked]:data-[disabled]:bg-layer-muted",
3094
+ "focus-visible:ring-2 focus-visible:ring-line-focus focus-visible:ring-offset-2 focus-visible:ring-offset-background"
3095
+ ],
3096
+ dot: "size-1.5"
3097
+ },
3098
+ elegant: {
3099
+ root: "gap-2.5",
3100
+ item: [
3101
+ "size-3.5 bg-layer-panel text-foreground-inverse",
3102
+ "shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.05),0_1px_1.5px_-1px_oklch(0_0_0_/_0.035),0_0_0_1px_var(--line-subtle)]",
3103
+ "hover:bg-foreground/[0.04] data-[checked]:bg-foreground-strong",
3104
+ "data-[checked]:shadow-[0_1px_1.5px_-1px_oklch(0_0_0_/_0.08),0_0_0_1px_oklch(0_0_0_/_0.68)]",
3105
+ "data-[disabled]:bg-layer-muted data-[disabled]:text-line data-[disabled]:shadow-[0_1px_1px_-1px_oklch(0_0_0_/_0.02),0_0_0_1px_var(--line-subtle)] data-[disabled]:hover:bg-layer-muted",
3106
+ "data-[checked]:data-[disabled]:bg-layer-muted data-[checked]:data-[disabled]:shadow-[0_1px_1px_-1px_oklch(0_0_0_/_0.02),0_0_0_1px_var(--line-subtle)]",
3107
+ "active:scale-[0.96] data-[disabled]:active:scale-100 motion-reduce:active:scale-100",
3108
+ "focus-visible:ring-2 focus-visible:ring-line-focus focus-visible:ring-offset-2 focus-visible:ring-offset-background"
3109
+ ],
3110
+ dot: "size-1.5"
3111
+ }
3112
+ } }
3113
+ });
3114
+ function RadioGroup({ ariaLabel, className, ...props }) {
3115
+ const { root } = radioGroup({ theme: useThemeFamily() });
3116
+ return /* @__PURE__ */ jsx(RadioGroup$1, {
3117
+ "aria-label": ariaLabel,
3118
+ "data-slot": "radio-group",
3119
+ className: root({ className }),
3120
+ ...props
3121
+ });
3122
+ }
3123
+ function RadioGroupIndicator({ className, children, ...props }) {
3124
+ const { indicator, dot } = radioGroup({ theme: useThemeFamily() });
3125
+ return /* @__PURE__ */ jsx(Radio.Indicator, {
3126
+ "data-slot": "radio-group-indicator",
3127
+ className: indicator({ className }),
3128
+ ...props,
3129
+ children: children ?? /* @__PURE__ */ jsx("span", {
3130
+ "data-slot": "radio-group-dot",
3131
+ className: dot()
3132
+ })
3133
+ });
3134
+ }
3135
+ function RadioGroupItem({ appearance = "default", className, children, ...props }) {
3136
+ const { item } = radioGroup({ theme: useThemeFamily() });
3137
+ const itemClassName = appearance === "none" ? cn("sr-only", "data-[disabled]:cursor-not-allowed", className) : item({ className });
3138
+ return /* @__PURE__ */ jsx(Radio.Root, {
3139
+ "data-slot": "radio-group-item",
3140
+ className: itemClassName,
3141
+ ...props,
3142
+ children: children ?? (appearance === "default" ? /* @__PURE__ */ jsx(RadioGroupIndicator, {}) : null)
3143
+ });
3144
+ }
3145
+ //#endregion
3146
+ //#region src/components/segmented-control/segmented-control.tsx
3147
+ const segmentedControl = tv({
3148
+ slots: {
3149
+ root: ["inline-flex max-w-full flex-wrap items-center gap-1"],
3150
+ item: [
3151
+ "inline-flex min-w-0 shrink-0 items-center gap-1.5",
3152
+ "text-xs leading-4 transition-colors",
3153
+ "outline-none disabled:pointer-events-none",
3154
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5"
3155
+ ],
3156
+ label: ["truncate"],
3157
+ count: ["font-mono text-xs leading-4"]
3158
+ },
3159
+ variants: {
3160
+ theme: {
3161
+ brutal: {
3162
+ item: [
3163
+ "border-2 border-line-strong bg-layer-panel px-2 py-1.5 font-semibold text-foreground-strong",
3164
+ "has-[svg]:pl-1.5 has-[[data-slot=segmented-control-count]]:pr-1.5",
3165
+ "[&_svg]:stroke-[2.5]",
3166
+ "hover:bg-primary-400/30 data-[checked]:bg-primary-400 data-[checked]:text-foreground-strong",
3167
+ "data-[disabled]:cursor-not-allowed"
3168
+ ],
3169
+ count: ["font-bold text-foreground/65", "group-data-[checked]/segmented-control-item:text-foreground/70"]
3170
+ },
3171
+ elegant: {
3172
+ root: ["gap-1.5"],
3173
+ item: [
3174
+ "rounded-sm bg-layer-panel px-2.5 py-2 font-medium text-foreground-strong antialiased",
3175
+ "has-[svg]:pl-2 has-[[data-slot=segmented-control-count]]:pr-2",
3176
+ "shadow-[inset_0_1px_0.5px_oklch(1_0_0_/_0.05),0_1px_1.5px_-1px_oklch(0_0_0_/_0.035),0_0_0_1px_var(--line-subtle)]",
3177
+ "data-[unchecked]:hover:bg-[color-mix(in_oklch,var(--layer-muted)_55%,var(--layer-panel))]",
3178
+ "data-[checked]:bg-primary-400 data-[checked]:text-primary-950 data-[checked]:hover:bg-[oklch(0.86_0.15_91.89)]",
3179
+ "data-[checked]:shadow-[0_1px_1.5px_-1px_oklch(0.85_0.162_91.89_/_0.08),0_0_0_1px_oklch(0.83_0.14_91.89_/_0.68)]",
3180
+ "focus-visible:ring-2 focus-visible:ring-line-focus",
3181
+ "data-[disabled]:cursor-not-allowed"
3182
+ ],
3183
+ count: ["text-foreground-placeholder", "group-data-[checked]/segmented-control-item:text-primary-950/60"]
3184
+ }
3185
+ },
3186
+ disabled: {
3187
+ true: { root: "opacity-50" },
3188
+ false: { root: "" }
3189
+ }
3190
+ },
3191
+ defaultVariants: { disabled: false }
3192
+ });
3193
+ function SegmentedControl({ ariaLabel, disabled = false, className, ...props }) {
3194
+ const { root } = segmentedControl({
3195
+ disabled,
3196
+ theme: useThemeFamily()
3197
+ });
3198
+ return /* @__PURE__ */ jsx(RadioGroup$1, {
3199
+ "aria-label": ariaLabel,
3200
+ disabled,
3201
+ "data-slot": "segmented-control",
3202
+ className: root({ className }),
3203
+ ...props
3204
+ });
3205
+ }
3206
+ function SegmentedControlItem({ className, ...props }) {
3207
+ const { item } = segmentedControl({ theme: useThemeFamily() });
3208
+ return /* @__PURE__ */ jsx(Radio.Root, {
3209
+ render: /* @__PURE__ */ jsx("button", { type: "button" }),
3210
+ nativeButton: true,
3211
+ "data-slot": "segmented-control-item",
3212
+ className: item({ className: `group/segmented-control-item ${className ?? ""}`.trim() }),
3213
+ ...props
3214
+ });
3215
+ }
3216
+ function SegmentedControlLabel({ className, ...props }) {
3217
+ const { label } = segmentedControl();
3218
+ return /* @__PURE__ */ jsx("span", {
3219
+ "data-slot": "segmented-control-label",
3220
+ className: label({ className }),
3221
+ ...props
3222
+ });
3223
+ }
3224
+ function SegmentedControlCount({ className, ...props }) {
3225
+ const { count } = segmentedControl({ theme: useThemeFamily() });
3226
+ return /* @__PURE__ */ jsx("span", {
3227
+ "data-slot": "segmented-control-count",
3228
+ className: count({ className }),
3229
+ ...props
3230
+ });
3231
+ }
3232
+ //#endregion
3233
+ //#region src/components/textarea/textarea.tsx
3234
+ const textarea = tv({
3235
+ slots: { root: ["block w-full min-h-24 resize-y px-3 py-2 outline-none"] },
3236
+ variants: { theme: {
3237
+ brutal: { root: [
3238
+ "border-2 border-line-strong bg-layer-panel font-heading",
3239
+ "shadow-sm focus:shadow-md",
3240
+ "aria-invalid:border-brutal-red aria-invalid:bg-brutal-red/5 aria-invalid:shadow-none aria-invalid:ring-2 aria-invalid:ring-brutal-red/60",
3241
+ "disabled:cursor-not-allowed disabled:opacity-60 disabled:shadow-none"
3242
+ ] },
3243
+ elegant: { root: [
3244
+ "rounded-md border border-[oklch(0.94_0_0)] bg-layer-field shadow-none",
3245
+ "text-sm text-[oklch(0.205_0_0)] transition duration-200 ease-out dark:text-foreground",
3246
+ "placeholder:text-foreground-placeholder/70",
3247
+ "hover:not-aria-invalid:border-[oklch(0.91_0_0)] hover:shadow-[oklch(0_0_0_/_0)_0px_0px_0px_0px,oklch(0_0_0_/_0)_0px_0px_0px_0px,oklch(0.159_0.016_266.594_/_0.03)_0px_1px_2px_0px]",
3248
+ "focus:border-line-strong/25 focus:bg-layer-field",
3249
+ "focus-visible:ring-2 focus-visible:ring-line-strong/8",
3250
+ "aria-invalid:border-danger-base/45 aria-invalid:hover:border-danger-base/75 aria-invalid:focus-visible:border-danger-base/75 aria-invalid:focus-visible:ring-3 aria-invalid:focus-visible:ring-danger-base/12",
3251
+ "disabled:cursor-not-allowed disabled:border-line-subtle/60 disabled:bg-layer-muted/50 disabled:text-foreground-disabled disabled:placeholder:text-foreground-disabled",
3252
+ "disabled:hover:border-line-subtle/60 disabled:hover:shadow-none",
3253
+ "aria-invalid:disabled:border-line-subtle/60 aria-invalid:disabled:ring-0"
3254
+ ] }
3255
+ } }
3256
+ });
3257
+ const textareaGroup = tv({
3258
+ slots: { root: ["w-full"] },
3259
+ variants: { theme: {
3260
+ brutal: { root: "flex flex-col items-end gap-1" },
3261
+ elegant: { root: [
3262
+ "relative",
3263
+ "has-[>[data-slot=textarea-counter]]:[&>[data-slot=textarea]]:scroll-pb-6",
3264
+ "has-[>[data-slot=textarea-counter]]:[&>[data-slot=textarea]]:pr-16",
3265
+ "[&>[data-slot=textarea-counter]]:pointer-events-none [&>[data-slot=textarea-counter]]:absolute",
3266
+ "[&>[data-slot=textarea-counter]]:right-3 [&>[data-slot=textarea-counter]]:bottom-2.5 [&>[data-slot=textarea-counter]]:z-10"
3267
+ ] }
3268
+ } }
3269
+ });
3270
+ const textareaCounter = tv({
3271
+ slots: { root: ["font-mono text-xs tabular-nums"] },
3272
+ variants: {
3273
+ theme: {
3274
+ brutal: { root: ["text-foreground/50", "group-data-[invalid]/field:font-bold group-data-[invalid]/field:text-danger-base"] },
3275
+ elegant: { root: ["text-[11px] leading-none text-foreground-placeholder/80 transition duration-200 ease-out", "group-data-[invalid]/field:font-medium group-data-[invalid]/field:text-danger-base"] }
3276
+ },
3277
+ overLimit: {
3278
+ true: { root: "text-danger-base" },
3279
+ false: { root: "" }
3280
+ }
3281
+ },
3282
+ defaultVariants: { overLimit: false }
3283
+ });
3284
+ function TextareaGroup({ className, ...props }) {
3285
+ const { root } = textareaGroup({ theme: useThemeFamily() });
3286
+ return /* @__PURE__ */ jsx("div", {
3287
+ "data-slot": "textarea-group",
3288
+ className: root({ className }),
3289
+ ...props
3290
+ });
3291
+ }
3292
+ function Textarea({ className, ...props }) {
3293
+ const { root } = textarea({ theme: useThemeFamily() });
3294
+ return /* @__PURE__ */ jsx("textarea", {
3295
+ "data-slot": "textarea",
3296
+ className: root({ className }),
3297
+ ...props
3298
+ });
3299
+ }
3300
+ function TextareaCounter({ value, count, limit, getLength, className, ...props }) {
3301
+ const theme = useThemeFamily();
3302
+ const text = value ?? "";
3303
+ const length = count ?? getLength?.(text) ?? text.length;
3304
+ const { root } = textareaCounter({
3305
+ theme,
3306
+ overLimit: length > limit
3307
+ });
3308
+ return /* @__PURE__ */ jsxs("span", {
3309
+ "data-slot": "textarea-counter",
3310
+ className: root({ className }),
3311
+ ...props,
3312
+ children: [
3313
+ length,
3314
+ "/",
3315
+ limit
3316
+ ]
3317
+ });
3318
+ }
3319
+ //#endregion
3320
+ //#region src/components/avatar/avatar.tsx
3321
+ const avatar = tv({
3322
+ slots: {
3323
+ root: ["group/avatar relative flex shrink-0 items-center justify-center select-none"],
3324
+ image: ["size-full object-cover"],
3325
+ fallback: [
3326
+ "flex size-full items-center justify-center",
3327
+ "[&>svg]:size-4",
3328
+ "group-data-[size=xl]/avatar:[&>svg]:size-6",
3329
+ "group-data-[size=lg]/avatar:[&>svg]:size-6",
3330
+ "group-data-[size=md]/avatar:[&>svg]:size-[18px]",
3331
+ "group-data-[size=sm]/avatar:[&>svg]:size-4",
3332
+ "group-data-[size=xs]/avatar:[&>svg]:size-3",
3333
+ "group-data-[size=2xs]/avatar:[&>svg]:size-2.5"
3334
+ ],
3335
+ badge: [
3336
+ "absolute right-0 bottom-0 z-10 translate-x-1/4 translate-y-1/4 select-none",
3337
+ "inline-flex items-center justify-center rounded-full outline-2 outline-white",
3338
+ "size-2 [&>svg]:hidden",
3339
+ "group-data-[size=xl]/avatar:size-3.5 group-data-[size=xl]/avatar:[&>svg]:size-2 group-data-[size=xl]/avatar:[&>svg]:block",
3340
+ "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2 group-data-[size=lg]/avatar:[&>svg]:block",
3341
+ "group-data-[size=md]/avatar:size-2.5 group-data-[size=md]/avatar:[&>svg]:size-1.5 group-data-[size=md]/avatar:[&>svg]:block",
3342
+ "group-data-[size=sm]/avatar:size-2",
3343
+ "group-data-[size=xs]/avatar:size-1.5 group-data-[size=xs]/avatar:outline",
3344
+ "group-data-[size=2xs]/avatar:size-1.5 group-data-[size=2xs]/avatar:outline"
3345
+ ],
3346
+ group: ["group/avatar-group flex items-center"]
3347
+ },
3348
+ variants: {
3349
+ theme: {
3350
+ brutal: {
3351
+ root: "border-line-strong",
3352
+ fallback: "text-black",
3353
+ badge: ["bg-success-base text-foreground-strong"],
3354
+ group: [
3355
+ "-space-x-1.5",
3356
+ "*:data-[slot=avatar]:outline *:data-[slot=avatar]:outline-2 *:data-[slot=avatar]:outline-primary-50",
3357
+ "*:data-[slot=avatar-group-count]:outline *:data-[slot=avatar-group-count]:outline-2 *:data-[slot=avatar-group-count]:outline-primary-50"
3358
+ ]
3359
+ },
3360
+ elegant: {
3361
+ root: ["bg-layer-muted"],
3362
+ image: ["rounded-full"],
3363
+ fallback: [
3364
+ "overflow-hidden bg-layer-muted text-foreground-placeholder/70 text-sm",
3365
+ "rounded-full",
3366
+ "group-data-[size=xs]/avatar:text-xs",
3367
+ "group-data-[size=2xs]/avatar:text-[10px]"
3368
+ ],
3369
+ badge: [
3370
+ "translate-x-0 translate-y-0 bg-success-base text-foreground-inverse",
3371
+ "right-0.5 bottom-0.5",
3372
+ "group-data-[size=xl]/avatar:right-1 group-data-[size=xl]/avatar:bottom-1",
3373
+ "group-data-[size=lg]/avatar:right-0.75 group-data-[size=lg]/avatar:bottom-0.75"
3374
+ ],
3375
+ group: [
3376
+ "-space-x-2",
3377
+ "*:data-[slot=avatar]:outline *:data-[slot=avatar]:outline-2 *:data-[slot=avatar]:outline-background",
3378
+ "*:data-[slot=avatar-group-count]:outline *:data-[slot=avatar-group-count]:outline-2 *:data-[slot=avatar-group-count]:outline-background"
3379
+ ]
3380
+ }
3381
+ },
3382
+ type: {
3383
+ agent: {},
3384
+ human: {}
3385
+ },
3386
+ size: {
3387
+ xl: { root: "size-16" },
3388
+ lg: { root: "size-12" },
3389
+ md: { root: "size-9" },
3390
+ sm: { root: "size-8" },
3391
+ xs: { root: "size-5" },
3392
+ "2xs": { root: "size-[14px]" }
3393
+ }
3394
+ },
3395
+ compoundVariants: [
3396
+ {
3397
+ theme: "brutal",
3398
+ size: [
3399
+ "xl",
3400
+ "lg",
3401
+ "md",
3402
+ "sm"
3403
+ ],
3404
+ class: { root: "border-2" }
3405
+ },
3406
+ {
3407
+ theme: "brutal",
3408
+ size: ["xs", "2xs"],
3409
+ class: { root: "border" }
3410
+ },
3411
+ {
3412
+ theme: "brutal",
3413
+ type: "agent",
3414
+ class: { root: "bg-info-base" }
3415
+ },
3416
+ {
3417
+ theme: "brutal",
3418
+ type: "human",
3419
+ class: { root: "bg-brutal-purple text-foreground-strong" }
3420
+ },
3421
+ {
3422
+ theme: "elegant",
3423
+ size: "xl",
3424
+ class: { root: "rounded-full" }
3425
+ },
3426
+ {
3427
+ theme: "elegant",
3428
+ size: "lg",
3429
+ class: { root: "rounded-full" }
3430
+ },
3431
+ {
3432
+ theme: "elegant",
3433
+ size: ["md", "sm"],
3434
+ class: { root: "rounded-full" }
3435
+ },
3436
+ {
3437
+ theme: "elegant",
3438
+ size: "xs",
3439
+ class: { root: "rounded-full" }
3440
+ },
3441
+ {
3442
+ theme: "elegant",
3443
+ size: "2xs",
3444
+ class: { root: "rounded-full" }
3445
+ },
3446
+ {
3447
+ theme: "elegant",
3448
+ type: "agent",
3449
+ class: { root: "text-foreground-muted" }
3450
+ },
3451
+ {
3452
+ theme: "elegant",
3453
+ type: "human",
3454
+ class: { root: "text-foreground-muted" }
3455
+ }
3456
+ ]
3457
+ });
3458
+ function Avatar({ size, type, className, children, ...props }) {
3459
+ const { root } = avatar({
3460
+ theme: useThemeFamily(),
3461
+ type,
3462
+ size
3463
+ });
3464
+ return /* @__PURE__ */ jsx(Avatar$1.Root, {
3465
+ "data-slot": "avatar",
3466
+ "data-size": size,
3467
+ className: root({ className }),
3468
+ ...props,
3469
+ children: children ?? /* @__PURE__ */ jsx(AvatarFallback, {})
3470
+ });
3471
+ }
3472
+ function AvatarImage({ className, ...props }) {
3473
+ const { image } = avatar({ theme: useThemeFamily() });
3474
+ return /* @__PURE__ */ jsx(Avatar$1.Image, {
3475
+ "data-slot": "avatar-image",
3476
+ className: image({ className }),
3477
+ ...props
3478
+ });
3479
+ }
3480
+ function AvatarFallbackIcon() {
3481
+ return /* @__PURE__ */ jsx("svg", {
3482
+ xmlns: "http://www.w3.org/2000/svg",
3483
+ width: "18",
3484
+ height: "18",
3485
+ viewBox: "0 0 18 18",
3486
+ "aria-hidden": "true",
3487
+ focusable: "false",
3488
+ children: /* @__PURE__ */ jsxs("g", {
3489
+ fill: "none",
3490
+ strokeLinecap: "round",
3491
+ strokeLinejoin: "round",
3492
+ strokeWidth: "1",
3493
+ stroke: "currentColor",
3494
+ children: [
3495
+ /* @__PURE__ */ jsx("circle", {
3496
+ cx: "9",
3497
+ cy: "7.75",
3498
+ r: "2"
3499
+ }),
3500
+ /* @__PURE__ */ jsx("path", { d: "M9,16.25c1.407,0,2.716-.407,3.827-1.101-.481-1.67-2.003-2.899-3.827-2.899s-3.347,1.229-3.827,2.899c1.112,.694,2.42,1.101,3.827,1.101Z" }),
3501
+ /* @__PURE__ */ jsx("circle", {
3502
+ cx: "1.889",
3503
+ cy: "10.414",
3504
+ r: ".75",
3505
+ fill: "currentColor",
3506
+ "data-stroke": "none",
3507
+ stroke: "none"
3508
+ }),
3509
+ /* @__PURE__ */ jsx("circle", {
3510
+ cx: "2.971",
3511
+ cy: "4.972",
3512
+ r: ".75",
3513
+ fill: "currentColor",
3514
+ "data-stroke": "none",
3515
+ stroke: "none"
3516
+ }),
3517
+ /* @__PURE__ */ jsx("circle", {
3518
+ cx: "2.972",
3519
+ cy: "13.027",
3520
+ r: ".75",
3521
+ fill: "currentColor",
3522
+ "data-stroke": "none",
3523
+ stroke: "none"
3524
+ }),
3525
+ /* @__PURE__ */ jsx("circle", {
3526
+ cx: "1.89",
3527
+ cy: "7.586",
3528
+ r: ".75",
3529
+ fill: "currentColor",
3530
+ "data-stroke": "none",
3531
+ stroke: "none"
3532
+ }),
3533
+ /* @__PURE__ */ jsx("circle", {
3534
+ cx: "4.973",
3535
+ cy: "2.972",
3536
+ r: ".75",
3537
+ fill: "currentColor",
3538
+ "data-stroke": "none",
3539
+ stroke: "none"
3540
+ }),
3541
+ /* @__PURE__ */ jsx("circle", {
3542
+ cx: "7.586",
3543
+ cy: "1.889",
3544
+ r: ".75",
3545
+ fill: "currentColor",
3546
+ "data-stroke": "none",
3547
+ stroke: "none"
3548
+ }),
3549
+ /* @__PURE__ */ jsx("circle", {
3550
+ cx: "15.029",
3551
+ cy: "13.028",
3552
+ r: ".75",
3553
+ fill: "currentColor",
3554
+ "data-stroke": "none",
3555
+ stroke: "none"
3556
+ }),
3557
+ /* @__PURE__ */ jsx("circle", {
3558
+ cx: "16.111",
3559
+ cy: "7.586",
3560
+ r: ".75",
3561
+ fill: "currentColor",
3562
+ "data-stroke": "none",
3563
+ stroke: "none"
3564
+ }),
3565
+ /* @__PURE__ */ jsx("circle", {
3566
+ cx: "13.028",
3567
+ cy: "2.971",
3568
+ r: ".75",
3569
+ fill: "currentColor",
3570
+ "data-stroke": "none",
3571
+ stroke: "none"
3572
+ }),
3573
+ /* @__PURE__ */ jsx("circle", {
3574
+ cx: "16.11",
3575
+ cy: "10.414",
3576
+ r: ".75",
3577
+ fill: "currentColor",
3578
+ "data-stroke": "none",
3579
+ stroke: "none"
3580
+ }),
3581
+ /* @__PURE__ */ jsx("circle", {
3582
+ cx: "15.028",
3583
+ cy: "4.973",
3584
+ r: ".75",
3585
+ fill: "currentColor",
3586
+ "data-stroke": "none",
3587
+ stroke: "none"
3588
+ }),
3589
+ /* @__PURE__ */ jsx("circle", {
3590
+ cx: "10.414",
3591
+ cy: "1.89",
3592
+ r: ".75",
3593
+ fill: "currentColor",
3594
+ "data-stroke": "none",
3595
+ stroke: "none"
3596
+ })
3597
+ ]
3598
+ })
3599
+ });
3600
+ }
3601
+ function AvatarFallback({ className, children, ...props }) {
3602
+ const { fallback } = avatar({ theme: useThemeFamily() });
3603
+ return /* @__PURE__ */ jsx(Avatar$1.Fallback, {
3604
+ "data-slot": "avatar-fallback",
3605
+ className: fallback({ className }),
3606
+ ...props,
3607
+ children: children ?? /* @__PURE__ */ jsx(AvatarFallbackIcon, {})
3608
+ });
3609
+ }
3610
+ function AvatarBadge({ className, ...props }) {
3611
+ const { badge } = avatar({ theme: useThemeFamily() });
3612
+ return /* @__PURE__ */ jsx("span", {
3613
+ "data-slot": "avatar-badge",
3614
+ className: badge({ className }),
3615
+ ...props
3616
+ });
3617
+ }
3618
+ function AvatarGroup({ className, ...props }) {
3619
+ const { group } = avatar({ theme: useThemeFamily() });
3620
+ return /* @__PURE__ */ jsx("div", {
3621
+ "data-slot": "avatar-group",
3622
+ className: group({ className }),
3623
+ ...props
3624
+ });
3625
+ }
3626
+ function AvatarGroupCount({ size, className, ...props }) {
3627
+ const theme = useThemeFamily();
3628
+ const { root } = avatar({
3629
+ theme,
3630
+ size
3631
+ });
3632
+ return /* @__PURE__ */ jsx("span", {
3633
+ "data-slot": "avatar-group-count",
3634
+ className: root({ class: [theme === "elegant" ? "bg-layer-muted font-medium text-xs leading-none tabular-nums text-foreground-muted" : "bg-secondary-400 font-bold text-xs leading-none tabular-nums text-foreground-strong", className] }),
3635
+ ...props
3636
+ });
3637
+ }
3638
+ //#endregion
3639
+ //#region src/components/inline-code/inline-code.tsx
3640
+ const inlineCode = tv({
3641
+ slots: { root: [] },
3642
+ variants: { theme: {
3643
+ brutal: { root: "border border-black bg-brutal-yellow/40 px-1 text-sm font-mono text-black [overflow-wrap:anywhere]" },
3644
+ elegant: { root: [
3645
+ "inline-flex items-center rounded px-2 py-0.5",
3646
+ "font-mono text-xs font-medium",
3647
+ "bg-layer-muted text-[oklch(0.38_0_0)] dark:text-[oklch(0.78_0_0)]",
3648
+ "shadow-[0_0.5px_0.5px_-0.5px_oklch(0_0_0_/_0.08)]"
3649
+ ] }
3650
+ } }
3651
+ });
3652
+ function InlineCode({ className, ...props }) {
3653
+ const { root } = inlineCode({ theme: useThemeFamily() });
3654
+ return /* @__PURE__ */ jsx("code", {
3655
+ "data-slot": "inline-code",
3656
+ className: root({ className }),
3657
+ ...props
3658
+ });
3659
+ }
3660
+ //#endregion
3661
+ //#region src/components/status/status.tsx
3662
+ const STATUS_STYLE = `
3663
+ @keyframes raft-status-pulse-background {
3664
+ 0% {
3665
+ box-shadow: 0 0 0 1px color-mix(in oklch, var(--status-color) 42%, transparent);
3666
+ }
3667
+ 70%,
3668
+ 100% {
3669
+ box-shadow: 0 0 0 8px color-mix(in oklch, var(--status-color) 0%, transparent);
3670
+ }
3671
+ }
3672
+ `;
3673
+ const status = tv({
3674
+ extend: tv({
3675
+ slots: { root: ["relative inline-block shrink-0 rounded-full", "[background-color:var(--status-color)]"] },
3676
+ variants: {
3677
+ theme: {
3678
+ brutal: { root: "border border-line-strong" },
3679
+ elegant: {}
3680
+ },
3681
+ variant: {
3682
+ default: { root: "[--status-color:var(--color-gray-400)]" },
3683
+ primary: { root: "[--status-color:var(--color-primary-400)]" },
3684
+ information: { root: "[--status-color:var(--color-info-base)]" },
3685
+ muted: { root: "[--status-color:var(--color-secondary-400)]" },
3686
+ accent: { root: "[--status-color:var(--color-accent-400)]" },
3687
+ success: { root: "[--status-color:var(--color-success-base)]" },
3688
+ warning: { root: "[--status-color:var(--color-warning-base)]" },
3689
+ danger: { root: "[--status-color:var(--color-danger-base)]" }
3690
+ }
3691
+ },
3692
+ defaultVariants: { variant: "default" }
3693
+ }),
3694
+ variants: {
3695
+ theme: {
3696
+ brutal: {},
3697
+ elegant: {}
3698
+ },
3699
+ size: {
3700
+ xs: { root: "size-1" },
3701
+ sm: { root: "size-2" },
3702
+ md: { root: "size-2.5" },
3703
+ lg: { root: "size-[11px]" }
3704
+ },
3705
+ pulse: {
3706
+ true: { root: "" },
3707
+ false: { root: "" }
3708
+ }
3709
+ },
3710
+ defaultVariants: {
3711
+ size: "md",
3712
+ variant: "default",
3713
+ pulse: false
3714
+ },
3715
+ compoundVariants: [
3716
+ {
3717
+ theme: "brutal",
3718
+ variant: "success",
3719
+ class: { root: "[--status-color:var(--color-brutal-lime)]" }
3720
+ },
3721
+ {
3722
+ theme: "brutal",
3723
+ variant: "warning",
3724
+ class: { root: "[--status-color:var(--color-warning-base)]" }
3725
+ },
3726
+ {
3727
+ theme: "brutal",
3728
+ pulse: true,
3729
+ class: { root: "animate-pulse" }
3730
+ },
3731
+ {
3732
+ theme: "elegant",
3733
+ pulse: true,
3734
+ class: { root: "[animation:raft-status-pulse-background_1.4s_ease-out_infinite] motion-reduce:animate-none" }
3735
+ }
3736
+ ]
3737
+ });
3738
+ const statusStyle = /* @__PURE__ */ jsx("style", {
3739
+ href: "raft-ui-status",
3740
+ precedence: "default",
3741
+ children: STATUS_STYLE
3742
+ });
3743
+ function StatusRoot({ size, variant, pulse, className, render, ...props }) {
3744
+ const { root } = status({
3745
+ theme: useThemeFamily(),
3746
+ size,
3747
+ variant,
3748
+ pulse
3749
+ });
3750
+ return useRender({
3751
+ defaultTagName: "span",
3752
+ render,
3753
+ props: mergeProps({
3754
+ className: root({ className }),
3755
+ children: statusStyle
3756
+ }, props),
3757
+ state: {
3758
+ slot: "status",
3759
+ variant,
3760
+ pulse,
3761
+ size
3762
+ }
3763
+ });
3764
+ }
3765
+ const Status = StatusRoot;
3766
+ //#endregion
3767
+ //#region src/components/banner/banner.tsx
3768
+ const banner = tv({
3769
+ slots: {
3770
+ root: [""],
3771
+ title: [""],
3772
+ description: [""],
3773
+ action: [""]
3774
+ },
3775
+ variants: {
3776
+ theme: {
3777
+ brutal: {
3778
+ root: [
3779
+ "group/banner grid grid-cols-[0_minmax(0,1fr)] items-start border-2 border-line-strong",
3780
+ "has-[>[data-slot=banner-action]]:grid-cols-[0_minmax(0,1fr)_auto]",
3781
+ "has-[>svg]:grid-cols-[18px_minmax(0,1fr)]",
3782
+ "[&:has(>svg):has(>[data-slot=banner-action])]:grid-cols-[18px_minmax(0,1fr)_auto]",
3783
+ "[&>svg]:col-start-1 [&>svg]:row-span-2 [&>svg]:mt-0.5",
3784
+ "[&>svg]:size-[18px] [&>svg]:shrink-0 [&>svg]:text-foreground-strong"
3785
+ ],
3786
+ title: ["col-start-2 mb-0.5 text-sm font-bold text-foreground-strong", "group-data-[size=sm]/banner:text-xs"],
3787
+ description: ["col-start-2 min-w-0 text-sm text-foreground-strong", "group-data-[size=sm]/banner:text-xs"],
3788
+ action: ["col-start-3 row-span-2 row-start-1 shrink-0"]
3789
+ },
3790
+ elegant: {
3791
+ root: [
3792
+ "group/banner grid w-full items-center gap-x-2 gap-y-0 rounded-sm border-0",
3793
+ "text-[0.8125rem] leading-5 tracking-[-0.005em] text-foreground-strong",
3794
+ "grid-cols-[minmax(0,1fr)]",
3795
+ "has-[>svg]:grid-cols-[auto_minmax(0,1fr)]",
3796
+ "has-[>[data-slot=banner-action]]:grid-cols-[minmax(0,1fr)_auto]",
3797
+ "has-[>svg]:has-[>[data-slot=banner-action]]:grid-cols-[auto_minmax(0,1fr)_auto]",
3798
+ "has-[>[data-slot=banner-title]]:has-[>[data-slot=banner-description]]:items-start",
3799
+ "has-[>[data-slot=banner-title]]:has-[>[data-slot=banner-description]]:grid-rows-[auto_auto]",
3800
+ "has-[>[data-slot=banner-title]]:has-[>[data-slot=banner-description]]:gap-y-1",
3801
+ "[&>svg]:col-start-1 [&>svg]:row-start-1 [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:self-center"
3802
+ ],
3803
+ title: [
3804
+ "col-start-1 row-start-1 flex h-5 min-w-0 items-center text-[0.84375rem] font-medium leading-5 text-foreground-strong",
3805
+ "group-has-[>svg]/banner:col-start-2",
3806
+ "group-data-[size=sm]/banner:h-4 group-data-[size=sm]/banner:text-[0.8125rem] group-data-[size=sm]/banner:leading-4",
3807
+ "group-data-[size=lg]/banner:h-6 group-data-[size=lg]/banner:text-[0.90625rem] group-data-[size=lg]/banner:leading-6",
3808
+ "group-data-[status=warning]/banner:text-[oklch(0.476_0.114_61.907)]"
3809
+ ],
3810
+ description: [
3811
+ "col-start-1 row-start-1 min-w-0 font-normal leading-4 text-foreground-muted",
3812
+ "group-has-[>svg]/banner:col-start-2",
3813
+ "group-has-[>[data-slot=banner-title]]/banner:row-start-2",
3814
+ "group-data-[size=sm]/banner:text-xs group-data-[size=sm]/banner:leading-4",
3815
+ "group-data-[size=lg]/banner:text-[0.875rem] group-data-[size=lg]/banner:leading-5",
3816
+ "group-data-[status=warning]/banner:text-[oklch(0.476_0.114_61.907)]"
3817
+ ],
3818
+ action: [
3819
+ "col-start-2 row-start-1 flex h-5 shrink-0 items-center gap-2",
3820
+ "group-has-[>svg]/banner:col-start-3",
3821
+ "group-has-[>[data-slot=banner-title]+[data-slot=banner-description]]/banner:row-span-2",
3822
+ "[&>button:has(svg):last-child]:size-5 [&>button:has(svg):last-child]:min-h-5 [&>button:has(svg):last-child]:min-w-5",
3823
+ "[&>button:has(svg):last-child]:rounded-sm",
3824
+ "[&>button:has(svg):last-child]:border-transparent [&>button:has(svg):last-child]:bg-transparent [&>button:has(svg):last-child]:shadow-none",
3825
+ "[&>button:has(svg):last-child]:text-current/45",
3826
+ "[&>button:has(svg):last-child]:transition-colors [&>button:has(svg):last-child]:duration-200",
3827
+ "[&>button:has(svg):last-child]:hover:border-transparent [&>button:has(svg):last-child]:hover:bg-foreground/5",
3828
+ "[&>button:has(svg):last-child]:hover:text-current/70",
3829
+ "[&>button:has(svg):last-child>svg]:size-4",
3830
+ "group-data-[size=sm]/banner:h-4 group-data-[size=sm]/banner:[&>button:has(svg):last-child]:size-4",
3831
+ "group-data-[size=sm]/banner:[&>button:has(svg):last-child]:min-h-4 group-data-[size=sm]/banner:[&>button:has(svg):last-child]:min-w-4",
3832
+ "group-data-[size=sm]/banner:[&>button:has(svg):last-child>svg]:size-3",
3833
+ "group-data-[size=lg]/banner:h-6 group-data-[size=lg]/banner:[&>button:has(svg):last-child]:size-6",
3834
+ "group-data-[size=lg]/banner:[&>button:has(svg):last-child]:min-h-6 group-data-[size=lg]/banner:[&>button:has(svg):last-child]:min-w-6"
3835
+ ]
3836
+ }
3837
+ },
3838
+ status: {
3839
+ default: {},
3840
+ destructive: {},
3841
+ warning: {},
3842
+ info: {},
3843
+ success: {}
3844
+ },
3845
+ size: {
3846
+ sm: {},
3847
+ md: {},
3848
+ lg: {}
3849
+ },
3850
+ align: {
3851
+ top: { action: "self-start" },
3852
+ middle: { action: "self-center" }
3853
+ }
3854
+ },
3855
+ defaultVariants: {
3856
+ size: "md",
3857
+ align: "middle"
3858
+ },
3859
+ compoundVariants: [
3860
+ {
3861
+ theme: "brutal",
3862
+ status: "default",
3863
+ class: { root: "bg-layer-panel" }
3864
+ },
3865
+ {
3866
+ theme: "brutal",
3867
+ status: "destructive",
3868
+ class: { root: "bg-danger-base/20" }
3869
+ },
3870
+ {
3871
+ theme: "brutal",
3872
+ status: "warning",
3873
+ class: { root: "bg-warning-base/20" }
3874
+ },
3875
+ {
3876
+ theme: "brutal",
3877
+ status: "info",
3878
+ class: { root: "bg-primary-400/30" }
3879
+ },
3880
+ {
3881
+ theme: "brutal",
3882
+ status: "success",
3883
+ class: { root: "bg-success-base/20" }
3884
+ },
3885
+ {
3886
+ theme: "brutal",
3887
+ size: "sm",
3888
+ class: { root: "gap-y-0 p-2 has-[>svg]:gap-x-2 has-[>[data-slot=banner-action]]:gap-x-2" }
3889
+ },
3890
+ {
3891
+ theme: "brutal",
3892
+ size: "md",
3893
+ class: { root: "gap-y-0 p-3 has-[>svg]:gap-x-3 has-[>[data-slot=banner-action]]:gap-x-3" }
3894
+ },
3895
+ {
3896
+ theme: "brutal",
3897
+ size: "lg",
3898
+ class: { root: "gap-y-0 p-4 shadow-sm has-[>svg]:gap-x-3 has-[>[data-slot=banner-action]]:gap-x-3" }
3899
+ },
3900
+ {
3901
+ theme: "elegant",
3902
+ status: "default",
3903
+ class: { root: "bg-layer-muted [&>svg]:text-foreground-muted" }
3904
+ },
3905
+ {
3906
+ theme: "elegant",
3907
+ status: "success",
3908
+ class: { root: "bg-[oklch(0.94_0.035_153.079)] [&>svg]:text-success-base" }
3909
+ },
3910
+ {
3911
+ theme: "elegant",
3912
+ status: "warning",
3913
+ class: { root: "bg-[oklch(0.973_0.071_103.193)] text-[oklch(0.476_0.114_61.907)] [&>svg]:text-[oklch(0.476_0.114_61.907)]" }
3914
+ },
3915
+ {
3916
+ theme: "elegant",
3917
+ status: "info",
3918
+ class: { root: "bg-info-lighter [&>svg]:text-[oklch(0.55_0.11_220)]" }
3919
+ },
3920
+ {
3921
+ theme: "elegant",
3922
+ status: "destructive",
3923
+ class: { root: "bg-danger-lighter [&>svg]:text-danger-base" }
3924
+ },
3925
+ {
3926
+ theme: "elegant",
3927
+ size: "sm",
3928
+ class: { root: "py-2.5 pl-2.5 pr-2 text-xs leading-4 [&>svg]:size-3.5" }
3929
+ },
3930
+ {
3931
+ theme: "elegant",
3932
+ size: "md",
3933
+ class: { root: "px-3 py-3" }
3934
+ },
3935
+ {
3936
+ theme: "elegant",
3937
+ size: "lg",
3938
+ class: { root: "gap-x-2 px-3.5 py-3 text-sm leading-5 [&>svg]:size-[18px]" }
3939
+ }
3940
+ ]
3941
+ });
3942
+ function Banner({ status, size = "md", className, render, ...props }) {
3943
+ const { root } = banner({
3944
+ theme: useThemeFamily(),
3945
+ status,
3946
+ size
3947
+ });
3948
+ return useRender({
3949
+ defaultTagName: "div",
3950
+ render,
3951
+ props: mergeProps({
3952
+ className: root({ className }),
3953
+ role: "alert"
3954
+ }, props),
3955
+ state: {
3956
+ slot: "banner",
3957
+ size,
3958
+ status
3959
+ }
3960
+ });
3961
+ }
3962
+ function BannerTitle({ render, className, ...props }) {
3963
+ const { title } = banner({ theme: useThemeFamily() });
3964
+ return useRender({
3965
+ defaultTagName: "div",
3966
+ render,
3967
+ props: mergeProps({ className: title({ className }) }, props),
3968
+ state: { slot: "banner-title" }
3969
+ });
3970
+ }
3971
+ function BannerDescription({ render, className, ...props }) {
3972
+ const { description } = banner({ theme: useThemeFamily() });
3973
+ return useRender({
3974
+ defaultTagName: "div",
3975
+ render,
3976
+ props: mergeProps({ className: description({ className }) }, props),
3977
+ state: { slot: "banner-description" }
3978
+ });
3979
+ }
3980
+ function BannerAction({ align = "middle", render, className, ...props }) {
3981
+ const { action } = banner({
3982
+ theme: useThemeFamily(),
3983
+ align
3984
+ });
3985
+ return useRender({
3986
+ defaultTagName: "div",
3987
+ render,
3988
+ props: mergeProps({ className: action({ className }) }, props),
3989
+ state: {
3990
+ slot: "banner-action",
3991
+ align
3992
+ }
3993
+ });
3994
+ }
3995
+ //#endregion
3996
+ //#region src/components/empty-state/empty-state.tsx
3997
+ const emptyState = tv({
3998
+ slots: {
3999
+ root: ["flex w-full min-w-0 flex-col items-center justify-center px-6 py-12 text-center"],
4000
+ content: [
4001
+ "flex w-full max-w-sm min-w-0 flex-col items-center gap-2 text-center",
4002
+ "[&>[data-slot=empty-state-icon]]:mb-0",
4003
+ "[&>[data-slot=empty-state-title]]:mb-0"
4004
+ ],
4005
+ icon: ["mb-4 inline-flex items-center justify-center [&_svg]:shrink-0"],
4006
+ title: ["mb-2 w-full max-w-full text-center text-balance font-heading text-lg font-semibold"],
4007
+ description: ["mx-auto w-full max-w-[32ch] text-center text-sm leading-relaxed text-pretty", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-foreground-strong"],
4008
+ actions: ["mt-5"]
4009
+ },
4010
+ variants: { theme: {
4011
+ brutal: {
4012
+ icon: "text-foreground-muted [&_svg]:size-9",
4013
+ title: "text-foreground/60",
4014
+ description: "text-foreground/60"
4015
+ },
4016
+ elegant: {
4017
+ icon: "rounded-md bg-layer-muted p-2 text-foreground-placeholder [&_svg]:size-4.5",
4018
+ title: "text-sm font-medium text-foreground-strong",
4019
+ description: "text-foreground-muted"
4020
+ }
4021
+ } }
4022
+ });
4023
+ function EmptyState({ render, className, ...props }) {
4024
+ const { root } = emptyState();
4025
+ return useRender({
4026
+ defaultTagName: "div",
4027
+ render,
4028
+ props: mergeProps({
4029
+ "data-slot": "empty-state",
4030
+ className: root({ className })
4031
+ }, props),
4032
+ state: { slot: "empty-state" }
4033
+ });
4034
+ }
4035
+ function EmptyStateContent({ render, className, ...props }) {
4036
+ const { content } = emptyState();
4037
+ return useRender({
4038
+ defaultTagName: "div",
4039
+ render,
4040
+ props: mergeProps({
4041
+ "data-slot": "empty-state-content",
4042
+ className: content({ className })
4043
+ }, props),
4044
+ state: { slot: "empty-state-content" }
4045
+ });
4046
+ }
4047
+ function EmptyStateIcon({ render, className, ...props }) {
4048
+ const { icon } = emptyState({ theme: useThemeFamily() });
4049
+ return useRender({
4050
+ defaultTagName: "div",
4051
+ render,
4052
+ props: mergeProps({
4053
+ "data-slot": "empty-state-icon",
4054
+ className: icon({ className })
4055
+ }, props),
4056
+ state: { slot: "empty-state-icon" }
4057
+ });
4058
+ }
4059
+ function EmptyStateTitle({ render, className, ...props }) {
4060
+ const { title } = emptyState({ theme: useThemeFamily() });
4061
+ return useRender({
4062
+ defaultTagName: "div",
4063
+ render,
4064
+ props: mergeProps({
4065
+ "data-slot": "empty-state-title",
4066
+ className: title({ className })
4067
+ }, props),
4068
+ state: { slot: "empty-state-title" }
4069
+ });
4070
+ }
4071
+ function EmptyStateDescription({ render, className, ...props }) {
4072
+ const { description } = emptyState({ theme: useThemeFamily() });
4073
+ return useRender({
4074
+ defaultTagName: "div",
4075
+ render,
4076
+ props: mergeProps({
4077
+ "data-slot": "empty-state-description",
4078
+ className: description({ className })
4079
+ }, props),
4080
+ state: { slot: "empty-state-description" }
4081
+ });
4082
+ }
4083
+ function EmptyStateActions({ render, className, ...props }) {
4084
+ const { actions } = emptyState();
4085
+ return useRender({
4086
+ defaultTagName: "div",
4087
+ render,
4088
+ props: mergeProps({
4089
+ "data-slot": "empty-state-actions",
4090
+ className: actions({ className })
4091
+ }, props),
4092
+ state: { slot: "empty-state-actions" }
4093
+ });
4094
+ }
4095
+ //#endregion
4096
+ //#region src/components/notification-center/notification-center.tsx
4097
+ const notificationCenter = tv({
4098
+ slots: {
4099
+ popup: ["flex flex-col overflow-hidden bg-layer-panel"],
4100
+ header: ["flex items-center gap-2 px-4 py-2"],
4101
+ title: ["text-xs"],
4102
+ count: ["ml-auto text-xs"],
4103
+ scroller: ["min-h-0 flex-1 overflow-y-auto overscroll-contain", "[[data-theme=elegant]_&]:bg-white"],
4104
+ list: ["divide-y"],
4105
+ item: ["px-4 py-4"],
4106
+ itemRow: ["flex items-start"],
4107
+ itemIcon: ["mt-0.5 flex size-6 shrink-0 items-center justify-center", "[&_svg]:size-4"],
4108
+ itemContent: ["min-w-0 flex-1"],
4109
+ itemTitle: ["break-words text-sm text-foreground-strong"],
4110
+ itemBody: ["mt-0.5 break-words text-sm"],
4111
+ itemActions: ["mt-3 ml-auto flex items-center justify-end gap-2"],
4112
+ actionButton: []
4113
+ },
4114
+ variants: {
4115
+ theme: {
4116
+ brutal: {
4117
+ popup: ["border-2 border-black bg-white shadow-lg"],
4118
+ header: ["border-b-2 border-line-strong bg-brutal-cream"],
4119
+ title: ["font-bold uppercase tracking-widest text-foreground/60"],
4120
+ count: ["font-mono text-foreground/40"],
4121
+ list: ["divide-y-2 divide-line-strong"],
4122
+ itemRow: ["gap-2"],
4123
+ itemIcon: ["border-2 border-line-strong [&_svg]:text-foreground-strong"],
4124
+ itemTitle: ["font-bold"],
4125
+ actionButton: []
4126
+ },
4127
+ elegant: {
4128
+ popup: ["rounded-md bg-layer-popover", "shadow-lg"],
4129
+ header: ["border-b border-line-muted bg-white pt-2.5"],
4130
+ title: ["text-sm font-medium normal-case tracking-normal text-foreground-strong"],
4131
+ count: ["font-sans text-[11px] font-medium text-foreground-placeholder"],
4132
+ list: ["divide-line-muted"],
4133
+ itemRow: ["gap-2.5"],
4134
+ itemIcon: ["rounded-sm border border-transparent"],
4135
+ itemTitle: ["font-medium"],
4136
+ itemBody: ["text-foreground-muted"],
4137
+ actionButton: ["py-0.5"]
4138
+ }
4139
+ },
4140
+ viewport: {
4141
+ desktop: { popup: "w-[380px]" },
4142
+ mobile: { popup: "w-[min(92vw,360px)]" }
4143
+ },
4144
+ size: {
4145
+ sm: { popup: "h-56" },
4146
+ md: { popup: "h-72" },
4147
+ lg: { popup: "h-96" }
4148
+ },
4149
+ read: {
4150
+ true: { item: "opacity-70" },
4151
+ false: { item: "" }
4152
+ },
4153
+ status: {
4154
+ error: {},
4155
+ warning: {},
4156
+ info: {},
4157
+ success: {}
4158
+ },
4159
+ actionVariant: {
4160
+ primary: {},
4161
+ secondary: {}
4162
+ }
4163
+ },
4164
+ compoundVariants: [
4165
+ {
4166
+ theme: "brutal",
4167
+ actionVariant: "primary",
4168
+ class: { actionButton: "bg-brutal-pink hover:bg-brutal-pink" }
4169
+ },
4170
+ {
4171
+ theme: "brutal",
4172
+ status: "error",
4173
+ class: { itemIcon: "bg-brutal-orange" }
4174
+ },
4175
+ {
4176
+ theme: "brutal",
4177
+ status: "warning",
4178
+ class: { itemIcon: "bg-brutal-orange" }
4179
+ },
4180
+ {
4181
+ theme: "brutal",
4182
+ status: "info",
4183
+ class: { itemIcon: "bg-brutal-yellow" }
4184
+ },
4185
+ {
4186
+ theme: "brutal",
4187
+ status: "success",
4188
+ class: { itemIcon: "bg-brutal-lime" }
4189
+ },
4190
+ {
4191
+ theme: "elegant",
4192
+ status: "error",
4193
+ class: { itemIcon: "bg-danger-base/80 text-danger-dark" }
4194
+ },
4195
+ {
4196
+ theme: "elegant",
4197
+ status: "warning",
4198
+ class: { itemIcon: "bg-warning-base/80 text-warning-dark" }
4199
+ },
4200
+ {
4201
+ theme: "elegant",
4202
+ status: "info",
4203
+ class: { itemIcon: "bg-info-base/80 text-info-dark" }
4204
+ },
4205
+ {
4206
+ theme: "elegant",
4207
+ status: "success",
4208
+ class: { itemIcon: "bg-success-base/80 text-success-dark" }
4209
+ }
4210
+ ],
4211
+ defaultVariants: {
4212
+ viewport: "desktop",
4213
+ size: "md",
4214
+ read: false,
4215
+ status: "info",
4216
+ actionVariant: "secondary"
4217
+ }
4218
+ });
4219
+ function NotificationCenter({ modal = false, ...props }) {
4220
+ return /* @__PURE__ */ jsx(Popover$1.Root, {
4221
+ modal,
4222
+ ...props
4223
+ });
4224
+ }
4225
+ function NotificationCenterTrigger(props) {
4226
+ return /* @__PURE__ */ jsx(Popover$1.Trigger, {
4227
+ "data-slot": "notification-center-trigger",
4228
+ ...props
4229
+ });
4230
+ }
4231
+ function NotificationCenterPopup({ viewport = "desktop", size = "md", className, initialFocus = false, "aria-label": ariaLabel = "Notification center", align = "center", alignOffset = 0, anchor, arrowPadding, collisionAvoidance, collisionBoundary, collisionPadding, disableAnchorTracking = true, positionMethod = "fixed", side = "bottom", sideOffset = 4, sticky, portalProps, ...props }) {
4232
+ const { popup } = notificationCenter({
4233
+ theme: useThemeFamily(),
4234
+ viewport,
4235
+ size
4236
+ });
4237
+ return /* @__PURE__ */ jsx(Popover$1.Portal, {
4238
+ ...portalProps,
4239
+ children: /* @__PURE__ */ jsx(Popover$1.Positioner, {
4240
+ align,
4241
+ alignOffset,
4242
+ anchor,
4243
+ arrowPadding,
4244
+ collisionAvoidance,
4245
+ collisionBoundary,
4246
+ collisionPadding,
4247
+ disableAnchorTracking,
4248
+ positionMethod,
4249
+ side,
4250
+ sideOffset,
4251
+ sticky,
4252
+ className: "isolate z-50 outline-none",
4253
+ children: /* @__PURE__ */ jsx(Popover$1.Popup, {
4254
+ "aria-label": ariaLabel,
4255
+ "data-slot": "notification-center-popup",
4256
+ "data-size": size,
4257
+ "data-viewport": viewport,
4258
+ initialFocus,
4259
+ className: popup({ className }),
4260
+ ...props
4261
+ })
4262
+ })
4263
+ });
4264
+ }
4265
+ function NotificationCenterHeader({ render, className, ...props }) {
4266
+ const { header } = notificationCenter({ theme: useThemeFamily() });
4267
+ return useRender({
4268
+ defaultTagName: "div",
4269
+ render,
4270
+ props: mergeProps({ className: header({ className }) }, props),
4271
+ state: { slot: "notification-center-header" }
4272
+ });
4273
+ }
4274
+ function NotificationCenterTitle({ render, className, ...props }) {
4275
+ const { title } = notificationCenter({ theme: useThemeFamily() });
4276
+ return useRender({
4277
+ defaultTagName: "span",
4278
+ render,
4279
+ props: mergeProps({ className: title({ className }) }, props),
4280
+ state: { slot: "notification-center-title" }
4281
+ });
4282
+ }
4283
+ function NotificationCenterCount({ render, className, ...props }) {
4284
+ const { count } = notificationCenter({ theme: useThemeFamily() });
4285
+ return useRender({
4286
+ defaultTagName: "span",
4287
+ render,
4288
+ props: mergeProps({ className: count({ className }) }, props),
4289
+ state: { slot: "notification-center-count" }
4290
+ });
4291
+ }
4292
+ function NotificationCenterScroller({ render, className, ...props }) {
4293
+ const { scroller } = notificationCenter();
4294
+ return useRender({
4295
+ defaultTagName: "div",
4296
+ render,
4297
+ props: mergeProps({ className: scroller({ className }) }, props),
4298
+ state: { slot: "notification-center-scroller" }
4299
+ });
4300
+ }
4301
+ function NotificationCenterList({ render, className, "aria-label": ariaLabel = "Notifications", ...props }) {
4302
+ const { list } = notificationCenter({ theme: useThemeFamily() });
4303
+ return useRender({
4304
+ defaultTagName: "ul",
4305
+ render,
4306
+ props: mergeProps({
4307
+ "aria-label": ariaLabel,
4308
+ className: list({ className })
4309
+ }, props),
4310
+ state: { slot: "notification-center-list" }
4311
+ });
4312
+ }
4313
+ function NotificationCenterItem({ read = false, render, className, ...props }) {
4314
+ const { item } = notificationCenter({
4315
+ theme: useThemeFamily(),
4316
+ read
4317
+ });
4318
+ return useRender({
4319
+ defaultTagName: "li",
4320
+ render,
4321
+ props: mergeProps({ className: item({ className }) }, props),
4322
+ state: {
4323
+ slot: "notification-center-item",
4324
+ read
4325
+ }
4326
+ });
4327
+ }
4328
+ function NotificationCenterItemRow({ render, className, ...props }) {
4329
+ const { itemRow } = notificationCenter({ theme: useThemeFamily() });
4330
+ return useRender({
4331
+ defaultTagName: "div",
4332
+ render,
4333
+ props: mergeProps({ className: itemRow({ className }) }, props),
4334
+ state: { slot: "notification-center-item-row" }
4335
+ });
4336
+ }
4337
+ const STATUS_LABEL = {
4338
+ error: "Error",
4339
+ warning: "Warning",
4340
+ info: "Info",
4341
+ success: "Success"
4342
+ };
4343
+ const DEFAULT_STATUS_ICON = {
4344
+ error: /* @__PURE__ */ jsx(AlertTriangle, {}),
4345
+ warning: /* @__PURE__ */ jsx(AlertTriangle, {}),
4346
+ info: /* @__PURE__ */ jsx(Info, {}),
4347
+ success: /* @__PURE__ */ jsx(CheckCircle2, {})
4348
+ };
4349
+ function NotificationCenterItemIcon({ status = "info", render, className, children, "aria-label": ariaLabel = STATUS_LABEL[status], ...props }) {
4350
+ const { itemIcon } = notificationCenter({
4351
+ theme: useThemeFamily(),
4352
+ status
4353
+ });
4354
+ return useRender({
4355
+ defaultTagName: "div",
4356
+ render,
4357
+ props: mergeProps({
4358
+ "aria-label": ariaLabel,
4359
+ className: itemIcon({ className }),
4360
+ children: children ?? DEFAULT_STATUS_ICON[status]
4361
+ }, props),
4362
+ state: {
4363
+ slot: "notification-center-item-icon",
4364
+ status
4365
+ }
4366
+ });
4367
+ }
4368
+ function NotificationCenterItemContent({ render, className, ...props }) {
4369
+ const { itemContent } = notificationCenter();
4370
+ return useRender({
4371
+ defaultTagName: "div",
4372
+ render,
4373
+ props: mergeProps({ className: itemContent({ className }) }, props),
4374
+ state: { slot: "notification-center-item-content" }
4375
+ });
4376
+ }
4377
+ function NotificationCenterItemTitle({ render, className, ...props }) {
4378
+ const { itemTitle } = notificationCenter({ theme: useThemeFamily() });
4379
+ return useRender({
4380
+ defaultTagName: "div",
4381
+ render,
4382
+ props: mergeProps({ className: itemTitle({ className }) }, props),
4383
+ state: { slot: "notification-center-item-title" }
4384
+ });
4385
+ }
4386
+ function NotificationCenterItemBody({ render, className, ...props }) {
4387
+ const { itemBody } = notificationCenter({ theme: useThemeFamily() });
4388
+ return useRender({
4389
+ defaultTagName: "div",
4390
+ render,
4391
+ props: mergeProps({ className: itemBody({ className }) }, props),
4392
+ state: { slot: "notification-center-item-body" }
4393
+ });
4394
+ }
4395
+ function NotificationCenterItemActions({ render, className, ...props }) {
4396
+ const { itemActions } = notificationCenter();
4397
+ return useRender({
4398
+ defaultTagName: "div",
4399
+ render,
4400
+ props: mergeProps({ className: itemActions({ className }) }, props),
4401
+ state: { slot: "notification-center-item-actions" }
4402
+ });
4403
+ }
4404
+ function NotificationCenterActionButton({ variant = "secondary", className, ...props }) {
4405
+ const { actionButton } = notificationCenter({
4406
+ theme: useThemeFamily(),
4407
+ actionVariant: variant
4408
+ });
4409
+ return /* @__PURE__ */ jsx(Button, {
4410
+ type: "button",
4411
+ size: "xs",
4412
+ variant: variant === "primary" ? "primary" : "outline",
4413
+ className: actionButton({ className }),
4414
+ ...props
4415
+ });
4416
+ }
4417
+ function NotificationCenterEmptyState(props) {
4418
+ return /* @__PURE__ */ jsx(EmptyState, {
4419
+ "data-slot": "notification-center-empty-state",
4420
+ ...props
4421
+ });
4422
+ }
4423
+ //#endregion
4424
+ //#region src/components/tabs/tabs.tsx
4425
+ const tabs = tv({
4426
+ slots: {
4427
+ root: ["w-full"],
4428
+ list: [""],
4429
+ background: [""],
4430
+ tab: ["relative z-10 flex shrink-0 touch-manipulation items-center gap-1.5 whitespace-nowrap outline-none", "data-[reorderable=true]:cursor-grab data-[reorderable=true]:active:cursor-grabbing"],
4431
+ content: ["relative z-10 inline-flex items-center gap-[inherit]"],
4432
+ label: [""],
4433
+ panel: ["outline-none"],
4434
+ indicator: [""]
4435
+ },
4436
+ variants: {
4437
+ theme: {
4438
+ brutal: {
4439
+ list: ["flex w-max max-w-full overflow-x-auto border-2 border-line-strong bg-layer-panel", "[scrollbar-width:none] [&::-webkit-scrollbar]:hidden"],
4440
+ background: "hidden",
4441
+ tab: [
4442
+ "bg-layer-panel px-4 py-1.5 text-xs font-semibold transition-colors",
4443
+ "hover:bg-[color-mix(in_oklch,var(--line-strong)_6%,var(--layer-panel))]",
4444
+ "[&+&]:before:absolute [&+&]:before:inset-y-0 [&+&]:before:left-0 [&+&]:before:w-0.5 [&+&]:before:bg-line-strong",
4445
+ "data-[dragging-source=true]:before:hidden",
4446
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:[stroke-width:1.5] [&_svg:not([class*='size-'])]:size-3.5",
4447
+ "data-[active]:bg-primary-400 data-[active]:hover:bg-primary-400",
4448
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-40",
4449
+ "data-[dragging-source=true]:cursor-grabbing"
4450
+ ]
4451
+ },
4452
+ elegant: {}
4453
+ },
4454
+ variant: {
4455
+ default: {},
4456
+ underline: {}
4457
+ }
4458
+ },
4459
+ defaultVariants: { variant: "default" },
4460
+ compoundVariants: [{
4461
+ theme: "elegant",
4462
+ variant: "underline",
4463
+ class: {
4464
+ list: [
4465
+ "group/tabs-list relative flex h-12 w-max max-w-full items-center gap-6 px-4",
4466
+ "overflow-x-auto overflow-y-hidden overscroll-contain whitespace-nowrap",
4467
+ "border-b border-line-muted",
4468
+ "[scrollbar-width:none] [&::-webkit-scrollbar]:hidden"
4469
+ ],
4470
+ background: ["pointer-events-none absolute inset-x-0 top-0 z-0 h-px bg-line-muted"],
4471
+ tab: [
4472
+ "group/tabs-tab h-12 justify-center px-3 pb-3 pt-3.5",
4473
+ "text-[0.8125rem] font-medium tracking-[-0.005em] text-foreground-placeholder",
4474
+ "transition-colors duration-200 ease-out",
4475
+ "hover:text-foreground-muted",
4476
+ "data-[active]:text-foreground-strong",
4477
+ "data-[active]:hover:text-foreground-strong",
4478
+ "[&_svg]:pointer-events-none [&_svg]:size-3.5 [&_svg]:shrink-0 [&_svg]:[stroke-width:1.5]",
4479
+ "[&_svg]:text-foreground-placeholder [&_svg]:transition-colors [&_svg]:duration-200 [&_svg]:ease-out",
4480
+ "hover:[&_svg]:text-foreground-muted",
4481
+ "data-[active]:[&_svg]:text-foreground-strong",
4482
+ "data-[active]:hover:[&_svg]:text-foreground-strong",
4483
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-40",
4484
+ "data-[dragging-source=true]:cursor-grabbing"
4485
+ ],
4486
+ indicator: [
4487
+ "absolute bottom-0 left-[var(--active-tab-left)] z-10 h-0.5",
4488
+ "w-[var(--active-tab-width)] bg-foreground-strong",
4489
+ "transition-[left,width] duration-300 ease-[cubic-bezier(0.65,0,0.35,1)]"
4490
+ ]
4491
+ }
4492
+ }, {
4493
+ theme: "elegant",
4494
+ variant: "default",
4495
+ class: {
4496
+ list: [
4497
+ "group/tabs-list relative isolate flex h-auto w-max max-w-full items-center gap-1",
4498
+ "overflow-x-auto overflow-y-visible overscroll-contain whitespace-nowrap",
4499
+ "p-px",
4500
+ "[scrollbar-width:none] [&::-webkit-scrollbar]:hidden"
4501
+ ],
4502
+ background: ["pointer-events-none absolute inset-0 z-0 rounded-[7px] bg-layer-muted"],
4503
+ tab: [
4504
+ "group/tabs-tab h-9 justify-center gap-1.5 rounded-md px-3.5 py-2",
4505
+ "text-[0.8125rem] font-medium tracking-[-0.005em] text-foreground-placeholder",
4506
+ "transition-[background-color,box-shadow,color] duration-150 ease-out",
4507
+ "hover:text-[oklch(42%_.006_285)]",
4508
+ "data-[active]:text-[oklch(38%_.006_285)]",
4509
+ "data-[active]:hover:text-[oklch(38%_.006_285)]",
4510
+ "data-[active]:[&_[data-slot=tabs-label]]:text-[0.8125rem]",
4511
+ "[&_svg]:pointer-events-none [&_svg]:size-3.5 [&_svg]:shrink-0 [&_svg]:[stroke-width:1.5]",
4512
+ "[&_svg]:text-foreground-placeholder [&_svg]:transition-colors [&_svg]:duration-150 [&_svg]:ease-out",
4513
+ "hover:[&_svg]:text-[oklch(42%_.006_285)]",
4514
+ "data-[active]:[&_svg]:text-[oklch(38%_.006_285)]",
4515
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-40",
4516
+ "data-[dragging-source=true]:cursor-grabbing"
4517
+ ],
4518
+ indicator: [
4519
+ "absolute z-0 rounded-md bg-layer-panel",
4520
+ "[left:calc(var(--active-tab-left)+1px)] [top:calc(var(--active-tab-top)+1.671875px)]",
4521
+ "[height:calc(var(--active-tab-height)-3.34375px)] [width:calc(var(--active-tab-width)-2px)]",
4522
+ "shadow-[0_0_0_1px_oklch(0%_0_0/.1),0_1px_1px_-1px_oklch(0%_0_0/.04),0_1px_2px_oklch(0%_0_0/.03)]",
4523
+ "group-has-[>[data-slot=tabs-background]]/tabs-list:shadow-[0_0_0_1px_oklch(0%_0_0/.045),0_1px_1px_-1px_oklch(0%_0_0/.025),0_1px_2px_oklch(0%_0_0/.02)]",
4524
+ "transition-[left,width] duration-300 ease-[cubic-bezier(0.65,0,0.35,1)]"
4525
+ ]
4526
+ }
4527
+ }]
4528
+ });
4529
+ const TabsReorderContext = createContext({ enabled: false });
4530
+ const TabsValueContext = createContext(void 0);
4531
+ const TabsListVariantContext = createContext("default");
4532
+ const REORDER_ENABLED_CONTEXT = { enabled: true };
4533
+ function Tabs({ value, defaultValue, onValueChange, className, ...props }) {
4534
+ const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue);
4535
+ const resolvedValue = value ?? uncontrolledValue;
4536
+ const { root } = tabs();
4537
+ return /* @__PURE__ */ jsx(TabsValueContext.Provider, {
4538
+ value: resolvedValue == null ? void 0 : String(resolvedValue),
4539
+ children: /* @__PURE__ */ jsx(Tabs$1.Root, {
4540
+ value,
4541
+ defaultValue,
4542
+ onValueChange: (nextValue, eventDetails) => {
4543
+ if (nextValue == null) return;
4544
+ const typedValue = String(nextValue);
4545
+ if (value === void 0) setUncontrolledValue(typedValue);
4546
+ onValueChange?.(typedValue, eventDetails);
4547
+ },
4548
+ "data-slot": "tabs",
4549
+ className: root({ className }),
4550
+ ...props
4551
+ })
4552
+ });
4553
+ }
4554
+ function TabsList({ className, children, variant = "default", ...props }) {
4555
+ const theme = useThemeFamily();
4556
+ const resolvedVariant = theme === "elegant" ? variant : "underline";
4557
+ const { list } = tabs({
4558
+ theme,
4559
+ variant: resolvedVariant
4560
+ });
4561
+ return /* @__PURE__ */ jsx(TabsListVariantContext.Provider, {
4562
+ value: resolvedVariant,
4563
+ children: /* @__PURE__ */ jsxs(Tabs$1.List, {
4564
+ "data-slot": "tabs-list",
4565
+ "data-variant": resolvedVariant,
4566
+ className: list({ className }),
4567
+ ...props,
4568
+ children: [children, theme === "elegant" ? /* @__PURE__ */ jsx(TabsIndicator, {}) : null]
4569
+ })
4570
+ });
4571
+ }
4572
+ function SortableTabsList({ value, onReorder, children, variant = "default", ...props }) {
4573
+ const sensors = useSensors(useSensor(PointerSensor, { activationConstraint: { distance: 6 } }), useSensor(TouchSensor, { activationConstraint: {
4574
+ delay: 350,
4575
+ tolerance: 8
4576
+ } }));
4577
+ const tabIds = useMemo(() => value.map(String), [value]);
4578
+ return /* @__PURE__ */ jsx(DndContext, {
4579
+ sensors,
4580
+ collisionDetection: closestCenter,
4581
+ onDragEnd: useCallback(({ active, over }) => {
4582
+ if (!over || active.id === over.id) return;
4583
+ const oldIndex = tabIds.indexOf(String(active.id));
4584
+ const newIndex = tabIds.indexOf(String(over.id));
4585
+ if (oldIndex === -1 || newIndex === -1) return;
4586
+ onReorder(arrayMove([...value], oldIndex, newIndex));
4587
+ }, [
4588
+ onReorder,
4589
+ tabIds,
4590
+ value
4591
+ ]),
4592
+ children: /* @__PURE__ */ jsx(SortableContext, {
4593
+ items: tabIds,
4594
+ strategy: horizontalListSortingStrategy,
4595
+ children: /* @__PURE__ */ jsx(TabsReorderContext.Provider, {
4596
+ value: REORDER_ENABLED_CONTEXT,
4597
+ children: /* @__PURE__ */ jsx(TabsList, {
4598
+ variant,
4599
+ ...props,
4600
+ children
4601
+ })
4602
+ })
4603
+ })
4604
+ });
4605
+ }
4606
+ function TabsTab({ value, ...props }) {
4607
+ return /* @__PURE__ */ jsx(TabsTabButton, {
4608
+ value,
4609
+ ...props
4610
+ });
4611
+ }
4612
+ function SortableTabsTab({ value, ...props }) {
4613
+ const reorder = use(TabsReorderContext);
4614
+ const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({
4615
+ id: value,
4616
+ disabled: !reorder.enabled
4617
+ });
4618
+ if (!reorder.enabled) return /* @__PURE__ */ jsx(TabsTabButton, {
4619
+ value,
4620
+ ...props
4621
+ });
4622
+ const { role: _sortableRole, tabIndex: _sortableTabIndex, ...sortableAttributes } = attributes;
4623
+ const baseStyle = typeof props.style === "function" ? void 0 : props.style;
4624
+ const style = {
4625
+ ...baseStyle,
4626
+ transform: transform ? `translate3d(${transform.x}px, 0, 0)` : void 0,
4627
+ transition,
4628
+ zIndex: isDragging ? 20 : baseStyle?.zIndex
4629
+ };
4630
+ return /* @__PURE__ */ jsx(TabsTabButton, {
4631
+ value,
4632
+ sortableRef: setNodeRef,
4633
+ "data-dragging-source": isDragging ? "true" : void 0,
4634
+ "data-reorderable": "true",
4635
+ style,
4636
+ ...props,
4637
+ ...sortableAttributes,
4638
+ ...listeners
4639
+ });
4640
+ }
4641
+ function TabsTabButton({ value, sortableRef, className, children, ...props }) {
4642
+ const theme = useThemeFamily();
4643
+ const variant = use(TabsListVariantContext);
4644
+ const { content, tab } = tabs({
4645
+ theme,
4646
+ variant: theme === "elegant" ? variant : "underline"
4647
+ });
4648
+ return /* @__PURE__ */ jsx(Tabs$1.Tab, {
4649
+ ref: (node) => {
4650
+ sortableRef?.(node);
4651
+ },
4652
+ value,
4653
+ "data-slot": "tabs-tab",
4654
+ className: tab({ className }),
4655
+ ...props,
4656
+ children: /* @__PURE__ */ jsx("span", {
4657
+ "data-slot": "tabs-tab-content",
4658
+ className: content(),
4659
+ children
4660
+ })
4661
+ });
4662
+ }
4663
+ function TabsLabel({ className, ...props }) {
4664
+ const { label } = tabs();
4665
+ return /* @__PURE__ */ jsx("span", {
4666
+ "data-slot": "tabs-label",
4667
+ className: label({ className }),
4668
+ ...props
4669
+ });
4670
+ }
4671
+ function TabsPanel({ className, ...props }) {
4672
+ const { panel } = tabs();
4673
+ return /* @__PURE__ */ jsx(Tabs$1.Panel, {
4674
+ "data-slot": "tabs-panel",
4675
+ className: panel({ className }),
4676
+ ...props
4677
+ });
4678
+ }
4679
+ function TabsBackground({ className, ...props }) {
4680
+ const theme = useThemeFamily();
4681
+ const variant = use(TabsListVariantContext);
4682
+ const { background } = tabs({
4683
+ theme,
4684
+ variant: theme === "elegant" ? variant : "underline"
4685
+ });
4686
+ return /* @__PURE__ */ jsx("span", {
4687
+ "aria-hidden": "true",
4688
+ "data-slot": "tabs-background",
4689
+ className: background({ className }),
4690
+ ...props
4691
+ });
4692
+ }
4693
+ function TabsIndicator({ className, ...props }) {
4694
+ const theme = useThemeFamily();
4695
+ const variant = use(TabsListVariantContext);
4696
+ const { indicator } = tabs({
4697
+ theme,
4698
+ variant: theme === "elegant" ? variant : "underline"
4699
+ });
4700
+ return /* @__PURE__ */ jsx(Tabs$1.Indicator, {
4701
+ "data-slot": "tabs-indicator",
4702
+ className: indicator({ className }),
4703
+ ...props
4704
+ });
4705
+ }
4706
+ function useOrderedTabs(items, storedOrder) {
4707
+ return useMemo(() => reconcileTabOrder(items, storedOrder), [items, storedOrder]);
4708
+ }
4709
+ function reconcileTabOrder(items, order) {
4710
+ const byId = new Map(items.map((item) => [item.id, item]));
4711
+ const next = [];
4712
+ const seen = /* @__PURE__ */ new Set();
4713
+ for (const id of order) {
4714
+ const item = byId.get(id);
4715
+ if (!item || seen.has(item.id)) continue;
4716
+ next.push(item);
4717
+ seen.add(item.id);
4718
+ }
4719
+ for (const item of items) {
4720
+ if (seen.has(item.id)) continue;
4721
+ next.push(item);
4722
+ seen.add(item.id);
4723
+ }
4724
+ return next;
4725
+ }
4726
+ //#endregion
4727
+ //#region src/lib/theme/theme-provider.tsx
4728
+ function readStoredTheme(storageKey, fallback) {
4729
+ if (typeof window === "undefined" || !storageKey) return fallback;
4730
+ const stored = window.localStorage.getItem(storageKey);
4731
+ return stored === "brutal" || stored === "elegant" ? stored : fallback;
4732
+ }
4733
+ function readStoredMode(storageKey, fallback) {
4734
+ if (typeof window === "undefined" || !storageKey) return fallback;
4735
+ const stored = window.localStorage.getItem(storageKey);
4736
+ return stored === "light" || stored === "dark" || stored === "system" ? stored : fallback;
4737
+ }
4738
+ function writeStorage(key, value) {
4739
+ if (typeof window !== "undefined" && key) window.localStorage.setItem(key, value);
4740
+ }
4741
+ function subscribeSystemMode(onStoreChange) {
4742
+ if (typeof window === "undefined") return () => void 0;
4743
+ const media = window.matchMedia("(prefers-color-scheme: dark)");
4744
+ media.addEventListener("change", onStoreChange);
4745
+ return () => media.removeEventListener("change", onStoreChange);
4746
+ }
4747
+ function getSystemMode() {
4748
+ if (typeof window === "undefined") return "light";
4749
+ return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
4750
+ }
4751
+ function ThemeProvider({ theme, defaultTheme = "brutal", onThemeChange, mode, defaultMode = "light", onModeChange, storageKey, modeStorageKey = storageKey ? `${storageKey}-mode` : void 0, syncDom = true, children }) {
4752
+ const [uncontrolledTheme, setUncontrolledTheme] = useState(() => readStoredTheme(storageKey, defaultTheme));
4753
+ const [uncontrolledMode, setUncontrolledMode] = useState(() => readStoredMode(modeStorageKey, defaultMode));
4754
+ const activeTheme = theme ?? uncontrolledTheme;
4755
+ const activeMode = mode ?? uncontrolledMode;
4756
+ const systemMode = useSyncExternalStore(subscribeSystemMode, getSystemMode, () => "light");
4757
+ const resolvedMode = activeMode === "system" ? systemMode : activeMode;
4758
+ const commitTheme = useCallback((nextTheme) => {
4759
+ if (theme === void 0) {
4760
+ setUncontrolledTheme(nextTheme);
4761
+ writeStorage(storageKey, nextTheme);
4762
+ }
4763
+ onThemeChange?.(nextTheme);
4764
+ }, [
4765
+ onThemeChange,
4766
+ storageKey,
4767
+ theme
4768
+ ]);
4769
+ const commitMode = useCallback((nextMode) => {
4770
+ if (mode === void 0) {
4771
+ setUncontrolledMode(nextMode);
4772
+ writeStorage(modeStorageKey, nextMode);
4773
+ }
4774
+ onModeChange?.(nextMode);
4775
+ }, [
4776
+ mode,
4777
+ modeStorageKey,
4778
+ onModeChange
4779
+ ]);
4780
+ const setTheme = useCallback((nextTheme, options) => {
4781
+ commitTheme(nextTheme);
4782
+ if (nextTheme === "brutal") {
4783
+ commitMode("light");
4784
+ return;
4785
+ }
4786
+ if (options?.mode) commitMode(options.mode);
4787
+ }, [commitMode, commitTheme]);
4788
+ const themeState = useMemo(() => ({
4789
+ theme: activeTheme,
4790
+ setTheme,
4791
+ mode: activeMode,
4792
+ resolvedMode
4793
+ }), [
4794
+ activeMode,
4795
+ activeTheme,
4796
+ resolvedMode,
4797
+ setTheme
4798
+ ]);
4799
+ useEffect(() => {
4800
+ if (!syncDom) return;
4801
+ const root = document.documentElement;
4802
+ root.dataset.theme = activeTheme;
4803
+ root.classList.toggle("light", activeTheme === "elegant" && activeMode === "light");
4804
+ root.classList.toggle("dark", activeTheme === "elegant" && activeMode === "dark");
4805
+ root.style.colorScheme = activeTheme === "elegant" ? resolvedMode : "light";
4806
+ }, [
4807
+ activeMode,
4808
+ activeTheme,
4809
+ resolvedMode,
4810
+ syncDom
4811
+ ]);
4812
+ return /* @__PURE__ */ jsx(ThemeStateContext.Provider, {
4813
+ value: themeState,
4814
+ children: /* @__PURE__ */ jsx(ThemeContext.Provider, {
4815
+ value: activeTheme,
4816
+ children
4817
+ })
4818
+ });
4819
+ }
4820
+ //#endregion
4821
+ export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Banner, BannerAction, BannerDescription, BannerTitle, Button, Checkbox, Combobox, ComboboxChip, ComboboxChipRemove, ComboboxChips, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxControl, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxHeader, ComboboxInput, ComboboxInputGroup, ComboboxItem, ComboboxItemIndicator, ComboboxLabel, ComboboxList, ComboboxPopup, ComboboxPortal, ComboboxRow, ComboboxSeparator, ComboboxTrigger, ComboboxTriggerIndicator, ComboboxValue, ContextMenu, ContextMenuCheckboxItem, ContextMenuCheckboxItemIndicator, ContextMenuContent, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuRadioItemIndicator, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSubmenu, ContextMenuSubmenuTrigger, ContextMenuTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuCheckboxItemIndicator, DropdownMenuContent, DropdownMenuItem, DropdownMenuItemCount, DropdownMenuLabel, DropdownMenuPopup, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuRadioItemIndicator, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSubmenu, DropdownMenuSubmenuTrigger, DropdownMenuTrigger, EmptyState, EmptyStateActions, EmptyStateContent, EmptyStateDescription, EmptyStateIcon, EmptyStateTitle, InlineCode, Input, InputGroup, InputGroupAddon, InputGroupInput, Kbd, KbdGroup, Label, LabelAsterisk, LabelOptional, LabelSub, NotificationCenter, NotificationCenterActionButton, NotificationCenterCount, NotificationCenterEmptyState, NotificationCenterHeader, NotificationCenterItem, NotificationCenterItemActions, NotificationCenterItemBody, NotificationCenterItemContent, NotificationCenterItemIcon, NotificationCenterItemRow, NotificationCenterItemTitle, NotificationCenterList, NotificationCenterPopup, NotificationCenterScroller, NotificationCenterTitle, NotificationCenterTrigger, Popover, PopoverArrow, PopoverBackdrop, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverPopup, PopoverPortal, PopoverSeparator, PopoverTitle, PopoverTrigger, PopoverViewport, RadioGroup, RadioGroupIndicator, RadioGroupItem, SegmentedControl, SegmentedControlCount, SegmentedControlItem, SegmentedControlLabel, Select, SelectArrow, SelectContent, SelectGroup, SelectGroupLabel, SelectIcon, SelectItem, SelectItemIndicator, SelectItemText, SelectLabel, SelectList, SelectPopup, SelectPortal, SelectScrollDownArrow, SelectScrollUpArrow, SelectSeparator, SelectTrigger, SelectValue, SortableTabsList, SortableTabsTab, Spinner, Status, Tabs, TabsBackground, TabsIndicator, TabsLabel, TabsList, TabsPanel, TabsTab, Textarea, TextareaCounter, TextareaGroup, ThemeProvider, Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, buttonVariants, cn, useOrderedTabs, useTheme, useThemeFamily };