{"version":3,"names":["somAccordionCss","SomAccordionStyle0","SomAccordion","toggle","this","collapsed","collapseEl","show","hide","toggleAccordion","accordionToggled","emit","render","h","key","class","part","type","onClick","ref","el","buttonEl","innerHTML","icon","label","name","color","display","somAccordionGroupCss","SomAccordionGroupStyle0","SomAccordionGroup","accordionToggleHandle","e","accordions","Array","from","children","accordion","target","singleOpen","borders","somAlertCss","SomAlertStyle0","SomAlert","Promise","resolve","hidden","somDismissed","_getDismissProps","props","size","toLowerCase","_getStyles","alertStyle","push","join","_getIcon","Host","role","noIcon","headline","length","dismissible","somBadgeCss","SomBadgeStyle0","SomBadge","isHidden","light","closeButtonAriaLabel","somButtonCss","SomButtonStyle0","SomButton","onFocus","somFocus","onBlur","somBlur","inheritedAttributes","clickHandler","disabled","loading","preventDefault","stopPropagation","handleMutation","mutations","disconnectObserver","forEach","mutation","attributeName","internalButtonEl","setAttribute","getAttribute","connectObserver","observer","disconnect","observe","attributes","componentWillLoad","colors","includes","inheritAriaAttributes","handleMutationCb","bind","MutationObserver","componentDidLoad","disconnectedCallback","_getStyle","css","buttonType","iconPosition","getIcon","Object","assign","buttonAriaLabel","tabindex","loadingMessage","style","visibility","somButtonDropdownCss","SomButtonDropdownStyle0","SomButtonDropdown","popoverId","generateId","buttonId","handleWindowBlur","document","activeElement","handleWindowFocus","open","popoverEl","close","handleButtonBlur","handleButtonClick","expanded","handlePopoverClose","ariaDisabled","id","buttonText","for","verticalPosition","horizontalPosition","onPopoverClosed","MONTH_NAMES","WEEKDAY_NAMES","isValidDate","dateString","format","regexString","RegExp","replace","match","tokenOrder","sort","a","b","indexOf","monthStr","dayStr","yearStr","i","month","parseInt","year","monthLength","day","getInternalFormat","dateStr","currentFormat","getInternalFormatFromDate","date","getMonth","getDate","getFullYear","getDateFromInternalFormat","split","Date","isDateString","dateText","formatDate","getFirstDayOfMonth","getLastDayOfMonth","getFirstDayOfMonthWithDate","getLastDayOfMonthWithDate","isSameDate","date1","date2","year1","month1","day1","year2","month2","day2","isBetweenDate","startDate","endDate","start","end","time","getTime","isBeforeDate","adjustedDate1","adjustedDate2","isAfterDate","somCalendarCss","SomCalendarStyle0","ARROW_KEY_CODES","KEY_CODES","ARROW_LEFT","ARROW_UP","ARROW_RIGHT","ARROW_DOWN","DEFAULT_MONTHS_TO_SHOW","MONTH_WIDTH","MARGIN_BETWEEN_MONTHS","HEADER_HEIGHT","WEEK_HEIGHT","SomCalendar","hovered","updateInProgress","resetAfterUpdate","focusAfterUpdate","updateHeightAfterUpdate","update","animate","callbackAfterUpdate","focusableDate","date1Object","date2Object","handleMonthChange","updateMonth","handleMonthsNbChange","updateHeight","monthObject","handleMinDateChange","updateMinDate","handleMaxDateChange","updateMaxDate","handleRangePickerChange","newValue","handleDate1Change","clearHoveredClasses","updateDate1","handleDate2Change","updateDate2","reset","resetFocusableDate","setFocus","setFocusableDate","monthsNb","focusDate","monthsContainerEl","querySelector","monthsContentEl","componentDidUpdate","left","runAfterNextFrameRender","classList","add","handleGlobalKeyDown","handleKeyDown","keyCode","dayEl","getDayElement","dateToFocus","setDate","transitionToPreviousMonth","transitionToNextMonth","getFirstFocusableDate","removeFocusableDays","focusableDays","slice","call","querySelectorAll","tabIndex","focusElement","height","getContainerHeight","remove","currentMonthObject","minDateObject","minDate","maxDateObject","maxDate","selectors","hoveredDayEls","prototype","hoveredDayEl","setHoveredDate","enableRangePicker","hoveredDate","firstDayOfRenderedMonths","date1IsBefore","dateIter","getDay","previousElementSibling","nextElementSibling","waitForTransition","transitionEvent","whichTransitionEvent","onTransitionCompletedCb","onTransitionCompleted","evt","className","removeEventListener","addEventListener","monthDate","firstDay","lastDay","totalDays","nextMonthFirstDay","nextMonthLastDay","Math","max","ceil","prevMonth","nextMonth","handlePreviousKeyDown","ENTER","SPACE","goToPreviousMonth","handlePreviousClick","lastDayOfMonth","getFocusableDate","handleNextKeyDown","goToNextMonth","handleNextClick","handleDayKeyDown","selectDay","dateChange","handleDayClick","setDayFocus","internalDateFormat","formatDayLabel","firstDayOfViewableMonths","lastDayOfViewableMonths","earliestDate","getWeekArrays","firstWeekDayNb","lastWeekDayNb","weeks","weekDays","renderMonth","map","week","weekNb","dayNb","weekDayNb","isBetween","gradientClass","lastDayOfPreviousMonth","firstDayOfMonth","firstDayofNextMonth","isStartSelection","isEndSelection","isSelected","isDisabled","hoverableClassName","readonly","classes","onMouseEnter","onMouseLeave","onKeyDown","renderWeekdays","weekdays","marginLeft","renderMonths","months","width","WIDTH","somCalendarVerticalCss","SomCalendarVerticalStyle0","SomCalendarVertical","containerEl","scrollTop","loadPreviousEl","offsetHeight","firstVisibleMonthDay","lastVisibleMonthDay","loadPreviousMonths","loadNextMonths","newFirstMonth","setMonth","scrollPos","requestAnimationFrame","currentDisplayedMonthsHeight","offset","somCardCss","SomCardStyle0","SomCard","handleKeyUp","ev","click","getAttrs","attrs","matchHeight","somCheckboxCss","SomCheckboxStyle0","SomCheckbox","tooltipID","handleGroupHelpIdChange","newVal","groupHelpId","inputElement","handleFocus","handleBlur","handleChange","checked","checkboxEl","somChange","registerEvents","handleFocusCb","handleBlurCb","handleChangeCb","unregisterEvents","helpElementId","inputId","componentWillUnload","_isInError","isInError","error","helpMessage","help","ariaDescribedby","_requiredInd","getRequiredInd","required","requiredInd","checkbox","indeterminate","value","inputAriaLabel","labelClass","hideLabel","htmlFor","tooltip","hasGroupParent","somCheckboxGroupCss","SomCheckboxGroupStyle0","SomCheckboxGroup","groupId","updateIndeterminateOption","nodeName","indeterminateRef","detail","toggleIndeterminateOption","areAllCheckboxesSelected","childrenData","filter","selectAll","checkboxes","handleErrorChange","values","child","ariaInvalid","groupedContentClasses","inline","somCollapseCss","SomCollapseStyle0","SomCollapse","toggleCollapse","opened","refresh","watchCollapsed","oldVal","cancelCallback","reject","setOverflowHidden","setHidden","setHeight","contentElement","scrollHeight","listenForTransitionEnd","err","collapseToggled","containerElement","overflowHidden","callback","elem","event","propertyName","somContentCss","SomContentStyle0","SomContent","padding","somDatePickerCss","SomDatePickerStyle0","MOBILE_MONTHS_NB","DESKTOP_MONTHS_NB","SomDatePicker","updateWidthCb","updateWidth","handleWindowResize","clearTimeout","resizeTimeout","setTimeout","calendarEl","singleMonthView","window","innerWidth","breakpoints","lg","handleDateChange","vertical","onDateChange","somDatePickerInputCss","SomDatePickerInputStyle0","SomDatePickerInput","enableInputFocus","handleValueUpdate","inputEl","updateResponsivenessCb","TAB","hasFocus","isDescendant","hideDatePicker","ESC","focusSilently","showDatePicker","datePickerEl","resetValue","updateResponsiveness","isMobile","md","handleInputFocus","focusBlurDebounceTimeout","handleInputBlur","handleInputClick","handleInputText","dateChanged","handleMobileDateChange","value1","isDatePickerDisplayed","hasAttribute","datePickerMobileEl","focusOnShow","resetDatePicker","removeAttribute","handleMobileClose","ariaRequired","ariaReadonly","slot","placeholder","onInput","onClose","onDatesChanged","somDatePickerMobileCss","SomDatePickerMobileStyle0","SomDatePickerMobile","focusedElement","tmp","handleShowChange","callbackAfterCSSTransition","bodyEl","lastBodyOverflowStyle","getPropertyValue","overflow","lastBodyMSOverflowStyle","contentContainerEl","bottom","focusInputOnShow","input1El","undoBodyStyling","waitForCSSTransitionToFinish","handleClose","setDatePickerFocus","focusableElements","getFocusableElements","focusedElementIndex","findIndex","element","newIndex","shiftKey","dateRangePickerEl","input2El","selector","elemToFocus","handleDateRangeChange","value2","handleInput1Text","handleInput2Text","handleClear","handleApply","datesChanged","href","calendarContainerEl","somDateRangePickerCss","SomDateRangePickerStyle0","SomDateRangePicker","somDateRangePickerButtonCss","SomDateRangePickerButtonStyle0","SomDateRangePickerButton","handleStartDateChange","updateStartDate","handleEndDateChange","updateEndDate","isDateRangePickerDisplayed","popoverDateRangePickerEl","dateRange","concat","date1Tmp","date2Tmp","mobileDateRangePickerEl","handleDatesSelected","handleApplySelectedDates","handleClearSelectedDates","buttonColor","buttonSize","buttonIconPosition","buttonIcon","buttonLabel","somDialogCss","SomDialogStyle0","SomDialog","modal","confirm","confirmation","dialogConfirm","handleOpen","dialogOpen","dialogClose","dialogAriaLabel","description","enableKeyboardClose","enableOverlayClose","hideCloseButton","cancelText","isDestructive","confirmText","somHeaderCss","SomHeaderStyle0","RESIZE_DEBOUNCE_TIME","SomHeader","menuButtonAriaLabel","checkMobileMode","breakpoint","mobileMode","checkBreakpoint","timeout","closePanelMenu","menuPanelEl","hideMobileMenu","panelMenuSlot","mainContentElem","getElementById","mainContentId","toggleMenu","parentMenuClosedHandler","parentMenuOpenHandler","panelCloseHandler","menuButtonEl","sticky","homeLink","appName","departmentName","position","onBeforeClose","iconCss","SomIconStyle0","SomIcon","handleName","getIconData","res","fetch","getAssetPath","status","iconData","text","console","somInputCss","SomInputStyle0","SomInput","handleValueChange","currentValue","htmlElement","handleInput","somInput","handleInputCb","grouped","autoComplete","autocomplete","maxLength","maxlength","min","step","somListCss","SomListStyle0","SomList","injectAttrs","attrsUpdated","handleSlotChange","childNodes","listOpenedHandler","isSubListOpen","levelOneNav","listEl","item","levelTwoNav","listClosedHandler","onSlotchange","somListItemCss","SomListItemStyle0","SomListItem","showDivider","active","somListParentItemCss","SomListParentItemStyle0","SomListParentItem","_type","handlePanelClose","beforeListOpened","listOpened","buttonDropdownEl","accrodionEl","beforeListClosed","listClosed","determineRender","renderHeader","renderPanel","renderSidebar","displayName","passiveTestOptions","passive","undefined","locks","previousBodyOverflowSetting","previousBodyPaddingRight","options","reserveScrollBarGap","scrollBarGap","documentElement","clientWidth","body","paddingRight","restoreOverflowSetting","disableBodyScroll","targetElement","lock","clearAllBodyScrollLocks","enableBodyScroll","somModalCss","SomModalStyle0","SomModal","modalElement","modalOpen","showModal","modalClose","_handleKeyDown","returnValue","handleOverlayClick","handleModalScroll","modalCloseBtn","getModalStyles","styles","describedById","modalBody","opts","modalAriaLabel","modalEl","modalContainerEl","modalPadding","somPaginationCss","SomPaginationStyle0","SomPagination","handleItemsPerPageChange","calculateNumberOfPages","handleTotalItemsChange","handlePageChange","pageIndex","page","handlePreviousPageCb","handlePreviousPage","handleNextPageCb","handleNextPage","handlePageClick","pageChanged","updateActiveFocus","nbPages","calculateViewableItems","viewableEnd","itemsPerPage","viewableStart","totalItems","getPageElement","tableName","getPageElements","pageElements","LIMIT","startIndex","view","somPanelCss","SomPanelStyle0","SomPanel","focusableEls","shownChanged","contains","panelDialog","handleListClose","panelContainer","async","preDisplay","elemWithAnimation","panelDidOpen","beforeClose","animating","panelDidClose","openPanel","afterOpen","afterClose","handlePanelScroll","panelCloseBtn","panelDidOpenCb","panelDidCloseCb","shown","belowHeader","somPopoverCss","SomPopoverStyle0","VERTICAL_OFFSET","SomPopover","updatePosition","focusedElBeforeOpen","popoverOpened","popoverClosed","handleKeydown","handleWindowClick","forEl","popupContainerEl","handleKeypress","getFocusableElementList","top","right","getBottomPosition","getTopPosition","getRightPosition","getLeftPosition","offsetParent","clientHeight","offsetTop","clientTop","clientLeft","offsetLeft","offsetWidth","somRadioButtonCss","SomRadioButtonStyle0","SomRadioButton","radioButtonEl","somRadioButtonGroupCss","SomRadioButtonGroupStyle0","SomRadioButtonGroup","radios","radio","somChangeHandler","somSelectCss","SomSelectStyle0","SomSelect","selectEl","somSpinnerCss","SomSpinnerStyle0","SomSpinner","viewBox","cx","cy","r","somStatusCardCss","SomStatusCardStyle0","SomStatusCard","SomTab","handleClick","tabId","tabClick","dark","somTabsCss","SomTabsStyle0","SomTabs","tabs","tabsId","panels","tabGroup","panelGroup","panelColor","activeFound","panelsExist","tab","idx","_active","showTab","showTabPanel","_idx","somTextareaCss","SomTextareaStyle0","DEFAULT_ROWS","SomTextarea","handleRowsChange","rows","maxLengthMessage","somToggleCss","SomToggleStyle0","SomToggle","toggleElement","toggleId","ariaChecked","somTooltipCss","SomTooltipStyle0","SomTooltip","opacity","closed","handleMouseOver","handleMouseOut","handleFocusIn","handleFocusOut","handleTouchStart","handleEscape","targetEl","handleTooltipMouseOver","handleTooltipMouseOut","handleFocusInCb","handleFocusOutCb","handleMouseOverCb","handleMouseOutCb","handleEscapeCb","handleTouchStartCb","handleTooltipMouseOverCb","handleTooltipMouseOutCb","horizontalPos","verticalPos","tooltipRect","getBoundingClientRect","tooltipTriggerRect","tooltipTriggerX","x","tooltipTriggerY","y","innerHeight","tooltipId","content"],"sources":["src/components/som-accordion/som-accordion.scss?tag=som-accordion&encapsulation=shadow","src/components/som-accordion/som-accordion.tsx","src/components/som-accordion-group/som-accordion-group.scss?tag=som-accordion-group&encapsulation=shadow","src/components/som-accordion-group/som-accordion-group.tsx","src/components/som-alert/som-alert.scss?tag=som-alert","src/components/som-alert/som-alert.tsx","src/components/som-badge/som-badge.scss?tag=som-badge&encapsulation=shadow","src/components/som-badge/som-badge.tsx","src/components/som-button/som-button.scss?tag=som-button&encapsulation=scoped","src/components/som-button/som-button.tsx","src/components/som-button-dropdown/som-button-dropdown.scss?tag=som-button-dropdown&encapsulation=scoped","src/components/som-button-dropdown/som-button-dropdown.tsx","src/utils/dates.tsx","src/components/som-calendar/som-calendar.scss?tag=som-calendar","src/components/som-calendar/som-calendar.tsx","src/components/som-calendar-vertical/som-calendar-vertical.scss?tag=som-calendar-vertical","src/components/som-calendar-vertical/som-calendar-vertical.tsx","src/components/som-card/som-card.scss?tag=som-card&encapsulation=shadow","src/components/som-card/som-card.tsx","src/components/som-checkbox/som-checkbox.scss?tag=som-checkbox","src/components/som-checkbox/som-checkbox.tsx","src/components/som-checkbox-group/som-checkbox-group.scss?tag=som-checkbox-group","src/components/som-checkbox-group/som-checkbox-group.tsx","src/components/som-collapse/som-collapse.scss?tag=som-collapse","src/components/som-collapse/som-collapse.tsx","src/components/som-content/som-content.scss?tag=som-content&encapsulation=shadow","src/components/som-content/som-content.tsx","src/components/som-date-picker/som-date-picker.scss?tag=som-date-picker","src/components/som-date-picker/som-date-picker.tsx","src/components/som-date-picker-input/som-date-picker-input.scss?tag=som-date-picker-input","src/components/som-date-picker-input/som-date-picker-input.tsx","src/components/som-date-picker-mobile/som-date-picker-mobile.scss?tag=som-date-picker-mobile","src/components/som-date-picker-mobile/som-date-picker-mobile.tsx","src/components/som-date-range-picker/som-date-range-picker.scss?tag=som-date-range-picker","src/components/som-date-range-picker/som-date-range-picker.tsx","src/components/som-date-range-picker-button/som-date-range-picker-button.scss?tag=som-date-range-picker-button","src/components/som-date-range-picker-button/som-date-range-picker-button.tsx","src/components/som-dialog/som-dialog.scss?tag=som-dialog","src/components/som-dialog/som-dialog.tsx","src/components/som-header/som-header.scss?tag=som-header&encapsulation=shadow","src/components/som-header/som-header.tsx","src/sass/components/_icon.scss?tag=som-icon&encapsulation=shadow","src/components/som-icon/som-icon.tsx","src/components/som-input/som-input.scss?tag=som-input","src/components/som-input/som-input.tsx","src/components/som-list/som-list.scss?tag=som-list&encapsulation=shadow","src/components/som-list/som-list.tsx","src/components/som-list-item/som-list-item.scss?tag=som-list-item&encapsulation=scoped","src/components/som-list-item/som-list-item.tsx","src/components/som-list-parent-item/som-list-parent-item.scss?tag=som-list-parent-item&encapsulation=scoped","src/components/som-list-parent-item/som-list-parent-item.tsx","src/utils/bodyScrollLock.ts","src/components/som-modal/som-modal.scss?tag=som-modal","src/components/som-modal/som-modal.tsx","src/components/som-pagination/som-pagination.scss?tag=som-pagination","src/components/som-pagination/som-pagination.tsx","src/components/som-panel/som-panel.scss?tag=som-panel","src/components/som-panel/som-panel.tsx","src/components/som-popover/som-popover.scss?tag=som-popover","src/components/som-popover/som-popover.tsx","src/components/som-radio-button/som-radio-button.scss?tag=som-radio-button","src/components/som-radio-button/som-radio-button.tsx","src/components/som-radio-button-group/som-radio-button-group.scss?tag=som-radio-button-group","src/components/som-radio-button-group/som-radio-button-group.tsx","src/components/som-select/som-select.scss?tag=som-select","src/components/som-select/som-select.tsx","src/components/som-spinner/som-spinner.scss?tag=som-spinner&encapsulation=shadow","src/components/som-spinner/som-spinner.tsx","src/components/som-status-card/som-status-card.scss?tag=som-status-card&encapsulation=shadow","src/components/som-status-card/som-status.card.tsx","src/components/som-tab/som-tab.tsx","src/components/som-tabs/som-tabs.scss?tag=som-tabs","src/components/som-tabs/som-tabs.tsx","src/components/som-textarea/som-textarea.scss?tag=som-textarea","src/components/som-textarea/som-textarea.tsx","src/components/som-toggle/som-toggle.scss?tag=som-toggle","src/components/som-toggle/som-toggle.tsx","src/components/som-tooltip/som-tooltip.scss?tag=som-tooltip","src/components/som-tooltip/som-tooltip.tsx"],"sourcesContent":["@import '../../sass/helpers';\n\n::slotted(som-content) {\n --padding-top: 1rem;\n --padding-left: 1rem;\n --padding-right: 1rem;\n --padding-bottom: 1rem;\n}\n\n.accordion {\n border-bottom: 1px solid $border-color;\n background: transparent;\n\n &--open {\n &.accordion {\n &__button {\n background-color: $light-gray;\n\n // Only add multiply when open but not focused. We don't want to apply multiply to $smoke\n &:not(:focus-visible) {\n mix-blend-mode: multiply;\n }\n }\n }\n }\n &__button {\n display: flex;\n justify-content: space-between;\n align-items: center;\n background: transparent;\n width: 100%;\n padding: 1.5rem 1rem;\n border: none;\n\n &:hover {\n background-color: $smoke;\n cursor: pointer;\n }\n\n &:focus-visible {\n outline: none;\n background-color: $smoke;\n box-shadow: inset 0px 0px 0px 2px $primary;\n cursor: pointer;\n }\n }\n &__headline {\n display: flex;\n align-items: center;\n\n &-icon {\n @include text-type(3);\n color: $primary;\n margin-right: .5rem;\n display: inline-block;\n }\n\n &-label {\n @include font-weight($font-weight-normal);\n @include text-type(4);\n font-family: $font-family-base;\n color: $header-copy;\n padding-right: 1rem;\n text-align: left;\n }\n }\n\n &__icon {\n font-size: 1.5rem;\n color: $primary;\n min-width: 1.5rem;\n }\n &__content {\n display: none;\n }\n}\n","import { Component, Prop, Event, EventEmitter, Method, h } from '@stencil/core';\n\n/**\n * An accordion simplifies the user interface by condensing long content into collapsible content sections.\n */\n/**\n * @part accordion - This part is the full accordion container.\n * @part button - This part is the button that triggers toggling the accordion content.\n * @part button-open - This part is the button that triggers toggling the accordion content in the open state.\n * @part icon - This part is the icon next to the label.\n * @part arrow - This part is the arrow icon that indicates if the accordion is open or closed.\n * @part label - This part is the accordion label.\n */\n@Component({\n tag: 'som-accordion',\n styleUrl: 'som-accordion.scss',\n shadow: true,\n})\nexport class SomAccordion {\n collapseEl;\n buttonEl;\n\n /**\n * This property will be the accordion button label.\n */\n @Prop() label: string;\n\n /**\n * This boolean controls if the accordion is collapsed or expanded.\n */\n @Prop({ reflect: true, mutable: true }) collapsed: boolean = true;\n\n /**\n * The property is the name of an icon that will display before the headline.\n */\n @Prop() icon: string;\n\n /**\n * This event will be triggered any time the accordion is toggled.\n * @Returns `event.detail` will contain the current collapsed state of the accordion.\n */\n @Event({ bubbles: true, composed: true }) accordionToggled: EventEmitter<boolean>;\n\n /**\n * This method will toggle the collapse content. Toggle will show content if it is currently hidden or hide content if it is currently visibile.\n * @returns Promise will resolve after the toggle animation ends.\n */\n @Method()\n toggle(): Promise<void> {\n this.collapsed = !this.collapsed;\n return this.collapseEl.toggle();\n }\n\n /**\n * Show the collapse content regardless of the current state.\n * @returns Promise will resolve after the show animation ends.\n */\n @Method()\n show(): Promise<void> {\n this.collapsed = false;\n return this.collapseEl.show();\n }\n\n /**\n * This method hides content regardless of the current state.\n * @returns Promise will resolve after the hide animation ends.\n */\n\n @Method()\n hide(): Promise<void> {\n this.collapsed = true;\n return this.collapseEl.hide();\n }\n\n async toggleAccordion() {\n this.accordionToggled.emit(this.collapsed);\n await this.toggle();\n }\n\n render() {\n return (\n <div class=\"accordion\" part=\"accordion\">\n <button\n type=\"button\"\n class={`accordion__button ${!this.collapsed ? 'accordion--open' : ''}`}\n aria-expanded={`${!this.collapsed}`}\n onClick={() => this.toggleAccordion()}\n ref={el => (this.buttonEl = el)}\n part={`button ${!this.collapsed ? 'button-open' : ''}`}\n >\n <div class=\"accordion__headline\">\n {(this.icon) ? <span class=\"accordion__headline-icon\" part=\"icon\" innerHTML={`<som-icon name=\"${this.icon}\" display=\"block\"></som-icon>`}></span> : null }\n <span class=\"accordion__headline-label\" part=\"label\">{this.label}</span>\n </div>\n \n <div class=\"accordion__icon\" part=\"arrow\">\n {this.collapsed ? (\n <som-icon name=\"chevron-down\" color=\"primary\" display=\"block\"></som-icon>\n ) : (\n <som-icon name=\"chevron-up\" color=\"primary\" display=\"block\"></som-icon>\n )}\n </div>\n </button>\n <som-collapse collapsed={this.collapsed} ref={el => (this.collapseEl = el)}>\n <div class=\"accordion__content\">\n <slot></slot>\n </div>\n </som-collapse>\n </div>\n );\n }\n}\n","@import '../../sass/helpers';\n\n.accordions {\n border-radius: 2px;\n border: 1px solid $border-color;\n border-bottom:none;\n}","import { Component, Prop, Listen, Element, h } from '@stencil/core';\n\n/**\n * Accordions are a simple wrapper for a group of som-accordion components\n */\n@Component({\n tag: 'som-accordion-group',\n styleUrl: 'som-accordion-group.scss',\n shadow: true,\n})\nexport class SomAccordionGroup {\n @Element() el: HTMLElement;\n\n /**\n * This boolean adds or removes the border for the accordion group.\n */\n @Prop() borders: boolean = false;\n\n /**\n * This boolean determines if multiple accordions can be open at the same time.\n */\n @Prop() singleOpen: boolean = true;\n\n // Listen for when an accordion toggles state and determine if other accordions need to close.\n @Listen('accordionToggled', { target: 'body' })\n accordionToggleHandle(e: UIEvent) {\n const accordions: any[] = Array.from(this.el.children);\n for (let accordion of accordions) {\n\n // This accordion is not the one that triggered the event, is already expanded, and the single open prop is set to true\n if (e.target !== accordion && !accordion.collapsed && this.singleOpen) {\n accordion.hide();\n }\n }\n }\n\n render() {\n return (\n <div class={this.borders ? 'accordions' : ''}>\n <slot></slot>\n </div>\n );\n }\n}\n","@import '../../sass/components/alerts';","import { Component, Prop, Element, Method, Event, EventEmitter, h, Host } from '@stencil/core';\n\n/**\n * Alerts notify the user of important information in a timely and effective manner.\n */\n\n@Component({\n tag: 'som-alert',\n styleUrl: 'som-alert.scss'\n})\nexport class SomAlert {\n @Element() el: HTMLElement;\n\n /**\n * This property styles the component which includes color and default icon.\n */\n @Prop() type: 'success' | 'warning' | 'error' | 'info' = 'success';\n\n /**\n * This property sets the headline of the alert.\n */\n @Prop() headline: string;\n\n /**\n * This boolean sets whether to include an icon or not.\n */\n @Prop() noIcon: boolean = false;\n\n /**\n * This property determines if an alert can be dismissed.\n */\n @Prop() dismissible: boolean = false;\n\n /**\n * This boolean sets the initial state of alert.\n */\n @Prop({ reflect: true }) hidden: boolean = false;\n\n /**\n * This event is emitted when the alert is dismissed.\n */\n @Event() somDismissed!: EventEmitter<void>;\n\n /**\n * This public method is used to show an alert.\n * @returns Promise will resolve after alert is shown.\n */\n @Method()\n async show(): Promise<void> {\n return new Promise(resolve => {\n this.hidden = false;\n resolve();\n });\n }\n\n /**\n * This public method is used to hide an alert.\n * @returns Promise will resolve after alert is hidden.\n */\n @Method()\n async hide(): Promise<void> {\n return new Promise(resolve => {\n this.hidden = true;\n this.somDismissed.emit();\n resolve();\n });\n }\n\n _getDismissProps() {\n let props = {\n 'name': 'icon-cancel',\n 'aria-label': 'dismiss',\n 'color': 'primary',\n 'size': 'md',\n };\n\n switch (this.type.toLowerCase()) {\n case 'success':\n props.color = 'success';\n break;\n case 'warning':\n props.color = 'warning';\n break;\n case 'error':\n props.color = 'danger';\n break;\n case 'info':\n props.color = 'blue';\n default:\n break;\n }\n\n return props;\n }\n\n /**\n * Set the appropriate CSS class\n */\n _getStyles() {\n let alertStyle = ['alert'];\n\n switch (this.type.toLowerCase()) {\n case 'success':\n alertStyle.push('alert-success');\n break;\n case 'warning':\n alertStyle.push('alert-warning');\n break;\n case 'error':\n alertStyle.push('alert-danger');\n break;\n case 'info':\n alertStyle.push('alert-info');\n break;\n default:\n alertStyle.push('alert-success');\n break;\n }\n\n return alertStyle.join(' ');\n }\n\n /**\n * Get properties for <som-icon />\n */\n _getIcon() {\n let icon;\n\n switch (this.type.toLowerCase()) {\n case 'success':\n icon = `<som-icon name=\"checkmark-outline\" display=\"block\"></som-icon>`;\n break;\n case 'warning':\n icon = `<som-icon name=\"warning-alt\" display=\"block\"></som-icon>`;\n break;\n case 'error':\n icon = `<som-icon name=\"error\" display=\"block\"></som-icon>`;\n break;\n case 'info':\n icon = `<som-icon name=\"information\" display=\"block\"></som-icon>`;\n break;\n default:\n icon = `<som-icon name=\"information\" display=\"block\"></som-icon>`;\n break;\n }\n\n return icon;\n }\n\n\n render() {\n return (\n <Host class={`alert-container ${this._getStyles()}-container ${(this.hidden ? 'alert-dismissed' : '')}`}>\n <div class={this._getStyles()} role=\"alert\">\n <div class=\"alert-inner\">\n {!this.noIcon ? <span class={\"icon-container\" + (this.headline ? '' : ' no-headline')} aria-hidden=\"true\" innerHTML={this._getIcon()}></span> : null}\n <div class=\"alert-content\">\n {this.headline ? <div class={\"headline\" + (!this.noIcon ? ' has-icon' : '')}>{this.headline}</div> : null}\n\n {this.el.innerHTML.length > 0 ? (\n <div class={!this.noIcon ? 'has-icon' : ''}>\n <slot />\n </div>\n ) : null}\n </div>\n {this.dismissible ? (\n <button class=\"dismiss\" onClick={() => this.hide()} aria-label=\"Dismiss\">\n <span aria-hidden=\"true\">\n <som-icon name=\"close\" display=\"block\"></som-icon>\n </span>\n </button>\n ) : null}\n </div>\n </div>\n </Host>\n )\n }\n}\n","@import '../../sass/components/badges';\n\n:host(*) {\n line-height: 1.25rem;\n}\n\n:host(.badge-dismissed) {\n display: none!important;\n visibility: hidden!important;\n}\n","import { Component, Prop, Method, Event, EventEmitter, Host, State, h } from '@stencil/core';\n\n/**\n * Badges help draw attention to important content and can provide additional context to UI elements.\n */\n@Component({\n tag: 'som-badge',\n styleUrl: 'som-badge.scss',\n shadow: true,\n})\nexport class SomBadge {\n\n /******\n * PROPS\n ******/\n\n /**\n * This property shows the size of badge.\n */\n @Prop() size: \"xs\" | \"sm\" | \"md\" | \"lg\" = \"md\";\n\n /**\n * This property shows the color of the badge.\n */\n @Prop() color: \"primary\" | \"secondary\" | \"gray\" | \"danger\" | \"warning\" | \"success\" | \"info\" = \"gray\";\n\n /**\n * This property shows the text to be displayed in badge.\n */\n @Prop() label: string;\n\n /**\n * This boolean determines if a badge can be dismissed.\n */\n @Prop() dismissible: boolean = false;\n\n /**\n * This property determines which icon should be used. The property should match an icon name such as `checkmark`.\n */\n @Prop() icon: string;\n\n /**\n * This boolean shows the determines whether to use the light or dark theme.\n */\n @Prop() light: boolean = false;\n\n /**\n * This property overrides the close button aria label.\n */\n @Prop() closeButtonAriaLabel: string = \"dismiss\";\n \n\n\n /*****\n * EVENTS\n *****/\n\n /**\n * This event is emitted when the badge is dismissed.\n */\n @Event() somDismissed!: EventEmitter<void>;\n\n /**\n * State of dismiss\n */\n @State() isHidden: boolean = false;\n\n\n /*******\n * PUBLIC METHODS\n *******/\n\n /**\n * This public method is used to show a badge.\n * @returns Promise will resolve after badge is shown.\n */\n @Method()\n async show(): Promise<void> {\n return new Promise(resolve => {\n this.isHidden = false;\n resolve();\n });\n }\n\n /**\n * This public method is used to hide a badge.\n * @returns Promise will resolve after badge is hidden.\n */\n @Method()\n async hide(): Promise<void> {\n return new Promise(resolve => {\n this.isHidden = true;\n this.somDismissed.emit();\n resolve();\n });\n }\n\n render() {\n return (\n <Host class={`d-inline-block ${(this.isHidden) ? 'badge-dismissed' : ''}`}>\n <span class={`badge badge--${this.size} badge--${this.color} ${(this.dismissible && this.size !== 'xs') ? 'badge--dismissible' : ''} ${this.light ? 'badge--light' : ''}`}>\n <span class='badge__content'>\n {(this.icon && this.size !== 'xs') ? <span class=\"badge__icon\" innerHTML={`<som-icon name=\"${this.icon}\" display=\"block\"></som-icon>`}></span> : null}\n {(this.label) ?\n <span class={`${((this.icon && this.size !== 'xs') ? 'badge__content--icon' : '')} ${((this.dismissible && this.size !== 'xs') ? 'badge__content--dismissible' : '')}`}>\n {this.label}\n </span>\n : null}\n {(this.dismissible && this.size !== 'xs') ?\n <button type=\"button\" class=\"badge__button\" onClick={() => this.hide()} aria-label={this.closeButtonAriaLabel}>\n <som-icon name=\"close\" display=\"block\" aria-hidden=\"true\"></som-icon>\n </button>\n : null}\n </span>\n </span>\n </Host>\n );\n }\n}","//@import '../../sass/components/buttons';\n@import '../../sass/components/spinner';","import { Component, Prop, Element, Event, EventEmitter, State, Host, h } from '@stencil/core';\nimport type { Attributes } from '../../utils/functions';\nimport { inheritAriaAttributes } from '../../utils/functions';\n\n/**\n * Buttons serve as interactive components that perform a specified action when clicked. Buttons should be clear in their function and facilitate simple task completion for the user.\n */\n@Component({\n tag: 'som-button',\n styleUrl: 'som-button.scss',\n scoped: true,\n})\nexport class SomButton {\n\n // Callback when a mutation occured\n handleMutationCb;\n internalButtonEl;\n\n @Element() el: HTMLElement;\n\n /**\n * This boolean property indicates that the user cannot interact with the button. Specifies that a button should be disabled.\n */\n @Prop({ reflect: true }) disabled?: boolean;\n\n /**\n * The type of the button.\n */\n @Prop() type: 'submit' | 'reset' | 'button' = 'button';\n\n /**\n * This property determines the color of the button.\n */\n @Prop() color: 'primary' | 'secondary' | 'white' | 'nav' | 'gray' | 'danger' = 'gray';\n\n /**\n * This property determines the size of the button.\n */\n @Prop() size?: 'sm' | 'md' | 'lg' | 'block' = 'md';\n\n /**\n * This property determines which side of the button the icon should appear\n */\n @Prop() iconPosition?: 'left' | 'right' | 'only' | 'none' = 'none';\n\n /**\n * This property determines which icon to be placed. It should be used in conjunction with iconPosition.\n */\n @Prop() icon?: string;\n\n /**\n * This property determines the button style\n */\n @Prop() buttonType: 'default' | 'outline' | 'clear' = 'default';\n\n /**\n * This property is used to set a specific label for screen reader users. This is helpful when using an icon only button.\n */\n @Prop() buttonAriaLabel?: string = '';\n\n /**\n * This boolean is used to toggle the loading mode.\n */\n @Prop() loading?: boolean = false;\n\n /**\n * This property is used to read a message to screen reader users while the button is loading.\n */\n @Prop() loadingMessage?: string;\n\n // Observer is a state variable to be copied in dev.\n @State() observer: MutationObserver; \n\n /**\n * This event is emitted when the button has focus.\n */\n @Event() somFocus!: EventEmitter<void>;\n\n /**\n * This event is emitted when the button loses focus.\n */\n @Event() somBlur!: EventEmitter<void>;\n\n private onFocus = () => {\n this.somFocus.emit();\n };\n\n private onBlur = () => {\n this.somBlur.emit();\n };\n\n clickHandler(e) {\n if(this.disabled || this.loading) {\n e.preventDefault();\n e.stopPropagation();\n }\n }\n\n private inheritedAttributes: Attributes = {};\n\n // Any change to an attribute on `som-button` will be reflected on the internal button\n handleMutation(mutations) {\n // Disable observer while refresh is in action\n this.disconnectObserver();\n\n mutations.forEach((mutation) => {\n if (mutation.type === 'attributes' && mutation.attributeName in this.inheritedAttributes) {\n this.internalButtonEl.setAttribute(mutation.attributeName, mutation.target.getAttribute(mutation.attributeName))\n }\n })\n\n // Re-enable observer\n this.connectObserver();\n }\n\n disconnectObserver() {\n if (this.observer)\n this.observer.disconnect();\n }\n\n connectObserver() {\n this.observer.observe(this.el, {\n attributes: true\n });\n }\n\n componentWillLoad() {\n const colors = ['primary', 'secondary', 'white', 'nav', 'gray', 'danger']\n if (!colors.includes(this.color)) {\n this.color = 'gray'\n }\n\n this.inheritedAttributes = inheritAriaAttributes(this.el);\n if (this.observer) {\n // Hot module replacement hack. Since Stencil's HMR doesn't call componentDidUnload,\n // the observer is not cleaned when hot reloaded. Since the observer is @State-decorated,\n // it gets copied to the new reloaded component. Thus, if it exists here, we can\n // disconnect if it was already observing.\n // References:\n // https://stencil-worldwide.slack.com/archives/C79EANFL7/p1550850171105200\n // https://github.com/ionic-team/stencil/issues/1316\n this.disconnectObserver();\n }\n\n this.handleMutationCb = this.handleMutation.bind(this);\n this.observer = new MutationObserver(this.handleMutationCb); \n }\n\n componentDidLoad() {\n this.connectObserver();\n }\n\n disconnectedCallback() {\n this.disconnectObserver();\n }\n\n _getStyle() {\n let css = [`btn btn-${this.size}`];\n\n this.buttonType === 'default' ? css.push(`btn-${this.color}`) : null;\n this.buttonType === 'outline' ? css.push(`btn-outline-${this.color}`) : null;\n this.buttonType === 'clear' ? css.push(`btn-link-${this.color}`) : null;\n\n if (this.iconPosition !== 'none') {\n this.iconPosition.toLowerCase() === 'only' ? css.push(`btn-icon btn-${this.color}`) : css.push(`btn-icon-${this.iconPosition} btn-${this.color}`);\n }\n\n this.loading ? css.push('loading') : null;\n this.disabled ? css.push(`disabled`) : null;\n\n return css.join(' ');\n }\n\n getIcon() {\n return `<som-icon name=\"${this.icon}\" display=\"block\"></som-icon>`;\n }\n \n render() {\n const {\n inheritedAttributes,\n } = this;\n\n return (\n <Host>\n <button\n ref={(el) => { this.internalButtonEl = el}}\n class={this._getStyle()}\n type={this.type}\n aria-label={this.buttonAriaLabel || null}\n aria-disabled={this.disabled || this.loading ? 'true' : 'false'}\n tabindex=\"0\"\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onClick={(e) => this.clickHandler(e)}\n {...inheritedAttributes}>\n <span class=\"sr-only\" role=\"alert\" aria-live=\"assertive\">\n {this.loading ? this.loadingMessage : null}\n </span>\n <div class=\"spinner-container\" style={this.loading ? { visibility: 'visible', display: 'block' } : { visibility: 'hidden', display: 'none' }}>\n <som-spinner></som-spinner>\n </div> \n <div class=\"btn-content\" style={this.loading ? { visibility: 'hidden' } : { visibility: 'visible' }}>\n {this.iconPosition === 'left' && <span class={`icon-${this.size} icon-left`} innerHTML={`<som-icon name=\"${this.icon}\" display=\"block\"></som-icon>`}></span>}\n {this.iconPosition === 'only' ? <span innerHTML={`<som-icon name=\"${this.icon}\" display=\"block\"></som-icon>`}></span> : <slot></slot>}\n {this.iconPosition === 'right' && <span class={`icon-${this.size} icon-right`} innerHTML={`<som-icon name=\"${this.icon}\" display=\"block\"></som-icon>`}></span>}\n </div>\n </button>\n </Host>\n );\n }\n}","// This is so the button height is correctly calculated in som-popover\nsom-button {\n display: inline-block;\n}\n\n.chevron-icon {\n margin-left: .5rem;\n}","import { Component, Prop, State, Listen, Host, h, Method } from '@stencil/core';\nimport { generateId } from '../../utils/functions';\n\n/**\n * Button Dropdowns control overlays for displaying lists of links. These can be used to add contextual menus to different areas of an application.\n */\n@Component({\n tag: 'som-button-dropdown',\n styleUrl: 'som-button-dropdown.scss',\n scoped: true,\n})\nexport class SomButtonDropdown {\n popoverId = generateId('som-button-dropdown-popover');\n buttonId = generateId('som-button-dropdown');\n\n buttonEl: HTMLSomButtonElement;\n popoverEl: HTMLSomPopoverElement;\n\n /**\n * This property determines the button style.\n */\n @Prop() buttonType: 'default' | 'outline' | 'clear' = 'default'; \n\n /**\n * This attribute controls the color of the button.\n */\n @Prop() color: 'primary' | 'secondary' | 'white' | 'nav' | 'gray' | 'danger' = 'gray';\n\n /**\n * This attribute controls the size of the button.\n */\n @Prop() size?: 'sm' | 'md' | 'lg' | 'block' = 'md';\n\n /**\n * This property will toggle the open state.\n */\n @Prop({ mutable: true, reflect: true }) collapsed: boolean = true;\n\n /**\n * This property determines which icon to be placed. It should be used in conjunction with iconPosition.\n */\n @Prop() icon?: string;\n\n /**\n * This attribute controls the text displayed inside the button.\n */\n @Prop() buttonText: string = '';\n\n /**\n * This property is used to set the button as disabled.\n */\n @Prop() disabled = false;\n\n /**\n * This property can be used to set the ARIA label associated with this input (for screen readers).\n */\n @Prop() buttonAriaLabel = '';\n\n /**\n * This property controls the horizontal position of the overlay.\n */\n @Prop() horizontalPosition: 'left' | 'right' = 'left';\n\n /**\n * The property controls the vertical position of the overlay.\n */\n @Prop() verticalPosition: 'top' | 'bottom' = 'bottom';\n\n\n @State() expanded: boolean = false;\n\n @Listen('blur', { target: 'window', capture: true })\n handleWindowBlur(e) {\n if (this.buttonEl === document.activeElement) {\n // Focus is removed from the page (i.e. user views another browser tab). We don't want to trigger an input focus.\n e.stopPropagation();\n e.preventDefault();\n }\n }\n\n @Listen('focus', { target: 'window', capture: true })\n handleWindowFocus(e) {\n if (this.buttonEl === document.activeElement) {\n // Focus is given to the page (i.e. user comes back from another browser tab). We don't want to trigger an input focus.\n e.stopPropagation();\n e.preventDefault();\n }\n }\n\n /**\n * This method will open the popover.\n */\n @Method()\n open(): Promise<void> {\n this.collapsed = false;\n return this.popoverEl.open();\n }\n\n /**\n * This method will close the popover.\n */\n @Method()\n close(): Promise<void> {\n this.collapsed = true;\n return this.popoverEl.close();\n }\n\n handleButtonBlur() {\n// console.log('Button Blur - Not sure what to do here');\n }\n\n handleButtonClick() {\n this.expanded = !this.expanded;\n this.popoverEl.show = !this.popoverEl.show;\n }\n\n handlePopoverClose() {\n // Popover closed\n }\n\n componentDidLoad() {\n !this.collapsed && this.open();\n }\n\n render() {\n const ariaDisabled = this.disabled ? { 'aria-disabled': '' } : null;\n return ( \n <Host>\n <som-button\n id={this.buttonId}\n type=\"button\"\n color={this.color}\n size={this.size}\n button-type={this.buttonType}\n disabled={this.disabled}\n icon-position={this.icon ? 'only' : null}\n icon={this.icon ? this.icon : null}\n aria-label={this.buttonAriaLabel}\n aria-expanded={`${this.expanded}`}\n aria-controls={this.popoverId}\n onClick={this.handleButtonClick.bind(this)}\n onBlur={this.handleButtonBlur.bind(this)}\n {...ariaDisabled}\n >\n {(!this.icon) ? [this.buttonText, <span aria-hidden=\"true\" class=\"chevron-icon\"><som-icon name=\"chevron-down\" display=\"block\"></som-icon></span>] : null }\n </som-button>\n <som-popover\n ref={ref => {\n this.popoverEl = ref;\n }}\n id={this.popoverId}\n for={this.buttonId}\n vertical-position={this.verticalPosition}\n horizontal-position={this.horizontalPosition} \n relative-positioning\n onPopoverClosed={this.handlePopoverClose.bind(this)}\n class=\"som-button-dropdown\"\n >\n <slot></slot>\n </som-popover>\n </Host>\n );\n }\n}\n","export const MONTH_NAMES = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n];\n\nexport const WEEKDAY_NAMES = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n\n// Adapted from https://stackoverflow.com/a/6178341/788004\nexport function isValidDate(dateString: string, format: string = 'MM/DD/YYYY') {\n // Making sure it is of right format\n const regexString = new RegExp(`^${format.replace(/MM|DD/g, '(\\\\d{1,2})').replace('YYYY', '(\\\\d{4})')}$`);\n const match = dateString.match(regexString);\n if (!match || match.length !== 4) {\n return false;\n }\n\n // Extract the month, day and year from the string based on the format\n const tokenOrder = ['MM', 'DD', 'YYYY'].sort((a, b) => (\n format.indexOf(a) < format.indexOf(b) ? -1 : 1\n ));\n let monthStr = '';\n let dayStr = '';\n let yearStr = '';\n for (let i = 0; i < tokenOrder.length; i++) {\n if (tokenOrder[i] === 'MM') {\n monthStr = match[i + 1];\n } else if (tokenOrder[i] === 'DD') {\n dayStr = match[i + 1];\n } else if (tokenOrder[i] === 'YYYY') {\n yearStr = match[i + 1];\n }\n }\n\n // Making sure month is within range\n const month = parseInt(monthStr, 10);\n if (month === 0 || month > 12) {\n return false;\n }\n\n // Check for leap years\n const year = parseInt(yearStr, 10);\n const monthLength = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n if (year % 400 === 0 || (year % 100 !== 0 && year % 4 === 0)) {\n monthLength[1] = 29;\n }\n\n const day = parseInt(dayStr, 10);\n return day > 0 && day <= monthLength[month - 1];\n}\n\n// We want to standardize on a date format (MM/DD/YYYY) for internal use\nexport function getInternalFormat(dateStr: string, currentFormat: string) {\n // Making sure it is of right format\n const regexString = new RegExp(`^${currentFormat.replace(/MM|DD/g, '(\\\\d{1,2})').replace('YYYY', '(\\\\d{4})')}$`);\n const match = dateStr.match(regexString);\n\n // Extract the month, day and year from the string based on the format\n const tokenOrder = ['MM', 'DD', 'YYYY'].sort((a, b) => (\n currentFormat.indexOf(a) < currentFormat.indexOf(b) ? -1 : 1\n ));\n let monthStr = '';\n let dayStr = '';\n let yearStr = '';\n for (let i = 0; i < tokenOrder.length; i++) {\n if (tokenOrder[i] === 'MM') {\n monthStr = match[i + 1];\n } else if (tokenOrder[i] === 'DD') {\n dayStr = match[i + 1];\n } else if (tokenOrder[i] === 'YYYY') {\n yearStr = match[i + 1];\n }\n }\n\n return `${monthStr}/${dayStr}/${yearStr}`;\n}\n\nexport function getInternalFormatFromDate(date: Date) {\n return `${date.getMonth() + 1}/${date.getDate()}/${date.getFullYear()}`;\n}\n\nexport function getDateFromInternalFormat(dateStr: string) {\n const [month, day, year] = dateStr.split('/');\n return new Date(parseInt(year, 10), parseInt(month, 10) - 1, parseInt(day, 10));\n}\n\nexport function isDateString(dateText: string, format: string) {\n return dateText && isValidDate(dateText, format);\n}\n\nexport function formatDate(date: Date, format: string) {\n return format\n .replace('MM', `${date.getMonth() + 1}`)\n .replace('DD', `${date.getDate()}`)\n .replace('YYYY', `${date.getFullYear()}`);\n}\n\nexport const getFirstDayOfMonth = (year: number, month: number) => (\n new Date(year, month, 1, 0, 0, 0, 0)\n);\n\nexport const getLastDayOfMonth = (year: number, month: number) => (\n new Date(year, month + 1, 0, 23, 59, 59, 999)\n);\n\nexport const getFirstDayOfMonthWithDate = (date: Date) => (\n getFirstDayOfMonth(date.getFullYear(), date.getMonth())\n);\n\nexport const getLastDayOfMonthWithDate = (date: Date) => (\n getLastDayOfMonth(date.getFullYear(), date.getMonth())\n);\n\n// Checks if two dates have the same date\nexport const isSameDate = (date1: Date, date2: Date) => {\n const year1 = date1.getFullYear();\n const month1 = date1.getMonth();\n const day1 = date1.getDate();\n\n const year2 = date2.getFullYear();\n const month2 = date2.getMonth();\n const day2 = date2.getDate();\n\n return (\n year1 === year2\n && month1 === month2\n && day1 === day2\n );\n};\n\n// Checks if date is between startDate and endDate (inclusively)\nexport const isBetweenDate = (date: Date, startDate: Date, endDate: Date) => {\n const start = new Date(\n startDate.getFullYear(),\n startDate.getMonth(),\n startDate.getDate(),\n 0, 0, 0, 0,\n );\n const end = new Date(\n endDate.getFullYear(),\n endDate.getMonth(),\n endDate.getDate(),\n 23, 59, 59, 999,\n );\n const time = date.getTime();\n return time >= start.getTime() && time <= end.getTime();\n};\n\n// Checks if date1 is before date2\nexport const isBeforeDate = (date1: Date, date2: Date) => {\n const adjustedDate1 = new Date(\n date1.getFullYear(),\n date1.getMonth(),\n date1.getDate(),\n 0, 0, 0, 0,\n );\n const adjustedDate2 = new Date(\n date2.getFullYear(),\n date2.getMonth(),\n date2.getDate(),\n 0, 0, 0, 0,\n );\n return adjustedDate1.getTime() < adjustedDate2.getTime();\n};\n\n// Checks if date1 is after date2\nexport const isAfterDate = (date1: Date, date2: Date) => isBeforeDate(date2, date1);\n\nexport default null;","@import '../../sass/components/calendar';","import { Component, Element, EventEmitter, State, h, Prop, Watch, Listen, Event, Method } from '@stencil/core';\nimport { whichTransitionEvent, focusElement, runAfterNextFrameRender } from '../../utils/functions';\nimport {\n getInternalFormatFromDate,\n getDateFromInternalFormat,\n getFirstDayOfMonth,\n getLastDayOfMonth,\n isBetweenDate,\n getFirstDayOfMonthWithDate,\n isBeforeDate,\n isAfterDate,\n getLastDayOfMonthWithDate,\n isSameDate,\n WEEKDAY_NAMES,\n MONTH_NAMES,\n} from '../../utils/dates';\nimport { KEY_CODES } from '../../utils/variables';\n\nconst ARROW_KEY_CODES = [KEY_CODES.ARROW_LEFT, KEY_CODES.ARROW_UP, KEY_CODES.ARROW_RIGHT, KEY_CODES.ARROW_DOWN];\n\nconst DEFAULT_MONTHS_TO_SHOW = 2;\n\n// These must be in sync with the SCSS variables\nconst MONTH_WIDTH = 301;\nconst MARGIN_BETWEEN_MONTHS = 48;\n// The month header (month title + weekday names) is 44px\nconst HEADER_HEIGHT = 72;\n// A week row is 45px high (43px + 2px margin-top)\nconst WEEK_HEIGHT = MONTH_WIDTH / 7 + 2;\n\n@Component({\n tag: 'som-calendar',\n styleUrl: 'som-calendar.scss',\n})\nexport class SomCalendar {\n static WIDTH = MONTH_WIDTH;\n\n /**\n * Own properties\n */\n\n hovered = false;\n\n hoveredDate: Date | null;\n\n updateInProgress = false;\n\n resetAfterUpdate = false;\n\n focusAfterUpdate = false;\n\n updateHeightAfterUpdate = {\n update: false,\n animate: true,\n };\n\n callbackAfterUpdate = null;\n\n focusableDate = null;\n\n monthsContainerEl: HTMLDivElement;\n\n monthsContentEl: HTMLDivElement;\n\n /**\n * Host HTML element\n */\n\n @Element() el: HTMLElement;\n\n /**\n * State variables\n */\n\n @State() monthObject: Date = null;\n\n @State() minDateObject: Date = null;\n\n @State() maxDateObject: Date = null;\n\n date1Object: Date = null;\n\n date2Object: Date = null;\n\n /**\n * Public properties\n */\n\n @Prop() readonly = false;\n\n @Prop() month: string = null;\n\n @Watch('month')\n handleMonthChange() {\n this.updateMonth();\n }\n\n // Number of months that will be visible.\n @Prop() monthsNb = DEFAULT_MONTHS_TO_SHOW;\n\n @Watch('monthsNb')\n handleMonthsNbChange() {\n this.updateHeight(this.monthObject);\n }\n\n @Prop() minDate: string = null;\n\n @Watch('minDate')\n handleMinDateChange() {\n this.updateMinDate();\n }\n\n @Prop() maxDate: string = null;\n\n @Watch('maxDate')\n handleMaxDateChange() {\n this.updateMaxDate();\n }\n\n @Prop() enableRangePicker = false;\n\n @Watch('enableRangePicker')\n handleRangePickerChange(newValue) {\n if (!newValue) {\n this.date2Object = null;\n }\n }\n\n /**\n * This date variable will hold either:\n * - The picked date when `enableRangePicker === false`\n * - The range's start date when `enableRangePicker === true`\n */\n @Prop({ mutable: true, reflect: true }) date1: string = '';\n\n @Watch('date1')\n handleDate1Change() {\n this.clearHoveredClasses();\n this.updateDate1();\n }\n\n // This date variable will hold the range's end date when `enableRangePicker === true`\n @Prop({ mutable: true, reflect: true }) date2: string = '';\n\n @Watch('date2')\n handleDate2Change() {\n this.clearHoveredClasses();\n this.updateDate2();\n }\n\n /**\n * Events section\n */\n\n @Event() dateChange: EventEmitter;\n\n /**\n * Public methods\n */\n\n @Method() async reset() {\n return new Promise<void>(resolve => {\n // Resolve promise after calendar update is complete\n this.callbackAfterUpdate = () => {\n this.callbackAfterUpdate = null;\n resolve();\n };\n\n this.updateMonth();\n this.resetFocusableDate();\n });\n }\n\n @Method() async setFocus() {\n if (!this.focusableDate) {\n // Set focusable date on the first day of the first month\n this.setFocusableDate(getFirstDayOfMonth(this.monthObject.getFullYear(), this.monthObject.getMonth()));\n } else {\n // Check if date is in viewable months\n const month1 = getFirstDayOfMonth(this.monthObject.getFullYear(), this.monthObject.getMonth());\n const month2 = getLastDayOfMonth(this.monthObject.getFullYear(), this.monthObject.getMonth() + this.monthsNb - 1);\n\n if (!isBetweenDate(this.focusableDate, month1, month2)) {\n // Set focusable date on the first day of the first month\n this.setFocusableDate(getFirstDayOfMonth(this.monthObject.getFullYear(), this.monthObject.getMonth()));\n }\n }\n return this.focusDate();\n }\n\n /**\n * Component lifecycle events\n */\n\n componentWillLoad() {\n this.updateDate1();\n this.updateDate2();\n this.updateMinDate();\n this.updateMaxDate();\n this.updateMonth();\n }\n\n componentDidLoad() {\n this.monthsContainerEl = this.el.querySelector('.dp-months-container');\n this.monthsContentEl = this.el.querySelector('.dp-months-content');\n\n this.updateHeight(this.monthObject);\n this.resetFocusableDate();\n }\n\n componentDidUpdate() {\n if (this.resetAfterUpdate) {\n this.resetAfterUpdate = false;\n\n // Let's put the `left` attribute back to its original position.\n // (since the `transition-left` class is not set at this point, the update will be done without the transition animation)\n this.monthsContentEl.style.left = `-${MONTH_WIDTH + 2 * MARGIN_BETWEEN_MONTHS}px`;\n\n runAfterNextFrameRender(() => {\n // After the left has been instantaneously applied, we add the `transition-left` class to allow future transition animations.\n this.monthsContentEl.classList.add('transition-left');\n this.updateInProgress = false;\n });\n }\n\n this.setFocusableDate(this.focusableDate);\n if (this.focusAfterUpdate) {\n this.focusAfterUpdate = false;\n this.focusDate();\n }\n\n if (this.updateHeightAfterUpdate.update) {\n this.updateHeightAfterUpdate.update = false;\n this.updateHeight(this.monthObject, this.updateHeightAfterUpdate.animate);\n }\n\n if (this.callbackAfterUpdate) {\n // This callback gets called only once\n this.callbackAfterUpdate();\n }\n }\n\n /**\n * Listeners\n */\n\n /**\n * This @Listen('keydown', { target: 'window' }) global listener will be triggered if a keyboard key is pressed.\n * We interecept if an update is in progress and we stop its propagation, avoiding any default browser behavior.\n */\n @Listen('keydown', { target: 'window' })\n handleGlobalKeyDown(e) {\n if (this.updateInProgress) {\n e.preventDefault();\n e.stopPropagation();\n }\n }\n\n /**\n * This @Listen('keydown') will be triggered when the component has focus and a keyboard key is pressed.\n * However, during a transition (keyboard moves to another month), focus is lost by the calendar (to avoid any focus flicker).\n */\n @Listen('keydown')\n async handleKeyDown(e) {\n if (this.updateInProgress) {\n // An update is currently in progress; the keyboard event is silenced.\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n if (ARROW_KEY_CODES.includes(e.keyCode)) {\n // We prevent any other listener to react on the key pressed\n e.preventDefault();\n e.stopPropagation();\n\n if (!this.focusableDate) {\n // Set focusable date on the first day of the first month\n this.setFocusableDate(getFirstDayOfMonth(this.monthObject.getFullYear(), this.monthObject.getMonth()));\n this.focusDate();\n } else {\n const dayEl = this.getDayElement(this.focusableDate);\n if (document.activeElement !== dayEl) {\n // The day element is not already focusable, let's focus it.\n this.setFocusableDate(this.focusableDate);\n this.focusDate();\n } else {\n // The day element is focusable. Let's move according to the arrow that was hit.\n const dateToFocus = new Date(this.focusableDate);\n if (e.keyCode === KEY_CODES.ARROW_LEFT) {\n dateToFocus.setDate(dateToFocus.getDate() - 1);\n } else if (e.keyCode === KEY_CODES.ARROW_RIGHT) {\n dateToFocus.setDate(dateToFocus.getDate() + 1);\n } else if (e.keyCode === KEY_CODES.ARROW_UP) {\n dateToFocus.setDate(dateToFocus.getDate() - 7);\n } else if (e.keyCode === KEY_CODES.ARROW_DOWN) {\n dateToFocus.setDate(dateToFocus.getDate() + 7);\n }\n\n // Check if date is in viewable months\n const month1 = getFirstDayOfMonth(this.monthObject.getFullYear(), this.monthObject.getMonth());\n const month2 = getLastDayOfMonth(this.monthObject.getFullYear(), this.monthObject.getMonth() + this.monthsNb - 1);\n if (isBetweenDate(dateToFocus, month1, month2)) {\n // Date is viewable\n this.setFocusableDate(dateToFocus);\n this.focusDate();\n } else if (isBeforeDate(dateToFocus, month1)) {\n // We need to move to previous month\n this.focusableDate = dateToFocus;\n this.focusAfterUpdate = true;\n await this.transitionToPreviousMonth();\n } else if (isAfterDate(dateToFocus, month2)) {\n // We need to move to next month\n this.focusableDate = dateToFocus;\n this.focusAfterUpdate = true;\n await this.transitionToNextMonth();\n }\n }\n }\n }\n }\n\n /**\n * Local methods\n */\n\n resetFocusableDate() {\n if (this.date1Object && isBetweenDate(this.date1Object, getFirstDayOfMonthWithDate(this.monthObject), getLastDayOfMonthWithDate(this.monthObject))) {\n // Set default focusable date to date1 if given.\n this.setFocusableDate(this.date1Object);\n } else {\n const dateToFocus = this.getFirstFocusableDate(this.monthObject);\n if (dateToFocus) {\n this.setFocusableDate(dateToFocus);\n }\n }\n }\n\n getDayElement(date: Date) {\n return this.el.querySelector(`.dp-day-box[data-date=\"${getInternalFormatFromDate(date)}\"]`) as HTMLDivElement;\n }\n\n removeFocusableDays() {\n // Remove tabindex=\"0\" on day boxes\n const focusableDays = [].slice.call(this.el.querySelectorAll('.dp-day-box[tabindex=\"0\"]'));\n for (let i = 0; i < focusableDays.length; i++) {\n focusableDays[i].tabIndex = -1;\n }\n }\n\n setFocusableDate(date) {\n this.focusableDate = date;\n\n // Set tabindex=\"-1\" to all day boxes that currently have tabindex=\"0\"\n this.removeFocusableDays();\n\n if (date) {\n // Set tabindex=\"0\" to current day box\n const dayEl = this.getDayElement(date);\n if (dayEl) {\n dayEl.tabIndex = 0;\n }\n }\n }\n\n async focusDate(): Promise<void> {\n if (this.focusableDate) {\n const dayEl = this.getDayElement(this.focusableDate);\n if (dayEl) {\n return focusElement(dayEl);\n }\n }\n\n return Promise.resolve();\n }\n\n updateHeight(month, animate = true) {\n const height = `${this.getContainerHeight(month)}px`;\n this.monthsContainerEl.style.height = height;\n if (!animate) {\n this.monthsContainerEl.classList.remove('transition-height');\n runAfterNextFrameRender(() => {\n this.monthsContainerEl.classList.add('transition-height');\n });\n }\n }\n\n updateMonth() {\n const currentMonthObject = this.monthObject;\n this.monthObject = this.month ? getDateFromInternalFormat(this.month) : this.date1Object || new Date();\n\n if (currentMonthObject && isSameDate(currentMonthObject, this.monthObject)) {\n if (this.callbackAfterUpdate) {\n this.callbackAfterUpdate();\n }\n } else {\n this.updateHeightAfterUpdate = {\n update: true,\n animate: false,\n };\n }\n }\n\n updateMinDate() {\n this.minDateObject = this.minDate ? getDateFromInternalFormat(this.minDate) : null;\n }\n\n updateMaxDate() {\n this.maxDateObject = this.maxDate ? getDateFromInternalFormat(this.maxDate) : null;\n }\n\n updateDate1() {\n this.date1Object = this.date1 ? getDateFromInternalFormat(this.date1) : null;\n }\n\n updateDate2() {\n this.date2Object = this.date2 ? getDateFromInternalFormat(this.date2) : null;\n }\n\n clearHoveredClasses() {\n // Remove hovered states\n const selectors = [\n '.dp-day-box.between',\n '.dp-day-box.gradient-end',\n '.dp-day-box.gradient-start',\n '.dp-day-box.boundary-bg',\n '.dp-day-box.boundary-bg-start',\n '.dp-day-box.boundary-bg-end',\n ];\n const hoveredDayEls = Array.prototype.slice.call(this.el.querySelectorAll(selectors.join(',')));\n for (let i = 0; i < hoveredDayEls.length; i++) {\n const hoveredDayEl = hoveredDayEls[i];\n hoveredDayEl.classList.remove('between');\n hoveredDayEl.classList.remove('gradient-end');\n hoveredDayEl.classList.remove('gradient-start');\n hoveredDayEl.classList.remove('boundary-bg');\n hoveredDayEl.classList.remove('boundary-bg-start');\n hoveredDayEl.classList.remove('boundary-bg-end');\n }\n }\n\n setHoveredDate(date: Date) {\n if (this.enableRangePicker) {\n this.hoveredDate = date;\n\n if (this.date1 && !this.date2) {\n this.clearHoveredClasses();\n\n if (date) {\n // First date was selected and user is hovering to choose a second date.\n const firstDayOfRenderedMonths = getFirstDayOfMonthWithDate(this.monthObject);\n const date1IsBefore = isBeforeDate(this.date1Object, firstDayOfRenderedMonths);\n const dateIter = new Date(date1IsBefore ? firstDayOfRenderedMonths : this.date1Object);\n while (!isAfterDate(dateIter, this.hoveredDate)) {\n // Make sure to start with a date displayed\n const dayEl = this.el.querySelector(`.dp-day-box[data-date=\"${getInternalFormatFromDate(dateIter)}\"]`);\n\n if (!isSameDate(dateIter, this.date1Object) && !isSameDate(dateIter, date)) {\n // Day is between the two boundaries\n dayEl.classList.add('between');\n } else if (isSameDate(dateIter, this.date1Object) && !isSameDate(dateIter, date)) {\n // Day is the start boundary\n dayEl.classList.add('boundary-bg');\n dayEl.classList.add('boundary-bg-start');\n } else if (isSameDate(dateIter, date) && !isSameDate(dateIter, this.date1Object)) {\n // Day is the end boundary\n dayEl.classList.add('boundary-bg');\n dayEl.classList.add('boundary-bg-end');\n }\n\n // Update gradient between months\n if (dateIter.getDay() > 0 && isSameDate(dateIter, getFirstDayOfMonthWithDate(dateIter)) && isBeforeDate(this.date1Object, dateIter)) {\n // Current date is first day of the month and hovered date is in next month\n dayEl.previousElementSibling.classList.add('gradient-start');\n } else if (dateIter.getDay() < 6 && isSameDate(dateIter, getLastDayOfMonthWithDate(dateIter)) && isAfterDate(date, dateIter)) {\n // Current date is last day of the month and hovered date is in next month\n dayEl.nextElementSibling.classList.add('gradient-end');\n }\n\n dateIter.setDate(dateIter.getDate() + 1);\n }\n }\n }\n }\n }\n\n waitForTransition() {\n return new Promise<void>(resolve => {\n // Listen for an animation\n const transitionEvent = whichTransitionEvent();\n let onTransitionCompletedCb;\n const onTransitionCompleted = evt => {\n // Make sure to wait for the proper transition event\n if (evt.target.className.split(' ').includes('dp-months-content')) {\n this.monthsContentEl.removeEventListener(transitionEvent, onTransitionCompletedCb);\n resolve();\n }\n };\n onTransitionCompletedCb = onTransitionCompleted.bind(this);\n if (transitionEvent) {\n this.monthsContentEl.addEventListener(transitionEvent, onTransitionCompletedCb);\n }\n });\n }\n\n getContainerHeight(monthDate: Date) {\n const firstDay = getFirstDayOfMonthWithDate(monthDate);\n const lastDay = getLastDayOfMonthWithDate(monthDate);\n\n // Calculates the number of day boxes that are present in the month\n // including the empty boxes that pad the days at the beginning of the month.\n let totalDays = firstDay.getDay() + lastDay.getDate();\n\n for (let i = 1; i < this.monthsNb; i++) {\n const nextMonthFirstDay = getFirstDayOfMonth(monthDate.getFullYear(), monthDate.getMonth() + i);\n const nextMonthLastDay = getLastDayOfMonthWithDate(nextMonthFirstDay);\n\n // Making sure we have the maximum number of days\n totalDays = Math.max(nextMonthFirstDay.getDay() + nextMonthLastDay.getDate(), totalDays);\n }\n\n return HEADER_HEIGHT + Math.ceil(totalDays / 7) * WEEK_HEIGHT;\n }\n\n async transitionToPreviousMonth() {\n if (!this.updateInProgress) {\n this.updateInProgress = true;\n\n /**\n * On initial render, hidden months are also rendered on both sides of the visible months.\n * The style's `left` position is set to its initial position.\n *\n * | Feb 2020 (hidden) | Mar 2020 | Apr 2020 | May 2020 (hidden) |\n * ^\n * left position\n *\n * By changing the style's `left` value to the previous month, the transition animation will move the calendar one month into the past:\n *\n * | Feb 2020 | Mar 2020 | Apr 2020 (hidden) | May 2020 (hidden) |\n * ^\n * left position\n */\n this.monthsContentEl.style.left = `-${MARGIN_BETWEEN_MONTHS}px`;\n\n // The calendar height has to be updated (some months have more weeks to display than others).\n // The `height` transition will occur at the same time as the `left` transition.\n const prevMonth = getFirstDayOfMonth(this.monthObject.getFullYear(), this.monthObject.getMonth() - 1);\n this.updateHeight(prevMonth);\n\n // Days are not going to be focusable while the transition is ongoing (this would cause focus flickering).\n this.removeFocusableDays();\n\n // We wait until the transition caused by changing the `left` style attribute finishes.\n await this.waitForTransition();\n\n /**\n * The transition has ended but the state is like this:\n *\n * | Feb 2020 | Mar 2020 | Apr 2020 (hidden) | May 2020 (hidden) |\n * ^\n * left position\n *\n * However, we want to bring it in this state to be able to continue moving to past months:\n *\n * | Jan 2020 (hidden) | Feb 2020 | Mar 2020 | Apr 2020 (hidden) |\n * ^\n * left position\n *\n * To do this, we need to rerender the months completely. However, since there are animations on the `left` style attribute,\n * we remove the `transition-left` class while the rerendering occurs, so the rerendering of the months is unnoticed.\n */\n this.monthsContentEl.classList.remove('transition-left');\n this.monthObject = prevMonth;\n\n // We set this variable to be used in Stencil's `componentDidUpdate` method to fully complete manipulations after rerendering is completed.\n this.resetAfterUpdate = true;\n }\n }\n\n async transitionToNextMonth() {\n if (!this.updateInProgress) {\n this.updateInProgress = true;\n\n /**\n * On initial render, hidden months are also rendered on both sides of the visible months.\n * The style's `left` position is set to its initial position.\n *\n * | Feb 2020 (hidden) | Mar 2020 | Apr 2020 | May 2020 (hidden) |\n * ^\n * left position\n *\n * By changing the style's `left` value, the transition animation will move the calendar one month into the future:\n *\n * | Feb 2020 (hidden) | Mar 2020 (hidden) | Apr 2020 | May 2020 |\n * ^\n * left position\n */\n this.monthsContentEl.style.left = `-${2 * MONTH_WIDTH + 3 * MARGIN_BETWEEN_MONTHS}px`;\n\n // The calendar height has to be updated (some months have more weeks to display than others).\n // The `height` transition will occur at the same time as the `left` transition.\n const nextMonth = getFirstDayOfMonth(this.monthObject.getFullYear(), this.monthObject.getMonth() + 1);\n this.updateHeight(nextMonth);\n\n // Days are not going to be focusable while the transition is ongoing (this would cause focus flickering).\n this.removeFocusableDays();\n\n // We wait until the transition caused by changing the `left` style attribute finishes.\n await this.waitForTransition();\n\n /**\n * The transition has ended but the state is like this:\n *\n * | Feb 2020 (hidden) | Mar 2020 (hidden) | Apr 2020 | May 2020 |\n * ^\n * left position\n *\n * However, we want to bring it in this state to be able to continue moving to future months:\n *\n * | Mar 2020 (hidden) | Apr 2020 | May 2020 | Jun 2020 (hidden) |\n * ^\n * left position\n *\n * To do this, we need to rerender the months completely. However, since there are animations on the `left` style attribute,\n * we remove the `transition-left` class while the rerendering occurs, so the rerendering of the months is unnoticed.\n */\n this.monthsContentEl.classList.remove('transition-left');\n this.monthObject = nextMonth;\n\n // We set this variable to be used in Stencil's `componentDidUpdate` method to fully complete manipulations after rerendering is completed.\n this.resetAfterUpdate = true;\n }\n }\n\n // Called when user hits a keyboard key while focus is on the previous month button\n handlePreviousKeyDown(e) {\n if ([KEY_CODES.ENTER, KEY_CODES.SPACE].includes(e.keyCode)) {\n e.preventDefault();\n e.stopPropagation();\n this.goToPreviousMonth();\n }\n }\n\n // Called when the previous month button is clicked\n handlePreviousClick(e) {\n e.preventDefault();\n e.stopPropagation();\n this.goToPreviousMonth();\n }\n\n goToPreviousMonth() {\n // Since user is going to previous month, we want the focus to take place in the previous month by setting the focusable date.\n const prevMonth = getFirstDayOfMonth(this.monthObject.getFullYear(), this.monthObject.getMonth() - 1);\n const lastDayOfMonth = getLastDayOfMonthWithDate(prevMonth);\n const dateToFocus = this.focusableDate && isBetweenDate(this.focusableDate, prevMonth, lastDayOfMonth) ? this.focusableDate : prevMonth;\n this.focusableDate = this.getFocusableDate(dateToFocus);\n\n this.transitionToPreviousMonth();\n }\n\n // Called when user hits a keyboard key while focus is on the next month button\n handleNextKeyDown(e) {\n if ([KEY_CODES.ENTER, KEY_CODES.SPACE].includes(e.keyCode)) {\n e.preventDefault();\n e.stopPropagation();\n this.goToNextMonth();\n }\n }\n\n // Called when the next month button is clicked\n handleNextClick(e) {\n e.preventDefault();\n e.stopPropagation();\n this.goToNextMonth();\n }\n\n goToNextMonth() {\n // Since user is going to next month, we want the focus to take place in the next month by setting the focusable date.\n const nextMonth = getFirstDayOfMonth(this.monthObject.getFullYear(), this.monthObject.getMonth() + this.monthsNb);\n const lastDayOfMonth = getLastDayOfMonthWithDate(nextMonth);\n const dateToFocus = this.focusableDate && isBetweenDate(this.focusableDate, nextMonth, lastDayOfMonth) ? this.focusableDate : nextMonth;\n this.focusableDate = this.getFocusableDate(dateToFocus);\n\n this.transitionToNextMonth();\n }\n\n // Called when a day box is focused and a keyboard key is hit\n handleDayKeyDown(e: KeyboardEvent, date: Date) {\n if ([KEY_CODES.ENTER, KEY_CODES.SPACE].includes(e.keyCode)) {\n if (!this.updateInProgress) {\n e.preventDefault();\n e.stopPropagation();\n this.selectDay(date);\n\n this.dateChange.emit({\n date1: this.date1Object,\n date2: this.date2Object,\n });\n }\n }\n }\n\n // Called when a day box is clicked\n handleDayClick(e, date: Date) {\n e.preventDefault();\n e.stopPropagation();\n\n if (!this.updateInProgress) {\n this.selectDay(date, false);\n\n this.dateChange.emit({\n date1: this.date1Object,\n date2: this.date2Object,\n });\n }\n }\n\n selectDay(date, setDayFocus = true) {\n const internalDateFormat = getInternalFormatFromDate(date);\n\n if (this.enableRangePicker) {\n // We are in a date picker, adjust range start + range end dates\n if (!this.date2 && this.date1 && isAfterDate(date, getDateFromInternalFormat(this.date1))) {\n this.date2 = internalDateFormat;\n } else {\n this.date1 = internalDateFormat;\n this.date2 = '';\n }\n } else {\n // We are in a single date picker, let's use the range start date only.\n this.date1 = internalDateFormat;\n }\n\n this.setFocusableDate(date);\n if (setDayFocus) {\n this.focusDate();\n }\n }\n\n formatDayLabel(date) {\n return `${WEEKDAY_NAMES[date.getDay()]}, ${MONTH_NAMES[date.getMonth()]} ${date.getDate()}, ${date.getFullYear()}`;\n }\n\n // Returns date if it's not before min date; returns min date otherwise.\n getFocusableDate(date: Date) {\n return this.minDateObject && isBeforeDate(date, this.minDateObject) && isBetweenDate(this.minDateObject, getFirstDayOfMonthWithDate(date), getLastDayOfMonthWithDate(date))\n ? this.minDateObject\n : date;\n }\n\n // Returns the first focusable date in a month based on the minDate\n getFirstFocusableDate(monthDate: Date) {\n const firstDayOfViewableMonths = getFirstDayOfMonthWithDate(monthDate);\n const lastDayOfViewableMonths = getLastDayOfMonth(monthDate.getFullYear(), monthDate.getMonth() + this.monthsNb - 1);\n\n // Earliest date is either the min date or the first day of the first visible month\n const earliestDate = this.minDateObject && isBeforeDate(firstDayOfViewableMonths, this.minDateObject) ? this.minDateObject : firstDayOfViewableMonths;\n\n // We make sure the earliest date is withing visible displayed months\n if (isBetweenDate(earliestDate, firstDayOfViewableMonths, lastDayOfViewableMonths)) {\n return earliestDate;\n }\n\n return null;\n }\n\n /**\n * Put all days of the months in weeks and pad the remaining days with '0'. Ex.:\n * [\n * [ 0, 0, 0, 1, 2, 3, 4],\n * [ 5, 6, 7, 8, 9, 10, 11],\n * [12, 13, 14, 15, 16, 17, 18],\n * [19, 20, 21, 22, 23, 24, 25],\n * [26, 27, 28, 29, 30, 0, 0]\n * ]\n */\n getWeekArrays(monthDate: Date) {\n const firstDay = getFirstDayOfMonthWithDate(monthDate);\n const lastDay = getLastDayOfMonthWithDate(monthDate);\n const firstWeekDayNb = firstDay.getDay();\n const lastWeekDayNb = lastDay.getDay();\n\n const weeks = [];\n let weekDays = [];\n for (let i = 0; i < firstWeekDayNb; i++) {\n weekDays.push(0);\n }\n for (let i = 1; i <= lastDay.getDate(); i++) {\n weekDays.push(i);\n if (weekDays.length % 7 === 0) {\n weeks.push(weekDays);\n weekDays = [];\n }\n }\n for (let i = 1; i < 7 - lastWeekDayNb; i++) {\n weekDays.push(0);\n }\n if (weekDays.length > 0) {\n weeks.push(weekDays);\n }\n\n return weeks;\n }\n\n renderMonth(monthDate: Date) {\n const year = monthDate.getFullYear();\n const month = monthDate.getMonth();\n const firstDay = getFirstDayOfMonthWithDate(monthDate);\n const lastDay = getLastDayOfMonthWithDate(monthDate);\n const firstWeekDayNb = firstDay.getDay();\n const lastWeekDayNb = lastDay.getDay();\n const weeks = this.getWeekArrays(monthDate);\n\n return (\n <div class=\"dp-month\" tabindex=\"-1\">\n <div class=\"dp-month-name\">\n {MONTH_NAMES[month]} {year}\n </div>\n <div class=\"dp-weeks\">\n {weeks.map((week, weekNb) => (\n <div class=\"dp-week\">\n {week.map((dayNb, weekDayNb) => {\n const date = new Date(year, month, dayNb);\n let isBetween = false;\n let gradientClass = '';\n if (dayNb === 0) {\n if (this.date1Object && this.date2Object) {\n if (weekNb === 0) {\n // This is a padding day box on the first week\n const lastDayOfPreviousMonth = getLastDayOfMonth(year, month - 1);\n const firstDayOfMonth = getFirstDayOfMonth(year, month);\n isBetween = isBetweenDate(lastDayOfPreviousMonth, this.date1Object, this.date2Object) && isBetweenDate(firstDayOfMonth, this.date1Object, this.date2Object);\n\n if (isBetween && weekDayNb === firstWeekDayNb - 1) {\n gradientClass = 'gradient-start';\n }\n } else {\n // This is a padding day box on the last week\n const lastDayOfMonth = getLastDayOfMonth(year, month);\n const firstDayofNextMonth = getFirstDayOfMonth(year, month + 1);\n isBetween = isBetweenDate(lastDayOfMonth, this.date1Object, this.date2Object) && isBetweenDate(firstDayofNextMonth, this.date1Object, this.date2Object);\n\n if (isBetween && weekDayNb === lastWeekDayNb + 1) {\n gradientClass = 'gradient-end';\n }\n }\n }\n\n return <div class={`dp-day-box ${gradientClass}`}></div>;\n }\n\n isBetween = this.date1Object && this.date2Object && isBetweenDate(date, this.date1Object, this.date2Object);\n const isStartSelection = this.date1Object && isSameDate(this.date1Object, date);\n const isEndSelection = this.date2Object && isSameDate(this.date2Object, date);\n const isSelected = isStartSelection || isEndSelection;\n const isDisabled = (this.minDateObject && isBeforeDate(date, this.minDateObject)) || (this.maxDateObject && isAfterDate(date, this.maxDateObject));\n\n let className = '';\n let hoverableClassName = 'hoverable-border';\n if (isSelected) {\n className = 'boundary';\n hoverableClassName = 'hoverable-fill';\n } else {\n if (isBetween) {\n className = 'between';\n }\n\n if (this.enableRangePicker && this.date1Object && !this.date2Object) {\n if (isAfterDate(date, this.date1Object)) {\n hoverableClassName = 'hoverable-fill';\n }\n }\n }\n\n if (this.readonly) {\n // Remove hoverable class when calendar is read only\n hoverableClassName = '';\n }\n\n if (isSelected && this.date1Object && this.date2Object && isAfterDate(this.date2Object, this.date1Object)) {\n className = `${className} boundary-bg-${isStartSelection ? 'start' : 'end'}`;\n }\n\n const classes = `dp-day-box ${className}`;\n return isDisabled ? (\n <div class={`${classes} disabled`} data-date={getInternalFormatFromDate(date)}>\n <div class=\"dp-day\" tabindex=\"-1\" aria-label={this.formatDayLabel(date)}>\n <div class=\"dp-day-inside\">{dayNb > 0 ? dayNb : ''}</div>\n </div>\n </div>\n ) : (\n <div\n class={`${classes} ${hoverableClassName}`}\n onMouseEnter={() => {\n if (!this.readonly && !isDisabled) {\n // Update hovered state\n this.hovered = true;\n this.setHoveredDate(date);\n }\n }}\n onMouseLeave={() => {\n if (!this.readonly && !isDisabled) {\n this.hovered = false;\n runAfterNextFrameRender(() => {\n // We waited after the next frame render to check if we are truly hovered out (and that we did not simply move from one day to another one). This prevents a flicker.\n if (!this.hovered) {\n this.setHoveredDate(null);\n }\n });\n }\n }}\n data-date={getInternalFormatFromDate(date)}\n onKeyDown={e => {\n if (!this.readonly) {\n this.handleDayKeyDown(e, date);\n }\n }}\n tabindex=\"-1\"\n role=\"button\"\n aria-label={this.formatDayLabel(date)}\n >\n <div\n class=\"dp-day\"\n onClick={e => {\n if (!this.readonly) {\n this.handleDayClick(e, date);\n }\n }}\n tabindex=\"-1\"\n >\n <div class=\"dp-day-inside\">{dayNb > 0 ? dayNb : ''}</div>\n </div>\n </div>\n );\n })}\n </div>\n ))}\n </div>\n </div>\n );\n }\n\n renderWeekdays() {\n // The weekday names don't move with the animation and are only rendered on the visible months.\n const weekdays = [];\n for (let i = 0; i < this.monthsNb; i++) {\n weekdays.push(\n <div class=\"dp-weekdays\" style={{ marginLeft: i > 0 ? `${MARGIN_BETWEEN_MONTHS}px` : '0' }}>\n {WEEKDAY_NAMES.map(name => (\n <div class=\"dp-weekday\">{name}</div>\n ))}\n </div>,\n );\n }\n return weekdays;\n }\n\n renderMonths() {\n /**\n * We show months based on `month` and `monthsNb`, and we add hidden months before and after.\n *\n * Ex. `month` is \"Mar 2020\" and `monthsNb` is 2:\n * Feb 2020 (hidden) | Mar 2020 | Apr 2020 | May 2020 (hidden)\n */\n const prevMonth = getFirstDayOfMonth(this.monthObject.getFullYear(), this.monthObject.getMonth() - 1);\n const months = [this.renderMonth(prevMonth)];\n for (let i = 0; i <= this.monthsNb; i++) {\n const month = getFirstDayOfMonth(this.monthObject.getFullYear(), this.monthObject.getMonth() + i);\n months.push(this.renderMonth(month));\n }\n\n return months;\n }\n\n render() {\n return (\n <div class=\"dp-container\" tabindex=\"-1\">\n <div class=\"dp-content\" style={{ width: `${MONTH_WIDTH * this.monthsNb + MARGIN_BETWEEN_MONTHS * (this.monthsNb - 1)}px` }}>\n {/* Previous month action button */}\n <div class=\"dp-prev\" onKeyDown={this.handlePreviousKeyDown.bind(this)} role=\"button\" aria-label=\"Go to previous month\" tabindex=\"0\">\n <div class=\"dp-prev-content\" onClick={this.handlePreviousClick.bind(this)} tabindex=\"-1\">\n <som-icon name=\"chevron-left\" display=\"block\"></som-icon>\n </div>\n </div>\n\n {/* Next month action button */}\n <div class=\"dp-next\" onKeyDown={this.handleNextKeyDown.bind(this)} role=\"button\" aria-label=\"Go to next month\" tabindex=\"0\">\n <div class=\"dp-next-content\" onClick={this.handleNextClick.bind(this)} tabindex=\"-1\">\n <som-icon name=\"chevron-right\" display=\"block\"></som-icon>\n </div>\n </div>\n\n {/* Weekdays names */}\n <div class=\"dp-weekdays-container\">{this.renderWeekdays()}</div>\n\n {/* Months */}\n <div class=\"dp-months-container transition-height\">\n <div class=\"dp-months-content transition-left\" style={{ width: `${MONTH_WIDTH * (2 + this.monthsNb) + (this.monthsNb - 1) * MARGIN_BETWEEN_MONTHS}px` }}>\n {this.renderMonths()}\n </div>\n </div>\n </div>\n </div>\n );\n }\n}\n","@import '../../sass/components/calendar-vertical';\n","import { Component, Element, EventEmitter, State, h, Prop, Watch, Listen, Event, Method } from '@stencil/core';\nimport { focusElement, runAfterNextFrameRender } from '../../utils/functions';\nimport {\n getInternalFormatFromDate,\n getDateFromInternalFormat,\n getFirstDayOfMonth,\n getLastDayOfMonth,\n isBetweenDate,\n getFirstDayOfMonthWithDate,\n isBeforeDate,\n isAfterDate,\n getLastDayOfMonthWithDate,\n isSameDate,\n WEEKDAY_NAMES,\n MONTH_NAMES,\n} from '../../utils/dates';\nimport { KEY_CODES } from '../../utils/variables';\n\nconst ARROW_KEY_CODES = [KEY_CODES.ARROW_LEFT, KEY_CODES.ARROW_UP, KEY_CODES.ARROW_RIGHT, KEY_CODES.ARROW_DOWN];\n\nconst DEFAULT_MONTHS_TO_SHOW = 4;\n\n// These must be in sync with the SCSS variables\nconst MONTH_WIDTH = 301;\n// The month header (month title + weekday names) is 56px\nconst HEADER_HEIGHT = 56;\n// A week row is 45px high (43px + 2px margin-top)\nconst WEEK_HEIGHT = MONTH_WIDTH / 7 + 2;\n\n@Component({\n tag: 'som-calendar-vertical',\n styleUrl: 'som-calendar-vertical.scss',\n})\nexport class SomCalendarVertical {\n static WIDTH = MONTH_WIDTH;\n\n /**\n * Own properties\n */\n\n hovered = false;\n\n hoveredDate: Date | null;\n\n focusAfterUpdate = false;\n\n focusableDate = null;\n\n containerEl: HTMLDivElement;\n\n loadPreviousEl: HTMLDivElement;\n\n /**\n * Host HTML element\n */\n\n @Element() el: HTMLElement;\n\n /**\n * State variables\n */\n\n @State() monthObject: Date = null;\n\n @State() minDateObject: Date = null;\n\n @State() maxDateObject: Date = null;\n\n date1Object: Date = null;\n\n date2Object: Date = null;\n\n /**\n * Public properties\n */\n\n @Prop() readonly = false;\n\n @Prop() month: string = null;\n\n @Watch('month')\n handleMonthChange() {\n this.updateMonth();\n }\n\n // Number of months that will be visible.\n @Prop() monthsNb = DEFAULT_MONTHS_TO_SHOW;\n\n @Prop() minDate: string = null;\n\n @Watch('minDate')\n handleMinDateChange() {\n this.updateMinDate();\n }\n\n @Prop() maxDate: string = null;\n\n @Watch('maxDate')\n handleMaxDateChange() {\n this.updateMaxDate();\n }\n\n @Prop() enableRangePicker = false;\n\n @Watch('enableRangePicker')\n handleRangePickerChange(newValue) {\n if (!newValue) {\n this.date2Object = null;\n }\n }\n\n /**\n * This date variable will hold either:\n * - The picked date when `enableRangePicker === false`\n * - The range's start date when `enableRangePicker === true`\n */\n @Prop() date1: string = null;\n\n @Watch('date1')\n handleDate1Change() {\n this.clearHoveredClasses();\n this.updateDate1();\n }\n\n // This date variable will hold the range's end date when `enableRangePicker === true`\n @Prop() date2: string = null;\n\n @Watch('date2')\n handleDate2Change() {\n this.clearHoveredClasses();\n this.updateDate2();\n }\n\n /**\n * Events section\n */\n\n @Event() dateChange: EventEmitter;\n\n /**\n * Public methods\n */\n\n @Method() async reset() {\n this.updateDate1();\n this.updateDate2();\n this.updateMinDate();\n this.updateMaxDate();\n this.updateMonth();\n\n this.monthsNb = DEFAULT_MONTHS_TO_SHOW;\n this.containerEl.scrollTop = this.loadPreviousEl.offsetHeight;\n }\n\n @Method() async setFocus() {\n if (!this.focusableDate) {\n // Set focusable date on the first day of the first month\n this.setFocusableDate(getFirstDayOfMonth(this.monthObject.getFullYear(), this.monthObject.getMonth()));\n } else {\n // Check if date is in viewable months\n const month1 = getFirstDayOfMonth(this.monthObject.getFullYear(), this.monthObject.getMonth());\n const month2 = getLastDayOfMonth(this.monthObject.getFullYear(), this.monthObject.getMonth() + this.monthsNb - 1);\n\n if (!isBetweenDate(this.focusableDate, month1, month2)) {\n // Set focusable date on the first day of the first month\n this.setFocusableDate(getFirstDayOfMonth(this.monthObject.getFullYear(), this.monthObject.getMonth()));\n }\n }\n return this.focusDate();\n }\n\n /**\n * Component lifecycle events\n */\n\n componentWillLoad() {\n this.updateDate1();\n this.updateDate2();\n this.updateMinDate();\n this.updateMaxDate();\n this.updateMonth();\n }\n\n componentDidLoad() {\n this.resetFocusableDate();\n }\n\n componentDidUpdate() {\n this.setFocusableDate(this.focusableDate);\n if (this.focusAfterUpdate) {\n this.focusAfterUpdate = false;\n this.focusDate();\n }\n }\n\n /**\n * Listeners\n */\n\n /**\n * This @Listen('keydown') will be triggered when the component has focus and a keyboard key is pressed.\n * However, during a transition (keyboard moves to another month), focus is lost by the calendar (to avoid any focus flicker).\n */\n @Listen('keydown')\n async handleKeyDown(e) {\n if (ARROW_KEY_CODES.includes(e.keyCode)) {\n // We prevent any other listener to react on the key pressed\n e.preventDefault();\n e.stopPropagation();\n\n const firstVisibleMonthDay = getFirstDayOfMonthWithDate(this.monthObject);\n const lastVisibleMonthDay = getLastDayOfMonth(this.monthObject.getFullYear(), this.monthObject.getMonth() + this.monthsNb - 1);\n\n if (!this.focusableDate || !isBetweenDate(this.focusableDate, firstVisibleMonthDay, lastVisibleMonthDay)) {\n // Set focusable date on the first day of the first month\n this.setFocusableDate(getFirstDayOfMonth(this.monthObject.getFullYear(), this.monthObject.getMonth()));\n this.focusDate();\n } else {\n const dayEl = this.getDayElement(this.focusableDate);\n if (document.activeElement !== dayEl) {\n // The day element is not already focusable, let's focus it.\n this.setFocusableDate(this.focusableDate);\n this.focusDate();\n } else {\n // The day element is focusable. Let's move according to the arrow that was hit.\n const dateToFocus = new Date(this.focusableDate);\n if (e.keyCode === KEY_CODES.ARROW_LEFT) {\n dateToFocus.setDate(dateToFocus.getDate() - 1);\n } else if (e.keyCode === KEY_CODES.ARROW_RIGHT) {\n dateToFocus.setDate(dateToFocus.getDate() + 1);\n } else if (e.keyCode === KEY_CODES.ARROW_UP) {\n dateToFocus.setDate(dateToFocus.getDate() - 7);\n } else if (e.keyCode === KEY_CODES.ARROW_DOWN) {\n dateToFocus.setDate(dateToFocus.getDate() + 7);\n }\n\n // Check if date is in viewable months\n const month1 = getFirstDayOfMonth(this.monthObject.getFullYear(), this.monthObject.getMonth());\n const month2 = getLastDayOfMonth(this.monthObject.getFullYear(), this.monthObject.getMonth() + this.monthsNb - 1);\n if (isBetweenDate(dateToFocus, month1, month2)) {\n // Date is viewable\n this.setFocusableDate(dateToFocus);\n this.focusDate();\n } else if (isBeforeDate(dateToFocus, month1)) {\n // We need to move to previous month\n this.focusableDate = dateToFocus;\n this.focusAfterUpdate = true;\n\n this.loadPreviousMonths();\n } else if (isAfterDate(dateToFocus, month2)) {\n // We need to move to next month\n this.focusableDate = dateToFocus;\n this.focusAfterUpdate = true;\n\n this.loadNextMonths();\n }\n }\n }\n }\n }\n\n /**\n * Local methods\n */\n\n resetFocusableDate() {\n if (this.date1Object && isBetweenDate(this.date1Object, getFirstDayOfMonthWithDate(this.monthObject), getLastDayOfMonthWithDate(this.monthObject))) {\n // Set default focusable date to date1 if given.\n this.setFocusableDate(this.date1Object);\n } else {\n const dateToFocus = this.getFirstFocusableDate(this.monthObject);\n if (dateToFocus) {\n this.setFocusableDate(dateToFocus);\n }\n }\n }\n\n getDayElement(date: Date) {\n return this.el.querySelector(`.dp-day-box[data-date=\"${getInternalFormatFromDate(date)}\"]`) as HTMLDivElement;\n }\n\n removeFocusableDays() {\n // Remove tabindex=\"0\" on day boxes\n const focusableDays = [].slice.call(this.el.querySelectorAll('.dp-day-box[tabindex=\"0\"]'));\n for (let i = 0; i < focusableDays.length; i++) {\n focusableDays[i].tabIndex = -1;\n }\n }\n\n setFocusableDate(date) {\n this.focusableDate = date;\n\n // Set tabindex=\"-1\" to all day boxes that currently have tabindex=\"0\"\n this.removeFocusableDays();\n\n if (date) {\n // Set tabindex=\"0\" to current day box\n const dayEl = this.getDayElement(date);\n if (dayEl) {\n dayEl.tabIndex = 0;\n }\n }\n }\n\n async focusDate(): Promise<void> {\n if (this.focusableDate) {\n const dayEl = this.getDayElement(this.focusableDate);\n if (dayEl) {\n return focusElement(dayEl);\n }\n }\n\n return Promise.resolve();\n }\n\n updateMonth() {\n this.monthObject = this.month ? getDateFromInternalFormat(this.month) : this.date1Object || new Date();\n }\n\n updateMinDate() {\n this.minDateObject = this.minDate ? getDateFromInternalFormat(this.minDate) : null;\n }\n\n updateMaxDate() {\n this.maxDateObject = this.maxDate ? getDateFromInternalFormat(this.maxDate) : null;\n }\n\n updateDate1() {\n this.date1Object = this.date1 ? getDateFromInternalFormat(this.date1) : null;\n }\n\n updateDate2() {\n this.date2Object = this.date2 ? getDateFromInternalFormat(this.date2) : null;\n }\n\n clearHoveredClasses() {\n // Remove hovered states\n const selectors = [\n '.dp-day-box.between',\n '.dp-day-box.gradient-end',\n '.dp-day-box.gradient-start',\n '.dp-day-box.boundary-bg',\n '.dp-day-box.boundary-bg-start',\n '.dp-day-box.boundary-bg-end',\n ];\n const hoveredDayEls = Array.prototype.slice.call(this.el.querySelectorAll(selectors.join(',')));\n for (let i = 0; i < hoveredDayEls.length; i++) {\n const hoveredDayEl = hoveredDayEls[i];\n hoveredDayEl.classList.remove('between');\n hoveredDayEl.classList.remove('gradient-end');\n hoveredDayEl.classList.remove('gradient-start');\n hoveredDayEl.classList.remove('boundary-bg');\n hoveredDayEl.classList.remove('boundary-bg-start');\n hoveredDayEl.classList.remove('boundary-bg-end');\n }\n }\n\n setHoveredDate(date: Date) {\n if (this.enableRangePicker) {\n this.hoveredDate = date;\n\n if (this.date1 && !this.date2) {\n this.clearHoveredClasses();\n\n if (date) {\n // First date was selected and user is hovering to choose a second date.\n const firstDayOfRenderedMonths = getFirstDayOfMonthWithDate(this.monthObject);\n const date1IsBefore = isBeforeDate(this.date1Object, firstDayOfRenderedMonths);\n const dateIter = new Date(date1IsBefore ? firstDayOfRenderedMonths : this.date1Object);\n while (!isAfterDate(dateIter, this.hoveredDate)) {\n // Make sure to start with a date displayed\n const dayEl = this.el.querySelector(`.dp-day-box[data-date=\"${getInternalFormatFromDate(dateIter)}\"]`);\n\n if (!isSameDate(dateIter, this.date1Object) && !isSameDate(dateIter, date)) {\n // Day is between the two boundaries\n dayEl.classList.add('between');\n } else if (isSameDate(dateIter, this.date1Object) && !isSameDate(dateIter, date)) {\n // Day is the start boundary\n dayEl.classList.add('boundary-bg');\n dayEl.classList.add('boundary-bg-start');\n } else if (isSameDate(dateIter, date) && !isSameDate(dateIter, this.date1Object)) {\n // Day is the end boundary\n dayEl.classList.add('boundary-bg');\n dayEl.classList.add('boundary-bg-end');\n }\n\n // Update gradient between months\n if (dateIter.getDay() > 0 && isSameDate(dateIter, getFirstDayOfMonthWithDate(dateIter)) && isBeforeDate(this.date1Object, dateIter)) {\n // Current date is first day of the month and hovered date is in next month\n dayEl.previousElementSibling.classList.add('gradient-start');\n } else if (dateIter.getDay() < 6 && isSameDate(dateIter, getLastDayOfMonthWithDate(dateIter)) && isAfterDate(date, dateIter)) {\n // Current date is last day of the month and hovered date is in next month\n dayEl.nextElementSibling.classList.add('gradient-end');\n }\n\n dateIter.setDate(dateIter.getDate() + 1);\n }\n }\n }\n }\n }\n\n // Called when a day box is focused and a keyboard key is hit\n handleDayKeyDown(e: KeyboardEvent, date: Date) {\n if ([KEY_CODES.ENTER, KEY_CODES.SPACE].includes(e.keyCode)) {\n e.preventDefault();\n e.stopPropagation();\n this.selectDay(date);\n\n this.dateChange.emit({\n date1: this.date1Object,\n date2: this.date2Object,\n });\n }\n }\n\n // Called when a day box is clicked\n handleDayClick(e, date: Date) {\n e.preventDefault();\n e.stopPropagation();\n\n this.selectDay(date, false);\n\n this.dateChange.emit({\n date1: this.date1Object,\n date2: this.date2Object,\n });\n }\n\n selectDay(date, setDayFocus = true) {\n const internalDateFormat = getInternalFormatFromDate(date);\n\n if (this.enableRangePicker) {\n // We are in a date picker, adjust range start + range end dates\n if (!this.date2 && this.date1 && isAfterDate(date, getDateFromInternalFormat(this.date1))) {\n this.date2 = internalDateFormat;\n } else {\n this.date1 = internalDateFormat;\n this.date2 = '';\n }\n } else {\n // We are in a single date picker, let's use the range start date only.\n this.date1 = internalDateFormat;\n }\n\n this.setFocusableDate(date);\n if (setDayFocus) {\n this.focusDate();\n }\n }\n\n formatDayLabel(date) {\n return `${WEEKDAY_NAMES[date.getDay()]}, ${MONTH_NAMES[date.getMonth()]} ${date.getDate()}, ${date.getFullYear()}`;\n }\n\n getFocusableDate(date: Date) {\n // Return min date if it is in same month\n return this.minDateObject && isBeforeDate(date, this.minDateObject) && isBetweenDate(this.minDateObject, getFirstDayOfMonthWithDate(date), getLastDayOfMonthWithDate(date))\n ? this.minDateObject\n : date;\n }\n\n // Returns the first focusable date in a month based on the minDate\n getFirstFocusableDate(monthDate: Date) {\n const firstDayOfViewableMonths = getFirstDayOfMonthWithDate(monthDate);\n const lastDayOfViewableMonths = getLastDayOfMonth(monthDate.getFullYear(), monthDate.getMonth() + this.monthsNb - 1);\n\n // Earliest date is either the min date or the first day of the first visible month\n const earliestDate = this.minDateObject && isBeforeDate(firstDayOfViewableMonths, this.minDateObject) ? this.minDateObject : firstDayOfViewableMonths;\n\n // We make sure the earliest date is withing visible displayed months\n if (isBetweenDate(earliestDate, firstDayOfViewableMonths, lastDayOfViewableMonths)) {\n return earliestDate;\n }\n\n return null;\n }\n\n renderMonth(monthDate: Date) {\n const year = monthDate.getFullYear();\n const month = monthDate.getMonth();\n const firstDay = getFirstDayOfMonthWithDate(monthDate);\n const lastDay = getLastDayOfMonthWithDate(monthDate);\n const firstWeekDayNb = firstDay.getDay();\n const lastWeekDayNb = lastDay.getDay();\n\n /**\n * Put all days in weeks and pad the remaining days with '0'. Ex.:\n * [ 0, 0, 0, 1, 2, 3, 4]\n * [ 5, 6, 7, 8, 9, 10, 11]\n * [12, 13, 14, 15, 16, 17, 18]\n * [19, 20, 21, 22, 23, 24, 25]\n * [26, 27, 28, 29, 30, 0, 0]\n */\n const weeks = [];\n let weekDays = [];\n for (let i = 0; i < firstWeekDayNb; i++) {\n weekDays.push(0);\n }\n for (let i = 1; i <= lastDay.getDate(); i++) {\n weekDays.push(i);\n if (weekDays.length % 7 === 0) {\n weeks.push(weekDays);\n weekDays = [];\n }\n }\n for (let i = 1; i < 7 - lastWeekDayNb; i++) {\n weekDays.push(0);\n }\n if (weekDays.length > 0) {\n weeks.push(weekDays);\n }\n\n return (\n <div class=\"dp-month\" tabindex=\"-1\">\n <div class=\"dp-month-name\">\n {MONTH_NAMES[month]} {year}\n </div>\n {/* Weekdays names */}\n <div class=\"dp-weekdays-container\">\n <div class=\"dp-weekdays\">\n {WEEKDAY_NAMES.map(name => (\n <div class=\"dp-weekday\">{name}</div>\n ))}\n </div>\n </div>\n <div class=\"dp-weeks\">\n {weeks.map((week, weekNb) => (\n <div class=\"dp-week\">\n {week.map((dayNb, weekDayNb) => {\n const date = new Date(year, month, dayNb);\n let isBetween = false;\n let gradientClass = '';\n if (dayNb === 0) {\n if (this.date1Object && this.date2Object) {\n if (weekNb === 0) {\n // This is a padding day box on the first week\n const lastDayOfPreviousMonth = getLastDayOfMonth(year, month - 1);\n const firstDayOfMonth = getFirstDayOfMonth(year, month);\n isBetween = isBetweenDate(lastDayOfPreviousMonth, this.date1Object, this.date2Object) && isBetweenDate(firstDayOfMonth, this.date1Object, this.date2Object);\n\n if (isBetween && weekDayNb === firstWeekDayNb - 1) {\n gradientClass = 'gradient-start';\n }\n } else {\n // This is a padding day box on the last week\n const lastDayOfMonth = getLastDayOfMonth(year, month);\n const firstDayofNextMonth = getFirstDayOfMonth(year, month + 1);\n isBetween = isBetweenDate(lastDayOfMonth, this.date1Object, this.date2Object) && isBetweenDate(firstDayofNextMonth, this.date1Object, this.date2Object);\n\n if (isBetween && weekDayNb === lastWeekDayNb + 1) {\n gradientClass = 'gradient-end';\n }\n }\n }\n\n return <div class={`dp-day-box ${gradientClass}`}></div>;\n }\n\n isBetween = this.date1Object && this.date2Object && isBetweenDate(date, this.date1Object, this.date2Object);\n const isStartSelection = this.date1Object && isSameDate(this.date1Object, date);\n const isEndSelection = this.date2Object && isSameDate(this.date2Object, date);\n const isSelected = isStartSelection || isEndSelection;\n const isDisabled = (this.minDateObject && isBeforeDate(date, this.minDateObject)) || (this.maxDateObject && isAfterDate(date, this.maxDateObject));\n\n let className = '';\n let hoverableClassName = 'hoverable-border';\n if (isSelected) {\n className = 'boundary';\n hoverableClassName = 'hoverable-fill';\n } else {\n if (isBetween) {\n className = 'between';\n }\n\n if (this.enableRangePicker && this.date1Object && !this.date2Object) {\n if (isAfterDate(date, this.date1Object)) {\n hoverableClassName = 'hoverable-fill';\n }\n }\n }\n\n if (this.readonly) {\n // Remove hoverable class when calendar is read only\n hoverableClassName = '';\n }\n\n if (isSelected && this.date1Object && this.date2Object && isAfterDate(this.date2Object, this.date1Object)) {\n className = `${className} boundary-bg-${isStartSelection ? 'start' : 'end'}`;\n }\n\n const classes = `dp-day-box ${className} ${isDisabled ? 'disabled' : hoverableClassName}`;\n return isDisabled ? (\n <div class={classes} data-date={getInternalFormatFromDate(date)}>\n <div class=\"dp-day\" tabindex=\"-1\" aria-label={this.formatDayLabel(date)}>\n <div class=\"dp-day-inside\">{dayNb > 0 ? dayNb : ''}</div>\n </div>\n </div>\n ) : (\n <div\n class={classes}\n onMouseEnter={() => {\n if (!this.readonly && !isDisabled) {\n // Update hovered state\n this.hovered = true;\n this.setHoveredDate(date);\n }\n }}\n onMouseLeave={() => {\n if (!this.readonly && !isDisabled) {\n this.hovered = false;\n runAfterNextFrameRender(() => {\n /**\n * We waited after the next frame render to check if we are truly hovered out (and that we did not\n * simply move from one day to another one). This prevents a flicker.\n */\n if (!this.hovered) {\n this.setHoveredDate(null);\n }\n });\n }\n }}\n data-date={getInternalFormatFromDate(date)}\n onKeyDown={e => {\n if (!this.readonly) {\n this.handleDayKeyDown(e, date);\n }\n }}\n tabindex=\"-1\"\n role=\"button\"\n aria-label={this.formatDayLabel(date)}\n >\n <div\n class=\"dp-day\"\n onClick={e => {\n if (!this.readonly) {\n this.handleDayClick(e, date);\n }\n }}\n tabindex=\"-1\"\n >\n <div class=\"dp-day-inside\">{dayNb > 0 ? dayNb : ''}</div>\n </div>\n </div>\n );\n })}\n </div>\n ))}\n </div>\n </div>\n );\n }\n\n getContainerHeight(monthDate: Date) {\n const firstDay = getFirstDayOfMonthWithDate(monthDate);\n const lastDay = getLastDayOfMonthWithDate(monthDate);\n\n // Calculates the number of day boxes that are present in the month\n // including the empty boxes that pad the days at the beginning of the month.\n const totalDays = firstDay.getDay() + lastDay.getDate();\n return HEADER_HEIGHT + Math.ceil(totalDays / 7) * WEEK_HEIGHT;\n }\n\n renderMonths() {\n const months = [];\n for (let i = 0; i < this.monthsNb; i++) {\n const month = getFirstDayOfMonth(this.monthObject.getFullYear(), this.monthObject.getMonth() + i);\n months.push(this.renderMonth(month));\n }\n\n return months;\n }\n\n loadPreviousMonths() {\n const newFirstMonth = new Date(this.monthObject);\n newFirstMonth.setMonth(newFirstMonth.getMonth() - DEFAULT_MONTHS_TO_SHOW);\n\n this.monthObject = newFirstMonth;\n this.monthsNb = 2 * DEFAULT_MONTHS_TO_SHOW;\n\n // We calculate the new scroll distance baesed on current scroll value and month heights\n let scrollPos = this.containerEl.scrollTop;\n for (let i = 0; i < DEFAULT_MONTHS_TO_SHOW; i++) {\n const date = getFirstDayOfMonth(this.monthObject.getFullYear(), this.monthObject.getMonth() + i);\n scrollPos += this.getContainerHeight(date);\n }\n\n requestAnimationFrame(() => {\n // Before we actually render the new months (to make sure it happens in the same render frame),\n // we want to update the scrollTop to maek sure we are scrolled to the currently viewed months.\n this.containerEl.scrollTop = scrollPos;\n });\n }\n\n loadNextMonths() {\n if (this.monthsNb > DEFAULT_MONTHS_TO_SHOW) {\n // Calculate height of top months that are going to be removed after loading the new months at the bottom\n let currentDisplayedMonthsHeight = 0;\n for (let i = 0; i < DEFAULT_MONTHS_TO_SHOW; i++) {\n const date = getFirstDayOfMonth(this.monthObject.getFullYear(), this.monthObject.getMonth() + i);\n currentDisplayedMonthsHeight += this.getContainerHeight(date);\n }\n\n // Set new month object\n const newFirstMonth = new Date(this.monthObject);\n newFirstMonth.setMonth(newFirstMonth.getMonth() + DEFAULT_MONTHS_TO_SHOW);\n this.monthObject = newFirstMonth;\n\n // Make sure to update scrollTop when top months will be removed to display the same content.\n const offset = this.containerEl.scrollTop;\n requestAnimationFrame(() => {\n // Before we actually render the new months (to make sure it happens in the same render frame),\n // we want to update the scrollTop to maek sure we are scrolled to the currently viewed months.\n this.containerEl.scrollTop = offset - currentDisplayedMonthsHeight;\n });\n } else {\n // When first rendered, we only display one group of months. When user adds new months, we are displaying twice as many.\n this.monthsNb = 2 * DEFAULT_MONTHS_TO_SHOW;\n }\n }\n\n render() {\n return (\n <div\n ref={ref => {\n this.containerEl = ref;\n }}\n class=\"som-cv-container\"\n tabindex=\"-1\"\n >\n <div\n ref={ref => {\n this.loadPreviousEl = ref;\n }}\n >\n <div class=\"som-cv-more-button\">\n <som-button size=\"sm\" icon-position=\"only\" icon=\"chevron-up\" onClick={this.loadPreviousMonths.bind(this)}>\n </som-button>\n </div>\n </div>\n\n {this.renderMonths()}\n\n <div>\n <div class=\"som-cv-more-button\">\n <som-button size=\"sm\" icon-position=\"only\" icon=\"chevron-down\" onClick={this.loadNextMonths.bind(this)}>\n </som-button>\n </div>\n </div>\n </div>\n );\n }\n}\n","@import '../../sass/components/card';","import { Component, Prop, Listen, Element, Host, h } from '@stencil/core';\nimport { KEY_CODES } from '../../utils/variables';\n\n/**\n * A card is a flexible and extensible content container. It can include a wide variety of content, contextual background colors, and powerful display options.\n */\n@Component({\n tag: 'som-card',\n styleUrl: 'som-card.scss',\n shadow: true\n}) \nexport class SomCard {\n @Element() el: HTMLElement;\n\n /**\n * This property will determine the color applied to the card background and border\n */\n @Prop() color: 'white' | 'light-gray' | 'success' | 'warning' | 'danger' | 'info' | 'transparent' = 'white';\n\n /**\n * This boolean is used to add 100% height to the card which is helpful when you want the card height to expand to match\n * the height of surrounding elements.\n */\n @Prop() matchHeight: boolean = false;\n \n /**\n * The type of card.\n */\n @Prop() type: 'default' | 'button' = 'default';\n\n /**\n * This property can be used to set the ARIA label associated with this card (for screen readers).\n */\n @Prop() buttonAriaLabel: string;\n\n @Listen('keyup')\n handleKeyUp(ev){\n switch (ev.keyCode) {\n case KEY_CODES.ENTER:\n case KEY_CODES.SPACE:\n this.el.click();\n }\n }\n\n getAttrs() {\n let attrs = {};\n\n if (this.type === 'button') {\n attrs['role'] = 'button';\n attrs['tabindex'] = '0';\n attrs['onKeyUp'] = this.handleKeyUp.bind(this);\n attrs['aria-label'] = this.buttonAriaLabel ? this.buttonAriaLabel : null;\n }\n\n return attrs;\n }\n\n render() {\n return (\n <Host \n class={`card-container card-${this.color}-container d-flex ${this.type === 'button' ? 'card-clickable' : ''} ${this.matchHeight ? 'h-100' : ''}`}\n {...this.getAttrs()}\n >\n <div class={`card card-${this.color}`}>\n <slot />\n </div>\n </Host>\n );\n }\n}\n",null,"import { Component, Element, Event, EventEmitter, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { focusElement, generateId, getRequiredInd, isInError } from '../../utils/functions';\n\n/**\n * Checkboxes are used to capture a user choice.\n */\n/**\n * @slot label - Label for the checkbox. Alternatively, you can use the label attribute.\n */\n@Component({\n tag: 'som-checkbox',\n styleUrl: 'som-checkbox.scss',\n})\nexport class SomCheckbox {\n @Element() el: HTMLElement;\n\n /**\n * This property can be used to set a help text.\n */\n @Prop() help: string = '';\n\n /**\n * This property can be used to set an error. If a non-empty string is given, it will be used as the error message.\n */\n @Prop() error: string | null = null;\n\n /**\n * This property is the checkbox label text.\n */\n @Prop() label: string = '';\n\n /**\n * This property will visually hide the label. A label is still required to be provided for screenreader support.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * This property is a list of CSS classes that can be used to style the label. \n * @deprecated with version 4.0.1 release \n */\n @Prop() labelClass: string = '';\n \n /**\n * This property can be used to set the ARIA label associated with this input (for screen readers).\n */\n @Prop() inputAriaLabel: string | null = null;\n\n /**\n * This property is the form element name (used when submitting the form).\n */\n @Prop() name: string = '';\n\n /**\n * This boolean is used to set the toggle as \"checked\".\n */\n @Prop({ mutable: true, reflect: true }) checked: boolean = false;\n\n /**\n * This property is the checkbox value sent on submit when using it in a form.\n */\n @Prop() value: string = '';\n\n /**\n * This boolean is used to set the checkbox as disabled.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * This boolean sets whether the form field is required or not.\n */\n @Prop() required: boolean = false;\n\n /**\n * This property is used to override the required indicator. By default, forms elements will show an `optional` indicator\n * but some forms are better served showing the `required` indicator instead.\n */\n @Prop() requiredInd: 'required' | 'optional' | 'none';\n\n /**\n * This boolean is used if within `som-form-field-group`, this will be set to true by `som-form-field-group`.\n */\n @Prop() hasGroupParent: boolean = false;\n\n /**\n * This property can be used to specifically set an ID to the input field. If an ID is not provided, it will be dynamically generated.\n */\n @Prop() inputId: string = generateId('som-checkbox');\n\n /**\n * This property controls whether the checkbox is in an indeterminate state.\n */\n @Prop({mutable: true}) indeterminate: boolean = false;\n\n /**\n * This property is used to set the tooltip text.\n */\n @Prop() tooltip: string | null = null\n\n /**\n * This event is emitted when when the checkbox gets focus.\n */\n @Event() somFocus: EventEmitter;\n\n /**\n * This event is emitted when when the checkbox loses focus.\n */\n @Event() somBlur: EventEmitter;\n\n /**\n * This event is emitted when the checkbox is toggled.\n */\n @Event() somChange: EventEmitter;\n\n inputElement: HTMLInputElement;\n\n helpElementId: string;\n\n handleFocusCb;\n\n handleBlurCb;\n\n handleChangeCb;\n\n checkboxEl;\n\n @State() groupHelpId: string = '';\n\n @Watch('group-help-id')\n handleGroupHelpIdChange(newVal) {\n this.groupHelpId = newVal;\n }\n\n tooltipID: string = generateId('som-tooltipID-');\n\n /**\n * This public method sets focus to the checkbox element.\n * @returns Promise will resolve after focus.\n */\n @Method()\n async setFocus(): Promise<void> {\n return focusElement(this.inputElement);\n }\n\n handleFocus(e) {\n this.somFocus.emit(e);\n }\n\n handleBlur(e) {\n this.somBlur.emit(e);\n }\n\n handleChange(e) {\n this.checked = this.checkboxEl.checked;\n this.somChange.emit(e);\n }\n\n registerEvents() {\n this.inputElement.addEventListener('focus', this.handleFocusCb);\n this.inputElement.addEventListener('blur', this.handleBlurCb);\n this.inputElement.addEventListener('change', this.handleChangeCb);\n }\n\n unregisterEvents() {\n this.inputElement.removeEventListener('focus', this.handleFocusCb);\n this.inputElement.removeEventListener('blur', this.handleBlurCb);\n this.inputElement.removeEventListener('change', this.handleChangeCb);\n }\n\n componentWillLoad() {\n this.helpElementId = `${this.inputId}-help`;\n this.groupHelpId = this.el.getAttribute('group-help-id');\n\n this.handleFocusCb = this.handleFocus.bind(this);\n this.handleBlurCb = this.handleBlur.bind(this);\n this.handleChangeCb = this.handleChange.bind(this);\n }\n\n componentDidLoad() {\n this.inputElement = this.el.querySelector(`#${this.inputId}`);\n this.registerEvents();\n }\n\n componentWillUnload() {\n this.unregisterEvents();\n }\n\n\n render() {\n const _isInError = isInError(this.error);\n const helpMessage = _isInError ? this.error : this.help;\n const helpElementId = this.groupHelpId || this.help && this.helpElementId;\n const ariaDescribedby = (this.help || this.groupHelpId) ? {'aria-describedby' : helpElementId} : this.error ? {'aria-describedby' : this.helpElementId} : null;\n const _requiredInd = getRequiredInd(h, this.required, this.requiredInd);\n\n let checkbox = (\n <div class={`custom-control custom-checkbox ${this.indeterminate && 'checkbox-indeterminate'} ${_isInError ? 'is-invalid' : ''}`}>\n <input\n id={this.inputId}\n ref={(el) => this.checkboxEl = el}\n class=\"custom-control-input\"\n type=\"checkbox\"\n name={this.name}\n value={this.value}\n disabled={this.disabled}\n checked={this.checked}\n required={this.required}\n aria-required={this.required}\n aria-label={this.inputAriaLabel}\n indeterminate={this.indeterminate}\n {...ariaDescribedby}\n />\n <label class={`custom-control-label ${!this.label ? 'position-absolute' : ''} ${this.labelClass} ${this.hideLabel ? 'sr-only' : ''}`} htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n {_requiredInd}\n </label>\n { this.tooltip ?\n <span>\n <som-button class='tooltip-button' button-aria-label={`${this.label} information`} button-type=\"clear\" icon-position=\"only\" color=\"primary\" icon=\"information\" aria-describedby={this.tooltipID}>\n </som-button>\n <som-tooltip tooltip-id={this.tooltipID}>\n {this.tooltip}\n </som-tooltip>\n </span> : null\n }\n </div>\n );\n\n if (!this.hasGroupParent) {\n // Add 'som-form-field' when not within a parent group\n checkbox = (\n <div class=\"form-group\">\n <slot name=\"content\">{checkbox}</slot>\n {helpMessage ? (\n <small id={this.helpElementId} class={`form-text ${_isInError ? 'text-error' : 'text-muted'}`}>\n {helpMessage}\n </small>\n ) : null}\n </div>\n \n );\n }\n\n return checkbox;\n }\n}\n","// These styles are already imported via form-field-group component\n@import '../../sass/components/form-field-group';\n@import '../../sass/components/form-field';","import { Component, Element, Listen, Prop, Watch, h } from '@stencil/core';\nimport { generateId, getRequiredInd, isInError, ariaDescribedby } from '../../utils/functions';\n\n/**\n * Checkbox groups are used to group multiple checkboxes in a single form field that takes care of the label, help message and error state.\n */\n/**\n * @slot label - Label for the checkbox group. Alternatively, you can use the label attribute.\n */\n@Component({\n tag: 'som-checkbox-group',\n styleUrl: 'som-checkbox-group.scss',\n})\nexport class SomCheckboxGroup {\n @Element() el: HTMLElement;\n\n indeterminateRef: HTMLSomCheckboxElement;\n\n /**\n * This property can be used to set the inline label.\n */\n @Prop() label: string = '';\n\n /**\n * This property will visually hide the label. A label is still required to be provided for screenreader support.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * This property is a list of CSS classes that can be used to style the label. \n * @deprecated with version 4.0.1 release\n */\n @Prop() labelClass?: string = ''; \n\n /**\n * This property can be used to set a help text.\n */\n @Prop() help: string = '';\n\n /**\n * This property can be used to set an error. If a non-empty string is given, it will be used as the error message.\n */\n @Prop({mutable: true}) error: string | null = null;\n\n /**\n * This boolean sets whether the form field group is required or not.\n */\n @Prop() required: boolean = false;\n\n /**\n * This property is used to override the required indicator. By default, forms elements will show an `optional` indicator\n * but some forms are better served showing the `required` indicator instead.\n */\n @Prop() requiredInd: 'required' | 'optional' | 'none'; \n\n /**\n * This boolean sets whether the form field group should display the checkboxes inline or not.\n */\n @Prop() inline: boolean = false;\n\n /**\n * This property controls whether the checkbox is in an indeterminate state.\n */\n @Prop() indeterminate: boolean = false;\n\n /**\n * This property is used to set the tooltip text.\n */\n @Prop() tooltip: string | null = null\n\n groupId: string = generateId('som-checkbox-group');\n\n helpElementId: string;\n\n childrenData: any;\n\n tooltipID: string = generateId('som-tooltipID-');\n\n // Listen to changes on each checkbox\n @Listen('somChange', { target: 'body' })\n updateIndeterminateOption(e: any) {\n const target = e.target;\n \n if (target.nodeName.toLowerCase() !== \"som-checkbox\") {\n return;\n }\n\n if(this.indeterminateRef) {\n if (e.detail.target.id === this.indeterminateRef.inputId) {\n this.toggleIndeterminateOption(e);\n return;\n }\n \n const areAllCheckboxesSelected = Array.from(this.childrenData)\n .filter((checkbox: HTMLSomCheckboxElement) => {\n return checkbox.inputId !== this.indeterminateRef.inputId;\n })\n .filter(\n (checkbox: HTMLSomCheckboxElement) => {\n return checkbox.checked;\n }\n )\n\n this.indeterminateRef.indeterminate = false;\n\n if (areAllCheckboxesSelected.length === this.childrenData.length) {\n this.indeterminateRef.checked = true;\n } else if (areAllCheckboxesSelected.length === 0) {\n this.indeterminateRef.checked = false;\n } else {\n this.indeterminateRef.checked = false;\n this.indeterminateRef.indeterminate = true;\n }\n };\n }\n\n toggleIndeterminateOption(e) {\n const selectAll = e.target.checked;\n const checkboxes: any[] = Array.from(this.childrenData);\n\n checkboxes.forEach(checkbox => {\n checkbox.checked = selectAll;\n })\n\n this.indeterminateRef.indeterminate = false;\n }\n\n @Watch('error')\n handleErrorChange(newVal) {\n if(newVal !== null) {\n Object.values(this.childrenData).map((child: HTMLElement) => {\n child.setAttribute('group-help-id', this.helpElementId);\n })\n\n if(this.indeterminate) {\n this.indeterminateRef.setAttribute('group-help-id', this.helpElementId);\n this.indeterminateRef.querySelector('.custom-control.custom-checkbox').classList.add('is-invalid');\n }\n }\n }\n\n componentWillLoad() {\n this.helpElementId = `${this.groupId}-help`;\n\n // Let each checkbox know that they are part of a group\n for (let i = 0; i < this.el.children.length; i++) {\n const child = this.el.children[i];\n child.setAttribute('has-group-parent', 'true');\n child.setAttribute('required-ind', 'none');\n (this.help || this.error) && child.setAttribute('group-help-id', this.helpElementId);\n\n if (this.required) {\n child.setAttribute('required', 'true');\n }\n }\n }\n\n componentDidLoad() {\n this.childrenData = this.el.querySelector(`#${this.groupId}`).children;\n }\n\n render() {\n const _isInError = isInError(this.error);\n const helpMessage = _isInError ? this.error : this.help;\n const ariaInvalid = _isInError ? { 'aria-invalid': true } : {};\n\n const groupedContentClasses = ['grouped-content'];\n if (_isInError) {\n groupedContentClasses.push('is-invalid');\n }\n if (this.inline) {\n groupedContentClasses.push('grouped-content-inline');\n }\n\n return (\n <fieldset data-role=\"controlgroup\" {...ariaInvalid}>\n \n <legend class={`${this.labelClass} ${this.hideLabel ? 'sr-only' : ''} ${this.indeterminate && 'indeterminate-group d-flex align-items-baseline'}`} {...ariaDescribedby(this.help, this.error, this.helpElementId)}>\n { \n (this.indeterminate) ?\n <som-checkbox\n ref={ref => {\n this.indeterminateRef = ref;\n }}\n required-ind='none'\n label={this.label}\n ></som-checkbox>\n : <slot name=\"label\">{this.label}</slot> \n }\n {getRequiredInd(h, this.required, this.requiredInd)}\n { this.tooltip ?\n <span>\n <som-button class='tooltip-button' button-aria-label={`${this.label} information`} button-type=\"clear\" icon-position=\"only\" color=\"primary\" icon=\"information\" aria-describedby={this.tooltipID}>\n </som-button>\n <som-tooltip horizontal-position='auto' tooltip-id={this.tooltipID}>\n {this.tooltip}\n </som-tooltip>\n </span> : null\n }\n </legend>\n \n <div id={this.groupId} class={`${groupedContentClasses.join(' ')} ${this.indeterminate && 'ml-1'}`}>\n <slot />\n </div>\n {helpMessage ? (\n <small id={this.helpElementId} class={`form-text ${_isInError ? 'text-error' : 'text-muted'}`}>\n {helpMessage}\n </small>\n ) : null}\n </fieldset>\n );\n }\n}\n","som-collapse {\n @mixin transition($name, $duration) {\n -webkit-transition: $name $duration;\n -moz-transition: $name $duration;\n -o-transition: $name $duration;\n transition: $name $duration;\n }\n \n .collapse-content-container {\n @include transition(height, 0.3s);\n \n position: relative; /* Prevents background content from messing with height */\n \n &.overflow-hidden {\n overflow: hidden;\n }\n }\n \n .collapse-content {\n &.display-none {\n display: none;\n }\n }\n \n /*\n User can set the class `d-none` on the child content for the space not to be taken on screen before `som-collapse` resolves.\n This is useful when the Collapse component should be collapsed by default.\n \n Example:\n <som-collapse collapsed=\"true\"> // <---- Collapsed by default\n <div class=\"d-none\"> // <---- Makes child content `display: none`\n Hello world!\n </div>\n </som-collapse>\n \n The following style will change it to `display: block` when component is hydrated.\n */\n &.hydrated {\n .collapse-content > * {\n display: block !important;\n }\n }\n }\n ","import { Component, Element, Method, Prop, Event, EventEmitter, h, Watch } from '@stencil/core';\nimport { whichTransitionEvent } from '../../utils/functions';\n\nconst transitionEvent = whichTransitionEvent();\n\n/**\n * A collapse section simplifies the user interface by condensing long content into collapsible content sections.\n */\n@Component({\n tag: 'som-collapse',\n styleUrl: 'som-collapse.scss',\n})\nexport class SomCollapse {\n @Element() el: HTMLElement;\n\n /**\n * This boolean property that sets the initial state of the collapse element.\n */\n @Prop() collapsed: boolean = false;\n\n /**\n * Event triggered anytime the component is toggled.\n * @Returns `event.detail` will contain the state of the collapse as a `boolean` value.\n */\n @Event() collapseToggled: EventEmitter;\n\n containerElement; // The element where the transition animation occurs.\n\n contentElement;\n\n cancelCallback; // Callback used when a transition is cancelled.\n\n opened; // Keeps track of whether the collapse is opened or not.\n\n height; // Keeps track of current height. Used for (re)rendering.\n\n hidden; // Keeps track of whether content should be hidden. Used for (re)rendering.\n\n overflowHidden; // Keeps track of whether content overflow should be hidden. Used for (re)rendering.\n\n /**\n * This method toggles the collapse content. Toggle will show content if it is currently hidden or hide content if it is currently visibile.\n * @returns Promise will resolve after the toggle animation ends.\n */\n @Method()\n toggle(): Promise<void> {\n return this.toggleCollapse(!this.opened);\n }\n\n /**\n * This method shows the collapse content regardless of the current state.\n * @returns Promise will resolve after the show animation ends.\n */\n @Method()\n show(): Promise<void> {\n return this.toggleCollapse(true);\n }\n\n /**\n * This method hides content regardless of the current state.\n * @returns Promise will resolve after the hide animation ends.\n */\n\n @Method()\n hide(): Promise<void> {\n return this.toggleCollapse(false);\n }\n\n /**\n * DEPRECATED - This method was used to recalculate and update the tab content height.\n * We do not need to call this method anymore since content height is automatically updated internally.\n *\n * @returns Promise\n */\n @Method()\n refresh(): Promise<void> {\n return Promise.resolve();\n }\n\n @Watch('collapsed')\n watchCollapsed(newVal, oldVal) {\n newVal != oldVal && this.toggleCollapse(oldVal);\n }\n\n open(): Promise<void> {\n if (this.cancelCallback) {\n // Make sure to cancel current promise\n this.cancelCallback();\n }\n\n return new Promise((resolve, reject) => {\n this.opened = true;\n\n this.setOverflowHidden(true);\n this.setHidden(false);\n\n // Set container's height to content height for animation to start from its current height to new height.\n this.setHeight(`${this.contentElement.scrollHeight}px`);\n\n this.listenForTransitionEnd(err => {\n // Remove the cancel callback since the transition is completed.\n this.cancelCallback = null;\n\n if (err) {\n // An error occured (i.e. `close()` was called before `open()` could finish)\n return reject(err);\n }\n\n // Transition is done and collapse is opened\n this.setOverflowHidden(false);\n\n // Remove the height used for animation to make sure that collapse's height will adjust if content changes.\n this.setHeight(null);\n\n // Trigger the collapse event and resolve.\n this.collapseToggled.emit('true');\n return resolve();\n });\n });\n }\n\n close(): Promise<void> {\n if (this.cancelCallback) {\n // Make sure to cancel current promise\n this.cancelCallback();\n }\n\n return new Promise((resolve, reject) => {\n this.opened = false;\n\n // Disable overflow when closing since container height will shrink.\n this.setOverflowHidden(true);\n\n // We set the current height in pixel so we can animate.\n this.setHeight(`${this.contentElement.scrollHeight}px`);\n\n requestAnimationFrame(() => {\n // When this code is reached, we are in the Event Loop just before the `px` height style is applied.\n\n // We want the `px` height style to be applied and then have the height be set to `0px` to start the transition animation. This can only be done on next frame.\n requestAnimationFrame(() => {\n // When this code is reached, the `px` height has already been applied. We can set the new height to `0px` to launch the transition animation.\n this.setHeight('0px');\n\n this.listenForTransitionEnd(err => {\n // Remove the cancel callback since the transition is completed.\n this.cancelCallback = null;\n\n if (err) {\n // An error occured (i.e. `open()` was called before `close()` could finish)\n return reject(err);\n }\n\n // Hide the content to prevent tabbing to elements visually hidden.\n this.setHidden(true);\n\n // The collapse was succesfully closed.\n this.collapseToggled.emit('false');\n\n return resolve();\n });\n });\n });\n });\n }\n\n setHeight(height) {\n this.containerElement.style.height = height;\n this.height = height;\n }\n\n setOverflowHidden(overflowHidden) {\n if (overflowHidden) {\n this.containerElement.classList.add('overflow-hidden');\n } else {\n this.containerElement.classList.remove('overflow-hidden');\n }\n this.overflowHidden = overflowHidden;\n }\n\n setHidden(hidden) {\n if (hidden) {\n this.contentElement.classList.add('display-none');\n } else {\n this.contentElement.classList.remove('display-none');\n }\n this.hidden = hidden;\n }\n\n toggleCollapse(show): Promise<void> {\n if (!this.opened && show) {\n // Collapse is closed and we want to open it.\n return this.open();\n }\n\n if (this.opened && !show) {\n // Collapse is opened and we want to close it\n return this.close();\n }\n\n return Promise.resolve();\n }\n\n listenForTransitionEnd(callback) {\n const elem = this.containerElement;\n if (transitionEvent) {\n let onTransitionCompletedCb;\n\n const onTransitionCompleted = event => {\n // We are only reacting to transitions on 'height'\n if (event.propertyName === 'height') {\n // Transition is completed\n elem.removeEventListener(transitionEvent, onTransitionCompletedCb);\n callback();\n }\n };\n onTransitionCompletedCb = onTransitionCompleted.bind(this);\n elem.addEventListener(transitionEvent, onTransitionCompletedCb);\n\n this.cancelCallback = () => {\n // Remove cancel callback since it was just called\n this.cancelCallback = null;\n\n // Remove listeners\n elem.removeEventListener(transitionEvent, onTransitionCompletedCb);\n\n callback('Cancelled');\n };\n }\n }\n\n componentWillLoad() {\n this.opened = !this.collapsed;\n\n if (this.opened) {\n this.overflowHidden = false;\n } else {\n this.height = '0px';\n this.hidden = true;\n }\n }\n\n componentDidLoad() {\n this.containerElement = this.el.querySelector('.collapse-content-container') as HTMLDivElement;\n this.contentElement = this.el.querySelector('.collapse-content') as HTMLDivElement;\n }\n\n render() {\n return (\n <div class={`collapse-content-container ${this.overflowHidden ? 'overflow-hidden' : ''}`} style={{ height: this.height }}>\n <div class={`collapse-content ${this.hidden ? 'display-none' : ''}`}>\n <slot />\n </div>\n </div>\n );\n }\n}\n","@import '../../sass/helpers';\n\n:host {\n /**\n * @prop --padding-top: This style control the top padding of content container.\n */\n --padding-top: 1rem;\n /**\n * @prop --padding-bottom: This style control the bottom padding of content container.\n */\n --padding-bottom: 1rem;\n /**\n * @prop --padding-right: This style control the right padding of content container.\n */\n --padding-right: 1rem;\n /**\n * @prop --padding-left: This style control the left padding of content container.\n */\n --padding-left: 1rem;\n}\n\n.content {\n display: block;\n padding: var(--padding-top) var(--padding-right) var(--padding-bottom) var(--padding-left);\n}\n\n@each $breakpoint in map-keys($grid-breakpoints) {\n @include media-breakpoint-up($breakpoint) {\n $infix: breakpoint-infix($breakpoint, $grid-breakpoints);\n\n @each $prop, $abbrev in (margin: m, padding: p) {\n @each $size, $length in $spacers {\n .#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length !important; }\n .#{$abbrev}t#{$infix}-#{$size},\n .#{$abbrev}y#{$infix}-#{$size} {\n #{$prop}-top: $length !important;\n }\n .#{$abbrev}r#{$infix}-#{$size},\n .#{$abbrev}x#{$infix}-#{$size} {\n #{$prop}-right: $length !important;\n }\n .#{$abbrev}b#{$infix}-#{$size},\n .#{$abbrev}y#{$infix}-#{$size} {\n #{$prop}-bottom: $length !important;\n }\n .#{$abbrev}l#{$infix}-#{$size},\n .#{$abbrev}x#{$infix}-#{$size} {\n #{$prop}-left: $length !important;\n }\n }\n }\n }\n}","import { Component, Prop, Host, h } from '@stencil/core';\n\n/**\n * The card content component is used to add proper padding to a card. \n */\n/**\n * @part content - This part is the full content block.\n */\n@Component({\n tag: 'som-content',\n styleUrl: 'som-content.scss',\n shadow: true\n})\nexport class SomContent {\n\n //TODO: this should link to docs about spacing sizes\n /**\n * This property controls the amount of padding added to the card content.\n */\n @Prop() padding: string;\n\n render() {\n return (\n <Host>\n <div class={`content ${(this.padding) ? `p-${this.padding}` : ''}`} part=\"content\">\n <slot />\n </div>\n </Host>\n );\n }\n}\n","/* som-date-picker */","import { Component, State, Listen, h, Prop, EventEmitter, Event, Method } from '@stencil/core';\nimport { breakpoints } from '../../utils/variables';\nimport { getInternalFormatFromDate } from '../../utils/dates';\n\n// Number of months to display for mobile and desktop\nconst MOBILE_MONTHS_NB = 1;\nconst DESKTOP_MONTHS_NB = 2;\n\n/**\n * A date picker present a calendar to the user making it easy to select a date.\n */\n\n@Component({\n tag: 'som-date-picker',\n styleUrl: 'som-date-picker.scss',\n})\nexport class SomDatePicker {\n resizeTimeout;\n\n updateWidthCb;\n\n calendarEl: HTMLSomCalendarElement | HTMLSomCalendarVerticalElement;\n\n @State() monthsNb = DESKTOP_MONTHS_NB;\n\n /**\n * This property shows the current date selected. You can use this property to set a default date.\n */\n @Prop({ mutable: true, reflect: true }) date: string = '';\n\n /**\n * This property shows the minimum date that can be selected.\n */\n @Prop() minDate: string = '';\n\n /**\n * This property shows the maximum date that can be selected.\n */\n @Prop() maxDate: string = '';\n\n /**\n * When set to `true`, this boolean makes the date picker read only.\n */\n @Prop() readonly = false;\n\n /**\n * This boolean switches the date picker to vertical mode, which lets users go through months by a top-down format.\n */\n @Prop() vertical = false;\n\n\n /**\n * This boolean enables viewing only one month at a time. Display only one month at a time.\n */\n @Prop() singleMonthView: boolean = false;\n\n /**\n * This event is emitted whenever a new date is selected.\n * @Returns `event.detail` will contain the current selected date.\n */\n @Event() dateChange: EventEmitter;\n\n componentWillLoad() {\n this.updateWidthCb = this.updateWidth.bind(this);\n this.updateWidth();\n }\n\n @Listen('resize', { target: 'window' })\n handleWindowResize() {\n clearTimeout(this.resizeTimeout);\n\n // Setup debounce so we're not constantly reading screen width\n this.resizeTimeout = setTimeout(this.updateWidthCb, 300);\n }\n\n /**\n * This method resets the date picker.\n * @returns Promise when date picker has been reset.\n */\n @Method() async reset(): Promise<void> {\n return this.calendarEl.reset();\n }\n\n /**\n * This method sets the focus onto the date picker.\n * @returns Promise when focus has been set.\n */\n @Method() async setFocus(): Promise<void> {\n return this.calendarEl.setFocus();\n }\n\n updateWidth() {\n if (this.singleMonthView) {\n this.monthsNb = 1;\n } else {\n this.monthsNb = (window.innerWidth < breakpoints.lg) ? MOBILE_MONTHS_NB : DESKTOP_MONTHS_NB;\n }\n }\n\n handleDateChange(e: CustomEvent) {\n e.stopPropagation();\n\n this.date = e.detail.date1 ? getInternalFormatFromDate(e.detail.date1) : '';\n\n this.dateChange.emit(e.detail.date1);\n }\n\n render() {\n return this.vertical ? (\n <som-calendar-vertical\n ref={ref => {\n this.calendarEl = ref;\n }}\n enableRangePicker={false}\n readonly={this.readonly}\n date1={this.date} // Expects MM/DD/YYY format\n minDate={this.minDate} // Expects MM/DD/YYY format\n maxDate={this.maxDate} // Expects MM/DD/YYY format\n onDateChange={this.handleDateChange.bind(this)}\n ></som-calendar-vertical>\n ) : (\n <som-calendar\n ref={ref => {\n this.calendarEl = ref;\n }}\n enableRangePicker={false}\n monthsNb={this.monthsNb}\n readonly={this.readonly}\n date1={this.date} // Expects MM/DD/YYY format\n minDate={this.minDate} // Expects MM/DD/YYY format\n maxDate={this.maxDate} // Expects MM/DD/YYY format\n onDateChange={this.handleDateChange.bind(this)}\n ></som-calendar>\n );\n }\n}\n","@import \"../../sass/base/variables\";\n@import \"../../sass/variables/forms\";\n@import \"../../sass/functions\";\n@import '../../sass/components/form-field';\n\n$dp-indicator: url(\"data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='#{$primary}'><path d='M26 4h-4V2h-2v2h-8V2h-2v2H6a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2Zm0 22H6V12h20Zm0-16H6V6h4v2h2V6h8v2h2V6h4Z'/></svg>\") !default;\n\n.som-dpi-input {\n appearance: none;\n background-position: right $input-padding-y center;\n background-repeat: no-repeat;\n background-size: 1.25rem;\n background-image: escape-svg($dp-indicator);\n\n &::placeholder {\n font-size: 0.9rem;\n color: $input-placeholder-color;\n }\n\n &::-ms-clear {\n display: none;\n }\n}\n\n.som-dpi-popover-content {\n padding: 0.625rem;\n}\n","import { Component, Element, Prop, h, Host, Event, EventEmitter, State, Listen, Watch, Method } from '@stencil/core';\nimport { generateId, focusElement, isDescendant, isInError, getRequiredInd, ariaDescribedby } from '../../utils/functions';\nimport { getInternalFormat, getInternalFormatFromDate, isDateString, formatDate } from '../../utils/dates';\nimport { breakpoints, KEY_CODES } from '../../utils/variables';\n\n/**\n * @slot label - Label for the date picker input. Alternatively, you can use the label attribute.\n */\n@Component({\n tag: 'som-date-picker-input',\n styleUrl: 'som-date-picker-input.scss',\n})\nexport class SomDatePickerInput {\n @Element() el: HTMLElement;\n\n resizeTimeout;\n\n updateResponsivenessCb;\n\n inputEl: HTMLInputElement;\n\n popoverEl: HTMLSomPopoverElement;\n\n datePickerMobileEl: HTMLSomDatePickerMobileElement;\n\n datePickerEl: HTMLSomDatePickerElement;\n\n popoverId = generateId('som-date-picker-popover');\n\n helpElementId: string;\n\n tooltipID: string = generateId('som-tooltipID-');\n\n enableInputFocus = true;\n\n // Debounce timeout used to prevent flickering when focus is on input and user focuses out of the browser body content (ex.: URL bar) and clicking back inside the page.\n focusBlurDebounceTimeout;\n\n /**\n * This property sets the input label.\n */\n @Prop() label = '';\n\n /**\n * This property is a list of CSS classes that can be used to style the label. \n * @deprecated with version 4.0.1 release\n */\n @Prop() labelClass: string = '';\n\n /**\n * This property will visually hide the label. A label is still required to be provided for screenreader support.\n */\n @Prop() hideLabel: boolean = false; \n\n /**\n * This property sets the help text rendered below input.\n */\n @Prop() help = '';\n\n /**\n * This property sets the input error message. If a non-empty string is given, it will be used as the error message.\n */\n @Prop({ mutable: true, reflect: true }) error: string | null = null;\n\n /**\n * This boolean sets the input to required.\n */\n @Prop() required = false;\n\n /**\n * This property is used to override the required indicator. By default, forms elements will show an `optional` indicator\n * but some forms are better served showing the `required` indicator instead.\n */\n @Prop() requiredInd: 'required' | 'optional' | 'none'; \n\n /**\n * This property sets the input placeholder text.\n */\n @Prop() placeholder = '';\n\n /**\n * When set to `true`, this boolean ensures that the input will be disabled.\n */\n @Prop() disabled = false;\n\n /**\n * When set to `true`, this boolean ensures that the input will be read only.\n */\n @Prop() readonly = false;\n\n /**\n * This property sets the ARIA label associated with this input.\n */\n @Prop() inputAriaLabel = '';\n\n /**\n * This property sets the input name, used when submitting the form.\n */\n @Prop() name = '';\n\n /**\n * This property sets the value of the input.\n */\n @Prop({ mutable: true, reflect: true }) value = '';\n \n @Watch('value')\n handleValueUpdate(newVal) {\n if (newVal && this.inputEl) {\n this.inputEl.value = newVal;\n this.date = isDateString(this.value, this.format) ? getInternalFormat(this.value, this.format) : '';\n }\n }\n\n /**\n * This property sets the horizontal position of the date picker popover.\n */\n @Prop() horizontalPosition: 'left' | 'right' = 'left';\n\n /**\n * This property sets the vertical position of the date picker popover.\n */\n @Prop() verticalPosition: 'top' | 'bottom' = 'bottom';\n\n /**\n * This property sets the date format.\n */\n @Prop() format: 'MM-DD-YYYY' | 'MM/DD/YYYY' | 'YYYY-MM-DD' | 'YYYY/MM/DD' = 'MM/DD/YYYY';\n\n /**\n * This property can be used to specifically set an ID to the input field. If an ID is not provided, it will be dynamically generated.\n */\n @Prop() inputId: string = generateId('som-date-picker-input'); \n\n /**\n * This property is used to set the tooltip text.\n */\n @Prop() tooltip: string | null = null\n\n /**\n * This boolean displays only one month at a time.\n */\n @Prop() singleMonthView: boolean = false; \n\n @State() date = '';\n\n @State() isMobile = false;\n\n /**\n * This event is fired whenever a new date is selected.\n * @Returns `event.detail` will contain the current selected date.\n */\n @Event() dateChanged: EventEmitter;\n\n @Listen('blur', { target: 'window', capture: true })\n handleWindowBlur(e) {\n if (this.inputEl === document.activeElement) {\n // Focus is removed from the page (i.e. user views another browser tab). We don't want to trigger an input focus.\n e.stopPropagation();\n e.preventDefault();\n }\n }\n\n @Listen('focus', { target: 'window', capture: true })\n handleWindowFocus(e) {\n if (this.inputEl === document.activeElement) {\n // Focus is given to the page (i.e. user comes back from another browser tab). We don't want to trigger an input focus.\n e.stopPropagation();\n e.preventDefault();\n }\n }\n\n @Listen('resize', { target: 'window' })\n handleWindowResize() {\n clearTimeout(this.resizeTimeout);\n\n // Setup debounce so we're not constantly reading screen width\n this.resizeTimeout = setTimeout(this.updateResponsivenessCb, 300);\n }\n\n @Listen('keydown')\n async handleKeyDown(e) {\n if (e.keyCode === KEY_CODES.TAB) {\n const hasFocus = isDescendant(this.popoverEl, document.activeElement);\n if (!hasFocus) {\n this.hideDatePicker();\n }\n } else if (!this.readonly) {\n if (e.keyCode === KEY_CODES.ESC) {\n // For both mobile and desktop\n e.preventDefault();\n this.focusSilently();\n } else if (e.keyCode === KEY_CODES.ARROW_DOWN) {\n // Execute this code if calendar is not already shown\n e.preventDefault();\n\n this.showDatePicker(true);\n\n if (this.datePickerEl) {\n this.datePickerEl.setFocus();\n }\n }\n }\n }\n\n\n /**\n * This method resets the date picker value to null.\n */\n @Method()\n async resetValue() {\n this.inputEl.value = '';\n this.date = '';\n }\n\n componentWillLoad() {\n this.helpElementId = `${this.inputId}-help`;\n \n this.updateResponsivenessCb = this.updateResponsiveness.bind(this);\n\n this.updateResponsiveness();\n\n if (this.value) {\n this.date = isDateString(this.value, this.format) ? getInternalFormat(this.value, this.format) : '';\n }\n }\n\n componentDidLoad() {\n if (this.value) {\n this.inputEl.value = this.value;\n }\n }\n\n updateResponsiveness() {\n this.isMobile = window.innerWidth < breakpoints.md;\n }\n\n async focusSilently() {\n // We put focus on the input\n this.enableInputFocus = false;\n await focusElement(this.inputEl);\n\n // For IE -- Put the re-enable on the top of the stack. This prevents the 'focus' event to be triggered right after the date picker is closed (which would reopen it right away).\n setTimeout(() => {\n this.enableInputFocus = true;\n }, 0);\n }\n\n handleInputFocus() {\n if (this.enableInputFocus) {\n clearTimeout(this.focusBlurDebounceTimeout);\n this.focusBlurDebounceTimeout = setTimeout(() => {\n this.showDatePicker();\n }, 100);\n }\n }\n\n handleInputBlur() {\n if (this.popoverEl) {\n clearTimeout(this.focusBlurDebounceTimeout);\n this.focusBlurDebounceTimeout = setTimeout(() => {\n const hasFocus = isDescendant(this.popoverEl, document.activeElement);\n if (!hasFocus) {\n this.hideDatePicker();\n }\n }, 200);\n }\n }\n\n handleInputClick() {\n this.showDatePicker();\n }\n\n async handleInputText(e) {\n this.focusSilently();\n this.hideDatePicker();\n\n this.value = e.target.value;\n this.date = isDateString(this.value, this.format) ? getInternalFormat(this.value, this.format) : '';\n\n this.dateChanged.emit(this.value);\n }\n\n async handleDateChange(e) {\n this.error = null;\n this.focusSilently();\n this.hideDatePicker();\n\n this.value = formatDate(e.detail, this.format);\n this.date = e.detail ? getInternalFormatFromDate(e.detail) : '';\n\n this.inputEl.value = this.value;\n this.dateChanged.emit(this.value);\n }\n\n handleMobileDateChange(e) {\n this.focusSilently();\n this.hideDatePicker();\n\n const { value1, date1 } = e.detail;\n this.value = value1;\n this.date = date1 ? getInternalFormatFromDate(date1) : '';\n\n this.inputEl.value = this.value;\n this.dateChanged.emit(this.value);\n }\n\n isDatePickerDisplayed() {\n if (this.popoverEl) {\n if (this.popoverEl.hasAttribute('show') && this.popoverEl.getAttribute('show') !== 'false') {\n return true;\n }\n } else if (this.datePickerMobileEl) {\n if (this.datePickerMobileEl.hasAttribute('show') && this.datePickerMobileEl.getAttribute('show') !== 'false') {\n return true;\n }\n }\n\n return false;\n }\n\n async showDatePicker(focusOnShow = false) {\n if (!this.isDatePickerDisplayed()) {\n // Wait for date picker to reset before showing it\n await this.resetDatePicker();\n\n if (this.datePickerMobileEl) {\n this.datePickerMobileEl.setAttribute('focus-input-on-show', focusOnShow ? 'true' : 'false');\n this.datePickerMobileEl.setAttribute('show', 'true');\n } else {\n this.popoverEl.setAttribute('show', 'true');\n }\n }\n }\n\n async resetDatePicker() {\n if (this.datePickerMobileEl) {\n this.datePickerMobileEl.setAttribute('date1', this.date);\n this.datePickerMobileEl.setAttribute('value1', this.value);\n } else if (this.datePickerEl) {\n this.datePickerEl.setAttribute('date', this.date);\n this.datePickerEl.setAttribute('value', this.value);\n }\n\n const datePickerEl = this.datePickerMobileEl || this.datePickerEl;\n return datePickerEl.reset();\n }\n\n hideDatePicker() {\n const el = this.datePickerMobileEl || this.popoverEl;\n el.removeAttribute('show');\n }\n\n handlePopoverClose() {}\n\n handleMobileClose() {\n this.focusSilently();\n }\n\n render() {\n const _isInError = isInError(this.error);\n const ariaInvalid = _isInError ? { 'aria-invalid': '' } : null;\n const ariaRequired = _isInError ? { 'aria-required': '' } : null;\n const ariaReadonly = this.readonly ? { 'aria-readonly': '' } : null;\n const ariaDisabled = this.disabled ? { 'aria-disabled': '' } : null;\n const helpMessage = _isInError ? this.error : this.help;\n const _requiredInd = getRequiredInd(h, this.required, this.requiredInd);\n\n return (\n <Host tabindex=\"-1\">\n <div class=\"form-group\">\n <div>\n <label class={`${this.labelClass} ${this.hideLabel ? 'sr-only' : ''}`} htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n {_requiredInd}\n </label>\n { this.tooltip ?\n <span>\n <som-button class='tooltip-button' button-aria-label={`${this.label} information`} button-type=\"clear\" icon-position=\"only\" color=\"primary\" icon=\"information\" aria-describedby={this.tooltipID}>\n </som-button>\n <som-tooltip tooltip-id={this.tooltipID}>\n {this.tooltip}\n </som-tooltip>\n </span> : null\n }\n </div>\n\n <div slot=\"content\">\n <input\n id={this.inputId}\n ref={ref => {\n this.inputEl = ref;\n }}\n type=\"text\"\n class={`som-dpi-input form-control ${_isInError ? 'is-invalid' : ''}`}\n placeholder={this.placeholder || null}\n name={this.name || null}\n disabled={this.disabled}\n readonly={this.readonly}\n required={this.required}\n aria-label={this.inputAriaLabel || null}\n onClick={this.readonly ? null : this.handleInputClick.bind(this)}\n onFocus={this.readonly ? null : this.handleInputFocus.bind(this)}\n onBlur={this.readonly ? null : this.handleInputBlur.bind(this)}\n onInput={this.readonly ? null : this.handleInputText.bind(this)}\n {...ariaDescribedby(this.help, this.error, this.helpElementId)}\n {...ariaDisabled}\n {...ariaReadonly}\n {...ariaInvalid}\n {...ariaRequired}\n />\n </div>\n \n {helpMessage ? (\n <small id={this.helpElementId} class={`form-text ${_isInError ? 'text-error' : 'text-muted'}`}>\n {helpMessage}\n </small>\n ) : null}\n </div>\n {this.isMobile ? (\n <som-date-picker-mobile\n ref={ref => {\n this.datePickerMobileEl = ref;\n }}\n date1={this.date} // Expects MM/DD/YYY format\n value1={this.value}\n format={this.format}\n onClose={this.handleMobileClose.bind(this)}\n onDatesChanged={this.handleMobileDateChange.bind(this)}\n />\n ) : (\n <som-popover\n ref={ref => {\n this.popoverEl = ref;\n }}\n id={this.popoverId}\n for={this.inputId}\n vertical-position={this.verticalPosition}\n horizontal-position={this.horizontalPosition}\n relative-positioning\n onPopoverClosed={this.handlePopoverClose.bind(this)}\n >\n <div class=\"som-dpi-popover-content\">\n <som-date-picker\n ref={ref => {\n this.datePickerEl = ref;\n }}\n date={this.date} // Expects MM/DD/YYY format\n single-month-view={this.singleMonthView}\n onDateChange={this.handleDateChange.bind(this)}\n ></som-date-picker>\n </div>\n </som-popover>\n )}\n </Host>\n );\n }\n}\n","@import '../../sass/helpers';\n@import '../../sass/base/variables';\n\n@mixin transition($name, $duration, $easing) {\n -webkit-transition: $name $duration $easing;\n -moz-transition: $name $duration $easing;\n -o-transition: $name $duration $easing;\n transition: $name $duration $easing;\n}\n\n$HEADER_HEIGHT: 4.5rem;\n$ACTIONS_HEIGHT: 4rem;\n\n// Used for accessibility\n.visually-hidden {\n clip: rect(1px, 1px, 1px, 1px);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n.visually-hidden:focus {\n clip: auto;\n height: auto;\n overflow: auto;\n position: absolute;\n width: auto;\n}\n\n.som-dpm {\n display: none;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n height: 100%;\n z-index: $datepicker-index;\n}\n\n.som-dpm-container {\n height: 100%;\n position: absolute;\n left: 0;\n right: 0;\n bottom: -100%;\n background-color: $white;\n display: flex;\n flex-direction: column;\n\n @include transition(bottom, 0.2s, ease-in-out);\n}\n\n.som-dpm-header {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: flex-end;\n height: $HEADER_HEIGHT;\n\n .som-dpm-close-button-container {\n position: absolute;\n right: 0;\n top: 0;\n display: flex;\n\n .som-dpm-close-button {\n width: 2.5rem;\n height: 2.5rem;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n }\n\n .som-dpm-input-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n padding-bottom: 0.5rem;\n\n .som-dpm-input-arrow {\n width: 3.125rem;\n display: flex;\n justify-content: center;\n align-items: center;\n color: $navy;\n }\n\n input {\n display: inline-block;\n border-left: 0;\n border-right: 0;\n border-top: 0;\n border-radius: 0;\n padding: 0.5rem;\n width: 8.25rem;\n height: 2rem;\n text-align: center;\n\n &::placeholder {\n font-size: 0.9rem;\n color: #999;\n }\n\n &::-ms-clear {\n display: none;\n }\n }\n }\n}\n\n.som-dpm-calendar {\n display: flex;\n flex: 1;\n justify-content: center;\n border-top: 1px solid #ccc;\n border-bottom: 1px solid #ccc;\n overflow-y: auto;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n}\n\n.som-dpm-actions {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding-left: 1rem;\n padding-right: 1rem;\n height: $ACTIONS_HEIGHT;\n background: #fff;\n}\n","import { Component, Element, h, Prop, Watch, Event, EventEmitter, Host, Listen, Method } from '@stencil/core';\nimport { focusElement, runAfterNextFrameRender, waitForCSSTransitionToFinish } from '../../utils/functions';\nimport { getInternalFormat, getInternalFormatFromDate, getDateFromInternalFormat, isDateString, formatDate, isValidDate } from '../../utils/dates';\nimport { SomCalendar } from '../som-calendar/som-calendar';\nimport { KEY_CODES } from '../../utils/variables';\n\n@Component({\n tag: 'som-date-picker-mobile',\n styleUrl: 'som-date-picker-mobile.scss',\n})\nexport class SomDatePickerMobile {\n focusedElement: HTMLElement = null;\n\n containerEl: HTMLDivElement;\n\n contentContainerEl: HTMLDivElement;\n\n calendarContainerEl: HTMLDivElement;\n\n input1El: HTMLInputElement;\n\n input2El: HTMLInputElement;\n\n datePickerEl: HTMLSomDatePickerElement;\n\n dateRangePickerEl: HTMLSomDateRangePickerElement;\n\n lastBodyOverflowStyle: string;\n\n lastBodyMSOverflowStyle: string;\n\n tmp: {\n date1?: string;\n date2?: string;\n value1?: string;\n value2?: string;\n } = {};\n\n @Element() el: HTMLElement;\n\n @Prop({ mutable: true, reflect: true }) value1 = '';\n\n @Prop({ mutable: true, reflect: true }) value2 = '';\n\n @Prop() focusInputOnShow = false;\n\n @Prop() date1 = '';\n\n @Prop() date2 = '';\n\n @Prop() enableRangePicker = false;\n\n @Prop({ mutable: true, reflect: true }) show = false;\n\n @Watch('show')\n handleShowChange() {\n let callbackAfterCSSTransition = () => {};\n if (this.show) {\n // Save current body overflow style and disable overflow (thus scrolling) on body.\n const bodyEl = document.querySelector('body');\n this.lastBodyOverflowStyle = bodyEl.style.getPropertyValue('overflow');\n bodyEl.style.overflow = 'hidden';\n this.lastBodyMSOverflowStyle = bodyEl.style['-ms-overflow-style'];\n bodyEl.style['-ms-overflow-style'] = 'none';\n\n this.containerEl.style.display = 'block';\n\n runAfterNextFrameRender(() => {\n // Scroll content to the top\n this.contentContainerEl.style.bottom = '0';\n });\n\n callbackAfterCSSTransition = () => {\n if (this.focusInputOnShow) {\n focusElement(this.input1El);\n } else if (this.containerEl) {\n focusElement(this.containerEl);\n }\n };\n } else {\n this.contentContainerEl.style.bottom = '-100%';\n\n this.undoBodyStyling();\n\n callbackAfterCSSTransition = () => {\n this.containerEl.style.display = 'none';\n };\n }\n\n waitForCSSTransitionToFinish(this.contentContainerEl, callbackAfterCSSTransition);\n }\n\n @Prop() format: 'MM-DD-YYYY' | 'MM/DD/YYYY' | 'YYYY-MM-DD' | 'YYYY/MM/DD' = 'MM/DD/YYYY';\n\n @Event() datesChanged: EventEmitter;\n\n @Event() close: EventEmitter;\n\n @Listen('keydown')\n async handleKeyDown(e) {\n if (this.show) {\n switch (e.keyCode) {\n case KEY_CODES.ESC:\n this.handleClose();\n break;\n case KEY_CODES.ARROW_DOWN:\n e.preventDefault();\n this.setDatePickerFocus();\n break;\n case KEY_CODES.TAB:\n {\n e.preventDefault();\n e.stopPropagation();\n const focusableElements = this.getFocusableElements();\n const focusedElementIndex = focusableElements.findIndex(element => element === document.activeElement);\n\n if (focusableElements.length > 0) {\n // Popover is shown, let's capture the tab\n let newIndex = 0;\n if (e.shiftKey) {\n if (focusedElementIndex <= 0) {\n newIndex = focusableElements.length - 1;\n } else {\n newIndex = focusedElementIndex - 1;\n }\n } else {\n newIndex = (focusedElementIndex + 1) % focusableElements.length;\n }\n\n this.focusedElement = focusableElements[newIndex];\n focusElement(this.focusedElement);\n }\n }\n break;\n default:\n break;\n }\n }\n }\n\n // Resets the date picker to its initial state\n @Method() async reset() {\n if (this.dateRangePickerEl) {\n this.dateRangePickerEl.setAttribute('start-date', this.date1);\n this.dateRangePickerEl.setAttribute('end-date', this.date2);\n } else if (this.datePickerEl) {\n this.datePickerEl.setAttribute('date', this.date1);\n }\n\n runAfterNextFrameRender(() => {\n (this.dateRangePickerEl || this.datePickerEl).reset();\n });\n\n // Reset inputs\n this.input1El.value = this.date1 && isValidDate(this.date1) ? formatDate(getDateFromInternalFormat(this.date1), this.format) : '';\n if (this.input2El) {\n this.input2El.value = this.date2 && isValidDate(this.date2) ? formatDate(getDateFromInternalFormat(this.date2), this.format) : '';\n }\n\n return Promise.resolve();\n }\n\n disconnectedCallback() {\n this.undoBodyStyling();\n }\n\n undoBodyStyling() {\n const bodyEl = document.querySelector('body');\n bodyEl.style.overflow = this.lastBodyOverflowStyle || '';\n bodyEl.style['-ms-overflow-style'] = this.lastBodyMSOverflowStyle || '';\n }\n\n setDatePickerFocus() {\n const selector = this.enableRangePicker ? 'som-date-range-picker' : 'som-date-picker';\n const elemToFocus = this.el.querySelector(selector);\n if (elemToFocus) {\n focusElement(elemToFocus);\n }\n return Promise.resolve();\n }\n\n getFocusableElements() {\n return [].slice.call(this.el.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'));\n }\n\n handleClose() {\n this.show = false;\n this.close.emit();\n }\n\n // Date range picker change handler\n handleDateRangeChange(e) {\n e.stopPropagation();\n\n const {\n startDate,\n endDate,\n }: {\n startDate: Date;\n endDate: Date;\n } = e.detail;\n\n this.tmp.value1 = formatDate(startDate, this.format);\n this.tmp.date1 = getInternalFormatFromDate(startDate);\n\n if (endDate) {\n this.tmp.value2 = formatDate(endDate, this.format);\n this.tmp.date2 = getInternalFormatFromDate(endDate);\n } else {\n this.tmp.value2 = '';\n this.tmp.date2 = '';\n }\n\n this.input1El.value = this.tmp.value1;\n if (this.input2El) {\n this.input2El.value = this.tmp.value2;\n }\n }\n\n // Date picker change handler\n handleDateChange(e) {\n e.stopPropagation();\n\n const date: Date = e.detail;\n\n this.tmp.value1 = formatDate(date, this.format);\n this.tmp.date1 = getInternalFormatFromDate(date);\n\n this.input1El.value = this.tmp.value1;\n }\n\n handleInput1Text(e) {\n this.tmp.value1 = e.target.value;\n this.tmp.date1 = isDateString(e.target.value, this.format) ? getInternalFormat(e.target.value, this.format) : '';\n\n if (this.dateRangePickerEl) {\n this.dateRangePickerEl.setAttribute('start-date', this.tmp.date1);\n } else if (this.datePickerEl) {\n this.datePickerEl.setAttribute('date', this.tmp.date1);\n }\n }\n\n handleInput2Text(e) {\n this.tmp.value2 = e.target.value;\n this.tmp.date2 = isDateString(e.target.value, this.format) ? getInternalFormat(e.target.value, this.format) : '';\n\n if (this.dateRangePickerEl) {\n this.dateRangePickerEl.setAttribute('end-date', this.tmp.date2);\n }\n }\n\n handleClear() {\n this.tmp.date1 = '';\n this.tmp.value1 = '';\n this.tmp.date2 = '';\n this.tmp.value2 = '';\n\n this.input1El.value = '';\n if (this.input2El) {\n this.input2El.value = '';\n }\n\n if (this.dateRangePickerEl) {\n this.dateRangePickerEl.setAttribute('start-date', '');\n this.dateRangePickerEl.setAttribute('end-date', '');\n } else if (this.datePickerEl) {\n this.datePickerEl.setAttribute('date', '');\n }\n }\n\n handleApply() {\n this.datesChanged.emit({\n value1: this.tmp.value1,\n value2: this.tmp.value2,\n date1: this.tmp.date1 ? getDateFromInternalFormat(this.tmp.date1) : '',\n date2: this.tmp.date2 ? getDateFromInternalFormat(this.tmp.date2) : '',\n });\n }\n\n render() {\n return (\n <Host>\n <div\n ref={ref => {\n this.containerEl = ref;\n }}\n class=\"som-dpm\"\n tabindex=\"-1\"\n >\n <div\n ref={ref => {\n this.contentContainerEl = ref;\n }}\n class=\"som-dpm-container\"\n >\n <div class=\"som-dpm-header\">\n <div class=\"som-dpm-close-button-container\">\n <a href=\"#\" class=\"som-dpm-close-button\" onClick={this.handleClose.bind(this)} tabindex=\"0\" role=\"button\" aria-label=\"Close\">\n <som-icon name=\"close\" size=\"md\"></som-icon>\n <span class=\"visually-hidden\">Close</span>\n </a>\n </div>\n <div class=\"som-dpm-input-container\" style={{ width: `${SomCalendar.WIDTH}px` }}>\n <input\n ref={ref => {\n this.input1El = ref;\n }}\n type=\"text\"\n class=\"form-control\"\n value={this.value1}\n onInput={this.handleInput1Text.bind(this)}\n placeholder={this.format}\n aria-label={this.enableRangePicker ? 'Start date' : 'Date'}\n />\n\n {this.enableRangePicker\n ? [\n <div class=\"som-dpm-input-arrow\">\n <som-icon name=\"caret-right\" color=\"black\" size=\"sm\"></som-icon>\n </div>,\n <input\n ref={ref => {\n this.input2El = ref;\n }}\n type=\"text\"\n class=\"form-control\"\n value={this.value2}\n onInput={this.handleInput2Text.bind(this)}\n placeholder={this.format}\n aria-label=\"End date\"\n />,\n ]\n : null}\n </div>\n </div>\n <div\n ref={ref => {\n this.calendarContainerEl = ref;\n }}\n class=\"som-dpm-calendar\"\n >\n <div class=\"som-dpm-calendar-content\">\n {this.enableRangePicker ? (\n <som-date-range-picker\n ref={ref => {\n this.dateRangePickerEl = ref;\n }}\n onDatesChanged={this.handleDateRangeChange.bind(this)}\n startDate={this.date1}\n endDate={this.date2}\n vertical={true}\n />\n ) : (\n <som-date-picker\n ref={ref => {\n this.datePickerEl = ref;\n }}\n onDateChange={this.handleDateChange.bind(this)}\n date={this.date1}\n vertical={true}\n />\n )}\n </div>\n </div>\n <div class=\"som-dpm-actions\">\n <som-button size=\"sm\" onClick={this.handleClear.bind(this)}>\n Clear\n </som-button>\n <som-button size=\"sm\" onClick={this.handleApply.bind(this)}>\n Apply\n </som-button>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n","/* som-date-range-picker */\n","import { Component, Element, State, Prop, Listen, h, Event, EventEmitter, Method } from '@stencil/core';\nimport { breakpoints } from '../../utils/variables';\nimport { getInternalFormatFromDate } from '../../utils/dates';\n\nconst DESKTOP_MONTHS_NB = 2;\n\n@Component({\n tag: 'som-date-range-picker',\n styleUrl: 'som-date-range-picker.scss',\n})\nexport class SomDateRangePicker {\n @Element() el: HTMLElement;\n\n calendarEl: HTMLSomCalendarElement;\n\n resizeTimeout;\n\n updateWidthCb;\n\n /**\n * This property sets the start date.\n */\n @Prop({ mutable: true, reflect: true }) startDate: string = '';\n\n /**\n * This property sets the end date.\n */\n @Prop({ mutable: true, reflect: true }) endDate: string = '';\n\n /**\n * This property represents the minimum date that can be selected.\n */\n @Prop() minDate: string = '';\n\n /**\n * This property represents the maximum date that can be selected.\n */\n @Prop() maxDate: string = '';\n\n /**\n * When set to `true`, this property sets the date range picker to read only.\n */\n @Prop() readonly = false;\n\n /**\n * Switch the date range picker to vertical mode allowing users to navigate months vertically instead of horizontally.\n */\n @Prop() vertical = false;\n\n @State() monthsNb = DESKTOP_MONTHS_NB;\n\n /**\n * This event is emitted whenever new dates are selected.\n * @Returns `event.detail` will contain the new start date and end date. \n * \n * Start Date : `event.detail.startDate`\n * \n * End Date : `event.detail.endDate`\n */\n @Event() datesChanged: EventEmitter;\n\n @Listen('resize', { target: 'window' })\n handleWindowResize() {\n clearTimeout(this.resizeTimeout);\n\n // Setup debounce so we're not constantly reading screen width\n this.resizeTimeout = setTimeout(this.updateWidthCb, 300);\n }\n\n /**\n * This method resets the date range picker.\n */\n @Method() async reset() {\n return this.calendarEl.reset();\n }\n\n /**\n * This method sets the focus onto the date range picker.\n */\n @Method() async setFocus() {\n return this.calendarEl.setFocus();\n }\n\n updateWidth() {\n this.monthsNb = window.innerWidth < breakpoints.lg ? 1 : DESKTOP_MONTHS_NB;\n }\n\n componentWillLoad() {\n this.updateWidthCb = this.updateWidth.bind(this);\n this.updateWidth();\n }\n\n handleDateChange(e: CustomEvent) {\n e.stopPropagation();\n\n this.startDate = e.detail.date1 ? getInternalFormatFromDate(e.detail.date1) : '';\n this.endDate = e.detail.date2 ? getInternalFormatFromDate(e.detail.date2) : '';\n\n this.datesChanged.emit({\n startDate: e.detail.date1,\n endDate: e.detail.date2,\n });\n }\n\n render() {\n return this.vertical ? (\n <som-calendar-vertical\n ref={ref => {\n this.calendarEl = ref;\n }}\n enableRangePicker={true}\n readonly={this.readonly}\n date1={this.startDate}\n date2={this.endDate}\n minDate={this.minDate}\n maxDate={this.maxDate}\n onDateChange={this.handleDateChange.bind(this)}\n />\n ) : (\n <som-calendar\n ref={ref => {\n this.calendarEl = ref;\n }}\n enableRangePicker={true}\n monthsNb={this.monthsNb}\n readonly={this.readonly}\n date1={this.startDate}\n date2={this.endDate}\n minDate={this.minDate}\n maxDate={this.maxDate}\n onDateChange={this.handleDateChange.bind(this)}\n />\n );\n }\n}\n","@import '../../sass/helpers';\n@import '../../sass/mixins/buttons';\n\n// This is so the button height is correctly calculated in som-popover\nsom-button {\n display: inline-block;\n}\n\n.som-drp-popover-content {\n padding: 1rem;\n}\n\n.som-drp-inputs-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n margin: 0.625rem;\n\n .som-dpm-input-arrow {\n width: 3.125rem;\n display: flex;\n justify-content: center;\n align-items: center;\n color: $navy;\n }\n\n input {\n display: inline-block;\n border-left: 0;\n border-right: 0;\n border-top: 0;\n border-radius: 0;\n padding: 0.5rem;\n width: 8.25rem;\n height: 2rem;\n text-align: center;\n\n &::placeholder {\n font-size: 0.9rem;\n color: #999;\n }\n\n &::-ms-clear {\n display: none;\n }\n }\n}\n\n// TODO: This can be removed I think\n.som-drp-button {\n display: flex !important;\n flex-direction: row;\n align-items: center;\n\n .som-drp-button-arrow {\n height: 1rem;\n position: relative;\n top: -3px;\n padding-left: 0.5rem;\n padding-right: 0.5rem; \n }\n}\n\nsom-button {\n .som-drp-button-arrow {\n position: relative;\n padding-left: 0.5rem;\n padding-right: 0.5rem; \n }\n}\n\n.som-drp-button-actions {\n display: flex;\n flex: 1;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding-top: 1.5rem;\n padding-bottom: 1rem;\n margin-left: 1rem;\n margin-right: 1rem;\n margin-top: 1rem;\n border-top: 1px solid $border-color;\n\n button {\n border: none;\n background: transparent; \n @include font-weight(700)\n }\n\n &__clear {\n color: $header-copy;\n\n &:hover {\n color: map-get($button-hover-colors, 'ash');\n text-decoration: $link-hover-decoration;\n background-color: transparent;\n border-color: transparent;\n }\n \n &:focus,\n &.focus {\n color: map-get($button-hover-colors, 'ash');\n outline: none;\n box-shadow: 0px 0px 0px 2px map-get($button-focus-colors, 'ash');\n //box-shadow: 0px 0px 0px 2px $value;\n text-decoration: $link-hover-decoration;\n border-color: transparent;\n }\n }\n\n &__apply {\n color: $primary;\n\n &:hover {\n color: map-get($button-hover-colors, 'primary');\n text-decoration: $link-hover-decoration;\n background-color: transparent;\n border-color: transparent;\n }\n \n &:focus,\n &.focus {\n color: map-get($button-hover-colors, 'primary');\n outline: none;\n box-shadow: 0px 0px 0px 2px map-get($button-focus-colors, 'primary');\n //box-shadow: 0px 0px 0px 2px $value;\n text-decoration: $link-hover-decoration;\n border-color: transparent;\n } \n }\n}\n","import { Component, Element, Prop, h, Host, Event, EventEmitter, State, Listen, Watch } from '@stencil/core';\nimport { generateId, focusElement, runAfterNextFrameRender, isDescendant } from '../../utils/functions';\nimport { getInternalFormat, isDateString, getInternalFormatFromDate, getDateFromInternalFormat, formatDate, isValidDate } from '../../utils/dates';\nimport { breakpoints, KEY_CODES } from '../../utils/variables';\n\n@Component({\n tag: 'som-date-range-picker-button',\n styleUrl: 'som-date-range-picker-button.scss',\n})\nexport class SomDateRangePickerButton {\n @Element() el: HTMLElement;\n\n resizeTimeout;\n\n updateResponsivenessCb;\n\n buttonEl: HTMLSomButtonElement;\n\n popoverEl: HTMLSomPopoverElement;\n\n mobileDateRangePickerEl: HTMLSomDatePickerMobileElement;\n\n popoverDateRangePickerEl: HTMLSomDateRangePickerElement;\n\n input1El: HTMLInputElement;\n\n input2El: HTMLInputElement;\n\n popoverId = generateId('som-date-range-picker-popover');\n\n buttonId = generateId('som-date-range-picker-button');\n\n enableInputFocus = true;\n\n // Debounce timeout used to prevent flickering when focus is on input and user focuses out of the browser body content (ex.: URL bar) and clicking back inside the page.\n focusBlurDebounceTimeout;\n\n /**\n * This property is used to set the date picker as disabled.\n */\n @Prop() disabled = false;\n\n /**\n * This property can be used to set the ARIA label associated with this input (for screen readers).\n */\n @Prop() buttonAriaLabel = '';\n\n /**\n * This property is the form element name (used when submitting the form).\n */\n @Prop() name = '';\n\n /**\n * This property determines the color of the button.\n */\n @Prop() buttonColor: 'primary' | 'secondary' | 'white' | 'nav' | 'gray' | 'danger' = 'gray'; \n\n /**\n * This property determines the size of the button.\n */\n @Prop() buttonSize?: 'sm' | 'md' | 'lg' | 'block' = 'md'; \n\n /**\n * This property determines which side of the button the icon should appear.\n */\n @Prop() buttonIconPosition?: 'left' | 'right' | 'only' | 'none' = 'none';\n\n /**\n * This property determines which icon to be placed. It should be used in conjunction with iconPosition.\n */\n @Prop() buttonIcon?: string;\n\n /**\n * This property determines the button style.\n */\n @Prop() buttonType: 'default' | 'outline' | 'clear' = 'default';\n\n /**\n * This property determines the initial label of the button. Once a date range is selected, the label will switch to the selected values.\n */\n @Prop() buttonLabel: string = 'Select Date Range';\n\n /**\n * This property is used to toggle the loading mode.\n */\n @Prop() loading?: boolean = false; \n\n /**\n * This property sets the horizontal position of the date picker popover.\n */\n @Prop() horizontalPosition: 'left' | 'right' = 'left';\n\n /**\n * This property sets the vertical position of the date picker popover.\n */\n @Prop() verticalPosition: 'top' | 'bottom' = 'bottom';\n\n /**\n * This property sets the date format.\n */\n @Prop() format: 'MM-DD-YYYY' | 'MM/DD/YYYY' | 'YYYY-MM-DD' | 'YYYY/MM/DD' = 'MM/DD/YYYY';\n\n /**\n * This property sets the start date.\n */\n @Prop({ mutable: true, reflect: true }) startDate = '';\n\n @Watch('startDate')\n handleStartDateChange() {\n this.updateStartDate();\n }\n\n /**\n * This property sets the end date.\n */\n @Prop({ mutable: true, reflect: true }) endDate = '';\n\n @Watch('endDate')\n handleEndDateChange() {\n this.updateEndDate();\n }\n\n @State() isMobile = false;\n\n @State() date1 = '';\n\n @State() date2 = '';\n\n @State() date1Tmp;\n\n @State() date2Tmp;\n\n /**\n * This event is emitted when the date range changes.\n */\n @Event() valueChange: EventEmitter;\n\n @Listen('blur', { target: 'window', capture: true })\n handleWindowBlur(e) {\n if (this.buttonEl === document.activeElement) {\n // Focus is removed from the page (i.e. user views another browser tab). We don't want to trigger an input focus.\n e.stopPropagation();\n e.preventDefault();\n }\n }\n\n @Listen('focus', { target: 'window', capture: true })\n handleWindowFocus(e) {\n if (this.buttonEl === document.activeElement) {\n // Focus is given to the page (i.e. user comes back from another browser tab). We don't want to trigger an input focus.\n e.stopPropagation();\n e.preventDefault();\n }\n }\n\n @Listen('resize', { target: 'window' })\n handleWindowResize() {\n clearTimeout(this.resizeTimeout);\n\n // Setup debounce so we're not constantly reading screen width\n this.resizeTimeout = setTimeout(this.updateResponsivenessCb, 300);\n }\n\n @Listen('keydown')\n async handleKeyDown(e) {\n if (e.keyCode === KEY_CODES.ESC) {\n // For both mobile and desktop\n e.preventDefault();\n this.focusSilently();\n } else if (e.keyCode === KEY_CODES.ARROW_DOWN && this.isDateRangePickerDisplayed()) {\n if (this.popoverDateRangePickerEl) {\n // Execute this code if calendar is not already shown\n e.preventDefault();\n this.showDatePicker(true);\n\n this.popoverDateRangePickerEl.setFocus();\n }\n }\n }\n\n componentWillLoad() {\n this.updateResponsivenessCb = this.updateResponsiveness.bind(this);\n\n this.updateResponsiveness();\n\n this.updateStartDate();\n this.updateEndDate();\n }\n\n componentDidLoad() {\n this.buttonEl = this.el.querySelector(`#${this.buttonId}`);\n }\n\n get dateRange() {\n if (!this.date1) {\n return null;\n }\n\n let dateRange = [<div>{formatDate(getDateFromInternalFormat(this.date1), this.format)}</div>];\n\n if (this.date2) {\n dateRange = dateRange.concat([\n <div class=\"som-drp-button-arrow\">\n <som-icon name=\"arrow-right\" size=\"sm\" display=\"block\"></som-icon>\n </div>,\n <div>{formatDate(getDateFromInternalFormat(this.date2), this.format)}</div>,\n ]);\n }\n\n return dateRange;\n }\n\n updateStartDate() {\n this.date1 = this.startDate && isDateString(this.startDate, this.format) ? getInternalFormat(this.startDate, this.format) : '';\n this.date1Tmp = this.date1;\n }\n\n updateEndDate() {\n this.date2 = this.endDate && isDateString(this.endDate, this.format) ? getInternalFormat(this.endDate, this.format) : '';\n this.date2Tmp = this.date2;\n }\n\n updateResponsiveness() {\n this.isMobile = window.innerWidth < breakpoints.md;\n }\n\n async focusSilently() {\n // We put focus on the input\n this.enableInputFocus = false;\n await focusElement(this.buttonEl);\n\n // For IE -- Put the re-enable on the top of the stack. This prevents the 'focus' event to be triggered right after the date picker is closed (which would reopen it right away).\n setTimeout(() => {\n this.enableInputFocus = true;\n }, 0);\n }\n\n handleButtonBlur() {\n const el = this.popoverEl || this.mobileDateRangePickerEl;\n if (el === this.popoverEl) {\n clearTimeout(this.focusBlurDebounceTimeout);\n this.focusBlurDebounceTimeout = setTimeout(() => {\n const hasFocus = isDescendant(el, document.activeElement);\n if (!hasFocus) {\n this.hideDatePicker();\n }\n }, 100);\n }\n }\n\n isDateRangePickerDisplayed() {\n if (this.popoverEl) {\n if (this.popoverEl.hasAttribute('show') && this.popoverEl.getAttribute('show') !== 'false') {\n return true;\n }\n } else if (this.mobileDateRangePickerEl) {\n if (this.mobileDateRangePickerEl.hasAttribute('show') && this.mobileDateRangePickerEl.getAttribute('show') !== 'false') {\n return true;\n }\n }\n\n return false;\n }\n\n handleButtonClick() {\n if (!this.isDateRangePickerDisplayed()) {\n this.showDatePicker();\n }\n }\n\n handleInput1Text(e) {\n this.date1Tmp = isDateString(e.target.value, this.format) ? getInternalFormat(e.target.value, this.format) : '';\n this.popoverDateRangePickerEl.setAttribute('start-date', this.date1Tmp);\n\n runAfterNextFrameRender(() => {\n (this.mobileDateRangePickerEl || this.popoverDateRangePickerEl).reset();\n });\n }\n\n handleInput2Text(e) {\n this.date2Tmp = isDateString(e.target.value, this.format) ? getInternalFormat(e.target.value, this.format) : '';\n this.popoverDateRangePickerEl.setAttribute('end-date', this.date2Tmp);\n\n runAfterNextFrameRender(() => {\n (this.mobileDateRangePickerEl || this.popoverDateRangePickerEl).reset();\n });\n }\n\n handleDatesSelected(e) {\n e.stopPropagation();\n const {\n startDate,\n endDate,\n }: {\n startDate: null | Date;\n endDate: null | Date;\n } = e.detail;\n\n this.input1El.value = formatDate(startDate, this.format);\n this.date1Tmp = getInternalFormatFromDate(startDate);\n\n this.input2El.value = endDate ? formatDate(endDate, this.format) : '';\n this.date2Tmp = endDate ? getInternalFormatFromDate(endDate) : '';\n }\n\n handleApplySelectedDates() {\n this.focusSilently();\n this.hideDatePicker();\n\n this.startDate = this.date1Tmp ? formatDate(getDateFromInternalFormat(this.date1Tmp), this.format) : '';\n this.endDate = this.date2Tmp ? formatDate(getDateFromInternalFormat(this.date2Tmp), this.format) : '';\n }\n\n handleClearSelectedDates() {\n this.date1Tmp = '';\n this.date2Tmp = '';\n\n if (this.mobileDateRangePickerEl) {\n this.mobileDateRangePickerEl.setAttribute('date1', '');\n this.mobileDateRangePickerEl.setAttribute('date2', '');\n } else if (this.popoverDateRangePickerEl) {\n this.popoverDateRangePickerEl.setAttribute('start-date', '');\n this.popoverDateRangePickerEl.setAttribute('end-date', '');\n this.input1El.value = '';\n this.input2El.value = '';\n }\n }\n\n handleMobileDateChange(e) {\n this.focusSilently();\n this.hideDatePicker();\n\n const {\n date1,\n date2,\n }: {\n date1: null | Date;\n date2: null | Date;\n } = e.detail;\n\n this.startDate = date1 ? formatDate(date1, this.format) : '';\n this.endDate = date2 ? formatDate(date2, this.format) : '';\n }\n\n async showDatePicker(focusOnShow = false) {\n // Wait for date picker to reset before showing it\n await this.resetDatePicker();\n\n if (this.mobileDateRangePickerEl) {\n this.mobileDateRangePickerEl.setAttribute('focus-input-on-show', focusOnShow ? 'true' : 'false');\n this.mobileDateRangePickerEl.setAttribute('show', 'true');\n } else {\n this.popoverEl.setAttribute('show', 'true');\n }\n }\n\n async resetDatePicker() {\n this.updateStartDate();\n this.updateEndDate();\n\n if (this.mobileDateRangePickerEl) {\n this.mobileDateRangePickerEl.setAttribute('date1', this.date1);\n this.mobileDateRangePickerEl.setAttribute('date2', this.date2);\n } else if (this.popoverDateRangePickerEl) {\n this.popoverDateRangePickerEl.setAttribute('start-date', this.date1);\n this.popoverDateRangePickerEl.setAttribute('end-date', this.date2);\n this.input1El.value = this.date1 && isValidDate(this.date1) ? formatDate(getDateFromInternalFormat(this.date1), this.format) : '';\n this.input2El.value = this.date2 && isValidDate(this.date2) ? formatDate(getDateFromInternalFormat(this.date2), this.format) : '';\n }\n\n const dateRangePickerEl = this.mobileDateRangePickerEl || this.popoverDateRangePickerEl;\n return dateRangePickerEl.reset();\n }\n\n hideDatePicker() {\n const el = this.mobileDateRangePickerEl || this.popoverEl;\n el.removeAttribute('show');\n }\n\n handlePopoverClose() {\n // Popover closed\n }\n\n handleMobileClose() {\n this.focusSilently();\n }\n\n render() {\n const ariaDisabled = this.disabled ? { 'aria-disabled': '' } : null;\n\n return (\n <Host>\n <som-button\n id={this.buttonId}\n type=\"button\"\n color={this.buttonColor}\n size={this.buttonSize}\n iconPosition={this.buttonIconPosition}\n icon={this.buttonIcon}\n buttonType={this.buttonType}\n loading={this.loading}\n disabled={this.disabled}\n aria-label={`${this.buttonAriaLabel} ${this.dateRange}`}\n aria-controls={this.popoverId}\n onClick={this.handleButtonClick.bind(this)}\n onBlur={this.handleButtonBlur.bind(this)}\n {...ariaDisabled}\n >\n {this.dateRange || this.buttonLabel}\n </som-button>\n {this.isMobile ? (\n <som-date-picker-mobile\n ref={ref => {\n this.mobileDateRangePickerEl = ref;\n }}\n date1={this.date1}\n date2={this.date2}\n format={this.format}\n enableRangePicker={true}\n onClose={this.handleMobileClose.bind(this)}\n onDatesChanged={this.handleMobileDateChange.bind(this)}\n />\n ) : (\n <som-popover\n ref={ref => {\n this.popoverEl = ref;\n }}\n id={this.popoverId}\n for={this.buttonId}\n vertical-position={this.verticalPosition}\n horizontal-position={this.horizontalPosition}\n relative-positioning\n onPopoverClosed={this.handlePopoverClose.bind(this)}\n >\n <div class=\"som-drp-inputs-container\">\n <input\n ref={ref => {\n this.input1El = ref;\n }}\n type=\"text\"\n class=\"form-control\"\n value={this.startDate}\n onInput={this.handleInput1Text.bind(this)}\n placeholder={this.format}\n aria-label=\"Start date\"\n />\n\n <div class=\"som-dpm-input-arrow\">\n <som-icon name=\"caret-right\"></som-icon>\n </div>\n\n <input\n ref={ref => {\n this.input2El = ref;\n }}\n type=\"text\"\n class=\"form-control\"\n value={this.endDate}\n onInput={this.handleInput2Text.bind(this)}\n placeholder={this.format}\n aria-label=\"End date\"\n />\n </div>\n <div class=\"som-drp-popover-content\">\n <som-date-range-picker\n ref={ref => {\n this.popoverDateRangePickerEl = ref;\n }}\n startDate={this.date1}\n endDate={this.date2}\n onDatesChanged={this.handleDatesSelected.bind(this)}\n ></som-date-range-picker>\n </div>\n <div class=\"som-drp-button-actions\">\n <button class=\"som-drp-button-actions__clear\" onClick={this.handleClearSelectedDates.bind(this)}>Clear</button>\n <button class=\"som-drp-button-actions__apply\" onClick={this.handleApplySelectedDates.bind(this)}>Apply</button>\n </div>\n </som-popover>\n )}\n </Host>\n );\n }\n}\n","@import '../../sass/helpers';\n\nsom-dialog {\n som-modal {\n .modal {\n @media (max-width: 767.98px) {\n width: 96% !important;\n //height: auto !important;\n min-height: auto !important;\n max-height: 70vh !important;\n }\n }\n\n @media (max-width: 767.98px) {\n &[open] {\n background-color: rgba($black, 0.7);\n }\n }\n }\n}\n","import { Component, Prop, Element, Event, EventEmitter, Method, h } from '@stencil/core';\n\n/**\n * Dialog are overlays that interrupt user interaction and demand a confirmation.\n */\n@Component({\n tag: 'som-dialog',\n styleUrl: 'som-dialog.scss',\n})\nexport class SomDialog {\n @Element() el: HTMLElement;\n\n /**\n * This property will be displayed in the header of your dialog.\n */\n @Prop() headline?: string;\n\n /**\n * This property sets the aria label of the dialog.\n */\n @Prop() dialogAriaLabel?: string;\n\n /**\n * This property will be used to further describe the dialog to users with screen readers. It won’t be displayed on the screen.\n */\n @Prop() description?: string;\n\n /**\n * This property is used to control the width of the dialog.\n */\n @Prop() size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * This boolean property is used to enable closing the dialog with keyboard's `ESC` key.\n */\n @Prop() enableKeyboardClose: boolean = false;\n\n /**\n * This boolean property is used to enable closing the dialog when clicking on the overlay outside of the dialog.\n */\n @Prop() enableOverlayClose: boolean = false;\n\n /**\n * This property is used to customize the text of the confirm option in a confirmation dialog.\n */\n @Prop() confirmText: string = 'Confirm';\n\n /**\n * This property is used to customize the text of the cancel option in a confirmation dialog.\n */\n @Prop() cancelText: string = 'Cancel';\n\n /**\n * This boolean property is used to determine what color the confirm action button will be in a confirmation dialog.\n */\n @Prop() isDestructive: boolean = false;\n\n /**\n * This boolean property is used to hide the header's close button.\n */\n @Prop() hideCloseButton: boolean = true;\n\n /**\n * This event is emitted before the dialog opens.\n */\n @Event() dialogOpen: EventEmitter;\n\n /**\n * This event is emitted after the dialog closes.\n */\n @Event() dialogClose: EventEmitter;\n\n /**\n * This event is emitted when a confirmation button is clicked. The boolean `event.detail.confirmation` is returned, where confirm is equal to `true` and cancel is equal to `false`.\n * @Returns `event.detail` will contain the confirmation status in as a `boolean` value where confirm is equal to `true` and cancel is equal to `false`.\n */\n @Event() dialogConfirm: EventEmitter;\n\n /**\n * Private Variables\n */\n modal;\n\n /**\n * This method will open the dialog.\n * @returns Promise will resolve when the open animation ends.\n */\n @Method()\n open(): Promise<void> {\n return this.modal.open();\n }\n\n /**\n * This method will close the dialog.\n * @returns Promise will resolve when the close animation ends.\n */\n @Method()\n close(): Promise<void> {\n return this.modal.close();\n }\n\n /**\n * This method will refresh the dialog. This is useful when dialog data is loaded asynchronously, which allows the component to find elements to focus on and provide accessibility support.\n * @returns Promise will resolve after the refresh.\n */\n @Method()\n refresh(): Promise<void> {\n return this.modal.refresh();\n }\n\n confirm(confirmation: boolean) {\n this.dialogConfirm.emit({ confirmation });\n this.close();\n }\n\n handleOpen(e) {\n // Stop event here and re-emit event from this component\n e.stopPropagation();\n this.dialogOpen.emit();\n }\n\n handleClose(e) {\n // Stop event here and re-emit event from this component\n e.stopPropagation();\n this.dialogClose.emit();\n }\n\n componentDidLoad() {\n this.handleOpen = this.handleOpen.bind(this);\n this.handleClose = this.handleClose.bind(this);\n\n this.modal = this.el.querySelector('som-modal');\n this.modal.addEventListener('modalOpen', this.handleOpen);\n this.modal.addEventListener('modalClose', this.handleClose);\n }\n\n disconnectedCallback() {\n this.modal.removeEventListener('modalOpen', this.handleOpen);\n this.modal.removeEventListener('modalClose', this.handleClose);\n }\n\n render() {\n return (\n <som-modal\n headline={this.headline}\n aria-label={this.dialogAriaLabel || null}\n description={this.description}\n size={this.size}\n enableKeyboardClose={this.enableKeyboardClose}\n enableOverlayClose={this.enableOverlayClose}\n hideCloseButton={this.hideCloseButton}\n >\n <slot />\n <div class=\"modal-confirmation-actions d-flex flex-column-reverse flex-md-row justify-content-md-end mt-3\">\n <som-button size=\"block\" class=\"mr-md-0_5 ml-md-1\" onClick={() => this.confirm(false)}>{this.cancelText}</som-button>\n <som-button size=\"block\" class=\"mb-1 mb-md-0 mr-md-0_5 ml-md-1\" color={this.isDestructive ? 'danger' : 'primary'} onClick={() => this.confirm(true)}>\n {this.confirmText}\n </som-button>\n </div>\n </som-modal>\n );\n }\n}\n","@import '../../sass/components/header';","import { Component, Prop, State, Element, Listen, Method, Host, h } from '@stencil/core';\nimport { breakpoints } from '../../utils/variables';\nimport { focusElement } from '../../utils/functions';\n\nconst RESIZE_DEBOUNCE_TIME = 100; // milliseconds\n\n/**\n * Headers assist users in identifying where they are in a site structure and provide a simple, effective means of reaching main sections of a site via a top level navigation.\n */\n\n/**\n * @slot header-menu - This slot is used for the main horizontal header menu.\n * @slot panel-menu - This slot is used for the fly out panel menu.\n */\n@Component({\n tag: 'som-header',\n styleUrl: 'som-header.scss',\n shadow: true,\n})\nexport class SomHeader {\n mainContentElem; // Used when skipping for main content (ADA)\n\n slots; // Used to track slot updates\n\n timeout; // Used when window resizes\n\n updateSlotsCb; // Callback to use when slots content changes\n\n menuButtonEl; // Hamburger menu button - we need this to gain focus after menu closes.\n\n // TODO : Evaluate all local variables\n /* come from primary-header */\n menuPanelEl;\n menu;\n mobileMenu;\n desktopMenu;\n menuButtonAriaLabel = 'Open Menu';\n panelMenuSlot;\n\n\n @Element() el: HTMLElement;\n\n /**\n * This property is the name of the application.\n */\n @Prop() appName: string = '';\n\n /**\n * This property is the name of the department where the application resides.\n */\n @Prop() departmentName: string = '';\n\n /**\n * This property is the ID of the main content section of the application. It is used to establish a connection for the \"skip navigation\" link.\n * This is a **required** field\n */\n @Prop() mainContentId: string = '';\n\n /**\n * This property is the breakpoint where the mobile navigation should take effect. Setting the value to `\"none\"` will always show the flyout menu.\n */\n @Prop() breakpoint: 'sm' | 'md' | 'lg' | 'xl' | 'none' = 'lg';\n\n /**\n * This optional property is used to set a link on the header logo and title text.\n */\n @Prop() homeLink?: string = null;\n\n /**\n * This boolean determines if the header should stick to the top of scroll with the content\n */\n @Prop() sticky: boolean = false;\n\n @State() mobileMode: boolean = false;\n @State() hideMobileMenu: boolean = false;\n @State() opened: boolean = false;\n\n @Listen('resize', { target: 'window' })\n checkBreakpoint() {\n // clear the timeout\n clearTimeout(this.timeout);\n\n // Setup debounce so we're not constantly reading screen width\n this.timeout = setTimeout(this.checkMobileMode.bind(this), RESIZE_DEBOUNCE_TIME);\n }\n\n /**\n * This method will close the panel menu if opened. It can be useful when a menu link is clicked but the page doesn't refresh.\n * @returns Promise will resolve when the close animation ends.\n */\n @Method()\n closePanelMenu(): Promise<void> {\n return this.menuPanelEl.close();\n }\n\n checkMobileMode = () => {\n if (window.innerWidth < breakpoints[this.breakpoint]) {\n // Mobile\n this.mobileMode = true;\n } else {\n // Desktop\n this.mobileMode = false;\n }\n };\n\n componentWillLoad() {\n if (this.el.children.length === 0) {\n // Header doesn't have menu links\n this.hideMobileMenu = true;\n }\n\n // Look to see if there is content in the panel menu slot. We'll use this to hide the button.\n this.panelMenuSlot = !!this.el.querySelector('[slot=\"panel-menu\"]');\n\n // Add tabindex = -1 for IE 11 suppport\n this.mainContentElem = document.getElementById(this.mainContentId);\n if (this.mainContentElem) {\n this.mainContentElem.tabIndex = -1;\n }\n }\n\n componentDidLoad() {\n this.checkMobileMode();\n }\n\n toggleMenu() {\n if (this.opened) {\n // Menu is open, so we're closing it\n this.menuPanelEl.close();\n this.opened = false;\n } else {\n // Menu is closed so we're opening it\n this.menuPanelEl.open();\n this.opened = true;\n // this.menuPanelEl.focus();\n }\n }\n\n\n @Listen('menuClosed')\n parentMenuClosedHandler() {\n this.menuPanelEl.refresh();\n }\n\n @Listen('menuOpened')\n parentMenuOpenHandler() {\n this.menuPanelEl.refresh();\n }\n\n // The menu has closed, set the open state and move focus to the menu button.\n panelCloseHandler() {\n this.opened = false;\n focusElement(this.menuButtonEl);\n }\n\n render() {\n return (\n <Host class={`${this.sticky ? 'sticky' : ''}`}>\n {[\n this.mainContentId ? (\n <div class=\"a11y-skip-link-container\">\n <a\n href={`#${this.mainContentId}`}\n tabindex=\"0\"\n class=\"a11y-skip-link\"\n onClick={e => {\n e.preventDefault();\n e.stopPropagation();\n focusElement(this.mainContentElem);\n }}\n >\n Skip to main content\n </a>\n </div>\n ) : null,\n <header class={`header ${this.opened ? 'open' : 'closed'}`} aria-label=\"main\">\n {this.homeLink ? (\n <a href={this.homeLink} class=\"header__home-link\">\n <div\n class=\"header__logo\"\n aria-hidden=\"true\"\n innerHTML={`<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 137.05 137.05\"><defs><style>.cls-1{fill:url(#linear-gradient);}.cls-2{fill:#fff;}</style><linearGradient id=\"linear-gradient\" x1=\"1.91\" y1=\"0.81\" x2=\"134.6\" y2=\"135.69\" gradientUnits=\"userSpaceOnUse\"><stop offset=\"0\" stop-color=\"#287c78\"/><stop offset=\"0.38\" stop-color=\"#1e7a87\"/><stop offset=\"1\" stop-color=\"#0876a7\"/></linearGradient></defs><title>Mark_Color</title><g id=\"Logos\"><rect class=\"cls-1\" width=\"137.05\" height=\"137.05\"/><path class=\"cls-2\" d=\"M85.09,51.46l13,7.63a1.6,1.6,0,0,1,.58,2.18l-.18.31-.9,1.57a.2.2,0,0,0,0,.25L99,64.6l.27.23a.86.86,0,0,1,.28.67l-.32,5.28a3.41,3.41,0,0,1-.92,2.14l-5.5,5.83h0a2.42,2.42,0,0,0-.65,1.72h0l.08,2.93h0a2.44,2.44,0,0,0,1.18,2h0l3,1.75,1,.61A1.18,1.18,0,0,0,99,87.39l.64-1,4.47-7a.77.77,0,0,1,.47-.32l.94-.2a42.65,42.65,0,0,1,4.41,19.5V99a7.74,7.74,0,0,0-5.64,5.15l-1.34,4.08a9.25,9.25,0,0,1-1.68,3.06l-.88,1.08L87.8,113l-.1-.92a.14.14,0,0,0-.15-.12l-2.09.07-20.9.68a6.88,6.88,0,0,0,.43-1.33l.15-.76a9.79,9.79,0,0,0,3.44-5.66l1.22-6a13.82,13.82,0,0,0-1.11-8.77L67,86.7a7,7,0,0,1-.48-4.83l3.84-14.71a4.63,4.63,0,0,1,1.5-2.37l.08-.07.35.6.74,1.28.4.69a1,1,0,0,0,.88.51h1.73a2.28,2.28,0,0,0,1.33-.44l0,0,1.24-.91.32-.23A1.6,1.6,0,0,0,79.63,65l0-.39L80,58.83a.26.26,0,0,1,.17-.24l2.35-.9,2-.78a.39.39,0,0,0,.21-.52l-.91-2-.29-.62a.43.43,0,0,1,.06-.46l1.51-1.88m-.77-2.88L81.5,52.07a2.34,2.34,0,0,0-.3,2.46l.42.91-2.65,1a2.16,2.16,0,0,0-1.39,1.91l-.29,5.23a1.88,1.88,0,0,1-.75,1.4l-.39.28a.55.55,0,0,1-.33.11h-.36a.58.58,0,0,1-.49-.28l-.11-.21a2.33,2.33,0,0,1-.26-1.69l.31-1.35a2.52,2.52,0,0,0-.47-2.14.18.18,0,0,0-.27,0L70.32,63a7.09,7.09,0,0,0-2.27,3.6L64.21,81.26a9.4,9.4,0,0,0,.64,6.49l1.67,3.45a11.32,11.32,0,0,1,.91,7.22l-1.22,6a7.69,7.69,0,0,1-2.66,4.32,2.29,2.29,0,0,0-.76,1.29l-.17.8a4.29,4.29,0,0,1-.87,1.81,2.39,2.39,0,0,0-.37,2.26l.09.26,24.07-.78.11.94a.14.14,0,0,0,.14.13l15.77-.74,1.56-1.91a11.8,11.8,0,0,0,2.1-3.84l1.34-4.08a5.37,5.37,0,0,1,4.66-3.67l.47,0a.67.67,0,0,0,.61-.66l0-2.18a44.88,44.88,0,0,0-4.73-20.76l-.6-1.2a.46.46,0,0,0-.5-.24l-2.79.57a2.31,2.31,0,0,0-1.44,1l-4.38,6.9a.58.58,0,0,1-.78.19l-1.92-1.13a1.23,1.23,0,0,1-.6-1l0-1.9a.89.89,0,0,1,.23-.62L100,74.58a5.83,5.83,0,0,0,1.58-3.65l.32-5.29A3.19,3.19,0,0,0,100.81,63l-.27-.24.18-.3A4,4,0,0,0,99.28,57L84.77,48.47l-.14-.08a.15.15,0,0,0-.19,0Z\"/><path class=\"cls-2\" d=\"M46.92,23.78a3.06,3.06,0,0,0-.47.78l-2.3,5.22L42.8,32.84a.53.53,0,0,0,.55.74l3.32-.44,2.86-.38.34,0A2.59,2.59,0,0,1,52,33.89l2.12,3.2.76,1.14a.53.53,0,0,0,.58.22l1.32-.37,2-.58a2.16,2.16,0,0,1,.62-.09,2.22,2.22,0,0,1,1.25.38l1.43.93,1.4.92a.54.54,0,0,0,.7-.1l1.07-1.3.9-1.07a5.29,5.29,0,0,1,4.08-1.92h0l5.55.06h0A3.87,3.87,0,0,0,78.88,34l0,0A.16.16,0,0,1,79,33.9h0l.76,0-.09.5A3.12,3.12,0,0,0,82.44,38l4.8.53a.86.86,0,0,1,.73.61l.27.89a7.24,7.24,0,0,0,.88,1.89l-2-.11H87a3.58,3.58,0,0,0-2.87,1.43,5,5,0,0,0-3.7-1.92l-2.65-.13h-.16a3.4,3.4,0,0,0-3.08,2,.32.32,0,0,1-.28.19l-3.34.11a5.19,5.19,0,0,0-3.42,1.44l-4.2,4-.4-.11-.44-1.38-.52-1.64a.52.52,0,0,0-.61-.35l-1.68.36-.76.17a3.1,3.1,0,0,0-2.33,2.2l-.14.53a19.9,19.9,0,0,1-2.1,4.93,5.79,5.79,0,0,0-1-1.67l0-.76a4.94,4.94,0,0,0-3.23-4.94l-.36-.14a5.52,5.52,0,0,0-5.28-4,5.75,5.75,0,0,0-1.24.14l-1,.23L27.94,37.19a5.25,5.25,0,0,0-.69-1.25,6.66,6.66,0,0,0,3.82-3l2.18,0a6.12,6.12,0,0,0,4.87-2.55l.17-.24A2.55,2.55,0,0,0,41,27.84l6-4.06Zm1.34-3.34a2.31,2.31,0,0,0-1.31.41l-7.34,5a2.37,2.37,0,0,0-.93,1.21c-.18.56-.43.73-1.07.73a1.17,1.17,0,0,0-1,.48l-.49.68a3.64,3.64,0,0,1-2.94,1.54l-3.3.05a.53.53,0,0,0-.48.3l-.31.63A4.28,4.28,0,0,1,26,33.77l-2.6.39a.2.2,0,0,0-.16.21l.08,1.18a1,1,0,0,0,.56.8l.44.2a2.81,2.81,0,0,1,1.54,1.87l.1.42a.37.37,0,0,0,.22.25L41.91,45a.56.56,0,0,0,.36,0l1.48-.35a3.42,3.42,0,0,1,.7-.08,3.1,3.1,0,0,1,3,2.63l.08.56a.29.29,0,0,0,.18.22l1.5.56a2.53,2.53,0,0,1,1.65,2.53l-.11,1.77a.26.26,0,0,0,.1.2h0a3.41,3.41,0,0,1,1.29,2.06l.11.53A3.63,3.63,0,0,0,54,58h0a.14.14,0,0,0,.18,0l.69-.89a22.53,22.53,0,0,0,3.85-7.73l.14-.53a.7.7,0,0,1,.51-.49l.76-.16.6,1.88a1.46,1.46,0,0,0,1,1l1.37.37a1.51,1.51,0,0,0,.41.06A1.61,1.61,0,0,0,64.58,51l4.54-4.35A2.78,2.78,0,0,1,71,45.88l4.22-.14a1.55,1.55,0,0,0,1.5-1.55h0a1,1,0,0,1,.9-.57h.05l2.65.12a2.58,2.58,0,0,1,2.15,1.38l0,.07a1.86,1.86,0,0,0,1.65,1h1.37a.17.17,0,0,0,.16-.14l.15-.84a1.2,1.2,0,0,1,1.17-1H87l6.34.33a.23.23,0,0,0,.2-.11l0,0a1.46,1.46,0,0,0-.42-2l-.75-.52a4.82,4.82,0,0,1-1.86-2.57l-.27-.89a3.26,3.26,0,0,0-2.78-2.32l-4.8-.53a.69.69,0,0,1-.61-.81l.47-3a.21.21,0,0,0-.2-.25l-3.26-.1H79a2.53,2.53,0,0,0-1.9.86l0,0a1.5,1.5,0,0,1-1.14.51h0l-5.54-.06h-.08a7.73,7.73,0,0,0-5.94,2.79l-.89,1.07-1.42-.93a4.69,4.69,0,0,0-3.86-.59l-2,.57L54,32.56a5,5,0,0,0-4.17-2.23,4.87,4.87,0,0,0-.66,0l-2.85.38,2.3-5.22a1,1,0,0,1,.81-.6,3.28,3.28,0,0,0,2.36-1.5l1.27-2a.27.27,0,0,0-.19-.4l-4.33-.59-.32,0Z\"/></g></svg>`}\n ></div>\n <div class=\"header__title\">\n <div class=\"header__title-application\">{this.appName}</div>\n {this.departmentName ? <div class=\"header__title-department\">{this.departmentName}</div> : null}\n </div>\n </a>\n ) : (\n [\n <div\n class=\"header__logo\"\n innerHTML={`<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 137.05 137.05\"><defs><style>.cls-1{fill:url(#linear-gradient);}.cls-2{fill:#fff;}</style><linearGradient id=\"linear-gradient\" x1=\"1.91\" y1=\"0.81\" x2=\"134.6\" y2=\"135.69\" gradientUnits=\"userSpaceOnUse\"><stop offset=\"0\" stop-color=\"#287c78\"/><stop offset=\"0.38\" stop-color=\"#1e7a87\"/><stop offset=\"1\" stop-color=\"#0876a7\"/></linearGradient></defs><title>Mark_Color</title><g id=\"Logos\"><rect class=\"cls-1\" width=\"137.05\" height=\"137.05\"/><path class=\"cls-2\" d=\"M85.09,51.46l13,7.63a1.6,1.6,0,0,1,.58,2.18l-.18.31-.9,1.57a.2.2,0,0,0,0,.25L99,64.6l.27.23a.86.86,0,0,1,.28.67l-.32,5.28a3.41,3.41,0,0,1-.92,2.14l-5.5,5.83h0a2.42,2.42,0,0,0-.65,1.72h0l.08,2.93h0a2.44,2.44,0,0,0,1.18,2h0l3,1.75,1,.61A1.18,1.18,0,0,0,99,87.39l.64-1,4.47-7a.77.77,0,0,1,.47-.32l.94-.2a42.65,42.65,0,0,1,4.41,19.5V99a7.74,7.74,0,0,0-5.64,5.15l-1.34,4.08a9.25,9.25,0,0,1-1.68,3.06l-.88,1.08L87.8,113l-.1-.92a.14.14,0,0,0-.15-.12l-2.09.07-20.9.68a6.88,6.88,0,0,0,.43-1.33l.15-.76a9.79,9.79,0,0,0,3.44-5.66l1.22-6a13.82,13.82,0,0,0-1.11-8.77L67,86.7a7,7,0,0,1-.48-4.83l3.84-14.71a4.63,4.63,0,0,1,1.5-2.37l.08-.07.35.6.74,1.28.4.69a1,1,0,0,0,.88.51h1.73a2.28,2.28,0,0,0,1.33-.44l0,0,1.24-.91.32-.23A1.6,1.6,0,0,0,79.63,65l0-.39L80,58.83a.26.26,0,0,1,.17-.24l2.35-.9,2-.78a.39.39,0,0,0,.21-.52l-.91-2-.29-.62a.43.43,0,0,1,.06-.46l1.51-1.88m-.77-2.88L81.5,52.07a2.34,2.34,0,0,0-.3,2.46l.42.91-2.65,1a2.16,2.16,0,0,0-1.39,1.91l-.29,5.23a1.88,1.88,0,0,1-.75,1.4l-.39.28a.55.55,0,0,1-.33.11h-.36a.58.58,0,0,1-.49-.28l-.11-.21a2.33,2.33,0,0,1-.26-1.69l.31-1.35a2.52,2.52,0,0,0-.47-2.14.18.18,0,0,0-.27,0L70.32,63a7.09,7.09,0,0,0-2.27,3.6L64.21,81.26a9.4,9.4,0,0,0,.64,6.49l1.67,3.45a11.32,11.32,0,0,1,.91,7.22l-1.22,6a7.69,7.69,0,0,1-2.66,4.32,2.29,2.29,0,0,0-.76,1.29l-.17.8a4.29,4.29,0,0,1-.87,1.81,2.39,2.39,0,0,0-.37,2.26l.09.26,24.07-.78.11.94a.14.14,0,0,0,.14.13l15.77-.74,1.56-1.91a11.8,11.8,0,0,0,2.1-3.84l1.34-4.08a5.37,5.37,0,0,1,4.66-3.67l.47,0a.67.67,0,0,0,.61-.66l0-2.18a44.88,44.88,0,0,0-4.73-20.76l-.6-1.2a.46.46,0,0,0-.5-.24l-2.79.57a2.31,2.31,0,0,0-1.44,1l-4.38,6.9a.58.58,0,0,1-.78.19l-1.92-1.13a1.23,1.23,0,0,1-.6-1l0-1.9a.89.89,0,0,1,.23-.62L100,74.58a5.83,5.83,0,0,0,1.58-3.65l.32-5.29A3.19,3.19,0,0,0,100.81,63l-.27-.24.18-.3A4,4,0,0,0,99.28,57L84.77,48.47l-.14-.08a.15.15,0,0,0-.19,0Z\"/><path class=\"cls-2\" d=\"M46.92,23.78a3.06,3.06,0,0,0-.47.78l-2.3,5.22L42.8,32.84a.53.53,0,0,0,.55.74l3.32-.44,2.86-.38.34,0A2.59,2.59,0,0,1,52,33.89l2.12,3.2.76,1.14a.53.53,0,0,0,.58.22l1.32-.37,2-.58a2.16,2.16,0,0,1,.62-.09,2.22,2.22,0,0,1,1.25.38l1.43.93,1.4.92a.54.54,0,0,0,.7-.1l1.07-1.3.9-1.07a5.29,5.29,0,0,1,4.08-1.92h0l5.55.06h0A3.87,3.87,0,0,0,78.88,34l0,0A.16.16,0,0,1,79,33.9h0l.76,0-.09.5A3.12,3.12,0,0,0,82.44,38l4.8.53a.86.86,0,0,1,.73.61l.27.89a7.24,7.24,0,0,0,.88,1.89l-2-.11H87a3.58,3.58,0,0,0-2.87,1.43,5,5,0,0,0-3.7-1.92l-2.65-.13h-.16a3.4,3.4,0,0,0-3.08,2,.32.32,0,0,1-.28.19l-3.34.11a5.19,5.19,0,0,0-3.42,1.44l-4.2,4-.4-.11-.44-1.38-.52-1.64a.52.52,0,0,0-.61-.35l-1.68.36-.76.17a3.1,3.1,0,0,0-2.33,2.2l-.14.53a19.9,19.9,0,0,1-2.1,4.93,5.79,5.79,0,0,0-1-1.67l0-.76a4.94,4.94,0,0,0-3.23-4.94l-.36-.14a5.52,5.52,0,0,0-5.28-4,5.75,5.75,0,0,0-1.24.14l-1,.23L27.94,37.19a5.25,5.25,0,0,0-.69-1.25,6.66,6.66,0,0,0,3.82-3l2.18,0a6.12,6.12,0,0,0,4.87-2.55l.17-.24A2.55,2.55,0,0,0,41,27.84l6-4.06Zm1.34-3.34a2.31,2.31,0,0,0-1.31.41l-7.34,5a2.37,2.37,0,0,0-.93,1.21c-.18.56-.43.73-1.07.73a1.17,1.17,0,0,0-1,.48l-.49.68a3.64,3.64,0,0,1-2.94,1.54l-3.3.05a.53.53,0,0,0-.48.3l-.31.63A4.28,4.28,0,0,1,26,33.77l-2.6.39a.2.2,0,0,0-.16.21l.08,1.18a1,1,0,0,0,.56.8l.44.2a2.81,2.81,0,0,1,1.54,1.87l.1.42a.37.37,0,0,0,.22.25L41.91,45a.56.56,0,0,0,.36,0l1.48-.35a3.42,3.42,0,0,1,.7-.08,3.1,3.1,0,0,1,3,2.63l.08.56a.29.29,0,0,0,.18.22l1.5.56a2.53,2.53,0,0,1,1.65,2.53l-.11,1.77a.26.26,0,0,0,.1.2h0a3.41,3.41,0,0,1,1.29,2.06l.11.53A3.63,3.63,0,0,0,54,58h0a.14.14,0,0,0,.18,0l.69-.89a22.53,22.53,0,0,0,3.85-7.73l.14-.53a.7.7,0,0,1,.51-.49l.76-.16.6,1.88a1.46,1.46,0,0,0,1,1l1.37.37a1.51,1.51,0,0,0,.41.06A1.61,1.61,0,0,0,64.58,51l4.54-4.35A2.78,2.78,0,0,1,71,45.88l4.22-.14a1.55,1.55,0,0,0,1.5-1.55h0a1,1,0,0,1,.9-.57h.05l2.65.12a2.58,2.58,0,0,1,2.15,1.38l0,.07a1.86,1.86,0,0,0,1.65,1h1.37a.17.17,0,0,0,.16-.14l.15-.84a1.2,1.2,0,0,1,1.17-1H87l6.34.33a.23.23,0,0,0,.2-.11l0,0a1.46,1.46,0,0,0-.42-2l-.75-.52a4.82,4.82,0,0,1-1.86-2.57l-.27-.89a3.26,3.26,0,0,0-2.78-2.32l-4.8-.53a.69.69,0,0,1-.61-.81l.47-3a.21.21,0,0,0-.2-.25l-3.26-.1H79a2.53,2.53,0,0,0-1.9.86l0,0a1.5,1.5,0,0,1-1.14.51h0l-5.54-.06h-.08a7.73,7.73,0,0,0-5.94,2.79l-.89,1.07-1.42-.93a4.69,4.69,0,0,0-3.86-.59l-2,.57L54,32.56a5,5,0,0,0-4.17-2.23,4.87,4.87,0,0,0-.66,0l-2.85.38,2.3-5.22a1,1,0,0,1,.81-.6,3.28,3.28,0,0,0,2.36-1.5l1.27-2a.27.27,0,0,0-.19-.4l-4.33-.59-.32,0Z\"/></g></svg>`}\n ></div>,\n <div class=\"header__title\">\n <div class=\"header__title-application\">{this.appName}</div>\n {this.departmentName ? <div class=\"header__title-department\">{this.departmentName}</div> : null}\n </div>,\n ]\n )}\n\n <div class=\"header__menu\">\n <div class=\"header__menu-inline\">\n <slot name=\"header-menu\"></slot>\n </div>\n {this.panelMenuSlot ? (\n <div class={`header__menu-button-container ${this.breakpoint ? `header__menu-button-container__display-${this.breakpoint}` : ''}`}>\n <button\n type=\"button\"\n class=\"header__menu-button\"\n aria-label={this.menuButtonAriaLabel}\n onClick={() => this.toggleMenu()}\n ref={el => {\n this.menuButtonEl = el;\n }}\n >\n {this.opened ? <som-icon name=\"close\" display=\"block\"></som-icon> : <som-icon name=\"menu\" display=\"block\"></som-icon>}\n </button>\n </div>\n ) : null}\n </div>\n </header>,\n this.panelMenuSlot ? (\n <som-panel\n id=\"menu-panel\"\n class='header-panel'\n position=\"right\"\n size=\"md\"\n breakpoint=\"md\"\n hide-close-button=\"false\"\n below-header=\"true\"\n ref={el => {\n this.menuPanelEl = el;\n }}\n onBeforeClose={() => {\n this.panelCloseHandler();\n }}\n >\n <slot name=\"panel-menu\"></slot>\n </som-panel>\n ) : null\n ]}\n </Host>\n )\n }\n}\n","@import \"../helpers\";\n\n// Copied from DG Core's _icons.scss file.\n@mixin icon-variant($parent, $color) {\n #{$parent} {\n svg {\n fill: $color !important;\n }\n }\n}\n\n$icon-size-sm: 1rem;\n$icon-size-md: 1.5rem;\n$icon-size-lg: 2rem;\n$icon-size-xl: 2.5rem;\n\n// Button Variables\n$icon-display: () !default;\n$icon-display: map-merge(\n (\n \"inline\": inline,\n \"block\": block,\n \"inline-block\": inline-block,\n ),\n $icon-display\n);\n\n.som-icon {\n display: inline-block;\n\n svg {\n display: block;\n fill: currentColor;\n height: 1em;\n width: 1em;\n }\n\n &.som-icon-size-sm {\n svg {\n font-size: $icon-size-sm;\n }\n }\n\n &.som-icon-size-md {\n svg {\n font-size: $icon-size-md;\n }\n }\n\n &.som-icon-size-lg {\n svg {\n font-size: $icon-size-lg;\n }\n }\n\n &.som-icon-size-xl {\n svg {\n font-size: $icon-size-xl;\n }\n }\n\n @each $display, $value in $icon-display {\n &.som-icon-display-#{$display} {\n display: $value;\n }\n }\n}\n\n@each $color, $value in $theme-colors {\n @include icon-variant(\".som-icon-color-#{$color}\", $value);\n}\n","// This file is generated by the 'generate.js' script. Any changes made to this file will be overwritten.\nimport { Component, Prop, State, Watch, Host, h, getAssetPath } from '@stencil/core';\n\n@Component({\n tag: 'som-icon',\n styleUrl: '../../sass/components/_icon.scss',\n shadow: true,\n})\nexport class SomIcon {\n \n /*************\n * PROPERTIES\n **************/\n\n /**\n * The name of the icon\n */\n @Prop({reflect: true}) name: string;\n @Watch('name')\n handleName() {\n this.getIconData();\n }\n\n /**\n * This property represents the color of the icon. By default, the color will match the current font color. However, you can override this color by passing in the name of SASS variable (`primary`, `secondary`, `success`, `danger`, `warning`, `light`, `dark`, `black`, `white`, `dark-gray`, `light-gray`, `body-copy`).\n */\n @Prop() color: string;\n\n /**\n * This property represents the size of the icon. By default, the size will be determined by the current font size. However, you can override this size using pre-built sizes (`sm`, `md`, `lg`, `xl`).\n */\n @Prop() size: string;\n\n /**\n * This property represents the CSS display property. In certain circumstances you may need to adjust the display property to properly align the icon. \n */\n @Prop() display: string = 'inline-block';\n\n /*************\n * STATE VARIABLES\n **************/\n\n @State() iconData;\n\n\n /*************\n * LIFECYCLE EVENTS\n **************/\n componentWillLoad() {\n this.getIconData();\n }\n\n\n /*************\n * LOCAL METHODS\n **************/\n async getIconData() {\n const res = await fetch(getAssetPath(`assets/icons/${this.name}.svg`));\n if (res.status === 200) {\n this.iconData = await res.text(); \n } else {\n console.error(`Error fetching icon - ${this.name}`);\n } \n }\n\n render() {\n return (\n <Host class={'som-icon-container' + (this.display ? ' som-icon-display-' + this.display : '')}>\n <div\n class={'som-icon' + (this.size ? ' som-icon-size-' + this.size : '') + (this.color ? ' som-icon-color-' + this.color : '') + (this.display ? ' som-icon-display-' + this.display : '')}\n innerHTML={this.iconData}\n />\n </Host>\n );\n }\n}\n","@import '../../sass/components/input';\n@import '../../sass/components/form-field';\n\nsom-input {\n /* Firefox puts a red shadow on required inputs. We remove it here. */\n input:required {\n box-shadow: none;\n }\n}\n","import { Component, Element, Event, EventEmitter, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { focusElement, generateId, isInError, getRequiredInd, ariaDescribedby } from '../../utils/functions';\n\n\n/**\n * Inputs are used to capture user keyboard inputs.\n */\n\n/**\n * @slot label - Label for the The input. Alternatively, you can use the label attribute.\n * @slot before-input - This slot is used to place an icon or prefix at the start of the input.\n * @slot after-input - This slot is used to place an icon or suffix at the end of the input.\n */\n@Component({\n tag: 'som-input',\n styleUrl: 'som-input.scss',\n})\nexport class SomInput {\n @Element() el: HTMLElement;\n\n /*****************************\n * COMPONENT PROPERTIES\n ******************************/\n /**\n * This property can be used to set a label.\n */\n @Prop() label: string = '';\n\n /**\n * This property is a list of CSS classes that can be used to style the label. \n * @deprecated with version 4.0.1 release\n */\n @Prop() labelClass: string = '';\n\n /**\n * This property will visually hide the label. A label is still required to be provided for screenreader support.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * This property can be used to set a help text.\n */\n @Prop() help: string = '';\n\n /**\n * This property can be used to set an error. If a non-empty string is given, it will be used as the error message.\n */\n @Prop() error: string | null = null;\n\n /**\n * This boolean can be used to set the input as required.\n */\n @Prop() required: boolean = false;\n\n /**\n * This property is used to override the required indicator. By default, forms elements will show an `optional` indicator\n * but some forms are better served showing the `required` indicator instead.\n */\n @Prop() requiredInd: 'required' | 'optional' | 'none'; \n\n /**\n * This property can be used to set the type.\n */\n @Prop() type: 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'url' = 'text';\n\n /**\n * This property can be used to set a placeholder text.\n */\n @Prop() placeholder: string = '';\n\n /**\n * This property can be used to specifically set an ID to the input field. If an ID is not provided, it will be dynamically generated.\n */\n @Prop() inputId: string = generateId('som-input');\n\n /**\n * This property can be used to set the form field name (used when submitting the form).\n */\n @Prop() name?: string = '';\n\n /**\n * This property can be used to set the text input value.\n */\n @Prop({mutable: true, reflect: true}) value: string = '';\n\n /**\n * This boolean can be used to disable the text input.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * This boolean can be used to set the text input as readonly.\n */\n @Prop() readonly: boolean = false;\n\n /**\n * This property can be used to set the ARIA label associated with this input (for screen readers).\n */\n @Prop() inputAriaLabel: string | null = null;\n\n /**\n * This boolean property is used when passing a children component to a text input as a grouped element.\n * @deprecated with version 4.0.2 release\n */\n @Prop() grouped: boolean = false;\n\n /**\n * This property indicates that the value of the control can be automatically completed by the browser.\n */\n @Prop() autocomplete: string = 'off';\n\n /**\n * This property sets the maximum value of the input.\n */\n @Prop() max?: string | number;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the maximum number of characters that the user can enter.\n */\n @Prop() maxlength?: number;\n\n /**\n * This property sets the minimum value, which must not be greater than its maximum (max attribute) value.\n */\n @Prop() min?: string | number;\n\n /**\n * This property sets the interval between numbers in the input field.\n */\n @Prop() step?: string | number;\n\n /**\n * This property is used to set the tooltip text.\n */\n @Prop() tooltip: string | null = null\n\n /*****************************\n * EVENTS\n ******************************/\n\n /**\n * This event is emitted when when the input field gets focus.\n */\n @Event() somFocus: EventEmitter;\n\n /**\n * This event is emitted when when a keyboard input occurs.\n */\n @Event() somInput: EventEmitter;\n\n /**\n * This event is emitted when when the input field loses focus.\n */\n @Event() somBlur: EventEmitter;\n\n /**\n * This event is emitted when the input value changes.\n */\n @Event() somChange: EventEmitter;\n\n\n /*****************************\n * STATE VARIABLES\n ******************************/ \n\n @State() currentValue: string = '';\n\n @Watch('value')\n handleValueChange() {\n this.currentValue = this.value;\n }\n\n htmlElement: HTMLInputElement;\n\n helpElementId;\n\n handleFocusCb;\n\n handleInputCb;\n\n handleBlurCb;\n\n handleChangeCb;\n\n tooltipID: string = generateId('som-tooltipID-');\n\n /**\n * This public method sets focus to the text input element.\n * @returns Promise will resolve after focus.\n */\n @Method()\n setFocus(): Promise<void> {\n return focusElement(this.htmlElement);\n }\n\n handleFocus(e) {\n this.somFocus.emit(e);\n }\n\n handleInput(e) {\n this.currentValue = e.target.value;\n this.value = e.target.value;\n this.somInput.emit(e);\n }\n\n handleBlur(e) {\n this.somBlur.emit(e);\n }\n\n handleChange(e) {\n this.value = e.target.value;\n this.somChange.emit(e);\n }\n\n registerEvents() {\n this.htmlElement.addEventListener('focus', this.handleFocusCb);\n this.htmlElement.addEventListener('input', this.handleInputCb);\n this.htmlElement.addEventListener('blur', this.handleBlurCb);\n this.htmlElement.addEventListener('change', this.handleChangeCb);\n }\n\n unregisterEvents() {\n this.htmlElement.removeEventListener('focus', this.handleFocusCb);\n this.htmlElement.removeEventListener('input', this.handleInputCb);\n this.htmlElement.removeEventListener('blur', this.handleBlurCb);\n this.htmlElement.removeEventListener('change', this.handleChangeCb);\n }\n\n componentWillLoad() {\n this.helpElementId = `${this.inputId}-help`;\n this.currentValue = this.value;\n\n this.handleFocusCb = this.handleFocus.bind(this);\n this.handleInputCb = this.handleInput.bind(this);\n this.handleBlurCb = this.handleBlur.bind(this);\n this.handleChangeCb = this.handleChange.bind(this);\n }\n\n componentDidLoad() {\n this.htmlElement = this.el.querySelector(`#${this.inputId}`);\n this.registerEvents();\n }\n\n componentWillUnload() {\n this.unregisterEvents();\n }\n\n render() {\n const _isInError = isInError(this.error);\n const helpMessage = _isInError ? this.error : this.help;\n const ariaInvalid = _isInError ? { 'aria-invalid': 'true' } : {};\n const _requiredInd = getRequiredInd(h, this.required, this.requiredInd);\n\n return (\n <div class=\"form-group\">\n <div>\n <label class={`${this.labelClass} ${this.hideLabel ? 'sr-only' : ''}`} htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n {_requiredInd}\n </label>\n { this.tooltip ?\n <span>\n <som-button class='tooltip-button' button-aria-label={`${this.label} information`} button-type=\"clear\" icon-position=\"only\" color=\"primary\" icon=\"information\" aria-describedby={this.tooltipID}>\n </som-button>\n <som-tooltip tooltip-id={this.tooltipID}>\n {this.tooltip}\n </som-tooltip>\n </span> : null\n }\n </div>\n\n <div slot=\"content\" class={`${this.grouped ? 'input-group' : ''} input-form-field d-flex align-items-center`}>\n <slot name='before-input' />\n <input\n id={this.inputId}\n class={`form-control ${_isInError ? 'is-invalid' : ''}`}\n type={this.type}\n placeholder={this.placeholder || null}\n name={this.name || null}\n disabled={this.disabled}\n readonly={this.readonly}\n required={this.required}\n autoComplete={this.autocomplete}\n max={this.max}\n maxLength={this.maxlength}\n min={this.min}\n step={this.step}\n aria-label={this.inputAriaLabel}\n value={this.currentValue}\n {...ariaDescribedby(this.help, this.error, this.helpElementId)}\n {...ariaInvalid}\n />\n \n <slot name='after-input' />\n \n {this.grouped ? (\n <div class=\"input-group-append\">\n <slot />\n </div>\n ) : null}\n </div>\n {helpMessage ? (\n <small id={this.helpElementId} class={`form-text ${_isInError ? 'text-error' : 'text-muted'}`}>\n {helpMessage}\n </small>\n ) : null}\n </div> \n );\n }\n}\n","@import '../../sass/components/list';","import { Component, Listen, h, State, Prop, Element, Watch } from '@stencil/core';\n\n/**\n * Badges help draw attention to important content and can provide additional context to UI elements.\n */\n@Component({\n tag: 'som-list',\n styleUrl: 'som-list.scss',\n shadow: true,\n})\nexport class SomList {\n @Element() el: HTMLElement;\n childEl: HTMLElement;\n\n /**\n * This property determines what style the list will use.\n */\n @Prop() type: 'header' | 'panel' | 'dropdown' | 'sidebar' = 'panel'; \n\n @State() isSubListOpen: boolean = false;\n \n listEl;\n\n componentWillLoad() {\n this.injectAttrs();\n }\n\n @Watch('type')\n attrsUpdated() {\n this.injectAttrs();\n }\n\n /**\n * If the slot changes, someone adds or removes items, process the attributes again\n */\n handleSlotChange() {\n this.injectAttrs();\n }\n\n /**\n * Loop through list items and add appropriate type attribute\n */\n injectAttrs() {\n this.el.childNodes.forEach(element => {\n element[\"type\"] = this.type;\n }); \n }\n\n /**\n * Listen for when the parent list item is open and hide/show list items that are no longer displayed\n * Hiding the items helps keyboard navigation\n */\n @Listen('listOpened')\n listOpenedHandler() {\n this.isSubListOpen = true;\n\n let levelOneNav = Array.prototype.slice.call(this.listEl.querySelectorAll('som-list-item:not(.open), som-list-parent-item:not(.open)'));\n levelOneNav.map(item => {\n item.style.display = 'none';\n });\n\n let levelTwoNav = Array.prototype.slice.call(this.listEl.querySelectorAll('som-list-item.open'));\n levelTwoNav.map(item => {\n item.style.display = 'unset';\n }); \n }\n\n /**\n * Listen for when the parent list item is about and hide/show list items that are no longer displayed\n * Hiding the items helps keyboard navigation\n */\n @Listen('beforeListClosed')\n listClosedHandler() {\n this.isSubListOpen = false;\n let levelOneNav = Array.prototype.slice.call(this.listEl.querySelectorAll('som-list-item:not(.open), som-list-parent-item:not(.open)'));\n levelOneNav.map(item => {\n item.style.display = 'unset';\n });\n\n let levelTwoNav = Array.prototype.slice.call(this.listEl.querySelectorAll('som-list-item.closed'));\n levelTwoNav.map(item => {\n item.style.display = 'none';\n }); \n }\n\n render() {\n return (\n <div class={`list-container ${this.type}`} ref={(el) => this.listEl = el}>\n <slot onSlotchange={() => this.handleSlotChange()}></slot>\n </div>\n );\n }\n}","@import '../../sass/base/variables';\n@import '../../sass/variables/buttons';\n@import '../../sass/base/mixins';\n@import '../../sass/mixins/links';\n@import '../../sass/mixins/border-radius';\n@import '../../sass/mixins/transition';\n@import '../../sass/mixins/buttons';\n\n.list-item {\n color: $body-copy;\n\n &.header {\n display: flex;\n align-items: center;\n height: 100%;\n\n @include hover-focus{\n background-color: transparent;\n }\n &::slotted(a) {\n @include header-list-link;\n }\n }\n\n &.sidebar-child {\n &::slotted(a) {\n @include sidebar-child-list-link;\n border: none;\n outline: none;\n }\n\n @include panel-active-link;\n }\n\n &.sidebar {\n // @include hover-focus{\n // background-color: transparent;\n // }\n &::slotted(a) {\n @include sidebar-list-link;\n border: none;\n outline: none;\n } \n\n @include panel-active-link;\n }\n &.dropdown{\n &::slotted(a) {\n @include list-link;\n }\n }\n &.dropdown-nav{\n &::slotted(a) {\n @include header-dropdown-link;\n }\n }\n &.panel{\n &::slotted(a) {\n @include panel-list-link;\n }\n\n @include panel-active-link;\n }\n &.panel-child {\n &::slotted(a) {\n @include panel-child-list-link;\n background: $light-gray;\n border: none;\n outline: none;\n }\n \n @include panel-active-link;\n }\n @include hover-focus{\n background-color: $light-gray;\n } \n}","import { Component, Prop, h } from '@stencil/core';\n\n/**\n * Badges help draw attention to important content and can provide additional context to UI elements.\n */\n@Component({\n tag: 'som-list-item',\n styleUrl: 'som-list-item.scss',\n scoped: true,\n})\nexport class SomListItem {\n /**\n * This property determines what style the list will use.\n */\n @Prop({reflect:true}) type: 'header' | 'panel' | 'dropdown' | 'sidebar' = 'panel';\n\n /**\n * This boolean is used to set the active list item. \n */\n @Prop() active: boolean = false;\n\n /**\n * This boolean is used to set the divider. \n */\n @Prop() showDivider: boolean = false;\n\n render() {\n return (\n <div class={`list-item ${this.showDivider && 'border-left'} ${this.type} ${this.active ? 'active' : ''}`}>\n <slot></slot>\n </div>\n );\n }\n}\n","@import '../../sass/base/variables';\n@import '../../sass/variables/buttons';\n@import '../../sass/base/mixins';\n@import '../../sass/mixins/links';\n@import '../../sass/mixins/border-radius';\n@import '../../sass/mixins/transition';\n@import '../../sass/mixins/buttons';\n\n/**\n* List Parent Item Mixins\n*/\n\n@keyframes slideInRight {\n from {\n transform: translate3d(100%, 0, 0);\n visibility: visible;\n display:block;\n }\n\n to {\n transform: translate3d(0, 0, 0);\n }\n}\n\n\n@keyframes slideOutRight {\n from {\n transform: translate3d(0, 0, 0);\n }\n\n to {\n transform: translate3d(100%, 0, 0);\n }\n}\n\n\n/** \n* Sidebar Styles\n**/\n:host[type=\"sidebar\"] {\n som-accordion::part(label) {\n @include text-type(6, 500);\n text-align: left;\n letter-spacing: 1px;\n white-space: normal;\n vertical-align: middle;\n user-select: none;\n color: $header-copy;\n }\n\n som-accordion::part(button) {\n padding: .5rem .5rem .5rem 1.5rem;\n margin:0;\n }\n\n som-accordion::part(button):focus-visible {\n background-color: $smoke;\n }\n\n som-accordion::part(button-open) {\n background: none\n } \n\n som-accordion::part(button-open):hover {\n background-color: $smoke;\n }\n\n som-accordion::part(accordion) {\n border: none;\n }\n\n som-accordion::part(arrow) {\n font-size: 1.25rem;\n }\n}\n\n:host[type=\"panel\"] {\n som-accordion::part(label) {\n @include text-type(5, 500);\n text-align: left;\n letter-spacing: 1px;\n white-space: normal;\n vertical-align: middle;\n user-select: none;\n color: $header-copy;\n }\n \n som-accordion::part(button) { \n padding: .75rem .75rem .75rem 1rem;\n margin:0;\n }\n \n som-accordion::part(button):focus-visible {\n background-color: $smoke;\n }\n \n som-accordion::part(button-open) {\n background: none\n } \n \n som-accordion::part(button-open):hover {\n background-color: $smoke;\n }\n \n som-accordion::part(accordion) {\n border: none;\n }\n \n som-accordion::part(arrow) {\n font-size: 1.25rem;\n }\n\n .panel-child-container {\n border-top: 1px solid $border-color;\n border-bottom: 1px solid $border-color;\n }\n}\n\n/**\n* List Parent Item Styles\n*/\n.list-parent-item {\n &.header {\n display: flex;\n align-items: center;\n height: 100%;\n }\n\n &__link {\n @include panel-list-link;\n display:flex;\n justify-content: space-between;\n }\n\n &__children {\n top:0;\n height: 100%;\n width: 100%;\n position: absolute;\n background: white;\n }\n}","import { Component, Prop, State, Method, Event, Host, Watch, Element, Listen, h } from '@stencil/core';\n\n/**\n * Badges help draw attention to important content and can provide additional context to UI elements.\n */\n@Component({\n tag: 'som-list-parent-item',\n styleUrl: 'som-list-parent-item.scss',\n scoped: true,\n})\nexport class SomListParentItem {\n @Element() el: HTMLElement;\n buttonDropdownEl: HTMLSomButtonDropdownElement;\n accrodionEl: HTMLSomAccordionElement;\n\n /**\n * This property represents the name that is displayed as the parent in the list.\n */\n @Prop() displayName: string = '';\n\n /**\n * This property identifies the type of list.\n */\n @Prop({reflect: true}) type: 'header' | 'panel' | 'sidebar' = 'panel';\n\n /**\n * This property represents the horizontal position of the dropdown menu. This is used for header menu items with children and is helpful when the last item aligns to the right.\n */\n @Prop() horizontalPosition: 'right' | 'left' = 'left';\n\n /**\n * This Boolean is used to set the divider. \n */\n @Prop() showDivider: boolean = false;\n\n /**\n * This property will toggle the open state.\n */\n @Prop({ mutable: true, reflect: true }) collapsed: boolean = true;\n\n @State() animating = false;\n\n /**\n * This event is emitted after the list closes.\n */\n @Event() listClosed;\n /**\n * This event is emitted after the list opens.\n */\n @Event() listOpened;\n /**\n * This event is emitted before the list opens.\n */\n @Event() beforeListOpened;\n /**\n * This event is emitted before the list closes.\n */\n @Event() beforeListClosed;\n\n childListEl;\n parentListEl;\n backButtonEl;\n\n // Focus & tabbable elements\n focusedElBeforeOpen;\n a;\n focusableEls;\n firstFocusableEl;\n lastFocusableEl;\n\n\n componentWillLoad() {\n this.injectAttrs();\n }\n\n @Watch('type')\n attrsUpdated() {\n this.injectAttrs();\n }\n\n injectAttrs() {\n this.el.childNodes.forEach(element => {\n let _type;\n switch (this.type) {\n case 'header':\n _type = 'dropdown-nav';\n break;\n case 'sidebar':\n _type = 'sidebar-child';\n break;\n case 'panel':\n _type = 'panel-child';\n break;\n default:\n _type = this.type; \n break;\n }\n //element[\"type\"] = (this.type === 'header') ? 'dropdown-nav' : this.type ;\n element[\"type\"] = _type;\n }); \n }\n\n /**\n * Listen for a panel close event and close the child menu\n */\n @Listen('beforeClose', { target: 'window' })\n handlePanelClose() {\n this.close();\n }\n\n /**\n * This method will open the panel.\n * @returns Promise will resolve when the open animation ends.\n */\n @Method()\n async open() {\n if (this.collapsed) {\n this.beforeListOpened.emit();\n this.listOpened.emit();\n\n this.collapsed = false;\n (this.type === 'header') ? this.buttonDropdownEl.open() : this.accrodionEl.show();\n }\n }\n\n /**\n * This method will close the panel.\n * @returns Promise will resolve when the close animation ends.\n */\n @Method()\n async close() {\n if (!this.collapsed) {\n this.beforeListClosed.emit();\n this.listClosed.emit();\n\n this.collapsed = true;\n (this.type === 'header') ? this.buttonDropdownEl.close() : this.accrodionEl.hide();\n }\n }\n\n determineRender() {\n switch (this.type) {\n case 'header':\n return this.renderHeader();\n case 'panel':\n return this.renderPanel();\n case 'sidebar': \n return this.renderSidebar();\n default:\n return this.renderPanel()\n }\n }\n\n renderHeader() {\n return (\n <som-button-dropdown class={`list-parent-item ${this.showDivider && 'border-left'} ${this.type}`} button-text={this.displayName} button-type=\"clear\" color=\"nav\" horizontal-position={this.horizontalPosition} collapsed={this.collapsed} ref={ref => { this.buttonDropdownEl = ref; }}>\n <slot></slot>\n </som-button-dropdown>\n );\n }\n\n renderSidebar() {\n return (\n <som-accordion label={this.displayName} collapsed={this.collapsed} ref={ref => { this.accrodionEl = ref; }}>\n <slot></slot>\n </som-accordion>\n );\n }\n\n renderPanel () {\n return (\n <som-accordion label={this.displayName} collapsed={this.collapsed} ref={ref => { this.accrodionEl = ref; }}>\n <div class=\"panel-child-container\">\n <slot></slot>\n </div>\n </som-accordion>\n );\n }\n\n render() {\n return (\n <Host class={`${!this.collapsed ? 'open' : 'closed'}`}>\n {this.determineRender()}\n </Host>\n );\n }\n}\n","// Taken from https://github.com/willmcpo/body-scroll-lock/releases/tag/v2.6.1\n\n// @flow\n// Adopted and modified solution from Bohdan Didukh (2017)\n// https://stackoverflow.com/questions/41594997/ios-10-safari-prevent-scrolling-behind-a-fixed-overlay-and-maintain-scroll-posi\n\nexport interface BodyScrollOptions {\n reserveScrollBarGap?: boolean;\n allowTouchMove?: (el: any) => boolean;\n}\n\ninterface Lock {\n targetElement: any;\n options: BodyScrollOptions;\n}\n\n// Older browsers don't support event options, feature detect it.\nlet hasPassiveEvents = false;\nif (typeof window !== 'undefined') {\n const passiveTestOptions = {\n get passive() {\n hasPassiveEvents = true;\n return undefined;\n },\n };\n window.addEventListener('testPassive', null, passiveTestOptions);\n // @ts-ignore\n window.removeEventListener('testPassive', null, passiveTestOptions);\n}\n\n// YUNGEK - Setting this to false always as it seems unnecessary with the new native dialog component. We still want to prevent body scrolling though so we can do that globally.\nconst isIosDevice = false;\n/*\nconst isIosDevice = (\n typeof window !== 'undefined'\n && window.navigator\n && window.navigator.platform\n && /iP(ad|hone|od)/.test(window.navigator.platform)\n);*/\ntype HandleScrollEvent = TouchEvent;\n\nlet locks: Array<Lock> = [];\nlet documentListenerAdded: boolean = false;\nlet initialClientY: number = -1;\nlet previousBodyOverflowSetting;\nlet previousBodyPaddingRight;\n\n// returns true if `el` should be allowed to receive touchmove events\nconst allowTouchMove = (el: EventTarget): boolean => locks.some((lock) => {\n if (lock.options.allowTouchMove && lock.options.allowTouchMove(el)) {\n return true;\n }\n\n return false;\n});\n\nconst preventDefault = (rawEvent: HandleScrollEvent): boolean => {\n const e = rawEvent || window.event;\n\n // For the case whereby consumers adds a touchmove event listener to document.\n // Recall that we do document.addEventListener('touchmove', preventDefault, { passive: false }) in disableBodyScroll - so if we provide this opportunity to allowTouchMove, then the touchmove event on document will break.\n if (allowTouchMove(e.target)) {\n return true;\n }\n\n // Do not prevent if the event has more than one touch (usually meaning this is a multi touch gesture like pinch to zoom)\n // @ts-ignore\n if (e.touches.length > 1) return true;\n\n if (e.preventDefault) e.preventDefault();\n\n return false;\n};\n\nconst setOverflowHidden = (options?: BodyScrollOptions) => {\n // Setting overflow on body/documentElement synchronously in Desktop Safari slows down the responsiveness for some reason. Setting within a setTimeout fixes this.\n setTimeout(() => {\n // If previousBodyPaddingRight is already set, don't set it again.\n if (previousBodyPaddingRight === undefined) {\n const reserveScrollBarGap = !!options && options.reserveScrollBarGap === true;\n const scrollBarGap = window.innerWidth - document.documentElement.clientWidth;\n\n if (reserveScrollBarGap && scrollBarGap > 0) {\n previousBodyPaddingRight = document.body.style.paddingRight;\n document.body.style.paddingRight = `${scrollBarGap}px`;\n }\n }\n\n // If previousBodyOverflowSetting is already set, don't set it again.\n if (previousBodyOverflowSetting === undefined) {\n previousBodyOverflowSetting = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n }\n });\n};\n\nconst restoreOverflowSetting = () => {\n // Setting overflow on body/documentElement synchronously in Desktop Safari slows down the responsiveness for some reason. Setting within a setTimeout fixes this.\n setTimeout(() => {\n if (previousBodyPaddingRight !== undefined) {\n document.body.style.paddingRight = previousBodyPaddingRight;\n\n // Restore previousBodyPaddingRight to undefined so setOverflowHidden knows it can be set again.\n previousBodyPaddingRight = undefined;\n }\n\n if (previousBodyOverflowSetting !== undefined) {\n document.body.style.overflow = previousBodyOverflowSetting;\n\n // Restore previousBodyOverflowSetting to undefined so setOverflowHidden knows it can be set again.\n previousBodyOverflowSetting = undefined;\n }\n });\n};\n\n// https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight#Problems_and_solutions\nconst isTargetElementTotallyScrolled = (targetElement: any): boolean => {\n if (targetElement) {\n return (targetElement.scrollHeight - targetElement.scrollTop) <= targetElement.clientHeight;\n }\n\n return false;\n};\n\nconst handleScroll = (\n event: HandleScrollEvent,\n targetElement: any,\n): boolean => {\n const clientY = event.targetTouches[0].clientY - initialClientY;\n\n if (allowTouchMove(event.target)) {\n return false;\n }\n\n if (targetElement && targetElement.scrollTop === 0 && clientY > 0) {\n // element is at the top of its scroll\n return preventDefault(event);\n }\n\n if (isTargetElementTotallyScrolled(targetElement) && clientY < 0) {\n // element is at the top of its scroll\n return preventDefault(event);\n }\n\n event.stopPropagation();\n return true;\n};\n\nexport const disableBodyScroll = (\n targetElement: any,\n options?: BodyScrollOptions,\n): void => {\n if (isIosDevice) {\n // targetElement must be provided, and disableBodyScroll must not have been called on this targetElement before.\n if (!targetElement) {\n // eslint-disable-next-line no-console\n console.error(\n 'disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.',\n );\n return;\n }\n\n if (targetElement && !locks.some(lock => lock.targetElement === targetElement)) {\n const lock = {\n targetElement,\n options: options || {},\n };\n\n locks = [...locks, lock];\n\n // eslint-disable-next-line no-param-reassign\n targetElement.ontouchstart = (event: HandleScrollEvent) => {\n if (event.targetTouches.length === 1) {\n // detect single touch\n initialClientY = event.targetTouches[0].clientY;\n }\n };\n // eslint-disable-next-line no-param-reassign\n targetElement.ontouchmove = (event: HandleScrollEvent) => {\n if (event.targetTouches.length === 1) {\n // detect single touch\n handleScroll(event, targetElement);\n }\n };\n\n if (!documentListenerAdded) {\n (<any>document).addEventListener(\n 'touchmove',\n preventDefault,\n hasPassiveEvents ? { passive: false } : undefined,\n );\n documentListenerAdded = true;\n }\n }\n } else {\n setOverflowHidden(options);\n const lock = {\n targetElement,\n options: options || {},\n };\n\n locks = [...locks, lock];\n }\n};\n\nexport const clearAllBodyScrollLocks = (): void => {\n if (isIosDevice) {\n // Clear all locks ontouchstart/ontouchmove handlers, and the references\n locks.forEach((lock: Lock) => {\n // eslint-disable-next-line no-param-reassign\n lock.targetElement.ontouchstart = null;\n\n // eslint-disable-next-line no-param-reassign\n lock.targetElement.ontouchmove = null;\n });\n\n if (documentListenerAdded) {\n // @ts-ignore\n (<any>document).removeEventListener(\n 'touchmove',\n preventDefault,\n hasPassiveEvents ? { passive: false } : undefined,\n );\n documentListenerAdded = false;\n }\n\n locks = [];\n\n // Reset initial clientY\n initialClientY = -1;\n } else {\n restoreOverflowSetting();\n locks = [];\n }\n};\n\nexport const enableBodyScroll = (targetElement: any): void => {\n if (isIosDevice) {\n if (!targetElement) {\n // eslint-disable-next-line no-console\n console.error(\n 'enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.',\n );\n return;\n }\n\n // eslint-disable-next-line no-param-reassign\n targetElement.ontouchstart = null;\n // eslint-disable-next-line no-param-reassign\n targetElement.ontouchmove = null;\n\n locks = locks.filter(lock => lock.targetElement !== targetElement);\n\n if (documentListenerAdded && locks.length === 0) {\n (<any>document).removeEventListener(\n 'touchmove',\n preventDefault,\n hasPassiveEvents ? { passive: false } : undefined,\n );\n\n documentListenerAdded = false;\n }\n } else if (locks.length === 1 && locks[0].targetElement === targetElement) {\n restoreOverflowSetting();\n\n locks = [];\n } else {\n locks = locks.filter(lock => lock.targetElement !== targetElement);\n }\n};","@import '../../sass/base/variables';\n@import '../../sass/helpers';\n@import '../../sass/mixins/screen-reader';\n@import '../../sass/mixins/type';\n\nsom-modal {\n @keyframes modalAnimated {\n 0% {\n opacity: 0;\n transform: scale(0.7);\n }\n\n 100% {\n opacity: 1;\n transform: scale(1);\n }\n }\n\n @keyframes overlayAnimated {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n }\n\n *,\n ::after,\n ::before {\n box-sizing: border-box;\n }\n\n dialog {\n padding: unset;\n border: none;\n }\n\n .modal {\n border-radius: 2px;\n transition: all 0.3s;\n width: 100%;\n z-index: $modal-index;\n overflow-y: auto;\n position: fixed;\n animation-name: modalAnimated;\n animation-duration: 0.3s;\n\n &::backdrop {\n z-index: $panel-overlay-index;\n background: $overlay-background;\n backdrop-filter: blur(8px);\n width: 100%;\n height: 100%;\n transition: all 0.3s;\n }\n\n &[open]::backdrop {\n animation-name: overlayAnimated;\n animation-duration: 0.3s;\n }\n\n &:not([open]) {\n pointer-events: none;\n opacity: 0;\n }\n\n &:focus {\n outline: none;\n border: none;\n }\n\n &.modal-sm {\n max-width: 300px;\n }\n\n &.modal-md {\n max-width: 500px\n }\n\n &.modal-lg {\n max-width: 800px;\n }\n\n .close-button {\n position: sticky;\n right: .5rem;\n top: .5rem;\n z-index: 1;\n float: right;\n padding:0;\n background-color: transparent;\n border:0;\n border-radius: 50%;\n cursor: pointer;\n color: $navy;\n font-size: 1.5rem;\n transition: all 0.15s;\n\n &:hover, &.scrolling:hover, &.scrolling:focus-visible {\n background-color: $smoke;\n color: $black;\n }\n\n &:focus-visible, &.scrolling {\n outline: $focus-border-width solid $navy;\n }\n\n &:focus-visible {\n background-color: $smoke;\n }\n\n &.scrolling {\n background-color: $white;\n }\n }\n\n .modal-content {\n width: 100%;\n height: auto;\n\n .modal-content-flex {\n display: flex;\n flex: 1;\n flex-direction: column;\n }\n\n .title {\n @include text-type(2, 700);\n }\n\n\n .modal-body {\n max-height: 70vh;\n background: white;\n\n .modal-body-content {\n position: relative;\n }\n }\n }\n }\n\n .sr-only {\n @include sr-only();\n }\n\n // Mobile version\n @media (max-width: 767.98px) {\n &[open] {\n /* Making sure a dark line doesn't appear because of transition calculations */\n background-color: $white;\n }\n\n .modal {\n width: 100% !important;\n max-height: 100dvh;\n min-height: 100dvh;\n max-width: 100% !important;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n border: 0;\n border-radius: 0;\n\n .modal-content {\n border: 0;\n min-height: 100%;\n\n .modal-body {\n max-height: 100% !important;\n }\n }\n }\n }\n}\n","import { Component, Prop, Element, Event, EventEmitter, Method, State, Listen, h, Host } from '@stencil/core';\nimport { generateId } from '../../utils/functions';\nimport { disableBodyScroll, enableBodyScroll, clearAllBodyScrollLocks } from '../../utils/bodyScrollLock';\nimport { KEY_CODES } from '../../utils/variables';\n\n/**\n * Modal dialogs are full screen overlays that interrupt user interaction and demand an action. They are appropriate when user’s attention needs to be directed toward important information.\n */\n@Component({\n tag: 'som-modal',\n styleUrl: 'som-modal.scss',\n})\nexport class SomModal {\n @Element() el: HTMLElement;\n\n /**\n * This property will be displayed in the header of your modal.\n */\n @Prop() headline: string;\n\n /**\n * This property sets the aria label of the modal.\n */\n @Prop() modalAriaLabel: string;\n\n /**\n * This property will not be displayed on the screen but will be used to further describe the modal to screen reader users.\n */\n @Prop() description: string;\n\n /**\n * This boolean is used to control the width of the modal.\n */\n @Prop() size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * This boolean is used to enable closing the modal with keyboard's ESC key.\n */\n @Prop() enableKeyboardClose: boolean = true;\n\n /**\n * This boolean is used to enable closing the modal when clicking on the overlay outside of the modal.\n */\n @Prop() enableOverlayClose: boolean = true;\n\n /**\n * This boolean is used to hide the header's close button.\n */\n @Prop() hideCloseButton: boolean = false;\n\n /**\n * This property is used to set padding around the card\n */\n @Prop() modalPadding: string = \"2\";\n\n /**\n * @deprecated with version 4.0 release\n * This monitors whether the modal is open or closed\n */\n @State() modalHidden: boolean;\n\n /**\n * This event is emitted before the modal opens.\n */\n @Event() modalOpen: EventEmitter;\n\n /**\n * This event is emitted after the modal closes.\n */\n @Event() modalClose: EventEmitter;\n\n /**\n * Private Variables\n */\n\n modalElement;\n\n modalContainerEl; // Modal content container\n\n modalEl; // Modal element\n\n // Holds unique id for describe div - this is in place in case the user injects multiple modals on a page and we can ensure id uniqueness\n describedById;\n\n modalBody;\n\n modalCloseBtn;\n\n /**\n * This method will open the modal.\n * @returns Promise will resolve when the open animation ends.\n */\n @Method()\n open(): Promise<void> {\n return new Promise(resolve => {\n if (!this.modalElement.open) {\n // Triggers that the modal will open\n this.modalOpen.emit();\n\n this.modalElement.showModal();\n\n // Make sure scolling on body is disabled (allow scrolling only on the modal element)\n disableBodyScroll(this.modalElement);\n\n resolve();\n }\n });\n }\n\n /**\n * This method will close the modal.\n * @returns Promise will resolve when the close animation ends.\n */\n @Method()\n close(): Promise<void> {\n return new Promise(resolve => {\n\n if (this.modalElement.open) {\n\n // Enable body scrolling back\n enableBodyScroll(this.modalElement);\n\n // Triggers that the modal has closed\n this.modalClose.emit();\n\n // Close modal\n setTimeout(() => {\n this.modalElement.close();\n resolve();\n }, 0);\n } else {\n // Already closed\n resolve();\n }\n });\n }\n\n /**\n * This method will refresh the modal. This is useful when modal data is loaded asynchronously.\n * @deprecated with version 4.0 release\n * @returns Promise will resolve after the refresh.\n */\n @Method()\n refresh(): Promise<void> {\n return new Promise(resolve => {\n setTimeout(() => resolve(), 0);\n });\n }\n\n @Listen('keydown')\n _handleKeyDown(e) {\n switch (e.keyCode) {\n case KEY_CODES.ESC:\n if (!this.enableKeyboardClose) {\n e.preventDefault();\n e.returnValue = false;\n } else {\n this.close();\n }\n break;\n default:\n break;\n }\n }\n\n handleOverlayClick(e) {\n // Close modal when a click occurs only on the dialog and the enableOverlayClose is set to true\n if (e.target === this.modalElement && this.enableOverlayClose) {\n this.close();\n }\n }\n\n handleModalScroll(event) {\n // There is no close button so don't run this code.\n if (this.hideCloseButton) return true;\n\n const e = event.target;\n if (e.scrollTop) {\n this.modalCloseBtn.classList.add('scrolling');\n } else {\n this.modalCloseBtn.classList.remove('scrolling');\n }\n }\n\n getModalStyles() {\n const styles = ['modal'];\n if (this.size) styles.push(`modal-${this.size}`);\n return styles.join(' ');\n }\n\n componentWillLoad() {\n this.describedById = generateId('modal-description');\n }\n\n componentDidLoad() {\n this.modalElement = this.el.querySelector('dialog');\n\n this.modalBody = this.el.querySelector('.modal-body');\n\n this.modalCloseBtn = this.el.querySelector('.close-button');\n\n this.handleOverlayClick = this.handleOverlayClick.bind(this);\n this.modalElement.addEventListener('click', this.handleOverlayClick);\n\n this.handleModalScroll = this.handleModalScroll.bind(this);\n this.modalElement.addEventListener('scroll', this.handleModalScroll);\n }\n\n disconnectedCallback() {\n // Make sure to reenable body scroll in case it was previously deactivated\n clearAllBodyScrollLocks();\n }\n\n render() {\n const opts: any = {\n 'class': this.getModalStyles(),\n };\n\n if (this.modalAriaLabel) {\n opts['aria-label'] = this.modalAriaLabel;\n }\n\n if (this.description) {\n opts['aria-describedby'] = this.describedById;\n }\n\n this.modalEl = (\n <dialog {...opts} ref={el => this.modalContainerEl = el}>\n {!this.hideCloseButton ? (\n <button class=\"close-button\" onClick={() => this.close()} aria-label=\"Close modal\">\n <span aria-hidden=\"true\">\n <som-icon name=\"close\" display=\"block\"></som-icon>\n </span>\n </button>\n ) : null}\n <div class=\"modal-content\">\n {this.description ? (\n <div id={this.describedById} class=\"sr-only\">\n {this.description}\n </div>\n ) : null}\n <div class=\"modal-body\">\n <div class={`modal-body-content p-${this.modalPadding}`}>\n {this.headline ? <div class=\"title mb-1_5\">{this.headline}</div> : null }\n <slot />\n </div>\n </div>\n </div>\n </dialog>\n );\n\n return (\n <Host>\n {this.modalEl}\n </Host>\n );\n }\n}\n","@import '../../sass/base/helpers';\n\nsom-pagination {\n .pagination-container {\n display: flex;\n\n &__grid {\n justify-content: space-between;\n align-items: center;\n border-bottom-left-radius: 2px;\n border-bottom-right-radius: 2px;\n border: 1px solid $border-color;\n border-top: none;\n padding: .5rem 1.5rem .5rem .5rem;\n\n &.no-border {\n border: none;\n padding: .5rem 0;\n }\n }\n\n &__page {\n flex-direction: column-reverse;\n justify-content: center;\n align-items:center;\n\n .pagination-items {\n margin-bottom: 1rem;\n }\n }\n\n .pagination {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n \n som-button {\n .btn-white {\n background-color: transparent;\n \n &:hover {\n background-color: $smoke;\n background-blend-mode: multiply;\n }\n }\n }\n \n &__previous {\n //margin-right: 1rem;\n min-width:2rem; // This is used to minimize the redraw when page changes\n }\n \n &__next {\n //margin-left: 1rem;\n min-width:2rem; // This is used to minimize the redraw when page changes\n }\n \n &__mobile {\n display: block !important;\n }\n \n &__desktop {\n display: none !important;\n }\n \n @include media-breakpoint-up(\"md\") { \n &__mobile {\n display: none !important;\n }\n \n &__desktop {\n display: flex !important;\n }\n }\n \n }\n \n \n ul {\n list-style: none;\n padding: 0;\n margin: 0;\n display: flex;\n flex-direction: row;\n \n li {\n display: flex;\n justify-content: center;\n align-items: center;\n margin-right: 2px; // allows focus ring to not get cutoff\n min-width:2rem; // This is used to minimize the redraw when page changes\n \n .three-dots {\n width: 1rem;\n text-align: center;\n \n &::after {\n content: \" \\B7 \\B7 \\B7 \";\n }\n }\n }\n }\n\n .pagination-items {\n @include text-type(6, 500);\n }\n }\n}\n","import { Component, Prop, Element, Event, EventEmitter, h, Watch, State } from '@stencil/core';\nimport { focusElement } from '../../utils/functions';\n\n/**\n * TODO\n */\n@Component({\n tag: 'som-pagination',\n styleUrl: 'som-pagination.scss',\n})\nexport class SomPagination {\n handlePreviousPageCb;\n\n handleNextPageCb;\n\n @Element() el: HTMLElement;\n\n\n /***\n * \n * State Variables\n * \n */\n @State() pageIndex = 0;\n @State() nbPages = 0; \n\n /**\n * \n * Properties\n * \n */\n\n /**\n * This property determines the UI in which the pagination component will be rendered. Use `grid` for add the element to `som-grid` and use `page` when adding it to non-grid use cases.\n */\n @Prop() view: 'grid' | 'page' = 'grid';\n\n /**\n * This property shows the number of items to display per page\n */\n @Prop() itemsPerPage: number = 10;\n\n @Watch('itemsPerPage')\n handleItemsPerPageChange() {\n this.calculateNumberOfPages();\n }\n\n /**\n * This property shows the total number of items in the grid\n */\n @Prop() totalItems: number;\n \n @Watch('totalItems')\n handleTotalItemsChange() {\n this.calculateNumberOfPages();\n }\n\n /**\n * This boolean adds borders to grid view.\n */\n @Prop() borders: boolean = true;\n\n /**\n * This property shows the current active page (starting index is `0`).\n */\n @Prop({ mutable: true, reflect: true }) page: number = 0;\n\n @Watch('page')\n handlePageChange(newValue) {\n this.pageIndex = newValue;\n //this.pageChanged.emit(newValue);\n }\n\n /**\n * This property describes the table associated with the pagination. It is used to describe the pagination actions for screen readers.\n */\n @Prop() tableName: string = '';\n\n /**\n * \n * EVENTS\n * \n */\n\n /**\n * This event will be triggered anytime the page is changed.\n */\n @Event() pageChanged: EventEmitter; \n\n \n /***\n * \n * Lifecycle Methods\n * \n */\n componentWillLoad() {\n this.calculateNumberOfPages();\n this.pageIndex = this.page;\n\n this.handlePreviousPageCb = this.handlePreviousPage.bind(this);\n this.handleNextPageCb = this.handleNextPage.bind(this);\n }\n\n /***\n * \n * Component Methods\n * \n */\n\n handlePageClick(page) {\n this.page = page;\n this.pageChanged.emit(this.page);\n this.updateActiveFocus();\n }\n\n handlePreviousPage() {\n if (this.page - 1 >= 0) {\n this.page = this.page - 1;\n this.pageChanged.emit(this.page);\n\n if (this.page === 0) {\n this.updateActiveFocus();\n }\n }\n }\n\n handleNextPage() {\n if (this.page + 1 < this.nbPages) {\n this.page = this.page + 1;\n this.pageChanged.emit(this.page);\n\n if (this.page === this.nbPages - 1) {\n this.updateActiveFocus();\n }\n }\n }\n\n updateActiveFocus() {\n // Wait after next frame render and focus new active button\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n focusElement(this.el.querySelector('li.active > som-button'));\n });\n });\n }\n\n calculateViewableItems() {\n const viewableEnd = this.itemsPerPage * (this.page + 1);\n const viewableStart = viewableEnd - (this.itemsPerPage - 1);\n\n if (this.totalItems !== undefined) {\n return ([\n <span class=\"sr-only\">Showing {viewableStart} through {(viewableEnd < this.totalItems) ? viewableEnd : this.totalItems} records of {this.totalItems} total records</span>,\n <span aria-hidden=\"true\">{viewableStart} - {(viewableEnd < this.totalItems) ? viewableEnd : this.totalItems} of {this.totalItems}</span>\n ])\n } else {\n return null;\n }\n }\n\n calculateNumberOfPages() {\n this.nbPages = Math.ceil(this.totalItems / this.itemsPerPage);\n }\n\n getPageElement(i: number) {\n return (\n <li key={`${i}-${this.pageIndex === i}`} class={this.pageIndex === i ? 'active' : ''}>\n <som-button aria-label={`${this.tableName} page ${i + 1}`} onClick={() => this.handlePageClick(i)} color={this.pageIndex === i ? 'primary' : 'white'} size=\"sm\">\n {i + 1}\n </som-button>\n </li>\n );\n }\n\n getPageElements() {\n const pageElements = [];\n const LIMIT = 4;\n if (this.nbPages <= 7) {\n for (let i = 0; i < this.nbPages; i++) {\n pageElements.push(this.getPageElement(i));\n }\n } else if (this.pageIndex < LIMIT) {\n // Current page is in the beginning\n for (let i = 0; i < LIMIT + 1; i++) {\n pageElements.push(this.getPageElement(i));\n }\n\n // Add last page link\n pageElements.push(\n <li>\n <div class=\"three-dots\" />\n </li>,\n );\n pageElements.push(this.getPageElement(this.nbPages - 1));\n } else if (this.pageIndex >= this.nbPages - LIMIT) {\n const startIndex = Math.max(0, this.nbPages - LIMIT - 1);\n\n pageElements.push(this.getPageElement(0));\n pageElements.push(\n <li>\n <div class=\"three-dots\" />\n </li>,\n );\n\n // Current page is in the end\n for (let i = startIndex; i < this.nbPages; i++) {\n pageElements.push(this.getPageElement(i));\n }\n } else {\n // Add first page link\n pageElements.push(this.getPageElement(0));\n pageElements.push(\n <li>\n <div class=\"three-dots\" />\n </li>,\n );\n\n for (let i = this.pageIndex - 1; i <= this.pageIndex + 1; i++) {\n pageElements.push(this.getPageElement(i));\n }\n\n // Add last page link\n pageElements.push(\n <li>\n <div class=\"three-dots\" />\n </li>,\n );\n pageElements.push(this.getPageElement(this.nbPages - 1));\n }\n\n return pageElements;\n }\n\n render() {\n return (\n <div class={`pagination-container pagination-container__${this.view} ${(this.view === 'grid' && !this.borders) ? \"no-border\" : null}`}>\n <nav class=\"pagination\" role=\"navigation\" aria-label={`${this.tableName} pagination`}>\n <div class=\"pagination__previous\">\n <som-button onClick={this.handlePreviousPageCb} disabled={this.pageIndex === 0} button-aria-label={`${this.tableName} previous page`} button-type=\"default\" icon-position=\"only\" icon=\"chevron-left\" color=\"white\" size=\"sm\">\n </som-button>\n </div>\n <ul class=\"pagination__desktop\">{this.getPageElements()}</ul>\n <div class=\"pagination__mobile\">\n {this.pageIndex + 1} of {this.nbPages}\n </div>\n <div class=\"pagination__next\">\n <som-button onClick={this.handleNextPageCb} disabled={this.pageIndex === this.nbPages - 1} button-aria-label={`${this.tableName} next page`} button-type=\"default\" icon-position=\"only\" icon=\"chevron-right\" color=\"white\" size=\"sm\">\n </som-button>\n </div>\n </nav>\n <div class=\"pagination-items\" aria-live=\"polite\">\n {this.calculateViewableItems()} \n </div>\n </div>\n );\n }\n} \n","@import '../../sass/components/panel';","import { Component, Element, Event, EventEmitter, Method, Prop, State, Listen, Watch, h, Host } from '@stencil/core';\nimport { whichTransitionEvent } from '../../utils/functions';\nimport { clearAllBodyScrollLocks, disableBodyScroll } from '../../utils/bodyScrollLock';\n\n/**\n * Panels are partial screen overlays that interrupt user interaction and demand an action. They are appropriate when user interaction is temporary and needed only to perform a specific action such as filtering.\n */\n@Component({\n tag: 'som-panel',\n styleUrl: 'som-panel.scss',\n})\nexport class SomPanel {\n @Element() el: HTMLElement;\n\n /**\n * This boolean property is used to display or hide the panel on initial load.\n */\n @Prop({ mutable: true }) shown: boolean = false;\n\n /**\n * This property is where the panel should appear.\n */\n @Prop({ mutable: true }) position: 'left' | 'right' = 'left';\n\n /**\n * This property is used to control the panel’s width. The sizes are as follows: `sm = 20rem`, `md = 30rem`, `lg = 40rem`, `xl = fullscreen - 38px`\n */\n @Prop({ mutable: true }) size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * This property is where the mobile navigation should take effect.\n */\n @Prop({ mutable: true }) breakpoint: 'sm' | 'md' | 'lg' | 'xl' = 'lg';\n\n /**\n * This boolean property is used to hide the panel's close button\n */\n @Prop() hideCloseButton: boolean = false;\n\n //! Would like to remove this prop - only used in header\n /**\n * This boolean property is used to determine if the panel should show over or below header.\n */\n @Prop() belowHeader: boolean = false;\n\n /**\n * State Variables\n */\n @State() preDisplay: boolean = false;\n\n @State() opened: boolean = false;\n\n @State() animating: boolean = false;\n\n /**\n * This event is triggered just before panel is opened.\n */\n @Event() beforeOpen: EventEmitter;\n\n /**\n * This event is triggered right after panel is opened.\n */\n @Event() afterOpen: EventEmitter;\n\n /**\n * This event is triggered just before panel is closed.\n */\n @Event() beforeClose: EventEmitter;\n\n /**\n * This event is triggered right after panel is closed.\n */\n @Event() afterClose: EventEmitter;\n\n elemWithAnimation;\n panelContainer;\n panelDialog;\n panelDidOpenCb;\n panelDidCloseCb;\n panelCloseBtn;\n\n // Focus & tabbable elements\n focusedElBeforeOpen;\n focusableEls = [];\n firstFocusableEl;\n lastFocusableEl;\n\n @Watch('shown')\n shownChanged(newValue) {\n if (newValue) {\n this.open();\n } else {\n this.close();\n }\n }\n\n handleOverlayClick(e) {\n // Close panel when a click occurs on the overlay, outside the modal dimensions\n if (e.target.contains(this.panelDialog)) {\n this.close();\n }\n }\n\n /**\n * Listen for menu parent list item to close so we can appropriately handle body scroll locking\n */\n @Listen('listClosed', { target: 'window' })\n handleListClose() {\n clearAllBodyScrollLocks();\n disableBodyScroll(this.panelContainer);\n }\n\n /**\n * This method will open the panel.\n * @returns Promise will resolve when the open animation ends.\n */\n @Method()\n open(): Promise<void> {\n return new Promise(async resolve => {\n if (!this.opened ) {\n // scroll back up to the top of the page\n document.body.scrollTop = 0;\n document.documentElement.scrollTop = 0;\n\n this.panelDialog.showModal();\n this.opened = false;\n\n // Make sure scolling on body is disabled (allow scrolling only on the panel element)\n disableBodyScroll(this.panelContainer);\n\n await this.refresh();\n\n this.preDisplay = true;\n // Wait for open animation to finish before sending event and resolving\n this.listenForTransitionEnd(this.elemWithAnimation, () => {\n this.panelDidOpen();\n resolve();\n });\n } else {\n // Panel is already opened\n resolve();\n }\n });\n }\n\n /**\n * This method will close the panel.\n * @returns Promise will resolve when the close animation ends.\n */\n @Method()\n close(): Promise<void> {\n return new Promise(resolve => {\n if (this.opened) {\n // Enable body scrolling back\n clearAllBodyScrollLocks();\n\n // Triggers that the modal will close\n this.beforeClose.emit();\n\n this.panelDialog.close();\n\n this.animating = true;\n this.opened = false;\n\n // Wait for open animation to finish before sending event and resolving\n this.listenForTransitionEnd(this.elemWithAnimation, () => {\n this.panelDidClose();\n resolve();\n });\n } else {\n // Panel is already closed\n resolve();\n }\n });\n }\n\n /**\n * This method will refresh the panel. This can be used when loading asynchronous data, which allows the component to find focusable elements and provide optimal accessibility support.\n * @returns Promise will resolve after the refresh.\n */\n @Method()\n refresh(): Promise<void> {\n return new Promise(async resolve => {\n // Refresh focusable elements\n //this.refreshFocusableElements();\n\n // Make sure focus is set to the modal after refresh\n // const currentlyFocusedElement = find(this.focusableEls, elem => elem === document.activeElement);\n // if (!currentlyFocusedElement) {\n // await focusElement(this.panelContainer);\n // }\n\n resolve();\n });\n }\n\n openPanel() {\n this.animating = true;\n this.opened = true;\n }\n\n async panelDidOpen() {\n this.animating = false;\n\n // Triggers that the modal is opened\n this.afterOpen.emit();\n }\n\n async panelDidClose() {\n this.animating = false;\n\n // Triggers that the modal is closed\n this.afterClose.emit();\n }\n\n listenForTransitionEnd(elem, callback) {\n const transitionEvent = whichTransitionEvent();\n let onTransitionCompletedCb;\n const onTransitionCompleted = e => {\n // Make sure transition happened directly on container and not inside\n if (e.target === elem) {\n elem.removeEventListener(transitionEvent, onTransitionCompletedCb);\n // Transition is completed\n callback();\n }\n };\n onTransitionCompletedCb = onTransitionCompleted.bind(this);\n if (transitionEvent) {\n elem.addEventListener(transitionEvent, onTransitionCompletedCb);\n }\n }\n\n handlePanelScroll(event) {\n // There is no close button so don't run this code.\n if (this.hideCloseButton) return true;\n\n const e = event.target; \n if (e.scrollTop) {\n this.panelCloseBtn.classList.add('scrolling');\n } else {\n this.panelCloseBtn.classList.remove('scrolling');\n }\n }\n\n componentDidUpdate() {\n if (this.preDisplay) {\n // Panel has been displayed (display: block). Let's move it!\n setTimeout(() => {\n this.openPanel();\n this.preDisplay = false;\n }, 0);\n }\n }\n\n componentWillLoad() {\n this.panelDidOpenCb = this.panelDidOpen.bind(this);\n this.panelDidCloseCb = this.panelDidClose.bind(this);\n\n this.opened = this.shown;\n }\n\n componentDidLoad() {\n this.elemWithAnimation = this.el.querySelector('.panel');\n\n this.handleOverlayClick = this.handleOverlayClick.bind(this);\n this.panelDialog.addEventListener('click', this.handleOverlayClick);\n\n this.panelDialog.addEventListener(\"close\", () => {\n this.close();\n });\n\n this.handlePanelScroll = this.handlePanelScroll.bind(this);\n this.panelDialog.addEventListener('scroll', this.handlePanelScroll);\n }\n\n disconnectedCallback() {\n // Make sure to reenable body scroll in case it was previously deactivated\n clearAllBodyScrollLocks();\n }\n\n render() {\n\n // Add tabindex to <Host /> so that when a click occurs on the panel body, it gets focus\n return (\n <Host class={`panel-container`}> \n <dialog class={`panel-breakpoint-${this.breakpoint} panel panel-${this.position} panel-size-${this.size} ${this.opened ? 'opened' : ''} ${!this.hideCloseButton ? 'panel-close-button' : ''} ${this.belowHeader ? 'below-header' : ''}`} ref={(el) => this.panelDialog = el}>\n {!this.hideCloseButton ? (\n <button class=\"close--button\" ref={(el) => this.panelCloseBtn = el} onClick={() => this.close()} aria-label=\"Close modal\">\n <span aria-hidden=\"true\">\n <som-icon name=\"close\"></som-icon>\n </span>\n </button>\n ) : null}\n <div class=\"panel-content\" ref={(el) => this.panelContainer = el}>\n <slot></slot>\n </div>\n </dialog>\n </Host>\n );\n }\n}\n","@import '../../sass/base/variables';\n/* som-popover */\n\n.som-button-dropdown {\n .som-popover-container {\n min-width: 10rem;\n max-width: 17.5rem;\n }\n}\n\n.som-popover-container {\n position: absolute !important;\n -webkit-box-shadow: 0 0 10px 0 rgba($black, 0.25);\n -moz-box-shadow: 0 0 10px 0 rgba($black, 0.25);\n box-shadow: 0 0 10px 0 rgba($black, 0.25);\n // border-radius: 4px;\n z-index: 10;\n background-color: $white;\n\n &.som-popover-hidden {\n display: none;\n }\n\n .som-popover-content {\n display: block;\n }\n}\n","import { Component, Element, Prop, h, Watch, Listen, Method, Event, EventEmitter, Host } from '@stencil/core';\nimport { focusElement, isDescendant, getFocusableElementList } from '../../utils/functions';\nimport { KEY_CODES } from '../../utils/variables';\n\nconst VERTICAL_OFFSET = 10;\n\n@Component({\n tag: 'som-popover',\n styleUrl: 'som-popover.scss',\n})\nexport class SomPopover {\n resizeTimeout;\n\n forEl: HTMLElement;\n\n popupContainerEl: HTMLDivElement;\n\n focusedElement: HTMLElement = null;\n\n @Element() el: HTMLElement;\n\n /**\n * This property is used to associate the popover with the corresponding element. The corresponding elements `ID` should be used as the value. \n */\n @Prop() for: string;\n\n /**\n * This property controls the horizontal position of the popover.\n */\n @Prop() horizontalPosition: 'left' | 'right' = 'left';\n\n /**\n * \tThis property controls the vertical position of the popover.\n */\n @Prop() verticalPosition: 'top' | 'bottom' = 'bottom';\n\n // This Prop isn't being used \n //@Prop() relativePositioning = false;\n\n /**\n * This boolean property is used to display or hide the popover.\n */\n @Prop({ mutable: true, reflect: true }) show = false;\n\n focusedElBeforeOpen;\n\n @Watch('show')\n handleShowChange() {\n this.updatePosition();\n if (this.show) {\n this.focusedElBeforeOpen = document.activeElement;\n this.popoverOpened.emit();\n } else {\n this.popoverClosed.emit();\n }\n }\n\n /**\n * This event is triggered after popover is opened.\n */\n @Event() popoverOpened: EventEmitter;\n\n /**\n * This event is triggered after popover is closed.\n */\n @Event() popoverClosed: EventEmitter;\n\n\n @Listen('keydown')\n handleKeydown(e) {\n if (this.show && e.keyCode === KEY_CODES.ESC) {\n e.preventDefault();\n e.stopPropagation();\n this.show = false;\n this.popoverClosed.emit();\n focusElement(this.focusedElBeforeOpen);\n }\n }\n\n @Listen('click', { target: 'window' })\n handleWindowClick(e) {\n if (this.forEl !== e.target && !isDescendant(this.forEl, e.target)) {\n // Click did not happen on the \"for\" element\n if (this.popupContainerEl && !isDescendant(this.popupContainerEl, e.target) && !this.popupContainerEl.classList.contains('som-popover-hidden')) {\n // Popop is not already hidden in the DOM\n this.show = false;\n }\n }\n }\n\n @Listen('resize', { target: 'window' })\n handleWindowResize() {\n clearTimeout(this.resizeTimeout);\n\n // Setup debounce so we're not constantly reading screen width\n this.resizeTimeout = setTimeout(this.updatePosition.bind(this), 300);\n }\n\n @Listen('keydown')\n handleKeypress(e) {\n if (this.show) {\n if (e.keyCode === KEY_CODES.TAB) {\n e.preventDefault();\n e.stopPropagation();\n const focusableElements = this.getFocusableElements();\n const focusedElementIndex = focusableElements.findIndex(element => element === document.activeElement);\n\n if (focusableElements.length > 0) {\n // Popover is shown, let's capture the tab\n let newIndex = 0;\n if (e.shiftKey) {\n if (focusedElementIndex === 0) {\n newIndex = focusableElements.length - 1;\n } else {\n newIndex = focusedElementIndex - 1;\n }\n } else {\n newIndex = (focusedElementIndex + 1) % focusableElements.length;\n }\n this.focusedElement = focusableElements[newIndex];\n focusElement(this.focusedElement);\n }\n } \n } \n }\n\n /**\n * This method will open the popover.\n * @returns Promise will resolve when the open animation ends.\n */\n @Method()\n open(): Promise<void> {\n return new Promise(resolve => {\n if (!this.show) {\n this.show = true;\n\n // Triggers that the popover is open\n this.popoverOpened.emit();\n\n resolve();\n } else {\n // popover is already opened\n resolve();\n }\n });\n }\n\n /**\n * This method will close the popover.\n * @returns Promise will resolve when the close animation ends.\n */\n @Method()\n close(): Promise<void> {\n return new Promise(resolve => {\n if (this.show) {\n this.show = false;\n\n // Triggers that the popover is closed\n this.popoverClosed.emit();\n\n resolve();\n } else {\n // popover is already closed\n resolve();\n }\n });\n }\n\n /**\n * This method is emitted when the popover gets focus.\n */\n @Method()\n async hasFocus() {\n return this.getFocusableElements().includes(document.activeElement);\n }\n\n getFocusableElements() {\n return [].slice.call(this.popupContainerEl.querySelectorAll(getFocusableElementList()));\n }\n\n updatePosition() {\n // Reset positioning\n this.popupContainerEl.style.top = '';\n this.popupContainerEl.style.bottom = '';\n this.popupContainerEl.style.left = '';\n this.popupContainerEl.style.right = '';\n this.popupContainerEl.classList.add('som-popover-hidden');\n\n if (this.show) {\n this.popupContainerEl.classList.remove('som-popover-hidden');\n\n if (this.verticalPosition === 'top') {\n this.popupContainerEl.style.bottom = `${this.getBottomPosition()}px`;\n } else {\n this.popupContainerEl.style.top = `${this.getTopPosition()}px`;\n }\n\n if (this.horizontalPosition === 'right') {\n this.popupContainerEl.style.right = `${this.getRightPosition()}px`;\n } else {\n this.popupContainerEl.style.left = `${this.getLeftPosition()}px`;\n }\n }\n }\n\n getBottomPosition() {\n return this.forEl.offsetParent.clientHeight - this.forEl.offsetTop + VERTICAL_OFFSET;\n }\n\n getTopPosition() {\n return this.forEl.offsetParent.clientTop + this.forEl.offsetTop + this.forEl.offsetHeight + VERTICAL_OFFSET;\n }\n\n getLeftPosition() {\n return this.forEl.offsetParent.clientLeft + this.forEl.offsetLeft;\n }\n\n getRightPosition() {\n return this.forEl.offsetParent['offsetWidth'] - this.forEl.offsetLeft - this.forEl.offsetWidth;\n //return this.forEl.offsetParent.clientWidth - this.forEl.offsetLeft - this.forEl.offsetWidth;\n }\n\n componentDidLoad() {\n this.popupContainerEl = this.el.querySelector('.som-popover-container');\n this.forEl = document.getElementById(this.for);\n }\n\n render() {\n return (\n <Host aria-modal=\"true\" role=\"dialog\" tabindex=\"-1\" aria-labelledby={this.for}>\n <div class=\"som-popover-container som-popover-hidden\">\n <div class=\"som-popover-content\">\n <slot></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n","/* Placeholder for radio specific styles */","import { Component, Element, Event, EventEmitter, Method, Prop, h, Host, Watch, State } from '@stencil/core';\nimport { focusElement, generateId } from '../../utils/functions';\n\n/**\n * Radio buttons are used to capture a user choice within a set of related options.\n */\n/**\n * @slot label - Label for the radio button. Alternatively, you can use the label attribute.\n */\n@Component({\n tag: 'som-radio-button',\n styleUrl: 'som-radio-button.scss',\n})\nexport class SomRadioButton {\n @Element() el: HTMLElement;\n\n /**\n * This property is the radio button label text.\n */\n @Prop() label: string = '';\n\n /**\n * This property is a list of CSS classes that can be used to style the label. \n * @deprecated with version 4.0.1 release\n */\n @Prop() labelClass?: string = ''; \n \n /**\n * This property will visually hide the label. A label is still required to be provided for screenreader support.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * This property can be used to set the ARIA label associated with this input (for screen readers).\n */\n @Prop() inputAriaLabel: string | null = null;\n\n /**\n * This property is the form element name (used when submitting the form).\n */\n @Prop() name: string = '';\n\n /**\n * This property is used to set the radio button as \"checked\".\n */\n @Prop({ mutable: true, reflect: true }) checked: boolean = false;\n\n /**\n * This property is the radio button value sent on submit when using it in a form.\n */\n @Prop() value: string = '';\n\n /**\n * This boolean is used to set the radio button as disabled.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * This boolean can be used to set the input as required.\n */\n @Prop() required: boolean = false;\n\n /**\n * This property can be used to specifically set an ID to the input field. If an ID is not provided, it will be dynamically generated.\n */\n @Prop() inputId: string = generateId('som-radio-button');\n\n /**\n * This event is emitted when when the radio button gets focus.\n */\n @Event() somFocus: EventEmitter;\n\n /**\n * This event is emitted when when the radio button loses focus.\n */\n @Event() somBlur: EventEmitter;\n\n /**\n * This event is emitted when the radio button is toggled.\n */\n @Event() somChange: EventEmitter;\n\n inputElement: HTMLInputElement;\n\n handleFocusCb;\n\n handleBlurCb;\n\n handleChangeCb;\n\n radioButtonEl;\n\n @State() groupHelpId: string = '';\n\n @Watch('group-help-id')\n handleGroupHelpIdChange(newVal) {\n this.groupHelpId = newVal;\n }\n\n /**\n * This public method sets focus to the radio element.\n * @returns Promise will resolve after focus.\n */\n @Method()\n setFocus(): Promise<void> {\n return focusElement(this.inputElement);\n }\n\n handleFocus(e) {\n this.somFocus.emit(e);\n }\n\n handleBlur(e) {\n this.somBlur.emit(e);\n }\n\n handleChange(e) {\n this.checked = e.target.checked;\n this.somChange.emit(e);\n }\n\n registerEvents() {\n this.inputElement.addEventListener('focus', this.handleFocusCb);\n this.inputElement.addEventListener('blur', this.handleBlurCb);\n this.inputElement.addEventListener('change', this.handleChangeCb);\n }\n\n unregisterEvents() {\n this.inputElement.removeEventListener('focus', this.handleFocusCb);\n this.inputElement.removeEventListener('blur', this.handleBlurCb);\n this.inputElement.removeEventListener('change', this.handleChangeCb);\n }\n\n componentWillLoad() {\n this.groupHelpId = this.el.getAttribute('group-help-id');\n \n this.handleFocusCb = this.handleFocus.bind(this);\n this.handleBlurCb = this.handleBlur.bind(this);\n this.handleChangeCb = this.handleChange.bind(this);\n }\n\n componentDidLoad() {\n this.inputElement = this.el.querySelector(`#${this.inputId}`);\n this.registerEvents();\n }\n\n componentWillUnload() {\n this.unregisterEvents();\n }\n\n render() {\n // Removing aria label on 'som-radio-button' since we set it to the <input /> element.\n const ariaDescribedby = (this.groupHelpId) ? {'aria-describedby' : this.groupHelpId} : null;\n return (\n <Host aria-label={null}>\n <div class=\"custom-control custom-radio\">\n <input\n id={this.inputId}\n ref={ (el) => this.radioButtonEl = el }\n class=\"custom-control-input\"\n type=\"radio\"\n name={this.name}\n value={this.value}\n disabled={this.disabled}\n checked={this.checked}\n required={this.required}\n aria-required={this.required}\n aria-label={this.inputAriaLabel}\n {...ariaDescribedby}\n />\n \n <label htmlFor={this.inputId} class={`custom-control-label ${this.labelClass} ${this.hideLabel ? 'sr-only' : ''}`}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n </div>\n </Host>\n );\n }\n}\n","// These styles are already imported via form-field-group component\n@import \"../../sass/components/form-field-group\";\n@import '../../sass/components/form-field';\n","import { Component, Element, Prop, Listen, Watch, h, Event, EventEmitter } from '@stencil/core';\nimport { generateId, getRequiredInd, isInError } from '../../utils/functions';\n\n/**\n * Radio button groups are used to group multiple radio buttons in a single form field that takes care of the label, help message and error state.\n */\n/**\n * @slot label - Label for the radio button group. Alternatively, you can use the label attribute.\n */\n@Component({\n tag: 'som-radio-button-group',\n styleUrl: 'som-radio-button-group.scss',\n})\nexport class SomRadioButtonGroup {\n @Element() el: HTMLElement;\n\n /**\n * This property can be used to set the inline label.\n */\n @Prop() label: string = '';\n\n /**\n * This property will visually hide the label. A label is still required to be provided for screenreader support.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * This property is a list of CSS classes that can be used to style the label.\n * @deprecated with version 4.0.1 release\n */\n @Prop() labelClass?: string = ''; \n\n /**\n * This property can be used to set a help text.\n */\n @Prop() help: string = '';\n\n /**\n * This property can be used to set an error. If a non-empty string is given, it will be used as the error message.\n */\n @Prop({mutable: true}) error: string | null = null;\n\n /**\n * This boolean sets whether the form field group is required or not.\n */\n @Prop() required: boolean = false;\n \n /**\n * This property is used to override the required indicator. By default, forms elements will show an `optional` indicator\n * but some forms are better served showing the `required` indicator instead.\n */\n @Prop() requiredInd: 'required' | 'optional' | 'none'; \n\n /**\n * This boolean sets whether the form field group should display the checkboxes inline or not.\n */\n @Prop() inline: boolean = false;\n\n /**\n * This property is the radio button value sent on submit when used in a form.\n */\n @Prop({ mutable: true, reflect: true }) value: string = null;\n\n /**\n * This property is used to set the tooltip text.\n */\n @Prop() tooltip: string | null = null;\n \n /**\n * This event is emitted when the radio button is toggled.\n */\n @Event() somChange: EventEmitter;\n\n groupId: string = generateId('som-radio-button-group');\n\n helpElementId: string;\n\n childrenData: any;\n\n tooltipID: string = generateId('som-tooltipID-');\n\n @Watch('value') \n handleValueChange(newVal) {\n const radios = Array.prototype.slice.call(this.el.querySelectorAll('som-radio-button'));\n radios.forEach(radio => {\n if (newVal === radio.value) {\n radio.setAttribute('checked', true);\n } else {\n radio.removeAttribute('checked');\n }\n });\n }\n\n @Watch('error')\n handleErrorChange(newVal) {\n if(newVal !== null) {\n Object.values(this.childrenData).map((child: HTMLElement) => {\n child.setAttribute('group-help-id', this.helpElementId);\n })\n }\n }\n\n @Listen('somChange')\n somChangeHandler(e) {\n this.value = e.detail.target.value; \n }\n\n componentWillLoad() {\n this.helpElementId = `${this.groupId}-help`;\n\n // Let each radio button know that they are part of a group\n for (let i = 0; i < this.el.children.length; i++) {\n const child = this.el.children[i];\n child.setAttribute('has-group-parent', 'true');\n child.setAttribute('required-ind', 'none');\n (this.help || this.error) && child.setAttribute('group-help-id', this.helpElementId);\n\n if (this.required) {\n child.setAttribute('required', 'true');\n }\n }\n }\n\n componentDidLoad() {\n if (this.value) {\n this.handleValueChange(this.value);\n }\n\n this.childrenData = this.el.querySelector(`#${this.groupId}`).children;\n }\n\n render() {\n const _isInError = isInError(this.error);\n const helpMessage = _isInError ? this.error : this.help;\n const ariaInvalid = _isInError ? { 'aria-invalid': true } : {};\n\n const groupedContentClasses = ['grouped-content'];\n if (_isInError) {\n groupedContentClasses.push('is-invalid');\n }\n if (this.inline) {\n groupedContentClasses.push('grouped-content-inline');\n }\n\n return (\n <fieldset data-role=\"controlgroup\" {...ariaInvalid}> \n <legend aria-describedby={(this.help || this.error) ? this.helpElementId : null} class={`${this.labelClass} ${this.hideLabel ? 'sr-only' : ''}`}>\n <slot name=\"label\">{this.label}</slot>\n {getRequiredInd(h, this.required, this.requiredInd)}\n { this.tooltip ?\n <span>\n <som-button class='tooltip-button' button-aria-label={`${this.label} information`} button-type=\"clear\" icon-position=\"only\" color=\"primary\" icon=\"information\" aria-describedby={this.tooltipID}>\n </som-button>\n <som-tooltip horizontal-position='auto' tooltip-id={this.tooltipID}>\n {this.tooltip}\n </som-tooltip>\n </span> : null\n }\n </legend>\n\n <div id={this.groupId} class={groupedContentClasses.join(' ')}>\n <slot />\n </div>\n {helpMessage ? (\n <small id={this.helpElementId} class={`form-text ${_isInError ? 'text-error' : 'text-muted'}`}>\n {helpMessage}\n </small>\n ) : null}\n </fieldset>\n );\n }\n}\n","@import '../../sass/base/variables';\n\n.input-error {\n color: $danger;\n}","import { Component, Element, Event, EventEmitter, Method, Prop, Watch, h } from '@stencil/core';\nimport { focusElement, generateId, isInError, getRequiredInd, ariaDescribedby } from '../../utils/functions';\n\n/**\n * Selects are used to capture a user choice within a set of related options.\n */\n/**\n * @slot label - Label for the select. Alternatively, you can use the label attribute.\n */\n@Component({\n tag: 'som-select',\n styleUrl: 'som-select.scss',\n})\nexport class SomSelect {\n @Element() el: HTMLElement;\n\n /**\n * This property can be used to set a label.\n */\n @Prop() label: string = '';\n\n /**\n * This property is a list of CSS classes that can be used to style the label. \n * @deprecated with version 4.0.1 release \n */\n @Prop() labelClass?: string = ''; \n \n /**\n * This property will visually hide the label. A label is still required to be provided for screenreader support.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * This property can be used to set a help text.\n */\n @Prop() help: string = '';\n\n /**\n * This property can be used to set an error. If a non-empty string is given, it will be used as the error message.\n */\n @Prop() error: string | null = null;\n\n /**\n * This boolean can be used to set the select as required.\n */\n @Prop() required: boolean = false;\n\n /**\n * This property is used to override the required indicator. By default, forms elements will show an `optional` indicator\n * but some forms are better served showing the `required` indicator instead.\n */\n @Prop() requiredInd: 'required' | 'optional' | 'none'; \n\n /**\n * This property can be used to set the ARIA label associated with this input (for screen readers).\n */\n @Prop() inputAriaLabel: string | null = null;\n\n /**\n * This property can be used to set the form field name (used when submitting the form).\n */\n @Prop() name: string = '';\n\n /**\n * This boolean can be used to disable the select.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * This property can be used to set the select value.\n */\n @Prop({mutable: true, reflect: true}) value: string;\n \n /**\n * This property can be used to specifically set an ID to the input field. If an ID is not provided, it will be dynamically generated.\n */\n @Prop() inputId: string = generateId('som-input');\n\n /**\n * This property is used to set the tooltip text.\n */\n @Prop() tooltip: string | null = null\n\n /**\n * This event is emitted when when the select field gets focus.\n */\n @Event() somFocus: EventEmitter;\n\n /**\n * This event is emitted when when the select field loses focus.\n */\n @Event() somBlur: EventEmitter;\n\n /**\n * This event is emitted when the select value changes.\n */\n @Event() somChange: EventEmitter;\n\n htmlElement: HTMLSelectElement;\n\n selectEl;\n\n helpElementId;\n\n handleFocusCb;\n\n handleBlurCb;\n\n handleChangeCb;\n\n tooltipID: string = generateId('som-tooltipID-');\n\n @Watch('value')\n handleValueChange(newVal) {\n if (this.selectEl) {\n this.selectEl.value = newVal;\n }\n }\n\n /**\n * This public method sets focus to the select element.\n * @returns Promise will resolve after focus.\n */\n @Method()\n setFocus(): Promise<void> {\n return focusElement(this.htmlElement);\n }\n\n handleFocus(e) {\n this.somFocus.emit(e);\n }\n\n handleBlur(e) {\n this.somBlur.emit(e);\n }\n\n handleChange(e) {\n this.value = this.selectEl.value;\n this.somChange.emit(e);\n }\n\n registerEvents() {\n this.htmlElement.addEventListener('focus', this.handleFocusCb);\n this.htmlElement.addEventListener('blur', this.handleBlurCb);\n this.htmlElement.addEventListener('change', this.handleChangeCb);\n }\n\n unregisterEvents() {\n this.htmlElement.removeEventListener('focus', this.handleFocusCb);\n this.htmlElement.removeEventListener('blur', this.handleBlurCb);\n this.htmlElement.removeEventListener('change', this.handleChangeCb);\n }\n\n componentWillLoad() {\n this.helpElementId = `${this.inputId}-help`;\n\n this.handleFocusCb = this.handleFocus.bind(this);\n this.handleBlurCb = this.handleBlur.bind(this);\n this.handleChangeCb = this.handleChange.bind(this);\n }\n\n componentDidLoad() {\n this.htmlElement = this.el.querySelector(`#${this.inputId}`);\n this.registerEvents();\n\n if (this.value) {\n this.handleValueChange(this.value);\n } \n }\n\n componentWillUnload() {\n this.unregisterEvents();\n }\n\n render() {\n const _isInError = isInError(this.error);\n const helpMessage = _isInError ? this.error : this.help;\n const ariaInvalid = _isInError ? { 'aria-invalid': 'true' } : {};\n const _requiredInd = getRequiredInd(h, this.required, this.requiredInd); \n\n return (\n <div class='form-group'>\n <div>\n <label class={`${this.labelClass} ${this.hideLabel ? 'sr-only' : ''}`} htmlFor={this.inputId}>\n <slot name='label'>{this.label}</slot>\n {_requiredInd}\n </label>\n { this.tooltip ?\n <span>\n <som-button class='tooltip-button' button-aria-label={`${this.label} information`} button-type='clear' icon-position='only' color='primary' icon='information' aria-describedby={this.tooltipID}>\n </som-button>\n <som-tooltip horizontal-position='auto' tooltip-id={this.tooltipID}>\n {this.tooltip}\n </som-tooltip>\n </span> : null\n }\n </div>\n \n <select\n id={this.inputId}\n ref={ (el) => this.selectEl = el }\n name={this.name}\n class={`form-control ${_isInError ? 'is-invalid' : ''}`}\n disabled={this.disabled}\n required={this.required}\n aria-label={this.inputAriaLabel}\n aria-disabled={this.disabled}\n {...ariaDescribedby(this.help, this.error, this.helpElementId)}\n {...ariaInvalid}\n >\n <slot />\n </select>\n {helpMessage ? (\n <small id={this.helpElementId} class={`form-text ${_isInError ? 'text-error' : 'text-muted'}`}>\n {helpMessage}\n </small>\n ) : null}\n </div>\n );\n }\n}\n","@import '../../sass/base/helpers';\n\n.spinner {\n fill: none;\n stroke-width: 5;\n animation: rotate 2s linear infinite;\n z-index: 2;\n width: 1em;\n height: 1em;\n display: block;\n position: relative;\n\n & .path {\n stroke: currentColor;\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n }\n \n}\n\n@keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n\n@keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}","import { Component, Prop, Host, h } from '@stencil/core';\n\n/**\n * TODO\n */\n@Component({\n tag: 'som-spinner',\n styleUrl: 'som-spinner.scss',\n shadow: true,\n})\nexport class SomSpinner {\n /**\n * This attribute controls the size of the spinner. Possible values are: `\"sm\"`, `\"md\"`, `\"lg\"`, `\"xl\"`. By default, the spinner will match the font-size of the parent container.\n */\n @Prop() size: 'sm' | 'md' | 'lg' | 'xl';\n\n render() {\n return (\n <Host class={(this.size ? ' spinner-size-' + this.size : '')} aria-hidden>\n <svg class=\"spinner\" viewBox=\"0 0 50 50\">\n <circle class=\"path\" cx=\"25\" cy=\"25\" r=\"20\"></circle>\n </svg>\n </Host>\n );\n }\n}\n","@import '../../sass/components/card';","import { Component, Prop, Listen, Element, h, Host } from '@stencil/core';\nimport { KEY_CODES } from '../../utils/variables';\n\n/**\n * A status card is a flexible and extensible content container where the color associated is meant to indicate specific meaning.\n */\n@Component({\n tag: 'som-status-card',\n styleUrl: 'som-status-card.scss',\n shadow: true\n})\nexport class SomStatusCard {\n\n @Element() el: HTMLElement;\n\n /**\n * This property is the color of the status indicator.\n */\n @Prop() color: 'gray' | 'primary' | 'success' | 'warning' | 'danger' | 'info' = 'gray';\n\n /**\n * This boolean is used to add 100% height to the card which is helpful when you want the card height to expand to match\n * the height of surrounding elements.\n */\n @Prop() matchHeight: boolean = false;\n\n /**\n * The type of status card.\n */\n @Prop() type: 'default' | 'button' = 'default';\n\n /**\n * This property can be used to set the ARIA label associated with this status card (for screen readers).\n */\n @Prop() buttonAriaLabel: string;\n\n @Listen('keyup')\n handleKeyUp(ev){\n switch (ev.keyCode) {\n case KEY_CODES.ENTER:\n case KEY_CODES.SPACE:\n this.el.click();\n }\n }\n\n getAttrs() {\n let attrs = {};\n\n if (this.type === 'button') {\n attrs['role'] = 'button';\n attrs['tabindex'] = '0';\n attrs['onKeyUp'] = this.handleKeyUp.bind(this);\n attrs['aria-label'] = this.buttonAriaLabel ? this.buttonAriaLabel : null;\n }\n\n return attrs;\n } \n\n render() {\n return (\n <Host \n class={`card-container status-card-${this.color}-container d-flex card-container--status card-container--status-${this.color} ${this.type === 'button' ? 'card-clickable' : ''} ${this.matchHeight ? 'h-100' : ''}`}\n {...this.getAttrs()}\n >\n <slot />\n </Host>\n );\n }\n}\n","import { Component, Host, Element, Prop, Event, EventEmitter, Listen, h } from '@stencil/core';\nimport { KEY_CODES } from '../../utils/variables';\nimport { generateId } from '../../utils/functions';\n\n@Component({\n tag: 'som-tab',\n})\nexport class SomTab {\n @Element() el: HTMLElement;\n\n /**\n * This property sets the name of the tab.\n */\n @Prop({reflect: true}) name: string;\n /**\n * This boolean controls if the tab is active.\n */\n @Prop({reflect: true, mutable: true}) active: boolean;\n\n /**\n *\n */\n @Prop({reflect: true, mutable: true}) dark: boolean = false;\n\n /**\n * This property can be used to specifically set an ID to the tab. If an ID is not provided, it will be dynamically generated.\n */\n @Prop({reflect: true}) tabId: string = generateId('som-tab'); \n\n @Event() tabClick: EventEmitter;\n\n @Listen('keydown')\n async handleKeyDown(e) {\n switch (e.keyCode) {\n case KEY_CODES.ENTER:\n case KEY_CODES.SPACE:\n this.el.click();\n break;\n } \n }\n\n @Listen('click', { capture: true })\n handleClick(ev) {\n ev.preventDefault();\n const detail = {\n tabId: this.tabId,\n }\n\n this.active = true;\n this.tabClick.emit(detail);\n }\n\n\n render() {\n return (\n <Host \n role=\"tab\"\n class={`tab ${this.dark ? 'dark' : ''} ${this.active ? 'active' : ''}`}\n tabindex={this.active ? '0' : '-1'}\n id={this.tabId}\n aria-selected={this.active ? 'true' : 'false'}\n \n >\n {this.name}\n </Host>\n );\n }\n}","@import '../../sass/components/tabs';","import { Component, Element, Host, State, h } from '@stencil/core';\nimport { generateId } from '../../utils/functions';\n\n/**\n * Tabs consolidate groups of content into their own sections, often simplifying a user interface and making data items easier to locate.\n */\n@Component({\n tag: 'som-tabs',\n styleUrl: 'som-tabs.scss',\n})\nexport class SomTabs {\n @Element() el: HTMLElement;\n\n @State() tabsId: string = generateId('som-tabs-')\n\n tabs;\n panels;\n tabGroup;\n panelGroup;\n\n componentDidLoad() {\n this.tabs = [].slice.call(document.querySelectorAll(`#${this.tabsId} > som-tab-group > som-tab`));\n this.panels = [].slice.call(document.querySelectorAll(`#${this.tabsId} > som-tab-panel-group > som-tab-panel`));\n this.tabGroup = document.querySelector(`#${this.tabsId} > som-tab-group`);\n this.panelGroup = document.querySelector(`#${this.tabsId} > som-tab-panel-group`);\n const panelColor = this.tabGroup.getAttribute('color');\n let activeFound = false;\n\n // Are there any panels?\n const panelsExist = this.panels.length > 0 ? true : false;\n\n // set panel color\n if (panelsExist) this.panelGroup.classList.add(panelColor);\n\n // Set aria controls on tab and panel\n // Make sure the active tab and panel are shown or default to first if not set\n this.tabs.forEach((tab, idx) => {\n if (panelsExist) {\n tab.setAttribute('aria-controls', this.panels[idx].getAttribute('id'));\n this.panels[idx].setAttribute('aria-labelledby', tab.getAttribute('id'));\n }\n\n tab.classList.add(`tab-panel-${panelColor}`);\n\n // Is the tab set to active? If so, show the tab and panel\n if (tab.hasAttribute('active')) {\n const _active = tab.getAttribute('active');\n if (_active || _active === '') {\n this.tabGroup.showTab(idx);\n if (panelsExist) this.panelGroup.showTabPanel(idx);\n activeFound = true;\n }\n }\n });\n\n // The active prop wasn't set on a tab, default to the first tab\n if (!activeFound) {\n this.tabs[0].setAttribute('active', 'true');\n if (panelsExist) this.panelGroup.showTabPanel(0);\n this.tabGroup.showTab(0);\n }\n\n // Set up listener for when an individual tab is clicked\n this.tabGroup.addEventListener('tabClick', (e) => {\n // Update active tab and panel\n const _idx = this.tabs.findIndex(tab => tab.tabId === e.detail.tabId);\n this.tabGroup.showTab(_idx);\n if (panelsExist) this.panelGroup.showTabPanel(_idx);\n })\n }\n\n render() {\n return (\n <Host id={this.tabsId}>\n <slot></slot>\n </Host>\n );\n }\n}","@import '../../sass/components/form-field';\n\nsom-textarea {\n .textarea-container {\n position: relative;\n\n textarea {\n padding-bottom: 1.5rem;\n }\n\n .max-nb-chars {\n position: absolute;\n right: 0.75rem;\n bottom: 0.5rem;\n text-align: right;\n font-size: 0.6875rem;\n }\n }\n}\n","import { Component, Element, Event, EventEmitter, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { focusElement, generateId, isInError, getRequiredInd, ariaDescribedby } from '../../utils/functions';\n\nconst DEFAULT_ROWS = 3;\n\n/**\n * Textares are used to capture long texts.\n */\n/**\n * @slot label - Label for the textarea. Alternatively, you can use the label attribute.\n */\n@Component({\n tag: 'som-textarea',\n styleUrl: 'som-textarea.scss'\n})\nexport class SomTextarea {\n maxLengthMessage: string;\n\n @Element() el: HTMLElement;\n\n /**\n * This property can be used to set a label.\n */\n @Prop() label: string = '';\n\n /**\n * This property is a list of CSS classes that can be used to style the label.\n * @deprecated with version 4.0.1 release \n */\n @Prop() labelClass?: string = ''; \n \n /**\n * This property will visually hide the label. A label is still required to be provided for screenreader support.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * This property can be used to set a help text.\n */\n @Prop() help: string = '';\n\n /**\n * This property can be used to set an error. If a non-empty string is given, it will be used as the error message.\n */\n @Prop() error: string | null = null;\n\n /**\n * This boolean can be used to set the input as required.\n */\n @Prop() required: boolean = false;\n \n /**\n * This property is used to override the required indicator. By default, forms elements will show an `optional` indicator\n * but some forms are better served showing the `required` indicator instead.\n */\n @Prop() requiredInd: 'required' | 'optional' | 'none'; \n\n /**\n * This property can be used to set a placeholder text.\n */\n @Prop() placeholder: string = '';\n\n /**\n * This property can be used to set the form field name (used when submitting the form).\n */\n @Prop() name: string = '';\n\n /**\n * This property can be used to set the textarea value.\n */\n @Prop({mutable: true, reflect: true}) value: string = '';\n\n /**\n * This boolean can be used to disable the textarea.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * This boolean is used to set the textarea as readonly.\n */\n @Prop() readonly: boolean = false;\n\n /**\n * This property is used to set the textarea's number of rows'.\n * Defaults to `3`.\n */\n @Prop({ mutable: true })\n rows: number | null = DEFAULT_ROWS;\n\n /**\n * This property is used to set the textarea's maximum characters limit.\n */\n @Prop() maxLength: number | null = null;\n\n /**\n * This property can be used to set the ARIA label associated with this input (for screen readers).\n */\n @Prop() inputAriaLabel: string | null = null;\n\n /**\n * This property can be used to specifically set an ID to the input field. If an ID is not provided, it will be dynamically generated.\n */\n @Prop() inputId: string = generateId('som-textarea');\n\n /**\n * This property is used to set the tooltip text.\n */\n @Prop() tooltip: string | null = null\n\n /**\n * This event is emitted when when the textrea gets focus.\n */\n @Event() somFocus: EventEmitter;\n\n /**\n * This event is emitted when when a keyboard input occurs.\n */\n @Event() somInput: EventEmitter;\n\n /**\n * This event is emitted when when the textrea loses focus.\n */\n @Event() somBlur: EventEmitter;\n\n /**\n * This event is emitted when the textarea changes.\n */\n @Event() somChange: EventEmitter;\n\n @State() currentValue: string = '';\n\n @Watch('value')\n handleValueChange() {\n this.currentValue = this.value;\n }\n\n @Watch('rows')\n handleRowsChange() {\n if (!this.rows) {\n // Makes sure to always handle the default case\n this.rows = DEFAULT_ROWS;\n }\n }\n\n htmlElement: HTMLTextAreaElement;\n\n helpElementId;\n\n handleFocusCb;\n\n handleInputCb;\n\n handleBlurCb;\n\n handleChangeCb;\n\n tooltipID: string = generateId('som-tooltipID-');\n\n /**\n * This public method resets focus to the textarea element.\n * @returns Promise will resolve after focus.\n */\n @Method()\n setFocus(): Promise<void> {\n return focusElement(this.htmlElement);\n }\n\n handleFocus(e) {\n this.somFocus.emit(e);\n }\n\n handleInput(e) {\n this.currentValue = e.target.value;\n this.value = e.target.value;\n this.somInput.emit(e);\n\n this.maxLengthMessage = '';\n if (this.maxLength && this.currentValue.length === this.maxLength) {\n this.maxLengthMessage = `Character limit reached. You can only use ${this.maxLength} characters.`\n }\n }\n\n handleBlur(e) {\n this.somBlur.emit(e);\n }\n\n handleChange(e) {\n this.value = e.target.value; \n this.somChange.emit(e);\n }\n\n registerEvents() {\n this.htmlElement.addEventListener('focus', this.handleFocusCb);\n this.htmlElement.addEventListener('input', this.handleInputCb);\n this.htmlElement.addEventListener('blur', this.handleBlurCb);\n this.htmlElement.addEventListener('change', this.handleChangeCb);\n }\n\n unregisterEvents() {\n this.htmlElement.removeEventListener('focus', this.handleFocusCb);\n this.htmlElement.removeEventListener('input', this.handleInputCb);\n this.htmlElement.removeEventListener('blur', this.handleBlurCb);\n this.htmlElement.removeEventListener('change', this.handleChangeCb);\n }\n\n componentWillLoad() {\n this.helpElementId = `${this.inputId}-help`;\n this.currentValue = this.value;\n\n this.handleFocusCb = this.handleFocus.bind(this);\n this.handleInputCb = this.handleInput.bind(this);\n this.handleBlurCb = this.handleBlur.bind(this);\n this.handleChangeCb = this.handleChange.bind(this);\n }\n\n componentDidLoad() {\n this.htmlElement = this.el.querySelector(`#${this.inputId}`);\n this.registerEvents();\n }\n\n componentWillUnload() {\n this.unregisterEvents();\n }\n\n render() {\n const _isInError = isInError(this.error);\n const helpMessage = _isInError ? this.error : this.help;\n const _requiredInd = getRequiredInd(h, this.required, this.requiredInd); \n const ariaInvalid = _isInError ? { 'aria-invalid': 'true' } : {};\n\n return (\n <div class=\"form-group\">\n <div>\n <label class={`${this.labelClass} ${this.hideLabel ? 'sr-only' : ''}`} htmlFor={this.inputId}>\n <slot name=\"label\">{this.label}</slot>\n {_requiredInd} \n </label>\n { this.tooltip ?\n <span>\n <som-button class='tooltip-button' button-aria-label={`${this.label} information`} button-type=\"clear\" icon-position=\"only\" color=\"primary\" icon=\"information\" aria-describedby={this.tooltipID}>\n </som-button>\n <som-tooltip tooltip-id={this.tooltipID}>\n {this.tooltip}\n </som-tooltip>\n </span> : null\n }\n </div>\n \n <div class=\"textarea-container\">\n <textarea\n id={this.inputId}\n class={`form-control ${_isInError ? 'is-invalid' : ''}`}\n placeholder={this.placeholder || null}\n name={this.name || null}\n value={this.currentValue}\n disabled={this.disabled}\n readonly={this.readonly}\n required={this.required}\n rows={this.rows}\n maxlength={this.maxLength}\n aria-label={this.inputAriaLabel}\n {...ariaDescribedby(this.help, this.error, this.helpElementId)}\n {...ariaInvalid}\n />\n {this.maxLength && this.maxLength > 0 ? (\n <div class={`max-nb-chars ${this.currentValue.length >= this.maxLength ? 'text-danger' : ''}`}>\n {this.currentValue.length}/{this.maxLength}\n <span class=\"sr-only\" aria-live=\"assertive\">{this.maxLengthMessage}</span>\n </div>\n ) : null}\n </div>\n {helpMessage ? (\n <small id={this.helpElementId} class={`form-text ${_isInError ? 'text-error' : 'text-muted'}`}>\n {helpMessage}\n </small>\n ) : null}\n </div>\n );\n }\n}\n","@import '../../sass/components/toggle';","import { Component, Element, Event, EventEmitter, Listen, Method, Prop, h } from '@stencil/core';\nimport { focusElement, generateId } from '../../utils/functions';\n\n/**\n * Toggles give users the ability to choose between two states.\n */\n/**\n * @slot label - Label for the toggle. Alternatively, you can use the label attribute.\n */\n@Component({\n tag: 'som-toggle',\n styleUrl: 'som-toggle.scss',\n})\nexport class SomToggle {\n @Element() el: HTMLElement;\n\n /**\n * This property can be used to set the inline label.\n */\n @Prop() label: string = '';\n\n /**\n * This property will visually hide the label. A label is still required to be provided for screenreader support.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * This property is a list of CSS classes that can be used to style the label. \n * @deprecated with version 4.0.1 release\n */\n @Prop() labelClass?: string = '';\n \n /**\n * This property determines the size of the toggle\n */\n @Prop() size: 'sm' | 'lg' = 'sm';\n\n /**\n * This property can be used to set the ARIA label associated with this input (for screen readers).\n */\n @Prop() inputAriaLabel: string | null = null;\n\n /**\n * This property is the form element name (used when submitting the form).\n */\n @Prop() name: string = '';\n\n /**\n * This boolean is used to set the toggle as \"checked\".\n */\n @Prop({ mutable: true, reflect: true })\n checked: boolean = false;\n\n /**\n * This property is the toggle value sent on submit when using it in a form.\n */\n @Prop() value: string = '';\n\n /**\n * This boolean is used to disable the toggle.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * This property can be used to specifically set an ID to the input field. If an ID is not provided, it will be dynamically generated.\n */\n @Prop() inputId: string = generateId('som-input');\n\n /**\n * This event is emitted when when the toggle gets focus.\n */\n @Event() somFocus: EventEmitter;\n\n /**\n * This event is emitted when when the toggle loses focus.\n */\n @Event() somBlur: EventEmitter;\n\n /**\n * This event is emitted when the toggle value changes.\n */\n @Event() somChange: EventEmitter;\n\n inputElement: HTMLInputElement;\n\n toggleElement: HTMLDivElement;\n\n toggleId: string;\n\n helpElementId: string;\n\n handleFocusCb;\n\n handleBlurCb;\n\n handleChangeCb;\n\n @Listen('keydown')\n handleKeyDown(e) {\n if (e.keyCode === 32) {\n this.handleChange(e);\n }\n }\n\n /**\n * This public method sets focus to the checkbox element.\n * @returns Promise will resolve after focus.\n */\n @Method()\n setFocus(): Promise<void> {\n return focusElement(this.toggleElement);\n }\n\n handleFocus() {\n this.somFocus.emit();\n }\n\n handleBlur() {\n this.somBlur.emit();\n }\n\n handleChange(e) {\n e.preventDefault();\n e.stopPropagation();\n\n this.checked = !this.checked;\n this.somChange.emit();\n }\n\n registerEvents() {\n this.inputElement.addEventListener('change', this.handleChangeCb);\n }\n\n unregisterEvents() {\n this.inputElement.removeEventListener('change', this.handleChangeCb);\n }\n\n componentWillLoad() {\n this.helpElementId = `${this.inputId}-help`;\n this.toggleId = `${this.inputId}-toggle`;\n\n this.handleFocusCb = this.handleFocus.bind(this);\n this.handleBlurCb = this.handleBlur.bind(this);\n this.handleChangeCb = this.handleChange.bind(this);\n }\n\n componentDidLoad() {\n this.inputElement = this.el.querySelector(`#${this.inputId}`);\n this.toggleElement = this.el.querySelector(`#${this.toggleId}`);\n this.registerEvents();\n }\n\n componentWillUnload() {\n this.unregisterEvents();\n }\n\n render() {\n const ariaChecked = this.checked ? { 'aria-checked': 'true' } : { 'aria-checked': 'false' };\n const ariaDisabled = this.disabled ? { 'aria-disabled': 'true' } : { 'aria-disabled': 'false' };\n\n return (\n <div class=\"form-group\">\n <div class={`toggle-container toggle-${this.size}`}>\n <div\n id={this.toggleId}\n class={['toggle', this.checked ? 'checked' : '', this.disabled ? 'disabled' : ''].join(' ')}\n role=\"checkbox\"\n tabindex={this.disabled ? '' : '0'}\n onClick={this.disabled ? null : this.handleChangeCb}\n onFocus={this.handleFocusCb}\n onBlur={this.handleBlurCb}\n aria-labelledby={`${this.inputId}-label`}\n aria-label={this.inputAriaLabel}\n {...ariaDisabled}\n {...ariaChecked}\n >\n <input id={this.inputId} type=\"checkbox\" tabindex=\"-1\" name={this.name} value={this.value} checked={this.checked} disabled={this.disabled} />\n <div class=\"handle\">\n {this.checked ? <som-icon name=\"checkmark\" display=\"block\"></som-icon> : <som-icon name=\"close\" display=\"block\"></som-icon>}\n </div>\n </div>\n \n <label id={`${this.inputId}-label`} htmlFor={this.inputId} class={`toggle-label ${this.labelClass} ${this.hideLabel ? 'sr-only' : ''} d-block`}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n </div>\n </div>\n );\n }\n}\n","@import '../../sass/components/tooltip';\n\n.visible {\n display: inline;\n visibility: visible;\n}","import { Component, Prop, Host, h, Element, Event, EventEmitter, State, Method } from '@stencil/core';\nimport { KEY_CODES } from '../../utils/variables';\n\nconst VERTICAL_OFFSET = 12;\n\n/**\n * A tooltip is a floating, non-actionable label that displays additional information about the interface element or feature.\n */\n\n@Component({\n tag: 'som-tooltip',\n styleUrl: 'som-tooltip.scss',\n})\n\nexport class SomTooltip {\n @Element() el: HTMLElement;\n forEl: HTMLElement;\n\n /**\n * This property shows the text to be displayed in the tooltip.\n */\n @Prop() content: string;\n\n /**\n * This property controls the horizontal position of the popover.\n */\n @Prop({ mutable: true }) horizontalPosition: 'left' | 'right' | 'auto' = 'auto';\n\n /**\n * \tThis property controls the vertical position of the popover.\n */\n @Prop({ mutable: true }) verticalPosition: 'top' | 'bottom' | 'auto' = 'auto';\n\n /**\n * The tooltip role, set on the component by default.\n */\n //@Prop() role: string = 'tooltip';\n\n /**\n * The id for the active element to reference via aria-describedby.\n */\n @Prop() tooltipId: string;\n\n /**\n * This event is emitted when the popover is opened.\n */\n @Event() opened: EventEmitter;\n\n /**\n * This event is emitted when the popover is closed.\n */\n @Event() closed: EventEmitter;\n\n targetEl;\n\n handleFocusInCb;\n\n handleFocusOutCb;\n\n handleMouseOverCb;\n\n handleMouseOutCb;\n\n handleEscapeCb;\n\n handleTouchStartCb;\n\n handleTooltipMouseOverCb;\n\n handleTooltipMouseOutCb;\n\n @State() horizontalPos: string = this.horizontalPosition;\n @State() verticalPos: string = this.verticalPosition;\n\n /*\n * This method will close the popover.\n */\n @Method()\n open(): Promise<void> {\n return new Promise(resolve => {\n if (!this.forEl.classList.contains('visible')) {\n this.forEl.style.opacity = '1';\n this.forEl.style.display = 'inline';\n this.forEl.classList.add('visible');\n this.updatePosition();\n this.opened.emit();\n resolve();\n } else {\n // tooltip is already opened\n resolve();\n }\n });\n }\n\n /*\n * This method will close the popover.\n */\n @Method()\n close(): Promise<void> {\n return new Promise(resolve => {\n if (this.forEl.classList.contains('visible')) {\n this.forEl.style.opacity = '0';\n this.forEl.classList.remove('visible');\n this.closed.emit();\n resolve();\n } else {\n // tooltip is already closed\n resolve();\n }\n });\n }\n\n handleMouseOver() {\n this.open();\n }\n\n handleMouseOut() {\n this.close();\n }\n\n handleFocusIn() {\n this.open();\n }\n\n handleFocusOut() {\n this.close();\n }\n\n handleTouchStart() {\n this.open();\n }\n\n handleEscape(e) {\n if (this.targetEl && e.keyCode === KEY_CODES.ESC) {\n e.preventDefault();\n e.stopPropagation();\n this.close();\n this.closed.emit(e);\n }\n }\n\n handleTooltipMouseOver() {\n this.open();\n }\n\n handleTooltipMouseOut() {\n this.close();\n }\n\n registerEvents() {\n this.targetEl.addEventListener('focusin', this.handleFocusInCb);\n this.targetEl.addEventListener('focusout', this.handleFocusOutCb);\n this.targetEl.addEventListener('mouseover', this.handleMouseOverCb);\n this.targetEl.addEventListener('mouseout', this.handleMouseOutCb);\n this.targetEl.addEventListener('keydown', this.handleEscapeCb);\n this.targetEl.addEventListener('touchstart', this.handleTouchStartCb);\n\n this.forEl.addEventListener('mouseover', this.handleTooltipMouseOverCb);\n this.forEl.addEventListener('mouseout', this.handleTooltipMouseOutCb);\n }\n\n unregisterEvents() {\n this.targetEl.addEventListener('focusin', this.handleFocusInCb);\n this.targetEl.addEventListener('focusout', this.handleFocusOutCb);\n this.targetEl.addEventListener('mouseover', this.handleMouseOverCb);\n this.targetEl.addEventListener('mouseout', this.handleMouseOutCb);\n this.targetEl.addEventListener('keydown', this.handleEscapeCb);\n this.targetEl.addEventListener('touchstart', this.handleTouchStartCb);\n\n this.forEl.addEventListener('mouseover', this.handleTooltipMouseOverCb);\n this.forEl.addEventListener('mouseout', this.handleTooltipMouseOutCb);\n }\n\n updatePosition() {\n // Reset positioning\n this.forEl.style.top = '';\n this.forEl.style.bottom = '';\n this.forEl.style.left = '';\n this.forEl.style.right = '';\n this.horizontalPos = this.horizontalPosition;\n this.verticalPos = this.verticalPosition;\n\n // Reset caret\n this.forEl.classList.remove(\n \"caret-top-left\",\n \"caret-top-right\",\n \"caret-bottom-left\",\n \"caret-bottom-right\"\n );\n\n // Tooltip Element\n const tooltipRect = this.forEl.getBoundingClientRect();\n\n // Tooltip Trigger Element\n const tooltipTriggerRect = this.targetEl.getBoundingClientRect();\n \n const tooltipTriggerX = tooltipRect.x + tooltipRect.width;\n const tooltipTriggerY = tooltipTriggerRect.y + (tooltipTriggerRect.height + tooltipRect.height) * 2;\n\n // Horizontal Positioning\n if (this.horizontalPos === 'auto' || this.horizontalPos === null) {\n if (tooltipTriggerX > window.innerWidth) {\n this.horizontalPos = 'right';\n this.forEl.style.right = `${this.getRightPosition()}px`;\n } else {\n this.horizontalPos = 'left';\n this.forEl.style.left = `${this.getLeftPosition()}px`;\n }\n } else if (this.horizontalPos === 'right') {\n this.forEl.style.right = `${this.getRightPosition()}px`;\n } else {\n this.forEl.style.left = `${this.getLeftPosition()}px`;\n }\n\n // Vertical Positioning\n if (this.verticalPos === 'auto' || this.horizontalPos === null) {\n if (tooltipTriggerY > window.innerHeight) {\n this.verticalPos = 'top';\n this.forEl.style.bottom = `${this.getBottomPosition()}px`;\n } else {\n this.verticalPos = 'bottom';\n this.forEl.style.top = `${this.getTopPosition()}px`;\n }\n } else if (this.verticalPos === 'top') {\n this.forEl.style.bottom = `${this.getBottomPosition()}px`;\n } else {\n this.forEl.style.top = `${this.getTopPosition()}px`;\n }\n\n // Set caret direction\n this.forEl.classList.add(`caret-${this.verticalPos}-${this.horizontalPos}`);\n }\n\n getBottomPosition() {\n return this.targetEl.offsetParent.clientHeight - this.targetEl.offsetTop + VERTICAL_OFFSET;\n }\n\n getTopPosition() {\n return this.targetEl.offsetParent.clientTop + this.targetEl.offsetTop + this.targetEl.offsetHeight + VERTICAL_OFFSET;\n }\n\n getLeftPosition() {\n return this.targetEl.offsetParent.clientLeft + this.targetEl.offsetLeft - (this.targetEl.offsetWidth <= 24 ? 8 : 0);\n }\n\n getRightPosition() {\n return this.targetEl.offsetParent['offsetWidth'] - this.targetEl.offsetLeft - this.targetEl.offsetWidth - (this.targetEl.offsetWidth <= 24 ? 8 : 0);\n }\n\n componentWillLoad() {\n this.handleFocusInCb = this.handleFocusIn.bind(this);\n this.handleFocusOutCb = this.handleFocusOut.bind(this);\n this.handleMouseOverCb = this.handleMouseOver.bind(this);\n this.handleMouseOutCb = this.handleMouseOut.bind(this);\n this.handleEscapeCb = this.handleEscape.bind(this);\n this.handleTouchStartCb = this.handleTouchStart.bind(this);\n\n this.handleTooltipMouseOverCb = this.handleTooltipMouseOver.bind(this);\n this.handleTooltipMouseOutCb = this.handleTooltipMouseOut.bind(this);\n }\n\n componentDidLoad() {\n this.targetEl = document.querySelectorAll(`[aria-describedby=\"${this.tooltipId}\"]`)[0];\n this.registerEvents();\n }\n\n componentWillUnload() {\n this.unregisterEvents();\n }\n\n render() {\n return (\n <Host\n id={this.tooltipId}\n role=\"tooltip\"\n class=\"tooltip-wrapper\"\n ref={(el) => this.forEl = el}>\n <slot>{this.content}</slot>\n </Host>\n );\n }\n}\n"],"mappings":"kNAAA,MAAMA,EAAkB,2tCACxB,MAAAC,EAAeD,E,MCiBFE,EAAY,M,gHAYsC,K,oBAkB7D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