@momentum-ui/web-components 2.23.30 → 2.23.31

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/4974.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[4974],{14974:(e,r,t)=>{t.d(r,{A:()=>a});const a=t(41488).css`.md-datepicker{overflow:visible}.md-datepicker__month-container{display:flex;flex-direction:column;height:19.25rem;justify-content:space-between;padding:12px 10px 8px}.md-datepicker__navigation--buttons{align-items:center;gap:.5rem;color:var(--datepicker-default-navigation-button,var(--md-primary-text-color,inherit));display:flex;justify-content:space-between;line-height:normal}.md-datepicker__navigation--buttons md-button::part(button)::after{margin:0;height:28px;width:28px}.md-datepicker__month{display:flex;flex-direction:column;width:15.5rem;gap:.25rem}.md-datepicker__week{display:flex;gap:.25rem;flex-wrap:nowrap;font-size:var(--brand-font-midsize,.875rem)}.md-datepicker__navigation--current-month{font-size:1rem;font-family:var(--brand-font-bold,inherit);line-height:var(--font-lineheight-body-large,1.5rem);font-weight:700;text-transform:capitalize;color:var(--datepicker-default-navigation-label,inherit)}.md-datepicker__navigation{display:flex;justify-content:space-between;align-items:center;padding:0 1px}.md-datepicker__day--names{display:flex}.md-datepicker__day{color:var(--datepicker-default-number-color,inherit);border-radius:100%;display:inline-flex;height:2rem;width:2rem;font-weight:400}.md-datepicker__day--names{color:var(--datepicker-default-days,var(--md-secondary-text-color));display:flex;gap:.25rem;font-size:var(--font-size-body-midsize,.625rem);font-family:var(--brand-font-bold, "CiscoSansTT Bold");font-weight:var(--brand-font-weight-bold,700);justify-content:center;align-items:center;line-height:.875rem;margin:12px 0 4px;text-transform:capitalize;text-align:center;width:15.5rem;letter-spacing:0}.md-datepicker__day--names .md-datepicker__day--name{display:flex;justify-content:center;align-items:center;width:2rem;height:2rem}.md-datepicker__day::part(button){align-items:center;justify-content:center;display:inline-flex}.md-datepicker__day::part(button):hover{background:var(--datepicker-default-hover-bg-color)}.md-datepicker__day[disabled]::part(button){background:0 0;color:var(--md-disabled-text-color,inherit)}.md-datepicker__day--today::part(button){font-weight:700}.md-datepicker__day--today::part(button)::after{outline:var(--datepicker-selected-today-border,1px solid var(--datepicker-range-text-color));outline-offset:-.25rem}.md-datepicker__day--focus::part(button){background:var(--datepicker-range-hover-bg-color)}.md-datepicker__day--selected::part(button){background:var(--datepicker-selected-bg-color,var(--md-primary-text-color));color:var(--datepicker-selected-text-color,var(--md-secondary-bg-color))}.md-datepicker__day--selected::part(button):hover{background:var(--datepicker-selected-hover-bg-color);color:var(--datepicker-selected-text-color)}.md-datepicker__day--selected::part(button):active{background:var(--datepicker-selected-pressed-bg-color);color:var(--datepicker-selected-text-color)}.md-datepicker__day--outside-month{color:var(--datepicker-invalid-text-color,var(--md-disabled-text-color,inherit))}.md-datepicker__day--in-range::part(button){color:var(--datepicker-range-text-color);z-index:10}.md-datepicker__day--in-range::part(button)::before{background:var(--datepicker-range-bg-color);content:"";display:block;height:2rem;position:absolute;top:0;width:calc(2rem + 5px);z-index:-1}.md-datepicker__day--in-range::part(button):hover{color:var(--datepicker-range-text-color)}.md-datepicker__day--in-range::part(button):active{color:var(--datepicker-pressed-text-color)}.md-datepicker__day--in-range::part(button):focus{z-index:12;color:var(--datepicker-range-text-color)}.md-datepicker__day--week-first.md-datepicker__day--in-range::part(button)::before{width:2.125rem;left:0}.md-datepicker__day--start-date::part(button){font-family:var(--brand-font-bold);color:var(--datepicker-selected-text-color,var(--md-secondary-bg-color));z-index:11;box-shadow:none}.md-datepicker__day--start-date::part(button):hover{color:var(--datepicker-selected-text-color,var(--md-secondary-bg-color))}.md-datepicker__day--start-date::part(button):focus{color:var(--datepicker-range-text-color)}.md-datepicker__day--start-date::part(button)::before{width:2rem;left:.125rem;background:radial-gradient(circle at 50% center,var(--datepicker-selected-bg-color) 60%,transparent 60%,var(--datepicker-range-bg-color) 60%,var(--datepicker-range-bg-color) 60%);border-bottom-left-radius:1rem;border-top-left-radius:1rem}.md-datepicker__day--start-date::part(button)::after{height:2rem;width:2rem;left:.125rem;top:.125rem;z-index:-1;background:radial-gradient(circle at 50% center,transparent 40%,var(--datepicker-range-edge-bg-color) 40%,var(--datepicker-range-edge-bg-color) 100%,transparent 100%);content:""}.md-datepicker__day--start-date::part(button):focus{color:var(--datepicker-selected-text-color)}.md-datepicker__day--start-date::part(button):focus::before{background:radial-gradient(circle at 50% center,var(--datepicker-selected-bg-color) 60%,rgba(0,0,0,0) 60%,var(--datepicker-range-bg-color) 60%,var(--datepicker-range-bg-color) 60%)}.md-datepicker__day--start-date::part(button):focus::after{z-index:-1;box-shadow:none;outline:.125rem solid var(--button-focus-ring-color);outline-offset:.125rem;background:radial-gradient(circle at 50% center,rgba(0,0,0,0) 40%,var(--datepicker-selected-bg-color) 40%,var(--datepicker-selected-bg-color) 100%,rgba(0,0,0,0) 100%);content:""}.md-datepicker__day--start-date::part(button):hover{color:var(--datepicker-selected-text-color);border-bottom-right-radius:1rem;border-top-right-radius:1rem}.md-datepicker__day--start-date::part(button):hover::before{background:radial-gradient(circle at 50% center,var(--datepicker-selected-hover-bg-color) 50%,rgba(0,0,0,0) 50%,var(--datepicker-range-bg-color) 50%,var(--datepicker-range-bg-color) 50%)}.md-datepicker__day--start-date::part(button):hover::after{z-index:-1;background:radial-gradient(circle at 50% center,rgba(0,0,0,0) 40%,var(--datepicker-selected-hover-bg-color) 40%,var(--datepicker-selected-hover-bg-color) 100%,rgba(0,0,0,0) 100%);content:""}.md-datepicker__day--end-date::part(button){font-family:var(--brand-font-bold);color:var(--datepicker-selected-text-color,var(--md-secondary-bg-color))}.md-datepicker__day--end-date::part(button)::before{height:2rem;width:2.125rem;left:-.25rem;background:radial-gradient(circle at 50% center,var(--datepicker-selected-bg-color) 50%,transparent 50%,var(--datepicker-range-bg-color) 50%,var(--datepicker-range-bg-color) 50%);border-bottom-right-radius:1rem;border-top-right-radius:1rem}.md-datepicker__day--end-date::part(button)::after{height:2rem;width:2rem;left:.125rem;top:.125rem;z-index:-1;background:radial-gradient(circle at 50% center,rgba(0,0,0,0) 30%,var(--datepicker-range-edge-bg-color) 30%,var(--datepicker-range-edge-bg-color) 100%,rgba(0,0,0,0) 100%);content:""}.md-datepicker__day--end-date::part(button):focus{color:var(--datepicker-selected-text-color)}.md-datepicker__day--end-date::part(button):focus::before{background:radial-gradient(circle at 50% center,var(--datepicker-selected-bg-color) 50%,transparent 50%,var(--datepicker-range-bg-color) 50%,var(--datepicker-range-bg-color) 50%)}.md-datepicker__day--end-date::part(button):focus::after{z-index:-1;box-shadow:none;outline:.125rem solid var(--button-focus-ring-color);outline-offset:.125rem;background:radial-gradient(circle at 50% center,rgba(0,0,0,0) 30%,var(--datepicker-selected-bg-color) 30%,var(--datepicker-selected-bg-color) 100%,rgba(0,0,0,0) 100%);content:""}.md-datepicker__day--end-date::part(button):hover{color:var(--datepicker-selected-text-color)}.md-datepicker__day--end-date::part(button):hover::before{background:radial-gradient(circle at 50% center,var(--datepicker-selected-hover-bg-color) 60%,rgba(0,0,0,0) 60%,var(--datepicker-range-bg-color) 60%,var(--datepicker-range-bg-color) 60%)}.md-datepicker__day--end-date::part(button):hover::after{z-index:-1;background:radial-gradient(circle at 50% center,rgba(0,0,0,0) 30%,var(--datepicker-selected-hover-bg-color) 30%,var(--datepicker-selected-hover-bg-color) 100%,rgba(0,0,0,0) 100%);content:""}.md-datepicker__day--week-first::part(button)::before{border-bottom-left-radius:1rem;border-top-left-radius:1rem}.md-datepicker__day--week-last::part(button)::before{border-bottom-right-radius:1rem;border-top-right-radius:1rem;width:calc(2rem + .25rem);left:-.25rem}.md-datepicker__day--week-first.md-datepicker__day--end-date::part(button),.md-datepicker__day--week-last.md-datepicker__day--start-date::part(button){background:0 0}.md-datepicker__day--week-first.md-datepicker__day--end-date::part(button)::after,.md-datepicker__day--week-first.md-datepicker__day--end-date::part(button)::before,.md-datepicker__day--week-last.md-datepicker__day--start-date::part(button)::after,.md-datepicker__day--week-last.md-datepicker__day--start-date::part(button)::before{border-radius:1rem;width:2rem;height:2rem;left:.125rem;top:.125rem;background:0 0}.md-datepicker__day--week-first.md-datepicker__day--end-date::part(button)::after,.md-datepicker__day--week-last.md-datepicker__day--start-date::part(button)::after{background:radial-gradient(circle at 50% center,var(--datepicker-selected-bg-color) 0,var(--datepicker-selected-bg-color) 100%,transparent 100%)}.md-datepicker__day--week-first.md-datepicker__day--end-date::part(button):hover::after,.md-datepicker__day--week-last.md-datepicker__day--start-date::part(button):hover::after{background:radial-gradient(circle at 50% center,var(--datepicker-selected-hover-bg-color) 0,var(--datepicker-selected-hover-bg-color) 100%,transparent 100%)}.control-buttons{display:flex;justify-content:flex-end;gap:.5rem;margin:.25rem .75rem .75rem}`}}]);
1
+ "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[4974],{14974:(e,r,t)=>{t.d(r,{A:()=>a});const a=t(41488).css`.md-datepicker{overflow:visible}.md-datepicker__month-container{display:flex;flex-direction:column;height:19.25rem;justify-content:space-between;padding:12px 10px 8px}.md-datepicker__navigation--buttons{align-items:center;gap:.5rem;color:var(--datepicker-default-navigation-button,var(--md-primary-text-color,inherit));display:flex;justify-content:space-between;line-height:normal}.md-datepicker__navigation--buttons md-button::part(button)::after{margin:0;height:28px;width:28px}.md-datepicker__month{display:flex;flex-direction:column;width:15.5rem;gap:.25rem}.md-datepicker__week{display:flex;gap:.25rem;flex-wrap:nowrap;font-size:var(--brand-font-midsize,.875rem)}.md-datepicker__navigation--current-month{font-size:1rem;font-family:var(--brand-font-bold,inherit);line-height:var(--font-lineheight-body-large,1.5rem);font-weight:700;text-transform:capitalize;color:var(--datepicker-default-navigation-label,inherit)}.md-datepicker__navigation{display:flex;justify-content:space-between;align-items:center;padding:0 1px}.md-datepicker__day--names{display:flex}.md-datepicker__day{color:var(--datepicker-default-number-color,inherit);border-radius:100%;display:inline-flex;height:2rem;width:2rem;font-weight:400}.md-datepicker__day--names{color:var(--datepicker-default-days,var(--md-secondary-text-color));display:flex;gap:.25rem;font-size:var(--font-size-body-midsize,.625rem);font-family:var(--brand-font-bold, "CiscoSansTT Bold");font-weight:var(--brand-font-weight-bold,700);justify-content:center;align-items:center;line-height:.875rem;margin:12px 0 4px;text-transform:capitalize;text-align:center;width:15.5rem;letter-spacing:0}.md-datepicker__day--names .md-datepicker__day--name{display:flex;justify-content:center;align-items:center;width:2rem;height:2rem}.md-datepicker__day::part(button){align-items:center;justify-content:center;display:inline-flex}.md-datepicker__day::part(button):hover{background:var(--datepicker-default-hover-bg-color)}.md-datepicker__day[disabled]::part(button){background:0 0;color:var(--md-disabled-text-color,inherit)}.md-datepicker__day--today::part(button){font-weight:700}.md-datepicker__day--today::part(button)::after{outline:var(--datepicker-selected-today-border,1px solid var(--datepicker-range-text-color));outline-offset:-.25rem}.md-datepicker__day--focus::part(button){background:var(--datepicker-range-hover-bg-color)}.md-datepicker__day--selected::part(button){background:var(--datepicker-selected-bg-color,var(--md-primary-text-color));color:var(--datepicker-selected-text-color,var(--md-secondary-bg-color))}.md-datepicker__day--selected::part(button):hover{background:var(--datepicker-selected-hover-bg-color);color:var(--datepicker-selected-text-color)}.md-datepicker__day--selected::part(button):active{background:var(--datepicker-selected-pressed-bg-color);color:var(--datepicker-selected-text-color)}.md-datepicker__day--outside-month{color:var(--datepicker-invalid-text-color,var(--md-disabled-text-color,inherit))}.md-datepicker__day--in-range::part(button){color:var(--datepicker-range-text-color);z-index:10}.md-datepicker__day--in-range::part(button)::before{background:var(--datepicker-range-bg-color);content:"";display:block;height:2rem;position:absolute;top:0;width:calc(2rem + 5px);z-index:-1}.md-datepicker__day--in-range::part(button):hover{color:var(--datepicker-range-text-color)}.md-datepicker__day--in-range::part(button):active{color:var(--datepicker-pressed-text-color)}.md-datepicker__day--in-range::part(button):focus{z-index:12;color:var(--datepicker-range-text-color)}.md-datepicker__day--week-first.md-datepicker__day--in-range::part(button)::before{width:2.125rem;left:0}.md-datepicker__day--start-date::part(button){font-family:var(--brand-font-bold);color:var(--datepicker-selected-text-color,var(--md-secondary-bg-color));z-index:11;box-shadow:none}.md-datepicker__day--start-date::part(button):hover{color:var(--datepicker-selected-text-color,var(--md-secondary-bg-color))}.md-datepicker__day--start-date::part(button):focus{color:var(--datepicker-range-text-color)}.md-datepicker__day--start-date::part(button)::before{width:2rem;left:.125rem;background:radial-gradient(circle at 50% center,var(--datepicker-selected-bg-color) 60%,transparent 60%,var(--datepicker-range-bg-color) 60%,var(--datepicker-range-bg-color) 60%);border-bottom-left-radius:1rem;border-top-left-radius:1rem}.md-datepicker__day--start-date::part(button)::after{height:2rem;width:2rem;left:.125rem;top:.125rem;z-index:-1;background:radial-gradient(circle at 50% center,transparent 40%,var(--datepicker-range-edge-bg-color) 40%,var(--datepicker-range-edge-bg-color) 100%,transparent 100%);content:""}.md-datepicker__day--start-date::part(button):focus{color:var(--datepicker-selected-text-color)}.md-datepicker__day--start-date::part(button):focus::before{background:radial-gradient(circle at 50% center,var(--datepicker-selected-bg-color) 60%,rgba(0,0,0,0) 60%,var(--datepicker-range-bg-color) 60%,var(--datepicker-range-bg-color) 60%)}.md-datepicker__day--start-date::part(button):focus::after{z-index:-1;box-shadow:none;outline:.125rem solid var(--button-focus-ring-color);outline-offset:.125rem;background:radial-gradient(circle at 50% center,rgba(0,0,0,0) 40%,var(--datepicker-selected-bg-color) 40%,var(--datepicker-selected-bg-color) 100%,rgba(0,0,0,0) 100%);content:""}.md-datepicker__day--start-date::part(button):hover{color:var(--datepicker-selected-text-color);border-bottom-right-radius:1rem;border-top-right-radius:1rem}.md-datepicker__day--start-date::part(button):hover::before{background:radial-gradient(circle at 50% center,var(--datepicker-selected-hover-bg-color) 50%,rgba(0,0,0,0) 50%,var(--datepicker-range-bg-color) 50%,var(--datepicker-range-bg-color) 50%)}.md-datepicker__day--start-date::part(button):hover::after{z-index:-1;background:radial-gradient(circle at 50% center,rgba(0,0,0,0) 40%,var(--datepicker-selected-hover-bg-color) 40%,var(--datepicker-selected-hover-bg-color) 100%,rgba(0,0,0,0) 100%);content:""}.md-datepicker__day--end-date::part(button){font-family:var(--brand-font-bold);color:var(--datepicker-selected-text-color,var(--md-secondary-bg-color))}.md-datepicker__day--end-date::part(button)::before{height:2rem;width:2.125rem;left:-.25rem;background:radial-gradient(circle at 50% center,var(--datepicker-selected-bg-color) 50%,transparent 50%,var(--datepicker-range-bg-color) 50%,var(--datepicker-range-bg-color) 50%);border-bottom-right-radius:1rem;border-top-right-radius:1rem}.md-datepicker__day--end-date::part(button)::after{height:2rem;width:2rem;left:.125rem;top:.125rem;z-index:-1;background:radial-gradient(circle at 50% center,rgba(0,0,0,0) 30%,var(--datepicker-range-edge-bg-color) 30%,var(--datepicker-range-edge-bg-color) 100%,rgba(0,0,0,0) 100%);content:""}.md-datepicker__day--end-date::part(button):focus{color:var(--datepicker-selected-text-color)}.md-datepicker__day--end-date::part(button):focus::before{background:radial-gradient(circle at 50% center,var(--datepicker-selected-bg-color) 50%,transparent 50%,var(--datepicker-range-bg-color) 50%,var(--datepicker-range-bg-color) 50%)}.md-datepicker__day--end-date::part(button):focus::after{z-index:-1;box-shadow:none;outline:.125rem solid var(--button-focus-ring-color);outline-offset:.125rem;background:radial-gradient(circle at 50% center,rgba(0,0,0,0) 30%,var(--datepicker-selected-bg-color) 30%,var(--datepicker-selected-bg-color) 100%,rgba(0,0,0,0) 100%);content:""}.md-datepicker__day--end-date::part(button):hover{color:var(--datepicker-selected-text-color)}.md-datepicker__day--end-date::part(button):hover::before{background:radial-gradient(circle at 50% center,var(--datepicker-selected-hover-bg-color) 60%,rgba(0,0,0,0) 60%,var(--datepicker-range-bg-color) 60%,var(--datepicker-range-bg-color) 60%)}.md-datepicker__day--end-date::part(button):hover::after{z-index:-1;background:radial-gradient(circle at 50% center,rgba(0,0,0,0) 30%,var(--datepicker-selected-hover-bg-color) 30%,var(--datepicker-selected-hover-bg-color) 100%,rgba(0,0,0,0) 100%);content:""}.md-datepicker__day--week-first::part(button)::before{border-bottom-left-radius:1rem;border-top-left-radius:1rem}.md-datepicker__day--week-last::part(button)::before{border-bottom-right-radius:1rem;border-top-right-radius:1rem;width:calc(2rem + .25rem);left:-.25rem}.md-datepicker__day--week-first.md-datepicker__day--end-date::part(button),.md-datepicker__day--week-last.md-datepicker__day--start-date::part(button){background:0 0}.md-datepicker__day--week-first.md-datepicker__day--end-date::part(button)::after,.md-datepicker__day--week-first.md-datepicker__day--end-date::part(button)::before,.md-datepicker__day--week-last.md-datepicker__day--start-date::part(button)::after,.md-datepicker__day--week-last.md-datepicker__day--start-date::part(button)::before{border-radius:1rem;width:2rem;height:2rem;left:.125rem;top:.125rem;background:0 0}.md-datepicker__day--week-first.md-datepicker__day--end-date::part(button)::after,.md-datepicker__day--week-last.md-datepicker__day--start-date::part(button)::after{background:radial-gradient(circle at 50% center,var(--datepicker-selected-bg-color) 0,var(--datepicker-selected-bg-color) 100%,transparent 100%)}.md-datepicker__day--week-first.md-datepicker__day--end-date::part(button):hover::after,.md-datepicker__day--week-last.md-datepicker__day--start-date::part(button):hover::after{background:radial-gradient(circle at 50% center,var(--datepicker-selected-hover-bg-color) 0,var(--datepicker-selected-hover-bg-color) 100%,transparent 100%)}.control-buttons{display:flex;justify-content:flex-end;gap:.5rem;margin:.25rem .75rem .75rem}md-input::part(md-input-container){margin-bottom:.5rem}`}}]);
package/dist/6273.js CHANGED
@@ -23,7 +23,7 @@
23
23
  </md-button>
