@tabworthy/components 0.8.7 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/cjs/{index-w-Wtojyv.js → index-B1s0tI-Z.js} +21 -0
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/tabworthy-components.cjs.js +2 -2
  4. package/dist/cjs/tabworthy-dates-calendar_2.cjs.entry.js +1960 -8
  5. package/dist/cjs/tabworthy-dates.cjs.entry.js +11 -9
  6. package/dist/cjs/tabworthy-times-picker.cjs.entry.js +1 -1
  7. package/dist/cjs/tabworthy-times.cjs.entry.js +6 -5
  8. package/dist/collection/components/tabworthy-dates/tabworthy-dates.js +34 -8
  9. package/dist/collection/components/tabworthy-modal/tabworthy-dates-modal.css +4 -1
  10. package/dist/collection/components/tabworthy-modal/tabworthy-dates-modal.js +257 -5
  11. package/dist/collection/components/tabworthy-times/tabworthy-times.js +29 -4
  12. package/dist/components/index.js +1 -1
  13. package/dist/components/{p-DT8TK_a8.js → p-B8sG1vGD.js} +1 -1
  14. package/dist/components/{p-Bnmroodq.js → p-B9YA6avR.js} +1 -1
  15. package/dist/components/p-B9fGfjA-.js +1 -0
  16. package/dist/components/p-BiJ0HZVY.js +1 -0
  17. package/dist/components/tabworthy-dates-calendar.js +1 -1
  18. package/dist/components/tabworthy-dates-modal.js +1 -1
  19. package/dist/components/tabworthy-dates.js +1 -1
  20. package/dist/components/tabworthy-times-picker.js +1 -1
  21. package/dist/components/tabworthy-times.js +1 -1
  22. package/dist/esm/{index-CDFauf_3.js → index-CwtZ_Lud.js} +21 -0
  23. package/dist/esm/loader.js +3 -3
  24. package/dist/esm/tabworthy-components.js +3 -3
  25. package/dist/esm/tabworthy-dates-calendar_2.entry.js +1960 -8
  26. package/dist/esm/tabworthy-dates.entry.js +11 -9
  27. package/dist/esm/tabworthy-times-picker.entry.js +1 -1
  28. package/dist/esm/tabworthy-times.entry.js +6 -5
  29. package/dist/tabworthy-components/{p-224503da.entry.js → p-0e77d058.entry.js} +1 -1
  30. package/dist/tabworthy-components/{p-8416e0a9.entry.js → p-4eec41e5.entry.js} +1 -1
  31. package/dist/tabworthy-components/p-CwtZ_Lud.js +2 -0
  32. package/dist/tabworthy-components/p-ee41beed.entry.js +1 -0
  33. package/dist/tabworthy-components/{p-dcb3ea8d.entry.js → p-fdb3b911.entry.js} +1 -1
  34. package/dist/tabworthy-components/tabworthy-components.esm.js +1 -1
  35. package/dist/themes/light.css +1 -1
  36. package/dist/types/components/tabworthy-dates/tabworthy-dates.d.ts +7 -1
  37. package/dist/types/components/tabworthy-modal/tabworthy-dates-modal.d.ts +27 -0
  38. package/dist/types/components/tabworthy-times/tabworthy-times.d.ts +7 -2
  39. package/dist/types/components.d.ts +54 -0
  40. package/package.json +2 -1
  41. package/dist/components/p-CGobNAdR.js +0 -1
  42. package/dist/components/p-Kr35QPhi.js +0 -1
  43. package/dist/tabworthy-components/p-CDFauf_3.js +0 -2
  44. package/dist/tabworthy-components/p-e66c010b.entry.js +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index$1 = require('./index-w-Wtojyv.js');
3
+ var index$1 = require('./index-B1s0tI-Z.js');
4
4
  var moment = require('./moment-CdViwxPQ.js');
5
5
  var utils = require('./utils-y5Vtky2t.js');
6
6
 
@@ -10482,7 +10482,8 @@ const defaultLabels = {
10482
10482
  rangeOutOfBoundsError: `Please enter a valid range of dates`,
10483
10483
  disabledDateError: `Please choose an available date`,
10484
10484
  to: "to",
10485
- startDate: "Start date"
10485
+ startDate: "Start date",
10486
+ quickSelection: "Quick selection"
10486
10487
  };
