@adea-ai/ui 0.157.0 → 0.159.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/components/composites/action-button/action-button.d.ts +6 -0
  2. package/dist/components/composites/action-button/action-button.d.ts.map +1 -1
  3. package/dist/components/composites/action-button/action-button.js +29 -2
  4. package/dist/components/composites/action-button/action-button.js.map +1 -1
  5. package/dist/components/composites/appearance-editor/appearance-editor.d.ts +1 -1
  6. package/dist/components/composites/appearance-editor/appearance-editor.d.ts.map +1 -1
  7. package/dist/components/composites/appearance-editor/appearance-editor.js +305 -172
  8. package/dist/components/composites/appearance-editor/appearance-editor.js.map +1 -1
  9. package/dist/components/composites/appearance-editor/appearance-rows.d.ts +6 -0
  10. package/dist/components/composites/appearance-editor/appearance-rows.d.ts.map +1 -1
  11. package/dist/components/composites/appearance-editor/appearance-rows.js +2 -2
  12. package/dist/components/composites/appearance-editor/appearance-rows.js.map +1 -1
  13. package/dist/components/composites/appearance-editor/appearance-types.d.ts +26 -0
  14. package/dist/components/composites/appearance-editor/appearance-types.d.ts.map +1 -1
  15. package/dist/components/composites/appearance-editor/appearance-types.js +10 -0
  16. package/dist/components/composites/appearance-editor/appearance-types.js.map +1 -0
  17. package/dist/components/composites/appearance-editor/font-settings-group.d.ts +13 -1
  18. package/dist/components/composites/appearance-editor/font-settings-group.d.ts.map +1 -1
  19. package/dist/components/composites/appearance-editor/font-settings-group.js +51 -15
  20. package/dist/components/composites/appearance-editor/font-settings-group.js.map +1 -1
  21. package/dist/components/composites/appearance-editor/index.d.ts +2 -1
  22. package/dist/components/composites/appearance-editor/index.d.ts.map +1 -1
  23. package/dist/components/composites/appearance-editor/index.js +3 -2
  24. package/dist/components/composites/model-selector/index.d.ts +1 -1
  25. package/dist/components/composites/model-selector/index.d.ts.map +1 -1
  26. package/dist/components/composites/model-selector/model-selector.d.ts +22 -0
  27. package/dist/components/composites/model-selector/model-selector.d.ts.map +1 -1
  28. package/dist/components/composites/model-selector/model-selector.js +191 -46
  29. package/dist/components/composites/model-selector/model-selector.js.map +1 -1
  30. package/dist/components/ui/tooltip/tooltip.d.ts.map +1 -1
  31. package/dist/components/ui/tooltip/tooltip.js +4 -18
  32. package/dist/components/ui/tooltip/tooltip.js.map +1 -1
  33. package/dist/index.js +5 -4
  34. package/dist/lib/appearance-font-settings.d.ts +18 -4
  35. package/dist/lib/appearance-font-settings.d.ts.map +1 -1
  36. package/dist/lib/appearance-font-settings.js +24 -6
  37. package/dist/lib/appearance-font-settings.js.map +1 -1
  38. package/dist/lib/font-catalog.d.ts +5 -0
  39. package/dist/lib/font-catalog.d.ts.map +1 -1
  40. package/dist/lib/font-catalog.js +10 -5
  41. package/dist/lib/font-catalog.js.map +1 -1
  42. package/dist/lib/font-zoom.d.ts +1 -1
  43. package/dist/lib/font-zoom.d.ts.map +1 -1
  44. package/dist/lib/font-zoom.js +5 -1
  45. package/dist/lib/font-zoom.js.map +1 -1
  46. package/dist/lib/tokens.d.ts.map +1 -1
  47. package/dist/lib/tokens.js +17 -2
  48. package/dist/lib/tokens.js.map +1 -1
  49. package/dist/r/action-button.json +1 -0
  50. package/dist/r/appearance-editor.json +1 -0
  51. package/dist/r/registry.json +2 -0
  52. package/dist/r/src/components/composites/action-button/action-button.tsx +17 -1
  53. package/dist/r/src/components/composites/appearance-editor/appearance-editor.tsx +202 -110
  54. package/dist/r/src/components/composites/appearance-editor/appearance-rows.tsx +11 -1
  55. package/dist/r/src/components/composites/appearance-editor/appearance-types.ts +27 -0
  56. package/dist/r/src/components/composites/appearance-editor/font-settings-group.tsx +50 -10
  57. package/dist/r/src/components/composites/appearance-editor/index.ts +3 -0
  58. package/dist/r/src/components/composites/model-selector/index.ts +1 -1
  59. package/dist/r/src/components/composites/model-selector/model-selector.tsx +155 -10
  60. package/dist/r/src/components/ui/tooltip/tooltip.tsx +9 -18
  61. package/dist/r/src/lib/appearance-font-settings.ts +43 -7
  62. package/dist/r/src/lib/font-catalog.ts +5 -0
  63. package/dist/r/src/lib/font-zoom.ts +3 -0
  64. package/dist/r/src/lib/tokens.ts +17 -2
  65. package/dist/r/src/styles/appearance-font-settings.css +2 -0
  66. package/package.json +1 -1
  67. package/registry.json +2 -0
  68. package/src/components/composites/action-button/action-button.tsx +17 -1
  69. package/src/components/composites/appearance-editor/appearance-editor.tsx +202 -110
  70. package/src/components/composites/appearance-editor/appearance-rows.tsx +11 -1
  71. package/src/components/composites/appearance-editor/appearance-types.ts +27 -0
  72. package/src/components/composites/appearance-editor/font-settings-group.tsx +50 -10
  73. package/src/components/composites/appearance-editor/index.ts +3 -0
  74. package/src/components/composites/model-selector/index.ts +1 -1
  75. package/src/components/composites/model-selector/model-selector.tsx +155 -10
  76. package/src/components/ui/tooltip/tooltip.tsx +9 -18
  77. package/src/lib/appearance-font-settings.ts +43 -7
  78. package/src/lib/font-catalog.ts +5 -0
  79. package/src/lib/font-zoom.ts +3 -0
  80. package/src/lib/tokens.ts +17 -2
  81. package/src/styles/appearance-font-settings.css +2 -0
