@tabworthy/components 0.11.4 → 0.12.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 (38) 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-dates.cjs.entry.js +36 -5
  5. package/dist/cjs/tabworthy-times-picker.cjs.entry.js +8 -8
  6. package/dist/cjs/tabworthy-times.cjs.entry.js +13 -7
  7. package/dist/collection/components/tabworthy-dates/tabworthy-dates.js +56 -5
  8. package/dist/collection/components/tabworthy-dates-calendar/tabworthy-dates-calendar.js +1 -1
  9. package/dist/collection/components/tabworthy-modal/tabworthy-dates-modal.js +3 -3
  10. package/dist/collection/components/tabworthy-times/tabworthy-times.js +12 -6
  11. package/dist/collection/components/tabworthy-times-picker/tabworthy-times-picker.js +8 -8
  12. package/dist/components/{p-B6lbpNd2.js → p-BTQaxOHo.js} +1 -1
  13. package/dist/components/{p-CIQgnOXj.js → p-CMIEIvTW.js} +1 -1
  14. package/dist/components/{p-CGo5md1l.js → p-M03P4DAz.js} +1 -1
  15. package/dist/components/tabworthy-dates-calendar.js +1 -1
  16. package/dist/components/tabworthy-dates-modal.js +1 -1
  17. package/dist/components/tabworthy-dates.js +1 -1
  18. package/dist/components/tabworthy-times-picker.js +1 -1
  19. package/dist/components/tabworthy-times.js +1 -1
  20. package/dist/esm/loader.js +1 -1
  21. package/dist/esm/tabworthy-components.js +1 -1
  22. package/dist/esm/tabworthy-dates-calendar_2.entry.js +7 -7
  23. package/dist/esm/tabworthy-dates.entry.js +36 -5
  24. package/dist/esm/tabworthy-times-picker.entry.js +8 -8
  25. package/dist/esm/tabworthy-times.entry.js +13 -7
  26. package/dist/tabworthy-components/{p-60793499.entry.js → p-1743bf7a.entry.js} +1 -1
  27. package/dist/tabworthy-components/{p-c378a069.entry.js → p-744ffef9.entry.js} +1 -1
  28. package/dist/tabworthy-components/p-bc07c40b.entry.js +1 -0
  29. package/dist/tabworthy-components/{p-f1688c61.entry.js → p-df93e5d4.entry.js} +1 -1
  30. package/dist/tabworthy-components/tabworthy-components.esm.js +1 -1
  31. package/dist/themes/light.css +1 -1
  32. package/dist/types/components/tabworthy-dates/tabworthy-dates.d.ts +3 -0
  33. package/dist/types/components/tabworthy-dates-calendar/tabworthy-dates-calendar.d.ts +1 -1
  34. package/dist/types/components/tabworthy-modal/tabworthy-dates-modal.d.ts +1 -1
  35. package/dist/types/components/tabworthy-times/tabworthy-times.d.ts +1 -1
  36. package/dist/types/components.d.ts +9 -0
  37. package/package.json +1 -1
  38. package/dist/tabworthy-components/p-6335f1a7.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"],"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"],"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],"clearValue":[64]},null,{"value":[{"watchValue":0}],"disabled":[{"watchDisabled":0}],"hasError":[{"watchHasError":0}]}]]],["tabworthy-dates.cjs",[[2,"tabworthy-dates",{"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"],"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"],"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"],"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]},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"],"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"],"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],"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"],"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"],"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]},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"],"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"],"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],"clearValue":[64]},null,{"value":[{"watchValue":0}],"disabled":[{"watchDisabled":0}],"hasError":[{"watchHasError":0}]}]]],["tabworthy-dates.cjs",[[2,"tabworthy-dates",{"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"],"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"],"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"],"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]},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"],"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"],"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],"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"],"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"],"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]},null,{"disabled":[{"watchDisabled":0}],"value":[{"watchValue":0}]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -21,7 +21,7 @@ const defaultLabels = {
21
21
  chooseAsStartDate: "choose as start date",
22
22
  chooseAsEndDate: "choose as end date"
23
23
  };
24
- const InclusiveDatesCalendar = class {
24
+ const TabworthyDatesCalendar = class {
25
25
  constructor(hostRef) {
26
26
  index.registerInstance(this, hostRef);
27
27
  this.selectDate = index.createEvent(this, "selectDate", 3);
@@ -428,7 +428,7 @@ const InclusiveDatesCalendar = class {
428
428
  }]
429
429
  }; }
430
430
  };
431
- InclusiveDatesCalendar.style = tabworthyDatesCalendarCss();
431
+ TabworthyDatesCalendar.style = tabworthyDatesCalendarCss();
432
432
 
433
433
  /**
434
434
  * Traverses the slots of the open shadowroots and returns all children matching the query.
@@ -2637,7 +2637,7 @@ var createPopper = /*#__PURE__*/popperGenerator({
2637
2637
 
2638
2638
  const tabworthyDatesModalCss = () => `:host::part(body){position:absolute;top:0;left:0;width:-moz-fit-content;width:fit-content;z-index:1200}:host::part(backdrop){}:host::part(content){}`;
2639
2639
 
2640
- const InclusiveDatesModal = class {
2640
+ const TabworthyDatesModal = class {
2641
2641
  constructor(hostRef) {
2642
2642
  index.registerInstance(this, hostRef);
2643
2643
  this.opened = index.createEvent(this, "opened", 7);
@@ -2825,7 +2825,7 @@ const InclusiveDatesModal = class {
2825
2825
  }
2826
2826
  }
2827
2827
  render() {
2828
- return (index.h(index.Host, { key: 'bf48e957915fbc2975d7ba2f2ca6844e2c14270e', showing: this.showing, ref: (r) => r && (this.el = r) }, !this.inline && this.showing && (index.h("div", { key: '87fd577d1289e3c6f888b614d127e729003b1fe6', part: "body", ref: (r) => {
2828
+ 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) => {
2829
2829
  if (r) {
2830
2830
  this.bodyRef = r;
2831
2831
  // Setup portal and create popper when ref is set
@@ -2842,7 +2842,7 @@ const InclusiveDatesModal = class {
2842
2842
  });
2843
2843
  }
2844
2844
  }
2845
- }, 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: '5f994a20957137ce8e95d17191cb9436ae4c2315' }, index.h("div", { key: '6ab5e6990d04e9e6b0905971b52b33410608759e', part: "content" }, index.h("slot", { key: '9d99fbd7f47ee014277fe4493f86a90b3929103c' }))))), this.inline && (index.h("div", { key: 'fc1766214d1727cc2865a17da6661f06bd67429f', part: "content" }, index.h("slot", { key: '28d41dba4356ce3bd0aa7db06943296de4372695' })))));
2845
+ }, 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' })))));
2846
2846
  }
2847
2847
  get hostElement() { return index.getElement(this); }
2848
2848
  static get watchers() { return {
@@ -2851,7 +2851,7 @@ const InclusiveDatesModal = class {
2851
2851
  }]
2852
2852
  }; }
