@box/blueprint-web 17.1.0 → 17.2.1
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.
|
@@ -33,6 +33,7 @@ const DatePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
33
33
|
onChange,
|
|
34
34
|
value,
|
|
35
35
|
defaultValue,
|
|
36
|
+
autoFocus = false,
|
|
36
37
|
hideLabel = false,
|
|
37
38
|
label,
|
|
38
39
|
openCalendarDropdownAriaLabel,
|
|
@@ -61,7 +62,7 @@ const DatePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
61
62
|
});
|
|
62
63
|
const dateInputRef = useRef(null);
|
|
63
64
|
const calendarButtonRef = useRef(null);
|
|
64
|
-
const shouldFocusStayInInput = useRef(
|
|
65
|
+
const shouldFocusStayInInput = useRef(autoFocus && isCalendarOpen);
|
|
65
66
|
const focusFirstDateSegment = useCallback(() => {
|
|
66
67
|
dateInputRef.current?.querySelector('[role="spinbutton"]')?.focus();
|
|
67
68
|
}, []);
|
|
@@ -145,6 +146,7 @@ const DatePicker = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
145
146
|
...rest,
|
|
146
147
|
ref: forwardedRef,
|
|
147
148
|
"aria-describedby": ariaDescribedBy,
|
|
149
|
+
autoFocus: autoFocus,
|
|
148
150
|
className: clsx(styles.datePicker, {
|
|
149
151
|
[styles.disabled]: isDisabled
|
|
150
152
|
}, className),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/blueprint-web",
|
|
3
|
-
"version": "17.1
|
|
3
|
+
"version": "17.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"publishConfig": {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@ariakit/react": "0.4.21",
|
|
57
57
|
"@ariakit/react-core": "0.4.21",
|
|
58
|
-
"@box/blueprint-web-assets": "^5.7.
|
|
58
|
+
"@box/blueprint-web-assets": "^5.7.19",
|
|
59
59
|
"@internationalized/date": "^3.12.0",
|
|
60
60
|
"@radix-ui/react-accordion": "1.1.2",
|
|
61
61
|
"@radix-ui/react-checkbox": "1.0.4",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"devDependencies": {
|
|
87
87
|
"@box/box-test-client": "^3.2.7",
|
|
88
88
|
"@box/playwright-utils": "^2.8.5",
|
|
89
|
-
"@box/storybook-utils": "^1.2.
|
|
89
|
+
"@box/storybook-utils": "^1.2.28",
|
|
90
90
|
"@figma/code-connect": "1.4.4",
|
|
91
91
|
"@playwright/test": "1.46.1",
|
|
92
92
|
"@types/js-yaml": "^4.0.9",
|