@adea-ai/ui 0.152.2 → 0.152.3

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 (237) hide show
  1. package/dist/components/composites/about-dialog/about-dialog.js.map +1 -1
  2. package/dist/components/composites/accent-picker/accent-picker.js.map +1 -1
  3. package/dist/components/composites/accent-picker/custom-color-popover.js.map +1 -1
  4. package/dist/components/composites/account-menu/account-menu.js.map +1 -1
  5. package/dist/components/composites/action-button/action-button.js.map +1 -1
  6. package/dist/components/composites/appearance-editor/accent-swatch-groups.js.map +1 -1
  7. package/dist/components/composites/appearance-editor/appearance-choices.js.map +1 -1
  8. package/dist/components/composites/appearance-editor/appearance-editor.js.map +1 -1
  9. package/dist/components/composites/appearance-editor/appearance-rows.js.map +1 -1
  10. package/dist/components/composites/appearance-editor/font-settings-group.js.map +1 -1
  11. package/dist/components/composites/appearance-editor/theme-preview.js.map +1 -1
  12. package/dist/components/composites/catalog-browser/catalog-browser-group.js.map +1 -1
  13. package/dist/components/composites/catalog-browser/catalog-browser.js.map +1 -1
  14. package/dist/components/composites/catalog-browser/catalog-detail.js.map +1 -1
  15. package/dist/components/composites/chain-of-thought/chain-of-thought.js.map +1 -1
  16. package/dist/components/composites/chat/chat.js.map +1 -1
  17. package/dist/components/composites/checkpoint/checkpoint.js.map +1 -1
  18. package/dist/components/composites/confirmation/confirmation.js.map +1 -1
  19. package/dist/components/composites/context/context.js.map +1 -1
  20. package/dist/components/composites/file-tree/file-tree.js.map +1 -1
  21. package/dist/components/composites/help-center/help-center.js.map +1 -1
  22. package/dist/components/composites/icon-picker/icon-picker.js.map +1 -1
  23. package/dist/components/composites/inline-citation/inline-citation.js.map +1 -1
  24. package/dist/components/composites/list-row/list-row-control.js.map +1 -1
  25. package/dist/components/composites/list-row/list-row.js.map +1 -1
  26. package/dist/components/composites/message-scroller/message-scroller.js.map +1 -1
  27. package/dist/components/composites/model-selector/model-selector.js +3 -0
  28. package/dist/components/composites/model-selector/model-selector.js.map +1 -1
  29. package/dist/components/composites/plan/plan.js.map +1 -1
  30. package/dist/components/composites/queue/queue.js.map +1 -1
  31. package/dist/components/composites/reasoning/reasoning.js.map +1 -1
  32. package/dist/components/composites/scene-controls/scene-controls.js.map +1 -1
  33. package/dist/components/composites/settings/settings-layout.js.map +1 -1
  34. package/dist/components/composites/settings/settings-navigation.js.map +1 -1
  35. package/dist/components/composites/settings/settings.js.map +1 -1
  36. package/dist/components/composites/sources/sources.js.map +1 -1
  37. package/dist/components/composites/stack-trace/stack-trace.js.map +1 -1
  38. package/dist/components/composites/stat/stat.js.map +1 -1
  39. package/dist/components/composites/subagent/subagent.js.map +1 -1
  40. package/dist/components/composites/suggestion/suggestion.js.map +1 -1
  41. package/dist/components/composites/task/task.js.map +1 -1
  42. package/dist/components/composites/terminal/terminal.js.map +1 -1
  43. package/dist/components/composites/test-results/test-results.js.map +1 -1
  44. package/dist/components/composites/tool/tool.js.map +1 -1
  45. package/dist/components/composites/tree/tree.js.map +1 -1
  46. package/dist/components/composites/update-dialog/channel-control.js.map +1 -1
  47. package/dist/components/composites/update-dialog/update-dialog.js.map +1 -1
  48. package/dist/components/composites/workspace-mark/workspace-mark.js.map +1 -1
  49. package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js.map +1 -1
  50. package/dist/components/composites/workspace-switcher/workspace-switcher.js.map +1 -1
  51. package/dist/components/conversation/atomic/chat-composer.js.map +1 -1
  52. package/dist/components/conversation/busy-send-button.js.map +1 -1
  53. package/dist/components/conversation/chat-composer.js.map +1 -1
  54. package/dist/components/conversation/composer-menu.js.map +1 -1
  55. package/dist/components/conversation/conversation-avatar.js.map +1 -1
  56. package/dist/components/conversation/conversation-pane.js.map +1 -1
  57. package/dist/components/conversation/conversation-surface.js.map +1 -1
  58. package/dist/components/conversation/internal/chat-composer-shell.js.map +1 -1
  59. package/dist/components/conversation/message-composer.js.map +1 -1
  60. package/dist/components/conversation/message-row.js.map +1 -1
  61. package/dist/components/conversation/paste-token-editor.js.map +1 -1
  62. package/dist/components/conversation/thread-panel.js.map +1 -1
  63. package/dist/components/conversation/transcript-composition.js.map +1 -1
  64. package/dist/components/layout/app-shell/app-shell.js.map +1 -1
  65. package/dist/components/layout/app-shell/skip-link.js.map +1 -1
  66. package/dist/components/layout/contextual-sidebar/contextual-sidebar.js.map +1 -1
  67. package/dist/components/layout/contextual-sidebar/mobile-contextual-sidebar.js.map +1 -1
  68. package/dist/components/layout/floating-preview/floating-preview.js.map +1 -1
  69. package/dist/components/layout/orbit-layout/orbit-layout.js.map +1 -1
  70. package/dist/components/layout/page/page.js.map +1 -1
  71. package/dist/components/layout/panel/panel.js.map +1 -1
  72. package/dist/components/layout/pixel-pane/pixel-pane.js.map +1 -1
  73. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js.map +1 -1
  74. package/dist/components/layout/shell-rail/shell-rail.js.map +1 -1
  75. package/dist/components/layout/shell-top-bar/shell-top-bar.js.map +1 -1
  76. package/dist/components/layout/side-rail/side-rail.js.map +1 -1
  77. package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.js.map +1 -1
  78. package/dist/components/layout/sidebar-nav/sidebar-nav.js.map +1 -1
  79. package/dist/components/layout/split-layout/resize-controller-core-retry.js.map +1 -1
  80. package/dist/components/layout/split-layout/resize-controller-core.js.map +1 -1
  81. package/dist/components/layout/split-layout/split-layout.js.map +1 -1
  82. package/dist/components/layout/status-bar/status-bar.js.map +1 -1
  83. package/dist/components/layout/top-bar/top-bar.js.map +1 -1
  84. package/dist/components/layout/virtual-window/virtual-window.js.map +1 -1
  85. package/dist/components/motion/presence.js.map +1 -1
  86. package/dist/components/theme/appearance-panel.js.map +1 -1
  87. package/dist/components/theme/theme-mode-toggle.js.map +1 -1
  88. package/dist/components/theme/theme-picker.js.map +1 -1
  89. package/dist/components/theme/theme-provider.js.map +1 -1
  90. package/dist/components/theme/theme-toggle.js.map +1 -1
  91. package/dist/components/ui/accordion/accordion.js.map +1 -1
  92. package/dist/components/ui/alert/alert.js.map +1 -1
  93. package/dist/components/ui/alert-dialog/alert-dialog.js.map +1 -1
  94. package/dist/components/ui/annotation-surface/annotation-surface.js.map +1 -1
  95. package/dist/components/ui/aspect-ratio/aspect-ratio.js.map +1 -1
  96. package/dist/components/ui/attachment/attachment.js.map +1 -1
  97. package/dist/components/ui/avatar/avatar.js.map +1 -1
  98. package/dist/components/ui/badge/badge.js.map +1 -1
  99. package/dist/components/ui/board/board.js.map +1 -1
  100. package/dist/components/ui/breadcrumb/breadcrumb.js.map +1 -1
  101. package/dist/components/ui/bubble/bubble.js.map +1 -1
  102. package/dist/components/ui/button/button.js.map +1 -1
  103. package/dist/components/ui/button-group/button-group.js.map +1 -1
  104. package/dist/components/ui/calendar/calendar.js.map +1 -1
  105. package/dist/components/ui/callout/callout.js.map +1 -1
  106. package/dist/components/ui/card/card.js.map +1 -1
  107. package/dist/components/ui/carousel/carousel.js.map +1 -1
  108. package/dist/components/ui/chart/chart.js.map +1 -1
  109. package/dist/components/ui/checkbox/checkbox.js.map +1 -1
  110. package/dist/components/ui/code-block/code-block.js.map +1 -1
  111. package/dist/components/ui/collapsible/collapsible.js.map +1 -1
  112. package/dist/components/ui/combobox/combobox.js.map +1 -1
  113. package/dist/components/ui/combobox/value-combobox.js.map +1 -1
  114. package/dist/components/ui/command/command.js.map +1 -1
  115. package/dist/components/ui/context-menu/context-menu.js.map +1 -1
  116. package/dist/components/ui/detail-panel/detail-panel.js.map +1 -1
  117. package/dist/components/ui/dialog/dialog-layer.js.map +1 -1
  118. package/dist/components/ui/dialog/dialog.js.map +1 -1
  119. package/dist/components/ui/diff-block/diff-block.js.map +1 -1
  120. package/dist/components/ui/drawer/drawer.js.map +1 -1
  121. package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -1
  122. package/dist/components/ui/dropdown-menu/menu-parts.js.map +1 -1
  123. package/dist/components/ui/empty/empty-state.js.map +1 -1
  124. package/dist/components/ui/empty/empty.js.map +1 -1
  125. package/dist/components/ui/entity-icon/entity-icon.js.map +1 -1
  126. package/dist/components/ui/field/field.js.map +1 -1
  127. package/dist/components/ui/field/number-field.js.map +1 -1
  128. package/dist/components/ui/hover-card/hover-card.js.map +1 -1
  129. package/dist/components/ui/input/input-control.js.map +1 -1
  130. package/dist/components/ui/input/input.js.map +1 -1
  131. package/dist/components/ui/input-group/input-group.js.map +1 -1
  132. package/dist/components/ui/input-group/secret-input-group.js.map +1 -1
  133. package/dist/components/ui/input-otp/input-otp.js.map +1 -1
  134. package/dist/components/ui/item/item.js.map +1 -1
  135. package/dist/components/ui/kbd/kbd.js.map +1 -1
  136. package/dist/components/ui/label/label.js.map +1 -1
  137. package/dist/components/ui/marker/marker.js.map +1 -1
  138. package/dist/components/ui/menubar/menubar.js.map +1 -1
  139. package/dist/components/ui/message/message.js.map +1 -1
  140. package/dist/components/ui/modal-dialog/modal-dialog.js.map +1 -1
  141. package/dist/components/ui/native-select/native-select.js.map +1 -1
  142. package/dist/components/ui/navigation-menu/navigation-menu.js.map +1 -1
  143. package/dist/components/ui/pagination/pagination.js.map +1 -1
  144. package/dist/components/ui/popover/popover.js.map +1 -1
  145. package/dist/components/ui/progress/progress.js.map +1 -1
  146. package/dist/components/ui/questionnaire/questionnaire.js.map +1 -1
  147. package/dist/components/ui/radio-group/radio-group.js.map +1 -1
  148. package/dist/components/ui/resizable/resizable.js.map +1 -1
  149. package/dist/components/ui/scroll-area/scroll-area.js.map +1 -1
  150. package/dist/components/ui/select/select.js.map +1 -1
  151. package/dist/components/ui/separator/separator.js.map +1 -1
  152. package/dist/components/ui/sheet/sheet.js.map +1 -1
  153. package/dist/components/ui/skeleton/skeleton.js.map +1 -1
  154. package/dist/components/ui/slider/slider.js.map +1 -1
  155. package/dist/components/ui/spinner/spinner.js.map +1 -1
  156. package/dist/components/ui/status-chip/status-chip.js.map +1 -1
  157. package/dist/components/ui/switch/switch.js.map +1 -1
  158. package/dist/components/ui/table/table.js.map +1 -1
  159. package/dist/components/ui/tabs/tabs.js.map +1 -1
  160. package/dist/components/ui/text-link/text-link.js.map +1 -1
  161. package/dist/components/ui/textarea/textarea.js.map +1 -1
  162. package/dist/components/ui/toast/toast.js.map +1 -1
  163. package/dist/components/ui/toggle/toggle.js.map +1 -1
  164. package/dist/components/ui/toggle-group/toggle-group.js.map +1 -1
  165. package/dist/components/ui/tooltip/tooltip.js.map +1 -1
  166. package/dist/components/ui/trace/trace.js.map +1 -1
  167. package/dist/components/ui/typography/typography.js.map +1 -1
  168. package/dist/r/about-dialog.json +1 -1
  169. package/dist/r/accordion.json +1 -1
  170. package/dist/r/account-menu.json +1 -1
  171. package/dist/r/alert.json +1 -1
  172. package/dist/r/appearance-editor.json +1 -1
  173. package/dist/r/attachment.json +1 -1
  174. package/dist/r/breadcrumb.json +1 -1
  175. package/dist/r/calendar.json +1 -1
  176. package/dist/r/carousel.json +1 -1
  177. package/dist/r/catalog-browser.json +1 -1
  178. package/dist/r/chain-of-thought.json +1 -1
  179. package/dist/r/chat.json +1 -1
  180. package/dist/r/checkbox.json +1 -1
  181. package/dist/r/checkpoint.json +1 -1
  182. package/dist/r/code-block.json +1 -1
  183. package/dist/r/combobox.json +1 -1
  184. package/dist/r/command.json +1 -1
  185. package/dist/r/confirmation.json +1 -1
  186. package/dist/r/context.json +1 -1
  187. package/dist/r/conversation.json +1 -1
  188. package/dist/r/detail-panel.json +1 -1
  189. package/dist/r/dialog.json +1 -1
  190. package/dist/r/dropdown-menu.json +1 -1
  191. package/dist/r/empty.json +1 -1
  192. package/dist/r/file-tree.json +1 -1
  193. package/dist/r/floating-preview.json +1 -1
  194. package/dist/r/help-center.json +1 -1
  195. package/dist/r/icon-picker.json +1 -1
  196. package/dist/r/inline-citation.json +1 -1
  197. package/dist/r/lib.json +1 -1
  198. package/dist/r/message-scroller.json +1 -1
  199. package/dist/r/model-selector.json +1 -1
  200. package/dist/r/native-select.json +1 -1
  201. package/dist/r/navigation-menu.json +1 -1
  202. package/dist/r/pagination.json +1 -1
  203. package/dist/r/pixel-resize-handle.json +1 -1
  204. package/dist/r/plan.json +1 -1
  205. package/dist/r/questionnaire.json +1 -1
  206. package/dist/r/queue.json +1 -1
  207. package/dist/r/radio-group.json +1 -1
  208. package/dist/r/reasoning.json +1 -1
  209. package/dist/r/registry.json +65 -65
  210. package/dist/r/resizable.json +1 -1
  211. package/dist/r/scene-controls.json +1 -1
  212. package/dist/r/select.json +1 -1
  213. package/dist/r/settings.json +1 -1
  214. package/dist/r/sheet.json +1 -1
  215. package/dist/r/shell-rail.json +1 -1
  216. package/dist/r/sidebar-nav.json +1 -1
  217. package/dist/r/sources.json +1 -1
  218. package/dist/r/spinner.json +1 -1
  219. package/dist/r/split-layout.json +1 -1
  220. package/dist/r/src/components/composites/model-selector/model-selector.tsx +4 -1
  221. package/dist/r/stack-trace.json +1 -1
  222. package/dist/r/stat.json +1 -1
  223. package/dist/r/subagent.json +1 -1
  224. package/dist/r/task.json +1 -1
  225. package/dist/r/terminal.json +1 -1
  226. package/dist/r/test-results.json +1 -1
  227. package/dist/r/theming.json +1 -1
  228. package/dist/r/toast.json +1 -1
  229. package/dist/r/tool.json +1 -1
  230. package/dist/r/top-bar.json +1 -1
  231. package/dist/r/trace.json +1 -1
  232. package/dist/r/tree.json +1 -1
  233. package/dist/r/update-dialog.json +1 -1
  234. package/dist/r/workspace-switcher.json +1 -1
  235. package/package.json +11 -11
  236. package/registry.json +65 -65
  237. package/src/components/composites/model-selector/model-selector.tsx +4 -1
