@adea-ai/ui 0.162.14 → 0.162.15

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 (196) hide show
  1. package/dist/components/composites/accent-picker/accent-picker.js +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 +1 -1
  4. package/dist/components/composites/accent-picker/custom-color-popover.js.map +1 -1
  5. package/dist/components/composites/appearance-editor/accent-swatch-groups.js +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.d.ts.map +1 -1
  8. package/dist/components/composites/appearance-editor/appearance-choices.js +2 -2
  9. package/dist/components/composites/appearance-editor/appearance-choices.js.map +1 -1
  10. package/dist/components/composites/confirmation/confirmation.js +1 -1
  11. package/dist/components/composites/confirmation/confirmation.js.map +1 -1
  12. package/dist/components/composites/icon-picker/icon-picker.js +1 -1
  13. package/dist/components/composites/icon-picker/icon-picker.js.map +1 -1
  14. package/dist/components/composites/list-row/list-row-control.js +1 -1
  15. package/dist/components/composites/list-row/list-row-control.js.map +1 -1
  16. package/dist/components/composites/settings/settings.js +1 -1
  17. package/dist/components/composites/settings/settings.js.map +1 -1
  18. package/dist/components/composites/stack-trace/stack-trace.js +1 -1
  19. package/dist/components/composites/stack-trace/stack-trace.js.map +1 -1
  20. package/dist/components/composites/tree/tree.js +1 -1
  21. package/dist/components/composites/tree/tree.js.map +1 -1
  22. package/dist/components/composites/workspace-mark/workspace-mark.js +1 -1
  23. package/dist/components/composites/workspace-mark/workspace-mark.js.map +1 -1
  24. package/dist/components/conversation/thread-panel.js +1 -1
  25. package/dist/components/conversation/thread-panel.js.map +1 -1
  26. package/dist/components/layout/app-shell/skip-link.js +1 -1
  27. package/dist/components/layout/app-shell/skip-link.js.map +1 -1
  28. package/dist/components/layout/side-rail/side-rail.js +1 -1
  29. package/dist/components/layout/side-rail/side-rail.js.map +1 -1
  30. package/dist/components/layout/sidebar-nav/sidebar-nav-classes.js +1 -1
  31. package/dist/components/layout/sidebar-nav/sidebar-nav-classes.js.map +1 -1
  32. package/dist/components/layout/sidebar-nav/sidebar-nav.js +1 -1
  33. package/dist/components/layout/sidebar-nav/sidebar-nav.js.map +1 -1
  34. package/dist/components/layout/top-bar/top-bar.js +2 -2
  35. package/dist/components/layout/top-bar/top-bar.js.map +1 -1
  36. package/dist/components/ui/accordion/accordion.js +1 -1
  37. package/dist/components/ui/accordion/accordion.js.map +1 -1
  38. package/dist/components/ui/annotation-surface/annotation-surface.js +1 -1
  39. package/dist/components/ui/annotation-surface/annotation-surface.js.map +1 -1
  40. package/dist/components/ui/attachment/attachment.js +2 -2
  41. package/dist/components/ui/attachment/attachment.js.map +1 -1
  42. package/dist/components/ui/board/board.js +2 -2
  43. package/dist/components/ui/board/board.js.map +1 -1
  44. package/dist/components/ui/breadcrumb/breadcrumb.js +1 -1
  45. package/dist/components/ui/breadcrumb/breadcrumb.js.map +1 -1
  46. package/dist/components/ui/button/button.js +1 -1
  47. package/dist/components/ui/button/button.js.map +1 -1
  48. package/dist/components/ui/checkbox/checkbox.js +1 -1
  49. package/dist/components/ui/checkbox/checkbox.js.map +1 -1
  50. package/dist/components/ui/collapsible/collapsible.js +1 -1
  51. package/dist/components/ui/collapsible/collapsible.js.map +1 -1
  52. package/dist/components/ui/combobox/combobox.js +3 -3
  53. package/dist/components/ui/combobox/combobox.js.map +1 -1
  54. package/dist/components/ui/field/field.js +2 -2
  55. package/dist/components/ui/field/field.js.map +1 -1
  56. package/dist/components/ui/input/input-control.js +1 -1
  57. package/dist/components/ui/input/input-control.js.map +1 -1
  58. package/dist/components/ui/input-group/input-group.js +1 -1
  59. package/dist/components/ui/input-group/input-group.js.map +1 -1
  60. package/dist/components/ui/input-otp/input-otp.js +1 -1
  61. package/dist/components/ui/input-otp/input-otp.js.map +1 -1
  62. package/dist/components/ui/menubar/menubar.js +1 -1
  63. package/dist/components/ui/menubar/menubar.js.map +1 -1
  64. package/dist/components/ui/native-select/native-select.js +1 -1
  65. package/dist/components/ui/native-select/native-select.js.map +1 -1
  66. package/dist/components/ui/pagination/pagination.js +1 -1
  67. package/dist/components/ui/pagination/pagination.js.map +1 -1
  68. package/dist/components/ui/questionnaire/questionnaire.js +1 -1
  69. package/dist/components/ui/questionnaire/questionnaire.js.map +1 -1
  70. package/dist/components/ui/radio-group/radio-group.js +2 -2
  71. package/dist/components/ui/radio-group/radio-group.js.map +1 -1
  72. package/dist/components/ui/scroll-area/scroll-area.js +1 -1
  73. package/dist/components/ui/scroll-area/scroll-area.js.map +1 -1
  74. package/dist/components/ui/select/select.js +1 -1
  75. package/dist/components/ui/select/select.js.map +1 -1
  76. package/dist/components/ui/slider/slider.js +1 -1
  77. package/dist/components/ui/slider/slider.js.map +1 -1
  78. package/dist/components/ui/switch/switch.js +1 -1
  79. package/dist/components/ui/switch/switch.js.map +1 -1
  80. package/dist/components/ui/tabs/tabs.js +1 -1
  81. package/dist/components/ui/tabs/tabs.js.map +1 -1
  82. package/dist/components/ui/text-link/text-link.js +1 -1
  83. package/dist/components/ui/text-link/text-link.js.map +1 -1
  84. package/dist/components/ui/textarea/textarea.js +1 -1
  85. package/dist/components/ui/textarea/textarea.js.map +1 -1
  86. package/dist/components/ui/toast/toast.js +1 -1
  87. package/dist/components/ui/toast/toast.js.map +1 -1
  88. package/dist/components/ui/trace/trace.js +1 -1
  89. package/dist/components/ui/trace/trace.js.map +1 -1
  90. package/dist/lib/overlay.d.ts.map +1 -1
  91. package/dist/lib/overlay.js +1 -1
  92. package/dist/lib/overlay.js.map +1 -1
  93. package/dist/lib/tokens.d.ts.map +1 -1
  94. package/dist/lib/tokens.js +2 -2
  95. package/dist/lib/tokens.js.map +1 -1
  96. package/dist/lib/variants.d.ts +1 -1
  97. package/dist/lib/variants.d.ts.map +1 -1
  98. package/dist/lib/variants.js +1 -1
  99. package/dist/lib/variants.js.map +1 -1
  100. package/dist/r/src/components/composites/accent-picker/accent-picker.tsx +1 -1
  101. package/dist/r/src/components/composites/accent-picker/custom-color-popover.tsx +1 -1
  102. package/dist/r/src/components/composites/appearance-editor/accent-swatch-groups.tsx +1 -1
  103. package/dist/r/src/components/composites/appearance-editor/appearance-choices.tsx +2 -5
  104. package/dist/r/src/components/composites/confirmation/confirmation.tsx +1 -1
  105. package/dist/r/src/components/composites/icon-picker/icon-picker.tsx +1 -1
  106. package/dist/r/src/components/composites/list-row/list-row-control.tsx +1 -1
  107. package/dist/r/src/components/composites/settings/settings.tsx +1 -1
  108. package/dist/r/src/components/composites/stack-trace/stack-trace.tsx +1 -1
  109. package/dist/r/src/components/composites/tree/tree.tsx +1 -1
  110. package/dist/r/src/components/composites/workspace-mark/workspace-mark.tsx +1 -1
  111. package/dist/r/src/components/conversation/thread-panel.tsx +1 -1
  112. package/dist/r/src/components/layout/app-shell/skip-link.tsx +1 -1
  113. package/dist/r/src/components/layout/side-rail/side-rail.tsx +1 -1
  114. package/dist/r/src/components/layout/sidebar-nav/sidebar-nav-classes.ts +1 -1
  115. package/dist/r/src/components/layout/sidebar-nav/sidebar-nav.tsx +1 -1
  116. package/dist/r/src/components/layout/top-bar/top-bar.tsx +2 -2
  117. package/dist/r/src/components/ui/accordion/accordion.tsx +1 -1
  118. package/dist/r/src/components/ui/annotation-surface/annotation-surface.tsx +1 -1
  119. package/dist/r/src/components/ui/attachment/attachment.tsx +2 -2
  120. package/dist/r/src/components/ui/board/board.tsx +2 -2
  121. package/dist/r/src/components/ui/breadcrumb/breadcrumb.tsx +1 -1
  122. package/dist/r/src/components/ui/button/button.tsx +1 -1
  123. package/dist/r/src/components/ui/checkbox/checkbox.tsx +1 -1
  124. package/dist/r/src/components/ui/collapsible/collapsible.tsx +1 -1
  125. package/dist/r/src/components/ui/combobox/combobox.tsx +3 -3
  126. package/dist/r/src/components/ui/field/field.tsx +2 -2
  127. package/dist/r/src/components/ui/input/input-control.tsx +1 -1
  128. package/dist/r/src/components/ui/input-group/input-group.tsx +1 -1
  129. package/dist/r/src/components/ui/input-otp/input-otp.tsx +1 -1
  130. package/dist/r/src/components/ui/menubar/menubar.tsx +1 -1
  131. package/dist/r/src/components/ui/native-select/native-select.tsx +1 -1
  132. package/dist/r/src/components/ui/pagination/pagination.tsx +1 -1
  133. package/dist/r/src/components/ui/questionnaire/questionnaire.tsx +1 -1
  134. package/dist/r/src/components/ui/radio-group/radio-group.tsx +2 -2
  135. package/dist/r/src/components/ui/scroll-area/scroll-area.tsx +1 -1
  136. package/dist/r/src/components/ui/select/select.tsx +1 -1
  137. package/dist/r/src/components/ui/slider/slider.tsx +1 -1
  138. package/dist/r/src/components/ui/switch/switch.tsx +1 -1
  139. package/dist/r/src/components/ui/tabs/tabs.tsx +1 -1
  140. package/dist/r/src/components/ui/text-link/text-link.tsx +1 -1
  141. package/dist/r/src/components/ui/textarea/textarea.tsx +1 -1
  142. package/dist/r/src/components/ui/toast/toast.tsx +1 -1
  143. package/dist/r/src/components/ui/trace/trace.tsx +1 -1
  144. package/dist/r/src/lib/overlay.ts +1 -1
  145. package/dist/r/src/lib/tokens.ts +4 -2
  146. package/dist/r/src/lib/variants.ts +1 -1
  147. package/dist/r/src/styles/base.css +35 -7
  148. package/package.json +1 -1
  149. package/src/components/composites/accent-picker/accent-picker.tsx +1 -1
  150. package/src/components/composites/accent-picker/custom-color-popover.tsx +1 -1
  151. package/src/components/composites/appearance-editor/accent-swatch-groups.tsx +1 -1
  152. package/src/components/composites/appearance-editor/appearance-choices.tsx +2 -5
  153. package/src/components/composites/confirmation/confirmation.tsx +1 -1
  154. package/src/components/composites/icon-picker/icon-picker.tsx +1 -1
  155. package/src/components/composites/list-row/list-row-control.tsx +1 -1
  156. package/src/components/composites/settings/settings.tsx +1 -1
  157. package/src/components/composites/stack-trace/stack-trace.tsx +1 -1
  158. package/src/components/composites/tree/tree.tsx +1 -1
  159. package/src/components/composites/workspace-mark/workspace-mark.tsx +1 -1
  160. package/src/components/conversation/thread-panel.tsx +1 -1
  161. package/src/components/layout/app-shell/skip-link.tsx +1 -1
  162. package/src/components/layout/side-rail/side-rail.tsx +1 -1
  163. package/src/components/layout/sidebar-nav/sidebar-nav-classes.ts +1 -1
  164. package/src/components/layout/sidebar-nav/sidebar-nav.tsx +1 -1
  165. package/src/components/layout/top-bar/top-bar.tsx +2 -2
  166. package/src/components/ui/accordion/accordion.tsx +1 -1
  167. package/src/components/ui/annotation-surface/annotation-surface.tsx +1 -1
  168. package/src/components/ui/attachment/attachment.tsx +2 -2
  169. package/src/components/ui/board/board.tsx +2 -2
  170. package/src/components/ui/breadcrumb/breadcrumb.tsx +1 -1
  171. package/src/components/ui/button/button.tsx +1 -1
  172. package/src/components/ui/checkbox/checkbox.tsx +1 -1
  173. package/src/components/ui/collapsible/collapsible.tsx +1 -1
  174. package/src/components/ui/combobox/combobox.tsx +3 -3
  175. package/src/components/ui/field/field.tsx +2 -2
  176. package/src/components/ui/input/input-control.tsx +1 -1
  177. package/src/components/ui/input-group/input-group.tsx +1 -1
  178. package/src/components/ui/input-otp/input-otp.tsx +1 -1
  179. package/src/components/ui/menubar/menubar.tsx +1 -1
  180. package/src/components/ui/native-select/native-select.tsx +1 -1
  181. package/src/components/ui/pagination/pagination.tsx +1 -1
  182. package/src/components/ui/questionnaire/questionnaire.tsx +1 -1
  183. package/src/components/ui/radio-group/radio-group.tsx +2 -2
  184. package/src/components/ui/scroll-area/scroll-area.tsx +1 -1
  185. package/src/components/ui/select/select.tsx +1 -1
  186. package/src/components/ui/slider/slider.tsx +1 -1
  187. package/src/components/ui/switch/switch.tsx +1 -1
  188. package/src/components/ui/tabs/tabs.tsx +1 -1
  189. package/src/components/ui/text-link/text-link.tsx +1 -1
  190. package/src/components/ui/textarea/textarea.tsx +1 -1
  191. package/src/components/ui/toast/toast.tsx +1 -1
  192. package/src/components/ui/trace/trace.tsx +1 -1
  193. package/src/lib/overlay.ts +1 -1
  194. package/src/lib/tokens.ts +4 -2
  195. package/src/lib/variants.ts +1 -1
  196. package/src/styles/base.css +35 -7
@@ -194,7 +194,7 @@ function SwatchItem(props) {
194
194
  return tip.onFocus;
195
195
  },
