monobill-mintui 0.6.606 → 0.6.608
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/button/Button.d.ts +57 -0
- package/dist/components/button/Button.d.ts.map +1 -0
- package/dist/components/button/index.d.ts +3 -0
- package/dist/components/button/index.d.ts.map +1 -0
- package/dist/components/icon/Icon.d.ts +16 -0
- package/dist/components/icon/Icon.d.ts.map +1 -0
- package/dist/components/icon/icons/index.cjs +34 -0
- package/dist/components/icon/icons/index.js +752 -0
- package/dist/components/icon/index.d.ts +3 -0
- package/dist/components/icon/index.d.ts.map +1 -0
- package/dist/components/icon/registry.d.ts +15 -0
- package/dist/components/icon/registry.d.ts.map +1 -0
- package/dist/components/select/Select.d.ts +3 -0
- package/dist/components/select/Select.d.ts.map +1 -1
- package/dist/components/spinner/Spinner.d.ts +13 -0
- package/dist/components/spinner/Spinner.d.ts.map +1 -0
- package/dist/components/spinner/index.d.ts +3 -0
- package/dist/components/spinner/index.d.ts.map +1 -0
- package/dist/components/stack/Stack.d.ts +23 -0
- package/dist/components/stack/Stack.d.ts.map +1 -0
- package/dist/components/stack/index.d.ts +3 -0
- package/dist/components/stack/index.d.ts.map +1 -0
- package/dist/components/switch/Switch.d.ts +33 -0
- package/dist/components/switch/Switch.d.ts.map +1 -0
- package/dist/components/switch/index.d.ts +3 -0
- package/dist/components/switch/index.d.ts.map +1 -0
- package/dist/components/text/Text.d.ts +25 -0
- package/dist/components/text/Text.d.ts.map +1 -0
- package/dist/components/text/index.d.ts +3 -0
- package/dist/components/text/index.d.ts.map +1 -0
- package/dist/index.cjs +9 -5
- package/dist/index.js +132 -118
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5083,7 +5083,7 @@ var w = class extends HTMLElement {
|
|
|
5083
5083
|
customElements.get("mint-time-picker") || customElements.define("mint-time-picker", w);
|
|
5084
5084
|
//#endregion
|
|
5085
5085
|
//#region src/components/select/Select.ts
|
|
5086
|
-
var T = class extends HTMLElement {
|
|
5086
|
+
var T = "data-mint-select-part", E = class e extends HTMLElement {
|
|
5087
5087
|
static get observedAttributes() {
|
|
5088
5088
|
return [
|
|
5089
5089
|
"name",
|
|
@@ -5099,17 +5099,31 @@ var T = class extends HTMLElement {
|
|
|
5099
5099
|
"loading"
|
|
5100
5100
|
];
|
|
5101
5101
|
}
|
|
5102
|
+
static {
|
|
5103
|
+
this._lightDomOptionHideStylesInjected = !1;
|
|
5104
|
+
}
|
|
5105
|
+
static _ensureLightDomOptionHideStyles() {
|
|
5106
|
+
if (e._lightDomOptionHideStylesInjected || typeof document > "u") return;
|
|
5107
|
+
e._lightDomOptionHideStylesInjected = !0;
|
|
5108
|
+
let t = document.createElement("style");
|
|
5109
|
+
t.setAttribute("data-mint-select-light-dom", ""), t.textContent = "/* Framework-driven <option>/<optgroup> stay on the host for DOM reconciliation; the visible control is the inner <select>. */\nmint-select > option,\nmint-select > optgroup {\n display: none !important;\n}", document.head.appendChild(t);
|
|
5110
|
+
}
|
|
5102
5111
|
constructor() {
|
|
5103
|
-
super(), this._select = null, this._wrapper = null, this._caretUpIcon = null, this._caretDownIcon = null, this._changeHandler = null, this._optionObserver = null, this._childrenObserver = null;
|
|
5112
|
+
super(), this._select = null, this._wrapper = null, this._caretUpIcon = null, this._caretDownIcon = null, this._changeHandler = null, this._optionObserver = null, this._childrenObserver = null, this._hostOptionsObserverRaf = null;
|
|
5104
5113
|
}
|
|
5105
5114
|
connectedCallback() {
|
|
5106
|
-
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "inline-block", "w-full"), this.getLabel() || console.error("mint-select: The \"label\" attribute is required. Please provide a label for the select."), this.render(), this._childrenObserver && this._childrenObserver.disconnect(), this._childrenObserver = new MutationObserver((e) => {
|
|
5107
|
-
e.some((e) => {
|
|
5108
|
-
let t =
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
})
|
|
5115
|
+
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "inline-block", "w-full"), this.getLabel() || console.error("mint-select: The \"label\" attribute is required. Please provide a label for the select."), e._ensureLightDomOptionHideStyles(), this.render(), this._childrenObserver && this._childrenObserver.disconnect(), this._childrenObserver = new MutationObserver((e) => {
|
|
5116
|
+
if (e.some((e) => {
|
|
5117
|
+
let t = e.target;
|
|
5118
|
+
if (this._select && (t === this._select || this._select.contains(t))) return !1;
|
|
5119
|
+
let n = Array.from(e.addedNodes).some((e) => e.nodeType === Node.ELEMENT_NODE && (e.tagName === "OPTION" || e.tagName === "OPTGROUP")) || Array.from(e.removedNodes).some((e) => e.nodeType === Node.ELEMENT_NODE && (e.tagName === "OPTION" || e.tagName === "OPTGROUP")), r = e.type === "attributes" && e.target.nodeType === Node.ELEMENT_NODE && (e.target.tagName === "OPTION" || e.target.tagName === "OPTGROUP");
|
|
5120
|
+
return n || r;
|
|
5121
|
+
})) {
|
|
5122
|
+
if (this._hostOptionsObserverRaf !== null) return;
|
|
5123
|
+
this._hostOptionsObserverRaf = requestAnimationFrame(() => {
|
|
5124
|
+
this._hostOptionsObserverRaf = null, this.isConnected && this.render();
|
|
5125
|
+
});
|
|
5126
|
+
}
|
|
5113
5127
|
}), this._childrenObserver.observe(this, {
|
|
5114
5128
|
childList: !0,
|
|
5115
5129
|
subtree: !0,
|
|
@@ -5122,7 +5136,7 @@ var T = class extends HTMLElement {
|
|
|
5122
5136
|
});
|
|
5123
5137
|
}
|
|
5124
5138
|
disconnectedCallback() {
|
|
5125
|
-
this._select && this._changeHandler && (this._select.removeEventListener("change", this._changeHandler), this._changeHandler = null), this._optionObserver &&= (this._optionObserver.disconnect(), null), this._childrenObserver &&= (this._childrenObserver.disconnect(), null);
|
|
5139
|
+
this._select && this._changeHandler && (this._select.removeEventListener("change", this._changeHandler), this._changeHandler = null), this._optionObserver &&= (this._optionObserver.disconnect(), null), this._childrenObserver &&= (this._childrenObserver.disconnect(), null), this._hostOptionsObserverRaf !== null && (cancelAnimationFrame(this._hostOptionsObserverRaf), this._hostOptionsObserverRaf = null);
|
|
5126
5140
|
}
|
|
5127
5141
|
isLoading() {
|
|
5128
5142
|
return this.getAttribute("loading") === "true";
|
|
@@ -5251,55 +5265,55 @@ var T = class extends HTMLElement {
|
|
|
5251
5265
|
].filter(Boolean).join(" ");
|
|
5252
5266
|
}
|
|
5253
5267
|
render() {
|
|
5254
|
-
|
|
5268
|
+
this._hostOptionsObserverRaf !== null && (cancelAnimationFrame(this._hostOptionsObserverRaf), this._hostOptionsObserverRaf = null);
|
|
5269
|
+
let e = this.isLoading(), t = this.isMultiple(), n = this.getValue(), r = [];
|
|
5255
5270
|
this._select && Array.from(this._select.children).forEach((e) => {
|
|
5256
|
-
(e.tagName === "OPTION" || e.tagName === "OPTGROUP") &&
|
|
5257
|
-
})
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
this.
|
|
5261
|
-
|
|
5262
|
-
if (r) {
|
|
5271
|
+
(e.tagName === "OPTION" || e.tagName === "OPTGROUP") && r.push(e.cloneNode(!0));
|
|
5272
|
+
}), Array.from(this.children).forEach((e) => {
|
|
5273
|
+
e instanceof HTMLElement && e.hasAttribute(T) && e.remove();
|
|
5274
|
+
}), this._wrapper = null, this._select = null;
|
|
5275
|
+
let i = Array.from(this.children).filter((e) => e.tagName === "OPTION" || e.tagName === "OPTGROUP").map((e) => e.cloneNode(!0)), a = this.getLabel(), o = this.getInfo(), s = this.getId(), c = this.getName(), l = this.isDisabled(), u = this.hasError();
|
|
5276
|
+
if (a) {
|
|
5263
5277
|
let e = document.createElement("label");
|
|
5264
|
-
e.className = "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",
|
|
5265
|
-
let t = document.createTextNode(
|
|
5278
|
+
e.setAttribute(T, "label"), e.className = "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", s && e.setAttribute("for", s);
|
|
5279
|
+
let t = document.createTextNode(a);
|
|
5266
5280
|
e.appendChild(t), this.appendChild(e);
|
|
5267
5281
|
}
|
|
5268
|
-
this._wrapper = document.createElement("div"), this._wrapper.className = "relative w-full", this.appendChild(this._wrapper), this._select = document.createElement("select"), this._select.className = this.getSelectClasses(),
|
|
5269
|
-
let d =
|
|
5282
|
+
this._wrapper = document.createElement("div"), this._wrapper.setAttribute(T, "wrapper"), this._wrapper.className = "relative w-full", this.appendChild(this._wrapper), this._select = document.createElement("select"), this._select.className = this.getSelectClasses(), s && (this._select.id = s), c && (this._select.name = c), l && (this._select.disabled = !0), t && (this._select.multiple = !0), this._select.setAttribute("aria-invalid", u ? "true" : "false");
|
|
5283
|
+
let d = i.length > 0 ? i : r;
|
|
5270
5284
|
if (d.length > 0 && d.forEach((e) => {
|
|
5271
5285
|
this._select.appendChild(e);
|
|
5272
5286
|
}), this._select.options.length === 0) {
|
|
5273
5287
|
let e = document.createElement("option");
|
|
5274
5288
|
e.value = "", e.textContent = "Select an option", e.disabled = !0, e.selected = !0, this._select.appendChild(e);
|
|
5275
5289
|
}
|
|
5276
|
-
if (
|
|
5290
|
+
if (t) {
|
|
5277
5291
|
let e = [];
|
|
5278
5292
|
try {
|
|
5279
|
-
let t =
|
|
5293
|
+
let t = n ? JSON.parse(n) : [];
|
|
5280
5294
|
e = Array.isArray(t) ? t.map((e) => String(e)) : [];
|
|
5281
5295
|
} catch {
|
|
5282
|
-
e =
|
|
5296
|
+
e = n ? [String(n)] : [];
|
|
5283
5297
|
}
|
|
5284
5298
|
Array.from(this._select.options).forEach((t) => {
|
|
5285
5299
|
t.selected = e.includes(t.value);
|
|
5286
5300
|
});
|
|
5287
|
-
} else this._select.value =
|
|
5301
|
+
} else this._select.value = n || "";
|
|
5288
5302
|
if (this._changeHandler && this._select && this._select.removeEventListener("change", this._changeHandler), this._changeHandler = (e) => {
|
|
5289
|
-
let
|
|
5290
|
-
(this.getAttribute("value") || "") !==
|
|
5291
|
-
let
|
|
5303
|
+
let n = e.target, r = t ? Array.from(n.selectedOptions).map((e) => e.value) : n.value, i = t ? JSON.stringify(r) : String(r || "");
|
|
5304
|
+
(this.getAttribute("value") || "") !== i && (i ? this.setAttribute("value", i) : this.removeAttribute("value"));
|
|
5305
|
+
let a = new Event("input", {
|
|
5292
5306
|
bubbles: !0,
|
|
5293
5307
|
cancelable: !0,
|
|
5294
5308
|
composed: !0
|
|
5295
5309
|
});
|
|
5296
|
-
this.dispatchEvent(
|
|
5297
|
-
detail: { value:
|
|
5310
|
+
this.dispatchEvent(a), this.dispatchEvent(new CustomEvent("input", {
|
|
5311
|
+
detail: { value: r },
|
|
5298
5312
|
bubbles: !0,
|
|
5299
5313
|
cancelable: !0,
|
|
5300
5314
|
composed: !0
|
|
5301
5315
|
})), this.dispatchEvent(new CustomEvent("change", {
|
|
5302
|
-
detail: { value:
|
|
5316
|
+
detail: { value: r },
|
|
5303
5317
|
bubbles: !0,
|
|
5304
5318
|
cancelable: !0,
|
|
5305
5319
|
composed: !0
|
|
@@ -5307,7 +5321,7 @@ var T = class extends HTMLElement {
|
|
|
5307
5321
|
}, this._select.addEventListener("change", this._changeHandler), this._optionObserver && this._optionObserver.disconnect(), this._optionObserver = new MutationObserver(() => {
|
|
5308
5322
|
let e = this.getAttribute("value") || this.value || "";
|
|
5309
5323
|
this._select && e && requestAnimationFrame(() => {
|
|
5310
|
-
if (this._select) if (
|
|
5324
|
+
if (this._select) if (t) {
|
|
5311
5325
|
let t = [];
|
|
5312
5326
|
try {
|
|
5313
5327
|
let n = JSON.parse(e);
|
|
@@ -5323,14 +5337,14 @@ var T = class extends HTMLElement {
|
|
|
5323
5337
|
}), this._optionObserver.observe(this._select, {
|
|
5324
5338
|
childList: !0,
|
|
5325
5339
|
subtree: !0
|
|
5326
|
-
}), this._wrapper.appendChild(this._select),
|
|
5340
|
+
}), this._wrapper.appendChild(this._select), t) this._caretUpIcon = null, this._caretDownIcon = null;
|
|
5327
5341
|
else {
|
|
5328
5342
|
let e = document.createElement("div");
|
|
5329
5343
|
e.className = "absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none z-10 flex flex-col", this._caretUpIcon = document.createElement("mint-icon"), this._caretUpIcon.setAttribute("name", "caret-up"), this._caretUpIcon.className = "w-[.9em] h-[.9em] text-gray-400 dark:text-gray-500 mb-[-.2rem]", e.appendChild(this._caretUpIcon), this._caretDownIcon = document.createElement("mint-icon"), this._caretDownIcon.setAttribute("name", "caret-down"), this._caretDownIcon.className = "w-[.9em] h-[.9em] text-gray-400 dark:text-gray-500 mt-[-.2rem]", e.appendChild(this._caretDownIcon), this._wrapper.appendChild(e);
|
|
5330
5344
|
}
|
|
5331
|
-
if (
|
|
5345
|
+
if (o) {
|
|
5332
5346
|
let e = document.createElement("div");
|
|
5333
|
-
e.className = "mt-1 text-xs text-gray-500 dark:text-gray-400", e.textContent =
|
|
5347
|
+
e.setAttribute(T, "info"), e.className = "mt-1 text-xs text-gray-500 dark:text-gray-400", e.textContent = o, this.appendChild(e);
|
|
5334
5348
|
}
|
|
5335
5349
|
this._renderErrorState(), this._renderSkeleton(e);
|
|
5336
5350
|
}
|
|
@@ -5349,13 +5363,13 @@ var T = class extends HTMLElement {
|
|
|
5349
5363
|
}
|
|
5350
5364
|
_renderErrorState() {
|
|
5351
5365
|
let e = this.hasError(), t = this.getErrorMessage(), n = this.querySelector(".mint-select-error");
|
|
5352
|
-
e && t ? (n || (n = document.createElement("div"), n.className = "mint-select-error mt-1 text-xs text-red-600 dark:text-red-400", this.appendChild(n)), n.textContent = t) : n && n.remove();
|
|
5366
|
+
e && t ? (n ? n.hasAttribute(T) || n.setAttribute(T, "error") : (n = document.createElement("div"), n.setAttribute(T, "error"), n.className = "mint-select-error mt-1 text-xs text-red-600 dark:text-red-400", this.appendChild(n)), n.textContent = t) : n && n.remove();
|
|
5353
5367
|
}
|
|
5354
5368
|
};
|
|
5355
|
-
customElements.get("mint-select") || customElements.define("mint-select",
|
|
5369
|
+
customElements.get("mint-select") || customElements.define("mint-select", E);
|
|
5356
5370
|
//#endregion
|
|
5357
5371
|
//#region src/components/dropzone/Dropzone.ts
|
|
5358
|
-
var
|
|
5372
|
+
var D = class extends HTMLElement {
|
|
5359
5373
|
static get observedAttributes() {
|
|
5360
5374
|
return [
|
|
5361
5375
|
"label",
|
|
@@ -5693,10 +5707,10 @@ var E = class extends HTMLElement {
|
|
|
5693
5707
|
return this._selectedFiles.some((t) => t.name === e.name && t.size === e.size && t.lastModified === e.lastModified);
|
|
5694
5708
|
}
|
|
5695
5709
|
};
|
|
5696
|
-
customElements.get("mint-dropzone") || customElements.define("mint-dropzone",
|
|
5710
|
+
customElements.get("mint-dropzone") || customElements.define("mint-dropzone", D);
|
|
5697
5711
|
//#endregion
|
|
5698
5712
|
//#region src/components/form/Form.ts
|
|
5699
|
-
var
|
|
5713
|
+
var O = class extends HTMLElement {
|
|
5700
5714
|
static get observedAttributes() {
|
|
5701
5715
|
return [
|
|
5702
5716
|
"action",
|
|
@@ -6640,7 +6654,7 @@ var D = class extends HTMLElement {
|
|
|
6640
6654
|
this._reactiveDataObserver !== null && (cancelAnimationFrame(this._reactiveDataObserver), this._reactiveDataObserver = null), this._reactiveDataProxy = null, this._lastDataSnapshot = null, this._lastAppliedDataSnapshot = null;
|
|
6641
6655
|
}
|
|
6642
6656
|
};
|
|
6643
|
-
customElements.get("mint-form") || customElements.define("mint-form",
|
|
6657
|
+
customElements.get("mint-form") || customElements.define("mint-form", O), typeof window < "u" && (window.mintForm = window.mintForm || {
|
|
6644
6658
|
defaults: { headers: { common: {} } },
|
|
6645
6659
|
interceptors: { response: { handlers: [] } }
|
|
6646
6660
|
}, window.mintForm.interceptors.response.use || (window.mintForm.interceptors.response.use = function(e, t) {
|
|
@@ -6651,7 +6665,7 @@ customElements.get("mint-form") || customElements.define("mint-form", D), typeof
|
|
|
6651
6665
|
}));
|
|
6652
6666
|
//#endregion
|
|
6653
6667
|
//#region src/components/table/Table.ts
|
|
6654
|
-
var
|
|
6668
|
+
var k = class extends HTMLElement {
|
|
6655
6669
|
constructor(...e) {
|
|
6656
6670
|
super(...e), this._observer = null;
|
|
6657
6671
|
}
|
|
@@ -6774,10 +6788,10 @@ var O = class extends HTMLElement {
|
|
|
6774
6788
|
e.className = "", t.filter(Boolean).forEach((t) => e.classList.add(...t.split(" ")));
|
|
6775
6789
|
}
|
|
6776
6790
|
};
|
|
6777
|
-
customElements.get("mint-table") || customElements.define("mint-table",
|
|
6791
|
+
customElements.get("mint-table") || customElements.define("mint-table", k);
|
|
6778
6792
|
//#endregion
|
|
6779
6793
|
//#region src/components/chip/Chip.ts
|
|
6780
|
-
var
|
|
6794
|
+
var A = class extends HTMLElement {
|
|
6781
6795
|
constructor(...e) {
|
|
6782
6796
|
super(...e), this._root = null, this._textWrap = null, this._dismissBtn = null, this._clickHandler = null;
|
|
6783
6797
|
}
|
|
@@ -6840,10 +6854,10 @@ var k = class extends HTMLElement {
|
|
|
6840
6854
|
}, e.addEventListener("click", this._clickHandler), this._dismissBtn = e;
|
|
6841
6855
|
}
|
|
6842
6856
|
};
|
|
6843
|
-
customElements.get("mint-chip") || customElements.define("mint-chip",
|
|
6857
|
+
customElements.get("mint-chip") || customElements.define("mint-chip", A);
|
|
6844
6858
|
//#endregion
|
|
6845
6859
|
//#region src/components/tags/Tags.ts
|
|
6846
|
-
var
|
|
6860
|
+
var j = class extends HTMLElement {
|
|
6847
6861
|
constructor(...e) {
|
|
6848
6862
|
super(...e), this._container = null, this._chipsWrap = null, this._input = null, this._tags = [], this._predefinedTags = [], this._placeholder = "Add tag", this._predefinedPopoverOpenListenersAttached = !1, this._predefinedBlurCloseTimer = null, this._suppressNextPredefinedBlurClose = !1, this._dragIndex = null, this._dragChip = null, this._isPointerDragging = !1, this._pointerMoveHandler = null, this._pointerUpHandler = null, this._containerFocusRingListeners = !1, this._predefinedFieldResizeObserver = null, this._predefinedPopoverBodyEl = null;
|
|
6849
6863
|
}
|
|
@@ -7312,10 +7326,10 @@ var A = class extends HTMLElement {
|
|
|
7312
7326
|
}
|
|
7313
7327
|
}
|
|
7314
7328
|
};
|
|
7315
|
-
customElements.get("mint-tags") || customElements.define("mint-tags",
|
|
7329
|
+
customElements.get("mint-tags") || customElements.define("mint-tags", j);
|
|
7316
7330
|
//#endregion
|
|
7317
7331
|
//#region src/components/clickable/Clickable.ts
|
|
7318
|
-
var
|
|
7332
|
+
var ee = class extends HTMLElement {
|
|
7319
7333
|
constructor(...e) {
|
|
7320
7334
|
super(...e), this._clickHandler = null, this._keydownHandler = null;
|
|
7321
7335
|
}
|
|
@@ -7362,10 +7376,10 @@ var j = class extends HTMLElement {
|
|
|
7362
7376
|
e === "disabled" && (n === "true" ? (this.classList.remove("cursor-pointer"), this.classList.add("opacity-50", "cursor-not-allowed"), this.setAttribute("aria-disabled", "true")) : (this.classList.remove("opacity-50", "cursor-not-allowed"), this.classList.add("cursor-pointer"), this.removeAttribute("aria-disabled")));
|
|
7363
7377
|
}
|
|
7364
7378
|
};
|
|
7365
|
-
customElements.get("mint-clickable") || customElements.define("mint-clickable",
|
|
7379
|
+
customElements.get("mint-clickable") || customElements.define("mint-clickable", ee);
|
|
7366
7380
|
//#endregion
|
|
7367
7381
|
//#region src/components/alert/Alert.ts
|
|
7368
|
-
var
|
|
7382
|
+
var M = class extends HTMLElement {
|
|
7369
7383
|
static get observedAttributes() {
|
|
7370
7384
|
return [
|
|
7371
7385
|
"heading",
|
|
@@ -7463,10 +7477,10 @@ var ee = class extends HTMLElement {
|
|
|
7463
7477
|
}), this.appendChild(this._headerWrapper), this.appendChild(this._bodyWrapper);
|
|
7464
7478
|
}
|
|
7465
7479
|
};
|
|
7466
|
-
customElements.get("mint-alert") || customElements.define("mint-alert",
|
|
7480
|
+
customElements.get("mint-alert") || customElements.define("mint-alert", M);
|
|
7467
7481
|
//#endregion
|
|
7468
7482
|
//#region src/components/resource-table/ResourceTable.ts
|
|
7469
|
-
var
|
|
7483
|
+
var te = class extends HTMLElement {
|
|
7470
7484
|
static get observedAttributes() {
|
|
7471
7485
|
return [
|
|
7472
7486
|
"configuration",
|
|
@@ -8567,10 +8581,10 @@ var M = class extends HTMLElement {
|
|
|
8567
8581
|
e !== null && (this._currentPage = e, this._offset = (this._currentPage - 1) * this._perPage);
|
|
8568
8582
|
}
|
|
8569
8583
|
};
|
|
8570
|
-
customElements.get("mint-resource-table") || customElements.define("mint-resource-table",
|
|
8584
|
+
customElements.get("mint-resource-table") || customElements.define("mint-resource-table", te);
|
|
8571
8585
|
//#endregion
|
|
8572
8586
|
//#region src/components/resource-table/ResourceTableContextMenu.ts
|
|
8573
|
-
var
|
|
8587
|
+
var ne = 550, re = 12, ie = { passive: !0 }, ae = class extends HTMLElement {
|
|
8574
8588
|
constructor(...e) {
|
|
8575
8589
|
super(...e), this._table = null, this._anchor = null, this._popover = null, this._menuRoot = null, this._baseId = "", this._touchTimer = null, this._touchStart = null, this._slotObserver = null, this._scrollCloseTargets = [], this._onScrollClose = () => {
|
|
8576
8590
|
this._closePopover();
|
|
@@ -8597,7 +8611,7 @@ var te = 550, ne = 12, re = { passive: !0 }, ie = class extends HTMLElement {
|
|
|
8597
8611
|
let t = e.touches[0];
|
|
8598
8612
|
if (!t) return;
|
|
8599
8613
|
let n = t.clientX - this._touchStart.x, r = t.clientY - this._touchStart.y;
|
|
8600
|
-
n * n + r * r >
|
|
8614
|
+
n * n + r * r > re * re && (this._clearTouchTimer(), this._touchStart = null);
|
|
8601
8615
|
}, this._onTouchEnd = () => {
|
|
8602
8616
|
this._clearTouchTimer(), this._touchStart = null;
|
|
8603
8617
|
};
|
|
@@ -8620,7 +8634,7 @@ var te = 550, ne = 12, re = { passive: !0 }, ie = class extends HTMLElement {
|
|
|
8620
8634
|
}
|
|
8621
8635
|
_longPressMs() {
|
|
8622
8636
|
let e = parseInt(this.getAttribute("long-press-ms") || "", 10);
|
|
8623
|
-
return !Number.isNaN(e) && e > 100 ? e :
|
|
8637
|
+
return !Number.isNaN(e) && e > 100 ? e : ne;
|
|
8624
8638
|
}
|
|
8625
8639
|
_resolveTable() {
|
|
8626
8640
|
let e = this.getAttribute("for")?.trim();
|
|
@@ -8674,12 +8688,12 @@ var te = 550, ne = 12, re = { passive: !0 }, ie = class extends HTMLElement {
|
|
|
8674
8688
|
return this._elementIsScrollContainer(e) && r(e), t;
|
|
8675
8689
|
}
|
|
8676
8690
|
_detachScrollCloseListeners() {
|
|
8677
|
-
for (let e of this._scrollCloseTargets) e.removeEventListener("scroll", this._onScrollClose,
|
|
8691
|
+
for (let e of this._scrollCloseTargets) e.removeEventListener("scroll", this._onScrollClose, ie);
|
|
8678
8692
|
this._scrollCloseTargets = [];
|
|
8679
8693
|
}
|
|
8680
8694
|
_attachScrollCloseListeners(e) {
|
|
8681
8695
|
this._detachScrollCloseListeners(), this._scrollCloseTargets = this._collectScrollCloseTargets(e);
|
|
8682
|
-
for (let e of this._scrollCloseTargets) e.addEventListener("scroll", this._onScrollClose,
|
|
8696
|
+
for (let e of this._scrollCloseTargets) e.addEventListener("scroll", this._onScrollClose, ie);
|
|
8683
8697
|
}
|
|
8684
8698
|
_closePopover() {
|
|
8685
8699
|
if (this._detachScrollCloseListeners(), !this._popover?.hasAttribute("open")) return;
|
|
@@ -8720,10 +8734,10 @@ var te = 550, ne = 12, re = { passive: !0 }, ie = class extends HTMLElement {
|
|
|
8720
8734
|
l && this._attachScrollCloseListeners(l);
|
|
8721
8735
|
}
|
|
8722
8736
|
};
|
|
8723
|
-
customElements.get("mint-resource-table-context-menu") || customElements.define("mint-resource-table-context-menu",
|
|
8737
|
+
customElements.get("mint-resource-table-context-menu") || customElements.define("mint-resource-table-context-menu", ae);
|
|
8724
8738
|
//#endregion
|
|
8725
8739
|
//#region src/components/off-canvas/OffCanvas.ts
|
|
8726
|
-
var
|
|
8740
|
+
var oe = class extends HTMLElement {
|
|
8727
8741
|
static get observedAttributes() {
|
|
8728
8742
|
return [
|
|
8729
8743
|
"id",
|
|
@@ -8899,10 +8913,10 @@ var ae = class extends HTMLElement {
|
|
|
8899
8913
|
}
|
|
8900
8914
|
}
|
|
8901
8915
|
};
|
|
8902
|
-
customElements.get("mint-off-canvas") || customElements.define("mint-off-canvas",
|
|
8916
|
+
customElements.get("mint-off-canvas") || customElements.define("mint-off-canvas", oe);
|
|
8903
8917
|
//#endregion
|
|
8904
8918
|
//#region src/components/tabs/Tab.ts
|
|
8905
|
-
var
|
|
8919
|
+
var N = class extends HTMLElement {
|
|
8906
8920
|
static get observedAttributes() {
|
|
8907
8921
|
return [
|
|
8908
8922
|
"active",
|
|
@@ -8966,10 +8980,10 @@ var oe = class extends HTMLElement {
|
|
|
8966
8980
|
})));
|
|
8967
8981
|
}
|
|
8968
8982
|
};
|
|
8969
|
-
customElements.get("mint-tab") || customElements.define("mint-tab",
|
|
8983
|
+
customElements.get("mint-tab") || customElements.define("mint-tab", N);
|
|
8970
8984
|
//#endregion
|
|
8971
8985
|
//#region src/components/tabs/TabList.ts
|
|
8972
|
-
var
|
|
8986
|
+
var P = class extends HTMLElement {
|
|
8973
8987
|
static get observedAttributes() {
|
|
8974
8988
|
return ["position"];
|
|
8975
8989
|
}
|
|
@@ -8990,10 +9004,10 @@ var N = class extends HTMLElement {
|
|
|
8990
9004
|
this.classList.remove("flex", "inline-flex", "flex-row", "flex-col", "gap-1", "gap-2", "pb-0", "pr-0", "pl-0", "mb-0", "mr-0", "ml-0", "self-start"), this.classList.add("box-border", "m-0", "p-1", "border", "bg-gray-100", "dark:bg-mint-elevated", "dark:border-mint-divider", "border-gray-200", "w-auto", "rounded-lg", "gap-2"), e === "top" ? this.classList.add("inline-flex", "flex-row", "mb-0", "self-start") : e === "left" ? this.classList.add("flex", "flex-col", "mr-0") : e === "right" && this.classList.add("flex", "flex-col", "ml-0");
|
|
8991
9005
|
}
|
|
8992
9006
|
};
|
|
8993
|
-
customElements.get("mint-tab-list") || customElements.define("mint-tab-list",
|
|
9007
|
+
customElements.get("mint-tab-list") || customElements.define("mint-tab-list", P);
|
|
8994
9008
|
//#endregion
|
|
8995
9009
|
//#region src/components/tabs/TabContent.ts
|
|
8996
|
-
var
|
|
9010
|
+
var F = class extends HTMLElement {
|
|
8997
9011
|
static get observedAttributes() {
|
|
8998
9012
|
return ["id"];
|
|
8999
9013
|
}
|
|
@@ -9029,10 +9043,10 @@ var P = class extends HTMLElement {
|
|
|
9029
9043
|
}
|
|
9030
9044
|
render() {}
|
|
9031
9045
|
};
|
|
9032
|
-
customElements.get("mint-tab-content") || customElements.define("mint-tab-content",
|
|
9046
|
+
customElements.get("mint-tab-content") || customElements.define("mint-tab-content", F);
|
|
9033
9047
|
//#endregion
|
|
9034
9048
|
//#region src/components/tabs/Tabs.ts
|
|
9035
|
-
var
|
|
9049
|
+
var I = class extends HTMLElement {
|
|
9036
9050
|
constructor() {
|
|
9037
9051
|
super(), this._tabClickHandler = null, this._mutationObserver = null;
|
|
9038
9052
|
}
|
|
@@ -9110,10 +9124,10 @@ var F = class extends HTMLElement {
|
|
|
9110
9124
|
}), n && this.showContent(n));
|
|
9111
9125
|
}
|
|
9112
9126
|
};
|
|
9113
|
-
customElements.get("mint-tabs") || customElements.define("mint-tabs",
|
|
9127
|
+
customElements.get("mint-tabs") || customElements.define("mint-tabs", I);
|
|
9114
9128
|
//#endregion
|
|
9115
9129
|
//#region src/components/chart/Chart.ts
|
|
9116
|
-
var
|
|
9130
|
+
var L = class e extends HTMLElement {
|
|
9117
9131
|
static get observedAttributes() {
|
|
9118
9132
|
return [
|
|
9119
9133
|
"type",
|
|
@@ -10390,10 +10404,10 @@ var I = class e extends HTMLElement {
|
|
|
10390
10404
|
});
|
|
10391
10405
|
}
|
|
10392
10406
|
};
|
|
10393
|
-
customElements.get("mint-chart") || customElements.define("mint-chart",
|
|
10407
|
+
customElements.get("mint-chart") || customElements.define("mint-chart", L);
|
|
10394
10408
|
//#endregion
|
|
10395
10409
|
//#region src/components/side-navigation/SideNavigationLink.ts
|
|
10396
|
-
var
|
|
10410
|
+
var R = class extends HTMLElement {
|
|
10397
10411
|
constructor(...e) {
|
|
10398
10412
|
super(...e), this._trigger = null, this._submenuContainer = null, this._contentObserver = null, this._renderFrame = null;
|
|
10399
10413
|
}
|
|
@@ -10568,10 +10582,10 @@ var L = class extends HTMLElement {
|
|
|
10568
10582
|
this._hasSubmenu() && !this._isSubmenuItem() ? this._buildDropdownLink() : this._buildSimpleLink();
|
|
10569
10583
|
}
|
|
10570
10584
|
};
|
|
10571
|
-
customElements.get("mint-sidenav-link") || customElements.define("mint-sidenav-link",
|
|
10585
|
+
customElements.get("mint-sidenav-link") || customElements.define("mint-sidenav-link", R);
|
|
10572
10586
|
//#endregion
|
|
10573
10587
|
//#region src/components/side-navigation/SideNavigationLinks.ts
|
|
10574
|
-
var
|
|
10588
|
+
var z = class extends HTMLElement {
|
|
10575
10589
|
constructor(...e) {
|
|
10576
10590
|
super(...e), this._container = null, this._title = null, this._titleLabel = null, this._titleCaret = null, this._list = null, this._titleClickHandler = null, this._listenerCounts = /* @__PURE__ */ new Map();
|
|
10577
10591
|
}
|
|
@@ -10650,10 +10664,10 @@ var R = class extends HTMLElement {
|
|
|
10650
10664
|
});
|
|
10651
10665
|
}
|
|
10652
10666
|
};
|
|
10653
|
-
customElements.get("mint-sidenav-links") || customElements.define("mint-sidenav-links",
|
|
10667
|
+
customElements.get("mint-sidenav-links") || customElements.define("mint-sidenav-links", z);
|
|
10654
10668
|
//#endregion
|
|
10655
10669
|
//#region src/components/side-navigation/SideNavigationActionLinks.ts
|
|
10656
|
-
var
|
|
10670
|
+
var B = class extends HTMLElement {
|
|
10657
10671
|
static get observedAttributes() {
|
|
10658
10672
|
return ["separated"];
|
|
10659
10673
|
}
|
|
@@ -10670,10 +10684,10 @@ var z = class extends HTMLElement {
|
|
|
10670
10684
|
this.className = this._isSeparated() ? "block w-full mt-2 border-t border-gray-200 pt-2 px-2 pb-2 dark:border-mint-divider" : "block w-full p-2";
|
|
10671
10685
|
}
|
|
10672
10686
|
};
|
|
10673
|
-
customElements.get("mint-sidenav-action-links") || customElements.define("mint-sidenav-action-links",
|
|
10687
|
+
customElements.get("mint-sidenav-action-links") || customElements.define("mint-sidenav-action-links", B);
|
|
10674
10688
|
//#endregion
|
|
10675
10689
|
//#region src/components/side-navigation/SideNavigationActionMenu.ts
|
|
10676
|
-
var
|
|
10690
|
+
var V = class extends HTMLElement {
|
|
10677
10691
|
constructor(...e) {
|
|
10678
10692
|
super(...e), this._wrapper = null, this._trigger = null, this._popover = null, this._triggerId = "", this._contentObserver = null, this._renderFrame = null;
|
|
10679
10693
|
}
|
|
@@ -10732,15 +10746,15 @@ var B = class extends HTMLElement {
|
|
|
10732
10746
|
}) : a.appendChild(this._createDefaultGroup()), this._popover.appendChild(a), this._wrapper.appendChild(this._trigger), this._wrapper.appendChild(this._popover);
|
|
10733
10747
|
}
|
|
10734
10748
|
};
|
|
10735
|
-
customElements.get("mint-sidenav-action-menu") || customElements.define("mint-sidenav-action-menu",
|
|
10749
|
+
customElements.get("mint-sidenav-action-menu") || customElements.define("mint-sidenav-action-menu", V);
|
|
10736
10750
|
//#endregion
|
|
10737
10751
|
//#region src/components/side-navigation/SideNavigation.ts
|
|
10738
|
-
var
|
|
10752
|
+
var H = "mint:url-change";
|
|
10739
10753
|
function se() {
|
|
10740
10754
|
if (window.__mintUrlChangePatched) return;
|
|
10741
10755
|
window.__mintUrlChangePatched = !0;
|
|
10742
10756
|
let e = () => {
|
|
10743
|
-
window.dispatchEvent(new Event(
|
|
10757
|
+
window.dispatchEvent(new Event(H));
|
|
10744
10758
|
}, t = (t) => {
|
|
10745
10759
|
let n = history[t].bind(history);
|
|
10746
10760
|
history[t] = ((...t) => {
|
|
@@ -10750,7 +10764,7 @@ function se() {
|
|
|
10750
10764
|
};
|
|
10751
10765
|
t("pushState"), t("replaceState");
|
|
10752
10766
|
}
|
|
10753
|
-
var
|
|
10767
|
+
var U = class extends HTMLElement {
|
|
10754
10768
|
constructor(...e) {
|
|
10755
10769
|
super(...e), this._backdrop = null, this._container = null, this._header = null, this._content = null, this._footer = null, this._escapeHandler = null, this._mediaQuery = null, this._mediaListener = null, this._accordionHandler = null, this._urlChangeHandler = null, this._contentObserver = null, this._renderFrame = null, this._onMobileNavNavigateClick = (e) => {
|
|
10756
10770
|
if (this._mediaQuery?.matches) return;
|
|
@@ -10814,10 +10828,10 @@ var H = class extends HTMLElement {
|
|
|
10814
10828
|
_attachUrlChangeListener() {
|
|
10815
10829
|
this._urlChangeHandler || (se(), this._urlChangeHandler = () => {
|
|
10816
10830
|
this._mediaQuery?.matches || this._isOpen() && this.removeAttribute("open");
|
|
10817
|
-
}, window.addEventListener("popstate", this._urlChangeHandler), window.addEventListener("hashchange", this._urlChangeHandler), window.addEventListener(
|
|
10831
|
+
}, window.addEventListener("popstate", this._urlChangeHandler), window.addEventListener("hashchange", this._urlChangeHandler), window.addEventListener(H, this._urlChangeHandler));
|
|
10818
10832
|
}
|
|
10819
10833
|
_detachUrlChangeListener() {
|
|
10820
|
-
this._urlChangeHandler &&= (window.removeEventListener("popstate", this._urlChangeHandler), window.removeEventListener("hashchange", this._urlChangeHandler), window.removeEventListener(
|
|
10834
|
+
this._urlChangeHandler &&= (window.removeEventListener("popstate", this._urlChangeHandler), window.removeEventListener("hashchange", this._urlChangeHandler), window.removeEventListener(H, this._urlChangeHandler), null);
|
|
10821
10835
|
}
|
|
10822
10836
|
_observeContentMutations() {
|
|
10823
10837
|
this._contentObserver ||= new MutationObserver(() => {
|
|
@@ -10922,10 +10936,10 @@ var H = class extends HTMLElement {
|
|
|
10922
10936
|
this._ensureBackdrop(), this._ensureContainer(), this._syncShell(), this._buildUserHeader(), this._buildContent(), this._buildFooter();
|
|
10923
10937
|
}
|
|
10924
10938
|
};
|
|
10925
|
-
customElements.get("mint-side-navigation") || customElements.define("mint-side-navigation",
|
|
10939
|
+
customElements.get("mint-side-navigation") || customElements.define("mint-side-navigation", U);
|
|
10926
10940
|
//#endregion
|
|
10927
10941
|
//#region src/components/top-navigation/TopNavigation.ts
|
|
10928
|
-
var
|
|
10942
|
+
var W = class extends HTMLElement {
|
|
10929
10943
|
constructor(...e) {
|
|
10930
10944
|
super(...e), this._bar = null, this._menuButton = null, this._logoLink = null, this._menuClickHandler = null, this._darkModeObserver = null, this._contentObserver = null, this._resizeHandler = null, this._desktopSearchInput = null, this._desktopSearchShell = null, this._mobileSearchButton = null, this._searchPanel = null, this._searchPanelInput = null, this._searchResultsWrap = null, this._searchStateWrap = null, this._searchDebounceId = null, this._searchAbortController = null, this._searchOpen = !1, this._searchQuery = "", this._globalKeydownHandler = null, this._docClickHandler = null, this._renderFrame = null;
|
|
10931
10945
|
}
|
|
@@ -11211,10 +11225,10 @@ var U = class extends HTMLElement {
|
|
|
11211
11225
|
this._searchPanelInput && (this._searchPanelInput.placeholder = this._getSearchPlaceholder()), this._syncSearchPanelVisibility(), this._positionSearchPanel();
|
|
11212
11226
|
}
|
|
11213
11227
|
};
|
|
11214
|
-
customElements.get("mint-top-navigation") || customElements.define("mint-top-navigation",
|
|
11228
|
+
customElements.get("mint-top-navigation") || customElements.define("mint-top-navigation", W);
|
|
11215
11229
|
//#endregion
|
|
11216
11230
|
//#region src/components/search/Search.ts
|
|
11217
|
-
var
|
|
11231
|
+
var G = class e extends HTMLElement {
|
|
11218
11232
|
constructor(...e) {
|
|
11219
11233
|
super(...e), this._shell = null, this._desktopInput = null, this._panel = null, this._panelInner = null, this._panelInput = null, this._panelFiltersWrap = null, this._panelFiltersMainRow = null, this._panelFiltersChips = null, this._panelFiltersShowAllWrap = null, this._panelFiltersShowAllBtn = null, this._panelFiltersMorePanel = null, this._filtersMoreOpen = !1, this._filterOverflowObserver = null, this._filterOverflowZeroWidthRetries = 0, this._desktopFilterWrap = null, this._mobileFilterWrap = null, this._resultsWrap = null, this._stateWrap = null, this._customResultsWrap = null, this._query = "", this._searchOpen = !1, this._selectedFilters = [], this._selectedFilterBackspaceArmed = !1, this._debounceId = null, this._abortController = null, this._docPointerDownHandler = null, this._globalKeydownHandler = null, this._focusOutHandler = null, this._resizeHandler = null, this._desktopShortcutHint = null, this._panelSearchBar = null, this._contentObserver = null, this._renderFrame = null;
|
|
11220
11234
|
}
|
|
@@ -11816,10 +11830,10 @@ var W = class e extends HTMLElement {
|
|
|
11816
11830
|
this._shell && (this._shell.className = e ? "relative z-[91] hidden h-10 w-full min-[1100px]:flex" : "relative z-[91] flex h-10 w-full"), this._panelSearchBar && (this._panelSearchBar.className = e ? "flex shrink-0 items-center gap-2 border-b border-gray-200 p-3 dark:border-mint-divider min-[1100px]:hidden" : "hidden");
|
|
11817
11831
|
}
|
|
11818
11832
|
};
|
|
11819
|
-
customElements.get("mint-search") || customElements.define("mint-search",
|
|
11833
|
+
customElements.get("mint-search") || customElements.define("mint-search", G);
|
|
11820
11834
|
//#endregion
|
|
11821
11835
|
//#region src/components/bottom-navigation/BottomNavigation.ts
|
|
11822
|
-
var
|
|
11836
|
+
var K = class extends HTMLElement {
|
|
11823
11837
|
constructor(...e) {
|
|
11824
11838
|
super(...e), this._lastScrollY = 0, this._scrollHandler = null;
|
|
11825
11839
|
}
|
|
@@ -11844,10 +11858,10 @@ var G = class extends HTMLElement {
|
|
|
11844
11858
|
this._scrollHandler &&= (window.removeEventListener("scroll", this._scrollHandler), null);
|
|
11845
11859
|
}
|
|
11846
11860
|
};
|
|
11847
|
-
customElements.get("mint-bottom-navigation") || customElements.define("mint-bottom-navigation",
|
|
11861
|
+
customElements.get("mint-bottom-navigation") || customElements.define("mint-bottom-navigation", K);
|
|
11848
11862
|
//#endregion
|
|
11849
11863
|
//#region src/components/bottom-navigation/BottomNavItem.ts
|
|
11850
|
-
var
|
|
11864
|
+
var q = class extends HTMLElement {
|
|
11851
11865
|
constructor(...e) {
|
|
11852
11866
|
super(...e), this._root = null;
|
|
11853
11867
|
}
|
|
@@ -11889,10 +11903,10 @@ var K = class extends HTMLElement {
|
|
|
11889
11903
|
s.className = "block w-full truncate", s.textContent = t, a.appendChild(o), a.appendChild(s), this.replaceChildren(a), this._root = a;
|
|
11890
11904
|
}
|
|
11891
11905
|
};
|
|
11892
|
-
customElements.get("mint-bottom-nav-item") || customElements.define("mint-bottom-nav-item",
|
|
11906
|
+
customElements.get("mint-bottom-nav-item") || customElements.define("mint-bottom-nav-item", q);
|
|
11893
11907
|
//#endregion
|
|
11894
11908
|
//#region src/components/toast/Toast.ts
|
|
11895
|
-
var
|
|
11909
|
+
var ce = class extends HTMLElement {
|
|
11896
11910
|
constructor(...e) {
|
|
11897
11911
|
super(...e), this._messageEl = null, this._hideTimer = null, this._hideResolve = null, this._bottomNavObserver = null, this._bodyObserver = null;
|
|
11898
11912
|
}
|
|
@@ -11965,10 +11979,10 @@ var q = class extends HTMLElement {
|
|
|
11965
11979
|
this.classList.toggle("opacity-100", e), this.classList.toggle("translate-y-0", e), this.classList.toggle("opacity-0", !e), this.classList.toggle("translate-y-2", !e), this._messageEl ||= (this.innerHTML = "<div class=\"rounded-md bg-[#202223] px-4 py-2 text-sm font-medium text-white shadow-[0_8px_24px_rgba(0,0,0,0.25)] min-[1100px]:px-5 min-[1100px]:py-3 min-[1100px]:text-base dark:bg-[#0f1113]\">\n <span data-mint-toast-message></span>\n </div>", this.querySelector("[data-mint-toast-message]")), this._messageEl && (this._messageEl.textContent = t);
|
|
11966
11980
|
}
|
|
11967
11981
|
};
|
|
11968
|
-
customElements.get("mint-toast") || customElements.define("mint-toast",
|
|
11982
|
+
customElements.get("mint-toast") || customElements.define("mint-toast", ce);
|
|
11969
11983
|
//#endregion
|
|
11970
11984
|
//#region src/components/confirm-action/ConfirmAction.ts
|
|
11971
|
-
var
|
|
11985
|
+
var le = class extends HTMLElement {
|
|
11972
11986
|
constructor(...e) {
|
|
11973
11987
|
super(...e), this._modal = null, this._confirmButton = null, this._cancelButton = null, this._pendingResolve = null, this._modalObserver = null, this._lastAction = null, this._onConfirmClick = null, this._onCancelClick = null;
|
|
11974
11988
|
}
|
|
@@ -12014,11 +12028,11 @@ var ce = class extends HTMLElement {
|
|
|
12014
12028
|
}));
|
|
12015
12029
|
}
|
|
12016
12030
|
};
|
|
12017
|
-
customElements.get("mint-confirm-action") || customElements.define("mint-confirm-action",
|
|
12031
|
+
customElements.get("mint-confirm-action") || customElements.define("mint-confirm-action", le);
|
|
12018
12032
|
//#endregion
|
|
12019
12033
|
//#region src/components/toast/ToastApi.ts
|
|
12020
|
-
var
|
|
12021
|
-
function
|
|
12034
|
+
var ue = 2200, J = [], Y = !1, X = null;
|
|
12035
|
+
function de() {
|
|
12022
12036
|
return typeof document > "u" || document.body ? Promise.resolve() : new Promise((e) => {
|
|
12023
12037
|
if (typeof window > "u") {
|
|
12024
12038
|
e();
|
|
@@ -12029,14 +12043,14 @@ function ue() {
|
|
|
12029
12043
|
}, { once: !0 });
|
|
12030
12044
|
});
|
|
12031
12045
|
}
|
|
12032
|
-
async function
|
|
12033
|
-
if (await
|
|
12046
|
+
async function fe() {
|
|
12047
|
+
if (await de(), typeof document > "u") throw Error("mintui.toast is only available in browser environments.");
|
|
12034
12048
|
let e = document.querySelector("mint-toast[data-mint-toast-root=\"true\"]");
|
|
12035
12049
|
if (e) return e;
|
|
12036
12050
|
let t = document.createElement("mint-toast");
|
|
12037
12051
|
return t.setAttribute("data-mint-toast-root", "true"), document.body.appendChild(t), t;
|
|
12038
12052
|
}
|
|
12039
|
-
async function
|
|
12053
|
+
async function pe() {
|
|
12040
12054
|
if (!Y) {
|
|
12041
12055
|
Y = !0;
|
|
12042
12056
|
try {
|
|
@@ -12045,9 +12059,9 @@ async function fe() {
|
|
|
12045
12059
|
if (!e) continue;
|
|
12046
12060
|
let t = e.message.trim().slice(0, 120);
|
|
12047
12061
|
if (!t) continue;
|
|
12048
|
-
let n = await
|
|
12062
|
+
let n = await fe();
|
|
12049
12063
|
X = n;
|
|
12050
|
-
let r = e.options?.duration ??
|
|
12064
|
+
let r = e.options?.duration ?? ue;
|
|
12051
12065
|
await n.showToast(t, r);
|
|
12052
12066
|
}
|
|
12053
12067
|
} finally {
|
|
@@ -12059,9 +12073,9 @@ function Z(e, t) {
|
|
|
12059
12073
|
typeof window > "u" || (J.push({
|
|
12060
12074
|
message: e,
|
|
12061
12075
|
options: t
|
|
12062
|
-
}), Y && X && X.hideToast(),
|
|
12076
|
+
}), Y && X && X.hideToast(), pe());
|
|
12063
12077
|
}
|
|
12064
|
-
var
|
|
12078
|
+
var me = { toast: Z };
|
|
12065
12079
|
if (typeof window < "u") {
|
|
12066
12080
|
let e = window.mintui || {};
|
|
12067
12081
|
e.toast = Z, window.mintui = e;
|
|
@@ -12069,7 +12083,7 @@ if (typeof window < "u") {
|
|
|
12069
12083
|
//#endregion
|
|
12070
12084
|
//#region src/components/confirm-action/ConfirmActionApi.ts
|
|
12071
12085
|
var Q = [], $ = !1;
|
|
12072
|
-
function
|
|
12086
|
+
function he() {
|
|
12073
12087
|
return typeof document > "u" || document.body ? Promise.resolve() : new Promise((e) => {
|
|
12074
12088
|
if (typeof window > "u") {
|
|
12075
12089
|
e();
|
|
@@ -12078,26 +12092,26 @@ function me() {
|
|
|
12078
12092
|
window.addEventListener("DOMContentLoaded", () => e(), { once: !0 });
|
|
12079
12093
|
});
|
|
12080
12094
|
}
|
|
12081
|
-
async function
|
|
12082
|
-
if (await
|
|
12095
|
+
async function ge() {
|
|
12096
|
+
if (await he(), typeof document > "u") throw Error("mintui.confirm is only available in browser environments.");
|
|
12083
12097
|
let e = document.querySelector("mint-confirm-action[data-mint-confirm-action-root=\"true\"]");
|
|
12084
12098
|
if (e) return e;
|
|
12085
12099
|
let t = document.createElement("mint-confirm-action");
|
|
12086
12100
|
return t.setAttribute("data-mint-confirm-action-root", "true"), document.body.appendChild(t), t;
|
|
12087
12101
|
}
|
|
12088
|
-
function
|
|
12102
|
+
function _e(e) {
|
|
12089
12103
|
let t = (e || "action").toString().trim().toLowerCase().replace(/^tone:\s*/, "");
|
|
12090
12104
|
return t === "action" || t === "info" || t === "warning" || t === "danger" ? t : "action";
|
|
12091
12105
|
}
|
|
12092
|
-
async function
|
|
12106
|
+
async function ve() {
|
|
12093
12107
|
if (!$) {
|
|
12094
12108
|
$ = !0;
|
|
12095
12109
|
try {
|
|
12096
12110
|
for (; Q.length > 0;) {
|
|
12097
12111
|
let e = Q.shift();
|
|
12098
|
-
e && (await (await
|
|
12112
|
+
e && (await (await ge()).showConfirm({
|
|
12099
12113
|
question: e.question,
|
|
12100
|
-
tone:
|
|
12114
|
+
tone: _e(e.tone),
|
|
12101
12115
|
confirmLabel: e.confirmLabel || "Confirm",
|
|
12102
12116
|
cancelLabel: e.cancelLabel || "Cancel"
|
|
12103
12117
|
}) ? e.confirmed?.() : e.cancelled?.());
|
|
@@ -12107,7 +12121,7 @@ async function _e() {
|
|
|
12107
12121
|
}
|
|
12108
12122
|
}
|
|
12109
12123
|
}
|
|
12110
|
-
function
|
|
12124
|
+
function ye(e, t, n, r = "action", i = "Confirm", a = "Cancel") {
|
|
12111
12125
|
typeof window > "u" || (Q.push({
|
|
12112
12126
|
question: e,
|
|
12113
12127
|
confirmed: t,
|
|
@@ -12115,11 +12129,11 @@ function ve(e, t, n, r = "action", i = "Confirm", a = "Cancel") {
|
|
|
12115
12129
|
tone: r,
|
|
12116
12130
|
confirmLabel: i,
|
|
12117
12131
|
cancelLabel: a
|
|
12118
|
-
}),
|
|
12132
|
+
}), ve());
|
|
12119
12133
|
}
|
|
12120
12134
|
if (typeof window < "u") {
|
|
12121
12135
|
let e = window.mintui || {};
|
|
12122
|
-
e.confirm =
|
|
12136
|
+
e.confirm = ye, window.mintui = e;
|
|
12123
12137
|
}
|
|
12124
12138
|
//#endregion
|
|
12125
|
-
export {
|
|
12139
|
+
export { M as Alert, p as BackButton, q as BottomNavItem, K as BottomNavigation, r as Button, r as default, d as Card, L as Chart, y as Checkbox, A as Chip, x as Choice, ee as Clickable, v as Collapsible, le as ConfirmAction, C as DatePicker, D as Dropzone, O as Form, h as Grid, n as Icon, S as Input, f as Link, g as Modal, oe as OffCanvas, m as Page, _ as Popover, te as ResourceTable, G as Search, E as Select, U as SideNavigation, B as SideNavigationActionLinks, V as SideNavigationActionMenu, R as SideNavigationLink, z as SideNavigationLinks, u as Sortable, t as Spinner, o as Stack, i as Switch, N as Tab, F as TabContent, P as TabList, k as Table, I as Tabs, j as Tags, a as Text, w as TimePicker, ce as Toast, W as TopNavigation, ye as confirm, me as mintui, Z as toast };
|