10487
10488
  const TabworthyDates = class {
10488
10489
  constructor(hostRef) {
@@ -10551,8 +10552,9 @@ const TabworthyDates = class {
10551
10552
  this.handleCalendarButtonClick = async () => {
10552
10553
  var _a, _b, _c, _d, _e;
10553
10554
  await customElements.whenDefined("tabworthy-dates-modal");
10554
- this.calendarButtonRef &&
10555
- (await ((_a = this.modalRef) === null || _a === void 0 ? void 0 : _a.setTriggerElement(this.calendarButtonRef)));
10555
+ // Use input container as trigger for proper dropdown alignment
10556
+ this.inputContainerRef &&
10557
+ (await ((_a = this.modalRef) === null || _a === void 0 ? void 0 : _a.setTriggerElement(this.inputContainerRef)));
10556
10558
  if ((await ((_b = this.modalRef) === null || _b === void 0 ? void 0 : _b.getState())) === false)
10557
10559
  await ((_c = this.modalRef) === null || _c === void 0 ? void 0 : _c.open());
10558
10560
  else if ((await ((_d = this.modalRef) === null || _d === void 0 ? void 0 : _d.getState())) === true)
@@ -10910,10 +10912,10 @@ const TabworthyDates = class {
10910
10912
  }
10911
10913
  render() {
10912
10914
  var _a;
10913
- return (index$1.h(index$1.Host, { key: 'e88b264159dd97824a678fd47e735daa7d6e7937' }, index$1.h("label", { key: 'bd130dbe90559f0f02760c0cd98069121208ead8', htmlFor: this.id ? `${this.id}-input` : undefined, class: this.getClassName("label") }, this.label), index$1.h("br", { key: 'e32218a5fd45461d589d10f7ed24b4512475f5e7' }), index$1.h("div", { key: '6a17c542843f1cbe42a17a6c437422773f17da5c', class: this.getClassName("input-container") }, index$1.h("input", { key: '72688ef25cd185f1c64e385602af5ac758eef488', disabled: this.disabledState || this.disableFreeformInput, id: this.id ? `${this.id}-input` : undefined, type: "text", placeholder: this.placeholder, class: {
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: {
10914
10916
  [this.getClassName("input")]: true,
10915
10917
  [this.inputClass]: !!this.inputClass
10916
- }, 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: '89acd9aa82cb8c10b7f73e351620babfc13bc96f', 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: '3a853a44a3637007547aba3f55d41f8c4f4ce363', label: this.datesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
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: () => {
10917
10919
  if (!this.pickerRef)
10918
10920
  return;
10919
10921
  this.pickerRef.modalIsOpen = true;
@@ -10921,11 +10923,11 @@ const TabworthyDates = class {
10921
10923
  if (!this.pickerRef)
10922
10924
  return;
10923
10925
  this.pickerRef.modalIsOpen = false;
10924
- }, inline: this.inline }, index$1.h("tabworthy-dates-calendar", { key: '12900a935aebd37116e805a0528966ab3bbff699', 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 &&
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 &&
10925
10927
  ((_a = this.quickButtons) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
10926
- this.chronoSupportedLocale && (index$1.h("div", { key: 'db492a4c33d882a7f056dd66d669cd639894a714', class: this.getClassName("quick-group"), role: "group", "aria-label": "Quick selection" }, this.quickButtons.map((buttonText) => {
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) => {
10927
10929
  return (index$1.h("button", { class: this.getClassName("quick-button"), onClick: this.handleQuickButtonClick, disabled: this.disabledState, type: "button" }, buttonText));
10928
- }))), this.errorState && (index$1.h("div", { key: '8a4a4d89be39da4438beda996b2f1f3b785d9010', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
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))));
10929
10931
  }
10930
10932
  get el() { return index$1.getElement(this); }
10931
10933
  static get watchers() { return {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-w-Wtojyv.js');
3
+ var index = require('./index-B1s0tI-Z.js');
4
4
 
5
5
  const defaultLabels = {
6
6
  hours: "Hours",
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-w-Wtojyv.js');
3
+ var index = require('./index-B1s0tI-Z.js');
4
4
  var moment = require('./moment-CdViwxPQ.js');
5
5
  var utils = require('./utils-y5Vtky2t.js');
6
6
 
@@ -100,7 +100,8 @@ const InclusiveTimes = class {
100
100
  };
101
101
  this.handleCalendarButtonClick = async () => {
102
102
  if (this.modalRef) {
103
- await this.modalRef.setTriggerElement(this.calendarButtonRef);
103
+ // Use input container as trigger for proper dropdown alignment
104
+ await this.modalRef.setTriggerElement(this.inputContainerRef);
104
105
  await this.modalRef.open();
105
106
  }
106
107
  };
@@ -237,10 +238,10 @@ const InclusiveTimes = class {
237
238
  }
238
239
  render() {
239
240
  var _a;
240
- return (index.h(index.Host, { key: '82b7e3ac499f9b8bea87955bfe55bbe645aa9d5a', class: this.elementClassName, "has-error": this.errorState, disabled: this.disabledState }, index.h("label", { key: '19a9a6cf34bccd49e6d079a4d9d7d5f3e527f1c7', htmlFor: `${this.id}-input`, class: this.getClassName("label") }, this.label), index.h("div", { key: '20a4dae28141bb9d3d124653df0f8f3a152a2ee8', class: this.getClassName("input-container") }, index.h("input", { key: '64779c1b8d59ecff3c9ddcbe0e67025e9bcbd325', id: `${this.id}-input`, ref: (r) => (this.inputRef = r), type: "text", class: {
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: {
241
242
  [this.getClassName("input")]: true,
242
243
  [this.inputClass]: !!this.inputClass
243
- }, 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: '503fb34dfa3b5328c1dfae06647601729d0c634d', 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: '915841d3053aae0e856b19ae24dafc8870c3d746', label: this.timesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
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: () => {
244
245
  if (this.pickerRef) {
245
246
  this.pickerRef.modalIsOpen = true;
246
247
  }
@@ -248,7 +249,7 @@ const InclusiveTimes = class {
248
249
  if (this.pickerRef) {
249
250
  this.pickerRef.modalIsOpen = false;
250
251
  }
251
- }, inline: this.inline }, index.h("div", { key: 'b7ead351553fa42af52be2ab8e461b49d6f63b56', class: this.getClassName("picker-container") }, index.h("tabworthy-dates-calendar", { key: '9397be905159540b8645428d7624c4c6f2dd5133', 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: '6aa58750a3a13fc3e1ddadee0a9c4631220bb399', slot: "after-calendar", class: this.getClassName("time-section") }, index.h("hr", { key: '17943c66cef11e8a4335cb0c0711d5ae327076e9', class: this.getClassName("divider") }), index.h("tabworthy-times-picker", { key: 'f356db7d523202ee5a72089cf57cf072787c32ee', hours: this.selectedHours, minutes: this.selectedMinutes, useTwelveHourFormat: this.useTwelveHourFormat, disabled: this.disabledState, onTimeChanged: this.handleTimeChange }))))), this.errorState && (index.h("div", { key: 'db47877aa13a91f6441dfd371cc7da70375aa1ea', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
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))));
252
253
  }
253
254
  get el() { return index.getElement(this); }
254
255
  static get watchers() { return {
@@ -13,7 +13,8 @@ const defaultLabels = {
13
13
  rangeOutOfBoundsError: `Please enter a valid range of dates`,
14
14
  disabledDateError: `Please choose an available date`,
15
15
  to: "to",
16
- startDate: "Start date"
16
+ startDate: "Start date",
17
+ quickSelection: "Quick selection"
17
18
  };
18
19
  export class TabworthyDates {
19
20
  constructor() {
@@ -78,8 +79,9 @@ export class TabworthyDates {
78
79
  this.handleCalendarButtonClick = async () => {
79
80
  var _a, _b, _c, _d, _e;
80
81
  await customElements.whenDefined("tabworthy-dates-modal");
81
- this.calendarButtonRef &&
82
- (await ((_a = this.modalRef) === null || _a === void 0 ? void 0 : _a.setTriggerElement(this.calendarButtonRef)));
82
+ // Use input container as trigger for proper dropdown alignment
83
+ this.inputContainerRef &&
84
+ (await ((_a = this.modalRef) === null || _a === void 0 ? void 0 : _a.setTriggerElement(this.inputContainerRef)));
83
85
  if ((await ((_b = this.modalRef) === null || _b === void 0 ? void 0 : _b.getState())) === false)
84
86
  await ((_c = this.modalRef) === null || _c === void 0 ? void 0 : _c.open());
85
87
  else if ((await ((_d = this.modalRef) === null || _d === void 0 ? void 0 : _d.getState())) === true)
@@ -437,10 +439,10 @@ export class TabworthyDates {
437
439
  }
438
440
  render() {
439
441
  var _a;
440
- return (h(Host, { key: 'e88b264159dd97824a678fd47e735daa7d6e7937' }, h("label", { key: 'bd130dbe90559f0f02760c0cd98069121208ead8', htmlFor: this.id ? `${this.id}-input` : undefined, class: this.getClassName("label") }, this.label), h("br", { key: 'e32218a5fd45461d589d10f7ed24b4512475f5e7' }), h("div", { key: '6a17c542843f1cbe42a17a6c437422773f17da5c', class: this.getClassName("input-container") }, h("input", { key: '72688ef25cd185f1c64e385602af5ac758eef488', disabled: this.disabledState || this.disableFreeformInput, id: this.id ? `${this.id}-input` : undefined, type: "text", placeholder: this.placeholder, class: {
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: {
441
443
  [this.getClassName("input")]: true,
442
444
  [this.inputClass]: !!this.inputClass
443
- }, 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: '89acd9aa82cb8c10b7f73e351620babfc13bc96f', 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: '3a853a44a3637007547aba3f55d41f8c4f4ce363', label: this.datesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
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: () => {
444
446
  if (!this.pickerRef)
445
447
  return;
446
448
  this.pickerRef.modalIsOpen = true;
@@ -448,11 +450,11 @@ export class TabworthyDates {
448
450
  if (!this.pickerRef)
449
451
  return;
450
452
  this.pickerRef.modalIsOpen = false;
451
- }, inline: this.inline }, h("tabworthy-dates-calendar", { key: '12900a935aebd37116e805a0528966ab3bbff699', 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 &&
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 &&
452
454
  ((_a = this.quickButtons) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
453
- this.chronoSupportedLocale && (h("div", { key: 'db492a4c33d882a7f056dd66d669cd639894a714', class: this.getClassName("quick-group"), role: "group", "aria-label": "Quick selection" }, this.quickButtons.map((buttonText) => {
455
+ this.chronoSupportedLocale && (h("div", { key: '26e0dc9ae8e91b308b9f159e5428ae3e0ac9a8c8', class: this.getClassName("quick-group"), role: "group", "aria-label": this.datesLabels.quickSelection }, this.quickButtons.map((buttonText) => {
454
456
  return (h("button", { class: this.getClassName("quick-button"), onClick: this.handleQuickButtonClick, disabled: this.disabledState, type: "button" }, buttonText));
455
- }))), this.errorState && (h("div", { key: '8a4a4d89be39da4438beda996b2f1f3b785d9010', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
457
+ }))), this.errorState && (h("div", { key: '434fecd9962fe0360536c6f0d96cb52e77034399', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
456
458
  }
457
459
  static get is() { return "tabworthy-dates"; }
458
460
  static get encapsulation() { return "scoped"; }
@@ -1148,6 +1150,30 @@ export class TabworthyDates {
1148
1150
  "reflect": false,
1149
1151
  "attribute": "input-class",
1150
1152
  "defaultValue": "\"\""
1153
+ },
1154
+ "appendTo": {
1155
+ "type": "string",
1156
+ "mutable": false,
1157
+ "complexType": {
1158
+ "original": "string | HTMLElement",
1159
+ "resolved": "HTMLElement | string",
1160
+ "references": {
1161
+ "HTMLElement": {
1162
+ "location": "global",
1163
+ "id": "global::HTMLElement"
1164
+ }
1165
+ }
1166
+ },
1167
+ "required": false,
1168
+ "optional": true,
1169
+ "docs": {
1170
+ "tags": [],
1171
+ "text": "Element to append the dropdown to. Use \"body\" to append to document.body,\nor pass a CSS selector or HTMLElement. Useful for escaping overflow:hidden containers."
1172
+ },
1173
+ "getter": false,
1174
+ "setter": false,
1175
+ "reflect": false,
1176
+ "attribute": "append-to"
1151
1177
  }
1152
1178
  };
1153
1179
  }
@@ -1,10 +1,13 @@
1
1
  :host::part(body) {
2
+ /* Popper.js sets position, top, left, transform */
2
3
  position: absolute;
4
+ top: 0;
5
+ left: 0;
3
6
  width: -moz-fit-content;
4
7
  width: fit-content;
5
8
  z-index: 1200;
6
- margin-top: 0.5rem;
7
9
  }
10
+
8
11
  :host::part(backdrop) {
9
12
  /* Placeholder */
10
13
  }
@@ -1,20 +1,139 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  import "@a11y/focus-trap";
3
3
  import { hideOthers } from "aria-hidden";
4
+ import { createPopper } from "@popperjs/core";
4
5
  /**
5
6
  * @slot slot - The dialog content
6
7
  */
7
8
  export class InclusiveDatesModal {
8
9
  constructor() {
9
10
  this.inline = false;
11
+ /** Preferred placement of the dropdown (Popper.js placement) */
12
+ this.placement = "bottom-start";
13
+ /** Offset from the trigger element [skidding, distance] */
14
+ this.offset = [0, 8];
10
15
  this.closing = false;
11
16
  this.showing = this.inline || false;
17
+ this.positioned = false;
18
+ this.originalParent = null;
19
+ this.originalNextSibling = null;
20
+ this.isMovingPortal = false;
21
+ this.popperInstance = null;
12
22
  this.onKeyDown = (event) => {
13
23
  if (event.code === "Escape") {
14
24
  this.close();
15
25
  }
16
26
  };
17
27
  }
28
+ watchShowing(newValue) {
29
+ if (newValue) {
30
+ // Reset positioned state - portal setup happens in render ref callback
31
+ this.positioned = false;
32
+ }
33
+ else {
34
+ this.destroyPopperInstance();
35
+ this.cleanupPortal();
36
+ this.positioned = false;
37
+ }
38
+ }
39
+ getAppendToElement() {
40
+ if (!this.appendTo)
41
+ return null;
42
+ if (this.appendTo === "body") {
43
+ return document.body;
44
+ }
45
+ if (typeof this.appendTo === "string") {
46
+ return document.querySelector(this.appendTo);
47
+ }
48
+ return this.appendTo;
49
+ }
50
+ setupPortal() {
51
+ const appendToEl = this.getAppendToElement();
52
+ if (!appendToEl)
53
+ return;
54
+ // Store original position so we can restore later
55
+ this.originalParent = this.hostElement.parentElement;
56
+ this.originalNextSibling = this.hostElement.nextSibling;
57
+ // Guard against triggering disconnectedCallback during move
58
+ this.isMovingPortal = true;
59
+ appendToEl.appendChild(this.hostElement);
60
+ this.isMovingPortal = false;
61
+ }
62
+ cleanupPortal() {
63
+ // Guard against recursion - moving element triggers disconnectedCallback
64
+ if (this.isMovingPortal)
65
+ return;
66
+ // Move host back to original position
67
+ if (this.originalParent) {
68
+ this.isMovingPortal = true;
69
+ if (this.originalNextSibling) {
70
+ this.originalParent.insertBefore(this.hostElement, this.originalNextSibling);
71
+ }
72
+ else {
73
+ this.originalParent.appendChild(this.hostElement);
74
+ }
75
+ this.originalParent = null;
76
+ this.originalNextSibling = null;
77
+ this.isMovingPortal = false;
78
+ }
79
+ }
80
+ createPopperInstance() {
81
+ if (!this.triggerElement || !this.bodyRef)
82
+ return;
83
+ // Use fixed strategy when portaling to escape scroll containers
84
+ const useFixed = !!this.appendTo;
85
+ // When portaled, use viewport boundary; otherwise use clipping parents
86
+ const boundary = useFixed ? "viewport" : "clippingParents";
87
+ this.popperInstance = createPopper(this.triggerElement, this.bodyRef, {
88
+ placement: this.placement,
89
+ strategy: useFixed ? "fixed" : "absolute",
90
+ modifiers: [
91
+ {
92
+ name: "offset",
93
+ options: {
94
+ offset: this.offset
95
+ }
96
+ },
97
+ {
98
+ name: "flip",
99
+ options: {
100
+ fallbackPlacements: ["top-start", "top-end", "bottom-end"],
101
+ boundary
102
+ }
103
+ },
104
+ {
105
+ name: "preventOverflow",
106
+ options: {
107
+ boundary,
108
+ altAxis: true,
109
+ padding: 8
110
+ }
111
+ },
112
+ {
113
+ name: "computeStyles",
114
+ options: {
115
+ // Use GPU acceleration for smooth animations
116
+ gpuAcceleration: true
117
+ }
118
+ },
119
+ {
120
+ // Custom modifier to ensure initial position is applied immediately
121
+ name: "applyStyles",
122
+ enabled: true
123
+ }
124
+ ]
125
+ });
126
+ // Force immediate position update
127
+ this.popperInstance.forceUpdate();
128
+ // Mark as positioned to show the element
129
+ this.positioned = true;
130
+ }
131
+ destroyPopperInstance() {
132
+ if (this.popperInstance) {
133
+ this.popperInstance.destroy();
134
+ this.popperInstance = null;
135
+ }
136
+ }
18
137
  /**
19
138
  * Open the dialog.
20
139
  */
@@ -29,27 +148,66 @@ export class InclusiveDatesModal {
29
148
  * Close the dialog.
30
149
  */
31
150
  async close() {
151
+ var _a;
32
152
  if (this.inline)
33
153
  return;
34
154
  this.showing = false;
35
155
  this.closed.emit(undefined);
36
- this.undo();
156
+ (_a = this.undo) === null || _a === void 0 ? void 0 : _a.call(this);
37
157
  if (this.triggerElement)
38
158
  this.triggerElement.focus();
39
159
  }
160
+ disconnectedCallback() {
161
+ // Skip cleanup if we're in the middle of portal operations
162
+ if (this.isMovingPortal)
163
+ return;
164
+ this.destroyPopperInstance();
165
+ this.cleanupPortal();
166
+ }
40
167
  async getState() {
41
168
  return this.showing;
42
169
  }
43
170
  async setTriggerElement(element) {
44
171
  this.triggerElement = element;
45
172
  }
173
+ /** Force update the popper position */
174
+ async updatePosition() {
175
+ var _a;
176
+ await ((_a = this.popperInstance) === null || _a === void 0 ? void 0 : _a.update());
177
+ }
46
178
  handleClick(event) {
47
- if (this.showing && !this.el.contains(event.target)) {
48
- this.close();
179
+ var _a;
180
+ if (this.showing) {
181
+ const target = event.target;
182
+ // Check if click is inside the host element, trigger element, or original parent (when portaled)
183
+ const clickedInside = this.hostElement.contains(target) ||
184
+ ((_a = this.triggerElement) === null || _a === void 0 ? void 0 : _a.contains(target)) ||
185
+ // When portaled, also check the original parent to avoid closing on container clicks
186
+ (this.originalParent && this.originalParent.contains(target));
187
+ if (!clickedInside) {
188
+ this.close();
189
+ }
49
190
  }
50
191
  }
51
192
  render() {
52
- return (h(Host, { key: 'e5e440df97f5b2f51f742892ca591aff3a3e51a9', showing: this.showing, ref: (r) => r && (this.el = r) }, !this.inline && this.showing && (h("div", { key: 'f3b5f92b0f3b8eb54f665a14fcaa1616d59b182b', part: "body", onKeyDown: this.onKeyDown, role: "dialog", tabindex: -1, "aria-hidden": !this.showing, "aria-label": this.label, "aria-modal": this.showing }, h("focus-trap", { key: 'f94c02a8db391d671adc08ac1742dc6fabca72d3' }, h("div", { key: '888259505b6a2416674523d6a6924272b676daad', part: "content" }, h("slot", { key: 'e4e141ecae238f68fdde53baca66f478ebb93f88' }))))), this.inline && (h("div", { key: 'f2e7fb2614274d5dc7d03f10a0ee760363438435', part: "content" }, h("slot", { key: 'f845ef9c46b146ac916c90bb2fcec1f357aee5ee' })))));
193
+ return (h(Host, { key: '35e8ed14b0108e9cb75782516d070dfb8474b0b2', showing: this.showing, ref: (r) => r && (this.el = r) }, !this.inline && this.showing && (h("div", { key: 'fdb64ed8717e2a1620ef2d4ffb21a44d1de03a46', part: "body", ref: (r) => {
194
+ if (r) {
195
+ this.bodyRef = r;
196
+ // Setup portal and create popper when ref is set
197
+ if (this.showing &&
198
+ this.triggerElement &&
199
+ !this.popperInstance) {
200
+ // Setup portal first (move element to body), then create popper
201
+ this.setupPortal();
202
+ // Use double RAF to ensure DOM is fully settled after portal move
203
+ requestAnimationFrame(() => {
204
+ requestAnimationFrame(() => {
205
+ this.createPopperInstance();
206
+ });
207
+ });
208
+ }
209
+ }
210
+ }, style: { visibility: this.positioned ? "visible" : "hidden" }, onKeyDown: this.onKeyDown, role: "dialog", tabindex: -1, "aria-hidden": !this.showing, "aria-label": this.label, "aria-modal": this.showing }, h("focus-trap", { key: 'af4734b1a18dd62a600ca49313b1ba07f2d19039' }, h("div", { key: 'fb41d5ce07b5aac179e4bed63c18a8d254503a50', part: "content" }, h("slot", { key: 'fc480cf1a29a42b1a19737a72d410c139dc32f07' }))))), this.inline && (h("div", { key: '7aef10d50f790a1e72e05b26dc108c40500fa7c3', part: "content" }, h("slot", { key: '06395cd19052d1b81ab448c0a9a618da876fa86d' })))));
53
211
  }
54
212
  static get is() { return "tabworthy-dates-modal"; }
55
213
  static get encapsulation() { return "shadow"; }
@@ -103,13 +261,83 @@ export class InclusiveDatesModal {
103
261
  "reflect": false,
104
262
  "attribute": "inline",
105
263
  "defaultValue": "false"
264
+ },
265
+ "placement": {
266
+ "type": "string",
267
+ "mutable": false,
268
+ "complexType": {
269
+ "original": "Placement",
270
+ "resolved": "\"auto\" | \"auto-end\" | \"auto-start\" | \"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
271
+ "references": {
272
+ "Placement": {
273
+ "location": "import",
274
+ "path": "@popperjs/core",
275
+ "id": "node_modules::Placement",
276
+ "referenceLocation": "Placement"
277
+ }
278
+ }
279
+ },
280
+ "required": false,
281
+ "optional": false,
282
+ "docs": {
283
+ "tags": [],
284
+ "text": "Preferred placement of the dropdown (Popper.js placement)"
285
+ },
286
+ "getter": false,
287
+ "setter": false,
288
+ "reflect": false,
289
+ "attribute": "placement",
290
+ "defaultValue": "\"bottom-start\""
291
+ },
292
+ "offset": {
293
+ "type": "unknown",
294
+ "mutable": false,
295
+ "complexType": {
296
+ "original": "[number, number]",
297
+ "resolved": "[number, number]",
298
+ "references": {}
299
+ },
300
+ "required": false,
301
+ "optional": false,
302
+ "docs": {
303
+ "tags": [],
304
+ "text": "Offset from the trigger element [skidding, distance]"
305
+ },
306
+ "getter": false,
307
+ "setter": false,
308
+ "defaultValue": "[0, 8]"
309
+ },
310
+ "appendTo": {
311
+ "type": "string",
312
+ "mutable": false,
313
+ "complexType": {
314
+ "original": "string | HTMLElement",
315
+ "resolved": "HTMLElement | string",
316
+ "references": {
317
+ "HTMLElement": {
318
+ "location": "global",
319
+ "id": "global::HTMLElement"
320
+ }
321
+ }
322
+ },
323
+ "required": false,
324
+ "optional": true,
325
+ "docs": {
326
+ "tags": [],
327
+ "text": "Element to append the dropdown to. Use \"body\" to append to document.body,\nor pass a CSS selector or HTMLElement. When set, the dropdown will be\nportaled to escape overflow:hidden containers."
328
+ },
329
+ "getter": false,
330
+ "setter": false,
331
+ "reflect": false,
332
+ "attribute": "append-to"
106
333
  }
107
334
  };
108
335
  }
109
336
  static get states() {
110
337
  return {
111
338
  "closing": {},
112
- "showing": {}
339
+ "showing": {},
340
+ "positioned": {}
113
341
  };
114
342
  }
115
343
  static get events() {
@@ -222,9 +450,33 @@ export class InclusiveDatesModal {
222
450
  "text": "",
223
451
  "tags": []
224
452
  }
453
+ },
454
+ "updatePosition": {
455
+ "complexType": {
456
+ "signature": "() => Promise<void>",
457
+ "parameters": [],
458
+ "references": {
459
+ "Promise": {
460
+ "location": "global",
461
+ "id": "global::Promise"
462
+ }
463
+ },
464
+ "return": "Promise<void>"
465
+ },
466
+ "docs": {
467
+ "text": "Force update the popper position",
468
+ "tags": []
469
+ }
225
470
  }
226
471
  };
227
472
  }
473
+ static get elementRef() { return "hostElement"; }
474
+ static get watchers() {
475
+ return [{
476
+ "propName": "showing",
477
+ "methodName": "watchShowing"
478
+ }];
479
+ }
228
480
  static get listeners() {
229
481
  return [{
230
482
  "name": "click",
@@ -93,7 +93,8 @@ export class InclusiveTimes {
93
93
  };
94
94
  this.handleCalendarButtonClick = async () => {
95
95
  if (this.modalRef) {
96
- await this.modalRef.setTriggerElement(this.calendarButtonRef);
96
+ // Use input container as trigger for proper dropdown alignment
97
+ await this.modalRef.setTriggerElement(this.inputContainerRef);
97
98
  await this.modalRef.open();
98
99
  }
99
100
  };
@@ -230,10 +231,10 @@ export class InclusiveTimes {
230
231
  }
231
232
  render() {
232
233
  var _a;
233
- return (h(Host, { key: '82b7e3ac499f9b8bea87955bfe55bbe645aa9d5a', class: this.elementClassName, "has-error": this.errorState, disabled: this.disabledState }, h("label", { key: '19a9a6cf34bccd49e6d079a4d9d7d5f3e527f1c7', htmlFor: `${this.id}-input`, class: this.getClassName("label") }, this.label), h("div", { key: '20a4dae28141bb9d3d124653df0f8f3a152a2ee8', class: this.getClassName("input-container") }, h("input", { key: '64779c1b8d59ecff3c9ddcbe0e67025e9bcbd325', id: `${this.id}-input`, ref: (r) => (this.inputRef = r), type: "text", class: {
234
+ return (h(Host, { key: 'bb2dfac0bb47e71d31aae0af5a864ad46970baf1', class: this.elementClassName, "has-error": this.errorState, disabled: this.disabledState }, h("label", { key: 'ac7a24801c515a6411dc123ca1f976e5d791efb7', htmlFor: `${this.id}-input`, class: this.getClassName("label") }, this.label), h("div", { key: '75368fdfabad0cbe08196013573b827602655335', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, h("input", { key: '6ca23bd4504a10d2bcfa54d194b7ea3bf94ccb57', id: `${this.id}-input`, ref: (r) => (this.inputRef = r), type: "text", class: {
234
235
  [this.getClassName("input")]: true,
235
236
  [this.inputClass]: !!this.inputClass
236
- }, 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: '503fb34dfa3b5328c1dfae06647601729d0c634d', 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: '915841d3053aae0e856b19ae24dafc8870c3d746', label: this.timesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
237
+ }, 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: '1e8348e12dbe8e87d17d137721c3903ea8f95ae1', type: "button", onClick: this.handleCalendarButtonClick, class: this.getClassName("calendar-button"), disabled: this.disabledState }, this.calendarButtonContent ? (h("span", { innerHTML: this.calendarButtonContent })) : (this.timesLabels.openCalendar)))), h("tabworthy-dates-modal", { key: 'd361f887baa7ac18b901862ea4aa240b614ba210', label: this.timesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
237
238
  if (this.pickerRef) {
238
239
  this.pickerRef.modalIsOpen = true;
239
240
  }
@@ -241,7 +242,7 @@ export class InclusiveTimes {
241
242
  if (this.pickerRef) {
242
243
  this.pickerRef.modalIsOpen = false;
243
244
  }
244
- }, inline: this.inline }, h("div", { key: 'b7ead351553fa42af52be2ab8e461b49d6f63b56', class: this.getClassName("picker-container") }, h("tabworthy-dates-calendar", { key: '9397be905159540b8645428d7624c4c6f2dd5133', 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 }, h("div", { key: '6aa58750a3a13fc3e1ddadee0a9c4631220bb399', slot: "after-calendar", class: this.getClassName("time-section") }, h("hr", { key: '17943c66cef11e8a4335cb0c0711d5ae327076e9', class: this.getClassName("divider") }), h("tabworthy-times-picker", { key: 'f356db7d523202ee5a72089cf57cf072787c32ee', hours: this.selectedHours, minutes: this.selectedMinutes, useTwelveHourFormat: this.useTwelveHourFormat, disabled: this.disabledState, onTimeChanged: this.handleTimeChange }))))), this.errorState && (h("div", { key: 'db47877aa13a91f6441dfd371cc7da70375aa1ea', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
245
+ }, inline: this.inline, appendTo: this.appendTo }, h("div", { key: '207708dc4997d068e1d10c08d97551c1037c38d5', class: this.getClassName("picker-container") }, 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 }, h("div", { key: 'b8ca24c7f7437dfce513fbc6d7c28b4dc887e4c2', slot: "after-calendar", class: this.getClassName("time-section") }, h("hr", { key: 'fc353c6db72e547f044bee19c02eeb6207a8af0b', class: this.getClassName("divider") }), h("tabworthy-times-picker", { key: 'c77b51e4a60978c3706ead492e972db81b72aa73', hours: this.selectedHours, minutes: this.selectedMinutes, useTwelveHourFormat: this.useTwelveHourFormat, disabled: this.disabledState, onTimeChanged: this.handleTimeChange }))))), this.errorState && (h("div", { key: '7d3e27a0d9bb0b54642873205bc6bf140126d894', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
245
246
  }
246
247
  static get is() { return "tabworthy-times"; }
247
248
  static get encapsulation() { return "scoped"; }
@@ -812,6 +813,30 @@ export class InclusiveTimes {
812
813
  "reflect": false,
813
814
  "attribute": "input-class",
814
815
  "defaultValue": "\"\""
816
+ },
817
+ "appendTo": {
818
+ "type": "string",
819
+ "mutable": false,
820
+ "complexType": {
821
+ "original": "string | HTMLElement",
822
+ "resolved": "HTMLElement | string",
823
+ "references": {
824
+ "HTMLElement": {
825
+ "location": "global",
826
+ "id": "global::HTMLElement"
827
+ }
828
+ }
829
+ },
830
+ "required": false,
831
+ "optional": true,
832
+ "docs": {
833
+ "tags": [],
834
+ "text": "Element to append the dropdown to. Use \"body\" to append to document.body,\nor pass a CSS selector or HTMLElement. Useful for escaping overflow:hidden containers."
835
+ },
836
+ "getter": false,
837
+ "setter": false,
838
+ "reflect": false,
839
+ "attribute": "append-to"
815
840
  }
816
841
  };
817
842
  }
@@ -1 +1 @@
1
- import{t}from"./p-Kr35QPhi.js";export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-Kr35QPhi.js";import{TabworthyDates as o}from"./tabworthy-dates.js";import{TabworthyDatesCalendar as e}from"./tabworthy-dates-calendar.js";import{TabworthyDatesModal as m}from"./tabworthy-dates-modal.js";import{TabworthyTimes as i}from"./tabworthy-times.js";import{TabworthyTimesPicker as p}from"./tabworthy-times-picker.js";const f=s=>{"undefined"!=typeof customElements&&[o,e,m,i,p].forEach((o=>{customElements.get(t(o.is))||customElements.define(t(o.is),o,s)}))};export{f as defineCustomElements}
1
+ import{t}from"./p-BiJ0HZVY.js";export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-BiJ0HZVY.js";import{TabworthyDates as o}from"./tabworthy-dates.js";import{TabworthyDatesCalendar as e}from"./tabworthy-dates-calendar.js";import{TabworthyDatesModal as m}from"./tabworthy-dates-modal.js";import{TabworthyTimes as i}from"./tabworthy-times.js";import{TabworthyTimesPicker as p}from"./tabworthy-times-picker.js";const f=s=>{"undefined"!=typeof customElements&&[o,e,m,i,p].forEach((o=>{customElements.get(t(o.is))||customElements.define(t(o.is),o,s)}))};export{f as defineCustomElements}