@sveltia/ui 0.25.7 → 0.25.8
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 +15 -11
- 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 +21 -11
- 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 +25 -28
- 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 +9 -4
- 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 +1 -1
|
@@ -10,49 +10,50 @@ type Menu = {
|
|
|
10
10
|
*/
|
|
11
11
|
declare const Menu: import("svelte").Component<{
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* The `class` attribute on the wrapper element.
|
|
14
14
|
*/
|
|
15
15
|
class?: string | undefined;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Whether to hide the widget. An alias of the `aria-hidden`
|
|
18
18
|
* attribute.
|
|
19
19
|
*/
|
|
20
20
|
hidden?: boolean | undefined;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Whether to disable the widget. An alias of the `aria-disabled`
|
|
23
23
|
* attribute.
|
|
24
24
|
*/
|
|
25
25
|
disabled?: boolean | undefined;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Primary slot content.
|
|
28
28
|
*/
|
|
29
|
-
children?:
|
|
29
|
+
children?: Snippet<[]> | undefined;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* Custom `Change` event handler.
|
|
32
32
|
*/
|
|
33
33
|
onChange?: ((event: CustomEvent) => void) | undefined;
|
|
34
34
|
} & Record<string, any>, {}, "">;
|
|
35
35
|
type Props = {
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* The `class` attribute on the wrapper element.
|
|
38
38
|
*/
|
|
39
39
|
class?: string | undefined;
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Whether to hide the widget. An alias of the `aria-hidden`
|
|
42
42
|
* attribute.
|
|
43
43
|
*/
|
|
44
44
|
hidden?: boolean | undefined;
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* Whether to disable the widget. An alias of the `aria-disabled`
|
|
47
47
|
* attribute.
|
|
48
48
|
*/
|
|
49
49
|
disabled?: boolean | undefined;
|
|
50
50
|
/**
|
|
51
|
-
*
|
|
51
|
+
* Primary slot content.
|
|
52
52
|
*/
|
|
53
|
-
children?:
|
|
53
|
+
children?: Snippet<[]> | undefined;
|
|
54
54
|
/**
|
|
55
|
-
*
|
|
55
|
+
* Custom `Change` event handler.
|
|
56
56
|
*/
|
|
57
57
|
onChange?: ((event: CustomEvent) => void) | undefined;
|
|
58
58
|
};
|
|
59
|
+
import type { Snippet } from 'svelte';
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
<script>
|
|
7
7
|
/**
|
|
8
8
|
* @typedef {object} Props
|
|
9
|
-
* @property {string} [class]
|
|
10
|
-
* @property {number} now
|
|
11
|
-
* @property {number} [min]
|
|
12
|
-
* @property {number} [max]
|
|
13
|
-
* @property {string} [text]
|
|
9
|
+
* @property {string} [class] The `class` attribute on the wrapper element.
|
|
10
|
+
* @property {number} now The `aria-valuenow` attribute on the wrapper element.
|
|
11
|
+
* @property {number} [min] The `aria-valuemin` attribute on the wrapper element.
|
|
12
|
+
* @property {number} [max] The `aria-valuemax` attribute on the wrapper element.
|
|
13
|
+
* @property {string} [text] The `aria-valuetext` attribute on the wrapper element.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -9,45 +9,45 @@ type Progressbar = {
|
|
|
9
9
|
*/
|
|
10
10
|
declare const Progressbar: import("svelte").Component<{
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* The `class` attribute on the wrapper element.
|
|
13
13
|
*/
|
|
14
14
|
class?: string | undefined;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* The `aria-valuenow` attribute on the wrapper element.
|
|
17
17
|
*/
|
|
18
18
|
now: number;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* The `aria-valuemin` attribute on the wrapper element.
|
|
21
21
|
*/
|
|
22
22
|
min?: number | undefined;
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* The `aria-valuemax` attribute on the wrapper element.
|
|
25
25
|
*/
|
|
26
26
|
max?: number | undefined;
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* The `aria-valuetext` attribute on the wrapper element.
|
|
29
29
|
*/
|
|
30
30
|
text?: string | undefined;
|
|
31
31
|
} & Record<string, any>, {}, "">;
|
|
32
32
|
type Props = {
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* The `class` attribute on the wrapper element.
|
|
35
35
|
*/
|
|
36
36
|
class?: string | undefined;
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* The `aria-valuenow` attribute on the wrapper element.
|
|
39
39
|
*/
|
|
40
40
|
now: number;
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* The `aria-valuemin` attribute on the wrapper element.
|
|
43
43
|
*/
|
|
44
44
|
min?: number | undefined;
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* The `aria-valuemax` attribute on the wrapper element.
|
|
47
47
|
*/
|
|
48
48
|
max?: number | undefined;
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
50
|
+
* The `aria-valuetext` attribute on the wrapper element.
|
|
51
51
|
*/
|
|
52
52
|
text?: string | undefined;
|
|
53
53
|
};
|
|
@@ -7,22 +7,26 @@
|
|
|
7
7
|
<script>
|
|
8
8
|
import { activateGroup } from '../../services/group.svelte';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* @import { Snippet } from 'svelte';
|
|
12
|
+
*/
|
|
13
|
+
|
|
10
14
|
/**
|
|
11
15
|
* @typedef {object} Props
|
|
12
|
-
* @property {string} [class]
|
|
13
|
-
* @property {boolean} [hidden]
|
|
14
|
-
* @property {boolean} [disabled]
|
|
16
|
+
* @property {string} [class] The `class` attribute on the wrapper element.
|
|
17
|
+
* @property {boolean} [hidden] Whether to hide the widget.
|
|
18
|
+
* @property {boolean} [disabled] Whether to disable the widget. An alias of the `aria-disabled`
|
|
15
19
|
* attribute.
|
|
16
|
-
* @property {boolean} [readonly]
|
|
20
|
+
* @property {boolean} [readonly] Whether to make the widget read-only. An alias of the
|
|
17
21
|
* `aria-readonly` attribute.
|
|
18
|
-
* @property {boolean} [required]
|
|
22
|
+
* @property {boolean} [required] Whether to mark the widget required. An alias of the
|
|
19
23
|
* `aria-required` attribute.
|
|
20
|
-
* @property {boolean} [invalid]
|
|
24
|
+
* @property {boolean} [invalid] Whether to mark the widget invalid. An alias of the
|
|
21
25
|
* `aria-invalid` attribute.
|
|
22
|
-
* @property {'horizontal'|'vertical'} [orientation]
|
|
26
|
+
* @property {'horizontal'|'vertical'} [orientation] Orientation of the widget. An alias of the
|
|
23
27
|
* `aria-orientation` attribute.
|
|
24
|
-
* @property {
|
|
25
|
-
* @property {(event: CustomEvent) => void} [onChange]
|
|
28
|
+
* @property {Snippet} [children] Primary slot content.
|
|
29
|
+
* @property {(event: CustomEvent) => void} [onChange] Custom `Change` event handler.
|
|
26
30
|
*/
|
|
27
31
|
|
|
28
32
|
/**
|
|
@@ -10,87 +10,88 @@ type RadioGroup = {
|
|
|
10
10
|
*/
|
|
11
11
|
declare const RadioGroup: import("svelte").Component<{
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* The `class` attribute on the wrapper element.
|
|
14
14
|
*/
|
|
15
15
|
class?: string | undefined;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Whether to hide the widget.
|
|
18
18
|
*/
|
|
19
19
|
hidden?: boolean | undefined;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Whether to disable the widget. An alias of the `aria-disabled`
|
|
22
22
|
* attribute.
|
|
23
23
|
*/
|
|
24
24
|
disabled?: boolean | undefined;
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* Whether to make the widget read-only. An alias of the
|
|
27
27
|
* `aria-readonly` attribute.
|
|
28
28
|
*/
|
|
29
29
|
readonly?: boolean | undefined;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* Whether to mark the widget required. An alias of the
|
|
32
32
|
* `aria-required` attribute.
|
|
33
33
|
*/
|
|
34
34
|
required?: boolean | undefined;
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Whether to mark the widget invalid. An alias of the
|
|
37
37
|
* `aria-invalid` attribute.
|
|
38
38
|
*/
|
|
39
39
|
invalid?: boolean | undefined;
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Orientation of the widget. An alias of the
|
|
42
42
|
* `aria-orientation` attribute.
|
|
43
43
|
*/
|
|
44
44
|
orientation?: "vertical" | "horizontal" | undefined;
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* Primary slot content.
|
|
47
47
|
*/
|
|
48
|
-
children?:
|
|
48
|
+
children?: Snippet<[]> | undefined;
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
50
|
+
* Custom `Change` event handler.
|
|
51
51
|
*/
|
|
52
52
|
onChange?: ((event: CustomEvent) => void) | undefined;
|
|
53
53
|
} & Record<string, any>, {}, "">;
|
|
54
54
|
type Props = {
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* The `class` attribute on the wrapper element.
|
|
57
57
|
*/
|
|
58
58
|
class?: string | undefined;
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
60
|
+
* Whether to hide the widget.
|
|
61
61
|
*/
|
|
62
62
|
hidden?: boolean | undefined;
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
64
|
+
* Whether to disable the widget. An alias of the `aria-disabled`
|
|
65
65
|
* attribute.
|
|
66
66
|
*/
|
|
67
67
|
disabled?: boolean | undefined;
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* Whether to make the widget read-only. An alias of the
|
|
70
70
|
* `aria-readonly` attribute.
|
|
71
71
|
*/
|
|
72
72
|
readonly?: boolean | undefined;
|
|
73
73
|
/**
|
|
74
|
-
*
|
|
74
|
+
* Whether to mark the widget required. An alias of the
|
|
75
75
|
* `aria-required` attribute.
|
|
76
76
|
*/
|
|
77
77
|
required?: boolean | undefined;
|
|
78
78
|
/**
|
|
79
|
-
*
|
|
79
|
+
* Whether to mark the widget invalid. An alias of the
|
|
80
80
|
* `aria-invalid` attribute.
|
|
81
81
|
*/
|
|
82
82
|
invalid?: boolean | undefined;
|
|
83
83
|
/**
|
|
84
|
-
*
|
|
84
|
+
* Orientation of the widget. An alias of the
|
|
85
85
|
* `aria-orientation` attribute.
|
|
86
86
|
*/
|
|
87
87
|
orientation?: "vertical" | "horizontal" | undefined;
|
|
88
88
|
/**
|
|
89
|
-
*
|
|
89
|
+
* Primary slot content.
|
|
90
90
|
*/
|
|
91
|
-
children?:
|
|
91
|
+
children?: Snippet<[]> | undefined;
|
|
92
92
|
/**
|
|
93
|
-
*
|
|
93
|
+
* Custom `Change` event handler.
|
|
94
94
|
*/
|
|
95
95
|
onChange?: ((event: CustomEvent) => void) | undefined;
|
|
96
96
|
};
|
|
97
|
+
import type { Snippet } from 'svelte';
|
|
@@ -8,21 +8,25 @@
|
|
|
8
8
|
<script>
|
|
9
9
|
import Button from '../button/button.svelte';
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* @import { Snippet } from 'svelte';
|
|
13
|
+
*/
|
|
14
|
+
|
|
11
15
|
/**
|
|
12
16
|
* @typedef {object} Props
|
|
13
|
-
* @property {string} [class]
|
|
14
|
-
* @property {boolean} [hidden]
|
|
15
|
-
* @property {boolean} [disabled]
|
|
17
|
+
* @property {string} [class] The `class` attribute on the wrapper element.
|
|
18
|
+
* @property {boolean} [hidden] Whether to hide the widget.
|
|
19
|
+
* @property {boolean} [disabled] Whether to disable the widget. An alias of the `aria-disabled`
|
|
16
20
|
* attribute.
|
|
17
|
-
* @property {boolean} [checked]
|
|
21
|
+
* @property {boolean} [checked] Whether to check the widget. An alias of the `aria-checked`
|
|
18
22
|
* attribute.
|
|
19
|
-
* @property {string} [name]
|
|
20
|
-
* @property {string} [value]
|
|
21
|
-
* @property {string} [label]
|
|
22
|
-
* @property {
|
|
23
|
-
* @property {
|
|
24
|
-
* @property {(event: CustomEvent) => void} [onChange]
|
|
25
|
-
* @property {(event: CustomEvent) => void} [onSelect]
|
|
23
|
+
* @property {string} [name] The `name` attribute on the `<button>` element.
|
|
24
|
+
* @property {string} [value] The `value` attribute on the `<button>` element.
|
|
25
|
+
* @property {string} [label] Text label displayed next to the checkbox.
|
|
26
|
+
* @property {Snippet} [children] Primary slot content.
|
|
27
|
+
* @property {Snippet} [default] Default slot content.
|
|
28
|
+
* @property {(event: CustomEvent) => void} [onChange] Custom `Change` event handler.
|
|
29
|
+
* @property {(event: CustomEvent) => void} [onSelect] Custom `Select` event handler.
|
|
26
30
|
*/
|
|
27
31
|
|
|
28
32
|
/**
|
|
@@ -11,97 +11,98 @@ type Radio = {
|
|
|
11
11
|
*/
|
|
12
12
|
declare const Radio: import("svelte").Component<{
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* The `class` attribute on the wrapper element.
|
|
15
15
|
*/
|
|
16
16
|
class?: string | undefined;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Whether to hide the widget.
|
|
19
19
|
*/
|
|
20
20
|
hidden?: boolean | undefined;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Whether to disable the widget. An alias of the `aria-disabled`
|
|
23
23
|
* attribute.
|
|
24
24
|
*/
|
|
25
25
|
disabled?: boolean | undefined;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Whether to check the widget. An alias of the `aria-checked`
|
|
28
28
|
* attribute.
|
|
29
29
|
*/
|
|
30
30
|
checked?: boolean | undefined;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* The `name` attribute on the `<button>` element.
|
|
33
33
|
*/
|
|
34
34
|
name?: string | undefined;
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* The `value` attribute on the `<button>` element.
|
|
37
37
|
*/
|
|
38
38
|
value?: string | undefined;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Text label displayed next to the checkbox.
|
|
41
41
|
*/
|
|
42
42
|
label?: string | undefined;
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* Primary slot content.
|
|
45
45
|
*/
|
|
46
|
-
children?:
|
|
46
|
+
children?: Snippet<[]> | undefined;
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
48
|
+
* Default slot content.
|
|
49
49
|
*/
|
|
50
|
-
default?:
|
|
50
|
+
default?: Snippet<[]> | undefined;
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
52
|
+
* Custom `Change` event handler.
|
|
53
53
|
*/
|
|
54
54
|
onChange?: ((event: CustomEvent) => void) | undefined;
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* Custom `Select` event handler.
|
|
57
57
|
*/
|
|
58
58
|
onSelect?: ((event: CustomEvent) => void) | undefined;
|
|
59
59
|
} & Record<string, any>, {}, "">;
|
|
60
60
|
type Props = {
|
|
61
61
|
/**
|
|
62
|
-
*
|
|
62
|
+
* The `class` attribute on the wrapper element.
|
|
63
63
|
*/
|
|
64
64
|
class?: string | undefined;
|
|
65
65
|
/**
|
|
66
|
-
*
|
|
66
|
+
* Whether to hide the widget.
|
|
67
67
|
*/
|
|
68
68
|
hidden?: boolean | undefined;
|
|
69
69
|
/**
|
|
70
|
-
*
|
|
70
|
+
* Whether to disable the widget. An alias of the `aria-disabled`
|
|
71
71
|
* attribute.
|
|
72
72
|
*/
|
|
73
73
|
disabled?: boolean | undefined;
|
|
74
74
|
/**
|
|
75
|
-
*
|
|
75
|
+
* Whether to check the widget. An alias of the `aria-checked`
|
|
76
76
|
* attribute.
|
|
77
77
|
*/
|
|
78
78
|
checked?: boolean | undefined;
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
80
|
+
* The `name` attribute on the `<button>` element.
|
|
81
81
|
*/
|
|
82
82
|
name?: string | undefined;
|
|
83
83
|
/**
|
|
84
|
-
*
|
|
84
|
+
* The `value` attribute on the `<button>` element.
|
|
85
85
|
*/
|
|
86
86
|
value?: string | undefined;
|
|
87
87
|
/**
|
|
88
|
-
*
|
|
88
|
+
* Text label displayed next to the checkbox.
|
|
89
89
|
*/
|
|
90
90
|
label?: string | undefined;
|
|
91
91
|
/**
|
|
92
|
-
*
|
|
92
|
+
* Primary slot content.
|
|
93
93
|
*/
|
|
94
|
-
children?:
|
|
94
|
+
children?: Snippet<[]> | undefined;
|
|
95
95
|
/**
|
|
96
|
-
*
|
|
96
|
+
* Default slot content.
|
|
97
97
|
*/
|
|
98
|
-
default?:
|
|
98
|
+
default?: Snippet<[]> | undefined;
|
|
99
99
|
/**
|
|
100
|
-
*
|
|
100
|
+
* Custom `Change` event handler.
|
|
101
101
|
*/
|
|
102
102
|
onChange?: ((event: CustomEvent) => void) | undefined;
|
|
103
103
|
/**
|
|
104
|
-
*
|
|
104
|
+
* Custom `Select` event handler.
|
|
105
105
|
*/
|
|
106
106
|
onSelect?: ((event: CustomEvent) => void) | undefined;
|
|
107
107
|
};
|
|
108
|
+
import type { Snippet } from 'svelte';
|
|
@@ -15,8 +15,11 @@
|
|
|
15
15
|
import Popup from '../util/popup.svelte';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* @
|
|
19
|
-
|
|
18
|
+
* @import { ComboboxProps, TextInputProps } from '../../typedefs';
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @type {ComboboxProps & TextInputProps & Record<string, any>}
|
|
20
23
|
*/
|
|
21
24
|
let {
|
|
22
25
|
/* eslint-disable prefer-const */
|
|
@@ -79,7 +82,7 @@
|
|
|
79
82
|
|
|
80
83
|
/**
|
|
81
84
|
* Update the {@link value} whenever an option is selected.
|
|
82
|
-
* @param {HTMLButtonElement} target
|
|
85
|
+
* @param {HTMLButtonElement} target Selected option.
|
|
83
86
|
*/
|
|
84
87
|
const _onSelect = (target) => {
|
|
85
88
|
// @todo support more types
|
|
@@ -9,4 +9,6 @@ type Combobox = {
|
|
|
9
9
|
* @see https://www.w3.org/WAI/ARIA/apg/patterns/combobox/
|
|
10
10
|
* @todo Add DOM API compatibility.
|
|
11
11
|
*/
|
|
12
|
-
declare const Combobox: import("svelte").Component<
|
|
12
|
+
declare const Combobox: import("svelte").Component<ComboboxProps & TextInputProps & Record<string, any>, {}, "value">;
|
|
13
|
+
import type { ComboboxProps } from '../../typedefs';
|
|
14
|
+
import type { TextInputProps } from '../../typedefs';
|
|
@@ -5,25 +5,28 @@
|
|
|
5
5
|
import Option from '../listbox/option.svelte';
|
|
6
6
|
import Select from './select.svelte';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* @import { Snippet } from 'svelte';
|
|
10
|
+
*/
|
|
11
|
+
|
|
8
12
|
/**
|
|
9
13
|
* @typedef {object} Props
|
|
10
|
-
* @property {{ label: string, value: string, searchValue?: string }[]} options
|
|
11
|
-
*
|
|
12
|
-
* @property {
|
|
13
|
-
* @property {
|
|
14
|
-
* @property {
|
|
15
|
-
* @property {boolean} [
|
|
16
|
-
* @property {boolean} [disabled] - Whether to disable the widget. An alias of the `aria-disabled`
|
|
14
|
+
* @property {{ label: string, value: string, searchValue?: string }[]} options Available options.
|
|
15
|
+
* @property {string[]} [values] Selected option values.
|
|
16
|
+
* @property {number} [max] Maximum number of selectable options.
|
|
17
|
+
* @property {string} [class] The `class` attribute on the wrapper element.
|
|
18
|
+
* @property {boolean} [hidden] Whether to hide the widget.
|
|
19
|
+
* @property {boolean} [disabled] Whether to disable the widget. An alias of the `aria-disabled`
|
|
17
20
|
* attribute.
|
|
18
|
-
* @property {boolean} [readonly]
|
|
21
|
+
* @property {boolean} [readonly] Whether to make the widget read-only. An alias of the
|
|
19
22
|
* `aria-readonly` attribute.
|
|
20
|
-
* @property {boolean} [required]
|
|
23
|
+
* @property {boolean} [required] Whether to mark the widget required. An alias of the
|
|
21
24
|
* `aria-required` attribute.
|
|
22
|
-
* @property {boolean} [invalid]
|
|
25
|
+
* @property {boolean} [invalid] Whether to mark the widget invalid. An alias of the
|
|
23
26
|
* `aria-invalid` attribute.
|
|
24
|
-
* @property {
|
|
25
|
-
* @property {(event: CustomEvent) => void} [onAddValue]
|
|
26
|
-
* @property {(event: CustomEvent) => void} [onRemoveValue]
|
|
27
|
+
* @property {Snippet} [children] Primary slot content.
|
|
28
|
+
* @property {(event: CustomEvent) => void} [onAddValue] Custom `AddValue` event handler.
|
|
29
|
+
* @property {(event: CustomEvent) => void} [onRemoveValue] Custom `RemoveValue` event handler.
|
|
27
30
|
*/
|
|
28
31
|
|
|
29
32
|
/**
|
|
@@ -5,8 +5,7 @@ type SelectTags = {
|
|
|
5
5
|
};
|
|
6
6
|
declare const SelectTags: import("svelte").Component<{
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
* options.
|
|
8
|
+
* Available options.
|
|
10
9
|
*/
|
|
11
10
|
options: {
|
|
12
11
|
label: string;
|
|
@@ -14,58 +13,57 @@ declare const SelectTags: import("svelte").Component<{
|
|
|
14
13
|
searchValue?: string;
|
|
15
14
|
}[];
|
|
16
15
|
/**
|
|
17
|
-
*
|
|
16
|
+
* Selected option values.
|
|
18
17
|
*/
|
|
19
18
|
values?: string[] | undefined;
|
|
20
19
|
/**
|
|
21
|
-
*
|
|
20
|
+
* Maximum number of selectable options.
|
|
22
21
|
*/
|
|
23
22
|
max?: number | undefined;
|
|
24
23
|
/**
|
|
25
|
-
*
|
|
24
|
+
* The `class` attribute on the wrapper element.
|
|
26
25
|
*/
|
|
27
26
|
class?: string | undefined;
|
|
28
27
|
/**
|
|
29
|
-
*
|
|
28
|
+
* Whether to hide the widget.
|
|
30
29
|
*/
|
|
31
30
|
hidden?: boolean | undefined;
|
|
32
31
|
/**
|
|
33
|
-
*
|
|
32
|
+
* Whether to disable the widget. An alias of the `aria-disabled`
|
|
34
33
|
* attribute.
|
|
35
34
|
*/
|
|
36
35
|
disabled?: boolean | undefined;
|
|
37
36
|
/**
|
|
38
|
-
*
|
|
37
|
+
* Whether to make the widget read-only. An alias of the
|
|
39
38
|
* `aria-readonly` attribute.
|
|
40
39
|
*/
|
|
41
40
|
readonly?: boolean | undefined;
|
|
42
41
|
/**
|
|
43
|
-
*
|
|
42
|
+
* Whether to mark the widget required. An alias of the
|
|
44
43
|
* `aria-required` attribute.
|
|
45
44
|
*/
|
|
46
45
|
required?: boolean | undefined;
|
|
47
46
|
/**
|
|
48
|
-
*
|
|
47
|
+
* Whether to mark the widget invalid. An alias of the
|
|
49
48
|
* `aria-invalid` attribute.
|
|
50
49
|
*/
|
|
51
50
|
invalid?: boolean | undefined;
|
|
52
51
|
/**
|
|
53
|
-
*
|
|
52
|
+
* Primary slot content.
|
|
54
53
|
*/
|
|
55
|
-
children?:
|
|
54
|
+
children?: Snippet<[]> | undefined;
|
|
56
55
|
/**
|
|
57
|
-
*
|
|
56
|
+
* Custom `AddValue` event handler.
|
|
58
57
|
*/
|
|
59
58
|
onAddValue?: ((event: CustomEvent) => void) | undefined;
|
|
60
59
|
/**
|
|
61
|
-
*
|
|
60
|
+
* Custom `RemoveValue` event handler.
|
|
62
61
|
*/
|
|
63
62
|
onRemoveValue?: ((event: CustomEvent) => void) | undefined;
|
|
64
63
|
} & Record<string, any>, {}, "values">;
|
|
65
64
|
type Props = {
|
|
66
65
|
/**
|
|
67
|
-
*
|
|
68
|
-
* options.
|
|
66
|
+
* Available options.
|
|
69
67
|
*/
|
|
70
68
|
options: {
|
|
71
69
|
label: string;
|
|
@@ -73,51 +71,52 @@ type Props = {
|
|
|
73
71
|
searchValue?: string;
|
|
74
72
|
}[];
|
|
75
73
|
/**
|
|
76
|
-
*
|
|
74
|
+
* Selected option values.
|
|
77
75
|
*/
|
|
78
76
|
values?: string[] | undefined;
|
|
79
77
|
/**
|
|
80
|
-
*
|
|
78
|
+
* Maximum number of selectable options.
|
|
81
79
|
*/
|
|
82
80
|
max?: number | undefined;
|
|
83
81
|
/**
|
|
84
|
-
*
|
|
82
|
+
* The `class` attribute on the wrapper element.
|
|
85
83
|
*/
|
|
86
84
|
class?: string | undefined;
|
|
87
85
|
/**
|
|
88
|
-
*
|
|
86
|
+
* Whether to hide the widget.
|
|
89
87
|
*/
|
|
90
88
|
hidden?: boolean | undefined;
|
|
91
89
|
/**
|
|
92
|
-
*
|
|
90
|
+
* Whether to disable the widget. An alias of the `aria-disabled`
|
|
93
91
|
* attribute.
|
|
94
92
|
*/
|
|
95
93
|
disabled?: boolean | undefined;
|
|
96
94
|
/**
|
|
97
|
-
*
|
|
95
|
+
* Whether to make the widget read-only. An alias of the
|
|
98
96
|
* `aria-readonly` attribute.
|
|
99
97
|
*/
|
|
100
98
|
readonly?: boolean | undefined;
|
|
101
99
|
/**
|
|
102
|
-
*
|
|
100
|
+
* Whether to mark the widget required. An alias of the
|
|
103
101
|
* `aria-required` attribute.
|
|
104
102
|
*/
|
|
105
103
|
required?: boolean | undefined;
|
|
106
104
|
/**
|
|
107
|
-
*
|
|
105
|
+
* Whether to mark the widget invalid. An alias of the
|
|
108
106
|
* `aria-invalid` attribute.
|
|
109
107
|
*/
|
|
110
108
|
invalid?: boolean | undefined;
|
|
111
109
|
/**
|
|
112
|
-
*
|
|
110
|
+
* Primary slot content.
|
|
113
111
|
*/
|
|
114
|
-
children?:
|
|
112
|
+
children?: Snippet<[]> | undefined;
|
|
115
113
|
/**
|
|
116
|
-
*
|
|
114
|
+
* Custom `AddValue` event handler.
|
|
117
115
|
*/
|
|
118
116
|
onAddValue?: ((event: CustomEvent) => void) | undefined;
|
|
119
117
|
/**
|
|
120
|
-
*
|
|
118
|
+
* Custom `RemoveValue` event handler.
|
|
121
119
|
*/
|
|
122
120
|
onRemoveValue?: ((event: CustomEvent) => void) | undefined;
|
|
123
121
|
};
|
|
122
|
+
import type { Snippet } from 'svelte';
|