@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/combobox.tsx","../src/lib/cn.ts","../src/components/ui/button.tsx","../src/components/ui/size-context.tsx","../src/components/ui/input-group.tsx","../src/components/ui/input.tsx","../src/components/ui/input-size-context.tsx"],"sourcesContent":["\"use client\";\n\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react\";\nimport { cva } from \"class-variance-authority\";\nimport { CheckIcon, ChevronDownIcon, XIcon } from \"lucide-react\";\nimport * as React from \"react\";\nimport { cn } from \"../../lib/cn\";\nimport { Button } from \"./button\";\nimport {\n\tInputGroup,\n\tInputGroupAddon,\n\tInputGroupButton,\n\tInputGroupInput,\n} from \"./input-group\";\nimport {\n\ttype ComponentSize,\n\tSizeProvider,\n\tuseComponentSize,\n} from \"./size-context\";\n\nconst ComboboxSelectionContext = React.createContext({ multiple: false });\n\ntype ComboboxSize = ComponentSize;\n\nfunction Combobox<Value, Multiple extends boolean | undefined = false>({\n\tmultiple,\n\tchildren,\n\tsize,\n\t...props\n}: ComboboxPrimitive.Root.Props<Value, Multiple> & {\n\tsize?: ComboboxSize;\n}) {\n\treturn (\n\t\t<SizeProvider size={size}>\n\t\t\t<ComboboxSelectionContext.Provider\n\t\t\t\tvalue={{ multiple: multiple === true }}\n\t\t\t>\n\t\t\t\t<ComboboxPrimitive.Root multiple={multiple} {...props}>\n\t\t\t\t\t{children}\n\t\t\t\t</ComboboxPrimitive.Root>\n\t\t\t</ComboboxSelectionContext.Provider>\n\t\t</SizeProvider>\n\t);\n}\n\nconst comboboxTriggerVariants = cva(\n\t\"group/combobox-trigger flex w-fit min-w-0 items-center justify-between rounded-full border border-line bg-canvas text-left font-normal whitespace-nowrap text-fg-primary shadow-none outline-none transition-[background-color,border-color,border-radius,box-shadow,color] select-none hover:border-line-strong focus-visible:border-line-focus focus-visible:inset-ring-1 focus-visible:inset-ring-line-focus data-focused:border-line-focus data-focused:inset-ring-1 data-focused:inset-ring-line-focus data-popup-open:rounded-2xl data-popup-open:border-line-focus data-popup-open:inset-ring-1 data-popup-open:inset-ring-line-focus disabled:pointer-events-none disabled:cursor-not-allowed disabled:border-line-subtle disabled:bg-surface disabled:text-fg-caption-placeholder data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:border-line-subtle data-disabled:bg-surface data-disabled:text-fg-caption-placeholder data-placeholder:text-fg-caption-placeholder aria-invalid:border-line-danger aria-invalid:text-fg-danger aria-invalid:shadow-none data-[invalid=true]:border-line-danger data-[invalid=true]:text-fg-danger *:data-[slot=combobox-value]:line-clamp-1 *:data-[slot=combobox-value]:flex *:data-[slot=combobox-value]:min-w-0 *:data-[slot=combobox-value]:items-center *:data-[slot=combobox-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n\t{\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\tsm: \"h-8 gap-2 px-3 text-gdt-xs [&_svg:not([class*='size-'])]:size-3.5\",\n\t\t\t\tmd: \"h-10 gap-2 px-3.5 text-gdt-sm [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tlg: \"h-12 gap-2.5 px-4 pr-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 comboboxInputVariants = cva(\n\t\"w-auto has-data-popup-open:rounded-2xl has-data-popup-open:border-line-focus has-data-popup-open:inset-ring-1 has-data-popup-open:inset-ring-line-focus\",\n\t{\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\tsm: \"\",\n\t\t\t\tmd: \"\",\n\t\t\t\tlg: \"\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tsize: \"md\",\n\t\t},\n\t},\n);\n\nconst comboboxContentVariants = cva(\n\t\"relative isolate z-50 max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width))] origin-(--transform-origin) overflow-hidden border border-line-subtle bg-canvas text-fg-primary shadow-(--elevation-e1-shadow) duration-100 data-[chips=true]:min-w-(--anchor-width) 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-[slot=input-group]:mb-1 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\",\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 comboboxItemVariants = cva(\n\t\"group/combobox-item relative flex w-full cursor-pointer items-center font-normal text-fg-primary outline-none select-none data-highlighted:bg-surface data-disabled:pointer-events-none data-disabled:text-fg-caption-placeholder [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\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\",\n\t\t\t\tmd: \"gap-2 rounded-md px-4 py-2 text-gdt-sm\",\n\t\t\t\tlg: \"gap-2.5 rounded-md px-4 py-2.5 text-gdt-md\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tsize: \"md\",\n\t\t},\n\t},\n);\n\nconst comboboxChipsVariants = cva(\n\t\"flex flex-wrap items-center gap-1 rounded-full border border-line bg-canvas bg-clip-padding text-fg-primary transition-[background-color,border-color,box-shadow,color] focus-within:border-line-focus focus-within:inset-ring-1 focus-within:inset-ring-line-focus has-aria-invalid:border-line-danger has-aria-invalid:text-fg-danger has-aria-invalid:shadow-none has-data-[slot=combobox-chip]:px-1 has-data-popup-open:rounded-2xl has-data-popup-open:border-line-focus has-data-popup-open:inset-ring-1 has-data-popup-open:inset-ring-line-focus\",\n\t{\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\tsm: \"min-h-8 px-2.5 py-1 text-gdt-xs\",\n\t\t\t\tmd: \"min-h-10 px-3 py-1.5 text-gdt-sm\",\n\t\t\t\tlg: \"min-h-12 px-4 py-2 text-gdt-md\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tsize: \"md\",\n\t\t},\n\t},\n);\n\nconst comboboxChipVariants = cva(\n\t\"flex w-fit items-center justify-center gap-1 rounded-sm bg-surface font-medium whitespace-nowrap text-fg-primary has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0\",\n\t{\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\tsm: \"h-5 px-1.5 text-gdt-xs\",\n\t\t\t\tmd: \"h-[calc(--spacing(5.25))] px-1.5 text-gdt-xs\",\n\t\t\t\tlg: \"h-6 px-2 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 ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {\n\treturn <ComboboxPrimitive.Value data-slot=\"combobox-value\" {...props} />;\n}\n\nfunction ComboboxTrigger({\n\tclassName,\n\tchildren,\n\t...props\n}: ComboboxPrimitive.Trigger.Props) {\n\tconst resolvedSize = useComponentSize();\n\n\treturn (\n\t\t<ComboboxPrimitive.Trigger\n\t\t\tdata-slot=\"combobox-trigger\"\n\t\t\tdata-size={resolvedSize}\n\t\t\tclassName={cn(comboboxTriggerVariants({ size: resolvedSize }), className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<ComboboxPrimitive.Icon\n\t\t\t\trender={\n\t\t\t\t\t<ChevronDownIcon className=\"text-line-strong transition-transform group-data-disabled/combobox-trigger:text-fg-caption-placeholder group-data-popup-open/combobox-trigger:rotate-180\" />\n\t\t\t\t}\n\t\t\t/>\n\t\t</ComboboxPrimitive.Trigger>\n\t);\n}\n\nfunction ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props) {\n\treturn (\n\t\t<ComboboxPrimitive.Clear\n\t\t\tdata-slot=\"combobox-clear\"\n\t\t\tclassName={cn(className)}\n\t\t\t{...props}\n\t\t\trender={\n\t\t\t\t<InputGroupButton variant=\"ghost\" size=\"icon-xs\">\n\t\t\t\t\t<XIcon className=\"pointer-events-none\" />\n\t\t\t\t</InputGroupButton>\n\t\t\t}\n\t\t/>\n\t);\n}\n\nfunction ComboboxInput({\n\tclassName,\n\tchildren,\n\tdisabled = false,\n\tshowTrigger = true,\n\tshowClear = false,\n\t...props\n}: ComboboxPrimitive.Input.Props & {\n\tshowTrigger?: boolean;\n\tshowClear?: boolean;\n}) {\n\tconst resolvedSize = useComponentSize();\n\n\treturn (\n\t\t<InputGroup\n\t\t\tclassName={cn(comboboxInputVariants({ size: resolvedSize }), className)}\n\t\t>\n\t\t\t<ComboboxPrimitive.Input\n\t\t\t\trender={<InputGroupInput disabled={disabled} />}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t\t<InputGroupAddon align=\"inline-end\">\n\t\t\t\t{showTrigger && (\n\t\t\t\t\t<InputGroupButton\n\t\t\t\t\t\tsize=\"icon-xs\"\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\trender={<ComboboxTrigger />}\n\t\t\t\t\t\tdata-slot=\"input-group-button\"\n\t\t\t\t\t\tclassName=\"h-6 border-0 bg-transparent p-0 shadow-none inset-ring-0 group-has-data-[slot=combobox-clear]/input-group:hidden hover:border-transparent focus-visible:border-transparent focus-visible:inset-ring-0 data-popup-open:border-transparent data-popup-open:bg-transparent data-popup-open:inset-ring-0 data-pressed:bg-transparent\"\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t{showClear && <ComboboxClear disabled={disabled} />}\n\t\t\t</InputGroupAddon>\n\t\t\t{children}\n\t\t</InputGroup>\n\t);\n}\n\nfunction ComboboxContent({\n\tclassName,\n\tside = \"bottom\",\n\tsideOffset = 6,\n\talign = \"start\",\n\talignOffset = 0,\n\tanchor,\n\t...props\n}: ComboboxPrimitive.Popup.Props &\n\tPick<\n\t\tComboboxPrimitive.Positioner.Props,\n\t\t\"side\" | \"align\" | \"sideOffset\" | \"alignOffset\" | \"anchor\"\n\t>) {\n\tconst resolvedSize = useComponentSize();\n\n\treturn (\n\t\t<ComboboxPrimitive.Portal>\n\t\t\t<ComboboxPrimitive.Positioner\n\t\t\t\tside={side}\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\talign={align}\n\t\t\t\talignOffset={alignOffset}\n\t\t\t\tanchor={anchor}\n\t\t\t\tclassName=\"isolate z-50\"\n\t\t\t>\n\t\t\t\t<ComboboxPrimitive.Popup\n\t\t\t\t\tdata-slot=\"combobox-content\"\n\t\t\t\t\tdata-chips={!!anchor}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"group/combobox-content\",\n\t\t\t\t\t\tcomboboxContentVariants({ 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</ComboboxPrimitive.Positioner>\n\t\t</ComboboxPrimitive.Portal>\n\t);\n}\n\nfunction ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {\n\treturn (\n\t\t<ComboboxPrimitive.List\n\t\t\tdata-slot=\"combobox-list\"\n\t\t\tclassName={cn(\n\t\t\t\t\"no-scrollbar max-h-(--available-height) space-y-0.5 scroll-py-1 overflow-y-auto overscroll-contain data-empty:p-0\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction ComboboxItem({\n\tclassName,\n\tchildren,\n\t...props\n}: ComboboxPrimitive.Item.Props) {\n\tconst { multiple } = React.useContext(ComboboxSelectionContext);\n\tconst resolvedSize = useComponentSize();\n\n\treturn (\n\t\t<ComboboxPrimitive.Item\n\t\t\tdata-slot=\"combobox-item\"\n\t\t\tclassName={cn(\n\t\t\t\tcomboboxItemVariants({ size: resolvedSize }),\n\t\t\t\t!multiple &&\n\t\t\t\t\t\"data-selected:bg-surface-brand-subtle data-selected:font-medium data-selected:text-fg-brand\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{multiple ? (\n\t\t\t\t<ComboboxPrimitive.ItemIndicator\n\t\t\t\t\tkeepMounted\n\t\t\t\t\tclassName=\"flex size-5 shrink-0 items-center justify-center rounded-sm border border-line bg-canvas text-transparent transition-[background-color,border-color,color] group-data-selected/combobox-item:border-action-primary group-data-selected/combobox-item:bg-action-primary group-data-selected/combobox-item:text-fg-on-brand group-data-disabled/combobox-item:border-line-subtle group-data-disabled/combobox-item:bg-surface group-data-disabled/combobox-item:text-fg-caption-placeholder [&>svg]:size-3\"\n\t\t\t\t>\n\t\t\t\t\t<CheckIcon />\n\t\t\t\t</ComboboxPrimitive.ItemIndicator>\n\t\t\t) : null}\n\t\t\t<span className=\"flex min-w-0 flex-1 shrink-0 gap-2 whitespace-nowrap\">\n\t\t\t\t{children}\n\t\t\t</span>\n\t\t</ComboboxPrimitive.Item>\n\t);\n}\n\nfunction ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props) {\n\treturn (\n\t\t<ComboboxPrimitive.Group\n\t\t\tdata-slot=\"combobox-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 ComboboxLabel({\n\tclassName,\n\t...props\n}: ComboboxPrimitive.GroupLabel.Props) {\n\treturn (\n\t\t<ComboboxPrimitive.GroupLabel\n\t\t\tdata-slot=\"combobox-label\"\n\t\t\tclassName={cn(\"px-3 py-1 text-gdt-xs text-fg-secondary\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props) {\n\treturn (\n\t\t<ComboboxPrimitive.Collection data-slot=\"combobox-collection\" {...props} />\n\t);\n}\n\nfunction ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props) {\n\treturn (\n\t\t<ComboboxPrimitive.Empty\n\t\t\tdata-slot=\"combobox-empty\"\n\t\t\tclassName={cn(\n\t\t\t\t\"hidden w-full justify-center py-2 text-center text-gdt-sm text-fg-secondary group-data-empty/combobox-content:flex\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction ComboboxSeparator({\n\tclassName,\n\t...props\n}: ComboboxPrimitive.Separator.Props) {\n\treturn (\n\t\t<ComboboxPrimitive.Separator\n\t\t\tdata-slot=\"combobox-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 ComboboxChips({\n\tclassName,\n\t...props\n}: React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> &\n\tComboboxPrimitive.Chips.Props) {\n\tconst resolvedSize = useComponentSize();\n\n\treturn (\n\t\t<ComboboxPrimitive.Chips\n\t\t\tdata-slot=\"combobox-chips\"\n\t\t\tclassName={cn(comboboxChipsVariants({ size: resolvedSize }), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction ComboboxChip({\n\tclassName,\n\tchildren,\n\tshowRemove = true,\n\t...props\n}: ComboboxPrimitive.Chip.Props & {\n\tshowRemove?: boolean;\n}) {\n\tconst resolvedSize = useComponentSize();\n\n\treturn (\n\t\t<ComboboxPrimitive.Chip\n\t\t\tdata-slot=\"combobox-chip\"\n\t\t\tclassName={cn(comboboxChipVariants({ size: resolvedSize }), className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t{showRemove && (\n\t\t\t\t<ComboboxPrimitive.ChipRemove\n\t\t\t\t\tclassName=\"-ml-1 opacity-50 hover:opacity-100\"\n\t\t\t\t\tdata-slot=\"combobox-chip-remove\"\n\t\t\t\t\trender={\n\t\t\t\t\t\t<Button variant=\"ghost\" size=\"icon-xs\">\n\t\t\t\t\t\t\t<XIcon className=\"pointer-events-none\" />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</ComboboxPrimitive.Chip>\n\t);\n}\n\nfunction ComboboxChipsInput({\n\tclassName,\n\t...props\n}: ComboboxPrimitive.Input.Props) {\n\treturn (\n\t\t<ComboboxPrimitive.Input\n\t\t\tdata-slot=\"combobox-chip-input\"\n\t\t\tclassName={cn(\n\t\t\t\t\"min-w-16 flex-1 bg-transparent text-fg-primary outline-none placeholder:text-fg-muted\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction useComboboxAnchor() {\n\treturn React.useRef<HTMLDivElement | null>(null);\n}\n\nexport {\n\tCombobox,\n\tComboboxInput,\n\tComboboxContent,\n\tComboboxList,\n\tComboboxItem,\n\tComboboxGroup,\n\tComboboxLabel,\n\tComboboxCollection,\n\tComboboxEmpty,\n\tComboboxSeparator,\n\tComboboxChips,\n\tComboboxChip,\n\tComboboxChipsInput,\n\tComboboxTrigger,\n\ttype ComboboxSize,\n\tComboboxValue,\n\tuseComboboxAnchor,\n};\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 { cva, type VariantProps } from \"class-variance-authority\";\nimport type * as React from \"react\";\nimport { cn } from \"../../lib/cn\";\nimport { Button } from \"./button\";\nimport { Input, type InputSize } from \"./input\";\nimport { InputSizeProvider } from \"./input-size-context\";\nimport {\n\ttype ComponentSize,\n\tSizeProvider,\n\tuseComponentSize,\n} from \"./size-context\";\nimport { Textarea, type TextareaSize } from \"./textarea\";\n\nconst inputGroupVariants = cva(\n\t\"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\",\n\t{\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\tsm: \"h-8\",\n\t\t\t\tmd: \"h-10\",\n\t\t\t\tlg: \"h-12\",\n\t\t\t\txl: \"h-14\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tsize: \"md\",\n\t\t},\n\t},\n);\n\nfunction InputGroup({\n\tclassName,\n\tsize,\n\t...props\n}: React.ComponentProps<\"div\"> & { size?: InputSize }) {\n\tconst inheritedSize = useComponentSize();\n\tconst resolvedSize = size ?? inheritedSize;\n\tconst componentSize: ComponentSize | undefined =\n\t\tresolvedSize === \"xl\" ? undefined : resolvedSize;\n\n\treturn (\n\t\t<SizeProvider size={componentSize}>\n\t\t\t<InputSizeProvider size={resolvedSize}>\n\t\t\t\t{/* biome-ignore lint/a11y/useSemanticElements: this primitive groups composite controls without forcing fieldset semantics. */}\n\t\t\t\t<div\n\t\t\t\t\tdata-slot=\"input-group\"\n\t\t\t\t\tdata-size={resolvedSize}\n\t\t\t\t\trole=\"group\"\n\t\t\t\t\tclassName={cn(inputGroupVariants({ size: resolvedSize }), className)}\n\t\t\t\t\t{...props}\n\t\t\t\t/>\n\t\t\t</InputSizeProvider>\n\t\t</SizeProvider>\n\t);\n}\n\nconst inputGroupAddonVariants = cva(\n\t\"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\",\n\t{\n\t\tvariants: {\n\t\t\talign: {\n\t\t\t\t\"inline-start\":\n\t\t\t\t\t\"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]\",\n\t\t\t\t\"inline-end\":\n\t\t\t\t\t\"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]\",\n\t\t\t\t\"block-start\":\n\t\t\t\t\t\"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\",\n\t\t\t\t\"block-end\":\n\t\t\t\t\t\"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\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\talign: \"inline-start\",\n\t\t},\n\t},\n);\n\nfunction InputGroupAddon({\n\tclassName,\n\talign = \"inline-start\",\n\t...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof inputGroupAddonVariants>) {\n\treturn (\n\t\t// biome-ignore lint/a11y/useSemanticElements: addon is a structural wrapper for grouped input affordances.\n\t\t// biome-ignore lint/a11y/useKeyWithClickEvents: click only forwards focus to the sibling input and is not a standalone action target.\n\t\t<div\n\t\t\trole=\"group\"\n\t\t\tdata-slot=\"input-group-addon\"\n\t\t\tdata-align={align}\n\t\t\tclassName={cn(inputGroupAddonVariants({ align }), className)}\n\t\t\tonClick={(e) => {\n\t\t\t\tif ((e.target as HTMLElement).closest(\"button\")) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\te.currentTarget.parentElement?.querySelector(\"input\")?.focus();\n\t\t\t}}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nconst inputGroupButtonVariants = cva(\n\t\"flex items-center gap-2 text-sm shadow-none rounded-full\",\n\t{\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\txs: \"h-6 gap-1 px-1.5 [&>svg:not([class*='size-'])]:size-3.5\",\n\t\t\t\tsm: \"\",\n\t\t\t\t\"icon-xs\": \"size-6 p-0 has-[>svg]:p-0\",\n\t\t\t\t\"icon-sm\": \"size-8 p-0 has-[>svg]:p-0\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tsize: \"xs\",\n\t\t},\n\t},\n);\n\nfunction InputGroupButton({\n\tclassName,\n\ttype = \"button\",\n\tvariant = \"ghost\",\n\tsize = \"xs\",\n\t...props\n}: Omit<React.ComponentProps<typeof Button>, \"size\" | \"type\"> &\n\tVariantProps<typeof inputGroupButtonVariants> & {\n\t\ttype?: \"button\" | \"submit\" | \"reset\";\n\t}) {\n\treturn (\n\t\t<Button\n\t\t\ttype={type}\n\t\t\tdata-size={size}\n\t\t\tvariant={variant}\n\t\t\tclassName={cn(inputGroupButtonVariants({ size }), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction InputGroupText({ className, ...props }: React.ComponentProps<\"span\">) {\n\treturn (\n\t\t<span\n\t\t\tclassName={cn(\n\t\t\t\t\"flex items-center gap-2 text-gdt-sm text-fg-secondary [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction InputGroupInput({\n\tclassName,\n\tsize,\n\t...props\n}: Omit<React.ComponentProps<\"input\">, \"size\"> & { size?: InputSize }) {\n\treturn (\n\t\t<Input\n\t\t\tdata-slot=\"input-group-control\"\n\t\t\tsize={size}\n\t\t\tclassName={cn(\n\t\t\t\t\"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\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction InputGroupTextarea({\n\tclassName,\n\tsize,\n\t...props\n}: Omit<React.ComponentProps<\"textarea\">, \"size\"> & { size?: TextareaSize }) {\n\treturn (\n\t\t<Textarea\n\t\t\tdata-slot=\"input-group-control\"\n\t\t\tsize={size}\n\t\t\tclassName={cn(\n\t\t\t\t\"flex-1 resize-none 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\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tInputGroup,\n\tInputGroupAddon,\n\tInputGroupButton,\n\tInputGroupText,\n\tInputGroupInput,\n\tInputGroupTextarea,\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"],"mappings":";AAEA,SAAS,YAAY,yBAAyB;AAC9C,SAAS,OAAAA,YAAW;AACpB,SAAS,WAAW,iBAAiB,aAAa;AAClD,YAAY,WAAW;;;ACLvB,SAA0B,YAAY;AACtC,SAAS,2BAA2B;AAEpC,IAAM,UAAU,oBAAoB;AAAA,EACnC,QAAQ;AAAA,IACP,aAAa;AAAA,MACZ,aAAa;AAAA,QACZ;AAAA,UACC,MAAM;AAAA,YACL;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;A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B;AAAA,UAAlB;AAAA,YACA,WAAU;AAAA,YACV,aAAU;AAAA,YACV,QACC,gBAAAA,KAAC,UAAO,SAAQ,SAAQ,MAAK,WAC5B,0BAAAA,KAAC,SAAM,WAAU,uBAAsB,GACxC;AAAA;AAAA,QAEF;AAAA;AAAA;AAAA,EAEF;AAEF;AAEA,SAAS,mBAAmB;AAAA,EAC3B;AAAA,EACA,GAAG;AACJ,GAAkC;AACjC,SACC,gBAAAA;AAAA,IAAC,kBAAkB;AAAA,IAAlB;AAAA,MACA,aAAU;AAAA,MACV,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;AAEA,SAAS,oBAAoB;AAC5B,SAAa,aAA8B,IAAI;AAChD;","names":["cva","jsx","cva","cva","createContext","useContext","Fragment","jsx","jsx","cva","jsx","cva","jsx","jsx","jsxs","cva"]}
@@ -0,0 +1,22 @@
1
+ import * as React from 'react';
2
+ import { DateRange } from 'react-day-picker';
3
+ export { DateRange } from 'react-day-picker';
4
+
5
+ interface DatePickerProps {
6
+ value?: Date;
7
+ onChange?: (date: Date | undefined) => void;
8
+ disabled?: boolean;
9
+ placeholder?: string;
10
+ className?: string;
11
+ }
12
+ declare function DatePicker({ value, onChange, disabled, placeholder, className, }: DatePickerProps): React.JSX.Element;
13
+ interface DateRangePickerProps {
14
+ value?: DateRange;
15
+ onChange?: (range: DateRange | undefined) => void;
16
+ disabled?: boolean;
17
+ placeholder?: string;
18
+ className?: string;
19
+ }
20
+ declare function DateRangePicker({ value, onChange, disabled, placeholder, className, }: DateRangePickerProps): React.JSX.Element;
21
+
22
+ export { DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps };
@@ -0,0 +1,528 @@
1
+ // src/components/ui/date-picker.tsx
2
+ import { CalendarIcon } from "lucide-react";
3
+ import * as React2 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/button.tsx
38
+ import { Button as ButtonPrimitive } from "@base-ui/react/button";
39
+ import { cva } from "class-variance-authority";
40
+ import { Loader } from "lucide-react";
41
+
42
+ // src/components/ui/size-context.tsx
43
+ import { createContext, useContext } from "react";
44
+ import { Fragment, jsx } from "react/jsx-runtime";
45
+ var SizeContext = createContext(void 0);
46
+ function SizeProvider({
47
+ children,
48
+ size
49
+ }) {
50
+ if (!size) {
51
+ return /* @__PURE__ */ jsx(Fragment, { children });
52
+ }
53
+ return /* @__PURE__ */ jsx(SizeContext.Provider, { value: size, children });
54
+ }
55
+ function useComponentSize(size, fallback = "md") {
56
+ const inheritedSize = useContext(SizeContext);
57
+ return size ?? inheritedSize ?? fallback;
58
+ }
59
+
60
+ // src/components/ui/button.tsx
61
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
62
+ var buttonVariants = cva(
63
+ "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",
64
+ {
65
+ variants: {
66
+ variant: {
67
+ primary: "bg-action-primary text-fg-on-brand hover:bg-action-primary-hover active:bg-action-primary-pressed",
68
+ "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",
69
+ 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",
70
+ "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",
71
+ 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",
72
+ "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",
73
+ ghost: "bg-transparent text-fg-primary hover:bg-surface active:bg-surface-raised data-focused:bg-surface data-pressed:bg-surface-raised",
74
+ 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",
75
+ "glass-overlay": "bg-surface-glass-overlay-button text-fg-on-brand",
76
+ "link-brand": "border-transparent bg-transparent px-0 text-fg-brand hover:underline active:underline active:opacity-70",
77
+ "link-neutral": "border-transparent bg-transparent px-0 text-fg-secondary hover:underline active:underline active:opacity-70"
78
+ },
79
+ size: {
80
+ 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",
81
+ 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",
82
+ 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",
83
+ 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",
84
+ icon: "size-10",
85
+ "icon-xs": "size-6 text-gdt-xs [&_svg:not([class*='size-'])]:size-3",
86
+ "icon-sm": "size-8 text-gdt-sm [&_svg:not([class*='size-'])]:size-3.5",
87
+ "icon-lg": "size-12.5 text-gdt-md [&_svg:not([class*='size-'])]:size-4.5",
88
+ "icon-xl": "size-14 text-gdt-lg [&_svg:not([class*='size-'])]:size-5"
89
+ }
90
+ },
91
+ defaultVariants: {
92
+ variant: "primary",
93
+ size: "md"
94
+ }
95
+ }
96
+ );
97
+ function Button({
98
+ className,
99
+ variant = "primary",
100
+ size,
101
+ isLoading = false,
102
+ children,
103
+ disabled = false,
104
+ ...props
105
+ }) {
106
+ const inheritedSize = useComponentSize();
107
+ const resolvedSize = size ?? inheritedSize;
108
+ const _disabled = disabled || isLoading;
109
+ return /* @__PURE__ */ jsxs(
110
+ ButtonPrimitive,
111
+ {
112
+ "data-slot": "button",
113
+ className: cn(buttonVariants({ variant, size: resolvedSize, className })),
114
+ disabled: _disabled,
115
+ ...props,
116
+ children: [
117
+ isLoading && /* @__PURE__ */ jsx2(Loader, { className: "size-4 animate-spin" }),
118
+ " ",
119
+ children
120
+ ]
121
+ }
122
+ );
123
+ }
124
+
125
+ // src/components/ui/calendar.tsx
126
+ import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
127
+ import * as React from "react";
128
+ import {
129
+ DayPicker,
130
+ getDefaultClassNames
131
+ } from "react-day-picker";
132
+ import { jsx as jsx3 } from "react/jsx-runtime";
133
+ function Calendar({
134
+ className,
135
+ classNames,
136
+ showOutsideDays = false,
137
+ weekStartsOn = 1,
138
+ locale,
139
+ formatters,
140
+ components,
141
+ ...props
142
+ }) {
143
+ const defaultClassNames = getDefaultClassNames();
144
+ return /* @__PURE__ */ jsx3(
145
+ DayPicker,
146
+ {
147
+ showOutsideDays,
148
+ weekStartsOn,
149
+ className: cn(
150
+ "group/calendar bg-transparent p-4 [--cell-radius:var(--radius-md)] [--cell-height:36px] [--cell-width:40px]",
151
+ String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
152
+ String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
153
+ className
154
+ ),
155
+ locale,
156
+ formatters: {
157
+ formatWeekdayName: (date) => date.toLocaleString(locale?.code, { weekday: "narrow" }),
158
+ ...formatters
159
+ },
160
+ classNames: {
161
+ root: cn("w-fit", defaultClassNames.root),
162
+ months: cn(
163
+ "relative flex flex-col gap-4 md:flex-row",
164
+ defaultClassNames.months
165
+ ),
166
+ month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
167
+ nav: cn(
168
+ "absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
169
+ defaultClassNames.nav
170
+ ),
171
+ button_previous: cn(
172
+ "flex size-7 items-center justify-center rounded-(--cell-radius) text-fg-secondary transition-colors outline-none select-none hover:bg-surface focus-visible:border-line-focus focus-visible:shadow-[0px_0px_0px_2px_var(--color-line-focus)] aria-disabled:opacity-40",
173
+ defaultClassNames.button_previous
174
+ ),
175
+ button_next: cn(
176
+ "flex size-7 items-center justify-center rounded-(--cell-radius) text-fg-secondary transition-colors outline-none select-none hover:bg-surface focus-visible:border-line-focus focus-visible:shadow-[0px_0px_0px_2px_var(--color-line-focus)] aria-disabled:opacity-40",
177
+ defaultClassNames.button_next
178
+ ),
179
+ month_caption: cn(
180
+ "flex h-(--cell-height) w-full items-center justify-center px-(--cell-width)",
181
+ defaultClassNames.month_caption
182
+ ),
183
+ caption_label: cn(
184
+ "text-gdt-sm font-medium text-fg-primary select-none",
185
+ defaultClassNames.caption_label
186
+ ),
187
+ table: "w-full border-collapse",
188
+ weekdays: cn("flex", defaultClassNames.weekdays),
189
+ weekday: cn(
190
+ "flex-1 text-gdt-xs font-normal text-fg-secondary select-none",
191
+ defaultClassNames.weekday
192
+ ),
193
+ week: cn("mt-1 flex w-full", defaultClassNames.week),
194
+ day: cn(
195
+ "group/day relative aspect-square h-full w-full p-0 text-center select-none",
196
+ defaultClassNames.day
197
+ ),
198
+ range_start: cn(
199
+ "rounded-l-full bg-surface-brand-subtle",
200
+ defaultClassNames.range_start
201
+ ),
202
+ range_middle: cn(
203
+ "rounded-none bg-surface-brand-subtle",
204
+ defaultClassNames.range_middle
205
+ ),
206
+ range_end: cn(
207
+ "rounded-r-full bg-surface-brand-subtle",
208
+ defaultClassNames.range_end
209
+ ),
210
+ today: cn(
211
+ "rounded-full h-(--cell-height) w-(--cell-width) flex items-center justify-center bg-surface-brand-subtle p-0",
212
+ defaultClassNames.today
213
+ ),
214
+ outside: cn(
215
+ "text-fg-caption-placeholder aria-selected:text-fg-caption-placeholder",
216
+ defaultClassNames.outside
217
+ ),
218
+ disabled: cn(
219
+ "text-fg-caption-placeholder opacity-50",
220
+ defaultClassNames.disabled
221
+ ),
222
+ hidden: cn("invisible", defaultClassNames.hidden),
223
+ ...classNames
224
+ },
225
+ components: {
226
+ Root: ({ className: className2, rootRef, ...props2 }) => {
227
+ return /* @__PURE__ */ jsx3(
228
+ "div",
229
+ {
230
+ "data-slot": "calendar",
231
+ ref: rootRef,
232
+ className: cn(className2),
233
+ ...props2
234
+ }
235
+ );
236
+ },
237
+ Chevron: ({ className: className2, orientation, ...props2 }) => {
238
+ if (orientation === "right") {
239
+ return /* @__PURE__ */ jsx3(
240
+ ChevronRightIcon,
241
+ {
242
+ className: cn("size-4", className2),
243
+ ...props2
244
+ }
245
+ );
246
+ }
247
+ return /* @__PURE__ */ jsx3(ChevronLeftIcon, { className: cn("size-4", className2), ...props2 });
248
+ },
249
+ DayButton: ({ ...props2 }) => /* @__PURE__ */ jsx3(CalendarDayButton, { locale, ...props2 }),
250
+ WeekNumber: ({ children, ...props2 }) => {
251
+ return /* @__PURE__ */ jsx3("td", { ...props2, children: /* @__PURE__ */ jsx3("div", { className: "flex h-(--cell-height) w-(--cell-width) items-center justify-center text-center", children }) });
252
+ },
253
+ ...components
254
+ },
255
+ ...props
256
+ }
257
+ );
258
+ }
259
+ function CalendarDayButton({
260
+ className,
261
+ day,
262
+ modifiers,
263
+ locale,
264
+ ...props
265
+ }) {
266
+ const defaultClassNames = getDefaultClassNames();
267
+ const ref = React.useRef(null);
268
+ React.useEffect(() => {
269
+ if (modifiers.focused) ref.current?.focus();
270
+ }, [modifiers.focused]);
271
+ const isEndpoint = modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle || modifiers.range_start || modifiers.range_end;
272
+ return /* @__PURE__ */ jsx3(
273
+ Button,
274
+ {
275
+ ref,
276
+ variant: "ghost",
277
+ size: "icon",
278
+ "data-day": day.date.toLocaleDateString(locale?.code),
279
+ "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
280
+ "data-range-start": modifiers.range_start,
281
+ "data-range-end": modifiers.range_end,
282
+ "data-range-middle": modifiers.range_middle,
283
+ className: cn(
284
+ "relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-width) h-(--cell-height) items-center justify-center rounded-full border-0 text-gdt-sm font-normal leading-none",
285
+ // Selected single + range endpoints: filled brand circle.
286
+ "data-[range-end=true]:bg-action-primary data-[range-end=true]:text-fg-on-brand data-[range-end=true]:hover:bg-action-primary-hover data-[range-end=true]:hover:text-fg-on-brand",
287
+ "data-[range-start=true]:bg-action-primary data-[range-start=true]:text-fg-on-brand data-[range-start=true]:hover:bg-action-primary-hover data-[range-start=true]:hover:text-fg-on-brand",
288
+ "data-[selected-single=true]:bg-action-primary data-[selected-single=true]:text-fg-on-brand data-[selected-single=true]:hover:bg-action-primary-hover data-[selected-single=true]:hover:text-fg-on-brand",
289
+ // In-range days: brand wash carried by the cell, brand text on the button.
290
+ "data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-transparent data-[range-middle=true]:text-fg-brand data-[range-middle=true]:hover:bg-transparent",
291
+ isEndpoint && "font-medium",
292
+ "group-data-[focused=true]/day:border-line-focus group-data-[focused=true]/day:shadow-[0px_0px_0px_2px_var(--color-line-focus)]",
293
+ defaultClassNames.day,
294
+ className
295
+ ),
296
+ ...props
297
+ }
298
+ );
299
+ }
300
+
301
+ // src/components/ui/popover.tsx
302
+ import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
303
+ import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
304
+ function Popover({ ...props }) {
305
+ return /* @__PURE__ */ jsx4(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
306
+ }
307
+ function PopoverTrigger({ ...props }) {
308
+ return /* @__PURE__ */ jsx4(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
309
+ }
310
+ function PopoverContent({
311
+ className,
312
+ align = "center",
313
+ alignOffset = 0,
314
+ side = "bottom",
315
+ sideOffset = 6,
316
+ showArrow = true,
317
+ size = "md",
318
+ children,
319
+ ...props
320
+ }) {
321
+ return /* @__PURE__ */ jsx4(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx4(
322
+ PopoverPrimitive.Positioner,
323
+ {
324
+ align,
325
+ alignOffset,
326
+ side,
327
+ sideOffset,
328
+ className: "isolate z-50",
329
+ children: /* @__PURE__ */ jsxs2(
330
+ PopoverPrimitive.Popup,
331
+ {
332
+ "data-slot": "popover-content",
333
+ className: cn(
334
+ "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",
335
+ className
336
+ ),
337
+ ...props,
338
+ children: [
339
+ /* @__PURE__ */ jsx4(SizeProvider, { size, children }),
340
+ showArrow ? /* @__PURE__ */ jsx4(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)]" }) : null
341
+ ]
342
+ }
343
+ )
344
+ }
345
+ ) });
346
+ }
347
+
348
+ // src/components/ui/date-picker.tsx
349
+ import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
350
+ var MONTHS = [
351
+ "January",
352
+ "February",
353
+ "March",
354
+ "April",
355
+ "May",
356
+ "June",
357
+ "July",
358
+ "August",
359
+ "September",
360
+ "October",
361
+ "November",
362
+ "December"
363
+ ];
364
+ function formatDate(date) {
365
+ const day = date.getDate().toString().padStart(2, "0");
366
+ return `${day} ${MONTHS[date.getMonth()]} ${date.getFullYear()}`;
367
+ }
368
+ function PickerTrigger({
369
+ displayValue,
370
+ placeholder,
371
+ disabled,
372
+ open,
373
+ className
374
+ }) {
375
+ return /* @__PURE__ */ jsxs3(
376
+ PopoverTrigger,
377
+ {
378
+ disabled,
379
+ className: cn(
380
+ "flex h-10 w-full items-center justify-between rounded-full border px-3.5 text-gdt-sm transition-[border-color,box-shadow] outline-none",
381
+ disabled ? "cursor-not-allowed border-line-subtle bg-surface text-fg-caption-placeholder" : open ? "border-line-focus bg-canvas text-fg-primary inset-ring-1 inset-ring-line-focus" : "border-line bg-canvas text-fg-primary hover:border-line-strong",
382
+ className
383
+ ),
384
+ children: [
385
+ /* @__PURE__ */ jsx5(
386
+ "span",
387
+ {
388
+ className: cn(
389
+ "min-w-0 truncate",
390
+ !displayValue && "text-fg-caption-placeholder"
391
+ ),
392
+ children: displayValue || placeholder
393
+ }
394
+ ),
395
+ /* @__PURE__ */ jsx5(
396
+ CalendarIcon,
397
+ {
398
+ className: cn(
399
+ "ml-2 size-4 shrink-0",
400
+ disabled ? "text-fg-caption-placeholder" : "text-fg-secondary"
401
+ )
402
+ }
403
+ )
404
+ ]
405
+ }
406
+ );
407
+ }
408
+ function PickerFooter({ onClear, onApply }) {
409
+ return /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-end gap-2 border-t border-line-subtle px-4 py-3", children: [
410
+ /* @__PURE__ */ jsx5(Button, { variant: "tertiary-outline", size: "sm", onClick: onClear, children: "Clear" }),
411
+ /* @__PURE__ */ jsx5(Button, { size: "sm", onClick: onApply, children: "Apply" })
412
+ ] });
413
+ }
414
+ var PANEL_CLASSES = "min-w-(--anchor-width) gap-0 overflow-hidden rounded-2xl flex flex-col items-center p-0";
415
+ function DatePicker({
416
+ value,
417
+ onChange,
418
+ disabled = false,
419
+ placeholder = "Select date",
420
+ className
421
+ }) {
422
+ const [open, setOpen] = React2.useState(false);
423
+ const [pending, setPending] = React2.useState(value);
424
+ function handleOpenChange(next) {
425
+ if (next) setPending(value);
426
+ setOpen(next);
427
+ }
428
+ return /* @__PURE__ */ jsxs3(Popover, { open, onOpenChange: handleOpenChange, children: [
429
+ /* @__PURE__ */ jsx5(
430
+ PickerTrigger,
431
+ {
432
+ displayValue: value ? formatDate(value) : "",
433
+ placeholder,
434
+ disabled,
435
+ open,
436
+ className
437
+ }
438
+ ),
439
+ /* @__PURE__ */ jsx5(
440
+ PopoverContent,
441
+ {
442
+ showArrow: false,
443
+ align: "start",
444
+ side: "bottom",
445
+ className: PANEL_CLASSES,
446
+ children: /* @__PURE__ */ jsxs3("div", { children: [
447
+ /* @__PURE__ */ jsx5(Calendar, { mode: "single", selected: pending, onSelect: setPending }),
448
+ /* @__PURE__ */ jsx5(
449
+ PickerFooter,
450
+ {
451
+ onClear: () => {
452
+ setPending(void 0);
453
+ onChange?.(void 0);
454
+ setOpen(false);
455
+ },
456
+ onApply: () => {
457
+ onChange?.(pending);
458
+ setOpen(false);
459
+ }
460
+ }
461
+ )
462
+ ] })
463
+ }
464
+ )
465
+ ] });
466
+ }
467
+ function DateRangePicker({
468
+ value,
469
+ onChange,
470
+ disabled = false,
471
+ placeholder = "Select date range",
472
+ className
473
+ }) {
474
+ const [open, setOpen] = React2.useState(false);
475
+ const [pending, setPending] = React2.useState(value);
476
+ function handleOpenChange(next) {
477
+ if (next) setPending(value);
478
+ setOpen(next);
479
+ }
480
+ const displayValue = (() => {
481
+ if (value?.from && value?.to)
482
+ return `${formatDate(value.from)} \u2014 ${formatDate(value.to)}`;
483
+ if (value?.from) return formatDate(value.from);
484
+ return "";
485
+ })();
486
+ return /* @__PURE__ */ jsxs3(Popover, { open, onOpenChange: handleOpenChange, children: [
487
+ /* @__PURE__ */ jsx5(
488
+ PickerTrigger,
489
+ {
490
+ displayValue,
491
+ placeholder,
492
+ disabled,
493
+ open,
494
+ className
495
+ }
496
+ ),
497
+ /* @__PURE__ */ jsxs3(
498
+ PopoverContent,
499
+ {
500
+ showArrow: false,
501
+ align: "start",
502
+ className: cn(PANEL_CLASSES, "w-auto"),
503
+ children: [
504
+ /* @__PURE__ */ jsx5(Calendar, { mode: "range", selected: pending, onSelect: setPending }),
505
+ /* @__PURE__ */ jsx5(
506
+ PickerFooter,
507
+ {
508
+ onClear: () => {
509
+ setPending(void 0);
510
+ onChange?.(void 0);
511
+ setOpen(false);
512
+ },
513
+ onApply: () => {
514
+ onChange?.(pending);
515
+ setOpen(false);
516
+ }
517
+ }
518
+ )
519
+ ]
520
+ }
521
+ )
522
+ ] });
523
+ }
524
+ export {
525
+ DatePicker,
526
+ DateRangePicker
527
+ };
528
+ //# sourceMappingURL=date-picker.js.map