@@ -28,6 +28,12 @@ export type ActionButtonProps<T extends ValidComponent = 'button'> = ButtonProps
28
28
  * lacks. Size it by leaving the svg bare; the slot fixes it to control size.
29
29
  */
30
30
  tooltipIcon?: JSX.Element;
31
+ /**
32
+ * The action's keyboard chord, one entry per key (`['⇧', '⌘', 'D']`), drawn as keys after the
33
+ * explanation. Decorative like the rest of the tip: put the parseable chord on the control
34
+ * itself with `aria-keyshortcuts`.
35
+ */
36
+ tooltipShortcut?: readonly string[];
31
37
  /** Disables the action and announces the busy label through a polite status region. */
32
38
  busy?: boolean;
33
39
  /** The activity announced while busy. The Button's accessible name stays unchanged. */
@@ -1 +1 @@
1
- {"version":3,"file":"action-button.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/action-button/action-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,GAAG,EACR,KAAK,cAAc,EACpB,MAAM,UAAU,CAAA;AAGjB,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAKlE;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,cAAc,GAAG,QAAQ,IAAI,WAAW,CAAC,CAAC,CAAC,GAAG;IACpF,8FAA8F;IAC9F,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,iGAAiG;IACjG,WAAW,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;IACjD;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IACzB,uFAAuF;IACvF,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,uFAAuF;IACvF,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AA0CD,wBAAgB,YAAY,CAAC,CAAC,SAAS,cAAc,GAAG,QAAQ,EAAE,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,eAkL5F"}
1
+ {"version":3,"file":"action-button.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/action-button/action-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,GAAG,EACR,KAAK,cAAc,EACpB,MAAM,UAAU,CAAA;AAGjB,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAMlE;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,cAAc,GAAG,QAAQ,IAAI,WAAW,CAAC,CAAC,CAAC,GAAG;IACpF,8FAA8F;IAC9F,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,iGAAiG;IACjG,WAAW,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;IACjD;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IACzB;;;;OAIG;IACH,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACnC,uFAAuF;IACvF,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,uFAAuF;IACvF,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AA0CD,wBAAgB,YAAY,CAAC,CAAC,SAAS,cAAc,GAAG,QAAQ,EAAE,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,eA0L5F"}
@@ -1,15 +1,17 @@
1
1
  import { callHandler } from "../../../lib/events.js";
2
2
  import { buttonVariants } from "../../ui/button/button.js";
3
3
  import { cn } from "../../../lib/utils.js";
4
+ import { Kbd, KbdGroup } from "../../ui/kbd/kbd.js";
4
5
  import { Spinner } from "../../ui/spinner/spinner.js";
5
6
  import { createDeferredTooltip } from "../../ui/tooltip/deferred-tooltip.js";
6
7
  import { Tooltip, TooltipContent, TooltipTrigger } from "../../ui/tooltip/tooltip.js";
7
8
  import { createComponent, insert, memo, mergeProps, spread, template } from "solid-js/web";
8
- import { Show, createRoot, createSignal, createUniqueId, mergeProps as mergeProps$1, splitProps } from "solid-js";
9
+ import { For, Show, createRoot, createSignal, createUniqueId, mergeProps as mergeProps$1, splitProps } from "solid-js";
9
10
  import { Polymorphic } from "@kobalte/core/polymorphic";
10
11
  // src/components/composites/action-button/action-button.tsx
11
12
  var _tmpl$ = /*#__PURE__*/ template(`<button>`);
12
13
  var _tmpl$2 = /*#__PURE__*/ template(`<span role=status aria-live=polite class=visually-hidden>`);
