react-luminus-components 2.1.8 → 2.1.9
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 +191 -50
- package/dist/Alert-BApdinGX.cjs +1 -0
- package/dist/Alert-D2Bw906t.js +495 -0
- package/dist/DelegationContext-B1WXROG2.cjs +201 -0
- package/dist/DelegationContext-CCnk58PI.js +3156 -0
- package/dist/HelmetContext-ChKPef74.js +49 -0
- package/dist/HelmetContext-DDQ-Phg7.cjs +1 -0
- package/dist/PrimaryButton-D7r0m8xi.js +742 -0
- package/dist/PrimaryButton-D91b3Dmv.cjs +1 -0
- package/dist/SimpleTooltip-B00uLuVM.cjs +1 -0
- package/dist/SimpleTooltip-dwOOgecT.js +1642 -0
- package/dist/Typography-C5KJzU5O.js +1627 -0
- package/dist/Typography-Fo21SeyJ.cjs +20 -0
- package/dist/UserContext-45ZxeQHB.cjs +1 -0
- package/dist/UserContext-ZsTsf5Xe.js +270 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +1773 -852
- package/dist/dateUtils-CXm9PEh6.cjs +1 -0
- package/dist/dateUtils-ayErBYbI.js +1488 -0
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +118 -123
- package/dist/index-4IYT9u10.js +95 -0
- package/dist/index-jmbq5h95.cjs +25 -0
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +97 -98
- package/dist/localStorageUtils-BSATUi5m.cjs +1 -0
- package/dist/localStorageUtils-DNgjNynk.js +1070 -0
- package/dist/main.cjs.js +56 -7
- package/dist/main.es.js +36660 -11628
- package/dist/models/texts/ApprovalTexts.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/useIsFormDirty-76y8Dca-.cjs +1 -0
- package/dist/useIsFormDirty-Ba5uhPH7.js +3257 -0
- package/dist/useWindowSize-7W91GsJQ.js +56 -0
- package/dist/useWindowSize-CLoDaEYh.cjs +1 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +79 -85
- package/package.json +10 -1
- package/dist/FormDisabledProvider-D-DRODSt.js +0 -51
- package/dist/FormDisabledProvider-Dt39yr7W.cjs +0 -1
- package/dist/localStorageUtils-CVwJ9FKd.cjs +0 -1
- package/dist/localStorageUtils-TeLq8MHE.js +0 -59
- package/dist/nivo-bar-D6NJLYWS.js +0 -39616
- package/dist/nivo-bar-SBWBmyeI.cjs +0 -293
- package/dist/useIsFormDirty-CZ4jNRFn.js +0 -117
- package/dist/useIsFormDirty-Crsu8mjo.cjs +0 -1
- package/dist/useLocalStorageState-Ca7olZgH.cjs +0 -1
- package/dist/useLocalStorageState-DtBc-C2W.js +0 -25
|
@@ -0,0 +1,742 @@
|
|
|
1
|
+
import { jsxs as Ne, jsx as i, Fragment as Be } from "react/jsx-runtime";
|
|
2
|
+
import { c as Me, a as h } from "./index-4IYT9u10.js";
|
|
3
|
+
import { t as it, c as Ae } from "./dateUtils-ayErBYbI.js";
|
|
4
|
+
import * as E from "react";
|
|
5
|
+
import { useRef as M, useEffect as se, useContext as Te, useState as ae, forwardRef as lt, useImperativeHandle as dt, useCallback as we, useMemo as ct, createContext as ut } from "react";
|
|
6
|
+
import { P as pe, e as k, w as ft, p as Ce, q as ze, s as Y, i as He, r as mt, v as ht, u as V, x as $e, y as De, z as Se, A as gt, B as pt, m as Ee, k as vt, l as yt, C as bt, D as Ie, F as Ue, j as wt, G as Et } from "./Typography-C5KJzU5O.js";
|
|
7
|
+
import Nt from "react-dom";
|
|
8
|
+
import { C as Mt, d as Tt } from "./HelmetContext-ChKPef74.js";
|
|
9
|
+
import { Link as Ct } from "react-router";
|
|
10
|
+
const Rt = "_loading_obchl_1", _t = "_spinner-grow_obchl_10", kt = "_second_obchl_14", Ft = "_third_obchl_17", Ot = "_loadingBlock_obchl_21", Bt = "_sizeLine_obchl_29", At = "_sizeFill_obchl_36", I = {
|
|
11
|
+
loading: Rt,
|
|
12
|
+
spinnerGrow: _t,
|
|
13
|
+
second: kt,
|
|
14
|
+
third: Ft,
|
|
15
|
+
loadingBlock: Ot,
|
|
16
|
+
sizeLine: Bt,
|
|
17
|
+
sizeFill: At
|
|
18
|
+
}, vn = () => {
|
|
19
|
+
const t = Me.c(1);
|
|
20
|
+
let e;
|
|
21
|
+
return t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ Ne("div", { className: h("luminus-loading", I.loading), children: [
|
|
22
|
+
/* @__PURE__ */ i("div", { className: h("spinner-grow", I.spinnerGrow, "text-primary"), role: "status" }),
|
|
23
|
+
/* @__PURE__ */ i("div", { className: h("spinner-grow", I.spinnerGrow, "text-primary", I.second), role: "status" }),
|
|
24
|
+
/* @__PURE__ */ i("div", { className: h("spinner-grow", I.spinnerGrow, "text-primary", I.third), role: "status" })
|
|
25
|
+
] }), t[0] = e) : e = t[0], e;
|
|
26
|
+
};
|
|
27
|
+
function $t(t, e) {
|
|
28
|
+
const n = it(t);
|
|
29
|
+
if (isNaN(e)) return Ae(t, NaN);
|
|
30
|
+
if (!e)
|
|
31
|
+
return n;
|
|
32
|
+
const o = n.getDate(), r = Ae(t, n.getTime());
|
|
33
|
+
r.setMonth(n.getMonth() + e + 1, 0);
|
|
34
|
+
const s = r.getDate();
|
|
35
|
+
return o >= s ? r : (n.setFullYear(
|
|
36
|
+
r.getFullYear(),
|
|
37
|
+
r.getMonth(),
|
|
38
|
+
o
|
|
39
|
+
), n);
|
|
40
|
+
}
|
|
41
|
+
function yn(t, e) {
|
|
42
|
+
return $t(t, e * 12);
|
|
43
|
+
}
|
|
44
|
+
function Dt(t) {
|
|
45
|
+
const e = M(null);
|
|
46
|
+
return se(() => {
|
|
47
|
+
e.current = t;
|
|
48
|
+
}), e.current;
|
|
49
|
+
}
|
|
50
|
+
var St = Function.prototype.bind.call(Function.prototype.call, [].slice);
|
|
51
|
+
function L(t, e) {
|
|
52
|
+
return St(t.querySelectorAll(e));
|
|
53
|
+
}
|
|
54
|
+
const It = "data-rr-ui-", Lt = "rrUi";
|
|
55
|
+
function xt(t) {
|
|
56
|
+
return `${It}${t}`;
|
|
57
|
+
}
|
|
58
|
+
function bn(t) {
|
|
59
|
+
return `${Lt}${t}`;
|
|
60
|
+
}
|
|
61
|
+
const Wt = {
|
|
62
|
+
/**
|
|
63
|
+
* Specify whether the feedback is for valid or invalid fields
|
|
64
|
+
*
|
|
65
|
+
* @type {('valid'|'invalid')}
|
|
66
|
+
*/
|
|
67
|
+
type: pe.string,
|
|
68
|
+
/** Display feedback as a tooltip. */
|
|
69
|
+
tooltip: pe.bool,
|
|
70
|
+
as: pe.elementType
|
|
71
|
+
}, Re = /* @__PURE__ */ E.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
|
+
...r
|
|
79
|
+
}, s) => /* @__PURE__ */ i(t, {
|
|
80
|
+
...r,
|
|
81
|
+
ref: s,
|
|
82
|
+
className: h(e, `${n}-${o ? "tooltip" : "feedback"}`)
|
|
83
|
+
})
|
|
84
|
+
);
|
|
85
|
+
Re.displayName = "Feedback";
|
|
86
|
+
Re.propTypes = Wt;
|
|
87
|
+
const jt = /* @__PURE__ */ E.createContext({}), Ge = /* @__PURE__ */ E.forwardRef(({
|
|
88
|
+
bsPrefix: t,
|
|
89
|
+
type: e,
|
|
90
|
+
size: n,
|
|
91
|
+
htmlSize: o,
|
|
92
|
+
id: r,
|
|
93
|
+
className: s,
|
|
94
|
+
isValid: g = !1,
|
|
95
|
+
isInvalid: d = !1,
|
|
96
|
+
plaintext: y,
|
|
97
|
+
readOnly: p,
|
|
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: w = "input",
|
|
100
|
+
...v
|
|
101
|
+
}, c) => {
|
|
102
|
+
const {
|
|
103
|
+
controlId: u
|
|
104
|
+
} = Te(jt);
|
|
105
|
+
return t = k(t, "form-control"), process.env.NODE_ENV !== "production" && ft(u == null || !r, "`controlId` is ignored on `<FormControl>` when `id` is specified."), /* @__PURE__ */ i(w, {
|
|
106
|
+
...v,
|
|
107
|
+
type: e,
|
|
108
|
+
size: o,
|
|
109
|
+
ref: c,
|
|
110
|
+
readOnly: p,
|
|
111
|
+
id: r || u,
|
|
112
|
+
className: h(s, y ? `${t}-plaintext` : t, n && `${t}-${n}`, e === "color" && `${t}-color`, g && "is-valid", d && "is-invalid")
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
Ge.displayName = "FormControl";
|
|
116
|
+
const wn = Object.assign(Ge, {
|
|
117
|
+
Feedback: Re
|
|
118
|
+
});
|
|
119
|
+
var re;
|
|
120
|
+
function Le(t) {
|
|
121
|
+
if ((!re && re !== 0 || t) && Ce) {
|
|
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), re = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
|
|
124
|
+
}
|
|
125
|
+
return re;
|
|
126
|
+
}
|
|
127
|
+
function zt() {
|
|
128
|
+
return ae(null);
|
|
129
|
+
}
|
|
130
|
+
function ve(t) {
|
|
131
|
+
t === void 0 && (t = ze());
|
|
132
|
+
try {
|
|
133
|
+
var e = t.activeElement;
|
|
134
|
+
return !e || !e.nodeName ? null : e;
|
|
135
|
+
} catch {
|
|
136
|
+
return t.body;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
function Ht(t) {
|
|
140
|
+
const e = M(t);
|
|
141
|
+
return e.current = t, e;
|
|
142
|
+
}
|
|
143
|
+
function Ut(t) {
|
|
144
|
+
const e = Ht(t);
|
|
145
|
+
se(() => () => e.current(), []);
|
|
146
|
+
}
|
|
147
|
+
function Gt(t = document) {
|
|
148
|
+
const e = t.defaultView;
|
|
149
|
+
return Math.abs(e.innerWidth - t.documentElement.clientWidth);
|
|
150
|
+
}
|
|
151
|
+
const xe = xt("modal-open");
|
|
152
|
+
class _e {
|
|
153
|
+
constructor({
|
|
154
|
+
ownerDocument: e,
|
|
155
|
+
handleContainerOverflow: n = !0,
|
|
156
|
+
isRTL: o = !1
|
|
157
|
+
} = {}) {
|
|
158
|
+
this.handleContainerOverflow = n, this.isRTL = o, this.modals = [], this.ownerDocument = e;
|
|
159
|
+
}
|
|
160
|
+
getScrollbarWidth() {
|
|
161
|
+
return Gt(this.ownerDocument);
|
|
162
|
+
}
|
|
163
|
+
getElement() {
|
|
164
|
+
return (this.ownerDocument || document).body;
|
|
165
|
+
}
|
|
166
|
+
setModalAttributes(e) {
|
|
167
|
+
}
|
|
168
|
+
removeModalAttributes(e) {
|
|
169
|
+
}
|
|
170
|
+
setContainerStyle(e) {
|
|
171
|
+
const n = {
|
|
172
|
+
overflow: "hidden"
|
|
173
|
+
}, o = this.isRTL ? "paddingLeft" : "paddingRight", r = this.getElement();
|
|
174
|
+
e.style = {
|
|
175
|
+
overflow: r.style.overflow,
|
|
176
|
+
[o]: r.style[o]
|
|
177
|
+
}, e.scrollBarWidth && (n[o] = `${parseInt(Y(r, o) || "0", 10) + e.scrollBarWidth}px`), r.setAttribute(xe, ""), Y(r, n);
|
|
178
|
+
}
|
|
179
|
+
reset() {
|
|
180
|
+
[...this.modals].forEach((e) => this.remove(e));
|
|
181
|
+
}
|
|
182
|
+
removeContainerStyle(e) {
|
|
183
|
+
const n = this.getElement();
|
|
184
|
+
n.removeAttribute(xe), Object.assign(n.style, e.style);
|
|
185
|
+
}
|
|
186
|
+
add(e) {
|
|
187
|
+
let n = this.modals.indexOf(e);
|
|
188
|
+
return n !== -1 || (n = this.modals.length, this.modals.push(e), this.setModalAttributes(e), n !== 0) || (this.state = {
|
|
189
|
+
scrollBarWidth: this.getScrollbarWidth(),
|
|
190
|
+
style: {}
|
|
191
|
+
}, this.handleContainerOverflow && this.setContainerStyle(this.state)), n;
|
|
192
|
+
}
|
|
193
|
+
remove(e) {
|
|
194
|
+
const n = this.modals.indexOf(e);
|
|
195
|
+
n !== -1 && (this.modals.splice(n, 1), !this.modals.length && this.handleContainerOverflow && this.removeContainerStyle(this.state), this.removeModalAttributes(e));
|
|
196
|
+
}
|
|
197
|
+
isTopModal(e) {
|
|
198
|
+
return !!this.modals.length && this.modals[this.modals.length - 1] === e;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
const Kt = ["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"];
|
|
202
|
+
function Vt(t, e) {
|
|
203
|
+
if (t == null) return {};
|
|
204
|
+
var n = {};
|
|
205
|
+
for (var o in t) if ({}.hasOwnProperty.call(t, o)) {
|
|
206
|
+
if (e.indexOf(o) >= 0) continue;
|
|
207
|
+
n[o] = t[o];
|
|
208
|
+
}
|
|
209
|
+
return n;
|
|
210
|
+
}
|
|
211
|
+
let ye;
|
|
212
|
+
function Yt(t) {
|
|
213
|
+
return ye || (ye = new _e({
|
|
214
|
+
ownerDocument: t == null ? void 0 : t.document
|
|
215
|
+
})), ye;
|
|
216
|
+
}
|
|
217
|
+
function Pt(t) {
|
|
218
|
+
const e = He(), n = t || Yt(e), o = M({
|
|
219
|
+
dialog: null,
|
|
220
|
+
backdrop: null
|
|
221
|
+
});
|
|
222
|
+
return Object.assign(o.current, {
|
|
223
|
+
add: () => n.add(o.current),
|
|
224
|
+
remove: () => n.remove(o.current),
|
|
225
|
+
isTopModal: () => n.isTopModal(o.current),
|
|
226
|
+
setDialogRef: we((r) => {
|
|
227
|
+
o.current.dialog = r;
|
|
228
|
+
}, []),
|
|
229
|
+
setBackdropRef: we((r) => {
|
|
230
|
+
o.current.backdrop = r;
|
|
231
|
+
}, [])
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
const Ke = /* @__PURE__ */ lt((t, e) => {
|
|
235
|
+
let {
|
|
236
|
+
show: n = !1,
|
|
237
|
+
role: o = "dialog",
|
|
238
|
+
className: r,
|
|
239
|
+
style: s,
|
|
240
|
+
children: g,
|
|
241
|
+
backdrop: d = !0,
|
|
242
|
+
keyboard: y = !0,
|
|
243
|
+
onBackdropClick: p,
|
|
244
|
+
onEscapeKeyDown: w,
|
|
245
|
+
transition: v,
|
|
246
|
+
runTransition: c,
|
|
247
|
+
backdropTransition: u,
|
|
248
|
+
runBackdropTransition: b,
|
|
249
|
+
autoFocus: m = !0,
|
|
250
|
+
enforceFocus: T = !0,
|
|
251
|
+
restoreFocus: F = !0,
|
|
252
|
+
restoreFocusOptions: ie,
|
|
253
|
+
renderDialog: P,
|
|
254
|
+
renderBackdrop: le = (l) => /* @__PURE__ */ i("div", Object.assign({}, l)),
|
|
255
|
+
manager: de,
|
|
256
|
+
container: ce,
|
|
257
|
+
onShow: X,
|
|
258
|
+
onHide: j = () => {
|
|
259
|
+
},
|
|
260
|
+
onExit: ue,
|
|
261
|
+
onExited: z,
|
|
262
|
+
onExiting: q,
|
|
263
|
+
onEnter: J,
|
|
264
|
+
onEntering: Q,
|
|
265
|
+
onEntered: Z
|
|
266
|
+
} = t, fe = Vt(t, Kt);
|
|
267
|
+
const C = He(), O = mt(ce), f = Pt(de), me = ht(), ee = Dt(n), [_, B] = ae(!n), N = M(null);
|
|
268
|
+
dt(e, () => f, [f]), Ce && !ee && n && (N.current = ve(C == null ? void 0 : C.document)), n && _ && B(!1);
|
|
269
|
+
const R = V(() => {
|
|
270
|
+
if (f.add(), A.current = De(document, "keydown", ge), U.current = De(
|
|
271
|
+
document,
|
|
272
|
+
"focus",
|
|
273
|
+
// the timeout is necessary b/c this will run before the new modal is mounted
|
|
274
|
+
// and so steals focus from it
|
|
275
|
+
() => setTimeout(he),
|
|
276
|
+
!0
|
|
277
|
+
), X && X(), m) {
|
|
278
|
+
var l, oe;
|
|
279
|
+
const K = ve((l = (oe = f.dialog) == null ? void 0 : oe.ownerDocument) != null ? l : C == null ? void 0 : C.document);
|
|
280
|
+
f.dialog && K && !Se(f.dialog, K) && (N.current = K, f.dialog.focus());
|
|
281
|
+
}
|
|
282
|
+
}), H = V(() => {
|
|
283
|
+
if (f.remove(), A.current == null || A.current(), U.current == null || U.current(), F) {
|
|
284
|
+
var l;
|
|
285
|
+
(l = N.current) == null || l.focus == null || l.focus(ie), N.current = null;
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
se(() => {
|
|
289
|
+
!n || !O || R();
|
|
290
|
+
}, [
|
|
291
|
+
n,
|
|
292
|
+
O,
|
|
293
|
+
/* should never change: */
|
|
294
|
+
R
|
|
295
|
+
]), se(() => {
|
|
296
|
+
_ && H();
|
|
297
|
+
}, [_, H]), Ut(() => {
|
|
298
|
+
H();
|
|
299
|
+
});
|
|
300
|
+
const he = V(() => {
|
|
301
|
+
if (!T || !me() || !f.isTopModal())
|
|
302
|
+
return;
|
|
303
|
+
const l = ve(C == null ? void 0 : C.document);
|
|
304
|
+
f.dialog && l && !Se(f.dialog, l) && f.dialog.focus();
|
|
305
|
+
}), te = V((l) => {
|
|
306
|
+
l.target === l.currentTarget && (p == null || p(l), d === !0 && j());
|
|
307
|
+
}), ge = V((l) => {
|
|
308
|
+
y && gt(l) && f.isTopModal() && (w == null || w(l), l.defaultPrevented || j());
|
|
309
|
+
}), U = M(), A = M(), ne = (...l) => {
|
|
310
|
+
B(!0), z == null || z(...l);
|
|
311
|
+
};
|
|
312
|
+
if (!O)
|
|
313
|
+
return null;
|
|
314
|
+
const $ = Object.assign({
|
|
315
|
+
role: o,
|
|
316
|
+
ref: f.setDialogRef,
|
|
317
|
+
// apparently only works on the dialog role element
|
|
318
|
+
"aria-modal": o === "dialog" ? !0 : void 0
|
|
319
|
+
}, fe, {
|
|
320
|
+
style: s,
|
|
321
|
+
className: r,
|
|
322
|
+
tabIndex: -1
|
|
323
|
+
});
|
|
324
|
+
let G = P ? P($) : /* @__PURE__ */ i("div", Object.assign({}, $, {
|
|
325
|
+
children: /* @__PURE__ */ E.cloneElement(g, {
|
|
326
|
+
role: "document"
|
|
327
|
+
})
|
|
328
|
+
}));
|
|
329
|
+
G = $e(v, c, {
|
|
330
|
+
unmountOnExit: !0,
|
|
331
|
+
mountOnEnter: !0,
|
|
332
|
+
appear: !0,
|
|
333
|
+
in: !!n,
|
|
334
|
+
onExit: ue,
|
|
335
|
+
onExiting: q,
|
|
336
|
+
onExited: ne,
|
|
337
|
+
onEnter: J,
|
|
338
|
+
onEntering: Q,
|
|
339
|
+
onEntered: Z,
|
|
340
|
+
children: G
|
|
341
|
+
});
|
|
342
|
+
let D = null;
|
|
343
|
+
return d && (D = le({
|
|
344
|
+
ref: f.setBackdropRef,
|
|
345
|
+
onClick: te
|
|
346
|
+
}), D = $e(u, b, {
|
|
347
|
+
in: !!n,
|
|
348
|
+
appear: !0,
|
|
349
|
+
mountOnEnter: !0,
|
|
350
|
+
unmountOnExit: !0,
|
|
351
|
+
children: D
|
|
352
|
+
})), /* @__PURE__ */ i(Be, {
|
|
353
|
+
children: /* @__PURE__ */ Nt.createPortal(/* @__PURE__ */ Ne(Be, {
|
|
354
|
+
children: [D, G]
|
|
355
|
+
}), O)
|
|
356
|
+
});
|
|
357
|
+
});
|
|
358
|
+
Ke.displayName = "Modal";
|
|
359
|
+
const Xt = Object.assign(Ke, {
|
|
360
|
+
Manager: _e
|
|
361
|
+
});
|
|
362
|
+
function qt(t, e) {
|
|
363
|
+
t.classList ? t.classList.add(e) : pt(t, e) || (typeof t.className == "string" ? t.className = t.className + " " + e : t.setAttribute("class", (t.className && t.className.baseVal || "") + " " + e));
|
|
364
|
+
}
|
|
365
|
+
function We(t, e) {
|
|
366
|
+
return t.replace(new RegExp("(^|\\s)" + e + "(?:\\s|$)", "g"), "$1").replace(/\s+/g, " ").replace(/^\s*|\s*$/g, "");
|
|
367
|
+
}
|
|
368
|
+
function Jt(t, e) {
|
|
369
|
+
t.classList ? t.classList.remove(e) : typeof t.className == "string" ? t.className = We(t.className, e) : t.setAttribute("class", We(t.className && t.className.baseVal || "", e));
|
|
370
|
+
}
|
|
371
|
+
const x = {
|
|
372
|
+
FIXED_CONTENT: ".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",
|
|
373
|
+
STICKY_CONTENT: ".sticky-top",
|
|
374
|
+
NAVBAR_TOGGLER: ".navbar-toggler"
|
|
375
|
+
};
|
|
376
|
+
class Qt extends _e {
|
|
377
|
+
adjustAndStore(e, n, o) {
|
|
378
|
+
const r = n.style[e];
|
|
379
|
+
n.dataset[e] = r, Y(n, {
|
|
380
|
+
[e]: `${parseFloat(Y(n, e)) + o}px`
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
restore(e, n) {
|
|
384
|
+
const o = n.dataset[e];
|
|
385
|
+
o !== void 0 && (delete n.dataset[e], Y(n, {
|
|
386
|
+
[e]: o
|
|
387
|
+
}));
|
|
388
|
+
}
|
|
389
|
+
setContainerStyle(e) {
|
|
390
|
+
super.setContainerStyle(e);
|
|
391
|
+
const n = this.getElement();
|
|
392
|
+
if (qt(n, "modal-open"), !e.scrollBarWidth) return;
|
|
393
|
+
const o = this.isRTL ? "paddingLeft" : "paddingRight", r = this.isRTL ? "marginLeft" : "marginRight";
|
|
394
|
+
L(n, x.FIXED_CONTENT).forEach((s) => this.adjustAndStore(o, s, e.scrollBarWidth)), L(n, x.STICKY_CONTENT).forEach((s) => this.adjustAndStore(r, s, -e.scrollBarWidth)), L(n, x.NAVBAR_TOGGLER).forEach((s) => this.adjustAndStore(r, s, e.scrollBarWidth));
|
|
395
|
+
}
|
|
396
|
+
removeContainerStyle(e) {
|
|
397
|
+
super.removeContainerStyle(e);
|
|
398
|
+
const n = this.getElement();
|
|
399
|
+
Jt(n, "modal-open");
|
|
400
|
+
const o = this.isRTL ? "paddingLeft" : "paddingRight", r = this.isRTL ? "marginLeft" : "marginRight";
|
|
401
|
+
L(n, x.FIXED_CONTENT).forEach((s) => this.restore(o, s)), L(n, x.STICKY_CONTENT).forEach((s) => this.restore(r, s)), L(n, x.NAVBAR_TOGGLER).forEach((s) => this.restore(r, s));
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
let be;
|
|
405
|
+
function Zt(t) {
|
|
406
|
+
return be || (be = new Qt(t)), be;
|
|
407
|
+
}
|
|
408
|
+
const Ve = /* @__PURE__ */ E.forwardRef(({
|
|
409
|
+
className: t,
|
|
410
|
+
bsPrefix: e,
|
|
411
|
+
as: n = "div",
|
|
412
|
+
...o
|
|
413
|
+
}, r) => (e = k(e, "modal-body"), /* @__PURE__ */ i(n, {
|
|
414
|
+
ref: r,
|
|
415
|
+
className: h(t, e),
|
|
416
|
+
...o
|
|
417
|
+
})));
|
|
418
|
+
Ve.displayName = "ModalBody";
|
|
419
|
+
const Ye = /* @__PURE__ */ E.createContext({
|
|
420
|
+
onHide() {
|
|
421
|
+
}
|
|
422
|
+
}), ke = /* @__PURE__ */ E.forwardRef(({
|
|
423
|
+
bsPrefix: t,
|
|
424
|
+
className: e,
|
|
425
|
+
contentClassName: n,
|
|
426
|
+
centered: o,
|
|
427
|
+
size: r,
|
|
428
|
+
fullscreen: s,
|
|
429
|
+
children: g,
|
|
430
|
+
scrollable: d,
|
|
431
|
+
...y
|
|
432
|
+
}, p) => {
|
|
433
|
+
t = k(t, "modal");
|
|
434
|
+
const w = `${t}-dialog`, v = typeof s == "string" ? `${t}-fullscreen-${s}` : `${t}-fullscreen`;
|
|
435
|
+
return /* @__PURE__ */ i("div", {
|
|
436
|
+
...y,
|
|
437
|
+
ref: p,
|
|
438
|
+
className: h(w, e, r && `${t}-${r}`, o && `${w}-centered`, d && `${w}-scrollable`, s && v),
|
|
439
|
+
children: /* @__PURE__ */ i("div", {
|
|
440
|
+
className: h(`${t}-content`, n),
|
|
441
|
+
children: g
|
|
442
|
+
})
|
|
443
|
+
});
|
|
444
|
+
});
|
|
445
|
+
ke.displayName = "ModalDialog";
|
|
446
|
+
const Pe = /* @__PURE__ */ E.forwardRef(({
|
|
447
|
+
className: t,
|
|
448
|
+
bsPrefix: e,
|
|
449
|
+
as: n = "div",
|
|
450
|
+
...o
|
|
451
|
+
}, r) => (e = k(e, "modal-footer"), /* @__PURE__ */ i(n, {
|
|
452
|
+
ref: r,
|
|
453
|
+
className: h(t, e),
|
|
454
|
+
...o
|
|
455
|
+
})));
|
|
456
|
+
Pe.displayName = "ModalFooter";
|
|
457
|
+
const Xe = /* @__PURE__ */ E.forwardRef(({
|
|
458
|
+
closeLabel: t = "Close",
|
|
459
|
+
closeVariant: e,
|
|
460
|
+
closeButton: n = !1,
|
|
461
|
+
onHide: o,
|
|
462
|
+
children: r,
|
|
463
|
+
...s
|
|
464
|
+
}, g) => {
|
|
465
|
+
const d = Te(Ye), y = Ee(() => {
|
|
466
|
+
d == null || d.onHide(), o == null || o();
|
|
467
|
+
});
|
|
468
|
+
return /* @__PURE__ */ Ne("div", {
|
|
469
|
+
ref: g,
|
|
470
|
+
...s,
|
|
471
|
+
children: [r, n && /* @__PURE__ */ i(Mt, {
|
|
472
|
+
"aria-label": t,
|
|
473
|
+
variant: e,
|
|
474
|
+
onClick: y
|
|
475
|
+
})]
|
|
476
|
+
});
|
|
477
|
+
});
|
|
478
|
+
Xe.displayName = "AbstractModalHeader";
|
|
479
|
+
const qe = /* @__PURE__ */ E.forwardRef(({
|
|
480
|
+
bsPrefix: t,
|
|
481
|
+
className: e,
|
|
482
|
+
closeLabel: n = "Close",
|
|
483
|
+
closeButton: o = !1,
|
|
484
|
+
...r
|
|
485
|
+
}, s) => (t = k(t, "modal-header"), /* @__PURE__ */ i(Xe, {
|
|
486
|
+
ref: s,
|
|
487
|
+
...r,
|
|
488
|
+
className: h(e, t),
|
|
489
|
+
closeLabel: n,
|
|
490
|
+
closeButton: o
|
|
491
|
+
})));
|
|
492
|
+
qe.displayName = "ModalHeader";
|
|
493
|
+
const en = Tt("h4"), Je = /* @__PURE__ */ E.forwardRef(({
|
|
494
|
+
className: t,
|
|
495
|
+
bsPrefix: e,
|
|
496
|
+
as: n = en,
|
|
497
|
+
...o
|
|
498
|
+
}, r) => (e = k(e, "modal-title"), /* @__PURE__ */ i(n, {
|
|
499
|
+
ref: r,
|
|
500
|
+
className: h(t, e),
|
|
501
|
+
...o
|
|
502
|
+
})));
|
|
503
|
+
Je.displayName = "ModalTitle";
|
|
504
|
+
function tn(t) {
|
|
505
|
+
return /* @__PURE__ */ i(Ue, {
|
|
506
|
+
...t,
|
|
507
|
+
timeout: null
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
function nn(t) {
|
|
511
|
+
return /* @__PURE__ */ i(Ue, {
|
|
512
|
+
...t,
|
|
513
|
+
timeout: null
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
const Qe = /* @__PURE__ */ E.forwardRef(({
|
|
517
|
+
bsPrefix: t,
|
|
518
|
+
className: e,
|
|
519
|
+
style: n,
|
|
520
|
+
dialogClassName: o,
|
|
521
|
+
contentClassName: r,
|
|
522
|
+
children: s,
|
|
523
|
+
dialogAs: g = ke,
|
|
524
|
+
"data-bs-theme": d,
|
|
525
|
+
"aria-labelledby": y,
|
|
526
|
+
"aria-describedby": p,
|
|
527
|
+
"aria-label": w,
|
|
528
|
+
/* BaseModal props */
|
|
529
|
+
show: v = !1,
|
|
530
|
+
animation: c = !0,
|
|
531
|
+
backdrop: u = !0,
|
|
532
|
+
keyboard: b = !0,
|
|
533
|
+
onEscapeKeyDown: m,
|
|
534
|
+
onShow: T,
|
|
535
|
+
onHide: F,
|
|
536
|
+
container: ie,
|
|
537
|
+
autoFocus: P = !0,
|
|
538
|
+
enforceFocus: le = !0,
|
|
539
|
+
restoreFocus: de = !0,
|
|
540
|
+
restoreFocusOptions: ce,
|
|
541
|
+
onEntered: X,
|
|
542
|
+
onExit: j,
|
|
543
|
+
onExiting: ue,
|
|
544
|
+
onEnter: z,
|
|
545
|
+
onEntering: q,
|
|
546
|
+
onExited: J,
|
|
547
|
+
backdropClassName: Q,
|
|
548
|
+
manager: Z,
|
|
549
|
+
...fe
|
|
550
|
+
}, C) => {
|
|
551
|
+
const [O, f] = ae({}), [me, ee] = ae(!1), _ = M(!1), B = M(!1), N = M(null), [R, H] = zt(), he = vt(C, H), te = Ee(F), ge = yt();
|
|
552
|
+
t = k(t, "modal");
|
|
553
|
+
const U = ct(() => ({
|
|
554
|
+
onHide: te
|
|
555
|
+
}), [te]);
|
|
556
|
+
function A() {
|
|
557
|
+
return Z || Zt({
|
|
558
|
+
isRTL: ge
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
function ne(a) {
|
|
562
|
+
if (!Ce) return;
|
|
563
|
+
const S = A().getScrollbarWidth() > 0, Oe = a.scrollHeight > ze(a).documentElement.clientHeight;
|
|
564
|
+
f({
|
|
565
|
+
paddingRight: S && !Oe ? Le() : void 0,
|
|
566
|
+
paddingLeft: !S && Oe ? Le() : void 0
|
|
567
|
+
});
|
|
568
|
+
}
|
|
569
|
+
const $ = Ee(() => {
|
|
570
|
+
R && ne(R.dialog);
|
|
571
|
+
});
|
|
572
|
+
bt(() => {
|
|
573
|
+
Ie(window, "resize", $), N.current == null || N.current();
|
|
574
|
+
});
|
|
575
|
+
const G = () => {
|
|
576
|
+
_.current = !0;
|
|
577
|
+
}, D = (a) => {
|
|
578
|
+
_.current && R && a.target === R.dialog && (B.current = !0), _.current = !1;
|
|
579
|
+
}, l = () => {
|
|
580
|
+
ee(!0), N.current = Et(R.dialog, () => {
|
|
581
|
+
ee(!1);
|
|
582
|
+
});
|
|
583
|
+
}, oe = (a) => {
|
|
584
|
+
a.target === a.currentTarget && l();
|
|
585
|
+
}, K = (a) => {
|
|
586
|
+
if (u === "static") {
|
|
587
|
+
oe(a);
|
|
588
|
+
return;
|
|
589
|
+
}
|
|
590
|
+
if (B.current || a.target !== a.currentTarget) {
|
|
591
|
+
B.current = !1;
|
|
592
|
+
return;
|
|
593
|
+
}
|
|
594
|
+
F == null || F();
|
|
595
|
+
}, et = (a) => {
|
|
596
|
+
b ? m == null || m(a) : (a.preventDefault(), u === "static" && l());
|
|
597
|
+
}, tt = (a, S) => {
|
|
598
|
+
a && ne(a), z == null || z(a, S);
|
|
599
|
+
}, nt = (a) => {
|
|
600
|
+
N.current == null || N.current(), j == null || j(a);
|
|
601
|
+
}, ot = (a, S) => {
|
|
602
|
+
q == null || q(a, S), wt(window, "resize", $);
|
|
603
|
+
}, rt = (a) => {
|
|
604
|
+
a && (a.style.display = ""), J == null || J(a), Ie(window, "resize", $);
|
|
605
|
+
}, st = we((a) => /* @__PURE__ */ i("div", {
|
|
606
|
+
...a,
|
|
607
|
+
className: h(`${t}-backdrop`, Q, !c && "show")
|
|
608
|
+
}), [c, Q, t]), Fe = {
|
|
609
|
+
...n,
|
|
610
|
+
...O
|
|
611
|
+
};
|
|
612
|
+
Fe.display = "block";
|
|
613
|
+
const at = (a) => /* @__PURE__ */ i("div", {
|
|
614
|
+
role: "dialog",
|
|
615
|
+
...a,
|
|
616
|
+
style: Fe,
|
|
617
|
+
className: h(e, t, me && `${t}-static`, !c && "show"),
|
|
618
|
+
onClick: u ? K : void 0,
|
|
619
|
+
onMouseUp: D,
|
|
620
|
+
"data-bs-theme": d,
|
|
621
|
+
"aria-label": w,
|
|
622
|
+
"aria-labelledby": y,
|
|
623
|
+
"aria-describedby": p,
|
|
624
|
+
children: /* @__PURE__ */ i(g, {
|
|
625
|
+
...fe,
|
|
626
|
+
onMouseDown: G,
|
|
627
|
+
className: o,
|
|
628
|
+
contentClassName: r,
|
|
629
|
+
children: s
|
|
630
|
+
})
|
|
631
|
+
});
|
|
632
|
+
return /* @__PURE__ */ i(Ye.Provider, {
|
|
633
|
+
value: U,
|
|
634
|
+
children: /* @__PURE__ */ i(Xt, {
|
|
635
|
+
show: v,
|
|
636
|
+
ref: he,
|
|
637
|
+
backdrop: u,
|
|
638
|
+
container: ie,
|
|
639
|
+
keyboard: !0,
|
|
640
|
+
autoFocus: P,
|
|
641
|
+
enforceFocus: le,
|
|
642
|
+
restoreFocus: de,
|
|
643
|
+
restoreFocusOptions: ce,
|
|
644
|
+
onEscapeKeyDown: et,
|
|
645
|
+
onShow: T,
|
|
646
|
+
onHide: F,
|
|
647
|
+
onEnter: tt,
|
|
648
|
+
onEntering: ot,
|
|
649
|
+
onEntered: X,
|
|
650
|
+
onExit: nt,
|
|
651
|
+
onExiting: ue,
|
|
652
|
+
onExited: rt,
|
|
653
|
+
manager: A(),
|
|
654
|
+
transition: c ? tn : void 0,
|
|
655
|
+
backdropTransition: c ? nn : void 0,
|
|
656
|
+
renderBackdrop: st,
|
|
657
|
+
renderDialog: at
|
|
658
|
+
})
|
|
659
|
+
});
|
|
660
|
+
});
|
|
661
|
+
Qe.displayName = "Modal";
|
|
662
|
+
const En = Object.assign(Qe, {
|
|
663
|
+
Body: Ve,
|
|
664
|
+
Header: qe,
|
|
665
|
+
Title: Je,
|
|
666
|
+
Footer: Pe,
|
|
667
|
+
Dialog: ke,
|
|
668
|
+
TRANSITION_DURATION: 300,
|
|
669
|
+
BACKDROP_TRANSITION_DURATION: 150
|
|
670
|
+
}), Ze = ut(void 0), je = {
|
|
671
|
+
falseIfNotInit: !1
|
|
672
|
+
}, Nn = (t) => {
|
|
673
|
+
const {
|
|
674
|
+
falseIfNotInit: e
|
|
675
|
+
} = t === void 0 ? je : t, n = e === void 0 ? je.falseIfNotInit : e, o = Te(Ze);
|
|
676
|
+
if (!n && o === void 0)
|
|
677
|
+
throw new Error("FormDisabledProvider not initilized. Probably tried to use useFormDisabledContext outside FormDisabledProvider.");
|
|
678
|
+
return o ?? !1;
|
|
679
|
+
}, Mn = (t) => {
|
|
680
|
+
const e = Me.c(3), {
|
|
681
|
+
children: n,
|
|
682
|
+
disabled: o
|
|
683
|
+
} = t;
|
|
684
|
+
let r;
|
|
685
|
+
return e[0] !== n || e[1] !== o ? (r = /* @__PURE__ */ i(Ze.Provider, { value: o, children: n }), e[0] = n, e[1] = o, e[2] = r) : r = e[2], r;
|
|
686
|
+
}, on = "_button_1wjon_1", rn = "_filled_1wjon_7", sn = "_sm_1wjon_13", an = "_md_1wjon_18", ln = "_lg_1wjon_23", W = {
|
|
687
|
+
button: on,
|
|
688
|
+
filled: rn,
|
|
689
|
+
sm: sn,
|
|
690
|
+
md: an,
|
|
691
|
+
lg: ln
|
|
692
|
+
}, Tn = (t) => {
|
|
693
|
+
const e = Me.c(24);
|
|
694
|
+
let n, o, r, s, g, d;
|
|
695
|
+
e[0] !== t ? ({
|
|
696
|
+
variant: s,
|
|
697
|
+
color: g,
|
|
698
|
+
size: d,
|
|
699
|
+
className: o,
|
|
700
|
+
children: n,
|
|
701
|
+
...r
|
|
702
|
+
} = t, e[0] = t, e[1] = n, e[2] = o, e[3] = r, e[4] = s, e[5] = g, e[6] = d) : (n = e[1], o = e[2], r = e[3], s = e[4], g = e[5], d = e[6]);
|
|
703
|
+
const y = s === void 0 ? "filled" : s, p = g === void 0 ? "primary" : g, w = d === void 0 ? "md" : d;
|
|
704
|
+
if (r.as === "link") {
|
|
705
|
+
const v = r.href ?? "/", c = `luminus-primary-button ${p} btn ${y === "outlined" ? `btn-outline-${p}` : `btn-${p}`} ${o ?? ""}`, u = W[y], b = W[w];
|
|
706
|
+
let m;
|
|
707
|
+
e[7] !== c || e[8] !== u || e[9] !== b ? (m = h(c, W.button, u, b), e[7] = c, e[8] = u, e[9] = b, e[10] = m) : m = e[10];
|
|
708
|
+
let T;
|
|
709
|
+
return e[11] !== n || e[12] !== r || e[13] !== v || e[14] !== m ? (T = /* @__PURE__ */ i(Ct, { to: v, className: m, ...r, children: n }), e[11] = n, e[12] = r, e[13] = v, e[14] = m, e[15] = T) : T = e[15], T;
|
|
710
|
+
}
|
|
711
|
+
if (r.as === "button" || r.as === void 0) {
|
|
712
|
+
const v = `luminus-primary-button ${p} btn ${y === "outlined" ? `btn-outline-${p}` : `btn-${p}`} ${o ?? ""}`, c = W[y], u = W[w];
|
|
713
|
+
let b;
|
|
714
|
+
e[16] !== v || e[17] !== c || e[18] !== u ? (b = h(v, W.button, c, u), e[16] = v, e[17] = c, e[18] = u, e[19] = b) : b = e[19];
|
|
715
|
+
let m;
|
|
716
|
+
return e[20] !== n || e[21] !== r || e[22] !== b ? (m = /* @__PURE__ */ i("button", { type: "button", className: b, ...r, children: n }), e[20] = n, e[21] = r, e[22] = b, e[23] = m) : m = e[23], m;
|
|
717
|
+
}
|
|
718
|
+
return null;
|
|
719
|
+
};
|
|
720
|
+
export {
|
|
721
|
+
Xe as A,
|
|
722
|
+
Xt as B,
|
|
723
|
+
jt as F,
|
|
724
|
+
vn as L,
|
|
725
|
+
Ye as M,
|
|
726
|
+
Tn as P,
|
|
727
|
+
Re as a,
|
|
728
|
+
wn as b,
|
|
729
|
+
I as c,
|
|
730
|
+
xt as d,
|
|
731
|
+
bn as e,
|
|
732
|
+
Qt as f,
|
|
733
|
+
Zt as g,
|
|
734
|
+
En as h,
|
|
735
|
+
Nn as i,
|
|
736
|
+
$t as j,
|
|
737
|
+
yn as k,
|
|
738
|
+
Mn as l,
|
|
739
|
+
Ze as m,
|
|
740
|
+
L as q,
|
|
741
|
+
Dt as u
|
|
742
|
+
};
|