@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,55 +1,37 @@
1
1
  "use client";
2
- import { jsxs, jsx } from 'react/jsx-runtime';
3
- import React__default, { useState, useCallback } from 'react';
4
- import { useReducedMotion, AnimatePresence, motion } from 'motion/react';
5
- import { X } from '@phosphor-icons/react';
2
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
3
+ import React__default from 'react';
4
+ import { useReducedMotion, motion } from 'motion/react';
6
5
  import { cn } from '../../../utils/cn.js';
7
6
  import { Avatar } from '../Avatar/Avatar.js';
8
- import { animationTiming, dismissVariants, badgeVariants, dismissButtonVariants, dotVariants } from './Badge.animations.js';
7
+ import { badgeVariants, dotVariants } from './Badge.animations.js';
9
8
  import { badgeTheme } from './Badge.theme.js';
10
9
 
11
10
  /**
12
- * Badge component for displaying status, labels, or counters.
11
+ * Badge a non-interactive status/metadata label.
12
+ *
13
+ * 🔴 Badge is deliberately a PURE LABEL: no dismiss, no disabled, no blessed
14
+ * click target. For a removable chip use `Tag`; for a selectable filter chip use
15
+ * `Pill`; for anything that performs an action use `Button`. See CLAUDE.md §8b.
13
16
  *
14
17
  * @component
15
18
  * @example
16
19
  * ```tsx
17
- * <Badge variant="primary" size="md" pill>New Feature</Badge>
18
- * <Badge variant="success" withDot>Ready</Badge>
19
- * <Badge dismissible onDismiss={handleDismiss}>Removable</Badge>
20
+ * <Badge color="primary" size="md" pill>New Feature</Badge>
21
+ * <Badge color="success" withDot>Ready</Badge>
20
22
  * ```
21
23
  */
