@tabworthy/components 0.14.3 → 0.15.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/loader.cjs.js +1 -1
- package/dist/cjs/tabworthy-components.cjs.js +1 -1
- package/dist/cjs/tabworthy-dates-calendar_2.cjs.entry.js +2 -2
- package/dist/cjs/tabworthy-times-picker.cjs.entry.js +29 -8
- package/dist/cjs/tabworthy-times.cjs.entry.js +26 -4
- package/dist/collection/components/tabworthy-modal/tabworthy-dates-modal.js +2 -2
- package/dist/collection/components/tabworthy-times/tabworthy-times.js +46 -4
- package/dist/collection/components/tabworthy-times-picker/tabworthy-times-picker.js +49 -8
- package/dist/components/p-BvcvP308.js +1 -0
- package/dist/components/{p-CMIEIvTW.js → p-DXCumu2Y.js} +1 -1
- package/dist/components/tabworthy-dates-modal.js +1 -1
- package/dist/components/tabworthy-dates.js +1 -1
- package/dist/components/tabworthy-times-picker.js +1 -1
- package/dist/components/tabworthy-times.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/tabworthy-components.js +1 -1
- package/dist/esm/tabworthy-dates-calendar_2.entry.js +2 -2
- package/dist/esm/tabworthy-times-picker.entry.js +29 -8
- package/dist/esm/tabworthy-times.entry.js +26 -4
- package/dist/tabworthy-components/p-3e890a9c.entry.js +1 -0
- package/dist/tabworthy-components/p-5b21364f.entry.js +1 -0
- package/dist/tabworthy-components/{p-f65438fb.entry.js → p-66c929f1.entry.js} +1 -1
- package/dist/tabworthy-components/tabworthy-components.esm.js +1 -1
- package/dist/themes/light.css +1 -1
- package/dist/types/components/tabworthy-times/tabworthy-times.d.ts +3 -0
- package/dist/types/components/tabworthy-times-picker/tabworthy-times-picker.d.ts +6 -0
- package/dist/types/components.d.ts +18 -0
- package/package.json +1 -1
- package/dist/components/p-C_uZGgcG.js +0 -1
- package/dist/tabworthy-components/p-3af91c7f.entry.js +0 -1
- package/dist/tabworthy-components/p-69334c34.entry.js +0 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -6,7 +6,7 @@ var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
|
6
6
|
const defineCustomElements = async (win, options) => {
|
|
7
7
|
if (typeof window === 'undefined') return undefined;
|
|
8
8
|
await appGlobals.globalScripts();
|
|
9
|
-
return index.bootstrapLazy([["tabworthy-times-picker.cjs",[[2,"tabworthy-times-picker",{"hours":[1026],"minutes":[1026],"seconds":[1026],"useTwelveHourFormat":[4,"use-twelve-hour-format"],"showSeconds":[4,"show-seconds"],"labels":[16],"labelsSrOnly":[4,"labels-sr-only"],"disabled":[4],"elementClassName":[1,"element-class-name"],"minTime":[16],"maxTime":[16],"internalHours":[32],"internalMinutes":[32],"internalSeconds":[32],"period":[32]},null,{"hours":[{"watchHours":0}],"minutes":[{"watchMinutes":0}],"seconds":[{"watchSeconds":0}]}]]],["tabworthy-dates-calendar_2.cjs",[[262,"tabworthy-dates-calendar",{"clearButtonContent":[1,"clear-button-content"],"closeButtonContent":[1,"close-button-content"],"disabled":[4],"modalIsOpen":[4,"modal-is-open"],"disableDate":[16],"elementClassName":[1,"element-class-name"],"firstDayOfWeek":[2,"first-day-of-week"],"range":[4],"labels":[16],"locale":[1],"nextMonthButtonContent":[1,"next-month-button-content"],"nextYearButtonContent":[1,"next-year-button-content"],"previousMonthButtonContent":[1,"previous-month-button-content"],"previousYearButtonContent":[1,"previous-year-button-content"],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"inline":[4],"showClearButton":[4,"show-clear-button"],"showCloseButton":[4,"show-close-button"],"showMonthStepper":[4,"show-month-stepper"],"showTodayButton":[4,"show-today-button"],"showYearStepper":[4,"show-year-stepper"],"showKeyboardHint":[4,"show-keyboard-hint"],"showHiddenTitle":[4,"show-hidden-title"],"startDate":[1,"start-date"],"todayButtonContent":[1,"today-button-content"],"value":[1040],"currentDate":[32],"hoveredDate":[32],"weekdays":[32]},null,{"modalIsOpen":[{"watchModalIsOpen":0}],"firstDayOfWeek":[{"watchFirstDayOfWeek":0}],"locale":[{"watchLocale":0}],"range":[{"watchRange":0}],"startDate":[{"watchStartDate":0}],"value":[{"watchValue":0}]}],[257,"tabworthy-dates-modal",{"label":[1],"inline":[4],"placement":[1],"offset":[16],"appendTo":[1,"append-to"],"closing":[32],"showing":[32],"positioned":[32],"open":[64],"close":[64],"getState":[64],"setTriggerElement":[64],"updatePosition":[64]},[[10,"click","handleClick"]],{"showing":[{"watchShowing":0}]}]]],["tabworthy-times.cjs",[[2,"tabworthy-times",{"id":[513],"value":[1025],"range":[4],"label":[1],"placeholder":[1],"locale":[1],"disabled":[4],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"startDate":[1,"start-date"],"referenceDate":[1,"reference-date"],"useTwelveHourFormat":[4,"use-twelve-hour-format"],"showSeconds":[4,"show-seconds"],"timesLabels":[16],"datesCalendarLabels":[16],"timesPickerLabels":[16],"inline":[4],"hasError":[1028,"has-error"],"showYearStepper":[4,"show-year-stepper"],"showMonthStepper":[4,"show-month-stepper"],"showClearButton":[4,"show-clear-button"],"showCloseButton":[4,"show-close-button"],"showTodayButton":[4,"show-today-button"],"calendarButtonContent":[1,"calendar-button-content"],"nextMonthButtonContent":[1,"next-month-button-content"],"nextYearButtonContent":[1,"next-year-button-content"],"previousMonthButtonContent":[1,"previous-month-button-content"],"previousYearButtonContent":[1,"previous-year-button-content"],"todayButtonContent":[1,"today-button-content"],"clearButtonContent":[1,"clear-button-content"],"closeButtonContent":[1,"close-button-content"],"disableDate":[16],"elementClassName":[1,"element-class-name"],"firstDayOfWeek":[2,"first-day-of-week"],"format":[1],"inputShouldFormat":[8,"input-should-format"],"disableFreeformInput":[4,"disable-freeform-input"],"inputClass":[1,"input-class"],"appendTo":[1,"append-to"],"internalValue":[32],"selectedDate":[32],"selectedHours":[32],"selectedMinutes":[32],"selectedSeconds":[32],"errorState":[32],"disabledState":[32],"revertInput":[64],"clearValue":[64]},null,{"value":[{"watchValue":0}],"disabled":[{"watchDisabled":0}],"hasError":[{"watchHasError":0}]}]]],["tabworthy-dates.cjs",[[2,"tabworthy-dates",{"id":[513],"value":[1025],"range":[4],"yearOnly":[4,"year-only"],"label":[1],"placeholder":[1],"locale":[1],"disabled":[4],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"startDate":[1,"start-date"],"referenceDate":[1,"reference-date"],"useStrictDateParsing":[4,"use-strict-date-parsing"],"datesLabels":[16],"datesCalendarLabels":[16],"inline":[4],"hasError":[1028,"has-error"],"nextMonthButtonContent":[1,"next-month-button-content"],"nextYearButtonContent":[1,"next-year-button-content"],"previousMonthButtonContent":[1,"previous-month-button-content"],"previousYearButtonContent":[1,"previous-year-button-content"],"showYearStepper":[4,"show-year-stepper"],"showMonthStepper":[4,"show-month-stepper"],"showClearButton":[4,"show-clear-button"],"showCloseButton":[4,"show-close-button"],"showTodayButton":[4,"show-today-button"],"inputShouldFormat":[8,"input-should-format"],"showKeyboardHint":[4,"show-keyboard-hint"],"disableDate":[16],"elementClassName":[1,"element-class-name"],"firstDayOfWeek":[2,"first-day-of-week"],"format":[1],"quickButtons":[16],"todayButtonContent":[1,"today-button-content"],"clearButtonContent":[1,"clear-button-content"],"closeButtonContent":[1,"close-button-content"],"calendarButtonContent":[1,"calendar-button-content"],"showQuickButtons":[4,"show-quick-buttons"],"disableFreeformInput":[4,"disable-freeform-input"],"inputClass":[1,"input-class"],"appendTo":[1,"append-to"],"internalValue":[32],"errorState":[32],"disabledState":[32],"parseDate":[64],"revertInput":[64]},null,{"disabled":[{"watchDisabled":0}],"value":[{"watchValue":0}]}]]]], options);
|
|
9
|
+
return index.bootstrapLazy([["tabworthy-times-picker.cjs",[[2,"tabworthy-times-picker",{"hours":[1026],"minutes":[1026],"seconds":[1026],"useTwelveHourFormat":[4,"use-twelve-hour-format"],"showSeconds":[4,"show-seconds"],"labels":[16],"labelsSrOnly":[4,"labels-sr-only"],"disabled":[4],"elementClassName":[1,"element-class-name"],"minTime":[16],"maxTime":[16],"modalIsOpen":[4,"modal-is-open"],"internalHours":[32],"internalMinutes":[32],"internalSeconds":[32],"period":[32]},null,{"modalIsOpen":[{"watchModalIsOpen":0}],"hours":[{"watchHours":0}],"minutes":[{"watchMinutes":0}],"seconds":[{"watchSeconds":0}]}]]],["tabworthy-dates-calendar_2.cjs",[[262,"tabworthy-dates-calendar",{"clearButtonContent":[1,"clear-button-content"],"closeButtonContent":[1,"close-button-content"],"disabled":[4],"modalIsOpen":[4,"modal-is-open"],"disableDate":[16],"elementClassName":[1,"element-class-name"],"firstDayOfWeek":[2,"first-day-of-week"],"range":[4],"labels":[16],"locale":[1],"nextMonthButtonContent":[1,"next-month-button-content"],"nextYearButtonContent":[1,"next-year-button-content"],"previousMonthButtonContent":[1,"previous-month-button-content"],"previousYearButtonContent":[1,"previous-year-button-content"],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"inline":[4],"showClearButton":[4,"show-clear-button"],"showCloseButton":[4,"show-close-button"],"showMonthStepper":[4,"show-month-stepper"],"showTodayButton":[4,"show-today-button"],"showYearStepper":[4,"show-year-stepper"],"showKeyboardHint":[4,"show-keyboard-hint"],"showHiddenTitle":[4,"show-hidden-title"],"startDate":[1,"start-date"],"todayButtonContent":[1,"today-button-content"],"value":[1040],"currentDate":[32],"hoveredDate":[32],"weekdays":[32]},null,{"modalIsOpen":[{"watchModalIsOpen":0}],"firstDayOfWeek":[{"watchFirstDayOfWeek":0}],"locale":[{"watchLocale":0}],"range":[{"watchRange":0}],"startDate":[{"watchStartDate":0}],"value":[{"watchValue":0}]}],[257,"tabworthy-dates-modal",{"label":[1],"inline":[4],"placement":[1],"offset":[16],"appendTo":[1,"append-to"],"closing":[32],"showing":[32],"positioned":[32],"open":[64],"close":[64],"getState":[64],"setTriggerElement":[64],"updatePosition":[64]},[[10,"click","handleClick"]],{"showing":[{"watchShowing":0}]}]]],["tabworthy-times.cjs",[[2,"tabworthy-times",{"id":[513],"value":[1025],"range":[4],"timeOnly":[4,"time-only"],"label":[1],"placeholder":[1],"locale":[1],"disabled":[4],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"startDate":[1,"start-date"],"referenceDate":[1,"reference-date"],"useTwelveHourFormat":[4,"use-twelve-hour-format"],"showSeconds":[4,"show-seconds"],"timesLabels":[16],"datesCalendarLabels":[16],"timesPickerLabels":[16],"inline":[4],"hasError":[1028,"has-error"],"showYearStepper":[4,"show-year-stepper"],"showMonthStepper":[4,"show-month-stepper"],"showClearButton":[4,"show-clear-button"],"showCloseButton":[4,"show-close-button"],"showTodayButton":[4,"show-today-button"],"calendarButtonContent":[1,"calendar-button-content"],"nextMonthButtonContent":[1,"next-month-button-content"],"nextYearButtonContent":[1,"next-year-button-content"],"previousMonthButtonContent":[1,"previous-month-button-content"],"previousYearButtonContent":[1,"previous-year-button-content"],"todayButtonContent":[1,"today-button-content"],"clearButtonContent":[1,"clear-button-content"],"closeButtonContent":[1,"close-button-content"],"disableDate":[16],"elementClassName":[1,"element-class-name"],"firstDayOfWeek":[2,"first-day-of-week"],"format":[1],"inputShouldFormat":[8,"input-should-format"],"disableFreeformInput":[4,"disable-freeform-input"],"inputClass":[1,"input-class"],"appendTo":[1,"append-to"],"internalValue":[32],"selectedDate":[32],"selectedHours":[32],"selectedMinutes":[32],"selectedSeconds":[32],"errorState":[32],"disabledState":[32],"revertInput":[64],"clearValue":[64]},null,{"value":[{"watchValue":0}],"disabled":[{"watchDisabled":0}],"hasError":[{"watchHasError":0}]}]]],["tabworthy-dates.cjs",[[2,"tabworthy-dates",{"id":[513],"value":[1025],"range":[4],"yearOnly":[4,"year-only"],"label":[1],"placeholder":[1],"locale":[1],"disabled":[4],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"startDate":[1,"start-date"],"referenceDate":[1,"reference-date"],"useStrictDateParsing":[4,"use-strict-date-parsing"],"datesLabels":[16],"datesCalendarLabels":[16],"inline":[4],"hasError":[1028,"has-error"],"nextMonthButtonContent":[1,"next-month-button-content"],"nextYearButtonContent":[1,"next-year-button-content"],"previousMonthButtonContent":[1,"previous-month-button-content"],"previousYearButtonContent":[1,"previous-year-button-content"],"showYearStepper":[4,"show-year-stepper"],"showMonthStepper":[4,"show-month-stepper"],"showClearButton":[4,"show-clear-button"],"showCloseButton":[4,"show-close-button"],"showTodayButton":[4,"show-today-button"],"inputShouldFormat":[8,"input-should-format"],"showKeyboardHint":[4,"show-keyboard-hint"],"disableDate":[16],"elementClassName":[1,"element-class-name"],"firstDayOfWeek":[2,"first-day-of-week"],"format":[1],"quickButtons":[16],"todayButtonContent":[1,"today-button-content"],"clearButtonContent":[1,"clear-button-content"],"closeButtonContent":[1,"close-button-content"],"calendarButtonContent":[1,"calendar-button-content"],"showQuickButtons":[4,"show-quick-buttons"],"disableFreeformInput":[4,"disable-freeform-input"],"inputClass":[1,"input-class"],"appendTo":[1,"append-to"],"internalValue":[32],"errorState":[32],"disabledState":[32],"parseDate":[64],"revertInput":[64]},null,{"disabled":[{"watchDisabled":0}],"value":[{"watchValue":0}]}]]]], options);
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
exports.setNonce = index.setNonce;
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["tabworthy-times-picker.cjs",[[2,"tabworthy-times-picker",{"hours":[1026],"minutes":[1026],"seconds":[1026],"useTwelveHourFormat":[4,"use-twelve-hour-format"],"showSeconds":[4,"show-seconds"],"labels":[16],"labelsSrOnly":[4,"labels-sr-only"],"disabled":[4],"elementClassName":[1,"element-class-name"],"minTime":[16],"maxTime":[16],"internalHours":[32],"internalMinutes":[32],"internalSeconds":[32],"period":[32]},null,{"hours":[{"watchHours":0}],"minutes":[{"watchMinutes":0}],"seconds":[{"watchSeconds":0}]}]]],["tabworthy-dates-calendar_2.cjs",[[262,"tabworthy-dates-calendar",{"clearButtonContent":[1,"clear-button-content"],"closeButtonContent":[1,"close-button-content"],"disabled":[4],"modalIsOpen":[4,"modal-is-open"],"disableDate":[16],"elementClassName":[1,"element-class-name"],"firstDayOfWeek":[2,"first-day-of-week"],"range":[4],"labels":[16],"locale":[1],"nextMonthButtonContent":[1,"next-month-button-content"],"nextYearButtonContent":[1,"next-year-button-content"],"previousMonthButtonContent":[1,"previous-month-button-content"],"previousYearButtonContent":[1,"previous-year-button-content"],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"inline":[4],"showClearButton":[4,"show-clear-button"],"showCloseButton":[4,"show-close-button"],"showMonthStepper":[4,"show-month-stepper"],"showTodayButton":[4,"show-today-button"],"showYearStepper":[4,"show-year-stepper"],"showKeyboardHint":[4,"show-keyboard-hint"],"showHiddenTitle":[4,"show-hidden-title"],"startDate":[1,"start-date"],"todayButtonContent":[1,"today-button-content"],"value":[1040],"currentDate":[32],"hoveredDate":[32],"weekdays":[32]},null,{"modalIsOpen":[{"watchModalIsOpen":0}],"firstDayOfWeek":[{"watchFirstDayOfWeek":0}],"locale":[{"watchLocale":0}],"range":[{"watchRange":0}],"startDate":[{"watchStartDate":0}],"value":[{"watchValue":0}]}],[257,"tabworthy-dates-modal",{"label":[1],"inline":[4],"placement":[1],"offset":[16],"appendTo":[1,"append-to"],"closing":[32],"showing":[32],"positioned":[32],"open":[64],"close":[64],"getState":[64],"setTriggerElement":[64],"updatePosition":[64]},[[10,"click","handleClick"]],{"showing":[{"watchShowing":0}]}]]],["tabworthy-times.cjs",[[2,"tabworthy-times",{"id":[513],"value":[1025],"range":[4],"label":[1],"placeholder":[1],"locale":[1],"disabled":[4],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"startDate":[1,"start-date"],"referenceDate":[1,"reference-date"],"useTwelveHourFormat":[4,"use-twelve-hour-format"],"showSeconds":[4,"show-seconds"],"timesLabels":[16],"datesCalendarLabels":[16],"timesPickerLabels":[16],"inline":[4],"hasError":[1028,"has-error"],"showYearStepper":[4,"show-year-stepper"],"showMonthStepper":[4,"show-month-stepper"],"showClearButton":[4,"show-clear-button"],"showCloseButton":[4,"show-close-button"],"showTodayButton":[4,"show-today-button"],"calendarButtonContent":[1,"calendar-button-content"],"nextMonthButtonContent":[1,"next-month-button-content"],"nextYearButtonContent":[1,"next-year-button-content"],"previousMonthButtonContent":[1,"previous-month-button-content"],"previousYearButtonContent":[1,"previous-year-button-content"],"todayButtonContent":[1,"today-button-content"],"clearButtonContent":[1,"clear-button-content"],"closeButtonContent":[1,"close-button-content"],"disableDate":[16],"elementClassName":[1,"element-class-name"],"firstDayOfWeek":[2,"first-day-of-week"],"format":[1],"inputShouldFormat":[8,"input-should-format"],"disableFreeformInput":[4,"disable-freeform-input"],"inputClass":[1,"input-class"],"appendTo":[1,"append-to"],"internalValue":[32],"selectedDate":[32],"selectedHours":[32],"selectedMinutes":[32],"selectedSeconds":[32],"errorState":[32],"disabledState":[32],"revertInput":[64],"clearValue":[64]},null,{"value":[{"watchValue":0}],"disabled":[{"watchDisabled":0}],"hasError":[{"watchHasError":0}]}]]],["tabworthy-dates.cjs",[[2,"tabworthy-dates",{"id":[513],"value":[1025],"range":[4],"yearOnly":[4,"year-only"],"label":[1],"placeholder":[1],"locale":[1],"disabled":[4],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"startDate":[1,"start-date"],"referenceDate":[1,"reference-date"],"useStrictDateParsing":[4,"use-strict-date-parsing"],"datesLabels":[16],"datesCalendarLabels":[16],"inline":[4],"hasError":[1028,"has-error"],"nextMonthButtonContent":[1,"next-month-button-content"],"nextYearButtonContent":[1,"next-year-button-content"],"previousMonthButtonContent":[1,"previous-month-button-content"],"previousYearButtonContent":[1,"previous-year-button-content"],"showYearStepper":[4,"show-year-stepper"],"showMonthStepper":[4,"show-month-stepper"],"showClearButton":[4,"show-clear-button"],"showCloseButton":[4,"show-close-button"],"showTodayButton":[4,"show-today-button"],"inputShouldFormat":[8,"input-should-format"],"showKeyboardHint":[4,"show-keyboard-hint"],"disableDate":[16],"elementClassName":[1,"element-class-name"],"firstDayOfWeek":[2,"first-day-of-week"],"format":[1],"quickButtons":[16],"todayButtonContent":[1,"today-button-content"],"clearButtonContent":[1,"clear-button-content"],"closeButtonContent":[1,"close-button-content"],"calendarButtonContent":[1,"calendar-button-content"],"showQuickButtons":[4,"show-quick-buttons"],"disableFreeformInput":[4,"disable-freeform-input"],"inputClass":[1,"input-class"],"appendTo":[1,"append-to"],"internalValue":[32],"errorState":[32],"disabledState":[32],"parseDate":[64],"revertInput":[64]},null,{"disabled":[{"watchDisabled":0}],"value":[{"watchValue":0}]}]]]], options);
|
|
22
|
+
return index.bootstrapLazy([["tabworthy-times-picker.cjs",[[2,"tabworthy-times-picker",{"hours":[1026],"minutes":[1026],"seconds":[1026],"useTwelveHourFormat":[4,"use-twelve-hour-format"],"showSeconds":[4,"show-seconds"],"labels":[16],"labelsSrOnly":[4,"labels-sr-only"],"disabled":[4],"elementClassName":[1,"element-class-name"],"minTime":[16],"maxTime":[16],"modalIsOpen":[4,"modal-is-open"],"internalHours":[32],"internalMinutes":[32],"internalSeconds":[32],"period":[32]},null,{"modalIsOpen":[{"watchModalIsOpen":0}],"hours":[{"watchHours":0}],"minutes":[{"watchMinutes":0}],"seconds":[{"watchSeconds":0}]}]]],["tabworthy-dates-calendar_2.cjs",[[262,"tabworthy-dates-calendar",{"clearButtonContent":[1,"clear-button-content"],"closeButtonContent":[1,"close-button-content"],"disabled":[4],"modalIsOpen":[4,"modal-is-open"],"disableDate":[16],"elementClassName":[1,"element-class-name"],"firstDayOfWeek":[2,"first-day-of-week"],"range":[4],"labels":[16],"locale":[1],"nextMonthButtonContent":[1,"next-month-button-content"],"nextYearButtonContent":[1,"next-year-button-content"],"previousMonthButtonContent":[1,"previous-month-button-content"],"previousYearButtonContent":[1,"previous-year-button-content"],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"inline":[4],"showClearButton":[4,"show-clear-button"],"showCloseButton":[4,"show-close-button"],"showMonthStepper":[4,"show-month-stepper"],"showTodayButton":[4,"show-today-button"],"showYearStepper":[4,"show-year-stepper"],"showKeyboardHint":[4,"show-keyboard-hint"],"showHiddenTitle":[4,"show-hidden-title"],"startDate":[1,"start-date"],"todayButtonContent":[1,"today-button-content"],"value":[1040],"currentDate":[32],"hoveredDate":[32],"weekdays":[32]},null,{"modalIsOpen":[{"watchModalIsOpen":0}],"firstDayOfWeek":[{"watchFirstDayOfWeek":0}],"locale":[{"watchLocale":0}],"range":[{"watchRange":0}],"startDate":[{"watchStartDate":0}],"value":[{"watchValue":0}]}],[257,"tabworthy-dates-modal",{"label":[1],"inline":[4],"placement":[1],"offset":[16],"appendTo":[1,"append-to"],"closing":[32],"showing":[32],"positioned":[32],"open":[64],"close":[64],"getState":[64],"setTriggerElement":[64],"updatePosition":[64]},[[10,"click","handleClick"]],{"showing":[{"watchShowing":0}]}]]],["tabworthy-times.cjs",[[2,"tabworthy-times",{"id":[513],"value":[1025],"range":[4],"timeOnly":[4,"time-only"],"label":[1],"placeholder":[1],"locale":[1],"disabled":[4],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"startDate":[1,"start-date"],"referenceDate":[1,"reference-date"],"useTwelveHourFormat":[4,"use-twelve-hour-format"],"showSeconds":[4,"show-seconds"],"timesLabels":[16],"datesCalendarLabels":[16],"timesPickerLabels":[16],"inline":[4],"hasError":[1028,"has-error"],"showYearStepper":[4,"show-year-stepper"],"showMonthStepper":[4,"show-month-stepper"],"showClearButton":[4,"show-clear-button"],"showCloseButton":[4,"show-close-button"],"showTodayButton":[4,"show-today-button"],"calendarButtonContent":[1,"calendar-button-content"],"nextMonthButtonContent":[1,"next-month-button-content"],"nextYearButtonContent":[1,"next-year-button-content"],"previousMonthButtonContent":[1,"previous-month-button-content"],"previousYearButtonContent":[1,"previous-year-button-content"],"todayButtonContent":[1,"today-button-content"],"clearButtonContent":[1,"clear-button-content"],"closeButtonContent":[1,"close-button-content"],"disableDate":[16],"elementClassName":[1,"element-class-name"],"firstDayOfWeek":[2,"first-day-of-week"],"format":[1],"inputShouldFormat":[8,"input-should-format"],"disableFreeformInput":[4,"disable-freeform-input"],"inputClass":[1,"input-class"],"appendTo":[1,"append-to"],"internalValue":[32],"selectedDate":[32],"selectedHours":[32],"selectedMinutes":[32],"selectedSeconds":[32],"errorState":[32],"disabledState":[32],"revertInput":[64],"clearValue":[64]},null,{"value":[{"watchValue":0}],"disabled":[{"watchDisabled":0}],"hasError":[{"watchHasError":0}]}]]],["tabworthy-dates.cjs",[[2,"tabworthy-dates",{"id":[513],"value":[1025],"range":[4],"yearOnly":[4,"year-only"],"label":[1],"placeholder":[1],"locale":[1],"disabled":[4],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"startDate":[1,"start-date"],"referenceDate":[1,"reference-date"],"useStrictDateParsing":[4,"use-strict-date-parsing"],"datesLabels":[16],"datesCalendarLabels":[16],"inline":[4],"hasError":[1028,"has-error"],"nextMonthButtonContent":[1,"next-month-button-content"],"nextYearButtonContent":[1,"next-year-button-content"],"previousMonthButtonContent":[1,"previous-month-button-content"],"previousYearButtonContent":[1,"previous-year-button-content"],"showYearStepper":[4,"show-year-stepper"],"showMonthStepper":[4,"show-month-stepper"],"showClearButton":[4,"show-clear-button"],"showCloseButton":[4,"show-close-button"],"showTodayButton":[4,"show-today-button"],"inputShouldFormat":[8,"input-should-format"],"showKeyboardHint":[4,"show-keyboard-hint"],"disableDate":[16],"elementClassName":[1,"element-class-name"],"firstDayOfWeek":[2,"first-day-of-week"],"format":[1],"quickButtons":[16],"todayButtonContent":[1,"today-button-content"],"clearButtonContent":[1,"clear-button-content"],"closeButtonContent":[1,"close-button-content"],"calendarButtonContent":[1,"calendar-button-content"],"showQuickButtons":[4,"show-quick-buttons"],"disableFreeformInput":[4,"disable-freeform-input"],"inputClass":[1,"input-class"],"appendTo":[1,"append-to"],"internalValue":[32],"errorState":[32],"disabledState":[32],"parseDate":[64],"revertInput":[64]},null,{"disabled":[{"watchDisabled":0}],"value":[{"watchValue":0}]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -2859,7 +2859,7 @@ const TabworthyDatesModal = class {
|
|
|
2859
2859
|
}
|
|
2860
2860
|
}
|
|
2861
2861
|
render() {
|
|
2862
|
-
return (index.h(index.Host, { key: '
|
|
2862
|
+
return (index.h(index.Host, { key: '2c9c3ade4eb4964dbb5ba86bd196240851dbb996', showing: this.showing, ref: (r) => r && (this.el = r) }, !this.inline && this.showing && (index.h("div", { key: '961c2d9e34d7ddadb512f8652f14ed4ed4ec6ce5', part: "body", ref: (r) => {
|
|
2863
2863
|
if (r) {
|
|
2864
2864
|
this.bodyRef = r;
|
|
2865
2865
|
// Setup portal and create popper when ref is set
|
|
@@ -2876,7 +2876,7 @@ const TabworthyDatesModal = class {
|
|
|
2876
2876
|
});
|
|
2877
2877
|
}
|
|
2878
2878
|
}
|
|
2879
|
-
}, style: { visibility: this.positioned ? "visible" : "hidden" }, onKeyDown: this.onKeyDown, role: "dialog", tabindex: -1, "aria-hidden": !this.showing, "aria-label": this.label, "aria-modal": this.showing }, index.h("focus-trap", { key: '
|
|
2879
|
+
}, style: { visibility: this.positioned ? "visible" : "hidden" }, onKeyDown: this.onKeyDown, role: "dialog", tabindex: -1, "aria-hidden": !this.showing, "aria-label": this.label, "aria-modal": this.showing }, index.h("focus-trap", { key: '719a3e82aab59326d1aa069b237d158d2311cd62' }, index.h("div", { key: 'b33e1aabdb7477409d97f757bf7121697979d50c', part: "content" }, index.h("slot", { key: 'c7e85552f37b930e298484c0040c138fdccb8ea7' }))))), this.inline && (index.h("div", { key: '59e0333fb0e980c17e0a1da041e6bc492d025bd8', part: "content" }, index.h("slot", { key: 'd52759f124c038fbde4b510ae1df8c3a1bdad25e' })))));
|
|
2880
2880
|
}
|
|
2881
2881
|
get hostElement() { return index.getElement(this); }
|
|
2882
2882
|
static get watchers() { return {
|
|
@@ -32,6 +32,7 @@ const TabworthyTimesPicker = class {
|
|
|
32
32
|
this.labelsSrOnly = true;
|
|
33
33
|
this.disabled = false;
|
|
34
34
|
this.elementClassName = "tabworthy-times-picker";
|
|
35
|
+
this.modalIsOpen = false;
|
|
35
36
|
this.internalHours = this.hours;
|
|
36
37
|
this.internalMinutes = this.minutes;
|
|
37
38
|
this.internalSeconds = this.seconds;
|
|
@@ -134,6 +135,11 @@ const TabworthyTimesPicker = class {
|
|
|
134
135
|
this.emitTimeChange();
|
|
135
136
|
};
|
|
136
137
|
}
|
|
138
|
+
watchModalIsOpen() {
|
|
139
|
+
if (this.modalIsOpen === true) {
|
|
140
|
+
this.moveFocusOnModalOpen = true;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
137
143
|
watchHours(newValue) {
|
|
138
144
|
this.internalHours = newValue;
|
|
139
145
|
this.period = newValue >= 12 ? "PM" : "AM";
|
|
@@ -150,6 +156,18 @@ const TabworthyTimesPicker = class {
|
|
|
150
156
|
this.internalSeconds = this.seconds;
|
|
151
157
|
this.period = this.hours >= 12 ? "PM" : "AM";
|
|
152
158
|
}
|
|
159
|
+
componentDidRender() {
|
|
160
|
+
if (this.moveFocusOnModalOpen) {
|
|
161
|
+
setTimeout(() => {
|
|
162
|
+
this.focusHoursInput();
|
|
163
|
+
this.moveFocusOnModalOpen = false;
|
|
164
|
+
}, 100);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
focusHoursInput() {
|
|
168
|
+
var _a;
|
|
169
|
+
(_a = this.hoursInputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
170
|
+
}
|
|
153
171
|
getDisplayHours() {
|
|
154
172
|
if (!this.useTwelveHourFormat) {
|
|
155
173
|
return this.internalHours;
|
|
@@ -251,28 +269,31 @@ const TabworthyTimesPicker = class {
|
|
|
251
269
|
const displayHours = this.getDisplayHours();
|
|
252
270
|
const maxHours = this.useTwelveHourFormat ? 12 : 23;
|
|
253
271
|
const minHours = this.useTwelveHourFormat ? 1 : 0;
|
|
254
|
-
return (index.h(index.Host, { key: '
|
|
272
|
+
return (index.h(index.Host, { key: 'c307a1b94d1ec25702c286c7f36e4746df8c6bb7', class: this.elementClassName, "aria-label": this.labels.timePicker }, index.h("div", { key: 'c446911a0ddcb6282ab5507d359d56a42f533db3', class: `${this.elementClassName}__container` }, index.h("div", { key: '302c7e7e0c1bf71629ef2a71bb564f9571aad7be', class: `${this.elementClassName}__field` }, index.h("label", { key: '8ce64af4f416c3cdc0dd8943fc02ab9016d62099', htmlFor: `${this.elementClassName}-hours`, class: {
|
|
255
273
|
[`${this.elementClassName}__label`]: true,
|
|
256
274
|
[`${this.elementClassName}__label--sr-only`]: this.labelsSrOnly
|
|
257
|
-
} }, this.labels.hours), index.h("div", { key: '
|
|
275
|
+
} }, this.labels.hours), index.h("div", { key: '3f541e096c7bb3f436f358800588d5da7fccb34e', class: `${this.elementClassName}__control` }, index.h("button", { key: '31039ad972122c2a6f963190d38f379bb7dce71f', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--increment`, onClick: this.handleHourIncrement, disabled: this.disabled || this.isAtMaxHour(), "aria-label": this.labels.incrementHours }, index.h("svg", { key: '4b16f261f4fecc91973d858b6235fc8aac4f7605', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, index.h("polyline", { key: 'fe60640cfa75911b862913a3076cbeea037a38f7', points: "18 15 12 9 6 15" }))), index.h("input", { key: 'a3a7eed2efc8b1789de698771e82e3f31f50e885', id: `${this.elementClassName}-hours`, ref: (el) => (this.hoursInputRef = el), type: "number", class: `${this.elementClassName}__input`, value: this.padZero(displayHours), min: minHours, max: maxHours, onInput: this.handleHourChange, disabled: this.disabled, "aria-label": this.labels.hours }), index.h("button", { key: '421b70976c21b2b33e21962780d13609a6b762a5', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--decrement`, onClick: this.handleHourDecrement, disabled: this.disabled || this.isAtMinHour(), "aria-label": this.labels.decrementHours }, index.h("svg", { key: 'ab87c0de149d43edcbebd1b2d4d00e4a3ebed5b3', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, index.h("polyline", { key: '32f2d112c44434249d506d1e8222e25b34fb0d44', points: "6 9 12 15 18 9" }))))), index.h("div", { key: '54449a42e67f6f3c2318310bc12eeba24cebc56f', class: `${this.elementClassName}__separator` }, ":"), index.h("div", { key: 'f65d84751223424c3649d0fb9589cf3c1af091eb', class: `${this.elementClassName}__field` }, index.h("label", { key: '911244fd360371ee26b97eb9690c7b04340d6e88', htmlFor: `${this.elementClassName}-minutes`, class: {
|
|
258
276
|
[`${this.elementClassName}__label`]: true,
|
|
259
277
|
[`${this.elementClassName}__label--sr-only`]: this.labelsSrOnly
|
|
260
|
-
} }, this.labels.minutes), index.h("div", { key: '
|
|
261
|
-
index.h("div", { key: '
|
|
262
|
-
index.h("div", { key: '
|
|
278
|
+
} }, this.labels.minutes), index.h("div", { key: 'e5574834dd59e9c08dcee56b07bf8bf186f7ba4b', class: `${this.elementClassName}__control` }, index.h("button", { key: '2b091d643aa785b8ddeae55dd8c523cd5282719d', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--increment`, onClick: this.handleMinuteIncrement, disabled: this.disabled || this.isAtMaxMinute(), "aria-label": this.labels.incrementMinutes }, index.h("svg", { key: '23668a0f1299f86901d0e32e9f7f37bacd376665', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, index.h("polyline", { key: '7f030c2d35147651ad86352c65dc6f8f00b2ba93', points: "18 15 12 9 6 15" }))), index.h("input", { key: 'b73ed30b3a7d25ef84bab23afa45172ce5d03944', id: `${this.elementClassName}-minutes`, type: "number", class: `${this.elementClassName}__input`, value: this.padZero(this.internalMinutes), min: 0, max: 59, onInput: this.handleMinuteChange, disabled: this.disabled, "aria-label": this.labels.minutes }), index.h("button", { key: '7ce7a36ef59e44afd474c427250adc352a8a6694', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--decrement`, onClick: this.handleMinuteDecrement, disabled: this.disabled || this.isAtMinMinute(), "aria-label": this.labels.decrementMinutes }, index.h("svg", { key: '49bcd0c73fde1f77c0d42978a76086abb5be6cc4', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, index.h("polyline", { key: 'c503c319467e0aac6883db25b7d84a1d752aeaf9', points: "6 9 12 15 18 9" }))))), this.showSeconds && [
|
|
279
|
+
index.h("div", { key: 'be25b2045f9e74b0414e55f8d508f7c192e1772e', class: `${this.elementClassName}__separator` }, ":"),
|
|
280
|
+
index.h("div", { key: '85ceb01427ea52c231f1b6a3d78c95c6d603215c', class: `${this.elementClassName}__field` }, index.h("label", { key: '1a1adf9081b3e763e4fbc45b8bab812ae869edbb', htmlFor: `${this.elementClassName}-seconds`, class: {
|
|
263
281
|
[`${this.elementClassName}__label`]: true,
|
|
264
282
|
[`${this.elementClassName}__label--sr-only`]: this.labelsSrOnly
|
|
265
|
-
} }, this.labels.seconds), index.h("div", { key: '
|
|
266
|
-
], this.useTwelveHourFormat && (index.h("div", { key: '
|
|
283
|
+
} }, this.labels.seconds), index.h("div", { key: 'abce976c9d3143819c41ff64b54dfbcea41ddd88', class: `${this.elementClassName}__control` }, index.h("button", { key: '1416ee09b69a6d62d8ecd1394bb375fc01601e4a', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--increment`, onClick: this.handleSecondIncrement, disabled: this.disabled || this.isAtMaxSecond(), "aria-label": this.labels.incrementSeconds }, index.h("svg", { key: '1ab4adae2efa4a54286605be221cf2d424e98deb', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, index.h("polyline", { key: '61ef61c721a39732a3aacdc9db5b63950796706b', points: "18 15 12 9 6 15" }))), index.h("input", { key: 'd5b40cf419b007e28f7f69ffe333601fcc3c701e', id: `${this.elementClassName}-seconds`, type: "number", class: `${this.elementClassName}__input`, value: this.padZero(this.internalSeconds), min: 0, max: 59, onInput: this.handleSecondChange, disabled: this.disabled, "aria-label": this.labels.seconds }), index.h("button", { key: '177306df5ba004bbd58df462a7d010f8903656eb', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--decrement`, onClick: this.handleSecondDecrement, disabled: this.disabled || this.isAtMinSecond(), "aria-label": this.labels.decrementSeconds }, index.h("svg", { key: '971169fce6fee5ccb8241faef04d633a0396e347', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, index.h("polyline", { key: '4c31a4b794cc6b421e8e2b3cdb322d584fe40e81', points: "6 9 12 15 18 9" })))))
|
|
284
|
+
], this.useTwelveHourFormat && (index.h("div", { key: 'b6e9916c6d14aaac6aa3ee1f1c3bd2624f01a344', class: `${this.elementClassName}__period` }, index.h("button", { key: 'c476a13007f840b5f9e5f058623b1846b33b72cf', type: "button", class: {
|
|
267
285
|
[`${this.elementClassName}__period-button`]: true,
|
|
268
286
|
[`${this.elementClassName}__period-button--active`]: this.period === "AM"
|
|
269
|
-
}, onClick: () => this.handlePeriodChange("AM"), disabled: this.disabled, "aria-label": this.labels.am, "aria-pressed": this.period === "AM" }, this.labels.am), index.h("button", { key: '
|
|
287
|
+
}, onClick: () => this.handlePeriodChange("AM"), disabled: this.disabled, "aria-label": this.labels.am, "aria-pressed": this.period === "AM" }, this.labels.am), index.h("button", { key: 'f4cc8df59e07cb53e9b72f376a17e10df357a335', type: "button", class: {
|
|
270
288
|
[`${this.elementClassName}__period-button`]: true,
|
|
271
289
|
[`${this.elementClassName}__period-button--active`]: this.period === "PM"
|
|
272
290
|
}, onClick: () => this.handlePeriodChange("PM"), disabled: this.disabled, "aria-label": this.labels.pm, "aria-pressed": this.period === "PM" }, this.labels.pm))))));
|
|
273
291
|
}
|
|
274
292
|
get el() { return index.getElement(this); }
|
|
275
293
|
static get watchers() { return {
|
|
294
|
+
"modalIsOpen": [{
|
|
295
|
+
"watchModalIsOpen": 0
|
|
296
|
+
}],
|
|
276
297
|
"hours": [{
|
|
277
298
|
"watchHours": 0
|
|
278
299
|
}],
|
|
@@ -46,6 +46,8 @@ const TabworthyTimes = class {
|
|
|
46
46
|
this.componentReady = index.createEvent(this, "componentReady", 7);
|
|
47
47
|
// Enable or disable range mode
|
|
48
48
|
this.range = false;
|
|
49
|
+
// Show only the time picker, without the calendar
|
|
50
|
+
this.timeOnly = false;
|
|
49
51
|
// A label for the text field
|
|
50
52
|
this.label = "Choose a date and time";
|
|
51
53
|
// A placeholder for the text field
|
|
@@ -136,6 +138,9 @@ const TabworthyTimes = class {
|
|
|
136
138
|
if (this.selectedDate) {
|
|
137
139
|
this.updateValue(this.selectedDate);
|
|
138
140
|
}
|
|
141
|
+
else if (this.timeOnly) {
|
|
142
|
+
this.updateValue(this.getDateForTimeOnlyValue());
|
|
143
|
+
}
|
|
139
144
|
};
|
|
140
145
|
this.handleCalendarButtonClick = async () => {
|
|
141
146
|
if (this.modalRef) {
|
|
@@ -305,6 +310,14 @@ const TabworthyTimes = class {
|
|
|
305
310
|
}
|
|
306
311
|
return !!this.inputShouldFormat;
|
|
307
312
|
}
|
|
313
|
+
getDateForTimeOnlyValue() {
|
|
314
|
+
if (this.selectedDate)
|
|
315
|
+
return this.selectedDate;
|
|
316
|
+
const referenceDate = customParseFormat.dayjs(this.referenceDate);
|
|
317
|
+
if (referenceDate.isValid())
|
|
318
|
+
return referenceDate.toDate();
|
|
319
|
+
return new Date();
|
|
320
|
+
}
|
|
308
321
|
watchValue(_newValue) {
|
|
309
322
|
this.syncFromValueProp();
|
|
310
323
|
}
|
|
@@ -439,6 +452,9 @@ const TabworthyTimes = class {
|
|
|
439
452
|
.join(` ${this.timesLabels.to} `);
|
|
440
453
|
this.inputRef.value = formatted;
|
|
441
454
|
}
|
|
455
|
+
else if (this.timeOnly) {
|
|
456
|
+
this.inputRef.value = customParseFormat.dayjs(this.internalValue, this.format).format(this.showSeconds ? "LTS" : "LT");
|
|
457
|
+
}
|
|
442
458
|
else {
|
|
443
459
|
// Format single datetime
|
|
444
460
|
this.inputRef.value = customParseFormat.dayjs(this.internalValue, this.format).format("lll");
|
|
@@ -475,20 +491,26 @@ const TabworthyTimes = class {
|
|
|
475
491
|
}
|
|
476
492
|
render() {
|
|
477
493
|
var _a;
|
|
478
|
-
return (index.h(index.Host, { key: '
|
|
494
|
+
return (index.h(index.Host, { key: 'ab639b86fb2e2afe854a1253a2caab53a82f9cc0', class: this.elementClassName, "has-error": this.errorState, disabled: this.disabledState, "time-only": this.timeOnly }, index.h("label", { key: '55dd4b279bc847151a5f3cb50f98bddb62c2965c', htmlFor: `${this.id}-input`, class: this.getClassName("label") }, this.label), index.h("div", { key: '5aa75daa3ee2d7de8f8385d5871dd732ce6c5d3c', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, index.h("input", { key: '49912db4c96619e20e818b494d553aad293920a8', id: `${this.id}-input`, ref: (r) => (this.inputRef = r), type: "text", class: {
|
|
479
495
|
[this.getClassName("input")]: true,
|
|
480
496
|
[this.inputClass]: !!this.inputClass
|
|
481
|
-
}, 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: '
|
|
497
|
+
}, 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: 'f22378a0ad106f560ed0d1e02e3b22b43e725289', type: "button", onClick: this.handleCalendarButtonClick, class: this.getClassName("calendar-button"), disabled: this.disabledState, "aria-label": this.calendarButtonContent
|
|
482
498
|
? this.timesLabels.openCalendar
|
|
483
|
-
: undefined }, this.calendarButtonContent ? (index.h("span", { innerHTML: this.calendarButtonContent })) : (this.timesLabels.openCalendar)))), index.h("tabworthy-dates-modal", { key: '
|
|
499
|
+
: undefined }, this.calendarButtonContent ? (index.h("span", { innerHTML: this.calendarButtonContent })) : (this.timesLabels.openCalendar)))), index.h("tabworthy-dates-modal", { key: 'c0f14cf67c2da5a3c4917b388949458e410009e8', label: this.timesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
|
|
484
500
|
if (this.pickerRef) {
|
|
485
501
|
this.pickerRef.modalIsOpen = true;
|
|
486
502
|
}
|
|
503
|
+
if (this.timeOnly && this.timePickerRef) {
|
|
504
|
+
this.timePickerRef.modalIsOpen = true;
|
|
505
|
+
}
|
|
487
506
|
}, onClosed: () => {
|
|
488
507
|
if (this.pickerRef) {
|
|
489
508
|
this.pickerRef.modalIsOpen = false;
|
|
490
509
|
}
|
|
491
|
-
|
|
510
|
+
if (this.timePickerRef) {
|
|
511
|
+
this.timePickerRef.modalIsOpen = false;
|
|
512
|
+
}
|
|
513
|
+
}, inline: this.inline, appendTo: this.appendTo }, index.h("div", { key: 'c7051d360cfba74d9e0b3a8702683da2f79c013c', class: this.getClassName("picker-container") }, !this.timeOnly && (index.h("tabworthy-dates-calendar", { key: 'c9c72c072116568cd6ca0ce99de136940876e3b0', range: this.range, locale: this.locale, onSelectDate: (event) => this.handlePickerSelection(event.detail), onChangeMonth: (event) => this.handleChangedMonths(event.detail), onChangeYear: (event) => this.handleYearChange(event.detail), onRequestClose: () => { var _a; return (_a = this.modalRef) === null || _a === void 0 ? void 0 : _a.close(); }, 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, showCloseButton: this.showCloseButton, showTodayButton: this.showTodayButton, disableDate: this.disableDate, minDate: this.minDate, maxDate: this.maxDate, inline: this.inline, value: this.value ? this.toDate(this.value) : undefined, nextMonthButtonContent: this.nextMonthButtonContent, nextYearButtonContent: this.nextYearButtonContent, previousMonthButtonContent: this.previousMonthButtonContent, previousYearButtonContent: this.previousYearButtonContent, todayButtonContent: this.todayButtonContent, clearButtonContent: this.clearButtonContent, closeButtonContent: this.closeButtonContent }, index.h("div", { key: '325945a90d36cb39ef23db27f99fd6224984b735', slot: "after-calendar", class: this.getClassName("time-section") }, index.h("hr", { key: 'ff305cef7f526fb05dd3f193ea4093f0064fc813', class: this.getClassName("divider") }), index.h("tabworthy-times-picker", { key: 'ad163d7fa0c3282312b848a758bfcc8b08a663ad', hours: this.selectedHours, minutes: this.selectedMinutes, seconds: this.selectedSeconds, showSeconds: this.showSeconds, useTwelveHourFormat: this.useTwelveHourFormat, disabled: this.disabledState || this.isDateOutOfBounds(), onTimeChanged: this.handleTimeChange, labels: this.timesPickerLabels, minTime: this.getEffectiveMinTime(), maxTime: this.getEffectiveMaxTime(), ref: (el) => (this.timePickerRef = el) })))), this.timeOnly && (index.h("div", { key: 'c19252f05b91934af956c5ed9453185e591c4f71', class: this.getClassName("time-section") }, index.h("tabworthy-times-picker", { key: 'd8456d201c430625d2181a7da76f0ec5a471aec4', hours: this.selectedHours, minutes: this.selectedMinutes, seconds: this.selectedSeconds, showSeconds: this.showSeconds, useTwelveHourFormat: this.useTwelveHourFormat, disabled: this.disabledState || this.isDateOutOfBounds(), onTimeChanged: this.handleTimeChange, labels: this.timesPickerLabels, minTime: this.getEffectiveMinTime(), maxTime: this.getEffectiveMaxTime(), ref: (el) => (this.timePickerRef = el) }))))), this.errorState && (index.h("div", { key: '0968907cbf6971aa00a486184394fe7d342ee237', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
|
|
492
514
|
}
|
|
493
515
|
get el() { return index.getElement(this); }
|
|
494
516
|
static get watchers() { return {
|
|
@@ -190,7 +190,7 @@ export class TabworthyDatesModal {
|
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
render() {
|
|
193
|
-
return (h(Host, { key: '
|
|
193
|
+
return (h(Host, { key: '2c9c3ade4eb4964dbb5ba86bd196240851dbb996', showing: this.showing, ref: (r) => r && (this.el = r) }, !this.inline && this.showing && (h("div", { key: '961c2d9e34d7ddadb512f8652f14ed4ed4ec6ce5', part: "body", ref: (r) => {
|
|
194
194
|
if (r) {
|
|
195
195
|
this.bodyRef = r;
|
|
196
196
|
// Setup portal and create popper when ref is set
|
|
@@ -207,7 +207,7 @@ export class TabworthyDatesModal {
|
|
|
207
207
|
});
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
|
-
}, style: { visibility: this.positioned ? "visible" : "hidden" }, onKeyDown: this.onKeyDown, role: "dialog", tabindex: -1, "aria-hidden": !this.showing, "aria-label": this.label, "aria-modal": this.showing }, h("focus-trap", { key: '
|
|
210
|
+
}, style: { visibility: this.positioned ? "visible" : "hidden" }, onKeyDown: this.onKeyDown, role: "dialog", tabindex: -1, "aria-hidden": !this.showing, "aria-label": this.label, "aria-modal": this.showing }, h("focus-trap", { key: '719a3e82aab59326d1aa069b237d158d2311cd62' }, h("div", { key: 'b33e1aabdb7477409d97f757bf7121697979d50c', part: "content" }, h("slot", { key: 'c7e85552f37b930e298484c0040c138fdccb8ea7' }))))), this.inline && (h("div", { key: '59e0333fb0e980c17e0a1da041e6bc492d025bd8', part: "content" }, h("slot", { key: 'd52759f124c038fbde4b510ae1df8c3a1bdad25e' })))));
|
|
211
211
|
}
|
|
212
212
|
static get is() { return "tabworthy-dates-modal"; }
|
|
213
213
|
static get encapsulation() { return "shadow"; }
|
|
@@ -22,6 +22,8 @@ export class TabworthyTimes {
|
|
|
22
22
|
constructor() {
|
|
23
23
|
// Enable or disable range mode
|
|
24
24
|
this.range = false;
|
|
25
|
+
// Show only the time picker, without the calendar
|
|
26
|
+
this.timeOnly = false;
|
|
25
27
|
// A label for the text field
|
|
26
28
|
this.label = "Choose a date and time";
|
|
27
29
|
// A placeholder for the text field
|
|
@@ -112,6 +114,9 @@ export class TabworthyTimes {
|
|
|
112
114
|
if (this.selectedDate) {
|
|
113
115
|
this.updateValue(this.selectedDate);
|
|
114
116
|
}
|
|
117
|
+
else if (this.timeOnly) {
|
|
118
|
+
this.updateValue(this.getDateForTimeOnlyValue());
|
|
119
|
+
}
|
|
115
120
|
};
|
|
116
121
|
this.handleCalendarButtonClick = async () => {
|
|
117
122
|
if (this.modalRef) {
|
|
@@ -281,6 +286,14 @@ export class TabworthyTimes {
|
|
|
281
286
|
}
|
|
282
287
|
return !!this.inputShouldFormat;
|
|
283
288
|
}
|
|
289
|
+
getDateForTimeOnlyValue() {
|
|
290
|
+
if (this.selectedDate)
|
|
291
|
+
return this.selectedDate;
|
|
292
|
+
const referenceDate = dayjs(this.referenceDate);
|
|
293
|
+
if (referenceDate.isValid())
|
|
294
|
+
return referenceDate.toDate();
|
|
295
|
+
return new Date();
|
|
296
|
+
}
|
|
284
297
|
watchValue(_newValue) {
|
|
285
298
|
this.syncFromValueProp();
|
|
286
299
|
}
|
|
@@ -415,6 +428,9 @@ export class TabworthyTimes {
|
|
|
415
428
|
.join(` ${this.timesLabels.to} `);
|
|
416
429
|
this.inputRef.value = formatted;
|
|
417
430
|
}
|
|
431
|
+
else if (this.timeOnly) {
|
|
432
|
+
this.inputRef.value = dayjs(this.internalValue, this.format).format(this.showSeconds ? "LTS" : "LT");
|
|
433
|
+
}
|
|
418
434
|
else {
|
|
419
435
|
// Format single datetime
|
|
420
436
|
this.inputRef.value = dayjs(this.internalValue, this.format).format("lll");
|
|
@@ -451,20 +467,26 @@ export class TabworthyTimes {
|
|
|
451
467
|
}
|
|
452
468
|
render() {
|
|
453
469
|
var _a;
|
|
454
|
-
return (h(Host, { key: '
|
|
470
|
+
return (h(Host, { key: 'ab639b86fb2e2afe854a1253a2caab53a82f9cc0', class: this.elementClassName, "has-error": this.errorState, disabled: this.disabledState, "time-only": this.timeOnly }, h("label", { key: '55dd4b279bc847151a5f3cb50f98bddb62c2965c', htmlFor: `${this.id}-input`, class: this.getClassName("label") }, this.label), h("div", { key: '5aa75daa3ee2d7de8f8385d5871dd732ce6c5d3c', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, h("input", { key: '49912db4c96619e20e818b494d553aad293920a8', id: `${this.id}-input`, ref: (r) => (this.inputRef = r), type: "text", class: {
|
|
455
471
|
[this.getClassName("input")]: true,
|
|
456
472
|
[this.inputClass]: !!this.inputClass
|
|
457
|
-
}, 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: '
|
|
473
|
+
}, 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: 'f22378a0ad106f560ed0d1e02e3b22b43e725289', type: "button", onClick: this.handleCalendarButtonClick, class: this.getClassName("calendar-button"), disabled: this.disabledState, "aria-label": this.calendarButtonContent
|
|
458
474
|
? this.timesLabels.openCalendar
|
|
459
|
-
: undefined }, this.calendarButtonContent ? (h("span", { innerHTML: this.calendarButtonContent })) : (this.timesLabels.openCalendar)))), h("tabworthy-dates-modal", { key: '
|
|
475
|
+
: undefined }, this.calendarButtonContent ? (h("span", { innerHTML: this.calendarButtonContent })) : (this.timesLabels.openCalendar)))), h("tabworthy-dates-modal", { key: 'c0f14cf67c2da5a3c4917b388949458e410009e8', label: this.timesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
|
|
460
476
|
if (this.pickerRef) {
|
|
461
477
|
this.pickerRef.modalIsOpen = true;
|
|
462
478
|
}
|
|
479
|
+
if (this.timeOnly && this.timePickerRef) {
|
|
480
|
+
this.timePickerRef.modalIsOpen = true;
|
|
481
|
+
}
|
|
463
482
|
}, onClosed: () => {
|
|
464
483
|
if (this.pickerRef) {
|
|
465
484
|
this.pickerRef.modalIsOpen = false;
|
|
466
485
|
}
|
|
467
|
-
|
|
486
|
+
if (this.timePickerRef) {
|
|
487
|
+
this.timePickerRef.modalIsOpen = false;
|
|
488
|
+
}
|
|
489
|
+
}, inline: this.inline, appendTo: this.appendTo }, h("div", { key: 'c7051d360cfba74d9e0b3a8702683da2f79c013c', class: this.getClassName("picker-container") }, !this.timeOnly && (h("tabworthy-dates-calendar", { key: 'c9c72c072116568cd6ca0ce99de136940876e3b0', range: this.range, locale: this.locale, onSelectDate: (event) => this.handlePickerSelection(event.detail), onChangeMonth: (event) => this.handleChangedMonths(event.detail), onChangeYear: (event) => this.handleYearChange(event.detail), onRequestClose: () => { var _a; return (_a = this.modalRef) === null || _a === void 0 ? void 0 : _a.close(); }, 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, showCloseButton: this.showCloseButton, showTodayButton: this.showTodayButton, disableDate: this.disableDate, minDate: this.minDate, maxDate: this.maxDate, inline: this.inline, value: this.value ? this.toDate(this.value) : undefined, nextMonthButtonContent: this.nextMonthButtonContent, nextYearButtonContent: this.nextYearButtonContent, previousMonthButtonContent: this.previousMonthButtonContent, previousYearButtonContent: this.previousYearButtonContent, todayButtonContent: this.todayButtonContent, clearButtonContent: this.clearButtonContent, closeButtonContent: this.closeButtonContent }, h("div", { key: '325945a90d36cb39ef23db27f99fd6224984b735', slot: "after-calendar", class: this.getClassName("time-section") }, h("hr", { key: 'ff305cef7f526fb05dd3f193ea4093f0064fc813', class: this.getClassName("divider") }), h("tabworthy-times-picker", { key: 'ad163d7fa0c3282312b848a758bfcc8b08a663ad', hours: this.selectedHours, minutes: this.selectedMinutes, seconds: this.selectedSeconds, showSeconds: this.showSeconds, useTwelveHourFormat: this.useTwelveHourFormat, disabled: this.disabledState || this.isDateOutOfBounds(), onTimeChanged: this.handleTimeChange, labels: this.timesPickerLabels, minTime: this.getEffectiveMinTime(), maxTime: this.getEffectiveMaxTime(), ref: (el) => (this.timePickerRef = el) })))), this.timeOnly && (h("div", { key: 'c19252f05b91934af956c5ed9453185e591c4f71', class: this.getClassName("time-section") }, h("tabworthy-times-picker", { key: 'd8456d201c430625d2181a7da76f0ec5a471aec4', hours: this.selectedHours, minutes: this.selectedMinutes, seconds: this.selectedSeconds, showSeconds: this.showSeconds, useTwelveHourFormat: this.useTwelveHourFormat, disabled: this.disabledState || this.isDateOutOfBounds(), onTimeChanged: this.handleTimeChange, labels: this.timesPickerLabels, minTime: this.getEffectiveMinTime(), maxTime: this.getEffectiveMaxTime(), ref: (el) => (this.timePickerRef = el) }))))), this.errorState && (h("div", { key: '0968907cbf6971aa00a486184394fe7d342ee237', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
|
|
468
490
|
}
|
|
469
491
|
static get is() { return "tabworthy-times"; }
|
|
470
492
|
static get encapsulation() { return "scoped"; }
|
|
@@ -528,6 +550,26 @@ export class TabworthyTimes {
|
|
|
528
550
|
"attribute": "range",
|
|
529
551
|
"defaultValue": "false"
|
|
530
552
|
},
|
|
553
|
+
"timeOnly": {
|
|
554
|
+
"type": "boolean",
|
|
555
|
+
"mutable": false,
|
|
556
|
+
"complexType": {
|
|
557
|
+
"original": "boolean",
|
|
558
|
+
"resolved": "boolean",
|
|
559
|
+
"references": {}
|
|
560
|
+
},
|
|
561
|
+
"required": false,
|
|
562
|
+
"optional": false,
|
|
563
|
+
"docs": {
|
|
564
|
+
"tags": [],
|
|
565
|
+
"text": ""
|
|
566
|
+
},
|
|
567
|
+
"getter": false,
|
|
568
|
+
"setter": false,
|
|
569
|
+
"reflect": false,
|
|
570
|
+
"attribute": "time-only",
|
|
571
|
+
"defaultValue": "false"
|
|
572
|
+
},
|
|
531
573
|
"label": {
|
|
532
574
|
"type": "string",
|
|
533
575
|
"mutable": false,
|
|
@@ -27,6 +27,7 @@ export class TabworthyTimesPicker {
|
|
|
27
27
|
this.labelsSrOnly = true;
|
|
28
28
|
this.disabled = false;
|
|
29
29
|
this.elementClassName = "tabworthy-times-picker";
|
|
30
|
+
this.modalIsOpen = false;
|
|
30
31
|
this.internalHours = this.hours;
|
|
31
32
|
this.internalMinutes = this.minutes;
|
|
32
33
|
this.internalSeconds = this.seconds;
|
|
@@ -129,6 +130,11 @@ export class TabworthyTimesPicker {
|
|
|
129
130
|
this.emitTimeChange();
|
|
130
131
|
};
|
|
131
132
|
}
|
|
133
|
+
watchModalIsOpen() {
|
|
134
|
+
if (this.modalIsOpen === true) {
|
|
135
|
+
this.moveFocusOnModalOpen = true;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
132
138
|
watchHours(newValue) {
|
|
133
139
|
this.internalHours = newValue;
|
|
134
140
|
this.period = newValue >= 12 ? "PM" : "AM";
|
|
@@ -145,6 +151,18 @@ export class TabworthyTimesPicker {
|
|
|
145
151
|
this.internalSeconds = this.seconds;
|
|
146
152
|
this.period = this.hours >= 12 ? "PM" : "AM";
|
|
147
153
|
}
|
|
154
|
+
componentDidRender() {
|
|
155
|
+
if (this.moveFocusOnModalOpen) {
|
|
156
|
+
setTimeout(() => {
|
|
157
|
+
this.focusHoursInput();
|
|
158
|
+
this.moveFocusOnModalOpen = false;
|
|
159
|
+
}, 100);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
focusHoursInput() {
|
|
163
|
+
var _a;
|
|
164
|
+
(_a = this.hoursInputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
165
|
+
}
|
|
148
166
|
getDisplayHours() {
|
|
149
167
|
if (!this.useTwelveHourFormat) {
|
|
150
168
|
return this.internalHours;
|
|
@@ -246,22 +264,22 @@ export class TabworthyTimesPicker {
|
|
|
246
264
|
const displayHours = this.getDisplayHours();
|
|
247
265
|
const maxHours = this.useTwelveHourFormat ? 12 : 23;
|
|
248
266
|
const minHours = this.useTwelveHourFormat ? 1 : 0;
|
|
249
|
-
return (h(Host, { key: '
|
|
267
|
+
return (h(Host, { key: 'c307a1b94d1ec25702c286c7f36e4746df8c6bb7', class: this.elementClassName, "aria-label": this.labels.timePicker }, h("div", { key: 'c446911a0ddcb6282ab5507d359d56a42f533db3', class: `${this.elementClassName}__container` }, h("div", { key: '302c7e7e0c1bf71629ef2a71bb564f9571aad7be', class: `${this.elementClassName}__field` }, h("label", { key: '8ce64af4f416c3cdc0dd8943fc02ab9016d62099', htmlFor: `${this.elementClassName}-hours`, class: {
|
|
250
268
|
[`${this.elementClassName}__label`]: true,
|
|
251
269
|
[`${this.elementClassName}__label--sr-only`]: this.labelsSrOnly
|
|
252
|
-
} }, this.labels.hours), h("div", { key: '
|
|
270
|
+
} }, this.labels.hours), h("div", { key: '3f541e096c7bb3f436f358800588d5da7fccb34e', class: `${this.elementClassName}__control` }, h("button", { key: '31039ad972122c2a6f963190d38f379bb7dce71f', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--increment`, onClick: this.handleHourIncrement, disabled: this.disabled || this.isAtMaxHour(), "aria-label": this.labels.incrementHours }, h("svg", { key: '4b16f261f4fecc91973d858b6235fc8aac4f7605', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, h("polyline", { key: 'fe60640cfa75911b862913a3076cbeea037a38f7', points: "18 15 12 9 6 15" }))), h("input", { key: 'a3a7eed2efc8b1789de698771e82e3f31f50e885', id: `${this.elementClassName}-hours`, ref: (el) => (this.hoursInputRef = el), type: "number", class: `${this.elementClassName}__input`, value: this.padZero(displayHours), min: minHours, max: maxHours, onInput: this.handleHourChange, disabled: this.disabled, "aria-label": this.labels.hours }), h("button", { key: '421b70976c21b2b33e21962780d13609a6b762a5', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--decrement`, onClick: this.handleHourDecrement, disabled: this.disabled || this.isAtMinHour(), "aria-label": this.labels.decrementHours }, h("svg", { key: 'ab87c0de149d43edcbebd1b2d4d00e4a3ebed5b3', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, h("polyline", { key: '32f2d112c44434249d506d1e8222e25b34fb0d44', points: "6 9 12 15 18 9" }))))), h("div", { key: '54449a42e67f6f3c2318310bc12eeba24cebc56f', class: `${this.elementClassName}__separator` }, ":"), h("div", { key: 'f65d84751223424c3649d0fb9589cf3c1af091eb', class: `${this.elementClassName}__field` }, h("label", { key: '911244fd360371ee26b97eb9690c7b04340d6e88', htmlFor: `${this.elementClassName}-minutes`, class: {
|
|
253
271
|
[`${this.elementClassName}__label`]: true,
|
|
254
272
|
[`${this.elementClassName}__label--sr-only`]: this.labelsSrOnly
|
|
255
|
-
} }, this.labels.minutes), h("div", { key: '
|
|
256
|
-
h("div", { key: '
|
|
257
|
-
h("div", { key: '
|
|
273
|
+
} }, this.labels.minutes), h("div", { key: 'e5574834dd59e9c08dcee56b07bf8bf186f7ba4b', class: `${this.elementClassName}__control` }, h("button", { key: '2b091d643aa785b8ddeae55dd8c523cd5282719d', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--increment`, onClick: this.handleMinuteIncrement, disabled: this.disabled || this.isAtMaxMinute(), "aria-label": this.labels.incrementMinutes }, h("svg", { key: '23668a0f1299f86901d0e32e9f7f37bacd376665', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, h("polyline", { key: '7f030c2d35147651ad86352c65dc6f8f00b2ba93', points: "18 15 12 9 6 15" }))), h("input", { key: 'b73ed30b3a7d25ef84bab23afa45172ce5d03944', id: `${this.elementClassName}-minutes`, type: "number", class: `${this.elementClassName}__input`, value: this.padZero(this.internalMinutes), min: 0, max: 59, onInput: this.handleMinuteChange, disabled: this.disabled, "aria-label": this.labels.minutes }), h("button", { key: '7ce7a36ef59e44afd474c427250adc352a8a6694', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--decrement`, onClick: this.handleMinuteDecrement, disabled: this.disabled || this.isAtMinMinute(), "aria-label": this.labels.decrementMinutes }, h("svg", { key: '49bcd0c73fde1f77c0d42978a76086abb5be6cc4', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, h("polyline", { key: 'c503c319467e0aac6883db25b7d84a1d752aeaf9', points: "6 9 12 15 18 9" }))))), this.showSeconds && [
|
|
274
|
+
h("div", { key: 'be25b2045f9e74b0414e55f8d508f7c192e1772e', class: `${this.elementClassName}__separator` }, ":"),
|
|
275
|
+
h("div", { key: '85ceb01427ea52c231f1b6a3d78c95c6d603215c', class: `${this.elementClassName}__field` }, h("label", { key: '1a1adf9081b3e763e4fbc45b8bab812ae869edbb', htmlFor: `${this.elementClassName}-seconds`, class: {
|
|
258
276
|
[`${this.elementClassName}__label`]: true,
|
|
259
277
|
[`${this.elementClassName}__label--sr-only`]: this.labelsSrOnly
|
|
260
|
-
} }, this.labels.seconds), h("div", { key: '
|
|
261
|
-
], this.useTwelveHourFormat && (h("div", { key: '
|
|
278
|
+
} }, this.labels.seconds), h("div", { key: 'abce976c9d3143819c41ff64b54dfbcea41ddd88', class: `${this.elementClassName}__control` }, h("button", { key: '1416ee09b69a6d62d8ecd1394bb375fc01601e4a', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--increment`, onClick: this.handleSecondIncrement, disabled: this.disabled || this.isAtMaxSecond(), "aria-label": this.labels.incrementSeconds }, h("svg", { key: '1ab4adae2efa4a54286605be221cf2d424e98deb', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, h("polyline", { key: '61ef61c721a39732a3aacdc9db5b63950796706b', points: "18 15 12 9 6 15" }))), h("input", { key: 'd5b40cf419b007e28f7f69ffe333601fcc3c701e', id: `${this.elementClassName}-seconds`, type: "number", class: `${this.elementClassName}__input`, value: this.padZero(this.internalSeconds), min: 0, max: 59, onInput: this.handleSecondChange, disabled: this.disabled, "aria-label": this.labels.seconds }), h("button", { key: '177306df5ba004bbd58df462a7d010f8903656eb', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--decrement`, onClick: this.handleSecondDecrement, disabled: this.disabled || this.isAtMinSecond(), "aria-label": this.labels.decrementSeconds }, h("svg", { key: '971169fce6fee5ccb8241faef04d633a0396e347', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, h("polyline", { key: '4c31a4b794cc6b421e8e2b3cdb322d584fe40e81', points: "6 9 12 15 18 9" })))))
|
|
279
|
+
], this.useTwelveHourFormat && (h("div", { key: 'b6e9916c6d14aaac6aa3ee1f1c3bd2624f01a344', class: `${this.elementClassName}__period` }, h("button", { key: 'c476a13007f840b5f9e5f058623b1846b33b72cf', type: "button", class: {
|
|
262
280
|
[`${this.elementClassName}__period-button`]: true,
|
|
263
281
|
[`${this.elementClassName}__period-button--active`]: this.period === "AM"
|
|
264
|
-
}, onClick: () => this.handlePeriodChange("AM"), disabled: this.disabled, "aria-label": this.labels.am, "aria-pressed": this.period === "AM" }, this.labels.am), h("button", { key: '
|
|
282
|
+
}, onClick: () => this.handlePeriodChange("AM"), disabled: this.disabled, "aria-label": this.labels.am, "aria-pressed": this.period === "AM" }, this.labels.am), h("button", { key: 'f4cc8df59e07cb53e9b72f376a17e10df357a335', type: "button", class: {
|
|
265
283
|
[`${this.elementClassName}__period-button`]: true,
|
|
266
284
|
[`${this.elementClassName}__period-button--active`]: this.period === "PM"
|
|
267
285
|
}, onClick: () => this.handlePeriodChange("PM"), disabled: this.disabled, "aria-label": this.labels.pm, "aria-pressed": this.period === "PM" }, this.labels.pm))))));
|
|
@@ -499,6 +517,26 @@ export class TabworthyTimesPicker {
|
|
|
499
517
|
},
|
|
500
518
|
"getter": false,
|
|
501
519
|
"setter": false
|
|
520
|
+
},
|
|
521
|
+
"modalIsOpen": {
|
|
522
|
+
"type": "boolean",
|
|
523
|
+
"mutable": false,
|
|
524
|
+
"complexType": {
|
|
525
|
+
"original": "boolean",
|
|
526
|
+
"resolved": "boolean",
|
|
527
|
+
"references": {}
|
|
528
|
+
},
|
|
529
|
+
"required": false,
|
|
530
|
+
"optional": true,
|
|
531
|
+
"docs": {
|
|
532
|
+
"tags": [],
|
|
533
|
+
"text": ""
|
|
534
|
+
},
|
|
535
|
+
"getter": false,
|
|
536
|
+
"setter": false,
|
|
537
|
+
"reflect": false,
|
|
538
|
+
"attribute": "modal-is-open",
|
|
539
|
+
"defaultValue": "false"
|
|
502
540
|
}
|
|
503
541
|
};
|
|
504
542
|
}
|
|
@@ -537,6 +575,9 @@ export class TabworthyTimesPicker {
|
|
|
537
575
|
static get elementRef() { return "el"; }
|
|
538
576
|
static get watchers() {
|
|
539
577
|
return [{
|
|
578
|
+
"propName": "modalIsOpen",
|
|
579
|
+
"methodName": "watchModalIsOpen"
|
|
580
|
+
}, {
|
|
540
581
|
"propName": "hours",
|
|
541
582
|
"methodName": "watchHours"
|
|
542
583
|
}, {
|