196
196
  get "class"() {
197
- return cn("flex cursor-pointer items-center justify-center rounded-full border border-border p-0.5 outline-none", props.row ? "size-6" : "size-7", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle", "data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary", "data-[disabled]:pointer-events-none data-[disabled]:opacity-50");
197
+ return cn("flex cursor-pointer items-center justify-center rounded-full border border-border p-0.5 outline-none", props.row ? "size-6" : "size-7", "focus-visible:border-ring focus-visible:focus-outline", "data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary", "data-[disabled]:pointer-events-none data-[disabled]:opacity-50");
198
198
  },
199
199
  get children() {
200
200
  return [memo(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"accent-picker.js","names":["<SdkRadioGroup\n render={(part) => <div {...part} data-slot=\"swatch-picker\" />}\n aria-label={props.label}\n value={radioValue()}\n disabled={props.disabled}\n onValueChange={(id) => {\n if (id === null || id === CUSTOM) return\n props.onValueChange(id === NONE ? null : id)\n }}\n class={cn(\n row()\n ? 'grid min-w-0 flex-1 auto-cols-fr grid-flow-col'\n : 'flex flex-wrap items-center gap-2'\n )}\n >\n <Show when={inherit()}>\n <SwatchItem id={NONE} label={props.inheritLabel ?? 'Inherit (default)'} row={row()}>\n <InheritSwatch />\n </SwatchItem>\n </Show>\n <For each={props.options ?? accents}>\n {(option) => {\n const light = () => option.light ?? ''\n const dark = () => option.dark ?? option.light ?? ''\n return (\n <SwatchItem id={option.id} label={option.label} row={row()}>\n <svg class=\"size-full\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <Show\n when={props.appearance}\n fallback={\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n class=\"fill-(--swatch-light) dark:fill-(--swatch-dark)\"\n style={{ '--swatch-light': light(), '--swatch-dark': dark() }}\n />\n }\n >\n {(appearance) => (\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n fill={appearance() === 'light' ? light() : dark()}\n />\n )}\n </Show>\n </svg>\n </SwatchItem>\n )\n }}\n </For>\n </SdkRadioGroup>","render={(part) => <div {...part} data-slot=\"swatch-picker\" />}","onValueChange={(id) => {\n if (id === null || id === CUSTOM) return\n props.onValueChange(id === NONE ? null : id)\n }}","<Show when={inherit()}>\n <SwatchItem id={NONE} label={props.inheritLabel ?? 'Inherit (default)'} row={row()}>\n <InheritSwatch />\n </SwatchItem>\n </Show>","<SwatchItem id={NONE} label={props.inheritLabel ?? 'Inherit (default)'} row={row()}>\n <InheritSwatch />\n </SwatchItem>","id={NONE}","<InheritSwatch />","<For each={props.options ?? accents}>\n {(option) => {\n const light = () => option.light ?? ''\n const dark = () => option.dark ?? option.light ?? ''\n return (\n <SwatchItem id={option.id} label={option.label} row={row()}>\n <svg class=\"size-full\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <Show\n when={props.appearance}\n fallback={\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n class=\"fill-(--swatch-light) dark:fill-(--swatch-dark)\"\n style={{ '--swatch-light': light(), '--swatch-dark': dark() }}\n />\n }\n >\n {(appearance) => (\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n fill={appearance() === 'light' ? light() : dark()}\n />\n )}\n </Show>\n </svg>\n </SwatchItem>\n )\n }}\n </For>","<SwatchItem id={option.id} label={option.label} row={row()}>\n <svg class=\"size-full\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <Show\n when={props.appearance}\n fallback={\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n class=\"fill-(--swatch-light) dark:fill-(--swatch-dark)\"\n style={{ '--swatch-light': light(), '--swatch-dark': dark() }}\n />\n }\n >\n {(appearance) => (\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n fill={appearance() === 'light' ? light() : dark()}\n />\n )}\n </Show>\n </svg>\n </SwatchItem>","<Show\n when={props.appearance}\n fallback={\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n class=\"fill-(--swatch-light) dark:fill-(--swatch-dark)\"\n style={{ '--swatch-light': light(), '--swatch-dark': dark() }}\n />\n }\n >\n {(appearance) => (\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n fill={appearance() === 'light' ? light() : dark()}\n />\n )}\n </Show>","'--swatch-dark': dark()","<circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n class=\"fill-(--swatch-light) dark:fill-(--swatch-dark)\"\n style={{ '--swatch-light': light(), '--swatch-dark': dark() }}\n />","<svg class=\"size-full\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <Show\n when={props.appearance}\n fallback={\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n class=\"fill-(--swatch-light) dark:fill-(--swatch-dark)\"\n style={{ '--swatch-light': light(), '--swatch-dark': dark() }}\n />\n }\n >\n {(appearance) => (\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n fill={appearance() === 'light' ? light() : dark()}\n />\n )}\n </Show>\n </svg>","<div\n data-slot=\"swatch-row\"\n data-accent-choices\n class={cn('flex min-w-0 items-center gap-2', row() ? 'w-full' : 'flex-wrap', props.class)}\n >\n <SdkRadioGroup\n render={(part) => <div {...part} data-slot=\"swatch-picker\" />}\n aria-label={props.label}\n value={radioValue()}\n disabled={props.disabled}\n onValueChange={(id) => {\n if (id === null || id === CUSTOM) return\n props.onValueChange(id === NONE ? null : id)\n }}\n class={cn(\n row()\n ? 'grid min-w-0 flex-1 auto-cols-fr grid-flow-col'\n : 'flex flex-wrap items-center gap-2'\n )}\n >\n <Show when={inherit()}>\n <SwatchItem id={NONE} label={props.inheritLabel ?? 'Inherit (default)'} row={row()}>\n <InheritSwatch />\n </SwatchItem>\n </Show>\n <For each={props.options ?? accents}>\n {(option) => {\n const light = () => option.light ?? ''\n const dark = () => option.dark ?? option.light ?? ''\n return (\n <SwatchItem id={option.id} label={option.label} row={row()}>\n <svg class=\"size-full\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <Show\n when={props.appearance}\n fallback={\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n class=\"fill-(--swatch-light) dark:fill-(--swatch-dark)\"\n style={{ '--swatch-light': light(), '--swatch-dark': dark() }}\n />\n }\n >\n {(appearance) => (\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n fill={appearance() === 'light' ? light() : dark()}\n />\n )}\n </Show>\n </svg>\n </SwatchItem>\n )\n }}\n </For>\n </SdkRadioGroup>\n <Show when={props.custom ?? true}>\n <CustomColorPopover\n value={customValue()}\n seed={props.customSeed ?? DEFAULT_CUSTOM_SEED}\n disabled={props.disabled}\n onCommit={commitCustom}\n />\n <Input\n type=\"color\"\n // `w-px` beats the Input's own `w-full` and keeps the hidden field from sizing a narrow panel's scroll width.\n class=\"sr-only w-px\"\n tabindex={-1}\n aria-label=\"Custom accent color\"\n value={customValue() ?? props.customSeed ?? DEFAULT_CUSTOM_SEED}\n disabled={props.disabled}\n onChange={(event) => commitCustom(event.currentTarget.value)}\n />\n </Show>\n </div>","<CustomColorPopover\n value={customValue()}\n seed={props.customSeed ?? DEFAULT_CUSTOM_SEED}\n disabled={props.disabled}\n onCommit={commitCustom}\n />","onCommit={commitCustom}","<Input\n type=\"color\"\n // `w-px` beats the Input's own `w-full` and keeps the hidden field from sizing a narrow panel's scroll width.\n class=\"sr-only w-px\"\n tabindex={-1}\n aria-label=\"Custom accent color\"\n value={customValue() ?? props.customSeed ?? DEFAULT_CUSTOM_SEED}\n disabled={props.disabled}\n onChange={(event) => commitCustom(event.currentTarget.value)}\n />","type=\"color\"","class=\"sr-only w-px\"","tabindex={-1}","onChange={(event) => commitCustom(event.currentTarget.value)}","<span\n aria-hidden=\"true\"\n data-slot=\"swatch-inherit\"\n class=\"relative block size-full overflow-hidden rounded-full bg-(--swatch-inherit)\"\n style={{ '--swatch-inherit': '#000' }}\n >\n <span class=\"absolute inset-x-0 top-1/2 h-0.5 -translate-y-1/2 -rotate-45 bg-destructive\" />\n </span>","<LazyTooltip content={props.label}>\n {(tip) => (\n <SdkRadio\n value={props.id}\n ref={tip.ref}\n aria-describedby={tip.describedBy()}\n onPointerEnter={tip.onPointerEnter}\n onFocus={tip.onFocus}\n class={cn(\n 'flex cursor-pointer items-center justify-center rounded-full border border-border p-0.5 outline-none',\n props.row ? 'size-6' : 'size-7',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50'\n )}\n >\n {props.children}\n <span class=\"sr-only\">{props.label}</span>\n </SdkRadio>\n )}\n </LazyTooltip>","<SdkRadio\n value={props.id}\n ref={tip.ref}\n aria-describedby={tip.describedBy()}\n onPointerEnter={tip.onPointerEnter}\n onFocus={tip.onFocus}\n class={cn(\n 'flex cursor-pointer items-center justify-center rounded-full border border-border p-0.5 outline-none',\n props.row ? 'size-6' : 'size-7',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50'\n )}\n >\n {props.children}\n <span class=\"sr-only\">{props.label}</span>\n </SdkRadio>","ref={tip.ref}","props.children","class={props.row ? 'flex justify-center' : 'contents'}","<div data-accent-option={props.id} class={props.row ? 'flex justify-center' : 'contents'}>\n {/* A picker shows a dozen swatches; each builds its tooltip on first hover. */}\n <LazyTooltip content={props.label}>\n {(tip) => (\n <SdkRadio\n value={props.id}\n ref={tip.ref}\n aria-describedby={tip.describedBy()}\n onPointerEnter={tip.onPointerEnter}\n onFocus={tip.onFocus}\n class={cn(\n 'flex cursor-pointer items-center justify-center rounded-full border border-border p-0.5 outline-none',\n props.row ? 'size-6' : 'size-7',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50'\n )}\n >\n {props.children}\n <span class=\"sr-only\">{props.label}</span>\n </SdkRadio>\n )}\n </LazyTooltip>\n </div>","_$insert","_$spread","_$effect","_$setStyleProperty","_$setAttribute","_$readShallow","_$className"],"sources":["../../../../src/components/composites/accent-picker/accent-picker.tsx"],"sourcesContent":["import { Radio as SdkRadio, RadioGroup as SdkRadioGroup } from '@ui-sdk/solid/radio'\nimport type { JSX } from '@solidjs/web'\nimport { For, Show } from 'solid-js'\nimport { accents } from '#lib/accent-presets'\nimport { cn } from '#lib/utils'\nimport { Input } from '../../ui/input'\nimport { LazyTooltip } from '../../ui/tooltip'\nimport { CustomColorPopover } from './custom-color-popover'\n\n/**\n * AccentPicker.\n *\n * The one accent control every level of the app uses: the app's own appearance,\n * a workspace's accent over the app's, a project's icon colour over its\n * workspace's. It is a row of preset swatches, optionally led by an \"inherit\"\n * swatch and followed by a Custom button that opens a colour picker anchored\n * under it.\n *\n * - `null` is a real value, not an empty one: it means \"do not override\", so\n * with `inherit` on the swatch row never has an unchecked state and the\n * control can say what the inherited colour is through `inheritLabel`.\n * - A custom colour is a lowercase `#rrggbb`. While one is set no swatch is\n * checked; the Custom button reads pressed and shows the colour. Opening the\n * picker changes nothing until Apply.\n *\n * Swatches paint each preset's light and dark colour on the `dark` class, so a\n * swatch is the colour the setting produces in whichever appearance is in\n * force and the picker needs no theme provider. A host previewing a different\n * appearance (the appearance editor's draft) pins the side with `appearance`.\n */\nexport type AccentPickerOption = Readonly<{\n id: string\n label: string\n light?: string\n dark?: string\n}>\n\nexport type AccentPickerProps = {\n /** The group's accessible name, e.g. \"Icon colour\". */\n label: string\n /** A preset id, a custom `#rrggbb`, or `null` for no override. */\n value: string | null\n onValueChange(value: string | null): void\n /**\n * Whether the row leads with the \"inherit\" swatch (`null`). On by default;\n * the app's own appearance, which has nothing above it, turns it off.\n */\n inherit?: boolean\n /** What `null` means here, e.g. \"Inherit workspace accent\". Also the first swatch's name and tooltip. */\n inheritLabel?: string\n /** The swatches after the inherit one. Defaults to the six brand presets. */\n options?: readonly AccentPickerOption[]\n /** Whether the Custom button follows the swatches. On by default. */\n custom?: boolean\n /** The colour the Custom picker starts on while no custom colour is set. */\n customSeed?: string\n /** Pins the swatches to one side of each preset pair instead of following the `dark` class. */\n appearance?: 'light' | 'dark'\n /**\n * `wrap` (the default) wraps at the container's edge. `row` keeps every\n * swatch on one line at a smaller size, sharing the width equally, so a\n * narrow panel does not wrap them.\n */\n layout?: 'wrap' | 'row'\n disabled?: boolean\n class?: string\n}\n\nconst NONE = '__none__'\nconst CUSTOM = '__custom__'\nconst HEX = /^#[0-9a-f]{6}$/i\nconst DEFAULT_CUSTOM_SEED = '#7c3aed'\n\n/** Whether a stored accent is a custom `#rrggbb` colour rather than a preset id or `null`. */\nexport function isCustomAccentValue(value: string | null | undefined): value is `#${string}` {\n return typeof value === 'string' && HEX.test(value)\n}\n\nexport function AccentPicker(props: AccentPickerProps) {\n const customValue = () =>\n isCustomAccentValue(props.value) ? props.value.toLowerCase() : undefined\n const inherit = () => props.inherit ?? true\n const row = () => props.layout === 'row'\n const radioValue = () => (customValue() ? CUSTOM : (props.value ?? NONE))\n\n // The native colour field stays in the tree, visually hidden, as the\n // control assistive technology and automation can set directly; people use\n // the anchored picker behind the Custom button.\n const commitCustom = (raw: string) => {\n const value = raw.trim().toLowerCase()\n // Only `#rrggbb` is stored; anything else is ignored rather than saved.\n if (HEX.test(value) && value !== customValue()) props.onValueChange(value)\n }\n\n return (\n <div\n data-slot=\"swatch-row\"\n data-accent-choices\n class={cn('flex min-w-0 items-center gap-2', row() ? 'w-full' : 'flex-wrap', props.class)}\n >\n <SdkRadioGroup\n render={(part) => <div {...part} data-slot=\"swatch-picker\" />}\n aria-label={props.label}\n value={radioValue()}\n disabled={props.disabled}\n onValueChange={(id) => {\n if (id === null || id === CUSTOM) return\n props.onValueChange(id === NONE ? null : id)\n }}\n class={cn(\n row()\n ? 'grid min-w-0 flex-1 auto-cols-fr grid-flow-col'\n : 'flex flex-wrap items-center gap-2'\n )}\n >\n <Show when={inherit()}>\n <SwatchItem id={NONE} label={props.inheritLabel ?? 'Inherit (default)'} row={row()}>\n <InheritSwatch />\n </SwatchItem>\n </Show>\n <For each={props.options ?? accents}>\n {(option) => {\n const light = () => option.light ?? ''\n const dark = () => option.dark ?? option.light ?? ''\n return (\n <SwatchItem id={option.id} label={option.label} row={row()}>\n <svg class=\"size-full\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <Show\n when={props.appearance}\n fallback={\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n class=\"fill-(--swatch-light) dark:fill-(--swatch-dark)\"\n style={{ '--swatch-light': light(), '--swatch-dark': dark() }}\n />\n }\n >\n {(appearance) => (\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n fill={appearance() === 'light' ? light() : dark()}\n />\n )}\n </Show>\n </svg>\n </SwatchItem>\n )\n }}\n </For>\n </SdkRadioGroup>\n <Show when={props.custom ?? true}>\n <CustomColorPopover\n value={customValue()}\n seed={props.customSeed ?? DEFAULT_CUSTOM_SEED}\n disabled={props.disabled}\n onCommit={commitCustom}\n />\n <Input\n type=\"color\"\n // `w-px` beats the Input's own `w-full` and keeps the hidden field from sizing a narrow panel's scroll width.\n class=\"sr-only w-px\"\n tabindex={-1}\n aria-label=\"Custom accent color\"\n value={customValue() ?? props.customSeed ?? DEFAULT_CUSTOM_SEED}\n disabled={props.disabled}\n onChange={(event) => commitCustom(event.currentTarget.value)}\n />\n </Show>\n </div>\n )\n}\n\n/**\n * The \"inherit\" swatch: a black disc with a red slash, the universal \"no\n * override\" mark. It is drawn rather than painted from a token so it reads the\n * same in every theme and appearance.\n */\nfunction InheritSwatch() {\n return (\n <span\n aria-hidden=\"true\"\n data-slot=\"swatch-inherit\"\n class=\"relative block size-full overflow-hidden rounded-full bg-(--swatch-inherit)\"\n style={{ '--swatch-inherit': '#000' }}\n >\n <span class=\"absolute inset-x-0 top-1/2 h-0.5 -translate-y-1/2 -rotate-45 bg-destructive\" />\n </span>\n )\n}\n\nfunction SwatchItem(props: { id: string; label: string; row: boolean; children: JSX.Element }) {\n // The wrapper keeps the option's hook and the row layout; the swatch itself\n // is ui-sdk's `role=\"radio\"` button, with its hidden native radio beside it.\n return (\n <div data-accent-option={props.id} class={props.row ? 'flex justify-center' : 'contents'}>\n {/* A picker shows a dozen swatches; each builds its tooltip on first hover. */}\n <LazyTooltip content={props.label}>\n {(tip) => (\n <SdkRadio\n value={props.id}\n ref={tip.ref}\n aria-describedby={tip.describedBy()}\n onPointerEnter={tip.onPointerEnter}\n onFocus={tip.onFocus}\n class={cn(\n 'flex cursor-pointer items-center justify-center rounded-full border border-border p-0.5 outline-none',\n props.row ? 'size-6' : 'size-7',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50'\n )}\n >\n {props.children}\n <span class=\"sr-only\">{props.label}</span>\n </SdkRadio>\n )}\n </LazyTooltip>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAoEA,IAAM,OAAO;AACb,IAAM,SAAS;AACf,IAAM,MAAM;AACZ,IAAM,sBAAsB;;AAG5B,SAAgB,oBAAoB,OAAyD;CAC3F,OAAO,OAAO,UAAU,YAAY,IAAI,KAAK,KAAK;AACpD;AAEA,SAAgB,aAAa,OAA0B;CACrD,MAAM,oBACJ,oBAAoB,MAAM,KAAK,IAAI,MAAM,MAAM,YAAY,IAAI,KAAA;CACjE,MAAM,gBAAgB,MAAM,WAAW;CACvC,MAAM,YAAY,MAAM,WAAW;CACnC,MAAM,mBAAoB,YAAY,IAAI,SAAU,MAAM,SAAS;CAKnE,MAAM,gBAAgB,QAAg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AAA;EAA4B,MAAA,KAAA,KAAAM,aAAA,OAAA,sBAAA,CAAA;EAAEE,UAAA,OAAA,GAAA,KAAA,CAAqD;CAAvD,CAAA;CADnC,OACEP;AAyBJ"}
1
+ {"version":3,"file":"accent-picker.js","names":["<SdkRadioGroup\n render={(part) => <div {...part} data-slot=\"swatch-picker\" />}\n aria-label={props.label}\n value={radioValue()}\n disabled={props.disabled}\n onValueChange={(id) => {\n if (id === null || id === CUSTOM) return\n props.onValueChange(id === NONE ? null : id)\n }}\n class={cn(\n row()\n ? 'grid min-w-0 flex-1 auto-cols-fr grid-flow-col'\n : 'flex flex-wrap items-center gap-2'\n )}\n >\n <Show when={inherit()}>\n <SwatchItem id={NONE} label={props.inheritLabel ?? 'Inherit (default)'} row={row()}>\n <InheritSwatch />\n </SwatchItem>\n </Show>\n <For each={props.options ?? accents}>\n {(option) => {\n const light = () => option.light ?? ''\n const dark = () => option.dark ?? option.light ?? ''\n return (\n <SwatchItem id={option.id} label={option.label} row={row()}>\n <svg class=\"size-full\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <Show\n when={props.appearance}\n fallback={\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n class=\"fill-(--swatch-light) dark:fill-(--swatch-dark)\"\n style={{ '--swatch-light': light(), '--swatch-dark': dark() }}\n />\n }\n >\n {(appearance) => (\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n fill={appearance() === 'light' ? light() : dark()}\n />\n )}\n </Show>\n </svg>\n </SwatchItem>\n )\n }}\n </For>\n </SdkRadioGroup>","render={(part) => <div {...part} data-slot=\"swatch-picker\" />}","onValueChange={(id) => {\n if (id === null || id === CUSTOM) return\n props.onValueChange(id === NONE ? null : id)\n }}","<Show when={inherit()}>\n <SwatchItem id={NONE} label={props.inheritLabel ?? 'Inherit (default)'} row={row()}>\n <InheritSwatch />\n </SwatchItem>\n </Show>","<SwatchItem id={NONE} label={props.inheritLabel ?? 'Inherit (default)'} row={row()}>\n <InheritSwatch />\n </SwatchItem>","id={NONE}","<InheritSwatch />","<For each={props.options ?? accents}>\n {(option) => {\n const light = () => option.light ?? ''\n const dark = () => option.dark ?? option.light ?? ''\n return (\n <SwatchItem id={option.id} label={option.label} row={row()}>\n <svg class=\"size-full\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <Show\n when={props.appearance}\n fallback={\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n class=\"fill-(--swatch-light) dark:fill-(--swatch-dark)\"\n style={{ '--swatch-light': light(), '--swatch-dark': dark() }}\n />\n }\n >\n {(appearance) => (\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n fill={appearance() === 'light' ? light() : dark()}\n />\n )}\n </Show>\n </svg>\n </SwatchItem>\n )\n }}\n </For>","<SwatchItem id={option.id} label={option.label} row={row()}>\n <svg class=\"size-full\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <Show\n when={props.appearance}\n fallback={\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n class=\"fill-(--swatch-light) dark:fill-(--swatch-dark)\"\n style={{ '--swatch-light': light(), '--swatch-dark': dark() }}\n />\n }\n >\n {(appearance) => (\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n fill={appearance() === 'light' ? light() : dark()}\n />\n )}\n </Show>\n </svg>\n </SwatchItem>","<Show\n when={props.appearance}\n fallback={\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n class=\"fill-(--swatch-light) dark:fill-(--swatch-dark)\"\n style={{ '--swatch-light': light(), '--swatch-dark': dark() }}\n />\n }\n >\n {(appearance) => (\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n fill={appearance() === 'light' ? light() : dark()}\n />\n )}\n </Show>","'--swatch-dark': dark()","<circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n class=\"fill-(--swatch-light) dark:fill-(--swatch-dark)\"\n style={{ '--swatch-light': light(), '--swatch-dark': dark() }}\n />","<svg class=\"size-full\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <Show\n when={props.appearance}\n fallback={\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n class=\"fill-(--swatch-light) dark:fill-(--swatch-dark)\"\n style={{ '--swatch-light': light(), '--swatch-dark': dark() }}\n />\n }\n >\n {(appearance) => (\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n fill={appearance() === 'light' ? light() : dark()}\n />\n )}\n </Show>\n </svg>","<div\n data-slot=\"swatch-row\"\n data-accent-choices\n class={cn('flex min-w-0 items-center gap-2', row() ? 'w-full' : 'flex-wrap', props.class)}\n >\n <SdkRadioGroup\n render={(part) => <div {...part} data-slot=\"swatch-picker\" />}\n aria-label={props.label}\n value={radioValue()}\n disabled={props.disabled}\n onValueChange={(id) => {\n if (id === null || id === CUSTOM) return\n props.onValueChange(id === NONE ? null : id)\n }}\n class={cn(\n row()\n ? 'grid min-w-0 flex-1 auto-cols-fr grid-flow-col'\n : 'flex flex-wrap items-center gap-2'\n )}\n >\n <Show when={inherit()}>\n <SwatchItem id={NONE} label={props.inheritLabel ?? 'Inherit (default)'} row={row()}>\n <InheritSwatch />\n </SwatchItem>\n </Show>\n <For each={props.options ?? accents}>\n {(option) => {\n const light = () => option.light ?? ''\n const dark = () => option.dark ?? option.light ?? ''\n return (\n <SwatchItem id={option.id} label={option.label} row={row()}>\n <svg class=\"size-full\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <Show\n when={props.appearance}\n fallback={\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n class=\"fill-(--swatch-light) dark:fill-(--swatch-dark)\"\n style={{ '--swatch-light': light(), '--swatch-dark': dark() }}\n />\n }\n >\n {(appearance) => (\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n fill={appearance() === 'light' ? light() : dark()}\n />\n )}\n </Show>\n </svg>\n </SwatchItem>\n )\n }}\n </For>\n </SdkRadioGroup>\n <Show when={props.custom ?? true}>\n <CustomColorPopover\n value={customValue()}\n seed={props.customSeed ?? DEFAULT_CUSTOM_SEED}\n disabled={props.disabled}\n onCommit={commitCustom}\n />\n <Input\n type=\"color\"\n // `w-px` beats the Input's own `w-full` and keeps the hidden field from sizing a narrow panel's scroll width.\n class=\"sr-only w-px\"\n tabindex={-1}\n aria-label=\"Custom accent color\"\n value={customValue() ?? props.customSeed ?? DEFAULT_CUSTOM_SEED}\n disabled={props.disabled}\n onChange={(event) => commitCustom(event.currentTarget.value)}\n />\n </Show>\n </div>","<CustomColorPopover\n value={customValue()}\n seed={props.customSeed ?? DEFAULT_CUSTOM_SEED}\n disabled={props.disabled}\n onCommit={commitCustom}\n />","onCommit={commitCustom}","<Input\n type=\"color\"\n // `w-px` beats the Input's own `w-full` and keeps the hidden field from sizing a narrow panel's scroll width.\n class=\"sr-only w-px\"\n tabindex={-1}\n aria-label=\"Custom accent color\"\n value={customValue() ?? props.customSeed ?? DEFAULT_CUSTOM_SEED}\n disabled={props.disabled}\n onChange={(event) => commitCustom(event.currentTarget.value)}\n />","type=\"color\"","class=\"sr-only w-px\"","tabindex={-1}","onChange={(event) => commitCustom(event.currentTarget.value)}","<span\n aria-hidden=\"true\"\n data-slot=\"swatch-inherit\"\n class=\"relative block size-full overflow-hidden rounded-full bg-(--swatch-inherit)\"\n style={{ '--swatch-inherit': '#000' }}\n >\n <span class=\"absolute inset-x-0 top-1/2 h-0.5 -translate-y-1/2 -rotate-45 bg-destructive\" />\n </span>","<LazyTooltip content={props.label}>\n {(tip) => (\n <SdkRadio\n value={props.id}\n ref={tip.ref}\n aria-describedby={tip.describedBy()}\n onPointerEnter={tip.onPointerEnter}\n onFocus={tip.onFocus}\n class={cn(\n 'flex cursor-pointer items-center justify-center rounded-full border border-border p-0.5 outline-none',\n props.row ? 'size-6' : 'size-7',\n 'focus-visible:border-ring focus-visible:focus-outline',\n 'data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50'\n )}\n >\n {props.children}\n <span class=\"sr-only\">{props.label}</span>\n </SdkRadio>\n )}\n </LazyTooltip>","<SdkRadio\n value={props.id}\n ref={tip.ref}\n aria-describedby={tip.describedBy()}\n onPointerEnter={tip.onPointerEnter}\n onFocus={tip.onFocus}\n class={cn(\n 'flex cursor-pointer items-center justify-center rounded-full border border-border p-0.5 outline-none',\n props.row ? 'size-6' : 'size-7',\n 'focus-visible:border-ring focus-visible:focus-outline',\n 'data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50'\n )}\n >\n {props.children}\n <span class=\"sr-only\">{props.label}</span>\n </SdkRadio>","ref={tip.ref}","props.children","class={props.row ? 'flex justify-center' : 'contents'}","<div data-accent-option={props.id} class={props.row ? 'flex justify-center' : 'contents'}>\n {/* A picker shows a dozen swatches; each builds its tooltip on first hover. */}\n <LazyTooltip content={props.label}>\n {(tip) => (\n <SdkRadio\n value={props.id}\n ref={tip.ref}\n aria-describedby={tip.describedBy()}\n onPointerEnter={tip.onPointerEnter}\n onFocus={tip.onFocus}\n class={cn(\n 'flex cursor-pointer items-center justify-center rounded-full border border-border p-0.5 outline-none',\n props.row ? 'size-6' : 'size-7',\n 'focus-visible:border-ring focus-visible:focus-outline',\n 'data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50'\n )}\n >\n {props.children}\n <span class=\"sr-only\">{props.label}</span>\n </SdkRadio>\n )}\n </LazyTooltip>\n </div>","_$insert","_$spread","_$effect","_$setStyleProperty","_$setAttribute","_$readShallow","_$className"],"sources":["../../../../src/components/composites/accent-picker/accent-picker.tsx"],"sourcesContent":["import { Radio as SdkRadio, RadioGroup as SdkRadioGroup } from '@ui-sdk/solid/radio'\nimport type { JSX } from '@solidjs/web'\nimport { For, Show } from 'solid-js'\nimport { accents } from '#lib/accent-presets'\nimport { cn } from '#lib/utils'\nimport { Input } from '../../ui/input'\nimport { LazyTooltip } from '../../ui/tooltip'\nimport { CustomColorPopover } from './custom-color-popover'\n\n/**\n * AccentPicker.\n *\n * The one accent control every level of the app uses: the app's own appearance,\n * a workspace's accent over the app's, a project's icon colour over its\n * workspace's. It is a row of preset swatches, optionally led by an \"inherit\"\n * swatch and followed by a Custom button that opens a colour picker anchored\n * under it.\n *\n * - `null` is a real value, not an empty one: it means \"do not override\", so\n * with `inherit` on the swatch row never has an unchecked state and the\n * control can say what the inherited colour is through `inheritLabel`.\n * - A custom colour is a lowercase `#rrggbb`. While one is set no swatch is\n * checked; the Custom button reads pressed and shows the colour. Opening the\n * picker changes nothing until Apply.\n *\n * Swatches paint each preset's light and dark colour on the `dark` class, so a\n * swatch is the colour the setting produces in whichever appearance is in\n * force and the picker needs no theme provider. A host previewing a different\n * appearance (the appearance editor's draft) pins the side with `appearance`.\n */\nexport type AccentPickerOption = Readonly<{\n id: string\n label: string\n light?: string\n dark?: string\n}>\n\nexport type AccentPickerProps = {\n /** The group's accessible name, e.g. \"Icon colour\". */\n label: string\n /** A preset id, a custom `#rrggbb`, or `null` for no override. */\n value: string | null\n onValueChange(value: string | null): void\n /**\n * Whether the row leads with the \"inherit\" swatch (`null`). On by default;\n * the app's own appearance, which has nothing above it, turns it off.\n */\n inherit?: boolean\n /** What `null` means here, e.g. \"Inherit workspace accent\". Also the first swatch's name and tooltip. */\n inheritLabel?: string\n /** The swatches after the inherit one. Defaults to the six brand presets. */\n options?: readonly AccentPickerOption[]\n /** Whether the Custom button follows the swatches. On by default. */\n custom?: boolean\n /** The colour the Custom picker starts on while no custom colour is set. */\n customSeed?: string\n /** Pins the swatches to one side of each preset pair instead of following the `dark` class. */\n appearance?: 'light' | 'dark'\n /**\n * `wrap` (the default) wraps at the container's edge. `row` keeps every\n * swatch on one line at a smaller size, sharing the width equally, so a\n * narrow panel does not wrap them.\n */\n layout?: 'wrap' | 'row'\n disabled?: boolean\n class?: string\n}\n\nconst NONE = '__none__'\nconst CUSTOM = '__custom__'\nconst HEX = /^#[0-9a-f]{6}$/i\nconst DEFAULT_CUSTOM_SEED = '#7c3aed'\n\n/** Whether a stored accent is a custom `#rrggbb` colour rather than a preset id or `null`. */\nexport function isCustomAccentValue(value: string | null | undefined): value is `#${string}` {\n return typeof value === 'string' && HEX.test(value)\n}\n\nexport function AccentPicker(props: AccentPickerProps) {\n const customValue = () =>\n isCustomAccentValue(props.value) ? props.value.toLowerCase() : undefined\n const inherit = () => props.inherit ?? true\n const row = () => props.layout === 'row'\n const radioValue = () => (customValue() ? CUSTOM : (props.value ?? NONE))\n\n // The native colour field stays in the tree, visually hidden, as the\n // control assistive technology and automation can set directly; people use\n // the anchored picker behind the Custom button.\n const commitCustom = (raw: string) => {\n const value = raw.trim().toLowerCase()\n // Only `#rrggbb` is stored; anything else is ignored rather than saved.\n if (HEX.test(value) && value !== customValue()) props.onValueChange(value)\n }\n\n return (\n <div\n data-slot=\"swatch-row\"\n data-accent-choices\n class={cn('flex min-w-0 items-center gap-2', row() ? 'w-full' : 'flex-wrap', props.class)}\n >\n <SdkRadioGroup\n render={(part) => <div {...part} data-slot=\"swatch-picker\" />}\n aria-label={props.label}\n value={radioValue()}\n disabled={props.disabled}\n onValueChange={(id) => {\n if (id === null || id === CUSTOM) return\n props.onValueChange(id === NONE ? null : id)\n }}\n class={cn(\n row()\n ? 'grid min-w-0 flex-1 auto-cols-fr grid-flow-col'\n : 'flex flex-wrap items-center gap-2'\n )}\n >\n <Show when={inherit()}>\n <SwatchItem id={NONE} label={props.inheritLabel ?? 'Inherit (default)'} row={row()}>\n <InheritSwatch />\n </SwatchItem>\n </Show>\n <For each={props.options ?? accents}>\n {(option) => {\n const light = () => option.light ?? ''\n const dark = () => option.dark ?? option.light ?? ''\n return (\n <SwatchItem id={option.id} label={option.label} row={row()}>\n <svg class=\"size-full\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <Show\n when={props.appearance}\n fallback={\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n class=\"fill-(--swatch-light) dark:fill-(--swatch-dark)\"\n style={{ '--swatch-light': light(), '--swatch-dark': dark() }}\n />\n }\n >\n {(appearance) => (\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"8\"\n fill={appearance() === 'light' ? light() : dark()}\n />\n )}\n </Show>\n </svg>\n </SwatchItem>\n )\n }}\n </For>\n </SdkRadioGroup>\n <Show when={props.custom ?? true}>\n <CustomColorPopover\n value={customValue()}\n seed={props.customSeed ?? DEFAULT_CUSTOM_SEED}\n disabled={props.disabled}\n onCommit={commitCustom}\n />\n <Input\n type=\"color\"\n // `w-px` beats the Input's own `w-full` and keeps the hidden field from sizing a narrow panel's scroll width.\n class=\"sr-only w-px\"\n tabindex={-1}\n aria-label=\"Custom accent color\"\n value={customValue() ?? props.customSeed ?? DEFAULT_CUSTOM_SEED}\n disabled={props.disabled}\n onChange={(event) => commitCustom(event.currentTarget.value)}\n />\n </Show>\n </div>\n )\n}\n\n/**\n * The \"inherit\" swatch: a black disc with a red slash, the universal \"no\n * override\" mark. It is drawn rather than painted from a token so it reads the\n * same in every theme and appearance.\n */\nfunction InheritSwatch() {\n return (\n <span\n aria-hidden=\"true\"\n data-slot=\"swatch-inherit\"\n class=\"relative block size-full overflow-hidden rounded-full bg-(--swatch-inherit)\"\n style={{ '--swatch-inherit': '#000' }}\n >\n <span class=\"absolute inset-x-0 top-1/2 h-0.5 -translate-y-1/2 -rotate-45 bg-destructive\" />\n </span>\n )\n}\n\nfunction SwatchItem(props: { id: string; label: string; row: boolean; children: JSX.Element }) {\n // The wrapper keeps the option's hook and the row layout; the swatch itself\n // is ui-sdk's `role=\"radio\"` button, with its hidden native radio beside it.\n return (\n <div data-accent-option={props.id} class={props.row ? 'flex justify-center' : 'contents'}>\n {/* A picker shows a dozen swatches; each builds its tooltip on first hover. */}\n <LazyTooltip content={props.label}>\n {(tip) => (\n <SdkRadio\n value={props.id}\n ref={tip.ref}\n aria-describedby={tip.describedBy()}\n onPointerEnter={tip.onPointerEnter}\n onFocus={tip.onFocus}\n class={cn(\n 'flex cursor-pointer items-center justify-center rounded-full border border-border p-0.5 outline-none',\n props.row ? 'size-6' : 'size-7',\n 'focus-visible:border-ring focus-visible:focus-outline',\n 'data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50'\n )}\n >\n {props.children}\n <span class=\"sr-only\">{props.label}</span>\n </SdkRadio>\n )}\n </LazyTooltip>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAoEA,IAAM,OAAO;AACb,IAAM,SAAS;AACf,IAAM,MAAM;AACZ,IAAM,sBAAsB;;AAG5B,SAAgB,oBAAoB,OAAyD;CAC3F,OAAO,OAAO,UAAU,YAAY,IAAI,KAAK,KAAK;AACpD;AAEA,SAAgB,aAAa,OAA0B;CACrD,MAAM,oBACJ,oBAAoB,MAAM,KAAK,IAAI,MAAM,MAAM,YAAY,IAAI,KAAA;CACjE,MAAM,gBAAgB,MAAM,WAAW;CACvC,MAAM,YAAY,MAAM,WAAW;CACnC,MAAM,mBAAoB,YAAY,IAAI,SAAU,MAAM,SAAS;CAKnE,MAAM,gBAAgB,QAAgB;EACpC,MAAM,QAAQ,IAAI,KAAK,CAAC,CAAC,YAAY;EAErC,IAAI,IAAI,KAAK,KAAK,KAAK,UAAU,YAAY,GAAG,MAAM,cAAc,KAAK;CAC3E;CAGE,IAAA,OAAA,OA6EK;CA7EL,IAAA,QAAA,KAAA;;CAKEA,OAAAA,MAAAA,gBAAAA,YAAAA;EACEC,SAAS,gBAAS;GAA0C,IAAA,QAAA,QAAA;GAAjC4B,OAAA,OAAA,CAAA,MAAA,EAAM,aAAA,gBAAA,CAAA,GAAA,KAAA;GAAf,OAAA;EAA0C,EAAA,CAAA;EAC5D,IAAA,eAAA;GAAY,OAAA,MAAM;EAAK;EACvB,IAAA,QAAA;GAAO,OAAA,WAAW;EAAC;EACnB,IAAA,WAAA;GAA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gBAAAA,OAAAA;GACE,IAAA,QAAA;IAAO,OAAA,MAAM;GAAE;GACf,IAAA,IAAA;IAAK,IAAA,QAAA,IAAI;IAAT,OAAA,UAAA,cAAA,MAAA,QAAA,KAAY,IAAZC,SAAAA,OAAAA,EAAY,IAAZ,IAAS,MAATA;GAAY;GACZ,IAAA,qBAAA;IAAkB,OAAA,IAAI,YAAY;GAAC;GACnC,IAAA,iBAAA;IAAgB,OAAA,IAAI;GAAc;GAClC,IAAA,UAAA;IAAS,OAAA,IAAI;GAAO;GACpB,IAAA,UAAA;IAAO,OAAA,GACL,wGACA,MAAM,MAAM,WAAW,UACvB,yDACA,mFACA,gEACF;GAAC;GAZH,IAAA,WAAA;IAaC,OAAA,CACEC,WAAAA;KAAM,OAAA,MAAA;IAAO,CAAA,UACd;KAAyC,IAAA,SAAA,QAAA;KAAzCG,OAAA,cAAsB;MAAC,OAAA,MAAM;KAAK,CAAO;KAAzC,OAAA;IAAyC,EAAA,CAAA,CAD1C;GAES;;CAED,CAAA,CACV;CAvBAE,aAAA;;GAAoB,GAAA,MAAM;GAAIJ,GAAAA,YAAO,MAAM,MAAM,wBAAwB,UAAU;EAAvD;CAA5B,IAAA,EAAA,GAAA,KAAA,QAAA;EAA4B,MAAA,KAAA,KAAAM,aAAA,OAAA,sBAAA,CAAA;EAAEE,UAAA,OAAA,GAAA,KAAA,CAAqD;CAAvD,CAAA;CADnC,OACEP;AAyBJ"}
@@ -240,7 +240,7 @@ function DragArea(props) {
240
240
  t: props.max,
241
241
  a: props.value,
242
242
  o: props.valueText,
243
- i: readShallow(cn("relative w-full cursor-crosshair touch-none border border-border outline-none", "focus-visible:ring-3 focus-visible:ring-primary-subtle", props.class)),
243
+ i: readShallow(cn("relative w-full cursor-crosshair touch-none border border-border outline-none", "focus-visible:focus-outline", props.class)),
244
244
  n: readShallow(props.style),
245
245
  s: `${props.thumb.x * 100}%`,
246
246
  h: `${props.thumb.y * 100}%`
@@ -1 +1 @@
1
- {"version":3,"file":"custom-color-popover.js","names":["<Popover\n open={open()}\n onOpenChange={(next) => {\n if (next) start()\n setOpen(next)\n }}\n placement=\"bottom-end\"\n >\n <PopoverTrigger\n // The trigger part stamps its own `data-slot`; the Custom button keeps\n // `swatch-custom` by setting it after the part's props.\n as={(trigger: ButtonProps) => <Button {...trigger} data-slot=\"swatch-custom\" />}\n type=\"button\"\n variant={props.value ? 'secondary' : 'outline'}\n size=\"sm\"\n disabled={props.disabled}\n aria-pressed={props.value !== undefined ? 'true' : 'false'}\n class=\"shrink-0 gap-1.5\"\n >\n <Show when={props.value}>\n {(color) => (\n <span\n aria-hidden=\"true\"\n data-slot=\"swatch-custom-chip\"\n class=\"size-3 rounded-full border border-border bg-(--swatch-custom)\"\n style={{ '--swatch-custom': color() }}\n />\n )}\n </Show>\n Custom\n </PopoverTrigger>\n <PopoverContent class=\"w-60\" aria-label=\"Custom colour\">\n <div class=\"flex flex-col gap-3\" data-slot=\"custom-color\">\n <DragArea\n label=\"Saturation and brightness\"\n value={Math.round(draft().s * 100)}\n max={100}\n valueText={`Saturation ${Math.round(draft().s * 100)}%, brightness ${Math.round(draft().v * 100)}%`}\n class=\"h-36 rounded-md\"\n style={{\n 'background-image': `linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${draft().h} 100% 50%))`,\n }}\n thumb={{ x: draft().s, y: 1 - draft().v }}\n onPoint={(x, y) => update({ s: x, v: 1 - y })}\n onStep={(dx, dy) => update({ s: clamp(current.s + dx), v: clamp(current.v - dy) })}\n />\n <DragArea\n label=\"Hue\"\n value={Math.round(draft().h)}\n max={360}\n valueText={`${Math.round(draft().h)} degrees`}\n class=\"h-3 rounded-full\"\n style={{\n 'background-image':\n 'linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)',\n }}\n thumb={{ x: draft().h / 360, y: 0.5 }}\n onPoint={(x) => update({ h: Math.min(359.99, x * 360) })}\n onStep={(dx) => update({ h: Math.min(359.99, Math.max(0, current.h + dx * 360)) })}\n />\n <div class=\"flex items-center gap-2\">\n <span\n aria-hidden=\"true\"\n class=\"size-8 shrink-0 rounded-md border border-border bg-(--swatch-draft)\"\n style={{ '--swatch-draft': draftHex() }}\n />\n <Input\n aria-label=\"Hex colour\"\n class=\"min-w-0 flex-1 font-mono\"\n value={hexText()}\n maxlength={7}\n spellcheck={false}\n aria-invalid={typedHex() ? undefined : 'true'}\n onInput={(event) => {\n const text = event.currentTarget.value.trim()\n write(parseHex(text) ?? current, text)\n }}\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.preventDefault()\n commit()\n }\n }}\n />\n <Button type=\"button\" size=\"sm\" disabled={!typedHex()} onClick={commit}>\n Apply\n </Button>\n </div>\n </div>\n </PopoverContent>\n </Popover>","onOpenChange={(next) => {\n if (next) start()\n setOpen(next)\n }}","placement=\"bottom-end\"","<PopoverTrigger\n // The trigger part stamps its own `data-slot`; the Custom button keeps\n // `swatch-custom` by setting it after the part's props.\n as={(trigger: ButtonProps) => <Button {...trigger} data-slot=\"swatch-custom\" />}\n type=\"button\"\n variant={props.value ? 'secondary' : 'outline'}\n size=\"sm\"\n disabled={props.disabled}\n aria-pressed={props.value !== undefined ? 'true' : 'false'}\n class=\"shrink-0 gap-1.5\"\n >\n <Show when={props.value}>\n {(color) => (\n <span\n aria-hidden=\"true\"\n data-slot=\"swatch-custom-chip\"\n class=\"size-3 rounded-full border border-border bg-(--swatch-custom)\"\n style={{ '--swatch-custom': color() }}\n />\n )}\n </Show>\n Custom\n </PopoverTrigger>","as={(trigger: ButtonProps) => <Button {...trigger} data-slot=\"swatch-custom\" />}","<Button {...trigger} data-slot=\"swatch-custom\" />","type=\"button\"","size=\"sm\"","class=\"shrink-0 gap-1.5\"","<Show when={props.value}>\n {(color) => (\n <span\n aria-hidden=\"true\"\n data-slot=\"swatch-custom-chip\"\n class=\"size-3 rounded-full border border-border bg-(--swatch-custom)\"\n style={{ '--swatch-custom': color() }}\n />\n )}\n </Show>","<PopoverContent class=\"w-60\" aria-label=\"Custom colour\">\n <div class=\"flex flex-col gap-3\" data-slot=\"custom-color\">\n <DragArea\n label=\"Saturation and brightness\"\n value={Math.round(draft().s * 100)}\n max={100}\n valueText={`Saturation ${Math.round(draft().s * 100)}%, brightness ${Math.round(draft().v * 100)}%`}\n class=\"h-36 rounded-md\"\n style={{\n 'background-image': `linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${draft().h} 100% 50%))`,\n }}\n thumb={{ x: draft().s, y: 1 - draft().v }}\n onPoint={(x, y) => update({ s: x, v: 1 - y })}\n onStep={(dx, dy) => update({ s: clamp(current.s + dx), v: clamp(current.v - dy) })}\n />\n <DragArea\n label=\"Hue\"\n value={Math.round(draft().h)}\n max={360}\n valueText={`${Math.round(draft().h)} degrees`}\n class=\"h-3 rounded-full\"\n style={{\n 'background-image':\n 'linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)',\n }}\n thumb={{ x: draft().h / 360, y: 0.5 }}\n onPoint={(x) => update({ h: Math.min(359.99, x * 360) })}\n onStep={(dx) => update({ h: Math.min(359.99, Math.max(0, current.h + dx * 360)) })}\n />\n <div class=\"flex items-center gap-2\">\n <span\n aria-hidden=\"true\"\n class=\"size-8 shrink-0 rounded-md border border-border bg-(--swatch-draft)\"\n style={{ '--swatch-draft': draftHex() }}\n />\n <Input\n aria-label=\"Hex colour\"\n class=\"min-w-0 flex-1 font-mono\"\n value={hexText()}\n maxlength={7}\n spellcheck={false}\n aria-invalid={typedHex() ? undefined : 'true'}\n onInput={(event) => {\n const text = event.currentTarget.value.trim()\n write(parseHex(text) ?? current, text)\n }}\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.preventDefault()\n commit()\n }\n }}\n />\n <Button type=\"button\" size=\"sm\" disabled={!typedHex()} onClick={commit}>\n Apply\n </Button>\n </div>\n </div>\n </PopoverContent>","class=\"w-60\"","<DragArea\n label=\"Saturation and brightness\"\n value={Math.round(draft().s * 100)}\n max={100}\n valueText={`Saturation ${Math.round(draft().s * 100)}%, brightness ${Math.round(draft().v * 100)}%`}\n class=\"h-36 rounded-md\"\n style={{\n 'background-image': `linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${draft().h} 100% 50%))`,\n }}\n thumb={{ x: draft().s, y: 1 - draft().v }}\n onPoint={(x, y) => update({ s: x, v: 1 - y })}\n onStep={(dx, dy) => update({ s: clamp(current.s + dx), v: clamp(current.v - dy) })}\n />","label=\"Saturation and brightness\"","max={100}","class=\"h-36 rounded-md\"","onPoint={(x, y) => update({ s: x, v: 1 - y })}","onStep={(dx, dy) => update({ s: clamp(current.s + dx), v: clamp(current.v - dy) })}","<div class=\"flex flex-col gap-3\" data-slot=\"custom-color\">\n <DragArea\n label=\"Saturation and brightness\"\n value={Math.round(draft().s * 100)}\n max={100}\n valueText={`Saturation ${Math.round(draft().s * 100)}%, brightness ${Math.round(draft().v * 100)}%`}\n class=\"h-36 rounded-md\"\n style={{\n 'background-image': `linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${draft().h} 100% 50%))`,\n }}\n thumb={{ x: draft().s, y: 1 - draft().v }}\n onPoint={(x, y) => update({ s: x, v: 1 - y })}\n onStep={(dx, dy) => update({ s: clamp(current.s + dx), v: clamp(current.v - dy) })}\n />\n <DragArea\n label=\"Hue\"\n value={Math.round(draft().h)}\n max={360}\n valueText={`${Math.round(draft().h)} degrees`}\n class=\"h-3 rounded-full\"\n style={{\n 'background-image':\n 'linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)',\n }}\n thumb={{ x: draft().h / 360, y: 0.5 }}\n onPoint={(x) => update({ h: Math.min(359.99, x * 360) })}\n onStep={(dx) => update({ h: Math.min(359.99, Math.max(0, current.h + dx * 360)) })}\n />\n <div class=\"flex items-center gap-2\">\n <span\n aria-hidden=\"true\"\n class=\"size-8 shrink-0 rounded-md border border-border bg-(--swatch-draft)\"\n style={{ '--swatch-draft': draftHex() }}\n />\n <Input\n aria-label=\"Hex colour\"\n class=\"min-w-0 flex-1 font-mono\"\n value={hexText()}\n maxlength={7}\n spellcheck={false}\n aria-invalid={typedHex() ? undefined : 'true'}\n onInput={(event) => {\n const text = event.currentTarget.value.trim()\n write(parseHex(text) ?? current, text)\n }}\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.preventDefault()\n commit()\n }\n }}\n />\n <Button type=\"button\" size=\"sm\" disabled={!typedHex()} onClick={commit}>\n Apply\n </Button>\n </div>\n </div>","<DragArea\n label=\"Hue\"\n value={Math.round(draft().h)}\n max={360}\n valueText={`${Math.round(draft().h)} degrees`}\n class=\"h-3 rounded-full\"\n style={{\n 'background-image':\n 'linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)',\n }}\n thumb={{ x: draft().h / 360, y: 0.5 }}\n onPoint={(x) => update({ h: Math.min(359.99, x * 360) })}\n onStep={(dx) => update({ h: Math.min(359.99, Math.max(0, current.h + dx * 360)) })}\n />","label=\"Hue\"","max={360}","class=\"h-3 rounded-full\"","style={{\n 'background-image':\n 'linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)',\n }}","onPoint={(x) => update({ h: Math.min(359.99, x * 360) })}","onStep={(dx) => update({ h: Math.min(359.99, Math.max(0, current.h + dx * 360)) })}","<Input\n aria-label=\"Hex colour\"\n class=\"min-w-0 flex-1 font-mono\"\n value={hexText()}\n maxlength={7}\n spellcheck={false}\n aria-invalid={typedHex() ? undefined : 'true'}\n onInput={(event) => {\n const text = event.currentTarget.value.trim()\n write(parseHex(text) ?? current, text)\n }}\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.preventDefault()\n commit()\n }\n }}\n />","class=\"min-w-0 flex-1 font-mono\"","maxlength={7}","spellcheck={false}","onInput={(event) => {\n const text = event.currentTarget.value.trim()\n write(parseHex(text) ?? current, text)\n }}","onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.preventDefault()\n commit()\n }\n }}","<div class=\"flex items-center gap-2\">\n <span\n aria-hidden=\"true\"\n class=\"size-8 shrink-0 rounded-md border border-border bg-(--swatch-draft)\"\n style={{ '--swatch-draft': draftHex() }}\n />\n <Input\n aria-label=\"Hex colour\"\n class=\"min-w-0 flex-1 font-mono\"\n value={hexText()}\n maxlength={7}\n spellcheck={false}\n aria-invalid={typedHex() ? undefined : 'true'}\n onInput={(event) => {\n const text = event.currentTarget.value.trim()\n write(parseHex(text) ?? current, text)\n }}\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.preventDefault()\n commit()\n }\n }}\n />\n <Button type=\"button\" size=\"sm\" disabled={!typedHex()} onClick={commit}>\n Apply\n </Button>\n </div>","<Button type=\"button\" size=\"sm\" disabled={!typedHex()} onClick={commit}>\n Apply\n </Button>","onClick={commit}","ref={(element: HTMLDivElement) => {\n element.addEventListener('pointerdown', (event) => {\n element.setPointerCapture?.(event.pointerId)\n point(event)\n })\n element.addEventListener('pointermove', (event) => {\n if (event.buttons & 1) point(event)\n })\n element.addEventListener('keydown', (event) => {\n const step = event.shiftKey ? 0.1 : 0.02\n const moves: Record<string, [number, number]> = {\n ArrowLeft: [-step, 0],\n ArrowRight: [step, 0],\n ArrowUp: [0, -step],\n ArrowDown: [0, step],\n }\n const move = moves[event.key]\n if (!move) return\n event.preventDefault()\n props.onStep(move[0], move[1])\n })\n }}","aria-valuemax={props.max}","aria-valuenow={props.value}","aria-valuetext={props.valueText}","class={cn(\n 'relative w-full cursor-crosshair touch-none border border-border outline-none',\n 'focus-visible:ring-3 focus-visible:ring-primary-subtle',\n props.class\n )}","style={props.style}","left: `${props.thumb.x * 100}%`","top: `${props.thumb.y * 100}%`","<div\n role=\"slider\"\n tabindex={0}\n aria-label={props.label}\n aria-valuemin={0}\n aria-valuemax={props.max}\n aria-valuenow={props.value}\n aria-valuetext={props.valueText}\n data-slot=\"custom-color-area\"\n class={cn(\n 'relative w-full cursor-crosshair touch-none border border-border outline-none',\n 'focus-visible:ring-3 focus-visible:ring-primary-subtle',\n props.class\n )}\n style={props.style}\n ref={(element: HTMLDivElement) => {\n element.addEventListener('pointerdown', (event) => {\n element.setPointerCapture?.(event.pointerId)\n point(event)\n })\n element.addEventListener('pointermove', (event) => {\n if (event.buttons & 1) point(event)\n })\n element.addEventListener('keydown', (event) => {\n const step = event.shiftKey ? 0.1 : 0.02\n const moves: Record<string, [number, number]> = {\n ArrowLeft: [-step, 0],\n ArrowRight: [step, 0],\n ArrowUp: [0, -step],\n ArrowDown: [0, step],\n }\n const move = moves[event.key]\n if (!move) return\n event.preventDefault()\n props.onStep(move[0], move[1])\n })\n }}\n >\n <span\n aria-hidden=\"true\"\n class=\"pointer-events-none absolute size-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-background shadow-sm ring-1 ring-border\"\n style={{ left: `${props.thumb.x * 100}%`, top: `${props.thumb.y * 100}%` }}\n />\n </div>","_$effect","_$setStyleProperty","_$insert","_$ref","_$setAttribute","_$className","_$style"],"sources":["../../../../src/components/composites/accent-picker/custom-color-popover.tsx"],"sourcesContent":["import type { JSX } from '@solidjs/web'\nimport { Show, createSignal } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Button, type ButtonProps } from '../../ui/button'\nimport { Input } from '../../ui/input'\nimport { Popover, PopoverContent, PopoverTrigger } from '../../ui/popover'\nimport { clamp, hexToHsv, hsvToHex, type Hsv } from './color-math'\n\n/** A typed hex, with or without its `#`, or `undefined` while it is not a colour yet. */\nfunction parseHex(raw: string) {\n const text = raw.trim()\n return hexToHsv(text.startsWith('#') ? text : `#${text}`)\n}\n\n/**\n * The Custom entry of the accent picker: a button that opens a colour picker\n * anchored right under it, right edges aligned since Custom ends the row (a\n * saturation/brightness field, a hue strip and a hex field). Nothing is committed while the colour is being explored; Apply (or\n * Enter in the hex field) commits it and closes, Escape or a click outside\n * leaves the stored colour alone. The operating system's colour panel is not\n * used because on macOS it floats wherever it was last left, not by the button.\n */\nexport function CustomColorPopover(props: {\n /** The stored custom colour, or `undefined` while a preset or inherit is chosen. */\n value: string | undefined\n /** Where the picker starts while no custom colour is stored. */\n seed: string\n disabled?: boolean\n onCommit(value: `#${string}`): void\n}) {\n const [open, setOpen] = createSignal(false)\n const [draft, setDraft] = createSignal<Hsv>({ h: 0, s: 0, v: 0 })\n const [hexText, setHexText] = createSignal('')\n // Signal reads lag their writes until the next flush, and one gesture can\n // write twice before then (a pointer on the hue strip, then on the field; a\n // typed hex, then Enter). The handlers therefore work from these plain\n // copies of what they last wrote; the signals only drive what is drawn.\n let current: Hsv = { h: 0, s: 0, v: 0 }\n let currentText = ''\n const draftHex = () => hsvToHex(draft())\n // The hex field is what Apply commits, so text that is not a colour yet blocks it.\n const typedHex = () => parseHex(hexText())\n\n const write = (next: Hsv, text: string = hsvToHex(next)) => {\n current = next\n currentText = text\n setDraft(next)\n setHexText(text)\n }\n const start = () => {\n write(hexToHsv(props.value ?? props.seed) ?? { h: 262, s: 0.8, v: 0.9 })\n }\n const update = (patch: Partial<Hsv>) => write({ ...current, ...patch })\n const commit = () => {\n if (!parseHex(currentText)) return\n props.onCommit(hsvToHex(current))\n setOpen(false)\n }\n\n return (\n <Popover\n open={open()}\n onOpenChange={(next) => {\n if (next) start()\n setOpen(next)\n }}\n placement=\"bottom-end\"\n >\n <PopoverTrigger\n // The trigger part stamps its own `data-slot`; the Custom button keeps\n // `swatch-custom` by setting it after the part's props.\n as={(trigger: ButtonProps) => <Button {...trigger} data-slot=\"swatch-custom\" />}\n type=\"button\"\n variant={props.value ? 'secondary' : 'outline'}\n size=\"sm\"\n disabled={props.disabled}\n aria-pressed={props.value !== undefined ? 'true' : 'false'}\n class=\"shrink-0 gap-1.5\"\n >\n <Show when={props.value}>\n {(color) => (\n <span\n aria-hidden=\"true\"\n data-slot=\"swatch-custom-chip\"\n class=\"size-3 rounded-full border border-border bg-(--swatch-custom)\"\n style={{ '--swatch-custom': color() }}\n />\n )}\n </Show>\n Custom\n </PopoverTrigger>\n <PopoverContent class=\"w-60\" aria-label=\"Custom colour\">\n <div class=\"flex flex-col gap-3\" data-slot=\"custom-color\">\n <DragArea\n label=\"Saturation and brightness\"\n value={Math.round(draft().s * 100)}\n max={100}\n valueText={`Saturation ${Math.round(draft().s * 100)}%, brightness ${Math.round(draft().v * 100)}%`}\n class=\"h-36 rounded-md\"\n style={{\n 'background-image': `linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${draft().h} 100% 50%))`,\n }}\n thumb={{ x: draft().s, y: 1 - draft().v }}\n onPoint={(x, y) => update({ s: x, v: 1 - y })}\n onStep={(dx, dy) => update({ s: clamp(current.s + dx), v: clamp(current.v - dy) })}\n />\n <DragArea\n label=\"Hue\"\n value={Math.round(draft().h)}\n max={360}\n valueText={`${Math.round(draft().h)} degrees`}\n class=\"h-3 rounded-full\"\n style={{\n 'background-image':\n 'linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)',\n }}\n thumb={{ x: draft().h / 360, y: 0.5 }}\n onPoint={(x) => update({ h: Math.min(359.99, x * 360) })}\n onStep={(dx) => update({ h: Math.min(359.99, Math.max(0, current.h + dx * 360)) })}\n />\n <div class=\"flex items-center gap-2\">\n <span\n aria-hidden=\"true\"\n class=\"size-8 shrink-0 rounded-md border border-border bg-(--swatch-draft)\"\n style={{ '--swatch-draft': draftHex() }}\n />\n <Input\n aria-label=\"Hex colour\"\n class=\"min-w-0 flex-1 font-mono\"\n value={hexText()}\n maxlength={7}\n spellcheck={false}\n aria-invalid={typedHex() ? undefined : 'true'}\n onInput={(event) => {\n const text = event.currentTarget.value.trim()\n write(parseHex(text) ?? current, text)\n }}\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.preventDefault()\n commit()\n }\n }}\n />\n <Button type=\"button\" size=\"sm\" disabled={!typedHex()} onClick={commit}>\n Apply\n </Button>\n </div>\n </div>\n </PopoverContent>\n </Popover>\n )\n}\n\n/**\n * A pointer- and keyboard-driven area reporting a position in [0, 1] on each\n * axis: the saturation/brightness field and the hue strip. Its listeners are\n * attached to the element itself (`addEventListener` from `ref`) rather than\n * delegated, so this module registers nothing on `window.document` when it\n * loads.\n */\nfunction DragArea(props: {\n label: string\n /** The value assistive technology reads, from 0 to `max`; the 2D field reports saturation and names both axes in `valueText`. */\n value: number\n max: number\n valueText: string\n class: string\n style: JSX.CSSProperties\n thumb: { x: number; y: number }\n onPoint(x: number, y: number): void\n onStep(dx: number, dy: number): void\n}) {\n const point = (event: PointerEvent) => {\n const rect = (event.currentTarget as HTMLElement).getBoundingClientRect()\n if (rect.width === 0 || rect.height === 0) return\n props.onPoint(\n clamp((event.clientX - rect.left) / rect.width),\n clamp((event.clientY - rect.top) / rect.height)\n )\n }\n return (\n <div\n role=\"slider\"\n tabindex={0}\n aria-label={props.label}\n aria-valuemin={0}\n aria-valuemax={props.max}\n aria-valuenow={props.value}\n aria-valuetext={props.valueText}\n data-slot=\"custom-color-area\"\n class={cn(\n 'relative w-full cursor-crosshair touch-none border border-border outline-none',\n 'focus-visible:ring-3 focus-visible:ring-primary-subtle',\n props.class\n )}\n style={props.style}\n ref={(element: HTMLDivElement) => {\n element.addEventListener('pointerdown', (event) => {\n element.setPointerCapture?.(event.pointerId)\n point(event)\n })\n element.addEventListener('pointermove', (event) => {\n if (event.buttons & 1) point(event)\n })\n element.addEventListener('keydown', (event) => {\n const step = event.shiftKey ? 0.1 : 0.02\n const moves: Record<string, [number, number]> = {\n ArrowLeft: [-step, 0],\n ArrowRight: [step, 0],\n ArrowUp: [0, -step],\n ArrowDown: [0, step],\n }\n const move = moves[event.key]\n if (!move) return\n event.preventDefault()\n props.onStep(move[0], move[1])\n })\n }}\n >\n <span\n aria-hidden=\"true\"\n class=\"pointer-events-none absolute size-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-background shadow-sm ring-1 ring-border\"\n style={{ left: `${props.thumb.x * 100}%`, top: `${props.thumb.y * 100}%` }}\n />\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;AASA,SAAS,SAAS,KAAa;CAC7B,MAAM,OAAO,IA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AG,MAAM,MAAM,IAAI,IAAI;GAAIC,GAAK,GAAG,MAAM,MAAM,IAAI,IAAI;EAtCjD;CAAvB,IAAA,EAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,KAAA,QAAA;EAAuB,MAAA,KAAA,KAAAM,aAAA,OAAA,cAAA,CAAA;EAEvB,MAAA,KAAA,KAAAA,aAAA,OAAA,iBAAA,CAAwB;EACxB,MAAA,KAAA,KAAAA,aAAA,OAAA,iBAAA,CAA0B;EAC1B,MAAA,KAAA,KAAAA,aAAA,OAAA,kBAAA,CAA+B;EAE/BC,UAAA,OAAA,GAAA,KAAA,CAIC;EACDC,MAAA,OAAA,GAAA,KAAA,CAAkB;EA2BP,MAAA,KAAA,KAAAL,iBAAA,OAAA,QAAA,CAA8B;EAAG,MAAA,KAAA,KAAAA,iBAAA,OAAA,OAAA,CAA6B;CAtClD,CAAA;CAJ3B,OACEF;AA6CJ"}
1
+ {"version":3,"file":"custom-color-popover.js","names":["<Popover\n open={open()}\n onOpenChange={(next) => {\n if (next) start()\n setOpen(next)\n }}\n placement=\"bottom-end\"\n >\n <PopoverTrigger\n // The trigger part stamps its own `data-slot`; the Custom button keeps\n // `swatch-custom` by setting it after the part's props.\n as={(trigger: ButtonProps) => <Button {...trigger} data-slot=\"swatch-custom\" />}\n type=\"button\"\n variant={props.value ? 'secondary' : 'outline'}\n size=\"sm\"\n disabled={props.disabled}\n aria-pressed={props.value !== undefined ? 'true' : 'false'}\n class=\"shrink-0 gap-1.5\"\n >\n <Show when={props.value}>\n {(color) => (\n <span\n aria-hidden=\"true\"\n data-slot=\"swatch-custom-chip\"\n class=\"size-3 rounded-full border border-border bg-(--swatch-custom)\"\n style={{ '--swatch-custom': color() }}\n />\n )}\n </Show>\n Custom\n </PopoverTrigger>\n <PopoverContent class=\"w-60\" aria-label=\"Custom colour\">\n <div class=\"flex flex-col gap-3\" data-slot=\"custom-color\">\n <DragArea\n label=\"Saturation and brightness\"\n value={Math.round(draft().s * 100)}\n max={100}\n valueText={`Saturation ${Math.round(draft().s * 100)}%, brightness ${Math.round(draft().v * 100)}%`}\n class=\"h-36 rounded-md\"\n style={{\n 'background-image': `linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${draft().h} 100% 50%))`,\n }}\n thumb={{ x: draft().s, y: 1 - draft().v }}\n onPoint={(x, y) => update({ s: x, v: 1 - y })}\n onStep={(dx, dy) => update({ s: clamp(current.s + dx), v: clamp(current.v - dy) })}\n />\n <DragArea\n label=\"Hue\"\n value={Math.round(draft().h)}\n max={360}\n valueText={`${Math.round(draft().h)} degrees`}\n class=\"h-3 rounded-full\"\n style={{\n 'background-image':\n 'linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)',\n }}\n thumb={{ x: draft().h / 360, y: 0.5 }}\n onPoint={(x) => update({ h: Math.min(359.99, x * 360) })}\n onStep={(dx) => update({ h: Math.min(359.99, Math.max(0, current.h + dx * 360)) })}\n />\n <div class=\"flex items-center gap-2\">\n <span\n aria-hidden=\"true\"\n class=\"size-8 shrink-0 rounded-md border border-border bg-(--swatch-draft)\"\n style={{ '--swatch-draft': draftHex() }}\n />\n <Input\n aria-label=\"Hex colour\"\n class=\"min-w-0 flex-1 font-mono\"\n value={hexText()}\n maxlength={7}\n spellcheck={false}\n aria-invalid={typedHex() ? undefined : 'true'}\n onInput={(event) => {\n const text = event.currentTarget.value.trim()\n write(parseHex(text) ?? current, text)\n }}\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.preventDefault()\n commit()\n }\n }}\n />\n <Button type=\"button\" size=\"sm\" disabled={!typedHex()} onClick={commit}>\n Apply\n </Button>\n </div>\n </div>\n </PopoverContent>\n </Popover>","onOpenChange={(next) => {\n if (next) start()\n setOpen(next)\n }}","placement=\"bottom-end\"","<PopoverTrigger\n // The trigger part stamps its own `data-slot`; the Custom button keeps\n // `swatch-custom` by setting it after the part's props.\n as={(trigger: ButtonProps) => <Button {...trigger} data-slot=\"swatch-custom\" />}\n type=\"button\"\n variant={props.value ? 'secondary' : 'outline'}\n size=\"sm\"\n disabled={props.disabled}\n aria-pressed={props.value !== undefined ? 'true' : 'false'}\n class=\"shrink-0 gap-1.5\"\n >\n <Show when={props.value}>\n {(color) => (\n <span\n aria-hidden=\"true\"\n data-slot=\"swatch-custom-chip\"\n class=\"size-3 rounded-full border border-border bg-(--swatch-custom)\"\n style={{ '--swatch-custom': color() }}\n />\n )}\n </Show>\n Custom\n </PopoverTrigger>","as={(trigger: ButtonProps) => <Button {...trigger} data-slot=\"swatch-custom\" />}","<Button {...trigger} data-slot=\"swatch-custom\" />","type=\"button\"","size=\"sm\"","class=\"shrink-0 gap-1.5\"","<Show when={props.value}>\n {(color) => (\n <span\n aria-hidden=\"true\"\n data-slot=\"swatch-custom-chip\"\n class=\"size-3 rounded-full border border-border bg-(--swatch-custom)\"\n style={{ '--swatch-custom': color() }}\n />\n )}\n </Show>","<PopoverContent class=\"w-60\" aria-label=\"Custom colour\">\n <div class=\"flex flex-col gap-3\" data-slot=\"custom-color\">\n <DragArea\n label=\"Saturation and brightness\"\n value={Math.round(draft().s * 100)}\n max={100}\n valueText={`Saturation ${Math.round(draft().s * 100)}%, brightness ${Math.round(draft().v * 100)}%`}\n class=\"h-36 rounded-md\"\n style={{\n 'background-image': `linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${draft().h} 100% 50%))`,\n }}\n thumb={{ x: draft().s, y: 1 - draft().v }}\n onPoint={(x, y) => update({ s: x, v: 1 - y })}\n onStep={(dx, dy) => update({ s: clamp(current.s + dx), v: clamp(current.v - dy) })}\n />\n <DragArea\n label=\"Hue\"\n value={Math.round(draft().h)}\n max={360}\n valueText={`${Math.round(draft().h)} degrees`}\n class=\"h-3 rounded-full\"\n style={{\n 'background-image':\n 'linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)',\n }}\n thumb={{ x: draft().h / 360, y: 0.5 }}\n onPoint={(x) => update({ h: Math.min(359.99, x * 360) })}\n onStep={(dx) => update({ h: Math.min(359.99, Math.max(0, current.h + dx * 360)) })}\n />\n <div class=\"flex items-center gap-2\">\n <span\n aria-hidden=\"true\"\n class=\"size-8 shrink-0 rounded-md border border-border bg-(--swatch-draft)\"\n style={{ '--swatch-draft': draftHex() }}\n />\n <Input\n aria-label=\"Hex colour\"\n class=\"min-w-0 flex-1 font-mono\"\n value={hexText()}\n maxlength={7}\n spellcheck={false}\n aria-invalid={typedHex() ? undefined : 'true'}\n onInput={(event) => {\n const text = event.currentTarget.value.trim()\n write(parseHex(text) ?? current, text)\n }}\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.preventDefault()\n commit()\n }\n }}\n />\n <Button type=\"button\" size=\"sm\" disabled={!typedHex()} onClick={commit}>\n Apply\n </Button>\n </div>\n </div>\n </PopoverContent>","class=\"w-60\"","<DragArea\n label=\"Saturation and brightness\"\n value={Math.round(draft().s * 100)}\n max={100}\n valueText={`Saturation ${Math.round(draft().s * 100)}%, brightness ${Math.round(draft().v * 100)}%`}\n class=\"h-36 rounded-md\"\n style={{\n 'background-image': `linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${draft().h} 100% 50%))`,\n }}\n thumb={{ x: draft().s, y: 1 - draft().v }}\n onPoint={(x, y) => update({ s: x, v: 1 - y })}\n onStep={(dx, dy) => update({ s: clamp(current.s + dx), v: clamp(current.v - dy) })}\n />","label=\"Saturation and brightness\"","max={100}","class=\"h-36 rounded-md\"","onPoint={(x, y) => update({ s: x, v: 1 - y })}","onStep={(dx, dy) => update({ s: clamp(current.s + dx), v: clamp(current.v - dy) })}","<div class=\"flex flex-col gap-3\" data-slot=\"custom-color\">\n <DragArea\n label=\"Saturation and brightness\"\n value={Math.round(draft().s * 100)}\n max={100}\n valueText={`Saturation ${Math.round(draft().s * 100)}%, brightness ${Math.round(draft().v * 100)}%`}\n class=\"h-36 rounded-md\"\n style={{\n 'background-image': `linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${draft().h} 100% 50%))`,\n }}\n thumb={{ x: draft().s, y: 1 - draft().v }}\n onPoint={(x, y) => update({ s: x, v: 1 - y })}\n onStep={(dx, dy) => update({ s: clamp(current.s + dx), v: clamp(current.v - dy) })}\n />\n <DragArea\n label=\"Hue\"\n value={Math.round(draft().h)}\n max={360}\n valueText={`${Math.round(draft().h)} degrees`}\n class=\"h-3 rounded-full\"\n style={{\n 'background-image':\n 'linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)',\n }}\n thumb={{ x: draft().h / 360, y: 0.5 }}\n onPoint={(x) => update({ h: Math.min(359.99, x * 360) })}\n onStep={(dx) => update({ h: Math.min(359.99, Math.max(0, current.h + dx * 360)) })}\n />\n <div class=\"flex items-center gap-2\">\n <span\n aria-hidden=\"true\"\n class=\"size-8 shrink-0 rounded-md border border-border bg-(--swatch-draft)\"\n style={{ '--swatch-draft': draftHex() }}\n />\n <Input\n aria-label=\"Hex colour\"\n class=\"min-w-0 flex-1 font-mono\"\n value={hexText()}\n maxlength={7}\n spellcheck={false}\n aria-invalid={typedHex() ? undefined : 'true'}\n onInput={(event) => {\n const text = event.currentTarget.value.trim()\n write(parseHex(text) ?? current, text)\n }}\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.preventDefault()\n commit()\n }\n }}\n />\n <Button type=\"button\" size=\"sm\" disabled={!typedHex()} onClick={commit}>\n Apply\n </Button>\n </div>\n </div>","<DragArea\n label=\"Hue\"\n value={Math.round(draft().h)}\n max={360}\n valueText={`${Math.round(draft().h)} degrees`}\n class=\"h-3 rounded-full\"\n style={{\n 'background-image':\n 'linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)',\n }}\n thumb={{ x: draft().h / 360, y: 0.5 }}\n onPoint={(x) => update({ h: Math.min(359.99, x * 360) })}\n onStep={(dx) => update({ h: Math.min(359.99, Math.max(0, current.h + dx * 360)) })}\n />","label=\"Hue\"","max={360}","class=\"h-3 rounded-full\"","style={{\n 'background-image':\n 'linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)',\n }}","onPoint={(x) => update({ h: Math.min(359.99, x * 360) })}","onStep={(dx) => update({ h: Math.min(359.99, Math.max(0, current.h + dx * 360)) })}","<Input\n aria-label=\"Hex colour\"\n class=\"min-w-0 flex-1 font-mono\"\n value={hexText()}\n maxlength={7}\n spellcheck={false}\n aria-invalid={typedHex() ? undefined : 'true'}\n onInput={(event) => {\n const text = event.currentTarget.value.trim()\n write(parseHex(text) ?? current, text)\n }}\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.preventDefault()\n commit()\n }\n }}\n />","class=\"min-w-0 flex-1 font-mono\"","maxlength={7}","spellcheck={false}","onInput={(event) => {\n const text = event.currentTarget.value.trim()\n write(parseHex(text) ?? current, text)\n }}","onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.preventDefault()\n commit()\n }\n }}","<div class=\"flex items-center gap-2\">\n <span\n aria-hidden=\"true\"\n class=\"size-8 shrink-0 rounded-md border border-border bg-(--swatch-draft)\"\n style={{ '--swatch-draft': draftHex() }}\n />\n <Input\n aria-label=\"Hex colour\"\n class=\"min-w-0 flex-1 font-mono\"\n value={hexText()}\n maxlength={7}\n spellcheck={false}\n aria-invalid={typedHex() ? undefined : 'true'}\n onInput={(event) => {\n const text = event.currentTarget.value.trim()\n write(parseHex(text) ?? current, text)\n }}\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.preventDefault()\n commit()\n }\n }}\n />\n <Button type=\"button\" size=\"sm\" disabled={!typedHex()} onClick={commit}>\n Apply\n </Button>\n </div>","<Button type=\"button\" size=\"sm\" disabled={!typedHex()} onClick={commit}>\n Apply\n </Button>","onClick={commit}","ref={(element: HTMLDivElement) => {\n element.addEventListener('pointerdown', (event) => {\n element.setPointerCapture?.(event.pointerId)\n point(event)\n })\n element.addEventListener('pointermove', (event) => {\n if (event.buttons & 1) point(event)\n })\n element.addEventListener('keydown', (event) => {\n const step = event.shiftKey ? 0.1 : 0.02\n const moves: Record<string, [number, number]> = {\n ArrowLeft: [-step, 0],\n ArrowRight: [step, 0],\n ArrowUp: [0, -step],\n ArrowDown: [0, step],\n }\n const move = moves[event.key]\n if (!move) return\n event.preventDefault()\n props.onStep(move[0], move[1])\n })\n }}","aria-valuemax={props.max}","aria-valuenow={props.value}","aria-valuetext={props.valueText}","class={cn(\n 'relative w-full cursor-crosshair touch-none border border-border outline-none',\n 'focus-visible:focus-outline',\n props.class\n )}","style={props.style}","left: `${props.thumb.x * 100}%`","top: `${props.thumb.y * 100}%`","<div\n role=\"slider\"\n tabindex={0}\n aria-label={props.label}\n aria-valuemin={0}\n aria-valuemax={props.max}\n aria-valuenow={props.value}\n aria-valuetext={props.valueText}\n data-slot=\"custom-color-area\"\n class={cn(\n 'relative w-full cursor-crosshair touch-none border border-border outline-none',\n 'focus-visible:focus-outline',\n props.class\n )}\n style={props.style}\n ref={(element: HTMLDivElement) => {\n element.addEventListener('pointerdown', (event) => {\n element.setPointerCapture?.(event.pointerId)\n point(event)\n })\n element.addEventListener('pointermove', (event) => {\n if (event.buttons & 1) point(event)\n })\n element.addEventListener('keydown', (event) => {\n const step = event.shiftKey ? 0.1 : 0.02\n const moves: Record<string, [number, number]> = {\n ArrowLeft: [-step, 0],\n ArrowRight: [step, 0],\n ArrowUp: [0, -step],\n ArrowDown: [0, step],\n }\n const move = moves[event.key]\n if (!move) return\n event.preventDefault()\n props.onStep(move[0], move[1])\n })\n }}\n >\n <span\n aria-hidden=\"true\"\n class=\"pointer-events-none absolute size-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-background shadow-sm ring-1 ring-border\"\n style={{ left: `${props.thumb.x * 100}%`, top: `${props.thumb.y * 100}%` }}\n />\n </div>","_$effect","_$setStyleProperty","_$insert","_$ref","_$setAttribute","_$className","_$style"],"sources":["../../../../src/components/composites/accent-picker/custom-color-popover.tsx"],"sourcesContent":["import type { JSX } from '@solidjs/web'\nimport { Show, createSignal } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Button, type ButtonProps } from '../../ui/button'\nimport { Input } from '../../ui/input'\nimport { Popover, PopoverContent, PopoverTrigger } from '../../ui/popover'\nimport { clamp, hexToHsv, hsvToHex, type Hsv } from './color-math'\n\n/** A typed hex, with or without its `#`, or `undefined` while it is not a colour yet. */\nfunction parseHex(raw: string) {\n const text = raw.trim()\n return hexToHsv(text.startsWith('#') ? text : `#${text}`)\n}\n\n/**\n * The Custom entry of the accent picker: a button that opens a colour picker\n * anchored right under it, right edges aligned since Custom ends the row (a\n * saturation/brightness field, a hue strip and a hex field). Nothing is committed while the colour is being explored; Apply (or\n * Enter in the hex field) commits it and closes, Escape or a click outside\n * leaves the stored colour alone. The operating system's colour panel is not\n * used because on macOS it floats wherever it was last left, not by the button.\n */\nexport function CustomColorPopover(props: {\n /** The stored custom colour, or `undefined` while a preset or inherit is chosen. */\n value: string | undefined\n /** Where the picker starts while no custom colour is stored. */\n seed: string\n disabled?: boolean\n onCommit(value: `#${string}`): void\n}) {\n const [open, setOpen] = createSignal(false)\n const [draft, setDraft] = createSignal<Hsv>({ h: 0, s: 0, v: 0 })\n const [hexText, setHexText] = createSignal('')\n // Signal reads lag their writes until the next flush, and one gesture can\n // write twice before then (a pointer on the hue strip, then on the field; a\n // typed hex, then Enter). The handlers therefore work from these plain\n // copies of what they last wrote; the signals only drive what is drawn.\n let current: Hsv = { h: 0, s: 0, v: 0 }\n let currentText = ''\n const draftHex = () => hsvToHex(draft())\n // The hex field is what Apply commits, so text that is not a colour yet blocks it.\n const typedHex = () => parseHex(hexText())\n\n const write = (next: Hsv, text: string = hsvToHex(next)) => {\n current = next\n currentText = text\n setDraft(next)\n setHexText(text)\n }\n const start = () => {\n write(hexToHsv(props.value ?? props.seed) ?? { h: 262, s: 0.8, v: 0.9 })\n }\n const update = (patch: Partial<Hsv>) => write({ ...current, ...patch })\n const commit = () => {\n if (!parseHex(currentText)) return\n props.onCommit(hsvToHex(current))\n setOpen(false)\n }\n\n return (\n <Popover\n open={open()}\n onOpenChange={(next) => {\n if (next) start()\n setOpen(next)\n }}\n placement=\"bottom-end\"\n >\n <PopoverTrigger\n // The trigger part stamps its own `data-slot`; the Custom button keeps\n // `swatch-custom` by setting it after the part's props.\n as={(trigger: ButtonProps) => <Button {...trigger} data-slot=\"swatch-custom\" />}\n type=\"button\"\n variant={props.value ? 'secondary' : 'outline'}\n size=\"sm\"\n disabled={props.disabled}\n aria-pressed={props.value !== undefined ? 'true' : 'false'}\n class=\"shrink-0 gap-1.5\"\n >\n <Show when={props.value}>\n {(color) => (\n <span\n aria-hidden=\"true\"\n data-slot=\"swatch-custom-chip\"\n class=\"size-3 rounded-full border border-border bg-(--swatch-custom)\"\n style={{ '--swatch-custom': color() }}\n />\n )}\n </Show>\n Custom\n </PopoverTrigger>\n <PopoverContent class=\"w-60\" aria-label=\"Custom colour\">\n <div class=\"flex flex-col gap-3\" data-slot=\"custom-color\">\n <DragArea\n label=\"Saturation and brightness\"\n value={Math.round(draft().s * 100)}\n max={100}\n valueText={`Saturation ${Math.round(draft().s * 100)}%, brightness ${Math.round(draft().v * 100)}%`}\n class=\"h-36 rounded-md\"\n style={{\n 'background-image': `linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${draft().h} 100% 50%))`,\n }}\n thumb={{ x: draft().s, y: 1 - draft().v }}\n onPoint={(x, y) => update({ s: x, v: 1 - y })}\n onStep={(dx, dy) => update({ s: clamp(current.s + dx), v: clamp(current.v - dy) })}\n />\n <DragArea\n label=\"Hue\"\n value={Math.round(draft().h)}\n max={360}\n valueText={`${Math.round(draft().h)} degrees`}\n class=\"h-3 rounded-full\"\n style={{\n 'background-image':\n 'linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)',\n }}\n thumb={{ x: draft().h / 360, y: 0.5 }}\n onPoint={(x) => update({ h: Math.min(359.99, x * 360) })}\n onStep={(dx) => update({ h: Math.min(359.99, Math.max(0, current.h + dx * 360)) })}\n />\n <div class=\"flex items-center gap-2\">\n <span\n aria-hidden=\"true\"\n class=\"size-8 shrink-0 rounded-md border border-border bg-(--swatch-draft)\"\n style={{ '--swatch-draft': draftHex() }}\n />\n <Input\n aria-label=\"Hex colour\"\n class=\"min-w-0 flex-1 font-mono\"\n value={hexText()}\n maxlength={7}\n spellcheck={false}\n aria-invalid={typedHex() ? undefined : 'true'}\n onInput={(event) => {\n const text = event.currentTarget.value.trim()\n write(parseHex(text) ?? current, text)\n }}\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.preventDefault()\n commit()\n }\n }}\n />\n <Button type=\"button\" size=\"sm\" disabled={!typedHex()} onClick={commit}>\n Apply\n </Button>\n </div>\n </div>\n </PopoverContent>\n </Popover>\n )\n}\n\n/**\n * A pointer- and keyboard-driven area reporting a position in [0, 1] on each\n * axis: the saturation/brightness field and the hue strip. Its listeners are\n * attached to the element itself (`addEventListener` from `ref`) rather than\n * delegated, so this module registers nothing on `window.document` when it\n * loads.\n */\nfunction DragArea(props: {\n label: string\n /** The value assistive technology reads, from 0 to `max`; the 2D field reports saturation and names both axes in `valueText`. */\n value: number\n max: number\n valueText: string\n class: string\n style: JSX.CSSProperties\n thumb: { x: number; y: number }\n onPoint(x: number, y: number): void\n onStep(dx: number, dy: number): void\n}) {\n const point = (event: PointerEvent) => {\n const rect = (event.currentTarget as HTMLElement).getBoundingClientRect()\n if (rect.width === 0 || rect.height === 0) return\n props.onPoint(\n clamp((event.clientX - rect.left) / rect.width),\n clamp((event.clientY - rect.top) / rect.height)\n )\n }\n return (\n <div\n role=\"slider\"\n tabindex={0}\n aria-label={props.label}\n aria-valuemin={0}\n aria-valuemax={props.max}\n aria-valuenow={props.value}\n aria-valuetext={props.valueText}\n data-slot=\"custom-color-area\"\n class={cn(\n 'relative w-full cursor-crosshair touch-none border border-border outline-none',\n 'focus-visible:focus-outline',\n props.class\n )}\n style={props.style}\n ref={(element: HTMLDivElement) => {\n element.addEventListener('pointerdown', (event) => {\n element.setPointerCapture?.(event.pointerId)\n point(event)\n })\n element.addEventListener('pointermove', (event) => {\n if (event.buttons & 1) point(event)\n })\n element.addEventListener('keydown', (event) => {\n const step = event.shiftKey ? 0.1 : 0.02\n const moves: Record<string, [number, number]> = {\n ArrowLeft: [-step, 0],\n ArrowRight: [step, 0],\n ArrowUp: [0, -step],\n ArrowDown: [0, step],\n }\n const move = moves[event.key]\n if (!move) return\n event.preventDefault()\n props.onStep(move[0], move[1])\n })\n }}\n >\n <span\n aria-hidden=\"true\"\n class=\"pointer-events-none absolute size-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-background shadow-sm ring-1 ring-border\"\n style={{ left: `${props.thumb.x * 100}%`, top: `${props.thumb.y * 100}%` }}\n />\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;AASA,SAAS,SAAS,KAAa;CAC7B,MAAM,OAAO,IAAI,KAAK;CACtB,OAAO,SAAS,KAAK,WAAW,GAAG,IAAI,OAAO,IAAI,MAAM;AAC1D;;;;;;;;;AAUA,SAAgB,mBAAmB,OAOhC;CACD,MAAM,CAAC,MAAM,WAAW,aAAa,KAAK;CAC1C,MAAM,CAAC,OAAO,YAAY,aAAkB;EAAE,GAAG;EAAG,GAAG;EAAG,GAAG;CAAE,CAAC;CAChE,MAAM,CAAC,SAAS,cAAc,aAAa,EAAE;CAK7C,IAAI,UAAe;EAAE,GAAG;EAAG,GAAG;EAAG,GAAG;CAAE;CACtC,IAAI,cAAc;CAClB,MAAM,iBAAiB,SAAS,MAAM,CAAC;CAEvC,MAAM,iBAAiB,SAAS,QAAQ,CAAC;CAEzC,MAAM,SAAS,MAAW,OAAe,SAAS,IAAI,MAAM;EAC1D,UAAU;EACV,cAAc;EACd,SAAS,IAAI;EACb,WAAW,IAAI;CACjB;CACA,MAAM,cAAc;EAClB,MAAM,SAAS,MAAM,SAAS,MAAM,IAAI,KAAK;GAAE,GAAG;GAAK,GAAG;GAAK,GAAG;EAAI,CAAC;CACzE;CACA,MAAM,UA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BAAiB,YAAY,UAAU;IAC7C,MAAM,OAAO,MAAM,WAAW,KAAM;IAOpC,MAAM,OAAO;KALX,WAAW,CAAC,CAAC,MAAM,CAAC;KACpB,YAAY,CAAC,MAAM,CAAC;KACpB,SAAS,CAAC,GAAG,CAAC,IAAI;KAClB,WAAW,CAAC,GAAG,IAAI;IAER,EAAM,MAAM;IACzB,IAAI,CAAC,MAAM;IACX,MAAM,eAAe;IACrB,MAAM,OAAO,KAAK,IAAI,KAAK,EAAE;GAC/B,CAAC;EACH;CAAC,GArBDZ,KAqBC;CAjCDS,aAAA;;GAAY,GAAA,MAAM;GAElBR,GAAe,MAAM;GACrBC,GAAe,MAAM;GACrBC,GAAgB,MAAM;GAEtBC,GAAAA,YAAO,GACL,iFACA,+BACA,MAAM,KACR,CAAC;GACDC,GAAAA,YAAO,MAAM,KAAK;GA2BPC,GAAM,GAAG,MAAM,MAAM,IAAI,IAAI;GAAIC,GAAK,GAAG,MAAM,MAAM,IAAI,IAAI;EAtCjD;CAAvB,IAAA,EAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GAAA,KAAA,QAAA;EAAuB,MAAA,KAAA,KAAAM,aAAA,OAAA,cAAA,CAAA;EAEvB,MAAA,KAAA,KAAAA,aAAA,OAAA,iBAAA,CAAwB;EACxB,MAAA,KAAA,KAAAA,aAAA,OAAA,iBAAA,CAA0B;EAC1B,MAAA,KAAA,KAAAA,aAAA,OAAA,kBAAA,CAA+B;EAE/BC,UAAA,OAAA,GAAA,KAAA,CAIC;EACDC,MAAA,OAAA,GAAA,KAAA,CAAkB;EA2BP,MAAA,KAAA,KAAAL,iBAAA,OAAA,QAAA,CAA8B;EAAG,MAAA,KAAA,KAAAA,iBAAA,OAAA,OAAA,CAA6B;CAtClD,CAAA;CAJ3B,OACEF;AA6CJ"}
@@ -105,7 +105,7 @@ function AccentSwatch(props) {
105
105
  effect(() => {
106
106
  return {
107
107
  e: props.id,
108
- t: readShallow(cn("rounded-full focus-within:ring-3 focus-within:ring-ring/50", { "flex justify-center": props.row }))
108
+ t: readShallow(cn("rounded-full focus-within:focus-outline", { "flex justify-center": props.row }))
109
109
  };
110
110
  }, ({ e, t }, _p$) => {
111
111
  e !== _p$?.e && setAttribute(_el$4, "data-accent-option", e);
@@ -1 +1 @@
1
- {"version":3,"file":"accent-swatch-groups.js","names":["<AccentSwatch\n id=\"theme\"\n label=\"Theme default\"\n color={props.themeDefaultColor}\n row={row()}\n />","id=\"theme\"","label=\"Theme default\"","<div\n class={row() ? 'grid auto-cols-fr grid-flow-col' : 'grid grid-cols-4 gap-2'}\n data-accent-grid\n >\n <Show when={props.showThemeDefault ?? true}>\n <AccentSwatch\n id=\"theme\"\n label=\"Theme default\"\n color={props.themeDefaultColor}\n row={row()}\n />\n </Show>\n <For each={presets()}>\n {(option) => (\n <AccentSwatch\n id={option.id}\n label={option.label}\n color={(props.resolvedAppearance === 'light' ? option.light : option.dark) ?? ''}\n row={row()}\n />\n )}\n </For>\n </div>","<For each={presets()}>\n {(option) => (\n <AccentSwatch\n id={option.id}\n label={option.label}\n color={(props.resolvedAppearance === 'light' ? option.light : option.dark) ?? ''}\n row={row()}\n />\n )}\n </For>","<AccentSwatch\n id={option.id}\n label={option.label}\n color={(props.resolvedAppearance === 'light' ? option.light : option.dark) ?? ''}\n row={row()}\n />","<SdkRadio\n value={props.id}\n class={cn(\n 'block cursor-pointer rounded-full border p-0.5 outline-none data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary',\n props.row ? 'size-6' : 'size-7'\n )}\n >\n <Show\n when={props.row}\n fallback={\n <span\n class=\"block size-full rounded-full\"\n aria-hidden=\"true\"\n style={{ 'background-color': props.color }}\n />\n }\n >\n <svg class=\"size-full\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill={props.color} />\n </svg>\n </Show>\n <span class=\"sr-only\">{props.label}</span>\n </SdkRadio>","<Show\n when={props.row}\n fallback={\n <span\n class=\"block size-full rounded-full\"\n aria-hidden=\"true\"\n style={{ 'background-color': props.color }}\n />\n }\n >\n <svg class=\"size-full\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill={props.color} />\n </svg>\n </Show>","<span\n class=\"block size-full rounded-full\"\n aria-hidden=\"true\"\n style={{ 'background-color': props.color }}\n />","<svg class=\"size-full\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill={props.color} />\n </svg>","class={cn('rounded-full focus-within:ring-3 focus-within:ring-ring/50', {\n 'flex justify-center': props.row,\n })}","<div\n data-accent-option={props.id}\n class={cn('rounded-full focus-within:ring-3 focus-within:ring-ring/50', {\n 'flex justify-center': props.row,\n })}\n >\n <SdkRadio\n value={props.id}\n class={cn(\n 'block cursor-pointer rounded-full border p-0.5 outline-none data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary',\n props.row ? 'size-6' : 'size-7'\n )}\n >\n <Show\n when={props.row}\n fallback={\n <span\n class=\"block size-full rounded-full\"\n aria-hidden=\"true\"\n style={{ 'background-color': props.color }}\n />\n }\n >\n <svg class=\"size-full\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill={props.color} />\n </svg>\n </Show>\n <span class=\"sr-only\">{props.label}</span>\n </SdkRadio>\n </div>","_$insert","_$effect","_$readShallow","_$className","_$setStyleProperty","_$setAttribute"],"sources":["../../../../src/components/composites/appearance-editor/accent-swatch-groups.tsx"],"sourcesContent":["/*\n * MIT License\n *\n * Copyright (c) 2026 Wing\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nimport { Radio as SdkRadio } from '@ui-sdk/solid/radio'\nimport { For, Show } from 'solid-js'\nimport { THEME_DEFAULT_ID } from '#lib/theme-defaults'\nimport { cn } from '#lib/utils'\n\ntype AccentOption = Readonly<{\n id: string\n label: string\n light?: string\n dark?: string\n}>\n\nexport type AccentSwatchGroupsProps = {\n accentOptions: readonly AccentOption[]\n resolvedAppearance: 'light' | 'dark'\n themeDefaultColor: string\n /**\n * Whether the group leads with the \"Theme default\" swatch. Hosts whose\n * default accent already is a preset omit it, a second entry for the same\n * colour reads as a duplicate choice.\n */\n showThemeDefault?: boolean\n /**\n * `grid`, the default, wraps at four to a line. `row` keeps every swatch on\n * one line at a smaller size, the columns sharing the width equally, so a\n * narrow panel does not wrap them; each colour is then the fill of an SVG\n * circle, which is where a host that asserts on swatch colours reads it.\n */\n layout?: 'grid' | 'row'\n}\n\n/**\n * The accent choices, as ONE group: the theme's own primary first, then every\n * preset the host feeds, each painted with its value for the resolved\n * appearance, which is what makes the group theme-scoped rather than a\n * catalogue table. The custom-color entry is the host's (`AccentChoices`\n * renders it beside this grid), because whether a free-form colour is accepted\n * is the host's validation to own.\n */\nexport function AccentSwatchGroups(props: AccentSwatchGroupsProps) {\n const presets = () => props.accentOptions.filter((option) => option.id !== THEME_DEFAULT_ID)\n const row = () => props.layout === 'row'\n\n return (\n <div\n class={row() ? 'grid auto-cols-fr grid-flow-col' : 'grid grid-cols-4 gap-2'}\n data-accent-grid\n >\n <Show when={props.showThemeDefault ?? true}>\n <AccentSwatch\n id=\"theme\"\n label=\"Theme default\"\n color={props.themeDefaultColor}\n row={row()}\n />\n </Show>\n <For each={presets()}>\n {(option) => (\n <AccentSwatch\n id={option.id}\n label={option.label}\n color={(props.resolvedAppearance === 'light' ? option.light : option.dark) ?? ''}\n row={row()}\n />\n )}\n </For>\n </div>\n )\n}\n\nfunction AccentSwatch(props: { id: string; label: string; color: string; row: boolean }) {\n return (\n <div\n data-accent-option={props.id}\n class={cn('rounded-full focus-within:ring-3 focus-within:ring-ring/50', {\n 'flex justify-center': props.row,\n })}\n >\n <SdkRadio\n value={props.id}\n class={cn(\n 'block cursor-pointer rounded-full border p-0.5 outline-none data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary',\n props.row ? 'size-6' : 'size-7'\n )}\n >\n <Show\n when={props.row}\n fallback={\n <span\n class=\"block size-full rounded-full\"\n aria-hidden=\"true\"\n style={{ 'background-color': props.color }}\n />\n }\n >\n <svg class=\"size-full\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill={props.color} />\n </svg>\n </Show>\n <span class=\"sr-only\">{props.label}</span>\n </SdkRadio>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA8DA,SAAgB,mBAAmB,OAAgC;CACjE,MAAM,gBAAgB,MAAM,cAAc,QAAQ,WAAW,OAAO,OAAO,gBAAgB;CAC3F,MAAM,YAAY,MAAM,WAAW;CAGjC,IAAA,OAAA,OAsBK;CAtBL,IAAA,QAAA,KAAA;;CAIEY,OAAA,aAAA;;GAAY,OAAA,CAAA,EAAA,MAAM,oBAAoB;EAOhC,CAAA;EAPN,aAAA;GAOM,OAAA,IAAA,IANJZ,gBAAAA,cAAAA;IACEC,IAAG;IACHC,OAAM;IACN,IAAA,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CG,OAAA,aAAsB;KAAC,OAAA,MAAM;IAAK,CAAO;IAAzC,OAAA;GAAyC,EAAA,CAAA,CAd1C;EAeS;CACP,CAAA,CAAA;CA5BHC,aAAA;;GAAoB,GAAA,MAAM;GAC1BH,GAAAA,YAAO,GAAG,8DAA8D,EACtE,uBAAuB,MAAM,IAC/B,CAAC,CAAC;EAH0B;CAA5B,IAAA,EAAA,GAAA,KAAA,QAAA;EAA4B,MAAA,KAAA,KAAAO,aAAA,OAAA,sBAAA,CAAA;EAC5BF,UAAA,OAAA,GAAA,KAAA,CAEE;CAH0B,CAAA;CAFhC,OACEJ;AA+BJ"}
1
+ {"version":3,"file":"accent-swatch-groups.js","names":["<AccentSwatch\n id=\"theme\"\n label=\"Theme default\"\n color={props.themeDefaultColor}\n row={row()}\n />","id=\"theme\"","label=\"Theme default\"","<div\n class={row() ? 'grid auto-cols-fr grid-flow-col' : 'grid grid-cols-4 gap-2'}\n data-accent-grid\n >\n <Show when={props.showThemeDefault ?? true}>\n <AccentSwatch\n id=\"theme\"\n label=\"Theme default\"\n color={props.themeDefaultColor}\n row={row()}\n />\n </Show>\n <For each={presets()}>\n {(option) => (\n <AccentSwatch\n id={option.id}\n label={option.label}\n color={(props.resolvedAppearance === 'light' ? option.light : option.dark) ?? ''}\n row={row()}\n />\n )}\n </For>\n </div>","<For each={presets()}>\n {(option) => (\n <AccentSwatch\n id={option.id}\n label={option.label}\n color={(props.resolvedAppearance === 'light' ? option.light : option.dark) ?? ''}\n row={row()}\n />\n )}\n </For>","<AccentSwatch\n id={option.id}\n label={option.label}\n color={(props.resolvedAppearance === 'light' ? option.light : option.dark) ?? ''}\n row={row()}\n />","<SdkRadio\n value={props.id}\n class={cn(\n 'block cursor-pointer rounded-full border p-0.5 outline-none data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary',\n props.row ? 'size-6' : 'size-7'\n )}\n >\n <Show\n when={props.row}\n fallback={\n <span\n class=\"block size-full rounded-full\"\n aria-hidden=\"true\"\n style={{ 'background-color': props.color }}\n />\n }\n >\n <svg class=\"size-full\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill={props.color} />\n </svg>\n </Show>\n <span class=\"sr-only\">{props.label}</span>\n </SdkRadio>","<Show\n when={props.row}\n fallback={\n <span\n class=\"block size-full rounded-full\"\n aria-hidden=\"true\"\n style={{ 'background-color': props.color }}\n />\n }\n >\n <svg class=\"size-full\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill={props.color} />\n </svg>\n </Show>","<span\n class=\"block size-full rounded-full\"\n aria-hidden=\"true\"\n style={{ 'background-color': props.color }}\n />","<svg class=\"size-full\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill={props.color} />\n </svg>","class={cn('rounded-full focus-within:focus-outline', {\n 'flex justify-center': props.row,\n })}","<div\n data-accent-option={props.id}\n class={cn('rounded-full focus-within:focus-outline', {\n 'flex justify-center': props.row,\n })}\n >\n <SdkRadio\n value={props.id}\n class={cn(\n 'block cursor-pointer rounded-full border p-0.5 outline-none data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary',\n props.row ? 'size-6' : 'size-7'\n )}\n >\n <Show\n when={props.row}\n fallback={\n <span\n class=\"block size-full rounded-full\"\n aria-hidden=\"true\"\n style={{ 'background-color': props.color }}\n />\n }\n >\n <svg class=\"size-full\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill={props.color} />\n </svg>\n </Show>\n <span class=\"sr-only\">{props.label}</span>\n </SdkRadio>\n </div>","_$insert","_$effect","_$readShallow","_$className","_$setStyleProperty","_$setAttribute"],"sources":["../../../../src/components/composites/appearance-editor/accent-swatch-groups.tsx"],"sourcesContent":["/*\n * MIT License\n *\n * Copyright (c) 2026 Wing\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nimport { Radio as SdkRadio } from '@ui-sdk/solid/radio'\nimport { For, Show } from 'solid-js'\nimport { THEME_DEFAULT_ID } from '#lib/theme-defaults'\nimport { cn } from '#lib/utils'\n\ntype AccentOption = Readonly<{\n id: string\n label: string\n light?: string\n dark?: string\n}>\n\nexport type AccentSwatchGroupsProps = {\n accentOptions: readonly AccentOption[]\n resolvedAppearance: 'light' | 'dark'\n themeDefaultColor: string\n /**\n * Whether the group leads with the \"Theme default\" swatch. Hosts whose\n * default accent already is a preset omit it, a second entry for the same\n * colour reads as a duplicate choice.\n */\n showThemeDefault?: boolean\n /**\n * `grid`, the default, wraps at four to a line. `row` keeps every swatch on\n * one line at a smaller size, the columns sharing the width equally, so a\n * narrow panel does not wrap them; each colour is then the fill of an SVG\n * circle, which is where a host that asserts on swatch colours reads it.\n */\n layout?: 'grid' | 'row'\n}\n\n/**\n * The accent choices, as ONE group: the theme's own primary first, then every\n * preset the host feeds, each painted with its value for the resolved\n * appearance, which is what makes the group theme-scoped rather than a\n * catalogue table. The custom-color entry is the host's (`AccentChoices`\n * renders it beside this grid), because whether a free-form colour is accepted\n * is the host's validation to own.\n */\nexport function AccentSwatchGroups(props: AccentSwatchGroupsProps) {\n const presets = () => props.accentOptions.filter((option) => option.id !== THEME_DEFAULT_ID)\n const row = () => props.layout === 'row'\n\n return (\n <div\n class={row() ? 'grid auto-cols-fr grid-flow-col' : 'grid grid-cols-4 gap-2'}\n data-accent-grid\n >\n <Show when={props.showThemeDefault ?? true}>\n <AccentSwatch\n id=\"theme\"\n label=\"Theme default\"\n color={props.themeDefaultColor}\n row={row()}\n />\n </Show>\n <For each={presets()}>\n {(option) => (\n <AccentSwatch\n id={option.id}\n label={option.label}\n color={(props.resolvedAppearance === 'light' ? option.light : option.dark) ?? ''}\n row={row()}\n />\n )}\n </For>\n </div>\n )\n}\n\nfunction AccentSwatch(props: { id: string; label: string; color: string; row: boolean }) {\n return (\n <div\n data-accent-option={props.id}\n class={cn('rounded-full focus-within:focus-outline', {\n 'flex justify-center': props.row,\n })}\n >\n <SdkRadio\n value={props.id}\n class={cn(\n 'block cursor-pointer rounded-full border p-0.5 outline-none data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary',\n props.row ? 'size-6' : 'size-7'\n )}\n >\n <Show\n when={props.row}\n fallback={\n <span\n class=\"block size-full rounded-full\"\n aria-hidden=\"true\"\n style={{ 'background-color': props.color }}\n />\n }\n >\n <svg class=\"size-full\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill={props.color} />\n </svg>\n </Show>\n <span class=\"sr-only\">{props.label}</span>\n </SdkRadio>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA8DA,SAAgB,mBAAmB,OAAgC;CACjE,MAAM,gBAAgB,MAAM,cAAc,QAAQ,WAAW,OAAO,OAAO,gBAAgB;CAC3F,MAAM,YAAY,MAAM,WAAW;CAGjC,IAAA,OAAA,OAsBK;CAtBL,IAAA,Q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AA,QAAA,QAEK;KADH,IAAA,QAAA,MAAA;KAA4BK,aAAM,MAAM,QAAZ,QAAA;MAAiBI,aAAA,OAAA,QAAA,GAAA;;KAXjD,OAUER;IAGI;GACN,CAAA,UAAA;IAAyC,IAAA,QAAA,QAAA;IAAzCG,OAAA,aAAsB;KAAC,OAAA,MAAM;IAAK,CAAO;IAAzC,OAAA;GAAyC,EAAA,CAAA,CAd1C;EAeS;CACP,CAAA,CAAA;CA5BHC,aAAA;;GAAoB,GAAA,MAAM;GAC1BH,GAAAA,YAAO,GAAG,2CAA2C,EACnD,uBAAuB,MAAM,IAC/B,CAAC,CAAC;EAH0B;CAA5B,IAAA,EAAA,GAAA,KAAA,QAAA;EAA4B,MAAA,KAAA,KAAAO,aAAA,OAAA,sBAAA,CAAA;EAC5BF,UAAA,OAAA,GAAA,KAAA,CAEE;CAH0B,CAAA;CAFhC,OACEJ;AA+BJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"appearance-choices.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/appearance-editor/appearance-choices.tsx"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAsB/D,wBAAgB,WAAW,CAAC,KAAK,EAAE,qBAAqB,sCAmDvD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAOpE;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,qBAAqB,sCA+HzD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,qBAAqB,sCAgCxD"}
1
+ {"version":3,"file":"appearance-choices.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/appearance-editor/appearance-choices.tsx"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAsB/D,wBAAgB,WAAW,CAAC,KAAK,EAAE,qBAAqB,sCAgDvD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAOpE;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,qBAAqB,sCA+HzD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,qBAAqB,sCAgCxD"}
@@ -11,13 +11,13 @@ import { fastIcon } from "../../../lib/fast-icon.js";
11
11
  // src/components/composites/appearance-editor/appearance-choices.tsx
12
12
  var _tmpl$ = /* @__PURE__ */ template(`<span class="block h-20 w-full">`);
13
13
  var _tmpl$2 = /* @__PURE__ */ template(`<span class="flex items-center justify-center gap-1.5"><!><!>`);
14
- var _tmpl$3 = /* @__PURE__ */ template(`<div class="min-w-0 rounded-lg focus-within:ring-3 focus-within:ring-ring/50">`);
14
+ var _tmpl$3 = /* @__PURE__ */ template(`<div class="min-w-0 rounded-lg focus-within:focus-outline">`);
15
15
  var _tmpl$4 = /* @__PURE__ */ template(`<span>`);
16
16
  var _tmpl$5 = /* @__PURE__ */ template(`<div class="grid grid-cols-2 gap-2 sm:grid-cols-3"data-accent-grid><div class=min-w-0>`);
17
17
  var _tmpl$6 = /* @__PURE__ */ template(`<div class="flex flex-col gap-1"><div>`);
18
18
  var _tmpl$7 = /* @__PURE__ */ template(`<div class=min-w-0>`);
19
19
  var _tmpl$8 = /* @__PURE__ */ template(`<span class="text-xs font-medium text-muted-foreground">Custom`);
20
- var _tmpl$9 = /* @__PURE__ */ template(`<div class="rounded-md focus-within:ring-3 focus-within:ring-ring/50">`);
20
+ var _tmpl$9 = /* @__PURE__ */ template(`<div class="rounded-md focus-within:focus-outline">`);
21
21
  var Monitor = fastIcon(Monitor$1);
22
22
  var Moon = fastIcon(Moon$1);
23
23
  var Sun = fastIcon(Sun$1);