@inui/design-system 0.0.0-stage → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (312) hide show
  1. package/README.md +360 -2
  2. package/dist/components/ui/accordion.d.ts +44 -0
  3. package/dist/components/ui/accordion.d.ts.map +1 -0
  4. package/dist/components/ui/accordion.js +86 -0
  5. package/dist/components/ui/accordion.js.map +1 -0
  6. package/dist/components/ui/ai-avatar.d.ts +46 -0
  7. package/dist/components/ui/ai-avatar.d.ts.map +1 -0
  8. package/dist/components/ui/ai-avatar.js +43 -0
  9. package/dist/components/ui/ai-avatar.js.map +1 -0
  10. package/dist/components/ui/ai-label.d.ts +118 -0
  11. package/dist/components/ui/ai-label.d.ts.map +1 -0
  12. package/dist/components/ui/ai-label.js +184 -0
  13. package/dist/components/ui/ai-label.js.map +1 -0
  14. package/dist/components/ui/ai-sparkle.d.ts +91 -0
  15. package/dist/components/ui/ai-sparkle.d.ts.map +1 -0
  16. package/dist/components/ui/ai-sparkle.js +200 -0
  17. package/dist/components/ui/ai-sparkle.js.map +1 -0
  18. package/dist/components/ui/alert-dialog.d.ts +79 -0
  19. package/dist/components/ui/alert-dialog.d.ts.map +1 -0
  20. package/dist/components/ui/alert-dialog.js +147 -0
  21. package/dist/components/ui/alert-dialog.js.map +1 -0
  22. package/dist/components/ui/alert.d.ts +71 -0
  23. package/dist/components/ui/alert.d.ts.map +1 -0
  24. package/dist/components/ui/alert.js +108 -0
  25. package/dist/components/ui/alert.js.map +1 -0
  26. package/dist/components/ui/aspect-ratio.d.ts +30 -0
  27. package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
  28. package/dist/components/ui/aspect-ratio.js +40 -0
  29. package/dist/components/ui/aspect-ratio.js.map +1 -0
  30. package/dist/components/ui/attachment.d.ts +74 -0
  31. package/dist/components/ui/attachment.d.ts.map +1 -0
  32. package/dist/components/ui/attachment.js +142 -0
  33. package/dist/components/ui/attachment.js.map +1 -0
  34. package/dist/components/ui/avatar.d.ts +82 -0
  35. package/dist/components/ui/avatar.d.ts.map +1 -0
  36. package/dist/components/ui/avatar.js +123 -0
  37. package/dist/components/ui/avatar.js.map +1 -0
  38. package/dist/components/ui/badge.d.ts +130 -0
  39. package/dist/components/ui/badge.d.ts.map +1 -0
  40. package/dist/components/ui/badge.js +226 -0
  41. package/dist/components/ui/badge.js.map +1 -0
  42. package/dist/components/ui/breadcrumb.d.ts +43 -0
  43. package/dist/components/ui/breadcrumb.d.ts.map +1 -0
  44. package/dist/components/ui/breadcrumb.js +98 -0
  45. package/dist/components/ui/breadcrumb.js.map +1 -0
  46. package/dist/components/ui/browser-tabs.d.ts +218 -0
  47. package/dist/components/ui/browser-tabs.d.ts.map +1 -0
  48. package/dist/components/ui/browser-tabs.js +528 -0
  49. package/dist/components/ui/browser-tabs.js.map +1 -0
  50. package/dist/components/ui/bubble.d.ts +80 -0
  51. package/dist/components/ui/bubble.d.ts.map +1 -0
  52. package/dist/components/ui/bubble.js +235 -0
  53. package/dist/components/ui/bubble.js.map +1 -0
  54. package/dist/components/ui/button-group.d.ts +60 -0
  55. package/dist/components/ui/button-group.d.ts.map +1 -0
  56. package/dist/components/ui/button-group.js +89 -0
  57. package/dist/components/ui/button-group.js.map +1 -0
  58. package/dist/components/ui/button.d.ts +157 -0
  59. package/dist/components/ui/button.d.ts.map +1 -0
  60. package/dist/components/ui/button.js +144 -0
  61. package/dist/components/ui/button.js.map +1 -0
  62. package/dist/components/ui/calendar.d.ts +57 -0
  63. package/dist/components/ui/calendar.d.ts.map +1 -0
  64. package/dist/components/ui/calendar.js +163 -0
  65. package/dist/components/ui/calendar.js.map +1 -0
  66. package/dist/components/ui/card.d.ts +96 -0
  67. package/dist/components/ui/card.d.ts.map +1 -0
  68. package/dist/components/ui/card.js +131 -0
  69. package/dist/components/ui/card.js.map +1 -0
  70. package/dist/components/ui/carousel.d.ts +86 -0
  71. package/dist/components/ui/carousel.d.ts.map +1 -0
  72. package/dist/components/ui/carousel.js +207 -0
  73. package/dist/components/ui/carousel.js.map +1 -0
  74. package/dist/components/ui/checkbox.d.ts +54 -0
  75. package/dist/components/ui/checkbox.d.ts.map +1 -0
  76. package/dist/components/ui/checkbox.js +78 -0
  77. package/dist/components/ui/checkbox.js.map +1 -0
  78. package/dist/components/ui/collapsible.d.ts +45 -0
  79. package/dist/components/ui/collapsible.d.ts.map +1 -0
  80. package/dist/components/ui/collapsible.js +65 -0
  81. package/dist/components/ui/collapsible.js.map +1 -0
  82. package/dist/components/ui/combobox.d.ts +111 -0
  83. package/dist/components/ui/combobox.d.ts.map +1 -0
  84. package/dist/components/ui/combobox.js +264 -0
  85. package/dist/components/ui/combobox.js.map +1 -0
  86. package/dist/components/ui/command.d.ts +71 -0
  87. package/dist/components/ui/command.d.ts.map +1 -0
  88. package/dist/components/ui/command.js +133 -0
  89. package/dist/components/ui/command.js.map +1 -0
  90. package/dist/components/ui/context-menu.d.ts +70 -0
  91. package/dist/components/ui/context-menu.d.ts.map +1 -0
  92. package/dist/components/ui/context-menu.js +163 -0
  93. package/dist/components/ui/context-menu.js.map +1 -0
  94. package/dist/components/ui/count-badge.d.ts +40 -0
  95. package/dist/components/ui/count-badge.d.ts.map +1 -0
  96. package/dist/components/ui/count-badge.js +43 -0
  97. package/dist/components/ui/count-badge.js.map +1 -0
  98. package/dist/components/ui/data-table.d.ts +1026 -0
  99. package/dist/components/ui/data-table.d.ts.map +1 -0
  100. package/dist/components/ui/data-table.js +3423 -0
  101. package/dist/components/ui/data-table.js.map +1 -0
  102. package/dist/components/ui/dialog.d.ts +73 -0
  103. package/dist/components/ui/dialog.d.ts.map +1 -0
  104. package/dist/components/ui/dialog.js +145 -0
  105. package/dist/components/ui/dialog.js.map +1 -0
  106. package/dist/components/ui/direction.d.ts +35 -0
  107. package/dist/components/ui/direction.d.ts.map +1 -0
  108. package/dist/components/ui/direction.js +35 -0
  109. package/dist/components/ui/direction.js.map +1 -0
  110. package/dist/components/ui/drawer.d.ts +53 -0
  111. package/dist/components/ui/drawer.d.ts.map +1 -0
  112. package/dist/components/ui/drawer.js +115 -0
  113. package/dist/components/ui/drawer.js.map +1 -0
  114. package/dist/components/ui/dropdown-menu.d.ts +75 -0
  115. package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
  116. package/dist/components/ui/dropdown-menu.js +173 -0
  117. package/dist/components/ui/dropdown-menu.js.map +1 -0
  118. package/dist/components/ui/dropzone.d.ts +141 -0
  119. package/dist/components/ui/dropzone.d.ts.map +1 -0
  120. package/dist/components/ui/dropzone.js +257 -0
  121. package/dist/components/ui/dropzone.js.map +1 -0
  122. package/dist/components/ui/empty.d.ts +94 -0
  123. package/dist/components/ui/empty.d.ts.map +1 -0
  124. package/dist/components/ui/empty.js +149 -0
  125. package/dist/components/ui/empty.js.map +1 -0
  126. package/dist/components/ui/field.d.ts +122 -0
  127. package/dist/components/ui/field.d.ts.map +1 -0
  128. package/dist/components/ui/field.js +254 -0
  129. package/dist/components/ui/field.js.map +1 -0
  130. package/dist/components/ui/hover-card.d.ts +51 -0
  131. package/dist/components/ui/hover-card.d.ts.map +1 -0
  132. package/dist/components/ui/hover-card.js +101 -0
  133. package/dist/components/ui/hover-card.js.map +1 -0
  134. package/dist/components/ui/input-group.d.ts +62 -0
  135. package/dist/components/ui/input-group.d.ts.map +1 -0
  136. package/dist/components/ui/input-group.js +115 -0
  137. package/dist/components/ui/input-group.js.map +1 -0
  138. package/dist/components/ui/input-otp.d.ts +52 -0
  139. package/dist/components/ui/input-otp.d.ts.map +1 -0
  140. package/dist/components/ui/input-otp.js +89 -0
  141. package/dist/components/ui/input-otp.js.map +1 -0
  142. package/dist/components/ui/input.d.ts +47 -0
  143. package/dist/components/ui/input.d.ts.map +1 -0
  144. package/dist/components/ui/input.js +47 -0
  145. package/dist/components/ui/input.js.map +1 -0
  146. package/dist/components/ui/item.d.ts +74 -0
  147. package/dist/components/ui/item.d.ts.map +1 -0
  148. package/dist/components/ui/item.js +176 -0
  149. package/dist/components/ui/item.js.map +1 -0
  150. package/dist/components/ui/kbd.d.ts +41 -0
  151. package/dist/components/ui/kbd.d.ts.map +1 -0
  152. package/dist/components/ui/kbd.js +58 -0
  153. package/dist/components/ui/kbd.js.map +1 -0
  154. package/dist/components/ui/key-value-pair.d.ts +56 -0
  155. package/dist/components/ui/key-value-pair.d.ts.map +1 -0
  156. package/dist/components/ui/key-value-pair.js +110 -0
  157. package/dist/components/ui/key-value-pair.js.map +1 -0
  158. package/dist/components/ui/label.d.ts +83 -0
  159. package/dist/components/ui/label.d.ts.map +1 -0
  160. package/dist/components/ui/label.js +85 -0
  161. package/dist/components/ui/label.js.map +1 -0
  162. package/dist/components/ui/marker.d.ts +54 -0
  163. package/dist/components/ui/marker.d.ts.map +1 -0
  164. package/dist/components/ui/marker.js +79 -0
  165. package/dist/components/ui/marker.js.map +1 -0
  166. package/dist/components/ui/menubar.d.ts +72 -0
  167. package/dist/components/ui/menubar.d.ts.map +1 -0
  168. package/dist/components/ui/menubar.js +174 -0
  169. package/dist/components/ui/menubar.js.map +1 -0
  170. package/dist/components/ui/message-scroller.d.ts +53 -0
  171. package/dist/components/ui/message-scroller.d.ts.map +1 -0
  172. package/dist/components/ui/message-scroller.js +95 -0
  173. package/dist/components/ui/message-scroller.js.map +1 -0
  174. package/dist/components/ui/message.d.ts +63 -0
  175. package/dist/components/ui/message.d.ts.map +1 -0
  176. package/dist/components/ui/message.js +92 -0
  177. package/dist/components/ui/message.js.map +1 -0
  178. package/dist/components/ui/meta-list.d.ts +55 -0
  179. package/dist/components/ui/meta-list.d.ts.map +1 -0
  180. package/dist/components/ui/meta-list.js +75 -0
  181. package/dist/components/ui/meta-list.js.map +1 -0
  182. package/dist/components/ui/native-select.d.ts +51 -0
  183. package/dist/components/ui/native-select.d.ts.map +1 -0
  184. package/dist/components/ui/native-select.js +75 -0
  185. package/dist/components/ui/native-select.js.map +1 -0
  186. package/dist/components/ui/navigation-menu.d.ts +56 -0
  187. package/dist/components/ui/navigation-menu.d.ts.map +1 -0
  188. package/dist/components/ui/navigation-menu.js +116 -0
  189. package/dist/components/ui/navigation-menu.js.map +1 -0
  190. package/dist/components/ui/page-header.d.ts +223 -0
  191. package/dist/components/ui/page-header.d.ts.map +1 -0
  192. package/dist/components/ui/page-header.js +233 -0
  193. package/dist/components/ui/page-header.js.map +1 -0
  194. package/dist/components/ui/pagination.d.ts +68 -0
  195. package/dist/components/ui/pagination.d.ts.map +1 -0
  196. package/dist/components/ui/pagination.js +145 -0
  197. package/dist/components/ui/pagination.js.map +1 -0
  198. package/dist/components/ui/popover.d.ts +61 -0
  199. package/dist/components/ui/popover.d.ts.map +1 -0
  200. package/dist/components/ui/popover.js +144 -0
  201. package/dist/components/ui/popover.js.map +1 -0
  202. package/dist/components/ui/progress.d.ts +35 -0
  203. package/dist/components/ui/progress.d.ts.map +1 -0
  204. package/dist/components/ui/progress.js +46 -0
  205. package/dist/components/ui/progress.js.map +1 -0
  206. package/dist/components/ui/questionnaire.d.ts +92 -0
  207. package/dist/components/ui/questionnaire.d.ts.map +1 -0
  208. package/dist/components/ui/questionnaire.js +277 -0
  209. package/dist/components/ui/questionnaire.js.map +1 -0
  210. package/dist/components/ui/radio-group.d.ts +50 -0
  211. package/dist/components/ui/radio-group.d.ts.map +1 -0
  212. package/dist/components/ui/radio-group.js +65 -0
  213. package/dist/components/ui/radio-group.js.map +1 -0
  214. package/dist/components/ui/resizable.d.ts +44 -0
  215. package/dist/components/ui/resizable.d.ts.map +1 -0
  216. package/dist/components/ui/resizable.js +73 -0
  217. package/dist/components/ui/resizable.js.map +1 -0
  218. package/dist/components/ui/scroll-area.d.ts +55 -0
  219. package/dist/components/ui/scroll-area.d.ts.map +1 -0
  220. package/dist/components/ui/scroll-area.js +72 -0
  221. package/dist/components/ui/scroll-area.js.map +1 -0
  222. package/dist/components/ui/select.d.ts +274 -0
  223. package/dist/components/ui/select.d.ts.map +1 -0
  224. package/dist/components/ui/select.js +609 -0
  225. package/dist/components/ui/select.js.map +1 -0
  226. package/dist/components/ui/separator.d.ts +31 -0
  227. package/dist/components/ui/separator.d.ts.map +1 -0
  228. package/dist/components/ui/separator.js +38 -0
  229. package/dist/components/ui/separator.js.map +1 -0
  230. package/dist/components/ui/sheet.d.ts +59 -0
  231. package/dist/components/ui/sheet.d.ts.map +1 -0
  232. package/dist/components/ui/sheet.js +128 -0
  233. package/dist/components/ui/sheet.js.map +1 -0
  234. package/dist/components/ui/sidebar.d.ts +166 -0
  235. package/dist/components/ui/sidebar.d.ts.map +1 -0
  236. package/dist/components/ui/sidebar.js +512 -0
  237. package/dist/components/ui/sidebar.js.map +1 -0
  238. package/dist/components/ui/skeleton.d.ts +35 -0
  239. package/dist/components/ui/skeleton.d.ts.map +1 -0
  240. package/dist/components/ui/skeleton.js +46 -0
  241. package/dist/components/ui/skeleton.js.map +1 -0
  242. package/dist/components/ui/slider.d.ts +39 -0
  243. package/dist/components/ui/slider.d.ts.map +1 -0
  244. package/dist/components/ui/slider.js +75 -0
  245. package/dist/components/ui/slider.js.map +1 -0
  246. package/dist/components/ui/sonner.d.ts +56 -0
  247. package/dist/components/ui/sonner.d.ts.map +1 -0
  248. package/dist/components/ui/sonner.js +96 -0
  249. package/dist/components/ui/sonner.js.map +1 -0
  250. package/dist/components/ui/spinner.d.ts +37 -0
  251. package/dist/components/ui/spinner.d.ts.map +1 -0
  252. package/dist/components/ui/spinner.js +51 -0
  253. package/dist/components/ui/spinner.js.map +1 -0
  254. package/dist/components/ui/stepper.d.ts +84 -0
  255. package/dist/components/ui/stepper.d.ts.map +1 -0
  256. package/dist/components/ui/stepper.js +145 -0
  257. package/dist/components/ui/stepper.js.map +1 -0
  258. package/dist/components/ui/switch.d.ts +36 -0
  259. package/dist/components/ui/switch.d.ts.map +1 -0
  260. package/dist/components/ui/switch.js +44 -0
  261. package/dist/components/ui/switch.js.map +1 -0
  262. package/dist/components/ui/table.d.ts +80 -0
  263. package/dist/components/ui/table.d.ts.map +1 -0
  264. package/dist/components/ui/table.js +130 -0
  265. package/dist/components/ui/table.js.map +1 -0
  266. package/dist/components/ui/tabs.d.ts +87 -0
  267. package/dist/components/ui/tabs.d.ts.map +1 -0
  268. package/dist/components/ui/tabs.js +128 -0
  269. package/dist/components/ui/tabs.js.map +1 -0
  270. package/dist/components/ui/textarea.d.ts +35 -0
  271. package/dist/components/ui/textarea.d.ts.map +1 -0
  272. package/dist/components/ui/textarea.js +38 -0
  273. package/dist/components/ui/textarea.js.map +1 -0
  274. package/dist/components/ui/time-picker.d.ts +58 -0
  275. package/dist/components/ui/time-picker.d.ts.map +1 -0
  276. package/dist/components/ui/time-picker.js +188 -0
  277. package/dist/components/ui/time-picker.js.map +1 -0
  278. package/dist/components/ui/toggle-group.d.ts +52 -0
  279. package/dist/components/ui/toggle-group.d.ts.map +1 -0
  280. package/dist/components/ui/toggle-group.js +94 -0
  281. package/dist/components/ui/toggle-group.js.map +1 -0
  282. package/dist/components/ui/toggle.d.ts +50 -0
  283. package/dist/components/ui/toggle.d.ts.map +1 -0
  284. package/dist/components/ui/toggle.js +70 -0
  285. package/dist/components/ui/toggle.js.map +1 -0
  286. package/dist/components/ui/tooltip.d.ts +51 -0
  287. package/dist/components/ui/tooltip.d.ts.map +1 -0
  288. package/dist/components/ui/tooltip.js +78 -0
  289. package/dist/components/ui/tooltip.js.map +1 -0
  290. package/dist/hooks/use-dark-mode.d.ts +2 -0
  291. package/dist/hooks/use-dark-mode.d.ts.map +1 -0
  292. package/dist/hooks/use-dark-mode.js +36 -0
  293. package/dist/hooks/use-dark-mode.js.map +1 -0
  294. package/dist/hooks/use-mobile.d.ts +2 -0
  295. package/dist/hooks/use-mobile.d.ts.map +1 -0
  296. package/dist/hooks/use-mobile.js +20 -0
  297. package/dist/hooks/use-mobile.js.map +1 -0
  298. package/dist/index.d.ts +88 -0
  299. package/dist/index.d.ts.map +1 -0
  300. package/dist/index.js +77 -0
  301. package/dist/lib/scope.d.ts +64 -0
  302. package/dist/lib/scope.d.ts.map +1 -0
  303. package/dist/lib/scope.js +74 -0
  304. package/dist/lib/scope.js.map +1 -0
  305. package/dist/lib/utils.d.ts +3 -0
  306. package/dist/lib/utils.d.ts.map +1 -0
  307. package/dist/lib/utils.js +11 -0
  308. package/dist/lib/utils.js.map +1 -0
  309. package/dist/styles.css +2 -0
  310. package/dist/theme-tokens.css +537 -0
  311. package/dist/theme.css +417 -0
  312. package/package.json +103 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-sparkle.js","names":[],"sources":["../../../src/components/ui/ai-sparkle.tsx"],"sourcesContent":["/**\n * AISparkle — the single AI-identity mark (\"Sara\") for all AI-generated\n * content and affordances: one gradient 4-pointed star (pink→orange, washed\n * with yellow), per the AI Identity tokens in theme.css. Path/gradient/shine\n * geometry is a hand-authored SVG — not lucide-react, since the two-layer\n * gradient fill and animated states aren't expressible with a plain stroked\n * icon.\n *\n * `size` is optional by design rather than a fixed pixel width/height —\n * omit it to inherit whatever ambient icon sizing applies (e.g. a Button's\n * `[&_svg]` rule), or set it for a token-derived size when used standalone.\n *\n * Purely a brand/identity mark — `aria-hidden` by default (see below) — not\n * an accessible trigger for anything. It marks genuine AI involvement only,\n * never decoration; see manifest.json's `ai_presence` convention for the\n * full rule and every current AI-treatment recipe. When the surface needs\n * an actual accessible entry point into an explanation (not just a visual\n * marker), that's AILabel's job, not this icon's.\n */\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst STAR_PATH =\n \"M40 5C40 24.33 55.67 40 75 40C55.67 40 40 55.67 40 75C40 55.67 24.33 40 5 40C24.33 40 40 24.33 40 5Z\"\n\nconst aiSparkleSizeVariants = cva(\"\", {\n variants: {\n size: {\n sm: \"size-4\",\n md: \"size-5\",\n lg: \"size-6\",\n },\n },\n})\n\nconst aiSparkleStateVariants = cva(\"\", {\n variants: {\n state: {\n default: \"\",\n listening: \"mmds-ai-sparkle-listening\",\n \"short-processing\": \"mmds-ai-sparkle-short-processing\",\n \"long-processing\": \"mmds-ai-sparkle-long-processing\",\n },\n },\n defaultVariants: {\n state: \"default\",\n },\n})\n\nfunction AISparkle({\n className,\n size,\n state = \"default\",\n tone = \"gradient\",\n ...props\n}: React.ComponentProps<\"svg\"> &\n VariantProps<typeof aiSparkleSizeVariants> &\n VariantProps<typeof aiSparkleStateVariants> & {\n /**\n * \"gradient\" (default) — the branded two-layer pink/orange/yellow fill.\n * \"mono\" — a flat `fill=\"currentColor\"` star, no gradient defs, no\n * long-processing shine (that needs the gradient's own white-wash\n * layer). For placing the mark on top of an already-colored surface\n * (e.g. AIAvatar's gradient background) where the full brand gradient\n * would read as muddy — set the icon's own text color instead.\n */\n tone?: \"gradient\" | \"mono\"\n }) {\n const id = React.useId()\n\n return (\n <svg\n data-slot=\"ai-sparkle\"\n data-state={state}\n data-tone={tone}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 80 80\"\n fill=\"none\"\n className={cn(\n \"shrink-0\",\n size && aiSparkleSizeVariants({ size }),\n aiSparkleStateVariants({ state }),\n className\n )}\n aria-hidden=\"true\"\n {...props}\n >\n {tone === \"mono\" ? (\n <path d={STAR_PATH} fill=\"currentColor\" />\n ) : (\n <>\n <defs>\n {/* Bottom layer — pink (at ai-grad-from-alpha) to fully-opaque orange */}\n <linearGradient\n id={`${id}-grad`}\n x1=\"17.1875\"\n y1=\"12.1875\"\n x2=\"62.0313\"\n y2=\"65\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop\n stopColor=\"var(--color-ai-grad-from)\"\n stopOpacity=\"var(--color-ai-grad-from-alpha)\"\n />\n <stop offset=\"1\" stopColor=\"var(--color-ai-grad-to)\" />\n </linearGradient>\n {/* Top wash layer — transparent to opaque yellow, then dimmed overall by ai-wash-alpha */}\n <linearGradient\n id={`${id}-wash`}\n x1=\"17.1875\"\n y1=\"12.1875\"\n x2=\"62.0313\"\n y2=\"65\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stopColor=\"var(--color-ai-wash)\" stopOpacity=\"0\" />\n <stop offset=\"1\" stopColor=\"var(--color-ai-wash)\" />\n </linearGradient>\n {state === \"long-processing\" && (\n <>\n <clipPath id={`${id}-clip`}>\n <path d={STAR_PATH} />\n </clipPath>\n <linearGradient id={`${id}-shine`} x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\">\n <stop offset=\"0\" stopColor=\"#fff\" stopOpacity=\"0\" />\n <stop offset=\"0.4\" stopColor=\"#fff\" stopOpacity=\"0\" />\n <stop offset=\"0.5\" stopColor=\"#fff\" stopOpacity=\"0.55\" />\n <stop offset=\"0.6\" stopColor=\"#fff\" stopOpacity=\"0\" />\n <stop offset=\"1\" stopColor=\"#fff\" stopOpacity=\"0\" />\n </linearGradient>\n </>\n )}\n </defs>\n {/* Bottom layer — full opacity */}\n <path d={STAR_PATH} fill={`url(#${id}-grad)`} />\n {/* Top wash layer */}\n <path\n d={STAR_PATH}\n fill={`url(#${id}-wash)`}\n opacity=\"var(--color-ai-wash-alpha)\"\n />\n {state === \"long-processing\" && (\n <rect\n x=\"-20\"\n y=\"-20\"\n width=\"120\"\n height=\"120\"\n fill={`url(#${id}-shine)`}\n clipPath={`url(#${id}-clip)`}\n className=\"mmds-ai-sparkle-shine\"\n />\n )}\n </>\n )}\n </svg>\n )\n}\n\nexport { AISparkle, aiSparkleSizeVariants, aiSparkleStateVariants }\n\n/**\n * WHEN TO USE\n * - AI message avatars, empty-state headers, agent badges, copilot-assisted\n * actions, AI-generated content markers.\n * - Compose it as a Button's leading icon (`data-icon=\"inline-start\"`) or a\n * small corner accent on an icon-only trigger.\n *\n * NOT WHEN\n * - Generic decorative sparkle unrelated to AI — use lucide's `Sparkles`.\n * - A loading spinner — use Spinner; AISparkle's `state` communicates AI\n * activity specifically, not generic async work.\n * - Animated backgrounds or large decorative use — this is an identity mark,\n * not a motion asset.\n *\n * KEY RULES\n * - size: sm | md | lg — optional. Leave it unset when composing inside Button\n * (its `[&_svg]` sizing takes over, same as any other icon) so it inherits\n * the ambient icon size; set it explicitly for a token-derived size\n * (size-4/5/6) when used standalone.\n * - state: default | listening | short-processing | long-processing (default\n * \"default\") — each maps to its own keyframe animation in\n * src/styles/ai-sparkle.css (imported once via index.css, not per-usage):\n * listening bobs vertically, short-processing does one full rotation then\n * holds, long-processing pulses in scale AND sweeps a diagonal shine\n * across the star, clipped to its silhouette. These are custom keyframes,\n * not Tailwind's animate-bounce/spin/pulse — the motion curves and hold\n * points are specific to this mark. The shine's -50px..50px translate is\n * calibrated directly for this component's own 80x80 viewBox + 120x120\n * rect — no extra scaling wrapper needed. All three loop `infinite` for as\n * long as the state is active (not just long-processing — a slow\n * short-processing step or a long listening session runs past 5s just as\n * easily), so `ai-sparkle.css` falls every one of them back to the static\n * resting mark under `prefers-reduced-motion` (SC 2.2.2, Level A).\n * - tone: gradient (default) | mono — gradient is the fixed brand fill, driven\n * by the `--color-ai-grad-*` / `--color-ai-wash*` tokens in theme.css, no\n * color props of its own. mono drops to a flat `fill=\"currentColor\"` star\n * (no gradient defs, no long-processing shine) — set the icon's own text\n * color instead when it needs to sit on top of an already-colored surface\n * (e.g. AIAvatar's gradient background) where the full brand gradient\n * would read as muddy.\n * - `aria-hidden` by default, matching every other decorative icon in this\n * system — pair it with real text, not as a standalone control.\n *\n * USAGE\n * <Button variant=\"ai\">\n * <AISparkle data-icon=\"inline-start\" />\n * Summarize\n * </Button>\n *\n * <AISparkle size=\"lg\" state=\"short-processing\" />\n */\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAM,YACJ;AAEF,IAAM,wBAAwB,IAAI,IAAI,EACpC,UAAU,EACR,MAAM;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;AACN,EACF,EACF,CAAC;AAED,IAAM,yBAAyB,IAAI,IAAI;CACrC,UAAU,EACR,OAAO;EACL,SAAS;EACT,WAAW;EACX,oBAAoB;EACpB,mBAAmB;CACrB,EACF;CACA,iBAAiB,EACf,OAAO,UACT;AACF,CAAC;AAED,SAAS,UAAU,EAC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M,WAAU;OAAO,aAAY;MAAK,CAAA;MACrD,oBAAC,QAAD;OAAM,QAAO;OAAM,WAAU;OAAO,aAAY;MAAQ,CAAA;MACxD,oBAAC,QAAD;OAAM,QAAO;OAAM,WAAU;OAAO,aAAY;MAAK,CAAA;MACrD,oBAAC,QAAD;OAAM,QAAO;OAAI,WAAU;OAAO,aAAY;MAAK,CAAA;KACrC;IAChB,CAAA,CAAA,EAAA,CAAA;GAEA,EAAA,CAAA;GAEN,oBAAC,QAAD;IAAM,GAAG;IAAW,MAAM,QAAQ,GAAG;GAAU,CAAA;GAE/C,oBAAC,QAAD;IACE,GAAG;IACH,MAAM,QAAQ,GAAG;IACjB,SAAQ;GACT,CAAA;GACA,UAAU,qBACT,oBAAC,QAAD;IACE,GAAE;IACF,GAAE;IACF,OAAM;IACN,QAAO;IACP,MAAM,QAAQ,GAAG;IACjB,UAAU,QAAQ,GAAG;IACrB,WAAU;GACX,CAAA;EAEH,EAAA,CAAA;CAED,CAAA;AAET"}
