carbon-components-svelte/types/Slider/Slider.d.ts
Eric Liu 8ddf2def8b
Align v10.36 (#696)
* chore(deps-dev): upgrade carbon-components to v10.36.0

* feat(structured-list): add condensed, flush props

* fix(structured-list): deprecate the border prop

* fix(code-snippet): set min/max height for multi-line code snippet #656

Fixes #656

* fix(image-loader): make SSR compatible using a window type check guard

* docs(tag): add separate disabled example for filterable/interactive tags

* docs: update number of supported chart types

* feat(side-nav): support rail variant

* feat(ui-shell): add isSelected prop to HeaderNavItem

* fix(ui-shell): default isSelected to false in SideNavMenuItem

* fix(text-area): forward missing keydown event #665

Fixes #665

* feat: forward keyup event to components with inputs

* feat(checkbox): make labelText slottable #563

Closes #563

* feat: make labelText slottable

Related #563

* docs(component-api): account for undefined type

* docs(ui-shell): link to correct rail source

* fix(ui-shell): default isSelected in HeaderNavItem to false
2021-06-26 14:39:49 -07:00

119 lines
2 KiB
TypeScript

/// <reference types="svelte" />
import { SvelteComponentTyped } from "svelte";
export interface SliderProps
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
/**
* Specify the value of the slider
* @default 0
*/
value?: number;
/**
* Set the maximum slider value
* @default 100
*/
max?: number;
/**
* Specify the label for the max value
* @default ""
*/
maxLabel?: string;
/**
* Set the minimum slider value
* @default 0
*/
min?: number;
/**
* Specify the label for the min value
* @default ""
*/
minLabel?: string;
/**
* Set the step value
* @default 1
*/
step?: number;
/**
* Set the step multiplier value
* @default 4
*/
stepMultiplier?: number;
/**
* Set to `true` to require a value
* @default false
*/
required?: boolean;
/**
* Specify the input type
* @default "number"
*/
inputType?: string;
/**
* Set to `true` to disable the slider
* @default false
*/
disabled?: boolean;
/**
* Set to `true` to enable the light variant
* @default false
*/
light?: boolean;
/**
* Set to `true` to hide the text input
* @default false
*/
hideTextInput?: boolean;
/**
* Set an id for the slider div element
* @default "ccs-" + Math.random().toString(36)
*/
id?: string;
/**
* Set to `true` to indicate an invalid state
* @default false
*/
invalid?: boolean;
/**
* Specify the label text
* @default ""
*/
labelText?: string;
/**
* Set a name for the slider element
* @default ""
*/
name?: string;
/**
* Obtain a reference to the HTML element
* @default null
*/
ref?: null | HTMLDivElement;
}
export default class Slider extends SvelteComponentTyped<
SliderProps,
{
click: WindowEventMap["click"];
mouseover: WindowEventMap["mouseover"];
mouseenter: WindowEventMap["mouseenter"];
mouseleave: WindowEventMap["mouseleave"];
change: CustomEvent<any>;
},
{ labelText: {} }
> {}