@giddaa-housing/ui 0.1.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 (248) hide show
  1. package/README.md +41 -0
  2. package/dist/accordion.d.ts +11 -0
  3. package/dist/accordion.js +124 -0
  4. package/dist/accordion.js.map +1 -0
  5. package/dist/alert.d.ts +18 -0
  6. package/dist/alert.js +152 -0
  7. package/dist/alert.js.map +1 -0
  8. package/dist/avatar.d.ts +14 -0
  9. package/dist/avatar.js +152 -0
  10. package/dist/avatar.js.map +1 -0
  11. package/dist/badge.d.ts +14 -0
  12. package/dist/badge.js +119 -0
  13. package/dist/badge.js.map +1 -0
  14. package/dist/bar-chart.d.ts +136 -0
  15. package/dist/bar-chart.js +302 -0
  16. package/dist/bar-chart.js.map +1 -0
  17. package/dist/base.css +32 -0
  18. package/dist/breadcrumb.d.ts +12 -0
  19. package/dist/breadcrumb.js +161 -0
  20. package/dist/breadcrumb.js.map +1 -0
  21. package/dist/bullet-chart.d.ts +98 -0
  22. package/dist/bullet-chart.js +189 -0
  23. package/dist/bullet-chart.js.map +1 -0
  24. package/dist/button-group.d.ts +18 -0
  25. package/dist/button-group.js +170 -0
  26. package/dist/button-group.js.map +1 -0
  27. package/dist/button.d.ts +19 -0
  28. package/dist/button.js +146 -0
  29. package/dist/button.js.map +1 -0
  30. package/dist/calendar.d.ts +9 -0
  31. package/dist/calendar.js +293 -0
  32. package/dist/calendar.js.map +1 -0
  33. package/dist/card.d.ts +18 -0
  34. package/dist/card.js +186 -0
  35. package/dist/card.js.map +1 -0
  36. package/dist/carousel.d.ts +53 -0
  37. package/dist/carousel.js +396 -0
  38. package/dist/carousel.js.map +1 -0
  39. package/dist/chart.d.ts +122 -0
  40. package/dist/chart.js +494 -0
  41. package/dist/chart.js.map +1 -0
  42. package/dist/checkbox.d.ts +73 -0
  43. package/dist/checkbox.js +87 -0
  44. package/dist/checkbox.js.map +1 -0
  45. package/dist/collapsible.d.ts +8 -0
  46. package/dist/collapsible.js +82 -0
  47. package/dist/collapsible.js.map +1 -0
  48. package/dist/combobox.d.ts +30 -0
  49. package/dist/combobox.js +713 -0
  50. package/dist/combobox.js.map +1 -0
  51. package/dist/date-picker.d.ts +22 -0
  52. package/dist/date-picker.js +528 -0
  53. package/dist/date-picker.js.map +1 -0
  54. package/dist/dialog.d.ts +30 -0
  55. package/dist/dialog.js +339 -0
  56. package/dist/dialog.js.map +1 -0
  57. package/dist/dropdown-menu.d.ts +35 -0
  58. package/dist/dropdown-menu.js +376 -0
  59. package/dist/dropdown-menu.js.map +1 -0
  60. package/dist/dropzone.d.ts +128 -0
  61. package/dist/dropzone.js +490 -0
  62. package/dist/dropzone.js.map +1 -0
  63. package/dist/empty-state.d.ts +17 -0
  64. package/dist/empty-state.js +146 -0
  65. package/dist/empty-state.js.map +1 -0
  66. package/dist/field.d.ts +29 -0
  67. package/dist/field.js +345 -0
  68. package/dist/field.js.map +1 -0
  69. package/dist/files/red-hat-display-latin-300-italic.woff +0 -0
  70. package/dist/files/red-hat-display-latin-300-italic.woff2 +0 -0
  71. package/dist/files/red-hat-display-latin-300-normal.woff +0 -0
  72. package/dist/files/red-hat-display-latin-300-normal.woff2 +0 -0
  73. package/dist/files/red-hat-display-latin-400-italic.woff +0 -0
  74. package/dist/files/red-hat-display-latin-400-italic.woff2 +0 -0
  75. package/dist/files/red-hat-display-latin-400-normal.woff +0 -0
  76. package/dist/files/red-hat-display-latin-400-normal.woff2 +0 -0
  77. package/dist/files/red-hat-display-latin-500-italic.woff +0 -0
  78. package/dist/files/red-hat-display-latin-500-italic.woff2 +0 -0
  79. package/dist/files/red-hat-display-latin-500-normal.woff +0 -0
  80. package/dist/files/red-hat-display-latin-500-normal.woff2 +0 -0
  81. package/dist/files/red-hat-display-latin-600-italic.woff +0 -0
  82. package/dist/files/red-hat-display-latin-600-italic.woff2 +0 -0
  83. package/dist/files/red-hat-display-latin-600-normal.woff +0 -0
  84. package/dist/files/red-hat-display-latin-600-normal.woff2 +0 -0
  85. package/dist/files/red-hat-display-latin-700-italic.woff +0 -0
  86. package/dist/files/red-hat-display-latin-700-italic.woff2 +0 -0
  87. package/dist/files/red-hat-display-latin-700-normal.woff +0 -0
  88. package/dist/files/red-hat-display-latin-700-normal.woff2 +0 -0
  89. package/dist/files/red-hat-display-latin-800-italic.woff +0 -0
  90. package/dist/files/red-hat-display-latin-800-italic.woff2 +0 -0
  91. package/dist/files/red-hat-display-latin-800-normal.woff +0 -0
  92. package/dist/files/red-hat-display-latin-800-normal.woff2 +0 -0
  93. package/dist/files/red-hat-display-latin-900-italic.woff +0 -0
  94. package/dist/files/red-hat-display-latin-900-italic.woff2 +0 -0
  95. package/dist/files/red-hat-display-latin-900-normal.woff +0 -0
  96. package/dist/files/red-hat-display-latin-900-normal.woff2 +0 -0
  97. package/dist/files/red-hat-display-latin-ext-300-italic.woff +0 -0
  98. package/dist/files/red-hat-display-latin-ext-300-italic.woff2 +0 -0
  99. package/dist/files/red-hat-display-latin-ext-300-normal.woff +0 -0
  100. package/dist/files/red-hat-display-latin-ext-300-normal.woff2 +0 -0
  101. package/dist/files/red-hat-display-latin-ext-400-italic.woff +0 -0
  102. package/dist/files/red-hat-display-latin-ext-400-italic.woff2 +0 -0
  103. package/dist/files/red-hat-display-latin-ext-400-normal.woff +0 -0
  104. package/dist/files/red-hat-display-latin-ext-400-normal.woff2 +0 -0
  105. package/dist/files/red-hat-display-latin-ext-500-italic.woff +0 -0
  106. package/dist/files/red-hat-display-latin-ext-500-italic.woff2 +0 -0
  107. package/dist/files/red-hat-display-latin-ext-500-normal.woff +0 -0
  108. package/dist/files/red-hat-display-latin-ext-500-normal.woff2 +0 -0
  109. package/dist/files/red-hat-display-latin-ext-600-italic.woff +0 -0
  110. package/dist/files/red-hat-display-latin-ext-600-italic.woff2 +0 -0
  111. package/dist/files/red-hat-display-latin-ext-600-normal.woff +0 -0
  112. package/dist/files/red-hat-display-latin-ext-600-normal.woff2 +0 -0
  113. package/dist/files/red-hat-display-latin-ext-700-italic.woff +0 -0
  114. package/dist/files/red-hat-display-latin-ext-700-italic.woff2 +0 -0
  115. package/dist/files/red-hat-display-latin-ext-700-normal.woff +0 -0
  116. package/dist/files/red-hat-display-latin-ext-700-normal.woff2 +0 -0
  117. package/dist/files/red-hat-display-latin-ext-800-italic.woff +0 -0
  118. package/dist/files/red-hat-display-latin-ext-800-italic.woff2 +0 -0
  119. package/dist/files/red-hat-display-latin-ext-800-normal.woff +0 -0
  120. package/dist/files/red-hat-display-latin-ext-800-normal.woff2 +0 -0
  121. package/dist/files/red-hat-display-latin-ext-900-italic.woff +0 -0
  122. package/dist/files/red-hat-display-latin-ext-900-italic.woff2 +0 -0
  123. package/dist/files/red-hat-display-latin-ext-900-normal.woff +0 -0
  124. package/dist/files/red-hat-display-latin-ext-900-normal.woff2 +0 -0
  125. package/dist/funnel-chart.d.ts +84 -0
  126. package/dist/funnel-chart.js +569 -0
  127. package/dist/funnel-chart.js.map +1 -0
  128. package/dist/index.d.ts +87 -0
  129. package/dist/index.js +10448 -0
  130. package/dist/index.js.map +1 -0
  131. package/dist/input-group.d.ts +31 -0
  132. package/dist/input-group.js +380 -0
  133. package/dist/input-group.js.map +1 -0
  134. package/dist/input-size-context.d.ts +11 -0
  135. package/dist/input-size-context.js +24 -0
  136. package/dist/input-size-context.js.map +1 -0
  137. package/dist/input.d.ts +13 -0
  138. package/dist/input.js +83 -0
  139. package/dist/input.js.map +1 -0
  140. package/dist/item.d.ts +8 -0
  141. package/dist/item.js +93 -0
  142. package/dist/item.js.map +1 -0
  143. package/dist/kpi-card.d.ts +24 -0
  144. package/dist/kpi-card.js +243 -0
  145. package/dist/kpi-card.js.map +1 -0
  146. package/dist/label.d.ts +8 -0
  147. package/dist/label.js +68 -0
  148. package/dist/label.js.map +1 -0
  149. package/dist/line-chart.d.ts +155 -0
  150. package/dist/line-chart.js +269 -0
  151. package/dist/line-chart.js.map +1 -0
  152. package/dist/logo.d.ts +6 -0
  153. package/dist/logo.js +146 -0
  154. package/dist/logo.js.map +1 -0
  155. package/dist/number-input.d.ts +41 -0
  156. package/dist/number-input.js +418 -0
  157. package/dist/number-input.js.map +1 -0
  158. package/dist/page-header.d.ts +13 -0
  159. package/dist/page-header.js +113 -0
  160. package/dist/page-header.js.map +1 -0
  161. package/dist/pagination.d.ts +35 -0
  162. package/dist/pagination.js +352 -0
  163. package/dist/pagination.js.map +1 -0
  164. package/dist/password-input.d.ts +13 -0
  165. package/dist/password-input.js +356 -0
  166. package/dist/password-input.js.map +1 -0
  167. package/dist/phone-input.d.ts +21 -0
  168. package/dist/phone-input.js +573 -0
  169. package/dist/phone-input.js.map +1 -0
  170. package/dist/photo-gallery.d.ts +42 -0
  171. package/dist/photo-gallery.js +756 -0
  172. package/dist/photo-gallery.js.map +1 -0
  173. package/dist/pie-chart.d.ts +125 -0
  174. package/dist/pie-chart.js +192 -0
  175. package/dist/pie-chart.js.map +1 -0
  176. package/dist/popover.d.ts +20 -0
  177. package/dist/popover.js +169 -0
  178. package/dist/popover.js.map +1 -0
  179. package/dist/progress.d.ts +28 -0
  180. package/dist/progress.js +315 -0
  181. package/dist/progress.js.map +1 -0
  182. package/dist/radio-group.d.ts +32 -0
  183. package/dist/radio-group.js +100 -0
  184. package/dist/radio-group.js.map +1 -0
  185. package/dist/red-hat-display.css +2 -0
  186. package/dist/rich-text-editor.d.ts +16 -0
  187. package/dist/rich-text-editor.js +1000 -0
  188. package/dist/rich-text-editor.js.map +1 -0
  189. package/dist/search-input.d.ts +19 -0
  190. package/dist/search-input.js +411 -0
  191. package/dist/search-input.js.map +1 -0
  192. package/dist/select.d.ts +21 -0
  193. package/dist/select.js +305 -0
  194. package/dist/select.js.map +1 -0
  195. package/dist/separator.d.ts +10 -0
  196. package/dist/separator.js +72 -0
  197. package/dist/separator.js.map +1 -0
  198. package/dist/sheet.d.ts +24 -0
  199. package/dist/sheet.js +282 -0
  200. package/dist/sheet.js.map +1 -0
  201. package/dist/sidebar.d.ts +70 -0
  202. package/dist/sidebar.js +1078 -0
  203. package/dist/sidebar.js.map +1 -0
  204. package/dist/size-context.d.ts +11 -0
  205. package/dist/size-context.js +22 -0
  206. package/dist/size-context.js.map +1 -0
  207. package/dist/skeleton.d.ts +5 -0
  208. package/dist/skeleton.js +48 -0
  209. package/dist/skeleton.js.map +1 -0
  210. package/dist/sparkline.d.ts +94 -0
  211. package/dist/sparkline.js +568 -0
  212. package/dist/sparkline.js.map +1 -0
  213. package/dist/stepper.d.ts +43 -0
  214. package/dist/stepper.js +296 -0
  215. package/dist/stepper.js.map +1 -0
  216. package/dist/styles.css +2 -0
  217. package/dist/switch.d.ts +29 -0
  218. package/dist/switch.js +108 -0
  219. package/dist/switch.js.map +1 -0
  220. package/dist/tab-list.d.ts +38 -0
  221. package/dist/tab-list.js +394 -0
  222. package/dist/tab-list.js.map +1 -0
  223. package/dist/table.d.ts +69 -0
  224. package/dist/table.js +197 -0
  225. package/dist/table.js.map +1 -0
  226. package/dist/tabs.d.ts +18 -0
  227. package/dist/tabs.js +159 -0
  228. package/dist/tabs.js.map +1 -0
  229. package/dist/tag.d.ts +25 -0
  230. package/dist/tag.js +160 -0
  231. package/dist/tag.js.map +1 -0
  232. package/dist/textarea.d.ts +12 -0
  233. package/dist/textarea.js +78 -0
  234. package/dist/textarea.js.map +1 -0
  235. package/dist/theme/giddaa.css +2 -0
  236. package/dist/time-picker.d.ts +13 -0
  237. package/dist/time-picker.js +472 -0
  238. package/dist/time-picker.js.map +1 -0
  239. package/dist/toast.d.ts +23 -0
  240. package/dist/toast.js +330 -0
  241. package/dist/toast.js.map +1 -0
  242. package/dist/tooltip.d.ts +11 -0
  243. package/dist/tooltip.js +96 -0
  244. package/dist/tooltip.js.map +1 -0
  245. package/dist/tree-map.d.ts +127 -0
  246. package/dist/tree-map.js +652 -0
  247. package/dist/tree-map.js.map +1 -0
  248. package/package.json +328 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ui/rich-text-editor.tsx","../src/lib/cn.ts","../src/components/ui/button.tsx","../src/components/ui/size-context.tsx","../src/components/ui/dropdown-menu.tsx","../src/components/ui/input.tsx","../src/components/ui/input-size-context.tsx","../src/components/ui/popover.tsx"],"sourcesContent":["\"use client\";\n\nimport { Color } from \"@tiptap/extension-color\";\nimport { Image } from \"@tiptap/extension-image\";\nimport { Placeholder } from \"@tiptap/extension-placeholder\";\nimport { TextAlign } from \"@tiptap/extension-text-align\";\nimport { TextStyle } from \"@tiptap/extension-text-style\";\nimport { EditorContent, useEditor, useEditorState } from \"@tiptap/react\";\nimport { StarterKit } from \"@tiptap/starter-kit\";\nimport {\n\tAlignCenter,\n\tAlignJustify,\n\tAlignLeft,\n\tAlignRight,\n\tBaseline,\n\tBold,\n\tChevronDown,\n\tCode2,\n\tImageIcon,\n\tItalic,\n\tLink2,\n\tList,\n\tListOrdered,\n\tQuote,\n\tRedo2,\n\tUnderline,\n\tUndo2,\n} from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { cn } from \"../../lib/cn\";\nimport { Button } from \"./button\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuRadioGroup,\n\tDropdownMenuRadioItem,\n\tDropdownMenuTrigger,\n} from \"./dropdown-menu\";\nimport { Input } from \"./input\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"./popover\";\nimport { type ComponentSize, useComponentSize } from \"./size-context\";\n\n// ─── Size configuration ───────────────────────────────────────────────────────\n// Toolbar density, text scale and padding step together across the three sizes.\n\ninterface SizeTokens {\n\twidth: string;\n\tcontent: string;\n\tcontentPad: string;\n\ttext: string;\n\ticon: string;\n\tbutton: string;\n\ttoolbarPad: string;\n\ttoolbarGap: string;\n\tdivider: string;\n}\n\nconst SIZES: Record<ComponentSize, SizeTokens> = {\n\tsm: {\n\t\twidth: \"max-w-[420px]\",\n\t\tcontent: \"min-h-[140px]\",\n\t\tcontentPad: \"px-4 py-3\",\n\t\ttext: \"text-gdt-xs\",\n\t\ticon: \"[&_svg:not([class*='size-'])]:size-3.5\",\n\t\tbutton: \"h-7 min-w-7 px-1\",\n\t\ttoolbarPad: \"px-2 py-1.5\",\n\t\ttoolbarGap: \"gap-0.5\",\n\t\tdivider: \"h-4\",\n\t},\n\tmd: {\n\t\twidth: \"max-w-[520px]\",\n\t\tcontent: \"min-h-[172px]\",\n\t\tcontentPad: \"px-5 py-4\",\n\t\ttext: \"text-gdt-sm\",\n\t\ticon: \"[&_svg:not([class*='size-'])]:size-4\",\n\t\tbutton: \"h-8 min-w-8 px-1.5\",\n\t\ttoolbarPad: \"px-2.5 py-2\",\n\t\ttoolbarGap: \"gap-0.5\",\n\t\tdivider: \"h-5\",\n\t},\n\tlg: {\n\t\twidth: \"max-w-[600px]\",\n\t\tcontent: \"min-h-[206px]\",\n\t\tcontentPad: \"px-6 py-5\",\n\t\ttext: \"text-gdt-md\",\n\t\ticon: \"[&_svg:not([class*='size-'])]:size-[18px]\",\n\t\tbutton: \"h-9 min-w-9 px-2\",\n\t\ttoolbarPad: \"px-3 py-2.5\",\n\t\ttoolbarGap: \"gap-1\",\n\t\tdivider: \"h-6\",\n\t},\n};\n\n// Text-colour swatches. The first entry clears any applied colour.\nconst TEXT_COLORS = [\n\t{ label: \"Default\", value: \"\" },\n\t{ label: \"Forest\", value: \"#2f5a2c\" },\n\t{ label: \"Brass\", value: \"#b8861a\" },\n\t{ label: \"Clay\", value: \"#b2542b\" },\n\t{ label: \"Moss\", value: \"#4e4d29\" },\n\t{ label: \"Stone\", value: \"#5c5648\" },\n\t{ label: \"Ink\", value: \"#1f1c18\" },\n] as const;\n\nconst BLOCK_OPTIONS = [\n\t{ value: \"paragraph\", label: \"Normal\" },\n\t{ value: \"h1\", label: \"Heading 1\" },\n\t{ value: \"h2\", label: \"Heading 2\" },\n\t{ value: \"h3\", label: \"Heading 3\" },\n] as const;\n\ntype BlockValue = (typeof BLOCK_OPTIONS)[number][\"value\"];\ntype AlignValue = \"left\" | \"center\" | \"right\" | \"justify\";\n\n// ─── Shared toolbar primitives ──────────────────────────────────────────────────\n\nfunction toolbarControlClass(tokens: SizeTokens, active?: boolean) {\n\treturn cn(\n\t\t\"inline-flex shrink-0 cursor-pointer items-center justify-center rounded-md font-medium text-fg-secondary outline-none transition-colors select-none\",\n\t\t\"hover:bg-action-tertiary-hover hover:text-fg-primary\",\n\t\t\"focus-visible:ring-2 focus-visible:ring-line-focus\",\n\t\t\"disabled:pointer-events-none disabled:opacity-40 data-disabled:pointer-events-none data-disabled:opacity-40\",\n\t\ttokens.button,\n\t\ttokens.icon,\n\t\ttokens.text,\n\t\tactive &&\n\t\t\t\"bg-action-primary text-fg-on-brand hover:bg-action-primary-hover hover:text-fg-on-brand\",\n\t);\n}\n\ninterface ToolbarButtonProps {\n\ttokens: SizeTokens;\n\tlabel: string;\n\tactive?: boolean;\n\tdisabled?: boolean;\n\tonClick: () => void;\n\tchildren: React.ReactNode;\n}\n\nfunction ToolbarButton({\n\ttokens,\n\tlabel,\n\tactive,\n\tdisabled,\n\tonClick,\n\tchildren,\n}: ToolbarButtonProps) {\n\treturn (\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\taria-label={label}\n\t\t\ttitle={label}\n\t\t\taria-pressed={active}\n\t\t\tdisabled={disabled}\n\t\t\t// Keep the editor selection intact when interacting with the toolbar.\n\t\t\tonMouseDown={(event) => event.preventDefault()}\n\t\t\tonClick={onClick}\n\t\t\tclassName={toolbarControlClass(tokens, active)}\n\t\t>\n\t\t\t{children}\n\t\t</button>\n\t);\n}\n\nfunction ToolbarDivider({ tokens }: { tokens: SizeTokens }) {\n\treturn (\n\t\t<span\n\t\t\taria-hidden=\"true\"\n\t\t\tclassName={cn(\"mx-1 w-px shrink-0 self-center bg-line\", tokens.divider)}\n\t\t/>\n\t);\n}\n\n// ─── Block / heading select ──────────────────────────────────────────────────────\n\nfunction BlockControl({\n\ttokens,\n\tvalue,\n\tdisabled,\n\tonChange,\n}: {\n\ttokens: SizeTokens;\n\tvalue: BlockValue;\n\tdisabled?: boolean;\n\tonChange: (value: BlockValue) => void;\n}) {\n\tconst current = BLOCK_OPTIONS.find((option) => option.value === value);\n\n\treturn (\n\t\t<DropdownMenu>\n\t\t\t<DropdownMenuTrigger\n\t\t\t\tdisabled={disabled}\n\t\t\t\tonMouseDown={(event) => event.preventDefault()}\n\t\t\t\tclassName={cn(\n\t\t\t\t\ttoolbarControlClass(tokens),\n\t\t\t\t\t\"w-auto justify-between gap-1 px-2\",\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<span className=\"whitespace-nowrap\">{current?.label ?? \"Normal\"}</span>\n\t\t\t\t<ChevronDown className=\"size-3.5 opacity-70\" />\n\t\t\t</DropdownMenuTrigger>\n\t\t\t<DropdownMenuContent className=\"min-w-40\">\n\t\t\t\t<DropdownMenuRadioGroup\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tonValueChange={(next) => onChange(next as BlockValue)}\n\t\t\t\t>\n\t\t\t\t\t{BLOCK_OPTIONS.map((option) => (\n\t\t\t\t\t\t<DropdownMenuRadioItem key={option.value} value={option.value}>\n\t\t\t\t\t\t\t{option.label}\n\t\t\t\t\t\t</DropdownMenuRadioItem>\n\t\t\t\t\t))}\n\t\t\t\t</DropdownMenuRadioGroup>\n\t\t\t</DropdownMenuContent>\n\t\t</DropdownMenu>\n\t);\n}\n\n// ─── Text-colour popover ─────────────────────────────────────────────────────────\n\nfunction ColorControl({\n\ttokens,\n\tvalue,\n\tdisabled,\n\tonChange,\n}: {\n\ttokens: SizeTokens;\n\tvalue: string;\n\tdisabled?: boolean;\n\tonChange: (value: string) => void;\n}) {\n\tconst [open, setOpen] = React.useState(false);\n\tconst active = value !== \"\";\n\n\treturn (\n\t\t<Popover open={open} onOpenChange={setOpen}>\n\t\t\t<PopoverTrigger\n\t\t\t\tdisabled={disabled}\n\t\t\t\taria-label=\"Text colour\"\n\t\t\t\ttitle=\"Text colour\"\n\t\t\t\tonMouseDown={(event) => event.preventDefault()}\n\t\t\t\tclassName={toolbarControlClass(tokens, false)}\n\t\t\t>\n\t\t\t\t<span className=\"relative inline-flex flex-col items-center\">\n\t\t\t\t\t<Baseline className={active ? \"text-fg-brand\" : undefined} />\n\t\t\t\t\t<span\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tclassName=\"mt-px h-0.5 w-3 rounded-full\"\n\t\t\t\t\t\tstyle={{ backgroundColor: active ? value : \"currentColor\" }}\n\t\t\t\t\t/>\n\t\t\t\t</span>\n\t\t\t</PopoverTrigger>\n\t\t\t<PopoverContent\n\t\t\t\tshowArrow={false}\n\t\t\t\talign=\"start\"\n\t\t\t\tsideOffset={8}\n\t\t\t\tclassName=\"w-auto py-3\"\n\t\t\t>\n\t\t\t\t<div className=\"grid grid-cols-4 gap-2 px-4\">\n\t\t\t\t\t{TEXT_COLORS.map((color) => {\n\t\t\t\t\t\tconst isSelected = color.value === value;\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tkey={color.label}\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\ttitle={color.label}\n\t\t\t\t\t\t\t\taria-label={color.label}\n\t\t\t\t\t\t\t\taria-pressed={isSelected}\n\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\tonChange(color.value);\n\t\t\t\t\t\t\t\t\tsetOpen(false);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\"flex size-7 items-center justify-center rounded-full border transition-[box-shadow,border-color] outline-none\",\n\t\t\t\t\t\t\t\t\t\"hover:border-line-strong focus-visible:ring-2 focus-visible:ring-line-focus\",\n\t\t\t\t\t\t\t\t\tisSelected\n\t\t\t\t\t\t\t\t\t\t? \"border-line-focus ring-2 ring-line-focus/40\"\n\t\t\t\t\t\t\t\t\t\t: \"border-line\",\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\"flex size-5 items-center justify-center rounded-full text-gdt-xs font-bold\",\n\t\t\t\t\t\t\t\t\t\tcolor.value === \"\" && \"text-fg-secondary\",\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\tcolor.value\n\t\t\t\t\t\t\t\t\t\t\t? { backgroundColor: color.value, color: \"#fff\" }\n\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tA\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t</PopoverContent>\n\t\t</Popover>\n\t);\n}\n\n// ─── Link popover ────────────────────────────────────────────────────────────────\n\nfunction LinkControl({\n\ttokens,\n\tactive,\n\tcurrentHref,\n\tdisabled,\n\tonApply,\n\tonRemove,\n}: {\n\ttokens: SizeTokens;\n\tactive: boolean;\n\tcurrentHref: string;\n\tdisabled?: boolean;\n\tonApply: (href: string) => void;\n\tonRemove: () => void;\n}) {\n\tconst [open, setOpen] = React.useState(false);\n\tconst [href, setHref] = React.useState(\"\");\n\n\tfunction handleOpenChange(next: boolean) {\n\t\tif (next) setHref(currentHref);\n\t\tsetOpen(next);\n\t}\n\n\tfunction handleSubmit(event: React.FormEvent) {\n\t\tevent.preventDefault();\n\t\tconst trimmed = href.trim();\n\t\tif (trimmed) onApply(trimmed);\n\t\telse onRemove();\n\t\tsetOpen(false);\n\t}\n\n\treturn (\n\t\t<Popover open={open} onOpenChange={handleOpenChange}>\n\t\t\t<PopoverTrigger\n\t\t\t\tdisabled={disabled}\n\t\t\t\taria-label=\"Insert link\"\n\t\t\t\ttitle=\"Insert link\"\n\t\t\t\taria-pressed={active}\n\t\t\t\tonMouseDown={(event) => event.preventDefault()}\n\t\t\t\tclassName={toolbarControlClass(tokens, active)}\n\t\t\t>\n\t\t\t\t<Link2 />\n\t\t\t</PopoverTrigger>\n\t\t\t<PopoverContent showArrow={false} align=\"start\" sideOffset={8}>\n\t\t\t\t<form className=\"flex flex-col gap-3 px-4\" onSubmit={handleSubmit}>\n\t\t\t\t\t<Input\n\t\t\t\t\t\tautoFocus\n\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\ttype=\"url\"\n\t\t\t\t\t\tplaceholder=\"https://example.com\"\n\t\t\t\t\t\tvalue={href}\n\t\t\t\t\t\tonChange={(event) => setHref(event.target.value)}\n\t\t\t\t\t/>\n\t\t\t\t\t<div className=\"flex items-center justify-between gap-2\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tvariant=\"tertiary-outline\"\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\tdisabled={!active}\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tonRemove();\n\t\t\t\t\t\t\t\tsetOpen(false);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tRemove\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button type=\"submit\" size=\"sm\">\n\t\t\t\t\t\t\tApply\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</form>\n\t\t\t</PopoverContent>\n\t\t</Popover>\n\t);\n}\n\n// ─── Alignment dropdown ──────────────────────────────────────────────────────────\n\nconst ALIGN_OPTIONS = [\n\t{ value: \"left\", label: \"Left\", Icon: AlignLeft },\n\t{ value: \"center\", label: \"Center\", Icon: AlignCenter },\n\t{ value: \"right\", label: \"Right\", Icon: AlignRight },\n\t{ value: \"justify\", label: \"Justify\", Icon: AlignJustify },\n] as const;\n\nfunction AlignControl({\n\ttokens,\n\tvalue,\n\tdisabled,\n\tonChange,\n}: {\n\ttokens: SizeTokens;\n\tvalue: AlignValue;\n\tdisabled?: boolean;\n\tonChange: (value: AlignValue) => void;\n}) {\n\tconst current = ALIGN_OPTIONS.find((option) => option.value === value);\n\tconst Icon = current?.Icon ?? AlignLeft;\n\n\treturn (\n\t\t<DropdownMenu>\n\t\t\t<DropdownMenuTrigger\n\t\t\t\tdisabled={disabled}\n\t\t\t\taria-label=\"Text alignment\"\n\t\t\t\ttitle=\"Text alignment\"\n\t\t\t\tonMouseDown={(event) => event.preventDefault()}\n\t\t\t\tclassName={toolbarControlClass(tokens, value !== \"left\")}\n\t\t\t>\n\t\t\t\t<Icon />\n\t\t\t</DropdownMenuTrigger>\n\t\t\t<DropdownMenuContent className=\"min-w-36\">\n\t\t\t\t<DropdownMenuRadioGroup\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tonValueChange={(next) => onChange(next as AlignValue)}\n\t\t\t\t>\n\t\t\t\t\t{ALIGN_OPTIONS.map(\n\t\t\t\t\t\t({ value: optionValue, label, Icon: OptionIcon }) => (\n\t\t\t\t\t\t\t<DropdownMenuRadioItem key={optionValue} value={optionValue}>\n\t\t\t\t\t\t\t\t<OptionIcon />\n\t\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t\t</DropdownMenuRadioItem>\n\t\t\t\t\t\t),\n\t\t\t\t\t)}\n\t\t\t\t</DropdownMenuRadioGroup>\n\t\t\t</DropdownMenuContent>\n\t\t</DropdownMenu>\n\t);\n}\n\n// ─── RichTextEditor ──────────────────────────────────────────────────────────────\n\ninterface RichTextEditorProps {\n\tvalue?: string;\n\tdefaultValue?: string;\n\tonChange?: (html: string) => void;\n\tsize?: ComponentSize;\n\tplaceholder?: string;\n\tdisabled?: boolean;\n\tclassName?: string;\n\t\"aria-label\"?: string;\n}\n\nconst EMPTY_STATE = {\n\tblock: \"paragraph\" as BlockValue,\n\talign: \"left\" as AlignValue,\n\tcolor: \"\",\n\tlinkHref: \"\",\n\tisBold: false,\n\tisItalic: false,\n\tisUnderline: false,\n\tisBulletList: false,\n\tisOrderedList: false,\n\tisBlockquote: false,\n\tisCodeBlock: false,\n\tisLink: false,\n\tcanUndo: false,\n\tcanRedo: false,\n};\n\nfunction RichTextEditor({\n\tvalue,\n\tdefaultValue,\n\tonChange,\n\tsize,\n\tplaceholder = \"Start writing, or paste your content here. Format text and add lists, links, and images using the toolbar above.\",\n\tdisabled = false,\n\tclassName,\n\t\"aria-label\": ariaLabel = \"Rich text editor\",\n}: RichTextEditorProps) {\n\tconst resolvedSize = useComponentSize(size);\n\tconst tokens = SIZES[resolvedSize];\n\tconst [focused, setFocused] = React.useState(false);\n\n\tconst editor = useEditor({\n\t\timmediatelyRender: false,\n\t\teditable: !disabled,\n\t\tcontent: value ?? defaultValue ?? \"\",\n\t\textensions: [\n\t\t\tStarterKit.configure({\n\t\t\t\tlink: {\n\t\t\t\t\topenOnClick: false,\n\t\t\t\t\tHTMLAttributes: { rel: \"noopener noreferrer nofollow\" },\n\t\t\t\t},\n\t\t\t}),\n\t\t\tTextStyle,\n\t\t\tColor,\n\t\t\tTextAlign.configure({ types: [\"heading\", \"paragraph\"] }),\n\t\t\tImage.configure({ inline: false, allowBase64: true }),\n\t\t\tPlaceholder.configure({ placeholder }),\n\t\t],\n\t\teditorProps: {\n\t\t\tattributes: {\n\t\t\t\t\"aria-label\": ariaLabel,\n\t\t\t\trole: \"textbox\",\n\t\t\t\t\"aria-multiline\": \"true\",\n\t\t\t\tclass: cn(\"tiptap focus:outline-none\", tokens.text),\n\t\t\t},\n\t\t},\n\t\tonFocus: () => setFocused(true),\n\t\tonBlur: () => setFocused(false),\n\t\tonUpdate: ({ editor: instance }) => onChange?.(instance.getHTML()),\n\t});\n\n\t// Keep editability in sync with the disabled prop.\n\tReact.useEffect(() => {\n\t\teditor?.setEditable(!disabled);\n\t}, [editor, disabled]);\n\n\t// Sync external (controlled) value changes without disturbing the cursor.\n\tReact.useEffect(() => {\n\t\tif (!editor || value === undefined) return;\n\t\tif (value !== editor.getHTML()) {\n\t\t\teditor.commands.setContent(value, { emitUpdate: false });\n\t\t}\n\t}, [editor, value]);\n\n\tconst state = useEditorState({\n\t\teditor,\n\t\tselector: ({ editor: instance }) => {\n\t\t\tif (!instance) return EMPTY_STATE;\n\t\t\tconst block: BlockValue = instance.isActive(\"heading\", { level: 1 })\n\t\t\t\t? \"h1\"\n\t\t\t\t: instance.isActive(\"heading\", { level: 2 })\n\t\t\t\t\t? \"h2\"\n\t\t\t\t\t: instance.isActive(\"heading\", { level: 3 })\n\t\t\t\t\t\t? \"h3\"\n\t\t\t\t\t\t: \"paragraph\";\n\t\t\tconst align: AlignValue = instance.isActive({ textAlign: \"center\" })\n\t\t\t\t? \"center\"\n\t\t\t\t: instance.isActive({ textAlign: \"right\" })\n\t\t\t\t\t? \"right\"\n\t\t\t\t\t: instance.isActive({ textAlign: \"justify\" })\n\t\t\t\t\t\t? \"justify\"\n\t\t\t\t\t\t: \"left\";\n\t\t\treturn {\n\t\t\t\tblock,\n\t\t\t\talign,\n\t\t\t\tcolor: (instance.getAttributes(\"textStyle\").color as string) ?? \"\",\n\t\t\t\tlinkHref: (instance.getAttributes(\"link\").href as string) ?? \"\",\n\t\t\t\tisBold: instance.isActive(\"bold\"),\n\t\t\t\tisItalic: instance.isActive(\"italic\"),\n\t\t\t\tisUnderline: instance.isActive(\"underline\"),\n\t\t\t\tisBulletList: instance.isActive(\"bulletList\"),\n\t\t\t\tisOrderedList: instance.isActive(\"orderedList\"),\n\t\t\t\tisBlockquote: instance.isActive(\"blockquote\"),\n\t\t\t\tisCodeBlock: instance.isActive(\"codeBlock\"),\n\t\t\t\tisLink: instance.isActive(\"link\"),\n\t\t\t\tcanUndo: instance.can().undo(),\n\t\t\t\tcanRedo: instance.can().redo(),\n\t\t\t};\n\t\t},\n\t});\n\n\tconst s = state ?? EMPTY_STATE;\n\n\tfunction setBlock(next: BlockValue) {\n\t\tif (!editor) return;\n\t\tconst chain = editor.chain().focus();\n\t\tif (next === \"paragraph\") chain.setParagraph().run();\n\t\telse chain.toggleHeading({ level: Number(next[1]) as 1 | 2 | 3 }).run();\n\t}\n\n\tfunction setAlign(next: AlignValue) {\n\t\teditor?.chain().focus().setTextAlign(next).run();\n\t}\n\n\tfunction setColor(next: string) {\n\t\tif (!editor) return;\n\t\tif (next) editor.chain().focus().setColor(next).run();\n\t\telse editor.chain().focus().unsetColor().run();\n\t}\n\n\tfunction applyLink(href: string) {\n\t\teditor?.chain().focus().extendMarkRange(\"link\").setLink({ href }).run();\n\t}\n\n\tfunction removeLink() {\n\t\teditor?.chain().focus().extendMarkRange(\"link\").unsetLink().run();\n\t}\n\n\tfunction insertImage() {\n\t\tconst url = window.prompt(\"Image URL\");\n\t\tif (url) editor?.chain().focus().setImage({ src: url }).run();\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"rich-text-editor\"\n\t\t\tdata-disabled={disabled || undefined}\n\t\t\tdata-focused={focused || undefined}\n\t\t\tclassName={cn(\n\t\t\t\t\"group/editor flex w-full flex-col overflow-hidden rounded-2xl border bg-surface text-fg-primary shadow-1 transition-[border-color,box-shadow]\",\n\t\t\t\tdisabled\n\t\t\t\t\t? \"border-line-subtle opacity-60\"\n\t\t\t\t\t: focused\n\t\t\t\t\t\t? \"border-line-focus ring-2 ring-line-focus/35\"\n\t\t\t\t\t\t: \"border-line hover:border-line-strong\",\n\t\t\t\ttokens.width,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t{/* Toolbar — raised strip holding all formatting controls */}\n\t\t\t<div\n\t\t\t\trole=\"toolbar\"\n\t\t\t\taria-label=\"Formatting\"\n\t\t\t\taria-orientation=\"horizontal\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex flex-wrap items-center bg-surface-raised\",\n\t\t\t\t\ttokens.toolbarPad,\n\t\t\t\t\ttokens.toolbarGap,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<BlockControl\n\t\t\t\t\ttokens={tokens}\n\t\t\t\t\tvalue={s.block}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tonChange={setBlock}\n\t\t\t\t/>\n\t\t\t\t<ToolbarButton\n\t\t\t\t\ttokens={tokens}\n\t\t\t\t\tlabel=\"Bold\"\n\t\t\t\t\tactive={s.isBold}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tonClick={() => editor?.chain().focus().toggleBold().run()}\n\t\t\t\t>\n\t\t\t\t\t<Bold />\n\t\t\t\t</ToolbarButton>\n\t\t\t\t<ToolbarButton\n\t\t\t\t\ttokens={tokens}\n\t\t\t\t\tlabel=\"Italic\"\n\t\t\t\t\tactive={s.isItalic}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tonClick={() => editor?.chain().focus().toggleItalic().run()}\n\t\t\t\t>\n\t\t\t\t\t<Italic />\n\t\t\t\t</ToolbarButton>\n\t\t\t\t<ToolbarButton\n\t\t\t\t\ttokens={tokens}\n\t\t\t\t\tlabel=\"Underline\"\n\t\t\t\t\tactive={s.isUnderline}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tonClick={() => editor?.chain().focus().toggleUnderline().run()}\n\t\t\t\t>\n\t\t\t\t\t<Underline />\n\t\t\t\t</ToolbarButton>\n\t\t\t\t<ColorControl\n\t\t\t\t\ttokens={tokens}\n\t\t\t\t\tvalue={s.color}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tonChange={setColor}\n\t\t\t\t/>\n\n\t\t\t\t<ToolbarDivider tokens={tokens} />\n\n\t\t\t\t<ToolbarButton\n\t\t\t\t\ttokens={tokens}\n\t\t\t\t\tlabel=\"Numbered list\"\n\t\t\t\t\tactive={s.isOrderedList}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tonClick={() => editor?.chain().focus().toggleOrderedList().run()}\n\t\t\t\t>\n\t\t\t\t\t<ListOrdered />\n\t\t\t\t</ToolbarButton>\n\t\t\t\t<ToolbarButton\n\t\t\t\t\ttokens={tokens}\n\t\t\t\t\tlabel=\"Bullet list\"\n\t\t\t\t\tactive={s.isBulletList}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tonClick={() => editor?.chain().focus().toggleBulletList().run()}\n\t\t\t\t>\n\t\t\t\t\t<List />\n\t\t\t\t</ToolbarButton>\n\t\t\t\t<AlignControl\n\t\t\t\t\ttokens={tokens}\n\t\t\t\t\tvalue={s.align}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tonChange={setAlign}\n\t\t\t\t/>\n\n\t\t\t\t<ToolbarDivider tokens={tokens} />\n\n\t\t\t\t<LinkControl\n\t\t\t\t\ttokens={tokens}\n\t\t\t\t\tactive={s.isLink}\n\t\t\t\t\tcurrentHref={s.linkHref}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tonApply={applyLink}\n\t\t\t\t\tonRemove={removeLink}\n\t\t\t\t/>\n\t\t\t\t<ToolbarButton\n\t\t\t\t\ttokens={tokens}\n\t\t\t\t\tlabel=\"Quote\"\n\t\t\t\t\tactive={s.isBlockquote}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tonClick={() => editor?.chain().focus().toggleBlockquote().run()}\n\t\t\t\t>\n\t\t\t\t\t<Quote />\n\t\t\t\t</ToolbarButton>\n\t\t\t\t<ToolbarButton\n\t\t\t\t\ttokens={tokens}\n\t\t\t\t\tlabel=\"Code block\"\n\t\t\t\t\tactive={s.isCodeBlock}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tonClick={() => editor?.chain().focus().toggleCodeBlock().run()}\n\t\t\t\t>\n\t\t\t\t\t<Code2 />\n\t\t\t\t</ToolbarButton>\n\t\t\t\t<ToolbarButton\n\t\t\t\t\ttokens={tokens}\n\t\t\t\t\tlabel=\"Insert image\"\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tonClick={insertImage}\n\t\t\t\t>\n\t\t\t\t\t<ImageIcon />\n\t\t\t\t</ToolbarButton>\n\n\t\t\t\t<ToolbarDivider tokens={tokens} />\n\n\t\t\t\t<ToolbarButton\n\t\t\t\t\ttokens={tokens}\n\t\t\t\t\tlabel=\"Undo\"\n\t\t\t\t\tdisabled={disabled || !s.canUndo}\n\t\t\t\t\tonClick={() => editor?.chain().focus().undo().run()}\n\t\t\t\t>\n\t\t\t\t\t<Undo2 />\n\t\t\t\t</ToolbarButton>\n\t\t\t\t<ToolbarButton\n\t\t\t\t\ttokens={tokens}\n\t\t\t\t\tlabel=\"Redo\"\n\t\t\t\t\tdisabled={disabled || !s.canRedo}\n\t\t\t\t\tonClick={() => editor?.chain().focus().redo().run()}\n\t\t\t\t>\n\t\t\t\t\t<Redo2 />\n\t\t\t\t</ToolbarButton>\n\t\t\t</div>\n\n\t\t\t{/* Divider — border-subtle line separating the toolbar from the content */}\n\t\t\t<div className=\"h-px w-full shrink-0 bg-line-subtle\" />\n\n\t\t\t{/* Content area — editable surface */}\n\t\t\t<EditorContent\n\t\t\t\teditor={editor}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"gdt-rich-text min-w-0 flex-1 overflow-y-auto\",\n\t\t\t\t\ttokens.content,\n\t\t\t\t\ttokens.contentPad,\n\t\t\t\t)}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nexport { RichTextEditor };\nexport type { RichTextEditorProps };\n","import { type ClassValue, clsx } from \"clsx\";\nimport { extendTailwindMerge } from \"tailwind-merge\";\n\nconst twMerge = extendTailwindMerge({\n\textend: {\n\t\tclassGroups: {\n\t\t\t\"font-size\": [\n\t\t\t\t{\n\t\t\t\t\ttext: [\n\t\t\t\t\t\t\"gdt-display\",\n\t\t\t\t\t\t\"gdt-h1\",\n\t\t\t\t\t\t\"gdt-h2\",\n\t\t\t\t\t\t\"gdt-h3\",\n\t\t\t\t\t\t\"gdt-h4\",\n\t\t\t\t\t\t\"gdt-h5\",\n\t\t\t\t\t\t\"gdt-xl\",\n\t\t\t\t\t\t\"gdt-lg\",\n\t\t\t\t\t\t\"gdt-md\",\n\t\t\t\t\t\t\"gdt-sm\",\n\t\t\t\t\t\t\"gdt-xs\",\n\t\t\t\t\t\t\"gdt-subtext\",\n\t\t\t\t\t\t\"gdt-capitalized\",\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n});\n\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","import { Button as ButtonPrimitive } from \"@base-ui/react/button\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { Loader } from \"lucide-react\";\nimport type * as React from \"react\";\nimport { cn } from \"../../lib/cn\";\nimport { useComponentSize } from \"./size-context\";\n\nconst buttonVariants = cva(\n\t\"group/button inline-flex shrink-0 items-center justify-center rounded-full bg-clip-padding whitespace-nowrap font-bold transition-[background-color,color,border-color,box-shadow,transform] outline-none select-none focus-visible:border-line-focus focus-visible:shadow-[0px_0px_0px_2px_var(--color-line-focus)] active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-invalid:border-line-danger aria-invalid:ring-3 aria-invalid:ring-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tprimary:\n\t\t\t\t\t\"bg-action-primary text-fg-on-brand hover:bg-action-primary-hover active:bg-action-primary-pressed\",\n\t\t\t\t\"primary-outline\":\n\t\t\t\t\t\"border-2 border-action-primary bg-transparent text-fg-brand hover:bg-surface-brand-subtle active:bg-surface-brand-subtle data-focused:bg-surface-brand-subtle data-pressed:bg-surface-brand-subtle\",\n\t\t\t\tsecondary:\n\t\t\t\t\t\"bg-surface-brand-subtle text-fg-brand hover:bg-action-primary-hover hover:text-fg-on-brand active:bg-action-primary-pressed active:text-fg-on-brand data-focused:bg-action-primary-hover data-pressed:bg-action-primary-pressed data-focused:text-fg-on-brand data-pressed:text-fg-on-brand\",\n\t\t\t\t\"secondary-outline\":\n\t\t\t\t\t\"border-2 border-action-secondary bg-transparent text-fg-brand hover:bg-surface-brand-subtle active:bg-surface-brand-subtle data-focused:bg-surface-brand-subtle data-pressed:bg-surface-brand-subtle\",\n\t\t\t\ttertiary:\n\t\t\t\t\t\"bg-action-tertiary text-fg-primary hover:bg-action-tertiary-hover active:bg-action-tertiary-pressed data-focused:bg-action-tertiary-hover data-pressed:bg-action-tertiary-pressed\",\n\t\t\t\t\"tertiary-outline\":\n\t\t\t\t\t\"border border-line-strong bg-transparent text-fg-primary hover:bg-surface active:bg-surface-raised data-focused:bg-surface data-pressed:bg-surface-raised\",\n\t\t\t\tghost:\n\t\t\t\t\t\"bg-transparent text-fg-primary hover:bg-surface active:bg-surface-raised data-focused:bg-surface data-pressed:bg-surface-raised\",\n\t\t\t\tdanger:\n\t\t\t\t\t\"bg-action-danger text-fg-on-brand hover:bg-action-danger-hover active:bg-action-danger-pressed data-focused:bg-action-danger-hover data-pressed:bg-action-danger-pressed\",\n\t\t\t\t\"glass-overlay\": \"bg-surface-glass-overlay-button text-fg-on-brand\",\n\t\t\t\t\"link-brand\":\n\t\t\t\t\t\"border-transparent bg-transparent px-0 text-fg-brand hover:underline active:underline active:opacity-70\",\n\t\t\t\t\"link-neutral\":\n\t\t\t\t\t\"border-transparent bg-transparent px-0 text-fg-secondary hover:underline active:underline active:opacity-70\",\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tsm: \"h-8 gap-2 px-3.5 text-gdt-xs has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3 [&_svg:not([class*='size-'])]:size-3.5\",\n\t\t\t\tmd: \"h-10 gap-2 px-4.5 text-gdt-sm has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4\",\n\t\t\t\tlg: \"h-12.5 gap-2.5 px-5.5 text-gdt-md has-data-[icon=inline-end]:pr-5 has-data-[icon=inline-start]:pl-5 [&_svg:not([class*='size-'])]:size-4.5\",\n\t\t\t\txl: \"h-14 gap-3 px-6.5 text-gdt-lg has-data-[icon=inline-end]:pr-6 has-data-[icon=inline-start]:pl-6 [&_svg:not([class*='size-'])]:size-5\",\n\t\t\t\ticon: \"size-10\",\n\t\t\t\t\"icon-xs\": \"size-6 text-gdt-xs [&_svg:not([class*='size-'])]:size-3\",\n\t\t\t\t\"icon-sm\": \"size-8 text-gdt-sm [&_svg:not([class*='size-'])]:size-3.5\",\n\t\t\t\t\"icon-lg\":\n\t\t\t\t\t\"size-12.5 text-gdt-md [&_svg:not([class*='size-'])]:size-4.5\",\n\t\t\t\t\"icon-xl\": \"size-14 text-gdt-lg [&_svg:not([class*='size-'])]:size-5\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"primary\",\n\t\t\tsize: \"md\",\n\t\t},\n\t},\n);\n\ntype ButtonSize = NonNullable<VariantProps<typeof buttonVariants>[\"size\"]>;\n\nfunction Button({\n\tclassName,\n\tvariant = \"primary\",\n\tsize,\n\tisLoading = false,\n\tchildren,\n\tdisabled = false,\n\t...props\n}: ButtonPrimitive.Props &\n\tVariantProps<typeof buttonVariants> & { isLoading?: boolean }) {\n\tconst inheritedSize = useComponentSize();\n\tconst resolvedSize = size ?? inheritedSize;\n\tconst _disabled = disabled || isLoading;\n\treturn (\n\t\t<ButtonPrimitive\n\t\t\tdata-slot=\"button\"\n\t\t\tclassName={cn(buttonVariants({ variant, size: resolvedSize, className }))}\n\t\t\tdisabled={_disabled}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isLoading && <Loader className=\"size-4 animate-spin\" />} {children}\n\t\t</ButtonPrimitive>\n\t);\n}\n\ntype ButtonLinkProps = Omit<React.ComponentProps<\"a\">, \"href\"> &\n\tVariantProps<typeof buttonVariants> & {\n\t\tdisabled?: boolean;\n\t\thref: string;\n\t};\n\nfunction ButtonLink({\n\tclassName,\n\thref,\n\tvariant = \"primary\",\n\tsize,\n\tdisabled = false,\n\tonClick,\n\t...props\n}: ButtonLinkProps) {\n\tconst inheritedSize = useComponentSize();\n\tconst resolvedSize: ButtonSize = size ?? inheritedSize;\n\n\treturn (\n\t\t<a\n\t\t\tdata-slot=\"button-link\"\n\t\t\thref={href}\n\t\t\taria-disabled={disabled}\n\t\t\ttabIndex={disabled ? -1 : props.tabIndex}\n\t\t\tclassName={cn(buttonVariants({ variant, size: resolvedSize, className }))}\n\t\t\tonClick={(event) => {\n\t\t\t\tif (disabled) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tonClick?.(event);\n\t\t\t}}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Button, ButtonLink, buttonVariants };\n","\"use client\";\n\nimport { createContext, type ReactNode, useContext } from \"react\";\n\ntype ComponentSize = \"sm\" | \"md\" | \"lg\";\n\nconst SizeContext = createContext<ComponentSize | undefined>(undefined);\n\nfunction SizeProvider({\n\tchildren,\n\tsize,\n}: {\n\tchildren: ReactNode;\n\tsize?: ComponentSize | null;\n}) {\n\tif (!size) {\n\t\treturn <>{children}</>;\n\t}\n\n\treturn <SizeContext.Provider value={size}>{children}</SizeContext.Provider>;\n}\n\nfunction useComponentSize(\n\tsize?: ComponentSize | null,\n\tfallback: ComponentSize = \"md\",\n) {\n\tconst inheritedSize = useContext(SizeContext);\n\treturn size ?? inheritedSize ?? fallback;\n}\n\nexport { SizeProvider, useComponentSize, type ComponentSize };\n","\"use client\";\n\nimport { Menu as MenuPrimitive } from \"@base-ui/react/menu\";\nimport { cva } from \"class-variance-authority\";\nimport { CheckIcon, ChevronRightIcon } from \"lucide-react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../../lib/cn\";\nimport {\n\ttype ComponentSize,\n\tSizeProvider,\n\tuseComponentSize,\n} from \"./size-context\";\n\ntype DropdownMenuSize = ComponentSize;\n\nfunction DropdownMenu({\n\tchildren,\n\tsize,\n\t...props\n}: MenuPrimitive.Root.Props & {\n\tsize?: DropdownMenuSize;\n}) {\n\treturn (\n\t\t<SizeProvider size={size}>\n\t\t\t<MenuPrimitive.Root data-slot=\"dropdown-menu\" {...props}>\n\t\t\t\t{children}\n\t\t\t</MenuPrimitive.Root>\n\t\t</SizeProvider>\n\t);\n}\n\nfunction DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props) {\n\treturn <MenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />;\n}\n\nfunction DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props) {\n\treturn <MenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />;\n}\n\nconst dropdownMenuContentVariants = cva(\n\t\"relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto border border-line-subtle bg-canvas text-fg-primary shadow-(--elevation-e1-shadow) duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95\",\n\t{\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\tsm: \"rounded-lg p-1\",\n\t\t\t\tmd: \"rounded-xl p-1.5\",\n\t\t\t\tlg: \"rounded-[18px] p-2\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tsize: \"md\",\n\t\t},\n\t},\n);\n\nconst dropdownMenuItemVariants = cva(\n\t\"group/dropdown-menu-item relative flex w-full cursor-pointer items-center font-normal text-fg-primary outline-none transition-colors select-none focus:bg-surface focus:text-fg-primary data-highlighted:bg-surface data-highlighted:text-fg-primary data-[variant=destructive]:text-fg-danger data-[variant=destructive]:focus:bg-surface-danger-subtle data-[variant=destructive]:focus:text-fg-danger data-[variant=destructive]:data-highlighted:bg-surface-danger-subtle data-[variant=destructive]:data-highlighted:text-fg-danger data-disabled:pointer-events-none data-disabled:text-fg-caption-placeholder data-disabled:opacity-100 [&_svg]:pointer-events-none [&_svg]:shrink-0 data-[variant=destructive]:[&_svg]:text-fg-danger\",\n\t{\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\tsm: \"gap-1.5 rounded-md px-3 py-1.5 text-gdt-xs [&_svg:not([class*='size-'])]:size-3.5\",\n\t\t\t\tmd: \"gap-2 rounded-md px-4 py-2 text-gdt-sm [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tlg: \"gap-2.5 rounded-md px-4 py-2.5 text-gdt-md [&_svg:not([class*='size-'])]:size-4.5\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tsize: \"md\",\n\t\t},\n\t},\n);\n\nconst dropdownMenuLabelVariants = cva(\n\t\"font-medium text-fg-secondary data-inset:pl-8\",\n\t{\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\tsm: \"px-3 py-1 text-gdt-xs\",\n\t\t\t\tmd: \"px-3 py-1 text-gdt-xs\",\n\t\t\t\tlg: \"px-4 py-1.5 text-gdt-sm\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tsize: \"md\",\n\t\t},\n\t},\n);\n\nfunction DropdownMenuContent({\n\talign = \"start\",\n\talignOffset = 0,\n\tside = \"bottom\",\n\tsideOffset = 6,\n\tclassName,\n\t...props\n}: MenuPrimitive.Popup.Props &\n\tPick<\n\t\tMenuPrimitive.Positioner.Props,\n\t\t\"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n\t>) {\n\tconst resolvedSize = useComponentSize();\n\n\treturn (\n\t\t<MenuPrimitive.Portal>\n\t\t\t<MenuPrimitive.Positioner\n\t\t\t\tclassName=\"isolate z-50 outline-none\"\n\t\t\t\talign={align}\n\t\t\t\talignOffset={alignOffset}\n\t\t\t\tside={side}\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t>\n\t\t\t\t<MenuPrimitive.Popup\n\t\t\t\t\tdata-slot=\"dropdown-menu-content\"\n\t\t\t\t\tdata-size={resolvedSize}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\tdropdownMenuContentVariants({ size: resolvedSize }),\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\t{...props}\n\t\t\t\t/>\n\t\t\t</MenuPrimitive.Positioner>\n\t\t</MenuPrimitive.Portal>\n\t);\n}\n\nfunction DropdownMenuGroup({ className, ...props }: MenuPrimitive.Group.Props) {\n\treturn (\n\t\t<MenuPrimitive.Group\n\t\t\tdata-slot=\"dropdown-menu-group\"\n\t\t\tclassName={cn(\"scroll-my-1 space-y-0.5\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuLabel({\n\tclassName,\n\tinset,\n\t...props\n}: MenuPrimitive.GroupLabel.Props & {\n\tinset?: boolean;\n}) {\n\tconst resolvedSize = useComponentSize();\n\n\treturn (\n\t\t<MenuPrimitive.GroupLabel\n\t\t\tdata-slot=\"dropdown-menu-label\"\n\t\t\tdata-inset={inset}\n\t\t\tclassName={cn(\n\t\t\t\tdropdownMenuLabelVariants({ size: resolvedSize }),\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuItem({\n\tclassName,\n\tinset,\n\tvariant = \"default\",\n\t...props\n}: MenuPrimitive.Item.Props & {\n\tinset?: boolean;\n\tvariant?: \"default\" | \"destructive\";\n}) {\n\tconst resolvedSize = useComponentSize();\n\n\treturn (\n\t\t<MenuPrimitive.Item\n\t\t\tdata-slot=\"dropdown-menu-item\"\n\t\t\tdata-inset={inset}\n\t\t\tdata-size={resolvedSize}\n\t\t\tdata-variant={variant}\n\t\t\tclassName={cn(\n\t\t\t\tdropdownMenuItemVariants({ size: resolvedSize }),\n\t\t\t\t\"data-inset:pl-8\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props) {\n\treturn <MenuPrimitive.SubmenuRoot data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n\tclassName,\n\tinset,\n\tchildren,\n\t...props\n}: MenuPrimitive.SubmenuTrigger.Props & {\n\tinset?: boolean;\n}) {\n\tconst resolvedSize = useComponentSize();\n\n\treturn (\n\t\t<MenuPrimitive.SubmenuTrigger\n\t\t\tdata-slot=\"dropdown-menu-sub-trigger\"\n\t\t\tdata-inset={inset}\n\t\t\tdata-size={resolvedSize}\n\t\t\tclassName={cn(\n\t\t\t\tdropdownMenuItemVariants({ size: resolvedSize }),\n\t\t\t\t\"data-inset:pl-8 data-open:bg-surface data-open:text-fg-primary data-popup-open:bg-surface data-popup-open:text-fg-primary\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<ChevronRightIcon className=\"cn-rtl-flip ml-auto\" />\n\t\t</MenuPrimitive.SubmenuTrigger>\n\t);\n}\n\nfunction DropdownMenuSubContent({\n\talign = \"start\",\n\talignOffset = -3,\n\tside = \"right\",\n\tsideOffset = 4,\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuContent>) {\n\treturn (\n\t\t<DropdownMenuContent\n\t\t\tdata-slot=\"dropdown-menu-sub-content\"\n\t\t\tclassName={cn(\n\t\t\t\t\"w-auto min-w-28 shadow-(--elevation-e2-shadow)\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\talign={align}\n\t\t\talignOffset={alignOffset}\n\t\t\tside={side}\n\t\t\tsideOffset={sideOffset}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuCheckboxItem({\n\tclassName,\n\tchildren,\n\tchecked,\n\tinset,\n\t...props\n}: MenuPrimitive.CheckboxItem.Props & {\n\tinset?: boolean;\n}) {\n\tconst resolvedSize = useComponentSize();\n\n\treturn (\n\t\t<MenuPrimitive.CheckboxItem\n\t\t\tdata-slot=\"dropdown-menu-checkbox-item\"\n\t\t\tdata-inset={inset}\n\t\t\tdata-size={resolvedSize}\n\t\t\tclassName={cn(\n\t\t\t\tdropdownMenuItemVariants({ size: resolvedSize }),\n\t\t\t\t\"pr-10 data-inset:pl-8\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tchecked={checked}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span\n\t\t\t\tclassName=\"pointer-events-none absolute right-3 flex items-center justify-center text-fg-brand\"\n\t\t\t\tdata-slot=\"dropdown-menu-checkbox-item-indicator\"\n\t\t\t>\n\t\t\t\t<MenuPrimitive.CheckboxItemIndicator>\n\t\t\t\t\t<CheckIcon />\n\t\t\t\t</MenuPrimitive.CheckboxItemIndicator>\n\t\t\t</span>\n\t\t\t{children}\n\t\t</MenuPrimitive.CheckboxItem>\n\t);\n}\n\nfunction DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props) {\n\treturn (\n\t\t<MenuPrimitive.RadioGroup\n\t\t\tdata-slot=\"dropdown-menu-radio-group\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuRadioItem({\n\tclassName,\n\tchildren,\n\tinset,\n\t...props\n}: MenuPrimitive.RadioItem.Props & {\n\tinset?: boolean;\n}) {\n\tconst resolvedSize = useComponentSize();\n\n\treturn (\n\t\t<MenuPrimitive.RadioItem\n\t\t\tdata-slot=\"dropdown-menu-radio-item\"\n\t\t\tdata-inset={inset}\n\t\t\tdata-size={resolvedSize}\n\t\t\tclassName={cn(\n\t\t\t\tdropdownMenuItemVariants({ size: resolvedSize }),\n\t\t\t\t\"pr-10 data-inset:pl-8\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span\n\t\t\t\tclassName=\"pointer-events-none absolute right-3 flex items-center justify-center text-fg-brand\"\n\t\t\t\tdata-slot=\"dropdown-menu-radio-item-indicator\"\n\t\t\t>\n\t\t\t\t<MenuPrimitive.RadioItemIndicator>\n\t\t\t\t\t<CheckIcon />\n\t\t\t\t</MenuPrimitive.RadioItemIndicator>\n\t\t\t</span>\n\t\t\t{children}\n\t\t</MenuPrimitive.RadioItem>\n\t);\n}\n\nfunction DropdownMenuSeparator({\n\tclassName,\n\t...props\n}: MenuPrimitive.Separator.Props) {\n\treturn (\n\t\t<MenuPrimitive.Separator\n\t\t\tdata-slot=\"dropdown-menu-separator\"\n\t\t\tclassName={cn(\"pointer-events-none my-1 h-px bg-line-subtle\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuShortcut({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"span\">) {\n\treturn (\n\t\t<span\n\t\t\tdata-slot=\"dropdown-menu-shortcut\"\n\t\t\tclassName={cn(\n\t\t\t\t\"ml-auto text-gdt-xs tracking-widest text-fg-secondary group-focus/dropdown-menu-item:text-fg-primary group-data-highlighted/dropdown-menu-item:text-fg-primary\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tDropdownMenu,\n\tDropdownMenuPortal,\n\tDropdownMenuTrigger,\n\tDropdownMenuContent,\n\tDropdownMenuGroup,\n\tDropdownMenuLabel,\n\tDropdownMenuItem,\n\tDropdownMenuCheckboxItem,\n\tDropdownMenuRadioGroup,\n\tDropdownMenuRadioItem,\n\tDropdownMenuSeparator,\n\tDropdownMenuShortcut,\n\tDropdownMenuSub,\n\tDropdownMenuSubTrigger,\n\tDropdownMenuSubContent,\n\ttype DropdownMenuSize,\n};\n","import { Input as InputPrimitive } from \"@base-ui/react/input\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../../lib/cn\";\nimport {\n\ttype InputComponentSize,\n\tuseInputComponentSize,\n} from \"./input-size-context\";\n\nconst inputVariants = cva(\n\t\"flex w-full min-w-0 rounded-full border border-line bg-canvas text-fg-primary transition-[background-color,border-color,box-shadow,color] outline-none file:inline-flex file:border-0 file:bg-transparent file:font-normal file:text-fg-primary placeholder:text-fg-muted hover:border-line-strong focus-visible:border-line-focus focus-visible:inset-ring-1 inset-ring-line-focus disabled:pointer-events-none disabled:cursor-not-allowed disabled:border-line-subtle disabled:bg-surface disabled:text-fg-muted disabled:placeholder:text-fg-muted aria-invalid:border-line-danger aria-invalid:text-fg-danger aria-invalid:placeholder:text-fg-danger aria-invalid:shadow-none\",\n\t{\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\tsm: \"h-8 px-3 text-gdt-xs font-normal file:text-gdt-xs\",\n\t\t\t\tmd: \"h-10 px-3.5 text-gdt-sm font-normal file:text-gdt-sm\",\n\t\t\t\tlg: \"h-12 px-4 text-gdt-md font-normal file:text-gdt-md\",\n\t\t\t\txl: \"h-14 px-4.5 text-gdt-lg font-normal file:text-gdt-lg\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tsize: \"md\",\n\t\t},\n\t},\n);\n\ntype InputProps = Omit<React.ComponentProps<\"input\">, \"size\"> &\n\tVariantProps<typeof inputVariants>;\n\ntype InputSize = InputComponentSize;\n\nfunction Input({ className, size, type, ...props }: InputProps) {\n\tconst resolvedSize = useInputComponentSize(size);\n\n\treturn (\n\t\t<InputPrimitive\n\t\t\ttype={type}\n\t\t\tdata-slot=\"input\"\n\t\t\tdata-size={resolvedSize}\n\t\t\tclassName={cn(inputVariants({ size: resolvedSize }), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Input, inputVariants, type InputSize };\n","\"use client\";\n\nimport { createContext, type ReactNode, useContext } from \"react\";\n\ntype InputComponentSize = \"sm\" | \"md\" | \"lg\" | \"xl\";\n\nconst InputSizeContext = createContext<InputComponentSize | undefined>(\n\tundefined,\n);\n\nfunction InputSizeProvider({\n\tchildren,\n\tsize,\n}: {\n\tchildren: ReactNode;\n\tsize?: InputComponentSize | null;\n}) {\n\tif (!size) {\n\t\treturn <>{children}</>;\n\t}\n\n\treturn (\n\t\t<InputSizeContext.Provider value={size}>\n\t\t\t{children}\n\t\t</InputSizeContext.Provider>\n\t);\n}\n\nfunction useInputComponentSize(\n\tsize?: InputComponentSize | null,\n\tfallback: InputComponentSize = \"md\",\n) {\n\tconst inheritedSize = useContext(InputSizeContext);\n\treturn size ?? inheritedSize ?? fallback;\n}\n\nexport { InputSizeProvider, useInputComponentSize, type InputComponentSize };\n","\"use client\";\n\nimport { Popover as PopoverPrimitive } from \"@base-ui/react/popover\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../../lib/cn\";\nimport { type ComponentSize, SizeProvider } from \"./size-context\";\n\nfunction Popover({ ...props }: PopoverPrimitive.Root.Props) {\n\treturn <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {\n\treturn <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\ntype PopoverContentProps = PopoverPrimitive.Popup.Props &\n\tPick<\n\t\tPopoverPrimitive.Positioner.Props,\n\t\t\"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n\t> & {\n\t\tshowArrow?: boolean;\n\t\tsize?: ComponentSize;\n\t};\n\nfunction PopoverContent({\n\tclassName,\n\talign = \"center\",\n\talignOffset = 0,\n\tside = \"bottom\",\n\tsideOffset = 6,\n\tshowArrow = true,\n\tsize = \"md\",\n\tchildren,\n\t...props\n}: PopoverContentProps) {\n\treturn (\n\t\t<PopoverPrimitive.Portal>\n\t\t\t<PopoverPrimitive.Positioner\n\t\t\t\talign={align}\n\t\t\t\talignOffset={alignOffset}\n\t\t\t\tside={side}\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\tclassName=\"isolate z-50\"\n\t\t\t>\n\t\t\t\t<PopoverPrimitive.Popup\n\t\t\t\t\tdata-slot=\"popover-content\"\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"z-50 relative flex w-72 max-w-[calc(100vw-2rem)] origin-(--transform-origin) flex-col rounded-lg border-0 bg-surface-overlay py-4 text-gdt-sm text-fg-primary shadow-2 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 has-[&_[data-slot=popover-footer]]:pb-0\",\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t<SizeProvider size={size}>{children}</SizeProvider>\n\t\t\t\t\t{showArrow ? (\n\t\t\t\t\t\t<PopoverPrimitive.Arrow className=\"relative block w-3 h-1.5 overflow-clip data-[side=bottom]:top-[-6px] data-[side=left]:right-[-9px] data-[side=left]:rotate-90 data-[side=right]:left-[-9px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-6px] data-[side=top]:rotate-180 before:content-[''] before:absolute before:bottom-0 before:left-1/2 before:w-[calc(6px*sqrt(2))] before:h-[calc(6px*sqrt(2))] before:bg-surface-overlay before:border before:border-line before:[transform:translate(-50%,50%)_rotate(45deg)]\" />\n\t\t\t\t\t) : null}\n\t\t\t\t</PopoverPrimitive.Popup>\n\t\t\t</PopoverPrimitive.Positioner>\n\t\t</PopoverPrimitive.Portal>\n\t);\n}\n\nfunction PopoverHeader({\n\tclassName,\n\tborder,\n\t...props\n}: React.ComponentProps<\"div\"> & { border?: boolean }) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"popover-header\"\n\t\t\tclassName={cn(\n\t\t\t\t\"flex flex-col gap-0.5 px-4\",\n\t\t\t\tborder && \"border-b border-line-subtle pb-3\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction PopoverBody({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"popover-body\"\n\t\t\tclassName={cn(\"px-4 py-2\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction PopoverFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"popover-footer\"\n\t\t\tclassName={cn(\n\t\t\t\t\"flex flex-row items-center gap-2 px-4 border-t border-line-subtle pt-3\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {\n\treturn (\n\t\t<PopoverPrimitive.Title\n\t\t\tdata-slot=\"popover-title\"\n\t\t\tclassName={cn(\"text-gdt-sm font-semibold text-fg-primary\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction PopoverDescription({\n\tclassName,\n\t...props\n}: PopoverPrimitive.Description.Props) {\n\treturn (\n\t\t<PopoverPrimitive.Description\n\t\t\tdata-slot=\"popover-description\"\n\t\t\tclassName={cn(\"text-gdt-xs font-normal text-fg-secondary\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tPopover,\n\tPopoverContent,\n\tPopoverDescription,\n\tPopoverHeader,\n\tPopoverTitle,\n\tPopoverTrigger,\n\tPopoverBody,\n\tPopoverFooter,\n};\n"],"mappings":";AAEA,SAAS,aAAa;AACtB,SAAS,aAAa;AACtB,SAAS,mBAAmB;AAC5B,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAC1B,SAAS,eAAe,WAAW,sBAAsB;AACzD,SAAS,kBAAkB;AAC3B;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,YAAY,WAAW;;;AC5BvB,SAA0B,YAAY;AACtC,SAAS,2BAA2B;AAEpC,IAAM,UAAU,oBAAoB;AA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AAA;AAAA,kBACA;AAAA,kBACA,OAAM;AAAA,kBACN;AAAA,kBACA,SAAS;AAAA,kBAET,0BAAAA,KAAC,aAAU;AAAA;AAAA,cACZ;AAAA,cAEA,gBAAAA,KAAC,kBAAe,QAAgB;AAAA,cAEhC,gBAAAA;AAAA,gBAAC;AAAA;AAAA,kBACA;AAAA,kBACA,OAAM;AAAA,kBACN,UAAU,YAAY,CAAC,EAAE;AAAA,kBACzB,SAAS,MAAM,QAAQ,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI;AAAA,kBAElD,0BAAAA,KAAC,SAAM;AAAA;AAAA,cACR;AAAA,cACA,gBAAAA;AAAA,gBAAC;AAAA;AAAA,kBACA;AAAA,kBACA,OAAM;AAAA,kBACN,UAAU,YAAY,CAAC,EAAE;AAAA,kBACzB,SAAS,MAAM,QAAQ,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI;AAAA,kBAElD,0BAAAA,KAAC,SAAM;AAAA;AAAA,cACR;AAAA;AAAA;AAAA,QACD;AAAA,QAGA,gBAAAA,KAAC,SAAI,WAAU,uCAAsC;AAAA,QAGrD,gBAAAA;AAAA,UAAC;AAAA;AAAA,YACA;AAAA,YACA,WAAW;AAAA,cACV;AAAA,cACA,OAAO;AAAA,cACP,OAAO;AAAA,YACR;AAAA;AAAA,QACD;AAAA;AAAA;AAAA,EACD;AAEF;","names":["jsx","cva","jsx","jsxs","jsx","cva","jsx","jsxs","cva","createContext","useContext","Fragment","jsx","useContext","jsx","cva","jsx","jsxs","jsx","jsxs"]}
