monobill-mintui 0.1.4 → 0.1.6

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
@@ -35,11 +35,11 @@ class q extends HTMLElement {
35
35
  const e = this.getSize(), t = this.getAttribute("size") || "default", i = !!(this.style.width && this.style.height), s = this.getAttribute("data-button-variant"), r = document.documentElement.classList.contains("dark");
36
36
  let n;
37
37
  if (i) {
38
- const l = this.getAttribute("data-button-tone") || "neutral";
39
- s === "solid" ? l === "neutral" ? n = r ? "#ffffff" : "#0f172a" : n = "#ffffff" : n = r ? "#ffffff" : "#0f172a";
38
+ const o = this.getAttribute("data-button-tone") || "neutral";
39
+ s === "solid" ? o === "neutral" ? n = r ? "#ffffff" : "#0f172a" : n = "#ffffff" : n = r ? "#ffffff" : "#0f172a";
40
40
  } else
41
41
  n = r ? "#e2e8f0" : "#0f172a";
42
- const a = t === "large" ? "2" : "4", c = !!(this.style.width && this.style.height), o = `
42
+ const a = t === "large" ? "2" : "4", c = !!(this.style.width && this.style.height), l = `
43
43
  <svg
44
44
  xmlns="http://www.w3.org/2000/svg"
45
45
  fill="none"
@@ -83,7 +83,7 @@ class q extends HTMLElement {
83
83
  </circle>
84
84
  </svg>
85
85
  `;
86
- this.innerHTML = o.trim();
86
+ this.innerHTML = l.trim();
87
87
  }
88
88
  }
89
89
  customElements.get("mint-spinner") || customElements.define("mint-spinner", q);
@@ -121,10 +121,10 @@ class B extends HTMLElement {
121
121
  getIconUrl() {
122
122
  var t;
123
123
  const e = document.documentElement.getAttribute("data-icon-base-url") || ((t = document.querySelector('meta[name="icon-base-url"]')) == null ? void 0 : t.getAttribute("content"));
124
- return e ? `${e}/${this.getName()}.svg` : `/icons/${this.getName()}.svg`;
124
+ return e ? `${e.endsWith("/") ? e : `${e}/`}${this.getName()}.svg` : `/icons/${this.getName()}.svg`;
125
125
  }
126
126
  render() {
127
- var a, c;
127
+ var c, l, o;
128
128
  const e = this.getName();
129
129
  if (!e) {
130
130
  this.innerHTML = "", this.style.maskImage = "", this.style.webkitMaskImage = "";
@@ -134,21 +134,24 @@ class B extends HTMLElement {
134
134
  console.warn(`Icon "${e}" not found. Make sure you've imported the icon: import '@monobill-mintui/icon/icons/${e}'`), this.innerHTML = "", this.style.maskImage = "", this.style.webkitMaskImage = "";
135
135
  return;
136
136
  }
137
- const i = this.closest("mint-button") || ((a = this.parentElement) == null ? void 0 : a.closest("mint-button")), s = this.closest("mint-switch") || ((c = this.parentElement) == null ? void 0 : c.closest("mint-switch"));
138
- let r;
139
- s ? r = "w-3 h-3" : i ? r = "w-5 h-5" : r = "w-[1.3em] h-[1.3em]", this.classList.remove("w-4", "h-4", "w-5", "h-5", "w-[1em]", "h-[1em]"), r.split(" ").forEach((o) => {
140
- o && this.classList.add(o);
141
- });
142
- const n = this.getIconUrl();
143
- if (this.style.maskImage = `url(${n})`, this.style.webkitMaskImage = `url(${n})`, this.style.maskSize = "contain", this.style.webkitMaskSize = "contain", this.style.maskRepeat = "no-repeat", this.style.webkitMaskRepeat = "no-repeat", this.style.maskPosition = "center", this.style.webkitMaskPosition = "center", this.style.aspectRatio = "1 / 1", this.style.backgroundColor = "currentColor", s)
137
+ const i = this.closest("mint-button") || ((c = this.parentElement) == null ? void 0 : c.closest("mint-button")), s = this.closest("mint-switch") || ((l = this.parentElement) == null ? void 0 : l.closest("mint-switch")), r = this.closest("mint-select") || ((o = this.parentElement) == null ? void 0 : o.closest("mint-select"));
138
+ if (!Array.from(this.classList).some(
139
+ (d) => d.startsWith("w-") || d.startsWith("h-")
140
+ ) && !r) {
141
+ let d;
142
+ s ? d = "w-3 h-3" : i ? d = "w-5 h-5" : d = "w-[1.3em] h-[1.3em]", this.classList.remove("w-4", "h-4", "w-5", "h-5", "w-[1em]", "h-[1em]", "w-[1.3em]", "h-[1.3em]", "w-3", "h-3"), d.split(" ").forEach((h) => {
143
+ h && this.classList.add(h);
144
+ });
145
+ }
146
+ const a = this.getIconUrl();
147
+ if (this.style.maskImage = `url(${a})`, this.style.webkitMaskImage = `url(${a})`, this.style.maskSize = "contain", this.style.webkitMaskSize = "contain", this.style.maskRepeat = "no-repeat", this.style.webkitMaskRepeat = "no-repeat", this.style.maskPosition = "center", this.style.webkitMaskPosition = "center", this.style.aspectRatio = "1 / 1", this.style.backgroundColor = "currentColor", this.innerHTML = "", s)
144
148
  this.classList.remove("text-gray-100", "text-gray-900"), this.classList.add("text-gray-900");
145
149
  else if (i)
146
150
  this.classList.remove("text-gray-100", "text-gray-900");
147
151
  else {
148
- const l = document.documentElement.classList.contains("dark") ? "text-gray-100" : "text-gray-900";
149
- this.classList.remove("text-gray-100", "text-gray-900"), this.classList.add(l);
152
+ const h = document.documentElement.classList.contains("dark") ? "text-gray-100" : "text-gray-900";
153
+ this.classList.remove("text-gray-100", "text-gray-900"), this.classList.add(h);
150
154
  }
151
- this.innerHTML = "";
152
155
  }
153
156
  }
154
157
  customElements.get("mint-icon") || customElements.define("mint-icon", B);
@@ -214,8 +217,8 @@ class z extends HTMLElement {
214
217
  if (c.nodeType === Node.TEXT_NODE && ((n = c.textContent) != null && n.trim()))
215
218
  return !1;
216
219
  if (c.nodeType === Node.ELEMENT_NODE) {
217
- const o = c;
218
- if (o.tagName !== "MINT-ICON" && o.tagName !== "MINT-SPINNER" && !o.querySelector("mint-spinner") && !o.hasAttribute("slot") && o.className !== "mint-button-icon" && !(o.className === "mr-2" && o.querySelector("mint-spinner")) && (a = o.textContent) != null && a.trim())
220
+ const l = c;
221
+ if (l.tagName !== "MINT-ICON" && l.tagName !== "MINT-SPINNER" && !l.querySelector("mint-spinner") && !l.hasAttribute("slot") && l.className !== "mint-button-icon" && !(l.className === "mr-2" && l.querySelector("mint-spinner")) && (a = l.textContent) != null && a.trim())
219
222
  return !1;
220
223
  }
221
224
  }
@@ -537,7 +540,7 @@ class z extends HTMLElement {
537
540
  return this.isFullWidth() && c.push("w-full"), c.join(" ");
538
541
  }
