@tabworthy/components 0.9.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/tabworthy-components.cjs.js +1 -1
- package/dist/cjs/tabworthy-dates.cjs.entry.js +7 -6
- package/dist/cjs/tabworthy-times-picker.cjs.entry.js +6 -6
- package/dist/cjs/tabworthy-times.cjs.entry.js +3 -4
- package/dist/collection/components/tabworthy-dates/tabworthy-dates.js +7 -6
- package/dist/collection/components/tabworthy-times/tabworthy-times.js +27 -4
- package/dist/collection/components/tabworthy-times-picker/tabworthy-times-picker.js +9 -9
- package/dist/components/{p-B9YA6avR.js → p-PW8Ht1Es.js} +1 -1
- package/dist/components/tabworthy-dates.js +1 -1
- package/dist/components/tabworthy-times-picker.js +1 -1
- package/dist/components/tabworthy-times.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/tabworthy-components.js +1 -1
- package/dist/esm/tabworthy-dates.entry.js +7 -6
- package/dist/esm/tabworthy-times-picker.entry.js +6 -6
- package/dist/esm/tabworthy-times.entry.js +3 -4
- package/dist/tabworthy-components/{p-c0f957f5.entry.js → p-0e77d058.entry.js} +1 -1
- package/dist/tabworthy-components/{p-4eec41e5.entry.js → p-81ad5b1f.entry.js} +1 -1
- package/dist/tabworthy-components/{p-90de04dd.entry.js → p-a595158c.entry.js} +1 -1
- package/dist/tabworthy-components/tabworthy-components.esm.js +1 -1
- package/dist/types/components/tabworthy-dates/tabworthy-dates.d.ts +1 -0
- package/dist/types/components/tabworthy-times/tabworthy-times.d.ts +3 -1
- package/dist/types/components/tabworthy-times-picker/tabworthy-times-picker.d.ts +3 -3
- package/dist/types/components.d.ts +8 -4
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as
|
|
1
|
+
import{r as t,c as i,h as e,H as s,g as h}from"./p-CwtZ_Lud.js";const a={hours:"Hours",minutes:"Minutes",am:"AM",pm:"PM",timePicker:"Time picker",incrementHours:"Increment hours",decrementHours:"Decrement hours",incrementMinutes:"Increment minutes",decrementMinutes:"Decrement minutes"},n=class{constructor(e){t(this,e),this.timeChanged=i(this,"timeChanged",7),this.hours=12,this.minutes=0,this.useTwelveHourFormat=!1,this.labels=a,this.labelsSrOnly=!0,this.disabled=!1,this.elementClassName="tabworthy-times-picker",this.internalHours=this.hours,this.internalMinutes=this.minutes,this.period=this.hours>=12?"PM":"AM",this.handleHourChange=t=>{const i=parseInt(t.target.value,10);this.internalHours=this.useTwelveHourFormat?"AM"===this.period?12===i?0:i:12===i?12:i+12:i,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 i=this.getDisplayHours();this.internalHours="AM"===t?12===i?0:i:12===i?12:i+12,this.emitTimeChange()},this.handleHourIncrement=()=>{if(this.useTwelveHourFormat){const t=this.getDisplayHours(),i=12===t?1:t+1;this.internalHours="AM"===this.period?12===i?0:i:12===i?12:i+12}else this.internalHours=(this.internalHours+1)%24;this.emitTimeChange()},this.handleHourDecrement=()=>{if(this.useTwelveHourFormat){const t=this.getDisplayHours(),i=1===t?12:t-1;this.internalHours="AM"===this.period?12===i?0:i:12===i?12:i+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()}}watchHours(t){this.internalHours=t,this.period=t>=12?"PM":"AM"}watchMinutes(t){this.internalMinutes=t}componentWillLoad(){this.internalHours=this.hours,this.internalMinutes=this.minutes,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,period:this.useTwelveHourFormat?this.period:void 0})}padZero(t){return t.toString().padStart(2,"0")}render(){const t=this.getDisplayHours(),i=this.useTwelveHourFormat?12:23,h=this.useTwelveHourFormat?1:0;return e(s,{key:"5c9fbbe95d08e086bf78761da0375526f5042d15",class:this.elementClassName,"aria-label":this.labels.timePicker},e("div",{key:"f914ccebcf2025226762b1446944be41b555b5ea",class:`${this.elementClassName}__container`},e("div",{key:"a17ed2def130bbe92a17dd733f1b516d68ae98f3",class:`${this.elementClassName}__field`},e("label",{key:"513ca90795cca3c209df22def8fae8dd377d74ef",htmlFor:`${this.elementClassName}-hours`,class:{[`${this.elementClassName}__label`]:!0,[`${this.elementClassName}__label--sr-only`]:this.labelsSrOnly}},this.labels.hours),e("div",{key:"3f7448b3161d594e3d601700e1a703a3f2857ffe",class:`${this.elementClassName}__control`},e("button",{key:"19f8cf8fdfc931e0baa10b98864589990d628b7f",type:"button",class:`${this.elementClassName}__button ${this.elementClassName}__button--increment`,onClick:this.handleHourIncrement,disabled:this.disabled,"aria-label":this.labels.incrementHours},e("svg",{key:"fb12854d35131adad4250bf24e25936ad583f74f",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:"8176d2b9d15e81ef7c700064cadd2b83b8572593",points:"18 15 12 9 6 15"}))),e("input",{key:"66986ad937685f83bf1bc999c4aabf5f2ed9d3d9",id:`${this.elementClassName}-hours`,type:"number",class:`${this.elementClassName}__input`,value:this.padZero(t),min:h,max:i,onInput:this.handleHourChange,disabled:this.disabled,"aria-label":this.labels.hours}),e("button",{key:"d225e66235e04132bf461bb6e73377a823db1b9f",type:"button",class:`${this.elementClassName}__button ${this.elementClassName}__button--decrement`,onClick:this.handleHourDecrement,disabled:this.disabled,"aria-label":this.labels.decrementHours},e("svg",{key:"387c4d7ddb7097da7032345db6c09db5e0ea0d0b",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:"4c307b1ecb096d3c4d42ed7c79b0c8cde004842a",points:"6 9 12 15 18 9"}))))),e("div",{key:"9c8101ae559b74d985286688e3147aacc80ab448",class:`${this.elementClassName}__separator`},":"),e("div",{key:"8a49a068478e1fda98634e1d74bb399b5ae1a5f4",class:`${this.elementClassName}__field`},e("label",{key:"3c585236e76192d10f013aff1a765f9b31e9bce6",htmlFor:`${this.elementClassName}-minutes`,class:{[`${this.elementClassName}__label`]:!0,[`${this.elementClassName}__label--sr-only`]:this.labelsSrOnly}},this.labels.minutes),e("div",{key:"8d567d355ae2f34c51c057c81ea0921a8de6f012",class:`${this.elementClassName}__control`},e("button",{key:"a061d7d4b66b787d4478d54bc36525e5d9bf7e61",type:"button",class:`${this.elementClassName}__button ${this.elementClassName}__button--increment`,onClick:this.handleMinuteIncrement,disabled:this.disabled,"aria-label":this.labels.incrementMinutes},e("svg",{key:"148244241427e2bca0f6fc7147f9ca5a329c4480",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:"d10fa3e7a7815b8806d583041aeae70b4de0e267",points:"18 15 12 9 6 15"}))),e("input",{key:"db14c0a90805afede369a9e0878191537e9eef9f",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:"1820f55ac22cd78494a40fa7b5f2e1c1ea191a18",type:"button",class:`${this.elementClassName}__button ${this.elementClassName}__button--decrement`,onClick:this.handleMinuteDecrement,disabled:this.disabled,"aria-label":this.labels.decrementMinutes},e("svg",{key:"9135d7673f58babaf44b0c33ad1755b3097aea01",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:"f36192868f379fc2abe3b2deade678eeab725ee1",points:"6 9 12 15 18 9"}))))),this.useTwelveHourFormat&&e("div",{key:"6bf685eaed72c157b8c01c40e8b84bace096d417",class:`${this.elementClassName}__period`},e("button",{key:"107a2a21de03626e15b35cd850f5ee8a2eb09f8e",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:"62ad24e781b8da40699e4f91acbc20eeef1c2f65",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}]}}};export{n as tabworthy_times_picker}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,H as h,g as e}from"./p-CwtZ_Lud.js";import{h as a}from"./p-Mki5YqAR.js";import{g as r,r as o}from"./p-BVHu5CWV.js";const
|
|
1
|
+
import{r as t,c as s,h as i,H as h,g as e}from"./p-CwtZ_Lud.js";import{h as a}from"./p-Mki5YqAR.js";import{g as r,r as o}from"./p-BVHu5CWV.js";const d={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"},n=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=r(new Date),this.referenceDate=r(new Date),this.useTwelveHourFormat=!0,this.timesLabels=d,this.inline=!1,this.hasError=!1,this.showYearStepper=!1,this.showMonthStepper=!0,this.showClearButton=!0,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=12,this.selectedMinutes=0,this.errorState=this.hasError,this.disabledState=this.disabled,this.errorMessage="",this.handlePickerSelection=async t=>{const s=t.split(",");if(this.range&&2===s.length){const t=o(new Date(s[0])),i=o(new Date(s[1]));this.updateValue([t,i]),this.pickerRef&&(this.pickerRef.value=[t,i])}else{const t=o(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,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=a(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=a(t,this.format);s.isValid()&&(this.selectedDate=s.toDate(),this.selectedHours=s.hours(),this.selectedMinutes=s.minutes())}}else this.internalValue=null}updateValue(t){if(Array.isArray(t)){const s=t.map((t=>{const s=a(t);return s.hours(this.selectedHours),s.minutes(this.selectedMinutes),s.seconds(0),s.format(this.format)}));this.internalValue=s,this.value=s,this.selectDateTime.emit(s)}else{const s=a(t);s.hours(this.selectedHours),s.minutes(this.selectedMinutes),s.seconds(0);const i=s.format(this.format);this.internalValue=i,this.value=i,this.selectedDate=t,this.selectDateTime.emit(i)}this.errorState=!1,this.shouldInputFormat()&&this.formatInput()}formatInput(){if(this.internalValue)if(Array.isArray(this.internalValue)){const t=this.internalValue.map((t=>a(t,this.format).format("lll"))).join(` ${this.timesLabels.to} `);this.inputRef.value=t}else this.inputRef.value=a(this.internalValue,this.format).format("lll")}getClassName(t){return`${this.elementClassName}__${t}`}toDate(t){return t?Array.isArray(t)?t.map((t=>a(t,this.format).toDate())):a(t,this.format).toDate():null}async clearValue(){this.internalValue=null,this.value=void 0,this.selectedDate=void 0,this.inputRef.value="",this.pickerRef&&(this.pickerRef.value=null),this.selectDateTime.emit(void 0)}render(){var t;return i(h,{key:"50d45c4b42629ab4db986c798de53bffcfb94018",class:this.elementClassName,"has-error":this.errorState,disabled:this.disabledState},i("label",{key:"9b97b3a86a29629b5acef900cd46c12401a0ed15",htmlFor:`${this.id}-input`,class:this.getClassName("label")},this.label),i("div",{key:"84e4b339f17a14b036e08c3ed55c28ebf8ff1eef",class:this.getClassName("input-container"),ref:t=>this.inputContainerRef=t},i("input",{key:"f189b9624b1e7a9d80a71dbdbcadc606d4e8c431",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:"dc54c9ff8d4fab01d6175584320de0a0b8282cb2",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:"1102460f03ffbd9dd3878376fc37fe19aaa50f54",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:"fbce75861b31c85a58055eb4dc1c3f9ad0d0be73",class:this.getClassName("picker-container")},i("tabworthy-dates-calendar",{key:"265ab52d552985fddd4c6944fb2405baadae1450",range:this.range,locale:this.locale,onSelectDate:t=>this.handlePickerSelection(t.detail),onChangeMonth:t=>this.handleChangedMonths(t.detail),onChangeYear:t=>this.handleYearChange(t.detail),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,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:"f7377b3ff5a818849afcab7297a6f3d732dd4b82",slot:"after-calendar",class:this.getClassName("time-section")},i("hr",{key:"d71bc64c57fc8073e4af045347f9be69e20bac9f",class:this.getClassName("divider")}),i("tabworthy-times-picker",{key:"2ee95db049c3a81b26fa38b9bb4288f0850dc25f",hours:this.selectedHours,minutes:this.selectedMinutes,useTwelveHourFormat:this.useTwelveHourFormat,disabled:this.disabledState,onTimeChanged:this.handleTimeChange,labels:this.timesPickerLabels}))))),this.errorState&&i("div",{key:"0b0f79267ba191582d5e23be27970b16db80aab7",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{n as tabworthy_times}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-CwtZ_Lud.js";export{s as setNonce}from"./p-CwtZ_Lud.js";import{g as a}from"./p-DQuL1Twl.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((async e=>(await a(),t([["p-
|
|
1
|
+
import{p as e,b as t}from"./p-CwtZ_Lud.js";export{s as setNonce}from"./p-CwtZ_Lud.js";import{g as a}from"./p-DQuL1Twl.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((async e=>(await a(),t([["p-81ad5b1f",[[2,"tabworthy-times-picker",{hours:[1026],minutes:[1026],useTwelveHourFormat:[4,"use-twelve-hour-format"],labels:[16],labelsSrOnly:[4,"labels-sr-only"],disabled:[4],elementClassName:[1,"element-class-name"],internalHours:[32],internalMinutes:[32],period:[32]},null,{hours:[{watchHours:0}],minutes:[{watchMinutes:0}]}]]],["p-ee41beed",[[262,"tabworthy-dates-calendar",{clearButtonContent:[1,"clear-button-content"],disabled:[4],modalIsOpen:[4,"modal-is-open"],disableDate:[16],elementClassName:[1,"element-class-name"],firstDayOfWeek:[2,"first-day-of-week"],range:[4],labels:[16],locale:[1],nextMonthButtonContent:[1,"next-month-button-content"],nextYearButtonContent:[1,"next-year-button-content"],previousMonthButtonContent:[1,"previous-month-button-content"],previousYearButtonContent:[1,"previous-year-button-content"],minDate:[1,"min-date"],maxDate:[1,"max-date"],inline:[4],showClearButton:[4,"show-clear-button"],showMonthStepper:[4,"show-month-stepper"],showTodayButton:[4,"show-today-button"],showYearStepper:[4,"show-year-stepper"],showKeyboardHint:[4,"show-keyboard-hint"],showHiddenTitle:[4,"show-hidden-title"],startDate:[1,"start-date"],todayButtonContent:[1,"today-button-content"],value:[1040],currentDate:[32],hoveredDate:[32],weekdays:[32]},null,{modalIsOpen:[{watchModalIsOpen:0}],firstDayOfWeek:[{watchFirstDayOfWeek:0}],locale:[{watchLocale:0}],range:[{watchRange:0}],startDate:[{watchStartDate:0}],value:[{watchValue:0}]}],[257,"tabworthy-dates-modal",{label:[1],inline:[4],placement:[1],offset:[16],appendTo:[1,"append-to"],closing:[32],showing:[32],positioned:[32],open:[64],close:[64],getState:[64],setTriggerElement:[64],updatePosition:[64]},[[10,"click","handleClick"]],{showing:[{watchShowing:0}]}]]],["p-a595158c",[[2,"tabworthy-times",{id:[513],value:[1025],range:[4],label:[1],placeholder:[1],locale:[1],disabled:[4],minDate:[1,"min-date"],maxDate:[1,"max-date"],startDate:[1,"start-date"],referenceDate:[1,"reference-date"],useTwelveHourFormat:[4,"use-twelve-hour-format"],timesLabels:[16],datesCalendarLabels:[16],timesPickerLabels:[16],inline:[4],hasError:[1028,"has-error"],showYearStepper:[4,"show-year-stepper"],showMonthStepper:[4,"show-month-stepper"],showClearButton:[4,"show-clear-button"],showTodayButton:[4,"show-today-button"],calendarButtonContent:[1,"calendar-button-content"],disableDate:[16],elementClassName:[1,"element-class-name"],firstDayOfWeek:[2,"first-day-of-week"],format:[1],inputShouldFormat:[8,"input-should-format"],disableFreeformInput:[4,"disable-freeform-input"],inputClass:[1,"input-class"],appendTo:[1,"append-to"],internalValue:[32],selectedDate:[32],selectedHours:[32],selectedMinutes:[32],errorState:[32],disabledState:[32],clearValue:[64]},null,{value:[{watchValue:0}],disabled:[{watchDisabled:0}],hasError:[{watchHasError:0}]}]]],["p-0e77d058",[[2,"tabworthy-dates",{id:[513],value:[1025],range:[4],label:[1],placeholder:[1],locale:[1],disabled:[4],minDate:[1,"min-date"],maxDate:[1,"max-date"],startDate:[1,"start-date"],referenceDate:[1,"reference-date"],useStrictDateParsing:[4,"use-strict-date-parsing"],datesLabels:[16],datesCalendarLabels:[16],inline:[4],hasError:[1028,"has-error"],nextMonthButtonContent:[1,"next-month-button-content"],nextYearButtonContent:[1,"next-year-button-content"],showYearStepper:[4,"show-year-stepper"],showMonthStepper:[4,"show-month-stepper"],showClearButton:[4,"show-clear-button"],showTodayButton:[4,"show-today-button"],inputShouldFormat:[8,"input-should-format"],showKeyboardHint:[4,"show-keyboard-hint"],disableDate:[16],elementClassName:[1,"element-class-name"],firstDayOfWeek:[2,"first-day-of-week"],format:[1],quickButtons:[16],todayButtonContent:[1,"today-button-content"],calendarButtonContent:[1,"calendar-button-content"],showQuickButtons:[4,"show-quick-buttons"],disableFreeformInput:[4,"disable-freeform-input"],inputClass:[1,"input-class"],appendTo:[1,"append-to"],internalValue:[32],errorState:[32],disabledState:[32],parseDate:[64]},null,{disabled:[{watchDisabled:0}],value:[{watchValue:0}]}]]]],e))));
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
+
import { TimesPickerLabels } from "../tabworthy-times-picker/tabworthy-times-picker";
|
|
2
3
|
import { DatesLabels } from "../tabworthy-dates/tabworthy-dates";
|
|
3
4
|
import { DatesCalendarLabels, YearChangedEventDetails } from "../tabworthy-dates-calendar/tabworthy-dates-calendar";
|
|
4
|
-
export interface TimesLabels extends DatesLabels {
|
|
5
|
+
export interface TimesLabels extends Omit<DatesLabels, "quickSelection"> {
|
|
5
6
|
timeLabel: string;
|
|
6
7
|
}
|
|
7
8
|
export declare class InclusiveTimes {
|
|
@@ -20,6 +21,7 @@ export declare class InclusiveTimes {
|
|
|
20
21
|
useTwelveHourFormat: boolean;
|
|
21
22
|
timesLabels: TimesLabels;
|
|
22
23
|
datesCalendarLabels?: DatesCalendarLabels;
|
|
24
|
+
timesPickerLabels?: TimesPickerLabels;
|
|
23
25
|
inline: boolean;
|
|
24
26
|
hasError: boolean;
|
|
25
27
|
showYearStepper: boolean;
|
|
@@ -4,7 +4,7 @@ export interface TimeValue {
|
|
|
4
4
|
minutes: number;
|
|
5
5
|
period?: "AM" | "PM";
|
|
6
6
|
}
|
|
7
|
-
export interface
|
|
7
|
+
export interface TimesPickerLabels {
|
|
8
8
|
hours: string;
|
|
9
9
|
minutes: string;
|
|
10
10
|
am: string;
|
|
@@ -15,12 +15,12 @@ export interface InclusivekTimesPickerLabels {
|
|
|
15
15
|
incrementMinutes: string;
|
|
16
16
|
decrementMinutes: string;
|
|
17
17
|
}
|
|
18
|
-
export declare class
|
|
18
|
+
export declare class TabworthyTimesPicker {
|
|
19
19
|
el: HTMLElement;
|
|
20
20
|
hours: number;
|
|
21
21
|
minutes: number;
|
|
22
22
|
useTwelveHourFormat: boolean;
|
|
23
|
-
labels:
|
|
23
|
+
labels: TimesPickerLabels;
|
|
24
24
|
labelsSrOnly: boolean;
|
|
25
25
|
disabled: boolean;
|
|
26
26
|
elementClassName: string;
|
|
@@ -11,14 +11,16 @@ import { ChronoOptions, ChronoParsedDateString } from "../shared/utils/chrono-pa
|
|
|
11
11
|
import { DatesCalendarLabels as DatesCalendarLabels1, MonthChangedEventDetails, YearChangedEventDetails as YearChangedEventDetails1 } from "./components/tabworthy-dates-calendar/tabworthy-dates-calendar";
|
|
12
12
|
import { Placement } from "@popperjs/core";
|
|
13
13
|
import { TimesLabels } from "./components/tabworthy-times/tabworthy-times";
|
|
14
|
-
import {
|
|
14
|
+
import { TimesPickerLabels } from "./components/tabworthy-times-picker/tabworthy-times-picker";
|
|
15
|
+
import { TimesPickerLabels as TimesPickerLabels1, TimeValue } from "./components/tabworthy-times-picker/tabworthy-times-picker";
|
|
15
16
|
export { DatesLabels } from "./components/tabworthy-dates/tabworthy-dates";
|
|
16
17
|
export { DatesCalendarLabels, YearChangedEventDetails } from "./components/tabworthy-dates-calendar/tabworthy-dates-calendar";
|
|
17
18
|
export { ChronoOptions, ChronoParsedDateString } from "../shared/utils/chrono-parser/chrono-parser.type";
|
|
18
19
|
export { DatesCalendarLabels as DatesCalendarLabels1, MonthChangedEventDetails, YearChangedEventDetails as YearChangedEventDetails1 } from "./components/tabworthy-dates-calendar/tabworthy-dates-calendar";
|
|
19
20
|
export { Placement } from "@popperjs/core";
|
|
20
21
|
export { TimesLabels } from "./components/tabworthy-times/tabworthy-times";
|
|
21
|
-
export {
|
|
22
|
+
export { TimesPickerLabels } from "./components/tabworthy-times-picker/tabworthy-times-picker";
|
|
23
|
+
export { TimesPickerLabels as TimesPickerLabels1, TimeValue } from "./components/tabworthy-times-picker/tabworthy-times-picker";
|
|
22
24
|
export namespace Components {
|
|
23
25
|
interface TabworthyDates {
|
|
24
26
|
/**
|
|
@@ -343,6 +345,7 @@ export namespace Components {
|
|
|
343
345
|
* @default defaultLabels
|
|
344
346
|
*/
|
|
345
347
|
"timesLabels": TimesLabels;
|
|
348
|
+
"timesPickerLabels"?: TimesPickerLabels;
|
|
346
349
|
/**
|
|
347
350
|
* @default true
|
|
348
351
|
*/
|
|
@@ -365,7 +368,7 @@ export namespace Components {
|
|
|
365
368
|
/**
|
|
366
369
|
* @default defaultLabels
|
|
367
370
|
*/
|
|
368
|
-
"labels":
|
|
371
|
+
"labels": TimesPickerLabels1;
|
|
369
372
|
/**
|
|
370
373
|
* @default true
|
|
371
374
|
*/
|
|
@@ -822,6 +825,7 @@ declare namespace LocalJSX {
|
|
|
822
825
|
* @default defaultLabels
|
|
823
826
|
*/
|
|
824
827
|
"timesLabels"?: TimesLabels;
|
|
828
|
+
"timesPickerLabels"?: TimesPickerLabels;
|
|
825
829
|
/**
|
|
826
830
|
* @default true
|
|
827
831
|
*/
|
|
@@ -844,7 +848,7 @@ declare namespace LocalJSX {
|
|
|
844
848
|
/**
|
|
845
849
|
* @default defaultLabels
|
|
846
850
|
*/
|
|
847
|
-
"labels"?:
|
|
851
|
+
"labels"?: TimesPickerLabels1;
|
|
848
852
|
/**
|
|
849
853
|
* @default true
|
|
850
854
|
*/
|