monobill-mintui 0.6.722 → 0.6.724

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.
Files changed (33) hide show
  1. package/dist/choice.css +1 -1
  2. package/dist/components/choice/ChoiceOption.d.ts.map +1 -1
  3. package/dist/components/form/Form.d.ts +1 -0
  4. package/dist/components/form/Form.d.ts.map +1 -1
  5. package/dist/components/form/browser.js +34 -14
  6. package/dist/components/form/index.cjs +1 -1
  7. package/dist/components/form/index.js +34 -14
  8. package/dist/components/off-canvas/OffCanvas.d.ts +1 -8
  9. package/dist/components/off-canvas/OffCanvas.d.ts.map +1 -1
  10. package/dist/components/off-canvas/browser.js +7 -63
  11. package/dist/components/off-canvas/index.cjs +1 -1
  12. package/dist/components/off-canvas/index.js +7 -63
  13. package/dist/components/resource-table/ResourceTable.d.ts +7 -3
  14. package/dist/components/resource-table/ResourceTable.d.ts.map +1 -1
  15. package/dist/components/resource-table/browser.js +68 -38
  16. package/dist/components/resource-table/index.cjs +2 -2
  17. package/dist/components/resource-table/index.d.ts +1 -0
  18. package/dist/components/resource-table/index.d.ts.map +1 -1
  19. package/dist/components/resource-table/index.js +68 -38
  20. package/dist/components/resource-table/utility-aliases.d.ts +7 -10
  21. package/dist/components/resource-table/utility-aliases.d.ts.map +1 -1
  22. package/dist/components/side-navigation/SideNavigationLink.d.ts.map +1 -1
  23. package/dist/components/side-navigation/browser.js +2 -2
  24. package/dist/components/side-navigation/index.cjs +1 -1
  25. package/dist/components/side-navigation/index.js +2 -2
  26. package/dist/form.css +1 -1
  27. package/dist/index.cjs +2 -2
  28. package/dist/index.css +5 -5
  29. package/dist/index.js +112 -118
  30. package/dist/off-canvas.css +1 -1
  31. package/dist/resource-table.css +1 -1
  32. package/dist/side-navigation.css +1 -1
  33. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -9205,7 +9205,7 @@ var Un = class extends HTMLElement {
9205
9205
  return this._errors = {}, Object.entries(t || {}).forEach(([e, t]) => {
9206
9206
  let r = Array.isArray(t) ? t : [t], i = this._getFieldElements(e), a = this._extractFieldValue(i), o = this._validateRules(a, r);
9207
9207
  o ? (n = !1, this._errors[e] = o, this._flagFieldError(i, o)) : this._clearFieldError(i);
9208
- }), n;
9208
+ }), n || this._scrollToFirstError(), n;
9209
9209
  }
9210
9210
  _validateField(e) {
9211
9211
  let t = this._collectValidationRules();
@@ -9273,24 +9273,27 @@ var Un = class extends HTMLElement {
9273
9273
  }
9274
9274
  _getFieldElements(e) {
9275
9275
  if (!this._form) return [];
9276
- let t = Array.from(this._form.querySelectorAll(`[name="${e}"]`)), n = t.filter((e) => e.tagName === "MINT-SELECT");
9277
- if (n.length > 0) {
9278
- let r = [];
9279
- return n.forEach((t) => {
9280
- let n = t.querySelector("select[name=\"" + e + "\"]");
9281
- n && r.push(n);
9282
- }), t.filter((e) => e.tagName !== "MINT-SELECT").concat(r);
9283
- }
9284
- if (t.filter((e) => e.tagName === "MINT-TAGS").length > 0) return t.filter((e) => e.tagName !== "INPUT" || !e.closest("mint-tags"));
9285
- let r = t.filter((e) => e.tagName === "INPUT" && e.closest("mint-tags"));
9286
- if (r.length > 0) {
9276
+ let t = (e) => e.replace(/\[(.*?)\]/g, ".$1").replace(/\.+/g, ".").replace(/^\.|\.$/g, ""), n = t(e), r = Array.from(this._form.querySelectorAll("[name]")).filter((r) => {
9277
+ let i = r.getAttribute("name") || "";
9278
+ return i === e || t(i) === n;
9279
+ }), i = r.filter((e) => e.tagName === "MINT-SELECT");
9280
+ if (i.length > 0) {
9281
+ let t = [];
9282
+ return i.forEach((n) => {
9283
+ let r = n.querySelector("select[name=\"" + e + "\"]");
9284
+ r && t.push(r);
9285
+ }), r.filter((e) => e.tagName !== "MINT-SELECT").concat(t);
9286
+ }
9287
+ if (r.filter((e) => e.tagName === "MINT-TAGS").length > 0) return r.filter((e) => e.tagName !== "INPUT" || !e.closest("mint-tags"));
9288
+ let a = r.filter((e) => e.tagName === "INPUT" && e.closest("mint-tags"));
9289
+ if (a.length > 0) {
9287
9290
  let e = [];
9288
- return r.forEach((t) => {
9291
+ return a.forEach((t) => {
9289
9292
  let n = t.closest("mint-tags");
9290
9293
  n && !e.includes(n) && e.push(n);
9291
- }), t.filter((e) => e.tagName !== "INPUT" || !e.closest("mint-tags")).concat(e);
9294
+ }), r.filter((e) => e.tagName !== "INPUT" || !e.closest("mint-tags")).concat(e);
9292
9295
  }
9293
- return t;
9296
+ return r;
9294
9297
  }
9295
9298
  _extractFieldValue(e) {
9296
9299
  if (e.length === 0) return "";
@@ -9379,6 +9382,23 @@ var Un = class extends HTMLElement {
9379
9382
  this._clearErrors(), Object.entries(e).forEach(([e, t]) => {
9380
9383
  let n = Array.isArray(t) ? t[0] || "Validation error" : t || "Validation error", r = this._getFieldElements(e);
9381
9384
  r.length > 0 && (this._errors[e] = n, this._flagFieldError(r, n));
9385
+ }), this._scrollToFirstError();
9386
+ }
9387
+ _scrollToFirstError() {
9388
+ let e = this.querySelector("[data-mint-form-error]");
9389
+ e && requestAnimationFrame(() => {
9390
+ let t = this._resolveHost(e) || e;
9391
+ t.scrollIntoView({
9392
+ behavior: "smooth",
9393
+ block: "center",
9394
+ inline: "nearest"
9395
+ });
9396
+ let n = t.matches("input,textarea,select,button,[tabindex]") ? t : t.querySelector("input,textarea,select,button,[tabindex]") || t;
9397
+ try {
9398
+ n.focus({ preventScroll: !0 });
9399
+ } catch {
9400
+ n.focus();
9401
+ }
9382
9402
  });
9383
9403
  }
9384
9404
  _parseFormData(e) {
@@ -9846,29 +9866,15 @@ var Wn = class extends HTMLElement {
9846
9866
  ];
9847
9867
  }
9848
9868
  constructor() {
9849
- super(), this._overlay = null, this._offCanvas = null, this._header = null, this._headingSlot = null, this._bodySlot = null, this._actionsSlot = null, this._closeButton = null, this._contentObserver = null, this._renderFrame = null, this._enterFrame = null, this._exitTimer = null, this._previousFocus = null, this._dialogWasOpen = !1, this._dialogKeydownHandler = null;
9869
+ super(), this._overlay = null, this._offCanvas = null, this._header = null, this._headingSlot = null, this._bodySlot = null, this._actionsSlot = null, this._closeButton = null, this._contentObserver = null, this._renderFrame = null, this._dialogKeydownHandler = null;
9850
9870
  }
9851
9871
  connectedCallback() {
9852
9872
  this.classList.add("mint-off-canvas-host"), this.style.display = "none", this.render(), this._observeContentMutations(), this._dialogKeydownHandler = (e) => {
9853
- if (!this.isOpen()) return;
9854
- if (e.key === "Escape") {
9855
- e.preventDefault(), e.stopPropagation(), this.close();
9856
- return;
9857
- }
9858
- if (e.key !== "Tab") return;
9859
- let t = this._offCanvas?.querySelector(".mint-off-canvas-panel");
9860
- if (!t) return;
9861
- let n = this._getDialogFocusableElements(t);
9862
- if (!n.length) {
9863
- e.preventDefault(), t.focus();
9864
- return;
9865
- }
9866
- let r = n[0], i = n[n.length - 1], a = document.activeElement;
9867
- e.shiftKey && (a === r || !t.contains(a)) ? (e.preventDefault(), i.focus()) : !e.shiftKey && (a === i || !t.contains(a)) && (e.preventDefault(), r.focus());
9873
+ this.isOpen() && e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), this.close());
9868
9874
  }, document.addEventListener("keydown", this._dialogKeydownHandler, !0);
9869
9875
  }
9870
9876
  disconnectedCallback() {
9871
- this._dialogKeydownHandler &&= (document.removeEventListener("keydown", this._dialogKeydownHandler, !0), null), this._contentObserver &&= (this._contentObserver.disconnect(), null), this._renderFrame !== null && (cancelAnimationFrame(this._renderFrame), this._renderFrame = null), this._exitTimer !== null && (clearTimeout(this._exitTimer), this._exitTimer = null), this._enterFrame !== null && (cancelAnimationFrame(this._enterFrame), this._enterFrame = null), this._overlay?.remove(), this._offCanvas?.remove();
9877
+ this._dialogKeydownHandler &&= (document.removeEventListener("keydown", this._dialogKeydownHandler, !0), null), this._contentObserver &&= (this._contentObserver.disconnect(), null), this._renderFrame !== null && (cancelAnimationFrame(this._renderFrame), this._renderFrame = null), this._overlay?.remove(), this._offCanvas?.remove();
9872
9878
  }
9873
9879
  attributeChangedCallback(e, t, n) {
9874
9880
  t !== n && this.isConnected && this.render();
@@ -9911,7 +9917,7 @@ var Wn = class extends HTMLElement {
9911
9917
  }
9912
9918
  render() {
9913
9919
  let e = this.getId(), t = this.getHeading(), n = this.isOpen(), r = this.getPosition(), i = this.isFullPage(), a = this.getHeight();
9914
- e && (this.id = e), this._overlay || (this._overlay = document.createElement("div"), this._overlay.className = "mint-off-canvas-overlay mint-off-canvas-hidden", this._overlay.setAttribute("aria-hidden", "true"), this._overlay.addEventListener("click", () => this.close())), this._offCanvas || (this._offCanvas = document.createElement("div"), this._offCanvas.className = "mint-off-canvas-shell mint-off-canvas-hidden");
9920
+ e && (this.id = e), this._overlay || (this._overlay = document.createElement("div"), this._overlay.className = "mint-off-canvas-overlay mint-off-canvas-hidden", this._overlay.setAttribute("aria-hidden", "true"), this._overlay.addEventListener("click", () => this.close())), this._offCanvas || (this._offCanvas = document.createElement("div"), this._offCanvas.className = "mint-off-canvas-shell");
9915
9921
  let o = document.body ?? document.documentElement;
9916
9922
  this._overlay.parentElement !== o && o.appendChild(this._overlay), this._offCanvas.parentElement !== o && o.appendChild(this._offCanvas), this._offCanvas.classList.add("mint-off-canvas-shell"), this._offCanvas.dataset.position = r, this._offCanvas.dataset.fullPage = String(i);
9917
9923
  let s = this._offCanvas.querySelector(".mint-off-canvas-panel");
@@ -9933,7 +9939,7 @@ var Wn = class extends HTMLElement {
9933
9939
  }), e.parentElement && e.remove();
9934
9940
  }), Array.from(this.children).forEach((e) => {
9935
9941
  e !== this._overlay && e !== this._offCanvas && e.getAttribute("slot") !== "heading" && e.getAttribute("slot") !== "body" && e.getAttribute("slot") !== "actions" && e !== this._headingSlot && e !== this._bodySlot && e !== this._actionsSlot && e.parentElement !== this._bodySlot && this._bodySlot.appendChild(e);
9936
- }), n ? this._animateEnter() : this._animateExit();
9942
+ }), this._syncOpenClasses(n);
9937
9943
  }