24
24
  `:null}
25
25
  </div>
26
- `:p.html``}getPlaceHolderString(){var t;return this.placeholder?this.placeholder:this.useISOFormat?"YYYY-MM-DD":(0,l.gq)(null!==(t=this.locale)&&void 0!==t?t:c.DateTime.local().locale).toUpperCase()}getFormattedDate(t){return t?this.useISOFormat?this.getISODateTime(t):this.includesTime?t.toLocaleString(c.DateTime.DATETIME_SHORT,{locale:this.locale}):t.toLocaleString(c.DateTime.DATE_SHORT,{locale:this.locale}):null}getAriaLabel(){var t;return null!==(t=this.ariaLabel)&&void 0!==t?t:this.getDefaultAriaLabel()}render(){var t;return p.html`
26
+ `:p.html``}getPlaceHolderString(){var t;return this.placeholder?this.placeholder:this.useISOFormat?"YYYY-MM-DD":(0,l.gq)(null!==(t=this.locale)&&void 0!==t?t:c.DateTime.local().locale).toUpperCase()}getFormattedDate(t){return t?this.useISOFormat?this.getISODateTime(t):this.includesTime?t.toLocaleString(c.DateTime.DATETIME_SHORT,{locale:this.locale}):t.toLocaleString(c.DateTime.DATE_SHORT,{locale:this.locale}):null}getAriaLabel(){var t;return null!==(t=this.ariaLabel)&&void 0!==t?t:this.getDefaultAriaLabel()}get isAriaExpanded(){return this.isMenuOverlayOpen?"true":"false"}render(){var t;return p.html`
27
27
  <md-menu-overlay
28
28
  is-date-picker
29
29
  custom-width="272px"
@@ -45,7 +45,7 @@
45
45
  htmlId=${this.htmlId}
46
46
  label=${this.label}
47
47
  ariaLabel=${this.getAriaLabel()}
48
- ariaExpanded=${this.isMenuOverlayOpen?"true":"false"}
48
+ ariaExpanded=${this.isAriaExpanded}
49
49
  ariaControls="date-overlay-content"
50
50
  auxiliaryContentPosition="before"
51
51
  ?required=${this.required}
@@ -23,7 +23,7 @@
23
23
  </md-button>
24
24
  `:null}
