mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
refactor(types): shorten ref, id JSDocs, use CarbonIcon type, export component props
This commit is contained in:
parent
d38e6d8be6
commit
75d4b4cf03
219 changed files with 5168 additions and 5259 deletions
122
types/DatePicker/DatePicker.d.ts
vendored
122
types/DatePicker/DatePicker.d.ts
vendored
|
@ -1,66 +1,68 @@
|
|||
/// <reference types="svelte" />
|
||||
|
||||
export interface DatePickerProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
|
||||
/**
|
||||
* Specify the date picker type
|
||||
* @default "simple"
|
||||
*/
|
||||
datePickerType?: "simple" | "single" | "range";
|
||||
|
||||
/**
|
||||
* Specify the date picker input value
|
||||
* @default ""
|
||||
*/
|
||||
value?: string;
|
||||
|
||||
/**
|
||||
* Specify the element to append the calendar to
|
||||
*/
|
||||
appendTo?: HTMLElement;
|
||||
|
||||
/**
|
||||
* Specify the date format
|
||||
* @default "m/d/Y"
|
||||
*/
|
||||
dateFormat?: string;
|
||||
|
||||
/**
|
||||
* Specify the maximum date
|
||||
* @default null
|
||||
*/
|
||||
maxDate?: null | string | Date;
|
||||
|
||||
/**
|
||||
* Specify the minimum date
|
||||
* @default null
|
||||
*/
|
||||
minDate?: null | string | Date;
|
||||
|
||||
/**
|
||||
* Specify the locale
|
||||
* @default "en"
|
||||
*/
|
||||
locale?: string;
|
||||
|
||||
/**
|
||||
* Set to `true` to use the short variant
|
||||
* @default false
|
||||
*/
|
||||
short?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to enable the light variant
|
||||
* @default false
|
||||
*/
|
||||
light?: boolean;
|
||||
|
||||
/**
|
||||
* Set an id for the date picker element
|
||||
* @default "ccs-" + Math.random().toString(36)
|
||||
*/
|
||||
id?: string;
|
||||
}
|
||||
|
||||
export default class DatePicker {
|
||||
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> & {
|
||||
/**
|
||||
* Specify the date picker type
|
||||
* @default "simple"
|
||||
*/
|
||||
datePickerType?: "simple" | "single" | "range";
|
||||
|
||||
/**
|
||||
* Specify the date picker input value
|
||||
* @default ""
|
||||
*/
|
||||
value?: string;
|
||||
|
||||
/**
|
||||
* Specify the element to append the calendar to
|
||||
*/
|
||||
appendTo?: HTMLElement;
|
||||
|
||||
/**
|
||||
* Specify the date format
|
||||
* @default "m/d/Y"
|
||||
*/
|
||||
dateFormat?: string;
|
||||
|
||||
/**
|
||||
* Specify the maximum date
|
||||
* @default null
|
||||
*/
|
||||
maxDate?: null | string | Date;
|
||||
|
||||
/**
|
||||
* Specify the minimum date
|
||||
* @default null
|
||||
*/
|
||||
minDate?: null | string | Date;
|
||||
|
||||
/**
|
||||
* Specify the locale
|
||||
* @default "en"
|
||||
*/
|
||||
locale?: string;
|
||||
|
||||
/**
|
||||
* Set to `true` to use the short variant
|
||||
* @default false
|
||||
*/
|
||||
short?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to enable the light variant
|
||||
* @default false
|
||||
*/
|
||||
light?: boolean;
|
||||
|
||||
/**
|
||||
* Set an id for the date picker element
|
||||
*/
|
||||
id?: string;
|
||||
};
|
||||
|
||||
$$prop_def: DatePickerProps;
|
||||
$$slot_def: {
|
||||
default: {};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue