@geoffcox/sterling-svelte 1.0.11 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.DS_Store +0 -0
- package/Button.svelte +25 -0
- package/Button.svelte.d.ts +9 -0
- package/{dist/Callout.svelte → Callout.svelte} +61 -78
- package/Callout.svelte.d.ts +15 -0
- package/Callout.types.d.ts +11 -0
- package/Checkbox.svelte +43 -0
- package/Checkbox.svelte.d.ts +10 -0
- package/{dist/Dialog.svelte → Dialog.svelte} +30 -38
- package/Dialog.svelte.d.ts +14 -0
- package/Dropdown.svelte +109 -0
- package/Dropdown.svelte.d.ts +18 -0
- package/Input.svelte +55 -0
- package/Input.svelte.d.ts +12 -0
- package/Label.svelte +91 -0
- package/Label.svelte.d.ts +17 -0
- package/Link.svelte +25 -0
- package/Link.svelte.d.ts +12 -0
- package/{dist/List.svelte → List.svelte} +35 -85
- package/List.svelte.d.ts +20 -0
- package/List.types.d.ts +5 -0
- package/ListItem.svelte +49 -0
- package/ListItem.svelte.d.ts +13 -0
- package/{dist/Menu.svelte → Menu.svelte} +18 -45
- package/Menu.svelte.d.ts +13 -0
- package/{dist/MenuBar.svelte → MenuBar.svelte} +36 -78
- package/MenuBar.svelte.d.ts +13 -0
- package/MenuButton.svelte +116 -0
- package/MenuButton.svelte.d.ts +20 -0
- package/{dist/MenuItem.svelte → MenuItem.svelte} +107 -151
- package/MenuItem.svelte.d.ts +22 -0
- package/{dist/MenuItem.types.d.ts → MenuItem.types.d.ts} +1 -9
- package/MenuSeparator.svelte +11 -0
- package/MenuSeparator.svelte.d.ts +6 -0
- package/{dist/Popover.svelte → Popover.svelte} +45 -64
- package/Popover.svelte.d.ts +15 -0
- package/Progress.constants.d.ts +1 -0
- package/Progress.constants.js +1 -0
- package/Progress.svelte +36 -0
- package/Progress.svelte.d.ts +12 -0
- package/Progress.types.d.ts +4 -0
- package/Radio.svelte +53 -0
- package/Radio.svelte.d.ts +13 -0
- package/{dist/Select.svelte → Select.svelte} +55 -94
- package/Select.svelte.d.ts +20 -0
- package/Slider.svelte +133 -0
- package/Slider.svelte.d.ts +19 -0
- package/Switch.svelte +61 -0
- package/Switch.svelte.d.ts +21 -0
- package/Tab.svelte +51 -0
- package/Tab.svelte.d.ts +12 -0
- package/{dist/TabList.svelte → TabList.svelte} +50 -76
- package/TabList.svelte.d.ts +18 -0
- package/TabList.types.d.ts +5 -0
- package/{dist/TextArea.svelte → TextArea.svelte} +17 -59
- package/TextArea.svelte.d.ts +19 -0
- package/Tooltip.svelte +63 -0
- package/Tooltip.svelte.d.ts +10 -0
- package/Tree.svelte +53 -0
- package/Tree.svelte.d.ts +15 -0
- package/Tree.types.d.ts +5 -0
- package/TreeChevron.svelte +27 -0
- package/TreeChevron.svelte.d.ts +9 -0
- package/{dist/TreeItem.svelte → TreeItem.svelte} +105 -159
- package/TreeItem.svelte.d.ts +22 -0
- package/TreeItem.types.d.ts +4 -0
- package/{dist/actions → actions}/clickOutside.d.ts +1 -0
- package/{dist/actions → actions}/clickOutside.js +1 -0
- package/actions/extraClass.d.ts +8 -0
- package/actions/extraClass.js +14 -0
- package/{dist/index.d.ts → index.d.ts} +4 -12
- package/{dist/index.js → index.js} +3 -9
- package/package.json +26 -28
- package/README.md +0 -18
- package/dist/Button.constants.d.ts +0 -2
- package/dist/Button.constants.js +0 -2
- package/dist/Button.svelte +0 -63
- package/dist/Button.svelte.d.ts +0 -65
- package/dist/Button.types.d.ts +0 -6
- package/dist/Callout.svelte.d.ts +0 -56
- package/dist/Checkbox.svelte +0 -79
- package/dist/Checkbox.svelte.d.ts +0 -63
- package/dist/ColorPicker.constants.d.ts +0 -1
- package/dist/ColorPicker.constants.js +0 -1
- package/dist/ColorPicker.svelte +0 -287
- package/dist/ColorPicker.svelte.d.ts +0 -52
- package/dist/ColorPicker.types.d.ts +0 -4
- package/dist/ColorPicker.types.js +0 -1
- package/dist/Dialog.svelte.d.ts +0 -37
- package/dist/Dropdown.svelte +0 -138
- package/dist/Dropdown.svelte.d.ts +0 -77
- package/dist/HexColorSliders.svelte +0 -103
- package/dist/HexColorSliders.svelte.d.ts +0 -51
- package/dist/HslColorSliders.svelte +0 -128
- package/dist/HslColorSliders.svelte.d.ts +0 -51
- package/dist/Input.svelte +0 -89
- package/dist/Input.svelte.d.ts +0 -74
- package/dist/Label.svelte +0 -197
- package/dist/Label.svelte.d.ts +0 -82
- package/dist/Label.types.d.ts +0 -6
- package/dist/Label.types.js +0 -1
- package/dist/Link.svelte +0 -57
- package/dist/Link.svelte.d.ts +0 -65
- package/dist/List.svelte.d.ts +0 -75
- package/dist/List.types.d.ts +0 -13
- package/dist/ListItem.svelte +0 -78
- package/dist/ListItem.svelte.d.ts +0 -67
- package/dist/Menu.svelte.d.ts +0 -63
- package/dist/MenuBar.svelte.d.ts +0 -58
- package/dist/MenuButton.svelte +0 -145
- package/dist/MenuButton.svelte.d.ts +0 -71
- package/dist/MenuItem.svelte.d.ts +0 -83
- package/dist/MenuItemDisplay.svelte +0 -32
- package/dist/MenuItemDisplay.svelte.d.ts +0 -39
- package/dist/MenuSeparator.svelte +0 -9
- package/dist/MenuSeparator.svelte.d.ts +0 -20
- package/dist/Popover.svelte.d.ts +0 -59
- package/dist/Progress.constants.d.ts +0 -1
- package/dist/Progress.constants.js +0 -1
- package/dist/Progress.svelte +0 -83
- package/dist/Progress.svelte.d.ts +0 -61
- package/dist/Progress.types.d.ts +0 -4
- package/dist/Radio.svelte +0 -126
- package/dist/Radio.svelte.d.ts +0 -65
- package/dist/RgbColorSliders.svelte +0 -93
- package/dist/RgbColorSliders.svelte.d.ts +0 -24
- package/dist/Select.svelte.d.ts +0 -83
- package/dist/Slider.svelte +0 -190
- package/dist/Slider.svelte.d.ts +0 -66
- package/dist/Switch.svelte +0 -110
- package/dist/Switch.svelte.d.ts +0 -74
- package/dist/Tab.svelte +0 -94
- package/dist/Tab.svelte.d.ts +0 -71
- package/dist/TabList.svelte.d.ts +0 -70
- package/dist/TabList.types.d.ts +0 -13
- package/dist/TextArea.svelte.d.ts +0 -69
- package/dist/Tooltip.svelte +0 -106
- package/dist/Tooltip.svelte.d.ts +0 -70
- package/dist/Tree.svelte +0 -104
- package/dist/Tree.svelte.d.ts +0 -67
- package/dist/Tree.types.d.ts +0 -13
- package/dist/TreeChevron.svelte +0 -66
- package/dist/TreeChevron.svelte.d.ts +0 -53
- package/dist/TreeItem.svelte.d.ts +0 -101
- package/dist/TreeItem.types.d.ts +0 -14
- package/dist/TreeItemDisplay.svelte +0 -74
- package/dist/TreeItemDisplay.svelte.d.ts +0 -73
- package/dist/css/Button.base.css +0 -74
- package/dist/css/Button.colorful.css +0 -17
- package/dist/css/Button.css +0 -7
- package/dist/css/Button.secondary.colorful.css +0 -15
- package/dist/css/Button.secondary.css +0 -11
- package/dist/css/Button.shapes.css +0 -14
- package/dist/css/Button.tool.colorful.css +0 -13
- package/dist/css/Button.tool.css +0 -18
- package/dist/css/Callout.base.css +0 -43
- package/dist/css/Callout.colorful.css +0 -5
- package/dist/css/Callout.css +0 -2
- package/dist/css/Checkbox.base.css +0 -145
- package/dist/css/Checkbox.colorful.css +0 -17
- package/dist/css/Checkbox.css +0 -2
- package/dist/css/ColorPicker.base.css +0 -23
- package/dist/css/ColorPicker.css +0 -1
- package/dist/css/Dialog.base.css +0 -114
- package/dist/css/Dialog.css +0 -1
- package/dist/css/Dropdown.base.css +0 -147
- package/dist/css/Dropdown.colorful.css +0 -23
- package/dist/css/Dropdown.css +0 -2
- package/dist/css/HexColorSliders.base.css +0 -106
- package/dist/css/HexColorSliders.css +0 -1
- package/dist/css/HslColorSliders.base.css +0 -124
- package/dist/css/HslColorSliders.css +0 -1
- package/dist/css/Input.base.css +0 -103
- package/dist/css/Input.colorful.css +0 -22
- package/dist/css/Input.composed.css +0 -8
- package/dist/css/Input.css +0 -3
- package/dist/css/Label.base.css +0 -118
- package/dist/css/Label.boxed.colorful.css +0 -21
- package/dist/css/Label.boxed.css +0 -31
- package/dist/css/Label.colorful.css +0 -3
- package/dist/css/Label.css +0 -4
- package/dist/css/Link.base.css +0 -54
- package/dist/css/Link.colorful.css +0 -15
- package/dist/css/Link.css +0 -10
- package/dist/css/Link.ghost.colorful.css +0 -7
- package/dist/css/Link.ghost.css +0 -11
- package/dist/css/Link.text-underline.css +0 -8
- package/dist/css/Link.text-underline.ghost.css +0 -13
- package/dist/css/Link.undecorated.colorful.css +0 -8
- package/dist/css/Link.undecorated.css +0 -8
- package/dist/css/Link.undecorated.ghost.css +0 -8
- package/dist/css/Link.undecorated.underline.css +0 -8
- package/dist/css/List.base.css +0 -98
- package/dist/css/List.css +0 -1
- package/dist/css/ListItem.base.css +0 -59
- package/dist/css/ListItem.css +0 -1
- package/dist/css/Menu.base.css +0 -21
- package/dist/css/Menu.css +0 -1
- package/dist/css/MenuBar.base.css +0 -9
- package/dist/css/MenuBar.css +0 -1
- package/dist/css/MenuButton.base.css +0 -13
- package/dist/css/MenuButton.css +0 -1
- package/dist/css/MenuItem.base.css +0 -48
- package/dist/css/MenuItem.css +0 -1
- package/dist/css/MenuItemDisplay.base.css +0 -108
- package/dist/css/MenuItemDisplay.css +0 -1
- package/dist/css/MenuSeparator.base.css +0 -5
- package/dist/css/MenuSeparator.css +0 -1
- package/dist/css/Popover.css +0 -21
- package/dist/css/Progress.base.css +0 -99
- package/dist/css/Progress.css +0 -1
- package/dist/css/Radio.base.css +0 -135
- package/dist/css/Radio.colorful.css +0 -18
- package/dist/css/Radio.css +0 -2
- package/dist/css/RgbColorSliders.base.css +0 -94
- package/dist/css/RgbColorSliders.css +0 -1
- package/dist/css/Select.base.css +0 -127
- package/dist/css/Select.colorful.css +0 -24
- package/dist/css/Select.composed.css +0 -12
- package/dist/css/Select.css +0 -3
- package/dist/css/Slider.base.css +0 -192
- package/dist/css/Slider.colorful.css +0 -11
- package/dist/css/Slider.composed.css +0 -8
- package/dist/css/Slider.css +0 -3
- package/dist/css/Switch.base.css +0 -206
- package/dist/css/Switch.colorful.css +0 -45
- package/dist/css/Switch.css +0 -2
- package/dist/css/Tab.base.css +0 -132
- package/dist/css/Tab.colorful.css +0 -13
- package/dist/css/Tab.css +0 -2
- package/dist/css/TabList.base.css +0 -34
- package/dist/css/TabList.css +0 -1
- package/dist/css/TextArea.base.css +0 -85
- package/dist/css/TextArea.colorful.css +0 -17
- package/dist/css/TextArea.composed.css +0 -8
- package/dist/css/TextArea.css +0 -3
- package/dist/css/Tooltip.base.css +0 -6
- package/dist/css/Tooltip.css +0 -1
- package/dist/css/Tree.base.css +0 -74
- package/dist/css/Tree.composed.css +0 -8
- package/dist/css/Tree.css +0 -2
- package/dist/css/TreeChevron.base.css +0 -86
- package/dist/css/TreeChevron.css +0 -1
- package/dist/css/TreeItem.base.css +0 -3
- package/dist/css/TreeItem.css +0 -1
- package/dist/css/TreeItemDisplay.base.css +0 -74
- package/dist/css/TreeItemDisplay.colorful.css +0 -9
- package/dist/css/TreeItemDisplay.css +0 -1
- package/dist/css/dark-mode.css +0 -134
- package/dist/css/light-mode.css +0 -134
- package/dist/css/sterling.css +0 -37
- package/dist/package.json +0 -108
- /package/{dist/@types → @types}/clickOutside.d.ts +0 -0
- /package/{dist/Button.types.js → Callout.types.js} +0 -0
- /package/{dist/Label.constants.d.ts → Label.constants.d.ts} +0 -0
- /package/{dist/Label.constants.js → Label.constants.js} +0 -0
- /package/{dist/List.constants.d.ts → List.constants.d.ts} +0 -0
- /package/{dist/List.constants.js → List.constants.js} +0 -0
- /package/{dist/List.types.js → List.types.js} +0 -0
- /package/{dist/MenuBar.constants.d.ts → MenuBar.constants.d.ts} +0 -0
- /package/{dist/MenuBar.constants.js → MenuBar.constants.js} +0 -0
- /package/{dist/MenuBar.types.d.ts → MenuBar.types.d.ts} +0 -0
- /package/{dist/MenuBar.types.js → MenuBar.types.js} +0 -0
- /package/{dist/MenuItem.constants.d.ts → MenuItem.constants.d.ts} +0 -0
- /package/{dist/MenuItem.constants.js → MenuItem.constants.js} +0 -0
- /package/{dist/MenuItem.types.js → MenuItem.types.js} +0 -0
- /package/{dist/MenuItem.utils.d.ts → MenuItem.utils.d.ts} +0 -0
- /package/{dist/MenuItem.utils.js → MenuItem.utils.js} +0 -0
- /package/{dist/Popover.constants.d.ts → Popover.constants.d.ts} +0 -0
- /package/{dist/Popover.constants.js → Popover.constants.js} +0 -0
- /package/{dist/Popover.types.d.ts → Popover.types.d.ts} +0 -0
- /package/{dist/Popover.types.js → Popover.types.js} +0 -0
- /package/{dist/Portal.constants.d.ts → Portal.constants.d.ts} +0 -0
- /package/{dist/Portal.constants.js → Portal.constants.js} +0 -0
- /package/{dist/Portal.types.d.ts → Portal.types.d.ts} +0 -0
- /package/{dist/Portal.types.js → Portal.types.js} +0 -0
- /package/{dist/Progress.types.js → Progress.types.js} +0 -0
- /package/{dist/TabList.constants.d.ts → TabList.constants.d.ts} +0 -0
- /package/{dist/TabList.constants.js → TabList.constants.js} +0 -0
- /package/{dist/TabList.types.js → TabList.types.js} +0 -0
- /package/{dist/TextArea.constants.d.ts → TextArea.constants.d.ts} +0 -0
- /package/{dist/TextArea.constants.js → TextArea.constants.js} +0 -0
- /package/{dist/TextArea.types.d.ts → TextArea.types.d.ts} +0 -0
- /package/{dist/TextArea.types.js → TextArea.types.js} +0 -0
- /package/{dist/Tree.constants.d.ts → Tree.constants.d.ts} +0 -0
- /package/{dist/Tree.constants.js → Tree.constants.js} +0 -0
- /package/{dist/Tree.types.js → Tree.types.js} +0 -0
- /package/{dist/TreeItem.constants.d.ts → TreeItem.constants.d.ts} +0 -0
- /package/{dist/TreeItem.constants.js → TreeItem.constants.js} +0 -0
- /package/{dist/TreeItem.types.js → TreeItem.types.js} +0 -0
- /package/{dist/actions → actions}/applyLightDarkMode.d.ts +0 -0
- /package/{dist/actions → actions}/applyLightDarkMode.js +0 -0
- /package/{dist/actions → actions}/forwardEvents.d.ts +0 -0
- /package/{dist/actions → actions}/forwardEvents.js +0 -0
- /package/{dist/actions → actions}/portal.d.ts +0 -0
- /package/{dist/actions → actions}/portal.js +0 -0
- /package/{dist/actions → actions}/trapKeyboardFocus.d.ts +0 -0
- /package/{dist/actions → actions}/trapKeyboardFocus.js +0 -0
- /package/{dist/idGenerator.d.ts → idGenerator.d.ts} +0 -0
- /package/{dist/idGenerator.js → idGenerator.js} +0 -0
- /package/{dist/mediaQueries → mediaQueries}/prefersColorSchemeDark.d.ts +0 -0
- /package/{dist/mediaQueries → mediaQueries}/prefersColorSchemeDark.js +0 -0
- /package/{dist/mediaQueries → mediaQueries}/prefersReducedMotion.d.ts +0 -0
- /package/{dist/mediaQueries → mediaQueries}/prefersReducedMotion.js +0 -0
- /package/{dist/mediaQueries → mediaQueries}/usingKeyboard.d.ts +0 -0
- /package/{dist/mediaQueries → mediaQueries}/usingKeyboard.js +0 -0
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
red?: number | undefined;
|
|
6
|
-
green?: number | undefined;
|
|
7
|
-
blue?: number | undefined;
|
|
8
|
-
alpha?: number | undefined;
|
|
9
|
-
variant?: string | undefined;
|
|
10
|
-
};
|
|
11
|
-
events: {
|
|
12
|
-
blur: FocusEvent;
|
|
13
|
-
click: MouseEvent;
|
|
14
|
-
copy: ClipboardEvent;
|
|
15
|
-
cut: ClipboardEvent;
|
|
16
|
-
dblclick: MouseEvent;
|
|
17
|
-
dragend: DragEvent;
|
|
18
|
-
dragenter: DragEvent;
|
|
19
|
-
dragleave: DragEvent;
|
|
20
|
-
dragover: DragEvent;
|
|
21
|
-
dragstart: DragEvent;
|
|
22
|
-
drop: DragEvent;
|
|
23
|
-
focus: FocusEvent;
|
|
24
|
-
focusin: FocusEvent;
|
|
25
|
-
focusout: FocusEvent;
|
|
26
|
-
keydown: KeyboardEvent;
|
|
27
|
-
keypress: KeyboardEvent;
|
|
28
|
-
keyup: KeyboardEvent;
|
|
29
|
-
mousedown: MouseEvent;
|
|
30
|
-
mouseenter: MouseEvent;
|
|
31
|
-
mouseleave: MouseEvent;
|
|
32
|
-
mousemove: MouseEvent;
|
|
33
|
-
mouseover: MouseEvent;
|
|
34
|
-
mouseout: MouseEvent;
|
|
35
|
-
mouseup: MouseEvent;
|
|
36
|
-
wheel: WheelEvent;
|
|
37
|
-
paste: ClipboardEvent;
|
|
38
|
-
change: CustomEvent<any>;
|
|
39
|
-
} & {
|
|
40
|
-
[evt: string]: CustomEvent<any>;
|
|
41
|
-
};
|
|
42
|
-
slots: {};
|
|
43
|
-
exports?: undefined;
|
|
44
|
-
bindings?: undefined;
|
|
45
|
-
};
|
|
46
|
-
export type HexColorSlidersProps = typeof __propDef.props;
|
|
47
|
-
export type HexColorSlidersEvents = typeof __propDef.events;
|
|
48
|
-
export type HexColorSlidersSlots = typeof __propDef.slots;
|
|
49
|
-
export default class HexColorSliders extends SvelteComponent<HexColorSlidersProps, HexColorSlidersEvents, HexColorSlidersSlots> {
|
|
50
|
-
}
|
|
51
|
-
export {};
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
<script>import { createEventDispatcher } from 'svelte';
|
|
2
|
-
import Input from './Input.svelte';
|
|
3
|
-
import Slider from './Slider.svelte';
|
|
4
|
-
import { round } from 'lodash-es';
|
|
5
|
-
// ----- Props ----- //
|
|
6
|
-
/** The hue value. */
|
|
7
|
-
export let hue = 0;
|
|
8
|
-
/** The saturation value. */
|
|
9
|
-
export let saturation = 0;
|
|
10
|
-
/** The lightness value. */
|
|
11
|
-
export let lightness = 0;
|
|
12
|
-
/** The alpha value. */
|
|
13
|
-
export let alpha = 1;
|
|
14
|
-
/** Additional class names to apply. */
|
|
15
|
-
export let variant = '';
|
|
16
|
-
// ----- State ----- //
|
|
17
|
-
let hueText = hue.toString();
|
|
18
|
-
let saturationText = saturation.toString();
|
|
19
|
-
let lightnessText = lightness.toString();
|
|
20
|
-
let alphaText = alpha.toString();
|
|
21
|
-
$: {
|
|
22
|
-
hueText = hue.toString();
|
|
23
|
-
}
|
|
24
|
-
$: {
|
|
25
|
-
saturationText = saturation.toString();
|
|
26
|
-
}
|
|
27
|
-
$: {
|
|
28
|
-
lightnessText = lightness.toString();
|
|
29
|
-
}
|
|
30
|
-
$: {
|
|
31
|
-
alphaText = alpha.toString();
|
|
32
|
-
}
|
|
33
|
-
// ----- Events ----- //
|
|
34
|
-
const dispatcher = createEventDispatcher();
|
|
35
|
-
const raiseChange = (hue, saturation, lightness) => {
|
|
36
|
-
dispatcher('change', { hue, saturation, lightness });
|
|
37
|
-
};
|
|
38
|
-
$: raiseChange(hue, saturation, lightness);
|
|
39
|
-
// ----- Event Handlers ----- //
|
|
40
|
-
const onHueInputChange = (event) => {
|
|
41
|
-
const inputChangeEvent = event;
|
|
42
|
-
const text = inputChangeEvent?.currentTarget?.value;
|
|
43
|
-
const newValue = text ? Number.parseFloat(text) : hue;
|
|
44
|
-
if (newValue && newValue !== Number.NaN) {
|
|
45
|
-
hue = Math.round(Math.max(0, Math.min(360, newValue)));
|
|
46
|
-
hueText = hue.toString();
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
const onSaturationInputChange = (event) => {
|
|
50
|
-
const inputChangeEvent = event;
|
|
51
|
-
const text = inputChangeEvent?.currentTarget?.value?.replace(/%/g, '');
|
|
52
|
-
const newValue = text ? Number.parseFloat(text) : saturation;
|
|
53
|
-
if (newValue && newValue !== Number.NaN) {
|
|
54
|
-
saturation = Math.round(Math.max(0, Math.min(100, newValue)));
|
|
55
|
-
saturationText = saturation.toString();
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
const onLightnessInputChange = (event) => {
|
|
59
|
-
const inputChangeEvent = event;
|
|
60
|
-
const text = inputChangeEvent?.currentTarget?.value?.replace(/%/g, '');
|
|
61
|
-
const newValue = text ? Number.parseFloat(text) : lightness;
|
|
62
|
-
if (newValue && newValue !== Number.NaN) {
|
|
63
|
-
lightness = Math.round(Math.max(0, Math.min(100, newValue)));
|
|
64
|
-
lightnessText = lightness.toString();
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
const onAlphaInputchange = (event) => {
|
|
68
|
-
const inputChangeEvent = event;
|
|
69
|
-
const text = inputChangeEvent?.currentTarget?.value;
|
|
70
|
-
const newValue = text ? Number.parseFloat(text) : alpha;
|
|
71
|
-
if (newValue && newValue !== Number.NaN) {
|
|
72
|
-
alpha = round(Math.max(0, Math.min(1, newValue)), 2);
|
|
73
|
-
alphaText = alpha.toString();
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
</script>
|
|
77
|
-
|
|
78
|
-
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
|
79
|
-
<div
|
|
80
|
-
class={`sterling-hsl-color-sliders ${variant}`}
|
|
81
|
-
on:blur
|
|
82
|
-
on:click
|
|
83
|
-
on:copy
|
|
84
|
-
on:cut
|
|
85
|
-
on:dblclick
|
|
86
|
-
on:dragend
|
|
87
|
-
on:dragenter
|
|
88
|
-
on:dragleave
|
|
89
|
-
on:dragover
|
|
90
|
-
on:dragstart
|
|
91
|
-
on:drop
|
|
92
|
-
on:focus
|
|
93
|
-
on:focusin
|
|
94
|
-
on:focusout
|
|
95
|
-
on:keydown
|
|
96
|
-
on:keypress
|
|
97
|
-
on:keyup
|
|
98
|
-
on:mousedown
|
|
99
|
-
on:mouseenter
|
|
100
|
-
on:mouseleave
|
|
101
|
-
on:mousemove
|
|
102
|
-
on:mouseover
|
|
103
|
-
on:mouseout
|
|
104
|
-
on:mouseup
|
|
105
|
-
on:wheel
|
|
106
|
-
on:paste
|
|
107
|
-
{...$$restProps}
|
|
108
|
-
style={`--hue:${hue};--saturation:${saturation}%;--lightness:${lightness}%`}
|
|
109
|
-
>
|
|
110
|
-
<Slider min={0} max={360} precision={0} bind:value={hue} variant="hue" />
|
|
111
|
-
<Input bind:value={hueText} variant="hue" on:change={(e) => onHueInputChange(e)} />
|
|
112
|
-
<Slider min={0} max={100} precision={0} bind:value={saturation} variant="saturation" />
|
|
113
|
-
<Input
|
|
114
|
-
bind:value={saturationText}
|
|
115
|
-
variant="saturation"
|
|
116
|
-
on:change={(e) => onSaturationInputChange(e)}
|
|
117
|
-
/>
|
|
118
|
-
<Slider min={0} max={100} precision={0} bind:value={lightness} variant="lightness" />
|
|
119
|
-
<Input
|
|
120
|
-
bind:value={lightnessText}
|
|
121
|
-
variant="lightness"
|
|
122
|
-
on:change={(e) => onLightnessInputChange(e)}
|
|
123
|
-
/>
|
|
124
|
-
<div class="alpha-hatch" />
|
|
125
|
-
<div class="alpha-gradient" />
|
|
126
|
-
<Slider min={0} max={1} precision={2} step={0.01} bind:value={alpha} variant="alpha" />
|
|
127
|
-
<Input bind:value={alphaText} variant="alpha" on:change={(e) => onAlphaInputchange(e)} />
|
|
128
|
-
</div>
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
hue?: number | undefined;
|
|
6
|
-
saturation?: number | undefined;
|
|
7
|
-
lightness?: number | undefined;
|
|
8
|
-
alpha?: number | undefined;
|
|
9
|
-
variant?: string | undefined;
|
|
10
|
-
};
|
|
11
|
-
events: {
|
|
12
|
-
blur: FocusEvent;
|
|
13
|
-
click: MouseEvent;
|
|
14
|
-
copy: ClipboardEvent;
|
|
15
|
-
cut: ClipboardEvent;
|
|
16
|
-
dblclick: MouseEvent;
|
|
17
|
-
dragend: DragEvent;
|
|
18
|
-
dragenter: DragEvent;
|
|
19
|
-
dragleave: DragEvent;
|
|
20
|
-
dragover: DragEvent;
|
|
21
|
-
dragstart: DragEvent;
|
|
22
|
-
drop: DragEvent;
|
|
23
|
-
focus: FocusEvent;
|
|
24
|
-
focusin: FocusEvent;
|
|
25
|
-
focusout: FocusEvent;
|
|
26
|
-
keydown: KeyboardEvent;
|
|
27
|
-
keypress: KeyboardEvent;
|
|
28
|
-
keyup: KeyboardEvent;
|
|
29
|
-
mousedown: MouseEvent;
|
|
30
|
-
mouseenter: MouseEvent;
|
|
31
|
-
mouseleave: MouseEvent;
|
|
32
|
-
mousemove: MouseEvent;
|
|
33
|
-
mouseover: MouseEvent;
|
|
34
|
-
mouseout: MouseEvent;
|
|
35
|
-
mouseup: MouseEvent;
|
|
36
|
-
wheel: WheelEvent;
|
|
37
|
-
paste: ClipboardEvent;
|
|
38
|
-
change: CustomEvent<any>;
|
|
39
|
-
} & {
|
|
40
|
-
[evt: string]: CustomEvent<any>;
|
|
41
|
-
};
|
|
42
|
-
slots: {};
|
|
43
|
-
exports?: undefined;
|
|
44
|
-
bindings?: undefined;
|
|
45
|
-
};
|
|
46
|
-
export type HslColorSlidersProps = typeof __propDef.props;
|
|
47
|
-
export type HslColorSlidersEvents = typeof __propDef.events;
|
|
48
|
-
export type HslColorSlidersSlots = typeof __propDef.slots;
|
|
49
|
-
export default class HslColorSliders extends SvelteComponent<HslColorSlidersProps, HslColorSlidersEvents, HslColorSlidersSlots> {
|
|
50
|
-
}
|
|
51
|
-
export {};
|
package/dist/Input.svelte
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
<script>import { idGenerator } from './idGenerator';
|
|
2
|
-
import { usingKeyboard } from './mediaQueries/usingKeyboard';
|
|
3
|
-
// ----- Props ----- //
|
|
4
|
-
export let disabled = false;
|
|
5
|
-
export let id = undefined;
|
|
6
|
-
export let value = '';
|
|
7
|
-
/** Additional class names to apply. */
|
|
8
|
-
export let variant = '';
|
|
9
|
-
// ----- State ----- //
|
|
10
|
-
let inputRef;
|
|
11
|
-
$: {
|
|
12
|
-
if ($$slots.default && id === undefined) {
|
|
13
|
-
id = idGenerator.nextId('Input');
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
// ----- Methods ----- //
|
|
17
|
-
export const blur = () => {
|
|
18
|
-
inputRef?.blur();
|
|
19
|
-
};
|
|
20
|
-
export const click = () => {
|
|
21
|
-
inputRef?.click();
|
|
22
|
-
};
|
|
23
|
-
export const focus = (options) => {
|
|
24
|
-
inputRef?.focus();
|
|
25
|
-
};
|
|
26
|
-
export const select = () => {
|
|
27
|
-
inputRef?.select();
|
|
28
|
-
};
|
|
29
|
-
export const setSelectionRange = (start, end, direction) => {
|
|
30
|
-
inputRef?.setSelectionRange(start, end, direction);
|
|
31
|
-
};
|
|
32
|
-
export const setRangeText = (replacement, start, end, selectionMode) => {
|
|
33
|
-
if (start && end) {
|
|
34
|
-
inputRef?.setRangeText(replacement, start, end, selectionMode);
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
inputRef?.setRangeText(replacement);
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
</script>
|
|
41
|
-
|
|
42
|
-
{#if $$slots.default}
|
|
43
|
-
<label class={`sterling-input-label ${variant}`} class:disabled for={id}>
|
|
44
|
-
<slot {disabled} {value} {variant} />
|
|
45
|
-
</label>
|
|
46
|
-
{/if}
|
|
47
|
-
<div class={`sterling-input ${variant}`} class:disabled class:using-keyboard={$usingKeyboard}>
|
|
48
|
-
<input
|
|
49
|
-
bind:this={inputRef}
|
|
50
|
-
class:using-keyboard={$usingKeyboard}
|
|
51
|
-
{disabled}
|
|
52
|
-
{id}
|
|
53
|
-
bind:value
|
|
54
|
-
on:beforeinput
|
|
55
|
-
on:blur
|
|
56
|
-
on:click
|
|
57
|
-
on:change
|
|
58
|
-
on:copy
|
|
59
|
-
on:cut
|
|
60
|
-
on:paste
|
|
61
|
-
on:dblclick
|
|
62
|
-
on:dragend
|
|
63
|
-
on:dragenter
|
|
64
|
-
on:dragleave
|
|
65
|
-
on:dragover
|
|
66
|
-
on:dragstart
|
|
67
|
-
on:drop
|
|
68
|
-
on:focus
|
|
69
|
-
on:focusin
|
|
70
|
-
on:focusout
|
|
71
|
-
on:input
|
|
72
|
-
on:invalid
|
|
73
|
-
on:keydown
|
|
74
|
-
on:keypress
|
|
75
|
-
on:keyup
|
|
76
|
-
on:mousedown
|
|
77
|
-
on:mouseenter
|
|
78
|
-
on:mouseleave
|
|
79
|
-
on:mousemove
|
|
80
|
-
on:mouseover
|
|
81
|
-
on:mouseout
|
|
82
|
-
on:mouseup
|
|
83
|
-
on:select
|
|
84
|
-
on:submit
|
|
85
|
-
on:reset
|
|
86
|
-
on:wheel|passive
|
|
87
|
-
{...$$restProps}
|
|
88
|
-
/>
|
|
89
|
-
</div>
|
package/dist/Input.svelte.d.ts
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
disabled?: boolean | undefined;
|
|
6
|
-
id?: string | undefined;
|
|
7
|
-
value?: string | undefined;
|
|
8
|
-
variant?: string | undefined;
|
|
9
|
-
blur?: (() => void) | undefined;
|
|
10
|
-
click?: (() => void) | undefined;
|
|
11
|
-
focus?: ((options?: FocusOptions) => void) | undefined;
|
|
12
|
-
select?: (() => void) | undefined;
|
|
13
|
-
setSelectionRange?: ((start: number | null, end: number | null, direction?: 'forward' | 'backward' | 'none') => void) | undefined;
|
|
14
|
-
setRangeText?: ((replacement: string, start?: number, end?: number, selectionMode?: SelectionMode) => void) | undefined;
|
|
15
|
-
};
|
|
16
|
-
events: {
|
|
17
|
-
beforeinput: InputEvent;
|
|
18
|
-
blur: FocusEvent;
|
|
19
|
-
click: MouseEvent;
|
|
20
|
-
change: Event;
|
|
21
|
-
copy: ClipboardEvent;
|
|
22
|
-
cut: ClipboardEvent;
|
|
23
|
-
paste: ClipboardEvent;
|
|
24
|
-
dblclick: MouseEvent;
|
|
25
|
-
dragend: DragEvent;
|
|
26
|
-
dragenter: DragEvent;
|
|
27
|
-
dragleave: DragEvent;
|
|
28
|
-
dragover: DragEvent;
|
|
29
|
-
dragstart: DragEvent;
|
|
30
|
-
drop: DragEvent;
|
|
31
|
-
focus: FocusEvent;
|
|
32
|
-
focusin: FocusEvent;
|
|
33
|
-
focusout: FocusEvent;
|
|
34
|
-
input: Event;
|
|
35
|
-
invalid: Event;
|
|
36
|
-
keydown: KeyboardEvent;
|
|
37
|
-
keypress: KeyboardEvent;
|
|
38
|
-
keyup: KeyboardEvent;
|
|
39
|
-
mousedown: MouseEvent;
|
|
40
|
-
mouseenter: MouseEvent;
|
|
41
|
-
mouseleave: MouseEvent;
|
|
42
|
-
mousemove: MouseEvent;
|
|
43
|
-
mouseover: MouseEvent;
|
|
44
|
-
mouseout: MouseEvent;
|
|
45
|
-
mouseup: MouseEvent;
|
|
46
|
-
select: Event;
|
|
47
|
-
submit: SubmitEvent;
|
|
48
|
-
reset: Event;
|
|
49
|
-
wheel: WheelEvent;
|
|
50
|
-
} & {
|
|
51
|
-
[evt: string]: CustomEvent<any>;
|
|
52
|
-
};
|
|
53
|
-
slots: {
|
|
54
|
-
default: {
|
|
55
|
-
disabled: boolean;
|
|
56
|
-
value: string;
|
|
57
|
-
variant: string;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
exports?: undefined;
|
|
61
|
-
bindings?: undefined;
|
|
62
|
-
};
|
|
63
|
-
export type InputProps = typeof __propDef.props;
|
|
64
|
-
export type InputEvents = typeof __propDef.events;
|
|
65
|
-
export type InputSlots = typeof __propDef.slots;
|
|
66
|
-
export default class Input extends SvelteComponent<InputProps, InputEvents, InputSlots> {
|
|
67
|
-
get blur(): () => void;
|
|
68
|
-
get click(): () => void;
|
|
69
|
-
get focus(): (options?: FocusOptions | undefined) => void;
|
|
70
|
-
get select(): () => void;
|
|
71
|
-
get setSelectionRange(): (start: number | null, end: number | null, direction?: "forward" | "backward" | "none" | undefined) => void;
|
|
72
|
-
get setRangeText(): (replacement: string, start?: number | undefined, end?: number | undefined, selectionMode?: SelectionMode | undefined) => void;
|
|
73
|
-
}
|
|
74
|
-
export {};
|
package/dist/Label.svelte
DELETED
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
<script>import { onMount } from 'svelte';
|
|
2
|
-
import Tooltip from './Tooltip.svelte';
|
|
3
|
-
import { usingKeyboard } from './mediaQueries/usingKeyboard';
|
|
4
|
-
// ----- Props ----- //
|
|
5
|
-
let htmlFor = undefined;
|
|
6
|
-
export { htmlFor as for };
|
|
7
|
-
/**
|
|
8
|
-
* If true, clicking the label invokes a click on the content.
|
|
9
|
-
* Needed only when the label is not associated with the content through containment or the `for`/`id` relationship.
|
|
10
|
-
*/
|
|
11
|
-
export let forwardClick = false;
|
|
12
|
-
/** The text to display in the label. Not used if the text slot is filled. */
|
|
13
|
-
export let text = undefined;
|
|
14
|
-
/** The status message to display. */
|
|
15
|
-
export let message = undefined;
|
|
16
|
-
/** When true, indicates a value is required. */
|
|
17
|
-
export let required = false;
|
|
18
|
-
/** The reason the value is required. */
|
|
19
|
-
export let requiredReason = 'required';
|
|
20
|
-
/** The status of the label. */
|
|
21
|
-
export let status = 'none';
|
|
22
|
-
/** Additional class names to apply. */
|
|
23
|
-
export let variant = '';
|
|
24
|
-
/** When true, the label appears above the content. */
|
|
25
|
-
export let vertical = true;
|
|
26
|
-
// ----- State ----- //
|
|
27
|
-
let labelRef;
|
|
28
|
-
let targetDisabled = false;
|
|
29
|
-
let targetRef = null;
|
|
30
|
-
const findTarget = () => {
|
|
31
|
-
let candidate = null;
|
|
32
|
-
if (htmlFor) {
|
|
33
|
-
candidate = labelRef?.querySelector(`[id="${htmlFor}"]`);
|
|
34
|
-
}
|
|
35
|
-
if (!candidate) {
|
|
36
|
-
candidate = labelRef?.querySelector('a[href], ' +
|
|
37
|
-
'audio[controls], ' +
|
|
38
|
-
'button, ' +
|
|
39
|
-
'details, ' +
|
|
40
|
-
'div[contenteditable], ' +
|
|
41
|
-
'form, ' +
|
|
42
|
-
'input, ' +
|
|
43
|
-
'select, ' +
|
|
44
|
-
'textarea, ' +
|
|
45
|
-
'video[controls], ' +
|
|
46
|
-
'[tabindex]:not([tabindex="-1"])');
|
|
47
|
-
}
|
|
48
|
-
targetRef = candidate;
|
|
49
|
-
};
|
|
50
|
-
const isElementDisabled = (element) => {
|
|
51
|
-
if (element) {
|
|
52
|
-
return (element.getAttribute('aria-disabled') === 'true' ||
|
|
53
|
-
element?.matches(':disabled') ||
|
|
54
|
-
element?.disabled === true ||
|
|
55
|
-
element?.classList.contains('disabled'));
|
|
56
|
-
}
|
|
57
|
-
return false;
|
|
58
|
-
};
|
|
59
|
-
$: $$slots.default, labelRef, htmlFor, findTarget();
|
|
60
|
-
$: {
|
|
61
|
-
targetDisabled = isElementDisabled(targetRef);
|
|
62
|
-
}
|
|
63
|
-
const mutationCallback = (mutations) => {
|
|
64
|
-
let disabled = undefined;
|
|
65
|
-
for (let i = 0; i < mutations.length; i++) {
|
|
66
|
-
const mutation = mutations[i];
|
|
67
|
-
if (mutation.type === 'attributes') {
|
|
68
|
-
if (mutation.attributeName === 'aria-disabled' ||
|
|
69
|
-
mutation.attributeName === 'disabled' ||
|
|
70
|
-
mutation.attributeName === 'class') {
|
|
71
|
-
if (isElementDisabled(targetRef)) {
|
|
72
|
-
// a mutation caused the target to be disabled
|
|
73
|
-
disabled = true;
|
|
74
|
-
break;
|
|
75
|
-
}
|
|
76
|
-
// a mutation caused the target to be enabled
|
|
77
|
-
disabled = false;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
// if we found a mutation that changed disabled, then set targetDisabled
|
|
82
|
-
if (disabled !== undefined) {
|
|
83
|
-
targetDisabled = disabled;
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
let mutationObserver;
|
|
87
|
-
onMount(() => {
|
|
88
|
-
mutationObserver = new MutationObserver(mutationCallback);
|
|
89
|
-
return () => mutationObserver?.disconnect();
|
|
90
|
-
});
|
|
91
|
-
$: {
|
|
92
|
-
mutationObserver?.disconnect();
|
|
93
|
-
if (targetRef) {
|
|
94
|
-
mutationObserver?.observe(targetRef, {
|
|
95
|
-
attributes: true
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
// ----- Methods ----- //
|
|
100
|
-
export const click = () => {
|
|
101
|
-
labelRef?.click();
|
|
102
|
-
};
|
|
103
|
-
export const blur = () => {
|
|
104
|
-
labelRef?.blur();
|
|
105
|
-
};
|
|
106
|
-
export const focus = (options) => {
|
|
107
|
-
labelRef?.focus(options);
|
|
108
|
-
};
|
|
109
|
-
// ----- Event Handlers ----- //
|
|
110
|
-
const onClick = () => {
|
|
111
|
-
if (forwardClick) {
|
|
112
|
-
targetRef?.click();
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
</script>
|
|
116
|
-
|
|
117
|
-
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
|
|
118
|
-
<label
|
|
119
|
-
bind:this={labelRef}
|
|
120
|
-
aria-disabled={targetDisabled}
|
|
121
|
-
class={`sterling-label ${variant}`}
|
|
122
|
-
class:disabled={targetDisabled}
|
|
123
|
-
class:using-keyboard={$usingKeyboard}
|
|
124
|
-
class:vertical
|
|
125
|
-
for={htmlFor}
|
|
126
|
-
on:blur
|
|
127
|
-
on:click
|
|
128
|
-
on:click={onClick}
|
|
129
|
-
on:copy
|
|
130
|
-
on:cut
|
|
131
|
-
on:dblclick
|
|
132
|
-
on:dragend
|
|
133
|
-
on:dragenter
|
|
134
|
-
on:dragleave
|
|
135
|
-
on:dragover
|
|
136
|
-
on:dragstart
|
|
137
|
-
on:drop
|
|
138
|
-
on:focus
|
|
139
|
-
on:focusin
|
|
140
|
-
on:focusout
|
|
141
|
-
on:keydown
|
|
142
|
-
on:keypress
|
|
143
|
-
on:keyup
|
|
144
|
-
on:mousedown
|
|
145
|
-
on:mouseenter
|
|
146
|
-
on:mouseleave
|
|
147
|
-
on:mousemove
|
|
148
|
-
on:mouseover
|
|
149
|
-
on:mouseout
|
|
150
|
-
on:mouseup
|
|
151
|
-
on:scroll
|
|
152
|
-
on:wheel|passive
|
|
153
|
-
on:paste
|
|
154
|
-
{...$$restProps}
|
|
155
|
-
>
|
|
156
|
-
{#if text || $$slots.text}
|
|
157
|
-
<slot
|
|
158
|
-
name="text"
|
|
159
|
-
disabled={targetDisabled}
|
|
160
|
-
for={htmlFor}
|
|
161
|
-
{forwardClick}
|
|
162
|
-
{required}
|
|
163
|
-
{text}
|
|
164
|
-
{variant}
|
|
165
|
-
>
|
|
166
|
-
<div class="text">
|
|
167
|
-
{text}
|
|
168
|
-
</div>
|
|
169
|
-
</slot>
|
|
170
|
-
{/if}
|
|
171
|
-
{#if $$slots.default}
|
|
172
|
-
<div class="content">
|
|
173
|
-
<slot />
|
|
174
|
-
</div>
|
|
175
|
-
{/if}
|
|
176
|
-
{#if message}
|
|
177
|
-
<slot name="message" disabled={targetDisabled} {message} {required} {status} {variant}>
|
|
178
|
-
<div
|
|
179
|
-
class="message"
|
|
180
|
-
class:info={status === 'info'}
|
|
181
|
-
class:success={status === 'success'}
|
|
182
|
-
class:warning={status === 'warning'}
|
|
183
|
-
class:error={status === 'danger'}
|
|
184
|
-
>
|
|
185
|
-
{message}
|
|
186
|
-
</div>
|
|
187
|
-
</slot>
|
|
188
|
-
{/if}
|
|
189
|
-
{#if required}
|
|
190
|
-
<slot name="required" {requiredReason} {variant}>
|
|
191
|
-
<Tooltip showOn="hover">
|
|
192
|
-
<span class="required-reason" slot="tip">{requiredReason}</span>
|
|
193
|
-
<div class="required">*</div>
|
|
194
|
-
</Tooltip>
|
|
195
|
-
</slot>
|
|
196
|
-
{/if}
|
|
197
|
-
</label>
|
package/dist/Label.svelte.d.ts
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
for?: string | undefined;
|
|
6
|
-
forwardClick?: boolean | undefined;
|
|
7
|
-
text?: string | undefined;
|
|
8
|
-
message?: string | undefined;
|
|
9
|
-
required?: boolean | undefined;
|
|
10
|
-
requiredReason?: string | undefined;
|
|
11
|
-
status?: string | undefined;
|
|
12
|
-
variant?: string | undefined;
|
|
13
|
-
vertical?: boolean | undefined;
|
|
14
|
-
click?: (() => void) | undefined;
|
|
15
|
-
blur?: (() => void) | undefined;
|
|
16
|
-
focus?: ((options?: FocusOptions) => void) | undefined;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
blur: FocusEvent;
|
|
20
|
-
click: MouseEvent;
|
|
21
|
-
copy: ClipboardEvent;
|
|
22
|
-
cut: ClipboardEvent;
|
|
23
|
-
dblclick: MouseEvent;
|
|
24
|
-
dragend: DragEvent;
|
|
25
|
-
dragenter: DragEvent;
|
|
26
|
-
dragleave: DragEvent;
|
|
27
|
-
dragover: DragEvent;
|
|
28
|
-
dragstart: DragEvent;
|
|
29
|
-
drop: DragEvent;
|
|
30
|
-
focus: FocusEvent;
|
|
31
|
-
focusin: FocusEvent;
|
|
32
|
-
focusout: FocusEvent;
|
|
33
|
-
keydown: KeyboardEvent;
|
|
34
|
-
keypress: KeyboardEvent;
|
|
35
|
-
keyup: KeyboardEvent;
|
|
36
|
-
mousedown: MouseEvent;
|
|
37
|
-
mouseenter: MouseEvent;
|
|
38
|
-
mouseleave: MouseEvent;
|
|
39
|
-
mousemove: MouseEvent;
|
|
40
|
-
mouseover: MouseEvent;
|
|
41
|
-
mouseout: MouseEvent;
|
|
42
|
-
mouseup: MouseEvent;
|
|
43
|
-
scroll: Event;
|
|
44
|
-
wheel: WheelEvent;
|
|
45
|
-
paste: ClipboardEvent;
|
|
46
|
-
} & {
|
|
47
|
-
[evt: string]: CustomEvent<any>;
|
|
48
|
-
};
|
|
49
|
-
slots: {
|
|
50
|
-
text: {
|
|
51
|
-
disabled: boolean;
|
|
52
|
-
for: string | undefined;
|
|
53
|
-
forwardClick: boolean;
|
|
54
|
-
required: boolean;
|
|
55
|
-
text: string | undefined;
|
|
56
|
-
variant: string;
|
|
57
|
-
};
|
|
58
|
-
default: {};
|
|
59
|
-
message: {
|
|
60
|
-
disabled: boolean;
|
|
61
|
-
message: string | undefined;
|
|
62
|
-
required: boolean;
|
|
63
|
-
status: string;
|
|
64
|
-
variant: string;
|
|
65
|
-
};
|
|
66
|
-
required: {
|
|
67
|
-
requiredReason: string;
|
|
68
|
-
variant: string;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
exports?: undefined;
|
|
72
|
-
bindings?: undefined;
|
|
73
|
-
};
|
|
74
|
-
export type LabelProps = typeof __propDef.props;
|
|
75
|
-
export type LabelEvents = typeof __propDef.events;
|
|
76
|
-
export type LabelSlots = typeof __propDef.slots;
|
|
77
|
-
export default class Label extends SvelteComponent<LabelProps, LabelEvents, LabelSlots> {
|
|
78
|
-
get click(): () => void;
|
|
79
|
-
get blur(): () => void;
|
|
80
|
-
get focus(): (options?: FocusOptions | undefined) => void;
|
|
81
|
-
}
|
|
82
|
-
export {};
|
package/dist/Label.types.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { LABEL_STATUSES, LABEL_VARIANTS } from './Label.constants';
|
|
2
|
-
type LabelStatusTuple = typeof LABEL_STATUSES;
|
|
3
|
-
export type LabelStatus = LabelStatusTuple[number];
|
|
4
|
-
type LabelVariantTuple = typeof LABEL_VARIANTS;
|
|
5
|
-
export type LabelVariant = LabelVariantTuple[number];
|
|
6
|
-
export {};
|
package/dist/Label.types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|