@sveltia/ui 0.1.1 → 0.1.3
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/composite/calendar.svelte +1 -0
- package/package/components/composite/calendar.svelte.d.ts +1 -8
- package/package/components/composite/checkbox-group.svelte.d.ts +1 -11
- package/package/components/composite/combobox.svelte +14 -1
- package/package/components/composite/combobox.svelte.d.ts +1 -16
- package/package/components/composite/disclosure.svelte.d.ts +1 -10
- package/package/components/composite/grid.svelte.d.ts +1 -10
- package/package/components/composite/listbox.svelte.d.ts +7 -20
- package/package/components/composite/menu-item-group.svelte.d.ts +1 -11
- package/package/components/composite/menu.svelte.d.ts +5 -14
- package/package/components/composite/radio-button-group.svelte +1 -0
- package/package/components/composite/radio-button-group.svelte.d.ts +1 -10
- package/package/components/composite/select-button-group.svelte +1 -0
- package/package/components/composite/select-button-group.svelte.d.ts +1 -14
- package/package/components/composite/select.svelte.d.ts +2 -14
- package/package/components/composite/tab-list.svelte +4 -4
- package/package/components/composite/tab-list.svelte.d.ts +9 -22
- package/package/components/core/button.svelte +7 -7
- package/package/components/core/button.svelte.d.ts +25 -55
- package/package/components/core/checkbox.svelte.d.ts +1 -14
- package/package/components/core/dialog.svelte.d.ts +1 -29
- package/package/components/core/grid-cell.svelte.d.ts +1 -9
- package/package/components/core/group.svelte.d.ts +1 -11
- package/package/components/core/icon.svelte.d.ts +1 -8
- package/package/components/core/menu-button.svelte.d.ts +1 -12
- package/package/components/core/menu-item-checkbox.svelte.d.ts +2 -12
- package/package/components/core/menu-item-radio.svelte.d.ts +2 -12
- package/package/components/core/menu-item.svelte.d.ts +2 -17
- package/package/components/core/number-input.svelte.d.ts +3 -17
- package/package/components/core/option.svelte.d.ts +6 -21
- package/package/components/core/password-input.svelte.d.ts +4 -15
- package/package/components/core/radio-button.svelte.d.ts +1 -11
- package/package/components/core/row-group.svelte.d.ts +1 -9
- package/package/components/core/row.svelte.d.ts +1 -11
- package/package/components/core/search-bar.svelte.d.ts +11 -25
- package/package/components/core/select-button.svelte.d.ts +2 -13
- package/package/components/core/separator.svelte.d.ts +1 -7
- package/package/components/core/slider.svelte +270 -0
- package/package/components/core/slider.svelte.d.ts +35 -0
- package/package/components/core/spacer.svelte.d.ts +1 -7
- package/package/components/core/switch.svelte.d.ts +1 -11
- package/package/components/core/tab-panel.svelte.d.ts +1 -9
- package/package/components/core/tab.svelte.d.ts +1 -9
- package/package/components/core/text-area.svelte.d.ts +11 -25
- package/package/components/core/text-input.svelte.d.ts +15 -33
- package/package/components/core/toolbar.svelte.d.ts +1 -10
- package/package/components/editor/markdown.svelte.d.ts +1 -7
- package/package/components/helpers/popup.d.ts +2 -7
- package/package/components/helpers/popup.js +1 -1
- package/package/components/util/app-shell.svelte.d.ts +1 -11
- package/package/components/util/popup.svelte +24 -16
- package/package/components/util/popup.svelte.d.ts +9 -18
- package/package/components/util/portal.svelte.d.ts +1 -8
- package/package/index.d.ts +1 -0
- package/package/index.js +1 -0
- package/package.json +26 -18
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
/** @typedef {typeof __propDef.props} CalendarProps */
|
|
2
2
|
/** @typedef {typeof __propDef.events} CalendarEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} CalendarSlots */
|
|
4
|
-
export default class Calendar
|
|
5
|
-
value?: string;
|
|
6
|
-
}, {
|
|
7
|
-
click: MouseEvent;
|
|
8
|
-
} & {
|
|
9
|
-
[evt: string]: CustomEvent<any>;
|
|
10
|
-
}, {}> {
|
|
4
|
+
export default class Calendar {
|
|
11
5
|
}
|
|
12
6
|
export type CalendarProps = typeof __propDef.props;
|
|
13
7
|
export type CalendarEvents = typeof __propDef.events;
|
|
14
8
|
export type CalendarSlots = typeof __propDef.slots;
|
|
15
|
-
import { SvelteComponentTyped } from "svelte";
|
|
16
9
|
declare const __propDef: {
|
|
17
10
|
props: {
|
|
18
11
|
value?: (string | undefined);
|
|
@@ -2,21 +2,11 @@
|
|
|
2
2
|
/** @typedef {typeof __propDef.events} CheckboxGroupEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} CheckboxGroupSlots */
|
|
4
4
|
/** The container of `<Checkbox>`es. */
|
|
5
|
-
export default class CheckboxGroup
|
|
6
|
-
[x: string]: any;
|
|
7
|
-
class?: string;
|
|
8
|
-
orientation?: "vertical" | "horizontal";
|
|
9
|
-
ariaLabel?: string;
|
|
10
|
-
}, {
|
|
11
|
-
[evt: string]: CustomEvent<any>;
|
|
12
|
-
}, {
|
|
13
|
-
default: {};
|
|
14
|
-
}> {
|
|
5
|
+
export default class CheckboxGroup {
|
|
15
6
|
}
|
|
16
7
|
export type CheckboxGroupProps = typeof __propDef.props;
|
|
17
8
|
export type CheckboxGroupEvents = typeof __propDef.events;
|
|
18
9
|
export type CheckboxGroupSlots = typeof __propDef.slots;
|
|
19
|
-
import { SvelteComponentTyped } from "svelte";
|
|
20
10
|
declare const __propDef: {
|
|
21
11
|
props: {
|
|
22
12
|
[x: string]: any;
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import { writable } from 'svelte/store';
|
|
10
10
|
import Button from '../core/button.svelte';
|
|
11
11
|
import TextInput from '../core/text-input.svelte';
|
|
12
|
+
import { getRandomId } from '../helpers/util';
|
|
12
13
|
import Popup from '../util/popup.svelte';
|
|
13
14
|
import Listbox from './listbox.svelte';
|
|
14
15
|
|
|
@@ -42,6 +43,7 @@
|
|
|
42
43
|
export let value = undefined;
|
|
43
44
|
|
|
44
45
|
const dispatch = createEventDispatcher();
|
|
46
|
+
const id = getRandomId('combobox');
|
|
45
47
|
let comboboxElement;
|
|
46
48
|
/** @type {(TextInput| undefined)} */
|
|
47
49
|
let inputComponent;
|
|
@@ -65,10 +67,13 @@
|
|
|
65
67
|
|
|
66
68
|
<div class="sui combobox {className}">
|
|
67
69
|
{#if readOnly}
|
|
68
|
-
<!-- svelte-ignore a11y-role-has-required-aria-props -->
|
|
69
70
|
<div
|
|
70
71
|
class:selected={value !== undefined}
|
|
71
72
|
role="combobox"
|
|
73
|
+
{id}
|
|
74
|
+
tabindex="0"
|
|
75
|
+
aria-controls="{id}-popup"
|
|
76
|
+
aria-expanded={$isPopupOpen}
|
|
72
77
|
aria-disabled={disabled ? true : undefined}
|
|
73
78
|
aria-haspopup="listbox"
|
|
74
79
|
aria-activedescendant="selected-option"
|
|
@@ -80,8 +85,12 @@
|
|
|
80
85
|
{:else}
|
|
81
86
|
<TextInput
|
|
82
87
|
role="combobox"
|
|
88
|
+
{id}
|
|
83
89
|
{value}
|
|
84
90
|
{disabled}
|
|
91
|
+
aria-controls="{id}-popup"
|
|
92
|
+
aria-expanded={$isPopupOpen}
|
|
93
|
+
aria-disabled={disabled ? true : undefined}
|
|
85
94
|
aria-haspopup="listbox"
|
|
86
95
|
aria-activedescendant="selected-option"
|
|
87
96
|
{...$$restProps}
|
|
@@ -90,6 +99,9 @@
|
|
|
90
99
|
{/if}
|
|
91
100
|
<Button
|
|
92
101
|
{disabled}
|
|
102
|
+
aria-controls="{id}-popup"
|
|
103
|
+
aria-expanded={$isPopupOpen}
|
|
104
|
+
aria-disabled={disabled ? true : undefined}
|
|
93
105
|
class="ternary iconic"
|
|
94
106
|
iconName="expand_more"
|
|
95
107
|
iconLabel={$isPopupOpen ? $_('sui._.collapse') : $_('sui._.expand')}
|
|
@@ -103,6 +115,7 @@
|
|
|
103
115
|
/>
|
|
104
116
|
</div>
|
|
105
117
|
<Popup
|
|
118
|
+
id="{id}-popup"
|
|
106
119
|
anchor={comboboxElement || inputComponent?.element}
|
|
107
120
|
{position}
|
|
108
121
|
bind:open={isPopupOpen}
|
|
@@ -5,26 +5,11 @@
|
|
|
5
5
|
* @see https://w3c.github.io/aria/#combobox
|
|
6
6
|
* @see https://w3c.github.io/aria-practices/#combobox
|
|
7
7
|
*/
|
|
8
|
-
export default class Combobox
|
|
9
|
-
[x: string]: any;
|
|
10
|
-
class?: string;
|
|
11
|
-
label?: string;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
value?: string;
|
|
14
|
-
position?: any;
|
|
15
|
-
readOnly?: boolean;
|
|
16
|
-
}, {
|
|
17
|
-
change: CustomEvent<any>;
|
|
18
|
-
} & {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
}, {
|
|
21
|
-
default: {};
|
|
22
|
-
}> {
|
|
8
|
+
export default class Combobox {
|
|
23
9
|
}
|
|
24
10
|
export type ComboboxProps = typeof __propDef.props;
|
|
25
11
|
export type ComboboxEvents = typeof __propDef.events;
|
|
26
12
|
export type ComboboxSlots = typeof __propDef.slots;
|
|
27
|
-
import { SvelteComponentTyped } from "svelte";
|
|
28
13
|
declare const __propDef: {
|
|
29
14
|
props: {
|
|
30
15
|
[x: string]: any;
|
|
@@ -5,20 +5,11 @@
|
|
|
5
5
|
* @see https://w3c.github.io/aria-practices/#disclosure
|
|
6
6
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details
|
|
7
7
|
*/
|
|
8
|
-
export default class Disclosure
|
|
9
|
-
class?: string;
|
|
10
|
-
label?: string;
|
|
11
|
-
expanded?: boolean;
|
|
12
|
-
}, {
|
|
13
|
-
[evt: string]: CustomEvent<any>;
|
|
14
|
-
}, {
|
|
15
|
-
default: {};
|
|
16
|
-
}> {
|
|
8
|
+
export default class Disclosure {
|
|
17
9
|
}
|
|
18
10
|
export type DisclosureProps = typeof __propDef.props;
|
|
19
11
|
export type DisclosureEvents = typeof __propDef.events;
|
|
20
12
|
export type DisclosureSlots = typeof __propDef.slots;
|
|
21
|
-
import { SvelteComponentTyped } from "svelte";
|
|
22
13
|
declare const __propDef: {
|
|
23
14
|
props: {
|
|
24
15
|
class?: string;
|
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
/** @typedef {typeof __propDef.props} GridProps */
|
|
2
2
|
/** @typedef {typeof __propDef.events} GridEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} GridSlots */
|
|
4
|
-
export default class Grid
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
class?: string;
|
|
7
|
-
element?: HTMLElement;
|
|
8
|
-
}, {
|
|
9
|
-
[evt: string]: CustomEvent<any>;
|
|
10
|
-
}, {
|
|
11
|
-
default: {};
|
|
12
|
-
}> {
|
|
4
|
+
export default class Grid {
|
|
13
5
|
}
|
|
14
6
|
export type GridProps = typeof __propDef.props;
|
|
15
7
|
export type GridEvents = typeof __propDef.events;
|
|
16
8
|
export type GridSlots = typeof __propDef.slots;
|
|
17
|
-
import { SvelteComponentTyped } from "svelte";
|
|
18
9
|
declare const __propDef: {
|
|
19
10
|
props: {
|
|
20
11
|
[x: string]: any;
|
|
@@ -5,33 +5,20 @@
|
|
|
5
5
|
* @see https://w3c.github.io/aria/#listbox
|
|
6
6
|
* @see https://w3c.github.io/aria-practices/#Listbox
|
|
7
7
|
*/
|
|
8
|
-
export default class Listbox
|
|
9
|
-
[x: string]: any;
|
|
10
|
-
class?: string;
|
|
11
|
-
element?: HTMLElement;
|
|
12
|
-
multiple?: boolean;
|
|
13
|
-
}, {
|
|
14
|
-
click: MouseEvent;
|
|
15
|
-
select: Event;
|
|
16
|
-
} & {
|
|
17
|
-
[evt: string]: CustomEvent<any>;
|
|
18
|
-
}, {
|
|
19
|
-
default: {};
|
|
20
|
-
}> {
|
|
8
|
+
export default class Listbox {
|
|
21
9
|
/**accessor*/
|
|
22
|
-
set class(arg:
|
|
23
|
-
get class():
|
|
10
|
+
set class(arg: any);
|
|
11
|
+
get class(): any;
|
|
24
12
|
/**accessor*/
|
|
25
|
-
set element(arg:
|
|
26
|
-
get element():
|
|
13
|
+
set element(arg: any);
|
|
14
|
+
get element(): any;
|
|
27
15
|
/**accessor*/
|
|
28
|
-
set multiple(arg:
|
|
29
|
-
get multiple():
|
|
16
|
+
set multiple(arg: any);
|
|
17
|
+
get multiple(): any;
|
|
30
18
|
}
|
|
31
19
|
export type ListboxProps = typeof __propDef.props;
|
|
32
20
|
export type ListboxEvents = typeof __propDef.events;
|
|
33
21
|
export type ListboxSlots = typeof __propDef.slots;
|
|
34
|
-
import { SvelteComponentTyped } from "svelte";
|
|
35
22
|
declare const __propDef: {
|
|
36
23
|
props: {
|
|
37
24
|
[x: string]: any;
|
|
@@ -1,21 +1,11 @@
|
|
|
1
1
|
/** @typedef {typeof __propDef.props} MenuItemGroupProps */
|
|
2
2
|
/** @typedef {typeof __propDef.events} MenuItemGroupEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} MenuItemGroupSlots */
|
|
4
|
-
export default class MenuItemGroup
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
class?: string;
|
|
7
|
-
title?: string;
|
|
8
|
-
ariaLabel?: string;
|
|
9
|
-
}, {
|
|
10
|
-
[evt: string]: CustomEvent<any>;
|
|
11
|
-
}, {
|
|
12
|
-
default: {};
|
|
13
|
-
}> {
|
|
4
|
+
export default class MenuItemGroup {
|
|
14
5
|
}
|
|
15
6
|
export type MenuItemGroupProps = typeof __propDef.props;
|
|
16
7
|
export type MenuItemGroupEvents = typeof __propDef.events;
|
|
17
8
|
export type MenuItemGroupSlots = typeof __propDef.slots;
|
|
18
|
-
import { SvelteComponentTyped } from "svelte";
|
|
19
9
|
declare const __propDef: {
|
|
20
10
|
props: {
|
|
21
11
|
[x: string]: any;
|
|
@@ -5,26 +5,17 @@
|
|
|
5
5
|
* @see https://w3c.github.io/aria/#menu
|
|
6
6
|
* @see https://w3c.github.io/aria-practices/#menu
|
|
7
7
|
*/
|
|
8
|
-
export default class Menu
|
|
9
|
-
[x: string]: any;
|
|
10
|
-
class?: string;
|
|
11
|
-
element?: HTMLElement;
|
|
12
|
-
}, {
|
|
13
|
-
[evt: string]: CustomEvent<any>;
|
|
14
|
-
}, {
|
|
15
|
-
default: {};
|
|
16
|
-
}> {
|
|
8
|
+
export default class Menu {
|
|
17
9
|
/**accessor*/
|
|
18
|
-
set class(arg:
|
|
19
|
-
get class():
|
|
10
|
+
set class(arg: any);
|
|
11
|
+
get class(): any;
|
|
20
12
|
/**accessor*/
|
|
21
|
-
set element(arg:
|
|
22
|
-
get element():
|
|
13
|
+
set element(arg: any);
|
|
14
|
+
get element(): any;
|
|
23
15
|
}
|
|
24
16
|
export type MenuProps = typeof __propDef.props;
|
|
25
17
|
export type MenuEvents = typeof __propDef.events;
|
|
26
18
|
export type MenuSlots = typeof __propDef.slots;
|
|
27
|
-
import { SvelteComponentTyped } from "svelte";
|
|
28
19
|
declare const __propDef: {
|
|
29
20
|
props: {
|
|
30
21
|
[x: string]: any;
|
|
@@ -6,20 +6,11 @@
|
|
|
6
6
|
* @see https://w3c.github.io/aria/#radiogroup
|
|
7
7
|
* @see https://w3c.github.io/aria-practices/#radiobutton
|
|
8
8
|
*/
|
|
9
|
-
export default class RadioButtonGroup
|
|
10
|
-
class?: string;
|
|
11
|
-
element?: HTMLElement;
|
|
12
|
-
orientation?: "vertical" | "horizontal";
|
|
13
|
-
}, {
|
|
14
|
-
[evt: string]: CustomEvent<any>;
|
|
15
|
-
}, {
|
|
16
|
-
default: {};
|
|
17
|
-
}> {
|
|
9
|
+
export default class RadioButtonGroup {
|
|
18
10
|
}
|
|
19
11
|
export type RadioButtonGroupProps = typeof __propDef.props;
|
|
20
12
|
export type RadioButtonGroupEvents = typeof __propDef.events;
|
|
21
13
|
export type RadioButtonGroupSlots = typeof __propDef.slots;
|
|
22
|
-
import { SvelteComponentTyped } from "svelte";
|
|
23
14
|
declare const __propDef: {
|
|
24
15
|
props: {
|
|
25
16
|
class?: string;
|
|
@@ -6,24 +6,11 @@
|
|
|
6
6
|
* @see https://w3c.github.io/aria/#radiogroup
|
|
7
7
|
* @see https://w3c.github.io/aria-practices/#radiobutton
|
|
8
8
|
*/
|
|
9
|
-
export default class SelectButtonGroup
|
|
10
|
-
class?: string;
|
|
11
|
-
element?: HTMLElement;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
value?: string;
|
|
14
|
-
ariaLabel?: string;
|
|
15
|
-
}, {
|
|
16
|
-
change: CustomEvent<any>;
|
|
17
|
-
} & {
|
|
18
|
-
[evt: string]: CustomEvent<any>;
|
|
19
|
-
}, {
|
|
20
|
-
default: {};
|
|
21
|
-
}> {
|
|
9
|
+
export default class SelectButtonGroup {
|
|
22
10
|
}
|
|
23
11
|
export type SelectButtonGroupProps = typeof __propDef.props;
|
|
24
12
|
export type SelectButtonGroupEvents = typeof __propDef.events;
|
|
25
13
|
export type SelectButtonGroupSlots = typeof __propDef.slots;
|
|
26
|
-
import { SvelteComponentTyped } from "svelte";
|
|
27
14
|
declare const __propDef: {
|
|
28
15
|
props: {
|
|
29
16
|
class?: string;
|
|
@@ -2,23 +2,11 @@
|
|
|
2
2
|
/** @typedef {typeof __propDef.events} SelectEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} SelectSlots */
|
|
4
4
|
/** A read-only variant of `<Combobox>`. */
|
|
5
|
-
export default class Select
|
|
6
|
-
[x: string]: any;
|
|
7
|
-
class?: string;
|
|
8
|
-
label?: string;
|
|
9
|
-
value?: string;
|
|
10
|
-
}, {
|
|
11
|
-
change: CustomEvent<any>;
|
|
12
|
-
} & {
|
|
13
|
-
[evt: string]: CustomEvent<any>;
|
|
14
|
-
}, {
|
|
15
|
-
default: {};
|
|
16
|
-
}> {
|
|
5
|
+
export default class Select {
|
|
17
6
|
}
|
|
18
7
|
export type SelectProps = typeof __propDef.props;
|
|
19
8
|
export type SelectEvents = typeof __propDef.events;
|
|
20
9
|
export type SelectSlots = typeof __propDef.slots;
|
|
21
|
-
import { SvelteComponentTyped } from "svelte";
|
|
22
10
|
declare const __propDef: {
|
|
23
11
|
props: {
|
|
24
12
|
[x: string]: any;
|
|
@@ -27,7 +15,7 @@ declare const __propDef: {
|
|
|
27
15
|
value?: (string | undefined);
|
|
28
16
|
};
|
|
29
17
|
events: {
|
|
30
|
-
change:
|
|
18
|
+
change: any;
|
|
31
19
|
} & {
|
|
32
20
|
[evt: string]: CustomEvent<any>;
|
|
33
21
|
};
|
|
@@ -43,16 +43,16 @@
|
|
|
43
43
|
align-items: center;
|
|
44
44
|
border-color: var(--control-border-color);
|
|
45
45
|
}
|
|
46
|
-
.tab-list
|
|
46
|
+
.tab-list[aria-orientation=horizontal] {
|
|
47
47
|
gap: 16px;
|
|
48
48
|
margin: 0 0 32px;
|
|
49
49
|
border-width: 0 0 1px;
|
|
50
50
|
padding: 0 16px;
|
|
51
51
|
}
|
|
52
|
-
.tab-list
|
|
52
|
+
.tab-list[aria-orientation=horizontal] :global(button) {
|
|
53
53
|
border-width: 0 0 2px 0;
|
|
54
54
|
}
|
|
55
|
-
.tab-list
|
|
55
|
+
.tab-list[aria-orientation=vertical] {
|
|
56
56
|
gap: 8px;
|
|
57
57
|
flex-direction: column;
|
|
58
58
|
margin: 0 32px 0 0;
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
padding: 8px 0;
|
|
61
61
|
width: 240px;
|
|
62
62
|
}
|
|
63
|
-
.tab-list
|
|
63
|
+
.tab-list[aria-orientation=vertical] :global(button) {
|
|
64
64
|
border-width: 0 2px 0 0;
|
|
65
65
|
width: 100%;
|
|
66
66
|
}
|
|
@@ -5,36 +5,23 @@
|
|
|
5
5
|
* @see https://w3c.github.io/aria/#tablist
|
|
6
6
|
* @see https://w3c.github.io/aria-practices/#tabpanel
|
|
7
7
|
*/
|
|
8
|
-
export default class TabList
|
|
9
|
-
[x: string]: any;
|
|
10
|
-
class?: string;
|
|
11
|
-
name?: string;
|
|
12
|
-
element?: HTMLElement;
|
|
13
|
-
orientation?: "vertical" | "horizontal";
|
|
14
|
-
}, {
|
|
15
|
-
select: Event;
|
|
16
|
-
} & {
|
|
17
|
-
[evt: string]: CustomEvent<any>;
|
|
18
|
-
}, {
|
|
19
|
-
default: {};
|
|
20
|
-
}> {
|
|
8
|
+
export default class TabList {
|
|
21
9
|
/**accessor*/
|
|
22
|
-
set class(arg:
|
|
23
|
-
get class():
|
|
10
|
+
set class(arg: any);
|
|
11
|
+
get class(): any;
|
|
24
12
|
/**accessor*/
|
|
25
|
-
set element(arg:
|
|
26
|
-
get element():
|
|
13
|
+
set element(arg: any);
|
|
14
|
+
get element(): any;
|
|
27
15
|
/**accessor*/
|
|
28
|
-
set orientation(arg:
|
|
29
|
-
get orientation():
|
|
16
|
+
set orientation(arg: any);
|
|
17
|
+
get orientation(): any;
|
|
30
18
|
/**accessor*/
|
|
31
|
-
set name(arg:
|
|
32
|
-
get name():
|
|
19
|
+
set name(arg: any);
|
|
20
|
+
get name(): any;
|
|
33
21
|
}
|
|
34
22
|
export type TabListProps = typeof __propDef.props;
|
|
35
23
|
export type TabListEvents = typeof __propDef.events;
|
|
36
24
|
export type TabListSlots = typeof __propDef.slots;
|
|
37
|
-
import { SvelteComponentTyped } from "svelte";
|
|
38
25
|
declare const __propDef: {
|
|
39
26
|
props: {
|
|
40
27
|
[x: string]: any;
|
|
@@ -137,10 +137,10 @@ button > :global(*) {
|
|
|
137
137
|
button:global(:not(:disabled):focus-visible) {
|
|
138
138
|
z-index: 1;
|
|
139
139
|
}
|
|
140
|
-
button
|
|
140
|
+
button[hidden] {
|
|
141
141
|
display: none !important;
|
|
142
142
|
}
|
|
143
|
-
button
|
|
143
|
+
button[disabled] {
|
|
144
144
|
opacity: 0.4;
|
|
145
145
|
cursor: default;
|
|
146
146
|
pointer-events: none;
|
|
@@ -148,7 +148,7 @@ button:global([disabled]) {
|
|
|
148
148
|
button:global(.primary), button:global(.secondary), button:global(.ternary) {
|
|
149
149
|
justify-content: center;
|
|
150
150
|
border-radius: var(--button--medium--border-radius);
|
|
151
|
-
padding: 0 8px;
|
|
151
|
+
padding: var(--button--medium--padding, 0 8px);
|
|
152
152
|
height: var(--button--medium--height);
|
|
153
153
|
}
|
|
154
154
|
button:global(.primary) :global(.label:only-child), button:global(.secondary) :global(.label:only-child), button:global(.ternary) :global(.label:only-child) {
|
|
@@ -172,14 +172,14 @@ button:global(.secondary) {
|
|
|
172
172
|
color: var(--highlight-foreground-color);
|
|
173
173
|
background-color: var(--ternary-background-color);
|
|
174
174
|
}
|
|
175
|
-
button:global(.secondary)
|
|
175
|
+
button:global(.secondary)[aria-pressed=true] {
|
|
176
176
|
background-color: var(--primary-accent-color);
|
|
177
177
|
}
|
|
178
178
|
button:global(.ternary) {
|
|
179
179
|
color: var(--primary-foreground-color);
|
|
180
|
-
padding: 0 8px;
|
|
180
|
+
padding: var(--button--medium--padding, 0 8px);
|
|
181
181
|
}
|
|
182
|
-
button:global(.ternary)
|
|
182
|
+
button:global(.ternary)[aria-pressed=true] {
|
|
183
183
|
background-color: var(--highlight-background-color);
|
|
184
184
|
}
|
|
185
185
|
button:global(.danger) {
|
|
@@ -189,7 +189,7 @@ button:global(.large) {
|
|
|
189
189
|
height: var(--button--large--height);
|
|
190
190
|
}
|
|
191
191
|
button:global(.small) {
|
|
192
|
-
padding: 0
|
|
192
|
+
padding: var(--button--small--padding, 0 8px);
|
|
193
193
|
height: var(--button--small--height);
|
|
194
194
|
font-size: 12px;
|
|
195
195
|
}
|
|
@@ -5,77 +5,47 @@
|
|
|
5
5
|
* @see https://w3c.github.io/aria/#button
|
|
6
6
|
* @see https://w3c.github.io/aria-practices/#button
|
|
7
7
|
*/
|
|
8
|
-
export default class Button
|
|
9
|
-
[x: string]: any;
|
|
10
|
-
class?: string;
|
|
11
|
-
label?: string;
|
|
12
|
-
element?: HTMLButtonElement;
|
|
13
|
-
type?: "button" | "submit" | "reset";
|
|
14
|
-
role?: string;
|
|
15
|
-
size?: "small" | "medium" | "large";
|
|
16
|
-
hidden?: boolean;
|
|
17
|
-
disabled?: boolean;
|
|
18
|
-
pressed?: string | boolean;
|
|
19
|
-
iconName?: string;
|
|
20
|
-
iconLabel?: string;
|
|
21
|
-
iconPosition?: "start" | "end";
|
|
22
|
-
}, {
|
|
23
|
-
mouseenter: MouseEvent;
|
|
24
|
-
mouseleave: MouseEvent;
|
|
25
|
-
click: MouseEvent;
|
|
26
|
-
dragover: DragEvent;
|
|
27
|
-
dragleave: DragEvent;
|
|
28
|
-
dragend: DragEvent;
|
|
29
|
-
drop: DragEvent;
|
|
30
|
-
keydown: KeyboardEvent;
|
|
31
|
-
keyup: KeyboardEvent;
|
|
32
|
-
keypress: KeyboardEvent;
|
|
33
|
-
} & {
|
|
34
|
-
[evt: string]: CustomEvent<any>;
|
|
35
|
-
}, {
|
|
36
|
-
default: {};
|
|
37
|
-
}> {
|
|
8
|
+
export default class Button {
|
|
38
9
|
/**accessor*/
|
|
39
|
-
set class(arg:
|
|
40
|
-
get class():
|
|
10
|
+
set class(arg: any);
|
|
11
|
+
get class(): any;
|
|
41
12
|
/**accessor*/
|
|
42
|
-
set element(arg:
|
|
43
|
-
get element():
|
|
13
|
+
set element(arg: any);
|
|
14
|
+
get element(): any;
|
|
44
15
|
/**accessor*/
|
|
45
|
-
set type(arg:
|
|
46
|
-
get type():
|
|
16
|
+
set type(arg: any);
|
|
17
|
+
get type(): any;
|
|
47
18
|
/**accessor*/
|
|
48
|
-
set role(arg:
|
|
49
|
-
get role():
|
|
19
|
+
set role(arg: any);
|
|
20
|
+
get role(): any;
|
|
50
21
|
/**accessor*/
|
|
51
|
-
set size(arg:
|
|
52
|
-
get size():
|
|
22
|
+
set size(arg: any);
|
|
23
|
+
get size(): any;
|
|
53
24
|
/**accessor*/
|
|
54
|
-
set hidden(arg:
|
|
55
|
-
get hidden():
|
|
25
|
+
set hidden(arg: any);
|
|
26
|
+
get hidden(): any;
|
|
56
27
|
/**accessor*/
|
|
57
|
-
set disabled(arg:
|
|
58
|
-
get disabled():
|
|
28
|
+
set disabled(arg: any);
|
|
29
|
+
get disabled(): any;
|
|
59
30
|
/**accessor*/
|
|
60
|
-
set pressed(arg:
|
|
61
|
-
get pressed():
|
|
31
|
+
set pressed(arg: any);
|
|
32
|
+
get pressed(): any;
|
|
62
33
|
/**accessor*/
|
|
63
|
-
set label(arg:
|
|
64
|
-
get label():
|
|
34
|
+
set label(arg: any);
|
|
35
|
+
get label(): any;
|
|
65
36
|
/**accessor*/
|
|
66
|
-
set iconName(arg:
|
|
67
|
-
get iconName():
|
|
37
|
+
set iconName(arg: any);
|
|
38
|
+
get iconName(): any;
|
|
68
39
|
/**accessor*/
|
|
69
|
-
set iconLabel(arg:
|
|
70
|
-
get iconLabel():
|
|
40
|
+
set iconLabel(arg: any);
|
|
41
|
+
get iconLabel(): any;
|
|
71
42
|
/**accessor*/
|
|
72
|
-
set iconPosition(arg:
|
|
73
|
-
get iconPosition():
|
|
43
|
+
set iconPosition(arg: any);
|
|
44
|
+
get iconPosition(): any;
|
|
74
45
|
}
|
|
75
46
|
export type ButtonProps = typeof __propDef.props;
|
|
76
47
|
export type ButtonEvents = typeof __propDef.events;
|
|
77
48
|
export type ButtonSlots = typeof __propDef.slots;
|
|
78
|
-
import { SvelteComponentTyped } from "svelte";
|
|
79
49
|
declare const __propDef: {
|
|
80
50
|
props: {
|
|
81
51
|
[x: string]: any;
|
|
@@ -5,24 +5,11 @@
|
|
|
5
5
|
* @see https://w3c.github.io/aria/#checkbox
|
|
6
6
|
* @see https://w3c.github.io/aria-practices/#checkbox
|
|
7
7
|
*/
|
|
8
|
-
export default class Checkbox
|
|
9
|
-
class?: string;
|
|
10
|
-
name?: string;
|
|
11
|
-
value?: string;
|
|
12
|
-
checked?: string | boolean;
|
|
13
|
-
indeterminate?: boolean;
|
|
14
|
-
}, {
|
|
15
|
-
change: CustomEvent<any>;
|
|
16
|
-
} & {
|
|
17
|
-
[evt: string]: CustomEvent<any>;
|
|
18
|
-
}, {
|
|
19
|
-
default: {};
|
|
20
|
-
}> {
|
|
8
|
+
export default class Checkbox {
|
|
21
9
|
}
|
|
22
10
|
export type CheckboxProps = typeof __propDef.props;
|
|
23
11
|
export type CheckboxEvents = typeof __propDef.events;
|
|
24
12
|
export type CheckboxSlots = typeof __propDef.slots;
|
|
25
|
-
import { SvelteComponentTyped } from "svelte";
|
|
26
13
|
declare const __propDef: {
|
|
27
14
|
props: {
|
|
28
15
|
class?: string;
|