Repository navigation
feat(core): ColorButton, a compact colour trigger; StylePanel's custom colour uses it - #548
Conversation
Rows take a `hint` (an info icon with a tooltip beside the label). The Root's
`hints` turns on an English default for every built-in row from the new
`labels.hints`, and `hint={false}` drops one. The Root's `labelWidth` gives
every inline label the same width so controls line up and long or translated
labels truncate instead of wrapping; it is ignored while `stacked`.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtzSPqS85sXMVcAaizx
… set Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtzSPqS85sXMVcAaizx
…m colour uses it A button with a swatch and the hex that opens the browser's colour picker: onValueChange previews each drag, onValueCommit fires once when the picker closes. StylePanel's custom Brand and Accent colour shows it in place of the ColorInput field; labels.custom.remove is deprecated (no clear control). Docs page, AI harness and bundle-size entry. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtzSPqS85sXMVcAaizx
|
The Compare check fails on a single shot: I'm leaving it red rather than adding Generated by Claude Code |
|
"Build, typecheck and test" fails on 983cc4f in the same catalog size test as #514. The cap needs to move with a note once #514 settles it, or the catalog needs trimming. If #514 only trims enough to clear its own 103 bytes, I'll shorten ColorButton's purpose line here so this PR clears too. I'm not pushing now, because another session pushed to this branch a few minutes ago. Generated by Claude Code |
HOLD for 3.1. This is stacked on #514 (StylePanel row hints). Retarget it to
previewonce 3.0.0 and #514 are in.Lorant asked for this after the Tavilio Design tab: the custom colour there needed a compact button-like trigger instead of the select-style field, and Tavilio had to build one itself (tavilio#239). This moves that trigger into core.
ColorButton (new,
@once-ui-system/core)labelbeside a swatch of every hue.showPicker(), with a fallback toclick()).onValueChangefires on every drag, for a live preview.onValueCommitfires once, on the nativechangeevent when the picker closes, for saving.value) or uncontrolled (defaultValue). Also takesshowValue,size,variant,disabledandaria-describedby.aria-hidden.form-controls/colorButton, catalog entry, regenerated AI harness, and a bundle-size entry (25.5 KB gzipped entry; root +0.6 KB).StylePanel
aria-describedby.labels.custom.removeis deprecated, because there is no clear control any more. It is still accepted and ignored, so nothing breaks.Not changed: the strip fades. In 3.0, the Scroller's default edge is a mask with no blur, so the coloured smear Tavilio worked around on 2.8 does not happen here.
Checks
color-button(8 new tests, including axe),every-export-renders,color-input: pass.StylePanelSections.tsxwas there before this change.Screenshots:
/mnt/project-files/style-panel/core-colorbutton-docs.png,core-colorbutton-picked.png.Generated by Claude Code