@sveltia/ui 0.25.7 → 0.25.9
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/dist/components/alert/alert.svelte +7 -3
- package/dist/components/alert/alert.svelte.d.ts +11 -10
- package/dist/components/alert/infobar.svelte +9 -5
- package/dist/components/alert/infobar.svelte.d.ts +15 -14
- package/dist/components/button/button-group.svelte +6 -2
- package/dist/components/button/button-group.svelte.d.ts +7 -6
- package/dist/components/button/button.svelte +5 -2
- package/dist/components/button/button.svelte.d.ts +2 -1
- package/dist/components/button/select-button-group.svelte +12 -8
- package/dist/components/button/select-button-group.svelte.d.ts +19 -18
- package/dist/components/button/select-button.svelte +6 -3
- package/dist/components/button/select-button.svelte.d.ts +4 -3
- package/dist/components/button/split-button.svelte +10 -7
- package/dist/components/button/split-button.svelte.d.ts +18 -17
- package/dist/components/calendar/calendar.svelte +1 -1
- package/dist/components/calendar/calendar.svelte.d.ts +2 -2
- package/dist/components/checkbox/checkbox-group.svelte +9 -5
- package/dist/components/checkbox/checkbox-group.svelte.d.ts +13 -12
- package/dist/components/checkbox/checkbox.svelte +13 -9
- package/dist/components/checkbox/checkbox.svelte.d.ts +19 -17
- package/dist/components/dialog/alert-dialog.svelte +5 -2
- package/dist/components/dialog/alert-dialog.svelte.d.ts +3 -1
- package/dist/components/dialog/confirmation-dialog.svelte +5 -2
- package/dist/components/dialog/confirmation-dialog.svelte.d.ts +3 -1
- package/dist/components/dialog/dialog.svelte +5 -2
- package/dist/components/dialog/dialog.svelte.d.ts +3 -1
- package/dist/components/dialog/prompt-dialog.svelte +16 -7
- package/dist/components/dialog/prompt-dialog.svelte.d.ts +17 -13
- package/dist/components/disclosure/disclosure.svelte +12 -8
- package/dist/components/disclosure/disclosure.svelte.d.ts +21 -20
- package/dist/components/divider/divider.svelte +3 -3
- package/dist/components/divider/divider.svelte.d.ts +6 -6
- package/dist/components/divider/spacer.svelte +2 -2
- package/dist/components/divider/spacer.svelte.d.ts +4 -4
- package/dist/components/drawer/drawer.svelte +18 -13
- package/dist/components/drawer/drawer.svelte.d.ts +39 -37
- package/dist/components/grid/grid-body.svelte +7 -3
- package/dist/components/grid/grid-body.svelte.d.ts +9 -8
- package/dist/components/grid/grid-cell.svelte +6 -2
- package/dist/components/grid/grid-cell.svelte.d.ts +7 -6
- package/dist/components/grid/grid-col-header.svelte +6 -2
- package/dist/components/grid/grid-col-header.svelte.d.ts +7 -6
- package/dist/components/grid/grid-foot.svelte +6 -2
- package/dist/components/grid/grid-foot.svelte.d.ts +7 -6
- package/dist/components/grid/grid-head.svelte +6 -2
- package/dist/components/grid/grid-head.svelte.d.ts +7 -6
- package/dist/components/grid/grid-row-header.svelte +6 -2
- package/dist/components/grid/grid-row-header.svelte.d.ts +7 -6
- package/dist/components/grid/grid-row.svelte +9 -5
- package/dist/components/grid/grid-row.svelte.d.ts +13 -12
- package/dist/components/grid/grid.svelte +10 -6
- package/dist/components/grid/grid.svelte.d.ts +15 -14
- package/dist/components/icon/icon.svelte +2 -2
- package/dist/components/icon/icon.svelte.d.ts +4 -4
- package/dist/components/listbox/listbox.svelte +18 -13
- package/dist/components/listbox/listbox.svelte.d.ts +27 -26
- package/dist/components/listbox/option-group.svelte +9 -5
- package/dist/components/listbox/option-group.svelte.d.ts +13 -12
- package/dist/components/listbox/option.svelte +12 -8
- package/dist/components/listbox/option.svelte.d.ts +17 -15
- package/dist/components/menu/menu-button.svelte +7 -4
- package/dist/components/menu/menu-button.svelte.d.ts +6 -5
- package/dist/components/menu/menu-item-checkbox.svelte +5 -2
- package/dist/components/menu/menu-item-checkbox.svelte.d.ts +3 -1
- package/dist/components/menu/menu-item-group.svelte +9 -5
- package/dist/components/menu/menu-item-group.svelte.d.ts +8 -8
- package/dist/components/menu/menu-item-radio.svelte +5 -2
- package/dist/components/menu/menu-item-radio.svelte.d.ts +3 -1
- package/dist/components/menu/menu-item.svelte +5 -2
- package/dist/components/menu/menu-item.svelte.d.ts +3 -1
- package/dist/components/menu/menu.svelte +9 -5
- package/dist/components/menu/menu.svelte.d.ts +13 -12
- package/dist/components/progressbar/progressbar.svelte +5 -5
- package/dist/components/progressbar/progressbar.svelte.d.ts +10 -10
- package/dist/components/radio/radio-group.svelte +13 -9
- package/dist/components/radio/radio-group.svelte.d.ts +21 -20
- package/dist/components/radio/radio.svelte +15 -11
- package/dist/components/radio/radio.svelte.d.ts +27 -26
- package/dist/components/select/combobox.svelte +6 -3
- package/dist/components/select/combobox.svelte.d.ts +3 -1
- package/dist/components/select/select-tags.svelte +16 -13
- package/dist/components/select/select-tags.svelte.d.ts +27 -28
- package/dist/components/select/select.svelte +5 -1
- package/dist/components/select/select.svelte.d.ts +2 -1
- package/dist/components/slider/slider.svelte +27 -25
- package/dist/components/slider/slider.svelte.d.ts +35 -34
- package/dist/components/switch/switch.svelte +13 -9
- package/dist/components/switch/switch.svelte.d.ts +21 -20
- package/dist/components/table/table-body.svelte +7 -3
- package/dist/components/table/table-body.svelte.d.ts +9 -8
- package/dist/components/table/table-cell.svelte +6 -2
- package/dist/components/table/table-cell.svelte.d.ts +7 -6
- package/dist/components/table/table-col-header.svelte +6 -2
- package/dist/components/table/table-col-header.svelte.d.ts +7 -6
- package/dist/components/table/table-foot.svelte +6 -2
- package/dist/components/table/table-foot.svelte.d.ts +7 -6
- package/dist/components/table/table-head.svelte +6 -2
- package/dist/components/table/table-head.svelte.d.ts +7 -6
- package/dist/components/table/table-row-header.svelte +6 -2
- package/dist/components/table/table-row-header.svelte.d.ts +7 -6
- package/dist/components/table/table-row.svelte +6 -2
- package/dist/components/table/table-row.svelte.d.ts +7 -6
- package/dist/components/table/table.svelte +6 -2
- package/dist/components/table/table.svelte.d.ts +7 -6
- package/dist/components/tabs/tab-box.svelte +7 -3
- package/dist/components/tabs/tab-box.svelte.d.ts +9 -8
- package/dist/components/tabs/tab-list.svelte +12 -8
- package/dist/components/tabs/tab-list.svelte.d.ts +19 -18
- package/dist/components/tabs/tab-panel.svelte +6 -2
- package/dist/components/tabs/tab-panel.svelte.d.ts +7 -6
- package/dist/components/tabs/tab-panels.svelte +6 -2
- package/dist/components/tabs/tab-panels.svelte.d.ts +7 -6
- package/dist/components/tabs/tab.svelte +6 -3
- package/dist/components/tabs/tab.svelte.d.ts +4 -3
- package/dist/components/text-editor/code-editor.svelte +16 -18
- package/dist/components/text-editor/code-editor.svelte.d.ts +25 -24
- package/dist/components/text-editor/core.d.ts +5 -3
- package/dist/components/text-editor/core.js +26 -15
- package/dist/components/text-editor/index.d.ts +12 -6
- package/dist/components/text-editor/index.js +7 -3
- package/dist/components/text-editor/lexical-root.svelte +27 -30
- package/dist/components/text-editor/lexical-root.svelte.d.ts +17 -16
- package/dist/components/text-editor/store.svelte.d.ts +2 -1
- package/dist/components/text-editor/store.svelte.js +10 -5
- package/dist/components/text-editor/text-editor.svelte +22 -13
- package/dist/components/text-editor/text-editor.svelte.d.ts +37 -32
- package/dist/components/text-editor/toolbar/code-editor-toolbar.svelte +3 -3
- package/dist/components/text-editor/toolbar/code-editor-toolbar.svelte.d.ts +6 -6
- package/dist/components/text-editor/toolbar/code-language-switcher.svelte +6 -2
- package/dist/components/text-editor/toolbar/code-language-switcher.svelte.d.ts +2 -2
- package/dist/components/text-editor/toolbar/format-text-button.svelte +6 -2
- package/dist/components/text-editor/toolbar/format-text-button.svelte.d.ts +5 -4
- package/dist/components/text-editor/toolbar/insert-image-button.svelte +6 -2
- package/dist/components/text-editor/toolbar/insert-image-button.svelte.d.ts +5 -4
- package/dist/components/text-editor/toolbar/insert-link-button.svelte +9 -4
- package/dist/components/text-editor/toolbar/insert-menu-button.svelte +6 -2
- package/dist/components/text-editor/toolbar/insert-menu-button.svelte.d.ts +5 -4
- package/dist/components/text-editor/toolbar/text-editor-toolbar.svelte +10 -6
- package/dist/components/text-editor/toolbar/text-editor-toolbar.svelte.d.ts +6 -6
- package/dist/components/text-editor/toolbar/toggle-block-menu-item.svelte +8 -5
- package/dist/components/text-editor/toolbar/toggle-block-menu-item.svelte.d.ts +5 -4
- package/dist/components/text-editor/toolbar/toolbar-wrapper.svelte +7 -3
- package/dist/components/text-editor/toolbar/toolbar-wrapper.svelte.d.ts +9 -8
- package/dist/components/text-editor/transformers/table.d.ts +3 -2
- package/dist/components/text-editor/transformers/table.js +5 -1
- package/dist/components/text-field/number-input.svelte +12 -8
- package/dist/components/text-field/number-input.svelte.d.ts +20 -17
- package/dist/components/text-field/password-input.svelte +8 -4
- package/dist/components/text-field/password-input.svelte.d.ts +10 -7
- package/dist/components/text-field/search-bar.svelte +9 -5
- package/dist/components/text-field/search-bar.svelte.d.ts +14 -11
- package/dist/components/text-field/text-area.svelte +18 -14
- package/dist/components/text-field/text-area.svelte.d.ts +29 -27
- package/dist/components/text-field/text-input.svelte +7 -3
- package/dist/components/text-field/text-input.svelte.d.ts +5 -3
- package/dist/components/toast/toast.svelte +10 -5
- package/dist/components/toast/toast.svelte.d.ts +16 -14
- package/dist/components/toolbar/toolbar.svelte +11 -7
- package/dist/components/toolbar/toolbar.svelte.d.ts +17 -16
- package/dist/components/util/app-shell.svelte +6 -3
- package/dist/components/util/app-shell.svelte.d.ts +7 -8
- package/dist/components/util/group.svelte +8 -4
- package/dist/components/util/group.svelte.d.ts +11 -10
- package/dist/components/util/modal.svelte +7 -3
- package/dist/components/util/modal.svelte.d.ts +2 -1
- package/dist/components/util/placeholder.svelte +5 -1
- package/dist/components/util/placeholder.svelte.d.ts +5 -4
- package/dist/components/util/popup.svelte +23 -17
- package/dist/components/util/popup.svelte.d.ts +36 -33
- package/dist/index.js +3 -3
- package/dist/services/events.svelte.d.ts +2 -1
- package/dist/services/events.svelte.js +12 -8
- package/dist/services/group.svelte.d.ts +2 -1
- package/dist/services/group.svelte.js +16 -12
- package/dist/services/popup.svelte.d.ts +16 -10
- package/dist/services/popup.svelte.js +14 -13
- package/dist/typedefs.d.ts +191 -189
- package/dist/typedefs.js +168 -164
- package/package.json +18 -18
|
@@ -11,20 +11,24 @@
|
|
|
11
11
|
import Icon from '../icon/icon.svelte';
|
|
12
12
|
import TextInput from './text-input.svelte';
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* @import { Snippet } from 'svelte';
|
|
16
|
+
* @import { CommonEventHandlers, InputEventHandlers, TextInputProps } from '../../typedefs';
|
|
17
|
+
*/
|
|
18
|
+
|
|
14
19
|
/**
|
|
15
20
|
* @typedef {object} Props
|
|
16
|
-
* @property {number} [value]
|
|
17
|
-
* @property {number} [min]
|
|
18
|
-
* @property {number} [max]
|
|
19
|
-
* @property {number} [step]
|
|
21
|
+
* @property {number} [value] Input value.
|
|
22
|
+
* @property {number} [min] Minimum allowed value.
|
|
23
|
+
* @property {number} [max] Maximum allowed value.
|
|
24
|
+
* @property {number} [step] Value to be added or removed when using the up/down arrow key or
|
|
20
25
|
* button.
|
|
21
|
-
* @property {
|
|
22
|
-
* @property {
|
|
26
|
+
* @property {Snippet} [increaseIcon] Increase icon slot content.
|
|
27
|
+
* @property {Snippet} [decreaseIcon] Decrease icon slot content.
|
|
23
28
|
*/
|
|
24
29
|
|
|
25
30
|
/**
|
|
26
|
-
* @type {
|
|
27
|
-
* import('../../typedefs').InputEventHandlers & Props & Record<string, any>}
|
|
31
|
+
* @type {TextInputProps & CommonEventHandlers & InputEventHandlers & Props & Record<string, any>}
|
|
28
32
|
*/
|
|
29
33
|
let {
|
|
30
34
|
/* eslint-disable prefer-const */
|
|
@@ -8,57 +8,60 @@ type NumberInput = {
|
|
|
8
8
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number
|
|
9
9
|
* @see https://w3c.github.io/aria/#textbox
|
|
10
10
|
*/
|
|
11
|
-
declare const NumberInput: import("svelte").Component<
|
|
11
|
+
declare const NumberInput: import("svelte").Component<TextInputProps & import("../../typedefs").KeyboardEventHandlers & import("../../typedefs").MouseEventHandlers & import("../../typedefs").FocusEventHandlers & import("../../typedefs").DragEventHandlers & InputEventHandlers & {
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Input value.
|
|
14
14
|
*/
|
|
15
15
|
value?: number | undefined;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Minimum allowed value.
|
|
18
18
|
*/
|
|
19
19
|
min?: number | undefined;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Maximum allowed value.
|
|
22
22
|
*/
|
|
23
23
|
max?: number | undefined;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Value to be added or removed when using the up/down arrow key or
|
|
26
26
|
* button.
|
|
27
27
|
*/
|
|
28
28
|
step?: number | undefined;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Increase icon slot content.
|
|
31
31
|
*/
|
|
32
|
-
increaseIcon?:
|
|
32
|
+
increaseIcon?: Snippet<[]> | undefined;
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* Decrease icon slot content.
|
|
35
35
|
*/
|
|
36
|
-
decreaseIcon?:
|
|
36
|
+
decreaseIcon?: Snippet<[]> | undefined;
|
|
37
37
|
} & Record<string, any>, {}, "invalid" | "value">;
|
|
38
38
|
type Props = {
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Input value.
|
|
41
41
|
*/
|
|
42
42
|
value?: number | undefined;
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* Minimum allowed value.
|
|
45
45
|
*/
|
|
46
46
|
min?: number | undefined;
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
48
|
+
* Maximum allowed value.
|
|
49
49
|
*/
|
|
50
50
|
max?: number | undefined;
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
52
|
+
* Value to be added or removed when using the up/down arrow key or
|
|
53
53
|
* button.
|
|
54
54
|
*/
|
|
55
55
|
step?: number | undefined;
|
|
56
56
|
/**
|
|
57
|
-
*
|
|
57
|
+
* Increase icon slot content.
|
|
58
58
|
*/
|
|
59
|
-
increaseIcon?:
|
|
59
|
+
increaseIcon?: Snippet<[]> | undefined;
|
|
60
60
|
/**
|
|
61
|
-
*
|
|
61
|
+
* Decrease icon slot content.
|
|
62
62
|
*/
|
|
63
|
-
decreaseIcon?:
|
|
63
|
+
decreaseIcon?: Snippet<[]> | undefined;
|
|
64
64
|
};
|
|
65
|
+
import type { TextInputProps } from '../../typedefs';
|
|
66
|
+
import type { InputEventHandlers } from '../../typedefs';
|
|
67
|
+
import type { Snippet } from 'svelte';
|
|
@@ -11,15 +11,19 @@
|
|
|
11
11
|
import Icon from '../icon/icon.svelte';
|
|
12
12
|
import TextInput from './text-input.svelte';
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* @import { Snippet } from 'svelte';
|
|
16
|
+
* @import { CommonEventHandlers, InputEventHandlers, TextInputProps } from '../../typedefs';
|
|
17
|
+
*/
|
|
18
|
+
|
|
14
19
|
/**
|
|
15
20
|
* @typedef {object} Props
|
|
16
|
-
* @property {string} [value]
|
|
17
|
-
* @property {
|
|
21
|
+
* @property {string} [value] Input value.
|
|
22
|
+
* @property {Snippet} [visibilityIcon] Visibility icon slot content.
|
|
18
23
|
*/
|
|
19
24
|
|
|
20
25
|
/**
|
|
21
|
-
* @type {
|
|
22
|
-
* import('../../typedefs').InputEventHandlers & Props & Record<string, any>}
|
|
26
|
+
* @type {TextInputProps & CommonEventHandlers & InputEventHandlers & Props & Record<string, any>}
|
|
23
27
|
*/
|
|
24
28
|
let {
|
|
25
29
|
/* eslint-disable prefer-const */
|
|
@@ -9,23 +9,26 @@ type PasswordInput = {
|
|
|
9
9
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/password
|
|
10
10
|
* @see https://w3c.github.io/aria/#textbox
|
|
11
11
|
*/
|
|
12
|
-
declare const PasswordInput: import("svelte").Component<
|
|
12
|
+
declare const PasswordInput: import("svelte").Component<TextInputProps & import("../../typedefs").KeyboardEventHandlers & import("../../typedefs").MouseEventHandlers & import("../../typedefs").FocusEventHandlers & import("../../typedefs").DragEventHandlers & InputEventHandlers & {
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Input value.
|
|
15
15
|
*/
|
|
16
16
|
value?: string | undefined;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Visibility icon slot content.
|
|
19
19
|
*/
|
|
20
|
-
visibilityIcon?:
|
|
20
|
+
visibilityIcon?: Snippet<[]> | undefined;
|
|
21
21
|
} & Record<string, any>, {}, "value">;
|
|
22
22
|
type Props = {
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Input value.
|
|
25
25
|
*/
|
|
26
26
|
value?: string | undefined;
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Visibility icon slot content.
|
|
29
29
|
*/
|
|
30
|
-
visibilityIcon?:
|
|
30
|
+
visibilityIcon?: Snippet<[]> | undefined;
|
|
31
31
|
};
|
|
32
|
+
import type { TextInputProps } from '../../typedefs';
|
|
33
|
+
import type { InputEventHandlers } from '../../typedefs';
|
|
34
|
+
import type { Snippet } from 'svelte';
|
|
@@ -12,16 +12,20 @@
|
|
|
12
12
|
import Icon from '../icon/icon.svelte';
|
|
13
13
|
import TextInput from './text-input.svelte';
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* @import { Snippet } from 'svelte';
|
|
17
|
+
* @import { CommonEventHandlers, InputEventHandlers, TextInputProps } from '../../typedefs';
|
|
18
|
+
*/
|
|
19
|
+
|
|
15
20
|
/**
|
|
16
21
|
* @typedef {object} Props
|
|
17
|
-
* @property {string} [value]
|
|
18
|
-
* @property {
|
|
19
|
-
* @property {
|
|
22
|
+
* @property {string} [value] Input value.
|
|
23
|
+
* @property {Snippet} [searchIcon] Search icon slot content.
|
|
24
|
+
* @property {Snippet} [closeIcon] Close icon slot content.
|
|
20
25
|
*/
|
|
21
26
|
|
|
22
27
|
/**
|
|
23
|
-
* @type {
|
|
24
|
-
* import('../../typedefs').InputEventHandlers & Props & Record<string, any>}
|
|
28
|
+
* @type {TextInputProps & CommonEventHandlers & InputEventHandlers & Props & Record<string, any>}
|
|
25
29
|
*/
|
|
26
30
|
let {
|
|
27
31
|
/* eslint-disable prefer-const */
|
|
@@ -11,33 +11,36 @@ type SearchBar = {
|
|
|
11
11
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/search
|
|
12
12
|
* @see https://w3c.github.io/aria/#search
|
|
13
13
|
*/
|
|
14
|
-
declare const SearchBar: import("svelte").Component<
|
|
14
|
+
declare const SearchBar: import("svelte").Component<TextInputProps & import("../../typedefs").KeyboardEventHandlers & import("../../typedefs").MouseEventHandlers & import("../../typedefs").FocusEventHandlers & import("../../typedefs").DragEventHandlers & InputEventHandlers & {
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Input value.
|
|
17
17
|
*/
|
|
18
18
|
value?: string | undefined;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Search icon slot content.
|
|
21
21
|
*/
|
|
22
|
-
searchIcon?:
|
|
22
|
+
searchIcon?: Snippet<[]> | undefined;
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Close icon slot content.
|
|
25
25
|
*/
|
|
26
|
-
closeIcon?:
|
|
26
|
+
closeIcon?: Snippet<[]> | undefined;
|
|
27
27
|
} & Record<string, any>, {
|
|
28
28
|
focus: () => void;
|
|
29
29
|
}, "value">;
|
|
30
30
|
type Props = {
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Input value.
|
|
33
33
|
*/
|
|
34
34
|
value?: string | undefined;
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Search icon slot content.
|
|
37
37
|
*/
|
|
38
|
-
searchIcon?:
|
|
38
|
+
searchIcon?: Snippet<[]> | undefined;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Close icon slot content.
|
|
41
41
|
*/
|
|
42
|
-
closeIcon?:
|
|
42
|
+
closeIcon?: Snippet<[]> | undefined;
|
|
43
43
|
};
|
|
44
|
+
import type { TextInputProps } from '../../typedefs';
|
|
45
|
+
import type { InputEventHandlers } from '../../typedefs';
|
|
46
|
+
import type { Snippet } from 'svelte';
|
|
@@ -6,29 +6,33 @@
|
|
|
6
6
|
@see https://css-tricks.com/the-cleanest-trick-for-autogrowing-textareas/
|
|
7
7
|
-->
|
|
8
8
|
<script>
|
|
9
|
+
/**
|
|
10
|
+
* @import { Snippet } from 'svelte';
|
|
11
|
+
* @import { CommonEventHandlers, InputEventHandlers } from '../../typedefs';
|
|
12
|
+
*/
|
|
13
|
+
|
|
9
14
|
/**
|
|
10
15
|
* @typedef {object} Props
|
|
11
|
-
* @property {string} [value]
|
|
12
|
-
* @property {boolean} [flex]
|
|
13
|
-
* @property {string} [name]
|
|
14
|
-
* @property {boolean} [autoResize]
|
|
15
|
-
*
|
|
16
|
-
* @property {string} [class]
|
|
17
|
-
* @property {boolean} [hidden]
|
|
18
|
-
* @property {boolean} [disabled]
|
|
16
|
+
* @property {string} [value] Input value.
|
|
17
|
+
* @property {boolean} [flex] Make the text input container flexible.
|
|
18
|
+
* @property {string} [name] The `name` attribute on the `<textarea>` element.
|
|
19
|
+
* @property {boolean} [autoResize] Whether to automatically resize the `<textarea>` based on the
|
|
20
|
+
* content.
|
|
21
|
+
* @property {string} [class] The `class` attribute on the wrapper element.
|
|
22
|
+
* @property {boolean} [hidden] Whether to hide the widget.
|
|
23
|
+
* @property {boolean} [disabled] Whether to disable the widget. An alias of the `aria-disabled`
|
|
19
24
|
* attribute.
|
|
20
|
-
* @property {boolean} [readonly]
|
|
25
|
+
* @property {boolean} [readonly] Whether to make the widget read-only. An alias of the
|
|
21
26
|
* `aria-readonly` attribute.
|
|
22
|
-
* @property {boolean} [required]
|
|
27
|
+
* @property {boolean} [required] Whether to mark the widget required. An alias of the
|
|
23
28
|
* `aria-required` attribute.
|
|
24
|
-
* @property {boolean} [invalid]
|
|
29
|
+
* @property {boolean} [invalid] Whether to mark the widget invalid. An alias of the
|
|
25
30
|
* `aria-invalid` attribute.
|
|
26
|
-
* @property {
|
|
31
|
+
* @property {Snippet} [children] Primary slot content.
|
|
27
32
|
*/
|
|
28
33
|
|
|
29
34
|
/**
|
|
30
|
-
* @type {
|
|
31
|
-
* & Props & Record<string, any>}
|
|
35
|
+
* @type {CommonEventHandlers & InputEventHandlers & Props & Record<string, any>}
|
|
32
36
|
*/
|
|
33
37
|
let {
|
|
34
38
|
/* eslint-disable prefer-const */
|
|
@@ -9,105 +9,107 @@ type TextArea = {
|
|
|
9
9
|
* @see https://w3c.github.io/aria/#textbox
|
|
10
10
|
* @see https://css-tricks.com/the-cleanest-trick-for-autogrowing-textareas/
|
|
11
11
|
*/
|
|
12
|
-
declare const TextArea: import("svelte").Component<import("../../typedefs").KeyboardEventHandlers & import("../../typedefs").MouseEventHandlers & import("../../typedefs").FocusEventHandlers & import("../../typedefs").DragEventHandlers &
|
|
12
|
+
declare const TextArea: import("svelte").Component<import("../../typedefs").KeyboardEventHandlers & import("../../typedefs").MouseEventHandlers & import("../../typedefs").FocusEventHandlers & import("../../typedefs").DragEventHandlers & InputEventHandlers & {
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Input value.
|
|
15
15
|
*/
|
|
16
16
|
value?: string | undefined;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Make the text input container flexible.
|
|
19
19
|
*/
|
|
20
20
|
flex?: boolean | undefined;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* The `name` attribute on the `<textarea>` element.
|
|
23
23
|
*/
|
|
24
24
|
name?: string | undefined;
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
26
|
+
* Whether to automatically resize the `<textarea>` based on the
|
|
27
|
+
* content.
|
|
28
28
|
*/
|
|
29
29
|
autoResize?: boolean | undefined;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* The `class` attribute on the wrapper element.
|
|
32
32
|
*/
|
|
33
33
|
class?: string | undefined;
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Whether to hide the widget.
|
|
36
36
|
*/
|
|
37
37
|
hidden?: boolean | undefined;
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* Whether to disable the widget. An alias of the `aria-disabled`
|
|
40
40
|
* attribute.
|
|
41
41
|
*/
|
|
42
42
|
disabled?: boolean | undefined;
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* Whether to make the widget read-only. An alias of the
|
|
45
45
|
* `aria-readonly` attribute.
|
|
46
46
|
*/
|
|
47
47
|
readonly?: boolean | undefined;
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
49
|
+
* Whether to mark the widget required. An alias of the
|
|
50
50
|
* `aria-required` attribute.
|
|
51
51
|
*/
|
|
52
52
|
required?: boolean | undefined;
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* Whether to mark the widget invalid. An alias of the
|
|
55
55
|
* `aria-invalid` attribute.
|
|
56
56
|
*/
|
|
57
57
|
invalid?: boolean | undefined;
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
59
|
+
* Primary slot content.
|
|
60
60
|
*/
|
|
61
|
-
children?:
|
|
61
|
+
children?: Snippet<[]> | undefined;
|
|
62
62
|
} & Record<string, any>, {}, "value">;
|
|
63
63
|
type Props = {
|
|
64
64
|
/**
|
|
65
|
-
*
|
|
65
|
+
* Input value.
|
|
66
66
|
*/
|
|
67
67
|
value?: string | undefined;
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* Make the text input container flexible.
|
|
70
70
|
*/
|
|
71
71
|
flex?: boolean | undefined;
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
73
|
+
* The `name` attribute on the `<textarea>` element.
|
|
74
74
|
*/
|
|
75
75
|
name?: string | undefined;
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
78
|
-
*
|
|
77
|
+
* Whether to automatically resize the `<textarea>` based on the
|
|
78
|
+
* content.
|
|
79
79
|
*/
|
|
80
80
|
autoResize?: boolean | undefined;
|
|
81
81
|
/**
|
|
82
|
-
*
|
|
82
|
+
* The `class` attribute on the wrapper element.
|
|
83
83
|
*/
|
|
84
84
|
class?: string | undefined;
|
|
85
85
|
/**
|
|
86
|
-
*
|
|
86
|
+
* Whether to hide the widget.
|
|
87
87
|
*/
|
|
88
88
|
hidden?: boolean | undefined;
|
|
89
89
|
/**
|
|
90
|
-
*
|
|
90
|
+
* Whether to disable the widget. An alias of the `aria-disabled`
|
|
91
91
|
* attribute.
|
|
92
92
|
*/
|
|
93
93
|
disabled?: boolean | undefined;
|
|
94
94
|
/**
|
|
95
|
-
*
|
|
95
|
+
* Whether to make the widget read-only. An alias of the
|
|
96
96
|
* `aria-readonly` attribute.
|
|
97
97
|
*/
|
|
98
98
|
readonly?: boolean | undefined;
|
|
99
99
|
/**
|
|
100
|
-
*
|
|
100
|
+
* Whether to mark the widget required. An alias of the
|
|
101
101
|
* `aria-required` attribute.
|
|
102
102
|
*/
|
|
103
103
|
required?: boolean | undefined;
|
|
104
104
|
/**
|
|
105
|
-
*
|
|
105
|
+
* Whether to mark the widget invalid. An alias of the
|
|
106
106
|
* `aria-invalid` attribute.
|
|
107
107
|
*/
|
|
108
108
|
invalid?: boolean | undefined;
|
|
109
109
|
/**
|
|
110
|
-
*
|
|
110
|
+
* Primary slot content.
|
|
111
111
|
*/
|
|
112
|
-
children?:
|
|
112
|
+
children?: Snippet<[]> | undefined;
|
|
113
113
|
};
|
|
114
|
+
import type { InputEventHandlers } from '../../typedefs';
|
|
115
|
+
import type { Snippet } from 'svelte';
|
|
@@ -7,14 +7,18 @@
|
|
|
7
7
|
<script>
|
|
8
8
|
import { activateKeyShortcuts } from '../../services/events.svelte';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* @import { Snippet } from 'svelte';
|
|
12
|
+
* @import { CommonEventHandlers, InputEventHandlers, TextInputProps } from '../../typedefs';
|
|
13
|
+
*/
|
|
14
|
+
|
|
10
15
|
/**
|
|
11
16
|
* @typedef {object} Props
|
|
12
|
-
* @property {string} [value]
|
|
17
|
+
* @property {string} [value] Input value.
|
|
13
18
|
*/
|
|
14
19
|
|
|
15
20
|
/**
|
|
16
|
-
* @type {
|
|
17
|
-
* import('../../typedefs').InputEventHandlers & Props & Record<string, any>}
|
|
21
|
+
* @type {TextInputProps & CommonEventHandlers & InputEventHandlers & Props & Record<string, any>}
|
|
18
22
|
*/
|
|
19
23
|
let {
|
|
20
24
|
/* eslint-disable prefer-const */
|
|
@@ -8,15 +8,17 @@ type TextInput = {
|
|
|
8
8
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/text
|
|
9
9
|
* @see https://w3c.github.io/aria/#textbox
|
|
10
10
|
*/
|
|
11
|
-
declare const TextInput: import("svelte").Component<
|
|
11
|
+
declare const TextInput: import("svelte").Component<TextInputProps & import("../../typedefs").KeyboardEventHandlers & import("../../typedefs").MouseEventHandlers & import("../../typedefs").FocusEventHandlers & import("../../typedefs").DragEventHandlers & InputEventHandlers & {
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Input value.
|
|
14
14
|
*/
|
|
15
15
|
value?: string | undefined;
|
|
16
16
|
} & Record<string, any>, {}, "value" | "element">;
|
|
17
17
|
type Props = {
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Input value.
|
|
20
20
|
*/
|
|
21
21
|
value?: string | undefined;
|
|
22
22
|
};
|
|
23
|
+
import type { TextInputProps } from '../../typedefs';
|
|
24
|
+
import type { InputEventHandlers } from '../../typedefs';
|
|
@@ -7,15 +7,20 @@
|
|
|
7
7
|
<script>
|
|
8
8
|
import { onMount, untrack } from 'svelte';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* @import { Snippet } from 'svelte';
|
|
12
|
+
* @import { ToastPosition } from '../../typedefs';
|
|
13
|
+
*/
|
|
14
|
+
|
|
10
15
|
/**
|
|
11
16
|
* @typedef {object} Props
|
|
12
|
-
* @property {string | number} [id]
|
|
17
|
+
* @property {string | number} [id] The toast ID. If updated, the timer that hides
|
|
13
18
|
* the toast will be reset, meaning the same toast can be displayed for a longer period of time.
|
|
14
|
-
* @property {boolean} [show]
|
|
15
|
-
* @property {number} [duration]
|
|
19
|
+
* @property {boolean} [show] Whether to show the toast.
|
|
20
|
+
* @property {number} [duration] Duration to automatically hide the toast. Use `0` to hide it
|
|
16
21
|
* manually from the consumer.
|
|
17
|
-
* @property {
|
|
18
|
-
* @property {
|
|
22
|
+
* @property {ToastPosition} [position] Position of the toast.
|
|
23
|
+
* @property {Snippet} [children] Primary slot content.
|
|
19
24
|
*/
|
|
20
25
|
|
|
21
26
|
/**
|
|
@@ -10,49 +10,51 @@ type Toast = {
|
|
|
10
10
|
*/
|
|
11
11
|
declare const Toast: import("svelte").Component<{
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* The toast ID. If updated, the timer that hides
|
|
14
14
|
* the toast will be reset, meaning the same toast can be displayed for a longer period of time.
|
|
15
15
|
*/
|
|
16
16
|
id?: string | number | undefined;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Whether to show the toast.
|
|
19
19
|
*/
|
|
20
20
|
show?: boolean | undefined;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Duration to automatically hide the toast. Use `0` to hide it
|
|
23
23
|
* manually from the consumer.
|
|
24
24
|
*/
|
|
25
25
|
duration?: number | undefined;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Position of the toast.
|
|
28
28
|
*/
|
|
29
|
-
position?:
|
|
29
|
+
position?: ToastPosition | undefined;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* Primary slot content.
|
|
32
32
|
*/
|
|
33
|
-
children?:
|
|
33
|
+
children?: Snippet<[]> | undefined;
|
|
34
34
|
} & Record<string, any>, {}, "show">;
|
|
35
35
|
type Props = {
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* The toast ID. If updated, the timer that hides
|
|
38
38
|
* the toast will be reset, meaning the same toast can be displayed for a longer period of time.
|
|
39
39
|
*/
|
|
40
40
|
id?: string | number | undefined;
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* Whether to show the toast.
|
|
43
43
|
*/
|
|
44
44
|
show?: boolean | undefined;
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* Duration to automatically hide the toast. Use `0` to hide it
|
|
47
47
|
* manually from the consumer.
|
|
48
48
|
*/
|
|
49
49
|
duration?: number | undefined;
|
|
50
50
|
/**
|
|
51
|
-
*
|
|
51
|
+
* Position of the toast.
|
|
52
52
|
*/
|
|
53
|
-
position?:
|
|
53
|
+
position?: ToastPosition | undefined;
|
|
54
54
|
/**
|
|
55
|
-
*
|
|
55
|
+
* Primary slot content.
|
|
56
56
|
*/
|
|
57
|
-
children?:
|
|
57
|
+
children?: Snippet<[]> | undefined;
|
|
58
58
|
};
|
|
59
|
+
import type { ToastPosition } from '../../typedefs';
|
|
60
|
+
import type { Snippet } from 'svelte';
|
|
@@ -5,16 +5,20 @@
|
|
|
5
5
|
@see https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/
|
|
6
6
|
-->
|
|
7
7
|
<script>
|
|
8
|
+
/**
|
|
9
|
+
* @import { Snippet } from 'svelte';
|
|
10
|
+
*/
|
|
11
|
+
|
|
8
12
|
/**
|
|
9
13
|
* @typedef {object} Props
|
|
10
|
-
* @property {string} [class]
|
|
11
|
-
* @property {boolean} [hidden]
|
|
12
|
-
* @property {boolean} [disabled]
|
|
14
|
+
* @property {string} [class] The `class` attribute on the wrapper element.
|
|
15
|
+
* @property {boolean} [hidden] Whether to hide the widget.
|
|
16
|
+
* @property {boolean} [disabled] Whether to disable the widget. An alias of the `aria-disabled`
|
|
13
17
|
* attribute.
|
|
14
|
-
* @property {'horizontal' | 'vertical'} [orientation]
|
|
15
|
-
*
|
|
16
|
-
* @property {'primary' | 'secondary'} [variant]
|
|
17
|
-
* @property {
|
|
18
|
+
* @property {'horizontal' | 'vertical'} [orientation] Orientation of the widget. An alias of the
|
|
19
|
+
* `aria-orientation` attribute.
|
|
20
|
+
* @property {'primary' | 'secondary'} [variant] The style variant of the toolbar.
|
|
21
|
+
* @property {Snippet} [children] Primary slot content.
|
|
18
22
|
*/
|
|
19
23
|
|
|
20
24
|
/**
|