14
+ var _tmpl$3 = /*#__PURE__*/ template(`<span class="inline-flex items-center gap-2 whitespace-nowrap">`);
13
15
  function invokeHandler(handler, event) {
14
16
  callHandler(handler, event);
15
17
  }
@@ -49,6 +51,7 @@ function ActionButton(props) {
49
51
  "tooltip",
50
52
  "tooltipSide",
51
53
  "tooltipIcon",
54
+ "tooltipShortcut",
52
55
  "busy",
53
56
  "busyLabel",
54
57
  "href"
@@ -178,7 +181,31 @@ function ActionButton(props) {
178
181
  return local.tooltipIcon;
179
182
  },
180
183
  get children() {
181
- return tooltipSlot();
184
+ return createComponent(Show, {
185
+ get when() {
186
+ return local.tooltipShortcut?.length;
187
+ },
188
+ get fallback() {
189
+ return tooltipSlot();
190
+ },
191
+ get children() {
192
+ var _el$3 = _tmpl$3();
193
+ insert(_el$3, tooltipSlot, null);
194
+ insert(_el$3, createComponent(KbdGroup, {
195
+ "data-slot": "action-button-shortcut",
196
+ "aria-hidden": "true",
197
+ get children() {
198
+ return createComponent(For, {
199
+ get each() {
200
+ return local.tooltipShortcut;
201
+ },
202
+ children: (key) => createComponent(Kbd, { children: key })
203
+ });
204
+ }
205
+ }), null);
206
+ return _el$3;
207
+ }
208
+ });
182
209
  }
183
210
  })];
184
211
  }
