@sveltia/ui 0.19.3 → 0.20.1
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/package/components/alert/alert.svelte.d.ts +18 -0
- package/package/components/button/button-group.svelte.d.ts +14 -0
- package/package/components/button/button.svelte.d.ts +4 -0
- package/package/components/button/select-button-group.svelte.d.ts +42 -0
- package/package/components/button/select-button.svelte.d.ts +11 -0
- package/package/components/button/split-button.svelte.d.ts +23 -0
- package/package/components/calendar/calendar.svelte.d.ts +10 -0
- package/package/components/checkbox/checkbox-group.svelte.d.ts +28 -0
- package/package/components/checkbox/checkbox.svelte.d.ts +37 -0
- package/package/components/dialog/alert-dialog.svelte.d.ts +4 -0
- package/package/components/dialog/confirmation-dialog.svelte.d.ts +4 -0
- package/package/components/dialog/dialog.svelte +8 -1
- package/package/components/dialog/dialog.svelte.d.ts +4 -0
- package/package/components/dialog/prompt-dialog.svelte.d.ts +22 -0
- package/package/components/disclosure/disclosure.svelte.d.ts +41 -0
- package/package/components/divider/divider.svelte.d.ts +20 -0
- package/package/components/divider/spacer.svelte.d.ts +14 -0
- package/package/components/drawer/drawer.svelte.d.ts +55 -0
- package/package/components/grid/grid-body.svelte.d.ts +18 -0
- package/package/components/grid/grid-cell.svelte.d.ts +14 -0
- package/package/components/grid/grid-col-header.svelte.d.ts +14 -0
- package/package/components/grid/grid-foot.svelte.d.ts +14 -0
- package/package/components/grid/grid-head.svelte.d.ts +14 -0
- package/package/components/grid/grid-row-header.svelte.d.ts +14 -0
- package/package/components/grid/grid-row.svelte.d.ts +27 -0
- package/package/components/grid/grid.svelte.d.ts +31 -0
- package/package/components/icon/icon.svelte.d.ts +14 -0
- package/package/components/listbox/listbox.svelte.d.ts +56 -0
- package/package/components/listbox/option-group.svelte.d.ts +28 -0
- package/package/components/listbox/option.svelte.d.ts +31 -0
- package/package/components/menu/menu-button.svelte.d.ts +13 -0
- package/package/components/menu/menu-item-checkbox.svelte.d.ts +4 -0
- package/package/components/menu/menu-item-group.svelte.d.ts +24 -0
- package/package/components/menu/menu-item-radio.svelte.d.ts +4 -0
- package/package/components/menu/menu-item.svelte.d.ts +4 -0
- package/package/components/menu/menu.svelte.d.ts +28 -0
- package/package/components/progressbar/progressbar.svelte +54 -0
- package/package/components/progressbar/progressbar.svelte.d.ts +53 -0
- package/package/components/radio/radio-group.svelte.d.ts +47 -0
- package/package/components/radio/radio.svelte.d.ts +52 -0
- package/package/components/select/combobox.svelte.d.ts +4 -0
- package/package/components/select/select-tags.svelte.d.ts +63 -0
- package/package/components/select/select.svelte.d.ts +4 -0
- package/package/components/slider/slider.svelte.d.ts +77 -0
- package/package/components/switch/switch.svelte.d.ts +46 -0
- package/package/components/table/table-body.svelte.d.ts +18 -0
- package/package/components/table/table-cell.svelte.d.ts +14 -0
- package/package/components/table/table-col-header.svelte.d.ts +14 -0
- package/package/components/table/table-foot.svelte.d.ts +14 -0
- package/package/components/table/table-head.svelte.d.ts +14 -0
- package/package/components/table/table-row-header.svelte.d.ts +14 -0
- package/package/components/table/table-row.svelte.d.ts +14 -0
- package/package/components/table/table.svelte.d.ts +14 -0
- package/package/components/tabs/tab-box.svelte.d.ts +19 -0
- package/package/components/tabs/tab-list.svelte.d.ts +36 -0
- package/package/components/tabs/tab-panel.svelte.d.ts +14 -0
- package/package/components/tabs/tab-panels.svelte.d.ts +14 -0
- package/package/components/tabs/tab.svelte.d.ts +11 -0
- package/package/components/text-editor/core.d.ts +1 -0
- package/package/components/text-editor/core.js +13 -1
- package/package/components/text-editor/lexical-root.svelte +6 -0
- package/package/components/text-editor/lexical-root.svelte.d.ts +42 -0
- package/package/components/text-editor/text-editor.svelte.d.ts +54 -0
- package/package/components/text-editor/toolbar/editor-toolbar.svelte.d.ts +20 -0
- package/package/components/text-editor/toolbar/format-text-button.svelte +3 -1
- package/package/components/text-editor/toolbar/format-text-button.svelte.d.ts +10 -0
- package/package/components/text-editor/toolbar/insert-link-button.svelte +41 -33
- package/package/components/text-editor/toolbar/insert-link-button.svelte.d.ts +4 -0
- package/package/components/text-editor/toolbar/toggle-block-menu-item.svelte +4 -6
- package/package/components/text-editor/toolbar/toggle-block-menu-item.svelte.d.ts +10 -0
- package/package/components/text-field/number-input.svelte.d.ts +27 -0
- package/package/components/text-field/password-input.svelte.d.ts +10 -0
- package/package/components/text-field/search-bar.svelte.d.ts +16 -0
- package/package/components/text-field/text-area.svelte.d.ts +55 -0
- package/package/components/text-field/text-input.svelte.d.ts +4 -0
- package/package/components/toast/toast.svelte.d.ts +28 -0
- package/package/components/toolbar/toolbar.svelte.d.ts +32 -0
- package/package/components/util/app-shell.svelte +5 -496
- package/package/components/util/app-shell.svelte.d.ts +15 -0
- package/package/components/util/group.svelte.d.ts +23 -0
- package/package/components/util/modal.svelte +8 -4
- package/package/components/util/modal.svelte.d.ts +6 -0
- package/package/components/util/placeholder.svelte.d.ts +10 -0
- package/package/components/util/popup.svelte.d.ts +49 -0
- package/package/index.d.ts +1 -0
- package/package/index.js +1 -0
- package/package/styles/core.scss +4 -2
- package/package.json +29 -29
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export default GridRow;
|
|
2
|
+
type GridRow = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<Props & Record<string, any>>): void;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* The interactive version of `<TableRow>`.
|
|
4
8
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr
|
|
@@ -27,3 +31,26 @@ declare const GridRow: import("svelte").Component<{
|
|
|
27
31
|
*/
|
|
28
32
|
onSelect?: ((event: CustomEvent) => void) | undefined;
|
|
29
33
|
} & Record<string, any>, {}, "">;
|
|
34
|
+
type Props = {
|
|
35
|
+
/**
|
|
36
|
+
* - The `class` attribute on the wrapper element.
|
|
37
|
+
*/
|
|
38
|
+
class?: string | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* - Whether to select the widget. An alias of the `aria-selected`
|
|
41
|
+
* attribute.
|
|
42
|
+
*/
|
|
43
|
+
selected?: boolean | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* - Primary slot content.
|
|
46
|
+
*/
|
|
47
|
+
children?: import("svelte").Snippet<[]> | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* - Custom `Change` event handler.
|
|
50
|
+
*/
|
|
51
|
+
onChange?: ((event: CustomEvent) => void) | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* - Custom `Select` event handler.
|
|
54
|
+
*/
|
|
55
|
+
onSelect?: ((event: CustomEvent) => void) | undefined;
|
|
56
|
+
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export default Grid;
|
|
2
|
+
type Grid = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<Props & Record<string, any>>): void;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* The interactive version of `<Table>`.
|
|
4
8
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table
|
|
@@ -31,3 +35,30 @@ declare const Grid: import("svelte").Component<{
|
|
|
31
35
|
*/
|
|
32
36
|
onChange?: ((event: CustomEvent) => void) | undefined;
|
|
33
37
|
} & Record<string, any>, {}, "element">;
|
|
38
|
+
type Props = {
|
|
39
|
+
/**
|
|
40
|
+
* - The `class` attribute on the wrapper element.
|
|
41
|
+
*/
|
|
42
|
+
class?: string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* - Whether to allow selecting more than one `<GridRow>` and/or
|
|
45
|
+
* `<GridCell>`. An alias of the `aria-multiselectable` attribute.
|
|
46
|
+
*/
|
|
47
|
+
selected?: boolean | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* - Whether to select a row by clicking on it.
|
|
50
|
+
*/
|
|
51
|
+
clickToSelect?: boolean | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* - A reference to the wrapper element.
|
|
54
|
+
*/
|
|
55
|
+
element?: HTMLElement | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* - Primary slot content.
|
|
58
|
+
*/
|
|
59
|
+
children?: import("svelte").Snippet<[]> | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* - Custom `Change` event handler.
|
|
62
|
+
*/
|
|
63
|
+
onChange?: ((event: CustomEvent) => void) | undefined;
|
|
64
|
+
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export default Icon;
|
|
2
|
+
type Icon = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<Props & Record<string, any>>): void;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* A Material Symbols icon.
|
|
4
8
|
* @see https://developers.google.com/fonts/docs/material_symbols
|
|
@@ -13,3 +17,13 @@ declare const Icon: import("svelte").Component<{
|
|
|
13
17
|
*/
|
|
14
18
|
name?: string | undefined;
|
|
15
19
|
} & Record<string, any>, {}, "">;
|
|
20
|
+
type Props = {
|
|
21
|
+
/**
|
|
22
|
+
* - The `class` attribute on the `span` element.
|
|
23
|
+
*/
|
|
24
|
+
class?: string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* - Icon name, e.g. `search`, `expand_more`, `close`, etc.
|
|
27
|
+
*/
|
|
28
|
+
name?: string | undefined;
|
|
29
|
+
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export default Listbox;
|
|
2
|
+
type Listbox = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<KeyboardEventHandlers & MouseEventHandlers & FocusEventHandlers & DragEventHandlers & Props & Record<string, any>>): void;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* A list widget with selectable options. The equivalent of the HTML `<select multiple>` element.
|
|
4
8
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select
|
|
@@ -57,3 +61,55 @@ declare const Listbox: import("svelte").Component<import("../../typedefs").Keybo
|
|
|
57
61
|
*/
|
|
58
62
|
onFilter?: ((event: CustomEvent) => void) | undefined;
|
|
59
63
|
} & Record<string, any>, {}, "">;
|
|
64
|
+
type Props = {
|
|
65
|
+
/**
|
|
66
|
+
* - The `class` attribute on the wrapper element.
|
|
67
|
+
*/
|
|
68
|
+
class?: string | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* - Whether to hide the widget. An alias of the `aria-hidden`
|
|
71
|
+
* attribute.
|
|
72
|
+
*/
|
|
73
|
+
hidden?: boolean | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* - Whether to disable the widget. An alias of the `aria-disabled`
|
|
76
|
+
* attribute.
|
|
77
|
+
*/
|
|
78
|
+
disabled?: boolean | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* - Whether to make the widget read-only. An alias of the
|
|
81
|
+
* `aria-readonly` attribute.
|
|
82
|
+
*/
|
|
83
|
+
readonly?: boolean | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* - Whether to mark the widget required. An alias of the
|
|
86
|
+
* `aria-required` attribute.
|
|
87
|
+
*/
|
|
88
|
+
required?: boolean | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* - Whether to mark the widget invalid. An alias of the
|
|
91
|
+
* `aria-invalid` attribute.
|
|
92
|
+
*/
|
|
93
|
+
invalid?: boolean | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* - Whether to allow selecting more than one `<Option>`. An alias
|
|
96
|
+
* of the `aria-multiselectable` attribute.
|
|
97
|
+
*/
|
|
98
|
+
multiple?: boolean | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* - Search terms to be used to filter the items.
|
|
101
|
+
*/
|
|
102
|
+
searchTerms?: string | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* - Primary slot content.
|
|
105
|
+
*/
|
|
106
|
+
children?: import("svelte").Snippet<[]> | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* - Custom `Change` event handler.
|
|
109
|
+
*/
|
|
110
|
+
onChange?: ((event: CustomEvent) => void) | undefined;
|
|
111
|
+
/**
|
|
112
|
+
* - Custom `Filter` event handler.
|
|
113
|
+
*/
|
|
114
|
+
onFilter?: ((event: CustomEvent) => void) | undefined;
|
|
115
|
+
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export default OptionGroup;
|
|
2
|
+
type OptionGroup = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<Props & Record<string, any>>): void;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* A group within a `<Listbox>`. The equivalent of the HTML `<optgroup>` element. It can contain one
|
|
4
8
|
* or more `<Option>`s.
|
|
@@ -30,3 +34,27 @@ declare const OptionGroup: import("svelte").Component<{
|
|
|
30
34
|
*/
|
|
31
35
|
children?: import("svelte").Snippet<[]> | undefined;
|
|
32
36
|
} & Record<string, any>, {}, "">;
|
|
37
|
+
type Props = {
|
|
38
|
+
/**
|
|
39
|
+
* - The `class` attribute on the wrapper element.
|
|
40
|
+
*/
|
|
41
|
+
class?: string | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* - Whether to hide the widget. An alias of the `aria-hidden`
|
|
44
|
+
* attribute.
|
|
45
|
+
*/
|
|
46
|
+
hidden?: boolean | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* - Whether to disable the widget. An alias of the `aria-disabled`
|
|
49
|
+
* attribute.
|
|
50
|
+
*/
|
|
51
|
+
disabled?: boolean | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* - The group’s label to be displayed above the child `<Option>`s.
|
|
54
|
+
*/
|
|
55
|
+
label?: string | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* - Primary slot content.
|
|
58
|
+
*/
|
|
59
|
+
children?: import("svelte").Snippet<[]> | undefined;
|
|
60
|
+
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export default Option;
|
|
2
|
+
type Option = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<ButtonProps & KeyboardEventHandlers & MouseEventHandlers & FocusEventHandlers & DragEventHandlers & Props & Record<string, any>>): void;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* An option within the `<Listbox>` widget. The equivalent of the HTML `<option>` element.
|
|
4
8
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option
|
|
@@ -31,3 +35,30 @@ declare const Option: import("svelte").Component<import("../../typedefs").Button
|
|
|
31
35
|
*/
|
|
32
36
|
checkIcon?: import("svelte").Snippet<[]> | undefined;
|
|
33
37
|
} & Record<string, any>, {}, "hidden" | "selected">;
|
|
38
|
+
type Props = {
|
|
39
|
+
/**
|
|
40
|
+
* - The `class` attribute on the wrapper element.
|
|
41
|
+
*/
|
|
42
|
+
class?: string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* - Whether to select the widget. An alias of the `aria-selected`
|
|
45
|
+
* attribute.
|
|
46
|
+
*/
|
|
47
|
+
selected?: boolean | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* - Text label displayed on the item.
|
|
50
|
+
*/
|
|
51
|
+
label: string;
|
|
52
|
+
/**
|
|
53
|
+
* - The value to be searched.
|
|
54
|
+
*/
|
|
55
|
+
searchValue?: string | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* - Whether to wrap a long label.
|
|
58
|
+
*/
|
|
59
|
+
wrap?: boolean | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* - Check icon slot content.
|
|
62
|
+
*/
|
|
63
|
+
checkIcon?: import("svelte").Snippet<[]> | undefined;
|
|
64
|
+
};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
export default MenuButton;
|
|
2
|
+
type MenuButton = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<ButtonProps & KeyboardEventHandlers & MouseEventHandlers & FocusEventHandlers & DragEventHandlers & Props & Record<string, any>>): void;
|
|
5
|
+
} & {
|
|
6
|
+
focus: () => void;
|
|
7
|
+
};
|
|
2
8
|
/**
|
|
3
9
|
* A button to open a `<Menu>` widget.
|
|
4
10
|
* @see https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/
|
|
@@ -12,3 +18,10 @@ declare const MenuButton: import("svelte").Component<import("../../typedefs").Bu
|
|
|
12
18
|
} & Record<string, any>, {
|
|
13
19
|
focus: () => void;
|
|
14
20
|
}, "">;
|
|
21
|
+
type Props = {
|
|
22
|
+
/**
|
|
23
|
+
* - The base element of
|
|
24
|
+
* {@link popupPosition}. If omitted, this will be {@link buttonComponent}.
|
|
25
|
+
*/
|
|
26
|
+
popupPositionBaseElement?: HTMLElement | undefined;
|
|
27
|
+
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export default MenuItemCheckbox;
|
|
2
|
+
type MenuItemCheckbox = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<ButtonProps & MenuItemProps & KeyboardEventHandlers & MouseEventHandlers & FocusEventHandlers & DragEventHandlers & Record<string, any>>): void;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* A menu item widget with a checkbox.
|
|
4
8
|
* @see https://w3c.github.io/aria/#menuitemcheckbox
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export default MenuItemGroup;
|
|
2
|
+
type MenuItemGroup = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<KeyboardEventHandlers & MouseEventHandlers & FocusEventHandlers & DragEventHandlers & Props & Record<string, any>>): void;
|
|
5
|
+
};
|
|
2
6
|
/** A menu item group. */
|
|
3
7
|
declare const MenuItemGroup: import("svelte").Component<import("../../typedefs").KeyboardEventHandlers & import("../../typedefs").MouseEventHandlers & import("../../typedefs").FocusEventHandlers & import("../../typedefs").DragEventHandlers & {
|
|
4
8
|
/**
|
|
@@ -20,3 +24,23 @@ declare const MenuItemGroup: import("svelte").Component<import("../../typedefs")
|
|
|
20
24
|
*/
|
|
21
25
|
title?: string | undefined;
|
|
22
26
|
} & Record<string, any>, {}, "">;
|
|
27
|
+
type Props = {
|
|
28
|
+
/**
|
|
29
|
+
* - The `class` attribute on the wrapper element.
|
|
30
|
+
*/
|
|
31
|
+
class?: string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* - Whether to hide the widget. An alias of the `aria-hidden`
|
|
34
|
+
* attribute.
|
|
35
|
+
*/
|
|
36
|
+
hidden?: boolean | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* - Whether to disable the widget. An alias of the `aria-disabled`
|
|
39
|
+
* attribute.
|
|
40
|
+
*/
|
|
41
|
+
disabled?: boolean | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* - Text label displayed above the group items.
|
|
44
|
+
*/
|
|
45
|
+
title?: string | undefined;
|
|
46
|
+
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export default MenuItemRadio;
|
|
2
|
+
type MenuItemRadio = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<ButtonProps & MenuItemProps & KeyboardEventHandlers & MouseEventHandlers & FocusEventHandlers & DragEventHandlers & Record<string, any>>): void;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* A menu item widget with a radio. Only one item can be selected within the parent `<Menu>` or
|
|
4
8
|
* `<MenuItemGroup>` component.
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export default MenuItem;
|
|
2
|
+
type MenuItem = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<ButtonProps & MenuItemProps & KeyboardEventHandlers & MouseEventHandlers & FocusEventHandlers & DragEventHandlers & Record<string, any>>): void;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* A menu item widget.
|
|
4
8
|
* @see https://w3c.github.io/aria/#menuitem
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export default Menu;
|
|
2
|
+
type Menu = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<Props & Record<string, any>>): void;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* A menu widget.
|
|
4
8
|
* @see https://w3c.github.io/aria/#menu
|
|
@@ -28,3 +32,27 @@ declare const Menu: import("svelte").Component<{
|
|
|
28
32
|
*/
|
|
29
33
|
onChange?: ((event: CustomEvent) => void) | undefined;
|
|
30
34
|
} & Record<string, any>, {}, "">;
|
|
35
|
+
type Props = {
|
|
36
|
+
/**
|
|
37
|
+
* - The `class` attribute on the wrapper element.
|
|
38
|
+
*/
|
|
39
|
+
class?: string | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* - Whether to hide the widget. An alias of the `aria-hidden`
|
|
42
|
+
* attribute.
|
|
43
|
+
*/
|
|
44
|
+
hidden?: boolean | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* - Whether to disable the widget. An alias of the `aria-disabled`
|
|
47
|
+
* attribute.
|
|
48
|
+
*/
|
|
49
|
+
disabled?: boolean | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* - Primary slot content.
|
|
52
|
+
*/
|
|
53
|
+
children?: import("svelte").Snippet<[]> | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* - Custom `Change` event handler.
|
|
56
|
+
*/
|
|
57
|
+
onChange?: ((event: CustomEvent) => void) | undefined;
|
|
58
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
A progressbar widget.
|
|
4
|
+
@see https://w3c.github.io/aria/#progressbar
|
|
5
|
+
-->
|
|
6
|
+
<script>
|
|
7
|
+
/**
|
|
8
|
+
* @typedef {object} Props
|
|
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
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @type {Props & Record<string, any>}
|
|
18
|
+
*/
|
|
19
|
+
let {
|
|
20
|
+
/* eslint-disable prefer-const */
|
|
21
|
+
class: className,
|
|
22
|
+
now = 0,
|
|
23
|
+
min = 0,
|
|
24
|
+
max = 100,
|
|
25
|
+
text,
|
|
26
|
+
...restProps
|
|
27
|
+
/* eslint-enable prefer-const */
|
|
28
|
+
} = $props();
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<div
|
|
32
|
+
{...restProps}
|
|
33
|
+
role="progressbar"
|
|
34
|
+
class="sui progressbar {className}"
|
|
35
|
+
aria-valuenow={now}
|
|
36
|
+
aria-valuemin={min}
|
|
37
|
+
aria-valuemax={max}
|
|
38
|
+
aria-valuetext={text}
|
|
39
|
+
>
|
|
40
|
+
<div role="none" style:width="{now}%"></div>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<style>.progressbar {
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
border-radius: var(--sui-progressbar-border-radius, 16px);
|
|
46
|
+
width: var(--sui-progressbar-width, 240px);
|
|
47
|
+
height: var(--sui-progressbar-height, 8px);
|
|
48
|
+
background-color: var(--sui-progressbar-background-color, var(--sui-secondary-background-color));
|
|
49
|
+
}
|
|
50
|
+
.progressbar div {
|
|
51
|
+
height: 100%;
|
|
52
|
+
background-color: var(--sui-progressbar-foreground-color, var(--sui-primary-accent-color-light));
|
|
53
|
+
transition: width 250ms;
|
|
54
|
+
}</style>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export default Progressbar;
|
|
2
|
+
type Progressbar = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<Props & Record<string, any>>): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* A progressbar widget.
|
|
8
|
+
* @see https://w3c.github.io/aria/#progressbar
|
|
9
|
+
*/
|
|
10
|
+
declare const Progressbar: import("svelte").Component<{
|
|
11
|
+
/**
|
|
12
|
+
* - The `class` attribute on the wrapper element.
|
|
13
|
+
*/
|
|
14
|
+
class?: string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* - The `aria-valuenow` attribute on the wrapper element.
|
|
17
|
+
*/
|
|
18
|
+
now: number;
|
|
19
|
+
/**
|
|
20
|
+
* - The `aria-valuemin` attribute on the wrapper element.
|
|
21
|
+
*/
|
|
22
|
+
min?: number | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* - The `aria-valuemax` attribute on the wrapper element.
|
|
25
|
+
*/
|
|
26
|
+
max?: number | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* - The `aria-valuetext` attribute on the wrapper element.
|
|
29
|
+
*/
|
|
30
|
+
text?: string | undefined;
|
|
31
|
+
} & Record<string, any>, {}, "">;
|
|
32
|
+
type Props = {
|
|
33
|
+
/**
|
|
34
|
+
* - The `class` attribute on the wrapper element.
|
|
35
|
+
*/
|
|
36
|
+
class?: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* - The `aria-valuenow` attribute on the wrapper element.
|
|
39
|
+
*/
|
|
40
|
+
now: number;
|
|
41
|
+
/**
|
|
42
|
+
* - The `aria-valuemin` attribute on the wrapper element.
|
|
43
|
+
*/
|
|
44
|
+
min?: number | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* - The `aria-valuemax` attribute on the wrapper element.
|
|
47
|
+
*/
|
|
48
|
+
max?: number | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* - The `aria-valuetext` attribute on the wrapper element.
|
|
51
|
+
*/
|
|
52
|
+
text?: string | undefined;
|
|
53
|
+
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export default RadioGroup;
|
|
2
|
+
type RadioGroup = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<Props & Record<string, any>>): void;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* The container of `<Radio>`s.
|
|
4
8
|
* @see https://w3c.github.io/aria/#radiogroup
|
|
@@ -47,3 +51,46 @@ declare const RadioGroup: import("svelte").Component<{
|
|
|
47
51
|
*/
|
|
48
52
|
onChange?: ((event: CustomEvent) => void) | undefined;
|
|
49
53
|
} & Record<string, any>, {}, "">;
|
|
54
|
+
type Props = {
|
|
55
|
+
/**
|
|
56
|
+
* - The `class` attribute on the wrapper element.
|
|
57
|
+
*/
|
|
58
|
+
class?: string | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* - Whether to hide the widget.
|
|
61
|
+
*/
|
|
62
|
+
hidden?: boolean | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* - Whether to disable the widget. An alias of the `aria-disabled`
|
|
65
|
+
* attribute.
|
|
66
|
+
*/
|
|
67
|
+
disabled?: boolean | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* - Whether to make the widget read-only. An alias of the
|
|
70
|
+
* `aria-readonly` attribute.
|
|
71
|
+
*/
|
|
72
|
+
readonly?: boolean | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* - Whether to mark the widget required. An alias of the
|
|
75
|
+
* `aria-required` attribute.
|
|
76
|
+
*/
|
|
77
|
+
required?: boolean | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* - Whether to mark the widget invalid. An alias of the
|
|
80
|
+
* `aria-invalid` attribute.
|
|
81
|
+
*/
|
|
82
|
+
invalid?: boolean | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* - Orientation of the widget. An alias of the
|
|
85
|
+
* `aria-orientation` attribute.
|
|
86
|
+
*/
|
|
87
|
+
orientation?: "vertical" | "horizontal" | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* - Primary slot content.
|
|
90
|
+
*/
|
|
91
|
+
children?: import("svelte").Snippet<[]> | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* - Custom `Change` event handler.
|
|
94
|
+
*/
|
|
95
|
+
onChange?: ((event: CustomEvent) => void) | undefined;
|
|
96
|
+
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export default Radio;
|
|
2
|
+
type Radio = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<Props & Record<string, any>>): void;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* The equivalent of the HTML `<input type="radio">` element.
|
|
4
8
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio
|
|
@@ -53,3 +57,51 @@ declare const Radio: import("svelte").Component<{
|
|
|
53
57
|
*/
|
|
54
58
|
onSelect?: ((event: CustomEvent) => void) | undefined;
|
|
55
59
|
} & Record<string, any>, {}, "">;
|
|
60
|
+
type Props = {
|
|
61
|
+
/**
|
|
62
|
+
* - The `class` attribute on the wrapper element.
|
|
63
|
+
*/
|
|
64
|
+
class?: string | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* - Whether to hide the widget.
|
|
67
|
+
*/
|
|
68
|
+
hidden?: boolean | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* - Whether to disable the widget. An alias of the `aria-disabled`
|
|
71
|
+
* attribute.
|
|
72
|
+
*/
|
|
73
|
+
disabled?: boolean | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* - Whether to check the widget. An alias of the `aria-checked`
|
|
76
|
+
* attribute.
|
|
77
|
+
*/
|
|
78
|
+
checked?: boolean | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* - The `name` attribute on the `<button>` element.
|
|
81
|
+
*/
|
|
82
|
+
name?: string | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* - The `value` attribute on the `<button>` element.
|
|
85
|
+
*/
|
|
86
|
+
value?: string | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* - Text label displayed next to the checkbox.
|
|
89
|
+
*/
|
|
90
|
+
label?: string | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* - Primary slot content.
|
|
93
|
+
*/
|
|
94
|
+
children?: import("svelte").Snippet<[]> | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* - Default slot content.
|
|
97
|
+
*/
|
|
98
|
+
default?: import("svelte").Snippet<[]> | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* - Custom `Change` event handler.
|
|
101
|
+
*/
|
|
102
|
+
onChange?: ((event: CustomEvent) => void) | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* - Custom `Select` event handler.
|
|
105
|
+
*/
|
|
106
|
+
onSelect?: ((event: CustomEvent) => void) | undefined;
|
|
107
|
+
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export default Combobox;
|
|
2
|
+
type Combobox = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<ComboboxProps & TextInputProps & Record<string, any>>): void;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* A variant of the `<Select>` widget with an auto-complete text input field.
|
|
4
8
|
* @see https://w3c.github.io/aria/#combobox
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export default SelectTags;
|
|
2
|
+
type SelectTags = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<Props & Record<string, any>>): void;
|
|
5
|
+
};
|
|
2
6
|
declare const SelectTags: import("svelte").Component<{
|
|
3
7
|
/**
|
|
4
8
|
* - Available
|
|
@@ -58,3 +62,62 @@ declare const SelectTags: import("svelte").Component<{
|
|
|
58
62
|
*/
|
|
59
63
|
onRemoveValue?: ((event: CustomEvent) => void) | undefined;
|
|
60
64
|
} & Record<string, any>, {}, "values">;
|
|
65
|
+
type Props = {
|
|
66
|
+
/**
|
|
67
|
+
* - Available
|
|
68
|
+
* options.
|
|
69
|
+
*/
|
|
70
|
+
options: {
|
|
71
|
+
label: string;
|
|
72
|
+
value: string;
|
|
73
|
+
searchValue?: string;
|
|
74
|
+
}[];
|
|
75
|
+
/**
|
|
76
|
+
* - Selected option values.
|
|
77
|
+
*/
|
|
78
|
+
values?: string[] | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* - Maximum number of selectable options.
|
|
81
|
+
*/
|
|
82
|
+
max?: number | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* - The `class` attribute on the wrapper element.
|
|
85
|
+
*/
|
|
86
|
+
class?: string | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* - Whether to hide the widget.
|
|
89
|
+
*/
|
|
90
|
+
hidden?: boolean | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* - Whether to disable the widget. An alias of the `aria-disabled`
|
|
93
|
+
* attribute.
|
|
94
|
+
*/
|
|
95
|
+
disabled?: boolean | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* - Whether to make the widget read-only. An alias of the
|
|
98
|
+
* `aria-readonly` attribute.
|
|
99
|
+
*/
|
|
100
|
+
readonly?: boolean | undefined;
|
|
101
|
+
/**
|
|
102
|
+
* - Whether to mark the widget required. An alias of the
|
|
103
|
+
* `aria-required` attribute.
|
|
104
|
+
*/
|
|
105
|
+
required?: boolean | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* - Whether to mark the widget invalid. An alias of the
|
|
108
|
+
* `aria-invalid` attribute.
|
|
109
|
+
*/
|
|
110
|
+
invalid?: boolean | undefined;
|
|
111
|
+
/**
|
|
112
|
+
* - Primary slot content.
|
|
113
|
+
*/
|
|
114
|
+
children?: import("svelte").Snippet<[]> | undefined;
|
|
115
|
+
/**
|
|
116
|
+
* - Custom `AddValue` event handler.
|
|
117
|
+
*/
|
|
118
|
+
onAddValue?: ((event: CustomEvent) => void) | undefined;
|
|
119
|
+
/**
|
|
120
|
+
* - Custom `RemoveValue` event handler.
|
|
121
|
+
*/
|
|
122
|
+
onRemoveValue?: ((event: CustomEvent) => void) | undefined;
|
|
123
|
+
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export default Select;
|
|
2
|
+
type Select = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<ComboboxProps & Record<string, any>>): void;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* A select-only variant of `<Combobox>`. The equivalent of the HTML `<select>` element.
|
|
4
8
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select
|