@zag-js/dialog
Advanced tools
Comparing version
@@ -5,2 +5,3 @@ import { MachineContext as Ctx } from "./dialog.types"; | ||
getWin: (ctx: Ctx) => Window & typeof globalThis; | ||
getRootNode: (ctx: Ctx) => Document | ShadowRoot; | ||
getUnderlayId: (ctx: Ctx) => string; | ||
@@ -7,0 +8,0 @@ getBackdropId: (ctx: Ctx) => string; |
@@ -47,3 +47,3 @@ var __create = Object.create; | ||
var ariaAttr = (guard) => { | ||
return guard ? true : void 0; | ||
return guard ? "true" : void 0; | ||
}; | ||
@@ -371,2 +371,6 @@ function getStyleCache() { | ||
}, | ||
getRootNode: (ctx) => { | ||
var _a; | ||
return (_a = ctx.rootNode) != null ? _a : dom.getDoc(ctx); | ||
}, | ||
getUnderlayId: (ctx) => { | ||
@@ -400,6 +404,6 @@ var _a, _b; | ||
}, | ||
getContentEl: (ctx) => dom.getDoc(ctx).getElementById(dom.getContentId(ctx)), | ||
getUnderlayEl: (ctx) => dom.getDoc(ctx).getElementById(dom.getUnderlayId(ctx)), | ||
getTitleEl: (ctx) => dom.getDoc(ctx).getElementById(dom.getTitleId(ctx)), | ||
getDescriptionEl: (ctx) => dom.getDoc(ctx).getElementById(dom.getDescriptionId(ctx)) | ||
getContentEl: (ctx) => dom.getRootNode(ctx).getElementById(dom.getContentId(ctx)), | ||
getUnderlayEl: (ctx) => dom.getRootNode(ctx).getElementById(dom.getUnderlayId(ctx)), | ||
getTitleEl: (ctx) => dom.getRootNode(ctx).getElementById(dom.getTitleId(ctx)), | ||
getDescriptionEl: (ctx) => dom.getRootNode(ctx).getElementById(dom.getDescriptionId(ctx)) | ||
}; | ||
@@ -650,2 +654,4 @@ | ||
ctx2.doc = (0, import_core2.ref)(evt.doc); | ||
if (evt.root) | ||
ctx2.rootNode = (0, import_core2.ref)(evt.root); | ||
ctx2.uid = evt.id; | ||
@@ -652,0 +658,0 @@ }, |
{ | ||
"name": "@zag-js/dialog", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Core logic for the dialog widget implemented as a state machine", | ||
@@ -32,5 +32,5 @@ "keywords": [ | ||
"dependencies": { | ||
"@zag-js/core": "0.1.3", | ||
"@zag-js/core": "0.1.4", | ||
"@zag-js/dom-utils": "0.1.1", | ||
"@zag-js/types": "0.1.0", | ||
"@zag-js/types": "0.1.1", | ||
"@zag-js/aria-hidden": "0.1.0", | ||
@@ -37,0 +37,0 @@ "focus-trap": "^6.7.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
225653
0.44%1452
0.9%+ Added
+ Added
- Removed
- Removed
Updated
Updated