@tabworthy/components 0.14.2 → 0.15.0

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.
Files changed (27) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/tabworthy-components.cjs.js +1 -1
  3. package/dist/cjs/tabworthy-dates-calendar_2.cjs.entry.js +8 -8
  4. package/dist/cjs/tabworthy-times.cjs.entry.js +20 -4
  5. package/dist/collection/components/tabworthy-dates-calendar/tabworthy-dates-calendar.js +6 -6
  6. package/dist/collection/components/tabworthy-modal/tabworthy-dates-modal.js +2 -2
  7. package/dist/collection/components/tabworthy-times/tabworthy-times.js +40 -4
  8. package/dist/components/p-C_Pq_S0e.js +1 -0
  9. package/dist/components/{p-CMIEIvTW.js → p-DXCumu2Y.js} +1 -1
  10. package/dist/components/tabworthy-dates-calendar.js +1 -1
  11. package/dist/components/tabworthy-dates-modal.js +1 -1
  12. package/dist/components/tabworthy-dates.js +1 -1
  13. package/dist/components/tabworthy-times.js +1 -1
  14. package/dist/esm/loader.js +1 -1
  15. package/dist/esm/tabworthy-components.js +1 -1
  16. package/dist/esm/tabworthy-dates-calendar_2.entry.js +8 -8
  17. package/dist/esm/tabworthy-times.entry.js +20 -4
  18. package/dist/tabworthy-components/p-66c929f1.entry.js +1 -0
  19. package/dist/tabworthy-components/p-cee41e54.entry.js +1 -0
  20. package/dist/tabworthy-components/tabworthy-components.esm.js +1 -1
  21. package/dist/themes/light.css +1 -1
  22. package/dist/types/components/tabworthy-times/tabworthy-times.d.ts +2 -0
  23. package/dist/types/components.d.ts +9 -0
  24. package/package.json +1 -1
  25. package/dist/components/p-BzY8iIVW.js +0 -1
  26. package/dist/tabworthy-components/p-3af91c7f.entry.js +0 -1
  27. package/dist/tabworthy-components/p-7cd6ccc1.entry.js +0 -1
