@alea-design/ui 0.8.2 → 0.9.0

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.
@@ -0,0 +1,5 @@
1
+ import { type ForwardedRef } from 'react';
2
+ export declare const ModalLayer: import("react").Provider<boolean>;
3
+ export declare const useInModalLayer: () => boolean;
4
+ /** A ref for the dialog element that also marks it aria-modal. The engine's Dialog drops aria-modal from its props (it hides the rest of the page itself, which some screen readers do not honor), so it is set on the element. Passes the element on to the ref the caller gave. */
5
+ export declare function useModalRef<T extends HTMLElement>(ref: ForwardedRef<T>, modal: boolean): (el: T | null) => void;
@@ -0,0 +1,13 @@
1
+ "use client";
2
+ import { useCallback as a, useContext as r, createContext as s } from "react";
3
+ const n = s(!1), i = n.Provider, c = () => r(n);
4
+ function l(t, o) {
5
+ return a((e) => {
6
+ e && o && e.setAttribute("aria-modal", "true"), typeof t == "function" ? t(e) : t && (t.current = e);
7
+ }, [t, o]);
8
+ }
9
+ export {
10
+ i as ModalLayer,
11
+ c as useInModalLayer,
12
+ l as useModalRef
13
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alea-design/ui",
3
- "version": "0.8.2",
3
+ "version": "0.9.0",
4
4
  "description": "Alea: the complete React design system. Accessible components from forms to AI, charts and editors, Alea Motion, and W3C design tokens for dark, light and high contrast.",
5
5
  "keywords": [
6
6
  "react",
@@ -61,8 +61,8 @@
61
61
  "react-dom": ">=18.3"
62
62
  },
63
63
  "dependencies": {
64
- "@alea-design/motion": "0.8.2",
65
- "@alea-design/tokens": "0.8.2",
64
+ "@alea-design/motion": "0.9.0",
65
+ "@alea-design/tokens": "0.9.0",
66
66
  "@internationalized/date": "^3.8.0",
67
67
  "lucide-react": "^0.525.0",
68
68
  "qrcode-generator": "^1.5.2",