@flikk/ui 1.0.0-beta.31 → 1.0.0-beta.33

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 (460) hide show
  1. package/CHANGELOG.md +497 -22
  2. package/dist/components/ai/AgentRequest/AgentRequest.animations.d.ts +25 -0
  3. package/dist/components/ai/AgentRequest/AgentRequest.animations.js +81 -0
  4. package/dist/components/ai/AgentRequest/AgentRequest.d.ts +3 -0
  5. package/dist/components/ai/AgentRequest/AgentRequest.js +435 -0
  6. package/dist/components/ai/AgentRequest/AgentRequest.theme.d.ts +2 -0
  7. package/dist/components/ai/AgentRequest/AgentRequest.theme.js +106 -0
  8. package/dist/components/ai/AgentRequest/AgentRequest.types.d.ts +241 -0
  9. package/dist/components/ai/AgentRequest/index.d.ts +3 -0
  10. package/dist/components/ai/CodeBlock/CodeBlock.theme.js +1 -1
  11. package/dist/components/ai/PromptInput/PromptInput.js +2 -2
  12. package/dist/components/ai/PromptInput/PromptInput.theme.js +2 -2
  13. package/dist/components/ai/PromptSuggestion/PromptSuggestion.theme.js +2 -2
  14. package/dist/components/ai/Reasoning/Reasoning.js +27 -3
  15. package/dist/components/ai/Reasoning/Reasoning.theme.d.ts +6 -0
  16. package/dist/components/ai/Reasoning/Reasoning.theme.js +36 -0
  17. package/dist/components/ai/Reasoning/Reasoning.types.d.ts +58 -5
  18. package/dist/components/ai/Reasoning/ReasoningTrace.d.ts +11 -0
  19. package/dist/components/ai/Reasoning/ReasoningTrace.js +84 -0
  20. package/dist/components/ai/Reasoning/index.d.ts +2 -1
  21. package/dist/components/ai/StreamingResponse/AnimatedText.d.ts +7 -0
  22. package/dist/components/ai/StreamingResponse/AnimatedText.js +8 -7
  23. package/dist/components/ai/StreamingResponse/MarkdownRenderer.d.ts +5 -0
  24. package/dist/components/ai/StreamingResponse/MarkdownRenderer.js +4 -4
  25. package/dist/components/ai/StreamingResponse/StreamingCursor.d.ts +2 -2
  26. package/dist/components/ai/StreamingResponse/StreamingCursor.js +10 -7
  27. package/dist/components/ai/StreamingResponse/StreamingResponse.animations.d.ts +10 -0
  28. package/dist/components/ai/StreamingResponse/StreamingResponse.animations.js +59 -33
  29. package/dist/components/ai/StreamingResponse/StreamingResponse.js +13 -7
  30. package/dist/components/ai/StreamingResponse/StreamingResponse.types.d.ts +33 -2
  31. package/dist/components/ai/StreamingResponse/StreamingSurface.d.ts +13 -0
  32. package/dist/components/ai/StreamingResponse/StreamingSurface.js +38 -0
  33. package/dist/components/ai/StreamingResponse/WordAnimationContext.d.ts +5 -0
  34. package/dist/components/ai/StreamingResponse/WordAnimationContext.js +5 -4
  35. package/dist/components/ai/StreamingResponse/index.d.ts +4 -2
  36. package/dist/components/ai/TokenCounter/TokenCounter.theme.js +1 -1
  37. package/dist/components/ai/index.d.ts +3 -2
  38. package/dist/components/ai/index.js +4 -0
  39. package/dist/components/canvas/BaseNode.js +1 -1
  40. package/dist/components/canvas/CanvasToolbar.js +0 -1
  41. package/dist/components/canvas/Edge.js +2 -2
  42. package/dist/components/canvas/NodeControls.js +0 -1
  43. package/dist/components/canvas/NodeRenderer.js +2 -2
  44. package/dist/components/charts/ActivityRings/ActivityRings.js +2 -2
  45. package/dist/components/charts/ActivityRings/ActivityRings.theme.js +1 -1
  46. package/dist/components/charts/AreaChart/AreaChart.js +3 -3
  47. package/dist/components/charts/AreaChart/AreaChart.theme.js +3 -3
  48. package/dist/components/charts/BarChart/BarChart.js +4 -4
  49. package/dist/components/charts/ComboChart/BarRenderer.js +2 -2
  50. package/dist/components/charts/ComboChart/BarRenderer.types.d.ts +1 -1
  51. package/dist/components/charts/ComboChart/ComboChartCanvas.js +1 -1
  52. package/dist/components/charts/ComboChart/LineRenderer.js +1 -1
  53. package/dist/components/charts/ComboChart/LineRenderer.types.d.ts +1 -1
  54. package/dist/components/charts/DonutChart/DonutChart.theme.js +4 -4
  55. package/dist/components/charts/DonutChart/MultiSegmentDonutChart.theme.js +1 -1
  56. package/dist/components/charts/Heatmap/Heatmap.js +49 -42
  57. package/dist/components/charts/Heatmap/Heatmap.theme.d.ts +6 -2
  58. package/dist/components/charts/Heatmap/Heatmap.theme.js +20 -8
  59. package/dist/components/charts/Heatmap/Heatmap.types.d.ts +49 -82
  60. package/dist/components/charts/Heatmap/HeatmapCell.js +30 -81
  61. package/dist/components/charts/Heatmap/HeatmapLegend.d.ts +7 -6
  62. package/dist/components/charts/Heatmap/HeatmapLegend.js +6 -6
  63. package/dist/components/charts/Heatmap/index.d.ts +1 -1
  64. package/dist/components/charts/Heatmap/utils/heatmapUtils.d.ts +7 -12
  65. package/dist/components/charts/Heatmap/utils/heatmapUtils.js +16 -61
  66. package/dist/components/charts/Heatmap/utils/heatmapUtils.test.d.ts +1 -0
  67. package/dist/components/charts/HorizontalBarChart/HorizontalBarChart.js +1 -1
  68. package/dist/components/charts/LineChart/LineChart.js +2 -2
  69. package/dist/components/charts/LollipopChart/LollipopChart.js +1 -1
  70. package/dist/components/charts/RadarChart/RadarChart.js +1 -1
  71. package/dist/components/charts/StackedBarChart/StackedBarChart.js +3 -3
  72. package/dist/components/charts/hooks/useChartAccessibility.js +9 -6
  73. package/dist/components/charts/index.d.ts +4 -8
  74. package/dist/components/charts/index.js +2 -4
  75. package/dist/components/charts/shared/ChartText/ChartText.theme.js +1 -1
  76. package/dist/components/charts/shared/index.d.ts +1 -1
  77. package/dist/components/charts/theme/chart.theme.js +3 -3
  78. package/dist/components/charts/utils/animation-utils.d.ts +12 -7
  79. package/dist/components/charts/utils/animation-utils.js +19 -19
  80. package/dist/components/core/Accordion/Accordion.theme.js +1 -1
  81. package/dist/components/core/Alert/Alert.animations.d.ts +11 -4
  82. package/dist/components/core/Alert/Alert.animations.js +11 -4
  83. package/dist/components/core/Alert/Alert.js +16 -2
  84. package/dist/components/core/Alert/Alert.theme.js +1 -1
  85. package/dist/components/core/Alert/Alert.types.d.ts +4 -2
  86. package/dist/components/core/AlertDialog/AlertDialog.js +2 -2
  87. package/dist/components/core/Avatar/Avatar.theme.js +1 -1
  88. package/dist/components/core/Badge/Badge.animations.d.ts +0 -5
  89. package/dist/components/core/Badge/Badge.animations.js +5 -84
  90. package/dist/components/core/Badge/Badge.d.ts +7 -4
  91. package/dist/components/core/Badge/Badge.js +27 -64
  92. package/dist/components/core/Badge/Badge.theme.js +8 -12
  93. package/dist/components/core/Badge/Badge.types.d.ts +18 -34
  94. package/dist/components/core/Breadcrumbs/Breadcrumbs.theme.js +4 -4
  95. package/dist/components/core/Button/Button.js +7 -43
  96. package/dist/components/core/Button/Button.theme.js +5 -5
  97. package/dist/components/core/Button/Button.types.d.ts +8 -12
  98. package/dist/components/core/Button/index.d.ts +0 -2
  99. package/dist/components/core/Calendar/Calendar.theme.js +1 -1
  100. package/dist/components/core/Calendar/CalendarMini/CalendarMini.theme.js +2 -2
  101. package/dist/components/core/Card/Card.js +7 -2
  102. package/dist/components/core/Card/Card.theme.js +29 -1
  103. package/dist/components/core/Card/Card.types.d.ts +20 -0
  104. package/dist/components/core/Card/CardBody.js +9 -1
  105. package/dist/components/core/Card/CardContext.d.ts +13 -0
  106. package/dist/components/core/Card/CardContext.js +14 -0
  107. package/dist/components/core/Card/CardHeader.js +4 -1
  108. package/dist/components/core/ContextMenu/ContextMenu.theme.js +4 -3
  109. package/dist/components/core/ContextMenu/ContextMenu.types.d.ts +8 -1
  110. package/dist/components/core/ContextMenu/ContextMenuSub.d.ts +11 -1
  111. package/dist/components/core/ContextMenu/ContextMenuSub.js +35 -22
  112. package/dist/components/core/ContextMenu/ContextMenuSubBody.js +14 -3
  113. package/dist/components/core/ContextMenu/ContextMenuSubTrigger.js +21 -8
  114. package/dist/components/core/DragDrop/DragDrop.theme.js +2 -2
  115. package/dist/components/core/Drawer/Drawer.theme.js +1 -1
  116. package/dist/components/core/Drawer/DrawerHeader.js +0 -1
  117. package/dist/components/core/Dropdown/DropdownMenu.js +22 -7
  118. package/dist/components/core/Link/Link.js +1 -1
  119. package/dist/components/core/Masonry/Masonry.theme.js +1 -1
  120. package/dist/components/core/MenuItem/MenuItem.js +2 -1
  121. package/dist/components/core/MenuItem/MenuItem.theme.js +13 -1
  122. package/dist/components/core/Message/Message.js +2 -0
  123. package/dist/components/core/Message/Message.theme.js +3 -3
  124. package/dist/components/core/Modal/Modal.animations.d.ts +1 -1
  125. package/dist/components/core/Modal/Modal.animations.js +50 -11
  126. package/dist/components/core/Modal/Modal.js +5 -1
  127. package/dist/components/core/Modal/Modal.theme.js +1 -1
  128. package/dist/components/core/Modal/ModalHeader.js +0 -1
  129. package/dist/components/core/ModalStack/ModalStackModal.js +3 -1
  130. package/dist/components/core/NavItem/NavItem.js +3 -2
  131. package/dist/components/core/NavItem/NavItem.theme.js +1 -1
  132. package/dist/components/core/OfflineIndicator/OfflineIndicator.theme.js +4 -2
  133. package/dist/components/core/PageHeading/PageHeading.theme.js +1 -1
  134. package/dist/components/core/Pagination/Pagination.theme.js +2 -2
  135. package/dist/components/core/Pill/Pill.js +34 -18
  136. package/dist/components/core/Pill/Pill.theme.js +4 -2
  137. package/dist/components/core/Pill/Pill.types.d.ts +14 -1
  138. package/dist/components/core/Popover/PopoverBody.js +16 -5
  139. package/dist/components/core/Progress/Progress.d.ts +0 -25
  140. package/dist/components/core/Progress/Progress.js +79 -11
  141. package/dist/components/core/Progress/Progress.theme.js +17 -0
  142. package/dist/components/core/Progress/Progress.types.d.ts +47 -1
  143. package/dist/components/core/Rating/Rating.theme.js +1 -1
  144. package/dist/components/core/Rating/Rating.types.d.ts +3 -2
  145. package/dist/components/core/ScrollArea/ScrollArea.js +1 -1
  146. package/dist/components/core/ScrollArea/ScrollArea.theme.js +1 -1
  147. package/dist/components/core/Segmented/Segmented.theme.js +3 -3
  148. package/dist/components/core/Segmented/SegmentedContext.js +1 -0
  149. package/dist/components/core/Sidebar/Sidebar.js +5 -2
  150. package/dist/components/core/Sidebar/Sidebar.theme.js +2 -2
  151. package/dist/components/core/Sidebar/SidebarContent.js +1 -1
  152. package/dist/components/core/Sidebar/SidebarHeader.js +1 -1
  153. package/dist/components/core/Sidebar/SidebarSearch.js +2 -2
  154. package/dist/components/core/Sidebar/SidebarToggle.js +1 -1
  155. package/dist/components/core/Sidebar/SidebarUserProfile.js +1 -1
  156. package/dist/components/core/SlidingNumber/SlidingNumber.d.ts +8 -0
  157. package/dist/components/core/SlidingNumber/SlidingNumber.js +12 -3
  158. package/dist/components/core/Sortable/Sortable.theme.js +1 -1
  159. package/dist/components/core/Tabs/Tabs.theme.js +1 -1
  160. package/dist/components/core/Tag/Tag.theme.js +1 -1
  161. package/dist/components/core/Toast/ToastProvider.js +1 -1
  162. package/dist/components/core/Tree/Tree.theme.js +1 -1
  163. package/dist/components/core/index.d.ts +0 -2
  164. package/dist/components/core/index.js +0 -4
  165. package/dist/components/core/shared/ChartTooltip/ChartTooltip.animations.d.ts +4 -0
  166. package/dist/components/core/shared/ChartTooltip/ChartTooltip.animations.js +20 -0
  167. package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.js +1 -1
  168. package/dist/components/core/shared/Ripple.d.ts +16 -0
  169. package/dist/components/core/shared/Ripple.js +141 -0
  170. package/dist/components/data-display/GanttChart/GanttChart.theme.js +6 -6
  171. package/dist/components/data-display/GanttChart/GanttTaskBar.js +1 -1
  172. package/dist/components/data-display/GanttChart/GanttTimelineHeader.js +1 -1
  173. package/dist/components/data-display/GanttChart/GanttToolbar.js +0 -1
  174. package/dist/components/data-display/KPI/KPI.js +11 -20
  175. package/dist/components/data-display/KPI/KPI.theme.js +8 -4
  176. package/dist/components/data-display/Metric/Metric.theme.js +4 -4
  177. package/dist/components/data-display/Table/Table.theme.js +2 -2
  178. package/dist/components/data-display/Table/TableColumnManager.js +1 -2
  179. package/dist/components/data-display/Table/TableContext.js +1 -0
  180. package/dist/components/data-display/Table/TableFilter.js +9 -2
  181. package/dist/components/data-display/Table/TableSelectionHeader.js +1 -1
  182. package/dist/components/data-display/Timeline/Timeline.theme.js +1 -1
  183. package/dist/components/effects/CustomCursor/CustomCursor.d.ts +1 -1
  184. package/dist/components/effects/CustomCursor/CustomCursor.js +1 -1
  185. package/dist/components/effects/CustomCursor/CustomCursor.theme.js +4 -4
  186. package/dist/components/effects/Neumorphic/InsetCircleButton.js +1 -1
  187. package/dist/components/effects/Overlay/Overlay.js +7 -3
  188. package/dist/components/effects/index.d.ts +0 -32
  189. package/dist/components/effects/index.js +0 -16
  190. package/dist/components/effects/shared/ShaderCanvas/ShaderCanvas.d.ts +0 -2
  191. package/dist/components/effects/shared/ShaderCanvas/ShaderCanvas.js +1 -93
  192. package/dist/components/effects/shared/ShaderCanvas/ShaderCanvas.types.d.ts +0 -10
  193. package/dist/components/effects/shared/ShaderCanvas/index.d.ts +1 -1
  194. package/dist/components/effects/shared/index.d.ts +1 -3
  195. package/dist/components/effects/shared/shaderNoise.glsl.d.ts +1 -1
  196. package/dist/components/effects/shared/shaderNoise.glsl.js +2 -11
  197. package/dist/components/forms/Checkbox/Checkbox.theme.js +1 -1
  198. package/dist/components/forms/ColorPicker/ColorPicker.js +45 -3
  199. package/dist/components/forms/ColorPicker/ColorPickerBody.js +8 -4
  200. package/dist/components/forms/ColorPicker/ColorPickerHeader.js +1 -1
  201. package/dist/components/forms/ColorPicker/ColorPickerImage.js +1 -1
  202. package/dist/components/forms/Combobox/Combobox.js +10 -4
  203. package/dist/components/forms/Combobox/Combobox.theme.js +9 -0
  204. package/dist/components/forms/Combobox/Combobox.types.d.ts +13 -0
  205. package/dist/components/forms/DatePicker/DatePicker.js +19 -12
  206. package/dist/components/forms/DatePicker/DatePicker.theme.js +5 -0
  207. package/dist/components/forms/DatePicker/DatePicker.types.d.ts +8 -0
  208. package/dist/components/forms/DatePicker/DatePickerContext.d.ts +0 -1
  209. package/dist/components/forms/DatePicker/DatePickerTrigger.js +5 -3
  210. package/dist/components/forms/DateRangePicker/DateRangePicker.theme.js +6 -1
  211. package/dist/components/forms/DateRangePicker/DateRangePicker.types.d.ts +8 -0
  212. package/dist/components/forms/DateRangePicker/DateRangePickerContext.js +1 -0
  213. package/dist/components/forms/DateRangePicker/DateRangePickerTrigger.js +5 -3
  214. package/dist/components/forms/FileUpload/FileUpload.theme.js +2 -2
  215. package/dist/components/forms/FileUpload/FileUploadProgress.theme.js +1 -1
  216. package/dist/components/forms/Input/Input.js +17 -12
  217. package/dist/components/forms/Input/Input.theme.js +10 -0
  218. package/dist/components/forms/Input/Input.types.d.ts +14 -0
  219. package/dist/components/forms/InputAddress/InputAddress.js +5 -5
  220. package/dist/components/forms/InputAddress/InputAddress.types.d.ts +9 -2
  221. package/dist/components/forms/InputCounter/InputCounter.js +194 -17
  222. package/dist/components/forms/InputCounter/InputCounter.theme.d.ts +12 -0
  223. package/dist/components/forms/InputCounter/InputCounter.theme.js +92 -2
  224. package/dist/components/forms/InputCounter/InputCounter.types.d.ts +47 -4
  225. package/dist/components/forms/InputCreditCard/InputCreditCard.js +4 -4
  226. package/dist/components/forms/InputCreditCard/InputCreditCard.types.d.ts +7 -0
  227. package/dist/components/forms/Mention/Mention.js +13 -11
  228. package/dist/components/forms/Radio/Radio.theme.js +1 -1
  229. package/dist/components/forms/RichTextEditor/RichTextEditor.d.ts +12 -16
  230. package/dist/components/forms/RichTextEditor/RichTextEditor.js +174 -1680
  231. package/dist/components/forms/RichTextEditor/RichTextEditor.theme.d.ts +12 -56
  232. package/dist/components/forms/RichTextEditor/RichTextEditor.theme.js +60 -118
  233. package/dist/components/forms/RichTextEditor/RichTextEditor.types.d.ts +62 -126
  234. package/dist/components/forms/RichTextEditor/RichTextLinkField.d.ts +18 -0
  235. package/dist/components/forms/RichTextEditor/RichTextLinkField.js +46 -0
  236. package/dist/components/forms/RichTextEditor/RichTextToolbar.d.ts +15 -0
  237. package/dist/components/forms/RichTextEditor/RichTextToolbar.js +93 -0
  238. package/dist/components/forms/RichTextEditor/editorCommands.d.ts +50 -0
  239. package/dist/components/forms/RichTextEditor/editorCommands.js +58 -0
  240. package/dist/components/forms/RichTextEditor/editorState.d.ts +19 -0
  241. package/dist/components/forms/RichTextEditor/editorState.js +103 -0
  242. package/dist/components/forms/RichTextEditor/index.d.ts +5 -3
  243. package/dist/components/forms/RichTextEditor/sanitizeHtml.d.ts +38 -0
  244. package/dist/components/forms/RichTextEditor/sanitizeHtml.js +179 -0
  245. package/dist/components/forms/RichTextEditor/sanitizeHtml.test.d.ts +1 -0
  246. package/dist/components/forms/Select/Select.js +19 -12
  247. package/dist/components/forms/Select/Select.theme.js +9 -1
  248. package/dist/components/forms/Select/Select.types.d.ts +86 -8
  249. package/dist/components/forms/Select/useSelectState.d.ts +9 -3
  250. package/dist/components/forms/Select/useSelectState.js +4 -1
  251. package/dist/components/forms/SelectableCard/SelectableCard.js +2 -1
  252. package/dist/components/forms/SelectableCard/SelectableCard.theme.js +1 -1
  253. package/dist/components/forms/Switch/Switch.theme.js +2 -2
  254. package/dist/components/forms/Textarea/Textarea.js +14 -25
  255. package/dist/components/forms/TimePicker/TimePicker.theme.js +10 -1
  256. package/dist/components/forms/TimePicker/TimePicker.types.d.ts +11 -0
  257. package/dist/components/forms/TimePicker/TimePickerTrigger.js +7 -5
  258. package/dist/components/forms/forms.theme.d.ts +57 -0
  259. package/dist/components/forms/forms.theme.js +102 -13
  260. package/dist/components/forms/index.js +1 -0
  261. package/dist/components/generative/FormShell.d.ts +22 -0
  262. package/dist/components/generative/FormShell.js +102 -0
  263. package/dist/components/generative/GenerativeView.d.ts +52 -1
  264. package/dist/components/generative/GenerativeView.js +203 -11
  265. package/dist/components/generative/actions.d.ts +5 -0
  266. package/dist/components/generative/ai-sdk/index.d.ts +1 -0
  267. package/dist/components/generative/ai-sdk/index.js +1 -0
  268. package/dist/components/generative/ai-sdk/useGenerativeChat.d.ts +52 -0
  269. package/dist/components/generative/ai-sdk/useGenerativeChat.js +73 -0
  270. package/dist/components/generative/ai-sdk/useGenerativeChat.test.d.ts +1 -0
  271. package/dist/components/generative/fieldBinding.d.ts +31 -0
  272. package/dist/components/generative/fieldBinding.js +33 -0
  273. package/dist/components/generative/fieldBinding.test.d.ts +1 -0
  274. package/dist/components/generative/formScope.d.ts +71 -0
  275. package/dist/components/generative/formScope.js +135 -0
  276. package/dist/components/generative/index.d.ts +4 -0
  277. package/dist/components/generative/index.js +4 -0
  278. package/dist/components/generative/registry.d.ts +2 -0
  279. package/dist/components/generative/registry.js +11 -10
  280. package/dist/components/generative/schema.generated.js +199 -293
  281. package/dist/components/generative/toToolResult.d.ts +21 -0
  282. package/dist/components/generative/toToolResult.js +15 -0
  283. package/dist/components/generative/toToolResult.test.d.ts +1 -0
  284. package/dist/components/generative/validate.d.ts +10 -1
  285. package/dist/components/generative/validate.js +126 -11
  286. package/dist/components/layout/Grid/Grid.js +1 -0
  287. package/dist/components/layout/Section/Section.theme.js +1 -1
  288. package/dist/components/layout/Stack/Stack.js +1 -0
  289. package/dist/generative.schema.json +199 -293
  290. package/dist/index.js +1 -4
  291. package/dist/registry.json +2765 -2450
  292. package/dist/shadcn-compat.css +5 -5
  293. package/dist/styles/theme.test.d.ts +1 -0
  294. package/dist/styles.css +1 -1
  295. package/dist/test/render.d.ts +17 -0
  296. package/dist/themes/precision.css +232 -0
  297. package/dist/tools.json +200 -295
  298. package/dist/utils/composeEventHandlers.d.ts +19 -0
  299. package/dist/utils/composeEventHandlers.js +26 -0
  300. package/dist/utils/composeEventHandlers.test.d.ts +1 -0
  301. package/dist/utils/index.d.ts +1 -1
  302. package/package.json +31 -1
  303. package/src/global.scss +21 -28
  304. package/src/styles/theme.css +157 -50
  305. package/src/styles/theme.test.ts +119 -0
  306. package/tailwind.preset.cjs +30 -20
  307. package/dist/components/charts/FunnelChart/FunnelChart.animations.d.ts +0 -35
  308. package/dist/components/charts/FunnelChart/FunnelChart.animations.js +0 -59
  309. package/dist/components/charts/FunnelChart/FunnelChart.d.ts +0 -8
  310. package/dist/components/charts/FunnelChart/FunnelChart.js +0 -410
  311. package/dist/components/charts/FunnelChart/FunnelChart.theme.d.ts +0 -2
  312. package/dist/components/charts/FunnelChart/FunnelChart.theme.js +0 -12
  313. package/dist/components/charts/FunnelChart/FunnelChart.types.d.ts +0 -105
  314. package/dist/components/charts/FunnelChart/index.d.ts +0 -4
  315. package/dist/components/charts/ScatterPlot/ScatterPlot.d.ts +0 -9
  316. package/dist/components/charts/ScatterPlot/ScatterPlot.js +0 -208
  317. package/dist/components/charts/ScatterPlot/ScatterPlot.theme.d.ts +0 -18
  318. package/dist/components/charts/ScatterPlot/ScatterPlot.theme.js +0 -42
  319. package/dist/components/charts/ScatterPlot/ScatterPlot.types.d.ts +0 -60
  320. package/dist/components/charts/ScatterPlot/ScatterPlot.types.js +0 -19
  321. package/dist/components/charts/ScatterPlot/index.d.ts +0 -3
  322. package/dist/components/core/Button/Button.ripple.d.ts +0 -71
  323. package/dist/components/core/Button/Button.ripple.js +0 -236
  324. package/dist/components/core/Calendar/CalendarEvent/CalendarEvent.d.ts +0 -4
  325. package/dist/components/core/Calendar/CalendarEvent/CalendarEvent.theme.d.ts +0 -12
  326. package/dist/components/core/Calendar/CalendarEvent/CalendarEvent.types.d.ts +0 -23
  327. package/dist/components/core/Calendar/CalendarEvent/index.d.ts +0 -2
  328. package/dist/components/core/CardStack/CardStack.animations.d.ts +0 -47
  329. package/dist/components/core/CardStack/CardStack.d.ts +0 -3
  330. package/dist/components/core/CardStack/CardStack.js +0 -187
  331. package/dist/components/core/CardStack/CardStack.theme.d.ts +0 -6
  332. package/dist/components/core/CardStack/CardStack.theme.js +0 -33
  333. package/dist/components/core/CardStack/CardStack.types.d.ts +0 -139
  334. package/dist/components/core/CardStack/index.d.ts +0 -7
  335. package/dist/components/core/Carousel/Carousel.d.ts +0 -3
  336. package/dist/components/core/Carousel/Carousel.js +0 -83
  337. package/dist/components/core/Carousel/Carousel.theme.d.ts +0 -10
  338. package/dist/components/core/Carousel/Carousel.theme.js +0 -20
  339. package/dist/components/core/Carousel/Carousel.types.d.ts +0 -113
  340. package/dist/components/core/Carousel/CarouselBody.d.ts +0 -4
  341. package/dist/components/core/Carousel/CarouselBody.js +0 -59
  342. package/dist/components/core/Carousel/CarouselContext.d.ts +0 -3
  343. package/dist/components/core/Carousel/CarouselContext.js +0 -13
  344. package/dist/components/core/Carousel/CarouselItem.d.ts +0 -4
  345. package/dist/components/core/Carousel/CarouselItem.js +0 -11
  346. package/dist/components/core/Carousel/CarouselNext.d.ts +0 -4
  347. package/dist/components/core/Carousel/CarouselNext.js +0 -16
  348. package/dist/components/core/Carousel/CarouselPrevious.d.ts +0 -4
  349. package/dist/components/core/Carousel/CarouselPrevious.js +0 -16
  350. package/dist/components/core/Carousel/index.d.ts +0 -3
  351. package/dist/components/effects/ColorPanels/ColorPanels.d.ts +0 -8
  352. package/dist/components/effects/ColorPanels/ColorPanels.js +0 -66
  353. package/dist/components/effects/ColorPanels/ColorPanels.shaders.d.ts +0 -12
  354. package/dist/components/effects/ColorPanels/ColorPanels.shaders.js +0 -218
  355. package/dist/components/effects/ColorPanels/ColorPanels.types.d.ts +0 -29
  356. package/dist/components/effects/ColorPanels/ColorPanels.types.js +0 -3
  357. package/dist/components/effects/ColorPanels/index.d.ts +0 -2
  358. package/dist/components/effects/FlutedGlass/FlutedGlass.d.ts +0 -9
  359. package/dist/components/effects/FlutedGlass/FlutedGlass.js +0 -80
  360. package/dist/components/effects/FlutedGlass/FlutedGlass.shaders.d.ts +0 -12
  361. package/dist/components/effects/FlutedGlass/FlutedGlass.shaders.js +0 -335
  362. package/dist/components/effects/FlutedGlass/FlutedGlass.types.d.ts +0 -61
  363. package/dist/components/effects/FlutedGlass/FlutedGlass.types.js +0 -16
  364. package/dist/components/effects/FlutedGlass/index.d.ts +0 -3
  365. package/dist/components/effects/GlassEffect/GlassEffect.d.ts +0 -15
  366. package/dist/components/effects/GlassEffect/GlassEffect.js +0 -38
  367. package/dist/components/effects/GlassEffect/GlassEffect.types.d.ts +0 -19
  368. package/dist/components/effects/GlassEffect/index.d.ts +0 -2
  369. package/dist/components/effects/GlassSurface/GlassSurface.d.ts +0 -8
  370. package/dist/components/effects/GlassSurface/GlassSurface.js +0 -250
  371. package/dist/components/effects/GlassSurface/GlassSurface.types.d.ts +0 -66
  372. package/dist/components/effects/GlassSurface/index.d.ts +0 -2
  373. package/dist/components/effects/GodRays/GodRays.d.ts +0 -8
  374. package/dist/components/effects/GodRays/GodRays.js +0 -68
  375. package/dist/components/effects/GodRays/GodRays.shaders.d.ts +0 -10
  376. package/dist/components/effects/GodRays/GodRays.shaders.js +0 -128
  377. package/dist/components/effects/GodRays/GodRays.types.d.ts +0 -25
  378. package/dist/components/effects/GodRays/GodRays.types.js +0 -3
  379. package/dist/components/effects/GodRays/index.d.ts +0 -2
  380. package/dist/components/effects/GridPattern/GridPattern.d.ts +0 -18
  381. package/dist/components/effects/GridPattern/GridPattern.js +0 -65
  382. package/dist/components/effects/GridPattern/GridPattern.types.d.ts +0 -47
  383. package/dist/components/effects/GridPattern/index.d.ts +0 -2
  384. package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.d.ts +0 -10
  385. package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.js +0 -78
  386. package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.shaders.d.ts +0 -22
  387. package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.shaders.js +0 -239
  388. package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.types.d.ts +0 -52
  389. package/dist/components/effects/HalftoneCmyk/index.d.ts +0 -2
  390. package/dist/components/effects/HalftoneDots/HalftoneDots.d.ts +0 -9
  391. package/dist/components/effects/HalftoneDots/HalftoneDots.js +0 -68
  392. package/dist/components/effects/HalftoneDots/HalftoneDots.shaders.d.ts +0 -13
  393. package/dist/components/effects/HalftoneDots/HalftoneDots.shaders.js +0 -296
  394. package/dist/components/effects/HalftoneDots/HalftoneDots.types.d.ts +0 -43
  395. package/dist/components/effects/HalftoneDots/HalftoneDots.types.js +0 -12
  396. package/dist/components/effects/HalftoneDots/index.d.ts +0 -3
  397. package/dist/components/effects/ImageDithering/ImageDithering.d.ts +0 -9
  398. package/dist/components/effects/ImageDithering/ImageDithering.js +0 -68
  399. package/dist/components/effects/ImageDithering/ImageDithering.shaders.d.ts +0 -12
  400. package/dist/components/effects/ImageDithering/ImageDithering.shaders.js +0 -117
  401. package/dist/components/effects/ImageDithering/ImageDithering.types.d.ts +0 -30
  402. package/dist/components/effects/ImageDithering/ImageDithering.types.js +0 -8
  403. package/dist/components/effects/ImageDithering/index.d.ts +0 -3
  404. package/dist/components/effects/MagneticElement/MagneticElement.d.ts +0 -30
  405. package/dist/components/effects/MagneticElement/MagneticElement.js +0 -111
  406. package/dist/components/effects/MagneticElement/MagneticElement.types.d.ts +0 -44
  407. package/dist/components/effects/MagneticElement/index.d.ts +0 -2
  408. package/dist/components/effects/Metaballs/Metaballs.d.ts +0 -8
  409. package/dist/components/effects/Metaballs/Metaballs.js +0 -59
  410. package/dist/components/effects/Metaballs/Metaballs.shaders.d.ts +0 -10
  411. package/dist/components/effects/Metaballs/Metaballs.shaders.js +0 -102
  412. package/dist/components/effects/Metaballs/Metaballs.types.d.ts +0 -16
  413. package/dist/components/effects/Metaballs/Metaballs.types.js +0 -3
  414. package/dist/components/effects/Metaballs/index.d.ts +0 -2
  415. package/dist/components/effects/PaperTexture/PaperTexture.d.ts +0 -9
  416. package/dist/components/effects/PaperTexture/PaperTexture.js +0 -61
  417. package/dist/components/effects/PaperTexture/PaperTexture.shaders.d.ts +0 -22
  418. package/dist/components/effects/PaperTexture/PaperTexture.shaders.js +0 -145
  419. package/dist/components/effects/PaperTexture/PaperTexture.types.d.ts +0 -19
  420. package/dist/components/effects/PaperTexture/index.d.ts +0 -2
  421. package/dist/components/effects/PulsingBorder/PulsingBorder.d.ts +0 -27
  422. package/dist/components/effects/PulsingBorder/PulsingBorder.js +0 -174
  423. package/dist/components/effects/PulsingBorder/PulsingBorder.shaders.d.ts +0 -14
  424. package/dist/components/effects/PulsingBorder/PulsingBorder.shaders.js +0 -258
  425. package/dist/components/effects/PulsingBorder/PulsingBorder.types.d.ts +0 -75
  426. package/dist/components/effects/PulsingBorder/PulsingBorder.types.js +0 -3
  427. package/dist/components/effects/PulsingBorder/index.d.ts +0 -2
  428. package/dist/components/effects/SmokeRing/SmokeRing.d.ts +0 -8
  429. package/dist/components/effects/SmokeRing/SmokeRing.js +0 -62
  430. package/dist/components/effects/SmokeRing/SmokeRing.shaders.d.ts +0 -14
  431. package/dist/components/effects/SmokeRing/SmokeRing.shaders.js +0 -130
  432. package/dist/components/effects/SmokeRing/SmokeRing.types.d.ts +0 -22
  433. package/dist/components/effects/SmokeRing/SmokeRing.types.js +0 -3
  434. package/dist/components/effects/SmokeRing/index.d.ts +0 -2
  435. package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.d.ts +0 -9
  436. package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.js +0 -59
  437. package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.shaders.d.ts +0 -14
  438. package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.shaders.js +0 -129
  439. package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.types.d.ts +0 -23
  440. package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.types.js +0 -3
  441. package/dist/components/effects/StaticGradientMesh/index.d.ts +0 -2
  442. package/dist/components/effects/Water/Water.d.ts +0 -9
  443. package/dist/components/effects/Water/Water.js +0 -65
  444. package/dist/components/effects/Water/Water.shaders.d.ts +0 -11
  445. package/dist/components/effects/Water/Water.shaders.js +0 -123
  446. package/dist/components/effects/Water/Water.types.d.ts +0 -25
  447. package/dist/components/effects/Water/index.d.ts +0 -2
  448. package/dist/components/effects/shared/bayerMatrices.glsl.d.ts +0 -10
  449. package/dist/components/effects/shared/bayerMatrices.glsl.js +0 -44
  450. package/dist/components/effects/shared/imageUV.glsl.d.ts +0 -12
  451. package/dist/components/effects/shared/imageUV.glsl.js +0 -26
  452. package/dist/components/forms/RichTextEditor/RichTextEditor.animations.d.ts +0 -7
  453. package/dist/components/forms/RichTextEditor/RichTextEditor.animations.js +0 -32
  454. package/dist/utils/calendarUtils.d.ts +0 -60
  455. /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.d.ts +0 -0
  456. /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.theme.d.ts +0 -0
  457. /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.theme.js +0 -0
  458. /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.types.d.ts +0 -0
  459. /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltipContent.d.ts +0 -0
  460. /package/dist/components/{charts → core}/shared/ChartTooltip/index.d.ts +0 -0
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx } from 'react/jsx-runtime';
3
3
  import { useReducedMotion, AnimatePresence, motion } from 'motion/react';
