import { SvelteComponentTyped } from "svelte"; import type { SvelteHTMLElements } from "svelte/elements"; export type CarbonTimePickerContext = { isFluid: boolean; readonly: import("svelte/store").Readable; disabled: import("svelte/store").Readable; hideLabel: import("svelte/store").Readable; }; type $RestProps = SvelteHTMLElements["input"]; type $Props = { /** * Specify the size of the input. * Inherits the parent `Form` size when unset. * Also accepts Carbon v11's `"md"` (the 40px default, which overrides a * `Form` size) and `"lg"` (`"xl"`). */ size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined; /** * Specify the input value. * Follows the field's value after the owning form resets, on every Svelte version. * @default "" */ value?: string; /** * Specify the input placeholder text * @default "hh:mm" */ placeholder?: string; /** * Specify the `pattern` attribute for the input element * @default "(1[012]|[1-9]):[0-5][0-9](\\s)?" */ pattern?: string; /** * Specify the `maxlength` input attribute * @default 5 */ maxlength?: number; /** * Set to `true` to disable the input * @default false */ disabled?: boolean; /** * Set to `true` to mark the input as read-only * @default false */ readonly?: boolean; /** * Specify the label text * @default "" */ labelText?: string; /** * Set to `true` to visually hide the label text. In the fluid variant, * the `TimePickerSelect` labels are hidden too. * @default false */ hideLabel?: boolean; /** * Set to `true` to indicate an invalid state * @default false */ invalid?: boolean; /** * Specify the invalid state text * @default "" */ invalidText?: string; /** * Set to `true` to indicate a warning state * @default false */ warn?: boolean; /** * Specify the warning state text * @default "" */ warnText?: string; /** * Specify the helper text * @default "" */ helperText?: string; /** * Set an id for the input element * @default uniqueId() */ id?: string; /** * Specify a name attribute for the input. */ name?: string | undefined; /** * Obtain a reference to the input HTML element. * @default null */ ref?: null | HTMLInputElement; /** * Set to `true` to use the fluid variant. * Inherited from the parent `FluidForm` context, * so it does not need to be set when used inside `FluidForm`. * @default false */ fluid?: boolean; /** * Set to `true` to select the input's text when it receives focus * @default false */ selectTextOnFocus?: boolean; labelChildren?: (this: void) => void; children?: (this: void) => void; [key: `data-${string}`]: unknown; }; export type TimePickerProps = Omit<$RestProps, keyof $Props> & $Props; export default class TimePicker extends SvelteComponentTyped< TimePickerProps, { blur: WindowEventMap["blur"]; change: WindowEventMap["change"]; click: WindowEventMap["click"]; focus: WindowEventMap["focus"]; input: WindowEventMap["input"]; keydown: WindowEventMap["keydown"]; keyup: WindowEventMap["keyup"]; mouseenter: WindowEventMap["mouseenter"]; mouseleave: WindowEventMap["mouseleave"]; mouseover: WindowEventMap["mouseover"]; paste: WindowEventMap["paste"]; }, { default: Record; labelChildren: Record; } > {}