25
25
  </div>
26
- `:d.html``}getPlaceHolderString(){var e;return this.placeholder?this.placeholder:this.useISOFormat?"YYYY-MM-DD":(0,l.gq)(null!==(e=this.locale)&&void 0!==e?e:u.DateTime.local().locale).toUpperCase()}getFormattedDate(e){return e?this.useISOFormat?this.getISODateTime(e):this.includesTime?e.toLocaleString(u.DateTime.DATETIME_SHORT,{locale:this.locale}):e.toLocaleString(u.DateTime.DATE_SHORT,{locale:this.locale}):null}getAriaLabel(){var e;return null!==(e=this.ariaLabel)&&void 0!==e?e:this.getDefaultAriaLabel()}render(){var e;return d.html`
26
+ `:d.html``}getPlaceHolderString(){var e;return this.placeholder?this.placeholder:this.useISOFormat?"YYYY-MM-DD":(0,l.gq)(null!==(e=this.locale)&&void 0!==e?e:u.DateTime.local().locale).toUpperCase()}getFormattedDate(e){return e?this.useISOFormat?this.getISODateTime(e):this.includesTime?e.toLocaleString(u.DateTime.DATETIME_SHORT,{locale:this.locale}):e.toLocaleString(u.DateTime.DATE_SHORT,{locale:this.locale}):null}getAriaLabel(){var e;return null!==(e=this.ariaLabel)&&void 0!==e?e:this.getDefaultAriaLabel()}get isAriaExpanded(){return this.isMenuOverlayOpen?"true":"false"}render(){var e;return d.html`
27
27
  <md-menu-overlay