4
- import { useContext, useRef, useEffect } from 'react';
4
+ import { useContext, useEffect } from 'react';
5
5
  import { createPortal } from 'react-dom';
6
6
  import { useSelectPortal } from '../../../hooks/useSelectPortal.js';
7
7
  import { cn } from '../../../utils/cn.js';
@@ -16,15 +16,19 @@ import { useIsClient } from '../../../hooks/useIsClient.js';
16
16
  */
17
17
  const ColorPickerBody = ({ children, className, portal = true, animation = true, ...rest }) => {
18
18
  const context = useContext(ColorPickerContext);
19
- const contentRef = useRef(null);
20
19
  const shouldReduceMotion = useReducedMotion();
21
20
  const isClient = useIsClient();
22
21
  if (!context) {
23
22
  throw new Error('ColorPicker.Body must be used within a ColorPicker');
24
23
  }
25
24
  const { isOpen, setIsOpen, theme, triggerRef, placement, offset, dialogId } = context;
26
- // Use positioning hook (same as Dropdown/Select)
27
- const { position, cssVariables } = useSelectPortal({
25
+ // Use positioning hook (same as Dropdown/Select).
26
+ // 🔴 `contentRef` MUST come from the hook and be attached to the panel below:
27
+ // the hook measures the panel through it to clamp against the viewport. Body
28
+ // used to declare its own ref, leaving the hook's forever null — so
29
+ // `measureDropdownWidth` fell through to the TRIGGER's width, clamping fitted
30
+ // a ~32px box, and the ~320px panel ran straight off the right edge.
31
+ const { position, cssVariables, contentRef } = useSelectPortal({
28
32
  triggerRef,
29
33
  isOpen: isOpen || false,
30
34
  placement,
@@ -25,7 +25,7 @@ const ColorPickerHeader = ({ modes = ['solid'], activeMode: activeModeFromProp,
25
25
  };
26
26
  return (jsxs("div", { className: cn('flex items-center justify-between border-b border-[var(--color-border)] -mx-4 -mt-4 px-4', className), ...props, children: [jsx("div", { className: "flex items-center gap-4", children: modes.map((mode) => (jsxs("button", { type: "button", onClick: () => handleModeChange(mode), className: cn('py-3 text-sm font-medium transition-colors relative cursor-pointer', activeMode === mode
27
27
  ? 'text-[var(--color-primary)]'
28
- : 'text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)]'), "aria-selected": activeMode === mode, role: "tab", children: [modeLabels[mode], activeMode === mode && (jsx("div", { className: "absolute bottom-0 left-0 right-0 h-0.5 bg-[var(--color-primary)] rounded-full" }))] }, mode))) }), showClose && (jsx("button", { type: "button", onClick: () => setIsOpen(false), className: "p-1 text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] transition-colors rounded-md hover:bg-[var(--color-background-secondary)] cursor-pointer", "aria-label": "Close color picker", children: jsx(X, { className: "size-5" }) }))] }));
28
+ : 'text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)]'), "aria-selected": activeMode === mode, role: "tab", children: [modeLabels[mode], activeMode === mode && (jsx("div", { className: "absolute bottom-0 left-0 right-0 h-0.5 bg-[var(--color-primary)] rounded-full" }))] }, mode))) }), showClose && (jsx("button", { type: "button", onClick: () => setIsOpen(false), className: "p-1 text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] transition-colors rounded-md hover:bg-[var(--color-surface)] cursor-pointer", "aria-label": "Close color picker", children: jsx(X, { className: "size-5" }) }))] }));
29
29
  };
