svseeds 0.4.5 → 0.4.7
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/_svseeds/Accordion.svelte +7 -7
- package/_svseeds/Accordion.svelte.d.ts +4 -4
- package/_svseeds/DarkToggle.svelte +5 -5
- package/_svseeds/DarkToggle.svelte.d.ts +3 -3
- package/_svseeds/TagsInputField.svelte +13 -17
- package/_svseeds/TagsInputField.svelte.d.ts +10 -10
- package/_svseeds/ToggleGroupField.svelte +9 -9
- package/_svseeds/ToggleGroupField.svelte.d.ts +6 -6
- package/_svseeds/_Button.svelte +5 -5
- package/_svseeds/_Button.svelte.d.ts +3 -3
- package/_svseeds/_CheckField.svelte +9 -9
- package/_svseeds/_CheckField.svelte.d.ts +6 -6
- package/_svseeds/_ColorPicker.svelte +7 -7
- package/_svseeds/_ColorPicker.svelte.d.ts +4 -4
- package/_svseeds/_ComboBox.svelte +3 -3
- package/_svseeds/_ComboBox.svelte.d.ts +2 -2
- package/_svseeds/_ContextMenu.svelte +7 -7
- package/_svseeds/_ContextMenu.svelte.d.ts +4 -4
- package/_svseeds/_Disclosure.svelte +10 -10
- package/_svseeds/_Disclosure.svelte.d.ts +6 -6
- package/_svseeds/_HotkeyCapture.svelte +7 -7
- package/_svseeds/_HotkeyCapture.svelte.d.ts +4 -4
- package/_svseeds/_Modal.svelte +7 -7
- package/_svseeds/_Modal.svelte.d.ts +4 -4
- package/_svseeds/_ProgressTracker.svelte +5 -5
- package/_svseeds/_ProgressTracker.svelte.d.ts +3 -3
- package/_svseeds/_SelectField.svelte +7 -7
- package/_svseeds/_SelectField.svelte.d.ts +5 -5
- package/_svseeds/_Slider.svelte +9 -9
- package/_svseeds/_Slider.svelte.d.ts +5 -5
- package/_svseeds/_Sortable.svelte +21 -21
- package/_svseeds/_Sortable.svelte.d.ts +11 -11
- package/_svseeds/_Tabs.svelte +5 -5
- package/_svseeds/_Tabs.svelte.d.ts +3 -3
- package/_svseeds/{TagsInput.svelte → _TagsInput.svelte} +30 -37
- package/_svseeds/{TagsInput.svelte.d.ts → _TagsInput.svelte.d.ts} +11 -15
- package/_svseeds/_TextField.svelte +9 -9
- package/_svseeds/_TextField.svelte.d.ts +7 -7
- package/_svseeds/_Toggle.svelte +7 -7
- package/_svseeds/_Toggle.svelte.d.ts +4 -4
- package/_svseeds/_ToggleGroup.svelte +5 -5
- package/_svseeds/_ToggleGroup.svelte.d.ts +3 -3
- package/_svseeds/_Tooltip.svelte +9 -9
- package/_svseeds/_Tooltip.svelte.d.ts +5 -5
- package/_svseeds/core.d.ts +1 -1
- package/index.d.ts +22 -23
- package/index.js +1 -2
- package/package.json +1 -1
- package/_svseeds/_Badge.svelte +0 -73
- package/_svseeds/_Badge.svelte.d.ts +0 -33
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
@component
|
|
3
|
-
default value:
|
|
3
|
+
default value: `(value)`
|
|
4
4
|
```ts
|
|
5
5
|
interface AccordionProps {
|
|
6
6
|
labels?: string[];
|
|
7
|
-
current?: number; // bindable
|
|
8
|
-
status?: string; // bindable
|
|
7
|
+
current?: number; // bindable (-1)
|
|
8
|
+
status?: string; // bindable (STATE.NEUTRAL)
|
|
9
9
|
style?: SVSStyle;
|
|
10
10
|
deps?: AccordionDeps;
|
|
11
|
-
[key: string]: unknown | Snippet;
|
|
11
|
+
[key: string]: unknown | Snippet; // contents of each disclosure
|
|
12
12
|
}
|
|
13
13
|
interface AccordionDeps {
|
|
14
14
|
svsDisclosure?: Omit<DisclosureProps, DisclosureReqdProps | DisclosureBindProps>;
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
<script module lang="ts">
|
|
19
19
|
export interface AccordionProps {
|
|
20
20
|
labels?: string[];
|
|
21
|
-
current?: number; // bindable
|
|
22
|
-
status?: string; // bindable
|
|
21
|
+
current?: number; // bindable (-1)
|
|
22
|
+
status?: string; // bindable (STATE.NEUTRAL)
|
|
23
23
|
style?: SVSStyle;
|
|
24
24
|
deps?: AccordionDeps;
|
|
25
|
-
[key: string]: unknown | Snippet;
|
|
25
|
+
[key: string]: unknown | Snippet; // contents of each disclosure
|
|
26
26
|
}
|
|
27
27
|
export interface AccordionDeps {
|
|
28
28
|
svsDisclosure?: Omit<DisclosureProps, DisclosureReqdProps | DisclosureBindProps>;
|
|
@@ -15,15 +15,15 @@ import { type Snippet } from "svelte";
|
|
|
15
15
|
import { type SVSStyle } from "./core";
|
|
16
16
|
import { type DisclosureProps, type DisclosureReqdProps, type DisclosureBindProps } from "./_Disclosure.svelte";
|
|
17
17
|
/**
|
|
18
|
-
* default value:
|
|
18
|
+
* default value: `(value)`
|
|
19
19
|
* ```ts
|
|
20
20
|
* interface AccordionProps {
|
|
21
21
|
* labels?: string[];
|
|
22
|
-
* current?: number; // bindable
|
|
23
|
-
* status?: string; // bindable
|
|
22
|
+
* current?: number; // bindable (-1)
|
|
23
|
+
* status?: string; // bindable (STATE.NEUTRAL)
|
|
24
24
|
* style?: SVSStyle;
|
|
25
25
|
* deps?: AccordionDeps;
|
|
26
|
-
* [key: string]: unknown | Snippet;
|
|
26
|
+
* [key: string]: unknown | Snippet; // contents of each disclosure
|
|
27
27
|
* }
|
|
28
28
|
* interface AccordionDeps {
|
|
29
29
|
* svsDisclosure?: Omit<DisclosureProps, DisclosureReqdProps | DisclosureBindProps>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
@component
|
|
3
|
-
default value:
|
|
3
|
+
default value: `(value)`
|
|
4
4
|
```ts
|
|
5
5
|
interface DarkToggleProps {
|
|
6
|
-
dark?: boolean; // bindable
|
|
7
|
-
status?: string; // bindable
|
|
6
|
+
dark?: boolean; // bindable (prefers-color-scheme)
|
|
7
|
+
status?: string; // bindable (STATE.NEUTRAL)
|
|
8
8
|
element?: HTMLButtonElement; // bindable
|
|
9
9
|
deps?: DarkToggleDeps;
|
|
10
10
|
}
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
-->
|
|
16
16
|
<script module lang="ts">
|
|
17
17
|
export interface DarkToggleProps {
|
|
18
|
-
dark?: boolean; // bindable
|
|
19
|
-
status?: string; // bindable
|
|
18
|
+
dark?: boolean; // bindable (prefers-color-scheme)
|
|
19
|
+
status?: string; // bindable (STATE.NEUTRAL)
|
|
20
20
|
element?: HTMLButtonElement; // bindable
|
|
21
21
|
deps?: DarkToggleDeps;
|
|
22
22
|
}
|
|
@@ -16,11 +16,11 @@ export declare const THEME: {
|
|
|
16
16
|
export declare function setThemeToRoot(theme?: string): void;
|
|
17
17
|
import { type ToggleProps, type ToggleReqdProps, type ToggleBindProps } from "./_Toggle.svelte";
|
|
18
18
|
/**
|
|
19
|
-
* default value:
|
|
19
|
+
* default value: `(value)`
|
|
20
20
|
* ```ts
|
|
21
21
|
* interface DarkToggleProps {
|
|
22
|
-
* dark?: boolean; // bindable
|
|
23
|
-
* status?: string; // bindable
|
|
22
|
+
* dark?: boolean; // bindable (prefers-color-scheme)
|
|
23
|
+
* status?: string; // bindable (STATE.NEUTRAL)
|
|
24
24
|
* element?: HTMLButtonElement; // bindable
|
|
25
25
|
* deps?: DarkToggleDeps;
|
|
26
26
|
* }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
@component
|
|
3
|
-
default value:
|
|
3
|
+
default value: `(value)`
|
|
4
4
|
```ts
|
|
5
5
|
interface TagsInputFieldProps {
|
|
6
6
|
label?: string;
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
left?: Snippet<[string, string[], HTMLInputElement | undefined]>; // Snippet<[status,values,element]>
|
|
10
10
|
right?: Snippet<[string, string[], HTMLInputElement | undefined]>; // Snippet<[status,values,element]>
|
|
11
11
|
bottom?: string;
|
|
12
|
-
descFirst?: boolean; //
|
|
12
|
+
descFirst?: boolean; // (false)
|
|
13
13
|
values?: string[]; // bindable
|
|
14
14
|
min?: TagsInputFieldCountValidation;
|
|
15
15
|
max?: TagsInputFieldCountValidation;
|
|
16
16
|
constraints?: TagsInputFieldConstraint[];
|
|
17
17
|
validations?: TagsInputFieldValidation[];
|
|
18
|
-
status?: string; // bindable
|
|
18
|
+
status?: string; // bindable (STATE.NEUTRAL)
|
|
19
19
|
style?: SVSStyle;
|
|
20
20
|
element?: HTMLInputElement; // bindable
|
|
21
21
|
deps?: TagsInputFieldDeps;
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
interface TagsInputFieldDeps extends TagsInputDeps {
|
|
24
24
|
svsTagsInput?: Omit<TagsInputProps, TagsInputReqdProps | TagsInputBindProps | "deps">;
|
|
25
25
|
}
|
|
26
|
-
type TagsInputFieldConstraint = (value: string, validity: ValidityState) => string;
|
|
27
|
-
type TagsInputFieldValidation = (values: string[], validity: ValidityState) => string;
|
|
26
|
+
type TagsInputFieldConstraint = (value: string, validity: ValidityState) => string | undefined;
|
|
27
|
+
type TagsInputFieldValidation = (values: string[], validity: ValidityState) => string | undefined;
|
|
28
28
|
type TagsInputFieldCountValidation = {
|
|
29
29
|
value: number;
|
|
30
30
|
message: string;
|
|
@@ -39,31 +39,31 @@
|
|
|
39
39
|
left?: Snippet<[string, string[], HTMLInputElement | undefined]>; // Snippet<[status,values,element]>
|
|
40
40
|
right?: Snippet<[string, string[], HTMLInputElement | undefined]>; // Snippet<[status,values,element]>
|
|
41
41
|
bottom?: string;
|
|
42
|
-
descFirst?: boolean; //
|
|
42
|
+
descFirst?: boolean; // (false)
|
|
43
43
|
values?: string[]; // bindable
|
|
44
44
|
min?: TagsInputFieldCountValidation;
|
|
45
45
|
max?: TagsInputFieldCountValidation;
|
|
46
46
|
constraints?: TagsInputFieldConstraint[];
|
|
47
47
|
validations?: TagsInputFieldValidation[];
|
|
48
|
-
status?: string; // bindable
|
|
48
|
+
status?: string; // bindable (STATE.NEUTRAL)
|
|
49
49
|
style?: SVSStyle;
|
|
50
50
|
element?: HTMLInputElement; // bindable
|
|
51
51
|
deps?: TagsInputFieldDeps;
|
|
52
52
|
}
|
|
53
|
-
export interface TagsInputFieldDeps
|
|
54
|
-
svsTagsInput?: Omit<TagsInputProps, TagsInputReqdProps | TagsInputBindProps
|
|
53
|
+
export interface TagsInputFieldDeps {
|
|
54
|
+
svsTagsInput?: Omit<TagsInputProps, TagsInputReqdProps | TagsInputBindProps>;
|
|
55
55
|
}
|
|
56
56
|
export type TagsInputFieldReqdProps = never;
|
|
57
57
|
export type TagsInputFieldBindProps = "values" | "status" | "element";
|
|
58
|
-
export type TagsInputFieldConstraint = (value: string, validity: ValidityState) => string;
|
|
59
|
-
export type TagsInputFieldValidation = (values: string[], validity: ValidityState) => string;
|
|
58
|
+
export type TagsInputFieldConstraint = (value: string, validity: ValidityState) => string | undefined;
|
|
59
|
+
export type TagsInputFieldValidation = (values: string[], validity: ValidityState) => string | undefined;
|
|
60
60
|
export type TagsInputFieldCountValidation = { value: number, message: string };
|
|
61
61
|
|
|
62
62
|
const preset = "svs-tags-input-field";
|
|
63
63
|
|
|
64
64
|
import { type Snippet, untrack } from "svelte";
|
|
65
65
|
import { type SVSStyle, STATE, PARTS, elemId, fnClass, isNeutral, omit } from "./core";
|
|
66
|
-
import TagsInput, { type TagsInputProps, type TagsInputReqdProps, type TagsInputBindProps
|
|
66
|
+
import TagsInput, { type TagsInputProps, type TagsInputReqdProps, type TagsInputBindProps } from "./_TagsInput.svelte";
|
|
67
67
|
</script>
|
|
68
68
|
|
|
69
69
|
<script lang="ts">
|
|
@@ -82,10 +82,6 @@
|
|
|
82
82
|
if (min) validations.unshift(() => values.length < min.value ? min.message : "");
|
|
83
83
|
|
|
84
84
|
// *** Initialize Deps *** //
|
|
85
|
-
const svsBadge = {
|
|
86
|
-
...omit(deps?.svsBadge, "style"),
|
|
87
|
-
style: deps?.svsBadge?.style ?? `${preset} svs-tags-input svs-badge`,
|
|
88
|
-
};
|
|
89
85
|
const svsTagsInput = {
|
|
90
86
|
...omit(deps?.svsTagsInput, "style", "attributes"),
|
|
91
87
|
events: { onadd, onremove: deps?.svsTagsInput?.events?.onremove },
|
|
@@ -173,7 +169,7 @@
|
|
|
173
169
|
{@render desc(descFirst)}
|
|
174
170
|
<div class={cls(PARTS.MIDDLE, status)}>
|
|
175
171
|
{@render side(PARTS.LEFT, left)}
|
|
176
|
-
<TagsInput bind:values bind:value bind:status bind:element bind:ariaErrMsgId={idMsg} {...svsTagsInput}
|
|
172
|
+
<TagsInput bind:values bind:value bind:status bind:element bind:ariaErrMsgId={idMsg} {...svsTagsInput} />
|
|
177
173
|
{@render side(PARTS.RIGHT, right)}
|
|
178
174
|
</div>
|
|
179
175
|
{@render desc(!descFirst)}
|
|
@@ -16,22 +16,22 @@ export interface TagsInputFieldProps {
|
|
|
16
16
|
element?: HTMLInputElement;
|
|
17
17
|
deps?: TagsInputFieldDeps;
|
|
18
18
|
}
|
|
19
|
-
export interface TagsInputFieldDeps
|
|
20
|
-
svsTagsInput?: Omit<TagsInputProps, TagsInputReqdProps | TagsInputBindProps
|
|
19
|
+
export interface TagsInputFieldDeps {
|
|
20
|
+
svsTagsInput?: Omit<TagsInputProps, TagsInputReqdProps | TagsInputBindProps>;
|
|
21
21
|
}
|
|
22
22
|
export type TagsInputFieldReqdProps = never;
|
|
23
23
|
export type TagsInputFieldBindProps = "values" | "status" | "element";
|
|
24
|
-
export type TagsInputFieldConstraint = (value: string, validity: ValidityState) => string;
|
|
25
|
-
export type TagsInputFieldValidation = (values: string[], validity: ValidityState) => string;
|
|
24
|
+
export type TagsInputFieldConstraint = (value: string, validity: ValidityState) => string | undefined;
|
|
25
|
+
export type TagsInputFieldValidation = (values: string[], validity: ValidityState) => string | undefined;
|
|
26
26
|
export type TagsInputFieldCountValidation = {
|
|
27
27
|
value: number;
|
|
28
28
|
message: string;
|
|
29
29
|
};
|
|
30
30
|
import { type Snippet } from "svelte";
|
|
31
31
|
import { type SVSStyle } from "./core";
|
|
32
|
-
import { type TagsInputProps, type TagsInputReqdProps, type TagsInputBindProps
|
|
32
|
+
import { type TagsInputProps, type TagsInputReqdProps, type TagsInputBindProps } from "./_TagsInput.svelte";
|
|
33
33
|
/**
|
|
34
|
-
* default value:
|
|
34
|
+
* default value: `(value)`
|
|
35
35
|
* ```ts
|
|
36
36
|
* interface TagsInputFieldProps {
|
|
37
37
|
* label?: string;
|
|
@@ -40,13 +40,13 @@ import { type TagsInputProps, type TagsInputReqdProps, type TagsInputBindProps,
|
|
|
40
40
|
* left?: Snippet<[string, string[], HTMLInputElement | undefined]>; // Snippet<[status,values,element]>
|
|
41
41
|
* right?: Snippet<[string, string[], HTMLInputElement | undefined]>; // Snippet<[status,values,element]>
|
|
42
42
|
* bottom?: string;
|
|
43
|
-
* descFirst?: boolean; //
|
|
43
|
+
* descFirst?: boolean; // (false)
|
|
44
44
|
* values?: string[]; // bindable
|
|
45
45
|
* min?: TagsInputFieldCountValidation;
|
|
46
46
|
* max?: TagsInputFieldCountValidation;
|
|
47
47
|
* constraints?: TagsInputFieldConstraint[];
|
|
48
48
|
* validations?: TagsInputFieldValidation[];
|
|
49
|
-
* status?: string; // bindable
|
|
49
|
+
* status?: string; // bindable (STATE.NEUTRAL)
|
|
50
50
|
* style?: SVSStyle;
|
|
51
51
|
* element?: HTMLInputElement; // bindable
|
|
52
52
|
* deps?: TagsInputFieldDeps;
|
|
@@ -54,8 +54,8 @@ import { type TagsInputProps, type TagsInputReqdProps, type TagsInputBindProps,
|
|
|
54
54
|
* interface TagsInputFieldDeps extends TagsInputDeps {
|
|
55
55
|
* svsTagsInput?: Omit<TagsInputProps, TagsInputReqdProps | TagsInputBindProps | "deps">;
|
|
56
56
|
* }
|
|
57
|
-
* type TagsInputFieldConstraint = (value: string, validity: ValidityState) => string;
|
|
58
|
-
* type TagsInputFieldValidation = (values: string[], validity: ValidityState) => string;
|
|
57
|
+
* type TagsInputFieldConstraint = (value: string, validity: ValidityState) => string | undefined;
|
|
58
|
+
* type TagsInputFieldValidation = (values: string[], validity: ValidityState) => string | undefined;
|
|
59
59
|
* type TagsInputFieldCountValidation = {
|
|
60
60
|
* value: number;
|
|
61
61
|
* message: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
@component
|
|
3
|
-
default value:
|
|
3
|
+
default value: `(value)`
|
|
4
4
|
```ts
|
|
5
5
|
interface ToggleGroupFieldProps {
|
|
6
6
|
options: SvelteMap<string, string> | Map<string, string>;
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
left?: Snippet<[string, string[]]>; // Snippet<[status,values]>
|
|
11
11
|
right?: Snippet<[string, string[]]>; // Snippet<[status,values]>
|
|
12
12
|
bottom?: string;
|
|
13
|
-
descFirst?: boolean; //
|
|
13
|
+
descFirst?: boolean; // (false)
|
|
14
14
|
values?: string[]; // bindable
|
|
15
|
-
multiple?: boolean; //
|
|
15
|
+
multiple?: boolean; // (true)
|
|
16
16
|
validations?: ToggleGroupFieldValidation[];
|
|
17
|
-
status?: string; // bindable
|
|
17
|
+
status?: string; // bindable (STATE.NEUTRAL)
|
|
18
18
|
style?: SVSStyle;
|
|
19
19
|
name?: string;
|
|
20
20
|
deps?: ToggleGroupFieldDeps;
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
interface ToggleGroupFieldDeps {
|
|
24
24
|
svsToggleGroup?: Omit<ToggleGroupProps, ToggleGroupReqdProps | ToggleGroupBindProps | "ariaDescId" | "multiple">;
|
|
25
25
|
}
|
|
26
|
-
type ToggleGroupFieldValidation = (values: string[]) => string;
|
|
26
|
+
type ToggleGroupFieldValidation = (values: string[]) => string | undefined;
|
|
27
27
|
```
|
|
28
28
|
-->
|
|
29
29
|
<script module lang="ts">
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
left?: Snippet<[string, string[]]>; // Snippet<[status,values]>
|
|
36
36
|
right?: Snippet<[string, string[]]>; // Snippet<[status,values]>
|
|
37
37
|
bottom?: string;
|
|
38
|
-
descFirst?: boolean; //
|
|
38
|
+
descFirst?: boolean; // (false)
|
|
39
39
|
values?: string[]; // bindable
|
|
40
|
-
multiple?: boolean; //
|
|
40
|
+
multiple?: boolean; // (true)
|
|
41
41
|
validations?: ToggleGroupFieldValidation[];
|
|
42
|
-
status?: string; // bindable
|
|
42
|
+
status?: string; // bindable (STATE.NEUTRAL)
|
|
43
43
|
style?: SVSStyle;
|
|
44
44
|
name?: string;
|
|
45
45
|
deps?: ToggleGroupFieldDeps;
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
}
|
|
51
51
|
export type ToggleGroupFieldReqdProps = "options";
|
|
52
52
|
export type ToggleGroupFieldBindProps = "values" | "status";
|
|
53
|
-
export type ToggleGroupFieldValidation = (values: string[]) => string;
|
|
53
|
+
export type ToggleGroupFieldValidation = (values: string[]) => string | undefined;
|
|
54
54
|
|
|
55
55
|
const preset = "svs-toggle-group-field";
|
|
56
56
|
|
|
@@ -21,13 +21,13 @@ export interface ToggleGroupFieldDeps {
|
|
|
21
21
|
}
|
|
22
22
|
export type ToggleGroupFieldReqdProps = "options";
|
|
23
23
|
export type ToggleGroupFieldBindProps = "values" | "status";
|
|
24
|
-
export type ToggleGroupFieldValidation = (values: string[]) => string;
|
|
24
|
+
export type ToggleGroupFieldValidation = (values: string[]) => string | undefined;
|
|
25
25
|
import { type Snippet } from "svelte";
|
|
26
26
|
import { type SvelteMap } from "svelte/reactivity";
|
|
27
27
|
import { type SVSStyle } from "./core";
|
|
28
28
|
import { type ToggleGroupProps, type ToggleGroupReqdProps, type ToggleGroupBindProps } from "./_ToggleGroup.svelte";
|
|
29
29
|
/**
|
|
30
|
-
* default value:
|
|
30
|
+
* default value: `(value)`
|
|
31
31
|
* ```ts
|
|
32
32
|
* interface ToggleGroupFieldProps {
|
|
33
33
|
* options: SvelteMap<string, string> | Map<string, string>;
|
|
@@ -37,11 +37,11 @@ import { type ToggleGroupProps, type ToggleGroupReqdProps, type ToggleGroupBindP
|
|
|
37
37
|
* left?: Snippet<[string, string[]]>; // Snippet<[status,values]>
|
|
38
38
|
* right?: Snippet<[string, string[]]>; // Snippet<[status,values]>
|
|
39
39
|
* bottom?: string;
|
|
40
|
-
* descFirst?: boolean; //
|
|
40
|
+
* descFirst?: boolean; // (false)
|
|
41
41
|
* values?: string[]; // bindable
|
|
42
|
-
* multiple?: boolean; //
|
|
42
|
+
* multiple?: boolean; // (true)
|
|
43
43
|
* validations?: ToggleGroupFieldValidation[];
|
|
44
|
-
* status?: string; // bindable
|
|
44
|
+
* status?: string; // bindable (STATE.NEUTRAL)
|
|
45
45
|
* style?: SVSStyle;
|
|
46
46
|
* name?: string;
|
|
47
47
|
* deps?: ToggleGroupFieldDeps;
|
|
@@ -50,7 +50,7 @@ import { type ToggleGroupProps, type ToggleGroupReqdProps, type ToggleGroupBindP
|
|
|
50
50
|
* interface ToggleGroupFieldDeps {
|
|
51
51
|
* svsToggleGroup?: Omit<ToggleGroupProps, ToggleGroupReqdProps | ToggleGroupBindProps | "ariaDescId" | "multiple">;
|
|
52
52
|
* }
|
|
53
|
-
* type ToggleGroupFieldValidation = (values: string[]) => string;
|
|
53
|
+
* type ToggleGroupFieldValidation = (values: string[]) => string | undefined;
|
|
54
54
|
* ```
|
|
55
55
|
*/
|
|
56
56
|
declare const ToggleGroupField: import("svelte").Component<ToggleGroupFieldProps, {}, "status" | "values">;
|
package/_svseeds/_Button.svelte
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
@component
|
|
3
|
-
default value:
|
|
3
|
+
default value: `(value)`
|
|
4
4
|
```ts
|
|
5
5
|
interface ButtonProps {
|
|
6
6
|
children: Snippet;
|
|
7
7
|
left?: Snippet<[string, HTMLButtonElement | undefined]>; // Snippet<[status,element]>
|
|
8
8
|
right?: Snippet<[string, HTMLButtonElement | undefined]>; // Snippet<[status,element]>
|
|
9
|
-
type?: "submit" | "reset" | "button"; //
|
|
9
|
+
type?: "submit" | "reset" | "button"; // ("button")
|
|
10
10
|
onclick?: MouseEventHandler<HTMLButtonElement> | null;
|
|
11
11
|
form?: HTMLFormElement; // bindable
|
|
12
|
-
status?: string; // bindable
|
|
12
|
+
status?: string; // bindable (STATE.NEUTRAL)
|
|
13
13
|
style?: SVSStyle;
|
|
14
14
|
attributes?: HTMLButtonAttributes;
|
|
15
15
|
action?: Action;
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
children: Snippet;
|
|
23
23
|
left?: Snippet<[string, HTMLButtonElement | undefined]>; // Snippet<[status,element]>
|
|
24
24
|
right?: Snippet<[string, HTMLButtonElement | undefined]>; // Snippet<[status,element]>
|
|
25
|
-
type?: "submit" | "reset" | "button"; //
|
|
25
|
+
type?: "submit" | "reset" | "button"; // ("button")
|
|
26
26
|
onclick?: MouseEventHandler<HTMLButtonElement> | null;
|
|
27
27
|
form?: HTMLFormElement; // bindable
|
|
28
|
-
status?: string; // bindable
|
|
28
|
+
status?: string; // bindable (STATE.NEUTRAL)
|
|
29
29
|
style?: SVSStyle;
|
|
30
30
|
attributes?: HTMLButtonAttributes;
|
|
31
31
|
action?: Action;
|
|
@@ -18,16 +18,16 @@ import { type Action } from "svelte/action";
|
|
|
18
18
|
import { type HTMLButtonAttributes, type MouseEventHandler } from "svelte/elements";
|
|
19
19
|
import { type SVSStyle } from "./core";
|
|
20
20
|
/**
|
|
21
|
-
* default value:
|
|
21
|
+
* default value: `(value)`
|
|
22
22
|
* ```ts
|
|
23
23
|
* interface ButtonProps {
|
|
24
24
|
* children: Snippet;
|
|
25
25
|
* left?: Snippet<[string, HTMLButtonElement | undefined]>; // Snippet<[status,element]>
|
|
26
26
|
* right?: Snippet<[string, HTMLButtonElement | undefined]>; // Snippet<[status,element]>
|
|
27
|
-
* type?: "submit" | "reset" | "button"; //
|
|
27
|
+
* type?: "submit" | "reset" | "button"; // ("button")
|
|
28
28
|
* onclick?: MouseEventHandler<HTMLButtonElement> | null;
|
|
29
29
|
* form?: HTMLFormElement; // bindable
|
|
30
|
-
* status?: string; // bindable
|
|
30
|
+
* status?: string; // bindable (STATE.NEUTRAL)
|
|
31
31
|
* style?: SVSStyle;
|
|
32
32
|
* attributes?: HTMLButtonAttributes;
|
|
33
33
|
* action?: Action;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
@component
|
|
3
|
-
default value:
|
|
3
|
+
default value: `(value)`
|
|
4
4
|
```ts
|
|
5
5
|
interface CheckFieldProps {
|
|
6
6
|
options: SvelteMap<string, string> | Map<string, string>;
|
|
@@ -8,17 +8,17 @@
|
|
|
8
8
|
extra?: string;
|
|
9
9
|
aux?: Snippet<[string, string[], HTMLInputElement[]]>; // Snippet<[status,values,elements]>
|
|
10
10
|
bottom?: string;
|
|
11
|
-
descFirst?: boolean; //
|
|
11
|
+
descFirst?: boolean; // (false)
|
|
12
12
|
values?: string[]; // bindable
|
|
13
|
-
multiple?: boolean; //
|
|
13
|
+
multiple?: boolean; // (true)
|
|
14
14
|
validations?: CheckFieldValidation[];
|
|
15
|
-
status?: string; // bindable
|
|
15
|
+
status?: string; // bindable (STATE.NEUTRAL)
|
|
16
16
|
style?: SVSStyle;
|
|
17
17
|
attributes?: HTMLInputAttributes;
|
|
18
18
|
action?: Action;
|
|
19
19
|
elements?: HTMLInputElement[]; // bindable
|
|
20
20
|
}
|
|
21
|
-
type CheckFieldValidation = (values: string[], validity: ValidityState) => string;
|
|
21
|
+
type CheckFieldValidation = (values: string[], validity: ValidityState) => string | undefined;
|
|
22
22
|
```
|
|
23
23
|
-->
|
|
24
24
|
<script module lang="ts">
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
extra?: string;
|
|
29
29
|
aux?: Snippet<[string, string[], HTMLInputElement[]]>; // Snippet<[status,values,elements]>
|
|
30
30
|
bottom?: string;
|
|
31
|
-
descFirst?: boolean; //
|
|
31
|
+
descFirst?: boolean; // (false)
|
|
32
32
|
values?: string[]; // bindable
|
|
33
|
-
multiple?: boolean; //
|
|
33
|
+
multiple?: boolean; // (true)
|
|
34
34
|
validations?: CheckFieldValidation[];
|
|
35
|
-
status?: string; // bindable
|
|
35
|
+
status?: string; // bindable (STATE.NEUTRAL)
|
|
36
36
|
style?: SVSStyle;
|
|
37
37
|
attributes?: HTMLInputAttributes;
|
|
38
38
|
action?: Action;
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
}
|
|
41
41
|
export type CheckFieldReqdProps = "options";
|
|
42
42
|
export type CheckFieldBindProps = "values" | "status" | "elements";
|
|
43
|
-
export type CheckFieldValidation = (values: string[], validity: ValidityState) => string;
|
|
43
|
+
export type CheckFieldValidation = (values: string[], validity: ValidityState) => string | undefined;
|
|
44
44
|
|
|
45
45
|
const preset = "svs-check-field";
|
|
46
46
|
|
|
@@ -16,14 +16,14 @@ export interface CheckFieldProps {
|
|
|
16
16
|
}
|
|
17
17
|
export type CheckFieldReqdProps = "options";
|
|
18
18
|
export type CheckFieldBindProps = "values" | "status" | "elements";
|
|
19
|
-
export type CheckFieldValidation = (values: string[], validity: ValidityState) => string;
|
|
19
|
+
export type CheckFieldValidation = (values: string[], validity: ValidityState) => string | undefined;
|
|
20
20
|
import { type Snippet } from "svelte";
|
|
21
21
|
import { type Action } from "svelte/action";
|
|
22
22
|
import { type SvelteMap } from "svelte/reactivity";
|
|
23
23
|
import { type HTMLInputAttributes } from "svelte/elements";
|
|
24
24
|
import { type SVSStyle } from "./core";
|
|
25
25
|
/**
|
|
26
|
-
* default value:
|
|
26
|
+
* default value: `(value)`
|
|
27
27
|
* ```ts
|
|
28
28
|
* interface CheckFieldProps {
|
|
29
29
|
* options: SvelteMap<string, string> | Map<string, string>;
|
|
@@ -31,17 +31,17 @@ import { type SVSStyle } from "./core";
|
|
|
31
31
|
* extra?: string;
|
|
32
32
|
* aux?: Snippet<[string, string[], HTMLInputElement[]]>; // Snippet<[status,values,elements]>
|
|
33
33
|
* bottom?: string;
|
|
34
|
-
* descFirst?: boolean; //
|
|
34
|
+
* descFirst?: boolean; // (false)
|
|
35
35
|
* values?: string[]; // bindable
|
|
36
|
-
* multiple?: boolean; //
|
|
36
|
+
* multiple?: boolean; // (true)
|
|
37
37
|
* validations?: CheckFieldValidation[];
|
|
38
|
-
* status?: string; // bindable
|
|
38
|
+
* status?: string; // bindable (STATE.NEUTRAL)
|
|
39
39
|
* style?: SVSStyle;
|
|
40
40
|
* attributes?: HTMLInputAttributes;
|
|
41
41
|
* action?: Action;
|
|
42
42
|
* elements?: HTMLInputElement[]; // bindable
|
|
43
43
|
* }
|
|
44
|
-
* type CheckFieldValidation = (values: string[], validity: ValidityState) => string;
|
|
44
|
+
* type CheckFieldValidation = (values: string[], validity: ValidityState) => string | undefined;
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
47
|
declare const CheckField: import("svelte").Component<CheckFieldProps, {}, "elements" | "status" | "values">;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
@component
|
|
3
|
-
default value:
|
|
3
|
+
default value: `(value)`
|
|
4
4
|
```ts
|
|
5
5
|
interface ColorPickerProps {
|
|
6
|
-
value?: string; // bindable
|
|
7
|
-
alpha?: number; // bindable
|
|
8
|
-
status?: string; // bindable
|
|
6
|
+
value?: string; // bindable ("#000000")
|
|
7
|
+
alpha?: number; // bindable (1)
|
|
8
|
+
status?: string; // bindable (STATE.NEUTRAL)
|
|
9
9
|
style?: SVSStyle;
|
|
10
10
|
attributes?: HTMLInputAttributes;
|
|
11
11
|
action?: Action;
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
-->
|
|
21
21
|
<script module lang="ts">
|
|
22
22
|
export interface ColorPickerProps {
|
|
23
|
-
value?: string; // bindable
|
|
24
|
-
alpha?: number; // bindable
|
|
25
|
-
status?: string; // bindable
|
|
23
|
+
value?: string; // bindable ("#000000")
|
|
24
|
+
alpha?: number; // bindable (1)
|
|
25
|
+
status?: string; // bindable (STATE.NEUTRAL)
|
|
26
26
|
style?: SVSStyle;
|
|
27
27
|
attributes?: HTMLInputAttributes;
|
|
28
28
|
action?: Action;
|
|
@@ -15,12 +15,12 @@ import { type Action } from "svelte/action";
|
|
|
15
15
|
import { type HTMLInputAttributes } from "svelte/elements";
|
|
16
16
|
import { type SVSStyle } from "./core";
|
|
17
17
|
/**
|
|
18
|
-
* default value:
|
|
18
|
+
* default value: `(value)`
|
|
19
19
|
* ```ts
|
|
20
20
|
* interface ColorPickerProps {
|
|
21
|
-
* value?: string; // bindable
|
|
22
|
-
* alpha?: number; // bindable
|
|
23
|
-
* status?: string; // bindable
|
|
21
|
+
* value?: string; // bindable ("#000000")
|
|
22
|
+
* alpha?: number; // bindable (1)
|
|
23
|
+
* status?: string; // bindable (STATE.NEUTRAL)
|
|
24
24
|
* style?: SVSStyle;
|
|
25
25
|
* attributes?: HTMLInputAttributes;
|
|
26
26
|
* action?: Action;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
@component
|
|
3
|
-
default value:
|
|
3
|
+
default value: `(value)`
|
|
4
4
|
```ts
|
|
5
5
|
interface ComboBoxProps {
|
|
6
6
|
options: SvelteSet<string> | Set<string>;
|
|
7
7
|
value?: string; // bindable
|
|
8
8
|
expanded?: boolean; // bindable
|
|
9
|
-
status?: string; // bindable
|
|
9
|
+
status?: string; // bindable (STATE.NEUTRAL)
|
|
10
10
|
style?: SVSStyle;
|
|
11
11
|
attributes?: HTMLInputAttributes;
|
|
12
12
|
action?: Action;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
options: SvelteSet<string> | Set<string>;
|
|
20
20
|
value?: string; // bindable
|
|
21
21
|
expanded?: boolean; // bindable
|
|
22
|
-
status?: string; // bindable
|
|
22
|
+
status?: string; // bindable (STATE.NEUTRAL)
|
|
23
23
|
style?: SVSStyle;
|
|
24
24
|
attributes?: HTMLInputAttributes;
|
|
25
25
|
action?: Action;
|
|
@@ -15,13 +15,13 @@ import { type SvelteSet } from "svelte/reactivity";
|
|
|
15
15
|
import { type HTMLInputAttributes } from "svelte/elements";
|
|
16
16
|
import { type SVSStyle } from "./core";
|
|
17
17
|
/**
|
|
18
|
-
* default value:
|
|
18
|
+
* default value: `(value)`
|
|
19
19
|
* ```ts
|
|
20
20
|
* interface ComboBoxProps {
|
|
21
21
|
* options: SvelteSet<string> | Set<string>;
|
|
22
22
|
* value?: string; // bindable
|
|
23
23
|
* expanded?: boolean; // bindable
|
|
24
|
-
* status?: string; // bindable
|
|
24
|
+
* status?: string; // bindable (STATE.NEUTRAL)
|
|
25
25
|
* style?: SVSStyle;
|
|
26
26
|
* attributes?: HTMLInputAttributes;
|
|
27
27
|
* action?: Action;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
@component
|
|
3
|
-
default value:
|
|
3
|
+
default value: `(value)`
|
|
4
4
|
```ts
|
|
5
5
|
interface ContextMenuProps {
|
|
6
6
|
children: Snippet;
|
|
7
|
-
open?: boolean; // bindable
|
|
8
|
-
lock?: boolean; // bindable
|
|
9
|
-
status?: string; // bindable
|
|
7
|
+
open?: boolean; // bindable (false); to observe state, not to control
|
|
8
|
+
lock?: boolean; // bindable (false)
|
|
9
|
+
status?: string; // bindable (STATE.NEUTRAL)
|
|
10
10
|
style?: SVSStyle;
|
|
11
11
|
element?: HTMLElement; // bindable
|
|
12
12
|
}
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
<script module lang="ts">
|
|
16
16
|
export interface ContextMenuProps {
|
|
17
17
|
children: Snippet;
|
|
18
|
-
open?: boolean; // bindable
|
|
19
|
-
lock?: boolean; // bindable
|
|
20
|
-
status?: string; // bindable
|
|
18
|
+
open?: boolean; // bindable (false); to observe state, not to control
|
|
19
|
+
lock?: boolean; // bindable (false)
|
|
20
|
+
status?: string; // bindable (STATE.NEUTRAL)
|
|
21
21
|
style?: SVSStyle;
|
|
22
22
|
element?: HTMLElement; // bindable
|
|
23
23
|
}
|
|
@@ -11,13 +11,13 @@ export type ContextMenuBindProps = "open" | "lock" | "status" | "element";
|
|
|
11
11
|
import { type Snippet } from "svelte";
|
|
12
12
|
import { type SVSStyle } from "./core";
|
|
13
13
|
/**
|
|
14
|
-
* default value:
|
|
14
|
+
* default value: `(value)`
|
|
15
15
|
* ```ts
|
|
16
16
|
* interface ContextMenuProps {
|
|
17
17
|
* children: Snippet;
|
|
18
|
-
* open?: boolean; // bindable
|
|
19
|
-
* lock?: boolean; // bindable
|
|
20
|
-
* status?: string; // bindable
|
|
18
|
+
* open?: boolean; // bindable (false); to observe state, not to control
|
|
19
|
+
* lock?: boolean; // bindable (false)
|
|
20
|
+
* status?: string; // bindable (STATE.NEUTRAL)
|
|
21
21
|
* style?: SVSStyle;
|
|
22
22
|
* element?: HTMLElement; // bindable
|
|
23
23
|
* }
|