@sanity/ui 4.1.0 → 4.1.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/dist/{arrow-C6TlkggA.js → arrow-DKn5YKdy.js} +2 -2
- package/dist/{arrow-C6TlkggA.js.map → arrow-DKn5YKdy.js.map} +1 -1
- package/dist/autocomplete.d.ts +2 -2
- package/dist/autocomplete.d.ts.map +1 -1
- package/dist/autocomplete.js +5 -5
- package/dist/breadcrumbs.d.ts +2 -2
- package/dist/breadcrumbs.d.ts.map +1 -1
- package/dist/breadcrumbs.js +4 -4
- package/dist/{button-D3iEd7Je.js → button-Dh_M2fYx.js} +4 -4
- package/dist/{button-D3iEd7Je.js.map → button-Dh_M2fYx.js.map} +1 -1
- package/dist/code.d.ts +2 -2
- package/dist/code.d.ts.map +1 -1
- package/dist/{factory-BA3gEfyI.js → factory-BzXTX8_Q.js} +2 -2
- package/dist/{factory-BA3gEfyI.js.map → factory-BzXTX8_Q.js.map} +1 -1
- package/dist/{flex-CySCBzQm.js → flex-DmbDG2ks.js} +2 -2
- package/dist/{flex-CySCBzQm.js.map → flex-DmbDG2ks.js.map} +1 -1
- package/dist/{getElementRef-5HZQ-Owu.js → getElementRef-Jw7gY0eV.js} +13 -2
- package/dist/getElementRef-Jw7gY0eV.js.map +1 -0
- package/dist/{grid-I2TNptX-.js → grid-6JSgMj1O.js} +2 -2
- package/dist/{grid-I2TNptX-.js.map → grid-6JSgMj1O.js.map} +1 -1
- package/dist/{hotkeys-Bi6Q5963.js → hotkeys-uSArGPzR.js} +3 -3
- package/dist/{hotkeys-Bi6Q5963.js.map → hotkeys-uSArGPzR.js.map} +1 -1
- package/dist/index.d.ts +156 -156
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -12
- package/dist/index.js.map +1 -1
- package/dist/{layer-BK7xWHcE.js → layer-BfwisMR6.js} +3 -3
- package/dist/{layer-BK7xWHcE.js.map → layer-BfwisMR6.js.map} +1 -1
- package/dist/menu.d.ts +6 -6
- package/dist/menu.d.ts.map +1 -1
- package/dist/menu.js +6 -6
- package/dist/menu.js.map +1 -1
- package/dist/{popover-CdBTZDvj.js → popover-myCXZV_F.js} +34 -33
- package/dist/popover-myCXZV_F.js.map +1 -0
- package/dist/popover.js +1 -1
- package/dist/{stack-BGFEokua.js → stack-rsNFPq2-.js} +2 -2
- package/dist/{stack-BGFEokua.js.map → stack-rsNFPq2-.js.map} +1 -1
- package/dist/{textInput-Bu3QuADZ.js → textInput-DAaORuky.js} +4 -4
- package/dist/{textInput-Bu3QuADZ.js.map → textInput-DAaORuky.js.map} +1 -1
- package/dist/theme.d.ts +33 -33
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +1 -1
- package/dist/toast.d.ts +4 -4
- package/dist/toast.d.ts.map +1 -1
- package/dist/toast.js +5 -5
- package/dist/tooltip.d.ts +5 -5
- package/dist/tooltip.d.ts.map +1 -1
- package/dist/tooltip.js +28 -27
- package/dist/tooltip.js.map +1 -1
- package/dist/{useLayer-jUJIz8mh.js → useLayer-D1usxIE0.js} +2 -2
- package/dist/{useLayer-jUJIz8mh.js.map → useLayer-D1usxIE0.js.map} +1 -1
- package/package.json +7 -7
- package/dist/getElementRef-5HZQ-Owu.js.map +0 -1
- package/dist/popover-CdBTZDvj.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as EMPTY_RECORD } from "./helpers-C8xxXAQC.js";
|
|
2
2
|
import { a as isHTMLElement, n as containsOrEqualsElement } from "./element-BYgCE_iK.js";
|
|
3
|
-
import { n as LayerProvider, t as useLayer } from "./useLayer-
|
|
3
|
+
import { n as LayerProvider, t as useLayer } from "./useLayer-D1usxIE0.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
5
|
import { clsx } from "clsx/lite";
|
|
6
6
|
import { useEffect, useImperativeHandle, useRef } from "react";
|
|
@@ -19,7 +19,7 @@ function LayerChildren(props) {
|
|
|
19
19
|
$[14] !== isTopLayer || $[15] !== onFocus ? (t5 = (event) => {
|
|
20
20
|
onFocus?.(event);
|
|
21
21
|
let rootElement = ref.current, target = document.activeElement;
|
|
22
|
-
|
|
22
|
+
isTopLayer && rootElement && target && isHTMLElement(target) && containsOrEqualsElement(rootElement, target) && (lastFocusedRef.current = target);
|
|
23
23
|
}, $[14] = isTopLayer, $[15] = onFocus, $[16] = t5) : t5 = $[16];
|
|
24
24
|
let handleFocus = t5, Component = as, t6;
|
|
25
25
|
$[17] === className ? t6 = $[18] : (t6 = clsx(layer, className), $[17] = className, $[18] = t6);
|
|
@@ -58,4 +58,4 @@ function Layer(props) {
|
|
|
58
58
|
}
|
|
59
59
|
export { Layer as t };
|
|
60
60
|
|
|
61
|
-
//# sourceMappingURL=layer-
|
|
61
|
+
//# sourceMappingURL=layer-BfwisMR6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layer-
|
|
1
|
+
{"version":3,"file":"layer-BfwisMR6.js","names":["as = 'div'","style = EMPTY_RECORD","() => ref.current","() => {\n const becameTopLayer = isTopLayerRef.current !== isTopLayer && isTopLayer\n\n if (becameTopLayer) {\n onActivate?.({activeElement: lastFocusedRef.current})\n }\n\n isTopLayerRef.current = isTopLayer\n }","[isTopLayer, onActivate]","(event: FocusEvent<HTMLDivElement, Element>) => {\n // Call the user-provided onFocus handler if any\n onFocus?.(event)\n\n const rootElement = ref.current\n const target = document.activeElement\n\n if (!isTopLayer || !rootElement || !target) return\n\n if (isHTMLElement(target) && containsOrEqualsElement(rootElement, target)) {\n lastFocusedRef.current = target\n }\n }","useCallback(\n // oxlint-disable-next-line no-unnecessary-type-arguments\n (event: FocusEvent<HTMLDivElement, Element>) => {\n // Call the user-provided onFocus handler if any\n onFocus?.(event)\n\n const rootElement = ref.current\n const target = document.activeElement\n\n if (!isTopLayer || !rootElement || !target) return\n\n if (isHTMLElement(target) && containsOrEqualsElement(rootElement, target)) {\n lastFocusedRef.current = target\n }\n },\n [isTopLayer, onFocus],\n )","clsx(layer, className)","{...style, zIndex}","<Component\n {...restProps}\n className={clsx(layer, className)}\n data-ui=\"Layer\"\n onFocus={handleFocus}\n ref={ref}\n style={{...style, zIndex}}\n >\n {children}\n </Component>","zOffset = 1","<LayerChildren {...restProps}>{children}</LayerChildren>","<LayerProvider zOffset={zOffset}>\n <LayerChildren {...restProps}>{children}</LayerChildren>\n </LayerProvider>"],"sources":["../src/core/utils/layer/layer.css.ts","../src/core/utils/layer/layer.tsx"],"sourcesContent":["import {style} from '@vanilla-extract/css'\n\nexport const layer = style({\n position: 'relative',\n})\n","import {clsx} from 'clsx/lite'\nimport {FocusEvent, useCallback, useEffect, useImperativeHandle, useRef} from 'react'\n\nimport {EMPTY_RECORD} from '../../constants'\nimport {containsOrEqualsElement, isHTMLElement} from '../../helpers/element'\nimport {LayerProvider} from './layerProvider'\nimport {useLayer} from './useLayer'\n\nimport {layer} from './layer.css'\n\n/**\n * @public\n */\nexport interface LayerProps {\n as?: React.ElementType | keyof React.JSX.IntrinsicElements\n /** A callback that fires when the layer becomes the top layer when it was not the top layer before. */\n onActivate?: (props: {activeElement: HTMLElement | null}) => void\n zOffset?: number | number[]\n}\n\ninterface LayerChildrenProps {\n as?: React.ElementType | keyof React.JSX.IntrinsicElements\n onActivate?: LayerProps['onActivate']\n}\n\nfunction LayerChildren(props: LayerChildrenProps & Omit<React.HTMLProps<HTMLDivElement>, 'as'>) {\n const {\n as = 'div',\n children,\n className,\n onActivate,\n onFocus,\n ref: forwardedRef,\n style = EMPTY_RECORD,\n ...restProps\n } = props\n const {zIndex, isTopLayer} = useLayer()\n const lastFocusedRef = useRef<HTMLElement | null>(null)\n const ref = useRef<HTMLDivElement | null>(null)\n const isTopLayerRef = useRef<boolean>(isTopLayer)\n\n useImperativeHandle<HTMLDivElement | null, HTMLDivElement | null>(forwardedRef, () => ref.current)\n\n // When the layer very first mounts, it will be the top layer, but we don't want to fire\n // the callback in that case. We use a ref to track the previous value of isTopLayer to\n // determine if the layer has become the top layer since the last render.\n useEffect(() => {\n const becameTopLayer = isTopLayerRef.current !== isTopLayer && isTopLayer\n\n if (becameTopLayer) {\n onActivate?.({activeElement: lastFocusedRef.current})\n }\n\n isTopLayerRef.current = isTopLayer\n }, [isTopLayer, onActivate])\n\n const handleFocus = useCallback(\n // oxlint-disable-next-line no-unnecessary-type-arguments\n (event: FocusEvent<HTMLDivElement, Element>) => {\n // Call the user-provided onFocus handler if any\n onFocus?.(event)\n\n const rootElement = ref.current\n const target = document.activeElement\n\n if (!isTopLayer || !rootElement || !target) return\n\n if (isHTMLElement(target) && containsOrEqualsElement(rootElement, target)) {\n lastFocusedRef.current = target\n }\n },\n [isTopLayer, onFocus],\n )\n\n // Rendering the polymorphic `as` needs one concrete element type for JSX to\n // type-check the div-flavored props (the same widening styled-components'\n // `as` prop performed here before).\n // oxlint-disable-next-line no-unsafe-type-assertion\n const Component = as as 'div'\n\n return (\n <Component\n {...restProps}\n className={clsx(layer, className)}\n data-ui=\"Layer\"\n onFocus={handleFocus}\n ref={ref}\n style={{...style, zIndex}}\n >\n {children}\n </Component>\n )\n}\n\n/**\n * @public\n */\nexport function Layer(props: LayerProps & Omit<React.HTMLProps<HTMLDivElement>, 'as'>) {\n const {children, zOffset = 1, ...restProps} = props\n\n return (\n <LayerProvider zOffset={zOffset}>\n <LayerChildren {...restProps}>{children}</LayerChildren>\n </LayerProvider>\n )\n}\n"],"mappings":";;;;;;;;ACyBA,SAAS,cAAc,OAAyE;gBAG5F,UACA,WAGK,cAFL,YACA,SAGG,WAPHA,IAMAC;CAEE,AAAA,EAAA,OAAA,+IATE,CACJ,IAAA,IACA,UACA,WACA,YACA,SACA,KAAK,cACL,OAAA,IACA,GAAA,aACE;CARF,IAAA,KAAA,OAAA,KAAA,IAAK,QAALD,IAMA,QAAA,OAAA,KAAA,IAAQ,eAARC,IAGI,EAAC,QAAQ,eAAc,SAAS,GAChC,iBAAiB,OAA2B,IAAI,GAChD,MAAM,OAA8B,IAAI,GACxC,gBAAgB,OAAgB,UAAU,GAEgCC;CAAhF,oDAAsF,WAAA,IAAI,iCAA1F,oBAAkE,cAAcA,EAAiB;CAKvFC,IAAAA,IAQPC;CARH,AACmD,EAAA,QAAA,cAAA,EAAA,QAG/C,cAJM,WAAM;EAOd,AANuB,cAAc,YAAY,cAAc,cAG7D,aAAa,EAAC,eAAe,eAAe,QAAO,CAAC,GAGtD,cAAc,UAAU;CAC1B,GAAG,KAAA,CAAC,YAAY,UAAU,GAPyB,EAAA,MAAA,YAG/C,EAAA,MAAA,gEAJJ,UAAUD,IAQPC,EAAwB;CAIzBC,IAAAA;CAOO,AAAA,EAAA,QAAA,cAAA,EAAA,QALL,WAFF,MAAC,UAA+C;EAE9C,UAAU,KAAK;EAEf,IAAM,cAAc,IAAI,SAClB,SAAS,SAAS;EAEpB,AAAC,cAAe,eAAgB,UAEhC,cAAc,MAAM,KAAK,wBAAwB,aAAa,MAAM,MACtE,eAAe,UAAU;CAE7B,GALO,EAAA,MAAA,YALL,EAAA,MAAA;CAJJ,IAAM,cAAcC,IAsBd,YAAY,IAKHC;CAAY,AAAA,EAAA,QAAA,0BAAZ,KAAA,KAAK,OAAO,SAAS,GAAT,EAAA,MAAA;CAIhBC,IAAAA;CAAI,AAAA,EAAA,QAAA,SAAA,EAAA,QAAO,UAAX,KAAA;EAAC,GAAG;EAAO;CAAM,GAAb,EAAA,MAAA,OAAO,EAAA,MAAA;CANpBC,IAAAA;CADF,OACG,EAAA,QAAA,aAAA,EAAA,QAQE,YAAA,EAAA,QAJQ,eAAA,EAAA,QAHL,aAAA,EAAA,QACOF,MAAAA,EAAAA,QAIJC,MANT,KAAA,oBAAC,WAAD;EACE,GAAI;EACJ,WAAWD;EACX,WAAQ;EACR,SAAS;EACJ;EACL,OAAOC;EAEN;CACQ,CAAA,GATV,EAAA,MAAA,WAQE,EAAA,MAAA,UAJQ,EAAA,MAAA,aAHL,EAAA,MAAA,WACOD,EAAAA,MAAAA,IAIJC,EAAAA,MAAAA,8BANTC;AAWJ;;;;AAKA,SAAgB,MAAM,OAAiE;gBAC9E,UAA0B,WAAhBC;CAA6B,AAAA,EAAA,OAAA,0DAAxC,CAAC,UAAU,SAAA,IAAa,GAAA,aAAgB;CAA7B,IAAA,UAAA,OAAA,KAAA,IAAU,IAAVA,IAIbC;CAA+B,AAAA,EAAA,OAAA,YAAA,EAAA,OAAZ,aAAnB,KAAA,oBAAC,eAAD;EAAe,GAAI;EAAY;CAAwB,CAAA,GAAxB,EAAA,KAAA,UAAZ,EAAA,KAAA;CADrBC,IAAAA;CADF,OAEID,EAAAA,OAAAA,MAAAA,EAAAA,OADsB,WAAxB,KAAA,oBAAC,eAAD;EAAwB;EACtBA,UAAAA;CACa,CAAA,GADbA,EAAAA,KAAAA,IADsB,EAAA,KAAA,iCAAxBC;AAIJ"}
|
package/dist/menu.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ interface MenuProps extends ResponsivePaddingProps {
|
|
|
34
34
|
*
|
|
35
35
|
* @public
|
|
36
36
|
*/
|
|
37
|
-
declare function Menu(props: MenuProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height' | 'role' | 'tabIndex'>): import("react").JSX.Element;
|
|
37
|
+
export declare function Menu(props: MenuProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height' | 'role' | 'tabIndex'>): import("react").JSX.Element;
|
|
38
38
|
/**
|
|
39
39
|
* @public
|
|
40
40
|
*/
|
|
@@ -81,7 +81,7 @@ interface MenuButtonProps {
|
|
|
81
81
|
*
|
|
82
82
|
* @public
|
|
83
83
|
*/
|
|
84
|
-
declare function MenuButton(props: MenuButtonProps): import("react").JSX.Element;
|
|
84
|
+
export declare function MenuButton(props: MenuButtonProps): import("react").JSX.Element;
|
|
85
85
|
/**
|
|
86
86
|
* @public
|
|
87
87
|
*/
|
|
@@ -89,7 +89,7 @@ type MenuDividerProps<E extends ElementType = 'hr'> = Props<EmptyProps, E>;
|
|
|
89
89
|
/**
|
|
90
90
|
* @public
|
|
91
91
|
*/
|
|
92
|
-
declare const MenuDivider: <E extends ElementType = 'hr'>(props: MenuDividerProps<E>) => React.JSX.Element;
|
|
92
|
+
export declare const MenuDivider: <E extends ElementType = 'hr'>(props: MenuDividerProps<E>) => React.JSX.Element;
|
|
93
93
|
/**
|
|
94
94
|
* @public
|
|
95
95
|
*/
|
|
@@ -115,7 +115,7 @@ type MenuGroupProps<E extends ElementType = 'button'> = Props<MenuGroupOwnProps,
|
|
|
115
115
|
/**
|
|
116
116
|
* @public
|
|
117
117
|
*/
|
|
118
|
-
declare const MenuGroup: <E extends ElementType = 'button'>(props: MenuGroupProps<E>) => React.JSX.Element;
|
|
118
|
+
export declare const MenuGroup: <E extends ElementType = 'button'>(props: MenuGroupProps<E>) => React.JSX.Element;
|
|
119
119
|
/**
|
|
120
120
|
* @public
|
|
121
121
|
*/
|
|
@@ -141,6 +141,6 @@ type MenuItemProps<E extends ElementType = 'button'> = Props<MenuItemOwnProps, E
|
|
|
141
141
|
/**
|
|
142
142
|
* @public
|
|
143
143
|
*/
|
|
144
|
-
declare const MenuItem: <E extends ElementType = 'button'>(props: MenuItemProps<E>) => React.JSX.Element;
|
|
145
|
-
export {
|
|
144
|
+
export declare const MenuItem: <E extends ElementType = 'button'>(props: MenuItemProps<E>) => React.JSX.Element;
|
|
145
|
+
export type { MenuButtonProps, MenuDividerProps, MenuGroupOwnProps, MenuGroupProps, MenuItemOwnProps, MenuItemProps, MenuProps };
|
|
146
146
|
//# sourceMappingURL=menu.d.ts.map
|
package/dist/menu.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.d.ts","names":[],"sources":["../src/core/components/menu/menu.tsx","../src/core/components/menu/menuButton.tsx","../src/core/components/menu/menuDivider.tsx","../src/core/components/menu/menuGroup.tsx","../src/core/components/menu/menuItem.tsx"],"mappings":";;;;;;;UAiBiB,kBAAkB;;;;EAIjC;;;;EAIA;EACA,oBAAoB,OAAO;EAC3B;EACA;EACA,kBAAkB;EAClB,kBAAkB;EAClB,qBAAqB,IAAI;EACzB;EACA;;;;EAIA;EACA;EACA,mBAAmB,OAAO;;;;;;;
|
|
1
|
+
{"version":3,"file":"menu.d.ts","names":[],"sources":["../src/core/components/menu/menu.tsx","../src/core/components/menu/menuButton.tsx","../src/core/components/menu/menuDivider.tsx","../src/core/components/menu/menuGroup.tsx","../src/core/components/menu/menuItem.tsx"],"mappings":";;;;;;;UAiBiB,kBAAkB;;;;EAIjC;;;;EAIA;EACA,oBAAoB,OAAO;EAC3B;EACA;EACA,kBAAkB;EAClB,kBAAkB;EAClB,qBAAqB,IAAI;EACzB;EACA;;;;EAIA;EACA;EACA,mBAAmB,OAAO;;;;;;;wBAQZ,KACd,OAAO,YAAY,KAAK,MAAM,UAAU,0EAAuD,IAAA;;;;UChChF;;;;EAIf;;;;EAIA;EACA,QAAQ,MAAM,IAAI;EAClB;EACA,OAAO,MAAM,IAAI;EACjB;EACA;;;;EAIA;EACA,UAAU,KAAK;;;;EAIf;;;;EAIA;;;;;EAKA;;;;EAIA;EACA,MAAM,MAAM,IAAI;;;;;;;wBAQF,WAAW,OAAO,kCAAe,IAAA;;;;KCnDrC,iBAAiB,UAAU,sBAAsB,MAAM,YAAY;;;;qBA0BlE,cAAkD,UAAU,oBACvE,OAAO,iBAAiB,OACrB,MAAM,IAAI;;;;UCjBE;EACf;EAEA,OAAO,MAAM,cAAc,MAAM;EACjC,OAAO,KACL;EAUF;EACA,UAAU,KAAK;EACf,SAAS,SAAS;EAClB;;;;EAIA;EACA,MAAM,MAAM;EACZ,OAAO;;;;;KAMG,eAAe,UAAU,0BAA0B,MAAM,mBAAmB;;;;qBAwL3E,YAA8C,UAAU,wBACnE,OAAO,eAAe,OACnB,MAAM,IAAI;;;;UClNE,yBAAyB,wBAAwB;EAChE;EACA;EAEA,OAAO,MAAM,cAAc,MAAM;EAEjC,YAAY,MAAM,cAAc,MAAM;EACtC;EACA;EACA;;;;EAIA;EACA,OAAO,MAAM;EACb,OAAO;;;;;KAMG,cAAc,UAAU,0BAA0B,MAAM,kBAAkB;;;;qBAoJzE,WAA4C,UAAU,wBACjE,OAAO,cAAc,OAClB,MAAM,IAAI"}
|
package/dist/menu.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import { n as _getArrayProp } from "./helpers-C8xxXAQC.js";
|
|
3
3
|
import { i as isHTMLButtonElement, r as isHTMLAnchorElement } from "./element-BYgCE_iK.js";
|
|
4
4
|
import { t as getTheme_v2 } from "./getTheme_v2-y09KqtEb.js";
|
|
5
|
-
import { d as createGlobalScopedContext, h as _cardColorStyle, l as useRootTheme, r as isRecord, t as useLayer, v as responsiveRadiusStyle, y as Box } from "./useLayer-
|
|
6
|
-
import { t as Flex } from "./flex-
|
|
7
|
-
import { n as Text, t as Stack } from "./stack-
|
|
8
|
-
import { t as Popover } from "./popover-
|
|
5
|
+
import { d as createGlobalScopedContext, h as _cardColorStyle, l as useRootTheme, r as isRecord, t as useLayer, v as responsiveRadiusStyle, y as Box } from "./useLayer-D1usxIE0.js";
|
|
6
|
+
import { t as Flex } from "./flex-DmbDG2ks.js";
|
|
7
|
+
import { n as Text, t as Stack } from "./stack-rsNFPq2-.js";
|
|
8
|
+
import { t as Popover } from "./popover-myCXZV_F.js";
|
|
9
9
|
import { t as useClickOutsideEvent } from "./useClickOutsideEvent-wGLGWBZN.js";
|
|
10
|
-
import { i as useGlobalKeyDown, t as Hotkeys } from "./hotkeys-
|
|
10
|
+
import { i as useGlobalKeyDown, t as Hotkeys } from "./hotkeys-uSArGPzR.js";
|
|
11
11
|
import { c } from "react/compiler-runtime";
|
|
12
12
|
import { clsx } from "clsx/lite";
|
|
13
13
|
import { cloneElement, isValidElement, useContext, useEffect, useImperativeHandle, useRef, useState } from "react";
|
|
@@ -288,7 +288,7 @@ function MenuButton(props) {
|
|
|
288
288
|
let handleButtonKeyDown = t10, t11;
|
|
289
289
|
$[16] !== buttonElement || $[17] !== menuElements ? (t11 = (event_1) => {
|
|
290
290
|
let target = event_1.target;
|
|
291
|
-
if (target instanceof Node && !
|
|
291
|
+
if (target instanceof Node && (!buttonElement || target !== buttonElement && !buttonElement.contains(target))) {
|
|
292
292
|
for (let el of menuElements) if (target === el || el.contains(target)) return;
|
|
293
293
|
setOpen(!1);
|
|
294
294
|
}
|