@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.
@@ -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(date.getTime()).setUTCMonth(month)));
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 (this.canActivate(tab)) {
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 {