boottent-design 0.1.78 → 0.1.80
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/boottent-design.hooks.cjs.js +1 -1
- package/dist/boottent-design.hooks.es.js +31 -2
- package/dist/boottent-design.layout.cjs.js +1 -1
- package/dist/boottent-design.layout.es.js +56 -6
- package/dist/boottent-design.provider.cjs.js +1 -1
- package/dist/boottent-design.provider.es.js +108 -2
- package/dist/boottent-design.ui.cjs.js +1 -1
- package/dist/boottent-design.ui.es.js +996 -27
- package/dist/boottent-design.utils.cjs.js +1 -1
- package/dist/boottent-design.utils.es.js +8 -2378
- package/dist/{index-BshWFt1Y.js → index-7TdmKUbH.js} +1 -1
- package/dist/index-BIxKM0nQ.cjs +1 -0
- package/dist/index-Bf4XH3AK.cjs +1 -0
- package/dist/index-WGpe0bEl.js +2380 -0
- package/dist/toggleButtonGroup-primitive-CibJg54C.cjs +52 -0
- package/dist/{toggleButtonGroup-primitive-DPb6avPH.js → toggleButtonGroup-primitive-ZAStZ2ee.js} +4010 -3271
- package/dist/types/feature.d.ts +220 -161
- package/dist/types/hooks.d.ts +222 -163
- package/dist/types/layout.d.ts +223 -163
- package/dist/types/provider.d.ts +220 -161
- package/dist/types/styles.d.ts +220 -161
- package/dist/types/types.d.ts +222 -163
- package/dist/types/ui.d.ts +378 -166
- package/dist/types/utils.d.ts +222 -163
- package/package.json +9 -4
- package/dist/boottent-design.main.cjs.js +0 -1
- package/dist/boottent-design.main.es.js +0 -48
- package/dist/index-BfapRZRW.js +0 -55
- package/dist/index-CMZc7WAs.js +0 -599
- package/dist/index-D286MlPY.cjs +0 -1
- package/dist/index-DDNLKhqC.cjs +0 -1
- package/dist/index-Ly7gJulk.cjs +0 -1
- package/dist/portal-provider-BB1ZUJea.cjs +0 -1
- package/dist/portal-provider-Z7EnJtHu.js +0 -110
- package/dist/toggleButtonGroup-primitive-CC3iAt_X.cjs +0 -52
- package/dist/types/main.d.ts +0 -1129
- package/dist/use-portal-BhH8jBDX.cjs +0 -1
- package/dist/use-portal-HyR5LGEj.js +0 -33
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";require("react/jsx-runtime");const r=require("./portal-manager-9WO01tNb.cjs"),s=require("react"),u=()=>{const[l,a]=s.useState([]);return s.useEffect(()=>{const t=(n,i)=>{a(i?o=>o.includes(n.id)?o:[...o,n.id]:o=>o.filter(c=>c!==n.id))},e=r.portalManager.subscribe(t);return a(r.portalManager.getOpenPortals()),()=>{e()}},[]),{modal:t=>{const{onClose:e=()=>{}}=t;return r.portalManager.showPortal("modal",{...t,onClose:e})},toast:t=>{let e;return typeof t=="string"?e={description:t}:e=t,r.portalManager.showPortal("toast",e)},alert:t=>{let e;return typeof t=="string"?e={description:t,onClose:()=>{}}:e={...t,onClose:t.onClose||(()=>{})},r.portalManager.showPortal("alert",e)},dialog:t=>{const{onClose:e=()=>{}}=t;return r.portalManager.showPortal("dialog",{...t,onClose:e})},getIsOpen:t=>r.portalManager.getIsPortalOpen(t),openPortals:l}};exports.usePortal=u;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import { p as o } from "./portal-manager-nNJ4SIa2.js";
|
|
3
|
-
import { useState as c, useEffect as u } from "react";
|
|
4
|
-
const h = () => {
|
|
5
|
-
const [l, r] = c([]);
|
|
6
|
-
return u(() => {
|
|
7
|
-
const t = (n, a) => {
|
|
8
|
-
r(a ? (s) => s.includes(n.id) ? s : [...s, n.id] : (s) => s.filter((i) => i !== n.id));
|
|
9
|
-
}, e = o.subscribe(t);
|
|
10
|
-
return r(o.getOpenPortals()), () => {
|
|
11
|
-
e();
|
|
12
|
-
};
|
|
13
|
-
}, []), { modal: (t) => {
|
|
14
|
-
const { onClose: e = () => {
|
|
15
|
-
} } = t;
|
|
16
|
-
return o.showPortal("modal", { ...t, onClose: e });
|
|
17
|
-
}, toast: (t) => {
|
|
18
|
-
let e;
|
|
19
|
-
return typeof t == "string" ? e = { description: t } : e = t, o.showPortal("toast", e);
|
|
20
|
-
}, alert: (t) => {
|
|
21
|
-
let e;
|
|
22
|
-
return typeof t == "string" ? e = { description: t, onClose: () => {
|
|
23
|
-
} } : e = { ...t, onClose: t.onClose || (() => {
|
|
24
|
-
}) }, o.showPortal("alert", e);
|
|
25
|
-
}, dialog: (t) => {
|
|
26
|
-
const { onClose: e = () => {
|
|
27
|
-
} } = t;
|
|
28
|
-
return o.showPortal("dialog", { ...t, onClose: e });
|
|
29
|
-
}, getIsOpen: (t) => o.getIsPortalOpen(t), openPortals: l };
|
|
30
|
-
};
|
|
31
|
-
export {
|
|
32
|
-
h as u
|
|
33
|
-
};
|