monobill-mintui 0.6.607 → 0.6.609

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/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 = 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")), n = e.type === "attributes" && e.target.nodeType === Node.ELEMENT_NODE && (e.target.tagName === "OPTION" || e.target.tagName === "OPTGROUP");
5109
- return t || n;
5110
- }) && requestAnimationFrame(() => {
5111
- this.render();
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
- let e = this.isLoading(), t = [];
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") && t.push(e.cloneNode(!0));
5257
- });
5258
- let n = Array.from(this.children).filter((e) => e.tagName === "OPTION" || e.tagName === "OPTGROUP").map((e) => e.cloneNode(!0));
5259
- for (; this.firstChild;) this.removeChild(this.firstChild);
5260
- this._wrapper = null, this._select = null;
5261
- let r = this.getLabel(), i = this.getInfo(), a = this.getId(), o = this.getName(), s = this.getValue(), c = this.isDisabled(), l = this.isMultiple(), u = this.hasError();
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", a && e.setAttribute("for", a);
5265
- let t = document.createTextNode(r);
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(), a && (this._select.id = a), o && (this._select.name = o), c && (this._select.disabled = !0), l && (this._select.multiple = !0), this._select.setAttribute("aria-invalid", u ? "true" : "false");
5269
- let d = n.length > 0 ? n : t;
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 (l) {
5290
+ if (t) {
5277
5291
  let e = [];
5278
5292
  try {
5279
- let t = s ? JSON.parse(s) : [];
5293
+ let t = n ? JSON.parse(n) : [];
5280
5294
  e = Array.isArray(t) ? t.map((e) => String(e)) : [];
5281
5295
  } catch {
5282
- e = s ? [String(s)] : [];
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 = s || "";
5301
+ } else this._select.value = n || "";
5288
5302
  if (this._changeHandler && this._select && this._select.removeEventListener("change", this._changeHandler), this._changeHandler = (e) => {
5289
- let t = e.target, n = l ? Array.from(t.selectedOptions).map((e) => e.value) : t.value, r = l ? JSON.stringify(n) : String(n || "");
5290
- (this.getAttribute("value") || "") !== r && (r ? this.setAttribute("value", r) : this.removeAttribute("value"));
5291
- let i = new Event("input", {
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(i), this.dispatchEvent(new CustomEvent("input", {
5297
- detail: { value: n },
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: n },
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 (l) {
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), l) this._caretUpIcon = null, this._caretDownIcon = null;
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 (i) {
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 = i, this.appendChild(e);
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", T);
5369
+ customElements.get("mint-select") || customElements.define("mint-select", E);
5356
5370
  //#endregion
5357
5371
  //#region src/components/dropzone/Dropzone.ts
5358
- var E = class extends HTMLElement {
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", E);
5710
+ customElements.get("mint-dropzone") || customElements.define("mint-dropzone", D);
5697
5711
  //#endregion
5698
5712
  //#region src/components/form/Form.ts
5699
- var D = class extends HTMLElement {
5713
+ var O = class extends HTMLElement {
5700
5714
  static get observedAttributes() {
5701
5715
  return [
5702
5716
  "action",
@@ -5810,7 +5824,11 @@ var D = class extends HTMLElement {
5810
5824
  ...r
5811
5825
  });
5812
5826
  }
5813
- if (!this._validate(r, t)) {
5827
+ let i = this._collectLiveControlValues();
5828
+ if (r = {
5829
+ ...r,
5830
+ ...i
5831
+ }, !this._validate(r, t)) {
5814
5832
  this.dispatchEvent(new CustomEvent("invalid", {
5815
5833
  detail: { errors: this._errors },
5816
5834
  bubbles: !0,
@@ -5819,7 +5837,7 @@ var D = class extends HTMLElement {
5819
5837
  }));
5820
5838
  return;
5821
5839
  }
5822
- let i = new CustomEvent("submit", {
5840
+ let a = new CustomEvent("submit", {
5823
5841
  detail: {
5824
5842
  formData: n,
5825
5843
  values: r,
@@ -5829,8 +5847,8 @@ var D = class extends HTMLElement {
5829
5847
  cancelable: !0,
5830
5848
  composed: !0
5831
5849
  });
5832
- this.dispatchEvent(i), i.form = this;
5833
- let a = new CustomEvent("mintFormSubmit", {
5850
+ this.dispatchEvent(a), a.form = this;
5851
+ let o = new CustomEvent("mintFormSubmit", {
5834
5852
  detail: {
5835
5853
  formData: n,
5836
5854
  values: r,
@@ -5840,9 +5858,9 @@ var D = class extends HTMLElement {
5840
5858
  cancelable: !0,
5841
5859
  composed: !0
5842
5860
  });
5843
- if (a.form = this, this.dispatchEvent(a), i.defaultPrevented || a.defaultPrevented) return;
5844
- let o = this.getAttribute("action"), s = this.getAttribute("method");
5845
- if (!(!o || !s)) {
5861
+ if (o.form = this, this.dispatchEvent(o), a.defaultPrevented || o.defaultPrevented) return;
5862
+ let s = this.getAttribute("action"), c = this.getAttribute("method");
5863
+ if (!(!s || !c)) {
5846
5864
  this._setButtonsSubmitting();
5847
5865
  try {
5848
5866
  let e = await this._submitData(n, r);
@@ -6027,6 +6045,32 @@ var D = class extends HTMLElement {
6027
6045
  }
6028
6046
  })), t;
6029
6047
  }
6048
+ _isControlDisabledForSubmit(e) {
6049
+ let t = e;
6050
+ for (; t && t !== this._form;) {
6051
+ if ((t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement || t instanceof HTMLSelectElement || t instanceof HTMLButtonElement) && t.disabled) return !0;
6052
+ let e = t.getAttribute("disabled");
6053
+ if (e !== null && e !== "false") return !0;
6054
+ t = t.parentElement;
6055
+ }
6056
+ return !1;
6057
+ }
6058
+ _collectLiveControlValues() {
6059
+ let e = {};
6060
+ if (!this._form) return e;
6061
+ let t = /* @__PURE__ */ new Set();
6062
+ for (let e of Array.from(this._form.querySelectorAll("[name]"))) {
6063
+ let n = e.getAttribute("name");
6064
+ !n || this._isControlDisabledForSubmit(e) || t.add(n);
6065
+ }
6066
+ for (let n of t) {
6067
+ let t = this._getFieldElements(n).filter((e) => !this._isControlDisabledForSubmit(e));
6068
+ if (t.length !== 0) try {
6069
+ e[n] = this._extractFieldValue(t);
6070
+ } catch {}
6071
+ }
6072
+ return e;
6073
+ }
6030
6074
  _collectValidationRules() {
6031
6075
  let e = {};
6032
6076
  return this._form && Array.from(this._form.querySelectorAll("[name][validation]")).forEach((t) => {
@@ -6640,7 +6684,7 @@ var D = class extends HTMLElement {
6640
6684
  this._reactiveDataObserver !== null && (cancelAnimationFrame(this._reactiveDataObserver), this._reactiveDataObserver = null), this._reactiveDataProxy = null, this._lastDataSnapshot = null, this._lastAppliedDataSnapshot = null;
6641
6685
  }
6642
6686
  };
6643
- customElements.get("mint-form") || customElements.define("mint-form", D), typeof window < "u" && (window.mintForm = window.mintForm || {
6687
+ customElements.get("mint-form") || customElements.define("mint-form", O), typeof window < "u" && (window.mintForm = window.mintForm || {
6644
6688
  defaults: { headers: { common: {} } },
6645
6689
  interceptors: { response: { handlers: [] } }
6646
6690
  }, window.mintForm.interceptors.response.use || (window.mintForm.interceptors.response.use = function(e, t) {
@@ -6651,7 +6695,7 @@ customElements.get("mint-form") || customElements.define("mint-form", D), typeof
6651
6695
  }));
6652
6696
  //#endregion
6653
6697
  //#region src/components/table/Table.ts
6654
- var O = class extends HTMLElement {
6698
+ var k = class extends HTMLElement {
6655
6699
  constructor(...e) {
6656
6700
  super(...e), this._observer = null;
6657
6701
  }
@@ -6774,10 +6818,10 @@ var O = class extends HTMLElement {
6774
6818
  e.className = "", t.filter(Boolean).forEach((t) => e.classList.add(...t.split(" ")));
6775
6819
  }
6776
6820
  };
6777
- customElements.get("mint-table") || customElements.define("mint-table", O);
6821
+ customElements.get("mint-table") || customElements.define("mint-table", k);
6778
6822
  //#endregion
6779
6823
  //#region src/components/chip/Chip.ts
6780
- var k = class extends HTMLElement {
6824
+ var A = class extends HTMLElement {
6781
6825
  constructor(...e) {
6782
6826
  super(...e), this._root = null, this._textWrap = null, this._dismissBtn = null, this._clickHandler = null;
6783
6827
  }
@@ -6840,10 +6884,10 @@ var k = class extends HTMLElement {
6840
6884
  }, e.addEventListener("click", this._clickHandler), this._dismissBtn = e;
6841
6885
  }
6842
6886
  };
6843
- customElements.get("mint-chip") || customElements.define("mint-chip", k);
6887
+ customElements.get("mint-chip") || customElements.define("mint-chip", A);
6844
6888
  //#endregion
6845
6889
  //#region src/components/tags/Tags.ts
6846
- var A = class extends HTMLElement {
6890
+ var j = class extends HTMLElement {
6847
6891
  constructor(...e) {
6848
6892
  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
6893
  }
@@ -7312,10 +7356,10 @@ var A = class extends HTMLElement {
7312
7356
  }
7313
7357
  }
7314
7358
  };
7315
- customElements.get("mint-tags") || customElements.define("mint-tags", A);
7359
+ customElements.get("mint-tags") || customElements.define("mint-tags", j);
7316
7360
  //#endregion
7317
7361
  //#region src/components/clickable/Clickable.ts
7318
- var j = class extends HTMLElement {
7362
+ var ee = class extends HTMLElement {
7319
7363
  constructor(...e) {
7320
7364
  super(...e), this._clickHandler = null, this._keydownHandler = null;
7321
7365
  }
@@ -7362,10 +7406,10 @@ var j = class extends HTMLElement {
7362
7406
  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
7407
  }
7364
7408
  };
7365
- customElements.get("mint-clickable") || customElements.define("mint-clickable", j);
7409
+ customElements.get("mint-clickable") || customElements.define("mint-clickable", ee);
7366
7410
  //#endregion
7367
7411
  //#region src/components/alert/Alert.ts
7368
- var ee = class extends HTMLElement {
7412
+ var M = class extends HTMLElement {
7369
7413
  static get observedAttributes() {
7370
7414
  return [
7371
7415
  "heading",
@@ -7463,10 +7507,10 @@ var ee = class extends HTMLElement {
7463
7507
  }), this.appendChild(this._headerWrapper), this.appendChild(this._bodyWrapper);
7464
7508
  }
7465
7509
  };
7466
- customElements.get("mint-alert") || customElements.define("mint-alert", ee);
7510
+ customElements.get("mint-alert") || customElements.define("mint-alert", M);
7467
7511
  //#endregion
7468
7512
  //#region src/components/resource-table/ResourceTable.ts
7469
- var M = class extends HTMLElement {
7513
+ var te = class extends HTMLElement {
7470
7514
  static get observedAttributes() {
7471
7515
  return [
7472
7516
  "configuration",
@@ -8567,10 +8611,10 @@ var M = class extends HTMLElement {
8567
8611
  e !== null && (this._currentPage = e, this._offset = (this._currentPage - 1) * this._perPage);
8568
8612
  }
8569
8613
  };
8570
- customElements.get("mint-resource-table") || customElements.define("mint-resource-table", M);
8614
+ customElements.get("mint-resource-table") || customElements.define("mint-resource-table", te);
8571
8615
  //#endregion
8572
8616
  //#region src/components/resource-table/ResourceTableContextMenu.ts
8573
- var te = 550, ne = 12, re = { passive: !0 }, ie = class extends HTMLElement {
8617
+ var ne = 550, re = 12, ie = { passive: !0 }, ae = class extends HTMLElement {
8574
8618
  constructor(...e) {
8575
8619
  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
8620
  this._closePopover();
@@ -8597,7 +8641,7 @@ var te = 550, ne = 12, re = { passive: !0 }, ie = class extends HTMLElement {
8597
8641
  let t = e.touches[0];
8598
8642
  if (!t) return;
8599
8643
  let n = t.clientX - this._touchStart.x, r = t.clientY - this._touchStart.y;
8600
- n * n + r * r > ne * ne && (this._clearTouchTimer(), this._touchStart = null);
8644
+ n * n + r * r > re * re && (this._clearTouchTimer(), this._touchStart = null);
8601
8645
  }, this._onTouchEnd = () => {
8602
8646
  this._clearTouchTimer(), this._touchStart = null;
8603
8647
  };
@@ -8620,7 +8664,7 @@ var te = 550, ne = 12, re = { passive: !0 }, ie = class extends HTMLElement {
8620
8664
  }
8621
8665
  _longPressMs() {
8622
8666
  let e = parseInt(this.getAttribute("long-press-ms") || "", 10);
8623
- return !Number.isNaN(e) && e > 100 ? e : te;
8667
+ return !Number.isNaN(e) && e > 100 ? e : ne;
8624
8668
  }
8625
8669
  _resolveTable() {
8626
8670
  let e = this.getAttribute("for")?.trim();
@@ -8674,12 +8718,12 @@ var te = 550, ne = 12, re = { passive: !0 }, ie = class extends HTMLElement {
8674
8718
  return this._elementIsScrollContainer(e) && r(e), t;
8675
8719
  }
8676
8720
  _detachScrollCloseListeners() {
8677
- for (let e of this._scrollCloseTargets) e.removeEventListener("scroll", this._onScrollClose, re);
8721
+ for (let e of this._scrollCloseTargets) e.removeEventListener("scroll", this._onScrollClose, ie);
8678
8722
  this._scrollCloseTargets = [];
8679
8723
  }
8680
8724
  _attachScrollCloseListeners(e) {
8681
8725
  this._detachScrollCloseListeners(), this._scrollCloseTargets = this._collectScrollCloseTargets(e);
8682
- for (let e of this._scrollCloseTargets) e.addEventListener("scroll", this._onScrollClose, re);
8726
+ for (let e of this._scrollCloseTargets) e.addEventListener("scroll", this._onScrollClose, ie);
8683
8727
  }
8684
8728
  _closePopover() {
8685
8729
  if (this._detachScrollCloseListeners(), !this._popover?.hasAttribute("open")) return;
@@ -8720,10 +8764,10 @@ var te = 550, ne = 12, re = { passive: !0 }, ie = class extends HTMLElement {
8720
8764
  l && this._attachScrollCloseListeners(l);
8721
8765
  }
8722
8766
  };
8723
- customElements.get("mint-resource-table-context-menu") || customElements.define("mint-resource-table-context-menu", ie);
8767
+ customElements.get("mint-resource-table-context-menu") || customElements.define("mint-resource-table-context-menu", ae);
8724
8768
  //#endregion
8725
8769
  //#region src/components/off-canvas/OffCanvas.ts
8726
- var ae = class extends HTMLElement {
8770
+ var oe = class extends HTMLElement {
8727
8771
  static get observedAttributes() {
8728
8772
  return [
8729
8773
  "id",
@@ -8899,10 +8943,10 @@ var ae = class extends HTMLElement {
8899
8943
  }
8900
8944
  }
8901
8945
  };
8902
- customElements.get("mint-off-canvas") || customElements.define("mint-off-canvas", ae);
8946
+ customElements.get("mint-off-canvas") || customElements.define("mint-off-canvas", oe);
8903
8947
  //#endregion
8904
8948
  //#region src/components/tabs/Tab.ts
8905
- var oe = class extends HTMLElement {
8949
+ var N = class extends HTMLElement {
8906
8950
  static get observedAttributes() {
8907
8951
  return [
8908
8952
  "active",
@@ -8966,10 +9010,10 @@ var oe = class extends HTMLElement {
8966
9010
  })));
8967
9011
  }
8968
9012
  };
8969
- customElements.get("mint-tab") || customElements.define("mint-tab", oe);
9013
+ customElements.get("mint-tab") || customElements.define("mint-tab", N);
8970
9014
  //#endregion
8971
9015
  //#region src/components/tabs/TabList.ts
8972
- var N = class extends HTMLElement {
9016
+ var P = class extends HTMLElement {
8973
9017
  static get observedAttributes() {
8974
9018
  return ["position"];
8975
9019
  }
@@ -8990,10 +9034,10 @@ var N = class extends HTMLElement {
8990
9034
  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
9035
  }
8992
9036
  };
8993
- customElements.get("mint-tab-list") || customElements.define("mint-tab-list", N);
9037
+ customElements.get("mint-tab-list") || customElements.define("mint-tab-list", P);
8994
9038
  //#endregion
8995
9039
  //#region src/components/tabs/TabContent.ts
8996
- var P = class extends HTMLElement {
9040
+ var F = class extends HTMLElement {
8997
9041
  static get observedAttributes() {
8998
9042
  return ["id"];
8999
9043
  }
@@ -9029,10 +9073,10 @@ var P = class extends HTMLElement {
9029
9073
  }
9030
9074
  render() {}
9031
9075
  };
9032
- customElements.get("mint-tab-content") || customElements.define("mint-tab-content", P);
9076
+ customElements.get("mint-tab-content") || customElements.define("mint-tab-content", F);
9033
9077
  //#endregion
9034
9078
  //#region src/components/tabs/Tabs.ts
9035
- var F = class extends HTMLElement {
9079
+ var I = class extends HTMLElement {
9036
9080
  constructor() {
9037
9081
  super(), this._tabClickHandler = null, this._mutationObserver = null;
9038
9082
  }
@@ -9110,10 +9154,10 @@ var F = class extends HTMLElement {
9110
9154
  }), n && this.showContent(n));
9111
9155
  }
9112
9156
  };
9113
- customElements.get("mint-tabs") || customElements.define("mint-tabs", F);
9157
+ customElements.get("mint-tabs") || customElements.define("mint-tabs", I);
9114
9158
  //#endregion
9115
9159
  //#region src/components/chart/Chart.ts
9116
- var I = class e extends HTMLElement {
9160
+ var L = class e extends HTMLElement {
9117
9161
  static get observedAttributes() {
9118
9162
  return [
9119
9163
  "type",
@@ -10390,10 +10434,10 @@ var I = class e extends HTMLElement {
10390
10434
  });
10391
10435
  }
10392
10436
  };
10393
- customElements.get("mint-chart") || customElements.define("mint-chart", I);
10437
+ customElements.get("mint-chart") || customElements.define("mint-chart", L);
10394
10438
  //#endregion
10395
10439
  //#region src/components/side-navigation/SideNavigationLink.ts
10396
- var L = class extends HTMLElement {
10440
+ var R = class extends HTMLElement {
10397
10441
  constructor(...e) {
10398
10442
  super(...e), this._trigger = null, this._submenuContainer = null, this._contentObserver = null, this._renderFrame = null;
10399
10443
  }
@@ -10568,10 +10612,10 @@ var L = class extends HTMLElement {
10568
10612
  this._hasSubmenu() && !this._isSubmenuItem() ? this._buildDropdownLink() : this._buildSimpleLink();
10569
10613
  }
10570
10614
  };
10571
- customElements.get("mint-sidenav-link") || customElements.define("mint-sidenav-link", L);
10615
+ customElements.get("mint-sidenav-link") || customElements.define("mint-sidenav-link", R);
10572
10616
  //#endregion
10573
10617
  //#region src/components/side-navigation/SideNavigationLinks.ts
10574
- var R = class extends HTMLElement {
10618
+ var z = class extends HTMLElement {
10575
10619
  constructor(...e) {
10576
10620
  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
10621
  }
@@ -10650,10 +10694,10 @@ var R = class extends HTMLElement {
10650
10694
  });
10651
10695
  }
10652
10696
  };
10653
- customElements.get("mint-sidenav-links") || customElements.define("mint-sidenav-links", R);
10697
+ customElements.get("mint-sidenav-links") || customElements.define("mint-sidenav-links", z);
10654
10698
  //#endregion
10655
10699
  //#region src/components/side-navigation/SideNavigationActionLinks.ts
10656
- var z = class extends HTMLElement {
10700
+ var B = class extends HTMLElement {
10657
10701
  static get observedAttributes() {
10658
10702
  return ["separated"];
10659
10703
  }
@@ -10670,10 +10714,10 @@ var z = class extends HTMLElement {
10670
10714
  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
10715
  }
10672
10716
  };
10673
- customElements.get("mint-sidenav-action-links") || customElements.define("mint-sidenav-action-links", z);
10717
+ customElements.get("mint-sidenav-action-links") || customElements.define("mint-sidenav-action-links", B);
10674
10718
  //#endregion
10675
10719
  //#region src/components/side-navigation/SideNavigationActionMenu.ts
10676
- var B = class extends HTMLElement {
10720
+ var V = class extends HTMLElement {
10677
10721
  constructor(...e) {
10678
10722
  super(...e), this._wrapper = null, this._trigger = null, this._popover = null, this._triggerId = "", this._contentObserver = null, this._renderFrame = null;
10679
10723
  }
@@ -10732,15 +10776,15 @@ var B = class extends HTMLElement {
10732
10776
  }) : a.appendChild(this._createDefaultGroup()), this._popover.appendChild(a), this._wrapper.appendChild(this._trigger), this._wrapper.appendChild(this._popover);
10733
10777
  }
10734
10778
  };
10735
- customElements.get("mint-sidenav-action-menu") || customElements.define("mint-sidenav-action-menu", B);
10779
+ customElements.get("mint-sidenav-action-menu") || customElements.define("mint-sidenav-action-menu", V);
10736
10780
  //#endregion
10737
10781
  //#region src/components/side-navigation/SideNavigation.ts
10738
- var V = "mint:url-change";
10782
+ var H = "mint:url-change";
10739
10783
  function se() {
10740
10784
  if (window.__mintUrlChangePatched) return;
10741
10785
  window.__mintUrlChangePatched = !0;
10742
10786
  let e = () => {
10743
- window.dispatchEvent(new Event(V));
10787
+ window.dispatchEvent(new Event(H));
10744
10788
  }, t = (t) => {
10745
10789
  let n = history[t].bind(history);
10746
10790
  history[t] = ((...t) => {
@@ -10750,7 +10794,7 @@ function se() {
10750
10794
  };
10751
10795
  t("pushState"), t("replaceState");
10752
10796
  }
10753
- var H = class extends HTMLElement {
10797
+ var U = class extends HTMLElement {
10754
10798
  constructor(...e) {
10755
10799
  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
10800
  if (this._mediaQuery?.matches) return;
@@ -10814,10 +10858,10 @@ var H = class extends HTMLElement {
10814
10858
  _attachUrlChangeListener() {
10815
10859
  this._urlChangeHandler || (se(), this._urlChangeHandler = () => {
10816
10860
  this._mediaQuery?.matches || this._isOpen() && this.removeAttribute("open");
10817
- }, window.addEventListener("popstate", this._urlChangeHandler), window.addEventListener("hashchange", this._urlChangeHandler), window.addEventListener(V, this._urlChangeHandler));
10861
+ }, window.addEventListener("popstate", this._urlChangeHandler), window.addEventListener("hashchange", this._urlChangeHandler), window.addEventListener(H, this._urlChangeHandler));
10818
10862
  }
10819
10863
  _detachUrlChangeListener() {
10820
- this._urlChangeHandler &&= (window.removeEventListener("popstate", this._urlChangeHandler), window.removeEventListener("hashchange", this._urlChangeHandler), window.removeEventListener(V, this._urlChangeHandler), null);
10864
+ this._urlChangeHandler &&= (window.removeEventListener("popstate", this._urlChangeHandler), window.removeEventListener("hashchange", this._urlChangeHandler), window.removeEventListener(H, this._urlChangeHandler), null);
10821
10865
  }
10822
10866
  _observeContentMutations() {
10823
10867
  this._contentObserver ||= new MutationObserver(() => {
@@ -10922,10 +10966,10 @@ var H = class extends HTMLElement {
10922
10966
  this._ensureBackdrop(), this._ensureContainer(), this._syncShell(), this._buildUserHeader(), this._buildContent(), this._buildFooter();
10923
10967
  }
10924
10968
  };
10925
- customElements.get("mint-side-navigation") || customElements.define("mint-side-navigation", H);
10969
+ customElements.get("mint-side-navigation") || customElements.define("mint-side-navigation", U);
10926
10970
  //#endregion
10927
10971
  //#region src/components/top-navigation/TopNavigation.ts
10928
- var U = class extends HTMLElement {
10972
+ var W = class extends HTMLElement {
10929
10973
  constructor(...e) {
10930
10974
  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
10975
  }
@@ -11211,10 +11255,10 @@ var U = class extends HTMLElement {
11211
11255
  this._searchPanelInput && (this._searchPanelInput.placeholder = this._getSearchPlaceholder()), this._syncSearchPanelVisibility(), this._positionSearchPanel();
11212
11256
  }
11213
11257
  };
11214
- customElements.get("mint-top-navigation") || customElements.define("mint-top-navigation", U);
11258
+ customElements.get("mint-top-navigation") || customElements.define("mint-top-navigation", W);
11215
11259
  //#endregion
11216
11260
  //#region src/components/search/Search.ts
11217
- var W = class e extends HTMLElement {
11261
+ var G = class e extends HTMLElement {
11218
11262
  constructor(...e) {
11219
11263
  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
11264
  }
@@ -11816,10 +11860,10 @@ var W = class e extends HTMLElement {
11816
11860
  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
11861
  }
11818
11862
  };
11819
- customElements.get("mint-search") || customElements.define("mint-search", W);
11863
+ customElements.get("mint-search") || customElements.define("mint-search", G);
11820
11864
  //#endregion
11821
11865
  //#region src/components/bottom-navigation/BottomNavigation.ts
11822
- var G = class extends HTMLElement {
11866
+ var K = class extends HTMLElement {
11823
11867
  constructor(...e) {
11824
11868
  super(...e), this._lastScrollY = 0, this._scrollHandler = null;
11825
11869
  }
@@ -11844,10 +11888,10 @@ var G = class extends HTMLElement {
11844
11888
  this._scrollHandler &&= (window.removeEventListener("scroll", this._scrollHandler), null);
11845
11889
  }
11846
11890
  };
11847
- customElements.get("mint-bottom-navigation") || customElements.define("mint-bottom-navigation", G);
11891
+ customElements.get("mint-bottom-navigation") || customElements.define("mint-bottom-navigation", K);
11848
11892
  //#endregion
11849
11893
  //#region src/components/bottom-navigation/BottomNavItem.ts
11850
- var K = class extends HTMLElement {
11894
+ var q = class extends HTMLElement {
11851
11895
  constructor(...e) {
11852
11896
  super(...e), this._root = null;
11853
11897
  }
@@ -11889,10 +11933,10 @@ var K = class extends HTMLElement {
11889
11933
  s.className = "block w-full truncate", s.textContent = t, a.appendChild(o), a.appendChild(s), this.replaceChildren(a), this._root = a;
11890
11934
  }
11891
11935
  };
11892
- customElements.get("mint-bottom-nav-item") || customElements.define("mint-bottom-nav-item", K);
11936
+ customElements.get("mint-bottom-nav-item") || customElements.define("mint-bottom-nav-item", q);
11893
11937
  //#endregion
11894
11938
  //#region src/components/toast/Toast.ts
11895
- var q = class extends HTMLElement {
11939
+ var ce = class extends HTMLElement {
11896
11940
  constructor(...e) {
11897
11941
  super(...e), this._messageEl = null, this._hideTimer = null, this._hideResolve = null, this._bottomNavObserver = null, this._bodyObserver = null;
11898
11942
  }
@@ -11965,10 +12009,10 @@ var q = class extends HTMLElement {
11965
12009
  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
12010
  }
11967
12011
  };
11968
- customElements.get("mint-toast") || customElements.define("mint-toast", q);
12012
+ customElements.get("mint-toast") || customElements.define("mint-toast", ce);
11969
12013
  //#endregion
11970
12014
  //#region src/components/confirm-action/ConfirmAction.ts
11971
- var ce = class extends HTMLElement {
12015
+ var le = class extends HTMLElement {
11972
12016
  constructor(...e) {
11973
12017
  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
12018
  }
@@ -12014,11 +12058,11 @@ var ce = class extends HTMLElement {
12014
12058
  }));
12015
12059
  }
12016
12060
  };
12017
- customElements.get("mint-confirm-action") || customElements.define("mint-confirm-action", ce);
12061
+ customElements.get("mint-confirm-action") || customElements.define("mint-confirm-action", le);
12018
12062
  //#endregion
12019
12063
  //#region src/components/toast/ToastApi.ts
12020
- var le = 2200, J = [], Y = !1, X = null;
12021
- function ue() {
12064
+ var ue = 2200, J = [], Y = !1, X = null;
12065
+ function de() {
12022
12066
  return typeof document > "u" || document.body ? Promise.resolve() : new Promise((e) => {
12023
12067
  if (typeof window > "u") {
12024
12068
  e();
@@ -12029,14 +12073,14 @@ function ue() {
12029
12073
  }, { once: !0 });
12030
12074
  });
12031
12075
  }
12032
- async function de() {
12033
- if (await ue(), typeof document > "u") throw Error("mintui.toast is only available in browser environments.");
12076
+ async function fe() {
12077
+ if (await de(), typeof document > "u") throw Error("mintui.toast is only available in browser environments.");
12034
12078
  let e = document.querySelector("mint-toast[data-mint-toast-root=\"true\"]");
12035
12079
  if (e) return e;
12036
12080
  let t = document.createElement("mint-toast");
12037
12081
  return t.setAttribute("data-mint-toast-root", "true"), document.body.appendChild(t), t;
12038
12082
  }
12039
- async function fe() {
12083
+ async function pe() {
12040
12084
  if (!Y) {
12041
12085
  Y = !0;
12042
12086
  try {
@@ -12045,9 +12089,9 @@ async function fe() {
12045
12089
  if (!e) continue;
12046
12090
  let t = e.message.trim().slice(0, 120);
12047
12091
  if (!t) continue;
12048
- let n = await de();
12092
+ let n = await fe();
12049
12093
  X = n;
12050
- let r = e.options?.duration ?? le;
12094
+ let r = e.options?.duration ?? ue;
12051
12095
  await n.showToast(t, r);
12052
12096
  }
12053
12097
  } finally {
@@ -12059,9 +12103,9 @@ function Z(e, t) {
12059
12103
  typeof window > "u" || (J.push({
12060
12104
  message: e,
12061
12105
  options: t
12062
- }), Y && X && X.hideToast(), fe());
12106
+ }), Y && X && X.hideToast(), pe());
12063
12107
  }
12064
- var pe = { toast: Z };
12108
+ var me = { toast: Z };
12065
12109
  if (typeof window < "u") {
12066
12110
  let e = window.mintui || {};
12067
12111
  e.toast = Z, window.mintui = e;
@@ -12069,7 +12113,7 @@ if (typeof window < "u") {
12069
12113
  //#endregion
12070
12114
  //#region src/components/confirm-action/ConfirmActionApi.ts
12071
12115
  var Q = [], $ = !1;
12072
- function me() {
12116
+ function he() {
12073
12117
  return typeof document > "u" || document.body ? Promise.resolve() : new Promise((e) => {
12074
12118
  if (typeof window > "u") {
12075
12119
  e();
@@ -12078,26 +12122,26 @@ function me() {
12078
12122
  window.addEventListener("DOMContentLoaded", () => e(), { once: !0 });
12079
12123
  });
12080
12124
  }
12081
- async function he() {
12082
- if (await me(), typeof document > "u") throw Error("mintui.confirm is only available in browser environments.");
12125
+ async function ge() {
12126
+ if (await he(), typeof document > "u") throw Error("mintui.confirm is only available in browser environments.");
12083
12127
  let e = document.querySelector("mint-confirm-action[data-mint-confirm-action-root=\"true\"]");
12084
12128
  if (e) return e;
12085
12129
  let t = document.createElement("mint-confirm-action");
12086
12130
  return t.setAttribute("data-mint-confirm-action-root", "true"), document.body.appendChild(t), t;
12087
12131
  }
12088
- function ge(e) {
12132
+ function _e(e) {
12089
12133
  let t = (e || "action").toString().trim().toLowerCase().replace(/^tone:\s*/, "");
12090
12134
  return t === "action" || t === "info" || t === "warning" || t === "danger" ? t : "action";
12091
12135
  }
12092
- async function _e() {
12136
+ async function ve() {
12093
12137
  if (!$) {
12094
12138
  $ = !0;
12095
12139
  try {
12096
12140
  for (; Q.length > 0;) {
12097
12141
  let e = Q.shift();
12098
- e && (await (await he()).showConfirm({
12142
+ e && (await (await ge()).showConfirm({
12099
12143
  question: e.question,
12100
- tone: ge(e.tone),
12144
+ tone: _e(e.tone),
12101
12145
  confirmLabel: e.confirmLabel || "Confirm",
12102
12146
  cancelLabel: e.cancelLabel || "Cancel"
12103
12147
  }) ? e.confirmed?.() : e.cancelled?.());
@@ -12107,7 +12151,7 @@ async function _e() {
12107
12151
  }
12108
12152
  }
12109
12153
  }
12110
- function ve(e, t, n, r = "action", i = "Confirm", a = "Cancel") {
12154
+ function ye(e, t, n, r = "action", i = "Confirm", a = "Cancel") {
12111
12155
  typeof window > "u" || (Q.push({
12112
12156
  question: e,
12113
12157
  confirmed: t,
@@ -12115,11 +12159,11 @@ function ve(e, t, n, r = "action", i = "Confirm", a = "Cancel") {
12115
12159
  tone: r,
12116
12160
  confirmLabel: i,
12117
12161
  cancelLabel: a
12118
- }), _e());
12162
+ }), ve());
12119
12163
  }
12120
12164
  if (typeof window < "u") {
12121
12165
  let e = window.mintui || {};
12122
- e.confirm = ve, window.mintui = e;
12166
+ e.confirm = ye, window.mintui = e;
12123
12167
  }
12124
12168
  //#endregion
12125
- export { ee as Alert, p as BackButton, K as BottomNavItem, G as BottomNavigation, r as Button, r as default, d as Card, I as Chart, y as Checkbox, k as Chip, x as Choice, j as Clickable, v as Collapsible, ce as ConfirmAction, C as DatePicker, E as Dropzone, D as Form, h as Grid, n as Icon, S as Input, f as Link, g as Modal, ae as OffCanvas, m as Page, _ as Popover, M as ResourceTable, W as Search, T as Select, H as SideNavigation, z as SideNavigationActionLinks, B as SideNavigationActionMenu, L as SideNavigationLink, R as SideNavigationLinks, u as Sortable, t as Spinner, o as Stack, i as Switch, oe as Tab, P as TabContent, N as TabList, O as Table, F as Tabs, A as Tags, a as Text, w as TimePicker, q as Toast, U as TopNavigation, ve as confirm, pe as mintui, Z as toast };
12169
+ 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 };