monobill-mintui 0.4.7 → 0.4.9

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 (27) hide show
  1. package/dist/components/bottom-navigation/BottomNavItem.d.ts +14 -0
  2. package/dist/components/bottom-navigation/BottomNavItem.d.ts.map +1 -0
  3. package/dist/components/bottom-navigation/BottomNavigation.d.ts +10 -0
  4. package/dist/components/bottom-navigation/BottomNavigation.d.ts.map +1 -0
  5. package/dist/components/bottom-navigation/index.d.ts +5 -0
  6. package/dist/components/bottom-navigation/index.d.ts.map +1 -0
  7. package/dist/components/icon/Icon.d.ts.map +1 -1
  8. package/dist/components/icon/icons/index.cjs +2 -2
  9. package/dist/components/icon/icons/index.js +15 -25
  10. package/dist/components/popover/Popover.d.ts +2 -0
  11. package/dist/components/popover/Popover.d.ts.map +1 -1
  12. package/dist/components/side-navigation/SideNavigation.d.ts +12 -0
  13. package/dist/components/side-navigation/SideNavigation.d.ts.map +1 -1
  14. package/dist/components/side-navigation/SideNavigationLink.d.ts +2 -4
  15. package/dist/components/side-navigation/SideNavigationLink.d.ts.map +1 -1
  16. package/dist/components/side-navigation/SideNavigationLinks.d.ts.map +1 -1
  17. package/dist/components/top-navigation/TopNavigation.d.ts +20 -0
  18. package/dist/components/top-navigation/TopNavigation.d.ts.map +1 -0
  19. package/dist/components/top-navigation/index.d.ts +4 -0
  20. package/dist/components/top-navigation/index.d.ts.map +1 -0
  21. package/dist/index.cjs +5 -5
  22. package/dist/index.d.ts +5 -0
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +285 -53
  25. package/dist/{plus-csC2ambK.js → menu-BD7OJkcn.js} +11 -1
  26. package/dist/{plus-C2ciGlkq.cjs → menu-CeF8GTxj.cjs} +1 -1
  27. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -28,6 +28,8 @@ import './components/off-canvas/index';
28
28
  import './components/tabs/index';
29
29
  import './components/chart/index';
30
30
  import './components/side-navigation/index';
31
+ import './components/top-navigation/index';
32
+ import './components/bottom-navigation/index';
31
33
  export { default as Button } from './components/button/Button';
32
34
  export { default as Switch } from './components/switch/Switch';
33
35
  export { default as Spinner } from './components/spinner/Spinner';
@@ -66,4 +68,7 @@ export { default as SideNavigationLinks } from './components/side-navigation/Sid
66
68
  export { default as SideNavigationLink } from './components/side-navigation/SideNavigationLink';
67
69
  export { default as SideNavigationActionMenu } from './components/side-navigation/SideNavigationActionMenu';
68
70
  export { default as SideNavigationActionLinks } from './components/side-navigation/SideNavigationActionLinks';
71
+ export { default as TopNavigation } from './components/top-navigation/TopNavigation';
72
+ export { default as BottomNavigation } from './components/bottom-navigation/BottomNavigation';
73
+ export { default as BottomNavItem } from './components/bottom-navigation/BottomNavItem';
69
74
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,2BAA2B,CAAA;AAClC,OAAO,2BAA2B,CAAA;AAClC,OAAO,4BAA4B,CAAA;AACnC,OAAO,yBAAyB,CAAA;AAChC,OAAO,yBAAyB,CAAA;AAChC,OAAO,0BAA0B,CAAA;AACjC,OAAO,yBAAyB,CAAA;AAChC,OAAO,yBAAyB,CAAA;AAChC,OAAO,yBAAyB,CAAA;AAChC,OAAO,yBAAyB,CAAA;AAChC,OAAO,0BAA0B,CAAA;AACjC,OAAO,4BAA4B,CAAA;AACnC,OAAO,6BAA6B,CAAA;AACpC,OAAO,2BAA2B,CAAA;AAClC,OAAO,0BAA0B,CAAA;AACjC,OAAO,gCAAgC,CAAA;AACvC,OAAO,2BAA2B,CAAA;AAClC,OAAO,6BAA6B,CAAA;AACpC,OAAO,yBAAyB,CAAA;AAChC,OAAO,gCAAgC,CAAA;AACvC,OAAO,0BAA0B,CAAA;AACjC,OAAO,yBAAyB,CAAA;AAChC,OAAO,yBAAyB,CAAA;AAChC,OAAO,8BAA8B,CAAA;AACrC,OAAO,0BAA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/components/spinner/Spinner.ts
3
3
  var t = class extends HTMLElement {
4
4
  static get observedAttributes() {
@@ -147,21 +147,20 @@ var n = class extends HTMLElement {
147
147
  console.warn(`Icon "${t}" not found. Make sure you've imported the icon: import '@monobill-mintui/icon/icons/${t}'`), this.innerHTML = "", this.style.maskImage = "", this.style.webkitMaskImage = "", this.style.backgroundColor = "";
148
148
  return;
149
149
  }
150
- let r = this.closest("mint-button") || this.parentElement?.closest("mint-button"), i = this.closest("mint-switch") || this.parentElement?.closest("mint-switch"), a = this.closest("mint-select") || this.parentElement?.closest("mint-select");
150
+ let r = this.closest("mint-button") || this.parentElement?.closest("mint-button"), i = this.closest("mint-switch") || this.parentElement?.closest("mint-switch"), a = this.closest("mint-select") || this.parentElement?.closest("mint-select"), o = !!this.closest("mint-sidenav-link") && !r && !i && !a;
151
151
  if (!Array.from(this.classList).some((e) => e.startsWith("w-") || e.startsWith("h-")) && !a) {
152
152
  let e;
153
- e = i ? "w-3 h-3" : r ? "w-[1em] h-[1em]" : "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", "w-[0.875em]", "h-[0.875em]"), e.split(" ").forEach((e) => {
153
+ e = i ? "w-3 h-3" : r || o ? "w-[1em] h-[1em]" : "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", "w-[0.875em]", "h-[0.875em]"), e.split(" ").forEach((e) => {
154
154
  e && this.classList.add(e);
155
155
  });
156
156
  }
157
157
  this.innerHTML = this.generateSVGMarkup(n), this.style.maskImage = "", this.style.webkitMaskImage = "", this.style.maskSize = "", this.style.webkitMaskSize = "", this.style.maskRepeat = "", this.style.webkitMaskRepeat = "", this.style.maskPosition = "", this.style.webkitMaskPosition = "", this.style.backgroundColor = "", this.style.aspectRatio = "1 / 1";
158
- let o = this.querySelector("svg");
159
- if (o && (o.style.width = "100%", o.style.height = "100%"), i) this.classList.remove("text-gray-100", "text-gray-900"), this.classList.add("text-gray-900");
160
- else if (r) this.classList.remove("text-gray-100", "text-gray-900");
161
- else {
158
+ let s = this.querySelector("svg");
159
+ if (s && (s.style.width = "100%", s.style.height = "100%"), i) this.classList.remove("text-gray-100", "text-gray-900"), this.classList.add("text-gray-900");
160
+ else if (!r && !o) {
162
161
  let e = document.documentElement.classList.contains("dark") ? "text-gray-100" : "text-gray-900";
163
162
  this.classList.remove("text-gray-100", "text-gray-900"), this.classList.add(e);
164
- }
163
+ } else this.classList.remove("text-gray-100", "text-gray-900");
165
164
  }
166
165
  };
