Two picker-coherence fixes:
1. Field-trigger flush treatment — popover.css excluded the picker's generic
button envelope only for `[data-field-control-trigger]`. The time-picker /
time-range-picker clock icons carry `data-{component}-trigger` (NOT the
field-control marker), so they still got the popover button border/bg —
looking like a bordered button instead of a flush field icon. The exclusion
now keys off the `field-trigger` archetype, which the morfo/soma stamp on
EVERY picker trigger; added the missing override to time-range-picker.
All five pickers verified: date / time / time-range / date-range render a
flush 28px icon; color renders its own field-box (its border is the field's,
not the popover envelope's).
2. Footer follows picker size — picker-shell Clear/Cancel/Close were pinned to
`size="xs"`, so md/lg pickers had a tiny incoherent footer. New shared
`picker-shell/visual-context` lets each picker publish its resolved size;
the footer buttons read it (fallback xs). Wired into all five pickers.
Verified: at picker md the footer buttons are md (36px).
svelte-check clean. Excludes words/palabras/chronos.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
active-uix
parent
f822d6e4dd
commit
f20efd4681
@ -0,0 +1,26 @@
|
||||
import { getContext, setContext } from 'svelte';
|
||||
import type { ButtonSize } from '$uix/eidos/components/button';
|
||||
|
||||
/**
|
||||
* Shared visual context for the picker-shell footer controls.
|
||||
*
|
||||
* The footer parts (`Clear` / `Cancel` / `Close` / `Commit`) are reused by every
|
||||
* picker (date / time / color / *-range). Each picker's eidos root publishes its
|
||||
* resolved size here so the footer buttons scale WITH the picker instead of being
|
||||
* pinned to a fixed size — keeping the whole popover coherent at any size.
|
||||
*/
|
||||
const PICKER_SHELL_VISUAL = Symbol('picker-shell-visual');
|
||||
|
||||
export interface PickerShellVisual {
|
||||
/** The active picker's resolved size. Footer controls follow it. */
|
||||
getSize(): ButtonSize;
|
||||
}
|
||||
|
||||
export function setPickerShellVisual(ctx: PickerShellVisual): PickerShellVisual {
|
||||
setContext(PICKER_SHELL_VISUAL, ctx);
|
||||
return ctx;
|
||||
}
|
||||
|
||||
export function getPickerShellVisual(): PickerShellVisual | undefined {
|
||||
return getContext<PickerShellVisual | undefined>(PICKER_SHELL_VISUAL);
|
||||
}
|
||||
Loading…
Reference in new issue