@tabworthy/components 0.8.0 → 0.8.2

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 (31) 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.cjs.entry.js +8 -4
  4. package/dist/cjs/tabworthy-times-picker.cjs.entry.js +14 -14
  5. package/dist/cjs/tabworthy-times.cjs.entry.js +7 -3
  6. package/dist/collection/components/tabworthy-dates/tabworthy-dates.js +29 -5
  7. package/dist/collection/components/tabworthy-times/tabworthy-times.js +29 -5
  8. package/dist/collection/components/tabworthy-times-picker/tabworthy-times-picker.js +16 -16
  9. package/dist/components/p-Bnmroodq.js +1 -0
  10. package/dist/components/tabworthy-dates.js +1 -1
  11. package/dist/components/tabworthy-times-picker.js +1 -1
  12. package/dist/components/tabworthy-times.js +1 -1
  13. package/dist/esm/loader.js +1 -1
  14. package/dist/esm/tabworthy-components.js +1 -1
  15. package/dist/esm/tabworthy-dates.entry.js +8 -4
  16. package/dist/esm/tabworthy-times-picker.entry.js +14 -14
  17. package/dist/esm/tabworthy-times.entry.js +7 -3
  18. package/dist/tabworthy-components/p-141bd515.entry.js +1 -0
  19. package/dist/tabworthy-components/{p-eeaeddda.entry.js → p-6986ab96.entry.js} +1 -1
  20. package/dist/tabworthy-components/p-8416e0a9.entry.js +1 -0
  21. package/dist/tabworthy-components/tabworthy-components.esm.js +1 -1
  22. package/dist/themes/light.css +1 -1
  23. package/dist/types/components/tabworthy-dates/tabworthy-dates.d.ts +2 -1
  24. package/dist/types/components/tabworthy-times/tabworthy-times.d.ts +2 -1
  25. package/dist/types/components/tabworthy-times-picker/tabworthy-times-picker.d.ts +1 -1
  26. package/dist/types/components.d.ts +25 -7
  27. package/package.json +3 -3
  28. package/dist/components/p-EEyUR8TJ.js +0 -1
  29. package/dist/tabworthy-components/p-2f81bbfa.entry.js +0 -1
  30. package/dist/tabworthy-components/p-7265cf4a.entry.js +0 -1
  31. package/dist/themes/dark.css +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],"use12HourFormat":[4,"use-1-2-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],"closing":[32],"showing":[32],"open":[64],"close":[64],"getState":[64],"setTriggerElement":[64]},[[10,"click","handleClick"]]]]],["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"],"use12HourFormat":[4,"use-1-2-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"],"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"],"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"],"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],"closing":[32],"showing":[32],"open":[64],"close":[64],"getState":[64],"setTriggerElement":[64]},[[10,"click","handleClick"]]]]],["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"],"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"],"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],"use12HourFormat":[4,"use-1-2-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],"closing":[32],"showing":[32],"open":[64],"close":[64],"getState":[64],"setTriggerElement":[64]},[[10,"click","handleClick"]]]]],["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"],"use12HourFormat":[4,"use-1-2-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"],"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"],"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"],"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],"closing":[32],"showing":[32],"open":[64],"close":[64],"getState":[64],"setTriggerElement":[64]},[[10,"click","handleClick"]]]]],["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"],"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"],"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;
