@tabworthy/components 0.11.1 → 0.11.4

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 (32) hide show
  1. package/dist/cjs/customParseFormat-l09KVyWD.js +45 -0
  2. package/dist/cjs/tabworthy-dates.cjs.entry.js +19 -22
  3. package/dist/cjs/tabworthy-times-picker.cjs.entry.js +8 -9
  4. package/dist/cjs/tabworthy-times.cjs.entry.js +43 -23
  5. package/dist/collection/components/tabworthy-dates/tabworthy-dates.js +20 -18
  6. package/dist/collection/components/tabworthy-dates-calendar/tabworthy-dates-calendar.js +3 -3
  7. package/dist/collection/components/tabworthy-times/tabworthy-times.js +28 -24
  8. package/dist/collection/components/tabworthy-times-picker/tabworthy-times-picker.js +10 -11
  9. package/dist/components/{p-D_zy0B-F.js → p-B6lbpNd2.js} +1 -1
  10. package/dist/components/p-DkyM-7xr.js +1 -0
  11. package/dist/components/tabworthy-dates.js +1 -1
  12. package/dist/components/tabworthy-times-picker.js +1 -1
  13. package/dist/components/tabworthy-times.js +1 -1
  14. package/dist/esm/customParseFormat-DkyM-7xr.js +41 -0
  15. package/dist/esm/tabworthy-dates.entry.js +18 -21
  16. package/dist/esm/tabworthy-times-picker.entry.js +8 -9
  17. package/dist/esm/tabworthy-times.entry.js +43 -23
  18. package/dist/tabworthy-components/{p-dc960590.entry.js → p-60793499.entry.js} +1 -1
  19. package/dist/tabworthy-components/p-6335f1a7.entry.js +1 -0
  20. package/dist/tabworthy-components/p-DkyM-7xr.js +1 -0
  21. package/dist/tabworthy-components/p-c378a069.entry.js +1 -0
  22. package/dist/tabworthy-components/tabworthy-components.esm.js +1 -1
  23. package/package.json +2 -3
  24. package/dist/cjs/moment-CdViwxPQ.js +0 -5681
  25. package/dist/components/p-Mki5YqAR.js +0 -8
  26. package/dist/esm/moment-Mki5YqAR.js +0 -5679
  27. package/dist/tabworthy-components/p-Mki5YqAR.js +0 -8
  28. package/dist/tabworthy-components/p-d4a7458b.entry.js +0 -1
  29. package/dist/tabworthy-components/p-ea7b79b0.entry.js +0 -1
  30. /package/dist/types/{Users/damirbogdanov_1/work → home/runner/work/tabworthy-components}/tabworthy-components/.stencil/shared/utils/chrono-parser/chrono-parser.d.ts +0 -0
  31. /package/dist/types/{Users/damirbogdanov_1/work → home/runner/work/tabworthy-components}/tabworthy-components/.stencil/shared/utils/chrono-parser/chrono-parser.type.d.ts +0 -0
  32. /package/dist/types/{Users/damirbogdanov_1/work → home/runner/work/tabworthy-components}/tabworthy-components/.stencil/shared/utils/utils.d.ts +0 -0