@@ -0,0 +1,79 @@
1
+ /**
2
+ * AlertDialog — modal confirmation for destructive or irreversible actions.
3
+ *
4
+ * Same modal mechanics as Dialog, but does not close on backdrop click and
5
+ * has no default close button — Cancel and Action are the only two exits.
6
+ * Built on the Radix AlertDialog primitive. Adds `AlertDialogMedia` (an
7
+ * icon slot above the title) and a `size` prop ("default" | "sm") that also
8
+ * compresses the footer into a two-column grid.
9
+ */
10
+ import * as React from "react";
11
+ import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
12
+ import { Button, type TextButtonSize } from "../../components/ui/button";
13
+ declare function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>): React.JSX.Element;
14
+ declare function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): React.JSX.Element;
15
+ declare function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>): React.JSX.Element;
16
+ declare function AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>): React.JSX.Element;
17
+ declare function AlertDialogContent({ className, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {
18
+ size?: "default" | "sm";
19
+ }): React.JSX.Element;
20
+ declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
21
+ declare function AlertDialogFooter({ className, variant, ...props }: React.ComponentProps<"div"> & {
22
+ /** `"plain"` drops the top border and grey background — a borderless, transparent footer for single-acknowledgement modals. */
23
+ variant?: "default" | "plain";
24
+ }): React.JSX.Element;
25
+ declare function AlertDialogMedia({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
26
+ declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): React.JSX.Element;
27
+ declare function AlertDialogDescription({ className, variant, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description> & {
28
+ /** `"emphasis"` renders the description as medium-weight foreground text instead of the default muted style — for a one-line subtitle that is the message itself. */
29
+ variant?: "default" | "emphasis";
30
+ }): React.JSX.Element;
31
+ declare function AlertDialogAction({ className, variant, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action> & Pick<React.ComponentProps<typeof Button>, "variant"> & {
32
+ size?: TextButtonSize;
33
+ }): React.JSX.Element;
34
+ declare function AlertDialogCancel({ className, variant, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> & Pick<React.ComponentProps<typeof Button>, "variant"> & {
35
+ size?: TextButtonSize;
36
+ }): React.JSX.Element;
37
+ export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
38
+ /**
39
+ * WHEN TO USE
40
+ * - Confirming delete, remove, archive, discard — anything the user cannot undo
41
+ *
42
+ * NOT WHEN
43
+ * - Routine, reversible confirmations — use Dialog (dismissible by backdrop click)
44
+ * - Informational messages with no decision to make — use Alert
45
+ * - Transient feedback after an action already happened — use Toaster
46
+ *
47
+ * KEY RULES
48
+ * - Never dismissible by backdrop click — the user must choose Cancel or Action
49
+ * - Always pair AlertDialogAction with AlertDialogCancel; there is no default close button
50
+ * - AlertDialogAction/Cancel render as real Buttons (`asChild` on the Radix primitive) — pass `variant`/`size` straight through rather than wrapping them in another Button
51
+ * - AlertDialogMedia is optional; when present it shifts the header to an icon-beside-text layout on size="default"
52
+ * - size="sm" forces the two-column footer grid regardless of button count
53
+ * - AlertDialogDescription `variant="emphasis"` and AlertDialogFooter `variant="plain"` are for single-acknowledgement modals (a bold one-line message, one "Got it" button) — don't use them on destructive confirmations, where the muted description and bordered footer keep Cancel/Action visually separate from the message
54
+ *
55
+ * USAGE
56
+ * <AlertDialog>
57
+ * <AlertDialogTrigger asChild><Button variant="destructive">Delete account</Button></AlertDialogTrigger>
58
+ * <AlertDialogContent>
59
+ * <AlertDialogHeader>
60
+ * <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
61
+ * <AlertDialogDescription>
62
+ * This permanently deletes your account. This action cannot be undone.
63
+ * </AlertDialogDescription>
64
+ * </AlertDialogHeader>
65
+ * <AlertDialogFooter>
66
+ * <AlertDialogCancel>Cancel</AlertDialogCancel>
67
+ * <AlertDialogAction>Delete</AlertDialogAction>
68
+ * </AlertDialogFooter>
69
+ * </AlertDialogContent>
70
+ * </AlertDialog>
71
+ *
72
+ * // Icon above the title
73
+ * <AlertDialogHeader>
74
+ * <AlertDialogMedia><TriangleAlertIcon /></AlertDialogMedia>
75
+ * <AlertDialogTitle>Discard unsaved changes?</AlertDialogTitle>
76
+ * <AlertDialogDescription>Your edits will be lost.</AlertDialogDescription>
77
+ * </AlertDialogHeader>
78
+ */
79
+ //# sourceMappingURL=alert-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../../src/components/ui/alert-dialog.tsx"],"names":[],"mappings":"A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;;;;;;;;;;GAwCG"}
@@ -0,0 +1,147 @@
1
+ import { cn } from "../../lib/utils.js";
2
+ import { getPortalContainer } from "../../lib/scope.js";
3
+ import { Button } from "./button.js";
4
+ import "react";
5
+ import { AlertDialog as AlertDialog$1 } from "radix-ui";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ //#region src/components/ui/alert-dialog.tsx
8
+ function AlertDialog({ ...props }) {
9
+ return /* @__PURE__ */ jsx(AlertDialog$1.Root, {
10
+ "data-slot": "alert-dialog",
11
+ ...props
12
+ });
13
+ }
14
+ function AlertDialogTrigger({ ...props }) {
15
+ return /* @__PURE__ */ jsx(AlertDialog$1.Trigger, {
16
+ "data-slot": "alert-dialog-trigger",
17
+ ...props
18
+ });
19
+ }
20
+ function AlertDialogPortal({ ...props }) {
21
+ return /* @__PURE__ */ jsx(AlertDialog$1.Portal, {
22
+ "data-slot": "alert-dialog-portal",
23
+ container: getPortalContainer(),
24
+ ...props
25
+ });
26
+ }
27
+ function AlertDialogOverlay({ className, ...props }) {
28
+ return /* @__PURE__ */ jsx(AlertDialog$1.Overlay, {
29
+ "data-slot": "alert-dialog-overlay",
30
+ className: cn("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0", className),
31
+ ...props
32
+ });
33
+ }
34
+ function AlertDialogContent({ className, size = "default", ...props }) {
35
+ return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogOverlay, {}), /* @__PURE__ */ jsx(AlertDialog$1.Content, {
36
+ "data-slot": "alert-dialog-content",
37
+ "data-size": size,
38
+ className: cn("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95", className),
39
+ ...props
40
+ })] });
41
+ }
42
+ function AlertDialogHeader({ className, ...props }) {
43
+ return /* @__PURE__ */ jsx("div", {
44
+ "data-slot": "alert-dialog-header",
45
+ className: cn("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", className),
46
+ ...props
47
+ });
48
+ }
49
+ function AlertDialogFooter({ className, variant = "default", ...props }) {
50
+ return /* @__PURE__ */ jsx("div", {
51
+ "data-slot": "alert-dialog-footer",
52
+ "data-variant": variant,
53
+ className: cn("-mx-4 -mb-4 flex flex-col-reverse gap-1 rounded-b-xl p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end", variant === "default" && "border-t bg-muted/50", className),
54
+ ...props
55
+ });
56
+ }
57
+ function AlertDialogMedia({ className, ...props }) {
58
+ return /* @__PURE__ */ jsx("div", {
59
+ "data-slot": "alert-dialog-media",
60
+ className: cn("mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6", className),
61
+ ...props
62
+ });
63
+ }
64
+ function AlertDialogTitle({ className, ...props }) {
65
+ return /* @__PURE__ */ jsx(AlertDialog$1.Title, {
66
+ "data-slot": "alert-dialog-title",
67
+ className: cn("text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", className),
68
+ ...props
69
+ });
70
+ }
71
+ function AlertDialogDescription({ className, variant = "default", ...props }) {
72
+ return /* @__PURE__ */ jsx(AlertDialog$1.Description, {
73
+ "data-slot": "alert-dialog-description",
74
+ "data-variant": variant,
75
+ className: cn("text-sm text-balance md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", variant === "emphasis" ? "font-medium text-foreground" : "text-muted-foreground", className),
76
+ ...props
77
+ });
78
+ }
79
+ function AlertDialogAction({ className, variant = "default", size = "default", ...props }) {
80
+ return /* @__PURE__ */ jsx(Button, {
81
+ variant,
82
+ size,
83
+ asChild: true,
84
+ children: /* @__PURE__ */ jsx(AlertDialog$1.Action, {
85
+ "data-slot": "alert-dialog-action",
86
+ className: cn(className),
87
+ ...props
88
+ })
89
+ });
90
+ }
91
+ function AlertDialogCancel({ className, variant = "outline", size = "default", ...props }) {
92
+ return /* @__PURE__ */ jsx(Button, {
93
+ variant,
94
+ size,
95
+ asChild: true,
96
+ children: /* @__PURE__ */ jsx(AlertDialog$1.Cancel, {
97
+ "data-slot": "alert-dialog-cancel",
98
+ className: cn(className),
99
+ ...props
100
+ })
101
+ });
102
+ }
103
+ /**
104
+ * WHEN TO USE
105
+ * - Confirming delete, remove, archive, discard — anything the user cannot undo
106
+ *
107
+ * NOT WHEN
108
+ * - Routine, reversible confirmations — use Dialog (dismissible by backdrop click)
109
+ * - Informational messages with no decision to make — use Alert
110
+ * - Transient feedback after an action already happened — use Toaster
111
+ *
112
+ * KEY RULES
113
+ * - Never dismissible by backdrop click — the user must choose Cancel or Action
114
+ * - Always pair AlertDialogAction with AlertDialogCancel; there is no default close button
115
+ * - AlertDialogAction/Cancel render as real Buttons (`asChild` on the Radix primitive) — pass `variant`/`size` straight through rather than wrapping them in another Button
116
+ * - AlertDialogMedia is optional; when present it shifts the header to an icon-beside-text layout on size="default"
117
+ * - size="sm" forces the two-column footer grid regardless of button count
118
+ * - AlertDialogDescription `variant="emphasis"` and AlertDialogFooter `variant="plain"` are for single-acknowledgement modals (a bold one-line message, one "Got it" button) — don't use them on destructive confirmations, where the muted description and bordered footer keep Cancel/Action visually separate from the message
119
+ *
120
+ * USAGE
121
+ * <AlertDialog>
122
+ * <AlertDialogTrigger asChild><Button variant="destructive">Delete account</Button></AlertDialogTrigger>
123
+ * <AlertDialogContent>
124
+ * <AlertDialogHeader>
125
+ * <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
126
+ * <AlertDialogDescription>
127
+ * This permanently deletes your account. This action cannot be undone.
128
+ * </AlertDialogDescription>
129
+ * </AlertDialogHeader>
130
+ * <AlertDialogFooter>
131
+ * <AlertDialogCancel>Cancel</AlertDialogCancel>
132
+ * <AlertDialogAction>Delete</AlertDialogAction>
133
+ * </AlertDialogFooter>
134
+ * </AlertDialogContent>
135
+ * </AlertDialog>
136
+ *
137
+ * // Icon above the title
138
+ * <AlertDialogHeader>
139
+ * <AlertDialogMedia><TriangleAlertIcon /></AlertDialogMedia>
140
+ * <AlertDialogTitle>Discard unsaved changes?</AlertDialogTitle>
141
+ * <AlertDialogDescription>Your edits will be lost.</AlertDialogDescription>
142
+ * </AlertDialogHeader>
143
+ */
144
+ //#endregion
145
+ export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };
146
+
147
+ //# sourceMappingURL=alert-dialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert-dialog.js","names":[],"sources":["../../../src/components/ui/alert-dialog.tsx"],"sourcesContent":["/**\n * AlertDialog — modal confirmation for destructive or irreversible actions.\n *\n * Same modal mechanics as Dialog, but does not close on backdrop click and\n * has no default close button — Cancel and Action are the only two exits.\n * Built on the Radix AlertDialog primitive. Adds `AlertDialogMedia` (an\n * icon slot above the title) and a `size` prop (\"default\" | \"sm\") that also\n * compresses the footer into a two-column grid.\n */\n\nimport * as React from \"react\"\nimport { AlertDialog as AlertDialogPrimitive } from \"radix-ui\"\n\nimport { cn } from \"@/lib/utils\"\nimport { getPortalContainer } from \"@/lib/scope\"\nimport { Button, type TextButtonSize } from \"@/components/ui/button\"\n\nfunction AlertDialog({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />\n}\n\nfunction AlertDialogTrigger({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return (\n <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />\n )\n}\n\nfunction AlertDialogPortal({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return (\n <AlertDialogPrimitive.Portal\n data-slot=\"alert-dialog-portal\"\n container={getPortalContainer()}\n {...props}\n />\n )\n}\n\nfunction AlertDialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n \"fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogContent({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {\n size?: \"default\" | \"sm\"\n}) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n data-size={size}\n className={cn(\n \"group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95\",\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n )\n}\n\nfunction AlertDialogHeader({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn(\n \"grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogFooter({\n className,\n variant = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** `\"plain\"` drops the top border and grey background — a borderless, transparent footer for single-acknowledgement modals. */\n variant?: \"default\" | \"plain\"\n}) {\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n data-variant={variant}\n className={cn(\n // gap-1, not gap-2 — same action-grouping convention as DialogFooter:\n // Cancel/Continue resolve one decision together, a tight cluster.\n \"-mx-4 -mb-4 flex flex-col-reverse gap-1 rounded-b-xl p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end\",\n variant === \"default\" && \"border-t bg-muted/50\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogMedia({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-media\"\n className={cn(\n \"mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn(\n \"text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogDescription({\n className,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description> & {\n /** `\"emphasis\"` renders the description as medium-weight foreground text instead of the default muted style — for a one-line subtitle that is the message itself. */\n variant?: \"default\" | \"emphasis\"\n}) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n data-variant={variant}\n className={cn(\n \"text-sm text-balance md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground\",\n variant === \"emphasis\"\n ? \"font-medium text-foreground\"\n : \"text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogAction({\n className,\n variant = \"default\",\n size = \"default\",\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Action> &\n Pick<React.ComponentProps<typeof Button>, \"variant\"> & {\n size?: TextButtonSize\n }) {\n return (\n <Button variant={variant} size={size} asChild>\n <AlertDialogPrimitive.Action\n data-slot=\"alert-dialog-action\"\n className={cn(className)}\n {...props}\n />\n </Button>\n )\n}\n\nfunction AlertDialogCancel({\n className,\n variant = \"outline\",\n size = \"default\",\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> &\n Pick<React.ComponentProps<typeof Button>, \"variant\"> & {\n size?: TextButtonSize\n }) {\n return (\n <Button variant={variant} size={size} asChild>\n <AlertDialogPrimitive.Cancel\n data-slot=\"alert-dialog-cancel\"\n className={cn(className)}\n {...props}\n />\n </Button>\n )\n}\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n}\n\n/**\n * WHEN TO USE\n * - Confirming delete, remove, archive, discard — anything the user cannot undo\n *\n * NOT WHEN\n * - Routine, reversible confirmations — use Dialog (dismissible by backdrop click)\n * - Informational messages with no decision to make — use Alert\n * - Transient feedback after an action already happened — use Toaster\n *\n * KEY RULES\n * - Never dismissible by backdrop click — the user must choose Cancel or Action\n * - Always pair AlertDialogAction with AlertDialogCancel; there is no default close button\n * - AlertDialogAction/Cancel render as real Buttons (`asChild` on the Radix primitive) — pass `variant`/`size` straight through rather than wrapping them in another Button\n * - AlertDialogMedia is optional; when present it shifts the header to an icon-beside-text layout on size=\"default\"\n * - size=\"sm\" forces the two-column footer grid regardless of button count\n * - AlertDialogDescription `variant=\"emphasis\"` and AlertDialogFooter `variant=\"plain\"` are for single-acknowledgement modals (a bold one-line message, one \"Got it\" button) — don't use them on destructive confirmations, where the muted description and bordered footer keep Cancel/Action visually separate from the message\n *\n * USAGE\n * <AlertDialog>\n * <AlertDialogTrigger asChild><Button variant=\"destructive\">Delete account</Button></AlertDialogTrigger>\n * <AlertDialogContent>\n * <AlertDialogHeader>\n * <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>\n * <AlertDialogDescription>\n * This permanently deletes your account. This action cannot be undone.\n * </AlertDialogDescription>\n * </AlertDialogHeader>\n * <AlertDialogFooter>\n * <AlertDialogCancel>Cancel</AlertDialogCancel>\n * <AlertDialogAction>Delete</AlertDialogAction>\n * </AlertDialogFooter>\n * </AlertDialogContent>\n * </AlertDialog>\n *\n * // Icon above the title\n * <AlertDialogHeader>\n * <AlertDialogMedia><TriangleAlertIcon /></AlertDialogMedia>\n * <AlertDialogTitle>Discard unsaved changes?</AlertDialogTitle>\n * <AlertDialogDescription>Your edits will be lost.</AlertDialogDescription>\n * </AlertDialogHeader>\n */\n"],"mappings":";;;;;;;AAiBA,SAAS,YAAY,EACnB,GAAG,SACsD;CACzD,OAAO,oBAAC,cAA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V,WAAW,GACT,qJACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,uBAAuB,EAC9B,WACA,UAAU,WACV,GAAG,SAIF;CACD,OACE,oBAAC,cAAqB,aAAtB;EACE,aAAU;EACV,gBAAc;EACd,WAAW,GACT,4GACA,YAAY,aACR,gCACA,yBACJ,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,kBAAkB,EACzB,WACA,UAAU,WACV,OAAO,WACP,GAAG,SAIA;CACH,OACE,oBAAC,QAAD;EAAiB;EAAe;EAAM,SAAA;EACpC,UAAA,oBAAC,cAAqB,QAAtB;GACE,aAAU;GACV,WAAW,GAAG,SAAS;GACvB,GAAI;EACL,CAAA;CACK,CAAA;AAEZ;AAEA,SAAS,kBAAkB,EACzB,WACA,UAAU,WACV,OAAO,WACP,GAAG,SAIA;CACH,OACE,oBAAC,QAAD;EAAiB;EAAe;EAAM,SAAA;EACpC,UAAA,oBAAC,cAAqB,QAAtB;GACE,aAAU;GACV,WAAW,GAAG,SAAS;GACvB,GAAI;EACL,CAAA;CACK,CAAA;AAEZ"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Alert — inline, persistent message box for contextual information.
3
+ *
4
+ * A plain div styled with class-variance-authority (cva); no radix primitive
5
+ * underneath. Two variants (default/destructive); the icon-aware layout is
6
+ * composed purely from CSS attribute selectors (`has-[>svg]`, `data-slot`)
7
+ * instead of a dedicated Icon subcomponent, so any raw SVG child is
8
+ * auto-positioned.
9
+ */
10
+ import * as React from "react";
11
+ import { type VariantProps } from "class-variance-authority";
12
+ declare const alertVariants: (props?: ({
13
+ variant?: "default" | "destructive" | null | undefined;
14
+ size?: "sm" | "default" | null | undefined;
15
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
16
+ declare function Alert({ className, variant, size, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): React.JSX.Element;
17
+ declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
18
+ declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
19
+ declare function AlertAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
20
+ export { Alert, AlertTitle, AlertDescription, AlertAction };
21
+ /**
22
+ * WHEN TO USE
23
+ * - Persistent contextual info that stays until the user navigates away or the condition resolves — e.g. a form-level validation summary, a payment-failure notice, an inline warning banner.
24
+ * - A message that needs a title plus supporting text, optionally with one action (e.g. "Update").
25
+ * - A load failure while existing content stays on screen — e.g. a same-page
26
+ * action lost connectivity — so the content isn't torn down over what may
27
+ * be transient. See "Patterns/UI States"; a full-region failure with
28
+ * nothing else on screen uses Empty instead.
29
+ *
30
+ * NOT WHEN
31
+ * - A transient confirmation that should disappear on its own (saved, deleted, upload finished) — use Toaster instead.
32
+ * - Anything requiring the user to make a decision before continuing — use AlertDialog instead.
33
+ * - A single field's validation error — use Field + FieldError instead.
34
+ *
35
+ * KEY RULES
36
+ * - variant is "default" or "destructive" (defaults to "default"); destructive also tints the description and any svg child red via data-slot targeting.
37
+ * - size is "default" or "sm" (defaults to "default") — "sm" for a tighter
38
+ * space (embedded in a table row, a small Popover): smaller padding/icon,
39
+ * text-xs instead of text-sm. Same default/sm vocabulary as Card/Select/
40
+ * Label, not Alert-specific naming.
41
+ * - AlertTitle is expected in practice; AlertDescription and AlertAction are both optional.
42
+ * - No dismiss button and no auto-dismiss exist on this component — it stays until the parent removes it from the tree.
43
+ * - Pass an icon as a raw `<svg>`/lucide icon child (not wrapped in another element) — the `has-[>svg]` grid layout only triggers off a direct svg child.
44
+ * - AlertAction is absolutely positioned, right-anchored and vertically centered (never a fixed top offset — it doesn't contribute to Alert's own height, so a fixed value could put it taller than a short, title-only Alert actually is); Alert reserves horizontal space for it (`pr-18` default, `pr-16` at "sm") once one is present.
45
+ *
46
+ * USAGE
47
+ * <Alert>
48
+ * <TerminalIcon />
49
+ * <AlertTitle>Heads up!</AlertTitle>
50
+ * <AlertDescription>You can add components to your app using the CLI.</AlertDescription>
51
+ * </Alert>
52
+ *
53
+ * <Alert variant="destructive">
54
+ * <AlertTriangleIcon />
55
+ * <AlertTitle>Unable to process your payment.</AlertTitle>
56
+ * <AlertDescription>Verify your billing information and try again.</AlertDescription>
57
+ * </Alert>
58
+ *
59
+ * <Alert size="sm">
60
+ * <WifiOffIcon />
61
+ * <AlertTitle>You're offline</AlertTitle>
62
+ * </Alert>
63
+ *
64
+ * <Alert>
65
+ * <InfoIcon />
66
+ * <AlertTitle>A new version is available.</AlertTitle>
67
+ * <AlertDescription>Version 2.1.0 is ready to install.</AlertDescription>
68
+ * <AlertAction><Button size="sm" variant="outline">Update</Button></AlertAction>
69
+ * </Alert>
70
+ */
71
+ //# sourceMappingURL=alert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/components/ui/alert.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,aAAa;;;8EAiClB,CAAA;AAED,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAO,EACP,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,qBAUlE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWvE;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW7B;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAiBxE;AAED,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAA;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG"}
@@ -0,0 +1,108 @@
1
+ import { cn } from "../../lib/utils.js";
2
+ import "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { cva } from "class-variance-authority";
5
+ //#region src/components/ui/alert.tsx
6
+ var alertVariants = cva("group/alert relative grid w-full items-center gap-0.5 rounded-xl border text-left has-data-[slot=alert-action]:relative has-data-[slot=alert-description]:items-start has-[>svg]:grid-cols-[auto_1fr] *:[svg]:row-span-2 has-data-[slot=alert-description]:*:[svg]:translate-y-0.5 *:[svg]:text-current", {
7
+ variants: {
8
+ variant: {
9
+ default: "bg-card text-card-foreground",
10
+ destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
11
+ },
12
+ size: {
13
+ default: "px-2.5 py-2 text-sm has-data-[slot=alert-action]:pr-18 has-[>svg]:gap-x-2 *:[svg:not([class*='size-'])]:size-4",
14
+ sm: "px-2 py-1.5 text-xs has-data-[slot=alert-action]:pr-16 has-[>svg]:gap-x-1.5 *:[svg:not([class*='size-'])]:size-3.5"
15
+ }
16
+ },
17
+ defaultVariants: {
18
+ variant: "default",
19
+ size: "default"
20
+ }
21
+ });
22
+ function Alert({ className, variant, size = "default", ...props }) {
23
+ return /* @__PURE__ */ jsx("div", {
24
+ "data-slot": "alert",
25
+ "data-size": size,
26
+ role: "alert",
27
+ className: cn(alertVariants({
28
+ variant,
29
+ size
30
+ }), className),
31
+ ...props
32
+ });
33
+ }
34
+ function AlertTitle({ className, ...props }) {
35
+ return /* @__PURE__ */ jsx("div", {
36
+ "data-slot": "alert-title",
37
+ className: cn("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground", className),
38
+ ...props
39
+ });
40
+ }
41
+ function AlertDescription({ className, ...props }) {
42
+ return /* @__PURE__ */ jsx("div", {
43
+ "data-slot": "alert-description",
44
+ className: cn("text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4", className),
45
+ ...props
46
+ });
47
+ }
48
+ function AlertAction({ className, ...props }) {
49
+ return /* @__PURE__ */ jsx("div", {
50
+ "data-slot": "alert-action",
51
+ className: cn("absolute top-1/2 right-2 -translate-y-1/2", className),
52
+ ...props
53
+ });
54
+ }
55
+ /**
56
+ * WHEN TO USE
57
+ * - Persistent contextual info that stays until the user navigates away or the condition resolves — e.g. a form-level validation summary, a payment-failure notice, an inline warning banner.
58
+ * - A message that needs a title plus supporting text, optionally with one action (e.g. "Update").
59
+ * - A load failure while existing content stays on screen — e.g. a same-page
60
+ * action lost connectivity — so the content isn't torn down over what may
61
+ * be transient. See "Patterns/UI States"; a full-region failure with
62
+ * nothing else on screen uses Empty instead.
63
+ *
64
+ * NOT WHEN
65
+ * - A transient confirmation that should disappear on its own (saved, deleted, upload finished) — use Toaster instead.
66
+ * - Anything requiring the user to make a decision before continuing — use AlertDialog instead.
67
+ * - A single field's validation error — use Field + FieldError instead.
68
+ *
69
+ * KEY RULES
70
+ * - variant is "default" or "destructive" (defaults to "default"); destructive also tints the description and any svg child red via data-slot targeting.
71
+ * - size is "default" or "sm" (defaults to "default") — "sm" for a tighter
72
+ * space (embedded in a table row, a small Popover): smaller padding/icon,
73
+ * text-xs instead of text-sm. Same default/sm vocabulary as Card/Select/
74
+ * Label, not Alert-specific naming.
75
+ * - AlertTitle is expected in practice; AlertDescription and AlertAction are both optional.
76
+ * - No dismiss button and no auto-dismiss exist on this component — it stays until the parent removes it from the tree.
77
+ * - Pass an icon as a raw `<svg>`/lucide icon child (not wrapped in another element) — the `has-[>svg]` grid layout only triggers off a direct svg child.
78
+ * - AlertAction is absolutely positioned, right-anchored and vertically centered (never a fixed top offset — it doesn't contribute to Alert's own height, so a fixed value could put it taller than a short, title-only Alert actually is); Alert reserves horizontal space for it (`pr-18` default, `pr-16` at "sm") once one is present.
79
+ *
80
+ * USAGE
81
+ * <Alert>
82
+ * <TerminalIcon />
83
+ * <AlertTitle>Heads up!</AlertTitle>
84
+ * <AlertDescription>You can add components to your app using the CLI.</AlertDescription>
85
+ * </Alert>
86
+ *
87
+ * <Alert variant="destructive">
88
+ * <AlertTriangleIcon />
89
+ * <AlertTitle>Unable to process your payment.</AlertTitle>
90
+ * <AlertDescription>Verify your billing information and try again.</AlertDescription>
91
+ * </Alert>
92
+ *
93
+ * <Alert size="sm">
94
+ * <WifiOffIcon />
95
+ * <AlertTitle>You're offline</AlertTitle>
96
+ * </Alert>
97
+ *
98
+ * <Alert>
99
+ * <InfoIcon />
100
+ * <AlertTitle>A new version is available.</AlertTitle>
101
+ * <AlertDescription>Version 2.1.0 is ready to install.</AlertDescription>
102
+ * <AlertAction><Button size="sm" variant="outline">Update</Button></AlertAction>
103
+ * </Alert>
104
+ */
105
+ //#endregion
106
+ export { Alert, AlertAction, AlertDescription, AlertTitle };
107
+
108
+ //# sourceMappingURL=alert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert.js","names":[],"sources":["../../../src/components/ui/alert.tsx"],"sourcesContent":["/**\n * Alert — inline, persistent message box for contextual information.\n *\n * A plain div styled with class-variance-authority (cva); no radix primitive\n * underneath. Two variants (default/destructive); the icon-aware layout is\n * composed purely from CSS attribute selectors (`has-[>svg]`, `data-slot`)\n * instead of a dedicated Icon subcomponent, so any raw SVG child is\n * auto-positioned.\n */\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst alertVariants = cva(\n // items-center by default (title-only: one line, icon truly centers\n // against it) — has-data-[slot=alert-description]:items-start switches\n // to top-aligned for the two-line case, where the icon should sit near\n // the title line, not centered across both lines; that case still needs\n // its own small translate-y-0.5 nudge (icon's fixed height sits inside a\n // taller stretched cell under items-start, close but not pixel-exact to\n // the title's own line without it) — the title-only case doesn't, since\n // items-center already lands it correctly with no cell/content height\n // mismatch to correct for.\n \"group/alert relative grid w-full items-center gap-0.5 rounded-xl border text-left has-data-[slot=alert-action]:relative has-data-[slot=alert-description]:items-start has-[>svg]:grid-cols-[auto_1fr] *:[svg]:row-span-2 has-data-[slot=alert-description]:*:[svg]:translate-y-0.5 *:[svg]:text-current\",\n {\n variants: {\n variant: {\n default: \"bg-card text-card-foreground\",\n destructive:\n \"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current\",\n },\n size: {\n default:\n \"px-2.5 py-2 text-sm has-data-[slot=alert-action]:pr-18 has-[>svg]:gap-x-2 *:[svg:not([class*='size-'])]:size-4\",\n // pr-16, not pr-14: the recommended pairing (Button size=\"xs\" in\n // AlertAction) renders ~50-56px wide, and pr-14 left near-zero\n // margin from AlertAction's own right inset — any label longer\n // than \"Update\" overlapped the title/description text.\n sm: \"px-2 py-1.5 text-xs has-data-[slot=alert-action]:pr-16 has-[>svg]:gap-x-1.5 *:[svg:not([class*='size-'])]:size-3.5\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Alert({\n className,\n variant,\n size = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof alertVariants>) {\n return (\n <div\n data-slot=\"alert\"\n data-size={size}\n role=\"alert\"\n className={cn(alertVariants({ variant, size }), className)}\n {...props}\n />\n )\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-title\"\n className={cn(\n \"font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDescription({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-description\"\n className={cn(\n \"text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-action\"\n // Vertically centered (top-1/2 -translate-y-1/2), not a fixed top\n // offset — being `absolute`, this never contributes to Alert's own\n // height, so a fixed top could put it taller than a short,\n // title-only Alert actually is (e.g. sm's top-1.5 + an xs Button's\n // h-6 = 30px, inside an Alert only ~28px tall), overflowing past the\n // bottom edge instead of sitting inside it. Centering is correct\n // for any Alert height or action size, not just the one pairing\n // this was tuned against. right-2 at every size, not sm's old\n // right-1.5 — that read flush against the edge with no margin.\n className={cn(\"absolute top-1/2 right-2 -translate-y-1/2\", className)}\n {...props}\n />\n )\n}\n\nexport { Alert, AlertTitle, AlertDescription, AlertAction }\n\n/**\n * WHEN TO USE\n * - Persistent contextual info that stays until the user navigates away or the condition resolves — e.g. a form-level validation summary, a payment-failure notice, an inline warning banner.\n * - A message that needs a title plus supporting text, optionally with one action (e.g. \"Update\").\n * - A load failure while existing content stays on screen — e.g. a same-page\n * action lost connectivity — so the content isn't torn down over what may\n * be transient. See \"Patterns/UI States\"; a full-region failure with\n * nothing else on screen uses Empty instead.\n *\n * NOT WHEN\n * - A transient confirmation that should disappear on its own (saved, deleted, upload finished) — use Toaster instead.\n * - Anything requiring the user to make a decision before continuing — use AlertDialog instead.\n * - A single field's validation error — use Field + FieldError instead.\n *\n * KEY RULES\n * - variant is \"default\" or \"destructive\" (defaults to \"default\"); destructive also tints the description and any svg child red via data-slot targeting.\n * - size is \"default\" or \"sm\" (defaults to \"default\") — \"sm\" for a tighter\n * space (embedded in a table row, a small Popover): smaller padding/icon,\n * text-xs instead of text-sm. Same default/sm vocabulary as Card/Select/\n * Label, not Alert-specific naming.\n * - AlertTitle is expected in practice; AlertDescription and AlertAction are both optional.\n * - No dismiss button and no auto-dismiss exist on this component — it stays until the parent removes it from the tree.\n * - Pass an icon as a raw `<svg>`/lucide icon child (not wrapped in another element) — the `has-[>svg]` grid layout only triggers off a direct svg child.\n * - AlertAction is absolutely positioned, right-anchored and vertically centered (never a fixed top offset — it doesn't contribute to Alert's own height, so a fixed value could put it taller than a short, title-only Alert actually is); Alert reserves horizontal space for it (`pr-18` default, `pr-16` at \"sm\") once one is present.\n *\n * USAGE\n * <Alert>\n * <TerminalIcon />\n * <AlertTitle>Heads up!</AlertTitle>\n * <AlertDescription>You can add components to your app using the CLI.</AlertDescription>\n * </Alert>\n *\n * <Alert variant=\"destructive\">\n * <AlertTriangleIcon />\n * <AlertTitle>Unable to process your payment.</AlertTitle>\n * <AlertDescription>Verify your billing information and try again.</AlertDescription>\n * </Alert>\n *\n * <Alert size=\"sm\">\n * <WifiOffIcon />\n * <AlertTitle>You're offline</AlertTitle>\n * </Alert>\n *\n * <Alert>\n * <InfoIcon />\n * <AlertTitle>A new version is available.</AlertTitle>\n * <AlertDescription>Version 2.1.0 is ready to install.</AlertDescription>\n * <AlertAction><Button size=\"sm\" variant=\"outline\">Update</Button></AlertAction>\n * </Alert>\n */\n"],"mappings":";;;;;AAeA,IAAM,gBAAgB,IAUpB,2SACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,aACE;EACJ;EACA,MAAM;GACJ,SACE;GAKF,IAAI;EACN;CACF;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;CACR;AACF,CACF;AAEA,SAAS,MAAM,EACb,WACA,SACA,OAAO,WACP,GAAG,SACgE;CACnE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,aAAW;EACX,MAAK;EACL,WAAW,GAAG,cAAc;GAAE;GAAS;EAAK,CAAC,GAAG,SAAS;EACzD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;CACxE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,uHACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,iBAAiB,EACxB,WACA,GAAG,SAC2B;CAC9B,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,sJACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;CACzE,OACE,oBAAC,OAAD;EACE,aAAU;EAUV,WAAW,GAAG,6CAA6C,SAAS;EACpE,GAAI;CACL,CAAA;AAEL"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * AspectRatio — locks a child to a fixed width:height ratio.
3
+ *
4
+ * A plain pass-through to the Radix AspectRatio primitive with a
5
+ * `data-slot` attribute added.
6
+ */
7
+ import { AspectRatio as AspectRatioPrimitive } from "radix-ui";
8
+ declare function AspectRatio({ ...props }: React.ComponentProps<typeof AspectRatioPrimitive.Root>): import("react").JSX.Element;
9
+ export { AspectRatio };
10
+ /**
11
+ * WHEN TO USE
12
+ * - Reserving space for an image, video, or map embed so surrounding layout
13
+ * doesn't shift while it loads — the box holds its shape at 0 bytes loaded.
14
+ *
15
+ * NOT WHEN
16
+ * - Content whose height should follow its own text/children — this forces
17
+ * a ratio regardless of content size, so text can overflow it.
18
+ * - You just need a fixed pixel box — plain `h-*`/`w-*` utilities are simpler.
19
+ *
20
+ * KEY RULES
21
+ * - `ratio` is width/height as a number, e.g. `16 / 9`, `1` for square, `3 / 4`.
22
+ * - The child must fill the box (`size-full` or `absolute inset-0`) — the
23
+ * wrapper sizes itself to the ratio, it doesn't resize its child for you.
24
+ *
25
+ * USAGE
26
+ * <AspectRatio ratio={16 / 9} className="rounded-lg bg-muted">
27
+ * <img src="..." className="size-full object-cover" />
28
+ * </AspectRatio>
29
+ */
30
+ //# sourceMappingURL=aspect-ratio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aspect-ratio.d.ts","sourceRoot":"","sources":["../../../src/components/ui/aspect-ratio.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAE9D,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,+BAExD;AAED,OAAO,EAAE,WAAW,EAAE,CAAA;AAEtB;;;;;;;;;;;;;;;;;;;GAmBG"}
@@ -0,0 +1,40 @@
1
+ "use client";
2
+ import { AspectRatio as AspectRatio$1 } from "radix-ui";
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region src/components/ui/aspect-ratio.tsx
5
+ /**
6
+ * AspectRatio — locks a child to a fixed width:height ratio.
7
+ *
8
+ * A plain pass-through to the Radix AspectRatio primitive with a
9
+ * `data-slot` attribute added.
10
+ */
11
+ function AspectRatio({ ...props }) {
12
+ return /* @__PURE__ */ jsx(AspectRatio$1.Root, {
13
+ "data-slot": "aspect-ratio",
14
+ ...props
15
+ });
16
+ }
17
+ /**
18
+ * WHEN TO USE
19
+ * - Reserving space for an image, video, or map embed so surrounding layout
20
+ * doesn't shift while it loads — the box holds its shape at 0 bytes loaded.
21
+ *
22
+ * NOT WHEN
23
+ * - Content whose height should follow its own text/children — this forces
24
+ * a ratio regardless of content size, so text can overflow it.
25
+ * - You just need a fixed pixel box — plain `h-*`/`w-*` utilities are simpler.
26
+ *
27
+ * KEY RULES
28
+ * - `ratio` is width/height as a number, e.g. `16 / 9`, `1` for square, `3 / 4`.
29
+ * - The child must fill the box (`size-full` or `absolute inset-0`) — the
30
+ * wrapper sizes itself to the ratio, it doesn't resize its child for you.
31
+ *
32
+ * USAGE
33
+ * <AspectRatio ratio={16 / 9} className="rounded-lg bg-muted">
34
+ * <img src="..." className="size-full object-cover" />
35
+ * </AspectRatio>
36
+ */
37
+ //#endregion
38
+ export { AspectRatio };
39
+
40
+ //# sourceMappingURL=aspect-ratio.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aspect-ratio.js","names":[],"sources":["../../../src/components/ui/aspect-ratio.tsx"],"sourcesContent":["\"use client\"\n\n/**\n * AspectRatio — locks a child to a fixed width:height ratio.\n *\n * A plain pass-through to the Radix AspectRatio primitive with a\n * `data-slot` attribute added.\n */\n\nimport { AspectRatio as AspectRatioPrimitive } from \"radix-ui\"\n\nfunction AspectRatio({\n ...props\n}: React.ComponentProps<typeof AspectRatioPrimitive.Root>) {\n return <AspectRatioPrimitive.Root data-slot=\"aspect-ratio\" {...props} />\n}\n\nexport { AspectRatio }\n\n/**\n * WHEN TO USE\n * - Reserving space for an image, video, or map embed so surrounding layout\n * doesn't shift while it loads — the box holds its shape at 0 bytes loaded.\n *\n * NOT WHEN\n * - Content whose height should follow its own text/children — this forces\n * a ratio regardless of content size, so text can overflow it.\n * - You just need a fixed pixel box — plain `h-*`/`w-*` utilities are simpler.\n *\n * KEY RULES\n * - `ratio` is width/height as a number, e.g. `16 / 9`, `1` for square, `3 / 4`.\n * - The child must fill the box (`size-full` or `absolute inset-0`) — the\n * wrapper sizes itself to the ratio, it doesn't resize its child for you.\n *\n * USAGE\n * <AspectRatio ratio={16 / 9} className=\"rounded-lg bg-muted\">\n * <img src=\"...\" className=\"size-full object-cover\" />\n * </AspectRatio>\n */\n"],"mappings":";;;;;;;;;;AAWA,SAAS,YAAY,EACnB,GAAG,SACsD;CACzD,OAAO,oBAAC,cAAqB,MAAtB;EAA2B,aAAU;EAAe,GAAI;CAAQ,CAAA;AACzE"}