539
542
  render() {
540
- var l, d, h, u, b;
543
+ var o, d, h, u, b;
541
544
  const e = this.isDisabled() || this.isLoading(), t = this.getType();
542
545
  if (!this._button) {
543
546
  for (this._button = document.createElement("button"); this.firstChild; )
@@ -555,7 +558,7 @@ class z extends HTMLElement {
555
558
  const _ = document.createElement("mint-spinner");
556
559
  _.setAttribute("size", "default"), _.setAttribute("data-button-variant", this.getVariant()), _.setAttribute("data-button-tone", this.getTone()), _.style.width = "0.875rem", _.style.height = "0.875rem", f.appendChild(_), this._button.insertBefore(f, this._button.firstChild);
557
560
  }
558
- else i && ((l = i.parentElement) == null || l.remove());
561
+ else i && ((o = i.parentElement) == null || o.remove());
559
562
  for (; this.firstChild && this.firstChild !== this._button; )
560
563
  this._button.appendChild(this.firstChild);
561
564
  const s = this.getIcon();
@@ -596,8 +599,8 @@ class z extends HTMLElement {
596
599
  }
597
600
  const c = this.isIconOnly();
598
601
  r && (r.classList.contains("mint-button-icon") || r.classList.add("mint-button-icon"), r.classList.remove("mr-1.5", "ml-1.5"), c ? r.tagName === "MINT-ICON" ? (r.style.width = "1rem", r.style.height = "1rem", r.style.maxWidth = "1rem", r.style.maxHeight = "1rem", r.style.flexShrink = "0") : (r.style.maxWidth = "1rem", r.style.maxHeight = "1rem", r.style.flexShrink = "0", r.tagName === "svg" && (r.style.width = "1rem", r.style.height = "1rem")) : n === "left" ? r.classList.add("mr-1.5") : r.classList.add("ml-1.5"));
599
- const o = this.getButtonClasses();
600
- this._button.className = o;
602
+ const l = this.getButtonClasses();
603
+ this._button.className = l;
601
604
  }
602
605
  setupEventListeners() {
603
606
  this._button && !this._clickHandler && (this._clickHandler = this.handleClick.bind(this), this._clickHandler && this._button.addEventListener("click", this._clickHandler, !0), this._button.addEventListener("mousedown", this._handleMouseDown), this._button.addEventListener("mouseup", this._handleMouseUp), this._button.addEventListener("mouseleave", this._handleMouseLeave), this._button.addEventListener("touchstart", this._handleTouchStart), this._button.addEventListener("touchend", this._handleTouchEnd), this._button.addEventListener("touchcancel", this._handleTouchCancel));
@@ -844,14 +847,14 @@ class R extends HTMLElement {
844
847
  "text-green-600"
845
848
  // success
846
849
  ], i = ["text-2xl", "text-lg", "text-sm"];
847
- i.forEach((o) => {
848
- this.classList.remove(o), this._userClasses.delete(o);
849
- }), t.forEach((o) => {
850
- this.classList.remove(o), this._userClasses.delete(o);
850
+ i.forEach((l) => {
851
+ this.classList.remove(l), this._userClasses.delete(l);
852
+ }), t.forEach((l) => {
853
+ this.classList.remove(l), this._userClasses.delete(l);
851
854
  });
852
- const s = this.getTextClasses().split(" ").filter((o) => o.trim());
853
- Array.from(this.classList).forEach((o) => {
854
- !t.includes(o) && !i.includes(o) && this._userClasses.add(o);
855
+ const s = this.getTextClasses().split(" ").filter((l) => l.trim());
856
+ Array.from(this.classList).forEach((l) => {
857
+ !t.includes(l) && !i.includes(l) && this._userClasses.add(l);
855
858
  });
856
859
  const n = [.../* @__PURE__ */ new Set([...s, ...Array.from(this._userClasses)])];
857
860
  this.className = n.join(" ");
@@ -1316,11 +1319,11 @@ class J extends HTMLElement {
1316
1319
  t ? (r || (r = document.createElement("mint-text"), r.setAttribute("size", "sub-heading"), r.setAttribute("bold", ""), this._headingSlot.appendChild(r)), r.textContent = t) : r && r.remove(), Array.from(this.children).filter(
1317
1320
  (d) => d !== this._overlay && d !== this._modal && d !== this._headingSlot && d.getAttribute("slot") === "heading"
1318
1321
  ).forEach((d) => {
1319
- d.parentElement !== this._headingSlot && this._headingSlot.appendChild(d);
1322
+ this._headingSlot && d.parentElement !== this._headingSlot && this._headingSlot.appendChild(d);
1320
1323
  }), this._closeButton || (this._closeButton = document.createElement("mint-button"), this._closeButton.setAttribute("variant", "ghost"), this._closeButton.setAttribute("icon", "close"), this._closeButton.addEventListener("click", () => this.close()), this._header.appendChild(this._closeButton)), this._bodySlot || (this._bodySlot = document.createElement("div"), this._bodySlot.className = "flex-1 overflow-y-auto p-4", this._bodySlot.setAttribute("slot", "body"), s.appendChild(this._bodySlot)), Array.from(this.children).filter(
1321
1324
  (d) => d !== this._overlay && d !== this._modal && d !== this._bodySlot && d.getAttribute("slot") === "body"
1322
1325
  ).forEach((d) => {
1323
- d.parentElement !== this._bodySlot && this._bodySlot.appendChild(d);
1326
+ this._bodySlot && d.parentElement !== this._bodySlot && this._bodySlot.appendChild(d);
1324
1327
  }), this._actionsSlot || (this._actionsSlot = document.createElement("div"), this._actionsSlot.className = "p-4 border-t border-gray-200 dark:border-gray-700", this._actionsSlot.setAttribute("slot", "actions"), s.appendChild(this._actionsSlot));
1325
1328
  let c = this._actionsSlot.querySelector("mint-stack");
1326
1329
  c || (c = document.createElement("mint-stack"), c.setAttribute("direction", "horizontal"), c.className = "justify-end", this._actionsSlot.appendChild(c)), Array.from(this.children).filter(
@@ -1480,38 +1483,38 @@ class X extends HTMLElement {
1480
1483
  if (!t) return { top: 0, left: 0, direction: "down" };
1481
1484
  this.classList.contains("hidden") && (this.classList.remove("hidden"), this._popover.style.visibility = "hidden");
1482
1485
  const s = t.getBoundingClientRect(), r = window.innerWidth, n = window.innerHeight, a = 8;
1483
- let c = this.getDirection(), o = 0, l = 0;
1486
+ let c = this.getDirection(), l = 0, o = 0;
1484
1487
  switch (c) {
1485
1488
  case "down":
1486
- if (o = e.bottom + a, l = e.left + e.width / 2 - s.width / 2, o + s.height > n) {
1489
+ if (l = e.bottom + a, o = e.left + e.width / 2 - s.width / 2, l + s.height > n) {
1487
1490
  const d = e.top - s.height - a;
1488
- d >= 0 ? (c = "up", o = d) : (o = Math.max(0, n - s.height - a), o + s.height > n && (o = 0));
1491
+ d >= 0 ? (c = "up", l = d) : (l = Math.max(0, n - s.height - a), l + s.height > n && (l = 0));
1489
1492
  }
1490
- l < 0 && (l = a), l + s.width > r && (l = Math.max(a, r - s.width - a), l + s.width > r && (l = r - s.width));
1493
+ o < 0 && (o = a), o + s.width > r && (o = Math.max(a, r - s.width - a), o + s.width > r && (o = r - s.width));
1491
1494
  break;
1492
1495
  case "up":
1493
- if (o = e.top - s.height - a, l = e.left + e.width / 2 - s.width / 2, o < 0) {
1496
+ if (l = e.top - s.height - a, o = e.left + e.width / 2 - s.width / 2, l < 0) {
1494
1497
  const d = e.bottom + a;
1495
- d + s.height <= n ? (c = "down", o = d) : (o = Math.min(n - s.height - a, n - s.height), o < 0 && (o = n - s.height));
1498
+ d + s.height <= n ? (c = "down", l = d) : (l = Math.min(n - s.height - a, n - s.height), l < 0 && (l = n - s.height));
1496
1499
  }
1497
- l < 0 && (l = a), l + s.width > r && (l = Math.max(a, r - s.width - a), l + s.width > r && (l = r - s.width));
1500
+ o < 0 && (o = a), o + s.width > r && (o = Math.max(a, r - s.width - a), o + s.width > r && (o = r - s.width));
1498
1501
  break;
1499
1502
  case "right":
1500
- if (o = e.top + e.height / 2 - s.height / 2, l = e.right + a, l + s.width > r) {
1503
+ if (l = e.top + e.height / 2 - s.height / 2, o = e.right + a, o + s.width > r) {
1501
1504
  const d = e.left - s.width - a;
1502
- d >= 0 ? (c = "left", l = d) : (l = Math.max(0, r - s.width - a), l + s.width > r && (l = r - s.width));
1505
+ d >= 0 ? (c = "left", o = d) : (o = Math.max(0, r - s.width - a), o + s.width > r && (o = r - s.width));
1503
1506
  }
1504
- o < 0 && (o = a), o + s.height > n && (o = Math.max(a, n - s.height - a), o + s.height > n && (o = n - s.height));
1507
+ l < 0 && (l = a), l + s.height > n && (l = Math.max(a, n - s.height - a), l + s.height > n && (l = n - s.height));
1505
1508
  break;
1506
1509
  case "left":
1507
- if (o = e.top + e.height / 2 - s.height / 2, l = e.left - s.width - a, l < 0) {
1510
+ if (l = e.top + e.height / 2 - s.height / 2, o = e.left - s.width - a, o < 0) {
1508
1511
  const d = e.right + a;
1509
- d + s.width <= r ? (c = "right", l = d) : (l = Math.min(r - s.width - a, r - s.width), l < 0 && (l = 0));
1512
+ d + s.width <= r ? (c = "right", o = d) : (o = Math.min(r - s.width - a, r - s.width), o < 0 && (o = 0));
1510
1513
  }
1511
- o < 0 && (o = a), o + s.height > n && (o = Math.max(a, n - s.height - a), o + s.height > n && (o = n - s.height));
1514
+ l < 0 && (l = a), l + s.height > n && (l = Math.max(a, n - s.height - a), l + s.height > n && (l = n - s.height));
1512
1515
  break;
1513
1516
  }
1514
- return { top: o, left: l, direction: c };
1517
+ return { top: l, left: o, direction: c };
1515
1518
  }
1516
1519
  render() {
1517
1520
  const e = this.getId(), t = this.isOpen(), i = this.getPadding();
@@ -1519,8 +1522,8 @@ class X extends HTMLElement {
1519
1522
  if (this.classList.remove("hidden"), this.style.pointerEvents = "auto", !this._clickOutsideHandler) {
1520
1523
  const n = this;
1521
1524
  this._clickOutsideHandler = function(a) {
1522
- const c = a.composedPath(), o = c.includes(n);
1523
- if (!(n._triggerElement && c.includes(n._triggerElement)) && !o) {
1525
+ const c = a.composedPath(), l = c.includes(n);
1526
+ if (!(n._triggerElement && c.includes(n._triggerElement)) && !l) {
1524
1527
  n.close();
1525
1528
  return;
1526
1529
  }
@@ -1535,7 +1538,7 @@ class X extends HTMLElement {
1535
1538
  if (!s)
1536
1539
  s = document.createElement("div"), s.className = `popover-content bg-white dark:bg-gray-800 rounded-lg shadow-xl ${i} transition-all duration-200 ease-out transform`, this._popover.appendChild(s);
1537
1540
  else {
1538
- const n = s.className.split(" "), a = ["p-0", "p-0.5", "p-1", "p-1.5", "p-2", "p-2.5", "p-3", "p-3.5", "p-4", "p-5", "p-6", "p-8", "p-10", "p-12", "p-16", "p-20", "p-24"], c = n.filter((o) => !a.includes(o));
1541
+ const n = s.className.split(" "), a = ["p-0", "p-0.5", "p-1", "p-1.5", "p-2", "p-2.5", "p-3", "p-3.5", "p-4", "p-5", "p-6", "p-8", "p-10", "p-12", "p-16", "p-20", "p-24"], c = n.filter((l) => !a.includes(l));
1539
1542
  s.className = [...c, i].join(" ");
1540
1543
  }
1541
1544
  Array.from(this.children).forEach((n) => {
@@ -1697,22 +1700,22 @@ class K extends HTMLElement {
1697
1700
  a ? this._checkbox.value = a : this._checkbox.removeAttribute("value"), e ? this._checkbox.setAttribute("aria-label", e) : this._checkbox.removeAttribute("aria-label"), s.className = `mint-checkbox-wrapper ${this.getCheckboxClasses()}`, s.style.pointerEvents = "none", this._checkbox.style.pointerEvents = "auto";
1698
1701
  let c = s.querySelector("mint-icon");
1699
1702
  c || (c = document.createElement("mint-icon"), c.setAttribute("name", "check"), c.className = "w-3.5 h-3.5 text-white pointer-events-none absolute inset-0 m-auto", c.style.transition = "opacity 200ms ease-out, transform 200ms ease-out", c.style.zIndex = "1", s.appendChild(c)), this.updateVisualState();
1700
- let o = this.querySelector(".mint-checkbox-label-container");
1703
+ let l = this.querySelector(".mint-checkbox-label-container");
1701
1704
  if (e || t) {
1702
- o || (o = document.createElement("div"), o.className = "mint-checkbox-label-container flex flex-col gap-0.5 flex-1", this.appendChild(o));
1703
- let l = o.querySelector(".mint-checkbox-label");
1704
- e ? (l || (l = document.createElement("span"), l.className = "mint-checkbox-label text-sm font-medium text-gray-900 dark:text-gray-100 cursor-pointer select-none", o.insertBefore(l, o.firstChild)), l.textContent = e, i ? l.classList.add("opacity-40") : l.classList.remove("opacity-40")) : l && l.remove();
1705
- let d = o.querySelector(".mint-checkbox-info");
1706
- if (t ? (d || (d = document.createElement("span"), d.className = "mint-checkbox-info text-xs text-gray-500 dark:text-gray-400 cursor-pointer select-none", o.appendChild(d)), d.textContent = t, i ? d.classList.add("opacity-40") : d.classList.remove("opacity-40")) : d && d.remove(), i)
1707
- o.style.cursor = "default", o._clickHandler && (o.removeEventListener("click", o._clickHandler), o._clickHandler = null);
1705
+ l || (l = document.createElement("div"), l.className = "mint-checkbox-label-container flex flex-col gap-0.5 flex-1", this.appendChild(l));
1706
+ let o = l.querySelector(".mint-checkbox-label");
1707
+ e ? (o || (o = document.createElement("span"), o.className = "mint-checkbox-label text-sm font-medium text-gray-900 dark:text-gray-100 cursor-pointer select-none", l.insertBefore(o, l.firstChild)), o.textContent = e, i ? o.classList.add("opacity-40") : o.classList.remove("opacity-40")) : o && o.remove();
1708
+ let d = l.querySelector(".mint-checkbox-info");
1709
+ if (t ? (d || (d = document.createElement("span"), d.className = "mint-checkbox-info text-xs text-gray-500 dark:text-gray-400 cursor-pointer select-none", l.appendChild(d)), d.textContent = t, i ? d.classList.add("opacity-40") : d.classList.remove("opacity-40")) : d && d.remove(), i)
1710
+ l.style.cursor = "default", l._clickHandler && (l.removeEventListener("click", l._clickHandler), l._clickHandler = null);
1708
1711
  else {
1709
- o.style.cursor = "pointer";
1710
- const h = o._clickHandler;
1711
- h && o.removeEventListener("click", h), o._clickHandler = (u) => {
1712
+ l.style.cursor = "pointer";
1713
+ const h = l._clickHandler;
1714
+ h && l.removeEventListener("click", h), l._clickHandler = (u) => {
1712
1715
  this._checkbox && (u.target === this._checkbox || this._checkbox.contains(u.target) || u.composedPath().includes(this._checkbox)) || this.toggle();
1713
- }, o.addEventListener("click", o._clickHandler);
1716
+ }, l.addEventListener("click", l._clickHandler);
1714
1717
  }
1715
- } else o && o.remove();
1718
+ } else l && l.remove();
1716
1719
  }
1717
1720
  setupEventListeners() {
1718
1721
  this.removeEventListeners(), this._checkbox && (this._changeHandler = (e) => {
@@ -1864,28 +1867,28 @@ class Z extends HTMLElement {
1864
1867
  a ? this._radio.value = a : this._radio.removeAttribute("value"), e ? this._radio.setAttribute("aria-label", e) : this._radio.removeAttribute("aria-label"), s.className = `mint-choice-wrapper ${this.getChoiceClasses()}`, s.style.pointerEvents = "none", this._radio.style.pointerEvents = "auto";
1865
1868
  let c = s.querySelector(".mint-choice-indicator");
1866
1869
  c || (c = document.createElement("div"), c.className = "mint-choice-indicator w-2.5 h-2.5 rounded-full bg-white pointer-events-none absolute inset-0 m-auto", c.style.transition = "opacity 200ms ease-out, transform 200ms ease-out", c.style.zIndex = "1", s.appendChild(c)), c.style.opacity = this._checked ? "1" : "0", c.style.transform = this._checked ? "scale(1)" : "scale(0.8)", this.updateVisualState();
1867
- let o = this.querySelector(".mint-choice-label-container");
1870
+ let l = this.querySelector(".mint-choice-label-container");
1868
1871
  if (e || t) {
1869
- o || (o = document.createElement("div"), o.className = "mint-choice-label-container flex flex-col gap-0.5 flex-1", this.appendChild(o));
1870
- let l = o.querySelector(".mint-choice-label");
1871
- e ? (l || (l = document.createElement("span"), l.className = "mint-choice-label text-sm font-medium text-gray-900 dark:text-gray-100 cursor-pointer select-none", o.insertBefore(l, o.firstChild)), l.textContent = e, i ? l.classList.add("opacity-40") : l.classList.remove("opacity-40")) : l && l.remove();
1872
- let d = o.querySelector(".mint-choice-info");
1873
- if (t ? (d || (d = document.createElement("span"), d.className = "mint-choice-info text-xs text-gray-500 dark:text-gray-400 cursor-pointer select-none", o.appendChild(d)), d.textContent = t, i ? d.classList.add("opacity-40") : d.classList.remove("opacity-40")) : d && d.remove(), i)
1874
- o.style.cursor = "default", o._clickHandler && (o.removeEventListener("click", o._clickHandler), o._clickHandler = null);
1872
+ l || (l = document.createElement("div"), l.className = "mint-choice-label-container flex flex-col gap-0.5 flex-1", this.appendChild(l));
1873
+ let o = l.querySelector(".mint-choice-label");
1874
+ e ? (o || (o = document.createElement("span"), o.className = "mint-choice-label text-sm font-medium text-gray-900 dark:text-gray-100 cursor-pointer select-none", l.insertBefore(o, l.firstChild)), o.textContent = e, i ? o.classList.add("opacity-40") : o.classList.remove("opacity-40")) : o && o.remove();
1875
+ let d = l.querySelector(".mint-choice-info");
1876
+ if (t ? (d || (d = document.createElement("span"), d.className = "mint-choice-info text-xs text-gray-500 dark:text-gray-400 cursor-pointer select-none", l.appendChild(d)), d.textContent = t, i ? d.classList.add("opacity-40") : d.classList.remove("opacity-40")) : d && d.remove(), i)
1877
+ l.style.cursor = "default", l._clickHandler && (l.removeEventListener("click", l._clickHandler), l._clickHandler = null);
1875
1878
  else {
1876
- o.style.cursor = "pointer";
1877
- const h = o._clickHandler;
1878
- h && o.removeEventListener("click", h), o._clickHandler = (u) => {
1879
+ l.style.cursor = "pointer";
1880
+ const h = l._clickHandler;
1881
+ h && l.removeEventListener("click", h), l._clickHandler = (u) => {
1879
1882
  this._radio && (u.target === this._radio || this._radio.contains(u.target) || u.composedPath().includes(this._radio)) || this.select();
1880
- }, o.addEventListener("click", o._clickHandler);
1883
+ }, l.addEventListener("click", l._clickHandler);
1881
1884
  }
1882
- } else o && o.remove();
1885
+ } else l && l.remove();
1883
1886
  }
1884
1887
  setupEventListeners() {
1885
1888
  this.removeEventListeners(), this._radio && (this._changeHandler = (e) => {
1886
1889
  e.stopPropagation();
1887
1890
  const t = this._checked;
1888
- if (this._checked = this._radio.checked, this._checked ? this.hasAttribute("checked") || this.setAttribute("checked", "") : this.hasAttribute("checked") && this.removeAttribute("checked"), this.updateVisualState(), this._checked) {
1891
+ if (this._checked = this._radio.checked, this._checked ? this.hasAttribute("checked") || this.setAttribute("checked", "") : this.hasAttribute("checked") && this.removeAttribute("checked"), this.updateVisualState(), this._checked && this._radio) {
1889
1892
  const i = this._radio.name;
1890
1893
  i && document.querySelectorAll(`input[type="radio"][name="${i}"]`).forEach((r) => {
1891
1894
  if (r !== this._radio) {
@@ -2098,9 +2101,9 @@ class Q extends HTMLElement {
2098
2101
  return [...n, ...a, ...c].filter(Boolean).join(" ");
2099
2102
  }
2100
2103
  render() {
2101
- var v, E, S, y;
2104
+ var v, x, S, y;
2102
2105
  this.getType();
2103
- const e = this._getNormalizedType(), t = this._isTextarea(), i = this._isMoney(), s = this._isColor(), r = this.getPlaceholder(), n = this.isDisabled(), a = this.isReadonly(), c = this.isRequired(), o = this.getId(), l = this.getName(), d = this.getAttribute("value") || (s ? "#000000" : ""), h = this.getRows(), u = this.getIcon(), b = this.getLabel(), f = this.getInfo();
2106
+ const e = this._getNormalizedType(), t = this._isTextarea(), i = this._isMoney(), s = this._isColor(), r = this.getPlaceholder(), n = this.isDisabled(), a = this.isReadonly(), c = this.isRequired(), l = this.getId(), o = this.getName(), d = this.getAttribute("value") || (s ? "#000000" : ""), h = this.getRows(), u = this.getIcon(), b = this.getLabel(), f = this.getInfo();
2104
2107
  if (s) {
2105
2108
  this._input && (this._input.remove(), this._input = null), this._textarea && (this._textarea.remove(), this._textarea = null), this._wrapper || (this._wrapper = document.createElement("div"), this._wrapper.className = "relative w-full", this.appendChild(this._wrapper)), this._colorContainer && (this._colorContainer.remove(), this._colorContainer = null), this._colorPickerWrapper && !s && (this._colorPickerWrapper.remove(), this._colorPickerWrapper = null), this._colorPickerWrapper || (this._colorPickerWrapper = document.createElement("div"), this._colorPickerWrapper.className = "mint-color-picker-wrapper absolute left-[.65rem] top-1/2 -translate-y-1/2 w-6 h-6 rounded cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-gray-400 dark:focus-visible:ring-gray-500", this._colorPickerWrapper.style.backgroundColor = d || "#000000", this._wrapper.appendChild(this._colorPickerWrapper), this._colorPicker = document.createElement("input"), this._colorPicker.type = "color", this._colorPicker.className = "absolute inset-0 w-full h-full opacity-0 cursor-pointer", this._colorPicker.style.cssText = "position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 10; pointer-events: auto; margin: 0; padding: 0; border: none;", this._colorPickerWrapper.appendChild(this._colorPicker), this._focusHandler = (p) => {
2106
2109
  this._colorPickerWrapper && this._colorPicker && this._colorPicker.matches(":focus-visible") && requestAnimationFrame(() => {
@@ -2134,10 +2137,10 @@ class Q extends HTMLElement {
2134
2137
  cancelable: !0
2135
2138
  })));
2136
2139
  }), this._colorTextInput.addEventListener("blur", () => {
2137
- var k, x;
2140
+ var k, E;
2138
2141
  const p = ((k = this._colorTextInput) == null ? void 0 : k.value) || "";
2139
2142
  /^#[0-9A-Fa-f]{6}$/.test(p) ? (this._colorPicker && (this._colorPicker.value = p), this.setAttribute("value", p)) : this._colorPicker && this._colorTextInput && (this._colorTextInput.value = this._colorPicker.value), this.dispatchEvent(new CustomEvent("change", {
2140
- detail: { value: ((x = this._colorPicker) == null ? void 0 : x.value) || "#000000" },
2143
+ detail: { value: ((E = this._colorPicker) == null ? void 0 : E.value) || "#000000" },
2141
2144
  bubbles: !0,
2142
2145
  cancelable: !0
2143
2146
  }));
@@ -2145,7 +2148,7 @@ class Q extends HTMLElement {
2145
2148
  const g = d || "#000000";
2146
2149
  if (this._colorPicker && this._colorPicker.value !== g && (this._colorPicker.value = g), this._colorPickerWrapper && (this._colorPickerWrapper.style.backgroundColor = g), this._colorTextInput && this._colorTextInput.value !== g && (this._colorTextInput.value = g), this._colorPicker && (this._colorPicker.disabled = n), this._colorPickerWrapper && (n ? (this._colorPickerWrapper.classList.add("opacity-40", "cursor-not-allowed"), this._colorPickerWrapper.classList.remove("cursor-pointer")) : (this._colorPickerWrapper.classList.remove("opacity-40", "cursor-not-allowed"), this._colorPickerWrapper.classList.add("cursor-pointer"))), this._colorTextInput && (this._colorTextInput.disabled = n, this._colorTextInput.readOnly = a, this._colorTextInput.required = c), this._colorTextInput) {
2147
2150
  const p = this._colorTextInput;
2148
- o ? p.id = o : p.removeAttribute("id"), l ? p.name = l : p.removeAttribute("name"), p.setAttribute("aria-invalid", this.hasError() ? "true" : "false"), this._element = p;
2151
+ l ? p.id = l : p.removeAttribute("id"), o ? p.name = o : p.removeAttribute("name"), p.setAttribute("aria-invalid", this.hasError() ? "true" : "false"), this._element = p;
2149
2152
  }
2150
2153
  this._renderErrorState();
2151
2154
  return;
@@ -2158,14 +2161,14 @@ class Q extends HTMLElement {
2158
2161
  const p = document.createElement("mint-icon");
2159
2162
  p.setAttribute("name", "caret-down"), p.className = "w-[1rem] h-[1rem]", this._numberDecrementButton.appendChild(p), this._numberSpinnerContainer.appendChild(this._numberDecrementButton), this._numberIncrementButton.addEventListener("click", (k) => {
2160
2163
  if (k.preventDefault(), k.stopPropagation(), this._input && !this._input.disabled && !this._input.readOnly) {
2161
- const x = parseFloat(this._input.value) || 0, I = parseFloat(this._input.step) || 1, C = this._input.min ? parseFloat(this._input.min) : void 0, w = this._input.max ? parseFloat(this._input.max) : void 0;
2162
- let L = x + I;
2164
+ const E = parseFloat(this._input.value) || 0, I = parseFloat(this._input.step) || 1, C = this._input.min ? parseFloat(this._input.min) : void 0, w = this._input.max ? parseFloat(this._input.max) : void 0;
2165
+ let L = E + I;
2163
2166
  w !== void 0 && L > w && (L = w), C !== void 0 && L < C && (L = C), this._input.value = L.toString(), this.setAttribute("value", L.toString()), this._input.dispatchEvent(new Event("input", { bubbles: !0 })), this._input.dispatchEvent(new Event("change", { bubbles: !0 }));
2164
2167
  }
2165
2168
  }), this._numberDecrementButton.addEventListener("click", (k) => {
2166
2169
  if (k.preventDefault(), k.stopPropagation(), this._input && !this._input.disabled && !this._input.readOnly) {
2167
- const x = parseFloat(this._input.value) || 0, I = parseFloat(this._input.step) || 1, C = this._input.min ? parseFloat(this._input.min) : void 0, w = this._input.max ? parseFloat(this._input.max) : void 0;
2168
- let L = x - I;
2170
+ const E = parseFloat(this._input.value) || 0, I = parseFloat(this._input.step) || 1, C = this._input.min ? parseFloat(this._input.min) : void 0, w = this._input.max ? parseFloat(this._input.max) : void 0;
2171
+ let L = E - I;
2169
2172
  C !== void 0 && L < C && (L = C), w !== void 0 && L > w && (L = w), this._input.value = L.toString(), this.setAttribute("value", L.toString()), this._input.dispatchEvent(new Event("input", { bubbles: !0 })), this._input.dispatchEvent(new Event("change", { bubbles: !0 }));
2170
2173
  }
2171
2174
  });
@@ -2173,11 +2176,11 @@ class Q extends HTMLElement {
2173
2176
  this._numberIncrementButton && (this._numberIncrementButton.disabled = n || a), this._numberDecrementButton && (this._numberDecrementButton.disabled = n || a);
2174
2177
  } else this._numberSpinnerContainer && (this._numberSpinnerContainer.remove(), this._numberSpinnerContainer = null, this._numberIncrementButton = null, this._numberDecrementButton = null);
2175
2178
  if (t) {
2176
- if (this._input && (this._input.remove(), this._input = null), this._textarea || (this._textarea = document.createElement("textarea"), this._wrapper.appendChild(this._textarea), this.setupEventListeners()), this._element = this._textarea, this._textarea.placeholder = r, this._textarea.disabled = n, this._textarea.readOnly = a, this._textarea.required = c, this._textarea.rows = h, this._textarea.setAttribute("aria-invalid", this.hasError() ? "true" : "false"), d !== this._textarea.value && (this._textarea.value = d), o ? this._textarea.id = o : this._textarea.removeAttribute("id"), l ? this._textarea.name = l : this._textarea.removeAttribute("name"), this._textarea.className = this.getInputClasses(), this.firstChild && this.firstChild !== this._wrapper && this.firstChild.nodeType === Node.TEXT_NODE) {
2179
+ if (this._input && (this._input.remove(), this._input = null), this._textarea || (this._textarea = document.createElement("textarea"), this._wrapper.appendChild(this._textarea), this.setupEventListeners()), this._element = this._textarea, this._textarea.placeholder = r, this._textarea.disabled = n, this._textarea.readOnly = a, this._textarea.required = c, this._textarea.rows = h, this._textarea.setAttribute("aria-invalid", this.hasError() ? "true" : "false"), d !== this._textarea.value && (this._textarea.value = d), l ? this._textarea.id = l : this._textarea.removeAttribute("id"), o ? this._textarea.name = o : this._textarea.removeAttribute("name"), this._textarea.className = this.getInputClasses(), this.firstChild && this.firstChild !== this._wrapper && this.firstChild.nodeType === Node.TEXT_NODE) {
2177
2180
  const g = this.firstChild.textContent;
2178
2181
  g && !this._textarea.value && (this._textarea.value = g.trim()), this.removeChild(this.firstChild);
2179
2182
  }
2180
- } else if (this._textarea && (this._textarea.remove(), this._textarea = null), this._input || (this._input = document.createElement("input"), this._wrapper.appendChild(this._input), this.setupEventListeners()), this._element = this._input, this._input.type = e, this._input.placeholder = r, this._input.disabled = n, this._input.readOnly = a, this._input.required = c, this._input.setAttribute("aria-invalid", this.hasError() ? "true" : "false"), i ? (this._input.inputMode = "decimal", this._input.pattern = "[0-9]*\\.?[0-9]*") : (this._input.removeAttribute("inputmode"), this._input.removeAttribute("pattern")), d !== this._input.value && (this._input.value = d), o ? this._input.id = o : this._input.removeAttribute("id"), l ? this._input.name = l : this._input.removeAttribute("name"), this._input.className = this.getInputClasses(), this.firstChild && this.firstChild !== this._wrapper && this.firstChild.nodeType === Node.TEXT_NODE) {
2183
+ } else if (this._textarea && (this._textarea.remove(), this._textarea = null), this._input || (this._input = document.createElement("input"), this._wrapper.appendChild(this._input), this.setupEventListeners()), this._element = this._input, this._input.type = e, this._input.placeholder = r, this._input.disabled = n, this._input.readOnly = a, this._input.required = c, this._input.setAttribute("aria-invalid", this.hasError() ? "true" : "false"), i ? (this._input.inputMode = "decimal", this._input.pattern = "[0-9]*\\.?[0-9]*") : (this._input.removeAttribute("inputmode"), this._input.removeAttribute("pattern")), d !== this._input.value && (this._input.value = d), l ? this._input.id = l : this._input.removeAttribute("id"), o ? this._input.name = o : this._input.removeAttribute("name"), this._input.className = this.getInputClasses(), this.firstChild && this.firstChild !== this._wrapper && this.firstChild.nodeType === Node.TEXT_NODE) {
2181
2184
  const g = this.firstChild.textContent;
2182
2185
  g && !this._input.value && (this._input.value = g.trim()), this.removeChild(this.firstChild);
2183
2186
  }
@@ -2187,12 +2190,12 @@ class Q extends HTMLElement {
2187
2190
  let g = m.querySelector(".mint-input-label");
2188
2191
  if (b) {
2189
2192
  g || (g = document.createElement("label"), g.className = "mint-input-label text-sm font-medium text-gray-900 dark:text-gray-100 select-none", m.insertBefore(g, m.firstChild)), g.textContent = b;
2190
- const k = o || ((v = this._element) == null ? void 0 : v.id) || ((E = this._colorTextInput) == null ? void 0 : E.id) || ((S = this._input) == null ? void 0 : S.id) || ((y = this._textarea) == null ? void 0 : y.id);
2193
+ const k = l || ((v = this._element) == null ? void 0 : v.id) || ((x = this._colorTextInput) == null ? void 0 : x.id) || ((S = this._input) == null ? void 0 : S.id) || ((y = this._textarea) == null ? void 0 : y.id);
2191
2194
  if (k)
2192
2195
  g.setAttribute("for", k);
2193
2196
  else {
2194
- const x = `mint-input-${Math.random().toString(36).substr(2, 9)}`;
2195
- this._element ? this._element.id = x : this._colorTextInput ? this._colorTextInput.id = x : this._input ? this._input.id = x : this._textarea && (this._textarea.id = x), g.setAttribute("for", x);
2197
+ const E = `mint-input-${Math.random().toString(36).substr(2, 9)}`;
2198
+ this._element ? this._element.id = E : this._colorTextInput ? this._colorTextInput.id = E : this._input ? this._input.id = E : this._textarea && (this._textarea.id = E), g.setAttribute("for", E);
2196
2199
  }
2197
2200
  n ? g.classList.add("opacity-40") : g.classList.remove("opacity-40");
2198
2201
  } else g && g.remove();
@@ -2406,8 +2409,8 @@ class ee extends HTMLElement {
2406
2409
  if (c.type === "sep")
2407
2410
  n += c.value.length;
2408
2411
  else {
2409
- const o = r.substr(n, c.len);
2410
- t[a] && (t[a].value = o), a++, n += c.len;
2412
+ const l = r.substr(n, c.len);
2413
+ t[a] && (t[a].value = l), a++, n += c.len;
2411
2414
  }
2412
2415
  });
2413
2416
  }
@@ -2440,10 +2443,10 @@ class ee extends HTMLElement {
2440
2443
  }), s.addEventListener("keydown", (a) => {
2441
2444
  a.key === "Backspace" && s.selectionStart === 0 && s.selectionEnd === 0 && this._focusPrev(e, r), a.key === "ArrowLeft" && s.selectionStart === 0 && s.selectionEnd === 0 && (this._focusPrev(e, r), a.preventDefault()), a.key === "ArrowRight" && s.selectionStart === s.value.length && s.selectionEnd === s.value.length && (this._focusNext(e, r), a.preventDefault());
2442
2445
  }), s.addEventListener("blur", (a) => {
2443
- var o;
2446
+ var l;
2444
2447
  this._syncHiddenInput();
2445
2448
  const c = a.relatedTarget;
2446
- c && i.contains(c) || (this._handleBlur(((o = this._hiddenInput) == null ? void 0 : o.value) || ""), this._exitInputMode());
2449
+ c && i.contains(c) || (this._handleBlur(((l = this._hiddenInput) == null ? void 0 : l.value) || ""), this._exitInputMode());
2447
2450
  });
2448
2451
  });
2449
2452
  }
@@ -2456,8 +2459,8 @@ class ee extends HTMLElement {
2456
2459
  if (this._isRange) {
2457
2460
  const [s, r] = this._splitRangeInput(e, t), n = s ? this._parseDateString(s, t) : null, a = r ? this._parseDateString(r, t) : null;
2458
2461
  if (n && a) {
2459
- const [c, o] = n <= a ? [n, a] : [a, n];
2460
- this._selectedStartDate = c, this._selectedEndDate = o, this._currentMonth = c.getMonth(), this._currentYear = c.getFullYear();
2462
+ const [c, l] = n <= a ? [n, a] : [a, n];
2463
+ this._selectedStartDate = c, this._selectedEndDate = l, this._currentMonth = c.getMonth(), this._currentYear = c.getFullYear();
2461
2464
  } else n && (this._selectedStartDate = n, this._selectedEndDate = null, this._currentMonth = n.getMonth(), this._currentYear = n.getFullYear());
2462
2465
  this._applyDateToParts(this._selectedStartDate, this._startPartInputs, i, t), this._applyDateToParts(this._selectedEndDate, this._endPartInputs, i, t);
2463
2466
  } else {
@@ -2471,36 +2474,36 @@ class ee extends HTMLElement {
2471
2474
  if (i.test(e)) {
2472
2475
  const _ = e.split(i).filter((v) => v.length > 0), m = t.split(/[\/\-\.\s]+/).filter((v) => v.length > 0);
2473
2476
  if (_.length === m.length) {
2474
- let v = 0, E = 0, S = 0;
2477
+ let v = 0, x = 0, S = 0;
2475
2478
  for (let y = 0; y < m.length; y++) {
2476
2479
  const g = m[y].toLowerCase(), p = _[y];
2477
2480
  if (g.includes("d"))
2478
2481
  v = parseInt(p, 10);
2479
2482
  else if (g.includes("m"))
2480
- E = parseInt(p, 10) - 1;
2483
+ x = parseInt(p, 10) - 1;
2481
2484
  else if (g.includes("y")) {
2482
2485
  let k = parseInt(p, 10);
2483
- const x = g.length, I = p.length;
2484
- I === 2 && x === 4 ? k = Math.floor((/* @__PURE__ */ new Date()).getFullYear() / 100) * 100 + k : I === 2 && x === 2 && (k = Math.floor((/* @__PURE__ */ new Date()).getFullYear() / 100) * 100 + k), S = k;
2486
+ const E = g.length, I = p.length;
2487
+ I === 2 && E === 4 ? k = Math.floor((/* @__PURE__ */ new Date()).getFullYear() / 100) * 100 + k : I === 2 && E === 2 && (k = Math.floor((/* @__PURE__ */ new Date()).getFullYear() / 100) * 100 + k), S = k;
2485
2488
  }
2486
2489
  }
2487
- if (v && E >= 0 && E <= 11 && S) {
2488
- const y = new Date(S, E, v);
2489
- if (!isNaN(y.getTime()) && y.getDate() === v && y.getMonth() === E && y.getFullYear() === S)
2490
+ if (v && x >= 0 && x <= 11 && S) {
2491
+ const y = new Date(S, x, v);
2492
+ if (!isNaN(y.getTime()) && y.getDate() === v && y.getMonth() === x && y.getFullYear() === S)
2490
2493
  return y;
2491
2494
  }
2492
2495
  }
2493
2496
  }
2494
2497
  const r = e.replace(/[\/\-\.]/g, ""), n = t.replace(/[\/\-\.]/g, "").toLowerCase();
2495
- let a = n.indexOf("d"), c = n.indexOf("m"), o = n.indexOf("y");
2496
- const l = [
2498
+ let a = n.indexOf("d"), c = n.indexOf("m"), l = n.indexOf("y");
2499
+ const o = [
2497
2500
  { char: "d", index: a },
2498
2501
  { char: "m", index: c },
2499
- { char: "y", index: o }
2502
+ { char: "y", index: l }
2500
2503
  ].sort((_, m) => _.index - m.index);
2501
2504
  let d = 0, h = 0, u = 0, b = 0;
2502
2505
  n.length, r.length;
2503
- for (const _ of l)
2506
+ for (const _ of o)
2504
2507
  if (_.char === "d") {
2505
2508
  const m = n.lastIndexOf("d") - n.indexOf("d") + 1, v = r.substr(b, m);
2506
2509
  if (v.length === 0) return null;
@@ -2510,10 +2513,10 @@ class ee extends HTMLElement {
2510
2513
  if (v.length === 0) return null;
2511
2514
  h = parseInt(v, 10) - 1, b += v.length;
2512
2515
  } else if (_.char === "y") {
2513
- const m = n.lastIndexOf("y") - n.indexOf("y") + 1, v = r.substr(b), E = Math.min(m, v.length), S = v.substr(0, E);
2516
+ const m = n.lastIndexOf("y") - n.indexOf("y") + 1, v = r.substr(b), x = Math.min(m, v.length), S = v.substr(0, x);
2514
2517
  if (S.length === 0) return null;
2515
2518
  let y = parseInt(S, 10);
2516
- E === 2 && m === 4 ? y = Math.floor((/* @__PURE__ */ new Date()).getFullYear() / 100) * 100 + y : E === 2 && m === 2 && (y = Math.floor((/* @__PURE__ */ new Date()).getFullYear() / 100) * 100 + y), u = y, b += E;
2519
+ x === 2 && m === 4 ? y = Math.floor((/* @__PURE__ */ new Date()).getFullYear() / 100) * 100 + y : x === 2 && m === 2 && (y = Math.floor((/* @__PURE__ */ new Date()).getFullYear() / 100) * 100 + y), u = y, b += x;
2517
2520
  }
2518
2521
  if (!d || h < 0 || h > 11 || !u) return null;
2519
2522
  const f = new Date(u, h, d);
@@ -2526,7 +2529,7 @@ class ee extends HTMLElement {
2526
2529
  }
2527
2530
  // PHP-style formatter for display mode
2528
2531
  _formatDatePhp(e, t) {
2529
- const i = e.getDate(), s = e.getMonth() + 1, r = e.getFullYear(), n = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], a = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], c = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], o = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], l = (u, b = 2) => u.toString().padStart(b, "0"), d = (u) => {
2532
+ const i = e.getDate(), s = e.getMonth() + 1, r = e.getFullYear(), n = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], a = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], c = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], l = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], o = (u, b = 2) => u.toString().padStart(b, "0"), d = (u) => {
2530
2533
  const b = u % 10, f = u % 100;
2531
2534
  return b === 1 && f !== 11 ? "st" : b === 2 && f !== 12 ? "nd" : b === 3 && f !== 13 ? "rd" : "th";
2532
2535
  };
@@ -2545,19 +2548,19 @@ class ee extends HTMLElement {
2545
2548
  h += r.toString().slice(-2);
2546
2549
  break;
2547
2550
  case "m":
2548
- h += l(s);
2551
+ h += o(s);
2549
2552
  break;
2550
2553
  case "n":
2551
2554
  h += s.toString();
2552
2555
  break;
2553
2556
  case "M":
2554
- h += o[s - 1];
2557
+ h += l[s - 1];
2555
2558
  break;
2556
2559
  case "F":
2557
2560
  h += c[s - 1];
2558
2561
  break;
2559
2562
  case "d":
2560
- h += l(i);
2563
+ h += o(i);
2561
2564
  break;
2562
2565
  case "j":
2563
2566
  h += i.toString();
@@ -2583,7 +2586,7 @@ class ee extends HTMLElement {
2583
2586
  return i !== null && !isNaN(i.getTime());
2584
2587
  }
2585
2588
  render() {
2586
- const e = this.getLabel(), t = this.getInfo(), i = this.getValue(), s = this.isDisabled(), r = this.isReadonly(), n = this.isRequired(), a = this.getId(), c = this.getName(), o = this.getFormat(), l = this.hasError(), d = this.getErrorMessage();
2589
+ const e = this.getLabel(), t = this.getInfo(), i = this.getValue(), s = this.isDisabled(), r = this.isReadonly(), n = this.isRequired(), a = this.getId(), c = this.getName(), l = this.getFormat(), o = this.hasError(), d = this.getErrorMessage();
2587
2590
  this._isRange = this.isRange(), this._input || (this._input = document.createElement("div"), this._input.className = "relative w-full", this.appendChild(this._input));
2588
2591
  let h = this.querySelector(".mint-date-picker-label-container");
2589
2592
  if (e || t) {
@@ -2593,23 +2596,23 @@ class ee extends HTMLElement {
2593
2596
  let v = h.querySelector(".mint-date-picker-info");
2594
2597
  t ? (v || (v = document.createElement("span"), v.className = "mint-date-picker-info text-xs text-gray-500 dark:text-gray-400 select-none", h.appendChild(v)), v.textContent = t) : v && v.remove();
2595
2598
  } else h && h.remove();
2596
- this._hiddenInput || (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.value = i || "", this._textInput = this._hiddenInput, this._input.appendChild(this._hiddenInput)), a && (this._hiddenInput.id = a), c && (this._hiddenInput.name = c), this._hiddenInput.value = i || "", this._hiddenInput.setAttribute("aria-invalid", l ? "true" : "false");
2599
+ this._hiddenInput || (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.value = i || "", this._textInput = this._hiddenInput, this._input.appendChild(this._hiddenInput)), a && (this._hiddenInput.id = a), c && (this._hiddenInput.name = c), this._hiddenInput.value = i || "", this._hiddenInput.setAttribute("aria-invalid", o ? "true" : "false");
2597
2600
  let u = this._input.querySelector(".mint-date-fields");
2598
- u || (u = document.createElement("div"), this._input.appendChild(u)), this._fieldsContainer = u, this._applyErrorVisuals(l, d, s), u.innerHTML = "", this._displayEl = document.createElement("div"), this._displayEl.className = "flex-1 text-gray-900 dark:text-white cursor-text select-none focus:outline-none", this._displayEl.tabIndex = s ? -1 : 0, this._displayEl.addEventListener("click", () => {
2601
+ u || (u = document.createElement("div"), this._input.appendChild(u)), this._fieldsContainer = u, this._applyErrorVisuals(o, d, s), u.innerHTML = "", this._displayEl = document.createElement("div"), this._displayEl.className = "flex-1 text-gray-900 dark:text-white cursor-text select-none focus:outline-none", this._displayEl.tabIndex = s ? -1 : 0, this._displayEl.addEventListener("click", () => {
2599
2602
  s || r || this._enterInputMode();
2600
2603
  }), this._displayEl.addEventListener("keydown", (m) => {
2601
2604
  s || r || (m.key === "Enter" || m.key === " ") && (m.preventDefault(), this._enterInputMode());
2602
2605
  }), this._inputsWrapperEl = document.createElement("div"), this._inputsWrapperEl.className = "flex items-center gap-1 w-full";
2603
- const b = this._getFormatTokens(o);
2606
+ const b = this._getFormatTokens(l);
2604
2607
  this._startPartInputs = [], this._endPartInputs = [];
2605
2608
  const f = (m) => {
2606
2609
  const v = document.createDocumentFragment();
2607
- return b.forEach((E) => {
2608
- if (E.type === "sep") {
2610
+ return b.forEach((x) => {
2611
+ if (x.type === "sep") {
2609
2612
  const S = document.createElement("span");
2610
- S.textContent = E.value, S.className = "text-gray-400 dark:text-gray-500 select-none", v.appendChild(S);
2613
+ S.textContent = x.value, S.className = "text-gray-400 dark:text-gray-500 select-none", v.appendChild(S);
2611
2614
  } else {
2612
- const S = E.part === "d" ? "dd" : E.part === "m" ? "mm" : E.len === 2 ? "yy" : "yyyy", y = this._createPartInput(E.len, S, s, r, n);
2615
+ const S = x.part === "d" ? "dd" : x.part === "m" ? "mm" : x.len === 2 ? "yy" : "yyyy", y = this._createPartInput(x.len, S, s, r, n);
2613
2616
  m === "start" ? this._startPartInputs.push(y) : this._endPartInputs.push(y), v.appendChild(y);
2614
2617
  }
2615
2618
  }), v;
@@ -2632,7 +2635,7 @@ class ee extends HTMLElement {
2632
2635
  s || r || this._enterInputMode();
2633
2636
  }), this._input.prepend(this._iconButton), this._iconButton.disabled = s || r;
2634
2637
  }
2635
- this._renderErrorState(l, d);
2638
+ this._renderErrorState(o, d);
2636
2639
  }
2637
2640
  _renderErrorState(e, t) {
2638
2641
  let i = this.querySelector(".mint-date-picker-error");
@@ -2680,7 +2683,7 @@ class ee extends HTMLElement {
2680
2683
  if (this._isRange) {
2681
2684
  const [i, s] = this._splitRangeInput(e, t), r = i ? this._parseDateString(i, t) : null, n = s ? this._parseDateString(s, t) : null;
2682
2685
  if (r && n) {
2683
- const [a, c] = r <= n ? [r, n] : [n, r], o = this._formatDate(a, t), l = this._formatDate(c, t), d = `${o} - ${l}`;
2686
+ const [a, c] = r <= n ? [r, n] : [n, r], l = this._formatDate(a, t), o = this._formatDate(c, t), d = `${l} - ${o}`;
2684
2687
  this.setValue(d), this._applyDateToParts(a, this._startPartInputs, this._getFormatTokens(t), t), this._applyDateToParts(c, this._endPartInputs, this._getFormatTokens(t), t), this._selectedStartDate = a, this._selectedEndDate = c, this._currentMonth = a.getMonth(), this._currentYear = a.getFullYear();
2685
2688
  } else if (r) {
2686
2689
  const a = this._formatDate(r, t);
@@ -2782,14 +2785,14 @@ class ee extends HTMLElement {
2782
2785
  a.className = "flex flex-col md:flex-row md:gap-6 md:items-start";
2783
2786
  const c = document.createElement("div");
2784
2787
  c.className = "flex-1 min-w-0";
2785
- const o = document.createElement("div");
2786
- o.className = "flex items-center justify-between mb-4";
2787
- const l = document.createElement("button");
2788
- l.type = "button", l.tabIndex = 0, l.className = "p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-600 dark:text-gray-300 transition-colors flex items-center focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-gray-400 dark:focus-visible:ring-gray-500", l.setAttribute("data-keep-popover-open", "true");
2788
+ const l = document.createElement("div");
2789
+ l.className = "flex items-center justify-between mb-4";
2790
+ const o = document.createElement("button");
2791
+ o.type = "button", o.tabIndex = 0, o.className = "p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-600 dark:text-gray-300 transition-colors flex items-center focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-gray-400 dark:focus-visible:ring-gray-500", o.setAttribute("data-keep-popover-open", "true");
2789
2792
  const d = document.createElement("mint-icon");
2790
- d.setAttribute("name", "caret-left"), d.className = "w-4 h-4", l.appendChild(d), l.addEventListener("click", () => {
2793
+ d.setAttribute("name", "caret-left"), d.className = "w-4 h-4", o.appendChild(d), o.addEventListener("click", () => {
2791
2794
  this._currentMonth === 0 ? (this._currentMonth = 11, this._currentYear--) : this._currentMonth--, this._buildCalendar();
2792
- }), o.appendChild(l);
2795
+ }), l.appendChild(o);
2793
2796
  const h = document.createElement("div");
2794
2797
  h.className = "flex items-center gap-2";
2795
2798
  const u = document.createElement("button");
@@ -2799,13 +2802,13 @@ class ee extends HTMLElement {
2799
2802
  const b = document.createElement("button");
2800
2803
  b.type = "button", b.tabIndex = 0, b.className = "text-sm font-medium text-gray-900 dark:text-gray-100 hover:text-gray-600 dark:hover:text-gray-300 transition-colors flex items-center focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-gray-400 dark:focus-visible:ring-gray-500", b.setAttribute("data-keep-popover-open", "true"), b.textContent = String(this._currentYear), b.addEventListener("click", () => {
2801
2804
  this._viewMode = "year", this._buildCalendar();
2802
- }), h.appendChild(b), o.appendChild(h);
2805
+ }), h.appendChild(b), l.appendChild(h);
2803
2806
  const f = document.createElement("button");
2804
2807
  f.type = "button", f.tabIndex = 0, f.className = "p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-600 dark:text-gray-300 transition-colors flex items-center focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-gray-400 dark:focus-visible:ring-gray-500", f.setAttribute("data-keep-popover-open", "true");
2805
2808
  const _ = document.createElement("mint-icon");
2806
2809
  _.setAttribute("name", "caret-right"), _.className = "w-4 h-4", f.appendChild(_), f.addEventListener("click", () => {
2807
2810
  this._currentMonth === 11 ? (this._currentMonth = 0, this._currentYear++) : this._currentMonth++, this._buildCalendar();
2808
- }), o.appendChild(f);
2811
+ }), l.appendChild(f);
2809
2812
  const m = document.createElement("div");
2810
2813
  m.className = "grid grid-cols-7 mb-2", s.forEach((y) => {
2811
2814
  const g = document.createElement("div");
@@ -2817,16 +2820,16 @@ class ee extends HTMLElement {
2817
2820
  const g = document.createElement("div");
2818
2821
  g.className = "w-8 h-8", v.appendChild(g);
2819
2822
  }
2820
- const E = this.getMin() ? this._parseDateString(this.getMin(), this.getFormat()) : null, S = this.getMax() ? this._parseDateString(this.getMax(), this.getFormat()) : null;
2823
+ const x = this.getMin() ? this._parseDateString(this.getMin(), this.getFormat()) : null, S = this.getMax() ? this._parseDateString(this.getMax(), this.getFormat()) : null;
2821
2824
  for (let y = 1; y <= e; y++) {
2822
- const g = new Date(this._currentYear, this._currentMonth, y), p = this._isToday(g), k = this._isDateSelected(g), x = this._isDateInRange(g), I = E && g < E || S && g > S;
2825
+ const g = new Date(this._currentYear, this._currentMonth, y), p = this._isToday(g), k = this._isDateSelected(g), E = this._isDateInRange(g), I = x && g < x || S && g > S;
2823
2826
  let C = "rounded-md";
2824
2827
  if (this._isRange && this._selectedStartDate && this._selectedEndDate) {
2825
2828
  const L = this._isSameDate(g, this._selectedStartDate), M = this._isSameDate(g, this._selectedEndDate);
2826
- L && M ? C = "rounded-md" : L ? C = "rounded-l-md" : M ? C = "rounded-r-md" : x && (C = "rounded-none");
2829
+ L && M ? C = "rounded-md" : L ? C = "rounded-l-md" : M ? C = "rounded-r-md" : E && (C = "rounded-none");
2827
2830
  } else k && !this._isRange && (C = "rounded-md");
2828
2831
  const w = document.createElement("button");
2829
- w.type = "button", w.disabled = !!I, w.tabIndex = I ? -1 : 0, w.className = `w-full h-8 ${C} border-0 text-sm font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-gray-400 dark:focus-visible:ring-gray-500 ${k ? "bg-slate-800 dark:bg-slate-600 text-white" : x ? "bg-slate-100 dark:bg-slate-700 text-slate-800 dark:text-slate-200" : p ? "text-gray-900 dark:text-gray-100 font-semibold" : "text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"} ${I ? "opacity-40 cursor-not-allowed" : ""}`, w.textContent = y.toString(), I || w.addEventListener("click", () => {
2832
+ w.type = "button", w.disabled = !!I, w.tabIndex = I ? -1 : 0, w.className = `w-full h-8 ${C} border-0 text-sm font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-gray-400 dark:focus-visible:ring-gray-500 ${k ? "bg-slate-800 dark:bg-slate-600 text-white" : E ? "bg-slate-100 dark:bg-slate-700 text-slate-800 dark:text-slate-200" : p ? "text-gray-900 dark:text-gray-100 font-semibold" : "text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"} ${I ? "opacity-40 cursor-not-allowed" : ""}`, w.textContent = y.toString(), I || w.addEventListener("click", () => {
2830
2833
  this._handleDateClick(g);
2831
2834
  }), v.appendChild(w);
2832
2835
  }
@@ -2863,8 +2866,8 @@ class ee extends HTMLElement {
2863
2866
  }
2864
2867
  }
2865
2868
  `, p.classList.add("mint-date-shortcuts-row"), document.head.querySelector("style[data-mint-date-shortcuts]") || (k.setAttribute("data-mint-date-shortcuts", "true"), document.head.appendChild(k));
2866
- const x = document.createElement("div");
2867
- x.className = "absolute left-0 top-0 bottom-0 w-8 pointer-events-none z-10 bg-gradient-to-r from-white dark:from-gray-800 to-transparent opacity-0 transition-opacity duration-200 md:hidden", g.appendChild(x);
2869
+ const E = document.createElement("div");
2870
+ E.className = "absolute left-0 top-0 bottom-0 w-8 pointer-events-none z-10 bg-gradient-to-r from-white dark:from-gray-800 to-transparent opacity-0 transition-opacity duration-200 md:hidden", g.appendChild(E);
2868
2871
  const I = document.createElement("div");
2869
2872
  I.className = "absolute right-0 top-0 bottom-0 w-8 pointer-events-none z-10 bg-gradient-to-l from-white dark:from-gray-800 to-transparent opacity-100 transition-opacity duration-200 md:hidden", g.appendChild(I);
2870
2873
  const C = document.createElement("div");
@@ -2874,10 +2877,10 @@ class ee extends HTMLElement {
2874
2877
  const L = () => {
2875
2878
  if (window.innerWidth >= 768) {
2876
2879
  const T = p.scrollTop, H = p.scrollHeight, D = p.clientHeight;
2877
- T > 0 ? C.style.opacity = "1" : C.style.opacity = "0", T + D < H - 1 ? w.style.opacity = "1" : w.style.opacity = "0", x.style.opacity = "0", I.style.opacity = "0";
2880
+ T > 0 ? C.style.opacity = "1" : C.style.opacity = "0", T + D < H - 1 ? w.style.opacity = "1" : w.style.opacity = "0", E.style.opacity = "0", I.style.opacity = "0";
2878
2881
  } else {
2879
2882
  const T = p.scrollLeft, H = p.scrollWidth, D = p.clientWidth;
2880
- T > 0 ? x.style.opacity = "1" : x.style.opacity = "0", T + D < H - 1 ? I.style.opacity = "1" : I.style.opacity = "0", C.style.opacity = "0", w.style.opacity = "0";
2883
+ T > 0 ? E.style.opacity = "1" : E.style.opacity = "0", T + D < H - 1 ? I.style.opacity = "1" : I.style.opacity = "0", C.style.opacity = "0", w.style.opacity = "0";
2881
2884
  }
2882
2885
  };
2883
2886
  p.addEventListener("scroll", L), window.addEventListener("resize", L), setTimeout(L, 0), r.forEach((M) => {
@@ -2907,7 +2910,7 @@ class ee extends HTMLElement {
2907
2910
  }), p.appendChild(T);
2908
2911
  }), g.appendChild(p), y.appendChild(g), a.appendChild(y);
2909
2912
  }
2910
- c.appendChild(o), c.appendChild(m), c.appendChild(v), a.appendChild(c), this._calendarContainer.appendChild(a);
2913
+ c.appendChild(l), c.appendChild(m), c.appendChild(v), a.appendChild(c), this._calendarContainer.appendChild(a);
2911
2914
  }
2912
2915
  _buildMonthView() {
2913
2916
  if (!this._calendarContainer) return;
@@ -2930,12 +2933,12 @@ class ee extends HTMLElement {
2930
2933
  this._currentYear++, this._buildCalendar();
2931
2934
  }), t.appendChild(n);
2932
2935
  const c = document.createElement("div");
2933
- c.className = "grid grid-cols-3 gap-2", e.forEach((o, l) => {
2936
+ c.className = "grid grid-cols-3 gap-2", e.forEach((l, o) => {
2934
2937
  const d = document.createElement("button");
2935
2938
  d.type = "button", d.tabIndex = 0, d.setAttribute("data-keep-popover-open", "true");
2936
- const h = this._currentMonth === l;
2937
- d.className = `p-2 rounded text-sm font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-gray-400 dark:focus-visible:ring-gray-500 ${h ? "bg-slate-800 dark:bg-slate-600 text-white" : "text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`, d.textContent = o, d.addEventListener("click", () => {
2938
- this._currentMonth = l, this._viewMode = "calendar", this._buildCalendar();
2939
+ const h = this._currentMonth === o;
2940
+ d.className = `p-2 rounded text-sm font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-gray-400 dark:focus-visible:ring-gray-500 ${h ? "bg-slate-800 dark:bg-slate-600 text-white" : "text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`, d.textContent = l, d.addEventListener("click", () => {
2941
+ this._currentMonth = o, this._viewMode = "calendar", this._buildCalendar();
2939
2942
  }), c.appendChild(d);
2940
2943
  }), this._calendarContainer.appendChild(t), this._calendarContainer.appendChild(c);
2941
2944
  }
@@ -2957,17 +2960,17 @@ class ee extends HTMLElement {
2957
2960
  c.setAttribute("name", "caret-right"), c.className = "w-4 h-4", a.appendChild(c), a.addEventListener("click", () => {
2958
2961
  this._currentYear += 12, this._buildCalendar();
2959
2962
  }), i.appendChild(a);
2960
- const o = document.createElement("div");
2961
- o.className = "grid grid-cols-3 gap-2";
2962
- for (let l = e; l <= t; l++) {
2963
+ const l = document.createElement("div");
2964
+ l.className = "grid grid-cols-3 gap-2";
2965
+ for (let o = e; o <= t; o++) {
2963
2966
  const d = document.createElement("button");
2964
2967
  d.type = "button", d.tabIndex = 0, d.setAttribute("data-keep-popover-open", "true");
2965
- const h = this._currentYear === l;
2966
- d.className = `p-2 rounded text-sm font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-gray-400 dark:focus-visible:ring-gray-500 ${h ? "bg-slate-800 dark:bg-slate-600 text-white" : "text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`, d.textContent = String(l), d.addEventListener("click", () => {
2967
- this._currentYear = l, this._viewMode = "calendar", this._buildCalendar();
2968
- }), o.appendChild(d);
2968
+ const h = this._currentYear === o;
2969
+ d.className = `p-2 rounded text-sm font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-gray-400 dark:focus-visible:ring-gray-500 ${h ? "bg-slate-800 dark:bg-slate-600 text-white" : "text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`, d.textContent = String(o), d.addEventListener("click", () => {
2970
+ this._currentYear = o, this._viewMode = "calendar", this._buildCalendar();
2971
+ }), l.appendChild(d);
2969
2972
  }
2970
- this._calendarContainer.appendChild(i), this._calendarContainer.appendChild(o);
2973
+ this._calendarContainer.appendChild(i), this._calendarContainer.appendChild(l);
2971
2974
  }
2972
2975
  _getDaysInMonth(e, t) {
2973
2976
  return new Date(t, e + 1, 0).getDate();
@@ -3193,14 +3196,14 @@ class te extends HTMLElement {
3193
3196
  for (; this.firstChild; )
3194
3197
  this.removeChild(this.firstChild);
3195
3198
  this._wrapper = null, this._select = null;
3196
- const i = this.getLabel(), s = this.getInfo(), r = this.getId(), n = this.getName(), a = this.getValue(), c = this.isDisabled(), o = this.isMultiple(), l = this.hasError();
3199
+ const i = this.getLabel(), s = this.getInfo(), r = this.getId(), n = this.getName(), a = this.getValue(), c = this.isDisabled(), l = this.isMultiple(), o = this.hasError();
3197
3200
  if (i) {
3198
3201
  const h = document.createElement("label");
3199
3202
  h.className = "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", r && h.setAttribute("for", r);
3200
3203
  const u = document.createTextNode(i);
3201
3204
  h.appendChild(u), this.appendChild(h);
3202
3205
  }
3203
- 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(), r && (this._select.id = r), n && (this._select.name = n), c && (this._select.disabled = !0), o && (this._select.multiple = !0), a && (this._select.value = a), this._select.setAttribute("aria-invalid", l ? "true" : "false");
3206
+ 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(), r && (this._select.id = r), n && (this._select.name = n), c && (this._select.disabled = !0), l && (this._select.multiple = !0), a && (this._select.value = a), this._select.setAttribute("aria-invalid", o ? "true" : "false");
3204
3207
  const d = e.length > 0 ? e : t;
3205
3208
  if (d.length > 0 && d.forEach((h) => {
3206
3209
  this._select.appendChild(h);
@@ -3216,7 +3219,7 @@ class te extends HTMLElement {
3216
3219
  cancelable: !0,
3217
3220
  composed: !0
3218
3221
  }));
3219
- }, this._select.addEventListener("change", this._changeHandler), this._wrapper.appendChild(this._select), o)
3222
+ }, this._select.addEventListener("change", this._changeHandler), this._wrapper.appendChild(this._select), l)
3220
3223
  this._caretUpIcon = null, this._caretDownIcon = null;
3221
3224
  else {
3222
3225
  const h = document.createElement("div");
@@ -3288,10 +3291,10 @@ class ie extends HTMLElement {
3288
3291
  return this.hasAttribute("disabled");
3289
3292
  }
3290
3293
  render() {
3291
- const e = this.getLabel(), t = this.getAccept(), i = this.isMultiple(), s = this.isDisabled(), r = this.getWidth(), n = this.getHeight(), a = this.getName(), c = this.hasError(), o = this.getErrorMessage();
3294
+ const e = this.getLabel(), t = this.getAccept(), i = this.isMultiple(), s = this.isDisabled(), r = this.getWidth(), n = this.getHeight(), a = this.getName(), c = this.hasError(), l = this.getErrorMessage();
3292
3295
  this._dropzone || (this._dropzone = document.createElement("div"), this.appendChild(this._dropzone)), this._updateDragStateClass(), this._dropzone.setAttribute("aria-invalid", c ? "true" : "false"), this._dropzone.style.width = r, this._dropzone.style.height = n, this._dropzone.style.minWidth = r, this._dropzone.style.minHeight = n, this._fileInput || (this._fileInput = document.createElement("input"), this._fileInput.type = "file", this._fileInput.style.display = "none", this._dropzone.appendChild(this._fileInput)), this._fileInput.accept = t, this._fileInput.multiple = i, this._fileInput.disabled = s, a ? this._fileInput.name = a : this._fileInput.removeAttribute("name"), this._fileInput.setAttribute("aria-invalid", c ? "true" : "false");
3293
- const l = this._dropzone.querySelector(".mint-dropzone-icon"), d = this._dropzone.querySelector(".mint-dropzone-label");
3294
- l && l.remove(), d && d.remove();
3296
+ const o = this._dropzone.querySelector(".mint-dropzone-icon"), d = this._dropzone.querySelector(".mint-dropzone-label");
3297
+ o && o.remove(), d && d.remove();
3295
3298
  const h = document.createElement("div");
3296
3299
  h.className = "mint-dropzone-icon flex items-center justify-center mt-2 mb-2 flex-shrink-0";
3297
3300
  const u = document.createElement("mint-icon");
@@ -3299,7 +3302,7 @@ class ie extends HTMLElement {
3299
3302
  const b = document.createElement("div");
3300
3303
  b.className = "mint-dropzone-label text-sm font-medium text-gray-600 dark:text-gray-400 text-center px-4 flex-shrink-0", b.textContent = e, this._dropzone.appendChild(b);
3301
3304
  }
3302
- this.setupEventListeners(), this._renderErrorState(c, o), this._renderPreviews();
3305
+ this.setupEventListeners(), this._renderErrorState(c, l), this._renderPreviews();
3303
3306
  }
3304
3307
  _updateDragState() {
3305
3308
  this._dropzone && this._updateDragStateClass();
@@ -3342,8 +3345,8 @@ class ie extends HTMLElement {
3342
3345
  if (i && i.length > 0) {
3343
3346
  const s = this.getAccept(), r = this.isMultiple(), n = [], a = [];
3344
3347
  for (let c = 0; c < i.length; c++) {
3345
- const o = i[c];
3346
- this._isFileAccepted(o, s) ? n.push(o) : a.push(o);
3348
+ const l = i[c];
3349
+ this._isFileAccepted(l, s) ? n.push(l) : a.push(l);
3347
3350
  }
3348
3351
  if (!r && n.length > 1 && (a.push(...n.slice(1)), n.splice(1)), a.length > 0) {
3349
3352
  const c = new CustomEvent("dropRejected", {
@@ -3441,24 +3444,24 @@ class ie extends HTMLElement {
3441
3444
  const e = document.createElement("div");
3442
3445
  e.className = "mint-dropzone-previews-wrapper mt-3 w-full relative max-h-48";
3443
3446
  const t = document.createElement("div");
3444
- t.className = "mint-dropzone-previews w-full flex flex-col gap-2 max-h-48 overflow-y-auto overflow-x-hidden px-2 pb-2", this._selectedFiles.forEach((o, l) => {
3447
+ t.className = "mint-dropzone-previews w-full flex flex-col gap-2 max-h-48 overflow-y-auto overflow-x-hidden px-2 pb-2", this._selectedFiles.forEach((l, o) => {
3445
3448
  const d = document.createElement("div");
3446
- if (d.className = "flex items-center gap-3 p-2 rounded border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-800", o.type.startsWith("image/")) {
3449
+ if (d.className = "flex items-center gap-3 p-2 rounded border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-800", l.type.startsWith("image/")) {
3447
3450
  const f = document.createElement("img");
3448
3451
  f.className = "w-12 h-12 object-cover rounded border border-gray-200 dark:border-gray-700";
3449
- const _ = URL.createObjectURL(o);
3452
+ const _ = URL.createObjectURL(l);
3450
3453
  this._previewUrls.push(_), f.src = _, d.appendChild(f);
3451
3454
  } else {
3452
3455
  const f = document.createElement("mint-icon");
3453
3456
  f.setAttribute("name", "attach"), f.className = "w-5 h-5 text-gray-500 dark:text-gray-300", d.appendChild(f);
3454
3457
  }
3455
3458
  const h = document.createElement("div");
3456
- h.className = "flex-1 text-sm text-gray-800 dark:text-gray-100 truncate", h.textContent = o.name, d.appendChild(h);
3459
+ h.className = "flex-1 text-sm text-gray-800 dark:text-gray-100 truncate", h.textContent = l.name, d.appendChild(h);
3457
3460
  const u = document.createElement("button");
3458
3461
  u.type = "button", u.className = "text-gray-500 hover:bg-red-100 dark:hover:bg-red-900/30 transition-colors flex items-center justify-center w-6 h-6 rounded-full";
3459
3462
  const b = document.createElement("mint-icon");
3460
3463
  b.setAttribute("name", "close"), b.className = "w-4 h-4", u.appendChild(b), u.addEventListener("click", (f) => {
3461
- f.preventDefault(), f.stopPropagation(), this._removeFileAt(l);
3464
+ f.preventDefault(), f.stopPropagation(), this._removeFileAt(o);
3462
3465
  }), d.appendChild(u), t.appendChild(d);
3463
3466
  });
3464
3467
  const i = this.hasError(), s = this._isDragging;
@@ -3469,8 +3472,8 @@ class ie extends HTMLElement {
3469
3472
  const a = document.createElement("div");
3470
3473
  a.className = `absolute bottom-0 left-0 right-0 h-4 pointer-events-none z-10 bg-gradient-to-t ${r} to-transparent opacity-100 transition-opacity duration-200`, e.appendChild(a);
3471
3474
  const c = () => {
3472
- const o = t.scrollTop, l = t.scrollHeight, d = t.clientHeight;
3473
- o > 0 ? n.style.opacity = "1" : n.style.opacity = "0", o + d < l - 1 ? a.style.opacity = "1" : a.style.opacity = "0";
3475
+ const l = t.scrollTop, o = t.scrollHeight, d = t.clientHeight;
3476
+ l > 0 ? n.style.opacity = "1" : n.style.opacity = "0", l + d < o - 1 ? a.style.opacity = "1" : a.style.opacity = "0";
3474
3477
  };
3475
3478
  c(), t.addEventListener("scroll", c), e.appendChild(t), this._previewContainer = e, this._dropzone.appendChild(e), this._updateDragStateClass();
3476
3479
  }
@@ -3580,43 +3583,43 @@ class se extends HTMLElement {
3580
3583
  const i = this.getAttribute("action"), s = (this.getAttribute("method") || "POST").toUpperCase(), r = this.getAttribute("enctype") || "application/x-www-form-urlencoded";
3581
3584
  if (!i)
3582
3585
  return { status: 0, ok: !0, data: { values: t } };
3583
- const n = Array.from(e.values()).some((l) => l instanceof File);
3586
+ const n = Array.from(e.values()).some((o) => o instanceof File);
3584
3587
  let a = null;
3585
3588
  const c = {};
3586
- let o = i;
3589
+ let l = i;
3587
3590
  if (s === "GET") {
3588
- const l = new URLSearchParams();
3591
+ const o = new URLSearchParams();
3589
3592
  e.forEach((d, h) => {
3590
- d instanceof File || l.append(h, String(d));
3591
- }), o += (i.includes("?") ? "&" : "?") + l.toString();
3593
+ d instanceof File || o.append(h, String(d));
3594
+ }), l += (i.includes("?") ? "&" : "?") + o.toString();
3592
3595
  } else if (r === "multipart/form-data" || n)
3593
3596
  a = e;
3594
3597
  else if (r === "application/json")
3595
3598
  a = JSON.stringify(t), c["Content-Type"] = "application/json";
3596
3599
  else {
3597
- const l = new URLSearchParams();
3600
+ const o = new URLSearchParams();
3598
3601
  e.forEach((d, h) => {
3599
- d instanceof File || l.append(h, String(d));
3600
- }), a = l, c["Content-Type"] = "application/x-www-form-urlencoded";
3602
+ d instanceof File || o.append(h, String(d));
3603
+ }), a = o, c["Content-Type"] = "application/x-www-form-urlencoded";
3601
3604
  }
3602
3605
  if (typeof fetch == "function") {
3603
- const l = await fetch(o, {
3606
+ const o = await fetch(l, {
3604
3607
  method: s,
3605
3608
  body: s === "GET" ? null : a,
3606
3609
  headers: c
3607
- }), d = await l.text().catch(() => "");
3610
+ }), d = await o.text().catch(() => "");
3608
3611
  let h = d;
3609
3612
  try {
3610
3613
  h = JSON.parse(d);
3611
3614
  } catch {
3612
3615
  }
3613
- if (!l.ok)
3614
- throw { status: l.status, data: h };
3615
- return { status: l.status, ok: l.ok, data: h };
3616
+ if (!o.ok)
3617
+ throw { status: o.status, data: h };
3618
+ return { status: o.status, ok: o.ok, data: h };
3616
3619
  }
3617
- return await new Promise((l, d) => {
3620
+ return await new Promise((o, d) => {
3618
3621
  const h = new XMLHttpRequest();
3619
- h.open(s, o, !0), Object.entries(c).forEach(([u, b]) => h.setRequestHeader(u, b)), h.onload = function() {
3622
+ h.open(s, l, !0), Object.entries(c).forEach(([u, b]) => h.setRequestHeader(u, b)), h.onload = function() {
3620
3623
  const { status: u, responseText: b } = h;
3621
3624
  if (u >= 200 && u < 300) {
3622
3625
  let f = b;
@@ -3624,7 +3627,7 @@ class se extends HTMLElement {
3624
3627
  f = JSON.parse(b);
3625
3628
  } catch {
3626
3629
  }
3627
- l({ status: u, ok: !0, data: f });
3630
+ o({ status: u, ok: !0, data: f });
3628
3631
  } else
3629
3632
  d({ status: u, data: b });
3630
3633
  }, h.onerror = function() {
@@ -3644,7 +3647,7 @@ class se extends HTMLElement {
3644
3647
  const a = Array.from(n);
3645
3648
  t[r] && Array.isArray(t[r]) ? a.forEach((c) => {
3646
3649
  t[r].some(
3647
- (l) => l.name === c.name && l.size === c.size && l.lastModified === c.lastModified
3650
+ (o) => o.name === c.name && o.size === c.size && o.lastModified === c.lastModified
3648
3651
  ) || t[r].push(c);
3649
3652
  }) : t[r] = a;
3650
3653
  }
@@ -3673,8 +3676,8 @@ class se extends HTMLElement {
3673
3676
  _validate(e, t) {
3674
3677
  let i = !0;
3675
3678
  return this._errors = {}, Object.entries(t || {}).forEach(([s, r]) => {
3676
- const n = Array.isArray(r) ? r : [r], a = this._getFieldElements(s), c = this._extractFieldValue(a), o = this._validateRules(c, n);
3677
- o ? (i = !1, this._errors[s] = o, this._flagFieldError(a, o)) : this._clearFieldError(a);
3679
+ const n = Array.isArray(r) ? r : [r], a = this._getFieldElements(s), c = this._extractFieldValue(a), l = this._validateRules(c, n);
3680
+ l ? (i = !1, this._errors[s] = l, this._flagFieldError(a, l)) : this._clearFieldError(a);
3678
3681
  }), i;
3679
3682
  }
3680
3683
  _validateField(e) {
@@ -3837,8 +3840,8 @@ class se extends HTMLElement {
3837
3840
  if (!r) return;
3838
3841
  const n = this._getFieldName(r);
3839
3842
  if (!n || !this._collectValidationRules()[n]) return;
3840
- const c = this._extractFieldValue([r]), o = c != null && (typeof c == "string" ? c.trim() !== "" : c instanceof FileList || Array.isArray(c) ? c.length > 0 : !0), l = r.hasAttribute("data-mint-form-error") || s instanceof HTMLElement && (s.hasAttribute("aria-invalid") || s.closest("[data-mint-form-error]"));
3841
- (o || l) && setTimeout(() => {
3843
+ const c = this._extractFieldValue([r]), l = c != null && (typeof c == "string" ? c.trim() !== "" : c instanceof FileList || Array.isArray(c) ? c.length > 0 : !0), o = r.hasAttribute("data-mint-form-error") || s instanceof HTMLElement && (s.hasAttribute("aria-invalid") || s.closest("[data-mint-form-error]"));
3844
+ (l || o) && setTimeout(() => {
3842
3845
  this._validateField(n);
3843
3846
  }, 0);
3844
3847
  };
@@ -3847,12 +3850,12 @@ class se extends HTMLElement {
3847
3850
  const s = i.target;
3848
3851
  if (!s) return;
3849
3852
  if (s instanceof HTMLSelectElement || s.tagName === "MINT-SELECT" || s.closest("mint-select")) {
3850
- const o = this._findFieldElement(s);
3851
- if (!o) return;
3852
- const l = this._getFieldName(o);
3853
- if (!l || !this._collectValidationRules()[l]) return;
3853
+ const l = this._findFieldElement(s);
3854
+ if (!l) return;
3855
+ const o = this._getFieldName(l);
3856
+ if (!o || !this._collectValidationRules()[o]) return;
3854
3857
  setTimeout(() => {
3855
- this._validateField(l);
3858
+ this._validateField(o);
3856
3859
  }, 0);
3857
3860
  return;
3858
3861
  }
@@ -3938,32 +3941,32 @@ class re extends HTMLElement {
3938
3941
  const t = this.hasAttribute("bordered"), i = this.hasAttribute("striped"), s = this.hasAttribute("hover"), r = this.hasAttribute("compact");
3939
3942
  e.style.width = "100%", e.style.borderCollapse = "collapse", e.style.fontSize = "0.875rem", e.style.fontWeight = "500";
3940
3943
  const n = e.querySelector("thead");
3941
- n && (n.style.backgroundColor = "rgb(249 250 251)", document.documentElement.classList.contains("dark") && (n.style.backgroundColor = "rgb(31 41 55)"), n.querySelectorAll("th").forEach((l) => {
3942
- l.style.textAlign = "left", l.style.fontWeight = "600", l.style.color = "rgb(17 24 39)", document.documentElement.classList.contains("dark") && (l.style.color = "rgb(255 255 255)"), l.style.textTransform = "uppercase", l.style.letterSpacing = "0.05em", l.style.fontSize = "0.75rem", t && (l.style.border = "1px solid rgb(229 231 235)", document.documentElement.classList.contains("dark") && (l.style.borderColor = "rgb(55 65 81)")), r ? l.style.padding = "0.375rem 0.75rem" : l.style.padding = "0.75rem 1rem";
3944
+ n && (n.style.backgroundColor = "rgb(249 250 251)", document.documentElement.classList.contains("dark") && (n.style.backgroundColor = "rgb(31 41 55)"), n.querySelectorAll("th").forEach((o) => {
3945
+ o.style.textAlign = "left", o.style.fontWeight = "600", o.style.color = "rgb(17 24 39)", document.documentElement.classList.contains("dark") && (o.style.color = "rgb(255 255 255)"), o.style.textTransform = "uppercase", o.style.letterSpacing = "0.05em", o.style.fontSize = "0.75rem", t && (o.style.border = "1px solid rgb(229 231 235)", document.documentElement.classList.contains("dark") && (o.style.borderColor = "rgb(55 65 81)")), r ? o.style.padding = "0.375rem 0.75rem" : o.style.padding = "0.75rem 1rem";
3943
3946
  }));
3944
3947
  const a = e.querySelector("tbody");
3945
- a && (i && (a.style.borderTopWidth = "1px", a.style.borderTopStyle = "solid", a.style.borderTopColor = "rgb(229 231 235)", document.documentElement.classList.contains("dark") && (a.style.borderTopColor = "rgb(55 65 81)")), a.querySelectorAll("tr").forEach((l, d) => {
3946
- if (t && (l.style.borderBottomWidth = "1px", l.style.borderBottomStyle = "solid", l.style.borderBottomColor = "rgb(229 231 235)", document.documentElement.classList.contains("dark") && (l.style.borderBottomColor = "rgb(55 65 81)")), i ? d % 2 === 0 ? (l.style.backgroundColor = "rgb(255 255 255)", document.documentElement.classList.contains("dark") && (l.style.backgroundColor = "rgb(17 24 39)")) : (l.style.backgroundColor = "rgb(249 250 251)", document.documentElement.classList.contains("dark") && (l.style.backgroundColor = "rgb(31 41 55)")) : (l.style.backgroundColor = "rgb(255 255 255)", document.documentElement.classList.contains("dark") && (l.style.backgroundColor = "rgb(17 24 39)")), s) {
3947
- l.style.transition = "background-color 150ms";
3948
- const u = this._hoverHandlers.get(l);
3949
- u && (l.removeEventListener("mouseenter", u.enter), l.removeEventListener("mouseleave", u.leave));
3948
+ a && (i && (a.style.borderTopWidth = "1px", a.style.borderTopStyle = "solid", a.style.borderTopColor = "rgb(229 231 235)", document.documentElement.classList.contains("dark") && (a.style.borderTopColor = "rgb(55 65 81)")), a.querySelectorAll("tr").forEach((o, d) => {
3949
+ if (t && (o.style.borderBottomWidth = "1px", o.style.borderBottomStyle = "solid", o.style.borderBottomColor = "rgb(229 231 235)", document.documentElement.classList.contains("dark") && (o.style.borderBottomColor = "rgb(55 65 81)")), i ? d % 2 === 0 ? (o.style.backgroundColor = "rgb(255 255 255)", document.documentElement.classList.contains("dark") && (o.style.backgroundColor = "rgb(17 24 39)")) : (o.style.backgroundColor = "rgb(249 250 251)", document.documentElement.classList.contains("dark") && (o.style.backgroundColor = "rgb(31 41 55)")) : (o.style.backgroundColor = "rgb(255 255 255)", document.documentElement.classList.contains("dark") && (o.style.backgroundColor = "rgb(17 24 39)")), s) {
3950
+ o.style.transition = "background-color 150ms";
3951
+ const u = this._hoverHandlers.get(o);
3952
+ u && (o.removeEventListener("mouseenter", u.enter), o.removeEventListener("mouseleave", u.leave));
3950
3953
  const b = () => {
3951
- l.style.backgroundColor = "rgb(243 244 246)", document.documentElement.classList.contains("dark") && (l.style.backgroundColor = "rgb(31 41 55)");
3954
+ o.style.backgroundColor = "rgb(243 244 246)", document.documentElement.classList.contains("dark") && (o.style.backgroundColor = "rgb(31 41 55)");
3952
3955
  }, f = () => {
3953
- i ? d % 2 === 0 ? (l.style.backgroundColor = "rgb(255 255 255)", document.documentElement.classList.contains("dark") && (l.style.backgroundColor = "rgb(17 24 39)")) : (l.style.backgroundColor = "rgb(249 250 251)", document.documentElement.classList.contains("dark") && (l.style.backgroundColor = "rgb(31 41 55)")) : (l.style.backgroundColor = "rgb(255 255 255)", document.documentElement.classList.contains("dark") && (l.style.backgroundColor = "rgb(17 24 39)"));
3956
+ i ? d % 2 === 0 ? (o.style.backgroundColor = "rgb(255 255 255)", document.documentElement.classList.contains("dark") && (o.style.backgroundColor = "rgb(17 24 39)")) : (o.style.backgroundColor = "rgb(249 250 251)", document.documentElement.classList.contains("dark") && (o.style.backgroundColor = "rgb(31 41 55)")) : (o.style.backgroundColor = "rgb(255 255 255)", document.documentElement.classList.contains("dark") && (o.style.backgroundColor = "rgb(17 24 39)"));
3954
3957
  };
3955
- this._hoverHandlers.set(l, { enter: b, leave: f }), l.addEventListener("mouseenter", b), l.addEventListener("mouseleave", f);
3958
+ this._hoverHandlers.set(o, { enter: b, leave: f }), o.addEventListener("mouseenter", b), o.addEventListener("mouseleave", f);
3956
3959
  } else {
3957
- const u = this._hoverHandlers.get(l);
3958
- u && (l.removeEventListener("mouseenter", u.enter), l.removeEventListener("mouseleave", u.leave), this._hoverHandlers.delete(l));
3960
+ const u = this._hoverHandlers.get(o);
3961
+ u && (o.removeEventListener("mouseenter", u.enter), o.removeEventListener("mouseleave", u.leave), this._hoverHandlers.delete(o));
3959
3962
  }
3960
- l.querySelectorAll("td").forEach((u) => {
3963
+ o.querySelectorAll("td").forEach((u) => {
3961
3964
  u.style.color = "rgb(17 24 39)", document.documentElement.classList.contains("dark") && (u.style.color = "rgb(243 244 246)"), t && (u.style.border = "1px solid rgb(229 231 235)", document.documentElement.classList.contains("dark") && (u.style.borderColor = "rgb(55 65 81)")), r ? u.style.padding = "0.375rem 0.75rem" : u.style.padding = "0.75rem 1rem";
3962
3965
  });
3963
3966
  }));
3964
3967
  const c = e.querySelector("tfoot");
3965
- c && (c.style.backgroundColor = "rgb(249 250 251)", document.documentElement.classList.contains("dark") && (c.style.backgroundColor = "rgb(31 41 55)"), c.style.fontWeight = "600", c.querySelectorAll("td").forEach((l) => {
3966
- l.style.color = "rgb(17 24 39)", document.documentElement.classList.contains("dark") && (l.style.color = "rgb(243 244 246)"), t && (l.style.border = "1px solid rgb(229 231 235)", document.documentElement.classList.contains("dark") && (l.style.borderColor = "rgb(55 65 81)")), r ? l.style.padding = "0.375rem 0.75rem" : l.style.padding = "0.75rem 1rem";
3968
+ c && (c.style.backgroundColor = "rgb(249 250 251)", document.documentElement.classList.contains("dark") && (c.style.backgroundColor = "rgb(31 41 55)"), c.style.fontWeight = "600", c.querySelectorAll("td").forEach((o) => {
3969
+ o.style.color = "rgb(17 24 39)", document.documentElement.classList.contains("dark") && (o.style.color = "rgb(243 244 246)"), t && (o.style.border = "1px solid rgb(229 231 235)", document.documentElement.classList.contains("dark") && (o.style.borderColor = "rgb(55 65 81)")), r ? o.style.padding = "0.375rem 0.75rem" : o.style.padding = "0.75rem 1rem";
3967
3970
  }));
3968
3971
  }
3969
3972
  }