167
166
  customElements.get("mint-icon") || customElements.define("mint-icon", n);
@@ -1603,6 +1602,9 @@ var p = class extends HTMLElement {
1603
1602
  let e = this._isInsideModal() ? "z-[60]" : "z-50";
1604
1603
  this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "fixed", "top-0", "left-0", e, "pointer-events-none"), this.isOpen() || this.classList.add("hidden"), this.render(), this._setupTrigger(), this._observeDarkMode();
1605
1604
  }
1605
+ _ownsNode(e) {
1606
+ return e ? !!(this.contains(e) || this._triggerElement?.contains(e)) : !1;
1607
+ }
1606
1608
  _isInsideModal() {
1607
1609
  let e = this;
1608
1610
  for (; e;) {
@@ -1616,7 +1618,7 @@ var p = class extends HTMLElement {
1616
1618
  return !1;
1617
1619
  }
1618
1620
  disconnectedCallback() {
1619
- this._triggerElement && this._triggerElement.tagName === "MINT-BUTTON" && this._triggerElement.removeAttribute("active"), this._darkModeObserver &&= (this._darkModeObserver.disconnect(), null), this._clickOutsideHandler &&= (document.removeEventListener("click", this._clickOutsideHandler), null), this._triggerClickHandler && this._triggerElement && (this._triggerElement.removeEventListener("click", this._triggerClickHandler, !0), this._triggerClickHandler = null), this._removeHoverListeners(), this._scrollHandler &&= (window.removeEventListener("scroll", this._scrollHandler, !0), null), this._resizeHandler &&= (window.removeEventListener("resize", this._resizeHandler), null);
1621
+ this._removeHoverListeners(), this._overlay?.remove(), this._popover?.remove(), this._overlay = null, this._popover = null, this._triggerElement && this._triggerElement.tagName === "MINT-BUTTON" && this._triggerElement.removeAttribute("active"), this._darkModeObserver &&= (this._darkModeObserver.disconnect(), null), this._clickOutsideHandler &&= (document.removeEventListener("click", this._clickOutsideHandler, !1), null), this._triggerClickHandler && this._triggerElement && (this._triggerElement.removeEventListener("click", this._triggerClickHandler, !0), this._triggerClickHandler = null), this._scrollHandler &&= (window.removeEventListener("scroll", this._scrollHandler, !0), null), this._resizeHandler &&= (window.removeEventListener("resize", this._resizeHandler), null);
1620
1622
  }
1621
1623
  attributeChangedCallback(e, t, n) {
1622
1624
  if (t !== n) {
@@ -1692,12 +1694,12 @@ var p = class extends HTMLElement {
1692
1694
  e._cancelHoverClose(), e.open();
1693
1695
  }, this._triggerHoverLeaveHandler = function(t) {
1694
1696
  let n = t.relatedTarget;
1695
- n && (e.contains(n) || e._triggerElement?.contains(n)) || e._scheduleHoverClose();
1697
+ n && e._ownsNode(n) || e._scheduleHoverClose();
1696
1698
  }, this._triggerElement.addEventListener("mouseenter", this._triggerHoverEnterHandler), this._triggerElement.addEventListener("mouseleave", this._triggerHoverLeaveHandler), this._popover && (this._popoverHoverEnterHandler = function() {
1697
1699
  e._cancelHoverClose();
1698
1700
  }, this._popoverHoverLeaveHandler = function(t) {
1699
1701
  let n = t.relatedTarget;
1700
- n && (e.contains(n) || e._triggerElement?.contains(n)) || e._scheduleHoverClose();
1702
+ n && e._ownsNode(n) || e._scheduleHoverClose();
1701
1703
  }, this._popover.addEventListener("mouseenter", this._popoverHoverEnterHandler), this._popover.addEventListener("mouseleave", this._popoverHoverLeaveHandler));
1702
1704
  }
1703
1705
  _removeHoverListeners() {
@@ -1777,7 +1779,7 @@ var p = class extends HTMLElement {
1777
1779
  }), !this._clickOutsideHandler) {
1778
1780
  let e = this;
1779
1781
  this._clickOutsideHandler = function(t) {
1780
- let n = t.composedPath(), r = n.includes(e);
1782
+ let n = t.composedPath(), r = n.some((t) => t === e ? !0 : t instanceof Node ? e._ownsNode(t) : !1);
1781
1783
  if (!(e._triggerElement && n.includes(e._triggerElement)) && !r) {
1782
1784
  e.close();
1783
1785
  return;
@@ -1795,7 +1797,7 @@ var p = class extends HTMLElement {
1795
1797
  }), this._clickOutsideHandler &&= (document.removeEventListener("click", this._clickOutsideHandler, !1), null);
1796
1798
  if (this._overlay) {
1797
1799
  let e = this._isInsideModal() ? "z-[55]" : "z-40";
1798
- this._overlay.className = `fixed inset-0 pointer-events-none ${e}`;
1800
+ this._overlay.className = `fixed inset-0 pointer-events-none ${e}`, this._overlay.parentElement !== this && this.appendChild(this._overlay);
1799
1801
  } else {
1800
1802
  this._overlay = document.createElement("div");
1801
1803
  let e = this._isInsideModal() ? "z-[55]" : "z-40";
@@ -1803,7 +1805,7 @@ var p = class extends HTMLElement {
1803
1805
  }
1804
1806
  if (this._popover) {
1805
1807
  let e = this._isInsideModal() ? "z-[60]" : "z-50";
1806
- this._popover.className = `fixed ${e} pointer-events-auto`;
1808
+ this._popover.className = `fixed ${e} pointer-events-auto`, this._popover.parentElement !== this && this.appendChild(this._popover);
1807
1809
  } else {
1808
1810
  this._popover = document.createElement("div");
1809
1811
  let e = this._isInsideModal() ? "z-[60]" : "z-50";
@@ -8430,7 +8432,7 @@ customElements.get("mint-chart") || customElements.define("mint-chart", N);
8430
8432
  //#region src/components/side-navigation/SideNavigationLink.ts
8431
8433
  var P = class extends HTMLElement {
8432
8434
  constructor(...e) {
8433
- super(...e), this._trigger = null, this._mobileTrigger = null, this._submenuContainer = null, this._mobilePopover = null, this._triggerId = "";
8435
+ super(...e), this._trigger = null, this._submenuContainer = null;
8434
8436
  }
8435
8437
  static get observedAttributes() {
8436
8438
  return [
@@ -8446,7 +8448,17 @@ var P = class extends HTMLElement {
8446
8448
  this.classList.add("block"), this.render();
8447
8449
  }
8448
8450
  attributeChangedCallback(e, t, n) {
8449
- t !== n && this.render();
8451
+ t !== n && (this.render(), e === "active" && this._isSubmenuItem() && this._refreshDropdownAncestor());
8452
+ }
8453
+ _refreshDropdownAncestor() {
8454
+ let e = this.parentElement;
8455
+ for (; e;) {
8456
+ if (e.tagName === "MINT-SIDENAV-LINK" && e !== this) {
8457
+ e.render();
8458
+ break;
8459
+ }
8460
+ e = e.parentElement;
8461
+ }
8450
8462
  }
8451
8463
  _isActive() {
8452
8464
  return this.getAttribute("active") === "true";
@@ -8473,8 +8485,8 @@ var P = class extends HTMLElement {
8473
8485
  "cursor-pointer",
8474
8486
  "rounded-lg",
8475
8487
  "border",
8476
- "d-block",
8477
- this._isSubmenuItem() ? "px-2 py-1.5 md:px-2" : "px-2 py-2 md:px-3",
8488
+ "block",
8489
+ this._isSubmenuItem() ? "px-2 py-1.5" : "px-3 py-2",
8478
8490
  "text-left",
8479
8491
  "text-sm",
8480
8492
  "transition-colors",
@@ -8485,18 +8497,18 @@ var P = class extends HTMLElement {
8485
8497
  _hasSubmenu() {
8486
8498
  return this.querySelectorAll(":scope > [slot=\"submenu\"]").length > 0 ? !0 : !!this._submenuContainer && this._submenuContainer.children.length > 0;
8487
8499
  }
8488
- _createRow(e, t, n = !1, r = !1) {
8489
- let i = document.createElement("span"), a = this._isSubmenuItem();
8490
- if (i.className = a ? "inline-flex w-full items-center justify-start gap-2" : `inline-flex w-full items-center ${r ? "justify-center" : "justify-center md:justify-start"} gap-2`, t) {
8500
+ _createRow(e, t, n = !1) {
8501
+ let r = document.createElement("span");
8502
+ if (this._isSubmenuItem(), r.className = "inline-flex w-full items-center justify-start gap-2", t) {
8491
8503
  let e = document.createElement("mint-icon");
8492
- e.setAttribute("name", t), e.className = "h-4 w-4 shrink-0", i.appendChild(e);
8504
+ e.setAttribute("name", t), e.className = "h-4 w-4 shrink-0", r.appendChild(e);
8493
8505
  }
8494
- let o = document.createElement("span");
8495
- if (o.className = a ? "inline truncate" : `${r ? "hidden" : "hidden md:inline"} truncate`, o.textContent = e, i.appendChild(o), n && !r) {
8506
+ let i = document.createElement("span");
8507
+ if (i.className = "inline truncate", i.textContent = e, r.appendChild(i), n) {
8496
8508
  let e = document.createElement("mint-icon");
8497
- e.setAttribute("name", this._isExpanded() ? "caret-down" : "caret-right"), e.className = "ml-auto hidden h-4 w-4 text-gray-500 md:inline-flex dark:text-gray-400", i.appendChild(e);
8509
+ e.setAttribute("name", this._isExpanded() ? "caret-down" : "caret-right"), e.className = "ml-auto inline-flex h-4 w-4 shrink-0 text-gray-500 dark:text-gray-400", r.appendChild(e);
8498
8510
  }
8499
- return i;
8511
+ return r;
8500
8512
  }
8501
8513
  _buildSimpleLink() {
8502
8514
  let e = this._getHref(), t = this._getLabel(), n = this._getIcon(), r = e ? document.createElement("a") : document.createElement("button");
@@ -8506,20 +8518,20 @@ var P = class extends HTMLElement {
8506
8518
  let e = this._getLabel(), t = this._getIcon(), n = Array.from(this.querySelectorAll(":scope > [slot=\"submenu\"]")), r = n.length > 0 ? n : this._submenuContainer ? Array.from(this._submenuContainer.children) : [], i = document.createElement("div");
8507
8519
  i.className = "w-full";
8508
8520
  let a = document.createElement("button");
8509
- a.type = "button", a.className = `${this._getBaseClasses()} hidden md:block`, a.setAttribute("aria-expanded", String(this._isExpanded())), a.appendChild(this._createRow(e, t, !0)), a.onclick = () => {
8521
+ a.type = "button", a.className = `${this._getBaseClasses()} block w-full`, a.setAttribute("aria-expanded", String(this._isExpanded())), a.appendChild(this._createRow(e, t, !0)), a.onclick = () => {
8510
8522
  this.setAttribute("expanded", this._isExpanded() ? "false" : "true");
8511
- }, this._triggerId = this.id || `mint-sidenav-link-${Math.random().toString(36).slice(2, 9)}`, this.id ||= this._triggerId;
8512
- let o = document.createElement("button");
8513
- o.type = "button", o.id = `${this._triggerId}-mobile-trigger`, o.className = `${this._getBaseClasses()} md:hidden`, o.appendChild(this._createRow(e, t, !1, !0)), this._submenuContainer = document.createElement("div"), this._submenuContainer.className = `hidden md:block mt-1 ml-5 border-l border-gray-200 pl-2 space-y-1 dark:border-gray-700 ${this._isExpanded() ? "" : "md:hidden"}`, r.forEach((e) => {
8523
+ }, this._submenuContainer = document.createElement("div"), this._submenuContainer.className = [
8524
+ "mt-1",
8525
+ "ml-5",
8526
+ "border-l",
8527
+ "border-gray-200",
8528
+ "pl-2",
8529
+ "space-y-1",
8530
+ "dark:border-gray-700",
8531
+ this._isExpanded() ? "block" : "hidden"
8532
+ ].join(" "), r.forEach((e) => {
8514
8533
  e.setAttribute("submenu-item", "true"), e.setAttribute("slot", "submenu"), this._submenuContainer?.appendChild(e);
8515
- }), this._mobilePopover = document.createElement("mint-popover"), this._mobilePopover.setAttribute("trigger-id", o.id), this._mobilePopover.setAttribute("direction", "right"), this._mobilePopover.setAttribute("padding", "0"), this._mobilePopover.className = "md:hidden";
8516
- let s = document.createElement("div");
8517
- s.className = "w-56 rounded-xl border border-gray-200 bg-white p-2 shadow-xl dark:border-gray-700 dark:bg-gray-900";
8518
- let c = document.createElement("div");
8519
- c.className = "px-2 pb-1 text-xs uppercase tracking-wide text-gray-500 dark:text-gray-400", c.textContent = e, s.appendChild(c), r.forEach((e) => {
8520
- let t = e.cloneNode(!0);
8521
- t.removeAttribute("slot"), t.setAttribute("submenu-item", "true"), s.appendChild(t);
8522
- }), this._mobilePopover.appendChild(s), i.appendChild(a), i.appendChild(o), i.appendChild(this._submenuContainer), i.appendChild(this._mobilePopover), this.replaceChildren(i), this._trigger = a, this._mobileTrigger = o;
8534
+ }), i.appendChild(a), i.appendChild(this._submenuContainer), this.replaceChildren(i), this._trigger = a;
8523
8535
  }
8524
8536
  render() {
8525
8537
  this._hasSubmenu() && !this._isSubmenuItem() ? this._buildDropdownLink() : this._buildSimpleLink();
@@ -8545,9 +8557,9 @@ var F = class extends HTMLElement {
8545
8557
  return this.getAttribute("name") || "";
8546
8558
  }
8547
8559
  render() {
8548
- this._container || (this._container = document.createElement("section"), this._container.className = "mb-4", this.appendChild(this._container)), this._title || (this._title = document.createElement("mint-text"), this._title.setAttribute("size", "small"), this._title.setAttribute("bold", "true"), this._title.className = "mb-2 hidden uppercase tracking-wide text-gray-500 md:block dark:text-gray-400", this._container.appendChild(this._title));
8560
+ this._container || (this._container = document.createElement("section"), this._container.className = "mb-4", this.appendChild(this._container)), this._title || (this._title = document.createElement("mint-text"), this._title.setAttribute("size", "small"), this._title.setAttribute("bold", "true"), this._title.className = "mb-2 uppercase tracking-wide text-gray-500 dark:text-gray-400 px-3", this._container.appendChild(this._title));
8549
8561
  let e = this._getName();
8550
- this._title.textContent = e, e.trim().length === 0 ? (this._title.classList.add("hidden"), this._title.classList.remove("md:block", "mb-2")) : this._title.classList.add("hidden", "md:block", "mb-2"), this._list || (this._list = document.createElement("div"), this._list.className = "space-y-1", this._container.appendChild(this._list)), Array.from(this.children).filter((e) => e !== this._container && e.tagName === "MINT-SIDENAV-LINK").forEach((e) => {
8562
+ this._title.textContent = e, e.trim().length === 0 ? (this._title.classList.add("hidden"), this._title.classList.remove("block", "mb-2")) : (this._title.classList.remove("hidden"), this._title.classList.add("block", "mb-2")), this._list || (this._list = document.createElement("div"), this._list.className = "space-y-1", this._container.appendChild(this._list)), Array.from(this.children).filter((e) => e !== this._container && e.tagName === "MINT-SIDENAV-LINK").forEach((e) => {
8551
8563
  this._list && e.parentElement !== this._list && this._list.appendChild(e);
8552
8564
  });
8553
8565
  }
@@ -8617,17 +8629,17 @@ var L = class extends HTMLElement {
8617
8629
  }
8618
8630
  render() {
8619
8631
  let e = Array.from(this.children).filter((e) => e !== this._wrapper && e.getAttribute("slot") === "action-links");
8620
- this._wrapper || (this._wrapper = document.createElement("div"), this._wrapper.className = "relative", this.appendChild(this._wrapper)), this._wrapper.innerHTML = "", this._trigger = document.createElement("button"), this._trigger.type = "button", this._trigger.id = this._triggerId, this._trigger.className = "flex w-full cursor-pointer items-center gap-3 rounded-xl border border-gray-200 bg-gray-50 px-2 py-2 text-left transition-colors hover:bg-gray-100 md:px-3 dark:border-gray-700 dark:bg-gray-800 dark:hover:bg-gray-700";
8632
+ this._wrapper || (this._wrapper = document.createElement("div"), this._wrapper.className = "relative", this.appendChild(this._wrapper)), this._wrapper.innerHTML = "", this._trigger = document.createElement("button"), this._trigger.type = "button", this._trigger.id = this._triggerId, this._trigger.className = "flex w-full cursor-pointer items-center gap-3 rounded-xl border border-gray-200 bg-gray-50 px-3 py-2 text-left transition-colors hover:bg-gray-100 dark:border-gray-700 dark:bg-gray-800 dark:hover:bg-gray-700";
8621
8633
  let t = document.createElement("div");
8622
8634
  t.className = "inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-semibold text-white", t.textContent = this._getTitle().split(" ").map((e) => e[0]).join("").slice(0, 2).toUpperCase();
8623
8635
  let n = document.createElement("div");
8624
- n.className = "hidden min-w-0 flex-1 md:block";
8636
+ n.className = "min-w-0 flex-1";
8625
8637
  let r = document.createElement("mint-text");
8626
8638
  r.setAttribute("size", "body"), r.setAttribute("bold", "true"), r.className = "truncate text-gray-900 dark:text-gray-100", r.textContent = this._getTitle();
8627
8639
  let i = document.createElement("mint-text");
8628
8640
  i.setAttribute("size", "small"), i.setAttribute("variant", "muted"), i.className = "truncate", i.textContent = this._getSubtitle();
8629
8641
  let a = document.createElement("div");
8630
- a.className = "mint-sidenav-action-menu-caret hidden pointer-events-none z-10 md:flex md:flex-col md:items-center";
8642
+ a.className = "mint-sidenav-action-menu-caret pointer-events-none z-10 flex flex-col items-center";
8631
8643
  let o = document.createElement("mint-icon");
8632
8644
  o.setAttribute("name", "caret-up"), o.className = "h-[.9em] w-[.9em] text-gray-400 dark:text-gray-500 mb-[-.2rem]";
8633
8645
  let s = document.createElement("mint-icon");
@@ -8645,30 +8657,112 @@ customElements.get("mint-sidenav-action-menu") || customElements.define("mint-si
8645
8657
  //#region src/components/side-navigation/SideNavigation.ts
8646
8658
  var R = class extends HTMLElement {
8647
8659
  constructor(...e) {
8648
- super(...e), this._container = null, this._header = null, this._content = null, this._footer = null;
8660
+ super(...e), this._backdrop = null, this._container = null, this._header = null, this._content = null, this._footer = null, this._escapeHandler = null, this._mediaQuery = null, this._mediaListener = null;
8649
8661
  }
8650
8662
  static get observedAttributes() {
8651
- return ["user-name", "user-status"];
8663
+ return [
8664
+ "user-name",
8665
+ "user-status",
8666
+ "open",
8667
+ "drawer-top-class"
8668
+ ];
8652
8669
  }
8653
8670
  connectedCallback() {
8654
- this.classList.add("block", "h-screen", "min-h-screen"), this.render();
8671
+ this.classList.add("relative", "block", "shrink-0", "w-0", "overflow-visible", "min-[1100px]:w-[17rem]", "min-[1100px]:shrink-0"), this._attachEscapeListener(), this._attachMediaListener(), this.render();
8672
+ }
8673
+ disconnectedCallback() {
8674
+ this._detachEscapeListener(), this._detachMediaListener();
8655
8675
  }
8656
8676
  attributeChangedCallback(e, t, n) {
8657
8677
  t !== n && this.render();
8658
8678
  }
8679
+ _attachEscapeListener() {
8680
+ this._escapeHandler || (this._escapeHandler = (e) => {
8681
+ e.key === "Escape" && this.getAttribute("open") === "true" && this.removeAttribute("open");
8682
+ }, document.addEventListener("keydown", this._escapeHandler));
8683
+ }
8684
+ _detachEscapeListener() {
8685
+ this._escapeHandler &&= (document.removeEventListener("keydown", this._escapeHandler), null);
8686
+ }
8687
+ _attachMediaListener() {
8688
+ this._mediaListener || (this._mediaQuery = window.matchMedia("(min-width: 1100px)"), this._mediaListener = () => {
8689
+ this._mediaQuery?.matches && this.removeAttribute("open");
8690
+ }, this._mediaQuery.addEventListener("change", this._mediaListener));
8691
+ }
8692
+ _detachMediaListener() {
8693
+ this._mediaQuery && this._mediaListener && this._mediaQuery.removeEventListener("change", this._mediaListener), this._mediaQuery = null, this._mediaListener = null;
8694
+ }
8659
8695
  getUserName() {
8660
8696
  return this.getAttribute("user-name") || "Acme Inc";
8661
8697
  }
8662
8698
  getUserStatus() {
8663
8699
  return this.getAttribute("user-status") || "Enterprise";
8664
8700
  }
8701
+ _isOpen() {
8702
+ return this.getAttribute("open") === "true";
8703
+ }
8704
+ _ensureBackdrop() {
8705
+ this._backdrop || (this._backdrop = document.createElement("div"), this._backdrop.setAttribute("aria-hidden", "true"), this._backdrop.addEventListener("click", () => this.removeAttribute("open")), this.insertBefore(this._backdrop, this.firstChild));
8706
+ }
8665
8707
  _ensureContainer() {
8666
- this._container || (this._container = document.createElement("aside"), this._container.className = "flex h-screen min-h-screen w-[4.75rem] flex-col border-r border-gray-200 bg-white p-2 md:w-[17rem] md:p-3 dark:border-gray-700 dark:bg-gray-900", this.appendChild(this._container));
8708
+ this._container || (this._container = document.createElement("aside"), this.appendChild(this._container));
8709
+ }
8710
+ _syncShell() {
8711
+ let e = "max-[1099.98px]:top-14", t = this._isOpen();
8712
+ if (this._backdrop && (this._backdrop.className = [
8713
+ "fixed",
8714
+ e,
8715
+ "left-0",
8716
+ "right-0",
8717
+ "bottom-0",
8718
+ "z-40",
8719
+ "bg-black/50",
8720
+ "transition-opacity",
8721
+ "duration-200",
8722
+ "min-[1100px]:hidden",
8723
+ t ? "pointer-events-auto opacity-100" : "pointer-events-none opacity-0"
8724
+ ].join(" ")), this._container) {
8725
+ let n = t ? "max-[1099.98px]:translate-x-0" : "max-[1099.98px]:-translate-x-full";
8726
+ this._container.className = [
8727
+ "flex",
8728
+ "min-h-0",
8729
+ "flex-col",
8730
+ "border-r",
8731
+ "border-gray-200",
8732
+ "bg-white",
8733
+ "p-2",
8734
+ "dark:border-gray-700",
8735
+ "dark:bg-gray-900",
8736
+ "w-[4.75rem]",
8737
+ "max-[1099.98px]:fixed",
8738
+ e,
8739
+ "max-[1099.98px]:bottom-0",
8740
+ "max-[1099.98px]:left-0",
8741
+ "max-[1099.98px]:z-50",
8742
+ "max-[1099.98px]:h-auto",
8743
+ "max-[1099.98px]:w-[17rem]",
8744
+ "max-[1099.98px]:max-w-[85vw]",
8745
+ "max-[1099.98px]:shadow-xl",
8746
+ "max-[1099.98px]:transition-transform",
8747
+ "max-[1099.98px]:duration-200",
8748
+ "max-[1099.98px]:ease-out",
8749
+ n,
8750
+ "min-[1100px]:fixed",
8751
+ "min-[1100px]:left-0",
8752
+ "min-[1100px]:top-14",
8753
+ "min-[1100px]:bottom-0",
8754
+ "min-[1100px]:z-30",
8755
+ "min-[1100px]:w-[17rem]",
8756
+ "min-[1100px]:translate-x-0",
8757
+ "min-[1100px]:p-3",
8758
+ "min-[1100px]:shadow-none"
8759
+ ].join(" ");
8760
+ }
8667
8761
  }
8668
8762
  _buildUserHeader() {
8669
8763
  if (!this._container) return;
8670
8764
  this._header || (this._header = document.createElement("div"), this._header.className = "mb-4", this._container.appendChild(this._header));
8671
- let e = Array.from(this.children).find((e) => e.getAttribute("slot") === "action-header");
8765
+ let e = Array.from(this.querySelectorAll("[slot=\"action-header\"]")).find((e) => e !== this._backdrop && e !== this._container);
8672
8766
  if (e) {
8673
8767
  this._header.replaceChildren(e);
8674
8768
  return;
@@ -8677,22 +8771,160 @@ var R = class extends HTMLElement {
8677
8771
  t.setAttribute("title", this.getUserName()), t.setAttribute("subtitle", this.getUserStatus()), this._header.replaceChildren(t);
8678
8772
  }
8679
8773
  _replaceSlottedChildren(e, t) {
8680
- let n = Array.from(this.querySelectorAll(`[slot="${t}"]`)).filter((e) => e !== this._container);
8774
+ let n = Array.from(this.querySelectorAll(`[slot="${t}"]`)).filter((e) => e !== this._container && e !== this._backdrop);
8681
8775
  e.replaceChildren(...n);
8682
8776
  }
8683
8777
  _buildContent() {
8684
- this._container && (this._content || (this._content = document.createElement("div"), this._content.className = "grow overflow-y-auto", this._container.appendChild(this._content)), this._replaceSlottedChildren(this._content, "links"));
8778
+ this._container && (this._content || (this._content = document.createElement("div"), this._content.className = "min-h-0 grow overflow-y-auto", this._container.appendChild(this._content)), this._replaceSlottedChildren(this._content, "links"));
8685
8779
  }
8686
8780
  _buildFooter() {
8687
8781
  if (!this._container) return;
8688
- this._footer || (this._footer = document.createElement("div"), this._footer.className = "mt-auto border-t border-gray-200 pt-3 dark:border-gray-700", this._container.appendChild(this._footer));
8782
+ this._footer || (this._footer = document.createElement("div"), this._footer.className = "mt-auto border-t border-gray-200 py-3 dark:border-gray-700", this._container.appendChild(this._footer));
8689
8783
  let e = document.createElement("div");
8690
8784
  e.className = "space-y-1", this._replaceSlottedChildren(e, "bottom-links"), this._footer.innerHTML = "", this._footer.appendChild(e);
8691
8785
  }
8692
8786
  render() {
8693
- this._ensureContainer(), this._buildUserHeader(), this._buildContent(), this._buildFooter();
8787
+ this._ensureBackdrop(), this._ensureContainer(), this._syncShell(), this._buildUserHeader(), this._buildContent(), this._buildFooter();
8694
8788
  }
8695
8789
  };
8696
8790
  customElements.get("mint-side-navigation") || customElements.define("mint-side-navigation", R);
8697
8791
  //#endregion
8698
- export { E as Alert, l as BackButton, r as Button, r as default, s as Card, N as Chart, m as Checkbox, C as Chip, g as Choice, T as Clickable, v as DatePicker, b as Dropzone, x as Form, d as Grid, n as Icon, _ as Input, c as Link, f as Modal, O as OffCanvas, u as Page, p as Popover, D as ResourceTable, y as Select, R as SideNavigation, I as SideNavigationActionLinks, L as SideNavigationActionMenu, P as SideNavigationLink, F as SideNavigationLinks, t as Spinner, o as Stack, i as Switch, k as Tab, j as TabContent, A as TabList, S as Table, M as Tabs, w as Tags, a as Text };
8792
+ //#region src/components/top-navigation/TopNavigation.ts
8793
+ var z = class extends HTMLElement {
8794
+ constructor(...e) {
8795
+ super(...e), this._bar = null, this._menuButton = null, this._logoLink = null, this._menuClickHandler = null;
8796
+ }
8797
+ static get observedAttributes() {
8798
+ return [
8799
+ "logo-src",
8800
+ "logo-href",
8801
+ "logo-alt",
8802
+ "menu-target"
8803
+ ];
8804
+ }
8805
+ connectedCallback() {
8806
+ this.classList.add("sticky", "top-0", "z-50", "w-full", "shrink-0", "bg-white", "dark:bg-gray-900"), this.render();
8807
+ }
8808
+ disconnectedCallback() {
8809
+ this._menuButton && this._menuClickHandler && (this._menuButton.removeEventListener("click", this._menuClickHandler), this._menuClickHandler = null);
8810
+ }
8811
+ attributeChangedCallback(e, t, n) {
8812
+ t !== n && this.render();
8813
+ }
8814
+ _getLogoSrc() {
8815
+ return this.getAttribute("logo-src") || "";
8816
+ }
8817
+ _getLogoHref() {
8818
+ return this.getAttribute("logo-href") || "/";
8819
+ }
8820
+ _getLogoAlt() {
8821
+ return this.getAttribute("logo-alt") || "Home";
8822
+ }
8823
+ _getMenuTargetId() {
8824
+ return (this.getAttribute("menu-target") || "").replace(/^#/, "");
8825
+ }
8826
+ _toggleMenuTarget() {
8827
+ let e = this._getMenuTargetId();
8828
+ if (!e) return;
8829
+ let t = document.getElementById(e);
8830
+ !t || t.tagName !== "MINT-SIDE-NAVIGATION" || (t.getAttribute("open") === "true" ? t.removeAttribute("open") : t.setAttribute("open", "true"));
8831
+ }
8832
+ render() {
8833
+ if (this._bar || (this._bar = document.createElement("div"), this._bar.className = "flex h-14 w-full items-center gap-2 border-b border-gray-200 px-3 dark:border-gray-700", this.appendChild(this._bar)), !this._menuButton) {
8834
+ this._menuButton = document.createElement("button"), this._menuButton.type = "button", this._menuButton.className = "inline-flex h-10 w-10 shrink-0 cursor-pointer items-center justify-center rounded-lg border border-transparent text-gray-700 transition-colors hover:bg-black/5 min-[1100px]:hidden dark:text-gray-200 dark:hover:bg-white/10", this._menuButton.setAttribute("aria-label", "Open navigation menu");
8835
+ let e = document.createElement("mint-icon");
8836
+ e.setAttribute("name", "menu"), e.className = "h-5 w-5", this._menuButton.appendChild(e), this._menuClickHandler = () => this._toggleMenuTarget(), this._menuButton.addEventListener("click", this._menuClickHandler), this._bar.appendChild(this._menuButton);
8837
+ }
8838
+ let e = !!this._getMenuTargetId();
8839
+ this._menuButton.classList.toggle("hidden", !e), this._logoLink || (this._logoLink = document.createElement("a"), this._logoLink.className = "flex shrink-0 items-center", this._bar.appendChild(this._logoLink)), this._logoLink.href = this._getLogoHref(), this._logoLink.setAttribute("aria-label", this._getLogoAlt());
8840
+ let t = this._getLogoSrc();
8841
+ if (t) {
8842
+ let e = document.createElement("img");
8843
+ e.className = "h-8 max-w-[10rem] object-contain", e.decoding = "async", e.src = t, e.alt = this._getLogoAlt(), this._logoLink.replaceChildren(e), this._logoLink.classList.remove("pointer-events-none", "opacity-40");
8844
+ } else {
8845
+ this._logoLink.replaceChildren(), this._logoLink.classList.add("pointer-events-none", "opacity-40");
8846
+ let e = document.createElement("span");
8847
+ e.className = "text-sm font-semibold text-gray-400 dark:text-gray-500", e.textContent = "Logo", this._logoLink.appendChild(e);
8848
+ }
8849
+ let n = this._bar.querySelector("[data-mint-topnav-spacer]");
8850
+ n || (n = document.createElement("div"), n.setAttribute("data-mint-topnav-spacer", "true"), n.className = "min-w-0 flex-1", this._bar.appendChild(n));
8851
+ let r = Array.from(this.querySelectorAll("[slot=\"actions\"]")), i = this._bar.querySelector("[data-mint-topnav-actions]");
8852
+ i || (i = document.createElement("div"), i.setAttribute("data-mint-topnav-actions", "true"), i.className = "flex shrink-0 items-center gap-2", this._bar.appendChild(i)), i.replaceChildren(...r);
8853
+ }
8854
+ };
8855
+ customElements.get("mint-top-navigation") || customElements.define("mint-top-navigation", z);
8856
+ //#endregion
8857
+ //#region src/components/bottom-navigation/BottomNavigation.ts
8858
+ var B = class extends HTMLElement {
8859
+ constructor(...e) {
8860
+ super(...e), this._lastScrollY = 0, this._scrollHandler = null;
8861
+ }
8862
+ connectedCallback() {
8863
+ this.classList.add("fixed", "bottom-0", "left-0", "right-0", "z-30", "flex", "w-full", "items-stretch", "justify-around", "gap-1", "border-t", "border-gray-200", "bg-white", "px-1", "pt-1", "pb-[env(safe-area-inset-bottom,0px)]", "min-[1100px]:hidden", "transition-transform", "duration-200", "ease-out", "translate-y-0", "dark:border-gray-700", "dark:bg-gray-900"), this.setAttribute("role", "navigation"), this.setAttribute("aria-label", "Primary"), this._lastScrollY = window.scrollY, this._attachScrollListener();
8864
+ }
8865
+ disconnectedCallback() {
8866
+ this._detachScrollListener();
8867
+ }
8868
+ _attachScrollListener() {
8869
+ this._scrollHandler || (this._scrollHandler = () => {
8870
+ let e = window.scrollY;
8871
+ if (e <= 8) {
8872
+ this.classList.remove("translate-y-full"), this.classList.add("translate-y-0"), this._lastScrollY = e;
8873
+ return;
8874
+ }
8875
+ let t = e - this._lastScrollY;
8876
+ Math.abs(t) < 4 || (t > 0 ? (this.classList.remove("translate-y-0"), this.classList.add("translate-y-full")) : (this.classList.remove("translate-y-full"), this.classList.add("translate-y-0")), this._lastScrollY = e);
8877
+ }, window.addEventListener("scroll", this._scrollHandler, { passive: !0 }));
8878
+ }
8879
+ _detachScrollListener() {
8880
+ this._scrollHandler &&= (window.removeEventListener("scroll", this._scrollHandler), null);
8881
+ }
8882
+ };
8883
+ customElements.get("mint-bottom-navigation") || customElements.define("mint-bottom-navigation", B);
8884
+ //#endregion
8885
+ //#region src/components/bottom-navigation/BottomNavItem.ts
8886
+ var V = class extends HTMLElement {
8887
+ constructor(...e) {
8888
+ super(...e), this._root = null;
8889
+ }
8890
+ static get observedAttributes() {
8891
+ return [
8892
+ "icon",
8893
+ "label",
8894
+ "href",
8895
+ "active"
8896
+ ];
8897
+ }
8898
+ connectedCallback() {
8899
+ this.classList.add("contents"), this.render();
8900
+ }
8901
+ attributeChangedCallback(e, t, n) {
8902
+ t !== n && this.render();
8903
+ }
8904
+ _isActive() {
8905
+ return this.getAttribute("active") === "true";
8906
+ }
8907
+ _getLabel() {
8908
+ return this.getAttribute("label") || "";
8909
+ }
8910
+ _getIcon() {
8911
+ return this.getAttribute("icon") || "";
8912
+ }
8913
+ _getHref() {
8914
+ return this.getAttribute("href");
8915
+ }
8916
+ render() {
8917
+ let e = this._getHref(), t = this._getLabel(), n = this._getIcon(), r = this._isActive(), i = r ? "text-blue-600 dark:text-blue-400" : "text-gray-600 hover:bg-black/5 dark:text-gray-300 dark:hover:bg-white/10", a;
8918
+ e ? (a = document.createElement("a"), a.href = e) : (a = document.createElement("button"), a.type = "button"), a.className = `flex min-w-0 flex-1 flex-col items-center justify-center gap-1 rounded-lg px-1 py-2 text-center text-[11px] font-medium leading-tight transition-colors ${i}`, a.setAttribute("aria-current", r ? "page" : "false"), a.setAttribute("aria-label", t || "Navigation item");
8919
+ let o = document.createElement("span");
8920
+ if (o.className = "inline-flex h-6 w-6 items-center justify-center", n) {
8921
+ let e = document.createElement("mint-icon");
8922
+ e.setAttribute("name", n), e.className = r ? "h-6 w-6" : "h-6 w-6 opacity-90", o.appendChild(e);
8923
+ }
8924
+ let s = document.createElement("span");
8925
+ s.className = "block w-full truncate", s.textContent = t, a.appendChild(o), a.appendChild(s), this.replaceChildren(a), this._root = a;
8926
+ }
8927
+ };
8928
+ customElements.get("mint-bottom-nav-item") || customElements.define("mint-bottom-nav-item", V);
8929
+ //#endregion
8930
+ export { E as Alert, l as BackButton, V as BottomNavItem, B as BottomNavigation, r as Button, r as default, s as Card, N as Chart, m as Checkbox, C as Chip, g as Choice, T as Clickable, v as DatePicker, b as Dropzone, x as Form, d as Grid, n as Icon, _ as Input, c as Link, f as Modal, O as OffCanvas, u as Page, p as Popover, D as ResourceTable, y as Select, R as SideNavigation, I as SideNavigationActionLinks, L as SideNavigationActionMenu, P as SideNavigationLink, F as SideNavigationLinks, t as Spinner, o as Stack, i as Switch, k as Tab, j as TabContent, A as TabList, S as Table, M as Tabs, w as Tags, a as Text, z as TopNavigation };
@@ -133,4 +133,14 @@ var h = {
133
133
  };
134
134
  t(h);
135
135
  //#endregion
136
- export { d as a, c, a as d, i as f, t as h, f as i, s as l, n as m, m as n, u as o, r as p, p as r, l as s, h as t, o as u };
136
+ //#region src/components/icon/icons/menu.ts
137
+ var g = {
138
+ name: "menu",
139
+ viewBox: "0 0 24 24",
140
+ path: "M4 6h16M4 12h16M4 18h16",
141
+ strokeLinecap: "round",
142
+ strokeLinejoin: "round"
143
+ };
144
+ t(g);
145
+ //#endregion
146
+ export { f as a, l as c, o as d, a as f, t as g, n as h, p as i, c as l, r as m, h as n, d as o, i as p, m as r, u as s, g as t, s as u };
@@ -1 +1 @@
1
- var e=new Map;function t(t){e.set(t.name,t)}function n(t){return e.get(t)}var r={name:`close`,viewBox:`0 0 24 24`,path:`M6 18L18 6M6 6l12 12`,strokeLinecap:`round`,strokeLinejoin:`round`};t(r);var i={name:`check`,viewBox:`0 0 24 24`,path:`M5 13l4 4L19 7`,strokeLinecap:`round`,strokeLinejoin:`round`};t(i);var a={name:`info`,viewBox:`0 0 24 24`,path:`M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z`,strokeLinecap:`round`,strokeLinejoin:`round`};t(a);var o={name:`success`,viewBox:`0 0 24 24`,path:`M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z`,strokeLinecap:`round`,strokeLinejoin:`round`};t(o);var s={name:`warning`,viewBox:`0 0 24 24`,path:`M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z`,strokeLinecap:`round`,strokeLinejoin:`round`};t(s);var c={name:`error`,viewBox:`0 0 24 24`,path:`M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z`,strokeLinecap:`round`,strokeLinejoin:`round`};t(c);var l={name:`sort-arrows`,viewBox:`0 0 24 24`,path:`M1 5l5-4m0 0l5 4m-5-4v22 M13 19l5 4m0 0l5-4m-5 4V1`,strokeLinecap:`round`,strokeLinejoin:`round`},u={name:`caret-left`,viewBox:`0 0 24 24`,path:`M15 19l-7-7 7-7`,strokeLinecap:`round`,strokeLinejoin:`round`};t(u);var d={name:`caret-right`,viewBox:`0 0 24 24`,path:`M9 5l7 7-7 7`,strokeLinecap:`round`,strokeLinejoin:`round`};t(d);var f={name:`caret-down`,viewBox:`0 0 24 24`,path:`M19 9l-7 7-7-7`,strokeLinecap:`round`,strokeLinejoin:`round`};t(f);var p={name:`caret-up`,viewBox:`0 0 24 24`,path:`M5 15l7-7 7 7`,strokeLinecap:`round`,strokeLinejoin:`round`};t(p);var m={name:`user`,viewBox:`0 0 24 24`,path:`M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z`,strokeLinecap:`round`,strokeLinejoin:`round`};t(m);var h={name:`plus`,viewBox:`0 0 24 24`,path:`M12 4v16m8-8H4`,strokeLinecap:`round`,strokeLinejoin:`round`};t(h),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return o}});
1
+ var e=new Map;function t(t){e.set(t.name,t)}function n(t){return e.get(t)}var r={name:`close`,viewBox:`0 0 24 24`,path:`M6 18L18 6M6 6l12 12`,strokeLinecap:`round`,strokeLinejoin:`round`};t(r);var i={name:`check`,viewBox:`0 0 24 24`,path:`M5 13l4 4L19 7`,strokeLinecap:`round`,strokeLinejoin:`round`};t(i);var a={name:`info`,viewBox:`0 0 24 24`,path:`M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z`,strokeLinecap:`round`,strokeLinejoin:`round`};t(a);var o={name:`success`,viewBox:`0 0 24 24`,path:`M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z`,strokeLinecap:`round`,strokeLinejoin:`round`};t(o);var s={name:`warning`,viewBox:`0 0 24 24`,path:`M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z`,strokeLinecap:`round`,strokeLinejoin:`round`};t(s);var c={name:`error`,viewBox:`0 0 24 24`,path:`M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z`,strokeLinecap:`round`,strokeLinejoin:`round`};t(c);var l={name:`sort-arrows`,viewBox:`0 0 24 24`,path:`M1 5l5-4m0 0l5 4m-5-4v22 M13 19l5 4m0 0l5-4m-5 4V1`,strokeLinecap:`round`,strokeLinejoin:`round`},u={name:`caret-left`,viewBox:`0 0 24 24`,path:`M15 19l-7-7 7-7`,strokeLinecap:`round`,strokeLinejoin:`round`};t(u);var d={name:`caret-right`,viewBox:`0 0 24 24`,path:`M9 5l7 7-7 7`,strokeLinecap:`round`,strokeLinejoin:`round`};t(d);var f={name:`caret-down`,viewBox:`0 0 24 24`,path:`M19 9l-7 7-7-7`,strokeLinecap:`round`,strokeLinejoin:`round`};t(f);var p={name:`caret-up`,viewBox:`0 0 24 24`,path:`M5 15l7-7 7 7`,strokeLinecap:`round`,strokeLinejoin:`round`};t(p);var m={name:`user`,viewBox:`0 0 24 24`,path:`M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z`,strokeLinecap:`round`,strokeLinejoin:`round`};t(m);var h={name:`plus`,viewBox:`0 0 24 24`,path:`M12 4v16m8-8H4`,strokeLinecap:`round`,strokeLinejoin:`round`};t(h);var g={name:`menu`,viewBox:`0 0 24 24`,path:`M4 6h16M4 12h16M4 18h16`,strokeLinecap:`round`,strokeLinejoin:`round`};t(g),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return s}});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monobill-mintui",
3
- "version": "0.4.7",
3
+ "version": "0.4.9",
4
4
  "description": "A modern framework-agnostic UI kit built as Web Components. Requires Tailwind CSS.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",