@@ -1 +1 @@
1
- {"version":3,"file":"action-button.js","names":["Show","createRoot","mergeProps","createSignal","createUniqueId","splitProps","callHandler","Polymorphic","buttonVariants","cn","Spinner","createDeferredTooltip","Tooltip","TooltipContent","TooltipTrigger","tooltip","tooltipSide","tooltipIcon","busy","busyLabel","invokeHandler","handler","event","chainedHandler","before","guardedClick","disabled","onActivate","isDisabled","dispose","preventDefault","stopImmediatePropagation","ActionButton","props","local","rest","href","busyStatus","tooltipOpen","setTooltipOpen","tooltipId","deferred","enabled","onPointerEnter","onFocus","tooltipSuppression","setTooltipSuppression","forwarded","buttonProps","class","variant","size","touchTarget","type","tabIndex","as","undefined","role","ref","element","callerRef","onClick","detail","onPointerLeave","onBlur","onClickCapture","contents","_$createComponent","when","children","label","_$memo","fallback","_$mergeProps","_el$","_tmpl$","_$spread","_$insert","armed","tooltipSlot","placement","open","onOpenChange","Target","id","icon","_el$2","_tmpl$2"],"sources":["../../../../src/components/composites/action-button/action-button.tsx"],"sourcesContent":["import {\n Show,\n createRoot,\n mergeProps,\n createSignal,\n createUniqueId,\n splitProps,\n type ComponentProps,\n type JSX,\n type ValidComponent,\n} from 'solid-js'\nimport { callHandler } from '#lib/events'\nimport { Polymorphic } from '@kobalte/core/polymorphic'\nimport { buttonVariants, type ButtonProps } from '../../ui/button'\nimport { cn } from '#lib/utils'\nimport { Spinner } from '../../ui/spinner'\nimport { createDeferredTooltip, Tooltip, TooltipContent, TooltipTrigger } from '../../ui/tooltip'\n\n/**\n * ActionButton.\n *\n * A Button with optional explanatory tooltip and busy feedback. Use it for a\n * simple action that needs these states; actions with product-specific rules\n * should compose Button directly.\n *\n * The tooltip trigger is the polymorphic Button itself; the tooltip mounts on\n * its first hover or keyboard focus (see createDeferredTooltip). A disabled native\n * control cannot receive pointer or keyboard events. When a tooltip is set,\n * disabled actions therefore use focusable `aria-disabled` semantics and guard\n * activation; without a tooltip, native buttons retain native disabling.\n * Custom polymorphic components must forward aria, event, and href props for\n * these guarantees to apply.\n */\nexport type ActionButtonProps<T extends ValidComponent = 'button'> = ButtonProps<T> & {\n /** A short explanation, also shown on keyboard focus. The Button still needs its own name. */\n tooltip?: string\n /** Placement of the explanation; icon actions live in bars, so it defaults below the control. */\n tooltipSide?: 'top' | 'right' | 'bottom' | 'left'\n /**\n * A leading icon repeated inside the explanation, forwarded to the shared\n * tooltip's `icon` slot so a bar of icon actions gets the icon+label tip\n * without hand-composing Button and Tooltip. Decorative by contract: the tip\n * is never the accessible name, so the icon must not carry meaning the label\n * lacks. Size it by leaving the svg bare; the slot fixes it to control size.\n */\n tooltipIcon?: JSX.Element\n /** Disables the action and announces the busy label through a polite status region. */\n busy?: boolean\n /** The activity announced while busy. The Button's accessible name stays unchanged. */\n busyLabel?: string\n}\n\ntype ForwardedHandler = JSX.EventHandlerUnion<Element, Event> | undefined\ntype ForwardedEvent = Event & { currentTarget: Element; target: Element }\n\nfunction invokeHandler(handler: unknown, event: Event) {\n callHandler(handler as ForwardedHandler, event as ForwardedEvent)\n}\n\nfunction chainedHandler(handler: () => unknown, before: (event: Event) => void) {\n return (event: Event) => {\n before(event)\n invokeHandler(handler(), event)\n }\n}\n\nfunction guardedClick(\n handler: () => unknown,\n disabled: () => boolean,\n onActivate: (event: MouseEvent) => void = () => {}\n) {\n return (event: MouseEvent) => {\n // A polymorphic trigger can provide a getter that creates reactive work.\n // Event callbacks have no owner, so dispose any such work after the read.\n const isDisabled = createRoot((dispose) => {\n try {\n return disabled()\n } finally {\n dispose()\n }\n })\n if (isDisabled) {\n event.preventDefault()\n event.stopImmediatePropagation()\n return\n }\n\n onActivate(event)\n invokeHandler(handler(), event)\n }\n}\n\nexport function ActionButton<T extends ValidComponent = 'button'>(props: ActionButtonProps<T>) {\n const [local, rest] = splitProps(props as ActionButtonProps & { href?: string }, [\n 'as',\n 'variant',\n 'size',\n 'touchTarget',\n 'class',\n 'children',\n 'disabled',\n 'aria-busy',\n 'tooltip',\n 'tooltipSide',\n 'tooltipIcon',\n 'busy',\n 'busyLabel',\n // Split, not read from `rest`: mergeProps falls back to an earlier source when a\n // getter returns undefined, so a disabled link could not drop its href otherwise.\n 'href',\n ])\n const busy = () => local.busy ?? false\n const disabled = () => busy() || !!local.disabled\n const busyStatus = () => local.busyLabel ?? 'Working'\n const [tooltipOpen, setTooltipOpen] = createSignal(false)\n const tooltipId = `action-button-tooltip-${createUniqueId()}`\n // The tooltip mounts on the first hover or keyboard focus; until then the\n // button renders alone (see createDeferredTooltip).\n const deferred = createDeferredTooltip({\n enabled: () => !!local.tooltip,\n onPointerEnter: () => rest.onPointerEnter,\n onFocus: () => rest.onFocus,\n })\n const [tooltipSuppression, setTooltipSuppression] = createSignal<'pointer' | 'focus' | null>(null)\n const forwarded = rest as Record<string, unknown>\n\n // One props object for the life of the button. Each value is a getter, so it stays\n // reactive per key, and the handlers are created once and read the caller's handler\n // when they run. (Spreading a function's result instead compiles to a memo that\n // rebuilds every key and handler whenever any prop it reads changes.)\n const buttonProps = mergeProps(rest, {\n // The inner Button would otherwise announce itself as a plain `button`; a\n // caller's own slot still wins.\n get 'data-slot'() {\n return (forwarded['data-slot'] as string | undefined) ?? 'action-button'\n },\n // Button's own class, computed here: rendering Polymorphic directly saves a\n // component layer and a splitProps over every key, on every action button.\n get class() {\n return cn(\n buttonVariants({\n variant: local.variant,\n size: local.size,\n touchTarget: local.touchTarget,\n }),\n local.class,\n local.tooltip && disabled() && 'aria-disabled:pointer-events-auto'\n )\n },\n // As Button sets it: a custom component that renders a native button inside a\n // form must not submit by accident. A caller's own type still wins.\n get type() {\n return (forwarded.type as string | undefined) ?? 'button'\n },\n get disabled() {\n return disabled() && !local.tooltip\n },\n get 'aria-disabled'() {\n return disabled() ? true : rest['aria-disabled']\n },\n // Make tooltip-bearing native controls explicit tab stops in WebKit configurations that\n // otherwise skip implicit button stops. A caller's tabIndex remains authoritative.\n get tabIndex() {\n return (\n rest.tabIndex ??\n (local.as === 'a' && disabled() ? (local.tooltip ? 0 : -1) : local.tooltip ? 0 : undefined)\n )\n },\n get role() {\n return local.as === 'a' && disabled() ? 'link' : rest.role\n },\n get href() {\n return local.as === 'a' && disabled() ? undefined : local.href\n },\n get 'aria-busy'() {\n return busy() || local['aria-busy']\n },\n get 'aria-describedby'() {\n return (\n (forwarded['aria-describedby'] as string | undefined) ??\n (local.tooltip && tooltipOpen() ? tooltipId : undefined)\n )\n },\n ref: (element: HTMLElement) => {\n deferred.ref(element)\n const callerRef = forwarded.ref\n if (typeof callerRef === 'function') callerRef(element)\n },\n onPointerEnter: deferred.onPointerEnter,\n onFocus: deferred.onFocus,\n onClick: guardedClick(\n () => rest.onClick,\n disabled,\n (event) => {\n if (!local.tooltip) return\n setTooltipSuppression(event.detail > 0 ? 'pointer' : 'focus')\n setTooltipOpen(false)\n }\n ),\n onPointerLeave: chainedHandler(\n () => rest.onPointerLeave,\n () => {\n if (tooltipSuppression() === 'pointer') setTooltipSuppression(null)\n }\n ),\n onBlur: chainedHandler(\n () => rest.onBlur,\n () => {\n if (tooltipSuppression() === 'focus') setTooltipSuppression(null)\n }\n ),\n onClickCapture: forwarded.onClickCapture\n ? guardedClick(() => forwarded.onClickCapture, disabled)\n : undefined,\n // Only when the caller uses them: each is a native listener on every button.\n 'on:click': forwarded['on:click']\n ? guardedClick(() => forwarded['on:click'], disabled)\n : undefined,\n 'oncapture:click': forwarded['oncapture:click']\n ? guardedClick(() => forwarded['oncapture:click'], disabled)\n : undefined,\n })\n\n const contents = () => (\n <>\n <Show when={busy()}>\n <Spinner size=\"sm\" label={false} aria-hidden=\"true\" data-icon=\"inline-start\" />\n </Show>\n {local.children}\n </>\n )\n\n return (\n <>\n {/* A native button, the common case, is written directly: Polymorphic goes\n through Dynamic, a memo and a component per button. */}\n <Show\n when={local.as === undefined || local.as === 'button'}\n fallback={\n <Polymorphic as={local.as} {...(buttonProps as ComponentProps<'button'>)}>\n {contents()}\n </Polymorphic>\n }\n >\n <button {...(buttonProps as ComponentProps<'button'>)}>{contents()}</button>\n </Show>\n <Show when={deferred.armed() && local.tooltip}>\n {(tooltipSlot) => (\n <Tooltip\n placement={local.tooltipSide ?? 'bottom'}\n open={tooltipOpen()}\n onOpenChange={(open) => {\n if (open && tooltipSuppression()) return\n setTooltipOpen(open)\n }}\n >\n <TooltipTrigger as={deferred.Target} />\n <TooltipContent id={tooltipId} icon={local.tooltipIcon}>\n {tooltipSlot()}\n </TooltipContent>\n </Tooltip>\n )}\n </Show>\n <Show when={busy()}>\n <span role=\"status\" aria-live=\"polite\" class=\"visually-hidden\">\n {busyStatus()}\n </span>\n </Show>\n </>\n )\n}\n"],"mappings":";;;;;;;;;;;;AAuDA,SAASoB,cAAcC,SAAkBC,OAAc;CACrDhB,YAAYe,SAA6BC,KAAuB;AAClE;AAEA,SAASC,eAAeF,SAAwBG,QAAgC;CAC9E,QAAQF,UAAiB;EACvBE,OAAOF,KAAK;EACZF,cAAcC,QAAQ,GAAGC,KAAK;CAChC;AACF;AAEA,SAASG,aACPJ,SACAK,UACAC,mBAAgD,CAAC,GACjD;CACA,QAAQL,UAAsB;EAU5B,IAPmBrB,YAAY4B,YAAY;GACzC,IAAI;IACF,OAAOH,SAAS;GAClB,UAAU;IACRG,QAAQ;GACV;EACF,CACID,GAAY;GACdN,MAAMQ,eAAe;GACrBR,MAAMS,yBAAyB;GAC/B;EACF;EAEAJ,WAAWL,KAAK;EAChBF,cAAcC,QAAQ,GAAGC,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,CAAA;EAGnB,CAAA;EAAAZ,gBAEFnE,MAAI;GAAA,IAACoE,OAAI;IAAA,OAAElD,KAAK;GAAC;GAAA,IAAAmD,WAAA;IAAA,IAAAiB,QAAAC,QAAA;IAAAV,OAAAS,OAEbjD,UAAU;IAAA,OAAAiD;GAAA;EAAA,CAAA;CAAA;AAKrB"}
1
+ {"version":3,"file":"action-button.js","names":["For","Show","createRoot","mergeProps","createSignal","createUniqueId","splitProps","callHandler","Polymorphic","buttonVariants","cn","Kbd","KbdGroup","Spinner","createDeferredTooltip","Tooltip","TooltipContent","TooltipTrigger","tooltip","tooltipSide","tooltipIcon","tooltipShortcut","busy","busyLabel","invokeHandler","handler","event","chainedHandler","before","guardedClick","disabled","onActivate","isDisabled","dispose","preventDefault","stopImmediatePropagation","ActionButton","props","local","rest","href","busyStatus","tooltipOpen","setTooltipOpen","tooltipId","deferred","enabled","onPointerEnter","onFocus","tooltipSuppression","setTooltipSuppression","forwarded","buttonProps","class","variant","size","touchTarget","type","tabIndex","as","undefined","role","ref","element","callerRef","onClick","detail","onPointerLeave","onBlur","onClickCapture","contents","_$createComponent","when","children","label","_$memo","fallback","_$mergeProps","_el$","_tmpl$","_$spread","_$insert","armed","tooltipSlot","placement","open","onOpenChange","Target","id","icon","length","_el$3","_tmpl$3","each","key","_el$2","_tmpl$2"],"sources":["../../../../src/components/composites/action-button/action-button.tsx"],"sourcesContent":["import {\n For,\n Show,\n createRoot,\n mergeProps,\n createSignal,\n createUniqueId,\n splitProps,\n type ComponentProps,\n type JSX,\n type ValidComponent,\n} from 'solid-js'\nimport { callHandler } from '#lib/events'\nimport { Polymorphic } from '@kobalte/core/polymorphic'\nimport { buttonVariants, type ButtonProps } from '../../ui/button'\nimport { cn } from '#lib/utils'\nimport { Kbd, KbdGroup } from '../../ui/kbd'\nimport { Spinner } from '../../ui/spinner'\nimport { createDeferredTooltip, Tooltip, TooltipContent, TooltipTrigger } from '../../ui/tooltip'\n\n/**\n * ActionButton.\n *\n * A Button with optional explanatory tooltip and busy feedback. Use it for a\n * simple action that needs these states; actions with product-specific rules\n * should compose Button directly.\n *\n * The tooltip trigger is the polymorphic Button itself; the tooltip mounts on\n * its first hover or keyboard focus (see createDeferredTooltip). A disabled native\n * control cannot receive pointer or keyboard events. When a tooltip is set,\n * disabled actions therefore use focusable `aria-disabled` semantics and guard\n * activation; without a tooltip, native buttons retain native disabling.\n * Custom polymorphic components must forward aria, event, and href props for\n * these guarantees to apply.\n */\nexport type ActionButtonProps<T extends ValidComponent = 'button'> = ButtonProps<T> & {\n /** A short explanation, also shown on keyboard focus. The Button still needs its own name. */\n tooltip?: string\n /** Placement of the explanation; icon actions live in bars, so it defaults below the control. */\n tooltipSide?: 'top' | 'right' | 'bottom' | 'left'\n /**\n * A leading icon repeated inside the explanation, forwarded to the shared\n * tooltip's `icon` slot so a bar of icon actions gets the icon+label tip\n * without hand-composing Button and Tooltip. Decorative by contract: the tip\n * is never the accessible name, so the icon must not carry meaning the label\n * lacks. Size it by leaving the svg bare; the slot fixes it to control size.\n */\n tooltipIcon?: JSX.Element\n /**\n * The action's keyboard chord, one entry per key (`['⇧', '⌘', 'D']`), drawn as keys after the\n * explanation. Decorative like the rest of the tip: put the parseable chord on the control\n * itself with `aria-keyshortcuts`.\n */\n tooltipShortcut?: readonly string[]\n /** Disables the action and announces the busy label through a polite status region. */\n busy?: boolean\n /** The activity announced while busy. The Button's accessible name stays unchanged. */\n busyLabel?: string\n}\n\ntype ForwardedHandler = JSX.EventHandlerUnion<Element, Event> | undefined\ntype ForwardedEvent = Event & { currentTarget: Element; target: Element }\n\nfunction invokeHandler(handler: unknown, event: Event) {\n callHandler(handler as ForwardedHandler, event as ForwardedEvent)\n}\n\nfunction chainedHandler(handler: () => unknown, before: (event: Event) => void) {\n return (event: Event) => {\n before(event)\n invokeHandler(handler(), event)\n }\n}\n\nfunction guardedClick(\n handler: () => unknown,\n disabled: () => boolean,\n onActivate: (event: MouseEvent) => void = () => {}\n) {\n return (event: MouseEvent) => {\n // A polymorphic trigger can provide a getter that creates reactive work.\n // Event callbacks have no owner, so dispose any such work after the read.\n const isDisabled = createRoot((dispose) => {\n try {\n return disabled()\n } finally {\n dispose()\n }\n })\n if (isDisabled) {\n event.preventDefault()\n event.stopImmediatePropagation()\n return\n }\n\n onActivate(event)\n invokeHandler(handler(), event)\n }\n}\n\nexport function ActionButton<T extends ValidComponent = 'button'>(props: ActionButtonProps<T>) {\n const [local, rest] = splitProps(props as ActionButtonProps & { href?: string }, [\n 'as',\n 'variant',\n 'size',\n 'touchTarget',\n 'class',\n 'children',\n 'disabled',\n 'aria-busy',\n 'tooltip',\n 'tooltipSide',\n 'tooltipIcon',\n 'tooltipShortcut',\n 'busy',\n 'busyLabel',\n // Split, not read from `rest`: mergeProps falls back to an earlier source when a\n // getter returns undefined, so a disabled link could not drop its href otherwise.\n 'href',\n ])\n const busy = () => local.busy ?? false\n const disabled = () => busy() || !!local.disabled\n const busyStatus = () => local.busyLabel ?? 'Working'\n const [tooltipOpen, setTooltipOpen] = createSignal(false)\n const tooltipId = `action-button-tooltip-${createUniqueId()}`\n // The tooltip mounts on the first hover or keyboard focus; until then the\n // button renders alone (see createDeferredTooltip).\n const deferred = createDeferredTooltip({\n enabled: () => !!local.tooltip,\n onPointerEnter: () => rest.onPointerEnter,\n onFocus: () => rest.onFocus,\n })\n const [tooltipSuppression, setTooltipSuppression] = createSignal<'pointer' | 'focus' | null>(null)\n const forwarded = rest as Record<string, unknown>\n\n // One props object for the life of the button. Each value is a getter, so it stays\n // reactive per key, and the handlers are created once and read the caller's handler\n // when they run. (Spreading a function's result instead compiles to a memo that\n // rebuilds every key and handler whenever any prop it reads changes.)\n const buttonProps = mergeProps(rest, {\n // The inner Button would otherwise announce itself as a plain `button`; a\n // caller's own slot still wins.\n get 'data-slot'() {\n return (forwarded['data-slot'] as string | undefined) ?? 'action-button'\n },\n // Button's own class, computed here: rendering Polymorphic directly saves a\n // component layer and a splitProps over every key, on every action button.\n get class() {\n return cn(\n buttonVariants({\n variant: local.variant,\n size: local.size,\n touchTarget: local.touchTarget,\n }),\n local.class,\n local.tooltip && disabled() && 'aria-disabled:pointer-events-auto'\n )\n },\n // As Button sets it: a custom component that renders a native button inside a\n // form must not submit by accident. A caller's own type still wins.\n get type() {\n return (forwarded.type as string | undefined) ?? 'button'\n },\n get disabled() {\n return disabled() && !local.tooltip\n },\n get 'aria-disabled'() {\n return disabled() ? true : rest['aria-disabled']\n },\n // Make tooltip-bearing native controls explicit tab stops in WebKit configurations that\n // otherwise skip implicit button stops. A caller's tabIndex remains authoritative.\n get tabIndex() {\n return (\n rest.tabIndex ??\n (local.as === 'a' && disabled() ? (local.tooltip ? 0 : -1) : local.tooltip ? 0 : undefined)\n )\n },\n get role() {\n return local.as === 'a' && disabled() ? 'link' : rest.role\n },\n get href() {\n return local.as === 'a' && disabled() ? undefined : local.href\n },\n get 'aria-busy'() {\n return busy() || local['aria-busy']\n },\n get 'aria-describedby'() {\n return (\n (forwarded['aria-describedby'] as string | undefined) ??\n (local.tooltip && tooltipOpen() ? tooltipId : undefined)\n )\n },\n ref: (element: HTMLElement) => {\n deferred.ref(element)\n const callerRef = forwarded.ref\n if (typeof callerRef === 'function') callerRef(element)\n },\n onPointerEnter: deferred.onPointerEnter,\n onFocus: deferred.onFocus,\n onClick: guardedClick(\n () => rest.onClick,\n disabled,\n (event) => {\n if (!local.tooltip) return\n setTooltipSuppression(event.detail > 0 ? 'pointer' : 'focus')\n setTooltipOpen(false)\n }\n ),\n onPointerLeave: chainedHandler(\n () => rest.onPointerLeave,\n () => {\n if (tooltipSuppression() === 'pointer') setTooltipSuppression(null)\n }\n ),\n onBlur: chainedHandler(\n () => rest.onBlur,\n () => {\n if (tooltipSuppression() === 'focus') setTooltipSuppression(null)\n }\n ),\n onClickCapture: forwarded.onClickCapture\n ? guardedClick(() => forwarded.onClickCapture, disabled)\n : undefined,\n // Only when the caller uses them: each is a native listener on every button.\n 'on:click': forwarded['on:click']\n ? guardedClick(() => forwarded['on:click'], disabled)\n : undefined,\n 'oncapture:click': forwarded['oncapture:click']\n ? guardedClick(() => forwarded['oncapture:click'], disabled)\n : undefined,\n })\n\n const contents = () => (\n <>\n <Show when={busy()}>\n <Spinner size=\"sm\" label={false} aria-hidden=\"true\" data-icon=\"inline-start\" />\n </Show>\n {local.children}\n </>\n )\n\n return (\n <>\n {/* A native button, the common case, is written directly: Polymorphic goes\n through Dynamic, a memo and a component per button. */}\n <Show\n when={local.as === undefined || local.as === 'button'}\n fallback={\n <Polymorphic as={local.as} {...(buttonProps as ComponentProps<'button'>)}>\n {contents()}\n </Polymorphic>\n }\n >\n <button {...(buttonProps as ComponentProps<'button'>)}>{contents()}</button>\n </Show>\n <Show when={deferred.armed() && local.tooltip}>\n {(tooltipSlot) => (\n <Tooltip\n placement={local.tooltipSide ?? 'bottom'}\n open={tooltipOpen()}\n onOpenChange={(open) => {\n if (open && tooltipSuppression()) return\n setTooltipOpen(open)\n }}\n >\n <TooltipTrigger as={deferred.Target} />\n <TooltipContent id={tooltipId} icon={local.tooltipIcon}>\n <Show when={local.tooltipShortcut?.length} fallback={tooltipSlot()}>\n <span class=\"inline-flex items-center gap-2 whitespace-nowrap\">\n {tooltipSlot()}\n <KbdGroup data-slot=\"action-button-shortcut\" aria-hidden=\"true\">\n <For each={local.tooltipShortcut}>{(key) => <Kbd>{key}</Kbd>}</For>\n </KbdGroup>\n </span>\n </Show>\n </TooltipContent>\n </Tooltip>\n )}\n </Show>\n <Show when={busy()}>\n <span role=\"status\" aria-live=\"polite\" class=\"visually-hidden\">\n {busyStatus()}\n </span>\n </Show>\n </>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AA+DA,SAASwB,cAAcC,SAAkBC,OAAc;CACrDnB,YAAYkB,SAA6BC,KAAuB;AAClE;AAEA,SAASC,eAAeF,SAAwBG,QAAgC;CAC9E,QAAQF,UAAiB;EACvBE,OAAOF,KAAK;EACZF,cAAcC,QAAQ,GAAGC,KAAK;CAChC;AACF;AAEA,SA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;IAAC,IAAAZ,WAAA;KAAA,OAAA,CAAAF,gBAEAtD,gBAAc,EAAA,IAAC0C,KAAE;MAAA,OAAEd,SAAS0C;KAAM,EAAA,CAAA,GAAAhB,gBAClCvD,gBAAc;MAACwE,IAAI5C;MAAS,IAAE6C,OAAI;OAAA,OAAEnD,MAAMlB;MAAW;MAAA,IAAAqD,WAAA;OAAA,OAAAF,gBACnDtE,MAAI;QAAA,IAACuE,OAAI;SAAA,OAAElC,MAAMjB,iBAAiBqE;QAAM;QAAA,IAAEd,WAAQ;SAAA,OAAEO,YAAY;QAAC;QAAA,IAAAV,WAAA;SAAA,IAAAkB,QAAAC,QAAA;SAAAX,OAAAU,OAE7DR,aAAW,IAAA;SAAAF,OAAAU,OAAApB,gBACX3D,UAAQ;UAAA,aAAA;UAAA,eAAA;UAAA,IAAA6D,WAAA;WAAA,OAAAF,gBACNvE,KAAG;YAAA,IAAC6F,OAAI;aAAA,OAAEvD,MAAMjB;YAAe;YAAAoD,WAAIqB,QAAGvB,gBAAM5D,KAAG,EAAA8D,UAAEqB,IAAG,CAAA;WAAO,CAAA;UAAA;SAAA,CAAA,GAAA,IAAA;SAAA,OAAAH;QAAA;OAAA,CAAA;MAAA;KAAA,CAAA,CAAA;IAAA;GAAA,CAAA;EAMvE,CAAA;EAAApB,gBAEFtE,MAAI;GAAA,IAACuE,OAAI;IAAA,OAAElD,KAAK;GAAC;GAAA,IAAAmD,WAAA;IAAA,IAAAsB,QAAAC,QAAA;IAAAf,OAAAc,OAEbtD,UAAU;IAAA,OAAAsD;GAAA;EAAA,CAAA;CAAA;AAKrB"}
@@ -1,4 +1,4 @@
1
- import type { AppearanceEditorProps, AppearancePopoverProps } from './appearance-types';
1
+ import { type AppearanceEditorProps, type AppearancePopoverProps } from './appearance-types';
2
2
  /**
3
3
  * A live editor whose persistence and preview authority belong to its host.
4
4
  * No ThemeProvider is required, and no catalogue, renderer engine or storage is
@@ -1 +1 @@
1
- {"version":3,"file":"appearance-editor.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/appearance-editor/appearance-editor.tsx"],"names":[],"mappings":"AA2DA,OAAO,KAAK,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAWvF;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,kCA6K5D;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,qBAAqB,kCA+CnE;AAED;;4EAE4E;AAC5E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,kCAsC9D"}
1
+ {"version":3,"file":"appearance-editor.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/appearance-editor/appearance-editor.tsx"],"names":[],"mappings":"AA8DA,OAAO,EAEL,KAAK,qBAAqB,EAE1B,KAAK,sBAAsB,EAC5B,MAAM,oBAAoB,CAAA;AAY3B;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,kCA8M5D;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,qBAAqB,kCA+CnE;AAQD;;4EAE4E;AAC5E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,kCAkF9D"}