react-luminus-components 1.2.1 → 1.2.2
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 +41 -41
- package/dist/{DataKey-CLYT9XGM.cjs → DataKey-CBMsR50b.cjs} +1 -1
- package/dist/{DataKey-CPc1_-be.js → DataKey-CBV-NBJf.js} +1 -1
- package/dist/{SimpleTooltip-rgKvGQAh.cjs → SimpleTooltip-D6DtiDiF.cjs} +1 -1
- package/dist/{SimpleTooltip-EPgkOstR.js → SimpleTooltip-DxazAlXp.js} +1 -1
- package/dist/{Typography-PSv7V5A1.js → Typography-CHfAgqP5.js} +1 -1
- package/dist/{Typography-C9GM_GzV.cjs → Typography-ni7LYA_5.cjs} +1 -1
- package/dist/{UserAvatarToggle-CIQXhmcN.js → UserAvatarToggle-B-BYsINz.js} +1798 -1787
- package/dist/UserAvatarToggle-cPWBMa9z.cjs +253 -0
- package/dist/components/Tabs/Tabs.d.ts +2 -2
- package/dist/components/common/PhotoLightbox/PhotoLightbox.d.ts +1 -1
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +171 -173
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +783 -655
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +3 -3
- package/dist/main.cjs.js +1 -1
- package/dist/main.es.js +1626 -1621
- package/dist/style.css +1 -1
- package/dist/{useConfirm-CrF2KHR-.cjs → useConfirm-BC-OkqG0.cjs} +1 -1
- package/dist/{useConfirm-C_gZ96ka.js → useConfirm-CkSyQrSF.js} +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +7 -7
- package/package.json +1 -1
- package/dist/UserAvatarToggle-DmBqBnvE.cjs +0 -250
package/dist/contexts.es.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { j as r, c as w, e as ye, f as
|
|
1
|
+
import { j as r, c as w, e as ye, f as Ee, o as Fe, s as G, g as De, h as tt, i as nt, k as b, l as ke, m as Oe, n as We, p as ot, r as Se, q as st, t as U, v as rt, w as at, x as it, y as Be, F as Ue, z as lt, A as dt, L as be, P as He, C as ct, I as ut, B as ft, b as ht, U as mt } from "./UserAvatarToggle-B-BYsINz.js";
|
|
2
2
|
import * as y from "react";
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { a as
|
|
5
|
-
import { T as
|
|
6
|
-
import { d as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
3
|
+
import { forwardRef as gt, useState as p, useRef as j, useImperativeHandle as pt, useEffect as re, useCallback as g, useContext as ae, useMemo as R } from "react";
|
|
4
|
+
import { a as vt, u as yt } from "./useConfirm-CkSyQrSF.js";
|
|
5
|
+
import { T as xt } from "./Typography-CHfAgqP5.js";
|
|
6
|
+
import { d as wt, u as Ct, q as D, L as Et } from "./DataKey-CBV-NBJf.js";
|
|
7
|
+
import bt from "react-dom";
|
|
8
|
+
const jt = (t) => /* @__PURE__ */ y.forwardRef((e, n) => /* @__PURE__ */ r.jsx("div", {
|
|
9
9
|
...e,
|
|
10
10
|
ref: n,
|
|
11
11
|
className: w(e.className, t)
|
|
12
|
-
})),
|
|
12
|
+
})), Tt = {
|
|
13
13
|
/** An accessible label indicating the relevant information about the Close Button. */
|
|
14
14
|
"aria-label": ye.string,
|
|
15
15
|
/** A callback fired after the Close Button is clicked. */
|
|
@@ -20,7 +20,7 @@ const Tt = (t) => /* @__PURE__ */ y.forwardRef((e, n) => /* @__PURE__ */ r.jsx("
|
|
|
20
20
|
* Omitting this will render the default dark color.
|
|
21
21
|
*/
|
|
22
22
|
variant: ye.oneOf(["white"])
|
|
23
|
-
},
|
|
23
|
+
}, je = /* @__PURE__ */ y.forwardRef(({
|
|
24
24
|
className: t,
|
|
25
25
|
variant: e,
|
|
26
26
|
"aria-label": n = "Close",
|
|
@@ -32,12 +32,11 @@ const Tt = (t) => /* @__PURE__ */ y.forwardRef((e, n) => /* @__PURE__ */ r.jsx("
|
|
|
32
32
|
"aria-label": n,
|
|
33
33
|
...o
|
|
34
34
|
}));
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const Nt = Me;
|
|
35
|
+
je.displayName = "CloseButton";
|
|
36
|
+
je.propTypes = Tt;
|
|
38
37
|
var se;
|
|
39
|
-
function
|
|
40
|
-
if ((!se && se !== 0 || t) &&
|
|
38
|
+
function Ae(t) {
|
|
39
|
+
if ((!se && se !== 0 || t) && Ee) {
|
|
41
40
|
var e = document.createElement("div");
|
|
42
41
|
e.style.position = "absolute", e.style.top = "-9999px", e.style.width = "50px", e.style.height = "50px", e.style.overflow = "scroll", document.body.appendChild(e), se = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
|
|
43
42
|
}
|
|
@@ -52,12 +51,12 @@ function xe(t) {
|
|
|
52
51
|
return t.body;
|
|
53
52
|
}
|
|
54
53
|
}
|
|
55
|
-
function
|
|
54
|
+
function Nt(t = document) {
|
|
56
55
|
const e = t.defaultView;
|
|
57
56
|
return Math.abs(e.innerWidth - t.documentElement.clientWidth);
|
|
58
57
|
}
|
|
59
|
-
const
|
|
60
|
-
class
|
|
58
|
+
const Le = wt("modal-open");
|
|
59
|
+
class Te {
|
|
61
60
|
constructor({
|
|
62
61
|
ownerDocument: e,
|
|
63
62
|
handleContainerOverflow: n = !0,
|
|
@@ -66,7 +65,7 @@ class kt {
|
|
|
66
65
|
this.handleContainerOverflow = n, this.isRTL = o, this.modals = [], this.ownerDocument = e;
|
|
67
66
|
}
|
|
68
67
|
getScrollbarWidth() {
|
|
69
|
-
return
|
|
68
|
+
return Nt(this.ownerDocument);
|
|
70
69
|
}
|
|
71
70
|
getElement() {
|
|
72
71
|
return (this.ownerDocument || document).body;
|
|
@@ -82,14 +81,14 @@ class kt {
|
|
|
82
81
|
e.style = {
|
|
83
82
|
overflow: s.style.overflow,
|
|
84
83
|
[o]: s.style[o]
|
|
85
|
-
}, e.scrollBarWidth && (n[o] = `${parseInt(G(s, o) || "0", 10) + e.scrollBarWidth}px`), s.setAttribute(
|
|
84
|
+
}, e.scrollBarWidth && (n[o] = `${parseInt(G(s, o) || "0", 10) + e.scrollBarWidth}px`), s.setAttribute(Le, ""), G(s, n);
|
|
86
85
|
}
|
|
87
86
|
reset() {
|
|
88
87
|
[...this.modals].forEach((e) => this.remove(e));
|
|
89
88
|
}
|
|
90
89
|
removeContainerStyle(e) {
|
|
91
90
|
const n = this.getElement();
|
|
92
|
-
n.removeAttribute(
|
|
91
|
+
n.removeAttribute(Le), Object.assign(n.style, e.style);
|
|
93
92
|
}
|
|
94
93
|
add(e) {
|
|
95
94
|
let n = this.modals.indexOf(e);
|
|
@@ -106,8 +105,8 @@ class kt {
|
|
|
106
105
|
return !!this.modals.length && this.modals[this.modals.length - 1] === e;
|
|
107
106
|
}
|
|
108
107
|
}
|
|
109
|
-
const
|
|
110
|
-
function
|
|
108
|
+
const Mt = ["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"];
|
|
109
|
+
function Rt(t, e) {
|
|
111
110
|
if (t == null)
|
|
112
111
|
return {};
|
|
113
112
|
var n = {}, o = Object.keys(t), s, a;
|
|
@@ -116,13 +115,13 @@ function St(t, e) {
|
|
|
116
115
|
return n;
|
|
117
116
|
}
|
|
118
117
|
let we;
|
|
119
|
-
function
|
|
118
|
+
function kt(t) {
|
|
120
119
|
return we || (we = new Te({
|
|
121
120
|
ownerDocument: t == null ? void 0 : t.document
|
|
122
121
|
})), we;
|
|
123
122
|
}
|
|
124
|
-
function
|
|
125
|
-
const e =
|
|
123
|
+
function Ot(t) {
|
|
124
|
+
const e = De(), n = t || kt(e), o = j({
|
|
126
125
|
dialog: null,
|
|
127
126
|
backdrop: null
|
|
128
127
|
});
|
|
@@ -138,7 +137,7 @@ function At(t) {
|
|
|
138
137
|
}, [])
|
|
139
138
|
});
|
|
140
139
|
}
|
|
141
|
-
const
|
|
140
|
+
const $e = /* @__PURE__ */ gt((t, e) => {
|
|
142
141
|
let {
|
|
143
142
|
show: n = !1,
|
|
144
143
|
role: o = "dialog",
|
|
@@ -165,16 +164,16 @@ const He = /* @__PURE__ */ pt((t, e) => {
|
|
|
165
164
|
onHide: H = () => {
|
|
166
165
|
},
|
|
167
166
|
onExit: he,
|
|
168
|
-
onExited:
|
|
167
|
+
onExited: $,
|
|
169
168
|
onExiting: Y,
|
|
170
169
|
onEnter: J,
|
|
171
170
|
onEntering: Q,
|
|
172
171
|
onEntered: Z
|
|
173
|
-
} = t, me =
|
|
174
|
-
const C =
|
|
175
|
-
|
|
176
|
-
const
|
|
177
|
-
if (m.add(), A.current =
|
|
172
|
+
} = t, me = Rt(t, Mt);
|
|
173
|
+
const C = De(), S = tt(fe), m = Ot(ue), ge = nt(), ee = Ct(n), [N, B] = p(!n), x = j(null);
|
|
174
|
+
pt(e, () => m, [m]), Ee && !ee && n && (x.current = xe(C == null ? void 0 : C.document)), n && N && B(!1);
|
|
175
|
+
const E = b(() => {
|
|
176
|
+
if (m.add(), A.current = ke(document, "keydown", ve), _.current = ke(
|
|
178
177
|
document,
|
|
179
178
|
"focus",
|
|
180
179
|
// the timeout is necessary b/c this will run before the new modal is mounted
|
|
@@ -184,37 +183,37 @@ const He = /* @__PURE__ */ pt((t, e) => {
|
|
|
184
183
|
), X && X(), V) {
|
|
185
184
|
var c, oe;
|
|
186
185
|
const z = xe((c = (oe = m.dialog) == null ? void 0 : oe.ownerDocument) != null ? c : C == null ? void 0 : C.document);
|
|
187
|
-
m.dialog && z && !
|
|
186
|
+
m.dialog && z && !Oe(m.dialog, z) && (x.current = z, m.dialog.focus());
|
|
188
187
|
}
|
|
189
|
-
}), P =
|
|
188
|
+
}), P = b(() => {
|
|
190
189
|
if (m.remove(), A.current == null || A.current(), _.current == null || _.current(), O) {
|
|
191
190
|
var c;
|
|
192
191
|
(c = x.current) == null || c.focus == null || c.focus(de), x.current = null;
|
|
193
192
|
}
|
|
194
193
|
});
|
|
195
194
|
re(() => {
|
|
196
|
-
!n || !S ||
|
|
195
|
+
!n || !S || E();
|
|
197
196
|
}, [
|
|
198
197
|
n,
|
|
199
198
|
S,
|
|
200
199
|
/* should never change: */
|
|
201
|
-
|
|
200
|
+
E
|
|
202
201
|
]), re(() => {
|
|
203
|
-
|
|
204
|
-
}, [
|
|
202
|
+
N && P();
|
|
203
|
+
}, [N, P]), We(() => {
|
|
205
204
|
P();
|
|
206
205
|
});
|
|
207
|
-
const pe =
|
|
206
|
+
const pe = b(() => {
|
|
208
207
|
if (!le || !ge() || !m.isTopModal())
|
|
209
208
|
return;
|
|
210
209
|
const c = xe(C == null ? void 0 : C.document);
|
|
211
|
-
m.dialog && c && !
|
|
212
|
-
}), te =
|
|
210
|
+
m.dialog && c && !Oe(m.dialog, c) && m.dialog.focus();
|
|
211
|
+
}), te = b((c) => {
|
|
213
212
|
c.target === c.currentTarget && (h == null || h(c), l === !0 && H());
|
|
214
|
-
}), ve =
|
|
215
|
-
f &&
|
|
216
|
-
}), _ =
|
|
217
|
-
B(!0),
|
|
213
|
+
}), ve = b((c) => {
|
|
214
|
+
f && ot(c) && m.isTopModal() && (d == null || d(c), c.defaultPrevented || H());
|
|
215
|
+
}), _ = j(), A = j(), ne = (...c) => {
|
|
216
|
+
B(!0), $ == null || $(...c);
|
|
218
217
|
};
|
|
219
218
|
if (!S)
|
|
220
219
|
return null;
|
|
@@ -233,7 +232,7 @@ const He = /* @__PURE__ */ pt((t, e) => {
|
|
|
233
232
|
role: "document"
|
|
234
233
|
})
|
|
235
234
|
}));
|
|
236
|
-
K =
|
|
235
|
+
K = Se(v, T, {
|
|
237
236
|
unmountOnExit: !0,
|
|
238
237
|
mountOnEnter: !0,
|
|
239
238
|
appear: !0,
|
|
@@ -246,41 +245,41 @@ const He = /* @__PURE__ */ pt((t, e) => {
|
|
|
246
245
|
onEntered: Z,
|
|
247
246
|
children: K
|
|
248
247
|
});
|
|
249
|
-
let
|
|
250
|
-
return l && (
|
|
248
|
+
let I = null;
|
|
249
|
+
return l && (I = ce({
|
|
251
250
|
ref: m.setBackdropRef,
|
|
252
251
|
onClick: te
|
|
253
|
-
}),
|
|
252
|
+
}), I = Se(k, ie, {
|
|
254
253
|
in: !!n,
|
|
255
254
|
appear: !0,
|
|
256
255
|
mountOnEnter: !0,
|
|
257
256
|
unmountOnExit: !0,
|
|
258
|
-
children:
|
|
257
|
+
children: I
|
|
259
258
|
})), /* @__PURE__ */ r.jsx(r.Fragment, {
|
|
260
|
-
children: /* @__PURE__ */
|
|
261
|
-
children: [
|
|
259
|
+
children: /* @__PURE__ */ bt.createPortal(/* @__PURE__ */ r.jsxs(r.Fragment, {
|
|
260
|
+
children: [I, K]
|
|
262
261
|
}), S)
|
|
263
262
|
});
|
|
264
263
|
});
|
|
265
|
-
|
|
266
|
-
const
|
|
264
|
+
$e.displayName = "Modal";
|
|
265
|
+
const St = Object.assign($e, {
|
|
267
266
|
Manager: Te
|
|
268
267
|
});
|
|
269
|
-
function
|
|
270
|
-
t.classList ? t.classList.add(e) :
|
|
268
|
+
function Bt(t, e) {
|
|
269
|
+
t.classList ? t.classList.add(e) : st(t, e) || (typeof t.className == "string" ? t.className = t.className + " " + e : t.setAttribute("class", (t.className && t.className.baseVal || "") + " " + e));
|
|
271
270
|
}
|
|
272
|
-
function
|
|
271
|
+
function Ie(t, e) {
|
|
273
272
|
return t.replace(new RegExp("(^|\\s)" + e + "(?:\\s|$)", "g"), "$1").replace(/\s+/g, " ").replace(/^\s*|\s*$/g, "");
|
|
274
273
|
}
|
|
275
|
-
function
|
|
276
|
-
t.classList ? t.classList.remove(e) : typeof t.className == "string" ? t.className =
|
|
274
|
+
function At(t, e) {
|
|
275
|
+
t.classList ? t.classList.remove(e) : typeof t.className == "string" ? t.className = Ie(t.className, e) : t.setAttribute("class", Ie(t.className && t.className.baseVal || "", e));
|
|
277
276
|
}
|
|
278
|
-
const
|
|
277
|
+
const W = {
|
|
279
278
|
FIXED_CONTENT: ".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",
|
|
280
279
|
STICKY_CONTENT: ".sticky-top",
|
|
281
280
|
NAVBAR_TOGGLER: ".navbar-toggler"
|
|
282
281
|
};
|
|
283
|
-
class
|
|
282
|
+
class Lt extends Te {
|
|
284
283
|
adjustAndStore(e, n, o) {
|
|
285
284
|
const s = n.style[e];
|
|
286
285
|
n.dataset[e] = s, G(n, {
|
|
@@ -296,39 +295,39 @@ class Dt extends Te {
|
|
|
296
295
|
setContainerStyle(e) {
|
|
297
296
|
super.setContainerStyle(e);
|
|
298
297
|
const n = this.getElement();
|
|
299
|
-
if (
|
|
298
|
+
if (Bt(n, "modal-open"), !e.scrollBarWidth)
|
|
300
299
|
return;
|
|
301
300
|
const o = this.isRTL ? "paddingLeft" : "paddingRight", s = this.isRTL ? "marginLeft" : "marginRight";
|
|
302
|
-
D(n,
|
|
301
|
+
D(n, W.FIXED_CONTENT).forEach((a) => this.adjustAndStore(o, a, e.scrollBarWidth)), D(n, W.STICKY_CONTENT).forEach((a) => this.adjustAndStore(s, a, -e.scrollBarWidth)), D(n, W.NAVBAR_TOGGLER).forEach((a) => this.adjustAndStore(s, a, e.scrollBarWidth));
|
|
303
302
|
}
|
|
304
303
|
removeContainerStyle(e) {
|
|
305
304
|
super.removeContainerStyle(e);
|
|
306
305
|
const n = this.getElement();
|
|
307
|
-
|
|
306
|
+
At(n, "modal-open");
|
|
308
307
|
const o = this.isRTL ? "paddingLeft" : "paddingRight", s = this.isRTL ? "marginLeft" : "marginRight";
|
|
309
|
-
D(n,
|
|
308
|
+
D(n, W.FIXED_CONTENT).forEach((a) => this.restore(o, a)), D(n, W.STICKY_CONTENT).forEach((a) => this.restore(s, a)), D(n, W.NAVBAR_TOGGLER).forEach((a) => this.restore(s, a));
|
|
310
309
|
}
|
|
311
310
|
}
|
|
312
311
|
let Ce;
|
|
313
|
-
function
|
|
314
|
-
return Ce || (Ce = new
|
|
312
|
+
function It(t) {
|
|
313
|
+
return Ce || (Ce = new Lt(t)), Ce;
|
|
315
314
|
}
|
|
316
|
-
const
|
|
315
|
+
const Pe = /* @__PURE__ */ y.forwardRef(({
|
|
317
316
|
className: t,
|
|
318
317
|
bsPrefix: e,
|
|
319
318
|
as: n = "div",
|
|
320
319
|
...o
|
|
321
|
-
}, s) => (e =
|
|
320
|
+
}, s) => (e = U(e, "modal-body"), /* @__PURE__ */ r.jsx(n, {
|
|
322
321
|
ref: s,
|
|
323
322
|
className: w(t, e),
|
|
324
323
|
...o
|
|
325
324
|
})));
|
|
326
|
-
|
|
327
|
-
const
|
|
325
|
+
Pe.displayName = "ModalBody";
|
|
326
|
+
const _e = /* @__PURE__ */ y.createContext({
|
|
328
327
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
329
328
|
onHide() {
|
|
330
329
|
}
|
|
331
|
-
}),
|
|
330
|
+
}), Ne = /* @__PURE__ */ y.forwardRef(({
|
|
332
331
|
bsPrefix: t,
|
|
333
332
|
className: e,
|
|
334
333
|
contentClassName: n,
|
|
@@ -339,7 +338,7 @@ const Wt = Ue, Ht = /* @__PURE__ */ y.createContext({
|
|
|
339
338
|
scrollable: l,
|
|
340
339
|
...f
|
|
341
340
|
}, h) => {
|
|
342
|
-
t =
|
|
341
|
+
t = U(t, "modal");
|
|
343
342
|
const d = `${t}-dialog`, v = typeof a == "string" ? `${t}-fullscreen-${a}` : `${t}-fullscreen`;
|
|
344
343
|
return /* @__PURE__ */ r.jsx("div", {
|
|
345
344
|
...f,
|
|
@@ -351,19 +350,19 @@ const Wt = Ue, Ht = /* @__PURE__ */ y.createContext({
|
|
|
351
350
|
})
|
|
352
351
|
});
|
|
353
352
|
});
|
|
354
|
-
|
|
355
|
-
const Ke =
|
|
353
|
+
Ne.displayName = "ModalDialog";
|
|
354
|
+
const Ke = /* @__PURE__ */ y.forwardRef(({
|
|
356
355
|
className: t,
|
|
357
356
|
bsPrefix: e,
|
|
358
357
|
as: n = "div",
|
|
359
358
|
...o
|
|
360
|
-
}, s) => (e =
|
|
359
|
+
}, s) => (e = U(e, "modal-footer"), /* @__PURE__ */ r.jsx(n, {
|
|
361
360
|
ref: s,
|
|
362
361
|
className: w(t, e),
|
|
363
362
|
...o
|
|
364
363
|
})));
|
|
365
|
-
|
|
366
|
-
const
|
|
364
|
+
Ke.displayName = "ModalFooter";
|
|
365
|
+
const Ft = /* @__PURE__ */ y.forwardRef(({
|
|
367
366
|
closeLabel: t = "Close",
|
|
368
367
|
closeVariant: e,
|
|
369
368
|
closeButton: n = !1,
|
|
@@ -371,64 +370,63 @@ const Ut = ze, Pt = /* @__PURE__ */ y.forwardRef(({
|
|
|
371
370
|
children: s,
|
|
372
371
|
...a
|
|
373
372
|
}, u) => {
|
|
374
|
-
const l = ae(
|
|
373
|
+
const l = ae(_e), f = b(() => {
|
|
375
374
|
l == null || l.onHide(), o == null || o();
|
|
376
375
|
});
|
|
377
376
|
return /* @__PURE__ */ r.jsxs("div", {
|
|
378
377
|
ref: u,
|
|
379
378
|
...a,
|
|
380
|
-
children: [s, n && /* @__PURE__ */ r.jsx(
|
|
379
|
+
children: [s, n && /* @__PURE__ */ r.jsx(je, {
|
|
381
380
|
"aria-label": t,
|
|
382
381
|
variant: e,
|
|
383
382
|
onClick: f
|
|
384
383
|
})]
|
|
385
384
|
});
|
|
386
|
-
}),
|
|
385
|
+
}), ze = /* @__PURE__ */ y.forwardRef(({
|
|
387
386
|
bsPrefix: t,
|
|
388
387
|
className: e,
|
|
389
388
|
closeLabel: n = "Close",
|
|
390
389
|
closeButton: o = !1,
|
|
391
390
|
...s
|
|
392
|
-
}, a) => (t =
|
|
391
|
+
}, a) => (t = U(t, "modal-header"), /* @__PURE__ */ r.jsx(Ft, {
|
|
393
392
|
ref: a,
|
|
394
393
|
...s,
|
|
395
394
|
className: w(e, t),
|
|
396
395
|
closeLabel: n,
|
|
397
396
|
closeButton: o
|
|
398
397
|
})));
|
|
399
|
-
|
|
400
|
-
const
|
|
398
|
+
ze.displayName = "ModalHeader";
|
|
399
|
+
const Dt = jt("h4"), Ge = /* @__PURE__ */ y.forwardRef(({
|
|
401
400
|
className: t,
|
|
402
401
|
bsPrefix: e,
|
|
403
|
-
as: n =
|
|
402
|
+
as: n = Dt,
|
|
404
403
|
...o
|
|
405
|
-
}, s) => (e =
|
|
404
|
+
}, s) => (e = U(e, "modal-title"), /* @__PURE__ */ r.jsx(n, {
|
|
406
405
|
ref: s,
|
|
407
406
|
className: w(t, e),
|
|
408
407
|
...o
|
|
409
408
|
})));
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
return /* @__PURE__ */ r.jsx($e, {
|
|
409
|
+
Ge.displayName = "ModalTitle";
|
|
410
|
+
function Wt(t) {
|
|
411
|
+
return /* @__PURE__ */ r.jsx(Ue, {
|
|
414
412
|
...t,
|
|
415
413
|
timeout: null
|
|
416
414
|
});
|
|
417
415
|
}
|
|
418
|
-
function
|
|
419
|
-
return /* @__PURE__ */ r.jsx(
|
|
416
|
+
function Ut(t) {
|
|
417
|
+
return /* @__PURE__ */ r.jsx(Ue, {
|
|
420
418
|
...t,
|
|
421
419
|
timeout: null
|
|
422
420
|
});
|
|
423
421
|
}
|
|
424
|
-
const
|
|
422
|
+
const Ve = /* @__PURE__ */ y.forwardRef(({
|
|
425
423
|
bsPrefix: t,
|
|
426
424
|
className: e,
|
|
427
425
|
style: n,
|
|
428
426
|
dialogClassName: o,
|
|
429
427
|
contentClassName: s,
|
|
430
428
|
children: a,
|
|
431
|
-
dialogAs: u =
|
|
429
|
+
dialogAs: u = Ne,
|
|
432
430
|
"data-bs-theme": l,
|
|
433
431
|
"aria-labelledby": f,
|
|
434
432
|
"aria-describedby": h,
|
|
@@ -449,44 +447,44 @@ const qe = /* @__PURE__ */ y.forwardRef(({
|
|
|
449
447
|
onEntered: X,
|
|
450
448
|
onExit: H,
|
|
451
449
|
onExiting: he,
|
|
452
|
-
onEnter:
|
|
450
|
+
onEnter: $,
|
|
453
451
|
onEntering: Y,
|
|
454
452
|
onExited: J,
|
|
455
453
|
backdropClassName: Q,
|
|
456
454
|
manager: Z,
|
|
457
455
|
...me
|
|
458
456
|
}, C) => {
|
|
459
|
-
const [S, m] = p({}), [ge, ee] = p(!1),
|
|
460
|
-
t =
|
|
457
|
+
const [S, m] = p({}), [ge, ee] = p(!1), N = j(!1), B = j(!1), x = j(null), [E, P] = rt(), pe = at(C, P), te = b(O), ve = it();
|
|
458
|
+
t = U(t, "modal");
|
|
461
459
|
const _ = R(() => ({
|
|
462
460
|
onHide: te
|
|
463
461
|
}), [te]);
|
|
464
462
|
function A() {
|
|
465
|
-
return Z ||
|
|
463
|
+
return Z || It({
|
|
466
464
|
isRTL: ve
|
|
467
465
|
});
|
|
468
466
|
}
|
|
469
467
|
function ne(i) {
|
|
470
|
-
if (!
|
|
468
|
+
if (!Ee)
|
|
471
469
|
return;
|
|
472
|
-
const
|
|
470
|
+
const F = A().getScrollbarWidth() > 0, Re = i.scrollHeight > Fe(i).documentElement.clientHeight;
|
|
473
471
|
m({
|
|
474
|
-
paddingRight:
|
|
475
|
-
paddingLeft: !
|
|
472
|
+
paddingRight: F && !Re ? Ae() : void 0,
|
|
473
|
+
paddingLeft: !F && Re ? Ae() : void 0
|
|
476
474
|
});
|
|
477
475
|
}
|
|
478
|
-
const L =
|
|
479
|
-
|
|
476
|
+
const L = b(() => {
|
|
477
|
+
E && ne(E.dialog);
|
|
480
478
|
});
|
|
481
|
-
|
|
482
|
-
|
|
479
|
+
We(() => {
|
|
480
|
+
Be(window, "resize", L), x.current == null || x.current();
|
|
483
481
|
});
|
|
484
482
|
const K = () => {
|
|
485
|
-
|
|
486
|
-
},
|
|
487
|
-
|
|
483
|
+
N.current = !0;
|
|
484
|
+
}, I = (i) => {
|
|
485
|
+
N.current && E && i.target === E.dialog && (B.current = !0), N.current = !1;
|
|
488
486
|
}, c = () => {
|
|
489
|
-
ee(!0), x.current =
|
|
487
|
+
ee(!0), x.current = dt(E.dialog, () => {
|
|
490
488
|
ee(!1);
|
|
491
489
|
});
|
|
492
490
|
}, oe = (i) => {
|
|
@@ -501,31 +499,31 @@ const qe = /* @__PURE__ */ y.forwardRef(({
|
|
|
501
499
|
return;
|
|
502
500
|
}
|
|
503
501
|
O == null || O();
|
|
504
|
-
},
|
|
502
|
+
}, qe = (i) => {
|
|
505
503
|
ie ? V == null || V(i) : (i.preventDefault(), k === "static" && c());
|
|
506
|
-
},
|
|
507
|
-
i && ne(i),
|
|
508
|
-
},
|
|
504
|
+
}, Xe = (i, F) => {
|
|
505
|
+
i && ne(i), $ == null || $(i, F);
|
|
506
|
+
}, Ye = (i) => {
|
|
509
507
|
x.current == null || x.current(), H == null || H(i);
|
|
510
|
-
},
|
|
511
|
-
Y == null || Y(i,
|
|
512
|
-
},
|
|
513
|
-
i && (i.style.display = ""), J == null || J(i),
|
|
514
|
-
},
|
|
508
|
+
}, Je = (i, F) => {
|
|
509
|
+
Y == null || Y(i, F), lt(window, "resize", L);
|
|
510
|
+
}, Qe = (i) => {
|
|
511
|
+
i && (i.style.display = ""), J == null || J(i), Be(window, "resize", L);
|
|
512
|
+
}, Ze = g((i) => /* @__PURE__ */ r.jsx("div", {
|
|
515
513
|
...i,
|
|
516
514
|
className: w(`${t}-backdrop`, Q, !T && "show")
|
|
517
|
-
}), [T, Q, t]),
|
|
515
|
+
}), [T, Q, t]), Me = {
|
|
518
516
|
...n,
|
|
519
517
|
...S
|
|
520
518
|
};
|
|
521
|
-
|
|
522
|
-
const
|
|
519
|
+
Me.display = "block";
|
|
520
|
+
const et = (i) => /* @__PURE__ */ r.jsx("div", {
|
|
523
521
|
role: "dialog",
|
|
524
522
|
...i,
|
|
525
|
-
style:
|
|
523
|
+
style: Me,
|
|
526
524
|
className: w(e, t, ge && `${t}-static`, !T && "show"),
|
|
527
525
|
onClick: k ? z : void 0,
|
|
528
|
-
onMouseUp:
|
|
526
|
+
onMouseUp: I,
|
|
529
527
|
"data-bs-theme": l,
|
|
530
528
|
"aria-label": d,
|
|
531
529
|
"aria-labelledby": f,
|
|
@@ -538,9 +536,9 @@ const qe = /* @__PURE__ */ y.forwardRef(({
|
|
|
538
536
|
children: a
|
|
539
537
|
})
|
|
540
538
|
});
|
|
541
|
-
return /* @__PURE__ */ r.jsx(
|
|
539
|
+
return /* @__PURE__ */ r.jsx(_e.Provider, {
|
|
542
540
|
value: _,
|
|
543
|
-
children: /* @__PURE__ */ r.jsx(
|
|
541
|
+
children: /* @__PURE__ */ r.jsx(St, {
|
|
544
542
|
show: v,
|
|
545
543
|
ref: pe,
|
|
546
544
|
backdrop: k,
|
|
@@ -550,34 +548,34 @@ const qe = /* @__PURE__ */ y.forwardRef(({
|
|
|
550
548
|
enforceFocus: ce,
|
|
551
549
|
restoreFocus: ue,
|
|
552
550
|
restoreFocusOptions: fe,
|
|
553
|
-
onEscapeKeyDown:
|
|
551
|
+
onEscapeKeyDown: qe,
|
|
554
552
|
onShow: le,
|
|
555
553
|
onHide: O,
|
|
556
|
-
onEnter:
|
|
557
|
-
onEntering:
|
|
554
|
+
onEnter: Xe,
|
|
555
|
+
onEntering: Je,
|
|
558
556
|
onEntered: X,
|
|
559
|
-
onExit:
|
|
557
|
+
onExit: Ye,
|
|
560
558
|
onExiting: he,
|
|
561
|
-
onExited:
|
|
559
|
+
onExited: Qe,
|
|
562
560
|
manager: A(),
|
|
563
|
-
transition: T ?
|
|
564
|
-
backdropTransition: T ?
|
|
565
|
-
renderBackdrop:
|
|
566
|
-
renderDialog:
|
|
561
|
+
transition: T ? Wt : void 0,
|
|
562
|
+
backdropTransition: T ? Ut : void 0,
|
|
563
|
+
renderBackdrop: Ze,
|
|
564
|
+
renderDialog: et
|
|
567
565
|
})
|
|
568
566
|
});
|
|
569
567
|
});
|
|
570
|
-
|
|
571
|
-
const
|
|
572
|
-
Body:
|
|
573
|
-
Header:
|
|
574
|
-
Title:
|
|
575
|
-
Footer:
|
|
576
|
-
Dialog:
|
|
568
|
+
Ve.displayName = "Modal";
|
|
569
|
+
const M = Object.assign(Ve, {
|
|
570
|
+
Body: Pe,
|
|
571
|
+
Header: ze,
|
|
572
|
+
Title: Ge,
|
|
573
|
+
Footer: Ke,
|
|
574
|
+
Dialog: Ne,
|
|
577
575
|
TRANSITION_DURATION: 300,
|
|
578
576
|
BACKDROP_TRANSITION_DURATION: 150
|
|
579
|
-
}),
|
|
580
|
-
const { confirmTexts: t } = ae(
|
|
577
|
+
}), Ht = () => {
|
|
578
|
+
const { confirmTexts: t } = ae(be), { isShown: e, text: n, onFinish: o } = vt(), { options: s } = ae(He), [a, u] = p(""), l = g(() => {
|
|
581
579
|
o(null);
|
|
582
580
|
}, [o]), f = g(() => {
|
|
583
581
|
o(a);
|
|
@@ -592,9 +590,9 @@ const N = Object.assign(qe, {
|
|
|
592
590
|
autoFocus: !0,
|
|
593
591
|
tabIndex: 0
|
|
594
592
|
}), [a]);
|
|
595
|
-
return /* @__PURE__ */ r.jsxs(
|
|
596
|
-
/* @__PURE__ */ r.jsx(
|
|
597
|
-
/* @__PURE__ */ r.jsxs(
|
|
593
|
+
return /* @__PURE__ */ r.jsxs(M, { show: e, size: "sm", centered: !0, onHide: l, children: [
|
|
594
|
+
/* @__PURE__ */ r.jsx(M.Header, { children: /* @__PURE__ */ r.jsx(M.Title, { children: n }) }),
|
|
595
|
+
/* @__PURE__ */ r.jsxs(M.Body, { children: [
|
|
598
596
|
s.input === "textarea" ? /* @__PURE__ */ r.jsx(
|
|
599
597
|
"textarea",
|
|
600
598
|
{
|
|
@@ -604,13 +602,13 @@ const N = Object.assign(qe, {
|
|
|
604
602
|
) : void 0,
|
|
605
603
|
s.input === "input" ? /* @__PURE__ */ r.jsx("input", { ...h, type: s.type }) : void 0
|
|
606
604
|
] }),
|
|
607
|
-
/* @__PURE__ */ r.jsxs(
|
|
605
|
+
/* @__PURE__ */ r.jsxs(M.Footer, { children: [
|
|
608
606
|
/* @__PURE__ */ r.jsx("button", { type: "button", className: "btn btn-secondary", onClick: l, children: t.cancel }),
|
|
609
607
|
/* @__PURE__ */ r.jsx("button", { type: "button", className: "btn btn-primary ml", onClick: f, disabled: s.required && !a, children: t.confirm })
|
|
610
608
|
] })
|
|
611
609
|
] });
|
|
612
|
-
},
|
|
613
|
-
const [e, n] = p(!1), [o, s] = p(""), [a, u] = p({ input: "textarea", type: "text" }), l =
|
|
610
|
+
}, $t = ({ children: t }) => {
|
|
611
|
+
const [e, n] = p(!1), [o, s] = p(""), [a, u] = p({ input: "textarea", type: "text" }), l = j(() => {
|
|
614
612
|
}), f = g((v) => {
|
|
615
613
|
s(v), n(!0), console.log("showprompt");
|
|
616
614
|
}, []), h = g(() => {
|
|
@@ -624,21 +622,21 @@ const N = Object.assign(qe, {
|
|
|
624
622
|
options: a,
|
|
625
623
|
setOptions: u
|
|
626
624
|
}), [e, o, f, h, a]);
|
|
627
|
-
return /* @__PURE__ */ r.jsxs(
|
|
625
|
+
return /* @__PURE__ */ r.jsxs(He.Provider, { value: d, children: [
|
|
628
626
|
t,
|
|
629
|
-
/* @__PURE__ */ r.jsx(
|
|
627
|
+
/* @__PURE__ */ r.jsx(Ht, {})
|
|
630
628
|
] });
|
|
631
|
-
},
|
|
629
|
+
}, Pt = ({ children: t }) => {
|
|
632
630
|
const [e, n] = p(!1), [o, s] = p(""), a = g((f) => {
|
|
633
631
|
n(!0), s(f);
|
|
634
632
|
}, []), u = g(() => {
|
|
635
633
|
n(!1);
|
|
636
634
|
}, []), l = R(() => ({ show: e, text: o, showConfirm: a, hideConfirm: u }), [e, o, a, u]);
|
|
637
|
-
return /* @__PURE__ */ r.jsxs(
|
|
638
|
-
/* @__PURE__ */ r.jsx(
|
|
635
|
+
return /* @__PURE__ */ r.jsxs(ct.Provider, { value: l, children: [
|
|
636
|
+
/* @__PURE__ */ r.jsx(_t, {}),
|
|
639
637
|
t
|
|
640
638
|
] });
|
|
641
|
-
},
|
|
639
|
+
}, Yt = ({ cookieDomain: t, axiosInstance: e, LinkComponent: n, language: o, axiosTexts: s, confirmTexts: a, formValidationTexts: u, homeDashboardTexts: l, formSubmitTexts: f, appSearchTexts: h, children: d }) => {
|
|
642
640
|
const v = R(() => ({
|
|
643
641
|
axiosInstance: e,
|
|
644
642
|
cookieDomain: t,
|
|
@@ -662,22 +660,22 @@ const N = Object.assign(qe, {
|
|
|
662
660
|
f,
|
|
663
661
|
h
|
|
664
662
|
]);
|
|
665
|
-
return /* @__PURE__ */ r.jsx(
|
|
666
|
-
/* @__PURE__ */ r.jsx(
|
|
663
|
+
return /* @__PURE__ */ r.jsx(be.Provider, { value: v, children: /* @__PURE__ */ r.jsx(Pt, { children: /* @__PURE__ */ r.jsxs($t, { children: [
|
|
664
|
+
/* @__PURE__ */ r.jsx(ut, {}),
|
|
667
665
|
d
|
|
668
666
|
] }) }) });
|
|
669
|
-
},
|
|
667
|
+
}, Jt = ({ children: t }) => {
|
|
670
668
|
const [e, n] = p(!1), [o] = p(/* @__PURE__ */ new Set()), s = g((l) => {
|
|
671
669
|
o.add(l), n(!0);
|
|
672
670
|
}, [o]), a = g((l) => {
|
|
673
671
|
o.delete(l), o.size === 0 && n(!1);
|
|
674
672
|
}, [o]), u = R(() => ({ isLoading: e, startLoading: s, stopLoading: a }), [e, s, a]);
|
|
675
|
-
return /* @__PURE__ */ r.jsxs(
|
|
673
|
+
return /* @__PURE__ */ r.jsxs(ft.Provider, { value: u, children: [
|
|
676
674
|
e && /* @__PURE__ */ r.jsx(Et, {}),
|
|
677
675
|
t
|
|
678
676
|
] });
|
|
679
|
-
},
|
|
680
|
-
const e =
|
|
677
|
+
}, Qt = ({ children: t }) => {
|
|
678
|
+
const e = ht(), n = g(() => {
|
|
681
679
|
const d = localStorage.getItem("user") ?? null;
|
|
682
680
|
return d ? JSON.parse(d) : null;
|
|
683
681
|
}, []), [o, s] = p(n()), a = g(async () => {
|
|
@@ -697,11 +695,11 @@ const N = Object.assign(qe, {
|
|
|
697
695
|
}, [u]), h = R(() => ({ user: o, loginUser: l, logoutUser: f }), [o, l, f]);
|
|
698
696
|
return re(() => {
|
|
699
697
|
s(n());
|
|
700
|
-
}, [n]), /* @__PURE__ */ r.jsx(
|
|
701
|
-
},
|
|
702
|
-
const { confirmTexts: t } = ae(
|
|
703
|
-
return /* @__PURE__ */ r.jsx(
|
|
704
|
-
/* @__PURE__ */ r.jsx("div", { className: "mb-5 text-center", children: /* @__PURE__ */ r.jsx(
|
|
698
|
+
}, [n]), /* @__PURE__ */ r.jsx(mt.Provider, { value: h, children: t });
|
|
699
|
+
}, _t = () => {
|
|
700
|
+
const { confirmTexts: t } = ae(be), { onConfirm: e, onCancel: n, text: o, show: s } = yt();
|
|
701
|
+
return /* @__PURE__ */ r.jsx(M, { show: s, size: "sm", centered: !0, onHide: n, children: /* @__PURE__ */ r.jsxs(M.Body, { children: [
|
|
702
|
+
/* @__PURE__ */ r.jsx("div", { className: "mb-5 text-center", children: /* @__PURE__ */ r.jsx(xt, { variant: "h6", children: o }) }),
|
|
705
703
|
/* @__PURE__ */ r.jsxs("div", { className: "w-100 d-flex gap-5", children: [
|
|
706
704
|
/* @__PURE__ */ r.jsx("button", { type: "button", className: "btn btn-secondary w-100", onClick: n, children: t.no }),
|
|
707
705
|
/* @__PURE__ */ r.jsx("button", { type: "button", className: "btn btn-primary w-100 ml", onClick: e, children: t.yes })
|
|
@@ -709,10 +707,10 @@ const N = Object.assign(qe, {
|
|
|
709
707
|
] }) });
|
|
710
708
|
};
|
|
711
709
|
export {
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
710
|
+
ft as LoadingContext,
|
|
711
|
+
Jt as LoadingProvider,
|
|
712
|
+
be as LuminusComponentsContext,
|
|
713
|
+
Yt as LuminusComponentsProvider,
|
|
714
|
+
mt as UserContext,
|
|
715
|
+
Qt as UserProvider
|
|
718
716
|
};
|