ui-ingredients 0.0.36 → 0.0.37
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/checkbox/create-checkbox.svelte.js +12 -1
- package/dist/checkbox/hidden-input.svelte +1 -3
- package/dist/combobox/create-combobox.svelte.js +13 -4
- package/dist/combobox/input.svelte +1 -3
- package/dist/editable/create-editable.svelte.js +12 -1
- package/dist/editable/input.svelte +1 -3
- package/dist/field/create-field.svelte.js +1 -0
- package/dist/file-upload/create-file-upload.svelte.js +12 -1
- package/dist/file-upload/hidden-input.svelte +1 -3
- package/dist/number-input/create-number-input.svelte.js +12 -1
- package/dist/number-input/input.svelte +1 -3
- package/dist/pin-input/create-pin-input.svelte.js +6 -0
- package/dist/pin-input/hidden-input.svelte +1 -3
- package/dist/rating-group/create-rating-group.svelte.js +12 -1
- package/dist/rating-group/hidden-input.svelte +1 -3
- package/dist/select/create-select.svelte.js +13 -4
- package/dist/select/hidden-select.svelte +1 -3
- package/dist/switch/create-switch.svelte.js +12 -1
- package/dist/switch/hidden-input.svelte +1 -3
- package/dist/tags-input/create-tags-input.svelte.js +12 -1
- package/dist/tags-input/hidden-input.svelte +1 -3
- package/package.json +1 -1
@@ -22,6 +22,17 @@ export function createCheckbox(props) {
|
|
22
22
|
dir: locale?.dir,
|
23
23
|
getRootNode: environment?.getRootNode,
|
24
24
|
}));
|
25
|
-
const api = $derived(reflect(() =>
|
25
|
+
const api = $derived(reflect(() => {
|
26
|
+
const o = checkbox.connect(state, send, normalizeProps);
|
27
|
+
return {
|
28
|
+
...o,
|
29
|
+
getHiddenInputProps() {
|
30
|
+
return {
|
31
|
+
'aria-describedby': field?.['aria-describedby'],
|
32
|
+
...o.getHiddenInputProps(),
|
33
|
+
};
|
34
|
+
},
|
35
|
+
};
|
36
|
+
}));
|
26
37
|
return api;
|
27
38
|
}
|
@@ -5,16 +5,14 @@
|
|
5
5
|
</script>
|
6
6
|
|
7
7
|
<script lang="ts">
|
8
|
-
import {getFieldContext} from '../field/context.svelte.js';
|
9
8
|
import {mergeProps} from '../merge-props.js';
|
10
9
|
import {checkboxContext} from './context.svelte.js';
|
11
10
|
|
12
11
|
let {...props}: CheckboxHiddenInputProps = $props();
|
13
12
|
|
14
|
-
let field = getFieldContext();
|
15
13
|
let checkbox = checkboxContext.get();
|
16
14
|
|
17
15
|
let mergedProps = $derived(mergeProps(props, checkbox.getHiddenInputProps()));
|
18
16
|
</script>
|
19
17
|
|
20
|
-
<input
|
18
|
+
<input {...mergedProps} />
|
@@ -31,9 +31,18 @@ export function createCombobox(props) {
|
|
31
31
|
'open.controlled': props.open != null,
|
32
32
|
collection,
|
33
33
|
}));
|
34
|
-
const api = $derived(reflect(() =>
|
35
|
-
|
36
|
-
|
37
|
-
|
34
|
+
const api = $derived(reflect(() => {
|
35
|
+
const o = combobox.connect(state, send, normalizeProps);
|
36
|
+
return {
|
37
|
+
...o,
|
38
|
+
getInputProps() {
|
39
|
+
return {
|
40
|
+
'aria-describedby': field?.['aria-describedby'],
|
41
|
+
...o.getInputProps(),
|
42
|
+
};
|
43
|
+
},
|
44
|
+
collection,
|
45
|
+
};
|
46
|
+
}));
|
38
47
|
return api;
|
39
48
|
}
|
@@ -7,13 +7,11 @@
|
|
7
7
|
</script>
|
8
8
|
|
9
9
|
<script lang="ts">
|
10
|
-
import {getFieldContext} from '../field/context.svelte.js';
|
11
10
|
import {mergeProps} from '../merge-props.js';
|
12
11
|
import {comboboxContext} from './context.svelte.js';
|
13
12
|
|
14
13
|
let {asChild, ...props}: ComboboxInputProps = $props();
|
15
14
|
|
16
|
-
let field = getFieldContext();
|
17
15
|
let combobox = comboboxContext.get();
|
18
16
|
|
19
17
|
let mergedProps = $derived(mergeProps(props, combobox.getInputProps()));
|
@@ -22,5 +20,5 @@
|
|
22
20
|
{#if asChild}
|
23
21
|
{@render asChild(mergedProps)}
|
24
22
|
{:else}
|
25
|
-
<input
|
23
|
+
<input {...mergedProps} />
|
26
24
|
{/if}
|
@@ -24,6 +24,17 @@ export function createEditable(props) {
|
|
24
24
|
getRootNode: environment?.getRootNode,
|
25
25
|
'edit.controlled': props.edit != null,
|
26
26
|
}));
|
27
|
-
const api = $derived(reflect(() =>
|
27
|
+
const api = $derived(reflect(() => {
|
28
|
+
const o = editable.connect(state, send, normalizeProps);
|
29
|
+
return {
|
30
|
+
...o,
|
31
|
+
getInputProps() {
|
32
|
+
return {
|
33
|
+
'aria-describedby': field?.['aria-describedby'],
|
34
|
+
...o.getInputProps(),
|
35
|
+
};
|
36
|
+
},
|
37
|
+
};
|
38
|
+
}));
|
28
39
|
return api;
|
29
40
|
}
|
@@ -7,13 +7,11 @@
|
|
7
7
|
</script>
|
8
8
|
|
9
9
|
<script lang="ts">
|
10
|
-
import {getFieldContext} from '../field/context.svelte.js';
|
11
10
|
import {mergeProps} from '../merge-props.js';
|
12
11
|
import {editableContext} from './context.svelte.js';
|
13
12
|
|
14
13
|
let {asChild, ...props}: EditableInputProps = $props();
|
15
14
|
|
16
|
-
let field = getFieldContext();
|
17
15
|
let editable = editableContext.get();
|
18
16
|
|
19
17
|
let mergedProps = $derived(mergeProps(props, editable.getInputProps()));
|
@@ -22,5 +20,5 @@
|
|
22
20
|
{#if asChild}
|
23
21
|
{@render asChild(mergedProps)}
|
24
22
|
{:else}
|
25
|
-
<input
|
23
|
+
<input {...mergedProps} />
|
26
24
|
{/if}
|
@@ -21,6 +21,17 @@ export function createFileUpload(props) {
|
|
21
21
|
locale: props.locale ?? locale?.locale,
|
22
22
|
getRootNode: environment?.getRootNode,
|
23
23
|
}));
|
24
|
-
const api = $derived(reflect(() =>
|
24
|
+
const api = $derived(reflect(() => {
|
25
|
+
const o = fileUpload.connect(state, send, normalizeProps);
|
26
|
+
return {
|
27
|
+
...o,
|
28
|
+
getHiddenInputProps() {
|
29
|
+
return {
|
30
|
+
'aria-describedby': field?.['aria-describedby'],
|
31
|
+
...o.getHiddenInputProps(),
|
32
|
+
};
|
33
|
+
},
|
34
|
+
};
|
35
|
+
}));
|
25
36
|
return api;
|
26
37
|
}
|
@@ -5,13 +5,11 @@
|
|
5
5
|
</script>
|
6
6
|
|
7
7
|
<script lang="ts">
|
8
|
-
import {getFieldContext} from '../field/context.svelte.js';
|
9
8
|
import {mergeProps} from '../merge-props.js';
|
10
9
|
import {fileUploadContext} from './context.svelte.js';
|
11
10
|
|
12
11
|
let {...props}: FileUploadHiddenInputProps = $props();
|
13
12
|
|
14
|
-
let field = getFieldContext();
|
15
13
|
let fileUpload = fileUploadContext.get();
|
16
14
|
|
17
15
|
let mergedProps = $derived(
|
@@ -19,4 +17,4 @@
|
|
19
17
|
);
|
20
18
|
</script>
|
21
19
|
|
22
|
-
<input
|
20
|
+
<input {...mergedProps} />
|
@@ -23,6 +23,17 @@ export function createNumberInput(props) {
|
|
23
23
|
locale: props.locale ?? locale?.locale,
|
24
24
|
getRootNode: environment?.getRootNode,
|
25
25
|
}));
|
26
|
-
const api = $derived(reflect(() =>
|
26
|
+
const api = $derived(reflect(() => {
|
27
|
+
const o = numberInput.connect(state, send, normalizeProps);
|
28
|
+
return {
|
29
|
+
...o,
|
30
|
+
getInputProps() {
|
31
|
+
return {
|
32
|
+
'aria-describedby': field?.['aria-describedby'],
|
33
|
+
...o.getInputProps(),
|
34
|
+
};
|
35
|
+
},
|
36
|
+
};
|
37
|
+
}));
|
27
38
|
return api;
|
28
39
|
}
|
@@ -7,13 +7,11 @@
|
|
7
7
|
</script>
|
8
8
|
|
9
9
|
<script lang="ts">
|
10
|
-
import {getFieldContext} from '../field/context.svelte.js';
|
11
10
|
import {mergeProps} from '../merge-props.js';
|
12
11
|
import {numberInputContext} from './context.svelte.js';
|
13
12
|
|
14
13
|
let {asChild, ...props}: NumberInputInputProps = $props();
|
15
14
|
|
16
|
-
let field = getFieldContext();
|
17
15
|
let numberInput = numberInputContext.get();
|
18
16
|
|
19
17
|
let mergedProps = $derived(mergeProps(props, numberInput.getInputProps()));
|
@@ -22,5 +20,5 @@
|
|
22
20
|
{#if asChild}
|
23
21
|
{@render asChild(mergedProps)}
|
24
22
|
{:else}
|
25
|
-
<input
|
23
|
+
<input {...mergedProps} />
|
26
24
|
{/if}
|
@@ -5,16 +5,14 @@
|
|
5
5
|
</script>
|
6
6
|
|
7
7
|
<script lang="ts">
|
8
|
-
import {getFieldContext} from '../field/context.svelte.js';
|
9
8
|
import {mergeProps} from '../merge-props.js';
|
10
9
|
import {pinInputContext} from './context.svelte.js';
|
11
10
|
|
12
11
|
let {...props}: PinInputHiddenInputProps = $props();
|
13
12
|
|
14
|
-
let field = getFieldContext();
|
15
13
|
let pinInput = pinInputContext.get();
|
16
14
|
|
17
15
|
let mergedProps = $derived(mergeProps(props, pinInput.getHiddenInputProps()));
|
18
16
|
</script>
|
19
17
|
|
20
|
-
<input
|
18
|
+
<input {...mergedProps} />
|
@@ -21,6 +21,17 @@ export function createRatingGroup(props) {
|
|
21
21
|
dir: locale?.dir,
|
22
22
|
getRootNode: environment?.getRootNode,
|
23
23
|
}));
|
24
|
-
const api = $derived(reflect(() =>
|
24
|
+
const api = $derived(reflect(() => {
|
25
|
+
const o = ratingGroup.connect(state, send, normalizeProps);
|
26
|
+
return {
|
27
|
+
...o,
|
28
|
+
getHiddenInputProps() {
|
29
|
+
return {
|
30
|
+
'aria-describedby': field?.['aria-describedby'],
|
31
|
+
...o.getHiddenInputProps(),
|
32
|
+
};
|
33
|
+
},
|
34
|
+
};
|
35
|
+
}));
|
25
36
|
return api;
|
26
37
|
}
|
@@ -5,13 +5,11 @@
|
|
5
5
|
</script>
|
6
6
|
|
7
7
|
<script lang="ts">
|
8
|
-
import {getFieldContext} from '../field/context.svelte.js';
|
9
8
|
import {mergeProps} from '../merge-props.js';
|
10
9
|
import {ratingGroupContext} from './context.svelte.js';
|
11
10
|
|
12
11
|
let {...props}: RatingGroupHiddenInputProps = $props();
|
13
12
|
|
14
|
-
let field = getFieldContext();
|
15
13
|
let radioGroup = ratingGroupContext.get();
|
16
14
|
|
17
15
|
let mergedProps = $derived(
|
@@ -19,4 +17,4 @@
|
|
19
17
|
);
|
20
18
|
</script>
|
21
19
|
|
22
|
-
<input
|
20
|
+
<input {...mergedProps} />
|
@@ -31,9 +31,18 @@ export function createSelect(props) {
|
|
31
31
|
collection,
|
32
32
|
'open.controlled': props.open != null,
|
33
33
|
}));
|
34
|
-
const api = $derived(reflect(() =>
|
35
|
-
|
36
|
-
|
37
|
-
|
34
|
+
const api = $derived(reflect(() => {
|
35
|
+
const o = select.connect(state, send, normalizeProps);
|
36
|
+
return {
|
37
|
+
...o,
|
38
|
+
collection,
|
39
|
+
getHiddenSelectProps() {
|
40
|
+
return {
|
41
|
+
'aria-describedby': field?.['aria-describedby'],
|
42
|
+
...o.getHiddenSelectProps(),
|
43
|
+
};
|
44
|
+
},
|
45
|
+
};
|
46
|
+
}));
|
38
47
|
return api;
|
39
48
|
}
|
@@ -5,18 +5,16 @@
|
|
5
5
|
</script>
|
6
6
|
|
7
7
|
<script lang="ts">
|
8
|
-
import {getFieldContext} from '../field/context.svelte.js';
|
9
8
|
import {mergeProps} from '../merge-props.js';
|
10
9
|
import {selectContext} from './context.svelte.js';
|
11
10
|
|
12
11
|
let {children, ...props}: SelectHiddenSelectProps = $props();
|
13
12
|
|
14
|
-
let field = getFieldContext();
|
15
13
|
let select = selectContext.get();
|
16
14
|
|
17
15
|
let mergedProps = $derived(mergeProps(props, select.getHiddenSelectProps()));
|
18
16
|
</script>
|
19
17
|
|
20
|
-
<select
|
18
|
+
<select {...mergedProps}>
|
21
19
|
{@render children?.()}
|
22
20
|
</select>
|
@@ -22,6 +22,17 @@ export function createSwitch(props) {
|
|
22
22
|
dir: locale?.dir,
|
23
23
|
getRootNode: environment?.getRootNode,
|
24
24
|
}));
|
25
|
-
const api = $derived(reflect(() =>
|
25
|
+
const api = $derived(reflect(() => {
|
26
|
+
const o = switch$.connect(state, send, normalizeProps);
|
27
|
+
return {
|
28
|
+
...o,
|
29
|
+
getHiddenInputProps() {
|
30
|
+
return {
|
31
|
+
'aria-describedby': field?.['aria-describedby'],
|
32
|
+
...o.getHiddenInputProps(),
|
33
|
+
};
|
34
|
+
},
|
35
|
+
};
|
36
|
+
}));
|
26
37
|
return api;
|
27
38
|
}
|
@@ -5,16 +5,14 @@
|
|
5
5
|
</script>
|
6
6
|
|
7
7
|
<script lang="ts">
|
8
|
-
import {getFieldContext} from '../field/context.svelte.js';
|
9
8
|
import {mergeProps} from '../merge-props.js';
|
10
9
|
import {switchContext} from './context.svelte.js';
|
11
10
|
|
12
11
|
let {...props}: SwitchHiddenInputProps = $props();
|
13
12
|
|
14
|
-
let field = getFieldContext();
|
15
13
|
let switch$ = switchContext.get();
|
16
14
|
|
17
15
|
let mergedProps = $derived(mergeProps(props, switch$.getHiddenInputProps()));
|
18
16
|
</script>
|
19
17
|
|
20
|
-
<input
|
18
|
+
<input {...mergedProps} />
|
@@ -22,6 +22,17 @@ export function createTagsInput(props) {
|
|
22
22
|
dir: locale?.dir,
|
23
23
|
getRootNode: environment?.getRootNode,
|
24
24
|
}));
|
25
|
-
const api = $derived(reflect(() =>
|
25
|
+
const api = $derived(reflect(() => {
|
26
|
+
const o = tagsInput.connect(state, send, normalizeProps);
|
27
|
+
return {
|
28
|
+
...o,
|
29
|
+
getHiddenInputProps() {
|
30
|
+
return {
|
31
|
+
'aria-describedby': field?.['aria-describedby'],
|
32
|
+
...o.getHiddenInputProps(),
|
33
|
+
};
|
34
|
+
},
|
35
|
+
};
|
36
|
+
}));
|
26
37
|
return api;
|
27
38
|
}
|
@@ -5,13 +5,11 @@
|
|
5
5
|
</script>
|
6
6
|
|
7
7
|
<script lang="ts">
|
8
|
-
import {getFieldContext} from '../field/context.svelte.js';
|
9
8
|
import {mergeProps} from '../merge-props.js';
|
10
9
|
import {tagsInputContext} from './context.svelte.js';
|
11
10
|
|
12
11
|
let {...props}: TagsInputHiddenInputProps = $props();
|
13
12
|
|
14
|
-
let field = getFieldContext();
|
15
13
|
let tagsInput = tagsInputContext.get();
|
16
14
|
|
17
15
|
let mergedProps = $derived(
|
@@ -19,4 +17,4 @@
|
|
19
17
|
);
|
20
18
|
</script>
|
21
19
|
|
22
|
-
<input
|
20
|
+
<input {...mergedProps} />
|