react-luminus-components 1.0.0 → 1.0.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/main.es.js CHANGED
@@ -1,12 +1,12 @@
1
- import { j as s, e as N, i as Yt, k as V, h as Lt, L as He } from "./useAxios-BU-BqYrK.mjs";
1
+ import { j as s, e as N, i as Yt, L as ve, k as V, h as Lt } from "./HomeDashboard.module-CuVVnp4t.mjs";
2
2
  import * as x from "react";
3
- import X, { useCallback as $, useState as I, useEffect as P, useRef as R, useReducer as qe, useContext as S, useMemo as ae } from "react";
4
- import { d as Be, u as At, q as Me, L as Ht, M as ie } from "./Modal-_FnSEPRk.mjs";
5
- import { T as ea } from "./Modal-_FnSEPRk.mjs";
6
- import { c as qt, d as Bt, e as Vt, f as _t, g as Gt, u as Qt, m as Xt, h as Kt, w as ve, i as Ut, O as Ve, P as he, T as Jt, j as z } from "./SimpleTooltip-BjlbHsKC.mjs";
7
- import { S as na } from "./SimpleTooltip-BjlbHsKC.mjs";
3
+ import X, { useCallback as $, useState as I, useEffect as P, useContext as S, useRef as R, useReducer as qe, useMemo as ae } from "react";
4
+ import { d as Be, u as At, q as Se, L as Ht, M as ie } from "./Modal-DsY3WNWM.mjs";
5
+ import { T as ea } from "./Modal-DsY3WNWM.mjs";
6
+ import { c as qt, d as Bt, e as Vt, f as _t, g as Gt, u as Qt, m as Xt, h as Kt, w as xe, i as Ut, O as Ve, P as he, T as Jt, j as z } from "./SimpleTooltip-vqBAkdBP.mjs";
7
+ import { S as na } from "./SimpleTooltip-vqBAkdBP.mjs";
8
8
  import { m as zt, a as _e } from "./constants-CzNy5yO3.mjs";
