@sbb-esta/lyne-elements 5.0.0 → 5.0.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/calendar/calendar-day/calendar-day.component.js +1 -1
- package/calendar/calendar-month/calendar-month.component.js +1 -1
- package/calendar/calendar-year/calendar-year.component.js +1 -1
- package/{calendar-day.component-DrMWf6-w.js → calendar-day.component-ByD9deTi.js} +2 -2
- package/calendar.js +1 -1
- package/calendar.pure.js +1 -1
- package/core/mixins/form-associated-mixin.js +1 -1
- package/custom-elements.json +754 -8
- package/development/calendar/calendar/calendar.component.d.ts +1 -1
- package/development/calendar/calendar/calendar.component.d.ts.map +1 -1
- package/development/calendar/calendar-day/calendar-day.component.d.ts.map +1 -1
- package/development/calendar/calendar-day/calendar-day.component.js +1 -1
- package/development/calendar/calendar-month/calendar-month.component.d.ts.map +1 -1
- package/development/calendar/calendar-month/calendar-month.component.js +2 -2
- package/development/calendar/calendar-year/calendar-year.component.d.ts.map +1 -1
- package/development/calendar/calendar-year/calendar-year.component.js +2 -2
- package/development/{calendar-day.component-Zky9Z-Fq.js → calendar-day.component-DiYuBSxG.js} +3 -3
- package/development/calendar.component-BmB8HoZt.js +1 -1
- package/development/calendar.js +1 -1
- package/development/calendar.pure.js +1 -1
- package/development/core/mixins/form-associated-mixin.d.ts.map +1 -1
- package/development/core/mixins/form-associated-mixin.js +3 -1
- package/development/date-input/date-input.component.d.ts +2 -2
- package/development/date-input/date-input.component.d.ts.map +1 -1
- package/development/date-input.component-DMNqiZ6l.js +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../calendar-day.component-
|
|
1
|
+
import { t as e } from "../../calendar-day.component-ByD9deTi.js";
|
|
2
2
|
export { e as SbbCalendarDayElement };
|
|
@@ -53,7 +53,7 @@ var a = (() => {
|
|
|
53
53
|
super.connectedCallback(), this.tabIndex = -1;
|
|
54
54
|
}
|
|
55
55
|
setSelectedState(e) {
|
|
56
|
-
let t = e.multiple ? e.value?.some((e) => this._yearValue === this.dateAdapter.getYear(e) && this._monthValue === this.dateAdapter.getMonth(e)) ?? !1 : !!e.value && this.dateAdapter.getYear(e.value) === this._yearValue && this.dateAdapter.getMonth(e.value) === this._monthValue;
|
|
56
|
+
let t = !!this.value && (e.multiple ? e.value?.some((e) => this._yearValue === this.dateAdapter.getYear(e) && this._monthValue === this.dateAdapter.getMonth(e)) ?? !1 : !!e.value && this.dateAdapter.getYear(e.value) === this._yearValue && this.dateAdapter.getMonth(e.value) === this._monthValue);
|
|
57
57
|
this.toggleState("selected", t), this.internals.ariaPressed = String(t);
|
|
58
58
|
}
|
|
59
59
|
setDisabledFilteredState(e) {
|
|
@@ -49,7 +49,7 @@ var a = (() => {
|
|
|
49
49
|
super.connectedCallback(), this.tabIndex = -1;
|
|
50
50
|
}
|
|
51
51
|
setSelectedState(e) {
|
|
52
|
-
let t = e.multiple ? e.value?.some((e) => Number(this.value) === this.dateAdapter.getYear(e)) ?? !1 : !!e.value && this.dateAdapter.getYear(e.value) === Number(this.value);
|
|
52
|
+
let t = !!this.value && (e.multiple ? e.value?.some((e) => Number(this.value) === this.dateAdapter.getYear(e)) ?? !1 : !!e.value && this.dateAdapter.getYear(e.value) === Number(this.value));
|
|
53
53
|
this.toggleState("selected", t), this.internals.ariaPressed = String(t);
|
|
54
54
|
}
|
|
55
55
|
setDisabledFilteredState(e) {
|
|
@@ -74,7 +74,7 @@ var s = ".sbb-calendar-day{justify-content:var(--sbb-calendar-day-justify-conten
|
|
|
74
74
|
return this.closest?.("sbb-calendar") ?? this.getRootNode?.()?.host?.closest("sbb-calendar");
|
|
75
75
|
}
|
|
76
76
|
setSelectedState(e) {
|
|
77
|
-
let t = e.multiple ? e.value.some((e) => this.dateAdapter.sameDate(this.value, e)) : !!e.value && this.dateAdapter.compareDate(this.value, e.value) === 0;
|
|
77
|
+
let t = !!this.value && (e.multiple ? e.value.some((e) => this.dateAdapter.sameDate(this.value, e)) : !!e.value && this.dateAdapter.compareDate(this.value, e.value) === 0);
|
|
78
78
|
this.toggleState("selected", t), this.internals.ariaPressed = String(t);
|
|
79
79
|
}
|
|
80
80
|
setDisabledFilteredState(e) {
|
|
@@ -82,7 +82,7 @@ var s = ".sbb-calendar-day{justify-content:var(--sbb-calendar-day-justify-conten
|
|
|
82
82
|
this.disabled = t || n, this.internals.ariaDisabled = String(this.disabled), this.toggleState("crossed-out", t && !n);
|
|
83
83
|
}
|
|
84
84
|
_isActiveDate(e) {
|
|
85
|
-
return e
|
|
85
|
+
return e && this.value ? e(this.value) : !0;
|
|
86
86
|
}
|
|
87
87
|
_isDayInRange(e, t) {
|
|
88
88
|
return !e && !t ? !0 : this.dateAdapter.sameDate(this.value, this.dateAdapter.clampDate(this.value, e, t));
|
package/calendar.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./calendar-day.component-
|
|
1
|
+
import { t as e } from "./calendar-day.component-ByD9deTi.js";
|
|
2
2
|
import { SbbCalendarMonthElement as t } from "./calendar/calendar-month/calendar-month.component.js";
|
|
3
3
|
import { SbbCalendarYearElement as n } from "./calendar/calendar-year/calendar-year.component.js";
|
|
4
4
|
import { SbbCalendarWeekdayElement as r } from "./calendar/calendar-weekday/calendar-weekday.component.js";
|
package/calendar.pure.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./calendar-day.component-
|
|
1
|
+
import { t as e } from "./calendar-day.component-ByD9deTi.js";
|
|
2
2
|
import { SbbCalendarMonthElement as t } from "./calendar/calendar-month/calendar-month.component.js";
|
|
3
3
|
import { SbbCalendarYearElement as n } from "./calendar/calendar-year/calendar-year.component.js";
|
|
4
4
|
import { SbbCalendarWeekdayElement as r } from "./calendar/calendar-weekday/calendar-weekday.component.js";
|
|
@@ -164,7 +164,7 @@ var o = (o) => (() => {
|
|
|
164
164
|
this.internals.setValidity(t, e), i && Object.defineProperty(this.internals.validity, "customError", {
|
|
165
165
|
value: this._validityStates.has("customError") || !!t.customError,
|
|
166
166
|
configurable: !0
|
|
167
|
-
});
|
|
167
|
+
}), this.dispatchEvent(new Event("validity"));
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
170
|
})();
|