@adea-ai/ui 0.153.0 → 0.154.1

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 (581) hide show
  1. package/README.md +10 -10
  2. package/dist/NOTICE +10 -1
  3. package/dist/components/composites/about-dialog/about-dialog.d.ts.map +1 -1
  4. package/dist/components/composites/about-dialog/about-dialog.js +3 -1
  5. package/dist/components/composites/about-dialog/about-dialog.js.map +1 -1
  6. package/dist/components/composites/accent-picker/accent-picker.js +20 -9
  7. package/dist/components/composites/accent-picker/accent-picker.js.map +1 -1
  8. package/dist/components/composites/account-menu/account-menu.d.ts.map +1 -1
  9. package/dist/components/composites/account-menu/account-menu.js +20 -10
  10. package/dist/components/composites/account-menu/account-menu.js.map +1 -1
  11. package/dist/components/composites/action-button/action-button.d.ts.map +1 -1
  12. package/dist/components/composites/action-button/action-button.js +37 -24
  13. package/dist/components/composites/action-button/action-button.js.map +1 -1
  14. package/dist/components/composites/appearance-editor/appearance-choices.d.ts.map +1 -1
  15. package/dist/components/composites/appearance-editor/appearance-choices.js +7 -3
  16. package/dist/components/composites/appearance-editor/appearance-choices.js.map +1 -1
  17. package/dist/components/composites/appearance-editor/appearance-editor.d.ts.map +1 -1
  18. package/dist/components/composites/appearance-editor/appearance-editor.js +11 -6
  19. package/dist/components/composites/appearance-editor/appearance-editor.js.map +1 -1
  20. package/dist/components/composites/appearance-editor/appearance-rows.d.ts.map +1 -1
  21. package/dist/components/composites/appearance-editor/appearance-rows.js +8 -3
  22. package/dist/components/composites/appearance-editor/appearance-rows.js.map +1 -1
  23. package/dist/components/composites/appearance-editor/font-settings-group.d.ts.map +1 -1
  24. package/dist/components/composites/appearance-editor/font-settings-group.js +8 -4
  25. package/dist/components/composites/appearance-editor/font-settings-group.js.map +1 -1
  26. package/dist/components/composites/catalog-browser/catalog-browser-group.d.ts.map +1 -1
  27. package/dist/components/composites/catalog-browser/catalog-browser-group.js +7 -3
  28. package/dist/components/composites/catalog-browser/catalog-browser-group.js.map +1 -1
  29. package/dist/components/composites/catalog-browser/catalog-browser.d.ts.map +1 -1
  30. package/dist/components/composites/catalog-browser/catalog-browser.js +8 -4
  31. package/dist/components/composites/catalog-browser/catalog-browser.js.map +1 -1
  32. package/dist/components/composites/chain-of-thought/chain-of-thought.d.ts.map +1 -1
  33. package/dist/components/composites/chain-of-thought/chain-of-thought.js +3 -1
  34. package/dist/components/composites/chain-of-thought/chain-of-thought.js.map +1 -1
  35. package/dist/components/composites/chat/chat.d.ts.map +1 -1
  36. package/dist/components/composites/chat/chat.js +5 -1
  37. package/dist/components/composites/chat/chat.js.map +1 -1
  38. package/dist/components/composites/checkpoint/checkpoint.d.ts.map +1 -1
  39. package/dist/components/composites/checkpoint/checkpoint.js +3 -1
  40. package/dist/components/composites/checkpoint/checkpoint.js.map +1 -1
  41. package/dist/components/composites/confirmation/confirmation.d.ts.map +1 -1
  42. package/dist/components/composites/confirmation/confirmation.js +11 -5
  43. package/dist/components/composites/confirmation/confirmation.js.map +1 -1
  44. package/dist/components/composites/context/context.d.ts.map +1 -1
  45. package/dist/components/composites/context/context.js +7 -4
  46. package/dist/components/composites/context/context.js.map +1 -1
  47. package/dist/components/composites/file-tree/file-tree.d.ts.map +1 -1
  48. package/dist/components/composites/file-tree/file-tree.js +7 -3
  49. package/dist/components/composites/file-tree/file-tree.js.map +1 -1
  50. package/dist/components/composites/help-center/help-center.d.ts.map +1 -1
  51. package/dist/components/composites/help-center/help-center.js +3 -1
  52. package/dist/components/composites/help-center/help-center.js.map +1 -1
  53. package/dist/components/composites/icon-picker/icon-picker.d.ts +2 -2
  54. package/dist/components/composites/icon-picker/icon-picker.d.ts.map +1 -1
  55. package/dist/components/composites/icon-picker/icon-picker.js +77 -71
  56. package/dist/components/composites/icon-picker/icon-picker.js.map +1 -1
  57. package/dist/components/composites/icon-picker/shell-icons.d.ts.map +1 -1
  58. package/dist/components/composites/icon-picker/shell-icons.js +119 -59
  59. package/dist/components/composites/icon-picker/shell-icons.js.map +1 -1
  60. package/dist/components/composites/inline-citation/inline-citation.d.ts.map +1 -1
  61. package/dist/components/composites/inline-citation/inline-citation.js +5 -2
  62. package/dist/components/composites/inline-citation/inline-citation.js.map +1 -1
  63. package/dist/components/composites/list-row/list-row-control.d.ts.map +1 -1
  64. package/dist/components/composites/list-row/list-row-control.js +3 -4
  65. package/dist/components/composites/list-row/list-row-control.js.map +1 -1
  66. package/dist/components/composites/message-scroller/message-scroller.d.ts.map +1 -1
  67. package/dist/components/composites/message-scroller/message-scroller.js +5 -2
  68. package/dist/components/composites/message-scroller/message-scroller.js.map +1 -1
  69. package/dist/components/composites/model-selector/model-selector.d.ts +15 -1
  70. package/dist/components/composites/model-selector/model-selector.d.ts.map +1 -1
  71. package/dist/components/composites/model-selector/model-selector.js +271 -33
  72. package/dist/components/composites/model-selector/model-selector.js.map +1 -1
  73. package/dist/components/composites/plan/plan.d.ts.map +1 -1
  74. package/dist/components/composites/plan/plan.js +3 -1
  75. package/dist/components/composites/plan/plan.js.map +1 -1
  76. package/dist/components/composites/queue/queue.d.ts.map +1 -1
  77. package/dist/components/composites/queue/queue.js +11 -5
  78. package/dist/components/composites/queue/queue.js.map +1 -1
  79. package/dist/components/composites/reasoning/reasoning.d.ts.map +1 -1
  80. package/dist/components/composites/reasoning/reasoning.js +3 -1
  81. package/dist/components/composites/reasoning/reasoning.js.map +1 -1
  82. package/dist/components/composites/scene-controls/scene-controls.d.ts.map +1 -1
  83. package/dist/components/composites/scene-controls/scene-controls.js +14 -7
  84. package/dist/components/composites/scene-controls/scene-controls.js.map +1 -1
  85. package/dist/components/composites/settings/settings.d.ts.map +1 -1
  86. package/dist/components/composites/settings/settings.js +77 -67
  87. package/dist/components/composites/settings/settings.js.map +1 -1
  88. package/dist/components/composites/sources/sources.d.ts.map +1 -1
  89. package/dist/components/composites/sources/sources.js +39 -39
  90. package/dist/components/composites/sources/sources.js.map +1 -1
  91. package/dist/components/composites/stack-trace/stack-trace.d.ts.map +1 -1
  92. package/dist/components/composites/stack-trace/stack-trace.js +9 -4
  93. package/dist/components/composites/stack-trace/stack-trace.js.map +1 -1
  94. package/dist/components/composites/stat/stat.d.ts.map +1 -1
  95. package/dist/components/composites/stat/stat.js +4 -1
  96. package/dist/components/composites/stat/stat.js.map +1 -1
  97. package/dist/components/composites/subagent/subagent.d.ts.map +1 -1
  98. package/dist/components/composites/subagent/subagent.js +3 -1
  99. package/dist/components/composites/subagent/subagent.js.map +1 -1
  100. package/dist/components/composites/task/task.d.ts.map +1 -1
  101. package/dist/components/composites/task/task.js +3 -1
  102. package/dist/components/composites/task/task.js.map +1 -1
  103. package/dist/components/composites/terminal/ansi.d.ts.map +1 -1
  104. package/dist/components/composites/terminal/ansi.js +16 -0
  105. package/dist/components/composites/terminal/ansi.js.map +1 -1
  106. package/dist/components/composites/terminal/terminal.d.ts.map +1 -1
  107. package/dist/components/composites/terminal/terminal.js +15 -7
  108. package/dist/components/composites/terminal/terminal.js.map +1 -1
  109. package/dist/components/composites/test-results/test-results.d.ts.map +1 -1
  110. package/dist/components/composites/test-results/test-results.js +15 -7
  111. package/dist/components/composites/test-results/test-results.js.map +1 -1
  112. package/dist/components/composites/tool/tool.d.ts.map +1 -1
  113. package/dist/components/composites/tool/tool.js +3 -1
  114. package/dist/components/composites/tool/tool.js.map +1 -1
  115. package/dist/components/composites/tree/tree.d.ts.map +1 -1
  116. package/dist/components/composites/tree/tree.js +3 -1
  117. package/dist/components/composites/tree/tree.js.map +1 -1
  118. package/dist/components/composites/update-dialog/update-dialog.d.ts.map +1 -1
  119. package/dist/components/composites/update-dialog/update-dialog.js +34 -24
  120. package/dist/components/composites/update-dialog/update-dialog.js.map +1 -1
  121. package/dist/components/composites/workspace-mark/workspace-mark.d.ts.map +1 -1
  122. package/dist/components/composites/workspace-mark/workspace-mark.js +17 -12
  123. package/dist/components/composites/workspace-mark/workspace-mark.js.map +1 -1
  124. package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.d.ts.map +1 -1
  125. package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js +5 -2
  126. package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js.map +1 -1
  127. package/dist/components/composites/workspace-switcher/workspace-switcher.d.ts.map +1 -1
  128. package/dist/components/composites/workspace-switcher/workspace-switcher.js +9 -4
  129. package/dist/components/composites/workspace-switcher/workspace-switcher.js.map +1 -1
  130. package/dist/components/conversation/busy-send-button.d.ts.map +1 -1
  131. package/dist/components/conversation/busy-send-button.js +9 -5
  132. package/dist/components/conversation/busy-send-button.js.map +1 -1
  133. package/dist/components/conversation/conversation-avatar.d.ts.map +1 -1
  134. package/dist/components/conversation/conversation-avatar.js +6 -3
  135. package/dist/components/conversation/conversation-avatar.js.map +1 -1
  136. package/dist/components/conversation/conversation-surface.d.ts.map +1 -1
  137. package/dist/components/conversation/conversation-surface.js +3 -1
  138. package/dist/components/conversation/conversation-surface.js.map +1 -1
  139. package/dist/components/conversation/internal/chat-composer-shell.d.ts.map +1 -1
  140. package/dist/components/conversation/internal/chat-composer-shell.js +9 -4
  141. package/dist/components/conversation/internal/chat-composer-shell.js.map +1 -1
  142. package/dist/components/conversation/message-composer.d.ts.map +1 -1
  143. package/dist/components/conversation/message-composer.js +9 -4
  144. package/dist/components/conversation/message-composer.js.map +1 -1
  145. package/dist/components/conversation/message-row.d.ts.map +1 -1
  146. package/dist/components/conversation/message-row.js +11 -5
  147. package/dist/components/conversation/message-row.js.map +1 -1
  148. package/dist/components/conversation/thread-panel.d.ts.map +1 -1
  149. package/dist/components/conversation/thread-panel.js +3 -1
  150. package/dist/components/conversation/thread-panel.js.map +1 -1
  151. package/dist/components/conversation/transcript-composition.d.ts.map +1 -1
  152. package/dist/components/conversation/transcript-composition.js +3 -1
  153. package/dist/components/conversation/transcript-composition.js.map +1 -1
  154. package/dist/components/layout/floating-preview/floating-preview.d.ts.map +1 -1
  155. package/dist/components/layout/floating-preview/floating-preview.js +5 -2
  156. package/dist/components/layout/floating-preview/floating-preview.js.map +1 -1
  157. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.d.ts.map +1 -1
  158. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js +3 -1
  159. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js.map +1 -1
  160. package/dist/components/layout/shell-rail/shell-rail.d.ts.map +1 -1
  161. package/dist/components/layout/shell-rail/shell-rail.js +3 -1
  162. package/dist/components/layout/shell-rail/shell-rail.js.map +1 -1
  163. package/dist/components/layout/side-rail/side-rail.d.ts.map +1 -1
  164. package/dist/components/layout/side-rail/side-rail.js +46 -42
  165. package/dist/components/layout/side-rail/side-rail.js.map +1 -1
  166. package/dist/components/layout/sidebar-nav/sidebar-nav.d.ts.map +1 -1
  167. package/dist/components/layout/sidebar-nav/sidebar-nav.js +3 -1
  168. package/dist/components/layout/sidebar-nav/sidebar-nav.js.map +1 -1
  169. package/dist/components/layout/split-layout/split-layout.d.ts.map +1 -1
  170. package/dist/components/layout/split-layout/split-layout.js +5 -2
  171. package/dist/components/layout/split-layout/split-layout.js.map +1 -1
  172. package/dist/components/layout/top-bar/top-bar.d.ts.map +1 -1
  173. package/dist/components/layout/top-bar/top-bar.js +16 -13
  174. package/dist/components/layout/top-bar/top-bar.js.map +1 -1
  175. package/dist/components/theme/appearance-panel.d.ts.map +1 -1
  176. package/dist/components/theme/appearance-panel.js +3 -1
  177. package/dist/components/theme/appearance-panel.js.map +1 -1
  178. package/dist/components/theme/theme-mode-toggle.d.ts.map +1 -1
  179. package/dist/components/theme/theme-mode-toggle.js +6 -3
  180. package/dist/components/theme/theme-mode-toggle.js.map +1 -1
  181. package/dist/components/theme/theme-toggle.d.ts.map +1 -1
  182. package/dist/components/theme/theme-toggle.js +6 -3
  183. package/dist/components/theme/theme-toggle.js.map +1 -1
  184. package/dist/components/ui/accordion/accordion.d.ts.map +1 -1
  185. package/dist/components/ui/accordion/accordion.js +3 -1
  186. package/dist/components/ui/accordion/accordion.js.map +1 -1
  187. package/dist/components/ui/alert/alert.d.ts.map +1 -1
  188. package/dist/components/ui/alert/alert.js +15 -9
  189. package/dist/components/ui/alert/alert.js.map +1 -1
  190. package/dist/components/ui/annotation-surface/annotation-surface.d.ts.map +1 -1
  191. package/dist/components/ui/annotation-surface/annotation-surface.js +5 -4
  192. package/dist/components/ui/annotation-surface/annotation-surface.js.map +1 -1
  193. package/dist/components/ui/attachment/attachment.d.ts.map +1 -1
  194. package/dist/components/ui/attachment/attachment.js +18 -9
  195. package/dist/components/ui/attachment/attachment.js.map +1 -1
  196. package/dist/components/ui/badge/badge.d.ts.map +1 -1
  197. package/dist/components/ui/badge/badge.js +30 -11
  198. package/dist/components/ui/badge/badge.js.map +1 -1
  199. package/dist/components/ui/breadcrumb/breadcrumb.d.ts.map +1 -1
  200. package/dist/components/ui/breadcrumb/breadcrumb.js +5 -2
  201. package/dist/components/ui/breadcrumb/breadcrumb.js.map +1 -1
  202. package/dist/components/ui/button/button.d.ts.map +1 -1
  203. package/dist/components/ui/button/button.js +37 -13
  204. package/dist/components/ui/button/button.js.map +1 -1
  205. package/dist/components/ui/calendar/calendar.d.ts.map +1 -1
  206. package/dist/components/ui/calendar/calendar.js +5 -2
  207. package/dist/components/ui/calendar/calendar.js.map +1 -1
  208. package/dist/components/ui/carousel/carousel.d.ts.map +1 -1
  209. package/dist/components/ui/carousel/carousel.js +12 -6
  210. package/dist/components/ui/carousel/carousel.js.map +1 -1
  211. package/dist/components/ui/checkbox/checkbox.d.ts +13 -0
  212. package/dist/components/ui/checkbox/checkbox.d.ts.map +1 -1
  213. package/dist/components/ui/checkbox/checkbox.js +296 -21
  214. package/dist/components/ui/checkbox/checkbox.js.map +1 -1
  215. package/dist/components/ui/code-block/code-block.d.ts.map +1 -1
  216. package/dist/components/ui/code-block/code-block.js +9 -6
  217. package/dist/components/ui/code-block/code-block.js.map +1 -1
  218. package/dist/components/ui/combobox/combobox.d.ts.map +1 -1
  219. package/dist/components/ui/combobox/combobox.js +8 -11
  220. package/dist/components/ui/combobox/combobox.js.map +1 -1
  221. package/dist/components/ui/command/command.d.ts.map +1 -1
  222. package/dist/components/ui/command/command.js +4 -2
  223. package/dist/components/ui/command/command.js.map +1 -1
  224. package/dist/components/ui/detail-panel/detail-panel.d.ts.map +1 -1
  225. package/dist/components/ui/detail-panel/detail-panel.js +3 -1
  226. package/dist/components/ui/detail-panel/detail-panel.js.map +1 -1
  227. package/dist/components/ui/dialog/dialog-layer.d.ts.map +1 -1
  228. package/dist/components/ui/dialog/dialog-layer.js +10 -10
  229. package/dist/components/ui/dialog/dialog-layer.js.map +1 -1
  230. package/dist/components/ui/dialog/dialog.d.ts.map +1 -1
  231. package/dist/components/ui/dialog/dialog.js +3 -1
  232. package/dist/components/ui/dialog/dialog.js.map +1 -1
  233. package/dist/components/ui/dropdown-menu/menu-parts.d.ts.map +1 -1
  234. package/dist/components/ui/dropdown-menu/menu-parts.js +7 -3
  235. package/dist/components/ui/dropdown-menu/menu-parts.js.map +1 -1
  236. package/dist/components/ui/empty/empty-state.d.ts.map +1 -1
  237. package/dist/components/ui/empty/empty-state.js +3 -1
  238. package/dist/components/ui/empty/empty-state.js.map +1 -1
  239. package/dist/components/ui/field/field.d.ts.map +1 -1
  240. package/dist/components/ui/field/field.js +12 -6
  241. package/dist/components/ui/field/field.js.map +1 -1
  242. package/dist/components/ui/input/input-control.d.ts +2 -0
  243. package/dist/components/ui/input/input-control.d.ts.map +1 -1
  244. package/dist/components/ui/input/input-control.js +24 -6
  245. package/dist/components/ui/input/input-control.js.map +1 -1
  246. package/dist/components/ui/input/input.d.ts.map +1 -1
  247. package/dist/components/ui/input/input.js +47 -48
  248. package/dist/components/ui/input/input.js.map +1 -1
  249. package/dist/components/ui/input-group/input-group.d.ts.map +1 -1
  250. package/dist/components/ui/input-group/input-group.js +1 -8
  251. package/dist/components/ui/input-group/input-group.js.map +1 -1
  252. package/dist/components/ui/kbd/kbd.d.ts +23 -10
  253. package/dist/components/ui/kbd/kbd.d.ts.map +1 -1
  254. package/dist/components/ui/kbd/kbd.js +42 -11
  255. package/dist/components/ui/kbd/kbd.js.map +1 -1
  256. package/dist/components/ui/message/index.d.ts +1 -1
  257. package/dist/components/ui/message/index.d.ts.map +1 -1
  258. package/dist/components/ui/message/index.js +2 -2
  259. package/dist/components/ui/message/message.d.ts.map +1 -1
  260. package/dist/components/ui/message/message.js +5 -3
  261. package/dist/components/ui/message/message.js.map +1 -1
  262. package/dist/components/ui/message/parse-message-text.d.ts +32 -0
  263. package/dist/components/ui/message/parse-message-text.d.ts.map +1 -1
  264. package/dist/components/ui/message/parse-message-text.js +63 -3
  265. package/dist/components/ui/message/parse-message-text.js.map +1 -1
  266. package/dist/components/ui/native-select/native-select.d.ts.map +1 -1
  267. package/dist/components/ui/native-select/native-select.js +4 -9
  268. package/dist/components/ui/native-select/native-select.js.map +1 -1
  269. package/dist/components/ui/navigation-menu/navigation-menu.d.ts.map +1 -1
  270. package/dist/components/ui/navigation-menu/navigation-menu.js +3 -1
  271. package/dist/components/ui/navigation-menu/navigation-menu.js.map +1 -1
  272. package/dist/components/ui/pagination/pagination.d.ts.map +1 -1
  273. package/dist/components/ui/pagination/pagination.js +7 -3
  274. package/dist/components/ui/pagination/pagination.js.map +1 -1
  275. package/dist/components/ui/questionnaire/questionnaire.d.ts.map +1 -1
  276. package/dist/components/ui/questionnaire/questionnaire.js +9 -4
  277. package/dist/components/ui/questionnaire/questionnaire.js.map +1 -1
  278. package/dist/components/ui/radio-group/radio-group.d.ts.map +1 -1
  279. package/dist/components/ui/radio-group/radio-group.js +4 -9
  280. package/dist/components/ui/radio-group/radio-group.js.map +1 -1
  281. package/dist/components/ui/resizable/resizable.d.ts.map +1 -1
  282. package/dist/components/ui/resizable/resizable.js +3 -1
  283. package/dist/components/ui/resizable/resizable.js.map +1 -1
  284. package/dist/components/ui/select/select.d.ts.map +1 -1
  285. package/dist/components/ui/select/select.js +7 -3
  286. package/dist/components/ui/select/select.js.map +1 -1
  287. package/dist/components/ui/sheet/sheet.d.ts.map +1 -1
  288. package/dist/components/ui/sheet/sheet.js +3 -1
  289. package/dist/components/ui/sheet/sheet.js.map +1 -1
  290. package/dist/components/ui/spinner/spinner.d.ts.map +1 -1
  291. package/dist/components/ui/spinner/spinner.js +3 -1
  292. package/dist/components/ui/spinner/spinner.js.map +1 -1
  293. package/dist/components/ui/status-chip/status-chip.d.ts.map +1 -1
  294. package/dist/components/ui/status-chip/status-chip.js +35 -30
  295. package/dist/components/ui/status-chip/status-chip.js.map +1 -1
  296. package/dist/components/ui/switch/switch.d.ts +7 -0
  297. package/dist/components/ui/switch/switch.d.ts.map +1 -1
  298. package/dist/components/ui/switch/switch.js +255 -17
  299. package/dist/components/ui/switch/switch.js.map +1 -1
  300. package/dist/components/ui/textarea/textarea.d.ts.map +1 -1
  301. package/dist/components/ui/textarea/textarea.js +1 -8
  302. package/dist/components/ui/textarea/textarea.js.map +1 -1
  303. package/dist/components/ui/toast/toast.d.ts.map +1 -1
  304. package/dist/components/ui/toast/toast.js +3 -1
  305. package/dist/components/ui/toast/toast.js.map +1 -1
  306. package/dist/components/ui/tooltip/deferred-tooltip.d.ts.map +1 -1
  307. package/dist/components/ui/tooltip/deferred-tooltip.js +10 -4
  308. package/dist/components/ui/tooltip/deferred-tooltip.js.map +1 -1
  309. package/dist/components/ui/tooltip/index.d.ts +1 -0
  310. package/dist/components/ui/tooltip/index.d.ts.map +1 -1
  311. package/dist/components/ui/tooltip/index.js +2 -1
  312. package/dist/components/ui/tooltip/lazy-tooltip.d.ts +40 -0
  313. package/dist/components/ui/tooltip/lazy-tooltip.d.ts.map +1 -0
  314. package/dist/components/ui/tooltip/lazy-tooltip.js +61 -0
  315. package/dist/components/ui/tooltip/lazy-tooltip.js.map +1 -0
  316. package/dist/components/ui/trace/trace.d.ts.map +1 -1
  317. package/dist/components/ui/trace/trace.js +82 -68
  318. package/dist/components/ui/trace/trace.js.map +1 -1
  319. package/dist/components/ui/typography/typography.d.ts +1 -1
  320. package/dist/components/ui/typography/typography.d.ts.map +1 -1
  321. package/dist/components/ui/typography/typography.js +5 -6
  322. package/dist/components/ui/typography/typography.js.map +1 -1
  323. package/dist/index.js +3 -2
  324. package/dist/lib/clipboard.d.ts.map +1 -1
  325. package/dist/lib/clipboard.js +3 -0
  326. package/dist/lib/clipboard.js.map +1 -1
  327. package/dist/lib/fast-icon.d.ts +18 -0
  328. package/dist/lib/fast-icon.d.ts.map +1 -0
  329. package/dist/lib/fast-icon.js +75 -0
  330. package/dist/lib/fast-icon.js.map +1 -0
  331. package/dist/lib/form-field.d.ts +1 -1
  332. package/dist/lib/form-field.js +3 -1
  333. package/dist/lib/form-field.js.map +1 -1
  334. package/dist/lib/observe-resize.d.ts +14 -0
  335. package/dist/lib/observe-resize.d.ts.map +1 -0
  336. package/dist/lib/observe-resize.js +19 -0
  337. package/dist/lib/observe-resize.js.map +1 -0
  338. package/dist/lib/overlay.d.ts +1 -1
  339. package/dist/lib/overlay.d.ts.map +1 -1
  340. package/dist/lib/overlay.js +1 -1
  341. package/dist/lib/overlay.js.map +1 -1
  342. package/dist/lint/index.d.ts +1 -0
  343. package/dist/lint/index.d.ts.map +1 -1
  344. package/dist/lint.js +251 -118
  345. package/dist/lint.js.map +1 -1
  346. package/dist/r/action-button.json +3 -1
  347. package/dist/r/floating-preview.json +2 -1
  348. package/dist/r/icon-picker.json +0 -1
  349. package/dist/r/lib.json +10 -0
  350. package/dist/r/model-selector.json +1 -0
  351. package/dist/r/plan.json +2 -1
  352. package/dist/r/queue.json +2 -1
  353. package/dist/r/registry.json +33 -9
  354. package/dist/r/scene-controls.json +2 -1
  355. package/dist/r/side-rail.json +1 -0
  356. package/dist/r/src/components/composites/about-dialog/about-dialog.tsx +5 -1
  357. package/dist/r/src/components/composites/accent-picker/accent-picker.tsx +22 -17
  358. package/dist/r/src/components/composites/account-menu/account-menu.tsx +21 -9
  359. package/dist/r/src/components/composites/action-button/action-button.tsx +38 -21
  360. package/dist/r/src/components/composites/appearance-editor/appearance-choices.tsx +7 -1
  361. package/dist/r/src/components/composites/appearance-editor/appearance-editor.tsx +13 -1
  362. package/dist/r/src/components/composites/appearance-editor/appearance-rows.tsx +13 -1
  363. package/dist/r/src/components/composites/appearance-editor/font-settings-group.tsx +13 -1
  364. package/dist/r/src/components/composites/catalog-browser/catalog-browser-group.tsx +11 -1
  365. package/dist/r/src/components/composites/catalog-browser/catalog-browser.tsx +11 -1
  366. package/dist/r/src/components/composites/chain-of-thought/chain-of-thought.tsx +5 -1
  367. package/dist/r/src/components/composites/chat/chat.tsx +11 -1
  368. package/dist/r/src/components/composites/checkpoint/checkpoint.tsx +5 -1
  369. package/dist/r/src/components/composites/confirmation/confirmation.tsx +15 -1
  370. package/dist/r/src/components/composites/context/context.tsx +9 -1
  371. package/dist/r/src/components/composites/file-tree/file-tree.tsx +11 -1
  372. package/dist/r/src/components/composites/help-center/help-center.tsx +5 -1
  373. package/dist/r/src/components/composites/icon-picker/icon-picker.tsx +59 -31
  374. package/dist/r/src/components/composites/icon-picker/shell-icons.ts +121 -59
  375. package/dist/r/src/components/composites/inline-citation/inline-citation.tsx +6 -1
  376. package/dist/r/src/components/composites/list-row/list-row-control.tsx +7 -5
  377. package/dist/r/src/components/composites/message-scroller/message-scroller.tsx +6 -1
  378. package/dist/r/src/components/composites/model-selector/model-selector.tsx +197 -11
  379. package/dist/r/src/components/composites/plan/plan.tsx +5 -1
  380. package/dist/r/src/components/composites/queue/queue.tsx +15 -1
  381. package/dist/r/src/components/composites/reasoning/reasoning.tsx +5 -1
  382. package/dist/r/src/components/composites/scene-controls/scene-controls.tsx +17 -1
  383. package/dist/r/src/components/composites/settings/settings.tsx +23 -14
  384. package/dist/r/src/components/composites/sources/sources.tsx +27 -20
  385. package/dist/r/src/components/composites/stack-trace/stack-trace.tsx +13 -1
  386. package/dist/r/src/components/composites/stat/stat.tsx +9 -1
  387. package/dist/r/src/components/composites/subagent/subagent.tsx +5 -1
  388. package/dist/r/src/components/composites/task/task.tsx +5 -1
  389. package/dist/r/src/components/composites/terminal/ansi.ts +18 -0
  390. package/dist/r/src/components/composites/terminal/terminal.tsx +17 -7
  391. package/dist/r/src/components/composites/test-results/test-results.tsx +17 -7
  392. package/dist/r/src/components/composites/tool/tool.tsx +5 -1
  393. package/dist/r/src/components/composites/tree/tree.tsx +5 -1
  394. package/dist/r/src/components/composites/update-dialog/update-dialog.tsx +35 -15
  395. package/dist/r/src/components/composites/workspace-mark/workspace-mark.tsx +14 -7
  396. package/dist/r/src/components/composites/workspace-switcher/workspace-reorder-dialog.tsx +6 -1
  397. package/dist/r/src/components/composites/workspace-switcher/workspace-switcher.tsx +13 -1
  398. package/dist/r/src/components/conversation/busy-send-button.tsx +11 -1
  399. package/dist/r/src/components/conversation/conversation-avatar.tsx +7 -1
  400. package/dist/r/src/components/conversation/conversation-surface.tsx +5 -1
  401. package/dist/r/src/components/conversation/internal/chat-composer-shell.tsx +13 -1
  402. package/dist/r/src/components/conversation/message-composer.tsx +13 -1
  403. package/dist/r/src/components/conversation/message-row.tsx +15 -1
  404. package/dist/r/src/components/conversation/thread-panel.tsx +5 -1
  405. package/dist/r/src/components/conversation/transcript-composition.tsx +5 -1
  406. package/dist/r/src/components/layout/floating-preview/floating-preview.tsx +6 -1
  407. package/dist/r/src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx +5 -1
  408. package/dist/r/src/components/layout/shell-rail/shell-rail.tsx +5 -1
  409. package/dist/r/src/components/layout/side-rail/side-rail.tsx +16 -19
  410. package/dist/r/src/components/layout/sidebar-nav/sidebar-nav.tsx +5 -1
  411. package/dist/r/src/components/layout/split-layout/split-layout.tsx +6 -1
  412. package/dist/r/src/components/layout/top-bar/top-bar.tsx +8 -8
  413. package/dist/r/src/components/theme/appearance-panel.tsx +6 -1
  414. package/dist/r/src/components/theme/theme-mode-toggle.tsx +7 -1
  415. package/dist/r/src/components/theme/theme-toggle.tsx +7 -1
  416. package/dist/r/src/components/ui/accordion/accordion.tsx +5 -1
  417. package/dist/r/src/components/ui/alert/alert.tsx +20 -3
  418. package/dist/r/src/components/ui/annotation-surface/annotation-surface.tsx +6 -3
  419. package/dist/r/src/components/ui/attachment/attachment.tsx +19 -8
  420. package/dist/r/src/components/ui/badge/badge.tsx +24 -8
  421. package/dist/r/src/components/ui/breadcrumb/breadcrumb.tsx +9 -1
  422. package/dist/r/src/components/ui/button/button.tsx +47 -16
  423. package/dist/r/src/components/ui/calendar/calendar.tsx +6 -1
  424. package/dist/r/src/components/ui/carousel/carousel.tsx +15 -5
  425. package/dist/r/src/components/ui/checkbox/checkbox.tsx +260 -22
  426. package/dist/r/src/components/ui/code-block/code-block.tsx +11 -5
  427. package/dist/r/src/components/ui/combobox/combobox.tsx +8 -9
  428. package/dist/r/src/components/ui/command/command.tsx +8 -4
  429. package/dist/r/src/components/ui/detail-panel/detail-panel.tsx +5 -1
  430. package/dist/r/src/components/ui/dialog/dialog-layer.tsx +16 -18
  431. package/dist/r/src/components/ui/dialog/dialog.tsx +5 -1
  432. package/dist/r/src/components/ui/dropdown-menu/menu-parts.tsx +11 -1
  433. package/dist/r/src/components/ui/empty/empty-state.tsx +5 -1
  434. package/dist/r/src/components/ui/field/field.tsx +14 -5
  435. package/dist/r/src/components/ui/input/input-control.tsx +28 -19
  436. package/dist/r/src/components/ui/input/input.tsx +9 -12
  437. package/dist/r/src/components/ui/input-group/input-group.tsx +1 -8
  438. package/dist/r/src/components/ui/kbd/kbd.tsx +53 -12
  439. package/dist/r/src/components/ui/message/index.ts +3 -0
  440. package/dist/r/src/components/ui/message/message.tsx +11 -2
  441. package/dist/r/src/components/ui/message/parse-message-text.ts +94 -2
  442. package/dist/r/src/components/ui/native-select/native-select.tsx +6 -9
  443. package/dist/r/src/components/ui/navigation-menu/navigation-menu.tsx +5 -1
  444. package/dist/r/src/components/ui/pagination/pagination.tsx +11 -1
  445. package/dist/r/src/components/ui/questionnaire/questionnaire.tsx +13 -1
  446. package/dist/r/src/components/ui/radio-group/radio-group.tsx +6 -9
  447. package/dist/r/src/components/ui/resizable/resizable.tsx +5 -1
  448. package/dist/r/src/components/ui/select/select.tsx +11 -1
  449. package/dist/r/src/components/ui/sheet/sheet.tsx +5 -1
  450. package/dist/r/src/components/ui/spinner/spinner.tsx +5 -1
  451. package/dist/r/src/components/ui/status-chip/status-chip.tsx +14 -7
  452. package/dist/r/src/components/ui/switch/switch.tsx +235 -28
  453. package/dist/r/src/components/ui/textarea/textarea.tsx +1 -8
  454. package/dist/r/src/components/ui/toast/toast.tsx +5 -1
  455. package/dist/r/src/components/ui/tooltip/deferred-tooltip.tsx +14 -8
  456. package/dist/r/src/components/ui/tooltip/index.ts +1 -0
  457. package/dist/r/src/components/ui/tooltip/lazy-tooltip.tsx +73 -0
  458. package/dist/r/src/components/ui/trace/trace.tsx +61 -28
  459. package/dist/r/src/components/ui/typography/typography.tsx +6 -5
  460. package/dist/r/src/lib/clipboard.ts +4 -0
  461. package/dist/r/src/lib/fast-icon.ts +88 -0
  462. package/dist/r/src/lib/form-field.ts +7 -7
  463. package/dist/r/src/lib/observe-resize.ts +28 -0
  464. package/dist/r/src/lib/overlay.ts +1 -1
  465. package/dist/r/subagent.json +2 -1
  466. package/dist/r/tool.json +2 -1
  467. package/dist/r/tooltip.json +5 -0
  468. package/dist/r/top-bar.json +1 -0
  469. package/dist/r/trace.json +0 -1
  470. package/package.json +1 -1
  471. package/registry.json +33 -9
  472. package/src/components/composites/about-dialog/about-dialog.tsx +5 -1
  473. package/src/components/composites/accent-picker/accent-picker.tsx +22 -17
  474. package/src/components/composites/account-menu/account-menu.tsx +21 -9
  475. package/src/components/composites/action-button/action-button.tsx +38 -21
  476. package/src/components/composites/appearance-editor/appearance-choices.tsx +7 -1
  477. package/src/components/composites/appearance-editor/appearance-editor.tsx +13 -1
  478. package/src/components/composites/appearance-editor/appearance-rows.tsx +13 -1
  479. package/src/components/composites/appearance-editor/font-settings-group.tsx +13 -1
  480. package/src/components/composites/catalog-browser/catalog-browser-group.tsx +11 -1
  481. package/src/components/composites/catalog-browser/catalog-browser.tsx +11 -1
  482. package/src/components/composites/chain-of-thought/chain-of-thought.tsx +5 -1
  483. package/src/components/composites/chat/chat.tsx +11 -1
  484. package/src/components/composites/checkpoint/checkpoint.tsx +5 -1
  485. package/src/components/composites/confirmation/confirmation.tsx +15 -1
  486. package/src/components/composites/context/context.tsx +9 -1
  487. package/src/components/composites/file-tree/file-tree.tsx +11 -1
  488. package/src/components/composites/help-center/help-center.tsx +5 -1
  489. package/src/components/composites/icon-picker/icon-picker.tsx +59 -31
  490. package/src/components/composites/icon-picker/shell-icons.ts +121 -59
  491. package/src/components/composites/inline-citation/inline-citation.tsx +6 -1
  492. package/src/components/composites/list-row/list-row-control.tsx +7 -5
  493. package/src/components/composites/message-scroller/message-scroller.tsx +6 -1
  494. package/src/components/composites/model-selector/model-selector.tsx +197 -11
  495. package/src/components/composites/plan/plan.tsx +5 -1
  496. package/src/components/composites/queue/queue.tsx +15 -1
  497. package/src/components/composites/reasoning/reasoning.tsx +5 -1
  498. package/src/components/composites/scene-controls/scene-controls.tsx +17 -1
  499. package/src/components/composites/settings/settings.tsx +23 -14
  500. package/src/components/composites/sources/sources.tsx +27 -20
  501. package/src/components/composites/stack-trace/stack-trace.tsx +13 -1
  502. package/src/components/composites/stat/stat.tsx +9 -1
  503. package/src/components/composites/subagent/subagent.tsx +5 -1
  504. package/src/components/composites/task/task.tsx +5 -1
  505. package/src/components/composites/terminal/ansi.ts +18 -0
  506. package/src/components/composites/terminal/terminal.tsx +17 -7
  507. package/src/components/composites/test-results/test-results.tsx +17 -7
  508. package/src/components/composites/tool/tool.tsx +5 -1
  509. package/src/components/composites/tree/tree.tsx +5 -1
  510. package/src/components/composites/update-dialog/update-dialog.tsx +35 -15
  511. package/src/components/composites/workspace-mark/workspace-mark.tsx +14 -7
  512. package/src/components/composites/workspace-switcher/workspace-reorder-dialog.tsx +6 -1
  513. package/src/components/composites/workspace-switcher/workspace-switcher.tsx +13 -1
  514. package/src/components/conversation/busy-send-button.tsx +11 -1
  515. package/src/components/conversation/conversation-avatar.tsx +7 -1
  516. package/src/components/conversation/conversation-surface.tsx +5 -1
  517. package/src/components/conversation/internal/chat-composer-shell.tsx +13 -1
  518. package/src/components/conversation/message-composer.tsx +13 -1
  519. package/src/components/conversation/message-row.tsx +15 -1
  520. package/src/components/conversation/thread-panel.tsx +5 -1
  521. package/src/components/conversation/transcript-composition.tsx +5 -1
  522. package/src/components/layout/floating-preview/floating-preview.tsx +6 -1
  523. package/src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx +5 -1
  524. package/src/components/layout/shell-rail/shell-rail.tsx +5 -1
  525. package/src/components/layout/side-rail/side-rail.tsx +16 -19
  526. package/src/components/layout/sidebar-nav/sidebar-nav.tsx +5 -1
  527. package/src/components/layout/split-layout/split-layout.tsx +6 -1
  528. package/src/components/layout/top-bar/top-bar.tsx +8 -8
  529. package/src/components/theme/appearance-panel.tsx +6 -1
  530. package/src/components/theme/theme-mode-toggle.tsx +7 -1
  531. package/src/components/theme/theme-toggle.tsx +7 -1
  532. package/src/components/ui/accordion/accordion.tsx +5 -1
  533. package/src/components/ui/alert/alert.tsx +20 -3
  534. package/src/components/ui/annotation-surface/annotation-surface.tsx +6 -3
  535. package/src/components/ui/attachment/attachment.tsx +19 -8
  536. package/src/components/ui/badge/badge.tsx +24 -8
  537. package/src/components/ui/breadcrumb/breadcrumb.tsx +9 -1
  538. package/src/components/ui/button/button.tsx +47 -16
  539. package/src/components/ui/calendar/calendar.tsx +6 -1
  540. package/src/components/ui/carousel/carousel.tsx +15 -5
  541. package/src/components/ui/checkbox/checkbox.tsx +260 -22
  542. package/src/components/ui/code-block/code-block.tsx +11 -5
  543. package/src/components/ui/combobox/combobox.tsx +8 -9
  544. package/src/components/ui/command/command.tsx +8 -4
  545. package/src/components/ui/detail-panel/detail-panel.tsx +5 -1
  546. package/src/components/ui/dialog/dialog-layer.tsx +16 -18
  547. package/src/components/ui/dialog/dialog.tsx +5 -1
  548. package/src/components/ui/dropdown-menu/menu-parts.tsx +11 -1
  549. package/src/components/ui/empty/empty-state.tsx +5 -1
  550. package/src/components/ui/field/field.tsx +14 -5
  551. package/src/components/ui/input/input-control.tsx +28 -19
  552. package/src/components/ui/input/input.tsx +9 -12
  553. package/src/components/ui/input-group/input-group.tsx +1 -8
  554. package/src/components/ui/kbd/kbd.tsx +53 -12
  555. package/src/components/ui/message/index.ts +3 -0
  556. package/src/components/ui/message/message.tsx +11 -2
  557. package/src/components/ui/message/parse-message-text.ts +94 -2
  558. package/src/components/ui/native-select/native-select.tsx +6 -9
  559. package/src/components/ui/navigation-menu/navigation-menu.tsx +5 -1
  560. package/src/components/ui/pagination/pagination.tsx +11 -1
  561. package/src/components/ui/questionnaire/questionnaire.tsx +13 -1
  562. package/src/components/ui/radio-group/radio-group.tsx +6 -9
  563. package/src/components/ui/resizable/resizable.tsx +5 -1
  564. package/src/components/ui/select/select.tsx +11 -1
  565. package/src/components/ui/sheet/sheet.tsx +5 -1
  566. package/src/components/ui/spinner/spinner.tsx +5 -1
  567. package/src/components/ui/status-chip/status-chip.tsx +14 -7
  568. package/src/components/ui/switch/switch.tsx +235 -28
  569. package/src/components/ui/textarea/textarea.tsx +1 -8
  570. package/src/components/ui/toast/toast.tsx +5 -1
  571. package/src/components/ui/tooltip/deferred-tooltip.tsx +14 -8
  572. package/src/components/ui/tooltip/index.ts +1 -0
  573. package/src/components/ui/tooltip/lazy-tooltip.tsx +73 -0
  574. package/src/components/ui/trace/trace.tsx +61 -28
  575. package/src/components/ui/typography/typography.tsx +6 -5
  576. package/src/lib/clipboard.ts +4 -0
  577. package/src/lib/fast-icon.ts +88 -0
  578. package/src/lib/form-field.ts +7 -7
  579. package/src/lib/observe-resize.ts +28 -0
  580. package/src/lib/overlay.ts +1 -1
  581. package/src/lint/index.ts +199 -0
