@sveltia/ui 0.10.6 → 0.10.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package/components/button/button-group.svelte +17 -0
- package/package/components/button/button-group.svelte.d.ts +29 -0
- package/package/components/button/button.svelte +3 -0
- package/package/components/button/button.svelte.d.ts +8 -2
- package/package/components/button/select-button-group.svelte.d.ts +2 -2
- package/package/components/button/select-button.svelte +1 -0
- package/package/components/button/select-button.svelte.d.ts +4 -2
- package/package/components/button/split-button.svelte.d.ts +2 -2
- package/package/components/checkbox/checkbox.svelte.d.ts +2 -2
- package/package/components/disclosure/disclosure.svelte.d.ts +2 -2
- package/package/components/divider/divider.svelte +4 -0
- package/package/components/grid/grid-row.svelte +3 -0
- package/package/components/grid/grid-row.svelte.d.ts +6 -0
- package/package/components/listbox/listbox.svelte.d.ts +2 -2
- package/package/components/listbox/option-group.svelte.d.ts +2 -2
- package/package/components/listbox/option.svelte +3 -0
- package/package/components/listbox/option.svelte.d.ts +8 -2
- 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 +2 -2
- package/package/components/menu/menu-item-radio.svelte.d.ts +2 -2
- package/package/components/menu/menu-item.svelte +2 -0
- package/package/components/menu/menu-item.svelte.d.ts +6 -2
- package/package/components/radio/radio-group.svelte.d.ts +2 -2
- package/package/components/radio/radio.svelte +2 -0
- package/package/components/radio/radio.svelte.d.ts +6 -2
- package/package/components/select/combobox.svelte +29 -5
- package/package/components/select/combobox.svelte.d.ts +2 -2
- package/package/components/select/select.svelte.d.ts +2 -2
- package/package/components/slider/slider.svelte.d.ts +2 -2
- package/package/components/switch/switch.svelte.d.ts +2 -2
- package/package/components/tabs/tab.svelte +2 -0
- package/package/components/tabs/tab.svelte.d.ts +4 -0
- package/package/components/text-field/markdown-editor.svelte.d.ts +2 -2
- package/package/components/text-field/number-input.svelte.d.ts +2 -2
- package/package/components/text-field/password-input.svelte.d.ts +2 -2
- package/package/components/text-field/search-bar.svelte.d.ts +2 -2
- package/package/components/text-field/text-area.svelte.d.ts +2 -2
- package/package/components/text-field/text-input.svelte.d.ts +2 -2
- package/package/components/toolbar/toolbar.svelte +16 -0
- package/package/components/util/app-shell.svelte +6 -1
- package/package/index.d.ts +1 -0
- package/package/index.js +1 -0
- package/package/services/events.js +8 -6
- package/package/services/group.js +5 -0
- package/package/styles/core.scss +5 -0
- package/package/styles/variables.scss +1 -1
- package/package.json +19 -11
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
/**
|
|
3
|
+
* The `class` attribute on the wrapper element.
|
|
4
|
+
* @type {string}
|
|
5
|
+
*/
|
|
6
|
+
let className = '';
|
|
7
|
+
export { className as class };
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<div role="group" class="sui button-group {className}" {...$$restProps}>
|
|
11
|
+
<slot />
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<style>.button-group {
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
}</style>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} ButtonGroupProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} ButtonGroupEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} ButtonGroupSlots */
|
|
4
|
+
export default class ButtonGroup extends SvelteComponent<{
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
class?: string | undefined;
|
|
7
|
+
}, {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
}, {
|
|
10
|
+
default: {};
|
|
11
|
+
}> {
|
|
12
|
+
}
|
|
13
|
+
export type ButtonGroupProps = typeof __propDef.props;
|
|
14
|
+
export type ButtonGroupEvents = typeof __propDef.events;
|
|
15
|
+
export type ButtonGroupSlots = typeof __propDef.slots;
|
|
16
|
+
import { SvelteComponent } from "svelte";
|
|
17
|
+
declare const __propDef: {
|
|
18
|
+
props: {
|
|
19
|
+
[x: string]: any;
|
|
20
|
+
class?: string | undefined;
|
|
21
|
+
};
|
|
22
|
+
events: {
|
|
23
|
+
[evt: string]: CustomEvent<any>;
|
|
24
|
+
};
|
|
25
|
+
slots: {
|
|
26
|
+
default: {};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export {};
|
|
@@ -137,6 +137,7 @@
|
|
|
137
137
|
on:mouseenter
|
|
138
138
|
on:mouseleave
|
|
139
139
|
on:click
|
|
140
|
+
on:dblclick
|
|
140
141
|
on:dragover
|
|
141
142
|
on:dragleave
|
|
142
143
|
on:dragend
|
|
@@ -144,6 +145,8 @@
|
|
|
144
145
|
on:keydown
|
|
145
146
|
on:keyup
|
|
146
147
|
on:keypress
|
|
148
|
+
on:focus
|
|
149
|
+
on:blur
|
|
147
150
|
on:select={(/** @type {CustomEvent} */ event) => {
|
|
148
151
|
dispatch('select', event.detail);
|
|
149
152
|
}}
|
|
@@ -10,8 +10,8 @@ export default class Button extends SvelteComponent<{
|
|
|
10
10
|
[x: string]: any;
|
|
11
11
|
class?: string | undefined;
|
|
12
12
|
name?: string | undefined;
|
|
13
|
-
label?: string | undefined;
|
|
14
13
|
disabled?: boolean | undefined;
|
|
14
|
+
label?: string | undefined;
|
|
15
15
|
size?: "small" | "medium" | "large" | undefined;
|
|
16
16
|
type?: "reset" | "submit" | "button" | undefined;
|
|
17
17
|
value?: string | undefined;
|
|
@@ -31,6 +31,7 @@ export default class Button extends SvelteComponent<{
|
|
|
31
31
|
mouseenter: MouseEvent;
|
|
32
32
|
mouseleave: MouseEvent;
|
|
33
33
|
click: MouseEvent;
|
|
34
|
+
dblclick: MouseEvent;
|
|
34
35
|
dragover: DragEvent;
|
|
35
36
|
dragleave: DragEvent;
|
|
36
37
|
dragend: DragEvent;
|
|
@@ -38,6 +39,8 @@ export default class Button extends SvelteComponent<{
|
|
|
38
39
|
keydown: KeyboardEvent;
|
|
39
40
|
keyup: KeyboardEvent;
|
|
40
41
|
keypress: KeyboardEvent;
|
|
42
|
+
focus: FocusEvent;
|
|
43
|
+
blur: FocusEvent;
|
|
41
44
|
select: CustomEvent<any>;
|
|
42
45
|
change: CustomEvent<any>;
|
|
43
46
|
} & {
|
|
@@ -115,8 +118,8 @@ declare const __propDef: {
|
|
|
115
118
|
[x: string]: any;
|
|
116
119
|
class?: string | undefined;
|
|
117
120
|
name?: string | undefined;
|
|
118
|
-
label?: string | undefined;
|
|
119
121
|
disabled?: boolean | undefined;
|
|
122
|
+
label?: string | undefined;
|
|
120
123
|
size?: 'small' | 'medium' | 'large' | undefined;
|
|
121
124
|
type?: "reset" | "submit" | "button" | undefined;
|
|
122
125
|
value?: string | undefined;
|
|
@@ -137,6 +140,7 @@ declare const __propDef: {
|
|
|
137
140
|
mouseenter: MouseEvent;
|
|
138
141
|
mouseleave: MouseEvent;
|
|
139
142
|
click: MouseEvent;
|
|
143
|
+
dblclick: MouseEvent;
|
|
140
144
|
dragover: DragEvent;
|
|
141
145
|
dragleave: DragEvent;
|
|
142
146
|
dragend: DragEvent;
|
|
@@ -144,6 +148,8 @@ declare const __propDef: {
|
|
|
144
148
|
keydown: KeyboardEvent;
|
|
145
149
|
keyup: KeyboardEvent;
|
|
146
150
|
keypress: KeyboardEvent;
|
|
151
|
+
focus: FocusEvent;
|
|
152
|
+
blur: FocusEvent;
|
|
147
153
|
select: CustomEvent<any>;
|
|
148
154
|
change: CustomEvent<any>;
|
|
149
155
|
} & {
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
export default class SelectButtonGroup extends SvelteComponent<{
|
|
10
10
|
[x: string]: any;
|
|
11
11
|
class?: string | undefined;
|
|
12
|
-
invalid?: boolean | undefined;
|
|
13
12
|
disabled?: boolean | undefined;
|
|
13
|
+
invalid?: boolean | undefined;
|
|
14
14
|
required?: boolean | undefined;
|
|
15
15
|
hidden?: boolean | undefined;
|
|
16
16
|
readonly?: boolean | undefined;
|
|
@@ -30,8 +30,8 @@ declare const __propDef: {
|
|
|
30
30
|
props: {
|
|
31
31
|
[x: string]: any;
|
|
32
32
|
class?: string | undefined;
|
|
33
|
-
invalid?: boolean | undefined;
|
|
34
33
|
disabled?: boolean | undefined;
|
|
34
|
+
invalid?: boolean | undefined;
|
|
35
35
|
required?: boolean | undefined;
|
|
36
36
|
hidden?: boolean | undefined;
|
|
37
37
|
readonly?: boolean | undefined;
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
export default class SelectButton extends SvelteComponent<{
|
|
10
10
|
[x: string]: any;
|
|
11
11
|
class?: string | undefined;
|
|
12
|
-
label?: string | undefined;
|
|
13
12
|
disabled?: boolean | undefined;
|
|
13
|
+
label?: string | undefined;
|
|
14
14
|
size?: "small" | "medium" | "large" | undefined;
|
|
15
15
|
value?: string | undefined;
|
|
16
16
|
hidden?: boolean | undefined;
|
|
@@ -19,6 +19,7 @@ export default class SelectButton extends SvelteComponent<{
|
|
|
19
19
|
selected?: boolean | undefined;
|
|
20
20
|
}, {
|
|
21
21
|
click: MouseEvent;
|
|
22
|
+
dblclick: MouseEvent;
|
|
22
23
|
select: CustomEvent<any>;
|
|
23
24
|
change: CustomEvent<any>;
|
|
24
25
|
} & {
|
|
@@ -41,8 +42,8 @@ declare const __propDef: {
|
|
|
41
42
|
props: {
|
|
42
43
|
[x: string]: any;
|
|
43
44
|
class?: string | undefined;
|
|
44
|
-
label?: string | undefined;
|
|
45
45
|
disabled?: boolean | undefined;
|
|
46
|
+
label?: string | undefined;
|
|
46
47
|
size?: "small" | "medium" | "large" | undefined;
|
|
47
48
|
value?: string | undefined;
|
|
48
49
|
hidden?: boolean | undefined;
|
|
@@ -52,6 +53,7 @@ declare const __propDef: {
|
|
|
52
53
|
};
|
|
53
54
|
events: {
|
|
54
55
|
click: MouseEvent;
|
|
56
|
+
dblclick: MouseEvent;
|
|
55
57
|
select: CustomEvent<any>;
|
|
56
58
|
change: CustomEvent<any>;
|
|
57
59
|
} & {
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
export default class SplitButton extends SvelteComponent<{
|
|
11
11
|
[x: string]: any;
|
|
12
12
|
class?: string | undefined;
|
|
13
|
-
label?: string | undefined;
|
|
14
13
|
disabled?: boolean | undefined;
|
|
14
|
+
label?: string | undefined;
|
|
15
15
|
size?: "small" | "medium" | "large" | undefined;
|
|
16
16
|
hidden?: boolean | undefined;
|
|
17
17
|
variant?: "primary" | "secondary" | "tertiary" | "ghost" | undefined;
|
|
@@ -41,8 +41,8 @@ declare const __propDef: {
|
|
|
41
41
|
props: {
|
|
42
42
|
[x: string]: any;
|
|
43
43
|
class?: string | undefined;
|
|
44
|
-
label?: string | undefined;
|
|
45
44
|
disabled?: boolean | undefined;
|
|
45
|
+
label?: string | undefined;
|
|
46
46
|
size?: 'small' | 'medium' | 'large' | undefined;
|
|
47
47
|
hidden?: boolean | undefined;
|
|
48
48
|
variant?: 'primary' | 'secondary' | 'tertiary' | 'ghost' | undefined;
|
|
@@ -11,10 +11,10 @@ export default class Checkbox extends SvelteComponent<{
|
|
|
11
11
|
[x: string]: any;
|
|
12
12
|
class?: string | undefined;
|
|
13
13
|
name?: string | undefined;
|
|
14
|
+
disabled?: boolean | undefined;
|
|
14
15
|
invalid?: boolean | undefined;
|
|
15
16
|
label?: string | undefined;
|
|
16
17
|
checked?: boolean | "mixed" | undefined;
|
|
17
|
-
disabled?: boolean | undefined;
|
|
18
18
|
required?: boolean | undefined;
|
|
19
19
|
value?: string | undefined;
|
|
20
20
|
hidden?: boolean | undefined;
|
|
@@ -39,10 +39,10 @@ declare const __propDef: {
|
|
|
39
39
|
[x: string]: any;
|
|
40
40
|
class?: string | undefined;
|
|
41
41
|
name?: string | undefined;
|
|
42
|
+
disabled?: boolean | undefined;
|
|
42
43
|
invalid?: boolean | undefined;
|
|
43
44
|
label?: string | undefined;
|
|
44
45
|
checked?: boolean | "mixed" | undefined;
|
|
45
|
-
disabled?: boolean | undefined;
|
|
46
46
|
required?: boolean | undefined;
|
|
47
47
|
value?: string | undefined;
|
|
48
48
|
hidden?: boolean | undefined;
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
export default class Disclosure extends SvelteComponent<{
|
|
10
10
|
[x: string]: any;
|
|
11
11
|
class?: string | undefined;
|
|
12
|
-
label?: string | undefined;
|
|
13
12
|
disabled?: boolean | undefined;
|
|
13
|
+
label?: string | undefined;
|
|
14
14
|
hidden?: boolean | undefined;
|
|
15
15
|
expanded?: boolean | undefined;
|
|
16
16
|
}, {
|
|
@@ -47,8 +47,8 @@ declare const __propDef: {
|
|
|
47
47
|
props: {
|
|
48
48
|
[x: string]: any;
|
|
49
49
|
class?: string | undefined;
|
|
50
|
-
label?: string | undefined;
|
|
51
50
|
disabled?: boolean | undefined;
|
|
51
|
+
label?: string | undefined;
|
|
52
52
|
hidden?: boolean | undefined;
|
|
53
53
|
expanded?: boolean | undefined;
|
|
54
54
|
};
|
|
@@ -36,8 +36,12 @@
|
|
|
36
36
|
background-color: var(--sui-secondary-border-color);
|
|
37
37
|
}
|
|
38
38
|
.divider[aria-orientation=horizontal] {
|
|
39
|
+
margin: 8px 0;
|
|
40
|
+
width: 100%;
|
|
39
41
|
height: 1px;
|
|
40
42
|
}
|
|
41
43
|
.divider[aria-orientation=vertical] {
|
|
44
|
+
margin: 0 8px;
|
|
42
45
|
width: 1px;
|
|
46
|
+
height: 100%;
|
|
43
47
|
}</style>
|
|
@@ -12,6 +12,9 @@ export default class GridRow extends SvelteComponent<{
|
|
|
12
12
|
selected?: boolean | undefined;
|
|
13
13
|
}, {
|
|
14
14
|
click: MouseEvent;
|
|
15
|
+
dblclick: MouseEvent;
|
|
16
|
+
focus: FocusEvent;
|
|
17
|
+
blur: FocusEvent;
|
|
15
18
|
select: CustomEvent<any>;
|
|
16
19
|
change: CustomEvent<any>;
|
|
17
20
|
} & {
|
|
@@ -32,6 +35,9 @@ declare const __propDef: {
|
|
|
32
35
|
};
|
|
33
36
|
events: {
|
|
34
37
|
click: MouseEvent;
|
|
38
|
+
dblclick: MouseEvent;
|
|
39
|
+
focus: FocusEvent;
|
|
40
|
+
blur: FocusEvent;
|
|
35
41
|
select: CustomEvent<any>;
|
|
36
42
|
change: CustomEvent<any>;
|
|
37
43
|
} & {
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
export default class Listbox extends SvelteComponent<{
|
|
11
11
|
[x: string]: any;
|
|
12
12
|
class?: string | undefined;
|
|
13
|
-
invalid?: boolean | undefined;
|
|
14
13
|
disabled?: boolean | undefined;
|
|
14
|
+
invalid?: boolean | undefined;
|
|
15
15
|
multiple?: boolean | undefined;
|
|
16
16
|
required?: boolean | undefined;
|
|
17
17
|
hidden?: boolean | undefined;
|
|
@@ -33,8 +33,8 @@ declare const __propDef: {
|
|
|
33
33
|
props: {
|
|
34
34
|
[x: string]: any;
|
|
35
35
|
class?: string | undefined;
|
|
36
|
-
invalid?: boolean | undefined;
|
|
37
36
|
disabled?: boolean | undefined;
|
|
37
|
+
invalid?: boolean | undefined;
|
|
38
38
|
multiple?: boolean | undefined;
|
|
39
39
|
required?: boolean | undefined;
|
|
40
40
|
hidden?: boolean | undefined;
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
export default class OptionGroup extends SvelteComponent<{
|
|
12
12
|
[x: string]: any;
|
|
13
13
|
class?: string | undefined;
|
|
14
|
-
label?: string | undefined;
|
|
15
14
|
disabled?: boolean | undefined;
|
|
15
|
+
label?: string | undefined;
|
|
16
16
|
hidden?: boolean | undefined;
|
|
17
17
|
}, {
|
|
18
18
|
[evt: string]: CustomEvent<any>;
|
|
@@ -28,8 +28,8 @@ declare const __propDef: {
|
|
|
28
28
|
props: {
|
|
29
29
|
[x: string]: any;
|
|
30
30
|
class?: string | undefined;
|
|
31
|
-
label?: string | undefined;
|
|
32
31
|
disabled?: boolean | undefined;
|
|
32
|
+
label?: string | undefined;
|
|
33
33
|
hidden?: boolean | undefined;
|
|
34
34
|
};
|
|
35
35
|
events: {
|
|
@@ -9,13 +9,16 @@
|
|
|
9
9
|
export default class Option extends SvelteComponent<{
|
|
10
10
|
[x: string]: any;
|
|
11
11
|
class?: string | undefined;
|
|
12
|
-
label?: string | undefined;
|
|
13
12
|
disabled?: boolean | undefined;
|
|
13
|
+
label?: string | undefined;
|
|
14
14
|
value?: string | undefined;
|
|
15
15
|
hidden?: boolean | undefined;
|
|
16
16
|
selected?: boolean | undefined;
|
|
17
17
|
}, {
|
|
18
18
|
click: MouseEvent;
|
|
19
|
+
dblclick: MouseEvent;
|
|
20
|
+
focus: FocusEvent;
|
|
21
|
+
blur: FocusEvent;
|
|
19
22
|
dragover: DragEvent;
|
|
20
23
|
dragleave: DragEvent;
|
|
21
24
|
dragend: DragEvent;
|
|
@@ -43,14 +46,17 @@ declare const __propDef: {
|
|
|
43
46
|
props: {
|
|
44
47
|
[x: string]: any;
|
|
45
48
|
class?: string | undefined;
|
|
46
|
-
label?: string | undefined;
|
|
47
49
|
disabled?: boolean | undefined;
|
|
50
|
+
label?: string | undefined;
|
|
48
51
|
value?: string | undefined;
|
|
49
52
|
hidden?: boolean | undefined;
|
|
50
53
|
selected?: boolean | undefined;
|
|
51
54
|
};
|
|
52
55
|
events: {
|
|
53
56
|
click: MouseEvent;
|
|
57
|
+
dblclick: MouseEvent;
|
|
58
|
+
focus: FocusEvent;
|
|
59
|
+
blur: FocusEvent;
|
|
54
60
|
dragover: DragEvent;
|
|
55
61
|
dragleave: DragEvent;
|
|
56
62
|
dragend: DragEvent;
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
export default class MenuButton extends SvelteComponent<{
|
|
9
9
|
[x: string]: any;
|
|
10
10
|
class?: string | undefined;
|
|
11
|
+
disabled?: boolean | undefined;
|
|
11
12
|
focus?: (() => void) | undefined;
|
|
12
13
|
label?: string | undefined;
|
|
13
|
-
disabled?: boolean | undefined;
|
|
14
14
|
size?: "small" | "medium" | "large" | undefined;
|
|
15
15
|
hidden?: boolean | undefined;
|
|
16
16
|
variant?: "link" | "primary" | "secondary" | "tertiary" | "ghost" | undefined;
|
|
@@ -40,9 +40,9 @@ declare const __propDef: {
|
|
|
40
40
|
props: {
|
|
41
41
|
[x: string]: any;
|
|
42
42
|
class?: string | undefined;
|
|
43
|
+
disabled?: boolean | undefined;
|
|
43
44
|
focus?: (() => void) | undefined;
|
|
44
45
|
label?: string | undefined;
|
|
45
|
-
disabled?: boolean | undefined;
|
|
46
46
|
size?: "small" | "medium" | "large" | undefined;
|
|
47
47
|
hidden?: boolean | undefined;
|
|
48
48
|
variant?: 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'link' | undefined;
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
export default class MenuItemCheckbox extends SvelteComponent<{
|
|
9
9
|
[x: string]: any;
|
|
10
10
|
class?: string | undefined;
|
|
11
|
+
disabled?: boolean | undefined;
|
|
11
12
|
label?: string | undefined;
|
|
12
13
|
checked?: boolean | undefined;
|
|
13
|
-
disabled?: boolean | undefined;
|
|
14
14
|
hidden?: boolean | undefined;
|
|
15
15
|
iconName?: string | undefined;
|
|
16
16
|
iconLabel?: string | undefined;
|
|
@@ -32,9 +32,9 @@ declare const __propDef: {
|
|
|
32
32
|
props: {
|
|
33
33
|
[x: string]: any;
|
|
34
34
|
class?: string | undefined;
|
|
35
|
+
disabled?: boolean | undefined;
|
|
35
36
|
label?: string | undefined;
|
|
36
37
|
checked?: boolean | undefined;
|
|
37
|
-
disabled?: boolean | undefined;
|
|
38
38
|
hidden?: boolean | undefined;
|
|
39
39
|
iconName?: string | undefined;
|
|
40
40
|
iconLabel?: string | undefined;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
export default class MenuItemGroup extends SvelteComponent<{
|
|
6
6
|
[x: string]: any;
|
|
7
7
|
class?: string | undefined;
|
|
8
|
-
title?: string | undefined;
|
|
9
8
|
disabled?: boolean | undefined;
|
|
9
|
+
title?: string | undefined;
|
|
10
10
|
hidden?: boolean | undefined;
|
|
11
11
|
}, {
|
|
12
12
|
[evt: string]: CustomEvent<any>;
|
|
@@ -22,8 +22,8 @@ declare const __propDef: {
|
|
|
22
22
|
props: {
|
|
23
23
|
[x: string]: any;
|
|
24
24
|
class?: string | undefined;
|
|
25
|
-
title?: string | undefined;
|
|
26
25
|
disabled?: boolean | undefined;
|
|
26
|
+
title?: string | undefined;
|
|
27
27
|
hidden?: boolean | undefined;
|
|
28
28
|
};
|
|
29
29
|
events: {
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
export default class MenuItemRadio extends SvelteComponent<{
|
|
10
10
|
[x: string]: any;
|
|
11
11
|
class?: string | undefined;
|
|
12
|
+
disabled?: boolean | undefined;
|
|
12
13
|
label?: string | undefined;
|
|
13
14
|
checked?: boolean | undefined;
|
|
14
|
-
disabled?: boolean | undefined;
|
|
15
15
|
hidden?: boolean | undefined;
|
|
16
16
|
iconName?: string | undefined;
|
|
17
17
|
iconLabel?: string | undefined;
|
|
@@ -33,9 +33,9 @@ declare const __propDef: {
|
|
|
33
33
|
props: {
|
|
34
34
|
[x: string]: any;
|
|
35
35
|
class?: string | undefined;
|
|
36
|
+
disabled?: boolean | undefined;
|
|
36
37
|
label?: string | undefined;
|
|
37
38
|
checked?: boolean | undefined;
|
|
38
|
-
disabled?: boolean | undefined;
|
|
39
39
|
hidden?: boolean | undefined;
|
|
40
40
|
iconName?: string | undefined;
|
|
41
41
|
iconLabel?: string | undefined;
|
|
@@ -8,14 +8,16 @@
|
|
|
8
8
|
export default class MenuItem extends SvelteComponent<{
|
|
9
9
|
[x: string]: any;
|
|
10
10
|
class?: string | undefined;
|
|
11
|
-
label?: string | undefined;
|
|
12
11
|
disabled?: boolean | undefined;
|
|
12
|
+
label?: string | undefined;
|
|
13
13
|
role?: "menuitem" | "menuitemcheckbox" | "menuitemradio" | undefined;
|
|
14
14
|
hidden?: boolean | undefined;
|
|
15
15
|
iconName?: string | undefined;
|
|
16
16
|
iconLabel?: string | undefined;
|
|
17
17
|
}, {
|
|
18
18
|
click: MouseEvent;
|
|
19
|
+
focus: FocusEvent;
|
|
20
|
+
blur: FocusEvent;
|
|
19
21
|
select: CustomEvent<any>;
|
|
20
22
|
change: CustomEvent<any>;
|
|
21
23
|
} & {
|
|
@@ -40,8 +42,8 @@ declare const __propDef: {
|
|
|
40
42
|
props: {
|
|
41
43
|
[x: string]: any;
|
|
42
44
|
class?: string | undefined;
|
|
43
|
-
label?: string | undefined;
|
|
44
45
|
disabled?: boolean | undefined;
|
|
46
|
+
label?: string | undefined;
|
|
45
47
|
role?: "menuitem" | "menuitemcheckbox" | "menuitemradio" | undefined;
|
|
46
48
|
hidden?: boolean | undefined;
|
|
47
49
|
iconName?: string | undefined;
|
|
@@ -49,6 +51,8 @@ declare const __propDef: {
|
|
|
49
51
|
};
|
|
50
52
|
events: {
|
|
51
53
|
click: MouseEvent;
|
|
54
|
+
focus: FocusEvent;
|
|
55
|
+
blur: FocusEvent;
|
|
52
56
|
select: CustomEvent<any>;
|
|
53
57
|
change: CustomEvent<any>;
|
|
54
58
|
} & {
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
export default class RadioGroup extends SvelteComponent<{
|
|
10
10
|
[x: string]: any;
|
|
11
11
|
class?: string | undefined;
|
|
12
|
-
invalid?: boolean | undefined;
|
|
13
12
|
disabled?: boolean | undefined;
|
|
13
|
+
invalid?: boolean | undefined;
|
|
14
14
|
required?: boolean | undefined;
|
|
15
15
|
hidden?: boolean | undefined;
|
|
16
16
|
readonly?: boolean | undefined;
|
|
@@ -31,8 +31,8 @@ declare const __propDef: {
|
|
|
31
31
|
props: {
|
|
32
32
|
[x: string]: any;
|
|
33
33
|
class?: string | undefined;
|
|
34
|
-
invalid?: boolean | undefined;
|
|
35
34
|
disabled?: boolean | undefined;
|
|
35
|
+
invalid?: boolean | undefined;
|
|
36
36
|
required?: boolean | undefined;
|
|
37
37
|
hidden?: boolean | undefined;
|
|
38
38
|
readonly?: boolean | undefined;
|
|
@@ -11,12 +11,14 @@ export default class Radio extends SvelteComponent<{
|
|
|
11
11
|
[x: string]: any;
|
|
12
12
|
class?: string | undefined;
|
|
13
13
|
name?: string | undefined;
|
|
14
|
+
disabled?: boolean | undefined;
|
|
14
15
|
label?: string | undefined;
|
|
15
16
|
checked?: boolean | undefined;
|
|
16
|
-
disabled?: boolean | undefined;
|
|
17
17
|
value?: string | undefined;
|
|
18
18
|
hidden?: boolean | undefined;
|
|
19
19
|
}, {
|
|
20
|
+
focus: FocusEvent;
|
|
21
|
+
blur: FocusEvent;
|
|
20
22
|
select: CustomEvent<any>;
|
|
21
23
|
change: CustomEvent<any>;
|
|
22
24
|
} & {
|
|
@@ -34,13 +36,15 @@ declare const __propDef: {
|
|
|
34
36
|
[x: string]: any;
|
|
35
37
|
class?: string | undefined;
|
|
36
38
|
name?: string | undefined;
|
|
39
|
+
disabled?: boolean | undefined;
|
|
37
40
|
label?: string | undefined;
|
|
38
41
|
checked?: boolean | undefined;
|
|
39
|
-
disabled?: boolean | undefined;
|
|
40
42
|
value?: string | undefined;
|
|
41
43
|
hidden?: boolean | undefined;
|
|
42
44
|
};
|
|
43
45
|
events: {
|
|
46
|
+
focus: FocusEvent;
|
|
47
|
+
blur: FocusEvent;
|
|
44
48
|
select: CustomEvent<any>;
|
|
45
49
|
change: CustomEvent<any>;
|
|
46
50
|
} & {
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
|
|
65
65
|
const dispatch = createEventDispatcher();
|
|
66
66
|
const id = getRandomId('combobox');
|
|
67
|
+
const selectedSelector = '[role="option"][aria-selected="true"]';
|
|
67
68
|
/** @type {HTMLElement} */
|
|
68
69
|
let comboboxElement;
|
|
69
70
|
/** @type {TextInput | undefined} */
|
|
@@ -75,22 +76,40 @@
|
|
|
75
76
|
let label = '';
|
|
76
77
|
|
|
77
78
|
/**
|
|
78
|
-
* Update the
|
|
79
|
+
* Update the {@link label} and selected option when the {@link value} is changed.
|
|
80
|
+
*/
|
|
81
|
+
const onChange = () => {
|
|
82
|
+
const selected = popupComponent?.content?.querySelector(selectedSelector);
|
|
83
|
+
|
|
84
|
+
const target = /** @type {HTMLButtonElement} */ (
|
|
85
|
+
popupComponent?.content?.querySelector(`[role="option"][value="${value}"]`)
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
if (target) {
|
|
89
|
+
label = target.querySelector('.label')?.textContent || target.textContent || target.value;
|
|
90
|
+
|
|
91
|
+
if (selected !== target) {
|
|
92
|
+
selected?.setAttribute('aria-selected', 'false');
|
|
93
|
+
target.setAttribute('aria-selected', 'true');
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Update the {@link value} whenever an option is selected.
|
|
79
100
|
* @param {HTMLButtonElement} target - Selected option.
|
|
80
101
|
*/
|
|
81
102
|
const onSelect = (target) => {
|
|
82
103
|
// @todo support more types
|
|
83
104
|
value = target.dataset.type === 'number' ? Number(target.value) : target.value;
|
|
84
|
-
|
|
105
|
+
onChange();
|
|
85
106
|
dispatch('change', { target: inputComponent?.element, value });
|
|
86
107
|
};
|
|
87
108
|
|
|
88
109
|
$: {
|
|
89
110
|
if (popupComponent?.content) {
|
|
90
111
|
window.requestAnimationFrame(() => {
|
|
91
|
-
const selected = popupComponent?.content?.querySelector(
|
|
92
|
-
'[role="option"][aria-selected="true"]',
|
|
93
|
-
);
|
|
112
|
+
const selected = popupComponent?.content?.querySelector(selectedSelector);
|
|
94
113
|
|
|
95
114
|
if (selected) {
|
|
96
115
|
onSelect(/** @type {HTMLButtonElement} */ (selected));
|
|
@@ -98,6 +117,11 @@
|
|
|
98
117
|
});
|
|
99
118
|
}
|
|
100
119
|
}
|
|
120
|
+
|
|
121
|
+
$: {
|
|
122
|
+
void value;
|
|
123
|
+
onChange();
|
|
124
|
+
}
|
|
101
125
|
</script>
|
|
102
126
|
|
|
103
127
|
<div
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
export default class Combobox extends SvelteComponent<{
|
|
11
11
|
[x: string]: any;
|
|
12
12
|
class?: string | undefined;
|
|
13
|
-
invalid?: boolean | undefined;
|
|
14
13
|
disabled?: boolean | undefined;
|
|
14
|
+
invalid?: boolean | undefined;
|
|
15
15
|
required?: boolean | undefined;
|
|
16
16
|
value?: string | number | undefined;
|
|
17
17
|
position?: PopupPosition | undefined;
|
|
@@ -37,8 +37,8 @@ declare const __propDef: {
|
|
|
37
37
|
props: {
|
|
38
38
|
[x: string]: any;
|
|
39
39
|
class?: string | undefined;
|
|
40
|
-
invalid?: boolean | undefined;
|
|
41
40
|
disabled?: boolean | undefined;
|
|
41
|
+
invalid?: boolean | undefined;
|
|
42
42
|
required?: boolean | undefined;
|
|
43
43
|
value?: (string | number | undefined);
|
|
44
44
|
position?: PopupPosition | undefined;
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
export default class Select extends SvelteComponent<{
|
|
11
11
|
[x: string]: any;
|
|
12
12
|
class?: string | undefined;
|
|
13
|
-
invalid?: boolean | undefined;
|
|
14
13
|
disabled?: boolean | undefined;
|
|
14
|
+
invalid?: boolean | undefined;
|
|
15
15
|
required?: boolean | undefined;
|
|
16
16
|
value?: string | number | undefined;
|
|
17
17
|
hidden?: boolean | undefined;
|
|
@@ -32,8 +32,8 @@ declare const __propDef: {
|
|
|
32
32
|
props: {
|
|
33
33
|
[x: string]: any;
|
|
34
34
|
class?: string | undefined;
|
|
35
|
-
invalid?: boolean | undefined;
|
|
36
35
|
disabled?: boolean | undefined;
|
|
36
|
+
invalid?: boolean | undefined;
|
|
37
37
|
required?: boolean | undefined;
|
|
38
38
|
value?: (string | number | undefined);
|
|
39
39
|
hidden?: boolean | undefined;
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
export default class Slider extends SvelteComponent<{
|
|
13
13
|
[x: string]: any;
|
|
14
14
|
class?: string | undefined;
|
|
15
|
-
invalid?: boolean | undefined;
|
|
16
15
|
disabled?: boolean | undefined;
|
|
16
|
+
invalid?: boolean | undefined;
|
|
17
17
|
max?: number | undefined;
|
|
18
18
|
min?: number | undefined;
|
|
19
19
|
step?: number | undefined;
|
|
@@ -39,8 +39,8 @@ declare const __propDef: {
|
|
|
39
39
|
props: {
|
|
40
40
|
[x: string]: any;
|
|
41
41
|
class?: string | undefined;
|
|
42
|
-
invalid?: boolean | undefined;
|
|
43
42
|
disabled?: boolean | undefined;
|
|
43
|
+
invalid?: boolean | undefined;
|
|
44
44
|
max?: number | undefined;
|
|
45
45
|
min?: number | undefined;
|
|
46
46
|
step?: number | undefined;
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
export default class Switch extends SvelteComponent<{
|
|
10
10
|
[x: string]: any;
|
|
11
11
|
class?: string | undefined;
|
|
12
|
+
disabled?: boolean | undefined;
|
|
12
13
|
invalid?: boolean | undefined;
|
|
13
14
|
label?: string | undefined;
|
|
14
15
|
checked?: boolean | "mixed" | undefined;
|
|
15
|
-
disabled?: boolean | undefined;
|
|
16
16
|
required?: boolean | undefined;
|
|
17
17
|
hidden?: boolean | undefined;
|
|
18
18
|
readonly?: boolean | undefined;
|
|
@@ -32,10 +32,10 @@ declare const __propDef: {
|
|
|
32
32
|
props: {
|
|
33
33
|
[x: string]: any;
|
|
34
34
|
class?: string | undefined;
|
|
35
|
+
disabled?: boolean | undefined;
|
|
35
36
|
invalid?: boolean | undefined;
|
|
36
37
|
label?: string | undefined;
|
|
37
38
|
checked?: boolean | "mixed" | undefined;
|
|
38
|
-
disabled?: boolean | undefined;
|
|
39
39
|
required?: boolean | undefined;
|
|
40
40
|
hidden?: boolean | undefined;
|
|
41
41
|
readonly?: boolean | undefined;
|
|
@@ -13,6 +13,8 @@ export default class Tab extends SvelteComponent<{
|
|
|
13
13
|
hidden?: boolean | undefined;
|
|
14
14
|
selected?: boolean | undefined;
|
|
15
15
|
}, {
|
|
16
|
+
focus: FocusEvent;
|
|
17
|
+
blur: FocusEvent;
|
|
16
18
|
select: CustomEvent<any>;
|
|
17
19
|
change: CustomEvent<any>;
|
|
18
20
|
} & {
|
|
@@ -40,6 +42,8 @@ declare const __propDef: {
|
|
|
40
42
|
selected?: boolean | undefined;
|
|
41
43
|
};
|
|
42
44
|
events: {
|
|
45
|
+
focus: FocusEvent;
|
|
46
|
+
blur: FocusEvent;
|
|
43
47
|
select: CustomEvent<any>;
|
|
44
48
|
change: CustomEvent<any>;
|
|
45
49
|
} & {
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
/** A Markdown text editor. */
|
|
5
5
|
export default class MarkdownEditor extends SvelteComponent<{
|
|
6
6
|
[x: string]: any;
|
|
7
|
-
invalid?: boolean | undefined;
|
|
8
7
|
disabled?: boolean | undefined;
|
|
8
|
+
invalid?: boolean | undefined;
|
|
9
9
|
required?: boolean | undefined;
|
|
10
10
|
value?: string | undefined;
|
|
11
11
|
hidden?: boolean | undefined;
|
|
@@ -22,8 +22,8 @@ import { SvelteComponent } from "svelte";
|
|
|
22
22
|
declare const __propDef: {
|
|
23
23
|
props: {
|
|
24
24
|
[x: string]: any;
|
|
25
|
-
invalid?: boolean | undefined;
|
|
26
25
|
disabled?: boolean | undefined;
|
|
26
|
+
invalid?: boolean | undefined;
|
|
27
27
|
required?: boolean | undefined;
|
|
28
28
|
value?: string | undefined;
|
|
29
29
|
hidden?: boolean | undefined;
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
export default class NumberInput extends SvelteComponent<{
|
|
10
10
|
[x: string]: any;
|
|
11
11
|
class?: string | undefined;
|
|
12
|
-
invalid?: boolean | undefined;
|
|
13
12
|
disabled?: boolean | undefined;
|
|
13
|
+
invalid?: boolean | undefined;
|
|
14
14
|
max?: number | undefined;
|
|
15
15
|
min?: number | undefined;
|
|
16
16
|
required?: boolean | undefined;
|
|
@@ -44,8 +44,8 @@ declare const __propDef: {
|
|
|
44
44
|
props: {
|
|
45
45
|
[x: string]: any;
|
|
46
46
|
class?: string | undefined;
|
|
47
|
-
invalid?: boolean | undefined;
|
|
48
47
|
disabled?: boolean | undefined;
|
|
48
|
+
invalid?: boolean | undefined;
|
|
49
49
|
max?: number | undefined;
|
|
50
50
|
min?: number | undefined;
|
|
51
51
|
required?: boolean | undefined;
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
export default class PasswordInput extends SvelteComponent<{
|
|
11
11
|
[x: string]: any;
|
|
12
12
|
class?: string | undefined;
|
|
13
|
-
invalid?: boolean | undefined;
|
|
14
13
|
disabled?: boolean | undefined;
|
|
14
|
+
invalid?: boolean | undefined;
|
|
15
15
|
required?: boolean | undefined;
|
|
16
16
|
value?: string | undefined;
|
|
17
17
|
hidden?: boolean | undefined;
|
|
@@ -39,8 +39,8 @@ declare const __propDef: {
|
|
|
39
39
|
props: {
|
|
40
40
|
[x: string]: any;
|
|
41
41
|
class?: string | undefined;
|
|
42
|
-
invalid?: boolean | undefined;
|
|
43
42
|
disabled?: boolean | undefined;
|
|
43
|
+
invalid?: boolean | undefined;
|
|
44
44
|
required?: boolean | undefined;
|
|
45
45
|
value?: string | undefined;
|
|
46
46
|
hidden?: boolean | undefined;
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
export default class SearchBar extends SvelteComponent<{
|
|
11
11
|
[x: string]: any;
|
|
12
12
|
class?: string | undefined;
|
|
13
|
+
disabled?: boolean | undefined;
|
|
13
14
|
focus?: (() => void) | undefined;
|
|
14
15
|
invalid?: boolean | undefined;
|
|
15
|
-
disabled?: boolean | undefined;
|
|
16
16
|
required?: boolean | undefined;
|
|
17
17
|
value?: string | undefined;
|
|
18
18
|
hidden?: boolean | undefined;
|
|
@@ -66,9 +66,9 @@ declare const __propDef: {
|
|
|
66
66
|
props: {
|
|
67
67
|
[x: string]: any;
|
|
68
68
|
class?: string | undefined;
|
|
69
|
+
disabled?: boolean | undefined;
|
|
69
70
|
focus?: (() => void) | undefined;
|
|
70
71
|
invalid?: boolean | undefined;
|
|
71
|
-
disabled?: boolean | undefined;
|
|
72
72
|
required?: boolean | undefined;
|
|
73
73
|
value?: string | undefined;
|
|
74
74
|
hidden?: boolean | undefined;
|
|
@@ -11,8 +11,8 @@ export default class TextArea extends SvelteComponent<{
|
|
|
11
11
|
[x: string]: any;
|
|
12
12
|
class?: string | undefined;
|
|
13
13
|
name?: string | undefined;
|
|
14
|
-
invalid?: boolean | undefined;
|
|
15
14
|
disabled?: boolean | undefined;
|
|
15
|
+
invalid?: boolean | undefined;
|
|
16
16
|
required?: boolean | undefined;
|
|
17
17
|
value?: string | undefined;
|
|
18
18
|
hidden?: boolean | undefined;
|
|
@@ -38,8 +38,8 @@ declare const __propDef: {
|
|
|
38
38
|
[x: string]: any;
|
|
39
39
|
class?: string | undefined;
|
|
40
40
|
name?: string | undefined;
|
|
41
|
-
invalid?: boolean | undefined;
|
|
42
41
|
disabled?: boolean | undefined;
|
|
42
|
+
invalid?: boolean | undefined;
|
|
43
43
|
required?: boolean | undefined;
|
|
44
44
|
value?: string | undefined;
|
|
45
45
|
hidden?: boolean | undefined;
|
|
@@ -10,8 +10,8 @@ export default class TextInput extends SvelteComponent<{
|
|
|
10
10
|
[x: string]: any;
|
|
11
11
|
class?: string | undefined;
|
|
12
12
|
name?: string | undefined;
|
|
13
|
-
invalid?: boolean | undefined;
|
|
14
13
|
disabled?: boolean | undefined;
|
|
14
|
+
invalid?: boolean | undefined;
|
|
15
15
|
required?: boolean | undefined;
|
|
16
16
|
value?: string | number | undefined;
|
|
17
17
|
role?: "textbox" | "searchbox" | "combobox" | "spinbutton" | undefined;
|
|
@@ -83,8 +83,8 @@ declare const __propDef: {
|
|
|
83
83
|
[x: string]: any;
|
|
84
84
|
class?: string | undefined;
|
|
85
85
|
name?: string | undefined;
|
|
86
|
-
invalid?: boolean | undefined;
|
|
87
86
|
disabled?: boolean | undefined;
|
|
87
|
+
invalid?: boolean | undefined;
|
|
88
88
|
required?: boolean | undefined;
|
|
89
89
|
value?: string | number | undefined;
|
|
90
90
|
role?: "textbox" | "searchbox" | "combobox" | "spinbutton" | undefined;
|
|
@@ -78,18 +78,34 @@
|
|
|
78
78
|
background-color: var(--sui-selected-background-color);
|
|
79
79
|
}
|
|
80
80
|
[role=toolbar] :global(h2) {
|
|
81
|
+
flex: auto;
|
|
81
82
|
display: flex;
|
|
82
83
|
align-items: center;
|
|
83
84
|
gap: 8px;
|
|
84
85
|
margin: 0;
|
|
85
86
|
padding: 0 8px;
|
|
87
|
+
min-width: 0;
|
|
86
88
|
font-size: var(--sui-font-size-large);
|
|
87
89
|
}
|
|
90
|
+
[role=toolbar] :global(h2) :global(strong) {
|
|
91
|
+
display: block;
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
text-overflow: ellipsis;
|
|
94
|
+
white-space: nowrap;
|
|
95
|
+
}
|
|
88
96
|
[role=toolbar] :global(h2) :global(span) {
|
|
89
97
|
font-size: var(--sui-font-size-small);
|
|
90
98
|
font-weight: normal;
|
|
91
99
|
opacity: 0.8;
|
|
92
100
|
}
|
|
101
|
+
[role=toolbar] :global(.divider[aria-orientation="horizontal"]) {
|
|
102
|
+
margin: 0 4px;
|
|
103
|
+
width: calc(100% - 8px);
|
|
104
|
+
}
|
|
105
|
+
[role=toolbar] :global(.divider[aria-orientation="vertical"]) {
|
|
106
|
+
margin: 4px 0;
|
|
107
|
+
height: calc(100% - 8px);
|
|
108
|
+
}
|
|
93
109
|
|
|
94
110
|
.inner {
|
|
95
111
|
display: contents;
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
--sui-font-weight-normal: 300;
|
|
172
172
|
--sui-font-weight-bold: 600;
|
|
173
173
|
--sui-font-family-monospace: "Noto Sans Mono", monospace;
|
|
174
|
-
--sui-font-size-monospace:
|
|
174
|
+
--sui-font-size-monospace: 12.5px;
|
|
175
175
|
--sui-line-height-default: 1.25;
|
|
176
176
|
--sui-line-height-compact: 1.5;
|
|
177
177
|
--sui-line-height-comfortable: 1.75;
|
|
@@ -424,6 +424,10 @@
|
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
426
|
|
|
427
|
+
:global(::selection) {
|
|
428
|
+
background-color: var(--sui-primary-accent-color-translucent);
|
|
429
|
+
}
|
|
430
|
+
|
|
427
431
|
:global(*) {
|
|
428
432
|
-webkit-tap-highlight-color: transparent;
|
|
429
433
|
}
|
|
@@ -465,6 +469,7 @@
|
|
|
465
469
|
:global(code),
|
|
466
470
|
:global(pre) {
|
|
467
471
|
font-family: var(--sui-font-family-monospace);
|
|
472
|
+
font-size: var(--sui-font-size-monospace);
|
|
468
473
|
}
|
|
469
474
|
|
|
470
475
|
:global(pre) {
|
package/package/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export function initLocales({ fallbackLocale, initialLocale }?: {
|
|
|
3
3
|
initialLocale?: string | undefined;
|
|
4
4
|
} | undefined): void;
|
|
5
5
|
export { default as Alert } from "./components/alert/alert.svelte";
|
|
6
|
+
export { default as ButtonGroup } from "./components/button/button-group.svelte";
|
|
6
7
|
export { default as Button } from "./components/button/button.svelte";
|
|
7
8
|
export { default as SelectButtonGroup } from "./components/button/select-button-group.svelte";
|
|
8
9
|
export { default as SelectButton } from "./components/button/select-button.svelte";
|
package/package/index.js
CHANGED
|
@@ -28,6 +28,7 @@ export const initLocales = ({ fallbackLocale = 'en', initialLocale = 'en' } = {}
|
|
|
28
28
|
initLocales();
|
|
29
29
|
|
|
30
30
|
export { default as Alert } from './components/alert/alert.svelte';
|
|
31
|
+
export { default as ButtonGroup } from './components/button/button-group.svelte';
|
|
31
32
|
export { default as Button } from './components/button/button.svelte';
|
|
32
33
|
export { default as SelectButtonGroup } from './components/button/select-button-group.svelte';
|
|
33
34
|
export { default as SelectButton } from './components/button/select-button.svelte';
|
|
@@ -62,16 +62,18 @@ export const activateKeyShortcuts = (element, shortcuts = '') => {
|
|
|
62
62
|
* @param {KeyboardEvent} event - `keydown` event.
|
|
63
63
|
*/
|
|
64
64
|
const handler = (event) => {
|
|
65
|
+
const { disabled, offsetParent, offsetLeft, offsetTop } = element;
|
|
66
|
+
|
|
67
|
+
// Check if the element is enabled, visible and clickable (not behind a modal dialog)
|
|
65
68
|
if (
|
|
66
|
-
|
|
69
|
+
!disabled &&
|
|
70
|
+
!!offsetParent &&
|
|
71
|
+
document.elementsFromPoint(offsetLeft + 4, offsetTop + 4).includes(element) &&
|
|
67
72
|
matchShortcuts(event, /** @type {string} */ (platformKeyShortcuts))
|
|
68
73
|
) {
|
|
69
74
|
event.preventDefault();
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
element.focus();
|
|
73
|
-
element.click();
|
|
74
|
-
}
|
|
75
|
+
element.focus();
|
|
76
|
+
element.click();
|
|
75
77
|
}
|
|
76
78
|
};
|
|
77
79
|
|
|
@@ -252,10 +252,15 @@ class Group {
|
|
|
252
252
|
|
|
253
253
|
if (isTarget) {
|
|
254
254
|
element.focus();
|
|
255
|
+
element.dispatchEvent(new CustomEvent('focus'));
|
|
255
256
|
}
|
|
256
257
|
});
|
|
257
258
|
} else {
|
|
258
259
|
element.classList.toggle('focused', isTarget);
|
|
260
|
+
|
|
261
|
+
if (isTarget) {
|
|
262
|
+
element.dispatchEvent(new CustomEvent('focus'));
|
|
263
|
+
}
|
|
259
264
|
}
|
|
260
265
|
|
|
261
266
|
if (controlTarget) {
|
package/package/styles/core.scss
CHANGED
|
@@ -35,6 +35,10 @@
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
::selection {
|
|
39
|
+
background-color: var(--sui-primary-accent-color-translucent);
|
|
40
|
+
}
|
|
41
|
+
|
|
38
42
|
* {
|
|
39
43
|
-webkit-tap-highlight-color: transparent;
|
|
40
44
|
}
|
|
@@ -76,6 +80,7 @@ li {
|
|
|
76
80
|
code,
|
|
77
81
|
pre {
|
|
78
82
|
font-family: var(--sui-font-family-monospace);
|
|
83
|
+
font-size: var(--sui-font-size-monospace);
|
|
79
84
|
}
|
|
80
85
|
|
|
81
86
|
pre {
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
--sui-font-weight-normal: 300;
|
|
161
161
|
--sui-font-weight-bold: 600;
|
|
162
162
|
--sui-font-family-monospace: "Noto Sans Mono", monospace;
|
|
163
|
-
--sui-font-size-monospace:
|
|
163
|
+
--sui-font-size-monospace: 12.5px;
|
|
164
164
|
--sui-line-height-default: 1.25;
|
|
165
165
|
--sui-line-height-compact: 1.5;
|
|
166
166
|
--sui-line-height-comfortable: 1.75;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltia/ui",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -27,32 +27,32 @@
|
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@playwright/test": "^1.42.1",
|
|
30
|
-
"@sveltejs/adapter-auto": "^3.
|
|
31
|
-
"@sveltejs/kit": "^2.5.
|
|
30
|
+
"@sveltejs/adapter-auto": "^3.2.0",
|
|
31
|
+
"@sveltejs/kit": "^2.5.5",
|
|
32
32
|
"@sveltejs/package": "^2.3.0",
|
|
33
33
|
"@sveltejs/vite-plugin-svelte": "^3.0.2",
|
|
34
|
-
"cspell": "^8.6.
|
|
34
|
+
"cspell": "^8.6.1",
|
|
35
35
|
"eslint": "^8.57.0",
|
|
36
36
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
37
37
|
"eslint-config-prettier": "^9.1.0",
|
|
38
38
|
"eslint-plugin-import": "^2.29.1",
|
|
39
|
-
"eslint-plugin-jsdoc": "^48.2.
|
|
39
|
+
"eslint-plugin-jsdoc": "^48.2.2",
|
|
40
40
|
"eslint-plugin-svelte": "^2.35.1",
|
|
41
41
|
"npm-run-all": "^4.1.5",
|
|
42
|
-
"postcss": "^8.4.
|
|
42
|
+
"postcss": "^8.4.38",
|
|
43
43
|
"postcss-html": "^1.6.0",
|
|
44
44
|
"prettier": "^3.2.5",
|
|
45
45
|
"prettier-plugin-svelte": "^3.2.2",
|
|
46
|
-
"sass": "^1.
|
|
47
|
-
"stylelint": "^16.
|
|
46
|
+
"sass": "^1.72.0",
|
|
47
|
+
"stylelint": "^16.3.1",
|
|
48
48
|
"stylelint-config-recommended-scss": "^14.0.0",
|
|
49
49
|
"stylelint-scss": "^6.2.1",
|
|
50
|
-
"svelte-check": "^3.6.
|
|
50
|
+
"svelte-check": "^3.6.8",
|
|
51
51
|
"svelte-i18n": "^4.0.0",
|
|
52
52
|
"svelte-preprocess": "^5.1.3",
|
|
53
53
|
"tslib": "^2.6.2",
|
|
54
|
-
"vite": "^5.
|
|
55
|
-
"vitest": "^1.
|
|
54
|
+
"vite": "^5.2.7",
|
|
55
|
+
"vitest": "^1.4.0"
|
|
56
56
|
},
|
|
57
57
|
"exports": {
|
|
58
58
|
"./package.json": "./package.json",
|
|
@@ -61,6 +61,11 @@
|
|
|
61
61
|
"svelte": "./package/components/alert/alert.svelte",
|
|
62
62
|
"default": "./package/components/alert/alert.svelte"
|
|
63
63
|
},
|
|
64
|
+
"./components/button/button-group.svelte": {
|
|
65
|
+
"types": "./package/components/button/button-group.svelte.d.ts",
|
|
66
|
+
"svelte": "./package/components/button/button-group.svelte",
|
|
67
|
+
"default": "./package/components/button/button-group.svelte"
|
|
68
|
+
},
|
|
64
69
|
"./components/button/button.svelte": {
|
|
65
70
|
"types": "./package/components/button/button.svelte.d.ts",
|
|
66
71
|
"svelte": "./package/components/button/button.svelte",
|
|
@@ -431,6 +436,9 @@
|
|
|
431
436
|
"components/alert/alert.svelte": [
|
|
432
437
|
"./package/components/alert/alert.svelte.d.ts"
|
|
433
438
|
],
|
|
439
|
+
"components/button/button-group.svelte": [
|
|
440
|
+
"./package/components/button/button-group.svelte.d.ts"
|
|
441
|
+
],
|
|
434
442
|
"components/button/button.svelte": [
|
|
435
443
|
"./package/components/button/button.svelte.d.ts"
|
|
436
444
|
],
|