2853
2853
  };
2854
- InclusiveDatesModal.style = tabworthyDatesModalCss();
2854
+ TabworthyDatesModal.style = tabworthyDatesModalCss();
2855
2855
 
2856
- exports.tabworthy_dates_calendar = InclusiveDatesCalendar;
2857
- exports.tabworthy_dates_modal = InclusiveDatesModal;
2856
+ exports.tabworthy_dates_calendar = TabworthyDatesCalendar;
2857
+ exports.tabworthy_dates_modal = TabworthyDatesModal;
@@ -10476,6 +10476,7 @@ const defaultLabels = {
10476
10476
  invalidDateError: "We could not find a matching date",
10477
10477
  minDateError: `Please fill in a date after `,
10478
10478
  maxDateError: `Please fill in a date before `,
10479
+ yearSelect: "Select year",
10479
10480
  rangeOutOfBoundsError: `Please enter a valid range of dates`,
10480
10481
  disabledDateError: `Please choose an available date`,
10481
10482
  to: "to",
@@ -10490,6 +10491,8 @@ const TabworthyDates = class {
10490
10491
  this.componentReady = index$1.createEvent(this, "componentReady", 7);
10491
10492
  // Enable or disable range mode
10492
10493
  this.range = false;
10494
+ // Enable year-only mode (shows only year input, no calendar)
10495
+ this.yearOnly = false;
10493
10496
  // A label for the text field
10494
10497
  this.label = this.range
10495
10498
  ? "Choose a date range (any way you like)"
@@ -10599,6 +10602,23 @@ const TabworthyDates = class {
10599
10602
  var _a;
10600
10603
  (_a = this.changeYear) === null || _a === void 0 ? void 0 : _a.emit(yearDetail);
10601
10604
  };
10605
+ this.handleYearInputChange = (event) => {
10606
+ var _a;
10607
+ const year = +event.target.value;
10608
+ if (!year || isNaN(year))
10609
+ return;
10610
+ const minYear = this.minDate ? parseInt(this.minDate.slice(0, 4), 10) : 1;
10611
+ const maxYear = this.maxDate
10612
+ ? parseInt(this.maxDate.slice(0, 4), 10)
10613
+ : 9999;
10614
+ if (year < minYear || year > maxYear)
10615
+ return;
10616
+ const newValue = customParseFormat.dayjs().year(year).startOf("year").format(this.format);
10617
+ this.internalValue = newValue;
10618
+ this.value = newValue;
10619
+ (_a = this.changeYear) === null || _a === void 0 ? void 0 : _a.emit({ year });
10620
+ this.selectDate.emit(newValue);
10621
+ };
10602
10622
  this.handleRangeChange = async (value) => {
10603
10623
  this.errorState = false;
10604
10624
  if (value.length === 0) {
@@ -10911,10 +10931,21 @@ const TabworthyDates = class {
10911
10931
  }
10912
10932
  render() {
10913
10933
  var _a;
10914
- return (index$1.h(index$1.Host, { key: '7dc37ffe7603f9c65f674910f5e1de3fec6d13f7' }, index$1.h("label", { key: '240bdaf77226608e88efc0bf810ed0d08090927a', htmlFor: this.id ? `${this.id}-input` : undefined, class: this.getClassName("label") }, this.label), index$1.h("br", { key: 'd37a77330ffabc8b8565c5c058ee4c5ee32e755b' }), index$1.h("div", { key: 'db290a3f753694a073ab8dd779b90e06fabe3b25', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, index$1.h("input", { key: 'd51dcd7f6abc15bd605a5d8c5b77da97eec76ed8', disabled: this.disabledState || this.disableFreeformInput, id: this.id ? `${this.id}-input` : undefined, type: "text", placeholder: this.placeholder, class: {
10934
+ // Year-only mode: show just a year number input
10935
+ if (this.yearOnly) {
10936
+ const currentYear = this.value
10937
+ ? parseInt(String(this.value).slice(0, 4), 10)
10938
+ : new Date().getFullYear();
10939
+ return (index$1.h(index$1.Host, null, index$1.h("label", { htmlFor: this.id ? `${this.id}-input` : undefined, class: this.getClassName("label") }, this.label), index$1.h("br", null), index$1.h("div", { class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, index$1.h("input", { "aria-label": this.datesLabels.yearSelect, class: {
10940
+ [this.getClassName("year-select")]: true,
10941
+ [this.getClassName("input")]: true,
10942
+ [this.inputClass]: !!this.inputClass
10943
+ }, "aria-disabled": this.disabledState, disabled: this.disabledState, max: this.maxDate ? this.maxDate.slice(0, 4) : 9999, min: this.minDate ? this.minDate.slice(0, 4) : 1, name: "year", id: this.id ? `${this.id}-input` : undefined, onChange: this.handleYearInputChange, type: "number", value: currentYear, "aria-describedby": this.errorState ? `${this.id}-error` : undefined, "aria-invalid": this.errorState })), this.errorState && (index$1.h("div", { class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
10944
+ }
10945
+ return (index$1.h(index$1.Host, null, index$1.h("label", { htmlFor: this.id ? `${this.id}-input` : undefined, class: this.getClassName("label") }, this.label), index$1.h("br", null), index$1.h("div", { class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, index$1.h("input", { disabled: this.disabledState || this.disableFreeformInput, id: this.id ? `${this.id}-input` : undefined, type: "text", placeholder: this.placeholder, class: {
10915
10946
  [this.getClassName("input")]: true,
10916
10947
  [this.inputClass]: !!this.inputClass
10917
- }, ref: (r) => (this.inputRef = r), onChange: this.handleChange, onFocus: () => this.formatInput(false), onBlur: () => this.formatInput(true, false), "aria-describedby": this.errorState ? `${this.id}-error` : undefined, "aria-invalid": this.errorState }), !this.inline && (index$1.h("button", { key: '41527ddd0ae71c44a645c887cd395957dc22252c', type: "button", onClick: this.handleCalendarButtonClick, class: this.getClassName("calendar-button"), disabled: this.disabledState }, this.calendarButtonContent ? (index$1.h("span", { innerHTML: this.calendarButtonContent })) : (this.datesLabels.openCalendar)))), index$1.h("tabworthy-dates-modal", { key: '9356c01fadb2450a04664dcd4c4b3a1fce278394', label: this.datesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
10948
+ }, ref: (r) => (this.inputRef = r), onChange: this.handleChange, onFocus: () => this.formatInput(false), onBlur: () => this.formatInput(true, false), "aria-describedby": this.errorState ? `${this.id}-error` : undefined, "aria-invalid": this.errorState }), !this.inline && (index$1.h("button", { type: "button", onClick: this.handleCalendarButtonClick, class: this.getClassName("calendar-button"), disabled: this.disabledState }, this.calendarButtonContent ? (index$1.h("span", { innerHTML: this.calendarButtonContent })) : (this.datesLabels.openCalendar)))), index$1.h("tabworthy-dates-modal", { label: this.datesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
10918
10949
  if (!this.pickerRef)
10919
10950
  return;
10920
10951
  this.pickerRef.modalIsOpen = true;
@@ -10922,11 +10953,11 @@ const TabworthyDates = class {
10922
10953
  if (!this.pickerRef)
10923
10954
  return;
10924
10955
  this.pickerRef.modalIsOpen = false;
10925
- }, inline: this.inline, appendTo: this.appendTo }, index$1.h("tabworthy-dates-calendar", { key: '371f6b079a3dc3d42d84e0ce0d301a4121747130', 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 ? this.datesCalendarLabels : undefined, ref: (el) => (this.pickerRef = el), startDate: this.startDate, firstDayOfWeek: this.firstDayOfWeek, showHiddenTitle: true, disabled: this.disabledState, showMonthStepper: this.showMonthStepper, showYearStepper: this.showYearStepper, showClearButton: this.showClearButton, showCloseButton: this.showCloseButton, showKeyboardHint: this.showKeyboardHint, showTodayButton: this.showTodayButton, disableDate: this.disableDate, minDate: this.minDate, maxDate: this.maxDate, inline: this.inline })), this.showQuickButtons &&
10956
+ }, inline: this.inline, appendTo: this.appendTo }, index$1.h("tabworthy-dates-calendar", { 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 ? this.datesCalendarLabels : undefined, ref: (el) => (this.pickerRef = el), startDate: this.startDate, firstDayOfWeek: this.firstDayOfWeek, showHiddenTitle: true, disabled: this.disabledState, showMonthStepper: this.showMonthStepper, showYearStepper: this.showYearStepper, showClearButton: this.showClearButton, showCloseButton: this.showCloseButton, showKeyboardHint: this.showKeyboardHint, showTodayButton: this.showTodayButton, disableDate: this.disableDate, minDate: this.minDate, maxDate: this.maxDate, inline: this.inline })), this.showQuickButtons &&
10926
10957
  ((_a = this.quickButtons) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
10927
- this.chronoSupportedLocale && (index$1.h("div", { key: 'afadda0a46a2e3224c940d27ba884edc45487bf3', class: this.getClassName("quick-group"), role: "group", "aria-label": this.datesLabels.quickSelection }, this.quickButtons.map((buttonText) => {
10958
+ this.chronoSupportedLocale && (index$1.h("div", { class: this.getClassName("quick-group"), role: "group", "aria-label": this.datesLabels.quickSelection }, this.quickButtons.map((buttonText) => {
10928
10959
  return (index$1.h("button", { class: this.getClassName("quick-button"), onClick: this.handleQuickButtonClick, disabled: this.disabledState, type: "button" }, buttonText));
10929
- }))), this.errorState && (index$1.h("div", { key: '7caa060a5da1846323cc161cbf9cff4b5275b90f', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
10960
+ }))), this.errorState && (index$1.h("div", { class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
10930
10961
  }
10931
10962
  get el() { return index$1.getElement(this); }
10932
10963
  static get watchers() { return {
@@ -179,22 +179,22 @@ const TabworthyTimesPicker = class {
179
179
  const displayHours = this.getDisplayHours();
180
180
  const maxHours = this.useTwelveHourFormat ? 12 : 23;
181
181
  const minHours = this.useTwelveHourFormat ? 1 : 0;
182
- return (index.h(index.Host, { key: '372c9246a2607ae7553b61ba7445086000193ed1', class: this.elementClassName, "aria-label": this.labels.timePicker }, index.h("div", { key: 'fc8ea016f0c0cef3496024285fada802395011ac', class: `${this.elementClassName}__container` }, index.h("div", { key: '235d60b72a515d2b935a736bef6768b057714a53', class: `${this.elementClassName}__field` }, index.h("label", { key: '9f9c5cfee7fb8a44d9b4902809805b5aa2568f18', htmlFor: `${this.elementClassName}-hours`, class: {
182
+ return (index.h(index.Host, { key: '878156f105b2fb61aae67f866c1c436f038d1671', class: this.elementClassName, "aria-label": this.labels.timePicker }, index.h("div", { key: '7b6265d1de95da5423d0d7fcfc6da5e283b64650', class: `${this.elementClassName}__container` }, index.h("div", { key: '6e64ffa764916fb2bad7b88c30eed4ce3de141ed', class: `${this.elementClassName}__field` }, index.h("label", { key: '0b9f82f319299fc3f177ec131f3bcb2d911cae6c', htmlFor: `${this.elementClassName}-hours`, class: {
183
183
  [`${this.elementClassName}__label`]: true,
184
184
  [`${this.elementClassName}__label--sr-only`]: this.labelsSrOnly
185
- } }, this.labels.hours), index.h("div", { key: 'c5e369d24840f55c994d8a546bcca3569e2619ef', class: `${this.elementClassName}__control` }, index.h("button", { key: '51f6278e8af5d4ec0b6ad11e2e1b90ec642adb08', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--increment`, onClick: this.handleHourIncrement, disabled: this.disabled, "aria-label": this.labels.incrementHours }, index.h("svg", { key: '2bd03474f449be514d4a83e00606d476120d7bae', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, index.h("polyline", { key: 'c50112d7748c97e93e4fa0a567ef2a74609e295b', points: "18 15 12 9 6 15" }))), index.h("input", { key: 'a157d44b72d46e6e67b91ac8d00caa5f8df046e7', id: `${this.elementClassName}-hours`, type: "number", class: `${this.elementClassName}__input`, value: this.padZero(displayHours), min: minHours, max: maxHours, onInput: this.handleHourChange, disabled: this.disabled, "aria-label": this.labels.hours }), index.h("button", { key: '63a18713421f84b35b8a9bcef4c10213086bab8e', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--decrement`, onClick: this.handleHourDecrement, disabled: this.disabled, "aria-label": this.labels.decrementHours }, index.h("svg", { key: '3e6c61c533b9ae91d1f35d424c54602b5bd1252c', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, index.h("polyline", { key: 'cfe2fe7edfc882bd03ffbb1c7a282b73afac42ac', points: "6 9 12 15 18 9" }))))), index.h("div", { key: 'e1956c2fa548d3e011ec7a9f88f837e8482280b2', class: `${this.elementClassName}__separator` }, ":"), index.h("div", { key: '6e8292b63371a4a37fb6afca9a3668e87d583fde', class: `${this.elementClassName}__field` }, index.h("label", { key: '876283ccffdce8688ac400d4c46d7f99735da14a', htmlFor: `${this.elementClassName}-minutes`, class: {
185
+ } }, this.labels.hours), index.h("div", { key: '0b7c4a24255319fe373aacf275583a6ccf1415ea', class: `${this.elementClassName}__control` }, index.h("button", { key: '24aff5877ad7cb189a6a9118f45e912ee2f97bec', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--increment`, onClick: this.handleHourIncrement, disabled: this.disabled, "aria-label": this.labels.incrementHours }, index.h("svg", { key: '681c818b4e10bc442aca0795024153dda43e6e27', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, index.h("polyline", { key: '0f86f34c93f99536623d793429bae7109aa29996', points: "18 15 12 9 6 15" }))), index.h("input", { key: '26043b87943641bdab9322413a36e0019980ef87', id: `${this.elementClassName}-hours`, type: "number", class: `${this.elementClassName}__input`, value: this.padZero(displayHours), min: minHours, max: maxHours, onInput: this.handleHourChange, disabled: this.disabled, "aria-label": this.labels.hours }), index.h("button", { key: 'd9617f2300e5457bd6480136d33905b35a2c2aba', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--decrement`, onClick: this.handleHourDecrement, disabled: this.disabled, "aria-label": this.labels.decrementHours }, index.h("svg", { key: '468f599326f2a01c873e963ef30904e66dead729', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, index.h("polyline", { key: '0c54d3e34df989d2514dc95c3e660d94bda4819d', points: "6 9 12 15 18 9" }))))), index.h("div", { key: '0435c24eb991f0746f1388d440e175d20ba4230a', class: `${this.elementClassName}__separator` }, ":"), index.h("div", { key: '1dfb26b32d394101e9a85845d7cb2588c7c2fc63', class: `${this.elementClassName}__field` }, index.h("label", { key: '06e3318c7cd7cd56bc9b1f2616520af38e22501e', htmlFor: `${this.elementClassName}-minutes`, class: {
186
186
  [`${this.elementClassName}__label`]: true,
187
187
  [`${this.elementClassName}__label--sr-only`]: this.labelsSrOnly
188
- } }, this.labels.minutes), index.h("div", { key: 'afdfa8c592b9b90c62fd1fb77a2494977f4edcd2', class: `${this.elementClassName}__control` }, index.h("button", { key: '06d2051e46aa19299ce8a59fe0d474d26f905ed9', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--increment`, onClick: this.handleMinuteIncrement, disabled: this.disabled, "aria-label": this.labels.incrementMinutes }, index.h("svg", { key: '28e6fda7aeb3246e639c0e5e76853576815c1fd1', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, index.h("polyline", { key: '43df9c8fcfc53ff8ebbd0879abd4d1ebc056b9ba', points: "18 15 12 9 6 15" }))), index.h("input", { key: '6b2eb0ac1dbe34304f349b4780e0ae9553cf955d', id: `${this.elementClassName}-minutes`, type: "number", class: `${this.elementClassName}__input`, value: this.padZero(this.internalMinutes), min: 0, max: 59, onInput: this.handleMinuteChange, disabled: this.disabled, "aria-label": this.labels.minutes }), index.h("button", { key: '65e5c108a5cd0451512a1d6c717d1176092e7efb', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--decrement`, onClick: this.handleMinuteDecrement, disabled: this.disabled, "aria-label": this.labels.decrementMinutes }, index.h("svg", { key: 'fb53625bccc3aef8447e70bf7c7b00bc7df03830', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, index.h("polyline", { key: 'ee6274f6d2035243412e992ceec7ae7aecf8793f', points: "6 9 12 15 18 9" }))))), this.showSeconds && [
189
- index.h("div", { key: '3ee853ccf77f36e4937736a1451eaaaf4aae1ba9', class: `${this.elementClassName}__separator` }, ":"),
190
- index.h("div", { key: 'ea499addc6e546945a9b9c835793c3f7485f1410', class: `${this.elementClassName}__field` }, index.h("label", { key: 'b63a52658e5ddd90615668be5dc2e457e8217cd9', htmlFor: `${this.elementClassName}-seconds`, class: {
188
+ } }, this.labels.minutes), index.h("div", { key: '933a0911a02b79fbcd573e0f0ed942fe1f23b7e8', class: `${this.elementClassName}__control` }, index.h("button", { key: 'e3a124aab9297ae89ed8deafdc1f2e4066ede58b', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--increment`, onClick: this.handleMinuteIncrement, disabled: this.disabled, "aria-label": this.labels.incrementMinutes }, index.h("svg", { key: 'cb33d7fd82b3e9e0293a83c80d0f4c750e381e03', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, index.h("polyline", { key: 'd4fe518f8a5872da32e7093c0e5e6e7f168f7bfe', points: "18 15 12 9 6 15" }))), index.h("input", { key: '74bb5772b8c12697148e68fbf203184e097bfe40', id: `${this.elementClassName}-minutes`, type: "number", class: `${this.elementClassName}__input`, value: this.padZero(this.internalMinutes), min: 0, max: 59, onInput: this.handleMinuteChange, disabled: this.disabled, "aria-label": this.labels.minutes }), index.h("button", { key: 'c93e42de64a96a379405942fd7bcd2e4c9430c77', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--decrement`, onClick: this.handleMinuteDecrement, disabled: this.disabled, "aria-label": this.labels.decrementMinutes }, index.h("svg", { key: '0d9eb6746bf467c2275447ec8d6a63f8b17f63a4', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, index.h("polyline", { key: 'beb0425b60d2277477c6ffb5b72ce89ccd7bed20', points: "6 9 12 15 18 9" }))))), this.showSeconds && [
189
+ index.h("div", { key: 'b686b7c464e70764bb8dcbec246c72bee6fa51b6', class: `${this.elementClassName}__separator` }, ":"),
190
+ index.h("div", { key: '9dadc9f5a410e40775bd5b28144ee62971448680', class: `${this.elementClassName}__field` }, index.h("label", { key: '233e50d7ddf4ea413ee652d20b917081485dbf93', htmlFor: `${this.elementClassName}-seconds`, class: {
191
191
  [`${this.elementClassName}__label`]: true,
192
192
  [`${this.elementClassName}__label--sr-only`]: this.labelsSrOnly
193
- } }, this.labels.seconds), index.h("div", { key: 'b812f8b2f952f7da2bfd20b4e8daf0f346dfd10e', class: `${this.elementClassName}__control` }, index.h("button", { key: 'a62b3ef2176f5ffd75ee32335c86e65d549f2ba4', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--increment`, onClick: this.handleSecondIncrement, disabled: this.disabled, "aria-label": this.labels.incrementSeconds }, index.h("svg", { key: 'd12fd6645379007b36692b1a2de07d8dd33687a4', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, index.h("polyline", { key: 'ef1d5818d98c0c35d7b6317f6ee952d13b0c1d33', points: "18 15 12 9 6 15" }))), index.h("input", { key: '68b25324d43824686b933ad9f83d58eb4d71bb0d', id: `${this.elementClassName}-seconds`, type: "number", class: `${this.elementClassName}__input`, value: this.padZero(this.internalSeconds), min: 0, max: 59, onInput: this.handleSecondChange, disabled: this.disabled, "aria-label": this.labels.seconds }), index.h("button", { key: 'fa0fa372e836f05964a5ccb60ed1e8a235e24d8b', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--decrement`, onClick: this.handleSecondDecrement, disabled: this.disabled, "aria-label": this.labels.decrementSeconds }, index.h("svg", { key: '2af2b80fe0853cc908e4eeccbfa4b99c758df941', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, index.h("polyline", { key: 'b4c2c5729a9c0fd129371a17e23026f975dd296a', points: "6 9 12 15 18 9" })))))
194
- ], this.useTwelveHourFormat && (index.h("div", { key: '6ad19983d00af5cca81dc8753791116e07f98cd1', class: `${this.elementClassName}__period` }, index.h("button", { key: '05817e47857832d21380a425ccf149f9d10a328a', type: "button", class: {
193
+ } }, this.labels.seconds), index.h("div", { key: 'df35e6750eeef49671e6a5f233e00a253459554d', class: `${this.elementClassName}__control` }, index.h("button", { key: '521ba9fa8eb10dbf5981c4bab9687479f7888ac9', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--increment`, onClick: this.handleSecondIncrement, disabled: this.disabled, "aria-label": this.labels.incrementSeconds }, index.h("svg", { key: '84d4ac4697aaf7c9042e301b629a254e4ceffc6a', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, index.h("polyline", { key: '2af46da2a6c4c994ae67c44edb0b4180a6125336', points: "18 15 12 9 6 15" }))), index.h("input", { key: 'bee75b6dd68f723482c295af51250a94df35ab30', id: `${this.elementClassName}-seconds`, type: "number", class: `${this.elementClassName}__input`, value: this.padZero(this.internalSeconds), min: 0, max: 59, onInput: this.handleSecondChange, disabled: this.disabled, "aria-label": this.labels.seconds }), index.h("button", { key: 'fe1288605003497b92e739f4cec01f160e5a161a', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--decrement`, onClick: this.handleSecondDecrement, disabled: this.disabled, "aria-label": this.labels.decrementSeconds }, index.h("svg", { key: 'ca3a8aa73620bc12095f4c6c9bdfd2c33901a6ff', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, index.h("polyline", { key: '3b68faee709705c929791e9cc7f9e24738f035a1', points: "6 9 12 15 18 9" })))))
194
+ ], this.useTwelveHourFormat && (index.h("div", { key: '13f65cc5b94a8c498fd233bc72cbd3c9977c7541', class: `${this.elementClassName}__period` }, index.h("button", { key: '3d854b9b5aee10039b38af52513f12cf68e4c657', type: "button", class: {
195
195
  [`${this.elementClassName}__period-button`]: true,
196
196
  [`${this.elementClassName}__period-button--active`]: this.period === "AM"
197
- }, onClick: () => this.handlePeriodChange("AM"), disabled: this.disabled, "aria-label": this.labels.am, "aria-pressed": this.period === "AM" }, this.labels.am), index.h("button", { key: '7cff09015ab14acb9d40bd8a5d2f249f84d763b8', type: "button", class: {
197
+ }, onClick: () => this.handlePeriodChange("AM"), disabled: this.disabled, "aria-label": this.labels.am, "aria-pressed": this.period === "AM" }, this.labels.am), index.h("button", { key: 'de12f50f898625cbd5b6afb65e2f396441ab5cf0', type: "button", class: {
198
198
  [`${this.elementClassName}__period-button`]: true,
199
199
  [`${this.elementClassName}__period-button--active`]: this.period === "PM"
200
200
  }, onClick: () => this.handlePeriodChange("PM"), disabled: this.disabled, "aria-label": this.labels.pm, "aria-pressed": this.period === "PM" }, this.labels.pm))))));
@@ -35,9 +35,10 @@ const defaultLabels = {
35
35
  disabledDateError: `Please choose an available date`,
36
36
  to: "to",
37
37
  startDate: "Start date",
38
+ yearSelect: "Select year",
38
39
  timeLabel: "Time"
39
40
  };
40
- const InclusiveTimes = class {
41
+ const TabworthyTimes = class {
41
42
  constructor(hostRef) {
42
43
  index.registerInstance(this, hostRef);
43
44
  this.selectDateTime = index.createEvent(this, "selectDateTime", 7);
@@ -151,8 +152,13 @@ const InclusiveTimes = class {
151
152
  };
152
153
  this.handleInputChange = (event) => {
153
154
  const value = event.target.value;
154
- // Try to parse the input value as a datetime
155
- const parsed = customParseFormat.dayjs(value);
155
+ // Try to parse the input value using the component's format first (strict mode)
156
+ // This prevents dayjs from misinterpreting date formats (e.g., DD/MM/YYYY as MM/DD/YYYY)
157
+ let parsed = customParseFormat.dayjs(value, this.format, true);
158
+ // Fall back to loose parsing if strict format doesn't match
159
+ if (!parsed.isValid()) {
160
+ parsed = customParseFormat.dayjs(value);
161
+ }
156
162
  if (parsed.isValid()) {
157
163
  this.selectedHours = parsed.hour();
158
164
  this.selectedMinutes = parsed.minute();
@@ -272,10 +278,10 @@ const InclusiveTimes = class {
272
278
  }
273
279
  render() {
274
280
  var _a;
275
- return (index.h(index.Host, { key: '03aaff051aa6af4a7606b64056336c4f597ffaeb', class: this.elementClassName, "has-error": this.errorState, disabled: this.disabledState }, index.h("label", { key: 'd05264d3b32741ccfeca0be4473f9323b4934071', htmlFor: `${this.id}-input`, class: this.getClassName("label") }, this.label), index.h("div", { key: '7a4306a4863ffffe35a0d33c80ebfc19298c2182', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, index.h("input", { key: '03080dc8619d396347b831b307c8fa9070434b35', id: `${this.id}-input`, ref: (r) => (this.inputRef = r), type: "text", class: {
281
+ return (index.h(index.Host, { key: '16801875a7a022afd2db87e489ff69133e27773d', class: this.elementClassName, "has-error": this.errorState, disabled: this.disabledState }, index.h("label", { key: 'f0aa269a9677dbda54d31ea0fa32e69f6ef19114', htmlFor: `${this.id}-input`, class: this.getClassName("label") }, this.label), index.h("div", { key: 'a3fa49e1735adb2e32d0dbd4b5fe21d1b1e9ba9c', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, index.h("input", { key: 'dab0c8ff6a9f941b1e3c8a801b2e0de8262beda2', id: `${this.id}-input`, ref: (r) => (this.inputRef = r), type: "text", class: {
276
282
  [this.getClassName("input")]: true,
277
283
  [this.inputClass]: !!this.inputClass
278
- }, 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: 'cc384691007bc6eb4044098ab79ba38809375de7', type: "button", onClick: this.handleCalendarButtonClick, class: this.getClassName("calendar-button"), disabled: this.disabledState }, this.calendarButtonContent ? (index.h("span", { innerHTML: this.calendarButtonContent })) : (this.timesLabels.openCalendar)))), index.h("tabworthy-dates-modal", { key: '14290fe8ca21e0027c384bd56d913d2cdda55380', label: this.timesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
284
+ }, 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: 'c072cedad6d4567b3688e434a7173441b4a11026', type: "button", onClick: this.handleCalendarButtonClick, class: this.getClassName("calendar-button"), disabled: this.disabledState }, this.calendarButtonContent ? (index.h("span", { innerHTML: this.calendarButtonContent })) : (this.timesLabels.openCalendar)))), index.h("tabworthy-dates-modal", { key: '4a4e37ff7f76d51389153b52d281fdc1a8f861d5', label: this.timesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
279
285
  if (this.pickerRef) {
280
286
  this.pickerRef.modalIsOpen = true;
281
287
  }
@@ -283,7 +289,7 @@ const InclusiveTimes = class {
283
289
  if (this.pickerRef) {
284
290
  this.pickerRef.modalIsOpen = false;
285
291
  }
286
- }, inline: this.inline, appendTo: this.appendTo }, index.h("div", { key: '83c1e85f688a0ff213872e54a96702429f00869b', class: this.getClassName("picker-container") }, index.h("tabworthy-dates-calendar", { key: '6afcc9ddb6fcedf07127c933ad1ed192a4c88eaf', 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 }, index.h("div", { key: '7e47f4b63a85d6431f8019a8725acbf79fb44d67', slot: "after-calendar", class: this.getClassName("time-section") }, index.h("hr", { key: '8b72711de0422f1b1848bb22a72ed363b1c63ebb', class: this.getClassName("divider") }), index.h("tabworthy-times-picker", { key: '29f47e57c4f3f94232345bbe602d0278b5f53fa4', hours: this.selectedHours, minutes: this.selectedMinutes, seconds: this.selectedSeconds, showSeconds: this.showSeconds, useTwelveHourFormat: this.useTwelveHourFormat, disabled: this.disabledState, onTimeChanged: this.handleTimeChange, labels: this.timesPickerLabels }))))), this.errorState && (index.h("div", { key: 'aa6f743bc35538f6271a45bb2564e89164e5a909', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
292
+ }, inline: this.inline, appendTo: this.appendTo }, index.h("div", { key: '9b03ffb9df5a041d802647d66af53eafec187c7f', class: this.getClassName("picker-container") }, index.h("tabworthy-dates-calendar", { key: '0caab550470b253542d93e29ddadcde85fe7caad', 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 }, index.h("div", { key: '655aa9bb049f76dba44f18684fec6550ab8aac22', slot: "after-calendar", class: this.getClassName("time-section") }, index.h("hr", { key: 'b695207bda87835f57240f72bea88dc57470c170', class: this.getClassName("divider") }), index.h("tabworthy-times-picker", { key: 'f17bf595f1df723dc04d87ef86a5f5a6152b506a', hours: this.selectedHours, minutes: this.selectedMinutes, seconds: this.selectedSeconds, showSeconds: this.showSeconds, useTwelveHourFormat: this.useTwelveHourFormat, disabled: this.disabledState, onTimeChanged: this.handleTimeChange, labels: this.timesPickerLabels }))))), this.errorState && (index.h("div", { key: '8bf64ca388076cd5f1ad73b763993dbc7736b08c', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
287
293
  }
288
294
  get el() { return index.getElement(this); }
289
295
  static get watchers() { return {
@@ -299,4 +305,4 @@ const InclusiveTimes = class {
299
305
  }; }
300
306
  };
301
307
 
302
- exports.tabworthy_times = InclusiveTimes;
308
+ exports.tabworthy_times = TabworthyTimes;
@@ -12,6 +12,7 @@ const defaultLabels = {
12
12
  invalidDateError: "We could not find a matching date",
13
13
  minDateError: `Please fill in a date after `,
14
14
  maxDateError: `Please fill in a date before `,
15
+ yearSelect: "Select year",
15
16
  rangeOutOfBoundsError: `Please enter a valid range of dates`,
16
17
  disabledDateError: `Please choose an available date`,
17
18
  to: "to",
@@ -22,6 +23,8 @@ export class TabworthyDates {
22
23
  constructor() {
23
24
  // Enable or disable range mode
24
25
  this.range = false;
26
+ // Enable year-only mode (shows only year input, no calendar)
27
+ this.yearOnly = false;
25
28
  // A label for the text field
26
29
  this.label = this.range
27
30
  ? "Choose a date range (any way you like)"
@@ -131,6 +134,23 @@ export class TabworthyDates {
131
134
  var _a;
132
135
  (_a = this.changeYear) === null || _a === void 0 ? void 0 : _a.emit(yearDetail);
133
136
  };
137
+ this.handleYearInputChange = (event) => {
138
+ var _a;
139
+ const year = +event.target.value;
140
+ if (!year || isNaN(year))
141
+ return;
142
+ const minYear = this.minDate ? parseInt(this.minDate.slice(0, 4), 10) : 1;
143
+ const maxYear = this.maxDate
144
+ ? parseInt(this.maxDate.slice(0, 4), 10)
145
+ : 9999;
146
+ if (year < minYear || year > maxYear)
147
+ return;
148
+ const newValue = dayjs().year(year).startOf("year").format(this.format);
149
+ this.internalValue = newValue;
150
+ this.value = newValue;
151
+ (_a = this.changeYear) === null || _a === void 0 ? void 0 : _a.emit({ year });
152
+ this.selectDate.emit(newValue);
153
+ };
134
154
  this.handleRangeChange = async (value) => {
135
155
  this.errorState = false;
136
156
  if (value.length === 0) {
@@ -443,10 +463,21 @@ export class TabworthyDates {
443
463
  }
444
464
  render() {
445
465
  var _a;
446
- return (h(Host, { key: '7dc37ffe7603f9c65f674910f5e1de3fec6d13f7' }, h("label", { key: '240bdaf77226608e88efc0bf810ed0d08090927a', htmlFor: this.id ? `${this.id}-input` : undefined, class: this.getClassName("label") }, this.label), h("br", { key: 'd37a77330ffabc8b8565c5c058ee4c5ee32e755b' }), h("div", { key: 'db290a3f753694a073ab8dd779b90e06fabe3b25', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, h("input", { key: 'd51dcd7f6abc15bd605a5d8c5b77da97eec76ed8', disabled: this.disabledState || this.disableFreeformInput, id: this.id ? `${this.id}-input` : undefined, type: "text", placeholder: this.placeholder, class: {
466
+ // Year-only mode: show just a year number input
467
+ if (this.yearOnly) {
468
+ const currentYear = this.value
469
+ ? parseInt(String(this.value).slice(0, 4), 10)
470
+ : new Date().getFullYear();
471
+ return (h(Host, null, h("label", { htmlFor: this.id ? `${this.id}-input` : undefined, class: this.getClassName("label") }, this.label), h("br", null), h("div", { class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, h("input", { "aria-label": this.datesLabels.yearSelect, class: {
472
+ [this.getClassName("year-select")]: true,
473
+ [this.getClassName("input")]: true,
474
+ [this.inputClass]: !!this.inputClass
475
+ }, "aria-disabled": this.disabledState, disabled: this.disabledState, max: this.maxDate ? this.maxDate.slice(0, 4) : 9999, min: this.minDate ? this.minDate.slice(0, 4) : 1, name: "year", id: this.id ? `${this.id}-input` : undefined, onChange: this.handleYearInputChange, type: "number", value: currentYear, "aria-describedby": this.errorState ? `${this.id}-error` : undefined, "aria-invalid": this.errorState })), this.errorState && (h("div", { class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
476
+ }
477
+ return (h(Host, null, h("label", { htmlFor: this.id ? `${this.id}-input` : undefined, class: this.getClassName("label") }, this.label), h("br", null), h("div", { class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, h("input", { disabled: this.disabledState || this.disableFreeformInput, id: this.id ? `${this.id}-input` : undefined, type: "text", placeholder: this.placeholder, class: {
447
478
  [this.getClassName("input")]: true,
448
479
  [this.inputClass]: !!this.inputClass
449
- }, ref: (r) => (this.inputRef = r), onChange: this.handleChange, onFocus: () => this.formatInput(false), onBlur: () => this.formatInput(true, false), "aria-describedby": this.errorState ? `${this.id}-error` : undefined, "aria-invalid": this.errorState }), !this.inline && (h("button", { key: '41527ddd0ae71c44a645c887cd395957dc22252c', type: "button", onClick: this.handleCalendarButtonClick, class: this.getClassName("calendar-button"), disabled: this.disabledState }, this.calendarButtonContent ? (h("span", { innerHTML: this.calendarButtonContent })) : (this.datesLabels.openCalendar)))), h("tabworthy-dates-modal", { key: '9356c01fadb2450a04664dcd4c4b3a1fce278394', label: this.datesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
480
+ }, ref: (r) => (this.inputRef = r), onChange: this.handleChange, onFocus: () => this.formatInput(false), onBlur: () => this.formatInput(true, false), "aria-describedby": this.errorState ? `${this.id}-error` : undefined, "aria-invalid": this.errorState }), !this.inline && (h("button", { type: "button", onClick: this.handleCalendarButtonClick, class: this.getClassName("calendar-button"), disabled: this.disabledState }, this.calendarButtonContent ? (h("span", { innerHTML: this.calendarButtonContent })) : (this.datesLabels.openCalendar)))), h("tabworthy-dates-modal", { label: this.datesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
450
481
  if (!this.pickerRef)
451
482
  return;
452
483
  this.pickerRef.modalIsOpen = true;
@@ -454,11 +485,11 @@ export class TabworthyDates {
454
485
  if (!this.pickerRef)
455
486
  return;
456
487
  this.pickerRef.modalIsOpen = false;
457
- }, inline: this.inline, appendTo: this.appendTo }, h("tabworthy-dates-calendar", { key: '371f6b079a3dc3d42d84e0ce0d301a4121747130', 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 ? this.datesCalendarLabels : undefined, ref: (el) => (this.pickerRef = el), startDate: this.startDate, firstDayOfWeek: this.firstDayOfWeek, showHiddenTitle: true, disabled: this.disabledState, showMonthStepper: this.showMonthStepper, showYearStepper: this.showYearStepper, showClearButton: this.showClearButton, showCloseButton: this.showCloseButton, showKeyboardHint: this.showKeyboardHint, showTodayButton: this.showTodayButton, disableDate: this.disableDate, minDate: this.minDate, maxDate: this.maxDate, inline: this.inline })), this.showQuickButtons &&
488
+ }, inline: this.inline, appendTo: this.appendTo }, h("tabworthy-dates-calendar", { 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 ? this.datesCalendarLabels : undefined, ref: (el) => (this.pickerRef = el), startDate: this.startDate, firstDayOfWeek: this.firstDayOfWeek, showHiddenTitle: true, disabled: this.disabledState, showMonthStepper: this.showMonthStepper, showYearStepper: this.showYearStepper, showClearButton: this.showClearButton, showCloseButton: this.showCloseButton, showKeyboardHint: this.showKeyboardHint, showTodayButton: this.showTodayButton, disableDate: this.disableDate, minDate: this.minDate, maxDate: this.maxDate, inline: this.inline })), this.showQuickButtons &&
458
489
  ((_a = this.quickButtons) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
459
- this.chronoSupportedLocale && (h("div", { key: 'afadda0a46a2e3224c940d27ba884edc45487bf3', class: this.getClassName("quick-group"), role: "group", "aria-label": this.datesLabels.quickSelection }, this.quickButtons.map((buttonText) => {
490
+ this.chronoSupportedLocale && (h("div", { class: this.getClassName("quick-group"), role: "group", "aria-label": this.datesLabels.quickSelection }, this.quickButtons.map((buttonText) => {
460
491
  return (h("button", { class: this.getClassName("quick-button"), onClick: this.handleQuickButtonClick, disabled: this.disabledState, type: "button" }, buttonText));
461
- }))), this.errorState && (h("div", { key: '7caa060a5da1846323cc161cbf9cff4b5275b90f', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
492
+ }))), this.errorState && (h("div", { class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
462
493
  }
463
494
  static get is() { return "tabworthy-dates"; }
464
495
  static get encapsulation() { return "scoped"; }
@@ -532,6 +563,26 @@ export class TabworthyDates {
532
563
  "attribute": "range",
533
564
  "defaultValue": "false"
534
565
  },
566
+ "yearOnly": {
567
+ "type": "boolean",
568
+ "mutable": false,
569
+ "complexType": {
570
+ "original": "boolean",
571
+ "resolved": "boolean",
572
+ "references": {}
573
+ },
574
+ "required": false,
575
+ "optional": true,
576
+ "docs": {
577
+ "tags": [],
578
+ "text": ""
579
+ },
580
+ "getter": false,
581
+ "setter": false,
582
+ "reflect": false,
583
+ "attribute": "year-only",
584
+ "defaultValue": "false"
585
+ },
535
586
  "label": {
536
587
  "type": "string",
537
588
  "mutable": false,
@@ -17,7 +17,7 @@ const defaultLabels = {
17
17
  chooseAsStartDate: "choose as start date",
18
18
  chooseAsEndDate: "choose as end date"
19
19
  };
20
- export class InclusiveDatesCalendar {
20
+ export class TabworthyDatesCalendar {
21
21
  constructor() {
22
22
  this.disabled = false;
23
23
  this.modalIsOpen = false;
@@ -5,7 +5,7 @@ import { createPopper } from "@popperjs/core";
5
5
  /**
6
6
  * @slot slot - The dialog content
7
7
  */
8
- export class InclusiveDatesModal {
8
+ export class TabworthyDatesModal {
9
9
  constructor() {
10
10
  this.inline = false;
11
11
  /** Preferred placement of the dropdown (Popper.js placement) */
@@ -190,7 +190,7 @@ export class InclusiveDatesModal {
190
190
  }
191
191
  }
192
192
  render() {
193
- return (h(Host, { key: 'bf48e957915fbc2975d7ba2f2ca6844e2c14270e', showing: this.showing, ref: (r) => r && (this.el = r) }, !this.inline && this.showing && (h("div", { key: '87fd577d1289e3c6f888b614d127e729003b1fe6', part: "body", ref: (r) => {
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) => {
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 InclusiveDatesModal {
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: '5f994a20957137ce8e95d17191cb9436ae4c2315' }, h("div", { key: '6ab5e6990d04e9e6b0905971b52b33410608759e', part: "content" }, h("slot", { key: '9d99fbd7f47ee014277fe4493f86a90b3929103c' }))))), this.inline && (h("div", { key: 'fc1766214d1727cc2865a17da6661f06bd67429f', part: "content" }, h("slot", { key: '28d41dba4356ce3bd0aa7db06943296de4372695' })))));
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' })))));
211
211
  }
212
212
  static get is() { return "tabworthy-dates-modal"; }
213
213
  static get encapsulation() { return "shadow"; }
@@ -16,9 +16,10 @@ const defaultLabels = {
16
16
  disabledDateError: `Please choose an available date`,
17
17
  to: "to",
18
18
  startDate: "Start date",
19
+ yearSelect: "Select year",
19
20
  timeLabel: "Time"
20
21
  };
21
- export class InclusiveTimes {
22
+ export class TabworthyTimes {
22
23
  constructor() {
23
24
  // Enable or disable range mode
24
25
  this.range = false;
@@ -128,8 +129,13 @@ export class InclusiveTimes {
128
129
  };
129
130
  this.handleInputChange = (event) => {
130
131
  const value = event.target.value;
131
- // Try to parse the input value as a datetime
132
- const parsed = dayjs(value);
132
+ // Try to parse the input value using the component's format first (strict mode)
133
+ // This prevents dayjs from misinterpreting date formats (e.g., DD/MM/YYYY as MM/DD/YYYY)
134
+ let parsed = dayjs(value, this.format, true);
135
+ // Fall back to loose parsing if strict format doesn't match
136
+ if (!parsed.isValid()) {
137
+ parsed = dayjs(value);
138
+ }
133
139
  if (parsed.isValid()) {
134
140
  this.selectedHours = parsed.hour();
135
141
  this.selectedMinutes = parsed.minute();
@@ -249,10 +255,10 @@ export class InclusiveTimes {
249
255
  }
250
256
  render() {
251
257
  var _a;
252
- return (h(Host, { key: '03aaff051aa6af4a7606b64056336c4f597ffaeb', class: this.elementClassName, "has-error": this.errorState, disabled: this.disabledState }, h("label", { key: 'd05264d3b32741ccfeca0be4473f9323b4934071', htmlFor: `${this.id}-input`, class: this.getClassName("label") }, this.label), h("div", { key: '7a4306a4863ffffe35a0d33c80ebfc19298c2182', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, h("input", { key: '03080dc8619d396347b831b307c8fa9070434b35', id: `${this.id}-input`, ref: (r) => (this.inputRef = r), type: "text", class: {
258
+ return (h(Host, { key: '16801875a7a022afd2db87e489ff69133e27773d', class: this.elementClassName, "has-error": this.errorState, disabled: this.disabledState }, h("label", { key: 'f0aa269a9677dbda54d31ea0fa32e69f6ef19114', htmlFor: `${this.id}-input`, class: this.getClassName("label") }, this.label), h("div", { key: 'a3fa49e1735adb2e32d0dbd4b5fe21d1b1e9ba9c', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, h("input", { key: 'dab0c8ff6a9f941b1e3c8a801b2e0de8262beda2', id: `${this.id}-input`, ref: (r) => (this.inputRef = r), type: "text", class: {
253
259
  [this.getClassName("input")]: true,
254
260
  [this.inputClass]: !!this.inputClass
255
- }, 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: 'cc384691007bc6eb4044098ab79ba38809375de7', type: "button", onClick: this.handleCalendarButtonClick, class: this.getClassName("calendar-button"), disabled: this.disabledState }, this.calendarButtonContent ? (h("span", { innerHTML: this.calendarButtonContent })) : (this.timesLabels.openCalendar)))), h("tabworthy-dates-modal", { key: '14290fe8ca21e0027c384bd56d913d2cdda55380', label: this.timesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
261
+ }, 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: 'c072cedad6d4567b3688e434a7173441b4a11026', type: "button", onClick: this.handleCalendarButtonClick, class: this.getClassName("calendar-button"), disabled: this.disabledState }, this.calendarButtonContent ? (h("span", { innerHTML: this.calendarButtonContent })) : (this.timesLabels.openCalendar)))), h("tabworthy-dates-modal", { key: '4a4e37ff7f76d51389153b52d281fdc1a8f861d5', label: this.timesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
256
262
  if (this.pickerRef) {
257
263
  this.pickerRef.modalIsOpen = true;
258
264
  }
@@ -260,7 +266,7 @@ export class InclusiveTimes {
260
266
  if (this.pickerRef) {
261
267
  this.pickerRef.modalIsOpen = false;
262
268
  }
263
- }, inline: this.inline, appendTo: this.appendTo }, h("div", { key: '83c1e85f688a0ff213872e54a96702429f00869b', class: this.getClassName("picker-container") }, h("tabworthy-dates-calendar", { key: '6afcc9ddb6fcedf07127c933ad1ed192a4c88eaf', 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 }, h("div", { key: '7e47f4b63a85d6431f8019a8725acbf79fb44d67', slot: "after-calendar", class: this.getClassName("time-section") }, h("hr", { key: '8b72711de0422f1b1848bb22a72ed363b1c63ebb', class: this.getClassName("divider") }), h("tabworthy-times-picker", { key: '29f47e57c4f3f94232345bbe602d0278b5f53fa4', hours: this.selectedHours, minutes: this.selectedMinutes, seconds: this.selectedSeconds, showSeconds: this.showSeconds, useTwelveHourFormat: this.useTwelveHourFormat, disabled: this.disabledState, onTimeChanged: this.handleTimeChange, labels: this.timesPickerLabels }))))), this.errorState && (h("div", { key: 'aa6f743bc35538f6271a45bb2564e89164e5a909', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
269
+ }, inline: this.inline, appendTo: this.appendTo }, h("div", { key: '9b03ffb9df5a041d802647d66af53eafec187c7f', class: this.getClassName("picker-container") }, h("tabworthy-dates-calendar", { key: '0caab550470b253542d93e29ddadcde85fe7caad', 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 }, h("div", { key: '655aa9bb049f76dba44f18684fec6550ab8aac22', slot: "after-calendar", class: this.getClassName("time-section") }, h("hr", { key: 'b695207bda87835f57240f72bea88dc57470c170', class: this.getClassName("divider") }), h("tabworthy-times-picker", { key: 'f17bf595f1df723dc04d87ef86a5f5a6152b506a', hours: this.selectedHours, minutes: this.selectedMinutes, seconds: this.selectedSeconds, showSeconds: this.showSeconds, useTwelveHourFormat: this.useTwelveHourFormat, disabled: this.disabledState, onTimeChanged: this.handleTimeChange, labels: this.timesPickerLabels }))))), this.errorState && (h("div", { key: '8bf64ca388076cd5f1ad73b763993dbc7736b08c', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
264
270
  }
265
271
  static get is() { return "tabworthy-times"; }
266
272
  static get encapsulation() { return "scoped"; }