@@ -1 +1 @@
1
- {"version":3,"file":"questionnaire.js","names":["Check","CircleHelp","Clock","LoaderCircle","createEffect","createMemo","createSignal","createUniqueId","For","on","Show","splitProps","ComponentProps","JSX","cn","Button","Checkbox","RadioGroup","RadioGroupItem","Textarea","QuestionnaireOption","Readonly","id","label","description","QuestionnaireQuestion","prompt","options","multiple","allowText","textLabel","textPlaceholder","optional","QuestionnaireAnswer","optionIds","text","QuestionnaireAnswers","Record","QuestionnaireStatus","EMPTY","answerFor","record","question","Pick","Object","hasOwn","undefined","isQuestionAnswered","answer","length","trim","QuestionnaireProps","Omit","questions","title","status","answers","defaultAnswers","onAnswersChange","onSubmit","Promise","disabledReason","error","submitLabel","Questionnaire","props","local","rest","uid","internal","setInternal","step","setStep","settled","hostDisabledReason","locked","count","current","Math","min","last","reasonId","submitReason","questionHeading","HTMLHeadingElement","answerOf","change","next","value","canAdvance","canSubmit","every","sending","submit","root","HTMLElement","focusWithin","wasSettled","done","document","activeElement","body","focus","preventScroll","defer","firstStep","onKeyDown","EventHandler","KeyboardEvent","event","key","metaKey","ctrlKey","preventDefault","summary","map","chosen","filter","option","includes","parts","_el$","_tmpl$7","_el$2","firstChild","_el$3","_el$4","nextSibling","_el$5","$$focusout","relatedTarget","Node","currentTarget","contains","$$focusin","$$keydown","_$use","element","_$spread","_$mergeProps","data-status","aria-label","class","_$insert","_$createComponent","when","fallback","children","_el$6","_tmpl$","_el$7","_tmpl$2","_el$8","_tmpl$3","_el$11","_tmpl$8","each","entry","_el$12","_tmpl$9","_el$13","_el$14","_c$","_$memo","join","keyed","_el$15","_tmpl$12","_el$16","_el$21","_el$17","_tmpl$0","_el$18","_el$20","_el$19","_el$22","_tmpl$1","onChange","disabled","variant","_el$23","_tmpl$10","checked","ids","_$effect","_$setAttribute","_el$24","_tmpl$11","_el$25","rows","placeholder","aria-describedby","onInput","_el$0","_tmpl$4","_el$1","_tmpl$5","_el$10","_tmpl$6","_tmpl$13","type","size","onClick","max","_$delegateEvents","_$mergeProps","_$createComponent","_$memo","_$setAttribute","_$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 )}\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 <p class=\"m-0 mt-0.5 text-xs text-muted-foreground\">{local.description}</p>\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 <p role=\"alert\" class=\"m-0 text-xs text-destructive\">\n {local.error}\n </p>\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,IAAMuC,QAA6B;CAAEL,WAAW,CAAA;CAAIC,MAAM;AAAG;;;;;;;AAQ7D,SAAgBK,UACdC,QACAC,UACiC;CACjC,OAAOE,OAAOC,OAAOJ,QAAQC,SAASpB,EAAE,IAAImB,OAAOC,SAASpB,MAAMwB,KAAAA;AACpE;;AAGA,SAAgBC,mBACdL,UACAM,QACS;CACT,IAAIN,SAASV,UAAU,OAAO;CAC9B,QAAQgB,QAAQd,UAAUe,UAAU,KAAK,MAAMD,QAAQb,KAAKe,KAAK,CAA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AA,WAAA;QAAA,OAAAH,gBAMtEjI,QAAM;SACLyL,MAAI;SACJC,MAAI;SAAA,IACJvB,WAAQ;UAAA,OAAEvG,OAAO,KAAK,CAACe,UAAU,KAAKxB,MAAMP,aAAab,KAAAA;SAAS;SAAA,KAAA,sBAAA;UAAA,OAChDoC,aAAa,IAAID,WAAWnC,KAAAA;SAAS;SACvD4J,eAAe,KAAK7G,OAAO;SAAC,IAAAsD,WAAA;UAAA,OAAA,CAAAH,gBAE3BtI,MAAI;WAAA,IAACuI,OAAI;YAAA,OAAE1F,OAAO,MAAM;WAAY;WAAA,IAAA4F,WAAA;YAAA,OAAAH,gBAClC7I,cAAY;aAAA,eAAA;aAAA,SAAA;YAAA,CAAA;WAAA;UAAA,CAAA,GAAAgK,WAEdjG,MAAMH,eAAe,aAAa,CAAA;SAAA;QAAA,CAAA;OAAA;MAAA,CAAA,GAAA,IAAA;MAAA,OAAAsI;KAAA,EAAA,CAAA;IAAA;GAAA;EAAA,CAAA,GAAA,IAAA;EAAA,OAAA5E;CAAA,EAAA,CAAA;AAOjD;AAACmF,eAAA;CAAA;CAAA;CAAA;AAAA,CAAA"}
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$7","_el$2","firstChild","_el$3","_el$4","nextSibling","_el$5","$$focusout","relatedTarget","Node","currentTarget","contains","$$focusin","$$keydown","_$use","element","_$spread","_$mergeProps","_$insert","_$createComponent","when","fallback","children","_el$6","_tmpl$","_el$7","_tmpl$2","_el$8","_tmpl$3","_el$11","_tmpl$8","each","entry","_el$12","_tmpl$9","_el$13","_el$14","_c$","_$memo","join","keyed","_el$15","_tmpl$12","_el$16","_el$21","_el$17","_tmpl$0","_el$20","_el$22","_tmpl$1","onChange","disabled","variant","_el$23","_tmpl$10","checked","ids","_$effect","_$setAttribute","_el$24","_tmpl$11","_el$25","rows","placeholder","onInput","_el$0","_tmpl$4","_el$1","_tmpl$5","_el$10","_tmpl$6","_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 )}\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 <p class=\"m-0 mt-0.5 text-xs text-muted-foreground\">{local.description}</p>\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 <p role=\"alert\" class=\"m-0 text-xs text-destructive\">\n {local.error}\n </p>\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,OA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F,MAAMH,eAAe,aAAa,CAAA;SAAA;QAAA,CAAA;OAAA;MAAA,CAAA,GAAA,IAAA;MAAA,OAAA4H;KAAA,EAAA,CAAA;IAAA;GAAA;EAAA,CAAA,GAAA,IAAA;EAAA,OAAAtE;CAAA,EAAA,CAAA;AAOjD;AAAC6E,eAAA;CAAA;CAAA;CAAA;AAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.js","names":["RadioGroup","KobalteRadioGroup","Circle","ComponentProps","JSX","splitProps","useFormFieldControl","cn","props","local","rest","field","id","_$createComponent","_$mergeProps","aria-label","aria-labelledby","aria-describedby","aria-invalid","aria-errormessage","class","RadioGroupItemProps","Item","controlClass","label","description","variant","media","Element","RadioGroupItem","card","data-variant","undefined","title","children","ItemInput","aria-busy","ItemControl","ItemIndicator","_$memo","_el$","_tmpl$","_$insert","_el$2","_tmpl$2","_c$","ItemLabel","_c$2","ItemDescription","RadioGroup","_$createComponent","KobalteRadioGroup","_$mergeProps","_$memo"],"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 { 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 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 {local.media ? (\n <span data-slot=\"radio-group-item-media\" class=\"flex shrink-0 items-center\">\n {local.media}\n </span>\n ) : null}\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,aAAWQ,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,gBACGZ,YAAiBa,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,MAAMW,KAAK;EAAC;CAAA,GAChCV,IAAI,CAAA;AAGd;;;;;;;AA8BA,SAAgBmB,eAAerB,OAA4B;CACzD,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAO,CACR;CACD,MAAMsB,aAAarB,MAAMiB,YAAY;CAErC,OAAAb,gBACGZ,WAAkBqB,MAAIR,WAAA;EA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,CAAA,CAEV9B,MAAMe,KAAK;KAAA,aAAXqB,IAAA,IAAAhC,gBACEZ,WAAkB6C,WAAS;MAAA,KAAA,WAAA;OAAA,OACnBvC,GAAG,uBAAuBuB,KAAK,KAAK,8BAA8B;MAAC;MAAA,IAAAI,WAAA;OAAA,OAEzEzB,MAAMe;MAAK;KAAA,CAAA,IAEZ;IAAI,EAAA,CAAA,GAAA,IAAA;IAAAkB,OAAAC,cAAA;KAAA,IAAAI,OAAAR,WAAA,CAAA,CACP9B,MAAMgB,WAAW;KAAA,aAAjBsB,KAAA,IAAAlC,gBACEZ,WAAkB+C,iBAAe;MAAA,SAAA;MAAA,IAAAd,WAAA;OAAA,OAC/BzB,MAAMgB;MAAW;KAAA,CAAA,IAElB;IAAI,EAAA,CAAA,GAAA,IAAA;IAAA,OAAAkB;GAAA,EAAA,CAAA,CAEX;EAAA;CAAA,EAAA,CAAA,CAAA;AAGP"}
1
+ {"version":3,"file":"radio-group.js","names":["RadioGroup","KobalteRadioGroup","Circle","splitProps","useFormFieldControl","cn","props","local","rest","field","id","_$createComponent","_$mergeProps","class","Item","controlClass","label","description","variant","media","RadioGroupItem","card","undefined","title","children","ItemInput","ItemControl","ItemIndicator","_$memo","_el$","_tmpl$","_$insert","_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 { 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 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 {local.media ? (\n <span data-slot=\"radio-group-item-media\" class=\"flex shrink-0 items-center\">\n {local.media}\n </span>\n ) : null}\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,aAAWM,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,gBACGV,YAAiBW,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,MAA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AC,OAAAF,YAEPtB,MAAMY,KAAK;IAAA,OAAAU;GAAA,EAAA,CAAA,IAEZ,IAAI;GAAAD,WACPrB,MAAMiB,mBAAQ;IAAA,IAAAQ,QAAAC,QAAA;IAAAF,OAAAC,cAAA;KAAA,IAAAE,MAAAN,WAAA,CAAA,CAEVrB,MAAMS,KAAK;KAAA,aAAXkB,IAAA,IAAAvB,gBACEV,WAAkBkC,WAAS;MAAA,KAAA,WAAA;OAAA,OACnB9B,GAAG,uBAAuBgB,KAAK,KAAK,8BAA8B;MAAC;MAAA,IAAAG,WAAA;OAAA,OAEzEjB,MAAMS;MAAK;KAAA,CAAA,IAEZ;IAAI,EAAA,CAAA,GAAA,IAAA;IAAAe,OAAAC,cAAA;KAAA,IAAAI,OAAAR,WAAA,CAAA,CACPrB,MAAMU,WAAW;KAAA,aAAjBmB,KAAA,IAAAzB,gBACEV,WAAkBoC,iBAAe;MAAA,SAAA;MAAA,IAAAb,WAAA;OAAA,OAC/BjB,MAAMU;MAAW;KAAA,CAAA,IAElB;IAAI,EAAA,CAAA,GAAA,IAAA;IAAA,OAAAe;GAAA,EAAA,CAAA,CAEX;EAAA;CAAA,EAAA,CAAA,CAAA;AAGP"}
@@ -1 +1 @@
1
- {"version":3,"file":"resizable.js","names":["Resizable","GripVertical","ComponentProps","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","ResizableHandleProps","Handle","withHandle","label","ResizableHandle","aria-label","aria-orientation","orientation","_$memo","_el$","_tmpl$","_$effect","_$className","rung","_el$2","_tmpl$2","_$insert","chip","_$createComponent","_$mergeProps","_$memo","_$className"],"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,IAAMU,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,iBA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SAAS,SAAS,MAAM,GAClE,qFACAxB,MAAMD,KACR;EAAC;CAAA,GACGE,MAAI,EAAA,IAAAO,WAAA;EAAA,OAEPsB,WAAA9B,MAAMwB,eAAe,MAAM,CAAA,CAAA,WAAA;GAAA,IAAAO,OAAAC,OAAA;GAAAC,aAAAC,UAAAH,MACatC,gBAAgB0C,IAAI,CAAA;GAAA,OAAAJ;EAAA,EAAA,CAAA,IACzDD,WAAA,CAAA,CAAA9B,MAAMwB,UAAU,CAAA,CAAA,WAAA;GAAA,IAAAY,QAAAC,QAAA;GAAAC,OAAAF,OAAAlC,gBAEff,cAAY,EAAA,SAAQO,oBAAmB,CAAA,CAAA;GAAAuC,aAAAC,UAAAE,OAD9B3C,gBAAgB8C,IAAI,CAAA;GAAA,OAAAH;EAAA,EAAA,CAAA,IAG9B;CAAI,EAAA,CAAA,CAAA;AAGd"}
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,MA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A3B,MAAMuB,UAAU,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 +1 @@
1
- {"version":3,"file":"scroll-area.js","names":["ComponentProps","splitProps","cn","ScrollAreaProps","orientation","fade","hideScrollbar","ScrollArea","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","tabIndex","class","undefined","_$mergeProps"],"sources":["../../../../src/components/ui/scroll-area/scroll-area.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * ScrollArea.\n *\n * A scroll container with the design system's scrollbar treatment, plus an\n * optional fade at each edge so a long list reads as continuing rather than\n * ending at the fold.\n *\n * This is a styled native scroller, not a reimplementation of scrolling. The\n * platform scroller already handles momentum, rubber-banding, keyboard paging,\n * trackpad gestures, `scrollIntoView`, focus-into-view and find-in-page. A\n * custom scrollbar over a transformed div gives up every one of those to gain\n * nothing but the scrollbar's appearance, which CSS already controls.\n *\n * `orientation` only decides which edges the fade appears on; `overflow-auto`\n * stays on both axes in `both` mode so a wide table can still be reached.\n */\nexport type ScrollAreaProps = ComponentProps<'div'> & {\n orientation?: 'vertical' | 'horizontal' | 'both'\n /** Draw a fade at the leading and trailing edges of the scrolled axis. */\n fade?: boolean\n /** Replace the browser's scrollbar with the system's thin treatment. */\n hideScrollbar?: boolean\n}\n\nexport function ScrollArea(props: ScrollAreaProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'orientation',\n 'fade',\n 'hideScrollbar',\n 'tabIndex',\n ])\n\n return (\n <div\n data-slot=\"scroll-area\"\n /*\n * Focusable, because that is what makes a scroll region reachable from the\n * keyboard. A `div` with `overflow: auto` scrolls with a mouse or a\n * trackpad and not at all with the arrow keys until it can take focus, so\n * a long list inside one is unreachable without a pointer. The cost is a\n * focus ring around the region, which is correct: it *is* focusable, and\n * `outline-none` keeps the ring to the drawn one.\n */\n tabIndex={local.tabIndex ?? 0}\n class={cn(\n 'relative min-h-0 min-w-0 outline-none focus-visible:ring-3 focus-visible:ring-primary-subtle',\n {\n 'overflow-y-auto overflow-x-hidden':\n local.orientation === 'vertical' || local.orientation === undefined,\n 'overflow-x-auto overflow-y-hidden': local.orientation === 'horizontal',\n 'overflow-auto': local.orientation === 'both',\n 'no-scrollbar': local.hideScrollbar,\n 'scroll-shadow-y':\n local.fade && (local.orientation === 'vertical' || local.orientation === undefined),\n },\n local.class\n )}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;AA4BA,SAAgBO,WAAWC,OAAwB;CACjD,MAAM,CAACC,OAAOC,QAAQT,WAAWO,OAAO;EACtC;EACA;EACA;EACA;EACA;CAAU,CACX;CAED,cAAA;EAAA,IAAAG,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA;GAAA,IAWIC,WAAQ;IAAA,OAAEN,MAAMM,YAAY;GAAC;GAAA,KAAA,WAAA;IAAA,OACtBb,GACL,gGACA;KACE,qCACEO,MAAML,gBAAgB,cAAcK,MAAML,gBAAgBa,KAAAA;KAC5D,qCAAqCR,MAAML,gBAAgB;KAC3D,iBAAiBK,MAAML,gBAAgB;KACvC,gBAAgBK,MAAMH;KACtB,mBACEG,MAAMJ,SAASI,MAAML,gBAAgB,cAAcK,MAAML,gBAAgBa,KAAAA;IAC7E,GACAR,MAAMO,KACR;GAAC;EAAA,GACGN,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAC;CAAA,EAAA,CAAA;AAGd"}
1
+ {"version":3,"file":"scroll-area.js","names":["splitProps","cn","orientation","fade","hideScrollbar","ScrollArea","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","tabIndex","class","undefined"],"sources":["../../../../src/components/ui/scroll-area/scroll-area.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * ScrollArea.\n *\n * A scroll container with the design system's scrollbar treatment, plus an\n * optional fade at each edge so a long list reads as continuing rather than\n * ending at the fold.\n *\n * This is a styled native scroller, not a reimplementation of scrolling. The\n * platform scroller already handles momentum, rubber-banding, keyboard paging,\n * trackpad gestures, `scrollIntoView`, focus-into-view and find-in-page. A\n * custom scrollbar over a transformed div gives up every one of those to gain\n * nothing but the scrollbar's appearance, which CSS already controls.\n *\n * `orientation` only decides which edges the fade appears on; `overflow-auto`\n * stays on both axes in `both` mode so a wide table can still be reached.\n */\nexport type ScrollAreaProps = ComponentProps<'div'> & {\n orientation?: 'vertical' | 'horizontal' | 'both'\n /** Draw a fade at the leading and trailing edges of the scrolled axis. */\n fade?: boolean\n /** Replace the browser's scrollbar with the system's thin treatment. */\n hideScrollbar?: boolean\n}\n\nexport function ScrollArea(props: ScrollAreaProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'orientation',\n 'fade',\n 'hideScrollbar',\n 'tabIndex',\n ])\n\n return (\n <div\n data-slot=\"scroll-area\"\n /*\n * Focusable, because that is what makes a scroll region reachable from the\n * keyboard. A `div` with `overflow: auto` scrolls with a mouse or a\n * trackpad and not at all with the arrow keys until it can take focus, so\n * a long list inside one is unreachable without a pointer. The cost is a\n * focus ring around the region, which is correct: it *is* focusable, and\n * `outline-none` keeps the ring to the drawn one.\n */\n tabIndex={local.tabIndex ?? 0}\n class={cn(\n 'relative min-h-0 min-w-0 outline-none focus-visible:ring-3 focus-visible:ring-primary-subtle',\n {\n 'overflow-y-auto overflow-x-hidden':\n local.orientation === 'vertical' || local.orientation === undefined,\n 'overflow-x-auto overflow-y-hidden': local.orientation === 'horizontal',\n 'overflow-auto': local.orientation === 'both',\n 'no-scrollbar': local.hideScrollbar,\n 'scroll-shadow-y':\n local.fade && (local.orientation === 'vertical' || local.orientation === undefined),\n },\n local.class\n )}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;AA4BA,SAAgBK,WAAWC,OAAwB;CACjD,MAAM,CAACC,OAAOC,QAAQR,WAAWM,OAAO;EACtC;EACA;EACA;EACA;EACA;CAAU,CACX;CAED,cAAA;EAAA,IAAAG,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA;GAAA,IAWIC,WAAQ;IAAA,OAAEN,MAAMM,YAAY;GAAC;GAAA,KAAA,WAAA;IAAA,OACtBZ,GACL,gGACA;KACE,qCACEM,MAAML,gBAAgB,cAAcK,MAAML,gBAAgBa,KAAAA;KAC5D,qCAAqCR,MAAML,gBAAgB;KAC3D,iBAAiBK,MAAML,gBAAgB;KACvC,gBAAgBK,MAAMH;KACtB,mBACEG,MAAMJ,SAASI,MAAML,gBAAgB,cAAcK,MAAML,gBAAgBa,KAAAA;IAC7E,GACAR,MAAMO,KACR;GAAC;EAAA,GACGN,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAC;CAAA,EAAA,CAAA;AAGd"}
@@ -1 +1 @@
1
- {"version":3,"file":"select.js","names":["Select","KobalteSelect","Check","ChevronDown","ChevronsUpDown","ComponentProps","Show","splitProps","menuContentPadding","menuItem","menuSwatchTone","MenuSwatchTone","topLayerProps","cn","props","Option","OptGroup","local","rest","_$createComponent","_$mergeProps","gutter","SelectTriggerProps","Trigger","size","hideIcon","SelectTrigger","class","undefined","children","_$memo","when","Icon","SelectValueChildren","Value","SelectValueProps","optionLabel","option","LABEL_FIELDS","const","labelFromOption","field","value","Record","SelectValue","readLabel","state","selectedOption","SelectContentProps","Content","portalMount","HTMLElement","SelectContent","Portal","mount","Listbox","SelectItem","Item","swatch","_el$","_tmpl$","_$effect","_$className","tone","ItemLabel","ItemIndicator","SelectSection","Section","SelectLabel","Label","SelectChevronsUpDown","Select","_$createComponent","KobalteSelect","_$mergeProps","_$memo","_$className"],"sources":["../../../../src/components/ui/select/select.tsx"],"sourcesContent":["import { Select as KobalteSelect } from '@kobalte/core/select'\nimport { Check, ChevronDown, ChevronsUpDown } from 'lucide-solid'\nimport type { ComponentProps } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport {\n menuContentPadding,\n menuItem,\n menuSwatchTone,\n type MenuSwatchTone,\n topLayerProps,\n} from '#lib/overlay'\nimport { cn } from '#lib/utils'\n\n/**\n * Select.\n *\n * A single choice from a list that is too long to show, or whose options are\n * only known at runtime. The distinction from RadioGroup is disclosure: a\n * Select hides the choices behind a click, which is right above roughly seven\n * options and wrong below it.\n *\n * `Select.Value` renders the human-readable label of the selection, not its\n * value — the reason a Select takes both `options` and `optionValue`/`optionText`\n * rather than a bare list of strings, and the reason the trigger never shows a\n * raw id.\n */\nexport function Select<Option, OptGroup = never>(\n props: ComponentProps<typeof KobalteSelect<Option, OptGroup>>\n) {\n // Kobalte's own default gutter is 8px; without the arrow (removed below) the\n // popper no longer folds half an arrow box into that offset, and 8px read as\n // a detached list. Four pixels is shadcn's `sideOffset` — attached, with\n // room for the trigger's own border.\n const [local, rest] = splitProps(props, ['gutter'])\n return <KobalteSelect gutter={local.gutter ?? 4} {...rest} />\n}\n\nexport type SelectTriggerProps = ComponentProps<typeof KobalteSelect.Trigger> & {\n size?: 'sm' | 'md' | 'lg'\n /** Hide the chevron, e.g. when a caller draws its own affordance. */\n hideIcon?: boolean\n}\n\nexport function SelectTrigger(props: SelectTriggerProps) {\n const [local, rest] = splitProps(props, ['class', 'size', 'hideIcon', 'children'])\n\n return (\n <KobalteSelect.Trigger\n data-slot=\"select-trigger\"\n class={cn(\n 'border-input bg-transparent flex w-fit items-center justify-between gap-2 rounded-md border px-control-md',\n 'whitespace-nowrap transition-[color,box-shadow,border-color] ease-out outline-none',\n 'data-[placeholder-shown]:text-muted-foreground',\n 'hover:border-input',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle',\n 'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',\n '*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4',\n {\n 'h-control-sm text-xs': local.size === 'sm',\n 'h-control-md text-sm': local.size === 'md' || local.size === undefined,\n 'h-control-lg text-sm': local.size === 'lg',\n },\n local.class\n )}\n {...rest}\n >\n {local.children}\n <Show when={!local.hideIcon}>\n <KobalteSelect.Icon class=\"text-muted-foreground\">\n <ChevronDown />\n </KobalteSelect.Icon>\n </Show>\n </KobalteSelect.Trigger>\n )\n}\n\n/**\n * What the trigger shows for the current selection.\n *\n * The default renderer is the reason a single-select needs no render prop at all.\n * Kobalte's own `Value` draws *only* its children, so a bare `<SelectValue />`\n * shows the placeholder and then goes blank the moment something is chosen: the\n * value is there, nothing paints it.\n *\n * Kobalte cannot supply a default itself, because an option is the caller's type\n * — it has no way to know which field is the label. So this reads a field by\n * convention: `label`, then `name`, then `textValue`. An option shaped\n * `{ value, label }` therefore needs nothing, and anything else passes\n * `optionLabel`.\n *\n * A multiple-select still supplies its own renderer, because \"3 selected\" is a\n * summary a caller has to phrase, not something a component can guess.\n */\ntype SelectValueChildren = ComponentProps<typeof KobalteSelect.Value>['children']\n\nexport type SelectValueProps = ComponentProps<typeof KobalteSelect.Value> & {\n /**\n * Read the display text from the selected option. Supply this when the option's\n * label does not live in a field called `label`, `name` or `textValue`.\n */\n optionLabel?: (option: unknown) => string\n /** Replace the default readout entirely, for a multiple-select summary. */\n children?: SelectValueChildren\n}\n\n/** Fields a label is read from, in order. See `SelectValueProps.optionLabel`. */\nconst LABEL_FIELDS = ['label', 'name', 'textValue'] as const\n\nfunction labelFromOption(option: unknown): string {\n if (option === null || typeof option !== 'object') {\n return typeof option === 'string' ? option : ''\n }\n\n for (const field of LABEL_FIELDS) {\n const value = (option as Record<string, unknown>)[field]\n if (typeof value === 'string') return value\n }\n\n return ''\n}\n\nexport function SelectValue(props: SelectValueProps) {\n const [local, rest] = splitProps(props, ['class', 'children', 'optionLabel'])\n\n const readLabel = (state: { selectedOption: () => unknown }): string => {\n const option = state.selectedOption()\n return local.optionLabel ? local.optionLabel(option) : labelFromOption(option)\n }\n\n return (\n <KobalteSelect.Value data-slot=\"select-value\" class={cn('truncate', local.class)} {...rest}>\n {local.children ?? (readLabel as unknown as SelectValueChildren)}\n </KobalteSelect.Value>\n )\n}\n\n/**\n * The option list. The items themselves come from the root's `itemComponent`,\n * which is what makes a Select able to render a typed option rather than a\n * string; `children` here is for content above the list, such as a filter hint.\n */\nexport type SelectContentProps = ComponentProps<typeof KobalteSelect.Content> & {\n /** Keep a nested menu inside its enclosing modal's accessible subtree. */\n portalMount?: HTMLElement\n}\n\nexport function SelectContent(props: SelectContentProps) {\n const [local, rest] = splitProps(props, ['class', 'children', 'portalMount'])\n\n return (\n <KobalteSelect.Portal mount={local.portalMount}>\n <KobalteSelect.Content\n {...topLayerProps}\n class={cn(\n 'bg-popover text-popover-foreground rounded-xl border border-border shadow-lg',\n 'z-(--z-menu) max-h-(--kb-popper-content-available-height) min-w-[8rem] origin-(--kb-select-content-transform-origin) overflow-y-auto overflow-x-hidden',\n menuContentPadding,\n 'data-expanded:animate-in data-expanded:fade-in-0 data-expanded:zoom-in-95',\n 'data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n 'data-expanded:duration-150 data-closed:duration-100',\n local.class\n )}\n {...rest}\n >\n {local.children}\n {/* No arrow: the list is the trigger's own value opened up, and Kobalte\n reserves half the arrow's 30px box as popper gutter, which is where\n the reported gap between a form trigger and its options came from. */}\n <KobalteSelect.Listbox class=\"flex flex-col\" />\n </KobalteSelect.Content>\n </KobalteSelect.Portal>\n )\n}\n\nexport function SelectItem(\n props: ComponentProps<typeof KobalteSelect.Item> & {\n /** Draw a leading colour dot from the shared tone ladder — the accent or\n * status role the option's card badge carries. `aria-hidden`; the label\n * carries the meaning. */\n swatch?: MenuSwatchTone\n }\n) {\n const [local, rest] = splitProps(props, ['class', 'children', 'swatch'])\n\n return (\n <KobalteSelect.Item class={cn(menuItem, 'pe-8', local.class)} {...rest}>\n <Show when={local.swatch}>\n <span aria-hidden=\"true\" class={menuSwatchTone({ tone: local.swatch })} />\n </Show>\n <KobalteSelect.ItemLabel>{local.children}</KobalteSelect.ItemLabel>\n {/* The indicator reads in the accent, like every other selected state in\n the system — the row's own foreground reads as decoration. */}\n <KobalteSelect.ItemIndicator\n data-slot=\"select-indicator\"\n class=\"absolute end-2 flex size-4 items-center justify-center text-primary\"\n >\n <Check class=\"size-4\" />\n </KobalteSelect.ItemIndicator>\n </KobalteSelect.Item>\n )\n}\n\nexport function SelectSection(props: ComponentProps<typeof KobalteSelect.Section>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteSelect.Section class={cn('flex flex-col', local.class)} {...rest} />\n}\n\nexport function SelectLabel(props: ComponentProps<typeof KobalteSelect.Label>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteSelect.Label\n class={cn('text-muted-foreground px-2 py-1.5 text-2xs font-medium uppercase', local.class)}\n {...rest}\n />\n )\n}\n\n/** The chevron pair used when a Select is composed by hand in a field. */\nexport function SelectChevronsUpDown(props: ComponentProps<'svg'>) {\n return <ChevronsUpDown aria-hidden=\"true\" {...props} />\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA0BA,SAAgBA,SACdc,OACA;CAKA,MAAM,CAACG,OAAOC,QAAQX,WAAWO,OAAO,CAAC,QAAQ,CAAC;CAClD,OAAAK,gBAAQlB,QAAamB,WAAA,EAAA,IAACC,SAAM;EAAA,OAAEJ,MAAMI,UAAU;CAAC,EAAA,GAAMH,IAAI,CAAA;AAC3D;AAQA,SAAgBQ,cAAcZ,OAA2B;CACvD,MAAM,CAACG,OAAOC,QAAQX,WAAWO,OAAO;EAAC;EAAS;EAAQ;EAAY;CAAU,CAAC;CAEjF,OAAAK,gBACGlB,OAAcsB,S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A,OAAEZ,MAAMY;GAAQ,EAAA,CAAA;GAAAV,gBAGvClB,OAAcgE,eAAa;IAAA,aAAA;IAAA,SAAA;IAAA,IAAApC,WAAA;KAAA,OAAAV,gBAIzBjB,OAAK,EAAA,SAAA,SAAA,CAAA;IAAA;GAAA,CAAA;EAAA;CAAA,EAAA,CAAA,CAAA;AAId;AAEA,SAAgBgE,cAAcpD,OAAqD;CACjF,MAAM,CAACG,OAAOC,QAAQX,WAAWO,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAK,gBAAQlB,OAAckE,SAAO/C,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQP,GAAG,iBAAiBI,MAAMU,KAAK;CAAC,EAAA,GAAMT,IAAI,CAAA;AACjF;AAEA,SAAgBkD,YAAYtD,OAAmD;CAC7E,MAAM,CAACG,OAAOC,QAAQX,WAAWO,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAK,gBACGlB,OAAcoE,OAAKjD,WAAA,EAAA,KAAA,WAAA;EAAA,OACXP,GAAG,oEAAoEI,MAAMU,KAAK;CAAC,EAAA,GACtFT,IAAI,CAAA;AAGd;;AAGA,SAAgBoD,qBAAqBxD,OAA8B;CACjE,OAAAK,gBAAQf,gBAAcgB,WAAA,EAAA,eAAA,OAAA,GAAwBN,KAAK,CAAA;AACrD"}
1
+ {"version":3,"file":"select.js","names":["Select","KobalteSelect","Check","ChevronDown","ChevronsUpDown","Show","splitProps","menuItem","menuSwatchTone","topLayerProps","cn","props","local","rest","_$createComponent","_$mergeProps","gutter","Trigger","size","hideIcon","SelectTrigger","class","undefined","children","_$memo","when","Icon","Value","optionLabel","option","LABEL_FIELDS","labelFromOption","field","value","SelectValue","readLabel","state","selectedOption","Content","portalMount","SelectContent","Portal","mount","Listbox","SelectItem","Item","swatch","_el$","_tmpl$","_$effect","_$className","tone","ItemLabel","ItemIndicator","SelectSection","Section","SelectLabel","Label","SelectChevronsUpDown"],"sources":["../../../../src/components/ui/select/select.tsx"],"sourcesContent":["import { Select as KobalteSelect } from '@kobalte/core/select'\nimport { Check, ChevronDown, ChevronsUpDown } from 'lucide-solid'\nimport type { ComponentProps } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport {\n menuContentPadding,\n menuItem,\n menuSwatchTone,\n type MenuSwatchTone,\n topLayerProps,\n} from '#lib/overlay'\nimport { cn } from '#lib/utils'\n\n/**\n * Select.\n *\n * A single choice from a list that is too long to show, or whose options are\n * only known at runtime. The distinction from RadioGroup is disclosure: a\n * Select hides the choices behind a click, which is right above roughly seven\n * options and wrong below it.\n *\n * `Select.Value` renders the human-readable label of the selection, not its\n * value — the reason a Select takes both `options` and `optionValue`/`optionText`\n * rather than a bare list of strings, and the reason the trigger never shows a\n * raw id.\n */\nexport function Select<Option, OptGroup = never>(\n props: ComponentProps<typeof KobalteSelect<Option, OptGroup>>\n) {\n // Kobalte's own default gutter is 8px; without the arrow (removed below) the\n // popper no longer folds half an arrow box into that offset, and 8px read as\n // a detached list. Four pixels is shadcn's `sideOffset` — attached, with\n // room for the trigger's own border.\n const [local, rest] = splitProps(props, ['gutter'])\n return <KobalteSelect gutter={local.gutter ?? 4} {...rest} />\n}\n\nexport type SelectTriggerProps = ComponentProps<typeof KobalteSelect.Trigger> & {\n size?: 'sm' | 'md' | 'lg'\n /** Hide the chevron, e.g. when a caller draws its own affordance. */\n hideIcon?: boolean\n}\n\nexport function SelectTrigger(props: SelectTriggerProps) {\n const [local, rest] = splitProps(props, ['class', 'size', 'hideIcon', 'children'])\n\n return (\n <KobalteSelect.Trigger\n data-slot=\"select-trigger\"\n class={cn(\n 'border-input bg-transparent flex w-fit items-center justify-between gap-2 rounded-md border px-control-md',\n 'whitespace-nowrap transition-[color,box-shadow,border-color] ease-out outline-none',\n 'data-[placeholder-shown]:text-muted-foreground',\n 'hover:border-input',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle',\n 'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',\n '*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4',\n {\n 'h-control-sm text-xs': local.size === 'sm',\n 'h-control-md text-sm': local.size === 'md' || local.size === undefined,\n 'h-control-lg text-sm': local.size === 'lg',\n },\n local.class\n )}\n {...rest}\n >\n {local.children}\n <Show when={!local.hideIcon}>\n <KobalteSelect.Icon class=\"text-muted-foreground\">\n <ChevronDown />\n </KobalteSelect.Icon>\n </Show>\n </KobalteSelect.Trigger>\n )\n}\n\n/**\n * What the trigger shows for the current selection.\n *\n * The default renderer is the reason a single-select needs no render prop at all.\n * Kobalte's own `Value` draws *only* its children, so a bare `<SelectValue />`\n * shows the placeholder and then goes blank the moment something is chosen: the\n * value is there, nothing paints it.\n *\n * Kobalte cannot supply a default itself, because an option is the caller's type\n * — it has no way to know which field is the label. So this reads a field by\n * convention: `label`, then `name`, then `textValue`. An option shaped\n * `{ value, label }` therefore needs nothing, and anything else passes\n * `optionLabel`.\n *\n * A multiple-select still supplies its own renderer, because \"3 selected\" is a\n * summary a caller has to phrase, not something a component can guess.\n */\ntype SelectValueChildren = ComponentProps<typeof KobalteSelect.Value>['children']\n\nexport type SelectValueProps = ComponentProps<typeof KobalteSelect.Value> & {\n /**\n * Read the display text from the selected option. Supply this when the option's\n * label does not live in a field called `label`, `name` or `textValue`.\n */\n optionLabel?: (option: unknown) => string\n /** Replace the default readout entirely, for a multiple-select summary. */\n children?: SelectValueChildren\n}\n\n/** Fields a label is read from, in order. See `SelectValueProps.optionLabel`. */\nconst LABEL_FIELDS = ['label', 'name', 'textValue'] as const\n\nfunction labelFromOption(option: unknown): string {\n if (option === null || typeof option !== 'object') {\n return typeof option === 'string' ? option : ''\n }\n\n for (const field of LABEL_FIELDS) {\n const value = (option as Record<string, unknown>)[field]\n if (typeof value === 'string') return value\n }\n\n return ''\n}\n\nexport function SelectValue(props: SelectValueProps) {\n const [local, rest] = splitProps(props, ['class', 'children', 'optionLabel'])\n\n const readLabel = (state: { selectedOption: () => unknown }): string => {\n const option = state.selectedOption()\n return local.optionLabel ? local.optionLabel(option) : labelFromOption(option)\n }\n\n return (\n <KobalteSelect.Value data-slot=\"select-value\" class={cn('truncate', local.class)} {...rest}>\n {local.children ?? (readLabel as unknown as SelectValueChildren)}\n </KobalteSelect.Value>\n )\n}\n\n/**\n * The option list. The items themselves come from the root's `itemComponent`,\n * which is what makes a Select able to render a typed option rather than a\n * string; `children` here is for content above the list, such as a filter hint.\n */\nexport type SelectContentProps = ComponentProps<typeof KobalteSelect.Content> & {\n /** Keep a nested menu inside its enclosing modal's accessible subtree. */\n portalMount?: HTMLElement\n}\n\nexport function SelectContent(props: SelectContentProps) {\n const [local, rest] = splitProps(props, ['class', 'children', 'portalMount'])\n\n return (\n <KobalteSelect.Portal mount={local.portalMount}>\n <KobalteSelect.Content\n {...topLayerProps}\n class={cn(\n 'bg-popover text-popover-foreground rounded-xl border border-border shadow-lg',\n 'z-(--z-menu) max-h-(--kb-popper-content-available-height) min-w-[8rem] origin-(--kb-select-content-transform-origin) overflow-y-auto overflow-x-hidden',\n menuContentPadding,\n 'data-expanded:animate-in data-expanded:fade-in-0 data-expanded:zoom-in-95',\n 'data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n 'data-expanded:duration-150 data-closed:duration-100',\n local.class\n )}\n {...rest}\n >\n {local.children}\n {/* No arrow: the list is the trigger's own value opened up, and Kobalte\n reserves half the arrow's 30px box as popper gutter, which is where\n the reported gap between a form trigger and its options came from. */}\n <KobalteSelect.Listbox class=\"flex flex-col\" />\n </KobalteSelect.Content>\n </KobalteSelect.Portal>\n )\n}\n\nexport function SelectItem(\n props: ComponentProps<typeof KobalteSelect.Item> & {\n /** Draw a leading colour dot from the shared tone ladder — the accent or\n * status role the option's card badge carries. `aria-hidden`; the label\n * carries the meaning. */\n swatch?: MenuSwatchTone\n }\n) {\n const [local, rest] = splitProps(props, ['class', 'children', 'swatch'])\n\n return (\n <KobalteSelect.Item class={cn(menuItem, 'pe-8', local.class)} {...rest}>\n <Show when={local.swatch}>\n <span aria-hidden=\"true\" class={menuSwatchTone({ tone: local.swatch })} />\n </Show>\n <KobalteSelect.ItemLabel>{local.children}</KobalteSelect.ItemLabel>\n {/* The indicator reads in the accent, like every other selected state in\n the system — the row's own foreground reads as decoration. */}\n <KobalteSelect.ItemIndicator\n data-slot=\"select-indicator\"\n class=\"absolute end-2 flex size-4 items-center justify-center text-primary\"\n >\n <Check class=\"size-4\" />\n </KobalteSelect.ItemIndicator>\n </KobalteSelect.Item>\n )\n}\n\nexport function SelectSection(props: ComponentProps<typeof KobalteSelect.Section>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteSelect.Section class={cn('flex flex-col', local.class)} {...rest} />\n}\n\nexport function SelectLabel(props: ComponentProps<typeof KobalteSelect.Label>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteSelect.Label\n class={cn('text-muted-foreground px-2 py-1.5 text-2xs font-medium uppercase', local.class)}\n {...rest}\n />\n )\n}\n\n/** The chevron pair used when a Select is composed by hand in a field. */\nexport function SelectChevronsUpDown(props: ComponentProps<'svg'>) {\n return <ChevronsUpDown aria-hidden=\"true\" {...props} />\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA0BA,SAAgBA,SACdW,OACA;CAKA,MAAM,CAACC,OAAOC,QAAQP,WAAWK,OAAO,CAAC,QAAQ,CAAC;CAClD,OAAAG,gBAAQb,QAAac,WAAA,EAAA,IAACC,SAAM;EAAA,OAAEJ,MAAMI,UAAU;CAAC,EAAA,GAAMH,IAAI,CAAA;AAC3D;AAQA,SAAgBO,cAAcT,OAA2B;CACvD,MAAM,CAACC,OAAOC,QAAQP,WAAWK,OAAO;EAAC;EAAS;EAAQ;EAAY;CAAU,CAAC;CAEjF,OAAAG,gBACGb,OAAcgB,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AAEX,MAAMW;GAAQ,EAAA,CAAA;GAAAT,gBAGvCb,OAAcoD,eAAa;IAAA,aAAA;IAAA,SAAA;IAAA,IAAA9B,WAAA;KAAA,OAAAT,gBAIzBZ,OAAK,EAAA,SAAA,SAAA,CAAA;IAAA;GAAA,CAAA;EAAA;CAAA,EAAA,CAAA,CAAA;AAId;AAEA,SAAgBoD,cAAc3C,OAAqD;CACjF,MAAM,CAACC,OAAOC,QAAQP,WAAWK,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBAAQb,OAAcsD,SAAOxC,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQL,GAAG,iBAAiBE,MAAMS,KAAK;CAAC,EAAA,GAAMR,IAAI,CAAA;AACjF;AAEA,SAAgB2C,YAAY7C,OAAmD;CAC7E,MAAM,CAACC,OAAOC,QAAQP,WAAWK,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBACGb,OAAcwD,OAAK1C,WAAA,EAAA,KAAA,WAAA;EAAA,OACXL,GAAG,oEAAoEE,MAAMS,KAAK;CAAC,EAAA,GACtFR,IAAI,CAAA;AAGd;;AAGA,SAAgB6C,qBAAqB/C,OAA8B;CACjE,OAAAG,gBAAQV,gBAAcW,WAAA,EAAA,eAAA,OAAA,GAAwBJ,KAAK,CAAA;AACrD"}
@@ -1 +1 @@
1
- {"version":3,"file":"separator.js","names":["Separator","KobalteSeparator","PolymorphicProps","ComponentProps","splitProps","ValidComponent","cn","SeparatorProps","T","class","variant","orientation","props","local","rest","_$createComponent","_$mergeProps","Separator","_$createComponent","KobalteSeparator","_$mergeProps"],"sources":["../../../../src/components/ui/separator/separator.tsx"],"sourcesContent":["import { Separator as KobalteSeparator } from '@kobalte/core/separator'\nimport type { PolymorphicProps } from '@kobalte/core/polymorphic'\nimport { type ComponentProps, splitProps, type ValidComponent } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * Separator.\n *\n * Renders `role=\"separator\"` with the right orientation, so a screen reader\n * understands it as a boundary rather than as an empty element. A plain\n * `<div>` with a border looks identical and announces nothing.\n */\nexport type SeparatorProps<T extends ValidComponent = 'div'> = PolymorphicProps<\n T,\n {\n class?: string\n /** Draw the line as a dashed rule. For an \"or\" between alternative paths. */\n variant?: 'solid' | 'dashed'\n orientation?: 'horizontal' | 'vertical'\n }\n>\n\nexport function Separator<T extends ValidComponent = 'div'>(props: SeparatorProps<T>) {\n const [local, rest] = splitProps(props as SeparatorProps, ['class', 'variant', 'orientation'])\n\n return (\n <KobalteSeparator\n orientation={local.orientation ?? 'horizontal'}\n class={cn(\n 'bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px',\n {\n 'border-t border-dashed border-border bg-transparent data-[orientation=horizontal]:h-0':\n local.variant === 'dashed',\n },\n local.class\n )}\n {...(rest as ComponentProps<'div'>)}\n />\n )\n}\n"],"mappings":";;;;;AAsBA,SAAgBA,YAA4CY,OAA0B;CACpF,MAAM,CAACC,OAAOC,QAAQV,WAAWQ,OAAyB;EAAC;EAAS;EAAW;CAAa,CAAC;CAE7F,OAAAG,gBACGd,WAAgBe,WAAA;EAAA,IACfL,cAAW;GAAA,OAAEE,MAAMF,eAAe;EAAY;EAAA,KAAA,WAAA;GAAA,OACvCL,GACL,kKACA,EACE,yFACEO,MAAMH,YAAY,SACtB,GACAG,MAAMJ,KACR;EAAC;CAAA,GACIK,IAA6B,CAAA;AAGxC"}
1
+ {"version":3,"file":"separator.js","names":["Separator","KobalteSeparator","splitProps","cn","class","variant","orientation","props","local","rest","_$createComponent","_$mergeProps"],"sources":["../../../../src/components/ui/separator/separator.tsx"],"sourcesContent":["import { Separator as KobalteSeparator } from '@kobalte/core/separator'\nimport type { PolymorphicProps } from '@kobalte/core/polymorphic'\nimport { type ComponentProps, splitProps, type ValidComponent } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * Separator.\n *\n * Renders `role=\"separator\"` with the right orientation, so a screen reader\n * understands it as a boundary rather than as an empty element. A plain\n * `<div>` with a border looks identical and announces nothing.\n */\nexport type SeparatorProps<T extends ValidComponent = 'div'> = PolymorphicProps<\n T,\n {\n class?: string\n /** Draw the line as a dashed rule. For an \"or\" between alternative paths. */\n variant?: 'solid' | 'dashed'\n orientation?: 'horizontal' | 'vertical'\n }\n>\n\nexport function Separator<T extends ValidComponent = 'div'>(props: SeparatorProps<T>) {\n const [local, rest] = splitProps(props as SeparatorProps, ['class', 'variant', 'orientation'])\n\n return (\n <KobalteSeparator\n orientation={local.orientation ?? 'horizontal'}\n class={cn(\n 'bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px',\n {\n 'border-t border-dashed border-border bg-transparent data-[orientation=horizontal]:h-0':\n local.variant === 'dashed',\n },\n local.class\n )}\n {...(rest as ComponentProps<'div'>)}\n />\n )\n}\n"],"mappings":";;;;;AAsBA,SAAgBA,YAA4CO,OAA0B;CACpF,MAAM,CAACC,OAAOC,QAAQP,WAAWK,OAAyB;EAAC;EAAS;EAAW;CAAa,CAAC;CAE7F,OAAAG,gBACGT,WAAgBU,WAAA;EAAA,IACfL,cAAW;GAAA,OAAEE,MAAMF,eAAe;EAAY;EAAA,KAAA,WAAA;GAAA,OACvCH,GACL,kKACA,EACE,yFACEK,MAAMH,YAAY,SACtB,GACAG,MAAMJ,KACR;EAAC;CAAA,GACIK,IAA6B,CAAA;AAGxC"}
@@ -1 +1 @@
1
- {"version":3,"file":"sheet.js","names":["Dialog","KobalteDialog","Content","KobalteDialogContent","X","Accessor","ComponentProps","JSX","Show","splitProps","cva","VariantProps","overlayCornerClose","overlayDescription","overlayTitle","cn","DialogOverlay","createDialogLayer","DialogEscapeTarget","sheetVariants","variants","side","top","bottom","start","end","variant","edge","inset","size","default","panel","compoundVariants","class","defaultVariants","sheetVariantFor","SheetContentProps","closeButton","Element","closeLabel","restoreFocusRef","HTMLElement","SheetContent","props","local","rest","layer","onOpenAutoFocus","event","onCloseAutoFocus","_$createComponent","Portal","children","when","_$mergeProps","data-variant","onEscapeKeyDown","_$memo","CloseButton","aria-label","tabindex","Root","Sheet","Trigger","SheetTrigger","SheetCloseButton","SheetHeader","band","_el$","_tmpl$","_$spread","SheetBody","_el$2","_tmpl$2","SheetFooter","_el$3","_tmpl$3","SheetTitle","Title","SheetDescription","Description","_$createComponent","KobalteDialog","KobalteDialogContent","_$mergeProps","_$memo"],"sources":["../../../../src/components/ui/sheet/sheet.tsx"],"sourcesContent":["import { Dialog as KobalteDialog, Content as KobalteDialogContent } from '@kobalte/core/dialog'\n// AlertDialog shares DialogRoot.Content; Sheet uses the stable named primitive.\nimport { X } from 'lucide-solid'\nimport type { Accessor, ComponentProps, JSX } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { cva, type VariantProps } from '#lib/variants'\nimport { overlayCornerClose, overlayDescription, overlayTitle } from '#lib/overlay'\nimport { cn } from '#lib/utils'\nimport { DialogOverlay } from '../dialog'\nimport { createDialogLayer, DialogEscapeTarget } from '../dialog/dialog-layer'\n\n/**\n * Sheet.\n *\n * A dialog anchored to an edge of the window rather than centred. Use it when\n * the content is a *panel beside* the work — a details inspector, a filter rail,\n * a settings flyout — so the user keeps the context it belongs to in view.\n * A centred dialog interrupts; a sheet is inspected.\n *\n * `side` decides which edge; the panel is a full-height column for `start` and\n * `end`, and a full-width row for `top` and `bottom`. The slide-in direction\n * follows from the side, so a caller never pairs them by hand.\n *\n * `variant` decides how it meets that edge. `inset` — the default for `end` —\n * docks the panel inside the main view: below the top bar, one equal gap from\n * the top bar, the end edge and the bottom, with no scrim, so the work it edits\n * stays visible and the top bar stays reachable. It is the shape for editing one\n * thing beside its context (appearance settings, a task, a record). `edge` runs\n * edge to edge over a scrim — the shape of a navigation drawer, and the default\n * for every other side.\n *\n * Its parts read alike everywhere: `SheetHeader` holds a heading, a description\n * and a full-width rule beneath, with the close button in the corner;\n * `SheetBody` scrolls on its own; `SheetFooter` is a full-width band that holds\n * the decision. Pass `band` to the header, the footer, or both to step those\n * parts onto the ladder's subtle-fill rung (see `SheetFooter`).\n *\n * Like every dialog, a sheet returns focus on close to the element focused\n * before it opened. Pass `restoreFocusRef` when a stable external opener must\n * be used instead, such as when another layer closes before the sheet opens.\n */\n// `overflow-clip`, not `overflow-hidden`: a hidden overflow can still be\n// scrolled programmatically (focus, scrollIntoView, scrollTop), which slid the\n// pinned footer out of view. Only SheetBody scrolls.\nconst sheetVariants = cva(\n 'bg-background text-foreground fixed z-(--z-dialog) flex flex-col overflow-clip border-border shadow-lg',\n {\n variants: {\n side: {\n top: 'data-expanded:slide-in-from-top data-closed:slide-out-to-top',\n bottom: 'data-expanded:slide-in-from-bottom data-closed:slide-out-to-bottom',\n start: 'data-expanded:slide-in-from-left data-closed:slide-out-to-left',\n end: 'data-expanded:slide-in-from-right data-closed:slide-out-to-right',\n },\n variant: {\n edge: '',\n inset: 'panel-dialog-inset w-lg rounded-xl border',\n },\n /**\n * `panel` gives a start or end sheet the shell's panel width\n * (`--panel-width`, 390px) — the width a pane that collapses into a sheet\n * on a narrow window already had beside the work, so its content does not\n * reflow when it moves. Top and bottom sheets span the window either way.\n */\n size: {\n default: '',\n panel: '',\n },\n },\n compoundVariants: [\n {\n side: 'top',\n variant: 'edge',\n class: 'inset-x-0 top-0 h-auto max-h-[85vh] rounded-b-xl border-b',\n },\n {\n side: 'bottom',\n variant: 'edge',\n class: 'inset-x-0 bottom-0 h-auto max-h-[85vh] rounded-t-xl border-t',\n },\n {\n side: 'start',\n variant: 'edge',\n class: 'inset-y-0 start-0 h-full w-80 max-w-[85vw] rounded-e-xl border-e',\n },\n {\n side: 'end',\n variant: 'edge',\n class: 'inset-y-0 end-0 h-full w-80 max-w-[85vw] rounded-s-xl border-s',\n },\n {\n side: ['start', 'end'],\n variant: 'edge',\n size: 'panel',\n class: 'w-panel max-w-[92vw]',\n },\n { side: ['start', 'end'], variant: 'inset', size: 'panel', class: 'w-panel' },\n ],\n defaultVariants: { side: 'end', variant: 'edge', size: 'default' },\n }\n)\n\n/** `inset` for the end edge, `edge` for every other side, unless the caller says. */\nconst sheetVariantFor = (\n side: SheetContentProps['side'],\n variant: SheetContentProps['variant']\n): 'edge' | 'inset' => variant ?? ((side ?? 'end') === 'end' ? 'inset' : 'edge')\n\nexport type SheetContentProps = ComponentProps<typeof KobalteDialogContent> &\n VariantProps<typeof sheetVariants> & {\n closeButton?: JSX.Element | false\n /** The close button's accessible name. Defaults to \"Close\". */\n closeLabel?: string\n /** Supplies the stable external element to focus when the controlled sheet closes. */\n restoreFocusRef?: Accessor<HTMLElement | undefined>\n }\n\nexport function SheetContent(props: SheetContentProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'side',\n 'variant',\n 'size',\n 'children',\n 'closeButton',\n 'closeLabel',\n 'restoreFocusRef',\n 'onOpenAutoFocus',\n 'onCloseAutoFocus',\n ])\n const layer = createDialogLayer({\n restoreFocusRef: local.restoreFocusRef,\n onOpenAutoFocus: (event) => local.onOpenAutoFocus?.(event),\n onCloseAutoFocus: (event) => local.onCloseAutoFocus?.(event),\n })\n\n const variant = () => sheetVariantFor(local.side, local.variant)\n\n return (\n <KobalteDialog.Portal>\n {/* An inset panel is beside the work, so the work stays in view: no scrim.\n It is still modal — focus stays inside and an outside click dismisses. */}\n <Show when={variant() === 'edge'}>\n <DialogOverlay />\n </Show>\n <KobalteDialogContent\n data-variant={variant()}\n class={cn(\n sheetVariants({ side: local.side, variant: variant(), size: local.size }),\n 'data-expanded:animate-in data-expanded:fade-in-0 data-expanded:duration-200',\n 'data-closed:animate-out data-closed:fade-out-0 data-closed:duration-150',\n local.class\n )}\n {...rest}\n onOpenAutoFocus={layer.onOpenAutoFocus}\n onCloseAutoFocus={layer.onCloseAutoFocus}\n >\n <DialogEscapeTarget onEscapeKeyDown={props.onEscapeKeyDown}>\n {local.children}\n <Show when={local.closeButton !== false}>\n {/* The close action opts into the tab order explicitly. Engines that\n derive tabbability from the DOM instead of the host (Playwright's\n WebKit walks only explicit tabindex and form controls) would skip\n an implicitly-tabbable button and jump past the sheet's end. */}\n <KobalteDialog.CloseButton\n aria-label={local.closeLabel ?? 'Close'}\n tabindex=\"0\"\n class={overlayCornerClose}\n >\n {local.closeButton ?? <X class=\"size-4\" />}\n </KobalteDialog.CloseButton>\n </Show>\n </DialogEscapeTarget>\n </KobalteDialogContent>\n </KobalteDialog.Portal>\n )\n}\n\nexport { Root as Sheet, Trigger as SheetTrigger } from '@kobalte/core/dialog'\n\nexport function SheetCloseButton(props: ComponentProps<typeof KobalteDialog.CloseButton>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteDialog.CloseButton class={cn(local.class)} {...rest} />\n}\n\n/**\n * The sheet's title band: a heading, a description and the full-width rule\n * beneath, with the close button in the corner. `band` steps the band onto the\n * subtle-fill rung (see `SheetFooter`) — the two-toned anatomy of a sheet that\n * reads as a panel beside the work rather than one flat canvas.\n */\nexport function SheetHeader(props: ComponentProps<'div'> & { band?: boolean }) {\n const [local, rest] = splitProps(props, ['class', 'band'])\n return (\n <div\n data-slot=\"sheet-header\"\n class={cn(\n 'flex shrink-0 flex-col gap-1.5 border-b border-border p-4 pe-12 text-start',\n { 'bg-muted': local.band },\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function SheetBody(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"sheet-body\"\n class={cn('min-h-0 flex-1 overflow-y-auto p-4', local.class)}\n {...rest}\n />\n )\n}\n\n/**\n * The sheet's decision band: a full-width, hairline-ruled strip that holds the\n * actions. `band` paints it with `--muted` — the elevation ladder's\n * subtle-fill rung, one step up from the panel's `--background` — so the sheet\n * reads two-toned: title band and decision band on the raised rung, scrolling\n * body on the panel surface. The rung already exists for cards, sidebars and\n * input fills; this is the panel-shaped overlay family claiming it. Opt-in\n * because the flat panel is the documented default: the centred modal\n * separates with veil, hairline and shadow instead (the elevated overlay rung\n * amplifies the canvas chroma, which reads as a cast across a large panel),\n * and a host opts a whole sheet family in by passing the prop where it composes\n * the parts — not by restyling them from the outside.\n */\nexport function SheetFooter(props: ComponentProps<'div'> & { band?: boolean }) {\n const [local, rest] = splitProps(props, ['class', 'band'])\n return (\n <div\n data-slot=\"sheet-footer\"\n class={cn(\n 'flex shrink-0 flex-wrap items-center justify-end gap-2 border-t border-border bg-background px-4 py-3',\n { 'bg-muted': local.band },\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function SheetTitle(props: ComponentProps<typeof KobalteDialog.Title>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteDialog.Title class={cn(overlayTitle, local.class)} {...rest} />\n}\n\nexport function SheetDescription(props: ComponentProps<typeof KobalteDialog.Description>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteDialog.Description class={cn(overlayDescription, local.class)} {...rest} />\n}\n\nexport { sheetVariants }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,IAAMmB,gBAAgBT,IACpB,0GACA;CACEU,UAAU;EACRC,MAAM;GACJC,KAAK;GACLC,QAAQ;GACRC,OAAO;GACPC,KAAK;EACP;EACAC,SAAS;GACPC,MAAM;GACNC,OAAO;EACT;;;;;;;EAOAC,MAAM;GACJC,SAAS;GACTC,OAAO;EACT;CACF;CACAC,kBAAkB;EAChB;GACEX,MAAM;GACNK,SAAS;GACTO,OAAO;EACT;EACA;GACEZ,MAAM;GACNK,SAAS;GACTO,OAAO;EACT;EACA;GACEZ,MAAM;GACNK,SAAS;GACTO,OAAO;EACT;EACA;GACEZ,MAAM;GACNK,SAAS;GACTO,OAAO;EACT;EACA;GACEZ,MAAM,CAAC,SAAS,KAAK;GACrBK,SAAS;GACTG,MAAM;GACNI,OAAO;EACT;EACA;GAAEZ,MAAM,CAAC,SAAS,KAAK;GAAGK,SAAS;GAASG,MAAM;GAASI,OAAO;EAAU;CAAC;CAE/EC,iBAAiB;EAAEb,MAAM;EAAOK,SAAS;EAAQG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AAA,OAAA,KAAA;EAAA,OAAA2B;CAAA,EAAA,CAAA;AAGd;;;;;;;;;;;;;;AAeA,SAAgBE,YAAY/B,OAAmD;CAC7E,MAAM,CAACC,OAAOC,QAAQpC,WAAWkC,OAAO,CAAC,SAAS,MAAM,CAAC;CACzD,cAAA;EAAA,IAAAgC,QAAAC,QAAA;EAAAN,OAAAK,OAAArB,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWvC,GACL,yGACA,EAAE,YAAY6B,MAAMuB,KAAK,GACzBvB,MAAMX,KACR;EAAC,EAAA,GACGY,IAAI,GAAA,OAAA,KAAA;EAAA,OAAA8B;CAAA,EAAA,CAAA;AAGd;AAEA,SAAgBE,WAAWlC,OAAmD;CAC5E,MAAM,CAACC,OAAOC,QAAQpC,WAAWkC,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAO,gBAAQjD,OAAc6E,OAAKxB,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQvC,GAAGD,cAAc8B,MAAMX,KAAK;CAAC,EAAA,GAAMY,IAAI,CAAA;AAC5E;AAEA,SAAgBkC,iBAAiBpC,OAAyD;CACxF,MAAM,CAACC,OAAOC,QAAQpC,WAAWkC,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAO,gBAAQjD,OAAc+E,aAAW1B,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQvC,GAAGF,oBAAoB+B,MAAMX,KAAK;CAAC,EAAA,GAAMY,IAAI,CAAA;AACxF"}
1
+ {"version":3,"file":"sheet.js","names":["KobalteDialog","KobalteDialogContent","X","Show","splitProps","cva","overlayCornerClose","overlayDescription","overlayTitle","cn","DialogOverlay","createDialogLayer","DialogEscapeTarget","sheetVariants","variants","side","top","bottom","start","end","variant","edge","inset","size","default","panel","compoundVariants","class","defaultVariants","sheetVariantFor","closeButton","closeLabel","restoreFocusRef","SheetContent","props","local","rest","layer","onOpenAutoFocus","event","onCloseAutoFocus","_$createComponent","Portal","children","when","_$mergeProps","onEscapeKeyDown","_$memo","CloseButton","tabindex","SheetCloseButton","SheetHeader","band","_el$","_tmpl$","_$spread","SheetBody","_el$2","_tmpl$2","SheetFooter","_el$3","_tmpl$3","SheetTitle","Title","SheetDescription","Description"],"sources":["../../../../src/components/ui/sheet/sheet.tsx"],"sourcesContent":["import { Dialog as KobalteDialog, Content as KobalteDialogContent } from '@kobalte/core/dialog'\n// AlertDialog shares DialogRoot.Content; Sheet uses the stable named primitive.\nimport { X } from 'lucide-solid'\nimport type { Accessor, ComponentProps, JSX } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { cva, type VariantProps } from '#lib/variants'\nimport { overlayCornerClose, overlayDescription, overlayTitle } from '#lib/overlay'\nimport { cn } from '#lib/utils'\nimport { DialogOverlay } from '../dialog'\nimport { createDialogLayer, DialogEscapeTarget } from '../dialog/dialog-layer'\n\n/**\n * Sheet.\n *\n * A dialog anchored to an edge of the window rather than centred. Use it when\n * the content is a *panel beside* the work — a details inspector, a filter rail,\n * a settings flyout — so the user keeps the context it belongs to in view.\n * A centred dialog interrupts; a sheet is inspected.\n *\n * `side` decides which edge; the panel is a full-height column for `start` and\n * `end`, and a full-width row for `top` and `bottom`. The slide-in direction\n * follows from the side, so a caller never pairs them by hand.\n *\n * `variant` decides how it meets that edge. `inset` — the default for `end` —\n * docks the panel inside the main view: below the top bar, one equal gap from\n * the top bar, the end edge and the bottom, with no scrim, so the work it edits\n * stays visible and the top bar stays reachable. It is the shape for editing one\n * thing beside its context (appearance settings, a task, a record). `edge` runs\n * edge to edge over a scrim — the shape of a navigation drawer, and the default\n * for every other side.\n *\n * Its parts read alike everywhere: `SheetHeader` holds a heading, a description\n * and a full-width rule beneath, with the close button in the corner;\n * `SheetBody` scrolls on its own; `SheetFooter` is a full-width band that holds\n * the decision. Pass `band` to the header, the footer, or both to step those\n * parts onto the ladder's subtle-fill rung (see `SheetFooter`).\n *\n * Like every dialog, a sheet returns focus on close to the element focused\n * before it opened. Pass `restoreFocusRef` when a stable external opener must\n * be used instead, such as when another layer closes before the sheet opens.\n */\n// `overflow-clip`, not `overflow-hidden`: a hidden overflow can still be\n// scrolled programmatically (focus, scrollIntoView, scrollTop), which slid the\n// pinned footer out of view. Only SheetBody scrolls.\nconst sheetVariants = cva(\n 'bg-background text-foreground fixed z-(--z-dialog) flex flex-col overflow-clip border-border shadow-lg',\n {\n variants: {\n side: {\n top: 'data-expanded:slide-in-from-top data-closed:slide-out-to-top',\n bottom: 'data-expanded:slide-in-from-bottom data-closed:slide-out-to-bottom',\n start: 'data-expanded:slide-in-from-left data-closed:slide-out-to-left',\n end: 'data-expanded:slide-in-from-right data-closed:slide-out-to-right',\n },\n variant: {\n edge: '',\n inset: 'panel-dialog-inset w-lg rounded-xl border',\n },\n /**\n * `panel` gives a start or end sheet the shell's panel width\n * (`--panel-width`, 390px) — the width a pane that collapses into a sheet\n * on a narrow window already had beside the work, so its content does not\n * reflow when it moves. Top and bottom sheets span the window either way.\n */\n size: {\n default: '',\n panel: '',\n },\n },\n compoundVariants: [\n {\n side: 'top',\n variant: 'edge',\n class: 'inset-x-0 top-0 h-auto max-h-[85vh] rounded-b-xl border-b',\n },\n {\n side: 'bottom',\n variant: 'edge',\n class: 'inset-x-0 bottom-0 h-auto max-h-[85vh] rounded-t-xl border-t',\n },\n {\n side: 'start',\n variant: 'edge',\n class: 'inset-y-0 start-0 h-full w-80 max-w-[85vw] rounded-e-xl border-e',\n },\n {\n side: 'end',\n variant: 'edge',\n class: 'inset-y-0 end-0 h-full w-80 max-w-[85vw] rounded-s-xl border-s',\n },\n {\n side: ['start', 'end'],\n variant: 'edge',\n size: 'panel',\n class: 'w-panel max-w-[92vw]',\n },\n { side: ['start', 'end'], variant: 'inset', size: 'panel', class: 'w-panel' },\n ],\n defaultVariants: { side: 'end', variant: 'edge', size: 'default' },\n }\n)\n\n/** `inset` for the end edge, `edge` for every other side, unless the caller says. */\nconst sheetVariantFor = (\n side: SheetContentProps['side'],\n variant: SheetContentProps['variant']\n): 'edge' | 'inset' => variant ?? ((side ?? 'end') === 'end' ? 'inset' : 'edge')\n\nexport type SheetContentProps = ComponentProps<typeof KobalteDialogContent> &\n VariantProps<typeof sheetVariants> & {\n closeButton?: JSX.Element | false\n /** The close button's accessible name. Defaults to \"Close\". */\n closeLabel?: string\n /** Supplies the stable external element to focus when the controlled sheet closes. */\n restoreFocusRef?: Accessor<HTMLElement | undefined>\n }\n\nexport function SheetContent(props: SheetContentProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'side',\n 'variant',\n 'size',\n 'children',\n 'closeButton',\n 'closeLabel',\n 'restoreFocusRef',\n 'onOpenAutoFocus',\n 'onCloseAutoFocus',\n ])\n const layer = createDialogLayer({\n restoreFocusRef: local.restoreFocusRef,\n onOpenAutoFocus: (event) => local.onOpenAutoFocus?.(event),\n onCloseAutoFocus: (event) => local.onCloseAutoFocus?.(event),\n })\n\n const variant = () => sheetVariantFor(local.side, local.variant)\n\n return (\n <KobalteDialog.Portal>\n {/* An inset panel is beside the work, so the work stays in view: no scrim.\n It is still modal — focus stays inside and an outside click dismisses. */}\n <Show when={variant() === 'edge'}>\n <DialogOverlay />\n </Show>\n <KobalteDialogContent\n data-variant={variant()}\n class={cn(\n sheetVariants({ side: local.side, variant: variant(), size: local.size }),\n 'data-expanded:animate-in data-expanded:fade-in-0 data-expanded:duration-200',\n 'data-closed:animate-out data-closed:fade-out-0 data-closed:duration-150',\n local.class\n )}\n {...rest}\n onOpenAutoFocus={layer.onOpenAutoFocus}\n onCloseAutoFocus={layer.onCloseAutoFocus}\n >\n <DialogEscapeTarget onEscapeKeyDown={props.onEscapeKeyDown}>\n {local.children}\n <Show when={local.closeButton !== false}>\n {/* The close action opts into the tab order explicitly. Engines that\n derive tabbability from the DOM instead of the host (Playwright's\n WebKit walks only explicit tabindex and form controls) would skip\n an implicitly-tabbable button and jump past the sheet's end. */}\n <KobalteDialog.CloseButton\n aria-label={local.closeLabel ?? 'Close'}\n tabindex=\"0\"\n class={overlayCornerClose}\n >\n {local.closeButton ?? <X class=\"size-4\" />}\n </KobalteDialog.CloseButton>\n </Show>\n </DialogEscapeTarget>\n </KobalteDialogContent>\n </KobalteDialog.Portal>\n )\n}\n\nexport { Root as Sheet, Trigger as SheetTrigger } from '@kobalte/core/dialog'\n\nexport function SheetCloseButton(props: ComponentProps<typeof KobalteDialog.CloseButton>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteDialog.CloseButton class={cn(local.class)} {...rest} />\n}\n\n/**\n * The sheet's title band: a heading, a description and the full-width rule\n * beneath, with the close button in the corner. `band` steps the band onto the\n * subtle-fill rung (see `SheetFooter`) — the two-toned anatomy of a sheet that\n * reads as a panel beside the work rather than one flat canvas.\n */\nexport function SheetHeader(props: ComponentProps<'div'> & { band?: boolean }) {\n const [local, rest] = splitProps(props, ['class', 'band'])\n return (\n <div\n data-slot=\"sheet-header\"\n class={cn(\n 'flex shrink-0 flex-col gap-1.5 border-b border-border p-4 pe-12 text-start',\n { 'bg-muted': local.band },\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function SheetBody(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"sheet-body\"\n class={cn('min-h-0 flex-1 overflow-y-auto p-4', local.class)}\n {...rest}\n />\n )\n}\n\n/**\n * The sheet's decision band: a full-width, hairline-ruled strip that holds the\n * actions. `band` paints it with `--muted` — the elevation ladder's\n * subtle-fill rung, one step up from the panel's `--background` — so the sheet\n * reads two-toned: title band and decision band on the raised rung, scrolling\n * body on the panel surface. The rung already exists for cards, sidebars and\n * input fills; this is the panel-shaped overlay family claiming it. Opt-in\n * because the flat panel is the documented default: the centred modal\n * separates with veil, hairline and shadow instead (the elevated overlay rung\n * amplifies the canvas chroma, which reads as a cast across a large panel),\n * and a host opts a whole sheet family in by passing the prop where it composes\n * the parts — not by restyling them from the outside.\n */\nexport function SheetFooter(props: ComponentProps<'div'> & { band?: boolean }) {\n const [local, rest] = splitProps(props, ['class', 'band'])\n return (\n <div\n data-slot=\"sheet-footer\"\n class={cn(\n 'flex shrink-0 flex-wrap items-center justify-end gap-2 border-t border-border bg-background px-4 py-3',\n { 'bg-muted': local.band },\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function SheetTitle(props: ComponentProps<typeof KobalteDialog.Title>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteDialog.Title class={cn(overlayTitle, local.class)} {...rest} />\n}\n\nexport function SheetDescription(props: ComponentProps<typeof KobalteDialog.Description>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteDialog.Description class={cn(overlayDescription, local.class)} {...rest} />\n}\n\nexport { sheetVariants }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,IAAMa,gBAAgBR,IACpB,0GACA;CACES,UAAU;EACRC,MAAM;GACJC,KAAK;GACLC,QAAQ;GACRC,OAAO;GACPC,KAAK;EACP;EACAC,SAAS;GACPC,MAAM;GACNC,OAAO;EACT;;;;;;;EAOAC,MAAM;GACJC,SAAS;GACTC,OAAO;EACT;CACF;CACAC,kBAAkB;EAChB;GACEX,MAAM;GACNK,SAAS;GACTO,OAAO;EACT;EACA;GACEZ,MAAM;GACNK,SAAS;GACTO,OAAO;EACT;EACA;GACEZ,MAAM;GACNK,SAAS;GACTO,OAAO;EACT;EACA;GACEZ,MAAM;GACNK,SAAS;GACTO,OAAO;EACT;EACA;GACEZ,MAAM,CAAC,SAAS,KAAK;GACrBK,SAAS;GACTG,MAAM;GACNI,OAAO;EACT;EACA;GAAEZ,MAAM,CAAC,SAAS,KAAK;GAAGK,SAAS;GAASG,MAAM;GAASI,OAAO;EAAU;CAAC;CAE/EC,iBAAiB;EAAEb,MAAM;EAAOK,SAAS;EAAQG,MAAM;CAAU;AACnE,CACF;;AAGA,IAAMM,mBACJd,MACAK,YACqBA,aAAaL,QAAQ,WAAW,QAAQ,UAAU;AAWzE,SAAgBkB,aAAaC,OAA0B;CACrD,MAAM,CAACC,OAAOC,QAAQhC,W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MAAM,CAAC;CACzD,cAAA;EAAA,IAAA0B,QAAAC,QAAA;EAAAN,OAAAK,OAAAf,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWpC,GACL,yGACA,EAAE,YAAY0B,MAAMiB,KAAK,GACzBjB,MAAMR,KACR;EAAC,EAAA,GACGS,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAwB;CAAA,EAAA,CAAA;AAGd;AAEA,SAAgBE,WAAW5B,OAAmD;CAC5E,MAAM,CAACC,OAAOC,QAAQhC,WAAW8B,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAO,gBAAQzC,OAAc+D,OAAKlB,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQpC,GAAGD,cAAc2B,MAAMR,KAAK;CAAC,EAAA,GAAMS,IAAI,CAAA;AAC5E;AAEA,SAAgB4B,iBAAiB9B,OAAyD;CACxF,MAAM,CAACC,OAAOC,QAAQhC,WAAW8B,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAO,gBAAQzC,OAAciE,aAAWpB,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQpC,GAAGF,oBAAoB4B,MAAMR,KAAK;CAAC,EAAA,GAAMS,IAAI,CAAA;AACxF"}
@@ -1 +1 @@
1
- {"version":3,"file":"skeleton.js","names":["ComponentProps","splitProps","cn","Skeleton","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class","_$mergeProps"],"sources":["../../../../src/components/ui/skeleton/skeleton.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * Skeleton.\n *\n * A placeholder that stands in for content whose shape is already known. It\n * carries `aria-hidden` and no text, because the loading state is announced by\n * the region that owns it — a skeleton that says \"loading\" would announce it\n * once per bar.\n *\n * The shimmer is a background animation rather than a moving gradient element\n * so it costs one paint and no layout, and it stops under `prefers-reduced-motion`\n * (base.css).\n */\nexport function Skeleton(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <div\n data-slot=\"skeleton\"\n aria-hidden=\"true\"\n class={cn('bg-muted animate-shimmer rounded-md', local.class)}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAgBA,SAAgBG,SAASC,OAA8B;CACrD,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO,CAAC,OAAO,CAAC;CAEjD,cAAA;EAAA,IAAAG,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA,EAAA,KAAA,WAAA;GAAA,OAIWR,GAAG,uCAAuCG,MAAMM,KAAK;EAAC,EAAA,GACzDL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAC;CAAA,EAAA,CAAA;AAGd"}
1
+ {"version":3,"file":"skeleton.js","names":["splitProps","cn","Skeleton","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class"],"sources":["../../../../src/components/ui/skeleton/skeleton.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * Skeleton.\n *\n * A placeholder that stands in for content whose shape is already known. It\n * carries `aria-hidden` and no text, because the loading state is announced by\n * the region that owns it — a skeleton that says \"loading\" would announce it\n * once per bar.\n *\n * The shimmer is a background animation rather than a moving gradient element\n * so it costs one paint and no layout, and it stops under `prefers-reduced-motion`\n * (base.css).\n */\nexport function Skeleton(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <div\n data-slot=\"skeleton\"\n aria-hidden=\"true\"\n class={cn('bg-muted animate-shimmer rounded-md', local.class)}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAgBA,SAAgBE,SAASC,OAA8B;CACrD,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO,CAAC,OAAO,CAAC;CAEjD,cAAA;EAAA,IAAAG,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA,EAAA,KAAA,WAAA;GAAA,OAIWR,GAAG,uCAAuCG,MAAMM,KAAK;EAAC,EAAA,GACzDL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAC;CAAA,EAAA,CAAA;AAGd"}
@@ -1 +1 @@
1
- {"version":3,"file":"slider.js","names":["Slider","KobalteSlider","ComponentProps","For","Show","createUniqueId","createRenderEffect","splitProps","cn","SliderProps","thumbLabels","trackClass","rangeClass","thumbClass","valueLabel","props","inputId","local","rest","_$createComponent","_$mergeProps","class","children","Track","Fill","_$memo","each","Array","from","length","value","defaultValue","_","index","Thumb","aria-label","aria-labelledby","undefined","Input","id","ref","input","String","minValue","hidden","when","ValueLabel","Slider","_$createComponent","KobalteSlider","_$mergeProps","_$memo"],"sources":["../../../../src/components/ui/slider/slider.tsx"],"sourcesContent":["import { Slider as KobalteSlider } from '@kobalte/core/slider'\nimport type { ComponentProps } from 'solid-js'\nimport { For, Show, createUniqueId, createRenderEffect, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * Slider.\n *\n * For a value on a continuum where position matters more than precision — a\n * zoom, a volume, a threshold. When the number matters, pass `valueLabel` so\n * the value is both adjustable *and* readable; a bare slider is a control\n * nobody can set exactly.\n *\n * Kobalte handles pointer capture, keyboard stepping and the ARIA value\n * wiring; this paints the track, fill and one thumb per value. Each thumb\n * contains a form-native input, hidden from accessibility because the visible\n * thumb already exposes the slider role.\n */\nexport type SliderProps = ComponentProps<typeof KobalteSlider> & {\n /** Accessible names for individual thumbs, in value order (for example minimum and maximum). */\n thumbLabels?: readonly string[]\n trackClass?: string\n rangeClass?: string\n thumbClass?: string\n /** Show the current value beside the thumb while dragging. */\n valueLabel?: boolean\n}\n\nexport function Slider(props: SliderProps) {\n const inputId = createUniqueId()\n const [local, rest] = splitProps(props, [\n 'class',\n 'trackClass',\n 'rangeClass',\n 'thumbClass',\n 'thumbLabels',\n 'valueLabel',\n 'children',\n 'aria-label',\n 'aria-labelledby',\n ])\n\n return (\n <KobalteSlider\n data-slot=\"slider\"\n class={cn(\n 'relative flex touch-none flex-col justify-center select-none',\n 'data-[orientation=vertical]:h-full data-[orientation=vertical]:w-5 data-[orientation=horizontal]:w-full',\n 'data-[disabled]:opacity-50',\n local.class\n )}\n {...rest}\n >\n <KobalteSlider.Track\n class={cn(\n 'bg-input relative grow overflow-hidden rounded-full',\n 'data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full',\n 'data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5',\n local.trackClass\n )}\n >\n <KobalteSlider.Fill\n class={cn(\n 'bg-primary absolute rounded-full',\n 'data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full',\n local.rangeClass\n )}\n />\n </KobalteSlider.Track>\n {local.children}\n <For\n each={Array.from(\n { length: (props.value ?? props.defaultValue ?? [0]).length },\n (_, index) => index\n )}\n >\n {(index) => (\n <KobalteSlider.Thumb\n aria-label={local.thumbLabels?.[index] ?? local['aria-label']}\n aria-labelledby={local.thumbLabels?.[index] ? undefined : local['aria-labelledby']}\n class={cn(\n 'border-primary bg-background block size-4 shrink-0 rounded-full border-2 shadow-xs',\n 'transition-[color,box-shadow] ease-out outline-none',\n 'hover:ring-4 hover:ring-primary-subtle',\n 'focus-visible:ring-4 focus-visible:ring-primary-subtle',\n local.thumbClass\n )}\n >\n {/* Native reset uses the value property’s default, not an HTML defaultValue attribute. */}\n <KobalteSlider.Input\n id={`slider-${inputId}-${index}`}\n ref={(input) => {\n createRenderEffect(() => {\n input.defaultValue = String(\n props.defaultValue?.[index] ?? props.value?.[index] ?? props.minValue ?? 0\n )\n })\n }}\n hidden\n aria-hidden=\"true\"\n />\n <Show when={local.valueLabel}>\n <KobalteSlider.ValueLabel class=\"bg-popover text-popover-foreground absolute -top-6 left-1/2 -translate-x-1/2 rounded-sm border border-border px-1 text-2xs tabular-nums\" />\n </Show>\n </KobalteSlider.Thumb>\n )}\n </For>\n </KobalteSlider>\n )\n}\n"],"mappings":";;;;;AA4BA,SAAgBA,SAAOe,OAAoB;CACzC,MAAMC,UA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AMgB,eAAeE,UAAUlB,MAAMe,QAAQG,UAAUlB,MAAM4B,YAAY,CAC3E;QACF,CAAC;OACH;OACAC,QAAM;OAAA,eAAA;MAAA,CAAA,GAAAzB,gBAGPf,MAAI;OAAA,IAACyC,OAAI;QAAA,OAAE5B,MAAMH;OAAU;OAAA,IAAAQ,WAAA;QAAA,OAAAH,gBACzBlB,OAAc6C,YAAU,EAAA,SAAA,0IAAA,CAAA;OAAA;MAAA,CAAA,CAAA;KAAA;IAAA,CAAA;GAG9B,CAAA;EAAA;CAAA,EAAA,CAAA,CAAA;AAIT"}
1
+ {"version":3,"file":"slider.js","names":["Slider","KobalteSlider","For","Show","createUniqueId","createRenderEffect","splitProps","cn","thumbLabels","trackClass","rangeClass","thumbClass","valueLabel","props","inputId","local","rest","_$createComponent","_$mergeProps","class","children","Track","Fill","_$memo","each","Array","from","length","value","defaultValue","_","index","Thumb","undefined","Input","id","ref","input","String","minValue","hidden","when","ValueLabel"],"sources":["../../../../src/components/ui/slider/slider.tsx"],"sourcesContent":["import { Slider as KobalteSlider } from '@kobalte/core/slider'\nimport type { ComponentProps } from 'solid-js'\nimport { For, Show, createUniqueId, createRenderEffect, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * Slider.\n *\n * For a value on a continuum where position matters more than precision — a\n * zoom, a volume, a threshold. When the number matters, pass `valueLabel` so\n * the value is both adjustable *and* readable; a bare slider is a control\n * nobody can set exactly.\n *\n * Kobalte handles pointer capture, keyboard stepping and the ARIA value\n * wiring; this paints the track, fill and one thumb per value. Each thumb\n * contains a form-native input, hidden from accessibility because the visible\n * thumb already exposes the slider role.\n */\nexport type SliderProps = ComponentProps<typeof KobalteSlider> & {\n /** Accessible names for individual thumbs, in value order (for example minimum and maximum). */\n thumbLabels?: readonly string[]\n trackClass?: string\n rangeClass?: string\n thumbClass?: string\n /** Show the current value beside the thumb while dragging. */\n valueLabel?: boolean\n}\n\nexport function Slider(props: SliderProps) {\n const inputId = createUniqueId()\n const [local, rest] = splitProps(props, [\n 'class',\n 'trackClass',\n 'rangeClass',\n 'thumbClass',\n 'thumbLabels',\n 'valueLabel',\n 'children',\n 'aria-label',\n 'aria-labelledby',\n ])\n\n return (\n <KobalteSlider\n data-slot=\"slider\"\n class={cn(\n 'relative flex touch-none flex-col justify-center select-none',\n 'data-[orientation=vertical]:h-full data-[orientation=vertical]:w-5 data-[orientation=horizontal]:w-full',\n 'data-[disabled]:opacity-50',\n local.class\n )}\n {...rest}\n >\n <KobalteSlider.Track\n class={cn(\n 'bg-input relative grow overflow-hidden rounded-full',\n 'data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full',\n 'data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5',\n local.trackClass\n )}\n >\n <KobalteSlider.Fill\n class={cn(\n 'bg-primary absolute rounded-full',\n 'data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full',\n local.rangeClass\n )}\n />\n </KobalteSlider.Track>\n {local.children}\n <For\n each={Array.from(\n { length: (props.value ?? props.defaultValue ?? [0]).length },\n (_, index) => index\n )}\n >\n {(index) => (\n <KobalteSlider.Thumb\n aria-label={local.thumbLabels?.[index] ?? local['aria-label']}\n aria-labelledby={local.thumbLabels?.[index] ? undefined : local['aria-labelledby']}\n class={cn(\n 'border-primary bg-background block size-4 shrink-0 rounded-full border-2 shadow-xs',\n 'transition-[color,box-shadow] ease-out outline-none',\n 'hover:ring-4 hover:ring-primary-subtle',\n 'focus-visible:ring-4 focus-visible:ring-primary-subtle',\n local.thumbClass\n )}\n >\n {/* Native reset uses the value property’s default, not an HTML defaultValue attribute. */}\n <KobalteSlider.Input\n id={`slider-${inputId}-${index}`}\n ref={(input) => {\n createRenderEffect(() => {\n input.defaultValue = String(\n props.defaultValue?.[index] ?? props.value?.[index] ?? props.minValue ?? 0\n )\n })\n }}\n hidden\n aria-hidden=\"true\"\n />\n <Show when={local.valueLabel}>\n <KobalteSlider.ValueLabel class=\"bg-popover text-popover-foreground absolute -top-6 left-1/2 -translate-x-1/2 rounded-sm border border-border px-1 text-2xs tabular-nums\" />\n </Show>\n </KobalteSlider.Thumb>\n )}\n </For>\n </KobalteSlider>\n )\n}\n"],"mappings":";;;;;AA4BA,SAAgBA,SAAOa,OAAoB;CACzC,MAAMC,UAAUV,eAAe;CAC/B,MAAM,CAACW,OAAOC,QAAQV,WAAWO,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAiB,CAClB;CAED,OAAAI,gBACGhB,QAAaiB,WAAA;EAAA,aAAA;EAAA,KAAA,WAAA;GAAA,OAELX,GACL,gEACA,2GACA,8BACAQ,MAAMI,KACR;EAAC;CAAA,GACGH,MAAI,EAAA,IAAAI,WAAA;EAAA,OAAA;GAAAH,gBAEPhB,OAAcoB,OAAK;IAAA,KAAA,WAAA;KAAA,OACXd,GACL,uDACA,4EACA,wEACAQ,MAAMN,UACR;IAAC;IAAA,IAAAW,WAAA;KAAA,OAAAH,gBAEAhB,OAAcqB,MAAI,EAAA,KAAA,WAAA;MAAA,OACVf,GACL,oCACA,2EACAQ,MAAML,UACR;KAAC,EAAA,CAAA;IAAA;GAAA,CAAA;GAAAa,WAGJR,MAAMK,QAAQ;GAAAH,gBACdf,KAAG;IAAA,IACFsB,OAAI;KAAA,OAAEC,MAAMC,KACV,EAAEC,SAASd,MAAMe,SAASf,MAAMgB,gBAAgB,CAAC,CAAC,EAAA,CAAGF,OAAO,IAC3DG,GAAGC,UAAUA,KAChB;IAAC;IAAAX,WAECW,UAAKd,gBACJhB,OAAc+B,OAAK;KAAA,KAAA,gBAAA;MAAA,OACNjB,MAAMP,cAAcuB,UAAUhB,MAAM;KAAa;KAAA,KAAA,qBAAA;MAAA,OAC5CQ,WAAA,CAAA,CAAAR,MAAMP,cAAcuB,MAAM,CAAA,CAAA,IAAGE,KAAAA,IAAYlB,MAAM;KAAkB;KAAA,KAAA,WAAA;MAAA,OAC3ER,GACL,sFACA,uDACA,0CACA,0DACAQ,MAAMJ,UACR;KAAC;KAAA,IAAAS,WAAA;MAAA,OAAA,CAAAH,gBAGAhB,OAAciC,OAAK;OAClBC,IAAI,UAAUrB,QAAO,GAAIiB;OAAOK,MAC1BC,UAAU;QACdhC,yBAAyB;SACvBgC,MAAMR,eAAeS,OACnBzB,MAAMgB,eAAeE,UAAUlB,MAAMe,QAAQG,UAAUlB,MAAM0B,YAAY,CAC3E;QACF,CAAC;OACH;OACAC,QAAM;OAAA,eAAA;MAAA,CAAA,GAAAvB,gBAGPd,MAAI;OAAA,IAACsC,OAAI;QAAA,OAAE1B,MAAMH;OAAU;OAAA,IAAAQ,WAAA;QAAA,OAAAH,gBACzBhB,OAAcyC,YAAU,EAAA,SAAA,0IAAA,CAAA;OAAA;MAAA,CAAA,CAAA;KAAA;IAAA,CAAA;GAG9B,CAAA;EAAA;CAAA,EAAA,CAAA,CAAA;AAIT"}
@@ -1 +1 @@
1
- {"version":3,"file":"spinner.js","names":["LoaderCircle","ComponentProps","splitProps","cva","VariantProps","cn","spinnerVariants","variants","size","xs","sm","md","lg","xl","defaultVariants","SpinnerVariants","SpinnerProps","Omit","label","Spinner","props","local","rest","_$createComponent","_$mergeProps","role","aria-label","_$memo","undefined","aria-hidden","class","_el$","_tmpl$","_$insert","_$createComponent","_$mergeProps","_$memo"],"sources":["../../../../src/components/ui/spinner/spinner.tsx"],"sourcesContent":["import { LoaderCircle } from 'lucide-solid'\nimport type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cva, type VariantProps } from '#lib/variants'\nimport { cn } from '#lib/utils'\n\n/**\n * Spinner.\n *\n * A determinate-length activity indicator with no progress to report. When\n * there *is* progress, use Progress instead — a spinner next to a known\n * percentage is a lie about what the app knows.\n *\n * The glyph spins continuously, so it is the one thing in the system that\n * keeps moving under `prefers-reduced-motion`; base.css only shortens\n * `animation-duration` for the *entrance* animations and leaves this loop\n * alone. A frozen spinner reads as a hang, which is worse than motion.\n */\nconst spinnerVariants = cva('animate-spin shrink-0', {\n variants: {\n size: {\n xs: 'size-3',\n sm: 'size-3.5',\n md: 'size-4',\n lg: 'size-5',\n xl: 'size-6',\n },\n },\n defaultVariants: { size: 'md' },\n})\n\ntype SpinnerVariants = VariantProps<typeof spinnerVariants>\n\nexport type SpinnerProps = Omit<ComponentProps<'svg'>, 'size'> &\n SpinnerVariants & {\n /** An accessible name. Defaults to \"Loading\"; pass `false` to hide it. */\n label?: string | false\n }\n\nexport function Spinner(props: SpinnerProps) {\n const [local, rest] = splitProps(props, ['class', 'size', 'label'])\n\n return (\n <>\n <LoaderCircle\n data-slot=\"spinner\"\n role=\"status\"\n aria-label={local.label === false ? undefined : (local.label ?? 'Loading')}\n aria-hidden={local.label === false ? 'true' : undefined}\n class={cn(spinnerVariants({ size: local.size }), local.class)}\n {...rest}\n />\n {local.label === false ? null : (\n <span class=\"visually-hidden\">{local.label ?? 'Loading'}</span>\n )}\n </>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAkBA,IAAMM,kBAAkBH,IAAI,yBAAyB;CACnDI,UAAU,EACRC,MAAM;EACJC,IAAI;EACJC,IAAI;EACJC,IAAI;EACJC,IAAI;EACJC,IAAI;CACN,EACF;CACAC,iBAAiB,EAAEN,MAAM,KAAK;AAChC,CAAC;AAUD,SAAgBW,QAAQC,OAAqB;CAC3C,MAAM,CAACC,OAAOC,QAAQpB,WAAWkB,OAAO;EAAC;EAAS;EAAQ;CAAO,CAAC;CAElE,OAAA,CAAAG,gBAEKvB,cAAYwB,WAAA;EAAA,aAAA;EAEXC,MAAI;EAAA,KAAA,gBAAA;GAAA,OACQE,WAAAN,MAAMH,UAAU,KAAK,CAAA,CAAA,IAAGU,KAAAA,IAAaP,MAAMH,SAAS;EAAU;EAAA,KAAA,iBAAA;GAAA,OAC7DG,MAAMH,UAAU,QAAQ,SAASU,KAAAA;EAAS;EAAA,KAAA,WAAA;GAAA,OAChDvB,GAAGC,gBAAgB,EAAEE,MAAMa,MAAMb,KAAK,CAAC,GAAGa,MAAMS,KAAK;EAAC;CAAA,GACzDR,IAAI,CAAA,GAAAK,WAETA,WAAAN,MAAMH,UAAU,KAAK,CAAA,CAAA,IAAG,cAAI;EAAA,IAAAa,OAAAC,OAAA;EAAAC,OAAAF,YACIV,MAAMH,SAAS,SAAS;EAAA,OAAAa;CAAA,EAAA,CAAA,CACxD,CAAA;AAGP"}
1
+ {"version":3,"file":"spinner.js","names":["LoaderCircle","splitProps","cva","cn","spinnerVariants","variants","size","xs","sm","md","lg","xl","defaultVariants","label","Spinner","props","local","rest","_$createComponent","_$mergeProps","role","_$memo","undefined","class","_el$","_tmpl$","_$insert"],"sources":["../../../../src/components/ui/spinner/spinner.tsx"],"sourcesContent":["import { LoaderCircle } from 'lucide-solid'\nimport type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cva, type VariantProps } from '#lib/variants'\nimport { cn } from '#lib/utils'\n\n/**\n * Spinner.\n *\n * A determinate-length activity indicator with no progress to report. When\n * there *is* progress, use Progress instead — a spinner next to a known\n * percentage is a lie about what the app knows.\n *\n * The glyph spins continuously, so it is the one thing in the system that\n * keeps moving under `prefers-reduced-motion`; base.css only shortens\n * `animation-duration` for the *entrance* animations and leaves this loop\n * alone. A frozen spinner reads as a hang, which is worse than motion.\n */\nconst spinnerVariants = cva('animate-spin shrink-0', {\n variants: {\n size: {\n xs: 'size-3',\n sm: 'size-3.5',\n md: 'size-4',\n lg: 'size-5',\n xl: 'size-6',\n },\n },\n defaultVariants: { size: 'md' },\n})\n\ntype SpinnerVariants = VariantProps<typeof spinnerVariants>\n\nexport type SpinnerProps = Omit<ComponentProps<'svg'>, 'size'> &\n SpinnerVariants & {\n /** An accessible name. Defaults to \"Loading\"; pass `false` to hide it. */\n label?: string | false\n }\n\nexport function Spinner(props: SpinnerProps) {\n const [local, rest] = splitProps(props, ['class', 'size', 'label'])\n\n return (\n <>\n <LoaderCircle\n data-slot=\"spinner\"\n role=\"status\"\n aria-label={local.label === false ? undefined : (local.label ?? 'Loading')}\n aria-hidden={local.label === false ? 'true' : undefined}\n class={cn(spinnerVariants({ size: local.size }), local.class)}\n {...rest}\n />\n {local.label === false ? null : (\n <span class=\"visually-hidden\">{local.label ?? 'Loading'}</span>\n )}\n </>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAkBA,IAAMI,kBAAkBF,IAAI,yBAAyB;CACnDG,UAAU,EACRC,MAAM;EACJC,IAAI;EACJC,IAAI;EACJC,IAAI;EACJC,IAAI;EACJC,IAAI;CACN,EACF;CACAC,iBAAiB,EAAEN,MAAM,KAAK;AAChC,CAAC;AAUD,SAAgBQ,QAAQC,OAAqB;CAC3C,MAAM,CAACC,OAAOC,QAAQhB,WAAWc,OAAO;EAAC;EAAS;EAAQ;CAAO,CAAC;CAElE,OAAA,CAAAG,gBAEKlB,cAAYmB,WAAA;EAAA,aAAA;EAEXC,MAAI;EAAA,KAAA,gBAAA;GAAA,OACQC,WAAAL,MAAMH,UAAU,KAAK,CAAA,CAAA,IAAGS,KAAAA,IAAaN,MAAMH,SAAS;EAAU;EAAA,KAAA,iBAAA;GAAA,OAC7DG,MAAMH,UAAU,QAAQ,SAASS,KAAAA;EAAS;EAAA,KAAA,WAAA;GAAA,OAChDnB,GAAGC,gBAAgB,EAAEE,MAAMU,MAAMV,KAAK,CAAC,GAAGU,MAAMO,KAAK;EAAC;CAAA,GACzDN,IAAI,CAAA,GAAAI,WAETA,WAAAL,MAAMH,UAAU,KAAK,CAAA,CAAA,IAAG,cAAI;EAAA,IAAAW,OAAAC,OAAA;EAAAC,OAAAF,YACIR,MAAMH,SAAS,SAAS;EAAA,OAAAW;CAAA,EAAA,CAAA,CACxD,CAAA;AAGP"}
@@ -1 +1 @@
1
- {"version":3,"file":"status-chip.js","names":["Show","splitProps","ComponentProps","JSX","cva","cn","Tooltip","TooltipContent","TooltipTrigger","statusDotVariants","variants","tone","neutral","success","warning","danger","info","pending","unknown","defaultVariants","labelTone","Record","StatusTone","StatusChipProps","Omit","label","compact","detail","trailing","Element","StatusChip","props","local","rest","chip","_el$","_tmpl$","_el$2","firstChild","_el$3","nextSibling","_$spread","_$mergeProps","class","_$insert","_$effect","_p$","_v$","_v$2","e","_$className","t","undefined","_$createComponent","when","fallback","children","as","StatusEntry","Readonly","id","name","StatusList","entries","_el$4","_tmpl$2","map","entry","_el$5","_tmpl$4","_el$7","_el$6","_tmpl$3","_$mergeProps","_$className","_$createComponent"],"sources":["../../../../src/components/ui/status-chip/status-chip.tsx"],"sourcesContent":["import { Show, splitProps, type ComponentProps, type JSX } from 'solid-js'\nimport { cva } from '#lib/variants'\nimport { cn } from '#lib/utils'\nimport { Tooltip, TooltipContent, TooltipTrigger } from '../tooltip'\n\n/**\n * StatusChip.\n *\n * A state, said in one word, with the reason available on hover. It exists\n * because a status readout has three parts that are always the same three parts —\n * a tone, a label, and the detail that justifies the label — and rendering them\n * ad hoc produces the two failures this component is here to prevent: a colour\n * with no text (unreadable to anyone who cannot see it) and a bare word with no\n * explanation (\"Needs configuration\" — of what?).\n *\n * The tones are deliberately not a rainbow. Seven cover what a status can actually\n * mean:\n *\n * - `neutral` — fine, and there is nothing to say about it.\n * - `success` — a check passed, a capability is ready, a job finished.\n * - `warning` — degraded, or needs a decision from the user.\n * - `danger` — blocked, failed, unrecoverable without intervention.\n * - `info` — in flight or scheduled; work is happening, nothing is wrong.\n * - `pending` — running now with no result yet (a check, a build). The ring\n * turns, so it reads as live rather than as a settled state.\n * - `unknown` — the honest absence of information.\n *\n * `unknown` is not the same as `neutral`, and collapsing them is the mistake\n * worth avoiding: \"this is idle\" and \"we have not been told yet\" are different\n * facts, and a product that shows the second as the first is lying quietly. The\n * ring is hollow so it also reads as different in greyscale.\n *\n * The dot is `aria-hidden` and the label carries the meaning, so a tone is never\n * the only signal.\n */\nexport const statusDotVariants = cva('size-2 shrink-0 rounded-full', {\n variants: {\n tone: {\n neutral: 'bg-muted-foreground',\n success: 'bg-success',\n warning: 'bg-warning',\n danger: 'bg-destructive',\n info: 'bg-info',\n pending: 'border-2 border-info border-r-transparent motion-safe:animate-spin',\n unknown: 'border border-muted-foreground bg-transparent',\n },\n },\n defaultVariants: { tone: 'neutral' },\n})\n\nconst labelTone: Record<StatusTone, string> = {\n neutral: 'text-foreground',\n success: 'text-foreground',\n warning: 'text-foreground',\n danger: 'text-foreground',\n info: 'text-foreground',\n pending: 'text-foreground',\n unknown: 'text-muted-foreground',\n}\n\nexport type StatusTone =\n | 'neutral'\n | 'success'\n | 'warning'\n | 'danger'\n | 'info'\n | 'pending'\n | 'unknown'\n\nexport type StatusChipProps = Omit<ComponentProps<'span'>, 'children'> & {\n tone?: StatusTone\n label: string\n /** Visually hide the text while preserving it for assistive technology. */\n compact?: boolean\n /** Why the status is what it is. Shown in a tooltip; omit for a self-evident label. */\n detail?: string\n /** A trailing slot: a timestamp, a retry affordance, a count. */\n trailing?: JSX.Element\n}\n\nexport function StatusChip(props: StatusChipProps) {\n const [local, rest] = splitProps(props, [\n 'tone',\n 'label',\n 'compact',\n 'detail',\n 'trailing',\n 'class',\n ])\n\n const chip = (\n <span\n data-slot=\"status-chip\"\n class={cn(\n 'inline-flex w-fit items-center gap-1.5 text-xs font-medium whitespace-nowrap',\n labelTone[local.tone ?? 'neutral'],\n local.class\n )}\n {...rest}\n >\n <span class={statusDotVariants({ tone: local.tone })} aria-hidden=\"true\" />\n <span class={cn(local.compact && 'sr-only')}>{local.label}</span>\n {local.trailing}\n </span>\n )\n\n return (\n <Show when={local.detail} fallback={chip}>\n {(detail) => (\n <Tooltip>\n <TooltipTrigger as=\"span\" class=\"inline-flex\">\n {chip}\n </TooltipTrigger>\n <TooltipContent data-slot=\"tooltip-content\">{detail()}</TooltipContent>\n </Tooltip>\n )}\n </Show>\n )\n}\n\nexport type StatusEntry = Readonly<{\n /** A stable key for the row. */\n id: string\n /** What is being reported — \"Configuration\", \"Runtime\", \"Sync\". */\n name: string\n tone: StatusTone\n label: string\n detail?: string\n}>\n\n/**\n * StatusList.\n *\n * The several-facts-about-one-thing shape: an agent with a configuration state, a\n * runtime state and an activity state; a service with a build, a deploy and a\n * health check. It is a definition list rather than a table because there is no\n * column to sort or compare — the rows are facets of a single subject, and a\n * screen reader should hear them as such.\n *\n * Fixed width on the name column is what makes a column of these scannable; the\n * rows line up without a table's semantics.\n */\nexport function StatusList(props: {\n entries: readonly StatusEntry[]\n class?: string\n /** Hide the name column and show only the chips — for a compact badge strip. */\n compact?: boolean\n}) {\n return (\n <dl class={cn('grid gap-2 text-sm', props.class)}>\n {props.entries.map((entry) => (\n <div class=\"flex items-baseline justify-between gap-4\">\n <Show when={!props.compact}>\n <dt class=\"text-muted-foreground\">{entry.name}</dt>\n </Show>\n <dd class={cn(!props.compact && 'shrink-0')}>\n <StatusChip tone={entry.tone} label={entry.label} detail={entry.detail} />\n </dd>\n </div>\n ))}\n </dl>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,IAAaS,oBAAoBL,IAAI,gCAAgC;CACnEM,UAAU,EACRC,MAAM;EACJC,SAAS;EACTC,SAAS;EACTC,SAAS;EACTC,QAAQ;EACRC,MAAM;EACNC,SAAS;EACTC,SAAS;CACX,EACF;CACAC,iBAAiB,EAAER,MAAM,UAAU;AACrC,CAAC;AAED,IAAMS,YAAwC;CAC5CR,SAAS;CACTC,SAAS;CACTC,SAAS;CACTC,QAAQ;CACRC,MAAM;CACNC,SAAS;CACTC,SAAS;AACX;AAsBA,SAAgBY,WAAWC,OAAwB;CACjD,MAAM,CAACC,OAAOC,QAAQhC,WAAW8B,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;CAAO,CACR;CAED,MAAMG,cAAI;EAAA,IAAAC,OAAAC,OAAA,GAAAC,QAAAF,KAAAG,YAAAC,QAAAF,MAAAG;EAAAC,OAAAN,MAAAO,WAAA,EAAA,KAAA,WAAA;GAAA,OAGCrC,GACL,gFACAe,UAAUY,MAAMrB,QAAQ,YACxBqB,MAAMW,KACR;EAAC,EAAA,GACGV,IAA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;GAAA,CAAA,GAAAD,KAAA;GAAA1B,OAAA0B,OAAAjB,gBAG5CvB,YAAU;IAAA,IAACnB,OAAI;KAAA,OAAEwD,MAAMxD;IAAI;IAAA,IAAEc,QAAK;KAAA,OAAE0C,MAAM1C;IAAK;IAAA,IAAEE,SAAM;KAAA,OAAEwC,MAAMxC;IAAM;GAAA,CAAA,CAAA;GAAAkB,aAAAK,UAAAoB,OAD7DjE,GAAG,CAAC0B,MAAML,WAAW,UAAU,CAAC,CAAA;GAAA,OAAA0C;EAAA,EAAA,CAAA,CAI9C,CAAC;EAAAvB,aAAAK,UAAAc,OAVO3D,GAAG,sBAAsB0B,MAAMY,KAAK,CAAC,CAAA;EAAA,OAAAqB;CAAA,EAAA,CAAA;AAapD"}
1
+ {"version":3,"file":"status-chip.js","names":["Show","splitProps","cva","cn","Tooltip","TooltipContent","TooltipTrigger","statusDotVariants","variants","tone","neutral","success","warning","danger","info","pending","unknown","defaultVariants","labelTone","label","compact","detail","trailing","StatusChip","props","local","rest","chip","_el$","_tmpl$","_el$2","firstChild","_el$3","nextSibling","_$spread","_$mergeProps","class","_$insert","_$effect","_p$","_v$","_v$2","e","_$className","t","undefined","_$createComponent","when","fallback","children","as","name","StatusList","entries","_el$4","_tmpl$2","map","entry","_el$5","_tmpl$4","_el$7","_el$6","_tmpl$3"],"sources":["../../../../src/components/ui/status-chip/status-chip.tsx"],"sourcesContent":["import { Show, splitProps, type ComponentProps, type JSX } from 'solid-js'\nimport { cva } from '#lib/variants'\nimport { cn } from '#lib/utils'\nimport { Tooltip, TooltipContent, TooltipTrigger } from '../tooltip'\n\n/**\n * StatusChip.\n *\n * A state, said in one word, with the reason available on hover. It exists\n * because a status readout has three parts that are always the same three parts —\n * a tone, a label, and the detail that justifies the label — and rendering them\n * ad hoc produces the two failures this component is here to prevent: a colour\n * with no text (unreadable to anyone who cannot see it) and a bare word with no\n * explanation (\"Needs configuration\" — of what?).\n *\n * The tones are deliberately not a rainbow. Seven cover what a status can actually\n * mean:\n *\n * - `neutral` — fine, and there is nothing to say about it.\n * - `success` — a check passed, a capability is ready, a job finished.\n * - `warning` — degraded, or needs a decision from the user.\n * - `danger` — blocked, failed, unrecoverable without intervention.\n * - `info` — in flight or scheduled; work is happening, nothing is wrong.\n * - `pending` — running now with no result yet (a check, a build). The ring\n * turns, so it reads as live rather than as a settled state.\n * - `unknown` — the honest absence of information.\n *\n * `unknown` is not the same as `neutral`, and collapsing them is the mistake\n * worth avoiding: \"this is idle\" and \"we have not been told yet\" are different\n * facts, and a product that shows the second as the first is lying quietly. The\n * ring is hollow so it also reads as different in greyscale.\n *\n * The dot is `aria-hidden` and the label carries the meaning, so a tone is never\n * the only signal.\n */\nexport const statusDotVariants = cva('size-2 shrink-0 rounded-full', {\n variants: {\n tone: {\n neutral: 'bg-muted-foreground',\n success: 'bg-success',\n warning: 'bg-warning',\n danger: 'bg-destructive',\n info: 'bg-info',\n pending: 'border-2 border-info border-r-transparent motion-safe:animate-spin',\n unknown: 'border border-muted-foreground bg-transparent',\n },\n },\n defaultVariants: { tone: 'neutral' },\n})\n\nconst labelTone: Record<StatusTone, string> = {\n neutral: 'text-foreground',\n success: 'text-foreground',\n warning: 'text-foreground',\n danger: 'text-foreground',\n info: 'text-foreground',\n pending: 'text-foreground',\n unknown: 'text-muted-foreground',\n}\n\nexport type StatusTone =\n | 'neutral'\n | 'success'\n | 'warning'\n | 'danger'\n | 'info'\n | 'pending'\n | 'unknown'\n\nexport type StatusChipProps = Omit<ComponentProps<'span'>, 'children'> & {\n tone?: StatusTone\n label: string\n /** Visually hide the text while preserving it for assistive technology. */\n compact?: boolean\n /** Why the status is what it is. Shown in a tooltip; omit for a self-evident label. */\n detail?: string\n /** A trailing slot: a timestamp, a retry affordance, a count. */\n trailing?: JSX.Element\n}\n\nexport function StatusChip(props: StatusChipProps) {\n const [local, rest] = splitProps(props, [\n 'tone',\n 'label',\n 'compact',\n 'detail',\n 'trailing',\n 'class',\n ])\n\n const chip = (\n <span\n data-slot=\"status-chip\"\n class={cn(\n 'inline-flex w-fit items-center gap-1.5 text-xs font-medium whitespace-nowrap',\n labelTone[local.tone ?? 'neutral'],\n local.class\n )}\n {...rest}\n >\n <span class={statusDotVariants({ tone: local.tone })} aria-hidden=\"true\" />\n <span class={cn(local.compact && 'sr-only')}>{local.label}</span>\n {local.trailing}\n </span>\n )\n\n return (\n <Show when={local.detail} fallback={chip}>\n {(detail) => (\n <Tooltip>\n <TooltipTrigger as=\"span\" class=\"inline-flex\">\n {chip}\n </TooltipTrigger>\n <TooltipContent data-slot=\"tooltip-content\">{detail()}</TooltipContent>\n </Tooltip>\n )}\n </Show>\n )\n}\n\nexport type StatusEntry = Readonly<{\n /** A stable key for the row. */\n id: string\n /** What is being reported — \"Configuration\", \"Runtime\", \"Sync\". */\n name: string\n tone: StatusTone\n label: string\n detail?: string\n}>\n\n/**\n * StatusList.\n *\n * The several-facts-about-one-thing shape: an agent with a configuration state, a\n * runtime state and an activity state; a service with a build, a deploy and a\n * health check. It is a definition list rather than a table because there is no\n * column to sort or compare — the rows are facets of a single subject, and a\n * screen reader should hear them as such.\n *\n * Fixed width on the name column is what makes a column of these scannable; the\n * rows line up without a table's semantics.\n */\nexport function StatusList(props: {\n entries: readonly StatusEntry[]\n class?: string\n /** Hide the name column and show only the chips — for a compact badge strip. */\n compact?: boolean\n}) {\n return (\n <dl class={cn('grid gap-2 text-sm', props.class)}>\n {props.entries.map((entry) => (\n <div class=\"flex items-baseline justify-between gap-4\">\n <Show when={!props.compact}>\n <dt class=\"text-muted-foreground\">{entry.name}</dt>\n </Show>\n <dd class={cn(!props.compact && 'shrink-0')}>\n <StatusChip tone={entry.tone} label={entry.label} detail={entry.detail} />\n </dd>\n </div>\n ))}\n </dl>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,IAAaO,oBAAoBL,IAAI,gCAAgC;CACnEM,UAAU,EACRC,MAAM;EACJC,SAAS;EACTC,SAAS;EACT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