@tabworthy/components 0.9.1 → 0.10.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 (39) 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 +19 -9
  4. package/dist/cjs/tabworthy-dates.cjs.entry.js +7 -5
  5. package/dist/cjs/tabworthy-times-picker.cjs.entry.js +6 -6
  6. package/dist/cjs/tabworthy-times.cjs.entry.js +5 -4
  7. package/dist/collection/components/tabworthy-dates/tabworthy-dates.js +28 -6
  8. package/dist/collection/components/tabworthy-dates-calendar/tabworthy-dates-calendar.js +71 -8
  9. package/dist/collection/components/tabworthy-modal/tabworthy-dates-modal.js +2 -2
  10. package/dist/collection/components/tabworthy-times/tabworthy-times.js +50 -5
  11. package/dist/collection/components/tabworthy-times-picker/tabworthy-times-picker.js +9 -9
  12. package/dist/components/p-CGo5md1l.js +1 -0
  13. package/dist/components/{p-B9fGfjA-.js → p-D0CX07Ep.js} +1 -1
  14. package/dist/components/{p-B9YA6avR.js → p-DDp2dGlo.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 +19 -9
  23. package/dist/esm/tabworthy-dates.entry.js +7 -5
  24. package/dist/esm/tabworthy-times-picker.entry.js +6 -6
  25. package/dist/esm/tabworthy-times.entry.js +5 -4
  26. package/dist/tabworthy-components/p-327d119d.entry.js +1 -0
  27. package/dist/tabworthy-components/p-42e77ac7.entry.js +1 -0
  28. package/dist/tabworthy-components/{p-4eec41e5.entry.js → p-a67ad7af.entry.js} +1 -1
  29. package/dist/tabworthy-components/{p-0e77d058.entry.js → p-d4a7458b.entry.js} +1 -1
  30. package/dist/tabworthy-components/tabworthy-components.esm.js +1 -1
  31. package/dist/types/components/tabworthy-dates/tabworthy-dates.d.ts +1 -0
  32. package/dist/types/components/tabworthy-dates-calendar/tabworthy-dates-calendar.d.ts +5 -0
  33. package/dist/types/components/tabworthy-times/tabworthy-times.d.ts +3 -0
  34. package/dist/types/components/tabworthy-times-picker/tabworthy-times-picker.d.ts +3 -3
  35. package/dist/types/components.d.ts +40 -4
  36. package/package.json +1 -1
  37. package/dist/components/p-B8sG1vGD.js +0 -1
  38. package/dist/tabworthy-components/p-ee41beed.entry.js +0 -1
  39. package/dist/tabworthy-components/p-fdb3b911.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],"useTwelveHourFormat":[4,"use-twelve-hour-format"],"labels":[16],"labelsSrOnly":[4,"labels-sr-only"],"disabled":[4],"elementClassName":[1,"element-class-name"],"internalHours":[32],"internalMinutes":[32],"period":[32]},null,{"hours":[{"watchHours":0}],"minutes":[{"watchMinutes":0}]}]]],["tabworthy-dates-calendar_2.cjs",[[262,"tabworthy-dates-calendar",{"clearButtonContent":[1,"clear-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"],"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"],"timesLabels":[16],"datesCalendarLabels":[16],"inline":[4],"hasError":[1028,"has-error"],"showYearStepper":[4,"show-year-stepper"],"showMonthStepper":[4,"show-month-stepper"],"showClearButton":[4,"show-clear-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],"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"],"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],"useTwelveHourFormat":[4,"use-twelve-hour-format"],"labels":[16],"labelsSrOnly":[4,"labels-sr-only"],"disabled":[4],"elementClassName":[1,"element-class-name"],"internalHours":[32],"internalMinutes":[32],"period":[32]},null,{"hours":[{"watchHours":0}],"minutes":[{"watchMinutes":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"],"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],"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);
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],"useTwelveHourFormat":[4,"use-twelve-hour-format"],"labels":[16],"labelsSrOnly":[4,"labels-sr-only"],"disabled":[4],"elementClassName":[1,"element-class-name"],"internalHours":[32],"internalMinutes":[32],"period":[32]},null,{"hours":[{"watchHours":0}],"minutes":[{"watchMinutes":0}]}]]],["tabworthy-dates-calendar_2.cjs",[[262,"tabworthy-dates-calendar",{"clearButtonContent":[1,"clear-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"],"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"],"timesLabels":[16],"datesCalendarLabels":[16],"inline":[4],"hasError":[1028,"has-error"],"showYearStepper":[4,"show-year-stepper"],"showMonthStepper":[4,"show-month-stepper"],"showClearButton":[4,"show-clear-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],"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"],"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],"useTwelveHourFormat":[4,"use-twelve-hour-format"],"labels":[16],"labelsSrOnly":[4,"labels-sr-only"],"disabled":[4],"elementClassName":[1,"element-class-name"],"internalHours":[32],"internalMinutes":[32],"period":[32]},null,{"hours":[{"watchHours":0}],"minutes":[{"watchMinutes":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"],"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],"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);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -7,6 +7,7 @@ const tabworthyDatesCalendarCss = () => `.visually-hidden.sc-tabworthy-dates-cal
7
7
 
8
8
  const defaultLabels = {
9
9
  clearButton: "Clear value",
10
+ closeButton: "Close",
10
11
  monthSelect: "Select month",
11
12
  nextMonthButton: "Next month",
12
13
  nextYearButton: "Next year",
@@ -26,6 +27,7 @@ const InclusiveDatesCalendar = class {
26
27
  this.selectDate = index.createEvent(this, "selectDate", 3);
27
28
  this.changeMonth = index.createEvent(this, "changeMonth", 3);
28
29
  this.changeYear = index.createEvent(this, "changeYear", 3);
30
+ this.requestClose = index.createEvent(this, "requestClose", 3);
29
31
  this.disabled = false;
30
32
  this.modalIsOpen = false;
31
33
  this.disableDate = () => false;
@@ -36,6 +38,7 @@ const InclusiveDatesCalendar = class {
36
38
  this.locale = (navigator === null || navigator === void 0 ? void 0 : navigator.language) || "en-US";
37
39
  this.inline = false;
38
40
  this.showClearButton = false;
41
+ this.showCloseButton = false;
39
42
  this.showMonthStepper = true;
40
43
  this.showTodayButton = true;
41
44
  this.showYearStepper = false;
@@ -160,6 +163,10 @@ const InclusiveDatesCalendar = class {
160
163
  this.onMouseLeave = () => {
161
164
  this.hoveredDate = undefined;
162
165
  };
166
+ this.close = () => {
167
+ var _a;
168
+ (_a = this.requestClose) === null || _a === void 0 ? void 0 : _a.emit();
169
+ };
163
170
  }
164
171
  componentWillLoad() {
165
172
  this.init();
@@ -299,7 +306,10 @@ const InclusiveDatesCalendar = class {
299
306
  }
300
307
  render() {
301
308
  var _a;
302
- const showFooter = this.showTodayButton || this.showClearButton || this.showKeyboardHint;
309
+ const showFooter = this.showTodayButton ||
310
+ this.showClearButton ||
311
+ this.showCloseButton ||
312
+ this.showKeyboardHint;
303
313
  const disabled = {
304
314
  year: {
305
315
  prev: this.disabled ||
@@ -318,15 +328,15 @@ const InclusiveDatesCalendar = class {
318
328
  utils.monthIsDisabled(utils.getNextMonth(this.currentDate).getMonth(), utils.getNextMonth(this.currentDate).getFullYear(), this.minDate, this.maxDate)
319
329
  }
320
330
  };
321
- return (index.h(index.Host, { key: 'cc8676fdeec05b5635c367353e7bb1b8c997dedd' }, index.h("div", { key: '4a4efc949f954772a55dad16e507a938b0308130', class: {
331
+ return (index.h(index.Host, { key: 'abba9db6dddb2eda2732272a4965549e9efbcaa3' }, index.h("div", { key: '07e733d1bc665da354ad45f3441bbfe6f575284c', class: {
322
332
  [`${this.getClassName()}-wrapper`]: true,
323
333
  [`${this.getClassName()}-wrapper--inline`]: this.inline
324
- } }, index.h("div", { key: 'de0afeccacba5e76162a4d22041f3b65983e77fe', class: {
334
+ } }, index.h("div", { key: '7cf7cda0096034917e4dc406b14b992f4fd59046', class: {
325
335
  [this.getClassName()]: true,
326
336
  [`${this.getClassName()}--disabled`]: this.disabled
327
- } }, index.h("div", { key: 'e8ed89a15cd32f629e559c9e9922c97816aff70c', class: this.getClassName("header") }, this.showHiddenTitle && (index.h("span", { key: '8a922cf4df9ee3f87a673cfaf2d04fe539305bbe', "aria-atomic": "true", "aria-live": "polite", class: "visually-hidden" }, this.getTitle())), this.showYearStepper && (index.h("button", { key: '225e73d3b12646781661d28057f4d9611e624c69', "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: 'e0fd3f0d41f596b450642eb9c27c5958feb7ba30', 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: '85735b11b068015e671f550639ded6193dfbab28', points: "11 17 6 12 11 7" }), index.h("polyline", { key: '19c3ffcbb7b98261be4b309a2bbbaa826ea1ad73', points: "18 17 13 12 18 7" })))), this.showMonthStepper && (index.h("button", { key: '4b687ad0f92198cb9a324b8c0d380ae0a31f2346', "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: 'a1931a36fddf8a84cc8f4d367b34b8b59d03cc09', 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: 'e053a2405fb992e9eaeddf114b8da460b41ade13', points: "15 18 9 12 15 6" })))), index.h("span", { key: 'fbf8feee129211cf10f611c879288d76f7456c9d', class: this.getClassName("current-month") }, index.h("select", { key: 'ca2826280a1ab8065551fa908d40f96cc04d5464', "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) => {
337
+ } }, index.h("div", { key: '6286dfb1d637d48b4338247309a4bd07ba9bcc47', class: this.getClassName("header") }, this.showHiddenTitle && (index.h("span", { key: '7ef10a2c9b56de6dd6dbebf42aa107cb5402837a', "aria-atomic": "true", "aria-live": "polite", class: "visually-hidden" }, this.getTitle())), this.showYearStepper && (index.h("button", { key: 'f82e1314c5b696a3d34b9c131d187b9814c1a3e7', "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: '8fb0e89ba5da9a5f22c4030f401512d907e93676', 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: '063019349c518195eb0b59177c39c1475d9cdaf0', points: "11 17 6 12 11 7" }), index.h("polyline", { key: 'e9a7e1ce55ed818788de12ea064ddc9030cf82a3', points: "18 17 13 12 18 7" })))), this.showMonthStepper && (index.h("button", { key: 'b4dafea59ef7d7ef705df7aaa95198f7236aac77', "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: '50aac77c0a53acef931af7ba1ef934e52f4a6e1f', 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: 'a7cebfbcc0be9e66815f3a69a13501d8ba1bbb83', points: "15 18 9 12 15 6" })))), index.h("span", { key: 'ec9add8bd9f35bccbf6c4c47510cd90be4ed7175', class: this.getClassName("current-month") }, index.h("select", { key: 'c36f648d42e8ee62e1a3b2d4bbeeab013dc871d5', "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) => {
328
338
  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));
329
- })), index.h("input", { key: 'b3f5b2dabeb38734d3602ac8aaff56a7d5a49393', "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: '9312dc20b70fbda5bd86f25b230665a8f7f75386', "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: '82f1f31e919a2e316941824c0b0d59c5a1852f73', 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: '3365487b15f4149b5ae035ca1f1364396c133ef0', points: "9 18 15 12 9 6" })))), this.showYearStepper && (index.h("button", { key: 'e83b33e034ee0fbd49e8aab90e1716ada40d2f19', "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: '32b65eb085653d5c62e60262fc87f59b6d105e57', 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: 'eaa98641ba48a322fd7b3ac953d13104bb63aad3', points: "13 17 18 12 13 7" }), index.h("polyline", { key: '89b7de7ec2e24a01a808e885ac68a11c3779f9c2', points: "6 17 11 12 6 7" }))))), index.h("div", { key: 'a21c8a94b1ae0e5b66074d2ca956afac456f366f', class: this.getClassName("body") }, index.h("table", { key: '2968d8355122e3eb18de35b4c72d2404794f62e6', class: this.getClassName("calendar"), onKeyDown: this.onKeyDown, role: "grid", "aria-label": this.getTitle() }, index.h("thead", { key: '568a00357a3e64e692c80d90739c560513239c1d', class: this.getClassName("calendar-header") }, index.h("tr", { key: '4e80bf075ad630237b5ea156267a0c0d9d4f0423', 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: '26dfbb76ab92d065ab5f38b7135fced7738ca4a7' }, this.getCalendarRows().map((calendarRow) => {
339
+ })), index.h("input", { key: '547174f2f8fe0248589a40a46aace91171f08ad7', "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: '458fd7350775325c43895f9896b151f8d490a725', "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: '3b6c5f32830d6983e2e59e89f8986012533f1b0f', 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: 'b2dde5779945c6c7f6bd686b05874bc62f34c817', points: "9 18 15 12 9 6" })))), this.showYearStepper && (index.h("button", { key: '0f7ea0b890e11d42634c8751cca659caf788ca67', "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: 'a1f3037455d82547829d3f3afc15f6ea773277b4', 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: 'ee5bfeadf5b183cba36c15ce6a5c30654ff98fe2', points: "13 17 18 12 13 7" }), index.h("polyline", { key: '02966a045d9496e161bbd4a40e103990b0e146a9', points: "6 17 11 12 6 7" }))))), index.h("div", { key: 'e588f18d365e6e1f87e1da7033741cb22ebafed7', class: this.getClassName("body") }, index.h("table", { key: '7c6b926b3bc6b832b9fb1aabaac6841eb30cda30', class: this.getClassName("calendar"), onKeyDown: this.onKeyDown, role: "grid", "aria-label": this.getTitle() }, index.h("thead", { key: '4ebbefd8e10e5d83308e84eeafd85c29902275b1', class: this.getClassName("calendar-header") }, index.h("tr", { key: '101788f84e1f2a44a498813024944fe32a7c7388', 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: '4498ab21f627f5f8582db15d5babfc4e84c20b38' }, this.getCalendarRows().map((calendarRow) => {
330
340
  const rowKey = `row-${calendarRow[0].getMonth()}-${calendarRow[0].getDate()}`;
331
341
  return (index.h("tr", { class: this.getClassName("calendar-row"), key: rowKey }, calendarRow.map((day) => {
332
342
  var _a, _b, _c;
@@ -393,8 +403,8 @@ const InclusiveDatesCalendar = class {
393
403
  ? 0
394
404
  : -1 }, index.h(Tag, { "aria-hidden": "true" }, day.getDate()), index.h("span", { class: "visually-hidden" }, getScreenReaderText())));
395
405
  })));
396
- })))), showFooter && (index.h("div", { key: '102ea99b292e7a028692615c68be2e8c5720913c', class: this.getClassName("footer") }, index.h("div", { key: '6e1d52da734e986a9044847edd7ace16460605f2', class: this.getClassName("footer-buttons") }, this.showTodayButton && (index.h("button", { key: '9508eadf9835bea2e1640e6ac622665bd19da4d8', class: this.getClassName("today-button"), disabled: this.disabled, innerHTML: this.todayButtonContent || undefined, onClick: this.showToday, type: "button" }, this.labels.todayButton)), this.showClearButton && (index.h("button", { key: '262b926076309bc44d5b36dd64217196b4d6e8e2', class: this.getClassName("clear-button"), disabled: this.disabled, innerHTML: this.clearButtonContent || undefined, onClick: this.clear, type: "button" }, this.labels.clearButton))), this.showKeyboardHint &&
397
- !window.matchMedia("(pointer: coarse)").matches && (index.h("button", { key: '09c974e2b246f57381e0461dbb27eb83e523812d', type: "button", onClick: () => alert("Todo: Add Keyboard helper!"), class: this.getClassName("keyboard-hint") }, index.h("svg", { key: '4dd5a8ce6e5c96e79adf6d8b0308b56fae5be361', xmlns: "http://www.w3.org/2000/svg", height: "1em", width: "1em", viewBox: "0 0 48 48", fill: "currentColor" }, index.h("path", { key: 'f3378678d6a0dc9fe7ea9ffd42dc083c3dca5ec8', 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: 'ec9b51b9aaf6c48e643120115dbc7f418e9fb8e4', name: "after-calendar" }))));
406
+ })))), showFooter && (index.h("div", { key: '48fde61cd9cdf8900bf8e15d408f3ad11cba9d9d', class: this.getClassName("footer") }, index.h("div", { key: 'a0b3e3b48f1f530648dff20598a0665ded2fbbe1', class: this.getClassName("footer-buttons") }, this.showTodayButton && (index.h("button", { key: '06a03df2fe08b9c76d393fdfe48e279c58acf613', class: this.getClassName("today-button"), disabled: this.disabled, innerHTML: this.todayButtonContent || undefined, onClick: this.showToday, type: "button" }, this.labels.todayButton)), this.showClearButton && (index.h("button", { key: 'e8bc81d95650edbf8c3b4d4e217d155c8a6f88b2', class: this.getClassName("clear-button"), disabled: this.disabled, innerHTML: this.clearButtonContent || undefined, onClick: this.clear, type: "button" }, this.labels.clearButton)), this.showCloseButton && (index.h("button", { key: '4ca7b4c414ca22092bee6fffb51179bbc1d66ee6', class: this.getClassName("close-button"), disabled: this.disabled, innerHTML: this.closeButtonContent || undefined, onClick: this.close, type: "button" }, this.labels.closeButton))), this.showKeyboardHint &&
407
+ !window.matchMedia("(pointer: coarse)").matches && (index.h("button", { key: 'd34f89d3fb25286752bc4aa71893d0277dde3d17', type: "button", onClick: () => alert("Todo: Add Keyboard helper!"), class: this.getClassName("keyboard-hint") }, index.h("svg", { key: '5cf389d28d296804a5b5adfea6a0084290d125dd', xmlns: "http://www.w3.org/2000/svg", height: "1em", width: "1em", viewBox: "0 0 48 48", fill: "currentColor" }, index.h("path", { key: 'b84709ea4f714b979ff76078ee71556dc8671b04', 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: '1a37c10a1e2e367b1ee42756c85894d7ff5325f5', name: "after-calendar" }))));
398
408
  }
399
409
  get el() { return index.getElement(this); }
400
410
  static get watchers() { return {
@@ -2815,7 +2825,7 @@ const InclusiveDatesModal = class {
2815
2825
  }
2816
2826
  }
2817
2827
  render() {
2818
- return (index.h(index.Host, { key: '35e8ed14b0108e9cb75782516d070dfb8474b0b2', showing: this.showing, ref: (r) => r && (this.el = r) }, !this.inline && this.showing && (index.h("div", { key: 'fdb64ed8717e2a1620ef2d4ffb21a44d1de03a46', part: "body", ref: (r) => {
2828
+ return (index.h(index.Host, { key: '086d18e9b2c4924a12bc7dffb47df846ffc66f2f', showing: this.showing, ref: (r) => r && (this.el = r) }, !this.inline && this.showing && (index.h("div", { key: 'db2947e2f1a80b986fd815fbe3ee9c2cebc486c3', part: "body", ref: (r) => {
2819
2829
  if (r) {
2820
2830
  this.bodyRef = r;
2821
2831
  // Setup portal and create popper when ref is set
@@ -2832,7 +2842,7 @@ const InclusiveDatesModal = class {
2832
2842
  });
2833
2843
  }
2834
2844
  }
2835
- }, 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: 'af4734b1a18dd62a600ca49313b1ba07f2d19039' }, index.h("div", { key: 'fb41d5ce07b5aac179e4bed63c18a8d254503a50', part: "content" }, index.h("slot", { key: 'fc480cf1a29a42b1a19737a72d410c139dc32f07' }))))), this.inline && (index.h("div", { key: '7aef10d50f790a1e72e05b26dc108c40500fa7c3', part: "content" }, index.h("slot", { key: '06395cd19052d1b81ab448c0a9a618da876fa86d' })))));
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: '7801a9389dd510ad741b5edefdbdfb22f7beb29b' }, index.h("div", { key: '9e54bb90bc8f2aa5fe928eb063c10a1d9c1e69c9', part: "content" }, index.h("slot", { key: '42242c16758b365e489eaaae6267b540e19a6bb6' }))))), this.inline && (index.h("div", { key: 'fade4f7462beb49692ed196e74ecbc4971fb102d', part: "content" }, index.h("slot", { key: '6c0c7f4c842965350bb1cac12be2042c135e2c64' })))));
2836
2846
  }
2837
2847
  get hostElement() { return index.getElement(this); }
2838
2848
  static get watchers() { return {
@@ -10523,6 +10523,8 @@ const TabworthyDates = class {
10523
10523
  this.showMonthStepper = true;
10524
10524
  // Show or hide the clear button
10525
10525
  this.showClearButton = true;
10526
+ // Show or hide the close button
10527
+ this.showCloseButton = false;
10526
10528
  // Show or hide the today button
10527
10529
  this.showTodayButton = true;
10528
10530
  // Enable or disable input field formatting for accepted dates (eg. "Tuesday May 2, 2021" instead of "2021-05-02")
@@ -10912,10 +10914,10 @@ const TabworthyDates = class {
10912
10914
  }
10913
10915
  render() {
10914
10916
  var _a;
10915
- return (index$1.h(index$1.Host, { key: 'b85c1909fe1480911c45c35a2df8c01e5f7a09d3' }, index$1.h("label", { key: '3b41928ed705bdeeee9cb0d6e13d58a767d00b26', htmlFor: this.id ? `${this.id}-input` : undefined, class: this.getClassName("label") }, this.label), index$1.h("br", { key: '3c8b0017ab9604956ac4e1c452fdc1a6a4e4a786' }), index$1.h("div", { key: '5a389a5f7be57c19d11d4a565a61130d5fd3b5ff', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, index$1.h("input", { key: '7c1b10e5811f0797c67673f2d8c13fb2ea6b10d0', disabled: this.disabledState || this.disableFreeformInput, id: this.id ? `${this.id}-input` : undefined, type: "text", placeholder: this.placeholder, class: {
10917
+ return (index$1.h(index$1.Host, { key: '9d80f0d44dddf8ba4f44d6a3206b96a3411ffc68' }, index$1.h("label", { key: 'c293bc7f2718b88b907e451e2bdb02933ac5878c', htmlFor: this.id ? `${this.id}-input` : undefined, class: this.getClassName("label") }, this.label), index$1.h("br", { key: '5d4ce271aeda614d205b67766ca1c001038a9d6b' }), index$1.h("div", { key: '841882938ec083cd67559ebe855041c396f35039', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, index$1.h("input", { key: '1ae0436ee9ca4c612ee8d24833e8fec42095e06b', disabled: this.disabledState || this.disableFreeformInput, id: this.id ? `${this.id}-input` : undefined, type: "text", placeholder: this.placeholder, class: {
10916
10918
  [this.getClassName("input")]: true,
10917
10919
  [this.inputClass]: !!this.inputClass
10918
- }, ref: (r) => (this.inputRef = r), onChange: this.handleChange, onFocus: () => this.formatInput(false), onBlur: () => this.formatInput(true, false), "aria-describedby": this.errorState ? `${this.id}-error` : undefined, "aria-invalid": this.errorState }), !this.inline && (index$1.h("button", { key: '892a308b551d55b8e027f2dde48cc0cc22e00018', type: "button", onClick: this.handleCalendarButtonClick, class: this.getClassName("calendar-button"), disabled: this.disabledState }, this.calendarButtonContent ? (index$1.h("span", { innerHTML: this.calendarButtonContent })) : (this.datesLabels.openCalendar)))), index$1.h("tabworthy-dates-modal", { key: 'e2e90d92503ca129ed2017c2321590bdee12ce20', label: this.datesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
10920
+ }, 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: '590b29444493815f6b8e5d22419ad16b0a335b7d', 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: '59490c29908650b7473dd71e6f9aaf2f42eeaf95', label: this.datesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
10919
10921
  if (!this.pickerRef)
10920
10922
  return;
10921
10923
  this.pickerRef.modalIsOpen = true;
@@ -10923,11 +10925,11 @@ const TabworthyDates = class {
10923
10925
  if (!this.pickerRef)
10924
10926
  return;
10925
10927
  this.pickerRef.modalIsOpen = false;
10926
- }, inline: this.inline, appendTo: this.appendTo }, index$1.h("tabworthy-dates-calendar", { key: '0b8aa3324fedbd8f63c856fe5e5662cdc011db1f', range: this.range, locale: this.locale, onSelectDate: (event) => this.handlePickerSelection(event.detail), onChangeMonth: (event) => this.handleChangedMonths(event.detail), onChangeYear: (event) => this.handleYearChange(event.detail), labels: this.datesCalendarLabels ? this.datesCalendarLabels : undefined, ref: (el) => (this.pickerRef = el), startDate: this.startDate, firstDayOfWeek: this.firstDayOfWeek, showHiddenTitle: true, disabled: this.disabledState, showMonthStepper: this.showMonthStepper, showYearStepper: this.showYearStepper, showClearButton: this.showClearButton, showKeyboardHint: this.showKeyboardHint, showTodayButton: this.showTodayButton, disableDate: this.disableDate, minDate: this.minDate, maxDate: this.maxDate, inline: this.inline })), this.showQuickButtons &&
10928
+ }, inline: this.inline, appendTo: this.appendTo }, index$1.h("tabworthy-dates-calendar", { key: '4cea83a2e8bf63f0d06b64af8e3a489be5eaee5e', 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 &&
10927
10929
  ((_a = this.quickButtons) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
10928
- this.chronoSupportedLocale && (index$1.h("div", { key: '26e0dc9ae8e91b308b9f159e5428ae3e0ac9a8c8', class: this.getClassName("quick-group"), role: "group", "aria-label": this.datesLabels.quickSelection }, this.quickButtons.map((buttonText) => {
10930
+ this.chronoSupportedLocale && (index$1.h("div", { key: 'fcb7eba4dddc78de7f2f7487c9390ec0f6774374', class: this.getClassName("quick-group"), role: "group", "aria-label": this.datesLabels.quickSelection }, this.quickButtons.map((buttonText) => {
10929
10931
  return (index$1.h("button", { class: this.getClassName("quick-button"), onClick: this.handleQuickButtonClick, disabled: this.disabledState, type: "button" }, buttonText));
10930
- }))), this.errorState && (index$1.h("div", { key: '434fecd9962fe0360536c6f0d96cb52e77034399', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
10932
+ }))), this.errorState && (index$1.h("div", { key: '74c2226e378f9e2254ca52de3e519874e47f0c21', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
10931
10933
  }
10932
10934
  get el() { return index$1.getElement(this); }
10933
10935
  static get watchers() { return {
@@ -13,7 +13,7 @@ const defaultLabels = {
13
13
  incrementMinutes: "Increment minutes",
14
14
  decrementMinutes: "Decrement minutes"
15
15
  };
16
- const InclusiveTimesPicker = class {
16
+ const TabworthyTimesPicker = class {
17
17
  constructor(hostRef) {
18
18
  index.registerInstance(this, hostRef);
19
19
  this.timeChanged = index.createEvent(this, "timeChanged", 7);
@@ -155,16 +155,16 @@ const InclusiveTimesPicker = class {
155
155
  const displayHours = this.getDisplayHours();
156
156
  const maxHours = this.useTwelveHourFormat ? 12 : 23;
157
157
  const minHours = this.useTwelveHourFormat ? 1 : 0;
158
- return (index.h(index.Host, { key: '6ccec0415bd1c35275e125355f69e871a2b3dc18', class: this.elementClassName, "aria-label": this.labels.timePicker }, index.h("div", { key: '52849e2d4e8ad6183d3017277f11fbd5bc3643c5', class: `${this.elementClassName}__container` }, index.h("div", { key: '9aa3980e371db20ae4ed4f590a0e9f49aa3d40cd', class: `${this.elementClassName}__field` }, index.h("label", { key: '77ea146e2d05b4bedec83a8d03096a6c51b6fd36', htmlFor: `${this.elementClassName}-hours`, class: {
158
+ return (index.h(index.Host, { key: '9b58907eb4784f4b3b1c0a25fd51fec33832ce07', class: this.elementClassName, "aria-label": this.labels.timePicker }, index.h("div", { key: 'a337deb490c90bc628d92cf8025a1dbab461d98a', class: `${this.elementClassName}__container` }, index.h("div", { key: 'e3b37266b5bf5758f4435f8b4d23a34a6da5906d', class: `${this.elementClassName}__field` }, index.h("label", { key: '08ee8679d4f3abbf211feb4c4c83d103542679bb', htmlFor: `${this.elementClassName}-hours`, class: {
159
159
  [`${this.elementClassName}__label`]: true,
160
160
  [`${this.elementClassName}__label--sr-only`]: this.labelsSrOnly
161
- } }, this.labels.hours), index.h("div", { key: 'cf88cc85dce2a2e11e5e0ca61ab23d5bcc71b7be', class: `${this.elementClassName}__control` }, index.h("button", { key: 'e2e68d9e5ed00a2a72f4a019a59d7fa683a8d56c', 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: '269a5595fd1baf1ace113beb3147542353927c75', 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: '1d2c3fca6e81b9fdaab6f9b9f2c19f55b1af0ef5', points: "18 15 12 9 6 15" }))), index.h("input", { key: '53a57e4c6e1a40dcb89ecd11cd1cba0f6205c470', 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: 'ab36448a4f79a29592124dee72fa8e96f121f646', 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: '705e207ffc41a38bff7d8739e02605e536e75a92', 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: 'c8c08acec53576456b330c4f40a7879556704d0f', points: "6 9 12 15 18 9" }))))), index.h("div", { key: '3b8c0125c18518463de020682de4620d918a3463', class: `${this.elementClassName}__separator` }, ":"), index.h("div", { key: 'c54430db728d8f48320f4e4983a1d67a1ec8c78e', class: `${this.elementClassName}__field` }, index.h("label", { key: 'b47c7ae65c0b34b70673a8bd60c3b1496acf9540', htmlFor: `${this.elementClassName}-minutes`, class: {
161
+ } }, this.labels.hours), index.h("div", { key: 'b55bc02c9bf1b68bdbd443781ab63f672e470a25', class: `${this.elementClassName}__control` }, index.h("button", { key: '2f39fbe193148518255188a72ced6253a362972b', 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: '870b6b42129f6f6e17de83c79abfaa1d3bbfa63a', 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: 'be9e46c59488605aab9793e9a5dfb720390eb66a', points: "18 15 12 9 6 15" }))), index.h("input", { key: '46ae9335a93cec99f4f4c66ea798aa4bedd10173', 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: '45a67eb11ec557b9177a28aa0ff1a209b8253cdb', 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: '2e54fbfd5177e0bf967f0f07a0bcc90f9de70676', 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: '6f386c6c865b2c4fa1547fb2eb84bcb1d73dfb6c', points: "6 9 12 15 18 9" }))))), index.h("div", { key: '745ee4c84ac76dcb35df64109b666100364e8053', class: `${this.elementClassName}__separator` }, ":"), index.h("div", { key: 'e299001fc01bc9c4bbb46cd9580764c95614e8ca', class: `${this.elementClassName}__field` }, index.h("label", { key: '9bb317196dc9619ccbe91007b1003cd7231626a7', htmlFor: `${this.elementClassName}-minutes`, class: {
162
162
  [`${this.elementClassName}__label`]: true,
163
163
  [`${this.elementClassName}__label--sr-only`]: this.labelsSrOnly
164
- } }, this.labels.minutes), index.h("div", { key: '9a4434d935f34bfd910e2ab7656fc125c05de9ca', class: `${this.elementClassName}__control` }, index.h("button", { key: 'fcc7800df89c4739c257a5733affdabc8aca1e25', 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: '80b692e16555612a179fec5734c79966d0c5967a', 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: '086fbe45c600657c2f6bf37e8415b87e8d763c3e', points: "18 15 12 9 6 15" }))), index.h("input", { key: 'dc610011944c2ad1bf3aa68937265bdf835ba009', 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: 'd2cabe46d53e0cbd2b58140f6a55217dd69a3c5e', 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: '2e5e67efccb2a66a0c4a1377d3941d12b4bd7947', 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: '3da5561fb1f5bf1b07eb48de6e020047c1956158', points: "6 9 12 15 18 9" }))))), this.useTwelveHourFormat && (index.h("div", { key: '24c87e5e371f8a10816afcebb3dc2f7843fa89f5', class: `${this.elementClassName}__period` }, index.h("button", { key: '014126a0d5470d56ae384e12b2e196c3a9132700', type: "button", class: {
164
+ } }, this.labels.minutes), index.h("div", { key: '62033213721f2696cbe36dd76ba522e3a21ce718', class: `${this.elementClassName}__control` }, index.h("button", { key: '011daa926e28024e7e76f996af334fe34728ce78', 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: '03ee7c275d8924d87b735751b56505bab3c09f94', 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: '0f27d33a1440e7418c3f98863df276cdd596eee8', points: "18 15 12 9 6 15" }))), index.h("input", { key: '63b25ff463cbfccff9360f486279bc25381a3a3a', 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: 'bc2d44f2e89dc7adb87930b84c3b7bfb6f5dcf3c', 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: 'b565bf9b1564e18f930bdaedf9c47ace88eaa6ac', 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: 'bf864da5aca3787bda78283fff66c8c4611ed541', points: "6 9 12 15 18 9" }))))), this.useTwelveHourFormat && (index.h("div", { key: '9b9268553b3417ed186a4057258e9565e49a87f7', class: `${this.elementClassName}__period` }, index.h("button", { key: '6a953b254ca0e827aed00ac2889c6127df308a61', type: "button", class: {
165
165
  [`${this.elementClassName}__period-button`]: true,
166
166
  [`${this.elementClassName}__period-button--active`]: this.period === "AM"
167
- }, onClick: () => this.handlePeriodChange("AM"), disabled: this.disabled, "aria-label": this.labels.am, "aria-pressed": this.period === "AM" }, this.labels.am), index.h("button", { key: 'cf9f1f261456d7b5f64bf4b7d9ddbbb2e86d4447', type: "button", class: {
167
+ }, onClick: () => this.handlePeriodChange("AM"), disabled: this.disabled, "aria-label": this.labels.am, "aria-pressed": this.period === "AM" }, this.labels.am), index.h("button", { key: '5371401b679895edd32d8a901c1339a8d3baacb6', type: "button", class: {
168
168
  [`${this.elementClassName}__period-button`]: true,
169
169
  [`${this.elementClassName}__period-button--active`]: this.period === "PM"
170
170
  }, onClick: () => this.handlePeriodChange("PM"), disabled: this.disabled, "aria-label": this.labels.pm, "aria-pressed": this.period === "PM" }, this.labels.pm))))));
@@ -180,4 +180,4 @@ const InclusiveTimesPicker = class {
180
180
  }; }
181
181
  };
182
182
 
183
- exports.tabworthy_times_picker = InclusiveTimesPicker;
183
+ exports.tabworthy_times_picker = TabworthyTimesPicker;
@@ -41,7 +41,6 @@ const InclusiveTimes = class {
41
41
  this.useTwelveHourFormat = true;
42
42
  // Labels used for internal translations
43
43
  this.timesLabels = defaultLabels;
44
- // Prevent hiding the calendar
45
44
  this.inline = false;
46
45
  // Current error state of the input field
47
46
  this.hasError = false;
@@ -51,6 +50,8 @@ const InclusiveTimes = class {
51
50
  this.showMonthStepper = true;
52
51
  // Show or hide the clear button
53
52
  this.showClearButton = true;
53
+ // Show or hide the close button
54
+ this.showCloseButton = false;
54
55
  // Show or hide the today button
55
56
  this.showTodayButton = true;
56
57
  // Function to disable individual dates
@@ -238,10 +239,10 @@ const InclusiveTimes = class {
238
239
  }
239
240
  render() {
240
241
  var _a;
241
- return (index.h(index.Host, { key: 'bb2dfac0bb47e71d31aae0af5a864ad46970baf1', class: this.elementClassName, "has-error": this.errorState, disabled: this.disabledState }, index.h("label", { key: 'ac7a24801c515a6411dc123ca1f976e5d791efb7', htmlFor: `${this.id}-input`, class: this.getClassName("label") }, this.label), index.h("div", { key: '75368fdfabad0cbe08196013573b827602655335', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, index.h("input", { key: '6ca23bd4504a10d2bcfa54d194b7ea3bf94ccb57', id: `${this.id}-input`, ref: (r) => (this.inputRef = r), type: "text", class: {
242
+ return (index.h(index.Host, { key: 'd9f883b8ef4f2fc0ad315d0d757ae126385d999c', class: this.elementClassName, "has-error": this.errorState, disabled: this.disabledState }, index.h("label", { key: 'd3963b6cd1e8ccca268a36df44e26cc4ce48e395', htmlFor: `${this.id}-input`, class: this.getClassName("label") }, this.label), index.h("div", { key: '0f215c4564729f06f8744e990d6cea5602b1fcf2', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, index.h("input", { key: 'a6f34d8600fe57a492bc2137414bed3eca5b3ada', id: `${this.id}-input`, ref: (r) => (this.inputRef = r), type: "text", class: {
242
243
  [this.getClassName("input")]: true,
243
244
  [this.inputClass]: !!this.inputClass
244
- }, placeholder: this.placeholder, disabled: this.disabledState || this.disableFreeformInput, value: (_a = this.internalValue) === null || _a === void 0 ? void 0 : _a.toString(), onBlur: this.handleInputBlur, onChange: this.handleInputChange, "aria-describedby": this.errorState ? `${this.id}-error` : undefined, "aria-invalid": this.errorState }), !this.inline && (index.h("button", { key: '1e8348e12dbe8e87d17d137721c3903ea8f95ae1', type: "button", onClick: this.handleCalendarButtonClick, class: this.getClassName("calendar-button"), disabled: this.disabledState }, this.calendarButtonContent ? (index.h("span", { innerHTML: this.calendarButtonContent })) : (this.timesLabels.openCalendar)))), index.h("tabworthy-dates-modal", { key: 'd361f887baa7ac18b901862ea4aa240b614ba210', label: this.timesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
245
+ }, 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: '7bf3d4ab475153e44c285142a2692c51fd83e384', 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: 'e7924052d8942bdfee98d6eb6c2735e27a7f4e06', label: this.timesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
245
246
  if (this.pickerRef) {
246
247
  this.pickerRef.modalIsOpen = true;
247
248
  }
@@ -249,7 +250,7 @@ const InclusiveTimes = class {
249
250
  if (this.pickerRef) {
250
251
  this.pickerRef.modalIsOpen = false;
251
252
  }
252
- }, inline: this.inline, appendTo: this.appendTo }, index.h("div", { key: '207708dc4997d068e1d10c08d97551c1037c38d5', class: this.getClassName("picker-container") }, index.h("tabworthy-dates-calendar", { key: 'b16f50c72789b5d98c629668c655e10a6ce1e84b', range: this.range, locale: this.locale, onSelectDate: (event) => this.handlePickerSelection(event.detail), onChangeMonth: (event) => this.handleChangedMonths(event.detail), onChangeYear: (event) => this.handleYearChange(event.detail), labels: this.datesCalendarLabels, ref: (el) => (this.pickerRef = el), startDate: this.startDate, firstDayOfWeek: this.firstDayOfWeek, showHiddenTitle: true, disabled: this.disabledState, showMonthStepper: this.showMonthStepper, showYearStepper: this.showYearStepper, showClearButton: this.showClearButton, showTodayButton: this.showTodayButton, disableDate: this.disableDate, minDate: this.minDate, maxDate: this.maxDate, inline: this.inline, value: this.value ? this.toDate(this.value) : undefined }, index.h("div", { key: 'b8ca24c7f7437dfce513fbc6d7c28b4dc887e4c2', slot: "after-calendar", class: this.getClassName("time-section") }, index.h("hr", { key: 'fc353c6db72e547f044bee19c02eeb6207a8af0b', class: this.getClassName("divider") }), index.h("tabworthy-times-picker", { key: 'c77b51e4a60978c3706ead492e972db81b72aa73', hours: this.selectedHours, minutes: this.selectedMinutes, useTwelveHourFormat: this.useTwelveHourFormat, disabled: this.disabledState, onTimeChanged: this.handleTimeChange }))))), this.errorState && (index.h("div", { key: '7d3e27a0d9bb0b54642873205bc6bf140126d894', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
253
+ }, inline: this.inline, appendTo: this.appendTo }, index.h("div", { key: '4fa1bb8b0a6381f4281bcffd048a44807bbf2a94', class: this.getClassName("picker-container") }, index.h("tabworthy-dates-calendar", { key: '6a8440f71ec9d528df12edb65e35113addfe17c9', 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: '964bc9962d16f4df806fbad70f1d5952c8dc18b6', slot: "after-calendar", class: this.getClassName("time-section") }, index.h("hr", { key: '0603b695e73896c9d21b785a3aee71f8667094d3', class: this.getClassName("divider") }), index.h("tabworthy-times-picker", { key: '9a9bc175c01672bf6e203f9292907f7ca9e492e0', hours: this.selectedHours, minutes: this.selectedMinutes, useTwelveHourFormat: this.useTwelveHourFormat, disabled: this.disabledState, onTimeChanged: this.handleTimeChange, labels: this.timesPickerLabels }))))), this.errorState && (index.h("div", { key: '709f60d1c1265a3390e4e97adc204f18ad139a85', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
253
254
  }
254
255
  get el() { return index.getElement(this); }
255
256
  static get watchers() { return {
@@ -50,6 +50,8 @@ export class TabworthyDates {
50
50
  this.showMonthStepper = true;
51
51
  // Show or hide the clear button
52
52
  this.showClearButton = true;
53
+ // Show or hide the close button
54
+ this.showCloseButton = false;
53
55
  // Show or hide the today button
54
56
  this.showTodayButton = true;
55
57
  // Enable or disable input field formatting for accepted dates (eg. "Tuesday May 2, 2021" instead of "2021-05-02")
@@ -439,10 +441,10 @@ export class TabworthyDates {
439
441
  }
440
442
  render() {
441
443
  var _a;
442
- return (h(Host, { key: 'b85c1909fe1480911c45c35a2df8c01e5f7a09d3' }, h("label", { key: '3b41928ed705bdeeee9cb0d6e13d58a767d00b26', htmlFor: this.id ? `${this.id}-input` : undefined, class: this.getClassName("label") }, this.label), h("br", { key: '3c8b0017ab9604956ac4e1c452fdc1a6a4e4a786' }), h("div", { key: '5a389a5f7be57c19d11d4a565a61130d5fd3b5ff', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, h("input", { key: '7c1b10e5811f0797c67673f2d8c13fb2ea6b10d0', disabled: this.disabledState || this.disableFreeformInput, id: this.id ? `${this.id}-input` : undefined, type: "text", placeholder: this.placeholder, class: {
444
+ return (h(Host, { key: '9d80f0d44dddf8ba4f44d6a3206b96a3411ffc68' }, h("label", { key: 'c293bc7f2718b88b907e451e2bdb02933ac5878c', htmlFor: this.id ? `${this.id}-input` : undefined, class: this.getClassName("label") }, this.label), h("br", { key: '5d4ce271aeda614d205b67766ca1c001038a9d6b' }), h("div", { key: '841882938ec083cd67559ebe855041c396f35039', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, h("input", { key: '1ae0436ee9ca4c612ee8d24833e8fec42095e06b', disabled: this.disabledState || this.disableFreeformInput, id: this.id ? `${this.id}-input` : undefined, type: "text", placeholder: this.placeholder, class: {
443
445
  [this.getClassName("input")]: true,
444
446
  [this.inputClass]: !!this.inputClass
445
- }, ref: (r) => (this.inputRef = r), onChange: this.handleChange, onFocus: () => this.formatInput(false), onBlur: () => this.formatInput(true, false), "aria-describedby": this.errorState ? `${this.id}-error` : undefined, "aria-invalid": this.errorState }), !this.inline && (h("button", { key: '892a308b551d55b8e027f2dde48cc0cc22e00018', type: "button", onClick: this.handleCalendarButtonClick, class: this.getClassName("calendar-button"), disabled: this.disabledState }, this.calendarButtonContent ? (h("span", { innerHTML: this.calendarButtonContent })) : (this.datesLabels.openCalendar)))), h("tabworthy-dates-modal", { key: 'e2e90d92503ca129ed2017c2321590bdee12ce20', label: this.datesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
447
+ }, 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: '590b29444493815f6b8e5d22419ad16b0a335b7d', 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: '59490c29908650b7473dd71e6f9aaf2f42eeaf95', label: this.datesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
446
448
  if (!this.pickerRef)
447
449
  return;
448
450
  this.pickerRef.modalIsOpen = true;
@@ -450,11 +452,11 @@ export class TabworthyDates {
450
452
  if (!this.pickerRef)
451
453
  return;
452
454
  this.pickerRef.modalIsOpen = false;
453
- }, inline: this.inline, appendTo: this.appendTo }, h("tabworthy-dates-calendar", { key: '0b8aa3324fedbd8f63c856fe5e5662cdc011db1f', range: this.range, locale: this.locale, onSelectDate: (event) => this.handlePickerSelection(event.detail), onChangeMonth: (event) => this.handleChangedMonths(event.detail), onChangeYear: (event) => this.handleYearChange(event.detail), labels: this.datesCalendarLabels ? this.datesCalendarLabels : undefined, ref: (el) => (this.pickerRef = el), startDate: this.startDate, firstDayOfWeek: this.firstDayOfWeek, showHiddenTitle: true, disabled: this.disabledState, showMonthStepper: this.showMonthStepper, showYearStepper: this.showYearStepper, showClearButton: this.showClearButton, showKeyboardHint: this.showKeyboardHint, showTodayButton: this.showTodayButton, disableDate: this.disableDate, minDate: this.minDate, maxDate: this.maxDate, inline: this.inline })), this.showQuickButtons &&
455
+ }, inline: this.inline, appendTo: this.appendTo }, h("tabworthy-dates-calendar", { key: '4cea83a2e8bf63f0d06b64af8e3a489be5eaee5e', 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 &&
454
456
  ((_a = this.quickButtons) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
455
- this.chronoSupportedLocale && (h("div", { key: '26e0dc9ae8e91b308b9f159e5428ae3e0ac9a8c8', class: this.getClassName("quick-group"), role: "group", "aria-label": this.datesLabels.quickSelection }, this.quickButtons.map((buttonText) => {
457
+ this.chronoSupportedLocale && (h("div", { key: 'fcb7eba4dddc78de7f2f7487c9390ec0f6774374', class: this.getClassName("quick-group"), role: "group", "aria-label": this.datesLabels.quickSelection }, this.quickButtons.map((buttonText) => {
456
458
  return (h("button", { class: this.getClassName("quick-button"), onClick: this.handleQuickButtonClick, disabled: this.disabledState, type: "button" }, buttonText));
457
- }))), this.errorState && (h("div", { key: '434fecd9962fe0360536c6f0d96cb52e77034399', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
459
+ }))), this.errorState && (h("div", { key: '74c2226e378f9e2254ca52de3e519874e47f0c21', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
458
460
  }
459
461
  static get is() { return "tabworthy-dates"; }
460
462
  static get encapsulation() { return "scoped"; }
@@ -735,7 +737,7 @@ export class TabworthyDates {
735
737
  "mutable": false,
736
738
  "complexType": {
737
739
  "original": "DatesCalendarLabels",
738
- "resolved": "{ clearButton: string; monthSelect: string; nextMonthButton: string; nextYearButton: string; picker: string; previousMonthButton: string; previousYearButton: string; todayButton: string; yearSelect: string; keyboardHint: string; selected: string; chooseAsStartDate: string; chooseAsEndDate: string; }",
740
+ "resolved": "{ clearButton: string; closeButton: string; monthSelect: string; nextMonthButton: string; nextYearButton: string; picker: string; previousMonthButton: string; previousYearButton: string; todayButton: string; yearSelect: string; keyboardHint: string; selected: string; chooseAsStartDate: string; chooseAsEndDate: string; }",
739
741
  "references": {
740
742
  "DatesCalendarLabels": {
741
743
  "location": "import",
@@ -892,6 +894,26 @@ export class TabworthyDates {
892
894
  "attribute": "show-clear-button",
893
895
  "defaultValue": "true"
894
896
  },
897
+ "showCloseButton": {
898
+ "type": "boolean",
899
+ "mutable": false,
900
+ "complexType": {
901
+ "original": "boolean",
902
+ "resolved": "boolean",
903
+ "references": {}
904
+ },
905
+ "required": false,
906
+ "optional": false,
907
+ "docs": {
908
+ "tags": [],
909
+ "text": ""
910
+ },
911
+ "getter": false,
912
+ "setter": false,
913
+ "reflect": false,
914
+ "attribute": "show-close-button",
915
+ "defaultValue": "false"
916
+ },
895
917
  "showTodayButton": {
896
918
  "type": "boolean",
897
919
  "mutable": false,