@@ -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],"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],"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],"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],"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;
@@ -362,9 +362,9 @@ const TabworthyDatesCalendar = class {
362
362
  } }, index.h("div", { key: 'ad36d1e260a7a89110c53fc86e339eb5a259a4fc', class: {
363
363
  [this.getClassName()]: true,
364
364
  [`${this.getClassName()}--disabled`]: this.disabled
365
- } }, index.h("div", { key: '181b9ed0a6a9d6073d67f270d6b14efc28f6a6b2', class: this.getClassName("header") }, this.showHiddenTitle && (index.h("span", { key: '580656924dc3ba028458591399791423797d58d7', "aria-atomic": "true", "aria-live": "polite", class: "visually-hidden" }, this.getTitle())), this.showYearStepper && (index.h("button", { key: '7822100c140418bc3cb65ae39a32a3ebc1f53bc2', "aria-label": this.labels.previousYearButton, class: this.getClassName("previous-year-button"), "aria-disabled": disabled.year.prev, innerHTML: this.previousYearButtonContent || undefined, onClick: this.previousYear, type: "button" }, index.h("svg", { key: '9408d89cf59c268c3e44801297f1a7776a594539', fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, index.h("polyline", { key: 'b9108784891de5eb7acef5c14425e90c25fc514a', points: "11 17 6 12 11 7" }), index.h("polyline", { key: 'a2fbabe46f6a0584d5c4b54296b9db13e979c818', points: "18 17 13 12 18 7" })))), this.showMonthStepper && (index.h("button", { key: '8e515d4fa9fde9f0e16fc2ff5629049039df09e0', "aria-label": this.labels.previousMonthButton, class: this.getClassName("previous-month-button"), "aria-disabled": disabled.month.prev, innerHTML: this.previousMonthButtonContent || undefined, onClick: this.previousMonth, type: "button" }, index.h("svg", { key: '5248668ca2f843102193fb57beb8a3a4b4edbb96', fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, index.h("polyline", { key: '021c514ec8fb801fd0d3dbf250fc8d55b9c9ef08', points: "15 18 9 12 15 6" })))), index.h("span", { key: '8fab6b75376e1399b6ea07e3545ddcfa3eb120d8', class: this.getClassName("current-month") }, index.h("select", { key: '01f8fbd5a76c91b0bf121c2589af72860abe2a22', "aria-label": this.labels.monthSelect, class: this.getClassName("month-select"), "aria-disabled": this.disabled, name: "month", onChange: this.onMonthSelect }, utils.getMonths(this.locale).map((month, index$1) => {
365
+ } }, index.h("div", { key: '181b9ed0a6a9d6073d67f270d6b14efc28f6a6b2', class: this.getClassName("header") }, this.showHiddenTitle && (index.h("span", { key: '580656924dc3ba028458591399791423797d58d7', "aria-atomic": "true", "aria-live": "polite", class: "visually-hidden" }, this.getTitle())), this.showYearStepper && (index.h("button", { key: 'baedceb7e568df8bfc1cee64d13c6114b85c3764', "aria-label": this.labels.previousYearButton, class: this.getClassName("previous-year-button"), "aria-disabled": String(disabled.year.prev), disabled: disabled.year.prev, innerHTML: this.previousYearButtonContent || undefined, onClick: this.previousYear, type: "button" }, index.h("svg", { key: '4e3286e12ebd5c5bba8dfc3f0ecab29f37ddf9c0', fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, index.h("polyline", { key: '6178bb5e4dc08a9b46c587c7b3e7c5fd27867f5b', points: "11 17 6 12 11 7" }), index.h("polyline", { key: '3d03d26acc37c91243d7cbd54d228f35752f80a7', points: "18 17 13 12 18 7" })))), this.showMonthStepper && (index.h("button", { key: '9ecb2f9e5adceda9526b15b64721f16e1c7a8ca5', "aria-label": this.labels.previousMonthButton, class: this.getClassName("previous-month-button"), "aria-disabled": String(disabled.month.prev), disabled: disabled.month.prev, innerHTML: this.previousMonthButtonContent || undefined, onClick: this.previousMonth, type: "button" }, index.h("svg", { key: 'a8c74b97c18cae04b86464a53b8a99f3cffd1379', fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, index.h("polyline", { key: '196da2b5f0485a8af41232b2c9fd614e131230e6', points: "15 18 9 12 15 6" })))), index.h("span", { key: 'b044b7041af2cbd6b527b05b6d4175e85a4a5e0c', class: this.getClassName("current-month") }, index.h("select", { key: 'f4259d0b1448b19e861ed1bb7401508b6e8f5505', "aria-label": this.labels.monthSelect, class: this.getClassName("month-select"), "aria-disabled": this.disabled, name: "month", onChange: this.onMonthSelect }, utils.getMonths(this.locale).map((month, index$1) => {
366
366
  return (index.h("option", { key: month, selected: this.currentDate.getMonth() === index$1, value: index$1 + 1, disabled: utils.monthIsDisabled(index$1, this.currentDate.getFullYear(), this.minDate, this.maxDate) }, month));
367
- })), index.h("input", { key: 'cb126814e09a6ae81ce8a6db10152decef97d66a', "aria-label": this.labels.yearSelect, class: this.getClassName("year-select"), "aria-disabled": this.disabled, max: this.maxDate ? this.maxDate.slice(0, 4) : 9999, min: this.minDate ? this.minDate.slice(0, 4) : 1, name: "year", onChange: this.onYearSelect, type: "number", value: this.currentDate.getFullYear() })), this.showMonthStepper && (index.h("button", { key: '9ad3e382b769ada1ecb746a55c37c54d0c6b06e1', "aria-label": this.labels.nextMonthButton, class: this.getClassName("next-month-button"), "aria-disabled": disabled.month.next, innerHTML: this.nextMonthButtonContent || undefined, onClick: this.nextMonth, type: "button" }, index.h("svg", { key: '7ecdf33b13950c8972b5b3a66bd086f700967fad', fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, index.h("polyline", { key: '78768373bb23d06e8babd79a77fb0a899ea5e942', points: "9 18 15 12 9 6" })))), this.showYearStepper && (index.h("button", { key: 'ab920b5dbdf0bf6000c58718d0d3a0e9a31bbebd', "aria-label": this.labels.nextYearButton, class: this.getClassName("next-year-button"), "aria-disabled": disabled.year.next, innerHTML: this.nextYearButtonContent || undefined, onClick: this.nextYear, type: "button" }, index.h("svg", { key: '7f5c83e6333e6c33984961722c855f2609e0999e', fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, index.h("polyline", { key: 'dd3eed1b08d0373a089beb91eb9cb6b62b477b3b', points: "13 17 18 12 13 7" }), index.h("polyline", { key: 'fa989db37ceaf95817aef623770b895b3c10d0b4', points: "6 17 11 12 6 7" }))))), index.h("div", { key: '5b41060ca782df39e19ba35ec71d4425ae5c3a2a', class: this.getClassName("body") }, index.h("table", { key: '357337fd3a5f05cc204982682c99f99c46dd4b29', class: this.getClassName("calendar"), onKeyDown: this.onKeyDown, role: "grid", "aria-label": this.getTitle() }, index.h("thead", { key: '8fa7ecfada004b39dd406eb9079de3eab66fe298', class: this.getClassName("calendar-header") }, index.h("tr", { key: '364f6021007700c2da60082fca32e4896e071ccd', class: this.getClassName("weekday-row") }, (_a = this.weekdays) === null || _a === void 0 ? void 0 : _a.map((weekday) => (index.h("th", { role: "columnheader", abbr: weekday[1], class: this.getClassName("weekday"), key: weekday[0], scope: "col" }, index.h("span", { "aria-hidden": "true" }, weekday[0]), index.h("span", { class: "visually-hidden" }, weekday[1])))))), index.h("tbody", { key: 'e0269bd5bfe1310a8950635441edc472e3a5f413' }, this.getCalendarRows().map((calendarRow) => {
367
+ })), index.h("input", { key: '29566d4d17a43313d0cd09102ffe8f7dadab48a4', "aria-label": this.labels.yearSelect, class: this.getClassName("year-select"), "aria-disabled": this.disabled, max: this.maxDate ? this.maxDate.slice(0, 4) : 9999, min: this.minDate ? this.minDate.slice(0, 4) : 1, name: "year", onChange: this.onYearSelect, type: "number", value: this.currentDate.getFullYear() })), this.showMonthStepper && (index.h("button", { key: '3c3a08d8c1a9471d3c03656e1c69dd9b610964a6', "aria-label": this.labels.nextMonthButton, class: this.getClassName("next-month-button"), "aria-disabled": String(disabled.month.next), disabled: disabled.month.next, innerHTML: this.nextMonthButtonContent || undefined, onClick: this.nextMonth, type: "button" }, index.h("svg", { key: '691056b81918999f8cb5e411ea808bfc3d63d285', fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, index.h("polyline", { key: '1ad9ffac020a5e77bfbe13e56be4039c0ab1bce1', points: "9 18 15 12 9 6" })))), this.showYearStepper && (index.h("button", { key: '541f139687c50d4515f6ba52f86e5bd0dfb480a8', "aria-label": this.labels.nextYearButton, class: this.getClassName("next-year-button"), "aria-disabled": String(disabled.year.next), disabled: disabled.year.next, innerHTML: this.nextYearButtonContent || undefined, onClick: this.nextYear, type: "button" }, index.h("svg", { key: '38ed3c8a59612395ef641d3ae1068f755f7d68b1', fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, index.h("polyline", { key: '2b95dc3f77f314e84d2cfaec8e479d7097ab43d9', points: "13 17 18 12 13 7" }), index.h("polyline", { key: 'f26e6b1290a4817aef45fb8e7aa0f7956fefaa8c', points: "6 17 11 12 6 7" }))))), index.h("div", { key: '2c8eefeaac7909a66bd3975c4a5be18ac7f459fe', class: this.getClassName("body") }, index.h("table", { key: '2a3646bac9db5b7253fa17632d71d74bec41a6ee', class: this.getClassName("calendar"), onKeyDown: this.onKeyDown, role: "grid", "aria-label": this.getTitle() }, index.h("thead", { key: '146348c0e34687eb6b776698b8dd8eba44b51552', class: this.getClassName("calendar-header") }, index.h("tr", { key: 'afa9189bdbaab542fdf36c78849da38cdf387135', class: this.getClassName("weekday-row") }, (_a = this.weekdays) === null || _a === void 0 ? void 0 : _a.map((weekday) => (index.h("th", { role: "columnheader", abbr: weekday[1], class: this.getClassName("weekday"), key: weekday[0], scope: "col" }, index.h("span", { "aria-hidden": "true" }, weekday[0]), index.h("span", { class: "visually-hidden" }, weekday[1])))))), index.h("tbody", { key: 'd70b0012e308a5dadb5da96c78f6471253f9d1c0' }, this.getCalendarRows().map((calendarRow) => {
368
368
  const rowKey = `row-${calendarRow[0].getMonth()}-${calendarRow[0].getDate()}`;
369
369
  return (index.h("tr", { class: this.getClassName("calendar-row"), key: rowKey }, calendarRow.map((day) => {
370
370
  var _a, _b, _c;
@@ -431,14 +431,14 @@ const TabworthyDatesCalendar = class {
431
431
  ? 0
432
432
  : -1 }, index.h(Tag, { "aria-hidden": "true" }, day.getDate()), index.h("span", { class: "visually-hidden" }, getScreenReaderText())));
433
433
  })));
434
- })))), showFooter && (index.h("div", { key: '4d18b821b06e4eb7fd2f1a1210fcab01d3acdd00', class: this.getClassName("footer") }, index.h("div", { key: 'fec534b0bff03bfe3e15a8842abbcca9b57e9a1c', class: this.getClassName("footer-buttons") }, this.showTodayButton && (index.h("button", { key: '0d8aed7413f313c2ab6aa9a634093de1d46cd7ce', "aria-label": this.todayButtonContent
434
+ })))), showFooter && (index.h("div", { key: '574bd94d669e65194e7c26499007a320d950dff4', class: this.getClassName("footer") }, index.h("div", { key: 'c4fad38c1c3a57f221c3b7094e1f70981fcd9f65', class: this.getClassName("footer-buttons") }, this.showTodayButton && (index.h("button", { key: '26e4889dc3d806204df07aea74069741dc8794d9', "aria-label": this.todayButtonContent
435
435
  ? this.labels.todayButton
436
- : undefined, class: this.getClassName("today-button"), disabled: this.disabled, innerHTML: this.todayButtonContent || undefined, onClick: this.showToday, type: "button" }, !this.todayButtonContent && this.labels.todayButton)), this.showClearButton && (index.h("button", { key: '176c535cb85d6b95d40324a55aa11e1bc2faaa61', "aria-label": this.clearButtonContent
436
+ : undefined, class: this.getClassName("today-button"), disabled: this.disabled, innerHTML: this.todayButtonContent || undefined, onClick: this.showToday, type: "button" }, !this.todayButtonContent && this.labels.todayButton)), this.showClearButton && (index.h("button", { key: '347741d4adfc95c14060864de7674344da311a6e', "aria-label": this.clearButtonContent
437
437
  ? this.labels.clearButton
438
- : undefined, class: this.getClassName("clear-button"), disabled: this.disabled, innerHTML: this.clearButtonContent || undefined, onClick: this.clear, type: "button" }, !this.clearButtonContent && this.labels.clearButton)), this.showCloseButton && (index.h("button", { key: 'cea15baf92edabea6841510459c6b05ebfaf81fa', "aria-label": this.closeButtonContent
438
+ : undefined, class: this.getClassName("clear-button"), disabled: this.disabled, innerHTML: this.clearButtonContent || undefined, onClick: this.clear, type: "button" }, !this.clearButtonContent && this.labels.clearButton)), this.showCloseButton && (index.h("button", { key: '287053ef376238a807a1ff092da80a350700abd2', "aria-label": this.closeButtonContent
439
439
  ? this.labels.closeButton
440
440
  : undefined, class: this.getClassName("close-button"), disabled: this.disabled, innerHTML: this.closeButtonContent || undefined, onClick: this.close, type: "button" }, !this.closeButtonContent && this.labels.closeButton))), this.showKeyboardHint &&
441
- !window.matchMedia("(pointer: coarse)").matches && (index.h("button", { key: '51a48353fbb94243d93047141e26b8c8ef5545b2', type: "button", onClick: () => alert("Todo: Add Keyboard helper!"), class: this.getClassName("keyboard-hint") }, index.h("svg", { key: '2991aa978689e3a0bd4c795a8629451e252ccf41', xmlns: "http://www.w3.org/2000/svg", height: "1em", width: "1em", viewBox: "0 0 48 48", fill: "currentColor" }, index.h("path", { key: 'b84c3846f234a79e8c78eae3118aa2a9f24b8377', d: "M7 38q-1.2 0-2.1-.925Q4 36.15 4 35V13q0-1.2.9-2.1.9-.9 2.1-.9h34q1.2 0 2.1.9.9.9.9 2.1v22q0 1.15-.9 2.075Q42.2 38 41 38Zm0-3h34V13H7v22Zm8-3.25h18v-3H15Zm-4.85-6.25h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3Zm-24.7-6.25h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3ZM7 35V13v22Z" })), this.labels.keyboardHint))))), index.h("slot", { key: '86e8fb8907bf11951461baaf41f92b29ce0cc413', name: "after-calendar" }))));
441
+ !window.matchMedia("(pointer: coarse)").matches && (index.h("button", { key: 'bb05e75930b211fb43874b492c4e16229d0d7232', type: "button", onClick: () => alert("Todo: Add Keyboard helper!"), class: this.getClassName("keyboard-hint") }, index.h("svg", { key: '8b7e648ea409ce84086aaf06c4d4707dd6e09274', xmlns: "http://www.w3.org/2000/svg", height: "1em", width: "1em", viewBox: "0 0 48 48", fill: "currentColor" }, index.h("path", { key: 'aeaefade16771c198b74bb1c38f88bd9457d2baa', d: "M7 38q-1.2 0-2.1-.925Q4 36.15 4 35V13q0-1.2.9-2.1.9-.9 2.1-.9h34q1.2 0 2.1.9.9.9.9 2.1v22q0 1.15-.9 2.075Q42.2 38 41 38Zm0-3h34V13H7v22Zm8-3.25h18v-3H15Zm-4.85-6.25h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3Zm-24.7-6.25h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3ZM7 35V13v22Z" })), this.labels.keyboardHint))))), index.h("slot", { key: '6054a85ed3973b573f102c45d33995ad90eaf2f8', name: "after-calendar" }))));
442
442
  }
