react-luminus-components 1.1.0 → 1.1.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.
- package/dist/.vite/manifest.json +43 -43
- package/dist/Collapse.module-DvvJlfPd.js +212 -0
- package/dist/Collapse.module-cs5hXOag.mjs +2896 -0
- package/dist/Modal-B2qKFgqh.js +1 -0
- package/dist/{Modal-DrtyXbaq.mjs → Modal-Dx5XXGby.mjs} +160 -156
- package/dist/SimpleTooltip-C9ijHgfs.js +1 -0
- package/dist/SimpleTooltip-CmA9EcfY.mjs +1622 -0
- package/dist/components/Tabs/Tabs.d.ts +7 -0
- package/dist/components/Tabs/comps/Tab/Tab.d.ts +7 -0
- package/dist/components/Tabs/comps/index.d.ts +1 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Toaster/Toaster.d.ts +3 -0
- package/dist/components/common/Badge/Badge.d.ts +9 -0
- package/dist/components/common/Collapse/Collapse.d.ts +8 -0
- package/dist/components/common/index.d.ts +2 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +64 -53
- package/dist/{hasClass-BPLafgqP.js → hasClass-CIO7dHdo.js} +5 -5
- package/dist/{hasClass-Cywenry0.mjs → hasClass-CjtZdrqe.mjs} +11 -3
- package/dist/hooks/useNotifications/useNotifications.d.ts +1 -1
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +3 -3
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +5 -5
- package/dist/main.cjs.js +1 -1
- package/dist/main.d.ts +3 -0
- package/dist/main.es.js +1600 -936
- package/dist/style.css +1 -1
- package/dist/{useConfirm-1NsG8u3o.mjs → useConfirm-BiBuEjQ7.mjs} +1 -1
- package/dist/useConfirm-DSLva5Mk.js +1 -0
- package/package.json +4 -2
- package/dist/HomeDashboard.module-GdCYxlBo.js +0 -212
- package/dist/HomeDashboard.module-PqWrW_dw.mjs +0 -2678
- package/dist/Modal-oJGeA42s.js +0 -1
- package/dist/SimpleTooltip-CGAr8ryR.js +0 -1
- package/dist/SimpleTooltip-DzBpmL4l.mjs +0 -1775
- package/dist/useConfirm-BnuvVu7T.js +0 -1
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { j as a,
|
|
2
|
-
import { P as
|
|
1
|
+
import { j as a, d, k as S, l as x } from "./Collapse.module-cs5hXOag.mjs";
|
|
2
|
+
import { P as he, c as Me, o as Se, s as G, u as Fe, a as Ze, b as et, d as y, l as Ne, e as Ce, f as Le, i as tt, r as je, h as nt, g as $, j as ot, k as st, m as at, n as ke, F as $e, p as rt, t as it } from "./hasClass-CjtZdrqe.mjs";
|
|
3
3
|
import * as u from "react";
|
|
4
|
-
import { useRef as v, useEffect as ve, forwardRef as lt, useState as Ee, useImperativeHandle as dt, useCallback as
|
|
4
|
+
import { useRef as v, useEffect as ve, forwardRef as lt, useState as Ee, useImperativeHandle as dt, useCallback as Te, useContext as ct, useMemo as ut } from "react";
|
|
5
5
|
import ft from "react-dom";
|
|
6
|
-
const
|
|
6
|
+
const Xt = () => /* @__PURE__ */ a.jsxs("div", { className: d("luminus-loading", S.loading), children: [
|
|
7
7
|
/* @__PURE__ */ a.jsx("div", { className: d("spinner-grow", S.spinnerGrow, "text-primary"), role: "status" }),
|
|
8
8
|
/* @__PURE__ */ a.jsx("div", { className: d("spinner-grow", S.spinnerGrow, "text-primary", S.second), role: "status" }),
|
|
9
9
|
/* @__PURE__ */ a.jsx("div", { className: d("spinner-grow", S.spinnerGrow, "text-primary", S.third), role: "status" })
|
|
10
|
-
] }),
|
|
10
|
+
] }), mt = ({ variant: t, className: e, children: n }) => {
|
|
11
11
|
switch (t) {
|
|
12
12
|
case "h1":
|
|
13
|
-
return /* @__PURE__ */ a.jsx("h1", { className: d("luminus-text-primary", x.h1, e), children: n });
|
|
13
|
+
return /* @__PURE__ */ a.jsx("h1", { className: d("luminus-text-primary luminus-h1", x.h1, e), children: n });
|
|
14
14
|
case "h3":
|
|
15
|
-
return /* @__PURE__ */ a.jsx("h3", { className: d("luminus-text", x.h3, e), children: n });
|
|
15
|
+
return /* @__PURE__ */ a.jsx("h3", { className: d("luminus-text luminus-h3", x.h3, e), children: n });
|
|
16
16
|
case "h6":
|
|
17
|
-
return /* @__PURE__ */ a.jsx("h6", { className: d("luminus-text", x.h6, e), children: n });
|
|
17
|
+
return /* @__PURE__ */ a.jsx("h6", { className: d("luminus-text luminus-h6", x.h6, e), children: n });
|
|
18
18
|
case "subtitle":
|
|
19
|
-
return /* @__PURE__ */ a.jsx("div", { className: d("luminus-text", x.subtitle, e), children: n });
|
|
19
|
+
return /* @__PURE__ */ a.jsx("div", { className: d("luminus-text luminus-subtitle", x.subtitle, e), children: n });
|
|
20
20
|
case "body":
|
|
21
|
-
return /* @__PURE__ */ a.jsx("div", { className: d("luminus-text", x.body, e), children: n });
|
|
21
|
+
return /* @__PURE__ */ a.jsx("div", { className: d("luminus-text luminus-body", x.body, e), children: n });
|
|
22
22
|
case "body2":
|
|
23
|
-
return /* @__PURE__ */ a.jsx("div", { className: d("luminus-text", x.body2, e), children: n });
|
|
23
|
+
return /* @__PURE__ */ a.jsx("div", { className: d("luminus-text luminus-body2", x.body2, e), children: n });
|
|
24
24
|
case "caption":
|
|
25
|
-
return /* @__PURE__ */ a.jsx("div", { className: d("luminus-text-muted", x.caption, e), children: n });
|
|
25
|
+
return /* @__PURE__ */ a.jsx("div", { className: d("luminus-text-muted luminus-caption", x.caption, e), children: n });
|
|
26
26
|
default:
|
|
27
27
|
return /* @__PURE__ */ a.jsx(a.Fragment, { children: n });
|
|
28
28
|
}
|
|
29
|
-
},
|
|
29
|
+
}, Yt = ({ variant: t, className: e, children: n }) => /* @__PURE__ */ a.jsx(mt, { variant: t, className: e, children: n }), ht = (t) => /* @__PURE__ */ u.forwardRef((e, n) => /* @__PURE__ */ a.jsx("div", {
|
|
30
30
|
...e,
|
|
31
31
|
ref: n,
|
|
32
32
|
className: d(e.className, t)
|
|
@@ -39,15 +39,15 @@ function gt(t) {
|
|
|
39
39
|
}
|
|
40
40
|
const pt = {
|
|
41
41
|
/** An accessible label indicating the relevant information about the Close Button. */
|
|
42
|
-
"aria-label":
|
|
42
|
+
"aria-label": he.string,
|
|
43
43
|
/** A callback fired after the Close Button is clicked. */
|
|
44
|
-
onClick:
|
|
44
|
+
onClick: he.func,
|
|
45
45
|
/**
|
|
46
46
|
* Render different color variant for the button.
|
|
47
47
|
*
|
|
48
48
|
* Omitting this will render the default dark color.
|
|
49
49
|
*/
|
|
50
|
-
variant:
|
|
50
|
+
variant: he.oneOf(["white"])
|
|
51
51
|
}, we = /* @__PURE__ */ u.forwardRef(({
|
|
52
52
|
className: t,
|
|
53
53
|
variant: e,
|
|
@@ -67,13 +67,16 @@ var vt = Function.prototype.bind.call(Function.prototype.call, [].slice);
|
|
|
67
67
|
function F(t, e) {
|
|
68
68
|
return vt(t.querySelectorAll(e));
|
|
69
69
|
}
|
|
70
|
-
const Et = "data-rr-ui-";
|
|
70
|
+
const Et = "data-rr-ui-", Tt = "rrUi";
|
|
71
71
|
function Mt(t) {
|
|
72
72
|
return `${Et}${t}`;
|
|
73
73
|
}
|
|
74
|
+
function qt(t) {
|
|
75
|
+
return `${Tt}${t}`;
|
|
76
|
+
}
|
|
74
77
|
var ne;
|
|
75
78
|
function Oe(t) {
|
|
76
|
-
if ((!ne && ne !== 0 || t) &&
|
|
79
|
+
if ((!ne && ne !== 0 || t) && Me) {
|
|
77
80
|
var e = document.createElement("div");
|
|
78
81
|
e.style.position = "absolute", e.style.top = "-9999px", e.style.width = "50px", e.style.height = "50px", e.style.overflow = "scroll", document.body.appendChild(e), ne = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
|
|
79
82
|
}
|
|
@@ -88,12 +91,12 @@ function ge(t) {
|
|
|
88
91
|
return t.body;
|
|
89
92
|
}
|
|
90
93
|
}
|
|
91
|
-
function
|
|
94
|
+
function wt(t = document) {
|
|
92
95
|
const e = t.defaultView;
|
|
93
96
|
return Math.abs(e.innerWidth - t.documentElement.clientWidth);
|
|
94
97
|
}
|
|
95
98
|
const Ae = Mt("modal-open");
|
|
96
|
-
class
|
|
99
|
+
class xt {
|
|
97
100
|
constructor({
|
|
98
101
|
ownerDocument: e,
|
|
99
102
|
handleContainerOverflow: n = !0,
|
|
@@ -102,7 +105,7 @@ class wt {
|
|
|
102
105
|
this.handleContainerOverflow = n, this.isRTL = o, this.modals = [], this.ownerDocument = e;
|
|
103
106
|
}
|
|
104
107
|
getScrollbarWidth() {
|
|
105
|
-
return
|
|
108
|
+
return wt(this.ownerDocument);
|
|
106
109
|
}
|
|
107
110
|
getElement() {
|
|
108
111
|
return (this.ownerDocument || document).body;
|
|
@@ -118,7 +121,7 @@ class wt {
|
|
|
118
121
|
e.style = {
|
|
119
122
|
overflow: s.style.overflow,
|
|
120
123
|
[o]: s.style[o]
|
|
121
|
-
}, e.scrollBarWidth && (n[o] = `${parseInt(
|
|
124
|
+
}, e.scrollBarWidth && (n[o] = `${parseInt(G(s, o) || "0", 10) + e.scrollBarWidth}px`), s.setAttribute(Ae, ""), G(s, n);
|
|
122
125
|
}
|
|
123
126
|
reset() {
|
|
124
127
|
[...this.modals].forEach((e) => this.remove(e));
|
|
@@ -142,8 +145,8 @@ class wt {
|
|
|
142
145
|
return !!this.modals.length && this.modals[this.modals.length - 1] === e;
|
|
143
146
|
}
|
|
144
147
|
}
|
|
145
|
-
const xe =
|
|
146
|
-
function
|
|
148
|
+
const xe = xt, bt = ["show", "role", "className", "style", "children", "backdrop", "keyboard", "onBackdropClick", "onEscapeKeyDown", "transition", "runTransition", "backdropTransition", "runBackdropTransition", "autoFocus", "enforceFocus", "restoreFocus", "restoreFocusOptions", "renderDialog", "renderBackdrop", "manager", "container", "onShow", "onHide", "onExit", "onExited", "onExiting", "onEnter", "onEntering", "onEntered"];
|
|
149
|
+
function Rt(t, e) {
|
|
147
150
|
if (t == null)
|
|
148
151
|
return {};
|
|
149
152
|
var n = {}, o = Object.keys(t), s, i;
|
|
@@ -157,7 +160,7 @@ function Nt(t) {
|
|
|
157
160
|
ownerDocument: t == null ? void 0 : t.document
|
|
158
161
|
})), pe;
|
|
159
162
|
}
|
|
160
|
-
function
|
|
163
|
+
function Ct(t) {
|
|
161
164
|
const e = Fe(), n = t || Nt(e), o = v({
|
|
162
165
|
dialog: null,
|
|
163
166
|
backdrop: null
|
|
@@ -166,32 +169,32 @@ function Rt(t) {
|
|
|
166
169
|
add: () => n.add(o.current),
|
|
167
170
|
remove: () => n.remove(o.current),
|
|
168
171
|
isTopModal: () => n.isTopModal(o.current),
|
|
169
|
-
setDialogRef:
|
|
172
|
+
setDialogRef: Te((s) => {
|
|
170
173
|
o.current.dialog = s;
|
|
171
174
|
}, []),
|
|
172
|
-
setBackdropRef:
|
|
175
|
+
setBackdropRef: Te((s) => {
|
|
173
176
|
o.current.backdrop = s;
|
|
174
177
|
}, [])
|
|
175
178
|
});
|
|
176
179
|
}
|
|
177
|
-
const
|
|
180
|
+
const De = /* @__PURE__ */ lt((t, e) => {
|
|
178
181
|
let {
|
|
179
182
|
show: n = !1,
|
|
180
183
|
role: o = "dialog",
|
|
181
184
|
className: s,
|
|
182
185
|
style: i,
|
|
183
186
|
children: E,
|
|
184
|
-
backdrop:
|
|
185
|
-
keyboard:
|
|
187
|
+
backdrop: m = !0,
|
|
188
|
+
keyboard: T = !0,
|
|
186
189
|
onBackdropClick: b,
|
|
187
|
-
onEscapeKeyDown:
|
|
188
|
-
transition:
|
|
189
|
-
runTransition:
|
|
190
|
-
backdropTransition:
|
|
190
|
+
onEscapeKeyDown: h,
|
|
191
|
+
transition: D,
|
|
192
|
+
runTransition: M,
|
|
193
|
+
backdropTransition: R,
|
|
191
194
|
runBackdropTransition: oe,
|
|
192
195
|
autoFocus: V = !0,
|
|
193
196
|
enforceFocus: se = !0,
|
|
194
|
-
restoreFocus:
|
|
197
|
+
restoreFocus: N = !0,
|
|
195
198
|
restoreFocusOptions: ae,
|
|
196
199
|
renderDialog: z,
|
|
197
200
|
renderBackdrop: re = (l) => /* @__PURE__ */ a.jsx("div", Object.assign({}, l)),
|
|
@@ -202,15 +205,15 @@ const $e = /* @__PURE__ */ lt((t, e) => {
|
|
|
202
205
|
},
|
|
203
206
|
onExit: de,
|
|
204
207
|
onExited: W,
|
|
205
|
-
onExiting:
|
|
206
|
-
onEnter:
|
|
207
|
-
onEntering:
|
|
208
|
-
onEntered:
|
|
209
|
-
} = t, ce =
|
|
210
|
-
const g = Fe(), C =
|
|
211
|
-
dt(e, () => c, [c]),
|
|
208
|
+
onExiting: Y,
|
|
209
|
+
onEnter: q,
|
|
210
|
+
onEntering: P,
|
|
211
|
+
onEntered: J
|
|
212
|
+
} = t, ce = Rt(t, bt);
|
|
213
|
+
const g = Fe(), C = Ze(le), c = Ct(ie), ue = et(), Q = gt(n), [w, j] = Ee(!n), f = v(null);
|
|
214
|
+
dt(e, () => c, [c]), Me && !Q && n && (f.current = ge(g == null ? void 0 : g.document)), n && w && j(!1);
|
|
212
215
|
const p = y(() => {
|
|
213
|
-
if (c.add(), k.current =
|
|
216
|
+
if (c.add(), k.current = Ne(document, "keydown", me), _.current = Ne(
|
|
214
217
|
document,
|
|
215
218
|
"focus",
|
|
216
219
|
// the timeout is necessary b/c this will run before the new modal is mounted
|
|
@@ -219,11 +222,11 @@ const $e = /* @__PURE__ */ lt((t, e) => {
|
|
|
219
222
|
!0
|
|
220
223
|
), X && X(), V) {
|
|
221
224
|
var l, te;
|
|
222
|
-
const
|
|
223
|
-
c.dialog &&
|
|
225
|
+
const U = ge((l = (te = c.dialog) == null ? void 0 : te.ownerDocument) != null ? l : g == null ? void 0 : g.document);
|
|
226
|
+
c.dialog && U && !Ce(c.dialog, U) && (f.current = U, c.dialog.focus());
|
|
224
227
|
}
|
|
225
228
|
}), H = y(() => {
|
|
226
|
-
if (c.remove(), k.current == null || k.current(), _.current == null || _.current(),
|
|
229
|
+
if (c.remove(), k.current == null || k.current(), _.current == null || _.current(), N) {
|
|
227
230
|
var l;
|
|
228
231
|
(l = f.current) == null || l.focus == null || l.focus(ae), f.current = null;
|
|
229
232
|
}
|
|
@@ -245,10 +248,10 @@ const $e = /* @__PURE__ */ lt((t, e) => {
|
|
|
245
248
|
return;
|
|
246
249
|
const l = ge(g == null ? void 0 : g.document);
|
|
247
250
|
c.dialog && l && !Ce(c.dialog, l) && c.dialog.focus();
|
|
248
|
-
}),
|
|
249
|
-
l.target === l.currentTarget && (b == null || b(l),
|
|
250
|
-
}),
|
|
251
|
-
|
|
251
|
+
}), Z = y((l) => {
|
|
252
|
+
l.target === l.currentTarget && (b == null || b(l), m === !0 && I());
|
|
253
|
+
}), me = y((l) => {
|
|
254
|
+
T && tt(l) && c.isTopModal() && (h == null || h(l), l.defaultPrevented || I());
|
|
252
255
|
}), _ = v(), k = v(), ee = (...l) => {
|
|
253
256
|
j(!0), W == null || W(...l);
|
|
254
257
|
};
|
|
@@ -269,24 +272,24 @@ const $e = /* @__PURE__ */ lt((t, e) => {
|
|
|
269
272
|
role: "document"
|
|
270
273
|
})
|
|
271
274
|
}));
|
|
272
|
-
K = je(
|
|
275
|
+
K = je(D, M, {
|
|
273
276
|
unmountOnExit: !0,
|
|
274
277
|
mountOnEnter: !0,
|
|
275
278
|
appear: !0,
|
|
276
279
|
in: !!n,
|
|
277
280
|
onExit: de,
|
|
278
|
-
onExiting:
|
|
281
|
+
onExiting: Y,
|
|
279
282
|
onExited: ee,
|
|
280
|
-
onEnter:
|
|
281
|
-
onEntering:
|
|
282
|
-
onEntered:
|
|
283
|
+
onEnter: q,
|
|
284
|
+
onEntering: P,
|
|
285
|
+
onEntered: J,
|
|
283
286
|
children: K
|
|
284
287
|
});
|
|
285
288
|
let A = null;
|
|
286
|
-
return
|
|
289
|
+
return m && (A = re({
|
|
287
290
|
ref: c.setBackdropRef,
|
|
288
|
-
onClick:
|
|
289
|
-
}), A = je(
|
|
291
|
+
onClick: Z
|
|
292
|
+
}), A = je(R, oe, {
|
|
290
293
|
in: !!n,
|
|
291
294
|
appear: !0,
|
|
292
295
|
mountOnEnter: !0,
|
|
@@ -298,17 +301,17 @@ const $e = /* @__PURE__ */ lt((t, e) => {
|
|
|
298
301
|
}), C)
|
|
299
302
|
});
|
|
300
303
|
});
|
|
301
|
-
|
|
302
|
-
const
|
|
304
|
+
De.displayName = "Modal";
|
|
305
|
+
const jt = Object.assign(De, {
|
|
303
306
|
Manager: xe
|
|
304
307
|
});
|
|
305
|
-
function
|
|
308
|
+
function kt(t, e) {
|
|
306
309
|
t.classList ? t.classList.add(e) : nt(t, e) || (typeof t.className == "string" ? t.className = t.className + " " + e : t.setAttribute("class", (t.className && t.className.baseVal || "") + " " + e));
|
|
307
310
|
}
|
|
308
311
|
function Be(t, e) {
|
|
309
312
|
return t.replace(new RegExp("(^|\\s)" + e + "(?:\\s|$)", "g"), "$1").replace(/\s+/g, " ").replace(/^\s*|\s*$/g, "");
|
|
310
313
|
}
|
|
311
|
-
function
|
|
314
|
+
function Ot(t, e) {
|
|
312
315
|
t.classList ? t.classList.remove(e) : typeof t.className == "string" ? t.className = Be(t.className, e) : t.setAttribute("class", Be(t.className && t.className.baseVal || "", e));
|
|
313
316
|
}
|
|
314
317
|
const L = {
|
|
@@ -316,23 +319,23 @@ const L = {
|
|
|
316
319
|
STICKY_CONTENT: ".sticky-top",
|
|
317
320
|
NAVBAR_TOGGLER: ".navbar-toggler"
|
|
318
321
|
};
|
|
319
|
-
class
|
|
322
|
+
class At extends xe {
|
|
320
323
|
adjustAndStore(e, n, o) {
|
|
321
324
|
const s = n.style[e];
|
|
322
|
-
n.dataset[e] = s,
|
|
323
|
-
[e]: `${parseFloat(
|
|
325
|
+
n.dataset[e] = s, G(n, {
|
|
326
|
+
[e]: `${parseFloat(G(n, e)) + o}px`
|
|
324
327
|
});
|
|
325
328
|
}
|
|
326
329
|
restore(e, n) {
|
|
327
330
|
const o = n.dataset[e];
|
|
328
|
-
o !== void 0 && (delete n.dataset[e],
|
|
331
|
+
o !== void 0 && (delete n.dataset[e], G(n, {
|
|
329
332
|
[e]: o
|
|
330
333
|
}));
|
|
331
334
|
}
|
|
332
335
|
setContainerStyle(e) {
|
|
333
336
|
super.setContainerStyle(e);
|
|
334
337
|
const n = this.getElement();
|
|
335
|
-
if (
|
|
338
|
+
if (kt(n, "modal-open"), !e.scrollBarWidth)
|
|
336
339
|
return;
|
|
337
340
|
const o = this.isRTL ? "paddingLeft" : "paddingRight", s = this.isRTL ? "marginLeft" : "marginRight";
|
|
338
341
|
F(n, L.FIXED_CONTENT).forEach((i) => this.adjustAndStore(o, i, e.scrollBarWidth)), F(n, L.STICKY_CONTENT).forEach((i) => this.adjustAndStore(s, i, -e.scrollBarWidth)), F(n, L.NAVBAR_TOGGLER).forEach((i) => this.adjustAndStore(s, i, e.scrollBarWidth));
|
|
@@ -340,31 +343,31 @@ class Ot extends xe {
|
|
|
340
343
|
removeContainerStyle(e) {
|
|
341
344
|
super.removeContainerStyle(e);
|
|
342
345
|
const n = this.getElement();
|
|
343
|
-
|
|
346
|
+
Ot(n, "modal-open");
|
|
344
347
|
const o = this.isRTL ? "paddingLeft" : "paddingRight", s = this.isRTL ? "marginLeft" : "marginRight";
|
|
345
348
|
F(n, L.FIXED_CONTENT).forEach((i) => this.restore(o, i)), F(n, L.STICKY_CONTENT).forEach((i) => this.restore(s, i)), F(n, L.NAVBAR_TOGGLER).forEach((i) => this.restore(s, i));
|
|
346
349
|
}
|
|
347
350
|
}
|
|
348
351
|
let ye;
|
|
349
|
-
function
|
|
350
|
-
return ye || (ye = new
|
|
352
|
+
function Bt(t) {
|
|
353
|
+
return ye || (ye = new At(t)), ye;
|
|
351
354
|
}
|
|
352
355
|
const Ie = /* @__PURE__ */ u.forwardRef(({
|
|
353
356
|
className: t,
|
|
354
357
|
bsPrefix: e,
|
|
355
358
|
as: n = "div",
|
|
356
359
|
...o
|
|
357
|
-
}, s) => (e =
|
|
360
|
+
}, s) => (e = $(e, "modal-body"), /* @__PURE__ */ a.jsx(n, {
|
|
358
361
|
ref: s,
|
|
359
362
|
className: d(t, e),
|
|
360
363
|
...o
|
|
361
364
|
})));
|
|
362
365
|
Ie.displayName = "ModalBody";
|
|
363
|
-
const
|
|
366
|
+
const St = Ie, Ft = /* @__PURE__ */ u.createContext({
|
|
364
367
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
365
368
|
onHide() {
|
|
366
369
|
}
|
|
367
|
-
}), We =
|
|
370
|
+
}), We = Ft, He = /* @__PURE__ */ u.forwardRef(({
|
|
368
371
|
bsPrefix: t,
|
|
369
372
|
className: e,
|
|
370
373
|
contentClassName: n,
|
|
@@ -372,15 +375,15 @@ const Bt = Ie, St = /* @__PURE__ */ u.createContext({
|
|
|
372
375
|
size: s,
|
|
373
376
|
fullscreen: i,
|
|
374
377
|
children: E,
|
|
375
|
-
scrollable:
|
|
376
|
-
...
|
|
378
|
+
scrollable: m,
|
|
379
|
+
...T
|
|
377
380
|
}, b) => {
|
|
378
|
-
t =
|
|
379
|
-
const
|
|
381
|
+
t = $(t, "modal");
|
|
382
|
+
const h = `${t}-dialog`, D = typeof i == "string" ? `${t}-fullscreen-${i}` : `${t}-fullscreen`;
|
|
380
383
|
return /* @__PURE__ */ a.jsx("div", {
|
|
381
|
-
...
|
|
384
|
+
...T,
|
|
382
385
|
ref: b,
|
|
383
|
-
className: d(
|
|
386
|
+
className: d(h, e, s && `${t}-${s}`, o && `${h}-centered`, m && `${h}-scrollable`, i && D),
|
|
384
387
|
children: /* @__PURE__ */ a.jsx("div", {
|
|
385
388
|
className: d(`${t}-content`, n),
|
|
386
389
|
children: E
|
|
@@ -393,13 +396,13 @@ const _e = He, Ke = /* @__PURE__ */ u.forwardRef(({
|
|
|
393
396
|
bsPrefix: e,
|
|
394
397
|
as: n = "div",
|
|
395
398
|
...o
|
|
396
|
-
}, s) => (e =
|
|
399
|
+
}, s) => (e = $(e, "modal-footer"), /* @__PURE__ */ a.jsx(n, {
|
|
397
400
|
ref: s,
|
|
398
401
|
className: d(t, e),
|
|
399
402
|
...o
|
|
400
403
|
})));
|
|
401
404
|
Ke.displayName = "ModalFooter";
|
|
402
|
-
const
|
|
405
|
+
const Lt = Ke, $t = /* @__PURE__ */ u.forwardRef(({
|
|
403
406
|
closeLabel: t = "Close",
|
|
404
407
|
closeVariant: e,
|
|
405
408
|
closeButton: n = !1,
|
|
@@ -407,8 +410,8 @@ const Ft = Ke, Lt = /* @__PURE__ */ u.forwardRef(({
|
|
|
407
410
|
children: s,
|
|
408
411
|
...i
|
|
409
412
|
}, E) => {
|
|
410
|
-
const
|
|
411
|
-
|
|
413
|
+
const m = ct(We), T = y(() => {
|
|
414
|
+
m == null || m.onHide(), o == null || o();
|
|
412
415
|
});
|
|
413
416
|
return /* @__PURE__ */ a.jsxs("div", {
|
|
414
417
|
ref: E,
|
|
@@ -416,43 +419,43 @@ const Ft = Ke, Lt = /* @__PURE__ */ u.forwardRef(({
|
|
|
416
419
|
children: [s, n && /* @__PURE__ */ a.jsx(yt, {
|
|
417
420
|
"aria-label": t,
|
|
418
421
|
variant: e,
|
|
419
|
-
onClick:
|
|
422
|
+
onClick: T
|
|
420
423
|
})]
|
|
421
424
|
});
|
|
422
|
-
}), Dt =
|
|
425
|
+
}), Dt = $t, Ue = /* @__PURE__ */ u.forwardRef(({
|
|
423
426
|
bsPrefix: t,
|
|
424
427
|
className: e,
|
|
425
428
|
closeLabel: n = "Close",
|
|
426
429
|
closeButton: o = !1,
|
|
427
430
|
...s
|
|
428
|
-
}, i) => (t =
|
|
431
|
+
}, i) => (t = $(t, "modal-header"), /* @__PURE__ */ a.jsx(Dt, {
|
|
429
432
|
ref: i,
|
|
430
433
|
...s,
|
|
431
434
|
className: d(e, t),
|
|
432
435
|
closeLabel: n,
|
|
433
436
|
closeButton: o
|
|
434
437
|
})));
|
|
435
|
-
|
|
436
|
-
const
|
|
438
|
+
Ue.displayName = "ModalHeader";
|
|
439
|
+
const It = Ue, Wt = ht("h4"), Ge = /* @__PURE__ */ u.forwardRef(({
|
|
437
440
|
className: t,
|
|
438
441
|
bsPrefix: e,
|
|
439
|
-
as: n =
|
|
442
|
+
as: n = Wt,
|
|
440
443
|
...o
|
|
441
|
-
}, s) => (e =
|
|
444
|
+
}, s) => (e = $(e, "modal-title"), /* @__PURE__ */ a.jsx(n, {
|
|
442
445
|
ref: s,
|
|
443
446
|
className: d(t, e),
|
|
444
447
|
...o
|
|
445
448
|
})));
|
|
446
|
-
|
|
447
|
-
const
|
|
448
|
-
function
|
|
449
|
-
return /* @__PURE__ */ a.jsx(
|
|
449
|
+
Ge.displayName = "ModalTitle";
|
|
450
|
+
const Ht = Ge;
|
|
451
|
+
function _t(t) {
|
|
452
|
+
return /* @__PURE__ */ a.jsx($e, {
|
|
450
453
|
...t,
|
|
451
454
|
timeout: null
|
|
452
455
|
});
|
|
453
456
|
}
|
|
454
|
-
function
|
|
455
|
-
return /* @__PURE__ */ a.jsx(
|
|
457
|
+
function Kt(t) {
|
|
458
|
+
return /* @__PURE__ */ a.jsx($e, {
|
|
456
459
|
...t,
|
|
457
460
|
timeout: null
|
|
458
461
|
});
|
|
@@ -465,18 +468,18 @@ const Ve = /* @__PURE__ */ u.forwardRef(({
|
|
|
465
468
|
contentClassName: s,
|
|
466
469
|
children: i,
|
|
467
470
|
dialogAs: E = _e,
|
|
468
|
-
"data-bs-theme":
|
|
469
|
-
"aria-labelledby":
|
|
471
|
+
"data-bs-theme": m,
|
|
472
|
+
"aria-labelledby": T,
|
|
470
473
|
"aria-describedby": b,
|
|
471
|
-
"aria-label":
|
|
474
|
+
"aria-label": h,
|
|
472
475
|
/* BaseModal props */
|
|
473
|
-
show:
|
|
474
|
-
animation:
|
|
475
|
-
backdrop:
|
|
476
|
+
show: D = !1,
|
|
477
|
+
animation: M = !0,
|
|
478
|
+
backdrop: R = !0,
|
|
476
479
|
keyboard: oe = !0,
|
|
477
480
|
onEscapeKeyDown: V,
|
|
478
481
|
onShow: se,
|
|
479
|
-
onHide:
|
|
482
|
+
onHide: N,
|
|
480
483
|
container: ae,
|
|
481
484
|
autoFocus: z = !0,
|
|
482
485
|
enforceFocus: re = !0,
|
|
@@ -486,29 +489,29 @@ const Ve = /* @__PURE__ */ u.forwardRef(({
|
|
|
486
489
|
onExit: I,
|
|
487
490
|
onExiting: de,
|
|
488
491
|
onEnter: W,
|
|
489
|
-
onEntering:
|
|
490
|
-
onExited:
|
|
491
|
-
backdropClassName:
|
|
492
|
-
manager:
|
|
492
|
+
onEntering: Y,
|
|
493
|
+
onExited: q,
|
|
494
|
+
backdropClassName: P,
|
|
495
|
+
manager: J,
|
|
493
496
|
...ce
|
|
494
497
|
}, g) => {
|
|
495
|
-
const [C, c] = Ee({}), [ue,
|
|
496
|
-
t =
|
|
498
|
+
const [C, c] = Ee({}), [ue, Q] = Ee(!1), w = v(!1), j = v(!1), f = v(null), [p, H] = ot(), fe = st(g, H), Z = y(N), me = at();
|
|
499
|
+
t = $(t, "modal");
|
|
497
500
|
const _ = ut(() => ({
|
|
498
|
-
onHide:
|
|
499
|
-
}), [
|
|
501
|
+
onHide: Z
|
|
502
|
+
}), [Z]);
|
|
500
503
|
function k() {
|
|
501
|
-
return
|
|
502
|
-
isRTL:
|
|
504
|
+
return J || Bt({
|
|
505
|
+
isRTL: me
|
|
503
506
|
});
|
|
504
507
|
}
|
|
505
508
|
function ee(r) {
|
|
506
|
-
if (!
|
|
509
|
+
if (!Me)
|
|
507
510
|
return;
|
|
508
|
-
const B = k().getScrollbarWidth() > 0,
|
|
511
|
+
const B = k().getScrollbarWidth() > 0, Re = r.scrollHeight > Se(r).documentElement.clientHeight;
|
|
509
512
|
c({
|
|
510
|
-
paddingRight: B && !
|
|
511
|
-
paddingLeft: !B &&
|
|
513
|
+
paddingRight: B && !Re ? Oe() : void 0,
|
|
514
|
+
paddingLeft: !B && Re ? Oe() : void 0
|
|
512
515
|
});
|
|
513
516
|
}
|
|
514
517
|
const O = y(() => {
|
|
@@ -522,13 +525,13 @@ const Ve = /* @__PURE__ */ u.forwardRef(({
|
|
|
522
525
|
}, A = (r) => {
|
|
523
526
|
w.current && p && r.target === p.dialog && (j.current = !0), w.current = !1;
|
|
524
527
|
}, l = () => {
|
|
525
|
-
|
|
526
|
-
|
|
528
|
+
Q(!0), f.current = it(p.dialog, () => {
|
|
529
|
+
Q(!1);
|
|
527
530
|
});
|
|
528
531
|
}, te = (r) => {
|
|
529
532
|
r.target === r.currentTarget && l();
|
|
530
|
-
},
|
|
531
|
-
if (
|
|
533
|
+
}, U = (r) => {
|
|
534
|
+
if (R === "static") {
|
|
532
535
|
te(r);
|
|
533
536
|
return;
|
|
534
537
|
}
|
|
@@ -536,35 +539,35 @@ const Ve = /* @__PURE__ */ u.forwardRef(({
|
|
|
536
539
|
j.current = !1;
|
|
537
540
|
return;
|
|
538
541
|
}
|
|
539
|
-
|
|
542
|
+
N == null || N();
|
|
540
543
|
}, ze = (r) => {
|
|
541
|
-
oe ? V == null || V(r) : (r.preventDefault(),
|
|
544
|
+
oe ? V == null || V(r) : (r.preventDefault(), R === "static" && l());
|
|
542
545
|
}, Xe = (r, B) => {
|
|
543
546
|
r && ee(r), W == null || W(r, B);
|
|
544
|
-
},
|
|
547
|
+
}, Ye = (r) => {
|
|
545
548
|
f.current == null || f.current(), I == null || I(r);
|
|
546
|
-
},
|
|
547
|
-
|
|
548
|
-
},
|
|
549
|
-
r && (r.style.display = ""),
|
|
550
|
-
},
|
|
549
|
+
}, qe = (r, B) => {
|
|
550
|
+
Y == null || Y(r, B), rt(window, "resize", O);
|
|
551
|
+
}, Pe = (r) => {
|
|
552
|
+
r && (r.style.display = ""), q == null || q(r), ke(window, "resize", O);
|
|
553
|
+
}, Je = Te((r) => /* @__PURE__ */ a.jsx("div", {
|
|
551
554
|
...r,
|
|
552
|
-
className: d(`${t}-backdrop`,
|
|
553
|
-
}), [
|
|
555
|
+
className: d(`${t}-backdrop`, P, !M && "show")
|
|
556
|
+
}), [M, P, t]), be = {
|
|
554
557
|
...n,
|
|
555
558
|
...C
|
|
556
559
|
};
|
|
557
560
|
be.display = "block";
|
|
558
|
-
const
|
|
561
|
+
const Qe = (r) => /* @__PURE__ */ a.jsx("div", {
|
|
559
562
|
role: "dialog",
|
|
560
563
|
...r,
|
|
561
564
|
style: be,
|
|
562
|
-
className: d(e, t, ue && `${t}-static`, !
|
|
563
|
-
onClick:
|
|
565
|
+
className: d(e, t, ue && `${t}-static`, !M && "show"),
|
|
566
|
+
onClick: R ? U : void 0,
|
|
564
567
|
onMouseUp: A,
|
|
565
|
-
"data-bs-theme":
|
|
566
|
-
"aria-label":
|
|
567
|
-
"aria-labelledby":
|
|
568
|
+
"data-bs-theme": m,
|
|
569
|
+
"aria-label": h,
|
|
570
|
+
"aria-labelledby": T,
|
|
568
571
|
"aria-describedby": b,
|
|
569
572
|
children: /* @__PURE__ */ a.jsx(E, {
|
|
570
573
|
...ce,
|
|
@@ -576,10 +579,10 @@ const Ve = /* @__PURE__ */ u.forwardRef(({
|
|
|
576
579
|
});
|
|
577
580
|
return /* @__PURE__ */ a.jsx(We.Provider, {
|
|
578
581
|
value: _,
|
|
579
|
-
children: /* @__PURE__ */ a.jsx(
|
|
580
|
-
show:
|
|
582
|
+
children: /* @__PURE__ */ a.jsx(jt, {
|
|
583
|
+
show: D,
|
|
581
584
|
ref: fe,
|
|
582
|
-
backdrop:
|
|
585
|
+
backdrop: R,
|
|
583
586
|
container: ae,
|
|
584
587
|
keyboard: !0,
|
|
585
588
|
autoFocus: z,
|
|
@@ -588,35 +591,36 @@ const Ve = /* @__PURE__ */ u.forwardRef(({
|
|
|
588
591
|
restoreFocusOptions: le,
|
|
589
592
|
onEscapeKeyDown: ze,
|
|
590
593
|
onShow: se,
|
|
591
|
-
onHide:
|
|
594
|
+
onHide: N,
|
|
592
595
|
onEnter: Xe,
|
|
593
|
-
onEntering:
|
|
596
|
+
onEntering: qe,
|
|
594
597
|
onEntered: X,
|
|
595
|
-
onExit:
|
|
598
|
+
onExit: Ye,
|
|
596
599
|
onExiting: de,
|
|
597
|
-
onExited:
|
|
600
|
+
onExited: Pe,
|
|
598
601
|
manager: k(),
|
|
599
|
-
transition:
|
|
600
|
-
backdropTransition:
|
|
601
|
-
renderBackdrop:
|
|
602
|
-
renderDialog:
|
|
602
|
+
transition: M ? _t : void 0,
|
|
603
|
+
backdropTransition: M ? Kt : void 0,
|
|
604
|
+
renderBackdrop: Je,
|
|
605
|
+
renderDialog: Qe
|
|
603
606
|
})
|
|
604
607
|
});
|
|
605
608
|
});
|
|
606
609
|
Ve.displayName = "Modal";
|
|
607
|
-
const
|
|
608
|
-
Body:
|
|
609
|
-
Header:
|
|
610
|
-
Title:
|
|
611
|
-
Footer:
|
|
610
|
+
const Pt = Object.assign(Ve, {
|
|
611
|
+
Body: St,
|
|
612
|
+
Header: It,
|
|
613
|
+
Title: Ht,
|
|
614
|
+
Footer: Lt,
|
|
612
615
|
Dialog: _e,
|
|
613
616
|
TRANSITION_DURATION: 300,
|
|
614
617
|
BACKDROP_TRANSITION_DURATION: 150
|
|
615
618
|
});
|
|
616
619
|
export {
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
+
Xt as L,
|
|
621
|
+
Pt as M,
|
|
622
|
+
Yt as T,
|
|
623
|
+
qt as a,
|
|
620
624
|
Mt as d,
|
|
621
625
|
F as q,
|
|
622
626
|
gt as u
|