28
28
  is-date-picker
29
29
  custom-width="272px"
@@ -45,7 +45,7 @@
45
45
  htmlId=${this.htmlId}
46
46
  label=${this.label}
47
47
  ariaLabel=${this.getAriaLabel()}
48
- ariaExpanded=${this.isMenuOverlayOpen?"true":"false"}
48
+ ariaExpanded=${this.isAriaExpanded}
49
49
  ariaControls="date-overlay-content"
50
50
  auxiliaryContentPosition="before"
51
51
  ?required=${this.required}
@@ -1,5 +1,5 @@
1
- !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("lit-element"),require("lit-html/directives/class-map"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/repeat"),require("lit-virtualizer"),require("lit-html/directives/class-map.js"),require("luxon"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html/directives/class-map","lit-html/directives/style-map","lit-html","lit-html/directives/if-defined","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","lit-html/directives/repeat","lit-virtualizer","lit-html/directives/class-map.js","luxon"],e);else{var i="object"==typeof exports?e(require("lit-element"),require("lit-html/directives/class-map"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/repeat"),require("lit-virtualizer"),require("lit-html/directives/class-map.js"),require("luxon")):e(t["lit-element"],t["lit-html/directives/class-map"],t["lit-html/directives/style-map"],t["lit-html"],t["lit-html/directives/if-defined"],t["@momentum-ui/icons/data/momentumUiIconsNames.json"],t["@momentum-ui/utils/lib/getColorValue"],t.mobx,t["lit-html/directives/repeat"],t["lit-virtualizer"],t["lit-html/directives/class-map.js"],t.luxon);for(var r in i)("object"==typeof exports?exports:t)[r]=i[r]}}(self,(t,e,i,r,o,s,a,n,l,m,u,h)=>(()=>{"use strict";var d,c={8229:t=>{t.exports=i},17518:t=>{t.exports=u},22818:t=>{t.exports=l},23968:t=>{t.exports=e},32022:t=>{t.exports=s},40333:t=>{t.exports=r},41488:e=>{e.exports=t},49256:(t,e,i)=>{i.r(e),i.d(e,{TimePicker:()=>b,timeSpecificity:()=>f,timeUnits:()=>v}),i(4928),i(96408);var r=i(90195),o=i(31890),s=i(81625),a=i(74548),n=i(26272),l=i(41488),m=i(40333),u=i(23968),h=i(97822),d=i(65796),c=i(17875),p=function(t,e,i,r){var o,s=arguments.length,a=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,r);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(s<3?o(a):s>3?o(e,i,a):o(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};const v=[r.R5.HOUR,r.R5.MINUTE,r.R5.SECOND,r.R5.AM_PM],f=[r.R5.HOUR,r.R5.MINUTE,r.R5.SECOND],y={[r.R5.HOUR]:"HH",[r.R5.MINUTE]:"MM",[r.R5.SECOND]:"SS",[r.R5.AM_PM]:"AM"};var b;!function(t){let e=class extends l.LitElement{constructor(){super(...arguments),this.twoDigitAutoTab=!1,this.twentyFourHourFormat=!1,this.timeSpecificity=r.R5.SECOND,this.locale="en-US",this.value="00:00:00-08:00",this.finalTwentyFourFormat=!1,this.timeObject=(0,s.tB)(),this.tabNext=!1,this.timeValue={[r.R5.HOUR]:"12",[r.R5.MINUTE]:"00",[r.R5.SECOND]:"00",[r.R5.AM_PM]:"AM"},this.timeValidity={[r.R5.HOUR]:!0,[r.R5.MINUTE]:!0,[r.R5.SECOND]:!0,[r.R5.AM_PM]:!0},this.addLeadingZeros=t=>{if(t){if(0===t.length)return"00";if(1===t.length)return`0${t}`}return t},this.formatAndValidate=(t,e)=>{if(t&&(this.updateValidity(t,e),this.timeValidity[e]))return this.addLeadingZeros(t)},this.getLocaleTimeFormat=t=>{const e=t.toFormat("tt"),[,i]=e.split(" ");return!i},this.updateTimeValues=()=>{let t;t=this.finalTwentyFourFormat?this.timeObject.toFormat("HH:mm:ss"):this.timeObject.toFormat("hh:mm:ss a");const[e,i]=t.split(" "),o=e.split(":");f.forEach(t=>{const e=this.formatAndValidate(o.shift(),t);e&&(t===r.R5.HOUR&&i&&(this.timeValue[r.R5.AM_PM]=i),this.timeValue[t]=e)})},this.updateValidity=(t,e)=>{let i=!0;const o=e=>{null===t.match(e)&&(i=!1)};switch(e){case r.R5.HOUR:this.finalTwentyFourFormat?o(new RegExp(a.b.twentyFourHourString)):o(new RegExp(a.b.hourString));break;case r.R5.MINUTE:case r.R5.SECOND:o(new RegExp(a.b.minuteSecondString));break;case r.R5.AM_PM:o(new RegExp(a.b.amPmString))}this.timeValidity[e]=i},this.to12HourFormat=(t,e)=>{if(!this.finalTwentyFourFormat&&this.timeValidity[r.R5.HOUR]&&this.timeValidity[r.R5.AM_PM]){let i=Number(e);return"PM"===t?i=12+i%12:i%=12,i}},this.isEntireTimeValid=()=>Object.values(this.timeValidity).every(t=>t),this.updateTimeUnit=t=>{var e,i,o;this.updateValidity(this.timeValue[t],t),this.timeObject&&this.timeValidity[t]&&(t!==r.R5.AM_PM?this.timeObject=null===(e=this.timeObject)||void 0===e?void 0:e.set({[t]:this.timeValue[t]}):this.timeObject=null===(i=this.timeObject)||void 0===i?void 0:i.set({hour:this.to12HourFormat(this.timeValue[r.R5.AM_PM],this.timeValue[r.R5.HOUR])}),this.isEntireTimeValid()&&(this.timeObject=null===(o=this.timeObject)||void 0===o?void 0:o.set({hour:this.to12HourFormat(this.timeValue[r.R5.AM_PM],this.timeValue[r.R5.HOUR])}),this.value=this.timeObject.toISOTime({suppressMilliseconds:!0})||this.value,this.dispatchEvent(new CustomEvent("time-selection-change",{bubbles:!0,composed:!0,detail:{time:this.value,data:this.timeObject}}))))},this.formatTimeUnit=t=>{if(1===this.timeValue[t].length)"0"!==this.timeValue[t]&&(this.timeValue[t]="0"+this.timeValue[t]);else if(this.timeValue[t].length>2&&"0"===this.timeValue[t][0]){const e=this.timeValue[t].substring(1);RegExp(a.b.noPrecedingZerosString).test(e)&&(this.timeValue[t]=e)}this.requestUpdate()},this.messageType=t=>t?"":"error",this.generateTimeBox=t=>{const e=(i=this.finalTwentyFourFormat,{[r.R5.HOUR]:{type:"number",min:i?0:1,max:i?23:12},[r.R5.MINUTE]:{type:"number",min:0,max:59},[r.R5.SECOND]:{type:"number",min:0,max:59},[r.R5.AM_PM]:{type:"text",min:void 0,max:void 0}})[t];var i;return l.html`
2
- ${t===r.R5.MINUTE||t===r.R5.SECOND?l.html` <span class="colon-separator">:</span> `:m.nothing}
1
+ !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("lit-element"),require("lit-html/directives/class-map"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/repeat"),require("lit-virtualizer"),require("lit-html/directives/class-map.js"),require("luxon"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html/directives/class-map","lit-html/directives/style-map","lit-html","lit-html/directives/if-defined","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","lit-html/directives/repeat","lit-virtualizer","lit-html/directives/class-map.js","luxon"],e);else{var i="object"==typeof exports?e(require("lit-element"),require("lit-html/directives/class-map"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/repeat"),require("lit-virtualizer"),require("lit-html/directives/class-map.js"),require("luxon")):e(t["lit-element"],t["lit-html/directives/class-map"],t["lit-html/directives/style-map"],t["lit-html"],t["lit-html/directives/if-defined"],t["@momentum-ui/icons/data/momentumUiIconsNames.json"],t["@momentum-ui/utils/lib/getColorValue"],t.mobx,t["lit-html/directives/repeat"],t["lit-virtualizer"],t["lit-html/directives/class-map.js"],t.luxon);for(var r in i)("object"==typeof exports?exports:t)[r]=i[r]}}(self,(t,e,i,r,o,s,a,l,n,m,u,h)=>(()=>{"use strict";var d,c={8229:t=>{t.exports=i},17518:t=>{t.exports=u},22818:t=>{t.exports=n},23968:t=>{t.exports=e},32022:t=>{t.exports=s},40333:t=>{t.exports=r},41488:e=>{e.exports=t},49256:(t,e,i)=>{i.r(e),i.d(e,{TimePicker:()=>b,timeSpecificity:()=>f,timeUnits:()=>v}),i(4928),i(96408);var r=i(90195),o=i(31890),s=i(81625),a=i(74548),l=i(26272),n=i(41488),m=i(40333),u=i(23968),h=i(97822),d=i(65796),c=i(17875),p=function(t,e,i,r){var o,s=arguments.length,a=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,r);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(a=(s<3?o(a):s>3?o(e,i,a):o(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};const v=[r.R5.HOUR,r.R5.MINUTE,r.R5.SECOND,r.R5.AM_PM],f=[r.R5.HOUR,r.R5.MINUTE,r.R5.SECOND],y={[r.R5.HOUR]:"HH",[r.R5.MINUTE]:"MM",[r.R5.SECOND]:"SS",[r.R5.AM_PM]:"AM"};var b;!function(t){let e=class extends n.LitElement{constructor(){super(...arguments),this.twoDigitAutoTab=!1,this.twentyFourHourFormat=!1,this.timeSpecificity=r.R5.SECOND,this.locale="en-US",this.value="00:00:00-08:00",this.finalTwentyFourFormat=!1,this.timeObject=(0,s.tB)(),this.tabNext=!1,this.timeValue={[r.R5.HOUR]:"12",[r.R5.MINUTE]:"00",[r.R5.SECOND]:"00",[r.R5.AM_PM]:"AM"},this.timeValidity={[r.R5.HOUR]:!0,[r.R5.MINUTE]:!0,[r.R5.SECOND]:!0,[r.R5.AM_PM]:!0},this.addLeadingZeros=t=>{if(t){if(0===t.length)return"00";if(1===t.length)return`0${t}`}return t},this.formatAndValidate=(t,e)=>{if(t&&(this.updateValidity(t,e),this.timeValidity[e]))return this.addLeadingZeros(t)},this.getLocaleTimeFormat=t=>{const e=t.toFormat("tt"),[,i]=e.split(" ");return!i},this.updateTimeValues=()=>{let t;t=this.finalTwentyFourFormat?this.timeObject.toFormat("HH:mm:ss"):this.timeObject.toFormat("hh:mm:ss a");const[e,i]=t.split(" "),o=e.split(":");f.forEach(t=>{const e=this.formatAndValidate(o.shift(),t);e&&(t===r.R5.HOUR&&i&&(this.timeValue[r.R5.AM_PM]=i),this.timeValue[t]=e)})},this.updateValidity=(t,e)=>{let i=!0;const o=e=>{null===t.match(e)&&(i=!1)};switch(e){case r.R5.HOUR:this.finalTwentyFourFormat?o(new RegExp(a.b.twentyFourHourString)):o(new RegExp(a.b.hourString));break;case r.R5.MINUTE:case r.R5.SECOND:o(new RegExp(a.b.minuteSecondString));break;case r.R5.AM_PM:o(new RegExp(a.b.amPmString))}this.timeValidity[e]=i},this.to12HourFormat=(t,e)=>{if(!this.finalTwentyFourFormat&&this.timeValidity[r.R5.HOUR]&&this.timeValidity[r.R5.AM_PM]){let i=Number(e);return"PM"===t?i=12+i%12:i%=12,i}},this.isEntireTimeValid=()=>Object.values(this.timeValidity).every(t=>t),this.updateTimeUnit=t=>{var e,i,o;this.updateValidity(this.timeValue[t],t),this.timeObject&&this.timeValidity[t]&&(t!==r.R5.AM_PM?this.timeObject=null===(e=this.timeObject)||void 0===e?void 0:e.set({[t]:this.timeValue[t]}):this.timeObject=null===(i=this.timeObject)||void 0===i?void 0:i.set({hour:this.to12HourFormat(this.timeValue[r.R5.AM_PM],this.timeValue[r.R5.HOUR])}),this.isEntireTimeValid()&&(this.timeObject=null===(o=this.timeObject)||void 0===o?void 0:o.set({hour:this.to12HourFormat(this.timeValue[r.R5.AM_PM],this.timeValue[r.R5.HOUR])}),this.value=this.timeObject.toISOTime({suppressMilliseconds:!0})||this.value,this.dispatchEvent(new CustomEvent("time-selection-change",{bubbles:!0,composed:!0,detail:{time:this.value,data:this.timeObject}}))))},this.formatTimeUnit=t=>{if(1===this.timeValue[t].length)"0"!==this.timeValue[t]&&(this.timeValue[t]="0"+this.timeValue[t]);else if(this.timeValue[t].length>2&&"0"===this.timeValue[t][0]){const e=this.timeValue[t].substring(1);RegExp(a.b.noPrecedingZerosString).test(e)&&(this.timeValue[t]=e)}this.requestUpdate()},this.messageType=t=>t?"":"error",this.generateTimeBox=t=>{const e=(i=this.finalTwentyFourFormat,{[r.R5.HOUR]:{type:"number",min:i?0:1,max:i?23:12},[r.R5.MINUTE]:{type:"number",min:0,max:59},[r.R5.SECOND]:{type:"number",min:0,max:59},[r.R5.AM_PM]:{type:"text",min:void 0,max:void 0}})[t];var i;return n.html`
2
+ ${t===r.R5.MINUTE||t===r.R5.SECOND?n.html` <span class="colon-separator">:</span> `:m.nothing}
3
3
  <md-input
4
4
  newMomentum
5
5
  select-when-in-focus
@@ -18,13 +18,13 @@
18
18
  .ariaLabel="${t}-input"
19
19
  ariaInvalid="${!this.timeValidity[t]}"
20
20
  ></md-input>
21
- `},this.generateAmPmComboBox=()=>l.html`
21
+ `},this.generateAmPmComboBox=()=>n.html`
22
22
  <md-combobox
23
23
  newMomentum
24
24
  select-when-in-focus
25
25
  class="amPm-combo-box"
26
26
  .options=${["AM","PM"]}
27
- .selectedOptions=${[this.timeValue[r.R5.AM_PM]]}
27
+ .value=${[this.timeValue[r.R5.AM_PM]]}
28
28
  .preventFilter=${!0}
29
29
  is-dropdown-arrow
30
30
  no-clear-icon
@@ -33,7 +33,7 @@
33
33
  @change-selected="${t=>this.handleTimeChange(t,r.R5.AM_PM)}"
34
34
  >
35
35
  </md-combobox>
36
- `}get timePickerClassMap(){return{"twenty-four-hour-format":this.finalTwentyFourFormat}}updated(t){if(super.updated(t),this.value&&(t.has("value")||t.has("locale")||t.has("twentyFourHourFormat"))){this.timeObject=d.DateTime.fromISO(this.value,{locale:this.locale});const t=this.getLocaleTimeFormat(this.timeObject);this.finalTwentyFourFormat=this.twentyFourHourFormat||t,this.value=this.timeObject.toISOTime({suppressMilliseconds:!0}),this.updateTimeValues()}}handleTimeChange(t,e){var i,o,s;this.timeValue[e]=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.value,this.requestUpdate(),this.formatTimeUnit(e);const a=this.timeValue[e];if(this.twoDigitAutoTab&&this.tabNext&&(e!==r.R5.AM_PM&&2===a.length&&"0"!==a[0]||"00"===a)){t.preventDefault();const e=null==t?void 0:t.target,i=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelectorAll("md-input, md-combobox");if(i){const t=Array.prototype.findIndex.call(i,t=>null==e?void 0:e.isEqualNode(t)),r=(t+1)%i.length;if(t<i.length-1){const t=null===(s=i[r].shadowRoot)||void 0===s?void 0:s.querySelector("input");null==t||t.focus()}}}else e===r.R5.AM_PM&&this.updateTimeUnit(e);t.stopPropagation(),this.dispatchEvent(new CustomEvent(`${e}-change`,{bubbles:!0,composed:!0,detail:{srcEvent:t,value:`${this.timeValue[e]}`,isValid:this.timeValidity[e]}}))}handleTimeKeyDown(t,e){var i;const o=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.srcEvent;if(!o)return void console.warn("srcEvent is undefined");const{key:s}=o;s===r.Uz.ArrowDown||s===r.Uz.ArrowUp?this.tabNext=!1:this.tabNext=!0,this.timeValidity[e]=!0,this.requestUpdate(),t.stopPropagation(),this.dispatchEvent(new CustomEvent(`${e}-keydown`,{bubbles:!0,composed:!0,detail:{srcEvent:t,value:`${this.timeValue[e]}`}}))}handleTimeBlur(t,e){"0"===this.timeValue[e]&&(this.timeValue[e]="00"),this.updateTimeUnit(e),this.requestUpdate(),t.stopPropagation(),this.dispatchEvent(new CustomEvent(`${e}-blur`,{bubbles:!0,composed:!0,detail:{srcEvent:t,time:this.value,isValid:this.timeValidity[e]}}))}static get styles(){return[n.A,c.A]}render(){return l.html`
36
+ `}get timePickerClassMap(){return{"twenty-four-hour-format":this.finalTwentyFourFormat}}connectedCallback(){super.connectedCallback(),this.updateValue()}updated(t){super.updated(t),this.value&&(t.has("value")||t.has("locale")||t.has("twentyFourHourFormat"))&&this.updateValue()}updateValue(){if(!this.value)return;this.timeObject=d.DateTime.fromISO(this.value,{locale:this.locale});const t=this.getLocaleTimeFormat(this.timeObject);this.finalTwentyFourFormat=this.twentyFourHourFormat||t,this.value=this.timeObject.toISOTime({suppressMilliseconds:!0}),this.updateTimeValues()}handleTimeChange(t,e){var i,o,s;this.timeValue[e]=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.value,this.requestUpdate(),this.formatTimeUnit(e);const a=this.timeValue[e];if(this.twoDigitAutoTab&&this.tabNext&&(e!==r.R5.AM_PM&&2===a.length&&"0"!==a[0]||"00"===a)){t.preventDefault();const e=null==t?void 0:t.target,i=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelectorAll("md-input, md-combobox");if(i){const t=Array.prototype.findIndex.call(i,t=>null==e?void 0:e.isEqualNode(t)),r=(t+1)%i.length;if(t<i.length-1){const t=null===(s=i[r].shadowRoot)||void 0===s?void 0:s.querySelector("input");null==t||t.focus()}}}else e===r.R5.AM_PM&&this.updateTimeUnit(e);t.stopPropagation(),this.dispatchEvent(new CustomEvent(`${e}-change`,{bubbles:!0,composed:!0,detail:{srcEvent:t,value:`${this.timeValue[e]}`,isValid:this.timeValidity[e]}}))}handleTimeKeyDown(t,e){var i;const o=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.srcEvent;if(!o)return void console.warn("srcEvent is undefined");const{key:s}=o;s===r.Uz.ArrowDown||s===r.Uz.ArrowUp?this.tabNext=!1:this.tabNext=!0,this.timeValidity[e]=!0,this.requestUpdate(),t.stopPropagation(),this.dispatchEvent(new CustomEvent(`${e}-keydown`,{bubbles:!0,composed:!0,detail:{srcEvent:t,value:`${this.timeValue[e]}`}}))}handleTimeBlur(t,e){"0"===this.timeValue[e]&&(this.timeValue[e]="00"),this.updateTimeUnit(e),this.requestUpdate(),t.stopPropagation(),this.dispatchEvent(new CustomEvent(`${e}-blur`,{bubbles:!0,composed:!0,detail:{srcEvent:t,time:this.value,isValid:this.timeValidity[e]}}))}static get styles(){return[l.A,c.A]}render(){return n.html`
37
37
  <div class="md-timepicker ${(0,u.classMap)(this.timePickerClassMap)}">
38
38
  <div class="time-inputs-wrapper">
39
39
  ${this.generateTimeBox(r.R5.HOUR)}
@@ -42,4 +42,4 @@
42
42
  ${this.finalTwentyFourFormat?m.nothing:this.generateAmPmComboBox()}
43
43
  </div>
44
44
  </div>
45
- `}};p([(0,l.property)({type:Boolean,attribute:"two-digit-auto-tab"})],e.prototype,"twoDigitAutoTab",void 0),p([(0,l.property)({type:Boolean,attribute:"twenty-four-hour-format",reflect:!0})],e.prototype,"twentyFourHourFormat",void 0),p([(0,l.property)({type:String})],e.prototype,"timeSpecificity",void 0),p([(0,l.property)({type:String})],e.prototype,"locale",void 0),p([(0,l.property)({type:String,reflect:!0})],e.prototype,"value",void 0),p([(0,l.internalProperty)()],e.prototype,"finalTwentyFourFormat",void 0),p([(0,l.internalProperty)()],e.prototype,"timeObject",void 0),p([(0,l.internalProperty)()],e.prototype,"tabNext",void 0),p([(0,l.internalProperty)()],e.prototype,"timeValue",void 0),p([(0,l.internalProperty)()],e.prototype,"timeValidity",void 0),e=p([(0,o.w)("md-timepicker")],e),t.ELEMENT=e}(b||(b={}))},60554:t=>{t.exports=a},65796:t=>{t.exports=h},85314:t=>{t.exports=n},86635:t=>{t.exports=m},90195:(t,e,i)=>{var r,o,s,a;i.d(e,{R5:()=>o,Uz:()=>r,iw:()=>a}),function(t){t.ArrowDown="ArrowDown",t.ArrowLeft="ArrowLeft",t.ArrowRight="ArrowRight",t.ArrowUp="ArrowUp",t.Backspace="Backspace",t.Delete="Delete",t.End="End",t.Enter="Enter",t.Escape="Escape",t.Home="Home",t.Space="Space",t.Tab="Tab",t.Digit1="Digit1",t.Digit2="Digit2",t.Digit3="Digit3",t.Digit4="Digit4",t.Digit5="Digit5",t.Digit6="Digit6",t.Digit7="Digit7",t.Digit8="Digit8",t.Digit9="Digit9",t.NumpadEnter="NumpadEnter"}(r||(r={})),function(t){t.HOUR="hour",t.MINUTE="minute",t.SECOND="second",t.AM_PM="am_pm"}(o||(o={})),function(t){t.GRAMMAR="grammar",t.FALSE="false",t.SPELLING="spelling",t.TRUE="true"}(s||(s={})),function(t){t.AriaActivedescendant="aria-activedescendant"}(a||(a={}))},97822:t=>{t.exports=o}},p={};function v(t){var e=p[t];if(void 0!==e)return e.exports;var i=p[t]={exports:{}};return c[t].call(i.exports,i,i.exports,v),i.exports}v.m=c,d=[],v.O=(t,e,i,r)=>{if(!e){var o=1/0;for(l=0;l<d.length;l++){for(var[e,i,r]=d[l],s=!0,a=0;a<e.length;a++)(!1&r||o>=r)&&Object.keys(v.O).every(t=>v.O[t](e[a]))?e.splice(a--,1):(s=!1,r<o&&(o=r));if(s){d.splice(l--,1);var n=i();void 0!==n&&(t=n)}}return t}r=r||0;for(var l=d.length;l>0&&d[l-1][2]>r;l--)d[l]=d[l-1];d[l]=[e,i,r]},v.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return v.d(e,{a:e}),e},v.d=(t,e)=>{for(var i in e)v.o(e,i)&&!v.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},v.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),v.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),v.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={195:0,671:0,2576:0,5433:0,7145:0};v.O.j=e=>0===t[e];var e=(e,i)=>{var r,o,[s,a,n]=i,l=0;if(s.some(e=>0!==t[e])){for(r in a)v.o(a,r)&&(v.m[r]=a[r]);if(n)var m=n(v)}for(e&&e(i);l<s.length;l++)o=s[l],v.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return v.O(m)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();var f=v.O(void 0,[6860,7103,1890,6272,6325,6283,9217,2176,6798,5830,1200,8889,8373,4624,300,591,768,3001,4977,1598,109,1572,6396,6408,6795,4548,3820,2547,4006,7875],()=>v(49256));return v.O(f)})());
45
+ `}};p([(0,n.property)({type:Boolean,attribute:"two-digit-auto-tab"})],e.prototype,"twoDigitAutoTab",void 0),p([(0,n.property)({type:Boolean,attribute:"twenty-four-hour-format",reflect:!0})],e.prototype,"twentyFourHourFormat",void 0),p([(0,n.property)({type:String})],e.prototype,"timeSpecificity",void 0),p([(0,n.property)({type:String})],e.prototype,"locale",void 0),p([(0,n.property)({type:String,reflect:!0})],e.prototype,"value",void 0),p([(0,n.internalProperty)()],e.prototype,"finalTwentyFourFormat",void 0),p([(0,n.internalProperty)()],e.prototype,"timeObject",void 0),p([(0,n.internalProperty)()],e.prototype,"tabNext",void 0),p([(0,n.internalProperty)()],e.prototype,"timeValue",void 0),p([(0,n.internalProperty)()],e.prototype,"timeValidity",void 0),e=p([(0,o.w)("md-timepicker")],e),t.ELEMENT=e}(b||(b={}))},60554:t=>{t.exports=a},65796:t=>{t.exports=h},85314:t=>{t.exports=l},86635:t=>{t.exports=m},90195:(t,e,i)=>{var r,o,s,a;i.d(e,{R5:()=>o,Uz:()=>r,iw:()=>a}),function(t){t.ArrowDown="ArrowDown",t.ArrowLeft="ArrowLeft",t.ArrowRight="ArrowRight",t.ArrowUp="ArrowUp",t.Backspace="Backspace",t.Delete="Delete",t.End="End",t.Enter="Enter",t.Escape="Escape",t.Home="Home",t.Space="Space",t.Tab="Tab",t.Digit1="Digit1",t.Digit2="Digit2",t.Digit3="Digit3",t.Digit4="Digit4",t.Digit5="Digit5",t.Digit6="Digit6",t.Digit7="Digit7",t.Digit8="Digit8",t.Digit9="Digit9",t.NumpadEnter="NumpadEnter"}(r||(r={})),function(t){t.HOUR="hour",t.MINUTE="minute",t.SECOND="second",t.AM_PM="am_pm"}(o||(o={})),function(t){t.GRAMMAR="grammar",t.FALSE="false",t.SPELLING="spelling",t.TRUE="true"}(s||(s={})),function(t){t.AriaActivedescendant="aria-activedescendant"}(a||(a={}))},97822:t=>{t.exports=o}},p={};function v(t){var e=p[t];if(void 0!==e)return e.exports;var i=p[t]={exports:{}};return c[t].call(i.exports,i,i.exports,v),i.exports}v.m=c,d=[],v.O=(t,e,i,r)=>{if(!e){var o=1/0;for(n=0;n<d.length;n++){for(var[e,i,r]=d[n],s=!0,a=0;a<e.length;a++)(!1&r||o>=r)&&Object.keys(v.O).every(t=>v.O[t](e[a]))?e.splice(a--,1):(s=!1,r<o&&(o=r));if(s){d.splice(n--,1);var l=i();void 0!==l&&(t=l)}}return t}r=r||0;for(var n=d.length;n>0&&d[n-1][2]>r;n--)d[n]=d[n-1];d[n]=[e,i,r]},v.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return v.d(e,{a:e}),e},v.d=(t,e)=>{for(var i in e)v.o(e,i)&&!v.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},v.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),v.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),v.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={195:0,671:0,2576:0,5433:0,7145:0};v.O.j=e=>0===t[e];var e=(e,i)=>{var r,o,[s,a,l]=i,n=0;if(s.some(e=>0!==t[e])){for(r in a)v.o(a,r)&&(v.m[r]=a[r]);if(l)var m=l(v)}for(e&&e(i);n<s.length;n++)o=s[n],v.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return v.O(m)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();var f=v.O(void 0,[6860,7103,1890,6272,6325,6283,9217,2176,6798,5830,1200,8889,8373,4624,300,591,768,3001,4977,1598,109,1572,6396,6408,6795,4548,3820,2547,4006,7875],()=>v(49256));return v.O(f)})());
@@ -1304,7 +1304,7 @@
1304
1304
  select-when-in-focus
