monobill-mintui 0.6.680 → 0.6.682
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/components/alert/browser.js +3 -8
- package/dist/components/alert/index.cjs +1 -1
- package/dist/components/alert/index.js +3 -8
- package/dist/components/back-button/browser.js +1 -1
- package/dist/components/back-button/index.cjs +1 -1
- package/dist/components/back-button/index.js +1 -1
- package/dist/components/button/browser.js +1 -1
- package/dist/components/button/index.cjs +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/chip/browser.js +1 -1
- package/dist/components/chip/index.cjs +1 -1
- package/dist/components/chip/index.js +1 -1
- package/dist/components/chunks/{back-button-DM9ajnIB.js → back-button-cGUnOwR0.js} +1 -1
- package/dist/components/chunks/{back-button-E389glZH.js → back-button-olXJu_Sg.js} +1 -1
- package/dist/components/chunks/{button-D-NMERaG.js → button-B3VB87bu.js} +1 -1
- package/dist/components/chunks/{button-WCO2Tpah.js → button-kbb_mcUl.js} +1 -1
- package/dist/components/chunks/{chip-Ct2fr0ce.js → chip-DAtL5k_M.js} +1 -1
- package/dist/components/chunks/{chip-DovN-Bp2.js → chip-DUz4yd1g.js} +1 -1
- package/dist/components/chunks/{confirm-action-CgiQX3-2.js → confirm-action-CnPIYT3p.js} +3 -3
- package/dist/components/chunks/{confirm-action-BMb31P5R.js → confirm-action-DbbXuKLM.js} +1 -1
- package/dist/components/chunks/{date-picker-BSw2O7ZD.js → date-picker-Drb3TIOp.js} +1 -1
- package/dist/components/chunks/{date-picker-BVZKsafj.js → date-picker-Ip1NrxP9.js} +3 -3
- package/dist/components/chunks/{input-CNG7PaSY.js → input-Cbpk3dfA.js} +1 -1
- package/dist/components/chunks/{input-DzTy1_ke.js → input-Dqa8FmcB.js} +1 -1
- package/dist/components/chunks/{modal-7h_ECXDc.js → modal-CZARWHo8.js} +1 -1
- package/dist/components/chunks/{modal-lOXK_Bj-.js → modal-XaqMQTPn.js} +3 -3
- package/dist/components/chunks/{popover-eTECdkG7.js → popover-Bek5fgHz.js} +1 -1
- package/dist/components/chunks/{popover-BAXGWQgn.js → popover-co0gSvD-.js} +1 -1
- package/dist/components/chunks/{table-B9e-cnAC.js → table-B_g7lNzN.js} +1 -1
- package/dist/components/chunks/{table-vjF3q3J5.js → table-slcPmVWy.js} +1 -1
- package/dist/components/chunks/{time-picker-EefLx837.js → time-picker-C9TxayLS.js} +1 -1
- package/dist/components/chunks/{time-picker-CwHfWKcg.js → time-picker-uJ2DcTIE.js} +3 -3
- package/dist/components/chunks/warning-BmMe8nCm.js +9 -0
- package/dist/components/chunks/warning-DJFJUqRZ.js +1 -0
- package/dist/components/confirm-action/browser.js +1 -1
- package/dist/components/confirm-action/index.cjs +1 -1
- package/dist/components/confirm-action/index.js +1 -1
- package/dist/components/date-picker/browser.js +1 -1
- package/dist/components/date-picker/index.cjs +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/datetime-picker/browser.js +3 -3
- package/dist/components/datetime-picker/index.cjs +1 -1
- package/dist/components/datetime-picker/index.js +3 -3
- package/dist/components/dropzone/Dropzone.d.ts +25 -0
- package/dist/components/dropzone/Dropzone.d.ts.map +1 -1
- package/dist/components/dropzone/browser.js +128 -30
- package/dist/components/dropzone/index.cjs +1 -1
- package/dist/components/dropzone/index.d.ts +1 -0
- package/dist/components/dropzone/index.d.ts.map +1 -1
- package/dist/components/dropzone/index.js +128 -30
- package/dist/components/input/browser.js +1 -1
- package/dist/components/input/index.cjs +1 -1
- package/dist/components/input/index.js +1 -1
- package/dist/components/link/browser.js +1 -1
- package/dist/components/link/index.cjs +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/modal/browser.js +1 -1
- package/dist/components/modal/index.cjs +1 -1
- package/dist/components/modal/index.js +1 -1
- package/dist/components/navigation/browser.js +3 -3
- package/dist/components/navigation/index.cjs +1 -1
- package/dist/components/navigation/index.js +3 -3
- package/dist/components/off-canvas/browser.js +3 -3
- package/dist/components/off-canvas/index.cjs +1 -1
- package/dist/components/off-canvas/index.js +3 -3
- package/dist/components/page/browser.js +3 -3
- package/dist/components/page/index.cjs +1 -1
- package/dist/components/page/index.js +3 -3
- package/dist/components/popover/browser.js +1 -1
- package/dist/components/popover/index.cjs +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/resource-table/browser.js +8 -8
- package/dist/components/resource-table/index.cjs +1 -1
- package/dist/components/resource-table/index.js +8 -8
- package/dist/components/scroll-fade/browser.js +1 -1
- package/dist/components/scroll-fade/index.cjs +1 -1
- package/dist/components/scroll-fade/index.js +1 -1
- package/dist/components/search/browser.js +5 -5
- package/dist/components/search/index.cjs +1 -1
- package/dist/components/search/index.js +5 -5
- package/dist/components/select/browser.js +1 -1
- package/dist/components/select/index.cjs +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/side-navigation/browser.js +5 -5
- package/dist/components/side-navigation/index.cjs +1 -1
- package/dist/components/side-navigation/index.js +5 -5
- package/dist/components/sortable/browser.js +1 -1
- package/dist/components/sortable/index.cjs +1 -1
- package/dist/components/sortable/index.js +1 -1
- package/dist/components/spinner/browser.js +1 -1
- package/dist/components/spinner/index.cjs +1 -1
- package/dist/components/spinner/index.js +1 -1
- package/dist/components/stack/browser.js +1 -1
- package/dist/components/stack/index.cjs +1 -1
- package/dist/components/stack/index.js +1 -1
- package/dist/components/table/browser.js +1 -1
- package/dist/components/table/index.cjs +1 -1
- package/dist/components/table/index.js +1 -1
- package/dist/components/tags/browser.js +3 -3
- package/dist/components/tags/index.cjs +1 -1
- package/dist/components/tags/index.js +3 -3
- package/dist/components/text/browser.js +1 -1
- package/dist/components/text/index.cjs +1 -1
- package/dist/components/text/index.js +1 -1
- package/dist/components/time-picker/browser.js +1 -1
- package/dist/components/time-picker/index.cjs +1 -1
- package/dist/components/time-picker/index.js +1 -1
- package/dist/components/tree/Tree.d.ts.map +1 -1
- package/dist/components/tree/browser.js +10 -10
- package/dist/components/tree/index.cjs +1 -1
- package/dist/components/tree/index.js +10 -10
- package/dist/dropzone.css +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.css +2 -2
- package/dist/index.js +131 -34
- package/dist/tree.css +1 -1
- package/package.json +1 -1
- /package/dist/components/chunks/{ScrollFade-DT2Br2g7.js → ScrollFade-BMs09zZN.js} +0 -0
- /package/dist/components/chunks/{ScrollFade-D1FPF6ZS.js → ScrollFade-DvzPIk2A.js} +0 -0
- /package/dist/components/chunks/{caret-down-BfBLwx6q.js → caret-down-BlWHVe6N.js} +0 -0
- /package/dist/components/chunks/{caret-down-BBhOg9_Z.js → caret-down-DpWztgFw.js} +0 -0
- /package/dist/components/chunks/{caret-right-C-bQyIjW.js → caret-right-CLV6cfS6.js} +0 -0
- /package/dist/components/chunks/{caret-right-CqNU7vAZ.js → caret-right-PMLTNWu6.js} +0 -0
- /package/dist/components/chunks/{close-BeiBTo1F.js → close-BiJXzxmk.js} +0 -0
- /package/dist/components/chunks/{close-a2blCqJN.js → close-Bkk4TtJM.js} +0 -0
- /package/dist/components/chunks/{link-CU-gTgir.js → link-ACOyvLkd.js} +0 -0
- /package/dist/components/chunks/{link-BjbBJpI6.js → link-DVKhDl3O.js} +0 -0
- /package/dist/components/chunks/{search-Ce29Aglb.js → search-BnA4_oWo.js} +0 -0
- /package/dist/components/chunks/{search-BiBJR6IK.js → search-oEuzdZDO.js} +0 -0
- /package/dist/components/chunks/{sortable-C46XSDeN.js → sortable-BAL3k9Se.js} +0 -0
- /package/dist/components/chunks/{sortable-BmObFEEn.js → sortable-Dgk6LvmB.js} +0 -0
- /package/dist/components/chunks/{spinner-BjC3nA-C.js → spinner-B2sml0AG.js} +0 -0
- /package/dist/components/chunks/{spinner-DfPbEa2d.js → spinner-CUcCgLKS.js} +0 -0
- /package/dist/components/chunks/{stack-nq3AmcMG.js → stack-CzcHNnl8.js} +0 -0
- /package/dist/components/chunks/{stack-Bdl46AdO.js → stack-DEIdHS0n.js} +0 -0
- /package/dist/components/chunks/{text-Bmfl6CxJ.js → text-C-6UCBp-.js} +0 -0
- /package/dist/components/chunks/{text-Cpl5ljSe.js → text-CfvRRKGZ.js} +0 -0
|
@@ -4,7 +4,8 @@ import '../../dropzone.css'
|
|
|
4
4
|
import { a as e } from "../chunks/icon-Basse9AD.js";
|
|
5
5
|
import { t } from "../chunks/register-element-BFYmIynH.js";
|
|
6
6
|
import "../chunks/icon-DcgcsymT.js";
|
|
7
|
-
import "../chunks/
|
|
7
|
+
import "../chunks/warning-BmMe8nCm.js";
|
|
8
|
+
import "../chunks/close-BiJXzxmk.js";
|
|
8
9
|
e({
|
|
9
10
|
name: "upload",
|
|
10
11
|
viewBox: "0 0 24 24",
|
|
@@ -38,13 +39,13 @@ var n = class extends HTMLElement {
|
|
|
38
39
|
];
|
|
39
40
|
}
|
|
40
41
|
constructor() {
|
|
41
|
-
super(), this._dropzone = null, this._fileInput = null, this._previewContainer = null, this._isDragging = !1, this._wasDragging = !1, this._isUpdatingFiles = !1, this._listenersInitialized = !1, this._selectedFiles = [], this._previewUrls = [], this._resetHandler = null, this._a11yId = `mint-dropzone-${Math.random().toString(36).slice(2, 10)}`;
|
|
42
|
+
super(), this._dropzone = null, this._fileInput = null, this._previewContainer = null, this._isDragging = !1, this._wasDragging = !1, this._isUpdatingFiles = !1, this._listenersInitialized = !1, this._selectedFiles = [], this._previewUrls = [], this._fileStates = /* @__PURE__ */ new Map(), this._emptyState = null, this._iconContainer = null, this._labelElement = null, this._transitionTimer = null, this._resizeObserver = null, this._showFileList = !1, this._resetHandler = null, this._a11yId = `mint-dropzone-${Math.random().toString(36).slice(2, 10)}`;
|
|
42
43
|
}
|
|
43
44
|
connectedCallback() {
|
|
44
45
|
this.classList.add("mint-dropzone"), this.render(), this._attachFormResetListener();
|
|
45
46
|
}
|
|
46
47
|
disconnectedCallback() {
|
|
47
|
-
if (this.removeEventListeners(), this._cleanupPreviewUrls(), this._resetHandler) {
|
|
48
|
+
if (this.removeEventListeners(), this._cleanupPreviewUrls(), this._resizeObserver?.disconnect(), this._transitionTimer && clearTimeout(this._transitionTimer), this._resetHandler) {
|
|
48
49
|
let e = this.closest("form");
|
|
49
50
|
e && e.removeEventListener("reset", this._resetHandler), this._resetHandler = null;
|
|
50
51
|
}
|
|
@@ -108,17 +109,15 @@ var n = class extends HTMLElement {
|
|
|
108
109
|
let e = (this.getAttribute("aria-describedby") || "").split(/\s+/).filter(Boolean), n = this.querySelector(".mint-dropzone-error");
|
|
109
110
|
n && (n.id = `${this.id || this._a11yId}-error`, e.push(n.id)), e.length ? this._dropzone.setAttribute("aria-describedby", Array.from(new Set(e)).join(" ")) : this._dropzone.removeAttribute("aria-describedby");
|
|
110
111
|
}
|
|
111
|
-
this._dropzone.style.width = a, this._dropzone.style.height = o, this._dropzone.style.minWidth =
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
f.className = "mint-dropzone-icon";
|
|
116
|
-
let p = document.createElement("mint-icon");
|
|
117
|
-
if (p.setAttribute("name", "upload"), p.className = "mint-dropzone-upload-icon", f.appendChild(p), this._dropzone.appendChild(f), t) {
|
|
118
|
-
let e = document.createElement("div");
|
|
119
|
-
e.className = "mint-dropzone-label", e.textContent = t, this._dropzone.appendChild(e);
|
|
112
|
+
if (this._dropzone.style.width = a, this._dropzone.style.height = o, this._dropzone.style.minWidth = "0", this._dropzone.style.minHeight = "0", this._dropzone.style.maxWidth = "100%", this._fileInput || (this._fileInput = document.createElement("input"), this._fileInput.type = "file", this._fileInput.className = "mint-dropzone-file-input", this._fileInput.setAttribute("tabindex", "-1"), this._fileInput.setAttribute("aria-hidden", "true"), this._dropzone.appendChild(this._fileInput)), this._fileInput.accept = n, this._fileInput.multiple = r, this._fileInput.disabled = i, s ? this._fileInput.name = s : this._fileInput.removeAttribute("name"), this._fileInput.setAttribute("aria-invalid", c ? "true" : "false"), !this._emptyState) {
|
|
113
|
+
this._emptyState = document.createElement("div"), this._emptyState.className = "mint-dropzone-empty-state", this._iconContainer = document.createElement("div"), this._iconContainer.className = "mint-dropzone-icon";
|
|
114
|
+
let e = document.createElement("mint-icon");
|
|
115
|
+
e.setAttribute("name", "upload"), e.className = "mint-dropzone-upload-icon", this._iconContainer.appendChild(e), this._emptyState.appendChild(this._iconContainer), this._labelElement = document.createElement("div"), this._labelElement.className = "mint-dropzone-label", this._emptyState.appendChild(this._labelElement), this._dropzone.appendChild(this._emptyState);
|
|
120
116
|
}
|
|
121
|
-
this.
|
|
117
|
+
this._labelElement && (this._labelElement.textContent = t, this._labelElement.hidden = !t), this._dropzone.classList.toggle("has-files", this._selectedFiles.length > 0), this._emptyState.classList.toggle("is-hidden", this._selectedFiles.length > 0), this._emptyState.classList.remove("is-showing"), !this._resizeObserver && typeof ResizeObserver < "u" && (this._resizeObserver = new ResizeObserver(([e]) => {
|
|
118
|
+
let { width: t, height: n } = e.contentRect;
|
|
119
|
+
this._dropzone?.classList.toggle("is-wide", t >= 520 && t >= n);
|
|
120
|
+
}), this._resizeObserver.observe(this._dropzone)), this.setupEventListeners(), this._renderErrorState(c, l), this._renderPreviews(), this._renderSkeleton(e);
|
|
122
121
|
}
|
|
123
122
|
_updateDragState() {
|
|
124
123
|
this._dropzone && this._updateDragStateClass();
|
|
@@ -271,6 +270,64 @@ var n = class extends HTMLElement {
|
|
|
271
270
|
get files() {
|
|
272
271
|
return this._syncFileInputFromSelected(), this._fileInput?.files || null;
|
|
273
272
|
}
|
|
273
|
+
getFiles() {
|
|
274
|
+
return [...this._selectedFiles];
|
|
275
|
+
}
|
|
276
|
+
getFileEntries() {
|
|
277
|
+
return this._selectedFiles.map((e) => ({
|
|
278
|
+
file: e,
|
|
279
|
+
...this._fileStates.get(e) || {
|
|
280
|
+
progress: null,
|
|
281
|
+
error: "",
|
|
282
|
+
uploaded: !1
|
|
283
|
+
}
|
|
284
|
+
}));
|
|
285
|
+
}
|
|
286
|
+
removeFile(e) {
|
|
287
|
+
let t = typeof e == "number" ? e : this._selectedFiles.findIndex((t) => typeof e == "string" ? t.name === e : t === e);
|
|
288
|
+
return t < 0 || t >= this._selectedFiles.length ? !1 : (this._removeFileAt(t), !0);
|
|
289
|
+
}
|
|
290
|
+
setFileProgress(e, t) {
|
|
291
|
+
if (!this._selectedFiles.includes(e)) return;
|
|
292
|
+
let n = this._fileStates.get(e) || {
|
|
293
|
+
progress: null,
|
|
294
|
+
error: "",
|
|
295
|
+
uploaded: !1
|
|
296
|
+
};
|
|
297
|
+
n.progress = t === null ? null : Math.max(0, Math.min(100, t)), n.uploaded = !1, this._fileStates.set(e, n), this._renderPreviews(), this.dispatchEvent(new CustomEvent("fileprogress", {
|
|
298
|
+
detail: {
|
|
299
|
+
file: e,
|
|
300
|
+
progress: n.progress
|
|
301
|
+
},
|
|
302
|
+
bubbles: !0,
|
|
303
|
+
composed: !0
|
|
304
|
+
}));
|
|
305
|
+
}
|
|
306
|
+
setFileError(e, t) {
|
|
307
|
+
this._selectedFiles.includes(e) && (this._fileStates.set(e, {
|
|
308
|
+
progress: null,
|
|
309
|
+
error: t,
|
|
310
|
+
uploaded: !1
|
|
311
|
+
}), this._renderPreviews(), this.dispatchEvent(new CustomEvent("fileerror", {
|
|
312
|
+
detail: {
|
|
313
|
+
file: e,
|
|
314
|
+
message: t
|
|
315
|
+
},
|
|
316
|
+
bubbles: !0,
|
|
317
|
+
composed: !0
|
|
318
|
+
})));
|
|
319
|
+
}
|
|
320
|
+
setFileUploaded(e) {
|
|
321
|
+
this._selectedFiles.includes(e) && (this._fileStates.set(e, {
|
|
322
|
+
progress: null,
|
|
323
|
+
error: "",
|
|
324
|
+
uploaded: !0
|
|
325
|
+
}), this._renderPreviews(), this.dispatchEvent(new CustomEvent("fileuploaded", {
|
|
326
|
+
detail: { file: e },
|
|
327
|
+
bubbles: !0,
|
|
328
|
+
composed: !0
|
|
329
|
+
})));
|
|
330
|
+
}
|
|
274
331
|
syncFiles() {
|
|
275
332
|
this._syncFileInputFromSelected();
|
|
276
333
|
}
|
|
@@ -284,24 +341,48 @@ var n = class extends HTMLElement {
|
|
|
284
341
|
e.className = "mint-dropzone-previews-wrapper", e.classList.toggle("has-error", this.hasError()), e.classList.toggle("is-dragging", this._isDragging);
|
|
285
342
|
let t = document.createElement("div");
|
|
286
343
|
t.className = "mint-dropzone-previews", this._selectedFiles.forEach((e, n) => {
|
|
287
|
-
let r =
|
|
288
|
-
|
|
344
|
+
let r = this._fileStates.get(e) || {
|
|
345
|
+
progress: null,
|
|
346
|
+
error: "",
|
|
347
|
+
uploaded: !1
|
|
348
|
+
}, i = document.createElement("div");
|
|
349
|
+
if (i.className = "mint-dropzone-file", i.classList.toggle("has-upload-error", !!r.error), e.type.startsWith("image/")) {
|
|
289
350
|
let t = document.createElement("img");
|
|
290
351
|
t.className = "mint-dropzone-file-image";
|
|
291
352
|
let n = URL.createObjectURL(e);
|
|
292
|
-
this._previewUrls.push(n), t.src = n,
|
|
353
|
+
this._previewUrls.push(n), t.src = n, i.appendChild(t);
|
|
293
354
|
} else {
|
|
294
355
|
let e = document.createElement("mint-icon");
|
|
295
|
-
e.setAttribute("name", "attach"), e.className = "mint-dropzone-file-icon",
|
|
356
|
+
e.setAttribute("name", "attach"), e.className = "mint-dropzone-file-icon", i.appendChild(e);
|
|
296
357
|
}
|
|
297
|
-
let
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
358
|
+
let a = document.createElement("div");
|
|
359
|
+
if (a.className = "mint-dropzone-file-name", a.textContent = e.name, i.appendChild(a), r.uploaded) {
|
|
360
|
+
let t = document.createElement("span");
|
|
361
|
+
t.className = "mint-dropzone-file-uploaded", t.setAttribute("role", "img"), t.setAttribute("aria-label", `${e.name} uploaded successfully`);
|
|
362
|
+
let n = document.createElement("mint-icon");
|
|
363
|
+
n.setAttribute("name", "check"), t.appendChild(n), i.appendChild(t);
|
|
364
|
+
} else if (r.progress !== null && !r.error) {
|
|
365
|
+
let t = document.createElement("progress");
|
|
366
|
+
t.className = "mint-dropzone-file-progress", t.max = 100, t.value = r.progress, t.setAttribute("aria-label", `Uploading ${e.name}: ${r.progress}%`), i.appendChild(t);
|
|
367
|
+
}
|
|
368
|
+
if (r.error) {
|
|
369
|
+
let t = document.createElement("button");
|
|
370
|
+
t.type = "button", t.className = "mint-dropzone-file-error", t.setAttribute("aria-label", `Upload failed for ${e.name}`), t.setAttribute("aria-expanded", "false");
|
|
371
|
+
let n = document.createElement("mint-icon");
|
|
372
|
+
n.setAttribute("name", "warning"), t.appendChild(n);
|
|
373
|
+
let a = document.createElement("span");
|
|
374
|
+
a.className = "mint-dropzone-file-error-message", a.setAttribute("role", "tooltip"), a.textContent = r.error, t.appendChild(a), t.addEventListener("click", (e) => {
|
|
375
|
+
e.preventDefault(), e.stopPropagation();
|
|
376
|
+
let n = t.classList.toggle("is-open");
|
|
377
|
+
t.setAttribute("aria-expanded", String(n));
|
|
378
|
+
}), i.appendChild(t);
|
|
379
|
+
}
|
|
380
|
+
let o = document.createElement("button");
|
|
381
|
+
o.type = "button", o.className = "mint-dropzone-file-remove";
|
|
382
|
+
let s = document.createElement("mint-icon");
|
|
383
|
+
s.setAttribute("name", "close"), s.className = "mint-dropzone-file-remove-icon", o.appendChild(s), o.addEventListener("click", (e) => {
|
|
303
384
|
e.preventDefault(), e.stopPropagation(), this._removeFileAt(n);
|
|
304
|
-
}),
|
|
385
|
+
}), i.appendChild(o), t.appendChild(i);
|
|
305
386
|
});
|
|
306
387
|
let n = document.createElement("div");
|
|
307
388
|
n.className = "mint-dropzone-preview-fade is-top", e.appendChild(n);
|
|
@@ -311,12 +392,12 @@ var n = class extends HTMLElement {
|
|
|
311
392
|
let e = t.scrollTop, i = t.scrollHeight, a = t.clientHeight;
|
|
312
393
|
e > 0 ? n.classList.add("is-visible") : n.classList.remove("is-visible"), e + a < i - 1 ? r.classList.add("is-visible") : r.classList.remove("is-visible");
|
|
313
394
|
};
|
|
314
|
-
i(), t.addEventListener("scroll", i), e.appendChild(t), this._previewContainer = e, this._dropzone.appendChild(e), this._updateDragStateClass();
|
|
395
|
+
i(), t.addEventListener("scroll", i), e.appendChild(t), this._previewContainer = e, e.classList.toggle("is-visible", this._showFileList), this._dropzone.appendChild(e), this._updateDragStateClass();
|
|
315
396
|
}
|
|
316
397
|
_removeFileAt(e) {
|
|
317
398
|
if (e < 0 || e >= this._selectedFiles.length) return;
|
|
318
399
|
let [t] = this._selectedFiles.splice(e, 1);
|
|
319
|
-
t && this._cleanupPreviewUrls(), this._syncFileInputFromSelected(), this._renderPreviews(), this._dispatchSelectionEvents();
|
|
400
|
+
t && (this._cleanupPreviewUrls(), this._fileStates.delete(t)), this._syncFileInputFromSelected(), this._selectedFiles.length === 0 ? this._animateListIn() : this._renderPreviews(), this._dispatchSelectionEvents();
|
|
320
401
|
}
|
|
321
402
|
_cleanupPreviewUrls() {
|
|
322
403
|
this._previewUrls.forEach((e) => URL.revokeObjectURL(e)), this._previewUrls = [];
|
|
@@ -324,15 +405,32 @@ var n = class extends HTMLElement {
|
|
|
324
405
|
_attachFormResetListener() {
|
|
325
406
|
let e = this.closest("form");
|
|
326
407
|
!e || this._resetHandler || (this._resetHandler = () => {
|
|
327
|
-
this._selectedFiles = [], this._syncFileInputFromSelected(), this.
|
|
408
|
+
this._selectedFiles = [], this._fileStates.clear(), this._syncFileInputFromSelected(), this._animateListIn(), this._cleanupPreviewUrls();
|
|
328
409
|
}, e.addEventListener("reset", this._resetHandler));
|
|
329
410
|
}
|
|
330
411
|
_applyValidFiles(e) {
|
|
331
412
|
if (this.isMultiple()) {
|
|
332
413
|
let t = e.filter((e) => !this._isDuplicateFile(e));
|
|
333
|
-
this._selectedFiles.push(...t)
|
|
334
|
-
|
|
335
|
-
|
|
414
|
+
this._selectedFiles.push(...t), t.forEach((e) => this._fileStates.set(e, {
|
|
415
|
+
progress: null,
|
|
416
|
+
error: "",
|
|
417
|
+
uploaded: !1
|
|
418
|
+
}));
|
|
419
|
+
} else this._selectedFiles = [e[0]], this._fileStates.clear(), this._fileStates.set(e[0], {
|
|
420
|
+
progress: null,
|
|
421
|
+
error: "",
|
|
422
|
+
uploaded: !1
|
|
423
|
+
});
|
|
424
|
+
this._syncFileInputFromSelected(), this._selectedFiles.length > 0 && (this.removeAttribute("error"), this.removeAttribute("error-message"), this._fileInput && this._fileInput.removeAttribute("aria-invalid")), this._renderPreviews(), this._animateListIn(), this._dispatchSelectionEvents();
|
|
425
|
+
}
|
|
426
|
+
_animateListIn() {
|
|
427
|
+
if (this._transitionTimer && clearTimeout(this._transitionTimer), !this._selectedFiles.length) {
|
|
428
|
+
this._showFileList = !1, this._dropzone?.classList.remove("has-files"), this._emptyState?.classList.remove("is-hidden", "is-hiding"), this._emptyState?.classList.add("is-showing"), this._transitionTimer = setTimeout(() => this._emptyState?.classList.remove("is-showing"), 220), this._renderPreviews();
|
|
429
|
+
return;
|
|
430
|
+
}
|
|
431
|
+
this._showFileList = !1, this._dropzone?.classList.add("has-files", "is-upload-transition"), this._emptyState?.classList.remove("is-hidden", "is-showing"), this._emptyState?.classList.add("is-hiding"), this._transitionTimer = setTimeout(() => {
|
|
432
|
+
this._showFileList = !0, this._emptyState?.classList.remove("is-hiding"), this._emptyState?.classList.add("is-hidden"), this._dropzone?.classList.remove("is-upload-transition"), this._renderPreviews();
|
|
433
|
+
}, 580);
|
|
336
434
|
}
|
|
337
435
|
_isDuplicateFile(e) {
|
|
338
436
|
return this._selectedFiles.some((t) => t.name === e.name && t.size === e.size && t.lastModified === e.lastModified);
|
|
@@ -13,5 +13,5 @@ const __mintLoadStyle = (key, url) => {
|
|
|
13
13
|
__mintLoadStyle('theme', '../../theme.css')
|
|
14
14
|
__mintLoadStyle('icon', '../../icon.css')
|
|
15
15
|
__mintLoadStyle('input', '../../input.css')
|
|
16
|
-
import { t as e } from "../chunks/input-
|
|
16
|
+
import { t as e } from "../chunks/input-Dqa8FmcB.js";
|
|
17
17
|
export { e as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../chunks/input-
|
|
1
|
+
const e=require(`../chunks/input-Cbpk3dfA.js`);module.exports=e.t;
|
|
@@ -12,5 +12,5 @@ const __mintLoadStyle = (key, url) => {
|
|
|
12
12
|
}
|
|
13
13
|
__mintLoadStyle('theme', '../../theme.css')
|
|
14
14
|
__mintLoadStyle('link', '../../link.css')
|
|
15
|
-
import { t as e } from "../chunks/link-
|
|
15
|
+
import { t as e } from "../chunks/link-ACOyvLkd.js";
|
|
16
16
|
export { e as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../chunks/link-
|
|
1
|
+
const e=require(`../chunks/link-DVKhDl3O.js`);module.exports=e.t;
|
|
@@ -17,5 +17,5 @@ __mintLoadStyle('icon', '../../icon.css')
|
|
|
17
17
|
__mintLoadStyle('text', '../../text.css')
|
|
18
18
|
__mintLoadStyle('stack', '../../stack.css')
|
|
19
19
|
__mintLoadStyle('modal', '../../modal.css')
|
|
20
|
-
import { t as e } from "../chunks/modal-
|
|
20
|
+
import { t as e } from "../chunks/modal-XaqMQTPn.js";
|
|
21
21
|
export { e as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../chunks/modal-
|
|
1
|
+
const e=require(`../chunks/modal-CZARWHo8.js`);module.exports=e.t;
|
|
@@ -20,9 +20,9 @@ __mintLoadStyle('stack', '../../stack.css')
|
|
|
20
20
|
__mintLoadStyle('navigation', '../../navigation.css')
|
|
21
21
|
import "../chunks/icon-Basse9AD.js";
|
|
22
22
|
import { t as e } from "../chunks/register-element-BFYmIynH.js";
|
|
23
|
-
import "../chunks/button-
|
|
24
|
-
import "../chunks/popover-
|
|
25
|
-
import "../chunks/link-
|
|
23
|
+
import "../chunks/button-B3VB87bu.js";
|
|
24
|
+
import "../chunks/popover-co0gSvD-.js";
|
|
25
|
+
import "../chunks/link-ACOyvLkd.js";
|
|
26
26
|
//#region src/components/navigation/Navigation.js
|
|
27
27
|
var t = 0, n = class extends HTMLElement {
|
|
28
28
|
static get observedAttributes() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../chunks/icon-CGXHKbMq.js`);const e=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/button-
|
|
1
|
+
require(`../chunks/icon-CGXHKbMq.js`);const e=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/button-kbb_mcUl.js`),require(`../chunks/popover-Bek5fgHz.js`),require(`../chunks/link-DVKhDl3O.js`);var t=0,n=class extends HTMLElement{static get observedAttributes(){return[`brand`,`brand-href`,`direction`,`label`,`open`,`fixed`]}constructor(){super(),this._built=!1,this._brand=null,this._brandLink=null,this._leadingActions=null,this._items=null,this._toggle=null,this._toggleLabel=null,this._mobileActions=null,this._mobileActionNodes=[],this._instanceId=++t,this._dropdowns=[],this._content=null,this._actions=null,this._activeDropdown=null,this._layoutObserver=null}connectedCallback(){this._built||this._build(),this._observeDropdowns(),this._syncResponsiveDropdowns(),this._syncMobileActions(),typeof ResizeObserver<`u`&&(this._layoutObserver=new ResizeObserver(()=>{this._syncResponsiveDropdowns(),this._syncMobileActions()}),this._layoutObserver.observe(this)),this._syncAttributes()}disconnectedCallback(){for(let e of this._dropdowns)e.observer?.disconnect();this._layoutObserver?.disconnect(),this._layoutObserver=null}attributeChangedCallback(e,t,n){t===n||!this._built||(e===`open`?this._syncOpenState():this._syncAttributes())}getDirection(){return this.getAttribute(`direction`)===`vertical`?`vertical`:`horizontal`}getBrand(){return this.getAttribute(`brand`)||``}getBrandHref(){return this.getAttribute(`brand-href`)||`/`}getLabel(){return this.getAttribute(`label`)||`Primary navigation`}_build(){let e=Array.from(this.childNodes),t=e.find(e=>e.nodeType===Node.ELEMENT_NODE&&e.getAttribute(`slot`)===`brand`),n=e.filter(e=>e.nodeType===Node.ELEMENT_NODE&&e.getAttribute(`slot`)===`leading-actions`),r=e.filter(e=>e.nodeType===Node.ELEMENT_NODE&&[`actions`,`mobile-actions`].includes(e.getAttribute(`slot`)));this._mobileActionNodes=r.filter(e=>e.getAttribute(`slot`)===`mobile-actions`);let i=e.filter(e=>e!==t&&!n.includes(e)&&!r.includes(e));this.replaceChildren();let a=document.createElement(`div`);a.className=`mint-navigation-shell`;let o=document.createElement(`div`);o.className=`mint-navigation-bar`,this._leadingActions=document.createElement(`div`),this._leadingActions.className=`mint-navigation-leading-actions`;for(let e of n)e.removeAttribute(`slot`),this._leadingActions.appendChild(e);this._brand=document.createElement(`div`),this._brand.className=`mint-navigation-brand`,t?(t.removeAttribute(`slot`),this._brand.appendChild(t)):this.getBrand()&&(this._brandLink=document.createElement(`mint-link`),this._brandLink.className=`mint-navigation-brand-link`,this._brandLink.textContent=this.getBrand(),this._brandLink.setAttribute(`href`,this.getBrandHref()),this._brand.appendChild(this._brandLink)),this._toggle=document.createElement(`mint-button`),this._toggle.className=`mint-navigation-toggle`,this._toggle.setAttribute(`aria-expanded`,`false`),this._toggle.addEventListener(`click`,()=>this.toggleMenu()),this._toggleLabel=document.createElement(`span`),this._toggleLabel.className=`mint-navigation-visually-hidden`,this._toggleLabel.textContent=`Open navigation menu`,this._toggle.append(this._toggleLabel),this._toggle.setAttribute(`variant`,`ghost`),this._toggle.setAttribute(`tone`,`action`),this._toggle.setAttribute(`button-type`,`button`),this._toggle.setAttribute(`icon`,`menu`),this._mobileActions=document.createElement(`div`),this._mobileActions.className=`mint-navigation-mobile-actions`,o.append(this._leadingActions,this._brand,this._mobileActions,this._toggle);let s=document.createElement(`div`);this._content=s,s.className=`mint-navigation-content`,this._items=document.createElement(`nav`),this._items.className=`mint-navigation-items`,this._items.setAttribute(`aria-label`,this.getLabel()),this._items.addEventListener(`click`,e=>{e.target.closest(`a, mint-link`)&&this.closeMenu()});let c=0;for(let e of i)if(e.nodeType!==Node.ELEMENT_NODE)this._items.appendChild(e);else if(e.tagName===`DETAILS`){let t=this._createDropdown(e,c++);this._items.append(t.trigger,t.popover),this._registerDropdown(t.trigger,t.popover)}else{let t=this._toMintLink(e);if(this._items.appendChild(t),t.nodeType===Node.ELEMENT_NODE&&t.tagName===`MINT-POPOVER`){let e=t.getAttribute(`trigger-id`),n=Array.from(this._items.querySelectorAll(`mint-button`)).find(t=>t.id===e);this._registerDropdown(n,t)}}let l=document.createElement(`div`);this._actions=l,l.className=`mint-navigation-actions`;for(let e of r)e.removeAttribute(`slot`),l.appendChild(e);let u=document.createElement(`section`);u.className=`mint-navigation-submenu`,u.setAttribute(`aria-label`,`Navigation submenu`);let d=document.createElement(`div`);d.className=`mint-navigation-submenu-header`;let f=document.createElement(`mint-button`);f.className=`mint-navigation-submenu-back`,f.setAttribute(`variant`,`ghost`),f.setAttribute(`tone`,`action`),f.setAttribute(`button-type`,`button`),f.setAttribute(`icon`,`arrow-left`),f.setAttribute(`aria-label`,`Back to main navigation`),f.addEventListener(`click`,()=>this._closeSubmenu());let p=document.createElement(`h3`);p.className=`mint-navigation-submenu-title`,d.append(f,p);let m=document.createElement(`nav`);m.className=`mint-navigation-submenu-items`,m.addEventListener(`click`,e=>{e.target.closest(`a, mint-link`)&&this.closeMenu()}),u.append(d,m),this._submenu=u,this._submenuTitle=p,this._submenuItems=m;for(let e of this._dropdowns)m.append(...e.submenuItems);s.append(this._items,l,u),a.append(o,s),this.appendChild(a),this._built=!0,this._syncMobileActions()}_syncMobileActions(){if(!this._mobileActions||!this._actions)return;let e=this._isMobileLayout()?this._mobileActions:this._actions;for(let t of this._mobileActionNodes)e.appendChild(t)}_toMintLink(e){if(e.nodeType!==Node.ELEMENT_NODE||e.tagName!==`A`)return e;let t=document.createElement(`mint-link`);for(;e.firstChild;)t.appendChild(e.firstChild);for(let n of Array.from(e.attributes))n.name!==`slot`&&t.setAttribute(n.name,n.value);return t}_createDropdown(e,t){let n=e.querySelector(`:scope > summary`),r=document.createElement(`mint-button`),i=`mint-navigation-${this._instanceId}-dropdown-${t}`,a=`${i}-popover`;if(r.id=i,r.className=`mint-navigation-dropdown-trigger`,r.setAttribute(`aria-haspopup`,`dialog`),r.setAttribute(`aria-expanded`,`false`),r.setAttribute(`aria-controls`,a),n){for(;n.firstChild;)r.appendChild(n.firstChild);n.remove()}else r.textContent=e.getAttribute(`label`)||`More`;r.setAttribute(`variant`,`ghost`),r.setAttribute(`tone`,`action`),r.setAttribute(`button-type`,`button`),r.setAttribute(`icon-position`,`right`);let o=document.createElement(`mint-popover`);o.id=a,o.className=`mint-navigation-dropdown`,o.setAttribute(`trigger-id`,i),o.setAttribute(`direction`,`down`),o.setAttribute(`aria-label`,`${r.textContent.trim()} links`);for(let t of Array.from(e.childNodes))o.appendChild(this._toMintLink(t));return{trigger:r,popover:o,observer:null}}_registerDropdown(e,t){if(!e||!t)return;t.id||=`mint-navigation-${this._instanceId}-popover-${this._dropdowns.length}`,e.classList.add(`mint-navigation-dropdown-trigger`),e.setAttribute(`aria-haspopup`,`dialog`),e.setAttribute(`aria-expanded`,String(t.hasAttribute(`open`))),e.setAttribute(`aria-controls`,t.id),t.classList.add(`mint-navigation-dropdown`),t.hasAttribute(`role`)||t.setAttribute(`role`,`group`),t.hasAttribute(`aria-label`)||t.setAttribute(`aria-label`,`${e.textContent.trim()} links`);let n=Array.from(t.querySelectorAll(`mint-link`)).map(e=>e.cloneNode(!0)),r={trigger:e,popover:t,observer:null,triggerId:t.getAttribute(`trigger-id`)||e.id,submenuItems:n};e.addEventListener(`click`,()=>{this._isMobileLayout()&&this._openSubmenu(r)}),this._dropdowns.push(r)}_observeDropdowns(){for(let e of this._dropdowns)e.observer||(e.observer=new MutationObserver(()=>{e.trigger.setAttribute(`aria-expanded`,String(e.popover.hasAttribute(`open`)))}),e.observer.observe(e.popover,{attributes:!0,attributeFilter:[`open`]}))}_isMobileLayout(){return this.getBoundingClientRect().width<=640}_syncResponsiveDropdowns(){let e=this._isMobileLayout();for(let t of this._dropdowns)e?(t.popover.hasAttribute(`open`)&&t.popover.close(),t.popover.getAttribute(`trigger-id`)&&t.popover.setAttribute(`trigger-id`,``)):t.triggerId&&t.popover.getAttribute(`trigger-id`)!==t.triggerId&&t.popover.setAttribute(`trigger-id`,t.triggerId);!e&&this._activeDropdown&&this._closeSubmenu()}_openSubmenu(e){this._isMobileLayout()&&(this._activeDropdown&&this._activeDropdown!==e&&this._activeDropdown.trigger.setAttribute(`aria-expanded`,`false`),this._activeDropdown=e,e.trigger.setAttribute(`aria-expanded`,`true`),this._submenuTitle.textContent=e.trigger.textContent.trim(),this._submenuItems.replaceChildren(...e.submenuItems),this._content.setAttribute(`data-submenu-open`,``))}_closeSubmenu(){this._activeDropdown?.trigger.setAttribute(`aria-expanded`,`false`),this._activeDropdown=null,this._content?.removeAttribute(`data-submenu-open`)}_syncAttributes(){if(this._brandLink){this._brandLink.setAttribute(`href`,this.getBrandHref());let e=this._brandLink.querySelector(`a`);e?e.textContent=this.getBrand():this._brandLink.textContent=this.getBrand()}this._items&&this._items.setAttribute(`aria-label`,this.getLabel()),this._syncOpenState()}_syncOpenState(){if(!this._toggle)return;let e=this.hasAttribute(`open`);this._toggle.setAttribute(`aria-expanded`,String(e));let t=e?`Close navigation menu`:`Open navigation menu`;this._toggle.setAttribute(`aria-label`,t),this._toggleLabel&&(this._toggleLabel.textContent=t),this._toggle.setAttribute(`icon`,e?`close`:`menu`)}openMenu(){this.setAttribute(`open`,``)}closeMenu(){this._closeSubmenu(),this.removeAttribute(`open`)}toggleMenu(){this.hasAttribute(`open`)?this.closeMenu():this.openMenu()}};typeof customElements<`u`&&!customElements.get(`mint-navigation`)&&e.t(`mint-navigation`,n),module.exports=n;
|
|
@@ -8,9 +8,9 @@ import '../../stack.css'
|
|
|
8
8
|
import '../../navigation.css'
|
|
9
9
|
import "../chunks/icon-Basse9AD.js";
|
|
10
10
|
import { t as e } from "../chunks/register-element-BFYmIynH.js";
|
|
11
|
-
import "../chunks/button-
|
|
12
|
-
import "../chunks/popover-
|
|
13
|
-
import "../chunks/link-
|
|
11
|
+
import "../chunks/button-B3VB87bu.js";
|
|
12
|
+
import "../chunks/popover-co0gSvD-.js";
|
|
13
|
+
import "../chunks/link-ACOyvLkd.js";
|
|
14
14
|
//#region src/components/navigation/Navigation.js
|
|
15
15
|
var t = 0, n = class extends HTMLElement {
|
|
16
16
|
static get observedAttributes() {
|
|
@@ -19,9 +19,9 @@ __mintLoadStyle('stack', '../../stack.css')
|
|
|
19
19
|
__mintLoadStyle('off-canvas', '../../off-canvas.css')
|
|
20
20
|
import "../chunks/icon-Basse9AD.js";
|
|
21
21
|
import { t as e } from "../chunks/register-element-BFYmIynH.js";
|
|
22
|
-
import "../chunks/text-
|
|
23
|
-
import "../chunks/button-
|
|
24
|
-
import "../chunks/stack-
|
|
22
|
+
import "../chunks/text-C-6UCBp-.js";
|
|
23
|
+
import "../chunks/button-B3VB87bu.js";
|
|
24
|
+
import "../chunks/stack-CzcHNnl8.js";
|
|
25
25
|
//#region src/components/off-canvas/OffCanvas.ts
|
|
26
26
|
var t = class extends HTMLElement {
|
|
27
27
|
static get observedAttributes() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../chunks/icon-CGXHKbMq.js`);const e=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/text-
|
|
1
|
+
require(`../chunks/icon-CGXHKbMq.js`);const e=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/text-CfvRRKGZ.js`),require(`../chunks/button-kbb_mcUl.js`),require(`../chunks/stack-DEIdHS0n.js`);var t=class extends HTMLElement{static get observedAttributes(){return[`id`,`heading`,`open`,`position`,`full-page`,`width`,`height`]}constructor(){super(),this._overlay=null,this._offCanvas=null,this._header=null,this._headingSlot=null,this._bodySlot=null,this._actionsSlot=null,this._closeButton=null,this._contentObserver=null,this._renderFrame=null,this._exitTimer=null,this._previousFocus=null,this._dialogWasOpen=!1,this._dialogKeydownHandler=null}connectedCallback(){this.classList.add(`mint-off-canvas-host`),this.isOpen()||this.classList.add(`mint-off-canvas-hidden`),this.render(),this._observeContentMutations(),this._dialogKeydownHandler=e=>{if(!this.isOpen())return;if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),this.close();return}if(e.key!==`Tab`)return;let t=this._offCanvas?.querySelector(`.mint-off-canvas-panel`);if(!t)return;let n=this._getDialogFocusableElements(t);if(!n.length){e.preventDefault(),t.focus();return}let r=n[0],i=n[n.length-1],a=document.activeElement;e.shiftKey&&(a===r||!t.contains(a))?(e.preventDefault(),i.focus()):!e.shiftKey&&(a===i||!t.contains(a))&&(e.preventDefault(),r.focus())},document.addEventListener(`keydown`,this._dialogKeydownHandler,!0)}disconnectedCallback(){this._dialogKeydownHandler&&=(document.removeEventListener(`keydown`,this._dialogKeydownHandler,!0),null),this._contentObserver&&=(this._contentObserver.disconnect(),null),this._renderFrame!==null&&(cancelAnimationFrame(this._renderFrame),this._renderFrame=null),this._exitTimer!==null&&(clearTimeout(this._exitTimer),this._exitTimer=null)}attributeChangedCallback(e,t,n){t!==n&&this.isConnected&&this.render()}_scheduleRender(){this._renderFrame===null&&(this._renderFrame=requestAnimationFrame(()=>{this._renderFrame=null,this.render()}))}getId(){return this.getAttribute(`id`)||``}getHeading(){return this.getAttribute(`heading`)||``}getPosition(){let e=this.getAttribute(`position`)?.toLowerCase();return e===`top`||e===`bottom`||e===`left`||e===`right`?e:`right`}isFullPage(){return this.getAttribute(`full-page`)===`true`}getWidth(){return this.getAttribute(`width`)||`320px`}getHeight(){return this.getAttribute(`height`)||``}_normalizeCssValue(e){return/^\d+(\.\d+)?$/.test(e.trim())?`${e.trim()}px`:e.trim()}isOpen(){return this.getAttribute(`open`)===`true`}open(){this.setAttribute(`open`,`true`)}close(){this.removeAttribute(`open`)}render(){let e=this.getId(),t=this.getHeading(),n=this.isOpen(),r=this.getPosition(),i=this.isFullPage(),a=this.getHeight();e&&(this.id=e),this._overlay||(this._overlay=document.createElement(`div`),this._overlay.className=`mint-off-canvas-overlay`,this._overlay.setAttribute(`aria-hidden`,`true`),this._overlay.addEventListener(`click`,()=>this.close()),this.appendChild(this._overlay)),this._offCanvas||(this._offCanvas=document.createElement(`div`),this.appendChild(this._offCanvas)),this._offCanvas.className=`mint-off-canvas-shell`,this._offCanvas.dataset.position=r,this._offCanvas.dataset.fullPage=String(i);let o=this._offCanvas.querySelector(`.mint-off-canvas-panel`);o||(o=document.createElement(`div`),o.className=`mint-off-canvas-panel`,o.style.transform=this._getTransformValue(r,!1),this._offCanvas.appendChild(o)),o.setAttribute(`role`,`dialog`),o.setAttribute(`aria-modal`,`true`),o.hasAttribute(`tabindex`)||(o.tabIndex=-1),n?this._animateEnter():this._animateExit(),o.style.removeProperty(`--off-canvas-width`),o.style.removeProperty(`--off-canvas-height`),r===`top`||r===`bottom`?a&&o.style.setProperty(`--off-canvas-height`,this._normalizeCssValue(a)):o.style.setProperty(`--off-canvas-width`,this._normalizeCssValue(this.getWidth())),this._header||(this._header=document.createElement(`div`),this._header.className=`mint-off-canvas-header`,o.appendChild(this._header)),this._headingSlot||(this._headingSlot=document.createElement(`div`),this._headingSlot.className=`mint-off-canvas-heading`,this._headingSlot.setAttribute(`slot`,`heading`),this._header.appendChild(this._headingSlot));let s=this._headingSlot.querySelector(`mint-text`);if(t?(s||(s=document.createElement(`mint-text`),s.setAttribute(`size`,`sub-heading`),s.setAttribute(`bold`,`true`),this._headingSlot.appendChild(s)),s.textContent=t,s.id=`${e||`mint-off-canvas`}-heading`,o.setAttribute(`aria-labelledby`,s.id),o.removeAttribute(`aria-label`)):s&&s.remove(),!t){let e=this.getAttribute(`aria-label`)?.trim();e?o.setAttribute(`aria-label`,e):o.hasAttribute(`aria-label`)||o.setAttribute(`aria-label`,`Dialog`)}Array.from(this.children).filter(e=>e!==this._overlay&&e!==this._offCanvas&&e!==this._headingSlot&&e.getAttribute(`slot`)===`heading`).forEach(e=>{this._headingSlot&&e.parentElement!==this._headingSlot&&this._headingSlot.appendChild(e)}),this._closeButton||(this._closeButton=document.createElement(`mint-button`),this._closeButton.setAttribute(`variant`,`ghost`),this._closeButton.setAttribute(`icon`,`close`),this._closeButton.setAttribute(`aria-label`,`Close panel`),this._closeButton.addEventListener(`click`,()=>this.close()),this._header.appendChild(this._closeButton)),this._bodySlot||(this._bodySlot=document.createElement(`div`),this._bodySlot.className=`mint-off-canvas-body`,this._bodySlot.setAttribute(`slot`,`body`),o.appendChild(this._bodySlot)),Array.from(this.children).filter(e=>e!==this._overlay&&e!==this._offCanvas&&e!==this._bodySlot&&e.getAttribute(`slot`)===`body`).forEach(e=>{this._bodySlot&&e.parentElement!==this._bodySlot&&this._bodySlot.appendChild(e)}),this._actionsSlot||(this._actionsSlot=document.createElement(`div`),this._actionsSlot.className=`mint-off-canvas-actions`,this._actionsSlot.setAttribute(`slot`,`actions`),o.appendChild(this._actionsSlot));let c=this._actionsSlot.querySelector(`mint-stack`);c||(c=document.createElement(`mint-stack`),c.setAttribute(`direction`,`horizontal`),c.className=`mint-off-canvas-actions-stack`,this._actionsSlot.appendChild(c)),Array.from(this.children).filter(e=>e!==this._overlay&&e!==this._offCanvas&&e!==this._actionsSlot&&e.getAttribute(`slot`)===`actions`).forEach(e=>{Array.from(e.children).forEach(e=>{e.parentElement!==c&&c.appendChild(e)}),e.parentElement&&e.remove()}),Array.from(this.children).forEach(e=>{e!==this._overlay&&e!==this._offCanvas&&e.getAttribute(`slot`)!==`heading`&&e.getAttribute(`slot`)!==`body`&&e.getAttribute(`slot`)!==`actions`&&e!==this._headingSlot&&e!==this._bodySlot&&e!==this._actionsSlot&&e.parentElement!==this._bodySlot&&this._bodySlot.appendChild(e)})}_getTransformValue(e,t){if(t)switch(e){case`top`:return`translateY(0)`;case`bottom`:return`translateY(0)`;case`left`:return`translateX(0)`;case`right`:return`translateX(0)`;default:return`translateX(0)`}else switch(e){case`top`:return`translateY(-100%)`;case`bottom`:return`translateY(100%)`;case`left`:return`translateX(-100%)`;case`right`:return`translateX(100%)`;default:return`translateX(100%)`}}_observeContentMutations(){this._contentObserver||=new MutationObserver(()=>{this._scheduleRender()}),this._contentObserver.disconnect(),this._contentObserver.observe(this,{childList:!0,attributes:!0,attributeFilter:[`slot`]})}_getDialogFocusableElements(e){return Array.from(e.querySelectorAll(`button:not([disabled]), [href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`)).filter(e=>{if(e.closest(`[hidden], [aria-hidden="true"]`))return!1;let t=window.getComputedStyle(e);return t.display!==`none`&&t.visibility!==`hidden`})}_animateEnter(){let e=this._offCanvas?.querySelector(`.mint-off-canvas-panel`);if(!e)return;this._exitTimer!==null&&(clearTimeout(this._exitTimer),this._exitTimer=null);let t=this.getPosition(),n=!this._dialogWasOpen;if(n){this._dialogWasOpen=!0;let e=document.activeElement;this._previousFocus=e instanceof HTMLElement&&e!==document.body?e:null}e.style.transform=this._getTransformValue(t,!1),e.style.transition=`transform 300ms ease-out`,this.classList.remove(`mint-off-canvas-hidden`),requestAnimationFrame(()=>{requestAnimationFrame(()=>{this.isOpen()&&(this.classList.add(`mint-off-canvas-open`),e.style.transform=this._getTransformValue(t,!0),n&&(this._getDialogFocusableElements(e)[0]??e).focus())})})}_animateExit(){this.classList.remove(`mint-off-canvas-open`);let e=this._offCanvas?.querySelector(`.mint-off-canvas-panel`);if(!e){this.classList.add(`mint-off-canvas-hidden`),this._dialogWasOpen=!1;return}let t=this.getPosition();e.style.transition=`transform 300ms ease-in`,e.style.transform=this._getTransformValue(t,!1),this._exitTimer!==null&&clearTimeout(this._exitTimer),this._exitTimer=window.setTimeout(()=>{if(this._exitTimer=null,this.isOpen())return;this.classList.add(`mint-off-canvas-hidden`),e.style.transform=``,e.style.transition=``;let t=this._previousFocus;this._previousFocus=null,t?.isConnected&&t.focus()},300)}};customElements.get(`mint-off-canvas`)||e.t(`mint-off-canvas`,t),module.exports=t;
|
|
@@ -7,9 +7,9 @@ import '../../stack.css'
|
|
|
7
7
|
import '../../off-canvas.css'
|
|
8
8
|
import "../chunks/icon-Basse9AD.js";
|
|
9
9
|
import { t as e } from "../chunks/register-element-BFYmIynH.js";
|
|
10
|
-
import "../chunks/text-
|
|
11
|
-
import "../chunks/button-
|
|
12
|
-
import "../chunks/stack-
|
|
10
|
+
import "../chunks/text-C-6UCBp-.js";
|
|
11
|
+
import "../chunks/button-B3VB87bu.js";
|
|
12
|
+
import "../chunks/stack-CzcHNnl8.js";
|
|
13
13
|
//#region src/components/off-canvas/OffCanvas.ts
|
|
14
14
|
var t = class extends HTMLElement {
|
|
15
15
|
static get observedAttributes() {
|
|
@@ -20,9 +20,9 @@ __mintLoadStyle('back-button', '../../back-button.css')
|
|
|
20
20
|
__mintLoadStyle('page', '../../page.css')
|
|
21
21
|
import "../chunks/icon-Basse9AD.js";
|
|
22
22
|
import { t as e } from "../chunks/register-element-BFYmIynH.js";
|
|
23
|
-
import "../chunks/back-button-
|
|
24
|
-
import "../chunks/button-
|
|
25
|
-
import "../chunks/popover-
|
|
23
|
+
import "../chunks/back-button-cGUnOwR0.js";
|
|
24
|
+
import "../chunks/button-B3VB87bu.js";
|
|
25
|
+
import "../chunks/popover-co0gSvD-.js";
|
|
26
26
|
//#region src/components/page/Page.js
|
|
27
27
|
var t = class extends HTMLElement {
|
|
28
28
|
static get observedAttributes() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require(`../chunks/icon-CGXHKbMq.js`);const e=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/back-button-
|
|
1
|
+
require(`../chunks/icon-CGXHKbMq.js`);const e=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/back-button-olXJu_Sg.js`),require(`../chunks/button-kbb_mcUl.js`),require(`../chunks/popover-Bek5fgHz.js`);var t=class extends HTMLElement{static get observedAttributes(){return[`heading`,`fallback-href`,`show-back-button`,`containered`]}constructor(){super(),this._actionsResizeObserver=null,this._actionsMutationObserver=null,this._actionsFrame=null,this._groupingActions=!1,this._actionFullWidthOriginal=new WeakMap,this._root=this.attachShadow({mode:`open`}),this._root.innerHTML=`
|
|
2
2
|
<style>
|
|
3
3
|
/* The built-in back button lives inside this component's shadow root,
|
|
4
4
|
so document-level button.css cannot reach its light-DOM button. */
|
|
@@ -8,9 +8,9 @@ import '../../back-button.css'
|
|
|
8
8
|
import '../../page.css'
|
|
9
9
|
import "../chunks/icon-Basse9AD.js";
|
|
10
10
|
import { t as e } from "../chunks/register-element-BFYmIynH.js";
|
|
11
|
-
import "../chunks/back-button-
|
|
12
|
-
import "../chunks/button-
|
|
13
|
-
import "../chunks/popover-
|
|
11
|
+
import "../chunks/back-button-cGUnOwR0.js";
|
|
12
|
+
import "../chunks/button-B3VB87bu.js";
|
|
13
|
+
import "../chunks/popover-co0gSvD-.js";
|
|
14
14
|
//#region src/components/page/Page.js
|
|
15
15
|
var t = class extends HTMLElement {
|
|
16
16
|
static get observedAttributes() {
|
|
@@ -13,5 +13,5 @@ const __mintLoadStyle = (key, url) => {
|
|
|
13
13
|
__mintLoadStyle('theme', '../../theme.css')
|
|
14
14
|
__mintLoadStyle('stack', '../../stack.css')
|
|
15
15
|
__mintLoadStyle('popover', '../../popover.css')
|
|
16
|
-
import { t as e } from "../chunks/popover-
|
|
16
|
+
import { t as e } from "../chunks/popover-co0gSvD-.js";
|
|
17
17
|
export { e as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../chunks/popover-
|
|
1
|
+
const e=require(`../chunks/popover-Bek5fgHz.js`);module.exports=e.t;
|
|
@@ -22,14 +22,14 @@ __mintLoadStyle('resource-table', '../../resource-table.css')
|
|
|
22
22
|
import "../chunks/icon-Basse9AD.js";
|
|
23
23
|
import { t as e } from "../chunks/register-element-BFYmIynH.js";
|
|
24
24
|
import "../chunks/icon-DcgcsymT.js";
|
|
25
|
-
import "../chunks/spinner-
|
|
26
|
-
import "../chunks/button-
|
|
27
|
-
import "../chunks/input-
|
|
28
|
-
import "../chunks/caret-down-
|
|
29
|
-
import "../chunks/popover-
|
|
30
|
-
import { n as t } from "../chunks/ScrollFade-
|
|
31
|
-
import "../chunks/search-
|
|
32
|
-
import "../chunks/table-
|
|
25
|
+
import "../chunks/spinner-B2sml0AG.js";
|
|
26
|
+
import "../chunks/button-B3VB87bu.js";
|
|
27
|
+
import "../chunks/input-Dqa8FmcB.js";
|
|
28
|
+
import "../chunks/caret-down-DpWztgFw.js";
|
|
29
|
+
import "../chunks/popover-co0gSvD-.js";
|
|
30
|
+
import { n as t } from "../chunks/ScrollFade-DvzPIk2A.js";
|
|
31
|
+
import "../chunks/search-oEuzdZDO.js";
|
|
32
|
+
import "../chunks/table-B_g7lNzN.js";
|
|
33
33
|
//#region src/components/resource-table/utility-aliases.js
|
|
34
34
|
var n = {
|
|
35
35
|
"-mr-1": "rtu-8956a4275",
|