react-luminus-components 1.3.31 → 1.3.33

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.
Files changed (133) hide show
  1. package/README.md +349 -355
  2. package/dist/.vite/manifest.json +64 -64
  3. package/dist/FromToDatePickerDropdownToggle-BcOIaLyQ.cjs +253 -0
  4. package/dist/{FromToDatePickerDropdownToggle-a6zb7EV7.js → FromToDatePickerDropdownToggle-CGnDN_zs.js} +2949 -3196
  5. package/dist/PrimaryButton-B6qFyVVD.js +680 -0
  6. package/dist/PrimaryButton-Dow_5lBe.cjs +1 -0
  7. package/dist/SimpleTooltip-B0I1MS-L.js +5 -0
  8. package/dist/{SimpleTooltip-ngcscCjg.cjs → SimpleTooltip-CpLiAgNs.cjs} +1 -1
  9. package/dist/components/Buttons/ContextButton/ContextButton.d.ts +0 -1
  10. package/dist/components/Buttons/ContextButton/FileUploadContextButton.d.ts +0 -1
  11. package/dist/components/Buttons/IconButton/IconButton.d.ts +0 -1
  12. package/dist/components/Buttons/PrimaryButton/PrimaryButton.d.ts +0 -1
  13. package/dist/components/Dropdown/Dropdown.d.ts +0 -1
  14. package/dist/components/Dropdown/comps/DropdownItem/DropdownItem.d.ts +0 -1
  15. package/dist/components/Dropdown/comps/DropdownItem/FileUploadDropdownItem.d.ts +0 -1
  16. package/dist/components/Dropdown/comps/DropdownToggle/DropdownToggle.d.ts +0 -1
  17. package/dist/components/Dropdown/comps/SimpleToggle/SimpleToggle.d.ts +3 -3
  18. package/dist/components/Form/CheckInput/CheckInput.d.ts +0 -1
  19. package/dist/components/Form/DropdownPicker/DropdownPicker.d.ts +0 -1
  20. package/dist/components/Form/NumericStepperInput/NumericStepperInput.d.ts +0 -1
  21. package/dist/components/Form/SelectInput/SelectInput.d.ts +0 -1
  22. package/dist/components/Form/TextAreaInput/TextAreaInput.d.ts +0 -1
  23. package/dist/components/Form/TextInput/TextInput.d.ts +0 -1
  24. package/dist/components/HookForm/CheckInput/HookFormCheckInput.d.ts +0 -1
  25. package/dist/components/HookForm/CustomSelectInput/CustomSelectInput.d.ts +0 -1
  26. package/dist/components/HookForm/FileInput/HookFormFileInput.d.ts +0 -1
  27. package/dist/components/HookForm/NumericStepperInput/HookFormNumericStepperInput.d.ts +0 -1
  28. package/dist/components/HookForm/RadioInput/HookFormRadioInput.d.ts +0 -1
  29. package/dist/components/HookForm/SelectInput/HookFormSelectInput.d.ts +0 -1
  30. package/dist/components/HookForm/TextAreaInput/HookFormTextAreaInput.d.ts +0 -1
  31. package/dist/components/HookForm/TextInput/HookFormTextInput.d.ts +0 -1
  32. package/dist/components/InputContainers/FloatingLabelInput/FloatingLabelInput.d.ts +20 -21
  33. package/dist/components/InputContainers/InputAnchorContainer/InputAnchorContainer.d.ts +0 -1
  34. package/dist/components/InputContainers/NoInputContainer/NoInputContainer.d.ts +20 -21
  35. package/dist/components/InputContainers/RowLabelInput/RowLabelInput.d.ts +20 -21
  36. package/dist/components/Layout/MessageBoard/components/MessageList/MessageList.d.ts +0 -1
  37. package/dist/components/Layout/MessageBoard/components/MessageList/comps/MessageFilters/MessageFilters.d.ts +0 -1
  38. package/dist/components/Layout/MessageBoard/components/MessageList/comps/MessageItem/MessageItem.d.ts +0 -1
  39. package/dist/components/NewTabs/Tab/Tab.d.ts +5 -5
  40. package/dist/components/NewTabs/TabPanel/TabPanel.d.ts +0 -1
  41. package/dist/components/NewTabs/Tabs/Tabs.d.ts +7 -7
  42. package/dist/components/Tabs/Tabs.d.ts +0 -1
  43. package/dist/components/Tabs/comps/Tab/Tab.d.ts +0 -1
  44. package/dist/components/UserAvatar/AvatarIcon/AvatarIcon.d.ts +0 -1
  45. package/dist/components/common/Alert/Alert.d.ts +0 -1
  46. package/dist/components/common/AlertItem/AlertItem.d.ts +0 -1
  47. package/dist/components/common/AppSearch/AppSearch.d.ts +0 -1
  48. package/dist/components/common/AppSearch/comps/AutocompleteWindow/AutocompleteWindow.d.ts +0 -1
  49. package/dist/components/common/Backdrop/Backdrop.d.ts +0 -1
  50. package/dist/components/common/Badge/Badge.d.ts +0 -1
  51. package/dist/components/common/Card/Card.d.ts +0 -1
  52. package/dist/components/common/Collapse/Collapse.d.ts +0 -1
  53. package/dist/components/common/ConfirmDialog/ConfirmDialog.d.ts +0 -1
  54. package/dist/components/common/FloatingActionContainer/FloatingActionContainer.d.ts +0 -1
  55. package/dist/components/common/HomeDashboard/HomeDashboard.d.ts +0 -1
  56. package/dist/components/common/HomeDashboard/comps/FreeSpaceWidget/FreeSpaceWidget.d.ts +0 -1
  57. package/dist/components/common/HomeDashboard/comps/WidgetPicker/WidgetPicker.d.ts +0 -1
  58. package/dist/components/common/ImgApi/ImgApi.d.ts +0 -1
  59. package/dist/components/common/ImgApi/hooks/useGetImgData.d.ts +0 -1
  60. package/dist/components/common/ImgDirect/ImgDirect.d.ts +0 -1
  61. package/dist/components/common/InvalidFeedback/InvalidFeedback.d.ts +0 -1
  62. package/dist/components/common/Loading/Loading.d.ts +0 -1
  63. package/dist/components/common/MonthPicker/MonthPicker.d.ts +0 -1
  64. package/dist/components/common/PhotoLibrary/PhotoLibrary.d.ts +0 -1
  65. package/dist/components/common/PhotoLightbox/PhotoLightbox.d.ts +0 -1
  66. package/dist/components/common/PromptDialog/PromptDialog.d.ts +0 -1
  67. package/dist/components/common/Timeline/Timeline.d.ts +0 -1
  68. package/dist/components/common/Typography/Typography.d.ts +0 -1
  69. package/dist/components/common/VersionInfo/VersionInfo.d.ts +0 -1
  70. package/dist/components/common/YearPicker/YearPicker.d.ts +0 -1
  71. package/dist/contexts/auth/AuthContext.d.ts +0 -1
  72. package/dist/contexts/auth/AuthProvider.d.ts +0 -1
  73. package/dist/contexts/confirm/ConfirmContext.d.ts +0 -1
  74. package/dist/contexts/confirm/ConfirmProvider.d.ts +0 -1
  75. package/dist/contexts/delegation/DelegationProvider.d.ts +0 -1
  76. package/dist/contexts/loading/LoadingContext.d.ts +0 -1
  77. package/dist/contexts/loading/LoadingProvider.d.ts +0 -1
  78. package/dist/contexts/luminus-components/LuminusComponentsContext.d.ts +1 -15
  79. package/dist/contexts/luminus-components/LuminusComponentsProvider.d.ts +2 -16
  80. package/dist/contexts/prompt/PromptContext.d.ts +0 -1
  81. package/dist/contexts/user/UserContext.d.ts +0 -1
  82. package/dist/contexts/user/UserProvider.d.ts +0 -1
  83. package/dist/contexts.cjs.js +1 -1
  84. package/dist/contexts.d.ts +10 -27
  85. package/dist/contexts.es.js +184 -337
  86. package/dist/{dateUtils-D5PdELhi.js → dateUtils-Bc53BdYm.js} +11 -21
  87. package/dist/{dateUtils-CIDS0n5B.cjs → dateUtils-Y_XPaYyg.cjs} +1 -1
  88. package/dist/hooks/useFormControlType/useFormControlType.d.ts +1 -1
  89. package/dist/hooks/useGetApiData/useGetApiData.d.ts +0 -1
  90. package/dist/hooks/useLocalStorageState/useLocalStorageState.d.ts +0 -1
  91. package/dist/hooks/useNotifications/useNotifications.d.ts +1 -1
  92. package/dist/hooks.cjs.js +1 -1
  93. package/dist/hooks.d.ts +3 -5
  94. package/dist/hooks.es.js +46 -44
  95. package/dist/layout/FullScreenContainer/FullScreenContainer.d.ts +0 -1
  96. package/dist/layout/MainContainer/MainContainer.d.ts +0 -1
  97. package/dist/layout/SideMenu/MenuItem/MenuItem.d.ts +0 -1
  98. package/dist/layout/SideMenu/SideMenu.d.ts +0 -1
  99. package/dist/layout/TopBar/TopBar.d.ts +0 -1
  100. package/dist/layout.cjs.js +1 -1
  101. package/dist/layout.d.ts +0 -2
  102. package/dist/layout.es.js +95 -96
  103. package/dist/main.cjs.js +1 -1
  104. package/dist/main.es.js +2062 -2455
  105. package/dist/models/prop-types/InputContainerProps.d.ts +0 -1
  106. package/dist/models/prop-types/InputProps/DropdownPickerProps.d.ts +0 -1
  107. package/dist/models/prop-types/InputProps/TextInputProps.d.ts +0 -1
  108. package/dist/models/texts/ComponentsContextTexts.d.ts +18 -0
  109. package/dist/models/types/MenuItemType.d.ts +0 -1
  110. package/dist/models/types/PhotoAction.d.ts +0 -1
  111. package/dist/models/types/TimelineStep.d.ts +0 -1
  112. package/dist/{searchUtils-CEjMiULh.js → searchUtils-kismAHZM.js} +1 -1
  113. package/dist/{searchUtils-9_EWs2V9.cjs → searchUtils-qxu0IgEU.cjs} +1 -1
  114. package/dist/style.css +1 -1
  115. package/dist/{useFormControlType-oJGqgThz.js → useFormControlType-BAFqxupC.js} +3 -3
  116. package/dist/useLocalStorageState-BxKcArKF.cjs +1 -0
  117. package/dist/useLocalStorageState-HYmARj_B.js +76 -0
  118. package/dist/usePermissions-Dl5tlwwt.js +17 -0
  119. package/dist/usePermissions-yx-0zHae.cjs +1 -0
  120. package/dist/utils/bnfValueFormat/bnfValueFormat.d.ts +0 -1
  121. package/dist/utils.cjs.js +1 -1
  122. package/dist/utils.d.ts +0 -2
  123. package/dist/utils.es.js +55 -53
  124. package/dist/variables.scss +171 -171
  125. package/package.json +106 -106
  126. package/dist/FromToDatePickerDropdownToggle-EhHpHC9A.cjs +0 -253
  127. package/dist/PrimaryButton-BbKMePCv.js +0 -718
  128. package/dist/PrimaryButton-ugYzKlak.cjs +0 -1
  129. package/dist/SimpleTooltip-Boktzm98.js +0 -5
  130. package/dist/useLocalStorageState-CT8xepqa.cjs +0 -1
  131. package/dist/useLocalStorageState-DkeM8Y6R.js +0 -74
  132. package/dist/usePermissions-BkVAe1PL.cjs +0 -1
  133. package/dist/usePermissions-Dh1Sgbd7.js +0 -15