1305
1305
  class="amPm-combo-box"
1306
1306
  .options=${["AM","PM"]}
1307
- .selectedOptions=${[this.timeValue[s.R5.AM_PM]]}
1307
+ .value=${[this.timeValue[s.R5.AM_PM]]}
1308
1308
  .preventFilter=${!0}
1309
1309
  is-dropdown-arrow
1310
1310
  no-clear-icon
@@ -1313,7 +1313,7 @@
1313
1313
  @change-selected="${t=>this.handleTimeChange(t,s.R5.AM_PM)}"
1314
1314
  >
1315
1315
  </md-combobox>
1316
- `}get timePickerClassMap(){return{"twenty-four-hour-format":this.finalTwentyFourFormat}}updated(t){if(super.updated(t),this.value&&(t.has("value")||t.has("locale")||t.has("twentyFourHourFormat"))){this.timeObject=c.DateTime.fromISO(this.value,{locale:this.locale});const t=this.getLocaleTimeFormat(this.timeObject);this.finalTwentyFourFormat=this.twentyFourHourFormat||t,this.value=this.timeObject.toISOTime({suppressMilliseconds:!0}),this.updateTimeValues()}}handleTimeChange(t,e){var i,o,r;this.timeValue[e]=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.value,this.requestUpdate(),this.formatTimeUnit(e);const n=this.timeValue[e];if(this.twoDigitAutoTab&&this.tabNext&&(e!==s.R5.AM_PM&&2===n.length&&"0"!==n[0]||"00"===n)){t.preventDefault();const e=null==t?void 0:t.target,i=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelectorAll("md-input, md-combobox");if(i){const t=Array.prototype.findIndex.call(i,t=>null==e?void 0:e.isEqualNode(t)),s=(t+1)%i.length;if(t<i.length-1){const t=null===(r=i[s].shadowRoot)||void 0===r?void 0:r.querySelector("input");null==t||t.focus()}}}else e===s.R5.AM_PM&&this.updateTimeUnit(e);t.stopPropagation(),this.dispatchEvent(new CustomEvent(`${e}-change`,{bubbles:!0,composed:!0,detail:{srcEvent:t,value:`${this.timeValue[e]}`,isValid:this.timeValidity[e]}}))}handleTimeKeyDown(t,e){var i;const o=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.srcEvent;if(!o)return void console.warn("srcEvent is undefined");const{key:r}=o;r===s.Uz.ArrowDown||r===s.Uz.ArrowUp?this.tabNext=!1:this.tabNext=!0,this.timeValidity[e]=!0,this.requestUpdate(),t.stopPropagation(),this.dispatchEvent(new CustomEvent(`${e}-keydown`,{bubbles:!0,composed:!0,detail:{srcEvent:t,value:`${this.timeValue[e]}`}}))}handleTimeBlur(t,e){"0"===this.timeValue[e]&&(this.timeValue[e]="00"),this.updateTimeUnit(e),this.requestUpdate(),t.stopPropagation(),this.dispatchEvent(new CustomEvent(`${e}-blur`,{bubbles:!0,composed:!0,detail:{srcEvent:t,time:this.value,isValid:this.timeValidity[e]}}))}static get styles(){return[a.A,u.A]}render(){return l.html`
1316
+ `}get timePickerClassMap(){return{"twenty-four-hour-format":this.finalTwentyFourFormat}}connectedCallback(){super.connectedCallback(),this.updateValue()}updated(t){super.updated(t),this.value&&(t.has("value")||t.has("locale")||t.has("twentyFourHourFormat"))&&this.updateValue()}updateValue(){if(!this.value)return;this.timeObject=c.DateTime.fromISO(this.value,{locale:this.locale});const t=this.getLocaleTimeFormat(this.timeObject);this.finalTwentyFourFormat=this.twentyFourHourFormat||t,this.value=this.timeObject.toISOTime({suppressMilliseconds:!0}),this.updateTimeValues()}handleTimeChange(t,e){var i,o,r;this.timeValue[e]=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.value,this.requestUpdate(),this.formatTimeUnit(e);const n=this.timeValue[e];if(this.twoDigitAutoTab&&this.tabNext&&(e!==s.R5.AM_PM&&2===n.length&&"0"!==n[0]||"00"===n)){t.preventDefault();const e=null==t?void 0:t.target,i=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelectorAll("md-input, md-combobox");if(i){const t=Array.prototype.findIndex.call(i,t=>null==e?void 0:e.isEqualNode(t)),s=(t+1)%i.length;if(t<i.length-1){const t=null===(r=i[s].shadowRoot)||void 0===r?void 0:r.querySelector("input");null==t||t.focus()}}}else e===s.R5.AM_PM&&this.updateTimeUnit(e);t.stopPropagation(),this.dispatchEvent(new CustomEvent(`${e}-change`,{bubbles:!0,composed:!0,detail:{srcEvent:t,value:`${this.timeValue[e]}`,isValid:this.timeValidity[e]}}))}handleTimeKeyDown(t,e){var i;const o=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.srcEvent;if(!o)return void console.warn("srcEvent is undefined");const{key:r}=o;r===s.Uz.ArrowDown||r===s.Uz.ArrowUp?this.tabNext=!1:this.tabNext=!0,this.timeValidity[e]=!0,this.requestUpdate(),t.stopPropagation(),this.dispatchEvent(new CustomEvent(`${e}-keydown`,{bubbles:!0,composed:!0,detail:{srcEvent:t,value:`${this.timeValue[e]}`}}))}handleTimeBlur(t,e){"0"===this.timeValue[e]&&(this.timeValue[e]="00"),this.updateTimeUnit(e),this.requestUpdate(),t.stopPropagation(),this.dispatchEvent(new CustomEvent(`${e}-blur`,{bubbles:!0,composed:!0,detail:{srcEvent:t,time:this.value,isValid:this.timeValidity[e]}}))}static get styles(){return[a.A,u.A]}render(){return l.html`
1317
1317
  <div class="md-timepicker ${(0,h.classMap)(this.timePickerClassMap)}">
1318
1318
  <div class="time-inputs-wrapper">
1319
1319
  ${this.generateTimeBox(s.R5.HOUR)}
@@ -77,6 +77,7 @@ export declare namespace DatePicker {
77
77
  protected getPlaceHolderString(): string;
78
78
  protected getFormattedDate(date: DateTime): string | null;
79
79
  private getAriaLabel;
80
+ private get isAriaExpanded();
80
81
  render(): TemplateResult;
81
82
  }
82
83
  }
@@ -22,7 +22,9 @@ export declare namespace TimePicker {
22
22
  get timePickerClassMap(): {
23
23
  "twenty-four-hour-format": boolean;
24
24
  };
25
+ connectedCallback(): void;
25
26
  protected updated(changedProperties: PropertyValues): void;
27
+ private updateValue;
26
28
  addLeadingZeros: (value: string | undefined) => string | undefined;
27
29
  formatAndValidate: (timeUnitString: string | undefined, unit: TIME_UNIT) => string | undefined;
28
30
  getLocaleTimeFormat: (aTimeObject: DateTime) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momentum-ui/web-components",
3
- "version": "2.23.30",
3
+ "version": "2.23.31",
4
4
  "author": "Yana Harris",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/momentum-design/momentum-ui.git",