@cscfi/csc-ui 1.0.13 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- import{p as e,b as a}from"./p-9d54e9a4.js";export{s as setNonce}from"./p-9d54e9a4.js";const i=()=>{const a=import.meta.url;const i={};if(a!==""){i.resourcesUrl=new URL(".",a).href}return e(i)};i().then((e=>a(JSON.parse('[["p-37c19431",[[1,"c-data-table",{"data":[16],"externalData":[4,"external-data"],"headers":[16],"hideFooter":[4,"hide-footer"],"footerOptions":[16],"loading":[4],"loadingText":[1,"loading-text"],"noDataText":[1,"no-data-text"],"pagination":[1040],"selectable":[4],"singleSelection":[4,"single-selection"],"selectionProperty":[1,"selection-property"],"singleExpansion":[4,"single-expansion"],"sortBy":[1032,"sort-by"],"sortDirection":[1025,"sort-direction"],"stickyHeader":[4,"sticky-header"],"horizontalScrolling":[4,"horizontal-scrolling"],"_activeRows":[32],"_data":[32],"_isIndeterminate":[32],"_isPaginationSimple":[32],"_selections":[32],"hasOverflow":[32],"hiddenHeaders":[32],"initiallyHiddenHeaders":[32],"forceRender":[32],"breakpoints":[32],"markedFooterWidth":[32],"parentWidth":[32],"firstCellHidden":[32],"lastCellHidden":[32],"clearSelections":[64],"getData":[64]},null,{"hiddenHeaders":["onHiddenHeaderChange"],"data":["onDataChange"],"headers":["onHeaderChange"],"singleSelection":["onSingleSelectionChange"],"loading":["onLoadingChange"]}]]],["p-0f76461d",[[1,"c-navigation-button"]]],["p-a369bf94",[[1,"c-side-navigation",{"mobile":[4],"menuVisible":[1028,"menu-visible"]},[[0,"itemChange","handleChange"]]]]],["p-b65fb982",[[1,"c-tabs",{"value":[1032],"borderless":[4],"disableAnimation":[4,"disable-animation"],"justify":[1],"mobileBreakpoint":[2,"mobile-breakpoint"],"vertical":[4],"isOverflowing":[32],"isMobile":[32],"scrollOffset":[32]},[[1,"tabFocus","tabFocusHandler"],[1,"tabChange","tabChangeHandler"],[2,"keydown","handleKeyDown"],[2,"keyup","handleKeyUp"]],{"justify":["onJustificationChange"],"value":["onExternalValueChange"],"scrollOffset":["onScrollOffsetChange"]}]]],["p-c5deb643",[[1,"c-tag",{"active":[4],"block":[4],"fit":[4],"flat":[4],"closeable":[4],"badge":[8]}]]],["p-7575c2c3",[[65,"c-autocomplete",{"autofocus":[4],"disabled":[4],"hideDetails":[4,"hide-details"],"hint":[1],"hostId":[1,"id"],"shadow":[4],"name":[1],"label":[1],"query":[1025],"value":[1032],"dense":[4],"required":[4],"valid":[4],"validate":[4],"validateOnBlur":[4,"validate-on-blur"],"validation":[1],"placeholder":[1],"returnValue":[4,"return-value"],"items":[16],"itemsPerPage":[2,"items-per-page"],"optionAsSelection":[4,"option-as-selection"],"menuVisible":[32],"currentIndex":[32],"hasOptionItems":[32],"options":[32],"setValue":[64],"onHideMenu":[64],"setActiveDescendant":[64],"updateQuery":[64],"onItemSelection":[64]},[[1,"keydown","handleKeyDown"]],{"items":["watchHandler"],"value":["onValueChange"]}]]],["p-2ff8e8e2",[[65,"c-select",{"autofocus":[4],"disabled":[4],"hideDetails":[4,"hide-details"],"hint":[1],"hostId":[1,"id"],"label":[1],"shadow":[4],"name":[1],"required":[4],"returnValue":[4,"return-value"],"valid":[4],"validate":[4],"validateOnBlur":[4,"validate-on-blur"],"validation":[1],"itemsPerPage":[2,"items-per-page"],"placeholder":[1],"value":[1032],"items":[16],"optionAsSelection":[4,"option-as-selection"],"menuVisible":[32],"currentIndex":[32],"activeListItemId":[32],"statusText":[32],"hasOptionItems":[32],"previousValue":[32],"onItemSelection":[64],"onHideMenu":[64],"setActiveDescendant":[64]},[[2,"keydown","handleKeyDown"]],{"value":["onValueChange"],"validate":["validateChange"],"currentIndex":["onCurrentIndexChange"]}]]],["p-8b7e9097",[[4,"c-swiper",{"value":[1544],"elementId":[1,"id"],"isBeginning":[32],"isEnd":[32],"statusText":[32]},[[0,"changeValue","onTabClick"],[2,"keyup","handleKeyUp"]]]]],["p-0bf28786",[[1,"c-side-navigation-item",{"active":[4],"href":[1],"target":[1],"loading":[4]},[[0,"itemChange","handleChange"]],{"active":["onActiveChange"]}]]],["p-6ec9109d",[[1,"c-sub-navigation-item",{"active":[4],"focusable":[4],"href":[1],"target":[1],"loading":[4]}]]],["p-f0329312",[[65,"c-text-field",{"autofocus":[4],"autocapitalize":[1],"autocorrect":[1],"autocomplete":[1],"disabled":[4],"hideDetails":[4,"hide-details"],"hint":[1],"hostId":[1,"id"],"trimWhitespace":[4,"trim-whitespace"],"label":[1],"max":[2],"min":[2],"name":[1],"number":[4],"placeholder":[1],"readonly":[4],"required":[4],"rows":[2],"shadow":[4],"step":[2],"type":[1],"valid":[4],"validate":[4],"validateOnBlur":[4,"validate-on-blur"],"validation":[1],"value":[1025],"isFocused":[32],"labelWidth":[32],"preSlotWidth":[32],"messageOptions":[32]}]]],["p-14ed80ac",[[1,"c-toasts",{"absolute":[4],"horizontal":[1],"vertical":[1],"messages":[32],"addToast":[64],"removeToast":[64]}]]],["p-9f2311a7",[[1,"c-accordion-item",{"collapsable":[4],"heading":[1],"value":[8],"expanded":[4],"outlined":[4]},[[2,"keydown","handleKeyDown"],[0,"changeValue","stop"]]]]],["p-192145f2",[[1,"c-list-item",{"active":[4],"disabled":[4],"disabledByParent":[4,"disabled-by-parent"],"hoverable":[4],"ripple":[4],"href":[1],"target":[1]},null,{"active":["onActiveChange"]}]]],["p-e970fa68",[[1,"c-login-card-actions",{"align":[1],"justify":[1]}]]],["p-ef6162d9",[[65,"c-otp-input",{"hideDetails":[4,"hide-details"],"hint":[1],"elementId":[1,"id"],"length":[2],"valid":[4],"validation":[1],"statusText":[32]},null,{"validation":["onValidationMessageChange"]}]]],["p-05bb5c30",[[65,"c-radio-group",{"value":[1032],"hideDetails":[4,"hide-details"],"hint":[1],"inline":[4],"label":[1],"color":[1],"items":[16],"disabled":[4],"returnValue":[4,"return-value"],"required":[4],"valid":[4],"validation":[1],"messageOptions":[32]},null,{"validation":["onValidationMessageChange"],"valid":["onValidChange"]}]]],["p-e0c3d13b",[[1,"c-swiper-tab",{"disabled":[4],"active":[4],"label":[1],"hostId":[1,"id"],"setsize":[2],"position":[2],"value":[8]},[[1,"click","onTabClick"]]]]],["p-dea9da0e",[[1,"c-tab",{"active":[4],"disabled":[4],"hostId":[1,"id"],"position":[2],"setsize":[2],"value":[8]},[[1,"focus","onTabFocus"],[1,"keydown","handleKeydown"]]]]],["p-79308b3f",[[1,"c-accordion",{"value":[1032],"mandatory":[4],"multiple":[4],"outlined":[4]},[[1,"itemChange","onAccordionItemChange"]],{"value":["watchPropHandler"]}]]],["p-f4a9cb4d",[[1,"c-alert",{"type":[1]}]]],["p-cea20d08",[[1,"c-card-content"]]],["p-28282ef5",[[1,"c-card-title"]]],["p-b09ba433",[[1,"c-link",{"href":[1],"underline":[4],"target":[1],"weight":[1]}]]],["p-4c23471f",[[0,"c-list",{"disabled":[4]},null,{"disabled":["onDisabledChange"]}]]],["p-6f86810a",[[1,"c-list-item-title",{"active":[4]}]]],["p-a8da163c",[[1,"c-login-button",{"href":[1],"src":[1],"alt":[1]}]]],["p-a8073d7e",[[1,"c-login-buttons"]]],["p-01ed27ec",[[4,"c-login-card",{"backgroundPosition":[1,"background-position"],"mobileBreakpoint":[2,"mobile-breakpoint"],"overlay":[4],"overlayBlendMode":[1,"overlay-blend-mode"],"src":[1],"path":[32],"imageHeight":[32]}]]],["p-55ca2b16",[[1,"c-login-card-content"]]],["p-eb35a668",[[1,"c-login-card-title"]]],["p-ff51acad",[[1,"c-modal",{"value":[4],"dismissable":[4],"width":[8],"zIndex":[2,"z-index"],"innerValue":[32],"animateModal":[32]},null,{"value":["onValueChange"]}]]],["p-2c9aabef",[[1,"c-option",{"selected":[4],"disabled":[4],"name":[1],"value":[8]}]]],["p-c343dd6e",[[1,"c-option-value"]]],["p-93280350",[[1,"c-page",{"scrollIndicator":[4,"scroll-indicator"]}]]],["p-732bc932",[[1,"c-progress-bar",{"value":[2],"hideDetails":[4,"hide-details"],"singleLine":[4,"single-line"],"label":[1],"indeterminate":[4]}]]],["p-c7a07889",[[1,"c-radio",{"checked":[4],"disabled":[4],"value":[1]}]]],["p-cd047753",[[1,"c-side-navigation-title"]]],["p-843b5cdb",[[1,"c-status",{"type":[1]}]]],["p-738a7d1d",[[1,"c-step",{"complete":[4],"current":[4]}]]],["p-c48a6e1d",[[1,"c-steps",{"value":[8],"isMobile":[32],"label":[32]},null,{"value":["watchPropHandler"]}]]],["p-889d3d6d",[[65,"c-switch",{"checked":[1028],"value":[8],"trueValue":[8,"true-value"],"falseValue":[8,"false-value"],"hostDisabled":[4,"disabled"],"hostId":[1,"id"],"required":[4],"hasLabel":[32]}]]],["p-58aed6cc",[[1,"c-tab-buttons",{"value":[1032],"mandatory":[4],"tabs":[4],"size":[1],"hostDisabled":[4,"disabled"]},[[1,"tabFocus","tabFocusHandler"],[2,"keyup","handleKeyUp"],[1,"tabChange","onTabChange"]],{"value":["onValueChange"]}]]],["p-26021965",[[1,"c-tab-item",{"value":[8],"active":[4]}]]],["p-d60032ce",[[1,"c-tab-items",{"value":[8],"disableAnimation":[4,"disable-animation"],"activeTab":[32]},[[1,"contentChange","tabContentChangeHandler"]],{"value":["onValueChange"]}]]],["p-f4d93d05",[[4,"c-table",{"mobileBreakpoint":[2,"mobile-breakpoint"],"responsive":[4]}]]],["p-210da773",[[1,"c-tags"]]],["p-6a1e5ae3",[[1,"c-toast",{"message":[16],"closeToast":[64]}]]],["p-02b57cbd",[[1,"c-card-actions",{"align":[1],"justify":[1]}]]],["p-6b21aa4e",[[1,"c-card",{"fullscreen":[4],"isFullscreen":[32],"exitFullscreen":[64],"enterFullscreen":[64]}],[1,"c-button",{"inverted":[4],"outlined":[4],"ghost":[4],"danger":[4],"grouped":[4],"text":[4],"loading":[4],"fit":[4],"noRadius":[4,"no-radius"],"type":[1],"disabled":[516],"value":[8],"hostId":[1,"id"],"size":[1],"href":[1],"target":[1],"tabs":[4]},[[1,"focus","onTabFocus"]]],[1,"c-csc-logo",{"width":[2]}],[1,"c-main"],[1,"c-row",{"gap":[2],"nowrap":[4],"align":[1],"justify":[1]}],[1,"c-toolbar"],[1,"c-spacer"],[1,"c-icon-button",{"badge":[1],"danger":[4],"loading":[4],"text":[4],"inverted":[4],"outlined":[4],"path":[1],"ghost":[4],"disabled":[4],"size":[1]}],[1,"c-badge"],[1,"c-spinner",{"color":[1],"size":[2],"width":[2]}],[1,"c-icon",{"path":[1],"size":[2],"color":[1]}],[1,"c-ripple",{"createRipple":[64]}]]],["p-dd6d422d",[[1,"c-menu",{"items":[16],"contentClass":[1,"content-class"],"custom":[4],"small":[4],"flat":[4],"itemsPerPage":[2,"items-per-page"],"menuItemsComponent":[32],"menuWrapperComponent":[32],"currentIndex":[32],"active":[32]},[[2,"keydown","handleKeyDown"]]],[1,"c-menu-items",{"items":[16],"small":[4],"active":[4],"parentType":[1,"parent-type"],"parent":[16],"top":[2],"index":[2],"itemsPerPage":[2,"items-per-page"],"scrollingParent":[32],"isInView":[32],"currentIndex":[32]},[[2,"keydown","handleKeyDown"]],{"currentIndex":["onIndexChange"]}]]],["p-bf307cb4",[[1,"c-pagination",{"value":[16],"hideDetails":[4,"hide-details"],"simple":[4],"size":[1],"hideRange":[4,"hide-range"],"itemsPerPageOptions":[16],"_currentPage":[32],"_itemsPerPage":[32],"_totalVisible":[32],"tick":[32]},null,{"value":["valueHandler"]}],[65,"c-checkbox",{"checked":[1028],"disabled":[4],"hideDetails":[4,"hide-details"],"hint":[1],"indeterminate":[4],"label":[1],"required":[4],"valid":[4],"validation":[1],"value":[8],"trueValue":[8,"true-value"],"falseValue":[8,"false-value"],"hostName":[1,"name"],"messageOptions":[32]},[[1,"keydown","handleKeyDown"]],{"validation":["onValidationMessageChange"],"valid":["onValidChange"]}]]],["p-cfc34289",[[1,"c-loader",{"contentdelay":[2],"hide":[4],"size":[2],"width":[2]},null,{"hide":["onElementHide"]}]]],["p-32298609",[[1,"c-message",{"hint":[1],"inputId":[1,"input-id"],"valid":[4],"validation":[1],"messageOptions":[32]},null,{"valid":["onValidChange"],"validation":["onValidationMessageChange"],"hint":["onHintMessageChange"]}]]],["p-a7bba188",[[1,"c-dropdown",{"items":[16],"options":[16],"itemsPerPage":[2,"items-per-page"],"parent":[16],"index":[2],"isOpen":[4,"is-open"],"focusList":[4,"focus-list"],"inputId":[1,"input-id"],"type":[1],"wasClicked":[4,"was-clicked"],"currentIndex":[32],"isVisible":[32],"topPosition":[32],"statusText":[32],"updateDropdown":[64],"focusDropdown":[64],"open":[64],"close":[64],"focusItem":[64]},null,{"items":["onItemsChange"],"options":["onOptionsChange"],"currentIndex":["onCurrentIndexChange"]}],[4,"c-input",{"autofocus":[4],"disabled":[4],"form":[4],"hideDetails":[4,"hide-details"],"hint":[1],"hostId":[1,"id"],"inputId":[1,"input-id"],"items":[16],"itemsPerPage":[2,"items-per-page"],"label":[1],"max":[2],"min":[2],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"rows":[2],"shadow":[4],"step":[2],"type":[1],"valid":[4],"validate":[4],"validateOnBlur":[4,"validate-on-blur"],"validation":[1],"value":[8],"variant":[1],"isFocused":[32],"labelWidth":[32],"preSlotWidth":[32],"statusText":[32],"currentIndex":[32]},null,{"valid":["onValidChange"],"validation":["onValidationMessageChange"],"value":["onValueChange"],"placeholder":["onPlaceholderChange"]}]]]]'),e)));
1
+ import{p as e,b as a}from"./p-9d54e9a4.js";export{s as setNonce}from"./p-9d54e9a4.js";const i=()=>{const a=import.meta.url;const i={};if(a!==""){i.resourcesUrl=new URL(".",a).href}return e(i)};i().then((e=>a(JSON.parse('[["p-37c19431",[[1,"c-data-table",{"data":[16],"externalData":[4,"external-data"],"headers":[16],"hideFooter":[4,"hide-footer"],"footerOptions":[16],"loading":[4],"loadingText":[1,"loading-text"],"noDataText":[1,"no-data-text"],"pagination":[1040],"selectable":[4],"singleSelection":[4,"single-selection"],"selectionProperty":[1,"selection-property"],"singleExpansion":[4,"single-expansion"],"sortBy":[1032,"sort-by"],"sortDirection":[1025,"sort-direction"],"stickyHeader":[4,"sticky-header"],"horizontalScrolling":[4,"horizontal-scrolling"],"_activeRows":[32],"_data":[32],"_isIndeterminate":[32],"_isPaginationSimple":[32],"_selections":[32],"hasOverflow":[32],"hiddenHeaders":[32],"initiallyHiddenHeaders":[32],"forceRender":[32],"breakpoints":[32],"markedFooterWidth":[32],"parentWidth":[32],"firstCellHidden":[32],"lastCellHidden":[32],"clearSelections":[64],"getData":[64]},null,{"hiddenHeaders":["onHiddenHeaderChange"],"data":["onDataChange"],"headers":["onHeaderChange"],"singleSelection":["onSingleSelectionChange"],"loading":["onLoadingChange"]}]]],["p-0f76461d",[[1,"c-navigation-button"]]],["p-a369bf94",[[1,"c-side-navigation",{"mobile":[4],"menuVisible":[1028,"menu-visible"]},[[0,"itemChange","handleChange"]]]]],["p-b65fb982",[[1,"c-tabs",{"value":[1032],"borderless":[4],"disableAnimation":[4,"disable-animation"],"justify":[1],"mobileBreakpoint":[2,"mobile-breakpoint"],"vertical":[4],"isOverflowing":[32],"isMobile":[32],"scrollOffset":[32]},[[1,"tabFocus","tabFocusHandler"],[1,"tabChange","tabChangeHandler"],[2,"keydown","handleKeyDown"],[2,"keyup","handleKeyUp"]],{"justify":["onJustificationChange"],"value":["onExternalValueChange"],"scrollOffset":["onScrollOffsetChange"]}]]],["p-c5deb643",[[1,"c-tag",{"active":[4],"block":[4],"fit":[4],"flat":[4],"closeable":[4],"badge":[8]}]]],["p-7575c2c3",[[65,"c-autocomplete",{"autofocus":[4],"disabled":[4],"hideDetails":[4,"hide-details"],"hint":[1],"hostId":[1,"id"],"shadow":[4],"name":[1],"label":[1],"query":[1025],"value":[1032],"dense":[4],"required":[4],"valid":[4],"validate":[4],"validateOnBlur":[4,"validate-on-blur"],"validation":[1],"placeholder":[1],"returnValue":[4,"return-value"],"items":[16],"itemsPerPage":[2,"items-per-page"],"optionAsSelection":[4,"option-as-selection"],"menuVisible":[32],"currentIndex":[32],"hasOptionItems":[32],"options":[32],"setValue":[64],"onHideMenu":[64],"setActiveDescendant":[64],"updateQuery":[64],"onItemSelection":[64]},[[1,"keydown","handleKeyDown"]],{"items":["watchHandler"],"value":["onValueChange"]}]]],["p-2ff8e8e2",[[65,"c-select",{"autofocus":[4],"disabled":[4],"hideDetails":[4,"hide-details"],"hint":[1],"hostId":[1,"id"],"label":[1],"shadow":[4],"name":[1],"required":[4],"returnValue":[4,"return-value"],"valid":[4],"validate":[4],"validateOnBlur":[4,"validate-on-blur"],"validation":[1],"itemsPerPage":[2,"items-per-page"],"placeholder":[1],"value":[1032],"items":[16],"optionAsSelection":[4,"option-as-selection"],"menuVisible":[32],"currentIndex":[32],"activeListItemId":[32],"statusText":[32],"hasOptionItems":[32],"previousValue":[32],"onItemSelection":[64],"onHideMenu":[64],"setActiveDescendant":[64]},[[2,"keydown","handleKeyDown"]],{"value":["onValueChange"],"validate":["validateChange"],"currentIndex":["onCurrentIndexChange"]}]]],["p-8b7e9097",[[4,"c-swiper",{"value":[1544],"elementId":[1,"id"],"isBeginning":[32],"isEnd":[32],"statusText":[32]},[[0,"changeValue","onTabClick"],[2,"keyup","handleKeyUp"]]]]],["p-0bf28786",[[1,"c-side-navigation-item",{"active":[4],"href":[1],"target":[1],"loading":[4]},[[0,"itemChange","handleChange"]],{"active":["onActiveChange"]}]]],["p-6ec9109d",[[1,"c-sub-navigation-item",{"active":[4],"focusable":[4],"href":[1],"target":[1],"loading":[4]}]]],["p-f0329312",[[65,"c-text-field",{"autofocus":[4],"autocapitalize":[1],"autocorrect":[1],"autocomplete":[1],"disabled":[4],"hideDetails":[4,"hide-details"],"hint":[1],"hostId":[1,"id"],"trimWhitespace":[4,"trim-whitespace"],"label":[1],"max":[2],"min":[2],"name":[1],"number":[4],"placeholder":[1],"readonly":[4],"required":[4],"rows":[2],"shadow":[4],"step":[2],"type":[1],"valid":[4],"validate":[4],"validateOnBlur":[4,"validate-on-blur"],"validation":[1],"value":[1025],"isFocused":[32],"labelWidth":[32],"preSlotWidth":[32],"messageOptions":[32]}]]],["p-14ed80ac",[[1,"c-toasts",{"absolute":[4],"horizontal":[1],"vertical":[1],"messages":[32],"addToast":[64],"removeToast":[64]}]]],["p-9f2311a7",[[1,"c-accordion-item",{"collapsable":[4],"heading":[1],"value":[8],"expanded":[4],"outlined":[4]},[[2,"keydown","handleKeyDown"],[0,"changeValue","stop"]]]]],["p-192145f2",[[1,"c-list-item",{"active":[4],"disabled":[4],"disabledByParent":[4,"disabled-by-parent"],"hoverable":[4],"ripple":[4],"href":[1],"target":[1]},null,{"active":["onActiveChange"]}]]],["p-e970fa68",[[1,"c-login-card-actions",{"align":[1],"justify":[1]}]]],["p-ef6162d9",[[65,"c-otp-input",{"hideDetails":[4,"hide-details"],"hint":[1],"elementId":[1,"id"],"length":[2],"valid":[4],"validation":[1],"statusText":[32]},null,{"validation":["onValidationMessageChange"]}]]],["p-05bb5c30",[[65,"c-radio-group",{"value":[1032],"hideDetails":[4,"hide-details"],"hint":[1],"inline":[4],"label":[1],"color":[1],"items":[16],"disabled":[4],"returnValue":[4,"return-value"],"required":[4],"valid":[4],"validation":[1],"messageOptions":[32]},null,{"validation":["onValidationMessageChange"],"valid":["onValidChange"]}]]],["p-e0c3d13b",[[1,"c-swiper-tab",{"disabled":[4],"active":[4],"label":[1],"hostId":[1,"id"],"setsize":[2],"position":[2],"value":[8]},[[1,"click","onTabClick"]]]]],["p-dea9da0e",[[1,"c-tab",{"active":[4],"disabled":[4],"hostId":[1,"id"],"position":[2],"setsize":[2],"value":[8]},[[1,"focus","onTabFocus"],[1,"keydown","handleKeydown"]]]]],["p-79308b3f",[[1,"c-accordion",{"value":[1032],"mandatory":[4],"multiple":[4],"outlined":[4]},[[1,"itemChange","onAccordionItemChange"]],{"value":["watchPropHandler"]}]]],["p-f4a9cb4d",[[1,"c-alert",{"type":[1]}]]],["p-cea20d08",[[1,"c-card-content"]]],["p-28282ef5",[[1,"c-card-title"]]],["p-b09ba433",[[1,"c-link",{"href":[1],"underline":[4],"target":[1],"weight":[1]}]]],["p-4c23471f",[[0,"c-list",{"disabled":[4]},null,{"disabled":["onDisabledChange"]}]]],["p-6f86810a",[[1,"c-list-item-title",{"active":[4]}]]],["p-a8da163c",[[1,"c-login-button",{"href":[1],"src":[1],"alt":[1]}]]],["p-a8073d7e",[[1,"c-login-buttons"]]],["p-01ed27ec",[[4,"c-login-card",{"backgroundPosition":[1,"background-position"],"mobileBreakpoint":[2,"mobile-breakpoint"],"overlay":[4],"overlayBlendMode":[1,"overlay-blend-mode"],"src":[1],"path":[32],"imageHeight":[32]}]]],["p-55ca2b16",[[1,"c-login-card-content"]]],["p-eb35a668",[[1,"c-login-card-title"]]],["p-ff51acad",[[1,"c-modal",{"value":[4],"dismissable":[4],"width":[8],"zIndex":[2,"z-index"],"innerValue":[32],"animateModal":[32]},null,{"value":["onValueChange"]}]]],["p-2c9aabef",[[1,"c-option",{"selected":[4],"disabled":[4],"name":[1],"value":[8]}]]],["p-c343dd6e",[[1,"c-option-value"]]],["p-93280350",[[1,"c-page",{"scrollIndicator":[4,"scroll-indicator"]}]]],["p-732bc932",[[1,"c-progress-bar",{"value":[2],"hideDetails":[4,"hide-details"],"singleLine":[4,"single-line"],"label":[1],"indeterminate":[4]}]]],["p-c7a07889",[[1,"c-radio",{"checked":[4],"disabled":[4],"value":[1]}]]],["p-cd047753",[[1,"c-side-navigation-title"]]],["p-843b5cdb",[[1,"c-status",{"type":[1]}]]],["p-738a7d1d",[[1,"c-step",{"complete":[4],"current":[4]}]]],["p-c48a6e1d",[[1,"c-steps",{"value":[8],"isMobile":[32],"label":[32]},null,{"value":["watchPropHandler"]}]]],["p-889d3d6d",[[65,"c-switch",{"checked":[1028],"value":[8],"trueValue":[8,"true-value"],"falseValue":[8,"false-value"],"hostDisabled":[4,"disabled"],"hostId":[1,"id"],"required":[4],"hasLabel":[32]}]]],["p-58aed6cc",[[1,"c-tab-buttons",{"value":[1032],"mandatory":[4],"tabs":[4],"size":[1],"hostDisabled":[4,"disabled"]},[[1,"tabFocus","tabFocusHandler"],[2,"keyup","handleKeyUp"],[1,"tabChange","onTabChange"]],{"value":["onValueChange"]}]]],["p-26021965",[[1,"c-tab-item",{"value":[8],"active":[4]}]]],["p-d60032ce",[[1,"c-tab-items",{"value":[8],"disableAnimation":[4,"disable-animation"],"activeTab":[32]},[[1,"contentChange","tabContentChangeHandler"]],{"value":["onValueChange"]}]]],["p-f4d93d05",[[4,"c-table",{"mobileBreakpoint":[2,"mobile-breakpoint"],"responsive":[4]}]]],["p-210da773",[[1,"c-tags"]]],["p-6a1e5ae3",[[1,"c-toast",{"message":[16],"closeToast":[64]}]]],["p-02b57cbd",[[1,"c-card-actions",{"align":[1],"justify":[1]}]]],["p-6b21aa4e",[[1,"c-card",{"fullscreen":[4],"isFullscreen":[32],"exitFullscreen":[64],"enterFullscreen":[64]}],[1,"c-button",{"inverted":[4],"outlined":[4],"ghost":[4],"danger":[4],"grouped":[4],"text":[4],"loading":[4],"fit":[4],"noRadius":[4,"no-radius"],"type":[1],"disabled":[516],"value":[8],"hostId":[1,"id"],"size":[1],"href":[1],"target":[1],"tabs":[4]},[[1,"focus","onTabFocus"]]],[1,"c-csc-logo",{"width":[2]}],[1,"c-main"],[1,"c-row",{"gap":[2],"nowrap":[4],"align":[1],"justify":[1]}],[1,"c-toolbar"],[1,"c-spacer"],[1,"c-icon-button",{"badge":[1],"danger":[4],"loading":[4],"text":[4],"inverted":[4],"outlined":[4],"path":[1],"ghost":[4],"disabled":[4],"size":[1]}],[1,"c-badge"],[1,"c-spinner",{"color":[1],"size":[2],"width":[2]}],[1,"c-icon",{"path":[1],"size":[2],"color":[1]}],[1,"c-ripple",{"createRipple":[64]}]]],["p-dd6d422d",[[1,"c-menu",{"items":[16],"contentClass":[1,"content-class"],"custom":[4],"small":[4],"flat":[4],"itemsPerPage":[2,"items-per-page"],"menuItemsComponent":[32],"menuWrapperComponent":[32],"currentIndex":[32],"active":[32]},[[2,"keydown","handleKeyDown"]]],[1,"c-menu-items",{"items":[16],"small":[4],"active":[4],"parentType":[1,"parent-type"],"parent":[16],"top":[2],"index":[2],"itemsPerPage":[2,"items-per-page"],"scrollingParent":[32],"isInView":[32],"currentIndex":[32]},[[2,"keydown","handleKeyDown"]],{"currentIndex":["onIndexChange"]}]]],["p-bf307cb4",[[1,"c-pagination",{"value":[16],"hideDetails":[4,"hide-details"],"simple":[4],"size":[1],"hideRange":[4,"hide-range"],"itemsPerPageOptions":[16],"_currentPage":[32],"_itemsPerPage":[32],"_totalVisible":[32],"tick":[32]},null,{"value":["valueHandler"]}],[65,"c-checkbox",{"checked":[1028],"disabled":[4],"hideDetails":[4,"hide-details"],"hint":[1],"indeterminate":[4],"label":[1],"required":[4],"valid":[4],"validation":[1],"value":[8],"trueValue":[8,"true-value"],"falseValue":[8,"false-value"],"hostName":[1,"name"],"messageOptions":[32]},[[1,"keydown","handleKeyDown"]],{"validation":["onValidationMessageChange"],"valid":["onValidChange"]}]]],["p-cfc34289",[[1,"c-loader",{"contentdelay":[2],"hide":[4],"size":[2],"width":[2]},null,{"hide":["onElementHide"]}]]],["p-32298609",[[1,"c-message",{"hint":[1],"inputId":[1,"input-id"],"valid":[4],"validation":[1],"messageOptions":[32]},null,{"valid":["onValidChange"],"validation":["onValidationMessageChange"],"hint":["onHintMessageChange"]}]]],["p-50db6941",[[1,"c-dropdown",{"items":[16],"options":[16],"itemsPerPage":[2,"items-per-page"],"parent":[16],"index":[2],"isOpen":[4,"is-open"],"focusList":[4,"focus-list"],"inputId":[1,"input-id"],"type":[1],"wasClicked":[4,"was-clicked"],"currentIndex":[32],"isVisible":[32],"topPosition":[32],"statusText":[32],"updateDropdown":[64],"focusDropdown":[64],"open":[64],"close":[64],"focusItem":[64]},null,{"items":["onItemsChange"],"options":["onOptionsChange"],"currentIndex":["onCurrentIndexChange"]}],[4,"c-input",{"autofocus":[4],"disabled":[4],"form":[4],"hideDetails":[4,"hide-details"],"hint":[1],"hostId":[1,"id"],"inputId":[1,"input-id"],"items":[16],"itemsPerPage":[2,"items-per-page"],"label":[1],"max":[2],"min":[2],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"rows":[2],"shadow":[4],"step":[2],"type":[1],"valid":[4],"validate":[4],"validateOnBlur":[4,"validate-on-blur"],"validation":[1],"value":[8],"variant":[1],"isFocused":[32],"labelWidth":[32],"preSlotWidth":[32],"statusText":[32],"currentIndex":[32]},null,{"valid":["onValidChange"],"validation":["onValidationMessageChange"],"value":["onValueChange"],"placeholder":["onPlaceholderChange"]}]]]]'),e)));
2
2
  //# sourceMappingURL=csc-ui.esm.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,h as i,H as e,g as s,c as n}from"./p-9d54e9a4.js";import{c as o}from"./p-dffa1f9f.js";const r="html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host{--_c-dropdown-background-color:var(--c-dropdown-background-color, var(--c-white));--_c-dropdown-background-color-hover:var(--c-dropdown-background-color-hover, var(--c-primary-200));--_c-dropdown-text-color:var(--c-dropdown-text-color, var(--c-text-body));--_c-dropdown-text-color-active:var(--c-dropdown-text-color-active, var(--c-primary-600));--_c-dropdown-font-size:14px;--_c-dropdown-height:42px;display:block;position:absolute}:host mark{background-color:transparent;box-shadow:0 2px 0 0 var(--_c-dropdown-text-color-active);color:inherit}:host dialog{background-color:transparent;border-radius:4px;border:none;box-shadow:2px 4px 10px rgba(0, 0, 0, 0.1607843137);margin:0;overflow:hidden;padding:0;position:fixed}:host dialog::backdrop{display:none}:host ul{background-color:var(--_c-dropdown-background-color);border-radius:4px;height:100%;list-style:none;margin:0;outline:none;overflow-y:scroll;padding:0;pointer-events:auto;visibility:hidden;width:100%}:host ul.active{visibility:visible;animation:0.2s 1 fade-in cubic-bezier(0.25, 0.8, 0.5, 1)}:host li{align-items:center;column-gap:12px;cursor:pointer;display:flex;flex-wrap:nowrap;font-size:var(--_c-dropdown-font-size);min-height:var(--_c-dropdown-height);outline:none;padding-left:10px;padding-right:10px;pointer-events:auto;white-space:nowrap;width:100%;border-radius:4px}:host li span,:host li c-option-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}:host li:not(.disabled):hover,:host li.active{background:var(--_c-dropdown-background-color-hover);color:var(--_c-dropdown-text-color-active);box-shadow:inset 0 0 0 1px var(--_c-dropdown-text-color-active)}:host li.disabled{background-color:rgba(var(--c-tertiary-rgb), 0.05);cursor:default;filter:grayscale(1) opacity(0.75)}:host .visuallyhidden{border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}@keyframes fade-in{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}";const a=class{constructor(i){t(this,i);this._id="";this._debounce=null;this._itemRefs=[];this._lastKeyPressTime=null;this._openedOnTop=false;this._searchString="";this._observer=new IntersectionObserver(((t,i)=>{t.forEach((t=>{if(!t.isIntersecting){t.target.scrollIntoView({block:"nearest",inline:"nearest"});i.unobserve(t.target)}else{i.unobserve(t.target)}}))}),{threshold:1});this._renderMenuItem=(t,i)=>{var e;const s=((e=this.items[this.currentIndex])===null||e===void 0?void 0:e.value)===t.value;let n="none";if(typeof(t===null||t===void 0?void 0:t.value)==="string"){n=t.value.replace(/[^a-zA-Z0-9-_]/g,"")}n=`item_${this.inputId}--${n}`;if(s){this.currentIndex=i;this.parent.setActiveDescendant(n)}const o=document.createElement("li");o.role="option";o.ariaPosInSet=(i+1).toString();o.ariaSetSize=this.items.length.toString();o.ariaSelected=s.toString();o.id=n;o.dataset.value=t.name;o.setAttribute("tabindex","-1");o.classList.toggle("disabled",!!t.disabled);o.addEventListener("click",(t=>{const e=this._itemRefs[i].classList.contains("disabled");if(e){t.preventDefault();return}this.currentIndex=i;this._onSelect(i)}));o.addEventListener("focus",(()=>{o.classList.add("active")}));o.addEventListener("blur",(()=>{o.classList.remove("active")}));this._itemRefs.push(o);if(Object.keys(this.options).length){requestAnimationFrame((()=>{var i;const e=this.options[t.value];if(!e)return;if(((i=this.parent.query)===null||i===void 0?void 0:i.length)&&this.type==="autocomplete"){const t=e.querySelector("c-option-value");if(t){t.innerHTML=this._highlightMatchingText(t.textContent)}}o.appendChild(e);this._listElement.appendChild(o)}));return}const r=document.createElement("span");r.innerHTML=this._highlightMatchingText(t.name);o.appendChild(r);this._listElement.appendChild(o)};this.items=[];this.options=undefined;this.itemsPerPage=undefined;this.parent=undefined;this.index=undefined;this.isOpen=false;this.focusList=undefined;this.inputId=undefined;this.type=undefined;this.wasClicked=false;this.currentIndex=null;this.isVisible=false;this.topPosition=undefined;this.statusText=""}onItemsChange(){if(!this.items.length)return;this._updateMenuItems()}onOptionsChange(){if(!Object.keys(this.options).length)return;this._updateMenuItems()}async updateDropdown(t){this.items=[];this._itemRefs=[];this.options={};requestAnimationFrame((()=>{this.currentIndex=null;this.items=t.items||this.items;this.options=t.options||this.options;this._updateMenuItems();this._updateStatusText()}))}async focusDropdown(){requestAnimationFrame((()=>{this._listElement.focus()}))}async open(t=false){this._onOpen();this._createEventListeners();this._outsideClickFn=this._handleOutsideClick.bind(this);requestAnimationFrame((()=>{if(t){this._listElement.focus();if(this.type==="autocomplete"){this.currentIndex=0}this._handleCurrentIndexChange()}this._positionMenu();window.addEventListener("click",this._outsideClickFn)}))}async close(){this._openedOnTop=false;this._onClose();window.removeEventListener("click",this._outsideClickFn)}async focusItem(t){requestAnimationFrame((()=>{this.currentIndex=t;this._itemRefs[this.currentIndex].focus()}))}onCurrentIndexChange(){this._handleCurrentIndexChange()}get _listSize(){return this.items.length||0}get _firstSelectableIndex(){return this.items.findIndex((t=>!t.disabled))}get _lastSelectableIndex(){return this.items.findLastIndex((t=>!t.disabled))}_highlightMatchingText(t){if(this.type==="select"||this.parent.query==="")return t;const i=new RegExp(this.parent.query,"gi");const e=t.replace(/(<([^>]+)>)/gi,"").replace(i,(t=>`<mark>${t}</mark>`));return e}_renderEmptyItem(){const t=document.createElement("li");t.tabIndex=-1;const i=document.createElement("c-icon");i.path=o;i.size=18;i.color="var(--c-warning-600)";t.appendChild(i);t.append("No suggestions found");this._listElement.replaceChildren(t)}_updateMenuItems(){if(!this.items.length){this._renderEmptyItem();return}this._listElement.replaceChildren();this._itemRefs.length=0;this.items.map(((t,i)=>this._renderMenuItem(t,i)));requestAnimationFrame((()=>{this._positionMenu()}))}_renderMenu(){this._id=`${this.inputId}--items`;const t=document.createElement("dialog");const i=document.createElement("ul");i.role=`listbox`;i.ariaExpanded=this.isVisible.toString();i.tabIndex=-1;i.id=this._id;this._dialogElement=t;this._listElement=i;this._dialogElement.appendChild(i);this.host.shadowRoot.appendChild(t);this.items.map(((t,i)=>this._renderMenuItem(t,i)));this._listElement.addEventListener("keydown",this._onKeyboardNavigation.bind(this));this._listElement.addEventListener("keyup",this._onKeyDown.bind(this))}_onOpen(){this.parent.shadowRoot.querySelector(".c-input").classList.add("active");this._listElement.classList.add("active");this.isOpen=true;this._listElement.ariaExpanded="true";this._listElement.tabIndex=0;this._dialogElement.showModal()}_onClose(t=false){this.parent.onHideMenu();this.parent.shadowRoot.querySelector(".c-input").classList.remove("active");this._listElement.classList.remove("active");this._listElement.ariaExpanded="false";this._listElement.tabIndex=-1;this.isOpen=false;this.currentIndex=this.index;this._dialogElement.close();if(t){this.parent.shadowRoot.querySelector("input").focus()}}_onSelect(t,i=false){if(t===null)return;const e=this._itemRefs[t].classList.contains("disabled");if(e)return;this.parent.onItemSelection(t);this.index=t;this._onClose(i);this._itemRefs.forEach(((i,e)=>{i.ariaSelected=(e===t).toString()}))}_getParentPosition(){return this.parent.shadowRoot.querySelector(".c-input__slot").getBoundingClientRect()}_positionMenu(){const{innerWidth:t,innerHeight:i}=window;const{bottom:e,left:s,width:n,top:o}=this._getParentPosition();this._dialogElement.style.width=`${n}px`;this._dialogElement.style.top=`${e}px`;this._dialogElement.style.bottom="auto";this._dialogElement.style.left=`${s}px`;this._dialogElement.style.removeProperty("transform");const{bottom:r,right:a,height:h,width:l}=this._dialogElement.getBoundingClientRect();const c={x:a<t,y:r<i};const d=o-h>0;if(!d&&!c.y){this._dialogElement.style.maxHeight=`${o}px`}if(!c.y||this._openedOnTop){this._openedOnTop=true;this._dialogElement.style.top="auto";this._dialogElement.style.bottom=`${i-o}px`}this.topPosition=e;if(!c.x){this._dialogElement.style.left=`${parseFloat(this._dialogElement.style.left)-l+n}px`}}_createEventListeners(){requestAnimationFrame((async()=>{this._listElement.classList.add("active")}))}_scrollToElement(){if(this.items.length>this.itemsPerPage){const t=this._itemRefs[this.currentIndex];if(!!t){this._observer.observe(t)}}}_onKeyDown(t){t.preventDefault();t.stopPropagation()}_onKeyboardNavigation(t){this.wasClicked=false;const i=/^[0-9a-zA-Z]+$/;if(t.key.match(i)&&t.key.length===1||t.key==="Backspace"){if(this.type==="autocomplete"){const{query:i}=this.parent;let e="";if(t.key==="Backspace"){e=i.slice(0,-1)}else{e=`${i}${t.key}`}this.parent.updateQuery(e);return}if(Date.now()-this._lastKeyPressTime>3e3||this._searchString.length>2){this._searchString=t.key}else{this._searchString=`${this._searchString}${t.key}`}this._lastKeyPressTime=Date.now();const i=this.items.find((t=>t.name.toLowerCase().startsWith(this._searchString)));if(i){this.currentIndex=this.items.findIndex((t=>t===i));if(this.isOpen){this._scrollToElement()}else{this._onSelect(this.currentIndex,true)}}}if(t.key==="Enter"){this._onSelect(this.currentIndex,true)}if(t.key===" "&&!this.isOpen){t.preventDefault();this.isOpen=true}if("Tab"===t.key){this._onClose()}if(t.key==="Escape"){this._onClose(true)}if(t.key==="ArrowDown"){t.preventDefault();t.stopPropagation();if(this.currentIndex===null){this.currentIndex=0}else if(this.isOpen&&this.currentIndex+1<this._listSize){this.currentIndex+=1}this.isOpen=true}if(t.key==="ArrowUp"){t.preventDefault();t.stopPropagation();if(this.isOpen&&this.currentIndex===0){this.currentIndex=null;this._onClose(true);return}else if(this.isOpen&&this.currentIndex>0){this.currentIndex-=1}else if(this.currentIndex===null){this.currentIndex=this._listSize-1}this.isOpen=true}if(t.key==="Home"&&this.isOpen){t.preventDefault();this.currentIndex=this._firstSelectableIndex}if(t.key==="End"&&this.isOpen){t.preventDefault();this.currentIndex=this._lastSelectableIndex}}_handleCurrentIndexChange(){var t;if(this.currentIndex===null){(t=this.parent)===null||t===void 0?void 0:t.setActiveDescendant("");return}this._updateStatusText();requestAnimationFrame((()=>{var t,i;const e=this._itemRefs[this.currentIndex];if(!e)return;e===null||e===void 0?void 0:e.focus();(t=this.parent)===null||t===void 0?void 0:t.setActiveDescendant((i=e.id)!==null&&i!==void 0?i:null)}))}_handleOutsideClick(t){if(!t.composedPath().includes(this._dialogElement)){this.close()}}_updateStatusText(){if(this._debounce!==null){clearTimeout(this._debounce);this._debounce=null}this._debounce=window.setTimeout((()=>{var t;const i=this._itemRefs[this.currentIndex];const e=!!this.items.length?", to navigate use up and down arrows":"";const s=!!((t=i===null||i===void 0?void 0:i.classList)===null||t===void 0?void 0:t.contains("disabled"));const n=s?"Disabled option - ":"";let o=!!i?`${n}${i.dataset.value} - ${i.ariaPosInSet} of ${i.ariaSetSize} is highlighted`:null;if(this.currentIndex===null&&this.type==="autocomplete"){o=this.items.length?`${this.items.length} result${this.items.length!==1?"s":""} available`:"No search results available"}this.statusText=`${o||e}`;this._debounce=null}),1400)}componentDidLoad(){this._renderMenu();this.currentIndex=this.index;this._resizeObserver=new ResizeObserver((()=>{if(!this.isOpen)return;this._positionMenu()}));this._resizeObserver.observe(window.document.body)}disconnectedCallback(){this._resizeObserver.disconnect()}render(){if(this._dialogElement&&this.itemsPerPage&&this.itemsPerPage>0&&this.items.length>this.itemsPerPage){this._dialogElement.style.maxHeight=42*(this.itemsPerPage+.5)+"px"}return i(e,null,i("div",{id:"announce-"+this._id,class:"visuallyhidden","aria-live":"polite","aria-atomic":"true"},this.statusText))}get host(){return s(this)}static get watchers(){return{items:["onItemsChange"],options:["onOptionsChange"],currentIndex:["onCurrentIndexChange"]}}};a.style=r;const h="html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:root,:host{--_c-input-inactive-color:var(--c-tertiary-600);--_c-input-active-color:var(--c-primary-600);--_c-input-background-color:var(--c-transparent);--_c-input-text-color:var(--c-text-body);--_c-input-placeholder-color:var(--c-tertiary-500);--_c-input-shadow-active-color:var(--_c-input-active-color);--_c-input-shadow-background-color:var(--c-white);--_c-input-shadow-text-color:var(--_c-input-text-color);--_c-input-shadow-placeholder-color:var(--_c-input-placeholder-color);--_c-input-error-color:var(--c-error-600)}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.c-input{--_c-input-border-width:1px;align-items:flex-start;border-radius:4px;display:flex;flex:1 1 auto;font-family:var(--c-font-family);font-size:16px;letter-spacing:normal;max-width:100%;text-align:left}.c-input input,.c-input select,.c-input textarea{background:none;border:0;display:inline-block;font-family:var(--c-font-family);font-size:16px;line-height:1;margin:0;padding:0;vertical-align:middle;white-space:normal}.c-input input,.c-input textarea{box-sizing:content-box;background-color:transparent;border:none;color:var(--_c-input-text-color);flex:1 1 auto;font-family:var(--c-font-family);font-size:16px;line-height:20px;max-width:100%;min-width:0;width:100%}.c-input input[type=checkbox],.c-input input[type=radio],.c-input select{box-sizing:border-box}.c-input input[type=search]{appearance:textfield;box-sizing:content-box}.c-input ::-webkit-search-decoration{display:none}.c-input textarea{margin-top:4px;min-height:44px;overflow:auto;padding:8px 12px 8px 0;resize:vertical;vertical-align:top}.c-input input{max-height:32px;padding:8px 0}.c-input input:focus,.c-input input:active,.c-input textarea:focus,.c-input textarea:active{outline:none}.c-input .c-input__content{align-items:center;display:flex;width:100%}.c-input__control{border-radius:inherit;color:currentColor;display:flex;flex-flow:column wrap;flex-grow:1;gap:8px;height:auto;min-width:0;width:100%;position:relative}.c-input__slot{align-items:stretch;background:transparent;border-radius:inherit;color:inherit;cursor:text;display:flex;min-height:44px;padding:0 12px;position:relative;transition:0.3s cubic-bezier(0.25, 0.8, 0.5, 1);width:100%}.c-input__field{align-items:center;display:flex;flex:1 1 auto;gap:8px;position:relative}.c-input__field input,.c-input__field textarea{flex:1;outline:0}.c-input__field label{font-size:16px;height:20px;left:0;letter-spacing:normal;line-height:20px;max-width:90%;min-height:8px;overflow:hidden;pointer-events:none;position:absolute;right:auto;text-overflow:ellipsis;top:12px;transform-origin:top left;transform:translateX(var(--_c-input-label-position)) translateY(0) scale(1);transition:0.3s cubic-bezier(0.25, 0.8, 0.5, 1);white-space:nowrap}.c-input__field label.active{transform:translateY(-18px) scale(0.75)}.c-input__field label span{color:var(--_c-input-error-color)}.c-input--select input{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-input--select .c-input__slot{cursor:pointer}.c-input fieldset{background-color:var(--_c-input-background-color);border-collapse:collapse;border-color:var(--_c-input-inactive-color);border-radius:inherit;border-style:solid;border-width:var(--_c-input-border-width);inset:0;margin:0;padding:0 0 0 8px;pointer-events:none;position:absolute;transition-duration:0.15s;transition-property:color;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1)}.c-input fieldset legend{float:none;line-height:11px;margin-left:-1px;padding:0;text-align:left;transition:width 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);width:0}.c-input fieldset legend.active{width:var(--_c-input-legend-width)}.c-input--shadow .c-input__slot{background-color:var(--_c-input-shadow-background-color);box-shadow:rgba(0, 0, 0, 0.15) 0 5px 15px 0}.c-input--shadow .c-input__slot input,.c-input--shadow .c-input__slot textarea{color:var(--_c-input-shadow-text-color)}.c-input--shadow .c-input__slot:focus-within{outline:2px var(--_c-input-active-color) solid}.c-input--shadow .c-input__slot:focus-within c-icon{--c-icon-color:var(--_c-input-shadow-active-color) !important}.c-input--shadow input::placeholder,.c-input--shadow textarea::placeholder{color:var(--_c-input-shadow-placeholder-color);opacity:1}.c-input--disabled input,.c-input--disabled textarea,.c-input--disabled fieldset,.c-input--disabled label{--_c-input-error-color:var(--c-tertiary-500);color:var(--c-tertiary-500)}.c-input--textarea .c-input__field{margin-right:-12px}.c-input ::placeholder{color:var(--_c-input-placeholder-color);opacity:1}.c-input:focus-within,.c-input.active,.c-input:not(.c-input--disabled):active{--_c-input-border-width:2px;color:var(--_c-input-active-color)}.c-input:focus-within fieldset,.c-input.active fieldset,.c-input:not(.c-input--disabled):active fieldset{border-color:var(--_c-input-active-color)}.c-input:focus-within label,.c-input.active label,.c-input:not(.c-input--disabled):active label{color:var(--_c-input-active-color);transform:translateX(0) translateY(-18px) scale(0.75)}.c-input:focus-within legend,.c-input.active legend,.c-input:not(.c-input--disabled):active legend{width:var(--_c-input-legend-width)}.c-input.active:not(.filled) .c-input-menu__input{position:relative}.c-input.active:not(.filled) .c-input-menu__input::after{display:flex;align-items:center;position:absolute;inset:0;content:attr(data-placeholder);pointer-events:none;color:var(--_c-input-placeholder-color)}.c-input--error{color:var(--_c-input-error-color)}.c-input--error fieldset{border-color:var(--_c-input-error-color) !important}.c-input--error label{color:var(--_c-input-error-color) !important}.c-input--error:focus-within{color:var(--_c-input-error-color)}";const l=class{constructor(i){t(this,i);this.changeValue=n(this,"changeValue",3);this.itemClick=n(this,"itemClick",3);this.dropdownClose=n(this,"dropdownClose",3);this._hasBlurred=false;this._debounce=null;this._observer=new IntersectionObserver(((t,i)=>{t.forEach((t=>{if(t.isIntersecting){this._calculateElementWidths();i.unobserve(t.target)}}))}),{threshold:1});this._onBlur=()=>{setTimeout((()=>{this.isFocused=false;this._hasBlurred=true;this._onReset()}),100)};this._onFocus=(t=true)=>{var i,e;if(this.disabled)return;this.isFocused=true;(i=this.inputField)===null||i===void 0?void 0:i.focus();if(t){(e=this.inputField)===null||e===void 0?void 0:e.click();if(this.variant==="select"){this.itemClick.emit()}}if(this.inputField){this.inputField.placeholder=!!this.value||!this.placeholder?"":this.placeholder}};this.autofocus=false;this.disabled=false;this.form=false;this.hideDetails=false;this.hint="";this.hostId=undefined;this.inputId=undefined;this.items=undefined;this.itemsPerPage=6;this.label=undefined;this.max=null;this.min=null;this.name=undefined;this.placeholder=undefined;this.readonly=false;this.required=false;this.rows=1;this.shadow=false;this.step=null;this.type=undefined;this.valid=true;this.validate=false;this.validateOnBlur=false;this.validation="Required field";this.value=undefined;this.variant="text";this.isFocused=false;this.labelWidth=0;this.preSlotWidth=0;this.statusText="";this.currentIndex=null}onValidChange(){if(this.validateOnBlur&&!this._hasBlurred)return;this._setAriaDescriptionId()}onValidationMessageChange(){this._updateStatusText()}onValueChange(t){if(!t){this._onReset()}}onPlaceholderChange(t){if(t)this._onReset()}componentDidLoad(){var t,i,e,s;if(this.autofocus){setTimeout((()=>{this._onFocus(false)}),500)}this._calculateElementWidths();this._setAriaDescriptionId();if(this.label){this._observer.observe(this._labelRef)}(t=this.inputField)===null||t===void 0?void 0:t.addEventListener("focus",(()=>this._onFocus(false)));(i=this.inputField)===null||i===void 0?void 0:i.addEventListener("blur",(()=>this._onBlur()));(e=this.inputField)===null||e===void 0?void 0:e.addEventListener("keypress",this._preventNonNumericalInput);if(this.inputField){this.inputField.placeholder=!!this.label||!this.placeholder?"":this.placeholder;this.inputField.title=(s=this.label)!==null&&s!==void 0?s:this.placeholder;requestAnimationFrame((()=>{const t=this.inputField.closest(".c-input-menu__input");if(!t)return;t.dataset.placeholder=this.placeholder}))}}disconnectedCallback(){var t,i,e,s;(t=this.inputField)===null||t===void 0?void 0:t.removeEventListener("focus",(()=>this._onFocus(false)));(i=this.inputField)===null||i===void 0?void 0:i.removeEventListener("blur",(()=>this._onBlur()));(e=this.inputField)===null||e===void 0?void 0:e.removeEventListener("keypress",this._preventNonNumericalInput);this._observer.disconnect();(s=this._dropdownElement)===null||s===void 0?void 0:s.remove()}get isActive(){return!!this.value||typeof this.value==="boolean"||this.isFocused}_setAriaDescriptionId(){this.inputField.removeAttribute("aria-describedby");let t=null;if(this.valid&&!this.value&&this.hint){t="hint"}if(!this.valid){t="error"}if(t){this.inputField.setAttribute("aria-describedby",`${t}-${this.inputId}`)}}_calculateElementWidths(){this.labelWidth=!!this.label?this._labelRef.scrollWidth*.75+6:0;this.preSlotWidth=this.inputField.offsetLeft}_onReset(){if(this.inputField){this.inputField.placeholder=!this.label&&!this.value&&!!this.placeholder?this.placeholder:""}}_preventNonNumericalInput(t){if(this.type!=="number")return;if(!t.key.match(/^[0-9,\.]+$/))t.preventDefault()}_renderBorders(){if(this.shadow)return;const t={active:this.isActive};return i("fieldset",{"aria-hidden":"true"},i("legend",{class:t,style:{"--_c-input-legend-width":this.labelWidth+"px"}},i("span",{class:"notranslate"})))}_renderLabel(){if(!this.label)return;const t={active:this.isActive};return i("label",{htmlFor:this.inputId,ref:t=>this._labelRef=t,class:t},this.label,this.required&&i("span",null," *"))}get inputField(){var t;return(t=this.el)===null||t===void 0?void 0:t.querySelector(".c-input__input")}_updateStatusText(){if(this._debounce!==null){clearTimeout(this._debounce);this._debounce=null}this._debounce=window.setTimeout((()=>{this.statusText=this.valid?"":`Error: ${this.validation}`;this._debounce=null}),1400)}render(){const t={"c-input":true,"c-input--disabled":this.disabled,"c-input--shadow":this.shadow,"c-input--textarea":this.rows>1,"c-input--error":!this.valid,filled:!!this.value,[`c-input--${this.variant}`]:true};return i(e,{disabled:this.disabled},i("div",{id:"announce-"+this.inputId,class:"visuallyhidden","aria-live":"polite","aria-atomic":"true"},this.statusText),i("div",{class:t},i("div",{class:"c-input__control"},i("div",{class:"c-input__slot",onClick:()=>this._onFocus()},this._renderBorders(),i("div",{class:"c-input__field",style:{"--_c-input-label-position":this.preSlotWidth+"px"}},i("slot",{name:"pre"}),this._renderLabel(),i("slot",null))),this.variant==="select"&&i("slot",{name:"dropdown"}),!this.hideDetails&&i("c-message",{hint:this.hint,inputId:this.inputId,valid:this.valid,validation:this.validation}))))}get el(){return s(this)}static get watchers(){return{valid:["onValidChange"],validation:["onValidationMessageChange"],value:["onValueChange"],placeholder:["onPlaceholderChange"]}}};l.style=h;export{a as c_dropdown,l as c_input};
