react-luminus-components 1.3.76 → 1.3.78
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/README.md +349 -349
- package/dist/.vite/manifest.json +60 -95
- package/dist/Loading-CBsJX4LG.js +17 -0
- package/dist/Loading-If5qsvY2.cjs +1 -0
- package/dist/SimpleTooltip-DwgjTb1C.js +5 -0
- package/dist/{SimpleTooltip-Duct0nes.cjs → SimpleTooltip-dm9JzI9d.cjs} +1 -1
- package/dist/components/Documents/Documents.d.ts +10 -0
- package/dist/components/Documents/components/DocumentDirectory/DocumentDirectory.d.ts +5 -0
- package/dist/components/Documents/components/DocumentDirectory/components/DocumentDirectoryLabel/DocumentDirectoryLabel.d.ts +7 -0
- package/dist/components/Documents/components/DocumentDirectory/components/index.d.ts +1 -0
- package/dist/components/Documents/components/DocumentsActions/DocumentsActions.d.ts +7 -0
- package/dist/components/Documents/components/DocumentsActions/components/DocActionButton/DocActionButton.d.ts +10 -0
- package/dist/components/Documents/components/DocumentsActions/components/DocumentsUpload/DocumentsUpload.d.ts +10 -0
- package/dist/components/Documents/components/DocumentsActions/components/DocumentsUpload/componenets/UploadFilesModal/UploadFilesModal.d.ts +7 -0
- package/dist/components/Documents/components/DocumentsActions/components/DocumentsUpload/componenets/UploadFilesModal/hooks/useUploadFilesFormSchema.d.ts +18 -0
- package/dist/components/Documents/components/DocumentsActions/components/DocumentsUpload/componenets/index.d.ts +1 -0
- package/dist/components/Documents/components/DocumentsActions/components/index.d.ts +2 -0
- package/dist/components/Documents/components/DocumentsFilesTable/DocumentsFilesTable.d.ts +6 -0
- package/dist/components/Documents/components/DocumentsFilesTable/hooks/useDocumentsFilesColumns.d.ts +11 -0
- package/dist/components/Documents/components/DocumentsModals/DocumentsModals.d.ts +2 -0
- package/dist/components/Documents/components/DocumentsModals/components/CreateFolderModal/CreateFolderModal.d.ts +5 -0
- package/dist/components/Documents/components/DocumentsModals/components/CreateFolderModal/hooks/useDocCreateFolderForm.d.ts +13 -0
- package/dist/components/Documents/components/DocumentsModals/components/EditFileModal/EditFileModal.d.ts +5 -0
- package/dist/components/Documents/components/DocumentsModals/components/EditFileModal/EditFileModalInner.d.ts +8 -0
- package/dist/components/Documents/components/DocumentsModals/components/EditFileModal/hooks/useEditFileForm.d.ts +18 -0
- package/dist/components/Documents/components/DocumentsModals/components/index.d.ts +2 -0
- package/dist/components/Documents/components/DocumentsModals/types/DocumentsModalType.d.ts +2 -0
- package/dist/components/Documents/components/DocumentsRoot/DocumentsRoot.d.ts +5 -0
- package/dist/components/Documents/components/FileExtensionIcon/FileExtensionIcon.d.ts +7 -0
- package/dist/components/Documents/components/index.d.ts +6 -0
- package/dist/components/Documents/contexts/DocumentsContext.d.ts +13 -0
- package/dist/components/Documents/hooks/useDocContextApiActions.d.ts +17 -0
- package/dist/components/Documents/hooks/useDocumentsApiActions.d.ts +7 -0
- package/dist/components/Documents/hooks/useDocumentsDrag.d.ts +19 -0
- package/dist/components/Documents/hooks/useDocumentsReducer.d.ts +91 -0
- package/dist/components/Documents/index.d.ts +2 -0
- package/dist/components/Documents/types/api/DocType.d.ts +6 -0
- package/dist/components/Documents/types/api/DocumentFileModel.d.ts +18 -0
- package/dist/components/Documents/types/api/DocumentFolderModel.d.ts +9 -0
- package/dist/components/Documents/types/api/DocumentListModel.d.ts +8 -0
- package/dist/components/Documents/types/api/DocumentUploadModel.d.ts +6 -0
- package/dist/components/Documents/types/api/DocumentsCreateFolderModel.d.ts +8 -0
- package/dist/components/Documents/types/ui/DocumentFile.d.ts +6 -0
- package/dist/components/Documents/types/ui/DocumentFolder.d.ts +10 -0
- package/dist/components/Documents/types/ui/DocumentState.d.ts +2 -0
- package/dist/components/Documents/types/ui/DocumentsActionsObj.d.ts +14 -0
- package/dist/components/Documents/types/ui/DocumentsFolderId.d.ts +2 -0
- package/dist/components/Documents/types/ui/FileDirType.d.ts +2 -0
- package/dist/components/Documents/utils/documentsConstants.d.ts +1 -0
- package/dist/components/Documents/utils/documentsDataUtils.d.ts +12 -0
- package/dist/components/Documents/utils/documentsTypeUtils.d.ts +4 -0
- package/dist/components/Documents/utils/documentsUtils.d.ts +7 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +103 -105
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +40 -2968
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +18 -18
- package/dist/main.cjs.js +2 -2
- package/dist/main.d.ts +2 -0
- package/dist/main.es.js +2958 -3364
- package/dist/models/luminus-context-types/CommonLuminusIcons.d.ts +1 -1
- package/dist/models/texts/ComponentsContextTexts.d.ts +2 -0
- package/dist/models/texts/DocumentsTexts.d.ts +45 -0
- package/dist/nivo-pie.es-CWpL5Qz1.cjs +279 -0
- package/dist/nivo-pie.es-CfGrs0qQ.js +21226 -0
- package/dist/{searchUtils-C-P7nqmc.js → searchUtils-6cFIcqrD.js} +1 -1
- package/dist/{searchUtils-Bwcn0kNN.cjs → searchUtils-eG-nNTgU.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/useClipboard-BbFBkj-c.cjs +1 -0
- package/dist/{useClipboard-Ci3XItTi.js → useClipboard-BsBDyYHu.js} +12 -13
- package/dist/useLocalStorageState-B8C3HlW-.cjs +1 -0
- package/dist/useLocalStorageState-D9uh-D8S.js +64 -0
- package/dist/{usePermissions-CDkc5n4B.cjs → usePermissions-D3jEVB-f.cjs} +1 -1
- package/dist/{usePermissions-D1kTfy1F.js → usePermissions-DInna_ZH.js} +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +70 -105
- package/dist/variables.scss +171 -171
- package/package.json +111 -109
- package/dist/PrimaryButton-DHWMFBqe.js +0 -682
- package/dist/PrimaryButton-DoEWPvdG.cjs +0 -1
- package/dist/SimpleTooltip-DIbveCyg.js +0 -5
- package/dist/dateUtils-DBObp1Kn.js +0 -1402
- package/dist/dateUtils-UEaQDw00.cjs +0 -1
- package/dist/nivo-pie.es-CYja6R0y.cjs +0 -279
- package/dist/nivo-pie.es-DbylxdLa.js +0 -14728
- package/dist/useClipboard-KQiedKAp.cjs +0 -1
- package/dist/useConfirm-BFRnARZA.js +0 -18
- package/dist/useConfirm-SzzUX_WZ.cjs +0 -1
- package/dist/useLocalStorageState-C2fAE5hY.cjs +0 -1
- package/dist/useLocalStorageState-OXK3MAPN.js +0 -72
|
@@ -1,682 +0,0 @@
|
|
|
1
|
-
import { j as r, c as d, P as D, M as tt, v as R, J as nt, ax as be, ay as Se, o as V, G as $e, az as ot, aA as st, w as T, aB as je, aC as ke, aD as Le, aE as at, aF as _e, aG as rt, A as it, I as lt, L as dt, aH as Oe, F as De, H as ct, aI as ut } from "./nivo-pie.es-DbylxdLa.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 Ee, 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", Et = "_third_rgybp_17", bt = "_loadingBlock_rgybp_21", F = {
|
|
7
|
-
loading: yt,
|
|
8
|
-
"spinner-grow": "_spinner-grow_rgybp_10",
|
|
9
|
-
spinnerGrow: wt,
|
|
10
|
-
second: vt,
|
|
11
|
-
third: Et,
|
|
12
|
-
loadingBlock: bt
|
|
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 xt(t) {
|
|
59
|
-
return `${Rt}${t}`;
|
|
60
|
-
}
|
|
61
|
-
const jt = {
|
|
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 = jt;
|
|
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) && be) {
|
|
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 kt(t = document) {
|
|
137
|
-
const e = t.defaultView;
|
|
138
|
-
return Math.abs(e.innerWidth - t.documentElement.clientWidth);
|
|
139
|
-
}
|
|
140
|
-
const Ae = xt("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 kt(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 = {};
|
|
194
|
-
for (var o in t) if ({}.hasOwnProperty.call(t, o)) {
|
|
195
|
-
if (e.indexOf(o) >= 0) continue;
|
|
196
|
-
n[o] = t[o];
|
|
197
|
-
}
|
|
198
|
-
return n;
|
|
199
|
-
}
|
|
200
|
-
let pe;
|
|
201
|
-
function Bt(t) {
|
|
202
|
-
return pe || (pe = new Me({
|
|
203
|
-
ownerDocument: t == null ? void 0 : t.document
|
|
204
|
-
})), pe;
|
|
205
|
-
}
|
|
206
|
-
function At(t) {
|
|
207
|
-
const e = $e(), n = t || Bt(e), o = N({
|
|
208
|
-
dialog: null,
|
|
209
|
-
backdrop: null
|
|
210
|
-
});
|
|
211
|
-
return Object.assign(o.current, {
|
|
212
|
-
add: () => n.add(o.current),
|
|
213
|
-
remove: () => n.remove(o.current),
|
|
214
|
-
isTopModal: () => n.isTopModal(o.current),
|
|
215
|
-
setDialogRef: Ee((s) => {
|
|
216
|
-
o.current.dialog = s;
|
|
217
|
-
}, []),
|
|
218
|
-
setBackdropRef: Ee((s) => {
|
|
219
|
-
o.current.backdrop = s;
|
|
220
|
-
}, [])
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
const He = /* @__PURE__ */ ft((t, e) => {
|
|
224
|
-
let {
|
|
225
|
-
show: n = !1,
|
|
226
|
-
role: o = "dialog",
|
|
227
|
-
className: s,
|
|
228
|
-
style: a,
|
|
229
|
-
children: h,
|
|
230
|
-
backdrop: f = !0,
|
|
231
|
-
keyboard: p = !0,
|
|
232
|
-
onBackdropClick: v,
|
|
233
|
-
onEscapeKeyDown: m,
|
|
234
|
-
transition: M,
|
|
235
|
-
runTransition: y,
|
|
236
|
-
backdropTransition: w,
|
|
237
|
-
runBackdropTransition: se,
|
|
238
|
-
autoFocus: z = !0,
|
|
239
|
-
enforceFocus: ae = !0,
|
|
240
|
-
restoreFocus: x = !0,
|
|
241
|
-
restoreFocusOptions: re,
|
|
242
|
-
renderDialog: X,
|
|
243
|
-
renderBackdrop: ie = (l) => /* @__PURE__ */ r.jsx("div", Object.assign({}, l)),
|
|
244
|
-
manager: le,
|
|
245
|
-
container: de,
|
|
246
|
-
onShow: q,
|
|
247
|
-
onHide: I = () => {
|
|
248
|
-
},
|
|
249
|
-
onExit: ce,
|
|
250
|
-
onExited: W,
|
|
251
|
-
onExiting: Y,
|
|
252
|
-
onEnter: J,
|
|
253
|
-
onEntering: Q,
|
|
254
|
-
onEntered: Z
|
|
255
|
-
} = t, ue = Ot(t, _t);
|
|
256
|
-
const E = $e(), j = ot(de), c = At(le), fe = st(), P = Nt(n), [C, k] = ve(!n), g = N(null);
|
|
257
|
-
mt(e, () => c, [c]), be && !P && n && (g.current = he(E == null ? void 0 : E.document)), n && C && k(!1);
|
|
258
|
-
const b = T(() => {
|
|
259
|
-
if (c.add(), _.current = je(document, "keydown", ge), G.current = je(
|
|
260
|
-
document,
|
|
261
|
-
"focus",
|
|
262
|
-
// the timeout is necessary b/c this will run before the new modal is mounted
|
|
263
|
-
// and so steals focus from it
|
|
264
|
-
() => setTimeout(me),
|
|
265
|
-
!0
|
|
266
|
-
), q && q(), z) {
|
|
267
|
-
var l, ne;
|
|
268
|
-
const U = he((l = (ne = c.dialog) == null ? void 0 : ne.ownerDocument) != null ? l : E == null ? void 0 : E.document);
|
|
269
|
-
c.dialog && U && !ke(c.dialog, U) && (g.current = U, c.dialog.focus());
|
|
270
|
-
}
|
|
271
|
-
}), H = T(() => {
|
|
272
|
-
if (c.remove(), _.current == null || _.current(), G.current == null || G.current(), x) {
|
|
273
|
-
var l;
|
|
274
|
-
(l = g.current) == null || l.focus == null || l.focus(re), g.current = null;
|
|
275
|
-
}
|
|
276
|
-
});
|
|
277
|
-
we(() => {
|
|
278
|
-
!n || !j || b();
|
|
279
|
-
}, [
|
|
280
|
-
n,
|
|
281
|
-
j,
|
|
282
|
-
/* should never change: */
|
|
283
|
-
b
|
|
284
|
-
]), we(() => {
|
|
285
|
-
C && H();
|
|
286
|
-
}, [C, H]), Le(() => {
|
|
287
|
-
H();
|
|
288
|
-
});
|
|
289
|
-
const me = T(() => {
|
|
290
|
-
if (!ae || !fe() || !c.isTopModal())
|
|
291
|
-
return;
|
|
292
|
-
const l = he(E == null ? void 0 : E.document);
|
|
293
|
-
c.dialog && l && !ke(c.dialog, l) && c.dialog.focus();
|
|
294
|
-
}), ee = T((l) => {
|
|
295
|
-
l.target === l.currentTarget && (v == null || v(l), f === !0 && I());
|
|
296
|
-
}), ge = T((l) => {
|
|
297
|
-
p && at(l) && c.isTopModal() && (m == null || m(l), l.defaultPrevented || I());
|
|
298
|
-
}), G = N(), _ = N(), te = (...l) => {
|
|
299
|
-
k(!0), W == null || W(...l);
|
|
300
|
-
};
|
|
301
|
-
if (!j)
|
|
302
|
-
return null;
|
|
303
|
-
const O = Object.assign({
|
|
304
|
-
role: o,
|
|
305
|
-
ref: c.setDialogRef,
|
|
306
|
-
// apparently only works on the dialog role element
|
|
307
|
-
"aria-modal": o === "dialog" ? !0 : void 0
|
|
308
|
-
}, ue, {
|
|
309
|
-
style: a,
|
|
310
|
-
className: s,
|
|
311
|
-
tabIndex: -1
|
|
312
|
-
});
|
|
313
|
-
let K = X ? X(O) : /* @__PURE__ */ r.jsx("div", Object.assign({}, O, {
|
|
314
|
-
children: /* @__PURE__ */ u.cloneElement(h, {
|
|
315
|
-
role: "document"
|
|
316
|
-
})
|
|
317
|
-
}));
|
|
318
|
-
K = _e(M, y, {
|
|
319
|
-
unmountOnExit: !0,
|
|
320
|
-
mountOnEnter: !0,
|
|
321
|
-
appear: !0,
|
|
322
|
-
in: !!n,
|
|
323
|
-
onExit: ce,
|
|
324
|
-
onExiting: Y,
|
|
325
|
-
onExited: te,
|
|
326
|
-
onEnter: J,
|
|
327
|
-
onEntering: Q,
|
|
328
|
-
onEntered: Z,
|
|
329
|
-
children: K
|
|
330
|
-
});
|
|
331
|
-
let B = null;
|
|
332
|
-
return f && (B = ie({
|
|
333
|
-
ref: c.setBackdropRef,
|
|
334
|
-
onClick: ee
|
|
335
|
-
}), B = _e(w, se, {
|
|
336
|
-
in: !!n,
|
|
337
|
-
appear: !0,
|
|
338
|
-
mountOnEnter: !0,
|
|
339
|
-
unmountOnExit: !0,
|
|
340
|
-
children: B
|
|
341
|
-
})), /* @__PURE__ */ r.jsx(r.Fragment, {
|
|
342
|
-
children: /* @__PURE__ */ ht.createPortal(/* @__PURE__ */ r.jsxs(r.Fragment, {
|
|
343
|
-
children: [B, K]
|
|
344
|
-
}), j)
|
|
345
|
-
});
|
|
346
|
-
});
|
|
347
|
-
He.displayName = "Modal";
|
|
348
|
-
const Ft = Object.assign(He, {
|
|
349
|
-
Manager: Me
|
|
350
|
-
});
|
|
351
|
-
function St(t, e) {
|
|
352
|
-
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));
|
|
353
|
-
}
|
|
354
|
-
function Fe(t, e) {
|
|
355
|
-
return t.replace(new RegExp("(^|\\s)" + e + "(?:\\s|$)", "g"), "$1").replace(/\s+/g, " ").replace(/^\s*|\s*$/g, "");
|
|
356
|
-
}
|
|
357
|
-
function $t(t, e) {
|
|
358
|
-
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));
|
|
359
|
-
}
|
|
360
|
-
const $ = {
|
|
361
|
-
FIXED_CONTENT: ".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",
|
|
362
|
-
STICKY_CONTENT: ".sticky-top",
|
|
363
|
-
NAVBAR_TOGGLER: ".navbar-toggler"
|
|
364
|
-
};
|
|
365
|
-
class Lt extends Me {
|
|
366
|
-
adjustAndStore(e, n, o) {
|
|
367
|
-
const s = n.style[e];
|
|
368
|
-
n.dataset[e] = s, V(n, {
|
|
369
|
-
[e]: `${parseFloat(V(n, e)) + o}px`
|
|
370
|
-
});
|
|
371
|
-
}
|
|
372
|
-
restore(e, n) {
|
|
373
|
-
const o = n.dataset[e];
|
|
374
|
-
o !== void 0 && (delete n.dataset[e], V(n, {
|
|
375
|
-
[e]: o
|
|
376
|
-
}));
|
|
377
|
-
}
|
|
378
|
-
setContainerStyle(e) {
|
|
379
|
-
super.setContainerStyle(e);
|
|
380
|
-
const n = this.getElement();
|
|
381
|
-
if (St(n, "modal-open"), !e.scrollBarWidth) return;
|
|
382
|
-
const o = this.isRTL ? "paddingLeft" : "paddingRight", s = this.isRTL ? "marginLeft" : "marginRight";
|
|
383
|
-
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));
|
|
384
|
-
}
|
|
385
|
-
removeContainerStyle(e) {
|
|
386
|
-
super.removeContainerStyle(e);
|
|
387
|
-
const n = this.getElement();
|
|
388
|
-
$t(n, "modal-open");
|
|
389
|
-
const o = this.isRTL ? "paddingLeft" : "paddingRight", s = this.isRTL ? "marginLeft" : "marginRight";
|
|
390
|
-
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));
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
let ye;
|
|
394
|
-
function Dt(t) {
|
|
395
|
-
return ye || (ye = new Lt(t)), ye;
|
|
396
|
-
}
|
|
397
|
-
const Ge = /* @__PURE__ */ u.forwardRef(({
|
|
398
|
-
className: t,
|
|
399
|
-
bsPrefix: e,
|
|
400
|
-
as: n = "div",
|
|
401
|
-
...o
|
|
402
|
-
}, s) => (e = R(e, "modal-body"), /* @__PURE__ */ r.jsx(n, {
|
|
403
|
-
ref: s,
|
|
404
|
-
className: d(t, e),
|
|
405
|
-
...o
|
|
406
|
-
})));
|
|
407
|
-
Ge.displayName = "ModalBody";
|
|
408
|
-
const Ke = /* @__PURE__ */ u.createContext({
|
|
409
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
410
|
-
onHide() {
|
|
411
|
-
}
|
|
412
|
-
}), Ce = /* @__PURE__ */ u.forwardRef(({
|
|
413
|
-
bsPrefix: t,
|
|
414
|
-
className: e,
|
|
415
|
-
contentClassName: n,
|
|
416
|
-
centered: o,
|
|
417
|
-
size: s,
|
|
418
|
-
fullscreen: a,
|
|
419
|
-
children: h,
|
|
420
|
-
scrollable: f,
|
|
421
|
-
...p
|
|
422
|
-
}, v) => {
|
|
423
|
-
t = R(t, "modal");
|
|
424
|
-
const m = `${t}-dialog`, M = typeof a == "string" ? `${t}-fullscreen-${a}` : `${t}-fullscreen`;
|
|
425
|
-
return /* @__PURE__ */ r.jsx("div", {
|
|
426
|
-
...p,
|
|
427
|
-
ref: v,
|
|
428
|
-
className: d(m, e, s && `${t}-${s}`, o && `${m}-centered`, f && `${m}-scrollable`, a && M),
|
|
429
|
-
children: /* @__PURE__ */ r.jsx("div", {
|
|
430
|
-
className: d(`${t}-content`, n),
|
|
431
|
-
children: h
|
|
432
|
-
})
|
|
433
|
-
});
|
|
434
|
-
});
|
|
435
|
-
Ce.displayName = "ModalDialog";
|
|
436
|
-
const Ue = /* @__PURE__ */ u.forwardRef(({
|
|
437
|
-
className: t,
|
|
438
|
-
bsPrefix: e,
|
|
439
|
-
as: n = "div",
|
|
440
|
-
...o
|
|
441
|
-
}, s) => (e = R(e, "modal-footer"), /* @__PURE__ */ r.jsx(n, {
|
|
442
|
-
ref: s,
|
|
443
|
-
className: d(t, e),
|
|
444
|
-
...o
|
|
445
|
-
})));
|
|
446
|
-
Ue.displayName = "ModalFooter";
|
|
447
|
-
const It = /* @__PURE__ */ u.forwardRef(({
|
|
448
|
-
closeLabel: t = "Close",
|
|
449
|
-
closeVariant: e,
|
|
450
|
-
closeButton: n = !1,
|
|
451
|
-
onHide: o,
|
|
452
|
-
children: s,
|
|
453
|
-
...a
|
|
454
|
-
}, h) => {
|
|
455
|
-
const f = Ie(Ke), p = T(() => {
|
|
456
|
-
f == null || f.onHide(), o == null || o();
|
|
457
|
-
});
|
|
458
|
-
return /* @__PURE__ */ r.jsxs("div", {
|
|
459
|
-
ref: h,
|
|
460
|
-
...a,
|
|
461
|
-
children: [s, n && /* @__PURE__ */ r.jsx(Te, {
|
|
462
|
-
"aria-label": t,
|
|
463
|
-
variant: e,
|
|
464
|
-
onClick: p
|
|
465
|
-
})]
|
|
466
|
-
});
|
|
467
|
-
}), Ve = /* @__PURE__ */ u.forwardRef(({
|
|
468
|
-
bsPrefix: t,
|
|
469
|
-
className: e,
|
|
470
|
-
closeLabel: n = "Close",
|
|
471
|
-
closeButton: o = !1,
|
|
472
|
-
...s
|
|
473
|
-
}, a) => (t = R(t, "modal-header"), /* @__PURE__ */ r.jsx(It, {
|
|
474
|
-
ref: a,
|
|
475
|
-
...s,
|
|
476
|
-
className: d(e, t),
|
|
477
|
-
closeLabel: n,
|
|
478
|
-
closeButton: o
|
|
479
|
-
})));
|
|
480
|
-
Ve.displayName = "ModalHeader";
|
|
481
|
-
const Wt = Tt("h4"), ze = /* @__PURE__ */ u.forwardRef(({
|
|
482
|
-
className: t,
|
|
483
|
-
bsPrefix: e,
|
|
484
|
-
as: n = Wt,
|
|
485
|
-
...o
|
|
486
|
-
}, s) => (e = R(e, "modal-title"), /* @__PURE__ */ r.jsx(n, {
|
|
487
|
-
ref: s,
|
|
488
|
-
className: d(t, e),
|
|
489
|
-
...o
|
|
490
|
-
})));
|
|
491
|
-
ze.displayName = "ModalTitle";
|
|
492
|
-
function Ht(t) {
|
|
493
|
-
return /* @__PURE__ */ r.jsx(De, {
|
|
494
|
-
...t,
|
|
495
|
-
timeout: null
|
|
496
|
-
});
|
|
497
|
-
}
|
|
498
|
-
function Gt(t) {
|
|
499
|
-
return /* @__PURE__ */ r.jsx(De, {
|
|
500
|
-
...t,
|
|
501
|
-
timeout: null
|
|
502
|
-
});
|
|
503
|
-
}
|
|
504
|
-
const Xe = /* @__PURE__ */ u.forwardRef(({
|
|
505
|
-
bsPrefix: t,
|
|
506
|
-
className: e,
|
|
507
|
-
style: n,
|
|
508
|
-
dialogClassName: o,
|
|
509
|
-
contentClassName: s,
|
|
510
|
-
children: a,
|
|
511
|
-
dialogAs: h = Ce,
|
|
512
|
-
"data-bs-theme": f,
|
|
513
|
-
"aria-labelledby": p,
|
|
514
|
-
"aria-describedby": v,
|
|
515
|
-
"aria-label": m,
|
|
516
|
-
/* BaseModal props */
|
|
517
|
-
show: M = !1,
|
|
518
|
-
animation: y = !0,
|
|
519
|
-
backdrop: w = !0,
|
|
520
|
-
keyboard: se = !0,
|
|
521
|
-
onEscapeKeyDown: z,
|
|
522
|
-
onShow: ae,
|
|
523
|
-
onHide: x,
|
|
524
|
-
container: re,
|
|
525
|
-
autoFocus: X = !0,
|
|
526
|
-
enforceFocus: ie = !0,
|
|
527
|
-
restoreFocus: le = !0,
|
|
528
|
-
restoreFocusOptions: de,
|
|
529
|
-
onEntered: q,
|
|
530
|
-
onExit: I,
|
|
531
|
-
onExiting: ce,
|
|
532
|
-
onEnter: W,
|
|
533
|
-
onEntering: Y,
|
|
534
|
-
onExited: J,
|
|
535
|
-
backdropClassName: Q,
|
|
536
|
-
manager: Z,
|
|
537
|
-
...ue
|
|
538
|
-
}, E) => {
|
|
539
|
-
const [j, c] = ve({}), [fe, P] = ve(!1), C = N(!1), k = N(!1), g = N(null), [b, H] = it(), me = lt(E, H), ee = T(x), ge = dt();
|
|
540
|
-
t = R(t, "modal");
|
|
541
|
-
const G = gt(() => ({
|
|
542
|
-
onHide: ee
|
|
543
|
-
}), [ee]);
|
|
544
|
-
function _() {
|
|
545
|
-
return Z || Dt({
|
|
546
|
-
isRTL: ge
|
|
547
|
-
});
|
|
548
|
-
}
|
|
549
|
-
function te(i) {
|
|
550
|
-
if (!be) return;
|
|
551
|
-
const A = _().getScrollbarWidth() > 0, xe = i.scrollHeight > Se(i).documentElement.clientHeight;
|
|
552
|
-
c({
|
|
553
|
-
paddingRight: A && !xe ? Be() : void 0,
|
|
554
|
-
paddingLeft: !A && xe ? Be() : void 0
|
|
555
|
-
});
|
|
556
|
-
}
|
|
557
|
-
const O = T(() => {
|
|
558
|
-
b && te(b.dialog);
|
|
559
|
-
});
|
|
560
|
-
Le(() => {
|
|
561
|
-
Oe(window, "resize", O), g.current == null || g.current();
|
|
562
|
-
});
|
|
563
|
-
const K = () => {
|
|
564
|
-
C.current = !0;
|
|
565
|
-
}, B = (i) => {
|
|
566
|
-
C.current && b && i.target === b.dialog && (k.current = !0), C.current = !1;
|
|
567
|
-
}, l = () => {
|
|
568
|
-
P(!0), g.current = ut(b.dialog, () => {
|
|
569
|
-
P(!1);
|
|
570
|
-
});
|
|
571
|
-
}, ne = (i) => {
|
|
572
|
-
i.target === i.currentTarget && l();
|
|
573
|
-
}, U = (i) => {
|
|
574
|
-
if (w === "static") {
|
|
575
|
-
ne(i);
|
|
576
|
-
return;
|
|
577
|
-
}
|
|
578
|
-
if (k.current || i.target !== i.currentTarget) {
|
|
579
|
-
k.current = !1;
|
|
580
|
-
return;
|
|
581
|
-
}
|
|
582
|
-
x == null || x();
|
|
583
|
-
}, qe = (i) => {
|
|
584
|
-
se ? z == null || z(i) : (i.preventDefault(), w === "static" && l());
|
|
585
|
-
}, Ye = (i, A) => {
|
|
586
|
-
i && te(i), W == null || W(i, A);
|
|
587
|
-
}, Je = (i) => {
|
|
588
|
-
g.current == null || g.current(), I == null || I(i);
|
|
589
|
-
}, Qe = (i, A) => {
|
|
590
|
-
Y == null || Y(i, A), ct(window, "resize", O);
|
|
591
|
-
}, Ze = (i) => {
|
|
592
|
-
i && (i.style.display = ""), J == null || J(i), Oe(window, "resize", O);
|
|
593
|
-
}, Pe = Ee((i) => /* @__PURE__ */ r.jsx("div", {
|
|
594
|
-
...i,
|
|
595
|
-
className: d(`${t}-backdrop`, Q, !y && "show")
|
|
596
|
-
}), [y, Q, t]), Re = {
|
|
597
|
-
...n,
|
|
598
|
-
...j
|
|
599
|
-
};
|
|
600
|
-
Re.display = "block";
|
|
601
|
-
const et = (i) => /* @__PURE__ */ r.jsx("div", {
|
|
602
|
-
role: "dialog",
|
|
603
|
-
...i,
|
|
604
|
-
style: Re,
|
|
605
|
-
className: d(e, t, fe && `${t}-static`, !y && "show"),
|
|
606
|
-
onClick: w ? U : void 0,
|
|
607
|
-
onMouseUp: B,
|
|
608
|
-
"data-bs-theme": f,
|
|
609
|
-
"aria-label": m,
|
|
610
|
-
"aria-labelledby": p,
|
|
611
|
-
"aria-describedby": v,
|
|
612
|
-
children: /* @__PURE__ */ r.jsx(h, {
|
|
613
|
-
...ue,
|
|
614
|
-
onMouseDown: K,
|
|
615
|
-
className: o,
|
|
616
|
-
contentClassName: s,
|
|
617
|
-
children: a
|
|
618
|
-
})
|
|
619
|
-
});
|
|
620
|
-
return /* @__PURE__ */ r.jsx(Ke.Provider, {
|
|
621
|
-
value: G,
|
|
622
|
-
children: /* @__PURE__ */ r.jsx(Ft, {
|
|
623
|
-
show: M,
|
|
624
|
-
ref: me,
|
|
625
|
-
backdrop: w,
|
|
626
|
-
container: re,
|
|
627
|
-
keyboard: !0,
|
|
628
|
-
autoFocus: X,
|
|
629
|
-
enforceFocus: ie,
|
|
630
|
-
restoreFocus: le,
|
|
631
|
-
restoreFocusOptions: de,
|
|
632
|
-
onEscapeKeyDown: qe,
|
|
633
|
-
onShow: ae,
|
|
634
|
-
onHide: x,
|
|
635
|
-
onEnter: Ye,
|
|
636
|
-
onEntering: Qe,
|
|
637
|
-
onEntered: q,
|
|
638
|
-
onExit: Je,
|
|
639
|
-
onExiting: ce,
|
|
640
|
-
onExited: Ze,
|
|
641
|
-
manager: _(),
|
|
642
|
-
transition: y ? Ht : void 0,
|
|
643
|
-
backdropTransition: y ? Gt : void 0,
|
|
644
|
-
renderBackdrop: Pe,
|
|
645
|
-
renderDialog: et
|
|
646
|
-
})
|
|
647
|
-
});
|
|
648
|
-
});
|
|
649
|
-
Xe.displayName = "Modal";
|
|
650
|
-
const en = Object.assign(Xe, {
|
|
651
|
-
Body: Ge,
|
|
652
|
-
Header: Ve,
|
|
653
|
-
Title: ze,
|
|
654
|
-
Footer: Ue,
|
|
655
|
-
Dialog: Ce,
|
|
656
|
-
TRANSITION_DURATION: 300,
|
|
657
|
-
BACKDROP_TRANSITION_DURATION: 150
|
|
658
|
-
}), Kt = "_button_1wjon_1", Ut = "_filled_1wjon_7", Vt = "_sm_1wjon_13", zt = "_md_1wjon_18", Xt = "_lg_1wjon_23", L = {
|
|
659
|
-
button: Kt,
|
|
660
|
-
filled: Ut,
|
|
661
|
-
sm: Vt,
|
|
662
|
-
md: zt,
|
|
663
|
-
lg: Xt
|
|
664
|
-
}, 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;
|
|
665
|
-
export {
|
|
666
|
-
It as A,
|
|
667
|
-
Ft as B,
|
|
668
|
-
Te as C,
|
|
669
|
-
Ne as F,
|
|
670
|
-
Zt as L,
|
|
671
|
-
Ke as M,
|
|
672
|
-
tn as P,
|
|
673
|
-
xt as a,
|
|
674
|
-
Pt as b,
|
|
675
|
-
F as c,
|
|
676
|
-
Tt as d,
|
|
677
|
-
Lt as e,
|
|
678
|
-
en as f,
|
|
679
|
-
Dt as g,
|
|
680
|
-
S as q,
|
|
681
|
-
Nt as u
|
|
682
|
-
};
|