443
443
  get el() { return index.getElement(this); }
444
444
  static get watchers() { return {
@@ -2859,7 +2859,7 @@ const TabworthyDatesModal = class {
2859
2859
  }
2860
2860
  }
2861
2861
  render() {
2862
- return (index.h(index.Host, { key: '488fb845bb3a168c45f715b5f7315a80e1857589', showing: this.showing, ref: (r) => r && (this.el = r) }, !this.inline && this.showing && (index.h("div", { key: 'd6263beffa3dbeaa7f0e5e65c1f2627c07164648', part: "body", ref: (r) => {
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: '7ffb9cc684198ab9f3b127a4abe5f60f3241cd49' }, index.h("div", { key: 'c6c7c14220c01969f3a5c92dda882685f4c43268', part: "content" }, index.h("slot", { key: 'a1e6ce7ed152f61b3970e20b40e36bb13ee7580a' }))))), this.inline && (index.h("div", { key: '632750cfce76139771642e03051f5c4a654db56a', part: "content" }, index.h("slot", { key: 'c1aa297a6ffdeee55840a9e05adddb7220e7f954' })))));
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 {
@@ -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,12 +491,12 @@ const TabworthyTimes = class {
475
491
  }
476
492
  render() {
477
493
  var _a;
478
- return (index.h(index.Host, { key: '4b8071a2e7d221e295a0bc14742040cda563eb1c', class: this.elementClassName, "has-error": this.errorState, disabled: this.disabledState }, index.h("label", { key: 'f0193c00ee74b41360faea3a8d941e42ac3c847e', htmlFor: `${this.id}-input`, class: this.getClassName("label") }, this.label), index.h("div", { key: '5a545ee41e4e17b2ffa976131ff17069105debbc', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, index.h("input", { key: 'd88b3a0de263df495142075a59a470d8d01c57f0', id: `${this.id}-input`, ref: (r) => (this.inputRef = r), type: "text", class: {
494
+ return (index.h(index.Host, { key: '4de637f7dcfce9c95e7f5069295aea45ff44104b', class: this.elementClassName, "has-error": this.errorState, disabled: this.disabledState, "time-only": this.timeOnly }, index.h("label", { key: '5705831f96605171555f53ed565e2a2d9674c1b2', htmlFor: `${this.id}-input`, class: this.getClassName("label") }, this.label), index.h("div", { key: '9734702f9fe751b22d7a2f779dba28b559c00c8f', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, index.h("input", { key: '3433f27a2f6a962d978a44884fc8e497b579d0b3', 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: 'a00e3717ee4cbc4296e579ad09f2be15612f6f70', type: "button", onClick: this.handleCalendarButtonClick, class: this.getClassName("calendar-button"), disabled: this.disabledState, "aria-label": this.calendarButtonContent
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: '62e09537bf817ba53b47c2df4cd261f53aee0e4f', 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: '38324c5ae884cd81f7fe017030e33b905b6350fd', label: this.timesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
499
+ : undefined }, this.calendarButtonContent ? (index.h("span", { innerHTML: this.calendarButtonContent })) : (this.timesLabels.openCalendar)))), index.h("tabworthy-dates-modal", { key: 'fd00cc22c8e76bdc97f43c89690dde5ef2690423', label: this.timesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
484
500
  if (this.pickerRef) {
485
501
  this.pickerRef.modalIsOpen = true;
486
502
  }
@@ -488,7 +504,7 @@ const TabworthyTimes = class {
488
504
  if (this.pickerRef) {
489
505
  this.pickerRef.modalIsOpen = false;
490
506
  }
491
- }, inline: this.inline, appendTo: this.appendTo }, index.h("div", { key: 'd8e40947040e89399ca1b88816ea602ddc2bf229', class: this.getClassName("picker-container") }, index.h("tabworthy-dates-calendar", { key: '3a97ffea339896a95561e66288dae39f733c9e96', 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: '2a8a8fb8276c3af1ebade12b344082b220e664f1', slot: "after-calendar", class: this.getClassName("time-section") }, index.h("hr", { key: 'a4e60e01794eadda8eb58d8023681d168ac22b85', class: this.getClassName("divider") }), index.h("tabworthy-times-picker", { key: '122a5a15f9fc41b003ab1d82c08541d0de18c0c6', 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() }))))), this.errorState && (index.h("div", { key: '95f00d2f6a0aa98254acaaaa87799c2ceb98548b', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
507
+ }, inline: this.inline, appendTo: this.appendTo }, index.h("div", { key: 'd918badc46d32c77c15c200419d7be702a4e3bbc', class: this.getClassName("picker-container") }, !this.timeOnly && (index.h("tabworthy-dates-calendar", { key: '37456dbe9325be7bc733f43d139e646099e144ce', 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: 'f634b5e737cb0d1e7de11af526b535e8fbed606d', slot: "after-calendar", class: this.getClassName("time-section") }, index.h("hr", { key: 'df7b56c4d78f4a36ee2d9b962f26128e2034fdc2', class: this.getClassName("divider") }), index.h("tabworthy-times-picker", { key: 'ee5db6b8ed36a348d6de836ee15ddfe9a5ff87ce', 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() })))), this.timeOnly && (index.h("div", { key: 'e885d44afc234542bbac62fde1f97caa373dd3cf', class: this.getClassName("time-section") }, index.h("tabworthy-times-picker", { key: '2a443b97b328368b46e1f0e09daac21a8665e0dc', 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() }))))), this.errorState && (index.h("div", { key: '893ed7b583af6cc1792a864bee4c838708a2e3cd', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
492
508
  }
493
509
  get el() { return index.getElement(this); }
494
510
  static get watchers() { return {
@@ -353,9 +353,9 @@ export class TabworthyDatesCalendar {
353
353
  } }, h("div", { key: 'ad36d1e260a7a89110c53fc86e339eb5a259a4fc', class: {
354
354
  [this.getClassName()]: true,
355
355
  [`${this.getClassName()}--disabled`]: this.disabled
356
- } }, h("div", { key: '181b9ed0a6a9d6073d67f270d6b14efc28f6a6b2', class: this.getClassName("header") }, this.showHiddenTitle && (h("span", { key: '580656924dc3ba028458591399791423797d58d7', "aria-atomic": "true", "aria-live": "polite", class: "visually-hidden" }, this.getTitle())), this.showYearStepper && (h("button", { key: '7822100c140418bc3cb65ae39a32a3ebc1f53bc2', "aria-label": this.labels.previousYearButton, class: this.getClassName("previous-year-button"), "aria-disabled": disabled.year.prev, innerHTML: this.previousYearButtonContent || undefined, onClick: this.previousYear, type: "button" }, h("svg", { key: '9408d89cf59c268c3e44801297f1a7776a594539', fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, h("polyline", { key: 'b9108784891de5eb7acef5c14425e90c25fc514a', points: "11 17 6 12 11 7" }), h("polyline", { key: 'a2fbabe46f6a0584d5c4b54296b9db13e979c818', points: "18 17 13 12 18 7" })))), this.showMonthStepper && (h("button", { key: '8e515d4fa9fde9f0e16fc2ff5629049039df09e0', "aria-label": this.labels.previousMonthButton, class: this.getClassName("previous-month-button"), "aria-disabled": disabled.month.prev, innerHTML: this.previousMonthButtonContent || undefined, onClick: this.previousMonth, type: "button" }, h("svg", { key: '5248668ca2f843102193fb57beb8a3a4b4edbb96', fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, h("polyline", { key: '021c514ec8fb801fd0d3dbf250fc8d55b9c9ef08', points: "15 18 9 12 15 6" })))), h("span", { key: '8fab6b75376e1399b6ea07e3545ddcfa3eb120d8', class: this.getClassName("current-month") }, h("select", { key: '01f8fbd5a76c91b0bf121c2589af72860abe2a22', "aria-label": this.labels.monthSelect, class: this.getClassName("month-select"), "aria-disabled": this.disabled, name: "month", onChange: this.onMonthSelect }, getMonths(this.locale).map((month, index) => {
356
+ } }, h("div", { key: '181b9ed0a6a9d6073d67f270d6b14efc28f6a6b2', class: this.getClassName("header") }, this.showHiddenTitle && (h("span", { key: '580656924dc3ba028458591399791423797d58d7', "aria-atomic": "true", "aria-live": "polite", class: "visually-hidden" }, this.getTitle())), this.showYearStepper && (h("button", { key: 'baedceb7e568df8bfc1cee64d13c6114b85c3764', "aria-label": this.labels.previousYearButton, class: this.getClassName("previous-year-button"), "aria-disabled": String(disabled.year.prev), disabled: disabled.year.prev, innerHTML: this.previousYearButtonContent || undefined, onClick: this.previousYear, type: "button" }, h("svg", { key: '4e3286e12ebd5c5bba8dfc3f0ecab29f37ddf9c0', fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, h("polyline", { key: '6178bb5e4dc08a9b46c587c7b3e7c5fd27867f5b', points: "11 17 6 12 11 7" }), h("polyline", { key: '3d03d26acc37c91243d7cbd54d228f35752f80a7', points: "18 17 13 12 18 7" })))), this.showMonthStepper && (h("button", { key: '9ecb2f9e5adceda9526b15b64721f16e1c7a8ca5', "aria-label": this.labels.previousMonthButton, class: this.getClassName("previous-month-button"), "aria-disabled": String(disabled.month.prev), disabled: disabled.month.prev, innerHTML: this.previousMonthButtonContent || undefined, onClick: this.previousMonth, type: "button" }, h("svg", { key: 'a8c74b97c18cae04b86464a53b8a99f3cffd1379', fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, h("polyline", { key: '196da2b5f0485a8af41232b2c9fd614e131230e6', points: "15 18 9 12 15 6" })))), h("span", { key: 'b044b7041af2cbd6b527b05b6d4175e85a4a5e0c', class: this.getClassName("current-month") }, h("select", { key: 'f4259d0b1448b19e861ed1bb7401508b6e8f5505', "aria-label": this.labels.monthSelect, class: this.getClassName("month-select"), "aria-disabled": this.disabled, name: "month", onChange: this.onMonthSelect }, getMonths(this.locale).map((month, index) => {
357
357
  return (h("option", { key: month, selected: this.currentDate.getMonth() === index, value: index + 1, disabled: monthIsDisabled(index, this.currentDate.getFullYear(), this.minDate, this.maxDate) }, month));
358
- })), h("input", { key: 'cb126814e09a6ae81ce8a6db10152decef97d66a', "aria-label": this.labels.yearSelect, class: this.getClassName("year-select"), "aria-disabled": this.disabled, max: this.maxDate ? this.maxDate.slice(0, 4) : 9999, min: this.minDate ? this.minDate.slice(0, 4) : 1, name: "year", onChange: this.onYearSelect, type: "number", value: this.currentDate.getFullYear() })), this.showMonthStepper && (h("button", { key: '9ad3e382b769ada1ecb746a55c37c54d0c6b06e1', "aria-label": this.labels.nextMonthButton, class: this.getClassName("next-month-button"), "aria-disabled": disabled.month.next, innerHTML: this.nextMonthButtonContent || undefined, onClick: this.nextMonth, type: "button" }, h("svg", { key: '7ecdf33b13950c8972b5b3a66bd086f700967fad', fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, h("polyline", { key: '78768373bb23d06e8babd79a77fb0a899ea5e942', points: "9 18 15 12 9 6" })))), this.showYearStepper && (h("button", { key: 'ab920b5dbdf0bf6000c58718d0d3a0e9a31bbebd', "aria-label": this.labels.nextYearButton, class: this.getClassName("next-year-button"), "aria-disabled": disabled.year.next, innerHTML: this.nextYearButtonContent || undefined, onClick: this.nextYear, type: "button" }, h("svg", { key: '7f5c83e6333e6c33984961722c855f2609e0999e', fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, h("polyline", { key: 'dd3eed1b08d0373a089beb91eb9cb6b62b477b3b', points: "13 17 18 12 13 7" }), h("polyline", { key: 'fa989db37ceaf95817aef623770b895b3c10d0b4', points: "6 17 11 12 6 7" }))))), h("div", { key: '5b41060ca782df39e19ba35ec71d4425ae5c3a2a', class: this.getClassName("body") }, h("table", { key: '357337fd3a5f05cc204982682c99f99c46dd4b29', class: this.getClassName("calendar"), onKeyDown: this.onKeyDown, role: "grid", "aria-label": this.getTitle() }, h("thead", { key: '8fa7ecfada004b39dd406eb9079de3eab66fe298', class: this.getClassName("calendar-header") }, h("tr", { key: '364f6021007700c2da60082fca32e4896e071ccd', class: this.getClassName("weekday-row") }, (_a = this.weekdays) === null || _a === void 0 ? void 0 : _a.map((weekday) => (h("th", { role: "columnheader", abbr: weekday[1], class: this.getClassName("weekday"), key: weekday[0], scope: "col" }, h("span", { "aria-hidden": "true" }, weekday[0]), h("span", { class: "visually-hidden" }, weekday[1])))))), h("tbody", { key: 'e0269bd5bfe1310a8950635441edc472e3a5f413' }, this.getCalendarRows().map((calendarRow) => {
358
+ })), h("input", { key: '29566d4d17a43313d0cd09102ffe8f7dadab48a4', "aria-label": this.labels.yearSelect, class: this.getClassName("year-select"), "aria-disabled": this.disabled, max: this.maxDate ? this.maxDate.slice(0, 4) : 9999, min: this.minDate ? this.minDate.slice(0, 4) : 1, name: "year", onChange: this.onYearSelect, type: "number", value: this.currentDate.getFullYear() })), this.showMonthStepper && (h("button", { key: '3c3a08d8c1a9471d3c03656e1c69dd9b610964a6', "aria-label": this.labels.nextMonthButton, class: this.getClassName("next-month-button"), "aria-disabled": String(disabled.month.next), disabled: disabled.month.next, innerHTML: this.nextMonthButtonContent || undefined, onClick: this.nextMonth, type: "button" }, h("svg", { key: '691056b81918999f8cb5e411ea808bfc3d63d285', fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, h("polyline", { key: '1ad9ffac020a5e77bfbe13e56be4039c0ab1bce1', points: "9 18 15 12 9 6" })))), this.showYearStepper && (h("button", { key: '541f139687c50d4515f6ba52f86e5bd0dfb480a8', "aria-label": this.labels.nextYearButton, class: this.getClassName("next-year-button"), "aria-disabled": String(disabled.year.next), disabled: disabled.year.next, innerHTML: this.nextYearButtonContent || undefined, onClick: this.nextYear, type: "button" }, h("svg", { key: '38ed3c8a59612395ef641d3ae1068f755f7d68b1', fill: "none", height: "24", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "24" }, h("polyline", { key: '2b95dc3f77f314e84d2cfaec8e479d7097ab43d9', points: "13 17 18 12 13 7" }), h("polyline", { key: 'f26e6b1290a4817aef45fb8e7aa0f7956fefaa8c', points: "6 17 11 12 6 7" }))))), h("div", { key: '2c8eefeaac7909a66bd3975c4a5be18ac7f459fe', class: this.getClassName("body") }, h("table", { key: '2a3646bac9db5b7253fa17632d71d74bec41a6ee', class: this.getClassName("calendar"), onKeyDown: this.onKeyDown, role: "grid", "aria-label": this.getTitle() }, h("thead", { key: '146348c0e34687eb6b776698b8dd8eba44b51552', class: this.getClassName("calendar-header") }, h("tr", { key: 'afa9189bdbaab542fdf36c78849da38cdf387135', class: this.getClassName("weekday-row") }, (_a = this.weekdays) === null || _a === void 0 ? void 0 : _a.map((weekday) => (h("th", { role: "columnheader", abbr: weekday[1], class: this.getClassName("weekday"), key: weekday[0], scope: "col" }, h("span", { "aria-hidden": "true" }, weekday[0]), h("span", { class: "visually-hidden" }, weekday[1])))))), h("tbody", { key: 'd70b0012e308a5dadb5da96c78f6471253f9d1c0' }, this.getCalendarRows().map((calendarRow) => {
359
359
  const rowKey = `row-${calendarRow[0].getMonth()}-${calendarRow[0].getDate()}`;
360
360
  return (h("tr", { class: this.getClassName("calendar-row"), key: rowKey }, calendarRow.map((day) => {
361
361
  var _a, _b, _c;
@@ -422,14 +422,14 @@ export class TabworthyDatesCalendar {
422
422
  ? 0
423
423
  : -1 }, h(Tag, { "aria-hidden": "true" }, day.getDate()), h("span", { class: "visually-hidden" }, getScreenReaderText())));
424
424
  })));
425
- })))), showFooter && (h("div", { key: '4d18b821b06e4eb7fd2f1a1210fcab01d3acdd00', class: this.getClassName("footer") }, h("div", { key: 'fec534b0bff03bfe3e15a8842abbcca9b57e9a1c', class: this.getClassName("footer-buttons") }, this.showTodayButton && (h("button", { key: '0d8aed7413f313c2ab6aa9a634093de1d46cd7ce', "aria-label": this.todayButtonContent
425
+ })))), showFooter && (h("div", { key: '574bd94d669e65194e7c26499007a320d950dff4', class: this.getClassName("footer") }, h("div", { key: 'c4fad38c1c3a57f221c3b7094e1f70981fcd9f65', class: this.getClassName("footer-buttons") }, this.showTodayButton && (h("button", { key: '26e4889dc3d806204df07aea74069741dc8794d9', "aria-label": this.todayButtonContent
426
426
  ? this.labels.todayButton
427
- : undefined, class: this.getClassName("today-button"), disabled: this.disabled, innerHTML: this.todayButtonContent || undefined, onClick: this.showToday, type: "button" }, !this.todayButtonContent && this.labels.todayButton)), this.showClearButton && (h("button", { key: '176c535cb85d6b95d40324a55aa11e1bc2faaa61', "aria-label": this.clearButtonContent
427
+ : undefined, class: this.getClassName("today-button"), disabled: this.disabled, innerHTML: this.todayButtonContent || undefined, onClick: this.showToday, type: "button" }, !this.todayButtonContent && this.labels.todayButton)), this.showClearButton && (h("button", { key: '347741d4adfc95c14060864de7674344da311a6e', "aria-label": this.clearButtonContent
428
428
  ? this.labels.clearButton
429
- : undefined, class: this.getClassName("clear-button"), disabled: this.disabled, innerHTML: this.clearButtonContent || undefined, onClick: this.clear, type: "button" }, !this.clearButtonContent && this.labels.clearButton)), this.showCloseButton && (h("button", { key: 'cea15baf92edabea6841510459c6b05ebfaf81fa', "aria-label": this.closeButtonContent
429
+ : undefined, class: this.getClassName("clear-button"), disabled: this.disabled, innerHTML: this.clearButtonContent || undefined, onClick: this.clear, type: "button" }, !this.clearButtonContent && this.labels.clearButton)), this.showCloseButton && (h("button", { key: '287053ef376238a807a1ff092da80a350700abd2', "aria-label": this.closeButtonContent
430
430
  ? this.labels.closeButton
431
431
  : undefined, class: this.getClassName("close-button"), disabled: this.disabled, innerHTML: this.closeButtonContent || undefined, onClick: this.close, type: "button" }, !this.closeButtonContent && this.labels.closeButton))), this.showKeyboardHint &&
432
- !window.matchMedia("(pointer: coarse)").matches && (h("button", { key: '51a48353fbb94243d93047141e26b8c8ef5545b2', type: "button", onClick: () => alert("Todo: Add Keyboard helper!"), class: this.getClassName("keyboard-hint") }, h("svg", { key: '2991aa978689e3a0bd4c795a8629451e252ccf41', xmlns: "http://www.w3.org/2000/svg", height: "1em", width: "1em", viewBox: "0 0 48 48", fill: "currentColor" }, h("path", { key: 'b84c3846f234a79e8c78eae3118aa2a9f24b8377', d: "M7 38q-1.2 0-2.1-.925Q4 36.15 4 35V13q0-1.2.9-2.1.9-.9 2.1-.9h34q1.2 0 2.1.9.9.9.9 2.1v22q0 1.15-.9 2.075Q42.2 38 41 38Zm0-3h34V13H7v22Zm8-3.25h18v-3H15Zm-4.85-6.25h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3Zm-24.7-6.25h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3ZM7 35V13v22Z" })), this.labels.keyboardHint))))), h("slot", { key: '86e8fb8907bf11951461baaf41f92b29ce0cc413', name: "after-calendar" }))));
432
+ !window.matchMedia("(pointer: coarse)").matches && (h("button", { key: 'bb05e75930b211fb43874b492c4e16229d0d7232', type: "button", onClick: () => alert("Todo: Add Keyboard helper!"), class: this.getClassName("keyboard-hint") }, h("svg", { key: '8b7e648ea409ce84086aaf06c4d4707dd6e09274', xmlns: "http://www.w3.org/2000/svg", height: "1em", width: "1em", viewBox: "0 0 48 48", fill: "currentColor" }, h("path", { key: 'aeaefade16771c198b74bb1c38f88bd9457d2baa', d: "M7 38q-1.2 0-2.1-.925Q4 36.15 4 35V13q0-1.2.9-2.1.9-.9 2.1-.9h34q1.2 0 2.1.9.9.9.9 2.1v22q0 1.15-.9 2.075Q42.2 38 41 38Zm0-3h34V13H7v22Zm8-3.25h18v-3H15Zm-4.85-6.25h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3Zm-24.7-6.25h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3ZM7 35V13v22Z" })), this.labels.keyboardHint))))), h("slot", { key: '6054a85ed3973b573f102c45d33995ad90eaf2f8', name: "after-calendar" }))));
433
433
  }
434
434
  static get is() { return "tabworthy-dates-calendar"; }
435
435
  static get encapsulation() { return "scoped"; }
@@ -190,7 +190,7 @@ export class TabworthyDatesModal {
190
190
  }
191
191
  }
192
192
  render() {
193
- return (h(Host, { key: '488fb845bb3a168c45f715b5f7315a80e1857589', showing: this.showing, ref: (r) => r && (this.el = r) }, !this.inline && this.showing && (h("div", { key: 'd6263beffa3dbeaa7f0e5e65c1f2627c07164648', part: "body", ref: (r) => {
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: '7ffb9cc684198ab9f3b127a4abe5f60f3241cd49' }, h("div", { key: 'c6c7c14220c01969f3a5c92dda882685f4c43268', part: "content" }, h("slot", { key: 'a1e6ce7ed152f61b3970e20b40e36bb13ee7580a' }))))), this.inline && (h("div", { key: '632750cfce76139771642e03051f5c4a654db56a', part: "content" }, h("slot", { key: 'c1aa297a6ffdeee55840a9e05adddb7220e7f954' })))));
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,12 +467,12 @@ export class TabworthyTimes {
451
467
  }
452
468
  render() {
453
469
  var _a;
454
- return (h(Host, { key: '4b8071a2e7d221e295a0bc14742040cda563eb1c', class: this.elementClassName, "has-error": this.errorState, disabled: this.disabledState }, h("label", { key: 'f0193c00ee74b41360faea3a8d941e42ac3c847e', htmlFor: `${this.id}-input`, class: this.getClassName("label") }, this.label), h("div", { key: '5a545ee41e4e17b2ffa976131ff17069105debbc', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, h("input", { key: 'd88b3a0de263df495142075a59a470d8d01c57f0', id: `${this.id}-input`, ref: (r) => (this.inputRef = r), type: "text", class: {
470
+ return (h(Host, { key: '4de637f7dcfce9c95e7f5069295aea45ff44104b', class: this.elementClassName, "has-error": this.errorState, disabled: this.disabledState, "time-only": this.timeOnly }, h("label", { key: '5705831f96605171555f53ed565e2a2d9674c1b2', htmlFor: `${this.id}-input`, class: this.getClassName("label") }, this.label), h("div", { key: '9734702f9fe751b22d7a2f779dba28b559c00c8f', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, h("input", { key: '3433f27a2f6a962d978a44884fc8e497b579d0b3', 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: 'a00e3717ee4cbc4296e579ad09f2be15612f6f70', type: "button", onClick: this.handleCalendarButtonClick, class: this.getClassName("calendar-button"), disabled: this.disabledState, "aria-label": this.calendarButtonContent
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: '62e09537bf817ba53b47c2df4cd261f53aee0e4f', 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: '38324c5ae884cd81f7fe017030e33b905b6350fd', label: this.timesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
475
+ : undefined }, this.calendarButtonContent ? (h("span", { innerHTML: this.calendarButtonContent })) : (this.timesLabels.openCalendar)))), h("tabworthy-dates-modal", { key: 'fd00cc22c8e76bdc97f43c89690dde5ef2690423', label: this.timesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
460
476
  if (this.pickerRef) {
461
477
  this.pickerRef.modalIsOpen = true;
462
478
  }
@@ -464,7 +480,7 @@ export class TabworthyTimes {
464
480
  if (this.pickerRef) {
465
481
  this.pickerRef.modalIsOpen = false;
466
482
  }
467
- }, inline: this.inline, appendTo: this.appendTo }, h("div", { key: 'd8e40947040e89399ca1b88816ea602ddc2bf229', class: this.getClassName("picker-container") }, h("tabworthy-dates-calendar", { key: '3a97ffea339896a95561e66288dae39f733c9e96', 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: '2a8a8fb8276c3af1ebade12b344082b220e664f1', slot: "after-calendar", class: this.getClassName("time-section") }, h("hr", { key: 'a4e60e01794eadda8eb58d8023681d168ac22b85', class: this.getClassName("divider") }), h("tabworthy-times-picker", { key: '122a5a15f9fc41b003ab1d82c08541d0de18c0c6', 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() }))))), this.errorState && (h("div", { key: '95f00d2f6a0aa98254acaaaa87799c2ceb98548b', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
483
+ }, inline: this.inline, appendTo: this.appendTo }, h("div", { key: 'd918badc46d32c77c15c200419d7be702a4e3bbc', class: this.getClassName("picker-container") }, !this.timeOnly && (h("tabworthy-dates-calendar", { key: '37456dbe9325be7bc733f43d139e646099e144ce', 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: 'f634b5e737cb0d1e7de11af526b535e8fbed606d', slot: "after-calendar", class: this.getClassName("time-section") }, h("hr", { key: 'df7b56c4d78f4a36ee2d9b962f26128e2034fdc2', class: this.getClassName("divider") }), h("tabworthy-times-picker", { key: 'ee5db6b8ed36a348d6de836ee15ddfe9a5ff87ce', 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() })))), this.timeOnly && (h("div", { key: 'e885d44afc234542bbac62fde1f97caa373dd3cf', class: this.getClassName("time-section") }, h("tabworthy-times-picker", { key: '2a443b97b328368b46e1f0e09daac21a8665e0dc', 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() }))))), this.errorState && (h("div", { key: '893ed7b583af6cc1792a864bee4c838708a2e3cd', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
468
484
  }
469
485
  static get is() { return "tabworthy-times"; }
470
486
  static get encapsulation() { return "scoped"; }
@@ -528,6 +544,26 @@ export class TabworthyTimes {
528
544
  "attribute": "range",
529
545
  "defaultValue": "false"
530
546
  },
547
+ "timeOnly": {
548
+ "type": "boolean",
549
+ "mutable": false,
550
+ "complexType": {
551
+ "original": "boolean",
552
+ "resolved": "boolean",
553
+ "references": {}
554
+ },
555
+ "required": false,
556
+ "optional": false,
557
+ "docs": {
558
+ "tags": [],
559
+ "text": ""
560
+ },
561
+ "getter": false,
562
+ "setter": false,
563
+ "reflect": false,
564
+ "attribute": "time-only",
565
+ "defaultValue": "false"
566
+ },
531
567
  "label": {
532
568
  "type": "string",
533
569
  "mutable": false,
@@ -0,0 +1 @@
1
+ import{p as t,H as e,c as i,h as s,d as a,t as n}from"./p-BiJ0HZVY.js";function h(t,e){const i=new Date(t);return i.setDate(i.getDate()+e),i}function o(t){return k(new Date(`${w(t)}-${String(c(t)).padStart(2,"0")}-01`))}function r(t){return function(t){if(t instanceof Date)return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}`}(t)}function d(t){const e=o(t);return e.setMonth(e.getMonth()+1),e.setDate(e.getDate()-1),e}function c(t){return t.getMonth()+1}function l(t){return h(t,1)}function u(t){const e=new Date(t);return e.setMonth(e.getMonth()+1),e}function b(t){const e=new Date(t);return e.setFullYear(e.getFullYear()+1),e}function f(t){return g(t,1)}function v(t){const e=new Date(t);return e.setMonth(e.getMonth()-1),e}function y(t){const e=new Date(t);return e.setFullYear(e.getFullYear()-1),e}function w(t){return t.getFullYear()}function p(t,e){return!(!t||!e)&&t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}function k(t){const e=new Date(t);return e.setMinutes(e.getMinutes()+e.getTimezoneOffset()),e}function m(t){const e=t.includes("T")||/\d{4}-\d{2}-\d{2}\s\d{2}:/.test(t),i=new Date(t);return e?i:k(i)}function g(t,e){const i=new Date(t);return i.setDate(i.getDate()-e),i}function D(t,e){if(e){const i=m(e);return t>=i||p(i,t)}return!0}function C(t,e){if(e){const i=m(e);return t<=i||p(t,i)}return!0}function B(t,e,i){return D(t,e)&&C(t,i)}function $(t,e,i,s){if(i){const s=m(i),a=s.getFullYear(),n=s.getMonth();if(e<a||e===a&&t<n)return!0}if(s){const i=m(s),a=i.getFullYear(),n=i.getMonth();if(e>a||e===a&&t>n)return!0}return!1}function x(t){if(null==t.match(/^\d{4}-\d{2}-\d{2}$/))return!1;var e=new Date(t);return!isNaN(e.getTime())}function S(t){var e=t.match(/\d{4}-\d{2}-\d{2}/g);return null==e?void 0:e.slice(0,2)}const M={clearButton:"Clear value",closeButton:"Close",monthSelect:"Select month",nextMonthButton:"Next month",nextYearButton:"Next year",picker:"Choose date",previousMonthButton:"Previous month",previousYearButton:"Previous year",todayButton:"Show today",yearSelect:"Select year",keyboardHint:"Keyboard commands",selected:"Selected date",chooseAsStartDate:"choose as start date",chooseAsEndDate:"choose as end date"},Z=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.selectDate=i(this,"selectDate",3),this.changeMonth=i(this,"changeMonth",3),this.changeYear=i(this,"changeYear",3),this.requestClose=i(this,"requestClose",3),this.disabled=!1,this.modalIsOpen=!1,this.disableDate=()=>!1,this.elementClassName="tabworthy-dates-calendar",this.firstDayOfWeek=0,this.range=!1,this.labels=M,this.locale=(null===navigator||void 0===navigator?void 0:navigator.language)||"en-US",this.inline=!1,this.showClearButton=!1,this.showCloseButton=!1,this.showMonthStepper=!0,this.showTodayButton=!0,this.showYearStepper=!1,this.showKeyboardHint=!1,this.showHiddenTitle=!0,this.startDate=r(new Date),this.init=()=>{this.currentDate=this.startDate?k(new Date(this.startDate)):new Date,this.updateWeekdays()},this.nextMonth=()=>{const t=u(this.currentDate);this.disabled||$(t.getMonth(),t.getFullYear(),this.minDate,this.maxDate)||this.updateCurrentDate(t)},this.nextYear=()=>{const t=b(this.currentDate);this.disabled||this.maxDate&&m(this.maxDate).getFullYear()<t.getFullYear()||this.updateCurrentDate(t,!1,!0)},this.previousMonth=()=>{const t=v(this.currentDate);this.disabled||$(t.getMonth(),t.getFullYear(),this.minDate,this.maxDate)||this.updateCurrentDate(t)},this.previousYear=()=>{const t=y(this.currentDate);this.disabled||this.minDate&&m(this.minDate).getFullYear()>t.getFullYear()||this.updateCurrentDate(t,!1,!0)},this.showToday=()=>{this.updateCurrentDate(new Date,!0)},this.clear=()=>{var t;this.value=void 0,null===(t=this.selectDate)||void 0===t||t.emit(void 0)},this.onClick=t=>{if(this.disabled)return;const e=t.target.closest("[data-date]");if(!Boolean(e))return;const i=k(new Date(e.dataset.date));this.updateCurrentDate(i),this.onSelectDate(i)},this.onMonthSelect=t=>{const e=+t.target.value-1,i=new Date(this.currentDate);B(i,this.minDate,this.maxDate)&&(i.setMonth(e),this.updateCurrentDate(i))},this.onYearSelect=t=>{var e;const i=+t.target.value,s=new Date(this.currentDate);B(s,this.minDate,this.maxDate)&&(s.setFullYear(i),null===(e=this.changeYear)||void 0===e||e.emit({year:i}),this.updateCurrentDate(s))},this.onKeyDown=t=>{this.disabled||("ArrowLeft"===t.code?(t.preventDefault(),this.updateCurrentDate(f(this.currentDate),!0)):"ArrowRight"===t.code?(t.preventDefault(),this.updateCurrentDate(l(this.currentDate),!0)):"ArrowUp"===t.code?(t.preventDefault(),this.updateCurrentDate(g(this.currentDate,7),!0)):"ArrowDown"===t.code?(t.preventDefault(),this.updateCurrentDate(h(this.currentDate,7),!0)):"PageUp"===t.code?(t.preventDefault(),this.updateCurrentDate(t.shiftKey?y(this.currentDate):v(this.currentDate),!0)):"PageDown"===t.code?(t.preventDefault(),this.updateCurrentDate(t.shiftKey?b(this.currentDate):u(this.currentDate),!0)):"Home"===t.code?(t.preventDefault(),this.updateCurrentDate(o(this.currentDate),!0)):"End"===t.code?(t.preventDefault(),this.updateCurrentDate(d(this.currentDate),!0)):"Space"!==t.code&&"Enter"!==t.code||(t.preventDefault(),this.onSelectDate(this.currentDate)))},this.onMouseEnter=t=>{var e;if(this.disabled)return;const i=k(new Date(null===(e=t.target.closest("td"))||void 0===e?void 0:e.dataset.date));this.hoveredDate=i},this.onMouseLeave=()=>{this.hoveredDate=void 0},this.close=()=>{var t;null===(t=this.requestClose)||void 0===t||t.emit()}}componentWillLoad(){this.init()}watchModalIsOpen(){!0===this.modalIsOpen&&(this.moveFocusOnModalOpen=!0)}watchFirstDayOfWeek(){this.updateWeekdays()}watchLocale(){Boolean(this.locale)||(this.locale=(null===navigator||void 0===navigator?void 0:navigator.language)||"en-US"),this.updateWeekdays()}watchRange(){var t;this.value=void 0,null===(t=this.selectDate)||void 0===t||t.emit(void 0)}watchStartDate(){this.currentDate=this.startDate?k(new Date(this.startDate)):new Date}watchValue(){Boolean(this.value)&&(Array.isArray(this.value)&&this.value.length>=1?this.currentDate=this.value[0]:this.value instanceof Date&&(this.currentDate=this.value))}componentDidRender(){this.moveFocusAfterMonthChanged&&(this.focusDate(this.currentDate),this.moveFocusAfterMonthChanged=!1),this.moveFocusOnModalOpen&&setTimeout((()=>{this.focusDate(this.currentDate),this.moveFocusOnModalOpen=!1}),100)}updateWeekdays(){var t,e;this.weekdays=(t=this.firstDayOfWeek,e=this.locale,new Array(7).fill(void 0).map(((e,i)=>(t+i)%7+1)).map((t=>{const i=new Date(2006,0,t);return[Intl.DateTimeFormat(e,{weekday:"short"}).format(i),Intl.DateTimeFormat(e,{weekday:"long"}).format(i)]})))}getClassName(t){return Boolean(t)?`${this.elementClassName}__${t}`:this.elementClassName}getCalendarRows(){const t=function(t,e,i){const s=[],a=o(t),n=0===a.getDay()?7:a.getDay(),h=d(t),r=0===h.getDay()?7:h.getDay(),c=1===i?7:i-1,u=[],b=[];{let t=(7-i+n)%7,e=f(a);for(;t>0;)u.push(e),e=f(e),t-=1;u.reverse();let s=(7-r+c)%7,o=l(h);for(;s>0;)b.push(o),o=l(o),s-=1}let v=a;for(;v.getMonth()===t.getMonth();)s.push(v),v=l(v);return[...u,...s,...b]}(this.currentDate,0,0===this.firstDayOfWeek?7:this.firstDayOfWeek),e=[];for(let i=0;i<t.length;i+=7){const s=t.slice(i,i+7);e.push(s)}const i=e[e.length-1];let s=null==i?void 0:i[i.length-1];for(;e.length<6&&s;){const t=[];for(let e=0;e<7;e+=1)s=h(s,1),t.push(s);e.push(t)}return e}getTitle(){if(Boolean(this.currentDate))return Intl.DateTimeFormat(this.locale,{month:"long",year:"numeric"}).format(this.currentDate)}focusDate(t){var e;t&&(null===(e=this.el.querySelector(`[data-date="${r(t)}"]`))||void 0===e||e.focus())}updateCurrentDate(t,e,i=!1){var s,a,n;const h=t.getMonth(),o=t.getFullYear();D(t,this.minDate)||(t=m(this.minDate)),C(t,this.maxDate)||(t=m(this.maxDate)),(h!==(null===(s=this.currentDate)||void 0===s?void 0:s.getMonth())||o!==this.currentDate.getFullYear())&&(null===(a=this.changeMonth)||void 0===a||a.emit({month:c(t),year:w(t)}),e&&(this.moveFocusAfterMonthChanged=!0)),this.currentDate=t,e&&this.focusDate(this.currentDate),i&&(null===(n=this.changeYear)||void 0===n||n.emit({year:w(t)}))}onSelectDate(t){var e,i,s,a;if(!this.disableDate(t)&&B(t,this.minDate,this.maxDate))if(this.isRangeValue(this.value)){const s=void 0===(null===(e=this.value)||void 0===e?void 0:e[0])||2===this.value.length?[t]:[this.value[0],t];2===s.length&&s[0]>s[1]&&s.reverse();const a=void 0===s[1]?[r(s[0])]:[r(s[0]),r(s[1])];this.value=s,null===(i=this.selectDate)||void 0===i||i.emit(a)}else{if((null===(s=this.value)||void 0===s?void 0:s.getTime())===t.getTime())return;this.value=t,null===(a=this.selectDate)||void 0===a||a.emit(r(t))}}isRangeValue(t){return!!this.range}render(){var t;const e=this.showTodayButton||this.showClearButton||this.showCloseButton||this.showKeyboardHint,i={year:{prev:this.disabled||!!this.minDate&&m(this.minDate).getFullYear()>y(this.currentDate).getFullYear(),next:this.disabled||!!this.maxDate&&m(this.maxDate).getFullYear()<b(this.currentDate).getFullYear()},month:{prev:this.disabled||$(v(this.currentDate).getMonth(),v(this.currentDate).getFullYear(),this.minDate,this.maxDate),next:this.disabled||$(u(this.currentDate).getMonth(),u(this.currentDate).getFullYear(),this.minDate,this.maxDate)}};return s(a,{key:"60e2a56f8a1aadceb57d7f445098060293a0f937"},s("div",{key:"12fd35c03b0c34e4ad88e4e491fcc685de5f09b2",class:{[`${this.getClassName()}-wrapper`]:!0,[`${this.getClassName()}-wrapper--inline`]:this.inline}},s("div",{key:"ad36d1e260a7a89110c53fc86e339eb5a259a4fc",class:{[this.getClassName()]:!0,[`${this.getClassName()}--disabled`]:this.disabled}},s("div",{key:"181b9ed0a6a9d6073d67f270d6b14efc28f6a6b2",class:this.getClassName("header")},this.showHiddenTitle&&s("span",{key:"580656924dc3ba028458591399791423797d58d7","aria-atomic":"true","aria-live":"polite",class:"visually-hidden"},this.getTitle()),this.showYearStepper&&s("button",{key:"baedceb7e568df8bfc1cee64d13c6114b85c3764","aria-label":this.labels.previousYearButton,class:this.getClassName("previous-year-button"),"aria-disabled":String(i.year.prev),disabled:i.year.prev,innerHTML:this.previousYearButtonContent||void 0,onClick:this.previousYear,type:"button"},s("svg",{key:"4e3286e12ebd5c5bba8dfc3f0ecab29f37ddf9c0",fill:"none",height:"24","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"24"},s("polyline",{key:"6178bb5e4dc08a9b46c587c7b3e7c5fd27867f5b",points:"11 17 6 12 11 7"}),s("polyline",{key:"3d03d26acc37c91243d7cbd54d228f35752f80a7",points:"18 17 13 12 18 7"}))),this.showMonthStepper&&s("button",{key:"9ecb2f9e5adceda9526b15b64721f16e1c7a8ca5","aria-label":this.labels.previousMonthButton,class:this.getClassName("previous-month-button"),"aria-disabled":String(i.month.prev),disabled:i.month.prev,innerHTML:this.previousMonthButtonContent||void 0,onClick:this.previousMonth,type:"button"},s("svg",{key:"a8c74b97c18cae04b86464a53b8a99f3cffd1379",fill:"none",height:"24","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"24"},s("polyline",{key:"196da2b5f0485a8af41232b2c9fd614e131230e6",points:"15 18 9 12 15 6"}))),s("span",{key:"b044b7041af2cbd6b527b05b6d4175e85a4a5e0c",class:this.getClassName("current-month")},s("select",{key:"f4259d0b1448b19e861ed1bb7401508b6e8f5505","aria-label":this.labels.monthSelect,class:this.getClassName("month-select"),"aria-disabled":this.disabled,name:"month",onChange:this.onMonthSelect},(n=this.locale,new Array(12).fill(void 0).map(((t,e)=>{const i=k(new Date(`2006-${String(e+1).padStart(2,"0")}-01`));return Intl.DateTimeFormat(n,{month:"long"}).format(i)}))).map(((t,e)=>s("option",{key:t,selected:this.currentDate.getMonth()===e,value:e+1,disabled:$(e,this.currentDate.getFullYear(),this.minDate,this.maxDate)},t)))),s("input",{key:"29566d4d17a43313d0cd09102ffe8f7dadab48a4","aria-label":this.labels.yearSelect,class:this.getClassName("year-select"),"aria-disabled":this.disabled,max:this.maxDate?this.maxDate.slice(0,4):9999,min:this.minDate?this.minDate.slice(0,4):1,name:"year",onChange:this.onYearSelect,type:"number",value:this.currentDate.getFullYear()})),this.showMonthStepper&&s("button",{key:"3c3a08d8c1a9471d3c03656e1c69dd9b610964a6","aria-label":this.labels.nextMonthButton,class:this.getClassName("next-month-button"),"aria-disabled":String(i.month.next),disabled:i.month.next,innerHTML:this.nextMonthButtonContent||void 0,onClick:this.nextMonth,type:"button"},s("svg",{key:"691056b81918999f8cb5e411ea808bfc3d63d285",fill:"none",height:"24","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"24"},s("polyline",{key:"1ad9ffac020a5e77bfbe13e56be4039c0ab1bce1",points:"9 18 15 12 9 6"}))),this.showYearStepper&&s("button",{key:"541f139687c50d4515f6ba52f86e5bd0dfb480a8","aria-label":this.labels.nextYearButton,class:this.getClassName("next-year-button"),"aria-disabled":String(i.year.next),disabled:i.year.next,innerHTML:this.nextYearButtonContent||void 0,onClick:this.nextYear,type:"button"},s("svg",{key:"38ed3c8a59612395ef641d3ae1068f755f7d68b1",fill:"none",height:"24","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"24"},s("polyline",{key:"2b95dc3f77f314e84d2cfaec8e479d7097ab43d9",points:"13 17 18 12 13 7"}),s("polyline",{key:"f26e6b1290a4817aef45fb8e7aa0f7956fefaa8c",points:"6 17 11 12 6 7"})))),s("div",{key:"2c8eefeaac7909a66bd3975c4a5be18ac7f459fe",class:this.getClassName("body")},s("table",{key:"2a3646bac9db5b7253fa17632d71d74bec41a6ee",class:this.getClassName("calendar"),onKeyDown:this.onKeyDown,role:"grid","aria-label":this.getTitle()},s("thead",{key:"146348c0e34687eb6b776698b8dd8eba44b51552",class:this.getClassName("calendar-header")},s("tr",{key:"afa9189bdbaab542fdf36c78849da38cdf387135",class:this.getClassName("weekday-row")},null===(t=this.weekdays)||void 0===t?void 0:t.map((t=>s("th",{role:"columnheader",abbr:t[1],class:this.getClassName("weekday"),key:t[0],scope:"col"},s("span",{"aria-hidden":"true"},t[0]),s("span",{class:"visually-hidden"},t[1])))))),s("tbody",{key:"d70b0012e308a5dadb5da96c78f6471253f9d1c0"},this.getCalendarRows().map((t=>{const e=`row-${t[0].getMonth()}-${t[0].getDate()}`;return s("tr",{class:this.getClassName("calendar-row"),key:e},t.map((t=>{var e,i,a;const n=p(t,this.currentDate),h=t.getMonth()!==(null===(e=this.currentDate)||void 0===e?void 0:e.getMonth()),o=Array.isArray(this.value)?p(t,this.value[0])||this.value[1]&&B(t,r(this.value[0]),r(this.value[1])):p(t,this.value),d=this.disableDate(t)||!B(t,this.minDate,this.maxDate),c=!!this.isRangeValue(this.value)&&(u={from:null===(i=this.value)||void 0===i?void 0:i[0],to:(null===(a=this.value)||void 0===a?void 0:a[1])||this.hoveredDate||this.currentDate},!!((l=t)&&u&&u.from&&u.to)&&l>=(u.from<u.to?u.from:u.to)&&l<=(u.from<u.to?u.to:u.from)&&!d);var l,u;const b=p(t,new Date),f=`cell-${t.getMonth()}-${t.getDate()}`,v={[this.getClassName("date")]:!0,[this.getClassName("date--current")]:n,[this.getClassName("date--disabled")]:d,[this.getClassName("date--overflowing")]:h,[this.getClassName("date--today")]:b,[this.getClassName("date--selected")]:o,[this.getClassName("date--in-range")]:c},y=o?"strong":b?"em":"span";return s("td",{"aria-disabled":String(d),"aria-selected":o?"true":void 0,class:v,"data-date":r(t),key:f,onClick:this.onClick,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,role:"gridcell",tabIndex:p(t,this.currentDate)&&!this.disabled?0:-1},s(y,{"aria-hidden":"true"},t.getDate()),s("span",{class:"visually-hidden"},(()=>{if(this.range){let e=this.value?"":`, ${this.labels.chooseAsStartDate}.`;return Array.isArray(this.value)&&(e={1:`, ${this.labels.chooseAsEndDate}.`,2:`, ${this.labels.chooseAsStartDate}.`}[this.value.length]),`${o?`${this.labels.selected}, `:""}${Intl.DateTimeFormat(this.locale,{day:"numeric",month:"long",year:"numeric"}).format(t)}${e}`}return`${o?`${this.labels.selected}, `:""}${Intl.DateTimeFormat(this.locale,{day:"numeric",month:"long",year:"numeric"}).format(t)}`})()))})))}))))),e&&s("div",{key:"574bd94d669e65194e7c26499007a320d950dff4",class:this.getClassName("footer")},s("div",{key:"c4fad38c1c3a57f221c3b7094e1f70981fcd9f65",class:this.getClassName("footer-buttons")},this.showTodayButton&&s("button",{key:"26e4889dc3d806204df07aea74069741dc8794d9","aria-label":this.todayButtonContent?this.labels.todayButton:void 0,class:this.getClassName("today-button"),disabled:this.disabled,innerHTML:this.todayButtonContent||void 0,onClick:this.showToday,type:"button"},!this.todayButtonContent&&this.labels.todayButton),this.showClearButton&&s("button",{key:"347741d4adfc95c14060864de7674344da311a6e","aria-label":this.clearButtonContent?this.labels.clearButton:void 0,class:this.getClassName("clear-button"),disabled:this.disabled,innerHTML:this.clearButtonContent||void 0,onClick:this.clear,type:"button"},!this.clearButtonContent&&this.labels.clearButton),this.showCloseButton&&s("button",{key:"287053ef376238a807a1ff092da80a350700abd2","aria-label":this.closeButtonContent?this.labels.closeButton:void 0,class:this.getClassName("close-button"),disabled:this.disabled,innerHTML:this.closeButtonContent||void 0,onClick:this.close,type:"button"},!this.closeButtonContent&&this.labels.closeButton)),this.showKeyboardHint&&!window.matchMedia("(pointer: coarse)").matches&&s("button",{key:"bb05e75930b211fb43874b492c4e16229d0d7232",type:"button",onClick:()=>alert("Todo: Add Keyboard helper!"),class:this.getClassName("keyboard-hint")},s("svg",{key:"8b7e648ea409ce84086aaf06c4d4707dd6e09274",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",viewBox:"0 0 48 48",fill:"currentColor"},s("path",{key:"aeaefade16771c198b74bb1c38f88bd9457d2baa",d:"M7 38q-1.2 0-2.1-.925Q4 36.15 4 35V13q0-1.2.9-2.1.9-.9 2.1-.9h34q1.2 0 2.1.9.9.9.9 2.1v22q0 1.15-.9 2.075Q42.2 38 41 38Zm0-3h34V13H7v22Zm8-3.25h18v-3H15Zm-4.85-6.25h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3Zm-24.7-6.25h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3ZM7 35V13v22Z"})),this.labels.keyboardHint))),s("slot",{key:"6054a85ed3973b573f102c45d33995ad90eaf2f8",name:"after-calendar"})));var n}get el(){return this}static get watchers(){return{modalIsOpen:[{watchModalIsOpen:0}],firstDayOfWeek:[{watchFirstDayOfWeek:0}],locale:[{watchLocale:0}],range:[{watchRange:0}],startDate:[{watchStartDate:0}],value:[{watchValue:0}]}}static get style(){return".visually-hidden.sc-tabworthy-dates-calendar{position:absolute;overflow:hidden;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%)}"}},[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]},void 0,{modalIsOpen:[{watchModalIsOpen:0}],firstDayOfWeek:[{watchFirstDayOfWeek:0}],locale:[{watchLocale:0}],range:[{watchRange:0}],startDate:[{watchStartDate:0}],value:[{watchValue:0}]}]);function H(){"undefined"!=typeof customElements&&["tabworthy-dates-calendar"].forEach((t=>{"tabworthy-dates-calendar"===t&&(customElements.get(n(t))||customElements.define(n(t),Z))}))}export{Z as T,D as a,C as b,H as c,B as d,S as e,r as g,x as i,m as p,k as r}