2
- //# sourceMappingURL=p-a7bba188.entry.js.map
1
+ import{r as t,h as i,H as e,g as s,c as n}from"./p-9d54e9a4.js";import{c as o}from"./p-dffa1f9f.js";const r="html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host(c-dropdown){--_c-dropdown-background-color:var(--c-dropdown-background-color, var(--c-white));--_c-dropdown-background-color-hover:var(--c-dropdown-background-color-hover, var(--c-primary-200));--_c-dropdown-text-color:var(--c-dropdown-text-color, var(--c-text-body));--_c-dropdown-text-color-active:var(--c-dropdown-text-color-active, var(--c-primary-600));--_c-dropdown-font-size:14px;--_c-dropdown-height:42px;display:block;position:absolute}:host(c-dropdown) mark{background-color:transparent;box-shadow:0 2px 0 0 var(--_c-dropdown-text-color-active);color:inherit}:host(c-dropdown) dialog{background-color:transparent;border-radius:4px;border:none;box-shadow:2px 4px 10px rgba(0, 0, 0, 0.1607843137);margin:0;overflow-y:scroll;padding:0;position:fixed}:host(c-dropdown) dialog::backdrop{display:none}:host(c-dropdown) ul{background-color:var(--_c-dropdown-background-color);border-radius:4px;list-style:none;margin:0;outline:none;padding:0;pointer-events:auto;visibility:hidden;width:100%}:host(c-dropdown) ul.active{visibility:visible;animation:0.2s 1 fade-in cubic-bezier(0.25, 0.8, 0.5, 1)}:host(c-dropdown) li{align-items:center;column-gap:12px;cursor:pointer;display:flex;flex-wrap:nowrap;font-size:var(--_c-dropdown-font-size);min-height:var(--_c-dropdown-height);outline:none;padding-left:10px;padding-right:10px;pointer-events:auto;white-space:nowrap;width:100%;border-radius:4px}:host(c-dropdown) li span,:host(c-dropdown) li c-option-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}:host(c-dropdown) li:not(.disabled):hover,:host(c-dropdown) li.active{background:var(--_c-dropdown-background-color-hover);color:var(--_c-dropdown-text-color-active);box-shadow:inset 0 0 0 1px var(--_c-dropdown-text-color-active)}:host(c-dropdown) li.disabled{background-color:rgba(var(--c-tertiary-rgb), 0.05);cursor:default;filter:grayscale(1) opacity(0.75)}:host(c-dropdown) .visuallyhidden{border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}@keyframes fade-in{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}";const a=class{constructor(i){t(this,i);this._id="";this._debounce=null;this._itemRefs=[];this._lastKeyPressTime=null;this._openedOnTop=false;this._searchString="";this._observer=new IntersectionObserver(((t,i)=>{t.forEach((t=>{if(!t.isIntersecting){t.target.scrollIntoView({block:"nearest",inline:"nearest"});i.unobserve(t.target)}else{i.unobserve(t.target)}}))}),{threshold:1});this._renderMenuItem=(t,i)=>{var e;const s=((e=this.items[this.currentIndex])===null||e===void 0?void 0:e.value)===t.value;let n="none";if(typeof(t===null||t===void 0?void 0:t.value)==="string"){n=t.value.replace(/[^a-zA-Z0-9-_]/g,"")}n=`item_${this.inputId}--${n}`;if(s){this.currentIndex=i;this.parent.setActiveDescendant(n)}const o=document.createElement("li");o.role="option";o.ariaPosInSet=(i+1).toString();o.ariaSetSize=this.items.length.toString();o.ariaSelected=s.toString();o.id=n;o.dataset.value=t.name;o.setAttribute("tabindex","-1");o.classList.toggle("disabled",!!t.disabled);o.addEventListener("click",(t=>{const e=this._itemRefs[i].classList.contains("disabled");if(e){t.preventDefault();return}this.currentIndex=i;this._onSelect(i)}));o.addEventListener("focus",(()=>{o.classList.add("active")}));o.addEventListener("blur",(()=>{o.classList.remove("active")}));this._itemRefs.push(o);if(Object.keys(this.options).length){requestAnimationFrame((()=>{var i;const e=this.options[t.value];if(!e)return;if(((i=this.parent.query)===null||i===void 0?void 0:i.length)&&this.type==="autocomplete"){const t=e.querySelector("c-option-value");if(t){t.innerHTML=this._highlightMatchingText(t.textContent)}}o.appendChild(e);this._listElement.appendChild(o)}));return}const r=document.createElement("span");r.innerHTML=this._highlightMatchingText(t.name);o.appendChild(r);this._listElement.appendChild(o)};this.items=[];this.options=undefined;this.itemsPerPage=undefined;this.parent=undefined;this.index=undefined;this.isOpen=false;this.focusList=undefined;this.inputId=undefined;this.type=undefined;this.wasClicked=false;this.currentIndex=null;this.isVisible=false;this.topPosition=undefined;this.statusText=""}onItemsChange(){if(!this.items.length)return;this._updateMenuItems()}onOptionsChange(){if(!Object.keys(this.options).length)return;this._updateMenuItems()}async updateDropdown(t){this.items=[];this._itemRefs=[];this.options={};requestAnimationFrame((()=>{this.currentIndex=null;this.items=t.items||this.items;this.options=t.options||this.options;this._updateMenuItems();this._updateStatusText()}))}async focusDropdown(){requestAnimationFrame((()=>{this._listElement.focus()}))}async open(t=false){this._onOpen();this._createEventListeners();this._outsideClickFn=this._handleOutsideClick.bind(this);requestAnimationFrame((()=>{if(t){this._listElement.focus();if(this.type==="autocomplete"){this.currentIndex=0}this._handleCurrentIndexChange()}this._positionMenu();window.addEventListener("click",this._outsideClickFn)}))}async close(){this._openedOnTop=false;this._onClose();window.removeEventListener("click",this._outsideClickFn)}async focusItem(t){requestAnimationFrame((()=>{this.currentIndex=t;this._itemRefs[this.currentIndex].focus()}))}onCurrentIndexChange(){this._handleCurrentIndexChange()}get _listSize(){return this.items.length||0}get _firstSelectableIndex(){return this.items.findIndex((t=>!t.disabled))}get _lastSelectableIndex(){return this.items.findLastIndex((t=>!t.disabled))}_highlightMatchingText(t){if(this.type==="select"||this.parent.query==="")return t;const i=new RegExp(this.parent.query,"gi");const e=t.replace(/(<([^>]+)>)/gi,"").replace(i,(t=>`<mark>${t}</mark>`));return e}_renderEmptyItem(){const t=document.createElement("li");t.tabIndex=-1;const i=document.createElement("c-icon");i.path=o;i.size=18;i.color="var(--c-warning-600)";t.appendChild(i);t.append("No suggestions found");this._listElement.replaceChildren(t)}_updateMenuItems(){if(!this.items.length){this._renderEmptyItem();return}this._listElement.replaceChildren();this._itemRefs.length=0;this.items.map(((t,i)=>this._renderMenuItem(t,i)));requestAnimationFrame((()=>{this._positionMenu()}))}_renderMenu(){this._id=`${this.inputId}--items`;const t=document.createElement("dialog");const i=document.createElement("ul");i.role=`listbox`;i.ariaExpanded=this.isVisible.toString();i.tabIndex=-1;i.id=this._id;this._dialogElement=t;this._listElement=i;this._dialogElement.appendChild(i);this.host.shadowRoot.appendChild(t);this.items.map(((t,i)=>this._renderMenuItem(t,i)));this._listElement.addEventListener("keydown",this._onKeyboardNavigation.bind(this));this._listElement.addEventListener("keyup",this._onKeyDown.bind(this))}_onOpen(){this.parent.shadowRoot.querySelector(".c-input").classList.add("active");this._listElement.classList.add("active");this.isOpen=true;this._listElement.ariaExpanded="true";this._listElement.tabIndex=0;this._dialogElement.showModal()}_onClose(t=false){this.parent.onHideMenu();this.parent.shadowRoot.querySelector(".c-input").classList.remove("active");this._listElement.classList.remove("active");this._listElement.ariaExpanded="false";this._listElement.tabIndex=-1;this.isOpen=false;this.currentIndex=this.index;this._dialogElement.close();if(t){this.parent.shadowRoot.querySelector("input").focus()}}_onSelect(t,i=false){if(t===null)return;const e=this._itemRefs[t].classList.contains("disabled");if(e)return;this.parent.onItemSelection(t);this.index=t;this._onClose(i);this._itemRefs.forEach(((i,e)=>{i.ariaSelected=(e===t).toString()}))}_getParentPosition(){return this.parent.shadowRoot.querySelector(".c-input__slot").getBoundingClientRect()}_positionMenu(){const{innerWidth:t,innerHeight:i}=window;const{bottom:e,left:s,width:n,top:o}=this._getParentPosition();this._dialogElement.style.width=`${n}px`;this._dialogElement.style.top=`${e}px`;this._dialogElement.style.bottom="auto";this._dialogElement.style.left=`${s}px`;this._dialogElement.style.removeProperty("transform");const{bottom:r,right:a,height:h,width:l}=this._dialogElement.getBoundingClientRect();const c={x:a<t,y:r<i};const d=o-h>0;if(!d&&!c.y){this._dialogElement.style.maxHeight=`${o}px`}if(!c.y||this._openedOnTop){this._openedOnTop=true;this._dialogElement.style.top="auto";this._dialogElement.style.bottom=`${i-o}px`}this.topPosition=e;if(!c.x){this._dialogElement.style.left=`${parseFloat(this._dialogElement.style.left)-l+n}px`}}_createEventListeners(){requestAnimationFrame((async()=>{this._listElement.classList.add("active")}))}_scrollToElement(){if(this.items.length>this.itemsPerPage){const t=this._itemRefs[this.currentIndex];if(!!t){this._observer.observe(t)}}}_onKeyDown(t){t.preventDefault();t.stopPropagation()}_onKeyboardNavigation(t){this.wasClicked=false;const i=/^[0-9a-zA-Z]+$/;if(t.key.match(i)&&t.key.length===1||t.key==="Backspace"){if(this.type==="autocomplete"){const{query:i}=this.parent;let e="";if(t.key==="Backspace"){e=i.slice(0,-1)}else{e=`${i}${t.key}`}this.parent.updateQuery(e);return}if(Date.now()-this._lastKeyPressTime>3e3||this._searchString.length>2){this._searchString=t.key}else{this._searchString=`${this._searchString}${t.key}`}this._lastKeyPressTime=Date.now();const i=this.items.find((t=>t.name.toLowerCase().startsWith(this._searchString)));if(i){this.currentIndex=this.items.findIndex((t=>t===i));if(this.isOpen){this._scrollToElement()}else{this._onSelect(this.currentIndex,true)}}}if(t.key==="Enter"){this._onSelect(this.currentIndex,true)}if(t.key===" "&&!this.isOpen){t.preventDefault();this.isOpen=true}if("Tab"===t.key){this._onClose()}if(t.key==="Escape"){this._onClose(true)}if(t.key==="ArrowDown"){t.preventDefault();t.stopPropagation();if(this.currentIndex===null){this.currentIndex=0}else if(this.isOpen&&this.currentIndex+1<this._listSize){this.currentIndex+=1}this.isOpen=true}if(t.key==="ArrowUp"){t.preventDefault();t.stopPropagation();if(this.isOpen&&this.currentIndex===0){this.currentIndex=null;this._onClose(true);return}else if(this.isOpen&&this.currentIndex>0){this.currentIndex-=1}else if(this.currentIndex===null){this.currentIndex=this._listSize-1}this.isOpen=true}if(t.key==="Home"&&this.isOpen){t.preventDefault();this.currentIndex=this._firstSelectableIndex}if(t.key==="End"&&this.isOpen){t.preventDefault();this.currentIndex=this._lastSelectableIndex}}_handleCurrentIndexChange(){var t;if(this.currentIndex===null){(t=this.parent)===null||t===void 0?void 0:t.setActiveDescendant("");return}this._updateStatusText();requestAnimationFrame((()=>{var t,i;const e=this._itemRefs[this.currentIndex];if(!e)return;e===null||e===void 0?void 0:e.focus();(t=this.parent)===null||t===void 0?void 0:t.setActiveDescendant((i=e.id)!==null&&i!==void 0?i:null)}))}_handleOutsideClick(t){if(!t.composedPath().includes(this._dialogElement)){this.close()}}_updateStatusText(){if(this._debounce!==null){clearTimeout(this._debounce);this._debounce=null}this._debounce=window.setTimeout((()=>{var t;const i=this._itemRefs[this.currentIndex];const e=!!this.items.length?", to navigate use up and down arrows":"";const s=!!((t=i===null||i===void 0?void 0:i.classList)===null||t===void 0?void 0:t.contains("disabled"));const n=s?"Disabled option - ":"";let o=!!i?`${n}${i.dataset.value} - ${i.ariaPosInSet} of ${i.ariaSetSize} is highlighted`:null;if(this.currentIndex===null&&this.type==="autocomplete"){o=this.items.length?`${this.items.length} result${this.items.length!==1?"s":""} available`:"No search results available"}this.statusText=`${o||e}`;this._debounce=null}),1400)}componentDidLoad(){this._renderMenu();this.currentIndex=this.index;this._resizeObserver=new ResizeObserver((()=>{if(!this.isOpen)return;this._positionMenu()}));this._resizeObserver.observe(window.document.body)}disconnectedCallback(){this._resizeObserver.disconnect()}render(){if(this._dialogElement&&this.itemsPerPage&&this.itemsPerPage>0&&this.items.length>this.itemsPerPage){this._dialogElement.style.maxHeight=42*(this.itemsPerPage+.5)+"px"}return i(e,null,i("div",{id:"announce-"+this._id,class:"visuallyhidden","aria-live":"polite","aria-atomic":"true"},this.statusText))}get host(){return s(this)}static get watchers(){return{items:["onItemsChange"],options:["onOptionsChange"],currentIndex:["onCurrentIndexChange"]}}};a.style=r;const h="html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:root,:host{--_c-input-inactive-color:var(--c-tertiary-600);--_c-input-active-color:var(--c-primary-600);--_c-input-background-color:var(--c-transparent);--_c-input-text-color:var(--c-text-body);--_c-input-placeholder-color:var(--c-tertiary-500);--_c-input-shadow-active-color:var(--_c-input-active-color);--_c-input-shadow-background-color:var(--c-white);--_c-input-shadow-text-color:var(--_c-input-text-color);--_c-input-shadow-placeholder-color:var(--_c-input-placeholder-color);--_c-input-error-color:var(--c-error-600)}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.c-input{--_c-input-border-width:1px;align-items:flex-start;border-radius:4px;display:flex;flex:1 1 auto;font-family:var(--c-font-family);font-size:16px;letter-spacing:normal;max-width:100%;text-align:left}.c-input input,.c-input select,.c-input textarea{background:none;border:0;display:inline-block;font-family:var(--c-font-family);font-size:16px;line-height:1;margin:0;padding:0;vertical-align:middle;white-space:normal}.c-input input,.c-input textarea{box-sizing:content-box;background-color:transparent;border:none;color:var(--_c-input-text-color);flex:1 1 auto;font-family:var(--c-font-family);font-size:16px;line-height:20px;max-width:100%;min-width:0;width:100%}.c-input input[type=checkbox],.c-input input[type=radio],.c-input select{box-sizing:border-box}.c-input input[type=search]{appearance:textfield;box-sizing:content-box}.c-input ::-webkit-search-decoration{display:none}.c-input textarea{margin-top:4px;min-height:44px;overflow:auto;padding:8px 12px 8px 0;resize:vertical;vertical-align:top}.c-input input{max-height:32px;padding:8px 0}.c-input input:focus,.c-input input:active,.c-input textarea:focus,.c-input textarea:active{outline:none}.c-input .c-input__content{align-items:center;display:flex;width:100%}.c-input__control{border-radius:inherit;color:currentColor;display:flex;flex-flow:column wrap;flex-grow:1;gap:8px;height:auto;min-width:0;width:100%;position:relative}.c-input__slot{align-items:stretch;background:transparent;border-radius:inherit;color:inherit;cursor:text;display:flex;min-height:44px;padding:0 12px;position:relative;transition:0.3s cubic-bezier(0.25, 0.8, 0.5, 1);width:100%}.c-input__field{align-items:center;display:flex;flex:1 1 auto;gap:8px;position:relative}.c-input__field input,.c-input__field textarea{flex:1;outline:0}.c-input__field label{font-size:16px;height:20px;left:0;letter-spacing:normal;line-height:20px;max-width:90%;min-height:8px;overflow:hidden;pointer-events:none;position:absolute;right:auto;text-overflow:ellipsis;top:12px;transform-origin:top left;transform:translateX(var(--_c-input-label-position)) translateY(0) scale(1);transition:0.3s cubic-bezier(0.25, 0.8, 0.5, 1);white-space:nowrap}.c-input__field label.active{transform:translateY(-18px) scale(0.75)}.c-input__field label span{color:var(--_c-input-error-color)}.c-input--select input{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-input--select .c-input__slot{cursor:pointer}.c-input fieldset{background-color:var(--_c-input-background-color);border-collapse:collapse;border-color:var(--_c-input-inactive-color);border-radius:inherit;border-style:solid;border-width:var(--_c-input-border-width);inset:0;margin:0;padding:0 0 0 8px;pointer-events:none;position:absolute;transition-duration:0.15s;transition-property:color;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1)}.c-input fieldset legend{float:none;line-height:11px;margin-left:-1px;padding:0;text-align:left;transition:width 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);width:0}.c-input fieldset legend.active{width:var(--_c-input-legend-width)}.c-input--shadow .c-input__slot{background-color:var(--_c-input-shadow-background-color);box-shadow:rgba(0, 0, 0, 0.15) 0 5px 15px 0}.c-input--shadow .c-input__slot input,.c-input--shadow .c-input__slot textarea{color:var(--_c-input-shadow-text-color)}.c-input--shadow .c-input__slot:focus-within{outline:2px var(--_c-input-active-color) solid}.c-input--shadow .c-input__slot:focus-within c-icon{--c-icon-color:var(--_c-input-shadow-active-color) !important}.c-input--shadow input::placeholder,.c-input--shadow textarea::placeholder{color:var(--_c-input-shadow-placeholder-color);opacity:1}.c-input--disabled input,.c-input--disabled textarea,.c-input--disabled fieldset,.c-input--disabled label{--_c-input-error-color:var(--c-tertiary-500);color:var(--c-tertiary-500)}.c-input--textarea .c-input__field{margin-right:-12px}.c-input ::placeholder{color:var(--_c-input-placeholder-color);opacity:1}.c-input:focus-within,.c-input.active,.c-input:not(.c-input--disabled):active{--_c-input-border-width:2px;color:var(--_c-input-active-color)}.c-input:focus-within fieldset,.c-input.active fieldset,.c-input:not(.c-input--disabled):active fieldset{border-color:var(--_c-input-active-color)}.c-input:focus-within label,.c-input.active label,.c-input:not(.c-input--disabled):active label{color:var(--_c-input-active-color);transform:translateX(0) translateY(-18px) scale(0.75)}.c-input:focus-within legend,.c-input.active legend,.c-input:not(.c-input--disabled):active legend{width:var(--_c-input-legend-width)}.c-input.active:not(.filled) .c-input-menu__input{position:relative}.c-input.active:not(.filled) .c-input-menu__input::after{display:flex;align-items:center;position:absolute;inset:0;content:attr(data-placeholder);pointer-events:none;color:var(--_c-input-placeholder-color)}.c-input--error{color:var(--_c-input-error-color)}.c-input--error fieldset{border-color:var(--_c-input-error-color) !important}.c-input--error label{color:var(--_c-input-error-color) !important}.c-input--error:focus-within{color:var(--_c-input-error-color)}";const l=class{constructor(i){t(this,i);this.changeValue=n(this,"changeValue",3);this.itemClick=n(this,"itemClick",3);this.dropdownClose=n(this,"dropdownClose",3);this._hasBlurred=false;this._debounce=null;this._observer=new IntersectionObserver(((t,i)=>{t.forEach((t=>{if(t.isIntersecting){this._calculateElementWidths();i.unobserve(t.target)}}))}),{threshold:1});this._onBlur=()=>{setTimeout((()=>{this.isFocused=false;this._hasBlurred=true;this._onReset()}),100)};this._onFocus=(t=true)=>{var i,e;if(this.disabled)return;this.isFocused=true;(i=this.inputField)===null||i===void 0?void 0:i.focus();if(t){(e=this.inputField)===null||e===void 0?void 0:e.click();if(this.variant==="select"){this.itemClick.emit()}}if(this.inputField){this.inputField.placeholder=!!this.value||!this.placeholder?"":this.placeholder}};this.autofocus=false;this.disabled=false;this.form=false;this.hideDetails=false;this.hint="";this.hostId=undefined;this.inputId=undefined;this.items=undefined;this.itemsPerPage=6;this.label=undefined;this.max=null;this.min=null;this.name=undefined;this.placeholder=undefined;this.readonly=false;this.required=false;this.rows=1;this.shadow=false;this.step=null;this.type=undefined;this.valid=true;this.validate=false;this.validateOnBlur=false;this.validation="Required field";this.value=undefined;this.variant="text";this.isFocused=false;this.labelWidth=0;this.preSlotWidth=0;this.statusText="";this.currentIndex=null}onValidChange(){if(this.validateOnBlur&&!this._hasBlurred)return;this._setAriaDescriptionId()}onValidationMessageChange(){this._updateStatusText()}onValueChange(t){if(!t){this._onReset()}}onPlaceholderChange(t){if(t)this._onReset()}componentDidLoad(){var t,i,e,s;if(this.autofocus){setTimeout((()=>{this._onFocus(false)}),500)}this._calculateElementWidths();this._setAriaDescriptionId();if(this.label){this._observer.observe(this._labelRef)}(t=this.inputField)===null||t===void 0?void 0:t.addEventListener("focus",(()=>this._onFocus(false)));(i=this.inputField)===null||i===void 0?void 0:i.addEventListener("blur",(()=>this._onBlur()));(e=this.inputField)===null||e===void 0?void 0:e.addEventListener("keypress",this._preventNonNumericalInput);if(this.inputField){this.inputField.placeholder=!!this.label||!this.placeholder?"":this.placeholder;this.inputField.title=(s=this.label)!==null&&s!==void 0?s:this.placeholder;requestAnimationFrame((()=>{const t=this.inputField.closest(".c-input-menu__input");if(!t)return;t.dataset.placeholder=this.placeholder}))}}disconnectedCallback(){var t,i,e,s;(t=this.inputField)===null||t===void 0?void 0:t.removeEventListener("focus",(()=>this._onFocus(false)));(i=this.inputField)===null||i===void 0?void 0:i.removeEventListener("blur",(()=>this._onBlur()));(e=this.inputField)===null||e===void 0?void 0:e.removeEventListener("keypress",this._preventNonNumericalInput);this._observer.disconnect();(s=this._dropdownElement)===null||s===void 0?void 0:s.remove()}get isActive(){return!!this.value||typeof this.value==="boolean"||this.isFocused}_setAriaDescriptionId(){this.inputField.removeAttribute("aria-describedby");let t=null;if(this.valid&&!this.value&&this.hint){t="hint"}if(!this.valid){t="error"}if(t){this.inputField.setAttribute("aria-describedby",`${t}-${this.inputId}`)}}_calculateElementWidths(){this.labelWidth=!!this.label?this._labelRef.scrollWidth*.75+6:0;this.preSlotWidth=this.inputField.offsetLeft}_onReset(){if(this.inputField){this.inputField.placeholder=!this.label&&!this.value&&!!this.placeholder?this.placeholder:""}}_preventNonNumericalInput(t){if(this.type!=="number")return;if(!t.key.match(/^[0-9,\.]+$/))t.preventDefault()}_renderBorders(){if(this.shadow)return;const t={active:this.isActive};return i("fieldset",{"aria-hidden":"true"},i("legend",{class:t,style:{"--_c-input-legend-width":this.labelWidth+"px"}},i("span",{class:"notranslate"})))}_renderLabel(){if(!this.label)return;const t={active:this.isActive};return i("label",{htmlFor:this.inputId,ref:t=>this._labelRef=t,class:t},this.label,this.required&&i("span",null," *"))}get inputField(){var t;return(t=this.el)===null||t===void 0?void 0:t.querySelector(".c-input__input")}_updateStatusText(){if(this._debounce!==null){clearTimeout(this._debounce);this._debounce=null}this._debounce=window.setTimeout((()=>{this.statusText=this.valid?"":`Error: ${this.validation}`;this._debounce=null}),1400)}render(){const t={"c-input":true,"c-input--disabled":this.disabled,"c-input--shadow":this.shadow,"c-input--textarea":this.rows>1,"c-input--error":!this.valid,filled:!!this.value,[`c-input--${this.variant}`]:true};return i(e,{disabled:this.disabled},i("div",{id:"announce-"+this.inputId,class:"visuallyhidden","aria-live":"polite","aria-atomic":"true"},this.statusText),i("div",{class:t},i("div",{class:"c-input__control"},i("div",{class:"c-input__slot",onClick:()=>this._onFocus()},this._renderBorders(),i("div",{class:"c-input__field",style:{"--_c-input-label-position":this.preSlotWidth+"px"}},i("slot",{name:"pre"}),this._renderLabel(),i("slot",null))),this.variant==="select"&&i("slot",{name:"dropdown"}),!this.hideDetails&&i("c-message",{hint:this.hint,inputId:this.inputId,valid:this.valid,validation:this.validation}))))}get el(){return s(this)}static get watchers(){return{valid:["onValidChange"],validation:["onValidationMessageChange"],value:["onValueChange"],placeholder:["onPlaceholderChange"]}}};l.style=h;export{a as c_dropdown,l as c_input};
2
+ //# sourceMappingURL=p-50db6941.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["cDropdownCss","CDropdown","this","_id","_debounce","_itemRefs","_lastKeyPressTime","_openedOnTop","_searchString","_observer","IntersectionObserver","entries","observer","forEach","entry","isIntersecting","target","scrollIntoView","block","inline","unobserve","threshold","_renderMenuItem","item","index","isActive","_a","items","currentIndex","value","itemId","replace","inputId","parent","setActiveDescendant","listItem","document","createElement","role","ariaPosInSet","toString","ariaSetSize","length","ariaSelected","id","dataset","name","setAttribute","classList","toggle","disabled","addEventListener","event","isDisabled","contains","preventDefault","_onSelect","add","remove","push","Object","keys","options","requestAnimationFrame","option","query","type","optionValue","querySelector","innerHTML","_highlightMatchingText","textContent","appendChild","_listElement","span","onItemsChange","_updateMenuItems","onOptionsChange","updateDropdown","params","_updateStatusText","focusDropdown","focus","open","focusList","_onOpen","_createEventListeners","_outsideClickFn","_handleOutsideClick","bind","_handleCurrentIndexChange","_positionMenu","window","close","_onClose","removeEventListener","focusItem","onCurrentIndexChange","_listSize","_firstSelectableIndex","findIndex","_lastSelectableIndex","findLastIndex","regex","RegExp","highlighted","match","_renderEmptyItem","emptyElement","tabIndex","icon","path","mdiAlert","size","color","append","replaceChildren","map","_renderMenu","dialogElement","listElement","ariaExpanded","isVisible","_dialogElement","host","shadowRoot","_onKeyboardNavigation","_onKeyDown","isOpen","showModal","focusInput","onHideMenu","onItemSelection","i","_getParentPosition","getBoundingClientRect","innerWidth","innerHeight","bottom","parentBottom","left","parentLeft","width","parentWidth","top","parentTop","style","removeProperty","right","height","isInView","x","y","fitsOnTop","maxHeight","topPosition","parseFloat","async","_scrollToElement","itemsPerPage","itemRef","observe","stopPropagation","wasClicked","letterNumber","key","updatedQuery","slice","updateQuery","Date","now","selectedItem","find","toLowerCase","startsWith","element","_b","composedPath","includes","clearTimeout","setTimeout","selection","ending","beginning","selectionText","statusText","componentDidLoad","_resizeObserver","ResizeObserver","body","disconnectedCallback","disconnect","render","h","Host","class","cInputCss","CInput","_hasBlurred","_calculateElementWidths","_onBlur","isFocused","_onReset","_onFocus","click","inputField","variant","itemClick","emit","placeholder","onValidChange","validateOnBlur","_setAriaDescriptionId","onValidationMessageChange","onValueChange","onPlaceholderChange","autofocus","label","_labelRef","_c","_preventNonNumericalInput","title","_d","container","closest","_dropdownElement","removeAttribute","valid","hint","labelWidth","scrollWidth","preSlotWidth","offsetLeft","_renderBorders","shadow","classes","active","_renderLabel","htmlFor","ref","el","required","validation","containerClasses","rows","filled","onClick","hideDetails"],"sources":["src/components/c-dropdown/c-dropdown.scss?tag=c-dropdown&encapsulation=shadow","src/components/c-dropdown/c-dropdown.tsx","src/components/c-input/c-input.scss?tag=c-input","src/components/c-input/c-input.tsx"],"sourcesContent":[":host(c-dropdown) {\n /**\n * @prop --c-dropdown-background-color: Menu background color\n * @prop --c-dropdown-background-color-hover: Menu item hover background color\n * @prop --c-dropdown-text-color: Menu item text color\n * @prop --c-dropdown-text-color-active: Active menu item text color\n */\n --_c-dropdown-background-color: var(--c-dropdown-background-color, var(--c-white));\n --_c-dropdown-background-color-hover: var(--c-dropdown-background-color-hover, var(--c-primary-200));\n --_c-dropdown-text-color: var(--c-dropdown-text-color, var(--c-text-body));\n --_c-dropdown-text-color-active: var(--c-dropdown-text-color-active, var(--c-primary-600));\n\n // private\n --_c-dropdown-font-size: 14px;\n --_c-dropdown-height: 42px;\n\n display: block;\n position: absolute;\n\n mark {\n background-color: transparent;\n box-shadow: 0 2px 0 0 var(--_c-dropdown-text-color-active);\n color: inherit;\n }\n\n dialog {\n background-color: transparent;\n border-radius: 4px;\n border: none;\n box-shadow: 2px 4px 10px #00000029;\n margin: 0;\n overflow-y: scroll;\n padding: 0;\n position: fixed;\n\n &::backdrop {\n display: none;\n }\n }\n\n ul {\n background-color: var(--_c-dropdown-background-color);\n border-radius: 4px;\n list-style: none;\n margin: 0;\n outline: none;\n padding: 0;\n pointer-events: auto;\n visibility: hidden;\n width: 100%;\n\n &.active {\n visibility: visible;\n animation: 0.2s 1 fade-in cubic-bezier(0.25, 0.8, 0.5, 1);\n }\n }\n\n li {\n align-items: center;\n column-gap: 12px;\n cursor: pointer;\n display: flex;\n flex-wrap: nowrap;\n font-size: var(--_c-dropdown-font-size);\n min-height: var(--_c-dropdown-height);\n outline: none;\n padding-left: 10px;\n padding-right: 10px;\n pointer-events: auto;\n white-space: nowrap;\n width: 100%;\n border-radius: 4px;\n \n span,\n c-option-value {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 100%;\n }\n\n &:not(.disabled):hover,\n &.active {\n background: var(--_c-dropdown-background-color-hover);\n color: var(--_c-dropdown-text-color-active);\n box-shadow: inset 0 0 0 1px var(--_c-dropdown-text-color-active);\n }\n\n &.disabled {\n background-color: rgba(var(--c-tertiary-rgb), 0.05);\n cursor: default;\n filter: grayscale(1) opacity(0.75);\n }\n }\n\n .visuallyhidden {\n border: 0;\n clip: rect(1px, 1px, 1px, 1px);\n height: 1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px;\n }\n\n @keyframes fade-in {\n from {\n opacity: 0;\n transform: translateY(-8px);\n }\n\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n}\n","import {\n Component,\n Element,\n Host,\n Method,\n Prop,\n State,\n Watch,\n h,\n} from '@stencil/core';\nimport { CAutocompleteItem, CSelectItem } from '../../types';\nimport { mdiAlert } from '@mdi/js';\n\nexport type _CDropdownUpdateParams = {\n items?: CSelectItem[] | CAutocompleteItem[];\n options?: Record<string, HTMLCOptionElement>;\n};\n\n@Component({\n tag: 'c-dropdown',\n styleUrl: 'c-dropdown.scss',\n shadow: true,\n})\nexport class CDropdown {\n @Element() host: HTMLCDropdownElement;\n\n /**\n * Dropdown items\n */\n @Prop() items: CSelectItem[] | CAutocompleteItem[] = [];\n\n @Watch('items')\n onItemsChange() {\n if (!this.items.length) return;\n\n this._updateMenuItems();\n }\n\n /**\n * Dropdown options\n */\n @Prop() options: Record<string, HTMLCOptionElement>;\n\n @Watch('options')\n onOptionsChange() {\n if (!Object.keys(this.options).length) return;\n\n this._updateMenuItems();\n }\n\n /**\n * Items per page before adding scroll\n */\n @Prop() itemsPerPage: number;\n\n /**\n * Dropdown parent\n */\n @Prop() parent: HTMLCSelectElement | HTMLCAutocompleteElement;\n\n /**\n * Initial value index\n */\n @Prop() index: number;\n\n /**\n * Dropdown open state\n */\n @Prop() isOpen = false;\n\n /**\n * Focus dropdown on open\n */\n @Prop() focusList: boolean;\n\n /**\n * Id of the input element\n */\n @Prop() inputId: string;\n\n /**\n * Type of the parent element\n */\n @Prop() type: 'select' | 'autocomplete';\n\n /**\n * @private\n */\n @Prop() wasClicked = false;\n\n @State() currentIndex: number = null;\n\n @State() isVisible = false;\n\n @State() topPosition: number;\n\n @State() statusText = '';\n\n private _id = '';\n\n /**\n * @private\n */\n @Method()\n async updateDropdown(params: _CDropdownUpdateParams) {\n this.items = [];\n this._itemRefs = [];\n this.options = {};\n\n requestAnimationFrame(() => {\n this.currentIndex = null;\n this.items = params.items || this.items;\n this.options = params.options || this.options;\n\n this._updateMenuItems();\n this._updateStatusText();\n });\n }\n\n /**\n * @private\n */\n @Method()\n async focusDropdown() {\n requestAnimationFrame(() => {\n this._listElement.focus();\n });\n }\n\n /**\n * @private\n */\n @Method()\n async open(focusList = false) {\n this._onOpen();\n this._createEventListeners();\n\n this._outsideClickFn = this._handleOutsideClick.bind(this);\n\n requestAnimationFrame(() => {\n if (focusList) {\n this._listElement.focus();\n\n if (this.type === 'autocomplete') {\n this.currentIndex = 0;\n }\n\n this._handleCurrentIndexChange();\n }\n\n this._positionMenu();\n\n window.addEventListener('click', this._outsideClickFn);\n });\n }\n\n /**\n * @private\n */\n @Method()\n async close() {\n this._openedOnTop = false;\n this._onClose();\n\n window.removeEventListener('click', this._outsideClickFn);\n }\n\n /**\n * @private\n */\n @Method()\n async focusItem(type: number) {\n requestAnimationFrame(() => {\n this.currentIndex = type;\n\n this._itemRefs[this.currentIndex].focus();\n });\n }\n\n @Watch('currentIndex')\n onCurrentIndexChange() {\n this._handleCurrentIndexChange();\n }\n\n private _debounce = null;\n\n private _itemRefs: HTMLLIElement[] = [];\n\n private _lastKeyPressTime = null;\n\n private _listElement: HTMLUListElement;\n\n private _dialogElement: HTMLDialogElement;\n\n private _openedOnTop = false;\n\n private _searchString = '';\n\n private _resizeObserver: ResizeObserver;\n\n private _outsideClickFn: () => void;\n\n private get _listSize() {\n return this.items.length || 0;\n }\n\n private get _firstSelectableIndex() {\n return this.items.findIndex((item) => !item.disabled);\n }\n\n private get _lastSelectableIndex() {\n return this.items.findLastIndex((item) => !item.disabled);\n }\n\n private _observer = new IntersectionObserver(\n (entries, observer) => {\n entries.forEach((entry) => {\n if (!entry.isIntersecting) {\n entry.target.scrollIntoView({\n block: 'nearest',\n inline: 'nearest',\n });\n observer.unobserve(entry.target);\n } else {\n observer.unobserve(entry.target);\n }\n });\n },\n { threshold: 1 },\n );\n\n private _highlightMatchingText(value: string) {\n if (\n this.type === 'select' ||\n (this.parent as HTMLCAutocompleteElement).query === ''\n )\n return value;\n\n const regex = new RegExp(\n (this.parent as HTMLCAutocompleteElement).query,\n 'gi',\n );\n\n const highlighted = value\n .replace(/(<([^>]+)>)/gi, '')\n .replace(regex, (match) => `<mark>${match}</mark>`);\n\n return highlighted;\n }\n\n private _renderMenuItem = (item: CSelectItem, index: number) => {\n const isActive = this.items[this.currentIndex]?.value === item.value;\n\n let itemId = 'none';\n\n if (typeof item?.value === 'string') {\n itemId = item.value.replace(/[^a-zA-Z0-9-_]/g, '');\n }\n\n itemId = `item_${this.inputId}--${itemId}`;\n\n if (isActive) {\n this.currentIndex = index;\n this.parent.setActiveDescendant(itemId);\n }\n\n const listItem = document.createElement('li');\n\n // a11y\n listItem.role = 'option';\n listItem.ariaPosInSet = (index + 1).toString();\n listItem.ariaSetSize = this.items.length.toString();\n\n listItem.ariaSelected = isActive.toString();\n\n listItem.id = itemId;\n listItem.dataset.value = item.name;\n listItem.setAttribute('tabindex', '-1');\n\n listItem.classList.toggle('disabled', !!item.disabled);\n\n listItem.addEventListener('click', (event: MouseEvent) => {\n const isDisabled = this._itemRefs[index].classList.contains('disabled');\n\n if (isDisabled) {\n event.preventDefault();\n\n return;\n }\n\n this.currentIndex = index;\n this._onSelect(index);\n });\n\n listItem.addEventListener('focus', () => {\n listItem.classList.add('active');\n });\n\n listItem.addEventListener('blur', () => {\n listItem.classList.remove('active');\n });\n\n this._itemRefs.push(listItem);\n\n if (Object.keys(this.options).length) {\n requestAnimationFrame(() => {\n const option = this.options[item.value as string];\n\n if (!option) return;\n\n if (\n (this.parent as HTMLCAutocompleteElement).query?.length &&\n this.type === 'autocomplete'\n ) {\n const optionValue = option.querySelector('c-option-value');\n\n if (optionValue) {\n optionValue.innerHTML = this._highlightMatchingText(\n optionValue.textContent,\n );\n }\n }\n\n listItem.appendChild(option);\n\n this._listElement.appendChild(listItem);\n });\n\n return;\n }\n\n const span = document.createElement('span');\n span.innerHTML = this._highlightMatchingText(item.name);\n\n listItem.appendChild(span);\n\n this._listElement.appendChild(listItem);\n };\n\n private _renderEmptyItem() {\n const emptyElement = document.createElement('li');\n emptyElement.tabIndex = -1;\n\n const icon = document.createElement('c-icon');\n icon.path = mdiAlert;\n icon.size = 18;\n icon.color = 'var(--c-warning-600)';\n\n emptyElement.appendChild(icon);\n emptyElement.append('No suggestions found');\n\n this._listElement.replaceChildren(emptyElement);\n }\n\n private _updateMenuItems() {\n if (!this.items.length) {\n this._renderEmptyItem();\n\n return;\n }\n\n this._listElement.replaceChildren();\n this._itemRefs.length = 0;\n\n this.items.map((item, index) => this._renderMenuItem(item, index));\n\n requestAnimationFrame(() => {\n this._positionMenu();\n });\n }\n\n private _renderMenu() {\n this._id = `${this.inputId}--items`;\n\n const dialogElement = document.createElement('dialog');\n\n const listElement = document.createElement('ul');\n\n // a11y\n listElement.role = `listbox`;\n listElement.ariaExpanded = this.isVisible.toString();\n listElement.tabIndex = -1;\n\n listElement.id = this._id;\n\n this._dialogElement = dialogElement;\n\n this._listElement = listElement;\n\n this._dialogElement.appendChild(listElement);\n\n this.host.shadowRoot.appendChild(dialogElement);\n\n this.items.map((item, index) => this._renderMenuItem(item, index));\n\n this._listElement.addEventListener(\n 'keydown',\n this._onKeyboardNavigation.bind(this),\n );\n\n this._listElement.addEventListener('keyup', this._onKeyDown.bind(this));\n }\n\n private _onOpen() {\n this.parent.shadowRoot.querySelector('.c-input').classList.add('active');\n this._listElement.classList.add('active');\n this.isOpen = true;\n this._listElement.ariaExpanded = 'true';\n this._listElement.tabIndex = 0;\n this._dialogElement.showModal();\n }\n\n private _onClose(focusInput = false) {\n this.parent.onHideMenu();\n this.parent.shadowRoot.querySelector('.c-input').classList.remove('active');\n this._listElement.classList.remove('active');\n this._listElement.ariaExpanded = 'false';\n this._listElement.tabIndex = -1;\n this.isOpen = false;\n this.currentIndex = this.index;\n this._dialogElement.close();\n\n if (focusInput) {\n this.parent.shadowRoot.querySelector('input').focus();\n }\n }\n\n private _onSelect(index: number, focusInput = false) {\n if (index === null) return;\n\n const isDisabled = this._itemRefs[index].classList.contains('disabled');\n\n if (isDisabled) return;\n\n this.parent.onItemSelection(index);\n this.index = index;\n this._onClose(focusInput);\n\n this._itemRefs.forEach((item, i) => {\n item.ariaSelected = (i === index).toString();\n });\n }\n\n private _getParentPosition() {\n return this.parent.shadowRoot\n .querySelector('.c-input__slot')\n .getBoundingClientRect();\n }\n\n private _positionMenu() {\n const { innerWidth, innerHeight } = window;\n\n const {\n bottom: parentBottom,\n left: parentLeft,\n width: parentWidth,\n top: parentTop,\n } = this._getParentPosition();\n\n this._dialogElement.style.width = `${parentWidth}px`;\n this._dialogElement.style.top = `${parentBottom}px`;\n this._dialogElement.style.bottom = 'auto';\n this._dialogElement.style.left = `${parentLeft}px`;\n\n this._dialogElement.style.removeProperty('transform');\n\n const { bottom, right, height, width } =\n this._dialogElement.getBoundingClientRect();\n\n const isInView = {\n x: right < innerWidth,\n y: bottom < innerHeight,\n };\n\n const fitsOnTop = parentTop - height > 0;\n\n if (!fitsOnTop && !isInView.y) {\n this._dialogElement.style.maxHeight = `${parentTop}px`;\n }\n\n if (!isInView.y || this._openedOnTop) {\n this._openedOnTop = true;\n\n this._dialogElement.style.top = 'auto';\n this._dialogElement.style.bottom = `${innerHeight - parentTop}px`;\n }\n\n this.topPosition = parentBottom;\n\n if (!isInView.x) {\n this._dialogElement.style.left = `${\n parseFloat(this._dialogElement.style.left) - width + parentWidth\n }px`;\n }\n }\n\n private _createEventListeners() {\n requestAnimationFrame(async () => {\n this._listElement.classList.add('active');\n });\n }\n\n private _scrollToElement() {\n if (this.items.length > this.itemsPerPage) {\n const itemRef = this._itemRefs[this.currentIndex];\n\n if (!!itemRef) {\n this._observer.observe(itemRef);\n }\n }\n }\n\n private _onKeyDown(event: KeyboardEvent) {\n event.preventDefault();\n event.stopPropagation();\n }\n\n private _onKeyboardNavigation(event: KeyboardEvent) {\n this.wasClicked = false;\n\n const letterNumber = /^[0-9a-zA-Z]+$/;\n\n if (\n (event.key.match(letterNumber) && event.key.length === 1) ||\n event.key === 'Backspace'\n ) {\n if (this.type === 'autocomplete') {\n const { query } = this.parent as HTMLCAutocompleteElement;\n\n let updatedQuery = '';\n\n if (event.key === 'Backspace') {\n updatedQuery = query.slice(0, -1);\n } else {\n updatedQuery = `${query}${event.key}`;\n }\n\n (this.parent as HTMLCAutocompleteElement).updateQuery(updatedQuery);\n\n return;\n }\n\n if (\n Date.now() - this._lastKeyPressTime > 3000 ||\n this._searchString.length > 2\n ) {\n this._searchString = event.key;\n } else {\n this._searchString = `${this._searchString}${event.key}`;\n }\n\n this._lastKeyPressTime = Date.now();\n\n const selectedItem = this.items.find((i) =>\n i.name.toLowerCase().startsWith(this._searchString),\n );\n\n if (selectedItem) {\n this.currentIndex = this.items.findIndex(\n (element) => element === selectedItem,\n );\n\n if (this.isOpen) {\n this._scrollToElement();\n } else {\n this._onSelect(this.currentIndex, true);\n }\n }\n }\n\n if (event.key === 'Enter') {\n this._onSelect(this.currentIndex, true);\n }\n\n if (event.key === ' ' && !this.isOpen) {\n event.preventDefault();\n\n this.isOpen = true;\n }\n\n if ('Tab' === event.key) {\n this._onClose();\n }\n\n if (event.key === 'Escape') {\n this._onClose(true);\n }\n\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n event.stopPropagation();\n\n if (this.currentIndex === null) {\n this.currentIndex = 0;\n } else if (this.isOpen && this.currentIndex + 1 < this._listSize) {\n this.currentIndex += 1;\n }\n\n this.isOpen = true;\n }\n\n if (event.key === 'ArrowUp') {\n event.preventDefault();\n event.stopPropagation();\n\n if (this.isOpen && this.currentIndex === 0) {\n this.currentIndex = null;\n this._onClose(true);\n\n return;\n } else if (this.isOpen && this.currentIndex > 0) {\n this.currentIndex -= 1;\n } else if (this.currentIndex === null) {\n this.currentIndex = this._listSize - 1;\n }\n\n this.isOpen = true;\n }\n\n if (event.key === 'Home' && this.isOpen) {\n event.preventDefault();\n\n this.currentIndex = this._firstSelectableIndex;\n }\n\n if (event.key === 'End' && this.isOpen) {\n event.preventDefault();\n\n this.currentIndex = this._lastSelectableIndex;\n }\n }\n\n private _handleCurrentIndexChange() {\n if (this.currentIndex === null) {\n this.parent?.setActiveDescendant('');\n\n return;\n }\n\n this._updateStatusText();\n\n requestAnimationFrame(() => {\n const item = this._itemRefs[this.currentIndex];\n\n if (!item) return;\n\n item?.focus();\n\n this.parent?.setActiveDescendant(item.id ?? null);\n });\n }\n\n private _handleOutsideClick(event) {\n if (!event.composedPath().includes(this._dialogElement)) {\n this.close();\n }\n }\n\n private _updateStatusText() {\n if (this._debounce !== null) {\n clearTimeout(this._debounce);\n this._debounce = null;\n }\n\n this._debounce = window.setTimeout(() => {\n const selection = this._itemRefs[this.currentIndex];\n\n const ending = !!this.items.length\n ? ', to navigate use up and down arrows'\n : '';\n\n const isDisabled = !!selection?.classList?.contains('disabled');\n\n const beginning = isDisabled ? 'Disabled option - ' : '';\n\n let selectionText = !!selection\n ? `${beginning}${selection.dataset.value} - ${selection.ariaPosInSet} of ${selection.ariaSetSize} is highlighted`\n : null;\n\n if (this.currentIndex === null && this.type === 'autocomplete') {\n selectionText = this.items.length\n ? `${this.items.length} result${\n this.items.length !== 1 ? 's' : ''\n } available`\n : 'No search results available';\n }\n\n this.statusText = `${selectionText || ending}`;\n\n this._debounce = null;\n }, 1400);\n }\n\n componentDidLoad() {\n this._renderMenu();\n\n this.currentIndex = this.index;\n\n this._resizeObserver = new ResizeObserver(() => {\n if (!this.isOpen) return;\n\n this._positionMenu();\n });\n\n this._resizeObserver.observe(window.document.body);\n }\n\n disconnectedCallback() {\n this._resizeObserver.disconnect();\n }\n\n render() {\n if (\n this._dialogElement &&\n this.itemsPerPage &&\n this.itemsPerPage > 0 &&\n this.items.length > this.itemsPerPage\n ) {\n this._dialogElement.style.maxHeight =\n 42 * (this.itemsPerPage + 0.5) + 'px';\n }\n\n return (\n <Host>\n <div\n id={'announce-' + this._id}\n class=\"visuallyhidden\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n {this.statusText}\n </div>\n </Host>\n );\n }\n}\n",":root,\n:host {\n --_c-input-inactive-color: var(--c-tertiary-600);\n --_c-input-active-color: var(--c-primary-600);\n --_c-input-background-color: var(--c-transparent);\n --_c-input-text-color: var(--c-text-body);\n --_c-input-placeholder-color: var(--c-tertiary-500);\n --_c-input-shadow-active-color: var(--_c-input-active-color);\n --_c-input-shadow-background-color: var(--c-white);\n --_c-input-shadow-text-color: var(--_c-input-text-color);\n --_c-input-shadow-placeholder-color: var(--_c-input-placeholder-color);\n\n // private\n --_c-input-error-color: var(--c-error-600);\n}\n\n.visuallyhidden {\n border: 0;\n clip: rect(0 0 0 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n.c-input {\n $this: &;\n\n --_c-input-border-width: 1px;\n\n align-items: flex-start;\n border-radius: 4px;\n display: flex;\n flex: 1 1 auto;\n font-family: var(--c-font-family);\n font-size: 16px;\n letter-spacing: normal;\n max-width: 100%;\n text-align: left;\n\n input,\n select,\n textarea {\n background: none;\n border: 0;\n display: inline-block;\n font-family: var(--c-font-family);\n font-size: 16px;\n line-height: 1;\n margin: 0;\n padding: 0;\n vertical-align: middle;\n white-space: normal;\n }\n\n input,\n textarea {\n box-sizing: content-box;\n background-color: transparent;\n border: none;\n color: var(--_c-input-text-color);\n flex: 1 1 auto;\n font-family: var(--c-font-family);\n font-size: 16px;\n line-height: 20px;\n max-width: 100%;\n min-width: 0;\n width: 100%;\n }\n\n input[type=\"checkbox\"],\n input[type=\"radio\"],\n select {\n box-sizing: border-box;\n }\n\n input[type=\"search\"] {\n appearance: textfield;\n box-sizing: content-box;\n }\n\n ::-webkit-search-decoration {\n display: none;\n }\n\n textarea {\n margin-top: 4px;\n min-height: 44px;\n overflow: auto;\n padding: 8px 12px 8px 0;\n resize: vertical;\n vertical-align: top;\n }\n\n input {\n max-height: 32px;\n padding: 8px 0;\n }\n\n input:focus,\n input:active,\n textarea:focus,\n textarea:active {\n outline: none;\n }\n\n .c-input__content {\n align-items: center;\n display: flex;\n width: 100%;\n }\n\n &__control {\n border-radius: inherit;\n color: currentColor;\n display: flex;\n flex-flow: column wrap;\n flex-grow: 1;\n gap: 8px;\n height: auto;\n min-width: 0;\n width: 100%;\n position: relative;\n }\n\n &__slot {\n align-items: stretch;\n background: transparent;\n border-radius: inherit;\n color: inherit;\n cursor: text;\n display: flex;\n min-height: 44px;\n padding: 0 12px;\n position: relative;\n transition: 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);\n width: 100%;\n }\n\n &__field {\n align-items: center;\n display: flex;\n flex: 1 1 auto;\n gap: 8px;\n position: relative;\n\n input,\n textarea {\n flex: 1;\n outline: 0;\n }\n\n label {\n font-size: 16px;\n height: 20px;\n left: 0;\n letter-spacing: normal;\n line-height: 20px;\n max-width: 90%;\n min-height: 8px;\n overflow: hidden;\n pointer-events: none;\n position: absolute;\n right: auto;\n text-overflow: ellipsis;\n top: 12px;\n transform-origin: top left;\n transform: translateX(var(--_c-input-label-position)) translateY(0)\n scale(1);\n transition: 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);\n white-space: nowrap;\n\n &.active {\n transform: translateY(-18px) scale(0.75);\n }\n\n span {\n color: var(--_c-input-error-color);\n }\n }\n }\n\n &--select {\n input {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .c-input__slot {\n cursor: pointer;\n }\n }\n\n fieldset {\n background-color: var(--_c-input-background-color);\n border-collapse: collapse;\n border-color: var(--_c-input-inactive-color);\n border-radius: inherit;\n border-style: solid;\n border-width: var(--_c-input-border-width);\n inset: 0;\n margin: 0;\n padding: 0 0 0 8px;\n pointer-events: none;\n position: absolute;\n transition-duration: 0.15s;\n transition-property: color;\n transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);\n\n legend {\n float: none;\n line-height: 11px;\n margin-left: -1px;\n padding: 0;\n text-align: left;\n transition: width 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);\n width: 0;\n\n &.active {\n width: var(--_c-input-legend-width);\n }\n }\n }\n\n &--shadow {\n #{$this} {\n &__slot {\n background-color: var(--_c-input-shadow-background-color);\n box-shadow: rgba(0, 0, 0, 0.15) 0 5px 15px 0;\n\n input,\n textarea {\n color: var(--_c-input-shadow-text-color);\n }\n\n &:focus-within {\n outline: 2px var(--_c-input-active-color) solid;\n\n c-icon {\n --c-icon-color: var(--_c-input-shadow-active-color) !important;\n }\n }\n }\n }\n\n input::placeholder,\n textarea::placeholder {\n color: var(--_c-input-shadow-placeholder-color);\n opacity: 1;\n }\n }\n\n &--disabled {\n input,\n textarea,\n fieldset,\n label {\n --_c-input-error-color: var(--c-tertiary-500);\n\n color: var(--c-tertiary-500);\n }\n }\n\n &--textarea {\n #{$this} {\n &__field {\n margin-right: -12px;\n }\n }\n }\n\n ::placeholder {\n color: var(--_c-input-placeholder-color);\n opacity: 1;\n }\n\n &:focus-within,\n &.active,\n &:not(.c-input--disabled):active {\n --_c-input-border-width: 2px;\n\n color: var(--_c-input-active-color);\n\n fieldset {\n border-color: var(--_c-input-active-color);\n }\n\n label {\n color: var(--_c-input-active-color);\n transform: translateX(0) translateY(-18px) scale(0.75);\n }\n\n legend {\n width: var(--_c-input-legend-width);\n }\n }\n\n &.active:not(.filled) {\n .c-input-menu__input {\n position: relative;\n\n &::after {\n display: flex;\n align-items: center;\n position: absolute;\n inset: 0;\n content: attr(data-placeholder);\n pointer-events: none;\n color: var(--_c-input-placeholder-color);\n }\n }\n }\n\n &--error {\n color: var(--_c-input-error-color);\n\n fieldset {\n border-color: var(--_c-input-error-color) !important;\n }\n\n label {\n color: var(--_c-input-error-color) !important;\n }\n\n &:focus-within {\n color: var(--_c-input-error-color);\n }\n }\n}\n","import {\n Component,\n Host,\n h,\n State,\n Prop,\n Event,\n EventEmitter,\n Element,\n Watch,\n} from '@stencil/core';\nimport { CAutocompleteItem, CSelectItem } from '../../types';\n\n/**\n * @parent None\n */\n@Component({\n tag: 'c-input',\n styleUrl: 'c-input.scss',\n shadow: false,\n})\nexport class CInput {\n @Element() el!: HTMLCInputElement;\n\n /**\n * Auto focus the input\n */\n @Prop() autofocus = false;\n\n /**\n * Disable the input\n */\n @Prop() disabled = false;\n\n /**\n * Render a hidden input outside the shadow dom\n */\n @Prop() form = false;\n\n /**\n * Hide the hint and error messages\n */\n @Prop() hideDetails = false;\n\n /**\n * Hint text for the input\n */\n @Prop() hint = '';\n\n /**\n * Id of the input\n */\n @Prop({ attribute: 'id' }) hostId: string;\n\n /**\n * Id of the input element\n */\n @Prop() inputId: string;\n\n /**\n * Items for the dropdown\n */\n @Prop() items: CSelectItem[];\n\n /**\n * Items per page before adding scroll\n */\n @Prop() itemsPerPage = 6;\n\n /**\n * Label of the input\n */\n @Prop() label: string;\n\n /**\n * Maximum value on a numeric input\n */\n @Prop() max: number = null;\n\n /**\n * Minimum value on a numeric input\n */\n @Prop() min: number = null;\n\n /**\n * Name of the input\n */\n @Prop() name: string;\n\n /**\n * Placeholder of the input\n */\n @Prop() placeholder: string;\n\n /**\n * Mark as readonly\n */\n @Prop() readonly = false;\n\n /**\n * Set the input as required\n */\n @Prop() required = false;\n\n /**\n * Rows on the input\n */\n @Prop() rows = 1;\n\n /**\n * Shadow variant of the input\n */\n @Prop() shadow = false;\n\n /**\n * Step size on a numeric input\n */\n @Prop() step: number = null;\n\n /**\n * Type of the input\n */\n @Prop() type: string;\n\n /**\n * Set the validíty of the input\n */\n @Prop() valid = true;\n\n /**\n * Manual validation\n */\n @Prop() validate = false;\n\n /**\n * Validate the input on blur\n */\n @Prop() validateOnBlur = false;\n\n /**\n * Custom validation message\n */\n @Prop() validation = 'Required field';\n\n /**\n * Value of the input\n */\n @Prop() value: string | number | boolean | CSelectItem | CAutocompleteItem;\n\n /**\n * Variant\n */\n @Prop() variant: 'text' | 'select' = 'text';\n\n /**\n * Emit changes to the parent\n */\n @Event({ bubbles: false }) changeValue: EventEmitter;\n\n /**\n * Emit click to the parent\n * @private\n */\n @Event({ bubbles: false }) itemClick: EventEmitter;\n\n /**\n * Emit close to the parent\n * @private\n */\n @Event({ bubbles: false }) dropdownClose: EventEmitter;\n\n @State() isFocused = false;\n\n @State() labelWidth = 0;\n\n @State() preSlotWidth = 0;\n\n @State() statusText = '';\n\n @State() currentIndex: number = null;\n\n @Watch('valid')\n onValidChange() {\n if (this.validateOnBlur && !this._hasBlurred) return;\n\n this._setAriaDescriptionId();\n }\n\n @Watch('validation')\n onValidationMessageChange() {\n this._updateStatusText();\n }\n\n @Watch('value')\n onValueChange(value) {\n if (!value) {\n this._onReset();\n }\n }\n\n @Watch('placeholder')\n onPlaceholderChange(placeholder) {\n if (placeholder) this._onReset();\n }\n\n private _hasBlurred = false;\n\n private _labelRef: HTMLLabelElement;\n\n private _debounce = null;\n\n private _dropdownElement: HTMLCDropdownElement;\n\n componentDidLoad() {\n if (this.autofocus) {\n setTimeout(() => {\n this._onFocus(false);\n }, 500);\n }\n\n this._calculateElementWidths();\n this._setAriaDescriptionId();\n\n if (this.label) {\n this._observer.observe(this._labelRef);\n }\n\n this.inputField?.addEventListener('focus', () => this._onFocus(false));\n this.inputField?.addEventListener('blur', () => this._onBlur());\n this.inputField?.addEventListener(\n 'keypress',\n this._preventNonNumericalInput,\n );\n\n // hide the placeholder text initially if there is a label\n if (this.inputField) {\n this.inputField.placeholder =\n !!this.label || !this.placeholder ? '' : this.placeholder;\n\n this.inputField.title = this.label ?? this.placeholder;\n\n requestAnimationFrame(() => {\n const container = this.inputField.closest(\n '.c-input-menu__input',\n ) as HTMLDivElement;\n\n if (!container) return;\n\n container.dataset.placeholder = this.placeholder;\n });\n }\n }\n\n disconnectedCallback() {\n this.inputField?.removeEventListener('focus', () => this._onFocus(false));\n this.inputField?.removeEventListener('blur', () => this._onBlur());\n this.inputField?.removeEventListener(\n 'keypress',\n this._preventNonNumericalInput,\n );\n\n this._observer.disconnect();\n\n this._dropdownElement?.remove();\n }\n\n get isActive() {\n return !!this.value || typeof this.value === 'boolean' || this.isFocused;\n }\n\n private _setAriaDescriptionId() {\n this.inputField.removeAttribute('aria-describedby');\n\n let type = null;\n\n if (this.valid && !this.value && this.hint) {\n type = 'hint';\n }\n\n if (!this.valid) {\n type = 'error';\n }\n\n if (type) {\n this.inputField.setAttribute(\n 'aria-describedby',\n `${type}-${this.inputId}`,\n );\n }\n }\n\n private _observer = new IntersectionObserver(\n (entries, observer) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n this._calculateElementWidths();\n observer.unobserve(entry.target);\n }\n });\n },\n { threshold: 1 },\n );\n\n private _calculateElementWidths() {\n this.labelWidth = !!this.label ? this._labelRef.scrollWidth * 0.75 + 6 : 0;\n this.preSlotWidth = this.inputField.offsetLeft;\n }\n\n private _onBlur = () => {\n // delay the blur event to prevent the label from 'flashing' on c-select selection\n setTimeout(() => {\n this.isFocused = false;\n this._hasBlurred = true;\n\n // show the label if there's no label or value\n this._onReset();\n }, 100);\n };\n\n private _onFocus = (click = true) => {\n if (this.disabled) return;\n\n this.isFocused = true;\n\n this.inputField?.focus();\n\n if (click) {\n this.inputField?.click();\n\n if (this.variant === 'select') {\n this.itemClick.emit();\n }\n }\n\n // show the label if there's no value\n if (this.inputField) {\n this.inputField.placeholder =\n !!this.value || !this.placeholder ? '' : this.placeholder;\n }\n };\n\n private _onReset() {\n if (this.inputField) {\n this.inputField.placeholder =\n !this.label && !this.value && !!this.placeholder\n ? this.placeholder\n : '';\n }\n }\n\n /**\n * Prevent non numeric values in the numeric fields\n */\n private _preventNonNumericalInput(event: KeyboardEvent) {\n if (this.type !== 'number') return;\n\n if (!event.key.match(/^[0-9,\\.]+$/)) event.preventDefault();\n }\n\n private _renderBorders() {\n if (this.shadow) return;\n\n const classes = {\n active: this.isActive,\n };\n\n return (\n <fieldset aria-hidden=\"true\">\n <legend\n class={classes}\n style={{\n '--_c-input-legend-width': this.labelWidth + 'px',\n }}\n >\n <span class=\"notranslate\"></span>\n </legend>\n </fieldset>\n );\n }\n\n private _renderLabel() {\n if (!this.label) return;\n\n const classes = {\n active: this.isActive,\n };\n\n return (\n <label\n htmlFor={this.inputId}\n ref={(el) => (this._labelRef = el as HTMLLabelElement)}\n class={classes}\n >\n {this.label}\n {this.required && <span>&nbsp;*</span>}\n </label>\n );\n }\n\n get inputField() {\n return this.el?.querySelector('.c-input__input') as\n | HTMLInputElement\n | HTMLTextAreaElement;\n }\n\n private _updateStatusText() {\n if (this._debounce !== null) {\n clearTimeout(this._debounce);\n this._debounce = null;\n }\n\n this._debounce = window.setTimeout(() => {\n this.statusText = this.valid ? '' : `Error: ${this.validation}`;\n\n this._debounce = null;\n }, 1400);\n }\n\n render() {\n const containerClasses = {\n 'c-input': true,\n 'c-input--disabled': this.disabled,\n 'c-input--shadow': this.shadow,\n 'c-input--textarea': this.rows > 1,\n 'c-input--error': !this.valid,\n filled: !!this.value,\n [`c-input--${this.variant}`]: true,\n };\n\n return (\n <Host disabled={this.disabled}>\n <div\n id={'announce-' + this.inputId}\n class=\"visuallyhidden\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n {this.statusText}\n </div>\n\n <div class={containerClasses}>\n <div class=\"c-input__control\">\n <div class=\"c-input__slot\" onClick={() => this._onFocus()}>\n {this._renderBorders()}\n\n <div\n class=\"c-input__field\"\n style={{\n '--_c-input-label-position': this.preSlotWidth + 'px',\n }}\n >\n <slot name=\"pre\"></slot>\n\n {this._renderLabel()}\n\n <slot></slot>\n </div>\n </div>\n\n {this.variant === 'select' && <slot name=\"dropdown\"></slot>}\n\n {!this.hideDetails && (\n <c-message\n hint={this.hint}\n inputId={this.inputId}\n valid={this.valid}\n validation={this.validation}\n />\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"oGAAA,MAAMA,EAAe,4vE,MCuBRC,EAAS,M,yBA2EZC,KAAAC,IAAM,GAsFND,KAAAE,UAAY,KAEZF,KAAAG,UAA6B,GAE7BH,KAAAI,kBAAoB,KAMpBJ,KAAAK,aAAe,MAEfL,KAAAM,cAAgB,GAkBhBN,KAAAO,UAAY,IAAIC,sBACtB,CAACC,EAASC,KACRD,EAAQE,SAASC,IACf,IAAKA,EAAMC,eAAgB,CACzBD,EAAME,OAAOC,eAAe,CAC1BC,MAAO,UACPC,OAAQ,YAEVP,EAASQ,UAAUN,EAAME,O,KACpB,CACLJ,EAASQ,UAAUN,EAAME,O,IAE3B,GAEJ,CAAEK,UAAW,IAsBPnB,KAAAoB,gBAAkB,CAACC,EAAmBC,K,MAC5C,MAAMC,IAAWC,EAAAxB,KAAKyB,MAAMzB,KAAK0B,iBAAa,MAAAF,SAAA,SAAAA,EAAEG,SAAUN,EAAKM,MAE/D,IAAIC,EAAS,OAEb,UAAWP,IAAI,MAAJA,SAAI,SAAJA,EAAMM,SAAU,SAAU,CACnCC,EAASP,EAAKM,MAAME,QAAQ,kBAAmB,G,CAGjDD,EAAS,QAAQ5B,KAAK8B,YAAYF,IAElC,GAAIL,EAAU,CACZvB,KAAK0B,aAAeJ,EACpBtB,KAAK+B,OAAOC,oBAAoBJ,E,CAGlC,MAAMK,EAAWC,SAASC,cAAc,MAGxCF,EAASG,KAAO,SAChBH,EAASI,cAAgBf,EAAQ,GAAGgB,WACpCL,EAASM,YAAcvC,KAAKyB,MAAMe,OAAOF,WAEzCL,EAASQ,aAAelB,EAASe,WAEjCL,EAASS,GAAKd,EACdK,EAASU,QAAQhB,MAAQN,EAAKuB,KAC9BX,EAASY,aAAa,WAAY,MAElCZ,EAASa,UAAUC,OAAO,aAAc1B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GnBF,KAAKE,UAAYwF,OAAOwF,YAAW,KACjClL,KAAKuL,WAAavL,KAAKiO,MAAQ,GAAK,UAAUjO,KAAKgP,aAEnDhP,KAAKE,UAAY,IAAI,GACpB,K,CAGL,MAAA4L,GACE,MAAMmD,EAAmB,CACvB,UAAW,KACX,oBAAqBjP,KAAKgD,SAC1B,kBAAmBhD,KAAKwO,OACxB,oBAAqBxO,KAAKkP,KAAO,EACjC,kBAAmBlP,KAAKiO,MACxBkB,SAAUnP,KAAK2B,MACf,CAAC,YAAY3B,KAAK4M,WAAY,MAGhC,OACEb,EAACC,EAAI,CAAChJ,SAAUhD,KAAKgD,UACnB+I,EAAA,OACErJ,GAAI,YAAc1C,KAAK8B,QACvBmK,MAAM,iBAAgB,YACZ,SAAQ,cACN,QAEXjM,KAAKuL,YAGRQ,EAAA,OAAKE,MAAOgD,GACVlD,EAAA,OAAKE,MAAM,oBACTF,EAAA,OAAKE,MAAM,gBAAgBmD,QAAS,IAAMpP,KAAKyM,YAC5CzM,KAAKuO,iBAENxC,EAAA,OACEE,MAAM,iBACNjD,MAAO,CACL,4BAA6BhJ,KAAKqO,aAAe,OAGnDtC,EAAA,QAAMnJ,KAAK,QAEV5C,KAAK2O,eAEN5C,EAAA,eAIH/L,KAAK4M,UAAY,UAAYb,EAAA,QAAMnJ,KAAK,cAEvC5C,KAAKqP,aACLtD,EAAA,aACEmC,KAAMlO,KAAKkO,KACXpM,QAAS9B,KAAK8B,QACdmM,MAAOjO,KAAKiO,MACZe,WAAYhP,KAAKgP,e"}
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-cdf029b7.js';
2
2
  import { c as mdiAlert } from './mdi-a4a63b40.js';
