@aria-ui/popover
Advanced tools
Comparing version 0.0.15 to 0.0.16
@@ -65,3 +65,3 @@ // src/popover-content.element.gen.ts | ||
const triggerElement = triggerElementContext.consume(element); | ||
useAriaAttribute(element, "aria-hidden", () => `${!open.value}`); | ||
useAriaAttribute(element, "aria-hidden", () => `${!open.get()}`); | ||
usePresence(element, open); | ||
@@ -72,3 +72,3 @@ useAttribute( | ||
() => { | ||
return open.value ? "open" : "closed"; | ||
return open.get() ? "open" : "closed"; | ||
} | ||
@@ -80,26 +80,26 @@ ); | ||
var _a2; | ||
(_a2 = onOpenChange.value) == null ? void 0 : _a2.call(onOpenChange, false); | ||
(_a2 = onOpenChange.get()) == null ? void 0 : _a2(false); | ||
}, | ||
onEscapeKeyDown: (event) => { | ||
var _a2; | ||
(_a2 = onEscapeKeyDown.value) == null ? void 0 : _a2.call(onEscapeKeyDown, event); | ||
(_a2 = onEscapeKeyDown.get()) == null ? void 0 : _a2(event); | ||
}, | ||
onPointerDownOutside: (event) => { | ||
var _a2; | ||
(_a2 = onPointerDownOutside.value) == null ? void 0 : _a2.call(onPointerDownOutside, event); | ||
(_a2 = onPointerDownOutside.get()) == null ? void 0 : _a2(event); | ||
}, | ||
onFocusOutside: (event) => { | ||
var _a2; | ||
(_a2 = onFocusOutside.value) == null ? void 0 : _a2.call(onFocusOutside, event); | ||
(_a2 = onFocusOutside.get()) == null ? void 0 : _a2(event); | ||
}, | ||
onInteractOutside: (event) => { | ||
var _a2; | ||
(_a2 = onInteractOutside.value) == null ? void 0 : _a2.call(onInteractOutside, event); | ||
(_a2 = onInteractOutside.get()) == null ? void 0 : _a2(event); | ||
}, | ||
exclude: () => { | ||
return triggerElement.value; | ||
return triggerElement.get(); | ||
} | ||
}; | ||
useEffect(element, () => { | ||
if (!open.value) { | ||
if (!open.get()) { | ||
return; | ||
@@ -120,3 +120,3 @@ } | ||
useAnimationFrame(element, () => { | ||
const openValue = open.value; | ||
const openValue = open.get(); | ||
const shouldFocus = openValue && !previousOpenValue; | ||
@@ -163,3 +163,3 @@ previousOpenValue = openValue; | ||
if (typeof (props == null ? void 0 : props.defaultOpen) === "boolean") { | ||
state.open.value = props.defaultOpen; | ||
state.open.set(props.defaultOpen); | ||
} | ||
@@ -169,3 +169,3 @@ const triggerElement = createSignal2(null); | ||
element, | ||
createComputed(() => state.open.value) | ||
createComputed(() => state.open.get()) | ||
); | ||
@@ -176,3 +176,3 @@ onOpenChangeContext.provide( | ||
var _a; | ||
state.open.value = value; | ||
state.open.set(value); | ||
(_a = state.onOpenChange.peek()) == null ? void 0 : _a(value); | ||
@@ -214,3 +214,3 @@ }) | ||
useEffect2(element, () => { | ||
triggerElement.value = element; | ||
triggerElement.set(element); | ||
}); | ||
@@ -217,0 +217,0 @@ useEventListener(element, "click", () => { |
{ | ||
"name": "@aria-ui/popover", | ||
"type": "module", | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"private": false, | ||
@@ -12,5 +12,5 @@ "sideEffects": false, | ||
"dependencies": { | ||
"@aria-ui/core": "^0.0.14", | ||
"@aria-ui/overlay": "^0.0.15", | ||
"@aria-ui/presence": "^0.0.9", | ||
"@aria-ui/core": "^0.0.15", | ||
"@aria-ui/overlay": "^0.0.16", | ||
"@aria-ui/presence": "^0.0.10", | ||
"@zag-js/dismissable": "^0.57.0", | ||
@@ -17,0 +17,0 @@ "@zag-js/tabbable": "^0.49.0" |
@@ -88,3 +88,3 @@ # @aria-ui/popover | ||
| `defaultOpen` | `boolean` | <p>Whether the popover is open by default.</p><p>**Default**</p><code>false</code> | | ||
| `onOpenChange` | `null` \| (`open`: `boolean`) => `void` | <p>Event handler called when the popover's open state changes.</p><p>**Default**</p><code>null</code> | | ||
| `onOpenChange` | `null` \| (`open`: `boolean`) => `void` | <p>Event handler called when the user opens or closes the popover.</p><p>**Default**</p><code>null</code> | | ||
| `open` | `boolean` | <p>Whether the popover is open.</p><p>**Default**</p><code>false</code> | | ||
@@ -91,0 +91,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23954
+ Added@aria-ui/core@0.0.15(transitive)
+ Added@aria-ui/overlay@0.0.16(transitive)
+ Added@aria-ui/presence@0.0.10(transitive)
- Removed@aria-ui/core@0.0.14(transitive)
- Removed@aria-ui/overlay@0.0.15(transitive)
- Removed@aria-ui/presence@0.0.9(transitive)
- Removed@zag-js/dom-query@0.50.0(transitive)
Updated@aria-ui/core@^0.0.15
Updated@aria-ui/overlay@^0.0.16
Updated@aria-ui/presence@^0.0.10