@box/blueprint-web 19.4.0 → 19.4.2
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.
|
@@ -381,6 +381,9 @@ const RootInner = ({
|
|
|
381
381
|
element.setAttribute('autocomplete', autoComplete);
|
|
382
382
|
}
|
|
383
383
|
}, [autoComplete]);
|
|
384
|
+
const showLoading = loading && !!loadingAriaLabel;
|
|
385
|
+
const hasPopoverContent = showLoading || filteredOptions.length > 0 || !!noResultMessage;
|
|
386
|
+
const isExpanded = isOpen && hasPopoverContent;
|
|
384
387
|
const inputComponent = isInput ? jsxs(Fragment, {
|
|
385
388
|
children: [jsx(Label, {
|
|
386
389
|
className: clsx(styles.label, {
|
|
@@ -431,6 +434,7 @@ const RootInner = ({
|
|
|
431
434
|
...comboboxProps,
|
|
432
435
|
ref: reference,
|
|
433
436
|
"aria-describedby": ariaDescribedBy,
|
|
437
|
+
"aria-expanded": isExpanded,
|
|
434
438
|
...(hasError && {
|
|
435
439
|
'aria-invalid': 'true'
|
|
436
440
|
}),
|
|
@@ -485,6 +489,7 @@ const RootInner = ({
|
|
|
485
489
|
})]
|
|
486
490
|
}) : jsx(Combobox$1, {
|
|
487
491
|
...comboboxProps,
|
|
492
|
+
"aria-expanded": isExpanded,
|
|
488
493
|
autoSelect: false,
|
|
489
494
|
id: comboboxId,
|
|
490
495
|
render: jsx(TextArea, {
|
|
@@ -514,12 +519,11 @@ const RootInner = ({
|
|
|
514
519
|
// Disable typeahead so it doesn't conflict with typing on the combobox input
|
|
515
520
|
typeahead: false
|
|
516
521
|
}), [selectStore]);
|
|
517
|
-
const showLoading = loading && !!loadingAriaLabel;
|
|
518
522
|
return jsxs("div", {
|
|
519
523
|
className: clsx(styles.container, {
|
|
520
524
|
[styles.disabled]: disabled
|
|
521
525
|
}, className),
|
|
522
|
-
children: [inputComponent,
|
|
526
|
+
children: [inputComponent, hasPopoverContent ? jsx(ComboboxPopover, {
|
|
523
527
|
ref: popoverRefCallback,
|
|
524
528
|
"aria-labelledby": comboboxId,
|
|
525
529
|
className: clsx(styles.popover, popoverClassName),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/blueprint-web",
|
|
3
|
-
"version": "19.4.
|
|
3
|
+
"version": "19.4.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"publishConfig": {
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@ariakit/react": "0.4.21",
|
|
56
56
|
"@ariakit/react-core": "0.4.21",
|
|
57
|
-
"@box/blueprint-web-assets": "^5.
|
|
57
|
+
"@box/blueprint-web-assets": "^5.18.1",
|
|
58
58
|
"@internationalized/date": "^3.12.4",
|
|
59
59
|
"@radix-ui/react-accordion": "1.1.2",
|
|
60
60
|
"@radix-ui/react-checkbox": "1.0.4",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@box/box-test-client": "^3.2.7",
|
|
83
83
|
"@box/playwright-utils": "^3.10.0",
|
|
84
|
-
"@box/storybook-utils": "^1.4.
|
|
84
|
+
"@box/storybook-utils": "^1.4.50",
|
|
85
85
|
"@figma/code-connect": "1.4.4",
|
|
86
86
|
"@playwright/test": "1.46.1",
|
|
87
87
|
"@types/js-yaml": "^4.0.9",
|