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.
@@ -1,15 +1,15 @@
1
- import { j as r, c as w, e as ye, f as be, o as Fe, s as G, g as Ie, h as nt, i as ot, k as E, l as Re, m as ke, n as De, p as st, r as Oe, q as rt, t as W, v as at, w as it, x as lt, y as Se, F as $e, z as dt, A as ct, L as Ee, P as We, C as ut, I as ft, B as ht, b as mt, U as gt } from "./UserAvatarToggle-CIQXhmcN.js";
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 pt, useState as p, useRef as M, useImperativeHandle as vt, useEffect as re, useCallback as g, useContext as ae, useMemo as R } from "react";
4
- import { a as yt, u as xt } from "./useConfirm-C_gZ96ka.js";
5
- import { T as wt } from "./Typography-PSv7V5A1.js";
6
- import { d as Ct, u as bt, q as D, L as Et } from "./DataKey-CPc1_-be.js";
7
- import Mt from "react-dom";
8
- const Tt = (t) => /* @__PURE__ */ y.forwardRef((e, n) => /* @__PURE__ */ r.jsx("div", {
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
- })), jt = {
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
- }, Me = /* @__PURE__ */ y.forwardRef(({
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
- Me.displayName = "CloseButton";
36
- Me.propTypes = jt;
37
- const Nt = Me;
35
+ je.displayName = "CloseButton";
36
+ je.propTypes = Tt;
38
37
  var se;
39
- function Be(t) {
40
- if ((!se && se !== 0 || t) && be) {
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 Rt(t = document) {
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 Ae = Ct("modal-open");
60
- class kt {
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 Rt(this.ownerDocument);
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(Ae, ""), G(s, n);
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(Ae), Object.assign(n.style, e.style);
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 Te = kt, Ot = ["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"];
110
- function St(t, e) {
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 Bt(t) {
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 At(t) {
125
- const e = Ie(), n = t || Bt(e), o = M({
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 He = /* @__PURE__ */ pt((t, e) => {
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: U,
167
+ onExited: $,
169
168
  onExiting: Y,
170
169
  onEnter: J,
171
170
  onEntering: Q,
172
171
  onEntered: Z
173
- } = t, me = St(t, Ot);
174
- const C = Ie(), S = nt(fe), m = At(ue), ge = ot(), ee = bt(n), [j, B] = p(!n), x = M(null);
175
- vt(e, () => m, [m]), be && !ee && n && (x.current = xe(C == null ? void 0 : C.document)), n && j && B(!1);
176
- const b = E(() => {
177
- if (m.add(), A.current = Re(document, "keydown", ve), _.current = Re(
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 && !ke(m.dialog, z) && (x.current = z, m.dialog.focus());
186
+ m.dialog && z && !Oe(m.dialog, z) && (x.current = z, m.dialog.focus());
188
187
  }
189
- }), P = E(() => {
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 || b();
195
+ !n || !S || E();
197
196
  }, [
198
197
  n,
199
198
  S,
200
199
  /* should never change: */
201
- b
200
+ E
202
201
  ]), re(() => {
203
- j && P();
204
- }, [j, P]), De(() => {
202
+ N && P();
203
+ }, [N, P]), We(() => {
205
204
  P();
206
205
  });
207
- const pe = E(() => {
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 && !ke(m.dialog, c) && m.dialog.focus();
212
- }), te = E((c) => {
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 = E((c) => {
215
- f && st(c) && m.isTopModal() && (d == null || d(c), c.defaultPrevented || H());
216
- }), _ = M(), A = M(), ne = (...c) => {
217
- B(!0), U == null || U(...c);
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 = Oe(v, T, {
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 F = null;
250
- return l && (F = ce({
248
+ let I = null;
249
+ return l && (I = ce({
251
250
  ref: m.setBackdropRef,
252
251
  onClick: te
253
- }), F = Oe(k, ie, {
252
+ }), I = Se(k, ie, {
254
253
  in: !!n,
255
254
  appear: !0,
256
255
  mountOnEnter: !0,
257
256
  unmountOnExit: !0,
258
- children: F
257
+ children: I
259
258
  })), /* @__PURE__ */ r.jsx(r.Fragment, {
260
- children: /* @__PURE__ */ Mt.createPortal(/* @__PURE__ */ r.jsxs(r.Fragment, {
261
- children: [F, K]
259
+ children: /* @__PURE__ */ bt.createPortal(/* @__PURE__ */ r.jsxs(r.Fragment, {
260
+ children: [I, K]
262
261
  }), S)
263
262
  });
264
263
  });
265
- He.displayName = "Modal";
266
- const Lt = Object.assign(He, {
264
+ $e.displayName = "Modal";
265
+ const St = Object.assign($e, {
267
266
  Manager: Te
268
267
  });
269
- function Ft(t, e) {
270
- t.classList ? t.classList.add(e) : rt(t, e) || (typeof t.className == "string" ? t.className = t.className + " " + e : t.setAttribute("class", (t.className && t.className.baseVal || "") + " " + 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 Le(t, e) {
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 It(t, e) {
276
- t.classList ? t.classList.remove(e) : typeof t.className == "string" ? t.className = Le(t.className, e) : t.setAttribute("class", Le(t.className && t.className.baseVal || "", e));
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 Dt extends Te {
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 (Ft(n, "modal-open"), !e.scrollBarWidth)
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, $.FIXED_CONTENT).forEach((a) => this.adjustAndStore(o, a, e.scrollBarWidth)), D(n, $.STICKY_CONTENT).forEach((a) => this.adjustAndStore(s, a, -e.scrollBarWidth)), D(n, $.NAVBAR_TOGGLER).forEach((a) => this.adjustAndStore(s, a, e.scrollBarWidth));
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
- It(n, "modal-open");
306
+ At(n, "modal-open");
308
307
  const o = this.isRTL ? "paddingLeft" : "paddingRight", s = this.isRTL ? "marginLeft" : "marginRight";
309
- D(n, $.FIXED_CONTENT).forEach((a) => this.restore(o, a)), D(n, $.STICKY_CONTENT).forEach((a) => this.restore(s, a)), D(n, $.NAVBAR_TOGGLER).forEach((a) => this.restore(s, a));
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 $t(t) {
314
- return Ce || (Ce = new Dt(t)), Ce;
312
+ function It(t) {
313
+ return Ce || (Ce = new Lt(t)), Ce;
315
314
  }
316
- const Ue = /* @__PURE__ */ y.forwardRef(({
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 = W(e, "modal-body"), /* @__PURE__ */ r.jsx(n, {
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
- Ue.displayName = "ModalBody";
327
- const Wt = Ue, Ht = /* @__PURE__ */ y.createContext({
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
- }), Pe = Ht, _e = /* @__PURE__ */ y.forwardRef(({
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 = W(t, "modal");
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
- _e.displayName = "ModalDialog";
355
- const Ke = _e, ze = /* @__PURE__ */ y.forwardRef(({
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 = W(e, "modal-footer"), /* @__PURE__ */ r.jsx(n, {
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
- ze.displayName = "ModalFooter";
366
- const Ut = ze, Pt = /* @__PURE__ */ y.forwardRef(({
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(Pe), f = E(() => {
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(Nt, {
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
- }), _t = Pt, Ge = /* @__PURE__ */ y.forwardRef(({
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 = W(t, "modal-header"), /* @__PURE__ */ r.jsx(_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
- Ge.displayName = "ModalHeader";
400
- const Kt = Ge, zt = Tt("h4"), Ve = /* @__PURE__ */ y.forwardRef(({
398
+ ze.displayName = "ModalHeader";
399
+ const Dt = jt("h4"), Ge = /* @__PURE__ */ y.forwardRef(({
401
400
  className: t,
402
401
  bsPrefix: e,
403
- as: n = zt,
402
+ as: n = Dt,
404
403
  ...o
405
- }, s) => (e = W(e, "modal-title"), /* @__PURE__ */ r.jsx(n, {
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
- Ve.displayName = "ModalTitle";
411
- const Gt = Ve;
412
- function Vt(t) {
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 qt(t) {
419
- return /* @__PURE__ */ r.jsx($e, {
416
+ function Ut(t) {
417
+ return /* @__PURE__ */ r.jsx(Ue, {
420
418
  ...t,
421
419
  timeout: null
422
420
  });
423
421
  }
424
- const qe = /* @__PURE__ */ y.forwardRef(({
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 = Ke,
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: U,
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), j = M(!1), B = M(!1), x = M(null), [b, P] = at(), pe = it(C, P), te = E(O), ve = lt();
460
- t = W(t, "modal");
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 || $t({
463
+ return Z || It({
466
464
  isRTL: ve
467
465
  });
468
466
  }
469
467
  function ne(i) {
470
- if (!be)
468
+ if (!Ee)
471
469
  return;
472
- const I = A().getScrollbarWidth() > 0, Ne = i.scrollHeight > Fe(i).documentElement.clientHeight;
470
+ const F = A().getScrollbarWidth() > 0, Re = i.scrollHeight > Fe(i).documentElement.clientHeight;
473
471
  m({
474
- paddingRight: I && !Ne ? Be() : void 0,
475
- paddingLeft: !I && Ne ? Be() : void 0
472
+ paddingRight: F && !Re ? Ae() : void 0,
473
+ paddingLeft: !F && Re ? Ae() : void 0
476
474
  });
477
475
  }
478
- const L = E(() => {
479
- b && ne(b.dialog);
476
+ const L = b(() => {
477
+ E && ne(E.dialog);
480
478
  });
481
- De(() => {
482
- Se(window, "resize", L), x.current == null || x.current();
479
+ We(() => {
480
+ Be(window, "resize", L), x.current == null || x.current();
483
481
  });
484
482
  const K = () => {
485
- j.current = !0;
486
- }, F = (i) => {
487
- j.current && b && i.target === b.dialog && (B.current = !0), j.current = !1;
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 = ct(b.dialog, () => {
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
- }, Xe = (i) => {
502
+ }, qe = (i) => {
505
503
  ie ? V == null || V(i) : (i.preventDefault(), k === "static" && c());
506
- }, Ye = (i, I) => {
507
- i && ne(i), U == null || U(i, I);
508
- }, Je = (i) => {
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
- }, Qe = (i, I) => {
511
- Y == null || Y(i, I), dt(window, "resize", L);
512
- }, Ze = (i) => {
513
- i && (i.style.display = ""), J == null || J(i), Se(window, "resize", L);
514
- }, et = g((i) => /* @__PURE__ */ r.jsx("div", {
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]), je = {
515
+ }), [T, Q, t]), Me = {
518
516
  ...n,
519
517
  ...S
520
518
  };
521
- je.display = "block";
522
- const tt = (i) => /* @__PURE__ */ r.jsx("div", {
519
+ Me.display = "block";
520
+ const et = (i) => /* @__PURE__ */ r.jsx("div", {
523
521
  role: "dialog",
524
522
  ...i,
525
- style: je,
523
+ style: Me,
526
524
  className: w(e, t, ge && `${t}-static`, !T && "show"),
527
525
  onClick: k ? z : void 0,
528
- onMouseUp: F,
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(Pe.Provider, {
539
+ return /* @__PURE__ */ r.jsx(_e.Provider, {
542
540
  value: _,
543
- children: /* @__PURE__ */ r.jsx(Lt, {
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: Xe,
551
+ onEscapeKeyDown: qe,
554
552
  onShow: le,
555
553
  onHide: O,
556
- onEnter: Ye,
557
- onEntering: Qe,
554
+ onEnter: Xe,
555
+ onEntering: Je,
558
556
  onEntered: X,
559
- onExit: Je,
557
+ onExit: Ye,
560
558
  onExiting: he,
561
- onExited: Ze,
559
+ onExited: Qe,
562
560
  manager: A(),
563
- transition: T ? Vt : void 0,
564
- backdropTransition: T ? qt : void 0,
565
- renderBackdrop: et,
566
- renderDialog: tt
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
- qe.displayName = "Modal";
571
- const N = Object.assign(qe, {
572
- Body: Wt,
573
- Header: Kt,
574
- Title: Gt,
575
- Footer: Ut,
576
- Dialog: Ke,
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
- }), Xt = () => {
580
- const { confirmTexts: t } = ae(Ee), { isShown: e, text: n, onFinish: o } = yt(), { options: s } = ae(We), [a, u] = p(""), l = g(() => {
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(N, { show: e, size: "sm", centered: !0, onHide: l, children: [
596
- /* @__PURE__ */ r.jsx(N.Header, { children: /* @__PURE__ */ r.jsx(N.Title, { children: n }) }),
597
- /* @__PURE__ */ r.jsxs(N.Body, { children: [
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(N.Footer, { children: [
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
- }, Yt = ({ children: t }) => {
613
- const [e, n] = p(!1), [o, s] = p(""), [a, u] = p({ input: "textarea", type: "text" }), l = M(() => {
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(We.Provider, { value: d, children: [
625
+ return /* @__PURE__ */ r.jsxs(He.Provider, { value: d, children: [
628
626
  t,
629
- /* @__PURE__ */ r.jsx(Xt, {})
627
+ /* @__PURE__ */ r.jsx(Ht, {})
630
628
  ] });
631
- }, Jt = ({ children: t }) => {
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(ut.Provider, { value: l, children: [
638
- /* @__PURE__ */ r.jsx(Qt, {}),
635
+ return /* @__PURE__ */ r.jsxs(ct.Provider, { value: l, children: [
636
+ /* @__PURE__ */ r.jsx(_t, {}),
639
637
  t
640
638
  ] });
641
- }, rn = ({ cookieDomain: t, axiosInstance: e, LinkComponent: n, language: o, axiosTexts: s, confirmTexts: a, formValidationTexts: u, homeDashboardTexts: l, formSubmitTexts: f, appSearchTexts: h, children: d }) => {
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(Ee.Provider, { value: v, children: /* @__PURE__ */ r.jsx(Jt, { children: /* @__PURE__ */ r.jsxs(Yt, { children: [
666
- /* @__PURE__ */ r.jsx(ft, {}),
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
- }, an = ({ children: t }) => {
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(ht.Provider, { value: u, children: [
673
+ return /* @__PURE__ */ r.jsxs(ft.Provider, { value: u, children: [
676
674
  e && /* @__PURE__ */ r.jsx(Et, {}),
677
675
  t
678
676
  ] });
679
- }, ln = ({ children: t }) => {
680
- const e = mt(), n = g(() => {
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(gt.Provider, { value: h, children: t });
701
- }, Qt = () => {
702
- const { confirmTexts: t } = ae(Ee), { onConfirm: e, onCancel: n, text: o, show: s } = xt();
703
- return /* @__PURE__ */ r.jsx(N, { show: s, size: "sm", centered: !0, onHide: n, children: /* @__PURE__ */ r.jsxs(N.Body, { children: [
704
- /* @__PURE__ */ r.jsx("div", { className: "mb-5 text-center", children: /* @__PURE__ */ r.jsx(wt, { variant: "h6", children: o }) }),
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
- ht as LoadingContext,
713
- an as LoadingProvider,
714
- Ee as LuminusComponentsContext,
715
- rn as LuminusComponentsProvider,
716
- gt as UserContext,
717
- ln as UserProvider
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
  };