@kapiuara/ui 0.15.0 → 0.15.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.
@@ -7,6 +7,11 @@ export declare const getPortalRoot: () => HTMLElement | null;
7
7
  * sin provider, `getPortalRoot()`.
8
8
  */
9
9
  export declare const usePortalRoot: () => HTMLElement | null;
10
+ /**
11
+ * Abre el diálogo como modal. Exportada para testearla sola: el camino que importa no se puede
12
+ * reproducir montando componentes (ver el comentario de abajo).
13
+ */
14
+ export declare const openModal: (el: HTMLDialogElement) => void;
10
15
  export type UseNativeDialogOptions = {
11
16
  /**
12
17
  * Se llama cuando el usuario pide cerrar (Escape o cierre nativo). Si es
@@ -17,7 +17,7 @@ var f = () => n(), p = () => t() ?? f(), m = /* @__PURE__ */ new WeakMap(), h =
17
17
  })
18
18
  }), m.set(t, n)), n;
19
19
  }, g = (e) => {
20
- e.open || (typeof e.showModal == "function" ? e.showModal() : e.setAttribute("open", ""));
20
+ e.open || e.isConnected && (typeof e.showModal == "function" ? e.showModal() : e.setAttribute("open", ""));
21
21
  }, _ = (e) => {
22
22
  typeof e.close == "function" ? e.open && e.close() : e.removeAttribute("open");
23
23
  }, v = ({ onRequestClose: e, lockScroll: t = !0 } = {}) => {
@@ -72,4 +72,4 @@ var f = () => n(), p = () => t() ?? f(), m = /* @__PURE__ */ new WeakMap(), h =
72
72
  }, [r]);
73
73
  };
74
74
  //#endregion
75
- export { f as getPortalRoot, y as useBackdropClose, v as useNativeDialog, p as usePortalRoot, b as useTrappedDialogWarning };
75
+ export { f as getPortalRoot, g as openModal, y as useBackdropClose, v as useNativeDialog, p as usePortalRoot, b as useTrappedDialogWarning };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kapiuara/ui",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
4
4
  "license": "UNLICENSED",
5
5
  "author": "Nicolás Arquiel",
6
6
  "publishConfig": {