@sveltia/ui 0.3.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package/components/alert/alert.svelte +55 -0
- package/package/components/alert/alert.svelte.d.ts +36 -0
- package/package/components/button/button.svelte +1 -1
- package/package/components/button/button.svelte.d.ts +6 -6
- package/package/components/button/select-button-group.svelte.d.ts +4 -4
- package/package/components/button/select-button.svelte.d.ts +2 -2
- package/package/components/calendar/calendar.svelte +1 -2
- package/package/components/calendar/calendar.svelte.d.ts +2 -2
- package/package/components/checkbox/checkbox-group.svelte.d.ts +2 -2
- package/package/components/checkbox/checkbox.svelte +2 -1
- package/package/components/checkbox/checkbox.svelte.d.ts +8 -6
- package/package/components/dialog/dialog.svelte +2 -1
- package/package/components/dialog/dialog.svelte.d.ts +6 -4
- package/package/components/disclosure/disclosure.svelte +7 -1
- package/package/components/disclosure/disclosure.svelte.d.ts +6 -4
- package/package/components/divider/divider.svelte +6 -1
- package/package/components/divider/divider.svelte.d.ts +4 -2
- package/package/components/divider/spacer.svelte +1 -1
- package/package/components/divider/spacer.svelte.d.ts +4 -2
- package/package/components/drawer/drawer.svelte +2 -1
- package/package/components/drawer/drawer.svelte.d.ts +6 -4
- package/package/components/icon/icon.svelte +1 -0
- package/package/components/icon/icon.svelte.d.ts +8 -6
- package/package/components/listbox/listbox.svelte.d.ts +2 -2
- package/package/components/listbox/option-group.svelte.d.ts +4 -4
- package/package/components/listbox/option.svelte.d.ts +4 -4
- package/package/components/menu/menu-button.svelte.d.ts +2 -2
- package/package/components/menu/menu-item-checkbox.svelte.d.ts +2 -2
- package/package/components/menu/menu-item-group.svelte.d.ts +4 -4
- package/package/components/menu/menu-item-radio.svelte.d.ts +2 -2
- package/package/components/menu/menu-item.svelte.d.ts +4 -4
- package/package/components/menu/menu.svelte.d.ts +2 -2
- package/package/components/radio/radio-group.svelte +1 -0
- package/package/components/radio/radio-group.svelte.d.ts +4 -2
- package/package/components/radio/radio.svelte +2 -1
- package/package/components/radio/radio.svelte.d.ts +8 -6
- package/package/components/select/combobox.svelte +1 -1
- package/package/components/select/combobox.svelte.d.ts +8 -5
- package/package/components/select/select.svelte.d.ts +4 -4
- package/package/components/slider/slider.svelte +7 -3
- package/package/components/slider/slider.svelte.d.ts +6 -4
- package/package/components/switch/switch.svelte +1 -0
- package/package/components/switch/switch.svelte.d.ts +6 -4
- package/package/components/table/table-body.svelte.d.ts +2 -2
- package/package/components/table/table-cell.svelte.d.ts +2 -2
- package/package/components/table/table-col-header.svelte.d.ts +2 -2
- package/package/components/table/table-foot.svelte.d.ts +2 -2
- package/package/components/table/table-head.svelte.d.ts +2 -2
- package/package/components/table/table-row-header.svelte.d.ts +2 -2
- package/package/components/table/table-row.svelte.d.ts +2 -2
- package/package/components/table/table.svelte.d.ts +2 -2
- package/package/components/tabs/tab-list.svelte.d.ts +4 -4
- package/package/components/tabs/tab-panel.svelte.d.ts +2 -2
- package/package/components/tabs/tab.svelte.d.ts +2 -2
- package/package/components/text-field/markdown-editor.svelte.d.ts +2 -2
- package/package/components/text-field/number-input.svelte.d.ts +4 -4
- package/package/components/text-field/password-input.svelte.d.ts +4 -4
- package/package/components/text-field/search-bar.svelte.d.ts +4 -4
- package/package/components/text-field/text-area.svelte.d.ts +4 -4
- package/package/components/text-field/text-input.svelte.d.ts +6 -6
- package/package/components/toolbar/toolbar.svelte.d.ts +2 -2
- package/package/components/util/app-shell.svelte +23 -21
- package/package/components/util/app-shell.svelte.d.ts +4 -4
- package/package/components/util/group.svelte.d.ts +2 -2
- package/package/components/util/popup.d.ts +1 -0
- package/package/components/util/popup.svelte.d.ts +2 -2
- package/package/components/util/portal.svelte.d.ts +2 -2
- package/package/index.d.ts +1 -0
- package/package/index.js +1 -0
- package/package/styles/variables.scss +21 -21
- package/package.json +26 -18
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
Inline alert message.
|
|
4
|
+
@see https://w3c.github.io/aria/#alert
|
|
5
|
+
@see https://www.w3.org/WAI/ARIA/apg/patterns/alert/
|
|
6
|
+
-->
|
|
7
|
+
<script>
|
|
8
|
+
import Icon from '../icon/icon.svelte';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Alert type.
|
|
12
|
+
* @type {'error' | 'warning' | 'info' | 'success'}
|
|
13
|
+
*/
|
|
14
|
+
export let type = 'error';
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<div class="sui alert {type}" role="alert" {...$$restProps}>
|
|
18
|
+
{#if $$slots.icon}
|
|
19
|
+
<slot name="icon" />
|
|
20
|
+
{:else}
|
|
21
|
+
<Icon name={type === 'success' ? 'check_circle' : type} />
|
|
22
|
+
{/if}
|
|
23
|
+
<slot />
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<style>.alert {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
gap: var(--gap, 8px);
|
|
30
|
+
padding: var(--padding, 8px);
|
|
31
|
+
border-width: var(--border-width, var(--control--medium--border-width));
|
|
32
|
+
border-style: var(--border-style, solid);
|
|
33
|
+
border-radius: var(--border-radius, var(--control--medium--border-radius));
|
|
34
|
+
font-size: var(--font-size, var(--font-size--default));
|
|
35
|
+
}
|
|
36
|
+
.alert.error {
|
|
37
|
+
border-color: var(--error-border-color);
|
|
38
|
+
color: var(--error-foreground-color);
|
|
39
|
+
background-color: var(--error-background-color);
|
|
40
|
+
}
|
|
41
|
+
.alert.warning {
|
|
42
|
+
border-color: var(--warning-border-color);
|
|
43
|
+
color: var(--warning-foreground-color);
|
|
44
|
+
background-color: var(--warning-background-color);
|
|
45
|
+
}
|
|
46
|
+
.alert.info {
|
|
47
|
+
border-color: var(--info-border-color);
|
|
48
|
+
color: var(--info-foreground-color);
|
|
49
|
+
background-color: var(--info-background-color);
|
|
50
|
+
}
|
|
51
|
+
.alert.success {
|
|
52
|
+
border-color: var(--success-border-color);
|
|
53
|
+
color: var(--success-foreground-color);
|
|
54
|
+
background-color: var(--success-background-color);
|
|
55
|
+
}</style>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} AlertProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} AlertEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} AlertSlots */
|
|
4
|
+
/**
|
|
5
|
+
* Inline alert message.
|
|
6
|
+
* @see https://w3c.github.io/aria/#alert
|
|
7
|
+
* @see https://www.w3.org/WAI/ARIA/apg/patterns/alert/
|
|
8
|
+
*/
|
|
9
|
+
export default class Alert extends SvelteComponent<{
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
type?: "error" | "warning" | "info" | "success";
|
|
12
|
+
}, {
|
|
13
|
+
[evt: string]: CustomEvent<any>;
|
|
14
|
+
}, {
|
|
15
|
+
icon: {};
|
|
16
|
+
default: {};
|
|
17
|
+
}> {
|
|
18
|
+
}
|
|
19
|
+
export type AlertProps = typeof __propDef.props;
|
|
20
|
+
export type AlertEvents = typeof __propDef.events;
|
|
21
|
+
export type AlertSlots = typeof __propDef.slots;
|
|
22
|
+
import { SvelteComponent } from "svelte";
|
|
23
|
+
declare const __propDef: {
|
|
24
|
+
props: {
|
|
25
|
+
[x: string]: any;
|
|
26
|
+
type?: 'error' | 'warning' | 'info' | 'success';
|
|
27
|
+
};
|
|
28
|
+
events: {
|
|
29
|
+
[evt: string]: CustomEvent<any>;
|
|
30
|
+
};
|
|
31
|
+
slots: {
|
|
32
|
+
icon: {};
|
|
33
|
+
default: {};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export {};
|
|
@@ -191,7 +191,7 @@ button:global(.ghost)[aria-pressed=true] {
|
|
|
191
191
|
background-color: var(--highlight-background-color);
|
|
192
192
|
}
|
|
193
193
|
button:global(.danger) {
|
|
194
|
-
background-color: var(--
|
|
194
|
+
background-color: var(--error-background-color);
|
|
195
195
|
}
|
|
196
196
|
button:global(.large) {
|
|
197
197
|
height: var(--button--large--height);
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
* @see https://w3c.github.io/aria/#button
|
|
7
7
|
* @see https://www.w3.org/WAI/ARIA/apg/patterns/button/
|
|
8
8
|
*/
|
|
9
|
-
export default class Button extends
|
|
9
|
+
export default class Button extends SvelteComponent<{
|
|
10
10
|
[x: string]: any;
|
|
11
|
+
class?: string;
|
|
11
12
|
label?: string;
|
|
12
|
-
disabled?: boolean;
|
|
13
13
|
type?: "reset" | "submit" | "button";
|
|
14
|
-
|
|
14
|
+
disabled?: boolean;
|
|
15
15
|
element?: HTMLButtonElement;
|
|
16
16
|
role?: string;
|
|
17
17
|
size?: "small" | "medium" | "large";
|
|
@@ -71,14 +71,14 @@ export default class Button extends SvelteComponentTyped<{
|
|
|
71
71
|
export type ButtonProps = typeof __propDef.props;
|
|
72
72
|
export type ButtonEvents = typeof __propDef.events;
|
|
73
73
|
export type ButtonSlots = typeof __propDef.slots;
|
|
74
|
-
import {
|
|
74
|
+
import { SvelteComponent } from "svelte";
|
|
75
75
|
declare const __propDef: {
|
|
76
76
|
props: {
|
|
77
77
|
[x: string]: any;
|
|
78
|
+
class?: string;
|
|
78
79
|
label?: string;
|
|
79
|
-
disabled?: boolean;
|
|
80
80
|
type?: ('button' | 'submit' | 'reset');
|
|
81
|
-
|
|
81
|
+
disabled?: boolean;
|
|
82
82
|
element?: HTMLButtonElement | null;
|
|
83
83
|
role?: string;
|
|
84
84
|
size?: ('small' | 'medium' | 'large');
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* @see https://w3c.github.io/aria/#radiogroup
|
|
7
7
|
* @see https://www.w3.org/WAI/ARIA/apg/patterns/radio/
|
|
8
8
|
*/
|
|
9
|
-
export default class SelectButtonGroup extends
|
|
9
|
+
export default class SelectButtonGroup extends SvelteComponent<{
|
|
10
|
+
class?: string;
|
|
10
11
|
disabled?: boolean;
|
|
11
12
|
value?: string;
|
|
12
|
-
class?: string;
|
|
13
13
|
element?: HTMLElement;
|
|
14
14
|
ariaLabel?: string;
|
|
15
15
|
}, {
|
|
@@ -23,12 +23,12 @@ export default class SelectButtonGroup extends SvelteComponentTyped<{
|
|
|
23
23
|
export type SelectButtonGroupProps = typeof __propDef.props;
|
|
24
24
|
export type SelectButtonGroupEvents = typeof __propDef.events;
|
|
25
25
|
export type SelectButtonGroupSlots = typeof __propDef.slots;
|
|
26
|
-
import {
|
|
26
|
+
import { SvelteComponent } from "svelte";
|
|
27
27
|
declare const __propDef: {
|
|
28
28
|
props: {
|
|
29
|
+
class?: string;
|
|
29
30
|
disabled?: boolean;
|
|
30
31
|
value?: string;
|
|
31
|
-
class?: string;
|
|
32
32
|
element?: HTMLElement | null;
|
|
33
33
|
ariaLabel?: string;
|
|
34
34
|
};
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @see https://w3c.github.io/aria/#radio
|
|
7
7
|
* @see https://www.w3.org/WAI/ARIA/apg/patterns/radio/
|
|
8
8
|
*/
|
|
9
|
-
export default class SelectButton extends
|
|
9
|
+
export default class SelectButton extends SvelteComponent<{
|
|
10
10
|
[x: string]: any;
|
|
11
11
|
class?: string;
|
|
12
12
|
selected?: boolean;
|
|
@@ -27,7 +27,7 @@ export default class SelectButton extends SvelteComponentTyped<{
|
|
|
27
27
|
export type SelectButtonProps = typeof __propDef.props;
|
|
28
28
|
export type SelectButtonEvents = typeof __propDef.events;
|
|
29
29
|
export type SelectButtonSlots = typeof __propDef.slots;
|
|
30
|
-
import {
|
|
30
|
+
import { SvelteComponent } from "svelte";
|
|
31
31
|
declare const __propDef: {
|
|
32
32
|
props: {
|
|
33
33
|
[x: string]: any;
|
|
@@ -55,8 +55,7 @@
|
|
|
55
55
|
aria-haspopup="dialog"
|
|
56
56
|
>
|
|
57
57
|
<Icon slot="end-icon" name="arrow_drop_down" />
|
|
58
|
-
|
|
59
|
-
<div slot="popup" class="popup-inner" on:click|stopPropagation>
|
|
58
|
+
<div slot="popup" class="popup-inner" role="none" on:click|stopPropagation>
|
|
60
59
|
<div role="group" aria-label={$_('_sui.calendar.year')}>
|
|
61
60
|
<div class="header">
|
|
62
61
|
<Button
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/** @typedef {typeof __propDef.events} CalendarEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} CalendarSlots */
|
|
4
4
|
/** A calendar (date picker) widget. */
|
|
5
|
-
export default class Calendar extends
|
|
5
|
+
export default class Calendar extends SvelteComponent<{
|
|
6
6
|
value?: string;
|
|
7
7
|
}, {
|
|
8
8
|
click: MouseEvent;
|
|
@@ -13,7 +13,7 @@ export default class Calendar extends SvelteComponentTyped<{
|
|
|
13
13
|
export type CalendarProps = typeof __propDef.props;
|
|
14
14
|
export type CalendarEvents = typeof __propDef.events;
|
|
15
15
|
export type CalendarSlots = typeof __propDef.slots;
|
|
16
|
-
import {
|
|
16
|
+
import { SvelteComponent } from "svelte";
|
|
17
17
|
declare const __propDef: {
|
|
18
18
|
props: {
|
|
19
19
|
value?: string | null;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/** @typedef {typeof __propDef.events} CheckboxGroupEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} CheckboxGroupSlots */
|
|
4
4
|
/** The layout container of `<Checkbox>`es. */
|
|
5
|
-
export default class CheckboxGroup extends
|
|
5
|
+
export default class CheckboxGroup extends SvelteComponent<{
|
|
6
6
|
[x: string]: any;
|
|
7
7
|
class?: string;
|
|
8
8
|
orientation?: "vertical" | "horizontal";
|
|
@@ -16,7 +16,7 @@ export default class CheckboxGroup extends SvelteComponentTyped<{
|
|
|
16
16
|
export type CheckboxGroupProps = typeof __propDef.props;
|
|
17
17
|
export type CheckboxGroupEvents = typeof __propDef.events;
|
|
18
18
|
export type CheckboxGroupSlots = typeof __propDef.slots;
|
|
19
|
-
import {
|
|
19
|
+
import { SvelteComponent } from "svelte";
|
|
20
20
|
declare const __propDef: {
|
|
21
21
|
props: {
|
|
22
22
|
[x: string]: any;
|
|
@@ -47,12 +47,13 @@
|
|
|
47
47
|
<input type="hidden" {name} {value} />
|
|
48
48
|
{/if}
|
|
49
49
|
|
|
50
|
-
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
51
50
|
<span
|
|
52
51
|
class="sui checkbox {className}"
|
|
53
52
|
class:checked
|
|
54
53
|
class:indeterminate
|
|
55
54
|
class:disabled
|
|
55
|
+
role="none"
|
|
56
|
+
{...$$restProps}
|
|
56
57
|
on:click|preventDefault|stopPropagation={(event) => {
|
|
57
58
|
if (!(/** @type {HTMLElement} */ (event.target).matches('button'))) {
|
|
58
59
|
buttonComponent.element.click();
|
|
@@ -7,12 +7,13 @@
|
|
|
7
7
|
* @see https://w3c.github.io/aria/#checkbox
|
|
8
8
|
* @see https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/
|
|
9
9
|
*/
|
|
10
|
-
export default class Checkbox extends
|
|
10
|
+
export default class Checkbox extends SvelteComponent<{
|
|
11
|
+
[x: string]: any;
|
|
12
|
+
class?: string;
|
|
13
|
+
name?: string;
|
|
11
14
|
label?: string;
|
|
12
15
|
disabled?: boolean;
|
|
13
|
-
name?: string;
|
|
14
16
|
value?: string;
|
|
15
|
-
class?: string;
|
|
16
17
|
checked?: string | boolean;
|
|
17
18
|
indeterminate?: boolean;
|
|
18
19
|
}, {
|
|
@@ -26,14 +27,15 @@ export default class Checkbox extends SvelteComponentTyped<{
|
|
|
26
27
|
export type CheckboxProps = typeof __propDef.props;
|
|
27
28
|
export type CheckboxEvents = typeof __propDef.events;
|
|
28
29
|
export type CheckboxSlots = typeof __propDef.slots;
|
|
29
|
-
import {
|
|
30
|
+
import { SvelteComponent } from "svelte";
|
|
30
31
|
declare const __propDef: {
|
|
31
32
|
props: {
|
|
33
|
+
[x: string]: any;
|
|
34
|
+
class?: string;
|
|
35
|
+
name?: string;
|
|
32
36
|
label?: string | null;
|
|
33
37
|
disabled?: boolean;
|
|
34
|
-
name?: string;
|
|
35
38
|
value?: string | null;
|
|
36
|
-
class?: string;
|
|
37
39
|
checked?: (boolean | string | undefined);
|
|
38
40
|
indeterminate?: boolean;
|
|
39
41
|
};
|
|
@@ -126,11 +126,12 @@
|
|
|
126
126
|
});
|
|
127
127
|
</script>
|
|
128
128
|
|
|
129
|
-
<!-- svelte-ignore a11y-
|
|
129
|
+
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
|
|
130
130
|
<dialog
|
|
131
131
|
bind:this={dialog}
|
|
132
132
|
class="sui dialog {className} {size}"
|
|
133
133
|
class:open={showDialog}
|
|
134
|
+
{...$$restProps}
|
|
134
135
|
on:click={({ target }) => {
|
|
135
136
|
if (closeOnBackdropClick && /** @type {HTMLElement?} */ (target)?.matches('dialog')) {
|
|
136
137
|
dialog.returnValue = 'cancel';
|
|
@@ -6,10 +6,11 @@
|
|
|
6
6
|
* @see https://w3c.github.io/aria/#dialog
|
|
7
7
|
* @see https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/
|
|
8
8
|
*/
|
|
9
|
-
export default class Dialog extends
|
|
9
|
+
export default class Dialog extends SvelteComponent<{
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
class?: string;
|
|
10
12
|
title?: string;
|
|
11
13
|
open?: boolean;
|
|
12
|
-
class?: string;
|
|
13
14
|
size?: "small" | "medium" | "large" | "x-large";
|
|
14
15
|
modal?: boolean;
|
|
15
16
|
showCancel?: boolean;
|
|
@@ -38,12 +39,13 @@ export default class Dialog extends SvelteComponentTyped<{
|
|
|
38
39
|
export type DialogProps = typeof __propDef.props;
|
|
39
40
|
export type DialogEvents = typeof __propDef.events;
|
|
40
41
|
export type DialogSlots = typeof __propDef.slots;
|
|
41
|
-
import {
|
|
42
|
+
import { SvelteComponent } from "svelte";
|
|
42
43
|
declare const __propDef: {
|
|
43
44
|
props: {
|
|
45
|
+
[x: string]: any;
|
|
46
|
+
class?: string;
|
|
44
47
|
title?: string;
|
|
45
48
|
open?: boolean;
|
|
46
|
-
class?: string;
|
|
47
49
|
size?: ('small' | 'medium' | 'large' | 'x-large');
|
|
48
50
|
modal?: boolean;
|
|
49
51
|
showCancel?: boolean;
|
|
@@ -24,7 +24,13 @@
|
|
|
24
24
|
const id = getRandomId('disclosure');
|
|
25
25
|
</script>
|
|
26
26
|
|
|
27
|
-
<div
|
|
27
|
+
<div
|
|
28
|
+
class="sui disclosure {className}"
|
|
29
|
+
{id}
|
|
30
|
+
role="group"
|
|
31
|
+
aria-labelledby="{id}-header"
|
|
32
|
+
{...$$restProps}
|
|
33
|
+
>
|
|
28
34
|
<Button
|
|
29
35
|
class="header"
|
|
30
36
|
id="{id}-header"
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details
|
|
7
7
|
* @see https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/
|
|
8
8
|
*/
|
|
9
|
-
export default class Disclosure extends
|
|
10
|
-
|
|
9
|
+
export default class Disclosure extends SvelteComponent<{
|
|
10
|
+
[x: string]: any;
|
|
11
11
|
class?: string;
|
|
12
|
+
label?: string;
|
|
12
13
|
expanded?: boolean;
|
|
13
14
|
}, {
|
|
14
15
|
[evt: string]: CustomEvent<any>;
|
|
@@ -19,11 +20,12 @@ export default class Disclosure extends SvelteComponentTyped<{
|
|
|
19
20
|
export type DisclosureProps = typeof __propDef.props;
|
|
20
21
|
export type DisclosureEvents = typeof __propDef.events;
|
|
21
22
|
export type DisclosureSlots = typeof __propDef.slots;
|
|
22
|
-
import {
|
|
23
|
+
import { SvelteComponent } from "svelte";
|
|
23
24
|
declare const __propDef: {
|
|
24
25
|
props: {
|
|
25
|
-
|
|
26
|
+
[x: string]: any;
|
|
26
27
|
class?: string;
|
|
28
|
+
label?: string;
|
|
27
29
|
expanded?: boolean;
|
|
28
30
|
};
|
|
29
31
|
events: {
|
|
@@ -16,7 +16,12 @@
|
|
|
16
16
|
export { className as class };
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
|
-
<div
|
|
19
|
+
<div
|
|
20
|
+
role="separator"
|
|
21
|
+
class="sui divider {className}"
|
|
22
|
+
aria-orientation={orientation}
|
|
23
|
+
{...$$restProps}
|
|
24
|
+
/>
|
|
20
25
|
|
|
21
26
|
<style>.divider {
|
|
22
27
|
flex: none;
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* A content divider with a visible vertical/horizontal line.
|
|
6
6
|
* @see https://w3c.github.io/aria/#separator
|
|
7
7
|
*/
|
|
8
|
-
export default class Divider extends
|
|
8
|
+
export default class Divider extends SvelteComponent<{
|
|
9
|
+
[x: string]: any;
|
|
9
10
|
class?: string;
|
|
10
11
|
orientation?: "vertical" | "horizontal";
|
|
11
12
|
}, {
|
|
@@ -15,9 +16,10 @@ export default class Divider extends SvelteComponentTyped<{
|
|
|
15
16
|
export type DividerProps = typeof __propDef.props;
|
|
16
17
|
export type DividerEvents = typeof __propDef.events;
|
|
17
18
|
export type DividerSlots = typeof __propDef.slots;
|
|
18
|
-
import {
|
|
19
|
+
import { SvelteComponent } from "svelte";
|
|
19
20
|
declare const __propDef: {
|
|
20
21
|
props: {
|
|
22
|
+
[x: string]: any;
|
|
21
23
|
class?: string;
|
|
22
24
|
orientation?: ('horizontal' | 'vertical');
|
|
23
25
|
};
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
/** @typedef {typeof __propDef.events} SpacerEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} SpacerSlots */
|
|
4
4
|
/** A content divider with no line. It can be flexible. */
|
|
5
|
-
export default class Spacer extends
|
|
5
|
+
export default class Spacer extends SvelteComponent<{
|
|
6
|
+
[x: string]: any;
|
|
6
7
|
class?: string;
|
|
7
8
|
flex?: boolean;
|
|
8
9
|
}, {
|
|
@@ -12,9 +13,10 @@ export default class Spacer extends SvelteComponentTyped<{
|
|
|
12
13
|
export type SpacerProps = typeof __propDef.props;
|
|
13
14
|
export type SpacerEvents = typeof __propDef.events;
|
|
14
15
|
export type SpacerSlots = typeof __propDef.slots;
|
|
15
|
-
import {
|
|
16
|
+
import { SvelteComponent } from "svelte";
|
|
16
17
|
declare const __propDef: {
|
|
17
18
|
props: {
|
|
19
|
+
[x: string]: any;
|
|
18
20
|
class?: string;
|
|
19
21
|
flex?: boolean;
|
|
20
22
|
};
|
|
@@ -128,11 +128,12 @@
|
|
|
128
128
|
});
|
|
129
129
|
</script>
|
|
130
130
|
|
|
131
|
-
<!-- svelte-ignore a11y-
|
|
131
|
+
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
|
|
132
132
|
<dialog
|
|
133
133
|
bind:this={dialog}
|
|
134
134
|
class="sui dialog {className} {size} {position} {orientation}"
|
|
135
135
|
class:open={showDialog}
|
|
136
|
+
{...$$restProps}
|
|
136
137
|
on:click={({ target }) => {
|
|
137
138
|
if (closeOnBackdropClick && /** @type {HTMLElement?} */ (target)?.matches('dialog')) {
|
|
138
139
|
dialog.returnValue = 'cancel';
|
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
* @see https://w3c.github.io/aria/#dialog
|
|
7
7
|
* @see https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/
|
|
8
8
|
*/
|
|
9
|
-
export default class Drawer extends
|
|
9
|
+
export default class Drawer extends SvelteComponent<{
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
class?: string;
|
|
10
12
|
title?: string;
|
|
11
13
|
position?: "top" | "right" | "bottom" | "left";
|
|
12
14
|
open?: boolean;
|
|
13
|
-
class?: string;
|
|
14
15
|
size?: "small" | "medium" | "large" | "x-large";
|
|
15
16
|
showClose?: false | "inside" | "outside";
|
|
16
17
|
closeOnBackdropClick?: boolean;
|
|
@@ -31,13 +32,14 @@ export default class Drawer extends SvelteComponentTyped<{
|
|
|
31
32
|
export type DrawerProps = typeof __propDef.props;
|
|
32
33
|
export type DrawerEvents = typeof __propDef.events;
|
|
33
34
|
export type DrawerSlots = typeof __propDef.slots;
|
|
34
|
-
import {
|
|
35
|
+
import { SvelteComponent } from "svelte";
|
|
35
36
|
declare const __propDef: {
|
|
36
37
|
props: {
|
|
38
|
+
[x: string]: any;
|
|
39
|
+
class?: string;
|
|
37
40
|
title?: string;
|
|
38
41
|
position?: ('top' | 'right' | 'bottom' | 'left');
|
|
39
42
|
open?: boolean;
|
|
40
|
-
class?: string;
|
|
41
43
|
size?: ('small' | 'medium' | 'large' | 'x-large');
|
|
42
44
|
showClose?: ('inside' | 'outside' | false);
|
|
43
45
|
closeOnBackdropClick?: boolean;
|
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
* A Material Symbols icon.
|
|
6
6
|
* @see https://developers.google.com/fonts/docs/material_symbols
|
|
7
7
|
*/
|
|
8
|
-
export default class Icon extends
|
|
9
|
-
|
|
10
|
-
name?: string;
|
|
8
|
+
export default class Icon extends SvelteComponent<{
|
|
9
|
+
[x: string]: any;
|
|
11
10
|
class?: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
label?: string;
|
|
12
13
|
}, {
|
|
13
14
|
[evt: string]: CustomEvent<any>;
|
|
14
15
|
}, {}> {
|
|
@@ -16,12 +17,13 @@ export default class Icon extends SvelteComponentTyped<{
|
|
|
16
17
|
export type IconProps = typeof __propDef.props;
|
|
17
18
|
export type IconEvents = typeof __propDef.events;
|
|
18
19
|
export type IconSlots = typeof __propDef.slots;
|
|
19
|
-
import {
|
|
20
|
+
import { SvelteComponent } from "svelte";
|
|
20
21
|
declare const __propDef: {
|
|
21
22
|
props: {
|
|
22
|
-
|
|
23
|
-
name?: string;
|
|
23
|
+
[x: string]: any;
|
|
24
24
|
class?: string;
|
|
25
|
+
name?: string;
|
|
26
|
+
label?: string;
|
|
25
27
|
};
|
|
26
28
|
events: {
|
|
27
29
|
[evt: string]: CustomEvent<any>;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @see https://w3c.github.io/aria/#listbox
|
|
8
8
|
* @see https://www.w3.org/WAI/ARIA/apg/patterns/listbox/
|
|
9
9
|
*/
|
|
10
|
-
export default class Listbox extends
|
|
10
|
+
export default class Listbox extends SvelteComponent<{
|
|
11
11
|
[x: string]: any;
|
|
12
12
|
class?: string;
|
|
13
13
|
element?: HTMLElement;
|
|
@@ -33,7 +33,7 @@ export default class Listbox extends SvelteComponentTyped<{
|
|
|
33
33
|
export type ListboxProps = typeof __propDef.props;
|
|
34
34
|
export type ListboxEvents = typeof __propDef.events;
|
|
35
35
|
export type ListboxSlots = typeof __propDef.slots;
|
|
36
|
-
import {
|
|
36
|
+
import { SvelteComponent } from "svelte";
|
|
37
37
|
declare const __propDef: {
|
|
38
38
|
props: {
|
|
39
39
|
[x: string]: any;
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
* @see https://w3c.github.io/aria/#listbox
|
|
9
9
|
* @see https://www.w3.org/WAI/ARIA/apg/patterns/listbox/examples/listbox-grouped/
|
|
10
10
|
*/
|
|
11
|
-
export default class OptionGroup extends
|
|
11
|
+
export default class OptionGroup extends SvelteComponent<{
|
|
12
12
|
[x: string]: any;
|
|
13
|
-
label?: string;
|
|
14
13
|
class?: string;
|
|
14
|
+
label?: string;
|
|
15
15
|
}, {
|
|
16
16
|
[evt: string]: CustomEvent<any>;
|
|
17
17
|
}, {
|
|
@@ -21,12 +21,12 @@ export default class OptionGroup extends SvelteComponentTyped<{
|
|
|
21
21
|
export type OptionGroupProps = typeof __propDef.props;
|
|
22
22
|
export type OptionGroupEvents = typeof __propDef.events;
|
|
23
23
|
export type OptionGroupSlots = typeof __propDef.slots;
|
|
24
|
-
import {
|
|
24
|
+
import { SvelteComponent } from "svelte";
|
|
25
25
|
declare const __propDef: {
|
|
26
26
|
props: {
|
|
27
27
|
[x: string]: any;
|
|
28
|
-
label?: string;
|
|
29
28
|
class?: string;
|
|
29
|
+
label?: string;
|
|
30
30
|
};
|
|
31
31
|
events: {
|
|
32
32
|
[evt: string]: CustomEvent<any>;
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option
|
|
7
7
|
* @see https://w3c.github.io/aria/#option
|
|
8
8
|
*/
|
|
9
|
-
export default class Option extends
|
|
9
|
+
export default class Option extends SvelteComponent<{
|
|
10
10
|
[x: string]: any;
|
|
11
|
+
class?: string;
|
|
11
12
|
label?: string;
|
|
12
13
|
value?: any;
|
|
13
|
-
class?: string;
|
|
14
14
|
selected?: boolean;
|
|
15
15
|
}, {
|
|
16
16
|
click: MouseEvent;
|
|
@@ -33,13 +33,13 @@ export default class Option extends SvelteComponentTyped<{
|
|
|
33
33
|
export type OptionProps = typeof __propDef.props;
|
|
34
34
|
export type OptionEvents = typeof __propDef.events;
|
|
35
35
|
export type OptionSlots = typeof __propDef.slots;
|
|
36
|
-
import {
|
|
36
|
+
import { SvelteComponent } from "svelte";
|
|
37
37
|
declare const __propDef: {
|
|
38
38
|
props: {
|
|
39
39
|
[x: string]: any;
|
|
40
|
+
class?: string;
|
|
40
41
|
label?: string;
|
|
41
42
|
value?: any;
|
|
42
|
-
class?: string;
|
|
43
43
|
selected?: boolean;
|
|
44
44
|
};
|
|
45
45
|
events: {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* A button to open a `<Menu>` widget.
|
|
6
6
|
* @see https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/
|
|
7
7
|
*/
|
|
8
|
-
export default class MenuButton extends
|
|
8
|
+
export default class MenuButton extends SvelteComponent<{
|
|
9
9
|
[x: string]: any;
|
|
10
10
|
class?: string;
|
|
11
11
|
popupPosition?: PopupPosition;
|
|
@@ -25,7 +25,7 @@ export default class MenuButton extends SvelteComponentTyped<{
|
|
|
25
25
|
export type MenuButtonProps = typeof __propDef.props;
|
|
26
26
|
export type MenuButtonEvents = typeof __propDef.events;
|
|
27
27
|
export type MenuButtonSlots = typeof __propDef.slots;
|
|
28
|
-
import {
|
|
28
|
+
import { SvelteComponent } from "svelte";
|
|
29
29
|
declare const __propDef: {
|
|
30
30
|
props: {
|
|
31
31
|
[x: string]: any;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* A menu item widget with a checkbox.
|
|
6
6
|
* @see https://w3c.github.io/aria/#menuitemcheckbox
|
|
7
7
|
*/
|
|
8
|
-
export default class MenuItemCheckbox extends
|
|
8
|
+
export default class MenuItemCheckbox extends SvelteComponent<{
|
|
9
9
|
[x: string]: any;
|
|
10
10
|
class?: string;
|
|
11
11
|
}, {
|
|
@@ -19,7 +19,7 @@ export default class MenuItemCheckbox extends SvelteComponentTyped<{
|
|
|
19
19
|
export type MenuItemCheckboxProps = typeof __propDef.props;
|
|
20
20
|
export type MenuItemCheckboxEvents = typeof __propDef.events;
|
|
21
21
|
export type MenuItemCheckboxSlots = typeof __propDef.slots;
|
|
22
|
-
import {
|
|
22
|
+
import { SvelteComponent } from "svelte";
|
|
23
23
|
declare const __propDef: {
|
|
24
24
|
props: {
|
|
25
25
|
[x: string]: any;
|