9
- import { h as J, n as E, B as Zt, C as en, p as tn, u as nn, x as rn, q as xe, z as on, v as an, P as ee } from "./hasClass-3JW9Qluf.mjs";
9
+ import { h as J, n as E, B as Zt, C as en, p as tn, u as nn, x as rn, q as je, z as on, v as an, P as ee } from "./hasClass-D3KZs5y_.mjs";
10
10
  const Ro = ({ fileLoader: e, fileName: t, children: n, className: r }) => {
11
11
  const o = $(async () => {
12
12
  var d;
@@ -60,11 +60,11 @@ function Ge(e) {
60
60
  const i = ce(a);
61
61
  return t.getTime() >= o.getTime() ? n + 1 : t.getTime() >= i.getTime() ? n : n - 1;
62
62
  }
63
- function Se(e) {
63
+ function Oe(e) {
64
64
  const t = A(e);
65
65
  return t.setHours(0, 0, 0, 0), t;
66
66
  }
67
- function Oe(e) {
67
+ function Ee(e) {
68
68
  const t = A(e), n = new Date(
69
69
  Date.UTC(
70
70
  t.getFullYear(),
@@ -79,7 +79,7 @@ function Oe(e) {
79
79
  return n.setUTCFullYear(t.getFullYear()), +e - +n;
80
80
  }
81
81
  function ln(e, t) {
82
- const n = Se(e), r = Se(t), o = +n - Oe(n), a = +r - Oe(r);
82
+ const n = Oe(e), r = Oe(t), o = +n - Ee(n), a = +r - Ee(r);
83
83
  return Math.round((o - a) / zt);
84
84
  }
85
85
  function un(e) {
@@ -625,7 +625,7 @@ const Q = {
625
625
  afternoon: "afternoon",
626
626
  evening: "evening",
627
627
  night: "night"
628
- }, Ee = {
628
+ }, Te = {
629
629
  // Era
630
630
  G: function(e, t, n) {
631
631
  const r = e.getFullYear() > 0 ? 1 : 0;
@@ -1051,7 +1051,7 @@ const Q = {
1051
1051
  return "Z";
1052
1052
  switch (t) {
1053
1053
  case "X":
1054
- return Pe(r);
1054
+ return We(r);
1055
1055
  case "XXXX":
1056
1056
  case "XX":
1057
1057
  return U(r);
@@ -1066,7 +1066,7 @@ const Q = {
1066
1066
  const r = e.getTimezoneOffset();
1067
1067
  switch (t) {
1068
1068
  case "x":
1069
- return Pe(r);
1069
+ return We(r);
1070
1070
  case "xxxx":
1071
1071
  case "xx":
1072
1072
  return U(r);
@@ -1083,7 +1083,7 @@ const Q = {
1083
1083
  case "O":
1084
1084
  case "OO":
1085
1085
  case "OOO":
1086
- return "GMT" + Te(r, ":");
1086
+ return "GMT" + Pe(r, ":");
1087
1087
  case "OOOO":
1088
1088
  default:
1089
1089
  return "GMT" + U(r, ":");
@@ -1096,7 +1096,7 @@ const Q = {
1096
1096
  case "z":
1097
1097
  case "zz":
1098
1098
  case "zzz":
1099
- return "GMT" + Te(r, ":");
1099
+ return "GMT" + Pe(r, ":");
1100
1100
  case "zzzz":
1101
1101
  default:
1102
1102
  return "GMT" + U(r, ":");
@@ -1113,18 +1113,18 @@ const Q = {
1113
1113
  return k(r, t.length);
1114
1114
  }
1115
1115
  };
1116
- function Te(e, t = "") {
1116
+ function Pe(e, t = "") {
1117
1117
  const n = e > 0 ? "-" : "+", r = Math.abs(e), o = Math.trunc(r / 60), a = r % 60;
1118
1118
  return a === 0 ? n + String(o) : n + String(o) + t + k(a, 2);
1119
1119
  }
1120
- function Pe(e, t) {
1120
+ function We(e, t) {
1121
1121
  return e % 60 === 0 ? (e > 0 ? "-" : "+") + k(Math.abs(e) / 60, 2) : U(e, t);
1122
1122
  }
1123
1123
  function U(e, t = "") {
1124
1124
  const n = e > 0 ? "-" : "+", r = Math.abs(e), o = k(Math.trunc(r / 60), 2), a = k(r % 60, 2);
1125
1125
  return n + o + t + a;
1126
1126
  }
1127
- const We = (e, t) => {
1127
+ const Ie = (e, t) => {
1128
1128
  switch (e) {
1129
1129
  case "P":
1130
1130
  return t.date({ width: "short" });
@@ -1151,7 +1151,7 @@ const We = (e, t) => {
1151
1151
  }, Jn = (e, t) => {
1152
1152
  const n = e.match(/(P+)(p+)?/) || [], r = n[1], o = n[2];
1153
1153
  if (!o)
1154
- return We(e, t);
1154
+ return Ie(e, t);
1155
1155
  let a;
1156
1156
  switch (r) {
1157
1157
  case "P":
@@ -1168,7 +1168,7 @@ const We = (e, t) => {
1168
1168
  a = t.dateTime({ width: "full" });
1169
1169
  break;
1170
1170
  }
1171
- return a.replace("{{date}}", We(r, t)).replace("{{time}}", Xe(o, t));
1171
+ return a.replace("{{date}}", Ie(r, t)).replace("{{time}}", Xe(o, t));
1172
1172
  }, zn = {
1173
1173
  p: Xe,
1174
1174
  P: Jn
@@ -1207,7 +1207,7 @@ function dr(e, t, n) {
1207
1207
  const p = g[0];
1208
1208
  if (p === "'")
1209
1209
  return { isToken: !1, value: fr(g) };
1210
- if (Ee[p])
1210
+ if (Te[p])
1211
1211
  return { isToken: !0, value: g };
1212
1212
  if (p.match(ur))
1213
1213
  throw new RangeError(
@@ -1226,7 +1226,7 @@ function dr(e, t, n) {
1226
1226
  return g.value;
1227
1227
  const p = g.value;
1228
1228
  (!(n != null && n.useAdditionalWeekYearTokens) && rr(p) || !(n != null && n.useAdditionalDayOfYearTokens) && nr(p)) && or(p, t, String(e));
1229
- const C = Ee[p[0]];
1229
+ const C = Te[p[0]];
1230
1230
  return C(c, p, o.localize, u);
1231
1231
  }).join("");
1232
1232
  }
@@ -1243,7 +1243,7 @@ const Yo = ({ month: e, onChangeMonth: t, locale: n }) => {
1243
1243
  /* @__PURE__ */ s.jsx("div", { children: dr(e, "LLLL yyyy", { locale: n }) }),
1244
1244
  /* @__PURE__ */ s.jsx("button", { type: "button", className: "icon-button", onClick: () => r(1), children: /* @__PURE__ */ s.jsx(Bt, {}) })
1245
1245
  ] });
1246
- }, Ie = ({ onAdd: e }) => /* @__PURE__ */ s.jsx("div", { className: N("luminus-empty-widget", Yt.widget), children: /* @__PURE__ */ s.jsx("button", { type: "button", className: "icon-button", onClick: () => e(0), children: /* @__PURE__ */ s.jsx(Vt, {}) }) }), mr = () => {
1246
+ }, Re = ({ onAdd: e }) => /* @__PURE__ */ s.jsx("div", { className: N("luminus-empty-widget", Yt.widget), children: /* @__PURE__ */ s.jsx("button", { type: "button", className: "icon-button", onClick: () => e(0), children: /* @__PURE__ */ s.jsx(Vt, {}) }) }), mr = () => {
1247
1247
  const [e, t] = I({
1248
1248
  widgets: []
1249
1249
  });
@@ -1255,9 +1255,9 @@ const Yo = ({ month: e, onChangeMonth: t, locale: n }) => {
1255
1255
  t(r), localStorage.setItem("dashboardConfig", JSON.stringify(r));
1256
1256
  }, []);
1257
1257
  return { dashboardConfig: e, onChangeDashboardConfig: n };
1258
- }, Lo = ({ availableWidgets: e, texts: t }) => {
1258
+ }, Lo = ({ availableWidgets: e }) => {
1259
1259
  var h;
1260
- const { dashboardConfig: n, onChangeDashboardConfig: r } = mr(), [o, a] = I(!1), i = $((l, f) => {
1260
+ const { homeDashboardTexts: t } = S(ve), { dashboardConfig: n, onChangeDashboardConfig: r } = mr(), [o, a] = I(!1), i = $((l, f) => {
1261
1261
  var m, w;
1262
1262
  l === ((m = n.widgets) == null ? void 0 : m.length) ? r({
1263
1263
  ...n,
@@ -1285,14 +1285,14 @@ const Yo = ({ month: e, onChangeMonth: t, locale: n }) => {
1285
1285
  /* @__PURE__ */ s.jsx("button", { type: "button", onClick: () => c(f), className: N("icon-button", "color-danger", V.removeIcon), children: /* @__PURE__ */ s.jsx(_t, {}) }),
1286
1286
  /* @__PURE__ */ s.jsx("button", { type: "button", onClick: () => d(f), className: N("icon-button", { "color-danger": m }, { "color-info": !m }, V.fullWidthIcon), children: /* @__PURE__ */ s.jsx(Gt, {}) })
1287
1287
  ] }),
1288
- l.id === -1 ? o && /* @__PURE__ */ s.jsx("div", { className: V.widgetWrapper, children: /* @__PURE__ */ s.jsx(Ie, { onAdd: (w) => i(f, w) }) }) : l.render,
1288
+ l.id === -1 ? o && /* @__PURE__ */ s.jsx("div", { className: V.widgetWrapper, children: /* @__PURE__ */ s.jsx(Re, { onAdd: (w) => i(f, w) }) }) : l.render,
1289
1289
  l.id > -1 && o && /* @__PURE__ */ s.jsx("div", { className: V.widgetEditOverlay })
1290
1290
  ] }, f) : /* @__PURE__ */ s.jsx(s.Fragment, {}), [o, i, c, d]);
1291
1291
  return /* @__PURE__ */ s.jsxs("div", { className: V.dashboard, children: [
1292
1292
  /* @__PURE__ */ s.jsx("div", { className: "mb-3 d-flex align-items-center justify-content-end", children: o ? /* @__PURE__ */ s.jsx("button", { type: "button", onClick: () => a(!1), className: "btn btn-outline-danger", children: t.dashboardEditDone }) : /* @__PURE__ */ s.jsx("button", { type: "button", onClick: () => a(!0), className: "btn btn-outline-primary", children: t.dashboardEdit }) }),
1293
1293
  /* @__PURE__ */ s.jsxs("div", { className: V.widgetsGrid, children: [
1294
1294
  (h = n.widgets) == null ? void 0 : h.map((l, f) => u(e.find((m) => m.id === l.widgetId), f, l.fullWidth)),
1295
- o && /* @__PURE__ */ s.jsx(Ie, { onAdd: (l) => {
1295
+ o && /* @__PURE__ */ s.jsx(Re, { onAdd: (l) => {
1296
1296
  var f;
1297
1297
  return i((f = n.widgets) == null ? void 0 : f.length, l);
1298
1298
  } })
@@ -1319,7 +1319,7 @@ var hr = function(e, t, n, r, o, a, i, c) {
1319
1319
  throw d.framesToPop = 1, d;
1320
1320
  }
1321
1321
  }, gr = hr;
1322
- const Re = /* @__PURE__ */ Lt(gr);
1322
+ const Ye = /* @__PURE__ */ Lt(gr);
1323
1323
  function pr(e, t, n, r = !1) {
1324
1324
  const o = J(n);
1325
1325
  P(() => {
@@ -1339,7 +1339,7 @@ function br(e, t) {
1339
1339
  function yr(e) {
1340
1340
  return !e || e.trim() === "#";
1341
1341
  }
1342
- function je({
1342
+ function ke({
1343
1343
  tagName: e,
1344
1344
  disabled: t,
1345
1345
  href: n,
@@ -1389,7 +1389,7 @@ const Ke = /* @__PURE__ */ x.forwardRef((e, t) => {
1389
1389
  } = e, o = br(e, wr);
1390
1390
  const [a, {
1391
1391
  tagName: i
1392
- }] = je(Object.assign({
1392
+ }] = ke(Object.assign({
1393
1393
  tagName: n,
1394
1394
  disabled: r
1395
1395
  }, o));
@@ -1414,7 +1414,7 @@ const Ue = /* @__PURE__ */ x.forwardRef((e, t) => {
1414
1414
  let {
1415
1415
  onKeyDown: n
1416
1416
  } = e, r = xr(e, vr);
1417
- const [o] = je(Object.assign({
1417
+ const [o] = ke(Object.assign({
1418
1418
  tagName: "a"
1419
1419
  }, r)), a = J((i) => {
1420
1420
  o.onKeyDown(i), n == null || n(i);
@@ -1442,7 +1442,7 @@ const kr = Ue, Je = /* @__PURE__ */ x.forwardRef(({
1442
1442
  }, d) => {
1443
1443
  const u = E(t, "btn"), [h, {
1444
1444
  tagName: l
1445
- }] = je({
1445
+ }] = ke({
1446
1446
  tagName: e,
1447
1447
  disabled: a,
1448
1448
  ...c
@@ -1584,7 +1584,7 @@ function Ze(e = {}) {
1584
1584
  const Pr = {
1585
1585
  usePopper: !0
1586
1586
  };
1587
- function ke(e) {
1587
+ function Ce(e) {
1588
1588
  let {
1589
1589
  children: t
1590
1590
  } = e, n = Er(e, Or);
@@ -1593,8 +1593,8 @@ function ke(e) {
1593
1593
  children: t(r, o)
1594
1594
  });
1595
1595
  }
1596
- ke.displayName = "DropdownMenu";
1597
- ke.defaultProps = Pr;
1596
+ Ce.displayName = "DropdownMenu";
1597
+ Ce.defaultProps = Pr;
1598
1598
  const le = {
1599
1599
  prefix: String(Math.round(Math.random() * 1e10)),
1600
1600
  current: 0
@@ -1643,19 +1643,19 @@ function Vr() {
1643
1643
  const tt = (e) => {
1644
1644
  var t;
1645
1645
  return ((t = e.getAttribute("role")) == null ? void 0 : t.toLowerCase()) === "menu";
1646
- }, Ye = () => {
1646
+ }, Le = () => {
1647
1647
  };
1648
1648
  function nt() {
1649
1649
  const e = Ar(), {
1650
1650
  show: t = !1,
1651
- toggle: n = Ye,
1651
+ toggle: n = Le,
1652
1652
  setToggle: r,
1653
1653
  menuElement: o
1654
1654
  } = S(fe) || {}, a = $((c) => {
1655
1655
  n(!t, c);
1656
1656
  }, [t, n]), i = {
1657
1657
  id: e,
1658
- ref: r || Ye,
1658
+ ref: r || Le,
1659
1659
  onClick: a,
1660
1660
  "aria-expanded": !!t
1661
1661
  };
@@ -1673,7 +1673,7 @@ function rt({
1673
1673
  });
1674
1674
  }
1675
1675
  rt.displayName = "DropdownToggle";
1676
- const _r = /* @__PURE__ */ x.createContext(null), Le = (e, t = null) => e != null ? String(e) : t || null, be = _r, ot = /* @__PURE__ */ x.createContext(null);
1676
+ const _r = /* @__PURE__ */ x.createContext(null), Ae = (e, t = null) => e != null ? String(e) : t || null, be = _r, ot = /* @__PURE__ */ x.createContext(null);
1677
1677
  ot.displayName = "NavContext";
1678
1678
  const Gr = ot, Qr = ["eventKey", "disabled", "onClick", "active", "as"];
1679
1679
  function Xr(e, t) {
@@ -1693,7 +1693,7 @@ function at({
1693
1693
  }) {
1694
1694
  const a = S(be), i = S(Gr), {
1695
1695
  activeKey: c
1696
- } = i || {}, d = Le(e, t), u = n == null && e != null ? Le(c) === d : n;
1696
+ } = i || {}, d = Ae(e, t), u = n == null && e != null ? Ae(c) === d : n;
1697
1697
  return [{
1698
1698
  onClick: J((l) => {
1699
1699
  r || (o == null || o(l), a && !l.isPropagationStopped() && a(d, l));
@@ -1725,7 +1725,7 @@ const st = /* @__PURE__ */ x.forwardRef((e, t) => {
1725
1725
  }, d));
1726
1726
  });
1727
1727
  st.displayName = "DropdownItem";
1728
- function Ae() {
1728
+ function He() {
1729
1729
  const e = Mr(), t = R(null), n = $((r) => {
1730
1730
  t.current = r, e();
1731
1731
  }, [e]);
@@ -1741,7 +1741,7 @@ function se({
1741
1741
  placement: i = "bottom-start",
1742
1742
  children: c
1743
1743
  }) {
1744
- const d = nn(), [u, h] = Fr(t, e, r), [l, f] = Ae(), m = l.current, [w, y] = Ae(), b = w.current, j = At(u), g = R(null), p = R(!1), C = S(be), F = $((v, D, W = D == null ? void 0 : D.type) => {
1744
+ const d = nn(), [u, h] = Fr(t, e, r), [l, f] = He(), m = l.current, [w, y] = He(), b = w.current, j = At(u), g = R(null), p = R(!1), C = S(be), F = $((v, D, W = D == null ? void 0 : D.type) => {
1745
1745
  h(v, {
1746
1746
  originalEvent: D,
1747
1747
  source: W
@@ -1765,7 +1765,7 @@ function se({
1765
1765
  let D = a;
1766
1766
  if (D == null && (D = l.current && tt(l.current) ? "keyboard" : !1), D === !1 || D === "keyboard" && !/^key.+$/.test(v))
1767
1767
  return;
1768
- const W = Me(l.current, o)[0];
1768
+ const W = Se(l.current, o)[0];
1769
1769
  W && W.focus && W.focus();
1770
1770
  });
1771
1771
  P(() => {
@@ -1776,7 +1776,7 @@ function se({
1776
1776
  const M = (v, D) => {
1777
1777
  if (!l.current)
1778
1778
  return null;
1779
- const W = Me(l.current, o);
1779
+ const W = Se(l.current, o);
1780
1780
  let B = W.indexOf(v) + D;
1781
1781
  return B = Math.max(0, Math.min(B, W.length)), W[B];
1782
1782
  };
@@ -1784,8 +1784,8 @@ function se({
1784
1784
  var D, W;
1785
1785
  const {
1786
1786
  key: B
1787
- } = v, K = v.target, $e = (D = l.current) == null ? void 0 : D.contains(K), Rt = (W = w.current) == null ? void 0 : W.contains(K);
1788
- if (/input|textarea/i.test(K.tagName) && (B === " " || B !== "Escape" && $e || B === "Escape" && K.type === "search") || !$e && !Rt || B === "Tab" && (!l.current || !u))
1787
+ } = v, K = v.target, Fe = (D = l.current) == null ? void 0 : D.contains(K), Rt = (W = w.current) == null ? void 0 : W.contains(K);
1788
+ if (/input|textarea/i.test(K.tagName) && (B === " " || B !== "Escape" && Fe || B === "Escape" && K.type === "search") || !Fe && !Rt || B === "Tab" && (!l.current || !u))
1789
1789
  return;
1790
1790
  g.current = v.type;
1791
1791
  const me = {
@@ -1808,8 +1808,8 @@ function se({
1808
1808
  return;
1809
1809
  case "Tab":
1810
1810
  rn(K.ownerDocument, "keyup", (H) => {
1811
- var Fe;
1812
- (H.key === "Tab" && !H.target || !((Fe = l.current) != null && Fe.contains(H.target))) && h(!1, me);
1811
+ var Me;
1812
+ (H.key === "Tab" && !H.target || !((Me = l.current) != null && Me.contains(H.target))) && h(!1, me);
1813
1813
  }, {
1814
1814
  once: !0
1815
1815
  });
@@ -1827,7 +1827,7 @@ function se({
1827
1827
  });
1828
1828
  }
1829
1829
  se.displayName = "Dropdown";
1830
- se.Menu = ke;
1830
+ se.Menu = Ce;
1831
1831
  se.Toggle = rt;
1832
1832
  se.Item = st;
1833
1833
  const it = /* @__PURE__ */ x.createContext({});
@@ -1903,9 +1903,9 @@ function pt(e, t) {
1903
1903
  if (process.env.NODE_ENV === "production")
1904
1904
  return e;
1905
1905
  const n = $((r) => {
1906
- r == null || !r.isReactComponent || (process.env.NODE_ENV !== "production" ? Re(!1, `${t} injected a ref to a provided \`as\` component that resolved to a component instance instead of a DOM element. Use \`React.forwardRef\` to provide the injected ref to the class component as a prop in order to pass it directly to a DOM element`) : Re(!1));
1906
+ r == null || !r.isReactComponent || (process.env.NODE_ENV !== "production" ? Ye(!1, `${t} injected a ref to a provided \`as\` component that resolved to a component instance instead of a DOM element. Use \`React.forwardRef\` to provide the injected ref to the class component as a prop in order to pass it directly to a DOM element`) : Ye(!1));
1907
1907
  }, [t]);
1908
- return xe(n, e);
1908
+ return je(n, e);
1909
1909
  }
1910
1910
  function wt(e, t, n) {
1911
1911
  const r = n ? "top-end" : "top-start", o = n ? "top-start" : "top-end", a = n ? "bottom-end" : "bottom-start", i = n ? "bottom-start" : "bottom-end", c = n ? "right-start" : "left-start", d = n ? "right-end" : "left-end", u = n ? "left-start" : "right-start", h = n ? "left-end" : "right-end";
@@ -1937,7 +1937,7 @@ const bt = /* @__PURE__ */ x.forwardRef(({
1937
1937
  if (n)
1938
1938
  if (typeof n == "object") {
1939
1939
  const v = Object.keys(n);
1940
- if (process.env.NODE_ENV !== "production" && ve(v.length === 1, "There should only be 1 breakpoint when passing an object to `align`"), v.length) {
1940
+ if (process.env.NODE_ENV !== "production" && xe(v.length === 1, "There should only be 1 breakpoint when passing an object to `align`"), v.length) {
1941
1941
  const D = v[0], W = n[D];
1942
1942
  f = W === "start", p.push(`${w}-${D}-${W}`);
1943
1943
  }
@@ -1957,7 +1957,7 @@ const bt = /* @__PURE__ */ x.forwardRef(({
1957
1957
  popperConfig: d,
1958
1958
  placement: C
1959
1959
  });
1960
- if (F.ref = xe(pt(l, "DropdownMenu"), F.ref), on(() => {
1960
+ if (F.ref = je(pt(l, "DropdownMenu"), F.ref), on(() => {
1961
1961
  O && (T == null || T.update());
1962
1962
  }, [O]), !Y && !i && !g)
1963
1963
  return null;
@@ -1989,7 +1989,7 @@ const eo = bt, yt = /* @__PURE__ */ x.forwardRef(({
1989
1989
  const c = E(e, "dropdown-toggle"), d = S(fe);
1990
1990
  r !== void 0 && (a.bsPrefix = r);
1991
1991
  const [u] = nt();
1992
- return u.ref = xe(u.ref, pt(i, "DropdownToggle")), /* @__PURE__ */ s.jsx(o, {
1992
+ return u.ref = je(u.ref, pt(i, "DropdownToggle")), /* @__PURE__ */ s.jsx(o, {
1993
1993
  className: N(n, c, t && `${c}-split`, (d == null ? void 0 : d.show) && "show"),
1994
1994
  ...u,
1995
1995
  ...a
@@ -2063,7 +2063,7 @@ const we = Object.assign(vt, {
2063
2063
  /** Display feedback as a tooltip. */
2064
2064
  tooltip: ee.bool,
2065
2065
  as: ee.elementType
2066
- }, Ce = /* @__PURE__ */ x.forwardRef(
2066
+ }, Ne = /* @__PURE__ */ x.forwardRef(
2067
2067
  // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
2068
2068
  ({
2069
2069
  as: e = "div",
@@ -2077,9 +2077,9 @@ const we = Object.assign(vt, {
2077
2077
  className: N(t, `${n}-${r ? "tooltip" : "feedback"}`)
2078
2078
  })
2079
2079
  );
2080
- Ce.displayName = "Feedback";
2081
- Ce.propTypes = no;
2082
- const xt = Ce, ro = /* @__PURE__ */ x.createContext({}), G = ro, jt = /* @__PURE__ */ x.forwardRef(({
2080
+ Ne.displayName = "Feedback";
2081
+ Ne.propTypes = no;
2082
+ const xt = Ne, ro = /* @__PURE__ */ x.createContext({}), G = ro, jt = /* @__PURE__ */ x.forwardRef(({
2083
2083
  id: e,
2084
2084
  bsPrefix: t,
2085
2085
  className: n,
@@ -2195,7 +2195,7 @@ const ue = Object.assign(Nt, {
2195
2195
  const {
2196
2196
  controlId: m
2197
2197
  } = S(G);
2198
- return e = E(e, "form-control"), process.env.NODE_ENV !== "production" && ve(m == null || !o, "`controlId` is ignored on `<FormControl>` when `id` is specified."), /* @__PURE__ */ s.jsx(h, {
2198
+ return e = E(e, "form-control"), process.env.NODE_ENV !== "production" && xe(m == null || !o, "`controlId` is ignored on `<FormControl>` when `id` is specified."), /* @__PURE__ */ s.jsx(h, {
2199
2199
  ...l,
2200
2200
  type: t,
2201
2201
  size: r,
@@ -2254,7 +2254,7 @@ const Mt = Ft, St = /* @__PURE__ */ x.forwardRef(({
2254
2254
  let u = "col-form-label";
2255
2255
  typeof n == "string" && (u = `${u} ${u}-${n}`);
2256
2256
  const h = N(o, t, r && "visually-hidden", n && u);
2257
- return process.env.NODE_ENV !== "production" && ve(d == null || !a, "`controlId` is ignored on `<FormLabel>` when `htmlFor` is specified."), a = a || d, n ? /* @__PURE__ */ s.jsx($r, {
2257
+ return process.env.NODE_ENV !== "production" && xe(d == null || !a, "`controlId` is ignored on `<FormLabel>` when `htmlFor` is specified."), a = a || d, n ? /* @__PURE__ */ s.jsx($r, {
2258
2258
  ref: c,
2259
2259
  as: "label",
2260
2260
  className: h,
@@ -2369,7 +2369,7 @@ const te = Wt, fo = {
2369
2369
  */
2370
2370
  validated: ee.bool,
2371
2371
  as: ee.elementType
2372
- }, Ne = /* @__PURE__ */ x.forwardRef(({
2372
+ }, De = /* @__PURE__ */ x.forwardRef(({
2373
2373
  className: e,
2374
2374
  validated: t,
2375
2375
  // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
@@ -2380,9 +2380,9 @@ const te = Wt, fo = {
2380
2380
  ref: o,
2381
2381
  className: N(e, t && "was-validated")
2382
2382
  }));
2383
- Ne.displayName = "Form";
2384
- Ne.propTypes = fo;
2385
- const q = Object.assign(Ne, {
2383
+ De.displayName = "Form";
2384
+ De.propTypes = fo;
2385
+ const q = Object.assign(De, {
2386
2386
  Group: Mt,
2387
2387
  Control: oo,
2388
2388
  Floating: ao,
@@ -2501,14 +2501,14 @@ function vo(e, t, n) {
2501
2501
  const qo = ({ label: e, value: t, onChange: n, disabled: r, className: o, type: a }) => /* @__PURE__ */ s.jsx(q.Check, { id: `check-${e}`, type: a ?? "checkbox", label: e ?? "", checked: t, onChange: (i) => {
2502
2502
  var c;
2503
2503
  n && n(((c = i.target) == null ? void 0 : c.checked) ?? !1);
2504
- }, className: o ?? "", disabled: r ?? !1 }), De = ({ withoutLabel: e, label: t, children: n }) => e ? /* @__PURE__ */ s.jsx(s.Fragment, { children: n }) : /* @__PURE__ */ s.jsx(te, { label: t, children: n }), xo = ({ type: e, value: t, onChange: n, label: r, withoutLabel: o, placeholder: a, size: i, disabled: c, showClearIcon: d, clearValue: u, className: h }) => {
2504
+ }, className: o ?? "", disabled: r ?? !1 }), $e = ({ withoutLabel: e, label: t, children: n }) => e ? /* @__PURE__ */ s.jsx(s.Fragment, { children: n }) : /* @__PURE__ */ s.jsx(te, { label: t, children: n }), xo = ({ type: e, value: t, onChange: n, label: r, withoutLabel: o, placeholder: a, size: i, disabled: c, showClearIcon: d, clearValue: u, className: h }) => {
2505
2505
  const l = e === "number", f = $(() => {
2506
2506
  if (!n)
2507
2507
  return;
2508
2508
  const m = u ?? null;
2509
2509
  n(l ? m ? Number(m) : null : (m == null ? void 0 : m.toString()) ?? "");
2510
2510
  }, [u, l, n]);
2511
- return /* @__PURE__ */ s.jsxs(De, { withoutLabel: o ?? !1, label: r ?? "", children: [
2511
+ return /* @__PURE__ */ s.jsxs($e, { withoutLabel: o ?? !1, label: r ?? "", children: [
2512
2512
  /* @__PURE__ */ s.jsx(q.Control, { type: e, placeholder: a ?? r, size: i, value: t ?? "", onChange: (m) => {
2513
2513
  var y;
2514
2514
  if (!n)
@@ -2525,7 +2525,7 @@ const qo = ({ label: e, value: t, onChange: n, disabled: r, className: o, type:
2525
2525
  const f = u ?? null;
2526
2526
  n(a ? f ? Number(f) : null : (f == null ? void 0 : f.toString()) ?? "");
2527
2527
  }, [u, a, n]);
2528
- return /* @__PURE__ */ s.jsxs(De, { withoutLabel: o ?? !1, label: r ?? "", children: [
2528
+ return /* @__PURE__ */ s.jsxs($e, { withoutLabel: o ?? !1, label: r ?? "", children: [
2529
2529
  /* @__PURE__ */ s.jsxs(q.Select, { size: i, value: e ?? "", onChange: (f) => {
2530
2530
  var w;
2531
2531
  if (!n)
@@ -2547,7 +2547,7 @@ const qo = ({ label: e, value: t, onChange: n, disabled: r, className: o, type:
2547
2547
  }, [e]), P(() => {
2548
2548
  t && t(i);
2549
2549
  }, [i, t]), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
2550
- /* @__PURE__ */ s.jsxs(De, { withoutLabel: r ?? !1, label: n ?? "", children: [
2550
+ /* @__PURE__ */ s.jsxs($e, { withoutLabel: r ?? !1, label: n ?? "", children: [
2551
2551
  /* @__PURE__ */ s.jsxs(q.Select, { size: o, value: (i == null ? void 0 : i.id) ?? "", onChange: (l) => c({ id: Number(l.target.value), name: "" }), onMouseDown: (l) => {
2552
2552
  l.currentTarget.focus(), l.preventDefault();
2553
2553
  }, onClick: () => {
@@ -2573,7 +2573,7 @@ const qo = ({ label: e, value: t, onChange: n, disabled: r, className: o, type:
2573
2573
  /* @__PURE__ */ s.jsx("div", { children: e.profession })
2574
2574
  ] })
2575
2575
  ] }), ko = ({ onEmployeeSelected: e }) => {
2576
- const { axiosInstance: t, employeePickerModalTexts: n } = S(He), [r, o] = I(!1), [a, i] = I(""), [c, d] = vo(a, 500), [u, h] = I(null), l = !c, f = $(() => {
2576
+ const { axiosInstance: t, employeePickerModalTexts: n } = S(ve), [r, o] = I(!1), [a, i] = I(""), [c, d] = vo(a, 500), [u, h] = I(null), l = !c, f = $(() => {
2577
2577
  if (l) {
2578
2578
  h(null);
2579
2579
  return;
@@ -2603,7 +2603,7 @@ const qo = ({ label: e, value: t, onChange: n, disabled: r, className: o, type:
2603
2603
  "modal-body": "_modal-body_18hh3_5",
2604
2604
  modalBody: Do
2605
2605
  }, It = ({ show: e, onCancel: t, onEmployeeSelected: n }) => {
2606
- const { employeePickerModalTexts: r } = S(He);
2606
+ const { employeePickerModalTexts: r } = S(ve);
2607
2607
  return /* @__PURE__ */ s.jsxs(ie, { show: e, onHide: () => t(), className: $o.modal, children: [
2608
2608
  /* @__PURE__ */ s.jsx(ie.Header, { closeButton: !0, children: /* @__PURE__ */ s.jsx(ie.Title, { children: r.modalHeader }) }),
2609
2609
  /* @__PURE__ */ s.jsx(ie.Body, { className: "p-0", children: /* @__PURE__ */ s.jsx(ko, { onEmployeeSelected: n }) })
@@ -0,0 +1 @@
1
+ "use strict";const m=require("./HomeDashboard.module-BI8obEZ_.js"),C=require("react");let o;const f=()=>{const{show:e,text:r,showConfirm:s,hideConfirm:t}=C.useContext(m.ConfirmContext),n=()=>{t()};return{confirm:async c=>(s(c),new Promise(i=>{o=i})),onConfirm:()=>{n(),o(!0)},onCancel:()=>{n(),o(!1)},show:e,text:r}};exports.useConfirm=f;
@@ -1,4 +1,4 @@
1
- import { C as i } from "./useAxios-BU-BqYrK.mjs";
1
+ import { C as i } from "./HomeDashboard.module-CuVVnp4t.mjs";
2
2
  import { useContext as C } from "react";
3
3
  let o;
4
4
  const h = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-luminus-components",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Library of React Components reusable in Luminus projects (Fleetman, CAFM)",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1 +0,0 @@
1
- "use strict";const n=require("./useAxios-ZEhq7C_H.js"),o=require("./hasClass-6m1Qq_DA.js"),d=require("react"),Le=require("react-dom");function We(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const a=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,a.get?a:{enumerable:!0,get:()=>t[s]})}}return e.default=t,Object.freeze(e)}const m=We(d),Ie=()=>n.jsxRuntimeExports.jsxs("div",{className:n.classNames("luminus-loading",n.classes.loading),children:[n.jsxRuntimeExports.jsx("div",{className:n.classNames("spinner-grow",n.classes.spinnerGrow,"text-primary"),role:"status"}),n.jsxRuntimeExports.jsx("div",{className:n.classNames("spinner-grow",n.classes.spinnerGrow,"text-primary",n.classes.second),role:"status"}),n.jsxRuntimeExports.jsx("div",{className:n.classNames("spinner-grow",n.classes.spinnerGrow,"text-primary",n.classes.third),role:"status"})]}),_e=({variant:t,className:e,children:s})=>{switch(t){case"h1":return n.jsxRuntimeExports.jsx("h1",{className:n.classNames("luminus-text-primary",n.classes$1.h1,e),children:s});case"h3":return n.jsxRuntimeExports.jsx("h3",{className:n.classNames("luminus-text",n.classes$1.h3,e),children:s});case"h6":return n.jsxRuntimeExports.jsx("h6",{className:n.classNames("luminus-text",n.classes$1.h6,e),children:s});case"subtitle":return n.jsxRuntimeExports.jsx("div",{className:n.classNames("luminus-text",n.classes$1.subtitle,e),children:s});case"body":return n.jsxRuntimeExports.jsx("div",{className:n.classNames("luminus-text",n.classes$1.body,e),children:s});case"body2":return n.jsxRuntimeExports.jsx("div",{className:n.classNames("luminus-text",n.classes$1.body2,e),children:s});case"caption":return n.jsxRuntimeExports.jsx("div",{className:n.classNames("luminus-text-muted",n.classes$1.caption,e),children:s});default:return n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:s})}},He=({variant:t,className:e,children:s})=>n.jsxRuntimeExports.jsx(_e,{variant:t,className:e,children:s}),Ue=t=>m.forwardRef((e,s)=>n.jsxRuntimeExports.jsx("div",{...e,ref:s,className:n.classNames(e.className,t)}));function ye(t){const e=d.useRef(null);return d.useEffect(()=>{e.current=t}),e.current}const Ke={"aria-label":o.PropTypes.string,onClick:o.PropTypes.func,variant:o.PropTypes.oneOf(["white"])},me=m.forwardRef(({className:t,variant:e,"aria-label":s="Close",...a},r)=>n.jsxRuntimeExports.jsx("button",{ref:r,type:"button",className:n.classNames("btn-close",e&&`btn-close-${e}`,t),"aria-label":s,...a}));me.displayName="CloseButton";me.propTypes=Ke;const Ge=me;var qe=Function.prototype.bind.call(Function.prototype.call,[].slice);function j(t,e){return qe(t.querySelectorAll(e))}const Pe="data-rr-ui-";function Re(t){return`${Pe}${t}`}var J;function ge(t){if((!J&&J!==0||t)&&o.canUseDOM){var e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e),J=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return J}function ce(t){t===void 0&&(t=o.ownerDocument());try{var e=t.activeElement;return!e||!e.nodeName?null:e}catch{return t.body}}function ze(t=document){const e=t.defaultView;return Math.abs(e.innerWidth-t.documentElement.clientWidth)}const xe=Re("modal-open");class Ve{constructor({ownerDocument:e,handleContainerOverflow:s=!0,isRTL:a=!1}={}){this.handleContainerOverflow=s,this.isRTL=a,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return ze(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const s={overflow:"hidden"},a=this.isRTL?"paddingLeft":"paddingRight",r=this.getElement();e.style={overflow:r.style.overflow,[a]:r.style[a]},e.scrollBarWidth&&(s[a]=`${parseInt(o.style(r,a)||"0",10)+e.scrollBarWidth}px`),r.setAttribute(xe,""),o.style(r,s)}reset(){[...this.modals].forEach(e=>this.remove(e))}removeContainerStyle(e){const s=this.getElement();s.removeAttribute(xe),Object.assign(s.style,e.style)}add(e){let s=this.modals.indexOf(e);return s!==-1||(s=this.modals.length,this.modals.push(e),this.setModalAttributes(e),s!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),s}remove(e){const s=this.modals.indexOf(e);s!==-1&&(this.modals.splice(s,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}}const fe=Ve,Xe=["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"];function Ye(t,e){if(t==null)return{};var s={},a=Object.keys(t),r,l;for(l=0;l<a.length;l++)r=a[l],!(e.indexOf(r)>=0)&&(s[r]=t[r]);return s}let de;function Je(t){return de||(de=new fe({ownerDocument:t==null?void 0:t.document})),de}function Qe(t){const e=o.useWindow(),s=t||Je(e),a=d.useRef({dialog:null,backdrop:null});return Object.assign(a.current,{add:()=>s.add(a.current),remove:()=>s.remove(a.current),isTopModal:()=>s.isTopModal(a.current),setDialogRef:d.useCallback(r=>{a.current.dialog=r},[]),setBackdropRef:d.useCallback(r=>{a.current.backdrop=r},[])})}const ve=d.forwardRef((t,e)=>{let{show:s=!1,role:a="dialog",className:r,style:l,children:E,backdrop:p=!0,keyboard:y=!0,onBackdropClick:N,onEscapeKeyDown:h,transition:S,runTransition:R,backdropTransition:b,runBackdropTransition:Q,autoFocus:_=!0,enforceFocus:Z=!0,restoreFocus:T=!0,restoreFocusOptions:ee,renderDialog:H,renderBackdrop:te=c=>n.jsxRuntimeExports.jsx("div",Object.assign({},c)),manager:se,container:ne,onShow:U,onHide:D=()=>{},onExit:oe,onExited:$,onExiting:K,onEnter:G,onEntering:q,onEntered:P}=t,ae=Ye(t,Xe);const g=o.useWindow(),M=o.useWaitForDOMRef(ne),u=Qe(se),re=o.useMounted(),z=ye(s),[v,w]=d.useState(!s),f=d.useRef(null);d.useImperativeHandle(e,()=>u,[u]),o.canUseDOM&&!z&&s&&(f.current=ce(g==null?void 0:g.document)),s&&v&&w(!1);const x=o.useEventCallback(()=>{if(u.add(),C.current=o.listen(document,"keydown",le),L.current=o.listen(document,"focus",()=>setTimeout(ie),!0),U&&U(),_){var c,Y;const I=ce((c=(Y=u.dialog)==null?void 0:Y.ownerDocument)!=null?c:g==null?void 0:g.document);u.dialog&&I&&!o.contains(u.dialog,I)&&(f.current=I,u.dialog.focus())}}),F=o.useEventCallback(()=>{if(u.remove(),C.current==null||C.current(),L.current==null||L.current(),T){var c;(c=f.current)==null||c.focus==null||c.focus(ee),f.current=null}});d.useEffect(()=>{!s||!M||x()},[s,M,x]),d.useEffect(()=>{v&&F()},[v,F]),o.useWillUnmount(()=>{F()});const ie=o.useEventCallback(()=>{if(!Z||!re()||!u.isTopModal())return;const c=ce(g==null?void 0:g.document);u.dialog&&c&&!o.contains(u.dialog,c)&&u.dialog.focus()}),V=o.useEventCallback(c=>{c.target===c.currentTarget&&(N==null||N(c),p===!0&&D())}),le=o.useEventCallback(c=>{y&&o.isEscKey(c)&&u.isTopModal()&&(h==null||h(c),c.defaultPrevented||D())}),L=d.useRef(),C=d.useRef(),X=(...c)=>{w(!0),$==null||$(...c)};if(!M)return null;const k=Object.assign({role:a,ref:u.setDialogRef,"aria-modal":a==="dialog"?!0:void 0},ae,{style:l,className:r,tabIndex:-1});let W=H?H(k):n.jsxRuntimeExports.jsx("div",Object.assign({},k,{children:m.cloneElement(E,{role:"document"})}));W=o.renderTransition(S,R,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!s,onExit:oe,onExiting:K,onExited:X,onEnter:G,onEntering:q,onEntered:P,children:W});let O=null;return p&&(O=te({ref:u.setBackdropRef,onClick:V}),O=o.renderTransition(b,Q,{in:!!s,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:O})),n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:Le.createPortal(n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[O,W]}),M)})});ve.displayName="Modal";const Ze=Object.assign(ve,{Manager:fe});function et(t,e){t.classList?t.classList.add(e):o.hasClass(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function Ee(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function tt(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=Ee(t.className,e):t.setAttribute("class",Ee(t.className&&t.className.baseVal||"",e))}const A={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class st extends fe{adjustAndStore(e,s,a){const r=s.style[e];s.dataset[e]=r,o.style(s,{[e]:`${parseFloat(o.style(s,e))+a}px`})}restore(e,s){const a=s.dataset[e];a!==void 0&&(delete s.dataset[e],o.style(s,{[e]:a}))}setContainerStyle(e){super.setContainerStyle(e);const s=this.getElement();if(et(s,"modal-open"),!e.scrollBarWidth)return;const a=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";j(s,A.FIXED_CONTENT).forEach(l=>this.adjustAndStore(a,l,e.scrollBarWidth)),j(s,A.STICKY_CONTENT).forEach(l=>this.adjustAndStore(r,l,-e.scrollBarWidth)),j(s,A.NAVBAR_TOGGLER).forEach(l=>this.adjustAndStore(r,l,e.scrollBarWidth))}removeContainerStyle(e){super.removeContainerStyle(e);const s=this.getElement();tt(s,"modal-open");const a=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";j(s,A.FIXED_CONTENT).forEach(l=>this.restore(a,l)),j(s,A.STICKY_CONTENT).forEach(l=>this.restore(r,l)),j(s,A.NAVBAR_TOGGLER).forEach(l=>this.restore(r,l))}}let ue;function nt(t){return ue||(ue=new st(t)),ue}const je=m.forwardRef(({className:t,bsPrefix:e,as:s="div",...a},r)=>(e=o.useBootstrapPrefix(e,"modal-body"),n.jsxRuntimeExports.jsx(s,{ref:r,className:n.classNames(t,e),...a})));je.displayName="ModalBody";const ot=je,at=m.createContext({onHide(){}}),Ne=at,be=m.forwardRef(({bsPrefix:t,className:e,contentClassName:s,centered:a,size:r,fullscreen:l,children:E,scrollable:p,...y},N)=>{t=o.useBootstrapPrefix(t,"modal");const h=`${t}-dialog`,S=typeof l=="string"?`${t}-fullscreen-${l}`:`${t}-fullscreen`;return n.jsxRuntimeExports.jsx("div",{...y,ref:N,className:n.classNames(h,e,r&&`${t}-${r}`,a&&`${h}-centered`,p&&`${h}-scrollable`,l&&S),children:n.jsxRuntimeExports.jsx("div",{className:n.classNames(`${t}-content`,s),children:E})})});be.displayName="ModalDialog";const Te=be,Me=m.forwardRef(({className:t,bsPrefix:e,as:s="div",...a},r)=>(e=o.useBootstrapPrefix(e,"modal-footer"),n.jsxRuntimeExports.jsx(s,{ref:r,className:n.classNames(t,e),...a})));Me.displayName="ModalFooter";const rt=Me,it=m.forwardRef(({closeLabel:t="Close",closeVariant:e,closeButton:s=!1,onHide:a,children:r,...l},E)=>{const p=d.useContext(Ne),y=o.useEventCallback(()=>{p==null||p.onHide(),a==null||a()});return n.jsxRuntimeExports.jsxs("div",{ref:E,...l,children:[r,s&&n.jsxRuntimeExports.jsx(Ge,{"aria-label":t,variant:e,onClick:y})]})}),lt=it,we=m.forwardRef(({bsPrefix:t,className:e,closeLabel:s="Close",closeButton:a=!1,...r},l)=>(t=o.useBootstrapPrefix(t,"modal-header"),n.jsxRuntimeExports.jsx(lt,{ref:l,...r,className:n.classNames(e,t),closeLabel:s,closeButton:a})));we.displayName="ModalHeader";const ct=we,dt=Ue("h4"),Ce=m.forwardRef(({className:t,bsPrefix:e,as:s=dt,...a},r)=>(e=o.useBootstrapPrefix(e,"modal-title"),n.jsxRuntimeExports.jsx(s,{ref:r,className:n.classNames(t,e),...a})));Ce.displayName="ModalTitle";const ut=Ce;function mt(t){return n.jsxRuntimeExports.jsx(o.Fade,{...t,timeout:null})}function ft(t){return n.jsxRuntimeExports.jsx(o.Fade,{...t,timeout:null})}const ke=m.forwardRef(({bsPrefix:t,className:e,style:s,dialogClassName:a,contentClassName:r,children:l,dialogAs:E=Te,"data-bs-theme":p,"aria-labelledby":y,"aria-describedby":N,"aria-label":h,show:S=!1,animation:R=!0,backdrop:b=!0,keyboard:Q=!0,onEscapeKeyDown:_,onShow:Z,onHide:T,container:ee,autoFocus:H=!0,enforceFocus:te=!0,restoreFocus:se=!0,restoreFocusOptions:ne,onEntered:U,onExit:D,onExiting:oe,onEnter:$,onEntering:K,onExited:G,backdropClassName:q,manager:P,...ae},g)=>{const[M,u]=d.useState({}),[re,z]=d.useState(!1),v=d.useRef(!1),w=d.useRef(!1),f=d.useRef(null),[x,F]=o.useCallbackRef(),ie=o.useMergedRefs(g,F),V=o.useEventCallback(T),le=o.useIsRTL();t=o.useBootstrapPrefix(t,"modal");const L=d.useMemo(()=>({onHide:V}),[V]);function C(){return P||nt({isRTL:le})}function X(i){if(!o.canUseDOM)return;const B=C().getScrollbarWidth()>0,he=i.scrollHeight>o.ownerDocument(i).documentElement.clientHeight;u({paddingRight:B&&!he?ge():void 0,paddingLeft:!B&&he?ge():void 0})}const k=o.useEventCallback(()=>{x&&X(x.dialog)});o.useWillUnmount(()=>{o.removeEventListener(window,"resize",k),f.current==null||f.current()});const W=()=>{v.current=!0},O=i=>{v.current&&x&&i.target===x.dialog&&(w.current=!0),v.current=!1},c=()=>{z(!0),f.current=o.transitionEnd(x.dialog,()=>{z(!1)})},Y=i=>{i.target===i.currentTarget&&c()},I=i=>{if(b==="static"){Y(i);return}if(w.current||i.target!==i.currentTarget){w.current=!1;return}T==null||T()},Oe=i=>{Q?_==null||_(i):(i.preventDefault(),b==="static"&&c())},Be=(i,B)=>{i&&X(i),$==null||$(i,B)},Ae=i=>{f.current==null||f.current(),D==null||D(i)},Se=(i,B)=>{K==null||K(i,B),o.addEventListener(window,"resize",k)},De=i=>{i&&(i.style.display=""),G==null||G(i),o.removeEventListener(window,"resize",k)},$e=d.useCallback(i=>n.jsxRuntimeExports.jsx("div",{...i,className:n.classNames(`${t}-backdrop`,q,!R&&"show")}),[R,q,t]),pe={...s,...M};pe.display="block";const Fe=i=>n.jsxRuntimeExports.jsx("div",{role:"dialog",...i,style:pe,className:n.classNames(e,t,re&&`${t}-static`,!R&&"show"),onClick:b?I:void 0,onMouseUp:O,"data-bs-theme":p,"aria-label":h,"aria-labelledby":y,"aria-describedby":N,children:n.jsxRuntimeExports.jsx(E,{...ae,onMouseDown:W,className:a,contentClassName:r,children:l})});return n.jsxRuntimeExports.jsx(Ne.Provider,{value:L,children:n.jsxRuntimeExports.jsx(Ze,{show:S,ref:ie,backdrop:b,container:ee,keyboard:!0,autoFocus:H,enforceFocus:te,restoreFocus:se,restoreFocusOptions:ne,onEscapeKeyDown:Oe,onShow:Z,onHide:T,onEnter:Be,onEntering:Se,onEntered:U,onExit:Ae,onExiting:oe,onExited:De,manager:C(),transition:R?mt:void 0,backdropTransition:R?ft:void 0,renderBackdrop:$e,renderDialog:Fe})})});ke.displayName="Modal";const pt=Object.assign(ke,{Body:ot,Header:ct,Title:ut,Footer:rt,Dialog:Te,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150});exports.Loading=Ie;exports.Modal=pt;exports.Typography=He;exports.dataAttr=Re;exports.qsa=j;exports.usePrevious=ye;