@viglet/viglet-design-system 2026.3.9 → 2026.3.11

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 (259) hide show
  1. package/README.md +528 -44
  2. package/consumers.json +186 -0
  3. package/dist/badge-locale-CJkHDlPg.cjs +1 -0
  4. package/dist/badge-locale-DxDp8Q3S.js +397 -0
  5. package/dist/bento/bento-actions-menu.d.ts +8 -0
  6. package/dist/bento/bento-actions-menu.d.ts.map +1 -1
  7. package/dist/bento/bento-back-to-top.d.ts +9 -1
  8. package/dist/bento/bento-back-to-top.d.ts.map +1 -1
  9. package/dist/bento/bento-command-palette.d.ts +56 -9
  10. package/dist/bento/bento-command-palette.d.ts.map +1 -1
  11. package/dist/bento/bento-data-table.d.ts +81 -0
  12. package/dist/bento/bento-data-table.d.ts.map +1 -0
  13. package/dist/bento/bento-diff.d.ts +41 -0
  14. package/dist/bento/bento-diff.d.ts.map +1 -0
  15. package/dist/bento/bento-empty-state.d.ts +8 -1
  16. package/dist/bento/bento-empty-state.d.ts.map +1 -1
  17. package/dist/bento/bento-entity-shell.d.ts.map +1 -1
  18. package/dist/bento/bento-filter-bar.d.ts +60 -0
  19. package/dist/bento/bento-filter-bar.d.ts.map +1 -0
  20. package/dist/bento/bento-form-section.d.ts +14 -1
  21. package/dist/bento/bento-form-section.d.ts.map +1 -1
  22. package/dist/bento/bento-inline-edit.d.ts.map +1 -1
  23. package/dist/bento/bento-nav-rail.d.ts +13 -13
  24. package/dist/bento/bento-nav-rail.d.ts.map +1 -1
  25. package/dist/bento/bento-nav.d.ts +10 -2
  26. package/dist/bento/bento-nav.d.ts.map +1 -1
  27. package/dist/bento/bento-palette-trigger.d.ts +18 -0
  28. package/dist/bento/bento-palette-trigger.d.ts.map +1 -0
  29. package/dist/bento/bento-section-chrome.d.ts +19 -39
  30. package/dist/bento/bento-section-chrome.d.ts.map +1 -1
  31. package/dist/bento/bento-shell-shortcuts.d.ts +67 -0
  32. package/dist/bento/bento-shell-shortcuts.d.ts.map +1 -0
  33. package/dist/bento/bento-shell.d.ts +53 -0
  34. package/dist/bento/bento-shell.d.ts.map +1 -0
  35. package/dist/bento/bento-shortcuts-dialog.d.ts +9 -7
  36. package/dist/bento/bento-shortcuts-dialog.d.ts.map +1 -1
  37. package/dist/bento/bento-status-marker.d.ts +5 -2
  38. package/dist/bento/bento-status-marker.d.ts.map +1 -1
  39. package/dist/bento/bento-tile.d.ts.map +1 -1
  40. package/dist/bento/bento-user-menu.d.ts +9 -8
  41. package/dist/bento/bento-user-menu.d.ts.map +1 -1
  42. package/dist/bento/bento-version-rail.d.ts +31 -0
  43. package/dist/bento/bento-version-rail.d.ts.map +1 -0
  44. package/dist/bento/index.d.ts +15 -6
  45. package/dist/bento/index.d.ts.map +1 -1
  46. package/dist/bento.cjs +5 -1
  47. package/dist/bento.css +70 -4
  48. package/dist/bento.es.js +1778 -701
  49. package/dist/catalogue.json +5283 -0
  50. package/dist/components/app-footer.d.ts +7 -0
  51. package/dist/components/app-footer.d.ts.map +1 -1
  52. package/dist/components/app-switcher.d.ts.map +1 -1
  53. package/dist/components/backend-status.d.ts +19 -11
  54. package/dist/components/backend-status.d.ts.map +1 -1
  55. package/dist/components/badge-colorful.d.ts +13 -0
  56. package/dist/components/badge-colorful.d.ts.map +1 -1
  57. package/dist/components/badge-locale.d.ts +7 -0
  58. package/dist/components/badge-locale.d.ts.map +1 -1
  59. package/dist/components/error-boundary.d.ts +15 -13
  60. package/dist/components/error-boundary.d.ts.map +1 -1
  61. package/dist/components/language-select.d.ts +8 -0
  62. package/dist/components/language-select.d.ts.map +1 -1
  63. package/dist/components/login/login.d.ts +27 -0
  64. package/dist/components/login/login.d.ts.map +1 -1
  65. package/dist/components/mode-toggle.d.ts +9 -0
  66. package/dist/components/mode-toggle.d.ts.map +1 -1
  67. package/dist/components/nav-secondary.d.ts +7 -0
  68. package/dist/components/nav-secondary.d.ts.map +1 -1
  69. package/dist/components/router/dialog.delete.d.ts +8 -0
  70. package/dist/components/router/dialog.delete.d.ts.map +1 -1
  71. package/dist/components/router/gradient-button-link.d.ts +6 -0
  72. package/dist/components/router/gradient-button-link.d.ts.map +1 -1
  73. package/dist/components/router/index.d.ts +0 -11
  74. package/dist/components/router/index.d.ts.map +1 -1
  75. package/dist/components/router/loading-provider.d.ts +4 -0
  76. package/dist/components/router/loading-provider.d.ts.map +1 -1
  77. package/dist/components/startup-first/startup-first.d.ts +29 -0
  78. package/dist/components/startup-first/startup-first.d.ts.map +1 -1
  79. package/dist/components/ui/accordion.d.ts +17 -0
  80. package/dist/components/ui/accordion.d.ts.map +1 -1
  81. package/dist/components/ui/avatar.d.ts +14 -0
  82. package/dist/components/ui/avatar.d.ts.map +1 -1
  83. package/dist/components/ui/badge.d.ts +6 -0
  84. package/dist/components/ui/badge.d.ts.map +1 -1
  85. package/dist/components/ui/breadcrumb.d.ts +25 -0
  86. package/dist/components/ui/breadcrumb.d.ts.map +1 -1
  87. package/dist/components/ui/button.d.ts +15 -1
  88. package/dist/components/ui/button.d.ts.map +1 -1
  89. package/dist/components/ui/card.d.ts +27 -0
  90. package/dist/components/ui/card.d.ts.map +1 -1
  91. package/dist/components/ui/checkbox.d.ts +4 -0
  92. package/dist/components/ui/checkbox.d.ts.map +1 -1
  93. package/dist/components/ui/dialog.d.ts +36 -0
  94. package/dist/components/ui/dialog.d.ts.map +1 -1
  95. package/dist/components/ui/drawer.d.ts +35 -0
  96. package/dist/components/ui/drawer.d.ts.map +1 -1
  97. package/dist/components/ui/dropdown-menu.d.ts +53 -0
  98. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  99. package/dist/components/ui/floating-formulas-bg.d.ts +8 -0
  100. package/dist/components/ui/floating-formulas-bg.d.ts.map +1 -1
  101. package/dist/components/ui/form-actions.d.ts +7 -0
  102. package/dist/components/ui/form-actions.d.ts.map +1 -1
  103. package/dist/components/ui/form-item-two-columns.d.ts +7 -0
  104. package/dist/components/ui/form-item-two-columns.d.ts.map +1 -1
  105. package/dist/components/ui/form.d.ts +25 -0
  106. package/dist/components/ui/form.d.ts.map +1 -1
  107. package/dist/components/ui/glass-card.d.ts +18 -14
  108. package/dist/components/ui/glass-card.d.ts.map +1 -1
  109. package/dist/components/ui/gradient-button.d.ts +15 -1
  110. package/dist/components/ui/gradient-button.d.ts.map +1 -1
  111. package/dist/components/ui/gradient-switch.d.ts +6 -0
  112. package/dist/components/ui/gradient-switch.d.ts.map +1 -1
  113. package/dist/components/ui/hover-card.d.ts +14 -0
  114. package/dist/components/ui/hover-card.d.ts.map +1 -1
  115. package/dist/components/ui/icon-picker-dialog.d.ts.map +1 -1
  116. package/dist/components/ui/index.d.ts +6 -4
  117. package/dist/components/ui/index.d.ts.map +1 -1
  118. package/dist/components/ui/input.d.ts +6 -0
  119. package/dist/components/ui/input.d.ts.map +1 -1
  120. package/dist/components/ui/label.d.ts +4 -0
  121. package/dist/components/ui/label.d.ts.map +1 -1
  122. package/dist/components/ui/navigation-menu.d.ts +41 -0
  123. package/dist/components/ui/navigation-menu.d.ts.map +1 -1
  124. package/dist/components/ui/pagination.d.ts +25 -0
  125. package/dist/components/ui/pagination.d.ts.map +1 -1
  126. package/dist/components/ui/popover.d.ts +24 -0
  127. package/dist/components/ui/popover.d.ts.map +1 -1
  128. package/dist/components/ui/progress.d.ts +4 -0
  129. package/dist/components/ui/progress.d.ts.map +1 -1
  130. package/dist/components/ui/pulse-ring.d.ts +9 -11
  131. package/dist/components/ui/pulse-ring.d.ts.map +1 -1
  132. package/dist/components/ui/resizable.d.ts +11 -0
  133. package/dist/components/ui/resizable.d.ts.map +1 -1
  134. package/dist/components/ui/section-card.d.ts +9 -0
  135. package/dist/components/ui/section-card.d.ts.map +1 -1
  136. package/dist/components/ui/select.d.ts +36 -0
  137. package/dist/components/ui/select.d.ts.map +1 -1
  138. package/dist/components/ui/separator.d.ts +4 -0
  139. package/dist/components/ui/separator.d.ts.map +1 -1
  140. package/dist/components/ui/sheet.d.ts +29 -0
  141. package/dist/components/ui/sheet.d.ts.map +1 -1
  142. package/dist/components/ui/sidebar.d.ts +83 -0
  143. package/dist/components/ui/sidebar.d.ts.map +1 -1
  144. package/dist/components/ui/skeleton.d.ts +4 -0
  145. package/dist/components/ui/skeleton.d.ts.map +1 -1
  146. package/dist/components/ui/slider.d.ts +4 -0
  147. package/dist/components/ui/slider.d.ts.map +1 -1
  148. package/dist/components/ui/sonner.d.ts +16 -0
  149. package/dist/components/ui/sonner.d.ts.map +1 -1
  150. package/dist/components/ui/stepper.d.ts +8 -0
  151. package/dist/components/ui/stepper.d.ts.map +1 -1
  152. package/dist/components/ui/sticky-save-bar.d.ts +7 -0
  153. package/dist/components/ui/sticky-save-bar.d.ts.map +1 -1
  154. package/dist/components/ui/switch.d.ts +4 -0
  155. package/dist/components/ui/switch.d.ts.map +1 -1
  156. package/dist/components/ui/table.d.ts +31 -0
  157. package/dist/components/ui/table.d.ts.map +1 -1
  158. package/dist/components/ui/tabs.d.ts +16 -0
  159. package/dist/components/ui/tabs.d.ts.map +1 -1
  160. package/dist/components/ui/textarea.d.ts +4 -0
  161. package/dist/components/ui/textarea.d.ts.map +1 -1
  162. package/dist/components/ui/toggle-group.d.ts +7 -0
  163. package/dist/components/ui/toggle-group.d.ts.map +1 -1
  164. package/dist/components/ui/toggle.d.ts +4 -0
  165. package/dist/components/ui/toggle.d.ts.map +1 -1
  166. package/dist/components/ui/tooltip.d.ts +18 -0
  167. package/dist/components/ui/tooltip.d.ts.map +1 -1
  168. package/dist/components/ui/user-avatar.d.ts +2 -1
  169. package/dist/components/ui/user-avatar.d.ts.map +1 -1
  170. package/dist/components/ui/viglet-assistant.d.ts +103 -0
  171. package/dist/components/ui/viglet-assistant.d.ts.map +1 -0
  172. package/dist/components/ui/viglet-avatar.d.ts +44 -0
  173. package/dist/components/ui/viglet-avatar.d.ts.map +1 -0
  174. package/dist/contexts/breadcrumb.context.d.ts +7 -0
  175. package/dist/contexts/breadcrumb.context.d.ts.map +1 -1
  176. package/dist/contexts/user.context.d.ts +8 -0
  177. package/dist/contexts/user.context.d.ts.map +1 -1
  178. package/dist/exports.json +359 -30
  179. package/dist/floating-formulas-bg.cjs +1 -1
  180. package/dist/floating-formulas-bg.es.js +56 -55
  181. package/dist/hooks/index.d.ts +1 -0
  182. package/dist/hooks/index.d.ts.map +1 -1
  183. package/dist/hooks/use-assistant-notifications.d.ts +15 -0
  184. package/dist/hooks/use-assistant-notifications.d.ts.map +1 -0
  185. package/dist/i18n/index.d.ts +168 -0
  186. package/dist/i18n/index.d.ts.map +1 -1
  187. package/dist/i18n/locales/en/assistant.json.d.ts +25 -0
  188. package/dist/i18n/locales/en/bento.json.d.ts +48 -2
  189. package/dist/i18n/locales/en/common.json.d.ts +6 -1
  190. package/dist/i18n/locales/en/language.json.d.ts +8 -0
  191. package/dist/i18n/locales/pt/assistant.json.d.ts +25 -0
  192. package/dist/i18n/locales/pt/bento.json.d.ts +48 -2
  193. package/dist/i18n/locales/pt/common.json.d.ts +6 -1
  194. package/dist/i18n/locales/pt/language.json.d.ts +8 -0
  195. package/dist/i18n.cjs +1 -1
  196. package/dist/i18n.es.js +572 -2
  197. package/dist/index.cjs +1 -1
  198. package/dist/index.d.ts +0 -1
  199. package/dist/index.d.ts.map +1 -1
  200. package/dist/index.es.js +2280 -733
  201. package/dist/lib/busy.d.ts +26 -0
  202. package/dist/lib/busy.d.ts.map +1 -0
  203. package/dist/lib/corner-slot.d.ts +15 -0
  204. package/dist/lib/corner-slot.d.ts.map +1 -0
  205. package/dist/{loading-provider-BWWhhfEn.js → loading-provider-ClDkFPuv.js} +84 -81
  206. package/dist/loading-provider-DGuCfsl9.cjs +1 -0
  207. package/dist/preset.css +7 -10
  208. package/dist/router.cjs +1 -1
  209. package/dist/router.es.js +2 -776
  210. package/dist/user.context-Cr3GAQ_r.js +762 -0
  211. package/dist/user.context-hbdvmXOn.cjs +1 -0
  212. package/dist/utils-Fk5jmzzb.js +41 -0
  213. package/dist/utils-Oagwe_oa.cjs +1 -0
  214. package/dist/viglet-design-system.css +1 -1
  215. package/dist/vite/boot-loader.d.ts +33 -2
  216. package/dist/vite/boot-loader.d.ts.map +1 -1
  217. package/dist/vite.cjs +16 -5
  218. package/dist/vite.es.js +27 -14
  219. package/docs/BENTO-AUTHORING.md +81 -11
  220. package/docs/reference/grounds.dc.html +9 -9
  221. package/package.json +16 -4
  222. package/scripts/consumer-entries.mjs +209 -0
  223. package/scripts/lib/contrast.mjs +301 -0
  224. package/scripts/mcp.mjs +300 -0
  225. package/scripts/page-lint.mjs +428 -0
  226. package/scripts/page-reference.mjs +54 -10
  227. package/dist/badge-locale-CoEEv7s5.js +0 -581
  228. package/dist/badge-locale-hQyWhAKe.cjs +0 -7
  229. package/dist/breadcrumb.context-KQut7j8U.js +0 -917
  230. package/dist/breadcrumb.context-Vwc3lAlf.cjs +0 -1
  231. package/dist/components/router/blank-slate.d.ts +0 -21
  232. package/dist/components/router/blank-slate.d.ts.map +0 -1
  233. package/dist/components/router/grid.list.d.ts +0 -39
  234. package/dist/components/router/grid.list.d.ts.map +0 -1
  235. package/dist/components/router/internal.sidebar.d.ts +0 -61
  236. package/dist/components/router/internal.sidebar.d.ts.map +0 -1
  237. package/dist/components/router/nav-main.d.ts +0 -25
  238. package/dist/components/router/nav-main.d.ts.map +0 -1
  239. package/dist/components/router/nav-user.d.ts +0 -24
  240. package/dist/components/router/nav-user.d.ts.map +0 -1
  241. package/dist/components/router/page-content.d.ts +0 -12
  242. package/dist/components/router/page-content.d.ts.map +0 -1
  243. package/dist/components/router/page-header.d.ts +0 -23
  244. package/dist/components/router/page-header.d.ts.map +0 -1
  245. package/dist/components/router/page.d.ts +0 -22
  246. package/dist/components/router/page.d.ts.map +0 -1
  247. package/dist/components/router/sticky.page.header.d.ts +0 -85
  248. package/dist/components/router/sticky.page.header.d.ts.map +0 -1
  249. package/dist/components/router/sub.page.d.ts +0 -50
  250. package/dist/components/router/sub.page.d.ts.map +0 -1
  251. package/dist/components/router/sub.page.header.d.ts +0 -37
  252. package/dist/components/router/sub.page.header.d.ts.map +0 -1
  253. package/dist/i18n-DD3rQOWi.js +0 -426
  254. package/dist/i18n-DrBq-qJJ.cjs +0 -1
  255. package/dist/lib/react-markers.d.ts +0 -17
  256. package/dist/lib/react-markers.d.ts.map +0 -1
  257. package/dist/loading-provider-CmeMqLGk.cjs +0 -1
  258. package/dist/user.context-B9vIBzY5.cjs +0 -1
  259. package/dist/user.context-D1PxP4D4.js +0 -512