@@ -10543,6 +10543,7 @@ const TabworthyDates = class {
10543
10543
  // Show or hide the quick buttons
10544
10544
  this.showQuickButtons = true;
10545
10545
  this.disableFreeformInput = false;
10546
+ this.inputClass = "";
10546
10547
  this.errorState = this.hasError;
10547
10548
  this.disabledState = this.disabled;
10548
10549
  this.chronoSupportedLocale = ["en", "ja", "fr", "nl", "ru", "pt"].includes(this.locale.slice(0, 2));
@@ -10895,7 +10896,10 @@ const TabworthyDates = class {
10895
10896
  }
10896
10897
  render() {
10897
10898
  var _a;
10898
- return (index$1.h(index$1.Host, { key: '6fd878d7a0073344895525a82533925fcd24c372' }, index$1.h("label", { key: '550382a2ea99201b465fa9fd9ee90a917c5ff7e6', htmlFor: this.id ? `${this.id}-input` : undefined, class: this.getClassName("label") }, this.label), index$1.h("br", { key: 'fd6fb69543f81bef9a15157b94a25a5fa107ef70' }), index$1.h("div", { key: 'fcc9c10276e35f28435829eea17dfed27373f55c', class: this.getClassName("input-container") }, index$1.h("input", { key: '24da8c1582dc66f65a0eb6c6ab380b28bbf1c5ca', disabled: this.disabledState || this.disableFreeformInput, id: this.id ? `${this.id}-input` : undefined, type: "text", placeholder: this.placeholder, class: this.getClassName("input"), 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: '54cd337b5ddd3ea6aa6ecd59a8fadf2cb5b61026', type: "button", ref: (r) => (this.calendarButtonRef = r), 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: 'cd8bd92d251d3c2566c9da9f8039ccc2ab74750f', label: this.datesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
10899
+ return (index$1.h(index$1.Host, { key: 'd424c911d4fd2d05222249b401e9b704430e6f29' }, index$1.h("label", { key: 'd14130a7b0b02e7124f7c7e9ec0642620da7aab6', htmlFor: this.id ? `${this.id}-input` : undefined, class: this.getClassName("label") }, this.label), index$1.h("br", { key: 'c4f5397785326f323772f46a8cfb6d868f5ff230' }), index$1.h("div", { key: '9f52005781b9a54426ee3c094727b8890681a4d5', class: this.getClassName("input-container") }, index$1.h("input", { key: 'e67af61ef75a592acadcfbd14da4527b84b08417', disabled: this.disabledState || this.disableFreeformInput, id: this.id ? `${this.id}-input` : undefined, type: "text", placeholder: this.placeholder, class: {
10900
+ [this.getClassName("input")]: true,
10901
+ [this.inputClass]: !!this.inputClass
10902
+ }, 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: 'dd9421438de95497d2e7037cfc927bb0f27cd3c0', type: "button", ref: (r) => (this.calendarButtonRef = r), 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: 'b8a3278a07bc1ddc36eac5a0c9808595c4bcdde5', label: this.datesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
10899
10903
  if (!this.pickerRef)
10900
10904
  return;
10901
10905
  this.pickerRef.modalIsOpen = true;
@@ -10903,11 +10907,11 @@ const TabworthyDates = class {
10903
10907
  if (!this.pickerRef)
10904
10908
  return;
10905
10909
  this.pickerRef.modalIsOpen = false;
10906
- }, inline: this.inline }, index$1.h("tabworthy-dates-calendar", { key: '929272a053e0109e34d4b2d8456064fc14093912', 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 &&
10910
+ }, inline: this.inline }, index$1.h("tabworthy-dates-calendar", { key: '29dc57f6a1951091476de39c8861b43d83242007', 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 &&
10907
10911
  ((_a = this.quickButtons) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
10908
- this.chronoSupportedLocale && (index$1.h("div", { key: 'aead258880c9531e3fb72111f1fd47ebfa35931a', class: this.getClassName("quick-group"), role: "group", "aria-label": "Quick selection" }, this.quickButtons.map((buttonText) => {
10912
+ this.chronoSupportedLocale && (index$1.h("div", { key: '1bb09b44a219648203d803c76d17a9b41b0278bf', class: this.getClassName("quick-group"), role: "group", "aria-label": "Quick selection" }, this.quickButtons.map((buttonText) => {
10909
10913
  return (index$1.h("button", { class: this.getClassName("quick-button"), onClick: this.handleQuickButtonClick, disabled: this.disabledState, type: "button" }, buttonText));
10910
- }))), this.errorState && (index$1.h("div", { key: '193fe31b36da600e9f222f2576c3bee2d4e0a427', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
10914
+ }))), this.errorState && (index$1.h("div", { key: '92d843bf6d0234568bf41a0fd2fdf281cb48487f', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
10911
10915
  }
10912
10916
  get el() { return index$1.getElement(this); }
10913
10917
  static get watchers() { return {
@@ -20,7 +20,7 @@ const InclusiveTimesPicker = class {
20
20
  // Current time value (24-hour format)
21
21
  this.hours = 12;
22
22
  this.minutes = 0;
23
- this.use12HourFormat = false;
23
+ this.useTwelveHourFormat = false;
24
24
  // Labels for accessibility and i18n
25
25
  this.labels = defaultLabels;
26
26
  // Hide labels visually but keep them for screen readers
@@ -32,7 +32,7 @@ const InclusiveTimesPicker = class {
32
32
  this.period = this.hours >= 12 ? "PM" : "AM";
33
33
  this.handleHourChange = (e) => {
34
34
  const value = parseInt(e.target.value, 10);
35
- if (this.use12HourFormat) {
35
+ if (this.useTwelveHourFormat) {
36
36
  // Convert to 24-hour format based on period
37
37
  if (this.period === "AM") {
38
38
  this.internalHours = value === 12 ? 0 : value;
@@ -51,7 +51,7 @@ const InclusiveTimesPicker = class {
51
51
  this.emitTimeChange();
52
52
  };
53
53
  this.handlePeriodChange = (period) => {
54
- if (this.period === period || !this.use12HourFormat)
54
+ if (this.period === period || !this.useTwelveHourFormat)
55
55
  return;
56
56
  this.period = period;
57
57
  // Convert hours based on new period
@@ -65,7 +65,7 @@ const InclusiveTimesPicker = class {
65
65
  this.emitTimeChange();
66
66
  };
67
67
  this.handleHourIncrement = () => {
68
- if (this.use12HourFormat) {
68
+ if (this.useTwelveHourFormat) {
69
69
  const displayHours = this.getDisplayHours();
70
70
  const newDisplayHours = displayHours === 12 ? 1 : displayHours + 1;
71
71
  if (this.period === "AM") {
@@ -81,7 +81,7 @@ const InclusiveTimesPicker = class {
81
81
  this.emitTimeChange();
82
82
  };
83
83
  this.handleHourDecrement = () => {
84
- if (this.use12HourFormat) {
84
+ if (this.useTwelveHourFormat) {
85
85
  const displayHours = this.getDisplayHours();
86
86
  const newDisplayHours = displayHours === 1 ? 12 : displayHours - 1;
87
87
  if (this.period === "AM") {
@@ -120,7 +120,7 @@ const InclusiveTimesPicker = class {
120
120
  this.period = this.hours >= 12 ? "PM" : "AM";
121
121
  }
122
122
  getDisplayHours() {
123
- if (!this.use12HourFormat) {
123
+ if (!this.useTwelveHourFormat) {
124
124
  return this.internalHours;
125
125
  }
126
126
  if (this.internalHours === 0)
@@ -130,7 +130,7 @@ const InclusiveTimesPicker = class {
130
130
  return this.internalHours;
131
131
  }
132
132
  get24HourValue() {
133
- if (!this.use12HourFormat) {
133
+ if (!this.useTwelveHourFormat) {
134
134
  return this.internalHours;
135
135
  }
136
136
  const displayHours = this.getDisplayHours();
@@ -145,7 +145,7 @@ const InclusiveTimesPicker = class {
145
145
  this.timeChanged.emit({
146
146
  hours: this.get24HourValue(),
147
147
  minutes: this.internalMinutes,
148
- period: this.use12HourFormat ? this.period : undefined
148
+ period: this.useTwelveHourFormat ? this.period : undefined
149
149
  });
150
150
  }
151
151
  padZero(num) {
@@ -153,18 +153,18 @@ const InclusiveTimesPicker = class {
153
153
  }
154
154
  render() {
155
155
  const displayHours = this.getDisplayHours();
156
- const maxHours = this.use12HourFormat ? 12 : 23;
157
- const minHours = this.use12HourFormat ? 1 : 0;
158
- return (index.h(index.Host, { key: '22eb745a93c68e4e4f78c11d2941681897aa73ef', class: this.elementClassName, "aria-label": this.labels.timePicker }, index.h("div", { key: 'ccb05b5d5793442b63aa4c25d5120db8b60bedf3', class: `${this.elementClassName}__container` }, index.h("div", { key: '3fc4ede2d685e43edcfefe8c88de19f705e94478', class: `${this.elementClassName}__field` }, index.h("label", { key: 'fb04e846fc9807155c4390e92722850cdaa4bba2', htmlFor: `${this.elementClassName}-hours`, class: {
156
+ const maxHours = this.useTwelveHourFormat ? 12 : 23;
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: {
159
159
  [`${this.elementClassName}__label`]: true,
160
160
  [`${this.elementClassName}__label--sr-only`]: this.labelsSrOnly
161
- } }, this.labels.hours), index.h("div", { key: 'd5ed4a06ea4ce2eaaefda2fa316a4789aa4a210a', class: `${this.elementClassName}__control` }, index.h("button", { key: '193c89e3b50934225c05f3241546bc3e7063b1b8', 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: 'f6cefeb18839bce2b644d92608f802bc001377b3', 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: '58519a5d7a8cddfe2273f5c8beec3eab7307b43c', points: "18 15 12 9 6 15" }))), index.h("input", { key: '187ace01f2d83ad59766159d6509e30100b7f812', 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: '3bbe5b73ac8a85c165f0332d3c70d30aede096e6', 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: 'fd7c431618e09d4326c95398f83f22ea2258695e', 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: '99aab5a584aed4d8fc1b30dcada0c76e42ba6ac7', points: "6 9 12 15 18 9" }))))), index.h("div", { key: 'a8958b60136f6220bbd944beaa6cf73c7660e3fb', class: `${this.elementClassName}__separator` }, ":"), index.h("div", { key: '72b46b517876dc8bc3490afef1860514b46efc46', class: `${this.elementClassName}__field` }, index.h("label", { key: 'e09788653c3873e97e1922fcda3076878f9b1ca7', htmlFor: `${this.elementClassName}-minutes`, class: {
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: {
162
162
  [`${this.elementClassName}__label`]: true,
163
163
  [`${this.elementClassName}__label--sr-only`]: this.labelsSrOnly
164
- } }, this.labels.minutes), index.h("div", { key: '7bf9642b58249014b2ad802c3fe30f67e5354f4d', class: `${this.elementClassName}__control` }, index.h("button", { key: '71c889d966bceb4aa9e7b6f78c57e968b207ddda', 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: '3aad10f2b79e5e819277d4566ab7d336449162f9', 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: '68dfdfc6cd2bd1f8f916dbf60155eb2cc4a8328d', points: "18 15 12 9 6 15" }))), index.h("input", { key: '15eb767d9318c6d3e7aa0075bf9c3362adf75dd3', 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: '5c808f40c040e8ff3e4632738f58e9941e69ec03', 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: 'bad9dba94e622c208cb26823963664ff77fc7799', 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: '92eb0d63e7be970b2207cc0c47964eef48005baf', points: "6 9 12 15 18 9" }))))), this.use12HourFormat && (index.h("div", { key: '8a3235abb0bf0764993271ff4969ca6aaac83bd7', class: `${this.elementClassName}__period` }, index.h("button", { key: 'd8f0679faadf7f0cf04e2f57bed4e9c202d0a056', type: "button", class: {
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: {
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: '393802044645d205a71ae593227df550adce2970', 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: 'cf9f1f261456d7b5f64bf4b7d9ddbbb2e86d4447', 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))))));
@@ -38,7 +38,7 @@ const InclusiveTimes = class {
38
38
  // Reference date used for Chrono date parsing. Equals "today"
39
39
  this.referenceDate = utils.getISODateString(new Date());
40
40
  // Use 12-hour format with AM/PM
41
- this.use12HourFormat = true;
41
+ this.useTwelveHourFormat = true;
42
42
  // Labels used for internal translations
43
43
  this.timesLabels = defaultLabels;
44
44
  // Prevent hiding the calendar
@@ -64,6 +64,7 @@ const InclusiveTimes = class {
64
64
  // If true, format input on blur/accept (like dates)
65
65
  this.inputShouldFormat = true;
66
66
  this.disableFreeformInput = false;
67
+ this.inputClass = "";
67
68
  this.selectedHours = 12;
68
69
  this.selectedMinutes = 0;
69
70
  this.errorState = this.hasError;
@@ -228,7 +229,10 @@ const InclusiveTimes = class {
228
229
  }
229
230
  render() {
230
231
  var _a;
231
- return (index.h(index.Host, { key: 'e049ca8df298088e704f6baf200bab775a486c22', class: this.elementClassName, "has-error": this.errorState, disabled: this.disabledState }, index.h("label", { key: '241ac63dc3d804457e3e5e14c3d7818b9592c581', htmlFor: `${this.id}-input`, class: this.getClassName("label") }, this.label), index.h("div", { key: 'f18e007c9ec383f75ea34d29c9ee03216ee86bf4', class: this.getClassName("input-container") }, index.h("input", { key: '99da2013aa8b86f717e8a6e9f94f86cf15062721', id: `${this.id}-input`, ref: (r) => (this.inputRef = r), type: "text", class: this.getClassName("input"), 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: 'c122ddd762f648f63c7b3d942b7bde858bbfdca9', type: "button", ref: (r) => (this.calendarButtonRef = r), 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: 'b5aacee01555fb5b2503421555b280a71ddabba5', label: this.timesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
232
+ return (index.h(index.Host, { key: 'a2bfc28b058319e0e1c723483c0f98aae766a371', class: this.elementClassName, "has-error": this.errorState, disabled: this.disabledState }, index.h("label", { key: '072b5974746736864e482853198409c969dff6d7', htmlFor: `${this.id}-input`, class: this.getClassName("label") }, this.label), index.h("div", { key: 'bcc38045d990ce22960cdbfbbf43a218b05cdb12', class: this.getClassName("input-container") }, index.h("input", { key: 'e741093da1a37022ad73bd27fc2aecfaa39b5a6c', id: `${this.id}-input`, ref: (r) => (this.inputRef = r), type: "text", class: {
233
+ [this.getClassName("input")]: true,
234
+ [this.inputClass]: !!this.inputClass
235
+ }, 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: '9c088d60d8ed20d6e385bd2467766091a0ffab60', type: "button", ref: (r) => (this.calendarButtonRef = r), 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: 'a2df562a114f9131b8a43d7f226d09b07cd21c63', label: this.timesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
232
236
  if (this.pickerRef) {
233
237
  this.pickerRef.modalIsOpen = true;
234
238
  }
@@ -236,7 +240,7 @@ const InclusiveTimes = class {
236
240
  if (this.pickerRef) {
237
241
  this.pickerRef.modalIsOpen = false;
238
242
  }
239
- }, inline: this.inline }, index.h("div", { key: '4d9b8dc721d56ea3e9123151058a149c5dfbb109', class: this.getClassName("picker-container") }, index.h("tabworthy-dates-calendar", { key: '5f6f874feb06b72e0d0774bfe26ba3005c285033', 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 }, index.h("div", { key: '7cd02c57b4af45caaaa6da7899697d4ea6f35e60', slot: "after-calendar", class: this.getClassName("time-section") }, index.h("hr", { key: '56f2cb3676b2001252ec4960f6ec4931fa451d29', class: this.getClassName("divider") }), index.h("tabworthy-times-picker", { key: '300a3c17e2fd25aa37ca75cb287e28dfb41f3ccd', hours: this.selectedHours, minutes: this.selectedMinutes, use12HourFormat: this.use12HourFormat, disabled: this.disabledState, onTimeChanged: this.handleTimeChange }))))), this.errorState && (index.h("div", { key: '96803190678fb12f4ed5f4ad5a28a29ab98c0c66', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
243
+ }, inline: this.inline }, index.h("div", { key: 'c02d2c09cbb10a99d65cdd37723dcb0b30c31800', class: this.getClassName("picker-container") }, index.h("tabworthy-dates-calendar", { key: 'ab24fcb28e457937f10d7914f0c65219fbd1aa7e', 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 }, index.h("div", { key: '1c2d6e1f290ef75840fd5ea33dd7debbe10d6cf4', slot: "after-calendar", class: this.getClassName("time-section") }, index.h("hr", { key: '34ed116961c27d81a4daf44c5c9325fad4b491fe', class: this.getClassName("divider") }), index.h("tabworthy-times-picker", { key: '5862db463ee502572c6d04bc039ddf8a51455511', hours: this.selectedHours, minutes: this.selectedMinutes, useTwelveHourFormat: this.useTwelveHourFormat, disabled: this.disabledState, onTimeChanged: this.handleTimeChange }))))), this.errorState && (index.h("div", { key: '2dccd8a4b09eed861c3e9c9ee9a02163ef2b0149', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
240
244
  }
241
245
  get el() { return index.getElement(this); }
242
246
  static get watchers() { return {
@@ -70,6 +70,7 @@ export class TabworthyDates {
70
70
  // Show or hide the quick buttons
71
71
  this.showQuickButtons = true;
72
72
  this.disableFreeformInput = false;
73
+ this.inputClass = "";
73
74
  this.errorState = this.hasError;
74
75
  this.disabledState = this.disabled;
75
76
  this.chronoSupportedLocale = ["en", "ja", "fr", "nl", "ru", "pt"].includes(this.locale.slice(0, 2));
@@ -422,7 +423,10 @@ export class TabworthyDates {
422
423
  }
423
424
  render() {
424
425
  var _a;
425
- return (h(Host, { key: '6fd878d7a0073344895525a82533925fcd24c372' }, h("label", { key: '550382a2ea99201b465fa9fd9ee90a917c5ff7e6', htmlFor: this.id ? `${this.id}-input` : undefined, class: this.getClassName("label") }, this.label), h("br", { key: 'fd6fb69543f81bef9a15157b94a25a5fa107ef70' }), h("div", { key: 'fcc9c10276e35f28435829eea17dfed27373f55c', class: this.getClassName("input-container") }, h("input", { key: '24da8c1582dc66f65a0eb6c6ab380b28bbf1c5ca', disabled: this.disabledState || this.disableFreeformInput, id: this.id ? `${this.id}-input` : undefined, type: "text", placeholder: this.placeholder, class: this.getClassName("input"), 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: '54cd337b5ddd3ea6aa6ecd59a8fadf2cb5b61026', type: "button", ref: (r) => (this.calendarButtonRef = r), 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: 'cd8bd92d251d3c2566c9da9f8039ccc2ab74750f', label: this.datesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
426
+ return (h(Host, { key: 'd424c911d4fd2d05222249b401e9b704430e6f29' }, h("label", { key: 'd14130a7b0b02e7124f7c7e9ec0642620da7aab6', htmlFor: this.id ? `${this.id}-input` : undefined, class: this.getClassName("label") }, this.label), h("br", { key: 'c4f5397785326f323772f46a8cfb6d868f5ff230' }), h("div", { key: '9f52005781b9a54426ee3c094727b8890681a4d5', class: this.getClassName("input-container") }, h("input", { key: 'e67af61ef75a592acadcfbd14da4527b84b08417', disabled: this.disabledState || this.disableFreeformInput, id: this.id ? `${this.id}-input` : undefined, type: "text", placeholder: this.placeholder, class: {
427
+ [this.getClassName("input")]: true,
428
+ [this.inputClass]: !!this.inputClass
429
+ }, 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: 'dd9421438de95497d2e7037cfc927bb0f27cd3c0', type: "button", ref: (r) => (this.calendarButtonRef = r), 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: 'b8a3278a07bc1ddc36eac5a0c9808595c4bcdde5', label: this.datesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
426
430
  if (!this.pickerRef)
427
431
  return;
428
432
  this.pickerRef.modalIsOpen = true;
@@ -430,11 +434,11 @@ export class TabworthyDates {
430
434
  if (!this.pickerRef)
431
435
  return;
432
436
  this.pickerRef.modalIsOpen = false;
433
- }, inline: this.inline }, h("tabworthy-dates-calendar", { key: '929272a053e0109e34d4b2d8456064fc14093912', 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 &&
437
+ }, inline: this.inline }, h("tabworthy-dates-calendar", { key: '29dc57f6a1951091476de39c8861b43d83242007', 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 &&
434
438
  ((_a = this.quickButtons) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
435
- this.chronoSupportedLocale && (h("div", { key: 'aead258880c9531e3fb72111f1fd47ebfa35931a', class: this.getClassName("quick-group"), role: "group", "aria-label": "Quick selection" }, this.quickButtons.map((buttonText) => {
439
+ this.chronoSupportedLocale && (h("div", { key: '1bb09b44a219648203d803c76d17a9b41b0278bf', class: this.getClassName("quick-group"), role: "group", "aria-label": "Quick selection" }, this.quickButtons.map((buttonText) => {
436
440
  return (h("button", { class: this.getClassName("quick-button"), onClick: this.handleQuickButtonClick, disabled: this.disabledState, type: "button" }, buttonText));
437
- }))), this.errorState && (h("div", { key: '193fe31b36da600e9f222f2576c3bee2d4e0a427', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
441
+ }))), this.errorState && (h("div", { key: '92d843bf6d0234568bf41a0fd2fdf281cb48487f', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
438
442
  }
439
443
  static get is() { return "tabworthy-dates"; }
440
444
  static get encapsulation() { return "scoped"; }
@@ -964,7 +968,7 @@ export class TabworthyDates {
964
968
  "references": {}
965
969
  },
966
970
  "required": false,
967
- "optional": true,
971
+ "optional": false,
968
972
  "docs": {
969
973
  "tags": [],
970
974
  "text": ""
@@ -1110,6 +1114,26 @@ export class TabworthyDates {
1110
1114
  "reflect": false,
1111
1115
  "attribute": "disable-freeform-input",
1112
1116
  "defaultValue": "false"
1117
+ },
1118
+ "inputClass": {
1119
+ "type": "string",
1120
+ "mutable": false,
1121
+ "complexType": {
1122
+ "original": "string",
1123
+ "resolved": "string",
1124
+ "references": {}
1125
+ },
1126
+ "required": false,
1127
+ "optional": false,
1128
+ "docs": {
1129
+ "tags": [],
1130
+ "text": ""
1131
+ },
1132
+ "getter": false,
1133
+ "setter": false,
1134
+ "reflect": false,
1135
+ "attribute": "input-class",
1136
+ "defaultValue": "\"\""
1113
1137
  }
1114
1138
  };
1115
1139
  }
@@ -31,7 +31,7 @@ export class InclusiveTimes {
31
31
  // Reference date used for Chrono date parsing. Equals "today"
32
32
  this.referenceDate = getISODateString(new Date());
33
33
  // Use 12-hour format with AM/PM
34
- this.use12HourFormat = true;
34
+ this.useTwelveHourFormat = true;
35
35
  // Labels used for internal translations
36
36
  this.timesLabels = defaultLabels;
37
37
  // Prevent hiding the calendar
@@ -57,6 +57,7 @@ export class InclusiveTimes {
57
57
  // If true, format input on blur/accept (like dates)
58
58
  this.inputShouldFormat = true;
59
59
  this.disableFreeformInput = false;
60
+ this.inputClass = "";
60
61
  this.selectedHours = 12;
61
62
  this.selectedMinutes = 0;
62
63
  this.errorState = this.hasError;
@@ -221,7 +222,10 @@ export class InclusiveTimes {
221
222
  }
222
223
  render() {
223
224
  var _a;
224
- return (h(Host, { key: 'e049ca8df298088e704f6baf200bab775a486c22', class: this.elementClassName, "has-error": this.errorState, disabled: this.disabledState }, h("label", { key: '241ac63dc3d804457e3e5e14c3d7818b9592c581', htmlFor: `${this.id}-input`, class: this.getClassName("label") }, this.label), h("div", { key: 'f18e007c9ec383f75ea34d29c9ee03216ee86bf4', class: this.getClassName("input-container") }, h("input", { key: '99da2013aa8b86f717e8a6e9f94f86cf15062721', id: `${this.id}-input`, ref: (r) => (this.inputRef = r), type: "text", class: this.getClassName("input"), 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: 'c122ddd762f648f63c7b3d942b7bde858bbfdca9', type: "button", ref: (r) => (this.calendarButtonRef = r), 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: 'b5aacee01555fb5b2503421555b280a71ddabba5', label: this.timesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
225
+ return (h(Host, { key: 'a2bfc28b058319e0e1c723483c0f98aae766a371', class: this.elementClassName, "has-error": this.errorState, disabled: this.disabledState }, h("label", { key: '072b5974746736864e482853198409c969dff6d7', htmlFor: `${this.id}-input`, class: this.getClassName("label") }, this.label), h("div", { key: 'bcc38045d990ce22960cdbfbbf43a218b05cdb12', class: this.getClassName("input-container") }, h("input", { key: 'e741093da1a37022ad73bd27fc2aecfaa39b5a6c', id: `${this.id}-input`, ref: (r) => (this.inputRef = r), type: "text", class: {
226
+ [this.getClassName("input")]: true,
227
+ [this.inputClass]: !!this.inputClass
228
+ }, 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: '9c088d60d8ed20d6e385bd2467766091a0ffab60', type: "button", ref: (r) => (this.calendarButtonRef = r), 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: 'a2df562a114f9131b8a43d7f226d09b07cd21c63', label: this.timesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
225
229
  if (this.pickerRef) {
226
230
  this.pickerRef.modalIsOpen = true;
227
231
  }
@@ -229,7 +233,7 @@ export class InclusiveTimes {
229
233
  if (this.pickerRef) {
230
234
  this.pickerRef.modalIsOpen = false;
231
235
  }
232
- }, inline: this.inline }, h("div", { key: '4d9b8dc721d56ea3e9123151058a149c5dfbb109', class: this.getClassName("picker-container") }, h("tabworthy-dates-calendar", { key: '5f6f874feb06b72e0d0774bfe26ba3005c285033', 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 }, h("div", { key: '7cd02c57b4af45caaaa6da7899697d4ea6f35e60', slot: "after-calendar", class: this.getClassName("time-section") }, h("hr", { key: '56f2cb3676b2001252ec4960f6ec4931fa451d29', class: this.getClassName("divider") }), h("tabworthy-times-picker", { key: '300a3c17e2fd25aa37ca75cb287e28dfb41f3ccd', hours: this.selectedHours, minutes: this.selectedMinutes, use12HourFormat: this.use12HourFormat, disabled: this.disabledState, onTimeChanged: this.handleTimeChange }))))), this.errorState && (h("div", { key: '96803190678fb12f4ed5f4ad5a28a29ab98c0c66', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
236
+ }, inline: this.inline }, h("div", { key: 'c02d2c09cbb10a99d65cdd37723dcb0b30c31800', class: this.getClassName("picker-container") }, h("tabworthy-dates-calendar", { key: 'ab24fcb28e457937f10d7914f0c65219fbd1aa7e', 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 }, h("div", { key: '1c2d6e1f290ef75840fd5ea33dd7debbe10d6cf4', slot: "after-calendar", class: this.getClassName("time-section") }, h("hr", { key: '34ed116961c27d81a4daf44c5c9325fad4b491fe', class: this.getClassName("divider") }), h("tabworthy-times-picker", { key: '5862db463ee502572c6d04bc039ddf8a51455511', hours: this.selectedHours, minutes: this.selectedMinutes, useTwelveHourFormat: this.useTwelveHourFormat, disabled: this.disabledState, onTimeChanged: this.handleTimeChange }))))), this.errorState && (h("div", { key: '2dccd8a4b09eed861c3e9c9ee9a02163ef2b0149', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
233
237
  }
234
238
  static get is() { return "tabworthy-times"; }
235
239
  static get encapsulation() { return "scoped"; }
@@ -451,7 +455,7 @@ export class InclusiveTimes {
451
455
  "attribute": "reference-date",
452
456
  "defaultValue": "getISODateString(new Date())"
453
457
  },
454
- "use12HourFormat": {
458
+ "useTwelveHourFormat": {
455
459
  "type": "boolean",
456
460
  "mutable": false,
457
461
  "complexType": {
@@ -468,7 +472,7 @@ export class InclusiveTimes {
468
472
  "getter": false,
469
473
  "setter": false,
470
474
  "reflect": false,
471
- "attribute": "use-1-2-hour-format",
475
+ "attribute": "use-twelve-hour-format",
472
476
  "defaultValue": "true"
473
477
  },
474
478
  "timesLabels": {
@@ -780,6 +784,26 @@ export class InclusiveTimes {
780
784
  "reflect": false,
781
785
  "attribute": "disable-freeform-input",
782
786
  "defaultValue": "false"
787
+ },
788
+ "inputClass": {
789
+ "type": "string",
790
+ "mutable": false,
791
+ "complexType": {
792
+ "original": "string",
793
+ "resolved": "string",
794
+ "references": {}
795
+ },
796
+ "required": false,
797
+ "optional": false,
798
+ "docs": {
799
+ "tags": [],
800
+ "text": ""
801
+ },
802
+ "getter": false,
803
+ "setter": false,
804
+ "reflect": false,
805
+ "attribute": "input-class",
806
+ "defaultValue": "\"\""
783
807
  }
784
808
  };
785
809
  }
@@ -15,7 +15,7 @@ export class InclusiveTimesPicker {
15
15
  // Current time value (24-hour format)
16
16
  this.hours = 12;
17
17
  this.minutes = 0;
18
- this.use12HourFormat = false;
18
+ this.useTwelveHourFormat = false;
19
19
  // Labels for accessibility and i18n
20
20
  this.labels = defaultLabels;
21
21
  // Hide labels visually but keep them for screen readers
@@ -27,7 +27,7 @@ export class InclusiveTimesPicker {
27
27
  this.period = this.hours >= 12 ? "PM" : "AM";
28
28
  this.handleHourChange = (e) => {
29
29
  const value = parseInt(e.target.value, 10);
30
- if (this.use12HourFormat) {
30
+ if (this.useTwelveHourFormat) {
31
31
  // Convert to 24-hour format based on period
32
32
  if (this.period === "AM") {
33
33
  this.internalHours = value === 12 ? 0 : value;
@@ -46,7 +46,7 @@ export class InclusiveTimesPicker {
46
46
  this.emitTimeChange();
47
47
  };
48
48
  this.handlePeriodChange = (period) => {
49
- if (this.period === period || !this.use12HourFormat)
49
+ if (this.period === period || !this.useTwelveHourFormat)
50
50
  return;
51
51
  this.period = period;
52
52
  // Convert hours based on new period
@@ -60,7 +60,7 @@ export class InclusiveTimesPicker {
60
60
  this.emitTimeChange();
61
61
  };
62
62
  this.handleHourIncrement = () => {
63
- if (this.use12HourFormat) {
63
+ if (this.useTwelveHourFormat) {
64
64
  const displayHours = this.getDisplayHours();
65
65
  const newDisplayHours = displayHours === 12 ? 1 : displayHours + 1;
66
66
  if (this.period === "AM") {
@@ -76,7 +76,7 @@ export class InclusiveTimesPicker {
76
76
  this.emitTimeChange();
77
77
  };
78
78
  this.handleHourDecrement = () => {
79
- if (this.use12HourFormat) {
79
+ if (this.useTwelveHourFormat) {
80
80
  const displayHours = this.getDisplayHours();
81
81
  const newDisplayHours = displayHours === 1 ? 12 : displayHours - 1;
82
82
  if (this.period === "AM") {
@@ -115,7 +115,7 @@ export class InclusiveTimesPicker {
115
115
  this.period = this.hours >= 12 ? "PM" : "AM";
116
116
  }
117
117
  getDisplayHours() {
118
- if (!this.use12HourFormat) {
118
+ if (!this.useTwelveHourFormat) {
119
119
  return this.internalHours;
120
120
  }
121
121
  if (this.internalHours === 0)
@@ -125,7 +125,7 @@ export class InclusiveTimesPicker {
125
125
  return this.internalHours;
126
126
  }
127
127
  get24HourValue() {
128
- if (!this.use12HourFormat) {
128
+ if (!this.useTwelveHourFormat) {
129
129
  return this.internalHours;
130
130
  }
131
131
  const displayHours = this.getDisplayHours();
@@ -140,7 +140,7 @@ export class InclusiveTimesPicker {
140
140
  this.timeChanged.emit({
141
141
  hours: this.get24HourValue(),
142
142
  minutes: this.internalMinutes,
143
- period: this.use12HourFormat ? this.period : undefined
143
+ period: this.useTwelveHourFormat ? this.period : undefined
144
144
  });
145
145
  }
146
146
  padZero(num) {
@@ -148,18 +148,18 @@ export class InclusiveTimesPicker {
148
148
  }
149
149
  render() {
150
150
  const displayHours = this.getDisplayHours();
151
- const maxHours = this.use12HourFormat ? 12 : 23;
152
- const minHours = this.use12HourFormat ? 1 : 0;
153
- return (h(Host, { key: '22eb745a93c68e4e4f78c11d2941681897aa73ef', class: this.elementClassName, "aria-label": this.labels.timePicker }, h("div", { key: 'ccb05b5d5793442b63aa4c25d5120db8b60bedf3', class: `${this.elementClassName}__container` }, h("div", { key: '3fc4ede2d685e43edcfefe8c88de19f705e94478', class: `${this.elementClassName}__field` }, h("label", { key: 'fb04e846fc9807155c4390e92722850cdaa4bba2', htmlFor: `${this.elementClassName}-hours`, class: {
151
+ const maxHours = this.useTwelveHourFormat ? 12 : 23;
152
+ const minHours = this.useTwelveHourFormat ? 1 : 0;
153
+ return (h(Host, { key: '6ccec0415bd1c35275e125355f69e871a2b3dc18', class: this.elementClassName, "aria-label": this.labels.timePicker }, h("div", { key: '52849e2d4e8ad6183d3017277f11fbd5bc3643c5', class: `${this.elementClassName}__container` }, h("div", { key: '9aa3980e371db20ae4ed4f590a0e9f49aa3d40cd', class: `${this.elementClassName}__field` }, h("label", { key: '77ea146e2d05b4bedec83a8d03096a6c51b6fd36', htmlFor: `${this.elementClassName}-hours`, class: {
154
154
  [`${this.elementClassName}__label`]: true,
155
155
  [`${this.elementClassName}__label--sr-only`]: this.labelsSrOnly
156
- } }, this.labels.hours), h("div", { key: 'd5ed4a06ea4ce2eaaefda2fa316a4789aa4a210a', class: `${this.elementClassName}__control` }, h("button", { key: '193c89e3b50934225c05f3241546bc3e7063b1b8', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--increment`, onClick: this.handleHourIncrement, disabled: this.disabled, "aria-label": this.labels.incrementHours }, h("svg", { key: 'f6cefeb18839bce2b644d92608f802bc001377b3', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, h("polyline", { key: '58519a5d7a8cddfe2273f5c8beec3eab7307b43c', points: "18 15 12 9 6 15" }))), h("input", { key: '187ace01f2d83ad59766159d6509e30100b7f812', 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 }), h("button", { key: '3bbe5b73ac8a85c165f0332d3c70d30aede096e6', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--decrement`, onClick: this.handleHourDecrement, disabled: this.disabled, "aria-label": this.labels.decrementHours }, h("svg", { key: 'fd7c431618e09d4326c95398f83f22ea2258695e', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, h("polyline", { key: '99aab5a584aed4d8fc1b30dcada0c76e42ba6ac7', points: "6 9 12 15 18 9" }))))), h("div", { key: 'a8958b60136f6220bbd944beaa6cf73c7660e3fb', class: `${this.elementClassName}__separator` }, ":"), h("div", { key: '72b46b517876dc8bc3490afef1860514b46efc46', class: `${this.elementClassName}__field` }, h("label", { key: 'e09788653c3873e97e1922fcda3076878f9b1ca7', htmlFor: `${this.elementClassName}-minutes`, class: {
156
+ } }, this.labels.hours), h("div", { key: 'cf88cc85dce2a2e11e5e0ca61ab23d5bcc71b7be', class: `${this.elementClassName}__control` }, 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 }, 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" }, h("polyline", { key: '1d2c3fca6e81b9fdaab6f9b9f2c19f55b1af0ef5', points: "18 15 12 9 6 15" }))), 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 }), 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 }, 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" }, h("polyline", { key: 'c8c08acec53576456b330c4f40a7879556704d0f', points: "6 9 12 15 18 9" }))))), h("div", { key: '3b8c0125c18518463de020682de4620d918a3463', class: `${this.elementClassName}__separator` }, ":"), h("div", { key: 'c54430db728d8f48320f4e4983a1d67a1ec8c78e', class: `${this.elementClassName}__field` }, h("label", { key: 'b47c7ae65c0b34b70673a8bd60c3b1496acf9540', htmlFor: `${this.elementClassName}-minutes`, class: {
157
157
  [`${this.elementClassName}__label`]: true,
158
158
  [`${this.elementClassName}__label--sr-only`]: this.labelsSrOnly
159
- } }, this.labels.minutes), h("div", { key: '7bf9642b58249014b2ad802c3fe30f67e5354f4d', class: `${this.elementClassName}__control` }, h("button", { key: '71c889d966bceb4aa9e7b6f78c57e968b207ddda', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--increment`, onClick: this.handleMinuteIncrement, disabled: this.disabled, "aria-label": this.labels.incrementMinutes }, h("svg", { key: '3aad10f2b79e5e819277d4566ab7d336449162f9', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, h("polyline", { key: '68dfdfc6cd2bd1f8f916dbf60155eb2cc4a8328d', points: "18 15 12 9 6 15" }))), h("input", { key: '15eb767d9318c6d3e7aa0075bf9c3362adf75dd3', id: `${this.elementClassName}-minutes`, type: "number", class: `${this.elementClassName}__input`, value: this.padZero(this.internalMinutes), min: 0, max: 59, onInput: this.handleMinuteChange, disabled: this.disabled, "aria-label": this.labels.minutes }), h("button", { key: '5c808f40c040e8ff3e4632738f58e9941e69ec03', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--decrement`, onClick: this.handleMinuteDecrement, disabled: this.disabled, "aria-label": this.labels.decrementMinutes }, h("svg", { key: 'bad9dba94e622c208cb26823963664ff77fc7799', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, h("polyline", { key: '92eb0d63e7be970b2207cc0c47964eef48005baf', points: "6 9 12 15 18 9" }))))), this.use12HourFormat && (h("div", { key: '8a3235abb0bf0764993271ff4969ca6aaac83bd7', class: `${this.elementClassName}__period` }, h("button", { key: 'd8f0679faadf7f0cf04e2f57bed4e9c202d0a056', type: "button", class: {
159
+ } }, this.labels.minutes), h("div", { key: '9a4434d935f34bfd910e2ab7656fc125c05de9ca', class: `${this.elementClassName}__control` }, 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 }, 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" }, h("polyline", { key: '086fbe45c600657c2f6bf37e8415b87e8d763c3e', points: "18 15 12 9 6 15" }))), 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 }), 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 }, 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" }, h("polyline", { key: '3da5561fb1f5bf1b07eb48de6e020047c1956158', points: "6 9 12 15 18 9" }))))), this.useTwelveHourFormat && (h("div", { key: '24c87e5e371f8a10816afcebb3dc2f7843fa89f5', class: `${this.elementClassName}__period` }, h("button", { key: '014126a0d5470d56ae384e12b2e196c3a9132700', type: "button", class: {
160
160
  [`${this.elementClassName}__period-button`]: true,
161
161
  [`${this.elementClassName}__period-button--active`]: this.period === "AM"
162
- }, onClick: () => this.handlePeriodChange("AM"), disabled: this.disabled, "aria-label": this.labels.am, "aria-pressed": this.period === "AM" }, this.labels.am), h("button", { key: '393802044645d205a71ae593227df550adce2970', type: "button", class: {
162
+ }, onClick: () => this.handlePeriodChange("AM"), disabled: this.disabled, "aria-label": this.labels.am, "aria-pressed": this.period === "AM" }, this.labels.am), h("button", { key: 'cf9f1f261456d7b5f64bf4b7d9ddbbb2e86d4447', type: "button", class: {
163
163
  [`${this.elementClassName}__period-button`]: true,
164
164
  [`${this.elementClassName}__period-button--active`]: this.period === "PM"
165
165
  }, onClick: () => this.handlePeriodChange("PM"), disabled: this.disabled, "aria-label": this.labels.pm, "aria-pressed": this.period === "PM" }, this.labels.pm))))));
@@ -208,7 +208,7 @@ export class InclusiveTimesPicker {
208
208
  "attribute": "minutes",
209
209
  "defaultValue": "0"
210
210
  },
211
- "use12HourFormat": {
211
+ "useTwelveHourFormat": {
212
212
  "type": "boolean",
213
213
  "mutable": false,
214
214
  "complexType": {
@@ -225,7 +225,7 @@ export class InclusiveTimesPicker {
225
225
  "getter": false,
226
226
  "setter": false,
227
227
  "reflect": false,
228
- "attribute": "use-1-2-hour-format",
228
+ "attribute": "use-twelve-hour-format",
229
229
  "defaultValue": "false"
230
230
  },
231
231
  "labels": {