@haiilo/catalyst 10.7.0 → 10.7.1
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-b2ec6eb3.entry.js → p-8b22b7fc.entry.js} +2 -2
- package/dist/catalyst/p-8b22b7fc.entry.js.map +1 -0
- package/dist/cjs/cat-alert_29.cjs.entry.js +8 -7
- package/dist/cjs/cat-alert_29.cjs.entry.js.map +1 -1
- package/dist/collection/components/cat-date-inline/cat-date-inline.js +8 -7
- package/dist/collection/components/cat-date-inline/cat-date-inline.js.map +1 -1
- package/dist/components/cat-date-inline2.js +8 -7
- package/dist/components/cat-date-inline2.js.map +1 -1
- package/dist/esm/cat-alert_29.entry.js +8 -7
- package/dist/esm/cat-alert_29.entry.js.map +1 -1
- package/package.json +2 -2
- package/dist/catalyst/p-b2ec6eb3.entry.js.map +0 -1
|
@@ -1657,11 +1657,12 @@ const CatDateInline = class {
|
|
|
1657
1657
|
return all ? new Date(Number(year), Number(month) - 1, Number(day)) : null;
|
|
1658
1658
|
}
|
|
1659
1659
|
componentWillLoad() {
|
|
1660
|
-
// select the initial value
|
|
1661
1660
|
const [startDate, endDate] = this.getValue();
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1661
|
+
if (endDate) {
|
|
1662
|
+
this.focus(endDate);
|
|
1663
|
+
}
|
|
1664
|
+
else if (startDate) {
|
|
1665
|
+
this.focus(startDate);
|
|
1665
1666
|
}
|
|
1666
1667
|
}
|
|
1667
1668
|
componentDidRender() {
|
|
@@ -1751,9 +1752,9 @@ const CatDateInline = class {
|
|
|
1751
1752
|
const [minDate, maxDate] = this.getMinMaxDate();
|
|
1752
1753
|
const dateGrid = this.dateGrid(this.viewDate.getFullYear(), this.viewDate.getMonth());
|
|
1753
1754
|
const [dateStart, dateEnd] = this.getValue();
|
|
1754
|
-
return (index.h(index.Host, { key: '
|
|
1755
|
+
return (index.h(index.Host, { key: 'a7d905c8e87ff74d81dfc74af7ba373297e236f0' }, index.h("div", { key: '1da4117e24b346e7c8b0fb02bee21cf4ab0b4811', class: { picker: true, 'picker-small': this.size === 's', 'picker-weeks': !this.noWeeks } }, index.h("div", { key: 'fc0b889a89e79962ae83e871678b8994b110df26', class: "picker-head" }, index.h("cat-button", { key: '6a12fb84c1047342bed4c27919bb3e5581c628ef', icon: "$cat:datepicker-year-prev", iconOnly: true, size: "xs", variant: "text", "a11y-label": this.locale.prevYear, disabled: isSameYear(this.viewDate, minDate), onClick: () => this.navigate('prev', 'year'), "data-dropdown-no-close": true }), index.h("cat-button", { key: '40d96782ca7d4f2c6ea2e4fbc7ebe51a2c8c1eba', icon: "$cat:datepicker-month-prev", iconOnly: true, size: "xs", variant: "text", "a11y-label": this.locale.prevMonth, disabled: isSameMonth(this.viewDate, minDate), onClick: () => this.navigate('prev', 'month'), "data-dropdown-no-close": true }), index.h("h3", { key: 'd40d0418bee1337559939c56ef22dcdfbf9afa3d' }, this.getHeadline()), index.h("cat-button", { key: '1265b3ee5423afef7006ed9e590c42fec5a461c0', icon: "$cat:datepicker-month-next", iconOnly: true, size: "xs", variant: "text", "a11y-label": this.locale.nextMonth, disabled: isSameMonth(this.viewDate, maxDate), onClick: () => this.navigate('next', 'month'), "data-dropdown-no-close": true }), index.h("cat-button", { key: 'a0872674a56e6b9a48206d9bd05f669dc2b720f2', icon: "$cat:datepicker-year-next", iconOnly: true, size: "xs", variant: "text", "a11y-label": this.locale.nextYear, disabled: isSameYear(this.viewDate, maxDate), onClick: () => this.navigate('next', 'year'), "data-dropdown-no-close": true })), index.h("div", { key: 'a2f5d372f4693bfbd95c305add8a5ae9d2b93016', class: "picker-grid", onFocusin: () => this.setAriaLive(this.locale.arrowKeys) }, index.h("div", { key: '8ce7da396804f56ffbddeca8f106ed7bcdd0a82c', class: "picker-grid-head" }, Array.from(Array(7), (_, i) => (index.h("abbr", { title: this.locale.days.long[i] }, this.locale.days.short[i])))), !this.noWeeks && (index.h("div", { class: "picker-grid-weeks" }, dateGrid
|
|
1755
1756
|
.filter((_, i) => i % 7 === 0)
|
|
1756
|
-
.map(day => (index.h("div", null, this.getWeekNumber(day)))))), index.h("div", { key: '
|
|
1757
|
+
.map(day => (index.h("div", null, this.getWeekNumber(day)))))), index.h("div", { key: '94446fe590c51c48b73e6d482a3f1d4d4fb03a82', class: "picker-grid-days" }, dateGrid.map(day => {
|
|
1757
1758
|
const isStartDate = isSameDay(dateStart, day);
|
|
1758
1759
|
const isEndDate = isSameDay(dateEnd, day);
|
|
1759
1760
|
const isRange = !!dateStart && !!dateEnd && day > dateStart && day < dateEnd;
|
|
@@ -1768,7 +1769,7 @@ const CatDateInline = class {
|
|
|
1768
1769
|
'date-focusable': this.canFocus(day),
|
|
1769
1770
|
'date-disabled': !this.canClick(day)
|
|
1770
1771
|
}, size: this.size, nativeAttributes: !this.canFocus(day) ? { tabindex: '-1' } : {}, variant: isStartDate || isEndDate ? 'filled' : isToday ? 'outlined' : 'text', a11yLabel: this.locale.toLocalStr(day), active: isStartDate || isEndDate || isRange, color: isStartDate || isEndDate || isToday ? 'primary' : 'secondary', disabled: !this.canClick(day), onClick: () => this.select(day), "data-date": this.locale.toLocalISO(day) }, day.getDate()));
|
|
1771
|
-
}))), index.h("div", { key: '
|
|
1772
|
+
}))), index.h("div", { key: '2c3386a794b6ebdfb644a41e892448fd454d7aaa', class: "picker-foot" }, !this.noToday && this.canClick(this.locale.now()) && (index.h("cat-button", { size: "s", "data-dropdown-no-close": true, onClick: () => this.select(this.locale.now()) }, this.locale.today)), !this.noHint && index.h("p", { class: "cursor-help" }, this.locale.arrowKeys), !this.noClear && (index.h("cat-button", { size: "s", disabled: !this.value, "data-dropdown-no-close": true, onClick: () => this.clear() }, this.locale.clear)))), index.h("p", { key: '6193ca5ae8ff21d847a377ad7c269f22bc52d9a8', class: "cursor-aria", "aria-live": "polite" })));
|
|
1772
1773
|
}
|
|
1773
1774
|
focus(date) {
|
|
1774
1775
|
const [minDate, maxDate] = this.getMinMaxDate();
|