@adea-ai/ui 0.152.4 → 0.153.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (892) hide show
  1. package/README.md +469 -580
  2. package/dist/components/composites/account-menu/account-menu.d.ts +5 -0
  3. package/dist/components/composites/account-menu/account-menu.d.ts.map +1 -1
  4. package/dist/components/composites/account-menu/account-menu.js +37 -13
  5. package/dist/components/composites/account-menu/account-menu.js.map +1 -1
  6. package/dist/components/composites/action-button/action-button.d.ts +2 -1
  7. package/dist/components/composites/action-button/action-button.d.ts.map +1 -1
  8. package/dist/components/composites/action-button/action-button.js +92 -66
  9. package/dist/components/composites/action-button/action-button.js.map +1 -1
  10. package/dist/components/composites/appearance-editor/accent-swatch-groups.d.ts +3 -3
  11. package/dist/components/composites/appearance-editor/accent-swatch-groups.js +1 -1
  12. package/dist/components/composites/appearance-editor/accent-swatch-groups.js.map +1 -1
  13. package/dist/components/composites/appearance-editor/appearance-choices.d.ts +1 -1
  14. package/dist/components/composites/appearance-editor/appearance-choices.js +1 -1
  15. package/dist/components/composites/appearance-editor/appearance-choices.js.map +1 -1
  16. package/dist/components/composites/appearance-editor/appearance-editor.d.ts.map +1 -1
  17. package/dist/components/composites/appearance-editor/appearance-editor.js +57 -57
  18. package/dist/components/composites/appearance-editor/appearance-editor.js.map +1 -1
  19. package/dist/components/composites/appearance-editor/appearance-rows.d.ts.map +1 -1
  20. package/dist/components/composites/appearance-editor/appearance-rows.js +9 -9
  21. package/dist/components/composites/appearance-editor/appearance-rows.js.map +1 -1
  22. package/dist/components/composites/appearance-editor/appearance-types.d.ts +7 -7
  23. package/dist/components/composites/appearance-editor/theme-preview.d.ts +1 -1
  24. package/dist/components/composites/appearance-editor/theme-preview.js +1 -1
  25. package/dist/components/composites/appearance-editor/theme-preview.js.map +1 -1
  26. package/dist/components/composites/catalog-browser/catalog-browser.d.ts.map +1 -1
  27. package/dist/components/composites/catalog-browser/catalog-browser.js +6 -10
  28. package/dist/components/composites/catalog-browser/catalog-browser.js.map +1 -1
  29. package/dist/components/composites/catalog-browser/catalog-detail.d.ts.map +1 -1
  30. package/dist/components/composites/catalog-browser/catalog-detail.js +36 -36
  31. package/dist/components/composites/catalog-browser/catalog-detail.js.map +1 -1
  32. package/dist/components/composites/chain-of-thought/chain-of-thought.d.ts +4 -4
  33. package/dist/components/composites/chain-of-thought/chain-of-thought.js.map +1 -1
  34. package/dist/components/composites/chat/chat.d.ts.map +1 -1
  35. package/dist/components/composites/chat/chat.js +33 -37
  36. package/dist/components/composites/chat/chat.js.map +1 -1
  37. package/dist/components/composites/checkpoint/checkpoint-model.d.ts +3 -3
  38. package/dist/components/composites/checkpoint/checkpoint-model.js +2 -2
  39. package/dist/components/composites/checkpoint/checkpoint-model.js.map +1 -1
  40. package/dist/components/composites/checkpoint/checkpoint.d.ts +2 -2
  41. package/dist/components/composites/checkpoint/checkpoint.js.map +1 -1
  42. package/dist/components/composites/confirmation/confirmation.d.ts.map +1 -1
  43. package/dist/components/composites/confirmation/confirmation.js +1 -1
  44. package/dist/components/composites/confirmation/confirmation.js.map +1 -1
  45. package/dist/components/composites/context/context.d.ts +2 -2
  46. package/dist/components/composites/context/context.js.map +1 -1
  47. package/dist/components/composites/file-tree/build-file-tree.d.ts +1 -1
  48. package/dist/components/composites/file-tree/build-file-tree.js +1 -1
  49. package/dist/components/composites/file-tree/build-file-tree.js.map +1 -1
  50. package/dist/components/composites/file-tree/file-tree.d.ts.map +1 -1
  51. package/dist/components/composites/file-tree/file-tree.js +7 -3
  52. package/dist/components/composites/file-tree/file-tree.js.map +1 -1
  53. package/dist/components/composites/icon-picker/icon-picker.js +1 -3
  54. package/dist/components/composites/icon-picker/icon-picker.js.map +1 -1
  55. package/dist/components/composites/inline-citation/citation.d.ts +1 -1
  56. package/dist/components/composites/inline-citation/citation.js +1 -1
  57. package/dist/components/composites/inline-citation/citation.js.map +1 -1
  58. package/dist/components/composites/inline-citation/inline-citation.d.ts +2 -2
  59. package/dist/components/composites/inline-citation/inline-citation.js.map +1 -1
  60. package/dist/components/composites/list-row/list-row-control.d.ts.map +1 -1
  61. package/dist/components/composites/list-row/list-row-control.js +22 -22
  62. package/dist/components/composites/list-row/list-row-control.js.map +1 -1
  63. package/dist/components/composites/list-row/list-row.d.ts +5 -0
  64. package/dist/components/composites/list-row/list-row.d.ts.map +1 -1
  65. package/dist/components/composites/list-row/list-row.js +75 -83
  66. package/dist/components/composites/list-row/list-row.js.map +1 -1
  67. package/dist/components/composites/message-scroller/message-scroller.d.ts +1 -1
  68. package/dist/components/composites/message-scroller/message-scroller.js.map +1 -1
  69. package/dist/components/composites/model-selector/model-selector.d.ts +4 -4
  70. package/dist/components/composites/model-selector/model-selector.js.map +1 -1
  71. package/dist/components/composites/model-selector/models.d.ts +2 -2
  72. package/dist/components/composites/model-selector/models.js +1 -1
  73. package/dist/components/composites/model-selector/models.js.map +1 -1
  74. package/dist/components/composites/plan/plan.d.ts.map +1 -1
  75. package/dist/components/composites/plan/plan.js +17 -15
  76. package/dist/components/composites/plan/plan.js.map +1 -1
  77. package/dist/components/composites/queue/queue.d.ts.map +1 -1
  78. package/dist/components/composites/queue/queue.js +5 -7
  79. package/dist/components/composites/queue/queue.js.map +1 -1
  80. package/dist/components/composites/reasoning/reasoning.d.ts +4 -4
  81. package/dist/components/composites/reasoning/reasoning.js +4 -4
  82. package/dist/components/composites/reasoning/reasoning.js.map +1 -1
  83. package/dist/components/composites/settings/settings-navigation.d.ts.map +1 -1
  84. package/dist/components/composites/settings/settings-navigation.js +63 -14
  85. package/dist/components/composites/settings/settings-navigation.js.map +1 -1
  86. package/dist/components/composites/settings/settings.d.ts.map +1 -1
  87. package/dist/components/composites/settings/settings.js +32 -32
  88. package/dist/components/composites/settings/settings.js.map +1 -1
  89. package/dist/components/composites/sources/source.d.ts +1 -1
  90. package/dist/components/composites/sources/source.js.map +1 -1
  91. package/dist/components/composites/sources/sources.d.ts +2 -2
  92. package/dist/components/composites/sources/sources.js.map +1 -1
  93. package/dist/components/composites/stack-trace/parse-stack-trace.d.ts +3 -3
  94. package/dist/components/composites/stack-trace/parse-stack-trace.js +4 -4
  95. package/dist/components/composites/stack-trace/parse-stack-trace.js.map +1 -1
  96. package/dist/components/composites/stack-trace/stack-trace.d.ts +3 -3
  97. package/dist/components/composites/stack-trace/stack-trace.js.map +1 -1
  98. package/dist/components/composites/stat/stat.d.ts.map +1 -1
  99. package/dist/components/composites/stat/stat.js +14 -16
  100. package/dist/components/composites/stat/stat.js.map +1 -1
  101. package/dist/components/composites/subagent/subagent.d.ts.map +1 -1
  102. package/dist/components/composites/subagent/subagent.js +6 -4
  103. package/dist/components/composites/subagent/subagent.js.map +1 -1
  104. package/dist/components/composites/task/task.d.ts +1 -1
  105. package/dist/components/composites/task/task.js.map +1 -1
  106. package/dist/components/composites/terminal/ansi.d.ts +3 -3
  107. package/dist/components/composites/terminal/ansi.js.map +1 -1
  108. package/dist/components/composites/terminal/terminal-model.d.ts +3 -3
  109. package/dist/components/composites/terminal/terminal-model.d.ts.map +1 -1
  110. package/dist/components/composites/terminal/terminal-model.js +1 -1
  111. package/dist/components/composites/terminal/terminal-model.js.map +1 -1
  112. package/dist/components/composites/terminal/terminal.d.ts.map +1 -1
  113. package/dist/components/composites/terminal/terminal.js +24 -11
  114. package/dist/components/composites/terminal/terminal.js.map +1 -1
  115. package/dist/components/composites/test-results/test-results-model.d.ts +4 -4
  116. package/dist/components/composites/test-results/test-results-model.js +2 -2
  117. package/dist/components/composites/test-results/test-results-model.js.map +1 -1
  118. package/dist/components/composites/test-results/test-results.d.ts +1 -1
  119. package/dist/components/composites/test-results/test-results.js.map +1 -1
  120. package/dist/components/composites/tool/tool.d.ts +4 -4
  121. package/dist/components/composites/tool/tool.js.map +1 -1
  122. package/dist/components/composites/tree/tree.d.ts +1 -1
  123. package/dist/components/composites/tree/tree.d.ts.map +1 -1
  124. package/dist/components/composites/tree/tree.js +25 -18
  125. package/dist/components/composites/tree/tree.js.map +1 -1
  126. package/dist/components/composites/update-dialog/channel-control.d.ts +10 -4
  127. package/dist/components/composites/update-dialog/channel-control.d.ts.map +1 -1
  128. package/dist/components/composites/update-dialog/channel-control.js +14 -19
  129. package/dist/components/composites/update-dialog/channel-control.js.map +1 -1
  130. package/dist/components/composites/update-dialog/index.d.ts +1 -1
  131. package/dist/components/composites/update-dialog/index.d.ts.map +1 -1
  132. package/dist/components/composites/update-dialog/update-dialog.js +4 -5
  133. package/dist/components/composites/update-dialog/update-dialog.js.map +1 -1
  134. package/dist/components/composites/workspace-mark/workspace-mark.d.ts.map +1 -1
  135. package/dist/components/composites/workspace-mark/workspace-mark.js +19 -20
  136. package/dist/components/composites/workspace-mark/workspace-mark.js.map +1 -1
  137. package/dist/components/conversation/busy-send-button.d.ts.map +1 -1
  138. package/dist/components/conversation/busy-send-button.js +18 -20
  139. package/dist/components/conversation/busy-send-button.js.map +1 -1
  140. package/dist/components/conversation/composer-menu.d.ts +3 -3
  141. package/dist/components/conversation/composer-menu.js +3 -3
  142. package/dist/components/conversation/composer-menu.js.map +1 -1
  143. package/dist/components/conversation/conversation-avatar.js +2 -4
  144. package/dist/components/conversation/conversation-avatar.js.map +1 -1
  145. package/dist/components/conversation/conversation-pane.d.ts.map +1 -1
  146. package/dist/components/conversation/conversation-pane.js +6 -5
  147. package/dist/components/conversation/conversation-pane.js.map +1 -1
  148. package/dist/components/conversation/conversation-surface.js +3 -7
  149. package/dist/components/conversation/conversation-surface.js.map +1 -1
  150. package/dist/components/conversation/internal/chat-composer-shell.d.ts.map +1 -1
  151. package/dist/components/conversation/internal/chat-composer-shell.js +76 -76
  152. package/dist/components/conversation/internal/chat-composer-shell.js.map +1 -1
  153. package/dist/components/conversation/message-composer.d.ts.map +1 -1
  154. package/dist/components/conversation/message-composer.js +32 -38
  155. package/dist/components/conversation/message-composer.js.map +1 -1
  156. package/dist/components/conversation/message-row.d.ts.map +1 -1
  157. package/dist/components/conversation/message-row.js +79 -73
  158. package/dist/components/conversation/message-row.js.map +1 -1
  159. package/dist/components/conversation/scroll-follow-core.d.ts +7 -7
  160. package/dist/components/conversation/scroll-follow-core.js +4 -4
  161. package/dist/components/conversation/scroll-follow-core.js.map +1 -1
  162. package/dist/components/conversation/scroll-follow.d.ts.map +1 -1
  163. package/dist/components/conversation/scroll-follow.js +19 -4
  164. package/dist/components/conversation/scroll-follow.js.map +1 -1
  165. package/dist/components/conversation/thread-panel.d.ts.map +1 -1
  166. package/dist/components/conversation/thread-panel.js +23 -23
  167. package/dist/components/conversation/thread-panel.js.map +1 -1
  168. package/dist/components/conversation/transcript-composition.d.ts.map +1 -1
  169. package/dist/components/conversation/transcript-composition.js +2 -2
  170. package/dist/components/conversation/transcript-composition.js.map +1 -1
  171. package/dist/components/layout/app-shell/app-shell.d.ts +1 -1
  172. package/dist/components/layout/app-shell/app-shell.js +1 -1
  173. package/dist/components/layout/app-shell/app-shell.js.map +1 -1
  174. package/dist/components/layout/app-shell/skip-link.d.ts.map +1 -1
  175. package/dist/components/layout/app-shell/skip-link.js +4 -6
  176. package/dist/components/layout/app-shell/skip-link.js.map +1 -1
  177. package/dist/components/layout/page/page.d.ts.map +1 -1
  178. package/dist/components/layout/page/page.js +17 -17
  179. package/dist/components/layout/page/page.js.map +1 -1
  180. package/dist/components/layout/panel/panel.js +2 -4
  181. package/dist/components/layout/panel/panel.js.map +1 -1
  182. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.d.ts.map +1 -1
  183. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js +16 -1
  184. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js.map +1 -1
  185. package/dist/components/layout/side-rail/side-rail-context.d.ts +1 -1
  186. package/dist/components/layout/side-rail/side-rail-context.js.map +1 -1
  187. package/dist/components/layout/side-rail/side-rail.d.ts.map +1 -1
  188. package/dist/components/layout/side-rail/side-rail.js +35 -34
  189. package/dist/components/layout/side-rail/side-rail.js.map +1 -1
  190. package/dist/components/layout/sidebar-nav/sidebar-nav.d.ts.map +1 -1
  191. package/dist/components/layout/sidebar-nav/sidebar-nav.js +23 -23
  192. package/dist/components/layout/sidebar-nav/sidebar-nav.js.map +1 -1
  193. package/dist/components/layout/split-layout/resize-controller-core-retry.d.ts.map +1 -1
  194. package/dist/components/layout/split-layout/resize-controller-core-retry.js +25 -7
  195. package/dist/components/layout/split-layout/resize-controller-core-retry.js.map +1 -1
  196. package/dist/components/layout/split-layout/resize-controller-core.d.ts.map +1 -1
  197. package/dist/components/layout/split-layout/resize-controller-core.js +25 -7
  198. package/dist/components/layout/split-layout/resize-controller-core.js.map +1 -1
  199. package/dist/components/layout/split-layout/split-layout.d.ts.map +1 -1
  200. package/dist/components/layout/split-layout/split-layout.js +2 -2
  201. package/dist/components/layout/split-layout/split-layout.js.map +1 -1
  202. package/dist/components/layout/status-bar/status-bar.d.ts +1 -1
  203. package/dist/components/layout/status-bar/status-bar.js +1 -1
  204. package/dist/components/layout/status-bar/status-bar.js.map +1 -1
  205. package/dist/components/layout/top-bar/top-bar.d.ts.map +1 -1
  206. package/dist/components/layout/top-bar/top-bar.js +7 -7
  207. package/dist/components/layout/top-bar/top-bar.js.map +1 -1
  208. package/dist/components/motion/presence.d.ts +2 -2
  209. package/dist/components/motion/presence.js.map +1 -1
  210. package/dist/components/theme/appearance-panel.d.ts +5 -5
  211. package/dist/components/theme/appearance-panel.js.map +1 -1
  212. package/dist/components/theme/lazy.d.ts +1 -1
  213. package/dist/components/theme/lazy.js.map +1 -1
  214. package/dist/components/theme/theme-catalogue-source.d.ts +2 -2
  215. package/dist/components/theme/theme-catalogue-source.js +2 -2
  216. package/dist/components/theme/theme-catalogue-source.js.map +1 -1
  217. package/dist/components/theme/theme-context.d.ts +2 -2
  218. package/dist/components/theme/theme-context.js +3 -3
  219. package/dist/components/theme/theme-context.js.map +1 -1
  220. package/dist/components/theme/theme-document.d.ts.map +1 -1
  221. package/dist/components/theme/theme-document.js +14 -9
  222. package/dist/components/theme/theme-document.js.map +1 -1
  223. package/dist/components/theme/theme-picker.d.ts +5 -5
  224. package/dist/components/theme/theme-picker.js.map +1 -1
  225. package/dist/components/theme/theme-provider-value.d.ts +0 -6
  226. package/dist/components/theme/theme-provider-value.d.ts.map +1 -1
  227. package/dist/components/theme/theme-provider-value.js +9 -3
  228. package/dist/components/theme/theme-provider-value.js.map +1 -1
  229. package/dist/components/theme/theme-script.d.ts +14 -0
  230. package/dist/components/theme/theme-script.d.ts.map +1 -1
  231. package/dist/components/theme/theme-script.js +1 -0
  232. package/dist/components/theme/theme-script.js.map +1 -1
  233. package/dist/components/theme/theme-state.d.ts +7 -7
  234. package/dist/components/theme/theme-state.js.map +1 -1
  235. package/dist/components/theme/theme-toggle.d.ts +1 -1
  236. package/dist/components/theme/theme-toggle.js.map +1 -1
  237. package/dist/components/ui/alert/alert.d.ts.map +1 -1
  238. package/dist/components/ui/alert/alert.js +4 -3
  239. package/dist/components/ui/alert/alert.js.map +1 -1
  240. package/dist/components/ui/alert-dialog/alert-dialog.d.ts +1 -1
  241. package/dist/components/ui/alert-dialog/alert-dialog.js +3 -3
  242. package/dist/components/ui/alert-dialog/alert-dialog.js.map +1 -1
  243. package/dist/components/ui/badge/badge.d.ts +1 -1
  244. package/dist/components/ui/badge/badge.js +2 -2
  245. package/dist/components/ui/badge/badge.js.map +1 -1
  246. package/dist/components/ui/board/board.d.ts.map +1 -1
  247. package/dist/components/ui/board/board.js +10 -6
  248. package/dist/components/ui/board/board.js.map +1 -1
  249. package/dist/components/ui/bubble/bubble.d.ts.map +1 -1
  250. package/dist/components/ui/bubble/bubble.js +6 -4
  251. package/dist/components/ui/bubble/bubble.js.map +1 -1
  252. package/dist/components/ui/button/button.js +2 -2
  253. package/dist/components/ui/button/button.js.map +1 -1
  254. package/dist/components/ui/button-group/button-group.d.ts +1 -1
  255. package/dist/components/ui/button-group/button-group.js +1 -1
  256. package/dist/components/ui/button-group/button-group.js.map +1 -1
  257. package/dist/components/ui/calendar/calendar.js +6 -6
  258. package/dist/components/ui/calendar/calendar.js.map +1 -1
  259. package/dist/components/ui/callout/callout.d.ts +4 -4
  260. package/dist/components/ui/callout/callout.js +4 -4
  261. package/dist/components/ui/callout/callout.js.map +1 -1
  262. package/dist/components/ui/card/card.d.ts +2 -2
  263. package/dist/components/ui/card/card.js +2 -2
  264. package/dist/components/ui/card/card.js.map +1 -1
  265. package/dist/components/ui/carousel/carousel.d.ts +4 -4
  266. package/dist/components/ui/carousel/carousel.d.ts.map +1 -1
  267. package/dist/components/ui/carousel/carousel.js.map +1 -1
  268. package/dist/components/ui/chart/chart-options.d.ts +7 -7
  269. package/dist/components/ui/chart/chart-options.js +9 -9
  270. package/dist/components/ui/chart/chart-options.js.map +1 -1
  271. package/dist/components/ui/chart/chart.d.ts.map +1 -1
  272. package/dist/components/ui/chart/chart.js +16 -7
  273. package/dist/components/ui/chart/chart.js.map +1 -1
  274. package/dist/components/ui/checkbox/checkbox.d.ts.map +1 -1
  275. package/dist/components/ui/checkbox/checkbox.js +8 -6
  276. package/dist/components/ui/checkbox/checkbox.js.map +1 -1
  277. package/dist/components/ui/code-block/code-block.d.ts.map +1 -1
  278. package/dist/components/ui/code-block/code-block.js +8 -6
  279. package/dist/components/ui/code-block/code-block.js.map +1 -1
  280. package/dist/components/ui/command/command.d.ts +4 -4
  281. package/dist/components/ui/command/command.js +4 -4
  282. package/dist/components/ui/command/command.js.map +1 -1
  283. package/dist/components/ui/context-menu/context-menu.d.ts +1 -1
  284. package/dist/components/ui/context-menu/context-menu.js.map +1 -1
  285. package/dist/components/ui/detail-panel/detail-panel.d.ts.map +1 -1
  286. package/dist/components/ui/detail-panel/detail-panel.js +13 -13
  287. package/dist/components/ui/detail-panel/detail-panel.js.map +1 -1
  288. package/dist/components/ui/dialog/dialog-layer.d.ts +0 -4
  289. package/dist/components/ui/dialog/dialog-layer.d.ts.map +1 -1
  290. package/dist/components/ui/dialog/dialog-layer.js +17 -1
  291. package/dist/components/ui/dialog/dialog-layer.js.map +1 -1
  292. package/dist/components/ui/dialog/dialog.d.ts.map +1 -1
  293. package/dist/components/ui/dialog/dialog.js +4 -3
  294. package/dist/components/ui/dialog/dialog.js.map +1 -1
  295. package/dist/components/ui/diff-block/diff-block.d.ts +6 -6
  296. package/dist/components/ui/diff-block/diff-block.js +3 -3
  297. package/dist/components/ui/diff-block/diff-block.js.map +1 -1
  298. package/dist/components/ui/drawer/drawer.d.ts +3 -3
  299. package/dist/components/ui/drawer/drawer.js +2 -2
  300. package/dist/components/ui/drawer/drawer.js.map +1 -1
  301. package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +5 -5
  302. package/dist/components/ui/dropdown-menu/dropdown-menu.js +3 -3
  303. package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -1
  304. package/dist/components/ui/dropdown-menu/menu-parts.d.ts +3 -3
  305. package/dist/components/ui/dropdown-menu/menu-parts.js +1 -1
  306. package/dist/components/ui/dropdown-menu/menu-parts.js.map +1 -1
  307. package/dist/components/ui/empty/empty-state.d.ts.map +1 -1
  308. package/dist/components/ui/empty/empty-state.js +33 -36
  309. package/dist/components/ui/empty/empty-state.js.map +1 -1
  310. package/dist/components/ui/empty/empty.d.ts +1 -1
  311. package/dist/components/ui/empty/empty.js +1 -1
  312. package/dist/components/ui/empty/empty.js.map +1 -1
  313. package/dist/components/ui/entity-icon/entity-icon.d.ts.map +1 -1
  314. package/dist/components/ui/entity-icon/entity-icon.js +7 -7
  315. package/dist/components/ui/entity-icon/entity-icon.js.map +1 -1
  316. package/dist/components/ui/field/field.d.ts.map +1 -1
  317. package/dist/components/ui/field/field.js +15 -15
  318. package/dist/components/ui/field/field.js.map +1 -1
  319. package/dist/components/ui/field/number-field.d.ts +1 -1
  320. package/dist/components/ui/field/number-field.js +1 -1
  321. package/dist/components/ui/field/number-field.js.map +1 -1
  322. package/dist/components/ui/hover-card/hover-card.d.ts +1 -1
  323. package/dist/components/ui/hover-card/hover-card.js.map +1 -1
  324. package/dist/components/ui/input-group/input-group.d.ts +1 -1
  325. package/dist/components/ui/input-group/input-group.js.map +1 -1
  326. package/dist/components/ui/input-otp/input-otp.d.ts +1 -1
  327. package/dist/components/ui/input-otp/input-otp.js.map +1 -1
  328. package/dist/components/ui/item/item.d.ts.map +1 -1
  329. package/dist/components/ui/item/item.js +26 -26
  330. package/dist/components/ui/item/item.js.map +1 -1
  331. package/dist/components/ui/kbd/kbd.d.ts +2 -2
  332. package/dist/components/ui/kbd/kbd.js +2 -2
  333. package/dist/components/ui/kbd/kbd.js.map +1 -1
  334. package/dist/components/ui/kbd/platform-modifier.d.ts +3 -3
  335. package/dist/components/ui/kbd/platform-modifier.js +3 -3
  336. package/dist/components/ui/kbd/platform-modifier.js.map +1 -1
  337. package/dist/components/ui/label/label.d.ts +1 -1
  338. package/dist/components/ui/label/label.js +1 -1
  339. package/dist/components/ui/label/label.js.map +1 -1
  340. package/dist/components/ui/marker/marker.d.ts.map +1 -1
  341. package/dist/components/ui/marker/marker.js +17 -19
  342. package/dist/components/ui/marker/marker.js.map +1 -1
  343. package/dist/components/ui/menubar/menubar.d.ts +2 -2
  344. package/dist/components/ui/menubar/menubar.js +1 -1
  345. package/dist/components/ui/menubar/menubar.js.map +1 -1
  346. package/dist/components/ui/message/message.d.ts.map +1 -1
  347. package/dist/components/ui/message/message.js +16 -18
  348. package/dist/components/ui/message/message.js.map +1 -1
  349. package/dist/components/ui/modal-dialog/modal-dialog.d.ts.map +1 -1
  350. package/dist/components/ui/modal-dialog/modal-dialog.js +7 -11
  351. package/dist/components/ui/modal-dialog/modal-dialog.js.map +1 -1
  352. package/dist/components/ui/native-select/native-select.d.ts +1 -1
  353. package/dist/components/ui/native-select/native-select.js.map +1 -1
  354. package/dist/components/ui/navigation-menu/navigation-menu.d.ts.map +1 -1
  355. package/dist/components/ui/navigation-menu/navigation-menu.js +5 -4
  356. package/dist/components/ui/navigation-menu/navigation-menu.js.map +1 -1
  357. package/dist/components/ui/pagination/pagination.js +2 -4
  358. package/dist/components/ui/pagination/pagination.js.map +1 -1
  359. package/dist/components/ui/popover/popover.d.ts.map +1 -1
  360. package/dist/components/ui/popover/popover.js +11 -4
  361. package/dist/components/ui/popover/popover.js.map +1 -1
  362. package/dist/components/ui/progress/progress.d.ts.map +1 -1
  363. package/dist/components/ui/progress/progress.js +6 -8
  364. package/dist/components/ui/progress/progress.js.map +1 -1
  365. package/dist/components/ui/questionnaire/questionnaire.d.ts.map +1 -1
  366. package/dist/components/ui/questionnaire/questionnaire.js +73 -73
  367. package/dist/components/ui/questionnaire/questionnaire.js.map +1 -1
  368. package/dist/components/ui/radio-group/radio-group.d.ts.map +1 -1
  369. package/dist/components/ui/radio-group/radio-group.js +12 -6
  370. package/dist/components/ui/radio-group/radio-group.js.map +1 -1
  371. package/dist/components/ui/resizable/resizable.d.ts +2 -2
  372. package/dist/components/ui/resizable/resizable.js +3 -3
  373. package/dist/components/ui/resizable/resizable.js.map +1 -1
  374. package/dist/components/ui/select/select.d.ts +3 -3
  375. package/dist/components/ui/select/select.js +1 -1
  376. package/dist/components/ui/select/select.js.map +1 -1
  377. package/dist/components/ui/sheet/sheet.d.ts.map +1 -1
  378. package/dist/components/ui/sheet/sheet.js +4 -3
  379. package/dist/components/ui/sheet/sheet.js.map +1 -1
  380. package/dist/components/ui/skeleton/skeleton.d.ts +1 -1
  381. package/dist/components/ui/skeleton/skeleton.js +1 -1
  382. package/dist/components/ui/skeleton/skeleton.js.map +1 -1
  383. package/dist/components/ui/slider/slider.d.ts +1 -1
  384. package/dist/components/ui/slider/slider.js.map +1 -1
  385. package/dist/components/ui/spinner/spinner.d.ts +1 -1
  386. package/dist/components/ui/spinner/spinner.js +1 -1
  387. package/dist/components/ui/spinner/spinner.js.map +1 -1
  388. package/dist/components/ui/status-chip/status-chip.d.ts +13 -13
  389. package/dist/components/ui/status-chip/status-chip.d.ts.map +1 -1
  390. package/dist/components/ui/status-chip/status-chip.js +11 -11
  391. package/dist/components/ui/status-chip/status-chip.js.map +1 -1
  392. package/dist/components/ui/switch/switch.d.ts.map +1 -1
  393. package/dist/components/ui/switch/switch.js +8 -6
  394. package/dist/components/ui/switch/switch.js.map +1 -1
  395. package/dist/components/ui/tabs/tabs.d.ts +4 -4
  396. package/dist/components/ui/tabs/tabs.js +4 -4
  397. package/dist/components/ui/tabs/tabs.js.map +1 -1
  398. package/dist/components/ui/textarea/textarea.d.ts +1 -1
  399. package/dist/components/ui/textarea/textarea.js +1 -1
  400. package/dist/components/ui/textarea/textarea.js.map +1 -1
  401. package/dist/components/ui/toast/toast.d.ts.map +1 -1
  402. package/dist/components/ui/toast/toast.js +13 -15
  403. package/dist/components/ui/toast/toast.js.map +1 -1
  404. package/dist/components/ui/toggle/toggle.d.ts +1 -1
  405. package/dist/components/ui/toggle/toggle.js +1 -1
  406. package/dist/components/ui/toggle/toggle.js.map +1 -1
  407. package/dist/components/ui/tooltip/deferred-tooltip.d.ts +51 -0
  408. package/dist/components/ui/tooltip/deferred-tooltip.d.ts.map +1 -0
  409. package/dist/components/ui/tooltip/deferred-tooltip.js +103 -0
  410. package/dist/components/ui/tooltip/deferred-tooltip.js.map +1 -0
  411. package/dist/components/ui/tooltip/index.d.ts +1 -0
  412. package/dist/components/ui/tooltip/index.d.ts.map +1 -1
  413. package/dist/components/ui/tooltip/index.js +3 -1
  414. package/dist/components/ui/tooltip/tooltip.d.ts.map +1 -1
  415. package/dist/components/ui/tooltip/tooltip.js +6 -5
  416. package/dist/components/ui/tooltip/tooltip.js.map +1 -1
  417. package/dist/components/ui/trace/trace.d.ts.map +1 -1
  418. package/dist/components/ui/trace/trace.js +17 -17
  419. package/dist/components/ui/trace/trace.js.map +1 -1
  420. package/dist/components/ui/typography/typography.d.ts +3 -3
  421. package/dist/components/ui/typography/typography.js +5 -5
  422. package/dist/components/ui/typography/typography.js.map +1 -1
  423. package/dist/index.d.ts +1 -0
  424. package/dist/index.d.ts.map +1 -1
  425. package/dist/index.js +5 -3
  426. package/dist/lib/accent-presets.d.ts +1 -1
  427. package/dist/lib/accent-presets.js.map +1 -1
  428. package/dist/lib/accent-roles.d.ts +2 -2
  429. package/dist/lib/accent-roles.js +2 -2
  430. package/dist/lib/accent-roles.js.map +1 -1
  431. package/dist/lib/appearance-font-settings.d.ts.map +1 -1
  432. package/dist/lib/appearance-font-settings.js +15 -7
  433. package/dist/lib/appearance-font-settings.js.map +1 -1
  434. package/dist/lib/create-poll.d.ts +39 -0
  435. package/dist/lib/create-poll.d.ts.map +1 -0
  436. package/dist/lib/create-poll.js +116 -0
  437. package/dist/lib/create-poll.js.map +1 -0
  438. package/dist/lib/font-zoom.d.ts +1 -1
  439. package/dist/lib/font-zoom.js +1 -1
  440. package/dist/lib/font-zoom.js.map +1 -1
  441. package/dist/lib/keyed-rows.d.ts +2 -1
  442. package/dist/lib/keyed-rows.d.ts.map +1 -1
  443. package/dist/lib/keyed-rows.js +3 -2
  444. package/dist/lib/keyed-rows.js.map +1 -1
  445. package/dist/lib/overlay.d.ts +5 -5
  446. package/dist/lib/overlay.js +5 -5
  447. package/dist/lib/overlay.js.map +1 -1
  448. package/dist/lib/preference-store.d.ts +2 -2
  449. package/dist/lib/preference-store.js +2 -2
  450. package/dist/lib/preference-store.js.map +1 -1
  451. package/dist/lib/safe-script.d.ts +2 -2
  452. package/dist/lib/safe-script.js +2 -2
  453. package/dist/lib/safe-script.js.map +1 -1
  454. package/dist/lib/scroll-geometry.d.ts +1 -1
  455. package/dist/lib/scroll-geometry.js +1 -1
  456. package/dist/lib/scroll-geometry.js.map +1 -1
  457. package/dist/lib/text.d.ts +1 -1
  458. package/dist/lib/text.js +1 -1
  459. package/dist/lib/text.js.map +1 -1
  460. package/dist/lib/theme-accents.js +3 -3
  461. package/dist/lib/theme-accents.js.map +1 -1
  462. package/dist/lib/theme-css.js.map +1 -1
  463. package/dist/lib/theme-defaults.d.ts +4 -4
  464. package/dist/lib/theme-defaults.js +4 -4
  465. package/dist/lib/theme-defaults.js.map +1 -1
  466. package/dist/lib/theme-engine-light.js.map +1 -1
  467. package/dist/lib/theme-engine.d.ts +2 -2
  468. package/dist/lib/theme-engine.js +2 -2
  469. package/dist/lib/theme-engine.js.map +1 -1
  470. package/dist/lib/theme-projection.d.ts +1 -1
  471. package/dist/lib/theme-projection.js +2 -2
  472. package/dist/lib/theme-projection.js.map +1 -1
  473. package/dist/lib/theme-records.d.ts +2 -2
  474. package/dist/lib/theme-records.js +2 -2
  475. package/dist/lib/theme-records.js.map +1 -1
  476. package/dist/lib/theme-types.d.ts +1 -1
  477. package/dist/lib/theme-types.js.map +1 -1
  478. package/dist/lib/themes.d.ts +13 -13
  479. package/dist/lib/themes.js +13 -13
  480. package/dist/lib/themes.js.map +1 -1
  481. package/dist/lib/tokens.d.ts +2 -2
  482. package/dist/lib/tokens.js +1 -1
  483. package/dist/lib/tokens.js.map +1 -1
  484. package/dist/lib/tooltip-focus-gate.d.ts +2 -2
  485. package/dist/lib/tooltip-focus-gate.js +2 -2
  486. package/dist/lib/tooltip-focus-gate.js.map +1 -1
  487. package/dist/lib/utils.d.ts +1 -1
  488. package/dist/lib/utils.js +1 -1
  489. package/dist/lib/utils.js.map +1 -1
  490. package/dist/lib/variants.d.ts +4 -4
  491. package/dist/lib/variants.js +1 -1
  492. package/dist/lib/variants.js.map +1 -1
  493. package/dist/lib/version-notes.d.ts +4 -4
  494. package/dist/lib/version-notes.js +4 -4
  495. package/dist/lib/version-notes.js.map +1 -1
  496. package/dist/lint.js.map +1 -1
  497. package/dist/r/account-menu.json +1 -0
  498. package/dist/r/lib.json +5 -0
  499. package/dist/r/registry.json +11 -0
  500. package/dist/r/src/components/composites/account-menu/account-menu.tsx +22 -2
  501. package/dist/r/src/components/composites/action-button/action-button.tsx +124 -78
  502. package/dist/r/src/components/composites/appearance-editor/accent-swatch-groups.tsx +3 -3
  503. package/dist/r/src/components/composites/appearance-editor/appearance-choices.tsx +3 -3
  504. package/dist/r/src/components/composites/appearance-editor/appearance-editor.tsx +15 -9
  505. package/dist/r/src/components/composites/appearance-editor/appearance-rows.tsx +3 -1
  506. package/dist/r/src/components/composites/appearance-editor/appearance-types.ts +7 -7
  507. package/dist/r/src/components/composites/appearance-editor/theme-preview.tsx +1 -1
  508. package/dist/r/src/components/composites/catalog-browser/catalog-browser.tsx +6 -2
  509. package/dist/r/src/components/composites/catalog-browser/catalog-detail.tsx +15 -6
  510. package/dist/r/src/components/composites/chain-of-thought/chain-of-thought.tsx +4 -4
  511. package/dist/r/src/components/composites/chat/chat.tsx +15 -9
  512. package/dist/r/src/components/composites/checkpoint/checkpoint-model.ts +3 -3
  513. package/dist/r/src/components/composites/checkpoint/checkpoint.tsx +2 -2
  514. package/dist/r/src/components/composites/confirmation/confirmation.tsx +8 -4
  515. package/dist/r/src/components/composites/context/context.tsx +2 -2
  516. package/dist/r/src/components/composites/file-tree/build-file-tree.ts +1 -1
  517. package/dist/r/src/components/composites/file-tree/file-tree.tsx +16 -2
  518. package/dist/r/src/components/composites/icon-picker/icon-picker.tsx +1 -1
  519. package/dist/r/src/components/composites/inline-citation/citation.ts +1 -1
  520. package/dist/r/src/components/composites/inline-citation/inline-citation.tsx +2 -2
  521. package/dist/r/src/components/composites/list-row/list-row-control.tsx +31 -22
  522. package/dist/r/src/components/composites/list-row/list-row.tsx +69 -73
  523. package/dist/r/src/components/composites/message-scroller/message-scroller.tsx +1 -1
  524. package/dist/r/src/components/composites/model-selector/model-selector.tsx +4 -4
  525. package/dist/r/src/components/composites/model-selector/models.ts +2 -2
  526. package/dist/r/src/components/composites/plan/plan.tsx +19 -11
  527. package/dist/r/src/components/composites/queue/queue.tsx +5 -3
  528. package/dist/r/src/components/composites/reasoning/reasoning.tsx +4 -4
  529. package/dist/r/src/components/composites/settings/settings-navigation.tsx +57 -17
  530. package/dist/r/src/components/composites/settings/settings.tsx +14 -6
  531. package/dist/r/src/components/composites/sources/source.ts +1 -1
  532. package/dist/r/src/components/composites/sources/sources.tsx +2 -2
  533. package/dist/r/src/components/composites/stack-trace/parse-stack-trace.ts +7 -7
  534. package/dist/r/src/components/composites/stack-trace/stack-trace.tsx +3 -3
  535. package/dist/r/src/components/composites/stat/stat.tsx +20 -16
  536. package/dist/r/src/components/composites/subagent/subagent.tsx +6 -4
  537. package/dist/r/src/components/composites/task/task.tsx +1 -1
  538. package/dist/r/src/components/composites/terminal/ansi.ts +3 -3
  539. package/dist/r/src/components/composites/terminal/terminal-model.ts +3 -3
  540. package/dist/r/src/components/composites/terminal/terminal.tsx +24 -12
  541. package/dist/r/src/components/composites/test-results/test-results-model.ts +4 -4
  542. package/dist/r/src/components/composites/test-results/test-results.tsx +1 -1
  543. package/dist/r/src/components/composites/tool/tool.tsx +4 -4
  544. package/dist/r/src/components/composites/tree/tree.tsx +31 -15
  545. package/dist/r/src/components/composites/update-dialog/channel-control.tsx +17 -8
  546. package/dist/r/src/components/composites/update-dialog/index.ts +1 -0
  547. package/dist/r/src/components/composites/update-dialog/update-dialog.tsx +7 -7
  548. package/dist/r/src/components/composites/workspace-mark/workspace-mark.tsx +15 -12
  549. package/dist/r/src/components/conversation/busy-send-button.tsx +6 -2
  550. package/dist/r/src/components/conversation/composer-menu.tsx +3 -3
  551. package/dist/r/src/components/conversation/conversation-avatar.tsx +1 -1
  552. package/dist/r/src/components/conversation/conversation-pane.tsx +8 -5
  553. package/dist/r/src/components/conversation/conversation-surface.tsx +2 -2
  554. package/dist/r/src/components/conversation/internal/chat-composer-shell.tsx +18 -12
  555. package/dist/r/src/components/conversation/message-composer.tsx +4 -6
  556. package/dist/r/src/components/conversation/message-row.tsx +34 -26
  557. package/dist/r/src/components/conversation/scroll-follow-core.ts +8 -8
  558. package/dist/r/src/components/conversation/scroll-follow.ts +24 -8
  559. package/dist/r/src/components/conversation/thread-panel.tsx +7 -3
  560. package/dist/r/src/components/conversation/transcript-composition.tsx +4 -2
  561. package/dist/r/src/components/layout/app-shell/app-shell.tsx +1 -1
  562. package/dist/r/src/components/layout/app-shell/skip-link.tsx +3 -2
  563. package/dist/r/src/components/layout/page/page.tsx +15 -11
  564. package/dist/r/src/components/layout/panel/panel.tsx +1 -1
  565. package/dist/r/src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx +21 -1
  566. package/dist/r/src/components/layout/side-rail/side-rail-context.ts +1 -1
  567. package/dist/r/src/components/layout/side-rail/side-rail.tsx +38 -22
  568. package/dist/r/src/components/layout/sidebar-nav/sidebar-nav.tsx +22 -16
  569. package/dist/r/src/components/layout/split-layout/resize-controller-core-retry.tsx +25 -7
  570. package/dist/r/src/components/layout/split-layout/resize-controller-core.tsx +25 -7
  571. package/dist/r/src/components/layout/split-layout/split-layout.tsx +6 -2
  572. package/dist/r/src/components/layout/status-bar/status-bar.tsx +1 -1
  573. package/dist/r/src/components/layout/top-bar/top-bar.tsx +8 -6
  574. package/dist/r/src/components/motion/presence.tsx +2 -2
  575. package/dist/r/src/components/theme/appearance-panel.tsx +5 -5
  576. package/dist/r/src/components/theme/lazy.ts +1 -1
  577. package/dist/r/src/components/theme/theme-catalogue-source.ts +2 -2
  578. package/dist/r/src/components/theme/theme-context.ts +3 -3
  579. package/dist/r/src/components/theme/theme-document.ts +22 -11
  580. package/dist/r/src/components/theme/theme-picker.tsx +5 -5
  581. package/dist/r/src/components/theme/theme-provider-value.ts +15 -3
  582. package/dist/r/src/components/theme/theme-script.ts +20 -0
  583. package/dist/r/src/components/theme/theme-state.ts +7 -7
  584. package/dist/r/src/components/theme/theme-toggle.tsx +1 -1
  585. package/dist/r/src/components/ui/alert/alert.tsx +4 -3
  586. package/dist/r/src/components/ui/alert-dialog/alert-dialog.tsx +4 -4
  587. package/dist/r/src/components/ui/badge/badge.tsx +2 -2
  588. package/dist/r/src/components/ui/board/board.tsx +17 -5
  589. package/dist/r/src/components/ui/bubble/bubble.tsx +6 -4
  590. package/dist/r/src/components/ui/button/button.tsx +2 -2
  591. package/dist/r/src/components/ui/button-group/button-group.tsx +1 -1
  592. package/dist/r/src/components/ui/calendar/calendar.tsx +2 -2
  593. package/dist/r/src/components/ui/callout/callout.tsx +4 -4
  594. package/dist/r/src/components/ui/card/card.tsx +2 -2
  595. package/dist/r/src/components/ui/carousel/carousel.tsx +6 -6
  596. package/dist/r/src/components/ui/chart/chart-options.ts +9 -9
  597. package/dist/r/src/components/ui/chart/chart.tsx +14 -1
  598. package/dist/r/src/components/ui/checkbox/checkbox.tsx +9 -6
  599. package/dist/r/src/components/ui/code-block/code-block.tsx +14 -7
  600. package/dist/r/src/components/ui/command/command.tsx +7 -7
  601. package/dist/r/src/components/ui/context-menu/context-menu.tsx +1 -1
  602. package/dist/r/src/components/ui/detail-panel/detail-panel.tsx +5 -3
  603. package/dist/r/src/components/ui/dialog/dialog-layer.tsx +27 -1
  604. package/dist/r/src/components/ui/dialog/dialog.tsx +4 -3
  605. package/dist/r/src/components/ui/diff-block/diff-block.tsx +6 -6
  606. package/dist/r/src/components/ui/drawer/drawer.tsx +3 -3
  607. package/dist/r/src/components/ui/dropdown-menu/dropdown-menu.tsx +6 -6
  608. package/dist/r/src/components/ui/dropdown-menu/menu-parts.tsx +5 -5
  609. package/dist/r/src/components/ui/empty/empty-state.tsx +23 -18
  610. package/dist/r/src/components/ui/empty/empty.tsx +1 -1
  611. package/dist/r/src/components/ui/entity-icon/entity-icon.tsx +5 -1
  612. package/dist/r/src/components/ui/field/field.tsx +15 -7
  613. package/dist/r/src/components/ui/field/number-field.tsx +1 -1
  614. package/dist/r/src/components/ui/hover-card/hover-card.tsx +1 -1
  615. package/dist/r/src/components/ui/input-group/input-group.tsx +1 -1
  616. package/dist/r/src/components/ui/input-otp/input-otp.tsx +1 -1
  617. package/dist/r/src/components/ui/item/item.tsx +24 -18
  618. package/dist/r/src/components/ui/kbd/kbd.tsx +2 -2
  619. package/dist/r/src/components/ui/kbd/platform-modifier.ts +3 -3
  620. package/dist/r/src/components/ui/label/label.tsx +1 -1
  621. package/dist/r/src/components/ui/marker/marker.tsx +9 -5
  622. package/dist/r/src/components/ui/menubar/menubar.tsx +2 -2
  623. package/dist/r/src/components/ui/message/message.tsx +14 -13
  624. package/dist/r/src/components/ui/modal-dialog/modal-dialog.tsx +9 -5
  625. package/dist/r/src/components/ui/native-select/native-select.tsx +1 -1
  626. package/dist/r/src/components/ui/navigation-menu/navigation-menu.tsx +5 -4
  627. package/dist/r/src/components/ui/pagination/pagination.tsx +1 -1
  628. package/dist/r/src/components/ui/popover/popover.tsx +4 -2
  629. package/dist/r/src/components/ui/progress/progress.tsx +5 -3
  630. package/dist/r/src/components/ui/questionnaire/questionnaire.tsx +10 -5
  631. package/dist/r/src/components/ui/radio-group/radio-group.tsx +9 -6
  632. package/dist/r/src/components/ui/resizable/resizable.tsx +5 -5
  633. package/dist/r/src/components/ui/select/select.tsx +4 -4
  634. package/dist/r/src/components/ui/sheet/sheet.tsx +4 -3
  635. package/dist/r/src/components/ui/skeleton/skeleton.tsx +1 -1
  636. package/dist/r/src/components/ui/slider/slider.tsx +1 -1
  637. package/dist/r/src/components/ui/spinner/spinner.tsx +1 -1
  638. package/dist/r/src/components/ui/status-chip/status-chip.tsx +13 -13
  639. package/dist/r/src/components/ui/switch/switch.tsx +9 -6
  640. package/dist/r/src/components/ui/tabs/tabs.tsx +4 -4
  641. package/dist/r/src/components/ui/textarea/textarea.tsx +1 -1
  642. package/dist/r/src/components/ui/toast/toast.tsx +6 -4
  643. package/dist/r/src/components/ui/toggle/toggle.tsx +1 -1
  644. package/dist/r/src/components/ui/tooltip/deferred-tooltip.tsx +131 -0
  645. package/dist/r/src/components/ui/tooltip/index.ts +1 -0
  646. package/dist/r/src/components/ui/tooltip/tooltip.tsx +6 -4
  647. package/dist/r/src/components/ui/trace/trace.tsx +13 -9
  648. package/dist/r/src/components/ui/typography/typography.tsx +5 -5
  649. package/dist/r/src/lib/accent-presets.ts +1 -1
  650. package/dist/r/src/lib/accent-roles.ts +2 -2
  651. package/dist/r/src/lib/appearance-font-settings.ts +18 -7
  652. package/dist/r/src/lib/create-poll.ts +150 -0
  653. package/dist/r/src/lib/font-zoom.ts +3 -3
  654. package/dist/r/src/lib/keyed-rows.ts +3 -2
  655. package/dist/r/src/lib/overlay.ts +5 -5
  656. package/dist/r/src/lib/preference-store.ts +2 -2
  657. package/dist/r/src/lib/safe-script.ts +2 -2
  658. package/dist/r/src/lib/scroll-geometry.ts +1 -1
  659. package/dist/r/src/lib/text.ts +1 -1
  660. package/dist/r/src/lib/theme-accents.ts +3 -3
  661. package/dist/r/src/lib/theme-css.ts +2 -2
  662. package/dist/r/src/lib/theme-defaults.ts +4 -4
  663. package/dist/r/src/lib/theme-engine-light.ts +2 -2
  664. package/dist/r/src/lib/theme-engine.ts +2 -2
  665. package/dist/r/src/lib/theme-projection.ts +2 -2
  666. package/dist/r/src/lib/theme-records.ts +2 -2
  667. package/dist/r/src/lib/theme-types.ts +1 -1
  668. package/dist/r/src/lib/themes.ts +14 -14
  669. package/dist/r/src/lib/tokens.ts +2 -2
  670. package/dist/r/src/lib/tooltip-focus-gate.ts +11 -11
  671. package/dist/r/src/lib/utils.ts +1 -1
  672. package/dist/r/src/lib/variants.ts +4 -4
  673. package/dist/r/src/lib/version-notes.ts +4 -4
  674. package/dist/r/src/styles/base.css +12 -43
  675. package/dist/r/src/styles/fonts.css +1 -1
  676. package/dist/r/src/styles/theme.css +35 -35
  677. package/dist/r/tooltip.json +5 -0
  678. package/package.json +2 -1
  679. package/registry.json +11 -0
  680. package/src/components/composites/account-menu/account-menu.tsx +22 -2
  681. package/src/components/composites/action-button/action-button.tsx +124 -78
  682. package/src/components/composites/appearance-editor/accent-swatch-groups.tsx +3 -3
  683. package/src/components/composites/appearance-editor/appearance-choices.tsx +3 -3
  684. package/src/components/composites/appearance-editor/appearance-editor.tsx +15 -9
  685. package/src/components/composites/appearance-editor/appearance-rows.tsx +3 -1
  686. package/src/components/composites/appearance-editor/appearance-types.ts +7 -7
  687. package/src/components/composites/appearance-editor/theme-preview.tsx +1 -1
  688. package/src/components/composites/catalog-browser/catalog-browser.tsx +6 -2
  689. package/src/components/composites/catalog-browser/catalog-detail.tsx +15 -6
  690. package/src/components/composites/chain-of-thought/chain-of-thought.tsx +4 -4
  691. package/src/components/composites/chat/chat.tsx +15 -9
  692. package/src/components/composites/checkpoint/checkpoint-model.ts +3 -3
  693. package/src/components/composites/checkpoint/checkpoint.tsx +2 -2
  694. package/src/components/composites/confirmation/confirmation.tsx +8 -4
  695. package/src/components/composites/context/context.tsx +2 -2
  696. package/src/components/composites/file-tree/build-file-tree.ts +1 -1
  697. package/src/components/composites/file-tree/file-tree.tsx +16 -2
  698. package/src/components/composites/icon-picker/icon-picker.tsx +1 -1
  699. package/src/components/composites/inline-citation/citation.ts +1 -1
  700. package/src/components/composites/inline-citation/inline-citation.tsx +2 -2
  701. package/src/components/composites/list-row/list-row-control.tsx +31 -22
  702. package/src/components/composites/list-row/list-row.tsx +69 -73
  703. package/src/components/composites/message-scroller/message-scroller.tsx +1 -1
  704. package/src/components/composites/model-selector/model-selector.tsx +4 -4
  705. package/src/components/composites/model-selector/models.ts +2 -2
  706. package/src/components/composites/plan/plan.tsx +19 -11
  707. package/src/components/composites/queue/queue.tsx +5 -3
  708. package/src/components/composites/reasoning/reasoning.tsx +4 -4
  709. package/src/components/composites/settings/settings-navigation.tsx +57 -17
  710. package/src/components/composites/settings/settings.tsx +14 -6
  711. package/src/components/composites/sources/source.ts +1 -1
  712. package/src/components/composites/sources/sources.tsx +2 -2
  713. package/src/components/composites/stack-trace/parse-stack-trace.ts +7 -7
  714. package/src/components/composites/stack-trace/stack-trace.tsx +3 -3
  715. package/src/components/composites/stat/stat.tsx +20 -16
  716. package/src/components/composites/subagent/subagent.tsx +6 -4
  717. package/src/components/composites/task/task.tsx +1 -1
  718. package/src/components/composites/terminal/ansi.ts +3 -3
  719. package/src/components/composites/terminal/terminal-model.ts +3 -3
  720. package/src/components/composites/terminal/terminal.tsx +24 -12
  721. package/src/components/composites/test-results/test-results-model.ts +4 -4
  722. package/src/components/composites/test-results/test-results.tsx +1 -1
  723. package/src/components/composites/tool/tool.tsx +4 -4
  724. package/src/components/composites/tree/tree.tsx +31 -15
  725. package/src/components/composites/update-dialog/channel-control.tsx +17 -8
  726. package/src/components/composites/update-dialog/index.ts +1 -0
  727. package/src/components/composites/update-dialog/update-dialog.tsx +7 -7
  728. package/src/components/composites/workspace-mark/workspace-mark.tsx +15 -12
  729. package/src/components/conversation/busy-send-button.tsx +6 -2
  730. package/src/components/conversation/composer-menu.tsx +3 -3
  731. package/src/components/conversation/conversation-avatar.tsx +1 -1
  732. package/src/components/conversation/conversation-pane.tsx +8 -5
  733. package/src/components/conversation/conversation-surface.tsx +2 -2
  734. package/src/components/conversation/internal/chat-composer-shell.tsx +18 -12
  735. package/src/components/conversation/message-composer.tsx +4 -6
  736. package/src/components/conversation/message-row.tsx +34 -26
  737. package/src/components/conversation/scroll-follow-core.ts +8 -8
  738. package/src/components/conversation/scroll-follow.ts +24 -8
  739. package/src/components/conversation/thread-panel.tsx +7 -3
  740. package/src/components/conversation/transcript-composition.tsx +4 -2
  741. package/src/components/layout/app-shell/app-shell.tsx +1 -1
  742. package/src/components/layout/app-shell/skip-link.tsx +3 -2
  743. package/src/components/layout/page/page.tsx +15 -11
  744. package/src/components/layout/panel/panel.tsx +1 -1
  745. package/src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx +21 -1
  746. package/src/components/layout/side-rail/side-rail-context.ts +1 -1
  747. package/src/components/layout/side-rail/side-rail.tsx +38 -22
  748. package/src/components/layout/sidebar-nav/sidebar-nav.tsx +22 -16
  749. package/src/components/layout/split-layout/resize-controller-core-retry.tsx +25 -7
  750. package/src/components/layout/split-layout/resize-controller-core.tsx +25 -7
  751. package/src/components/layout/split-layout/split-layout.tsx +6 -2
  752. package/src/components/layout/status-bar/status-bar.tsx +1 -1
  753. package/src/components/layout/top-bar/top-bar.tsx +8 -6
  754. package/src/components/motion/presence.tsx +2 -2
  755. package/src/components/theme/appearance-panel.tsx +5 -5
  756. package/src/components/theme/lazy.ts +1 -1
  757. package/src/components/theme/theme-catalogue-source.ts +2 -2
  758. package/src/components/theme/theme-context.ts +3 -3
  759. package/src/components/theme/theme-document.ts +22 -11
  760. package/src/components/theme/theme-picker.tsx +5 -5
  761. package/src/components/theme/theme-provider-value.ts +15 -3
  762. package/src/components/theme/theme-script.ts +20 -0
  763. package/src/components/theme/theme-state.ts +7 -7
  764. package/src/components/theme/theme-toggle.tsx +1 -1
  765. package/src/components/ui/alert/alert.tsx +4 -3
  766. package/src/components/ui/alert-dialog/alert-dialog.tsx +4 -4
  767. package/src/components/ui/badge/badge.tsx +2 -2
  768. package/src/components/ui/board/board.tsx +17 -5
  769. package/src/components/ui/bubble/bubble.tsx +6 -4
  770. package/src/components/ui/button/button.tsx +2 -2
  771. package/src/components/ui/button-group/button-group.tsx +1 -1
  772. package/src/components/ui/calendar/calendar.tsx +2 -2
  773. package/src/components/ui/callout/callout.tsx +4 -4
  774. package/src/components/ui/card/card.tsx +2 -2
  775. package/src/components/ui/carousel/carousel.tsx +6 -6
  776. package/src/components/ui/chart/chart-options.ts +9 -9
  777. package/src/components/ui/chart/chart.tsx +14 -1
  778. package/src/components/ui/checkbox/checkbox.tsx +9 -6
  779. package/src/components/ui/code-block/code-block.tsx +14 -7
  780. package/src/components/ui/command/command.tsx +7 -7
  781. package/src/components/ui/context-menu/context-menu.tsx +1 -1
  782. package/src/components/ui/detail-panel/detail-panel.tsx +5 -3
  783. package/src/components/ui/dialog/dialog-layer.tsx +27 -1
  784. package/src/components/ui/dialog/dialog.tsx +4 -3
  785. package/src/components/ui/diff-block/diff-block.tsx +6 -6
  786. package/src/components/ui/drawer/drawer.tsx +3 -3
  787. package/src/components/ui/dropdown-menu/dropdown-menu.tsx +6 -6
  788. package/src/components/ui/dropdown-menu/menu-parts.tsx +5 -5
  789. package/src/components/ui/empty/empty-state.tsx +23 -18
  790. package/src/components/ui/empty/empty.tsx +1 -1
  791. package/src/components/ui/entity-icon/entity-icon.tsx +5 -1
  792. package/src/components/ui/field/field.tsx +15 -7
  793. package/src/components/ui/field/number-field.tsx +1 -1
  794. package/src/components/ui/hover-card/hover-card.tsx +1 -1
  795. package/src/components/ui/input-group/input-group.tsx +1 -1
  796. package/src/components/ui/input-otp/input-otp.tsx +1 -1
  797. package/src/components/ui/item/item.tsx +24 -18
  798. package/src/components/ui/kbd/kbd.tsx +2 -2
  799. package/src/components/ui/kbd/platform-modifier.ts +3 -3
  800. package/src/components/ui/label/label.tsx +1 -1
  801. package/src/components/ui/marker/marker.tsx +9 -5
  802. package/src/components/ui/menubar/menubar.tsx +2 -2
  803. package/src/components/ui/message/message.tsx +14 -13
  804. package/src/components/ui/modal-dialog/modal-dialog.tsx +9 -5
  805. package/src/components/ui/native-select/native-select.tsx +1 -1
  806. package/src/components/ui/navigation-menu/navigation-menu.tsx +5 -4
  807. package/src/components/ui/pagination/pagination.tsx +1 -1
  808. package/src/components/ui/popover/popover.tsx +4 -2
  809. package/src/components/ui/progress/progress.tsx +5 -3
  810. package/src/components/ui/questionnaire/questionnaire.tsx +10 -5
  811. package/src/components/ui/radio-group/radio-group.tsx +9 -6
  812. package/src/components/ui/resizable/resizable.tsx +5 -5
  813. package/src/components/ui/select/select.tsx +4 -4
  814. package/src/components/ui/sheet/sheet.tsx +4 -3
  815. package/src/components/ui/skeleton/skeleton.tsx +1 -1
  816. package/src/components/ui/slider/slider.tsx +1 -1
  817. package/src/components/ui/spinner/spinner.tsx +1 -1
  818. package/src/components/ui/status-chip/status-chip.tsx +13 -13
  819. package/src/components/ui/switch/switch.tsx +9 -6
  820. package/src/components/ui/tabs/tabs.tsx +4 -4
  821. package/src/components/ui/textarea/textarea.tsx +1 -1
  822. package/src/components/ui/toast/toast.tsx +6 -4
  823. package/src/components/ui/toggle/toggle.tsx +1 -1
  824. package/src/components/ui/tooltip/deferred-tooltip.tsx +131 -0
  825. package/src/components/ui/tooltip/index.ts +1 -0
  826. package/src/components/ui/tooltip/tooltip.tsx +6 -4
  827. package/src/components/ui/trace/trace.tsx +13 -9
  828. package/src/components/ui/typography/typography.tsx +5 -5
  829. package/src/index.ts +1 -0
  830. package/src/lib/accent-presets.ts +1 -1
  831. package/src/lib/accent-roles.ts +2 -2
  832. package/src/lib/appearance-font-settings.ts +18 -7
  833. package/src/lib/create-poll.ts +150 -0
  834. package/src/lib/font-zoom.ts +3 -3
  835. package/src/lib/keyed-rows.ts +3 -2
  836. package/src/lib/overlay.ts +5 -5
  837. package/src/lib/preference-store.ts +2 -2
  838. package/src/lib/safe-script.ts +2 -2
  839. package/src/lib/scroll-geometry.ts +1 -1
  840. package/src/lib/text.ts +1 -1
  841. package/src/lib/theme-accents.ts +3 -3
  842. package/src/lib/theme-css.ts +2 -2
  843. package/src/lib/theme-defaults.ts +4 -4
  844. package/src/lib/theme-engine-light.ts +2 -2
  845. package/src/lib/theme-engine.ts +2 -2
  846. package/src/lib/theme-projection.ts +2 -2
  847. package/src/lib/theme-records.ts +2 -2
  848. package/src/lib/theme-types.ts +1 -1
  849. package/src/lib/themes.ts +14 -14
  850. package/src/lib/tokens.ts +2 -2
  851. package/src/lib/tooltip-focus-gate.ts +11 -11
  852. package/src/lib/utils.ts +1 -1
  853. package/src/lib/variants.ts +4 -4
  854. package/src/lib/version-notes.ts +4 -4
  855. package/src/lint/index.ts +1 -1
  856. package/src/styles/base.css +12 -43
  857. package/src/styles/fonts.css +1 -1
  858. package/src/styles/theme.css +35 -35
  859. package/src/styles/themes/aardvark-blue.css +98 -0
  860. package/src/styles/themes/aardvark-ink.css +98 -0
  861. package/src/styles/themes/adea-dark-colorblind.css +98 -0
  862. package/src/styles/themes/adea-dark-high-contrast.css +98 -0
  863. package/src/styles/themes/adea-dark.css +47 -0
  864. package/src/styles/themes/adea-light-colorblind.css +141 -0
  865. package/src/styles/themes/adea-light-high-contrast.css +141 -0
  866. package/src/styles/themes/adea-light.css +47 -0
  867. package/src/styles/themes/ayu-light.css +141 -0
  868. package/src/styles/themes/ayu-mirage.css +98 -0
  869. package/src/styles/themes/ayu.css +98 -0
  870. package/src/styles/themes/catppuccin-frappe.css +98 -0
  871. package/src/styles/themes/catppuccin-latte.css +141 -0
  872. package/src/styles/themes/catppuccin-macchiato.css +98 -0
  873. package/src/styles/themes/catppuccin-mocha.css +98 -0
  874. package/src/styles/themes/dracula.css +98 -0
  875. package/src/styles/themes/everforest-dark.css +98 -0
  876. package/src/styles/themes/everforest-light.css +141 -0
  877. package/src/styles/themes/gruvbox-dark.css +98 -0
  878. package/src/styles/themes/gruvbox-light.css +141 -0
  879. package/src/styles/themes/kanagawa.css +98 -0
  880. package/src/styles/themes/monokai.css +98 -0
  881. package/src/styles/themes/nord-light.css +141 -0
  882. package/src/styles/themes/nord.css +98 -0
  883. package/src/styles/themes/one-dark.css +98 -0
  884. package/src/styles/themes/rosepine-dawn.css +141 -0
  885. package/src/styles/themes/rosepine-moon.css +98 -0
  886. package/src/styles/themes/rosepine.css +98 -0
  887. package/src/styles/themes/solarized-dark.css +98 -0
  888. package/src/styles/themes/solarized-light.css +141 -0
  889. package/src/styles/themes/tokyonight-day.css +141 -0
  890. package/src/styles/themes/tokyonight-night.css +98 -0
  891. package/src/styles/themes/tokyonight-storm.css +98 -0
  892. package/src/styles/themes/vesper.css +98 -0
