@spark-ui/components 10.0.3 → 10.0.5
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/CHANGELOG.md +10 -0
- package/dist/combobox/index.js +9 -3
- package/dist/combobox/index.js.map +1 -1
- package/dist/combobox/index.mjs +9 -3
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/form-field/index.js +0 -1
- package/dist/form-field/index.js.map +1 -1
- package/dist/form-field/index.mjs +0 -1
- package/dist/form-field/index.mjs.map +1 -1
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [10.0.5](https://github.com/leboncoin/spark-web/compare/v10.0.4...v10.0.5) (2025-03-25)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **components:** fixed accessible description on combobox input ([678d449](https://github.com/leboncoin/spark-web/commit/678d4491b58a097ed04d2cbd93170650655ba97b))
|
|
11
|
+
|
|
12
|
+
## [10.0.4](https://github.com/leboncoin/spark-web/compare/v10.0.3...v10.0.4) (2025-03-24)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @spark-ui/components
|
|
15
|
+
|
|
6
16
|
## [10.0.3](https://github.com/leboncoin/spark-web/compare/v10.0.2...v10.0.3) (2025-03-24)
|
|
7
17
|
|
|
8
18
|
### Bug Fixes
|
package/dist/combobox/index.js
CHANGED
|
@@ -1891,6 +1891,7 @@ var GroupContent = ({ children, className, ref: forwardedRef }) => {
|
|
|
1891
1891
|
Group.displayName = "Combobox.Group";
|
|
1892
1892
|
|
|
1893
1893
|
// src/combobox/ComboboxInput.tsx
|
|
1894
|
+
var import_form_field2 = require("@spark-ui/components/form-field");
|
|
1894
1895
|
var import_use_combined_state2 = require("@spark-ui/use-combined-state");
|
|
1895
1896
|
var import_use_merge_refs2 = require("@spark-ui/use-merge-refs");
|
|
1896
1897
|
var import_class_variance_authority14 = require("class-variance-authority");
|
|
@@ -1907,7 +1908,9 @@ var Input = ({
|
|
|
1907
1908
|
...props
|
|
1908
1909
|
}) => {
|
|
1909
1910
|
const ctx = useComboboxContext();
|
|
1911
|
+
const field = (0, import_form_field2.useFormFieldControl)();
|
|
1910
1912
|
const [inputValue] = (0, import_use_combined_state2.useCombinedState)(value, defaultValue);
|
|
1913
|
+
const { isInvalid, isRequired, description } = field;
|
|
1911
1914
|
(0, import_react10.useEffect)(() => {
|
|
1912
1915
|
if (inputValue != null) {
|
|
1913
1916
|
ctx.setInputValue(inputValue);
|
|
@@ -1977,7 +1980,10 @@ var Input = ({
|
|
|
1977
1980
|
value: ctx.inputValue,
|
|
1978
1981
|
"aria-label": ariaLabel,
|
|
1979
1982
|
disabled: ctx.disabled,
|
|
1980
|
-
readOnly: ctx.readOnly
|
|
1983
|
+
readOnly: ctx.readOnly,
|
|
1984
|
+
"aria-invalid": isInvalid,
|
|
1985
|
+
required: isRequired,
|
|
1986
|
+
"aria-describedby": description
|
|
1981
1987
|
}
|
|
1982
1988
|
) })
|
|
1983
1989
|
] });
|
|
@@ -2322,7 +2328,7 @@ var SelectedItems = () => {
|
|
|
2322
2328
|
SelectedItems.displayName = "Combobox.SelectedItems";
|
|
2323
2329
|
|
|
2324
2330
|
// src/combobox/ComboboxTrigger.tsx
|
|
2325
|
-
var
|
|
2331
|
+
var import_form_field3 = require("@spark-ui/components/form-field");
|
|
2326
2332
|
var import_use_merge_refs5 = require("@spark-ui/use-merge-refs");
|
|
2327
2333
|
var import_class_variance_authority23 = require("class-variance-authority");
|
|
2328
2334
|
var import_react16 = require("react");
|
|
@@ -2397,7 +2403,7 @@ var useWidthIncreaseCallback = (elementRef, callback) => {
|
|
|
2397
2403
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2398
2404
|
var Trigger2 = ({ className, children, ref: forwardedRef }) => {
|
|
2399
2405
|
const ctx = useComboboxContext();
|
|
2400
|
-
const field = (0,
|
|
2406
|
+
const field = (0, import_form_field3.useFormFieldControl)();
|
|
2401
2407
|
const leadingIcon = findElement(children, "Combobox.LeadingIcon");
|
|
2402
2408
|
const selectedItems = findElement(children, "Combobox.SelectedItems");
|
|
2403
2409
|
const input = findElement(children, "Combobox.Input");
|