ui-ingredients 0.0.35 → 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/combobox/create-combobox.svelte.js +13 -4
- package/dist/editable/create-editable.svelte.js +12 -1
- package/dist/field/create-field.svelte.d.ts +1 -0
- package/dist/field/create-field.svelte.js +4 -0
- package/dist/file-upload/create-file-upload.svelte.js +12 -1
- package/dist/number-input/create-number-input.svelte.js +12 -1
- package/dist/pin-input/create-pin-input.svelte.js +6 -0
- package/dist/rating-group/create-rating-group.svelte.js +12 -1
- package/dist/select/create-select.svelte.js +13 -4
- package/dist/switch/create-switch.svelte.js +12 -1
- package/dist/tags-input/create-tags-input.svelte.js +12 -1
- 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
|
}
|
@@ -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
|
}
|
@@ -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
|
}
|
@@ -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">;
|
@@ -76,6 +76,7 @@ export function createField(props) {
|
|
76
76
|
...parts.errorText.attrs,
|
77
77
|
id: ids.errorText,
|
78
78
|
hidden: !hasErrorText,
|
79
|
+
'aria-live': 'polite',
|
79
80
|
'data-invalid': dataAttr(invalid),
|
80
81
|
'data-disabled': dataAttr(disabled),
|
81
82
|
'data-required': dataAttr(required),
|
@@ -151,6 +152,9 @@ export function createField(props) {
|
|
151
152
|
get invalid() {
|
152
153
|
return invalid;
|
153
154
|
},
|
155
|
+
get 'aria-describedby'() {
|
156
|
+
return ariaDescribedby;
|
157
|
+
},
|
154
158
|
getRootProps,
|
155
159
|
getLabelProps,
|
156
160
|
getErrorTextProps,
|
@@ -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
|
}
|
@@ -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
|
}
|
@@ -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
|
}
|
@@ -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
|
}
|
@@ -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
|
}
|
@@ -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
|
}
|