9938
9944
  _observeContentMutations() {
9939
9945
  this._contentObserver ||= new MutationObserver(() => {
@@ -9944,50 +9950,8 @@ var Wn = class extends HTMLElement {
9944
9950
  attributeFilter: ["slot"]
9945
9951
  });
9946
9952
  }
9947
- _getDialogFocusableElements(e) {
9948
- return Array.from(e.querySelectorAll("button:not([disabled]), [href], input:not([disabled]):not([type=\"hidden\"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])")).filter((e) => {
9949
- if (e.closest("[hidden], [aria-hidden=\"true\"]")) return !1;
9950
- let t = window.getComputedStyle(e);
9951
- return t.display !== "none" && t.visibility !== "hidden";
9952
- });
9953
- }
9954
- _animateEnter() {
9955
- let e = this._offCanvas?.querySelector(".mint-off-canvas-panel"), t = this._offCanvas, n = this._overlay;
9956
- if (!e || !t || !n || this._enterFrame !== null || t.classList.contains("mint-off-canvas-open")) return;
9957
- this._exitTimer !== null && (clearTimeout(this._exitTimer), this._exitTimer = null);
9958
- let r = !this._dialogWasOpen;
9959
- if (r) {
9960
- this._dialogWasOpen = !0;
9961
- let e = document.activeElement;
9962
- this._previousFocus = e instanceof HTMLElement && e !== document.body ? e : null;
9963
- }
9964
- n.classList.remove("mint-off-canvas-hidden", "mint-off-canvas-open"), t.classList.remove("mint-off-canvas-hidden", "mint-off-canvas-open"), e.getBoundingClientRect(), this._enterFrame = requestAnimationFrame(() => {
9965
- this._enterFrame = null, this.isOpen() && (n.classList.add("mint-off-canvas-open"), t.classList.add("mint-off-canvas-open"), r && (this._getDialogFocusableElements(e)[0] ?? e).focus());
9966
- });
9967
- }
9968
- _animateExit() {
9969
- let e = this._offCanvas, t = this._overlay;
9970
- if (!(!e || !t || e.classList.contains("mint-off-canvas-hidden"))) {
9971
- if (!this._offCanvas?.querySelector(".mint-off-canvas-panel")) {
9972
- t.classList.add("mint-off-canvas-hidden"), e.classList.add("mint-off-canvas-hidden"), this._dialogWasOpen = !1;
9973
- return;
9974
- }
9975
- if (this._enterFrame !== null) {
9976
- cancelAnimationFrame(this._enterFrame), this._enterFrame = null, t.classList.add("mint-off-canvas-hidden"), e.classList.add("mint-off-canvas-hidden"), this._dialogWasOpen = !1;
9977
- let n = this._previousFocus;
9978
- this._previousFocus = null, n?.isConnected && n.focus();
9979
- return;
9980
- }
9981
- e.classList.contains("mint-off-canvas-open") && (t.classList.remove("mint-off-canvas-open"), e.classList.remove("mint-off-canvas-open"), this._exitTimer !== null && clearTimeout(this._exitTimer), this._exitTimer = window.setTimeout(() => {
9982
- this._finishExit();
9983
- }, 220));
9984
- }
9985
- }
9986
- _finishExit() {
9987
- if (this.isOpen()) return;
9988
- this._exitTimer !== null && (clearTimeout(this._exitTimer), this._exitTimer = null), this._overlay?.classList.add("mint-off-canvas-hidden"), this._offCanvas?.classList.add("mint-off-canvas-hidden"), this._dialogWasOpen = !1;
9989
- let e = this._previousFocus;
9990
- this._previousFocus = null, e?.isConnected && e.focus();
9953
+ _syncOpenClasses(e) {
9954
+ !this._offCanvas || !this._overlay || (this._offCanvas.classList.toggle("mint-off-canvas-open", e), this._overlay.classList.toggle("mint-off-canvas-open", e), this._overlay.classList.toggle("mint-off-canvas-hidden", !e));
9991
9955
  }
9992
9956
  };
9993
9957
  customElements.get("mint-off-canvas") || a("mint-off-canvas", Wn), s({
@@ -10089,19 +10053,18 @@ var Gn = {
10089
10053
  "justify-end": "rtu-77c08e015",
10090
10054
  "leading-snug": "rtu-e25ca6535",
10091
10055
  "left-3": "rtu-22e59b722",
10056
+ "lg:block": "rtu-d0ce7c24d",
10057
+ "lg:border-t-0": "rtu-7d283214b",
10058
+ "lg:hidden": "rtu-a327049ca",
10059
+ "lg:justify-end": "rtu-64b07e15f",
10060
+ "lg:mt-4": "rtu-010a34347",
10061
+ "lg:pt-0": "rtu-0cd43c7f4",
10062
+ "lg:py-0": "rtu-0df6beb59",
10092
10063
  "list-none": "rtu-b20d79b23",
10093
- "m-0": "rtu-74f9876a6",
10094
10064
  "max-w-[95%]": "rtu-80fa57ccf",
10095
10065
  "max-w-none": "rtu-2191c1456",
10096
10066
  "max-w-xs": "rtu-3acf64d53",
10097
10067
  "mb-3": "rtu-1bb883263",
10098
- "md:block": "rtu-9d60be3a6",
10099
- "md:border-t-0": "rtu-f6099fc6b",
10100
- "md:hidden": "rtu-e477a6af4",
10101
- "md:justify-end": "rtu-70ce0294b",
10102
- "md:mt-4": "rtu-ef9aeb563",
10103
- "md:pt-0": "rtu-30dec114f",
10104
- "md:py-0": "rtu-3957f1b8e",
10105
10068
  "min-h-0": "rtu-fb7302e53",
10106
10069
  "min-w-0": "rtu-7e0b7cdf1",
10107
10070
  "min-w-[11rem]": "rtu-46b2fd2eb",
@@ -10109,7 +10072,6 @@ var Gn = {
10109
10072
  "mx-auto": "rtu-0e12dc7de",
10110
10073
  "overflow-hidden": "rtu-2cd02d11d",
10111
10074
  "overflow-x-auto": "rtu-1384f66f4",
10112
- "overflow-x-hidden": "rtu-e271e6ae1",
10113
10075
  "overflow-y-auto": "rtu-92bf82f49",
10114
10076
  "overflow-y-hidden": "rtu-b70fd23f6",
10115
10077
  "overscroll-x-contain": "rtu-63ccdaaca",
@@ -10129,7 +10091,6 @@ var Gn = {
10129
10091
  "py-0.5": "rtu-465609a24",
10130
10092
  "py-2": "rtu-03b4dd7f1",
10131
10093
  "py-3": "rtu-1b2d54a3f",
10132
- "py-3.5": "rtu-69e76918f",
10133
10094
  "py-8": "rtu-a1f611f02",
10134
10095
  rounded: "rtu-07389a777",
10135
10096
  "rounded-full": "rtu-ac204c108",
@@ -10851,7 +10812,7 @@ var Yn = class extends HTMLElement {
10851
10812
  return e !== null && e !== "false";
10852
10813
  }
10853
10814
  constructor() {
10854
- super(), this._configuration = null, this._rows = [], this._selectedRowIds = /* @__PURE__ */ new Set(), this._selectedRowCache = /* @__PURE__ */ new Map(), this._search = "", this._currentPage = 1, this._perPage = 15, this._totalRows = 0, this._lastPage = 0, this._offset = 0, this._loaded = !1, this._fetching = !1, this._loading = !1, this._loadingPage = null, this._fetchError = null, this._searching = !1, this._sorting = !1, this._sortingColumnData = null, this._type = "provided", this._searchTimeoutId = null, this._sortTimeoutId = null, this._searchColumns = [], this._exportColumns = {}, this._columns = [], this._tableId = "", this._searchInput = null, this._tableContainer = null, this._paginationContainer = null, this._skeletonContainer = null, this._inMintCard = !1, this._virtualBodyScrollEl = null, this._disposeVirtualBodyFade = null, this._virtualScrollHandler = null, this._virtualWindowRaf = null, this._virtualLastRangeStart = -1, this._virtualLastRangeEnd = -1, this._virtualLastRangeCacheSig = "", this._virtualResizeObserver = null, this._virtualWindowResizeHandler = null, this._virtualRowCache = /* @__PURE__ */ new Map(), this._virtualRangeFetching = !1, this._mobileListMql = null, this._boundMobileListMqlListener = null, this._boundMobileListViewportListener = null, this._initialMobileLayoutRaf = null, this._initialMobileLayoutTimer = null, this._mobileLayoutResizeObserver = null, this._lastMobileViewportObservedWidth = null, this._lastRenderedMobileLayout = null, this._virtualFetchGeneration = 0, this._virtualAjaxPrefetchTimer = null, this._fixedChromeResizeObserver = null, this._utilityClassObserver = null;
10815
+ super(), this._configuration = null, this._rows = [], this._selectedRowIds = /* @__PURE__ */ new Set(), this._selectedRowCache = /* @__PURE__ */ new Map(), this._search = "", this._currentPage = 1, this._perPage = 15, this._totalRows = 0, this._lastPage = 0, this._offset = 0, this._loaded = !1, this._fetching = !1, this._loading = !1, this._loadingPage = null, this._fetchError = null, this._searching = !1, this._sorting = !1, this._sortingColumnData = null, this._type = "provided", this._searchTimeoutId = null, this._sortTimeoutId = null, this._searchColumns = [], this._exportColumns = {}, this._columns = [], this._tableId = "", this._searchInput = null, this._tableContainer = null, this._paginationContainer = null, this._skeletonContainer = null, this._inMintCard = !1, this._virtualBodyScrollEl = null, this._disposeVirtualBodyFade = null, this._virtualScrollHandler = null, this._virtualWindowRaf = null, this._virtualLastRangeStart = -1, this._virtualLastRangeEnd = -1, this._virtualLastRangeCacheSig = "", this._virtualResizeObserver = null, this._virtualWindowResizeHandler = null, this._virtualRowCache = /* @__PURE__ */ new Map(), this._virtualRangeFetching = !1, this._mobileListMql = null, this._boundMobileListMqlListener = null, this._boundMobileListViewportListener = null, this._initialMobileLayoutRaf = null, this._initialMobileLayoutTimer = null, this._mobileLayoutResizeObserver = null, this._lastMobileViewportObservedWidth = null, this._lastRenderedMobileLayout = null, this._virtualFetchGeneration = 0, this._virtualAjaxPrefetchTimer = null, this._fixedChromeResizeObserver = null, this._utilityClassObserver = null, this._mobileCardLongPressTimer = null, this._suppressMobileCardClick = !1;
10855
10816
  }
10856
10817
  get inMintCard() {
10857
10818
  return this._inMintCard;
@@ -10922,6 +10883,9 @@ var Yn = class extends HTMLElement {
10922
10883
  }), this.querySelectorAll("tbody tr[data-row-index]").forEach((e) => {
10923
10884
  let t = this._getRowDataForEventIndex(Number(e.dataset.rowIndex)), n = t ? this._rowSelectionId(t) : null;
10924
10885
  e.classList.toggle("mint-rt-row-selected", n !== null && this._selectedRowIds.has(n));
10886
+ }), this.querySelectorAll("li.mint-resource-table-mobile-row[data-row-index]").forEach((e) => {
10887
+ let t = this._getRowDataForEventIndex(Number(e.dataset.rowIndex)), n = t ? this._rowSelectionId(t) : null;
10888
+ e.classList.toggle("is-selected", n !== null && this._selectedRowIds.has(n));
10925
10889
  });
10926
10890
  }
10927
10891
  get configuration() {
@@ -10931,7 +10895,7 @@ var Yn = class extends HTMLElement {
10931
10895
  e && typeof e == "object" && !Array.isArray(e) ? (this._configuration = e, this._tableId = this._configuration.id || this._tableId || `mint-resource-table-${Date.now()}`, this._perPage = this._configuration.perPage || 15, this._type = typeof this._configuration.data == "string" ? "ajax" : "provided", this._loaded = !1, this._currentPage = 1, this._offset = 0, this._loadPageFromUrl(), this._loadSearchFromUrl(), this._type === "provided" && Array.isArray(this._configuration.data) && (this._rows = [...this._configuration.data], this._totalRows = this._configuration.data.length, this._rememberSelectedRows(this._rows)), this._initializeColumns(), this.isConnected && this.render()) : e == null ? this._configuration = null : this._parseConfiguration();
10932
10896
  }
10933
10897
  connectedCallback() {
10934
- this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "block", "w-full"), this._utilityClassObserver = new MutationObserver(() => this._replaceUtilityClasses()), this._utilityClassObserver.observe(this, {
10898
+ this.classList.add("box-border", "p-0", "border-0", "align-baseline", "block", "w-full"), this._utilityClassObserver = new MutationObserver(() => this._replaceUtilityClasses()), this._utilityClassObserver.observe(this, {
10935
10899
  attributes: !0,
10936
10900
  attributeFilter: ["class"],
10937
10901
  childList: !0,
@@ -11184,7 +11148,7 @@ var Yn = class extends HTMLElement {
11184
11148
  return this._configuration ? Math.max(1, this._configuration.columns.filter((e) => !e.hidden).length) : 1;
11185
11149
  }
11186
11150
  _ensureMobileListMql() {
11187
- typeof window > "u" || !window.matchMedia || (this._mobileListMql || (this._mobileListMql = window.matchMedia("(max-width: 767px)"), this._boundMobileListMqlListener = () => {
11151
+ typeof window > "u" || !window.matchMedia || (this._mobileListMql || (this._mobileListMql = window.matchMedia("(max-width: 1023px)"), this._boundMobileListMqlListener = () => {
11188
11152
  this._configuration && this.isConnected && this.render();
11189
11153
  }, this._mobileListMql.addEventListener("change", this._boundMobileListMqlListener)), this._boundMobileListViewportListener || (this._boundMobileListViewportListener = () => {
11190
11154
  let e = this._lastRenderedMobileLayout;
@@ -11201,7 +11165,7 @@ var Yn = class extends HTMLElement {
11201
11165
  this._mobileListMql && this._boundMobileListMqlListener && this._mobileListMql.removeEventListener("change", this._boundMobileListMqlListener), this._mobileListMql = null, this._boundMobileListMqlListener = null, this._mobileLayoutResizeObserver?.disconnect(), this._mobileLayoutResizeObserver = null, this._lastMobileViewportObservedWidth = null, this._boundMobileListViewportListener && typeof window < "u" && (window.removeEventListener("resize", this._boundMobileListViewportListener), window.removeEventListener("orientationchange", this._boundMobileListViewportListener), window.visualViewport?.removeEventListener("resize", this._boundMobileListViewportListener)), this._boundMobileListViewportListener = null;
11202
11166
  }
11203
11167
  _useMobileListLayout() {
11204
- return typeof window > "u" ? !1 : (this._mobileListMql?.matches ?? (typeof window.matchMedia == "function" && window.matchMedia("(max-width: 767px)").matches)) || window.innerWidth <= 767 || (window.visualViewport?.width ?? Infinity) <= 767 ? !0 : (document.documentElement?.clientWidth ?? Infinity) <= 767;
11168
+ return typeof window > "u" ? !1 : (this._mobileListMql?.matches ?? (typeof window.matchMedia == "function" && window.matchMedia("(max-width: 1023px)").matches)) || window.innerWidth <= 1023 || (window.visualViewport?.width ?? Infinity) <= 1023 ? !0 : (document.documentElement?.clientWidth ?? Infinity) <= 1023;
11205
11169
  }
11206
11170
  _scheduleInitialMobileLayoutSync(e) {
11207
11171
  this._initialMobileLayoutRaf !== null || this._initialMobileLayoutTimer !== null || typeof window.requestAnimationFrame != "function" || (this._initialMobileLayoutRaf = window.requestAnimationFrame(() => {
@@ -11219,8 +11183,8 @@ var Yn = class extends HTMLElement {
11219
11183
  let t = [
11220
11184
  "mint-rt-pagination-host",
11221
11185
  "w-full min-w-0 overflow-x-auto overflow-y-hidden overscroll-x-contain",
11222
- "flex justify-center [-webkit-overflow-scrolling:touch] md:justify-end",
11223
- this._inMintCard ? "border-t border-gray-200 px-3.5 pb-3.5 pt-3 dark:border-mint-divider md:border-t-0 md:pt-0" : "border-t border-gray-200 px-2 py-3 dark:border-mint-divider md:border-t-0 md:py-0 md:mt-4"
11186
+ "flex justify-center [-webkit-overflow-scrolling:touch] lg:justify-end",
11187
+ this._inMintCard ? "border-t border-gray-200 px-3.5 pb-3.5 pt-3 dark:border-mint-divider lg:border-t-0 lg:pt-0" : "border-t border-gray-200 px-2 py-3 dark:border-mint-divider lg:border-t-0 lg:py-0 lg:mt-4"
11224
11188
  ].join(" ");
11225
11189
  return `<div id="mint-rt-pagination-host-${this._tableId}" data-mint-rt-pagination-wrap="" class="${t}"></div>`;
11226
11190
  }
@@ -11321,7 +11285,7 @@ var Yn = class extends HTMLElement {
11321
11285
  }
11322
11286
  _buildMobileSortToolbarHtml() {
11323
11287
  if (!this._hasSortableColumns()) return "";
11324
- let e = `mint-rt-mobile-sort-btn-${this._tableId}`, t = `mint-rt-mobile-sort-popover-${this._tableId}`, n = this._sorting ? " loading=\"true\"" : "", r = ` icon="${this._escapeHtml(this._getMobileSortTriggerIconName())}"`, i = "<div class=\"flex shrink-0 items-center md:hidden\">";
11288
+ let e = `mint-rt-mobile-sort-btn-${this._tableId}`, t = `mint-rt-mobile-sort-popover-${this._tableId}`, n = this._sorting ? " loading=\"true\"" : "", r = ` icon="${this._escapeHtml(this._getMobileSortTriggerIconName())}"`, i = "<div class=\"flex shrink-0 items-center lg:hidden\">";
11325
11289
  return i += `<mint-button id="${e}" data-mint-rt-toolbar="mobile-sort" variant="solid" tone="neutral" size="sm"${n}${r}></mint-button>`, i += `<mint-popover id="${t}" trigger-id="${e}" direction="down" padding="0">`, i += this._buildMobileSortPopoverInnerHtml(), i += "</mint-popover></div>", i;
11326
11290
  }
11327
11291
  _stripHtml(e) {
@@ -11413,7 +11377,12 @@ var Yn = class extends HTMLElement {
11413
11377
  }
11414
11378
  _buildMobileListItemHtml(e, t, n = !1) {
11415
11379
  if (!this._configuration) return "";
11416
- let r = t, i = typeof this._configuration.onRowClick == "function", a = this._mobileThumbnailColumn(), o = this._mobilePrimaryColumn(), s = this._mobileActionsDropdownColumn(), c = a ? this._buildTableCellInnerHtml(a, e, r, "mobile") : "", l = o ? this._buildTableCellInnerHtml(o, e, r, "mobile") : "", u = s ? this._buildTableCellInnerHtml(s, e, r, "mobile") : "", d = [], f = this._configuration.mobileShowLabels === !0;
11380
+ let r = t, i = typeof this._configuration.onRowClick == "function";
11381
+ if (typeof this._configuration.mobileCard == "function") {
11382
+ let t = this._rowSelectionId(e), n = t !== null && this._selectedRowIds.has(t), a = this._configuration.mobileCard(this, e, r);
11383
+ return `<li data-row-index="${r}"${i ? " data-row-clickable=\"true\"" : ""} class="mint-resource-table-mobile-row mint-resource-table-mobile-card mint-resource-table-mobile-card-custom${n ? " is-selected" : ""}">${a}</li>`;
11384
+ }
11385
+ let a = this._mobileThumbnailColumn(), o = this._mobilePrimaryColumn(), s = this._mobileActionsDropdownColumn(), c = a ? this._buildTableCellInnerHtml(a, e, r, "mobile") : "", l = o ? this._buildTableCellInnerHtml(o, e, r, "mobile") : "", u = s ? this._buildTableCellInnerHtml(s, e, r, "mobile") : "", d = [], f = this._configuration.mobileShowLabels === !0;
11417
11386
  for (let t of this._configuration.columns) {
11418
11387
  if (t.hidden || a && t === a || o && t === o || s && t === s) continue;
11419
11388
  let n = this._columnPlainSummaryText(t, e);
@@ -11425,11 +11394,6 @@ var Yn = class extends HTMLElement {
11425
11394
  let p = d.join("<span class=\"text-gray-300 dark:text-gray-600\" aria-hidden=\"true\"> · </span>"), m = [
11426
11395
  "list-none",
11427
11396
  "mint-resource-table-mobile-row",
11428
- ...n ? [] : [
11429
- "border-b",
11430
- "border-gray-200",
11431
- "dark:border-mint-divider"
11432
- ],
11433
11397
  i ? "cursor-pointer" : ""
11434
11398
  ].filter(Boolean).join(" "), h = `<div class="flex items-center gap-3 py-3 pr-4${a ? " pl-0" : " pl-4"}">`, g = this._rowSelectionId(e);
11435
11399
  if (g !== null && (h += `<div class="mint-rt-mobile-selection">${this._selectionControlHtml(g)}</div>`), a) {
@@ -11542,12 +11506,12 @@ var Yn = class extends HTMLElement {
11542
11506
  this._virtualLastRangeStart = d, this._virtualLastRangeEnd = f, this._virtualLastRangeCacheSig = p;
11543
11507
  let m = d * a, h = Math.max(0, (i - f) * a), g = "";
11544
11508
  if (e) {
11545
- g += `<li aria-hidden="true" class="pointer-events-none m-0 block list-none border-0 p-0" style="height:${m}px"></li>`;
11509
+ g += `<li aria-hidden="true" class="pointer-events-none block list-none border-0 p-0" style="height:${m}px"></li>`;
11546
11510
  for (let e = d; e < f; e++) {
11547
11511
  let t = this._getVirtualRowAt(e), n = i > 0 && e === i - 1;
11548
11512
  t ? g += this._buildMobileListItemHtml(t, e, n) : g += this._buildMobileListPlaceholderLi(e, a, n);
11549
11513
  }
11550
- g += `<li aria-hidden="true" class="pointer-events-none m-0 block list-none border-0 p-0" style="height:${h}px"></li>`;
11514
+ g += `<li aria-hidden="true" class="pointer-events-none block list-none border-0 p-0" style="height:${h}px"></li>`;
11551
11515
  } else {
11552
11516
  g += `<tr data-mint-rt-spacer="top" aria-hidden="true"><td colspan="${o}" style="height:${m}px;padding:0;border:0;line-height:0;font-size:0"></td></tr>`;
11553
11517
  for (let e = d; e < f; e++) {
@@ -11772,7 +11736,7 @@ var Yn = class extends HTMLElement {
11772
11736
  this.render();
11773
11737
  return;
11774
11738
  }
11775
- n = document.createElement("div"), n.id = `mint-rt-pagination-host-${this._tableId}`, n.setAttribute("data-mint-rt-pagination-wrap", ""), n.className = "mint-rt-pagination-host w-full min-w-0 overflow-x-auto overflow-y-hidden overscroll-x-contain flex justify-center [-webkit-overflow-scrolling:touch] md:justify-end " + (this._inMintCard ? "border-t border-gray-200 px-3.5 pb-3.5 pt-3 dark:border-mint-divider md:border-t-0 md:pt-0" : "border-t border-gray-200 px-2 py-3 dark:border-mint-divider md:border-t-0 md:py-0 md:mt-4"), e.insertAdjacentElement("afterend", n);
11739
+ n = document.createElement("div"), n.id = `mint-rt-pagination-host-${this._tableId}`, n.setAttribute("data-mint-rt-pagination-wrap", ""), n.className = "mint-rt-pagination-host w-full min-w-0 overflow-x-auto overflow-y-hidden overscroll-x-contain flex justify-center [-webkit-overflow-scrolling:touch] lg:justify-end " + (this._inMintCard ? "border-t border-gray-200 px-3.5 pb-3.5 pt-3 dark:border-mint-divider lg:border-t-0 lg:pt-0" : "border-t border-gray-200 px-2 py-3 dark:border-mint-divider lg:border-t-0 lg:py-0 lg:mt-4"), e.insertAdjacentElement("afterend", n);
11776
11740
  }
11777
11741
  let r = this._buildPaginationNavMarkup(e);
11778
11742
  n.innerHTML = r, setTimeout(() => {
@@ -11919,7 +11883,7 @@ var Yn = class extends HTMLElement {
11919
11883
  }
11920
11884
  if ((this._type === "ajax" && !this._loaded || this._type === "provided" && i) && !this._fetchError && !this._sorting) {
11921
11885
  let e = this._fixedHeader() ? " data-mint-rt-scroll-inner=\"\"" : "", t = this._fixedHeader() && this._fixedControls(), n = this._fixedHeader() ? t ? "sticky top-[var(--mint-rt-fixed-controls-h,0px)] z-30 " : "sticky top-0 z-30 " : "sticky top-0 z-10 ";
11922
- a += "<div class=\"min-w-0\">", a += "<mint-table class=\"table-section" + (this._inMintCard ? " rounded-t-none" : "") + "\"" + e + ">", a += `<table id="${this._tableId}">`, a += "<thead class=\"" + n + "bg-white dark:bg-mint-nav border-b border-gray-200 dark:border-mint-divider\"><tr>", a += this._renderSelectionHeader(), this._configuration.columns.forEach((e, t) => {
11886
+ a += "<div class=\"mint-resource-table-desktop min-h-0 min-w-0\">", a += "<mint-table class=\"table-section" + (this._inMintCard ? " rounded-t-none" : "") + "\"" + e + ">", a += `<table id="${this._tableId}">`, a += "<thead class=\"" + n + "bg-white dark:bg-mint-nav border-b border-gray-200 dark:border-mint-divider\"><tr>", a += this._renderSelectionHeader(), this._configuration.columns.forEach((e, t) => {
11923
11887
  if (e.hidden) return;
11924
11888
  let n = e.sortable ? " data-mint-rt-sortable=\"\"" : "";
11925
11889
  if (a += `<th width="${e.width || ""}" style="${this._getStyle(e)}" class="${this._getClasses(e)}" data-column-key="${t}"${n}>`, e.showLabel !== !1) {
@@ -11940,15 +11904,17 @@ var Yn = class extends HTMLElement {
11940
11904
  a += "</td>";
11941
11905
  }
11942
11906
  }), a += "</tr>";
11943
- a += "</tbody>", a += "</table>", a += "</mint-table>", a += "</div>", a += this._paginationHostPlaceholderHtml();
11907
+ a += "</tbody>", a += "</table>", a += "</mint-table>", a += "</div>", a += `<ul class="mint-resource-table-mobile-list min-h-0 w-full list-none" data-mint-rt-mobile-list="${this._tableId}" aria-hidden="true">`;
11908
+ for (let e = 0; e < 6; e++) a += "<li class=\"mint-resource-table-mobile-row mint-resource-table-mobile-skeleton-card\"><span></span><span></span><span></span></li>";
11909
+ a += "</ul>", a += this._paginationHostPlaceholderHtml();
11944
11910
  } else {
11945
- let e = this._virtualScrollActive() && (this._type === "provided" || this._type === "ajax" && this._loaded && !this._fetchError), t = e && this._virtualScrollRoot() === "table-body", n = this._escapeHtml(this._virtualMaxHeightCss()), o = t || this._fixedHeader(), s = this._fixedHeader() && this._fixedControls(), c = o ? " data-mint-rt-scroll-inner=\"\"" : "", l = "table-section" + (this._inMintCard ? " rounded-t-none" : ""), u = `mint-resource-table-mobile-list m-0 min-h-0 w-full list-none border-collapse overflow-x-hidden ${this._inMintCard ? "px-3.5 py-3.5" : "py-3"}`, d = "";
11911
+ let e = this._virtualScrollActive() && (this._type === "provided" || this._type === "ajax" && this._loaded && !this._fetchError), t = e && this._virtualScrollRoot() === "table-body", n = this._escapeHtml(this._virtualMaxHeightCss()), o = t || this._fixedHeader(), s = this._fixedHeader() && this._fixedControls(), c = o ? " data-mint-rt-scroll-inner=\"\"" : "", l = "table-section" + (this._inMintCard ? " rounded-t-none" : ""), u = "";
11946
11912
  if (t) {
11947
11913
  let e = this._renderColgroupHtml();
11948
11914
  a += `<div id="mint-rt-vscroll-${this._tableId}" class="overflow-y-auto overflow-x-auto min-h-0 w-full" style="max-height: ${n}; scrollbar-gutter: stable; overscroll-behavior-x: contain; overscroll-behavior-y: none; overflow-anchor: none;">`, a += "<div class=\"mint-resource-table-desktop min-h-0 min-w-0\">", a += `<mint-table class="${l}"${c}>`, a += `<table id="${this._tableId}" class="w-full min-w-0 table-fixed">`, a += e, a += this._renderTheadHtml(!0, !0, !0, s);
11949
11915
  } else a += "<div class=\"mint-resource-table-desktop min-h-0 min-w-0\">", a += `<mint-table class="${l}"${c}>`, a += `<table id="${this._tableId}">`, e && (a += this._renderColgroupHtml()), a += this._renderTheadHtml(!0, !0, !!e, s);
11950
11916
  if (a += "<tbody" + (e ? ` data-mint-rt-tbody="${this._tableId}"` : "") + ">", !this._fetching && !this._loading && !i && !e && r.forEach((e, t) => {
11951
- d += this._buildMobileListItemHtml(e, t, t === r.length - 1);
11917
+ u += this._buildMobileListItemHtml(e, t, t === r.length - 1);
11952
11918
  let n = typeof this._configuration.onRowClick == "function", i = n ? "cursor-pointer hover:bg-gray-50 dark:hover:bg-mint-elevated" : "";
11953
11919
  a += `<tr data-row-index="${t}" ${n ? "data-row-clickable=\"true\"" : ""}${i ? ` class="${i}"` : ""}>`, a += this._renderSelectionCell(e), this._configuration.columns.forEach((n) => {
11954
11920
  if (n.hidden) return;
@@ -11957,12 +11923,12 @@ var Yn = class extends HTMLElement {
11957
11923
  }), a += "</tr>";
11958
11924
  }), !this._fetching && !this._loading && !i && r.length === 0) if (this._fetchError) {
11959
11925
  let e = this._configuration.columns.filter((e) => !e.hidden).length + (this._configuration.rowSelection ? 1 : 0);
11960
- a += `<tr><td colspan="${e}" class="text-center py-8 text-red-500 dark:text-red-400">Failed to load data: ${this._escapeHtml(this._fetchError)}</td></tr>`, d += `<li class="list-none px-4 py-8 text-center text-sm text-red-500 dark:text-red-400">Failed to load data: ${this._escapeHtml(this._fetchError)}</li>`;
11926
+ a += `<tr><td colspan="${e}" class="text-center py-8 text-red-500 dark:text-red-400">Failed to load data: ${this._escapeHtml(this._fetchError)}</td></tr>`, u += `<li class="list-none px-4 py-8 text-center text-sm text-red-500 dark:text-red-400">Failed to load data: ${this._escapeHtml(this._fetchError)}</li>`;
11961
11927
  } else {
11962
11928
  let e = this._configuration.columns.filter((e) => !e.hidden).length + (this._configuration.rowSelection ? 1 : 0);
11963
- a += `<tr><td colspan="${e}" class="text-center py-8">No data available.</td></tr>`, d += "<li class=\"list-none px-4 py-8 text-center text-sm\">No data available.</li>";
11929
+ a += `<tr><td colspan="${e}" class="text-center py-8">No data available.</td></tr>`, u += "<li class=\"list-none px-4 py-8 text-center text-sm\">No data available.</li>";
11964
11930
  }
11965
- a += "</tbody>", a += "</table>", a += "</mint-table>", a += "</div>", a += `<ul class="${u}" data-mint-rt-mobile-list="${this._tableId}">${e && r.length > 0 ? "" : d}</ul>`, e || (a += this._paginationHostPlaceholderHtml()), t && (a += "</div>");
11931
+ a += "</tbody>", a += "</table>", a += "</mint-table>", a += "</div>", a += `<ul class="mint-resource-table-mobile-list min-h-0 w-full list-none border-collapse" data-mint-rt-mobile-list="${this._tableId}">${e && r.length > 0 ? "" : u}</ul>`, e || (a += this._paginationHostPlaceholderHtml()), t && (a += "</div>");
11966
11932
  }
11967
11933
  this._fixedHeader() ? this.setAttribute("data-mint-rt-fixed-header", "") : this.removeAttribute("data-mint-rt-fixed-header"), this._fixedControls() ? this.setAttribute("data-mint-rt-fixed-controls", "") : this.removeAttribute("data-mint-rt-fixed-controls"), this.innerHTML = a, this._replaceUtilityClasses(), this._updatePagination(), this.querySelectorAll("mint-button[data-action]").forEach((e) => {
11968
11934
  e.render && e.render();
@@ -11976,15 +11942,43 @@ var Yn = class extends HTMLElement {
11976
11942
  this._rowClickHandler && this.removeEventListener("click", this._rowClickHandler, !0);
11977
11943
  let e = (e) => {
11978
11944
  let t = e.target;
11945
+ if (this._suppressMobileCardClick) {
11946
+ this._suppressMobileCardClick = !1, e.preventDefault(), e.stopImmediatePropagation();
11947
+ return;
11948
+ }
11949
+ let n = t.closest("li.mint-resource-table-mobile-row[data-row-index]");
11950
+ if (n && this._configuration?.rowSelection && this._selectedRowIds.size > 0 && !t.closest("mint-button, button, mint-popover, [data-action], [data-mint-rt-selection]")) {
11951
+ let t = this._getRowDataForEventIndex(Number(n.dataset.rowIndex)), r = t ? this._rowSelectionId(t) : null;
11952
+ if (r !== null) {
11953
+ e.preventDefault(), e.stopPropagation(), this.toggleRowSelection(r);
11954
+ return;
11955
+ }
11956
+ }
11979
11957
  if (t.tagName === "MINT-BUTTON" || t.tagName === "BUTTON" || t.closest("mint-button") || t.closest("button") || t.closest("mint-popover") || t.closest("[data-action]") || t.closest("[data-mint-rt-selection]")) return;
11980
- let n = t.closest("tr[data-row-clickable=\"true\"]") || t.closest("li[data-row-clickable=\"true\"]");
11981
- if (!n) return;
11982
- let r = n.getAttribute("data-row-index");
11958
+ let r = t.closest("tr[data-row-clickable=\"true\"]") || t.closest("li[data-row-clickable=\"true\"]");
11983
11959
  if (!r) return;
11984
- let i = parseInt(r), a = this._getRowDataForEventIndex(i);
11985
- !a || !this._configuration?.onRowClick || (this._configuration.onRowClick.length === 1 ? this._configuration.onRowClick(a) : this._configuration.onRowClick(this, a));
11960
+ let i = r.getAttribute("data-row-index");
11961
+ if (!i) return;
11962
+ let a = parseInt(i), o = this._getRowDataForEventIndex(a);
11963
+ !o || !this._configuration?.onRowClick || (this._configuration.onRowClick.length === 1 ? this._configuration.onRowClick(o) : this._configuration.onRowClick(this, o));
11986
11964
  };
11987
11965
  this.addEventListener("click", e, !0), this._rowClickHandler = e;
11966
+ let t = () => {
11967
+ this._mobileCardLongPressTimer !== null && window.clearTimeout(this._mobileCardLongPressTimer), this._mobileCardLongPressTimer = null;
11968
+ }, n = (e) => {
11969
+ if (!this._configuration?.rowSelection || !this._useMobileListLayout()) return;
11970
+ let n = e;
11971
+ if (n.button !== void 0 && n.button !== 0) return;
11972
+ let r = e.target;
11973
+ if (r.closest("mint-button, button, mint-popover, input, [data-action], [data-mint-rt-selection]")) return;
11974
+ let i = r.closest("li.mint-resource-table-mobile-row[data-row-index]");
11975
+ i && (t(), this._mobileCardLongPressTimer = window.setTimeout(() => {
11976
+ this._mobileCardLongPressTimer = null;
11977
+ let e = this._getRowDataForEventIndex(Number(i.dataset.rowIndex)), t = e ? this._rowSelectionId(e) : null;
11978
+ t !== null && (this._suppressMobileCardClick = !0, this.toggleRowSelection(t));
11979
+ }, 500));
11980
+ }, r = () => t(), i = this._mobileCardPointerDown, a = this._mobileCardPointerEnd;
11981
+ i && this.removeEventListener("pointerdown", i), a && (this.removeEventListener("pointerup", a), this.removeEventListener("pointercancel", a), this.removeEventListener("pointerleave", a)), this.addEventListener("pointerdown", n), this.addEventListener("pointerup", r), this.addEventListener("pointercancel", r), this.addEventListener("pointerleave", r), this._mobileCardPointerDown = n, this._mobileCardPointerEnd = r;
11988
11982
  }
11989
11983
  _attachPaginationListeners() {
11990
11984
  this.querySelectorAll("[data-action=\"page\"]").forEach((e) => {
@@ -12979,8 +12973,8 @@ var tr = class extends HTMLElement {
12979
12973
  let c = document.createElement("button");
12980
12974
  c.type = "button", c.className = "mint-sidenav-mobile-toggle", c.setAttribute("aria-label", `Toggle ${e} submenu`), c.setAttribute("aria-expanded", String(this._isSubmenuPanelVisible())), c.setAttribute("aria-controls", o), c.addEventListener("click", (e) => {
12981
12975
  e.preventDefault(), e.stopPropagation();
12982
- let t = !this._isExpanded();
12983
- this._setExpanded(t, t);
12976
+ let t = !this._isSubmenuPanelVisible();
12977
+ !t && this._isActive() && this.removeAttribute("active"), this._setExpanded(t, t);
12984
12978
  });
12985
12979
  let l = document.createElement("mint-icon");
12986
12980
  l.setAttribute("name", "caret-down"), l.className = `mint-sidenav-dropdown-caret${this._isSubmenuPanelVisible() ? " is-expanded" : ""}`, l.setAttribute("aria-hidden", "true"), c.appendChild(l), r.appendChild(i), r.appendChild(s), r.appendChild(c), a.appendChild(r), this._trigger = i;
@@ -1,2 +1,2 @@
1
1
  /* mint-ui component style: off-canvas */
2
- @layer theme, base, components, utilities;/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */@layer utilities{.fixed{position:fixed}.static{position:static}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.hidden{display:none}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s))}}@layer components{mint-off-canvas{box-sizing:border-box;color:var(--mint-color-text,#28372d);display:none!important}.mint-off-canvas-hidden{display:none!important}.mint-off-canvas-overlay{inset:calc(var(--spacing,.25rem) * 0);z-index:1001;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);opacity:0;transition:opacity .2s ease-in-out;position:fixed;inset:0;background:0 0!important}.mint-off-canvas-overlay.mint-off-canvas-open{opacity:1}.mint-off-canvas-shell{z-index:1002;pointer-events:none;justify-content:stretch;align-items:stretch;display:flex;position:fixed;inset:0;overflow:hidden}.mint-off-canvas-panel{width:min(var(--off-canvas-width,20rem), 100vw);border:1px solid var(--mint-color-border,#dfe6e0);background:var(--mint-color-surface-raised,#fff);pointer-events:auto;flex-direction:column;max-width:100%;height:100%;max-height:100dvh;transition:transform .2s linear;display:flex;overflow:hidden;transform:translate(100%);box-shadow:0 20px 60px #0f1c122e}.mint-off-canvas-shell[data-position=left] .mint-off-canvas-panel{transform:translate(-100%)}.mint-off-canvas-shell[data-position=top] .mint-off-canvas-panel{transform:translateY(-100%)}.mint-off-canvas-shell[data-position=bottom] .mint-off-canvas-panel{transform:translateY(100%)}.mint-off-canvas-shell.mint-off-canvas-open .mint-off-canvas-panel{transform:translate(0)}.mint-off-canvas-shell[data-position=right]{justify-content:flex-end}.mint-off-canvas-shell[data-position=left]{justify-content:flex-start}.mint-off-canvas-shell[data-position=top]{align-items:flex-start}.mint-off-canvas-shell[data-position=bottom]{align-items:flex-end}.mint-off-canvas-shell[data-position=top] .mint-off-canvas-panel,.mint-off-canvas-shell[data-position=bottom] .mint-off-canvas-panel{width:100%;height:min(var(--off-canvas-height,90vh), 100dvh);max-width:none}.mint-off-canvas-shell[data-full-page=true] .mint-off-canvas-panel{width:100%;max-width:none;height:100%;max-height:100dvh}.mint-off-canvas-header{border-bottom:1px solid var(--mint-color-border-subtle,#edf0ec);flex:none;justify-content:space-between;align-items:center;gap:1rem;min-height:4rem;padding:1rem 1.25rem;display:flex}.mint-off-canvas-heading{flex:1;min-width:0}.mint-off-canvas-body{flex:auto;min-height:0;padding:1.25rem;overflow:auto}.mint-off-canvas-actions{border-top:1px solid var(--mint-color-border-subtle,#edf0ec);flex:none;padding:1rem 1.25rem}mint-stack.mint-off-canvas-actions-stack{justify-content:flex-end;gap:.5rem;display:flex}@media (width<=767px){.mint-off-canvas-panel,.mint-off-canvas-shell[data-position=top] .mint-off-canvas-panel,.mint-off-canvas-shell[data-position=bottom] .mint-off-canvas-panel{width:100%;max-width:none;height:100%;max-height:100dvh}}}
2
+ @layer theme, base, components, utilities;/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */@layer utilities{.fixed{position:fixed}.static{position:static}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}}@layer components{mint-off-canvas{box-sizing:border-box;color:var(--mint-color-text,#28372d);display:none!important}.mint-off-canvas-hidden{visibility:hidden!important;pointer-events:none!important}.mint-off-canvas-overlay{inset:calc(var(--spacing,.25rem) * 0);z-index:1001;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);opacity:0;will-change:opacity;transition:opacity .2s ease-in-out;position:fixed;inset:0;background:0 0!important}.mint-off-canvas-overlay.mint-off-canvas-open{opacity:1}.mint-off-canvas-shell{z-index:1002;pointer-events:none;display:block;position:fixed;inset:0;overflow:hidden}.mint-off-canvas-panel{box-sizing:border-box;width:min(var(--off-canvas-width,20rem), 100vw);border:1px solid var(--mint-color-border,#dfe6e0);background:var(--mint-color-surface-raised,#fff);pointer-events:auto;backface-visibility:hidden;flex-direction:column;max-width:100%;height:auto;max-height:100dvh;transition:right .2s linear;display:flex;position:absolute;top:0;bottom:0;right:0;overflow:hidden}.mint-off-canvas-shell[data-position=left] .mint-off-canvas-panel{right:auto;left:calc(-1 * min(var(--off-canvas-width,20rem), 100vw));transition:left .2s linear}.mint-off-canvas-shell[data-position=top] .mint-off-canvas-panel{bottom:auto;left:0;right:0;top:calc(-1 * min(var(--off-canvas-height,90vh), 100dvh));width:100%;height:min(var(--off-canvas-height,90vh), 100dvh);max-width:none;transition:top .2s linear}.mint-off-canvas-shell[data-position=bottom] .mint-off-canvas-panel{top:auto;right:0;bottom:calc(-1 * min(var(--off-canvas-height,90vh), 100dvh));width:100%;height:min(var(--off-canvas-height,90vh), 100dvh);max-width:none;transition:bottom .2s linear;left:0}.mint-off-canvas-shell[data-position=right] .mint-off-canvas-panel{right:calc(-1 * min(var(--off-canvas-width,20rem), 100vw));transition:right .2s linear}.mint-off-canvas-shell[data-position=right].mint-off-canvas-open .mint-off-canvas-panel{right:0}.mint-off-canvas-shell[data-position=left] .mint-off-canvas-panel{right:auto}.mint-off-canvas-shell[data-position=left].mint-off-canvas-open .mint-off-canvas-panel{left:0}.mint-off-canvas-shell[data-position=top] .mint-off-canvas-panel{bottom:auto;left:0;right:0}.mint-off-canvas-shell[data-position=top].mint-off-canvas-open .mint-off-canvas-panel{top:0}.mint-off-canvas-shell[data-position=bottom].mint-off-canvas-open .mint-off-canvas-panel{bottom:0}.mint-off-canvas-shell[data-position=top] .mint-off-canvas-panel,.mint-off-canvas-shell[data-position=bottom] .mint-off-canvas-panel{width:100%;height:min(var(--off-canvas-height,90vh), 100dvh);max-width:none}.mint-off-canvas-shell[data-full-page=true] .mint-off-canvas-panel{width:100%;max-width:none;height:100%;max-height:100dvh}.mint-off-canvas-shell[data-position=left][data-full-page=true] .mint-off-canvas-panel{left:-100%;right:auto}.mint-off-canvas-shell[data-position=left][data-full-page=true].mint-off-canvas-open .mint-off-canvas-panel{left:0}.mint-off-canvas-shell[data-position=top][data-full-page=true] .mint-off-canvas-panel{inset:-100% 0 auto}.mint-off-canvas-shell[data-position=top][data-full-page=true].mint-off-canvas-open .mint-off-canvas-panel{top:0}.mint-off-canvas-shell[data-position=bottom][data-full-page=true] .mint-off-canvas-panel{inset:auto 0 -100%}.mint-off-canvas-shell[data-position=bottom][data-full-page=true].mint-off-canvas-open .mint-off-canvas-panel{bottom:0}.mint-off-canvas-shell[data-position=right][data-full-page=true] .mint-off-canvas-panel{left:auto;right:-100%}.mint-off-canvas-shell[data-position=right][data-full-page=true].mint-off-canvas-open .mint-off-canvas-panel{right:0}.mint-off-canvas-header{border-bottom:1px solid var(--mint-color-border-subtle,#edf0ec);flex:none;justify-content:space-between;align-items:center;gap:1rem;min-height:4rem;padding:1rem 1.25rem;display:flex}.mint-off-canvas-heading{flex:1;min-width:0}.mint-off-canvas-body{flex:auto;min-height:0;padding:1.25rem;overflow:auto}.mint-off-canvas-actions{border-top:1px solid var(--mint-color-border-subtle,#edf0ec);flex:none;padding:1rem 1.25rem}mint-stack.mint-off-canvas-actions-stack{justify-content:flex-end;gap:.5rem;display:flex}@media (width<=767px){.mint-off-canvas-panel,.mint-off-canvas-shell[data-position=top] .mint-off-canvas-panel,.mint-off-canvas-shell[data-position=bottom] .mint-off-canvas-panel{width:100%;max-width:none;height:100%;max-height:100dvh}.mint-off-canvas-shell[data-position=right] .mint-off-canvas-panel{right:-100%}.mint-off-canvas-shell[data-position=right].mint-off-canvas-open .mint-off-canvas-panel{right:0}.mint-off-canvas-shell[data-position=left] .mint-off-canvas-panel{left:-100%}.mint-off-canvas-shell[data-position=left].mint-off-canvas-open .mint-off-canvas-panel{left:0}.mint-off-canvas-shell[data-position=top] .mint-off-canvas-panel{top:-100%}.mint-off-canvas-shell[data-position=top].mint-off-canvas-open .mint-off-canvas-panel{top:0}.mint-off-canvas-shell[data-position=bottom] .mint-off-canvas-panel{bottom:-100%}.mint-off-canvas-shell[data-position=bottom].mint-off-canvas-open .mint-off-canvas-panel{bottom:0}}}