mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21: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
134
types/Checkbox/Checkbox.d.ts
vendored
134
types/Checkbox/Checkbox.d.ts
vendored
|
@ -1,72 +1,74 @@
|
|||
/// <reference types="svelte" />
|
||||
|
||||
export interface CheckboxProps {
|
||||
/**
|
||||
* Specify whether the checkbox is checked
|
||||
* @default false
|
||||
*/
|
||||
checked?: boolean;
|
||||
|
||||
/**
|
||||
* Specify whether the checkbox is indeterminate
|
||||
* @default false
|
||||
*/
|
||||
indeterminate?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to display the skeleton state
|
||||
* @default false
|
||||
*/
|
||||
skeleton?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` for the checkbox to be read-only
|
||||
* @default false
|
||||
*/
|
||||
readonly?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to disable the checkbox
|
||||
* @default false
|
||||
*/
|
||||
disabled?: boolean;
|
||||
|
||||
/**
|
||||
* Specify the label text
|
||||
* @default ""
|
||||
*/
|
||||
labelText?: string;
|
||||
|
||||
/**
|
||||
* Set to `true` to visually hide the label text
|
||||
* @default false
|
||||
*/
|
||||
hideLabel?: boolean;
|
||||
|
||||
/**
|
||||
* Set a name for the input element
|
||||
* @default ""
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* Specify the title attribute for the label element
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* Set an id for the input label
|
||||
* @default "ccs-" + Math.random().toString(36)
|
||||
*/
|
||||
id?: string;
|
||||
|
||||
/**
|
||||
* Obtain a reference to the input HTML element
|
||||
* @default null
|
||||
*/
|
||||
ref?: null | HTMLInputElement;
|
||||
}
|
||||
|
||||
export default class Checkbox {
|
||||
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> & {
|
||||
/**
|
||||
* Specify whether the checkbox is checked
|
||||
* @default false
|
||||
*/
|
||||
checked?: boolean;
|
||||
|
||||
/**
|
||||
* Specify whether the checkbox is indeterminate
|
||||
* @default false
|
||||
*/
|
||||
indeterminate?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to display the skeleton state
|
||||
* @default false
|
||||
*/
|
||||
skeleton?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` for the checkbox to be read-only
|
||||
* @default false
|
||||
*/
|
||||
readonly?: boolean;
|
||||
|
||||
/**
|
||||
* Set to `true` to disable the checkbox
|
||||
* @default false
|
||||
*/
|
||||
disabled?: boolean;
|
||||
|
||||
/**
|
||||
* Specify the label text
|
||||
* @default ""
|
||||
*/
|
||||
labelText?: string;
|
||||
|
||||
/**
|
||||
* Set to `true` to visually hide the label text
|
||||
* @default false
|
||||
*/
|
||||
hideLabel?: boolean;
|
||||
|
||||
/**
|
||||
* Set a name for the input element
|
||||
* @default ""
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* Specify the title attribute for the label element
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* Set an id for the input label
|
||||
*/
|
||||
id?: string;
|
||||
|
||||
/**
|
||||
* Obtain a reference to the input HTML element
|
||||
* @default null
|
||||
*/
|
||||
ref?: null | HTMLInputElement;
|
||||
};
|
||||
|
||||
$$prop_def: CheckboxProps;
|
||||
$$slot_def: {};
|
||||
|
||||
$on(eventname: "check", cb: (event: CustomEvent<boolean>) => void): () => void;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue