docs(soma): los pickers dicen ya lo que Escape hace — adopcion del texto del eje de dismissal

El JSDoc de color/time/time-range-picker y dos demos llevaban en el arbol sin
commitear desde el 2026-08-11 mientras HEAD decia lo contrario de la conducta
shipped (82d269cd8: Escape descarta en AMBOS modos, un cierre sin causa es un
descarte), y el ledger §D5 citaba como evidencia una linea
(time-picker/types.ts:42) que en HEAD no existia.

Trabajo del eje de dismissal adoptado tal cual — cero cambios de codigo, solo
el texto que hace verdadero el contrato documentado.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
alpha-0.1-dir-prefs
dev 2 months ago
parent b7784d34a3
commit 778877dc94

@ -105,8 +105,10 @@ export type ColorPickerProviderProps = WithChild<{
closeOnSelect?: boolean;
/**
* Picker interaction mode. `inline` (default) closes the popover on
* outside-click + Escape. `modal` blocks them; the user must exit
* via `<X.Close>` (commit) or `<X.Cancel>` (revert) in the footer.
* outside-click. `modal` blocks outside-click; `<X.Close>` (commit) and
* `<X.Cancel>` (revert) in the footer are how the buffer resolves.
* Escape dismisses in BOTH modes — the APG `combobox` pattern this morfo
* declares. The framework blocks Escape only for `alertdialog`.
* @default 'inline'
*/
mode?: import('../picker-shell').PickerShellMode;

@ -36,8 +36,17 @@ export type TimePickerProviderProps = WithChild<Omit<PrimitiveDivAttributes, 'va
/**
* Picker interaction mode. `inline` (default) closes the popover on
* outside-click + Escape. `modal` keeps the popover open until the
* user explicitly commits via Save/Close or reverts via Cancel.
* outside-click. `modal` BLOCKS outside-click, so the value edits a buffer
* until the user commits via Save/Close or reverts via Cancel.
*
* Escape dismisses in BOTH modes. This morfo declares the APG `combobox`
* pattern, where Escape closes the popup, and the framework blocks it in
* exactly one place — `alertdialog` (`dialog-provider.svelte.ts`:
* `isAlert() ? 'ignore' : 'close'`), an interruptive pattern that demands
* an answer. A value picker is not that. Until 2026-08-11 this JSDoc said
* `modal` swallowed Escape; it never did, and making it true would leave a
* keyboard user with no exit unless the consumer remembered to compose a
* Cancel button.
* @default 'inline'
*/
mode?: TimePickerMode;

@ -56,8 +56,10 @@ export type TimeRangePickerProviderProps = WithChild<Omit<PrimitiveDivAttributes
closeOnRangeComplete?: boolean;
/**
* Picker mode. `'inline'` closes on outside-click; `'modal'` blocks
* outside-click and requires a footer action (`Close` / `Cancel`) to
* dismiss. Same contract as date-picker / time-picker / color-picker.
* outside-click, so a footer action (`Close` / `Cancel`) is how the user
* commits or reverts. Escape dismisses in BOTH modes — the APG `combobox`
* pattern this morfo declares, and the framework blocks Escape only for
* `alertdialog`. Same contract as date-picker / time-picker / color-picker.
* @default 'inline'
*/
mode?: PickerShellMode;

@ -589,7 +589,7 @@
<tr><td class="name">placeholder <span data-uix-tag data-kind="bindable">bindable</span></td><td class="type">TimeValue</td><td class="default empty">—</td><td>Anchor for empty-segment arrow-up.</td></tr>
<tr><td class="name">open <span data-uix-tag data-kind="bindable">bindable</span></td><td class="type">boolean</td><td class="default">false</td><td>Popover state.</td></tr>
<tr><td class="name">onOpenChange / onOpenChangeComplete</td><td class="type">(open) =&gt; void</td><td class="default empty">—</td><td>—</td></tr>
<tr><td class="name">mode</td><td class="type">'inline' | 'modal'</td><td class="default">'inline'</td><td>inline closes on outside-click + Escape; modal keeps open until Footer action.</td></tr>
<tr><td class="name">mode</td><td class="type">'inline' | 'modal'</td><td class="default">'inline'</td><td>inline closes on outside-click; modal blocks it and needs a Footer action. Escape dismisses in BOTH modes (APG combobox).</td></tr>
<tr><td class="name">validate</td><td class="type">(v) =&gt; string[] | string | void</td><td class="default empty">—</td><td>Custom validator.</td></tr>
<tr><td class="name">onInvalid</td><td class="type">(reason, msg?) =&gt; void</td><td class="default empty">—</td><td>—</td></tr>
<tr><td class="name">minValue / maxValue</td><td class="type">TimeValue</td><td class="default empty">—</td><td>Earliest / latest acceptable time.</td></tr>
@ -899,9 +899,9 @@
Composes a <strong>Popover</strong> (the WAI-ARIA dialog)
for the popover clock + <a href="https://www.w3.org/WAI/ARIA/apg/patterns/spinbutton/" target="_blank" rel="noreferrer">spinbutton</a>
per segment + <a href="https://www.w3.org/WAI/ARIA/apg/patterns/slider/" target="_blank" rel="noreferrer">slider</a>
per channel. <code>mode='modal'</code> blocks outside-click +
Escape; consumer must compose <code>Cancel</code> or
<code>Close</code> for exit.
per channel. <code>mode='modal'</code> blocks outside-click, so
<code>Cancel</code> / <code>Close</code> are how the buffer is reverted
or committed. Escape still dismisses — APG combobox.
</p>
<div data-uix-subsection-head>Keyboard (Trigger + segments)</div>
@ -929,7 +929,7 @@
<tr><td><span data-uix-kbd>PageUp</span> / <span data-uix-kbd>PageDown</span></td><td>Step by 5 (slider default).</td></tr>
<tr><td><span data-uix-kbd>Home</span> / <span data-uix-kbd>End</span></td><td>Jump to min / max.</td></tr>
<tr><td><span data-uix-kbd>Enter</span> on Close</td><td>Save + close (Popover <code>emerge-close</code>, cause <code>save</code>).</td></tr>
<tr><td><span data-uix-kbd>Escape</span></td><td>inline mode: dismiss (Popover <code>emerge-close</code>, cause <code>dismiss</code>). modal mode: ignored unless Cancel is wired.</td></tr>
<tr><td><span data-uix-kbd>Escape</span></td><td>Dismiss in both modes (Popover <code>emerge-close</code>, cause <code>dismiss</code>). Blocking it is reserved for <code>alertdialog</code>, not for a value picker.</td></tr>
</tbody>
</table>
</div>

@ -900,7 +900,7 @@
<p data-uix-section-desc>
Composes a <strong>Popover</strong> (the WAI-ARIA dialog) for the clock
popover + spinbutton per segment + slider per channel per endpoint. <code>mode='modal'</code> blocks
outside-click + Escape; consumer must compose
outside-click; the buffer is reverted or committed by
<code>Cancel</code> or <code>Close</code> for exit.
Per-endpoint segments and sliders carry
<code>data-endpoint='start'</code> / <code>'end'</code> so
@ -931,7 +931,7 @@
<tr><td><span data-uix-kbd>PageUp</span> / <span data-uix-kbd>PageDown</span></td><td>Step by 5 (slider default).</td></tr>
<tr><td><span data-uix-kbd>Home</span> / <span data-uix-kbd>End</span></td><td>Jump to min / max for the focused channel.</td></tr>
<tr><td><span data-uix-kbd>Enter</span> on Close</td><td>Save + close (Popover <code>emerge-close</code>, cause <code>save</code>).</td></tr>
<tr><td><span data-uix-kbd>Escape</span></td><td>inline mode: dismiss (Popover <code>emerge-close</code>, cause <code>dismiss</code>). modal mode: ignored unless Cancel is wired.</td></tr>
<tr><td><span data-uix-kbd>Escape</span></td><td>Dismiss in both modes (Popover <code>emerge-close</code>, cause <code>dismiss</code>). Blocking it is reserved for <code>alertdialog</code>, not for a value picker.</td></tr>
</tbody>
</table>
</div>

Loading…
Cancel
Save

Powered by TurnKey Linux.