diff --git a/src/uix/eidos/components/date-picker/date-picker-cancel.svelte b/src/uix/eidos/components/date-picker/date-picker-cancel.svelte
index 6144480c7..8d0853bab 100644
--- a/src/uix/eidos/components/date-picker/date-picker-cancel.svelte
+++ b/src/uix/eidos/components/date-picker/date-picker-cancel.svelte
@@ -5,7 +5,8 @@
import type { HTMLButtonAttributes } from 'svelte/elements';
// Cancel action — reverts to the value snapshot taken on open and
- // closes the popover. Hidden when `cancelButton` is false on the root.
+ // closes the popover. Renders unconditionally — visibility is the
+ // consumer's responsibility (include the part to show it).
interface CancelProps extends HTMLButtonAttributes {
children?: Snippet;
}
@@ -14,7 +15,6 @@
const uix = getActiveUix();
const provider = DatePickerProvider.require();
- const visible = $derived(provider.opts.cancelButton.current);
function handleClick(event: MouseEvent & { currentTarget: EventTarget & HTMLButtonElement }) {
provider.cancel();
@@ -22,19 +22,17 @@
}
-{#if visible}
-
-{/if}
+
diff --git a/src/uix/eidos/components/date-picker/date-picker-clear.svelte b/src/uix/eidos/components/date-picker/date-picker-clear.svelte
index 4446ae0c8..88c29dd26 100644
--- a/src/uix/eidos/components/date-picker/date-picker-clear.svelte
+++ b/src/uix/eidos/components/date-picker/date-picker-clear.svelte
@@ -5,7 +5,8 @@
import type { HTMLButtonAttributes } from 'svelte/elements';
// Clear action — resets the picker's value (undefined) and keeps the
- // popover open. Hidden when `clearButton` is false on the root.
+ // popover open. Renders unconditionally — visibility is the
+ // consumer's responsibility (include the part to show it).
interface ClearProps extends HTMLButtonAttributes {
children?: Snippet;
}
@@ -14,7 +15,6 @@
const uix = getActiveUix();
const provider = DatePickerProvider.require();
- const visible = $derived(provider.opts.clearButton.current);
function handleClick(event: MouseEvent & { currentTarget: EventTarget & HTMLButtonElement }) {
provider.clear();
@@ -22,19 +22,17 @@
}
-{#if visible}
-
-{/if}
+
diff --git a/src/uix/eidos/components/date-picker/date-picker-close.svelte b/src/uix/eidos/components/date-picker/date-picker-close.svelte
index 5b52afc0c..bd6345769 100644
--- a/src/uix/eidos/components/date-picker/date-picker-close.svelte
+++ b/src/uix/eidos/components/date-picker/date-picker-close.svelte
@@ -5,9 +5,12 @@
import type { HTMLButtonAttributes } from 'svelte/elements';
// Close / Save action — commits the current value and closes the
- // popover. Visible when `closeButton` is true OR `mode='modal'`
- // (modal pickers always need a way out — outside-click and Escape
- // are intentionally blocked).
+ // popover. Renders unconditionally — visibility is the consumer's
+ // responsibility (include the part to show it).
+ //
+ // In `mode='modal'` the consumer MUST include this part (or another
+ // route out) because outside-click and Escape are intentionally
+ // blocked — otherwise the picker has no exit affordance.
interface CloseProps extends HTMLButtonAttributes {
children?: Snippet;
}
@@ -16,9 +19,6 @@
const uix = getActiveUix();
const provider = DatePickerProvider.require();
- const visible = $derived(
- provider.opts.closeButton.current || provider.opts.mode.current === 'modal'
- );
function handleClick(event: MouseEvent & { currentTarget: EventTarget & HTMLButtonElement }) {
provider.commit();
@@ -26,19 +26,17 @@
}
-{#if visible}
-
-{/if}
+
diff --git a/src/uix/eidos/components/date-picker/date-picker-footer.svelte b/src/uix/eidos/components/date-picker/date-picker-footer.svelte
index 0a9cbd1f0..5116662ab 100644
--- a/src/uix/eidos/components/date-picker/date-picker-footer.svelte
+++ b/src/uix/eidos/components/date-picker/date-picker-footer.svelte
@@ -3,9 +3,14 @@
import type { Snippet } from 'svelte';
import type { HTMLAttributes } from 'svelte/elements';
- // Footer container for the picker calendar. Renders only when the
- // consumer enabled at least one button (clearButton/cancelButton/
- // closeButton on the root) — `mode='modal'` forces Close on.
+ // Footer container for the picker calendar. Pure composition: render
+ // whatever you want inside it (Clear / Cancel / Close — or arbitrary
+ // children). Visibility is the consumer's responsibility — include
+ // the part to show it, omit it to hide it.
+ //
+ // Carries `data-mode` so the CSS can react to the picker's mode
+ // without re-reading provider context (e.g. enforce a minimum width
+ // in modal, change the visual emphasis of the close button, etc.).
interface FooterProps extends HTMLAttributes {
children?: Snippet;
}
@@ -14,14 +19,8 @@
const provider = DatePickerProvider.require();
const mode = $derived(provider.opts.mode.current);
- const showClear = $derived(provider.opts.clearButton.current);
- const showCancel = $derived(provider.opts.cancelButton.current);
- const showClose = $derived(provider.opts.closeButton.current || mode === 'modal');
- const visible = $derived(showClear || showCancel || showClose);
-{#if visible}
-