monobill-mintui 0.5.99 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/input/Input.d.ts +4 -0
- package/dist/components/input/Input.d.ts.map +1 -1
- package/dist/components/modal/Modal.d.ts +4 -0
- package/dist/components/modal/Modal.d.ts.map +1 -1
- package/dist/components/off-canvas/OffCanvas.d.ts +4 -0
- package/dist/components/off-canvas/OffCanvas.d.ts.map +1 -1
- package/dist/components/page/Page.d.ts +8 -0
- package/dist/components/page/Page.d.ts.map +1 -1
- package/dist/components/search/Search.d.ts +4 -0
- package/dist/components/search/Search.d.ts.map +1 -1
- package/dist/components/side-navigation/SideNavigation.d.ts +4 -0
- package/dist/components/side-navigation/SideNavigation.d.ts.map +1 -1
- package/dist/components/side-navigation/SideNavigationActionMenu.d.ts +5 -0
- package/dist/components/side-navigation/SideNavigationActionMenu.d.ts.map +1 -1
- package/dist/components/side-navigation/SideNavigationLink.d.ts +9 -0
- package/dist/components/side-navigation/SideNavigationLink.d.ts.map +1 -1
- package/dist/components/top-navigation/TopNavigation.d.ts +4 -0
- package/dist/components/top-navigation/TopNavigation.d.ts.map +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.js +158 -25
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1409,16 +1409,21 @@ var u = class extends HTMLElement {
|
|
|
1409
1409
|
];
|
|
1410
1410
|
}
|
|
1411
1411
|
constructor() {
|
|
1412
|
-
super(), this._pageContainer = null, this._header = null, this._titleElement = null, this._headingText = null, this._actionsSlot = null, this._bodySlot = null, this._darkModeObserver = null, this._backButton = null, this._backButtonHandler = null;
|
|
1412
|
+
super(), this._pageContainer = null, this._header = null, this._titleElement = null, this._headingText = null, this._actionsSlot = null, this._bodySlot = null, this._darkModeObserver = null, this._contentObserver = null, this._backButton = null, this._backButtonHandler = null, this._renderFrame = null;
|
|
1413
1413
|
}
|
|
1414
1414
|
connectedCallback() {
|
|
1415
|
-
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "block"), this.render(), this._observeDarkMode(), this._setupBackButtonListener();
|
|
1415
|
+
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "block"), this.render(), this._observeDarkMode(), this._observeContentMutations(), this._setupBackButtonListener();
|
|
1416
1416
|
}
|
|
1417
1417
|
attributeChangedCallback(e, t, n) {
|
|
1418
1418
|
t !== n && (e === "containered" && this._applyContainerClasses(), this.render());
|
|
1419
1419
|
}
|
|
1420
1420
|
disconnectedCallback() {
|
|
1421
|
-
this._darkModeObserver &&= (this._darkModeObserver.disconnect(), null), this._removeBackButtonListener();
|
|
1421
|
+
this._darkModeObserver &&= (this._darkModeObserver.disconnect(), null), this._contentObserver &&= (this._contentObserver.disconnect(), null), this._renderFrame !== null && (cancelAnimationFrame(this._renderFrame), this._renderFrame = null), this._removeBackButtonListener();
|
|
1422
|
+
}
|
|
1423
|
+
_scheduleRender() {
|
|
1424
|
+
this._renderFrame === null && (this._renderFrame = requestAnimationFrame(() => {
|
|
1425
|
+
this._renderFrame = null, this.render();
|
|
1426
|
+
}));
|
|
1422
1427
|
}
|
|
1423
1428
|
getHeading() {
|
|
1424
1429
|
return this.getAttribute("heading") || "";
|
|
@@ -1458,6 +1463,15 @@ var u = class extends HTMLElement {
|
|
|
1458
1463
|
attributeFilter: ["class"]
|
|
1459
1464
|
}));
|
|
1460
1465
|
}
|
|
1466
|
+
_observeContentMutations() {
|
|
1467
|
+
this._contentObserver ||= new MutationObserver(() => {
|
|
1468
|
+
this._scheduleRender();
|
|
1469
|
+
}), this._contentObserver.disconnect(), this._contentObserver.observe(this, {
|
|
1470
|
+
childList: !0,
|
|
1471
|
+
attributes: !0,
|
|
1472
|
+
attributeFilter: ["slot"]
|
|
1473
|
+
});
|
|
1474
|
+
}
|
|
1461
1475
|
_setupBackButtonListener() {
|
|
1462
1476
|
this._backButtonHandler ||= (e) => {
|
|
1463
1477
|
let t = e.target;
|
|
@@ -1550,17 +1564,22 @@ var f = class extends HTMLElement {
|
|
|
1550
1564
|
];
|
|
1551
1565
|
}
|
|
1552
1566
|
constructor() {
|
|
1553
|
-
super(), this._overlay = null, this._modal = null, this._header = null, this._headingSlot = null, this._bodySlot = null, this._actionsSlot = null, this._closeButton = null, this._darkModeObserver = null;
|
|
1567
|
+
super(), this._overlay = null, this._modal = null, this._header = null, this._headingSlot = null, this._bodySlot = null, this._actionsSlot = null, this._closeButton = null, this._darkModeObserver = null, this._contentObserver = null, this._renderFrame = null;
|
|
1554
1568
|
}
|
|
1555
1569
|
connectedCallback() {
|
|
1556
|
-
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "fixed", "inset-0", "z-50"), this.isOpen() || this.classList.add("hidden"), this.render(), this._observeDarkMode();
|
|
1570
|
+
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "fixed", "inset-0", "z-50"), this.isOpen() || this.classList.add("hidden"), this.render(), this._observeDarkMode(), this._observeContentMutations();
|
|
1557
1571
|
}
|
|
1558
1572
|
disconnectedCallback() {
|
|
1559
|
-
this._darkModeObserver &&= (this._darkModeObserver.disconnect(), null);
|
|
1573
|
+
this._darkModeObserver &&= (this._darkModeObserver.disconnect(), null), this._contentObserver &&= (this._contentObserver.disconnect(), null), this._renderFrame !== null && (cancelAnimationFrame(this._renderFrame), this._renderFrame = null);
|
|
1560
1574
|
}
|
|
1561
1575
|
attributeChangedCallback(e, t, n) {
|
|
1562
1576
|
t !== n && this.render();
|
|
1563
1577
|
}
|
|
1578
|
+
_scheduleRender() {
|
|
1579
|
+
this._renderFrame === null && (this._renderFrame = requestAnimationFrame(() => {
|
|
1580
|
+
this._renderFrame = null, this.render();
|
|
1581
|
+
}));
|
|
1582
|
+
}
|
|
1564
1583
|
getId() {
|
|
1565
1584
|
return this.getAttribute("id") || "";
|
|
1566
1585
|
}
|
|
@@ -1612,6 +1631,15 @@ var f = class extends HTMLElement {
|
|
|
1612
1631
|
attributeFilter: ["class"]
|
|
1613
1632
|
}));
|
|
1614
1633
|
}
|
|
1634
|
+
_observeContentMutations() {
|
|
1635
|
+
this._contentObserver ||= new MutationObserver(() => {
|
|
1636
|
+
this._scheduleRender();
|
|
1637
|
+
}), this._contentObserver.disconnect(), this._contentObserver.observe(this, {
|
|
1638
|
+
childList: !0,
|
|
1639
|
+
attributes: !0,
|
|
1640
|
+
attributeFilter: ["slot"]
|
|
1641
|
+
});
|
|
1642
|
+
}
|
|
1615
1643
|
_animateEnter() {
|
|
1616
1644
|
let e = this._modal?.querySelector(".modal-content");
|
|
1617
1645
|
e && (e.style.transform = "scale(0.97) translateY(10px)", e.style.opacity = "0", e.style.transition = "opacity 200ms ease-out, transform 200ms ease-out", this.classList.remove("hidden"), requestAnimationFrame(() => {
|
|
@@ -2647,13 +2675,13 @@ var _ = class extends HTMLElement {
|
|
|
2647
2675
|
];
|
|
2648
2676
|
}
|
|
2649
2677
|
constructor() {
|
|
2650
|
-
super(), this._input = null, this._textarea = null, this._element = null, this._wrapper = null, this._icon = null, this._prependSlotContainer = null, this._appendSlotContainer = null, this._colorPicker = null, this._colorTextInput = null, this._colorContainer = null, this._colorPickerWrapper = null, this._numberSpinnerContainer = null, this._numberIncrementButton = null, this._numberDecrementButton = null, this._slotResizeObserver = null, this._slotMutationObserver = null, this._focusHandler = null, this._blurHandler = null, this._clickHandler = null, this._clickOutsideHandler = null;
|
|
2678
|
+
super(), this._input = null, this._textarea = null, this._element = null, this._wrapper = null, this._icon = null, this._prependSlotContainer = null, this._appendSlotContainer = null, this._colorPicker = null, this._colorTextInput = null, this._colorContainer = null, this._colorPickerWrapper = null, this._numberSpinnerContainer = null, this._numberIncrementButton = null, this._numberDecrementButton = null, this._slotResizeObserver = null, this._slotMutationObserver = null, this._contentObserver = null, this._focusHandler = null, this._blurHandler = null, this._clickHandler = null, this._clickOutsideHandler = null, this._renderFrame = null;
|
|
2651
2679
|
}
|
|
2652
2680
|
connectedCallback() {
|
|
2653
|
-
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "inline-block"), this.render();
|
|
2681
|
+
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "inline-block"), this.render(), this._observeContentMutations();
|
|
2654
2682
|
}
|
|
2655
2683
|
disconnectedCallback() {
|
|
2656
|
-
this.removeEventListeners(), this._slotResizeObserver &&= (this._slotResizeObserver.disconnect(), null), this._slotMutationObserver &&= (this._slotMutationObserver.disconnect(), null);
|
|
2684
|
+
this.removeEventListeners(), this._slotResizeObserver &&= (this._slotResizeObserver.disconnect(), null), this._slotMutationObserver &&= (this._slotMutationObserver.disconnect(), null), this._contentObserver &&= (this._contentObserver.disconnect(), null), this._renderFrame !== null && (cancelAnimationFrame(this._renderFrame), this._renderFrame = null);
|
|
2657
2685
|
}
|
|
2658
2686
|
attributeChangedCallback(e, t, n) {
|
|
2659
2687
|
if (t !== n) {
|
|
@@ -2668,6 +2696,20 @@ var _ = class extends HTMLElement {
|
|
|
2668
2696
|
this.render();
|
|
2669
2697
|
}
|
|
2670
2698
|
}
|
|
2699
|
+
_scheduleRender() {
|
|
2700
|
+
this._renderFrame === null && (this._renderFrame = requestAnimationFrame(() => {
|
|
2701
|
+
this._renderFrame = null, this.render();
|
|
2702
|
+
}));
|
|
2703
|
+
}
|
|
2704
|
+
_observeContentMutations() {
|
|
2705
|
+
this._contentObserver ||= new MutationObserver(() => {
|
|
2706
|
+
this._scheduleRender();
|
|
2707
|
+
}), this._contentObserver.disconnect(), this._contentObserver.observe(this, {
|
|
2708
|
+
childList: !0,
|
|
2709
|
+
attributes: !0,
|
|
2710
|
+
attributeFilter: ["slot"]
|
|
2711
|
+
});
|
|
2712
|
+
}
|
|
2671
2713
|
getType() {
|
|
2672
2714
|
return this.getAttribute("type") || "text";
|
|
2673
2715
|
}
|
|
@@ -7573,17 +7615,22 @@ var M = class extends HTMLElement {
|
|
|
7573
7615
|
];
|
|
7574
7616
|
}
|
|
7575
7617
|
constructor() {
|
|
7576
|
-
super(), this._overlay = null, this._offCanvas = null, this._header = null, this._headingSlot = null, this._bodySlot = null, this._actionsSlot = null, this._closeButton = null, this._darkModeObserver = null;
|
|
7618
|
+
super(), this._overlay = null, this._offCanvas = null, this._header = null, this._headingSlot = null, this._bodySlot = null, this._actionsSlot = null, this._closeButton = null, this._darkModeObserver = null, this._contentObserver = null, this._renderFrame = null;
|
|
7577
7619
|
}
|
|
7578
7620
|
connectedCallback() {
|
|
7579
|
-
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "fixed", "inset-0", "z-50"), this.isOpen() || this.classList.add("hidden"), this.render(), this._observeDarkMode();
|
|
7621
|
+
this.classList.add("box-border", "m-0", "p-0", "border-0", "align-baseline", "fixed", "inset-0", "z-50"), this.isOpen() || this.classList.add("hidden"), this.render(), this._observeDarkMode(), this._observeContentMutations();
|
|
7580
7622
|
}
|
|
7581
7623
|
disconnectedCallback() {
|
|
7582
|
-
this._darkModeObserver &&= (this._darkModeObserver.disconnect(), null);
|
|
7624
|
+
this._darkModeObserver &&= (this._darkModeObserver.disconnect(), null), this._contentObserver &&= (this._contentObserver.disconnect(), null), this._renderFrame !== null && (cancelAnimationFrame(this._renderFrame), this._renderFrame = null);
|
|
7583
7625
|
}
|
|
7584
7626
|
attributeChangedCallback(e, t, n) {
|
|
7585
7627
|
t !== n && this.render();
|
|
7586
7628
|
}
|
|
7629
|
+
_scheduleRender() {
|
|
7630
|
+
this._renderFrame === null && (this._renderFrame = requestAnimationFrame(() => {
|
|
7631
|
+
this._renderFrame = null, this.render();
|
|
7632
|
+
}));
|
|
7633
|
+
}
|
|
7587
7634
|
getId() {
|
|
7588
7635
|
return this.getAttribute("id") || "";
|
|
7589
7636
|
}
|
|
@@ -7688,6 +7735,15 @@ var M = class extends HTMLElement {
|
|
|
7688
7735
|
attributeFilter: ["class"]
|
|
7689
7736
|
}));
|
|
7690
7737
|
}
|
|
7738
|
+
_observeContentMutations() {
|
|
7739
|
+
this._contentObserver ||= new MutationObserver(() => {
|
|
7740
|
+
this._scheduleRender();
|
|
7741
|
+
}), this._contentObserver.disconnect(), this._contentObserver.observe(this, {
|
|
7742
|
+
childList: !0,
|
|
7743
|
+
attributes: !0,
|
|
7744
|
+
attributeFilter: ["slot"]
|
|
7745
|
+
});
|
|
7746
|
+
}
|
|
7691
7747
|
_animateEnter() {
|
|
7692
7748
|
let e = this._offCanvas?.querySelector(".off-canvas-content");
|
|
7693
7749
|
if (!e) return;
|
|
@@ -9218,7 +9274,7 @@ customElements.get("mint-chart") || customElements.define("mint-chart", L);
|
|
|
9218
9274
|
//#region src/components/side-navigation/SideNavigationLink.ts
|
|
9219
9275
|
var R = class extends HTMLElement {
|
|
9220
9276
|
constructor(...e) {
|
|
9221
|
-
super(...e), this._trigger = null, this._submenuContainer = null;
|
|
9277
|
+
super(...e), this._trigger = null, this._submenuContainer = null, this._contentObserver = null, this._renderFrame = null;
|
|
9222
9278
|
}
|
|
9223
9279
|
static get observedAttributes() {
|
|
9224
9280
|
return [
|
|
@@ -9231,11 +9287,29 @@ var R = class extends HTMLElement {
|
|
|
9231
9287
|
];
|
|
9232
9288
|
}
|
|
9233
9289
|
connectedCallback() {
|
|
9234
|
-
this.classList.add("block"), this.render();
|
|
9290
|
+
this.classList.add("block"), this.render(), this._observeSubmenuMutations();
|
|
9291
|
+
}
|
|
9292
|
+
disconnectedCallback() {
|
|
9293
|
+
this._contentObserver &&= (this._contentObserver.disconnect(), null), this._renderFrame !== null && (cancelAnimationFrame(this._renderFrame), this._renderFrame = null);
|
|
9235
9294
|
}
|
|
9236
9295
|
attributeChangedCallback(e, t, n) {
|
|
9237
9296
|
t !== n && (this.render(), e === "active" && this._isSubmenuItem() && this._refreshDropdownAncestor());
|
|
9238
9297
|
}
|
|
9298
|
+
_scheduleRender() {
|
|
9299
|
+
this._renderFrame === null && (this._renderFrame = requestAnimationFrame(() => {
|
|
9300
|
+
this._renderFrame = null, this.render();
|
|
9301
|
+
}));
|
|
9302
|
+
}
|
|
9303
|
+
_observeSubmenuMutations() {
|
|
9304
|
+
this._contentObserver ||= new MutationObserver((e) => {
|
|
9305
|
+
e.some((e) => [...Array.from(e.addedNodes), ...Array.from(e.removedNodes)].some((e) => e instanceof HTMLElement && e.getAttribute("slot") === "submenu")) && this._scheduleRender();
|
|
9306
|
+
}), this._contentObserver.disconnect(), this._contentObserver.observe(this, {
|
|
9307
|
+
childList: !0,
|
|
9308
|
+
attributes: !0,
|
|
9309
|
+
attributeFilter: ["slot"],
|
|
9310
|
+
subtree: !1
|
|
9311
|
+
});
|
|
9312
|
+
}
|
|
9239
9313
|
_refreshDropdownAncestor() {
|
|
9240
9314
|
let e = this.parentElement;
|
|
9241
9315
|
for (; e;) {
|
|
@@ -9480,17 +9554,34 @@ customElements.get("mint-sidenav-action-links") || customElements.define("mint-s
|
|
|
9480
9554
|
//#region src/components/side-navigation/SideNavigationActionMenu.ts
|
|
9481
9555
|
var V = class extends HTMLElement {
|
|
9482
9556
|
constructor(...e) {
|
|
9483
|
-
super(...e), this._wrapper = null, this._trigger = null, this._popover = null, this._triggerId = "";
|
|
9557
|
+
super(...e), this._wrapper = null, this._trigger = null, this._popover = null, this._triggerId = "", this._contentObserver = null, this._renderFrame = null;
|
|
9484
9558
|
}
|
|
9485
9559
|
static get observedAttributes() {
|
|
9486
9560
|
return ["title", "subtitle"];
|
|
9487
9561
|
}
|
|
9488
9562
|
connectedCallback() {
|
|
9489
|
-
this.classList.add("block"), this._triggerId = this.id ? `${this.id}-trigger` : `mint-sidenav-action-menu-${Math.random().toString(36).slice(2, 9)}`, this.render();
|
|
9563
|
+
this.classList.add("block"), this._triggerId = this.id ? `${this.id}-trigger` : `mint-sidenav-action-menu-${Math.random().toString(36).slice(2, 9)}`, this.render(), this._observeContentMutations();
|
|
9564
|
+
}
|
|
9565
|
+
disconnectedCallback() {
|
|
9566
|
+
this._contentObserver &&= (this._contentObserver.disconnect(), null), this._renderFrame !== null && (cancelAnimationFrame(this._renderFrame), this._renderFrame = null);
|
|
9490
9567
|
}
|
|
9491
9568
|
attributeChangedCallback(e, t, n) {
|
|
9492
9569
|
t !== n && this.render();
|
|
9493
9570
|
}
|
|
9571
|
+
_scheduleRender() {
|
|
9572
|
+
this._renderFrame === null && (this._renderFrame = requestAnimationFrame(() => {
|
|
9573
|
+
this._renderFrame = null, this.render();
|
|
9574
|
+
}));
|
|
9575
|
+
}
|
|
9576
|
+
_observeContentMutations() {
|
|
9577
|
+
this._contentObserver ||= new MutationObserver(() => {
|
|
9578
|
+
this._scheduleRender();
|
|
9579
|
+
}), this._contentObserver.disconnect(), this._contentObserver.observe(this, {
|
|
9580
|
+
childList: !0,
|
|
9581
|
+
attributes: !0,
|
|
9582
|
+
attributeFilter: ["slot"]
|
|
9583
|
+
});
|
|
9584
|
+
}
|
|
9494
9585
|
_getTitle() {
|
|
9495
9586
|
return this.getAttribute("title") || "";
|
|
9496
9587
|
}
|
|
@@ -9540,7 +9631,7 @@ function U() {
|
|
|
9540
9631
|
}
|
|
9541
9632
|
var W = class extends HTMLElement {
|
|
9542
9633
|
constructor(...e) {
|
|
9543
|
-
super(...e), this._backdrop = null, this._container = null, this._header = null, this._content = null, this._footer = null, this._escapeHandler = null, this._mediaQuery = null, this._mediaListener = null, this._accordionHandler = null, this._urlChangeHandler = null, this._onMobileNavNavigateClick = (e) => {
|
|
9634
|
+
super(...e), this._backdrop = null, this._container = null, this._header = null, this._content = null, this._footer = null, this._escapeHandler = null, this._mediaQuery = null, this._mediaListener = null, this._accordionHandler = null, this._urlChangeHandler = null, this._contentObserver = null, this._renderFrame = null, this._onMobileNavNavigateClick = (e) => {
|
|
9544
9635
|
if (this._mediaQuery?.matches) return;
|
|
9545
9636
|
let t = e.target;
|
|
9546
9637
|
if (!(t instanceof Element)) return;
|
|
@@ -9559,14 +9650,19 @@ var W = class extends HTMLElement {
|
|
|
9559
9650
|
];
|
|
9560
9651
|
}
|
|
9561
9652
|
connectedCallback() {
|
|
9562
|
-
this.classList.add("relative", "block", "shrink-0", "w-0", "overflow-visible", "min-[1100px]:w-[17rem]", "min-[1100px]:shrink-0"), this._attachEscapeListener(), this._attachMediaListener(), this._attachAccordionListener(), this._attachUrlChangeListener(), this.render();
|
|
9653
|
+
this.classList.add("relative", "block", "shrink-0", "w-0", "overflow-visible", "min-[1100px]:w-[17rem]", "min-[1100px]:shrink-0"), this._attachEscapeListener(), this._attachMediaListener(), this._attachAccordionListener(), this._attachUrlChangeListener(), this._observeContentMutations(), this.render();
|
|
9563
9654
|
}
|
|
9564
9655
|
disconnectedCallback() {
|
|
9565
|
-
this._detachEscapeListener(), this._detachMediaListener(), this._detachAccordionListener(), this._detachUrlChangeListener();
|
|
9656
|
+
this._detachEscapeListener(), this._detachMediaListener(), this._detachAccordionListener(), this._detachUrlChangeListener(), this._contentObserver &&= (this._contentObserver.disconnect(), null), this._renderFrame !== null && (cancelAnimationFrame(this._renderFrame), this._renderFrame = null);
|
|
9566
9657
|
}
|
|
9567
9658
|
attributeChangedCallback(e, t, n) {
|
|
9568
9659
|
t !== n && this.render();
|
|
9569
9660
|
}
|
|
9661
|
+
_scheduleRender() {
|
|
9662
|
+
this._renderFrame === null && (this._renderFrame = requestAnimationFrame(() => {
|
|
9663
|
+
this._renderFrame = null, this.render();
|
|
9664
|
+
}));
|
|
9665
|
+
}
|
|
9570
9666
|
_attachEscapeListener() {
|
|
9571
9667
|
this._escapeHandler || (this._escapeHandler = (e) => {
|
|
9572
9668
|
e.key === "Escape" && this.getAttribute("open") === "true" && this.removeAttribute("open");
|
|
@@ -9602,6 +9698,15 @@ var W = class extends HTMLElement {
|
|
|
9602
9698
|
_detachUrlChangeListener() {
|
|
9603
9699
|
this._urlChangeHandler &&= (window.removeEventListener("popstate", this._urlChangeHandler), window.removeEventListener("hashchange", this._urlChangeHandler), window.removeEventListener(H, this._urlChangeHandler), null);
|
|
9604
9700
|
}
|
|
9701
|
+
_observeContentMutations() {
|
|
9702
|
+
this._contentObserver ||= new MutationObserver(() => {
|
|
9703
|
+
this._scheduleRender();
|
|
9704
|
+
}), this._contentObserver.disconnect(), this._contentObserver.observe(this, {
|
|
9705
|
+
childList: !0,
|
|
9706
|
+
attributes: !0,
|
|
9707
|
+
attributeFilter: ["slot"]
|
|
9708
|
+
});
|
|
9709
|
+
}
|
|
9605
9710
|
getUserName() {
|
|
9606
9711
|
return this.getAttribute("user-name") || "Acme Inc";
|
|
9607
9712
|
}
|
|
@@ -9701,7 +9806,7 @@ customElements.get("mint-side-navigation") || customElements.define("mint-side-n
|
|
|
9701
9806
|
//#region src/components/top-navigation/TopNavigation.ts
|
|
9702
9807
|
var G = class extends HTMLElement {
|
|
9703
9808
|
constructor(...e) {
|
|
9704
|
-
super(...e), this._bar = null, this._menuButton = null, this._logoLink = null, this._menuClickHandler = null, this._darkModeObserver = null, this._resizeHandler = null, this._desktopSearchInput = null, this._desktopSearchShell = null, this._mobileSearchButton = null, this._searchPanel = null, this._searchPanelInput = null, this._searchResultsWrap = null, this._searchStateWrap = null, this._searchDebounceId = null, this._searchAbortController = null, this._searchOpen = !1, this._searchQuery = "", this._globalKeydownHandler = null, this._docClickHandler = null;
|
|
9809
|
+
super(...e), this._bar = null, this._menuButton = null, this._logoLink = null, this._menuClickHandler = null, this._darkModeObserver = null, this._contentObserver = null, this._resizeHandler = null, this._desktopSearchInput = null, this._desktopSearchShell = null, this._mobileSearchButton = null, this._searchPanel = null, this._searchPanelInput = null, this._searchResultsWrap = null, this._searchStateWrap = null, this._searchDebounceId = null, this._searchAbortController = null, this._searchOpen = !1, this._searchQuery = "", this._globalKeydownHandler = null, this._docClickHandler = null, this._renderFrame = null;
|
|
9705
9810
|
}
|
|
9706
9811
|
static get observedAttributes() {
|
|
9707
9812
|
return [
|
|
@@ -9720,14 +9825,19 @@ var G = class extends HTMLElement {
|
|
|
9720
9825
|
];
|
|
9721
9826
|
}
|
|
9722
9827
|
connectedCallback() {
|
|
9723
|
-
this.classList.add("relative", "block", "h-14", "w-full", "shrink-0"), this._observeDarkMode(), this._attachResizeListener(), this._attachGlobalHandlers(), this.render();
|
|
9828
|
+
this.classList.add("relative", "block", "h-14", "w-full", "shrink-0"), this._observeDarkMode(), this._observeContentMutations(), this._attachResizeListener(), this._attachGlobalHandlers(), this.render();
|
|
9724
9829
|
}
|
|
9725
9830
|
disconnectedCallback() {
|
|
9726
|
-
this._menuButton && this._menuClickHandler && (this._menuButton.removeEventListener("click", this._menuClickHandler), this._menuClickHandler = null), this._disconnectDarkModeObserver(), this._detachResizeListener(), this._detachGlobalHandlers(), this._cancelSearchDebounce(), this._abortSearch();
|
|
9831
|
+
this._menuButton && this._menuClickHandler && (this._menuButton.removeEventListener("click", this._menuClickHandler), this._menuClickHandler = null), this._disconnectDarkModeObserver(), this._contentObserver &&= (this._contentObserver.disconnect(), null), this._renderFrame !== null && (cancelAnimationFrame(this._renderFrame), this._renderFrame = null), this._detachResizeListener(), this._detachGlobalHandlers(), this._cancelSearchDebounce(), this._abortSearch();
|
|
9727
9832
|
}
|
|
9728
9833
|
attributeChangedCallback(e, t, n) {
|
|
9729
9834
|
t !== n && this.render();
|
|
9730
9835
|
}
|
|
9836
|
+
_scheduleRender() {
|
|
9837
|
+
this._renderFrame === null && (this._renderFrame = requestAnimationFrame(() => {
|
|
9838
|
+
this._renderFrame = null, this.render();
|
|
9839
|
+
}));
|
|
9840
|
+
}
|
|
9731
9841
|
_isDarkMode() {
|
|
9732
9842
|
return document.documentElement.classList.contains("dark");
|
|
9733
9843
|
}
|
|
@@ -9899,6 +10009,15 @@ var G = class extends HTMLElement {
|
|
|
9899
10009
|
_disconnectDarkModeObserver() {
|
|
9900
10010
|
this._darkModeObserver &&= (this._darkModeObserver.disconnect(), null);
|
|
9901
10011
|
}
|
|
10012
|
+
_observeContentMutations() {
|
|
10013
|
+
this._contentObserver ||= new MutationObserver(() => {
|
|
10014
|
+
this._scheduleRender();
|
|
10015
|
+
}), this._contentObserver.disconnect(), this._contentObserver.observe(this, {
|
|
10016
|
+
childList: !0,
|
|
10017
|
+
attributes: !0,
|
|
10018
|
+
attributeFilter: ["slot"]
|
|
10019
|
+
});
|
|
10020
|
+
}
|
|
9902
10021
|
_attachResizeListener() {
|
|
9903
10022
|
this._resizeHandler || (this._resizeHandler = () => {
|
|
9904
10023
|
this.render(), this._positionSearchPanel();
|
|
@@ -9976,7 +10095,7 @@ customElements.get("mint-top-navigation") || customElements.define("mint-top-nav
|
|
|
9976
10095
|
//#region src/components/search/Search.ts
|
|
9977
10096
|
var K = class e extends HTMLElement {
|
|
9978
10097
|
constructor(...e) {
|
|
9979
|
-
super(...e), this._shell = null, this._desktopInput = null, this._panel = null, this._panelInner = null, this._panelInput = null, this._panelFiltersWrap = null, this._panelFiltersMainRow = null, this._panelFiltersChips = null, this._panelFiltersShowAllWrap = null, this._panelFiltersShowAllBtn = null, this._panelFiltersMorePanel = null, this._filtersMoreOpen = !1, this._filterOverflowObserver = null, this._filterOverflowZeroWidthRetries = 0, this._desktopFilterWrap = null, this._mobileFilterWrap = null, this._resultsWrap = null, this._stateWrap = null, this._customResultsWrap = null, this._query = "", this._searchOpen = !1, this._selectedFilters = [], this._selectedFilterBackspaceArmed = !1, this._debounceId = null, this._abortController = null, this._docPointerDownHandler = null, this._globalKeydownHandler = null, this._focusOutHandler = null, this._resizeHandler = null, this._desktopShortcutHint = null, this._panelSearchBar = null;
|
|
10098
|
+
super(...e), this._shell = null, this._desktopInput = null, this._panel = null, this._panelInner = null, this._panelInput = null, this._panelFiltersWrap = null, this._panelFiltersMainRow = null, this._panelFiltersChips = null, this._panelFiltersShowAllWrap = null, this._panelFiltersShowAllBtn = null, this._panelFiltersMorePanel = null, this._filtersMoreOpen = !1, this._filterOverflowObserver = null, this._filterOverflowZeroWidthRetries = 0, this._desktopFilterWrap = null, this._mobileFilterWrap = null, this._resultsWrap = null, this._stateWrap = null, this._customResultsWrap = null, this._query = "", this._searchOpen = !1, this._selectedFilters = [], this._selectedFilterBackspaceArmed = !1, this._debounceId = null, this._abortController = null, this._docPointerDownHandler = null, this._globalKeydownHandler = null, this._focusOutHandler = null, this._resizeHandler = null, this._desktopShortcutHint = null, this._panelSearchBar = null, this._contentObserver = null, this._renderFrame = null;
|
|
9980
10099
|
}
|
|
9981
10100
|
static {
|
|
9982
10101
|
this._filterMorePanelSeq = 0;
|
|
@@ -9997,14 +10116,28 @@ var K = class e extends HTMLElement {
|
|
|
9997
10116
|
];
|
|
9998
10117
|
}
|
|
9999
10118
|
connectedCallback() {
|
|
10000
|
-
this.classList.add("relative", "block", "w-full", "max-w-xl"), this._attachGlobalHandlers(), this._attachFocusOutHandler(), this._attachResizeHandler(), this.render();
|
|
10119
|
+
this.classList.add("relative", "block", "w-full", "max-w-xl"), this._attachGlobalHandlers(), this._attachFocusOutHandler(), this._attachResizeHandler(), this.render(), this._observeContentMutations();
|
|
10001
10120
|
}
|
|
10002
10121
|
disconnectedCallback() {
|
|
10003
|
-
this._docPointerDownHandler &&= (document.removeEventListener("pointerdown", this._docPointerDownHandler, !0), null), this._globalKeydownHandler &&= (document.removeEventListener("keydown", this._globalKeydownHandler), null), this._resizeHandler &&= (window.removeEventListener("resize", this._resizeHandler), null), this._focusOutHandler &&= (this.removeEventListener("focusout", this._focusOutHandler, !0), null), this._cancelDebounce(), this._abortSearch(), this._filterOverflowObserver &&= (this._filterOverflowObserver.disconnect(), null);
|
|
10122
|
+
this._docPointerDownHandler &&= (document.removeEventListener("pointerdown", this._docPointerDownHandler, !0), null), this._globalKeydownHandler &&= (document.removeEventListener("keydown", this._globalKeydownHandler), null), this._resizeHandler &&= (window.removeEventListener("resize", this._resizeHandler), null), this._focusOutHandler &&= (this.removeEventListener("focusout", this._focusOutHandler, !0), null), this._cancelDebounce(), this._abortSearch(), this._filterOverflowObserver &&= (this._filterOverflowObserver.disconnect(), null), this._contentObserver &&= (this._contentObserver.disconnect(), null), this._renderFrame !== null && (cancelAnimationFrame(this._renderFrame), this._renderFrame = null);
|
|
10004
10123
|
}
|
|
10005
10124
|
attributeChangedCallback(e, t, n) {
|
|
10006
10125
|
t !== n && this.render();
|
|
10007
10126
|
}
|
|
10127
|
+
_scheduleRender() {
|
|
10128
|
+
this._renderFrame === null && (this._renderFrame = requestAnimationFrame(() => {
|
|
10129
|
+
this._renderFrame = null, this.render();
|
|
10130
|
+
}));
|
|
10131
|
+
}
|
|
10132
|
+
_observeContentMutations() {
|
|
10133
|
+
this._contentObserver ||= new MutationObserver(() => {
|
|
10134
|
+
this._scheduleRender();
|
|
10135
|
+
}), this._contentObserver.disconnect(), this._contentObserver.observe(this, {
|
|
10136
|
+
childList: !0,
|
|
10137
|
+
attributes: !0,
|
|
10138
|
+
attributeFilter: ["slot"]
|
|
10139
|
+
});
|
|
10140
|
+
}
|
|
10008
10141
|
_getEndpoint() {
|
|
10009
10142
|
return (this.getAttribute("endpoint") || "").trim();
|
|
10010
10143
|
}
|