@@ -0,0 +1,19 @@
1
+ import * as React from 'react';
2
+ import { InputGroupInput } from './input-group.js';
3
+ import 'class-variance-authority/types';
4
+ import 'class-variance-authority';
5
+ import './button.js';
6
+ import '@base-ui/react/button';
7
+ import './input.js';
8
+ import './input-size-context.js';
9
+ import './textarea.js';
10
+
11
+ type SearchInputVariant = "dashboard" | "app";
12
+ type SearchInputProps = React.ComponentProps<typeof InputGroupInput> & {
13
+ wrapperClassName?: string;
14
+ onClear?: () => void;
15
+ variant?: SearchInputVariant;
16
+ };
17
+ declare const SearchInput: React.ForwardRefExoticComponent<Omit<SearchInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
18
+
19
+ export { SearchInput };
@@ -0,0 +1,411 @@
1
+ // src/components/ui/search-input.tsx
2
+ import { Search, X } from "lucide-react";
3
+ import * as React from "react";
4
+
5
+ // src/lib/cn.ts
6
+ import { clsx } from "clsx";
7
+ import { extendTailwindMerge } from "tailwind-merge";
8
+ var twMerge = extendTailwindMerge({
9
+ extend: {
10
+ classGroups: {
11
+ "font-size": [
12
+ {
13
+ text: [
14
+ "gdt-display",
15
+ "gdt-h1",
16
+ "gdt-h2",
17
+ "gdt-h3",
18
+ "gdt-h4",
19
+ "gdt-h5",
20
+ "gdt-xl",
21
+ "gdt-lg",
22
+ "gdt-md",
23
+ "gdt-sm",
24
+ "gdt-xs",
25
+ "gdt-subtext",
26
+ "gdt-capitalized"
27
+ ]
28
+ }
29
+ ]
30
+ }
31
+ }
32
+ });
33
+ function cn(...inputs) {
34
+ return twMerge(clsx(inputs));
35
+ }
36
+
37
+ // src/components/ui/input-group.tsx
38
+ import { cva as cva3 } from "class-variance-authority";
39
+
40
+ // src/components/ui/button.tsx
41
+ import { Button as ButtonPrimitive } from "@base-ui/react/button";
42
+ import { cva } from "class-variance-authority";
43
+ import { Loader } from "lucide-react";
44
+
45
+ // src/components/ui/size-context.tsx
46
+ import { createContext, useContext } from "react";
47
+ import { Fragment, jsx } from "react/jsx-runtime";
48
+ var SizeContext = createContext(void 0);
49
+ function SizeProvider({
50
+ children,
51
+ size
52
+ }) {
53
+ if (!size) {
54
+ return /* @__PURE__ */ jsx(Fragment, { children });
55
+ }
56
+ return /* @__PURE__ */ jsx(SizeContext.Provider, { value: size, children });
57
+ }
58
+ function useComponentSize(size, fallback = "md") {
59
+ const inheritedSize = useContext(SizeContext);
60
+ return size ?? inheritedSize ?? fallback;
61
+ }
62
+
63
+ // src/components/ui/button.tsx
64
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
65
+ var buttonVariants = cva(
66
+ "group/button inline-flex shrink-0 items-center justify-center rounded-full bg-clip-padding whitespace-nowrap font-bold transition-[background-color,color,border-color,box-shadow,transform] outline-none select-none focus-visible:border-line-focus focus-visible:shadow-[0px_0px_0px_2px_var(--color-line-focus)] active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-invalid:border-line-danger aria-invalid:ring-3 aria-invalid:ring-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
67
+ {
68
+ variants: {
69
+ variant: {
70
+ primary: "bg-action-primary text-fg-on-brand hover:bg-action-primary-hover active:bg-action-primary-pressed",
71
+ "primary-outline": "border-2 border-action-primary bg-transparent text-fg-brand hover:bg-surface-brand-subtle active:bg-surface-brand-subtle data-focused:bg-surface-brand-subtle data-pressed:bg-surface-brand-subtle",
72
+ secondary: "bg-surface-brand-subtle text-fg-brand hover:bg-action-primary-hover hover:text-fg-on-brand active:bg-action-primary-pressed active:text-fg-on-brand data-focused:bg-action-primary-hover data-pressed:bg-action-primary-pressed data-focused:text-fg-on-brand data-pressed:text-fg-on-brand",
73
+ "secondary-outline": "border-2 border-action-secondary bg-transparent text-fg-brand hover:bg-surface-brand-subtle active:bg-surface-brand-subtle data-focused:bg-surface-brand-subtle data-pressed:bg-surface-brand-subtle",
74
+ tertiary: "bg-action-tertiary text-fg-primary hover:bg-action-tertiary-hover active:bg-action-tertiary-pressed data-focused:bg-action-tertiary-hover data-pressed:bg-action-tertiary-pressed",
75
+ "tertiary-outline": "border border-line-strong bg-transparent text-fg-primary hover:bg-surface active:bg-surface-raised data-focused:bg-surface data-pressed:bg-surface-raised",
76
+ ghost: "bg-transparent text-fg-primary hover:bg-surface active:bg-surface-raised data-focused:bg-surface data-pressed:bg-surface-raised",
77
+ danger: "bg-action-danger text-fg-on-brand hover:bg-action-danger-hover active:bg-action-danger-pressed data-focused:bg-action-danger-hover data-pressed:bg-action-danger-pressed",
78
+ "glass-overlay": "bg-surface-glass-overlay-button text-fg-on-brand",
79
+ "link-brand": "border-transparent bg-transparent px-0 text-fg-brand hover:underline active:underline active:opacity-70",
80
+ "link-neutral": "border-transparent bg-transparent px-0 text-fg-secondary hover:underline active:underline active:opacity-70"
81
+ },
82
+ size: {
83
+ sm: "h-8 gap-2 px-3.5 text-gdt-xs has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3 [&_svg:not([class*='size-'])]:size-3.5",
84
+ md: "h-10 gap-2 px-4.5 text-gdt-sm has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4",
85
+ lg: "h-12.5 gap-2.5 px-5.5 text-gdt-md has-data-[icon=inline-end]:pr-5 has-data-[icon=inline-start]:pl-5 [&_svg:not([class*='size-'])]:size-4.5",
86
+ xl: "h-14 gap-3 px-6.5 text-gdt-lg has-data-[icon=inline-end]:pr-6 has-data-[icon=inline-start]:pl-6 [&_svg:not([class*='size-'])]:size-5",
87
+ icon: "size-10",
88
+ "icon-xs": "size-6 text-gdt-xs [&_svg:not([class*='size-'])]:size-3",
89
+ "icon-sm": "size-8 text-gdt-sm [&_svg:not([class*='size-'])]:size-3.5",
90
+ "icon-lg": "size-12.5 text-gdt-md [&_svg:not([class*='size-'])]:size-4.5",
91
+ "icon-xl": "size-14 text-gdt-lg [&_svg:not([class*='size-'])]:size-5"
92
+ }
93
+ },
94
+ defaultVariants: {
95
+ variant: "primary",
96
+ size: "md"
97
+ }
98
+ }
99
+ );
100
+ function Button({
101
+ className,
102
+ variant = "primary",
103
+ size,
104
+ isLoading = false,
105
+ children,
106
+ disabled = false,
107
+ ...props
108
+ }) {
109
+ const inheritedSize = useComponentSize();
110
+ const resolvedSize = size ?? inheritedSize;
111
+ const _disabled = disabled || isLoading;
112
+ return /* @__PURE__ */ jsxs(
113
+ ButtonPrimitive,
114
+ {
115
+ "data-slot": "button",
116
+ className: cn(buttonVariants({ variant, size: resolvedSize, className })),
117
+ disabled: _disabled,
118
+ ...props,
119
+ children: [
120
+ isLoading && /* @__PURE__ */ jsx2(Loader, { className: "size-4 animate-spin" }),
121
+ " ",
122
+ children
123
+ ]
124
+ }
125
+ );
126
+ }
127
+
128
+ // src/components/ui/input.tsx
129
+ import { Input as InputPrimitive } from "@base-ui/react/input";
130
+ import { cva as cva2 } from "class-variance-authority";
131
+
132
+ // src/components/ui/input-size-context.tsx
133
+ import { createContext as createContext2, useContext as useContext2 } from "react";
134
+ import { Fragment as Fragment2, jsx as jsx3 } from "react/jsx-runtime";
135
+ var InputSizeContext = createContext2(
136
+ void 0
137
+ );
138
+ function InputSizeProvider({
139
+ children,
140
+ size
141
+ }) {
142
+ if (!size) {
143
+ return /* @__PURE__ */ jsx3(Fragment2, { children });
144
+ }
145
+ return /* @__PURE__ */ jsx3(InputSizeContext.Provider, { value: size, children });
146
+ }
147
+ function useInputComponentSize(size, fallback = "md") {
148
+ const inheritedSize = useContext2(InputSizeContext);
149
+ return size ?? inheritedSize ?? fallback;
150
+ }
151
+
152
+ // src/components/ui/input.tsx
153
+ import { jsx as jsx4 } from "react/jsx-runtime";
154
+ var inputVariants = cva2(
155
+ "flex w-full min-w-0 rounded-full border border-line bg-canvas text-fg-primary transition-[background-color,border-color,box-shadow,color] outline-none file:inline-flex file:border-0 file:bg-transparent file:font-normal file:text-fg-primary placeholder:text-fg-muted hover:border-line-strong focus-visible:border-line-focus focus-visible:inset-ring-1 inset-ring-line-focus disabled:pointer-events-none disabled:cursor-not-allowed disabled:border-line-subtle disabled:bg-surface disabled:text-fg-muted disabled:placeholder:text-fg-muted aria-invalid:border-line-danger aria-invalid:text-fg-danger aria-invalid:placeholder:text-fg-danger aria-invalid:shadow-none",
156
+ {
157
+ variants: {
158
+ size: {
159
+ sm: "h-8 px-3 text-gdt-xs font-normal file:text-gdt-xs",
160
+ md: "h-10 px-3.5 text-gdt-sm font-normal file:text-gdt-sm",
161
+ lg: "h-12 px-4 text-gdt-md font-normal file:text-gdt-md",
162
+ xl: "h-14 px-4.5 text-gdt-lg font-normal file:text-gdt-lg"
163
+ }
164
+ },
165
+ defaultVariants: {
166
+ size: "md"
167
+ }
168
+ }
169
+ );
170
+ function Input({ className, size, type, ...props }) {
171
+ const resolvedSize = useInputComponentSize(size);
172
+ return /* @__PURE__ */ jsx4(
173
+ InputPrimitive,
174
+ {
175
+ type,
176
+ "data-slot": "input",
177
+ "data-size": resolvedSize,
178
+ className: cn(inputVariants({ size: resolvedSize }), className),
179
+ ...props
180
+ }
181
+ );
182
+ }
183
+
184
+ // src/components/ui/input-group.tsx
185
+ import { jsx as jsx5 } from "react/jsx-runtime";
186
+ var inputGroupVariants = cva3(
187
+ "group/input-group relative flex w-full min-w-0 items-center rounded-full has-[textarea]:rounded-xl has-data-[align=block-end]:rounded-xl has-data-[align=block-start]:rounded-xl border border-line bg-canvas transition-[background-color,border-color,box-shadow,color] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:border-line-subtle has-disabled:bg-surface has-disabled:text-fg-muted focus-within:border-line-focus focus-within:inset-ring-1 inset-ring-line-focus has-[[data-slot][aria-invalid=true]]:border-line-danger has-[[data-slot][aria-invalid=true]]:inset-shadow-none has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:group-data-[size=sm]/input-group:pl-2 has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:group-data-[size=md]/input-group:pl-2.5 has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:group-data-[size=lg]/input-group:pl-3 has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:group-data-[size=xl]/input-group:pl-3 has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:group-data-[size=sm]/input-group:pr-2 has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:group-data-[size=md]/input-group:pr-2.5 has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:group-data-[size=lg]/input-group:pr-3 has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:group-data-[size=xl]/input-group:pr-3",
188
+ {
189
+ variants: {
190
+ size: {
191
+ sm: "h-8",
192
+ md: "h-10",
193
+ lg: "h-12",
194
+ xl: "h-14"
195
+ }
196
+ },
197
+ defaultVariants: {
198
+ size: "md"
199
+ }
200
+ }
201
+ );
202
+ function InputGroup({
203
+ className,
204
+ size,
205
+ ...props
206
+ }) {
207
+ const inheritedSize = useComponentSize();
208
+ const resolvedSize = size ?? inheritedSize;
209
+ const componentSize = resolvedSize === "xl" ? void 0 : resolvedSize;
210
+ return /* @__PURE__ */ jsx5(SizeProvider, { size: componentSize, children: /* @__PURE__ */ jsx5(InputSizeProvider, { size: resolvedSize, children: /* @__PURE__ */ jsx5(
211
+ "div",
212
+ {
213
+ "data-slot": "input-group",
214
+ "data-size": resolvedSize,
215
+ role: "group",
216
+ className: cn(inputGroupVariants({ size: resolvedSize }), className),
217
+ ...props
218
+ }
219
+ ) }) });
220
+ }
221
+ var inputGroupAddonVariants = cva3(
222
+ "flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-gdt-sm font-normal text-fg-secondary select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[size=lg]/input-group:[&>svg:not([class*='size-'])]:size-4.5 group-data-[size=xl]/input-group:[&>svg:not([class*='size-'])]:size-5 [&>svg:not([class*='size-'])]:size-4",
223
+ {
224
+ variants: {
225
+ align: {
226
+ "inline-start": "order-first group-data-[size=sm]/input-group:pl-3 group-data-[size=md]/input-group:pl-3.5 group-data-[size=lg]/input-group:pl-4 group-data-[size=xl]/input-group:pl-4.5 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
227
+ "inline-end": "order-last group-data-[size=sm]/input-group:pr-3 group-data-[size=md]/input-group:pr-3.5 group-data-[size=lg]/input-group:pr-4 group-data-[size=xl]/input-group:pr-4.5 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
228
+ "block-start": "order-first w-full justify-start px-3 group-data-[size=md]/input-group:px-3.5 group-data-[size=lg]/input-group:px-4 group-data-[size=xl]/input-group:px-4.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
229
+ "block-end": "order-last w-full justify-start px-3 group-data-[size=md]/input-group:px-3.5 group-data-[size=lg]/input-group:px-4 group-data-[size=xl]/input-group:px-4.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
230
+ }
231
+ },
232
+ defaultVariants: {
233
+ align: "inline-start"
234
+ }
235
+ }
236
+ );
237
+ function InputGroupAddon({
238
+ className,
239
+ align = "inline-start",
240
+ ...props
241
+ }) {
242
+ return (
243
+ // biome-ignore lint/a11y/useSemanticElements: addon is a structural wrapper for grouped input affordances.
244
+ // biome-ignore lint/a11y/useKeyWithClickEvents: click only forwards focus to the sibling input and is not a standalone action target.
245
+ /* @__PURE__ */ jsx5(
246
+ "div",
247
+ {
248
+ role: "group",
249
+ "data-slot": "input-group-addon",
250
+ "data-align": align,
251
+ className: cn(inputGroupAddonVariants({ align }), className),
252
+ onClick: (e) => {
253
+ if (e.target.closest("button")) {
254
+ return;
255
+ }
256
+ e.currentTarget.parentElement?.querySelector("input")?.focus();
257
+ },
258
+ ...props
259
+ }
260
+ )
261
+ );
262
+ }
263
+ var inputGroupButtonVariants = cva3(
264
+ "flex items-center gap-2 text-sm shadow-none rounded-full",
265
+ {
266
+ variants: {
267
+ size: {
268
+ xs: "h-6 gap-1 px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
269
+ sm: "",
270
+ "icon-xs": "size-6 p-0 has-[>svg]:p-0",
271
+ "icon-sm": "size-8 p-0 has-[>svg]:p-0"
272
+ }
273
+ },
274
+ defaultVariants: {
275
+ size: "xs"
276
+ }
277
+ }
278
+ );
279
+ function InputGroupButton({
280
+ className,
281
+ type = "button",
282
+ variant = "ghost",
283
+ size = "xs",
284
+ ...props
285
+ }) {
286
+ return /* @__PURE__ */ jsx5(
287
+ Button,
288
+ {
289
+ type,
290
+ "data-size": size,
291
+ variant,
292
+ className: cn(inputGroupButtonVariants({ size }), className),
293
+ ...props
294
+ }
295
+ );
296
+ }
297
+ function InputGroupInput({
298
+ className,
299
+ size,
300
+ ...props
301
+ }) {
302
+ return /* @__PURE__ */ jsx5(
303
+ Input,
304
+ {
305
+ "data-slot": "input-group-control",
306
+ size,
307
+ className: cn(
308
+ "flex-1 rounded-none border-0 bg-transparent shadow-none inset-shadow-none inset-ring-0 focus:border-transparent focus:shadow-none focus:inset-shadow-none focus-visible:border-transparent focus-visible:shadow-none focus-visible:ring-0 focus-visible:inset-ring-0 focus-visible:inset-shadow-none disabled:bg-transparent aria-invalid:ring-0 aria-invalid:inset-ring-0 dark:bg-transparent dark:disabled:bg-transparent",
309
+ className
310
+ ),
311
+ ...props
312
+ }
313
+ );
314
+ }
315
+
316
+ // src/components/ui/search-input.tsx
317
+ import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
318
+ function hasValue(value) {
319
+ if (Array.isArray(value)) {
320
+ return value.length > 0;
321
+ }
322
+ return value !== void 0 && value !== null && String(value).length > 0;
323
+ }
324
+ var SearchInput = React.forwardRef(
325
+ function SearchInput2({
326
+ className,
327
+ size,
328
+ value,
329
+ defaultValue,
330
+ wrapperClassName,
331
+ onChange,
332
+ onClear,
333
+ disabled,
334
+ readOnly,
335
+ variant = "dashboard",
336
+ ...props
337
+ }, ref) {
338
+ const inputRef = React.useRef(null);
339
+ const [hasUncontrolledValue, setHasUncontrolledValue] = React.useState(
340
+ () => hasValue(defaultValue)
341
+ );
342
+ const isControlled = value !== void 0;
343
+ const showClearButton = isControlled ? hasValue(value) : hasUncontrolledValue;
344
+ React.useImperativeHandle(ref, () => inputRef.current);
345
+ function handleChange(event) {
346
+ if (!isControlled) {
347
+ setHasUncontrolledValue(hasValue(event.currentTarget.value));
348
+ }
349
+ onChange?.(event);
350
+ }
351
+ function handleClear() {
352
+ const input = inputRef.current;
353
+ if (!input) {
354
+ return;
355
+ }
356
+ const valueSetter = Object.getOwnPropertyDescriptor(
357
+ window.HTMLInputElement.prototype,
358
+ "value"
359
+ )?.set;
360
+ if (valueSetter) {
361
+ valueSetter.call(input, "");
362
+ } else {
363
+ input.value = "";
364
+ }
365
+ setHasUncontrolledValue(false);
366
+ input.dispatchEvent(new Event("input", { bubbles: true }));
367
+ input.focus();
368
+ onClear?.();
369
+ }
370
+ return /* @__PURE__ */ jsxs2(
371
+ InputGroup,
372
+ {
373
+ size,
374
+ className: cn(
375
+ variant === "app" && "shadow-4 focus-within:shadow-none",
376
+ wrapperClassName
377
+ ),
378
+ children: [
379
+ /* @__PURE__ */ jsx6(
380
+ InputGroupInput,
381
+ {
382
+ ref: inputRef,
383
+ size,
384
+ value,
385
+ defaultValue,
386
+ className,
387
+ ...props,
388
+ disabled,
389
+ readOnly,
390
+ onChange: handleChange
391
+ }
392
+ ),
393
+ /* @__PURE__ */ jsx6(InputGroupAddon, { children: /* @__PURE__ */ jsx6(Search, {}) }),
394
+ showClearButton ? /* @__PURE__ */ jsx6(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsx6(
395
+ InputGroupButton,
396
+ {
397
+ "aria-label": "Clear search",
398
+ disabled: disabled || readOnly,
399
+ onClick: handleClear,
400
+ children: /* @__PURE__ */ jsx6(X, { className: "size-3" })
401
+ }
402
+ ) }) : null
403
+ ]
404
+ }
405
+ );
406
+ }
407
+ );
408
+ export {
409
+ SearchInput
410
+ };
411
+ //# sourceMappingURL=search-input.js.map