| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071 | 
							- /*!
 
-  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
 
-  * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
 
-  * v1.0.0-beta.82
 
-  */
 
- import { Component, Element, h, Prop, Event, Watch, State, Listen, Method } from "@stencil/core";
 
- import { isActivationKey, numberKeys } from "../../utils/key";
 
- import { isValidNumber } from "../../utils/number";
 
- import { formatTimePart, maxTenthForMinuteAndSecond, getMeridiem, isValidTime, localizeTimeStringToParts, parseTimeString, localizeTimePart, getLocaleHourCycle, getTimeParts } from "../../utils/time";
 
- import { CSS, TEXT } from "./resources";
 
- function capitalize(str) {
 
-   return str.charAt(0).toUpperCase() + str.slice(1);
 
- }
 
- export class TimePicker {
 
-   constructor() {
 
-     //--------------------------------------------------------------------------
 
-     //
 
-     //  Properties
 
-     //
 
-     //--------------------------------------------------------------------------
 
-     /** aria-label for the hour input
 
-      * @default "Hour"
 
-      */
 
-     this.intlHour = TEXT.hour;
 
-     /** aria-label for the hour down button
 
-      * @default "Decrease hour"
 
-      */
 
-     this.intlHourDown = TEXT.hourDown;
 
-     /** aria-label for the hour up button
 
-      * @default "Increase hour"
 
-      */
 
-     this.intlHourUp = TEXT.hourUp;
 
-     /** aria-label for the meridiem (am/pm) input
 
-      * @default "AM/PM"
 
-      */
 
-     this.intlMeridiem = TEXT.meridiem;
 
-     /** aria-label for the meridiem (am/pm) down button
 
-      * @default "Decrease AM/PM"
 
-      */
 
-     this.intlMeridiemDown = TEXT.meridiemDown;
 
-     /** aria-label for the meridiem (am/pm) up button
 
-      * @default "Increase AM/PM"
 
-      */
 
-     this.intlMeridiemUp = TEXT.meridiemUp;
 
-     /** aria-label for the minute input
 
-      * @default "Minute"
 
-      */
 
-     this.intlMinute = TEXT.minute;
 
-     /** aria-label for the minute down button
 
-      * @default "Decrease minute"
 
-      */
 
-     this.intlMinuteDown = TEXT.minuteDown;
 
-     /** aria-label for the minute up button
 
-      * @default "Increase minute"
 
-      */
 
-     this.intlMinuteUp = TEXT.minuteUp;
 
-     /** aria-label for the second input
 
-      * @default "Second"
 
-      */
 
-     this.intlSecond = TEXT.second;
 
-     /** aria-label for the second down button
 
-      * @default "Decrease second"
 
-      */
 
-     this.intlSecondDown = TEXT.secondDown;
 
-     /** aria-label for the second up button
 
-      * @default "Increase second"
 
-      */
 
-     this.intlSecondUp = TEXT.secondUp;
 
-     /**
 
-      * BCP 47 language tag for desired language and country format
 
-      * @internal
 
-      */
 
-     this.locale = document.documentElement.lang || navigator.language || "en";
 
-     /** The scale (size) of the time picker */
 
-     this.scale = "m";
 
-     /** number (seconds) that specifies the granularity that the value must adhere to */
 
-     this.step = 60;
 
-     /** The selected time in UTC (always 24-hour format) */
 
-     this.value = null;
 
-     this.showSecond = this.step < 60;
 
-     this.decrementHour = () => {
 
-       const newHour = !this.hour ? 0 : this.hour === "00" ? 23 : parseInt(this.hour) - 1;
 
-       this.setValuePart("hour", newHour);
 
-     };
 
-     this.decrementMeridiem = () => {
 
-       const newMeridiem = this.meridiem === "PM" ? "AM" : "PM";
 
-       this.setValuePart("meridiem", newMeridiem);
 
-     };
 
-     this.decrementMinuteOrSecond = (key) => {
 
-       let newValue;
 
-       if (isValidNumber(this[key])) {
 
-         const valueAsNumber = parseInt(this[key]);
 
-         newValue = valueAsNumber === 0 ? 59 : valueAsNumber - 1;
 
-       }
 
-       else {
 
-         newValue = 59;
 
-       }
 
-       this.setValuePart(key, newValue);
 
-     };
 
-     this.decrementMinute = () => {
 
-       this.decrementMinuteOrSecond("minute");
 
-     };
 
-     this.decrementSecond = () => {
 
-       this.decrementMinuteOrSecond("second");
 
-     };
 
-     this.focusHandler = (event) => {
 
-       this.activeEl = event.currentTarget;
 
-     };
 
-     this.hourDownButtonKeyDownHandler = (event) => {
 
-       if (this.buttonActivated(event)) {
 
-         this.decrementHour();
 
-       }
 
-     };
 
-     this.hourKeyDownHandler = (event) => {
 
-       const key = event.key;
 
-       if (numberKeys.includes(key)) {
 
-         const keyAsNumber = parseInt(key);
 
-         let newHour;
 
-         if (isValidNumber(this.hour)) {
 
-           switch (this.hourCycle) {
 
-             case "12":
 
-               newHour =
 
-                 this.hour === "01" && keyAsNumber >= 0 && keyAsNumber <= 2
 
-                   ? `1${keyAsNumber}`
 
-                   : keyAsNumber;
 
-               break;
 
-             case "24":
 
-               if (this.hour === "01") {
 
-                 newHour = `1${keyAsNumber}`;
 
-               }
 
-               else if (this.hour === "02" && keyAsNumber >= 0 && keyAsNumber <= 3) {
 
-                 newHour = `2${keyAsNumber}`;
 
-               }
 
-               else {
 
-                 newHour = keyAsNumber;
 
-               }
 
-               break;
 
-           }
 
-         }
 
-         else {
 
-           newHour = keyAsNumber;
 
-         }
 
-         this.setValuePart("hour", newHour);
 
-       }
 
-       else {
 
-         switch (key) {
 
-           case "Backspace":
 
-           case "Delete":
 
-             this.setValuePart("hour", null);
 
-             break;
 
-           case "ArrowDown":
 
-             event.preventDefault();
 
-             this.decrementHour();
 
-             break;
 
-           case "ArrowUp":
 
-             event.preventDefault();
 
-             this.incrementHour();
 
-             break;
 
-           case " ":
 
-           case "Spacebar":
 
-             event.preventDefault();
 
-             break;
 
-         }
 
-       }
 
-     };
 
-     this.hourUpButtonKeyDownHandler = (event) => {
 
-       if (this.buttonActivated(event)) {
 
-         this.incrementHour();
 
-       }
 
-     };
 
-     this.incrementMeridiem = () => {
 
-       const newMeridiem = this.meridiem === "AM" ? "PM" : "AM";
 
-       this.setValuePart("meridiem", newMeridiem);
 
-     };
 
-     this.incrementHour = () => {
 
-       const newHour = isValidNumber(this.hour)
 
-         ? this.hour === "23"
 
-           ? 0
 
-           : parseInt(this.hour) + 1
 
-         : 1;
 
-       this.setValuePart("hour", newHour);
 
-     };
 
-     this.incrementMinuteOrSecond = (key) => {
 
-       const newValue = isValidNumber(this[key])
 
-         ? this[key] === "59"
 
-           ? 0
 
-           : parseInt(this[key]) + 1
 
-         : 0;
 
-       this.setValuePart(key, newValue);
 
-     };
 
-     this.incrementMinute = () => {
 
-       this.incrementMinuteOrSecond("minute");
 
-     };
 
-     this.incrementSecond = () => {
 
-       this.incrementMinuteOrSecond("second");
 
-     };
 
-     this.meridiemDownButtonKeyDownHandler = (event) => {
 
-       if (this.buttonActivated(event)) {
 
-         this.decrementMeridiem();
 
-       }
 
-     };
 
-     this.meridiemKeyDownHandler = (event) => {
 
-       switch (event.key) {
 
-         case "a":
 
-           this.setValuePart("meridiem", "AM");
 
-           break;
 
-         case "p":
 
-           this.setValuePart("meridiem", "PM");
 
-           break;
 
-         case "Backspace":
 
-         case "Delete":
 
-           this.setValuePart("meridiem", null);
 
-           break;
 
-         case "ArrowUp":
 
-           event.preventDefault();
 
-           this.incrementMeridiem();
 
-           break;
 
-         case "ArrowDown":
 
-           event.preventDefault();
 
-           this.decrementMeridiem();
 
-           break;
 
-         case " ":
 
-         case "Spacebar":
 
-           event.preventDefault();
 
-           break;
 
-       }
 
-     };
 
-     this.meridiemUpButtonKeyDownHandler = (event) => {
 
-       if (this.buttonActivated(event)) {
 
-         this.incrementMeridiem();
 
-       }
 
-     };
 
-     this.minuteDownButtonKeyDownHandler = (event) => {
 
-       if (this.buttonActivated(event)) {
 
-         this.decrementMinute();
 
-       }
 
-     };
 
-     this.minuteKeyDownHandler = (event) => {
 
-       const key = event.key;
 
-       if (numberKeys.includes(key)) {
 
-         const keyAsNumber = parseInt(key);
 
-         let newMinute;
 
-         if (isValidNumber(this.minute) && this.minute.startsWith("0")) {
 
-           const minuteAsNumber = parseInt(this.minute);
 
-           newMinute =
 
-             minuteAsNumber > maxTenthForMinuteAndSecond
 
-               ? keyAsNumber
 
-               : `${minuteAsNumber}${keyAsNumber}`;
 
-         }
 
-         else {
 
-           newMinute = keyAsNumber;
 
-         }
 
-         this.setValuePart("minute", newMinute);
 
-       }
 
-       else {
 
-         switch (key) {
 
-           case "Backspace":
 
-           case "Delete":
 
-             this.setValuePart("minute", null);
 
-             break;
 
-           case "ArrowDown":
 
-             event.preventDefault();
 
-             this.decrementMinute();
 
-             break;
 
-           case "ArrowUp":
 
-             event.preventDefault();
 
-             this.incrementMinute();
 
-             break;
 
-           case " ":
 
-           case "Spacebar":
 
-             event.preventDefault();
 
-             break;
 
-         }
 
-       }
 
-     };
 
-     this.minuteUpButtonKeyDownHandler = (event) => {
 
-       if (this.buttonActivated(event)) {
 
-         this.incrementMinute();
 
-       }
 
-     };
 
-     this.secondDownButtonKeyDownHandler = (event) => {
 
-       if (this.buttonActivated(event)) {
 
-         this.decrementSecond();
 
-       }
 
-     };
 
-     this.secondKeyDownHandler = (event) => {
 
-       const key = event.key;
 
-       if (numberKeys.includes(key)) {
 
-         const keyAsNumber = parseInt(key);
 
-         let newSecond;
 
-         if (isValidNumber(this.second) && this.second.startsWith("0")) {
 
-           const secondAsNumber = parseInt(this.second);
 
-           newSecond =
 
-             secondAsNumber > maxTenthForMinuteAndSecond
 
-               ? keyAsNumber
 
-               : `${secondAsNumber}${keyAsNumber}`;
 
-         }
 
-         else {
 
-           newSecond = keyAsNumber;
 
-         }
 
-         this.setValuePart("second", newSecond);
 
-       }
 
-       else {
 
-         switch (key) {
 
-           case "Backspace":
 
-           case "Delete":
 
-             this.setValuePart("second", null);
 
-             break;
 
-           case "ArrowDown":
 
-             event.preventDefault();
 
-             this.decrementSecond();
 
-             break;
 
-           case "ArrowUp":
 
-             event.preventDefault();
 
-             this.incrementSecond();
 
-             break;
 
-           case " ":
 
-           case "Spacebar":
 
-             event.preventDefault();
 
-             break;
 
-         }
 
-       }
 
-     };
 
-     this.secondUpButtonKeyDownHandler = (event) => {
 
-       if (this.buttonActivated(event)) {
 
-         this.incrementSecond();
 
-       }
 
-     };
 
-     this.setHourEl = (el) => (this.hourEl = el);
 
-     this.setMeridiemEl = (el) => (this.meridiemEl = el);
 
-     this.setMinuteEl = (el) => (this.minuteEl = el);
 
-     this.setSecondEl = (el) => (this.secondEl = el);
 
-     this.setValue = (value, emit = true) => {
 
-       if (isValidTime(value)) {
 
-         const { hour, minute, second } = parseTimeString(value);
 
-         const { localizedHour, localizedHourSuffix, localizedMinute, localizedMinuteSuffix, localizedSecond, localizedSecondSuffix, localizedMeridiem } = localizeTimeStringToParts(value, this.locale);
 
-         this.localizedHour = localizedHour;
 
-         this.localizedHourSuffix = localizedHourSuffix;
 
-         this.localizedMinute = localizedMinute;
 
-         this.localizedMinuteSuffix = localizedMinuteSuffix;
 
-         this.localizedSecond = localizedSecond;
 
-         this.localizedSecondSuffix = localizedSecondSuffix;
 
-         this.hour = hour;
 
-         this.minute = minute;
 
-         this.second = second;
 
-         if (localizedMeridiem) {
 
-           this.localizedMeridiem = localizedMeridiem;
 
-           this.meridiem = getMeridiem(this.hour);
 
-           const formatParts = getTimeParts(value, this.locale);
 
-           this.meridiemOrder = this.getMeridiemOrder(formatParts);
 
-         }
 
-       }
 
-       else {
 
-         this.hour = null;
 
-         this.localizedHour = null;
 
-         this.localizedHourSuffix = null;
 
-         this.localizedMeridiem = null;
 
-         this.localizedMinute = null;
 
-         this.localizedMinuteSuffix = null;
 
-         this.localizedSecond = null;
 
-         this.localizedSecondSuffix = null;
 
-         this.meridiem = null;
 
-         this.minute = null;
 
-         this.second = null;
 
-         this.value = null;
 
-       }
 
-       if (emit) {
 
-         this.calciteTimePickerChange.emit();
 
-       }
 
-     };
 
-     this.setValuePart = (key, value, emit = true) => {
 
-       var _a;
 
-       if (key === "meridiem") {
 
-         this.meridiem = value;
 
-         if (isValidNumber(this.hour)) {
 
-           const hourAsNumber = parseInt(this.hour);
 
-           switch (value) {
 
-             case "AM":
 
-               if (hourAsNumber >= 12) {
 
-                 this.hour = formatTimePart(hourAsNumber - 12);
 
-               }
 
-               break;
 
-             case "PM":
 
-               if (hourAsNumber < 12) {
 
-                 this.hour = formatTimePart(hourAsNumber + 12);
 
-               }
 
-               break;
 
-           }
 
-           this.localizedHour = localizeTimePart(this.hour, "hour", this.locale);
 
-         }
 
-       }
 
-       else {
 
-         this[key] = typeof value === "number" ? formatTimePart(value) : value;
 
-         this[`localized${capitalize(key)}`] = localizeTimePart(this[key], key, this.locale);
 
-       }
 
-       if (this.hour && this.minute) {
 
-         const showSeconds = this.second && this.showSecond;
 
-         this.value = `${this.hour}:${this.minute}:${showSeconds ? this.second : "00"}`;
 
-       }
 
-       else {
 
-         this.value = null;
 
-       }
 
-       this.localizedMeridiem = this.value
 
-         ? ((_a = localizeTimeStringToParts(this.value, this.locale)) === null || _a === void 0 ? void 0 : _a.localizedMeridiem) || null
 
-         : localizeTimePart(this.meridiem, "meridiem", this.locale);
 
-       if (emit) {
 
-         this.calciteTimePickerChange.emit();
 
-       }
 
-     };
 
-   }
 
-   localeWatcher(newLocale) {
 
-     this.hourCycle = getLocaleHourCycle(newLocale);
 
-     this.setValue(this.value, false);
 
-   }
 
-   valueWatcher(newValue) {
 
-     this.setValue(newValue, false);
 
-   }
 
-   //--------------------------------------------------------------------------
 
-   //
 
-   //  Event Listeners
 
-   //
 
-   //--------------------------------------------------------------------------
 
-   hostBlurHandler() {
 
-     this.calciteTimePickerBlur.emit();
 
-   }
 
-   hostFocusHandler() {
 
-     this.calciteTimePickerFocus.emit();
 
-   }
 
-   keyDownHandler(event) {
 
-     const key = event.key;
 
-     switch (this.activeEl) {
 
-       case this.hourEl:
 
-         if (key === "ArrowRight") {
 
-           this.setFocus("minute");
 
-         }
 
-         break;
 
-       case this.minuteEl:
 
-         switch (key) {
 
-           case "ArrowLeft":
 
-             this.setFocus("hour");
 
-             break;
 
-           case "ArrowRight":
 
-             if (this.step !== 60) {
 
-               this.setFocus("second");
 
-             }
 
-             else if (this.hourCycle === "12") {
 
-               this.setFocus("meridiem");
 
-             }
 
-             break;
 
-         }
 
-         break;
 
-       case this.secondEl:
 
-         switch (key) {
 
-           case "ArrowLeft":
 
-             this.setFocus("minute");
 
-             break;
 
-           case "ArrowRight":
 
-             if (this.hourCycle === "12") {
 
-               this.setFocus("meridiem");
 
-             }
 
-             break;
 
-         }
 
-         break;
 
-       case this.meridiemEl:
 
-         switch (key) {
 
-           case "ArrowLeft":
 
-             if (this.step !== 60) {
 
-               this.setFocus("second");
 
-             }
 
-             else {
 
-               this.setFocus("minute");
 
-             }
 
-             break;
 
-         }
 
-         break;
 
-     }
 
-   }
 
-   //--------------------------------------------------------------------------
 
-   //
 
-   //  Public Methods
 
-   //
 
-   //--------------------------------------------------------------------------
 
-   /** Sets focus on the component. */
 
-   async setFocus(target) {
 
-     var _a;
 
-     (_a = this[`${target || "hour"}El`]) === null || _a === void 0 ? void 0 : _a.focus();
 
-   }
 
-   // --------------------------------------------------------------------------
 
-   //
 
-   //  Private Methods
 
-   //
 
-   // --------------------------------------------------------------------------
 
-   buttonActivated(event) {
 
-     const key = event.key;
 
-     if (key === " ") {
 
-       event.preventDefault();
 
-     }
 
-     return isActivationKey(key);
 
-   }
 
-   getMeridiemOrder(formatParts) {
 
-     const isRTLKind = this.locale === "ar" || this.locale === "he";
 
-     if (formatParts && !isRTLKind) {
 
-       const index = formatParts.findIndex((parts) => {
 
-         return parts.value === this.localizedMeridiem;
 
-       });
 
-       return index;
 
-     }
 
-     return 0;
 
-   }
 
-   // --------------------------------------------------------------------------
 
-   //
 
-   //  Lifecycle
 
-   //
 
-   // --------------------------------------------------------------------------
 
-   connectedCallback() {
 
-     this.setValue(this.value, false);
 
-     this.hourCycle = getLocaleHourCycle(this.locale);
 
-   }
 
-   // --------------------------------------------------------------------------
 
-   //
 
-   //  Render Methods
 
-   //
 
-   // --------------------------------------------------------------------------
 
-   render() {
 
-     const hourIsNumber = isValidNumber(this.hour);
 
-     const iconScale = this.scale === "s" || this.scale === "m" ? "s" : "m";
 
-     const minuteIsNumber = isValidNumber(this.minute);
 
-     const secondIsNumber = isValidNumber(this.second);
 
-     const showMeridiem = this.hourCycle === "12";
 
-     return (h("div", { class: {
 
-         [CSS.timePicker]: true,
 
-         [CSS.showMeridiem]: showMeridiem,
 
-         [CSS.showSecond]: this.showSecond,
 
-         [CSS[`scale-${this.scale}`]]: true
 
-       }, dir: "ltr" },
 
-       h("div", { class: CSS.column, role: "group" },
 
-         h("span", { "aria-label": this.intlHourUp, class: {
 
-             [CSS.button]: true,
 
-             [CSS.buttonHourUp]: true,
 
-             [CSS.buttonTopLeft]: true
 
-           }, onClick: this.incrementHour, onKeyDown: this.hourUpButtonKeyDownHandler, role: "button", tabIndex: -1 },
 
-           h("calcite-icon", { icon: "chevron-up", scale: iconScale })),
 
-         h("span", { "aria-label": this.intlHour, "aria-valuemax": "23", "aria-valuemin": "1", "aria-valuenow": (hourIsNumber && parseInt(this.hour)) || "0", "aria-valuetext": this.hour, class: {
 
-             [CSS.input]: true,
 
-             [CSS.hour]: true
 
-           }, onFocus: this.focusHandler, onKeyDown: this.hourKeyDownHandler, ref: this.setHourEl, role: "spinbutton", tabIndex: 0 }, this.localizedHour || "--"),
 
-         h("span", { "aria-label": this.intlHourDown, class: {
 
-             [CSS.button]: true,
 
-             [CSS.buttonHourDown]: true,
 
-             [CSS.buttonBottomLeft]: true
 
-           }, onClick: this.decrementHour, onKeyDown: this.hourDownButtonKeyDownHandler, role: "button", tabIndex: -1 },
 
-           h("calcite-icon", { icon: "chevron-down", scale: iconScale }))),
 
-       h("span", { class: CSS.delimiter }, this.localizedHourSuffix),
 
-       h("div", { class: CSS.column, role: "group" },
 
-         h("span", { "aria-label": this.intlMinuteUp, class: {
 
-             [CSS.button]: true,
 
-             [CSS.buttonMinuteUp]: true
 
-           }, onClick: this.incrementMinute, onKeyDown: this.minuteUpButtonKeyDownHandler, role: "button", tabIndex: -1 },
 
-           h("calcite-icon", { icon: "chevron-up", scale: iconScale })),
 
-         h("span", { "aria-label": this.intlMinute, "aria-valuemax": "12", "aria-valuemin": "1", "aria-valuenow": (minuteIsNumber && parseInt(this.minute)) || "0", "aria-valuetext": this.minute, class: {
 
-             [CSS.input]: true,
 
-             [CSS.minute]: true
 
-           }, onFocus: this.focusHandler, onKeyDown: this.minuteKeyDownHandler, ref: this.setMinuteEl, role: "spinbutton", tabIndex: 0 }, this.localizedMinute || "--"),
 
-         h("span", { "aria-label": this.intlMinuteDown, class: {
 
-             [CSS.button]: true,
 
-             [CSS.buttonMinuteDown]: true
 
-           }, onClick: this.decrementMinute, onKeyDown: this.minuteDownButtonKeyDownHandler, role: "button", tabIndex: -1 },
 
-           h("calcite-icon", { icon: "chevron-down", scale: iconScale }))),
 
-       this.showSecond && h("span", { class: CSS.delimiter }, this.localizedMinuteSuffix),
 
-       this.showSecond && (h("div", { class: CSS.column, role: "group" },
 
-         h("span", { "aria-label": this.intlSecondUp, class: {
 
-             [CSS.button]: true,
 
-             [CSS.buttonSecondUp]: true
 
-           }, onClick: this.incrementSecond, onKeyDown: this.secondUpButtonKeyDownHandler, role: "button", tabIndex: -1 },
 
-           h("calcite-icon", { icon: "chevron-up", scale: iconScale })),
 
-         h("span", { "aria-label": this.intlSecond, "aria-valuemax": "59", "aria-valuemin": "0", "aria-valuenow": (secondIsNumber && parseInt(this.second)) || "0", "aria-valuetext": this.second, class: {
 
-             [CSS.input]: true,
 
-             [CSS.second]: true
 
-           }, onFocus: this.focusHandler, onKeyDown: this.secondKeyDownHandler, ref: this.setSecondEl, role: "spinbutton", tabIndex: 0 }, this.localizedSecond || "--"),
 
-         h("span", { "aria-label": this.intlSecondDown, class: {
 
-             [CSS.button]: true,
 
-             [CSS.buttonSecondDown]: true
 
-           }, onClick: this.decrementSecond, onKeyDown: this.secondDownButtonKeyDownHandler, role: "button", tabIndex: -1 },
 
-           h("calcite-icon", { icon: "chevron-down", scale: iconScale })))),
 
-       this.localizedSecondSuffix && (h("span", { class: CSS.delimiter }, this.localizedSecondSuffix)),
 
-       showMeridiem && (h("div", { class: {
 
-           [CSS.column]: true,
 
-           [CSS.meridiemStart]: this.meridiemOrder === 0
 
-         }, role: "group" },
 
-         h("span", { "aria-label": this.intlMeridiemUp, class: {
 
-             [CSS.button]: true,
 
-             [CSS.buttonMeridiemUp]: true,
 
-             [CSS.buttonTopRight]: true
 
-           }, onClick: this.incrementMeridiem, onKeyDown: this.meridiemUpButtonKeyDownHandler, role: "button", tabIndex: -1 },
 
-           h("calcite-icon", { icon: "chevron-up", scale: iconScale })),
 
-         h("span", { "aria-label": this.intlMeridiem, "aria-valuemax": "2", "aria-valuemin": "1", "aria-valuenow": (this.meridiem === "PM" && "2") || "1", "aria-valuetext": this.meridiem, class: {
 
-             [CSS.input]: true,
 
-             [CSS.meridiem]: true
 
-           }, onFocus: this.focusHandler, onKeyDown: this.meridiemKeyDownHandler, ref: this.setMeridiemEl, role: "spinbutton", tabIndex: 0 }, this.localizedMeridiem || "--"),
 
-         h("span", { "aria-label": this.intlMeridiemDown, class: {
 
-             [CSS.button]: true,
 
-             [CSS.buttonMeridiemDown]: true,
 
-             [CSS.buttonBottomRight]: true
 
-           }, onClick: this.decrementMeridiem, onKeyDown: this.meridiemDownButtonKeyDownHandler, role: "button", tabIndex: -1 },
 
-           h("calcite-icon", { icon: "chevron-down", scale: iconScale }))))));
 
-   }
 
-   static get is() { return "calcite-time-picker"; }
 
-   static get encapsulation() { return "shadow"; }
 
-   static get originalStyleUrls() { return {
 
-     "$": ["time-picker.scss"]
 
-   }; }
 
-   static get styleUrls() { return {
 
-     "$": ["time-picker.css"]
 
-   }; }
 
-   static get properties() { return {
 
-     "intlHour": {
 
-       "type": "string",
 
-       "mutable": false,
 
-       "complexType": {
 
-         "original": "string",
 
-         "resolved": "string",
 
-         "references": {}
 
-       },
 
-       "required": false,
 
-       "optional": false,
 
-       "docs": {
 
-         "tags": [{
 
-             "name": "default",
 
-             "text": "\"Hour\""
 
-           }],
 
-         "text": "aria-label for the hour input"
 
-       },
 
-       "attribute": "intl-hour",
 
-       "reflect": false,
 
-       "defaultValue": "TEXT.hour"
 
-     },
 
-     "intlHourDown": {
 
-       "type": "string",
 
-       "mutable": false,
 
-       "complexType": {
 
-         "original": "string",
 
-         "resolved": "string",
 
-         "references": {}
 
-       },
 
-       "required": false,
 
-       "optional": false,
 
-       "docs": {
 
-         "tags": [{
 
-             "name": "default",
 
-             "text": "\"Decrease hour\""
 
-           }],
 
-         "text": "aria-label for the hour down button"
 
-       },
 
-       "attribute": "intl-hour-down",
 
-       "reflect": false,
 
-       "defaultValue": "TEXT.hourDown"
 
-     },
 
-     "intlHourUp": {
 
-       "type": "string",
 
-       "mutable": false,
 
-       "complexType": {
 
-         "original": "string",
 
-         "resolved": "string",
 
-         "references": {}
 
-       },
 
-       "required": false,
 
-       "optional": false,
 
-       "docs": {
 
-         "tags": [{
 
-             "name": "default",
 
-             "text": "\"Increase hour\""
 
-           }],
 
-         "text": "aria-label for the hour up button"
 
-       },
 
-       "attribute": "intl-hour-up",
 
-       "reflect": false,
 
-       "defaultValue": "TEXT.hourUp"
 
-     },
 
-     "intlMeridiem": {
 
-       "type": "string",
 
-       "mutable": false,
 
-       "complexType": {
 
-         "original": "string",
 
-         "resolved": "string",
 
-         "references": {}
 
-       },
 
-       "required": false,
 
-       "optional": false,
 
-       "docs": {
 
-         "tags": [{
 
-             "name": "default",
 
-             "text": "\"AM/PM\""
 
-           }],
 
-         "text": "aria-label for the meridiem (am/pm) input"
 
-       },
 
-       "attribute": "intl-meridiem",
 
-       "reflect": false,
 
-       "defaultValue": "TEXT.meridiem"
 
-     },
 
-     "intlMeridiemDown": {
 
-       "type": "string",
 
-       "mutable": false,
 
-       "complexType": {
 
-         "original": "string",
 
-         "resolved": "string",
 
-         "references": {}
 
-       },
 
-       "required": false,
 
-       "optional": false,
 
-       "docs": {
 
-         "tags": [{
 
-             "name": "default",
 
-             "text": "\"Decrease AM/PM\""
 
-           }],
 
-         "text": "aria-label for the meridiem (am/pm) down button"
 
-       },
 
-       "attribute": "intl-meridiem-down",
 
-       "reflect": false,
 
-       "defaultValue": "TEXT.meridiemDown"
 
-     },
 
-     "intlMeridiemUp": {
 
-       "type": "string",
 
-       "mutable": false,
 
-       "complexType": {
 
-         "original": "string",
 
-         "resolved": "string",
 
-         "references": {}
 
-       },
 
-       "required": false,
 
-       "optional": false,
 
-       "docs": {
 
-         "tags": [{
 
-             "name": "default",
 
-             "text": "\"Increase AM/PM\""
 
-           }],
 
-         "text": "aria-label for the meridiem (am/pm) up button"
 
-       },
 
-       "attribute": "intl-meridiem-up",
 
-       "reflect": false,
 
-       "defaultValue": "TEXT.meridiemUp"
 
-     },
 
-     "intlMinute": {
 
-       "type": "string",
 
-       "mutable": false,
 
-       "complexType": {
 
-         "original": "string",
 
-         "resolved": "string",
 
-         "references": {}
 
-       },
 
-       "required": false,
 
-       "optional": false,
 
-       "docs": {
 
-         "tags": [{
 
-             "name": "default",
 
-             "text": "\"Minute\""
 
-           }],
 
-         "text": "aria-label for the minute input"
 
-       },
 
-       "attribute": "intl-minute",
 
-       "reflect": false,
 
-       "defaultValue": "TEXT.minute"
 
-     },
 
-     "intlMinuteDown": {
 
-       "type": "string",
 
-       "mutable": false,
 
-       "complexType": {
 
-         "original": "string",
 
-         "resolved": "string",
 
-         "references": {}
 
-       },
 
-       "required": false,
 
-       "optional": false,
 
-       "docs": {
 
-         "tags": [{
 
-             "name": "default",
 
-             "text": "\"Decrease minute\""
 
-           }],
 
-         "text": "aria-label for the minute down button"
 
-       },
 
-       "attribute": "intl-minute-down",
 
-       "reflect": false,
 
-       "defaultValue": "TEXT.minuteDown"
 
-     },
 
-     "intlMinuteUp": {
 
-       "type": "string",
 
-       "mutable": false,
 
-       "complexType": {
 
-         "original": "string",
 
-         "resolved": "string",
 
-         "references": {}
 
-       },
 
-       "required": false,
 
-       "optional": false,
 
-       "docs": {
 
-         "tags": [{
 
-             "name": "default",
 
-             "text": "\"Increase minute\""
 
-           }],
 
-         "text": "aria-label for the minute up button"
 
-       },
 
-       "attribute": "intl-minute-up",
 
-       "reflect": false,
 
-       "defaultValue": "TEXT.minuteUp"
 
-     },
 
-     "intlSecond": {
 
-       "type": "string",
 
-       "mutable": false,
 
-       "complexType": {
 
-         "original": "string",
 
-         "resolved": "string",
 
-         "references": {}
 
-       },
 
-       "required": false,
 
-       "optional": false,
 
-       "docs": {
 
-         "tags": [{
 
-             "name": "default",
 
-             "text": "\"Second\""
 
-           }],
 
-         "text": "aria-label for the second input"
 
-       },
 
-       "attribute": "intl-second",
 
-       "reflect": false,
 
-       "defaultValue": "TEXT.second"
 
-     },
 
-     "intlSecondDown": {
 
-       "type": "string",
 
-       "mutable": false,
 
-       "complexType": {
 
-         "original": "string",
 
-         "resolved": "string",
 
-         "references": {}
 
-       },
 
-       "required": false,
 
-       "optional": false,
 
-       "docs": {
 
-         "tags": [{
 
-             "name": "default",
 
-             "text": "\"Decrease second\""
 
-           }],
 
-         "text": "aria-label for the second down button"
 
-       },
 
-       "attribute": "intl-second-down",
 
-       "reflect": false,
 
-       "defaultValue": "TEXT.secondDown"
 
-     },
 
-     "intlSecondUp": {
 
-       "type": "string",
 
-       "mutable": false,
 
-       "complexType": {
 
-         "original": "string",
 
-         "resolved": "string",
 
-         "references": {}
 
-       },
 
-       "required": false,
 
-       "optional": false,
 
-       "docs": {
 
-         "tags": [{
 
-             "name": "default",
 
-             "text": "\"Increase second\""
 
-           }],
 
-         "text": "aria-label for the second up button"
 
-       },
 
-       "attribute": "intl-second-up",
 
-       "reflect": false,
 
-       "defaultValue": "TEXT.secondUp"
 
-     },
 
-     "locale": {
 
-       "type": "string",
 
-       "mutable": true,
 
-       "complexType": {
 
-         "original": "string",
 
-         "resolved": "string",
 
-         "references": {}
 
-       },
 
-       "required": false,
 
-       "optional": false,
 
-       "docs": {
 
-         "tags": [{
 
-             "name": "internal",
 
-             "text": undefined
 
-           }],
 
-         "text": "BCP 47 language tag for desired language and country format"
 
-       },
 
-       "attribute": "lang",
 
-       "reflect": false,
 
-       "defaultValue": "document.documentElement.lang || navigator.language || \"en\""
 
-     },
 
-     "scale": {
 
-       "type": "string",
 
-       "mutable": false,
 
-       "complexType": {
 
-         "original": "Scale",
 
-         "resolved": "\"l\" | \"m\" | \"s\"",
 
-         "references": {
 
-           "Scale": {
 
-             "location": "import",
 
-             "path": "../interfaces"
 
-           }
 
-         }
 
-       },
 
-       "required": false,
 
-       "optional": false,
 
-       "docs": {
 
-         "tags": [],
 
-         "text": "The scale (size) of the time picker"
 
-       },
 
-       "attribute": "scale",
 
-       "reflect": false,
 
-       "defaultValue": "\"m\""
 
-     },
 
-     "step": {
 
-       "type": "number",
 
-       "mutable": false,
 
-       "complexType": {
 
-         "original": "number",
 
-         "resolved": "number",
 
-         "references": {}
 
-       },
 
-       "required": false,
 
-       "optional": false,
 
-       "docs": {
 
-         "tags": [],
 
-         "text": "number (seconds) that specifies the granularity that the value must adhere to"
 
-       },
 
-       "attribute": "step",
 
-       "reflect": false,
 
-       "defaultValue": "60"
 
-     },
 
-     "value": {
 
-       "type": "string",
 
-       "mutable": true,
 
-       "complexType": {
 
-         "original": "string",
 
-         "resolved": "string",
 
-         "references": {}
 
-       },
 
-       "required": false,
 
-       "optional": false,
 
-       "docs": {
 
-         "tags": [],
 
-         "text": "The selected time in UTC (always 24-hour format)"
 
-       },
 
-       "attribute": "value",
 
-       "reflect": false,
 
-       "defaultValue": "null"
 
-     }
 
-   }; }
 
-   static get states() { return {
 
-     "hour": {},
 
-     "hourCycle": {},
 
-     "localizedHour": {},
 
-     "localizedHourSuffix": {},
 
-     "localizedMeridiem": {},
 
-     "localizedMinute": {},
 
-     "localizedMinuteSuffix": {},
 
-     "localizedSecond": {},
 
-     "localizedSecondSuffix": {},
 
-     "meridiem": {},
 
-     "minute": {},
 
-     "second": {},
 
-     "showSecond": {}
 
-   }; }
 
-   static get events() { return [{
 
-       "method": "calciteTimePickerBlur",
 
-       "name": "calciteTimePickerBlur",
 
-       "bubbles": true,
 
-       "cancelable": true,
 
-       "composed": true,
 
-       "docs": {
 
-         "tags": [{
 
-             "name": "internal",
 
-             "text": undefined
 
-           }],
 
-         "text": ""
 
-       },
 
-       "complexType": {
 
-         "original": "void",
 
-         "resolved": "void",
 
-         "references": {}
 
-       }
 
-     }, {
 
-       "method": "calciteTimePickerChange",
 
-       "name": "calciteTimePickerChange",
 
-       "bubbles": true,
 
-       "cancelable": true,
 
-       "composed": true,
 
-       "docs": {
 
-         "tags": [{
 
-             "name": "internal",
 
-             "text": undefined
 
-           }],
 
-         "text": ""
 
-       },
 
-       "complexType": {
 
-         "original": "string",
 
-         "resolved": "string",
 
-         "references": {}
 
-       }
 
-     }, {
 
-       "method": "calciteTimePickerFocus",
 
-       "name": "calciteTimePickerFocus",
 
-       "bubbles": true,
 
-       "cancelable": true,
 
-       "composed": true,
 
-       "docs": {
 
-         "tags": [{
 
-             "name": "internal",
 
-             "text": undefined
 
-           }],
 
-         "text": ""
 
-       },
 
-       "complexType": {
 
-         "original": "void",
 
-         "resolved": "void",
 
-         "references": {}
 
-       }
 
-     }]; }
 
-   static get methods() { return {
 
-     "setFocus": {
 
-       "complexType": {
 
-         "signature": "(target: TimePart) => Promise<void>",
 
-         "parameters": [{
 
-             "tags": [],
 
-             "text": ""
 
-           }],
 
-         "references": {
 
-           "Promise": {
 
-             "location": "global"
 
-           },
 
-           "TimePart": {
 
-             "location": "import",
 
-             "path": "../../utils/time"
 
-           }
 
-         },
 
-         "return": "Promise<void>"
 
-       },
 
-       "docs": {
 
-         "text": "Sets focus on the component.",
 
-         "tags": []
 
-       }
 
-     }
 
-   }; }
 
-   static get elementRef() { return "el"; }
 
-   static get watchers() { return [{
 
-       "propName": "locale",
 
-       "methodName": "localeWatcher"
 
-     }, {
 
-       "propName": "value",
 
-       "methodName": "valueWatcher"
 
-     }]; }
 
-   static get listeners() { return [{
 
-       "name": "blur",
 
-       "method": "hostBlurHandler",
 
-       "target": undefined,
 
-       "capture": false,
 
-       "passive": false
 
-     }, {
 
-       "name": "focus",
 
-       "method": "hostFocusHandler",
 
-       "target": undefined,
 
-       "capture": false,
 
-       "passive": false
 
-     }, {
 
-       "name": "keydown",
 
-       "method": "keyDownHandler",
 
-       "target": undefined,
 
-       "capture": false,
 
-       "passive": false
 
-     }]; }
 
- }
 
 
  |