@haiilo/catalyst 10.28.0 → 10.28.2
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-a0e69279.entry.js → p-ee89e395.entry.js} +3 -3
- package/dist/catalyst/p-ee89e395.entry.js.map +1 -0
- package/dist/cjs/cat-alert_30.cjs.entry.js +8 -6
- package/dist/cjs/cat-alert_30.cjs.entry.js.map +1 -1
- package/dist/collection/components/cat-date-inline/cat-date-locale.js +1 -2
- package/dist/collection/components/cat-date-inline/cat-date-locale.js.map +1 -1
- package/dist/collection/components/cat-tabs/cat-tabs.js +7 -4
- package/dist/collection/components/cat-tabs/cat-tabs.js.map +1 -1
- package/dist/components/cat-date-inline2.js +1 -2
- package/dist/components/cat-date-inline2.js.map +1 -1
- package/dist/components/cat-tabs.js +7 -4
- package/dist/components/cat-tabs.js.map +1 -1
- package/dist/esm/cat-alert_30.entry.js +8 -6
- package/dist/esm/cat-alert_30.entry.js.map +1 -1
- package/dist/types/components/cat-tabs/cat-tabs.d.ts +1 -1
- package/package.json +2 -2
- package/dist/catalyst/p-a0e69279.entry.js.map +0 -1
|
@@ -1440,9 +1440,8 @@ function getDays(language, weekday = 'long') {
|
|
|
1440
1440
|
return [...Array(7).keys()].map(day => format(new Date(date.getTime()).setUTCDate(firstDayOfWeek + day)));
|
|
1441
1441
|
}
|
|
1442
1442
|
function getMonths(language, month = 'long') {
|
|
1443
|
-
const date = new Date(0);
|
|
1444
1443
|
const format = new Intl.DateTimeFormat(language, { month }).format;
|
|
1445
|
-
return [...Array(12).keys()].map(month => format(new Date(
|
|
1444
|
+
return [...Array(12).keys()].map(month => format(new Date(2000, month, 1)));
|
|
1446
1445
|
}
|
|
1447
1446
|
function getWeekInfo(language) {
|
|
1448
1447
|
const locale = new Intl.Locale(language);
|
|
@@ -13252,9 +13251,6 @@ const CatTabs = class {
|
|
|
13252
13251
|
this.tabs = Array.from(this.hostElement.querySelectorAll('cat-tab'));
|
|
13253
13252
|
this.activeTab = this.activeTab || this.tabs.filter(tab => this.canActivate(tab) && !tab.noActive)[0]?.id;
|
|
13254
13253
|
}
|
|
13255
|
-
canActivate(tab) {
|
|
13256
|
-
return !!tab && !tab.deactivated && !tab.url && tab.id !== this.activeTab;
|
|
13257
|
-
}
|
|
13258
13254
|
click(tab) {
|
|
13259
13255
|
if (this.canActivate(tab)) {
|
|
13260
13256
|
tab.click();
|
|
@@ -13264,10 +13260,16 @@ const CatTabs = class {
|
|
|
13264
13260
|
}
|
|
13265
13261
|
}
|
|
13266
13262
|
activate(tab) {
|
|
13267
|
-
if (
|
|
13263
|
+
if (!tab) {
|
|
13264
|
+
this.activeTab = '';
|
|
13265
|
+
}
|
|
13266
|
+
else if (this.canActivate(tab)) {
|
|
13268
13267
|
this.activeTab = tab.id;
|
|
13269
13268
|
}
|
|
13270
13269
|
}
|
|
13270
|
+
canActivate(tab) {
|
|
13271
|
+
return !tab.deactivated && !tab.url && tab.id !== this.activeTab;
|
|
13272
|
+
}
|
|
13271
13273
|
static get delegatesFocus() { return true; }
|
|
13272
13274
|
get hostElement() { return index.getElement(this); }
|
|
13273
13275
|
static get watchers() { return {
|