@tabworthy/components 0.9.0 → 0.9.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/cjs/tabworthy-dates.cjs.entry.js +7 -6
- package/dist/cjs/tabworthy-times.cjs.entry.js +3 -3
- package/dist/collection/components/tabworthy-dates/tabworthy-dates.js +7 -6
- package/dist/collection/components/tabworthy-times/tabworthy-times.js +3 -3
- package/dist/components/tabworthy-dates.js +1 -1
- package/dist/components/tabworthy-times.js +1 -1
- package/dist/esm/tabworthy-dates.entry.js +7 -6
- package/dist/esm/tabworthy-times.entry.js +3 -3
- package/dist/tabworthy-components/{p-c0f957f5.entry.js → p-0e77d058.entry.js} +1 -1
- package/dist/tabworthy-components/{p-90de04dd.entry.js → p-fdb3b911.entry.js} +1 -1
- package/dist/tabworthy-components/tabworthy-components.esm.js +1 -1
- package/dist/types/components/tabworthy-dates/tabworthy-dates.d.ts +1 -0
- package/dist/types/components/tabworthy-times/tabworthy-times.d.ts +1 -1
- package/package.json +1 -1
|
@@ -10482,7 +10482,8 @@ const defaultLabels = {
|
|
|
10482
10482
|
rangeOutOfBoundsError: `Please enter a valid range of dates`,
|
|
10483
10483
|
disabledDateError: `Please choose an available date`,
|
|
10484
10484
|
to: "to",
|
|
10485
|
-
startDate: "Start date"
|
|
10485
|
+
startDate: "Start date",
|
|
10486
|
+
quickSelection: "Quick selection"
|
|
10486
10487
|
};
|
|
10487
10488
|
const TabworthyDates = class {
|
|
10488
10489
|
constructor(hostRef) {
|
|
@@ -10911,10 +10912,10 @@ const TabworthyDates = class {
|
|
|
10911
10912
|
}
|
|
10912
10913
|
render() {
|
|
10913
10914
|
var _a;
|
|
10914
|
-
return (index$1.h(index$1.Host, { key: '
|
|
10915
|
+
return (index$1.h(index$1.Host, { key: 'b85c1909fe1480911c45c35a2df8c01e5f7a09d3' }, index$1.h("label", { key: '3b41928ed705bdeeee9cb0d6e13d58a767d00b26', htmlFor: this.id ? `${this.id}-input` : undefined, class: this.getClassName("label") }, this.label), index$1.h("br", { key: '3c8b0017ab9604956ac4e1c452fdc1a6a4e4a786' }), index$1.h("div", { key: '5a389a5f7be57c19d11d4a565a61130d5fd3b5ff', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, index$1.h("input", { key: '7c1b10e5811f0797c67673f2d8c13fb2ea6b10d0', disabled: this.disabledState || this.disableFreeformInput, id: this.id ? `${this.id}-input` : undefined, type: "text", placeholder: this.placeholder, class: {
|
|
10915
10916
|
[this.getClassName("input")]: true,
|
|
10916
10917
|
[this.inputClass]: !!this.inputClass
|
|
10917
|
-
}, ref: (r) => (this.inputRef = r), onChange: this.handleChange, onFocus: () => this.formatInput(false), onBlur: () => this.formatInput(true, false), "aria-describedby": this.errorState ? `${this.id}-error` : undefined, "aria-invalid": this.errorState }), !this.inline && (index$1.h("button", { key: '
|
|
10918
|
+
}, ref: (r) => (this.inputRef = r), onChange: this.handleChange, onFocus: () => this.formatInput(false), onBlur: () => this.formatInput(true, false), "aria-describedby": this.errorState ? `${this.id}-error` : undefined, "aria-invalid": this.errorState }), !this.inline && (index$1.h("button", { key: '892a308b551d55b8e027f2dde48cc0cc22e00018', type: "button", onClick: this.handleCalendarButtonClick, class: this.getClassName("calendar-button"), disabled: this.disabledState }, this.calendarButtonContent ? (index$1.h("span", { innerHTML: this.calendarButtonContent })) : (this.datesLabels.openCalendar)))), index$1.h("tabworthy-dates-modal", { key: 'e2e90d92503ca129ed2017c2321590bdee12ce20', label: this.datesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
|
|
10918
10919
|
if (!this.pickerRef)
|
|
10919
10920
|
return;
|
|
10920
10921
|
this.pickerRef.modalIsOpen = true;
|
|
@@ -10922,11 +10923,11 @@ const TabworthyDates = class {
|
|
|
10922
10923
|
if (!this.pickerRef)
|
|
10923
10924
|
return;
|
|
10924
10925
|
this.pickerRef.modalIsOpen = false;
|
|
10925
|
-
}, inline: this.inline, appendTo: this.appendTo }, index$1.h("tabworthy-dates-calendar", { key: '
|
|
10926
|
+
}, inline: this.inline, appendTo: this.appendTo }, index$1.h("tabworthy-dates-calendar", { key: '0b8aa3324fedbd8f63c856fe5e5662cdc011db1f', range: this.range, locale: this.locale, onSelectDate: (event) => this.handlePickerSelection(event.detail), onChangeMonth: (event) => this.handleChangedMonths(event.detail), onChangeYear: (event) => this.handleYearChange(event.detail), labels: this.datesCalendarLabels ? this.datesCalendarLabels : undefined, ref: (el) => (this.pickerRef = el), startDate: this.startDate, firstDayOfWeek: this.firstDayOfWeek, showHiddenTitle: true, disabled: this.disabledState, showMonthStepper: this.showMonthStepper, showYearStepper: this.showYearStepper, showClearButton: this.showClearButton, showKeyboardHint: this.showKeyboardHint, showTodayButton: this.showTodayButton, disableDate: this.disableDate, minDate: this.minDate, maxDate: this.maxDate, inline: this.inline })), this.showQuickButtons &&
|
|
10926
10927
|
((_a = this.quickButtons) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
|
|
10927
|
-
this.chronoSupportedLocale && (index$1.h("div", { key: '
|
|
10928
|
+
this.chronoSupportedLocale && (index$1.h("div", { key: '26e0dc9ae8e91b308b9f159e5428ae3e0ac9a8c8', class: this.getClassName("quick-group"), role: "group", "aria-label": this.datesLabels.quickSelection }, this.quickButtons.map((buttonText) => {
|
|
10928
10929
|
return (index$1.h("button", { class: this.getClassName("quick-button"), onClick: this.handleQuickButtonClick, disabled: this.disabledState, type: "button" }, buttonText));
|
|
10929
|
-
}))), this.errorState && (index$1.h("div", { key: '
|
|
10930
|
+
}))), this.errorState && (index$1.h("div", { key: '434fecd9962fe0360536c6f0d96cb52e77034399', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
|
|
10930
10931
|
}
|
|
10931
10932
|
get el() { return index$1.getElement(this); }
|
|
10932
10933
|
static get watchers() { return {
|
|
@@ -238,10 +238,10 @@ const InclusiveTimes = class {
|
|
|
238
238
|
}
|
|
239
239
|
render() {
|
|
240
240
|
var _a;
|
|
241
|
-
return (index.h(index.Host, { key: '
|
|
241
|
+
return (index.h(index.Host, { key: 'bb2dfac0bb47e71d31aae0af5a864ad46970baf1', class: this.elementClassName, "has-error": this.errorState, disabled: this.disabledState }, index.h("label", { key: 'ac7a24801c515a6411dc123ca1f976e5d791efb7', htmlFor: `${this.id}-input`, class: this.getClassName("label") }, this.label), index.h("div", { key: '75368fdfabad0cbe08196013573b827602655335', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, index.h("input", { key: '6ca23bd4504a10d2bcfa54d194b7ea3bf94ccb57', id: `${this.id}-input`, ref: (r) => (this.inputRef = r), type: "text", class: {
|
|
242
242
|
[this.getClassName("input")]: true,
|
|
243
243
|
[this.inputClass]: !!this.inputClass
|
|
244
|
-
}, placeholder: this.placeholder, disabled: this.disabledState || this.disableFreeformInput, value: (_a = this.internalValue) === null || _a === void 0 ? void 0 : _a.toString(), onBlur: this.handleInputBlur, onChange: this.handleInputChange, "aria-describedby": this.errorState ? `${this.id}-error` : undefined, "aria-invalid": this.errorState }), !this.inline && (index.h("button", { key: '
|
|
244
|
+
}, placeholder: this.placeholder, disabled: this.disabledState || this.disableFreeformInput, value: (_a = this.internalValue) === null || _a === void 0 ? void 0 : _a.toString(), onBlur: this.handleInputBlur, onChange: this.handleInputChange, "aria-describedby": this.errorState ? `${this.id}-error` : undefined, "aria-invalid": this.errorState }), !this.inline && (index.h("button", { key: '1e8348e12dbe8e87d17d137721c3903ea8f95ae1', type: "button", onClick: this.handleCalendarButtonClick, class: this.getClassName("calendar-button"), disabled: this.disabledState }, this.calendarButtonContent ? (index.h("span", { innerHTML: this.calendarButtonContent })) : (this.timesLabels.openCalendar)))), index.h("tabworthy-dates-modal", { key: 'd361f887baa7ac18b901862ea4aa240b614ba210', label: this.timesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
|
|
245
245
|
if (this.pickerRef) {
|
|
246
246
|
this.pickerRef.modalIsOpen = true;
|
|
247
247
|
}
|
|
@@ -249,7 +249,7 @@ const InclusiveTimes = class {
|
|
|
249
249
|
if (this.pickerRef) {
|
|
250
250
|
this.pickerRef.modalIsOpen = false;
|
|
251
251
|
}
|
|
252
|
-
}, inline: this.inline, appendTo: this.appendTo }, index.h("div", { key: '
|
|
252
|
+
}, inline: this.inline, appendTo: this.appendTo }, index.h("div", { key: '207708dc4997d068e1d10c08d97551c1037c38d5', class: this.getClassName("picker-container") }, index.h("tabworthy-dates-calendar", { key: 'b16f50c72789b5d98c629668c655e10a6ce1e84b', range: this.range, locale: this.locale, onSelectDate: (event) => this.handlePickerSelection(event.detail), onChangeMonth: (event) => this.handleChangedMonths(event.detail), onChangeYear: (event) => this.handleYearChange(event.detail), labels: this.datesCalendarLabels, ref: (el) => (this.pickerRef = el), startDate: this.startDate, firstDayOfWeek: this.firstDayOfWeek, showHiddenTitle: true, disabled: this.disabledState, showMonthStepper: this.showMonthStepper, showYearStepper: this.showYearStepper, showClearButton: this.showClearButton, showTodayButton: this.showTodayButton, disableDate: this.disableDate, minDate: this.minDate, maxDate: this.maxDate, inline: this.inline, value: this.value ? this.toDate(this.value) : undefined }, index.h("div", { key: 'b8ca24c7f7437dfce513fbc6d7c28b4dc887e4c2', slot: "after-calendar", class: this.getClassName("time-section") }, index.h("hr", { key: 'fc353c6db72e547f044bee19c02eeb6207a8af0b', class: this.getClassName("divider") }), index.h("tabworthy-times-picker", { key: 'c77b51e4a60978c3706ead492e972db81b72aa73', hours: this.selectedHours, minutes: this.selectedMinutes, useTwelveHourFormat: this.useTwelveHourFormat, disabled: this.disabledState, onTimeChanged: this.handleTimeChange }))))), this.errorState && (index.h("div", { key: '7d3e27a0d9bb0b54642873205bc6bf140126d894', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
|
|
253
253
|
}
|
|
254
254
|
get el() { return index.getElement(this); }
|
|
255
255
|
static get watchers() { return {
|
|
@@ -13,7 +13,8 @@ const defaultLabels = {
|
|
|
13
13
|
rangeOutOfBoundsError: `Please enter a valid range of dates`,
|
|
14
14
|
disabledDateError: `Please choose an available date`,
|
|
15
15
|
to: "to",
|
|
16
|
-
startDate: "Start date"
|
|
16
|
+
startDate: "Start date",
|
|
17
|
+
quickSelection: "Quick selection"
|
|
17
18
|
};
|
|
18
19
|
export class TabworthyDates {
|
|
19
20
|
constructor() {
|
|
@@ -438,10 +439,10 @@ export class TabworthyDates {
|
|
|
438
439
|
}
|
|
439
440
|
render() {
|
|
440
441
|
var _a;
|
|
441
|
-
return (h(Host, { key: '
|
|
442
|
+
return (h(Host, { key: 'b85c1909fe1480911c45c35a2df8c01e5f7a09d3' }, h("label", { key: '3b41928ed705bdeeee9cb0d6e13d58a767d00b26', htmlFor: this.id ? `${this.id}-input` : undefined, class: this.getClassName("label") }, this.label), h("br", { key: '3c8b0017ab9604956ac4e1c452fdc1a6a4e4a786' }), h("div", { key: '5a389a5f7be57c19d11d4a565a61130d5fd3b5ff', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, h("input", { key: '7c1b10e5811f0797c67673f2d8c13fb2ea6b10d0', disabled: this.disabledState || this.disableFreeformInput, id: this.id ? `${this.id}-input` : undefined, type: "text", placeholder: this.placeholder, class: {
|
|
442
443
|
[this.getClassName("input")]: true,
|
|
443
444
|
[this.inputClass]: !!this.inputClass
|
|
444
|
-
}, ref: (r) => (this.inputRef = r), onChange: this.handleChange, onFocus: () => this.formatInput(false), onBlur: () => this.formatInput(true, false), "aria-describedby": this.errorState ? `${this.id}-error` : undefined, "aria-invalid": this.errorState }), !this.inline && (h("button", { key: '
|
|
445
|
+
}, ref: (r) => (this.inputRef = r), onChange: this.handleChange, onFocus: () => this.formatInput(false), onBlur: () => this.formatInput(true, false), "aria-describedby": this.errorState ? `${this.id}-error` : undefined, "aria-invalid": this.errorState }), !this.inline && (h("button", { key: '892a308b551d55b8e027f2dde48cc0cc22e00018', type: "button", onClick: this.handleCalendarButtonClick, class: this.getClassName("calendar-button"), disabled: this.disabledState }, this.calendarButtonContent ? (h("span", { innerHTML: this.calendarButtonContent })) : (this.datesLabels.openCalendar)))), h("tabworthy-dates-modal", { key: 'e2e90d92503ca129ed2017c2321590bdee12ce20', label: this.datesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
|
|
445
446
|
if (!this.pickerRef)
|
|
446
447
|
return;
|
|
447
448
|
this.pickerRef.modalIsOpen = true;
|
|
@@ -449,11 +450,11 @@ export class TabworthyDates {
|
|
|
449
450
|
if (!this.pickerRef)
|
|
450
451
|
return;
|
|
451
452
|
this.pickerRef.modalIsOpen = false;
|
|
452
|
-
}, inline: this.inline, appendTo: this.appendTo }, h("tabworthy-dates-calendar", { key: '
|
|
453
|
+
}, inline: this.inline, appendTo: this.appendTo }, h("tabworthy-dates-calendar", { key: '0b8aa3324fedbd8f63c856fe5e5662cdc011db1f', range: this.range, locale: this.locale, onSelectDate: (event) => this.handlePickerSelection(event.detail), onChangeMonth: (event) => this.handleChangedMonths(event.detail), onChangeYear: (event) => this.handleYearChange(event.detail), labels: this.datesCalendarLabels ? this.datesCalendarLabels : undefined, ref: (el) => (this.pickerRef = el), startDate: this.startDate, firstDayOfWeek: this.firstDayOfWeek, showHiddenTitle: true, disabled: this.disabledState, showMonthStepper: this.showMonthStepper, showYearStepper: this.showYearStepper, showClearButton: this.showClearButton, showKeyboardHint: this.showKeyboardHint, showTodayButton: this.showTodayButton, disableDate: this.disableDate, minDate: this.minDate, maxDate: this.maxDate, inline: this.inline })), this.showQuickButtons &&
|
|
453
454
|
((_a = this.quickButtons) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
|
|
454
|
-
this.chronoSupportedLocale && (h("div", { key: '
|
|
455
|
+
this.chronoSupportedLocale && (h("div", { key: '26e0dc9ae8e91b308b9f159e5428ae3e0ac9a8c8', class: this.getClassName("quick-group"), role: "group", "aria-label": this.datesLabels.quickSelection }, this.quickButtons.map((buttonText) => {
|
|
455
456
|
return (h("button", { class: this.getClassName("quick-button"), onClick: this.handleQuickButtonClick, disabled: this.disabledState, type: "button" }, buttonText));
|
|
456
|
-
}))), this.errorState && (h("div", { key: '
|
|
457
|
+
}))), this.errorState && (h("div", { key: '434fecd9962fe0360536c6f0d96cb52e77034399', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
|
|
457
458
|
}
|
|
458
459
|
static get is() { return "tabworthy-dates"; }
|
|
459
460
|
static get encapsulation() { return "scoped"; }
|
|
@@ -231,10 +231,10 @@ export class InclusiveTimes {
|
|
|
231
231
|
}
|
|
232
232
|
render() {
|
|
233
233
|
var _a;
|
|
234
|
-
return (h(Host, { key: '
|
|
234
|
+
return (h(Host, { key: 'bb2dfac0bb47e71d31aae0af5a864ad46970baf1', class: this.elementClassName, "has-error": this.errorState, disabled: this.disabledState }, h("label", { key: 'ac7a24801c515a6411dc123ca1f976e5d791efb7', htmlFor: `${this.id}-input`, class: this.getClassName("label") }, this.label), h("div", { key: '75368fdfabad0cbe08196013573b827602655335', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, h("input", { key: '6ca23bd4504a10d2bcfa54d194b7ea3bf94ccb57', id: `${this.id}-input`, ref: (r) => (this.inputRef = r), type: "text", class: {
|
|
235
235
|
[this.getClassName("input")]: true,
|
|
236
236
|
[this.inputClass]: !!this.inputClass
|
|
237
|
-
}, placeholder: this.placeholder, disabled: this.disabledState || this.disableFreeformInput, value: (_a = this.internalValue) === null || _a === void 0 ? void 0 : _a.toString(), onBlur: this.handleInputBlur, onChange: this.handleInputChange, "aria-describedby": this.errorState ? `${this.id}-error` : undefined, "aria-invalid": this.errorState }), !this.inline && (h("button", { key: '
|
|
237
|
+
}, placeholder: this.placeholder, disabled: this.disabledState || this.disableFreeformInput, value: (_a = this.internalValue) === null || _a === void 0 ? void 0 : _a.toString(), onBlur: this.handleInputBlur, onChange: this.handleInputChange, "aria-describedby": this.errorState ? `${this.id}-error` : undefined, "aria-invalid": this.errorState }), !this.inline && (h("button", { key: '1e8348e12dbe8e87d17d137721c3903ea8f95ae1', type: "button", onClick: this.handleCalendarButtonClick, class: this.getClassName("calendar-button"), disabled: this.disabledState }, this.calendarButtonContent ? (h("span", { innerHTML: this.calendarButtonContent })) : (this.timesLabels.openCalendar)))), h("tabworthy-dates-modal", { key: 'd361f887baa7ac18b901862ea4aa240b614ba210', label: this.timesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
|
|
238
238
|
if (this.pickerRef) {
|
|
239
239
|
this.pickerRef.modalIsOpen = true;
|
|
240
240
|
}
|
|
@@ -242,7 +242,7 @@ export class InclusiveTimes {
|
|
|
242
242
|
if (this.pickerRef) {
|
|
243
243
|
this.pickerRef.modalIsOpen = false;
|
|
244
244
|
}
|
|
245
|
-
}, inline: this.inline, appendTo: this.appendTo }, h("div", { key: '
|
|
245
|
+
}, inline: this.inline, appendTo: this.appendTo }, h("div", { key: '207708dc4997d068e1d10c08d97551c1037c38d5', class: this.getClassName("picker-container") }, h("tabworthy-dates-calendar", { key: 'b16f50c72789b5d98c629668c655e10a6ce1e84b', range: this.range, locale: this.locale, onSelectDate: (event) => this.handlePickerSelection(event.detail), onChangeMonth: (event) => this.handleChangedMonths(event.detail), onChangeYear: (event) => this.handleYearChange(event.detail), labels: this.datesCalendarLabels, ref: (el) => (this.pickerRef = el), startDate: this.startDate, firstDayOfWeek: this.firstDayOfWeek, showHiddenTitle: true, disabled: this.disabledState, showMonthStepper: this.showMonthStepper, showYearStepper: this.showYearStepper, showClearButton: this.showClearButton, showTodayButton: this.showTodayButton, disableDate: this.disableDate, minDate: this.minDate, maxDate: this.maxDate, inline: this.inline, value: this.value ? this.toDate(this.value) : undefined }, h("div", { key: 'b8ca24c7f7437dfce513fbc6d7c28b4dc887e4c2', slot: "after-calendar", class: this.getClassName("time-section") }, h("hr", { key: 'fc353c6db72e547f044bee19c02eeb6207a8af0b', class: this.getClassName("divider") }), h("tabworthy-times-picker", { key: 'c77b51e4a60978c3706ead492e972db81b72aa73', hours: this.selectedHours, minutes: this.selectedMinutes, useTwelveHourFormat: this.useTwelveHourFormat, disabled: this.disabledState, onTimeChanged: this.handleTimeChange }))))), this.errorState && (h("div", { key: '7d3e27a0d9bb0b54642873205bc6bf140126d894', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
|
|
246
246
|
}
|
|
247
247
|
static get is() { return "tabworthy-times"; }
|
|
248
248
|
static get encapsulation() { return "scoped"; }
|