@@ -0,0 +1,762 @@
1
+ import { t as e } from "./utils-Fk5jmzzb.js";
2
+ import { C as t, a as n, c as r, g as i, o as a, p as o, u as s, v as c, y as l } from "./badge-locale-DxDp8Q3S.js";
3
+ import * as u from "react";
4
+ import d, { createContext as f, useCallback as ee, useContext as p, useEffect as m, useRef as h, useState as g } from "react";
5
+ import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
6
+ import * as b from "@radix-ui/react-avatar";
7
+ import { Slot as x } from "@radix-ui/react-slot";
8
+ import { cva as S } from "class-variance-authority";
9
+ import { useTranslation as C } from "react-i18next";
10
+ import * as w from "@radix-ui/react-checkbox";
11
+ import * as T from "@radix-ui/react-dropdown-menu";
12
+ import { IconChevronDown as E, IconLoader2 as te, IconSearch as ne, IconSparkles as D, IconTrash as re } from "@tabler/icons-react";
13
+ import { Icon as O } from "@iconify/react";
14
+ import { Popover as k } from "radix-ui";
15
+ import * as A from "@radix-ui/react-tooltip";
16
+ import { useTheme as j } from "next-themes";
17
+ import { Toaster as M, toast as N } from "sonner";
18
+ var P = t("check", [["path", {
19
+ d: "M20 6 9 17l-5-5",
20
+ key: "1gmf2c"
21
+ }]]), F = t("chevron-right", [["path", {
22
+ d: "m9 18 6-6-6-6",
23
+ key: "mthhwq"
24
+ }]]), I = t("circle-check", [["circle", {
25
+ cx: "12",
26
+ cy: "12",
27
+ r: "10",
28
+ key: "1mglay"
29
+ }], ["path", {
30
+ d: "m9 12 2 2 4-4",
31
+ key: "dzmm74"
32
+ }]]), L = t("circle", [["circle", {
33
+ cx: "12",
34
+ cy: "12",
35
+ r: "10",
36
+ key: "1mglay"
37
+ }]]), R = t("info", [
38
+ ["circle", {
39
+ cx: "12",
40
+ cy: "12",
41
+ r: "10",
42
+ key: "1mglay"
43
+ }],
44
+ ["path", {
45
+ d: "M12 16v-4",
46
+ key: "1dtifu"
47
+ }],
48
+ ["path", {
49
+ d: "M12 8h.01",
50
+ key: "e9boi3"
51
+ }]
52
+ ]), z = t("loader-circle", [["path", {
53
+ d: "M21 12a9 9 0 1 1-6.219-8.56",
54
+ key: "13zald"
55
+ }]]), B = t("octagon-x", [
56
+ ["path", {
57
+ d: "m15 9-6 6",
58
+ key: "1uzhvr"
59
+ }],
60
+ ["path", {
61
+ d: "M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",
62
+ key: "2d38gg"
63
+ }],
64
+ ["path", {
65
+ d: "m9 9 6 6",
66
+ key: "z0biqf"
67
+ }]
68
+ ]), V = t("triangle-alert", [
69
+ ["path", {
70
+ d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
71
+ key: "wmoenq"
72
+ }],
73
+ ["path", {
74
+ d: "M12 9v4",
75
+ key: "juzpu7"
76
+ }],
77
+ ["path", {
78
+ d: "M12 17h.01",
79
+ key: "p32p05"
80
+ }]
81
+ ]), H = S("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all cursor-pointer disabled:cursor-not-allowed disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
82
+ variants: {
83
+ variant: {
84
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
85
+ destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
86
+ outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
87
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
88
+ ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
89
+ link: "text-primary underline-offset-4 hover:underline"
90
+ },
91
+ size: {
92
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
93
+ sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
94
+ lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
95
+ icon: "size-9",
96
+ "icon-sm": "size-8",
97
+ "icon-lg": "size-10"
98
+ }
99
+ },
100
+ defaultVariants: {
101
+ variant: "default",
102
+ size: "default"
103
+ }
104
+ });
105
+ function ie({ className: t, variant: n, size: r, asChild: i = !1, loading: a = !1, onClick: o, children: s, ...u }) {
106
+ let d = i ? x : "button", f = l(a, u["aria-disabled"], o);
107
+ return /* @__PURE__ */ v(d, {
108
+ "data-slot": "button",
109
+ className: e(H({
110
+ variant: n,
111
+ size: r,
112
+ className: t
113
+ }), f.inert && (a ? "cursor-progress" : "cursor-not-allowed opacity-50")),
114
+ ...u,
115
+ ...f.props,
116
+ children: i ? s : /* @__PURE__ */ y(_, { children: [a && /* @__PURE__ */ v(c, {}), s] })
117
+ });
118
+ }
119
+ //#endregion
120
+ //#region src/components/ui/checkbox.tsx
121
+ function ae({ className: t, ...n }) {
122
+ return /* @__PURE__ */ v(w.Root, {
123
+ "data-slot": "checkbox",
124
+ className: e("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", t),
125
+ ...n,
126
+ children: /* @__PURE__ */ v(w.Indicator, {
127
+ "data-slot": "checkbox-indicator",
128
+ className: "grid place-content-center text-current transition-none",
129
+ children: /* @__PURE__ */ v(P, { className: "size-3.5" })
130
+ })
131
+ });
132
+ }
133
+ //#endregion
134
+ //#region src/components/ui/dropdown-menu.tsx
135
+ function oe({ ...e }) {
136
+ return /* @__PURE__ */ v(T.Root, {
137
+ "data-slot": "dropdown-menu",
138
+ ...e
139
+ });
140
+ }
141
+ function se({ ...e }) {
142
+ return /* @__PURE__ */ v(T.Portal, {
143
+ "data-slot": "dropdown-menu-portal",
144
+ ...e
145
+ });
146
+ }
147
+ function ce({ ...e }) {
148
+ return /* @__PURE__ */ v(T.Trigger, {
149
+ "data-slot": "dropdown-menu-trigger",
150
+ ...e
151
+ });
152
+ }
153
+ function le({ className: t, sideOffset: n = 4, ...r }) {
154
+ return /* @__PURE__ */ v(T.Portal, { children: /* @__PURE__ */ v(T.Content, {
155
+ "data-slot": "dropdown-menu-content",
156
+ sideOffset: n,
157
+ className: e("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", t),
158
+ ...r
159
+ }) });
160
+ }
161
+ function ue({ ...e }) {
162
+ return /* @__PURE__ */ v(T.Group, {
163
+ "data-slot": "dropdown-menu-group",
164
+ ...e
165
+ });
166
+ }
167
+ function de({ className: t, inset: n, variant: r = "default", ...i }) {
168
+ return /* @__PURE__ */ v(T.Item, {
169
+ "data-slot": "dropdown-menu-item",
170
+ "data-inset": n,
171
+ "data-variant": r,
172
+ className: e("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
173
+ ...i
174
+ });
175
+ }
176
+ function fe({ className: t, children: n, checked: r, ...i }) {
177
+ return /* @__PURE__ */ y(T.CheckboxItem, {
178
+ "data-slot": "dropdown-menu-checkbox-item",
179
+ className: e("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
180
+ checked: r,
181
+ ...i,
182
+ children: [/* @__PURE__ */ v("span", {
183
+ className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
184
+ children: /* @__PURE__ */ v(T.ItemIndicator, { children: /* @__PURE__ */ v(P, { className: "size-4" }) })
185
+ }), n]
186
+ });
187
+ }
188
+ function pe({ ...e }) {
189
+ return /* @__PURE__ */ v(T.RadioGroup, {
190
+ "data-slot": "dropdown-menu-radio-group",
191
+ ...e
192
+ });
193
+ }
194
+ function me({ className: t, children: n, ...r }) {
195
+ return /* @__PURE__ */ y(T.RadioItem, {
196
+ "data-slot": "dropdown-menu-radio-item",
197
+ className: e("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
198
+ ...r,
199
+ children: [/* @__PURE__ */ v("span", {
200
+ className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
201
+ children: /* @__PURE__ */ v(T.ItemIndicator, { children: /* @__PURE__ */ v(L, { className: "size-2 fill-current" }) })
202
+ }), n]
203
+ });
204
+ }
205
+ function he({ className: t, inset: n, ...r }) {
206
+ return /* @__PURE__ */ v(T.Label, {
207
+ "data-slot": "dropdown-menu-label",
208
+ "data-inset": n,
209
+ className: e("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", t),
210
+ ...r
211
+ });
212
+ }
213
+ function ge({ className: t, ...n }) {
214
+ return /* @__PURE__ */ v(T.Separator, {
215
+ "data-slot": "dropdown-menu-separator",
216
+ className: e("bg-border -mx-1 my-1 h-px", t),
217
+ ...n
218
+ });
219
+ }
220
+ function _e({ className: t, ...n }) {
221
+ return /* @__PURE__ */ v("span", {
222
+ "data-slot": "dropdown-menu-shortcut",
223
+ className: e("text-muted-foreground ml-auto text-xs tracking-widest", t),
224
+ ...n
225
+ });
226
+ }
227
+ function ve({ ...e }) {
228
+ return /* @__PURE__ */ v(T.Sub, {
229
+ "data-slot": "dropdown-menu-sub",
230
+ ...e
231
+ });
232
+ }
233
+ function ye({ className: t, inset: n, children: r, ...i }) {
234
+ return /* @__PURE__ */ y(T.SubTrigger, {
235
+ "data-slot": "dropdown-menu-sub-trigger",
236
+ "data-inset": n,
237
+ className: e("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
238
+ ...i,
239
+ children: [r, /* @__PURE__ */ v(F, { className: "ml-auto size-4" })]
240
+ });
241
+ }
242
+ function be({ className: t, ...n }) {
243
+ return /* @__PURE__ */ v(T.SubContent, {
244
+ "data-slot": "dropdown-menu-sub-content",
245
+ className: e("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", t),
246
+ ...n
247
+ });
248
+ }
249
+ //#endregion
250
+ //#region src/components/ui/icon-picker-dialog.tsx
251
+ var U = [
252
+ "lucide",
253
+ "tabler",
254
+ "mdi",
255
+ "ph",
256
+ "solar",
257
+ "heroicons"
258
+ ], xe = U.join(",");
259
+ async function W(e, t, n) {
260
+ try {
261
+ let r = await fetch(`https://api.iconify.design/search?query=${encodeURIComponent(e)}&limit=${t}&prefixes=${xe}`, { signal: n });
262
+ if (r.ok) return (await r.json()).icons ?? [];
263
+ } catch {}
264
+ return [];
265
+ }
266
+ function Se({ open: e, onOpenChange: t, value: c, onSelect: l, onClear: u, title: d, description: f, suggestKeywords: p }) {
267
+ let { t: _ } = C(), [b, x] = g(""), [S, w] = g([]), [T, E] = g(!1), k = h(null), [A, j] = g(!1), [M, N] = g([]), P = h(0), [F, I] = g(null), L = ee(async (e, t) => {
268
+ let n = ++P.current, r = () => n === P.current && !t.aborted;
269
+ if (!e.trim()) {
270
+ w([]);
271
+ return;
272
+ }
273
+ E(!0);
274
+ try {
275
+ let n = await W(e, 60, t);
276
+ r() && w(n);
277
+ } catch {
278
+ r() && w([]);
279
+ } finally {
280
+ r() && E(!1);
281
+ }
282
+ }, []);
283
+ m(() => {
284
+ let e = new AbortController();
285
+ return k.current && clearTimeout(k.current), k.current = setTimeout(() => L(b, e.signal), 350), () => {
286
+ k.current && clearTimeout(k.current), e.abort();
287
+ };
288
+ }, [b, L]);
289
+ let R = h(null);
290
+ m(() => () => R.current?.abort(), []);
291
+ function z(e) {
292
+ l(e), t(!1), x(""), w([]), N([]), I(null);
293
+ }
294
+ async function B() {
295
+ if (!p || A) return;
296
+ let e = new AbortController();
297
+ R.current = e, j(!0), N([]), I(null);
298
+ try {
299
+ let t = (await p({
300
+ title: d,
301
+ description: f
302
+ })).filter((e) => typeof e == "string" && e.trim()).slice(0, 5), n = [];
303
+ for (let r of t) {
304
+ if (e.signal.aborted) return;
305
+ n.push({
306
+ keyword: r.trim(),
307
+ icons: await W(r.trim(), 30, e.signal)
308
+ });
309
+ }
310
+ e.signal.aborted || N(n);
311
+ } catch {
312
+ e.signal.aborted || N([]);
313
+ } finally {
314
+ e.signal.aborted || j(!1);
315
+ }
316
+ }
317
+ let V = F ? M.find((e) => e.keyword === F)?.icons ?? [] : M.flatMap((e) => e.icons.slice(0, 3)), H = !!p && !!(d?.trim() ?? f?.trim());
318
+ return /* @__PURE__ */ v(r, {
319
+ open: e,
320
+ onOpenChange: t,
321
+ children: /* @__PURE__ */ y(s, {
322
+ className: "flex max-h-[80vh] flex-col sm:max-w-lg",
323
+ children: [
324
+ /* @__PURE__ */ v(o, { children: /* @__PURE__ */ v(i, { children: _("forms.iconPicker.chooseAnIcon", { defaultValue: "Choose an icon" }) }) }),
325
+ /* @__PURE__ */ y("div", {
326
+ className: "flex gap-2",
327
+ children: [/* @__PURE__ */ y("div", {
328
+ className: "relative flex-1",
329
+ children: [/* @__PURE__ */ v(ne, { className: "absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }), /* @__PURE__ */ v(n, {
330
+ value: b,
331
+ onChange: (e) => x(e.target.value),
332
+ placeholder: _("forms.iconPicker.searchIcons", { defaultValue: "Search icons" }),
333
+ className: "pl-9",
334
+ autoFocus: !0
335
+ })]
336
+ }), H && /* @__PURE__ */ y(a, {
337
+ type: "button",
338
+ size: "sm",
339
+ variant: "outline",
340
+ onClick: B,
341
+ disabled: A,
342
+ className: "shrink-0 gap-1.5",
343
+ children: [A ? /* @__PURE__ */ v(te, { className: "size-4 animate-spin" }) : /* @__PURE__ */ v(D, { className: "size-4" }), _("forms.iconPicker.aiSuggest", { defaultValue: "Suggest" })]
344
+ })]
345
+ }),
346
+ M.length > 0 && /* @__PURE__ */ y("div", {
347
+ className: "rounded-lg border border-[var(--vg-accent-line)] bg-[var(--vg-accent-surface)] p-3",
348
+ children: [
349
+ /* @__PURE__ */ y("div", {
350
+ className: "mb-2 flex items-center gap-1.5 text-xs font-medium vg-accent-text",
351
+ children: [/* @__PURE__ */ v(D, { className: "size-3.5" }), _("forms.iconPicker.aiSuggestions", { defaultValue: "Suggestions" })]
352
+ }),
353
+ /* @__PURE__ */ v("div", {
354
+ className: "mb-3 flex flex-wrap gap-1.5",
355
+ children: M.map((e) => /* @__PURE__ */ y("button", {
356
+ type: "button",
357
+ onClick: () => I(F === e.keyword ? null : e.keyword),
358
+ className: `cursor-pointer rounded-full px-3 py-1 text-xs font-medium transition-all ${F === e.keyword ? "vg-accent-solid text-white" : "bg-[var(--vg-accent-surface)] text-[var(--vg-accent-fg)] hover:bg-[var(--vg-accent-surface-strong)]"}`,
359
+ children: [e.keyword, /* @__PURE__ */ v("span", {
360
+ className: "ml-1 opacity-60",
361
+ children: e.icons.length
362
+ })]
363
+ }, e.keyword))
364
+ }),
365
+ /* @__PURE__ */ v("div", {
366
+ className: "flex max-h-60 flex-wrap gap-2 overflow-y-auto",
367
+ children: V.map((e) => /* @__PURE__ */ y("button", {
368
+ type: "button",
369
+ onClick: () => z(e),
370
+ className: `flex cursor-pointer flex-col items-center gap-1 rounded-lg p-2 transition-all hover:bg-[var(--vg-accent-surface)] ${c === e ? "border border-[var(--vg-accent-line)] bg-[var(--vg-accent-surface-strong)] vg-accent-text" : "border border-[var(--vg-accent-line)]"}`,
371
+ title: e,
372
+ children: [/* @__PURE__ */ v(O, {
373
+ icon: e,
374
+ className: "size-7"
375
+ }), /* @__PURE__ */ v("span", {
376
+ className: "max-w-[80px] truncate text-center text-[9px] leading-tight text-muted-foreground",
377
+ children: e.split(":")[1] ?? e
378
+ })]
379
+ }, e))
380
+ })
381
+ ]
382
+ }),
383
+ /* @__PURE__ */ y("div", {
384
+ className: "max-h-[400px] min-h-[200px] flex-1 overflow-y-auto",
385
+ children: [
386
+ T && /* @__PURE__ */ v("div", {
387
+ className: "flex h-32 items-center justify-center text-sm text-muted-foreground",
388
+ children: _("forms.iconPicker.searching", { defaultValue: "Searching…" })
389
+ }),
390
+ !T && b && S.length === 0 && /* @__PURE__ */ v("div", {
391
+ className: "flex h-32 items-center justify-center text-sm text-muted-foreground",
392
+ children: _("forms.iconPicker.noIconsFound", {
393
+ query: b,
394
+ defaultValue: "No icons found for “{{query}}”"
395
+ })
396
+ }),
397
+ !T && !b && S.length === 0 && M.length === 0 && /* @__PURE__ */ y("div", {
398
+ className: "flex h-32 flex-col items-center justify-center gap-2 px-4 text-center text-sm text-muted-foreground",
399
+ children: [/* @__PURE__ */ v("span", { children: _("forms.iconPicker.typeToSearch", {
400
+ count: U.length,
401
+ defaultValue: "Type to search {{count}} icon collections"
402
+ }) }), H && /* @__PURE__ */ v("span", {
403
+ className: "text-xs leading-relaxed",
404
+ children: _("forms.iconPicker.orClickAi", { defaultValue: "…or let the title and description suggest some" })
405
+ })]
406
+ }),
407
+ S.length > 0 && /* @__PURE__ */ v("div", {
408
+ className: "grid grid-cols-6 gap-1.5 p-1",
409
+ children: S.map((e) => /* @__PURE__ */ y("button", {
410
+ type: "button",
411
+ onClick: () => z(e),
412
+ className: `flex cursor-pointer flex-col items-center justify-center gap-1 rounded-lg p-2 transition-all hover:bg-muted ${c === e ? "border border-[var(--vg-accent-line)] bg-[var(--vg-accent-surface)] vg-accent-text" : "border border-transparent hover:border-border"}`,
413
+ title: e,
414
+ children: [/* @__PURE__ */ v(O, {
415
+ icon: e,
416
+ className: "size-6"
417
+ }), /* @__PURE__ */ v("span", {
418
+ className: "w-full truncate text-center text-[9px] leading-tight text-muted-foreground",
419
+ children: e.split(":")[1] ?? e
420
+ })]
421
+ }, e))
422
+ })
423
+ ]
424
+ }),
425
+ c && /* @__PURE__ */ y("div", {
426
+ className: "flex items-center justify-between border-t pt-2",
427
+ children: [/* @__PURE__ */ y("div", {
428
+ className: "flex items-center gap-2",
429
+ children: [/* @__PURE__ */ v(O, {
430
+ icon: c,
431
+ className: "size-5"
432
+ }), /* @__PURE__ */ v("span", {
433
+ className: "font-mono text-xs text-muted-foreground",
434
+ children: c
435
+ })]
436
+ }), /* @__PURE__ */ y("div", {
437
+ className: "flex gap-2",
438
+ children: [u && /* @__PURE__ */ y(a, {
439
+ size: "sm",
440
+ type: "button",
441
+ variant: "outline",
442
+ onClick: () => {
443
+ u(), t(!1);
444
+ },
445
+ children: [/* @__PURE__ */ v(re, { className: "size-4" }), _("forms.common.remove", { defaultValue: "Remove" })]
446
+ }), /* @__PURE__ */ v(a, {
447
+ size: "sm",
448
+ type: "button",
449
+ onClick: () => t(!1),
450
+ children: _("forms.iconPicker.done", { defaultValue: "Done" })
451
+ })]
452
+ })]
453
+ })
454
+ ]
455
+ })
456
+ });
457
+ }
458
+ //#endregion
459
+ //#region src/components/ui/popover.tsx
460
+ function Ce({ ...e }) {
461
+ return /* @__PURE__ */ v(k.Root, {
462
+ "data-slot": "popover",
463
+ ...e
464
+ });
465
+ }
466
+ function we({ ...e }) {
467
+ return /* @__PURE__ */ v(k.Trigger, {
468
+ "data-slot": "popover-trigger",
469
+ ...e
470
+ });
471
+ }
472
+ function Te({ className: t, align: n = "center", sideOffset: r = 4, ...i }) {
473
+ return /* @__PURE__ */ v(k.Portal, { children: /* @__PURE__ */ v(k.Content, {
474
+ "data-slot": "popover-content",
475
+ align: n,
476
+ sideOffset: r,
477
+ className: e("z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", t),
478
+ ...i
479
+ }) });
480
+ }
481
+ function Ee({ ...e }) {
482
+ return /* @__PURE__ */ v(k.Anchor, {
483
+ "data-slot": "popover-anchor",
484
+ ...e
485
+ });
486
+ }
487
+ function De({ className: t, ...n }) {
488
+ return /* @__PURE__ */ v("div", {
489
+ "data-slot": "popover-header",
490
+ className: e("flex flex-col gap-1 text-sm", t),
491
+ ...n
492
+ });
493
+ }
494
+ function Oe({ className: t, ...n }) {
495
+ return /* @__PURE__ */ v("div", {
496
+ "data-slot": "popover-title",
497
+ className: e("font-medium", t),
498
+ ...n
499
+ });
500
+ }
501
+ function ke({ className: t, ...n }) {
502
+ return /* @__PURE__ */ v("p", {
503
+ "data-slot": "popover-description",
504
+ className: e("text-muted-foreground", t),
505
+ ...n
506
+ });
507
+ }
508
+ //#endregion
509
+ //#region src/components/ui/section-card.tsx
510
+ var G = {
511
+ blue: {
512
+ color: "text-blue-600 dark:text-blue-400",
513
+ bg: "from-blue-500/10 to-indigo-500/10 dark:from-blue-500/20 dark:to-indigo-500/20",
514
+ ring: "ring-blue-500/10 dark:ring-blue-400/10"
515
+ },
516
+ violet: {
517
+ color: "text-violet-600 dark:text-violet-400",
518
+ bg: "from-violet-500/10 to-purple-500/10 dark:from-violet-500/20 dark:to-purple-500/20",
519
+ ring: "ring-violet-500/10 dark:ring-violet-400/10"
520
+ },
521
+ emerald: {
522
+ color: "text-emerald-600 dark:text-emerald-400",
523
+ bg: "from-emerald-500/10 to-teal-500/10 dark:from-emerald-500/20 dark:to-teal-500/20",
524
+ ring: "ring-emerald-500/10 dark:ring-emerald-400/10"
525
+ },
526
+ amber: {
527
+ color: "text-amber-600 dark:text-amber-400",
528
+ bg: "from-amber-500/10 to-orange-500/10 dark:from-amber-500/20 dark:to-orange-500/20",
529
+ ring: "ring-amber-500/10 dark:ring-amber-400/10"
530
+ },
531
+ rose: {
532
+ color: "text-rose-600 dark:text-rose-400",
533
+ bg: "from-rose-500/10 to-pink-500/10 dark:from-rose-500/20 dark:to-pink-500/20",
534
+ ring: "ring-rose-500/10 dark:ring-rose-400/10"
535
+ },
536
+ cyan: {
537
+ color: "text-cyan-600 dark:text-cyan-400",
538
+ bg: "from-cyan-500/10 to-sky-500/10 dark:from-cyan-500/20 dark:to-sky-500/20",
539
+ ring: "ring-cyan-500/10 dark:ring-cyan-400/10"
540
+ },
541
+ orange: {
542
+ color: "text-orange-600 dark:text-orange-400",
543
+ bg: "from-orange-500/10 to-amber-500/10 dark:from-orange-500/20 dark:to-amber-500/20",
544
+ ring: "ring-orange-500/10 dark:ring-orange-400/10"
545
+ },
546
+ slate: {
547
+ color: "text-slate-600 dark:text-slate-400",
548
+ bg: "from-slate-500/10 to-gray-500/10 dark:from-slate-500/20 dark:to-gray-500/20",
549
+ ring: "ring-slate-500/10 dark:ring-slate-400/10"
550
+ }
551
+ }, K = f({
552
+ open: !0,
553
+ toggle: () => {},
554
+ variant: "blue"
555
+ });
556
+ function q({ variant: t = "blue", defaultOpen: n = !0, children: r, className: i }) {
557
+ let [a, o] = g(n);
558
+ return /* @__PURE__ */ v(K.Provider, {
559
+ value: {
560
+ open: a,
561
+ toggle: () => o((e) => !e),
562
+ variant: t
563
+ },
564
+ children: /* @__PURE__ */ v("div", {
565
+ className: e("rounded-xl border overflow-hidden", i),
566
+ children: r
567
+ })
568
+ });
569
+ }
570
+ function Ae({ icon: t, title: n, description: r, className: i }) {
571
+ let { open: a, toggle: o, variant: s } = p(K), c = G[s];
572
+ return /* @__PURE__ */ y("button", {
573
+ type: "button",
574
+ onClick: o,
575
+ className: e("flex w-full items-center gap-3 px-5 py-4 bg-muted/40 border-b cursor-pointer hover:bg-muted/60 transition-colors", i),
576
+ children: [
577
+ /* @__PURE__ */ v("div", {
578
+ className: `flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-linear-to-br ${c.bg} ring-1 ${c.ring}`,
579
+ children: /* @__PURE__ */ v(t, { className: `size-4 ${c.color}` })
580
+ }),
581
+ /* @__PURE__ */ y("div", {
582
+ className: "min-w-0 text-left",
583
+ children: [/* @__PURE__ */ v("h3", {
584
+ className: "text-sm font-semibold text-foreground",
585
+ children: n
586
+ }), r && /* @__PURE__ */ v("p", {
587
+ className: "text-xs text-muted-foreground",
588
+ children: r
589
+ })]
590
+ }),
591
+ /* @__PURE__ */ v(E, { className: e("ml-auto size-4 text-muted-foreground shrink-0 transition-transform duration-200", a && "rotate-180") })
592
+ ]
593
+ });
594
+ }
595
+ function je({ icon: t, title: n, description: r, className: i }) {
596
+ let { variant: a } = p(K), o = G[a];
597
+ return /* @__PURE__ */ y("div", {
598
+ className: e("flex items-center gap-3 px-5 py-4 bg-muted/40 border-b", i),
599
+ children: [/* @__PURE__ */ v("div", {
600
+ className: `flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-linear-to-br ${o.bg} ring-1 ${o.ring}`,
601
+ children: /* @__PURE__ */ v(t, { className: `size-4 ${o.color}` })
602
+ }), /* @__PURE__ */ y("div", {
603
+ className: "min-w-0",
604
+ children: [/* @__PURE__ */ v("h3", {
605
+ className: "text-sm font-semibold text-foreground",
606
+ children: n
607
+ }), r && /* @__PURE__ */ v("p", {
608
+ className: "text-xs text-muted-foreground",
609
+ children: r
610
+ })]
611
+ })]
612
+ });
613
+ }
614
+ function Me({ children: t, className: n }) {
615
+ let { open: r } = p(K);
616
+ return r ? /* @__PURE__ */ v("div", {
617
+ className: e("p-5 space-y-6", n),
618
+ children: t
619
+ }) : null;
620
+ }
621
+ q.Header = Ae, q.StaticHeader = je, q.Content = Me;
622
+ //#endregion
623
+ //#region src/components/ui/tooltip.tsx
624
+ var J = u.createContext(!1);
625
+ function Y({ delayDuration: e = 0, ...t }) {
626
+ return /* @__PURE__ */ v(J, {
627
+ value: !0,
628
+ children: /* @__PURE__ */ v(A.Provider, {
629
+ "data-slot": "tooltip-provider",
630
+ delayDuration: e,
631
+ ...t
632
+ })
633
+ });
634
+ }
635
+ function Ne({ ...e }) {
636
+ let t = u.useContext(J), n = /* @__PURE__ */ v(A.Root, {
637
+ "data-slot": "tooltip",
638
+ ...e
639
+ });
640
+ return t ? n : /* @__PURE__ */ v(Y, { children: n });
641
+ }
642
+ function X({ ...e }) {
643
+ return /* @__PURE__ */ v(A.Trigger, {
644
+ "data-slot": "tooltip-trigger",
645
+ ...e
646
+ });
647
+ }
648
+ function Pe({ className: t, sideOffset: n = 0, children: r, ...i }) {
649
+ return /* @__PURE__ */ v(A.Portal, { children: /* @__PURE__ */ y(A.Content, {
650
+ "data-slot": "tooltip-content",
651
+ sideOffset: n,
652
+ className: e("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance", t),
653
+ ...i,
654
+ children: [r, /* @__PURE__ */ v(A.Arrow, { className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })]
655
+ }) });
656
+ }
657
+ //#endregion
658
+ //#region src/components/ui/sonner.tsx
659
+ var Fe = ({ ...e }) => {
660
+ let { theme: t = "system" } = j(), { t: n } = C();
661
+ return /* @__PURE__ */ v(M, {
662
+ theme: t,
663
+ className: "toaster group",
664
+ containerAriaLabel: n("common.notifications", { defaultValue: "Notifications" }),
665
+ icons: {
666
+ success: /* @__PURE__ */ v(I, { className: "size-4" }),
667
+ info: /* @__PURE__ */ v(R, { className: "size-4" }),
668
+ warning: /* @__PURE__ */ v(V, { className: "size-4" }),
669
+ error: /* @__PURE__ */ v(B, { className: "size-4" }),
670
+ loading: /* @__PURE__ */ v(z, { className: "size-4 animate-spin" })
671
+ },
672
+ style: {
673
+ "--normal-bg": "var(--vg-popover)",
674
+ "--normal-text": "var(--vg-popover-foreground)",
675
+ "--normal-border": "var(--vg-border)",
676
+ "--border-radius": "var(--vg-radius)"
677
+ },
678
+ ...e
679
+ });
680
+ };
681
+ //#endregion
682
+ //#region src/components/ui/user-avatar.tsx
683
+ function Z({ givenName: e, familyName: t, name: n }) {
684
+ let r = (e ?? "").trim(), i = (t ?? "").trim();
685
+ if (r || i) {
686
+ let e = r ? r[0] : "", t = i.split(/\s+/).filter(Boolean), n = `${e}${t.length > 0 ? t[t.length - 1][0] : ""}`.toUpperCase();
687
+ if (n) return n;
688
+ }
689
+ let a = (n ?? "").trim();
690
+ if (a) {
691
+ let e = a.split(/\s+/).filter(Boolean);
692
+ return e.length === 1 ? e[0][0].toUpperCase() : `${e[0][0]}${e[e.length - 1][0]}`.toUpperCase();
693
+ }
694
+ return "U";
695
+ }
696
+ function Ie({ className: t, givenName: n, familyName: r, name: i, src: a, alt: o, children: s, ...c }) {
697
+ let l = Z({
698
+ givenName: n,
699
+ familyName: r,
700
+ name: i
701
+ }), u = o ?? i ?? [n, r].filter(Boolean).join(" ");
702
+ return /* @__PURE__ */ y(b.Root, {
703
+ "data-slot": "user-avatar",
704
+ className: e("relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full size-8", "bg-muted text-muted-foreground text-xs font-semibold", "ring-1 ring-border", t),
705
+ ...c,
706
+ children: [a && /* @__PURE__ */ v(b.Image, {
707
+ "data-slot": "user-avatar-image",
708
+ src: a,
709
+ alt: u,
710
+ className: "aspect-square size-full object-cover"
711
+ }), /* @__PURE__ */ v(b.Fallback, {
712
+ "data-slot": "user-avatar-fallback",
713
+ className: "flex size-full items-center justify-center",
714
+ delayMs: a ? 600 : 0,
715
+ children: s ?? l
716
+ })]
717
+ });
718
+ }
719
+ //#endregion
720
+ //#region src/lib/corner-slot.ts
721
+ var Q = f(!1);
722
+ function Le() {
723
+ return p(Q);
724
+ }
725
+ //#endregion
726
+ //#region src/contexts/user.context.tsx
727
+ var $ = d.createContext(null);
728
+ function Re({ children: e, fetchUser: t }) {
729
+ let [n, r] = d.useState({}), [i, a] = d.useState("loading"), [o, s] = d.useState(null), c = d.useRef(0), l = d.useCallback(() => {
730
+ let e = ++c.current;
731
+ t().then((t) => {
732
+ e === c.current && (r(t), s(null), a("ready"));
733
+ }, (t) => {
734
+ e === c.current && (s(t), a("failed"));
735
+ });
736
+ }, [t]);
737
+ d.useEffect(() => {
738
+ l();
739
+ }, [l]);
740
+ let u = d.useMemo(() => ({
741
+ user: n,
742
+ refreshUser: l,
743
+ status: i,
744
+ error: o
745
+ }), [
746
+ n,
747
+ l,
748
+ i,
749
+ o
750
+ ]);
751
+ return /* @__PURE__ */ v($, {
752
+ value: u,
753
+ children: e
754
+ });
755
+ }
756
+ function ze() {
757
+ let e = d.useContext($);
758
+ if (!e) throw Error("useCurrentUser must be used within UserProvider");
759
+ return e;
760
+ }
761
+ //#endregion
762
+ export { pe as A, H as B, oe as C, de as D, ue as E, be as F, P as H, ye as I, ce as L, ge as M, _e as N, he as O, ve as P, ae as R, Se as S, le as T, F as V, Te as _, Ie as a, Oe as b, N as c, Y as d, X as f, Ee as g, Ce as h, Le as i, me as j, se as k, Ne as l, G as m, ze as n, Z as o, q as p, Q as r, Fe as s, Re as t, Pe as u, ke as v, fe as w, we as x, De as y, ie as z };