30
30
  ColorPickerHeader.displayName = 'ColorPickerHeader';
31
31
 
@@ -141,7 +141,7 @@ const ColorPickerImage = ({ className, ...props }) => {
141
141
  /* Upload dropzone */
142
142
  jsxs("div", { onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop, onClick: () => { var _a; return (_a = fileInputRef.current) === null || _a === void 0 ? void 0 : _a.click(); }, className: cn('flex flex-col items-center justify-center gap-2 h-[200px] rounded-xl border-2 border-dashed cursor-pointer transition-colors', isDragOver
143
143
  ? 'border-[var(--color-primary)] bg-[var(--color-primary-50)]'
144
- : 'border-[var(--color-border)] hover:border-[var(--color-primary)] hover:bg-[var(--color-background-secondary)]'), children: [jsx(UploadSimple, { className: "size-8 text-[var(--color-text-muted)]" }), jsx("div", { className: "text-sm text-[var(--color-text-muted)]", children: "Click or drag an image" }), jsx("div", { className: "text-xs text-[var(--color-text-placeholder)]", children: "PNG, JPG, SVG, WebP" }), jsx("input", { ref: fileInputRef, type: "file", accept: "image/*", onChange: handleFileChange, className: "hidden", "aria-label": "Upload image" })] })) : (
144
+ : 'border-[var(--color-border)] hover:border-[var(--color-primary)] hover:bg-[var(--color-surface)]'), children: [jsx(UploadSimple, { className: "size-8 text-[var(--color-text-muted)]" }), jsx("div", { className: "text-sm text-[var(--color-text-muted)]", children: "Click or drag an image" }), jsx("div", { className: "text-xs text-[var(--color-text-placeholder)]", children: "PNG, JPG, SVG, WebP" }), jsx("input", { ref: fileInputRef, type: "file", accept: "image/*", onChange: handleFileChange, className: "hidden", "aria-label": "Upload image" })] })) : (
145
145
  /* Canvas with color picking */
146
146
  jsxs("div", { className: "space-y-2", children: [jsxs("div", { className: "relative inline-block rounded-xl overflow-hidden ring-1 ring-inset ring-black/5", children: [jsx("canvas", { ref: canvasRef, onClick: handleCanvasClick, className: "cursor-crosshair block" }), cursorPos && (jsx("div", { className: "absolute w-5 h-5 border-2 border-white rounded-full pointer-events-none", style: {
147
147
  left: `${cursorPos.x}%`,
@@ -134,7 +134,7 @@ const ComboboxOptions = ({ isOpen, onClose, triggerRef, portal, placement, offse
134
134
  * ```
135
135
  */
136
136
  const ComboboxInner = ({ options, value, onChange, placeholder = "Search...", label, helperText, size = "md", state = "default", clearable = true, iconStart, iconEnd, openOnFocus = true, filterFn = defaultFilterFn, emptyMessage = "No results found", creatable = false, onCreateOption, createLabel, required = false, name, className, wrapperClassName, inputClassName, dropdownClassName, theme: themeOverrides, portal = true, placement = "bottom-start", offset = 8, elevation, lift, id, ...props }, ref) => {
137
- var _a;
137
+ var _a, _b, _c, _d, _e, _f, _g;
138
138
  // Merge theme
139
139
  const theme = React__default.useMemo(() => ({ ...comboboxTheme, ...(themeOverrides || {}) }), [themeOverrides]);
140
140
  // Generate unique ID
@@ -169,6 +169,8 @@ const ComboboxInner = ({ options, value, onChange, placeholder = "Search...", la
169
169
  options: selectOptions,
170
170
  value,
171
171
  onChange: (newValue) => {
172
+ // useSelectState's payload is widened to `T | T[]` for Select's multi mode.
173
+ // Combobox has no `multiple` prop, so this is always the single value.
172
174
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
173
175
  },
174
176
  searchable: true, // Combobox is always searchable
@@ -403,8 +405,12 @@ const ComboboxInner = ({ options, value, onChange, placeholder = "Search...", la
403
405
  // Icon padding
404
406
  const hasLeftIcon = Boolean(iconStart);
405
407
  const hasRightIcon = Boolean(iconEnd);
406
- const iconStartPadding = hasLeftIcon ? theme.iconPadding.left : "";
407
- const iconEndPadding = hasRightIcon ? theme.iconPadding.right : "";
408
+ const iconStartPadding = hasLeftIcon
409
+ ? ((_c = (_b = theme.iconPaddings) === null || _b === void 0 ? void 0 : _b.left) === null || _c === void 0 ? void 0 : _c[size]) || theme.iconPadding.left
410
+ : "";
411
+ const iconEndPadding = hasRightIcon
412
+ ? ((_e = (_d = theme.iconPaddings) === null || _d === void 0 ? void 0 : _d.right) === null || _e === void 0 ? void 0 : _e[size]) || theme.iconPadding.right
413
+ : "";
408
414
  // Create a modified selectState for the provider with our custom filtered options
409
415
  const modifiedSelectState = React__default.useMemo(() => ({
410
416
  ...selectState,
@@ -414,7 +420,7 @@ const ComboboxInner = ({ options, value, onChange, placeholder = "Search...", la
414
420
  return (jsx(SelectProvider, { selectState: modifiedSelectState, size: size, componentState: state, theme: theme, searchable: true, enableTypeahead: false, children: jsxs("div", { ref: ref, className: cn("relative", containerClasses, stateClass, wrapperClassName), ...props, children: [label && (typeof label === 'string' ? (jsx(FormLabel, { htmlFor: comboboxId, state: state, required: required, children: label })) : (label)), jsxs("div", { ref: wrapperRef, className: theme.wrapperStyle, children: [jsx("div", { className: cn(inputGroupClasses, stateClasses, className), children: jsxs("div", { className: "relative flex-1", children: [jsx("input", { ref: inputRef, id: comboboxId, type: "text", role: "combobox", "aria-expanded": isOpen, "aria-haspopup": "listbox", "aria-controls": listboxId, "aria-activedescendant": highlightedIndex >= 0 &&
415
421
  customFilteredOptions[highlightedIndex]
416
422
  ? `${comboboxId}-option-${customFilteredOptions[highlightedIndex].id}`
417
- : undefined, "aria-autocomplete": "list", "aria-invalid": isInvalid, "aria-describedby": helperText ? `${comboboxId}-helper` : undefined, autoComplete: "off", className: cn(inputClasses, sizeClasses, iconStartPadding, (hasRightIcon || showClearButton) && iconEndPadding, showClearButton && "pr-8", inputClassName), value: searchValue, onChange: handleInputChange, onFocus: handleInputFocus, onKeyDown: handleKeyDown, placeholder: placeholder, disabled: isDisabled, required: required }), hasLeftIcon && (jsx("div", { className: theme.iconStartStyle, children: iconStart })), showClearButton && (jsx("button", { type: "button", className: theme.clearButtonStyle, onClick: handleClear, "aria-label": "Clear selection", tabIndex: -1, children: jsx(X, { className: theme.clearIconStyle }) })), hasRightIcon && !showClearButton && (jsx("div", { className: theme.iconEndStyle, children: iconEnd }))] }) }), jsx(ComboboxOptions, { isOpen: isOpen, onClose: () => setIsOpen(false), triggerRef: wrapperRef, portal: portal, placement: placement, offset: offset, emptyMessage: emptyMessage, className: dropdownClassName, listboxId: listboxId, comboboxId: comboboxId, elevation: elevation, lift: lift })] }), helperText && (typeof helperText === 'string' ? (jsx("p", { id: `${comboboxId}-helper`, className: cn(helperTextClasses, helperTextStateClasses), children: helperText })) : (helperText)), name && (jsx("input", { type: "hidden", name: name, value: value !== undefined ? String(value) : "" }))] }) }));
423
+ : undefined, "aria-autocomplete": "list", "aria-invalid": isInvalid, "aria-describedby": helperText ? `${comboboxId}-helper` : undefined, autoComplete: "off", className: cn(inputClasses, sizeClasses, iconStartPadding, (hasRightIcon || showClearButton) && iconEndPadding, showClearButton && "pr-8", inputClassName), value: searchValue, onChange: handleInputChange, onFocus: handleInputFocus, onKeyDown: handleKeyDown, placeholder: placeholder, disabled: isDisabled, required: required }), hasLeftIcon && (jsx("div", { className: ((_f = theme.iconStartStyles) === null || _f === void 0 ? void 0 : _f[size]) || theme.iconStartStyle, children: iconStart })), showClearButton && (jsx("button", { type: "button", className: theme.clearButtonStyle, onClick: handleClear, "aria-label": "Clear selection", tabIndex: -1, children: jsx(X, { className: theme.clearIconStyle }) })), hasRightIcon && !showClearButton && (jsx("div", { className: ((_g = theme.iconEndStyles) === null || _g === void 0 ? void 0 : _g[size]) || theme.iconEndStyle, children: iconEnd }))] }) }), jsx(ComboboxOptions, { isOpen: isOpen, onClose: () => setIsOpen(false), triggerRef: wrapperRef, portal: portal, placement: placement, offset: offset, emptyMessage: emptyMessage, className: dropdownClassName, listboxId: listboxId, comboboxId: comboboxId, elevation: elevation, lift: lift })] }), helperText && (typeof helperText === 'string' ? (jsx("p", { id: `${comboboxId}-helper`, className: cn(helperTextClasses, helperTextStateClasses), children: helperText })) : (helperText)), name && (jsx("input", { type: "hidden", name: name, value: value !== undefined ? String(value) : "" }))] }) }));
418
424
  };
419
425
  const ComboboxForwarded = React__default.forwardRef(ComboboxInner);
420
426
  ComboboxForwarded.displayName = "Combobox";
@@ -31,6 +31,15 @@ const comboboxTheme = {
31
31
  iconEndStyle: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none text-[var(--color-text-muted)]",
32
32
  // Icon padding configuration
33
33
  iconPadding: formsBaseTheme.iconStyles.padding,
34
+ // Size-aware icon geometry: slot inset from --form-px-*, glyph from
35
+ // --form-icon-size-*. Flat keys above stay as the fallback.
36
+ iconStartStyles: formsBaseTheme.iconStyles.leftSizes,
37
+ iconEndStyles: formsBaseTheme.iconStyles.rightSizes,
38
+ iconSizes: formsBaseTheme.iconStyles.sizes,
39
+ iconPaddings: {
40
+ left: formsBaseTheme.iconStyles.paddingLeftSizes,
41
+ right: formsBaseTheme.iconStyles.paddingRightSizes,
42
+ },
34
43
  // Clear button styles
35
44
  clearButtonStyle: "absolute inset-y-0 right-0 flex items-center pr-2 cursor-pointer " +
36
45
  "text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] transition-colors z-10",
@@ -97,8 +97,21 @@ export interface ComboboxTheme {
97
97
  sizes: Record<ComboboxSize, string>;
98
98
  states: Record<ComboboxState, string>;
99
99
  focusStates: Record<ComboboxState, string>;
100
+ /** @deprecated size-blind; superseded by `iconStartStyles` */
100
101
  iconStartStyle: string;
102
+ /** @deprecated size-blind; superseded by `iconEndStyles` */
101
103
  iconEndStyle: string;
104
+ /** Per-size leading icon slot (position + inset) */
105
+ iconStartStyles?: Partial<Record<ComboboxSize, string>>;
106
+ /** Per-size trailing icon slot (position + inset) */
107
+ iconEndStyles?: Partial<Record<ComboboxSize, string>>;
108
+ /** Per-size sizing for built-in icons */
109
+ iconSizes?: Record<ComboboxSize, string>;
110
+ /** Per-size text runway reserved for each icon slot */
111
+ iconPaddings?: {
112
+ left?: Partial<Record<ComboboxSize, string>>;
113
+ right?: Partial<Record<ComboboxSize, string>>;
114
+ };
102
115
  iconPadding: {
103
116
  left: string;
104
117
  right: string;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
- import React__default, { useState, useRef, useEffect, useCallback, useMemo } from 'react';
3
+ import React__default, { useState, useRef, useCallback, useMemo } from 'react';
4
4
  import { datePickerTheme } from './DatePicker.theme.js';
5
5
  import { FormLabel } from '../FormLabel/FormLabel.js';
6
6
  import { DatePickerTrigger } from './DatePickerTrigger.js';
@@ -50,30 +50,38 @@ const DatePickerComponent = React__default.forwardRef(({ id, name, mode = "singl
50
50
  const theme = { ...datePickerTheme };
51
51
  // State
52
52
  const [isOpen, setIsOpen] = useState(false);
53
- const [selectedValue, setSelectedValue] = useState(value || defaultValue);
53
+ // 🔴 §9: mode is DERIVED per render, never stored. `value` used to be mirrored
54
+ // into state and re-synced from an unconditional `useEffect(…, [value])` —
55
+ // which on mount fired with `value === undefined` and wiped the `defaultValue`
56
+ // seed, and in controlled mode let an ignored change stick because an
57
+ // unchanged prop never re-ran the effect.
58
+ const isControlled = value !== undefined;
59
+ const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue);
60
+ const selectedValue = isControlled ? value : uncontrolledValue;
54
61
  // Refs
55
62
  const triggerRef = useRef(null);
56
63
  const contentRef = useRef(null);
57
- // Update internal state when prop value changes
58
- useEffect(() => {
59
- setSelectedValue(value);
60
- }, [value]);
61
64
  // Date selection handler (single mode)
62
65
  const handleDateSelect = useCallback((newDate) => {
63
66
  if (mode === "single") {
64
- if (newDate !== selectedValue) {
65
- setSelectedValue(newDate);
67
+ // Compared by time, not identity: every calendar click builds a NEW Date,
68
+ // so an identity check was always true and the guard never fired.
69
+ const isSameSelection = selectedValue instanceof Date && selectedValue.getTime() === newDate.getTime();
70
+ if (!isSameSelection) {
71
+ if (!isControlled)
72
+ setUncontrolledValue(newDate);
66
73
  onChange === null || onChange === void 0 ? void 0 : onChange(newDate);
67
74
  }
68
75
  setIsOpen(false);
69
76
  }
70
- }, [mode, selectedValue, onChange]);
77
+ }, [mode, selectedValue, isControlled, onChange]);
71
78
  // Range selection handler (range mode)
72
79
  const handleRangeSelect = useCallback((newRange) => {
73
- setSelectedValue(newRange);
80
+ if (!isControlled)
81
+ setUncontrolledValue(newRange);
74
82
  onChange === null || onChange === void 0 ? void 0 : onChange(newRange);
75
83
  // Don't auto-close anymore - footer Apply button handles this
76
- }, [onChange]);
84
+ }, [isControlled, onChange]);
77
85
  // Button click handler
78
86
  const handleButtonClick = useCallback(() => {
79
87
  if (!disabled) {
@@ -105,7 +113,6 @@ const DatePickerComponent = React__default.forwardRef(({ id, name, mode = "singl
105
113
  isOpen,
106
114
  setIsOpen,
107
115
  selectedValue,
108
- setSelectedValue,
109
116
  minDate,
110
117
  maxDate,
111
118
  isDateDisabled,
@@ -26,6 +26,11 @@ const datePickerTheme = {
26
26
  triggerFocusStates: formsBaseTheme.focusStates,
27
27
  iconEndStyle: formsBaseTheme.iconStyles.right,
28
28
  iconEndPadding: formsBaseTheme.iconStyles.padding.right,
29
+ // Size-aware icon geometry: slot inset from --form-px-*, glyph from
30
+ // --form-icon-size-*. Flat keys above stay as the fallback.
31
+ iconEndStyles: formsBaseTheme.iconStyles.rightSizes,
32
+ iconEndPaddings: formsBaseTheme.iconStyles.paddingRightSizes,
33
+ iconSizes: formsBaseTheme.iconStyles.sizes,
29
34
  // Dropdown body - surface painted by the relative-elevation engine (surfaceClasses)
30
35
  bodyStyle: "min-w-fit max-w-none backdrop-blur-md border border-[var(--color-border)] rounded-[var(--popover-radius)] p-0 overflow-hidden z-[1000] fixed",
31
36
  bodyWithPresetsStyle: "flex flex-col sm:flex-row w-fit max-w-[calc(100vw-2rem)] sm:max-w-none backdrop-blur-md border border-[var(--color-border)] rounded-[var(--popover-radius)] shadow-lg p-0 overflow-hidden z-[1000] fixed",
@@ -155,8 +155,16 @@ export interface DatePickerTheme {
155
155
  triggerStates: Record<DatePickerState, string>;
156
156
  triggerHoverStates: Record<DatePickerState, string>;
157
157
  triggerFocusStates: Record<DatePickerState, string>;
158
+ /** @deprecated size-blind; superseded by `iconEndStyles` */
158
159
  iconEndStyle: string;
160
+ /** @deprecated size-blind; superseded by `iconEndPaddings` */
159
161
  iconEndPadding: string;
162
+ /** Per-size trailing icon slot (position + inset) */
163
+ iconEndStyles?: Partial<Record<DatePickerSize, string>>;
164
+ /** Per-size text runway reserved for the trailing icon */
165
+ iconEndPaddings?: Partial<Record<DatePickerSize, string>>;
166
+ /** Per-size sizing for the built-in calendar icon */
167
+ iconSizes?: Record<DatePickerSize, string>;
160
168
  bodyStyle: string;
161
169
  bodyWithPresetsStyle: string;
162
170
  presetsContainerStyle: string;
@@ -5,7 +5,6 @@ export interface DatePickerContextType {
5
5
  isOpen: boolean;
6
6
  setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
7
7
  selectedValue: Date | DateRange | undefined;
8
- setSelectedValue: React.Dispatch<React.SetStateAction<Date | DateRange | undefined>>;
9
8
  minDate?: Date;
10
9
  maxDate?: Date;
11
10
  isDateDisabled?: (date: Date) => boolean;
@@ -10,7 +10,7 @@ import { DatePickerContext } from './DatePickerContext.js';
10
10
  * Displays selected date or placeholder text
11
11
  */
12
12
  const DatePickerTrigger = ({ id, disabled, isOpen, state = "default", size = "md", className, onClick, onFocus, onBlur, children, 'aria-invalid': ariaInvalid, 'aria-describedby': ariaDescribedby, }) => {
13
- var _a, _b, _c, _d;
13
+ var _a, _b, _c, _d, _e, _f;
14
14
  const context = useContext(DatePickerContext);
15
15
  if (!context) {
16
16
  throw new Error("DatePickerTrigger must be used within a DatePicker");
@@ -21,7 +21,9 @@ const DatePickerTrigger = ({ id, disabled, isOpen, state = "default", size = "md
21
21
  const stateStyle = ((_b = theme.triggerStates) === null || _b === void 0 ? void 0 : _b[state]) || "";
22
22
  const hoverStateStyle = ((_c = theme.triggerHoverStates) === null || _c === void 0 ? void 0 : _c[state]) || "";
23
23
  const focusStateStyle = ((_d = theme.triggerFocusStates) === null || _d === void 0 ? void 0 : _d[state]) || "";
24
- const iconEndStyle = theme.iconEndStyle || "";
24
+ const iconEndStyle = ((_e = theme.iconEndStyles) === null || _e === void 0 ? void 0 : _e[size]) || theme.iconEndStyle || "";
25
+ // Glyph ramps with the control (--form-icon-size-*), not a flat h-4 w-4.
26
+ const iconSizeStyle = ((_f = theme.iconSizes) === null || _f === void 0 ? void 0 : _f[size]) || "size-4";
25
27
  const iconEndPadding = theme.iconEndPadding || ""; // Always apply right padding for built-in calendar icon
26
28
  const triggerButtonStyle = theme.triggerButtonStyle || "";
27
29
  // Apply focused styles when open - same pattern as SelectButton
@@ -29,7 +31,7 @@ const DatePickerTrigger = ({ id, disabled, isOpen, state = "default", size = "md
29
31
  ? focusStateStyle ||
30
32
  "shadow-[inset_0_0_0_1px_var(--color-primary-600)] ring-4 ring-[var(--color-primary)]/10"
31
33
  : "";
32
- return (jsx("div", { className: "relative w-full", children: jsxs("button", { ref: triggerRef, id: id, type: "button", className: cn(baseStyle, sizeStyle, stateStyle, hoverStateStyle, activeFocusState, iconEndPadding, triggerButtonStyle, "text-left", className), onClick: onClick, onFocus: onFocus, onBlur: onBlur, disabled: disabled, "aria-expanded": isOpen, "aria-haspopup": "dialog", "aria-label": "Open calendar", "aria-invalid": ariaInvalid, "aria-describedby": ariaDescribedby, children: [children, jsx("span", { className: iconEndStyle, children: jsx(Calendar, { className: "h-4 w-4" }) })] }) }));
34
+ return (jsx("div", { className: "relative w-full", children: jsxs("button", { ref: triggerRef, id: id, type: "button", className: cn(baseStyle, sizeStyle, stateStyle, hoverStateStyle, activeFocusState, iconEndPadding, triggerButtonStyle, "text-left", className), onClick: onClick, onFocus: onFocus, onBlur: onBlur, disabled: disabled, "aria-expanded": isOpen, "aria-haspopup": "dialog", "aria-label": "Open calendar", "aria-invalid": ariaInvalid, "aria-describedby": ariaDescribedby, children: [children, jsx("span", { className: iconEndStyle, children: jsx(Calendar, { className: iconSizeStyle }) })] }) }));
33
35
  };
34
36
 
35
37
  export { DatePickerTrigger };
@@ -19,6 +19,11 @@ const dateRangePickerTheme = {
19
19
  triggerFocusStates: formsBaseTheme.focusStates,
20
20
  iconEndStyle: formsBaseTheme.iconStyles.right,
21
21
  iconEndPadding: formsBaseTheme.iconStyles.padding.right,
22
+ // Size-aware icon geometry: slot inset from --form-px-*, glyph from
23
+ // --form-icon-size-*. Flat keys above stay as the fallback.
24
+ iconEndStyles: formsBaseTheme.iconStyles.rightSizes,
25
+ iconEndPaddings: formsBaseTheme.iconStyles.paddingRightSizes,
26
+ iconSizes: formsBaseTheme.iconStyles.sizes,
22
27
  bodyStyle: "flex flex-col sm:flex-row w-fit max-w-[calc(100vw-2rem)] sm:max-w-none backdrop-blur-md border border-[var(--color-border)] rounded-[var(--popover-radius)] shadow-lg p-0 overflow-hidden z-[1000] fixed",
23
28
  presetsContainerStyle: "hidden sm:flex flex-col gap-1 p-3 sm:border-r border-[var(--color-border)] bg-[var(--color-surface-sunken)] sm:min-w-[180px]",
24
29
  presetButtonStyle: "w-full text-left px-3 py-2 text-sm font-medium rounded-[calc(var(--radius-base)*0.75)] transition-colors cursor-pointer " +
@@ -29,7 +34,7 @@ const dateRangePickerTheme = {
29
34
  presetCheckmarkStyle: "size-4 text-[var(--color-primary)] shrink-0",
30
35
  mobilePresetsContainerStyle: "sm:hidden px-3 pt-3 pb-1",
31
36
  mobilePresetButtonStyle: "whitespace-nowrap px-3 py-1.5 text-xs font-medium rounded-full transition-colors cursor-pointer shrink-0 " +
32
- "bg-[var(--color-background-secondary)] text-[var(--color-text-secondary)] " +
37
+ "bg-[var(--color-surface)] text-[var(--color-text-secondary)] " +
33
38
  "hover:bg-[var(--color-surface-hover)] hover:text-[var(--color-text-primary)] " +
34
39
  "data-[active=true]:bg-[var(--color-primary-50)] data-[active=true]:text-[var(--color-primary)] " +
35
40
  "dark:data-[active=true]:bg-[var(--color-primary-950)] dark:data-[active=true]:text-[var(--color-primary-300)]",
@@ -163,8 +163,16 @@ export interface DateRangePickerTheme {
163
163
  triggerStates: Record<DateRangePickerState, string>;
164
164
  triggerHoverStates: Record<DateRangePickerState, string>;
165
165
  triggerFocusStates: Record<DateRangePickerState, string>;
166
+ /** @deprecated size-blind; superseded by `iconEndStyles` */
166
167
  iconEndStyle: string;
168
+ /** @deprecated size-blind; superseded by `iconEndPaddings` */
167
169
  iconEndPadding: string;
170
+ /** Per-size trailing icon slot (position + inset) */
171
+ iconEndStyles?: Partial<Record<DateRangePickerSize, string>>;
172
+ /** Per-size text runway reserved for the trailing icon */
173
+ iconEndPaddings?: Partial<Record<DateRangePickerSize, string>>;
174
+ /** Per-size sizing for the built-in calendar icon */
175
+ iconSizes?: Record<DateRangePickerSize, string>;
168
176
  bodyStyle: string;
169
177
  presetsContainerStyle: string;
170
178
  presetButtonStyle: string;
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { createContext } from 'react';
2
3
 
3
4
  const DateRangePickerContext = createContext(undefined);
@@ -9,7 +9,7 @@ import { DateRangePickerContext } from './DateRangePickerContext.js';
9
9
  * DateRangePicker Trigger Component — styled like form input
10
10
  */
11
11
  const DateRangePickerTrigger = ({ id, disabled, isOpen, state = "default", size = "md", className, onClick, onFocus, onBlur, children, 'aria-invalid': ariaInvalid, 'aria-describedby': ariaDescribedby, }) => {
12
- var _a, _b, _c, _d;
12
+ var _a, _b, _c, _d, _e, _f;
13
13
  const context = useContext(DateRangePickerContext);
14
14
  if (!context) {
15
15
  throw new Error("DateRangePickerTrigger must be used within a DateRangePicker");
@@ -20,14 +20,16 @@ const DateRangePickerTrigger = ({ id, disabled, isOpen, state = "default", size
20
20
  const stateStyle = ((_b = theme.triggerStates) === null || _b === void 0 ? void 0 : _b[state]) || "";
21
21
  const hoverStateStyle = ((_c = theme.triggerHoverStates) === null || _c === void 0 ? void 0 : _c[state]) || "";
22
22
  const focusStateStyle = ((_d = theme.triggerFocusStates) === null || _d === void 0 ? void 0 : _d[state]) || "";
23
- const iconEndStyle = theme.iconEndStyle || "";
23
+ const iconEndStyle = ((_e = theme.iconEndStyles) === null || _e === void 0 ? void 0 : _e[size]) || theme.iconEndStyle || "";
24
+ // Glyph ramps with the control (--form-icon-size-*), not a flat h-4 w-4.
25
+ const iconSizeStyle = ((_f = theme.iconSizes) === null || _f === void 0 ? void 0 : _f[size]) || "size-4";
24
26
  const iconEndPadding = theme.iconEndPadding || "";
25
27
  const triggerButtonStyle = theme.triggerButtonStyle || "";
26
28
  const activeFocusState = isOpen
27
29
  ? focusStateStyle ||
28
30
  "shadow-[inset_0_0_0_1px_var(--color-primary-600)] ring-4 ring-[var(--color-primary)]/10"
29
31
  : "";
30
- return (jsx("div", { className: "relative w-full", children: jsxs("button", { ref: triggerRef, id: id, type: "button", className: cn(baseStyle, sizeStyle, stateStyle, hoverStateStyle, activeFocusState, iconEndPadding, triggerButtonStyle, "text-left", className), onClick: onClick, onFocus: onFocus, onBlur: onBlur, disabled: disabled, "aria-expanded": isOpen, "aria-haspopup": "dialog", "aria-label": "Open date range picker", "aria-invalid": ariaInvalid, "aria-describedby": ariaDescribedby, children: [children, jsx("span", { className: iconEndStyle, children: jsx(Calendar, { className: "h-4 w-4" }) })] }) }));
32
+ return (jsx("div", { className: "relative w-full", children: jsxs("button", { ref: triggerRef, id: id, type: "button", className: cn(baseStyle, sizeStyle, stateStyle, hoverStateStyle, activeFocusState, iconEndPadding, triggerButtonStyle, "text-left", className), onClick: onClick, onFocus: onFocus, onBlur: onBlur, disabled: disabled, "aria-expanded": isOpen, "aria-haspopup": "dialog", "aria-label": "Open date range picker", "aria-invalid": ariaInvalid, "aria-describedby": ariaDescribedby, children: [children, jsx("span", { className: iconEndStyle, children: jsx(Calendar, { className: iconSizeStyle }) })] }) }));
31
33
  };
32
34
 
33
35
  export { DateRangePickerTrigger };
@@ -2,7 +2,7 @@ const fileUploadTheme = {
2
2
  // Root container
3
3
  containerStyle: "w-full",
4
4
  // Dropzone area (default state)
5
- dropzoneStyle: "relative flex flex-col items-center justify-center w-full min-h-[160px] p-6 border border-dashed border-[var(--color-border)] rounded-[var(--form-radius)] bg-[var(--color-surface)] hover:border-[var(--color-border-hover)] transition-colors duration-400 cursor-pointer",
5
+ dropzoneStyle: "relative flex flex-col items-center justify-center w-full min-h-[160px] p-6 border border-dashed border-[var(--color-border)] rounded-[var(--form-radius)] bg-[var(--color-surface)] hover:border-[var(--color-border-hover)] transition-colors duration-[var(--motion-duration-slower)] cursor-pointer",
6
6
  // Dragging over — translucent primary tint composites over the surface in both modes
7
7
  dropzoneActiveStyle: "border-solid border-[var(--color-primary)] bg-[var(--color-primary)]/5",
8
8
  // Disabled
@@ -20,7 +20,7 @@ const fileUploadTheme = {
20
20
  // Non-image tile — centered document icon (filename surfaced via title tooltip)
21
21
  previewFileStyle: "flex items-center justify-center size-full text-[var(--color-text-muted)]",
22
22
  // Remove button (revealed on item hover)
23
- removeButtonStyle: "absolute top-1 right-1 -translate-y-1 opacity-0 group-hover:opacity-100 transition-all duration-400 group-hover:-translate-y-0",
23
+ removeButtonStyle: "absolute top-1 right-1 -translate-y-1 opacity-0 group-hover:opacity-100 transition-all duration-[var(--motion-duration-slower)] group-hover:-translate-y-0",
24
24
  };
25
25
 
26
26
  export { fileUploadTheme };
@@ -1,7 +1,7 @@
1
1
  const fileUploadProgressTheme = {
2
2
  containerStyle: "flex flex-col gap-3",
3
3
  itemStyle: "w-full flex items-center gap-x-3",
4
- iconContainerStyle: "flex items-center justify-center rounded-lg shrink-0 border border-[var(--color-border)] bg-[var(--color-background-secondary)]",
4
+ iconContainerStyle: "flex items-center justify-center rounded-lg shrink-0 border border-[var(--color-border)] bg-[var(--color-surface)]",
5
5
  iconStyle: "shrink-0 size-5 text-[var(--color-text-muted)]",
6
6
  fileInfoStyle: "flex-1 min-w-0",
7
7
  fileNameStyle: "text-sm font-medium text-[var(--color-text-primary)] truncate",
@@ -20,16 +20,16 @@ const PasswordToggleButton = ({ showPassword, onToggle, passwordToggleClasses, }
20
20
  }
21
21
  }, children: showPassword ? (jsx(EyeSlash, { className: toggleIconActive, "aria-hidden": "true" })) : (jsx(Eye, { className: toggleIconInactive, "aria-hidden": "true" })) }));
22
22
  };
23
- const NumberButtons = ({ isDisabled, isAtMax, isAtMin, onIncrement, onDecrement, numberButtonsContainerClasses, numberButtonClasses, }) => {
23
+ const NumberButtons = ({ isDisabled, isAtMax, isAtMin, onIncrement, onDecrement, numberButtonsContainerClasses, numberButtonClasses, iconSizeClass, }) => {
24
24
  const incrementIconStyle = inputTheme.typeStyles.number.incrementIconStyle;
25
25
  const decrementIconStyle = inputTheme.typeStyles.number.decrementIconStyle;
26
26
  return (jsxs("div", { className: numberButtonsContainerClasses, children: [jsx("button", { type: "button", className: `${numberButtonClasses}`, onClick: (e) => {
27
27
  e.stopPropagation();
28
28
  onDecrement();
29
- }, disabled: isDisabled || isAtMin, "aria-label": "Decrease value", tabIndex: -1, children: jsx(Minus, { className: cn("size-4", decrementIconStyle), "aria-hidden": "true" }) }), jsx("button", { type: "button", className: `${numberButtonClasses}`, onClick: (e) => {
29
+ }, disabled: isDisabled || isAtMin, "aria-label": "Decrease value", tabIndex: -1, children: jsx(Minus, { className: cn(iconSizeClass, decrementIconStyle), "aria-hidden": "true" }) }), jsx("button", { type: "button", className: `${numberButtonClasses}`, onClick: (e) => {
30
30
  e.stopPropagation();
31
31
  onIncrement();
32
- }, disabled: isDisabled || isAtMax, "aria-label": "Increase value", tabIndex: -1, children: jsx(Plus, { className: cn("size-4", incrementIconStyle), "aria-hidden": "true" }) })] }));
32
+ }, disabled: isDisabled || isAtMax, "aria-label": "Increase value", tabIndex: -1, children: jsx(Plus, { className: cn(iconSizeClass, incrementIconStyle), "aria-hidden": "true" }) })] }));
33
33
  };
34
34
  const getActiveDots = (strength) => {
35
35
  switch (strength) {
@@ -68,6 +68,7 @@ const PasswordStrengthIndicator = ({ inline = false, passwordStrengthIndicator,
68
68
  // Main Input Component
69
69
  // ============================================================================
70
70
  const Input = React__default.forwardRef(({ size = "md", state = "default", className = "", label, labelClassName = "", helperText, errorMessage, helperTextClassName = "", wrapperClassName = "", inputGroupClassName = "", iconStart, iconEnd, contentStart, contentEnd, keyboardShortcut, id, required, type = "text", passwordToggle = type === "password", passwordStrengthIndicator, showNumberControls = false, min, max, step = 1, onChange, onValueChange, onFocus, onBlur, value, currencyDecimalPlaces, darkMode = false, showTypeIcon = true, ...props }, ref) => {
71
+ var _a, _b, _c, _d, _e, _f, _g;
71
72
  const [isFocused, setIsFocused] = useState(false);
72
73
  const [showPassword, setShowPassword] = useState(false);
73
74
  const generatedId = React__default.useId();
@@ -81,9 +82,12 @@ const Input = React__default.forwardRef(({ size = "md", state = "default", class
81
82
  : undefined);
82
83
  const inputRef = useRef(null);
83
84
  const cursorPositionRef = useRef(null);
84
- // Default icons based on input type
85
- const defaultPasswordIcon = showTypeIcon && type === "password" && !iconStart ? (jsx(Lock, { className: "size-5 text-[var(--color-text-muted)]" })) : null;
86
- const defaultSearchIcon = showTypeIcon && type === "search" && !iconStart ? (jsx(MagnifyingGlass, { className: cn("size-5", inputTheme.typeStyles.search.iconStyle) })) : null;
85
+ // Default icons based on input type. Sized from the shared control-icon
86
+ // ramp (--form-icon-size-*) rather than a flat size-5, so they scale with
87
+ // the field and with a theme that retunes it.
88
+ const iconSizeClass = ((_a = inputTheme.iconSizes) === null || _a === void 0 ? void 0 : _a[size]) || "size-4";
89
+ const defaultPasswordIcon = showTypeIcon && type === "password" && !iconStart ? (jsx(Lock, { className: cn(iconSizeClass, "text-[var(--color-text-muted)]") })) : null;
90
+ const defaultSearchIcon = showTypeIcon && type === "search" && !iconStart ? (jsx(MagnifyingGlass, { className: cn(iconSizeClass, inputTheme.typeStyles.search.iconStyle) })) : null;
87
91
  // Use the provided iconStart or the default icon based on input type
88
92
  const finalLeftIcon = iconStart || defaultPasswordIcon || defaultSearchIcon;
89
93
  // Derived state flags for internal use
@@ -253,11 +257,12 @@ const Input = React__default.forwardRef(({ size = "md", state = "default", class
253
257
  const sizeClasses = inputTheme.sizes[size];
254
258
  const stateClasses = inputTheme.states[state];
255
259
  const helperTextClasses = inputTheme.helperText;
256
- // Icon classes using design tokens
257
- const iconStartClasses = inputTheme.iconStartStyle;
258
- const iconEndClasses = inputTheme.iconEndStyle;
259
- const iconStartPadding = inputTheme.iconPadding.left;
260
- const iconEndPadding = inputTheme.iconPadding.right;
260
+ // Icon classes using design tokens — size-aware slot inset and text runway,
261
+ // falling back to the flat originals if a theme only overrode those.
262
+ const iconStartClasses = ((_b = inputTheme.iconStartStyles) === null || _b === void 0 ? void 0 : _b[size]) || inputTheme.iconStartStyle;
263
+ const iconEndClasses = ((_c = inputTheme.iconEndStyles) === null || _c === void 0 ? void 0 : _c[size]) || inputTheme.iconEndStyle;
264
+ const iconStartPadding = ((_e = (_d = inputTheme.iconPaddings) === null || _d === void 0 ? void 0 : _d.left) === null || _e === void 0 ? void 0 : _e[size]) || inputTheme.iconPadding.left;
265
+ const iconEndPadding = ((_g = (_f = inputTheme.iconPaddings) === null || _f === void 0 ? void 0 : _f.right) === null || _g === void 0 ? void 0 : _g[size]) || inputTheme.iconPadding.right;
261
266
  // Content classes - size-aware
262
267
  const contentStyleClasses = inputTheme.contentStyle[size];
263
268
  const contentStartStyle = inputTheme.contentStartStyle;
@@ -282,7 +287,7 @@ const Input = React__default.forwardRef(({ size = "md", state = "default", class
282
287
  }, onBlur: (e) => {
283
288
  setIsFocused(false);
284
289
  onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
285
- }, placeholder: props.placeholder, ...props }), hasLeftIcon && (jsx("div", { className: iconStartClasses, children: finalLeftIcon })), hasRightIcon && !isPasswordField && !displayNumberControls && (jsx("div", { className: iconEndClasses, children: iconEnd })), isPasswordField && (jsx(PasswordToggleButton, { showPassword: showPassword, onToggle: handleTogglePassword, passwordToggleClasses: passwordToggleClasses })), displayNumberControls && (jsx(NumberButtons, { isDisabled: isDisabled, isAtMax: isAtMax, isAtMin: isAtMin, onIncrement: handleIncrement, onDecrement: handleDecrement, numberButtonsContainerClasses: numberButtonsContainerClasses, numberButtonClasses: numberButtonClasses })), hasKeyboardShortcut && (jsx("div", { className: inputTheme.keyboardShortcutStyle, children: keyboardShortcut }))] }), hasContentEnd && (jsx("div", { "data-slot": "content-end", className: cn(contentStyleClasses, contentEndStyle), children: contentEnd }))] }) }), showStrengthBelow && jsx(PasswordStrengthIndicator, { inline: false, passwordStrengthIndicator: passwordStrengthIndicator }), displayedMessage && (typeof displayedMessage === 'string' ? (jsx("div", { id: `${inputId}-helper`, className: cn(helperTextClasses, helperTextClassName), role: isInvalid ? "alert" : undefined, children: displayedMessage })) : (displayedMessage))] }));
290
+ }, placeholder: props.placeholder, ...props }), hasLeftIcon && (jsx("div", { className: iconStartClasses, children: finalLeftIcon })), hasRightIcon && !isPasswordField && !displayNumberControls && (jsx("div", { className: iconEndClasses, children: iconEnd })), isPasswordField && (jsx(PasswordToggleButton, { showPassword: showPassword, onToggle: handleTogglePassword, passwordToggleClasses: passwordToggleClasses })), displayNumberControls && (jsx(NumberButtons, { isDisabled: isDisabled, isAtMax: isAtMax, isAtMin: isAtMin, onIncrement: handleIncrement, onDecrement: handleDecrement, numberButtonsContainerClasses: numberButtonsContainerClasses, numberButtonClasses: numberButtonClasses, iconSizeClass: iconSizeClass })), hasKeyboardShortcut && (jsx("div", { className: inputTheme.keyboardShortcutStyle, children: keyboardShortcut }))] }), hasContentEnd && (jsx("div", { "data-slot": "content-end", className: cn(contentStyleClasses, contentEndStyle), children: contentEnd }))] }) }), showStrengthBelow && jsx(PasswordStrengthIndicator, { inline: false, passwordStrengthIndicator: passwordStrengthIndicator }), displayedMessage && (typeof displayedMessage === 'string' ? (jsx("div", { id: `${inputId}-helper`, className: cn(helperTextClasses, helperTextClassName), role: isInvalid ? "alert" : undefined, children: displayedMessage })) : (displayedMessage))] }));
286
291
  });
287
292
  Input.displayName = "Input";
288
293
 
@@ -45,6 +45,16 @@ const inputTheme = {
45
45
  // Icon positioning styles
46
46
  iconStartStyle: formsBaseTheme.iconStyles.left,
47
47
  iconEndStyle: formsBaseTheme.iconStyles.right,
48
+ // Size-aware icon geometry: slot inset from --form-px-*, glyph from
49
+ // --form-icon-size-*. The flat keys above stay as the fallback for a theme
50
+ // that only overrode those.
51
+ iconStartStyles: formsBaseTheme.iconStyles.leftSizes,
52
+ iconEndStyles: formsBaseTheme.iconStyles.rightSizes,
53
+ iconSizes: formsBaseTheme.iconStyles.sizes,
54
+ iconPaddings: {
55
+ left: formsBaseTheme.iconStyles.paddingLeftSizes,
56
+ right: formsBaseTheme.iconStyles.paddingRightSizes,
57
+ },
48
58
  // Icon padding configuration
49
59
  iconPadding: formsBaseTheme.iconStyles.padding,
50
60
  // Content styles - prefix/suffix content with size-aware font sizes
@@ -115,12 +115,26 @@ export interface InputTheme {
115
115
  sizes: Record<InputSize, string>;
116
116
  states: Record<InputState, string>;
117
117
  helperText: string;
118
+ /** @deprecated size-blind; superseded by `iconStartStyles` */
118
119
  iconStartStyle: string;
120
+ /** @deprecated size-blind; superseded by `iconEndStyles` */
119
121
  iconEndStyle: string;
122
+ /** @deprecated size-blind; superseded by `iconPaddings` */
120
123
  iconPadding: {
121
124
  left: string;
122
125
  right: string;
123
126
  };
127
+ /** Per-size leading icon slot (position + inset) */
128
+ iconStartStyles?: Partial<Record<InputSize, string>>;
129
+ /** Per-size trailing icon slot (position + inset) */
130
+ iconEndStyles?: Partial<Record<InputSize, string>>;
131
+ /** Per-size text runway reserved for each icon slot */
132
+ iconPaddings?: {
133
+ left?: Partial<Record<InputSize, string>>;
134
+ right?: Partial<Record<InputSize, string>>;
135
+ };
136
+ /** Per-size sizing for the built-in type icons (lock, search) */
137
+ iconSizes?: Record<InputSize, string>;
124
138
  contentStyle: Record<InputSize, string>;
125
139
  contentStartStyle: string;
126
140
  contentEndStyle: string;
@@ -75,7 +75,7 @@ const DEFAULT_COUNTRIES = [
75
75
  * />
76
76
  * ```
77
77
  */
78
- const InputAddress = React__default.forwardRef(({ state = 'default', errorMessage, showCountrySelector = true, showPostalCode = true, availableCountries = [], defaultCountry = "United States", onCountryChange, onPostalCodeChange, countryLabel = "Country", postalCodeLabel = "ZIP / Postal code", legendText = "Billing address", streetInputProps = {}, stateInputProps = {}, countryInputProps = {}, postalCodeInputProps = {}, className = "", theme = {}, }, ref) => {
78
+ const InputAddress = React__default.forwardRef(({ state = 'default', size = 'md', errorMessage, showCountrySelector = true, showPostalCode = true, availableCountries = [], defaultCountry = "United States", onCountryChange, onPostalCodeChange, countryLabel = "Country", postalCodeLabel = "ZIP / Postal code", legendText = "Billing address", streetInputProps = {}, stateInputProps = {}, countryInputProps = {}, postalCodeInputProps = {}, className = "", theme = {}, }, ref) => {
79
79
  var _a;
80
80
  const isDisabled = state === 'disabled';
81
81
  // Clear the error visually as soon as the user starts re-entering after an error.
@@ -140,10 +140,10 @@ const InputAddress = React__default.forwardRef(({ state = 'default', errorMessag
140
140
  const isBottomRowSplit = showCountrySelector && showPostalCode;
141
141
  // Merge group state into each field's props; strip per-field helperText so only the
142
142
  // consolidated message shows at the bottom.
143
- const { helperText: _st, onChange: _stOnChange, ...streetProps } = { state: fieldState, ...streetInputProps };
144
- const { helperText: _sa, onChange: _saOnChange, ...stateProps } = { state: fieldState, ...stateInputProps };
145
- const { helperText: _co, className: _coClass, ...countryProps } = { state: fieldState, ...countryInputProps };
146
- const { helperText: _pc, ...postalProps } = { state: fieldState, ...postalCodeInputProps };
143
+ const { helperText: _st, onChange: _stOnChange, ...streetProps } = { state: fieldState, size, ...streetInputProps };
144
+ const { helperText: _sa, onChange: _saOnChange, ...stateProps } = { state: fieldState, size, ...stateInputProps };
145
+ const { helperText: _co, className: _coClass, ...countryProps } = { state: fieldState, size, ...countryInputProps };
146
+ const { helperText: _pc, ...postalProps } = { state: fieldState, size, ...postalCodeInputProps };
147
147
  return (jsxs("fieldset", { ref: ref, className: `w-full border-0 m-0 p-0 ${isInvalid ? 'state-invalid' : ''} ${className}`, "data-testid": "input-address-fieldset", "aria-invalid": isInvalid || undefined, "aria-errormessage": isInvalid && errorMessage ? errorId : undefined, children: [jsx("legend", { className: `block text-sm/6 font-medium mb-2 text-[var(--color-text-primary)] ${(_a = mergedTheme.legendStyles) !== null && _a !== void 0 ? _a : ""}`, children: legendText }), jsxs("div", { className: `relative grid gap-0 ${mergedTheme.contentStyles}`, "data-testid": "input-address-content", children: [jsx("div", { className: "w-full relative focus-within:z-10 hover:z-10", "data-testid": "input-address-street", children: jsx(Input, { id: streetId, type: "text", placeholder: "Street address", "aria-label": "street address", inputGroupClassName: "rounded-b-none", ...streetProps, onChange: markDirty(_stOnChange) }) }), jsx("div", { className: "w-full -mt-[0.5px] relative focus-within:z-10 hover:z-10", "data-testid": "input-address-state", children: jsx(Input, { id: stateId, type: "text", placeholder: "State", "aria-label": "state", inputGroupClassName: showBottomRow ? "rounded-none" : "rounded-t-none", ...stateProps, onChange: markDirty(_saOnChange) }) }), showBottomRow && (jsxs("div", { className: cn("grid grid-cols-1 w-full -mt-px relative focus-within:z-10 hover:z-10", isBottomRowSplit && "sm:grid-cols-2"), children: [showCountrySelector && (jsx("div", { className: `${mergedTheme.countryWrapperStyles} w-full sm:pr-0 relative focus-within:z-10 hover:z-10`, "data-testid": "input-address-country", children: jsx(Select, { id: countryId, options: countryOptions, value: country, onChange: handleCountryChange, placeholder: countryLabel, searchable: true, searchPlaceholder: `Search ${countryLabel.toLowerCase()}`, disabled: isDisabled,
148
148
  // className lands on the Select trigger button (which carries the same
149
149
  // inputGroup border/radius as Input's inputGroupClassName target), so the
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { InputProps, InputTheme } from '../Input/Input.types';
3
- import { SelectProps } from '../Select/Select.types';
3
+ import { SelectSingleProps } from '../Select/Select.types';
4
4
  /**
5
5
  * InputAddress component props
6
6
  * @property {boolean} showCountrySelector - Whether to show the country selector
@@ -17,6 +17,13 @@ import { SelectProps } from '../Select/Select.types';
17
17
  export interface InputAddressProps {
18
18
  /** Visual/validation state of the entire address group */
19
19
  state?: 'default' | 'disabled' | 'invalid';
20
+ /**
21
+ * Size of every field in the group, from the shared `--form-*` scale, so the
22
+ * address block lines up with the Inputs and Selects around it. A per-field
23
+ * `*InputProps.size` still wins.
24
+ * @default 'md'
25
+ */
26
+ size?: InputProps['size'];
20
27
  /** Consolidated error message shown below all fields when `state="invalid"` */
21
28
  errorMessage?: React.ReactNode;
22
29
  /** Whether to show the country selector */
@@ -42,7 +49,7 @@ export interface InputAddressProps {
42
49
  /** Props passed to the state input */
43
50
  stateInputProps?: Omit<InputProps, 'ref'>;
44
51
  /** Props passed to the country Select (e.g. `searchable`, `placement`, `theme`) */
45
- countryInputProps?: Partial<SelectProps<string>>;
52
+ countryInputProps?: Partial<SelectSingleProps<string>>;
46
53
  /** Props passed to the postal code input */
47
54
  postalCodeInputProps?: Omit<InputProps, 'ref'>;
48
55
  /** Class name for the container */