@paciu/ui 0.0.55 → 0.0.57
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.
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as M, jsx as L } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as A, useState as y, useRef as $, useCallback as w, useMemo as k, useEffect as _, useContext as z } from "react";
|
|
4
|
+
import { createPortal as H } from "react-dom";
|
|
5
|
+
import '../provider.css';function O(t) {
|
|
5
6
|
var r, a, s = "";
|
|
6
7
|
if (typeof t == "string" || typeof t == "number") s += t;
|
|
7
8
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
8
|
-
var
|
|
9
|
-
for (r = 0; r <
|
|
9
|
+
var p = t.length;
|
|
10
|
+
for (r = 0; r < p; r++) t[r] && (a = O(t[r])) && (s && (s += " "), s += a);
|
|
10
11
|
} else for (a in t) t[a] && (s && (s += " "), s += a);
|
|
11
12
|
return s;
|
|
12
13
|
}
|
|
13
|
-
function
|
|
14
|
-
for (var t, r, a = 0, s = "",
|
|
14
|
+
function I() {
|
|
15
|
+
for (var t, r, a = 0, s = "", p = arguments.length; a < p; a++) (t = arguments[a]) && (r = O(t)) && (s && (s += " "), s += r);
|
|
15
16
|
return s;
|
|
16
17
|
}
|
|
17
|
-
const
|
|
18
|
+
const K = "_active_1rsd6_164", c = {
|
|
18
19
|
"dialog-overlay": "_dialog-overlay_1rsd6_45",
|
|
19
20
|
"dialog-compose": "_dialog-compose_1rsd6_62",
|
|
20
21
|
"dialog-close": "_dialog-close_1rsd6_68",
|
|
@@ -26,7 +27,7 @@ const N = "_active_1rsd6_164", c = {
|
|
|
26
27
|
"full-height": "_full-height_1rsd6_155",
|
|
27
28
|
"full-width": "_full-width_1rsd6_158",
|
|
28
29
|
"un-closable": "_un-closable_1rsd6_161",
|
|
29
|
-
active:
|
|
30
|
+
active: K,
|
|
30
31
|
"position-top-center": "_position-top-center_1rsd6_170",
|
|
31
32
|
"position-center": "_position-center_1rsd6_176",
|
|
32
33
|
"position-bottom-center": "_position-bottom-center_1rsd6_180",
|
|
@@ -44,18 +45,18 @@ const N = "_active_1rsd6_164", c = {
|
|
|
44
45
|
"animated-closing-translate": "_animated-closing-translate_1rsd6_1",
|
|
45
46
|
"paciu-ui-blink-animation": "_paciu-ui-blink-animation_1rsd6_1"
|
|
46
47
|
};
|
|
47
|
-
var
|
|
48
|
-
const T =
|
|
49
|
-
const [s,
|
|
48
|
+
var u = /* @__PURE__ */ ((t) => (t.Light = "light", t.Dark = "dark", t.System = "system", t))(u || {}), i = /* @__PURE__ */ ((t) => (t.Opening = "opening", t.Opened = "opened", t.Closing = "closing", t.Closed = "closed", t))(i || {}), x = /* @__PURE__ */ ((t) => (t.TopCenter = "top-center", t.Center = "center", t.BottomCenter = "bottom-center", t.LeftTop = "left-top", t.LeftCenter = "left-center", t.LeftBottom = "left-bottom", t.RightTop = "right-top", t.RightCenter = "right-center", t.RightBottom = "right-bottom", t))(x || {});
|
|
49
|
+
const T = A(void 0), N = () => z(T), q = ({ children: t, initialTheme: r, defaultDialogPosition: a }) => {
|
|
50
|
+
const [s, p] = y(!1), [g, E] = y(r || null), [m, B] = y(r || null), [d, h] = y([]), P = $(0), C = w((e) => {
|
|
50
51
|
document.documentElement.dataset.theme = e || void 0, E(e);
|
|
51
52
|
}, []), b = w((e, n) => {
|
|
52
53
|
h((o) => {
|
|
53
54
|
if (o.length > 0) {
|
|
54
|
-
const l = [...o],
|
|
55
|
-
if (l[
|
|
55
|
+
const l = [...o], j = l.length - 1;
|
|
56
|
+
if (l[j].status === i.Opening)
|
|
56
57
|
return o;
|
|
57
58
|
}
|
|
58
|
-
return [...o, { id: ++
|
|
59
|
+
return [...o, { id: ++P.current, status: i.Opening, node: e, options: n }];
|
|
59
60
|
});
|
|
60
61
|
}, []), f = w((e) => {
|
|
61
62
|
h((n) => {
|
|
@@ -66,12 +67,12 @@ const T = $(void 0), q = () => H(T), F = ({ children: t, initialTheme: r, defaul
|
|
|
66
67
|
});
|
|
67
68
|
}, []), v = k(() => {
|
|
68
69
|
const e = g || m;
|
|
69
|
-
return e ? e ===
|
|
70
|
-
}, [g, m]),
|
|
70
|
+
return e ? e === u.Light ? u.Dark : u.Light : null;
|
|
71
|
+
}, [g, m]), R = k(
|
|
71
72
|
() => ({ theme: g, nextTheme: v, systemTheme: m, toggleTheme: C, openDialog: b, closeDialog: f, dialogsQueue: d }),
|
|
72
73
|
[g, v, m, C, b, f, d]
|
|
73
74
|
);
|
|
74
|
-
return
|
|
75
|
+
return _(() => {
|
|
75
76
|
if (d.length) {
|
|
76
77
|
const e = d[d.length - 1];
|
|
77
78
|
e.status === i.Opening && (e?.options?.onOpen && e.options.onOpen(), setTimeout(() => {
|
|
@@ -83,14 +84,14 @@ const T = $(void 0), q = () => H(T), F = ({ children: t, initialTheme: r, defaul
|
|
|
83
84
|
h((n) => n.slice(0, -1)), e?.options?.onClosed && e.options.onClosed();
|
|
84
85
|
}, 240));
|
|
85
86
|
}
|
|
86
|
-
}, [d]),
|
|
87
|
+
}, [d]), _(() => {
|
|
87
88
|
const e = window.matchMedia("(prefers-color-scheme: dark)"), n = (o) => {
|
|
88
|
-
B(o.matches ?
|
|
89
|
+
B(o.matches ? u.Dark : u.Light);
|
|
89
90
|
};
|
|
90
91
|
return n(e), e.addEventListener("change", n), () => e.removeEventListener("change", n);
|
|
91
|
-
}, []),
|
|
92
|
+
}, []), _(() => {
|
|
92
93
|
document.body.style.overflowY = d.length ? "hidden" : "";
|
|
93
|
-
}, [d]),
|
|
94
|
+
}, [d]), _(() => {
|
|
94
95
|
const e = (l) => {
|
|
95
96
|
l.key === "Escape" && (l.stopPropagation(), f({ esc: !0 }));
|
|
96
97
|
}, n = () => {
|
|
@@ -101,17 +102,17 @@ const T = $(void 0), q = () => H(T), F = ({ children: t, initialTheme: r, defaul
|
|
|
101
102
|
return n(), () => {
|
|
102
103
|
o();
|
|
103
104
|
};
|
|
104
|
-
}, []),
|
|
105
|
-
|
|
106
|
-
}), /* @__PURE__ */
|
|
105
|
+
}, []), _(() => {
|
|
106
|
+
p(!0);
|
|
107
|
+
}), /* @__PURE__ */ M(T.Provider, { value: R, children: [
|
|
107
108
|
t,
|
|
108
|
-
s &&
|
|
109
|
+
s && H(
|
|
109
110
|
/* @__PURE__ */ L("div", { id: "paciu-ui-dialogs", children: d.map((e, n) => {
|
|
110
111
|
const o = e?.options?.position || a || x.Center;
|
|
111
112
|
return /* @__PURE__ */ L(
|
|
112
113
|
"div",
|
|
113
114
|
{
|
|
114
|
-
className:
|
|
115
|
+
className: I(c["dialog-overlay"], {
|
|
115
116
|
[c["animated-opening"]]: [
|
|
116
117
|
i.Opening,
|
|
117
118
|
i.Opened
|
|
@@ -139,14 +140,17 @@ const T = $(void 0), q = () => H(T), F = ({ children: t, initialTheme: r, defaul
|
|
|
139
140
|
document.body
|
|
140
141
|
)
|
|
141
142
|
] });
|
|
143
|
+
}, F = () => {
|
|
144
|
+
const t = N();
|
|
145
|
+
if (!t) throw new Error("usePaciu must be used within PaciuProvider");
|
|
146
|
+
return t;
|
|
142
147
|
};
|
|
143
148
|
export {
|
|
144
149
|
x as D,
|
|
145
|
-
|
|
146
|
-
|
|
150
|
+
q as P,
|
|
151
|
+
u as T,
|
|
147
152
|
i as a,
|
|
148
|
-
|
|
149
|
-
K as c,
|
|
153
|
+
I as c,
|
|
150
154
|
c as s,
|
|
151
|
-
|
|
155
|
+
F as u
|
|
152
156
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -13,11 +13,6 @@ export declare const Card: default_2.ForwardRefExoticComponent<CardProps & defau
|
|
|
13
13
|
declare interface CardProps extends default_2.HTMLAttributes<HTMLDivElement>, Pick<Modifiers, 'size'> {
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
declare interface CloseDialogOptions {
|
|
17
|
-
esc?: boolean;
|
|
18
|
-
outside?: boolean;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
16
|
export declare type ColorType = 'opposite' | 'accent' | 'error';
|
|
22
17
|
|
|
23
18
|
export declare const Dialog: React.FC<DialogProps>;
|
|
@@ -39,13 +34,6 @@ declare interface DialogProps extends React.PropsWithChildren {
|
|
|
39
34
|
footer?: React.ReactNode;
|
|
40
35
|
}
|
|
41
36
|
|
|
42
|
-
declare interface DialogQueueItem {
|
|
43
|
-
id: number;
|
|
44
|
-
status: DialogQueueItemStatus;
|
|
45
|
-
node: () => React.ReactNode;
|
|
46
|
-
options?: OpenDialogOptions;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
37
|
export declare enum DialogQueueItemStatus {
|
|
50
38
|
Opening = "opening",
|
|
51
39
|
Opened = "opened",
|
|
@@ -77,27 +65,6 @@ export declare interface Modifiers {
|
|
|
77
65
|
color?: ColorType;
|
|
78
66
|
}
|
|
79
67
|
|
|
80
|
-
declare interface OpenDialogOptions {
|
|
81
|
-
position?: DialogPosition;
|
|
82
|
-
unClosable?: boolean;
|
|
83
|
-
fullHeight?: boolean;
|
|
84
|
-
fullWidth?: boolean;
|
|
85
|
-
onClose?: () => boolean | void;
|
|
86
|
-
onClosed?: () => boolean | void;
|
|
87
|
-
onOpen?: () => boolean | void;
|
|
88
|
-
onOpened?: () => boolean | void;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
declare interface PaciuContextType {
|
|
92
|
-
theme: Theme | null;
|
|
93
|
-
nextTheme: Theme | null;
|
|
94
|
-
systemTheme: Theme | null;
|
|
95
|
-
toggleTheme: (theme: Theme) => void;
|
|
96
|
-
dialogsQueue: DialogQueueItem[];
|
|
97
|
-
openDialog: (node: () => React.ReactNode, options?: OpenDialogOptions) => void;
|
|
98
|
-
closeDialog: (options?: CloseDialogOptions) => void;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
68
|
/** row */
|
|
102
69
|
export declare const Row: default_2.ForwardRefExoticComponent<RowProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
103
70
|
|
|
@@ -116,15 +83,13 @@ export declare type ThemeType = 'light' | 'dark' | 'system';
|
|
|
116
83
|
|
|
117
84
|
export declare const useEscape: (callback: () => void) => void;
|
|
118
85
|
|
|
119
|
-
export declare const usePaciu: () => PaciuContextType;
|
|
120
|
-
|
|
121
86
|
export declare const useScroll: () => {
|
|
122
87
|
isScrolled: boolean;
|
|
123
88
|
};
|
|
124
89
|
|
|
125
|
-
export declare const useSkipEffect: (cb:
|
|
90
|
+
export declare const useSkipEffect: (cb: React.EffectCallback, deps?: React.DependencyList, options?: UseSkipEffectOptions) => void;
|
|
126
91
|
|
|
127
|
-
declare interface UseSkipEffectOptions {
|
|
92
|
+
export declare interface UseSkipEffectOptions {
|
|
128
93
|
count?: number;
|
|
129
94
|
}
|
|
130
95
|
|
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import m, { useState as
|
|
3
|
-
import { c as f, s as d
|
|
4
|
-
import { D as
|
|
1
|
+
import { jsx as a, jsxs as b } from "react/jsx-runtime";
|
|
2
|
+
import m, { useState as $, useEffect as w, useRef as L } from "react";
|
|
3
|
+
import { c as f, s as d } from "./chunks/provider.es.js";
|
|
4
|
+
import { D as V, a as W, T as X } from "./chunks/provider.es.js";
|
|
5
5
|
import './index.css';const n = {
|
|
6
6
|
"paciu-ui-button": "_paciu-ui-button_y249s_14",
|
|
7
7
|
"size-micro": "_size-micro_y249s_23",
|
|
@@ -21,7 +21,7 @@ import './index.css';const n = {
|
|
|
21
21
|
"color-opposite": "_color-opposite_y249s_139",
|
|
22
22
|
"color-accent": "_color-accent_y249s_207",
|
|
23
23
|
"color-error": "_color-error_y249s_275"
|
|
24
|
-
},
|
|
24
|
+
}, S = m.forwardRef((i, e) => {
|
|
25
25
|
const {
|
|
26
26
|
children: s,
|
|
27
27
|
className: o,
|
|
@@ -34,14 +34,14 @@ import './index.css';const n = {
|
|
|
34
34
|
outline: z,
|
|
35
35
|
// opaque,
|
|
36
36
|
rounded: g,
|
|
37
|
-
size:
|
|
38
|
-
onClick:
|
|
39
|
-
stopPropagation:
|
|
37
|
+
size: k,
|
|
38
|
+
onClick: h,
|
|
39
|
+
stopPropagation: x,
|
|
40
40
|
stopImmediatePropagation: E,
|
|
41
41
|
...R
|
|
42
|
-
} = i, [C, v] =
|
|
43
|
-
if (
|
|
44
|
-
const N =
|
|
42
|
+
} = i, [C, v] = $(!1), I = async (y) => {
|
|
43
|
+
if (x && y?.stopPropagation(), E && y?.nativeEvent?.stopImmediatePropagation(), h) {
|
|
44
|
+
const N = h(y);
|
|
45
45
|
if (N instanceof Promise) {
|
|
46
46
|
v(!0);
|
|
47
47
|
try {
|
|
@@ -69,7 +69,7 @@ import './index.css';const n = {
|
|
|
69
69
|
[n["modifier-solid"]]: p,
|
|
70
70
|
...r && { [n[`color-${r}`]]: r }
|
|
71
71
|
},
|
|
72
|
-
|
|
72
|
+
k && n[`size-${k}`],
|
|
73
73
|
o
|
|
74
74
|
),
|
|
75
75
|
onClick: I,
|
|
@@ -78,8 +78,8 @@ import './index.css';const n = {
|
|
|
78
78
|
}
|
|
79
79
|
);
|
|
80
80
|
});
|
|
81
|
-
|
|
82
|
-
const
|
|
81
|
+
S.displayName = "Button";
|
|
82
|
+
const j = {
|
|
83
83
|
"paciu-ui-row": "_paciu-ui-row_kd3dr_14",
|
|
84
84
|
"size-micro": "_size-micro_kd3dr_23",
|
|
85
85
|
"size-mini": "_size-mini_kd3dr_27",
|
|
@@ -88,15 +88,15 @@ const b = {
|
|
|
88
88
|
"size-huge": "_size-huge_kd3dr_39",
|
|
89
89
|
"size-enormous": "_size-enormous_kd3dr_43",
|
|
90
90
|
"paciu-ui-blink-animation": "_paciu-ui-blink-animation_kd3dr_1"
|
|
91
|
-
},
|
|
91
|
+
}, D = m.forwardRef((i, e) => {
|
|
92
92
|
const { className: s, size: o, children: r, ..._ } = i;
|
|
93
|
-
return /* @__PURE__ */ a("div", { ref: e, className: f(
|
|
93
|
+
return /* @__PURE__ */ a("div", { ref: e, className: f(j["paciu-ui-row"], o && j[`size-${o}`], s), ..._, children: r });
|
|
94
94
|
});
|
|
95
|
-
|
|
96
|
-
const
|
|
97
|
-
flex:
|
|
98
|
-
inline:
|
|
99
|
-
grow:
|
|
95
|
+
D.displayName = "Row";
|
|
96
|
+
const q = "_flex_ssd0s_14", B = "_inline_ssd0s_22", F = "_grow_ssd0s_25", t = {
|
|
97
|
+
flex: q,
|
|
98
|
+
inline: B,
|
|
99
|
+
grow: F,
|
|
100
100
|
"direction-column": "_direction-column_ssd0s_28",
|
|
101
101
|
"direction-row-reverse": "_direction-row-reverse_ssd0s_31",
|
|
102
102
|
"direction-column-reverse": "_direction-column-reverse_ssd0s_34",
|
|
@@ -119,7 +119,7 @@ const B = "_flex_ssd0s_14", F = "_inline_ssd0s_22", T = "_grow_ssd0s_25", t = {
|
|
|
119
119
|
"size-huge": "_size-huge_ssd0s_95",
|
|
120
120
|
"size-enormous": "_size-enormous_ssd0s_99",
|
|
121
121
|
"paciu-ui-blink-animation": "_paciu-ui-blink-animation_ssd0s_1"
|
|
122
|
-
},
|
|
122
|
+
}, T = m.forwardRef((i, e) => {
|
|
123
123
|
const { children: s, className: o, direction: r, align: _, justify: l, wrap: c, size: u, inline: p, grow: z, ...g } = i;
|
|
124
124
|
return /* @__PURE__ */ a(
|
|
125
125
|
"div",
|
|
@@ -143,8 +143,8 @@ const B = "_flex_ssd0s_14", F = "_inline_ssd0s_22", T = "_grow_ssd0s_25", t = {
|
|
|
143
143
|
}
|
|
144
144
|
);
|
|
145
145
|
});
|
|
146
|
-
|
|
147
|
-
const
|
|
146
|
+
T.displayName = "Flex";
|
|
147
|
+
const P = {
|
|
148
148
|
"paciu-ui-card": "_paciu-ui-card_a6huo_14",
|
|
149
149
|
"size-micro": "_size-micro_a6huo_28",
|
|
150
150
|
"size-mini": "_size-mini_a6huo_33",
|
|
@@ -153,26 +153,26 @@ const j = {
|
|
|
153
153
|
"size-huge": "_size-huge_a6huo_48",
|
|
154
154
|
"size-enormous": "_size-enormous_a6huo_53",
|
|
155
155
|
"paciu-ui-blink-animation": "_paciu-ui-blink-animation_a6huo_1"
|
|
156
|
-
},
|
|
156
|
+
}, O = m.forwardRef((i, e) => {
|
|
157
157
|
const { children: s, className: o, size: r, ..._ } = i;
|
|
158
|
-
return /* @__PURE__ */ a("div", { ref: e, className: f(
|
|
158
|
+
return /* @__PURE__ */ a("div", { ref: e, className: f(P["paciu-ui-card"], r && P[`size-${r}`], o), ..._, children: s });
|
|
159
159
|
});
|
|
160
|
-
|
|
161
|
-
const
|
|
160
|
+
O.displayName = "Card";
|
|
161
|
+
const G = ({ header: i, children: e, footer: s }) => /* @__PURE__ */ b("div", { className: d["dialog-compose"], children: [
|
|
162
162
|
/* @__PURE__ */ a("div", { className: d["dialog-close"], children: /* @__PURE__ */ a("div", { className: d["dialog-close-cross"] }) }),
|
|
163
|
-
/* @__PURE__ */
|
|
163
|
+
/* @__PURE__ */ b("div", { className: d["dialog-window"], onClick: (o) => o.stopPropagation(), children: [
|
|
164
164
|
i && /* @__PURE__ */ a("div", { className: d["dialog-window-header"], children: i }),
|
|
165
165
|
e && /* @__PURE__ */ a("div", { className: d["dialog-window-body"], children: e }),
|
|
166
166
|
s && /* @__PURE__ */ a("div", { className: d["dialog-window-footer"], children: s })
|
|
167
167
|
] })
|
|
168
|
-
] }),
|
|
168
|
+
] }), H = (i) => {
|
|
169
169
|
w(() => {
|
|
170
170
|
const e = (s) => {
|
|
171
171
|
s.key === "Escape" && (s.preventDefault(), s.stopPropagation(), s.stopImmediatePropagation(), i());
|
|
172
172
|
};
|
|
173
173
|
return document.addEventListener("keydown", e, !0), () => document.removeEventListener("keydown", e, !0);
|
|
174
174
|
}, [i]);
|
|
175
|
-
},
|
|
175
|
+
}, J = (i, e = [], s) => {
|
|
176
176
|
const o = L(s?.count || 1);
|
|
177
177
|
w(() => {
|
|
178
178
|
if (o.current > 0) {
|
|
@@ -181,30 +181,25 @@ const H = ({ header: i, children: e, footer: s }) => /* @__PURE__ */ P("div", {
|
|
|
181
181
|
}
|
|
182
182
|
return i();
|
|
183
183
|
}, e);
|
|
184
|
-
},
|
|
185
|
-
const [i, e] =
|
|
184
|
+
}, K = () => {
|
|
185
|
+
const [i, e] = $(!1);
|
|
186
186
|
return w(() => {
|
|
187
187
|
const s = () => e(window.scrollY > 0);
|
|
188
188
|
return s(), document.addEventListener("scroll", s), () => {
|
|
189
189
|
document.removeEventListener("scroll", s);
|
|
190
190
|
};
|
|
191
191
|
}, []), { isScrolled: i };
|
|
192
|
-
}, U = () => {
|
|
193
|
-
const i = S();
|
|
194
|
-
if (!i) throw new Error("usePaciu must be used within PaciuProvider");
|
|
195
|
-
return i;
|
|
196
192
|
};
|
|
197
193
|
export {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
K as useSkipEffect
|
|
194
|
+
S as Button,
|
|
195
|
+
O as Card,
|
|
196
|
+
G as Dialog,
|
|
197
|
+
V as DialogPosition,
|
|
198
|
+
W as DialogQueueItemStatus,
|
|
199
|
+
T as Flex,
|
|
200
|
+
D as Row,
|
|
201
|
+
X as Theme,
|
|
202
|
+
H as useEscape,
|
|
203
|
+
K as useScroll,
|
|
204
|
+
J as useSkipEffect
|
|
210
205
|
};
|
package/dist/provider.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Context } from 'react';
|
|
2
1
|
import { JSX } from 'react/jsx-runtime';
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
declare interface CloseDialogOptions {
|
|
5
4
|
esc?: boolean;
|
|
6
5
|
outside?: boolean;
|
|
7
6
|
}
|
|
@@ -18,7 +17,7 @@ declare enum DialogPosition {
|
|
|
18
17
|
RightBottom = "right-bottom"
|
|
19
18
|
}
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
declare interface DialogQueueItem {
|
|
22
21
|
id: number;
|
|
23
22
|
status: DialogQueueItemStatus;
|
|
24
23
|
node: () => React.ReactNode;
|
|
@@ -32,7 +31,7 @@ declare enum DialogQueueItemStatus {
|
|
|
32
31
|
Closed = "closed"
|
|
33
32
|
}
|
|
34
33
|
|
|
35
|
-
|
|
34
|
+
declare interface OpenDialogOptions {
|
|
36
35
|
position?: DialogPosition;
|
|
37
36
|
unClosable?: boolean;
|
|
38
37
|
fullHeight?: boolean;
|
|
@@ -43,9 +42,7 @@ export declare interface OpenDialogOptions {
|
|
|
43
42
|
onOpened?: () => boolean | void;
|
|
44
43
|
}
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
export declare interface PaciuContextType {
|
|
45
|
+
declare interface PaciuContextType {
|
|
49
46
|
theme: Theme | null;
|
|
50
47
|
nextTheme: Theme | null;
|
|
51
48
|
systemTheme: Theme | null;
|
|
@@ -57,7 +54,7 @@ export declare interface PaciuContextType {
|
|
|
57
54
|
|
|
58
55
|
export declare const PaciuProvider: ({ children, initialTheme, defaultDialogPosition }: PaciuProviderProps) => JSX.Element;
|
|
59
56
|
|
|
60
|
-
|
|
57
|
+
declare interface PaciuProviderProps extends React.PropsWithChildren {
|
|
61
58
|
initialTheme?: Theme;
|
|
62
59
|
defaultDialogPosition?: DialogPosition;
|
|
63
60
|
}
|
|
@@ -68,6 +65,6 @@ declare enum Theme {
|
|
|
68
65
|
System = "system"
|
|
69
66
|
}
|
|
70
67
|
|
|
71
|
-
export declare const
|
|
68
|
+
export declare const usePaciu: () => PaciuContextType;
|
|
72
69
|
|
|
73
70
|
export { }
|
package/dist/provider.es.js
CHANGED
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
import "react-dom";
|
|
5
|
-
import { P as
|
|
5
|
+
import { P as u, u as a } from "./chunks/provider.es.js";
|
|
6
6
|
export {
|
|
7
|
-
a as PaciuContext,
|
|
8
7
|
u as PaciuProvider,
|
|
9
|
-
|
|
8
|
+
a as usePaciu
|
|
10
9
|
};
|
package/package.json
CHANGED
|
File without changes
|