@@ -1 +1 @@
1
- import{T as o,d as s}from"./p-D_zy0B-F.js";const p=o,r=s;export{p as TabworthyTimesPicker,r as defineCustomElement}
1
+ import{T as o,d as p}from"./p-B6lbpNd2.js";const s=o,r=p;export{s as TabworthyTimesPicker,r as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as s,c as e,h as i,d as a,t as h}from"./p-BiJ0HZVY.js";import{h as r}from"./p-Mki5YqAR.js";import{g as o,r as n,c as l}from"./p-CGo5md1l.js";import{d}from"./p-CIQgnOXj.js";import{d as c}from"./p-D_zy0B-F.js";const u={selected:"selected",openCalendar:"Choose time",calendar:"date and time picker",invalidDateError:"We could not find a matching date",minDateError:"Please fill in a date after ",maxDateError:"Please fill in a date before ",rangeOutOfBoundsError:"Please enter a valid range of dates",disabledDateError:"Please choose an available date",to:"to",startDate:"Start date",timeLabel:"Time"},b=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.selectDateTime=e(this,"selectDateTime",7),this.changeYear=e(this,"changeYear",7),this.componentReady=e(this,"componentReady",7),this.range=!1,this.label="Choose a date and time",this.placeholder="",this.locale=(null===navigator||void 0===navigator?void 0:navigator.language)||"en-US",this.disabled=!1,this.startDate=o(new Date),this.referenceDate=o(new Date),this.useTwelveHourFormat=!0,this.showSeconds=!1,this.timesLabels=u,this.inline=!1,this.hasError=!1,this.showYearStepper=!1,this.showMonthStepper=!0,this.showClearButton=!0,this.showCloseButton=!1,this.showTodayButton=!0,this.disableDate=()=>!1,this.elementClassName="tabworthy-times",this.firstDayOfWeek=1,this.format="YYYY-MM-DDTHH:mm:ss",this.inputShouldFormat=!0,this.disableFreeformInput=!1,this.inputClass="",this.selectedHours=(new Date).getHours(),this.selectedMinutes=(new Date).getMinutes(),this.selectedSeconds=(new Date).getSeconds(),this.errorState=this.hasError,this.disabledState=this.disabled,this.errorMessage="",this.handlePickerSelection=async t=>{if(!t)return this.clearValue();const s=t.split(",");if(this.range&&2===s.length){const t=n(new Date(s[0])),e=n(new Date(s[1]));this.updateValue([t,e]),this.pickerRef&&(this.pickerRef.value=[t,e])}else{const t=n(new Date(s[0]));this.updateValue(t),this.pickerRef&&(this.pickerRef.value=t)}},this.handleTimeChange=t=>{this.selectedHours=t.detail.hours,this.selectedMinutes=t.detail.minutes,void 0!==t.detail.seconds&&(this.selectedSeconds=t.detail.seconds),this.selectedDate&&this.updateValue(this.selectedDate)},this.handleCalendarButtonClick=async()=>{this.modalRef&&(await this.modalRef.setTriggerElement(this.inputContainerRef),await this.modalRef.open())},this.handleYearChange=t=>{this.changeYear&&this.changeYear.emit(t)},this.handleChangedMonths=()=>{},this.handleInputBlur=()=>{this.shouldInputFormat()&&this.formatInput()},this.handleInputChange=t=>{const s=r(t.target.value);s.isValid()&&(this.selectedHours=s.hours(),this.selectedMinutes=s.minutes(),this.updateValue(s.toDate()))}}shouldInputFormat(){return"string"==typeof this.inputShouldFormat?"true"===this.inputShouldFormat:!!this.inputShouldFormat}watchValue(t){this.syncFromValueProp()}watchDisabled(t){this.disabledState=t}watchHasError(t){this.errorState=t}componentDidLoad(){this.syncFromValueProp(),this.componentReady.emit(),this.id||console.error('tabworthy-times: The "id" prop is required for accessibility')}syncFromValueProp(){if(this.value){this.internalValue=this.value;const t=Array.isArray(this.value)?this.value[0]:this.value;if(t){const s=r(t,this.format);s.isValid()&&(this.selectedDate=s.toDate(),this.selectedHours=s.hours(),this.selectedMinutes=s.minutes(),this.selectedSeconds=s.seconds())}}else this.internalValue=null}updateValue(t){if(Array.isArray(t)){const s=t.map((t=>{const s=r(t);return s.hours(this.selectedHours),s.minutes(this.selectedMinutes),s.seconds(this.selectedSeconds),s.format(this.format)}));this.internalValue=s,this.value=s,this.selectDateTime.emit(s)}else{const s=r(t);s.hours(this.selectedHours),s.minutes(this.selectedMinutes),s.seconds(this.selectedSeconds);const e=s.format(this.format);this.internalValue=e,this.value=e,this.selectedDate=t,this.selectDateTime.emit(e)}this.errorState=!1,this.shouldInputFormat()&&this.formatInput()}formatInput(){if(this.internalValue)if(Array.isArray(this.internalValue)){const t=this.internalValue.map((t=>r(t,this.format).format("lll"))).join(` ${this.timesLabels.to} `);this.inputRef.value=t}else this.inputRef.value=r(this.internalValue,this.format).format("lll")}getClassName(t){return`${this.elementClassName}__${t}`}toDate(t){return t?Array.isArray(t)?t.map((t=>r(t,this.format).toDate())):r(t,this.format).toDate():null}async clearValue(){this.internalValue=null,this.value=void 0,this.selectedDate=void 0,this.inputRef&&(this.inputRef.value=""),this.pickerRef&&(this.pickerRef.value=null),this.selectDateTime.emit(void 0)}render(){var t;return i(a,{key:"de07eab0ee0cd6624756ce18a0dcc38a509692e4",class:this.elementClassName,"has-error":this.errorState,disabled:this.disabledState},i("label",{key:"666a1cd43b7c2d1633210d7422ec8d2c3fc44e44",htmlFor:this.id+"-input",class:this.getClassName("label")},this.label),i("div",{key:"222432b8a431bac954fb625f5b724df077d9feeb",class:this.getClassName("input-container"),ref:t=>this.inputContainerRef=t},i("input",{key:"c3284e4348cd736f2edf708978956fb88f78118a",id:this.id+"-input",ref:t=>this.inputRef=t,type:"text",class:{[this.getClassName("input")]:!0,[this.inputClass]:!!this.inputClass},placeholder:this.placeholder,disabled:this.disabledState||this.disableFreeformInput,value:null===(t=this.internalValue)||void 0===t?void 0:""+t,onBlur:this.handleInputBlur,onChange:this.handleInputChange,"aria-describedby":this.errorState?this.id+"-error":void 0,"aria-invalid":this.errorState}),!this.inline&&i("button",{key:"9087c6b9cec31990b13ba6a1a7ad66f937ddee3a",type:"button",onClick:this.handleCalendarButtonClick,class:this.getClassName("calendar-button"),disabled:this.disabledState},this.calendarButtonContent?i("span",{innerHTML:this.calendarButtonContent}):this.timesLabels.openCalendar)),i("tabworthy-dates-modal",{key:"79613c7af13afe36e03cfede116b260f9d1d2b63",label:this.timesLabels.calendar,ref:t=>this.modalRef=t,onOpened:()=>{this.pickerRef&&(this.pickerRef.modalIsOpen=!0)},onClosed:()=>{this.pickerRef&&(this.pickerRef.modalIsOpen=!1)},inline:this.inline,appendTo:this.appendTo},i("div",{key:"716440a779e1e614fbef292c7c1cc801cde57ee6",class:this.getClassName("picker-container")},i("tabworthy-dates-calendar",{key:"02579a80370918076f36e04f64b6626893acf1cd",range:this.range,locale:this.locale,onSelectDate:t=>this.handlePickerSelection(t.detail),onChangeMonth:t=>this.handleChangedMonths(t.detail),onChangeYear:t=>this.handleYearChange(t.detail),onRequestClose:()=>{var t;return null===(t=this.modalRef)||void 0===t?void 0:t.close()},labels:this.datesCalendarLabels,ref:t=>this.pickerRef=t,startDate:this.startDate,firstDayOfWeek:this.firstDayOfWeek,showHiddenTitle:!0,disabled:this.disabledState,showMonthStepper:this.showMonthStepper,showYearStepper:this.showYearStepper,showClearButton:this.showClearButton,showCloseButton:this.showCloseButton,showTodayButton:this.showTodayButton,disableDate:this.disableDate,minDate:this.minDate,maxDate:this.maxDate,inline:this.inline,value:this.value?this.toDate(this.value):void 0},i("div",{key:"df629acf66bc6a83c7c0601f6cff39a8a27ddba2",slot:"after-calendar",class:this.getClassName("time-section")},i("hr",{key:"084ba933dbe96086d9c8f21494e4016eb6d3ac66",class:this.getClassName("divider")}),i("tabworthy-times-picker",{key:"788081745c21b0702fcc0f8d79f0c6fe88b4372d",hours:this.selectedHours,minutes:this.selectedMinutes,seconds:this.selectedSeconds,showSeconds:this.showSeconds,useTwelveHourFormat:this.useTwelveHourFormat,disabled:this.disabledState,onTimeChanged:this.handleTimeChange,labels:this.timesPickerLabels}))))),this.errorState&&i("div",{key:"0742a70dcb66f4523131c29d60f2056c9cf94320",class:this.getClassName("input-error"),id:this.id?this.id+"-error":void 0,role:"status"},this.errorMessage))}get el(){return this}static get watchers(){return{value:[{watchValue:0}],disabled:[{watchDisabled:0}],hasError:[{watchHasError:0}]}}},[2,"tabworthy-times",{id:[513],value:[1025],range:[4],label:[1],placeholder:[1],locale:[1],disabled:[4],minDate:[1,"min-date"],maxDate:[1,"max-date"],startDate:[1,"start-date"],referenceDate:[1,"reference-date"],useTwelveHourFormat:[4,"use-twelve-hour-format"],showSeconds:[4,"show-seconds"],timesLabels:[16],datesCalendarLabels:[16],timesPickerLabels:[16],inline:[4],hasError:[1028,"has-error"],showYearStepper:[4,"show-year-stepper"],showMonthStepper:[4,"show-month-stepper"],showClearButton:[4,"show-clear-button"],showCloseButton:[4,"show-close-button"],showTodayButton:[4,"show-today-button"],calendarButtonContent:[1,"calendar-button-content"],disableDate:[16],elementClassName:[1,"element-class-name"],firstDayOfWeek:[2,"first-day-of-week"],format:[1],inputShouldFormat:[8,"input-should-format"],disableFreeformInput:[4,"disable-freeform-input"],inputClass:[1,"input-class"],appendTo:[1,"append-to"],internalValue:[32],selectedDate:[32],selectedHours:[32],selectedMinutes:[32],selectedSeconds:[32],errorState:[32],disabledState:[32],clearValue:[64]},void 0,{value:[{watchValue:0}],disabled:[{watchDisabled:0}],hasError:[{watchHasError:0}]}]),f=b,m=function(){"undefined"!=typeof customElements&&["tabworthy-times","tabworthy-dates-calendar","tabworthy-dates-modal","tabworthy-times-picker"].forEach((t=>{switch(t){case"tabworthy-times":customElements.get(h(t))||customElements.define(h(t),b);break;case"tabworthy-dates-calendar":customElements.get(h(t))||l();break;case"tabworthy-dates-modal":customElements.get(h(t))||d();break;case"tabworthy-times-picker":customElements.get(h(t))||c()}}))};export{f as TabworthyTimes,m as defineCustomElement}
1
+ import{p as t,H as s,c as e,h as i,d as a,t as h}from"./p-BiJ0HZVY.js";import{g as r,d as o,c as n}from"./p-DkyM-7xr.js";import{g as l,r as d,c}from"./p-CGo5md1l.js";import{d as u}from"./p-CIQgnOXj.js";import{d as b}from"./p-B6lbpNd2.js";var m,f={exports:{}},p=r(m?f.exports:(m=1,f.exports=function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(s,e,i){var a=e.prototype,h=a.format;i.en.formats=t,a.format=function(s){void 0===s&&(s="YYYY-MM-DDTHH:mm:ssZ");var e=this.$locale().formats,i=function(s,e){return s.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(s,i,a){var h=a&&a.toUpperCase();return i||e[a]||t[a]||e[h].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,s,e){return s||e.slice(1)}))}))}(s,void 0===e?{}:e);return h.call(this,i)}}}()));o.extend(n),o.extend(p);const w={selected:"selected",openCalendar:"Choose time",calendar:"date and time picker",invalidDateError:"We could not find a matching date",minDateError:"Please fill in a date after ",maxDateError:"Please fill in a date before ",rangeOutOfBoundsError:"Please enter a valid range of dates",disabledDateError:"Please choose an available date",to:"to",startDate:"Start date",timeLabel:"Time"},y=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.selectDateTime=e(this,"selectDateTime",7),this.changeYear=e(this,"changeYear",7),this.componentReady=e(this,"componentReady",7),this.range=!1,this.label="Choose a date and time",this.placeholder="",this.locale=(null===navigator||void 0===navigator?void 0:navigator.language)||"en-US",this.disabled=!1,this.startDate=l(new Date),this.referenceDate=l(new Date),this.useTwelveHourFormat=!0,this.showSeconds=!1,this.timesLabels=w,this.inline=!1,this.hasError=!1,this.showYearStepper=!1,this.showMonthStepper=!0,this.showClearButton=!0,this.showCloseButton=!1,this.showTodayButton=!0,this.disableDate=()=>!1,this.elementClassName="tabworthy-times",this.firstDayOfWeek=1,this.format="YYYY-MM-DDTHH:mm:ss",this.inputShouldFormat=!0,this.disableFreeformInput=!1,this.inputClass="",this.selectedHours=(new Date).getHours(),this.selectedMinutes=(new Date).getMinutes(),this.selectedSeconds=(new Date).getSeconds(),this.errorState=this.hasError,this.disabledState=this.disabled,this.errorMessage="",this.handlePickerSelection=async t=>{if(!t)return this.clearValue();const s=t.split(",");if(this.range&&2===s.length){const t=d(new Date(s[0])),e=d(new Date(s[1]));this.updateValue([t,e]),this.pickerRef&&(this.pickerRef.value=[t,e])}else{const t=d(new Date(s[0]));this.updateValue(t),this.pickerRef&&(this.pickerRef.value=t)}},this.handleTimeChange=t=>{this.selectedHours=t.detail.hours,this.selectedMinutes=t.detail.minutes,void 0!==t.detail.seconds&&(this.selectedSeconds=t.detail.seconds),this.selectedDate&&this.updateValue(this.selectedDate)},this.handleCalendarButtonClick=async()=>{this.modalRef&&(await this.modalRef.setTriggerElement(this.inputContainerRef),await this.modalRef.open())},this.handleYearChange=t=>{this.changeYear&&this.changeYear.emit(t)},this.handleChangedMonths=()=>{},this.handleInputBlur=()=>{this.shouldInputFormat()&&this.formatInput()},this.handleInputChange=t=>{const s=o(t.target.value);s.isValid()&&(this.selectedHours=s.hour(),this.selectedMinutes=s.minute(),this.updateValue(s.toDate()))}}shouldInputFormat(){return"string"==typeof this.inputShouldFormat?"true"===this.inputShouldFormat:!!this.inputShouldFormat}watchValue(t){this.syncFromValueProp()}watchDisabled(t){this.disabledState=t}watchHasError(t){this.errorState=t}componentDidLoad(){this.syncFromValueProp(),this.componentReady.emit(),this.id||console.error('tabworthy-times: The "id" prop is required for accessibility')}syncFromValueProp(){if(this.value){this.internalValue=this.value;const t=Array.isArray(this.value)?this.value[0]:this.value;if(t){const s=o(t,this.format);s.isValid()&&(this.selectedDate=s.toDate(),this.selectedHours=s.hour(),this.selectedMinutes=s.minute(),this.selectedSeconds=s.second())}}else this.internalValue=null}updateValue(t){if(Array.isArray(t)){const s=t.map((t=>o(t).hour(this.selectedHours).minute(this.selectedMinutes).second(this.selectedSeconds).format(this.format)));this.internalValue=s,this.value=s,this.selectDateTime.emit(s)}else{const s=o(t).hour(this.selectedHours).minute(this.selectedMinutes).second(this.selectedSeconds).format(this.format);this.internalValue=s,this.value=s,this.selectedDate=t,this.selectDateTime.emit(s)}this.errorState=!1,this.shouldInputFormat()&&this.formatInput()}formatInput(){if(this.internalValue)if(Array.isArray(this.internalValue)){const t=this.internalValue.map((t=>o(t,this.format).format("lll"))).join(` ${this.timesLabels.to} `);this.inputRef.value=t}else this.inputRef.value=o(this.internalValue,this.format).format("lll")}getClassName(t){return`${this.elementClassName}__${t}`}toDate(t){return t?Array.isArray(t)?t.map((t=>o(t,this.format).toDate())):o(t,this.format).toDate():null}async clearValue(){this.internalValue=null,this.value=void 0,this.selectedDate=void 0,this.inputRef&&(this.inputRef.value=""),this.pickerRef&&(this.pickerRef.value=null),this.selectDateTime.emit(void 0)}render(){var t;return i(a,{key:"03aaff051aa6af4a7606b64056336c4f597ffaeb",class:this.elementClassName,"has-error":this.errorState,disabled:this.disabledState},i("label",{key:"d05264d3b32741ccfeca0be4473f9323b4934071",htmlFor:this.id+"-input",class:this.getClassName("label")},this.label),i("div",{key:"7a4306a4863ffffe35a0d33c80ebfc19298c2182",class:this.getClassName("input-container"),ref:t=>this.inputContainerRef=t},i("input",{key:"03080dc8619d396347b831b307c8fa9070434b35",id:this.id+"-input",ref:t=>this.inputRef=t,type:"text",class:{[this.getClassName("input")]:!0,[this.inputClass]:!!this.inputClass},placeholder:this.placeholder,disabled:this.disabledState||this.disableFreeformInput,value:null===(t=this.internalValue)||void 0===t?void 0:""+t,onBlur:this.handleInputBlur,onChange:this.handleInputChange,"aria-describedby":this.errorState?this.id+"-error":void 0,"aria-invalid":this.errorState}),!this.inline&&i("button",{key:"cc384691007bc6eb4044098ab79ba38809375de7",type:"button",onClick:this.handleCalendarButtonClick,class:this.getClassName("calendar-button"),disabled:this.disabledState},this.calendarButtonContent?i("span",{innerHTML:this.calendarButtonContent}):this.timesLabels.openCalendar)),i("tabworthy-dates-modal",{key:"14290fe8ca21e0027c384bd56d913d2cdda55380",label:this.timesLabels.calendar,ref:t=>this.modalRef=t,onOpened:()=>{this.pickerRef&&(this.pickerRef.modalIsOpen=!0)},onClosed:()=>{this.pickerRef&&(this.pickerRef.modalIsOpen=!1)},inline:this.inline,appendTo:this.appendTo},i("div",{key:"83c1e85f688a0ff213872e54a96702429f00869b",class:this.getClassName("picker-container")},i("tabworthy-dates-calendar",{key:"6afcc9ddb6fcedf07127c933ad1ed192a4c88eaf",range:this.range,locale:this.locale,onSelectDate:t=>this.handlePickerSelection(t.detail),onChangeMonth:t=>this.handleChangedMonths(t.detail),onChangeYear:t=>this.handleYearChange(t.detail),onRequestClose:()=>{var t;return null===(t=this.modalRef)||void 0===t?void 0:t.close()},labels:this.datesCalendarLabels,ref:t=>this.pickerRef=t,startDate:this.startDate,firstDayOfWeek:this.firstDayOfWeek,showHiddenTitle:!0,disabled:this.disabledState,showMonthStepper:this.showMonthStepper,showYearStepper:this.showYearStepper,showClearButton:this.showClearButton,showCloseButton:this.showCloseButton,showTodayButton:this.showTodayButton,disableDate:this.disableDate,minDate:this.minDate,maxDate:this.maxDate,inline:this.inline,value:this.value?this.toDate(this.value):void 0},i("div",{key:"7e47f4b63a85d6431f8019a8725acbf79fb44d67",slot:"after-calendar",class:this.getClassName("time-section")},i("hr",{key:"8b72711de0422f1b1848bb22a72ed363b1c63ebb",class:this.getClassName("divider")}),i("tabworthy-times-picker",{key:"29f47e57c4f3f94232345bbe602d0278b5f53fa4",hours:this.selectedHours,minutes:this.selectedMinutes,seconds:this.selectedSeconds,showSeconds:this.showSeconds,useTwelveHourFormat:this.useTwelveHourFormat,disabled:this.disabledState,onTimeChanged:this.handleTimeChange,labels:this.timesPickerLabels}))))),this.errorState&&i("div",{key:"aa6f743bc35538f6271a45bb2564e89164e5a909",class:this.getClassName("input-error"),id:this.id?this.id+"-error":void 0,role:"status"},this.errorMessage))}get el(){return this}static get watchers(){return{value:[{watchValue:0}],disabled:[{watchDisabled:0}],hasError:[{watchHasError:0}]}}},[2,"tabworthy-times",{id:[513],value:[1025],range:[4],label:[1],placeholder:[1],locale:[1],disabled:[4],minDate:[1,"min-date"],maxDate:[1,"max-date"],startDate:[1,"start-date"],referenceDate:[1,"reference-date"],useTwelveHourFormat:[4,"use-twelve-hour-format"],showSeconds:[4,"show-seconds"],timesLabels:[16],datesCalendarLabels:[16],timesPickerLabels:[16],inline:[4],hasError:[1028,"has-error"],showYearStepper:[4,"show-year-stepper"],showMonthStepper:[4,"show-month-stepper"],showClearButton:[4,"show-clear-button"],showCloseButton:[4,"show-close-button"],showTodayButton:[4,"show-today-button"],calendarButtonContent:[1,"calendar-button-content"],disableDate:[16],elementClassName:[1,"element-class-name"],firstDayOfWeek:[2,"first-day-of-week"],format:[1],inputShouldFormat:[8,"input-should-format"],disableFreeformInput:[4,"disable-freeform-input"],inputClass:[1,"input-class"],appendTo:[1,"append-to"],internalValue:[32],selectedDate:[32],selectedHours:[32],selectedMinutes:[32],selectedSeconds:[32],errorState:[32],disabledState:[32],clearValue:[64]},void 0,{value:[{watchValue:0}],disabled:[{watchDisabled:0}],hasError:[{watchHasError:0}]}]),D=y,v=function(){"undefined"!=typeof customElements&&["tabworthy-times","tabworthy-dates-calendar","tabworthy-dates-modal","tabworthy-times-picker"].forEach((t=>{switch(t){case"tabworthy-times":customElements.get(h(t))||customElements.define(h(t),y);break;case"tabworthy-dates-calendar":customElements.get(h(t))||c();break;case"tabworthy-dates-modal":customElements.get(h(t))||u();break;case"tabworthy-times-picker":customElements.get(h(t))||b()}}))};export{D as TabworthyTimes,v as defineCustomElement}
@@ -0,0 +1,41 @@
1
+ function getDefaultExportFromCjs (x) {
2
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
3
+ }
4
+
5
+ var dayjs_min$1 = {exports: {}};
6
+
7
+ var dayjs_min = dayjs_min$1.exports;
8
+
9
+ var hasRequiredDayjs_min;
10
+
11
+ function requireDayjs_min () {
12
+ if (hasRequiredDayjs_min) return dayjs_min$1.exports;
13
+ hasRequiredDayjs_min = 1;
14
+ (function (module, exports) {
15
+ !function(t,e){module.exports=e();}(dayjs_min,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,true),this.parse(t),this.$x=this.$x||t.x||{},this[p]=true;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,false)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case "YY":return String(e.$y).slice(-2);case "YYYY":return b.s(e.$y,4,"0");case "M":return a+1;case "MM":return b.s(a+1,2,"0");case "MMM":return h(n.monthsShort,a,c,3);case "MMMM":return h(c,a);case "D":return e.$D;case "DD":return b.s(e.$D,2,"0");case "d":return String(e.$W);case "dd":return h(n.weekdaysMin,e.$W,o,2);case "ddd":return h(n.weekdaysShort,e.$W,o,3);case "dddd":return o[e.$W];case "H":return String(s);case "HH":return b.s(s,2,"0");case "h":return d(1);case "hh":return d(2);case "a":return $(s,u,true);case "A":return $(s,u,false);case "m":return String(u);case "mm":return b.s(u,2,"0");case "s":return String(e.$s);case "ss":return b.s(e.$s,2,"0");case "SSS":return b.s(e.$ms,3,"0");case "Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,true);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=true),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
16
+ } (dayjs_min$1));
17
+ return dayjs_min$1.exports;
18
+ }
19
+
20
+ var dayjs_minExports = requireDayjs_min();
21
+ var dayjs = /*@__PURE__*/getDefaultExportFromCjs(dayjs_minExports);
22
+
23
+ var customParseFormat$2 = {exports: {}};
24
+
25
+ var customParseFormat$1 = customParseFormat$2.exports;
26
+
27
+ var hasRequiredCustomParseFormat;
28
+
29
+ function requireCustomParseFormat () {
30
+ if (hasRequiredCustomParseFormat) return customParseFormat$2.exports;
31
+ hasRequiredCustomParseFormat = 1;
32
+ (function (module, exports) {
33
+ !function(e,t){module.exports=t();}(customParseFormat$1,(function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,o=/\d*[^-_:/,()\s\d]+/,s={},a=function(e){return (e=+e)+(e>68?1900:2e3)};var f=function(e){return function(t){this[e]=+t;}},h=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e);}],u=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},c={A:[o,function(e){this.afternoon=d(e,false);}],a:[o,function(e){this.afternoon=d(e,true);}],Q:[n,function(e){this.month=3*(e-1)+1;}],S:[n,function(e){this.milliseconds=100*+e;}],SS:[r,function(e){this.milliseconds=10*+e;}],SSS:[/\d{3}/,function(e){this.milliseconds=+e;}],s:[i,f("seconds")],ss:[i,f("seconds")],m:[i,f("minutes")],mm:[i,f("minutes")],H:[i,f("hours")],h:[i,f("hours")],HH:[i,f("hours")],hh:[i,f("hours")],D:[i,f("day")],DD:[r,f("day")],Do:[o,function(e){var t=s.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r);}],w:[i,f("week")],ww:[r,f("week")],M:[i,f("month")],MM:[r,f("month")],MMM:[o,function(e){var t=u("months"),n=(u("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n;}],MMMM:[o,function(e){var t=u("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t;}],Y:[/[+-]?\d+/,f("year")],YY:[r,function(e){this.year=a(e);}],YYYY:[/\d{4}/,f("year")],Z:h,ZZ:h};function l(n){var r,i;r=n,i=s&&s.formats;for(var o=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=o.length,f=0;f<a;f+=1){var h=o[f],u=c[h],d=u&&u[0],l=u&&u[1];o[f]=l?{regex:d,parser:l}:h.replace(/^\[|\]$/g,"");}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var i=o[n];if("string"==typeof i)r+=i.length;else {var s=i.regex,f=i.parser,h=e.slice(r),u=s.exec(h)[0];f.call(t,u),e=e.replace(u,"");}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon;}}(t),t}}return function(e,t,n){n.p.customParseFormat=true,e&&e.parseTwoDigitYear&&(a=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,o=e.args;this.$u=r;var a=o[1];if("string"==typeof a){var f=true===o[2],h=true===o[3],u=f||h,d=o[2];h&&(d=o[2]),s=this.$locale(),!f&&d&&(s=n.Ls[d]),this.$d=function(e,t,n,r){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var i=l(t)(e),o=i.year,s=i.month,a=i.day,f=i.hours,h=i.minutes,u=i.seconds,d=i.milliseconds,c=i.zone,m=i.week,M=new Date,Y=a||(o||s?1:M.getDate()),p=o||M.getFullYear(),v=0;o&&!s||(v=s>0?s-1:M.getMonth());var D,w=f||0,g=h||0,y=u||0,L=d||0;return c?new Date(Date.UTC(p,v,Y,w,g,y,L+60*c.offset*1e3)):n?new Date(Date.UTC(p,v,Y,w,g,y,L)):(D=new Date(p,v,Y,w,g,y,L),m&&(D=r(D).week(m).toDate()),D)}catch(e){return new Date("")}}(t,a,r,n),this.init(),d&&true!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date("")),s={};}else if(a instanceof Array)for(var c=a.length,m=1;m<=c;m+=1){o[1]=a[m-1];var M=n.apply(this,o);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===c&&(this.$d=new Date(""));}else i.call(this,e);};}}));
34
+ } (customParseFormat$2));
35
+ return customParseFormat$2.exports;
36
+ }
37
+
38
+ var customParseFormatExports = requireCustomParseFormat();
39
+ var customParseFormat = /*@__PURE__*/getDefaultExportFromCjs(customParseFormatExports);
40
+
41
+ export { customParseFormat as c, dayjs as d, getDefaultExportFromCjs as g };
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-CwtZ_Lud.js';
2
- import { h as hooks } from './moment-Mki5YqAR.js';
2
+ import { g as getDefaultExportFromCjs, d as dayjs$1, c as customParseFormat } from './customParseFormat-DkyM-7xr.js';
3
3
  import { r as removeTimezoneOffset, x as extractDates, y as isValidISODate, e as dateIsWithinBounds, n as dateIsWithinLowerBounds, o as dateIsWithinUpperBounds, g as getISODateString } from './utils-BVHu5CWV.js';