@@ -1 +1 @@
1
- {"version":3,"file":"navigation-menu.js","names":["children","resolveChildren","splitProps","KobalteNavigationMenu","ChevronDown","cn","menuItem","menuLabel","menuSeparator","overlayMotion","overlaySurface","Root","label","NavigationMenu","props","local","rest","_$createComponent","_$mergeProps","class","_$memo","NavigationMenuViewport","NavigationMenuMenu","Menu","NavigationMenuTrigger","Trigger","NavigationMenuContent","Content","Portal","Viewport","Item","description","icon","NavigationMenuItem","_el$","_tmpl$","_$insert","_el$2","_tmpl$2","_$effect","_$className","NavigationMenuSeparator","Separator","NavigationMenuGroupLabel","GroupLabel","NavigationMenuGroup","Group"],"sources":["../../../../src/components/ui/navigation-menu/navigation-menu.tsx"],"sourcesContent":["import { children as resolveChildren, splitProps, type ComponentProps, type JSX } from 'solid-js'\nimport * as KobalteNavigationMenu from '@kobalte/core/navigation-menu'\nimport { ChevronDown } from 'lucide-solid'\nimport { cn } from '#lib/utils'\nimport {\n menuContentPadding,\n menuItem,\n menuLabel,\n menuSeparator,\n overlayMotion,\n overlaySurface,\n} from '#lib/overlay'\n\n/**\n * NavigationMenu.\n *\n * A site-style menu bar: top-level triggers that open panels of links. It is the\n * header pattern — a documentation site, a marketing page, an application with\n * several top-level destinations — and it is deliberately *not* a `Menubar`.\n * `Menubar` is a row of application menus (File, Edit, View) whose items are\n * commands; this is a row of destinations whose panels are links. The two have\n * different roles, different keyboard models, and different semantics.\n *\n * ## Composition\n *\n * Kobalte's primitive has an unusual shape, and getting it wrong is why this took\n * three attempts to port. The structure is:\n *\n * ```tsx\n * <NavigationMenu>\n * <NavigationMenuMenu>\n * <NavigationMenuTrigger>Destinations</NavigationMenuTrigger>\n * <NavigationMenuContent>\n * <NavigationMenuItem href=\"/x\">X</NavigationMenuItem>\n * </NavigationMenuContent>\n * </NavigationMenuMenu>\n * <NavigationMenuViewport />\n * </NavigationMenu>\n * ```\n *\n * Three facts that are not obvious from the prop types:\n *\n * - `Menu` renders **nothing**. It is a context provider — one per top-level\n * entry, naming it so the bar's arrow keys can move between entries. A menu\n * without one cannot be reached by keyboard.\n * - `Trigger` renders `<li role=\"presentation\"><button>`. It is already the list\n * item, so wrapping it in your own `<li>` produces a `<ul>` inside a `<ul>`.\n * - `Content` must be a direct child of `Menu`, and the `Viewport` is a **sibling\n * of the menus** — not inside them. All the panels share one viewport, which is\n * what lets the bar animate between them instead of each panel popping in place.\n * - The viewport is an empty surface. Each `Content` reaches it through Kobalte's\n * `Portal`, which mounts the panel inside the viewport while keeping it in its\n * own `Menu`'s context. A `Content` rendered anywhere else — the viewport's own\n * children included — has no `Menu` above it, and Kobalte throws\n * `useMenuRootContext must be used within a MenuRoot` the moment a panel opens.\n *\n * The wrapper enforces the last two by rendering the `Viewport` itself and by\n * portalling every `NavigationMenuContent`, so a caller cannot forget either and\n * get a menu whose panels never appear.\n */\n\nexport type NavigationMenuProps = ComponentProps<typeof KobalteNavigationMenu.Root> & {\n /** The accessible name for the navigation landmark. */\n label?: string\n}\n\nexport function NavigationMenu(props: NavigationMenuProps) {\n const [local, rest] = splitProps(props, ['label', 'class', 'children'])\n\n return (\n <KobalteNavigationMenu.Root\n class={cn(\n 'relative flex max-w-max flex-1 items-center justify-center',\n '[&>nav>ul]:flex [&>nav>ul]:items-center [&>nav>ul]:gap-1',\n local.class\n )}\n aria-label={local.label ?? 'Main'}\n {...rest}\n >\n {local.children}\n {/*\n The shared panel surface. Rendered here rather than left to the caller:\n every panel animates through this one element, and a menu bar without it\n opens panels that never paint.\n */}\n <NavigationMenuViewport />\n </KobalteNavigationMenu.Root>\n )\n}\n\n/**\n * One top-level entry. Renders nothing itself — see the note above — and exists\n * so a caller cannot build a bar whose entries the keyboard cannot reach.\n */\nexport function NavigationMenuMenu(props: ComponentProps<typeof KobalteNavigationMenu.Menu>) {\n return <KobalteNavigationMenu.Menu {...props} />\n}\n\nexport function NavigationMenuTrigger(props: ComponentProps<typeof KobalteNavigationMenu.Trigger>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteNavigationMenu.Trigger\n class={cn(\n 'inline-flex items-center gap-1 rounded-md px-3 py-1.5 text-sm font-medium text-muted-foreground',\n 'transition-colors ease-out outline-none select-none',\n 'hover:bg-muted hover:text-foreground',\n 'data-[expanded]:bg-muted data-[expanded]:text-foreground',\n 'data-[highlighted]:bg-muted data-[highlighted]:text-foreground',\n 'focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none',\n local.class\n )}\n {...rest}\n >\n {local.children}\n <ChevronDown\n aria-hidden=\"true\"\n class=\"size-3.5 transition-transform duration-200 ease-out [[data-expanded]_&]:rotate-180\"\n />\n </KobalteNavigationMenu.Trigger>\n )\n}\n\nexport function NavigationMenuContent(props: ComponentProps<typeof KobalteNavigationMenu.Content>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteNavigationMenu.Portal>\n <KobalteNavigationMenu.Content\n class={cn(\n // Absolute so the viewport sizes to the active panel's measured box and\n // animates between panels, rather than stacking them.\n 'absolute top-0 left-0 grid w-max gap-1 outline-none',\n // The viewport is the surface and carries no padding of its own (its\n // measured size is the panel's), so the panel supplies the inset every\n // menu surface shares — the one the separator's bleed is cut for.\n menuContentPadding,\n // The motion is the panel's, not the viewport's. Kobalte keeps an\n // outgoing panel mounted until the viewport's own animation ends; a\n // viewport that carries an entrance animation never fires that again\n // after it opens, so the previous panel would stay painted under the\n // next one.\n overlayMotion,\n // A two-column panel is the shape most menu bars want, and it is opt-in\n // through this hook rather than a prop because the column count is a\n // layout decision the caller's content makes.\n 'data-[wide]:grid-cols-2',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </KobalteNavigationMenu.Content>\n </KobalteNavigationMenu.Portal>\n )\n}\n\n/**\n * The shared panel surface. One per menu bar, and the wrapper supplies it — but\n * exported so a caller with an unusual layout can place it themselves.\n *\n * It renders no children: the panels arrive through each `NavigationMenuContent`'s\n * portal. Kobalte positions it under the bar and publishes the active panel's size\n * as `--kb-navigation-menu-viewport-*`, which the surface animates between.\n * `box-content` keeps the border outside that measured size so a panel is never\n * clipped by its own frame.\n */\nexport function NavigationMenuViewport(\n props: ComponentProps<typeof KobalteNavigationMenu.Viewport>\n) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <KobalteNavigationMenu.Viewport\n data-slot=\"navigation-menu-viewport\"\n class={cn(\n overlaySurface,\n 'isolate z-(--z-menu) mt-1.5 box-content list-none overflow-hidden',\n 'h-(--kb-navigation-menu-viewport-height) w-(--kb-navigation-menu-viewport-width)',\n 'origin-(--kb-menu-content-transform-origin) transition-[width,height] duration-200 ease-out',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/**\n * A link inside a panel. `href` is the point of the component, so it is a link\n * rather than a button — and the accessible name comes from its text, which is\n * why there is no `aria-label` here.\n */\nexport type NavigationMenuItemProps = ComponentProps<typeof KobalteNavigationMenu.Item> & {\n /** A one-line description, shown under the label. */\n description?: string\n icon?: JSX.Element\n}\n\nexport function NavigationMenuItem(props: NavigationMenuItemProps) {\n const [local, rest] = splitProps(props, ['class', 'children', 'description', 'icon'])\n const icon = resolveChildren(() => local.icon)\n\n return (\n <KobalteNavigationMenu.Item\n class={cn(\n menuItem,\n // The description sits under the label, in the label's column. Without\n // an icon there is no leading column, and a two-column grid would set\n // the description beside the label instead of beneath it.\n icon() ? 'grid grid-cols-[auto_1fr]' : 'grid grid-cols-1',\n 'items-center gap-x-2 gap-y-0.5',\n local.description && 'grid-rows-[auto_auto] py-2',\n local.class\n )}\n {...rest}\n >\n {icon()}\n <span class=\"font-medium\">{local.children}</span>\n {local.description && (\n <span\n class={cn('text-xs text-muted-foreground', {\n 'col-start-2': !!icon(),\n })}\n >\n {local.description}\n </span>\n )}\n </KobalteNavigationMenu.Item>\n )\n}\n\nexport function NavigationMenuSeparator(\n props: ComponentProps<typeof KobalteNavigationMenu.Separator>\n) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteNavigationMenu.Separator class={cn(menuSeparator, local.class)} {...rest} />\n}\n\n/** A non-interactive caption above a group of items. */\nexport function NavigationMenuGroupLabel(\n props: ComponentProps<typeof KobalteNavigationMenu.GroupLabel>\n) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteNavigationMenu.GroupLabel class={cn(menuLabel, local.class)} {...rest} />\n}\n\nexport function NavigationMenuGroup(props: ComponentProps<typeof KobalteNavigationMenu.Group>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteNavigationMenu.Group class={cn('grid gap-0.5', local.class)} {...rest} />\n}\n"],"mappings":";;;;;;;;;AAkEA,SAAgBa,eAAeC,OAA4B;CACzD,MAAM,CAACC,OAAOC,QAAQd,WAAWY,OAAO;EAAC;EAAS;EAAS;CAAU,CAAC;CAEtE,OAAAG,gBACGd,sBAAsBQ,MAAIO,WAAA;EAAA,KAAA,WAAA;GAAA,OAClBb,GACL,8DACA,4DACAU,MAAMI,KACR;EAAC;EAAA,KAAA,gBAAA;GAAA,OACWJ,MAAMH,SAAS;EAAM;CAAA,GAC7BI,MAAI,EAAA,IAAAhB,WAAA;EAAA,OAAA,CAAAoB,WAEPL,MAAMf,QAAQ,GAAAiB,gBAMdI,wBAAsB,CAAA,CAAA,CAAA;CAAA,EAAA,CAAA,CAAA;AAG7B;;;;;AAMA,SAAgBC,mBAAmBR,OAA0D;CAC3F,OAAAG,gBAAQd,sBAAsBoB,MAAST,KAAK;AAC9C;AAEA,SAAgBU,sBAAsBV,OAA6D;CACjG,MAAM,CAACC,OAAOC,QAAQd,WAAWY,OAAO,CAAC,SAAS,UAAU,CAAC;CAE7D,OAAAG,gBACGd,sBAAsBsB,SAAOP,WAAA,EAAA,KAAA,WAAA;EAAA,OACrBb,GACL,mGACA,uDACA,wCACA,4DACA,kEACA,2EACAU,MAAMI,KACR;CAAC,EAAA,GACGH,MAAI,EAAA,IAAAhB,WAAA;EAAA,OAAA,CAAAoB,WAEPL,MAAMf,QAAQ,GAAAiB,gBACdb,aAAW;GAAA,eAAA;GAAA,SAAA;EAAA,CAAA,CAAA;CAAA,EAAA,CAAA,CAAA;AAMlB;AAEA,SAAgBsB,sBAAsBZ,OAA6D;CACjG,MAAM,CAACC,OAAOC,QAAQd,WAAWY,OAAO,CAAC,SAAS,UAAU,CAAC;CAE7D,OAAAG,gBACGd,sBAAsByB,QAAM,EAAA,I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,CAAC2B,KAAK,EACxB,CAAC,CAAC,CAAA;IAAA,OAAAK;GAAA,EAAA,CAAA,CAIL;EAAA;CAAA,EAAA,CAAA,CAAA;AAGP;AAEA,SAAgBI,wBACd3B,OACA;CACA,MAAM,CAACC,OAAOC,QAAQd,WAAWY,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBAAQd,sBAAsBuC,WAASxB,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQb,GAAGG,eAAeO,MAAMI,KAAK;CAAC,EAAA,GAAMH,IAAI,CAAA;AACzF;;AAGA,SAAgB2B,yBACd7B,OACA;CACA,MAAM,CAACC,OAAOC,QAAQd,WAAWY,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBAAQd,sBAAsByC,YAAU1B,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQb,GAAGE,WAAWQ,MAAMI,KAAK;CAAC,EAAA,GAAMH,IAAI,CAAA;AACtF;AAEA,SAAgB6B,oBAAoB/B,OAA2D;CAC7F,MAAM,CAACC,OAAOC,QAAQd,WAAWY,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBAAQd,sBAAsB2C,OAAK5B,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQb,GAAG,gBAAgBU,MAAMI,KAAK;CAAC,EAAA,GAAMH,IAAI,CAAA;AACtF"}
1
+ {"version":3,"file":"navigation-menu.js","names":["children","resolveChildren","splitProps","KobalteNavigationMenu","ChevronDown","LucideChevronDown","cn","menuItem","menuLabel","menuSeparator","overlayMotion","overlaySurface","fastIcon","Root","label","NavigationMenu","props","local","rest","_$createComponent","_$mergeProps","class","_$memo","NavigationMenuViewport","NavigationMenuMenu","Menu","NavigationMenuTrigger","Trigger","NavigationMenuContent","Content","Portal","Viewport","Item","description","icon","NavigationMenuItem","_el$","_tmpl$","_$insert","_el$2","_tmpl$2","_$effect","_$className","NavigationMenuSeparator","Separator","NavigationMenuGroupLabel","GroupLabel","NavigationMenuGroup","Group"],"sources":["../../../../src/components/ui/navigation-menu/navigation-menu.tsx"],"sourcesContent":["import { children as resolveChildren, splitProps, type ComponentProps, type JSX } from 'solid-js'\nimport * as KobalteNavigationMenu from '@kobalte/core/navigation-menu'\nimport { ChevronDown as LucideChevronDown } from 'lucide-solid'\nimport { cn } from '#lib/utils'\nimport {\n menuContentPadding,\n menuItem,\n menuLabel,\n menuSeparator,\n overlayMotion,\n overlaySurface,\n} from '#lib/overlay'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst ChevronDown = fastIcon(LucideChevronDown)\n\n/**\n * NavigationMenu.\n *\n * A site-style menu bar: top-level triggers that open panels of links. It is the\n * header pattern — a documentation site, a marketing page, an application with\n * several top-level destinations — and it is deliberately *not* a `Menubar`.\n * `Menubar` is a row of application menus (File, Edit, View) whose items are\n * commands; this is a row of destinations whose panels are links. The two have\n * different roles, different keyboard models, and different semantics.\n *\n * ## Composition\n *\n * Kobalte's primitive has an unusual shape, and getting it wrong is why this took\n * three attempts to port. The structure is:\n *\n * ```tsx\n * <NavigationMenu>\n * <NavigationMenuMenu>\n * <NavigationMenuTrigger>Destinations</NavigationMenuTrigger>\n * <NavigationMenuContent>\n * <NavigationMenuItem href=\"/x\">X</NavigationMenuItem>\n * </NavigationMenuContent>\n * </NavigationMenuMenu>\n * <NavigationMenuViewport />\n * </NavigationMenu>\n * ```\n *\n * Three facts that are not obvious from the prop types:\n *\n * - `Menu` renders **nothing**. It is a context provider — one per top-level\n * entry, naming it so the bar's arrow keys can move between entries. A menu\n * without one cannot be reached by keyboard.\n * - `Trigger` renders `<li role=\"presentation\"><button>`. It is already the list\n * item, so wrapping it in your own `<li>` produces a `<ul>` inside a `<ul>`.\n * - `Content` must be a direct child of `Menu`, and the `Viewport` is a **sibling\n * of the menus** — not inside them. All the panels share one viewport, which is\n * what lets the bar animate between them instead of each panel popping in place.\n * - The viewport is an empty surface. Each `Content` reaches it through Kobalte's\n * `Portal`, which mounts the panel inside the viewport while keeping it in its\n * own `Menu`'s context. A `Content` rendered anywhere else — the viewport's own\n * children included — has no `Menu` above it, and Kobalte throws\n * `useMenuRootContext must be used within a MenuRoot` the moment a panel opens.\n *\n * The wrapper enforces the last two by rendering the `Viewport` itself and by\n * portalling every `NavigationMenuContent`, so a caller cannot forget either and\n * get a menu whose panels never appear.\n */\n\nexport type NavigationMenuProps = ComponentProps<typeof KobalteNavigationMenu.Root> & {\n /** The accessible name for the navigation landmark. */\n label?: string\n}\n\nexport function NavigationMenu(props: NavigationMenuProps) {\n const [local, rest] = splitProps(props, ['label', 'class', 'children'])\n\n return (\n <KobalteNavigationMenu.Root\n class={cn(\n 'relative flex max-w-max flex-1 items-center justify-center',\n '[&>nav>ul]:flex [&>nav>ul]:items-center [&>nav>ul]:gap-1',\n local.class\n )}\n aria-label={local.label ?? 'Main'}\n {...rest}\n >\n {local.children}\n {/*\n The shared panel surface. Rendered here rather than left to the caller:\n every panel animates through this one element, and a menu bar without it\n opens panels that never paint.\n */}\n <NavigationMenuViewport />\n </KobalteNavigationMenu.Root>\n )\n}\n\n/**\n * One top-level entry. Renders nothing itself — see the note above — and exists\n * so a caller cannot build a bar whose entries the keyboard cannot reach.\n */\nexport function NavigationMenuMenu(props: ComponentProps<typeof KobalteNavigationMenu.Menu>) {\n return <KobalteNavigationMenu.Menu {...props} />\n}\n\nexport function NavigationMenuTrigger(props: ComponentProps<typeof KobalteNavigationMenu.Trigger>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteNavigationMenu.Trigger\n class={cn(\n 'inline-flex items-center gap-1 rounded-md px-3 py-1.5 text-sm font-medium text-muted-foreground',\n 'transition-colors ease-out outline-none select-none',\n 'hover:bg-muted hover:text-foreground',\n 'data-[expanded]:bg-muted data-[expanded]:text-foreground',\n 'data-[highlighted]:bg-muted data-[highlighted]:text-foreground',\n 'focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none',\n local.class\n )}\n {...rest}\n >\n {local.children}\n <ChevronDown\n aria-hidden=\"true\"\n class=\"size-3.5 transition-transform duration-200 ease-out [[data-expanded]_&]:rotate-180\"\n />\n </KobalteNavigationMenu.Trigger>\n )\n}\n\nexport function NavigationMenuContent(props: ComponentProps<typeof KobalteNavigationMenu.Content>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteNavigationMenu.Portal>\n <KobalteNavigationMenu.Content\n class={cn(\n // Absolute so the viewport sizes to the active panel's measured box and\n // animates between panels, rather than stacking them.\n 'absolute top-0 left-0 grid w-max gap-1 outline-none',\n // The viewport is the surface and carries no padding of its own (its\n // measured size is the panel's), so the panel supplies the inset every\n // menu surface shares — the one the separator's bleed is cut for.\n menuContentPadding,\n // The motion is the panel's, not the viewport's. Kobalte keeps an\n // outgoing panel mounted until the viewport's own animation ends; a\n // viewport that carries an entrance animation never fires that again\n // after it opens, so the previous panel would stay painted under the\n // next one.\n overlayMotion,\n // A two-column panel is the shape most menu bars want, and it is opt-in\n // through this hook rather than a prop because the column count is a\n // layout decision the caller's content makes.\n 'data-[wide]:grid-cols-2',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </KobalteNavigationMenu.Content>\n </KobalteNavigationMenu.Portal>\n )\n}\n\n/**\n * The shared panel surface. One per menu bar, and the wrapper supplies it — but\n * exported so a caller with an unusual layout can place it themselves.\n *\n * It renders no children: the panels arrive through each `NavigationMenuContent`'s\n * portal. Kobalte positions it under the bar and publishes the active panel's size\n * as `--kb-navigation-menu-viewport-*`, which the surface animates between.\n * `box-content` keeps the border outside that measured size so a panel is never\n * clipped by its own frame.\n */\nexport function NavigationMenuViewport(\n props: ComponentProps<typeof KobalteNavigationMenu.Viewport>\n) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <KobalteNavigationMenu.Viewport\n data-slot=\"navigation-menu-viewport\"\n class={cn(\n overlaySurface,\n 'isolate z-(--z-menu) mt-1.5 box-content list-none overflow-hidden',\n 'h-(--kb-navigation-menu-viewport-height) w-(--kb-navigation-menu-viewport-width)',\n 'origin-(--kb-menu-content-transform-origin) transition-[width,height] duration-200 ease-out',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/**\n * A link inside a panel. `href` is the point of the component, so it is a link\n * rather than a button — and the accessible name comes from its text, which is\n * why there is no `aria-label` here.\n */\nexport type NavigationMenuItemProps = ComponentProps<typeof KobalteNavigationMenu.Item> & {\n /** A one-line description, shown under the label. */\n description?: string\n icon?: JSX.Element\n}\n\nexport function NavigationMenuItem(props: NavigationMenuItemProps) {\n const [local, rest] = splitProps(props, ['class', 'children', 'description', 'icon'])\n const icon = resolveChildren(() => local.icon)\n\n return (\n <KobalteNavigationMenu.Item\n class={cn(\n menuItem,\n // The description sits under the label, in the label's column. Without\n // an icon there is no leading column, and a two-column grid would set\n // the description beside the label instead of beneath it.\n icon() ? 'grid grid-cols-[auto_1fr]' : 'grid grid-cols-1',\n 'items-center gap-x-2 gap-y-0.5',\n local.description && 'grid-rows-[auto_auto] py-2',\n local.class\n )}\n {...rest}\n >\n {icon()}\n <span class=\"font-medium\">{local.children}</span>\n {local.description && (\n <span\n class={cn('text-xs text-muted-foreground', {\n 'col-start-2': !!icon(),\n })}\n >\n {local.description}\n </span>\n )}\n </KobalteNavigationMenu.Item>\n )\n}\n\nexport function NavigationMenuSeparator(\n props: ComponentProps<typeof KobalteNavigationMenu.Separator>\n) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteNavigationMenu.Separator class={cn(menuSeparator, local.class)} {...rest} />\n}\n\n/** A non-interactive caption above a group of items. */\nexport function NavigationMenuGroupLabel(\n props: ComponentProps<typeof KobalteNavigationMenu.GroupLabel>\n) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteNavigationMenu.GroupLabel class={cn(menuLabel, local.class)} {...rest} />\n}\n\nexport function NavigationMenuGroup(props: ComponentProps<typeof KobalteNavigationMenu.Group>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteNavigationMenu.Group class={cn('grid gap-0.5', local.class)} {...rest} />\n}\n"],"mappings":";;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B,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,iBAAiB,CAAC,QAAQ,CAAC,eAa1F;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC,eAalF;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC,eAelF;AAED,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,cAAc,CAAC,OAAO,iBAAiB,CAAC,QAAQ,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;CAAE,eAiBtF"}
@@ -1,4 +1,5 @@
1
1
  import { cn } from "../../../lib/utils.js";
