@sveltia/ui 0.10.7 → 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.d.ts +2 -2
- package/package/components/button/select-button-group.svelte.d.ts +2 -2
- package/package/components/button/select-button.svelte.d.ts +2 -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/listbox/listbox.svelte.d.ts +2 -2
- package/package/components/listbox/option-group.svelte.d.ts +2 -2
- package/package/components/listbox/option.svelte.d.ts +2 -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.d.ts +2 -2
- package/package/components/radio/radio-group.svelte.d.ts +2 -2
- package/package/components/radio/radio.svelte.d.ts +2 -2
- 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/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 +8 -0
- package/package/index.d.ts +1 -0
- package/package/index.js +1 -0
- package/package/services/events.js +8 -6
- package/package.json +17 -9
|
@@ -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 {};
|
|
@@ -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;
|
|
@@ -118,8 +118,8 @@ declare const __propDef: {
|
|
|
118
118
|
[x: string]: any;
|
|
119
119
|
class?: string | undefined;
|
|
120
120
|
name?: string | undefined;
|
|
121
|
-
label?: string | undefined;
|
|
122
121
|
disabled?: boolean | undefined;
|
|
122
|
+
label?: string | undefined;
|
|
123
123
|
size?: 'small' | 'medium' | 'large' | undefined;
|
|
124
124
|
type?: "reset" | "submit" | "button" | undefined;
|
|
125
125
|
value?: string | undefined;
|
|
@@ -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;
|
|
@@ -42,8 +42,8 @@ declare const __propDef: {
|
|
|
42
42
|
props: {
|
|
43
43
|
[x: string]: any;
|
|
44
44
|
class?: string | undefined;
|
|
45
|
-
label?: string | undefined;
|
|
46
45
|
disabled?: boolean | undefined;
|
|
46
|
+
label?: string | undefined;
|
|
47
47
|
size?: "small" | "medium" | "large" | undefined;
|
|
48
48
|
value?: string | undefined;
|
|
49
49
|
hidden?: boolean | undefined;
|
|
@@ -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>
|
|
@@ -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,8 +9,8 @@
|
|
|
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;
|
|
@@ -46,8 +46,8 @@ declare const __propDef: {
|
|
|
46
46
|
props: {
|
|
47
47
|
[x: string]: any;
|
|
48
48
|
class?: string | undefined;
|
|
49
|
-
label?: string | undefined;
|
|
50
49
|
disabled?: boolean | undefined;
|
|
50
|
+
label?: string | undefined;
|
|
51
51
|
value?: string | undefined;
|
|
52
52
|
hidden?: boolean | undefined;
|
|
53
53
|
selected?: boolean | undefined;
|
|
@@ -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,8 +8,8 @@
|
|
|
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;
|
|
@@ -42,8 +42,8 @@ declare const __propDef: {
|
|
|
42
42
|
props: {
|
|
43
43
|
[x: string]: any;
|
|
44
44
|
class?: string | undefined;
|
|
45
|
-
label?: string | undefined;
|
|
46
45
|
disabled?: boolean | undefined;
|
|
46
|
+
label?: string | undefined;
|
|
47
47
|
role?: "menuitem" | "menuitemcheckbox" | "menuitemradio" | undefined;
|
|
48
48
|
hidden?: boolean | undefined;
|
|
49
49
|
iconName?: string | undefined;
|
|
@@ -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,9 +11,9 @@ 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
|
}, {
|
|
@@ -36,9 +36,9 @@ declare const __propDef: {
|
|
|
36
36
|
[x: string]: any;
|
|
37
37
|
class?: string | undefined;
|
|
38
38
|
name?: string | undefined;
|
|
39
|
+
disabled?: boolean | undefined;
|
|
39
40
|
label?: string | undefined;
|
|
40
41
|
checked?: boolean | undefined;
|
|
41
|
-
disabled?: boolean | undefined;
|
|
42
42
|
value?: string | undefined;
|
|
43
43
|
hidden?: boolean | undefined;
|
|
44
44
|
};
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -98,6 +98,14 @@
|
|
|
98
98
|
font-weight: normal;
|
|
99
99
|
opacity: 0.8;
|
|
100
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
|
+
}
|
|
101
109
|
|
|
102
110
|
.inner {
|
|
103
111
|
display: contents;
|
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
|
|
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,31 +27,31 @@
|
|
|
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
46
|
"sass": "^1.72.0",
|
|
47
|
-
"stylelint": "^16.
|
|
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.
|
|
54
|
+
"vite": "^5.2.7",
|
|
55
55
|
"vitest": "^1.4.0"
|
|
56
56
|
},
|
|
57
57
|
"exports": {
|
|
@@ -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
|
],
|