@adea-ai/ui 0.152.3 → 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
@@ -12,8 +12,8 @@ var _tmpl$3 = /*#__PURE__*/ template(`<div>`);
12
12
  var _tmpl$4 = /*#__PURE__*/ template(`<fieldset>`);
13
13
  var _tmpl$5 = /*#__PURE__*/ template(`<div data-slot=field-group>`);
14
14
  var _tmpl$6 = /*#__PURE__*/ template(`<legend>`);
15
- var _tmpl$7 = /*#__PURE__*/ template(`<span class="text-muted-foreground text-2xs tracking-wide uppercase">`);
16
- var _tmpl$8 = /*#__PURE__*/ template(`<div><span class="bg-border h-px flex-1"></span><span class="bg-border h-px flex-1">`);
15
+ var _tmpl$7 = /*#__PURE__*/ template(`<div><span class="bg-border h-px flex-1"></span><span class="bg-border h-px flex-1">`);
16
+ var _tmpl$8 = /*#__PURE__*/ template(`<span class="text-muted-foreground text-2xs tracking-wide uppercase">`);
17
17
  /**
18
18
  * Field.
19
19
  *
@@ -76,22 +76,22 @@ function FormField(props) {
76
76
  get when() {
77
77
  return local.hint;
78
78
  },
79
- get children() {
79
+ children: (hintSlot) => (() => {
80
80
  var _el$ = _tmpl$();
81
81
  setAttribute(_el$, "id", descriptionId);
82
- insert(_el$, () => local.hint);
82
+ insert(_el$, hintSlot);
83
83
  return _el$;
84
- }
84
+ })()
85
85
  }), createComponent(Show, {
86
86
  get when() {
87
87
  return local.error;
88
88
  },
89
- get children() {
89
+ children: (errorSlot) => (() => {
90
90
  var _el$2 = _tmpl$2();
91
91
  setAttribute(_el$2, "id", errorId);
92
- insert(_el$2, () => local.error);
92
+ insert(_el$2, errorSlot);
93
93
  return _el$2;
94
- }
94
+ })()
95
95
  })];
96
96
  return createComponent(FormFieldContext.Provider, {
97
97
  value: field,
@@ -215,7 +215,7 @@ function FieldLegend(props) {
215
215
  function FieldSeparator(props) {
216
216
  const [local, rest] = splitProps(props, ["class", "children"]);
217
217
  return (() => {
218
- var _el$7 = _tmpl$8(), _el$0 = _el$7.firstChild.nextSibling;
218
+ var _el$7 = _tmpl$7(), _el$9 = _el$7.firstChild.nextSibling;
219
219
  spread(_el$7, mergeProps({ get ["class"]() {
220
220
  return cn("relative flex items-center gap-3 py-1", local.class);
221
221
  } }, rest), false, true);
@@ -223,12 +223,12 @@ function FieldSeparator(props) {
223
223
  get when() {
224
224
  return local.children;
225
225
  },
226
- get children() {
227
- var _el$9 = _tmpl$7();
228
- insert(_el$9, () => local.children);
229
- return _el$9;
230
- }
231
- }), _el$0);
226
+ children: (childrenSlot) => (() => {
227
+ var _el$0 = _tmpl$8();
228
+ insert(_el$0, childrenSlot);
229
+ return _el$0;
230
+ })()
231
+ }), _el$9);
232
232
  return _el$7;
233
233
  })();
234
234
  }
@@ -1 +1 @@
1
- {"version":3,"file":"field.js","names":["KobalteTextField","createUniqueId","Show","splitProps","Label","createFormFieldContext","FormFieldContext","cn","headingVariants","Field","props","local","rest","_$createComponent","_$mergeProps","class","label","hint","error","controlId","group","children","FormField","fieldId","labelId","descriptionId","errorId","field","defaultControlId","help","when","_el$","_tmpl$","_$setAttribute","_$insert","_el$2","_tmpl$2","Provider","value","_el$3","_tmpl$3","_$spread","_c$","_$memo","FieldSet","describedBy","invalid","undefined","FieldLegend","id","variant","FieldLabel","FieldDescription","Description","FieldError","ErrorMessage","FieldInput","Input","FieldTextArea","TextArea","_el$4","_tmpl$4","columns","FieldGroup","_el$5","_tmpl$5","_el$6","_tmpl$6","size","FieldSeparator","_el$7","_tmpl$8","firstChild","_el$0","nextSibling","_el$9","_tmpl$7"],"sources":["../../../../src/components/ui/field/field.tsx"],"sourcesContent":["import { TextField as KobalteTextField } from '@kobalte/core/text-field'\nimport type { ComponentProps, JSX } from 'solid-js'\nimport { createUniqueId, Show, splitProps } from 'solid-js'\nimport { Label } from '../label'\nimport { createFormFieldContext, FormFieldContext } from '#lib/form-field'\nimport { cn } from '#lib/utils'\nimport { headingVariants } from '../typography'\n\n/**\n * Field.\n *\n * The wrapper that makes a form control describable and validatable: a label,\n * a description, an error message, and the ARIA relationships between them.\n *\n * This Kobalte TextField composition is for its own `FieldLabel`, `FieldInput`\n * and `FieldTextArea` parts. Use `FormField` to wire the standalone shared\n * controls, including checkboxes, switches and comboboxes.\n *\n * It is built on Kobalte's TextField specifically so `aria-describedby`,\n * `aria-invalid` and `aria-errormessage` are wired by construction. Those three\n * attributes are the difference between \"this field is required and empty\" and\n * a red border that only a sighted user can perceive — and they are also the\n * first thing a hand-rolled form drops.\n *\n * `Field` owns the description and the error slot, so its controls line up and\n * its messages land in the same place regardless of which TextField part is used.\n */\nexport function Field(props: ComponentProps<typeof KobalteTextField>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteTextField class={cn('flex flex-col gap-1.5', local.class)} {...rest} />\n}\n\nexport type FormFieldProps = Omit<ComponentProps<'div'>, 'children' | 'ref'> & {\n label: string\n hint?: string\n error?: string\n controlId?: string\n group?: boolean\n children: JSX.Element\n}\n\n/**\n * FormField.\n *\n * A shared label, help and validation wrapper for any one shared control. Its\n * context is consumed by Input, Textarea, NativeSelect, Checkbox, Switch,\n * RadioGroup and ComboboxInput, so the actual focusable element receives the\n * generated ID and description relationships. Set `group` when the label names\n * a set of controls; the wrapper then uses fieldset and legend semantics.\n */\nexport function FormField(props: FormFieldProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'label',\n 'hint',\n 'error',\n 'controlId',\n 'group',\n 'children',\n ])\n const fieldId = createUniqueId()\n const labelId = `${fieldId}-label`\n const descriptionId = `${fieldId}-description`\n const errorId = `${fieldId}-error`\n const field = createFormFieldContext({\n controlId: local.controlId,\n defaultControlId: fieldId,\n labelId,\n descriptionId,\n errorId,\n hint: () => local.hint,\n error: () => local.error,\n group: () => local.group ?? false,\n })\n const help = () => (\n <>\n <Show when={local.hint}>\n <p id={descriptionId} class=\"text-muted-foreground text-sm\">\n {local.hint}\n </p>\n </Show>\n <Show when={local.error}>\n <p id={errorId} role=\"alert\" class=\"text-foreground text-sm\">\n {local.error}\n </p>\n </Show>\n </>\n )\n\n return (\n <FormFieldContext.Provider value={field}>\n <div class={cn('flex flex-col gap-1.5', local.class)} {...rest}>\n {local.group ? (\n <FieldSet\n class=\"flex flex-col gap-1.5\"\n aria-describedby={field.describedBy()}\n aria-invalid={field.invalid() || undefined}\n >\n <FieldLegend id={labelId} variant=\"label\">\n {local.label}\n </FieldLegend>\n {local.children}\n {help()}\n </FieldSet>\n ) : (\n <>\n <Label id={labelId} for={field.controlId()}>\n {local.label}\n </Label>\n {local.children}\n {help()}\n </>\n )}\n </div>\n </FormFieldContext.Provider>\n )\n}\n\nexport function FieldLabel(props: ComponentProps<typeof KobalteTextField.Label>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteTextField.Label class={cn('text-sm leading-none font-medium', local.class)} {...rest} />\n )\n}\n\nexport function FieldDescription(props: ComponentProps<typeof KobalteTextField.Description>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteTextField.Description\n class={cn('text-muted-foreground text-sm', local.class)}\n {...rest}\n />\n )\n}\n\nexport function FieldError(props: ComponentProps<typeof KobalteTextField.ErrorMessage>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteTextField.ErrorMessage class={cn('text-foreground text-sm', local.class)} {...rest} />\n )\n}\n\nexport function FieldInput(props: ComponentProps<typeof KobalteTextField.Input>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <KobalteTextField.Input\n class={cn(\n 'h-control-md w-full min-w-0 rounded-md border border-input bg-transparent px-control-md py-1 text-sm',\n 'transition-[color,box-shadow,border-color] ease-out outline-none',\n 'placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle',\n 'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function FieldTextArea(props: ComponentProps<typeof KobalteTextField.TextArea>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <KobalteTextField.TextArea\n class={cn(\n 'flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-control-md py-2 text-sm',\n 'transition-[color,box-shadow,border-color] ease-out outline-none resize-y',\n 'placeholder:text-muted-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle',\n 'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/**\n * A labelled group of fields with a single legend, for a real `<fieldset>`.\n * Grouping is what lets a screen reader announce \"Shipping address, group\"\n * before reading the four fields inside it.\n */\nexport function FieldSet(props: ComponentProps<'fieldset'>) {\n const [local, rest] = splitProps(props, ['class'])\n return <fieldset class={cn('flex flex-col gap-4', local.class)} {...rest} />\n}\n\nexport type FieldGroupProps = ComponentProps<'div'> & {\n /**\n * `2` lays the fields out in two columns from the `sm` breakpoint up — a\n * short form of paired values (host and port, a name and a model). A field\n * that needs the full width says `class=\"col-span-full\"`. Below `sm` it is\n * one column again, because two inputs side by side on a phone are each too\n * narrow to read.\n *\n * `3` is the same grid with three columns from `sm`, for a row of short values\n * (a trio of limits, a day count and two thresholds). Each column is a third of\n * the group, so reach for `2` when a field holds a path, a URL or a sentence.\n */\n columns?: 1 | 2 | 3\n}\n\n/** A visual stack for related controls that does not imply fieldset semantics. */\nexport function FieldGroup(props: FieldGroupProps) {\n const [local, rest] = splitProps(props, ['class', 'columns'])\n return (\n <div\n data-slot=\"field-group\"\n class={cn(\n {\n 'grid gap-4 sm:grid-cols-2': local.columns === 2,\n 'grid gap-4 sm:grid-cols-3': local.columns === 3,\n 'flex flex-col gap-4': local.columns !== 2 && local.columns !== 3,\n },\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function FieldLegend(props: ComponentProps<'legend'> & { variant?: 'legend' | 'label' }) {\n const [local, rest] = splitProps(props, ['class', 'variant'])\n return (\n <legend\n class={cn(\n 'mb-1',\n local.variant === 'label' ? 'text-sm font-medium' : headingVariants({ size: 'card' }),\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/** A horizontal rule with a word in it, for \"or continue with\" separators. */\nexport function FieldSeparator(props: {\n class?: string\n children?: ComponentProps<'span'>['children']\n}) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <div class={cn('relative flex items-center gap-3 py-1', local.class)} {...rest}>\n <span class=\"bg-border h-px flex-1\" />\n <Show when={local.children}>\n <span class=\"text-muted-foreground text-2xs tracking-wide uppercase\">{local.children}</span>\n </Show>\n <span class=\"bg-border h-px flex-1\" />\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,SAAgBS,MAAMC,OAAgD;CACpE,MAAM,CAACC,OAAOC,QAAQT,WAAWO,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBAAQb,WAAgBc,WAAA,EAAA,KAAA,WAAA;EAAA,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createUniqueId","Show","splitProps","Label","createFormFieldContext","FormFieldContext","cn","headingVariants","Field","props","local","rest","_$createComponent","_$mergeProps","class","label","hint","error","controlId","group","children","FormField","fieldId","labelId","descriptionId","errorId","field","defaultControlId","help","when","hintSlot","_el$","_tmpl$","_$setAttribute","_$insert","errorSlot","_el$2","_tmpl$2","Provider","value","_el$3","_tmpl$3","_$spread","_c$","_$memo","FieldSet","describedBy","invalid","undefined","FieldLegend","id","variant","FieldLabel","FieldDescription","Description","FieldError","ErrorMessage","FieldInput","Input","FieldTextArea","TextArea","_el$4","_tmpl$4","columns","FieldGroup","_el$5","_tmpl$5","_el$6","_tmpl$6","size","FieldSeparator","_el$7","_tmpl$7","firstChild","_el$9","nextSibling","childrenSlot","_el$0","_tmpl$8"],"sources":["../../../../src/components/ui/field/field.tsx"],"sourcesContent":["import { TextField as KobalteTextField } from '@kobalte/core/text-field'\nimport type { ComponentProps, JSX } from 'solid-js'\nimport { createUniqueId, Show, splitProps } from 'solid-js'\nimport { Label } from '../label'\nimport { createFormFieldContext, FormFieldContext } from '#lib/form-field'\nimport { cn } from '#lib/utils'\nimport { headingVariants } from '../typography'\n\n/**\n * Field.\n *\n * The wrapper that makes a form control describable and validatable: a label,\n * a description, an error message, and the ARIA relationships between them.\n *\n * This Kobalte TextField composition is for its own `FieldLabel`, `FieldInput`\n * and `FieldTextArea` parts. Use `FormField` to wire the standalone shared\n * controls, including checkboxes, switches and comboboxes.\n *\n * It is built on Kobalte's TextField specifically so `aria-describedby`,\n * `aria-invalid` and `aria-errormessage` are wired by construction. Those three\n * attributes are the difference between \"this field is required and empty\" and\n * a red border that only a sighted user can perceive — and they are also the\n * first thing a hand-rolled form drops.\n *\n * `Field` owns the description and the error slot, so its controls line up and\n * its messages land in the same place regardless of which TextField part is used.\n */\nexport function Field(props: ComponentProps<typeof KobalteTextField>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteTextField class={cn('flex flex-col gap-1.5', local.class)} {...rest} />\n}\n\nexport type FormFieldProps = Omit<ComponentProps<'div'>, 'children' | 'ref'> & {\n label: string\n hint?: string\n error?: string\n controlId?: string\n group?: boolean\n children: JSX.Element\n}\n\n/**\n * FormField.\n *\n * A shared label, help and validation wrapper for any one shared control. Its\n * context is consumed by Input, Textarea, NativeSelect, Checkbox, Switch,\n * RadioGroup and ComboboxInput, so the actual focusable element receives the\n * generated ID and description relationships. Set `group` when the label names\n * a set of controls; the wrapper then uses fieldset and legend semantics.\n */\nexport function FormField(props: FormFieldProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'label',\n 'hint',\n 'error',\n 'controlId',\n 'group',\n 'children',\n ])\n const fieldId = createUniqueId()\n const labelId = `${fieldId}-label`\n const descriptionId = `${fieldId}-description`\n const errorId = `${fieldId}-error`\n const field = createFormFieldContext({\n controlId: local.controlId,\n defaultControlId: fieldId,\n labelId,\n descriptionId,\n errorId,\n hint: () => local.hint,\n error: () => local.error,\n group: () => local.group ?? false,\n })\n const help = () => (\n <>\n <Show when={local.hint}>\n {(hintSlot) => (\n <p id={descriptionId} class=\"text-muted-foreground text-sm\">\n {hintSlot()}\n </p>\n )}\n </Show>\n <Show when={local.error}>\n {(errorSlot) => (\n <p id={errorId} role=\"alert\" class=\"text-foreground text-sm\">\n {errorSlot()}\n </p>\n )}\n </Show>\n </>\n )\n\n return (\n <FormFieldContext.Provider value={field}>\n <div class={cn('flex flex-col gap-1.5', local.class)} {...rest}>\n {local.group ? (\n <FieldSet\n class=\"flex flex-col gap-1.5\"\n aria-describedby={field.describedBy()}\n aria-invalid={field.invalid() || undefined}\n >\n <FieldLegend id={labelId} variant=\"label\">\n {local.label}\n </FieldLegend>\n {local.children}\n {help()}\n </FieldSet>\n ) : (\n <>\n <Label id={labelId} for={field.controlId()}>\n {local.label}\n </Label>\n {local.children}\n {help()}\n </>\n )}\n </div>\n </FormFieldContext.Provider>\n )\n}\n\nexport function FieldLabel(props: ComponentProps<typeof KobalteTextField.Label>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteTextField.Label class={cn('text-sm leading-none font-medium', local.class)} {...rest} />\n )\n}\n\nexport function FieldDescription(props: ComponentProps<typeof KobalteTextField.Description>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteTextField.Description\n class={cn('text-muted-foreground text-sm', local.class)}\n {...rest}\n />\n )\n}\n\nexport function FieldError(props: ComponentProps<typeof KobalteTextField.ErrorMessage>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteTextField.ErrorMessage class={cn('text-foreground text-sm', local.class)} {...rest} />\n )\n}\n\nexport function FieldInput(props: ComponentProps<typeof KobalteTextField.Input>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <KobalteTextField.Input\n class={cn(\n 'h-control-md w-full min-w-0 rounded-md border border-input bg-transparent px-control-md py-1 text-sm',\n 'transition-[color,box-shadow,border-color] ease-out outline-none',\n 'placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle',\n 'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function FieldTextArea(props: ComponentProps<typeof KobalteTextField.TextArea>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <KobalteTextField.TextArea\n class={cn(\n 'flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-control-md py-2 text-sm',\n 'transition-[color,box-shadow,border-color] ease-out outline-none resize-y',\n 'placeholder:text-muted-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle',\n 'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/**\n * A labelled group of fields with a single legend, for a real `<fieldset>`.\n * Grouping is what lets a screen reader announce \"Shipping address, group\"\n * before reading the four fields inside it.\n */\nexport function FieldSet(props: ComponentProps<'fieldset'>) {\n const [local, rest] = splitProps(props, ['class'])\n return <fieldset class={cn('flex flex-col gap-4', local.class)} {...rest} />\n}\n\nexport type FieldGroupProps = ComponentProps<'div'> & {\n /**\n * `2` lays the fields out in two columns from the `sm` breakpoint up — a\n * short form of paired values (host and port, a name and a model). A field\n * that needs the full width says `class=\"col-span-full\"`. Below `sm` it is\n * one column again, because two inputs side by side on a phone are each too\n * narrow to read.\n *\n * `3` is the same grid with three columns from `sm`, for a row of short values\n * (a trio of limits, a day count and two thresholds). Each column is a third of\n * the group, so reach for `2` when a field holds a path, a URL or a sentence.\n */\n columns?: 1 | 2 | 3\n}\n\n/** A visual stack for related controls that does not imply fieldset semantics. */\nexport function FieldGroup(props: FieldGroupProps) {\n const [local, rest] = splitProps(props, ['class', 'columns'])\n return (\n <div\n data-slot=\"field-group\"\n class={cn(\n {\n 'grid gap-4 sm:grid-cols-2': local.columns === 2,\n 'grid gap-4 sm:grid-cols-3': local.columns === 3,\n 'flex flex-col gap-4': local.columns !== 2 && local.columns !== 3,\n },\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function FieldLegend(props: ComponentProps<'legend'> & { variant?: 'legend' | 'label' }) {\n const [local, rest] = splitProps(props, ['class', 'variant'])\n return (\n <legend\n class={cn(\n 'mb-1',\n local.variant === 'label' ? 'text-sm font-medium' : headingVariants({ size: 'card' }),\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/** A horizontal rule with a word in it, for \"or continue with\" separators. */\nexport function FieldSeparator(props: {\n class?: string\n children?: ComponentProps<'span'>['children']\n}) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <div class={cn('relative flex items-center gap-3 py-1', local.class)} {...rest}>\n <span class=\"bg-border h-px flex-1\" />\n <Show when={local.children}>\n {(childrenSlot) => (\n <span class=\"text-muted-foreground text-2xs tracking-wide uppercase\">\n {childrenSlot()}\n </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BAE3EX,MAAI;GAAA,IAAC4B,OAAI;IAAA,OAAEnB,MAAMU;GAAQ;GAAAA,WACtBwD,wBAAY;IAAA,IAAAC,QAAAC,QAAA;IAAA5C,OAAA2C,OAETD,YAAY;IAAA,OAAAC;GAAA,EAAA,CAAA;EAEhB,CAAA,GAAAH,KAAA;EAAA,OAAAH;CAAA,EAAA,CAAA;AAKT"}
@@ -43,7 +43,7 @@ export type NumberFieldProps = NumberFieldBaseProps & ({
43
43
  * A controlled numeric field that keeps an editable draft while validating
44
44
  * range, integer and step constraints. Invalid drafts are announced and restored
45
45
  * to the latest controlled value when focus leaves the input, so `onChange`
46
- * only ever receives a value the field accepts — a caller never needs a
46
+ * only ever receives a value the field accepts, a caller never needs a
47
47
  * `Number(value) || fallback` of its own. With `optional`, blank is accepted and
48
48
  * reported as `null`.
49
49
  */
@@ -8,7 +8,7 @@ var text = (value) => value === null ? "" : String(value);
8
8
  * A controlled numeric field that keeps an editable draft while validating
9
9
  * range, integer and step constraints. Invalid drafts are announced and restored
10
10
  * to the latest controlled value when focus leaves the input, so `onChange`
11
- * only ever receives a value the field accepts — a caller never needs a
11
+ * only ever receives a value the field accepts, a caller never needs a
12
12
  * `Number(value) || fallback` of its own. With `optional`, blank is accepted and
13
13
  * reported as `null`.
14
14
  */
@@ -1 +1 @@
1
- {"version":3,"file":"number-field.js","names":["createEffect","createSignal","FormField","Input","label","hint","min","max","step","integer","disabled","class","onBlur","optional","value","onChange","text","String","NumberField","props","draft","setDraft","error","setError","undefined","Number","isInteger","validate","raw","badInput","next","isFinite","steps","Math","abs","round","_$createComponent","children","type","required","onInput","event","currentTarget","validity","nextError"],"sources":["../../../../src/components/ui/field/number-field.tsx"],"sourcesContent":["import { createEffect, createSignal, type JSX } from 'solid-js'\nimport { FormField } from './field'\nimport { Input } from '../input'\n\ntype NumberFieldBaseProps = {\n label: string\n hint?: string\n min: number\n max: number\n /**\n * The increment of the spinner and the arrow keys, and the grid a typed value\n * must sit on: `min` plus a whole number of steps. Use it for stepped or\n * fractional values (`0.05` for a 0-1 score, `5` for a percentage in fives).\n * Without it a field steps by 1, or by `any` when `integer` is `false`, which\n * accepts every decimal but leaves the spinner moving in whole numbers.\n */\n step?: number\n /**\n * Whether only whole numbers are valid. It defaults to `true`, or, when a\n * `step` is given, to whether both the step and its base `min` are whole\n * numbers, so `step={0.05}` accepts decimals without also saying\n * `integer={false}`, and `min={0.5} step={1}` accepts 0.5, 1.5, 2.5.\n */\n integer?: boolean\n /** Locks the input; a locked field keeps its value and reports nothing. */\n disabled?: boolean\n class?: string\n onBlur?: JSX.EventHandler<HTMLInputElement, FocusEvent>\n}\n\nexport type NumberFieldProps = NumberFieldBaseProps &\n (\n | {\n optional?: false\n value: number\n onChange: (value: number) => void\n }\n | {\n /**\n * Lets the field be left blank: a blank field is valid and reports `null`,\n * and a `null` value shows a blank field. Use it for a limit that falls\n * back to a default when unset, so a caller never maps `''` to\n * `undefined` of its own.\n */\n optional: true\n value: number | null\n onChange: (value: number | null) => void\n }\n )\n\nconst text = (value: number | null) => (value === null ? '' : String(value))\n\n/**\n * A controlled numeric field that keeps an editable draft while validating\n * range, integer and step constraints. Invalid drafts are announced and restored\n * to the latest controlled value when focus leaves the input, so `onChange`\n * only ever receives a value the field accepts — a caller never needs a\n * `Number(value) || fallback` of its own. With `optional`, blank is accepted and\n * reported as `null`.\n */\nexport function NumberField(props: NumberFieldProps) {\n const [draft, setDraft] = createSignal(text(props.value))\n const [error, setError] = createSignal('')\n // Whole numbers only when nothing on the grid is fractional: a whole step from\n // a fractional `min` (0.5, 1.5, 2.5) puts the spinner's own values off the\n // integers, so inference needs the step and its base to both be whole.\n const integer = () =>\n props.integer ??\n (props.step === undefined || (Number.isInteger(props.step) && Number.isInteger(props.min)))\n\n createEffect(() => {\n setDraft(text(props.value))\n })\n\n // A number input reports '' both when it is empty and when it holds text it cannot parse\n // (\"abc\", \"-\", \"1e\"); only `validity.badInput` tells them apart, and a bad draft must never\n // count as blank (it would report `null` and clear the limit).\n const validate = (raw: string, badInput: boolean) => {\n if (badInput) return `${props.label} must be a valid number.`\n if (!raw) return props.optional ? '' : `${props.label} is required.`\n const next = Number(raw)\n if (!Number.isFinite(next)) return `${props.label} must be a valid number.`\n if (integer() && !Number.isInteger(next)) {\n return `${props.label} must be a whole number.`\n }\n if (next < props.min || next > props.max) {\n return `${props.label} must be between ${props.min} and ${props.max}.`\n }\n if (props.step !== undefined && props.step > 0) {\n // Compare in whole steps with a tolerance: 0.15 / 0.05 is 3.0000000000000004,\n // and rejecting it would make the spinner's own values invalid.\n const steps = (next - props.min) / props.step\n if (Math.abs(steps - Math.round(steps)) > 1e-9) {\n return props.min === 0\n ? `${props.label} must be a multiple of ${props.step}.`\n : `${props.label} must be ${props.min} plus a multiple of ${props.step}.`\n }\n }\n return ''\n }\n\n return (\n <FormField label={props.label} hint={props.hint} error={error()} class={props.class}>\n <Input\n type=\"number\"\n value={draft()}\n min={props.min}\n max={props.max}\n step={props.step ?? (integer() ? 1 : 'any')}\n required={!props.optional}\n disabled={props.disabled}\n onInput={(event) => {\n const raw = event.currentTarget.value\n // Read before touching the draft: writing '' back to the input would clear the entry and\n // with it `badInput`. An unparsable entry keeps the last draft and the text on screen, so\n // the user can correct it; blur restores the last good value.\n const badInput = event.currentTarget.validity.badInput\n if (!badInput) setDraft(raw)\n const nextError = validate(raw, badInput)\n setError(nextError)\n if (nextError) return\n // `optional` narrows the callback to `number | null`; a required field never sees `''`.\n ;(props.onChange as (value: number | null) => void)(raw ? Number(raw) : null)\n }}\n onBlur={(event) => {\n const nextError = validate(draft(), event.currentTarget.validity.badInput)\n if (nextError) {\n setDraft(text(props.value))\n setError('')\n // The draft of an unparsable entry is '' and so is the restored blank value: the signal\n // does not change, so the DOM has to be reset by hand to drop the leftover text.\n event.currentTarget.value = text(props.value)\n }\n props.onBlur?.(event)\n }}\n />\n </FormField>\n )\n}\n"],"mappings":";;;;;AAkDA,IAAMgB,QAAQF,UAA0BA,UAAU,OAAO,KAAKG,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AK;GAAA,OAAEe,MAAMf;EAAK;EAAA,IAAEC,OAAI;GAAA,OAAEc,MAAMd;EAAI;EAAA,IAAEiB,QAAK;GAAA,OAAEA,MAAM;EAAC;EAAA,KAAA,WAAA;GAAA,OAASH,MAAMR;EAAK;EAAA,IAAA0B,WAAA;GAAA,OAAAD,gBAChFjC,OAAK;IACJmC,MAAI;IAAA,IACJxB,QAAK;KAAA,OAAEM,MAAM;IAAC;IAAA,IACdd,MAAG;KAAA,OAAEa,MAAMb;IAAG;IAAA,IACdC,MAAG;KAAA,OAAEY,MAAMZ;IAAG;IAAA,IACdC,OAAI;KAAA,OAAEW,MAAMX,SAASC,QAAQ,IAAI,IAAI;IAAM;IAAA,IAC3C8B,WAAQ;KAAA,OAAE,CAACpB,MAAMN;IAAQ;IAAA,IACzBH,WAAQ;KAAA,OAAES,MAAMT;IAAQ;IACxB8B,UAAUC,UAAU;KAClB,MAAMb,MAAMa,MAAMC,cAAc5B;KAIhC,MAAMe,WAAWY,MAAMC,cAAcC,SAASd;KAC9C,IAAI,CAACA,UAAUR,SAASO,GAAG;KAC3B,MAAMgB,YAAYjB,SAASC,KAAKC,QAAQ;KACxCN,SAASqB,SAAS;KAClB,IAAIA,WAAW;KAEd,MAAO7B,SAA4Ca,MAAMH,OAAOG,GAAG,IAAI,IAAI;IAC9E;IACAhB,SAAS6B,UAAU;KAEjB,IADkBd,SAASP,MAAM,GAAGqB,MAAMC,cAAcC,SAASd,QAC7De,GAAW;MACbvB,SAASL,KAAKG,MAAML,KAAK,CAAC;MAC1BS,SAAS,EAAE;MAGXkB,MAAMC,cAAc5B,QAAQE,KAAKG,MAAML,KAAK;KAC9C;KACAK,MAAMP,SAAS6B,KAAK;IACtB;GAAC,CAAA;EAAA;CAAA,CAAA;AAIT"}
1
+ {"version":3,"file":"number-field.js","names":["createEffect","createSignal","FormField","Input","label","hint","min","max","step","integer","disabled","class","onBlur","optional","value","onChange","text","String","NumberField","props","draft","setDraft","error","setError","undefined","Number","isInteger","validate","raw","badInput","next","isFinite","steps","Math","abs","round","_$createComponent","children","type","required","onInput","event","currentTarget","validity","nextError"],"sources":["../../../../src/components/ui/field/number-field.tsx"],"sourcesContent":["import { createEffect, createSignal, type JSX } from 'solid-js'\nimport { FormField } from './field'\nimport { Input } from '../input'\n\ntype NumberFieldBaseProps = {\n label: string\n hint?: string\n min: number\n max: number\n /**\n * The increment of the spinner and the arrow keys, and the grid a typed value\n * must sit on: `min` plus a whole number of steps. Use it for stepped or\n * fractional values (`0.05` for a 0-1 score, `5` for a percentage in fives).\n * Without it a field steps by 1, or by `any` when `integer` is `false`, which\n * accepts every decimal but leaves the spinner moving in whole numbers.\n */\n step?: number\n /**\n * Whether only whole numbers are valid. It defaults to `true`, or, when a\n * `step` is given, to whether both the step and its base `min` are whole\n * numbers, so `step={0.05}` accepts decimals without also saying\n * `integer={false}`, and `min={0.5} step={1}` accepts 0.5, 1.5, 2.5.\n */\n integer?: boolean\n /** Locks the input; a locked field keeps its value and reports nothing. */\n disabled?: boolean\n class?: string\n onBlur?: JSX.EventHandler<HTMLInputElement, FocusEvent>\n}\n\nexport type NumberFieldProps = NumberFieldBaseProps &\n (\n | {\n optional?: false\n value: number\n onChange: (value: number) => void\n }\n | {\n /**\n * Lets the field be left blank: a blank field is valid and reports `null`,\n * and a `null` value shows a blank field. Use it for a limit that falls\n * back to a default when unset, so a caller never maps `''` to\n * `undefined` of its own.\n */\n optional: true\n value: number | null\n onChange: (value: number | null) => void\n }\n )\n\nconst text = (value: number | null) => (value === null ? '' : String(value))\n\n/**\n * A controlled numeric field that keeps an editable draft while validating\n * range, integer and step constraints. Invalid drafts are announced and restored\n * to the latest controlled value when focus leaves the input, so `onChange`\n * only ever receives a value the field accepts, a caller never needs a\n * `Number(value) || fallback` of its own. With `optional`, blank is accepted and\n * reported as `null`.\n */\nexport function NumberField(props: NumberFieldProps) {\n const [draft, setDraft] = createSignal(text(props.value))\n const [error, setError] = createSignal('')\n // Whole numbers only when nothing on the grid is fractional: a whole step from\n // a fractional `min` (0.5, 1.5, 2.5) puts the spinner's own values off the\n // integers, so inference needs the step and its base to both be whole.\n const integer = () =>\n props.integer ??\n (props.step === undefined || (Number.isInteger(props.step) && Number.isInteger(props.min)))\n\n createEffect(() => {\n setDraft(text(props.value))\n })\n\n // A number input reports '' both when it is empty and when it holds text it cannot parse\n // (\"abc\", \"-\", \"1e\"); only `validity.badInput` tells them apart, and a bad draft must never\n // count as blank (it would report `null` and clear the limit).\n const validate = (raw: string, badInput: boolean) => {\n if (badInput) return `${props.label} must be a valid number.`\n if (!raw) return props.optional ? '' : `${props.label} is required.`\n const next = Number(raw)\n if (!Number.isFinite(next)) return `${props.label} must be a valid number.`\n if (integer() && !Number.isInteger(next)) {\n return `${props.label} must be a whole number.`\n }\n if (next < props.min || next > props.max) {\n return `${props.label} must be between ${props.min} and ${props.max}.`\n }\n if (props.step !== undefined && props.step > 0) {\n // Compare in whole steps with a tolerance: 0.15 / 0.05 is 3.0000000000000004,\n // and rejecting it would make the spinner's own values invalid.\n const steps = (next - props.min) / props.step\n if (Math.abs(steps - Math.round(steps)) > 1e-9) {\n return props.min === 0\n ? `${props.label} must be a multiple of ${props.step}.`\n : `${props.label} must be ${props.min} plus a multiple of ${props.step}.`\n }\n }\n return ''\n }\n\n return (\n <FormField label={props.label} hint={props.hint} error={error()} class={props.class}>\n <Input\n type=\"number\"\n value={draft()}\n min={props.min}\n max={props.max}\n step={props.step ?? (integer() ? 1 : 'any')}\n required={!props.optional}\n disabled={props.disabled}\n onInput={(event) => {\n const raw = event.currentTarget.value\n // Read before touching the draft: writing '' back to the input would clear the entry and\n // with it `badInput`. An unparsable entry keeps the last draft and the text on screen, so\n // the user can correct it; blur restores the last good value.\n const badInput = event.currentTarget.validity.badInput\n if (!badInput) setDraft(raw)\n const nextError = validate(raw, badInput)\n setError(nextError)\n if (nextError) return\n // `optional` narrows the callback to `number | null`; a required field never sees `''`.\n ;(props.onChange as (value: number | null) => void)(raw ? Number(raw) : null)\n }}\n onBlur={(event) => {\n const nextError = validate(draft(), event.currentTarget.validity.badInput)\n if (nextError) {\n setDraft(text(props.value))\n setError('')\n // The draft of an unparsable entry is '' and so is the restored blank value: the signal\n // does not change, so the DOM has to be reset by hand to drop the leftover text.\n event.currentTarget.value = text(props.value)\n }\n props.onBlur?.(event)\n }}\n />\n </FormField>\n )\n}\n"],"mappings":";;;;;AAkDA,IAAMgB,QAAQF,UAA0BA,UAAU,OAAO,KAAKG,OAAOH,KAAK;;;;;;;;;AAU1E,SAAgBI,YAAYC,OAAyB;CACnD,MAAM,CAACC,OAAOC,YAAYpB,aAAae,KAAKG,MAAML,KAAK,CAAC;CACxD,MAAM,CAACQ,OAAOC,YAAYtB,aAAa,EAAE;CAIzC,MAAMQ,gBACJU,MAAMV,YACLU,MAAMX,SAASgB,KAAAA,KAAcC,OAAOC,UAAUP,MAAMX,IAAI,KAAKiB,OAAOC,UAAUP,MAAMb,GAAG;CAE1FN,mBAAmB;EACjBqB,SAASL,KAAKG,MAAML,KAAK,CAAC;CAC5B,CAAC;CAKD,MAAMa,YAAYC,KAAaC,aAAsB;EACnD,IAAIA,UAAU,OAAO,GAAGV,MAAMf,MAAK;EACnC,IAAI,CAACwB,KAAK,OAAOT,MAAMN,WAAW,KAAK,GAAGM,MAAMf,MAAK;EACrD,MAAM0B,OAAOL,OAAOG,GAAG;EACvB,IAAI,CAACH,OAAOM,SAASD,IAAI,GAAG,OAAO,GAAGX,MAAMf,MAAK;EACjD,IAAIK,QAAQ,KAAK,CAACgB,OAAOC,UAAUI,IAAI,GACrC,OAAO,GAAGX,MAAMf,MAAK;EAEvB,IAAI0B,OAAOX,MAAMb,OAAOwB,OAAOX,MAAMZ,KACnC,OAAO,GAAGY,MAAMf,MAAK,mBAAoBe,MAAMb,IAAG,OAAQa,MAAMZ,IAAG;EAErE,IAAIY,MAAMX,SAASgB,KAAAA,KAAaL,MAAMX,OAAO,GAAG;GAG9C,MAAMwB,SAASF,OAAOX,MAAMb,OAAOa,M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CAAC;MAC1BS,SAAS,EAAE;MAGXkB,MAAMC,cAAc5B,QAAQE,KAAKG,MAAML,KAAK;KAC9C;KACAK,MAAMP,SAAS6B,KAAK;IACtB;GAAC,CAAA;EAAA;CAAA,CAAA;AAIT"}
@@ -5,7 +5,7 @@ import type { ComponentProps } from 'solid-js';
5
5
  *
6
6
  * A rich preview shown on hover: a user's profile, a file's summary, a link's
7
7
  * destination. The difference from Tooltip is that this may be hovered *into*
8
- * — the pointer can leave the trigger, cross the gap, and read the card.
8
+ * the pointer can leave the trigger, cross the gap, and read the card.
9
9
  *
10
10
  * Because it only opens on hover, its content must also be reachable another
11
11
  * way (clicking the trigger, for instance). A hover card that holds the only
@@ -1 +1 @@
1
- {"version":3,"file":"hover-card.js","names":["KobalteHoverCard","splitProps","overlaySurface","popoverArrow","tooltipMotion","topLayerProps","cn","HoverCardContent","props","Content","local","rest","_$createComponent","Portal","children","_$mergeProps","class","_$memo","Arrow"],"sources":["../../../../src/components/ui/hover-card/hover-card.tsx"],"sourcesContent":["import { HoverCard as KobalteHoverCard } from '@kobalte/core/hover-card'\nimport type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { overlaySurface, popoverArrow, tooltipMotion, topLayerProps } from '#lib/overlay'\nimport { cn } from '#lib/utils'\n\n/**\n * HoverCard.\n *\n * A rich preview shown on hover: a user's profile, a file's summary, a link's\n * destination. The difference from Tooltip is that this may be hovered *into*\n * — the pointer can leave the trigger, cross the gap, and read the card.\n *\n * Because it only opens on hover, its content must also be reachable another\n * way (clicking the trigger, for instance). A hover card that holds the only\n * route to something is unreachable by keyboard and by touch.\n */\nexport { Root as HoverCard, Trigger as HoverCardTrigger } from '@kobalte/core/hover-card'\n\nexport function HoverCardContent(props: ComponentProps<typeof KobalteHoverCard.Content>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteHoverCard.Portal>\n <KobalteHoverCard.Content\n {...topLayerProps}\n class={cn(\n overlaySurface,\n 'z-(--z-menu) w-64 p-3',\n 'origin-(--kb-hover-card-content-transform-origin)',\n tooltipMotion,\n local.class\n )}\n {...rest}\n >\n {local.children}\n <KobalteHoverCard.Arrow aria-hidden=\"true\" class={popoverArrow} />\n </KobalteHoverCard.Content>\n </KobalteHoverCard.Portal>\n )\n}\n"],"mappings":";;;;;;AAmBA,SAAgBO,iBAAiBC,OAAwD;CACvF,MAAM,CAACE,OAAOC,QAAQV,WAAWO,OAAO,CAAC,SAAS,UAAU,CAAC;CAE7D,OAAAI,gBACGZ,UAAiBa,QAAM,EAAA,IAAAC,WAAA;EAAA,OAAAF,gBACrBZ,UAAiBS,SAAOM,WACnBV,eAAa,EAAA,KAAA,WAAA;GAAA,OACVC,GACLJ,gBACA,yBACA,qDACAE,eACAM,MAAMM,KACR;EAAC,EAAA,GACGL,MAAI,EAAA,IAAAG,WAAA;GAAA,OAAA,CAAAG,WAEPP,MAAMI,QAAQ,GAAAF,gBACdZ,UAAiBkB,OAAK;IAAA,eAAA;IAAA,SAA2Bf;GAAY,CAAA,CAAA;EAAA,EAAA,CAAA,CAAA;CAAA,EAAA,CAAA;AAItE"}
1
+ {"version":3,"file":"hover-card.js","names":["KobalteHoverCard","splitProps","overlaySurface","popoverArrow","tooltipMotion","topLayerProps","cn","HoverCardContent","props","Content","local","rest","_$createComponent","Portal","children","_$mergeProps","class","_$memo","Arrow"],"sources":["../../../../src/components/ui/hover-card/hover-card.tsx"],"sourcesContent":["import { HoverCard as KobalteHoverCard } from '@kobalte/core/hover-card'\nimport type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { overlaySurface, popoverArrow, tooltipMotion, topLayerProps } from '#lib/overlay'\nimport { cn } from '#lib/utils'\n\n/**\n * HoverCard.\n *\n * A rich preview shown on hover: a user's profile, a file's summary, a link's\n * destination. The difference from Tooltip is that this may be hovered *into*\n * the pointer can leave the trigger, cross the gap, and read the card.\n *\n * Because it only opens on hover, its content must also be reachable another\n * way (clicking the trigger, for instance). A hover card that holds the only\n * route to something is unreachable by keyboard and by touch.\n */\nexport { Root as HoverCard, Trigger as HoverCardTrigger } from '@kobalte/core/hover-card'\n\nexport function HoverCardContent(props: ComponentProps<typeof KobalteHoverCard.Content>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteHoverCard.Portal>\n <KobalteHoverCard.Content\n {...topLayerProps}\n class={cn(\n overlaySurface,\n 'z-(--z-menu) w-64 p-3',\n 'origin-(--kb-hover-card-content-transform-origin)',\n tooltipMotion,\n local.class\n )}\n {...rest}\n >\n {local.children}\n <KobalteHoverCard.Arrow aria-hidden=\"true\" class={popoverArrow} />\n </KobalteHoverCard.Content>\n </KobalteHoverCard.Portal>\n )\n}\n"],"mappings":";;;;;;AAmBA,SAAgBO,iBAAiBC,OAAwD;CACvF,MAAM,CAACE,OAAOC,QAAQV,WAAWO,OAAO,CAAC,SAAS,UAAU,CAAC;CAE7D,OAAAI,gBACGZ,UAAiBa,QAAM,EAAA,IAAAC,WAAA;EAAA,OAAAF,gBACrBZ,UAAiBS,SAAOM,WACnBV,eAAa,EAAA,KAAA,WAAA;GAAA,OACVC,GACLJ,gBACA,yBACA,qDACAE,eACAM,MAAMM,KACR;EAAC,EAAA,GACGL,MAAI,EAAA,IAAAG,WAAA;GAAA,OAAA,CAAAG,WAEPP,MAAMI,QAAQ,GAAAF,gBACdZ,UAAiBkB,OAAK;IAAA,eAAA;IAAA,SAA2Bf;GAAY,CAAA,CAAA;EAAA,EAAA,CAAA,CAAA;CAAA,EAAA,CAAA;AAItE"}
@@ -5,7 +5,7 @@ import type { ComponentProps, JSX } from 'solid-js';
5
5
  * A field with attached chrome: a leading icon, a unit, a trailing button, a
6
6
  * clear affordance. The point of the component is that the adornments and the
7
7
  * input share *one* border and *one* focus ring, so the group reads as a single
8
- * control. Two separate elements side by side always drift — the ring appears
8
+ * control. Two separate elements side by side always drift, the ring appears
9
9
  * on the wrong box, or the border doubles where they meet.
10
10
  *
11
11
  * The focus ring therefore lives on the group and follows `focus-within`. A
@@ -1 +1 @@
1
- {"version":3,"file":"input-group.js","names":["splitProps","useFormFieldControl","cn","size","InputGroup","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class","undefined","InputGroupInput","field","id","_el$2","_tmpl$2","align","InputGroupAddon","_el$3","_tmpl$3","_$insert","children","InputGroupButton","_el$4","_tmpl$4","InputGroupText","_el$5","_tmpl$5"],"sources":["../../../../src/components/ui/input-group/input-group.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { useFormFieldControl } from '#lib/form-field'\nimport { cn } from '#lib/utils'\n\n/**\n * InputGroup.\n *\n * A field with attached chrome: a leading icon, a unit, a trailing button, a\n * clear affordance. The point of the component is that the adornments and the\n * input share *one* border and *one* focus ring, so the group reads as a single\n * control. Two separate elements side by side always drift — the ring appears\n * on the wrong box, or the border doubles where they meet.\n *\n * The focus ring therefore lives on the group and follows `focus-within`. A\n * group containing several focusable things still reads as focused once, which\n * is the correct affordance: the user is somewhere inside it.\n *\n * `size` is the control rung, matching `Input`: `sm` for a toolbar search beside\n * `icon-sm` actions, `md` (the default) everywhere else. The group's input and\n * text follow it.\n */\nexport type InputGroupProps = ComponentProps<'div'> & {\n size?: 'sm' | 'md' | 'lg'\n}\n\nexport function InputGroup(props: InputGroupProps) {\n const [local, rest] = splitProps(props, ['class', 'size'])\n\n return (\n <div\n data-slot=\"input-group\"\n data-size={local.size}\n class={cn(\n 'group/input-group border-input flex w-full min-w-0 items-center gap-1.5 rounded-md border bg-transparent',\n {\n 'h-control-sm px-control-xs': local.size === 'sm',\n 'h-control-md px-control-sm': local.size === 'md' || local.size === undefined,\n 'h-control-lg px-control-md': local.size === 'lg',\n },\n 'transition-[color,box-shadow,border-color] ease-out',\n 'focus-within:border-ring focus-within:ring-3 focus-within:ring-primary-subtle',\n 'has-[[aria-invalid=true]]:border-destructive has-[[aria-invalid=true]]:ring-3 has-[[aria-invalid=true]]:ring-destructive-subtle',\n 'has-[input:disabled]:cursor-not-allowed has-[input:disabled]:opacity-50',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function InputGroupInput(props: ComponentProps<'input'>) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'id',\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'aria-invalid',\n 'aria-errormessage',\n ])\n const field = useFormFieldControl('control', {\n id: local.id,\n 'aria-label': local['aria-label'],\n 'aria-labelledby': local['aria-labelledby'],\n 'aria-describedby': local['aria-describedby'],\n 'aria-invalid': local['aria-invalid'],\n 'aria-errormessage': local['aria-errormessage'],\n })\n\n return (\n <input\n data-slot=\"input-group-input\"\n id={field?.id ?? local.id}\n aria-label={local['aria-label']}\n aria-labelledby={field?.['aria-labelledby'] ?? local['aria-labelledby']}\n aria-describedby={field?.['aria-describedby'] ?? local['aria-describedby']}\n aria-invalid={field?.['aria-invalid'] ?? local['aria-invalid']}\n aria-errormessage={field?.['aria-errormessage'] ?? local['aria-errormessage']}\n class={cn(\n 'h-full min-w-0 flex-1 bg-transparent text-sm outline-none group-data-[size=sm]/input-group:text-xs',\n 'placeholder:text-muted-foreground',\n 'disabled:cursor-not-allowed',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport type InputGroupAddonProps = ComponentProps<'span'> & {\n /** Which edge the adornment sits on; also sets the pointer-events rule. */\n align?: 'start' | 'end'\n}\n\n/**\n * A non-interactive adornment. `pointer-events-none` by default, because an\n * adornment that swallows a click makes the whole control feel dead just to\n * the left of the caret — the most annoying possible bug. Pass `align=\"end\"`\n * and a real element when the adornment must be clickable.\n */\nexport function InputGroupAddon(props: InputGroupAddonProps) {\n const [local, rest] = splitProps(props, ['class', 'align', 'children'])\n\n return (\n <span\n data-slot=\"input-group-addon\"\n class={cn(\n 'text-muted-foreground flex shrink-0 items-center gap-1.5 text-sm select-none',\n '[&_svg]:pointer-events-none [&_svg]:size-4',\n 'group-data-[size=sm]/input-group:text-xs group-data-[size=sm]/input-group:[&_svg]:size-3.5',\n { 'order-first': local.align !== 'end', 'order-last': local.align === 'end' },\n local.class\n )}\n {...rest}\n >\n {local.children}\n </span>\n )\n}\n\n/** A clickable trailing button, sized to the group's height. */\nexport function InputGroupButton(props: ComponentProps<'button'>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <button\n type=\"button\"\n data-slot=\"input-group-button\"\n class={cn(\n 'text-muted-foreground -me-1 flex size-6 shrink-0 items-center justify-center rounded-sm',\n 'transition-colors ease-out outline-none hover:bg-surface-hover hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'disabled:pointer-events-none disabled:opacity-50',\n '[&_svg]:size-3.5',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </button>\n )\n}\n\n/** Text that reads as a value but is not an input, e.g. a unit or a suffix. */\nexport function InputGroupText(props: ComponentProps<'span'> & { children?: JSX.Element }) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <span\n class={cn(\n 'text-muted-foreground text-sm group-data-[size=sm]/input-group:text-xs',\n local.class\n )}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;;;;AA0BA,SAAgBI,WAAWC,OAAwB;CACjD,MAAM,CAACC,OAAOC,QAAQP,WAAWK,OAAO,CAAC,SAAS,MAAM,CAAC;CAEzD,cAAA;EAAA,IAAAG,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA;GAAA,KAAA,eAAA;IAAA,OAGeL,MAAMH;GAAI;GAAA,KAAA,WAAA;IAAA,OACdD,GACL,4GACA;KACE,8BAA8BI,MAAMH,SAAS;KAC7C,8BAA8BG,MAAMH,SAAS,QAAQG,MAAMH,SAASU,KAAAA;KACpE,8BAA8BP,MAAMH,SAAS;IAC/C,GACA,uDACA,iFACA,mIACA,2EACAG,MAAMM,KACR;GAAC;EAAA,GACGL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAC;CAAA,EAAA,CAAA;AAGd;AAEA,SAAgBM,gBAAgBT,OAAgC;CAC9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;EAAA,OAAAH;CAAA,EAAA,CAAA;AAGrB;;AAGA,SAAgBI,iBAAiBpB,OAAiC;CAChE,MAAM,CAACC,OAAOC,QAAQP,WAAWK,OAAO,CAAC,SAAS,UAAU,CAAC;CAE7D,cAAA;EAAA,IAAAqB,QAAAC,QAAA;EAAAjB,OAAAgB,OAAAf,WAAA,EAAA,KAAA,WAAA;GAAA,OAIWT,GACL,2FACA,wFACA,oFACA,oDACA,oBACAI,MAAMM,KACR;EAAC,EAAA,GACGL,IAAI,GAAA,OAAA,IAAA;EAAAgB,OAAAG,aAEPpB,MAAMkB,QAAQ;EAAA,OAAAE;CAAA,EAAA,CAAA;AAGrB;;AAGA,SAAgBE,eAAevB,OAA4D;CACzF,MAAM,CAACC,OAAOC,QAAQP,WAAWK,OAAO,CAAC,OAAO,CAAC;CACjD,cAAA;EAAA,IAAAwB,QAAAC,QAAA;EAAApB,OAAAmB,OAAAlB,WAAA,EAAA,KAAA,WAAA;GAAA,OAEWT,GACL,0EACAI,MAAMM,KACR;EAAC,EAAA,GACGL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAsB;CAAA,EAAA,CAAA;AAGd"}
1
+ {"version":3,"file":"input-group.js","names":["splitProps","useFormFieldControl","cn","size","InputGroup","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class","undefined","InputGroupInput","field","id","_el$2","_tmpl$2","align","InputGroupAddon","_el$3","_tmpl$3","_$insert","children","InputGroupButton","_el$4","_tmpl$4","InputGroupText","_el$5","_tmpl$5"],"sources":["../../../../src/components/ui/input-group/input-group.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { useFormFieldControl } from '#lib/form-field'\nimport { cn } from '#lib/utils'\n\n/**\n * InputGroup.\n *\n * A field with attached chrome: a leading icon, a unit, a trailing button, a\n * clear affordance. The point of the component is that the adornments and the\n * input share *one* border and *one* focus ring, so the group reads as a single\n * control. Two separate elements side by side always drift, the ring appears\n * on the wrong box, or the border doubles where they meet.\n *\n * The focus ring therefore lives on the group and follows `focus-within`. A\n * group containing several focusable things still reads as focused once, which\n * is the correct affordance: the user is somewhere inside it.\n *\n * `size` is the control rung, matching `Input`: `sm` for a toolbar search beside\n * `icon-sm` actions, `md` (the default) everywhere else. The group's input and\n * text follow it.\n */\nexport type InputGroupProps = ComponentProps<'div'> & {\n size?: 'sm' | 'md' | 'lg'\n}\n\nexport function InputGroup(props: InputGroupProps) {\n const [local, rest] = splitProps(props, ['class', 'size'])\n\n return (\n <div\n data-slot=\"input-group\"\n data-size={local.size}\n class={cn(\n 'group/input-group border-input flex w-full min-w-0 items-center gap-1.5 rounded-md border bg-transparent',\n {\n 'h-control-sm px-control-xs': local.size === 'sm',\n 'h-control-md px-control-sm': local.size === 'md' || local.size === undefined,\n 'h-control-lg px-control-md': local.size === 'lg',\n },\n 'transition-[color,box-shadow,border-color] ease-out',\n 'focus-within:border-ring focus-within:ring-3 focus-within:ring-primary-subtle',\n 'has-[[aria-invalid=true]]:border-destructive has-[[aria-invalid=true]]:ring-3 has-[[aria-invalid=true]]:ring-destructive-subtle',\n 'has-[input:disabled]:cursor-not-allowed has-[input:disabled]:opacity-50',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function InputGroupInput(props: ComponentProps<'input'>) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'id',\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'aria-invalid',\n 'aria-errormessage',\n ])\n const field = useFormFieldControl('control', {\n id: local.id,\n 'aria-label': local['aria-label'],\n 'aria-labelledby': local['aria-labelledby'],\n 'aria-describedby': local['aria-describedby'],\n 'aria-invalid': local['aria-invalid'],\n 'aria-errormessage': local['aria-errormessage'],\n })\n\n return (\n <input\n data-slot=\"input-group-input\"\n id={field?.id ?? local.id}\n aria-label={local['aria-label']}\n aria-labelledby={field?.['aria-labelledby'] ?? local['aria-labelledby']}\n aria-describedby={field?.['aria-describedby'] ?? local['aria-describedby']}\n aria-invalid={field?.['aria-invalid'] ?? local['aria-invalid']}\n aria-errormessage={field?.['aria-errormessage'] ?? local['aria-errormessage']}\n class={cn(\n 'h-full min-w-0 flex-1 bg-transparent text-sm outline-none group-data-[size=sm]/input-group:text-xs',\n 'placeholder:text-muted-foreground',\n 'disabled:cursor-not-allowed',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport type InputGroupAddonProps = ComponentProps<'span'> & {\n /** Which edge the adornment sits on; also sets the pointer-events rule. */\n align?: 'start' | 'end'\n}\n\n/**\n * A non-interactive adornment. `pointer-events-none` by default, because an\n * adornment that swallows a click makes the whole control feel dead just to\n * the left of the caret — the most annoying possible bug. Pass `align=\"end\"`\n * and a real element when the adornment must be clickable.\n */\nexport function InputGroupAddon(props: InputGroupAddonProps) {\n const [local, rest] = splitProps(props, ['class', 'align', 'children'])\n\n return (\n <span\n data-slot=\"input-group-addon\"\n class={cn(\n 'text-muted-foreground flex shrink-0 items-center gap-1.5 text-sm select-none',\n '[&_svg]:pointer-events-none [&_svg]:size-4',\n 'group-data-[size=sm]/input-group:text-xs group-data-[size=sm]/input-group:[&_svg]:size-3.5',\n { 'order-first': local.align !== 'end', 'order-last': local.align === 'end' },\n local.class\n )}\n {...rest}\n >\n {local.children}\n </span>\n )\n}\n\n/** A clickable trailing button, sized to the group's height. */\nexport function InputGroupButton(props: ComponentProps<'button'>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <button\n type=\"button\"\n data-slot=\"input-group-button\"\n class={cn(\n 'text-muted-foreground -me-1 flex size-6 shrink-0 items-center justify-center rounded-sm',\n 'transition-colors ease-out outline-none hover:bg-surface-hover hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'disabled:pointer-events-none disabled:opacity-50',\n '[&_svg]:size-3.5',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </button>\n )\n}\n\n/** Text that reads as a value but is not an input, e.g. a unit or a suffix. */\nexport function InputGroupText(props: ComponentProps<'span'> & { children?: JSX.Element }) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <span\n class={cn(\n 'text-muted-foreground text-sm group-data-[size=sm]/input-group:text-xs',\n local.class\n )}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;;;;AA0BA,SAAgBI,WAAWC,OAAwB;CACjD,MAAM,CAACC,OAAOC,QAAQP,WAAWK,OAAO,CAAC,SAAS,MAAM,CAAC;CAEzD,cAAA;EAAA,IAAAG,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA;GAAA,KAAA,eAAA;IAAA,OAGeL,MAAMH;GAAI;GAAA,KAAA,WAAA;IAAA,OACdD,GACL,4GACA;KACE,8BAA8BI,MAAMH,SAAS;KAC7C,8BAA8BG,MAAMH,SAAS,QAAQG,MAAMH,SAASU,KAAAA;KACpE,8BAA8BP,MAAMH,SAAS;IAC/C,GACA,uDACA,iFACA,mIACA,2EACAG,MAAMM,KACR;GAAC;EAAA,GACGL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAC;CAAA,EAAA,CAAA;AAGd;AAEA,SAAgBM,gBAAgBT,OAAgC;CAC9D,MAAM,CAACC,OAAOC,QAAQP,WAAWK,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;CAAmB,CACpB;CACD,MAAMU,QAAQd,oBAAoB,WAAW;EAC3Ce,IAAIV,MAAMU;EACV,cAAcV,MAAM;EACpB,mBAAmBA,MAAM;EACzB,oBAAoBA,MAAM;EAC1B,gBAAgBA,MAAM;EACtB,qBAAqBA,MAAM;CAC7B,CAAC;CAED,cAAA;EAAA,IAAAW,QAAAC,QAAA;EAAAR,OAAAO,OAAAN,WAAA;GAAA,IAGIK,KAAE;IAAA,OAAED,OAAOC,MAAMV,MAAMU;GAAE;GAAA,KAAA,gBAAA;IAAA,OACbV,MAAM;GAAa;GAAA,KAAA,qBAAA;IAAA,OACdS,QAAQ,sBAAsBT,MAAM;GAAkB;GAAA,KAAA,sBAAA;IAAA,OACrDS,QAAQ,uBAAu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QAAA;EAAApB,OAAAmB,OAAAlB,WAAA,EAAA,KAAA,WAAA;GAAA,OAEWT,GACL,0EACAI,MAAMM,KACR;EAAC,EAAA,GACGL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAsB;CAAA,EAAA,CAAA;AAGd"}
@@ -9,7 +9,7 @@ import type { ComponentProps } from 'solid-js';
9
9
  *
10
10
  * That split is the whole reason to use a component rather than six inputs. Six
11
11
  * inputs cannot be pasted into, cannot be autofilled, and announce as six unrelated
12
- * fields — every one of which is a defect a user hits on the first try.
12
+ * fields, every one of which is a defect a user hits on the first try.
13
13
  *
14
14
  * corvu supplies the value handling, the caret movement, the paste split and the
15
15
  * keyboard behaviour.
@@ -1 +1 @@
1
- {"version":3,"file":"input-otp.js","names":["OtpField","For","Show","splitProps","cn","length","groups","InputOtp","props","local","rest","_$createComponent","_$mergeProps","maxLength","class","children","field","Input","each","size","groupIndex","when","_tmpl$","_el$2","_tmpl$2","_$insert","Array","from","_","index","offset","slice","reduce","total","run","slot","_el$3","_tmpl$3","value","_$effect","_p$","_v$","_v$2","activeSlots","includes","_v$3","disabled","undefined","e","_$className","t","_$setAttribute","a","InputOtpCaret","_el$4","_tmpl$4","_$spread"],"sources":["../../../../src/components/ui/input-otp/input-otp.tsx"],"sourcesContent":["import OtpField from '@corvu/otp-field'\nimport type { ComponentProps } from 'solid-js'\nimport { For, Show, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * InputOtp.\n *\n * A one-time code, entered into separate boxes. The boxes are the *paint*: the\n * value lives in a single real input, so paste works, autofill works, and a\n * password manager sees one field rather than six.\n *\n * That split is the whole reason to use a component rather than six inputs. Six\n * inputs cannot be pasted into, cannot be autofilled, and announce as six unrelated\n * fields — every one of which is a defect a user hits on the first try.\n *\n * corvu supplies the value handling, the caret movement, the paste split and the\n * keyboard behaviour.\n */\n/**\n * `maxLength` is omitted rather than exposed: corvu requires it, and a caller who\n * has to set both it and `length` will eventually set them to different numbers.\n * `length` is the one input and it drives the other.\n */\nexport type InputOtpProps = Omit<ComponentProps<typeof OtpField>, 'maxLength'> & {\n /** How many characters. */\n length?: number\n /** Group the boxes into runs, e.g. `[3, 3]` for a six-character code. */\n groups?: readonly number[]\n}\n\nexport function InputOtp(props: InputOtpProps) {\n const [local, rest] = splitProps(props, ['class', 'length', 'groups', 'children'])\n\n const length = () => local.length ?? 6\n const groups = () => local.groups ?? [length()]\n\n return (\n <OtpField\n maxLength={length()}\n class={cn(\n 'flex items-center gap-2',\n // corvu positions the field itself, but its hidden input is 40px wider\n // than the field so a password manager's badge lands outside the boxes\n // (`shiftPWManagers`). `clip-path` only hides that overhang; it still\n // counts as overflow, and a full-width field scrolled the page sideways.\n // `overflow-hidden` contains it, and `p-1` keeps the edge boxes' focus\n // ring (`ring-3`) inside the clip.\n 'overflow-hidden p-1',\n local.class\n )}\n {...rest}\n children={(field) => (\n <>\n <OtpField.Input\n aria-label={props['aria-label'] ?? 'One-time code'}\n class=\"absolute inset-0 opacity-0\"\n />\n <For each={groups()}>\n {(size, groupIndex) => (\n <>\n <Show when={groupIndex() > 0}>\n <span aria-hidden=\"true\" class=\"text-muted-foreground px-1\">\n –\n </span>\n </Show>\n <span class=\"flex items-center gap-1.5\">\n <For each={Array.from({ length: size })}>\n {(_, index) => {\n // The slot's index across the whole field, so the boxes after a\n // group boundary continue counting rather than restarting.\n const offset = groups()\n .slice(0, groupIndex())\n .reduce((total, run) => total + run, 0)\n const slot = offset + index()\n return (\n <span\n class={cn(\n 'border-input bg-transparent flex size-10 items-center justify-center rounded-md border text-sm font-medium',\n 'transition-[color,box-shadow,border-color] ease-out',\n 'data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-primary-subtle',\n 'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50'\n )}\n data-active={field.activeSlots.includes(slot)}\n // Present-or-absent, never `\"false\"`: `data-[disabled]`\n // matches any value, so `disabled={false}` dimmed the boxes.\n data-disabled={props.disabled ? '' : undefined}\n >\n {field.value[slot] ?? ''}\n </span>\n )\n }}\n </For>\n </span>\n </>\n )}\n </For>\n </>\n )}\n />\n )\n}\n\n/**\n * A caret drawn inside the active box.\n *\n * Exported for a caller building its own slot: the box above renders the character\n * directly, and a blinking caret is the alternative when the field should look\n * empty until something is typed.\n */\nexport function InputOtpCaret(props: ComponentProps<'span'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <span\n aria-hidden=\"true\"\n class={cn('animate-caret bg-foreground inline-block h-4 w-px', local.class)}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;;;AA+BA,SAAgBO,SAASC,OAAsB;CAC7C,MAAM,CAACC,OAAOC,QAAQP,WAAWK,OAAO;EAAC;EAAS;EAAU;EAAU;CAAU,CAAC;CAEjF,MAAMH,eAAeI,MAAMJ,UAAU;CACrC,MAAMC,eAAeG,MAAMH,UAAU,CAACD,OAAO,CAAC;CAE9C,OAAAM,gBACGX,UAAQY,WAAA;EAAA,IACPC,YAAS;GAAA,OAAER,OAAO;EAAC;EAAA,KAAA,WAAA;GAAA,OACZD,GACL,2BAOA,uBACAK,MAAMK,KACR;EAAC;CAAA,GACGJ,MAAI,EACRK,WAAWC,UAAK,CAAAL,gBAEXX,SAASiB,OAAK;EAAA,KAAA,gBAAA;GAAA,OACDT,MAAM,iBAAiB;EAAe;EAAA,SAAA;CAAA,CAAA,GAAAG,gBAGnDV,KAAG;EAAA,IAACiB,OAAI;GAAA,OAAEZ,OAAO;EAAC;EAAAS,WACfI,MAAMC,eAAU,CAAAT,gBAEbT,MAAI;GAAA,IAACmB,OAAI;IAAA,OAAED,WAAW,IAAI;GAAC;GAAA,IAAAL,WAAA;IAAA,OAAAO,OAAA;GAAA;EAAA,CAAA,UAAA;GAAA,IAAAC,QAAAC,QAAA;GAAAC,OAAAF,OAAAZ,gBAMzBV,KAAG;IAAA,IAACiB,OAAI;KAAA,OAAEQ,MAAMC,KAAK,EAAEtB,QAAQc,KAAK,CAAC;IAAC;IAAAJ,WACnCa,GAAG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createComponent","_$mergeProps","maxLength","class","children","field","Input","each","size","groupIndex","when","_tmpl$","_el$2","_tmpl$2","_$insert","Array","from","_","index","offset","slice","reduce","total","run","slot","_el$3","_tmpl$3","value","_$effect","_p$","_v$","_v$2","activeSlots","includes","_v$3","disabled","undefined","e","_$className","t","_$setAttribute","a","InputOtpCaret","_el$4","_tmpl$4","_$spread"],"sources":["../../../../src/components/ui/input-otp/input-otp.tsx"],"sourcesContent":["import OtpField from '@corvu/otp-field'\nimport type { ComponentProps } from 'solid-js'\nimport { For, Show, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * InputOtp.\n *\n * A one-time code, entered into separate boxes. The boxes are the *paint*: the\n * value lives in a single real input, so paste works, autofill works, and a\n * password manager sees one field rather than six.\n *\n * That split is the whole reason to use a component rather than six inputs. Six\n * inputs cannot be pasted into, cannot be autofilled, and announce as six unrelated\n * fields, every one of which is a defect a user hits on the first try.\n *\n * corvu supplies the value handling, the caret movement, the paste split and the\n * keyboard behaviour.\n */\n/**\n * `maxLength` is omitted rather than exposed: corvu requires it, and a caller who\n * has to set both it and `length` will eventually set them to different numbers.\n * `length` is the one input and it drives the other.\n */\nexport type InputOtpProps = Omit<ComponentProps<typeof OtpField>, 'maxLength'> & {\n /** How many characters. */\n length?: number\n /** Group the boxes into runs, e.g. `[3, 3]` for a six-character code. */\n groups?: readonly number[]\n}\n\nexport function InputOtp(props: InputOtpProps) {\n const [local, rest] = splitProps(props, ['class', 'length', 'groups', 'children'])\n\n const length = () => local.length ?? 6\n const groups = () => local.groups ?? [length()]\n\n return (\n <OtpField\n maxLength={length()}\n class={cn(\n 'flex items-center gap-2',\n // corvu positions the field itself, but its hidden input is 40px wider\n // than the field so a password manager's badge lands outside the boxes\n // (`shiftPWManagers`). `clip-path` only hides that overhang; it still\n // counts as overflow, and a full-width field scrolled the page sideways.\n // `overflow-hidden` contains it, and `p-1` keeps the edge boxes' focus\n // ring (`ring-3`) inside the clip.\n 'overflow-hidden p-1',\n local.class\n )}\n {...rest}\n children={(field) => (\n <>\n <OtpField.Input\n aria-label={props['aria-label'] ?? 'One-time code'}\n class=\"absolute inset-0 opacity-0\"\n />\n <For each={groups()}>\n {(size, groupIndex) => (\n <>\n <Show when={groupIndex() > 0}>\n <span aria-hidden=\"true\" class=\"text-muted-foreground px-1\">\n –\n </span>\n </Show>\n <span class=\"flex items-center gap-1.5\">\n <For each={Array.from({ length: size })}>\n {(_, index) => {\n // The slot's index across the whole field, so the boxes after a\n // group boundary continue counting rather than restarting.\n const offset = groups()\n .slice(0, groupIndex())\n .reduce((total, run) => total + run, 0)\n const slot = offset + index()\n return (\n <span\n class={cn(\n 'border-input bg-transparent flex size-10 items-center justify-center rounded-md border text-sm font-medium',\n 'transition-[color,box-shadow,border-color] ease-out',\n 'data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-primary-subtle',\n 'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50'\n )}\n data-active={field.activeSlots.includes(slot)}\n // Present-or-absent, never `\"false\"`: `data-[disabled]`\n // matches any value, so `disabled={false}` dimmed the boxes.\n data-disabled={props.disabled ? '' : undefined}\n >\n {field.value[slot] ?? ''}\n </span>\n )\n }}\n </For>\n </span>\n </>\n )}\n </For>\n </>\n )}\n />\n )\n}\n\n/**\n * A caret drawn inside the active box.\n *\n * Exported for a caller building its own slot: the box above renders the character\n * directly, and a blinking caret is the alternative when the field should look\n * empty until something is typed.\n */\nexport function InputOtpCaret(props: ComponentProps<'span'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <span\n aria-hidden=\"true\"\n class={cn('animate-caret bg-foreground inline-block h-4 w-px', local.class)}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;;;AA+BA,SAAgBO,SAASC,OAAsB;CAC7C,MAAM,CAACC,OAAOC,QAAQP,WAAWK,OAAO;EAAC;EAAS;EAAU;EAAU;CAAU,CAAC;CAEjF,MAAMH,eAAeI,MAAMJ,UAAU;CACrC,MAAMC,eAAeG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,EAAE,OAAO,CAAA;CACxB,CAAA;AAEH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,eAqDpC;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,eAGrD;AAED,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACzD;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,eAa1D;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kCAAkC,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CACtD,eAkBF;AAED,yEAAyE;AACzE,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,eAE9C;AAED,wDAAwD;AACxD,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,eASrD"}
@@ -3,13 +3,13 @@ import { cn } from "../../../lib/utils.js";
3
3
  import { className, createComponent, effect, insert, mergeProps, setAttribute, spread, template } from "solid-js/web";
4
4
  import { Show, splitProps } from "solid-js";
5
5
  // src/components/ui/item/item.tsx
6
- var _tmpl$ = /*#__PURE__*/ template(`<span data-slot=item-media class="flex size-8 shrink-0 items-center justify-center [&amp;_svg]:size-4">`);
7
- var _tmpl$2 = /*#__PURE__*/ template(`<span data-slot=item-trailing>`);
8
- var _tmpl$3 = /*#__PURE__*/ template(`<div data-slot=item><div data-slot=item-body class="flex min-w-0 flex-1 flex-col gap-0.5">`);
6
+ var _tmpl$ = /*#__PURE__*/ template(`<div data-slot=item><div data-slot=item-body class="flex min-w-0 flex-1 flex-col gap-0.5">`);
7
+ var _tmpl$2 = /*#__PURE__*/ template(`<span data-slot=item-media class="flex size-8 shrink-0 items-center justify-center [&amp;_svg]:size-4">`);
8
+ var _tmpl$3 = /*#__PURE__*/ template(`<span data-slot=item-trailing>`);
9
9
  var _tmpl$4 = /*#__PURE__*/ template(`<div data-slot=item-title>`);
10
10
  var _tmpl$5 = /*#__PURE__*/ template(`<div data-slot=item-description>`);
11
- var _tmpl$6 = /*#__PURE__*/ template(`<div class="text-muted-foreground text-2xs font-medium tracking-wide uppercase">`);
12
- var _tmpl$7 = /*#__PURE__*/ template(`<div data-slot=item-group><div role=list class="flex flex-col gap-2">`);
11
+ var _tmpl$6 = /*#__PURE__*/ template(`<div data-slot=item-group><div role=list class="flex flex-col gap-2">`);
12
+ var _tmpl$7 = /*#__PURE__*/ template(`<div class="text-muted-foreground text-2xs font-medium tracking-wide uppercase">`);
13
13
  var _tmpl$8 = /*#__PURE__*/ template(`<div data-slot=item-empty>`);
14
14
  /**
15
15
  * Item.
@@ -60,7 +60,7 @@ function Item(props) {
60
60
  "children"
61
61
  ]);
62
62
  return (() => {
63
- var _el$ = _tmpl$3(), _el$3 = _el$.firstChild;
63
+ var _el$ = _tmpl$(), _el$2 = _el$.firstChild;
64
64
  spread(_el$, mergeProps({
65
65
  get ["data-stack-trailing"]() {
66
66
  return local.stackTrailing ? "" : void 0;
@@ -76,23 +76,23 @@ function Item(props) {
76
76
  get when() {
77
77
  return local.media;
78
78
  },
79
- get children() {
80
- var _el$2 = _tmpl$();
81
- insert(_el$2, () => local.media);
82
- return _el$2;
83
- }
84
- }), _el$3);
85
- insert(_el$3, () => local.children);
79
+ children: (mediaSlot) => (() => {
80
+ var _el$3 = _tmpl$2();
81
+ insert(_el$3, mediaSlot);
82
+ return _el$3;
83
+ })()
84
+ }), _el$2);
85
+ insert(_el$2, () => local.children);
86
86
  insert(_el$, createComponent(Show, {
87
87
  get when() {
88
88
  return local.trailing;
89
89
  },
90
- get children() {
91
- var _el$4 = _tmpl$2();
92
- insert(_el$4, () => local.trailing);
90
+ children: (trailingSlot) => (() => {
91
+ var _el$4 = _tmpl$3();
92
+ insert(_el$4, trailingSlot);
93
93
  effect(() => className(_el$4, cn("flex shrink-0 items-center gap-2", { "@max-md/item:w-full @max-md/item:flex-wrap @max-md/item:justify-end": local.stackTrailing })));
94
94
  return _el$4;
95
- }
95
+ })()
96
96
  }), null);
97
97
  return _el$;
98
98
  })();
@@ -130,7 +130,7 @@ function ItemGroup(props) {
130
130
  "children"
131
131
  ]);
132
132
  return (() => {
133
- var _el$7 = _tmpl$7(), _el$9 = _el$7.firstChild;
133
+ var _el$7 = _tmpl$6(), _el$8 = _el$7.firstChild;
134
134
  spread(_el$7, mergeProps({ get ["class"]() {
135
135
  return cn("flex flex-col gap-2", local.class);
136
136
  } }, rest), false, true);
@@ -138,14 +138,14 @@ function ItemGroup(props) {
138
138
  get when() {
139
139
  return local.label;
140
140
  },
141
- get children() {
142
- var _el$8 = _tmpl$6();
143
- insert(_el$8, () => local.label);
144
- return _el$8;
145
- }
146
- }), _el$9);
147
- insert(_el$9, () => local.children);
148
- effect(() => setAttribute(_el$9, "aria-label", local.listLabel ?? local.label));
141
+ children: (labelSlot) => (() => {
142
+ var _el$9 = _tmpl$7();
143
+ insert(_el$9, labelSlot);
144
+ return _el$9;
145
+ })()
146
+ }), _el$8);
147
+ insert(_el$8, () => local.children);
148
+ effect(() => setAttribute(_el$8, "aria-label", local.listLabel ?? local.label));
149
149
  return _el$7;
150
150
  })();
151
151
  }
@@ -1 +1 @@
1
- {"version":3,"file":"item.js","names":["Show","splitProps","cva","cn","itemVariants","variants","variant","default","outline","muted","size","sm","md","lg","defaultVariants","media","trailing","stackTrailing","Item","props","local","rest","_el$","_tmpl$3","_el$3","firstChild","_$spread","_$mergeProps","undefined","class","_$insert","_$createComponent","when","children","_el$2","_tmpl$","_el$4","_tmpl$2","_$effect","_$className","ItemTitle","_el$5","_tmpl$4","clamp","ItemDescription","_el$6","_tmpl$5","ItemGroup","label","listLabel","_el$7","_tmpl$7","_el$9","_el$8","_tmpl$6","_$setAttribute","ItemGroupEntry","role","ItemEmpty","_el$0","_tmpl$8"],"sources":["../../../../src/components/ui/item/item.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { cva, type VariantProps } from '#lib/variants'\nimport { cn } from '#lib/utils'\n\n/**\n * Item.\n *\n * The general row: a leading slot, a body, and a trailing slot. It is the shape\n * almost every list in an application takes — a file, a member, a setting, a\n * search result — and it exists as a component because a row is where inconsistency\n * is most visible: twenty of them make any drift in height, padding or alignment\n * obvious at a glance.\n *\n * The difference from `ListRow` is what it is *for*. `ListRow` is one row in a list\n * of like things, sized by the row ladder and meant to be scanned down a column.\n * `Item` is a self-contained block — it has a border, its own surface, an optional\n * title and description — and is meant to stand alone or sit in a grid. A list uses\n * `ListRow`; a search result or a settings card uses `Item`.\n *\n * `variant=\"outline\"` and `\"muted\"` exist because the two questions a caller\n * actually has are \"does this need an edge\" and \"is it on the canvas or inset\".\n */\nexport const itemVariants = cva('flex w-full items-center gap-3 rounded-lg text-sm', {\n variants: {\n variant: {\n default: 'bg-transparent',\n /** On the canvas, with an edge — the search-result shape. */\n outline: 'border border-border bg-card',\n /** Inset: a code well, a disabled row, a quoted message. */\n muted: 'bg-muted',\n },\n size: {\n sm: 'min-h-row-sm px-3 py-1.5',\n md: 'min-h-row-md px-3 py-2',\n lg: 'min-h-row-lg px-4 py-2.5',\n },\n },\n defaultVariants: { variant: 'default', size: 'md' },\n})\n\ntype ItemVariantProps = VariantProps<typeof itemVariants>\n\nexport type ItemProps = ComponentProps<'div'> &\n ItemVariantProps & {\n /** A media slot: an icon, an avatar, a thumbnail. */\n media?: JSX.Element\n /** A trailing slot: a badge, a timestamp, a menu trigger. */\n trailing?: JSX.Element\n /**\n * Move the trailing slot onto its own line, end-aligned under the body, once\n * the item is narrower than 28rem — the width `ListRow` stacks its trailing\n * controls at. Off by default: a row of badges and an icon button fits beside\n * the body, but a pair of labelled buttons squeezes a phone-width body to a\n * few characters.\n */\n stackTrailing?: boolean\n }\n\nexport function Item(props: ItemProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'variant',\n 'size',\n 'media',\n 'trailing',\n 'stackTrailing',\n 'children',\n ])\n\n return (\n <div\n data-slot=\"item\"\n data-stack-trailing={local.stackTrailing ? '' : undefined}\n class={cn(\n itemVariants({ variant: local.variant, size: local.size }),\n // The item is its own query container: the trailing slot answers to the\n // width the item was given, not the viewport, so an item in a narrow\n // column of a wide window stacks too.\n { '@container/item flex-wrap': local.stackTrailing },\n local.class\n )}\n {...rest}\n >\n <Show when={local.media}>\n <span\n data-slot=\"item-media\"\n class=\"flex size-8 shrink-0 items-center justify-center [&_svg]:size-4\"\n >\n {local.media}\n </span>\n </Show>\n <div data-slot=\"item-body\" class=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n {local.children}\n </div>\n <Show when={local.trailing}>\n <span\n data-slot=\"item-trailing\"\n class={cn('flex shrink-0 items-center gap-2', {\n '@max-md/item:w-full @max-md/item:flex-wrap @max-md/item:justify-end':\n local.stackTrailing,\n })}\n >\n {local.trailing}\n </span>\n </Show>\n </div>\n )\n}\n\nexport function ItemTitle(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return <div data-slot=\"item-title\" class={cn('truncate font-medium', local.class)} {...rest} />\n}\n\nexport type ItemDescriptionProps = ComponentProps<'div'> & {\n /**\n * Clamp to two lines. On by default, so a grid of items keeps one height; pass\n * `false` where the description is the content — a setting's explanation, an\n * error the reader has to read in full.\n */\n clamp?: boolean\n}\n\nexport function ItemDescription(props: ItemDescriptionProps) {\n const [local, rest] = splitProps(props, ['class', 'clamp'])\n return (\n <div\n data-slot=\"item-description\"\n class={cn(\n 'text-muted-foreground text-xs text-pretty',\n { 'line-clamp-2': local.clamp !== false },\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/**\n * A group of items with an optional heading. It is a real `role=\"list\"` with\n * `role=\"listitem\"` children, so a screen reader reports the count — which is how a\n * user knows how many results there are without counting them.\n */\nexport function ItemGroup(\n props: ComponentProps<'div'> & {\n label?: string\n /** The list's accessible name. */ listLabel?: string\n }\n) {\n const [local, rest] = splitProps(props, ['class', 'label', 'listLabel', 'children'])\n\n return (\n <div data-slot=\"item-group\" class={cn('flex flex-col gap-2', local.class)} {...rest}>\n <Show when={local.label}>\n <div class=\"text-muted-foreground text-2xs font-medium tracking-wide uppercase\">\n {local.label}\n </div>\n </Show>\n <div role=\"list\" aria-label={local.listLabel ?? local.label} class=\"flex flex-col gap-2\">\n {local.children}\n </div>\n </div>\n )\n}\n\n/** An item inside an `ItemGroup`, which is what makes it a list item. */\nexport function ItemGroupEntry(props: ItemProps) {\n return <Item role=\"listitem\" {...props} />\n}\n\n/** A centred message for a group with nothing in it. */\nexport function ItemEmpty(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"item-empty\"\n class={cn('text-muted-foreground py-6 text-center text-sm', local.class)}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAaI,eAAeF,IAAI,qDAAqD;CACnFG,UAAU;EACRC,SAAS;GACPC,SAAS;;GAETC,SAAS;;GAETC,OAAO;EACT;EACAC,MAAM;GACJC,IAAI;GACJC,IAAI;GACJC,IAAI;EACN;CACF;CACAC,iBAAiB;EAAER,SAAS;EAAWI,MAAM;CAAK;AACpD,CAAC;AAoBD,SAAgBQ,KAAKC,OAAkB;CACrC,MAAM,CAACC,OAAOC,QAAQpB,WAAWkB,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;CAAU,CACX;CAED,cAAA;EAAA,IAAAG,OAAAC,QAAA,GAAAC,QAAAF,KAAAG;EAAAC,OAAAJ,MAAAK,WAAA;GAAA,KAAA,yBAAA;IAAA,OAGyBP,MAAMH,gBAAgB,KAAKW,KAAAA;GAAS;GAAA,KAAA,WAAA;IAAA,OAClDzB,GACLC,aAAa;KAAEE,SAASc,MAAMd;KAASI,MAAMU,MAAMV;IAAK,CAAC,GAIzD,EAAE,6BAA6BU,MA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":3,"file":"item.js","names":["Show","splitProps","cva","cn","itemVariants","variants","variant","default","outline","muted","size","sm","md","lg","defaultVariants","media","trailing","stackTrailing","Item","props","local","rest","_el$","_tmpl$","_el$2","firstChild","_$spread","_$mergeProps","undefined","class","_$insert","_$createComponent","when","children","mediaSlot","_el$3","_tmpl$2","trailingSlot","_el$4","_tmpl$3","_$effect","_$className","ItemTitle","_el$5","_tmpl$4","clamp","ItemDescription","_el$6","_tmpl$5","ItemGroup","label","listLabel","_el$7","_tmpl$6","_el$8","labelSlot","_el$9","_tmpl$7","_$setAttribute","ItemGroupEntry","role","ItemEmpty","_el$0","_tmpl$8"],"sources":["../../../../src/components/ui/item/item.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { cva, type VariantProps } from '#lib/variants'\nimport { cn } from '#lib/utils'\n\n/**\n * Item.\n *\n * The general row: a leading slot, a body, and a trailing slot. It is the shape\n * almost every list in an application takes — a file, a member, a setting, a\n * search result — and it exists as a component because a row is where inconsistency\n * is most visible: twenty of them make any drift in height, padding or alignment\n * obvious at a glance.\n *\n * The difference from `ListRow` is what it is *for*. `ListRow` is one row in a list\n * of like things, sized by the row ladder and meant to be scanned down a column.\n * `Item` is a self-contained block — it has a border, its own surface, an optional\n * title and description — and is meant to stand alone or sit in a grid. A list uses\n * `ListRow`; a search result or a settings card uses `Item`.\n *\n * `variant=\"outline\"` and `\"muted\"` exist because the two questions a caller\n * actually has are \"does this need an edge\" and \"is it on the canvas or inset\".\n */\nexport const itemVariants = cva('flex w-full items-center gap-3 rounded-lg text-sm', {\n variants: {\n variant: {\n default: 'bg-transparent',\n /** On the canvas, with an edge — the search-result shape. */\n outline: 'border border-border bg-card',\n /** Inset: a code well, a disabled row, a quoted message. */\n muted: 'bg-muted',\n },\n size: {\n sm: 'min-h-row-sm px-3 py-1.5',\n md: 'min-h-row-md px-3 py-2',\n lg: 'min-h-row-lg px-4 py-2.5',\n },\n },\n defaultVariants: { variant: 'default', size: 'md' },\n})\n\ntype ItemVariantProps = VariantProps<typeof itemVariants>\n\nexport type ItemProps = ComponentProps<'div'> &\n ItemVariantProps & {\n /** A media slot: an icon, an avatar, a thumbnail. */\n media?: JSX.Element\n /** A trailing slot: a badge, a timestamp, a menu trigger. */\n trailing?: JSX.Element\n /**\n * Move the trailing slot onto its own line, end-aligned under the body, once\n * the item is narrower than 28rem — the width `ListRow` stacks its trailing\n * controls at. Off by default: a row of badges and an icon button fits beside\n * the body, but a pair of labelled buttons squeezes a phone-width body to a\n * few characters.\n */\n stackTrailing?: boolean\n }\n\nexport function Item(props: ItemProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'variant',\n 'size',\n 'media',\n 'trailing',\n 'stackTrailing',\n 'children',\n ])\n\n return (\n <div\n data-slot=\"item\"\n data-stack-trailing={local.stackTrailing ? '' : undefined}\n class={cn(\n itemVariants({ variant: local.variant, size: local.size }),\n // The item is its own query container: the trailing slot answers to the\n // width the item was given, not the viewport, so an item in a narrow\n // column of a wide window stacks too.\n { '@container/item flex-wrap': local.stackTrailing },\n local.class\n )}\n {...rest}\n >\n <Show when={local.media}>\n {(mediaSlot) => (\n <span\n data-slot=\"item-media\"\n class=\"flex size-8 shrink-0 items-center justify-center [&_svg]:size-4\"\n >\n {mediaSlot()}\n </span>\n )}\n </Show>\n <div data-slot=\"item-body\" class=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n {local.children}\n </div>\n <Show when={local.trailing}>\n {(trailingSlot) => (\n <span\n data-slot=\"item-trailing\"\n class={cn('flex shrink-0 items-center gap-2', {\n '@max-md/item:w-full @max-md/item:flex-wrap @max-md/item:justify-end':\n local.stackTrailing,\n })}\n >\n {trailingSlot()}\n </span>\n )}\n </Show>\n </div>\n )\n}\n\nexport function ItemTitle(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return <div data-slot=\"item-title\" class={cn('truncate font-medium', local.class)} {...rest} />\n}\n\nexport type ItemDescriptionProps = ComponentProps<'div'> & {\n /**\n * Clamp to two lines. On by default, so a grid of items keeps one height; pass\n * `false` where the description is the content — a setting's explanation, an\n * error the reader has to read in full.\n */\n clamp?: boolean\n}\n\nexport function ItemDescription(props: ItemDescriptionProps) {\n const [local, rest] = splitProps(props, ['class', 'clamp'])\n return (\n <div\n data-slot=\"item-description\"\n class={cn(\n 'text-muted-foreground text-xs text-pretty',\n { 'line-clamp-2': local.clamp !== false },\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/**\n * A group of items with an optional heading. It is a real `role=\"list\"` with\n * `role=\"listitem\"` children, so a screen reader reports the count — which is how a\n * user knows how many results there are without counting them.\n */\nexport function ItemGroup(\n props: ComponentProps<'div'> & {\n label?: string\n /** The list's accessible name. */ listLabel?: string\n }\n) {\n const [local, rest] = splitProps(props, ['class', 'label', 'listLabel', 'children'])\n\n return (\n <div data-slot=\"item-group\" class={cn('flex flex-col gap-2', local.class)} {...rest}>\n <Show when={local.label}>\n {(labelSlot) => (\n <div class=\"text-muted-foreground text-2xs font-medium tracking-wide uppercase\">\n {labelSlot()}\n </div>\n )}\n </Show>\n <div role=\"list\" aria-label={local.listLabel ?? local.label} class=\"flex flex-col gap-2\">\n {local.children}\n </div>\n </div>\n )\n}\n\n/** An item inside an `ItemGroup`, which is what makes it a list item. */\nexport function ItemGroupEntry(props: ItemProps) {\n return <Item role=\"listitem\" {...props} />\n}\n\n/** A centred message for a group with nothing in it. */\nexport function ItemEmpty(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"item-empty\"\n class={cn('text-muted-foreground py-6 text-center text-sm', local.class)}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAaI,eAAeF,IAAI,qDAAqD;CACnFG,UAAU;EACRC,SAAS;GACPC,SAAS;;GAETC,SAAS;;GAETC,OAAO;EACT;EACAC,MAAM;GACJC,IAAI;GACJC,IAAI;GACJC,IAA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,KAAK,CAAA;EAAA,OAAAE;CAAA,EAAA,CAAA;AAKjE;;AAGA,SAAgBO,eAAexC,OAAkB;CAC/C,OAAAY,gBAAQb,MAAIS,WAAA,EAACiC,MAAI,WAAA,GAAgBzC,KAAK,CAAA;AACxC;;AAGA,SAAgB0C,UAAU1C,OAA8B;CACtD,MAAM,CAACC,OAAOC,QAAQpB,WAAWkB,OAAO,CAAC,OAAO,CAAC;CACjD,cAAA;EAAA,IAAA2C,QAAAC,QAAA;EAAArC,OAAAoC,OAAAnC,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWxB,GAAG,kDAAkDiB,MAAMS,KAAK;EAAC,EAAA,GACpER,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAyC;CAAA,EAAA,CAAA;AAGd"}
@@ -7,7 +7,7 @@ import { type VariantProps } from '#lib/variants';
7
7
  * `<kbd>` so the semantics survive copy-paste, and the mono face is what makes
8
8
  * a shortcut visually distinct from the sentence around it.
9
9
  *
10
- * `size="compact"` exists for the dense rows a default cap would outweigh — a
10
+ * `size="compact"` exists for the dense rows a default cap would outweigh, a
11
11
  * rail search row, a sidebar shortcut hint. It drops a height rung, and it
12
12
  * lightens the fill and weight with it because at that size a solid muted cap
13
13
  * reads heavier than the row text it sits in. The default rendering is every
@@ -46,7 +46,7 @@ export type KbdChordProps = Omit<ComponentProps<'span'>, 'children'> & {
46
46
  * A written chord drawn as caps, one per character. Decoration only: the
47
47
  * composition renders `aria-hidden`, so the accessible name and the parseable
48
48
  * `aria-keyshortcuts` stay on the control the chord belongs to. That is why
49
- * there is no children — the chord says what was drawn, nothing more.
49
+ * there is no children, the chord says what was drawn, nothing more.
50
50
  */
51
51
  export declare function KbdChord(props: KbdChordProps): import("solid-js").JSX.Element;
52
52
  //# sourceMappingURL=kbd.d.ts.map
@@ -12,7 +12,7 @@ var _tmpl$2 = /*#__PURE__*/ template(`<span data-slot=kbd-group>`);
12
12
  * `<kbd>` so the semantics survive copy-paste, and the mono face is what makes
13
13
  * a shortcut visually distinct from the sentence around it.
14
14
  *
15
- * `size="compact"` exists for the dense rows a default cap would outweigh — a
15
+ * `size="compact"` exists for the dense rows a default cap would outweigh, a
16
16
  * rail search row, a sidebar shortcut hint. It drops a height rung, and it
17
17
  * lightens the fill and weight with it because at that size a solid muted cap
18
18
  * reads heavier than the row text it sits in. The default rendering is every
@@ -70,7 +70,7 @@ function kbdChordKeys(keys) {
70
70
  * A written chord drawn as caps, one per character. Decoration only: the
71
71
  * composition renders `aria-hidden`, so the accessible name and the parseable
72
72
  * `aria-keyshortcuts` stay on the control the chord belongs to. That is why
73
- * there is no children — the chord says what was drawn, nothing more.
73
+ * there is no children, the chord says what was drawn, nothing more.
74
74
  */
75
75
  function KbdChord(props) {
76
76
  const [local, rest] = splitProps(props, [
@@ -1 +1 @@
1
- {"version":3,"file":"kbd.js","names":["For","splitProps","cva","cn","kbdVariants","variants","size","default","compact","defaultVariants","Kbd","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class","kbdGroupVariants","KbdGroup","_el$2","_tmpl$2","kbdChordKeys","keys","KbdChord","_$createComponent","children","each","key"],"sources":["../../../../src/components/ui/kbd/kbd.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { For, splitProps } from 'solid-js'\nimport { cva, type VariantProps } from '#lib/variants'\nimport { cn } from '#lib/utils'\n\n/**\n * Kbd.\n *\n * A keyboard key, in the order the user presses them. The element is a real\n * `<kbd>` so the semantics survive copy-paste, and the mono face is what makes\n * a shortcut visually distinct from the sentence around it.\n *\n * `size=\"compact\"` exists for the dense rows a default cap would outweigh — a\n * rail search row, a sidebar shortcut hint. It drops a height rung, and it\n * lightens the fill and weight with it because at that size a solid muted cap\n * reads heavier than the row text it sits in. The default rendering is every\n * cap that is not inside such a row, and it is untouched by the rung.\n *\n * `KbdGroup` exists because a shortcut is a sequence: typing `⌘` then `K`\n * needs a gap between them that is a layout concern, not punctuation.\n */\nexport const kbdVariants = cva(\n 'bg-muted text-muted-foreground pointer-events-none inline-flex min-h-5 min-w-5 items-center justify-center gap-1 rounded-sm border border-border px-1 font-code text-code font-medium select-none',\n {\n variants: {\n size: {\n default: '',\n compact: 'min-h-4 min-w-4 bg-muted/40 px-0.5 font-normal leading-none',\n },\n },\n defaultVariants: {\n size: 'default',\n },\n }\n)\n\nexport type KbdSize = NonNullable<VariantProps<typeof kbdVariants>['size']>\n\nexport function Kbd(props: ComponentProps<'kbd'> & { size?: KbdSize }) {\n const [local, rest] = splitProps(props, ['size', 'class'])\n\n return (\n <kbd data-slot=\"kbd\" class={cn(kbdVariants({ size: local.size }), local.class)} {...rest} />\n )\n}\n\nexport const kbdGroupVariants = cva('inline-flex items-center gap-1', {\n variants: {\n size: {\n default: '',\n /** The gap is what separates caps, so it tightens with them. */\n compact: 'gap-0.5',\n },\n },\n defaultVariants: {\n size: 'default',\n },\n})\n\nexport function KbdGroup(props: ComponentProps<'span'> & { size?: KbdSize }) {\n const [local, rest] = splitProps(props, ['size', 'class'])\n\n return (\n <span\n data-slot=\"kbd-group\"\n class={cn(kbdGroupVariants({ size: local.size }), local.class)}\n {...rest}\n />\n )\n}\n\n/**\n * Split a written chord into one entry per key cap. Every character is a key:\n * `⌘K` renders as `⌘` + `K`, and a longer chord like `⇧⌘P` stays three caps\n * wide, which matches how the system draws chords in menus.\n */\nexport function kbdChordKeys(keys: string): string[] {\n return [...keys]\n}\n\nexport type KbdChordProps = Omit<ComponentProps<'span'>, 'children'> & {\n /** The chord as it is drawn, e.g. `\"⌘K\"` or `\"⇧⌘P\"`. One cap per character. */\n keys: string\n size?: KbdSize\n}\n\n/**\n * KbdChord.\n *\n * A written chord drawn as caps, one per character. Decoration only: the\n * composition renders `aria-hidden`, so the accessible name and the parseable\n * `aria-keyshortcuts` stay on the control the chord belongs to. That is why\n * there is no children — the chord says what was drawn, nothing more.\n */\nexport function KbdChord(props: KbdChordProps) {\n const [local, rest] = splitProps(props, ['keys', 'size', 'class'])\n\n return (\n <KbdGroup {...rest} size={local.size} class={local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,MAAM,CAACC,OAAOC,QAAQZ,WAAWU,OAAO;EAAC;EAAQ;EAAQ;CAAO,CAAC;CAEjE,OAAAe,gBACGN,UAAQH,WAAKJ,MAAI;EAAA,IAAEP,OAAI;GAAA,OAAEM,MAAMN;EAAI;EAAA,KAAA,WAAA;GAAA,OAASM,MAAMM;EAAK;EAAA,eAAA;EAAA,IAAAS,WAAA;GAAA,OAAAD,gBACrD1B,KAAG;IAAA,IAAC4B,OAAI;KAAA,OAAEL,aAAaX,MAAMY,IAAI;IAAC;IAAAG,WAAIE,QAAGH,gBAAMhB,KAAG;KAAA,IAACJ,OAAI;MAAA,OAAEM,MAAMN;KAAI;KAAAqB,UAAGE;IAAG,CAAA;GAAO,CAAA;EAAA;CAAA,CAAA,CAAA;AAGvF"}
1
+ {"version":3,"file":"kbd.js","names":["For","splitProps","cva","cn","kbdVariants","variants","size","default","compact","defaultVariants","Kbd","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class","kbdGroupVariants","KbdGroup","_el$2","_tmpl$2","kbdChordKeys","keys","KbdChord","_$createComponent","children","each","key"],"sources":["../../../../src/components/ui/kbd/kbd.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { For, splitProps } from 'solid-js'\nimport { cva, type VariantProps } from '#lib/variants'\nimport { cn } from '#lib/utils'\n\n/**\n * Kbd.\n *\n * A keyboard key, in the order the user presses them. The element is a real\n * `<kbd>` so the semantics survive copy-paste, and the mono face is what makes\n * a shortcut visually distinct from the sentence around it.\n *\n * `size=\"compact\"` exists for the dense rows a default cap would outweigh, a\n * rail search row, a sidebar shortcut hint. It drops a height rung, and it\n * lightens the fill and weight with it because at that size a solid muted cap\n * reads heavier than the row text it sits in. The default rendering is every\n * cap that is not inside such a row, and it is untouched by the rung.\n *\n * `KbdGroup` exists because a shortcut is a sequence: typing `⌘` then `K`\n * needs a gap between them that is a layout concern, not punctuation.\n */\nexport const kbdVariants = cva(\n 'bg-muted text-muted-foreground pointer-events-none inline-flex min-h-5 min-w-5 items-center justify-center gap-1 rounded-sm border border-border px-1 font-code text-code font-medium select-none',\n {\n variants: {\n size: {\n default: '',\n compact: 'min-h-4 min-w-4 bg-muted/40 px-0.5 font-normal leading-none',\n },\n },\n defaultVariants: {\n size: 'default',\n },\n }\n)\n\nexport type KbdSize = NonNullable<VariantProps<typeof kbdVariants>['size']>\n\nexport function Kbd(props: ComponentProps<'kbd'> & { size?: KbdSize }) {\n const [local, rest] = splitProps(props, ['size', 'class'])\n\n return (\n <kbd data-slot=\"kbd\" class={cn(kbdVariants({ size: local.size }), local.class)} {...rest} />\n )\n}\n\nexport const kbdGroupVariants = cva('inline-flex items-center gap-1', {\n variants: {\n size: {\n default: '',\n /** The gap is what separates caps, so it tightens with them. */\n compact: 'gap-0.5',\n },\n },\n defaultVariants: {\n size: 'default',\n },\n})\n\nexport function KbdGroup(props: ComponentProps<'span'> & { size?: KbdSize }) {\n const [local, rest] = splitProps(props, ['size', 'class'])\n\n return (\n <span\n data-slot=\"kbd-group\"\n class={cn(kbdGroupVariants({ size: local.size }), local.class)}\n {...rest}\n />\n )\n}\n\n/**\n * Split a written chord into one entry per key cap. Every character is a key:\n * `⌘K` renders as `⌘` + `K`, and a longer chord like `⇧⌘P` stays three caps\n * wide, which matches how the system draws chords in menus.\n */\nexport function kbdChordKeys(keys: string): string[] {\n return [...keys]\n}\n\nexport type KbdChordProps = Omit<ComponentProps<'span'>, 'children'> & {\n /** The chord as it is drawn, e.g. `\"⌘K\"` or `\"⇧⌘P\"`. One cap per character. */\n keys: string\n size?: KbdSize\n}\n\n/**\n * KbdChord.\n *\n * A written chord drawn as caps, one per character. Decoration only: the\n * composition renders `aria-hidden`, so the accessible name and the parseable\n * `aria-keyshortcuts` stay on the control the chord belongs to. That is why\n * there is no children, the chord says what was drawn, nothing more.\n */\nexport function KbdChord(props: KbdChordProps) {\n const [local, rest] = splitProps(props, ['keys', 'size', 'class'])\n\n return (\n <KbdGroup {...rest} size={local.size} class={local.class} aria-hidden=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