{"version":3,"sources":["src/components/accordion/scss/index.scss?tag=sy-accordion&encapsulation=shadow","src/components/accordion/accordion.tsx","src/components/accordion/accordion-item/animations/open.ts","src/components/accordion/accordion-item/animations/close.ts","src/components/accordion/accordion-item/scss/index.scss?tag=sy-accordion-item&encapsulation=shadow","src/components/accordion/accordion-item/accordion-item.tsx","src/components/alert/scss/index.scss?tag=sy-alert&encapsulation=shadow","src/components/alert/alert.tsx","src/components/app-bar/scss/index.scss?tag=sy-app-bar&encapsulation=shadow","src/components/app-bar/app-bar.tsx","src/components/avatar/scss/index.scss?tag=sy-avatar&encapsulation=shadow","src/components/avatar/avatar.tsx","src/components/backdrop/scss/index.scss?tag=sy-backdrop&encapsulation=shadow","src/components/backdrop/backdrop.tsx","src/components/badge/scss/index.scss?tag=sy-badge&encapsulation=shadow","src/components/badge/badge.tsx","src/components/breadcrumb/scss/index.scss?tag=sy-breadcrumb&encapsulation=shadow","src/components/breadcrumb/breadcrumb.tsx","src/components/breadcrumb/breadcrumb-item/scss/index.scss?tag=sy-breadcrumb-item&encapsulation=shadow","src/components/breadcrumb/breadcrumb-item/breadcrumb-item.tsx","src/components/button/scss/index.scss?tag=sy-button&encapsulation=shadow","src/components/button/button.tsx","src/components/button-group/scss/index.scss?tag=sy-button-group&encapsulation=shadow","src/components/button-group/button-group.tsx","src/components/card/scss/index.scss?tag=sy-card&encapsulation=shadow","src/components/card/card.tsx","src/components/card/card-content/scss/index.scss?tag=sy-card-content&encapsulation=shadow","src/components/card/card-content/card-content.tsx","src/components/card/card-footer/scss/index.scss?tag=sy-card-footer&encapsulation=shadow","src/components/card/card-footer/card-footer.tsx","src/components/card/card-header/scss/index.scss?tag=sy-card-header&encapsulation=shadow","src/components/card/card-header/card-header.tsx","src/components/grid/cell/scss/index.scss?tag=sy-cell&encapsulation=shadow","src/components/grid/cell/cell.tsx","src/components/grid/col/scss/index.scss?tag=sy-col&encapsulation=shadow","src/components/grid/col/col.tsx","src/components/collapse/scss/index.scss?tag=sy-collapse&encapsulation=shadow","src/components/collapse/collapse.tsx","src/components/context/consumer/consumer.tsx","src/components/context/provider/provider.tsx","src/utils/floating-elements.utils.ts","src/components/dialog/animations/close.ts","src/components/dialog/animations/open.ts","src/components/dialog/scss/index.scss?tag=sy-dialog&encapsulation=shadow","src/components/dialog/dialog.tsx","src/components/dialog/dialog-content/scss/index.scss?tag=sy-dialog-content&encapsulation=shadow","src/components/dialog/dialog-content/dialog-content.tsx","src/components/dialog/dialog-footer/scss/index.scss?tag=sy-dialog-footer&encapsulation=shadow","src/components/dialog/dialog-footer/dialog-footer.tsx","src/components/dialog/dialog-header/scss/index.scss?tag=sy-dialog-header&encapsulation=shadow","src/components/dialog/dialog-header/dialog-header.tsx","src/components/dismiss/scss/index.scss?tag=sy-dismiss&encapsulation=shadow","src/components/dismiss/dismiss.tsx","src/components/divider/scss/index.scss?tag=sy-divider&encapsulation=shadow","src/components/divider/divider.tsx","node_modules/@popperjs/core/lib/enums.js","node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","node_modules/@popperjs/core/lib/dom-utils/getWindow.js","node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","node_modules/@popperjs/core/lib/modifiers/applyStyles.js","node_modules/@popperjs/core/lib/utils/getBasePlacement.js","node_modules/@popperjs/core/lib/utils/math.js","node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","node_modules/@popperjs/core/lib/dom-utils/contains.js","node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","node_modules/@popperjs/core/lib/utils/within.js","node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","node_modules/@popperjs/core/lib/utils/expandToHashMap.js","node_modules/@popperjs/core/lib/modifiers/arrow.js","node_modules/@popperjs/core/lib/utils/getVariation.js","node_modules/@popperjs/core/lib/modifiers/computeStyles.js","node_modules/@popperjs/core/lib/modifiers/eventListeners.js","node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","node_modules/@popperjs/core/lib/utils/rectToClientRect.js","node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","node_modules/@popperjs/core/lib/utils/computeOffsets.js","node_modules/@popperjs/core/lib/utils/detectOverflow.js","node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","node_modules/@popperjs/core/lib/modifiers/flip.js","node_modules/@popperjs/core/lib/modifiers/hide.js","node_modules/@popperjs/core/lib/modifiers/offset.js","node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","node_modules/@popperjs/core/lib/utils/getAltAxis.js","node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","node_modules/@popperjs/core/lib/utils/orderModifiers.js","node_modules/@popperjs/core/lib/utils/debounce.js","node_modules/@popperjs/core/lib/utils/mergeByName.js","node_modules/@popperjs/core/lib/createPopper.js","node_modules/@popperjs/core/lib/popper.js","src/components/dropdown/animations/open.ts","src/components/dropdown/animations/close.ts","src/utils/types/common-props.types.ts","src/components/dropdown/scss/index.scss?tag=sy-dropdown&encapsulation=shadow","src/components/dropdown/dropdown.tsx","src/components/floated/floated.tsx","src/components/floating-element/floating-element.tsx","src/components/focus-trap/focusable.function.ts","src/components/focus-trap/shadow.function.ts","src/components/focus-trap/debounce.function.ts","src/components/focus-trap/focus-trap.tsx","src/components/footer/scss/index.scss?tag=sy-footer&encapsulation=shadow","src/components/footer/footer.tsx","src/components/grid/scss/index.scss?tag=sy-grid&encapsulation=shadow","src/components/grid/grid.tsx","src/components/infinite-scroll/scss/index.scss?tag=sy-infinite-scroll&encapsulation=shadow","src/components/infinite-scroll/infinite-scroll.tsx","src/components/list/scss/index.scss?tag=sy-list&encapsulation=shadow","src/components/list/list.tsx","src/components/list/list-item/scss/index.scss?tag=sy-list-item&encapsulation=shadow","src/components/list/list-item/list-item.tsx","src/components/loading/scss/index.scss?tag=sy-loading&encapsulation=shadow","src/components/loading/loading.tsx","src/components/orbital-loading/scss/index.scss?tag=sy-orbital-loading&encapsulation=shadow","src/components/orbital-loading/orbital-loading.tsx","src/components/paginator/scss/index.scss?tag=sy-paginator&encapsulation=shadow","src/components/paginator/paginator.tsx","src/components/progress-bar/scss/index.scss?tag=sy-progress-bar&encapsulation=shadow","src/components/progress-bar/progress-bar.tsx","src/components/progress-spinner/scss/index.scss?tag=sy-progress-spinner&encapsulation=shadow","src/components/progress-spinner/progress-spinner.tsx","src/components/router/router.tsx","src/components/router-link/scss/index.scss?tag=sy-router-link&encapsulation=shadow","src/components/router-link/router-link.tsx","src/components/grid/row/scss/index.scss?tag=sy-row&encapsulation=shadow","src/components/grid/row/row.tsx","src/components/sidebar/animations/close.ts","src/components/sidebar/animations/open.ts","src/components/sidebar/scss/index.scss?tag=sy-sidebar&encapsulation=shadow","src/components/sidebar/sidebar.tsx","src/components/sidebar/sidebar-content/scss/index.scss?tag=sy-sidebar-content&encapsulation=shadow","src/components/sidebar/sidebar-content/sidebar-content.tsx","src/components/sidebar/sidebar-footer/scss/index.scss?tag=sy-sidebar-footer&encapsulation=shadow","src/components/sidebar/sidebar-footer/sidebar-footer.tsx","src/components/sidebar/sidebar-header/sidebar-header.tsx","src/components/skeleton/scss/index.scss?tag=sy-skeleton&encapsulation=shadow","src/components/skeleton/skeleton.tsx","src/components/stepper/step/scss/index.scss?tag=sy-step&encapsulation=shadow","src/components/stepper/step/step.tsx","src/components/stepper/scss/index.scss?tag=sy-stepper&encapsulation=shadow","src/components/stepper/stepper.tsx","src/components/stretched-link/scss/index.scss?tag=sy-stretched-link&encapsulation=shadow","src/components/stretched-link/stretched-link.tsx","src/components/tag/scss/index.scss?tag=sy-tag&encapsulation=shadow","src/components/tag/tag.tsx","src/components/text/scss/index.scss?tag=sy-text&encapsulation=shadow","src/components/text/text.tsx","src/components/toast-container/toast/scss/index.scss?tag=sy-toast&encapsulation=shadow","src/components/toast-container/toast/toast.tsx","src/components/toast-container/scss/index.scss?tag=sy-toast-container&encapsulation=shadow","src/components/toast-container/toast-container.tsx","src/components/tooltip/animations/open.ts","src/components/tooltip/animations/close.ts","src/components/tooltip/scss/index.scss?tag=sy-tooltip&encapsulation=shadow","src/components/tooltip/tooltip.tsx","src/components/tree/scss/index.scss?tag=sy-tree&encapsulation=shadow","src/components/tree/tree.tsx","src/components/tree/tree-node/animations/open.ts","src/components/tree/tree-node/animations/close.ts","src/components/tree/tree-node/scss/index.scss?tag=sy-tree-node&encapsulation=shadow","src/components/tree/tree-node/tree-node.tsx"],"names":["indexCss","Accordion","[object Object]","hostRef","this","singleExpanded","alignArrow","disabled","enableDrag","disableAnimations","el","querySelectorAll","forEach","item","disable","enable","setChildrenDisableAnimations","e","expandedItem","target","isEqualNode","collapse","stopPropagation","instant","console","warn","promises","push","expand","Promise","all","descendantsObserver","DescendantsObserver","array","setDisableAnimation","observe","childList","defaultOptions","handle","createSortableDrag","dragConfig","isConnected","disconnect","addedAccordionItem","accordionItem","h","Host","__decorate","Debounce","accordionItemOpenAnimation","style","display","accordionItemHeight","offsetHeight","accordionItemHeightTreshold","accordionItemOpen","growY","from","to","addElement","easing","EASING_EMPHASIZED_DECCELERATE","duration","DURATION_LONG_2","DURATION_SHORT_4","accordionItemCloseAnimation","direction","EASING_EMPHASIZED_ACCELERATE","AccordionItem","expanded","expandedIcon","collapsedIcon","internalExpanded","createHandleComponent","removeHandleComponent","isAlreadyExpanded","beforeExpandedResult","beforeExpanded","syAccordionItemWillExpand","emit","currentAnimation","stop","getOpenAnimation","play","syAccordionItemDidToggle","isAlreadyCollapsed","beforeCollapsedResult","beforeCollapsed","syAccordionItemWillCollapse","getCloseAnimation","openAnimation","DISABLE_ANIMATION_VALUE","contentEl","animationBuilder","closeAnimation","isInsideShadowDom","shadowRoot","contains","hasDataToggle","hasAttribute","toggle","querySelector","dragElement","document","createElement","slot","src","getAssetPath","classList","add","append","removeChild","undefined","arrowDirection","class","onClick","handleHeaderClick","name","label","ref","Alert","dismissible","type","typesIcons","error","warning","success","info","syAlertDidClose","remove","role","header","dismiss","AppBar","Avatar","rounded","small","initialsSize","shownInitials","initials","length","slice","initialsWatcher","image","initialsSizeWatcher","showInitials","Backdrop","Badge","color","Breadcrumb","homeTarget","separator","endWithSeparator","setAttribute","--separator","home","href","BreadcrumbItem","active","handleClick","event","openURL","host","aria-current","generateAnchorAttributes","Button","loading","fab","buttonType","content","checked","buttonRadioEvent","contentClasses","text-only","icon-left","icon-right","icon-only","typesClasses","primary","accent","default","basic","stopImmediatePropagation","form","closest","preventDefault","reset","requestSubmit","handleButtonRadioToggle","button","addButtonRadioListener","removeButtonRadioListener","syButtonDidCheck","syButtonDidUncheck","anchorAtributes","smallClass","activeClass","attributes","getRootNode","addEventListener","removeEventListener","icon","renderLoadingSpinner","renderLabel","size","getButtonAttributes","renderInnerButton","ButtonGroup","overflow","resizeObserver","ResizeObserver","entries","entry","clientWidth","scrollWidth","syButtonGroupDidOverflow","sizeObserver","MutationObserver","mutations","handleOverflow","Card","border","hideShadow","getCardAttributes","CardContent","CardFooter","CardHeader","Cell","rowStart","gridRowStart","colStart","gridColumnStart","height","gridRowEnd","width","gridColumnEnd","getCellStyle","Col","Collapse","opened","newValue","oldValue","syCollapseDidOpen","syCollapseDidClose","rootNode","trigger","triggerBy","eventTrigger","bind","ContextConsumer","unsubscribe","value","syContextDidChange","syContextConsumerDidSubscribe","context","getElement","subscribe","ContextProvider","consumersSet","Set","changeValue","consumersListener","detail","delete","VIEWPORT_ATTRIBUTE","FLOATING_ELEMENT_CLASS_NAME","FloatingElements","viewportService","elementsInfos","Map","waitIfClosing","originalParent","getParentElement","originalParentNode","fromShadowRoot","originalNextSiblingEl","nextElementSibling","containerEl","floatingElementEl","appendChild","removeListener","addElementRemovedListener","parentNode","nextSiblingEl","listener","close","set","beforeClose","async","afterClose","floatingElement","floatingElementInfos","get","closingPromise","resolve","then","insertBefore","finally","closing","err","DOMException","code","NOT_FOUND_ERR","floatedEl","addListeners","afterRemoved","removeListeners","EncapsulatedStyles","rootNodeEl","isEncapsulated","nodeType","Node","DOCUMENT_FRAGMENT_NODE","ShadowRoot","getShadowRootClassList","styleSheets","adoptedStyleSheets","styleEl","cssText","getCssText","innerText","className","Object","values","map","mapStyleSheetToCssText","join","styleSheet","cssRules","cssRule","FloatingElementViewport","encapsulatedStyles","childEl","viewportElement","findViewport","body","getEncapsulatedStyles","parentElement","closestElement","floatingElements","dialogCloseAnimation","dialogEl","backdropEl","dialogOpenAnim","createAnimation","backDropAnim","fadeOut","dialogDivFade","addAnimation","dialogOpenAnimation","fadeIn","DURATION_MEDIUM_4","dialogDivScale","scale","beforeStyles","transform-origin","dialogsOpened","Array","Dialog","isVisibleInternal","dialogSize","hideBackdrop","position","ignoreOutsideClick","visible","open","visibleWatcher","action","beforeClosedResult","beforeClosed","syDialogWillClose","onClosed","beforeOpenedResult","beforeOpened","syDialogWillOpen","onOpened","backdropElement","ev","key","lastOpened","at","syDialogDidOpen","afterOpened","dialogDivEl","syDialogDidCancel","syDialogDidSubmit","afterClosed","syDialogDidClose","thisDialogIndex","findIndex","splice","outsideEl","handleOutsideClick","DialogContent","DialogFooter","submitLabel","cancelLabel","buttonsPosition","btnType","syDialogFooterDidSubmitClick","syDialogFooterDidCancelClick","DialogHeader","hideCloseButton","dialogTitle","large","syDialogHeaderDidCloseClick","Dismiss","Divider","top","bottom","right","left","auto","basePlacements","start","end","clippingParents","viewport","popper","reference","variationPlacements","reduce","acc","placement","concat","placements","beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite","modifierPhases","getNodeName","element","nodeName","toLowerCase","getWindow","node","window","toString","ownerDocument","defaultView","isElement","OwnElement","Element","isHTMLElement","HTMLElement","isShadowRoot","applyStyles","_ref","state","keys","elements","styles","assign","removeAttribute","effect","_ref2","initialStyles","options","strategy","margin","arrow","styleProperties","hasOwnProperty","property","attribute","applyStyles$1","enabled","phase","fn","requires","getBasePlacement","split","max","Math","min","round","getBoundingClientRect","includeScale","rect","scaleX","scaleY","offsetWidth","x","y","getLayoutRect","clientRect","abs","offsetLeft","offsetTop","parent","child","next","isSameNode","getComputedStyle","isTableElement","indexOf","getDocumentElement","documentElement","getParentNode","assignedSlot","getTrueOffsetParent","offsetParent","getContainingBlock","isFirefox","navigator","userAgent","isIE","elementCss","currentNode","css","transform","perspective","contain","willChange","filter","getOffsetParent","getMainAxisFromPlacement","within","mathMax","mathMin","withinMaxClamp","v","getFreshSideObject","mergePaddingObject","paddingObject","expandToHashMap","hashMap","toPaddingObject","padding","rects","_state$modifiersData$","arrowElement","popperOffsets","modifiersData","basePlacement","axis","isVertical","len","arrowRect","minProp","maxProp","endDiff","startDiff","arrowOffsetParent","clientSize","clientHeight","centerToReference","center","offset","axisProp","centerOffset","_options$element","arrow$1","requiresIfExists","getVariation","unsetSides","roundOffsetsByDPR","win","dpr","devicePixelRatio","mapToStyles","_Object$assign2","popperRect","variation","offsets","gpuAcceleration","adaptive","roundOffsets","isFixed","_ref3","_ref3$x","_ref3$y","hasX","hasY","sideX","sideY","heightProp","widthProp","offsetY","visualViewport","offsetX","commonStyles","_Object$assign","computeStyles","_ref4","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","data-popper-placement","computeStyles$1","data","passive","instance","_options$scroll","scroll","_options$resize","resize","scrollParents","scrollParent","update","eventListeners","hash","getOppositePlacement","replace","matched","getOppositeVariationPlacement","getWindowScroll","scrollLeft","pageXOffset","scrollTop","pageYOffset","getWindowScrollBarX","getViewportRect","html","test","getDocumentRect","_element$ownerDocumen","winScroll","scrollHeight","isScrollParent","_getComputedStyle","overflowX","overflowY","getScrollParent","listScrollParents","list","isBody","updatedList","rectToClientRect","getInnerBoundingClientRect","clientTop","clientLeft","getClientRectFromMixedType","clippingParent","getClippingParents","canEscapeClipping","clipperElement","getClippingRect","boundary","rootBoundary","mainClippingParents","firstClippingParent","clippingRect","accRect","computeOffsets","commonX","commonY","mainAxis","detectOverflow","_options","_options$placement","_options$boundary","_options$rootBoundary","_options$elementConte","elementContext","_options$altBoundary","altBoundary","_options$padding","altContext","clippingClientRect","contextElement","referenceClientRect","popperClientRect","elementClientRect","overflowOffsets","offsetData","multiply","computeAutoPlacement","flipVariations","_options$allowedAutoP","allowedAutoPlacements","allPlacements","allowedPlacements","overflows","sort","a","b","getExpandedFallbackPlacements","oppositePlacement","flip","_skip","_options$mainAxis","checkMainAxis","_options$altAxis","altAxis","checkAltAxis","specifiedFallbackPlacements","fallbackPlacements","_options$flipVariatio","preferredPlacement","isBasePlacement","referenceRect","checksMap","makeFallbackChecks","firstFittingPlacement","i","_basePlacement","isStartVariation","mainVariationSide","altVariationSide","checks","every","check","numberOfChecks","_loop","_i","fittingPlacement","find","_ret","flip$1","getSideOffsets","preventedOffsets","isAnySideFullyClipped","some","side","hide","preventOverflow","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","data-popper-reference-hidden","data-popper-escaped","hide$1","distanceAndSkiddingToXY","invertDistance","skidding","distance","_options$offset","_data$state$placement","offset$1","popperOffsets$1","getAltAxis","_options$tether","tether","_options$tetherOffset","tetherOffset","tetherOffsetValue","normalizedTetherOffsetValue","offsetModifierState","_offsetModifierState$","mainSide","altSide","additive","minLen","maxLen","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","clientOffset","offsetModifierValue","tetherMin","tetherMax","preventedOffset","_offsetModifierState$2","_mainSide","_altSide","_offset","_len","_min","_max","isOriginSide","_offsetModifierValue","_tetherMin","_tetherMax","_preventedOffset","preventOverflow$1","getHTMLElementScroll","getNodeScroll","isElementScaled","getCompositeRect","elementOrVirtualElement","isOffsetParentAnElement","offsetParentIsScaled","order","modifiers","visited","result","modifier","dep","has","depModifier","orderModifiers","orderedModifiers","debounce","pending","mergeByName","merged","current","existing","DEFAULT_OPTIONS","areValidElements","arguments","args","_key","popperGenerator","generatorOptions","_generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","createPopper","effectCleanupFns","isDestroyed","setOptions","setOptionsAction","cleanupModifierEffects","m","runModifierEffects","forceUpdate","_state$elements","index","_state$orderedModifie","_state$orderedModifie2","destroy","onFirstUpdate","_ref3$options","cleanupFn","noopFn","dropdownOpenAnimation","dropdownCloseAnimation","getElementReference","hostReference","returnsNull","ESCAPE_KEY","PLACEMENTS","top-start","top-end","bottom-end","bottom-start","Dropdown","openedEventListeners","ignoreEscape","sameContainerWidth","offsetDistance","selectElementsWatcher","addEscapeHandler","addOutsideClickHandler","toggleByElement","toggleBy","containerElement","container","addToggleByHandler","handleContainerResize","isOpenedInternal","opening","openDropdown","popperConfig","getPopperConfig","syDropdownWillOpen","syDropdownDidOpen","closeDropdown","syDropdownWillClose","syDropdownDidClose","isInsideClick","Boolean","composedPath","p","currentHeight","latestContainerHeight","handler","focus","escapeHandler","checkToggleButtonClick","ELEMENT_NODE","outsideClickHandler","capture","listeners","sameWidth","defaultPopperConfig","Floated","FloatingElement","isHidden","$elem","getAttribute","opacity","visibility","isDisabled","isFocusable","HTMLAnchorElement","HTMLAreaElement","HTMLButtonElement","HTMLInputElement","HTMLTextAreaElement","HTMLSelectElement","HTMLIFrameElement","queryShadowRoot","root","skipNode","isMatch","reverse","maxDepth","depth","traverseSlot","$slot","assignedNodes","$slotParent","children","$child","tagName","timeouts","cb","ms","id","timeout","clearTimeout","setTimeout","FocusTrap","focused","debounceId","random","addHandler","removeHandler","trapFocus","trapToEnd","focusableElement","getNextFocusableElement","backup","updateFocused","disabledWatcher","focusLastElementBounded","focusLastElement","focusFirstElementBounded","focusFirstElement","onFocusInBounded","onFocusIn","onFocusOutBounded","onFocusOut","Footer","getContrastColor","handleStyleChange","styleObserver","newColor","ColorHelper","getPropertyValue","contrastColor","attributeFilter","subtree","rel","alt","Grid","rows","gridTemplateRows","cols","gridTemplateColumns","gap","isNaN","Number","--sy-grid-gap","getGridStyle","InfiniteScroll","thrPx","thrPc","didFire","isLoading","threshold","onScroll","scrollEl","canStart","infiniteHeight","distanceFromInfinite","syScrollDidReachThreshold","syScrollDidReachTop","val","lastIndexOf","parseFloat","enableScrollEvents","elementToBeScrolled","tresholdWatcher","shouldListen","infinite-scroll-loading","infinite-scroll-enabled","List","gridItemSelector","sortable","grid","MuuriHelper","createGrid","destroyGrid","ListItem","click","getClasses","tabIndex","Loading","loadingComponentTag","tagResults","getPropertiesTagContext","tagContext","tag","Consumes","OrbitalLoading","firstColor","secondColor","getTintOrShadeColor","--sy-orbital-loading-color-small-circle","--sy-orbital-loading-color-medium-circle","--sy-orbital-loading-color-large-circle","getCSSTokens","cx","cy","r","Paginator","hideFirstAndLastButtons","hidePreviousAndNextButtons","maxInternalButtons","internalButtons","arrowButtonsIcons","first","previous","last","setActivePage","syPaginatorPageDidChange","aria-disabled","pointer-events","--padding-x","indexes","getInternalButtonAttributes","getInternalButtonStyle","ceil","floor","contentRect","buttonSize","buttons","canHasMaxButtons","howManyArrowButtons","buttonsAfterResize","indexWatcher","maxInternalButtonsWatcher","resizePaginator","aria-label","getArrowButtonAttributes","getArrowButtonStyle","renderInternalButtons","ProgressBar","fixValue","ariaValueNow","ariaValueMin","ariaValueMax","getProgressBarAttributes","ProgressSpinner","transition","strokeWidth","hasBackground","getStrokeWidth","unlockTransition","--sy-progress-spinner-value","--sy-progress-spinner-stroke-width-percentage","getInnerRadius","getCircleStyle","Router","url","startsWith","URL","location","pathname","syRouterDidChange","RouterLink","stretchedLink","AnchorTag","Row","sidebarCloseAnimation","sidebarElement","orientation","sidebarAnim","sidebarScale","slideIn","backdropFade","sidebarOpenAnimation","Sidebar","internalVisible","show","sySidebarWillHide","sySidebarDidHide","sySidebarWillShow","sySidebarDidShow","sidebarEl","hidden","getBackdroprAttributes","SidebarContent","SidebarFooter","SidebarHeader","Skeleton","items","count","animation","fill","--sy-skeleton-direction","_","String","aria-busy","aria-valuemin","aria-valuemax","aria-valuetext","Step","getIconState","Stepper","vertical","StretchedLink","SyTag","syTagDidDismiss","Text","tagType","h1","h2","h3","h4","h5","h6","lead","bold","italic","condensed","underline","strikethrough","TextTag","sy-text","Toast","isClosed","dismissable","expirable","expirationTime","extendedTime","expired","syToastDidExpire","syToastDidClose","timeoutInstance","extendTimeFunction","extendTime","pauseTimeFunction","pauseTime","aria-live","aria-atomic","ToastContainer","tooltipOpenAnimation","tooltipCloseAnimation","CURSOR_ANCHOR_NAME","Tooltip","tooltipStyle","delay","showHandlers","hideHandlers","removeCursorHandler","removeAnchorHandler","setAnchorAndTrigger","cursorPosition","triggerElement","for","addCursorHandler","delayTimeoutId","anchor","syTooltipWillShow","syTooltipDidOpen","syTooltipWillHide","syTooltipDidClose","hideHandlerFunc","showHandlerFunc","generateGetBoundingClientRect","setTrigger","addAnchorHandler","setTriggerElement","elseReturn","toggleHandlerFunc","showHandlersArr","str","trim","hideHandlersArr","toggleHandlersArr","includes","mouseHandlerFunc","updateTooltipPosition","clientX","clientY","getTooltipAttributes","Tree","activePath","activeNode","activate","deactivate","expandedNode","toLocaleLowerCase","addedTreeNode","treeNode","treeNodeOpenAnimation","treeNodeCloseAnimation","CHILD_SLOT","TreeNode","typeDefinedByUser","handleSlotChange","level","localName","syTreeNodeDidActivate","slotObserver","syTreeNodeDidExpand","characterData","hasDataDisableToggle","handleLeafClick","toggleExpand","childElement","handleNodeCLick","--sy-tree-node-level"],"mappings":"8fAAA,MAAMA,EAAW,sxCCcJC,EAAS,MALtBC,YAAAC,aAc2BC,KAAAC,eAAiB,MAKjBD,KAAAE,WAA8B,QAK9BF,KAAAG,SAAW,MAKXH,KAAAI,WAAa,MAqB9BJ,KAAAK,kBAAoB,MAb5BP,kBACEE,KAAKM,GAAGC,iBAAiB,qBAAqBC,SAASC,IACrD,GAAIT,KAAKG,SAAU,CACjBM,EAAKC,cACA,CACLD,EAAKE,aAUXb,2BACEE,KAAKY,+BAIPd,4BAA4Be,GAC1B,MAAMC,EAAeD,EAAEE,OACvBf,KAAKM,GAAGC,iBAAiB,8BAA8BC,SAASC,IAC9D,GAAIT,KAAKC,iBAAmBQ,EAAKO,YAAYF,GAAe,CAC1DL,EAAKQ,eAGTJ,EAAEK,kBAQJpB,gBAAgBqB,EAAU,OACxB,GAAInB,KAAKC,eAAgB,CACvBmB,QAAQC,KAAK,iEAEf,IAAKrB,KAAKG,WAAaH,KAAKC,eAAgB,CAC1C,MAAMqB,EAA+B,GACrCtB,KAAKM,GAAGC,iBAAiB,qBAAqBC,SAASC,GAASa,EAASC,KAAKd,EAAKe,OAAOL,YACpFM,QAAQC,IAAIJ,IAStBxB,kBAAkBqB,EAAU,OAC1B,MAAMG,EAA+B,GACrCtB,KAAKM,GAAGC,iBAAiB,qBAAqBC,SAASC,GAASa,EAASC,KAAKd,EAAKQ,SAASE,YACtFM,QAAQC,IAAIJ,GAGpBxB,oBACEE,KAAK2B,oBAAsB,IAAIC,EAAoB,qBAAsBC,IACvE7B,KAAK8B,oBAAoBD,MAG3B7B,KAAK2B,oBAAoBI,QAAQ/B,KAAKM,GAAI,CACxC0B,UAAW,OAIflC,mBACE,MAAMmC,EAAiB,CACrBC,OAAQ,2BAGVC,EAAmBnC,KAAKM,GAAW,IAC9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D,OAEF,MAAM3lC,EAAmBzF,KAAKsF,eAAiB+kC,GAC/C,GAAIrqC,KAAKorC,aAAc,CACrB,OAAO3lC,EAAiB,CAAE4V,KAAMrb,KAAKM,GAAIse,MAAO5e,KAAKorC,gBAIjDtrC,oBACN,UAAWE,KAAK0F,iBAAmB,SAAU,CAC3C,GAAI1F,KAAK0F,iBAAmBH,EAAyB,CACnD,OAEF,GAAIvF,KAAKorC,aAAc,CACrB,OAAOd,GAAuB,CAAEjvB,KAAMrb,KAAKM,GAAIse,MAAO5e,KAAKorC,eAE7D,OAEF,MAAM3lC,EAAmBzF,KAAK0F,gBAAkB4kC,GAChD,GAAItqC,KAAKorC,aAAc,CACrB,OAAO3lC,EAAiB,CAAE4V,KAAMrb,KAAKM,GAAIse,MAAO5e,KAAKorC,gBAIjDtrC,kBACNE,KAAK+pC,WAGPjqC,SACE,OACE2C,EAACC,EAAI,KACHD,EAAA,eAAA,CACEqE,MAAM,sBACNC,QAAUlG,GAAMb,KAAKqrC,gBAAgBxqC,GACrC6I,OAAQ1J,KAAK0J,OACbvJ,SAAUH,KAAKG,YACX6J,EAAyBhK,OAE5BA,KAAKsH,OAAS,eACZtH,KAAKiE,SACJxB,EAAA,UAAA,CAASqE,MAAM,cAAcG,KAAK,iBAElCxE,EAAA,UAAA,CAASqE,MAAM,cAAcG,KAAK,mBAEtCxE,EAAA,OAAA,OAEFA,EAAA,MAAA,CACEqE,MAAM,QACNK,IAAMA,GAASnH,KAAKorC,aAAejkC,EACnCrE,MAAO,CAAEwoC,uBAAwBtrC,KAAK2qC,MAAMpvB,aAE5C9Y,EAAA,OAAA,CAAMwE,KAAMsjC","sourcesContent":["@import '../../../styles/reboot/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, h, Prop, Listen, Element, Method, Watch } from '@stencil/core';\nimport { createSortableDrag } from '../../utils/sortable-drag';\nimport { Debounce } from '../../utils/decorators/debounce/debounce.decorator';\nimport { DescendantsObserver } from '../../utils/descendants-observer';\n\n/**\n * @slot - Slot to add as many as necessary.\n */\n\n@Component({\n tag: 'sy-accordion',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class Accordion {\n // Private addedAccordionItem: Array = [];\n private descendantsObserver: DescendantsObserver;\n\n @Element() el: HTMLSyAccordionElement;\n\n /**\n * If true, only one item will be expanded at time.\n */\n @Prop({ reflect: true }) singleExpanded = false;\n\n /**\n * Sets arrow icon to display on the start or end of the header.\n */\n @Prop({ reflect: true }) alignArrow: 'start' | 'end' = 'start';\n\n /**\n * Disable entire accordion.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * If true, actives drag function.\n */\n @Prop({ reflect: true }) enableDrag = false;\n\n /**\n * SortableJS config.\n */\n @Prop() dragConfig: any;\n\n @Watch('disabled')\n disabledWatcher(): void {\n this.el.querySelectorAll('sy-accordion-item').forEach((item) => {\n if (this.disabled) {\n item.disable();\n } else {\n item.enable();\n }\n });\n }\n\n /**\n * Disables all animations from all items\n */\n @Prop() disableAnimations = false;\n @Watch('disableAnimations')\n disableAnimationsWatcher(): void {\n this.setChildrenDisableAnimations();\n }\n\n @Listen('syAccordionItemWillExpand')\n onSyAccordionItemWillExpand(e: CustomEvent): void {\n const expandedItem = e.target as HTMLElement;\n this.el.querySelectorAll(':scope > sy-accordion-item').forEach((item: HTMLSyAccordionItemElement) => {\n if (this.singleExpanded && !item.isEqualNode(expandedItem)) {\n item.collapse();\n }\n });\n e.stopPropagation();\n }\n\n /**\n * Expand all items. Only works if single-expanded is false.\n * If instant is true, there won't have open animation in all items.\n */\n @Method()\n async expandAll(instant = false): Promise {\n if (this.singleExpanded) {\n console.warn('Warning: Calling expandAll in a single-expanded sy-accordion.');\n }\n if (!this.disabled && !this.singleExpanded) {\n const promises: Promise[] = [];\n this.el.querySelectorAll('sy-accordion-item').forEach((item) => promises.push(item.expand(instant)));\n await Promise.all(promises);\n }\n }\n\n /**\n * Collapse all items.\n * If instant is true, there won't have close animation in all items.\n */\n @Method()\n async collapseAll(instant = false): Promise {\n const promises: Promise[] = [];\n this.el.querySelectorAll('sy-accordion-item').forEach((item) => promises.push(item.collapse(instant)));\n await Promise.all(promises);\n }\n\n componentWillLoad() {\n this.descendantsObserver = new DescendantsObserver('sy-accordion-item', (array: Array) => {\n this.setDisableAnimation(array);\n });\n\n this.descendantsObserver.observe(this.el, {\n childList: true,\n });\n }\n\n componentDidLoad() {\n const defaultOptions = {\n handle: '.sy-accordion-drag-icon',\n };\n\n createSortableDrag(this.el as any, {\n ...defaultOptions,\n ...this.dragConfig,\n });\n\n this.setChildrenDisableAnimations();\n }\n\n disconnectedCallback() {\n if (this.el.isConnected) return;\n\n this.descendantsObserver?.disconnect();\n }\n\n @Debounce(300)\n private setDisableAnimation(addedAccordionItem) {\n addedAccordionItem.forEach((accordionItem) => {\n if (accordionItem.isConnected) {\n accordionItem.disableAnimations = this.disableAnimations;\n }\n });\n }\n\n private setChildrenDisableAnimations() {\n this.el.querySelectorAll('sy-accordion-item').forEach((item) => {\n item.disableAnimations = this.disableAnimations;\n });\n }\n\n render() {\n return (\n \n \n \n );\n }\n}\n","import { Animation } from '@ionic/core';\nimport { DURATION_LONG_2, DURATION_SHORT_4, EASING_EMPHASIZED_DECCELERATE, growY } from '../../../../utils/animations';\n\nexport function accordionItemOpenAnimation(accordionItem: HTMLElement): Animation {\n // Leve gambiarra para pegar o tamanho total do Accordion Item\n accordionItem.style.display = 'block';\n const accordionItemHeight = accordionItem.offsetHeight;\n\n // Reset do valor original para o display\n accordionItem.style.display = '';\n\n // TODO[MLH014529]: Validar necessidade e valor do Treshold de tamanho do Accordion Item Content\n const accordionItemHeightTreshold = 750;\n const accordionItemOpen = (growY({ from: '0px', to: `${accordionItemHeight}px` }) as Animation)\n .addElement(accordionItem)\n .easing(EASING_EMPHASIZED_DECCELERATE);\n\n if (accordionItemHeight > accordionItemHeightTreshold) {\n accordionItemOpen.duration(DURATION_LONG_2);\n } else {\n accordionItemOpen.duration(DURATION_SHORT_4);\n }\n\n return accordionItemOpen;\n}\n","import { Animation } from '@ionic/core';\nimport { EASING_EMPHASIZED_ACCELERATE, DURATION_SHORT_4 } from '../../../../utils/animations';\nimport { accordionItemOpenAnimation } from './open';\n\nexport function accordionItemCloseAnimation(accordionItem: HTMLElement): Animation {\n return accordionItemOpenAnimation(accordionItem)\n .direction('reverse')\n .easing(EASING_EMPHASIZED_ACCELERATE)\n .duration(DURATION_SHORT_4);\n}\n","@import '../../../../styles';\n@import '../../../../styles/reboot/mixins';\n@import '../../../../styles/typography/mixins';\n@import '../../../../styles/states/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Animation } from '@ionic/core';\nimport { Component, Element, Event, EventEmitter, getAssetPath, h, Host, Method, Prop, Watch } from '@stencil/core';\nimport { accordionItemCloseAnimation } from './animations/close';\nimport { accordionItemOpenAnimation } from './animations/open';\nimport { DISABLE_ANIMATION_VALUE } from '../../../utils/animations';\n\n/**\n * @slot - Item's content.\n * @slot header - Content added in the item's header.\n */\n@Component({\n tag: 'sy-accordion-item',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n assetsDirs: ['assets'],\n shadow: true,\n})\nexport class AccordionItem {\n /**\n * Internal boolean to indicate when the property `expanded` was modified externally.\n */\n private internalExpanded: boolean;\n private contentEl: HTMLDivElement | undefined;\n private currentAnimation: Animation | undefined;\n private dragElement: HTMLImageElement | undefined;\n\n @Element() el!: HTMLSyAccordionItemElement;\n\n /**\n * Item's label.\n */\n @Prop() label!: string;\n\n /**\n * Indicate if the item is expanded.\n */\n @Prop({ mutable: true, reflect: true }) expanded = false;\n\n /**\n * Callback function called before the accordion item is collapsed.\n * If returns 'false', the accordion item will not be collapsed.\n */\n @Prop() beforeCollapsed?: () => void | boolean | Promise;\n\n /**\n * Callback function called before the accordion item is expanded.\n * If returns 'false', the accordion item will not be expanded.\n */\n @Prop() beforeExpanded?: () => void | boolean | Promise;\n\n @Watch('expanded')\n expandedWatcher(): Promise | undefined {\n if (this.expanded === this.internalExpanded) return;\n\n if (this.expanded) {\n return this.expand();\n }\n return this.collapse();\n }\n\n /**\n * Sets item's state to disabled.\n */\n @Prop({ mutable: true, reflect: true }) disabled = false;\n\n @Watch('disabled')\n disabledWatcher(): Promise {\n if (this.disabled) {\n return this.disable();\n }\n return this.enable();\n }\n\n /**\n * Custom expanded icon. Used on the accordion header when it is expanded.\n */\n @Prop() expandedIcon = 'arrow-down-1';\n\n /**\n * Custom collapsed icon. Used on the accordion header when it is collpased.\n */\n @Prop() collapsedIcon = 'arrow-right-1';\n\n /**\n * If true, actives drag function.\n */\n @Prop({ reflect: true }) enableDrag = false;\n\n @Watch('enableDrag')\n enableDragWatcher(): void {\n if (this.enableDrag) {\n this.createHandleComponent();\n } else {\n this.removeHandleComponent();\n }\n }\n\n /**\n * Optional custom animation to replace the default and be played when the component starts opening.\n * If 'none', the accordion-item won't have open animation.\n */\n @Prop() openAnimation?: ((accordionItem: HTMLElement) => Animation) | string;\n\n /**\n * Optional custom animation to replace the default and be played when the component starts closing.\n * If 'none', the accordion-item won't have close animation.\n */\n @Prop() closeAnimation?: ((accordionItem: HTMLElement) => Animation) | string;\n\n /**\n * Disables all animations\n */\n @Prop() disableAnimations = false;\n\n /**\n * Emitted after an item is expanded or collapsed.\n */\n @Event() syAccordionItemDidToggle: EventEmitter;\n\n /**\n * Emitted when an item starts to collapse.\n */\n @Event() syAccordionItemWillCollapse: EventEmitter;\n\n /**\n * Emitted when an item starts to expand.\n */\n @Event() syAccordionItemWillExpand: EventEmitter;\n\n /**\n * Toggle content between hidden or revealed.\n */\n @Method()\n async toggle(instant = false): Promise {\n if (this.expanded) {\n return this.collapse(instant);\n }\n\n return this.expand(instant);\n }\n\n /**\n * Enable item.\n */\n @Method()\n async enable(): Promise {\n this.disabled = false;\n }\n\n /**\n * Disable item: collapsed and can't be toggled.\n */\n @Method()\n async disable(instant = false): Promise {\n this.disabled = true;\n await this.collapse(instant);\n }\n\n /**\n * Expand item's content.\n * If 'instant' is true, the accordion-item won't have open animation.\n */\n @Method()\n async expand(instant = false): Promise {\n const isAlreadyExpanded = this.expanded && this.internalExpanded;\n if (isAlreadyExpanded) return false;\n\n const beforeExpandedResult = this.beforeExpanded && (await this.beforeExpanded());\n if (beforeExpandedResult === false) return false;\n\n this.internalExpanded = true;\n this.expanded = true;\n this.syAccordionItemWillExpand.emit();\n\n if (this.currentAnimation) {\n this.currentAnimation.stop();\n }\n\n if (!instant && !this.disableAnimations) {\n this.currentAnimation = this.getOpenAnimation();\n if (this.currentAnimation) {\n await this.currentAnimation.play();\n }\n }\n\n this.syAccordionItemDidToggle.emit(this.expanded);\n return true;\n }\n\n /**\n * Collapse item's content.\n * If 'instant' is true, the accordion-item won't have close animation.\n */\n @Method()\n async collapse(instant = false): Promise {\n const isAlreadyCollapsed = !this.expanded && !this.internalExpanded;\n if (isAlreadyCollapsed) return false;\n\n const beforeCollapsedResult = this.beforeCollapsed && (await this.beforeCollapsed());\n if (beforeCollapsedResult === false) return false;\n\n this.internalExpanded = false;\n this.syAccordionItemWillCollapse.emit();\n\n if (this.currentAnimation) {\n this.currentAnimation.stop();\n }\n\n if (!instant && !this.disableAnimations) {\n this.currentAnimation = this.getCloseAnimation();\n if (this.currentAnimation) {\n await this.currentAnimation.play();\n }\n }\n\n this.expanded = false;\n this.syAccordionItemDidToggle.emit(this.expanded);\n return true;\n }\n\n private getOpenAnimation() {\n if (typeof this.openAnimation === 'string') {\n if (this.openAnimation === DISABLE_ANIMATION_VALUE) {\n return;\n }\n if (this.contentEl) {\n return accordionItemOpenAnimation(this.contentEl);\n }\n return;\n }\n const animationBuilder = this.openAnimation || accordionItemOpenAnimation;\n if (this.contentEl) {\n return animationBuilder(this.contentEl);\n }\n }\n\n private getCloseAnimation() {\n if (typeof this.closeAnimation === 'string') {\n if (this.closeAnimation === DISABLE_ANIMATION_VALUE) {\n return;\n }\n if (this.contentEl) {\n return accordionItemCloseAnimation(this.contentEl);\n }\n return;\n }\n const animationBuilder = this.closeAnimation || accordionItemCloseAnimation;\n if (this.contentEl) {\n return animationBuilder(this.contentEl);\n }\n }\n\n private handleHeaderClick(e) {\n const isInsideShadowDom = this.el.shadowRoot?.contains(e.target);\n const hasDataToggle = e.target.hasAttribute('data-sy-accordion-toggle');\n if (isInsideShadowDom || hasDataToggle) {\n this.toggle();\n }\n }\n\n private createHandleComponent() {\n if (this.enableDrag && !this.el.querySelector(\"[slot = 'sy-drag-icon]\")) {\n this.dragElement = document.createElement('img');\n this.dragElement.slot = 'drag-icon';\n this.dragElement.src = getAssetPath('./assets/drag-icon.svg');\n this.dragElement.classList.add('sy-accordion-drag-icon');\n this.el.append(this.dragElement);\n }\n }\n\n private removeHandleComponent() {\n if (this.dragElement) {\n this.el.removeChild(this.dragElement);\n this.dragElement = undefined;\n }\n }\n\n componentDidLoad() {\n if (this.enableDrag) {\n this.createHandleComponent();\n }\n }\n\n render() {\n const arrowDirection = this.expanded ? this.expandedIcon : this.collapsedIcon;\n\n return (\n \n {\n this.handleHeaderClick(e);\n }}\n {...(this.disabled ? { disabled: true } : null)}\n >\n {this.enableDrag && !this.disabled && }\n \n
{this.label ? this.label : ''}
\n \n \n
(this.contentEl = el)}>\n
\n \n
\n
\n
\n );\n }\n}\n","@import '../../../styles/variables';\n@import '../../../styles/reboot/mixins';\n@import '../../../styles/typography/mixins';\n@import '../../../styles/typography/variables';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, h, Prop, Element, Method, Event, EventEmitter } from '@stencil/core';\n\n/**\n * @slot - Slot to add content to the alert. It is positioned under the alert title.\n */\n@Component({\n tag: 'sy-alert',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class Alert {\n @Element() el: HTMLSyAlertElement;\n\n /**\n * Title of the alert.\n */\n @Prop() header: string;\n\n /**\n * If true, the alert can be dimissed by clicking in the close button.\n */\n @Prop({ reflect: true }) dismissible = false;\n\n /**\n * Defines the color and the icon of the alert.\n */\n @Prop({ reflect: true }) type: 'error' | 'warning' | 'success' | 'info' = 'error';\n\n /**\n * Emitted after alert is closed.\n */\n @Event() syAlertDidClose: EventEmitter;\n\n /**\n * Method to close the alert. It will remove the alert from DOM.\n */\n @Method()\n async dismiss(): Promise {\n this.syAlertDidClose.emit();\n this.el.remove();\n }\n\n private typesIcons = {\n error: 'remove-circle',\n warning: 'alert-circle',\n success: 'check-circle-1',\n info: 'information-circle',\n };\n\n render() {\n return (\n \n
\n
\n \n
\n
\n
{this.header}
\n \n
\n
\n {this.dismissible ? this.dismiss()}> : ''}\n
\n );\n }\n}\n","@import '../../../styles/reboot/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, h, Prop } from '@stencil/core';\n\n/**\n * @slot - Designed to add custom content in the app bar.\n */\n@Component({\n tag: 'sy-app-bar',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class AppBar {\n /**\n * Set app bar background-color attribute (accept system's colors).\n */\n @Prop({ reflect: true }) color: 'primary' | 'accent' | 'error' | 'warning' | 'success' | 'info';\n\n render() {\n return (\n \n \n \n );\n }\n}\n","@import '../../../styles/variables';\n@import '../../../styles/reboot/mixins';\n@import '../../../styles/typography/variables';\n@import '../../../styles/typography/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, h, Prop, Watch } from '@stencil/core';\n\n@Component({\n tag: 'sy-avatar',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class Avatar {\n /**\n * Sets avatar shape to circle.\n */\n @Prop({ reflect: true }) rounded = false;\n\n /**\n * Sets avatar size to small (32x32).\n */\n @Prop({ reflect: true }) small = false;\n\n /**\n * Sets avatar background-image (URL).\n */\n @Prop() image: string;\n\n /**\n * Sets a text its shown if there is no `image`.\n * Must be a string with same size of `initialsSize`.\n */\n @Prop() initials: string;\n\n /**\n * Sets `initials` string characters number (min: 1, max: 3)\n */\n @Prop({ reflect: true, mutable: true }) initialsSize = 2;\n\n private shownInitials = '';\n\n @Watch('initials')\n initialsWatcher(): void {\n this.shownInitials = this.initials;\n\n if (this.initials && this.initials.length > this.initialsSize) {\n this.shownInitials = this.initials.slice(0, this.initialsSize);\n }\n }\n\n @Watch('initialsSize')\n initialsSizeWatcher(): void {\n if (this.initialsSize < 1) {\n this.initialsSize = 1;\n }\n\n if (this.initialsSize > 3) {\n this.initialsSize = 3;\n }\n\n this.initialsWatcher();\n }\n\n private showInitials(): boolean {\n if (!this.shownInitials || this.image) {\n return false;\n }\n\n return true;\n }\n\n componentWillLoad() {\n this.initialsSizeWatcher();\n }\n\n render() {\n const style = {};\n\n if (this.image) {\n style['background-image'] = `url(${this.image})`;\n }\n\n return {this.showInitials() ? this.shownInitials : ''};\n }\n}\n","@import '../../../styles/z-index';\n@import '../../../styles/reboot/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, h } from '@stencil/core';\n\n/**\n * @slot - Designed to add the content that overlaps the backdrop.\n */\n@Component({\n tag: 'sy-backdrop',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class Backdrop {\n render() {\n return (\n \n \n \n );\n }\n}\n","@import '../../../styles/reboot/mixins';\n@import '../../../styles/typography/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, h, Prop } from '@stencil/core';\n\n/**\n * @slot - Designed to add custom content inside the badge.\n */\n@Component({\n tag: 'sy-badge',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class Badge {\n /**\n * Defines badge color/type, based on system color pallet pattern.\n */\n @Prop({ reflect: true }) color: 'primary' | 'accent' | 'error' | 'warning' | 'success' | 'info' | 'default' =\n 'default';\n\n render() {\n return (\n \n \n \n );\n }\n}\n","@import '../../../styles/reboot/mixins';\n@import '../../../styles/typography/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Component, h, Element, Prop } from '@stencil/core';\n\n/**\n * @slot home - Designed to override the original home icon\n * @slot - Designed to add breadcrumb-item elements\n */\n\n@Component({\n tag: 'sy-breadcrumb',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class Breadcrumb {\n @Element() el: HTMLSyBreadcrumbElement;\n\n /**\n * Url to the home page. If this property is set, a home icon is added automatically.\n */\n @Prop({ reflect: true }) home: string;\n\n /**\n * Target of home link. Must be used along with the `home` property.\n */\n @Prop({ reflect: true }) homeTarget: '_blank' | '_self' | '_parent' | '_top' = '_self';\n\n /**\n * Char used to devide breadcrumb sections\n */\n @Prop({ reflect: true }) separator = '/';\n\n /**\n * Indicate if there will be a separator at the end\n */\n @Prop() endWithSeparator = false;\n\n componentWillLoad() {\n if (!this.el.hasAttribute('role')) {\n this.el.setAttribute('role', 'nav');\n }\n }\n\n render() {\n return (\n
    \n {this.home ? (\n \n \n \n ) : (\n ''\n )}\n \n \n\n {this.endWithSeparator &&
    {this.separator}
    }\n
\n );\n }\n}\n","@import '../../../../styles/reboot/mixins';\n@import '../../../../styles/states/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, h, Prop, Element } from '@stencil/core';\nimport { AnchorInterface, generateAnchorAttributes, openURL } from '../../../utils/elements-interface';\n\n/**\n * @slot - Designed to define the content of the breadcrumb item.\n */\n@Component({\n tag: 'sy-breadcrumb-item',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class BreadcrumbItem implements AnchorInterface {\n @Element() host: HTMLSyBreadcrumbItemElement;\n\n /**\n HTML download attribute.\n */\n @Prop() download: string | undefined;\n\n /**\n * HTML href attribute.\n */\n @Prop() href: string | undefined;\n\n /**\n * HTML ref attribute.\n */\n @Prop() rel: string | undefined;\n\n /**\n * HTML target attribute.\n */\n @Prop() target: '_blank' | '_self' | '_parent' | '_top';\n\n /**\n * If true, this item is referent to the active page.\n */\n @Prop({ reflect: true }) active = false;\n\n componentWillLoad() {\n if (!this.host.hasAttribute('role')) {\n this.host.setAttribute('role', 'listitem');\n }\n }\n\n private handleClick = (event: Event) => {\n if (this.href && !this.active) {\n openURL(this.href, event);\n }\n };\n\n render() {\n return (\n \n {this.active ? (\n \n ) : (\n \n \n \n )}\n \n );\n }\n}\n","@import '../../../styles/reboot/mixins';\n@import '../../../styles/typography/mixins';\n@import '../../../styles/states/mixins';\n@import 'tokens';\n@import 'variables';\n@import 'classes';\n","import { Component, h, Host, Prop, Event, EventEmitter, Element, Watch } from '@stencil/core';\nimport { AnchorInterface, generateAnchorAttributes, openURL } from '../../utils/elements-interface';\n\n/**\n * @slot - If the label is not defined, it is rendered in its place.\n */\n@Component({\n tag: 'sy-button',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Button implements AnchorInterface {\n @Element() el: HTMLSyButtonElement;\n\n /**\n Sets the button to a \"loading\" state, making it display a loading spinner.\n If the button has an icon, the spinner will replace the icon.\n If not, the spinner will replace the button's label.\n */\n @Prop({ reflect: true }) loading = false;\n\n /**\n Sets the button as a fab.\n */\n @Prop({ reflect: true }) fab = false;\n\n /**\n HTML download attribute\n */\n @Prop() download: string | undefined;\n\n /**\n * HTML href attribute\n */\n @Prop() href: string | undefined;\n\n /**\n * HTML rel attribute\n */\n @Prop() rel: string | undefined;\n\n /**\n * HTML target attribute\n */\n @Prop() target: '_blank' | '_self' | '_parent' | '_top' = '_blank';\n\n /**\n * Sets button's type.\n */\n @Prop() buttonType: 'button' | 'reset' | 'submit' | 'check' | 'radio' = 'button';\n\n /**\n * Sets button's content type\n */\n @Prop({ reflect: true }) content: 'text-only' | 'icon-left' | 'icon-only' | 'icon-right' = 'icon-left';\n\n /**\n * Optional button's name\n */\n @Prop() name: string;\n\n /**\n * Optional button's label\n */\n @Prop() label: string;\n\n /**\n * Icon name (use stardard lib)\n */\n @Prop({ reflect: true }) icon: string;\n\n /**\n * Decrease its internal padding.\n */\n @Prop({ reflect: true }) small = false;\n\n /**\n * Sets button's state to disabled\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * Sets button's state to active\n */\n @Prop({ reflect: true, mutable: true }) checked = false;\n\n /**\n * Sets button's type\n */\n @Prop({ reflect: true }) type: 'primary' | 'accent' | 'error' | 'success' | 'default' | 'basic' = 'default';\n\n /**\n * Emitted after the button is checked.\n */\n @Event() syButtonDidCheck: EventEmitter;\n\n /**\n * Emitted after the button is unchecked.\n */\n @Event() syButtonDidUncheck: EventEmitter;\n\n @Watch('buttonType')\n async buttonTypeWatcher(): Promise {\n if (this.buttonType === 'radio') {\n this.addButtonRadioListener();\n } else {\n this.removeButtonRadioListener();\n }\n }\n\n @Watch('checked')\n async checkedWatcher(): Promise {\n if (this.buttonType === 'check' || this.buttonType === 'radio') {\n if (this.checked) this.syButtonDidCheck.emit();\n else this.syButtonDidUncheck.emit();\n }\n }\n\n private buttonRadioEvent = false;\n\n private contentClasses = {\n 'text-only': 'sy-btn-text-only',\n 'icon-left': 'sy-btn-icon-left',\n 'icon-right': 'sy-btn-icon-right',\n 'icon-only': 'sy-btn-icon-only',\n };\n\n private typesClasses = {\n primary: 'sy-btn-primary',\n accent: 'sy-btn-accent',\n error: 'sy-btn-error',\n success: 'sy-btn-success',\n default: '',\n basic: 'sy-btn-basic',\n };\n\n private getButtonAttributes() {\n const anchorAtributes =\n this.href && this.buttonType !== 'check' && this.buttonType !== 'radio' ? generateAnchorAttributes(this) : {};\n\n const smallClass = this.small ? 'sy-btn-sm ' : '';\n const activeClass = this.checked ? 'active ' : '';\n let attributes: any = {\n ...anchorAtributes,\n type: this.type,\n class: `sy-btn ${smallClass}${activeClass}${this.contentClasses[this.content]} ${this.typesClasses[this.type]}`,\n };\n\n attributes = this.disabled ? { ...attributes, disabled: true } : attributes;\n\n return attributes;\n }\n\n private handleClick = (event: Event) => {\n if (this.disabled) {\n event.stopImmediatePropagation();\n } else if (this.buttonType === 'check' || this.buttonType === 'radio') {\n this.checked = !this.checked;\n } else if (this.buttonType === 'button' && this.href) {\n openURL(this.href, event);\n } else {\n const form: HTMLFormElement | null = this.el.closest('form');\n if (form) {\n event.preventDefault();\n if (this.buttonType === 'reset') {\n form.reset();\n } else if (this.buttonType === 'submit') {\n form.requestSubmit();\n }\n }\n }\n };\n\n private addButtonRadioListener() {\n if (this.buttonType === 'radio' && !this.buttonRadioEvent) {\n this.el.getRootNode().addEventListener('syButtonDidCheck', this.handleButtonRadioToggle);\n this.buttonRadioEvent = true;\n }\n }\n\n private removeButtonRadioListener() {\n if (this.buttonRadioEvent) {\n this.el.getRootNode().removeEventListener('syButtonDidCheck', this.handleButtonRadioToggle);\n this.buttonRadioEvent = false;\n }\n }\n\n private handleButtonRadioToggle = (event: Event) => {\n if (this.buttonType === 'radio' && this.name && event.target !== this.el) {\n const button = event.target as HTMLSyButtonElement;\n if (button?.buttonType === 'radio' && button.name === this.name) {\n this.checked = false;\n }\n }\n };\n\n connectedCallback() {\n this.addButtonRadioListener();\n }\n\n disconnectedCallback() {\n this.removeButtonRadioListener();\n }\n\n private renderInnerButton() {\n return (\n
\n {((this.content !== 'icon-right' && (this.loading || this.content === 'text-only')) ||\n (!this.loading && this.icon && (this.content === 'icon-left' || this.content === 'icon-only'))) && (\n
\n {!this.loading && this.icon && (this.content === 'icon-left' || this.content === 'icon-only') && (\n \n )}\n {this.loading && this.renderLoadingSpinner()}\n
\n )}\n {this.content !== 'icon-only' && this.renderLabel()}\n {this.content === 'icon-right' && (\n
\n {!this.loading && this.icon && }\n {this.loading && this.renderLoadingSpinner()}\n
\n )}\n
\n );\n }\n\n private renderLabel() {\n return this.label ? this.label : ;\n }\n\n private renderLoadingSpinner() {\n return (\n \n );\n }\n\n render() {\n return (\n \n {this.href && this.buttonType !== 'check' && this.buttonType !== 'radio' ? (\n
{this.renderInnerButton()}\n ) : (\n \n )}\n \n );\n }\n}\n","@import '../../../styles/reboot/mixins';\n@import '../../../styles/tokens';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, h, Element, Prop, Event, EventEmitter } from '@stencil/core';\n\n/**\n * @slot - Buttons to be rendered as a group.\n */\n@Component({\n tag: 'sy-button-group',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class ButtonGroup {\n @Element() el: HTMLSyButtonGroupElement;\n\n private sizeObserver: MutationObserver;\n\n private resizeObserver: ResizeObserver;\n\n /**\n * If true, indicates component axis x overflow.\n */\n @Prop({ reflect: true, mutable: true }) overflow = false;\n\n /**\n * Emitted after sy-button-group overflow parent element's width.\n */\n @Event() syButtonGroupDidOverflow: EventEmitter;\n\n private handleOverflow() {\n this.resizeObserver = new ResizeObserver((entries) => {\n for (const entry of entries) {\n if (entry?.target?.clientWidth && entry.target.scrollWidth) {\n if (!this.overflow && entry.target.scrollWidth > entry.target.clientWidth) {\n this.overflow = true;\n this.syButtonGroupDidOverflow.emit(this.overflow);\n } else if (this.overflow && entry.target.scrollWidth <= entry.target.clientWidth) {\n this.overflow = false;\n this.syButtonGroupDidOverflow.emit(this.overflow);\n }\n }\n }\n });\n\n this.resizeObserver.observe(this.el);\n\n this.sizeObserver = new MutationObserver((mutations) => {\n mutations.forEach(() => {\n if (!this.overflow && this.el.scrollWidth > this.el.clientWidth) {\n this.overflow = true;\n this.syButtonGroupDidOverflow.emit(this.overflow);\n } else if (this.overflow && this.el.scrollWidth <= this.el.clientWidth) {\n this.overflow = false;\n this.syButtonGroupDidOverflow.emit(this.overflow);\n }\n });\n });\n this.sizeObserver.observe(this.el, { childList: true });\n }\n\n componentWillLoad() {\n this.handleOverflow();\n }\n\n disconnectedCallback() {\n if (this.el.isConnected) return;\n\n this.resizeObserver?.disconnect();\n this.sizeObserver?.disconnect();\n }\n\n render() {\n return (\n \n \n \n );\n }\n}\n","@import '../../../styles/variables';\n@import '../../../styles/reboot/mixins';\n@import '../../../styles/typography/variables';\n@import '../../../styles/typography/mixins';\n@import '../../../styles/states/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Component, h, Host, Prop } from '@stencil/core';\nimport { AnchorInterface, generateAnchorAttributes, openURL } from '../../utils/elements-interface';\n\n/**\n * @slot - Designed to add custom content inside the card.\n */\n\n@Component({\n tag: 'sy-card',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class Card implements AnchorInterface {\n /**\n * Defines whether card has all borders.\n */\n @Prop({ reflect: true }) border: 'bottom' | 'all' | 'none' = 'none';\n\n /**\n * Defines whether card has shadow or not.\n */\n @Prop({ reflect: true }) hideShadow = false;\n\n /**\n HTML download attribute\n */\n @Prop() download: string;\n\n /**\n * HTML href attribute\n */\n @Prop({ reflect: true }) href: string;\n\n /**\n * HTML ref attribute\n */\n @Prop() rel: string;\n\n /**\n * HTML target attribute\n */\n @Prop() target: '_blank' | '_self' | '_parent' | '_top';\n\n private getCardAttributes() {\n const attributes: any = {\n class: 'sy-card',\n };\n return attributes;\n }\n\n private handleClick = (event: Event) => {\n if (this.href) {\n openURL(this.href, event);\n }\n };\n\n render() {\n return (\n \n {this.href ? (\n \n \n \n ) : (\n
\n \n
\n )}\n \n );\n }\n}\n","@import '../../../../styles/reboot/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, h } from '@stencil/core';\n\n/**\n * @slot - Designed to add custom content inside the card content.\n */\n@Component({\n tag: 'sy-card-content',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class CardContent {\n render() {\n return (\n \n \n \n );\n }\n}\n","@import '../../../../styles/reboot/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, h } from '@stencil/core';\n\n/**\n * @slot - Designed to add custom content inside the card footer.\n */\n@Component({\n tag: 'sy-card-footer',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class CardFooter {\n render() {\n return (\n \n \n \n );\n }\n}\n","@import '../../../../styles/reboot/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, h } from '@stencil/core';\n\n/**\n * @slot - Designed to add custom content inside the card header.\n */\n@Component({\n tag: 'sy-card-header',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class CardHeader {\n render() {\n return (\n \n \n \n );\n }\n}\n","@import '../../../../styles/reboot/mixins';\n@import 'classes';\n","import { Component, Host, h, Prop } from '@stencil/core';\n\n/**\n * @slot - Designed to receive cell's content.\n */\n@Component({\n tag: 'sy-cell',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class Cell {\n /**\n * Defines the position of the first row of the cell.\n */\n @Prop({ reflect: true }) rowStart: number;\n\n /**\n * Defines the position of the first column of the cell.\n */\n @Prop({ reflect: true }) colStart: number;\n\n /**\n * Defines the height in rows of the cell.\n */\n @Prop() height: number;\n\n /**\n * Defines the width in columns of the cell.\n */\n @Prop() width: number;\n\n private getCellStyle(): any {\n const style: any = {};\n\n if (this.rowStart) {\n style.gridRowStart = this.rowStart;\n }\n if (this.colStart) {\n style.gridColumnStart = this.colStart;\n }\n if (this.height) {\n style.gridRowEnd = `span ${this.height}`;\n }\n if (this.width) {\n style.gridColumnEnd = `span ${this.width}`;\n }\n\n return style;\n }\n\n render() {\n return (\n \n \n \n );\n }\n}\n","@import '../../../../styles/reboot/mixins';\n@import '../../../../styles/breakpoints/variables';\n@import '../../../../styles/grid/variables';\n@import '../../../../styles/breakpoints';\n@import '../../scss/tokens';\n@import 'classes';\n","import { Component, Host, h, Prop } from '@stencil/core';\n\n/**\n * @slot - Designed to receive col's content.\n */\n@Component({\n tag: 'sy-col',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class Col {\n /**\n * Defines how many of the 12 available columns of the row will be occupied in all screens. Must be a value between 1 and 12, both included. If set to `auto`,\n * it will use the remaining space available.\n */\n @Prop({ reflect: true }) size: number | 'auto';\n\n /**\n * Defines how many of the 12 available columns of the row will be occupied in small screens. Must be a value between 1 and 12, both included. If set to `auto`,\n * it will use the remaining space available.\n */\n @Prop({ reflect: true }) sizeSm: number | 'auto';\n\n /**\n * Defines how many of the 12 available columns of the row will be occupied in medium screens. Must be a value between 1 and 12, both included. If set to `auto`,\n * it will use the remaining space available.\n */\n @Prop({ reflect: true }) sizeMd: number | 'auto';\n\n /**\n * Defines how many of the 12 available columns of the row will be occupied in large screens. Must be a value between 1 and 12, both included. If set to `auto`,\n * it will use the remaining space available.\n */\n @Prop({ reflect: true }) sizeLg: number | 'auto';\n\n /**\n * Defines how many of the 12 available columns of the row will be occupied in extra large screens. Must be a value between 1 and 12, both included. If set to `auto`,\n * it will use the remaining space available.\n */\n @Prop({ reflect: true }) sizeXl: number | 'auto';\n\n /**\n * Defines how many of the 12 available columns of the row will be occupied in extra extra large screens. Must be a value between 1 and 12, both included. If set to `auto`,\n * it will use the remaining space available.\n */\n @Prop({ reflect: true }) sizeXxl: number | 'auto';\n\n /**\n * Defines how many columns the element will shift to the end in all screens. Must be a value between 1 and 12, both included.\n */\n @Prop({ reflect: true }) offset: number;\n\n /**\n * Defines how many columns the element will shift to the end in small screens. Must be a value between 1 and 12, both included.\n */\n @Prop({ reflect: true }) offsetSm: number;\n\n /**\n * Defines how many columns the element will shift to the end in medium screens. Must be a value between 1 and 12, both included.\n */\n @Prop({ reflect: true }) offsetMd: number;\n\n /**\n * Defines how many columns the element will shift to the end in large screens. Must be a value between 1 and 12, both included.\n */\n @Prop({ reflect: true }) offsetLg: number;\n\n /**\n * Defines how many columns the element will shift to the end in extra large screens. Must be a value between 1 and 12, both included.\n */\n @Prop({ reflect: true }) offsetXl: number;\n\n /**\n * Defines how many columns the element will shift to the end in extra extra large screens. Must be a value between 1 and 12, both included.\n */\n @Prop({ reflect: true }) offsetXxl: number;\n\n /**\n * Defines the order of the column in all screens. Must be a value between 1 and 12, both included.\n */\n @Prop({ reflect: true }) order: number;\n\n /**\n * Defines the order of the column in small screens. Must be a value between 1 and 12, both included.\n */\n @Prop({ reflect: true }) orderSm: number;\n\n /**\n * Defines the order of the column in medium screens. Must be a value between 1 and 12, both included.\n */\n @Prop({ reflect: true }) orderMd: number;\n\n /**\n * Defines the order of the column in large screens. Must be a value between 1 and 12, both included.\n */\n @Prop({ reflect: true }) orderLg: number;\n\n /**\n * Defines the order of the column in extra large screens. Must be a value between 1 and 12, both included.\n */\n @Prop({ reflect: true }) orderXl: number;\n\n /**\n * Defines the order of the column in extra extra large screens. Must be a value between 1 and 12, both included.\n */\n @Prop({ reflect: true }) orderXxl: number;\n\n render() {\n return (\n \n \n \n );\n }\n}\n","@import '../../../styles/reboot/mixins';\n@import 'classes';\n","import {\n Component,\n Host,\n h,\n ComponentInterface,\n Prop,\n Method,\n Watch,\n Event,\n EventEmitter,\n Element,\n} from '@stencil/core';\n\n/**\n * @slot - Children elements of collapse.\n */\n\n@Component({\n tag: 'sy-collapse',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class Collapse implements ComponentInterface {\n private eventTrigger: NodeListOf;\n\n @Element() el: HTMLSyCollapseElement;\n\n /**\n * Defines if the collapse component is visible.\n */\n @Prop({ mutable: true, reflect: true }) opened = false;\n\n /**\n * Set the css selector that will be listened to control the collapse component state.\n */\n @Prop() triggerBy!: string;\n\n /**\n * Fired when collapse is opened.\n */\n @Event() syCollapseDidOpen: EventEmitter;\n\n /**\n * Fired when collapse is closed.\n */\n @Event() syCollapseDidClose: EventEmitter;\n\n @Watch('opened')\n openedWatcher(newValue: boolean, oldValue: boolean): void {\n if (oldValue !== newValue) {\n if (newValue) {\n this.syCollapseDidOpen.emit();\n } else {\n this.syCollapseDidClose.emit();\n }\n }\n }\n\n /**\n * Open the collapsed component.\n */\n @Method()\n async open(): Promise {\n this.opened = true;\n }\n\n /**\n * Close the collapsed component.\n */\n @Method()\n async close(): Promise {\n this.opened = false;\n }\n\n /**\n * Toggle the state of collapsed component.\n */\n @Method()\n async toggle(): Promise {\n this.opened = !this.opened;\n }\n\n componentDidLoad() {\n const rootNode = this.el.getRootNode() as Element;\n const trigger = rootNode.querySelectorAll(this.triggerBy);\n\n this.eventTrigger = trigger;\n this.eventTrigger.forEach((el) => {\n el.addEventListener('click', this.toggle.bind(this));\n });\n }\n\n disconnectedCallback() {\n if (this.el.isConnected) return;\n\n this.eventTrigger?.forEach((el) => {\n el.removeEventListener('click', this.toggle.bind(this));\n });\n }\n\n render() {\n return (\n \n \n \n );\n }\n}\n","import { Component, Event, EventEmitter, getElement, h, Method, Prop } from '@stencil/core';\n\nexport declare type SubscribeConsumerEventData = {\n context: string;\n el: any;\n};\n\n/**\n * @slot - Element that will consume the context.\n */\n@Component({\n tag: 'sy-context-consumer',\n shadow: true,\n})\nexport class ContextConsumer {\n private value: any;\n\n /**\n * Context identifier\n */\n @Prop({ reflect: true }) context: string;\n\n /**\n * Unsubscribe function\n */\n @Prop({ mutable: true }) unsubscribe: { (): void } | null = null;\n\n /**\n * Used by a context provide to trigger a value change\n */\n @Method()\n async changeValue(newValue: any): Promise {\n if (this.value !== newValue) {\n this.syContextDidChange.emit(newValue);\n }\n\n this.value = newValue;\n }\n\n /**\n * Emitted after the context consumer is connected to subscribe in a context provider\n */\n @Event({ bubbles: true, composed: true }) syContextConsumerDidSubscribe: EventEmitter;\n\n /**\n * Emitted when the context value changes.\n */\n @Event() syContextDidChange: EventEmitter;\n\n private subscribe() {\n this.syContextConsumerDidSubscribe.emit({\n context: this.context,\n el: getElement(this),\n });\n }\n\n connectedCallback() {\n this.subscribe();\n }\n\n componentWillLoad() {\n this.subscribe();\n }\n\n disconnectedCallback() {\n if (this.unsubscribe) {\n this.unsubscribe();\n this.unsubscribe = null;\n }\n }\n\n render() {\n return ;\n }\n}\n","import { Component, Element, h, Prop, Watch } from '@stencil/core';\nimport { SubscribeConsumerEventData } from '../consumer/consumer';\n\n/**\n * @slot - Elements that can consume the context.\n */\n@Component({\n tag: 'sy-context-provider',\n shadow: true,\n})\nexport class ContextProvider {\n private consumersSet = new Set();\n private consumersListener;\n\n @Element() el: HTMLSyContextProviderElement;\n\n /**\n * Context identifier\n */\n @Prop({ reflect: true }) context: string;\n\n /**\n * Context value\n */\n @Prop() value: any;\n\n @Watch('value')\n valueWatcher(): void {\n this.consumersSet.forEach((el) => {\n el.changeValue(this.value);\n });\n }\n\n connectedCallback() {\n this.consumersListener = (e: CustomEvent) => {\n if (e?.detail?.context === this.context) {\n e.stopPropagation();\n\n if (e.detail.el && !e.detail.el.unsubscribe) {\n this.consumersSet.add(e.detail.el);\n e.detail.el.changeValue(this.value);\n e.detail.el.unsubscribe = () => {\n this.consumersSet.delete(e.detail.el);\n e.detail.el.unsubscribe = null;\n };\n }\n }\n };\n this.el.addEventListener('syContextConsumerDidSubscribe', this.consumersListener);\n }\n\n disconnectedCallback() {\n this.consumersListener && this.el.removeEventListener('syContextConsumerDidSubscribe', this.consumersListener);\n }\n\n render() {\n return ;\n }\n}\n","import { closestElement, getParentElement } from './select-elements.utils';\n\nexport const VIEWPORT_ATTRIBUTE = 'data-sy-viewport';\nexport const FLOATING_ELEMENT_CLASS_NAME = 'sy-floating-element';\n\ntype FloatingElementInfos = {\n originalParentNode: Node;\n originalNextSiblingEl: Element | null;\n beforeClose: () => Promise;\n afterClose: () => void;\n closing?: Promise;\n};\n\nclass FloatingElements {\n private elementsInfos = new Map();\n\n constructor(private viewportService: FloatingElementViewport) {}\n\n /**\n * Repositions the floating element to the closest viewport.\n * @param el Element reference\n */\n async open(el: Element) {\n await this.waitIfClosing(el);\n\n const originalParent = getParentElement(el);\n const originalParentNode = (\n originalParent.fromShadowRoot ? originalParent.el.shadowRoot : originalParent.el\n ) as Element;\n const originalNextSiblingEl = el.nextElementSibling;\n\n const { containerEl, floatingElementEl } = this.viewportService.appendChild(el);\n const { removeListener } = addElementRemovedListener({\n parentNode: originalParentNode,\n nextSiblingEl: originalNextSiblingEl,\n listener: () => this.close(el),\n });\n\n this.elementsInfos.set(el, {\n originalParentNode,\n originalNextSiblingEl,\n beforeClose: async () => {\n await removeListener();\n },\n afterClose: () => {\n containerEl?.remove();\n },\n });\n\n return { containerEl, floatingElement: floatingElementEl };\n }\n\n /**\n * Repositions the floating element, returning it to the original position in the DOM hierarchy\n * @param el Element reference\n */\n async close(el: Element): Promise {\n const floatingElementInfos = this.elementsInfos.get(el);\n\n if (!floatingElementInfos) {\n return console.error('Attempt to close a floating element that has not been opened.');\n }\n\n const closingPromise = new Promise((resolve) => {\n const { originalParentNode, originalNextSiblingEl, beforeClose, afterClose } = floatingElementInfos;\n\n beforeClose()\n .then(() => {\n if (el.isConnected) {\n insertBefore(el, originalParentNode, originalNextSiblingEl);\n }\n })\n .finally(() => {\n afterClose();\n resolve();\n this.elementsInfos.delete(el);\n });\n });\n\n this.elementsInfos.set(el, { ...floatingElementInfos, closing: closingPromise });\n }\n\n private async waitIfClosing(el: Element) {\n const floatingElementInfos = this.elementsInfos.get(el);\n if (!floatingElementInfos?.closing) return;\n await floatingElementInfos.closing;\n }\n}\n\nconst insertBefore = (el: Element, parentNode: Node, nextSiblingEl: Element | null) => {\n try {\n parentNode.insertBefore(el, nextSiblingEl);\n } catch (err) {\n // If the original next sibling element is not child of original parent element\n // because the next sibling element has moved in the DOM\n if (err instanceof DOMException && err.code === DOMException.NOT_FOUND_ERR) {\n parentNode.appendChild(el);\n } else {\n throw err;\n }\n }\n};\n\nconst addElementRemovedListener = ({ parentNode, nextSiblingEl, listener }) => {\n const floatedEl = document.createElement('sy-floated');\n floatedEl.style.display = 'none';\n floatedEl.addListeners({ afterRemoved: listener });\n insertBefore(floatedEl, parentNode, nextSiblingEl);\n\n return {\n removeListener: async () => {\n await floatedEl.removeListeners();\n floatedEl.remove();\n },\n };\n};\n\nclass EncapsulatedStyles {\n getEncapsulatedStyles(el: Element) {\n const rootNodeEl = el.getRootNode();\n\n const isEncapsulated = rootNodeEl.nodeType === Node.DOCUMENT_FRAGMENT_NODE && rootNodeEl instanceof ShadowRoot;\n if (!isEncapsulated) {\n return null;\n }\n\n const classList = this.getShadowRootClassList(rootNodeEl);\n\n const styleSheets = rootNodeEl.styleSheets;\n const adoptedStyleSheets = { ...((rootNodeEl as any).adoptedStyleSheets || {}) };\n\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n if (!styleSheets) {\n console.error('Floating elements: Stylesheets not found.');\n return { styleEl: null, classList };\n }\n\n const styleEl = document.createElement('style');\n let cssText = `${this.getCssText(styleSheets)}\\n${this.getCssText(adoptedStyleSheets)}`;\n\n // Necessary to do not apply the host styles defined in the copied style sheets\n cssText = `:host { all: unset !important; } ${cssText}`;\n styleEl.innerText = cssText;\n\n return { styleEl, classList };\n }\n\n private getShadowRootClassList(shadowRoot: ShadowRoot) {\n const classList = [] as string[];\n shadowRoot.host.classList.forEach((className) => {\n if (className === 'hydrated') return;\n\n classList.push(className);\n });\n return classList;\n }\n\n private getCssText(styleSheets: StyleSheetList) {\n return Object.values(styleSheets).map(this.mapStyleSheetToCssText.bind(this)).join('');\n }\n\n private mapStyleSheetToCssText(styleSheet: CSSStyleSheet) {\n return Object.values(styleSheet.cssRules)\n .map((cssRule) => cssRule.cssText)\n .join('');\n }\n}\n\nclass FloatingElementViewport {\n constructor(private encapsulatedStyles: EncapsulatedStyles) {}\n\n appendChild(childEl: Element) {\n const viewportElement = this.findViewport(childEl) || document.body;\n const encapsulatedStyles = this.encapsulatedStyles.getEncapsulatedStyles(childEl);\n\n let containerEl: HTMLElement | null = null;\n let floatingElementEl: HTMLElement | null = null;\n if (encapsulatedStyles) {\n // Encapsulates styles in a shadow-dom\n floatingElementEl = document.createElement('sy-floating-element');\n containerEl = floatingElementEl;\n\n viewportElement.appendChild(floatingElementEl);\n\n encapsulatedStyles.styleEl && floatingElementEl.shadowRoot?.appendChild(encapsulatedStyles.styleEl);\n floatingElementEl.classList.add(...[...encapsulatedStyles.classList, FLOATING_ELEMENT_CLASS_NAME]);\n\n floatingElementEl.shadowRoot?.appendChild(childEl);\n } else {\n viewportElement.appendChild(childEl);\n }\n return { viewportElement, containerEl, floatingElementEl };\n }\n\n private findViewport(el: Element) {\n const { el: parentElement } = getParentElement(el);\n return closestElement(`[${VIEWPORT_ATTRIBUTE}]`, parentElement);\n }\n}\n\nexport const floatingElements = new FloatingElements(new FloatingElementViewport(new EncapsulatedStyles()));\n","import { Animation } from '@ionic/core';\nimport { createAnimation, EASING_EMPHASIZED_ACCELERATE, fadeOut, DURATION_SHORT_4 } from '../../../utils/animations';\n\nexport function dialogCloseAnimation(dialogEl: HTMLElement, backdropEl: HTMLSyBackdropElement): Animation {\n const dialogOpenAnim = createAnimation();\n const backDropAnim = fadeOut().duration(DURATION_SHORT_4).easing(EASING_EMPHASIZED_ACCELERATE).addElement(backdropEl);\n const dialogDivFade = fadeOut().duration(DURATION_SHORT_4).easing(EASING_EMPHASIZED_ACCELERATE).addElement(dialogEl);\n\n dialogOpenAnim.addAnimation(backDropAnim);\n dialogOpenAnim.addAnimation(dialogDivFade);\n return dialogOpenAnim;\n}\n","import { Animation } from '@ionic/core';\nimport {\n createAnimation,\n fadeIn,\n scale,\n DURATION_MEDIUM_4,\n EASING_EMPHASIZED_DECCELERATE,\n} from '../../../utils/animations';\n\nexport function dialogOpenAnimation(dialogEl: HTMLElement, backdropEl: HTMLSyBackdropElement): Animation {\n const dialogOpenAnim = createAnimation();\n const backDropAnim = fadeIn()\n .duration(DURATION_MEDIUM_4)\n .easing(EASING_EMPHASIZED_DECCELERATE)\n .addElement(backdropEl);\n const dialogDivFade = fadeIn().duration(DURATION_MEDIUM_4).easing(EASING_EMPHASIZED_DECCELERATE).addElement(dialogEl);\n const dialogDivScale = (scale({ from: '1.15', to: '1' }) as Animation)\n .beforeStyles({ 'transform-origin': 'center' })\n .easing(EASING_EMPHASIZED_DECCELERATE)\n .duration(DURATION_MEDIUM_4)\n .addElement(dialogEl);\n\n dialogOpenAnim.addAnimation(backDropAnim);\n dialogOpenAnim.addAnimation(dialogDivFade);\n dialogOpenAnim.addAnimation(dialogDivScale);\n return dialogOpenAnim;\n}\n","@import '../../../styles/variables';\n@import '../../../styles/reboot/mixins';\n@import '../../../styles/typography/variables';\n@import '../../../styles/breakpoints';\n@import '../../../styles/z-index';\n@import 'variables';\n@import 'tokens';\n@import 'classes';\n","import { Animation } from '@ionic/core';\nimport { Component, Host, h, Prop, Event, EventEmitter, Method, Listen, Watch, Element } from '@stencil/core';\nimport { floatingElements, VIEWPORT_ATTRIBUTE } from '../../utils/floating-elements.utils';\nimport { dialogCloseAnimation } from './animations/close';\nimport { dialogOpenAnimation } from './animations/open';\nimport { DISABLE_ANIMATION_VALUE } from '../../utils/animations';\n\nconst dialogsOpened = new Array();\n\n/**\n * @slot - Designed to add custom content inside the dialog.\n */\n@Component({\n tag: 'sy-dialog',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class Dialog {\n private backdropEl: HTMLSyBackdropElement | undefined;\n private dialogDivEl: HTMLElement | undefined;\n private currentAnimation: Animation | undefined;\n\n /**\n * Internal boolean to indicate whether dialog is visible.\n * Used to identify when the property `visible` was modified externally.\n */\n private isVisibleInternal = false;\n\n @Element() el: HTMLSyDialogElement;\n\n /**\n * Callback function called after the dialog is closed.\n */\n @Prop() afterClosed?: (action?: any) => void | Promise;\n\n /**\n * Callback function called after the dialog is opened.\n */\n @Prop() afterOpened?: () => void | Promise;\n\n /**\n * Callback function called before the dialog is closed.\n * If returns 'false', the dialog will not be closed.\n */\n @Prop() beforeClosed?: (action?: any) => void | boolean | Promise;\n\n /**\n * Callback function called before the dialog is opened.\n * If returns 'false', the dialog will not be opened.\n */\n @Prop() beforeOpened?: () => void | boolean | Promise;\n\n /**\n * Defines the dialog size.\n */\n @Prop({ reflect: true }) dialogSize: 'small' | 'medium' | 'large' | 'extra-large' | 'full' = 'medium';\n\n /**\n * Whether true, the backdrop will not be displayed.\n */\n @Prop({ reflect: true }) hideBackdrop = false;\n\n /**\n * Dialog position style.\n * Whether fixed, the dialog will be positioned in the center of the viewport and the backdrop will fill the viewport.\n * Whether absolute, the dialog will be positioned relative to the nearest positioned ancestor and the backdrop will fill the space of the nearest positioned ancestor.\n */\n @Prop({ reflect: true }) position: 'fixed' | 'absolute' = 'fixed';\n\n /**\n * Whether true, the dropdown will not close with an outside click.\n */\n @Prop({ reflect: true }) ignoreOutsideClick = false;\n\n /**\n * Defines if the dialog is visible\n */\n @Prop({ reflect: true, mutable: true }) visible = false;\n\n /**\n * Optional custom animation to replace the default and be played when the component starts opening.\n */\n @Prop() openAnimation?: ((sidebarElement: HTMLElement, backdropElement: HTMLElement) => Animation) | undefined;\n\n /**\n * Optional custom animation to replace the default and be played when the component starts closing.\n */\n @Prop() closeAnimation?: ((sidebarElement: HTMLElement, backdropElement: HTMLElement) => Animation) | undefined;\n\n @Watch('visible')\n visibleWatcher(): void {\n if (this.isVisibleInternal === this.visible) return;\n\n if (this.visible) {\n this.open();\n } else {\n this.close();\n }\n }\n\n /**\n * Disables all animations\n */\n @Prop() disableAnimations = false;\n\n /**\n * Emitted after dialog opening.\n */\n @Event() syDialogDidOpen: EventEmitter;\n\n /**\n * Emitted after dialog closing.\n * When the dialog is closed by the close method with a custom closing action identifier, the event emits the custom close action identifier.\n */\n @Event() syDialogDidClose: EventEmitter;\n\n /**\n * Emitted after dialog submit.\n */\n @Event() syDialogDidSubmit: EventEmitter;\n\n /**\n * Emitted after dialog cancel.\n */\n @Event() syDialogDidCancel: EventEmitter;\n\n /**\n * Emitted when a dialog starts to close.\n */\n @Event() syDialogWillClose: EventEmitter;\n\n /**\n * Emitted when a dialog starts to open.\n */\n @Event() syDialogWillOpen: EventEmitter;\n\n componentDidLoad() {\n this.visibleWatcher();\n }\n\n /**\n * Method responsible for closing the dialog.\n */\n @Method()\n async close(action?: any, instant = false): Promise {\n if (this.isVisibleInternal) {\n const beforeClosedResult = this.beforeClosed && (await this.beforeClosed(action));\n if (beforeClosedResult === false) {\n return;\n }\n\n if (this.currentAnimation) {\n this.currentAnimation.stop();\n }\n\n this.syDialogWillClose.emit();\n\n if (!instant && !this.disableAnimations) {\n this.currentAnimation = this.getCloseAnimation();\n if (this.currentAnimation) {\n await this.currentAnimation.play();\n }\n }\n\n this.isVisibleInternal = false;\n this.visible = false;\n this.onClosed(action);\n }\n }\n\n /**\n * Method responsible for opening the dialog.\n */\n @Method()\n async open(instant = false): Promise {\n if (!this.isVisibleInternal) {\n const beforeOpenedResult = this.beforeOpened && (await this.beforeOpened());\n if (beforeOpenedResult === false) {\n return;\n }\n\n this.isVisibleInternal = true;\n this.visible = true;\n\n this.syDialogWillOpen.emit();\n await floatingElements.open(this.el);\n\n if (this.currentAnimation) {\n this.currentAnimation.stop();\n }\n\n if (!instant && !this.disableAnimations) {\n this.currentAnimation = this.getOpenAnimation();\n if (this.currentAnimation) {\n await this.currentAnimation.play();\n }\n }\n\n this.onOpened();\n }\n }\n\n /**\n * Get dialog internal elements reference.\n */\n @Method()\n async getReferences(): Promise<{ [name: string]: HTMLElement | undefined }> {\n return {\n backdropElement: this.backdropEl,\n };\n }\n\n @Listen('syDialogHeaderDidCloseClick')\n onSyDialogHeaderDidCloseClick(ev: Event): void {\n ev?.stopImmediatePropagation();\n this.close('cancel');\n }\n\n @Listen('syDialogFooterDidCancelClick')\n onSyDialogFooterDidCancelClick(ev: Event): void {\n ev?.stopImmediatePropagation();\n this.close('cancel');\n }\n\n @Listen('syDialogFooterDidSubmitClick')\n onSyDialogFooterDidSubmitClick(ev: Event): void {\n ev?.stopImmediatePropagation();\n this.close('submit');\n }\n\n @Listen('keydown', { target: 'document' })\n onKeyDown(ev: KeyboardEvent): void {\n if (ev.key === 'Escape') {\n const lastOpened = dialogsOpened.at(dialogsOpened.length - 1);\n if (lastOpened === this.el) {\n ev?.stopImmediatePropagation();\n this.close('cancel');\n }\n }\n }\n\n private async onOpened() {\n this.syDialogDidOpen.emit();\n\n if (this.afterOpened) {\n await this.afterOpened();\n }\n\n dialogsOpened.push(this.el);\n }\n\n private getOpenAnimation() {\n if (typeof this.openAnimation === 'string') {\n if (this.dialogDivEl && this.backdropEl) {\n return this.openAnimation === DISABLE_ANIMATION_VALUE\n ? undefined\n : dialogOpenAnimation(this.dialogDivEl, this.backdropEl);\n }\n return undefined;\n }\n const animationBuilder = this.openAnimation || dialogOpenAnimation;\n if (this.dialogDivEl && this.backdropEl) {\n return animationBuilder(this.dialogDivEl, this.backdropEl);\n }\n }\n\n private getCloseAnimation() {\n if (typeof this.closeAnimation === 'string') {\n if (this.dialogDivEl && this.backdropEl) {\n return this.closeAnimation === DISABLE_ANIMATION_VALUE\n ? undefined\n : dialogCloseAnimation(this.dialogDivEl, this.backdropEl);\n }\n return undefined;\n }\n const animationBuilder = this.closeAnimation || dialogCloseAnimation;\n if (this.dialogDivEl && this.backdropEl) {\n return animationBuilder(this.dialogDivEl, this.backdropEl);\n }\n }\n\n private async onClosed(action?: any) {\n if (action === 'cancel') this.syDialogDidCancel.emit();\n if (action === 'submit') this.syDialogDidSubmit.emit();\n\n if (this.afterClosed) {\n await this.afterClosed(action);\n }\n\n await floatingElements.close(this.el);\n this.syDialogDidClose.emit(action);\n\n const thisDialogIndex = dialogsOpened.findIndex((el) => el === this.el);\n dialogsOpened.splice(thisDialogIndex, 1);\n }\n\n private handleOutsideClick(event: Event, outsideEl: HTMLElement | undefined) {\n if (!this.ignoreOutsideClick && event.target === outsideEl) {\n event?.stopImmediatePropagation();\n this.close('cancel');\n }\n }\n\n render() {\n return (\n \n (this.backdropEl = el)} onClick={(e) => this.handleOutsideClick(e, this.backdropEl)}>\n \n
(this.dialogDivEl = el)}>\n \n
\n
\n
\n
\n );\n }\n}\n","@import '../../../../styles/reboot/mixins';\n@import '../../../../styles/typography/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, h } from '@stencil/core';\n\n/**\n * @slot - Slot for adding dialog content.\n */\n\n@Component({\n tag: 'sy-dialog-content',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class DialogContent {\n render() {\n return (\n \n \n \n );\n }\n}\n","@import '../../../../styles/reboot/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, h, Event, EventEmitter, Prop } from '@stencil/core';\nimport { Components as SyComponents } from '../../../components';\n\n/**\n * @slot - Slot for adding dialog footer.\n */\n@Component({\n tag: 'sy-dialog-footer',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class DialogFooter {\n /**\n * Defines the label of the dialog-footer submit button\n */\n @Prop({ reflect: true }) submitLabel = 'Save';\n\n /**\n * Defines the label of the dialog-footer cancel button\n */\n @Prop({ reflect: true }) cancelLabel = 'Cancel';\n\n /**\n * Sets the position of the footer buttons.\n */\n @Prop({ reflect: true }) buttonsPosition: 'start' | 'end' = 'start';\n\n /**\n * Event to indicate the click on the dialog-footer submit button.\n */\n @Event({ cancelable: false }) syDialogFooterDidSubmitClick: EventEmitter;\n\n /**\n * Event to indicate the click on the dialog-footer cancel button.\n */\n @Event({ cancelable: false }) syDialogFooterDidCancelClick: EventEmitter;\n\n private getButtonAttributes(btnType: string): Partial {\n const attributes: Partial = {\n label: btnType === 'save' ? this.submitLabel : this.cancelLabel,\n content: 'text-only',\n small: false,\n disabled: false,\n type: btnType === 'save' ? 'accent' : 'basic',\n };\n\n return attributes;\n }\n\n render() {\n return (\n \n \n this.syDialogFooterDidSubmitClick.emit()}\n >\n this.syDialogFooterDidCancelClick.emit()}\n >\n \n \n );\n }\n}\n","@import '../../../../styles/reboot/mixins';\n@import '../../../../styles/typography/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\n\n/**\n * @slot - Slot for adding dialog title content. Only works if property dialogTitle is undefined.\n */\n@Component({\n tag: 'sy-dialog-header',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class DialogHeader {\n /**\n * Title to be displayed in the dialog.\n */\n @Prop() dialogTitle: string;\n\n /**\n * Defines if the dialog close button will be displayed.\n */\n @Prop({ reflect: true }) hideCloseButton = false;\n\n /**\n * Event to indicate the click on the dialog-header close button.\n */\n @Event({ cancelable: false }) syDialogHeaderDidCloseClick: EventEmitter;\n\n render() {\n return (\n \n
{this.dialogTitle ? this.dialogTitle : }
\n {!this.hideCloseButton && (\n this.syDialogHeaderDidCloseClick.emit()}>\n )}\n
\n );\n }\n}\n","@import '../../../styles/reboot/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'sy-dismiss',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class Dismiss {\n /**\n * Sets dismiss button state to disabled.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * Sets dismiss size to large.\n */\n @Prop({ reflect: true }) large = false;\n\n render() {\n return (\n \n \n \n );\n }\n}\n","@import '../../../styles/reboot/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'sy-divider',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class Divider {\n /**\n * Orientation options.\n */\n @Prop({ reflect: true }) type: 'default' | 'inset' | 'vertical' = 'default';\n\n render() {\n return ;\n }\n}\n","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","import { isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nexport default function getBoundingClientRect(element, includeScale) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n var rect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (isHTMLElement(element) && includeScale) {\n var offsetHeight = element.offsetHeight;\n var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale\n // Fallback to 1 in case both values are `0`\n\n if (offsetWidth > 0) {\n scaleX = round(rect.width) / offsetWidth || 1;\n }\n\n if (offsetHeight > 0) {\n scaleY = round(rect.height) / offsetHeight || 1;\n }\n }\n\n return {\n width: rect.width / scaleX,\n height: rect.height / scaleY,\n top: rect.top / scaleY,\n right: rect.right / scaleX,\n bottom: rect.bottom / scaleY,\n left: rect.left / scaleX,\n x: rect.left / scaleX,\n y: rect.top / scaleY\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isHTMLElement(arrowElement)) {\n console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n\n var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets,\n _ref3$x = _ref3.x,\n x = _ref3$x === void 0 ? 0 : _ref3$x,\n _ref3$y = _ref3.y,\n y = _ref3$y === void 0 ? 0 : _ref3$y;\n\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref4) {\n var state = _ref4.state,\n options = _ref4.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n if (process.env.NODE_ENV !== \"production\") {\n var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';\n\n if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {\n return transitionProperty.indexOf(property) >= 0;\n })) {\n console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".', '\\n\\n', 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\\n\\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));\n }\n }\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nexport default function getViewportRect(element) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper\n // can be obscured underneath it.\n // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even\n // if it isn't open, so if this isn't available, the popper will be detected\n // to overflow the bottom of the screen too early.\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)\n // In Chrome, it returns a value very close to 0 (+/-) but contains rounding\n // errors due to floating point numbers, so we need to check precision.\n // Safari returns a number <= 0, usually < -1 when pinch-zoomed\n // Feature detection fails in mobile emulation mode in Chrome.\n // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <\n // 0.001\n // Fallback here: \"Not Safari\" userAgent\n\n if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element) {\n var rect = getBoundingClientRect(element);\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body' && (canEscapeClipping ? getComputedStyle(clippingParent).position !== 'static' : true);\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, \"auto\" cannot be used to allow \"bottom-start\".', 'Use \"auto-start\" instead.'].join(' '));\n }\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n // if one of the modifiers is invalid for any reason\n\n if (process.env.NODE_ENV !== \"production\") {\n var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {\n var name = _ref.name;\n return name;\n });\n validateModifiers(modifiers);\n\n if (getBasePlacement(state.options.placement) === auto) {\n var flipModifier = state.orderedModifiers.find(function (_ref2) {\n var name = _ref2.name;\n return name === 'flip';\n });\n\n if (!flipModifier) {\n console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n }\n }\n\n var _getComputedStyle = getComputedStyle(popper),\n marginTop = _getComputedStyle.marginTop,\n marginRight = _getComputedStyle.marginRight,\n marginBottom = _getComputedStyle.marginBottom,\n marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n // cause bugs with positioning, so we'll warn the consumer\n\n\n if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n return parseFloat(margin);\n })) {\n console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n }\n }\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n var __debug_loops__ = 0;\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (process.env.NODE_ENV !== \"production\") {\n __debug_loops__ += 1;\n\n if (__debug_loops__ > 100) {\n console.error(INFINITE_LOOP_ERROR);\n break;\n }\n }\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import type { Animation } from '@ionic/core';\nimport { EASING_EMPHASIZED_DECCELERATE, fadeIn } from '../../../utils/animations';\n\nexport function dropdownOpenAnimation(element: HTMLElement): Animation {\n return fadeIn().duration(250).addElement(element).easing(EASING_EMPHASIZED_DECCELERATE);\n}\n","import { Animation } from '@ionic/core';\nimport { dropdownOpenAnimation } from './open';\n\nexport function dropdownCloseAnimation(element: HTMLElement): Animation {\n return dropdownOpenAnimation(element).direction('reverse');\n}\n","// Element or selector type\nexport type ElementOrSelector = Element | string;\n\n/**\n *\n * @param element Element or selector to get\n * @param hostReference Reference to the host element\n * @param returnsNull Either returns null or the parent element\n * @returns\n */\nexport function getElementReference(\n hostReference: Element,\n element?: ElementOrSelector,\n returnsNull = false,\n): Element | null {\n if (!element) {\n if (returnsNull) {\n return null;\n }\n return hostReference.parentElement;\n }\n\n const rootNode = hostReference.getRootNode() as Element;\n if (typeof element === 'string') {\n return rootNode.querySelector(element) || (returnsNull ? null : hostReference.parentElement);\n }\n return element;\n}\n","@import '../../../styles/variables';\n@import '../../../styles/reboot/mixins';\n@import '../../../styles/z-index';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, h, Prop, Event, Method, EventEmitter, Element, Watch } from '@stencil/core';\nimport { beforeWrite, createPopper, Options } from '@popperjs/core';\nimport { floatingElements } from '../../utils/floating-elements.utils';\nimport { Animation } from '@ionic/core';\nimport { dropdownOpenAnimation } from './animations/open';\nimport { dropdownCloseAnimation } from './animations/close';\nimport { DISABLE_ANIMATION_VALUE } from '../../utils/animations';\nimport { ElementOrSelector, getElementReference } from '../../utils/types/common-props.types';\n\nconst ESCAPE_KEY = 'Escape';\n\nexport declare type Placement = 'top-start' | 'top-end' | 'bottom-end' | 'bottom-start' | 'right' | 'left' | 'auto';\nconst PLACEMENTS = {\n 'top-start': 'top-start',\n 'top-end': 'top-end',\n 'bottom-end': 'bottom-end',\n 'bottom-start': 'bottom-start',\n right: 'right-start',\n left: 'left-start',\n auto: 'auto',\n};\n\ninterface EventListener {\n element: Element | Document | Window;\n event: string;\n handler: any;\n}\n\n/**\n * @slot - Dropdown contents.\n */\n@Component({\n tag: 'sy-dropdown',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class Dropdown {\n private popper: any;\n private currentAnimation: Animation | undefined;\n\n private toggleByElement: Element | null;\n private containerElement: Element | null;\n\n private openedEventListeners: EventListener[] = [];\n private eventListeners: EventListener[] = [];\n\n private resizeObserver: ResizeObserver;\n private latestContainerHeight: number;\n\n /**\n * Internal boolean to indicate whether dropdown is opened.\n * Used to identify when the property `opened` was modified externally.\n */\n private isOpenedInternal: boolean;\n\n private opening: Promise | undefined;\n private closing: Promise | undefined;\n\n @Element() el: HTMLSyDropdownElement;\n\n /**\n * Element that toggle dropdown.\n */\n @Prop() toggleBy: ElementOrSelector | undefined;\n\n /**\n * Element that dropdown will be connected to.\n * If null the dropdown will be connected to the toggleBy element.\n */\n @Prop() container: ElementOrSelector | undefined;\n\n /**\n * Describes the preferred placement of the dropdown content.\n * The \"auto\" placements will choose the side with most space.\n * The placement may change to make de dropdown fit better.\n */\n @Prop({ reflect: true }) placement: Placement = 'bottom-start';\n\n /**\n * Positioning strategy.\n * Use fixed when it is inside a fixed container.\n */\n @Prop({ reflect: true }) display: 'absolute' | 'fixed' = 'absolute';\n\n /**\n * It indicates if the dropdown is open.\n *\n */\n @Prop({ mutable: true, reflect: true }) opened = false;\n\n /**\n * If true, the dropdown will not close by pressing the ESC key.\n */\n @Prop({ reflect: true }) ignoreEscape = false;\n\n /**\n * If true, the dropdown will not close with an outside click.\n */\n @Prop({ reflect: true }) ignoreOutsideClick = false;\n\n /**\n * If true, the dropdown will be the same width as the container element.\n */\n @Prop() sameContainerWidth = false;\n\n /**\n * Displaces the dropdown away from, or toward, the reference element in the direction of its placement.\n * A positive number displaces it further away, while a negative number lets it overlap the reference.\n */\n @Prop({ reflect: true }) offsetDistance = 2;\n\n /**\n * Overlay advanced configs. \n */\n @Prop() popperConfig?: { [k: string]: any };\n\n /**\n * Optional custom animation to replace the default and be played when the component starts opening.\n * If 'none', the dropdown won't have open animation.\n */\n @Prop() openAnimation?: ((element: HTMLElement) => Animation) | string;\n\n /**\n * Optional custom animation to replace the default and be played when the component starts closing.\n * If 'none', the dropdown won't have close animation.\n */\n @Prop() closeAnimation?: ((element: HTMLElement) => Animation) | string;\n\n /**\n * Disables all animations\n */\n @Prop() disableAnimations = false;\n\n /**\n * Fired when dropdown is opened.\n */\n @Event() syDropdownDidOpen: EventEmitter;\n\n /**\n * Fired when dropdown is closed.\n */\n @Event() syDropdownDidClose: EventEmitter;\n\n /**\n * Emitted when a dropdown starts to close.\n */\n @Event() syDropdownWillClose: EventEmitter;\n\n /**\n * Emitted when a dropdown starts to open.\n */\n @Event() syDropdownWillOpen: EventEmitter;\n\n async componentDidLoad() {\n await this.selectElementsWatcher();\n }\n\n componentDidRender() {\n if (this.opened) {\n this.addEscapeHandler();\n this.addOutsideClickHandler();\n if (this.popper) {\n this.popper.update();\n }\n }\n }\n\n disconnectedCallback() {\n if (this.el.isConnected) return;\n\n this.removeListeners(this.openedEventListeners);\n this.removeListeners(this.eventListeners);\n this.resizeObserver?.disconnect();\n }\n\n @Watch('toggleBy')\n @Watch('container')\n async selectElementsWatcher(): Promise {\n this.toggleByElement = getElementReference(this.el, this.toggleBy, true);\n this.containerElement = getElementReference(this.el, this.container);\n\n this.eventListeners?.length && this.removeListeners(this.eventListeners);\n await this.addToggleByHandler();\n this.handleContainerResize();\n }\n\n @Watch('opened')\n async openedWatcher(): Promise {\n if (this.opened === this.isOpenedInternal) {\n return;\n }\n\n if (this.opened) {\n this.opening = this.open();\n return this.opening;\n }\n this.closing = this.close();\n return this.closing;\n }\n\n /**\n * Open dropdown\n * If 'instant' is true, the dropdown won't have open animation.\n */\n @Method()\n async open(instant = false): Promise {\n if (this.closing !== undefined) {\n await this.closing;\n }\n if (this.isOpenedInternal) {\n this.opening = undefined;\n return;\n }\n this.opening = this.openDropdown(instant);\n return this.opening;\n }\n\n private async openDropdown(instant = false): Promise {\n const popperConfig = this.getPopperConfig();\n this.syDropdownWillOpen.emit();\n await floatingElements.open(this.el);\n this.popper = createPopper(this.containerElement as HTMLElement, this.el, popperConfig);\n\n this.isOpenedInternal = true;\n this.opened = true;\n\n if (this.currentAnimation) {\n this.currentAnimation.stop();\n }\n\n if (!instant && !this.disableAnimations) {\n this.currentAnimation = this.getOpenAnimation();\n if (this.currentAnimation) {\n await this.currentAnimation.play();\n }\n }\n\n this.syDropdownDidOpen.emit();\n }\n\n /**\n * Close dropdown\n * If 'instant' is true, the dropdown won't have close animation.\n */\n @Method()\n async close(instant = false): Promise {\n if (this.opening !== undefined) {\n await this.opening;\n }\n if (!this.isOpenedInternal) {\n this.closing = undefined;\n return;\n }\n this.closing = this.closeDropdown(instant);\n return this.closing;\n }\n\n private async closeDropdown(instant = false): Promise {\n if (this.currentAnimation) {\n this.currentAnimation.stop();\n }\n\n this.syDropdownWillClose.emit();\n\n if (!instant && !this.disableAnimations) {\n this.currentAnimation = this.getCloseAnimation();\n if (this.currentAnimation) {\n await this.currentAnimation.play();\n }\n }\n\n if (this.popper) {\n this.popper.destroy();\n }\n\n this.isOpenedInternal = false;\n this.opened = false;\n\n this.removeListeners(this.openedEventListeners);\n\n floatingElements.close(this.el);\n this.syDropdownDidClose.emit();\n }\n\n /**\n * Toggle dropdown\n */\n @Method()\n async toggle(event?: any, instant = false): Promise {\n const isInsideClick = Boolean(\n (event?.composedPath() || []).find((p) => {\n if (p instanceof Node) {\n return this.el.contains(p);\n }\n }),\n );\n\n if (this.opening !== undefined) {\n await this.opening;\n }\n\n if (this.closing !== undefined) {\n await this.closing;\n }\n\n if (!isInsideClick) {\n if (this.opened) {\n await this.close(instant);\n } else {\n await this.open(instant);\n }\n }\n }\n\n private getOpenAnimation() {\n if (typeof this.openAnimation === 'string') {\n return this.openAnimation === DISABLE_ANIMATION_VALUE ? undefined : dropdownOpenAnimation(this.el);\n }\n const animationBuilder = this.openAnimation || dropdownOpenAnimation;\n return animationBuilder(this.el);\n }\n\n private getCloseAnimation() {\n if (typeof this.closeAnimation === 'string') {\n return this.closeAnimation === DISABLE_ANIMATION_VALUE ? undefined : dropdownCloseAnimation(this.el);\n }\n const animationBuilder = this.closeAnimation || dropdownCloseAnimation;\n return animationBuilder(this.el);\n }\n\n private handleContainerResize(): void {\n this.resizeObserver = new ResizeObserver((entries) => {\n for (const entry of entries) {\n const currentHeight = entry.target.clientHeight;\n if (!this.latestContainerHeight) this.latestContainerHeight = currentHeight;\n else if (this.latestContainerHeight !== currentHeight && this.popper) {\n this.popper.update();\n this.latestContainerHeight = currentHeight;\n }\n }\n });\n\n if (this.containerElement) {\n this.resizeObserver.observe(this.containerElement);\n }\n }\n\n private async addToggleByHandler() {\n if (this.toggleByElement) {\n const handler = this.toggle.bind(this);\n this.eventListeners.push({ element: this.toggleByElement, event: 'click', handler });\n this.toggleByElement.addEventListener('click', handler);\n }\n }\n\n private escapeHandler(event) {\n if (this.ignoreEscape) return;\n if (event.key === ESCAPE_KEY) {\n this.close();\n const element = this.toggleByElement;\n (element as HTMLElement)?.focus();\n }\n }\n\n private addEscapeHandler() {\n if (this.ignoreEscape) return;\n\n const event = 'keyup';\n const handler = this.escapeHandler.bind(this);\n\n document.addEventListener(event, handler);\n this.openedEventListeners.push({ element: document, event, handler });\n }\n\n private outsideClickHandler(event) {\n const isInsideClick = Boolean(\n (event?.composedPath() || []).find((p) => {\n if (p instanceof Node) {\n return this.el.contains(p);\n }\n }),\n );\n\n const checkToggleButtonClick =\n this.toggleByElement &&\n (event?.composedPath() || []).some(\n (p: Node) => p.nodeType === Node.ELEMENT_NODE && p.isEqualNode(this.toggleByElement),\n );\n\n if (!isInsideClick && this.opened && !checkToggleButtonClick) {\n this.close();\n }\n }\n\n private addOutsideClickHandler() {\n if (this.ignoreOutsideClick) return;\n\n const event = 'click';\n const handler = this.outsideClickHandler.bind(this);\n\n document.addEventListener(event, handler, { capture: true });\n this.openedEventListeners.push({ element: document, event, handler });\n }\n\n private removeListeners(listeners: EventListener[]) {\n listeners.forEach((listener) => {\n listener.element.removeEventListener(listener.event, listener.handler);\n });\n listeners = [];\n }\n\n private getPopperConfig(): any {\n const modifiers: Options['modifiers'] = [\n {\n name: 'offset',\n options: {\n offset: [0, this.offsetDistance],\n },\n },\n ];\n\n if (this.sameContainerWidth) {\n const sameWidth = {\n name: 'sameWidth',\n enabled: true,\n phase: beforeWrite,\n requires: ['computeStyles'],\n fn: ({ state }) => {\n state.styles.popper.width = `${state.rects.reference.width}px`;\n },\n effect: ({ state }) => {\n state.elements.popper.style.width = `${(state.elements.reference as HTMLElement).offsetWidth}px`;\n },\n };\n modifiers.push(sameWidth);\n }\n\n const defaultPopperConfig: any = {\n placement: PLACEMENTS[this.placement],\n strategy: 'fixed',\n modifiers,\n };\n\n return {\n ...defaultPopperConfig,\n ...this.popperConfig,\n };\n }\n\n render() {\n return (\n \n \n \n );\n }\n}\n","import { Component, h, Host, Element, Method } from '@stencil/core';\n\n@Component({\n tag: 'sy-floated',\n shadow: true,\n})\nexport class Floated {\n private listeners: { afterRemoved: () => void } | null;\n\n @Element() el: HTMLSyFloatedElement;\n\n /**\n * Add listeners.\n */\n @Method()\n async addListeners(listeners: { afterRemoved: () => void }): Promise {\n this.listeners = listeners;\n }\n\n /**\n * Remove listeners\n */\n @Method()\n async removeListeners(): Promise {\n this.listeners = null;\n }\n\n disconnectedCallback() {\n if (!this.el.isConnected) {\n const { afterRemoved } = this.listeners || {};\n afterRemoved?.();\n }\n }\n\n render() {\n return ;\n }\n}\n","import { Component, h, Host } from '@stencil/core';\n\n@Component({\n tag: 'sy-floating-element',\n shadow: true,\n})\nexport class FloatingElement {\n render() {\n return ;\n }\n}\n","/**\n * Returns whether the element is hidden.\n * @param $elem\n */\nexport function isHidden($elem: HTMLElement): boolean {\n // A quick and dirty way to check whether the element is hidden.\n // For a more fine-grained check we could use \"window.getComputedStyle\" but we don't because of bad performance.\n // If the element has visibility set to \"hidden\" or \"collapse\", display set to \"none\" or opacity set to \"0\" through CSS\n // we won't be able to catch it here. We accept it due to the huge performance benefits.\n return (\n $elem.hasAttribute('hidden') ||\n ($elem.hasAttribute('aria-hidden') && $elem.getAttribute('aria-hidden') !== 'false') ||\n $elem.style.display === `none` ||\n $elem.style.opacity === `0` ||\n $elem.style.visibility === `hidden` ||\n $elem.style.visibility === `collapse`\n );\n\n // If offsetParent is null we can assume that the element is hidden\n // https://stackoverflow.com/questions/306305/what-would-make-offsetparent-null\n // || $elem.offsetParent == null;\n}\n\n/**\n * Returns whether the element is disabled.\n * @param $elem\n */\nexport function isDisabled($elem: HTMLElement): boolean {\n return (\n $elem.hasAttribute('disabled') ||\n ($elem.hasAttribute('aria-disabled') && $elem.getAttribute('aria-disabled') !== 'false')\n );\n}\n\n/**\n * Determines whether an element is focusable.\n * Read more here: https://stackoverflow.com/questions/1599660/which-html-elements-can-receive-focus/1600194#1600194\n * Or here: https://stackoverflow.com/questions/18261595/how-to-check-if-a-dom-element-is-focusable\n * @param $elem\n */\nexport function isFocusable($elem: HTMLElement): boolean {\n // Discard elements that are removed from the tab order.\n if ($elem.getAttribute('tabindex') === '-1' || isHidden($elem) || isDisabled($elem)) {\n return false;\n }\n\n // At this point we know that the element can have focus (eg. won't be -1) if the tabindex attribute exists\n // Anchor tags or area tags with a href set\n // Form elements which are not disabled\n // IFrames\n return (\n $elem.hasAttribute('tabindex') ||\n (($elem instanceof HTMLAnchorElement || $elem instanceof HTMLAreaElement) && $elem.hasAttribute('href')) ||\n $elem instanceof HTMLButtonElement ||\n $elem instanceof HTMLInputElement ||\n $elem instanceof HTMLTextAreaElement ||\n $elem instanceof HTMLSelectElement ||\n $elem instanceof HTMLIFrameElement\n );\n}\n","/**\n * Traverses the slots of the open shadowroots and returns all children matching the query.\n * We need to traverse each child-depth one at a time because if an element should be skipped\n * (for example because it is hidden) we need to skip all of it's children. If we use querySelectorAll(\"*\")\n * the information of whether the children is within a hidden parent is lost.\n * @param {ShadowRoot | HTMLElement} root\n * @param skipNode\n * @param isMatch\n * @param {number} maxDepth\n * @param {number} depth\n * @returns {HTMLElement[]}\n */\nexport function queryShadowRoot(\n root: ShadowRoot | HTMLElement,\n skipNode: ($elem: HTMLElement) => boolean,\n isMatch: ($elem: HTMLElement) => boolean,\n reverse = false,\n maxDepth = 20,\n depth = 0,\n): HTMLElement | null {\n // If the depth is above the max depth, abort the searching here.\n if (depth >= maxDepth) {\n return null;\n }\n\n // Traverses a slot element\n const traverseSlot = ($slot: HTMLSlotElement) => {\n // Only check nodes that are of the type Node.ELEMENT_NODE\n // Read more here https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\n const assignedNodes = $slot.assignedNodes().filter((node) => node.nodeType === 1);\n if (assignedNodes.length > 0) {\n const $slotParent = assignedNodes[0].parentElement;\n if ($slotParent) {\n return queryShadowRoot($slotParent, skipNode, isMatch, reverse, maxDepth, depth + 1);\n }\n }\n\n // Has not found an element\n return null;\n };\n\n // Go through each child and continue the traversing if necessary\n // Even though the typing says that children can't be undefined, Edge 15 sometimes gives an undefined value.\n // Therefore we fallback to an empty array if it is undefined.\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n const children = Array.from(root.children || []);\n\n // Reverses the array if searching for last\n if (reverse) {\n children.reverse();\n }\n\n for (const $child of children) {\n // Check if the element and its descendants should be skipped\n if (skipNode($child)) {\n continue;\n }\n\n // If the element matches we always add it\n if (isMatch($child)) {\n return $child;\n }\n\n let result;\n\n if ($child.shadowRoot != null) {\n // If the element has a shadow root we need to traverse it\n result = queryShadowRoot($child.shadowRoot, skipNode, isMatch, reverse, maxDepth, depth + 1);\n } else if ($child.tagName === 'SLOT') {\n // If the child is a slot we need to traverse each assigned node\n result = traverseSlot($child);\n } else {\n // Traverse the children of the element\n result = queryShadowRoot($child, skipNode, isMatch, reverse, maxDepth, depth + 1);\n }\n\n // If a valid child has been found, returns it\n if (result) {\n return result;\n }\n }\n\n // Has not found an element\n return null;\n}\n","const timeouts = new Map();\n\n/**\n * Debounces a callback.\n * @param cb\n * @param ms\n * @param id\n */\nexport function debounce(cb: () => void, ms: number, id: string): void {\n // Clear current timeout for id\n const timeout = timeouts.get(id);\n if (timeout != null) {\n window.clearTimeout(timeout);\n }\n\n // Set new timeout\n timeouts.set(\n id,\n window.setTimeout(() => {\n cb();\n timeouts.delete(id);\n }, ms),\n );\n}\n","import { Component, Element, Host, h, Prop, Watch } from '@stencil/core';\nimport { isHidden, isFocusable } from './focusable.function';\nimport { queryShadowRoot } from './shadow.function';\nimport { debounce } from './debounce.function';\n\n/**\n * @slot - Slot to add components to focus trap.\n */\n@Component({\n tag: 'sy-focus-trap',\n shadow: true,\n})\nexport class FocusTrap {\n // The backup element is only used if there are no other focusable children\n private backup: HTMLElement | null | undefined;\n private start: HTMLElement | null | undefined;\n private end: HTMLElement | null | undefined;\n\n private focusLastElementBounded: () => void;\n private focusFirstElementBounded: () => void;\n private onFocusInBounded: () => void;\n private onFocusOutBounded: () => void;\n\n private focused = false;\n\n // The debounce id is used to distinguish this focus trap from others when debouncing\n private debounceId = Math.random().toString();\n\n @Element() el: HTMLSyFocusTrapElement;\n\n /**\n * If true, the focus won't trap the focus.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * Sets the tabIndex value of the trap divs\n */\n @Watch('disabled')\n private disabledWatcher() {\n this.start?.setAttribute('tabindex', !this.focused || this.disabled ? `-1` : `0`);\n this.end?.setAttribute('tabindex', !this.focused || this.disabled ? `-1` : `0`);\n }\n\n componentDidLoad() {\n this.addHandler();\n }\n\n disconnectedCallback() {\n if (this.el.isConnected) return;\n\n this.removeHandler();\n }\n\n /**\n * Focuses the first focusable element in the focus trap.\n */\n private focusFirstElement() {\n this.trapFocus();\n }\n\n /**\n * Focuses the last focusable element in the focus trap.\n */\n private focusLastElement() {\n this.trapFocus(true);\n }\n\n /**\n * Focuses on either the last or first focusable element.\n * @param {boolean} trapToEnd\n */\n private trapFocus(trapToEnd?: boolean) {\n if (this.disabled) return;\n\n const focusableElement = this.getNextFocusableElement(trapToEnd);\n if (focusableElement) {\n focusableElement.focus();\n this.backup?.setAttribute('tabindex', '-1');\n } else {\n // If there are no focusable children we need to focus on the backup\n // to trap the focus. This is a useful behavior if the focus trap is\n // for example used in a dialog and we don't want the user to tab\n // outside the dialog even though there are no focusable children\n // in the dialog.\n this.backup?.setAttribute('tabindex', '0');\n this.backup?.focus();\n }\n }\n\n /**\n * Returns a list of the focusable children found within the element.\n */\n private getNextFocusableElement(reverse?: boolean): HTMLElement | null {\n return queryShadowRoot(this.el, isHidden, isFocusable, reverse);\n }\n\n /**\n * When the element gains focus this function is called.\n */\n private onFocusIn() {\n this.updateFocused(true);\n }\n\n /**\n * When the element looses its focus this function is called.\n */\n private onFocusOut() {\n this.updateFocused(false);\n }\n\n /**\n * Updates the focused property and updates the view.\n * The update is debounced because the focusin and focusout out\n * might fire multiple times in a row. We only want to render\n * the element once, therefore waiting until the focus is \"stable\".\n * @param value\n */\n private updateFocused(value: boolean) {\n debounce(\n () => {\n if (this.focused !== value) {\n this.focused = value;\n this.disabledWatcher();\n }\n },\n 0,\n this.debounceId,\n );\n }\n\n /**\n * Adds handlers to deal with focus events\n */\n private addHandler() {\n const root = this.el.shadowRoot;\n\n this.backup = root?.querySelector('#backup');\n this.start = root?.querySelector('#start');\n this.end = root?.querySelector('#end');\n\n this.focusLastElementBounded = this.focusLastElement.bind(this);\n this.focusFirstElementBounded = this.focusFirstElement.bind(this);\n this.onFocusInBounded = this.onFocusIn.bind(this);\n this.onFocusOutBounded = this.onFocusOut.bind(this);\n\n this.start?.addEventListener('focus', this.focusLastElementBounded);\n this.end?.addEventListener('focus', this.focusFirstElementBounded);\n\n // Focus out is called every time the user tabs around inside the element\n this.el.addEventListener('focusin', this.onFocusInBounded);\n this.el.addEventListener('focusout', this.onFocusOutBounded);\n\n this.disabledWatcher();\n }\n\n /**\n * Removes handlers to deal with focus events\n */\n private removeHandler() {\n this.start?.removeEventListener('focus', this.focusLastElementBounded);\n this.end?.removeEventListener('focus', this.focusFirstElementBounded);\n this.el.removeEventListener('focusin', this.onFocusInBounded);\n this.el.removeEventListener('focusout', this.onFocusOutBounded);\n }\n\n render() {\n return (\n \n
\n
\n \n
\n
\n );\n }\n}\n","@import '../../../styles/reboot/mixins';\n@import '../../../styles/typography/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, h, getAssetPath, Element, State } from '@stencil/core';\nimport { ColorHelper } from '../../utils/color-helpers';\n\n/**\n * @slot - Designed to add custom content inside the footer.\n */\n@Component({\n tag: 'sy-footer',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n assetsDirs: ['assets'],\n})\nexport class Footer {\n private styleObserver: MutationObserver;\n\n @Element() el: HTMLSyFooterElement;\n\n @State() contrastColor: string;\n\n componentWillLoad() {\n this.getContrastColor();\n this.handleStyleChange();\n }\n\n componentDidLoad() {\n this.getContrastColor();\n }\n\n disconnectedCallback() {\n this.styleObserver?.disconnect();\n }\n\n private getContrastColor() {\n const newColor = ColorHelper.getContrastColor(\n window.getComputedStyle(this.el).getPropertyValue('background-color'),\n );\n if (newColor && newColor !== this.contrastColor) {\n this.contrastColor = newColor;\n }\n }\n\n private handleStyleChange() {\n this.styleObserver = new MutationObserver((mutations) => {\n mutations.forEach(() => {\n this.getContrastColor();\n });\n });\n this.styleObserver.observe(this.el.getRootNode(), { attributes: true, attributeFilter: ['style'], subtree: true });\n }\n\n render() {\n return (\n \n \n \n \n );\n }\n}\n","@import '../../../styles/reboot/mixins';\n@import '../../../styles/breakpoints/variables';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, h, Prop } from '@stencil/core';\n\n/**\n * @slot - Slot for adding sy-col(s), sy-row(s) and sy-cell(s).\n */\n@Component({\n tag: 'sy-grid',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class Grid {\n /**\n * Defines the system used to build the grid: flexbox system or grid system.\n */\n @Prop({ reflect: true }) type: 'flex' | 'grid';\n\n /**\n * Defines if the grid will use all available width.\n */\n @Prop({ reflect: true }) fluid: boolean;\n\n /**\n * Defines the number of rows of the grid. Only considered if type is 'grid'.\n */\n @Prop() rows: number;\n\n /**\n * Defines the number of columns of the grid. Only considered if type is 'grid'.\n */\n @Prop() cols: number;\n\n /**\n * Sets the gap size between collums and rows.\n * It must be a single number value.\n */\n @Prop({ reflect: true }) gap: string;\n\n private getGridStyle(): any {\n let style: any = {};\n\n if (this.type === 'grid') {\n if (this.rows) {\n style.gridTemplateRows = `repeat(${this.rows}, 1fr)`;\n }\n if (this.cols) {\n style.gridTemplateColumns = `repeat(${this.cols}, 1fr)`;\n }\n }\n if (this.gap) {\n const gap = isNaN(Number(this.gap)) ? this.gap : `${this.gap}px`;\n style = { ...style, '--sy-grid-gap': gap };\n }\n\n return style;\n }\n\n render() {\n return (\n \n \n \n );\n }\n}\n","@import 'classes';\n","import type { EventEmitter } from '@stencil/core';\nimport { Component, Element, Event, Host, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { getParentElement } from '../../utils/select-elements.utils';\n\n/**\n * @slot - Slot to add components such as sy-text and sy-progress-spinner.\n */\n@Component({\n tag: 'sy-infinite-scroll',\n styleUrl: 'scss/index.scss',\n shadow: true,\n})\nexport class InfiniteScroll {\n // Threshold Pixels\n private thrPx = 0;\n\n // Threshold Percentage\n private thrPc = 0;\n\n // The Scroll Element\n private scrollEl?: HTMLElement;\n\n // If Event did fire\n private didFire = false;\n\n @Element() el!: HTMLSyInfiniteScrollElement;\n @State() isLoading = false;\n\n /**\n * Optional. A reference to a specific element that should be scrolled.\n * If none is provided, the component will set the elementToBeScrolled to be it's parent.\n */\n @Prop() elementToBeScrolled?: HTMLElement;\n\n /**\n * The threshold distance from the bottom of the content to call the `infinite` output event when scrolled.\n * This value can be specified as the scroll's remaining pixels (e.g., 200px) or a percentage of the total scroll size (e.g., 15%).\n */\n @Prop() threshold = '15%';\n\n @Watch('threshold')\n protected tresholdWatcher(): void {\n const val = this.threshold;\n if (val.lastIndexOf('%') > -1) {\n this.thrPx = 0;\n this.thrPc = parseFloat(val) / 100;\n } else {\n this.thrPx = parseFloat(val);\n this.thrPc = 0;\n }\n }\n\n /**\n * If the infinite scroll should be hidden and disabled.\n */\n @Prop() disabled = false;\n\n @Watch('disabled')\n protected disabledWatcher(): void {\n const disabled = this.disabled;\n if (disabled) {\n this.isLoading = false;\n }\n this.enableScrollEvents(!disabled);\n }\n\n /**\n * Emitted when the scroll reaches the threshold distance.\n * You must call the component's `complete()` method when your async operation has completed.\n */\n @Event() syScrollDidReachThreshold: EventEmitter;\n\n /**\n * Emitted when the scroll reaches the top.\n */\n @Event() syScrollDidReachTop: EventEmitter;\n\n async connectedCallback() {\n if (this.elementToBeScrolled) {\n this.scrollEl = this.elementToBeScrolled;\n } else {\n const contentEl = getParentElement(this.el);\n this.scrollEl = contentEl.el as any;\n }\n this.tresholdWatcher();\n this.disabledWatcher();\n }\n\n disconnectedCallback() {\n this.enableScrollEvents(false);\n this.scrollEl = undefined;\n }\n\n /**\n * Important: Call `complete()` within the `syInfinite` output event handler when your async operation has completed.\n */\n @Method()\n async complete(): Promise {\n const scrollEl = this.scrollEl;\n if (!this.isLoading || !scrollEl) {\n return;\n }\n this.isLoading = false;\n }\n\n private onScroll = () => {\n const scrollEl = this.scrollEl;\n if (!scrollEl || !this.canStart()) {\n return;\n }\n\n const infiniteHeight = this.el.offsetHeight;\n const scrollTop = scrollEl.scrollTop;\n const scrollHeight = scrollEl.scrollHeight;\n const height = scrollEl.offsetHeight;\n const threshold = this.thrPc === 0 ? this.thrPx : height * this.thrPc;\n\n const distanceFromInfinite = scrollHeight - infiniteHeight - scrollTop - threshold - height;\n\n if (distanceFromInfinite < 0) {\n if (!this.didFire) {\n this.isLoading = true;\n this.didFire = true;\n this.syScrollDidReachThreshold.emit();\n return;\n }\n } else if (scrollTop === 0) {\n if (!this.didFire) {\n this.didFire = true;\n this.syScrollDidReachTop.emit();\n return;\n }\n } else {\n this.didFire = false;\n }\n\n return;\n };\n\n private canStart(): boolean {\n return !this.disabled && !!this.scrollEl && !this.isLoading;\n }\n\n private enableScrollEvents(shouldListen: boolean) {\n if (this.scrollEl) {\n if (shouldListen) {\n this.scrollEl.addEventListener('scroll', this.onScroll);\n } else {\n this.scrollEl.removeEventListener('scroll', this.onScroll);\n }\n }\n }\n\n render() {\n const disabled = this.disabled;\n return (\n \n \n \n );\n }\n}\n","@import '../../../styles/reboot/mixins';\n@import 'classes';\n","import { Component, Host, h, Element, Prop, Method } from '@stencil/core';\nimport { MuuriInterface, MuuriHelper } from '../../utils/muuri-interface';\nimport MuuriGrid from 'muuri';\n\nexport declare type Muuri = MuuriGrid;\n\n/**\n * @slot - Slot designed to add content in the list component.\n */\n\n@Component({\n tag: 'sy-list',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class List implements MuuriInterface {\n private grid: Muuri | undefined;\n\n @Element() el: HTMLSyListElement;\n\n /**\n * Muuri's grid item selector.\n */\n @Prop({ reflect: true }) gridItemSelector = 'sy-list-item';\n\n /**\n * Muuri's grid handle selector.\n */\n @Prop() gridHandleSelector: string;\n\n /**\n * Muuri's grid constructor options.\n */\n @Prop() gridOptions: { [key: string]: any };\n\n /**\n * Set the list as sortable.\n */\n @Prop({ reflect: true }) sortable = false;\n\n /**\n * Use to get Muuri grid instance.\n */\n @Method()\n async getGrid(): Promise {\n return this.grid;\n }\n\n componentDidRender() {\n if (this.sortable) {\n this.grid = MuuriHelper.createGrid(this);\n }\n }\n\n componentWillUpdate() {\n if (this.grid) {\n MuuriHelper.destroyGrid(this.grid);\n }\n }\n\n render() {\n return (\n \n \n \n );\n }\n}\n","@import '../../../../styles/reboot/mixins';\n@import '../../../../styles/typography/mixins';\n@import '../../../../styles/states/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, h, Prop, Element, Listen } from '@stencil/core';\nimport { AnchorInterface, generateAnchorAttributes, openURL } from '../../../utils/elements-interface';\n\n/**\n * @slot - Designed to add content inside the list item component.\n */\n\n@Component({\n tag: 'sy-list-item',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class ListItem implements AnchorInterface {\n @Element() el: HTMLSyListItemElement;\n\n /**\n HTML download attribute.\n */\n @Prop() download: string | undefined;\n\n /**\n * HTML href attribute.\n */\n @Prop() href: string | undefined;\n\n /**\n * HTML rel attribute.\n */\n @Prop() rel: string | undefined;\n\n /**\n * HTML target attribute.\n */\n @Prop() target: '_blank' | '_self' | '_parent' | '_top';\n\n /**\n * Indicate if the item is disabled.\n */\n @Prop({ reflect: true }) disabled: boolean;\n\n /**\n * Indicate if the item is active.\n */\n @Prop({ reflect: true }) active: boolean;\n\n private getClasses() {\n return {\n class: `sy-item-inner-content `,\n };\n }\n\n private handleClick = (event: Event) => {\n if (this.href) {\n openURL(this.href, event);\n }\n };\n\n /**\n * Activates the action button with the enter key.\n *\n * @param {KeyboardEvent} event\n */\n @Listen('keydown', { passive: false })\n onKeydown(event: KeyboardEvent): void {\n // The action button is activated by space on the keyup event, but the\n // default action for space is already triggered on keydown. It needs to be\n // prevented to stop scrolling the page before activating the button.\n if (event.key === ' ') {\n event.preventDefault();\n } else if (event.key === 'Enter') {\n // If enter is pressed, activate the button\n event.preventDefault();\n this.el.click();\n }\n }\n\n /**\n * Activates the action button with the space key.\n *\n * @param {KeyboardEvent} event\n */\n @Listen('keyup', { passive: false })\n onKeyup(event: KeyboardEvent): void {\n if (event.key === ' ') {\n event.preventDefault();\n this.el.click();\n }\n }\n\n render() {\n return (\n \n {this.href ? (\n \n \n \n ) : (\n
\n \n
\n )}\n \n );\n }\n}\n","@import '../../../styles/reboot/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, h, Prop, Element } from '@stencil/core';\nimport { Consumes } from '../context/consumer/consumes-decorator';\n\nexport type TagContext = string | { tag: string; attributes?: { [attributes: string]: any } };\n\n@Component({\n tag: 'sy-loading',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class Loading {\n private tagName: string;\n private attributes = {};\n\n @Element() el;\n\n /**\n * Defines which component tag will be rendered.\n */\n @Consumes('loadingComponentTag') @Prop({ reflect: true }) loadingComponentTag:\n | TagContext\n | { small: TagContext; medium: TagContext; large: TagContext } = 'sy-orbital-loading';\n\n /**\n * Defines loading size.\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'small';\n\n componentWillRender() {\n const tagResults = this.getPropertiesTagContext(this.loadingComponentTag);\n this.tagName = tagResults.tagName;\n this.attributes = tagResults.attributes;\n }\n\n private getPropertiesTagContext(tagContext) {\n if (!tagContext) {\n return {\n tagName: 'sy-orbital-loading',\n attributes: {},\n };\n }\n\n if (typeof this.loadingComponentTag === 'string') {\n return {\n tagName: tagContext,\n attributes: {},\n };\n }\n\n if (tagContext.tag) {\n return {\n tagName: tagContext.tag,\n attributes: tagContext.attributes,\n };\n }\n\n if (tagContext[this.size]) {\n return this.getPropertiesTagContext(tagContext[this.size]);\n }\n\n return {\n tagName: 'sy-orbital-loading',\n attributes: {},\n };\n }\n\n render() {\n return (\n \n \n \n );\n }\n}\n","@import '../../../styles/reboot/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, h, Prop, Element } from '@stencil/core';\nimport { ColorHelper } from '../../utils/color-helpers';\n\n@Component({\n tag: 'sy-orbital-loading',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class OrbitalLoading {\n @Element() el: HTMLSyOrbitalLoadingElement;\n\n /**\n * Defines loading size.\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'small';\n\n private getCSSTokens() {\n const firstColor = getComputedStyle(this.el).getPropertyValue('--sy-loading-color');\n\n if (!firstColor) {\n return {};\n }\n\n const secondColor = ColorHelper.getTintOrShadeColor(firstColor || 'black');\n\n return {\n '--sy-orbital-loading-color-small-circle': firstColor,\n '--sy-orbital-loading-color-medium-circle': secondColor,\n '--sy-orbital-loading-color-large-circle': firstColor,\n };\n }\n\n /**\n * O valor do raio é composto por 3 valores. O primeiro representa 100%, o segundo representa que apenas 90% do container será ocupado\n * e o ultimo representa a proporção de cada circulo em relação ao maior.\n */\n\n render() {\n return (\n \n {this.size !== 'medium' && (\n \n \n \n )}\n {this.size !== 'small' && (\n \n \n \n )}\n \n \n \n \n );\n }\n}\n","@import '../../../styles/reboot/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, h, Element, Prop, Event, EventEmitter, Watch, State } from '@stencil/core';\nimport { HTMLStencilElement } from '@stencil/core/internal';\nimport { HTMLAttributes } from 'react';\nimport { Components as SyComponents } from '../../components';\n\nexport type PageEvent = {\n index: number;\n};\n\n@Component({\n tag: 'sy-paginator',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class Paginator {\n @Element() el: HTMLSyPaginatorElement;\n\n /**\n * Sets active page, this will define which button appears active.\n */\n @Prop({ reflect: true, mutable: true }) index = 1;\n\n /**\n * Sets the number of available pages to navigation.\n */\n @Prop({ reflect: true }) length = 1;\n\n /**\n * If true, hide first and last page direct buttons.\n */\n @Prop({ reflect: true }) hideFirstAndLastButtons = false;\n\n /**\n * If true, hide previous and next page direct buttons.\n */\n @Prop({ reflect: true }) hidePreviousAndNextButtons = false;\n\n /**\n * Sets how many internal buttons (between the arrows buttons) will be shown.\n */\n @Prop({ reflect: true, mutable: true }) maxInternalButtons = 4;\n\n /**\n * Sets paginator's state to disabled.\n */\n @Prop({ reflect: true }) disabled = false;\n\n @State() internalButtons = this.maxInternalButtons;\n\n /**\n * Emitted after active page changes.\n */\n @Event() syPaginatorPageDidChange: EventEmitter;\n\n @Watch('index')\n indexWatcher(): void {\n if (this.index < 1) this.setActivePage(1);\n else if (this.index > this.length) this.setActivePage(this.length);\n }\n\n @Watch('maxInternalButtons')\n maxInternalButtonsWatcher(): void {\n if (this.maxInternalButtons < 1) this.maxInternalButtons = 0;\n else if (this.maxInternalButtons < 3) this.maxInternalButtons = 3;\n else if (this.maxInternalButtons > 10) this.maxInternalButtons = 10;\n\n this.internalButtons = this.maxInternalButtons;\n }\n\n private arrowButtonsIcons = {\n first: 'arrow-button-left-1',\n previous: 'arrow-left-1',\n next: 'arrow-right-1',\n last: 'arrow-button-right-1',\n };\n\n private setActivePage(index: number) {\n // Index must be between 1 and length\n if (index < 1) {\n index = 1;\n } else if (index > this.length) {\n index = this.length;\n }\n\n // Check if index has really changed\n if (this.index !== index) {\n this.index = index;\n this.syPaginatorPageDidChange.emit({\n index: this.index,\n });\n }\n }\n\n private getArrowButtonAttributes(\n type: 'first' | 'previous' | 'next' | 'last',\n ): Partial> {\n let attributes: Partial> = {\n type: 'basic',\n content: 'icon-only',\n icon: this.arrowButtonsIcons[type],\n };\n\n if (\n (type === 'first' && this.index === 1) ||\n (type === 'previous' && this.index === 1) ||\n (type === 'next' && this.index === this.length) ||\n (type === 'last' && this.index === this.length)\n ) {\n attributes = {\n ...attributes,\n disabled: true,\n tabIndex: -1,\n 'aria-disabled': true,\n };\n }\n\n return attributes;\n }\n\n private getArrowButtonStyle(type: 'first' | 'previous' | 'next' | 'last') {\n let styles: any = {};\n if (type === 'first' || type === 'last') {\n styles = this.hideFirstAndLastButtons ? { ...styles, style: { display: 'none' } } : styles;\n } else {\n styles = this.hidePreviousAndNextButtons ? { ...styles, style: { display: 'none' } } : styles;\n }\n\n return styles;\n }\n\n private getInternalButtonAttributes(\n index: number | '...',\n ): Partial> {\n let attributes: Partial> = {\n type: 'basic',\n content: 'text-only',\n label: index as string,\n };\n\n if (this.index === index) {\n attributes = {\n ...attributes,\n type: 'accent',\n 'aria-current': 'page',\n };\n } else if (index === '...') {\n attributes = {\n ...attributes,\n tabIndex: -1,\n };\n }\n\n return attributes;\n }\n\n private getInternalButtonStyle(index: number | '...') {\n let styles: any = {};\n\n if (this.index === index) {\n styles = {};\n } else if (index === '...') {\n styles = {\n ...styles,\n style: { 'pointer-events': 'none' },\n };\n }\n\n if (index > 999) {\n styles = { ...styles, style: { '--padding-x': '.1rem' } };\n } else if (index > 99) {\n styles = { ...styles, style: { '--padding-x': '.25rem' } };\n } else if (index > 9) {\n styles = { ...styles, style: { '--padding-x': '.5rem' } };\n }\n\n return styles;\n }\n\n private renderInternalButtons() {\n if (this.internalButtons < 3) return;\n\n const indexes: number[] = [];\n if (this.length < this.internalButtons + 2) {\n for (let index = 1; index <= this.length; index++) {\n indexes.push(index);\n }\n return (\n
\n {indexes.map((index) => (\n this.setActivePage(index)}\n >\n ))}\n
\n );\n }\n\n if (this.index <= this.internalButtons / 2) {\n for (let index = 1; index < this.internalButtons; index++) {\n indexes.push(index);\n }\n return (\n
\n {indexes.map((index) => (\n this.setActivePage(index)}\n >\n ))}\n \n this.setActivePage(this.length)}\n >\n
\n );\n }\n\n if (this.index + 1 < this.length - Math.ceil(this.internalButtons / 2)) {\n for (\n let index = this.index - Math.floor(this.internalButtons / 2) + 1;\n index < this.index + Math.ceil(this.internalButtons / 2);\n index++\n ) {\n indexes.push(index);\n }\n return (\n
\n {indexes.map((index) => (\n this.setActivePage(index)}\n >\n ))}\n \n this.setActivePage(this.length)}\n >\n
\n );\n }\n\n for (let index = this.length - this.internalButtons; index <= this.length; index++) {\n indexes.push(index);\n }\n return (\n
\n {indexes.map((index) => (\n this.setActivePage(index)}\n >\n ))}\n
\n );\n }\n\n private resizePaginator() {\n const resizeObserver = new ResizeObserver((entries) => {\n for (const entry of entries) {\n if (entry?.contentRect?.width) {\n // Typical size\n const buttonSize = 40;\n const buttons = this.el.shadowRoot?.querySelectorAll('sy-button') as NodeListOf;\n const canHasMaxButtons = Math.ceil((entry.contentRect.width - buttonSize) / buttonSize);\n\n let howManyArrowButtons = 4;\n howManyArrowButtons -= this.hideFirstAndLastButtons ? 2 : 0;\n howManyArrowButtons -= this.hidePreviousAndNextButtons ? 2 : 0;\n\n if (\n howManyArrowButtons + this.internalButtons > canHasMaxButtons ||\n buttons.length > canHasMaxButtons ||\n this.internalButtons < this.maxInternalButtons\n ) {\n let buttonsAfterResize = canHasMaxButtons - howManyArrowButtons;\n buttonsAfterResize -= this.length > buttonsAfterResize ? 1 : 0;\n buttonsAfterResize =\n buttonsAfterResize > this.maxInternalButtons ? this.maxInternalButtons : buttonsAfterResize;\n buttonsAfterResize = buttonsAfterResize < 3 ? 0 : buttonsAfterResize;\n this.internalButtons = buttonsAfterResize;\n }\n }\n }\n });\n\n resizeObserver.observe(this.el);\n }\n\n componentWillLoad() {\n this.indexWatcher();\n this.maxInternalButtonsWatcher();\n this.resizePaginator();\n }\n\n render() {\n return (\n \n this.setActivePage(1)}\n >\n this.setActivePage(this.index - 1)}\n >\n {this.renderInternalButtons()}\n this.setActivePage(this.index + 1)}\n >\n this.setActivePage(this.length)}\n >\n \n );\n }\n}\n","@import '../../../styles/reboot/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, h, Prop, Watch } from '@stencil/core';\n\n@Component({\n tag: 'sy-progress-bar',\n styleUrls: ['scss/index.scss', 'sccs/_tokens.scss'],\n shadow: true,\n})\nexport class ProgressBar {\n /**\n * Percentage of the bar that must be active. Must be a value between 0 and 100. Only applied if the 'type' is 'determinate'\n */\n @Prop({ mutable: true }) value: number;\n\n /**\n * If true, the direction of the progress bar will be reversed\n */\n @Prop({ reflect: true }) reverse = false;\n\n /**\n * State of the progress bar: 'determinate' means that the percentage of completion is known and the bar size will be defined by 'value', 'indeterminate' means that the percentage is unknown and the bar will play a looping animation.\n */\n @Prop({ reflect: true }) type: 'determinate' | 'indeterminate' = 'determinate';\n\n /**\n * Adjusts invalid values and sets a fixed value if type is indeterminate\n */\n @Watch('value')\n @Watch('type')\n validateValueWatcher(): void {\n this.fixValue();\n }\n\n componentWillLoad() {\n this.fixValue();\n }\n\n private fixValue() {\n if (this.value < 0) {\n this.value = 0;\n } else if (this.value > 100) {\n this.value = 100;\n }\n\n this.value = this.type === 'indeterminate' ? 100 : this.value;\n }\n\n private getProgressBarAttributes() {\n const attributes = {\n class: 'sy-progress-inner-bar',\n role: 'progressbar',\n style: { width: `${this.value}%` },\n ariaValueNow: this.value,\n ariaValueMin: '0',\n ariaValueMax: '100',\n };\n return attributes;\n }\n\n render() {\n return (\n \n
\n
\n );\n }\n}\n","@import '../../../styles/reboot/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Component, Element, Host, h, Prop, Watch } from '@stencil/core';\n\n@Component({\n tag: 'sy-progress-spinner',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class ProgressSpinner {\n private transition = 'none';\n private strokeWidth = 10;\n\n @Element() el: HTMLSyProgressSpinnerElement;\n\n /**\n * Defines if the progress spinner will have a background circle.\n */\n @Prop({ reflect: true }) hasBackground = false;\n\n /**\n * Percentage of the circle that must be active. Must be a value between 0 and 100. Only applied if the 'type' is 'determinate'.\n */\n @Prop({ mutable: true }) value: number;\n\n /**\n * Defines loading size.\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'small';\n\n /**\n * State of the progress spinner: 'determinate' means that the percentage of completion is known and the circle filled portion will be defined by 'value',\n * 'indeterminate' means that the percentage is unknown and the circle will play a looping animation.\n */\n @Prop({ reflect: true }) type: 'determinate' | 'indeterminate' = 'determinate';\n\n @Watch('value')\n validateValueWatcher(): void {\n // Adjusts invalid values and sets a fixed value if type is indeterminate\n this.fixValue();\n }\n\n componentWillLoad() {\n this.fixValue();\n }\n\n componentWillRender() {\n this.getStrokeWidth();\n }\n\n componentDidRender() {\n this.unlockTransition();\n }\n\n private fixValue() {\n if (this.value < 0) {\n this.value = 0;\n } else if (this.value > 100) {\n this.value = 100;\n }\n }\n\n private getInnerRadius() {\n return (100 - this.strokeWidth) / 2;\n }\n\n private getStrokeWidth() {\n this.strokeWidth = Number(getComputedStyle(this.el).getPropertyValue('--sy-progress-spinner-stroke-width')) || 10;\n\n return this.strokeWidth;\n }\n\n private unlockTransition() {\n this.transition = this.type === 'determinate' ? 'stroke-dashoffset .6s ease' : 'none';\n }\n\n private getCSSTokens() {\n return {\n '--sy-progress-spinner-value': this.type === 'indeterminate' ? 40 : this.value,\n '--sy-progress-spinner-stroke-width-percentage': `${this.strokeWidth}%`,\n } as any;\n }\n\n private getCircleStyle() {\n const style: any = {\n transition: this.transition,\n };\n return style;\n }\n\n render() {\n return (\n \n \n {this.hasBackground ? (\n \n ) : (\n ''\n )}\n \n \n \n );\n }\n}\n","import { Component, Prop, Event, EventEmitter, Method } from '@stencil/core';\n\nexport type RouterEventDetail = {\n url: string | undefined | null;\n event: Event | undefined | null;\n};\n\n@Component({\n tag: 'sy-router',\n})\nexport class Router {\n /**\n * The root path to use when matching URLs. By default, this is set to \"/\", but you can specify\n * an alternate prefix for all URL paths.\n */\n @Prop() root = '/';\n\n /**\n * Emitted when the route had changed\n */\n @Event() syRouterDidChange: EventEmitter;\n\n /**\n * Navigate to the specified URL.\n */\n @Method()\n async push(url: string, event: any): Promise {\n if (url.startsWith('.')) {\n url = new URL(url, window.location.href).pathname;\n } else if (this.root !== '/' && this.root !== null) {\n url = new URL(url, this.root).pathname;\n }\n\n this.syRouterDidChange.emit({ url, event });\n\n return true;\n }\n}\n","@import '../../../styles/reboot/mixins';\n@import 'classes';\n","import { Component, Host, h, Prop } from '@stencil/core';\nimport { AnchorInterface, generateAnchorAttributes, openURL } from '../../utils/elements-interface';\n\n/**\n * @slot - Designed to receive anchored content.\n */\n@Component({\n tag: 'sy-router-link',\n styleUrl: 'scss/index.scss',\n shadow: true,\n})\nexport class RouterLink implements AnchorInterface {\n /**\n HTML download attribute\n */\n @Prop() download: string | undefined;\n\n /**\n * HTML href attribute\n */\n @Prop() href: string | undefined;\n\n /**\n * HTML rel attribute\n */\n @Prop() rel: string | undefined;\n\n /**\n * HTML target attribute\n */\n @Prop() target: '_blank' | '_self' | '_parent' | '_top' = '_blank';\n\n /**\n * Defines whether the link should be stretched\n */\n @Prop({ reflect: true }) stretchedLink = false;\n\n private onClick = (ev: Event) => {\n openURL(this.href, ev);\n };\n\n render() {\n const AnchorTag = this.stretchedLink ? 'sy-stretched-link' : 'a';\n\n return (\n \n \n \n \n \n );\n }\n}\n","@import '../../../../styles/reboot/mixins';\n@import '../../scss/tokens';\n@import 'classes';\n","import { Component, Host, h } from '@stencil/core';\n\n/**\n * @slot - Designed to receive row's content.\n */\n@Component({\n tag: 'sy-row',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class Row {\n render() {\n return (\n \n \n \n );\n }\n}\n","import { Animation } from '@ionic/core';\nimport {\n createAnimation,\n DURATION_SHORT_4,\n EASING_EMPHASIZED_ACCELERATE,\n fadeOut,\n slideIn,\n} from '../../../utils/animations';\n\nexport function sidebarCloseAnimation(\n sidebarElement: HTMLElement,\n backdropElement: HTMLElement,\n orientation: 'left' | 'right' = 'left',\n): Animation {\n const sidebarAnim = createAnimation();\n\n const sidebarScale = slideIn(orientation)\n .duration(DURATION_SHORT_4)\n .addElement(sidebarElement)\n .easing(EASING_EMPHASIZED_ACCELERATE)\n .direction('reverse');\n const backdropFade = fadeOut()\n .duration(DURATION_SHORT_4)\n .addElement(backdropElement)\n .easing(EASING_EMPHASIZED_ACCELERATE);\n\n sidebarAnim.addAnimation(backdropFade);\n sidebarAnim.addAnimation(sidebarScale);\n return sidebarAnim;\n}\n","import { Animation } from '@ionic/core';\nimport {\n createAnimation,\n DURATION_LONG_2,\n EASING_EMPHASIZED_DECCELERATE,\n fadeIn,\n slideIn,\n} from '../../../utils/animations';\n\nexport function sidebarOpenAnimation(\n sidebarElement: HTMLElement,\n backdropElement: HTMLElement,\n orientation: 'left' | 'right' = 'left',\n): Animation {\n const sidebarAnim = createAnimation();\n\n const sidebarScale = slideIn(orientation)\n .duration(DURATION_LONG_2)\n .addElement(sidebarElement)\n .easing(EASING_EMPHASIZED_DECCELERATE);\n const backdropFade = fadeIn()\n .duration(DURATION_LONG_2)\n .addElement(backdropElement)\n .easing(EASING_EMPHASIZED_DECCELERATE);\n\n sidebarAnim.addAnimation(backdropFade);\n sidebarAnim.addAnimation(sidebarScale);\n return sidebarAnim;\n}\n","@import '../../../styles/reboot/mixins';\n@import '../../../styles/z-index';\n@import '../../../styles/colors';\n@import 'tokens';\n@import 'classes';\n","import { Animation } from '@ionic/core';\nimport { Component, Host, h, Method, Element, Listen, Event, EventEmitter, Prop, Watch } from '@stencil/core';\nimport { Components as SyComponents } from '../../components';\nimport { sidebarCloseAnimation } from './animations/close';\nimport { sidebarOpenAnimation } from './animations/open';\nimport { DISABLE_ANIMATION_VALUE } from '../../utils/animations';\n\n/**\n * @slot - Designed to fill sidebar's content.\n */\n\n@Component({\n tag: 'sy-sidebar',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class Sidebar {\n @Element() el: HTMLSySidebarElement;\n private internalVisible: boolean;\n private backdropEl: HTMLSyBackdropElement | undefined;\n private sidebarEl: HTMLElement | undefined;\n private currentAnimation: Animation | undefined;\n\n /**\n * If true, the backdrop won't be shown.\n */\n @Prop({ reflect: true }) hideBackdrop = false;\n\n /**\n * If true, the sidebar will be shown.\n */\n @Prop({ mutable: true }) visible = false;\n\n @Watch('visible')\n visibleWatcher(): Promise | undefined {\n if (this.visible === this.internalVisible) return;\n\n if (this.visible) {\n return this.show();\n }\n\n return this.hide();\n }\n\n /**\n * Placement prop to define the default opening and closing animation according to the edge\n */\n @Prop() placement: 'left' | 'right' = 'left';\n\n /**\n * Optional custom animation to replace the default and be played when the component starts opening.\n * If 'none', the sidebar won't have open animation.\n */\n @Prop() openAnimation?: ((sidebarElement: HTMLElement, backdropElement: HTMLElement) => Animation) | string;\n\n /**\n * Optional custom animation to replace the default and be played when the component starts closing.\n * If 'none', the sidebar won't have close animation.\n */\n @Prop() closeAnimation?: ((sidebarElement: HTMLElement, backdropElement: HTMLElement) => Animation) | string;\n\n /**\n * Disables all animations\n */\n @Prop() disableAnimations = false;\n\n /**\n * Emitted when the sidebar is shown.\n */\n @Event() sySidebarDidShow: EventEmitter;\n\n /**\n * Emitted when the sidebar is hidden.\n */\n @Event() sySidebarDidHide: EventEmitter;\n\n /**\n * Emitted when a sidebar starts to collapse.\n */\n @Event() sySidebarWillHide: EventEmitter;\n\n /**\n * Emitted when a sidebar starts to expand.\n */\n @Event() sySidebarWillShow: EventEmitter;\n\n /**\n * Method to hide the sidebar.\n * If 'instant' is true, the sidebar won't have close animation.\n */\n @Method()\n async hide(instant = false): Promise {\n this.internalVisible = false;\n\n if (this.currentAnimation) {\n this.currentAnimation.stop();\n }\n\n this.sySidebarWillHide.emit();\n if (!instant && !this.disableAnimations) {\n this.currentAnimation = this.getCloseAnimation();\n if (this.currentAnimation) {\n await this.currentAnimation.play();\n }\n }\n\n this.visible = false;\n this.sySidebarDidHide.emit();\n }\n\n /**\n * Method to show the sidebar.\n * If 'instant' is true, the sidebar won't have open animation.\n */\n @Method()\n async show(instant = false): Promise {\n this.internalVisible = true;\n this.visible = true;\n\n if (this.currentAnimation) {\n this.currentAnimation.stop();\n }\n\n this.sySidebarWillShow.emit();\n if (!instant && !this.disableAnimations) {\n this.currentAnimation = this.getOpenAnimation();\n if (this.currentAnimation) {\n await this.currentAnimation.play();\n }\n }\n this.sySidebarDidShow.emit();\n }\n\n @Listen('keydown', { target: 'window' })\n onKeydown(ev: KeyboardEvent): void {\n if (ev.key === 'Escape' && this.visible) {\n this.hide();\n }\n }\n\n /**\n * Method that toggle the sidebar\n * If 'instant' is true, the sidebar won't have both open and close animations.\n */\n @Method()\n async toggle(instant = false): Promise {\n if (this.visible) {\n return this.hide(instant);\n }\n return this.show(instant);\n }\n\n private getOpenAnimation() {\n if (typeof this.openAnimation === 'string') {\n if (this.openAnimation === DISABLE_ANIMATION_VALUE) {\n return;\n }\n if (this.sidebarEl && this.backdropEl) {\n return sidebarOpenAnimation(this.sidebarEl, this.backdropEl, this.placement);\n }\n return;\n }\n const animationBuilder = this.openAnimation || sidebarOpenAnimation;\n if (this.sidebarEl && this.backdropEl) {\n return animationBuilder(this.sidebarEl, this.backdropEl, this.placement);\n }\n }\n\n private getCloseAnimation() {\n if (typeof this.closeAnimation === 'string') {\n if (this.closeAnimation === DISABLE_ANIMATION_VALUE) {\n return;\n }\n if (this.sidebarEl && this.backdropEl) {\n return sidebarCloseAnimation(this.sidebarEl, this.backdropEl, this.placement);\n }\n return;\n }\n const animationBuilder = this.closeAnimation || sidebarCloseAnimation;\n if (this.sidebarEl && this.backdropEl) {\n return animationBuilder(this.sidebarEl, this.backdropEl, this.placement);\n }\n }\n\n private getBackdroprAttributes(): Partial {\n const attributes: Partial = this.visible ? {} : { hidden: true };\n\n return attributes;\n }\n\n render() {\n return (\n \n {\n this.backdropEl = el;\n }}\n {...this.getBackdroprAttributes()}\n onClick={() => this.hide()}\n >\n {\n this.sidebarEl = el;\n }}\n class=\"sy-sidebar\"\n style={{ visibility: this.visible ? '' : 'hidden' }}\n >\n \n \n \n );\n }\n}\n","@import '../../../../styles/reboot/mixins';\n@import 'classes';\n","import { Component, Host, h } from '@stencil/core';\n\n/**\n * @slot - Designed to fill sidebar body's content.\n */\n\n@Component({\n tag: 'sy-sidebar-content',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class SidebarContent {\n render() {\n return (\n \n \n \n );\n }\n}\n","@import '../../../../styles/reboot/mixins';\n@import 'classes';\n","import { Component, Host, h } from '@stencil/core';\n\n/**\n * @slot - Designed to fill sidebar footer's content.\n */\n\n@Component({\n tag: 'sy-sidebar-footer',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class SidebarFooter {\n render() {\n return (\n \n \n \n );\n }\n}\n","import { Component, Host, h } from '@stencil/core';\n\n/**\n * @slot - Designed to fill sidebar header's content.\n */\n\n@Component({\n tag: 'sy-sidebar-header',\n styleUrl: '',\n shadow: true,\n})\nexport class SidebarHeader {\n render() {\n return (\n \n \n \n );\n }\n}\n","@import '../../../styles/reboot/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n tag: 'sy-skeleton',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class Skeleton {\n private items: number[] = [];\n\n /**\n * Number of skeleton children to render in component\n */\n @Prop() count = 1;\n\n /**\n * Animation type\n */\n @Prop() animation: 'shimmer' | 'pulse' | 'none' = 'shimmer';\n\n /**\n * Direction to render skeleton children in component\n */\n @Prop() direction: 'row' | 'column' = 'column';\n\n componentWillRender() {\n this.items = new Array(this.count);\n this.items.fill(1);\n }\n\n render() {\n return (\n \n {this.items.map((_, index) => {\n return (\n \n );\n })}\n \n );\n }\n}\n","@import '../../../../styles/reboot/mixins';\n@import 'classes';\n","import { Component, Host, h, Prop } from '@stencil/core';\n\n/**\n * @slot - Designed to replace the standard step content.\n */\n@Component({\n tag: 'sy-step',\n styleUrl: './scss/index.scss',\n shadow: true,\n})\nexport class Step {\n /**\n * Step state\n */\n @Prop({ reflect: true }) state: 'done' | 'active' | 'error' | 'to-do' = 'to-do';\n\n /**\n * Step label\n */\n @Prop() label: string;\n\n private getIconState() {\n if (this.state === 'to-do') {\n return ;\n }\n\n if (this.state === 'active') {\n return ;\n }\n\n if (this.state === 'done') {\n return ;\n }\n\n if (this.state === 'error') {\n return ;\n }\n }\n\n render() {\n return (\n \n \n {this.getIconState()} {this.label}\n \n \n );\n }\n}\n","@import 'tokens';\n@import '../../../styles/tokens';\n@import '../../../styles/breakpoints';\n@import '../../../styles/reboot/mixins';\n@import 'classes';\n","import { Component, Host, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'sy-stepper',\n styleUrls: ['./scss/index.scss', './scss/tokens.scss'],\n shadow: true,\n})\nexport class Stepper {\n /**\n * Defines whether the stepper should be rendered vertically. On mobile, the stepper will always be rendered vertically.\n */\n @Prop({ reflect: true }) vertical = false;\n\n render() {\n return (\n \n \n \n );\n }\n}\n","@import '../../../styles/reboot/mixins';\n@import 'classes';\n","import { Component, Host, h, Prop } from '@stencil/core';\nimport { AnchorInterface, generateAnchorAttributes, openURL } from '../../utils/elements-interface';\n\n/**\n * @slot - Designed to receive anchored content.\n */\n@Component({\n tag: 'sy-stretched-link',\n styleUrl: 'scss/index.scss',\n shadow: true,\n})\nexport class StretchedLink implements AnchorInterface {\n /**\n HTML download attribute\n */\n @Prop() download: string | undefined;\n\n /**\n * HTML href attribute\n */\n @Prop() href: string | undefined;\n\n /**\n * HTML rel attribute\n */\n @Prop() rel: string | undefined;\n\n /**\n * HTML target attribute\n */\n @Prop() target: '_blank' | '_self' | '_parent' | '_top' = '_blank';\n\n private onClick = (ev: Event) => {\n openURL(this.href, ev);\n };\n\n render() {\n return (\n \n \n \n \n \n );\n }\n}\n","@import '../../../styles';\n@import '../../../styles/reboot/mixins';\n@import '../../../styles/typography/mixins';\n@import '../../../styles/states/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, h, Method, Prop, Element, Event, EventEmitter } from '@stencil/core';\nimport { AnchorInterface, generateAnchorAttributes, openURL } from '../../utils/elements-interface';\n\n/**\n * @slot icon - Designed to receive tag's icon, placed on left side.\n * @slot - Designed to receive tag's text content\n */\n\n@Component({\n tag: 'sy-tag',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class SyTag implements AnchorInterface {\n @Element() el: HTMLSyTagElement;\n\n /**\n HTML download attribute\n */\n @Prop() download: string | undefined;\n\n /**\n * HTML href attribute\n */\n @Prop({ reflect: true }) href: string | undefined;\n\n /**\n * HTML rel attribute\n */\n @Prop() rel: string | undefined;\n\n /**\n * HTML target attribute\n */\n @Prop() target: '_blank' | '_self' | '_parent' | '_top';\n\n /**\n * Sets tag's color based on system's colors\n */\n @Prop({ reflect: true }) color: 'primary' | 'accent' | 'error' | 'warning' | 'success' | 'info';\n\n /**\n * If true, the tag can be dimissed by clicking in the close button.\n */\n @Prop({ reflect: true }) dismissible = false;\n\n /**\n * Sets tag's disabled state\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * Emitted when the component dismiss\n */\n @Event() syTagDidDismiss: EventEmitter;\n\n /**\n * Method to dismiss a tag. It will remove the tag from DOM.\n */\n @Method()\n async dismiss(): Promise {\n if (this.dismissible) {\n this.syTagDidDismiss.emit();\n this.el.remove();\n }\n }\n\n private handleClick = (event: Event) => {\n if (!this.dismissible && this.href) {\n openURL(this.href, event);\n }\n };\n\n render() {\n return (\n \n {!this.dismissible && this.href ? (\n \n \n \n \n ) : (\n
\n \n \n {this.dismissible && !this.disabled && (\n this.dismiss()}>\n )}\n
\n )}\n \n );\n }\n}\n","@import '../../../styles/reboot/mixins';\n@import '../../../styles/typography/mixins';\n@import 'tokens';\n@import 'variables';\n@import 'classes';\n","import { Component, Host, h, Prop } from '@stencil/core';\n\n/**\n * @slot - Designed to receive the text you want to display.\n */\n@Component({\n tag: 'sy-text',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class Text {\n private tagType = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n h6: 'h6',\n body: 'span',\n small: 'small',\n code: 'pre',\n lead: 'p',\n };\n\n /**\n * Sets the text type.\n */\n @Prop({ reflect: true }) type: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'body' | 'small' | 'code' | 'lead' = 'body';\n\n /**\n * Sets the text weight to bold.\n */\n @Prop({ reflect: true }) bold = false;\n\n /**\n * Sets the text style to italic.\n */\n @Prop({ reflect: true }) italic = false;\n\n /**\n * Sets the font stretch to condensed.\n */\n @Prop({ reflect: true }) condensed = false;\n\n /**\n * Sets the text style to underline.\n */\n @Prop({ reflect: true }) underline = false;\n\n /**\n * Sets the text style to strikethrough.\n */\n @Prop({ reflect: true }) strikethrough = false;\n\n render() {\n const TextTag = this.tagType[this.type] || 'span';\n return (\n \n \n \n \n \n );\n }\n}\n","@import '../../../../styles/reboot/mixins';\n@import '../../../../styles/typography/mixins';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, h, Prop, Method, Event, EventEmitter, Element } from '@stencil/core';\n\n/**\n * @slot - Toast message content.\n */\n@Component({\n tag: 'sy-toast',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class Toast {\n private isClosed = false;\n\n private timeoutInstance: any;\n\n private pauseTimeFunction: any;\n\n private extendTimeFunction: any;\n\n private typesIcons: any = {\n error: 'remove-circle',\n warning: 'alert-circle',\n success: 'check-circle-1',\n info: 'information-circle',\n };\n\n @Element() el: HTMLSyToastElement;\n\n /**\n * Type of toast. Sets the icon type and color.\n */\n @Prop({ reflect: true }) type: 'error' | 'warning' | 'success' | 'info';\n\n /**\n * If true, the toast can be dimissed by clicking in the close button.\n */\n @Prop({ reflect: true }) dismissable = false;\n\n /**\n * Defines if the toast will expire after some time.\n */\n @Prop({ reflect: true }) expirable = false;\n\n /**\n * Defines the time in ms that will take to the toast disappear.\n */\n @Prop({ reflect: true }) expirationTime = 3000;\n\n /**\n * Defines the time in ms that will take to the toast disappear if it has been hovered.\n */\n @Prop({ reflect: true }) extendedTime = 10000;\n\n /**\n * Emitted after toast is closed.\n */\n @Event() syToastDidClose: EventEmitter;\n\n /**\n * Emitted after toast is expired.\n */\n @Event() syToastDidExpire: EventEmitter;\n\n /**\n * Method responsible for closing the toast\n */\n @Method()\n async dismiss(expired?: boolean): Promise {\n if (expired) {\n this.syToastDidExpire.emit();\n } else {\n this.syToastDidClose.emit();\n }\n this.el.remove();\n this.isClosed = true;\n }\n\n /**\n * Method responsible for pausing expiration time\n */\n @Method()\n async pauseTime(): Promise {\n if (!this.isClosed && this.expirable) {\n clearTimeout(this.timeoutInstance);\n }\n }\n\n /**\n * Method responsible for extending the expiration time\n */\n @Method()\n async extendTime(): Promise {\n if (!this.isClosed && this.expirable) {\n clearTimeout(this.timeoutInstance);\n this.timeoutInstance = setTimeout(() => this.dismiss(true), this.extendedTime);\n }\n }\n\n componentDidLoad() {\n if (!this.isClosed && this.expirable) {\n this.timeoutInstance = setTimeout(() => this.dismiss(true), this.expirationTime);\n\n this.extendTimeFunction = this.extendTime.bind(this);\n this.pauseTimeFunction = this.pauseTime.bind(this);\n\n this.el.addEventListener('mouseleave', this.extendTimeFunction);\n this.el.addEventListener('mouseenter', this.pauseTimeFunction);\n }\n }\n\n disconnectedCallback() {\n if (this.el.isConnected) return;\n\n clearTimeout(this.timeoutInstance);\n\n this.el.removeEventListener('mouseleave', this.extendTimeFunction);\n this.el.removeEventListener('mouseenter', this.pauseTimeFunction);\n }\n\n render() {\n return (\n \n
\n \n
\n \n
\n
\n {this.dismissable && this.dismiss()}>}\n
\n );\n }\n}\n","@import '../../../styles/reboot/mixins';\n@import '../../../styles/variables';\n@import '../../../styles/z-index';\n@import 'tokens';\n@import './classes';\n","import { Component, Host, h, Prop, Element } from '@stencil/core';\n\n/**\n * @slot - Slot to add toast components to the container.\n */\n@Component({\n tag: 'sy-toast-container',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class ToastContainer {\n @Element() el: HTMLSyToastContainerElement;\n\n /**\n * Defines the placement of the container inside its parent.\n */\n @Prop({ reflect: true }) placement:\n | 'left-top'\n | 'center-top'\n | 'right-top'\n | 'left-bottom'\n | 'center-bottom'\n | 'right-bottom';\n\n render() {\n return (\n \n \n \n );\n }\n}\n","import { Animation } from '@ionic/core';\nimport { fadeIn } from '../../../utils/animations';\n\nexport function tooltipOpenAnimation(element: HTMLElement): Animation {\n return fadeIn().duration(250).addElement(element);\n}\n","import { Animation } from '@ionic/core';\nimport { tooltipOpenAnimation } from './open';\n\nexport function tooltipCloseAnimation(element: HTMLElement): Animation {\n return tooltipOpenAnimation(element).direction('reverse');\n}\n","@import '../../../styles/reboot/mixins';\n@import '../../../styles/typography/mixins';\n@import '../../../styles/z-index';\n@import 'tokens';\n@import 'classes';\n","import { Component, Host, Prop, Method, Event, EventEmitter, h, Element, Watch } from '@stencil/core';\nimport { createPopper } from '@popperjs/core';\nimport { floatingElements } from '../../utils/floating-elements.utils';\nimport { Animation } from '@ionic/core';\nimport { tooltipOpenAnimation } from './animations/open';\nimport { tooltipCloseAnimation } from './animations/close';\nimport { DISABLE_ANIMATION_VALUE } from '../../utils/animations';\nimport { ElementOrSelector } from '../../utils/types/common-props.types';\n\nexport declare type Placement = 'top' | 'bottom' | 'right' | 'left' | 'auto';\n\nconst CURSOR_ANCHOR_NAME = 'cursor';\n\nexport declare type VirtualElement = {\n getBoundingClientRect: () => DOMRect;\n contextElement?: Element;\n};\n\n/**\n * @slot - Designed to add custom content inside the tooltip.\n */\n@Component({\n tag: 'sy-tooltip',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class Tooltip {\n private cursorPosition: {\n x: number;\n y: number;\n } | null;\n\n private currentAnimation: Animation | undefined;\n\n /**\n * Popper instance.\n */\n private popper: any;\n\n /**\n * Element that will anchor the tooltip\n * Virtual element that allows to position the popper relative to a virtual area defined by any coordinates\n */\n private anchor: Element | VirtualElement | null;\n\n /**\n * Element that will trigger the tooltip\n */\n private triggerElement: Element | null;\n\n /**\n * ID of the last timeout\n */\n private delayTimeoutId: any;\n\n /**\n * Reference to function that will show the tooltip\n */\n private showHandlerFunc: any;\n\n /**\n * Reference to function that will hide the tooltip\n */\n private hideHandlerFunc: any;\n\n /**\n * Reference to function that will toggle the tooltip\n */\n private toggleHandlerFunc: any;\n\n /**\n * Reference to function that will track the cursor and touch movement\n */\n private mouseHandlerFunc: any;\n\n /**\n * Array with handlers that will make the tooltip visible\n */\n private showHandlersArr: Array;\n\n /**\n * Array with handlers that will make the tooltip hidden\n */\n private hideHandlersArr: Array;\n\n /**\n * Array with handlers that are being used both to hide and show the tooltip.\n */\n private toggleHandlersArr: Array;\n\n @Element() el: HTMLSyTooltipElement;\n\n /**\n * Sets tooltip's type.\n * If 'default', it sets the host element style to the default tooltip style.\n * If 'none', the host element won't have style.\n */\n @Prop({ reflect: true }) tooltipStyle: 'default' | 'none' = 'default';\n\n /**\n * Optional custom animation to replace the default and be played when the component starts opening.\n * If 'none', the tooltip won't have open animation.\n */\n @Prop() openAnimation?: ((element: HTMLElement) => Animation) | string;\n\n /**\n * Optional custom animation to replace the default and be played when the component starts closing.\n * If 'none', the tooltip won't have close animation.\n */\n @Prop() closeAnimation?: ((element: HTMLElement) => Animation) | string;\n\n /**\n * Disables all animations\n */\n @Prop() disableAnimations = false;\n\n /**\n * Text displayed in tooltip.\n */\n @Prop() label: string;\n\n /**\n * Position of the tooltip in relation to the anchor element.\n * If there is no space for such placement, it will use the closest one available.\n * If set to \"auto\", defines automatically the position, based on the available space.\n */\n @Prop({ reflect: true }) placement: Placement = 'auto';\n\n /**\n * Sets the delay in ms to show / hide the tooltip. It is possible to define differents values to each action.\n */\n @Prop({ reflect: true }) delay: number | { show: number; hide: number } = 100;\n\n /**\n * Element or selector of the element that will be the anchor of the tooltip\n * If it is not set, the parent element will be the anchor.\n */\n @Prop({ reflect: true }) for?: ElementOrSelector | 'cursor' | undefined;\n\n /**\n * Element or selector of the element that will trigger the tooltip\n * If it is not set, the anchor will be trigger.\n * If it is not set and the anchor is set to 'cursor', the trigger will be the parent element\n */\n\n @Prop() trigger?: ElementOrSelector | undefined;\n\n /**\n * List of handlers that will make the tooltip visible. Use ',' to declare multiple handlers.\n */\n @Prop({ reflect: true }) showHandlers = 'mouseenter';\n\n /**\n * List of handlers that will hide the tooltip. Use ',' to declare multiple handlers.\n */\n @Prop({ reflect: true }) hideHandlers = 'mouseleave';\n\n @Watch('for')\n @Watch('trigger')\n @Watch('showHandlers')\n @Watch('hideHandlers')\n forHandlerWatcher(): void {\n this.removeCursorHandler();\n this.removeAnchorHandler();\n this.setAnchorAndTrigger();\n }\n\n /**\n * If true, the tooltip is visible\n */\n @Prop({ mutable: true, reflect: true }) visible = false;\n\n /**\n * Emitted after tooltip has become visible.\n */\n @Event() syTooltipDidOpen: EventEmitter;\n\n /**\n * Emitted after tooltip has become hidden.\n */\n @Event() syTooltipDidClose: EventEmitter;\n\n /**\n * Emitted when a tooltip starts to hide.\n */\n @Event() syTooltipWillHide: EventEmitter;\n\n /**\n * Emitted when a tooltip starts to show.\n */\n @Event() syTooltipWillShow: EventEmitter;\n\n componentDidRender() {\n if (this.visible) {\n this.popper?.update();\n }\n }\n\n componentDidLoad() {\n this.setAnchorAndTrigger();\n }\n\n disconnectedCallback() {\n if (this.el.isConnected) return;\n this.removeCursorHandler();\n this.removeAnchorHandler();\n }\n\n /**\n * Method responsible for making the tooltip visible.\n * If 'instant' is true, the tooltip won't have open animation.\n * @param delay Number of milliseconds to wait before changing the visibility.\n */\n @Method()\n async show(instant = false): Promise {\n // Adds cursor handler before showing the tooltip\n if (!this.cursorPosition && this.triggerElement && this.for === CURSOR_ANCHOR_NAME) {\n this.addCursorHandler();\n return;\n }\n clearTimeout(this.delayTimeoutId);\n this.delayTimeoutId = setTimeout(\n async () => {\n if (this.visible || !this.anchor || !this.triggerElement) return;\n\n this.syTooltipWillShow.emit();\n this.visible = true;\n await floatingElements.open(this.el);\n\n this.popper = createPopper(this.anchor, this.el, this.getPopperConfig());\n\n this.syTooltipDidOpen.emit();\n\n if (this.currentAnimation) {\n this.currentAnimation.stop();\n }\n\n if (((typeof instant === 'boolean' && !instant) || typeof instant !== 'boolean') && !this.disableAnimations) {\n this.currentAnimation = this.getOpenAnimation();\n if (this.currentAnimation) {\n await this.currentAnimation.play();\n }\n }\n },\n typeof this.delay === 'object' ? this.delay.show : this.delay,\n );\n }\n\n /**\n * Method responsible for making the tooltip hidden.\n * If 'instant' is true, the tooltip won't have close animation.\n * @param delay Number of milliseconds to wait before changing the visibility.\n */\n @Method()\n async hide(instant = false): Promise {\n // Removes cursor handler before hiding the tooltip\n this.removeCursorHandler();\n clearTimeout(this.delayTimeoutId);\n this.delayTimeoutId = setTimeout(\n async () => {\n if (!this.visible) return;\n\n if (this.currentAnimation) {\n this.currentAnimation.stop();\n }\n\n this.syTooltipWillHide.emit();\n\n if (((typeof instant === 'boolean' && !instant) || typeof instant !== 'boolean') && !this.disableAnimations) {\n this.currentAnimation = this.getCloseAnimation();\n if (this.currentAnimation) {\n await this.currentAnimation.play();\n }\n }\n\n if (this.popper) {\n this.popper.destroy();\n }\n this.visible = false;\n floatingElements.close(this.el);\n this.syTooltipDidClose.emit();\n },\n typeof this.delay === 'object' ? this.delay.hide : this.delay,\n );\n }\n\n /**\n * Responsible for making the tooltip visible if it is hidden and hide it if it is visible.\n */\n @Method()\n async toggle(instant = false): Promise {\n if (this.visible) {\n this.hideHandlerFunc(instant);\n } else {\n this.showHandlerFunc(instant);\n }\n }\n\n private generateGetBoundingClientRect(x = 0, y = 0): any {\n return () => ({\n width: 0,\n height: 0,\n top: y,\n right: x,\n bottom: y,\n left: x,\n });\n }\n\n private getOpenAnimation() {\n if (typeof this.openAnimation === 'string') {\n return this.openAnimation === DISABLE_ANIMATION_VALUE ? undefined : tooltipOpenAnimation(this.el);\n }\n const animationBuilder = this.openAnimation || tooltipOpenAnimation;\n return animationBuilder(this.el);\n }\n\n private getCloseAnimation() {\n if (typeof this.closeAnimation === 'string') {\n return this.closeAnimation === DISABLE_ANIMATION_VALUE ? undefined : tooltipCloseAnimation(this.el);\n }\n const animationBuilder = this.closeAnimation || tooltipCloseAnimation;\n return animationBuilder(this.el);\n }\n\n private setAnchorAndTrigger() {\n try {\n if (typeof this.for === 'string') {\n this.anchor =\n this.for === CURSOR_ANCHOR_NAME\n ? {\n getBoundingClientRect: this.generateGetBoundingClientRect(),\n contextElement: undefined,\n }\n : (this.el.getRootNode() as Element).querySelector(this.for) || this.el.parentElement;\n } else {\n this.anchor = this.for || this.el.parentElement;\n }\n } catch (err) {\n console.error(`Error fetching anchor element - ${err}`, this.el);\n }\n\n this.setTrigger();\n\n if (this.triggerElement) {\n this.addAnchorHandler();\n }\n }\n\n private setTrigger(): void {\n try {\n if (this.for === CURSOR_ANCHOR_NAME) {\n this.setTriggerElement(this.el.parentElement);\n } else {\n this.setTriggerElement(this.anchor);\n }\n } catch (err) {\n console.error(`Error fetching trigger element - ${err}`, this.el);\n }\n if (this.anchor && this.for === CURSOR_ANCHOR_NAME) {\n (this.anchor as VirtualElement).contextElement = this.triggerElement as Element;\n }\n }\n\n private setTriggerElement(elseReturn: any) {\n if (typeof this.trigger === 'string') {\n this.triggerElement = (this.el.getRootNode() as Element).querySelector(this.trigger) || elseReturn;\n } else {\n this.triggerElement = this.trigger || elseReturn;\n }\n }\n\n private addAnchorHandler() {\n this.showHandlerFunc = this.show.bind(this);\n this.hideHandlerFunc = this.hide.bind(this);\n this.toggleHandlerFunc = this.toggle.bind(this);\n\n this.showHandlersArr = this.showHandlers.split(',').map((str) => str.trim());\n this.hideHandlersArr = this.hideHandlers.split(',').map((str) => str.trim());\n\n // Handlers that are both being used in show and hide, will be treated as toggle.\n this.toggleHandlersArr = this.showHandlersArr.filter((handler) => this.hideHandlersArr.includes(handler));\n this.showHandlersArr = this.showHandlersArr.filter((handler) => !this.toggleHandlersArr.includes(handler));\n this.hideHandlersArr = this.hideHandlersArr.filter((handler) => !this.toggleHandlersArr.includes(handler));\n\n this.showHandlersArr.forEach((handler) => {\n this.triggerElement?.addEventListener(handler, this.showHandlerFunc);\n });\n\n this.hideHandlersArr.forEach((handler) => {\n this.triggerElement?.addEventListener(handler, this.hideHandlerFunc);\n });\n\n this.toggleHandlersArr.forEach((handler) => {\n this.triggerElement?.addEventListener(handler, this.toggleHandlerFunc);\n });\n }\n\n private removeAnchorHandler() {\n clearTimeout(this.delayTimeoutId);\n\n if (this.triggerElement) {\n this.showHandlersArr.forEach((handler) => {\n this.triggerElement?.removeEventListener(handler, this.showHandlerFunc);\n });\n\n this.hideHandlersArr.forEach((handler) => {\n this.triggerElement?.removeEventListener(handler, this.hideHandlerFunc);\n });\n\n this.toggleHandlersArr.forEach((handler) => {\n this.triggerElement?.removeEventListener(handler, this.toggleHandlerFunc);\n });\n }\n }\n\n private addCursorHandler() {\n this.mouseHandlerFunc = this.updateTooltipPosition.bind(this);\n this.triggerElement?.addEventListener('mousemove', this.mouseHandlerFunc);\n this.triggerElement?.addEventListener('touchmove', this.mouseHandlerFunc);\n }\n\n private removeCursorHandler() {\n this.cursorPosition = null;\n this.triggerElement?.removeEventListener('mousemove', this.mouseHandlerFunc);\n this.triggerElement?.removeEventListener('touchmove', this.mouseHandlerFunc);\n }\n\n private updateTooltipPosition({ clientX: x, clientY: y }) {\n if (!this.cursorPosition) {\n this.cursorPosition = { x, y };\n if (this.anchor) {\n this.anchor.getBoundingClientRect = this.generateGetBoundingClientRect(x, y);\n }\n this.show();\n return;\n }\n if (!this.anchor) {\n return;\n }\n this.anchor.getBoundingClientRect = this.generateGetBoundingClientRect(x, y);\n this.popper?.update();\n }\n\n private getTooltipAttributes() {\n const attributes: any = {\n role: 'tooltip',\n };\n return attributes;\n }\n\n private getPopperConfig(): any {\n const defaultPopperConfig: any = {\n placement: this.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, 4],\n },\n },\n ],\n };\n\n if (this.for !== CURSOR_ANCHOR_NAME) {\n defaultPopperConfig.strategy = 'fixed';\n }\n\n return {\n ...defaultPopperConfig,\n };\n }\n\n render() {\n return (\n \n {this.label}\n \n \n );\n }\n}\n","@import '../../../styles/reboot/mixins';\n@import 'classes';\n","import { Component, Host, h, Listen, Watch, Element, Prop, Method } from '@stencil/core';\nimport { Debounce } from '../../utils/decorators/debounce/debounce.decorator';\nimport { DescendantsObserver } from '../../utils/descendants-observer';\n\n/**\n * @slot - Tree content.\n */\n@Component({\n tag: 'sy-tree',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class Tree {\n private descendantsObserver: DescendantsObserver;\n\n @Element() el: HTMLSyTreeElement;\n\n /**\n * If true, when a leaf is activated all parents are activated too.\n */\n @Prop({ reflect: true }) activePath = false;\n\n /**\n * Sets arrow icon to display on the start or end of the tree node.\n */\n @Prop({ reflect: true }) alignArrow: 'start' | 'end' = 'start';\n\n /**\n * Disables all animations from all items\n */\n @Prop() disableAnimations = false;\n @Watch('disableAnimations')\n disableAnimationsWatcher(): void {\n this.setChildrenDisableAnimations();\n }\n\n componentWillLoad() {\n this.descendantsObserver = new DescendantsObserver('sy-tree-node', (array: Array) => {\n this.setDisableAnimation(array);\n });\n\n this.descendantsObserver.observe(this.el, {\n childList: true,\n subtree: true,\n });\n }\n\n componentDidLoad() {\n this.setChildrenDisableAnimations();\n }\n\n disconnectedCallback() {\n if (this.el.isConnected) return;\n\n this.descendantsObserver?.disconnect();\n }\n\n @Listen('syTreeNodeDidActivate')\n onSyTreeNodeDidActivate(e: any): void {\n const activeNode: HTMLElement = e.target;\n this.el.querySelectorAll('sy-tree-node').forEach((node: HTMLSyTreeNodeElement) => {\n if ((this.activePath && node.contains(activeNode)) || node === activeNode) {\n node.activate(false);\n } else {\n node.deactivate(false);\n }\n });\n }\n\n @Listen('syTreeNodeDidExpand')\n onSyTreeNodeDidExpand(e: any): void {\n const expandedNode: HTMLElement = e.target;\n this.el.querySelectorAll('sy-tree-node[type=inner-node]').forEach((node: HTMLSyTreeNodeElement) => {\n if (!node.contains(expandedNode) && node === expandedNode) {\n node.collapse(false, this.disableAnimations);\n }\n });\n }\n\n /**\n * Returns all the active tree-nodes\n */\n @Method()\n async getActiveNodes(): Promise> {\n return this.el.querySelectorAll('sy-tree-node[active]');\n }\n\n /**\n * Returns the active leaf\n */\n @Method()\n async getActiveLeaf(): Promise {\n return this.el.querySelector('sy-tree-node[active][type=leaf]') as HTMLSyTreeNodeElement;\n }\n\n /**\n * Set a node as active\n * @param node selector | HTMLSyTreeNodeElement\n */\n @Method()\n async setActiveNode(node: string | HTMLSyTreeNodeElement): Promise {\n let element: HTMLSyTreeNodeElement;\n if (typeof node === 'string') {\n element = this.el.querySelector(node) as HTMLSyTreeNodeElement;\n } else {\n element = node;\n }\n\n if (element?.nodeName.toLocaleLowerCase() === 'sy-tree-node') {\n return element.activate();\n }\n }\n\n /**\n * Expand all tree-nodes\n * If instant is true, there won't have open animation in all items.\n */\n @Method()\n async expandAll(instant = false): Promise {\n const promises: Promise[] = [];\n this.el\n .querySelectorAll('sy-tree-node[type=inner-node]')\n .forEach((node: HTMLSyTreeNodeElement) => promises.push(node.expand(false, instant)));\n await Promise.all(promises);\n }\n\n /**\n * Collapse all tree-nodes\n * If instant is true, there won't have close animation in all items.\n */\n @Method()\n async collapseAll(instant = false): Promise {\n const promises: Promise[] = [];\n this.el\n .querySelectorAll('sy-tree-node[type=inner-node]')\n .forEach((node: HTMLSyTreeNodeElement) => promises.push(node.collapse(false, instant)));\n await Promise.all(promises);\n }\n\n @Debounce(300)\n private setDisableAnimation(addedTreeNode) {\n addedTreeNode.forEach((treeNode) => {\n if (treeNode.isConnected) {\n treeNode.disableAnimations = this.disableAnimations;\n }\n });\n }\n\n private setChildrenDisableAnimations() {\n this.el.querySelectorAll('sy-tree-node').forEach((item) => {\n item.disableAnimations = this.disableAnimations;\n });\n }\n\n render() {\n return (\n \n \n \n );\n }\n}\n","import { Animation } from '@ionic/core';\nimport { growY } from '../../../../utils/animations';\n\nexport function treeNodeOpenAnimation(elements: { node: HTMLElement; child: HTMLElement }): Animation {\n const { child } = elements;\n child.style.display = 'block';\n const height = child.offsetHeight;\n child.style.display = '';\n return (growY({ from: '0px', to: `${height}px` }) as Animation).addElement(child);\n}\n","import { Animation } from '@ionic/core';\nimport { treeNodeOpenAnimation } from './open';\n\nexport function treeNodeCloseAnimation(elements: { node: HTMLElement; child: HTMLElement }): Animation {\n return treeNodeOpenAnimation(elements).direction('reverse');\n}\n","@import '../../../../styles/reboot/mixins';\n@import '../../../../styles/typography/mixins';\n@import 'tokens';\n@import 'mixins';\n@import 'classes';\n","import { Component, Host, h, Prop, Element, EventEmitter, Event, Method, Watch } from '@stencil/core';\nimport { treeNodeOpenAnimation } from './animations/open';\nimport { Animation } from '@ionic/core';\nimport { treeNodeCloseAnimation } from './animations/close';\nimport { AnchorInterface, generateAnchorAttributes } from '../../../utils/elements-interface';\nimport { DISABLE_ANIMATION_VALUE } from '../../../utils/animations';\n\nconst CHILD_SLOT = 'child';\n\n/**\n * @slot - Tree node content\n * @slot child - Tree node child. Should be used in tree-node elements. Ex: ` (...)`\n */\n@Component({\n tag: 'sy-tree-node',\n styleUrls: ['scss/index.scss', 'scss/_tokens.scss'],\n shadow: true,\n})\nexport class TreeNode implements AnchorInterface {\n /**\n * Internal boolean to indicate when the property `expanded` was modified externally.\n */\n private internalExpanded: boolean;\n private typeDefinedByUser: boolean;\n private currentAnimation: Animation | undefined;\n private childElement: HTMLElement | undefined;\n\n /**\n * MutationObserver used in handleSlotChange function\n */\n private slotObserver: MutationObserver;\n\n @Element() el: HTMLSyTreeNodeElement;\n\n /**\n * Indicate if the node is an inner node (has child) or leaf.\n * It is calculated automatically, however it can be setted to force a behaviour, e.g. lazy load nodes.\n */\n @Prop({ mutable: true, reflect: true }) type: 'inner-node' | 'leaf';\n\n /**\n * Indicates the deep level the node has in the tree. The first level is 0.\n */\n @Prop({ mutable: true, reflect: true }) level: number;\n\n /**\n * Indicate if the node is expanded.\n */\n @Prop({ mutable: true, reflect: true }) expanded: boolean;\n\n /**\n * List item HTML href atribute.\n */\n @Prop({ reflect: true }) href: string | undefined;\n\n /**\n * List item HTML download attribute.\n */\n @Prop() download: string | undefined;\n\n /**\n * List item HTML rel attribute.\n */\n @Prop() rel: string | undefined;\n\n /**\n * List item HTML target attribute.\n */\n @Prop() target: '_blank' | '_self' | '_parent' | '_top';\n\n @Watch('expanded')\n expandedWatcher(): Promise | undefined {\n if (this.expanded === this.internalExpanded) return;\n\n if (this.expanded) {\n return this.expand();\n }\n\n return this.collapse();\n }\n\n /**\n * Indicate if the node is active.\n */\n @Prop({ mutable: true, reflect: true }) active: boolean;\n\n /**\n * Indicate if the node is disabled.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * Optional custom animation to replace the default and be played when the component starts opening.\n * If 'none', the tree-node won't have open animation.\n */\n @Prop() openAnimation?: ((elements: { node: HTMLElement; child: HTMLElement }) => Animation) | string;\n\n /**\n * Optional custom animation to replace the default and be played when the component starts closing.\n * If 'none', the tree-node won't have close animation.\n */\n @Prop() closeAnimation?: ((elements: { node: HTMLElement; child: HTMLElement }) => Animation) | string;\n\n /**\n * Disables all animations\n */\n @Prop() disableAnimations = false;\n\n /**\n * Emitted after a tree node is expanded.\n */\n @Event() syTreeNodeDidExpand: EventEmitter;\n\n /**\n * Emitted after a tree node is activated.\n */\n @Event() syTreeNodeDidActivate: EventEmitter;\n\n componentWillLoad() {\n this.typeDefinedByUser = !!this.type;\n this.handleSlotChange();\n }\n\n componentWillRender() {\n if (this.typeDefinedByUser === false) {\n this.type = this.el.querySelector(`[slot='${CHILD_SLOT}']`) ? 'inner-node' : 'leaf';\n }\n this.level =\n this.el.parentElement && this.el.parentElement.localName === 'sy-tree-node'\n ? (this.el.parentElement as HTMLSyTreeNodeElement).level + 1\n : 0;\n this.active = this.active && !this.disabled;\n }\n\n componentDidLoad() {\n if (this.active && this.type === 'leaf') {\n this.syTreeNodeDidActivate.emit(this.active);\n }\n }\n\n disconnectedCallback() {\n if (this.el.isConnected) return;\n this.slotObserver?.disconnect();\n }\n\n /**\n * Returns the imediate child tree-nodes.\n */\n @Method()\n async getChildren(): Promise | null> {\n if (this.type === 'leaf') {\n return null;\n }\n\n return this.el.querySelectorAll(`:scope > sy-tree-node`);\n }\n\n /**\n * Returns the parent tree-node.\n */\n @Method()\n getParent(): Promise {\n if (this.el.parentElement?.nodeName === this.el.nodeName) {\n return Promise.resolve(this.el.parentElement as HTMLSyTreeNodeElement);\n }\n\n return Promise.resolve(null);\n }\n\n /**\n * Activate the tree-node.\n */\n @Method()\n async activate(emit = true): Promise {\n if (!this.active && !this.disabled) {\n this.active = true;\n if (emit) {\n this.syTreeNodeDidActivate.emit(this.active);\n }\n }\n }\n\n /**\n * Deactivate the tree-node.\n */\n @Method()\n async deactivate(emit = true): Promise {\n if (this.active) {\n this.active = false;\n if (emit) {\n this.syTreeNodeDidActivate.emit(this.active);\n }\n }\n }\n\n /**\n * Toggle expanded state.\n */\n @Method()\n async toggleExpand(emit = true, instant = false): Promise {\n if (this.type === 'inner-node' && !this.disabled) {\n if (this.expanded) {\n return this.collapse(emit, instant);\n }\n\n return this.expand(emit, instant);\n }\n }\n\n /**\n * Expand the tree-node.\n * If 'instant' is true, the tree node won't have open animation.\n */\n @Method()\n async expand(emit = true, instant = false): Promise {\n const isAlreadyExpanded = this.expanded && this.internalExpanded;\n if (this.type === 'inner-node' && !isAlreadyExpanded && !this.disabled) {\n this.internalExpanded = true;\n this.expanded = true;\n if (this.currentAnimation) {\n this.currentAnimation.stop();\n }\n\n if (!instant && !this.disableAnimations) {\n this.currentAnimation = this.getOpenAnimation();\n if (this.currentAnimation) {\n await this.currentAnimation.play();\n }\n }\n\n if (emit) {\n this.syTreeNodeDidExpand.emit(this.expanded);\n }\n }\n }\n\n /**\n * Collapse the tree-node.\n * If 'instant' is true, the tree node won't have close animation.\n */\n @Method()\n async collapse(emit = true, instant = false): Promise {\n const isAlreadyCollapsed = !this.expanded && !this.internalExpanded;\n if (this.type === 'inner-node' && !isAlreadyCollapsed) {\n this.internalExpanded = false;\n\n if (this.currentAnimation) {\n this.currentAnimation.stop();\n }\n\n if (!instant && !this.disableAnimations) {\n this.currentAnimation = this.getCloseAnimation();\n if (this.currentAnimation) {\n await this.currentAnimation.play();\n }\n }\n\n this.expanded = false;\n if (emit) {\n this.syTreeNodeDidExpand.emit(this.expanded);\n }\n }\n }\n\n private handleSlotChange(): void {\n this.slotObserver = new MutationObserver(() => {\n if (this.typeDefinedByUser) return;\n this.type = this.el.querySelector(`[slot='${CHILD_SLOT}']`) ? 'inner-node' : 'leaf';\n });\n\n this.slotObserver.observe(this.el, {\n childList: true,\n characterData: true,\n });\n }\n\n private handleNodeCLick(e): void {\n const hasDataDisableToggle = e.target.hasAttribute('data-sy-tree-disable-toggle');\n if (hasDataDisableToggle) {\n return;\n }\n\n if (this.type === 'leaf') {\n this.handleLeafClick();\n return;\n }\n\n this.toggleExpand();\n }\n\n private getOpenAnimation() {\n if (typeof this.openAnimation === 'string') {\n if (this.openAnimation === DISABLE_ANIMATION_VALUE) {\n return;\n }\n if (this.childElement) {\n return treeNodeOpenAnimation({ node: this.el, child: this.childElement });\n }\n return;\n }\n const animationBuilder = this.openAnimation || treeNodeOpenAnimation;\n if (this.childElement) {\n return animationBuilder({ node: this.el, child: this.childElement });\n }\n }\n\n private getCloseAnimation() {\n if (typeof this.closeAnimation === 'string') {\n if (this.closeAnimation === DISABLE_ANIMATION_VALUE) {\n return;\n }\n if (this.childElement) {\n return treeNodeCloseAnimation({ node: this.el, child: this.childElement });\n }\n return;\n }\n const animationBuilder = this.closeAnimation || treeNodeCloseAnimation;\n if (this.childElement) {\n return animationBuilder({ node: this.el, child: this.childElement });\n }\n }\n\n private handleLeafClick(): void {\n this.activate();\n }\n\n render() {\n return (\n \n this.handleNodeCLick(e)}\n active={this.active}\n disabled={this.disabled}\n {...generateAnchorAttributes(this)}\n >\n {this.type === 'inner-node' &&\n (this.expanded ? (\n \n ) : (\n \n ))}\n \n \n (this.childElement = ref)}\n style={{ '--sy-tree-node-level': this.level.toString() }}\n >\n \n \n \n );\n }\n}\n"]}