@@ -0,0 +1,680 @@
1
+ import { j as r, c as d, P as D, M as tt, v as R, J as nt, ar as Ee, as as Se, o as V, G as $e, at as ot, au as st, w as T, av as xe, aw as je, ax as Le, ay as at, az as _e, aA as rt, A as it, I as lt, L as dt, aB as Oe, F as De, H as ct, aC as ut } from "./FromToDatePickerDropdownToggle-CGnDN_zs.js";
2
+ import * as u from "react";
3
+ import { useRef as N, useEffect as we, useContext as Ie, forwardRef as ft, useState as ve, useImperativeHandle as mt, useCallback as be, useMemo as gt } from "react";
4
+ import ht from "react-dom";
5
+ import { Link as pt } from "react-router-dom";
6
+ const yt = "_loading_rgybp_1", wt = "_spinner-grow_rgybp_10", vt = "_second_rgybp_14", bt = "_third_rgybp_17", Et = "_loadingBlock_rgybp_21", F = {
7
+ loading: yt,
8
+ "spinner-grow": "_spinner-grow_rgybp_10",
9
+ spinnerGrow: wt,
10
+ second: vt,
11
+ third: bt,
12
+ loadingBlock: Et
13
+ }, Zt = () => /* @__PURE__ */ r.jsxs("div", { className: d("luminus-loading", F.loading), children: [
14
+ /* @__PURE__ */ r.jsx("div", { className: d("spinner-grow", F.spinnerGrow, "text-primary"), role: "status" }),
15
+ /* @__PURE__ */ r.jsx("div", { className: d("spinner-grow", F.spinnerGrow, "text-primary", F.second), role: "status" }),
16
+ /* @__PURE__ */ r.jsx("div", { className: d("spinner-grow", F.spinnerGrow, "text-primary", F.third), role: "status" })
17
+ ] }), Tt = (t) => /* @__PURE__ */ u.forwardRef((e, n) => /* @__PURE__ */ r.jsx("div", {
18
+ ...e,
19
+ ref: n,
20
+ className: d(e.className, t)
21
+ }));
22
+ function Nt(t) {
23
+ const e = N(null);
24
+ return we(() => {
25
+ e.current = t;
26
+ }), e.current;
27
+ }
28
+ const Mt = {
29
+ /** An accessible label indicating the relevant information about the Close Button. */
30
+ "aria-label": D.string,
31
+ /** A callback fired after the Close Button is clicked. */
32
+ onClick: D.func,
33
+ /**
34
+ * Render different color variant for the button.
35
+ *
36
+ * Omitting this will render the default dark color.
37
+ */
38
+ variant: D.oneOf(["white"])
39
+ }, Te = /* @__PURE__ */ u.forwardRef(({
40
+ className: t,
41
+ variant: e,
42
+ "aria-label": n = "Close",
43
+ ...o
44
+ }, s) => /* @__PURE__ */ r.jsx("button", {
45
+ ref: s,
46
+ type: "button",
47
+ className: d("btn-close", e && `btn-close-${e}`, t),
48
+ "aria-label": n,
49
+ ...o
50
+ }));
51
+ Te.displayName = "CloseButton";
52
+ Te.propTypes = Mt;
53
+ var Ct = Function.prototype.bind.call(Function.prototype.call, [].slice);
54
+ function S(t, e) {
55
+ return Ct(t.querySelectorAll(e));
56
+ }
57
+ const Rt = "data-rr-ui-";
58
+ function kt(t) {
59
+ return `${Rt}${t}`;
60
+ }
61
+ const xt = {
62
+ /**
63
+ * Specify whether the feedback is for valid or invalid fields
64
+ *
65
+ * @type {('valid'|'invalid')}
66
+ */
67
+ type: D.string,
68
+ /** Display feedback as a tooltip. */
69
+ tooltip: D.bool,
70
+ as: D.elementType
71
+ }, Ne = /* @__PURE__ */ u.forwardRef(
72
+ // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
73
+ ({
74
+ as: t = "div",
75
+ className: e,
76
+ type: n = "valid",
77
+ tooltip: o = !1,
78
+ ...s
79
+ }, a) => /* @__PURE__ */ r.jsx(t, {
80
+ ...s,
81
+ ref: a,
82
+ className: d(e, `${n}-${o ? "tooltip" : "feedback"}`)
83
+ })
84
+ );
85
+ Ne.displayName = "Feedback";
86
+ Ne.propTypes = xt;
87
+ const We = /* @__PURE__ */ u.forwardRef(({
88
+ bsPrefix: t,
89
+ type: e,
90
+ size: n,
91
+ htmlSize: o,
92
+ id: s,
93
+ className: a,
94
+ isValid: h = !1,
95
+ isInvalid: f = !1,
96
+ plaintext: p,
97
+ readOnly: v,
98
+ // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
99
+ as: m = "input",
100
+ ...M
101
+ }, y) => {
102
+ const {
103
+ controlId: w
104
+ } = Ie(tt);
105
+ return t = R(t, "form-control"), process.env.NODE_ENV !== "production" && nt(w == null || !s, "`controlId` is ignored on `<FormControl>` when `id` is specified."), /* @__PURE__ */ r.jsx(m, {
106
+ ...M,
107
+ type: e,
108
+ size: o,
109
+ ref: y,
110
+ readOnly: v,
111
+ id: s || w,
112
+ className: d(a, p ? `${t}-plaintext` : t, n && `${t}-${n}`, e === "color" && `${t}-color`, h && "is-valid", f && "is-invalid")
113
+ });
114
+ });
115
+ We.displayName = "FormControl";
116
+ const Pt = Object.assign(We, {
117
+ Feedback: Ne
118
+ });
119
+ var oe;
120
+ function Be(t) {
121
+ if ((!oe && oe !== 0 || t) && Ee) {
122
+ var e = document.createElement("div");
123
+ e.style.position = "absolute", e.style.top = "-9999px", e.style.width = "50px", e.style.height = "50px", e.style.overflow = "scroll", document.body.appendChild(e), oe = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
124
+ }
125
+ return oe;
126
+ }
127
+ function he(t) {
128
+ t === void 0 && (t = Se());
129
+ try {
130
+ var e = t.activeElement;
131
+ return !e || !e.nodeName ? null : e;
132
+ } catch {
133
+ return t.body;
134
+ }
135
+ }
136
+ function jt(t = document) {
137
+ const e = t.defaultView;
138
+ return Math.abs(e.innerWidth - t.documentElement.clientWidth);
139
+ }
140
+ const Ae = kt("modal-open");
141
+ class Me {
142
+ constructor({
143
+ ownerDocument: e,
144
+ handleContainerOverflow: n = !0,
145
+ isRTL: o = !1
146
+ } = {}) {
147
+ this.handleContainerOverflow = n, this.isRTL = o, this.modals = [], this.ownerDocument = e;
148
+ }
149
+ getScrollbarWidth() {
150
+ return jt(this.ownerDocument);
151
+ }
152
+ getElement() {
153
+ return (this.ownerDocument || document).body;
154
+ }
155
+ setModalAttributes(e) {
156
+ }
157
+ removeModalAttributes(e) {
158
+ }
159
+ setContainerStyle(e) {
160
+ const n = {
161
+ overflow: "hidden"
162
+ }, o = this.isRTL ? "paddingLeft" : "paddingRight", s = this.getElement();
163
+ e.style = {
164
+ overflow: s.style.overflow,
165
+ [o]: s.style[o]
166
+ }, e.scrollBarWidth && (n[o] = `${parseInt(V(s, o) || "0", 10) + e.scrollBarWidth}px`), s.setAttribute(Ae, ""), V(s, n);
167
+ }
168
+ reset() {
169
+ [...this.modals].forEach((e) => this.remove(e));
170
+ }
171
+ removeContainerStyle(e) {
172
+ const n = this.getElement();
173
+ n.removeAttribute(Ae), Object.assign(n.style, e.style);
174
+ }
175
+ add(e) {
176
+ let n = this.modals.indexOf(e);
177
+ return n !== -1 || (n = this.modals.length, this.modals.push(e), this.setModalAttributes(e), n !== 0) || (this.state = {
178
+ scrollBarWidth: this.getScrollbarWidth(),
179
+ style: {}
180
+ }, this.handleContainerOverflow && this.setContainerStyle(this.state)), n;
181
+ }
182
+ remove(e) {
183
+ const n = this.modals.indexOf(e);
184
+ n !== -1 && (this.modals.splice(n, 1), !this.modals.length && this.handleContainerOverflow && this.removeContainerStyle(this.state), this.removeModalAttributes(e));
185
+ }
186
+ isTopModal(e) {
187
+ return !!this.modals.length && this.modals[this.modals.length - 1] === e;
188
+ }
189
+ }
190
+ const _t = ["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"];
191
+ function Ot(t, e) {
192
+ if (t == null) return {};
193
+ var n = {}, o = Object.keys(t), s, a;
194
+ for (a = 0; a < o.length; a++)
195
+ s = o[a], !(e.indexOf(s) >= 0) && (n[s] = t[s]);
196
+ return n;
197
+ }
198
+ let pe;
199
+ function Bt(t) {
200
+ return pe || (pe = new Me({
201
+ ownerDocument: t == null ? void 0 : t.document
202
+ })), pe;
203
+ }
204
+ function At(t) {
205
+ const e = $e(), n = t || Bt(e), o = N({
206
+ dialog: null,
207
+ backdrop: null
208
+ });
209
+ return Object.assign(o.current, {
210
+ add: () => n.add(o.current),
211
+ remove: () => n.remove(o.current),
212
+ isTopModal: () => n.isTopModal(o.current),
213
+ setDialogRef: be((s) => {
214
+ o.current.dialog = s;
215
+ }, []),
216
+ setBackdropRef: be((s) => {
217
+ o.current.backdrop = s;
218
+ }, [])
219
+ });
220
+ }
221
+ const He = /* @__PURE__ */ ft((t, e) => {
222
+ let {
223
+ show: n = !1,
224
+ role: o = "dialog",
225
+ className: s,
226
+ style: a,
227
+ children: h,
228
+ backdrop: f = !0,
229
+ keyboard: p = !0,
230
+ onBackdropClick: v,
231
+ onEscapeKeyDown: m,
232
+ transition: M,
233
+ runTransition: y,
234
+ backdropTransition: w,
235
+ runBackdropTransition: se,
236
+ autoFocus: z = !0,
237
+ enforceFocus: ae = !0,
238
+ restoreFocus: k = !0,
239
+ restoreFocusOptions: re,
240
+ renderDialog: X,
241
+ renderBackdrop: ie = (l) => /* @__PURE__ */ r.jsx("div", Object.assign({}, l)),
242
+ manager: le,
243
+ container: de,
244
+ onShow: q,
245
+ onHide: I = () => {
246
+ },
247
+ onExit: ce,
248
+ onExited: W,
249
+ onExiting: Y,
250
+ onEnter: J,
251
+ onEntering: Q,
252
+ onEntered: Z
253
+ } = t, ue = Ot(t, _t);
254
+ const b = $e(), x = ot(de), c = At(le), fe = st(), P = Nt(n), [C, j] = ve(!n), g = N(null);
255
+ mt(e, () => c, [c]), Ee && !P && n && (g.current = he(b == null ? void 0 : b.document)), n && C && j(!1);
256
+ const E = T(() => {
257
+ if (c.add(), _.current = xe(document, "keydown", ge), G.current = xe(
258
+ document,
259
+ "focus",
260
+ // the timeout is necessary b/c this will run before the new modal is mounted
261
+ // and so steals focus from it
262
+ () => setTimeout(me),
263
+ !0
264
+ ), q && q(), z) {
265
+ var l, ne;
266
+ const U = he((l = (ne = c.dialog) == null ? void 0 : ne.ownerDocument) != null ? l : b == null ? void 0 : b.document);
267
+ c.dialog && U && !je(c.dialog, U) && (g.current = U, c.dialog.focus());
268
+ }
269
+ }), H = T(() => {
270
+ if (c.remove(), _.current == null || _.current(), G.current == null || G.current(), k) {
271
+ var l;
272
+ (l = g.current) == null || l.focus == null || l.focus(re), g.current = null;
273
+ }
274
+ });
275
+ we(() => {
276
+ !n || !x || E();
277
+ }, [
278
+ n,
279
+ x,
280
+ /* should never change: */
281
+ E
282
+ ]), we(() => {
283
+ C && H();
284
+ }, [C, H]), Le(() => {
285
+ H();
286
+ });
287
+ const me = T(() => {
288
+ if (!ae || !fe() || !c.isTopModal())
289
+ return;
290
+ const l = he(b == null ? void 0 : b.document);
291
+ c.dialog && l && !je(c.dialog, l) && c.dialog.focus();
292
+ }), ee = T((l) => {
293
+ l.target === l.currentTarget && (v == null || v(l), f === !0 && I());
294
+ }), ge = T((l) => {
295
+ p && at(l) && c.isTopModal() && (m == null || m(l), l.defaultPrevented || I());
296
+ }), G = N(), _ = N(), te = (...l) => {
297
+ j(!0), W == null || W(...l);
298
+ };
299
+ if (!x)
300
+ return null;
301
+ const O = Object.assign({
302
+ role: o,
303
+ ref: c.setDialogRef,
304
+ // apparently only works on the dialog role element
305
+ "aria-modal": o === "dialog" ? !0 : void 0
306
+ }, ue, {
307
+ style: a,
308
+ className: s,
309
+ tabIndex: -1
310
+ });
311
+ let K = X ? X(O) : /* @__PURE__ */ r.jsx("div", Object.assign({}, O, {
312
+ children: /* @__PURE__ */ u.cloneElement(h, {
313
+ role: "document"
314
+ })
315
+ }));
316
+ K = _e(M, y, {
317
+ unmountOnExit: !0,
318
+ mountOnEnter: !0,
319
+ appear: !0,
320
+ in: !!n,
321
+ onExit: ce,
322
+ onExiting: Y,
323
+ onExited: te,
324
+ onEnter: J,
325
+ onEntering: Q,
326
+ onEntered: Z,
327
+ children: K
328
+ });
329
+ let B = null;
330
+ return f && (B = ie({
331
+ ref: c.setBackdropRef,
332
+ onClick: ee
333
+ }), B = _e(w, se, {
334
+ in: !!n,
335
+ appear: !0,
336
+ mountOnEnter: !0,
337
+ unmountOnExit: !0,
338
+ children: B
339
+ })), /* @__PURE__ */ r.jsx(r.Fragment, {
340
+ children: /* @__PURE__ */ ht.createPortal(/* @__PURE__ */ r.jsxs(r.Fragment, {
341
+ children: [B, K]
342
+ }), x)
343
+ });
344
+ });
345
+ He.displayName = "Modal";
346
+ const Ft = Object.assign(He, {
347
+ Manager: Me
348
+ });
349
+ function St(t, e) {
350
+ 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));
351
+ }
352
+ function Fe(t, e) {
353
+ return t.replace(new RegExp("(^|\\s)" + e + "(?:\\s|$)", "g"), "$1").replace(/\s+/g, " ").replace(/^\s*|\s*$/g, "");
354
+ }
355
+ function $t(t, e) {
356
+ t.classList ? t.classList.remove(e) : typeof t.className == "string" ? t.className = Fe(t.className, e) : t.setAttribute("class", Fe(t.className && t.className.baseVal || "", e));
357
+ }
358
+ const $ = {
359
+ FIXED_CONTENT: ".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",
360
+ STICKY_CONTENT: ".sticky-top",
361
+ NAVBAR_TOGGLER: ".navbar-toggler"
362
+ };
363
+ class Lt extends Me {
364
+ adjustAndStore(e, n, o) {
365
+ const s = n.style[e];
366
+ n.dataset[e] = s, V(n, {
367
+ [e]: `${parseFloat(V(n, e)) + o}px`
368
+ });
369
+ }
370
+ restore(e, n) {
371
+ const o = n.dataset[e];
372
+ o !== void 0 && (delete n.dataset[e], V(n, {
373
+ [e]: o
374
+ }));
375
+ }
376
+ setContainerStyle(e) {
377
+ super.setContainerStyle(e);
378
+ const n = this.getElement();
379
+ if (St(n, "modal-open"), !e.scrollBarWidth) return;
380
+ const o = this.isRTL ? "paddingLeft" : "paddingRight", s = this.isRTL ? "marginLeft" : "marginRight";
381
+ S(n, $.FIXED_CONTENT).forEach((a) => this.adjustAndStore(o, a, e.scrollBarWidth)), S(n, $.STICKY_CONTENT).forEach((a) => this.adjustAndStore(s, a, -e.scrollBarWidth)), S(n, $.NAVBAR_TOGGLER).forEach((a) => this.adjustAndStore(s, a, e.scrollBarWidth));
382
+ }
383
+ removeContainerStyle(e) {
384
+ super.removeContainerStyle(e);
385
+ const n = this.getElement();
386
+ $t(n, "modal-open");
387
+ const o = this.isRTL ? "paddingLeft" : "paddingRight", s = this.isRTL ? "marginLeft" : "marginRight";
388
+ S(n, $.FIXED_CONTENT).forEach((a) => this.restore(o, a)), S(n, $.STICKY_CONTENT).forEach((a) => this.restore(s, a)), S(n, $.NAVBAR_TOGGLER).forEach((a) => this.restore(s, a));
389
+ }
390
+ }
391
+ let ye;
392
+ function Dt(t) {
393
+ return ye || (ye = new Lt(t)), ye;
394
+ }
395
+ const Ge = /* @__PURE__ */ u.forwardRef(({
396
+ className: t,
397
+ bsPrefix: e,
398
+ as: n = "div",
399
+ ...o
400
+ }, s) => (e = R(e, "modal-body"), /* @__PURE__ */ r.jsx(n, {
401
+ ref: s,
402
+ className: d(t, e),
403
+ ...o
404
+ })));
405
+ Ge.displayName = "ModalBody";
406
+ const Ke = /* @__PURE__ */ u.createContext({
407
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
408
+ onHide() {
409
+ }
410
+ }), Ce = /* @__PURE__ */ u.forwardRef(({
411
+ bsPrefix: t,
412
+ className: e,
413
+ contentClassName: n,
414
+ centered: o,
415
+ size: s,
416
+ fullscreen: a,
417
+ children: h,
418
+ scrollable: f,
419
+ ...p
420
+ }, v) => {
421
+ t = R(t, "modal");
422
+ const m = `${t}-dialog`, M = typeof a == "string" ? `${t}-fullscreen-${a}` : `${t}-fullscreen`;
423
+ return /* @__PURE__ */ r.jsx("div", {
424
+ ...p,
425
+ ref: v,
426
+ className: d(m, e, s && `${t}-${s}`, o && `${m}-centered`, f && `${m}-scrollable`, a && M),
427
+ children: /* @__PURE__ */ r.jsx("div", {
428
+ className: d(`${t}-content`, n),
429
+ children: h
430
+ })
431
+ });
432
+ });
433
+ Ce.displayName = "ModalDialog";
434
+ const Ue = /* @__PURE__ */ u.forwardRef(({
435
+ className: t,
436
+ bsPrefix: e,
437
+ as: n = "div",
438
+ ...o
439
+ }, s) => (e = R(e, "modal-footer"), /* @__PURE__ */ r.jsx(n, {
440
+ ref: s,
441
+ className: d(t, e),
442
+ ...o
443
+ })));
444
+ Ue.displayName = "ModalFooter";
445
+ const It = /* @__PURE__ */ u.forwardRef(({
446
+ closeLabel: t = "Close",
447
+ closeVariant: e,
448
+ closeButton: n = !1,
449
+ onHide: o,
450
+ children: s,
451
+ ...a
452
+ }, h) => {
453
+ const f = Ie(Ke), p = T(() => {
454
+ f == null || f.onHide(), o == null || o();
455
+ });
456
+ return /* @__PURE__ */ r.jsxs("div", {
457
+ ref: h,
458
+ ...a,
459
+ children: [s, n && /* @__PURE__ */ r.jsx(Te, {
460
+ "aria-label": t,
461
+ variant: e,
462
+ onClick: p
463
+ })]
464
+ });
465
+ }), Ve = /* @__PURE__ */ u.forwardRef(({
466
+ bsPrefix: t,
467
+ className: e,
468
+ closeLabel: n = "Close",
469
+ closeButton: o = !1,
470
+ ...s
471
+ }, a) => (t = R(t, "modal-header"), /* @__PURE__ */ r.jsx(It, {
472
+ ref: a,
473
+ ...s,
474
+ className: d(e, t),
475
+ closeLabel: n,
476
+ closeButton: o
477
+ })));
478
+ Ve.displayName = "ModalHeader";
479
+ const Wt = Tt("h4"), ze = /* @__PURE__ */ u.forwardRef(({
480
+ className: t,
481
+ bsPrefix: e,
482
+ as: n = Wt,
483
+ ...o
484
+ }, s) => (e = R(e, "modal-title"), /* @__PURE__ */ r.jsx(n, {
485
+ ref: s,
486
+ className: d(t, e),
487
+ ...o
488
+ })));
489
+ ze.displayName = "ModalTitle";
490
+ function Ht(t) {
491
+ return /* @__PURE__ */ r.jsx(De, {
492
+ ...t,
493
+ timeout: null
494
+ });
495
+ }
496
+ function Gt(t) {
497
+ return /* @__PURE__ */ r.jsx(De, {
498
+ ...t,
499
+ timeout: null
500
+ });
501
+ }
502
+ const Xe = /* @__PURE__ */ u.forwardRef(({
503
+ bsPrefix: t,
504
+ className: e,
505
+ style: n,
506
+ dialogClassName: o,
507
+ contentClassName: s,
508
+ children: a,
509
+ dialogAs: h = Ce,
510
+ "data-bs-theme": f,
511
+ "aria-labelledby": p,
512
+ "aria-describedby": v,
513
+ "aria-label": m,
514
+ /* BaseModal props */
515
+ show: M = !1,
516
+ animation: y = !0,
517
+ backdrop: w = !0,
518
+ keyboard: se = !0,
519
+ onEscapeKeyDown: z,
520
+ onShow: ae,
521
+ onHide: k,
522
+ container: re,
523
+ autoFocus: X = !0,
524
+ enforceFocus: ie = !0,
525
+ restoreFocus: le = !0,
526
+ restoreFocusOptions: de,
527
+ onEntered: q,
528
+ onExit: I,
529
+ onExiting: ce,
530
+ onEnter: W,
531
+ onEntering: Y,
532
+ onExited: J,
533
+ backdropClassName: Q,
534
+ manager: Z,
535
+ ...ue
536
+ }, b) => {
537
+ const [x, c] = ve({}), [fe, P] = ve(!1), C = N(!1), j = N(!1), g = N(null), [E, H] = it(), me = lt(b, H), ee = T(k), ge = dt();
538
+ t = R(t, "modal");
539
+ const G = gt(() => ({
540
+ onHide: ee
541
+ }), [ee]);
542
+ function _() {
543
+ return Z || Dt({
544
+ isRTL: ge
545
+ });
546
+ }
547
+ function te(i) {
548
+ if (!Ee) return;
549
+ const A = _().getScrollbarWidth() > 0, ke = i.scrollHeight > Se(i).documentElement.clientHeight;
550
+ c({
551
+ paddingRight: A && !ke ? Be() : void 0,
552
+ paddingLeft: !A && ke ? Be() : void 0
553
+ });
554
+ }
555
+ const O = T(() => {
556
+ E && te(E.dialog);
557
+ });
558
+ Le(() => {
559
+ Oe(window, "resize", O), g.current == null || g.current();
560
+ });
561
+ const K = () => {
562
+ C.current = !0;
563
+ }, B = (i) => {
564
+ C.current && E && i.target === E.dialog && (j.current = !0), C.current = !1;
565
+ }, l = () => {
566
+ P(!0), g.current = ut(E.dialog, () => {
567
+ P(!1);
568
+ });
569
+ }, ne = (i) => {
570
+ i.target === i.currentTarget && l();
571
+ }, U = (i) => {
572
+ if (w === "static") {
573
+ ne(i);
574
+ return;
575
+ }
576
+ if (j.current || i.target !== i.currentTarget) {
577
+ j.current = !1;
578
+ return;
579
+ }
580
+ k == null || k();
581
+ }, qe = (i) => {
582
+ se ? z == null || z(i) : (i.preventDefault(), w === "static" && l());
583
+ }, Ye = (i, A) => {
584
+ i && te(i), W == null || W(i, A);
585
+ }, Je = (i) => {
586
+ g.current == null || g.current(), I == null || I(i);
587
+ }, Qe = (i, A) => {
588
+ Y == null || Y(i, A), ct(window, "resize", O);
589
+ }, Ze = (i) => {
590
+ i && (i.style.display = ""), J == null || J(i), Oe(window, "resize", O);
591
+ }, Pe = be((i) => /* @__PURE__ */ r.jsx("div", {
592
+ ...i,
593
+ className: d(`${t}-backdrop`, Q, !y && "show")
594
+ }), [y, Q, t]), Re = {
595
+ ...n,
596
+ ...x
597
+ };
598
+ Re.display = "block";
599
+ const et = (i) => /* @__PURE__ */ r.jsx("div", {
600
+ role: "dialog",
601
+ ...i,
602
+ style: Re,
603
+ className: d(e, t, fe && `${t}-static`, !y && "show"),
604
+ onClick: w ? U : void 0,
605
+ onMouseUp: B,
606
+ "data-bs-theme": f,
607
+ "aria-label": m,
608
+ "aria-labelledby": p,
609
+ "aria-describedby": v,
610
+ children: /* @__PURE__ */ r.jsx(h, {
611
+ ...ue,
612
+ onMouseDown: K,
613
+ className: o,
614
+ contentClassName: s,
615
+ children: a
616
+ })
617
+ });
618
+ return /* @__PURE__ */ r.jsx(Ke.Provider, {
619
+ value: G,
620
+ children: /* @__PURE__ */ r.jsx(Ft, {
621
+ show: M,
622
+ ref: me,
623
+ backdrop: w,
624
+ container: re,
625
+ keyboard: !0,
626
+ autoFocus: X,
627
+ enforceFocus: ie,
628
+ restoreFocus: le,
629
+ restoreFocusOptions: de,
630
+ onEscapeKeyDown: qe,
631
+ onShow: ae,
632
+ onHide: k,
633
+ onEnter: Ye,
634
+ onEntering: Qe,
635
+ onEntered: q,
636
+ onExit: Je,
637
+ onExiting: ce,
638
+ onExited: Ze,
639
+ manager: _(),
640
+ transition: y ? Ht : void 0,
641
+ backdropTransition: y ? Gt : void 0,
642
+ renderBackdrop: Pe,
643
+ renderDialog: et
644
+ })
645
+ });
646
+ });
647
+ Xe.displayName = "Modal";
648
+ const en = Object.assign(Xe, {
649
+ Body: Ge,
650
+ Header: Ve,
651
+ Title: ze,
652
+ Footer: Ue,
653
+ Dialog: Ce,
654
+ TRANSITION_DURATION: 300,
655
+ BACKDROP_TRANSITION_DURATION: 150
656
+ }), Kt = "_button_1wjon_1", Ut = "_filled_1wjon_7", Vt = "_sm_1wjon_13", zt = "_md_1wjon_18", Xt = "_lg_1wjon_23", L = {
657
+ button: Kt,
658
+ filled: Ut,
659
+ sm: Vt,
660
+ md: zt,
661
+ lg: Xt
662
+ }, tn = ({ variant: t = "filled", color: e = "primary", size: n = "md", className: o, children: s, ...a }) => a.as === "link" ? /* @__PURE__ */ r.jsx(pt, { to: a.href ?? "/", className: d(`luminus-primary-button ${e} btn ${t === "outlined" ? `btn-outline-${e}` : `btn-${e}`} ${o ?? ""}`, L.button, L[t], L[n]), ...a, children: s }) : a.as === "button" || a.as === void 0 ? /* @__PURE__ */ r.jsx("button", { type: "button", className: d(`luminus-primary-button ${e} btn ${t === "outlined" ? `btn-outline-${e}` : `btn-${e}`} ${o ?? ""}`, L.button, L[t], L[n]), ...a, children: s }) : null;
663
+ export {
664
+ It as A,
665
+ Ft as B,
666
+ Te as C,
667
+ Ne as F,
668
+ Zt as L,
669
+ Ke as M,
670
+ tn as P,
671
+ kt as a,
672
+ Pt as b,
673
+ F as c,
674
+ Tt as d,
675
+ Lt as e,
676
+ en as f,
677
+ Dt as g,
678
+ S as q,
679
+ Nt as u
680
+ };