@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
@@ -1 +1 @@
1
- {"version":3,"file":"switch.js","names":["Switch","KobalteSwitch","splitProps","useFormFieldControl","cn","inputId","controlClass","thumbClass","labelClass","descriptionClass","label","description","children","props","local","rest","field","id","_$createComponent","_$mergeProps","undefined","title","class","Input","Control","Thumb","_$memo","_el$","_tmpl$","_$insert","_c$","Label","_c$2","Description","SwitchLabel","SwitchDescription"],"sources":["../../../../src/components/ui/switch/switch.tsx"],"sourcesContent":["import { Switch as KobalteSwitch } from '@kobalte/core/switch'\nimport 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 * Switch.\n *\n * For a setting that takes effect the moment it is flipped. The distinction\n * from Checkbox is behaviour, not looks: a switch applies immediately and\n * belongs in a settings row, while a checkbox is a value the user is still\n * composing and is applied when a form is submitted. A switch inside an unsaved\n * form is the mistake this split exists to prevent.\n *\n * `Switch.Input` renders a real hidden checkbox, so the control is\n * form-native, keyboard-operable, and its `aria-checked` follows the state the\n * user sees.\n */\nexport type SwitchProps = Omit<ComponentProps<typeof KobalteSwitch>, 'children'> & {\n /** ID for the hidden native switch input; useful with an external label. */\n inputId?: string\n controlClass?: string\n thumbClass?: string\n labelClass?: string\n descriptionClass?: string\n label?: JSX.Element\n description?: JSX.Element\n /**\n * Replaces the control and label. Omit it to get the default control beside\n * `label` and `description`; supply it to compose the parts yourself.\n */\n children?: JSX.Element\n}\n\nexport function Switch(props: SwitchProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'controlClass',\n 'thumbClass',\n 'labelClass',\n 'descriptionClass',\n 'children',\n 'label',\n 'description',\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'aria-invalid',\n 'aria-errormessage',\n 'aria-busy',\n 'id',\n 'inputId',\n 'title',\n ])\n const field = useFormFieldControl('control', {\n id: local.inputId ?? 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 <KobalteSwitch\n data-slot=\"switch\"\n id={field ? undefined : local.id}\n title={local.title}\n class={cn('group/switch flex items-center gap-2.5', local.class)}\n {...rest}\n >\n {/* The name belongs on the input; see Checkbox for why. */}\n <KobalteSwitch.Input\n id={field?.id ?? local.inputId}\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 aria-busy={local['aria-busy']}\n title={local.title}\n />\n <KobalteSwitch.Control\n class={cn(\n 'bg-input inline-flex h-5 w-9 shrink-0 items-center rounded-full border border-transparent',\n 'transition-colors ease-out outline-none',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'data-[checked]:bg-primary',\n 'data-[invalid]:border-destructive',\n 'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',\n local.controlClass\n )}\n >\n <KobalteSwitch.Thumb\n class={cn(\n 'bg-background pointer-events-none block size-4 rounded-full shadow-xs',\n 'transition-transform ease-out',\n 'data-[checked]:translate-x-4',\n local.thumbClass\n )}\n />\n </KobalteSwitch.Control>\n {local.children ??\n (local.label || local.description ? (\n <div class=\"grid gap-0.5\">\n {local.label ? (\n <KobalteSwitch.Label class={cn('text-sm leading-none font-medium', local.labelClass)}>\n {local.label}\n </KobalteSwitch.Label>\n ) : null}\n {local.description ? (\n <KobalteSwitch.Description\n class={cn('text-muted-foreground text-sm', local.descriptionClass)}\n >\n {local.description}\n </KobalteSwitch.Description>\n ) : null}\n </div>\n ) : null)}\n </KobalteSwitch>\n )\n}\n\n/**\n * The switch's own label. Valid only inside a `<Switch>`: it is Kobalte's label\n * for that root's control, and outside one there is nothing to associate with.\n * A label drawn *beside* a switch — a settings row with the control trailing —\n * is plain text, and the switch takes an `aria-label` instead.\n */\nexport function SwitchLabel(props: ComponentProps<typeof KobalteSwitch.Label>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteSwitch.Label class={cn('text-sm leading-none font-medium', local.class)} {...rest} />\n )\n}\n\nexport function SwitchDescription(props: ComponentProps<typeof KobalteSwitch.Description>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteSwitch.Description class={cn('text-muted-foreground text-sm', local.class)} {...rest} />\n )\n}\n"],"mappings":";;;;;;;AAmCA,SAAgBA,SAAOa,OAAoB;CACzC,MAAM,CAACC,OAAOC,QAAQb,WAAWW,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAO,CACR;CACD,MAAMG,QAAQb,oBAAoB,WAAW;EAC3Cc,IAAIH,MAAMT,WAAWS,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olveChildren","splitProps","useFormFieldControl","cn","inputId","controlClass","thumbClass","labelClass","descriptionClass","label","description","props","local","rest","field","id","_$createComponent","_$mergeProps","undefined","title","class","Input","Control","Thumb","_$memo","_el$","_tmpl$","_$insert","_c$","Label","_c$2","Description","SwitchLabel","SwitchDescription"],"sources":["../../../../src/components/ui/switch/switch.tsx"],"sourcesContent":["import { Switch as KobalteSwitch } from '@kobalte/core/switch'\nimport type { ComponentProps, JSX } from 'solid-js'\nimport { children as resolveChildren, splitProps } from 'solid-js'\nimport { useFormFieldControl } from '#lib/form-field'\nimport { cn } from '#lib/utils'\n\n/**\n * Switch.\n *\n * For a setting that takes effect the moment it is flipped. The distinction\n * from Checkbox is behaviour, not looks: a switch applies immediately and\n * belongs in a settings row, while a checkbox is a value the user is still\n * composing and is applied when a form is submitted. A switch inside an unsaved\n * form is the mistake this split exists to prevent.\n *\n * `Switch.Input` renders a real hidden checkbox, so the control is\n * form-native, keyboard-operable, and its `aria-checked` follows the state the\n * user sees.\n */\nexport type SwitchProps = Omit<ComponentProps<typeof KobalteSwitch>, 'children'> & {\n /** ID for the hidden native switch input; useful with an external label. */\n inputId?: string\n controlClass?: string\n thumbClass?: string\n labelClass?: string\n descriptionClass?: string\n label?: JSX.Element\n description?: JSX.Element\n /**\n * Replaces the control and label. Omit it to get the default control beside\n * `label` and `description`; supply it to compose the parts yourself.\n */\n children?: JSX.Element\n}\n\nexport function Switch(props: SwitchProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'controlClass',\n 'thumbClass',\n 'labelClass',\n 'descriptionClass',\n 'children',\n 'label',\n 'description',\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'aria-invalid',\n 'aria-errormessage',\n 'aria-busy',\n 'id',\n 'inputId',\n 'title',\n ])\n const field = useFormFieldControl('control', {\n id: local.inputId ?? 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 // Slots are JSX getters that build per read; resolve each once.\n const label = resolveChildren(() => local.label)\n const description = resolveChildren(() => local.description)\n return (\n <KobalteSwitch\n data-slot=\"switch\"\n id={field ? undefined : local.id}\n title={local.title}\n class={cn('group/switch flex items-center gap-2.5', local.class)}\n {...rest}\n >\n {/* The name belongs on the input; see Checkbox for why. */}\n <KobalteSwitch.Input\n id={field?.id ?? local.inputId}\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 aria-busy={local['aria-busy']}\n title={local.title}\n />\n <KobalteSwitch.Control\n class={cn(\n 'bg-input inline-flex h-5 w-9 shrink-0 items-center rounded-full border border-transparent',\n 'transition-colors ease-out outline-none',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'data-[checked]:bg-primary',\n 'data-[invalid]:border-destructive',\n 'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',\n local.controlClass\n )}\n >\n <KobalteSwitch.Thumb\n class={cn(\n 'bg-background pointer-events-none block size-4 rounded-full shadow-xs',\n 'transition-transform ease-out',\n 'data-[checked]:translate-x-4',\n local.thumbClass\n )}\n />\n </KobalteSwitch.Control>\n {local.children ??\n (label() || description() ? (\n <div class=\"grid gap-0.5\">\n {label() ? (\n <KobalteSwitch.Label class={cn('text-sm leading-none font-medium', local.labelClass)}>\n {label()}\n </KobalteSwitch.Label>\n ) : null}\n {description() ? (\n <KobalteSwitch.Description\n class={cn('text-muted-foreground text-sm', local.descriptionClass)}\n >\n {description()}\n </KobalteSwitch.Description>\n ) : null}\n </div>\n ) : null)}\n </KobalteSwitch>\n )\n}\n\n/**\n * The switch's own label. Valid only inside a `<Switch>`: it is Kobalte's label\n * for that root's control, and outside one there is nothing to associate with.\n * A label drawn *beside* a switch — a settings row with the control trailing —\n * is plain text, and the switch takes an `aria-label` instead.\n */\nexport function SwitchLabel(props: ComponentProps<typeof KobalteSwitch.Label>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteSwitch.Label class={cn('text-sm leading-none font-medium', local.class)} {...rest} />\n )\n}\n\nexport function SwitchDescription(props: ComponentProps<typeof KobalteSwitch.Description>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteSwitch.Description class={cn('text-muted-foreground text-sm', local.class)} {...rest} />\n )\n}\n"],"mappings":";;;;;;;AAmCA,SAAgBA,SAAOc,OAAoB;CACzC,MAAM,CAACC,OAAOC,QAAQZ,WAAWU,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAO,CACR;CACD,MAAMG,QAAQZ,oBAAoB,WAAW;EAC3Ca,IAAIH,MAAMR,WAAWQ,MAAMG;EAC3B,cAAcH,MAAM;EACpB,mBAAmBA,MAAM;EACzB,oBAAoBA,MAAM;EAC1B,gBAAgBA,MAAM;EACtB,qBAAqBA,MAAM;CAC7B,CAAC;CAGD,MAAMH,QAAQT,eAAsBY,MAAMH,KAAK;CAC/C,MAAMC,cAAcV,eAAsBY,MAAMF,WAAW;CAC3D,OAAAM,gBACGlB,UAAamB,WAAA;EAAA,aAAA;EAAA,IAEZF,KAAE;GAAA,OAAED,QAAQI,KAAAA,IAAYN,MAAMG;EAAE;EAAA,IAChCI,QAAK;GAAA,OAAEP,MAAMO;EAAK;EAAA,KAAA,WAAA;GAAA,OACXhB,GAAG,0CAA0CS,MAAMQ,KAAK;EAAC;CAAA,GAC5DP,MAAI,EAAA,IAAAd,WAAA;EAAA,OAAA;GAAAiB,gBAGPlB,SAAcuB,OAAK;IAAA,IAClBN,KAAE;KAAA,OAAED,OAAOC,MAAMH,MAAMR;IAAO;IAAA,KAAA,gBAAA;KAAA,OAClBQ,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AEjEW,YAAY;MAAC;KAAA,CAAA,IAEd;IAAI,EAAA,CAAA,GAAA,IAAA;IAAA,OAAAe;GAAA,EAAA,CAAA,IAER,KAAK;EAAA;CAAA,EAAA,CAAA,CAAA;AAGjB;;;;;;;AAQA,SAAgBO,YAAYrB,OAAmD;CAC7E,MAAM,CAACC,OAAOC,QAAQZ,WAAWU,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAK,gBACGlB,SAAc+B,OAAKZ,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQd,GAAG,oCAAoCS,MAAMQ,KAAK;CAAC,EAAA,GAAMP,IAAI,CAAA;AAE7F;AAEA,SAAgBoB,kBAAkBtB,OAAyD;CACzF,MAAM,CAACC,OAAOC,QAAQZ,WAAWU,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAK,gBACGlB,SAAciC,aAAWd,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQd,GAAG,iCAAiCS,MAAMQ,KAAK;CAAC,EAAA,GAAMP,IAAI,CAAA;AAEhG"}
@@ -3,7 +3,7 @@ import type { ComponentProps } from 'solid-js';
3
3
  /**
4
4
  * Tabs.
5
5
  *
6
- * For switching between sibling views of the *same* subject — a file's code,
6
+ * For switching between sibling views of the *same* subject, a file's code,
7
7
  * diff and history. Not for moving between pages: a tab is expected to keep
8
8
  * its panel and its scroll position, which a route does not.
9
9
  *
@@ -28,7 +28,7 @@ export type TabsListProps = ComponentProps<typeof KobalteTabs.List> & {
28
28
  };
29
29
  /**
30
30
  * The underline appearance's rule is the baseline a horizontal row of tabs sits
31
- * on. A vertical list has no baseline — its triggers stack — so the rule is
31
+ * on. A vertical list has no baseline, its triggers stack, so the rule is
32
32
  * dropped there; otherwise it draws as a stray line under the last trigger,
33
33
  * spanning only the list's width (the SettingsLayout rail showed exactly that).
34
34
  *
@@ -46,8 +46,8 @@ export type TabsTriggerProps = ComponentProps<typeof KobalteTabs.Trigger> & {
46
46
  * The underline appearance marks the selected trigger on the edge it shares
47
47
  * with the list's axis. A horizontal row reads left to right along a baseline,
48
48
  * so the mark is a bottom bar sitting on the list's rule. A vertical list stacks
49
- * its triggers, and a bottom bar there underlines one row of a column — it reads
50
- * as a divider, not a selection — so the mark moves to the inline-start edge,
49
+ * its triggers, and a bottom bar there underlines one row of a column, it reads
50
+ * as a divider, not a selection, so the mark moves to the inline-start edge,
51
51
  * the leading bar a side navigation uses, and the label aligns to that edge.
52
52
  *
53
53
  * The orientation is read from the root rather than from a `data-orientation`
@@ -12,7 +12,7 @@ function useTabsId() {
12
12
  /**
13
13
  * Tabs.
14
14
  *
15
- * For switching between sibling views of the *same* subject — a file's code,
15
+ * For switching between sibling views of the *same* subject, a file's code,
16
16
  * diff and history. Not for moving between pages: a tab is expected to keep
17
17
  * its panel and its scroll position, which a route does not.
18
18
  *
@@ -57,7 +57,7 @@ function Tabs$1(props) {
57
57
  }
58
58
  /**
59
59
  * The underline appearance's rule is the baseline a horizontal row of tabs sits
60
- * on. A vertical list has no baseline — its triggers stack — so the rule is
60
+ * on. A vertical list has no baseline, its triggers stack, so the rule is
61
61
  * dropped there; otherwise it draws as a stray line under the last trigger,
62
62
  * spanning only the list's width (the SettingsLayout rail showed exactly that).
63
63
  *
@@ -86,8 +86,8 @@ function TabsList(props) {
86
86
  * The underline appearance marks the selected trigger on the edge it shares
87
87
  * with the list's axis. A horizontal row reads left to right along a baseline,
88
88
  * so the mark is a bottom bar sitting on the list's rule. A vertical list stacks
89
- * its triggers, and a bottom bar there underlines one row of a column — it reads
90
- * as a divider, not a selection — so the mark moves to the inline-start edge,
89
+ * its triggers, and a bottom bar there underlines one row of a column, it reads
90
+ * as a divider, not a selection, so the mark moves to the inline-start edge,
91
91
  * the leading bar a side navigation uses, and the label aligns to that edge.
92
92
  *
93
93
  * The orientation is read from the root rather than from a `data-orientation`
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.js","names":["Tabs","KobalteTabs","createContext","createRenderEffect","createSignal","createUniqueId","onCleanup","splitProps","useContext","cn","id","orientation","triggerIds","registerTriggerId","value","unregisterTriggerId","TabsIdContext","useTabsId","tabs","Error","props","local","rest","generatedId","setTriggerIds","Map","triggerId","current","set","get","next","delete","_$createComponent","Provider","children","_$mergeProps","class","List","appearance","fill","scrollable","TabsList","underline","Trigger","TabsTrigger","TabsContent","Content"],"sources":["../../../../src/components/ui/tabs/tabs.tsx"],"sourcesContent":["import { Tabs as KobalteTabs } from '@kobalte/core/tabs'\nimport type { Accessor, ComponentProps } from 'solid-js'\nimport {\n createContext,\n createRenderEffect,\n createSignal,\n createUniqueId,\n onCleanup,\n splitProps,\n useContext,\n} from 'solid-js'\nimport { cn } from '#lib/utils'\n\ntype TabsIdContextValue = {\n id: Accessor<string>\n orientation: Accessor<'horizontal' | 'vertical'>\n triggerIds: Accessor<ReadonlyMap<string, string>>\n registerTriggerId: (value: string, id: string) => void\n unregisterTriggerId: (value: string, id: string) => void\n}\n\nconst TabsIdContext = createContext<TabsIdContextValue>()\n\nfunction useTabsId() {\n const tabs = useContext(TabsIdContext)\n if (!tabs) throw new Error('[adea-ui]: Tabs parts must be used within Tabs.')\n return tabs\n}\n\n/**\n * Tabs.\n *\n * For switching between sibling views of the *same* subject — a file's code,\n * diff and history. Not for moving between pages: a tab is expected to keep\n * its panel and its scroll position, which a route does not.\n *\n * `appearance=\"segmented\"` gives the joined bar KiroCrew uses inside a pane\n * where a full-width underline would collide with the panel's own header rule.\n */\nexport function Tabs(props: ComponentProps<typeof KobalteTabs>) {\n const [local, rest] = splitProps(props, ['class', 'id'])\n const generatedId = `tabs-${createUniqueId()}`\n const id = () => local.id ?? generatedId\n const [triggerIds, setTriggerIds] = createSignal<ReadonlyMap<string, string>>(new Map())\n const tabs: TabsIdContextValue = {\n id,\n orientation: () => rest.orientation ?? 'horizontal',\n triggerIds,\n registerTriggerId: (value, triggerId) => {\n setTriggerIds((current) => new Map(current).set(value, triggerId))\n },\n unregisterTriggerId: (value, triggerId) => {\n setTriggerIds((current) => {\n if (current.get(value) !== triggerId) return current\n const next = new Map(current)\n next.delete(value)\n return next\n })\n },\n }\n\n return (\n <TabsIdContext.Provider value={tabs}>\n <KobalteTabs\n data-slot=\"tabs\"\n id={id()}\n class={cn(\n 'flex min-h-0 min-w-0 flex-col gap-2 data-[orientation=vertical]:flex-row',\n local.class\n )}\n {...rest}\n />\n </TabsIdContext.Provider>\n )\n}\n\nexport type TabsListProps = ComponentProps<typeof KobalteTabs.List> & {\n appearance?: 'underline' | 'segmented'\n /**\n * Span the container, with the triggers at the start. For a row of tabs that\n * heads a pane: the underline's rule then runs the pane's full width, the\n * way the pane's other header rules do, instead of stopping at the last tab.\n */\n fill?: boolean\n /**\n * Scroll sideways when the triggers outgrow the row, with no visible\n * scrollbar, instead of overflowing it. Implies `fill`. The underline's rule\n * is drawn inside the scroller so the selected mark still sits on it.\n */\n scrollable?: boolean\n}\n\n/**\n * The underline appearance's rule is the baseline a horizontal row of tabs sits\n * on. A vertical list has no baseline — its triggers stack — so the rule is\n * dropped there; otherwise it draws as a stray line under the last trigger,\n * spanning only the list's width (the SettingsLayout rail showed exactly that).\n *\n * A scrolling list cannot draw that rule as its border: a scroller clips at its\n * padding edge, and the selected trigger's mark overlaps the border by a pixel\n * (`-mb-px`), so the mark would be cut off and the list would scroll vertically\n * by that pixel. It reserves the pixel as padding instead and paints the rule\n * there with an inset shadow, which lands exactly where the border was.\n */\nexport function TabsList(props: TabsListProps) {\n const [local, rest] = splitProps(props, ['class', 'appearance', 'fill', 'scrollable'])\n const underline = () => local.appearance !== 'segmented'\n\n return (\n <KobalteTabs.List\n data-slot=\"tabs-list\"\n class={cn(\n 'shrink-0 items-center',\n local.fill || local.scrollable\n ? 'flex w-full justify-start'\n : 'inline-flex w-fit justify-center',\n local.scrollable && 'no-scrollbar overflow-x-auto overflow-y-hidden',\n !underline()\n ? 'gap-0.5 rounded-lg bg-surface-hover p-0.5'\n : local.scrollable\n ? 'gap-1 rounded-none pb-px shadow-[inset_0_-1px_0_var(--border)] data-[orientation=vertical]:pb-0 data-[orientation=vertical]:shadow-none'\n : 'gap-1 rounded-none border-b border-border data-[orientation=vertical]:border-b-0',\n 'data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport type TabsTriggerProps = ComponentProps<typeof KobalteTabs.Trigger> & {\n appearance?: 'underline' | 'segmented'\n}\n\n/**\n * The underline appearance marks the selected trigger on the edge it shares\n * with the list's axis. A horizontal row reads left to right along a baseline,\n * so the mark is a bottom bar sitting on the list's rule. A vertical list stacks\n * its triggers, and a bottom bar there underlines one row of a column — it reads\n * as a divider, not a selection — so the mark moves to the inline-start edge,\n * the leading bar a side navigation uses, and the label aligns to that edge.\n *\n * The orientation is read from the root rather than from a `data-orientation`\n * selector so the vertical classes are unprefixed: a composite that replaces the\n * mark (SettingsNavigation's filled row passes `border-0`) then overrides it\n * through the ordinary class merge instead of fighting a variant-scoped border.\n */\nexport function TabsTrigger(props: TabsTriggerProps) {\n const [local, rest] = splitProps(props, ['class', 'appearance', 'id'])\n const tabs = useTabsId()\n const triggerId = () => local.id ?? `${tabs.id()}-trigger-${rest.value}`\n\n // Register before panels render, including SSR where createEffect is skipped.\n createRenderEffect(() => {\n const value = rest.value\n const id = triggerId()\n tabs.registerTriggerId(value, id)\n onCleanup(() => tabs.unregisterTriggerId(value, id))\n })\n\n return (\n <KobalteTabs.Trigger\n data-slot=\"tabs-trigger\"\n id={triggerId()}\n class={cn(\n 'inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap text-sm font-medium',\n 'transition-colors ease-out outline-none select-none',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'disabled:pointer-events-none disabled:opacity-50',\n 'text-foreground',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4',\n local.appearance === 'segmented'\n ? 'h-control-sm rounded-md px-control-sm data-[selected]:bg-primary-subtle data-[selected]:text-foreground'\n : tabs.orientation() === 'vertical'\n ? 'h-control-md justify-start rounded-none border-s-2 border-transparent ps-3 pe-2 data-[selected]:border-primary'\n : 'h-control-md -mb-px rounded-none border-b-2 border-transparent px-2 pb-2 data-[selected]:border-primary',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function TabsContent(props: ComponentProps<typeof KobalteTabs.Content>) {\n const [local, rest] = splitProps(props, ['class', 'aria-labelledby'])\n const tabs = useTabsId()\n return (\n <KobalteTabs.Content\n data-slot=\"tabs-content\"\n aria-labelledby={\n local['aria-labelledby'] ??\n tabs.triggerIds().get(rest.value) ??\n `${tabs.id()}-trigger-${rest.value}`\n }\n class={cn('min-h-0 min-w-0 flex-1 outline-none', local.class)}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;AAqBA,IAAMgB,gBAAgBd,cAAkC;AAExD,SAASe,YAAY;CACnB,MAAMC,OAAOV,WAAWQ,aAAa;CACrC,IAAI,CAACE,MAAM,MAAM,IAAIC,MAAM,iDAAiD;CAC5E,OAAOD;AACT;;;;;;;;;;;AAYA,SAAgBlB,OAAKoB,OAA2C;CAC9D,MAAM,CAACC,OAAOC,QAAQf,WAAWa,OAAO,CAAC,SAAS,IAAI,CAAC;CACvD,MAAMG,cAAc,QAAQlB,eAAe;CAC3C,MAAMK,WAAWW,MAAMX,MAAMa;CAC7B,MAAM,CAACX,YAAYY,iBAAiBpB,6BAA0C,IAAIqB,IAAI,CAAC;CACvF,MAAMP,OAA2B;EAC/BR;EACAC,mBAAmBW,KAAKX,eAAe;EACvCC;EACAC,oBAAoBC,OAAOY,cAAc;GACvCF,eAAeG,YAAY,IAAIF,IAAIE,OAAO,CAAC,CAACC,IAAId,OAAOY,SAAS,CAAC;EACnE;EACAX,sBAAsBD,OAAOY,cAAc;GACzCF,eAAeG,YAAY;IACzB,IAAIA,QAAQE,IAAIf,KAAK,MAAMY,WAAW,OAAOC;IAC7C,MAAMG,OAAO,IAAIL,IAAIE,OAAO;IAC5BG,KAAKC,OAAOjB,KAAK;IACjB,OAAOgB;GACT,CAAC;EACH;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AC;EAAA,KAAA,WAAA;GAAA,OACRjB,GACL,kGACA,uDACA,oFACA,oDACA,mBACA,+DACAY,MAAMiB,eAAe,cACjB,4GACApB,KAAKP,YAAY,MAAM,aACrB,mHACA,2GACNU,MAAMe,KACR;EAAC;CAAA,GACGd,IAAI,CAAA;AAGd;AAEA,SAAgBuB,YAAYzB,OAAmD;CAC7E,MAAM,CAACC,OAAOC,QAAQf,WAAWa,OAAO,CAAC,SAAS,iBAAiB,CAAC;CACpE,MAAMF,OAAOD,UAAU;CACvB,OAAAe,gBACG/B,KAAY6C,SAAOX,WAAA;EAAA,aAAA;EAAA,KAAA,qBAAA;GAAA,OAGhBd,MAAM,sBACNH,KAAKN,WAAW,CAAC,CAACiB,IAAIP,KAAKR,KAAK,KAChC,GAAGI,KAAKR,GAAG,EAAC,WAAYY,KAAKR;EAAO;EAAA,KAAA,WAAA;GAAA,OAE/BL,GAAG,uCAAuCY,MAAMe,KAAK;EAAC;CAAA,GACzDd,IAAI,CAAA;AAGd"}
1
+ {"version":3,"file":"tabs.js","names":["Tabs","KobalteTabs","createContext","createRenderEffect","createSignal","createUniqueId","onCleanup","splitProps","useContext","cn","id","orientation","triggerIds","registerTriggerId","value","unregisterTriggerId","TabsIdContext","useTabsId","tabs","Error","props","local","rest","generatedId","setTriggerIds","Map","triggerId","current","set","get","next","delete","_$createComponent","Provider","children","_$mergeProps","class","List","appearance","fill","scrollable","TabsList","underline","Trigger","TabsTrigger","TabsContent","Content"],"sources":["../../../../src/components/ui/tabs/tabs.tsx"],"sourcesContent":["import { Tabs as KobalteTabs } from '@kobalte/core/tabs'\nimport type { Accessor, ComponentProps } from 'solid-js'\nimport {\n createContext,\n createRenderEffect,\n createSignal,\n createUniqueId,\n onCleanup,\n splitProps,\n useContext,\n} from 'solid-js'\nimport { cn } from '#lib/utils'\n\ntype TabsIdContextValue = {\n id: Accessor<string>\n orientation: Accessor<'horizontal' | 'vertical'>\n triggerIds: Accessor<ReadonlyMap<string, string>>\n registerTriggerId: (value: string, id: string) => void\n unregisterTriggerId: (value: string, id: string) => void\n}\n\nconst TabsIdContext = createContext<TabsIdContextValue>()\n\nfunction useTabsId() {\n const tabs = useContext(TabsIdContext)\n if (!tabs) throw new Error('[adea-ui]: Tabs parts must be used within Tabs.')\n return tabs\n}\n\n/**\n * Tabs.\n *\n * For switching between sibling views of the *same* subject, a file's code,\n * diff and history. Not for moving between pages: a tab is expected to keep\n * its panel and its scroll position, which a route does not.\n *\n * `appearance=\"segmented\"` gives the joined bar KiroCrew uses inside a pane\n * where a full-width underline would collide with the panel's own header rule.\n */\nexport function Tabs(props: ComponentProps<typeof KobalteTabs>) {\n const [local, rest] = splitProps(props, ['class', 'id'])\n const generatedId = `tabs-${createUniqueId()}`\n const id = () => local.id ?? generatedId\n const [triggerIds, setTriggerIds] = createSignal<ReadonlyMap<string, string>>(new Map())\n const tabs: TabsIdContextValue = {\n id,\n orientation: () => rest.orientation ?? 'horizontal',\n triggerIds,\n registerTriggerId: (value, triggerId) => {\n setTriggerIds((current) => new Map(current).set(value, triggerId))\n },\n unregisterTriggerId: (value, triggerId) => {\n setTriggerIds((current) => {\n if (current.get(value) !== triggerId) return current\n const next = new Map(current)\n next.delete(value)\n return next\n })\n },\n }\n\n return (\n <TabsIdContext.Provider value={tabs}>\n <KobalteTabs\n data-slot=\"tabs\"\n id={id()}\n class={cn(\n 'flex min-h-0 min-w-0 flex-col gap-2 data-[orientation=vertical]:flex-row',\n local.class\n )}\n {...rest}\n />\n </TabsIdContext.Provider>\n )\n}\n\nexport type TabsListProps = ComponentProps<typeof KobalteTabs.List> & {\n appearance?: 'underline' | 'segmented'\n /**\n * Span the container, with the triggers at the start. For a row of tabs that\n * heads a pane: the underline's rule then runs the pane's full width, the\n * way the pane's other header rules do, instead of stopping at the last tab.\n */\n fill?: boolean\n /**\n * Scroll sideways when the triggers outgrow the row, with no visible\n * scrollbar, instead of overflowing it. Implies `fill`. The underline's rule\n * is drawn inside the scroller so the selected mark still sits on it.\n */\n scrollable?: boolean\n}\n\n/**\n * The underline appearance's rule is the baseline a horizontal row of tabs sits\n * on. A vertical list has no baseline, its triggers stack, so the rule is\n * dropped there; otherwise it draws as a stray line under the last trigger,\n * spanning only the list's width (the SettingsLayout rail showed exactly that).\n *\n * A scrolling list cannot draw that rule as its border: a scroller clips at its\n * padding edge, and the selected trigger's mark overlaps the border by a pixel\n * (`-mb-px`), so the mark would be cut off and the list would scroll vertically\n * by that pixel. It reserves the pixel as padding instead and paints the rule\n * there with an inset shadow, which lands exactly where the border was.\n */\nexport function TabsList(props: TabsListProps) {\n const [local, rest] = splitProps(props, ['class', 'appearance', 'fill', 'scrollable'])\n const underline = () => local.appearance !== 'segmented'\n\n return (\n <KobalteTabs.List\n data-slot=\"tabs-list\"\n class={cn(\n 'shrink-0 items-center',\n local.fill || local.scrollable\n ? 'flex w-full justify-start'\n : 'inline-flex w-fit justify-center',\n local.scrollable && 'no-scrollbar overflow-x-auto overflow-y-hidden',\n !underline()\n ? 'gap-0.5 rounded-lg bg-surface-hover p-0.5'\n : local.scrollable\n ? 'gap-1 rounded-none pb-px shadow-[inset_0_-1px_0_var(--border)] data-[orientation=vertical]:pb-0 data-[orientation=vertical]:shadow-none'\n : 'gap-1 rounded-none border-b border-border data-[orientation=vertical]:border-b-0',\n 'data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport type TabsTriggerProps = ComponentProps<typeof KobalteTabs.Trigger> & {\n appearance?: 'underline' | 'segmented'\n}\n\n/**\n * The underline appearance marks the selected trigger on the edge it shares\n * with the list's axis. A horizontal row reads left to right along a baseline,\n * so the mark is a bottom bar sitting on the list's rule. A vertical list stacks\n * its triggers, and a bottom bar there underlines one row of a column, it reads\n * as a divider, not a selection, so the mark moves to the inline-start edge,\n * the leading bar a side navigation uses, and the label aligns to that edge.\n *\n * The orientation is read from the root rather than from a `data-orientation`\n * selector so the vertical classes are unprefixed: a composite that replaces the\n * mark (SettingsNavigation's filled row passes `border-0`) then overrides it\n * through the ordinary class merge instead of fighting a variant-scoped border.\n */\nexport function TabsTrigger(props: TabsTriggerProps) {\n const [local, rest] = splitProps(props, ['class', 'appearance', 'id'])\n const tabs = useTabsId()\n const triggerId = () => local.id ?? `${tabs.id()}-trigger-${rest.value}`\n\n // Register before panels render, including SSR where createEffect is skipped.\n createRenderEffect(() => {\n const value = rest.value\n const id = triggerId()\n tabs.registerTriggerId(value, id)\n onCleanup(() => tabs.unregisterTriggerId(value, id))\n })\n\n return (\n <KobalteTabs.Trigger\n data-slot=\"tabs-trigger\"\n id={triggerId()}\n class={cn(\n 'inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap text-sm font-medium',\n 'transition-colors ease-out outline-none select-none',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'disabled:pointer-events-none disabled:opacity-50',\n 'text-foreground',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4',\n local.appearance === 'segmented'\n ? 'h-control-sm rounded-md px-control-sm data-[selected]:bg-primary-subtle data-[selected]:text-foreground'\n : tabs.orientation() === 'vertical'\n ? 'h-control-md justify-start rounded-none border-s-2 border-transparent ps-3 pe-2 data-[selected]:border-primary'\n : 'h-control-md -mb-px rounded-none border-b-2 border-transparent px-2 pb-2 data-[selected]:border-primary',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function TabsContent(props: ComponentProps<typeof KobalteTabs.Content>) {\n const [local, rest] = splitProps(props, ['class', 'aria-labelledby'])\n const tabs = useTabsId()\n return (\n <KobalteTabs.Content\n data-slot=\"tabs-content\"\n aria-labelledby={\n local['aria-labelledby'] ??\n tabs.triggerIds().get(rest.value) ??\n `${tabs.id()}-trigger-${rest.value}`\n }\n class={cn('min-h-0 min-w-0 flex-1 outline-none', local.class)}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;AAqBA,IAAMgB,gBAAgBd,cAAkC;AAExD,SAASe,YAAY;CACnB,MAAM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WAAYY,KAAKR;EAAO;EAAA,KAAA,WAAA;GAAA,OAE/BL,GAAG,uCAAuCY,MAAMe,KAAK;EAAC;CAAA,GACzDd,IAAI,CAAA;AAGd"}
@@ -12,7 +12,7 @@ export type TextareaProps = Omit<ComponentProps<'textarea'>, 'size'> & VariantPr
12
12
  /**
13
13
  * Textarea.
14
14
  *
15
- * Shares the Input's border, focus and invalid treatment exactly — the two are
15
+ * Shares the Input's border, focus and invalid treatment exactly, the two are
16
16
  * the same control at different aspect ratios, and a form that mixes them must
17
17
  * not show a seam between them.
18
18
  *
@@ -39,7 +39,7 @@ var textareaVariants = cva([
39
39
  /**
40
40
  * Textarea.
41
41
  *
42
- * Shares the Input's border, focus and invalid treatment exactly — the two are
42
+ * Shares the Input's border, focus and invalid treatment exactly, the two are
43
43
  * the same control at different aspect ratios, and a form that mixes them must
44
44
  * not show a seam between them.
45
45
  *
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.js","names":["splitProps","cva","useFormFieldControl","cn","textareaVariants","variants","variant","default","composer","code","size","comfortable","resize","vertical","none","both","defaultVariants","ref","Textarea","props","local","rest","field","id","_el$","_tmpl$","_ref$","_$use","_$spread","_$mergeProps","class"],"sources":["../../../../src/components/ui/textarea/textarea.tsx"],"sourcesContent":["import type { ComponentProps, Ref } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { useFormFieldControl } from '#lib/form-field'\nimport { cn } from '#lib/utils'\n\nexport const textareaVariants = cva(\n [\n 'flex field-sizing-content 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',\n 'placeholder:text-muted-foreground',\n '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 ],\n {\n variants: {\n variant: {\n default: '',\n composer: 'border-0 bg-transparent p-0 shadow-none focus-visible:ring-0',\n code: 'font-mono',\n },\n size: {\n default: 'min-h-16',\n comfortable: 'min-h-16 max-h-48',\n },\n resize: {\n vertical: 'resize-y',\n none: 'resize-none',\n both: 'resize',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n resize: 'vertical',\n },\n }\n)\n\nexport type TextareaProps = Omit<ComponentProps<'textarea'>, 'size'> &\n VariantProps<typeof textareaVariants> & {\n /** Solid's actual textarea element, rather than its containing component or form. */\n ref?: Ref<HTMLTextAreaElement>\n }\n\n/**\n * Textarea.\n *\n * Shares the Input's border, focus and invalid treatment exactly — the two are\n * the same control at different aspect ratios, and a form that mixes them must\n * not show a seam between them.\n *\n * `field-sizing: content` lets the element grow with its content where the\n * engine supports it, which is the behaviour a chat composer wants; `rows`\n * remains the fallback so an unsupported engine still gets a usable height.\n * `variant=\"composer\"` removes the standalone field surface when nested in a\n * composer shell. `variant=\"code\"` keeps the field surface and sets the\n * monospace face, for commands, snippets and other literal text. `size=\"comfortable\"` caps growth at the shared 12rem rung, and\n * the finite `resize` variants keep browser resize behavior explicit.\n */\nexport function Textarea(props: TextareaProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'variant',\n 'size',\n 'resize',\n 'ref',\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 <textarea\n data-slot=\"textarea\"\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 ref={local.ref}\n class={cn(\n textareaVariants({ variant: local.variant, size: local.size, resize: local.resize }),\n local.class\n )}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;AAMA,IAAaI,mBAAmBH,IAC9B;CACE;CACA;CACA;CACA;CACA;CACA;CACA;AAA8E,GAEhF;CACEI,UAAU;EACRC,SAAS;GACPC,SAAS;GACTC,UAAU;GACVC,MAAM;EACR;EACAC,MAAM;GACJH,SAAS;GACTI,aAAa;EACf;EACAC,QAAQ;GACNC,UAAU;GACVC,MAAM;GACNC,MAAM;EACR;CACF;CACAC,iBAAiB;EACfV,SAAS;EACTI,MAAM;EACNE,QAAQ;CACV;AACF,CACF;;;;;;;;;;;;;;;;AAuBA,SAAgBM,SAASC,OAAsB;CAC7C,MAAM,CAACC,OAAOC,QAAQrB,WAAWmB,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAmB,CACpB;CACD,MAAMG,QAAQpB,oBAAoB,WAAW;EAC3CqB,IAAIH,MAAMG;EACV,cAAcH,MAAM;EACpB,mBAAmBA,MAAM;EACzB,oBAAoBA,MAAM;EAC1B,gBAAgBA,MAAM;EACtB,qBAAqBA,MAAM;CAC7B,CAAC;CAED,cAAA;EAAA,IAAAI,OAAAC,OAAA;EAAA,IAAAC,QASSN,MAAMH;EAAG,OAAAS,UAAA,aAAAC,IAAAD,OAAAF,IAAA,IAATJ,MAAMH,MAAGO;EAAAI,OAAAJ,MAAAK,WAAA;GAAA,IANdN,KAAE;IAAA,OAAED,OAAOC,MAAMH,MAAMG;GAAE;GAAA,KAAA,gBAAA;IAAA,OACbH,MAAM;GAAa;GAAA,KAAA,qBAAA;IAAA,OACdE,QAAQ,sBAAsBF,MAAM;GAAkB;GAAA,KAAA,sBAAA;IAAA,OACrDE,QAAQ,uBAAuBF,MAAM;GAAmB;GAAA,KAAA,kBAAA;IAAA,OAC5DE,QAAQ,mBAAmBF,MAAM;GAAe;GAAA,KAAA,uBAAA;IAAA,OAC3CE,QAAQ,wBAAwBF,MAAM;GAAoB;GAAA,KAAA,WAAA;IAAA,OAEtEjB,GACLC,iBAAiB;KAAEE,SAASc,MAAMd;KAASI,MAAMU,MAAMV;KAAME,QAAQQ,MAAMR;IAAO,CAAC,GACnFQ,MAAMU,KACR;GAAC;EAAA,GACGT,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAG;CAAA,EAAA,CAAA;AAGd"}
1
+ {"version":3,"file":"textarea.js","names":["splitProps","cva","useFormFieldControl","cn","textareaVariants","variants","variant","default","composer","code","size","comfortable","resize","vertical","none","both","defaultVariants","ref","Textarea","props","local","rest","field","id","_el$","_tmpl$","_ref$","_$use","_$spread","_$mergeProps","class"],"sources":["../../../../src/components/ui/textarea/textarea.tsx"],"sourcesContent":["import type { ComponentProps, Ref } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { useFormFieldControl } from '#lib/form-field'\nimport { cn } from '#lib/utils'\n\nexport const textareaVariants = cva(\n [\n 'flex field-sizing-content 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',\n 'placeholder:text-muted-foreground',\n '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 ],\n {\n variants: {\n variant: {\n default: '',\n composer: 'border-0 bg-transparent p-0 shadow-none focus-visible:ring-0',\n code: 'font-mono',\n },\n size: {\n default: 'min-h-16',\n comfortable: 'min-h-16 max-h-48',\n },\n resize: {\n vertical: 'resize-y',\n none: 'resize-none',\n both: 'resize',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n resize: 'vertical',\n },\n }\n)\n\nexport type TextareaProps = Omit<ComponentProps<'textarea'>, 'size'> &\n VariantProps<typeof textareaVariants> & {\n /** Solid's actual textarea element, rather than its containing component or form. */\n ref?: Ref<HTMLTextAreaElement>\n }\n\n/**\n * Textarea.\n *\n * Shares the Input's border, focus and invalid treatment exactly, the two are\n * the same control at different aspect ratios, and a form that mixes them must\n * not show a seam between them.\n *\n * `field-sizing: content` lets the element grow with its content where the\n * engine supports it, which is the behaviour a chat composer wants; `rows`\n * remains the fallback so an unsupported engine still gets a usable height.\n * `variant=\"composer\"` removes the standalone field surface when nested in a\n * composer shell. `variant=\"code\"` keeps the field surface and sets the\n * monospace face, for commands, snippets and other literal text. `size=\"comfortable\"` caps growth at the shared 12rem rung, and\n * the finite `resize` variants keep browser resize behavior explicit.\n */\nexport function Textarea(props: TextareaProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'variant',\n 'size',\n 'resize',\n 'ref',\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 <textarea\n data-slot=\"textarea\"\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 ref={local.ref}\n class={cn(\n textareaVariants({ variant: local.variant, size: local.size, resize: local.resize }),\n local.class\n )}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;AAMA,IAAaI,mBAAmBH,IAC9B;CACE;CACA;CACA;CACA;CACA;CACA;CACA;AAA8E,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AAK,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,CAAC,CAAA;KAC7C,GACA,OAAO,CAAC,CAAC,CAAC;IA8Bb,OAAO;IACP,KAAK;CACN,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC,OAAO,YAAY,CAAC,MAAM,CAAC,GAAG;IACtE,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAA;IACpE,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAyBD,iFAAiF;AACjF,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,eA4B1C;AAED,OAAO,EAAE,OAAO,EAAE,CAAA"}
@@ -5,8 +5,8 @@ import { Show, splitProps } from "solid-js";
5
5
  import { Toast, toaster } from "@kobalte/core/toast";
6
6
  // src/components/ui/toast/toast.tsx
7
7
  var _tmpl$ = /*#__PURE__*/ template(`<span aria-hidden=true class="mt-1.5 size-1.5 shrink-0 rounded-full"style=background-color:var(--toast-tone)>`);
8
- var _tmpl$2 = /*#__PURE__*/ template(`<div class="mt-1.5 flex items-center gap-2">`);
9
- var _tmpl$3 = /*#__PURE__*/ template(`<div class="flex min-w-0 flex-1 flex-col gap-0.5">`);
8
+ var _tmpl$2 = /*#__PURE__*/ template(`<div class="flex min-w-0 flex-1 flex-col gap-0.5">`);
9
+ var _tmpl$3 = /*#__PURE__*/ template(`<div class="mt-1.5 flex items-center gap-2">`);
10
10
  /**
11
11
  * The tone dot's colour. A custom property rather than five colour utilities
12
12
  * because the value is applied inline (the tone is data, not markup) and a
@@ -45,7 +45,7 @@ function ToastCard(props) {
45
45
  return [
46
46
  _tmpl$(),
47
47
  (() => {
48
- var _el$2 = _tmpl$3();
48
+ var _el$2 = _tmpl$2();
49
49
  insert(_el$2, createComponent(Toast.Title, {
50
50
  "class": "text-sm font-medium",
51
51
  get children() {
@@ -56,24 +56,22 @@ function ToastCard(props) {
56
56
  get when() {
57
57
  return props.description;
58
58
  },
59
- get children() {
60
- return createComponent(Toast.Description, {
61
- "class": "text-sm text-muted-foreground",
62
- get children() {
63
- return props.description;
64
- }
65
- });
66
- }
59
+ children: (descriptionSlot) => createComponent(Toast.Description, {
60
+ "class": "text-sm text-muted-foreground",
61
+ get children() {
62
+ return descriptionSlot();
63
+ }
64
+ })
67
65
  }), null);
68
66
  insert(_el$2, createComponent(Show, {
69
67
  get when() {
70
68
  return props.action;
71
69
  },
72
- get children() {
73
- var _el$3 = _tmpl$2();
74
- insert(_el$3, () => props.action);
70
+ children: (actionSlot) => (() => {
71
+ var _el$3 = _tmpl$3();
72
+ insert(_el$3, actionSlot);
75
73
  return _el$3;
76
- }
74
+ })()
77
75
  }), null);
78
76
  return _el$2;
79
77
  })(),
@@ -1 +1 @@
1
- {"version":3,"file":"toast.js","names":["KobalteToast","toaster","X","Show","splitProps","cn","toastTones","default","success","warning","destructive","info","title","description","tone","action","persistent","duration","region","ToastCard","props","_$createComponent","toastId","priority","class","style","children","_tmpl$","_el$2","_tmpl$3","_$insert","Title","when","Description","_el$3","_tmpl$2","CloseButton","errorToastOptions","options","toast","show","_$mergeProps","error","promise","messages","pending","data","resolved","state","dismiss","clear","Region","position","toasterPosition","toasterAlignment","Toaster","local","rest","regionId","limit","swipeDirection","pauseOnInteraction","pauseOnPageIdle","List"],"sources":["../../../../src/components/ui/toast/toast.tsx"],"sourcesContent":["import { Toast as KobalteToast, type ToastComponentProps, toaster } from '@kobalte/core/toast'\nimport { X } from 'lucide-solid'\nimport type { ComponentProps, JSX } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * Toast.\n *\n * A short, self-dismissing message about something that already happened.\n *\n * The rules that make toasts helpful rather than hostile are built into this\n * API rather than left to callers:\n *\n * - A toast never carries the only route to an action. Anything important\n * enough to need doing belongs in the interface, not in a message that\n * disappears. `action` exists, but it is a convenience, not a flow.\n * - Errors from user-initiated work get `priority=\"high\"` so a screen reader\n * interrupts to announce them; background progress uses the default low\n * priority so it is not read over whatever the user is doing.\n * - A toast with a way to undo is preferred to a confirmation dialog for a\n * reversible action. Undo after the fact costs the user nothing; a modal\n * before it costs everyone a click.\n *\n * `Toaster` is mounted once, near the root of the app.\n */\n\ntype ToastTone = 'default' | 'success' | 'warning' | 'destructive' | 'info'\n\n/**\n * The tone dot's colour. A custom property rather than five colour utilities\n * because the value is applied inline (the tone is data, not markup) and a\n * Tailwind colour class cannot be built from a runtime value without becoming\n * invisible to the linter.\n */\nconst toastTones: Record<ToastTone, string> = {\n default: 'var(--foreground)',\n success: 'var(--success)',\n warning: 'var(--warning)',\n destructive: 'var(--destructive)',\n info: 'var(--info)',\n}\n\nexport type ToastOptions = {\n title: string\n description?: string\n tone?: ToastTone\n /** A control rendered inside the toast, usually an Undo. */\n action?: JSX.Element\n /** Keep the toast until it is dismissed. Use for a failure the user must see. */\n persistent?: boolean\n /** Milliseconds before auto-dismiss. Overrides the region's setting. */\n duration?: number\n /** Which Toaster region to render into. */\n region?: string\n}\n\nfunction ToastCard(props: ToastComponentProps & ToastOptions) {\n const tone = () => props.tone ?? 'default'\n\n return (\n <KobalteToast\n toastId={props.toastId}\n /**\n * A user-initiated outcome is announced; a background one waits its turn.\n * A failure the user caused is worth interrupting for; a sync finishing\n * quietly is not.\n */\n priority={tone() === 'destructive' ? 'high' : 'low'}\n duration={props.duration}\n persistent={props.persistent}\n class={cn(\n 'pointer-events-auto flex w-full items-start gap-3 rounded-xl border border-border bg-popover p-3 shadow-lg',\n 'data-[opened]:animate-in data-[opened]:slide-in-from-right-full data-[opened]:fade-in-0',\n 'data-[closed]:animate-out data-[closed]:slide-out-to-right-full data-[closed]:fade-out-0',\n 'data-[swipe=move]:translate-x-(--kb-toast-swipe-move-x) data-[swipe=move]:transition-none',\n 'data-[swipe=cancel]:translate-x-0 data-[swipe=cancel]:transition-transform',\n 'data-[swipe=end]:animate-out data-[swipe=end]:slide-out-to-right-full'\n )}\n style={{ '--toast-tone': toastTones[tone()] }}\n >\n <span\n aria-hidden=\"true\"\n class=\"mt-1.5 size-1.5 shrink-0 rounded-full\"\n style={{ 'background-color': 'var(--toast-tone)' }}\n />\n <div class=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n <KobalteToast.Title class=\"text-sm font-medium\">{props.title}</KobalteToast.Title>\n <Show when={props.description}>\n <KobalteToast.Description class=\"text-sm text-muted-foreground\">\n {props.description}\n </KobalteToast.Description>\n </Show>\n <Show when={props.action}>\n <div class=\"mt-1.5 flex items-center gap-2\">{props.action}</div>\n </Show>\n </div>\n <KobalteToast.CloseButton\n aria-label=\"Dismiss notification\"\n class=\"text-muted-foreground shrink-0 rounded-sm p-0.5 transition-colors ease-out outline-none hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle\"\n >\n <X class=\"size-3.5\" />\n </KobalteToast.CloseButton>\n </KobalteToast>\n )\n}\n\n/**\n * The error contract, resolved: destructive tone, persistent unless the caller\n * says otherwise. Exported because this decision is the part a caller depends\n * on and the part testable without a browser — the card render itself needs one.\n */\nexport function errorToastOptions(\n title: string,\n options?: Omit<ToastOptions, 'title' | 'tone'>\n): ToastOptions {\n return { ...options, title, tone: 'destructive', persistent: options?.persistent ?? true }\n}\n\n/**\n * The toast API. `show` is the general form; the tone helpers are shorthand for\n * the four cases that come up constantly.\n */\nexport const toast = {\n show(options: ToastOptions): number {\n return toaster.show((props) => <ToastCard {...props} {...options} />, {\n region: options.region,\n })\n },\n success(title: string, options?: Omit<ToastOptions, 'title' | 'tone'>): number {\n return toast.show({ ...options, title, tone: 'success' })\n },\n /**\n * A failure the user caused. Persistent by default — an error that times out\n * while its reader is mid-sentence has not been reported — but `persistent`\n * stays caller-owned: a failure inside a retry loop (a failed \"check again\",\n * a background poll) passes `persistent: false` and a `duration`, because a\n * dismiss-only toast there is one more thing to close by hand.\n */\n error(title: string, options?: Omit<ToastOptions, 'title' | 'tone'>): number {\n return toast.show(errorToastOptions(title, options))\n },\n warning(title: string, options?: Omit<ToastOptions, 'title' | 'tone'>): number {\n return toast.show({ ...options, title, tone: 'warning' })\n },\n info(title: string, options?: Omit<ToastOptions, 'title' | 'tone'>): number {\n return toast.show({ ...options, title, tone: 'info' })\n },\n /**\n * A toast that resolves with a promise: pending, then success or failure.\n * The right shape for an operation with a visible duration, because the user\n * gets one message instead of three.\n */\n promise<T>(\n promise: Promise<T> | (() => Promise<T>),\n messages: {\n pending: string\n success: string | ((data: T) => string)\n error: string | ((error: unknown) => string)\n }\n ): Promise<T> {\n const resolved = typeof promise === 'function' ? promise() : promise\n toaster.promise(resolved, (props) => {\n const tone: ToastTone =\n props.state === 'fulfilled'\n ? 'success'\n : props.state === 'rejected'\n ? 'destructive'\n : 'default'\n const title =\n props.state === 'pending'\n ? messages.pending\n : props.state === 'fulfilled'\n ? typeof messages.success === 'function'\n ? messages.success(props.data as T)\n : messages.success\n : typeof messages.error === 'function'\n ? messages.error(props.error)\n : messages.error\n return (\n <ToastCard\n toastId={props.toastId}\n title={title}\n tone={tone}\n persistent={props.state === 'rejected'}\n />\n )\n })\n return resolved\n },\n dismiss: toaster.dismiss,\n clear: toaster.clear,\n}\n\nexport type ToasterProps = ComponentProps<typeof KobalteToast.Region> & {\n /** Where the stack sits. Defaults to the bottom-right, clear of the shell. */\n position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'\n region?: string\n}\n\n/**\n * `class` lands on the region too: the props describe the region, and the\n * region is the element a caller lays out (an inset clear of a status bar, a\n * narrower stack). The list inside it is an implementation detail.\n *\n * The corner is set on the region, not the list. The region is the `fixed`\n * element: an inset on the list inside it positions nothing, and the region falls\n * back to wherever it happens to sit in the document flow.\n */\nconst toasterPosition = {\n 'top-left': 'top-0 left-0',\n 'top-right': 'top-0 right-0',\n 'bottom-left': 'bottom-0 left-0',\n 'bottom-right': 'bottom-0 right-0',\n}\n\nconst toasterAlignment = {\n 'top-left': 'items-start',\n 'top-right': 'items-end',\n 'bottom-left': 'items-start',\n 'bottom-right': 'items-end',\n}\n\n/** Mount once, near the root. Renders the stack and owns its timing defaults. */\nexport function Toaster(props: ToasterProps) {\n const [local, rest] = splitProps(props, ['position', 'region', 'class'])\n\n return (\n <KobalteToast.Region\n regionId={local.region}\n duration={5000}\n limit={3}\n swipeDirection=\"right\"\n pauseOnInteraction\n pauseOnPageIdle\n /**\n * The toast region is a top layer: opening a dialog must not hide an\n * in-flight notification, and clicking a toast must not dismiss the\n * dialog behind it.\n */\n class={cn(\n 'pointer-events-none fixed z-(--z-toast) flex max-h-screen w-full flex-col gap-2 p-4 sm:max-w-sm',\n toasterPosition[local.position ?? 'bottom-right'],\n local.class\n )}\n {...rest}\n >\n <KobalteToast.List\n class={cn('flex flex-col gap-2', toasterAlignment[local.position ?? 'bottom-right'])}\n />\n </KobalteToast.Region>\n )\n}\n\nexport { toaster }\n"],"mappings":";;;;;;;;;;;;;;;AAmCA,IAAMM,aAAwC;CAC5CC,SAAS;CACTC,SAAS;CACTC,SAAS;CACTC,aAAa;CACbC,MAAM;AACR;AAgBA,SAASQ,UAAUC,OAA2C;CAC5D,MAAMN,aAAaM,MAAMN,QAAQ;CAEjC,OAAAO,gBACGrB,OAAY;EAAA,IACXsB,UAAO;GAAA,OAAEF,MAAME;EAAO;EAAA,IAMtBC,WAAQ;GAAA,OAAET,KAAK,MAAM,gBAAgB,SAAS;EAAK;EAAA,IACnDG,WAAQ;GAAA,OAAEG,MAAMH;EAAQ;EAAA,IACxBD,aAAU;GAAA,OAAEI,MAAMJ;EAAU;EAAA,KAAA,WAAA;GAAA,OACrBX,GACL,8GACA,2FACA,4FACA,6FACA,8EACA,uEACF;EAAC;EAAA,IACDoB,QAAK;GAAA,OAAE,EAAE,gBAAgBnB,WAAWQ,KAAK,GAAG;EAAC;EAAA,IAAAY,WAAA;GAAA,OAAA;IAAAC,OAAA;WAAA;KAAA,IAAAC,QAAAC,QAAA;KAAAC,OAAAF,OAAAP,gBAQ1CrB,MAAa+B,OAA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WAAA;EAAA,IAClBiB,WAAQ;GAAA,OAAEF,MAAMtC;EAAM;EACtBD,UAAU;EACV0C,OAAO;EACPC,gBAAc;EACdC,oBAAkB;EAClBC,iBAAe;EAAA,KAAA,WAAA;GAAA,OAMRzD,GACL,mGACAgD,gBAAgBG,MAAMJ,YAAY,iBAClCI,MAAMhC,KACR;EAAC;CAAA,GACGiC,MAAI,EAAA,IAAA/B,WAAA;EAAA,OAAAL,gBAEPrB,MAAa+D,MAAI,EAAA,KAAA,WAAA;GAAA,OACT1D,GAAG,uBAAuBiD,iBAAiBE,MAAMJ,YAAY,eAAe;EAAC,EAAA,CAAA;CAAA,EAAA,CAAA,CAAA;AAI5F"}
1
+ {"version":3,"file":"toast.js","names":["KobalteToast","toaster","X","Show","splitProps","cn","toastTones","default","success","warning","destructive","info","title","description","tone","action","persistent","duration","region","ToastCard","props","_$createComponent","toastId","priority","class","style","children","_tmpl$","_el$2","_tmpl$2","_$insert","Title","when","descriptionSlot","Description","actionSlot","_el$3","_tmpl$3","CloseButton","errorToastOptions","options","toast","show","_$mergeProps","error","promise","messages","pending","data","resolved","state","dismiss","clear","Region","position","toasterPosition","toasterAlignment","Toaster","local","rest","regionId","limit","swipeDirection","pauseOnInteraction","pauseOnPageIdle","List"],"sources":["../../../../src/components/ui/toast/toast.tsx"],"sourcesContent":["import { Toast as KobalteToast, type ToastComponentProps, toaster } from '@kobalte/core/toast'\nimport { X } from 'lucide-solid'\nimport type { ComponentProps, JSX } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * Toast.\n *\n * A short, self-dismissing message about something that already happened.\n *\n * The rules that make toasts helpful rather than hostile are built into this\n * API rather than left to callers:\n *\n * - A toast never carries the only route to an action. Anything important\n * enough to need doing belongs in the interface, not in a message that\n * disappears. `action` exists, but it is a convenience, not a flow.\n * - Errors from user-initiated work get `priority=\"high\"` so a screen reader\n * interrupts to announce them; background progress uses the default low\n * priority so it is not read over whatever the user is doing.\n * - A toast with a way to undo is preferred to a confirmation dialog for a\n * reversible action. Undo after the fact costs the user nothing; a modal\n * before it costs everyone a click.\n *\n * `Toaster` is mounted once, near the root of the app.\n */\n\ntype ToastTone = 'default' | 'success' | 'warning' | 'destructive' | 'info'\n\n/**\n * The tone dot's colour. A custom property rather than five colour utilities\n * because the value is applied inline (the tone is data, not markup) and a\n * Tailwind colour class cannot be built from a runtime value without becoming\n * invisible to the linter.\n */\nconst toastTones: Record<ToastTone, string> = {\n default: 'var(--foreground)',\n success: 'var(--success)',\n warning: 'var(--warning)',\n destructive: 'var(--destructive)',\n info: 'var(--info)',\n}\n\nexport type ToastOptions = {\n title: string\n description?: string\n tone?: ToastTone\n /** A control rendered inside the toast, usually an Undo. */\n action?: JSX.Element\n /** Keep the toast until it is dismissed. Use for a failure the user must see. */\n persistent?: boolean\n /** Milliseconds before auto-dismiss. Overrides the region's setting. */\n duration?: number\n /** Which Toaster region to render into. */\n region?: string\n}\n\nfunction ToastCard(props: ToastComponentProps & ToastOptions) {\n const tone = () => props.tone ?? 'default'\n\n return (\n <KobalteToast\n toastId={props.toastId}\n /**\n * A user-initiated outcome is announced; a background one waits its turn.\n * A failure the user caused is worth interrupting for; a sync finishing\n * quietly is not.\n */\n priority={tone() === 'destructive' ? 'high' : 'low'}\n duration={props.duration}\n persistent={props.persistent}\n class={cn(\n 'pointer-events-auto flex w-full items-start gap-3 rounded-xl border border-border bg-popover p-3 shadow-lg',\n 'data-[opened]:animate-in data-[opened]:slide-in-from-right-full data-[opened]:fade-in-0',\n 'data-[closed]:animate-out data-[closed]:slide-out-to-right-full data-[closed]:fade-out-0',\n 'data-[swipe=move]:translate-x-(--kb-toast-swipe-move-x) data-[swipe=move]:transition-none',\n 'data-[swipe=cancel]:translate-x-0 data-[swipe=cancel]:transition-transform',\n 'data-[swipe=end]:animate-out data-[swipe=end]:slide-out-to-right-full'\n )}\n style={{ '--toast-tone': toastTones[tone()] }}\n >\n <span\n aria-hidden=\"true\"\n class=\"mt-1.5 size-1.5 shrink-0 rounded-full\"\n style={{ 'background-color': 'var(--toast-tone)' }}\n />\n <div class=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n <KobalteToast.Title class=\"text-sm font-medium\">{props.title}</KobalteToast.Title>\n <Show when={props.description}>\n {(descriptionSlot) => (\n <KobalteToast.Description class=\"text-sm text-muted-foreground\">\n {descriptionSlot()}\n </KobalteToast.Description>\n )}\n </Show>\n <Show when={props.action}>\n {(actionSlot) => <div class=\"mt-1.5 flex items-center gap-2\">{actionSlot()}</div>}\n </Show>\n </div>\n <KobalteToast.CloseButton\n aria-label=\"Dismiss notification\"\n class=\"text-muted-foreground shrink-0 rounded-sm p-0.5 transition-colors ease-out outline-none hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle\"\n >\n <X class=\"size-3.5\" />\n </KobalteToast.CloseButton>\n </KobalteToast>\n )\n}\n\n/**\n * The error contract, resolved: destructive tone, persistent unless the caller\n * says otherwise. Exported because this decision is the part a caller depends\n * on and the part testable without a browser — the card render itself needs one.\n */\nexport function errorToastOptions(\n title: string,\n options?: Omit<ToastOptions, 'title' | 'tone'>\n): ToastOptions {\n return { ...options, title, tone: 'destructive', persistent: options?.persistent ?? true }\n}\n\n/**\n * The toast API. `show` is the general form; the tone helpers are shorthand for\n * the four cases that come up constantly.\n */\nexport const toast = {\n show(options: ToastOptions): number {\n return toaster.show((props) => <ToastCard {...props} {...options} />, {\n region: options.region,\n })\n },\n success(title: string, options?: Omit<ToastOptions, 'title' | 'tone'>): number {\n return toast.show({ ...options, title, tone: 'success' })\n },\n /**\n * A failure the user caused. Persistent by default — an error that times out\n * while its reader is mid-sentence has not been reported — but `persistent`\n * stays caller-owned: a failure inside a retry loop (a failed \"check again\",\n * a background poll) passes `persistent: false` and a `duration`, because a\n * dismiss-only toast there is one more thing to close by hand.\n */\n error(title: string, options?: Omit<ToastOptions, 'title' | 'tone'>): number {\n return toast.show(errorToastOptions(title, options))\n },\n warning(title: string, options?: Omit<ToastOptions, 'title' | 'tone'>): number {\n return toast.show({ ...options, title, tone: 'warning' })\n },\n info(title: string, options?: Omit<ToastOptions, 'title' | 'tone'>): number {\n return toast.show({ ...options, title, tone: 'info' })\n },\n /**\n * A toast that resolves with a promise: pending, then success or failure.\n * The right shape for an operation with a visible duration, because the user\n * gets one message instead of three.\n */\n promise<T>(\n promise: Promise<T> | (() => Promise<T>),\n messages: {\n pending: string\n success: string | ((data: T) => string)\n error: string | ((error: unknown) => string)\n }\n ): Promise<T> {\n const resolved = typeof promise === 'function' ? promise() : promise\n toaster.promise(resolved, (props) => {\n const tone: ToastTone =\n props.state === 'fulfilled'\n ? 'success'\n : props.state === 'rejected'\n ? 'destructive'\n : 'default'\n const title =\n props.state === 'pending'\n ? messages.pending\n : props.state === 'fulfilled'\n ? typeof messages.success === 'function'\n ? messages.success(props.data as T)\n : messages.success\n : typeof messages.error === 'function'\n ? messages.error(props.error)\n : messages.error\n return (\n <ToastCard\n toastId={props.toastId}\n title={title}\n tone={tone}\n persistent={props.state === 'rejected'}\n />\n )\n })\n return resolved\n },\n dismiss: toaster.dismiss,\n clear: toaster.clear,\n}\n\nexport type ToasterProps = ComponentProps<typeof KobalteToast.Region> & {\n /** Where the stack sits. Defaults to the bottom-right, clear of the shell. */\n position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'\n region?: string\n}\n\n/**\n * `class` lands on the region too: the props describe the region, and the\n * region is the element a caller lays out (an inset clear of a status bar, a\n * narrower stack). The list inside it is an implementation detail.\n *\n * The corner is set on the region, not the list. The region is the `fixed`\n * element: an inset on the list inside it positions nothing, and the region falls\n * back to wherever it happens to sit in the document flow.\n */\nconst toasterPosition = {\n 'top-left': 'top-0 left-0',\n 'top-right': 'top-0 right-0',\n 'bottom-left': 'bottom-0 left-0',\n 'bottom-right': 'bottom-0 right-0',\n}\n\nconst toasterAlignment = {\n 'top-left': 'items-start',\n 'top-right': 'items-end',\n 'bottom-left': 'items-start',\n 'bottom-right': 'items-end',\n}\n\n/** Mount once, near the root. Renders the stack and owns its timing defaults. */\nexport function Toaster(props: ToasterProps) {\n const [local, rest] = splitProps(props, ['position', 'region', 'class'])\n\n return (\n <KobalteToast.Region\n regionId={local.region}\n duration={5000}\n limit={3}\n swipeDirection=\"right\"\n pauseOnInteraction\n pauseOnPageIdle\n /**\n * The toast region is a top layer: opening a dialog must not hide an\n * in-flight notification, and clicking a toast must not dismiss the\n * dialog behind it.\n */\n class={cn(\n 'pointer-events-none fixed z-(--z-toast) flex max-h-screen w-full flex-col gap-2 p-4 sm:max-w-sm',\n toasterPosition[local.position ?? 'bottom-right'],\n local.class\n )}\n {...rest}\n >\n <KobalteToast.List\n class={cn('flex flex-col gap-2', toasterAlignment[local.position ?? 'bottom-right'])}\n />\n </KobalteToast.Region>\n )\n}\n\nexport { toaster }\n"],"mappings":";;;;;;;;;;;;;;;AAmCA,IAAMM,aAAwC;CAC5CC,SAAS;CACTC,SAAS;CACTC,SAAS;CACTC,aAAa;CACbC,MAAM;AACR;AAgBA,SAASQ,UAAUC,OAA2C;CAC5D,MAAMN,aAAaM,MAAMN,QAAQ;CAEjC,OAAAO,gBACGrB,OAAY;EAAA,IACXsB,UAAO;GAAA,OAAEF,MAAME;EAAO;EAAA,IAMtBC,WAAQ;GAAA,OAAET,KAAK,MAAM,gBAAgB,SAAS;EAAK;EAAA,IACnDG,WAAQ;GAAA,OAAEG,MAAMH;EAAQ;EAAA,IACxBD,aAAU;GAAA,OAAEI,MAAMJ;EAAU;EAAA,KAAA,WAAA;GAAA,OACrBX,GACL,8GACA,2FACA,4FACA,6FACA,8EACA,uEACF;EAAC;EAAA,IACDoB,QAAK;GAAA,OAAE,EAAE,gBAAgBnB,WAAWQ,KAAK,GAAG;EAAC;EAAA,IAAAY,WAAA;GAAA,OAAA;IAAAC,OAAA;WAAA;KAAA,IAAAC,QAAAC,QAAA;KAAAC,OAAAF,OAAAP,gBAQ1CrB,MAAa+B,OAAK;MAAA,SAAA;MAAA,IAA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OAAEF,MAAMxC;EAAM;EACtBD,UAAU;EACV4C,OAAO;EACPC,gBAAc;EACdC,oBAAkB;EAClBC,iBAAe;EAAA,KAAA,WAAA;GAAA,OAMR3D,GACL,mGACAkD,gBAAgBG,MAAMJ,YAAY,iBAClCI,MAAMlC,KACR;EAAC;CAAA,GACGmC,MAAI,EAAA,IAAAjC,WAAA;EAAA,OAAAL,gBAEPrB,MAAaiE,MAAI,EAAA,KAAA,WAAA;GAAA,OACT5D,GAAG,uBAAuBmD,iBAAiBE,MAAMJ,YAAY,eAAe;EAAC,EAAA,CAAA;CAAA,EAAA,CAAA,CAAA;AAI5F"}
@@ -10,7 +10,7 @@ import { type VariantProps } from '#lib/variants';
10
10
  * for a command.
11
11
  *
12
12
  * Kobalte supplies the pressed state and the keyboard behaviour; the styling
13
- * adds the one thing a headless primitive cannot know — that a pressed toggle
13
+ * adds the one thing a headless primitive cannot know, that a pressed toggle
14
14
  * in a toolbar should read as *filled*, not merely outlined. Pressed reads on
15
15
  * the accent rung (`primary-subtle`, foreground text, accent glyph): pressed is the
16
16
  * control's on state, the same family the checked checkbox and switch own, so
@@ -13,7 +13,7 @@ import { ToggleButton } from "@kobalte/core/toggle-button";
13
13
  * for a command.
14
14
  *
15
15
  * Kobalte supplies the pressed state and the keyboard behaviour; the styling
16
- * adds the one thing a headless primitive cannot know — that a pressed toggle
16
+ * adds the one thing a headless primitive cannot know, that a pressed toggle
17
17
  * in a toolbar should read as *filled*, not merely outlined. Pressed reads on
18
18
  * the accent rung (`primary-subtle`, foreground text, accent glyph): pressed is the
19
19
  * control's on state, the same family the checked checkbox and switch own, so
@@ -1 +1 @@
1
- {"version":3,"file":"toggle.js","names":["ToggleButton","splitProps","cva","controlInteractive","controlSize","cn","toggleVariants","variants","variant","default","outline","subtle","size","xs","sm","md","lg","xl","defaultVariants","Toggle","props","local","rest","_$createComponent","_$mergeProps","class"],"sources":["../../../../src/components/ui/toggle/toggle.tsx"],"sourcesContent":["import { ToggleButton } from '@kobalte/core/toggle-button'\nimport type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cva, controlInteractive, controlSize, type VariantProps } from '#lib/variants'\nimport { cn } from '#lib/utils'\n\n/**\n * Toggle.\n *\n * A button that stays pressed. The difference from Button is state, not looks:\n * a Toggle reports `aria-pressed` and holds its pressed appearance until\n * released, which is what makes it right for a formatting control and wrong\n * for a command.\n *\n * Kobalte supplies the pressed state and the keyboard behaviour; the styling\n * adds the one thing a headless primitive cannot know — that a pressed toggle\n * in a toolbar should read as *filled*, not merely outlined. Pressed reads on\n * the accent rung (`primary-subtle`, foreground text, accent glyph): pressed is the\n * control's on state, the same family the checked checkbox and switch own, so\n * it keeps a touch of the user's accent instead of a neutral fill.\n */\nexport const toggleVariants = cva(\n `${controlInteractive} inline-flex items-center justify-center rounded-md font-medium whitespace-nowrap select-none hover:bg-surface-hover hover:text-foreground data-[pressed]:bg-primary-subtle data-[pressed]:text-foreground data-[pressed]:[&_svg]:text-primary disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,\n {\n variants: {\n variant: {\n default: 'bg-transparent',\n /** Sits inside a field or toolbar that already has a fill. */\n outline: 'border border-border bg-transparent',\n /** Filled even when unpressed, for a segmented control's idle item. */\n subtle: 'bg-surface-hover',\n },\n size: {\n '2xs': `${controlSize['2xs']} [&_svg]:size-3`,\n xs: `${controlSize.xs} [&_svg]:size-3.5`,\n sm: `${controlSize.sm} [&_svg]:size-3.5`,\n md: `${controlSize.md} [&_svg]:size-4`,\n lg: `${controlSize.lg} [&_svg]:size-4`,\n xl: `${controlSize.xl} [&_svg]:size-5`,\n '2xl': `${controlSize['2xl']} [&_svg]:size-6`,\n 'icon-2xs': 'size-control-2xs p-0 [&_svg]:size-3',\n 'icon-xs': 'size-control-xs p-0 [&_svg]:size-3.5',\n 'icon-sm': 'size-control-sm p-0 [&_svg]:size-3.5',\n 'icon-md': 'size-control-md p-0 [&_svg]:size-4',\n 'icon-lg': 'size-control-lg p-0 [&_svg]:size-4',\n 'icon-xl': 'size-control-xl p-0 [&_svg]:size-5',\n 'icon-2xl': 'size-control-2xl p-0 [&_svg]:size-6',\n },\n },\n defaultVariants: { variant: 'default', size: 'md' },\n }\n)\n\nexport type ToggleProps = ComponentProps<typeof ToggleButton> & VariantProps<typeof toggleVariants>\n\nexport function Toggle(props: ToggleProps) {\n const [local, rest] = splitProps(props, ['variant', 'size', 'class'])\n\n return (\n <ToggleButton\n data-slot=\"toggle\"\n class={cn(toggleVariants({ variant: local.variant, size: local.size }), local.class)}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,IAAaM,iBAAiBJ,IAC5B,GAAGC,mBAAkB,+UACrB;CACEI,UAAU;EACRC,SAAS;GACPC,SAAS;;GAETC,SAAS;;GAETC,QAAQ;EACV;EACAC,MAAM;GACJ,OAAO,GAAGR,YAAY,OAAM;GAC5BS,IAAI,GAAGT,YAAYS,GAAE;GACrBC,IAAI,GAAGV,YAAYU,GAAE;GACrBC,IAAI,GAAGX,YAAYW,GAAE;GACrBC,IAAI,GAAGZ,YAAYY,GAAE;GACrBC,IAAI,GAAGb,YAAYa,GAAE;GACrB,OAAO,GAAGb,YAAY,OAAM;GAC5B,YAAY;GACZ,WAAW;GACX,WAAW;GACX,WAAW;GACX,WAAW;GACX,WAAW;GACX,YAAY;EACd;CACF;CACAc,iBAAiB;EAAEV,SAAS;EAAWI,MAAM;CAAK;AACpD,CACF;AAIA,SAAgBO,OAAOC,OAAoB;CACzC,MAAM,CAACC,OAAOC,QAAQrB,WAAWmB,OAAO;EAAC;EAAW;EAAQ;CAAO,CAAC;CAEpE,OAAAG,gBACGvB,cAAYwB,WAAA;EAAA,aAAA;EAAA,KAAA,WAAA;GAAA,OAEJnB,GAAGC,eAAe;IAAEE,SAASa,MAAMb;IAASI,MAAMS,MAAMT;GAAK,CAAC,GAAGS,MAAMI,KAAK;EAAC;CAAA,GAChFH,IAAI,CAAA;AAGd"}
1
+ {"version":3,"file":"toggle.js","names":["ToggleButton","splitProps","cva","controlInteractive","controlSize","cn","toggleVariants","variants","variant","default","outline","subtle","size","xs","sm","md","lg","xl","defaultVariants","Toggle","props","local","rest","_$createComponent","_$mergeProps","class"],"sources":["../../../../src/components/ui/toggle/toggle.tsx"],"sourcesContent":["import { ToggleButton } from '@kobalte/core/toggle-button'\nimport type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cva, controlInteractive, controlSize, type VariantProps } from '#lib/variants'\nimport { cn } from '#lib/utils'\n\n/**\n * Toggle.\n *\n * A button that stays pressed. The difference from Button is state, not looks:\n * a Toggle reports `aria-pressed` and holds its pressed appearance until\n * released, which is what makes it right for a formatting control and wrong\n * for a command.\n *\n * Kobalte supplies the pressed state and the keyboard behaviour; the styling\n * adds the one thing a headless primitive cannot know, that a pressed toggle\n * in a toolbar should read as *filled*, not merely outlined. Pressed reads on\n * the accent rung (`primary-subtle`, foreground text, accent glyph): pressed is the\n * control's on state, the same family the checked checkbox and switch own, so\n * it keeps a touch of the user's accent instead of a neutral fill.\n */\nexport const toggleVariants = cva(\n `${controlInteractive} inline-flex items-center justify-center rounded-md font-medium whitespace-nowrap select-none hover:bg-surface-hover hover:text-foreground data-[pressed]:bg-primary-subtle data-[pressed]:text-foreground data-[pressed]:[&_svg]:text-primary disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,\n {\n variants: {\n variant: {\n default: 'bg-transparent',\n /** Sits inside a field or toolbar that already has a fill. */\n outline: 'border border-border bg-transparent',\n /** Filled even when unpressed, for a segmented control's idle item. */\n subtle: 'bg-surface-hover',\n },\n size: {\n '2xs': `${controlSize['2xs']} [&_svg]:size-3`,\n xs: `${controlSize.xs} [&_svg]:size-3.5`,\n sm: `${controlSize.sm} [&_svg]:size-3.5`,\n md: `${controlSize.md} [&_svg]:size-4`,\n lg: `${controlSize.lg} [&_svg]:size-4`,\n xl: `${controlSize.xl} [&_svg]:size-5`,\n '2xl': `${controlSize['2xl']} [&_svg]:size-6`,\n 'icon-2xs': 'size-control-2xs p-0 [&_svg]:size-3',\n 'icon-xs': 'size-control-xs p-0 [&_svg]:size-3.5',\n 'icon-sm': 'size-control-sm p-0 [&_svg]:size-3.5',\n 'icon-md': 'size-control-md p-0 [&_svg]:size-4',\n 'icon-lg': 'size-control-lg p-0 [&_svg]:size-4',\n 'icon-xl': 'size-control-xl p-0 [&_svg]:size-5',\n 'icon-2xl': 'size-control-2xl p-0 [&_svg]:size-6',\n },\n },\n defaultVariants: { variant: 'default', size: 'md' },\n }\n)\n\nexport type ToggleProps = ComponentProps<typeof ToggleButton> & VariantProps<typeof toggleVariants>\n\nexport function Toggle(props: ToggleProps) {\n const [local, rest] = splitProps(props, ['variant', 'size', 'class'])\n\n return (\n <ToggleButton\n data-slot=\"toggle\"\n class={cn(toggleVariants({ variant: local.variant, size: local.size }), local.class)}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,IAAaM,iBAAiBJ,IAC5B,GAAGC,mBAAkB,+UACrB;CACEI,UAAU;EACRC,SAAS;GACPC,SAAS;;GAETC,SAAS;;GAETC,QAAQ;EACV;EACAC,MAAM;GACJ,OAAO,GAAGR,YAAY,OAAM;GAC5BS,IAAI,GAAGT,YAAYS,GAAE;GACrBC,IAAI,GAAGV,YAAYU,GAAE;GACrBC,IAAI,GAAGX,YAAYW,GAAE;GACrBC,IAAI,GAAGZ,YAAYY,GAAE;GACrBC,IAAI,GAAGb,YAAYa,GAAE;GACrB,OAAO,GAAGb,YAAY,OAAM;GAC5B,YAAY;GACZ,WAAW;GACX,WAAW;GACX,WAAW;GACX,WAAW;GACX,WAAW;GACX,YAAY;EACd;CACF;CACAc,iBAAiB;EAAEV,SAAS;EAAWI,MAAM;CAAK;AACpD,CACF;AAIA,SAAgBO,OAAOC,OAAoB;CACzC,MAAM,CAACC,OAAOC,QAAQrB,WAAWmB,OAAO;EAAC;EAAW;EAAQ;CAAO,CAAC;CAEpE,OAAAG,gBACGvB,cAAYwB,WAAA;EAAA,aAAA;EAAA,KAAA,WAAA;GAAA,OAEJnB,GAAGC,eAAe;IAAEE,SAASa,MAAMb;IAASI,MAAMS,MAAMT;GAAK,CAAC,GAAGS,MAAMI,KAAK;EAAC;CAAA,GAChFH,IAAI,CAAA;AAGd"}
@@ -0,0 +1,51 @@
1
+ import type { Accessor, JSX } from 'solid-js';
2
+ type TriggerProps = {
3
+ ref?: (element: HTMLElement) => void;
4
+ [key: string]: unknown;
5
+ };
6
+ export type DeferredTooltip = {
7
+ /** True once the control has been hovered or focused: render the tooltip then. */
8
+ armed: Accessor<boolean>;
9
+ /** Pass as the control's `ref`. */
10
+ ref: (element: HTMLElement) => void;
11
+ /** Pass as the control's `onPointerEnter`. */
12
+ onPointerEnter: (event: PointerEvent) => void;
13
+ /** Pass as the control's `onFocus`. */
14
+ onFocus: (event: FocusEvent) => void;
15
+ /**
16
+ * Pass to `TooltipTrigger as={...}`. It renders nothing: it hands the trigger's
17
+ * handlers, state attributes and ref to the control that is already on screen.
18
+ */
19
+ Target: (props: TriggerProps) => JSX.Element;
20
+ };
21
+ /**
22
+ * A tooltip that costs nothing until it is wanted.
23
+ *
24
+ * Every tooltip trigger builds a Kobalte tooltip root, its popper wiring and a
25
+ * focus-gate registration when it mounts, and almost none of them are ever
26
+ * shown: a list or toolbar of tooltip controls paid for all of them up front.
27
+ * With this, the control renders plain and the tooltip mounts the first time a
28
+ * pointer enters it or keyboard focus reaches it.
29
+ *
30
+ * The control is never replaced. The trigger adopts the element already on
31
+ * screen (its handlers go on as native listeners next to the control's own;
32
+ * spreading them would take Solid's delegated slot and replace the control's
33
+ * `onClick`), so mounting late moves no focus and drops no hover. The event
34
+ * that armed the tooltip is replayed to the new trigger, so the tip opens on
35
+ * the same timing as an eagerly mounted one; the control's own handlers do not
36
+ * see the replay.
37
+ *
38
+ * The trigger never sets `type`, `aria-describedby` or children: the control
39
+ * owns those, and points `aria-describedby` at the content's id while the tip
40
+ * is open.
41
+ *
42
+ * The keyboard-focus gate is held for the control's lifetime, not from the
43
+ * moment its tooltip mounts, so it sees the Tab that precedes a first focus.
44
+ */
45
+ export declare function createDeferredTooltip(options: {
46
+ enabled: Accessor<boolean>;
47
+ onPointerEnter?: Accessor<unknown>;
48
+ onFocus?: Accessor<unknown>;
49
+ }): DeferredTooltip;
50
+ export {};
51
+ //# sourceMappingURL=deferred-tooltip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deferred-tooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/tooltip/deferred-tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAM7C,KAAK,YAAY,GAAG;IAClB,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAA;IACpC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,kFAAkF;IAClF,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IACxB,mCAAmC;IACnC,GAAG,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAA;IACnC,8CAA8C;IAC9C,cAAc,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAA;IAC7C,uCAAuC;IACvC,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAA;IACpC;;;OAGG;IACH,MAAM,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,GAAG,CAAC,OAAO,CAAA;CAC7C,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE;IAC7C,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC1B,cAAc,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IAClC,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;CAC5B,GAAG,eAAe,CA2ElB"}
@@ -0,0 +1,103 @@
1
+ import { callHandler } from "../../../lib/events.js";
2
+ import { acquireTooltipFocusGate, releaseTooltipFocusGate } from "../../../lib/tooltip-focus-gate.js";
3
+ import { isServer, spread } from "solid-js/web";
4
+ import { createEffect, createSignal, onCleanup, splitProps } from "solid-js";
5
+ // src/components/ui/tooltip/deferred-tooltip.tsx
6
+ /**
7
+ * A tooltip that costs nothing until it is wanted.
8
+ *
9
+ * Every tooltip trigger builds a Kobalte tooltip root, its popper wiring and a
10
+ * focus-gate registration when it mounts, and almost none of them are ever
11
+ * shown: a list or toolbar of tooltip controls paid for all of them up front.
12
+ * With this, the control renders plain and the tooltip mounts the first time a
13
+ * pointer enters it or keyboard focus reaches it.
14
+ *
15
+ * The control is never replaced. The trigger adopts the element already on
16
+ * screen (its handlers go on as native listeners next to the control's own;
17
+ * spreading them would take Solid's delegated slot and replace the control's
18
+ * `onClick`), so mounting late moves no focus and drops no hover. The event
19
+ * that armed the tooltip is replayed to the new trigger, so the tip opens on
20
+ * the same timing as an eagerly mounted one; the control's own handlers do not
21
+ * see the replay.
22
+ *
23
+ * The trigger never sets `type`, `aria-describedby` or children: the control
24
+ * owns those, and points `aria-describedby` at the content's id while the tip
25
+ * is open.
26
+ *
27
+ * The keyboard-focus gate is held for the control's lifetime, not from the
28
+ * moment its tooltip mounts, so it sees the Tab that precedes a first focus.
29
+ */
30
+ function createDeferredTooltip(options) {
31
+ const [element, setElement] = createSignal();
32
+ const [armed, setArmed] = createSignal(false);
33
+ let replaying = false;
34
+ if (!isServer) createEffect(() => {
35
+ if (!options.enabled()) return;
36
+ acquireTooltipFocusGate();
37
+ onCleanup(releaseTooltipFocusGate);
38
+ });
39
+ const arm = (replay) => {
40
+ if (armed() || !options.enabled()) return;
41
+ setArmed(true);
42
+ replaying = true;
43
+ try {
44
+ replay();
45
+ } finally {
46
+ replaying = false;
47
+ }
48
+ };
49
+ const Target = (props) => {
50
+ const control = element();
51
+ if (!control) return null;
52
+ const [local, rest] = splitProps(props, [
53
+ "ref",
54
+ "type",
55
+ "aria-describedby",
56
+ "children",
57
+ "as"
58
+ ]);
59
+ local.ref?.(control);
60
+ const attributes = {};
61
+ for (const key of Object.keys(rest)) {
62
+ const value = rest[key];
63
+ if (/^on[A-Z]/.test(key) && typeof value === "function") {
64
+ const type = key.slice(2).toLowerCase();
65
+ const listener = value;
66
+ control.addEventListener(type, listener);
67
+ onCleanup(() => control.removeEventListener(type, listener));
68
+ } else Object.defineProperty(attributes, key, {
69
+ enumerable: true,
70
+ get: () => rest[key]
71
+ });
72
+ }
73
+ spread(control, attributes, false, true);
74
+ return null;
75
+ };
76
+ return {
77
+ armed,
78
+ ref: setElement,
79
+ onPointerEnter(event) {
80
+ if (replaying) return;
81
+ callHandler(options.onPointerEnter?.(), event);
82
+ if (event.pointerType === "touch" || event.defaultPrevented) return;
83
+ const target = event.currentTarget;
84
+ arm(() => target.dispatchEvent(new PointerEvent("pointerenter", {
85
+ pointerId: event.pointerId,
86
+ pointerType: event.pointerType,
87
+ clientX: event.clientX,
88
+ clientY: event.clientY
89
+ })));
90
+ },
91
+ onFocus(event) {
92
+ if (replaying) return;
93
+ callHandler(options.onFocus?.(), event);
94
+ if (event.defaultPrevented) return;
95
+ const target = event.currentTarget;
96
+ arm(() => target.dispatchEvent(new FocusEvent("focus", { relatedTarget: event.relatedTarget })));
97
+ },
98
+ Target
99
+ };
100
+ }
101
+ export { createDeferredTooltip };
102
+
103
+ //# sourceMappingURL=deferred-tooltip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deferred-tooltip.js","names":["createEffect","createSignal","onCleanup","splitProps","isServer","spread","callHandler","acquireTooltipFocusGate","releaseTooltipFocusGate","ref","element","key","armed","onPointerEnter","event","PointerEvent","onFocus","FocusEvent","Target","props","createDeferredTooltip","options","enabled","setElement","setArmed","replaying","arm","replay","control","local","rest","attributes","Object","keys","value","test","type","slice","toLowerCase","listener","addEventListener","removeEventListener","defineProperty","enumerable","get","pointerType","defaultPrevented","target","currentTarget","dispatchEvent","pointerId","clientX","clientY","relatedTarget"],"sources":["../../../../src/components/ui/tooltip/deferred-tooltip.tsx"],"sourcesContent":["import type { Accessor, JSX } from 'solid-js'\nimport { createEffect, createSignal, onCleanup, splitProps } from 'solid-js'\nimport { isServer, spread } from 'solid-js/web'\nimport { callHandler } from '#lib/events'\nimport { acquireTooltipFocusGate, releaseTooltipFocusGate } from '#lib/tooltip-focus-gate'\n\ntype TriggerProps = {\n ref?: (element: HTMLElement) => void\n [key: string]: unknown\n}\n\nexport type DeferredTooltip = {\n /** True once the control has been hovered or focused: render the tooltip then. */\n armed: Accessor<boolean>\n /** Pass as the control's `ref`. */\n ref: (element: HTMLElement) => void\n /** Pass as the control's `onPointerEnter`. */\n onPointerEnter: (event: PointerEvent) => void\n /** Pass as the control's `onFocus`. */\n onFocus: (event: FocusEvent) => void\n /**\n * Pass to `TooltipTrigger as={...}`. It renders nothing: it hands the trigger's\n * handlers, state attributes and ref to the control that is already on screen.\n */\n Target: (props: TriggerProps) => JSX.Element\n}\n\n/**\n * A tooltip that costs nothing until it is wanted.\n *\n * Every tooltip trigger builds a Kobalte tooltip root, its popper wiring and a\n * focus-gate registration when it mounts, and almost none of them are ever\n * shown: a list or toolbar of tooltip controls paid for all of them up front.\n * With this, the control renders plain and the tooltip mounts the first time a\n * pointer enters it or keyboard focus reaches it.\n *\n * The control is never replaced. The trigger adopts the element already on\n * screen (its handlers go on as native listeners next to the control's own;\n * spreading them would take Solid's delegated slot and replace the control's\n * `onClick`), so mounting late moves no focus and drops no hover. The event\n * that armed the tooltip is replayed to the new trigger, so the tip opens on\n * the same timing as an eagerly mounted one; the control's own handlers do not\n * see the replay.\n *\n * The trigger never sets `type`, `aria-describedby` or children: the control\n * owns those, and points `aria-describedby` at the content's id while the tip\n * is open.\n *\n * The keyboard-focus gate is held for the control's lifetime, not from the\n * moment its tooltip mounts, so it sees the Tab that precedes a first focus.\n */\nexport function createDeferredTooltip(options: {\n enabled: Accessor<boolean>\n onPointerEnter?: Accessor<unknown>\n onFocus?: Accessor<unknown>\n}): DeferredTooltip {\n const [element, setElement] = createSignal<HTMLElement>()\n const [armed, setArmed] = createSignal(false)\n let replaying = false\n\n // Held only while the control has a tooltip: a control without one needs no gate.\n if (!isServer)\n createEffect(() => {\n if (!options.enabled()) return\n acquireTooltipFocusGate()\n onCleanup(releaseTooltipFocusGate)\n })\n\n const arm = (replay: () => void) => {\n if (armed() || !options.enabled()) return\n setArmed(true)\n replaying = true\n try {\n replay()\n } finally {\n replaying = false\n }\n }\n\n const Target = (props: TriggerProps) => {\n const control = element()\n if (!control) return null\n const [local, rest] = splitProps(props, ['ref', 'type', 'aria-describedby', 'children', 'as'])\n local.ref?.(control)\n const attributes: Record<string, unknown> = {}\n for (const key of Object.keys(rest)) {\n const value = rest[key]\n if (/^on[A-Z]/.test(key) && typeof value === 'function') {\n const type = key.slice(2).toLowerCase()\n const listener = value as EventListener\n control.addEventListener(type, listener)\n onCleanup(() => control.removeEventListener(type, listener))\n } else {\n Object.defineProperty(attributes, key, { enumerable: true, get: () => rest[key] })\n }\n }\n spread(control, attributes, false, true)\n return null\n }\n\n return {\n armed,\n ref: setElement,\n onPointerEnter(event) {\n if (replaying) return\n callHandler(options.onPointerEnter?.() as never, event as never)\n if (event.pointerType === 'touch' || event.defaultPrevented) return\n const target = event.currentTarget as HTMLElement\n arm(() =>\n target.dispatchEvent(\n new PointerEvent('pointerenter', {\n pointerId: event.pointerId,\n pointerType: event.pointerType,\n clientX: event.clientX,\n clientY: event.clientY,\n })\n )\n )\n },\n onFocus(event) {\n if (replaying) return\n callHandler(options.onFocus?.() as never, event as never)\n if (event.defaultPrevented) return\n const target = event.currentTarget as HTMLElement\n arm(() =>\n target.dispatchEvent(new FocusEvent('focus', { relatedTarget: event.relatedTarget }))\n )\n },\n Target,\n }\n}\n"],"mappings":";;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;GACpB,IAAIW,WAAW;GACfnB,YAAYe,QAAQR,iBAAiB,GAAYC,KAAc;GAC/D,IAAIA,MAAM+B,gBAAgB,WAAW/B,MAAMgC,kBAAkB;GAC7D,MAAMC,SAASjC,MAAMkC;GACrBtB,UACEqB,OAAOE,cACL,IAAIlC,aAAa,gBAAgB;IAC/BmC,WAAWpC,MAAMoC;IACjBL,aAAa/B,MAAM+B;IACnBM,SAASrC,MAAMqC;IACfC,SAAStC,MAAMsC;GACjB,CAAC,CACH,CACF;EACF;EACApC,QAAQF,OAAO;GACb,IAAIW,WAAW;GACfnB,YAAYe,QAAQL,UAAU,GAAYF,KAAc;GACxD,IAAIA,MAAMgC,kBAAkB;GAC5B,MAAMC,SAASjC,MAAMkC;GACrBtB,UACEqB,OAAOE,cAAc,IAAIhC,WAAW,SAAS,EAAEoC,eAAevC,MAAMuC,cAAc,CAAC,CAAC,CACtF;EACF;EACAnC;CACF;AACF"}
@@ -1,2 +1,3 @@
1
1
  export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TooltipContentProps, type TooltipProviderProps, type TooltipRootProps, } from './tooltip';
2
+ export { createDeferredTooltip, type DeferredTooltip } from './deferred-tooltip';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/tooltip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,cAAc,EACd,eAAe,EACf,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,GACtB,MAAM,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/tooltip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,cAAc,EACd,eAAe,EACf,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,GACtB,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAA"}
@@ -1 +1,3 @@
1
- export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./tooltip.js";
1
+ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./tooltip.js";
2
+ import { createDeferredTooltip } from "./deferred-tooltip.js";
3
+ export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, createDeferredTooltip };