@eqtylab/equality 4.3.0 → 4.3.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.
- package/CHANGELOG.md +8 -0
- package/dist/index.cjs +13 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Notable changes to Equality are recorded here, following [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
4
4
|
|
|
5
|
+
## 4.3.1 - 2026-09-24
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- A searchable `DropdownMenu`, `FilterDropdown` or `RadioDropdown` inside a `Dialog` or
|
|
10
|
+
`Sheet` now focuses its search box when opened. The dialog's focus trap pulled focus
|
|
11
|
+
back out, leaving it on the menu.
|
|
12
|
+
|
|
5
13
|
## 4.3.0 - 2026-09-24
|
|
6
14
|
|
|
7
15
|
### Added
|
package/dist/index.cjs
CHANGED
|
@@ -2067,11 +2067,16 @@ var DropdownMenuSub = ({
|
|
|
2067
2067
|
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Sub, { ...props, children });
|
|
2068
2068
|
};
|
|
2069
2069
|
var MENU_ITEM_SELECTOR = '[role="menuitem"]:not([data-disabled]),[role="menuitemcheckbox"]:not([data-disabled]),[role="menuitemradio"]:not([data-disabled])';
|
|
2070
|
-
var DropdownMenuContent = React15__namespace.forwardRef(({ className, sideOffset = 4, onKeyDown, children, ...props }, ref) => {
|
|
2070
|
+
var DropdownMenuContent = React15__namespace.forwardRef(({ className, sideOffset = 4, onKeyDown, onFocus, children, ...props }, ref) => {
|
|
2071
2071
|
const ctx = useDropdownMenuSearch();
|
|
2072
2072
|
const setListId = ctx?.setListId;
|
|
2073
2073
|
const searching = isSearchActive(ctx);
|
|
2074
2074
|
const resultCount = ctx?.matchCount ?? 0;
|
|
2075
|
+
const openFocusHandledRef = React15__namespace.useRef(false);
|
|
2076
|
+
const searchVisible = ctx?.visible ?? false;
|
|
2077
|
+
React15__namespace.useEffect(() => {
|
|
2078
|
+
if (!searchVisible) openFocusHandledRef.current = false;
|
|
2079
|
+
}, [searchVisible]);
|
|
2075
2080
|
const composedContentRef = React15__namespace.useCallback(
|
|
2076
2081
|
(node) => {
|
|
2077
2082
|
assignRefs(node, ref);
|
|
@@ -2085,6 +2090,13 @@ var DropdownMenuContent = React15__namespace.forwardRef(({ className, sideOffset
|
|
|
2085
2090
|
ref: composedContentRef,
|
|
2086
2091
|
sideOffset,
|
|
2087
2092
|
className: cn(styles22__default.default["dropdown-menu-content"], className),
|
|
2093
|
+
onFocus: (event) => {
|
|
2094
|
+
onFocus?.(event);
|
|
2095
|
+
if (openFocusHandledRef.current) return;
|
|
2096
|
+
openFocusHandledRef.current = true;
|
|
2097
|
+
if (event.target !== event.currentTarget || !ctx?.enabled || !ctx.visible) return;
|
|
2098
|
+
ctx.requestFocus();
|
|
2099
|
+
},
|
|
2088
2100
|
onKeyDown: (event) => {
|
|
2089
2101
|
onKeyDown?.(event);
|
|
2090
2102
|
if (!ctx?.enabled) return;
|