ui-ingredients 0.0.35 → 0.0.36
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/checkbox/hidden-input.svelte +3 -1
- package/dist/combobox/input.svelte +3 -1
- package/dist/editable/input.svelte +3 -1
- package/dist/field/create-field.svelte.d.ts +1 -0
- package/dist/field/create-field.svelte.js +3 -0
- package/dist/file-upload/hidden-input.svelte +3 -1
- package/dist/number-input/input.svelte +3 -1
- package/dist/pin-input/hidden-input.svelte +3 -1
- package/dist/rating-group/hidden-input.svelte +3 -1
- package/dist/select/hidden-select.svelte +3 -1
- package/dist/switch/hidden-input.svelte +3 -1
- package/dist/tags-input/hidden-input.svelte +3 -1
- package/package.json +1 -1
@@ -5,14 +5,16 @@
|
|
5
5
|
</script>
|
6
6
|
|
7
7
|
<script lang="ts">
|
8
|
+
import {getFieldContext} from '../field/context.svelte.js';
|
8
9
|
import {mergeProps} from '../merge-props.js';
|
9
10
|
import {checkboxContext} from './context.svelte.js';
|
10
11
|
|
11
12
|
let {...props}: CheckboxHiddenInputProps = $props();
|
12
13
|
|
14
|
+
let field = getFieldContext();
|
13
15
|
let checkbox = checkboxContext.get();
|
14
16
|
|
15
17
|
let mergedProps = $derived(mergeProps(props, checkbox.getHiddenInputProps()));
|
16
18
|
</script>
|
17
19
|
|
18
|
-
<input {...mergedProps} />
|
20
|
+
<input aria-describedby={field?.['aria-describedby']} {...mergedProps} />
|
@@ -7,11 +7,13 @@
|
|
7
7
|
</script>
|
8
8
|
|
9
9
|
<script lang="ts">
|
10
|
+
import {getFieldContext} from '../field/context.svelte.js';
|
10
11
|
import {mergeProps} from '../merge-props.js';
|
11
12
|
import {comboboxContext} from './context.svelte.js';
|
12
13
|
|
13
14
|
let {asChild, ...props}: ComboboxInputProps = $props();
|
14
15
|
|
16
|
+
let field = getFieldContext();
|
15
17
|
let combobox = comboboxContext.get();
|
16
18
|
|
17
19
|
let mergedProps = $derived(mergeProps(props, combobox.getInputProps()));
|
@@ -20,5 +22,5 @@
|
|
20
22
|
{#if asChild}
|
21
23
|
{@render asChild(mergedProps)}
|
22
24
|
{:else}
|
23
|
-
<input {...mergedProps} />
|
25
|
+
<input aria-describedby={field?.['aria-describedby']} {...mergedProps} />
|
24
26
|
{/if}
|
@@ -7,11 +7,13 @@
|
|
7
7
|
</script>
|
8
8
|
|
9
9
|
<script lang="ts">
|
10
|
+
import {getFieldContext} from '../field/context.svelte.js';
|
10
11
|
import {mergeProps} from '../merge-props.js';
|
11
12
|
import {editableContext} from './context.svelte.js';
|
12
13
|
|
13
14
|
let {asChild, ...props}: EditableInputProps = $props();
|
14
15
|
|
16
|
+
let field = getFieldContext();
|
15
17
|
let editable = editableContext.get();
|
16
18
|
|
17
19
|
let mergedProps = $derived(mergeProps(props, editable.getInputProps()));
|
@@ -20,5 +22,5 @@
|
|
20
22
|
{#if asChild}
|
21
23
|
{@render asChild(mergedProps)}
|
22
24
|
{:else}
|
23
|
-
<input {...mergedProps} />
|
25
|
+
<input aria-describedby={field?.['aria-describedby']} {...mergedProps} />
|
24
26
|
{/if}
|
@@ -28,6 +28,7 @@ export declare function createField(props: CreateFieldProps): {
|
|
28
28
|
readonly required: boolean;
|
29
29
|
readonly readOnly: boolean;
|
30
30
|
readonly invalid: boolean;
|
31
|
+
readonly 'aria-describedby': string;
|
31
32
|
getRootProps: () => HTMLProps<"div">;
|
32
33
|
getLabelProps: () => HTMLProps<"label">;
|
33
34
|
getErrorTextProps: () => HTMLProps<"div">;
|
@@ -5,11 +5,13 @@
|
|
5
5
|
</script>
|
6
6
|
|
7
7
|
<script lang="ts">
|
8
|
+
import {getFieldContext} from '../field/context.svelte.js';
|
8
9
|
import {mergeProps} from '../merge-props.js';
|
9
10
|
import {fileUploadContext} from './context.svelte.js';
|
10
11
|
|
11
12
|
let {...props}: FileUploadHiddenInputProps = $props();
|
12
13
|
|
14
|
+
let field = getFieldContext();
|
13
15
|
let fileUpload = fileUploadContext.get();
|
14
16
|
|
15
17
|
let mergedProps = $derived(
|
@@ -17,4 +19,4 @@
|
|
17
19
|
);
|
18
20
|
</script>
|
19
21
|
|
20
|
-
<input {...mergedProps} />
|
22
|
+
<input aria-describedby={field?.['aria-describedby']} {...mergedProps} />
|
@@ -7,11 +7,13 @@
|
|
7
7
|
</script>
|
8
8
|
|
9
9
|
<script lang="ts">
|
10
|
+
import {getFieldContext} from '../field/context.svelte.js';
|
10
11
|
import {mergeProps} from '../merge-props.js';
|
11
12
|
import {numberInputContext} from './context.svelte.js';
|
12
13
|
|
13
14
|
let {asChild, ...props}: NumberInputInputProps = $props();
|
14
15
|
|
16
|
+
let field = getFieldContext();
|
15
17
|
let numberInput = numberInputContext.get();
|
16
18
|
|
17
19
|
let mergedProps = $derived(mergeProps(props, numberInput.getInputProps()));
|
@@ -20,5 +22,5 @@
|
|
20
22
|
{#if asChild}
|
21
23
|
{@render asChild(mergedProps)}
|
22
24
|
{:else}
|
23
|
-
<input {...mergedProps} />
|
25
|
+
<input aria-describedby={field?.['aria-describedby']} {...mergedProps} />
|
24
26
|
{/if}
|
@@ -5,14 +5,16 @@
|
|
5
5
|
</script>
|
6
6
|
|
7
7
|
<script lang="ts">
|
8
|
+
import {getFieldContext} from '../field/context.svelte.js';
|
8
9
|
import {mergeProps} from '../merge-props.js';
|
9
10
|
import {pinInputContext} from './context.svelte.js';
|
10
11
|
|
11
12
|
let {...props}: PinInputHiddenInputProps = $props();
|
12
13
|
|
14
|
+
let field = getFieldContext();
|
13
15
|
let pinInput = pinInputContext.get();
|
14
16
|
|
15
17
|
let mergedProps = $derived(mergeProps(props, pinInput.getHiddenInputProps()));
|
16
18
|
</script>
|
17
19
|
|
18
|
-
<input {...mergedProps} />
|
20
|
+
<input aria-describedby={field?.['aria-describedby']} {...mergedProps} />
|
@@ -5,11 +5,13 @@
|
|
5
5
|
</script>
|
6
6
|
|
7
7
|
<script lang="ts">
|
8
|
+
import {getFieldContext} from '../field/context.svelte.js';
|
8
9
|
import {mergeProps} from '../merge-props.js';
|
9
10
|
import {ratingGroupContext} from './context.svelte.js';
|
10
11
|
|
11
12
|
let {...props}: RatingGroupHiddenInputProps = $props();
|
12
13
|
|
14
|
+
let field = getFieldContext();
|
13
15
|
let radioGroup = ratingGroupContext.get();
|
14
16
|
|
15
17
|
let mergedProps = $derived(
|
@@ -17,4 +19,4 @@
|
|
17
19
|
);
|
18
20
|
</script>
|
19
21
|
|
20
|
-
<input {...mergedProps} />
|
22
|
+
<input aria-describedby={field?.['aria-describedby']} {...mergedProps} />
|
@@ -5,16 +5,18 @@
|
|
5
5
|
</script>
|
6
6
|
|
7
7
|
<script lang="ts">
|
8
|
+
import {getFieldContext} from '../field/context.svelte.js';
|
8
9
|
import {mergeProps} from '../merge-props.js';
|
9
10
|
import {selectContext} from './context.svelte.js';
|
10
11
|
|
11
12
|
let {children, ...props}: SelectHiddenSelectProps = $props();
|
12
13
|
|
14
|
+
let field = getFieldContext();
|
13
15
|
let select = selectContext.get();
|
14
16
|
|
15
17
|
let mergedProps = $derived(mergeProps(props, select.getHiddenSelectProps()));
|
16
18
|
</script>
|
17
19
|
|
18
|
-
<select {...mergedProps}>
|
20
|
+
<select aria-describedby={field?.['aria-describedby']} {...mergedProps}>
|
19
21
|
{@render children?.()}
|
20
22
|
</select>
|
@@ -5,14 +5,16 @@
|
|
5
5
|
</script>
|
6
6
|
|
7
7
|
<script lang="ts">
|
8
|
+
import {getFieldContext} from '../field/context.svelte.js';
|
8
9
|
import {mergeProps} from '../merge-props.js';
|
9
10
|
import {switchContext} from './context.svelte.js';
|
10
11
|
|
11
12
|
let {...props}: SwitchHiddenInputProps = $props();
|
12
13
|
|
14
|
+
let field = getFieldContext();
|
13
15
|
let switch$ = switchContext.get();
|
14
16
|
|
15
17
|
let mergedProps = $derived(mergeProps(props, switch$.getHiddenInputProps()));
|
16
18
|
</script>
|
17
19
|
|
18
|
-
<input {...mergedProps} />
|
20
|
+
<input aria-describedby={field?.['aria-describedby']} {...mergedProps} />
|
@@ -5,11 +5,13 @@
|
|
5
5
|
</script>
|
6
6
|
|
7
7
|
<script lang="ts">
|
8
|
+
import {getFieldContext} from '../field/context.svelte.js';
|
8
9
|
import {mergeProps} from '../merge-props.js';
|
9
10
|
import {tagsInputContext} from './context.svelte.js';
|
10
11
|
|
11
12
|
let {...props}: TagsInputHiddenInputProps = $props();
|
12
13
|
|
14
|
+
let field = getFieldContext();
|
13
15
|
let tagsInput = tagsInputContext.get();
|
14
16
|
|
15
17
|
let mergedProps = $derived(
|
@@ -17,4 +19,4 @@
|
|
17
19
|
);
|
18
20
|
</script>
|
19
21
|
|
20
|
-
<input {...mergedProps} />
|
22
|
+
<input aria-describedby={field?.['aria-describedby']} {...mergedProps} />
|