@sveltia/ui 0.15.11 → 0.15.12
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.svelte +1 -1
- package/package/components/button/button.svelte.d.ts +8 -8
- package/package/components/button/select-button-group.svelte.d.ts +4 -4
- package/package/components/button/select-button.svelte.d.ts +4 -4
- package/package/components/button/split-button.svelte +1 -1
- package/package/components/button/split-button.svelte.d.ts +4 -4
- package/package/components/checkbox/checkbox.svelte.d.ts +6 -6
- package/package/components/dialog/dialog.svelte.d.ts +2 -2
- package/package/components/disclosure/disclosure.svelte.d.ts +2 -2
- package/package/components/drawer/drawer.svelte.d.ts +2 -2
- package/package/components/grid/grid.svelte.d.ts +2 -2
- package/package/components/listbox/listbox.svelte.d.ts +8 -8
- package/package/components/listbox/option-group.svelte.d.ts +2 -2
- package/package/components/menu/menu-button.svelte.d.ts +4 -4
- package/package/components/menu/menu-item-checkbox.svelte.d.ts +4 -4
- package/package/components/menu/menu-item-group.svelte.d.ts +2 -2
- package/package/components/menu/menu-item-radio.svelte.d.ts +4 -4
- package/package/components/menu/menu-item.svelte.d.ts +2 -2
- package/package/components/radio/radio-group.svelte.d.ts +4 -4
- package/package/components/radio/radio.svelte.d.ts +4 -4
- package/package/components/select/combobox.svelte.d.ts +4 -4
- package/package/components/select/select-tags.svelte.d.ts +6 -6
- package/package/components/select/select.svelte.d.ts +4 -4
- package/package/components/slider/slider.svelte.d.ts +8 -8
- package/package/components/switch/switch.svelte.d.ts +6 -6
- package/package/components/text-editor/core.js +1 -1
- package/package/components/text-editor/lexical-root.svelte.d.ts +4 -4
- package/package/components/text-editor/text-editor.svelte +2 -5
- package/package/components/text-editor/text-editor.svelte.d.ts +4 -4
- package/package/components/text-editor/toolbar/editor-toolbar.svelte +1 -5
- package/package/components/text-editor/toolbar/format-text-button.svelte +1 -1
- package/package/components/text-editor/toolbar/insert-link-button.svelte +4 -4
- package/package/components/text-field/number-input.svelte.d.ts +10 -10
- package/package/components/text-field/password-input.svelte.d.ts +4 -4
- package/package/components/text-field/search-bar.svelte.d.ts +4 -4
- package/package/components/text-field/text-area.svelte.d.ts +4 -4
- package/package/components/text-field/text-input.svelte.d.ts +8 -8
- package/package/components/util/app-shell.svelte +1 -1
- package/package/components/util/modal.svelte.d.ts +4 -4
- package/package/index.js +1 -8
- package/package.json +1 -1
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
<script>
|
|
10
10
|
import { createEventDispatcher } from 'svelte';
|
|
11
|
-
import Popup from '../util/popup.svelte';
|
|
12
11
|
import { activateKeyShortcuts } from '../../services/events';
|
|
12
|
+
import Popup from '../util/popup.svelte';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Reference to the `<button>` element.
|
|
@@ -10,9 +10,10 @@ 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;
|
|
15
|
-
|
|
14
|
+
label?: string | undefined;
|
|
15
|
+
size?: "small" | "medium" | "large" | undefined;
|
|
16
|
+
type?: "reset" | "submit" | "button" | undefined;
|
|
16
17
|
value?: string | undefined;
|
|
17
18
|
role?: string | undefined;
|
|
18
19
|
hidden?: boolean | undefined;
|
|
@@ -21,7 +22,6 @@ export default class Button extends SvelteComponent<{
|
|
|
21
22
|
pressed?: boolean | "mixed" | undefined;
|
|
22
23
|
keyShortcuts?: string | undefined;
|
|
23
24
|
variant?: "primary" | "secondary" | "tertiary" | "ghost" | "link" | undefined;
|
|
24
|
-
size?: "small" | "medium" | "large" | undefined;
|
|
25
25
|
iconic?: boolean | undefined;
|
|
26
26
|
pill?: boolean | undefined;
|
|
27
27
|
flex?: boolean | undefined;
|
|
@@ -59,8 +59,8 @@ export default class Button extends SvelteComponent<{
|
|
|
59
59
|
set class(_: string | undefined);
|
|
60
60
|
get class(): string | undefined;
|
|
61
61
|
/**accessor*/
|
|
62
|
-
set type(_: "
|
|
63
|
-
get type(): "
|
|
62
|
+
set type(_: "reset" | "submit" | "button" | undefined);
|
|
63
|
+
get type(): "reset" | "submit" | "button" | undefined;
|
|
64
64
|
/**accessor*/
|
|
65
65
|
set role(_: string | undefined);
|
|
66
66
|
get role(): string | undefined;
|
|
@@ -119,9 +119,10 @@ declare const __propDef: {
|
|
|
119
119
|
[x: string]: any;
|
|
120
120
|
class?: string | undefined;
|
|
121
121
|
name?: string | undefined;
|
|
122
|
-
label?: string | undefined;
|
|
123
122
|
disabled?: boolean | undefined;
|
|
124
|
-
|
|
123
|
+
label?: string | undefined;
|
|
124
|
+
size?: "small" | "medium" | "large" | undefined;
|
|
125
|
+
type?: "reset" | "submit" | "button" | undefined;
|
|
125
126
|
value?: string | undefined;
|
|
126
127
|
role?: string | undefined;
|
|
127
128
|
hidden?: boolean | undefined;
|
|
@@ -130,7 +131,6 @@ declare const __propDef: {
|
|
|
130
131
|
pressed?: boolean | "mixed" | undefined;
|
|
131
132
|
keyShortcuts?: string | undefined;
|
|
132
133
|
variant?: "primary" | "secondary" | "tertiary" | "ghost" | "link" | undefined;
|
|
133
|
-
size?: "small" | "medium" | "large" | undefined;
|
|
134
134
|
iconic?: boolean | undefined;
|
|
135
135
|
pill?: boolean | undefined;
|
|
136
136
|
flex?: boolean | undefined;
|
|
@@ -9,11 +9,11 @@
|
|
|
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
|
+
required?: boolean | undefined;
|
|
14
15
|
hidden?: boolean | undefined;
|
|
15
16
|
readonly?: boolean | undefined;
|
|
16
|
-
required?: boolean | undefined;
|
|
17
17
|
}, {
|
|
18
18
|
change: CustomEvent<any>;
|
|
19
19
|
} & {
|
|
@@ -30,11 +30,11 @@ 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
|
+
required?: boolean | undefined;
|
|
35
36
|
hidden?: boolean | undefined;
|
|
36
37
|
readonly?: boolean | undefined;
|
|
37
|
-
required?: boolean | undefined;
|
|
38
38
|
};
|
|
39
39
|
events: {
|
|
40
40
|
change: CustomEvent<any>;
|
|
@@ -9,12 +9,12 @@
|
|
|
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
|
+
size?: "small" | "medium" | "large" | undefined;
|
|
14
15
|
value?: string | undefined;
|
|
15
16
|
hidden?: boolean | undefined;
|
|
16
17
|
variant?: "primary" | "secondary" | "tertiary" | "ghost" | "link" | undefined;
|
|
17
|
-
size?: "small" | "medium" | "large" | undefined;
|
|
18
18
|
iconic?: boolean | undefined;
|
|
19
19
|
selected?: boolean | undefined;
|
|
20
20
|
}, {
|
|
@@ -42,12 +42,12 @@ 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
|
+
size?: "small" | "medium" | "large" | undefined;
|
|
47
48
|
value?: string | undefined;
|
|
48
49
|
hidden?: boolean | undefined;
|
|
49
50
|
variant?: "primary" | "secondary" | "tertiary" | "ghost" | "link" | undefined;
|
|
50
|
-
size?: "small" | "medium" | "large" | undefined;
|
|
51
51
|
iconic?: boolean | undefined;
|
|
52
52
|
selected?: boolean | undefined;
|
|
53
53
|
};
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
-->
|
|
8
8
|
<script>
|
|
9
9
|
import { _ } from 'svelte-i18n';
|
|
10
|
-
import Button from './button.svelte';
|
|
11
10
|
import Icon from '../icon/icon.svelte';
|
|
12
11
|
import MenuButton from '../menu/menu-button.svelte';
|
|
12
|
+
import Button from './button.svelte';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* The `class` attribute on the `<button>` element.
|
|
@@ -10,11 +10,11 @@
|
|
|
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
|
+
size?: "small" | "medium" | "large" | undefined;
|
|
15
16
|
hidden?: boolean | undefined;
|
|
16
17
|
variant?: "primary" | "secondary" | "tertiary" | "ghost" | undefined;
|
|
17
|
-
size?: "small" | "medium" | "large" | undefined;
|
|
18
18
|
popupPosition?: PopupPosition | undefined;
|
|
19
19
|
showPopupBackdrop?: boolean | undefined;
|
|
20
20
|
}, {
|
|
@@ -41,11 +41,11 @@ 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
|
+
size?: "small" | "medium" | "large" | undefined;
|
|
46
47
|
hidden?: boolean | undefined;
|
|
47
48
|
variant?: "primary" | "secondary" | "tertiary" | "ghost" | undefined;
|
|
48
|
-
size?: "small" | "medium" | "large" | undefined;
|
|
49
49
|
popupPosition?: PopupPosition | undefined;
|
|
50
50
|
showPopupBackdrop?: boolean | undefined;
|
|
51
51
|
};
|
|
@@ -11,14 +11,14 @@ 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;
|
|
18
|
+
required?: boolean | undefined;
|
|
17
19
|
value?: string | undefined;
|
|
18
20
|
hidden?: boolean | undefined;
|
|
19
21
|
readonly?: boolean | undefined;
|
|
20
|
-
required?: boolean | undefined;
|
|
21
|
-
checked?: boolean | "mixed" | undefined;
|
|
22
22
|
}, {
|
|
23
23
|
change: CustomEvent<any>;
|
|
24
24
|
} & {
|
|
@@ -39,14 +39,14 @@ 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;
|
|
46
|
+
required?: boolean | undefined;
|
|
45
47
|
value?: string | undefined;
|
|
46
48
|
hidden?: boolean | undefined;
|
|
47
49
|
readonly?: boolean | undefined;
|
|
48
|
-
required?: boolean | undefined;
|
|
49
|
-
checked?: boolean | "mixed" | undefined;
|
|
50
50
|
};
|
|
51
51
|
events: {
|
|
52
52
|
change: CustomEvent<any>;
|
|
@@ -10,10 +10,10 @@ export default class Dialog extends SvelteComponent<{
|
|
|
10
10
|
[x: string]: any;
|
|
11
11
|
title: string;
|
|
12
12
|
class?: string | undefined;
|
|
13
|
+
size?: "small" | "medium" | "large" | "x-large" | undefined;
|
|
13
14
|
role?: "dialog" | "alertdialog" | undefined;
|
|
14
15
|
open?: boolean | undefined;
|
|
15
16
|
lightDismiss?: boolean | undefined;
|
|
16
|
-
size?: "small" | "medium" | "large" | "x-large" | undefined;
|
|
17
17
|
showClose?: boolean | undefined;
|
|
18
18
|
showOk?: boolean | undefined;
|
|
19
19
|
okLabel?: string | undefined;
|
|
@@ -53,10 +53,10 @@ declare const __propDef: {
|
|
|
53
53
|
[x: string]: any;
|
|
54
54
|
title: string;
|
|
55
55
|
class?: string | undefined;
|
|
56
|
+
size?: "small" | "medium" | "large" | "x-large" | undefined;
|
|
56
57
|
role?: "dialog" | "alertdialog" | undefined;
|
|
57
58
|
open?: boolean | undefined;
|
|
58
59
|
lightDismiss?: boolean | undefined;
|
|
59
|
-
size?: "small" | "medium" | "large" | "x-large" | undefined;
|
|
60
60
|
showClose?: boolean | undefined;
|
|
61
61
|
showOk?: boolean | undefined;
|
|
62
62
|
okLabel?: string | 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
|
};
|
|
@@ -10,11 +10,11 @@ export default class Drawer extends SvelteComponent<{
|
|
|
10
10
|
[x: string]: any;
|
|
11
11
|
class?: string | undefined;
|
|
12
12
|
title?: string | undefined;
|
|
13
|
+
size?: "small" | "medium" | "large" | "x-large" | "full" | undefined;
|
|
13
14
|
position?: "top" | "left" | "right" | "bottom" | undefined;
|
|
14
15
|
open?: boolean | undefined;
|
|
15
16
|
lightDismiss?: boolean | undefined;
|
|
16
17
|
keepContent?: boolean | undefined;
|
|
17
|
-
size?: "small" | "medium" | "large" | "x-large" | "full" | undefined;
|
|
18
18
|
showClose?: false | "inside" | "outside" | undefined;
|
|
19
19
|
}, {
|
|
20
20
|
opening: CustomEvent<any>;
|
|
@@ -47,11 +47,11 @@ declare const __propDef: {
|
|
|
47
47
|
[x: string]: any;
|
|
48
48
|
class?: string | undefined;
|
|
49
49
|
title?: string | undefined;
|
|
50
|
+
size?: "small" | "medium" | "large" | "x-large" | "full" | undefined;
|
|
50
51
|
position?: "top" | "left" | "right" | "bottom" | undefined;
|
|
51
52
|
open?: boolean | undefined;
|
|
52
53
|
lightDismiss?: boolean | undefined;
|
|
53
54
|
keepContent?: boolean | undefined;
|
|
54
|
-
size?: "small" | "medium" | "large" | "x-large" | "full" | undefined;
|
|
55
55
|
showClose?: false | "inside" | "outside" | undefined;
|
|
56
56
|
};
|
|
57
57
|
events: {
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
export default class Grid extends SvelteComponent<{
|
|
10
10
|
[x: string]: any;
|
|
11
11
|
class?: string | undefined;
|
|
12
|
+
multiple?: boolean | undefined;
|
|
12
13
|
element?: HTMLElement | undefined;
|
|
13
14
|
clickToSelect?: boolean | undefined;
|
|
14
|
-
multiple?: boolean | undefined;
|
|
15
15
|
}, {
|
|
16
16
|
change: CustomEvent<any>;
|
|
17
17
|
} & {
|
|
@@ -28,9 +28,9 @@ declare const __propDef: {
|
|
|
28
28
|
props: {
|
|
29
29
|
[x: string]: any;
|
|
30
30
|
class?: string | undefined;
|
|
31
|
+
multiple?: boolean | undefined;
|
|
31
32
|
element?: HTMLElement | undefined;
|
|
32
33
|
clickToSelect?: boolean | undefined;
|
|
33
|
-
multiple?: boolean | undefined;
|
|
34
34
|
};
|
|
35
35
|
events: {
|
|
36
36
|
change: CustomEvent<any>;
|
|
@@ -10,16 +10,16 @@
|
|
|
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
|
+
multiple?: boolean | undefined;
|
|
16
|
+
required?: boolean | undefined;
|
|
15
17
|
hidden?: boolean | undefined;
|
|
16
18
|
readonly?: boolean | undefined;
|
|
17
19
|
searchTerms?: string | undefined;
|
|
18
|
-
required?: boolean | undefined;
|
|
19
|
-
multiple?: boolean | undefined;
|
|
20
20
|
}, {
|
|
21
21
|
click: MouseEvent;
|
|
22
|
-
filter: Event |
|
|
22
|
+
filter: Event | KeyboardEvent | UIEvent | ErrorEvent | AnimationEvent | MouseEvent | InputEvent | FocusEvent | CompositionEvent | ClipboardEvent | DragEvent | FormDataEvent | PointerEvent | ProgressEvent<EventTarget> | SecurityPolicyViolationEvent | SubmitEvent | TouchEvent | TransitionEvent | WheelEvent;
|
|
23
23
|
change: CustomEvent<any>;
|
|
24
24
|
} & {
|
|
25
25
|
[evt: string]: CustomEvent<any>;
|
|
@@ -35,17 +35,17 @@ declare const __propDef: {
|
|
|
35
35
|
props: {
|
|
36
36
|
[x: string]: any;
|
|
37
37
|
class?: string | undefined;
|
|
38
|
-
invalid?: boolean | undefined;
|
|
39
38
|
disabled?: boolean | undefined;
|
|
39
|
+
invalid?: boolean | undefined;
|
|
40
|
+
multiple?: boolean | undefined;
|
|
41
|
+
required?: boolean | undefined;
|
|
40
42
|
hidden?: boolean | undefined;
|
|
41
43
|
readonly?: boolean | undefined;
|
|
42
44
|
searchTerms?: string | undefined;
|
|
43
|
-
required?: boolean | undefined;
|
|
44
|
-
multiple?: boolean | undefined;
|
|
45
45
|
};
|
|
46
46
|
events: {
|
|
47
47
|
click: MouseEvent;
|
|
48
|
-
filter: Event |
|
|
48
|
+
filter: Event | KeyboardEvent | UIEvent | ErrorEvent | AnimationEvent | MouseEvent | InputEvent | FocusEvent | CompositionEvent | ClipboardEvent | DragEvent | FormDataEvent | PointerEvent | ProgressEvent<EventTarget> | SecurityPolicyViolationEvent | SubmitEvent | TouchEvent | TransitionEvent | WheelEvent;
|
|
49
49
|
change: CustomEvent<any>;
|
|
50
50
|
} & {
|
|
51
51
|
[evt: string]: CustomEvent<any>;
|
|
@@ -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: {
|
|
@@ -8,12 +8,12 @@
|
|
|
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
|
-
|
|
14
|
+
size?: "small" | "medium" | "large" | undefined;
|
|
14
15
|
hidden?: boolean | undefined;
|
|
15
16
|
variant?: "primary" | "secondary" | "tertiary" | "ghost" | "link" | undefined;
|
|
16
|
-
size?: "small" | "medium" | "large" | undefined;
|
|
17
17
|
iconic?: boolean | undefined;
|
|
18
18
|
popupPosition?: PopupPosition | undefined;
|
|
19
19
|
showPopupBackdrop?: boolean | undefined;
|
|
@@ -40,12 +40,12 @@ 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
|
-
|
|
46
|
+
size?: "small" | "medium" | "large" | undefined;
|
|
46
47
|
hidden?: boolean | undefined;
|
|
47
48
|
variant?: "primary" | "secondary" | "tertiary" | "ghost" | "link" | undefined;
|
|
48
|
-
size?: "small" | "medium" | "large" | undefined;
|
|
49
49
|
iconic?: boolean | undefined;
|
|
50
50
|
popupPosition?: PopupPosition | undefined;
|
|
51
51
|
showPopupBackdrop?: boolean | undefined;
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
export default class MenuItemCheckbox extends SvelteComponent<{
|
|
9
9
|
[x: string]: any;
|
|
10
10
|
class?: string | undefined;
|
|
11
|
-
label?: string | undefined;
|
|
12
11
|
disabled?: boolean | undefined;
|
|
13
|
-
|
|
12
|
+
label?: string | undefined;
|
|
14
13
|
checked?: boolean | undefined;
|
|
14
|
+
hidden?: boolean | undefined;
|
|
15
15
|
iconName?: string | undefined;
|
|
16
16
|
iconLabel?: string | undefined;
|
|
17
17
|
}, {
|
|
@@ -32,10 +32,10 @@ declare const __propDef: {
|
|
|
32
32
|
props: {
|
|
33
33
|
[x: string]: any;
|
|
34
34
|
class?: string | undefined;
|
|
35
|
-
label?: string | undefined;
|
|
36
35
|
disabled?: boolean | undefined;
|
|
37
|
-
|
|
36
|
+
label?: string | undefined;
|
|
38
37
|
checked?: boolean | undefined;
|
|
38
|
+
hidden?: boolean | undefined;
|
|
39
39
|
iconName?: string | undefined;
|
|
40
40
|
iconLabel?: string | undefined;
|
|
41
41
|
};
|
|
@@ -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,10 +9,10 @@
|
|
|
9
9
|
export default class MenuItemRadio extends SvelteComponent<{
|
|
10
10
|
[x: string]: any;
|
|
11
11
|
class?: string | undefined;
|
|
12
|
-
label?: string | undefined;
|
|
13
12
|
disabled?: boolean | undefined;
|
|
14
|
-
|
|
13
|
+
label?: string | undefined;
|
|
15
14
|
checked?: boolean | undefined;
|
|
15
|
+
hidden?: boolean | undefined;
|
|
16
16
|
iconName?: string | undefined;
|
|
17
17
|
iconLabel?: string | undefined;
|
|
18
18
|
}, {
|
|
@@ -33,10 +33,10 @@ declare const __propDef: {
|
|
|
33
33
|
props: {
|
|
34
34
|
[x: string]: any;
|
|
35
35
|
class?: string | undefined;
|
|
36
|
-
label?: string | undefined;
|
|
37
36
|
disabled?: boolean | undefined;
|
|
38
|
-
|
|
37
|
+
label?: string | undefined;
|
|
39
38
|
checked?: boolean | undefined;
|
|
39
|
+
hidden?: boolean | undefined;
|
|
40
40
|
iconName?: string | undefined;
|
|
41
41
|
iconLabel?: string | undefined;
|
|
42
42
|
};
|
|
@@ -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,12 +9,12 @@
|
|
|
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
|
+
required?: boolean | undefined;
|
|
14
15
|
hidden?: boolean | undefined;
|
|
15
16
|
readonly?: boolean | undefined;
|
|
16
17
|
orientation?: "vertical" | "horizontal" | undefined;
|
|
17
|
-
required?: boolean | undefined;
|
|
18
18
|
}, {
|
|
19
19
|
change: CustomEvent<any>;
|
|
20
20
|
} & {
|
|
@@ -31,12 +31,12 @@ 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
|
+
required?: boolean | undefined;
|
|
36
37
|
hidden?: boolean | undefined;
|
|
37
38
|
readonly?: boolean | undefined;
|
|
38
39
|
orientation?: "vertical" | "horizontal" | undefined;
|
|
39
|
-
required?: boolean | undefined;
|
|
40
40
|
};
|
|
41
41
|
events: {
|
|
42
42
|
change: CustomEvent<any>;
|
|
@@ -11,11 +11,11 @@ export default class Radio extends SvelteComponent<{
|
|
|
11
11
|
[x: string]: any;
|
|
12
12
|
class?: string | undefined;
|
|
13
13
|
name?: string | undefined;
|
|
14
|
-
label?: string | undefined;
|
|
15
14
|
disabled?: boolean | undefined;
|
|
15
|
+
label?: string | undefined;
|
|
16
|
+
checked?: boolean | undefined;
|
|
16
17
|
value?: string | undefined;
|
|
17
18
|
hidden?: boolean | undefined;
|
|
18
|
-
checked?: boolean | undefined;
|
|
19
19
|
}, {
|
|
20
20
|
focus: FocusEvent;
|
|
21
21
|
blur: FocusEvent;
|
|
@@ -36,11 +36,11 @@ declare const __propDef: {
|
|
|
36
36
|
[x: string]: any;
|
|
37
37
|
class?: string | undefined;
|
|
38
38
|
name?: string | undefined;
|
|
39
|
-
label?: string | undefined;
|
|
40
39
|
disabled?: boolean | undefined;
|
|
40
|
+
label?: string | undefined;
|
|
41
|
+
checked?: boolean | undefined;
|
|
41
42
|
value?: string | undefined;
|
|
42
43
|
hidden?: boolean | undefined;
|
|
43
|
-
checked?: boolean | undefined;
|
|
44
44
|
};
|
|
45
45
|
events: {
|
|
46
46
|
focus: FocusEvent;
|
|
@@ -10,13 +10,13 @@
|
|
|
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
|
+
required?: boolean | undefined;
|
|
15
16
|
value?: (string | number | undefined);
|
|
16
17
|
position?: PopupPosition | undefined;
|
|
17
18
|
hidden?: boolean | undefined;
|
|
18
19
|
readonly?: boolean | undefined;
|
|
19
|
-
required?: boolean | undefined;
|
|
20
20
|
editable?: boolean | undefined;
|
|
21
21
|
}, {
|
|
22
22
|
change: CustomEvent<any>;
|
|
@@ -37,13 +37,13 @@ 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
|
+
required?: boolean | undefined;
|
|
42
43
|
value?: (string | number | undefined);
|
|
43
44
|
position?: PopupPosition | undefined;
|
|
44
45
|
hidden?: boolean | undefined;
|
|
45
46
|
readonly?: boolean | undefined;
|
|
46
|
-
required?: boolean | undefined;
|
|
47
47
|
editable?: boolean | undefined;
|
|
48
48
|
};
|
|
49
49
|
events: {
|
|
@@ -9,13 +9,13 @@ export default class SelectTags extends SvelteComponent<{
|
|
|
9
9
|
searchValue?: string;
|
|
10
10
|
}[];
|
|
11
11
|
class?: string | undefined;
|
|
12
|
-
invalid?: boolean | undefined;
|
|
13
12
|
disabled?: boolean | undefined;
|
|
13
|
+
invalid?: boolean | undefined;
|
|
14
|
+
max?: number | undefined;
|
|
15
|
+
required?: boolean | undefined;
|
|
14
16
|
hidden?: boolean | undefined;
|
|
15
17
|
readonly?: boolean | undefined;
|
|
16
18
|
values?: string[] | undefined;
|
|
17
|
-
required?: boolean | undefined;
|
|
18
|
-
max?: number | undefined;
|
|
19
19
|
}, {
|
|
20
20
|
RemoveValue: CustomEvent<any>;
|
|
21
21
|
AddValue: CustomEvent<any>;
|
|
@@ -36,13 +36,13 @@ declare const __propDef: {
|
|
|
36
36
|
searchValue?: string;
|
|
37
37
|
}[];
|
|
38
38
|
class?: string | undefined;
|
|
39
|
-
invalid?: boolean | undefined;
|
|
40
39
|
disabled?: boolean | undefined;
|
|
40
|
+
invalid?: boolean | undefined;
|
|
41
|
+
max?: number | undefined;
|
|
42
|
+
required?: boolean | undefined;
|
|
41
43
|
hidden?: boolean | undefined;
|
|
42
44
|
readonly?: boolean | undefined;
|
|
43
45
|
values?: string[] | undefined;
|
|
44
|
-
required?: boolean | undefined;
|
|
45
|
-
max?: number | undefined;
|
|
46
46
|
};
|
|
47
47
|
events: {
|
|
48
48
|
RemoveValue: CustomEvent<any>;
|
|
@@ -10,12 +10,12 @@
|
|
|
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
|
+
required?: boolean | undefined;
|
|
15
16
|
value?: (string | number | undefined);
|
|
16
17
|
hidden?: boolean | undefined;
|
|
17
18
|
readonly?: boolean | undefined;
|
|
18
|
-
required?: boolean | undefined;
|
|
19
19
|
}, {
|
|
20
20
|
change: CustomEvent<any>;
|
|
21
21
|
} & {
|
|
@@ -32,12 +32,12 @@ 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
|
+
required?: boolean | undefined;
|
|
37
38
|
value?: (string | number | undefined);
|
|
38
39
|
hidden?: boolean | undefined;
|
|
39
40
|
readonly?: boolean | undefined;
|
|
40
|
-
required?: boolean | undefined;
|
|
41
41
|
};
|
|
42
42
|
events: {
|
|
43
43
|
change: CustomEvent<any>;
|
|
@@ -12,17 +12,17 @@
|
|
|
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
|
+
max?: number | undefined;
|
|
18
|
+
min?: number | undefined;
|
|
19
|
+
step?: number | undefined;
|
|
17
20
|
value?: number | undefined;
|
|
18
21
|
hidden?: boolean | undefined;
|
|
19
22
|
readonly?: boolean | undefined;
|
|
20
23
|
values?: [number, number] | undefined;
|
|
21
|
-
max?: number | undefined;
|
|
22
|
-
min?: number | undefined;
|
|
23
24
|
sliderLabel?: string | undefined;
|
|
24
25
|
sliderLabels?: [string, string] | undefined;
|
|
25
|
-
step?: number | undefined;
|
|
26
26
|
optionLabels?: string[] | number[] | undefined;
|
|
27
27
|
}, {
|
|
28
28
|
change: CustomEvent<any>;
|
|
@@ -38,17 +38,17 @@ declare const __propDef: {
|
|
|
38
38
|
props: {
|
|
39
39
|
[x: string]: any;
|
|
40
40
|
class?: string | undefined;
|
|
41
|
-
invalid?: boolean | undefined;
|
|
42
41
|
disabled?: boolean | undefined;
|
|
42
|
+
invalid?: boolean | undefined;
|
|
43
|
+
max?: number | undefined;
|
|
44
|
+
min?: number | undefined;
|
|
45
|
+
step?: number | undefined;
|
|
43
46
|
value?: number | undefined;
|
|
44
47
|
hidden?: boolean | undefined;
|
|
45
48
|
readonly?: boolean | undefined;
|
|
46
49
|
values?: [number, number] | undefined;
|
|
47
|
-
max?: number | undefined;
|
|
48
|
-
min?: number | undefined;
|
|
49
50
|
sliderLabel?: string | undefined;
|
|
50
51
|
sliderLabels?: [string, string] | undefined;
|
|
51
|
-
step?: number | undefined;
|
|
52
52
|
optionLabels?: string[] | number[] | undefined;
|
|
53
53
|
};
|
|
54
54
|
events: {
|
|
@@ -9,13 +9,13 @@
|
|
|
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;
|
|
16
|
+
required?: boolean | undefined;
|
|
15
17
|
hidden?: boolean | undefined;
|
|
16
18
|
readonly?: boolean | undefined;
|
|
17
|
-
required?: boolean | undefined;
|
|
18
|
-
checked?: boolean | "mixed" | undefined;
|
|
19
19
|
}, {
|
|
20
20
|
change: CustomEvent<any>;
|
|
21
21
|
} & {
|
|
@@ -32,13 +32,13 @@ 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;
|
|
39
|
+
required?: boolean | undefined;
|
|
38
40
|
hidden?: boolean | undefined;
|
|
39
41
|
readonly?: boolean | undefined;
|
|
40
|
-
required?: boolean | undefined;
|
|
41
|
-
checked?: boolean | "mixed" | undefined;
|
|
42
42
|
};
|
|
43
43
|
events: {
|
|
44
44
|
change: CustomEvent<any>;
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
$getSelection as getSelection,
|
|
42
42
|
$isRangeSelection as isRangeSelection,
|
|
43
43
|
} from 'lexical';
|
|
44
|
-
import { blockButtonTypes, textFormatButtonTypes } from '
|
|
44
|
+
import { blockButtonTypes, textFormatButtonTypes } from '.';
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* Lexical editor configuration.
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
/** @typedef {typeof __propDef.events} LexicalRootEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} LexicalRootSlots */
|
|
4
4
|
export default class LexicalRoot extends SvelteComponent<{
|
|
5
|
-
invalid?: boolean | undefined;
|
|
6
5
|
disabled?: boolean | undefined;
|
|
6
|
+
invalid?: boolean | undefined;
|
|
7
|
+
required?: boolean | undefined;
|
|
7
8
|
value?: string | undefined;
|
|
8
9
|
hidden?: boolean | undefined;
|
|
9
10
|
readonly?: boolean | undefined;
|
|
10
|
-
required?: boolean | undefined;
|
|
11
11
|
}, {
|
|
12
12
|
[evt: string]: CustomEvent<any>;
|
|
13
13
|
}, {}> {
|
|
@@ -18,12 +18,12 @@ export type LexicalRootSlots = typeof __propDef.slots;
|
|
|
18
18
|
import { SvelteComponent } from "svelte";
|
|
19
19
|
declare const __propDef: {
|
|
20
20
|
props: {
|
|
21
|
-
invalid?: boolean | undefined;
|
|
22
21
|
disabled?: boolean | undefined;
|
|
22
|
+
invalid?: boolean | undefined;
|
|
23
|
+
required?: boolean | undefined;
|
|
23
24
|
value?: string | undefined;
|
|
24
25
|
hidden?: boolean | undefined;
|
|
25
26
|
readonly?: boolean | undefined;
|
|
26
|
-
required?: boolean | undefined;
|
|
27
27
|
};
|
|
28
28
|
events: {
|
|
29
29
|
[evt: string]: CustomEvent<any>;
|
|
@@ -8,11 +8,8 @@
|
|
|
8
8
|
import { _ } from 'svelte-i18n';
|
|
9
9
|
import { writable } from 'svelte/store';
|
|
10
10
|
import Alert from '../alert/alert.svelte';
|
|
11
|
-
import { blockButtonTypes, inlineButtonTypes } from '
|
|
12
|
-
import {
|
|
13
|
-
convertMarkdown as convertMarkdownToLexical,
|
|
14
|
-
initEditor,
|
|
15
|
-
} from './core';
|
|
11
|
+
import { blockButtonTypes, inlineButtonTypes } from '.';
|
|
12
|
+
import { convertMarkdown as convertMarkdownToLexical, initEditor } from './core';
|
|
16
13
|
import LexicalRoot from './lexical-root.svelte';
|
|
17
14
|
import EditorToolbar from './toolbar/editor-toolbar.svelte';
|
|
18
15
|
import TextArea from '../text-field/text-area.svelte';
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
/** A rich text editor based on Lexical. */
|
|
5
5
|
export default class TextEditor extends SvelteComponent<{
|
|
6
6
|
[x: string]: any;
|
|
7
|
-
invalid?: boolean | undefined;
|
|
8
7
|
disabled?: boolean | undefined;
|
|
8
|
+
invalid?: boolean | undefined;
|
|
9
|
+
required?: boolean | undefined;
|
|
9
10
|
value?: string | undefined;
|
|
10
11
|
hidden?: boolean | undefined;
|
|
11
12
|
readonly?: boolean | undefined;
|
|
12
13
|
flex?: boolean | undefined;
|
|
13
|
-
required?: boolean | undefined;
|
|
14
14
|
modes?: TextEditorMode[] | undefined;
|
|
15
15
|
buttons?: (TextEditorInlineType | TextEditorBlockType)[] | undefined;
|
|
16
16
|
}, {
|
|
@@ -24,13 +24,13 @@ import { SvelteComponent } from "svelte";
|
|
|
24
24
|
declare const __propDef: {
|
|
25
25
|
props: {
|
|
26
26
|
[x: string]: any;
|
|
27
|
-
invalid?: boolean | undefined;
|
|
28
27
|
disabled?: boolean | undefined;
|
|
28
|
+
invalid?: boolean | undefined;
|
|
29
|
+
required?: boolean | undefined;
|
|
29
30
|
value?: string | undefined;
|
|
30
31
|
hidden?: boolean | undefined;
|
|
31
32
|
readonly?: boolean | undefined;
|
|
32
33
|
flex?: boolean | undefined;
|
|
33
|
-
required?: boolean | undefined;
|
|
34
34
|
modes?: TextEditorMode[] | undefined;
|
|
35
35
|
buttons?: (TextEditorInlineType | TextEditorBlockType)[] | undefined;
|
|
36
36
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { getContext } from 'svelte';
|
|
3
3
|
import { _ } from 'svelte-i18n';
|
|
4
|
+
import { availableButtons, blockButtonTypes, inlineButtonTypes } from '..';
|
|
4
5
|
import ButtonGroup from '../../button/button-group.svelte';
|
|
5
6
|
import Button from '../../button/button.svelte';
|
|
6
7
|
import Divider from '../../divider/divider.svelte';
|
|
@@ -8,11 +9,6 @@
|
|
|
8
9
|
import Icon from '../../icon/icon.svelte';
|
|
9
10
|
import MenuButton from '../../menu/menu-button.svelte';
|
|
10
11
|
import Menu from '../../menu/menu.svelte';
|
|
11
|
-
import {
|
|
12
|
-
availableButtons,
|
|
13
|
-
blockButtonTypes,
|
|
14
|
-
inlineButtonTypes,
|
|
15
|
-
} from '..';
|
|
16
12
|
import FormatTextButton from './format-text-button.svelte';
|
|
17
13
|
import InsertLinkButton from './insert-link-button.svelte';
|
|
18
14
|
import ToggleBlockMenuItem from './toggle-block-menu-item.svelte';
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { FORMAT_TEXT_COMMAND } from 'lexical';
|
|
3
3
|
import { getContext } from 'svelte';
|
|
4
4
|
import { _ } from 'svelte-i18n';
|
|
5
|
+
import { availableButtons } from '..';
|
|
5
6
|
import Button from '../../button/button.svelte';
|
|
6
7
|
import Icon from '../../icon/icon.svelte';
|
|
7
|
-
import { availableButtons } from '..';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Button type.
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
} from 'lexical';
|
|
14
14
|
import { getContext, onMount } from 'svelte';
|
|
15
15
|
import { _ } from 'svelte-i18n';
|
|
16
|
-
import { isMac, matchShortcuts } from '../../../services/events';
|
|
17
|
-
import TextInput from '../../text-field/text-input.svelte';
|
|
18
16
|
import { availableButtons } from '..';
|
|
19
|
-
import
|
|
20
|
-
import Dialog from '../../dialog/dialog.svelte';
|
|
17
|
+
import { isMac, matchShortcuts } from '../../../services/events';
|
|
21
18
|
import Button from '../../button/button.svelte';
|
|
19
|
+
import Dialog from '../../dialog/dialog.svelte';
|
|
20
|
+
import Icon from '../../icon/icon.svelte';
|
|
21
|
+
import TextInput from '../../text-field/text-input.svelte';
|
|
22
22
|
|
|
23
23
|
const id = generateElementId('insert-link');
|
|
24
24
|
|
|
@@ -9,16 +9,16 @@
|
|
|
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
|
+
max?: number | undefined;
|
|
15
|
+
min?: number | undefined;
|
|
16
|
+
required?: boolean | undefined;
|
|
17
|
+
step?: number | undefined;
|
|
14
18
|
value?: string | undefined;
|
|
15
19
|
hidden?: boolean | undefined;
|
|
16
20
|
readonly?: boolean | undefined;
|
|
17
21
|
flex?: boolean | undefined;
|
|
18
|
-
required?: boolean | undefined;
|
|
19
|
-
max?: number | undefined;
|
|
20
|
-
min?: number | undefined;
|
|
21
|
-
step?: number | undefined;
|
|
22
22
|
}, {
|
|
23
23
|
keydown: KeyboardEvent;
|
|
24
24
|
keyup: KeyboardEvent;
|
|
@@ -44,16 +44,16 @@ 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
|
+
max?: number | undefined;
|
|
50
|
+
min?: number | undefined;
|
|
51
|
+
required?: boolean | undefined;
|
|
52
|
+
step?: number | undefined;
|
|
49
53
|
value?: string | undefined;
|
|
50
54
|
hidden?: boolean | undefined;
|
|
51
55
|
readonly?: boolean | undefined;
|
|
52
56
|
flex?: boolean | undefined;
|
|
53
|
-
required?: boolean | undefined;
|
|
54
|
-
max?: number | undefined;
|
|
55
|
-
min?: number | undefined;
|
|
56
|
-
step?: number | undefined;
|
|
57
57
|
};
|
|
58
58
|
events: {
|
|
59
59
|
keydown: KeyboardEvent;
|
|
@@ -10,13 +10,13 @@
|
|
|
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
|
+
required?: boolean | undefined;
|
|
15
16
|
value?: string | undefined;
|
|
16
17
|
hidden?: boolean | undefined;
|
|
17
18
|
readonly?: boolean | undefined;
|
|
18
19
|
flex?: boolean | undefined;
|
|
19
|
-
required?: boolean | undefined;
|
|
20
20
|
}, {
|
|
21
21
|
keydown: KeyboardEvent;
|
|
22
22
|
keyup: KeyboardEvent;
|
|
@@ -39,13 +39,13 @@ 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
|
+
required?: boolean | undefined;
|
|
44
45
|
value?: string | undefined;
|
|
45
46
|
hidden?: boolean | undefined;
|
|
46
47
|
readonly?: boolean | undefined;
|
|
47
48
|
flex?: boolean | undefined;
|
|
48
|
-
required?: boolean | undefined;
|
|
49
49
|
};
|
|
50
50
|
events: {
|
|
51
51
|
keydown: KeyboardEvent;
|
|
@@ -10,14 +10,14 @@
|
|
|
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
|
-
|
|
16
|
+
required?: boolean | undefined;
|
|
16
17
|
value?: string | undefined;
|
|
17
18
|
hidden?: boolean | undefined;
|
|
18
19
|
readonly?: boolean | undefined;
|
|
19
20
|
flex?: boolean | undefined;
|
|
20
|
-
required?: boolean | undefined;
|
|
21
21
|
}, {
|
|
22
22
|
keydown: KeyboardEvent;
|
|
23
23
|
keyup: KeyboardEvent;
|
|
@@ -66,14 +66,14 @@ 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
|
-
|
|
72
|
+
required?: boolean | undefined;
|
|
72
73
|
value?: string | undefined;
|
|
73
74
|
hidden?: boolean | undefined;
|
|
74
75
|
readonly?: boolean | undefined;
|
|
75
76
|
flex?: boolean | undefined;
|
|
76
|
-
required?: boolean | undefined;
|
|
77
77
|
};
|
|
78
78
|
events: {
|
|
79
79
|
keydown: KeyboardEvent;
|
|
@@ -11,13 +11,13 @@ 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
|
+
required?: boolean | undefined;
|
|
16
17
|
value?: string | undefined;
|
|
17
18
|
hidden?: boolean | undefined;
|
|
18
19
|
readonly?: boolean | undefined;
|
|
19
20
|
flex?: boolean | undefined;
|
|
20
|
-
required?: boolean | undefined;
|
|
21
21
|
autoResize?: boolean | undefined;
|
|
22
22
|
}, {
|
|
23
23
|
keydown: KeyboardEvent;
|
|
@@ -38,13 +38,13 @@ 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
|
+
required?: boolean | undefined;
|
|
43
44
|
value?: string | undefined;
|
|
44
45
|
hidden?: boolean | undefined;
|
|
45
46
|
readonly?: boolean | undefined;
|
|
46
47
|
flex?: boolean | undefined;
|
|
47
|
-
required?: boolean | undefined;
|
|
48
48
|
autoResize?: boolean | undefined;
|
|
49
49
|
};
|
|
50
50
|
events: {
|
|
@@ -10,8 +10,9 @@ 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
|
+
required?: boolean | undefined;
|
|
15
16
|
value?: string | number | undefined;
|
|
16
17
|
role?: "textbox" | "searchbox" | "combobox" | "spinbutton" | undefined;
|
|
17
18
|
hidden?: boolean | undefined;
|
|
@@ -19,9 +20,8 @@ export default class TextInput extends SvelteComponent<{
|
|
|
19
20
|
readonly?: boolean | undefined;
|
|
20
21
|
keyShortcuts?: string | undefined;
|
|
21
22
|
flex?: boolean | undefined;
|
|
22
|
-
required?: boolean | undefined;
|
|
23
23
|
showInlineLabel?: boolean | undefined;
|
|
24
|
-
inputmode?: "search" | "text" | "
|
|
24
|
+
inputmode?: "search" | "text" | "email" | "tel" | "numeric" | "decimal" | "url" | undefined;
|
|
25
25
|
}, {
|
|
26
26
|
keydown: KeyboardEvent;
|
|
27
27
|
keyup: KeyboardEvent;
|
|
@@ -71,8 +71,8 @@ export default class TextInput extends SvelteComponent<{
|
|
|
71
71
|
set showInlineLabel(_: boolean | undefined);
|
|
72
72
|
get showInlineLabel(): boolean | undefined;
|
|
73
73
|
/**accessor*/
|
|
74
|
-
set inputmode(_: "search" | "text" | "
|
|
75
|
-
get inputmode(): "search" | "text" | "
|
|
74
|
+
set inputmode(_: "search" | "text" | "email" | "tel" | "numeric" | "decimal" | "url" | undefined);
|
|
75
|
+
get inputmode(): "search" | "text" | "email" | "tel" | "numeric" | "decimal" | "url" | undefined;
|
|
76
76
|
}
|
|
77
77
|
export type TextInputProps = typeof __propDef.props;
|
|
78
78
|
export type TextInputEvents = typeof __propDef.events;
|
|
@@ -83,8 +83,9 @@ 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
|
+
required?: boolean | undefined;
|
|
88
89
|
value?: string | number | undefined;
|
|
89
90
|
role?: "textbox" | "searchbox" | "combobox" | "spinbutton" | undefined;
|
|
90
91
|
hidden?: boolean | undefined;
|
|
@@ -92,9 +93,8 @@ declare const __propDef: {
|
|
|
92
93
|
readonly?: boolean | undefined;
|
|
93
94
|
keyShortcuts?: string | undefined;
|
|
94
95
|
flex?: boolean | undefined;
|
|
95
|
-
required?: boolean | undefined;
|
|
96
96
|
showInlineLabel?: boolean | undefined;
|
|
97
|
-
inputmode?: "search" | "text" | "
|
|
97
|
+
inputmode?: "search" | "text" | "email" | "tel" | "numeric" | "decimal" | "url" | undefined;
|
|
98
98
|
};
|
|
99
99
|
events: {
|
|
100
100
|
keydown: KeyboardEvent;
|
|
@@ -7,7 +7,7 @@ export default class Modal extends SvelteComponent<{
|
|
|
7
7
|
class?: string | undefined;
|
|
8
8
|
close?: ((returnValue: string) => void) | undefined;
|
|
9
9
|
dialog?: HTMLDialogElement | undefined;
|
|
10
|
-
role?: "dialog" | "
|
|
10
|
+
role?: "dialog" | "none" | "alertdialog" | undefined;
|
|
11
11
|
open?: boolean | undefined;
|
|
12
12
|
showBackdrop?: boolean | undefined;
|
|
13
13
|
lightDismiss?: boolean | undefined;
|
|
@@ -29,8 +29,8 @@ export default class Modal extends SvelteComponent<{
|
|
|
29
29
|
set class(_: string | undefined);
|
|
30
30
|
get class(): string | undefined;
|
|
31
31
|
/**accessor*/
|
|
32
|
-
set role(_: "dialog" | "
|
|
33
|
-
get role(): "dialog" | "
|
|
32
|
+
set role(_: "dialog" | "none" | "alertdialog" | undefined);
|
|
33
|
+
get role(): "dialog" | "none" | "alertdialog" | undefined;
|
|
34
34
|
/**accessor*/
|
|
35
35
|
set open(_: boolean | undefined);
|
|
36
36
|
get open(): boolean | undefined;
|
|
@@ -60,7 +60,7 @@ declare const __propDef: {
|
|
|
60
60
|
class?: string | undefined;
|
|
61
61
|
close?: ((returnValue: string) => void) | undefined;
|
|
62
62
|
dialog?: HTMLDialogElement | undefined;
|
|
63
|
-
role?: "dialog" | "
|
|
63
|
+
role?: "dialog" | "none" | "alertdialog" | undefined;
|
|
64
64
|
open?: boolean | undefined;
|
|
65
65
|
showBackdrop?: boolean | undefined;
|
|
66
66
|
lightDismiss?: boolean | undefined;
|
package/package/index.js
CHANGED
|
@@ -10,14 +10,7 @@ import { addMessages, init } from 'svelte-i18n';
|
|
|
10
10
|
*/
|
|
11
11
|
export const initLocales = ({ fallbackLocale = 'en', initialLocale = 'en' } = {}) => {
|
|
12
12
|
/** @type {{ [key: string]: { strings: object }}} */
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
// The file path must be relative during local development, or the import may fail when using
|
|
16
|
-
// `pnpm link -g @sveltia/ui`. On the other hand, it must start with `$lib` when being imported
|
|
17
|
-
// with `pnpm install @sveltia/ui`, otherwise the path cannot be resolved.
|
|
18
|
-
if (!Object.keys(modules).length) {
|
|
19
|
-
modules = import.meta.glob('$lib/locales/*.js', { eager: true });
|
|
20
|
-
}
|
|
13
|
+
const modules = import.meta.glob('./locales/*.js', { eager: true });
|
|
21
14
|
|
|
22
15
|
Object.entries(modules).forEach(([path, { strings }]) => {
|
|
23
16
|
const [, locale] = /** @type {string[]} */ (path.match(/([a-zA-Z-]+)\.js/));
|