@haiilo/catalyst 12.3.3 → 12.3.5
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/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/{p-72182657.entry.js → p-2b38c9b7.entry.js} +2 -2
- package/dist/catalyst/p-2b38c9b7.entry.js.map +1 -0
- package/dist/cjs/cat-alert_30.cjs.entry.js +28 -13
- package/dist/cjs/cat-alert_30.cjs.entry.js.map +1 -1
- package/dist/collection/components/cat-dropdown/cat-dropdown.js +6 -1
- package/dist/collection/components/cat-dropdown/cat-dropdown.js.map +1 -1
- package/dist/collection/components/cat-tooltip/cat-tooltip.js +22 -12
- package/dist/collection/components/cat-tooltip/cat-tooltip.js.map +1 -1
- package/dist/components/cat-dropdown2.js +6 -1
- package/dist/components/cat-dropdown2.js.map +1 -1
- package/dist/components/cat-tooltip.js +22 -12
- package/dist/components/cat-tooltip.js.map +1 -1
- package/dist/esm/cat-alert_30.entry.js +28 -13
- package/dist/esm/cat-alert_30.entry.js.map +1 -1
- package/dist/types/components/cat-dropdown/cat-dropdown.d.ts +1 -0
- package/dist/types/components/cat-tooltip/cat-tooltip.d.ts +3 -0
- package/package.json +2 -2
- package/dist/catalyst/p-72182657.entry.js.map +0 -1
|
@@ -7764,6 +7764,7 @@ const CatDropdown = class {
|
|
|
7764
7764
|
}
|
|
7765
7765
|
this._isOpen = null;
|
|
7766
7766
|
this.trap?.deactivate();
|
|
7767
|
+
this.trap = undefined;
|
|
7767
7768
|
this.content.classList.remove('show');
|
|
7768
7769
|
// give CSS transition time to apply
|
|
7769
7770
|
setTimeout(() => {
|
|
@@ -7780,8 +7781,12 @@ const CatDropdown = class {
|
|
|
7780
7781
|
this.initTrigger();
|
|
7781
7782
|
}
|
|
7782
7783
|
}
|
|
7784
|
+
disconnectedCallback() {
|
|
7785
|
+
this.trap?.deactivate();
|
|
7786
|
+
this.trap = undefined;
|
|
7787
|
+
}
|
|
7783
7788
|
render() {
|
|
7784
|
-
return (index.h(index.Host, { key: '
|
|
7789
|
+
return (index.h(index.Host, { key: 'c76a5d87c676da3b2744c685f5108d390e35691b' }, index.h("slot", { key: 'debf796d465c97d19fdd8bfa7029ccaad0056c28', name: "anchor", ref: el => (this.anchorSlot = el) }), index.h("slot", { key: 'f6780795027087c899c0a2dd8b826c9e23bc4d2b', name: "trigger", ref: el => (this.triggerSlot = el) }), index.h("div", { key: '2ed88e6ea720c329b01c9d935507565a6bcbd2d9', id: this.contentId, class: { content: true, 'overflow-auto': !this.overflow, justified: this.justify, aligned: !this.justify }, ref: el => (this.content = el) }, index.h("slot", { key: '686eacb75cd07a718aeb2cab2e41176116493d4a', name: "content" }))));
|
|
7785
7790
|
}
|
|
7786
7791
|
get contentId() {
|
|
7787
7792
|
return `cat-dropdown-${this.id}`;
|
|
@@ -12283,6 +12288,27 @@ const CatTooltip = class {
|
|
|
12283
12288
|
if (this.trigger && !this.trigger.hasAttribute('aria-describedby')) {
|
|
12284
12289
|
this.trigger.setAttribute('aria-describedby', this.id);
|
|
12285
12290
|
}
|
|
12291
|
+
this.addListeners();
|
|
12292
|
+
}
|
|
12293
|
+
connectedCallback() {
|
|
12294
|
+
this.addListeners();
|
|
12295
|
+
}
|
|
12296
|
+
componentWillRender() {
|
|
12297
|
+
this.inactive = this.disabled || (!this.content && !this.hostElement.querySelector('[slot="content"]'));
|
|
12298
|
+
}
|
|
12299
|
+
disconnectedCallback() {
|
|
12300
|
+
this.removeListeners();
|
|
12301
|
+
this.hideTooltip();
|
|
12302
|
+
}
|
|
12303
|
+
render() {
|
|
12304
|
+
return (index.h(index.Host, { key: '48ac6350d679c11d238d55442d6455fc38eb44d7' }, index.h("slot", { key: '2ecd767bae2429800d94707498dd0d292b0bf5b4' }), index.h("div", { key: 'c59512dbe2c57622f7827aa143230dc1c5046281', ref: el => (this.tooltip = el), id: this.id, role: "tooltip", "aria-hidden": !this.open, "aria-live": this.open ? 'polite' : 'off', class: {
|
|
12305
|
+
tooltip: true,
|
|
12306
|
+
'tooltip-hidden': this.inactive,
|
|
12307
|
+
'tooltip-round': this.round,
|
|
12308
|
+
[`tooltip-${this.size}`]: Boolean(this.size)
|
|
12309
|
+
} }, index.h("slot", { key: 'a0bdd025ca40adac969daef4a0b06b9aa8452fac', name: "content" }, index.h("p", { key: '83786352e3219af4e7cde38a1c8247042d44c66a' }, this.content)))));
|
|
12310
|
+
}
|
|
12311
|
+
addListeners() {
|
|
12286
12312
|
if (isTouchDevice) {
|
|
12287
12313
|
window.addEventListener('touchstart', this.boundWindowTouchStartListener);
|
|
12288
12314
|
this.trigger?.addEventListener('touchstart', this.boundTouchStartListener);
|
|
@@ -12295,10 +12321,7 @@ const CatTooltip = class {
|
|
|
12295
12321
|
this.trigger?.addEventListener('mouseleave', this.boundHideListener);
|
|
12296
12322
|
}
|
|
12297
12323
|
}
|
|
12298
|
-
|
|
12299
|
-
this.inactive = this.disabled || (!this.content && !this.hostElement.querySelector('[slot="content"]'));
|
|
12300
|
-
}
|
|
12301
|
-
disconnectedCallback() {
|
|
12324
|
+
removeListeners() {
|
|
12302
12325
|
if (isTouchDevice) {
|
|
12303
12326
|
window.removeEventListener('touchstart', this.boundWindowTouchStartListener);
|
|
12304
12327
|
this.trigger?.removeEventListener('touchstart', this.boundTouchStartListener);
|
|
@@ -12311,14 +12334,6 @@ const CatTooltip = class {
|
|
|
12311
12334
|
this.trigger?.removeEventListener('focusout', this.boundHideListener);
|
|
12312
12335
|
}
|
|
12313
12336
|
}
|
|
12314
|
-
render() {
|
|
12315
|
-
return (index.h(index.Host, { key: 'a4d508bd463b29935745236c388f31b4bc01516f' }, index.h("slot", { key: 'b1992e73fa0e53b58493b8253c10823d562dac05' }), index.h("div", { key: 'd33515016f4d31548d9628f23d778acde69be531', ref: el => (this.tooltip = el), id: this.id, role: "tooltip", "aria-hidden": !this.open, "aria-live": this.open ? 'polite' : 'off', class: {
|
|
12316
|
-
tooltip: true,
|
|
12317
|
-
'tooltip-hidden': this.inactive,
|
|
12318
|
-
'tooltip-round': this.round,
|
|
12319
|
-
[`tooltip-${this.size}`]: Boolean(this.size)
|
|
12320
|
-
} }, index.h("slot", { key: '58c5455be822bf8bc9476c2e5086e0299805791f', name: "content" }, index.h("p", { key: '56d35f4ec8846ad8928c72a269fd5ed19bf087e1' }, this.content)))));
|
|
12321
|
-
}
|
|
12322
12337
|
async update() {
|
|
12323
12338
|
if (this.trigger && this.tooltip) {
|
|
12324
12339
|
await computePosition(this.trigger, this.tooltip, {
|