import { type IconProp } from '../icon';
import type { LikeDate } from './types';
type BaseProps = {
/** @default 'md' */
size?: 'sm' | 'md' | 'lg';
placeholder?: string;
disabled?: boolean;
/** Non-clickable but still visible. Trigger button is disabled (like `disabled`) but cursor stays default. */
readonly?: boolean;
/** Visual display mode — non-focusable, no hover/focus animations, hidden clear button. */
inert?: boolean;
error?: boolean;
/** Strip border + background + focus underline. */
borderless?: boolean;
/** Earliest selectable date (inclusive). */
min?: LikeDate;
/** Latest selectable date (inclusive). */
max?: LikeDate;
/**
* BCP-47 locale tag. Drives month/weekday labels, trigger date formatting AND first day of week.
* When omitted, uses an opinionated default: `en-US` formatting + Monday-first calendar.
* When passed (even `'en-US'`), first day of week is derived from the locale via `Intl.Locale.getWeekInfo()`.
*/
locale?: string;
/** Native form name. When set, a hidden input with the ISO value is rendered for form submission. */
name?: string;
id?: string | null;
autofocus?: boolean;
'aria-label'?: string;
'aria-describedby'?: string;
'aria-required'?: boolean;
/**
* Leading icon shown to the left of the value. Pass either a raw SVG string (used with ``) or a `Snippet` for fully custom content.
* When set, the default calendar icon on the right is suppressed (the clear button still shows when applicable).
*/
icon?: IconProp;
};
type ClearableProps = BaseProps & {
/** Value can be cleared to `null`. Trigger shows a clear (X) button when set. */
clearable: true;
value: LikeDate | null | undefined;
on?: {
change?: (value: string | null) => void;
};
};
type RequiredProps = BaseProps & {
/** Value is required. No clear button. */
clearable: false;
value: LikeDate;
on?: {
change?: (value: string) => void;
};
};
type Props = ClearableProps | RequiredProps;
/**
* DatePicker — single-day calendar picker built on Floating UI for positioning. Discriminated by
* `clearable`: `clearable: true` allows clearing to `null` and shows a clear (X) button;
* `clearable: false` requires a value and renders no clear control. Emits ISO 8601 strings via
* `on.change` from local midnight of the picked day.
*
* ### CSS Custom Properties
* | Property | Description | Default |
* |---|---|---|
* | `--sc-kit--date-picker--height` | Trigger height | per size |
* | `--sc-kit--date-picker--padding-inline` | Trigger horizontal padding | per size |
* | `--sc-kit--date-picker--gap` | Gap between value and icon/clear | `var(--sc-kit--space--2)` |
* | `--sc-kit--date-picker--width` | Trigger width | `100%` |
* | `--sc-kit--date-picker--background` | Trigger background | `var(--sc-kit--color--bg--field)` |
* | `--sc-kit--date-picker--background--disabled` | Trigger background when disabled | `var(--sc-kit--color--bg--field-alt)` |
* | `--sc-kit--date-picker--border-color` | Trigger border color | `var(--sc-kit--color--border--field)` |
* | `--sc-kit--date-picker--border-color--hover` | Trigger border color on hover | `var(--sc-kit--color--border--strong)` |
* | `--sc-kit--date-picker--border-color--error` | Trigger border color in error state | `var(--sc-kit--color--danger)` |
* | `--sc-kit--date-picker--border-radius` | Trigger border radius | per size — `sm` 4px, `md`/`lg` 6px |
* | `--sc-kit--date-picker--underline-color` | Inset bottom-underline indicator (transparent default, accent when open, danger on error) | `transparent` |
* | `--sc-kit--date-picker--font-size` | Trigger font size | per size |
* | `--sc-kit--date-picker--color` | Trigger text color | `var(--sc-kit--color--text--primary)` |
* | `--sc-kit--date-picker--placeholder--color` | Placeholder text color | `var(--sc-kit--color--text--placeholder)` |
* | `--sc-kit--date-picker--icon--color` | Leading / trailing icon color (does NOT affect inner affordances) | `var(--sc-kit--color--text--muted)` |
* | `--sc-kit--date-picker--icon--size` | Leading / trailing icon size (does NOT affect inner affordances) | per size |
*/
declare const Cmp: import("svelte").Component;
type Cmp = ReturnType;
export default Cmp;