22
- const Badge = React__default.memo(React__default.forwardRef(({ children, variant = "filled", color = "primary", size = "md", pill = false, withDot = false, iconStart, avatar, dismissible = false, onDismiss, disabled = false, maxWidth, className, theme: customTheme = {}, onClick, darkMode = false, ...props }, ref) => {
23
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
24
- // State management
25
- const [isVisible, setIsVisible] = useState(true);
24
+ const Badge = React__default.memo(React__default.forwardRef(({ children, variant = "soft", color = "primary", size = "md", pill = false, withDot = false, iconStart, avatar, maxWidth, className, theme: customTheme = {}, darkMode = false, ...props }, ref) => {
25
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
26
26
  // useReducedMotion is SSR-safe (returns null on server, actual value after hydration)
27
27
  const prefersReducedMotion = useReducedMotion();
28
28
  const shouldAnimate = !prefersReducedMotion;
29
29
  // Development-only warnings
30
30
  if (process.env.NODE_ENV !== "production") {
31
- if (dismissible && !onDismiss) {
32
- console.warn("[Badge]: onDismiss prop is required when dismissible is true");
33
- }
34
31
  if (avatar && iconStart) {
35
32
  console.warn("[Badge]: Both avatar and iconStart provided. Avatar takes precedence.");
36
33
  }
37
34
  }
38
- // Handle dismiss button click
39
- const handleDismiss = useCallback((e) => {
40
- e.stopPropagation();
41
- setIsVisible(false);
42
- // Delay the onDismiss call until after the animation
43
- setTimeout(() => {
44
- onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss(e);
45
- }, animationTiming.dismissDelay);
46
- }, [onDismiss]);
47
- // Handle badge click
48
- const handleClick = useCallback((e) => {
49
- if (disabled)
50
- return;
51
- onClick === null || onClick === void 0 ? void 0 : onClick(e);
52
- }, [onClick, disabled]);
53
35
  // Merge default theme with custom theme overrides
54
36
  const theme = {
55
37
  ...badgeTheme,
@@ -76,6 +58,10 @@ const Badge = React__default.memo(React__default.forwardRef(({ children, variant
76
58
  ...badgeTheme.sizes,
77
59
  ...customTheme.sizes,
78
60
  },
61
+ radiusSizes: {
62
+ ...badgeTheme.radiusSizes,
63
+ ...customTheme.radiusSizes,
64
+ },
79
65
  pillSizes: {
80
66
  ...badgeTheme.pillSizes,
81
67
  ...customTheme.pillSizes,
@@ -88,18 +74,10 @@ const Badge = React__default.memo(React__default.forwardRef(({ children, variant
88
74
  ...badgeTheme.avatarSizes,
89
75
  ...customTheme.avatarSizes,
90
76
  },
91
- dismissSizes: {
92
- ...badgeTheme.dismissSizes,
93
- ...customTheme.dismissSizes,
94
- },
95
77
  dotColors: {
96
78
  ...badgeTheme.dotColors,
97
79
  ...customTheme.dotColors,
98
80
  },
99
- states: {
100
- ...badgeTheme.states,
101
- ...customTheme.states,
102
- },
103
81
  };
104
82
  // Get styles from theme
105
83
  const variantStyles = ((_g = theme.variants) === null || _g === void 0 ? void 0 : _g[variant]) || "";
@@ -107,22 +85,16 @@ const Badge = React__default.memo(React__default.forwardRef(({ children, variant
107
85
  const sizeStyle = ((_k = theme.sizes) === null || _k === void 0 ? void 0 : _k[size]) || "";
108
86
  const shapeStyle = pill
109
87
  ? "rounded-full"
110
- : "rounded-[var(--badge-radius)]";
111
- const dotColorStyle = ((_l = theme.dotColors) === null || _l === void 0 ? void 0 : _l[color]) || "";
112
- // Build base styles with all states
113
- const isInteractive = dismissible;
114
- const baseStyles = cn(theme.baseStyle, shapeStyle, variantStyles, colorStyles, sizeStyle, pill && ((_m = theme.pillSizes) === null || _m === void 0 ? void 0 : _m[size]), isInteractive && "cursor-pointer", disabled && ((_o = theme.states) === null || _o === void 0 ? void 0 : _o.disabled), darkMode && "dark", className);
88
+ : ((_l = theme.radiusSizes) === null || _l === void 0 ? void 0 : _l[size]) || "";
89
+ const dotColorStyle = ((_m = theme.dotColors) === null || _m === void 0 ? void 0 : _m[color]) || "";
90
+ const baseStyles = cn(theme.baseStyle, shapeStyle, variantStyles, colorStyles, sizeStyle, pill && ((_o = theme.pillSizes) === null || _o === void 0 ? void 0 : _o[size]), darkMode && "dark", className);
115
91
  // Create data attributes for styling hooks
116
92
  const dataAttributes = {
117
93
  "data-variant": variant,
118
94
  "data-color": color,
119
95
  "data-size": size,
120
- "data-state": isVisible ? "visible" : "hidden",
121
96
  "data-pill": pill ? "true" : "false",
122
97
  "data-with-dot": withDot ? "true" : "false",
123
- "data-dismissible": dismissible ? "true" : "false",
124
- "data-disabled": disabled ? "true" : "false",
125
- "data-interactive": isInteractive ? "true" : "false",
126
98
  };
127
99
  // Render left content (priority: avatar → iconStart → dot)
128
100
  const renderLeftContent = () => {
@@ -146,25 +118,16 @@ const Badge = React__default.memo(React__default.forwardRef(({ children, variant
146
118
  }
147
119
  return null;
148
120
  };
121
+ const content = (jsxs(Fragment, { children: [renderLeftContent(), jsx("span", { className: cn("badge-content", maxWidth && "truncate"), style: maxWidth
122
+ ? {
123
+ maxWidth: typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth,
124
+ }
125
+ : undefined, children: children })] }));
149
126
  if (!shouldAnimate) {
150
127
  // Spread props directly — Badge only receives HTMLSpanElement attributes
151
- const restHtmlProps = props;
152
- // Non-animated render for reduced-motion environments
153
- return isVisible ? (jsxs("span", { ref: ref, className: baseStyles, onClick: handleClick, "aria-disabled": disabled || undefined, ...dataAttributes, ...restHtmlProps, children: [renderLeftContent(), jsx("span", { className: cn("badge-content", maxWidth && "truncate"), style: maxWidth
154
- ? {
155
- maxWidth: typeof maxWidth === "number"
156
- ? `${maxWidth}px`
157
- : maxWidth,
158
- }
159
- : undefined, children: children }), dismissible && (jsx("button", { type: "button", onClick: handleDismiss, className: "badge-dismiss-btn -mr-0.5 rounded-full p-0.5 cursor-pointer", "aria-label": "Dismiss", disabled: disabled, children: jsx(X, { className: cn("badge-dismiss-icon", (_p = theme.dismissSizes) === null || _p === void 0 ? void 0 : _p[size]), "aria-hidden": "true" }) }))] })) : null;
128
+ return (jsx("span", { ref: ref, className: baseStyles, ...dataAttributes, ...props, children: content }));
160
129
  }
161
- return (jsx(AnimatePresence, { mode: "wait", children: isVisible && (jsxs(motion.span, { ref: ref, className: baseStyles, onClick: handleClick, "aria-disabled": disabled || undefined, variants: dismissible ? dismissVariants : badgeVariants, initial: "initial", animate: "animate", exit: "exit", ...dataAttributes, ...props, children: [renderLeftContent(), jsx("span", { className: cn("badge-content", maxWidth && "truncate"), style: maxWidth
162
- ? {
163
- maxWidth: typeof maxWidth === "number"
164
- ? `${maxWidth}px`
165
- : maxWidth,
166
- }
167
- : undefined, children: children }), dismissible && (jsx(motion.button, { type: "button", onClick: handleDismiss, className: "badge-dismiss-btn -mr-0.5 rounded-full p-0.5 cursor-pointer", "aria-label": "Dismiss", disabled: disabled, variants: dismissButtonVariants, initial: "initial", whileHover: "hover", whileTap: "tap", children: jsx(X, { className: cn("badge-dismiss-icon", (_q = theme.dismissSizes) === null || _q === void 0 ? void 0 : _q[size]), "aria-hidden": "true", weight: "bold" }) }))] })) }));
130
+ return (jsx(motion.span, { ref: ref, className: baseStyles, variants: badgeVariants, initial: "initial", animate: "animate", ...dataAttributes, ...props, children: content }));
168
131
  }));
169
132
  Badge.displayName = "Badge";
170
133
 
@@ -8,7 +8,7 @@ const badgeTheme = {
8
8
  // treats font-size as owning line-height, so any leading class here is silently dropped.
9
9
  // The badge therefore uses the `text-xs` ramp line-height (16px) → 22px tall.
10
10
  // To change it, put the leading class in `sizes`, after `text-xs`.
11
- baseStyle: "inline-flex items-center align-middle select-none whitespace-nowrap transition-all duration-300 h-fit w-fit tracking-tight font-medium border",
11
+ baseStyle: "inline-flex items-center align-middle select-none whitespace-nowrap transition-all duration-[var(--motion-duration-slow)] h-fit w-fit tracking-tight font-medium border",
12
12
  // Visual style variants (structure only, no colors)
13
13
  // All variants keep the 1px `border` from baseStyle so every variant is the
14
14
  // SAME height (variant must never change size). `filled` and `soft` make that
@@ -75,6 +75,13 @@ const badgeTheme = {
75
75
  sm: "text-xs px-[var(--badge-px-sm)] py-[var(--badge-py-sm)] gap-1",
76
76
  md: "text-xs px-[var(--badge-px-md)] py-[var(--badge-py-md)] gap-1",
77
77
  },
78
+ // Corner radius per size. NOT one shared value: the curve starts `radius` in
79
+ // from the edge while text starts `px + border` in, so the tighter box is the
80
+ // one whose glyphs land inside the curve. See theme.css for the full note.
81
+ radiusSizes: {
82
+ sm: "rounded-[var(--badge-radius-sm)]",
83
+ md: "rounded-[var(--badge-radius-md)]",
84
+ },
78
85
  // Additional padding for pill shape — must clear the rounded-full cap radius
79
86
  // (≈ height/2), otherwise content sits inside the curve and hugs the edge.
80
87
  pillSizes: {
@@ -91,12 +98,6 @@ const badgeTheme = {
91
98
  sm: "size-4",
92
99
  md: "size-5",
93
100
  },
94
- // Dismiss icon sizes — match the text-xs cap (both badge sizes use text-xs) so
95
- // the dismiss button never grows taller than the text and stretches the badge.
96
- dismissSizes: {
97
- sm: "size-3",
98
- md: "size-3",
99
- },
100
101
  // Dot inherits text color via currentColor — works across all variants/colors
101
102
  dotColors: {
102
103
  mono: "bg-current",
@@ -105,11 +106,6 @@ const badgeTheme = {
105
106
  warning: "bg-current",
106
107
  danger: "bg-current",
107
108
  },
108
- // State styles
109
- states: {
110
- disabled: "opacity-50 cursor-not-allowed pointer-events-none",
111
- hover: "cursor-pointer",
112
- },
113
109
  };
114
110
 
115
111
  export { badgeTheme };
@@ -1,4 +1,4 @@
1
- import React, { ReactNode, MouseEvent } from "react";
1
+ import React, { ReactNode } from "react";
2
2
  import { SemanticColor } from "../../../utils/colorUtils";
3
3
  import type { MeshPaletteName } from "../../effects/MeshGradient";
4
4
  export type BadgeVariant = "filled" | "outline" | "soft";
@@ -25,6 +25,10 @@ export interface BadgeTheme {
25
25
  * Styles for each badge size (flat structure)
26
26
  */
27
27
  sizes: Record<BadgeSize, string>;
28
+ /**
29
+ * Corner radius for each badge size (ignored when `pill` is set)
30
+ */
31
+ radiusSizes: Record<BadgeSize, string>;
28
32
  /**
29
33
  * Additional padding for pill-shaped badges
30
34
  */
@@ -37,21 +41,10 @@ export interface BadgeTheme {
37
41
  * Avatar sizes for each badge size
38
42
  */
39
43
  avatarSizes: Record<BadgeSize, string>;
40
- /**
41
- * Dismiss icon sizes (button sizes itself from icon + padding)
42
- */
43
- dismissSizes: Record<BadgeSize, string>;
44
44
  /**
45
45
  * Color styles for dot indicators
46
46
  */
47
47
  dotColors: Record<BadgeColor, string>;
48
- /**
49
- * State styles (disabled, hover, selected)
50
- */
51
- states: {
52
- disabled: string;
53
- hover: string;
54
- };
55
48
  }
56
49
  /**
57
50
  * Theme overrides for Badge component
@@ -61,15 +54,11 @@ export interface BadgeThemeOverrides {
61
54
  variants?: Partial<Record<BadgeVariant, string>>;
62
55
  variantColors?: Partial<Record<BadgeVariant, Partial<Record<BadgeColor, string>>>>;
63
56
  sizes?: Partial<Record<BadgeSize, string>>;
57
+ radiusSizes?: Partial<Record<BadgeSize, string>>;
64
58
  pillSizes?: Partial<Record<BadgeSize, string>>;
65
59
  iconSizes?: Partial<Record<BadgeSize, string>>;
66
60
  avatarSizes?: Partial<Record<BadgeSize, string>>;
67
- dismissSizes?: Partial<Record<BadgeSize, string>>;
68
61
  dotColors?: Partial<Record<BadgeColor, string>>;
69
- states?: Partial<{
70
- disabled: string;
71
- hover: string;
72
- }>;
73
62
  }
74
63
  export interface BadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "inputMode"> {
75
64
  /**
@@ -77,8 +66,18 @@ export interface BadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>,
77
66
  */
78
67
  children: ReactNode;
79
68
  /**
80
- * The visual style variant of the badge (filled, outline, soft)
81
- * @default 'filled'
69
+ * The visual style variant of the badge.
70
+ *
71
+ * `soft` is the default because a badge is a STATUS/METADATA label, not an
72
+ * action — a tinted chip is the idiom, and a full-strength fill overstates a
73
+ * label sitting next to real controls. Pick a non-default deliberately:
74
+ * - `filled` — on imagery/gradients, or a genuine emphasis flag ("NEW")
75
+ * - `outline` — quiet keyword tags; in practice only reads well at `color="mono"`
76
+ *
77
+ * (Button defaults to `filled` — an action SHOULD be the loudest thing. Same
78
+ * vocabulary, opposite default, on purpose. See CLAUDE.md §8.)
79
+ *
80
+ * @default 'soft'
82
81
  */
83
82
  variant?: BadgeVariant;
84
83
  /**
@@ -127,21 +126,6 @@ export interface BadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>,
127
126
  /** Raw gradient color override; wins over `gradientVariant`. */
128
127
  gradientColors?: string[];
129
128
  };
130
- /**
131
- * Whether the badge is dismissible (shows close button)
132
- * @default false
133
- */
134
- dismissible?: boolean;
135
- /**
136
- * Callback when close button is clicked
137
- * Required when dismissible is true
138
- */
139
- onDismiss?: (event: MouseEvent<HTMLButtonElement>) => void;
140
- /**
141
- * Whether the badge is disabled
142
- * @default false
143
- */
144
- disabled?: boolean;
145
129
  /**
146
130
  * Maximum width before truncating the label
147
131
  * Accepts CSS width value (e.g., '100px', '10rem') or number (pixels)
@@ -7,10 +7,10 @@ import { CaretRight } from '@phosphor-icons/react';
7
7
  * Simple layout styles are inlined in the component
8
8
  */
9
9
  const breadcrumbsTheme = {
10
- link: "text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] transition-colors duration-150 font-medium",
10
+ link: "text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] transition-colors duration-[var(--motion-duration-fast)] font-medium",
11
11
  current: "text-[var(--color-text-primary)] font-medium",
12
12
  separator: "text-[var(--color-text-muted)] select-none",
13
- ellipsis: "text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] transition-colors duration-150 cursor-pointer p-1 rounded hover:bg-[var(--color-surface-hover)]",
13
+ ellipsis: "text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] transition-colors duration-[var(--motion-duration-fast)] cursor-pointer p-1 rounded hover:bg-[var(--color-surface-hover)]",
14
14
  };
15
15
  /**
16
16
  * Variant styles for different breadcrumb appearances
@@ -18,10 +18,10 @@ const breadcrumbsTheme = {
18
18
  const breadcrumbsVariants = {
19
19
  default: {},
20
20
  muted: {
21
- link: "text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)] transition-colors duration-150 font-normal",
21
+ link: "text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)] transition-colors duration-[var(--motion-duration-fast)] font-normal",
22
22
  current: "text-[var(--color-text-secondary)] font-normal",
23
23
  separator: "text-[var(--color-border)]",
24
- ellipsis: "text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)] transition-colors duration-150 cursor-pointer p-1 rounded hover:bg-[var(--color-background-secondary)]",
24
+ ellipsis: "text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)] transition-colors duration-[var(--motion-duration-fast)] cursor-pointer p-1 rounded hover:bg-[var(--color-surface)]",
25
25
  },
26
26
  };
27
27
  /**
@@ -1,25 +1,19 @@
1
1
  "use client";
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
- import React__default, { useCallback, useRef } from 'react';
3
+ import React__default, { useCallback } from 'react';
4
4
  import { useReducedMotion, motion } from 'motion/react';
5
5
  import { buttonTheme } from './Button.theme.js';
6
6
  import { cn } from '../../../utils/cn.js';
7
7
  import { Spinner } from '../Spinner/Spinner.js';
8
- import { useRipple, getRippleAnimation, getRippleColorClass } from './Button.ripple.js';
8
+ import { Ripple } from '../shared/Ripple.js';
9
9
  import { createPressVariants } from '../shared/interaction.animations.js';
10
10
 
11
11
  // Shared press physics (module-level constant)
12
12
  const BUTTON_PRESS_VARIANTS = createPressVariants(0.97);
13
- const Button = React__default.forwardRef(({ children, iconStart, iconEnd, className = "", iconOnly = false, state = "default", size = "md", color, variant, block = false, onClick, enableRipple = true, rippleEffect = "default", rippleClassName, rippleScale = 10, showReflection = true, darkMode = false, disabled: disabledProp, "aria-label": ariaLabelProp, onAnimationStart: _onAnimationStart, onAnimationEnd: _onAnimationEnd, onDrag: _onDrag, onDragStart: _onDragStart, onDragEnd: _onDragEnd, ...restProps }, ref) => {
13
+ const Button = React__default.forwardRef(({ children, iconStart, iconEnd, className = "", iconOnly = false, state = "default", size = "md", color, variant, block = false, onClick, enableRipple = true, showReflection = true, darkMode = false, disabled: disabledProp, "aria-label": ariaLabelProp, onAnimationStart: _onAnimationStart, onAnimationEnd: _onAnimationEnd, onDrag: _onDrag, onDragStart: _onDragStart, onDragEnd: _onDragEnd, ...restProps }, ref) => {
14
14
  var _a, _b, _c, _d, _e, _f, _g, _h;
15
15
  const shouldReduceMotion = useReducedMotion();
16
16
  const shouldDisableAnimations = !!shouldReduceMotion;
17
- // Initialize ripple hook
18
- const { ripples, createRipple, buttonRef, effect } = useRipple({
19
- scale: rippleScale,
20
- duration: 600,
21
- effect: rippleEffect,
22
- });
23
17
  // Resolve color and variant with defaults
24
18
  const resolvedColor = color || "primary";
25
19
  const resolvedVariant = variant || "filled";
@@ -34,13 +28,10 @@ const Button = React__default.forwardRef(({ children, iconStart, iconEnd, classN
34
28
  }
35
29
  }
36
30
  // Safe onClick handler - respect both state="disabled" and disabled={true}
31
+ // (the ripple wires itself to the DOM node — see <Ripple /> below)
37
32
  const handleClick = useCallback((event) => {
38
33
  if (isDisabled)
39
34
  return;
40
- // Create ripple effect if enabled
41
- if (enableRipple && !shouldReduceMotion) {
42
- createRipple(event);
43
- }
44
35
  try {
45
36
  onClick === null || onClick === void 0 ? void 0 : onClick(event);
46
37
  }
@@ -50,7 +41,7 @@ const Button = React__default.forwardRef(({ children, iconStart, iconEnd, classN
50
41
  console.error("Error in button click handler:", error);
51
42
  }
52
43
  }
53
- }, [onClick, isDisabled, enableRipple, shouldReduceMotion, createRipple]);
44
+ }, [onClick, isDisabled]);
54
45
  // Compute theme classes (direct computation - faster than useMemo)
55
46
  const sizeClasses = ((_b = (_a = buttonTheme.sizes) === null || _a === void 0 ? void 0 : _a[size]) === null || _b === void 0 ? void 0 : _b[iconOnly ? "iconOnly" : "default"]) || "";
56
47
  const colorClasses = ((_c = buttonTheme.variantColors[resolvedVariant]) === null || _c === void 0 ? void 0 : _c[resolvedColor]) || "";
@@ -84,36 +75,9 @@ const Button = React__default.forwardRef(({ children, iconStart, iconEnd, classN
84
75
  // single time below, instead of spreading `restProps` and then
85
76
  // unconditionally overwriting it with `state`.
86
77
  const consumerDataState = restProps["data-state"];
87
- // Track the latest forwarded ref to avoid mergedRef recreation on inline callback refs
88
- const forwardedRef = useRef(ref);
89
- forwardedRef.current = ref;
90
- // Merge refs - stable callback that won't cause DOM detach/attach cycles
91
- const mergedRef = useCallback((node) => {
92
- // Set ripple's buttonRef
93
- if (buttonRef) {
94
- buttonRef.current = node;
95
- }
96
- // Set forwarded ref
97
- const fRef = forwardedRef.current;
98
- if (typeof fRef === "function") {
99
- fRef(node);
100
- }
101
- else if (fRef) {
102
- fRef.current =
103
- node;
104
- }
105
- }, [buttonRef]);
106
- return (jsxs(motion.button, { type: "button", ...restProps, ...animationProps, ref: mergedRef, className: cn(buttonTheme.baseStyle, colorClasses, variantClasses, sizeClasses, blockStyle, stateClasses, darkMode && "dark", className), disabled: isDisabled, "data-state": consumerDataState !== null && consumerDataState !== void 0 ? consumerDataState : state, "data-color": resolvedColor, "data-variant": resolvedVariant, "data-size": size, "data-icon-only": iconOnly ? "true" : "false", "data-block": block ? "true" : "false", "aria-disabled": isDisabled || undefined, "aria-busy": isLoading || undefined, "aria-label": ariaLabel, onClick: handleClick, children: [showReflection &&
78
+ return (jsxs(motion.button, { type: "button", ...restProps, ...animationProps, ref: ref, className: cn(buttonTheme.baseStyle, colorClasses, variantClasses, sizeClasses, blockStyle, stateClasses, darkMode && "dark", className), disabled: isDisabled, "data-state": consumerDataState !== null && consumerDataState !== void 0 ? consumerDataState : state, "data-color": resolvedColor, "data-variant": resolvedVariant, "data-size": size, "data-icon-only": iconOnly ? "true" : "false", "data-block": block ? "true" : "false", "aria-disabled": isDisabled || undefined, "aria-busy": isLoading || undefined, "aria-label": ariaLabel, onClick: handleClick, children: [showReflection &&
107
79
  resolvedVariant !== "ghost" &&
108
- resolvedVariant !== "outline" && (jsx("div", { className: "pointer-events-none absolute inset-px border-t-[0.5px] border-white/50 rounded-[inherit] blur-[0.75px]" })), isLoading && (jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: jsx(Spinner, { size: "sm", color: color, className: spinnerClassName }) })), jsxs("span", { className: cn("inline-flex items-center gap-2 whitespace-nowrap", isLoading && "opacity-0"), children: [iconStart && (jsx("span", { className: cn("inline-flex shrink-0 items-center justify-center", (_g = buttonTheme.iconSizes) === null || _g === void 0 ? void 0 : _g[size]), "aria-hidden": "true", children: iconStart })), children, iconEnd && (jsx("span", { className: cn("inline-flex shrink-0 items-center justify-center", (_h = buttonTheme.iconSizes) === null || _h === void 0 ? void 0 : _h[size]), "aria-hidden": "true", children: iconEnd }))] }), enableRipple &&
109
- ripples.map((ripple) => {
110
- const animation = getRippleAnimation(effect, ripple, rippleScale);
111
- return (jsx(motion.span, { initial: animation.initial, animate: animation.animate, transition: animation.transition, className: cn("absolute rounded-full size-5 pointer-events-none ", animation.className, rippleClassName ||
112
- getRippleColorClass(resolvedVariant, resolvedColor)), style: {
113
- top: ripple.y - 10,
114
- left: ripple.x - 10,
115
- } }, ripple.id));
116
- })] }));
80
+ resolvedVariant !== "outline" && (jsx("div", { className: "pointer-events-none absolute inset-px border-t-[0.5px] border-white/50 rounded-[inherit] blur-[0.75px]" })), isLoading && (jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: jsx(Spinner, { size: "sm", color: color, className: spinnerClassName }) })), jsxs("span", { className: cn("inline-flex items-center gap-2 whitespace-nowrap", isLoading && "opacity-0"), children: [iconStart && (jsx("span", { className: cn("inline-flex shrink-0 items-center justify-center", (_g = buttonTheme.iconSizes) === null || _g === void 0 ? void 0 : _g[size]), "aria-hidden": "true", children: iconStart })), children, iconEnd && (jsx("span", { className: cn("inline-flex shrink-0 items-center justify-center", (_h = buttonTheme.iconSizes) === null || _h === void 0 ? void 0 : _h[size]), "aria-hidden": "true", children: iconEnd }))] }), enableRipple && jsx(Ripple, {})] }));
117
81
  });
118
82
  // Set display name for dev tools and Storybook
119
83
  Button.displayName = "Button";
@@ -3,7 +3,7 @@
3
3
  */
4
4
  const buttonTheme = {
5
5
  // Base styles for the button element
6
- baseStyle: "relative inline-flex items-center justify-center gap-2 focus:outline-none rounded-[var(--button-radius)] overflow-hidden cursor-pointer transition-[color,background-color,border-color,box-shadow,filter,opacity] duration-150 ease-out min-w-fit flex-shrink-0 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 cursor-pointer backdrop-blur-sm",
6
+ baseStyle: "relative inline-flex items-center justify-center gap-2 focus:outline-none rounded-[var(--button-radius)] overflow-hidden cursor-pointer transition-[color,background-color,border-color,box-shadow,filter,opacity] duration-[var(--motion-duration-fast)] ease-out min-w-fit flex-shrink-0 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 cursor-pointer backdrop-blur-sm",
7
7
  // Visual style variants - STRUCTURE only (no colors)
8
8
  variantStyles: {
9
9
  filled: "border border-black/15 hover:brightness-[0.9] dark:hover:brightness-[1.15]",
@@ -35,7 +35,7 @@ const buttonTheme = {
35
35
  mono: "text-[var(--color-text-primary)] border-[var(--color-border-secondary)] " +
36
36
  "hover:bg-[var(--color-mono-100)] " +
37
37
  "focus-visible:outline-[var(--color-text-secondary)] " +
38
- "dark:hover:bg-[var(--color-background-secondary)]",
38
+ "dark:hover:bg-[var(--color-surface)]",
39
39
  primary: "text-[var(--color-text-primary)] border-[var(--color-primary-600)]/30 " +
40
40
  "hover:bg-[var(--color-primary-100)] " +
41
41
  "focus-visible:outline-[var(--color-primary-600)] " +
@@ -87,15 +87,15 @@ const buttonTheme = {
87
87
  // Tighten the corner radius at sm so a short button doesn't read as a pill
88
88
  // (overrides baseStyle's rounded-[var(--button-radius)] via twMerge).
89
89
  default: "font-medium min-h-[var(--button-min-h-sm)] px-[var(--button-px-sm)] py-[var(--button-py-sm)] text-[length:var(--button-text-size-sm)]/[var(--button-line-height-sm)] rounded-[calc(var(--button-radius)*0.75)]",
90
- iconOnly: "size-[var(--button-icon-size-sm)] p-[var(--button-icon-p-sm)] rounded-[calc(var(--button-radius)*0.75)]",
90
+ iconOnly: "size-[var(--button-icon-square-sm)] p-[var(--button-icon-p-sm)] rounded-[calc(var(--button-radius)*0.75)]",
91
91
  },
92
92
  md: {
93
93
  default: "font-medium min-h-[var(--button-min-h-md)] px-[var(--button-px-md)] py-[var(--button-py-md)] text-[length:var(--button-text-size-md)]/[var(--button-line-height-md)]",
94
- iconOnly: "size-[var(--button-icon-size-md)] p-[var(--button-icon-p-md)]",
94
+ iconOnly: "size-[var(--button-icon-square-md)] p-[var(--button-icon-p-md)]",
95
95
  },
96
96
  lg: {
97
97
  default: "font-medium min-h-[var(--button-min-h-lg)] px-[var(--button-px-lg)] py-[var(--button-py-lg)] text-[length:var(--button-text-size-lg)]/[var(--button-line-height-lg)]",
98
- iconOnly: "size-[var(--button-icon-size-lg)] p-[var(--button-icon-p-lg)]",
98
+ iconOnly: "size-[var(--button-icon-square-lg)] p-[var(--button-icon-p-lg)]",
99
99
  },
100
100
  },
101
101
  // Icon slot sizing. `[&>svg]:size-*` sizes the icon itself, so a caller passing a bare
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- import { RippleEffectType } from "./Button.ripple";
3
2
  /**
4
3
  * Button component props
5
4
  * @property {ButtonColor} color - The semantic color/intent of the button
@@ -8,10 +7,7 @@ import { RippleEffectType } from "./Button.ripple";
8
7
  * @property {ButtonState} state - The state of the button (default, loading, disabled)
9
8
  * @property {boolean} iconOnly - Whether the button should display as icon-only (square padding)
10
9
  * @property {boolean} block - Whether the button should be full width
11
- * @property {boolean} enableRipple - Whether to enable ripple effect on click
12
- * @property {RippleEffectType} rippleEffect - Type of ripple effect (default, aurora, particle, glass, neon, echo)
13
- * @property {string} rippleClassName - Custom class name for ripple styling
14
- * @property {number} rippleScale - Scale multiplier for ripple expansion (default: 10)
10
+ * @property {boolean} enableRipple - Whether to enable the press ripple
15
11
  */
16
12
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
17
13
  /** The semantic color/intent of the button */
@@ -47,14 +43,14 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
47
43
  children?: React.ReactNode;
48
44
  /** Additional class names */
49
45
  className?: string;
50
- /** Whether to enable ripple effect on click */
46
+ /**
47
+ * Whether to show the press ripple.
48
+ *
49
+ * The ripple is pointer-only — keyboard activation gets the focus ring
50
+ * instead — and is suppressed automatically under `prefers-reduced-motion`.
51
+ * @default true
52
+ */
51
53
  enableRipple?: boolean;
52
- /** Type of ripple effect: 'default' | 'aurora' | 'particle' | 'glass' | 'neon' | 'echo' */
53
- rippleEffect?: RippleEffectType;
54
- /** Custom class name for ripple styling */
55
- rippleClassName?: string;
56
- /** Scale multiplier for ripple expansion (default: 10) */
57
- rippleScale?: number;
58
54
  /** Whether to show the glass reflection effect (default: true) */
59
55
  showReflection?: boolean;
60
56
  /**
@@ -1,4 +1,2 @@
1
1
  export { Button } from './Button';
2
2
  export * from './Button.types';
3
- export { useRipple, getRippleColorClass, getRippleAnimation } from './Button.ripple';
4
- export type { RippleEffectType, RippleConfig, Ripple } from './Button.ripple';
@@ -15,7 +15,7 @@ const calendarTheme = {
15
15
  "data-[range-pos=end]:rounded-r-full " +
16
16
  "data-[range-pos=single]:rounded-full",
17
17
  dayButtonStyle: "relative z-10 flex items-center justify-center rounded-full border-0 bg-transparent font-medium cursor-pointer " +
18
- "transition-all duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)] focus-visible:ring-offset-2 " +
18
+ "transition-all duration-[var(--motion-duration-base)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)] focus-visible:ring-offset-2 " +
19
19
  // Base text color
20
20
  "text-[var(--color-text-primary)] " +
21
21
  // Hover state
@@ -1,9 +1,9 @@
1
1
  const calendarMiniTheme = {
2
- baseStyle: "flex items-center justify-center gap-1 transition-all duration-300 text-sm",
2
+ baseStyle: "flex items-center justify-center gap-1 transition-all duration-[var(--motion-duration-slow)] text-sm",
3
3
  monthRowStyle: "flex flex-1 gap-4 overflow-x-auto scrollbar-hide scroll-smooth snap-x snap-mandatory px-4 ml-3",
4
4
  monthItemStyle: "font-semibold text-[var(--color-text-secondary)] cursor-pointer transition-colors hover:text-[var(--color-text-primary)] flex-shrink-0 snap-center data-[state=active]:text-[var(--color-text-primary)] data-[state=active]:opacity-100",
5
5
  dateRowStyle: "relative overflow-hidden px-4 py-0.5",
6
- dateItemStyle: "px-0 py-1.5 min-w-[50px] flex flex-col items-center rounded-[var(--form-radius)] cursor-pointer transition-all text-[var(--color-text-primary)] hover:bg-[var(--color-surface-hover)] flex-shrink-0 snap-center ring-1 ring-transparent data-[state=selected]:bg-[var(--color-background-secondary)] data-[state=selected]:ring-[var(--color-border)] data-[state=selected]:hover:bg-[var(--color-background-secondary)] data-[state=selected]:z-2 data-[disabled]:opacity-40 data-[disabled]:cursor-not-allowed data-[disabled]:hover:bg-[var(--color-background-secondary)]",
6
+ dateItemStyle: "px-0 py-1.5 min-w-[50px] flex flex-col items-center rounded-[var(--form-radius)] cursor-pointer transition-all text-[var(--color-text-primary)] hover:bg-[var(--color-surface-hover)] flex-shrink-0 snap-center ring-1 ring-transparent data-[state=selected]:bg-[var(--color-surface)] data-[state=selected]:ring-[var(--color-border)] data-[state=selected]:hover:bg-[var(--color-surface)] data-[state=selected]:z-2 data-[disabled]:opacity-40 data-[disabled]:cursor-not-allowed data-[disabled]:hover:bg-[var(--color-surface)]",
7
7
  };
8
8
 
9
9
  export { calendarMiniTheme };
@@ -8,9 +8,10 @@ import { CardTitle } from './CardTitle.js';
8
8
  import { CardSubtitle } from './CardSubtitle.js';
9
9
  import { CardBody } from './CardBody.js';
10
10
  import { CardFooter } from './CardFooter.js';
11
+ import { CardContext } from './CardContext.js';
11
12
  import { useSurfaceElevation, SurfaceProvider, surfaceClasses } from '../../../theme/SurfaceContext.js';
12
13
 
13
- const CardRoot = React__default.forwardRef(({ children, className, theme: customTheme = {}, darkMode = false, title, subtitle, actions, footer, elevation, lift, ...props }, ref) => {
14
+ const CardRoot = React__default.forwardRef(({ children, className, theme: customTheme = {}, darkMode = false, title, subtitle, actions, footer, elevation, lift, inset = false, ...props }, ref) => {
14
15
  // Relative elevation: a Card lifts two rungs above its host substrate (base = 3, so a
15
16
  // standalone card on the floor reads rung 3). shadow:true (the engine default) supplies the
16
17
  // hairline ring + doubling shadow — the ONLY elevation cue in light mode, where rungs 3–8 are
@@ -20,11 +21,15 @@ const CardRoot = React__default.forwardRef(({ children, className, theme: custom
20
21
  ...cardTheme,
21
22
  ...customTheme,
22
23
  }), [customTheme]);
24
+ const cardContext = useMemo(() => ({ inset }), [inset]);
23
25
  const hasHeader = Boolean(title || subtitle || actions);
24
26
  // Slot-prop mode: any header/footer slot composes Header/Body/Footer for us.
25
27
  // Otherwise children render raw — the compound API path, unchanged.
26
28
  const managed = hasHeader || Boolean(footer);
27
- return (jsx("div", { ref: ref, className: cn(surfaceClasses(surfaceLevel), theme.baseStyle, darkMode && "dark", className), ...props, children: jsx(SurfaceProvider, { level: surfaceLevel, children: managed ? (jsxs(Fragment, { children: [hasHeader && (jsxs(CardHeader, { className: actions ? "flex-row items-start justify-between gap-4" : undefined, children: [(title || subtitle) && (jsxs("div", { className: "flex flex-col", children: [title && jsx(CardTitle, { children: title }), subtitle && jsx(CardSubtitle, { children: subtitle })] })), actions && (jsx("div", { className: "flex items-center gap-2 shrink-0", children: actions }))] })), children != null && jsx(CardBody, { children: children }), footer && jsx(CardFooter, { className: "justify-end gap-2", children: footer })] })) : (children) }) }));
29
+ return (jsx("div", { ref: ref, className: cn(surfaceClasses(surfaceLevel),
30
+ // Overrides only the rung bg from surfaceClasses (twMerge, last wins) — its
31
+ // shadow and --field-fill survive, and `className` still wins over both.
32
+ inset && theme.baseStyleInset, theme.baseStyle, darkMode && "dark", className), ...props, children: jsx(CardContext.Provider, { value: cardContext, children: jsx(SurfaceProvider, { level: surfaceLevel, children: managed ? (jsxs(Fragment, { children: [hasHeader && (jsxs(CardHeader, { className: actions ? "flex-row items-start justify-between gap-4" : undefined, children: [(title || subtitle) && (jsxs("div", { className: "flex flex-col", children: [title && jsx(CardTitle, { children: title }), subtitle && jsx(CardSubtitle, { children: subtitle })] })), actions && (jsx("div", { className: "flex items-center gap-2 shrink-0", children: actions }))] })), children != null && jsx(CardBody, { children: children }), footer && jsx(CardFooter, { className: "justify-end gap-2", children: footer })] })) : (children) }) }) }));
28
33
  });
29
34
  CardRoot.displayName = 'Card';
30
35
  // Create compound component with proper typing
@@ -5,7 +5,7 @@ const cardTheme = {
5
5
  headerStyle: "flex flex-col px-[var(--card-px)] py-[var(--card-py)] items-start",
6
6
  // text-[length:...] (not bare text-[var(...)]) is required — see TYPE ROLE
7
7
  // SYSTEM in theme.css for why a bare var() would resolve to color instead.
8
- titleStyle: "text-[length:var(--card-title-size)] font-semibold leading-none text-[var(--color-text-primary)]",
8
+ titleStyle: "text-[length:var(--card-title-size)]/[var(--card-title-line-height)] font-semibold text-[var(--color-text-primary)]",
9
9
  subtitleStyle: "text-sm text-[var(--color-text-secondary)] mt-2",
10
10
  // Default to full py (top included). [[data-card-region]~&]:pt-0 zeroes the seam
11
11
  // ONLY when an actual region (Header/Body) precedes this one — a general-sibling
@@ -15,6 +15,34 @@ const cardTheme = {
15
15
  // takes no layout space, so Body silently lost its top padding.
16
16
  bodyStyle: "px-[var(--card-px)] py-[var(--card-py)] [[data-card-region]~&]:pt-0",
17
17
  footerStyle: "flex items-center px-[var(--card-px)] py-[var(--card-py)] [[data-card-region]~&]:pt-0",
18
+ // ── inset mode ─────────────────────────────────────────────────────────────
19
+ // PROTOTYPE GEOMETRY: the 12px gap and the 16px panel radius are hardcoded on
20
+ // purpose so the look can be tuned by eye first. Tokenise both afterwards
21
+ // (--card-inset-gap + a --card-panel-radius on the sm cap tier, per §3's
22
+ // nested-well rule) — this is the only place the numbers appear.
23
+ //
24
+ // The frame sinks rather than the body rising: light-mode rungs 3-8 are all
25
+ // #ffffff, so lifting the body a rung would paint nothing. bg here overrides
26
+ // the rung bg from surfaceClasses via twMerge while its shadow + --field-fill
27
+ // survive; the panel then picks the rung bg back up.
28
+ baseStyleInset: "bg-[var(--color-surface-sunken)]",
29
+ // Header keeps its full top padding; only the seam down to the panel collapses
30
+ // to the gap. `pb-3` lands after `py-[…]` so twMerge resolves the bottom side.
31
+ headerStyleInset: "pb-3",
32
+ // Deliberately NOT carrying bodyStyle's `[[data-card-region]~&]:pt-0` — the
33
+ // panel is a closed box and keeps uniform padding on all four sides.
34
+ //
35
+ // ALIGNMENT CONTRACT: content inside the panel must stay flush with the header
36
+ // and footer text on the tray. The panel is offset by the gap, so its own
37
+ // padding is that gap subtracted from the card padding — 12 + (24-12) = 24,
38
+ // the same inset the header sits at. Derived from --card-px/--card-py rather
39
+ // than hardcoded so it holds when a theme redefines the card padding.
40
+ // The `_` are required: they become spaces, and calc() treats `-` as an operator
41
+ // ONLY when whitespace-separated. `calc(var(--card-px)-12px)` parses as the invalid
42
+ // `var(--card-px) -12px`, which Tailwind silently drops — no class is emitted at all.
43
+ // When these move to tokens, wrap in max(0px, …) so a theme that sets the card
44
+ // padding below the gap can't produce negative padding.
45
+ bodyStyleInset: "mx-3 mb-3 rounded-2xl px-[calc(var(--card-px)_-_12px)] py-[calc(var(--card-py)_-_12px)]",
18
46
  };
19
47
 
20
48
  export { cardTheme };