3
3
 
4
- const cDropdownCss = "html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host{--_c-dropdown-background-color:var(--c-dropdown-background-color, var(--c-white));--_c-dropdown-background-color-hover:var(--c-dropdown-background-color-hover, var(--c-primary-200));--_c-dropdown-text-color:var(--c-dropdown-text-color, var(--c-text-body));--_c-dropdown-text-color-active:var(--c-dropdown-text-color-active, var(--c-primary-600));--_c-dropdown-font-size:14px;--_c-dropdown-height:42px;display:block;position:absolute}:host mark{background-color:transparent;box-shadow:0 2px 0 0 var(--_c-dropdown-text-color-active);color:inherit}:host dialog{background-color:transparent;border-radius:4px;border:none;box-shadow:2px 4px 10px rgba(0, 0, 0, 0.1607843137);margin:0;overflow:hidden;padding:0;position:fixed}:host dialog::backdrop{display:none}:host ul{background-color:var(--_c-dropdown-background-color);border-radius:4px;height:100%;list-style:none;margin:0;outline:none;overflow-y:scroll;padding:0;pointer-events:auto;visibility:hidden;width:100%}:host ul.active{visibility:visible;animation:0.2s 1 fade-in cubic-bezier(0.25, 0.8, 0.5, 1)}:host li{align-items:center;column-gap:12px;cursor:pointer;display:flex;flex-wrap:nowrap;font-size:var(--_c-dropdown-font-size);min-height:var(--_c-dropdown-height);outline:none;padding-left:10px;padding-right:10px;pointer-events:auto;white-space:nowrap;width:100%;border-radius:4px}:host li span,:host li c-option-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}:host li:not(.disabled):hover,:host li.active{background:var(--_c-dropdown-background-color-hover);color:var(--_c-dropdown-text-color-active);box-shadow:inset 0 0 0 1px var(--_c-dropdown-text-color-active)}:host li.disabled{background-color:rgba(var(--c-tertiary-rgb), 0.05);cursor:default;filter:grayscale(1) opacity(0.75)}:host .visuallyhidden{border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}@keyframes fade-in{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}";
4
+ const cDropdownCss = "html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host(c-dropdown){--_c-dropdown-background-color:var(--c-dropdown-background-color, var(--c-white));--_c-dropdown-background-color-hover:var(--c-dropdown-background-color-hover, var(--c-primary-200));--_c-dropdown-text-color:var(--c-dropdown-text-color, var(--c-text-body));--_c-dropdown-text-color-active:var(--c-dropdown-text-color-active, var(--c-primary-600));--_c-dropdown-font-size:14px;--_c-dropdown-height:42px;display:block;position:absolute}:host(c-dropdown) mark{background-color:transparent;box-shadow:0 2px 0 0 var(--_c-dropdown-text-color-active);color:inherit}:host(c-dropdown) dialog{background-color:transparent;border-radius:4px;border:none;box-shadow:2px 4px 10px rgba(0, 0, 0, 0.1607843137);margin:0;overflow-y:scroll;padding:0;position:fixed}:host(c-dropdown) dialog::backdrop{display:none}:host(c-dropdown) ul{background-color:var(--_c-dropdown-background-color);border-radius:4px;list-style:none;margin:0;outline:none;padding:0;pointer-events:auto;visibility:hidden;width:100%}:host(c-dropdown) ul.active{visibility:visible;animation:0.2s 1 fade-in cubic-bezier(0.25, 0.8, 0.5, 1)}:host(c-dropdown) li{align-items:center;column-gap:12px;cursor:pointer;display:flex;flex-wrap:nowrap;font-size:var(--_c-dropdown-font-size);min-height:var(--_c-dropdown-height);outline:none;padding-left:10px;padding-right:10px;pointer-events:auto;white-space:nowrap;width:100%;border-radius:4px}:host(c-dropdown) li span,:host(c-dropdown) li c-option-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}:host(c-dropdown) li:not(.disabled):hover,:host(c-dropdown) li.active{background:var(--_c-dropdown-background-color-hover);color:var(--_c-dropdown-text-color-active);box-shadow:inset 0 0 0 1px var(--_c-dropdown-text-color-active)}:host(c-dropdown) li.disabled{background-color:rgba(var(--c-tertiary-rgb), 0.05);cursor:default;filter:grayscale(1) opacity(0.75)}:host(c-dropdown) .visuallyhidden{border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}@keyframes fade-in{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}";
5
5
 
6
6
  const CDropdown = class {
7
7
  constructor(hostRef) {