@yahoo/uds 3.175.1 → 3.175.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.
- package/dist/components/client/BottomSheet/BottomSheet.cjs +2 -1
- package/dist/components/client/BottomSheet/BottomSheet.js +2 -1
- package/dist/components/client/Menu/Menu.Content.cjs +6 -0
- package/dist/components/client/Menu/Menu.Content.js +6 -0
- package/dist/components/client/Modal/Modal.cjs +6 -0
- package/dist/components/client/Modal/Modal.js +6 -0
- package/dist/components/client/Popover/PopoverContent.cjs +2 -0
- package/dist/components/client/Popover/PopoverContent.js +2 -0
- package/dist/components/client/Toast/UDSToastConfigProvider.d.cts +5 -5
- package/dist/components/client/Toast/UDSToastConfigProvider.d.ts +5 -5
- package/dist/tailwind-internal/dist/utils/getShadowStyles.d.cts +2 -2
- package/dist/tailwind-internal/dist/utils/getShadowStyles.d.ts +2 -2
- package/dist/uds/generated/componentData.cjs +2636 -2636
- package/dist/uds/generated/componentData.js +2636 -2636
- package/dist/uds/package.cjs +3 -3
- package/dist/uds/package.js +3 -3
- package/dist/utils/isFocusEnteringOwnFrame.cjs +52 -0
- package/dist/utils/isFocusEnteringOwnFrame.d.cts +33 -0
- package/dist/utils/isFocusEnteringOwnFrame.d.ts +33 -0
- package/dist/utils/isFocusEnteringOwnFrame.js +50 -0
- package/generated/componentData.json +3388 -3388
- package/package.json +4 -4
package/dist/uds/package.cjs
CHANGED
|
@@ -254,7 +254,7 @@ var package_default = {
|
|
|
254
254
|
"typecheck:uds": "tsc -p . --noEmit"
|
|
255
255
|
},
|
|
256
256
|
dependencies: {
|
|
257
|
-
"@ariakit/react": "^0.4.
|
|
257
|
+
"@ariakit/react": "^0.4.36",
|
|
258
258
|
"autoprefixer": "^10.5.0",
|
|
259
259
|
"clsx": "^2.1.1",
|
|
260
260
|
"culori": "^4.0.2",
|
|
@@ -262,7 +262,7 @@ var package_default = {
|
|
|
262
262
|
"lodash": "^4.18.1",
|
|
263
263
|
"lodash-es": "^4.17.23",
|
|
264
264
|
"motion": "^12.38.0",
|
|
265
|
-
"oxc-parser": "^0.
|
|
265
|
+
"oxc-parser": "^0.146.0",
|
|
266
266
|
"oxc-resolver": "^11.24.2",
|
|
267
267
|
"postcss": "^8.5.18",
|
|
268
268
|
"postcss-prune-var": "^1.1.2",
|
|
@@ -277,7 +277,7 @@ var package_default = {
|
|
|
277
277
|
"type-fest": "^5.5.0"
|
|
278
278
|
},
|
|
279
279
|
devDependencies: {
|
|
280
|
-
"@next/env": "^16.
|
|
280
|
+
"@next/env": "^16.3.0",
|
|
281
281
|
"@optimize-lodash/transform": "^3.0.6",
|
|
282
282
|
"@types/bun": "1.3.14",
|
|
283
283
|
"@types/lodash": "^4.17.24",
|
package/dist/uds/package.js
CHANGED
|
@@ -254,7 +254,7 @@ var package_default = {
|
|
|
254
254
|
"typecheck:uds": "tsc -p . --noEmit"
|
|
255
255
|
},
|
|
256
256
|
dependencies: {
|
|
257
|
-
"@ariakit/react": "^0.4.
|
|
257
|
+
"@ariakit/react": "^0.4.36",
|
|
258
258
|
"autoprefixer": "^10.5.0",
|
|
259
259
|
"clsx": "^2.1.1",
|
|
260
260
|
"culori": "^4.0.2",
|
|
@@ -262,7 +262,7 @@ var package_default = {
|
|
|
262
262
|
"lodash": "^4.18.1",
|
|
263
263
|
"lodash-es": "^4.17.23",
|
|
264
264
|
"motion": "^12.38.0",
|
|
265
|
-
"oxc-parser": "^0.
|
|
265
|
+
"oxc-parser": "^0.146.0",
|
|
266
266
|
"oxc-resolver": "^11.24.2",
|
|
267
267
|
"postcss": "^8.5.18",
|
|
268
268
|
"postcss-prune-var": "^1.1.2",
|
|
@@ -277,7 +277,7 @@ var package_default = {
|
|
|
277
277
|
"type-fest": "^5.5.0"
|
|
278
278
|
},
|
|
279
279
|
devDependencies: {
|
|
280
|
-
"@next/env": "^16.
|
|
280
|
+
"@next/env": "^16.3.0",
|
|
281
281
|
"@optimize-lodash/transform": "^3.0.6",
|
|
282
282
|
"@types/bun": "1.3.14",
|
|
283
283
|
"@types/lodash": "^4.17.24",
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
//#region src/utils/isFocusEnteringOwnFrame.ts
|
|
4
|
+
/**
|
|
5
|
+
* Ariakit >= 0.4.36 attaches its interact-outside listeners to the topmost
|
|
6
|
+
* same-origin window and treats any event target from another document as an
|
|
7
|
+
* outside interaction. When a dialog-based component (Modal, BottomSheet,
|
|
8
|
+
* Menu, Popover, Tooltip) is rendered inside a same-origin iframe, moving
|
|
9
|
+
* focus into the component fires a `focusin` on the host `<iframe>` element in
|
|
10
|
+
* the parent document. Ariakit misclassifies that as outside and hides the
|
|
11
|
+
* dialog — and for a controlled always-open dialog this becomes an infinite
|
|
12
|
+
* hide → reopen → refocus loop (React error #185).
|
|
13
|
+
*
|
|
14
|
+
* Focus entering the component's own host frame is never a genuine outside
|
|
15
|
+
* interaction, so `hideOnInteractOutside` callbacks should ignore it. Only
|
|
16
|
+
* `focusin` is exempted — pointer interactions in parent or sibling frames
|
|
17
|
+
* keep Ariakit's intended cross-iframe dismissal behavior.
|
|
18
|
+
*/
|
|
19
|
+
const isElementNode = (target) => typeof target === "object" && target !== null && "nodeType" in target && target.nodeType === 1;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the event originated in the same document as the given element.
|
|
22
|
+
* Before 0.4.36 Ariakit only listened for outside interactions on the
|
|
23
|
+
* dialog's own window, so restricting to own-document events reproduces that
|
|
24
|
+
* scoping. Non-element targets and a missing element return true so callers
|
|
25
|
+
* fall back to Ariakit's default behavior.
|
|
26
|
+
*/
|
|
27
|
+
function isEventFromOwnDocument(event, element) {
|
|
28
|
+
const target = event.target;
|
|
29
|
+
if (!element || !isElementNode(target)) return true;
|
|
30
|
+
return target.ownerDocument === element.ownerDocument;
|
|
31
|
+
}
|
|
32
|
+
function isFocusEnteringOwnFrame(event, element) {
|
|
33
|
+
if (event.type !== "focusin") return false;
|
|
34
|
+
const target = event.target;
|
|
35
|
+
if (!element || !isElementNode(target)) return false;
|
|
36
|
+
let win = element.ownerDocument.defaultView;
|
|
37
|
+
while (win && win !== win.parent) {
|
|
38
|
+
let frame;
|
|
39
|
+
try {
|
|
40
|
+
frame = win.frameElement;
|
|
41
|
+
} catch {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
if (!frame) return false;
|
|
45
|
+
if (frame === target) return true;
|
|
46
|
+
win = frame.ownerDocument.defaultView;
|
|
47
|
+
}
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
//#endregion
|
|
51
|
+
exports.isEventFromOwnDocument = isEventFromOwnDocument;
|
|
52
|
+
exports.isFocusEnteringOwnFrame = isFocusEnteringOwnFrame;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/utils/isFocusEnteringOwnFrame.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Ariakit >= 0.4.36 attaches its interact-outside listeners to the topmost
|
|
5
|
+
* same-origin window and treats any event target from another document as an
|
|
6
|
+
* outside interaction. When a dialog-based component (Modal, BottomSheet,
|
|
7
|
+
* Menu, Popover, Tooltip) is rendered inside a same-origin iframe, moving
|
|
8
|
+
* focus into the component fires a `focusin` on the host `<iframe>` element in
|
|
9
|
+
* the parent document. Ariakit misclassifies that as outside and hides the
|
|
10
|
+
* dialog — and for a controlled always-open dialog this becomes an infinite
|
|
11
|
+
* hide → reopen → refocus loop (React error #185).
|
|
12
|
+
*
|
|
13
|
+
* Focus entering the component's own host frame is never a genuine outside
|
|
14
|
+
* interaction, so `hideOnInteractOutside` callbacks should ignore it. Only
|
|
15
|
+
* `focusin` is exempted — pointer interactions in parent or sibling frames
|
|
16
|
+
* keep Ariakit's intended cross-iframe dismissal behavior.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Whether the event originated in the same document as the given element.
|
|
20
|
+
* Before 0.4.36 Ariakit only listened for outside interactions on the
|
|
21
|
+
* dialog's own window, so restricting to own-document events reproduces that
|
|
22
|
+
* scoping. Non-element targets and a missing element return true so callers
|
|
23
|
+
* fall back to Ariakit's default behavior.
|
|
24
|
+
*/
|
|
25
|
+
declare function isEventFromOwnDocument(event: {
|
|
26
|
+
target: unknown;
|
|
27
|
+
}, element: Element | null | undefined): boolean;
|
|
28
|
+
declare function isFocusEnteringOwnFrame(event: {
|
|
29
|
+
type: string;
|
|
30
|
+
target: unknown;
|
|
31
|
+
}, element: Element | null | undefined): boolean;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { isEventFromOwnDocument, isFocusEnteringOwnFrame };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/utils/isFocusEnteringOwnFrame.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Ariakit >= 0.4.36 attaches its interact-outside listeners to the topmost
|
|
5
|
+
* same-origin window and treats any event target from another document as an
|
|
6
|
+
* outside interaction. When a dialog-based component (Modal, BottomSheet,
|
|
7
|
+
* Menu, Popover, Tooltip) is rendered inside a same-origin iframe, moving
|
|
8
|
+
* focus into the component fires a `focusin` on the host `<iframe>` element in
|
|
9
|
+
* the parent document. Ariakit misclassifies that as outside and hides the
|
|
10
|
+
* dialog — and for a controlled always-open dialog this becomes an infinite
|
|
11
|
+
* hide → reopen → refocus loop (React error #185).
|
|
12
|
+
*
|
|
13
|
+
* Focus entering the component's own host frame is never a genuine outside
|
|
14
|
+
* interaction, so `hideOnInteractOutside` callbacks should ignore it. Only
|
|
15
|
+
* `focusin` is exempted — pointer interactions in parent or sibling frames
|
|
16
|
+
* keep Ariakit's intended cross-iframe dismissal behavior.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Whether the event originated in the same document as the given element.
|
|
20
|
+
* Before 0.4.36 Ariakit only listened for outside interactions on the
|
|
21
|
+
* dialog's own window, so restricting to own-document events reproduces that
|
|
22
|
+
* scoping. Non-element targets and a missing element return true so callers
|
|
23
|
+
* fall back to Ariakit's default behavior.
|
|
24
|
+
*/
|
|
25
|
+
declare function isEventFromOwnDocument(event: {
|
|
26
|
+
target: unknown;
|
|
27
|
+
}, element: Element | null | undefined): boolean;
|
|
28
|
+
declare function isFocusEnteringOwnFrame(event: {
|
|
29
|
+
type: string;
|
|
30
|
+
target: unknown;
|
|
31
|
+
}, element: Element | null | undefined): boolean;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { isEventFromOwnDocument, isFocusEnteringOwnFrame };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
//#region src/utils/isFocusEnteringOwnFrame.ts
|
|
3
|
+
/**
|
|
4
|
+
* Ariakit >= 0.4.36 attaches its interact-outside listeners to the topmost
|
|
5
|
+
* same-origin window and treats any event target from another document as an
|
|
6
|
+
* outside interaction. When a dialog-based component (Modal, BottomSheet,
|
|
7
|
+
* Menu, Popover, Tooltip) is rendered inside a same-origin iframe, moving
|
|
8
|
+
* focus into the component fires a `focusin` on the host `<iframe>` element in
|
|
9
|
+
* the parent document. Ariakit misclassifies that as outside and hides the
|
|
10
|
+
* dialog — and for a controlled always-open dialog this becomes an infinite
|
|
11
|
+
* hide → reopen → refocus loop (React error #185).
|
|
12
|
+
*
|
|
13
|
+
* Focus entering the component's own host frame is never a genuine outside
|
|
14
|
+
* interaction, so `hideOnInteractOutside` callbacks should ignore it. Only
|
|
15
|
+
* `focusin` is exempted — pointer interactions in parent or sibling frames
|
|
16
|
+
* keep Ariakit's intended cross-iframe dismissal behavior.
|
|
17
|
+
*/
|
|
18
|
+
const isElementNode = (target) => typeof target === "object" && target !== null && "nodeType" in target && target.nodeType === 1;
|
|
19
|
+
/**
|
|
20
|
+
* Whether the event originated in the same document as the given element.
|
|
21
|
+
* Before 0.4.36 Ariakit only listened for outside interactions on the
|
|
22
|
+
* dialog's own window, so restricting to own-document events reproduces that
|
|
23
|
+
* scoping. Non-element targets and a missing element return true so callers
|
|
24
|
+
* fall back to Ariakit's default behavior.
|
|
25
|
+
*/
|
|
26
|
+
function isEventFromOwnDocument(event, element) {
|
|
27
|
+
const target = event.target;
|
|
28
|
+
if (!element || !isElementNode(target)) return true;
|
|
29
|
+
return target.ownerDocument === element.ownerDocument;
|
|
30
|
+
}
|
|
31
|
+
function isFocusEnteringOwnFrame(event, element) {
|
|
32
|
+
if (event.type !== "focusin") return false;
|
|
33
|
+
const target = event.target;
|
|
34
|
+
if (!element || !isElementNode(target)) return false;
|
|
35
|
+
let win = element.ownerDocument.defaultView;
|
|
36
|
+
while (win && win !== win.parent) {
|
|
37
|
+
let frame;
|
|
38
|
+
try {
|
|
39
|
+
frame = win.frameElement;
|
|
40
|
+
} catch {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
if (!frame) return false;
|
|
44
|
+
if (frame === target) return true;
|
|
45
|
+
win = frame.ownerDocument.defaultView;
|
|
46
|
+
}
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { isEventFromOwnDocument, isFocusEnteringOwnFrame };
|