4
4
 
5
5
  function _mergeNamespaces(n, m) {
@@ -101,10 +101,6 @@ class $319e236875307eab$var$LiveAnnouncer {
101
101
  }
102
102
  }
103
103
 
104
- function getDefaultExportFromCjs (x) {
105
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
106
- }
107
-
108
104
  var dist = {};
109
105
 
110
106
  var en = {};
@@ -10470,6 +10466,7 @@ const chronoParseRange = async (dateString, options) => {
10470
10466
 
10471
10467
  const tabworthyDatesCss = () => `.visually-hidden.sc-tabworthy-dates{position:absolute;overflow:hidden;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%)}`;
10472
10468
 
10469
+ dayjs$1.extend(customParseFormat);
10473
10470
  const defaultLabels = {
10474
10471
  selected: "selected",
10475
10472
  openCalendar: "Open calendar",
@@ -10730,7 +10727,7 @@ const TabworthyDates = class {
10730
10727
  }
10731
10728
  return {
10732
10729
  value: parsedDate && parsedDate.value instanceof Date
10733
- ? hooks(parsedDate.value).format(this.format)
10730
+ ? dayjs$1(parsedDate.value).format(this.format)
10734
10731
  : undefined,
10735
10732
  reason: parsedDate && parsedDate.reason ? parsedDate.reason : undefined
10736
10733
  };
@@ -10745,11 +10742,11 @@ const TabworthyDates = class {
10745
10742
  updateValue(newValue) {
10746
10743
  // Range
10747
10744
  if (Array.isArray(newValue)) {
10748
- this.internalValue = newValue.map((date) => hooks(date).format(this.format));
10745
+ this.internalValue = newValue.map((date) => dayjs$1(date).format(this.format));
10749
10746
  }
10750
10747
  // Single
10751
10748
  else {
10752
- this.internalValue = hooks(newValue).format(this.format);
10749
+ this.internalValue = dayjs$1(newValue).format(this.format);
10753
10750
  }
10754
10751
  if (this.pickerRef) {
10755
10752
  this.pickerRef.value = newValue;
@@ -10778,7 +10775,7 @@ const TabworthyDates = class {
10778
10775
  return; // Range date is invalid, leave the text field as is
10779
10776
  let output = "";
10780
10777
  this.internalValue.forEach((value, index) => {
10781
- const parsedDate = hooks(useInputValue ? this.inputRef.value : value, this.format, true);
10778
+ const parsedDate = dayjs$1(useInputValue ? this.inputRef.value : value, this.format, true);
10782
10779
  const dateToFormat = parsedDate.isValid()
10783
10780
  ? parsedDate.toDate()
10784
10781
  : removeTimezoneOffset(new Date(useInputValue ? this.inputRef.value : value));
@@ -10791,7 +10788,7 @@ const TabworthyDates = class {
10791
10788
  this.inputRef.value = output;
10792
10789
  }
10793
10790
  else {
10794
- const parsedDate = hooks(useInputValue ? this.inputRef.value : this.internalValue, this.format, true);
10791
+ const parsedDate = dayjs$1(useInputValue ? this.inputRef.value : this.internalValue, this.format, true);
10795
10792
  const dateToFormat = parsedDate.isValid()
10796
10793
  ? parsedDate.toDate()
10797
10794
  : removeTimezoneOffset(new Date(useInputValue ? this.inputRef.value : this.internalValue));
@@ -10810,7 +10807,7 @@ const TabworthyDates = class {
10810
10807
  if (newValue.length === 2)
10811
10808
  (_a = this.modalRef) === null || _a === void 0 ? void 0 : _a.close();
10812
10809
  // Convert ISO dates to specified format
10813
- this.internalValue = newValue.map((date) => hooks(date).format(this.format));
10810
+ this.internalValue = newValue.map((date) => dayjs$1(date).format(this.format));
10814
10811
  this.errorState = false;
10815
10812
  if (document.activeElement !== this.inputRef) {
10816
10813
  this.formatInput(true, false);
@@ -10821,7 +10818,7 @@ const TabworthyDates = class {
10821
10818
  (_b = this.modalRef) === null || _b === void 0 ? void 0 : _b.close();
10822
10819
  // Convert ISO date to specified format
10823
10820
  const formattedDate = newValue
10824
- ? hooks(newValue).format(this.format)
10821
+ ? dayjs$1(newValue).format(this.format)
10825
10822
  : "";
10826
10823
  this.inputRef.value = formattedDate;
10827
10824
  this.internalValue = formattedDate;
@@ -10839,8 +10836,8 @@ const TabworthyDates = class {
10839
10836
  return;
10840
10837
  }
10841
10838
  const newValueInIsoFormat = Array.isArray(newValue)
10842
- ? newValue.map((date) => hooks(date, this.format).toISOString())
10843
- : hooks(newValue, this.format).toISOString();
10839
+ ? newValue.map((date) => dayjs$1(date, this.format).toISOString())
10840
+ : dayjs$1(newValue, this.format).toISOString();
10844
10841
  let content = "";
10845
10842
  if (Array.isArray(newValueInIsoFormat)) {
10846
10843
  if (newValueInIsoFormat.length === 1) {
@@ -10883,7 +10880,7 @@ const TabworthyDates = class {
10883
10880
  if (this.pickerRef) {
10884
10881
  if (Array.isArray(value)) {
10885
10882
  const dates = value.reduce((acc, v) => {
10886
- const d = hooks(v, this.format, true);
10883
+ const d = dayjs$1(v, this.format, true);
10887
10884
  if (d.isValid())
10888
10885
  acc.push(d.toDate());
10889
10886
  return acc;
@@ -10892,7 +10889,7 @@ const TabworthyDates = class {
10892
10889
  }
10893
10890
  else {
10894
10891
  if (value) {
10895
- const parsedDate = hooks(value, this.format, true);
10892
+ const parsedDate = dayjs$1(value, this.format, true);
10896
10893
  if (parsedDate.isValid()) {
10897
10894
  this.pickerRef.value = parsedDate.toDate();
10898
10895
  }
@@ -10912,10 +10909,10 @@ const TabworthyDates = class {
10912
10909
  }
10913
10910
  render() {
10914
10911
  var _a;
10915
- return (h(Host, { key: '9d80f0d44dddf8ba4f44d6a3206b96a3411ffc68' }, h("label", { key: 'c293bc7f2718b88b907e451e2bdb02933ac5878c', htmlFor: this.id ? `${this.id}-input` : undefined, class: this.getClassName("label") }, this.label), h("br", { key: '5d4ce271aeda614d205b67766ca1c001038a9d6b' }), h("div", { key: '841882938ec083cd67559ebe855041c396f35039', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, h("input", { key: '1ae0436ee9ca4c612ee8d24833e8fec42095e06b', disabled: this.disabledState || this.disableFreeformInput, id: this.id ? `${this.id}-input` : undefined, type: "text", placeholder: this.placeholder, class: {
10912
+ return (h(Host, { key: '7dc37ffe7603f9c65f674910f5e1de3fec6d13f7' }, h("label", { key: '240bdaf77226608e88efc0bf810ed0d08090927a', htmlFor: this.id ? `${this.id}-input` : undefined, class: this.getClassName("label") }, this.label), h("br", { key: 'd37a77330ffabc8b8565c5c058ee4c5ee32e755b' }), h("div", { key: 'db290a3f753694a073ab8dd779b90e06fabe3b25', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, h("input", { key: 'd51dcd7f6abc15bd605a5d8c5b77da97eec76ed8', disabled: this.disabledState || this.disableFreeformInput, id: this.id ? `${this.id}-input` : undefined, type: "text", placeholder: this.placeholder, class: {
10916
10913
  [this.getClassName("input")]: true,
10917
10914
  [this.inputClass]: !!this.inputClass
10918
- }, ref: (r) => (this.inputRef = r), onChange: this.handleChange, onFocus: () => this.formatInput(false), onBlur: () => this.formatInput(true, false), "aria-describedby": this.errorState ? `${this.id}-error` : undefined, "aria-invalid": this.errorState }), !this.inline && (h("button", { key: '590b29444493815f6b8e5d22419ad16b0a335b7d', type: "button", onClick: this.handleCalendarButtonClick, class: this.getClassName("calendar-button"), disabled: this.disabledState }, this.calendarButtonContent ? (h("span", { innerHTML: this.calendarButtonContent })) : (this.datesLabels.openCalendar)))), h("tabworthy-dates-modal", { key: '59490c29908650b7473dd71e6f9aaf2f42eeaf95', label: this.datesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
10915
+ }, ref: (r) => (this.inputRef = r), onChange: this.handleChange, onFocus: () => this.formatInput(false), onBlur: () => this.formatInput(true, false), "aria-describedby": this.errorState ? `${this.id}-error` : undefined, "aria-invalid": this.errorState }), !this.inline && (h("button", { key: '41527ddd0ae71c44a645c887cd395957dc22252c', type: "button", onClick: this.handleCalendarButtonClick, class: this.getClassName("calendar-button"), disabled: this.disabledState }, this.calendarButtonContent ? (h("span", { innerHTML: this.calendarButtonContent })) : (this.datesLabels.openCalendar)))), h("tabworthy-dates-modal", { key: '9356c01fadb2450a04664dcd4c4b3a1fce278394', label: this.datesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
10919
10916
  if (!this.pickerRef)
10920
10917
  return;
10921
10918
  this.pickerRef.modalIsOpen = true;
@@ -10923,11 +10920,11 @@ const TabworthyDates = class {
10923
10920
  if (!this.pickerRef)
10924
10921
  return;
10925
10922
  this.pickerRef.modalIsOpen = false;
10926
- }, inline: this.inline, appendTo: this.appendTo }, h("tabworthy-dates-calendar", { key: '4cea83a2e8bf63f0d06b64af8e3a489be5eaee5e', range: this.range, locale: this.locale, onSelectDate: (event) => this.handlePickerSelection(event.detail), onChangeMonth: (event) => this.handleChangedMonths(event.detail), onChangeYear: (event) => this.handleYearChange(event.detail), onRequestClose: () => { var _a; return (_a = this.modalRef) === null || _a === void 0 ? void 0 : _a.close(); }, labels: this.datesCalendarLabels ? this.datesCalendarLabels : undefined, ref: (el) => (this.pickerRef = el), startDate: this.startDate, firstDayOfWeek: this.firstDayOfWeek, showHiddenTitle: true, disabled: this.disabledState, showMonthStepper: this.showMonthStepper, showYearStepper: this.showYearStepper, showClearButton: this.showClearButton, showCloseButton: this.showCloseButton, showKeyboardHint: this.showKeyboardHint, showTodayButton: this.showTodayButton, disableDate: this.disableDate, minDate: this.minDate, maxDate: this.maxDate, inline: this.inline })), this.showQuickButtons &&
10923
+ }, inline: this.inline, appendTo: this.appendTo }, h("tabworthy-dates-calendar", { key: '371f6b079a3dc3d42d84e0ce0d301a4121747130', range: this.range, locale: this.locale, onSelectDate: (event) => this.handlePickerSelection(event.detail), onChangeMonth: (event) => this.handleChangedMonths(event.detail), onChangeYear: (event) => this.handleYearChange(event.detail), onRequestClose: () => { var _a; return (_a = this.modalRef) === null || _a === void 0 ? void 0 : _a.close(); }, labels: this.datesCalendarLabels ? this.datesCalendarLabels : undefined, ref: (el) => (this.pickerRef = el), startDate: this.startDate, firstDayOfWeek: this.firstDayOfWeek, showHiddenTitle: true, disabled: this.disabledState, showMonthStepper: this.showMonthStepper, showYearStepper: this.showYearStepper, showClearButton: this.showClearButton, showCloseButton: this.showCloseButton, showKeyboardHint: this.showKeyboardHint, showTodayButton: this.showTodayButton, disableDate: this.disableDate, minDate: this.minDate, maxDate: this.maxDate, inline: this.inline })), this.showQuickButtons &&
10927
10924
  ((_a = this.quickButtons) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
10928
- this.chronoSupportedLocale && (h("div", { key: 'fcb7eba4dddc78de7f2f7487c9390ec0f6774374', class: this.getClassName("quick-group"), role: "group", "aria-label": this.datesLabels.quickSelection }, this.quickButtons.map((buttonText) => {
10925
+ this.chronoSupportedLocale && (h("div", { key: 'afadda0a46a2e3224c940d27ba884edc45487bf3', class: this.getClassName("quick-group"), role: "group", "aria-label": this.datesLabels.quickSelection }, this.quickButtons.map((buttonText) => {
10929
10926
  return (h("button", { class: this.getClassName("quick-button"), onClick: this.handleQuickButtonClick, disabled: this.disabledState, type: "button" }, buttonText));
10930
- }))), this.errorState && (h("div", { key: '74c2226e378f9e2254ca52de3e519874e47f0c21', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
10927
+ }))), this.errorState && (h("div", { key: '7caa060a5da1846323cc161cbf9cff4b5275b90f', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
10931
10928
  }
10932
10929
  get el() { return getElement(this); }
10933
10930
  static get watchers() { return {
@@ -23,7 +23,6 @@ const TabworthyTimesPicker = class {
23
23
  this.minutes = 0;
24
24
  this.seconds = 0;
25
25
  this.useTwelveHourFormat = false;
26
- // Show seconds control
27
26
  this.showSeconds = false;
28
27
  // Labels for accessibility and i18n
29
28
  this.labels = defaultLabels;
@@ -178,22 +177,22 @@ const TabworthyTimesPicker = class {
178
177
  const displayHours = this.getDisplayHours();
179
178
  const maxHours = this.useTwelveHourFormat ? 12 : 23;
180
179
  const minHours = this.useTwelveHourFormat ? 1 : 0;
181
- return (h(Host, { key: 'be075e309d41904bf237c3a4b31b063ac4d1a7e0', class: this.elementClassName, "aria-label": this.labels.timePicker }, h("div", { key: '39d3a55428ad6f567490aa9a55ab94766de39e7f', class: `${this.elementClassName}__container` }, h("div", { key: '5efcc6b13a4473d5d889689d205128b328ae9417', class: `${this.elementClassName}__field` }, h("label", { key: 'f2e760229dd54d2265539e924dc133eda7f53fb8', htmlFor: `${this.elementClassName}-hours`, class: {
180
+ return (h(Host, { key: '372c9246a2607ae7553b61ba7445086000193ed1', class: this.elementClassName, "aria-label": this.labels.timePicker }, h("div", { key: 'fc8ea016f0c0cef3496024285fada802395011ac', class: `${this.elementClassName}__container` }, h("div", { key: '235d60b72a515d2b935a736bef6768b057714a53', class: `${this.elementClassName}__field` }, h("label", { key: '9f9c5cfee7fb8a44d9b4902809805b5aa2568f18', htmlFor: `${this.elementClassName}-hours`, class: {
182
181
  [`${this.elementClassName}__label`]: true,
183
182
  [`${this.elementClassName}__label--sr-only`]: this.labelsSrOnly
184
- } }, this.labels.hours), h("div", { key: 'a1f92371d923c50adb423d8fa36d84fe632fcdcb', class: `${this.elementClassName}__control` }, h("button", { key: 'ce1a13d5d97f664cd5a7ef9ac144cb2d7a76b0e3', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--increment`, onClick: this.handleHourIncrement, disabled: this.disabled, "aria-label": this.labels.incrementHours }, h("svg", { key: '9f4f27bc5e3ecc1da7f9520c5a67bef79b546229', 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: '2537a3c151f846b52f427bff20145dd581b2db7b', points: "18 15 12 9 6 15" }))), h("input", { key: 'dbe3c7e05bf44f2942f38e397fa8abcd5ec9a080', 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: '69e610902e8324369a57f5943699f019533f9b0a', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--decrement`, onClick: this.handleHourDecrement, disabled: this.disabled, "aria-label": this.labels.decrementHours }, h("svg", { key: 'fd3a91c8c82abb4ba948c1735a4d6b1ab9879452', 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: 'f2fb31860bc57fe95b78e0331d4dce611976f1cc', points: "6 9 12 15 18 9" }))))), h("div", { key: '5f488705145ebbaaba10f7e0370dd614e5ac9c91', class: `${this.elementClassName}__separator` }, ":"), h("div", { key: 'c886bc72ad9098a1015d97cdb64d609d10b4b7c0', class: `${this.elementClassName}__field` }, h("label", { key: '3590285320f4ee5403e41cceb964aa2440ee3caa', htmlFor: `${this.elementClassName}-minutes`, class: {
183
+ } }, this.labels.hours), h("div", { key: 'c5e369d24840f55c994d8a546bcca3569e2619ef', class: `${this.elementClassName}__control` }, h("button", { key: '51f6278e8af5d4ec0b6ad11e2e1b90ec642adb08', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--increment`, onClick: this.handleHourIncrement, disabled: this.disabled, "aria-label": this.labels.incrementHours }, h("svg", { key: '2bd03474f449be514d4a83e00606d476120d7bae', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, h("polyline", { key: 'c50112d7748c97e93e4fa0a567ef2a74609e295b', points: "18 15 12 9 6 15" }))), h("input", { key: 'a157d44b72d46e6e67b91ac8d00caa5f8df046e7', id: `${this.elementClassName}-hours`, type: "number", class: `${this.elementClassName}__input`, value: this.padZero(displayHours), min: minHours, max: maxHours, onInput: this.handleHourChange, disabled: this.disabled, "aria-label": this.labels.hours }), h("button", { key: '63a18713421f84b35b8a9bcef4c10213086bab8e', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--decrement`, onClick: this.handleHourDecrement, disabled: this.disabled, "aria-label": this.labels.decrementHours }, h("svg", { key: '3e6c61c533b9ae91d1f35d424c54602b5bd1252c', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, h("polyline", { key: 'cfe2fe7edfc882bd03ffbb1c7a282b73afac42ac', points: "6 9 12 15 18 9" }))))), h("div", { key: 'e1956c2fa548d3e011ec7a9f88f837e8482280b2', class: `${this.elementClassName}__separator` }, ":"), h("div", { key: '6e8292b63371a4a37fb6afca9a3668e87d583fde', class: `${this.elementClassName}__field` }, h("label", { key: '876283ccffdce8688ac400d4c46d7f99735da14a', htmlFor: `${this.elementClassName}-minutes`, class: {
185
184
  [`${this.elementClassName}__label`]: true,
186
185
  [`${this.elementClassName}__label--sr-only`]: this.labelsSrOnly
187
- } }, this.labels.minutes), h("div", { key: '0e4271bc5e35b9664ef599af056c997a0b09c64f', class: `${this.elementClassName}__control` }, h("button", { key: '29d095829fb141f2f2495a5cbc4bb7f28f39b54b', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--increment`, onClick: this.handleMinuteIncrement, disabled: this.disabled, "aria-label": this.labels.incrementMinutes }, h("svg", { key: '683cb78389935a9a68e59d875df60dc168ca5a4b', 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: '21084833e0479ace54ee23b2b9a39276752d6467', points: "18 15 12 9 6 15" }))), h("input", { key: '07d608da760816c37ae394fe5798ad25ca0c17db', 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: '07aee6f5f9b6cfe23fa50ae9ad2319f627c9efe2', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--decrement`, onClick: this.handleMinuteDecrement, disabled: this.disabled, "aria-label": this.labels.decrementMinutes }, h("svg", { key: '3e284e93b451ab57b0c4e0a29b8c3953f5a79033', 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: '589c1da5150f4b3def68b9dcb14f2ee56b9022e2', points: "6 9 12 15 18 9" }))))), this.showSeconds && [
188
- h("div", { key: '717844859ad07d5912fdd0b386151aeb40ccbf94', class: `${this.elementClassName}__separator` }, ":"),
189
- h("div", { key: 'a27907f31a3d71abb9f7c5bce411569ddd22594d', class: `${this.elementClassName}__field` }, h("label", { key: 'c6312aeccdfe835aa0bd02bc7078b4a30aa70921', htmlFor: `${this.elementClassName}-seconds`, class: {
186
+ } }, this.labels.minutes), h("div", { key: 'afdfa8c592b9b90c62fd1fb77a2494977f4edcd2', class: `${this.elementClassName}__control` }, h("button", { key: '06d2051e46aa19299ce8a59fe0d474d26f905ed9', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--increment`, onClick: this.handleMinuteIncrement, disabled: this.disabled, "aria-label": this.labels.incrementMinutes }, h("svg", { key: '28e6fda7aeb3246e639c0e5e76853576815c1fd1', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, h("polyline", { key: '43df9c8fcfc53ff8ebbd0879abd4d1ebc056b9ba', points: "18 15 12 9 6 15" }))), h("input", { key: '6b2eb0ac1dbe34304f349b4780e0ae9553cf955d', id: `${this.elementClassName}-minutes`, type: "number", class: `${this.elementClassName}__input`, value: this.padZero(this.internalMinutes), min: 0, max: 59, onInput: this.handleMinuteChange, disabled: this.disabled, "aria-label": this.labels.minutes }), h("button", { key: '65e5c108a5cd0451512a1d6c717d1176092e7efb', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--decrement`, onClick: this.handleMinuteDecrement, disabled: this.disabled, "aria-label": this.labels.decrementMinutes }, h("svg", { key: 'fb53625bccc3aef8447e70bf7c7b00bc7df03830', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, h("polyline", { key: 'ee6274f6d2035243412e992ceec7ae7aecf8793f', points: "6 9 12 15 18 9" }))))), this.showSeconds && [
187
+ h("div", { key: '3ee853ccf77f36e4937736a1451eaaaf4aae1ba9', class: `${this.elementClassName}__separator` }, ":"),
188
+ h("div", { key: 'ea499addc6e546945a9b9c835793c3f7485f1410', class: `${this.elementClassName}__field` }, h("label", { key: 'b63a52658e5ddd90615668be5dc2e457e8217cd9', htmlFor: `${this.elementClassName}-seconds`, class: {
190
189
  [`${this.elementClassName}__label`]: true,
191
190
  [`${this.elementClassName}__label--sr-only`]: this.labelsSrOnly
192
- } }, this.labels.seconds), h("div", { key: 'c347d3847e999a900cba2410dbc2c5711d01d746', class: `${this.elementClassName}__control` }, h("button", { key: 'b0862893f9d99e6ef7da0cfc02f6a6e1f0bc4443', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--increment`, onClick: this.handleSecondIncrement, disabled: this.disabled, "aria-label": this.labels.incrementSeconds }, h("svg", { key: 'b4032699911ed9e589c015b4c3b9d31766b53d38', 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: '5bfbeefa5ea9d4901a7bc08de5bf01578fbf6cec', points: "18 15 12 9 6 15" }))), h("input", { key: '3c7e4e5b4f7a162e9ce9efa815d1c180ff5395d2', id: `${this.elementClassName}-seconds`, type: "number", class: `${this.elementClassName}__input`, value: this.padZero(this.internalSeconds), min: 0, max: 59, onInput: this.handleSecondChange, disabled: this.disabled, "aria-label": this.labels.seconds }), h("button", { key: '6f5a37921ef128033fe8241b63903739f0ddc245', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--decrement`, onClick: this.handleSecondDecrement, disabled: this.disabled, "aria-label": this.labels.decrementSeconds }, h("svg", { key: '5c24cc5df194f53889ec353a5527c239df94a380', 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: '090946e452acf54e8bc491094573368160f55cbe', points: "6 9 12 15 18 9" })))))
193
- ], this.useTwelveHourFormat && (h("div", { key: '4bbd646f21dc099efc94e86b05ce35e22c28ee16', class: `${this.elementClassName}__period` }, h("button", { key: '3b41814b8fe32ffe3ef898fe816cc027440c6c2b', type: "button", class: {
191
+ } }, this.labels.seconds), h("div", { key: 'b812f8b2f952f7da2bfd20b4e8daf0f346dfd10e', class: `${this.elementClassName}__control` }, h("button", { key: 'a62b3ef2176f5ffd75ee32335c86e65d549f2ba4', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--increment`, onClick: this.handleSecondIncrement, disabled: this.disabled, "aria-label": this.labels.incrementSeconds }, h("svg", { key: 'd12fd6645379007b36692b1a2de07d8dd33687a4', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, h("polyline", { key: 'ef1d5818d98c0c35d7b6317f6ee952d13b0c1d33', points: "18 15 12 9 6 15" }))), h("input", { key: '68b25324d43824686b933ad9f83d58eb4d71bb0d', id: `${this.elementClassName}-seconds`, type: "number", class: `${this.elementClassName}__input`, value: this.padZero(this.internalSeconds), min: 0, max: 59, onInput: this.handleSecondChange, disabled: this.disabled, "aria-label": this.labels.seconds }), h("button", { key: 'fa0fa372e836f05964a5ccb60ed1e8a235e24d8b', type: "button", class: `${this.elementClassName}__button ${this.elementClassName}__button--decrement`, onClick: this.handleSecondDecrement, disabled: this.disabled, "aria-label": this.labels.decrementSeconds }, h("svg", { key: '2af2b80fe0853cc908e4eeccbfa4b99c758df941', fill: "none", height: "16", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", stroke: "currentColor", viewBox: "0 0 24 24", width: "16" }, h("polyline", { key: 'b4c2c5729a9c0fd129371a17e23026f975dd296a', points: "6 9 12 15 18 9" })))))
192
+ ], this.useTwelveHourFormat && (h("div", { key: '6ad19983d00af5cca81dc8753791116e07f98cd1', class: `${this.elementClassName}__period` }, h("button", { key: '05817e47857832d21380a425ccf149f9d10a328a', type: "button", class: {
194
193
  [`${this.elementClassName}__period-button`]: true,
195
194
  [`${this.elementClassName}__period-button--active`]: this.period === "AM"
196
- }, onClick: () => this.handlePeriodChange("AM"), disabled: this.disabled, "aria-label": this.labels.am, "aria-pressed": this.period === "AM" }, this.labels.am), h("button", { key: 'fd9052000876c0516e13ab701a4e5164a7d72112', type: "button", class: {
195
+ }, onClick: () => this.handlePeriodChange("AM"), disabled: this.disabled, "aria-label": this.labels.am, "aria-pressed": this.period === "AM" }, this.labels.am), h("button", { key: '7cff09015ab14acb9d40bd8a5d2f249f84d763b8', type: "button", class: {
197
196
  [`${this.elementClassName}__period-button`]: true,
198
197
  [`${this.elementClassName}__period-button--active`]: this.period === "PM"
199
198
  }, onClick: () => this.handlePeriodChange("PM"), disabled: this.disabled, "aria-label": this.labels.pm, "aria-pressed": this.period === "PM" }, this.labels.pm))))));
@@ -1,7 +1,27 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-CwtZ_Lud.js';
2
- import { h as hooks } from './moment-Mki5YqAR.js';
2
+ import { g as getDefaultExportFromCjs, d as dayjs, c as customParseFormat } from './customParseFormat-DkyM-7xr.js';
3
3
  import { g as getISODateString, r as removeTimezoneOffset } from './utils-BVHu5CWV.js';
4
4
 
5
+ var localizedFormat$2 = {exports: {}};
6
+
7
+ var localizedFormat$1 = localizedFormat$2.exports;
8
+
9
+ var hasRequiredLocalizedFormat;
10
+
11
+ function requireLocalizedFormat () {
12
+ if (hasRequiredLocalizedFormat) return localizedFormat$2.exports;
13
+ hasRequiredLocalizedFormat = 1;
14
+ (function (module, exports) {
15
+ !function(e,t){module.exports=t();}(localizedFormat$1,(function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,o,n){var r=o.prototype,i=r.format;n.en.formats=e,r.format=function(t){ void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var o=this.$locale().formats,n=function(t,o){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var i=r&&r.toUpperCase();return n||o[r]||e[r]||o[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,o){return t||o.slice(1)}))}))}(t,void 0===o?{}:o);return i.call(this,n)};}}));
16
+ } (localizedFormat$2));
17
+ return localizedFormat$2.exports;
18
+ }
19
+
20
+ var localizedFormatExports = requireLocalizedFormat();
21
+ var localizedFormat = /*@__PURE__*/getDefaultExportFromCjs(localizedFormatExports);
22
+
23
+ dayjs.extend(customParseFormat);
24
+ dayjs.extend(localizedFormat);
5
25
  const defaultLabels = {
6
26
  selected: "selected",
7
27
  openCalendar: "Choose time",
@@ -130,10 +150,10 @@ const InclusiveTimes = class {
130
150
  this.handleInputChange = (event) => {
131
151
  const value = event.target.value;
132
152
  // Try to parse the input value as a datetime
133
- const parsed = hooks(value);
153
+ const parsed = dayjs(value);
134
154
  if (parsed.isValid()) {
135
- this.selectedHours = parsed.hours();
136
- this.selectedMinutes = parsed.minutes();
155
+ this.selectedHours = parsed.hour();
156
+ this.selectedMinutes = parsed.minute();
137
157
  this.updateValue(parsed.toDate());
138
158
  }
139
159
  };
@@ -166,12 +186,12 @@ const InclusiveTimes = class {
166
186
  // Parse the first datetime value to set time picker
167
187
  const firstValue = Array.isArray(this.value) ? this.value[0] : this.value;
168
188
  if (firstValue) {
169
- const parsed = hooks(firstValue, this.format);
189
+ const parsed = dayjs(firstValue, this.format);
170
190
  if (parsed.isValid()) {
171
191
  this.selectedDate = parsed.toDate();
172
- this.selectedHours = parsed.hours();
173
- this.selectedMinutes = parsed.minutes();
174
- this.selectedSeconds = parsed.seconds();
192
+ this.selectedHours = parsed.hour();
193
+ this.selectedMinutes = parsed.minute();
194
+ this.selectedSeconds = parsed.second();
175
195
  }
176
196
  }
177
197
  }
@@ -183,10 +203,10 @@ const InclusiveTimes = class {
183
203
  if (Array.isArray(date)) {
184
204
  // Range mode
185
205
  const formattedDates = date.map((d) => {
186
- const m = hooks(d);
187
- m.hours(this.selectedHours);
188
- m.minutes(this.selectedMinutes);
189
- m.seconds(this.selectedSeconds);
206
+ const m = dayjs(d)
207
+ .hour(this.selectedHours)
208
+ .minute(this.selectedMinutes)
209
+ .second(this.selectedSeconds);
190
210
  return m.format(this.format);
191
211
  });
192
212
  this.internalValue = formattedDates;
@@ -195,10 +215,10 @@ const InclusiveTimes = class {
195
215
  }
196
216
  else {
197
217
  // Single date mode
198
- const m = hooks(date);
199
- m.hours(this.selectedHours);
200
- m.minutes(this.selectedMinutes);
201
- m.seconds(this.selectedSeconds);
218
+ const m = dayjs(date)
219
+ .hour(this.selectedHours)
220
+ .minute(this.selectedMinutes)
221
+ .second(this.selectedSeconds);
202
222
  const formatted = m.format(this.format);
203
223
  this.internalValue = formatted;
204
224
  this.value = formatted;
@@ -216,13 +236,13 @@ const InclusiveTimes = class {
216
236
  if (Array.isArray(this.internalValue)) {
217
237
  // Format range
218
238
  const formatted = this.internalValue
219
- .map((v) => hooks(v, this.format).format("lll"))
239
+ .map((v) => dayjs(v, this.format).format("lll"))
220
240
  .join(` ${this.timesLabels.to} `);
221
241
  this.inputRef.value = formatted;
222
242
  }
223
243
  else {
224
244
  // Format single datetime
225
- this.inputRef.value = hooks(this.internalValue, this.format).format("lll");
245
+ this.inputRef.value = dayjs(this.internalValue, this.format).format("lll");
226
246
  }
227
247
  }
228
248
  getClassName(suffix) {
@@ -232,8 +252,8 @@ const InclusiveTimes = class {
232
252
  if (!dateString)
233
253
  return null;
234
254
  const date = Array.isArray(dateString)
235
- ? dateString.map((d) => hooks(d, this.format).toDate())
236
- : hooks(dateString, this.format).toDate();
255
+ ? dateString.map((d) => dayjs(d, this.format).toDate())
256
+ : dayjs(dateString, this.format).toDate();
237
257
  return date;
238
258
  }
239
259
  async clearValue() {
@@ -250,10 +270,10 @@ const InclusiveTimes = class {
250
270
  }
251
271
  render() {
252
272
  var _a;
253
- return (h(Host, { key: 'de07eab0ee0cd6624756ce18a0dcc38a509692e4', class: this.elementClassName, "has-error": this.errorState, disabled: this.disabledState }, h("label", { key: '666a1cd43b7c2d1633210d7422ec8d2c3fc44e44', htmlFor: `${this.id}-input`, class: this.getClassName("label") }, this.label), h("div", { key: '222432b8a431bac954fb625f5b724df077d9feeb', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, h("input", { key: 'c3284e4348cd736f2edf708978956fb88f78118a', id: `${this.id}-input`, ref: (r) => (this.inputRef = r), type: "text", class: {
273
+ return (h(Host, { key: '03aaff051aa6af4a7606b64056336c4f597ffaeb', class: this.elementClassName, "has-error": this.errorState, disabled: this.disabledState }, h("label", { key: 'd05264d3b32741ccfeca0be4473f9323b4934071', htmlFor: `${this.id}-input`, class: this.getClassName("label") }, this.label), h("div", { key: '7a4306a4863ffffe35a0d33c80ebfc19298c2182', class: this.getClassName("input-container"), ref: (r) => (this.inputContainerRef = r) }, h("input", { key: '03080dc8619d396347b831b307c8fa9070434b35', id: `${this.id}-input`, ref: (r) => (this.inputRef = r), type: "text", class: {
254
274
  [this.getClassName("input")]: true,
255
275
  [this.inputClass]: !!this.inputClass
256
- }, 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: '9087c6b9cec31990b13ba6a1a7ad66f937ddee3a', 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: '79613c7af13afe36e03cfede116b260f9d1d2b63', label: this.timesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
276
+ }, placeholder: this.placeholder, disabled: this.disabledState || this.disableFreeformInput, value: (_a = this.internalValue) === null || _a === void 0 ? void 0 : _a.toString(), onBlur: this.handleInputBlur, onChange: this.handleInputChange, "aria-describedby": this.errorState ? `${this.id}-error` : undefined, "aria-invalid": this.errorState }), !this.inline && (h("button", { key: 'cc384691007bc6eb4044098ab79ba38809375de7', type: "button", onClick: this.handleCalendarButtonClick, class: this.getClassName("calendar-button"), disabled: this.disabledState }, this.calendarButtonContent ? (h("span", { innerHTML: this.calendarButtonContent })) : (this.timesLabels.openCalendar)))), h("tabworthy-dates-modal", { key: '14290fe8ca21e0027c384bd56d913d2cdda55380', label: this.timesLabels.calendar, ref: (el) => (this.modalRef = el), onOpened: () => {
257
277
  if (this.pickerRef) {
258
278
  this.pickerRef.modalIsOpen = true;
259
279
  }
@@ -261,7 +281,7 @@ const InclusiveTimes = class {
261
281
  if (this.pickerRef) {
262
282
  this.pickerRef.modalIsOpen = false;
263
283
  }
264
- }, inline: this.inline, appendTo: this.appendTo }, h("div", { key: '716440a779e1e614fbef292c7c1cc801cde57ee6', class: this.getClassName("picker-container") }, h("tabworthy-dates-calendar", { key: '02579a80370918076f36e04f64b6626893acf1cd', range: this.range, locale: this.locale, onSelectDate: (event) => this.handlePickerSelection(event.detail), onChangeMonth: (event) => this.handleChangedMonths(event.detail), onChangeYear: (event) => this.handleYearChange(event.detail), onRequestClose: () => { var _a; return (_a = this.modalRef) === null || _a === void 0 ? void 0 : _a.close(); }, labels: this.datesCalendarLabels, ref: (el) => (this.pickerRef = el), startDate: this.startDate, firstDayOfWeek: this.firstDayOfWeek, showHiddenTitle: true, disabled: this.disabledState, showMonthStepper: this.showMonthStepper, showYearStepper: this.showYearStepper, showClearButton: this.showClearButton, showCloseButton: this.showCloseButton, showTodayButton: this.showTodayButton, disableDate: this.disableDate, minDate: this.minDate, maxDate: this.maxDate, inline: this.inline, value: this.value ? this.toDate(this.value) : undefined }, h("div", { key: 'df629acf66bc6a83c7c0601f6cff39a8a27ddba2', slot: "after-calendar", class: this.getClassName("time-section") }, h("hr", { key: '084ba933dbe96086d9c8f21494e4016eb6d3ac66', class: this.getClassName("divider") }), h("tabworthy-times-picker", { key: '788081745c21b0702fcc0f8d79f0c6fe88b4372d', hours: this.selectedHours, minutes: this.selectedMinutes, seconds: this.selectedSeconds, showSeconds: this.showSeconds, useTwelveHourFormat: this.useTwelveHourFormat, disabled: this.disabledState, onTimeChanged: this.handleTimeChange, labels: this.timesPickerLabels }))))), this.errorState && (h("div", { key: '0742a70dcb66f4523131c29d60f2056c9cf94320', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
284
+ }, inline: this.inline, appendTo: this.appendTo }, h("div", { key: '83c1e85f688a0ff213872e54a96702429f00869b', class: this.getClassName("picker-container") }, h("tabworthy-dates-calendar", { key: '6afcc9ddb6fcedf07127c933ad1ed192a4c88eaf', range: this.range, locale: this.locale, onSelectDate: (event) => this.handlePickerSelection(event.detail), onChangeMonth: (event) => this.handleChangedMonths(event.detail), onChangeYear: (event) => this.handleYearChange(event.detail), onRequestClose: () => { var _a; return (_a = this.modalRef) === null || _a === void 0 ? void 0 : _a.close(); }, labels: this.datesCalendarLabels, ref: (el) => (this.pickerRef = el), startDate: this.startDate, firstDayOfWeek: this.firstDayOfWeek, showHiddenTitle: true, disabled: this.disabledState, showMonthStepper: this.showMonthStepper, showYearStepper: this.showYearStepper, showClearButton: this.showClearButton, showCloseButton: this.showCloseButton, showTodayButton: this.showTodayButton, disableDate: this.disableDate, minDate: this.minDate, maxDate: this.maxDate, inline: this.inline, value: this.value ? this.toDate(this.value) : undefined }, h("div", { key: '7e47f4b63a85d6431f8019a8725acbf79fb44d67', slot: "after-calendar", class: this.getClassName("time-section") }, h("hr", { key: '8b72711de0422f1b1848bb22a72ed363b1c63ebb', class: this.getClassName("divider") }), h("tabworthy-times-picker", { key: '29f47e57c4f3f94232345bbe602d0278b5f53fa4', hours: this.selectedHours, minutes: this.selectedMinutes, seconds: this.selectedSeconds, showSeconds: this.showSeconds, useTwelveHourFormat: this.useTwelveHourFormat, disabled: this.disabledState, onTimeChanged: this.handleTimeChange, labels: this.timesPickerLabels }))))), this.errorState && (h("div", { key: 'aa6f743bc35538f6271a45bb2564e89164e5a909', class: this.getClassName("input-error"), id: this.id ? `${this.id}-error` : undefined, role: "status" }, this.errorMessage))));
265
285
  }
266
286
  get el() { return getElement(this); }
267
287
  static get watchers() { return {
@@ -1 +1 @@
1
- import{r as t,c as s,h as e,H as i,g as h}from"./p-CwtZ_Lud.js";const a={hours:"Hours",minutes:"Minutes",seconds:"Seconds",am:"AM",pm:"PM",timePicker:"Time picker",incrementHours:"Increment hours",decrementHours:"Decrement hours",incrementMinutes:"Increment minutes",decrementMinutes:"Decrement minutes",incrementSeconds:"Increment seconds",decrementSeconds:"Decrement seconds"},n=class{constructor(e){t(this,e),this.timeChanged=s(this,"timeChanged",7),this.hours=12,this.minutes=0,this.seconds=0,this.useTwelveHourFormat=!1,this.showSeconds=!1,this.labels=a,this.labelsSrOnly=!0,this.disabled=!1,this.elementClassName="tabworthy-times-picker",this.internalHours=this.hours,this.internalMinutes=this.minutes,this.internalSeconds=this.seconds,this.period=this.hours>=12?"PM":"AM",this.handleHourChange=t=>{const s=parseInt(t.target.value,10);this.internalHours=this.useTwelveHourFormat?"AM"===this.period?12===s?0:s:12===s?12:s+12:s,this.emitTimeChange()},this.handleMinuteChange=t=>{this.internalMinutes=parseInt(t.target.value,10),this.emitTimeChange()},this.handlePeriodChange=t=>{if(this.period===t||!this.useTwelveHourFormat)return;this.period=t;const s=this.getDisplayHours();this.internalHours="AM"===t?12===s?0:s:12===s?12:s+12,this.emitTimeChange()},this.handleHourIncrement=()=>{if(this.useTwelveHourFormat){const t=this.getDisplayHours(),s=12===t?1:t+1;this.internalHours="AM"===this.period?12===s?0:s:12===s?12:s+12}else this.internalHours=(this.internalHours+1)%24;this.emitTimeChange()},this.handleHourDecrement=()=>{if(this.useTwelveHourFormat){const t=this.getDisplayHours(),s=1===t?12:t-1;this.internalHours="AM"===this.period?12===s?0:s:12===s?12:s+12}else this.internalHours=0===this.internalHours?23:this.internalHours-1;this.emitTimeChange()},this.handleMinuteIncrement=()=>{this.internalMinutes=(this.internalMinutes+1)%60,this.emitTimeChange()},this.handleMinuteDecrement=()=>{this.internalMinutes=0===this.internalMinutes?59:this.internalMinutes-1,this.emitTimeChange()},this.handleSecondChange=t=>{this.internalSeconds=parseInt(t.target.value,10),this.emitTimeChange()},this.handleSecondIncrement=()=>{this.internalSeconds=(this.internalSeconds+1)%60,this.emitTimeChange()},this.handleSecondDecrement=()=>{this.internalSeconds=0===this.internalSeconds?59:this.internalSeconds-1,this.emitTimeChange()}}watchHours(t){this.internalHours=t,this.period=t>=12?"PM":"AM"}watchMinutes(t){this.internalMinutes=t}watchSeconds(t){this.internalSeconds=t}componentWillLoad(){this.internalHours=this.hours,this.internalMinutes=this.minutes,this.internalSeconds=this.seconds,this.period=this.hours>=12?"PM":"AM"}getDisplayHours(){return this.useTwelveHourFormat?0===this.internalHours?12:this.internalHours>12?this.internalHours-12:this.internalHours:this.internalHours}get24HourValue(){if(!this.useTwelveHourFormat)return this.internalHours;const t=this.getDisplayHours();return"AM"===this.period?12===t?0:t:12===t?12:t+12}emitTimeChange(){this.timeChanged.emit({hours:this.get24HourValue(),minutes:this.internalMinutes,seconds:this.showSeconds?this.internalSeconds:void 0,period:this.useTwelveHourFormat?this.period:void 0})}padZero(t){return t.toString().padStart(2,"0")}render(){const t=this.getDisplayHours(),s=this.useTwelveHourFormat?12:23,h=this.useTwelveHourFormat?1:0;return e(i,{key:"be075e309d41904bf237c3a4b31b063ac4d1a7e0",class:this.elementClassName,"aria-label":this.labels.timePicker},e("div",{key:"39d3a55428ad6f567490aa9a55ab94766de39e7f",class:`${this.elementClassName}__container`},e("div",{key:"5efcc6b13a4473d5d889689d205128b328ae9417",class:`${this.elementClassName}__field`},e("label",{key:"f2e760229dd54d2265539e924dc133eda7f53fb8",htmlFor:`${this.elementClassName}-hours`,class:{[`${this.elementClassName}__label`]:!0,[`${this.elementClassName}__label--sr-only`]:this.labelsSrOnly}},this.labels.hours),e("div",{key:"a1f92371d923c50adb423d8fa36d84fe632fcdcb",class:`${this.elementClassName}__control`},e("button",{key:"ce1a13d5d97f664cd5a7ef9ac144cb2d7a76b0e3",type:"button",class:`${this.elementClassName}__button ${this.elementClassName}__button--increment`,onClick:this.handleHourIncrement,disabled:this.disabled,"aria-label":this.labels.incrementHours},e("svg",{key:"9f4f27bc5e3ecc1da7f9520c5a67bef79b546229",fill:"none",height:"16","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"16"},e("polyline",{key:"2537a3c151f846b52f427bff20145dd581b2db7b",points:"18 15 12 9 6 15"}))),e("input",{key:"dbe3c7e05bf44f2942f38e397fa8abcd5ec9a080",id:`${this.elementClassName}-hours`,type:"number",class:`${this.elementClassName}__input`,value:this.padZero(t),min:h,max:s,onInput:this.handleHourChange,disabled:this.disabled,"aria-label":this.labels.hours}),e("button",{key:"69e610902e8324369a57f5943699f019533f9b0a",type:"button",class:`${this.elementClassName}__button ${this.elementClassName}__button--decrement`,onClick:this.handleHourDecrement,disabled:this.disabled,"aria-label":this.labels.decrementHours},e("svg",{key:"fd3a91c8c82abb4ba948c1735a4d6b1ab9879452",fill:"none",height:"16","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"16"},e("polyline",{key:"f2fb31860bc57fe95b78e0331d4dce611976f1cc",points:"6 9 12 15 18 9"}))))),e("div",{key:"5f488705145ebbaaba10f7e0370dd614e5ac9c91",class:`${this.elementClassName}__separator`},":"),e("div",{key:"c886bc72ad9098a1015d97cdb64d609d10b4b7c0",class:`${this.elementClassName}__field`},e("label",{key:"3590285320f4ee5403e41cceb964aa2440ee3caa",htmlFor:`${this.elementClassName}-minutes`,class:{[`${this.elementClassName}__label`]:!0,[`${this.elementClassName}__label--sr-only`]:this.labelsSrOnly}},this.labels.minutes),e("div",{key:"0e4271bc5e35b9664ef599af056c997a0b09c64f",class:`${this.elementClassName}__control`},e("button",{key:"29d095829fb141f2f2495a5cbc4bb7f28f39b54b",type:"button",class:`${this.elementClassName}__button ${this.elementClassName}__button--increment`,onClick:this.handleMinuteIncrement,disabled:this.disabled,"aria-label":this.labels.incrementMinutes},e("svg",{key:"683cb78389935a9a68e59d875df60dc168ca5a4b",fill:"none",height:"16","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"16"},e("polyline",{key:"21084833e0479ace54ee23b2b9a39276752d6467",points:"18 15 12 9 6 15"}))),e("input",{key:"07d608da760816c37ae394fe5798ad25ca0c17db",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}),e("button",{key:"07aee6f5f9b6cfe23fa50ae9ad2319f627c9efe2",type:"button",class:`${this.elementClassName}__button ${this.elementClassName}__button--decrement`,onClick:this.handleMinuteDecrement,disabled:this.disabled,"aria-label":this.labels.decrementMinutes},e("svg",{key:"3e284e93b451ab57b0c4e0a29b8c3953f5a79033",fill:"none",height:"16","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"16"},e("polyline",{key:"589c1da5150f4b3def68b9dcb14f2ee56b9022e2",points:"6 9 12 15 18 9"}))))),this.showSeconds&&[e("div",{key:"717844859ad07d5912fdd0b386151aeb40ccbf94",class:`${this.elementClassName}__separator`},":"),e("div",{key:"a27907f31a3d71abb9f7c5bce411569ddd22594d",class:`${this.elementClassName}__field`},e("label",{key:"c6312aeccdfe835aa0bd02bc7078b4a30aa70921",htmlFor:`${this.elementClassName}-seconds`,class:{[`${this.elementClassName}__label`]:!0,[`${this.elementClassName}__label--sr-only`]:this.labelsSrOnly}},this.labels.seconds),e("div",{key:"c347d3847e999a900cba2410dbc2c5711d01d746",class:`${this.elementClassName}__control`},e("button",{key:"b0862893f9d99e6ef7da0cfc02f6a6e1f0bc4443",type:"button",class:`${this.elementClassName}__button ${this.elementClassName}__button--increment`,onClick:this.handleSecondIncrement,disabled:this.disabled,"aria-label":this.labels.incrementSeconds},e("svg",{key:"b4032699911ed9e589c015b4c3b9d31766b53d38",fill:"none",height:"16","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"16"},e("polyline",{key:"5bfbeefa5ea9d4901a7bc08de5bf01578fbf6cec",points:"18 15 12 9 6 15"}))),e("input",{key:"3c7e4e5b4f7a162e9ce9efa815d1c180ff5395d2",id:`${this.elementClassName}-seconds`,type:"number",class:`${this.elementClassName}__input`,value:this.padZero(this.internalSeconds),min:0,max:59,onInput:this.handleSecondChange,disabled:this.disabled,"aria-label":this.labels.seconds}),e("button",{key:"6f5a37921ef128033fe8241b63903739f0ddc245",type:"button",class:`${this.elementClassName}__button ${this.elementClassName}__button--decrement`,onClick:this.handleSecondDecrement,disabled:this.disabled,"aria-label":this.labels.decrementSeconds},e("svg",{key:"5c24cc5df194f53889ec353a5527c239df94a380",fill:"none",height:"16","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"16"},e("polyline",{key:"090946e452acf54e8bc491094573368160f55cbe",points:"6 9 12 15 18 9"})))))],this.useTwelveHourFormat&&e("div",{key:"4bbd646f21dc099efc94e86b05ce35e22c28ee16",class:`${this.elementClassName}__period`},e("button",{key:"3b41814b8fe32ffe3ef898fe816cc027440c6c2b",type:"button",class:{[`${this.elementClassName}__period-button`]:!0,[`${this.elementClassName}__period-button--active`]:"AM"===this.period},onClick:()=>this.handlePeriodChange("AM"),disabled:this.disabled,"aria-label":this.labels.am,"aria-pressed":"AM"===this.period},this.labels.am),e("button",{key:"fd9052000876c0516e13ab701a4e5164a7d72112",type:"button",class:{[`${this.elementClassName}__period-button`]:!0,[`${this.elementClassName}__period-button--active`]:"PM"===this.period},onClick:()=>this.handlePeriodChange("PM"),disabled:this.disabled,"aria-label":this.labels.pm,"aria-pressed":"PM"===this.period},this.labels.pm))))}get el(){return h(this)}static get watchers(){return{hours:[{watchHours:0}],minutes:[{watchMinutes:0}],seconds:[{watchSeconds:0}]}}};export{n as tabworthy_times_picker}
1
+ import{r as t,c as e,h as s,H as i,g as h}from"./p-CwtZ_Lud.js";const a={hours:"Hours",minutes:"Minutes",seconds:"Seconds",am:"AM",pm:"PM",timePicker:"Time picker",incrementHours:"Increment hours",decrementHours:"Decrement hours",incrementMinutes:"Increment minutes",decrementMinutes:"Decrement minutes",incrementSeconds:"Increment seconds",decrementSeconds:"Decrement seconds"},n=class{constructor(s){t(this,s),this.timeChanged=e(this,"timeChanged",7),this.hours=12,this.minutes=0,this.seconds=0,this.useTwelveHourFormat=!1,this.showSeconds=!1,this.labels=a,this.labelsSrOnly=!0,this.disabled=!1,this.elementClassName="tabworthy-times-picker",this.internalHours=this.hours,this.internalMinutes=this.minutes,this.internalSeconds=this.seconds,this.period=this.hours>=12?"PM":"AM",this.handleHourChange=t=>{const e=parseInt(t.target.value,10);this.internalHours=this.useTwelveHourFormat?"AM"===this.period?12===e?0:e:12===e?12:e+12:e,this.emitTimeChange()},this.handleMinuteChange=t=>{this.internalMinutes=parseInt(t.target.value,10),this.emitTimeChange()},this.handlePeriodChange=t=>{if(this.period===t||!this.useTwelveHourFormat)return;this.period=t;const e=this.getDisplayHours();this.internalHours="AM"===t?12===e?0:e:12===e?12:e+12,this.emitTimeChange()},this.handleHourIncrement=()=>{if(this.useTwelveHourFormat){const t=this.getDisplayHours(),e=12===t?1:t+1;this.internalHours="AM"===this.period?12===e?0:e:12===e?12:e+12}else this.internalHours=(this.internalHours+1)%24;this.emitTimeChange()},this.handleHourDecrement=()=>{if(this.useTwelveHourFormat){const t=this.getDisplayHours(),e=1===t?12:t-1;this.internalHours="AM"===this.period?12===e?0:e:12===e?12:e+12}else this.internalHours=0===this.internalHours?23:this.internalHours-1;this.emitTimeChange()},this.handleMinuteIncrement=()=>{this.internalMinutes=(this.internalMinutes+1)%60,this.emitTimeChange()},this.handleMinuteDecrement=()=>{this.internalMinutes=0===this.internalMinutes?59:this.internalMinutes-1,this.emitTimeChange()},this.handleSecondChange=t=>{this.internalSeconds=parseInt(t.target.value,10),this.emitTimeChange()},this.handleSecondIncrement=()=>{this.internalSeconds=(this.internalSeconds+1)%60,this.emitTimeChange()},this.handleSecondDecrement=()=>{this.internalSeconds=0===this.internalSeconds?59:this.internalSeconds-1,this.emitTimeChange()}}watchHours(t){this.internalHours=t,this.period=t>=12?"PM":"AM"}watchMinutes(t){this.internalMinutes=t}watchSeconds(t){this.internalSeconds=t}componentWillLoad(){this.internalHours=this.hours,this.internalMinutes=this.minutes,this.internalSeconds=this.seconds,this.period=this.hours>=12?"PM":"AM"}getDisplayHours(){return this.useTwelveHourFormat?0===this.internalHours?12:this.internalHours>12?this.internalHours-12:this.internalHours:this.internalHours}get24HourValue(){if(!this.useTwelveHourFormat)return this.internalHours;const t=this.getDisplayHours();return"AM"===this.period?12===t?0:t:12===t?12:t+12}emitTimeChange(){this.timeChanged.emit({hours:this.get24HourValue(),minutes:this.internalMinutes,seconds:this.showSeconds?this.internalSeconds:void 0,period:this.useTwelveHourFormat?this.period:void 0})}padZero(t){return t.toString().padStart(2,"0")}render(){const t=this.getDisplayHours(),e=this.useTwelveHourFormat?12:23,h=this.useTwelveHourFormat?1:0;return s(i,{key:"372c9246a2607ae7553b61ba7445086000193ed1",class:this.elementClassName,"aria-label":this.labels.timePicker},s("div",{key:"fc8ea016f0c0cef3496024285fada802395011ac",class:`${this.elementClassName}__container`},s("div",{key:"235d60b72a515d2b935a736bef6768b057714a53",class:`${this.elementClassName}__field`},s("label",{key:"9f9c5cfee7fb8a44d9b4902809805b5aa2568f18",htmlFor:`${this.elementClassName}-hours`,class:{[`${this.elementClassName}__label`]:!0,[`${this.elementClassName}__label--sr-only`]:this.labelsSrOnly}},this.labels.hours),s("div",{key:"c5e369d24840f55c994d8a546bcca3569e2619ef",class:`${this.elementClassName}__control`},s("button",{key:"51f6278e8af5d4ec0b6ad11e2e1b90ec642adb08",type:"button",class:`${this.elementClassName}__button ${this.elementClassName}__button--increment`,onClick:this.handleHourIncrement,disabled:this.disabled,"aria-label":this.labels.incrementHours},s("svg",{key:"2bd03474f449be514d4a83e00606d476120d7bae",fill:"none",height:"16","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"16"},s("polyline",{key:"c50112d7748c97e93e4fa0a567ef2a74609e295b",points:"18 15 12 9 6 15"}))),s("input",{key:"a157d44b72d46e6e67b91ac8d00caa5f8df046e7",id:`${this.elementClassName}-hours`,type:"number",class:`${this.elementClassName}__input`,value:this.padZero(t),min:h,max:e,onInput:this.handleHourChange,disabled:this.disabled,"aria-label":this.labels.hours}),s("button",{key:"63a18713421f84b35b8a9bcef4c10213086bab8e",type:"button",class:`${this.elementClassName}__button ${this.elementClassName}__button--decrement`,onClick:this.handleHourDecrement,disabled:this.disabled,"aria-label":this.labels.decrementHours},s("svg",{key:"3e6c61c533b9ae91d1f35d424c54602b5bd1252c",fill:"none",height:"16","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"16"},s("polyline",{key:"cfe2fe7edfc882bd03ffbb1c7a282b73afac42ac",points:"6 9 12 15 18 9"}))))),s("div",{key:"e1956c2fa548d3e011ec7a9f88f837e8482280b2",class:`${this.elementClassName}__separator`},":"),s("div",{key:"6e8292b63371a4a37fb6afca9a3668e87d583fde",class:`${this.elementClassName}__field`},s("label",{key:"876283ccffdce8688ac400d4c46d7f99735da14a",htmlFor:`${this.elementClassName}-minutes`,class:{[`${this.elementClassName}__label`]:!0,[`${this.elementClassName}__label--sr-only`]:this.labelsSrOnly}},this.labels.minutes),s("div",{key:"afdfa8c592b9b90c62fd1fb77a2494977f4edcd2",class:`${this.elementClassName}__control`},s("button",{key:"06d2051e46aa19299ce8a59fe0d474d26f905ed9",type:"button",class:`${this.elementClassName}__button ${this.elementClassName}__button--increment`,onClick:this.handleMinuteIncrement,disabled:this.disabled,"aria-label":this.labels.incrementMinutes},s("svg",{key:"28e6fda7aeb3246e639c0e5e76853576815c1fd1",fill:"none",height:"16","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"16"},s("polyline",{key:"43df9c8fcfc53ff8ebbd0879abd4d1ebc056b9ba",points:"18 15 12 9 6 15"}))),s("input",{key:"6b2eb0ac1dbe34304f349b4780e0ae9553cf955d",id:`${this.elementClassName}-minutes`,type:"number",class:`${this.elementClassName}__input`,value:this.padZero(this.internalMinutes),min:0,max:59,onInput:this.handleMinuteChange,disabled:this.disabled,"aria-label":this.labels.minutes}),s("button",{key:"65e5c108a5cd0451512a1d6c717d1176092e7efb",type:"button",class:`${this.elementClassName}__button ${this.elementClassName}__button--decrement`,onClick:this.handleMinuteDecrement,disabled:this.disabled,"aria-label":this.labels.decrementMinutes},s("svg",{key:"fb53625bccc3aef8447e70bf7c7b00bc7df03830",fill:"none",height:"16","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"16"},s("polyline",{key:"ee6274f6d2035243412e992ceec7ae7aecf8793f",points:"6 9 12 15 18 9"}))))),this.showSeconds&&[s("div",{key:"3ee853ccf77f36e4937736a1451eaaaf4aae1ba9",class:`${this.elementClassName}__separator`},":"),s("div",{key:"ea499addc6e546945a9b9c835793c3f7485f1410",class:`${this.elementClassName}__field`},s("label",{key:"b63a52658e5ddd90615668be5dc2e457e8217cd9",htmlFor:`${this.elementClassName}-seconds`,class:{[`${this.elementClassName}__label`]:!0,[`${this.elementClassName}__label--sr-only`]:this.labelsSrOnly}},this.labels.seconds),s("div",{key:"b812f8b2f952f7da2bfd20b4e8daf0f346dfd10e",class:`${this.elementClassName}__control`},s("button",{key:"a62b3ef2176f5ffd75ee32335c86e65d549f2ba4",type:"button",class:`${this.elementClassName}__button ${this.elementClassName}__button--increment`,onClick:this.handleSecondIncrement,disabled:this.disabled,"aria-label":this.labels.incrementSeconds},s("svg",{key:"d12fd6645379007b36692b1a2de07d8dd33687a4",fill:"none",height:"16","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"16"},s("polyline",{key:"ef1d5818d98c0c35d7b6317f6ee952d13b0c1d33",points:"18 15 12 9 6 15"}))),s("input",{key:"68b25324d43824686b933ad9f83d58eb4d71bb0d",id:`${this.elementClassName}-seconds`,type:"number",class:`${this.elementClassName}__input`,value:this.padZero(this.internalSeconds),min:0,max:59,onInput:this.handleSecondChange,disabled:this.disabled,"aria-label":this.labels.seconds}),s("button",{key:"fa0fa372e836f05964a5ccb60ed1e8a235e24d8b",type:"button",class:`${this.elementClassName}__button ${this.elementClassName}__button--decrement`,onClick:this.handleSecondDecrement,disabled:this.disabled,"aria-label":this.labels.decrementSeconds},s("svg",{key:"2af2b80fe0853cc908e4eeccbfa4b99c758df941",fill:"none",height:"16","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"16"},s("polyline",{key:"b4c2c5729a9c0fd129371a17e23026f975dd296a",points:"6 9 12 15 18 9"})))))],this.useTwelveHourFormat&&s("div",{key:"6ad19983d00af5cca81dc8753791116e07f98cd1",class:`${this.elementClassName}__period`},s("button",{key:"05817e47857832d21380a425ccf149f9d10a328a",type:"button",class:{[`${this.elementClassName}__period-button`]:!0,[`${this.elementClassName}__period-button--active`]:"AM"===this.period},onClick:()=>this.handlePeriodChange("AM"),disabled:this.disabled,"aria-label":this.labels.am,"aria-pressed":"AM"===this.period},this.labels.am),s("button",{key:"7cff09015ab14acb9d40bd8a5d2f249f84d763b8",type:"button",class:{[`${this.elementClassName}__period-button`]:!0,[`${this.elementClassName}__period-button--active`]:"PM"===this.period},onClick:()=>this.handlePeriodChange("PM"),disabled:this.disabled,"aria-label":this.labels.pm,"aria-pressed":"PM"===this.period},this.labels.pm))))}get el(){return h(this)}static get watchers(){return{hours:[{watchHours:0}],minutes:[{watchMinutes:0}],seconds:[{watchSeconds:0}]}}};export{n as tabworthy_times_picker}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as i,H as h,g as e}from"./p-CwtZ_Lud.js";import{g as a,d as r,c as n}from"./p-DkyM-7xr.js";import{g as o,r as d}from"./p-BVHu5CWV.js";var l,c,f={exports:{}},u=a(l?f.exports:(l=1,f.exports=(c={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},function(t,s,i){var h=s.prototype,e=h.format;i.en.formats=c,h.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var s=this.$locale().formats,i=function(t,s){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,i,h){var e=h&&h.toUpperCase();return i||s[h]||c[h]||s[e].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,s,i){return s||i.slice(1)}))}))}(t,void 0===s?{}:s);return e.call(this,i)}})));r.extend(n),r.extend(u);const b={selected:"selected",openCalendar:"Choose time",calendar:"date and time picker",invalidDateError:"We could not find a matching date",minDateError:"Please fill in a date after ",maxDateError:"Please fill in a date before ",rangeOutOfBoundsError:"Please enter a valid range of dates",disabledDateError:"Please choose an available date",to:"to",startDate:"Start date",timeLabel:"Time"},m=class{constructor(i){t(this,i),this.selectDateTime=s(this,"selectDateTime",7),this.changeYear=s(this,"changeYear",7),this.componentReady=s(this,"componentReady",7),this.range=!1,this.label="Choose a date and time",this.placeholder="",this.locale=(null===navigator||void 0===navigator?void 0:navigator.language)||"en-US",this.disabled=!1,this.startDate=o(new Date),this.referenceDate=o(new Date),this.useTwelveHourFormat=!0,this.showSeconds=!1,this.timesLabels=b,this.inline=!1,this.hasError=!1,this.showYearStepper=!1,this.showMonthStepper=!0,this.showClearButton=!0,this.showCloseButton=!1,this.showTodayButton=!0,this.disableDate=()=>!1,this.elementClassName="tabworthy-times",this.firstDayOfWeek=1,this.format="YYYY-MM-DDTHH:mm:ss",this.inputShouldFormat=!0,this.disableFreeformInput=!1,this.inputClass="",this.selectedHours=(new Date).getHours(),this.selectedMinutes=(new Date).getMinutes(),this.selectedSeconds=(new Date).getSeconds(),this.errorState=this.hasError,this.disabledState=this.disabled,this.errorMessage="",this.handlePickerSelection=async t=>{if(!t)return this.clearValue();const s=t.split(",");if(this.range&&2===s.length){const t=d(new Date(s[0])),i=d(new Date(s[1]));this.updateValue([t,i]),this.pickerRef&&(this.pickerRef.value=[t,i])}else{const t=d(new Date(s[0]));this.updateValue(t),this.pickerRef&&(this.pickerRef.value=t)}},this.handleTimeChange=t=>{this.selectedHours=t.detail.hours,this.selectedMinutes=t.detail.minutes,void 0!==t.detail.seconds&&(this.selectedSeconds=t.detail.seconds),this.selectedDate&&this.updateValue(this.selectedDate)},this.handleCalendarButtonClick=async()=>{this.modalRef&&(await this.modalRef.setTriggerElement(this.inputContainerRef),await this.modalRef.open())},this.handleYearChange=t=>{this.changeYear&&this.changeYear.emit(t)},this.handleChangedMonths=()=>{},this.handleInputBlur=()=>{this.shouldInputFormat()&&this.formatInput()},this.handleInputChange=t=>{const s=r(t.target.value);s.isValid()&&(this.selectedHours=s.hour(),this.selectedMinutes=s.minute(),this.updateValue(s.toDate()))}}shouldInputFormat(){return"string"==typeof this.inputShouldFormat?"true"===this.inputShouldFormat:!!this.inputShouldFormat}watchValue(t){this.syncFromValueProp()}watchDisabled(t){this.disabledState=t}watchHasError(t){this.errorState=t}componentDidLoad(){this.syncFromValueProp(),this.componentReady.emit(),this.id||console.error('tabworthy-times: The "id" prop is required for accessibility')}syncFromValueProp(){if(this.value){this.internalValue=this.value;const t=Array.isArray(this.value)?this.value[0]:this.value;if(t){const s=r(t,this.format);s.isValid()&&(this.selectedDate=s.toDate(),this.selectedHours=s.hour(),this.selectedMinutes=s.minute(),this.selectedSeconds=s.second())}}else this.internalValue=null}updateValue(t){if(Array.isArray(t)){const s=t.map((t=>r(t).hour(this.selectedHours).minute(this.selectedMinutes).second(this.selectedSeconds).format(this.format)));this.internalValue=s,this.value=s,this.selectDateTime.emit(s)}else{const s=r(t).hour(this.selectedHours).minute(this.selectedMinutes).second(this.selectedSeconds).format(this.format);this.internalValue=s,this.value=s,this.selectedDate=t,this.selectDateTime.emit(s)}this.errorState=!1,this.shouldInputFormat()&&this.formatInput()}formatInput(){if(this.internalValue)if(Array.isArray(this.internalValue)){const t=this.internalValue.map((t=>r(t,this.format).format("lll"))).join(` ${this.timesLabels.to} `);this.inputRef.value=t}else this.inputRef.value=r(this.internalValue,this.format).format("lll")}getClassName(t){return`${this.elementClassName}__${t}`}toDate(t){return t?Array.isArray(t)?t.map((t=>r(t,this.format).toDate())):r(t,this.format).toDate():null}async clearValue(){this.internalValue=null,this.value=void 0,this.selectedDate=void 0,this.inputRef&&(this.inputRef.value=""),this.pickerRef&&(this.pickerRef.value=null),this.selectDateTime.emit(void 0)}render(){var t;return i(h,{key:"03aaff051aa6af4a7606b64056336c4f597ffaeb",class:this.elementClassName,"has-error":this.errorState,disabled:this.disabledState},i("label",{key:"d05264d3b32741ccfeca0be4473f9323b4934071",htmlFor:`${this.id}-input`,class:this.getClassName("label")},this.label),i("div",{key:"7a4306a4863ffffe35a0d33c80ebfc19298c2182",class:this.getClassName("input-container"),ref:t=>this.inputContainerRef=t},i("input",{key:"03080dc8619d396347b831b307c8fa9070434b35",id:`${this.id}-input`,ref:t=>this.inputRef=t,type:"text",class:{[this.getClassName("input")]:!0,[this.inputClass]:!!this.inputClass},placeholder:this.placeholder,disabled:this.disabledState||this.disableFreeformInput,value:null===(t=this.internalValue)||void 0===t?void 0:t.toString(),onBlur:this.handleInputBlur,onChange:this.handleInputChange,"aria-describedby":this.errorState?`${this.id}-error`:void 0,"aria-invalid":this.errorState}),!this.inline&&i("button",{key:"cc384691007bc6eb4044098ab79ba38809375de7",type:"button",onClick:this.handleCalendarButtonClick,class:this.getClassName("calendar-button"),disabled:this.disabledState},this.calendarButtonContent?i("span",{innerHTML:this.calendarButtonContent}):this.timesLabels.openCalendar)),i("tabworthy-dates-modal",{key:"14290fe8ca21e0027c384bd56d913d2cdda55380",label:this.timesLabels.calendar,ref:t=>this.modalRef=t,onOpened:()=>{this.pickerRef&&(this.pickerRef.modalIsOpen=!0)},onClosed:()=>{this.pickerRef&&(this.pickerRef.modalIsOpen=!1)},inline:this.inline,appendTo:this.appendTo},i("div",{key:"83c1e85f688a0ff213872e54a96702429f00869b",class:this.getClassName("picker-container")},i("tabworthy-dates-calendar",{key:"6afcc9ddb6fcedf07127c933ad1ed192a4c88eaf",range:this.range,locale:this.locale,onSelectDate:t=>this.handlePickerSelection(t.detail),onChangeMonth:t=>this.handleChangedMonths(t.detail),onChangeYear:t=>this.handleYearChange(t.detail),onRequestClose:()=>{var t;return null===(t=this.modalRef)||void 0===t?void 0:t.close()},labels:this.datesCalendarLabels,ref:t=>this.pickerRef=t,startDate:this.startDate,firstDayOfWeek:this.firstDayOfWeek,showHiddenTitle:!0,disabled:this.disabledState,showMonthStepper:this.showMonthStepper,showYearStepper:this.showYearStepper,showClearButton:this.showClearButton,showCloseButton:this.showCloseButton,showTodayButton:this.showTodayButton,disableDate:this.disableDate,minDate:this.minDate,maxDate:this.maxDate,inline:this.inline,value:this.value?this.toDate(this.value):void 0},i("div",{key:"7e47f4b63a85d6431f8019a8725acbf79fb44d67",slot:"after-calendar",class:this.getClassName("time-section")},i("hr",{key:"8b72711de0422f1b1848bb22a72ed363b1c63ebb",class:this.getClassName("divider")}),i("tabworthy-times-picker",{key:"29f47e57c4f3f94232345bbe602d0278b5f53fa4",hours:this.selectedHours,minutes:this.selectedMinutes,seconds:this.selectedSeconds,showSeconds:this.showSeconds,useTwelveHourFormat:this.useTwelveHourFormat,disabled:this.disabledState,onTimeChanged:this.handleTimeChange,labels:this.timesPickerLabels}))))),this.errorState&&i("div",{key:"aa6f743bc35538f6271a45bb2564e89164e5a909",class:this.getClassName("input-error"),id:this.id?`${this.id}-error`:void 0,role:"status"},this.errorMessage))}get el(){return e(this)}static get watchers(){return{value:[{watchValue:0}],disabled:[{watchDisabled:0}],hasError:[{watchHasError:0}]}}};export{m as tabworthy_times}