2
+ import { fastIcon } from "../../../lib/fast-icon.js";
2
3
  import { createComponent, memo, mergeProps, template } from "solid-js/web";
3
4
  import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-solid";
4
5
  import { Show, splitProps } from "solid-js";
@@ -7,6 +8,9 @@ import { Pagination } from "@kobalte/core/pagination";
7
8
  var _tmpl$ = /*#__PURE__*/ template(`<span class="hidden sm:inline">Previous`);
8
9
  var _tmpl$2 = /*#__PURE__*/ template(`<span class="hidden sm:inline">Next`);
9
10
  var _tmpl$3 = /*#__PURE__*/ template(`<span class=visually-hidden>More pages`);
11
+ var ChevronLeft$1 = fastIcon(ChevronLeft);
12
+ var ChevronRight$1 = fastIcon(ChevronRight);
13
+ var MoreHorizontal$1 = fastIcon(MoreHorizontal);
10
14
  var paginationControl = cn("inline-flex h-control-md min-w-(--control-height-md) items-center justify-center gap-1 rounded-md border border-transparent px-2 text-sm tabular-nums", "transition-colors ease-out outline-none select-none", "hover:bg-surface-hover", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle", "disabled:pointer-events-none disabled:opacity-50", "[&_svg]:pointer-events-none [&_svg]:size-4");
11
15
  function Pagination$1(props) {
12
16
  const [local, rest] = splitProps(props, [
@@ -57,7 +61,7 @@ function PaginationPrevious(props) {
57
61
  return createComponent(Pagination.Previous, mergeProps({ get ["class"]() {
58
62
  return cn(paginationControl, "ps-1.5", local.class);
59
63
  } }, rest, { get children() {
60
- return local.children ?? [createComponent(ChevronLeft, { "class": "size-4" }), _tmpl$()];
64
+ return local.children ?? [createComponent(ChevronLeft$1, { "class": "size-4" }), _tmpl$()];
61
65
  } }));
62
66
  }
63
67
  function PaginationNext(props) {
@@ -65,7 +69,7 @@ function PaginationNext(props) {
65
69
  return createComponent(Pagination.Next, mergeProps({ get ["class"]() {
66
70
  return cn(paginationControl, "pe-1.5", local.class);
67
71
  } }, rest, { get children() {
68
- return local.children ?? [_tmpl$2(), createComponent(ChevronRight, { "class": "size-4" })];
72
+ return local.children ?? [_tmpl$2(), createComponent(ChevronRight$1, { "class": "size-4" })];
69
73
  } }));
70
74
  }
71
75
  function PaginationItem(props) {
@@ -81,7 +85,7 @@ function PaginationEllipsis(props) {
81
85
  return createComponent(Pagination.Ellipsis, mergeProps({ get ["class"]() {
82
86
  return cn("flex size-control-md items-center justify-center", local.class);
83
87
  } }, rest, { get children() {
84
- return local.children ?? [createComponent(MoreHorizontal, { "class": "size-4" }), _tmpl$3()];
88
+ return local.children ?? [createComponent(MoreHorizontal$1, { "class": "size-4" }), _tmpl$3()];
85
89
  } }));
86
90
  }
87
91
  export { Pagination$1 as Pagination, PaginationEllipsis, PaginationItem, PaginationNext, PaginationPrevious };
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.js","names":["Pagination","KobaltePagination","ChevronLeft","ChevronRight","MoreHorizontal","Show","splitProps","cn","itemComponent","ellipsisComponent","class","children","paginationControl","props","local","rest","_$createComponent","_$mergeProps","itemProps","PaginationItem","page","PaginationEllipsis","when","fallback","DefaultPaginationControls","childrenSlot","_$memo","PaginationPrevious","Items","PaginationNext","Previous","_tmpl$","Next","_tmpl$2","Item","Ellipsis","_tmpl$3"],"sources":["../../../../src/components/ui/pagination/pagination.tsx"],"sourcesContent":["import {\n Pagination as KobaltePagination,\n type PaginationRootOptions,\n} from '@kobalte/core/pagination'\nimport { ChevronLeft, ChevronRight, MoreHorizontal } from 'lucide-solid'\nimport type { ComponentProps, JSX } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * Pagination.\n *\n * Page navigation for a list the server pages, not for a list the client already\n * holds — slicing an array you have is a filter, and it should not spend a round\n * trip.\n *\n * Kobalte computes the visible page window and the ellipsis positions and emits\n * `aria-current=\"page\"`, so the control announces which page is active instead of\n * leaving it to colour alone.\n *\n * The item and ellipsis renderers are *supplied here*, not required of the caller.\n * Kobalte's root makes them mandatory because it has no opinion about how a page\n * number should look; a design system does, so the only thing a caller has to pass\n * is `count` — while still being able to override either renderer when a view\n * needs to.\n */\nexport type PaginationProps = Omit<PaginationRootOptions, 'itemComponent' | 'ellipsisComponent'> & {\n itemComponent?: PaginationRootOptions['itemComponent']\n ellipsisComponent?: PaginationRootOptions['ellipsisComponent']\n class?: string\n children?: JSX.Element\n}\n\nconst paginationControl = cn(\n 'inline-flex h-control-md min-w-(--control-height-md) items-center justify-center gap-1 rounded-md border border-transparent px-2 text-sm tabular-nums',\n 'transition-colors ease-out outline-none select-none',\n 'hover:bg-surface-hover',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'disabled:pointer-events-none disabled:opacity-50',\n '[&_svg]:pointer-events-none [&_svg]:size-4'\n)\n\nexport function Pagination(props: PaginationProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'itemComponent',\n 'ellipsisComponent',\n 'children',\n ])\n\n return (\n <KobaltePagination\n itemComponent={\n local.itemComponent ??\n ((itemProps) => <PaginationItem page={itemProps.page}>{itemProps.page}</PaginationItem>)\n }\n ellipsisComponent={local.ellipsisComponent ?? (() => <PaginationEllipsis />)}\n // Kobalte renders the root as a `<nav>` wrapping a `<ul>`, and every control —\n // previous, the page run, next — is an `<li>` inside that list. The row has to be\n // declared on the list: on the `<nav>` alone it lays out one child and the\n // controls stack vertically.\n class={cn(\n 'flex w-full items-center justify-center [&>ul]:m-0 [&>ul]:flex [&>ul]:list-none [&>ul]:items-center [&>ul]:gap-1 [&>ul]:p-0',\n local.class\n )}\n {...rest}\n >\n <Show when={local.children} fallback={<DefaultPaginationControls />}>\n {(childrenSlot) => <>{childrenSlot()}</>}\n </Show>\n </KobaltePagination>\n )\n}\n\n/** Previous, the numbered run, next: the arrangement every list view wants. */\nfunction DefaultPaginationControls() {\n return (\n <>\n <PaginationPrevious />\n <KobaltePagination.Items />\n <PaginationNext />\n </>\n )\n}\n\nexport function PaginationPrevious(props: ComponentProps<typeof KobaltePagination.Previous>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobaltePagination.Previous class={cn(paginationControl, 'ps-1.5', local.class)} {...rest}>\n {local.children ?? (\n <>\n <ChevronLeft class=\"size-4\" />\n <span class=\"hidden sm:inline\">Previous</span>\n </>\n )}\n </KobaltePagination.Previous>\n )\n}\n\nexport function PaginationNext(props: ComponentProps<typeof KobaltePagination.Next>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobaltePagination.Next class={cn(paginationControl, 'pe-1.5', local.class)} {...rest}>\n {local.children ?? (\n <>\n <span class=\"hidden sm:inline\">Next</span>\n <ChevronRight class=\"size-4\" />\n </>\n )}\n </KobaltePagination.Next>\n )\n}\n\nexport function PaginationItem(props: ComponentProps<typeof KobaltePagination.Item>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobaltePagination.Item\n class={cn(\n paginationControl,\n 'data-[current]:border-border data-[current]:bg-surface-active data-[current]:font-medium',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </KobaltePagination.Item>\n )\n}\n\nexport function PaginationEllipsis(\n props: ComponentProps<typeof KobaltePagination.Ellipsis> & { children?: JSX.Element }\n) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobaltePagination.Ellipsis\n class={cn('flex size-control-md items-center justify-center', local.class)}\n {...rest}\n >\n {local.children ?? (\n <>\n <MoreHorizontal class=\"size-4\" />\n <span class=\"visually-hidden\">More pages</span>\n </>\n )}\n </KobaltePagination.Ellipsis>\n )\n}\n"],"mappings":";;;;;;;;;AAiCA,IAAMY,oBAAoBL,GACxB,yJACA,uDACA,0BACA,oFACA,oDACA,4CACF;AAEA,SAAgBP,aAAWa,OAAwB;CACjD,MAAM,CAACC,OAAOC,QAAQT,WAAWO,OAAO;EACtC;EACA;EACA;EACA;CAAU,CACX;CAED,OAAAG,gBACGf,YAAiBgB,WAAA;EAAA,IAChBT,gBAAa;GAAA,OACXM,MAAMN,mBACJU,cAASF,gBAAMG,gBAAc;IAAA,IAACC,OAAI;KAAA,OAAEF,UAAUE;IAAI;IAAA,IAAAT,WAAA;KAAA,OAAGO,UAAUE;IAAI;GAAA,CAAA;EAAmB;EAAA,IAE1FX,oBAAiB;GAAA,OAAEK,MAAML,4BAAsBO,gBAAOK,oBAAkB,CAAA,CAAA;EAAI;EAAA,KAAA,WAAA;GAAA,OAKrEd,GACL,+HACAO,MAAMJ,KACR;EAAC;CAAA,GACGK,MAAI,EAAA,IAAAJ,WAAA;EAAA,OAAAK,gBAEPX,MAAI;GAAA,IAACiB,OAAI;IAAA,OAAER,MAAMH;GAAQ;GAAA,IAAEY,WAAQ;IAAA,OAAAP,gBAAGQ,2BAAyB,CAAA,CAAA;GAAA;GAAAb,WAC5Dc,iBAAYC,KAAQD,YAAY;EAAM,CAAA;CAAA,EAAA,CAAA,CAAA;AAIhD;;AAGA,SAASD,4BAA4B;CACnC,OAAA;EAAAR,gBAEKW,oBAAkB,CAAA,CAAA;EAAAX,gBAClBf,WAAkB2B,OAAK,CAAA,CAAA;EAAAZ,gBACvBa,gBAAc,CAAA,CAAA;CAAA;AAGrB;AAEA,SAAgBF,mBAAmBd,OAA0D;CAC3F,MAAM,CAACC,OAAOC,QAAQT,WAAWO,OAAO,CAAC,SAAS,UAAU,CAAC;CAE7D,OAAAG,gBACGf,WAAkB6B,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,gBAAc,EAAA,SAAA,SAAA,CAAA,GAAAgC,QAAA,CAAA;CAGlB,EAAA,CAAA,CAAA;AAGP"}
1
+ {"version":3,"file":"pagination.js","names":["Pagination","KobaltePagination","ChevronLeft","LucideChevronLeft","ChevronRight","LucideChevronRight","MoreHorizontal","LucideMoreHorizontal","Show","splitProps","cn","fastIcon","itemComponent","ellipsisComponent","class","children","paginationControl","props","local","rest","_$createComponent","_$mergeProps","itemProps","PaginationItem","page","PaginationEllipsis","when","fallback","DefaultPaginationControls","childrenSlot","_$memo","PaginationPrevious","Items","PaginationNext","Previous","_tmpl$","Next","_tmpl$2","Item","Ellipsis","_tmpl$3"],"sources":["../../../../src/components/ui/pagination/pagination.tsx"],"sourcesContent":["import {\n Pagination as KobaltePagination,\n type PaginationRootOptions,\n} from '@kobalte/core/pagination'\nimport {\n ChevronLeft as LucideChevronLeft,\n ChevronRight as LucideChevronRight,\n MoreHorizontal as LucideMoreHorizontal,\n} from 'lucide-solid'\nimport type { ComponentProps, JSX } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst ChevronLeft = fastIcon(LucideChevronLeft)\nconst ChevronRight = fastIcon(LucideChevronRight)\nconst MoreHorizontal = fastIcon(LucideMoreHorizontal)\n\n/**\n * Pagination.\n *\n * Page navigation for a list the server pages, not for a list the client already\n * holds — slicing an array you have is a filter, and it should not spend a round\n * trip.\n *\n * Kobalte computes the visible page window and the ellipsis positions and emits\n * `aria-current=\"page\"`, so the control announces which page is active instead of\n * leaving it to colour alone.\n *\n * The item and ellipsis renderers are *supplied here*, not required of the caller.\n * Kobalte's root makes them mandatory because it has no opinion about how a page\n * number should look; a design system does, so the only thing a caller has to pass\n * is `count` — while still being able to override either renderer when a view\n * needs to.\n */\nexport type PaginationProps = Omit<PaginationRootOptions, 'itemComponent' | 'ellipsisComponent'> & {\n itemComponent?: PaginationRootOptions['itemComponent']\n ellipsisComponent?: PaginationRootOptions['ellipsisComponent']\n class?: string\n children?: JSX.Element\n}\n\nconst paginationControl = cn(\n 'inline-flex h-control-md min-w-(--control-height-md) items-center justify-center gap-1 rounded-md border border-transparent px-2 text-sm tabular-nums',\n 'transition-colors ease-out outline-none select-none',\n 'hover:bg-surface-hover',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'disabled:pointer-events-none disabled:opacity-50',\n '[&_svg]:pointer-events-none [&_svg]:size-4'\n)\n\nexport function Pagination(props: PaginationProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'itemComponent',\n 'ellipsisComponent',\n 'children',\n ])\n\n return (\n <KobaltePagination\n itemComponent={\n local.itemComponent ??\n ((itemProps) => <PaginationItem page={itemProps.page}>{itemProps.page}</PaginationItem>)\n }\n ellipsisComponent={local.ellipsisComponent ?? (() => <PaginationEllipsis />)}\n // Kobalte renders the root as a `<nav>` wrapping a `<ul>`, and every control —\n // previous, the page run, next — is an `<li>` inside that list. The row has to be\n // declared on the list: on the `<nav>` alone it lays out one child and the\n // controls stack vertically.\n class={cn(\n 'flex w-full items-center justify-center [&>ul]:m-0 [&>ul]:flex [&>ul]:list-none [&>ul]:items-center [&>ul]:gap-1 [&>ul]:p-0',\n local.class\n )}\n {...rest}\n >\n <Show when={local.children} fallback={<DefaultPaginationControls />}>\n {(childrenSlot) => <>{childrenSlot()}</>}\n </Show>\n </KobaltePagination>\n )\n}\n\n/** Previous, the numbered run, next: the arrangement every list view wants. */\nfunction DefaultPaginationControls() {\n return (\n <>\n <PaginationPrevious />\n <KobaltePagination.Items />\n <PaginationNext />\n </>\n )\n}\n\nexport function PaginationPrevious(props: ComponentProps<typeof KobaltePagination.Previous>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobaltePagination.Previous class={cn(paginationControl, 'ps-1.5', local.class)} {...rest}>\n {local.children ?? (\n <>\n <ChevronLeft class=\"size-4\" />\n <span class=\"hidden sm:inline\">Previous</span>\n </>\n )}\n </KobaltePagination.Previous>\n )\n}\n\nexport function PaginationNext(props: ComponentProps<typeof KobaltePagination.Next>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobaltePagination.Next class={cn(paginationControl, 'pe-1.5', local.class)} {...rest}>\n {local.children ?? (\n <>\n <span class=\"hidden sm:inline\">Next</span>\n <ChevronRight class=\"size-4\" />\n </>\n )}\n </KobaltePagination.Next>\n )\n}\n\nexport function PaginationItem(props: ComponentProps<typeof KobaltePagination.Item>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobaltePagination.Item\n class={cn(\n paginationControl,\n 'data-[current]:border-border data-[current]:bg-surface-active data-[current]:font-medium',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </KobaltePagination.Item>\n )\n}\n\nexport function PaginationEllipsis(\n props: ComponentProps<typeof KobaltePagination.Ellipsis> & { children?: JSX.Element }\n) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobaltePagination.Ellipsis\n class={cn('flex size-control-md items-center justify-center', local.class)}\n {...rest}\n >\n {local.children ?? (\n <>\n <MoreHorizontal class=\"size-4\" />\n <span class=\"visually-hidden\">More pages</span>\n </>\n )}\n </KobaltePagination.Ellipsis>\n )\n}\n"],"mappings":";;;;;;;;;;AAeA,IAAME,gBAAcS,SAASR,WAAiB;AAC9C,IAAMC,iBAAeO,SAASN,YAAkB;AAChD,IAAMC,mBAAiBK,SAASJ,cAAoB;AA0BpD,IAAMS,oBAAoBN,GACxB,yJACA,uDACA,0BACA,oFACA,oDACA,4CACF;AAEA,SAAgBV,aAAWiB,OAAwB;CACjD,MAAM,CAACC,OAAOC,QAAQV,WAAWQ,OAAO;EACtC;EACA;EACA;EACA;CAAU,CACX;CAED,OAAAG,gBACGnB,YAAiBoB,WAAA;EAAA,IAChBT,gBAAa;GAAA,OACXM,MAAMN,mBACJU,cAASF,gBAAMG,gBAAc;IAAA,IAACC,OAAI;KAAA,O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KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,mBAAmB,CAAA;IAC5B,OAAO,CAAC,EAAE,oBAAoB,CAAA;IAC9B,cAAc,CAAC,EAAE,oBAAoB,CAAA;IACrC,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,IAAI,CAAA;IACzD,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAClE,wEAAwE;IACxE,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,eA+UtD"}
1
+ {"version":3,"file":"questionnaire.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/questionnaire/questionnaire.tsx"],"names":[],"mappings":"AAMA,OAAO,EASL,KAAK,cAAc,EACnB,KAAK,GAAG,EACT,MAAM,UAAU,CAAA;AAcjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC;IACzC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAC,CAAA;AAEF,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IAC3C,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,SAAS,mBAAmB,EAAE,CAAA;IACxC,kCAAkC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,SAAS,C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ClE,wEAAwE;IACxE,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,eA+UtD"}
@@ -3,6 +3,7 @@ import { Button } from "../button/button.js";
3
3
  import { Checkbox } from "../checkbox/checkbox.js";
4
4
  import { RadioGroup, RadioGroupItem } from "../radio-group/radio-group.js";
5
5
  import { Textarea } from "../textarea/textarea.js";
6
+ import { fastIcon } from "../../../lib/fast-icon.js";
6
7
  import { createComponent, delegateEvents, effect, insert, memo, mergeProps, setAttribute, spread, template, use } from "solid-js/web";
7
8
  import { Check, CircleHelp, Clock, LoaderCircle } from "lucide-solid";
8
9
  import { For, Show, createEffect, createMemo, createSignal, createUniqueId, on, splitProps } from "solid-js";
@@ -22,6 +23,10 @@ var _tmpl$10 = /*#__PURE__*/ template(`<div class="flex flex-col gap-1"><label c
22
23
  var _tmpl$11 = /*#__PURE__*/ template(`<fieldset class="m-0 flex min-w-0 flex-col gap-2.5 border-0 p-0"><legend class="mb-1 p-0"><h4 tabindex=-1 class="m-0 text-sm font-medium outline-none [overflow-wrap:anywhere]">`);
23
24
  var _tmpl$12 = /*#__PURE__*/ template(`<p role=alert class="m-0 text-xs text-destructive">`);
24
25
  var _tmpl$13 = /*#__PURE__*/ template(`<span>`);
26
+ var Check$1 = fastIcon(Check);
27
+ var CircleHelp$1 = fastIcon(CircleHelp);
28
+ var Clock$1 = fastIcon(Clock);
29
+ var LoaderCircle$1 = fastIcon(LoaderCircle);
25
30
  var EMPTY = {
26
31
  optionIds: [],
27
32
  text: ""
@@ -152,10 +157,10 @@ function Questionnaire(props) {
152
157
  return status() === "expired";
153
158
  },
154
159
  get fallback() {
155
- return createComponent(CircleHelp, {});
160
+ return createComponent(CircleHelp$1, {});
156
161
  },
157
162
  get children() {
158
- return createComponent(Clock, {});
163
+ return createComponent(Clock$1, {});
159
164
  }
160
165
  }));
161
166
  insert(_el$5, () => local.title ?? "The agent has a question");
@@ -175,7 +180,7 @@ function Questionnaire(props) {
175
180
  },
176
181
  get children() {
177
182
  var _el$6 = _tmpl$(), _el$7 = _el$6.firstChild;
178
- insert(_el$6, createComponent(Check, {
183
+ insert(_el$6, createComponent(Check$1, {
179
184
  "aria-hidden": "true",
180
185
  "class": "size-3.5"
181
186
  }), _el$7);
@@ -441,7 +446,7 @@ function Questionnaire(props) {
441
446
  return status() === "submitting";
442
447
  },
443
448
  get children() {
444
- return createComponent(LoaderCircle, {
449
+ return createComponent(LoaderCircle$1, {
445
450
  "aria-hidden": "true",
446
451
  "class": "motion-safe:animate-spin"
447
452
  });
@@ -1 +1 @@
1
- {"version":3,"file":"questionnaire.js","names":["Check","CircleHelp","Clock","LoaderCircle","createEffect","createMemo","createSignal","createUniqueId","For","on","Show","splitProps","cn","Button","Checkbox","RadioGroup","RadioGroupItem","Textarea","id","label","description","prompt","options","multiple","allowText","textLabel","textPlaceholder","optional","optionIds","text","EMPTY","answerFor","record","question","Object","hasOwn","undefined","isQuestionAnswered","answer","length","trim","questions","title","status","answers","defaultAnswers","onAnswersChange","onSubmit","disabledReason","error","submitLabel","Questionnaire","props","local","rest","uid","internal","setInternal","step","setStep","settled","hostDisabledReason","locked","count","current","Math","min","last","reasonId","submitReason","questionHeading","answerOf","change","next","value","canAdvance","canSubmit","every","sending","submit","root","focusWithin","wasSettled","done","document","activeElement","body","focus","preventScroll","defer","firstStep","onKeyDown","event","key","metaKey","ctrlKey","preventDefault","summary","map","chosen","filter","option","includes","parts","_el$","_tmpl$5","_el$2","firstChild","_el$3","_el$4","nextSibling","_el$5","$$focusout","relatedTarget","Node","currentTarget","contains","$$focusin","$$keydown","_$use","element","_$spread","_$mergeProps","class","_$insert","_$createComponent","when","fallback","children","descriptionSlot","_el$1","_tmpl$6","_el$6","_tmpl$","_el$7","_tmpl$2","_el$10","_tmpl$7","each","entry","_el$11","_tmpl$8","_el$12","_el$13","_c$","_$memo","join","keyed","_el$14","_tmpl$11","_el$15","_el$20","_el$16","_tmpl$9","_el$19","_el$21","_tmpl$0","onChange","disabled","variant","_el$22","_tmpl$1","checked","ids","_$effect","_$setAttribute","_el$23","_tmpl$10","_el$24","rows","placeholder","onInput","_el$9","_tmpl$3","errorSlot","_el$25","_tmpl$12","_el$0","_tmpl$4","_tmpl$13","type","size","onClick","max","_$delegateEvents"],"sources":["../../../../src/components/ui/questionnaire/questionnaire.tsx"],"sourcesContent":["import { Check, CircleHelp, Clock, LoaderCircle } from 'lucide-solid'\nimport {\n createEffect,\n createMemo,\n createSignal,\n createUniqueId,\n For,\n on,\n Show,\n splitProps,\n type ComponentProps,\n type JSX,\n} from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Button } from '../button'\nimport { Checkbox } from '../checkbox'\nimport { RadioGroup, RadioGroupItem } from '../radio-group'\nimport { Textarea } from '../textarea'\n\n/**\n * Questionnaire.\n *\n * The agent has stopped and is asking the person something before it continues.\n * This is the one place in a transcript where the reader *must* act, so it is\n * the one element allowed to look like a card — and it only ever asks what the\n * runtime actually asked.\n *\n * ## What it models\n *\n * One question or several. Each has a prompt and, optionally, a closed set of\n * options (single choice, or `multiple`) and/or a free-text answer. A question\n * with only a prompt is a text box; the runtime contract that exists today is\n * exactly that. Options are shown only when the producer supplied them, which is\n * why they are data here and not something this component can invent.\n *\n * Several questions are asked one at a time, with \"Question 2 of 3\" and Back /\n * Next, because a wall of unrelated fields is how a person answers none of them\n * well. Moving between them returns focus to the question, so a screen-reader\n * user hears what they are now answering.\n *\n * ## It does not decide whether you may answer\n *\n * `status` and `disabledReason` come from the host, which owns authority (is\n * this session connected, is the generation current, does this client have the\n * input). A disabled questionnaire says *why* in words next to the button.\n * `answered` and `expired` render the exchange read-only, so a settled question\n * stays in the record as what was asked and what was answered.\n *\n * Submit is `Cmd/Ctrl+Enter` from any text field; plain Enter stays a newline.\n */\nexport type QuestionnaireOption = Readonly<{\n id: string\n label: string\n description?: string\n}>\n\nexport type QuestionnaireQuestion = Readonly<{\n id: string\n prompt: string\n description?: string\n options?: readonly QuestionnaireOption[]\n /** Allow more than one option. */\n multiple?: boolean\n /** Offer a free-text answer (always present when there are no options). */\n allowText?: boolean\n textLabel?: string\n textPlaceholder?: string\n /** The question may be skipped. */\n optional?: boolean\n}>\n\nexport type QuestionnaireAnswer = Readonly<{ optionIds: readonly string[]; text: string }>\nexport type QuestionnaireAnswers = Readonly<Record<string, QuestionnaireAnswer>>\nexport type QuestionnaireStatus = 'open' | 'submitting' | 'answered' | 'expired'\n\nconst EMPTY: QuestionnaireAnswer = { optionIds: [], text: '' }\n\n/**\n * The answer a record holds for a question. Question ids are host strings, and\n * the record is an ordinary object, so `constructor`, `toString` and `__proto__`\n * are valid ids that a plain index would resolve to inherited values and a\n * summary or a validity check would then read `optionIds` from.\n */\nexport function answerFor(\n record: QuestionnaireAnswers,\n question: Pick<QuestionnaireQuestion, 'id'>\n): QuestionnaireAnswer | undefined {\n return Object.hasOwn(record, question.id) ? record[question.id] : undefined\n}\n\n/** Whether a question has what it needs. */\nexport function isQuestionAnswered(\n question: QuestionnaireQuestion,\n answer: QuestionnaireAnswer | undefined\n): boolean {\n if (question.optional) return true\n return (answer?.optionIds.length ?? 0) > 0 || (answer?.text.trim().length ?? 0) > 0\n}\n\nexport type QuestionnaireProps = Omit<ComponentProps<'section'>, 'onSubmit' | 'title'> & {\n questions: readonly QuestionnaireQuestion[]\n title?: string\n description?: string\n status?: QuestionnaireStatus\n answers?: QuestionnaireAnswers\n defaultAnswers?: QuestionnaireAnswers\n onAnswersChange?: (answers: QuestionnaireAnswers) => void\n onSubmit?: (answers: QuestionnaireAnswers) => void | Promise<void>\n /** Why answering is not possible right now; shown beside the button. */\n disabledReason?: string\n /** A failed submit, in words. */\n error?: string\n submitLabel?: string\n}\n\nexport function Questionnaire(props: QuestionnaireProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'questions',\n 'title',\n 'description',\n 'status',\n 'answers',\n 'defaultAnswers',\n 'onAnswersChange',\n 'onSubmit',\n 'disabledReason',\n 'error',\n 'submitLabel',\n ])\n const uid = createUniqueId()\n const [internal, setInternal] = createSignal<QuestionnaireAnswers>(local.defaultAnswers ?? {})\n const [step, setStep] = createSignal(0)\n const answers = () => local.answers ?? internal()\n const status = () => local.status ?? 'open'\n const settled = () => status() === 'answered' || status() === 'expired'\n const hostDisabledReason = () => (local.disabledReason?.trim() ? local.disabledReason : undefined)\n const locked = () => status() !== 'open' || hostDisabledReason() !== undefined\n const count = () => local.questions.length\n const current = () => local.questions[Math.min(step(), count() - 1)]\n const last = () => step() >= count() - 1\n const reasonId = `${uid}-reason`\n const submitReason = () =>\n hostDisabledReason() ??\n (status() === 'open' && last() && local.onSubmit === undefined\n ? 'Sending answers is not available here.'\n : undefined)\n let questionHeading: HTMLHeadingElement | undefined\n\n const answerOf = (question: QuestionnaireQuestion) => answerFor(answers(), question) ?? EMPTY\n const change = (question: QuestionnaireQuestion, next: QuestionnaireAnswer) => {\n const value = { ...answers(), [question.id]: next }\n if (local.answers === undefined) setInternal(value)\n local.onAnswersChange?.(value)\n }\n\n const canAdvance = () => {\n const question = current()\n return question !== undefined && isQuestionAnswered(question, answerFor(answers(), question))\n }\n const canSubmit = () =>\n local.questions.every((question) =>\n isQuestionAnswered(question, answerFor(answers(), question))\n )\n\n // A host that is slow to report `submitting` must not be handed the same answer\n // twice by a second Ctrl+Enter or a double click.\n let sending = false\n const submit = async () => {\n if (sending || locked() || !canSubmit() || local.onSubmit === undefined) return\n sending = true\n try {\n await local.onSubmit?.(answers())\n } finally {\n sending = false\n }\n }\n\n // The control that had focus is removed when the exchange settles into its\n // read-only record. Give focus to the record instead of dropping it on <body>,\n // but only if it was inside this questionnaire to begin with.\n let root: HTMLElement | undefined\n let focusWithin = false\n let wasSettled = settled()\n createEffect(\n on(\n settled,\n (done) => {\n // `settled` is not memoised, so this also runs for open -> submitting.\n if (done === wasSettled) return\n wasSettled = done\n if (done && focusWithin && document.activeElement === document.body) {\n root?.focus({ preventScroll: true })\n }\n focusWithin = false\n },\n { defer: true }\n )\n )\n\n // Land on the new question when the step changes, not on the Next button that\n // has just been replaced by one for a different question.\n let firstStep = true\n createEffect(() => {\n void step()\n if (firstStep) {\n firstStep = false\n return\n }\n questionHeading?.focus()\n })\n\n const onKeyDown: JSX.EventHandler<HTMLElement, KeyboardEvent> = (event) => {\n if (event.key === 'Enter' && (event.metaKey || event.ctrlKey) && last()) {\n event.preventDefault()\n void submit()\n }\n }\n\n const summary = createMemo(() =>\n local.questions.map((question) => {\n const answer = answerFor(answers(), question) ?? EMPTY\n const chosen = (question.options ?? [])\n .filter((option) => answer.optionIds.includes(option.id))\n .map((option) => option.label)\n return {\n question,\n parts: [...chosen, ...(answer.text.trim() ? [answer.text.trim()] : [])],\n }\n })\n )\n\n return (\n <section\n ref={(element) => (root = element)}\n data-slot=\"questionnaire\"\n data-status={status()}\n aria-label={local.title ?? 'Question from the agent'}\n // Not a tab stop: only the landing place for focus when a control goes away.\n tabindex=\"-1\"\n class={cn(\n 'flex w-full max-w-xl min-w-0 flex-col gap-3 rounded-xl border bg-card p-4 outline-none focus-visible:ring-3 focus-visible:ring-primary-subtle',\n {\n 'border-border': settled(),\n 'border-ring': !settled(),\n },\n local.class\n )}\n onKeyDown={onKeyDown}\n onFocusIn={() => (focusWithin = true)}\n onFocusOut={(event) => {\n // Moving to another element ends it; a control disappearing does not.\n const next = event.relatedTarget\n if (next instanceof Node && !event.currentTarget.contains(next)) focusWithin = false\n }}\n {...rest}\n >\n <header class=\"flex items-start gap-2.5\">\n <span aria-hidden=\"true\" class=\"mt-0.5 text-muted-foreground [&_svg]:size-4\">\n <Show when={status() === 'expired'} fallback={<CircleHelp />}>\n <Clock />\n </Show>\n </span>\n <div class=\"min-w-0 flex-1\">\n <h3 class=\"m-0 text-sm font-semibold\">{local.title ?? 'The agent has a question'}</h3>\n <Show when={local.description}>\n {(descriptionSlot) => (\n <p class=\"m-0 mt-0.5 text-xs text-muted-foreground\">{descriptionSlot()}</p>\n )}\n </Show>\n </div>\n <Show when={status() === 'answered'}>\n <span class=\"flex items-center gap-1 text-xs text-muted-foreground\">\n <Check aria-hidden=\"true\" class=\"size-3.5\" />\n Answered\n </span>\n </Show>\n <Show when={status() === 'expired'}>\n <span class=\"text-xs text-muted-foreground\">No longer waiting</span>\n </Show>\n </header>\n\n <Show\n when={!settled()}\n fallback={\n <dl class=\"m-0 flex flex-col gap-2\">\n <For each={summary()}>\n {(entry) => (\n <div class=\"flex flex-col gap-0.5\">\n <dt class=\"text-xs text-muted-foreground\">{entry.question.prompt}</dt>\n <dd class=\"m-0 text-sm [overflow-wrap:anywhere] whitespace-pre-wrap\">\n {entry.parts.length > 0 ? entry.parts.join(', ') : 'Skipped'}\n </dd>\n </div>\n )}\n </For>\n </dl>\n }\n >\n <Show when={current()} keyed>\n {(question) => (\n <fieldset class=\"m-0 flex min-w-0 flex-col gap-2.5 border-0 p-0\" disabled={locked()}>\n <legend class=\"mb-1 p-0\">\n <Show when={count() > 1}>\n <span class=\"block text-xs text-muted-foreground tabular-nums\">\n Question {step() + 1} of {count()}\n </span>\n </Show>\n <h4\n ref={(element) => (questionHeading = element)}\n tabindex=\"-1\"\n class=\"m-0 text-sm font-medium outline-none [overflow-wrap:anywhere]\"\n >\n {question.prompt}\n </h4>\n <Show when={question.description}>\n <span class=\"mt-0.5 block text-xs font-normal text-muted-foreground\">\n {question.description}\n </span>\n </Show>\n </legend>\n\n <Show when={(question.options?.length ?? 0) > 0}>\n <Show\n when={question.multiple}\n fallback={\n <RadioGroup\n aria-label={question.prompt}\n value={answerOf(question).optionIds[0] ?? ''}\n onChange={(value) =>\n change(question, { ...answerOf(question), optionIds: value ? [value] : [] })\n }\n disabled={locked()}\n >\n <For each={question.options}>\n {(option) => (\n <RadioGroupItem\n value={option.id}\n label={option.label}\n description={option.description}\n variant=\"card\"\n />\n )}\n </For>\n </RadioGroup>\n }\n >\n <div role=\"group\" aria-label={question.prompt} class=\"grid gap-2\">\n <For each={question.options}>\n {(option) => (\n <Checkbox\n label={option.label}\n description={option.description}\n checked={answerOf(question).optionIds.includes(option.id)}\n disabled={locked()}\n onChange={(checked: boolean) => {\n const ids = answerOf(question).optionIds\n change(question, {\n ...answerOf(question),\n optionIds: checked\n ? [...ids.filter((id) => id !== option.id), option.id]\n : ids.filter((id) => id !== option.id),\n })\n }}\n />\n )}\n </For>\n </div>\n </Show>\n </Show>\n\n <Show when={(question.options?.length ?? 0) === 0 || question.allowText}>\n <div class=\"flex flex-col gap-1\">\n <label class=\"text-xs text-muted-foreground\" for={`${uid}-${question.id}-text`}>\n {question.textLabel ??\n ((question.options?.length ?? 0) > 0 ? 'Something else' : 'Your answer')}\n </label>\n <Textarea\n id={`${uid}-${question.id}-text`}\n rows={2}\n placeholder={question.textPlaceholder}\n value={answerOf(question).text}\n disabled={locked()}\n aria-describedby={locked() && hostDisabledReason() ? reasonId : undefined}\n onInput={(event) =>\n change(question, { ...answerOf(question), text: event.currentTarget.value })\n }\n />\n </div>\n </Show>\n </fieldset>\n )}\n </Show>\n\n <Show when={submitReason()}>\n <p id={reasonId} role=\"status\" class=\"m-0 text-xs text-muted-foreground\">\n {submitReason()}\n </p>\n </Show>\n <Show when={local.error}>\n {(errorSlot) => (\n <p role=\"alert\" class=\"m-0 text-xs text-destructive\">\n {errorSlot()}\n </p>\n )}\n </Show>\n\n <footer class=\"flex items-center justify-between gap-2\">\n <Show when={count() > 1} fallback={<span />}>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n disabled={step() === 0 || locked()}\n onClick={() => setStep((value) => Math.max(0, value - 1))}\n >\n Back\n </Button>\n </Show>\n <Show\n when={last()}\n fallback={\n <Button\n type=\"button\"\n size=\"sm\"\n disabled={locked() || !canAdvance()}\n aria-describedby={hostDisabledReason() ? reasonId : undefined}\n onClick={() => setStep((value) => Math.min(count() - 1, value + 1))}\n >\n Next\n </Button>\n }\n >\n <Button\n type=\"button\"\n size=\"sm\"\n disabled={locked() || !canSubmit() || local.onSubmit === undefined}\n aria-describedby={submitReason() ? reasonId : undefined}\n onClick={() => void submit()}\n >\n <Show when={status() === 'submitting'}>\n <LoaderCircle aria-hidden=\"true\" class=\"motion-safe:animate-spin\" />\n </Show>\n {local.submitLabel ?? 'Send answer'}\n </Button>\n </Show>\n </footer>\n </Show>\n </section>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA2EA,IAAM8B,QAA6B;CAAEF,WAAW,CAAA;CAAIC,MAAM;AAAG;;;;;;;AAQ7D,SAAgBE,UACdC,QACAC,UACiC;CACjC,OAAOC,OAAOC,OAAOH,QAAQC,SAASf,EAAE,IAAIc,OAAOC,SAASf,MAAMkB,KAAAA;AACpE;;AAGA,SAAgBC,mBACdJ,UACAK,QACS;CACT,IAAIL,SAASN,UAAU,OAAO;CAC9B,QAAQW,QAAQV,UAAUW,UAAU,KAAK,MAAMD,QAAQT,KAAKW,KAAK,CAAC,CAACD,UAAU,KAAK;AACpF;AAkBA,SAAgBY,cAAcC,OAA2B;CACvD,MAAM,CAACC,OAAOC,QAAQ3C,WAAWyC,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAa,CACd;CACD,MAAMG,MAAMhD,eAAe;CAC3B,MAAM,CAACiD,UAAUC,eAAenD,aAAmC+C,MAAMR,kBAAkB,CAAC,CAAC;CAC7F,MAAM,CAACa,MAAMC,WAAWrD,aAAa,CAAC;CACtC,MAAMsC,gBAAgBS,MAAMT,WAAWY,SAAS;CAChD,MAAMb,eAAeU,MAAMV,UAAU;CACrC,MAAMiB,gBAAgBjB,OAAO,MAAM,cAAcA,OAAO,MAAM;CAC9D,MAAMkB,2BAA4BR,MAAML,gBAAgBR,KAAK,IAAIa,MAAML,iBAAiBZ,KAAAA;CACxF,MAAM0B,eAAenB,OAAO,MAAM,UAAUkB,mBAAmB,MAAMzB,KAAAA;CACrE,MAAM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AAA,IAAA;EAAA,OAAAzE;CAAA,EAAA,CAAA;AAOjD;AAACgF,eAAA;CAAA;CAAA;CAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"questionnaire.js","names":["Check","LucideCheck","CircleHelp","LucideCircleHelp","Clock","LucideClock","LoaderCircle","LucideLoaderCircle","createEffect","createMemo","createSignal","createUniqueId","For","on","Show","splitProps","cn","Button","Checkbox","RadioGroup","RadioGroupItem","Textarea","fastIcon","id","label","description","prompt","options","multiple","allowText","textLabel","textPlaceholder","optional","optionIds","text","EMPTY","answerFor","record","question","Object","hasOwn","undefined","isQuestionAnswered","answer","length","trim","questions","title","status","answers","defaultAnswers","onAnswersChange","onSubmit","disabledReason","error","submitLabel","Questionnaire","props","local","rest","uid","internal","setInternal","step","setStep","settled","hostDisabledReason","locked","count","current","Math","min","last","reasonId","submitReason","questionHeading","answerOf","change","next","value","canAdvance","canSubmit","every","sending","submit","root","focusWithin","wasSettled","done","document","activeElement","body","focus","preventScroll","defer","firstStep","onKeyDown","event","key","metaKey","ctrlKey","preventDefault","summary","map","chosen","filter","option","includes","parts","_el$","_tmpl$5","_el$2","firstChild","_el$3","_el$4","nextSibling","_el$5","$$focusout","relatedTarget","Node","currentTarget","contains","$$focusin","$$keydown","_$use","element","_$spread","_$mergeProps","class","_$insert","_$createComponent","when","fallback","children","descriptionSlot","_el$1","_tmpl$6","_el$6","_tmpl$","_el$7","_tmpl$2","_el$10","_tmpl$7","each","entry","_el$11","_tmpl$8","_el$12","_el$13","_c$","_$memo","join","keyed","_el$14","_tmpl$11","_el$15","_el$20","_el$16","_tmpl$9","_el$19","_el$21","_tmpl$0","onChange","disabled","variant","_el$22","_tmpl$1","checked","ids","_$effect","_$setAttribute","_el$23","_tmpl$10","_el$24","rows","placeholder","onInput","_el$9","_tmpl$3","errorSlot","_el$25","_tmpl$12","_el$0","_tmpl$4","_tmpl$13","type","size","onClick","max","_$delegateEvents"],"sources":["../../../../src/components/ui/questionnaire/questionnaire.tsx"],"sourcesContent":["import {\n Check as LucideCheck,\n CircleHelp as LucideCircleHelp,\n Clock as LucideClock,\n LoaderCircle as LucideLoaderCircle,\n} from 'lucide-solid'\nimport {\n createEffect,\n createMemo,\n createSignal,\n createUniqueId,\n For,\n on,\n Show,\n splitProps,\n type ComponentProps,\n type JSX,\n} from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Button } from '../button'\nimport { Checkbox } from '../checkbox'\nimport { RadioGroup, RadioGroupItem } from '../radio-group'\nimport { Textarea } from '../textarea'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst Check = fastIcon(LucideCheck)\nconst CircleHelp = fastIcon(LucideCircleHelp)\nconst Clock = fastIcon(LucideClock)\nconst LoaderCircle = fastIcon(LucideLoaderCircle)\n\n/**\n * Questionnaire.\n *\n * The agent has stopped and is asking the person something before it continues.\n * This is the one place in a transcript where the reader *must* act, so it is\n * the one element allowed to look like a card — and it only ever asks what the\n * runtime actually asked.\n *\n * ## What it models\n *\n * One question or several. Each has a prompt and, optionally, a closed set of\n * options (single choice, or `multiple`) and/or a free-text answer. A question\n * with only a prompt is a text box; the runtime contract that exists today is\n * exactly that. Options are shown only when the producer supplied them, which is\n * why they are data here and not something this component can invent.\n *\n * Several questions are asked one at a time, with \"Question 2 of 3\" and Back /\n * Next, because a wall of unrelated fields is how a person answers none of them\n * well. Moving between them returns focus to the question, so a screen-reader\n * user hears what they are now answering.\n *\n * ## It does not decide whether you may answer\n *\n * `status` and `disabledReason` come from the host, which owns authority (is\n * this session connected, is the generation current, does this client have the\n * input). A disabled questionnaire says *why* in words next to the button.\n * `answered` and `expired` render the exchange read-only, so a settled question\n * stays in the record as what was asked and what was answered.\n *\n * Submit is `Cmd/Ctrl+Enter` from any text field; plain Enter stays a newline.\n */\nexport type QuestionnaireOption = Readonly<{\n id: string\n label: string\n description?: string\n}>\n\nexport type QuestionnaireQuestion = Readonly<{\n id: string\n prompt: string\n description?: string\n options?: readonly QuestionnaireOption[]\n /** Allow more than one option. */\n multiple?: boolean\n /** Offer a free-text answer (always present when there are no options). */\n allowText?: boolean\n textLabel?: string\n textPlaceholder?: string\n /** The question may be skipped. */\n optional?: boolean\n}>\n\nexport type QuestionnaireAnswer = Readonly<{ optionIds: readonly string[]; text: string }>\nexport type QuestionnaireAnswers = Readonly<Record<string, QuestionnaireAnswer>>\nexport type QuestionnaireStatus = 'open' | 'submitting' | 'answered' | 'expired'\n\nconst EMPTY: QuestionnaireAnswer = { optionIds: [], text: '' }\n\n/**\n * The answer a record holds for a question. Question ids are host strings, and\n * the record is an ordinary object, so `constructor`, `toString` and `__proto__`\n * are valid ids that a plain index would resolve to inherited values and a\n * summary or a validity check would then read `optionIds` from.\n */\nexport function answerFor(\n record: QuestionnaireAnswers,\n question: Pick<QuestionnaireQuestion, 'id'>\n): QuestionnaireAnswer | undefined {\n return Object.hasOwn(record, question.id) ? record[question.id] : undefined\n}\n\n/** Whether a question has what it needs. */\nexport function isQuestionAnswered(\n question: QuestionnaireQuestion,\n answer: QuestionnaireAnswer | undefined\n): boolean {\n if (question.optional) return true\n return (answer?.optionIds.length ?? 0) > 0 || (answer?.text.trim().length ?? 0) > 0\n}\n\nexport type QuestionnaireProps = Omit<ComponentProps<'section'>, 'onSubmit' | 'title'> & {\n questions: readonly QuestionnaireQuestion[]\n title?: string\n description?: string\n status?: QuestionnaireStatus\n answers?: QuestionnaireAnswers\n defaultAnswers?: QuestionnaireAnswers\n onAnswersChange?: (answers: QuestionnaireAnswers) => void\n onSubmit?: (answers: QuestionnaireAnswers) => void | Promise<void>\n /** Why answering is not possible right now; shown beside the button. */\n disabledReason?: string\n /** A failed submit, in words. */\n error?: string\n submitLabel?: string\n}\n\nexport function Questionnaire(props: QuestionnaireProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'questions',\n 'title',\n 'description',\n 'status',\n 'answers',\n 'defaultAnswers',\n 'onAnswersChange',\n 'onSubmit',\n 'disabledReason',\n 'error',\n 'submitLabel',\n ])\n const uid = createUniqueId()\n const [internal, setInternal] = createSignal<QuestionnaireAnswers>(local.defaultAnswers ?? {})\n const [step, setStep] = createSignal(0)\n const answers = () => local.answers ?? internal()\n const status = () => local.status ?? 'open'\n const settled = () => status() === 'answered' || status() === 'expired'\n const hostDisabledReason = () => (local.disabledReason?.trim() ? local.disabledReason : undefined)\n const locked = () => status() !== 'open' || hostDisabledReason() !== undefined\n const count = () => local.questions.length\n const current = () => local.questions[Math.min(step(), count() - 1)]\n const last = () => step() >= count() - 1\n const reasonId = `${uid}-reason`\n const submitReason = () =>\n hostDisabledReason() ??\n (status() === 'open' && last() && local.onSubmit === undefined\n ? 'Sending answers is not available here.'\n : undefined)\n let questionHeading: HTMLHeadingElement | undefined\n\n const answerOf = (question: QuestionnaireQuestion) => answerFor(answers(), question) ?? EMPTY\n const change = (question: QuestionnaireQuestion, next: QuestionnaireAnswer) => {\n const value = { ...answers(), [question.id]: next }\n if (local.answers === undefined) setInternal(value)\n local.onAnswersChange?.(value)\n }\n\n const canAdvance = () => {\n const question = current()\n return question !== undefined && isQuestionAnswered(question, answerFor(answers(), question))\n }\n const canSubmit = () =>\n local.questions.every((question) =>\n isQuestionAnswered(question, answerFor(answers(), question))\n )\n\n // A host that is slow to report `submitting` must not be handed the same answer\n // twice by a second Ctrl+Enter or a double click.\n let sending = false\n const submit = async () => {\n if (sending || locked() || !canSubmit() || local.onSubmit === undefined) return\n sending = true\n try {\n await local.onSubmit?.(answers())\n } finally {\n sending = false\n }\n }\n\n // The control that had focus is removed when the exchange settles into its\n // read-only record. Give focus to the record instead of dropping it on <body>,\n // but only if it was inside this questionnaire to begin with.\n let root: HTMLElement | undefined\n let focusWithin = false\n let wasSettled = settled()\n createEffect(\n on(\n settled,\n (done) => {\n // `settled` is not memoised, so this also runs for open -> submitting.\n if (done === wasSettled) return\n wasSettled = done\n if (done && focusWithin && document.activeElement === document.body) {\n root?.focus({ preventScroll: true })\n }\n focusWithin = false\n },\n { defer: true }\n )\n )\n\n // Land on the new question when the step changes, not on the Next button that\n // has just been replaced by one for a different question.\n let firstStep = true\n createEffect(() => {\n void step()\n if (firstStep) {\n firstStep = false\n return\n }\n questionHeading?.focus()\n })\n\n const onKeyDown: JSX.EventHandler<HTMLElement, KeyboardEvent> = (event) => {\n if (event.key === 'Enter' && (event.metaKey || event.ctrlKey) && last()) {\n event.preventDefault()\n void submit()\n }\n }\n\n const summary = createMemo(() =>\n local.questions.map((question) => {\n const answer = answerFor(answers(), question) ?? EMPTY\n const chosen = (question.options ?? [])\n .filter((option) => answer.optionIds.includes(option.id))\n .map((option) => option.label)\n return {\n question,\n parts: [...chosen, ...(answer.text.trim() ? [answer.text.trim()] : [])],\n }\n })\n )\n\n return (\n <section\n ref={(element) => (root = element)}\n data-slot=\"questionnaire\"\n data-status={status()}\n aria-label={local.title ?? 'Question from the agent'}\n // Not a tab stop: only the landing place for focus when a control goes away.\n tabindex=\"-1\"\n class={cn(\n 'flex w-full max-w-xl min-w-0 flex-col gap-3 rounded-xl border bg-card p-4 outline-none focus-visible:ring-3 focus-visible:ring-primary-subtle',\n {\n 'border-border': settled(),\n 'border-ring': !settled(),\n },\n local.class\n )}\n onKeyDown={onKeyDown}\n onFocusIn={() => (focusWithin = true)}\n onFocusOut={(event) => {\n // Moving to another element ends it; a control disappearing does not.\n const next = event.relatedTarget\n if (next instanceof Node && !event.currentTarget.contains(next)) focusWithin = false\n }}\n {...rest}\n >\n <header class=\"flex items-start gap-2.5\">\n <span aria-hidden=\"true\" class=\"mt-0.5 text-muted-foreground [&_svg]:size-4\">\n <Show when={status() === 'expired'} fallback={<CircleHelp />}>\n <Clock />\n </Show>\n </span>\n <div class=\"min-w-0 flex-1\">\n <h3 class=\"m-0 text-sm font-semibold\">{local.title ?? 'The agent has a question'}</h3>\n <Show when={local.description}>\n {(descriptionSlot) => (\n <p class=\"m-0 mt-0.5 text-xs text-muted-foreground\">{descriptionSlot()}</p>\n )}\n </Show>\n </div>\n <Show when={status() === 'answered'}>\n <span class=\"flex items-center gap-1 text-xs text-muted-foreground\">\n <Check aria-hidden=\"true\" class=\"size-3.5\" />\n Answered\n </span>\n </Show>\n <Show when={status() === 'expired'}>\n <span class=\"text-xs text-muted-foreground\">No longer waiting</span>\n </Show>\n </header>\n\n <Show\n when={!settled()}\n fallback={\n <dl class=\"m-0 flex flex-col gap-2\">\n <For each={summary()}>\n {(entry) => (\n <div class=\"flex flex-col gap-0.5\">\n <dt class=\"text-xs text-muted-foreground\">{entry.question.prompt}</dt>\n <dd class=\"m-0 text-sm [overflow-wrap:anywhere] whitespace-pre-wrap\">\n {entry.parts.length > 0 ? entry.parts.join(', ') : 'Skipped'}\n </dd>\n </div>\n )}\n </For>\n </dl>\n }\n >\n <Show when={current()} keyed>\n {(question) => (\n <fieldset class=\"m-0 flex min-w-0 flex-col gap-2.5 border-0 p-0\" disabled={locked()}>\n <legend class=\"mb-1 p-0\">\n <Show when={count() > 1}>\n <span class=\"block text-xs text-muted-foreground tabular-nums\">\n Question {step() + 1} of {count()}\n </span>\n </Show>\n <h4\n ref={(element) => (questionHeading = element)}\n tabindex=\"-1\"\n class=\"m-0 text-sm font-medium outline-none [overflow-wrap:anywhere]\"\n >\n {question.prompt}\n </h4>\n <Show when={question.description}>\n <span class=\"mt-0.5 block text-xs font-normal text-muted-foreground\">\n {question.description}\n </span>\n </Show>\n </legend>\n\n <Show when={(question.options?.length ?? 0) > 0}>\n <Show\n when={question.multiple}\n fallback={\n <RadioGroup\n aria-label={question.prompt}\n value={answerOf(question).optionIds[0] ?? ''}\n onChange={(value) =>\n change(question, { ...answerOf(question), optionIds: value ? [value] : [] })\n }\n disabled={locked()}\n >\n <For each={question.options}>\n {(option) => (\n <RadioGroupItem\n value={option.id}\n label={option.label}\n description={option.description}\n variant=\"card\"\n />\n )}\n </For>\n </RadioGroup>\n }\n >\n <div role=\"group\" aria-label={question.prompt} class=\"grid gap-2\">\n <For each={question.options}>\n {(option) => (\n <Checkbox\n label={option.label}\n description={option.description}\n checked={answerOf(question).optionIds.includes(option.id)}\n disabled={locked()}\n onChange={(checked: boolean) => {\n const ids = answerOf(question).optionIds\n change(question, {\n ...answerOf(question),\n optionIds: checked\n ? [...ids.filter((id) => id !== option.id), option.id]\n : ids.filter((id) => id !== option.id),\n })\n }}\n />\n )}\n </For>\n </div>\n </Show>\n </Show>\n\n <Show when={(question.options?.length ?? 0) === 0 || question.allowText}>\n <div class=\"flex flex-col gap-1\">\n <label class=\"text-xs text-muted-foreground\" for={`${uid}-${question.id}-text`}>\n {question.textLabel ??\n ((question.options?.length ?? 0) > 0 ? 'Something else' : 'Your answer')}\n </label>\n <Textarea\n id={`${uid}-${question.id}-text`}\n rows={2}\n placeholder={question.textPlaceholder}\n value={answerOf(question).text}\n disabled={locked()}\n aria-describedby={locked() && hostDisabledReason() ? reasonId : undefined}\n onInput={(event) =>\n change(question, { ...answerOf(question), text: event.currentTarget.value })\n }\n />\n </div>\n </Show>\n </fieldset>\n )}\n </Show>\n\n <Show when={submitReason()}>\n <p id={reasonId} role=\"status\" class=\"m-0 text-xs text-muted-foreground\">\n {submitReason()}\n </p>\n </Show>\n <Show when={local.error}>\n {(errorSlot) => (\n <p role=\"alert\" class=\"m-0 text-xs text-destructive\">\n {errorSlot()}\n </p>\n )}\n </Show>\n\n <footer class=\"flex items-center justify-between gap-2\">\n <Show when={count() > 1} fallback={<span />}>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n disabled={step() === 0 || locked()}\n onClick={() => setStep((value) => Math.max(0, value - 1))}\n >\n Back\n </Button>\n </Show>\n <Show\n when={last()}\n fallback={\n <Button\n type=\"button\"\n size=\"sm\"\n disabled={locked() || !canAdvance()}\n aria-describedby={hostDisabledReason() ? reasonId : undefined}\n onClick={() => setStep((value) => Math.min(count() - 1, value + 1))}\n >\n Next\n </Button>\n }\n >\n <Button\n type=\"button\"\n size=\"sm\"\n disabled={locked() || !canSubmit() || local.onSubmit === undefined}\n aria-describedby={submitReason() ? reasonId : undefined}\n onClick={() => void submit()}\n >\n <Show when={status() === 'submitting'}>\n <LoaderCircle aria-hidden=\"true\" class=\"motion-safe:animate-spin\" />\n </Show>\n {local.submitLabel ?? 'Send answer'}\n </Button>\n </Show>\n </footer>\n </Show>\n </section>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,IAAMA,UAAQsB,SAASrB,KAAW;AAClC,IAAMC,eAAaoB,SAASnB,UAAgB;AAC5C,IAAMC,UAAQkB,SAASjB,KAAW;AAClC,IAAMC,iBAAegB,SAASf,YAAkB;AA0DhD,IAAM4B,QAA6B;CAAEF,WAAW,CAAA;CAAIC,MAAM;AAAG;;;;;;;AAQ7D,SAAgBE,UACdC,QACAC,UACiC;CACjC,OAAOC,OAAOC,OAAOH,QAAQC,SAASf,EAAE,IAAIc,OAAOC,SAASf,MAAMkB,KAAAA;AACpE;;AAGA,SAAgBC,mBACdJ,UACAK,QACS;CACT,IAAIL,SAASN,UAAU,OAAO;CAC9B,QAAQW,QAAQV,UAAUW,UAAU,KAAK,MAAMD,QAAQT,KAAKW,KAAK,CAAC,CAACD,UAAU,KAAK;AACpF;AAkBA,SAAgBY,cAAcC,OAA2B;CACvD,MAAM,CAACC,OAAOC,QAAQ5C,WAAW0C,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAa,CACd;CACD,MAAMG,MAAMjD,eAAe;CAC3B,MAAM,CAACkD,UAAUC,eAAepD,aAAmCgD,MAAMR,kBAAkB,CAAC,CAAC;CAC7F,MAAM,CAACa,MAAMC,WAAWtD,aAAa,CAAC;CACtC,MAAMuC,gBAAgBS,MAAMT,WAAWY,SAAS;CAChD,MAAMb,eAAeU,MAAMV,UAAU;CACrC,MAAMiB,gBAAgBjB,OAAO,MAAM,cAAcA,OAAO,MAAM;CAC9D,MAAMkB,2BAA4BR,MAAML,gBAAgBR,KAAK,IAAIa,MAAML,iBAAiBZ,KAAAA;CACxF,MAAM0B,eAAenB,OAAO,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AAA+H;KAAA,EAAA,CAAA;IAAA;GAAA;EAAA,CAAA,GAAA,IAAA;EAAA,OAAAzE;CAAA,EAAA,CAAA;AAOjD;AAACgF,eAAA;CAAA;CAAA;CAAA;AAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/radio-group/radio-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAE3E,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAKnD;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,iBAAiB,CAAC,eA+BzE;AAED,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC,GAAG;IAChF,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IAC5B,iFAAiF;IACjF,KAAK,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;CACpB,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,eA0FxD"}
1
+ {"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/radio-group/radio-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAE3E,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AASnD;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,iBAAiB,CAAC,eAwBzE;AAED,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC,GAAG;IAChF,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IAC5B,iFAAiF;IACjF,KAAK,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;CACpB,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,eA0FxD"}
@@ -1,5 +1,6 @@
1
1
  import { useFormFieldControl } from "../../../lib/form-field.js";
2
2
  import { cn } from "../../../lib/utils.js";
3
+ import { fastIcon } from "../../../lib/fast-icon.js";
3
4
  import { createComponent, insert, memo, mergeProps, template } from "solid-js/web";
4
5
  import { Circle } from "lucide-solid";
5
6
  import { Show, children, splitProps } from "solid-js";
@@ -7,6 +8,7 @@ import { RadioGroup } from "@kobalte/core/radio-group";
7
8
  // src/components/ui/radio-group/radio-group.tsx
8
9
  var _tmpl$ = /*#__PURE__*/ template(`<span data-slot=radio-group-item-media class="flex shrink-0 items-center">`);
9
10
  var _tmpl$2 = /*#__PURE__*/ template(`<div class="grid gap-0.5 leading-none">`);
11
+ var Circle$1 = fastIcon(Circle);
10
12
  /**
11
13
  * RadioGroup.
12
14
  *
@@ -29,14 +31,7 @@ function RadioGroup$1(props) {
29
31
  "aria-invalid",
30
32
  "aria-errormessage"
31
33
  ]);
32
- const field = useFormFieldControl("group", {
33
- id: local.id,
34
- "aria-label": local["aria-label"],
35
- "aria-labelledby": local["aria-labelledby"],
36
- "aria-describedby": local["aria-describedby"],
37
- "aria-invalid": local["aria-invalid"],
38
- "aria-errormessage": local["aria-errormessage"]
39
- });
34
+ const field = useFormFieldControl("group", local);
40
35
  return createComponent(RadioGroup, mergeProps({
41
36
  "data-slot": "radio-group",
42
37
  get id() {
@@ -132,7 +127,7 @@ function RadioGroupItem(props) {
132
127
  return createComponent(RadioGroup.ItemIndicator, {
133
128
  "class": "flex items-center justify-center",
134
129
  get children() {
135
- return createComponent(Circle, { "class": "size-2 fill-current" });
130
+ return createComponent(Circle$1, { "class": "size-2 fill-current" });
136
131
  }
137
132
  });
138
133
  }
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.js","names":["RadioGroup","KobalteRadioGroup","Circle","Show","children","resolveChildren","splitProps","useFormFieldControl","cn","props","local","rest","field","id","_$createComponent","_$mergeProps","class","Item","controlClass","label","description","variant","media","RadioGroupItem","card","undefined","title","ItemInput","ItemControl","ItemIndicator","when","slot","_el$","_tmpl$","_$insert","_$memo","_el$2","_tmpl$2","_c$","ItemLabel","_c$2","ItemDescription"],"sources":["../../../../src/components/ui/radio-group/radio-group.tsx"],"sourcesContent":["import { RadioGroup as KobalteRadioGroup } from '@kobalte/core/radio-group'\nimport { Circle } from 'lucide-solid'\nimport type { ComponentProps, JSX } from 'solid-js'\nimport { Show, children as resolveChildren, splitProps } from 'solid-js'\nimport { useFormFieldControl } from '#lib/form-field'\nimport { cn } from '#lib/utils'\n\n/**\n * RadioGroup.\n *\n * A single choice from a small, visible set. The group owns the value and the\n * arrow-key navigation, so a caller sets `value` once instead of wiring a\n * `name` and a handler onto every item.\n *\n * Below about five options a Select hides the choices behind a click, which is\n * the wrong trade; above about seven, radios become a wall and the Select wins.\n * That call belongs to the caller, and both controls are drawn from the same\n * tokens so either choice sits correctly next to the other.\n */\nexport function RadioGroup(props: ComponentProps<typeof KobalteRadioGroup>) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'id',\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'aria-invalid',\n 'aria-errormessage',\n ])\n const field = useFormFieldControl('group', {\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 return (\n <KobalteRadioGroup\n data-slot=\"radio-group\"\n id={field?.id ?? local.id}\n aria-label={local['aria-label']}\n aria-labelledby={field?.['aria-labelledby'] ?? local['aria-labelledby']}\n aria-describedby={field?.['aria-describedby'] ?? local['aria-describedby']}\n aria-invalid={field?.['aria-invalid'] ?? local['aria-invalid']}\n aria-errormessage={field?.['aria-errormessage'] ?? local['aria-errormessage']}\n class={cn('grid gap-2', local.class)}\n {...rest}\n />\n )\n}\n\nexport type RadioGroupItemProps = ComponentProps<typeof KobalteRadioGroup.Item> & {\n controlClass?: string\n /**\n * The option's visible label. A radio with no accessible name is unreachable\n * by a screen reader and by voice control, so supply this, a labelled child,\n * `aria-label`, or `aria-labelledby`.\n */\n label?: string\n description?: string\n /**\n * `card` draws the option as a bordered, selectable card — for a choice\n * whose options need a sentence each (a source type, a sync budget), where a\n * bare radio row reads as a form field rather than a decision. The whole card\n * is the hit target, and the selected card takes the primary edge. The radio,\n * `media` and text centre on one axis; the default variant keeps the radio on\n * the first line of its label.\n */\n variant?: 'default' | 'card'\n /** A leading icon or `EntityIcon` between the radio and the text, for `card`. */\n media?: JSX.Element\n}\n\n/**\n * A card option's label stretches an invisible layer over the whole card, so a\n * click anywhere on it — padding, media, description — selects the option\n * through the label's native association with the radio input. Wrapping the\n * card in a `<label>` would nest the item's own label inside another.\n */\nexport function RadioGroupItem(props: RadioGroupItemProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'controlClass',\n 'label',\n 'description',\n 'variant',\n 'media',\n 'children',\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'aria-invalid',\n 'aria-busy',\n 'title',\n ])\n const card = () => local.variant === 'card'\n\n const media = resolveChildren(() => local.media)\n return (\n <KobalteRadioGroup.Item\n data-slot=\"radio-group-item\"\n data-variant={card() ? 'card' : undefined}\n title={local.title}\n class={cn(\n 'group/radio flex gap-2.5',\n {\n 'items-start': !card(),\n // A card centres its radio, media and text on one axis. Top alignment\n // is right for a bare row, where the radio sits on the label's first\n // line, but in a card the media is taller than that line, so a\n // top-aligned radio floats above the icon and the label beside it.\n 'items-center': card(),\n 'relative rounded-lg border border-border bg-card px-3 py-2.5 transition-[color,box-shadow,border-color,background-color] ease-out hover:bg-surface-hover data-[checked]:border-primary data-[disabled]:cursor-not-allowed data-[disabled]:hover:bg-card':\n card(),\n 'has-[input:focus-visible]:border-ring has-[input:focus-visible]:ring-3 has-[input:focus-visible]:ring-primary-subtle':\n card(),\n },\n local.class\n )}\n {...rest}\n >\n <KobalteRadioGroup.ItemInput\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-busy={local['aria-busy']}\n title={local.title}\n />\n <KobalteRadioGroup.ItemControl\n class={cn(\n 'border-input bg-transparent flex size-4 shrink-0 items-center justify-center rounded-full border',\n 'transition-[color,box-shadow,border-color,background-color] ease-out outline-none',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'data-[checked]:border-primary data-[checked]:text-primary',\n 'data-[invalid]:border-destructive data-[invalid]:ring-3 data-[invalid]:ring-destructive-subtle',\n 'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',\n local.controlClass\n )}\n >\n <KobalteRadioGroup.ItemIndicator class=\"flex items-center justify-center\">\n <Circle class=\"size-2 fill-current\" />\n </KobalteRadioGroup.ItemIndicator>\n </KobalteRadioGroup.ItemControl>\n <Show when={media()}>\n {(slot) => (\n <span data-slot=\"radio-group-item-media\" class=\"flex shrink-0 items-center\">\n {slot()}\n </span>\n )}\n </Show>\n {local.children ?? (\n <div class=\"grid gap-0.5 leading-none\">\n {local.label ? (\n <KobalteRadioGroup.ItemLabel\n class={cn('text-sm font-medium', card() && 'after:absolute after:inset-0')}\n >\n {local.label}\n </KobalteRadioGroup.ItemLabel>\n ) : null}\n {local.description ? (\n <KobalteRadioGroup.ItemDescription class=\"text-muted-foreground text-sm\">\n {local.description}\n </KobalteRadioGroup.ItemDescription>\n ) : null}\n </div>\n )}\n </KobalteRadioGroup.Item>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAmBA,SAAgBA,aAAWS,OAAiD;CAC1E,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;CAAmB,CACpB;CACD,MAAMG,QAAQL,oBAAoB,SAAS;EACzCM,IAAIH,MAAMG;EACV,cAAcH,MAAM;EACpB,mBAAmBA,MAAM;EACzB,oBAAoBA,MAAM;EAC1B,gBAAgBA,MAAM;EACtB,qBAAqBA,MAAM;CAC7B,CAAC;CACD,OAAAI,gBACGb,YAAiBc,WAAA;EAAA,aAAA;EAAA,IAEhBF,KAAE;GAAA,OAAED,OAAOC,MAAMH,MAAMG;EAAE;EAAA,KAAA,gBAAA;GAAA,OACbH,MAAM;EAAa;EAAA,KAAA,qBAAA;GAAA,OACdE,QAAQ,sBAAsBF,MAAM;EAAkB;EAAA,KAAA,sBAAA;GAAA,OACrDE,QAAQ,uBAAuBF,MAAM;EAAmB;EAAA,KAAA,kBAAA;GAAA,OAC5DE,QAAQ,mBAAmBF,MAAM;EAAe;EAAA,KAAA,uBAAA;GAAA,OAC3CE,QAAQ,wBAAwBF,MAAM;EAAoB;EAAA,KAAA,WAAA;GAAA,OACtEF,GAAG,cAAcE,MAAMM,KAAK;EAAC;CAAA,GAChCL,IAAI,CAAA;AAGd;;;;;;;AA8BA,SAAgBY,eAAed,OAA4B;CACzD,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAO,CACR;CACD,MAAMe,aAAad,MAAMW,YAAY;CAErC,MAAMC,QAAQjB,eAAsBK,MAAMY,KAAK;CAC/C,OAAAR,gBACGb,WAAkBgB,MAAIF,WAAA;EAAA,aAAA;EAAA,KAAA,kBAAA;GAA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KAAK;KAAA,aAAXmB,IAAA,IAAAxB,gBACEb,WAAkBsC,WAAS;MAAA,KAAA,WAAA;OAAA,OACnB/B,GAAG,uBAAuBgB,KAAK,KAAK,8BAA8B;MAAC;MAAA,IAAApB,WAAA;OAAA,OAEzEM,MAAMS;MAAK;KAAA,CAAA,IAEZ;IAAI,EAAA,CAAA,GAAA,IAAA;IAAAe,OAAAE,cAAA;KAAA,IAAAI,OAAAL,WAAA,CAAA,CACPzB,MAAMU,WAAW;KAAA,aAAjBoB,KAAA,IAAA1B,gBACEb,WAAkBwC,iBAAe;MAAA,SAAA;MAAA,IAAArC,WAAA;OAAA,OAC/BM,MAAMU;MAAW;KAAA,CAAA,IAElB;IAAI,EAAA,CAAA,GAAA,IAAA;IAAA,OAAAgB;GAAA,EAAA,CAAA,CAEX;EAAA;CAAA,EAAA,CAAA,CAAA;AAGP"}
1
+ {"version":3,"file":"radio-group.js","names":["RadioGroup","KobalteRadioGroup","Circle","LucideCircle","Show","children","resolveChildren","splitProps","useFormFieldControl","cn","fastIcon","props","local","rest","field","_$createComponent","_$mergeProps","id","class","Item","controlClass","label","description","variant","media","RadioGroupItem","card","undefined","title","ItemInput","ItemControl","ItemIndicator","when","slot","_el$","_tmpl$","_$insert","_$memo","_el$2","_tmpl$2","_c$","ItemLabel","_c$2","ItemDescription"],"sources":["../../../../src/components/ui/radio-group/radio-group.tsx"],"sourcesContent":["import { RadioGroup as KobalteRadioGroup } from '@kobalte/core/radio-group'\nimport { Circle as LucideCircle } from 'lucide-solid'\nimport type { ComponentProps, JSX } from 'solid-js'\nimport { Show, children as resolveChildren, splitProps } from 'solid-js'\nimport { useFormFieldControl } from '#lib/form-field'\nimport { cn } from '#lib/utils'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst Circle = fastIcon(LucideCircle)\n\n/**\n * RadioGroup.\n *\n * A single choice from a small, visible set. The group owns the value and the\n * arrow-key navigation, so a caller sets `value` once instead of wiring a\n * `name` and a handler onto every item.\n *\n * Below about five options a Select hides the choices behind a click, which is\n * the wrong trade; above about seven, radios become a wall and the Select wins.\n * That call belongs to the caller, and both controls are drawn from the same\n * tokens so either choice sits correctly next to the other.\n */\nexport function RadioGroup(props: ComponentProps<typeof KobalteRadioGroup>) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'id',\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'aria-invalid',\n 'aria-errormessage',\n ])\n const field = useFormFieldControl('group', local)\n return (\n <KobalteRadioGroup\n data-slot=\"radio-group\"\n id={field?.id ?? local.id}\n aria-label={local['aria-label']}\n aria-labelledby={field?.['aria-labelledby'] ?? local['aria-labelledby']}\n aria-describedby={field?.['aria-describedby'] ?? local['aria-describedby']}\n aria-invalid={field?.['aria-invalid'] ?? local['aria-invalid']}\n aria-errormessage={field?.['aria-errormessage'] ?? local['aria-errormessage']}\n class={cn('grid gap-2', local.class)}\n {...rest}\n />\n )\n}\n\nexport type RadioGroupItemProps = ComponentProps<typeof KobalteRadioGroup.Item> & {\n controlClass?: string\n /**\n * The option's visible label. A radio with no accessible name is unreachable\n * by a screen reader and by voice control, so supply this, a labelled child,\n * `aria-label`, or `aria-labelledby`.\n */\n label?: string\n description?: string\n /**\n * `card` draws the option as a bordered, selectable card — for a choice\n * whose options need a sentence each (a source type, a sync budget), where a\n * bare radio row reads as a form field rather than a decision. The whole card\n * is the hit target, and the selected card takes the primary edge. The radio,\n * `media` and text centre on one axis; the default variant keeps the radio on\n * the first line of its label.\n */\n variant?: 'default' | 'card'\n /** A leading icon or `EntityIcon` between the radio and the text, for `card`. */\n media?: JSX.Element\n}\n\n/**\n * A card option's label stretches an invisible layer over the whole card, so a\n * click anywhere on it — padding, media, description — selects the option\n * through the label's native association with the radio input. Wrapping the\n * card in a `<label>` would nest the item's own label inside another.\n */\nexport function RadioGroupItem(props: RadioGroupItemProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'controlClass',\n 'label',\n 'description',\n 'variant',\n 'media',\n 'children',\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'aria-invalid',\n 'aria-busy',\n 'title',\n ])\n const card = () => local.variant === 'card'\n\n const media = resolveChildren(() => local.media)\n return (\n <KobalteRadioGroup.Item\n data-slot=\"radio-group-item\"\n data-variant={card() ? 'card' : undefined}\n title={local.title}\n class={cn(\n 'group/radio flex gap-2.5',\n {\n 'items-start': !card(),\n // A card centres its radio, media and text on one axis. Top alignment\n // is right for a bare row, where the radio sits on the label's first\n // line, but in a card the media is taller than that line, so a\n // top-aligned radio floats above the icon and the label beside it.\n 'items-center': card(),\n 'relative rounded-lg border border-border bg-card px-3 py-2.5 transition-[color,box-shadow,border-color,background-color] ease-out hover:bg-surface-hover data-[checked]:border-primary data-[disabled]:cursor-not-allowed data-[disabled]:hover:bg-card':\n card(),\n 'has-[input:focus-visible]:border-ring has-[input:focus-visible]:ring-3 has-[input:focus-visible]:ring-primary-subtle':\n card(),\n },\n local.class\n )}\n {...rest}\n >\n <KobalteRadioGroup.ItemInput\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-busy={local['aria-busy']}\n title={local.title}\n />\n <KobalteRadioGroup.ItemControl\n class={cn(\n 'border-input bg-transparent flex size-4 shrink-0 items-center justify-center rounded-full border',\n 'transition-[color,box-shadow,border-color,background-color] ease-out outline-none',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'data-[checked]:border-primary data-[checked]:text-primary',\n 'data-[invalid]:border-destructive data-[invalid]:ring-3 data-[invalid]:ring-destructive-subtle',\n 'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',\n local.controlClass\n )}\n >\n <KobalteRadioGroup.ItemIndicator class=\"flex items-center justify-center\">\n <Circle class=\"size-2 fill-current\" />\n </KobalteRadioGroup.ItemIndicator>\n </KobalteRadioGroup.ItemControl>\n <Show when={media()}>\n {(slot) => (\n <span data-slot=\"radio-group-item-media\" class=\"flex shrink-0 items-center\">\n {slot()}\n </span>\n )}\n </Show>\n {local.children ?? (\n <div class=\"grid gap-0.5 leading-none\">\n {local.label ? (\n <KobalteRadioGroup.ItemLabel\n class={cn('text-sm font-medium', card() && 'after:absolute after:inset-0')}\n >\n {local.label}\n </KobalteRadioGroup.ItemLabel>\n ) : null}\n {local.description ? (\n <KobalteRadioGroup.ItemDescription class=\"text-muted-foreground text-sm\">\n {local.description}\n </KobalteRadioGroup.ItemDescription>\n ) : null}\n </div>\n )}\n </KobalteRadioGroup.Item>\n )\n}\n"],"mappings":";;;;;;;;;;AASA,IAAME,WAASQ,SAASP,MAAY;;;;;;;;;;;;;AAcpC,SAAgBH,aAAWW,OAAiD;CAC1E,MAAM,CAACC,OAAOC,QAAQN,WAAWI,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;CAAmB,CACpB;CACD,MAAMG,QAAQN,oBAAoB,SAASI,KAAK;CAChD,OAAAG,gBACGd,YAAiBe,WAAA;EAAA,aAAA;EAAA,IAEhBC,KAAE;GAAA,OAAEH,OAAOG,MAAML,MAAMK;EAAE;EAAA,KAAA,gBAAA;GAAA,OACbL,MAAM;EAAa;EAAA,KAAA,qBAAA;GAAA,OACdE,QAAQ,sBAAsBF,MAAM;EAAkB;EAAA,KAAA,sBAAA;GAAA,OACrDE,QAAQ,uBAAuBF,MAAM;EAAmB;EAAA,KAAA,kBAAA;GAAA,OAC5DE,QAAQ,mBAAmBF,MAAM;EAAe;EAAA,KAAA,uBAAA;GAAA,OAC3CE,QAAQ,wBAAwBF,MAAM;EAAoB;EAAA,KAAA,WAAA;GAAA,OACtEH,GAAG,cAAcG,MAAMM,KAAK;EAAC;CAAA,GAChCL,IAAI,CAAA;AAGd;;;;;;;AA8BA,SAAgBY,eAAed,OAA4B;CACzD,MAAM,CAACC,OAAOC,QAAQN,WAAWI,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;E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C,MAAM,CAAC,GAAG;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC7B;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,kCA2B1D"}
1
+ {"version":3,"file":"resizable.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/resizable/resizable.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,kBAAkB,CAAA;AAExC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AA4B9C,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,SAAS,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,kCAa/F;AAgBD,wBAAgB,cAAc,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,SAAS,CAAC,KAAK,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,kCAchG;AAED,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,GAAG;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC7B;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,kCA2B1D"}
@@ -1,5 +1,6 @@
1
1
  import { cn } from "../../../lib/utils.js";
2
2
  import { resizeGripClass, resizeGripIconClass, resizeSeparatorClass } from "../../../lib/resize-separator.js";
3
+ import { fastIcon } from "../../../lib/fast-icon.js";
3
4
  import { className, createComponent, effect, insert, memo, mergeProps, template } from "solid-js/web";
4
5
  import { GripVertical } from "lucide-solid";
5
6
  import { createContext, splitProps, useContext } from "solid-js";
@@ -7,6 +8,7 @@ import Resizable from "@corvu/resizable";
7
8
  // src/components/ui/resizable/resizable.tsx
8
9
  var _tmpl$ = /*#__PURE__*/ template(`<div data-slot=resizable-grip>`);
9
10
  var _tmpl$2 = /*#__PURE__*/ template(`<div>`);
11
+ var GripVertical$1 = fastIcon(GripVertical);
10
12
  /**
11
13
  * Resizable.
12
14
  *
@@ -86,7 +88,7 @@ function ResizableHandle(props) {
86
88
  return _el$;
87
89
  })() : memo(() => !!local.withHandle)() ? (() => {
88
90
  var _el$2 = _tmpl$2();
89
- insert(_el$2, createComponent(GripVertical, { "class": resizeGripIconClass }));
91
+ insert(_el$2, createComponent(GripVertical$1, { "class": resizeGripIconClass }));
90
92
  effect(() => className(_el$2, resizeGripClass.chip));
91
93
  return _el$2;
92
94
  })() : null;
@@ -1 +1 @@
1
- {"version":3,"file":"resizable.js","names":["Resizable","GripVertical","createContext","splitProps","useContext","cn","resizeGripClass","resizeGripIconClass","resizeSeparatorClass","GroupSizesContext","ResizablePanelGroup","props","class","local","rest","_$createComponent","Provider","value","initialSizes","undefined","sizes","children","_$mergeProps","remainingSize","left","reduce","total","size","length","ResizablePanel","Panel","group","contextId","groupHasSizes","initialSize","Handle","withHandle","label","ResizableHandle","orientation","_$memo","_el$","_tmpl$","_$effect","_$className","rung","_el$2","_tmpl$2","_$insert","chip"],"sources":["../../../../src/components/ui/resizable/resizable.tsx"],"sourcesContent":["import Resizable from '@corvu/resizable'\nimport { GripVertical } from 'lucide-solid'\nimport type { ComponentProps } from 'solid-js'\nimport { createContext, splitProps, useContext } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { resizeGripClass, resizeGripIconClass, resizeSeparatorClass } from '#lib/resize-separator'\n\n/**\n * Resizable.\n *\n * A split layout: panels the user can resize, with a handle between them. This\n * is the shape of every IDE-like surface, rail, file tree, editor, terminal,\n * and the reason it is a primitive rather than something each view improvises.\n *\n * corvu supplies the pointer capture, the min/max constraints and the keyboard\n * resizing, which is what makes a divider operable without a mouse. The handle\n * is a real focusable element with an accessible role, so a split pane can be\n * adjusted from the keyboard; a bare `cursor-col-resize` div cannot.\n */\n/**\n * Whether the group was given `initialSizes` or controlled `sizes`. Those are corvu's to apply, and a\n * panel's own `initialSize` overrides them, so an unsized panel must not invent\n * one when the group already has an answer.\n */\nconst GroupSizesContext = createContext<() => boolean>(() => false)\n\nexport function ResizablePanelGroup(props: ComponentProps<typeof Resizable> & { class?: string }) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <GroupSizesContext.Provider\n value={() => rest.initialSizes !== undefined || rest.sizes !== undefined}\n >\n <Resizable\n class={cn('flex size-full data-[orientation=vertical]:flex-col', local.class)}\n {...rest}\n />\n </GroupSizesContext.Provider>\n )\n}\n\n/**\n * The size an unsized panel registers with: whatever its earlier siblings left.\n *\n * corvu registers a panel without `initialSize` at a flat 50%, so `0.28` beside\n * an unsized panel summed to 78% and left a gap. Panels register in document\n * order, so at registration `sizes` holds exactly the panels before this one.\n * When nothing is left, a second unsized panel, it takes an equal share, and\n * corvu shrinks the earlier panels by that share to keep the total at 100%.\n */\nfunction remainingSize(sizes: readonly number[]): number {\n const left = 1 - sizes.reduce((total, size) => total + size, 0)\n return left > 0.001 ? left : 1 / (sizes.length + 1)\n}\n\nexport function ResizablePanel(props: ComponentProps<typeof Resizable.Panel> & { class?: string }) {\n const [local, rest] = splitProps(props, ['class', 'initialSize'])\n const group = Resizable.useContext(rest.contextId)\n const groupHasSizes = useContext(GroupSizesContext)\n\n return (\n <Resizable.Panel\n initialSize={\n local.initialSize ?? (groupHasSizes() ? undefined : remainingSize(group.sizes()))\n }\n class={cn('min-h-0 min-w-0 overflow-hidden', local.class)}\n {...rest}\n />\n )\n}\n\nexport type ResizableHandleProps = ComponentProps<typeof Resizable.Handle> & {\n class?: string\n /**\n * Draw a visible grip in the middle of the divider: `true` is the bordered\n * chip with its grip icon; `'rung'` is a quieter translucent bar with no\n * icon, for edges that should read as barely there. Either way the divider\n * keeps its full 24px hit target.\n */\n withHandle?: boolean | 'rung'\n /**\n * The divider's accessible name. It is a focusable control, arrow keys move\n * the split, so it needs one; without it a screen reader announces an\n * unlabelled button between the two panels.\n */\n label?: string\n}\n\nexport function ResizableHandle(props: ResizableHandleProps) {\n const [local, rest] = splitProps(props, ['class', 'withHandle', 'label'])\n const group = Resizable.useContext(rest.contextId)\n\n return (\n <Resizable.Handle\n aria-label={local.label ?? 'Resize panels'}\n // A separator's orientation is the line's own, which runs across the\n // group: a row of panels is divided by a vertical line, a column by a\n // horizontal one. corvu reports the group's orientation instead.\n aria-orientation={group.orientation() === 'horizontal' ? 'vertical' : 'horizontal'}\n class={cn(\n resizeSeparatorClass(local.withHandle === 'rung' ? 'rung' : 'chip'),\n 'relative w-px data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full',\n local.class\n )}\n {...rest}\n >\n {local.withHandle === 'rung' ? (\n <div data-slot=\"resizable-grip\" class={resizeGripClass.rung} />\n ) : local.withHandle ? (\n <div class={resizeGripClass.chip}>\n <GripVertical class={resizeGripIconClass} />\n </div>\n ) : null}\n </Resizable.Handle>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,IAAMS,oBAAoBP,oBAAmC,KAAK;AAElE,SAAgBQ,oBAAoBC,OAA8D;CAChG,MAAM,CAACE,OAAOC,QAAQX,WAAWQ,OAAO,CAAC,OAAO,CAAC;CAEjD,OAAAI,gBACGN,kBAAkBO,UAAQ;EACzBC,aAAaH,KAAKI,iBAAiBC,KAAAA,KAAaL,KAAKM,UAAUD,KAAAA;EAAS,IAAAE,WAAA;GAAA,OAAAN,gBAEvEf,WAASsB,WAAA,EAAA,KAAA,WAAA;IAAA,OACDjB,GAAG,uDAAuDQ,MAAMD,KAAK;GAAC,EAAA,GACzEE,IAAI,CAAA;EAAA;CAAA,CAAA;AAIhB;;;;;;;;;;AAWA,SAASS,cAAcH,OAAkC;CACvD,MAAMI,OAAO,IAAIJ,MAAMK,QAAQC,OAAOC,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CAAA,CAAA,WAAA;GAAA,IAAAU,QAAAC,QAAA;GAAAC,OAAAF,OAAA/B,gBAEfd,cAAY,EAAA,SAAQM,oBAAmB,CAAA,CAAA;GAAAoC,aAAAC,UAAAE,OAD9BxC,gBAAgB2C,IAAI,CAAA;GAAA,OAAAH;EAAA,EAAA,CAAA,IAG9B;CAAI,EAAA,CAAA,CAAA;AAGd"}
1
+ {"version":3,"file":"resizable.js","names":["Resizable","GripVertical","LucideGripVertical","createContext","splitProps","useContext","cn","resizeGripClass","resizeGripIconClass","resizeSeparatorClass","fastIcon","GroupSizesContext","ResizablePanelGroup","props","class","local","rest","_$createComponent","Provider","value","initialSizes","undefined","sizes","children","_$mergeProps","remainingSize","left","reduce","total","size","length","ResizablePanel","Panel","group","contextId","groupHasSizes","initialSize","Handle","withHandle","label","ResizableHandle","orientation","_$memo","_el$","_tmpl$","_$effect","_$className","rung","_el$2","_tmpl$2","_$insert","chip"],"sources":["../../../../src/components/ui/resizable/resizable.tsx"],"sourcesContent":["import Resizable from '@corvu/resizable'\nimport { GripVertical as LucideGripVertical } from 'lucide-solid'\nimport type { ComponentProps } from 'solid-js'\nimport { createContext, splitProps, useContext } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { resizeGripClass, resizeGripIconClass, resizeSeparatorClass } from '#lib/resize-separator'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst GripVertical = fastIcon(LucideGripVertical)\n\n/**\n * Resizable.\n *\n * A split layout: panels the user can resize, with a handle between them. This\n * is the shape of every IDE-like surface, rail, file tree, editor, terminal,\n * and the reason it is a primitive rather than something each view improvises.\n *\n * corvu supplies the pointer capture, the min/max constraints and the keyboard\n * resizing, which is what makes a divider operable without a mouse. The handle\n * is a real focusable element with an accessible role, so a split pane can be\n * adjusted from the keyboard; a bare `cursor-col-resize` div cannot.\n */\n/**\n * Whether the group was given `initialSizes` or controlled `sizes`. Those are corvu's to apply, and a\n * panel's own `initialSize` overrides them, so an unsized panel must not invent\n * one when the group already has an answer.\n */\nconst GroupSizesContext = createContext<() => boolean>(() => false)\n\nexport function ResizablePanelGroup(props: ComponentProps<typeof Resizable> & { class?: string }) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <GroupSizesContext.Provider\n value={() => rest.initialSizes !== undefined || rest.sizes !== undefined}\n >\n <Resizable\n class={cn('flex size-full data-[orientation=vertical]:flex-col', local.class)}\n {...rest}\n />\n </GroupSizesContext.Provider>\n )\n}\n\n/**\n * The size an unsized panel registers with: whatever its earlier siblings left.\n *\n * corvu registers a panel without `initialSize` at a flat 50%, so `0.28` beside\n * an unsized panel summed to 78% and left a gap. Panels register in document\n * order, so at registration `sizes` holds exactly the panels before this one.\n * When nothing is left, a second unsized panel, it takes an equal share, and\n * corvu shrinks the earlier panels by that share to keep the total at 100%.\n */\nfunction remainingSize(sizes: readonly number[]): number {\n const left = 1 - sizes.reduce((total, size) => total + size, 0)\n return left > 0.001 ? left : 1 / (sizes.length + 1)\n}\n\nexport function ResizablePanel(props: ComponentProps<typeof Resizable.Panel> & { class?: string }) {\n const [local, rest] = splitProps(props, ['class', 'initialSize'])\n const group = Resizable.useContext(rest.contextId)\n const groupHasSizes = useContext(GroupSizesContext)\n\n return (\n <Resizable.Panel\n initialSize={\n local.initialSize ?? (groupHasSizes() ? undefined : remainingSize(group.sizes()))\n }\n class={cn('min-h-0 min-w-0 overflow-hidden', local.class)}\n {...rest}\n />\n )\n}\n\nexport type ResizableHandleProps = ComponentProps<typeof Resizable.Handle> & {\n class?: string\n /**\n * Draw a visible grip in the middle of the divider: `true` is the bordered\n * chip with its grip icon; `'rung'` is a quieter translucent bar with no\n * icon, for edges that should read as barely there. Either way the divider\n * keeps its full 24px hit target.\n */\n withHandle?: boolean | 'rung'\n /**\n * The divider's accessible name. It is a focusable control, arrow keys move\n * the split, so it needs one; without it a screen reader announces an\n * unlabelled button between the two panels.\n */\n label?: string\n}\n\nexport function ResizableHandle(props: ResizableHandleProps) {\n const [local, rest] = splitProps(props, ['class', 'withHandle', 'label'])\n const group = Resizable.useContext(rest.contextId)\n\n return (\n <Resizable.Handle\n aria-label={local.label ?? 'Resize panels'}\n // A separator's orientation is the line's own, which runs across the\n // group: a row of panels is divided by a vertical line, a column by a\n // horizontal one. corvu reports the group's orientation instead.\n aria-orientation={group.orientation() === 'horizontal' ? 'vertical' : 'horizontal'}\n class={cn(\n resizeSeparatorClass(local.withHandle === 'rung' ? 'rung' : 'chip'),\n 'relative w-px data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full',\n local.class\n )}\n {...rest}\n >\n {local.withHandle === 'rung' ? (\n <div data-slot=\"resizable-grip\" class={resizeGripClass.rung} />\n ) : local.withHandle ? (\n <div class={resizeGripClass.chip}>\n <GripVertical class={resizeGripIconClass} />\n </div>\n ) : null}\n </Resizable.Handle>\n )\n}\n"],"mappings":";;;;;;;;;;AASA,IAAMC,iBAAeS,SAASR,YAAkB;;;;;;;;;;;;;;;;;;AAmBhD,IAAMS,oBAAoBR,oBAAmC,KAAK;AAElE,SAAgBS,oBAAoBC,OAA8D;CAChG,MAAM,CAACE,OAAOC,QAAQZ,WAAWS,OAAO,CAAC,OAAO,CAAC;CAEjD,OAAAI,gBACGN,kBAAkBO,UAAQ;EACzBC,aAAaH,KAAKI,iBAAiBC,KAAAA,KAAaL,KAAKM,UAAUD,KAAAA;EAAS,IAAAE,WAAA;GAAA,OAAAN,gBAEvEjB,WAASwB,WAAA,EAAA,KAAA,WAAA;IAAA,OACDlB,GAAG,uDAAuDS,MAAMD,KAAK;GAAC,EAAA,GACzEE,IAAI,CAAA;EAAA;CAAA,CAAA;AAIhB;;;;;;;;;;AAWA,SAASS,cAAcH,OAAkC;CACvD,MAAMI,OAAO,IAAIJ,MAAMK,QAAQC,OAAOC,SAASD,QAAQC,MAAM,CAAC;CAC9D,OAAOH,OAAO,OAAQA,OAAO,KAAKJ,MAAMQ,SAAS;AACnD;AAEA,SAAgBC,eAAelB,OAAoE;CACjG,MAA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