@@ -1 +1 @@
1
- {"version":3,"file":"board.js","names":["createEffect","createMemo","createSignal","For","Index","onCleanup","Show","splitProps","cva","cn","badgeVariants","headingVariants","textVariants","id","label","count","meta","tone","collapsible","disabled","itemId","from","to","columns","items","item","itemColumn","canDrop","onMove","children","dragging","emptyColumn","column","collapseEmpty","class","cardDragState","idle","toneDot","neutral","BoardColumnDot","props","_$createComponent","when","_el$","_tmpl$","_$effect","_$className","BoardColumnCount","undefined","_el$2","_tmpl$2","_$insert","variant","size","Board","local","setDragging","overColumn","setOverColumn","announcement","setAnnouncement","cardElements","Map","pendingFocus","setPendingFocus","columnId","source","cancelOnPointer","pending","document","ownerDocument","cancelOnFocus","event","contains","target","addEventListener","removeEventListener","moved","find","get","isConnected","focus","prepareFocus","always","card","activeElement","byColumn","grouped","set","push","accepts","Boolean","drop","accepted","moveByKeyboard","direction","index","findIndex","ordered","slice","toReversed","_el$3","_tmpl$3","_el$4","firstChild","each","collapsed","length","over","_el$5","_tmpl$8","preventDefault","currentTarget","relatedTarget","current","fallback","_el$1","_tmpl$9","_el$10","leading","_el$6","_tmpl$5","_el$7","_el$8","_tmpl$4","_el$9","_tmpl$7","isDragging","_el$11","_tmpl$0","$$keydown","ctrlKey","metaKey","key","dataTransfer","setData","effectAllowed","_$use","element","delete","_$setAttribute","_el$0","_tmpl$6","_p$","_v$3","_v$4","_v$5","e","t","a","_v$","_v$2","boardCardTitleVariants","variants","sm","md","defaultVariants","BoardCardTitle","_el$12","_tmpl$1","BoardCardBody","_el$13","_tmpl$10","BoardCardTrigger","rest","_el$14","_tmpl$11","_$spread","_$mergeProps","type","_$delegateEvents"],"sources":["../../../../src/components/ui/board/board.tsx"],"sourcesContent":["import {\n type ComponentProps,\n createEffect,\n createMemo,\n createSignal,\n For,\n Index,\n onCleanup,\n Show,\n splitProps,\n type JSX,\n} from 'solid-js'\nimport { cva, type VariantProps } from '#lib/variants'\nimport { cn } from '#lib/utils'\nimport { badgeVariants } from '../badge'\nimport { headingVariants, textVariants } from '../typography'\n\n/**\n * Board.\n *\n * Columns of cards, with drag between them — the shape a task tracker, a CRM\n * pipeline, a support queue and a release plan all share. It is generic in the\n * one place that matters: the *column ids are the caller's*, and so is the rule\n * that decides which moves are legal. The component knows nothing about tasks.\n *\n * The transitions are a predicate rather than a derived table because the legal\n * moves in a real product are not \"any column to any column\". A task that is\n * `completed` may be archived but not re-queued; a lead may become a customer but\n * not a stranger again. A board that let you drop anything anywhere would encode\n * a state machine in the UI that the server rejects — so `canDrop` is required,\n * and a column that cannot receive the dragged card renders as unavailable rather\n * than silently accepting a drop that will fail.\n *\n * Three input methods, because a drag-only board is unusable by keyboard:\n * dragging with the pointer, `Ctrl`/`Cmd` + arrow keys to move a focused card\n * between columns, and whatever the caller wires into `actions`. The card is\n * focusable and its move is announced through a live region, so the board is\n * operable without a mouse.\n *\n * The card is rendered by the caller through `children`, given the item and a set\n * of drag props. That is deliberate: a card's contents are domain — a title, a\n * priority tag, an assignee — and a board that rendered them itself could only\n * ever serve one product.\n *\n * `collapseEmpty` folds a column with no cards to a strip one line of text wide,\n * its label turned on its side. A board of seven lanes where three are empty\n * otherwise spends half its width on nothing, and the lanes with work in them\n * are the ones that need the room. A folded lane is still a full-height drop\n * target and still accepts a keyboard move, so nothing about operating the\n * board changes; it does not unfold under a drag, because a lane that grows\n * under the pointer moves every lane after it and the drop lands somewhere else.\n *\n * Give the board a height (`class=\"h-full\"`) and each lane scrolls on its own;\n * leave it unconstrained and lanes grow with their cards and the page scrolls.\n */\n\n/**\n * A lane's identifying colour, drawn as a dot before its label. The chart hues,\n * in the order the token set gives them, because a lane colour tells lanes apart\n * like a series does; it carries no status. `neutral` is for a lane that should\n * not draw the eye — a backlog, an archive.\n */\nexport type BoardTone =\n | 'neutral'\n | 'chart-1'\n | 'chart-2'\n | 'chart-3'\n | 'chart-4'\n | 'chart-5'\n | 'chart-6'\n\nexport type BoardColumn = Readonly<{\n id: string\n label: string\n /** The number of cards, shown as an accent count beside the label. */\n count?: number\n /** A limit or any other note, shown after the count. */\n meta?: JSX.Element\n /** The lane's dot colour. Omitted, the header has no dot. */\n tone?: BoardTone\n /**\n * `false` keeps this lane open when it is empty under `collapseEmpty` — the\n * inbox lane new cards arrive in, which should always show where they land.\n */\n collapsible?: boolean\n /** Dim the column and refuse drops — a lane that is closed or read-only. */\n disabled?: boolean\n}>\n\nexport type BoardMove = Readonly<{\n itemId: string\n from: string\n to: string\n}>\n\nexport type BoardProps<T> = {\n columns: readonly BoardColumn[]\n items: readonly T[]\n itemId: (item: T) => string\n itemColumn: (item: T) => string\n /** Whether `item` may move from `from` to `to`. Required: see the note above. */\n canDrop: (item: T, from: string, to: string) => boolean\n onMove: (move: BoardMove) => void\n /** The card body. `dragging` is true while this card is the one being dragged. */\n children: (item: T, state: { dragging: boolean }) => JSX.Element\n emptyColumn?: (column: BoardColumn) => JSX.Element\n /** The board's accessible name. Defaults to \"Board\". */\n label?: string\n /** Fold columns with no cards to a narrow strip with a sideways label. */\n collapseEmpty?: boolean\n class?: string\n}\n\nconst cardDragState = {\n idle: '',\n dragging: 'opacity-40',\n} as const\n\nconst toneDot: Record<BoardTone, string> = {\n neutral: 'bg-muted-foreground',\n 'chart-1': 'bg-chart-1',\n 'chart-2': 'bg-chart-2',\n 'chart-3': 'bg-chart-3',\n 'chart-4': 'bg-chart-4',\n 'chart-5': 'bg-chart-5',\n 'chart-6': 'bg-chart-6',\n}\n\nfunction BoardColumnDot(props: { tone?: BoardTone }) {\n return (\n <Show when={props.tone}>\n {(tone) => (\n <span aria-hidden=\"true\" class={cn('size-2 shrink-0 rounded-full', toneDot[tone()])} />\n )}\n </Show>\n )\n}\n\nfunction BoardColumnCount(props: { count?: number }) {\n return (\n <Show when={props.count !== undefined}>\n {/* The Badge's classes, not the component: Board stays free of Kobalte. */}\n <span\n class={cn(badgeVariants({ variant: 'subtle', size: 'sm' }), 'tabular-nums')}\n data-slot=\"board-column-count\"\n >\n {props.count}\n </span>\n </Show>\n )\n}\n\nexport function Board<T>(props: BoardProps<T>) {\n const [local] = splitProps(props, [\n 'columns',\n 'items',\n 'itemId',\n 'itemColumn',\n 'canDrop',\n 'onMove',\n 'children',\n 'emptyColumn',\n 'label',\n 'collapseEmpty',\n 'class',\n ])\n\n // The dragged item, not its id: `canDrop` takes the item itself, and the\n // pointer may leave the card before it is dropped.\n const [dragging, setDragging] = createSignal<T | null>(null)\n const [overColumn, setOverColumn] = createSignal<string | null>(null)\n const [announcement, setAnnouncement] = createSignal('')\n const cardElements = new Map<string, HTMLElement>()\n const [pendingFocus, setPendingFocus] = createSignal<{\n itemId: string\n columnId: string\n source: HTMLElement\n } | null>(null)\n const cancelOnPointer = () => setPendingFocus(null)\n\n // A controlled move can settle after a server response. Restore only the\n // focus that belonged to the moved card; another focus action cancels it.\n createEffect(() => {\n const pending = pendingFocus()\n if (!pending) return\n const document = pending.source.ownerDocument\n const cancelOnFocus = (event: FocusEvent) => {\n if (!pending.source.contains(event.target as Node)) setPendingFocus(null)\n }\n document.addEventListener('focusin', cancelOnFocus)\n document.addEventListener('pointerdown', cancelOnPointer)\n onCleanup(() => {\n document.removeEventListener('focusin', cancelOnFocus)\n document.removeEventListener('pointerdown', cancelOnPointer)\n })\n })\n\n createEffect(() => {\n const pending = pendingFocus()\n if (!pending) return\n const moved = local.items.find((item) => local.itemId(item) === pending.itemId)\n if (!moved || local.itemColumn(moved) !== pending.columnId) return\n const target = cardElements.get(pending.itemId)\n setPendingFocus(null)\n if (target?.isConnected) target.focus()\n })\n\n /**\n * `always` is for a pointer drop: dragging a card is a direct act on it, so it\n * ends focused wherever focus was. Chromium also blurs a focused control\n * inside a draggable once the native drag starts, so \"was focus in the card\"\n * cannot be read at drop time.\n */\n const prepareFocus = (item: T, columnId: string, source?: HTMLElement, always = false) => {\n const card = source ?? cardElements.get(local.itemId(item))\n if (card && (always || card.contains(card.ownerDocument.activeElement))) {\n setPendingFocus({ itemId: local.itemId(item), columnId, source: card })\n }\n }\n\n const byColumn = createMemo(() => {\n const grouped = new Map<string, T[]>()\n for (const column of local.columns) grouped.set(column.id, [])\n for (const item of local.items) grouped.get(local.itemColumn(item))?.push(item)\n return grouped\n })\n\n const accepts = (column: BoardColumn) => {\n const item = dragging()\n return Boolean(\n item && !column.disabled && local.canDrop(item, local.itemColumn(item), column.id)\n )\n }\n\n const drop = (column: BoardColumn) => {\n const item = dragging()\n const from = item ? local.itemColumn(item) : null\n const accepted = accepts(column)\n setDragging(null)\n setOverColumn(null)\n if (!item || !from || from === column.id || !accepted) return\n prepareFocus(item, column.id, undefined, true)\n local.onMove({ itemId: local.itemId(item), from, to: column.id })\n }\n\n /**\n * Keyboard move. `Ctrl`/`Cmd` plus an arrow is the convention for \"reorder this\n * thing within its container\" that does not collide with scrolling or with the\n * text caret, and it is the same chord a browser tab or a spreadsheet uses.\n */\n const moveByKeyboard = (item: T, direction: -1 | 1, source: HTMLElement) => {\n const from = local.itemColumn(item)\n const index = local.columns.findIndex((column) => column.id === from)\n if (index < 0) return\n const ordered =\n direction === 1 ? local.columns.slice(index + 1) : local.columns.slice(0, index).toReversed()\n const target = ordered.find(\n (column) => !column.disabled && local.canDrop(item, from, column.id)\n )\n if (!target) {\n setAnnouncement(`No column after ${from} accepts this item`)\n return\n }\n prepareFocus(item, target.id, source)\n local.onMove({ itemId: local.itemId(item), from, to: target.id })\n setAnnouncement(`Moved to ${target.label}`)\n }\n\n return (\n /*\n `role=\"region\"` + `tabindex=\"0\"` because the board scrolls horizontally and a\n keyboard user has to be able to scroll it — axe's `scrollable-region-focusable`.\n It is not enough that the cards are focusable: a board with empty columns, or\n with more columns than fit, has nothing focusable to scroll from.\n */\n <div\n class={cn('flex min-h-0 gap-3 overflow-x-auto pb-2', local.class)}\n role=\"region\"\n aria-label={local.label ?? 'Board'}\n tabindex=\"0\"\n >\n {/*\n Index, not For: callers derive columns (a count, a tone) and hand over\n fresh objects whenever a card moves. Keyed by identity, every lane would\n remount on each move and take the moved card's restored focus with it.\n */}\n <Index each={local.columns}>\n {(column) => {\n const items = () => byColumn().get(column().id) ?? []\n const collapsed = () =>\n Boolean(local.collapseEmpty) && column().collapsible !== false && items().length === 0\n const over = () => overColumn() === column().id\n return (\n <section\n class={cn(\n 'flex shrink-0 flex-col rounded-lg border border-border bg-muted/40 transition-colors',\n {\n 'w-72': !collapsed(),\n 'w-10 items-center': collapsed(),\n 'border-dashed border-ring': accepts(column()) && !over(),\n 'border-ring bg-primary-subtle': accepts(column()) && over(),\n 'border-dashed opacity-60': over() && !accepts(column()),\n 'opacity-50': column().disabled,\n }\n )}\n aria-label={column().label}\n data-collapsed={collapsed() ? '' : undefined}\n onDragOver={(event) => {\n setOverColumn(column().id)\n if (accepts(column())) event.preventDefault()\n }}\n onDragLeave={(event) => {\n // Leaving for a child is not leaving the lane.\n if (event.currentTarget.contains(event.relatedTarget as Node | null)) return\n setOverColumn((current) => (current === column().id ? null : current))\n }}\n onDrop={(event) => {\n event.preventDefault()\n drop(column())\n }}\n >\n <Show\n when={!collapsed()}\n fallback={\n <header class=\"flex flex-col items-center gap-2 py-3\">\n <BoardColumnDot tone={column().tone} />\n <BoardColumnCount count={column().count} />\n <h3\n class={cn(\n headingVariants({ size: 'subsection', leading: 'none', tone: 'muted' }),\n 'text-vertical'\n )}\n >\n {column().label}\n </h3>\n </header>\n }\n >\n <header class=\"flex h-10 shrink-0 items-center gap-2 px-3\">\n <BoardColumnDot tone={column().tone} />\n <h3\n class={cn(\n headingVariants({ size: 'subsection', leading: 'none', tone: 'foreground' }),\n 'truncate'\n )}\n >\n {column().label}\n </h3>\n <BoardColumnCount count={column().count} />\n <Show when={column().meta}>\n <span class=\"ms-auto text-2xs text-muted-foreground\">{column().meta}</span>\n </Show>\n </header>\n <div class=\"flex min-h-16 flex-1 flex-col gap-2 overflow-y-auto px-2 pb-2\">\n <For each={items()}>\n {(item) => {\n const isDragging = () => {\n const current = dragging()\n return Boolean(current && local.itemId(current) === local.itemId(item))\n }\n return (\n <article\n ref={(element) => {\n const id = local.itemId(item)\n cardElements.set(id, element)\n onCleanup(() => {\n if (cardElements.get(id) === element) cardElements.delete(id)\n })\n }}\n class={cn(\n 'relative shrink-0 cursor-grab rounded-md border border-border bg-card text-sm shadow-xs outline-none transition-colors hover:bg-surface-hover focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle active:cursor-grabbing',\n cardDragState[isDragging() ? 'dragging' : 'idle']\n )}\n // A board card is a control that can be moved, so it is\n // focusable and carries the chord it responds to.\n tabindex=\"0\"\n aria-roledescription=\"Draggable card\"\n draggable={true}\n onDragStart={(event) => {\n event.dataTransfer?.setData('text/plain', local.itemId(item))\n if (event.dataTransfer) event.dataTransfer.effectAllowed = 'move'\n setDragging(() => item)\n }}\n onDragEnd={() => {\n setDragging(null)\n setOverColumn(null)\n }}\n onKeyDown={(event) => {\n if (!(event.ctrlKey || event.metaKey)) return\n if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') return\n event.preventDefault()\n moveByKeyboard(\n item,\n event.key === 'ArrowRight' ? 1 : -1,\n event.currentTarget\n )\n }}\n >\n {local.children(item, { dragging: isDragging() })}\n </article>\n )\n }}\n </For>\n <Show when={items().length === 0}>\n <p class=\"rounded-md border border-dashed border-border px-2 py-4 text-center text-2xs text-muted-foreground\">\n {local.emptyColumn?.(column()) ?? 'Nothing here'}\n </p>\n </Show>\n </div>\n </Show>\n </section>\n )\n }}\n </Index>\n {/*\n The keyboard move's result, announced. A drag speaks for itself — the card\n visibly moves — while a keyboard move happens with the focus elsewhere.\n */}\n <div class=\"visually-hidden\" role=\"status\" aria-live=\"polite\">\n {announcement()}\n </div>\n </div>\n )\n}\n\nexport const boardCardTitleVariants = cva('truncate font-medium text-foreground', {\n variants: { size: { sm: 'text-xs', md: 'text-sm' } },\n defaultVariants: { size: 'md' },\n})\n\nexport type BoardCardTitleProps = { class?: string; children: JSX.Element } & VariantProps<\n typeof boardCardTitleVariants\n>\n\n/** The card's title line, at the size a board card uses. */\nexport function BoardCardTitle(props: BoardCardTitleProps) {\n return (\n <h4 class={cn(boardCardTitleVariants({ size: props.size }), props.class)}>{props.children}</h4>\n )\n}\n\n/** A card's padding, so every card in an application is the same shape. */\nexport function BoardCardBody(props: { class?: string; children: JSX.Element }) {\n return <div class={cn('grid gap-1.5 p-2.5', props.class)}>{props.children}</div>\n}\n\n/**\n * The card's open action: its title, as a real button whose hit area stretches\n * over the whole card. A card is one target to a pointer — clicking anywhere on\n * it opens it — while assistive technology still meets a named button rather\n * than a clickable `article`. Other controls on the card sit above the stretched\n * area by being positioned (`class=\"relative\"`), so they keep their own click.\n */\nexport function BoardCardTrigger(props: ComponentProps<'button'>) {\n const [local, rest] = splitProps(props, ['class', 'type'])\n return (\n <button\n type={local.type ?? 'button'}\n data-slot=\"board-card-trigger\"\n class={cn(\n textVariants({ variant: 'label', tone: 'foreground' }),\n 'min-w-0 flex-1 truncate rounded-sm text-start outline-none',\n 'after:absolute after:inset-0 after:rounded-md',\n 'focus-visible:ring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e,OAAO6G,QAAQ7J,WAAWiC,OAAO,CAAC,SAAS,MAAM,CAAC;CACzD,cAAA;EAAA,IAAA6H,SAAAC,SAAA;EAAAC,OAAAF,QAAAG,WAAA;GAAA,IAEIC,OAAI;IAAA,OAAElH,MAAMkH,QAAQ;GAAQ;GAAA,KAAA,WAAA;IAAA,OAErBhK,GACLG,aAAa;KAAEwC,SAAS;KAASnC,MAAM;IAAa,CAAC,GACrD,8DACA,iDACA,0DACAsC,MAAMrB,KACR;GAAC;EAAA,GACGkI,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAC;CAAA,EAAA,CAAA;AAGd;AAACK,eAAA,CAAA,SAAA,CAAA"}
1
+ {"version":3,"file":"board.js","names":["createEffect","createMemo","createSelector","createSignal","For","Index","onCleanup","Show","splitProps","untrack","cva","cn","badgeVariants","headingVariants","textVariants","id","label","count","meta","tone","collapsible","disabled","itemId","from","to","columns","items","item","itemColumn","canDrop","onMove","children","dragging","emptyColumn","column","collapseEmpty","class","cardDragState","idle","toneDot","neutral","BoardColumnDot","props","_$createComponent","when","_el$","_tmpl$","_$effect","_$className","BoardColumnCount","undefined","_el$2","_tmpl$2","_$insert","variant","size","Board","local","setDragging","isDraggingId","current","overColumn","setOverColumn","announcement","setAnnouncement","cardElements","Map","pendingFocus","setPendingFocus","columnId","source","cancelOnPointer","pending","document","ownerDocument","cancelOnFocus","event","contains","target","addEventListener","removeEventListener","moved","find","get","isConnected","focus","prepareFocus","always","card","activeElement","byColumn","grouped","set","push","accepts","Boolean","drop","accepted","moveByKeyboard","direction","index","findIndex","ordered","slice","toReversed","_el$3","_tmpl$3","_el$4","firstChild","each","collapsed","length","over","_el$5","_tmpl$8","preventDefault","currentTarget","relatedTarget","fallback","_el$1","_tmpl$9","_el$10","leading","_el$6","_tmpl$5","_el$7","_el$8","_tmpl$4","_el$9","_tmpl$7","isDragging","_el$11","_tmpl$0","$$keydown","ctrlKey","metaKey","key","dataTransfer","setData","effectAllowed","_$use","element","delete","_$setAttribute","isItemDragging","_el$0","_tmpl$6","_p$","_v$3","_v$4","_v$5","e","t","a","_v$","_v$2","boardCardTitleVariants","variants","sm","md","defaultVariants","BoardCardTitle","_el$12","_tmpl$1","BoardCardBody","_el$13","_tmpl$10","BoardCardTrigger","rest","_el$14","_tmpl$11","_$spread","_$mergeProps","type","_$delegateEvents"],"sources":["../../../../src/components/ui/board/board.tsx"],"sourcesContent":["import {\n type ComponentProps,\n createEffect,\n createMemo,\n createSelector,\n createSignal,\n For,\n Index,\n onCleanup,\n Show,\n splitProps,\n untrack,\n type JSX,\n} from 'solid-js'\nimport { cva, type VariantProps } from '#lib/variants'\nimport { cn } from '#lib/utils'\nimport { badgeVariants } from '../badge'\nimport { headingVariants, textVariants } from '../typography'\n\n/**\n * Board.\n *\n * Columns of cards, with drag between them — the shape a task tracker, a CRM\n * pipeline, a support queue and a release plan all share. It is generic in the\n * one place that matters: the *column ids are the caller's*, and so is the rule\n * that decides which moves are legal. The component knows nothing about tasks.\n *\n * The transitions are a predicate rather than a derived table because the legal\n * moves in a real product are not \"any column to any column\". A task that is\n * `completed` may be archived but not re-queued; a lead may become a customer but\n * not a stranger again. A board that let you drop anything anywhere would encode\n * a state machine in the UI that the server rejects — so `canDrop` is required,\n * and a column that cannot receive the dragged card renders as unavailable rather\n * than silently accepting a drop that will fail.\n *\n * Three input methods, because a drag-only board is unusable by keyboard:\n * dragging with the pointer, `Ctrl`/`Cmd` + arrow keys to move a focused card\n * between columns, and whatever the caller wires into `actions`. The card is\n * focusable and its move is announced through a live region, so the board is\n * operable without a mouse.\n *\n * The card is rendered by the caller through `children`, given the item and a set\n * of drag props. That is deliberate: a card's contents are domain — a title, a\n * priority tag, an assignee — and a board that rendered them itself could only\n * ever serve one product.\n *\n * `collapseEmpty` folds a column with no cards to a strip one line of text wide,\n * its label turned on its side. A board of seven lanes where three are empty\n * otherwise spends half its width on nothing, and the lanes with work in them\n * are the ones that need the room. A folded lane is still a full-height drop\n * target and still accepts a keyboard move, so nothing about operating the\n * board changes; it does not unfold under a drag, because a lane that grows\n * under the pointer moves every lane after it and the drop lands somewhere else.\n *\n * Give the board a height (`class=\"h-full\"`) and each lane scrolls on its own;\n * leave it unconstrained and lanes grow with their cards and the page scrolls.\n */\n\n/**\n * A lane's identifying colour, drawn as a dot before its label. The chart hues,\n * in the order the token set gives them, because a lane colour tells lanes apart\n * like a series does; it carries no status. `neutral` is for a lane that should\n * not draw the eye — a backlog, an archive.\n */\nexport type BoardTone =\n | 'neutral'\n | 'chart-1'\n | 'chart-2'\n | 'chart-3'\n | 'chart-4'\n | 'chart-5'\n | 'chart-6'\n\nexport type BoardColumn = Readonly<{\n id: string\n label: string\n /** The number of cards, shown as an accent count beside the label. */\n count?: number\n /** A limit or any other note, shown after the count. */\n meta?: JSX.Element\n /** The lane's dot colour. Omitted, the header has no dot. */\n tone?: BoardTone\n /**\n * `false` keeps this lane open when it is empty under `collapseEmpty` — the\n * inbox lane new cards arrive in, which should always show where they land.\n */\n collapsible?: boolean\n /** Dim the column and refuse drops — a lane that is closed or read-only. */\n disabled?: boolean\n}>\n\nexport type BoardMove = Readonly<{\n itemId: string\n from: string\n to: string\n}>\n\nexport type BoardProps<T> = {\n columns: readonly BoardColumn[]\n items: readonly T[]\n itemId: (item: T) => string\n itemColumn: (item: T) => string\n /** Whether `item` may move from `from` to `to`. Required: see the note above. */\n canDrop: (item: T, from: string, to: string) => boolean\n onMove: (move: BoardMove) => void\n /** The card body. `dragging` is true while this card is the one being dragged. */\n children: (item: T, state: { dragging: boolean }) => JSX.Element\n emptyColumn?: (column: BoardColumn) => JSX.Element\n /** The board's accessible name. Defaults to \"Board\". */\n label?: string\n /** Fold columns with no cards to a narrow strip with a sideways label. */\n collapseEmpty?: boolean\n class?: string\n}\n\nconst cardDragState = {\n idle: '',\n dragging: 'opacity-40',\n} as const\n\nconst toneDot: Record<BoardTone, string> = {\n neutral: 'bg-muted-foreground',\n 'chart-1': 'bg-chart-1',\n 'chart-2': 'bg-chart-2',\n 'chart-3': 'bg-chart-3',\n 'chart-4': 'bg-chart-4',\n 'chart-5': 'bg-chart-5',\n 'chart-6': 'bg-chart-6',\n}\n\nfunction BoardColumnDot(props: { tone?: BoardTone }) {\n return (\n <Show when={props.tone}>\n {(tone) => (\n <span aria-hidden=\"true\" class={cn('size-2 shrink-0 rounded-full', toneDot[tone()])} />\n )}\n </Show>\n )\n}\n\nfunction BoardColumnCount(props: { count?: number }) {\n return (\n <Show when={props.count !== undefined}>\n {/* The Badge's classes, not the component: Board stays free of Kobalte. */}\n <span\n class={cn(badgeVariants({ variant: 'subtle', size: 'sm' }), 'tabular-nums')}\n data-slot=\"board-column-count\"\n >\n {props.count}\n </span>\n </Show>\n )\n}\n\nexport function Board<T>(props: BoardProps<T>) {\n const [local] = splitProps(props, [\n 'columns',\n 'items',\n 'itemId',\n 'itemColumn',\n 'canDrop',\n 'onMove',\n 'children',\n 'emptyColumn',\n 'label',\n 'collapseEmpty',\n 'class',\n ])\n\n // The dragged item, not its id: `canDrop` takes the item itself, and the\n // pointer may leave the card before it is dropped.\n const [dragging, setDragging] = createSignal<T | null>(null)\n // Only the two cards whose answer flips update when a drag starts or ends.\n const isDraggingId = createSelector(() => {\n const current = dragging()\n return current ? local.itemId(current) : undefined\n })\n const [overColumn, setOverColumn] = createSignal<string | null>(null)\n const [announcement, setAnnouncement] = createSignal('')\n const cardElements = new Map<string, HTMLElement>()\n const [pendingFocus, setPendingFocus] = createSignal<{\n itemId: string\n columnId: string\n source: HTMLElement\n } | null>(null)\n const cancelOnPointer = () => setPendingFocus(null)\n\n // A controlled move can settle after a server response. Restore only the\n // focus that belonged to the moved card; another focus action cancels it.\n createEffect(() => {\n const pending = pendingFocus()\n if (!pending) return\n const document = pending.source.ownerDocument\n const cancelOnFocus = (event: FocusEvent) => {\n if (!pending.source.contains(event.target as Node)) setPendingFocus(null)\n }\n document.addEventListener('focusin', cancelOnFocus)\n document.addEventListener('pointerdown', cancelOnPointer)\n onCleanup(() => {\n document.removeEventListener('focusin', cancelOnFocus)\n document.removeEventListener('pointerdown', cancelOnPointer)\n })\n })\n\n createEffect(() => {\n const pending = pendingFocus()\n if (!pending) return\n const moved = local.items.find((item) => local.itemId(item) === pending.itemId)\n if (!moved || local.itemColumn(moved) !== pending.columnId) return\n const target = cardElements.get(pending.itemId)\n setPendingFocus(null)\n if (target?.isConnected) target.focus()\n })\n\n /**\n * `always` is for a pointer drop: dragging a card is a direct act on it, so it\n * ends focused wherever focus was. Chromium also blurs a focused control\n * inside a draggable once the native drag starts, so \"was focus in the card\"\n * cannot be read at drop time.\n */\n const prepareFocus = (item: T, columnId: string, source?: HTMLElement, always = false) => {\n const card = source ?? cardElements.get(local.itemId(item))\n if (card && (always || card.contains(card.ownerDocument.activeElement))) {\n setPendingFocus({ itemId: local.itemId(item), columnId, source: card })\n }\n }\n\n const byColumn = createMemo(() => {\n const grouped = new Map<string, T[]>()\n for (const column of local.columns) grouped.set(column.id, [])\n for (const item of local.items) grouped.get(local.itemColumn(item))?.push(item)\n return grouped\n })\n\n const accepts = (column: BoardColumn) => {\n const item = dragging()\n return Boolean(\n item && !column.disabled && local.canDrop(item, local.itemColumn(item), column.id)\n )\n }\n\n const drop = (column: BoardColumn) => {\n const item = dragging()\n const from = item ? local.itemColumn(item) : null\n const accepted = accepts(column)\n setDragging(null)\n setOverColumn(null)\n if (!item || !from || from === column.id || !accepted) return\n prepareFocus(item, column.id, undefined, true)\n local.onMove({ itemId: local.itemId(item), from, to: column.id })\n }\n\n /**\n * Keyboard move. `Ctrl`/`Cmd` plus an arrow is the convention for \"reorder this\n * thing within its container\" that does not collide with scrolling or with the\n * text caret, and it is the same chord a browser tab or a spreadsheet uses.\n */\n const moveByKeyboard = (item: T, direction: -1 | 1, source: HTMLElement) => {\n const from = local.itemColumn(item)\n const index = local.columns.findIndex((column) => column.id === from)\n if (index < 0) return\n const ordered =\n direction === 1 ? local.columns.slice(index + 1) : local.columns.slice(0, index).toReversed()\n const target = ordered.find(\n (column) => !column.disabled && local.canDrop(item, from, column.id)\n )\n if (!target) {\n setAnnouncement(`No column after ${from} accepts this item`)\n return\n }\n prepareFocus(item, target.id, source)\n local.onMove({ itemId: local.itemId(item), from, to: target.id })\n setAnnouncement(`Moved to ${target.label}`)\n }\n\n return (\n /*\n `role=\"region\"` + `tabindex=\"0\"` because the board scrolls horizontally and a\n keyboard user has to be able to scroll it — axe's `scrollable-region-focusable`.\n It is not enough that the cards are focusable: a board with empty columns, or\n with more columns than fit, has nothing focusable to scroll from.\n */\n <div\n class={cn('flex min-h-0 gap-3 overflow-x-auto pb-2', local.class)}\n role=\"region\"\n aria-label={local.label ?? 'Board'}\n tabindex=\"0\"\n >\n {/*\n Index, not For: callers derive columns (a count, a tone) and hand over\n fresh objects whenever a card moves. Keyed by identity, every lane would\n remount on each move and take the moved card's restored focus with it.\n */}\n <Index each={local.columns}>\n {(column) => {\n const items = () => byColumn().get(column().id) ?? []\n const collapsed = () =>\n Boolean(local.collapseEmpty) && column().collapsible !== false && items().length === 0\n const over = () => overColumn() === column().id\n return (\n <section\n class={cn(\n 'flex shrink-0 flex-col rounded-lg border border-border bg-muted/40 transition-colors',\n {\n 'w-72': !collapsed(),\n 'w-10 items-center': collapsed(),\n 'border-dashed border-ring': accepts(column()) && !over(),\n 'border-ring bg-primary-subtle': accepts(column()) && over(),\n 'border-dashed opacity-60': over() && !accepts(column()),\n 'opacity-50': column().disabled,\n }\n )}\n aria-label={column().label}\n data-collapsed={collapsed() ? '' : undefined}\n onDragOver={(event) => {\n setOverColumn(column().id)\n if (accepts(column())) event.preventDefault()\n }}\n onDragLeave={(event) => {\n // Leaving for a child is not leaving the lane.\n if (event.currentTarget.contains(event.relatedTarget as Node | null)) return\n setOverColumn((current) => (current === column().id ? null : current))\n }}\n onDrop={(event) => {\n event.preventDefault()\n drop(column())\n }}\n >\n <Show\n when={!collapsed()}\n fallback={\n <header class=\"flex flex-col items-center gap-2 py-3\">\n <BoardColumnDot tone={column().tone} />\n <BoardColumnCount count={column().count} />\n <h3\n class={cn(\n headingVariants({ size: 'subsection', leading: 'none', tone: 'muted' }),\n 'text-vertical'\n )}\n >\n {column().label}\n </h3>\n </header>\n }\n >\n <header class=\"flex h-10 shrink-0 items-center gap-2 px-3\">\n <BoardColumnDot tone={column().tone} />\n <h3\n class={cn(\n headingVariants({ size: 'subsection', leading: 'none', tone: 'foreground' }),\n 'truncate'\n )}\n >\n {column().label}\n </h3>\n <BoardColumnCount count={column().count} />\n <Show when={column().meta}>\n <span class=\"ms-auto text-2xs text-muted-foreground\">{column().meta}</span>\n </Show>\n </header>\n <div class=\"flex min-h-16 flex-1 flex-col gap-2 overflow-y-auto px-2 pb-2\">\n <For each={items()}>\n {(item) => {\n const isDragging = () => isDraggingId(local.itemId(item))\n return (\n <article\n ref={(element) => {\n const id = local.itemId(item)\n cardElements.set(id, element)\n onCleanup(() => {\n if (cardElements.get(id) === element) cardElements.delete(id)\n })\n }}\n class={cn(\n 'relative shrink-0 cursor-grab rounded-md border border-border bg-card text-sm shadow-xs outline-none transition-colors hover:bg-surface-hover focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle active:cursor-grabbing',\n cardDragState[isDragging() ? 'dragging' : 'idle']\n )}\n // A board card is a control that can be moved, so it is\n // focusable and carries the chord it responds to.\n tabindex=\"0\"\n aria-roledescription=\"Draggable card\"\n draggable={true}\n onDragStart={(event) => {\n event.dataTransfer?.setData('text/plain', local.itemId(item))\n if (event.dataTransfer) event.dataTransfer.effectAllowed = 'move'\n setDragging(() => item)\n }}\n onDragEnd={() => {\n setDragging(null)\n setOverColumn(null)\n }}\n onKeyDown={(event) => {\n if (!(event.ctrlKey || event.metaKey)) return\n if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') return\n event.preventDefault()\n moveByKeyboard(\n item,\n event.key === 'ArrowRight' ? 1 : -1,\n event.currentTarget\n )\n }}\n >\n {/* The selector notifies only the card whose drag state\n changed, so a drag start or end re-runs that one card's\n render function (with a plain boolean, as the contract\n says) instead of every card's. The call itself is\n untracked: only the drag state re-runs it. */}\n {(() => {\n const isItemDragging = isDragging()\n return untrack(() => local.children(item, { dragging: isItemDragging }))\n })()}\n </article>\n )\n }}\n </For>\n <Show when={items().length === 0}>\n <p class=\"rounded-md border border-dashed border-border px-2 py-4 text-center text-2xs text-muted-foreground\">\n {local.emptyColumn?.(column()) ?? 'Nothing here'}\n </p>\n </Show>\n </div>\n </Show>\n </section>\n )\n }}\n </Index>\n {/*\n The keyboard move's result, announced. A drag speaks for itself — the card\n visibly moves — while a keyboard move happens with the focus elsewhere.\n */}\n <div class=\"visually-hidden\" role=\"status\" aria-live=\"polite\">\n {announcement()}\n </div>\n </div>\n )\n}\n\nexport const boardCardTitleVariants = cva('truncate font-medium text-foreground', {\n variants: { size: { sm: 'text-xs', md: 'text-sm' } },\n defaultVariants: { size: 'md' },\n})\n\nexport type BoardCardTitleProps = { class?: string; children: JSX.Element } & VariantProps<\n typeof boardCardTitleVariants\n>\n\n/** The card's title line, at the size a board card uses. */\nexport function BoardCardTitle(props: BoardCardTitleProps) {\n return (\n <h4 class={cn(boardCardTitleVariants({ size: props.size }), props.class)}>{props.children}</h4>\n )\n}\n\n/** A card's padding, so every card in an application is the same shape. */\nexport function BoardCardBody(props: { class?: string; children: JSX.Element }) {\n return <div class={cn('grid gap-1.5 p-2.5', props.class)}>{props.children}</div>\n}\n\n/**\n * The card's open action: its title, as a real button whose hit area stretches\n * over the whole card. A card is one target to a pointer — clicking anywhere on\n * it opens it — while assistive technology still meets a named button rather\n * than a clickable `article`. Other controls on the card sit above the stretched\n * area by being positioned (`class=\"relative\"`), so they keep their own click.\n */\nexport function BoardCardTrigger(props: ComponentProps<'button'>) {\n const [local, rest] = splitProps(props, ['class', 'type'])\n return (\n <button\n type={local.type ?? 'button'}\n data-slot=\"board-card-trigger\"\n class={cn(\n textVariants({ variant: 'label', tone: 'foreground' }),\n 'min-w-0 flex-1 truncate rounded-sm text-start outline-none',\n 'after:absolute after:inset-0 after:rounded-md',\n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d.ts","sourceRoot":"","sources":["../../../../src/components/ui/bubble/bubble.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2C,KAAK,cAAc,EAAE,KAAK,GAAG,EAAE,MAAM,UAAU,CAAA;AAEjG,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,eAAe,CAAA;AAEtD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,cAAc;;;8EAkB1B,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAC/D,YAAY,CAAC,OAAO,cAAc,CAAC,GAAG;IACpC,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IACtB,uEAAuE;IACvE,MAAM,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IACpB,sEAAsE;IACtE,YAAY,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;CAC3B,CAAA;AAEH,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,eAoCxC"}
@@ -1,7 +1,7 @@
1
1
  import { cn } from "../../../lib/utils.js";
2
2
  import { cva } from "../../../lib/variants.js";
3
3
  import { className, effect, insert, memo, mergeProps, setAttribute, spread, template } from "solid-js/web";
4
- import { splitProps } from "solid-js";
4
+ import { children, splitProps } from "solid-js";
5
5
  // src/components/ui/bubble/bubble.tsx
6
6
  var _tmpl$ = /*#__PURE__*/ template(`<div class="flex max-w-full min-w-0 flex-col items-end gap-1"data-slot=bubble-root><div data-slot=bubble>`);
7
7
  var _tmpl$2 = /*#__PURE__*/ template(`<div data-slot=bubble-status>`);
@@ -51,6 +51,8 @@ function Bubble(props) {
51
51
  "status",
52
52
  "statusAction"
53
53
  ]);
54
+ const status = children(() => local.status);
55
+ const statusAction = children(() => local.statusAction);
54
56
  return (() => {
55
57
  var _el$ = _tmpl$(), _el$2 = _el$.firstChild;
56
58
  spread(_el$2, mergeProps({
@@ -66,11 +68,11 @@ function Bubble(props) {
66
68
  }, rest), false, true);
67
69
  insert(_el$2, () => local.children);
68
70
  insert(_el$, (() => {
69
- var _c$ = memo(() => !!(local.status !== void 0 || local.statusAction !== void 0));
71
+ var _c$ = memo(() => !!(status() != null || statusAction() != null));
70
72
  return () => _c$() ? (() => {
71
73
  var _el$3 = _tmpl$2();
72
- insert(_el$3, () => local.status, null);
73
- insert(_el$3, () => local.statusAction, null);
74
+ insert(_el$3, status, null);
75
+ insert(_el$3, statusAction, null);
74
76
  effect((_p$) => {
75
77
  var _v$ = local.state === "failed" ? "alert" : "status", _v$2 = cn("flex items-center gap-2 text-xs", {
76
78
  "text-destructive": local.state === "failed",
@@ -1 +1 @@
1
- {"version":3,"file":"bubble.js","names":["splitProps","cn","cva","bubbleVariants","variants","tone","user","neutral","quiet","state","sent","pending","queued","failed","defaultVariants","children","status","statusAction","Bubble","props","local","rest","_el$","_tmpl$","_el$2","firstChild","_$spread","_$mergeProps","class","_$insert","_c$","_$memo","undefined","_el$3","_tmpl$2","_$effect","_p$","_v$","_v$2","e","_$setAttribute","t","_$className"],"sources":["../../../../src/components/ui/bubble/bubble.tsx"],"sourcesContent":["import { splitProps, type ComponentProps, type JSX } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { cva, type VariantProps } from '#lib/variants'\n\n/**\n * Bubble.\n *\n * The container for what *the person* sends. The assistant's reply is not a\n * bubble: it is the page, set in the reading column with no surface behind it,\n * because a reply that is a card among cards turns every long answer into a box\n * to scroll inside. A bubble marks the one voice that is quoting itself back — a\n * short, bounded message — so the eye can find where each turn begins.\n *\n * `state` is the delivery truth, not decoration: `pending` while the send is in\n * flight, `queued` for a follow-up the runtime has not taken yet (dashed, so it\n * reads as not yet part of the conversation), `failed` when it did not go. Each\n * state has a word in `status`, because the border alone is not a signal.\n *\n * Text is rendered as text. `whitespace-pre-wrap` keeps the sender's line breaks\n * and `overflow-wrap: anywhere` stops a pasted token or URL from widening the\n * column; nothing here interprets markup.\n */\nexport const bubbleVariants = cva(\n 'relative w-fit max-w-full min-w-0 rounded-2xl px-3.5 py-2 font-content text-content break-words whitespace-pre-wrap [overflow-wrap:anywhere]',\n {\n variants: {\n tone: {\n user: 'bg-primary-subtle text-foreground',\n neutral: 'bg-muted text-foreground',\n quiet: 'border border-border bg-transparent text-foreground',\n },\n state: {\n sent: '',\n pending: 'opacity-70',\n queued: 'border border-dashed border-border bg-transparent',\n failed: 'border border-destructive',\n },\n },\n defaultVariants: { tone: 'user', state: 'sent' },\n }\n)\n\nexport type BubbleProps = Omit<ComponentProps<'div'>, 'children'> &\n VariantProps<typeof bubbleVariants> & {\n children?: JSX.Element\n /** What the state means in words: \"Sending…\", \"Queued\", \"Not sent\". */\n status?: JSX.Element\n /** Shown beside the status, e.g. a Retry button for a failed send. */\n statusAction?: JSX.Element\n }\n\nexport function Bubble(props: BubbleProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'tone',\n 'state',\n 'children',\n 'status',\n 'statusAction',\n ])\n return (\n <div class=\"flex max-w-full min-w-0 flex-col items-end gap-1\" data-slot=\"bubble-root\">\n <div\n data-slot=\"bubble\"\n data-state={local.state ?? 'sent'}\n class={cn(bubbleVariants({ tone: local.tone, state: local.state }), local.class)}\n {...rest}\n >\n {local.children}\n </div>\n {local.status !== undefined || local.statusAction !== undefined ? (\n <div\n data-slot=\"bubble-status\"\n role={local.state === 'failed' ? 'alert' : 'status'}\n class={cn('flex items-center gap-2 text-xs', {\n 'text-destructive': local.state === 'failed',\n 'text-muted-foreground': local.state !== 'failed',\n })}\n >\n {local.status}\n {local.statusAction}\n </div>\n ) : null}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,IAAaG,iBAAiBD,IAC5B,gJACA;CACEE,UAAU;EACRC,MAAM;GACJC,MAAM;GACNC,SAAS;GACTC,OAAO;EACT;EACAC,OAAO;GACLC,MAAM;GACNC,SAAS;GACTC,QAAQ;GACRC,QAAQ;EACV;CACF;CACAC,iBAAiB;EAAET,MAAM;EAAQI,OAAO;C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}
1
+ {"version":3,"file":"bubble.js","names":["children","resolveChildren","splitProps","cn","cva","bubbleVariants","variants","tone","user","neutral","quiet","state","sent","pending","queued","failed","defaultVariants","status","statusAction","Bubble","props","local","rest","_el$","_tmpl$","_el$2","firstChild","_$spread","_$mergeProps","class","_$insert","_c$","_$memo","_el$3","_tmpl$2","_$effect","_p$","_v$","_v$2","e","_$setAttribute","t","_$className","undefined"],"sources":["../../../../src/components/ui/bubble/bubble.tsx"],"sourcesContent":["import { children as resolveChildren, splitProps, type ComponentProps, type JSX } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { cva, type VariantProps } from '#lib/variants'\n\n/**\n * Bubble.\n *\n * The container for what *the person* sends. The assistant's reply is not a\n * bubble: it is the page, set in the reading column with no surface behind it,\n * because a reply that is a card among cards turns every long answer into a box\n * to scroll inside. A bubble marks the one voice that is quoting itself back — a\n * short, bounded message — so the eye can find where each turn begins.\n *\n * `state` is the delivery truth, not decoration: `pending` while the send is in\n * flight, `queued` for a follow-up the runtime has not taken yet (dashed, so it\n * reads as not yet part of the conversation), `failed` when it did not go. Each\n * state has a word in `status`, because the border alone is not a signal.\n *\n * Text is rendered as text. `whitespace-pre-wrap` keeps the sender's line breaks\n * and `overflow-wrap: anywhere` stops a pasted token or URL from widening the\n * column; nothing here interprets markup.\n */\nexport const bubbleVariants = cva(\n 'relative w-fit max-w-full min-w-0 rounded-2xl px-3.5 py-2 font-content text-content break-words whitespace-pre-wrap [overflow-wrap:anywhere]',\n {\n variants: {\n tone: {\n user: 'bg-primary-subtle text-foreground',\n neutral: 'bg-muted text-foreground',\n quiet: 'border border-border bg-transparent text-foreground',\n },\n state: {\n sent: '',\n pending: 'opacity-70',\n queued: 'border border-dashed border-border bg-transparent',\n failed: 'border border-destructive',\n },\n },\n defaultVariants: { tone: 'user', state: 'sent' },\n }\n)\n\nexport type BubbleProps = Omit<ComponentProps<'div'>, 'children'> &\n VariantProps<typeof bubbleVariants> & {\n children?: JSX.Element\n /** What the state means in words: \"Sending…\", \"Queued\", \"Not sent\". */\n status?: JSX.Element\n /** Shown beside the status, e.g. a Retry button for a failed send. */\n statusAction?: JSX.Element\n }\n\nexport function Bubble(props: BubbleProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'tone',\n 'state',\n 'children',\n 'status',\n 'statusAction',\n ])\n const status = resolveChildren(() => local.status)\n const statusAction = resolveChildren(() => local.statusAction)\n return (\n <div class=\"flex max-w-full min-w-0 flex-col items-end gap-1\" data-slot=\"bubble-root\">\n <div\n data-slot=\"bubble\"\n data-state={local.state ?? 'sent'}\n class={cn(bubbleVariants({ tone: local.tone, state: local.state }), local.class)}\n {...rest}\n >\n {local.children}\n </div>\n {status() != null || statusAction() != null ? (\n <div\n data-slot=\"bubble-status\"\n role={local.state === 'failed' ? 'alert' : 'status'}\n class={cn('flex items-center gap-2 text-xs', {\n 'text-destructive': local.state === 'failed',\n 'text-muted-foreground': local.state !== 'failed',\n })}\n >\n {status()}\n {statusAction()}\n </div>\n ) : null}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,IAAaK,iBAAiBD,IAC5B,gJACA;CACEE,UAAU;EACRC,MAAM;GACJC,MAAM;GACNC,SAAS;GACTC,OAAO;EACT;EACAC,OAAO;GACLC,MAAM;GACNC,SAAS;GACTC,QAAQ;GACRC,QAAQ;EACV;CACF;CACAC,iBAAiB;EAAET,MAAM;EAAQI,OAAO;CAAO;AACjD,CACF;AAWA,SAAgBQ,OAAOC,OAAoB;CACzC,MAAM,CAACC,OAAOC,QAAQpB,WAAWkB,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;CAAc,CACf;CACD,MAAMH,SAAShB,eAAsBoB,MAAMJ,MAAM;CACjD,MAAMC,eAAejB,eAAsBoB,MAAMH,YAAY;CAC7D,cAAA;EAAA,IAAAK,OAAAC,OAAA,GAAAC,QAAAF,KAAAG;EAAAC,OAAAF,OAAAG,WAAA;GAAA,KAAA,gBAAA;IAAA,OAIkBP,MAAMV,SAAS;GAAM;GAAA,KAAA,WAAA;IAAA,OAC1BR,GAAGE,eAAe;KAAEE,MAAMc,MAAMd;KAAMI,OAAOU,MAAMV;IAAM,CAAC,GAAGU,MAAMQ,KAAK;GAAC;EAAA,GAC5EP,IAAI,GAAA,OAAA,IAAA;EAAAQ,OAAAL,aAEPJ,MAAMrB,QAAQ;EAAA8B,OAAAP,aAAA;GAAA,IAAAQ,MAAAC,WAAA,CAAA,EAEhBf,OAAO,KAAK,QAAQC,aAAa,KAAK,KAAI;GAAA,aAA1Ca,IAAA,WAAA;IAAA,IAAAE,QAAAC,QAAA;IAAAJ,OAAAG,OASIhB,QAAM,IAAA;IAAAa,OAAAG,OACNf,cAAY,IAAA;IAAAiB,QAAAC,QAAA;KAAA,IAAAC,MAPPhB,MAAMV,UAAU,WAAW,UAAU,UAAQ2B,OAC5CnC,GAAG,mCAAmC;MAC3C,oBAAoBkB,MAAMV,UAAU;MACpC,yBAAyBU,MAAMV,UAAU;KAC3C,CAAC;KAAC0B,QAAAD,IAAAG,KAAAC,aAAAP,OAAA,QAAAG,IAAAG,IAAAF,GAAA;KAAAC,SAAAF,IAAAK,KAAAC,UAAAT,OAAAG,IAAAK,IAAAH,IAAA;KAAA,OAAAF;IAAA,GAAA;KAAAG,GAAAI,KAAAA;KAAAF,GAAAE,KAAAA;IAAA,CAAA;IAAA,OAAAV;GAAA,EAAA,CAAA,IAKF;EAAI,EAAA,CAAA,GAAA,IAAA;EAAA,OAAAV;CAAA,EAAA,CAAA;AAGd"}
@@ -34,8 +34,8 @@ var buttonVariants = cva(`${controlInteractive} inline-flex shrink-0 items-cente
34
34
  ghost: "text-foreground hover:bg-surface-hover",
35
35
  /**
36
36
  * A ghost that opens something: a sheet, menu or popover trigger in a
37
- * toolbar. While its surface is open it holds the accent's own tint —
38
- * the same treatment that drives the side rail's active destination —
37
+ * toolbar. While its surface is open it holds the accent's own tint,
38
+ * the same treatment that drives the side rail's active destination,
39
39
  * so the open control never reads identical to its closed neighbours
40
40
  * and the app's pressed chrome reads as one accent chroma. The
41
41
  * compound hover keeps the tint when an open control is pointed at.
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","names":["Polymorphic","splitProps","cva","controlInteractive","controlSize","cn","buttonVariants","variants","variant","default","secondary","destructive","outline","ghost","toolbar","subtle","success","link","size","xs","sm","md","lg","xl","touchTarget","comfortable","defaultVariants","class","Button","props","local","rest","_$createComponent","_$mergeProps","as","type"],"sources":["../../../../src/components/ui/button/button.tsx"],"sourcesContent":["import { Polymorphic, type PolymorphicProps } from '@kobalte/core/polymorphic'\nimport { type ComponentProps, splitProps, type ValidComponent } from 'solid-js'\nimport { cva, controlInteractive, controlSize, type VariantProps } from '#lib/variants'\nimport { cn } from '#lib/utils'\n\n/**\n * Button.\n *\n * One appearance ladder shared by every pressable thing in the system: a\n * button, a toolbar control, a dialog action, and a menu row all draw from the\n * same tokens, so a row of them cannot drift apart.\n *\n * The variants answer \"what is this for\", never \"what colour is it\". A caller\n * that wants a red button writes `variant=\"destructive\"`; the red lives here.\n * That is also what lets the design-system linter tell a caller which variant\n * to use instead of only which class was wrong.\n *\n * Polymorphic: pass `as=\"a\"` (or any component) and the button becomes it\n * while keeping the same styling contract. This replaces the React-era\n * `asChild` primitive, which has no Solid equivalent that preserves props.\n */\nexport const buttonVariants = cva(\n `${controlInteractive} inline-flex shrink-0 items-center justify-center rounded-md font-medium whitespace-nowrap select-none [&_svg]:pointer-events-none [&_svg]:shrink-0`,\n {\n variants: {\n variant: {\n /** The one primary action in a view. */\n default: 'bg-primary text-primary-foreground hover:bg-primary-hover',\n secondary: 'bg-secondary text-secondary-foreground hover:bg-surface-hover',\n /** For the action that destroys something. Never the default. */\n destructive:\n 'bg-destructive-action text-destructive-action-foreground hover:bg-destructive-action/90 focus-visible:ring-destructive-subtle',\n /** A bordered button for a surface that already has a fill. */\n outline:\n 'border border-border bg-transparent text-foreground hover:bg-surface-hover hover:border-input',\n /** No chrome until hover. The default for toolbar and row actions. */\n ghost: 'text-foreground hover:bg-surface-hover',\n /**\n * A ghost that opens something: a sheet, menu or popover trigger in a\n * toolbar. While its surface is open it holds the accent's own tint —\n * the same treatment that drives the side rail's active destination —\n * so the open control never reads identical to its closed neighbours\n * and the app's pressed chrome reads as one accent chroma. The\n * compound hover keeps the tint when an open control is pointed at.\n */\n toolbar:\n 'text-foreground hover:bg-surface-hover data-[expanded]:bg-primary-subtle data-[expanded]:text-primary data-[expanded]:hover:bg-primary-subtle',\n /** A tinted primary, for a secondary action inside a primary flow. */\n subtle: 'bg-primary-subtle text-primary hover:bg-primary-subtle/80',\n success: 'bg-success text-success-foreground hover:bg-success/90',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n '2xs': `${controlSize['2xs']} [&_svg]:size-3`,\n xs: `${controlSize.xs} [&_svg]:size-3.5`,\n sm: `${controlSize.sm} [&_svg]:size-3.5`,\n md: `${controlSize.md} [&_svg]:size-4`,\n lg: `${controlSize.lg} [&_svg]:size-4`,\n xl: `${controlSize.xl} [&_svg]:size-5`,\n '2xl': `${controlSize['2xl']} [&_svg]:size-6`,\n /* Square, for an icon with no label. The accessible name then has to\n come from `aria-label` or a visually hidden label — an icon-only\n button with neither is the accessibility finding the Storybook lane\n catches on every story. */\n 'icon-2xs': 'size-control-2xs p-0 [&_svg]:size-3',\n 'icon-xs': 'size-control-xs p-0 [&_svg]:size-3.5',\n 'icon-sm': 'size-control-sm p-0 [&_svg]:size-3.5',\n 'icon-md': 'size-control-md p-0 [&_svg]:size-4',\n 'icon-lg': 'size-control-lg p-0 [&_svg]:size-4',\n 'icon-xl': 'size-control-xl p-0 [&_svg]:size-5',\n 'icon-2xl': 'size-control-2xl p-0 [&_svg]:size-6',\n },\n /** Opt in to a stable touch target on devices with any coarse pointer. */\n touchTarget: {\n comfortable: 'touch-target-comfortable',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'md',\n },\n }\n)\n\ntype ButtonVariantProps = VariantProps<typeof buttonVariants>\n\nexport type ButtonProps<T extends ValidComponent = 'button'> = PolymorphicProps<\n T,\n ButtonVariantProps & {\n class?: string\n }\n>\n\nexport function Button<T extends ValidComponent = 'button'>(props: ButtonProps<T>) {\n const [local, rest] = splitProps(props as ButtonProps, [\n 'variant',\n 'size',\n 'touchTarget',\n 'class',\n ])\n\n return (\n <Polymorphic\n as=\"button\"\n type=\"button\"\n data-slot=\"button\"\n class={cn(\n buttonVariants({\n variant: local.variant,\n size: local.size,\n touchTarget: local.touchTarget,\n }),\n local.class\n )}\n {...(rest as ComponentProps<'button'>)}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAqBA,IAAaM,iBAAiBJ,IAC5B,GAAGC,mBAAkB,sJACrB;CACEI,UAAU;EACRC,SAAS;;GAEPC,SAAS;GACTC,WAAW;;GAEXC,aACE;;GAEFC,SACE;;GAEFC,OAAO;;;;;;;;;GASPC,SACE;;GAEFC,QAAQ;GACRC,SAAS;GACTC,MAAM;EACR;EACAC,MAAM;GACJ,OAAO,GAAGd,YAAY,OAAM;GAC5Be,IAAI,GAAGf,YAAYe,GAAE;GACrBC,IAAI,GAAGhB,YAAYgB,GAAE;GACrBC,IAAI,GAAGjB,YAAYiB,GAAE;GACrBC,IAAI,GAAGlB,YAAYkB,GAAE;GACrBC,IAAI,GAAGnB,YAAYmB,GAAE;GACrB,OAAO,GAAGnB,YAAY,OAAM;GAK5B,YAAY;GACZ,WAAW;GACX,WAAW;GACX,WAAW;GACX,WAAW;GACX,WAAW;GACX,YAAY;EACd;;EAEAoB,aAAa,EACXC,aAAa,2BACf;CACF;CACAC,iBAAiB;EACflB,SAAS;EACTU,MAAM;CACR;AACF,CACF;AAWA,SAAgBU,OAA4CC,OAAuB;CACjF,MAAM,CAACC,OAAOC,QAAQ9B,WAAW4B,OAAsB;EACrD;EACA;EACA;EACA;CAAO,CACR;CAED,OAAAG,gBACGhC,aAAWiC,WAAA;EACVC,IAAE;EACFC,MAAI;EAAA,aAAA;EAAA,KAAA,WAAA;GAAA,OAEG9B,GACLC,eAAe;IACbE,SAASsB,MAAMtB;IACfU,MAAMY,MAAMZ;IACZM,aAAaM,MAAMN;GACrB,CAAC,GACDM,MAAMH,KACR;EAAC;CAAA,GACII,IAAgC,CAAA;AAG3C"}
1
+ {"version":3,"file":"button.js","names":["Polymorphic","splitProps","cva","controlInteractive","controlSize","cn","buttonVariants","variants","variant","default","secondary","destructive","outline","ghost","toolbar","subtle","success","link","size","xs","sm","md","lg","xl","touchTarget","comfortable","defaultVariants","class","Button","props","local","rest","_$createComponent","_$mergeProps","as","type"],"sources":["../../../../src/components/ui/button/button.tsx"],"sourcesContent":["import { Polymorphic, type PolymorphicProps } from '@kobalte/core/polymorphic'\nimport { type ComponentProps, splitProps, type ValidComponent } from 'solid-js'\nimport { cva, controlInteractive, controlSize, type VariantProps } from '#lib/variants'\nimport { cn } from '#lib/utils'\n\n/**\n * Button.\n *\n * One appearance ladder shared by every pressable thing in the system: a\n * button, a toolbar control, a dialog action, and a menu row all draw from the\n * same tokens, so a row of them cannot drift apart.\n *\n * The variants answer \"what is this for\", never \"what colour is it\". A caller\n * that wants a red button writes `variant=\"destructive\"`; the red lives here.\n * That is also what lets the design-system linter tell a caller which variant\n * to use instead of only which class was wrong.\n *\n * Polymorphic: pass `as=\"a\"` (or any component) and the button becomes it\n * while keeping the same styling contract. This replaces the React-era\n * `asChild` primitive, which has no Solid equivalent that preserves props.\n */\nexport const buttonVariants = cva(\n `${controlInteractive} inline-flex shrink-0 items-center justify-center rounded-md font-medium whitespace-nowrap select-none [&_svg]:pointer-events-none [&_svg]:shrink-0`,\n {\n variants: {\n variant: {\n /** The one primary action in a view. */\n default: 'bg-primary text-primary-foreground hover:bg-primary-hover',\n secondary: 'bg-secondary text-secondary-foreground hover:bg-surface-hover',\n /** For the action that destroys something. Never the default. */\n destructive:\n 'bg-destructive-action text-destructive-action-foreground hover:bg-destructive-action/90 focus-visible:ring-destructive-subtle',\n /** A bordered button for a surface that already has a fill. */\n outline:\n 'border border-border bg-transparent text-foreground hover:bg-surface-hover hover:border-input',\n /** No chrome until hover. The default for toolbar and row actions. */\n ghost: 'text-foreground hover:bg-surface-hover',\n /**\n * A ghost that opens something: a sheet, menu or popover trigger in a\n * toolbar. While its surface is open it holds the accent's own tint,\n * the same treatment that drives the side rail's active destination,\n * so the open control never reads identical to its closed neighbours\n * and the app's pressed chrome reads as one accent chroma. The\n * compound hover keeps the tint when an open control is pointed at.\n */\n toolbar:\n 'text-foreground hover:bg-surface-hover data-[expanded]:bg-primary-subtle data-[expanded]:text-primary data-[expanded]:hover:bg-primary-subtle',\n /** A tinted primary, for a secondary action inside a primary flow. */\n subtle: 'bg-primary-subtle text-primary hover:bg-primary-subtle/80',\n success: 'bg-success text-success-foreground hover:bg-success/90',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n '2xs': `${controlSize['2xs']} [&_svg]:size-3`,\n xs: `${controlSize.xs} [&_svg]:size-3.5`,\n sm: `${controlSize.sm} [&_svg]:size-3.5`,\n md: `${controlSize.md} [&_svg]:size-4`,\n lg: `${controlSize.lg} [&_svg]:size-4`,\n xl: `${controlSize.xl} [&_svg]:size-5`,\n '2xl': `${controlSize['2xl']} [&_svg]:size-6`,\n /* Square, for an icon with no label. The accessible name then has to\n come from `aria-label` or a visually hidden label — an icon-only\n button with neither is the accessibility finding the Storybook lane\n catches on every story. */\n 'icon-2xs': 'size-control-2xs p-0 [&_svg]:size-3',\n 'icon-xs': 'size-control-xs p-0 [&_svg]:size-3.5',\n 'icon-sm': 'size-control-sm p-0 [&_svg]:size-3.5',\n 'icon-md': 'size-control-md p-0 [&_svg]:size-4',\n 'icon-lg': 'size-control-lg p-0 [&_svg]:size-4',\n 'icon-xl': 'size-control-xl p-0 [&_svg]:size-5',\n 'icon-2xl': 'size-control-2xl p-0 [&_svg]:size-6',\n },\n /** Opt in to a stable touch target on devices with any coarse pointer. */\n touchTarget: {\n comfortable: 'touch-target-comfortable',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'md',\n },\n }\n)\n\ntype ButtonVariantProps = VariantProps<typeof buttonVariants>\n\nexport type ButtonProps<T extends ValidComponent = 'button'> = PolymorphicProps<\n T,\n ButtonVariantProps & {\n class?: string\n }\n>\n\nexport function Button<T extends ValidComponent = 'button'>(props: ButtonProps<T>) {\n const [local, rest] = splitProps(props as ButtonProps, [\n 'variant',\n 'size',\n 'touchTarget',\n 'class',\n ])\n\n return (\n <Polymorphic\n as=\"button\"\n type=\"button\"\n data-slot=\"button\"\n class={cn(\n buttonVariants({\n variant: local.variant,\n size: local.size,\n touchTarget: local.touchTarget,\n }),\n local.class\n )}\n {...(rest as ComponentProps<'button'>)}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAqBA,IAAaM,iBAAiBJ,IAC5B,GAAGC,mBAAkB,sJACrB;CACEI,UAAU;EACRC,SAAS;;GAEPC,SAAS;GACTC,WAAW;;GAEXC,aACE;;GAEFC,SACE;;GAEFC,OAAO;;;;;;;;;GASPC,SACE;;GAEFC,QAAQ;GACRC,SAAS;GACTC,MAAM;EACR;EACAC,MAAM;GACJ,OAAO,GAAGd,YAAY,OAAM;GAC5Be,IAAI,GAAGf,YAAYe,GAAE;GACrBC,IAAI,GAAGhB,YAAYgB,GAAE;GACrBC,IAAI,GAAGjB,YAAYiB,GAAE;GACrBC,IAAI,GAAGlB,YAAYkB,GAAE;GACrBC,IAAI,GAAGnB,YAAYmB,GAAE;GACrB,OAAO,GAAGnB,YAAY,OAAM;GAK5B,YAAY;GACZ,WAAW;GACX,WAAW;GACX,WAAW;GACX,WAAW;GACX,WAAW;GACX,YAAY;EACd;;EAEAoB,aAAa,EACXC,aAAa,2BACf;CACF;CACAC,iBAAiB;EACflB,SAAS;EACTU,MAAM;CACR;AACF,CACF;AAWA,SAAgBU,OAA4CC,OAAuB;CACjF,MAAM,CAACC,OAAOC,QAAQ9B,WAAW4B,OAAsB;EACrD;EACA;EACA;EACA;CAAO,CACR;CAED,OAAAG,gBACGhC,aAAWiC,WAAA;EACVC,IAAE;EACFC,MAAI;EAAA,aAAA;EAAA,KAAA,WAAA;GAAA,OAEG9B,GACLC,eAAe;IACbE,SAASsB,MAAMtB;IACfU,MAAMY,MAAMZ;IACZM,aAAaM,MAAMN;GACrB,CAAC,GACDM,MAAMH,KACR;EAAC;CAAA,GACII,IAAgC,CAAA;AAG3C"}
@@ -31,7 +31,7 @@ export declare function ButtonGroupSeparator(props: ComponentProps<typeof Separa
31
31
  orientation?: 'horizontal' | 'vertical';
32
32
  }): import("solid-js").JSX.Element;
33
33
  /**
34
- * Static text in a group — a unit, a label, a readout that is not a control. It
34
+ * Static text in a group, a unit, a label, a readout that is not a control. It
35
35
  * takes the group's border and height so it sits in the row as a peer, but it is
36
36
  * not focusable and does not pretend to be.
37
37
  */
@@ -43,7 +43,7 @@ function ButtonGroupSeparator(props) {
43
43
  }, rest));
44
44
  }
45
45
  /**
46
- * Static text in a group — a unit, a label, a readout that is not a control. It
46
+ * Static text in a group, a unit, a label, a readout that is not a control. It
47
47
  * takes the group's border and height so it sits in the row as a peer, but it is
48
48
  * not focusable and does not pretend to be.
49
49
  */
@@ -1 +1 @@
1
- {"version":3,"file":"button-group.js","names":["splitProps","cn","Separator","label","orientation","ButtonGroup","props","local","rest","horizontal","_el$","_tmpl$","_$spread","_$mergeProps","class","_$insert","children","ButtonGroupSeparator","_$createComponent","ButtonGroupText","_el$2","_tmpl$2"],"sources":["../../../../src/components/ui/button-group/button-group.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Separator } from '../separator'\n\n/**\n * ButtonGroup.\n *\n * Several controls acting as one. The point is the *join*: the items share a\n * border, collapse the seam between them, and round only at the ends, so a row of\n * buttons reads as a single object with segments rather than as buttons that happen\n * to be adjacent.\n *\n * The joining lives on the group, through child selectors, so an item never has to\n * know whether it sits at an end — which is also where the border collapse belongs.\n * A caller composing a group out of `Button`, `Select` and `InputGroup` therefore\n * gets the same treatment without those components knowing about it.\n *\n * The group is a `role=\"group\"` with a label, because a screen reader announcing\n * four unrelated buttons where the sighted user sees one control is the failure\n * this prevents.\n */\nexport type ButtonGroupProps = ComponentProps<'div'> & {\n /** The group's accessible name. Required: a group with no name is announced as loose buttons. */\n label: string\n orientation?: 'horizontal' | 'vertical'\n}\n\nexport function ButtonGroup(props: ButtonGroupProps) {\n const [local, rest] = splitProps(props, ['class', 'label', 'orientation', 'children'])\n\n const horizontal = () => local.orientation !== 'vertical'\n\n return (\n <div\n data-slot=\"button-group\"\n role=\"group\"\n aria-label={local.label}\n class={cn(\n 'flex w-fit items-stretch',\n horizontal() ? 'flex-row' : 'flex-col',\n /* Ends keep their outer radius; everything between them is squared, and the\n seam is collapsed by pulling each item back over its neighbour's border. */\n horizontal()\n ? '[&>*:first-child]:rounded-e-none [&>*:last-child]:rounded-s-none [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:not(:first-child)]:-ms-px'\n : '[&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:not(:first-child)]:-mt-px',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </div>\n )\n}\n\n/**\n * A separator inside a group. `orientation` follows the group: a vertical rule in a\n * horizontal group, and the reverse.\n */\nexport function ButtonGroupSeparator(\n props: ComponentProps<typeof Separator> & { orientation?: 'horizontal' | 'vertical' }\n) {\n const [local, rest] = splitProps(props, ['class', 'orientation'])\n\n return (\n <Separator\n orientation={local.orientation ?? 'vertical'}\n class={cn('self-stretch', local.class)}\n {...rest}\n />\n )\n}\n\n/**\n * Static text in a group — a unit, a label, a readout that is not a control. It\n * takes the group's border and height so it sits in the row as a peer, but it is\n * not focusable and does not pretend to be.\n */\nexport function ButtonGroupText(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <div\n data-slot=\"button-group-text\"\n class={cn(\n 'bg-muted text-muted-foreground flex items-center gap-2 rounded-md border border-border px-control-sm text-sm',\n local.class\n )}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;AA4BA,SAAgBK,YAAYC,OAAyB;CACnD,MAAM,CAACC,OAAOC,QAAQR,WAAWM,OAAO;EAAC;EAAS;EAAS;EAAe;CAAU,CAAC;CAErF,MAAMG,mBAAmBF,MAAMH,gBAAgB;CAE/C,cAAA;EAAA,IAAAM,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA;GAAA,KAAA,gBAAA;IAAA,OAIgBN,MAAMJ;GAAK;GAAA,KAAA,WAAA;IAAA,OAChBF,GACL,4BACAQ,WAAW,IAAI,aAAa,YAG5BA,WAAW,IACP,0JACA,yJACJF,MAAMO,KACR;GAAC;EAAA,GACGN,IAAI,GAAA,OAAA,IAAA;EAAAO,OAAAL,YAEPH,MAAMS,QAAQ;EAAA,OAAAN;CAAA,EAAA,CAAA;AAGrB;;;;;AAMA,SAAgBO,qBACdX,OACA;CACA,MAAM,CAACC,OAAOC,QAAQR,WAAWM,OAAO,CAAC,SAAS,aAAa,CAAC;CAEhE,OAAAY,gBACGhB,WAASW,WAAA;EAAA,IACRT,cAAW;GAAA,OAAEG,MAAMH,eAAe;EAAU;EAAA,KAAA,WAAA;GAAA,OACrCH,GAAG,gBAAgBM,MAAMO,KAAK;EAAC;CAAA,GAClCN,IAAI,CAAA;AAGd;;;;;;AAOA,SAAgBW,gBAAgBb,OAA8B;CAC5D,MAAM,CAACC,OAAOC,QAAQR,WAAWM,OAAO,CAAC,OAAO,CAAC;CAEjD,cAAA;EAAA,IAAAc,QAAAC,QAAA;EAAAT,OAAAQ,OAAAP,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWZ,GACL,gHACAM,MAAMO,KACR;EAAC,EAAA,GACGN,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAY;CAAA,EAAA,CAAA;AAGd"}
1
+ {"version":3,"file":"button-group.js","names":["splitProps","cn","Separator","label","orientation","ButtonGroup","props","local","rest","horizontal","_el$","_tmpl$","_$spread","_$mergeProps","class","_$insert","children","ButtonGroupSeparator","_$createComponent","ButtonGroupText","_el$2","_tmpl$2"],"sources":["../../../../src/components/ui/button-group/button-group.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Separator } from '../separator'\n\n/**\n * ButtonGroup.\n *\n * Several controls acting as one. The point is the *join*: the items share a\n * border, collapse the seam between them, and round only at the ends, so a row of\n * buttons reads as a single object with segments rather than as buttons that happen\n * to be adjacent.\n *\n * The joining lives on the group, through child selectors, so an item never has to\n * know whether it sits at an end — which is also where the border collapse belongs.\n * A caller composing a group out of `Button`, `Select` and `InputGroup` therefore\n * gets the same treatment without those components knowing about it.\n *\n * The group is a `role=\"group\"` with a label, because a screen reader announcing\n * four unrelated buttons where the sighted user sees one control is the failure\n * this prevents.\n */\nexport type ButtonGroupProps = ComponentProps<'div'> & {\n /** The group's accessible name. Required: a group with no name is announced as loose buttons. */\n label: string\n orientation?: 'horizontal' | 'vertical'\n}\n\nexport function ButtonGroup(props: ButtonGroupProps) {\n const [local, rest] = splitProps(props, ['class', 'label', 'orientation', 'children'])\n\n const horizontal = () => local.orientation !== 'vertical'\n\n return (\n <div\n data-slot=\"button-group\"\n role=\"group\"\n aria-label={local.label}\n class={cn(\n 'flex w-fit items-stretch',\n horizontal() ? 'flex-row' : 'flex-col',\n /* Ends keep their outer radius; everything between them is squared, and the\n seam is collapsed by pulling each item back over its neighbour's border. */\n horizontal()\n ? '[&>*:first-child]:rounded-e-none [&>*:last-child]:rounded-s-none [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:not(:first-child)]:-ms-px'\n : '[&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:not(:first-child)]:-mt-px',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </div>\n )\n}\n\n/**\n * A separator inside a group. `orientation` follows the group: a vertical rule in a\n * horizontal group, and the reverse.\n */\nexport function ButtonGroupSeparator(\n props: ComponentProps<typeof Separator> & { orientation?: 'horizontal' | 'vertical' }\n) {\n const [local, rest] = splitProps(props, ['class', 'orientation'])\n\n return (\n <Separator\n orientation={local.orientation ?? 'vertical'}\n class={cn('self-stretch', local.class)}\n {...rest}\n />\n )\n}\n\n/**\n * Static text in a group, a unit, a label, a readout that is not a control. It\n * takes the group's border and height so it sits in the row as a peer, but it is\n * not focusable and does not pretend to be.\n */\nexport function ButtonGroupText(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <div\n data-slot=\"button-group-text\"\n class={cn(\n 'bg-muted text-muted-foreground flex items-center gap-2 rounded-md border border-border px-control-sm text-sm',\n local.class\n )}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;AA4BA,SAAgBK,YAAYC,OAAyB;CACnD,MAAM,CAACC,OAAOC,QAAQR,WAAWM,OAAO;EAAC;EAAS;EAAS;EAAe;CAAU,CAAC;CAErF,MAAMG,mBAAmBF,MAAMH,gBAAgB;CAE/C,cAAA;EAAA,IAAAM,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA;GAAA,KAAA,gBAAA;IAAA,OAIgBN,MAAMJ;GAAK;GAAA,KAAA,WAAA;IAAA,OAChBF,GACL,4BACAQ,WAAW,IAAI,aAAa,YAG5BA,WAAW,IACP,0JACA,yJACJF,MAAMO,KACR;GAAC;EAAA,GACGN,IAAI,GAAA,OAAA,IAAA;EAAAO,OAAAL,YAEPH,MAAMS,QAAQ;EAAA,OAAAN;CAAA,EAAA,CAAA;AAGrB;;;;;AAMA,SAAgBO,qBACdX,OACA;CACA,MAAM,CAACC,OAAOC,QAAQR,WAAWM,OAAO,CAAC,SAAS,aAAa,CAAC;CAEhE,OAAAY,gBACGhB,WAASW,WAAA;EAAA,IACRT,cAAW;GAAA,OAAEG,MAAMH,eAAe;EAAU;EAAA,KAAA,WAAA;GAAA,OACrCH,GAAG,gBAAgBM,MAAMO,KAAK;EAAC;CAAA,GAClCN,IAAI,CAAA;AAGd;;;;;;AAOA,SAAgBW,gBAAgBb,OAA8B;CAC5D,MAAM,CAACC,OAAOC,QAAQR,WAAWM,OAAO,CAAC,OAAO,CAAC;CAEjD,cAAA;EAAA,IAAAc,QAAAC,QAAA;EAAAT,OAAAQ,OAAAP,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWZ,GACL,gHACAM,MAAMO,KACR;EAAC,EAAA,GACGN,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAY;CAAA,EAAA,CAAA;AAGd"}
@@ -202,11 +202,11 @@ function DatePicker(props) {
202
202
  get when() {
203
203
  return local.label;
204
204
  },
205
- get children() {
205
+ children: (labelSlot) => (() => {
206
206
  var _el$1 = _tmpl$8();
207
- insert(_el$1, () => local.label);
207
+ insert(_el$1, labelSlot);
208
208
  return _el$1;
209
- }
209
+ })()
210
210
  }), null);
211
211
  insert(_el$0, createComponent(CalendarSurface, mergeProps(rest, {
212
212
  mode: "single",
@@ -221,11 +221,11 @@ function DatePicker(props) {
221
221
  get when() {
222
222
  return local.footer;
223
223
  },
224
- get children() {
224
+ children: (footerSlot) => (() => {
225
225
  var _el$10 = _tmpl$9();
226
- insert(_el$10, () => local.footer);
226
+ insert(_el$10, footerSlot);
227
227
  return _el$10;
228
- }
228
+ })()
229
229
  }), null);
230
230
  effect(() => className(_el$0, cn("grid w-fit gap-2", local.class)));
231
231
  return _el$0;
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.js","names":["createMemo","For","Show","splitProps","Calendar","ChevronLeft","ChevronRight","cn","Button","weekdayLabels","previousLabel","nextLabel","formatMonth","month","Date","class","EXTRAS","MONTH_FORMAT","Intl","year","defaultWeekdays","format","DateTimeFormat","undefined","weekday","Array","from","length","_","index","CalendarGrid","props","context","useContext","_$createComponent","each","months","children","weekdays","dayFormatter","day","monthLabel","date","_el$","_tmpl$3","_el$2","firstChild","_$insert","Nav","action","as","variant","size","Label","Table","_el$3","_tmpl$","_el$4","label","HeadCell","scope","_el$5","_tmpl$2","weeks","week","_el$6","_tmpl$4","Cell","CellTrigger","_el$7","_tmpl$5","getDate","_el$8","_tmpl$6","CalendarSurface","mode","local","rest","_el$9","_tmpl$7","_$mergeProps","_$effect","_$className","footer","DatePicker","_el$0","when","_el$1","_tmpl$8","value","onValueChange","_el$10","_tmpl$9"],"sources":["../../../../src/components/ui/calendar/calendar.tsx"],"sourcesContent":["import { createMemo, For, Show, splitProps, type ComponentProps, type JSX } from 'solid-js'\nimport Calendar, {\n type RootProps as CorvuCalendarProps,\n type RootSingleProps,\n} from '@corvu/calendar'\n\n/** The three modes corvu's calendar is a union over. */\nexport type CalendarMode = 'single' | 'multiple' | 'range'\nimport { ChevronLeft, ChevronRight } from 'lucide-solid'\nimport { cn } from '#lib/utils'\nimport { Button } from '../button'\n\n/**\n * Calendar.\n *\n * A month grid, over `@corvu/calendar`. The primitive owns the hard part — the\n * roving `tabindex` that makes a grid of days one tab stop rather than 42, the\n * arrow-key navigation, the `aria-selected`/`aria-disabled` bookkeeping, and the\n * `data-*` attributes that carry the states.\n *\n * What this component owns is the *presentation* of those states, and it is worth\n * saying why they are styled from `data-*` rather than from props: a day is today,\n * selected, in range, at a range end, and disabled independently, and a range\n * start that is also today has to read as both. Boolean props cannot express that\n * without a combinatorial explosion; the data attributes can.\n *\n * `mode` is the primitive's discriminated union — `single`, `multiple`, `range` —\n * so `value` and `onValueChange` change type with it. That is why this forwards\n * the props rather than normalising them: a normalised `Date[]` would lose what a\n * range needs to know which end moved.\n *\n * Three things the primitive leaves open, and this closes:\n *\n * 1. **The month caption is a heading**, wired to the grid's `aria-labelledby`, so\n * the grid has a name and a screen reader user can hear which month they are in.\n * 2. **The nav buttons have accessible names.** A bare chevron is not a name.\n * 3. **Today is a ring, not a fill.** A fill would be indistinguishable from\n * selected, and today is often also selected.\n *\n * The sub-components come off the default export as statics (`Calendar.Cell`,\n * `Calendar.CellTrigger`, …) — corvu's shape, and the reason this file does not\n * import seven names.\n */\n\n/**\n * The props this wrapper adds on top of the primitive's own. They are separate so\n * `splitProps` has a fixed list to pull out, and so the mode-specific props stay\n * the primitive's to define.\n */\ntype CalendarExtras = {\n /** Weekday header labels, Sunday first. Defaults to the locale's short names. */\n weekdayLabels?: readonly string[]\n /** Accessible names for the month navigation. Override for a non-English app. */\n previousLabel?: string\n nextLabel?: string\n /** Format a month for the caption. Defaults to `Intl.DateTimeFormat`. */\n formatMonth?: (month: Date) => string\n class?: string\n}\n\n/**\n * `Omit` distributes over a union, which would collapse the three modes into one\n * shape and lose the discriminant. This keeps them apart. `children` is dropped\n * because the surface supplies the grid itself — the caller's job is the value,\n * not the layout.\n */\ntype DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never\n\n/** The props of any of the three modes. `mode` decides the shape of `value`. */\nexport type CalendarProps = DistributiveOmit<CorvuCalendarProps, 'children'> & CalendarExtras\n\nconst EXTRAS = ['weekdayLabels', 'previousLabel', 'nextLabel', 'formatMonth', 'class'] as const\n\nconst MONTH_FORMAT: Intl.DateTimeFormatOptions = { month: 'long', year: 'numeric' }\n\n/** The locale's short weekday names, Sunday first — which is the order corvu's `weeks` use. */\nfunction defaultWeekdays(): string[] {\n const format = new Intl.DateTimeFormat(undefined, { weekday: 'short' })\n // 2024-01-07 is a Sunday, so index 0 is Sunday without arithmetic.\n return Array.from({ length: 7 }, (_, index) => format.format(new Date(2024, 0, 7 + index)))\n}\n\n/**\n * The grid, inside the root's context. A separate component because\n * `Calendar.useContext` is only available to a descendant, and reading `months()`\n * in the same component that provides it renders one month behind.\n */\nfunction CalendarGrid(props: {\n weekdayLabels?: readonly string[]\n previousLabel: string\n nextLabel: string\n formatMonth?: (month: Date) => string\n}) {\n const context = Calendar.useContext()\n return (\n <For each={context.months()}>\n {(month, index) => {\n const weekdays = createMemo(() => props.weekdayLabels ?? defaultWeekdays())\n // Recreate per month so navigation picks up changed locale and time-zone defaults.\n const dayFormatter = new Intl.DateTimeFormat(undefined, {\n day: 'numeric',\n month: 'long',\n year: 'numeric',\n })\n const monthLabel = (date: Date) =>\n props.formatMonth\n ? props.formatMonth(date)\n : new Intl.DateTimeFormat(undefined, MONTH_FORMAT).format(date)\n return (\n <div class=\"flex flex-col gap-2\">\n <div class=\"flex items-center justify-between gap-2\">\n <Calendar.Nav\n action=\"prev-month\"\n as={Button}\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={props.previousLabel}\n >\n <ChevronLeft aria-hidden=\"true\" />\n </Calendar.Nav>\n <Calendar.Label index={index()} class=\"text-sm font-semibold text-foreground\">\n {monthLabel(month.month)}\n </Calendar.Label>\n <Calendar.Nav\n action=\"next-month\"\n as={Button}\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={props.nextLabel}\n >\n <ChevronRight aria-hidden=\"true\" />\n </Calendar.Nav>\n </div>\n <Calendar.Table class=\"w-full border-collapse\">\n <thead>\n <tr>\n <For each={weekdays()}>\n {(label) => (\n <Calendar.HeadCell\n as=\"th\"\n scope=\"col\"\n class=\"pb-1 text-2xs font-medium text-muted-foreground\"\n >\n {label}\n </Calendar.HeadCell>\n )}\n </For>\n </tr>\n </thead>\n <tbody>\n <For each={month.weeks}>\n {(week) => (\n <tr>\n <For each={week}>\n {(day) => (\n <Calendar.Cell as=\"td\" class=\"p-0.5 text-center\">\n <Calendar.CellTrigger\n as=\"button\"\n day={day}\n month={month.month}\n class={cn(\n 'w-full rounded-md text-xs text-foreground transition-colors',\n 'min-h-control-xs',\n 'hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none',\n // Styled from data states, so a day can be a range\n // end and today at once without a prop per pair.\n 'data-selected:bg-primary data-selected:text-primary-foreground',\n // corvu marks every day of a range selected, so the\n // span between the ends steps back to the subtle\n // fill and the ends take the solid one again.\n 'data-in-range:bg-primary-subtle data-in-range:text-foreground',\n 'data-range-start:bg-primary data-range-start:text-primary-foreground',\n 'data-range-end:bg-primary data-range-end:text-primary-foreground',\n 'data-range-start:rounded-r-none data-range-end:rounded-l-none',\n 'data-today:ring-1 data-today:ring-ring',\n 'data-disabled:text-muted-foreground data-disabled:line-through',\n 'data-disabled:hover:bg-transparent'\n )}\n >\n {/*\n The trigger renders no children of its own, so the\n day number is the caller's — without it every cell\n is an unnamed button (`button-name`).\n\n The number is what a sighted reader needs and the\n full date is what a screen reader user needs: \"25\"\n alone is meaningless out of context. So the number\n is hidden from the accessibility tree and the date\n supplies the name.\n */}\n <span aria-hidden=\"true\">{day.getDate()}</span>\n <span class=\"visually-hidden\">{dayFormatter.format(day)}</span>\n </Calendar.CellTrigger>\n </Calendar.Cell>\n )}\n </For>\n </tr>\n )}\n </For>\n </tbody>\n </Calendar.Table>\n </div>\n )\n }}\n </For>\n )\n}\n\n/**\n * Generic over the mode on purpose. `splitProps` cannot carry a discriminant\n * through destructuring — the rest object widens to `mode: 'single' | 'multiple' |\n * 'range'`, which is assignable to no single member of the primitive's union. A\n * type parameter keeps `mode` a literal, so `Extract` resolves the right member\n * and the forwarding stays checked rather than cast.\n */\nexport function CalendarSurface<M extends CalendarMode>(props: CalendarProps & { mode: M }) {\n const [local, rest] = splitProps(props as CalendarProps, [...EXTRAS])\n\n return (\n <div class={cn('w-fit rounded-lg border border-border bg-card p-3', local.class)}>\n <Calendar {...(rest as Extract<CorvuCalendarProps, { mode: M }>)}>\n <CalendarGrid\n weekdayLabels={local.weekdayLabels}\n previousLabel={local.previousLabel ?? 'Previous month'}\n nextLabel={local.nextLabel ?? 'Next month'}\n formatMonth={local.formatMonth}\n />\n </Calendar>\n </div>\n )\n}\n\n/**\n * Built from the primitive's *single* props rather than from `CalendarProps` with\n * `mode` omitted. Omitting a discriminant leaves the other members of the union\n * behind — `value` stays `Date | Date[] | {from,to}` — and the picker would then\n * have to cast to prove what its own name already says.\n */\nexport type DatePickerProps = Omit<RootSingleProps, 'mode' | 'children'> &\n CalendarExtras & {\n /** A labelled heading above the grid. */\n label?: string\n /** A footer slot: the confirm and cancel row a picker usually has. */\n footer?: JSX.Element\n }\n\n/**\n * A single-day picker: the calendar with a name and a footer. Split from\n * `CalendarSurface` because a bare calendar is a control inside a form the caller\n * already owns, while a picker is a thing the caller drops in — and the two want\n * different surroundings.\n */\nexport function DatePicker(props: DatePickerProps) {\n const [local, rest] = splitProps(props, ['value', 'onValueChange', 'label', 'footer', 'class'])\n\n return (\n <div class={cn('grid w-fit gap-2', local.class)}>\n <Show when={local.label}>\n <p class=\"text-xs font-semibold text-foreground\">{local.label}</p>\n </Show>\n <CalendarSurface\n {...rest}\n mode=\"single\"\n value={local.value}\n onValueChange={local.onValueChange}\n />\n <Show when={local.footer}>\n <div class=\"flex justify-end gap-2\">{local.footer}</div>\n </Show>\n </div>\n )\n}\n\n/** Re-exported so a caller can type a value it holds. */\nexport type { CalendarProps as CorvuCalendarProps }\nexport { Calendar as CalendarRoot }\nexport type CalendarElementProps = ComponentProps<'div'>\n"],"mappings":";;;;;;;;;;;;;;;;AAuEA,IAAMgB,SAAS;CAAC;CAAiB;CAAiB;CAAa;CAAe;AAAO;AAErF,IAAMC,eAA2C;CAAEJ,OAAO;CAAQM,MAAM;AAAU;;AAGlF,SAASC,kBAA4B;CACnC,MAAMC,SAAS,IAAIH,KAAKI,eAAeC,KAAAA,GAAW,EAAEC,SAAS,QAAQ,CAAC;CAEtE,OAAOC,MAAMC,KAAK,EAAEC,QAAQ,EAAE,IAAIC,GAAGC,UAAUR,OAAOA,OAAO,IAAIP,KAAK,MAAM,GAAG,IAAIe,KAAK,CAAC,CAAC;AAC5F;;;;;;AAOA,SAASC,aAAaC,OAKnB;CACD,MAAMC,UAAU5B,SAAS6B,WAAW;CACpC,OAAAC,gBACGjC,KAAG;EAAA,IAACkC,OAAI;GAAA,OAAEH,QAAQI,OAAO;EAAC;EAAAC,WACvBxB,OAAOgB,UAAU;GACjB,MAAMS,WAAWtC,iBAAiB+B,MAAMtB,iBAAiBW,gBAAgB,CAAC;GAE1E,MAAMmB,eAAe,IAAIrB,KAAKI,eAAeC,KAAAA,GAA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AA,IAAAsD,SAAAC,QAAA;IAAA7C,OAAA4C,cACef,MAAMO,MAAM;IAAA,OAAAQ;GAAA;EAAA,CAAA,GAAA,IAAA;EAAAV,aAAAC,UAAAG,OAXzC9E,GAAG,oBAAoBqE,MAAM7D,KAAK,CAAC,CAAA;EAAA,OAAAsE;CAAA,EAAA,CAAA;AAenD"}
1
+ {"version":3,"file":"calendar.js","names":["createMemo","For","Show","splitProps","Calendar","ChevronLeft","ChevronRight","cn","Button","weekdayLabels","previousLabel","nextLabel","formatMonth","month","Date","class","EXTRAS","MONTH_FORMAT","Intl","year","defaultWeekdays","format","DateTimeFormat","undefined","weekday","Array","from","length","_","index","CalendarGrid","props","context","useContext","_$createComponent","each","months","children","weekdays","dayFormatter","day","monthLabel","date","_el$","_tmpl$3","_el$2","firstChild","_$insert","Nav","action","as","variant","size","Label","Table","_el$3","_tmpl$","_el$4","label","HeadCell","scope","_el$5","_tmpl$2","weeks","week","_el$6","_tmpl$4","Cell","CellTrigger","_el$7","_tmpl$5","getDate","_el$8","_tmpl$6","CalendarSurface","mode","local","rest","_el$9","_tmpl$7","_$mergeProps","_$effect","_$className","footer","DatePicker","_el$0","when","labelSlot","_el$1","_tmpl$8","value","onValueChange","footerSlot","_el$10","_tmpl$9"],"sources":["../../../../src/components/ui/calendar/calendar.tsx"],"sourcesContent":["import { createMemo, For, Show, splitProps, type ComponentProps, type JSX } from 'solid-js'\nimport Calendar, {\n type RootProps as CorvuCalendarProps,\n type RootSingleProps,\n} from '@corvu/calendar'\n\n/** The three modes corvu's calendar is a union over. */\nexport type CalendarMode = 'single' | 'multiple' | 'range'\nimport { ChevronLeft, ChevronRight } from 'lucide-solid'\nimport { cn } from '#lib/utils'\nimport { Button } from '../button'\n\n/**\n * Calendar.\n *\n * A month grid, over `@corvu/calendar`. The primitive owns the hard part — the\n * roving `tabindex` that makes a grid of days one tab stop rather than 42, the\n * arrow-key navigation, the `aria-selected`/`aria-disabled` bookkeeping, and the\n * `data-*` attributes that carry the states.\n *\n * What this component owns is the *presentation* of those states, and it is worth\n * saying why they are styled from `data-*` rather than from props: a day is today,\n * selected, in range, at a range end, and disabled independently, and a range\n * start that is also today has to read as both. Boolean props cannot express that\n * without a combinatorial explosion; the data attributes can.\n *\n * `mode` is the primitive's discriminated union — `single`, `multiple`, `range` —\n * so `value` and `onValueChange` change type with it. That is why this forwards\n * the props rather than normalising them: a normalised `Date[]` would lose what a\n * range needs to know which end moved.\n *\n * Three things the primitive leaves open, and this closes:\n *\n * 1. **The month caption is a heading**, wired to the grid's `aria-labelledby`, so\n * the grid has a name and a screen reader user can hear which month they are in.\n * 2. **The nav buttons have accessible names.** A bare chevron is not a name.\n * 3. **Today is a ring, not a fill.** A fill would be indistinguishable from\n * selected, and today is often also selected.\n *\n * The sub-components come off the default export as statics (`Calendar.Cell`,\n * `Calendar.CellTrigger`, …) — corvu's shape, and the reason this file does not\n * import seven names.\n */\n\n/**\n * The props this wrapper adds on top of the primitive's own. They are separate so\n * `splitProps` has a fixed list to pull out, and so the mode-specific props stay\n * the primitive's to define.\n */\ntype CalendarExtras = {\n /** Weekday header labels, Sunday first. Defaults to the locale's short names. */\n weekdayLabels?: readonly string[]\n /** Accessible names for the month navigation. Override for a non-English app. */\n previousLabel?: string\n nextLabel?: string\n /** Format a month for the caption. Defaults to `Intl.DateTimeFormat`. */\n formatMonth?: (month: Date) => string\n class?: string\n}\n\n/**\n * `Omit` distributes over a union, which would collapse the three modes into one\n * shape and lose the discriminant. This keeps them apart. `children` is dropped\n * because the surface supplies the grid itself — the caller's job is the value,\n * not the layout.\n */\ntype DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never\n\n/** The props of any of the three modes. `mode` decides the shape of `value`. */\nexport type CalendarProps = DistributiveOmit<CorvuCalendarProps, 'children'> & CalendarExtras\n\nconst EXTRAS = ['weekdayLabels', 'previousLabel', 'nextLabel', 'formatMonth', 'class'] as const\n\nconst MONTH_FORMAT: Intl.DateTimeFormatOptions = { month: 'long', year: 'numeric' }\n\n/** The locale's short weekday names, Sunday first — which is the order corvu's `weeks` use. */\nfunction defaultWeekdays(): string[] {\n const format = new Intl.DateTimeFormat(undefined, { weekday: 'short' })\n // 2024-01-07 is a Sunday, so index 0 is Sunday without arithmetic.\n return Array.from({ length: 7 }, (_, index) => format.format(new Date(2024, 0, 7 + index)))\n}\n\n/**\n * The grid, inside the root's context. A separate component because\n * `Calendar.useContext` is only available to a descendant, and reading `months()`\n * in the same component that provides it renders one month behind.\n */\nfunction CalendarGrid(props: {\n weekdayLabels?: readonly string[]\n previousLabel: string\n nextLabel: string\n formatMonth?: (month: Date) => string\n}) {\n const context = Calendar.useContext()\n return (\n <For each={context.months()}>\n {(month, index) => {\n const weekdays = createMemo(() => props.weekdayLabels ?? defaultWeekdays())\n // Recreate per month so navigation picks up changed locale and time-zone defaults.\n const dayFormatter = new Intl.DateTimeFormat(undefined, {\n day: 'numeric',\n month: 'long',\n year: 'numeric',\n })\n const monthLabel = (date: Date) =>\n props.formatMonth\n ? props.formatMonth(date)\n : new Intl.DateTimeFormat(undefined, MONTH_FORMAT).format(date)\n return (\n <div class=\"flex flex-col gap-2\">\n <div class=\"flex items-center justify-between gap-2\">\n <Calendar.Nav\n action=\"prev-month\"\n as={Button}\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={props.previousLabel}\n >\n <ChevronLeft aria-hidden=\"true\" />\n </Calendar.Nav>\n <Calendar.Label index={index()} class=\"text-sm font-semibold text-foreground\">\n {monthLabel(month.month)}\n </Calendar.Label>\n <Calendar.Nav\n action=\"next-month\"\n as={Button}\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={props.nextLabel}\n >\n <ChevronRight aria-hidden=\"true\" />\n </Calendar.Nav>\n </div>\n <Calendar.Table class=\"w-full border-collapse\">\n <thead>\n <tr>\n <For each={weekdays()}>\n {(label) => (\n <Calendar.HeadCell\n as=\"th\"\n scope=\"col\"\n class=\"pb-1 text-2xs font-medium text-muted-foreground\"\n >\n {label}\n </Calendar.HeadCell>\n )}\n </For>\n </tr>\n </thead>\n <tbody>\n <For each={month.weeks}>\n {(week) => (\n <tr>\n <For each={week}>\n {(day) => (\n <Calendar.Cell as=\"td\" class=\"p-0.5 text-center\">\n <Calendar.CellTrigger\n as=\"button\"\n day={day}\n month={month.month}\n class={cn(\n 'w-full rounded-md text-xs text-foreground transition-colors',\n 'min-h-control-xs',\n 'hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none',\n // Styled from data states, so a day can be a range\n // end and today at once without a prop per pair.\n 'data-selected:bg-primary data-selected:text-primary-foreground',\n // corvu marks every day of a range selected, so the\n // span between the ends steps back to the subtle\n // fill and the ends take the solid one again.\n 'data-in-range:bg-primary-subtle data-in-range:text-foreground',\n 'data-range-start:bg-primary data-range-start:text-primary-foreground',\n 'data-range-end:bg-primary data-range-end:text-primary-foreground',\n 'data-range-start:rounded-r-none data-range-end:rounded-l-none',\n 'data-today:ring-1 data-today:ring-ring',\n 'data-disabled:text-muted-foreground data-disabled:line-through',\n 'data-disabled:hover:bg-transparent'\n )}\n >\n {/*\n The trigger renders no children of its own, so the\n day number is the caller's — without it every cell\n is an unnamed button (`button-name`).\n\n The number is what a sighted reader needs and the\n full date is what a screen reader user needs: \"25\"\n alone is meaningless out of context. So the number\n is hidden from the accessibility tree and the date\n supplies the name.\n */}\n <span aria-hidden=\"true\">{day.getDate()}</span>\n <span class=\"visually-hidden\">{dayFormatter.format(day)}</span>\n </Calendar.CellTrigger>\n </Calendar.Cell>\n )}\n </For>\n </tr>\n )}\n </For>\n </tbody>\n </Calendar.Table>\n </div>\n )\n }}\n </For>\n )\n}\n\n/**\n * Generic over the mode on purpose. `splitProps` cannot carry a discriminant\n * through destructuring — the rest object widens to `mode: 'single' | 'multiple' |\n * 'range'`, which is assignable to no single member of the primitive's union. A\n * type parameter keeps `mode` a literal, so `Extract` resolves the right member\n * and the forwarding stays checked rather than cast.\n */\nexport function CalendarSurface<M extends CalendarMode>(props: CalendarProps & { mode: M }) {\n const [local, rest] = splitProps(props as CalendarProps, [...EXTRAS])\n\n return (\n <div class={cn('w-fit rounded-lg border border-border bg-card p-3', local.class)}>\n <Calendar {...(rest as Extract<CorvuCalendarProps, { mode: M }>)}>\n <CalendarGrid\n weekdayLabels={local.weekdayLabels}\n previousLabel={local.previousLabel ?? 'Previous month'}\n nextLabel={local.nextLabel ?? 'Next month'}\n formatMonth={local.formatMonth}\n />\n </Calendar>\n </div>\n )\n}\n\n/**\n * Built from the primitive's *single* props rather than from `CalendarProps` with\n * `mode` omitted. Omitting a discriminant leaves the other members of the union\n * behind — `value` stays `Date | Date[] | {from,to}` — and the picker would then\n * have to cast to prove what its own name already says.\n */\nexport type DatePickerProps = Omit<RootSingleProps, 'mode' | 'children'> &\n CalendarExtras & {\n /** A labelled heading above the grid. */\n label?: string\n /** A footer slot: the confirm and cancel row a picker usually has. */\n footer?: JSX.Element\n }\n\n/**\n * A single-day picker: the calendar with a name and a footer. Split from\n * `CalendarSurface` because a bare calendar is a control inside a form the caller\n * already owns, while a picker is a thing the caller drops in — and the two want\n * different surroundings.\n */\nexport function DatePicker(props: DatePickerProps) {\n const [local, rest] = splitProps(props, ['value', 'onValueChange', 'label', 'footer', 'class'])\n\n return (\n <div class={cn('grid w-fit gap-2', local.class)}>\n <Show when={local.label}>\n {(labelSlot) => <p class=\"text-xs font-semibold text-foreground\">{labelSlot()}</p>}\n </Show>\n <CalendarSurface\n {...rest}\n mode=\"single\"\n value={local.value}\n onValueChange={local.onValueChange}\n />\n <Show when={local.footer}>\n {(footerSlot) => <div class=\"flex justify-end gap-2\">{footerSlot()}</div>}\n </Show>\n </div>\n )\n}\n\n/** Re-exported so a caller can type a value it holds. */\nexport type { CalendarProps as CorvuCalendarProps }\nexport { Calendar as CalendarRoot }\nexport type CalendarElementProps = ComponentProps<'div'>\n"],"mappings":";;;;;;;;;;;;;;;;AAuEA,IAAMgB,SAAS;CAAC;CAAiB;CAAiB;CAAa;CAAe;AAAO;AAErF,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AAiB;EAAS;EAAU;CAAO,CAAC;CAE9F,cAAA;EAAA,IAAAsD,QAAAN,QAAA;EAAAhC,OAAAsC,OAAAnD,gBAEKhC,MAAI;GAAA,IAACoF,OAAI;IAAA,OAAEV,MAAMlB;GAAK;GAAArB,WACnBkD,qBAAS;IAAA,IAAAC,QAAAC,QAAA;IAAA1C,OAAAyC,OAAuDD,SAAS;IAAA,OAAAC;GAAA,EAAA,CAAA;EAAO,CAAA,GAAA,IAAA;EAAAzC,OAAAsC,OAAAnD,gBAEnFwC,iBAAeM,WACVH,MAAI;GACRF,MAAI;GAAA,IACJe,QAAK;IAAA,OAAEd,MAAMc;GAAK;GAAA,IAClBC,gBAAa;IAAA,OAAEf,MAAMe;GAAa;EAAA,CAAA,CAAA,GAAA,IAAA;EAAA5C,OAAAsC,OAAAnD,gBAEnChC,MAAI;GAAA,IAACoF,OAAI;IAAA,OAAEV,MAAMO;GAAM;GAAA9C,WACpBuD,sBAAU;IAAA,IAAAC,SAAAC,QAAA;IAAA/C,OAAA8C,QAA0CD,UAAU;IAAA,OAAAC;GAAA,EAAA,CAAA;EAAS,CAAA,GAAA,IAAA;EAAAZ,aAAAC,UAAAG,OAXjE9E,GAAG,oBAAoBqE,MAAM7D,KAAK,CAAC,CAAA;EAAA,OAAAsE;CAAA,EAAA,CAAA;AAenD"}
@@ -9,7 +9,7 @@ import { type VariantProps } from '#lib/variants';
9
9
  * nothing about it interrupts the reader.
10
10
  *
11
11
  * That is the difference from `Alert`. An `Alert` is a message about the state of
12
- * the surface it sits in — a failed sync, a validation summary — so it is always
12
+ * the surface it sits in, a failed sync, a validation summary, so it is always
13
13
  * `role="alert"`, a live announcement, with a tone glyph and a tinted status
14
14
  * surface. A callout is static page content: a plain `div` with `role="note"`, no
15
15
  * live region, no icon, and no tint. A caller whose note really is a status
@@ -27,9 +27,9 @@ import { type VariantProps } from '#lib/variants';
27
27
  * sets `p-*` or a border width to make one denser. The rungs are Cortana's three
28
28
  * answer-view callouts, expressed in the Tailwind spacing scale:
29
29
  *
30
- * - `lg`: 22px / 24px padding, 3px rule — Cortana's `.answer-copy`.
31
- * - `md`: 18px / 20px padding, 3px rule — Cortana's `.answer-memory`.
32
- * - `sm`: 12px / 14px padding, 2px rule — Cortana's `.answer-note`.
30
+ * - `lg`: 22px / 24px padding, 3px rule: Cortana's `.answer-copy`.
31
+ * - `md`: 18px / 20px padding, 3px rule: Cortana's `.answer-memory`.
32
+ * - `sm`: 12px / 14px padding, 2px rule: Cortana's `.answer-note`.
33
33
  *
34
34
  * Type size and colour are inherited rather than set (only the card foreground is
35
35
  * applied), so a callout in a dense panel and one in an article both read at the
@@ -14,7 +14,7 @@ var _tmpl$2 = /*#__PURE__*/ template(`<div data-slot=callout-title>`);
14
14
  * nothing about it interrupts the reader.
15
15
  *
16
16
  * That is the difference from `Alert`. An `Alert` is a message about the state of
17
- * the surface it sits in — a failed sync, a validation summary — so it is always
17
+ * the surface it sits in, a failed sync, a validation summary, so it is always
18
18
  * `role="alert"`, a live announcement, with a tone glyph and a tinted status
19
19
  * surface. A callout is static page content: a plain `div` with `role="note"`, no
20
20
  * live region, no icon, and no tint. A caller whose note really is a status
@@ -32,9 +32,9 @@ var _tmpl$2 = /*#__PURE__*/ template(`<div data-slot=callout-title>`);
32
32
  * sets `p-*` or a border width to make one denser. The rungs are Cortana's three
33
33
  * answer-view callouts, expressed in the Tailwind spacing scale:
34
34
  *
35
- * - `lg`: 22px / 24px padding, 3px rule — Cortana's `.answer-copy`.
36
- * - `md`: 18px / 20px padding, 3px rule — Cortana's `.answer-memory`.
37
- * - `sm`: 12px / 14px padding, 2px rule — Cortana's `.answer-note`.
35
+ * - `lg`: 22px / 24px padding, 3px rule: Cortana's `.answer-copy`.
36
+ * - `md`: 18px / 20px padding, 3px rule: Cortana's `.answer-memory`.
37
+ * - `sm`: 12px / 14px padding, 2px rule: Cortana's `.answer-note`.
38
38
  *
39
39
  * Type size and colour are inherited rather than set (only the card foreground is
40
40
  * applied), so a callout in a dense panel and one in an article both read at the
@@ -1 +1 @@
1
- {"version":3,"file":"callout.js","names":["children","createMemo","splitProps","cva","cn","calloutVariants","variants","variant","default","destructive","success","warning","info","size","sm","md","lg","defaultVariants","isRendered","node","trim","isCalloutTitle","getAttribute","Callout","props","local","rest","resolved","titleOnly","nodes","toArray","filter","length","_el$","_tmpl$","_$spread","_$mergeProps","undefined","class","_$insert","CalloutTitle","_el$2","_tmpl$2"],"sources":["../../../../src/components/ui/callout/callout.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { children, createMemo, splitProps } from 'solid-js'\nimport { cva, type VariantProps } from '#lib/variants'\nimport { cn } from '#lib/utils'\n\n/**\n * Callout.\n *\n * A quiet aside that belongs to the content around it: the summary at the top of\n * an answer, a note in documentation, a remembered fact beside the reply that\n * used it. It is a card-coloured block with one rule on its start edge, and\n * nothing about it interrupts the reader.\n *\n * That is the difference from `Alert`. An `Alert` is a message about the state of\n * the surface it sits in — a failed sync, a validation summary — so it is always\n * `role=\"alert\"`, a live announcement, with a tone glyph and a tinted status\n * surface. A callout is static page content: a plain `div` with `role=\"note\"`, no\n * live region, no icon, and no tint. A caller whose note really is a status\n * message uses `Alert`; one whose note needs a different landmark role passes\n * `role`. Reach for `Card` when the block is a self-contained object with its own\n * header, content and footer; a callout has no parts beyond an optional\n * `CalloutTitle`.\n *\n * The rule is the only thing that varies by `variant`: `default` is the accent\n * (`--primary`), and the four status hues use the same tokens `Alert` does. The\n * rule is a logical `border-s-*`, so it moves to the right in RTL. The corners\n * stay square because a rounded box would curve the rule into a crescent.\n *\n * `size` is the padding rung and the rule's weight together, so a caller never\n * sets `p-*` or a border width to make one denser. The rungs are Cortana's three\n * answer-view callouts, expressed in the Tailwind spacing scale:\n *\n * - `lg`: 22px / 24px padding, 3px rule — Cortana's `.answer-copy`.\n * - `md`: 18px / 20px padding, 3px rule — Cortana's `.answer-memory`.\n * - `sm`: 12px / 14px padding, 2px rule — Cortana's `.answer-note`.\n *\n * Type size and colour are inherited rather than set (only the card foreground is\n * applied), so a callout in a dense panel and one in an article both read at the\n * size of the text around them.\n *\n * Text that has no break opportunity (a 200-character token, a URL, a file path)\n * wraps with `overflow-wrap: anywhere` rather than overflowing the box. `anywhere`\n * and not `break-word`, because only `anywhere` lowers the box's min-content width:\n * a callout that is a flex or grid item (auto minimum size) then shrinks to its\n * track instead of stretching it. The callout's own padding, rule and width are\n * untouched, so none of its sizing differs from Cortana's.\n *\n * The block is deliberately not a flex or grid container: its children are inline\n * text, links and code, and a flex root would turn each of those into a separate\n * item and break the line.\n */\nexport const calloutVariants = cva(\n 'bg-card text-card-foreground block rounded-none wrap-anywhere',\n {\n variants: {\n variant: {\n default: 'border-s-primary',\n destructive: 'border-s-destructive',\n success: 'border-s-success',\n warning: 'border-s-warning',\n info: 'border-s-info',\n },\n size: {\n /** 12px block / 14px inline padding, 2px rule: a short inline note. */\n sm: 'border-s-2 px-3.5 py-3',\n /** 18px block / 20px inline padding, 3px rule: a supporting aside. */\n md: 'border-s-3 px-5 py-4.5',\n /** 22px block / 24px inline padding, 3px rule: the lead summary of a view. */\n lg: 'border-s-3 px-6 py-5.5',\n },\n },\n defaultVariants: { variant: 'default', size: 'md' },\n }\n)\n\nexport type CalloutProps = ComponentProps<'div'> & VariantProps<typeof calloutVariants>\n\nconst isRendered = (node: unknown) =>\n node != null && typeof node !== 'boolean' && (typeof node !== 'string' || node.trim() !== '')\n\nconst isCalloutTitle = (node: unknown) =>\n typeof node === 'object' &&\n node !== null &&\n 'getAttribute' in node &&\n typeof node.getAttribute === 'function' &&\n node.getAttribute('data-slot') === 'callout-title'\n\nexport function Callout(props: CalloutProps) {\n const [local, rest] = splitProps(props, ['class', 'variant', 'size', 'children'])\n const resolved = children(() => local.children)\n // CSS cannot see text nodes, so the callout looks at what it renders and marks a\n // title with nothing after it. The title reads the mark to drop its bottom margin.\n const titleOnly = createMemo(() => {\n const nodes = resolved.toArray().filter(isRendered)\n return nodes.length === 1 && isCalloutTitle(nodes[0])\n })\n return (\n <div\n data-slot=\"callout\"\n data-title-only={titleOnly() ? '' : undefined}\n role=\"note\"\n class={cn(calloutVariants({ variant: local.variant, size: local.size }), local.class)}\n {...rest}\n >\n {resolved()}\n </div>\n )\n}\n\n/**\n * An optional heading line for the callout. It is a styled `div`, not a heading\n * element: a callout sits inside someone else's outline, and a fixed heading\n * level would break it. Pass `role=\"heading\"` with `aria-level` where the\n * content does belong in the outline.\n *\n * The title carries a 4px (`mb-1`) margin below it, whatever follows: a\n * paragraph, a list, or bare text. CSS cannot see text nodes, so a selector such\n * as `:last-child` or `:only-child` cannot tell `<Title/>text` (needs the gap)\n * from `<Title/>` (needs none), and `not-last:mb-1` silently dropped the gap for\n * bare text, the most common body. So the gap stays the default and the one case\n * that does not want it is detected by `Callout`, which sees its rendered\n * children: a callout whose only child is a title carries `data-title-only`, and\n * the title drops its margin so the block ends at its own padding. A caller never\n * passes `mb-0` for this. Anything else after the title, text included, keeps the\n * gap.\n */\nexport function CalloutTitle(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"callout-title\"\n class={cn('mb-1 font-medium tracking-tight in-data-title-only:mb-0', local.class)}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,IAAaK,kBAAkBF,IAC7B,iEACA;CACEG,UAAU;EACRC,SAAS;GACPC,SAAS;GACTC,aAAa;GACbC,SAAS;GACTC,SAAS;GACTC,MAAM;EACR;EACAC,MAAM;;GAEJC,IAAI;;GAEJC,IAAI;;GAEJC,IAAI;EACN;CACF;CACAC,iBAAiB;EAAEV,SAAS;EAAWM,MAAM;CAAK;AACpD,CACF;AAIA,IAAMK,cAAcC,SAClBA,QAAQ,QAAQ,OAAOA,SAAS,cAAc,OAAOA,SAAS,YAAYA,KAAKC,KAAK,MAAM;AAE5F,IAAMC,kBAAkBF,SACtB,OAAOA,SAAS,YAChBA,SAAS,QACT,kBAAkBA,QAClB,OAAOA,KAAKG,iBAAiB,cAC7BH,KAAKG,aAAa,WAAW,MAAM;AAErC,SAAgBC,QAAQC,OAAqB;CAC3C,MAAM,CAACC,OAAOC,QAAQxB,WAAWsB,OAAO;EAAC;EAAS;EAAW;EAAQ;CAAU,CAAC;CAChF,MAAMG,WAAW3B,eAAeyB,MAAMzB,QAAQ;CAG9C,MAAM4B,YAAY3B,iBAAiB;EACjC,MAAM4B,QAAQF,SAASG,QAAQ,CAAC,CAACC,OAAOb,UAAU;EAClD,OAAOW,MAAMG,WAAW,KAAKX,eAAeQ,MAAM,EAAE;CACtD,CAAC;CACD,cAAA;EAAA,IAAAI,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA;GAAA,KAAA,qBAAA;IAAA,OAGqBR,UAAU,IAAI,KAAKS,KAAAA;GAAS;GAAA,KAAA,WAAA;IAAA,OAEtCjC,GAAGC,gBAAgB;KAAEE,SAASkB,MAAMlB;KAASM,MAAMY,MAAMZ;IAAK,CAAC,GAAGY,MAAMa,KAAK;GAAC;EAAA,GACjFZ,IAAI,GAAA,OAAA,IAAA;EAAAa,OAAAN,MAEPN,QAAQ;EAAA,OAAAM;CAAA,EAAA,CAAA;AAGf;;;;;;;;;;;;;;;;;;AAmBA,SAAgBO,aAAahB,OAA8B;CACzD,MAAM,CAACC,OAAOC,QAAQxB,WAAWsB,OAAO,CAAC,OAAO,CAAC;CACjD,cAAA;EAAA,IAAAiB,QAAAC,QAAA;EAAAP,OAAAM,OAAAL,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWhC,GAAG,2DAA2DqB,MAAMa,KAAK;EAAC,EAAA,GAC7EZ,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAe;CAAA,EAAA,CAAA;AAGd"}
1
+ {"version":3,"file":"callout.js","names":["children","createMemo","splitProps","cva","cn","calloutVariants","variants","variant","default","destructive","success","warning","info","size","sm","md","lg","defaultVariants","isRendered","node","trim","isCalloutTitle","getAttribute","Callout","props","local","rest","resolved","titleOnly","nodes","toArray","filter","length","_el$","_tmpl$","_$spread","_$mergeProps","undefined","class","_$insert","CalloutTitle","_el$2","_tmpl$2"],"sources":["../../../../src/components/ui/callout/callout.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { children, createMemo, splitProps } from 'solid-js'\nimport { cva, type VariantProps } from '#lib/variants'\nimport { cn } from '#lib/utils'\n\n/**\n * Callout.\n *\n * A quiet aside that belongs to the content around it: the summary at the top of\n * an answer, a note in documentation, a remembered fact beside the reply that\n * used it. It is a card-coloured block with one rule on its start edge, and\n * nothing about it interrupts the reader.\n *\n * That is the difference from `Alert`. An `Alert` is a message about the state of\n * the surface it sits in, a failed sync, a validation summary, so it is always\n * `role=\"alert\"`, a live announcement, with a tone glyph and a tinted status\n * surface. A callout is static page content: a plain `div` with `role=\"note\"`, no\n * live region, no icon, and no tint. A caller whose note really is a status\n * message uses `Alert`; one whose note needs a different landmark role passes\n * `role`. Reach for `Card` when the block is a self-contained object with its own\n * header, content and footer; a callout has no parts beyond an optional\n * `CalloutTitle`.\n *\n * The rule is the only thing that varies by `variant`: `default` is the accent\n * (`--primary`), and the four status hues use the same tokens `Alert` does. The\n * rule is a logical `border-s-*`, so it moves to the right in RTL. The corners\n * stay square because a rounded box would curve the rule into a crescent.\n *\n * `size` is the padding rung and the rule's weight together, so a caller never\n * sets `p-*` or a border width to make one denser. The rungs are Cortana's three\n * answer-view callouts, expressed in the Tailwind spacing scale:\n *\n * - `lg`: 22px / 24px padding, 3px rule: Cortana's `.answer-copy`.\n * - `md`: 18px / 20px padding, 3px rule: Cortana's `.answer-memory`.\n * - `sm`: 12px / 14px padding, 2px rule: Cortana's `.answer-note`.\n *\n * Type size and colour are inherited rather than set (only the card foreground is\n * applied), so a callout in a dense panel and one in an article both read at the\n * size of the text around them.\n *\n * Text that has no break opportunity (a 200-character token, a URL, a file path)\n * wraps with `overflow-wrap: anywhere` rather than overflowing the box. `anywhere`\n * and not `break-word`, because only `anywhere` lowers the box's min-content width:\n * a callout that is a flex or grid item (auto minimum size) then shrinks to its\n * track instead of stretching it. The callout's own padding, rule and width are\n * untouched, so none of its sizing differs from Cortana's.\n *\n * The block is deliberately not a flex or grid container: its children are inline\n * text, links and code, and a flex root would turn each of those into a separate\n * item and break the line.\n */\nexport const calloutVariants = cva(\n 'bg-card text-card-foreground block rounded-none wrap-anywhere',\n {\n variants: {\n variant: {\n default: 'border-s-primary',\n destructive: 'border-s-destructive',\n success: 'border-s-success',\n warning: 'border-s-warning',\n info: 'border-s-info',\n },\n size: {\n /** 12px block / 14px inline padding, 2px rule: a short inline note. */\n sm: 'border-s-2 px-3.5 py-3',\n /** 18px block / 20px inline padding, 3px rule: a supporting aside. */\n md: 'border-s-3 px-5 py-4.5',\n /** 22px block / 24px inline padding, 3px rule: the lead summary of a view. */\n lg: 'border-s-3 px-6 py-5.5',\n },\n },\n defaultVariants: { variant: 'default', size: 'md' },\n }\n)\n\nexport type CalloutProps = ComponentProps<'div'> & VariantProps<typeof calloutVariants>\n\nconst isRendered = (node: unknown) =>\n node != null && typeof node !== 'boolean' && (typeof node !== 'string' || node.trim() !== '')\n\nconst isCalloutTitle = (node: unknown) =>\n typeof node === 'object' &&\n node !== null &&\n 'getAttribute' in node &&\n typeof node.getAttribute === 'function' &&\n node.getAttribute('data-slot') === 'callout-title'\n\nexport function Callout(props: CalloutProps) {\n const [local, rest] = splitProps(props, ['class', 'variant', 'size', 'children'])\n const resolved = children(() => local.children)\n // CSS cannot see text nodes, so the callout looks at what it renders and marks a\n // title with nothing after it. The title reads the mark to drop its bottom margin.\n const titleOnly = createMemo(() => {\n const nodes = resolved.toArray().filter(isRendered)\n return nodes.length === 1 && isCalloutTitle(nodes[0])\n })\n return (\n <div\n data-slot=\"callout\"\n data-title-only={titleOnly() ? '' : undefined}\n role=\"note\"\n class={cn(calloutVariants({ variant: local.variant, size: local.size }), local.class)}\n {...rest}\n >\n {resolved()}\n </div>\n )\n}\n\n/**\n * An optional heading line for the callout. It is a styled `div`, not a heading\n * element: a callout sits inside someone else's outline, and a fixed heading\n * level would break it. Pass `role=\"heading\"` with `aria-level` where the\n * content does belong in the outline.\n *\n * The title carries a 4px (`mb-1`) margin below it, whatever follows: a\n * paragraph, a list, or bare text. CSS cannot see text nodes, so a selector such\n * as `:last-child` or `:only-child` cannot tell `<Title/>text` (needs the gap)\n * from `<Title/>` (needs none), and `not-last:mb-1` silently dropped the gap for\n * bare text, the most common body. So the gap stays the default and the one case\n * that does not want it is detected by `Callout`, which sees its rendered\n * children: a callout whose only child is a title carries `data-title-only`, and\n * the title drops its margin so the block ends at its own padding. A caller never\n * passes `mb-0` for this. Anything else after the title, text included, keeps the\n * gap.\n */\nexport function CalloutTitle(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"callout-title\"\n class={cn('mb-1 font-medium tracking-tight in-data-title-only:mb-0', local.class)}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,IAAaK,kBAAkBF,IAC7B,iEACA;CACEG,UAAU;EACRC,SAAS;GACPC,SAAS;GACTC,aAAa;GACbC,SAAS;GACTC,SAAS;GACTC,MAAM;EACR;EACAC,MAAM;;GAEJC,IAAI;;GAEJC,IAAI;;GAEJC,IAAI;EACN;CACF;CACAC,iBAAiB;EAAEV,SAAS;EAAWM,MAAM;CAAK;AACpD,CACF;AAIA,IAAMK,cAAcC,SAClBA,QAAQ,QAAQ,OAAOA,SAAS,cAAc,OAAOA,SAAS,YAAYA,KAAKC,KAAK,MAAM;AAE5F,IAAMC,kBAAkBF,SACtB,OAAOA,SAAS,YAChBA,SAAS,QACT,kBAAkBA,QAClB,OAAOA,KAAKG,iBAAiB,cAC7BH,KAAKG,aAAa,WAAW,MAAM;AAErC,SAAgBC,QAAQC,OAAqB;CAC3C,MAAM,CAACC,OAAOC,QAAQxB,WAAWsB,OAAO;EAAC;EAAS;EAAW;EAAQ;CAAU,CAAC;CAChF,MAAMG,WAAW3B,eAAeyB,MAAMzB,QAAQ;CAG9C,MAAM4B,YAAY3B,iBAAiB;EACjC,MAAM4B,QAAQF,SAASG,QAAQ,CAAC,CAACC,OAAOb,UAAU;EAClD,OAAOW,MAAMG,WAAW,KAAKX,eAAeQ,MAAM,EAAE;CACtD,CAAC;CACD,cAAA;EAAA,IAAAI,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA;GAAA,KAAA,qBAAA;IAAA,OAGqBR,UAAU,IAAI,KAAKS,KAAAA;GAAS;GAAA,KAAA,WAAA;IAAA,OAEtCjC,GAAGC,gBAAgB;KAAEE,SAASkB,MAAMlB;KAASM,MAAMY,MAAMZ;IAAK,CAAC,GAAGY,MAAMa,KAAK;GAAC;EAAA,GACjFZ,IAAI,GAAA,OAAA,IAAA;EAAAa,OAAAN,MAEPN,QAAQ;EAAA,OAAAM;CAAA,EAAA,CAAA;AAGf;;;;;;;;;;;;;;;;;;AAmBA,SAAgBO,aAAahB,OAA8B;CACzD,MAAM,CAACC,OAAOC,QAAQxB,WAAWsB,OAAO,CAAC,OAAO,CAAC;CACjD,cAAA;EAAA,IAAAiB,QAAAC,QAAA;EAAAP,OAAAM,OAAAL,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWhC,GAAG,2DAA2DqB,MAAMa,KAAK;EAAC,EAAA,GAC7EZ,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAe;CAAA,EAAA,CAAA;AAGd"}
@@ -3,8 +3,8 @@ import { type VariantProps } from '#lib/variants';
3
3
  /**
4
4
  * Card.
5
5
  *
6
- * A surface that sits on the canvas. Every card carries its own edge — a
7
- * border — because in the light theme `--card` is one faint step off a white
6
+ * A surface that sits on the canvas. Every card carries its own edge, a
7
+ * border, because in the light theme `--card` is one faint step off a white
8
8
  * `--background`, and a borderless card there all but disappears. Making the border
9
9
  * structural rather than optional is what stops one app's cards from reading
10
10
  * as floating panels and another's as nothing at all.
@@ -14,8 +14,8 @@ var _tmpl$7 = /*#__PURE__*/ template(`<div data-slot=card-footer>`);
14
14
  /**
15
15
  * Card.
16
16
  *
17
- * A surface that sits on the canvas. Every card carries its own edge — a
18
- * border — because in the light theme `--card` is one faint step off a white
17
+ * A surface that sits on the canvas. Every card carries its own edge, a
18
+ * border, because in the light theme `--card` is one faint step off a white
19
19
  * `--background`, and a borderless card there all but disappears. Making the border
20
20
  * structural rather than optional is what stops one app's cards from reading
21
21
  * as floating panels and another's as nothing at all.