@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
|
@@ -7,11 +7,15 @@
|
|
|
7
7
|
<script>
|
|
8
8
|
import Icon from '../icon/icon.svelte';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* @import { Snippet } from 'svelte';
|
|
12
|
+
*/
|
|
13
|
+
|
|
10
14
|
/**
|
|
11
15
|
* @typedef {object} Props
|
|
12
|
-
* @property {'error' | 'warning' | 'info' | 'success'} status
|
|
13
|
-
* @property {
|
|
14
|
-
* @property {
|
|
16
|
+
* @property {'error' | 'warning' | 'info' | 'success'} status Alert status.
|
|
17
|
+
* @property {Snippet} [children] Primary slot content.
|
|
18
|
+
* @property {Snippet} [icon] Icon slot content.
|
|
15
19
|
*/
|
|
16
20
|
|
|
17
21
|
/**
|
|
@@ -10,29 +10,30 @@ type Alert = {
|
|
|
10
10
|
*/
|
|
11
11
|
declare const Alert: import("svelte").Component<{
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Alert status.
|
|
14
14
|
*/
|
|
15
15
|
status: "error" | "warning" | "info" | "success";
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Primary slot content.
|
|
18
18
|
*/
|
|
19
|
-
children?:
|
|
19
|
+
children?: Snippet<[]> | undefined;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Icon slot content.
|
|
22
22
|
*/
|
|
23
|
-
icon?:
|
|
23
|
+
icon?: Snippet<[]> | undefined;
|
|
24
24
|
} & Record<string, any>, {}, "">;
|
|
25
25
|
type Props = {
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Alert status.
|
|
28
28
|
*/
|
|
29
29
|
status: "error" | "warning" | "info" | "success";
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* Primary slot content.
|
|
32
32
|
*/
|
|
33
|
-
children?:
|
|
33
|
+
children?: Snippet<[]> | undefined;
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Icon slot content.
|
|
36
36
|
*/
|
|
37
|
-
icon?:
|
|
37
|
+
icon?: Snippet<[]> | undefined;
|
|
38
38
|
};
|
|
39
|
+
import type { Snippet } from 'svelte';
|
|
@@ -3,13 +3,17 @@
|
|
|
3
3
|
import Button from '../button/button.svelte';
|
|
4
4
|
import Icon from '../icon/icon.svelte';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* @import { Snippet } from 'svelte';
|
|
8
|
+
*/
|
|
9
|
+
|
|
6
10
|
/**
|
|
7
11
|
* @typedef {object} Props
|
|
8
|
-
* @property {boolean} [show]
|
|
9
|
-
* @property {boolean} [dismissible]
|
|
10
|
-
* @property {'error' | 'warning' | 'info' | 'success'} [status]
|
|
11
|
-
* @property {
|
|
12
|
-
* @property {
|
|
12
|
+
* @property {boolean} [show] Whether to show the toast.
|
|
13
|
+
* @property {boolean} [dismissible] Whether to show the close button.
|
|
14
|
+
* @property {'error' | 'warning' | 'info' | 'success'} [status] Information status.
|
|
15
|
+
* @property {Snippet} [children] Primary slot content.
|
|
16
|
+
* @property {Snippet} [icon] Icon slot content.
|
|
13
17
|
*/
|
|
14
18
|
|
|
15
19
|
/** @type {Props} */
|
|
@@ -5,45 +5,46 @@ type Infobar = {
|
|
|
5
5
|
};
|
|
6
6
|
declare const Infobar: import("svelte").Component<{
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Whether to show the toast.
|
|
9
9
|
*/
|
|
10
10
|
show?: boolean | undefined;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Whether to show the close button.
|
|
13
13
|
*/
|
|
14
14
|
dismissible?: boolean | undefined;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Information status.
|
|
17
17
|
*/
|
|
18
18
|
status?: "error" | "warning" | "info" | "success" | undefined;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Primary slot content.
|
|
21
21
|
*/
|
|
22
|
-
children?:
|
|
22
|
+
children?: Snippet<[]> | undefined;
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Icon slot content.
|
|
25
25
|
*/
|
|
26
|
-
icon?:
|
|
26
|
+
icon?: Snippet<[]> | undefined;
|
|
27
27
|
}, {}, "show">;
|
|
28
28
|
type Props = {
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Whether to show the toast.
|
|
31
31
|
*/
|
|
32
32
|
show?: boolean | undefined;
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* Whether to show the close button.
|
|
35
35
|
*/
|
|
36
36
|
dismissible?: boolean | undefined;
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* Information status.
|
|
39
39
|
*/
|
|
40
40
|
status?: "error" | "warning" | "info" | "success" | undefined;
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* Primary slot content.
|
|
43
43
|
*/
|
|
44
|
-
children?:
|
|
44
|
+
children?: Snippet<[]> | undefined;
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* Icon slot content.
|
|
47
47
|
*/
|
|
48
|
-
icon?:
|
|
48
|
+
icon?: Snippet<[]> | undefined;
|
|
49
49
|
};
|
|
50
|
+
import type { Snippet } from 'svelte';
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
<script>
|
|
2
|
+
/**
|
|
3
|
+
* @import { Snippet } from 'svelte';
|
|
4
|
+
*/
|
|
5
|
+
|
|
2
6
|
/**
|
|
3
7
|
* @typedef {object} Props
|
|
4
|
-
* @property {string} [class]
|
|
5
|
-
* @property {
|
|
8
|
+
* @property {string} [class] The `class` attribute on the wrapper element.
|
|
9
|
+
* @property {Snippet} [children] Primary slot content.
|
|
6
10
|
*/
|
|
7
11
|
|
|
8
12
|
/**
|
|
@@ -5,21 +5,22 @@ type ButtonGroup = {
|
|
|
5
5
|
};
|
|
6
6
|
declare const ButtonGroup: import("svelte").Component<{
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* The `class` attribute on the wrapper element.
|
|
9
9
|
*/
|
|
10
10
|
class?: string | undefined;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Primary slot content.
|
|
13
13
|
*/
|
|
14
|
-
children?:
|
|
14
|
+
children?: Snippet<[]> | undefined;
|
|
15
15
|
} & Record<string, any>, {}, "">;
|
|
16
16
|
type Props = {
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* The `class` attribute on the wrapper element.
|
|
19
19
|
*/
|
|
20
20
|
class?: string | undefined;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Primary slot content.
|
|
23
23
|
*/
|
|
24
|
-
children?:
|
|
24
|
+
children?: Snippet<[]> | undefined;
|
|
25
25
|
};
|
|
26
|
+
import type { Snippet } from 'svelte';
|
|
@@ -9,8 +9,11 @@
|
|
|
9
9
|
import Popup from '../util/popup.svelte';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* @
|
|
13
|
-
|
|
12
|
+
* @import { ButtonProps, CommonEventHandlers } from '../../typedefs';
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @type {ButtonProps & CommonEventHandlers & Record<string, any>}
|
|
14
17
|
*/
|
|
15
18
|
let {
|
|
16
19
|
/* eslint-disable prefer-const */
|
|
@@ -8,4 +8,5 @@ type Button = {
|
|
|
8
8
|
* @see https://w3c.github.io/aria/#button
|
|
9
9
|
* @see https://www.w3.org/WAI/ARIA/apg/patterns/button/
|
|
10
10
|
*/
|
|
11
|
-
declare const Button: import("svelte").Component<
|
|
11
|
+
declare const Button: import("svelte").Component<ButtonProps & import("../../typedefs").KeyboardEventHandlers & import("../../typedefs").MouseEventHandlers & import("../../typedefs").FocusEventHandlers & import("../../typedefs").DragEventHandlers & Record<string, any>, {}, "element">;
|
|
12
|
+
import type { ButtonProps } from '../../typedefs';
|
|
@@ -7,20 +7,24 @@
|
|
|
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 {
|
|
23
|
-
* @property {(event: CustomEvent) => void} [onChange]
|
|
26
|
+
* @property {Snippet} [children] Primary slot content.
|
|
27
|
+
* @property {(event: CustomEvent) => void} [onChange] Custom `Change` event handler.
|
|
24
28
|
*/
|
|
25
29
|
|
|
26
30
|
/**
|
|
@@ -10,77 +10,78 @@ type SelectButtonGroup = {
|
|
|
10
10
|
*/
|
|
11
11
|
declare const SelectButtonGroup: 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
|
+
* Primary slot content.
|
|
42
42
|
*/
|
|
43
|
-
children?:
|
|
43
|
+
children?: Snippet<[]> | undefined;
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* Custom `Change` event handler.
|
|
46
46
|
*/
|
|
47
47
|
onChange?: ((event: CustomEvent) => void) | undefined;
|
|
48
48
|
} & Record<string, any>, {}, "">;
|
|
49
49
|
type Props = {
|
|
50
50
|
/**
|
|
51
|
-
*
|
|
51
|
+
* The `class` attribute on the wrapper element.
|
|
52
52
|
*/
|
|
53
53
|
class?: string | undefined;
|
|
54
54
|
/**
|
|
55
|
-
*
|
|
55
|
+
* Whether to hide the widget.
|
|
56
56
|
*/
|
|
57
57
|
hidden?: boolean | undefined;
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
59
|
+
* Whether to disable the widget. An alias of the `aria-disabled`
|
|
60
60
|
* attribute.
|
|
61
61
|
*/
|
|
62
62
|
disabled?: boolean | undefined;
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
64
|
+
* Whether to make the widget read-only. An alias of the
|
|
65
65
|
* `aria-readonly` attribute.
|
|
66
66
|
*/
|
|
67
67
|
readonly?: boolean | undefined;
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* Whether to mark the widget required. An alias of the
|
|
70
70
|
* `aria-required` attribute.
|
|
71
71
|
*/
|
|
72
72
|
required?: boolean | undefined;
|
|
73
73
|
/**
|
|
74
|
-
*
|
|
74
|
+
* Whether to mark the widget invalid. An alias of the
|
|
75
75
|
* `aria-invalid` attribute.
|
|
76
76
|
*/
|
|
77
77
|
invalid?: boolean | undefined;
|
|
78
78
|
/**
|
|
79
|
-
*
|
|
79
|
+
* Primary slot content.
|
|
80
80
|
*/
|
|
81
|
-
children?:
|
|
81
|
+
children?: Snippet<[]> | undefined;
|
|
82
82
|
/**
|
|
83
|
-
*
|
|
83
|
+
* Custom `Change` event handler.
|
|
84
84
|
*/
|
|
85
85
|
onChange?: ((event: CustomEvent) => void) | undefined;
|
|
86
86
|
};
|
|
87
|
+
import type { Snippet } from 'svelte';
|
|
@@ -7,15 +7,18 @@
|
|
|
7
7
|
<script>
|
|
8
8
|
import Button from './button.svelte';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* @import { ButtonProps, CommonEventHandlers } from '../../typedefs';
|
|
12
|
+
*/
|
|
13
|
+
|
|
10
14
|
/**
|
|
11
15
|
* @typedef {object} Props
|
|
12
|
-
* @property {boolean} [selected]
|
|
16
|
+
* @property {boolean} [selected] Whether to select the widget. An alias of the `aria-checked`
|
|
13
17
|
* attribute. Because the UI is a button, we expose `selected` instead of `checked`.
|
|
14
18
|
*/
|
|
15
19
|
|
|
16
20
|
/**
|
|
17
|
-
* @type {
|
|
18
|
-
* Props & Record<string, any>}
|
|
21
|
+
* @type {ButtonProps & CommonEventHandlers & Props & Record<string, any>}
|
|
19
22
|
*/
|
|
20
23
|
let {
|
|
21
24
|
/* eslint-disable prefer-const */
|
|
@@ -8,17 +8,18 @@ type SelectButton = {
|
|
|
8
8
|
* @see https://w3c.github.io/aria/#radio
|
|
9
9
|
* @see https://www.w3.org/WAI/ARIA/apg/patterns/radio/
|
|
10
10
|
*/
|
|
11
|
-
declare const SelectButton: import("svelte").Component<
|
|
11
|
+
declare const SelectButton: import("svelte").Component<ButtonProps & import("../../typedefs").KeyboardEventHandlers & import("../../typedefs").MouseEventHandlers & import("../../typedefs").FocusEventHandlers & import("../../typedefs").DragEventHandlers & {
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Whether to select the widget. An alias of the `aria-checked`
|
|
14
14
|
* attribute. Because the UI is a button, we expose `selected` instead of `checked`.
|
|
15
15
|
*/
|
|
16
16
|
selected?: boolean | undefined;
|
|
17
17
|
} & Record<string, any>, {}, "selected">;
|
|
18
18
|
type Props = {
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Whether to select the widget. An alias of the `aria-checked`
|
|
21
21
|
* attribute. Because the UI is a button, we expose `selected` instead of `checked`.
|
|
22
22
|
*/
|
|
23
23
|
selected?: boolean | undefined;
|
|
24
24
|
};
|
|
25
|
+
import type { ButtonProps } from '../../typedefs';
|
|
@@ -11,18 +11,21 @@
|
|
|
11
11
|
import MenuButton from '../menu/menu-button.svelte';
|
|
12
12
|
import Button from './button.svelte';
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* @import { Snippet } from 'svelte';
|
|
16
|
+
* @import { ButtonProps, CommonEventHandlers, PopupPosition } from '../../typedefs';
|
|
17
|
+
*/
|
|
18
|
+
|
|
14
19
|
/**
|
|
15
20
|
* @typedef {object} Props
|
|
16
|
-
* @property {
|
|
17
|
-
*
|
|
18
|
-
* @property {
|
|
19
|
-
* @property {
|
|
20
|
-
* @property {import('svelte').Snippet} [popup] - Popup slot content.
|
|
21
|
+
* @property {PopupPosition} [popupPosition] Where to show the dropdown menu.
|
|
22
|
+
* @property {boolean} [showPopupBackdrop] Whether to show the backdrop for the popup.
|
|
23
|
+
* @property {Snippet} [chevronIcon] Chevron slot content.
|
|
24
|
+
* @property {Snippet} [popup] Popup slot content.
|
|
21
25
|
*/
|
|
22
26
|
|
|
23
27
|
/**
|
|
24
|
-
* @type {
|
|
25
|
-
* Props & Record<string, any>}
|
|
28
|
+
* @type {ButtonProps & CommonEventHandlers & Props & Record<string, any>}
|
|
26
29
|
*/
|
|
27
30
|
let {
|
|
28
31
|
/* eslint-disable prefer-const */
|
|
@@ -9,41 +9,42 @@ type SplitButton = {
|
|
|
9
9
|
* Match Formatting and Keep Text Only options.
|
|
10
10
|
* @see https://www.google.com/search?q=split+button&tbm=isch
|
|
11
11
|
*/
|
|
12
|
-
declare const SplitButton: import("svelte").Component<
|
|
12
|
+
declare const SplitButton: import("svelte").Component<ButtonProps & import("../../typedefs").KeyboardEventHandlers & import("../../typedefs").MouseEventHandlers & import("../../typedefs").FocusEventHandlers & import("../../typedefs").DragEventHandlers & {
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
* menu.
|
|
14
|
+
* Where to show the dropdown menu.
|
|
16
15
|
*/
|
|
17
|
-
popupPosition?:
|
|
16
|
+
popupPosition?: PopupPosition | undefined;
|
|
18
17
|
/**
|
|
19
|
-
*
|
|
18
|
+
* Whether to show the backdrop for the popup.
|
|
20
19
|
*/
|
|
21
20
|
showPopupBackdrop?: boolean | undefined;
|
|
22
21
|
/**
|
|
23
|
-
*
|
|
22
|
+
* Chevron slot content.
|
|
24
23
|
*/
|
|
25
|
-
chevronIcon?:
|
|
24
|
+
chevronIcon?: Snippet<[]> | undefined;
|
|
26
25
|
/**
|
|
27
|
-
*
|
|
26
|
+
* Popup slot content.
|
|
28
27
|
*/
|
|
29
|
-
popup?:
|
|
28
|
+
popup?: Snippet<[]> | undefined;
|
|
30
29
|
} & Record<string, any>, {}, "">;
|
|
31
30
|
type Props = {
|
|
32
31
|
/**
|
|
33
|
-
*
|
|
34
|
-
* menu.
|
|
32
|
+
* Where to show the dropdown menu.
|
|
35
33
|
*/
|
|
36
|
-
popupPosition?:
|
|
34
|
+
popupPosition?: PopupPosition | undefined;
|
|
37
35
|
/**
|
|
38
|
-
*
|
|
36
|
+
* Whether to show the backdrop for the popup.
|
|
39
37
|
*/
|
|
40
38
|
showPopupBackdrop?: boolean | undefined;
|
|
41
39
|
/**
|
|
42
|
-
*
|
|
40
|
+
* Chevron slot content.
|
|
43
41
|
*/
|
|
44
|
-
chevronIcon?:
|
|
42
|
+
chevronIcon?: Snippet<[]> | undefined;
|
|
45
43
|
/**
|
|
46
|
-
*
|
|
44
|
+
* Popup slot content.
|
|
47
45
|
*/
|
|
48
|
-
popup?:
|
|
46
|
+
popup?: Snippet<[]> | undefined;
|
|
49
47
|
};
|
|
48
|
+
import type { ButtonProps } from '../../typedefs';
|
|
49
|
+
import type { PopupPosition } from '../../typedefs';
|
|
50
|
+
import type { Snippet } from 'svelte';
|
|
@@ -6,13 +6,13 @@ type Calendar = {
|
|
|
6
6
|
/** A calendar (date picker) widget. */
|
|
7
7
|
declare const Calendar: import("svelte").Component<{
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Date.
|
|
10
10
|
*/
|
|
11
11
|
value?: string | undefined;
|
|
12
12
|
} & Record<string, any>, {}, "value">;
|
|
13
13
|
type Props = {
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Date.
|
|
16
16
|
*/
|
|
17
17
|
value?: string | undefined;
|
|
18
18
|
};
|
|
@@ -3,15 +3,19 @@
|
|
|
3
3
|
The layout container of `<Checkbox>`es.
|
|
4
4
|
-->
|
|
5
5
|
<script>
|
|
6
|
+
/**
|
|
7
|
+
* @import { Snippet } from 'svelte';
|
|
8
|
+
*/
|
|
9
|
+
|
|
6
10
|
/**
|
|
7
11
|
* @typedef {object} Props
|
|
8
|
-
* @property {string} [class]
|
|
9
|
-
* @property {boolean} [hidden]
|
|
12
|
+
* @property {string} [class] The `class` attribute on the wrapper element.
|
|
13
|
+
* @property {boolean} [hidden] Whether to hide the widget. An alias of the `aria-hidden`
|
|
10
14
|
* attribute.
|
|
11
|
-
* @property {boolean} [disabled]
|
|
15
|
+
* @property {boolean} [disabled] Whether to disable the widget. An alias of the `aria-disabled`
|
|
12
16
|
* attribute.
|
|
13
|
-
* @property {'horizontal'|'vertical'} [orientation]
|
|
14
|
-
* @property {
|
|
17
|
+
* @property {'horizontal'|'vertical'} [orientation] Orientation of the widget.
|
|
18
|
+
* @property {Snippet} [children] Primary slot content.
|
|
15
19
|
*/
|
|
16
20
|
|
|
17
21
|
/**
|
|
@@ -6,49 +6,50 @@ type CheckboxGroup = {
|
|
|
6
6
|
/** The layout container of `<Checkbox>`es. */
|
|
7
7
|
declare const CheckboxGroup: import("svelte").Component<{
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* The `class` attribute on the wrapper element.
|
|
10
10
|
*/
|
|
11
11
|
class?: string | undefined;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Whether to hide the widget. An alias of the `aria-hidden`
|
|
14
14
|
* attribute.
|
|
15
15
|
*/
|
|
16
16
|
hidden?: boolean | undefined;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Whether to disable the widget. An alias of the `aria-disabled`
|
|
19
19
|
* attribute.
|
|
20
20
|
*/
|
|
21
21
|
disabled?: boolean | undefined;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Orientation of the widget.
|
|
24
24
|
*/
|
|
25
25
|
orientation?: "vertical" | "horizontal" | undefined;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Primary slot content.
|
|
28
28
|
*/
|
|
29
|
-
children?:
|
|
29
|
+
children?: Snippet<[]> | undefined;
|
|
30
30
|
} & Record<string, any>, {}, "">;
|
|
31
31
|
type Props = {
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* The `class` attribute on the wrapper element.
|
|
34
34
|
*/
|
|
35
35
|
class?: string | undefined;
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* Whether to hide the widget. An alias of the `aria-hidden`
|
|
38
38
|
* attribute.
|
|
39
39
|
*/
|
|
40
40
|
hidden?: boolean | undefined;
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* Whether to disable the widget. An alias of the `aria-disabled`
|
|
43
43
|
* attribute.
|
|
44
44
|
*/
|
|
45
45
|
disabled?: boolean | undefined;
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
47
|
+
* Orientation of the widget.
|
|
48
48
|
*/
|
|
49
49
|
orientation?: "vertical" | "horizontal" | undefined;
|
|
50
50
|
/**
|
|
51
|
-
*
|
|
51
|
+
* Primary slot content.
|
|
52
52
|
*/
|
|
53
|
-
children?:
|
|
53
|
+
children?: Snippet<[]> | undefined;
|
|
54
54
|
};
|
|
55
|
+
import type { Snippet } from 'svelte';
|
|
@@ -9,23 +9,27 @@
|
|
|
9
9
|
import Button from '../button/button.svelte';
|
|
10
10
|
import Icon from '../icon/icon.svelte';
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* @import { Snippet } from 'svelte';
|
|
14
|
+
* @import { ButtonProps, CommonEventHandlers } from '../../typedefs';
|
|
15
|
+
*/
|
|
16
|
+
|
|
12
17
|
/**
|
|
13
18
|
* @typedef {object} Props
|
|
14
|
-
* @property {string} [class]
|
|
15
|
-
* @property {boolean} [required]
|
|
19
|
+
* @property {string} [class] The `class` attribute on the wrapper element.
|
|
20
|
+
* @property {boolean} [required] Whether to mark the widget required. An alias of the
|
|
16
21
|
* `aria-required` attribute.
|
|
17
|
-
* @property {boolean} [invalid]
|
|
22
|
+
* @property {boolean} [invalid] Whether to mark the widget invalid. An alias of the
|
|
18
23
|
* `aria-invalid` attribute.
|
|
19
|
-
* @property {boolean | 'mixed'} [checked]
|
|
24
|
+
* @property {boolean | 'mixed'} [checked] Whether to check the widget. An alias of the
|
|
20
25
|
* `aria-checked` attribute.
|
|
21
|
-
* @property {string} [label]
|
|
22
|
-
* @property {string} [aria-label]
|
|
23
|
-
* @property {
|
|
26
|
+
* @property {string} [label] Text label displayed next to the checkbox.
|
|
27
|
+
* @property {string} [aria-label] `aria-label` attribute.
|
|
28
|
+
* @property {Snippet} [checkIcon] Check icon slot content.
|
|
24
29
|
*/
|
|
25
30
|
|
|
26
31
|
/**
|
|
27
|
-
* @type {
|
|
28
|
-
* Props & Record<string, any>}
|
|
32
|
+
* @type {ButtonProps & CommonEventHandlers & Props & Record<string, any>}
|
|
29
33
|
*/
|
|
30
34
|
let {
|
|
31
35
|
/* eslint-disable prefer-const */
|