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