@cscfi/csc-ui 1.2.3 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{c-autocomplete_16.cjs.entry.js → c-autocomplete_23.cjs.entry.js} +659 -1
- package/dist/cjs/c-autocomplete_23.cjs.entry.js.map +1 -0
- package/dist/cjs/{c-checkbox_3.cjs.entry.js → c-pagination_2.cjs.entry.js} +1 -115
- package/dist/cjs/c-pagination_2.cjs.entry.js.map +1 -0
- package/dist/cjs/csc-ui.cjs.js +1 -1
- package/dist/cjs/index-91ba22ab.js +4 -28
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/c-checkbox/c-checkbox.js +3 -11
- package/dist/collection/components/c-checkbox/c-checkbox.js.map +1 -1
- package/dist/collection/components/c-radio-group/c-radio-group.js +7 -1
- package/dist/collection/components/c-radio-group/c-radio-group.js.map +1 -1
- package/dist/collection/components/c-switch/c-switch.js +3 -11
- package/dist/collection/components/c-switch/c-switch.js.map +1 -1
- package/dist/collection/components/c-table/c-table.css +3 -0
- package/dist/collection/components/c-table/c-table.js +4 -1
- package/dist/collection/components/c-table/c-table.js.map +1 -1
- package/dist/components/c-checkbox2.js +3 -11
- package/dist/components/c-checkbox2.js.map +1 -1
- package/dist/components/c-radio-group.js +7 -1
- package/dist/components/c-radio-group.js.map +1 -1
- package/dist/components/c-switch.js +3 -11
- package/dist/components/c-switch.js.map +1 -1
- package/dist/components/c-table.js +5 -2
- package/dist/components/c-table.js.map +1 -1
- package/dist/csc-ui/csc-ui.esm.js +1 -1
- package/dist/csc-ui/csc-ui.esm.js.map +1 -1
- package/dist/csc-ui/{p-ae16b1f4.entry.js → p-1b181fd3.entry.js} +2 -2
- package/dist/csc-ui/{p-1d6c84df.entry.js → p-2e28b0cc.entry.js} +2 -2
- package/dist/csc-ui/{p-56b1e1ea.entry.js → p-34027974.entry.js} +2 -2
- package/dist/csc-ui/{p-9c80f35e.entry.js → p-367d3bd3.entry.js} +2 -2
- package/dist/csc-ui/{p-f24b9d97.js → p-667da79a.js} +2 -2
- package/dist/csc-ui/{p-b0fa27b6.entry.js → p-6ff81ae0.entry.js} +2 -2
- package/dist/csc-ui/{p-3bb67f38.entry.js → p-74a176e6.entry.js} +2 -2
- package/dist/csc-ui/p-8f36c6ba.entry.js +2 -0
- package/dist/csc-ui/{p-ab62f9b5.entry.js.map → p-8f36c6ba.entry.js.map} +1 -1
- package/dist/csc-ui/p-9ba0ed23.entry.js +2 -0
- package/dist/csc-ui/p-9ba0ed23.entry.js.map +1 -0
- package/dist/csc-ui/{p-c8a7a751.entry.js → p-a8a04dff.entry.js} +2 -2
- package/dist/csc-ui/{p-682782b1.entry.js → p-adaace9b.entry.js} +2 -2
- package/dist/csc-ui/{p-468d9583.entry.js → p-d074c6db.entry.js} +2 -2
- package/dist/csc-ui/{p-ccef8a49.entry.js → p-d22cd2a7.entry.js} +2 -2
- package/dist/csc-ui/p-e1955a0e.entry.js +2 -0
- package/dist/csc-ui/p-e1955a0e.entry.js.map +1 -0
- package/dist/esm/c-accordion-item.entry.js +1 -1
- package/dist/esm/c-alert.entry.js +1 -1
- package/dist/esm/{c-autocomplete_16.entry.js → c-autocomplete_23.entry.js} +654 -3
- package/dist/esm/c-autocomplete_23.entry.js.map +1 -0
- package/dist/esm/c-data-table.entry.js +1 -1
- package/dist/esm/c-menu_2.entry.js +1 -1
- package/dist/esm/c-navigation-button.entry.js +1 -1
- package/dist/esm/{c-checkbox_3.entry.js → c-pagination_2.entry.js} +4 -117
- package/dist/esm/c-pagination_2.entry.js.map +1 -0
- package/dist/esm/c-side-navigation-item.entry.js +1 -1
- package/dist/esm/c-side-navigation.entry.js +1 -1
- package/dist/esm/c-swiper.entry.js +1 -1
- package/dist/esm/c-tabs.entry.js +1 -1
- package/dist/esm/c-tag.entry.js +1 -1
- package/dist/esm/c-toast.entry.js +1 -1
- package/dist/esm/csc-ui.js +1 -1
- package/dist/esm/index-47956d53.js +4 -28
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{mdi-8656e74a.js → mdi-e483616d.js} +2 -2
- package/dist/esm/{mdi-8656e74a.js.map → mdi-e483616d.js.map} +1 -1
- package/dist/types/components/c-table/c-table.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/c-autocomplete_16.cjs.entry.js.map +0 -1
- package/dist/cjs/c-checkbox_3.cjs.entry.js.map +0 -1
- package/dist/cjs/c-otp-input.cjs.entry.js +0 -154
- package/dist/cjs/c-otp-input.cjs.entry.js.map +0 -1
- package/dist/cjs/c-radio-group.cjs.entry.js +0 -154
- package/dist/cjs/c-radio-group.cjs.entry.js.map +0 -1
- package/dist/cjs/c-radio.cjs.entry.js +0 -24
- package/dist/cjs/c-radio.cjs.entry.js.map +0 -1
- package/dist/cjs/c-switch.cjs.entry.js +0 -71
- package/dist/cjs/c-switch.cjs.entry.js.map +0 -1
- package/dist/cjs/c-table.cjs.entry.js +0 -47
- package/dist/cjs/c-table.cjs.entry.js.map +0 -1
- package/dist/cjs/c-text-field.cjs.entry.js +0 -151
- package/dist/cjs/c-text-field.cjs.entry.js.map +0 -1
- package/dist/csc-ui/p-494a4f19.entry.js +0 -2
- package/dist/csc-ui/p-494a4f19.entry.js.map +0 -1
- package/dist/csc-ui/p-6062aaff.entry.js +0 -2
- package/dist/csc-ui/p-6062aaff.entry.js.map +0 -1
- package/dist/csc-ui/p-6e046723.entry.js +0 -2
- package/dist/csc-ui/p-6e046723.entry.js.map +0 -1
- package/dist/csc-ui/p-7ea05669.entry.js +0 -2
- package/dist/csc-ui/p-7ea05669.entry.js.map +0 -1
- package/dist/csc-ui/p-ab62f9b5.entry.js +0 -2
- package/dist/csc-ui/p-b83651f8.entry.js +0 -2
- package/dist/csc-ui/p-b83651f8.entry.js.map +0 -1
- package/dist/csc-ui/p-bda722d5.entry.js +0 -2
- package/dist/csc-ui/p-bda722d5.entry.js.map +0 -1
- package/dist/csc-ui/p-caa58a64.entry.js +0 -2
- package/dist/csc-ui/p-caa58a64.entry.js.map +0 -1
- package/dist/csc-ui/p-d7ca1f65.entry.js +0 -2
- package/dist/csc-ui/p-d7ca1f65.entry.js.map +0 -1
- package/dist/esm/c-autocomplete_16.entry.js.map +0 -1
- package/dist/esm/c-checkbox_3.entry.js.map +0 -1
- package/dist/esm/c-otp-input.entry.js +0 -150
- package/dist/esm/c-otp-input.entry.js.map +0 -1
- package/dist/esm/c-radio-group.entry.js +0 -150
- package/dist/esm/c-radio-group.entry.js.map +0 -1
- package/dist/esm/c-radio.entry.js +0 -20
- package/dist/esm/c-radio.entry.js.map +0 -1
- package/dist/esm/c-switch.entry.js +0 -67
- package/dist/esm/c-switch.entry.js.map +0 -1
- package/dist/esm/c-table.entry.js +0 -43
- package/dist/esm/c-table.entry.js.map +0 -1
- package/dist/esm/c-text-field.entry.js +0 -147
- package/dist/esm/c-text-field.entry.js.map +0 -1
- /package/dist/csc-ui/{p-ae16b1f4.entry.js.map → p-1b181fd3.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-1d6c84df.entry.js.map → p-2e28b0cc.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-56b1e1ea.entry.js.map → p-34027974.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-9c80f35e.entry.js.map → p-367d3bd3.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-f24b9d97.js.map → p-667da79a.js.map} +0 -0
- /package/dist/csc-ui/{p-b0fa27b6.entry.js.map → p-6ff81ae0.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-3bb67f38.entry.js.map → p-74a176e6.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-c8a7a751.entry.js.map → p-a8a04dff.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-682782b1.entry.js.map → p-adaace9b.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-468d9583.entry.js.map → p-d074c6db.entry.js.map} +0 -0
- /package/dist/csc-ui/{p-ccef8a49.entry.js.map → p-d22cd2a7.entry.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["cAutocompleteCss","CAutocomplete","this","_preventDialogOpen","_debounce","_handleSlotChange","optionElements","el","querySelectorAll","selection","Array","from","find","option","selected","value","returnObject","name","changeValue","emit","changeQuery","query","internals","setFormValue","toString","length","optionElementsExist","_toggleDropdown","event","stopPropagation","dropdownVisible","_dropdownElement","close","open","_onButtonKeyDown","src","key","preventDefault","includes","_reset","_inputElement","focus","_cInputElement","reset","updateList","_onInputFocus","_updateStatusText","_id","hostId","_uniqueId","_handleKeyDown","alphanumeric","match","requestAnimationFrame","_items","currentIndex","focusItem","Math","min","max","selectItem","onDropdownStateChange","isOpen","detail","onSelectOption","forEach","item","handleQueryChange","_updateInput","_renderLoader","h","color","size","_renderChevron","classes","class","text","onClick","onKeyDown","path","mdiChevronDown","_renderReset","mdiClose","_renderInputElement","type","ref","_inputId","autocomplete","role","_a","onInput","onFocus","componentWillLoad","label","placeholder","replace","items","clearTimeout","window","setTimeout","ending","statusText","setStatusText","render","itemType","Host","id","index","itemsPerPage","parent","slot","active","disabled","hideDetails","hint","required","shadow","valid","validate","validateOnBlur","validation","variant","loading","onSlotchange","cBadgeCss","CBadge","cButtonCss","CButton","_onClick","center","_rippleElement","createRipple","_container","tabs","tabChange","hostElement","dataset","element","submitButton","_createHiddenSubmitButton","click","remove","form","_closestElementComposed","document","createElement","style","display","appendChild","_onKeyDown","code","href","target","onTabFocus","tabFocus","selector","base","__closestFrom","found","closest","getRootNode","host","_containerhasDescriptionSlot","querySelector","contentClasses","fit","noRadius","innerClasses","buttonClasses","grouped","outlined","hostClasses","ghost","danger","inverted","descriptionSlotClasses","Tag","hostAttributes","attributes","linkAttributes","spinnerSizes","small","default","large","Object","assign","cCardCss","CCard","_toggleFullscreen","isFullscreen","_onFullscreen","fullscreenElement","exitFullscreen","requestFullscreen","modalWrapper","_b","parentElement","shadowRoot","componentDidLoad","title","fullscreen","marginRight","addEventListener","bind","disconnectedCallback","removeEventListener","enterFullscreen","mdiFullscreenExit","mdiFullscreen","cCardActionsCss","CCardActions","align","justify","cCardContentCss","CCardContent","cCardTitleCss","CCardTitle","cDropdownCss","CDropdown","_isMobile","_listItems","_inputSize","height","width","_openedOnTop","_hideDetails","optionsWatcher","renderedList","_renderList","stateWatcher","dropdownStateChange","_scrollParent","getScrollParent","overflow","handleIndexChange","_dialog","_outsideClickFn","_handleOutsideClick","_positionMenu","_dummyElement","_setIsMobile","matchMedia","matches","_resizeObserver","ResizeObserver","entries","isArray","observe","body","classList","contains","composedPath","_highlightMatchingText","tagName","regex","RegExp","highlighted","_getParentPosition","getBoundingClientRect","innerWidth","innerHeight","opacity","showModal","inputSlot","top","parentTop","inputSize","bottom","left","right","isInView","x","y","fitsOnTop","maxHeight","input","_emptyItem","mdiAlert","_renderOptionsList","_renderItemsList","options","map","optionValue","innerHTML","textContent","push","tabindex","selectOption","outerHTML","total","position","isDisabled","beginning","selectionText","_list","mobile","onCancel","cIconCss","CIcon","viewBox","d","cIconButtonCss","CIconButton","_renderBadge","badge","_hostClasses","cInputCss","CInput","_hasBlurred","_observer","IntersectionObserver","observer","entry","isIntersecting","_calculateElementWidths","unobserve","threshold","_onBlur","isFocused","_onReset","_onFocus","inputField","itemClick","onValidChange","_setAriaDescriptionId","onValidationMessageChange","onValueChange","onPlaceholderChange","autofocus","_labelRef","_c","_preventNonNumericalInput","_d","container","disconnect","isActive","removeAttribute","setAttribute","inputId","labelWidth","scrollWidth","preSlotWidth","offsetLeft","_renderBorders","_renderLabel","htmlFor","containerClasses","rows","filled","cMessageCss","CMessage","_validationIcon","mdiCloseCircle","show","content","_handleValidation","message","messageOptions","onHintMessageChange","timeout","messageClasses","cOptionCss","COption","cRippleCss","CRipple","offsetWidth","offsetHeight","rect","maxDimension","_calculateHeight","clientX","clientY","centerPosition","add","radius","sqrt","cSelectCss","CSelect","_lastKeyPressTime","_searchString","_onSlotChange","_selectionElement","replaceChildren","_value","console","warn","handleKeyDown","Date","now","selectionIndex","findIndex","i","toLowerCase","startsWith","_setCurrentIndex","optionAsSelection","clone","cloneNode","readonly","clearable","cSpinnerCss","CSpinner","iconParams","cx","cy","r"],"sources":["src/components/c-autocomplete/c-autocomplete.scss?tag=c-autocomplete&encapsulation=shadow","src/components/c-autocomplete/c-autocomplete.tsx","src/components/c-badge/c-badge.scss?tag=c-badge&encapsulation=shadow","src/components/c-badge/c-badge.tsx","src/components/c-button/c-button.scss?tag=c-button&encapsulation=shadow","src/components/c-button/c-button.tsx","src/components/c-card/c-card.scss?tag=c-card&encapsulation=shadow","src/components/c-card/c-card.tsx","src/components/c-card-actions/c-card-actions.scss?tag=c-card-actions&encapsulation=shadow","src/components/c-card-actions/c-card-actions.tsx","src/components/c-card-content/c-card-content.scss?tag=c-card-content&encapsulation=shadow","src/components/c-card-content/c-card-content.tsx","src/components/c-card-title/c-card-title.scss?tag=c-card-title&encapsulation=shadow","src/components/c-card-title/c-card-title.tsx","src/components/c-dropdown/c-dropdown.scss?tag=c-dropdown&encapsulation=shadow","src/components/c-dropdown/c-dropdown.tsx","src/components/c-icon/c-icon.scss?tag=c-icon&encapsulation=shadow","src/components/c-icon/c-icon.tsx","src/components/c-icon-button/c-icon-button.scss?tag=c-icon-button&encapsulation=shadow","src/components/c-icon-button/c-icon-button.tsx","src/components/c-input/c-input.scss?tag=c-input","src/components/c-input/c-input.tsx","src/components/c-message/c-message.scss?tag=c-message&encapsulation=shadow","src/components/c-message/c-message.tsx","src/components/c-option/c-option.scss?tag=c-option&encapsulation=shadow","src/components/c-option/c-option.tsx","src/components/c-ripple/c-ripple.scss?tag=c-ripple&encapsulation=shadow","src/components/c-ripple/c-ripple.tsx","src/components/c-select/c-select.scss?tag=c-select&encapsulation=shadow","src/components/c-select/c-select.tsx","src/components/c-spinner/c-spinner.scss?tag=c-spinner&encapsulation=shadow","src/components/c-spinner/c-spinner.tsx"],"sourcesContent":[":host(c-autocomplete) {\n /**\n * @prop --c-autocomplete-option-background-color: Autocomplete option background color\n * @prop --c-autocomplete-option-background-hover-color: Autocomplete option background hover color\n * @prop --c-autocomplete-active-color: Autocomplete active color\n * @prop --c-autocomplete-inactive-color: Autocomplete inactive color\n * @prop --c-autocomplete-background-color: Autocomplete background color\n * @prop --c-autocomplete-text-color: Autocomplete text color\n * @prop --c-autocomplete-option-text-color: Autocomplete option text color\n * @prop --c-autocomplete-placeholder-color: Autocomplete placeholder color\n */\n --_c-autocomplete-option-background-color: var(\n --c-autocomplete-option-background-color,\n var(--c-white)\n );\n --_c-autocomplete-option-background-hover-color: var(\n --c-autocomplete-option-background-hover-color,\n var(--c-primary-100)\n );\n --_c-autocomplete-active-color: var(\n --c-autocomplete-active-color,\n var(--c-primary-600)\n );\n --_c-autocomplete-inactive-color: var(\n --c-autocomplete-inactive-color,\n var(--c-tertiary-600)\n );\n --_c-autocomplete-background-color: var(\n --c-autocomplete-background-color,\n var(--c-transparent)\n );\n --_c-autocomplete-text-color: var(\n --c-autocomplete-text-color,\n var(--c-text-body)\n );\n --_c-autocomplete-option-text-color: var(\n --c-autocomplete-option-text-color,\n var(--c-text-body)\n );\n --_c-autocomplete-placeholder-color: var(\n --c-autocomplete-placeholder-color,\n var(--c-tertiary-500)\n );\n\n // c-select options\n --c-select-option-background-color: var(\n --_c-autocomplete-option-background-color\n );\n --c-select-option-background-color-hover: var(\n --_c-autocomplete-option-background-hover-color\n );\n --c-select-option-text-color: var(--_c-autocomplete-option-text-color);\n\n // c-input\n --_c-input-active-color: var(--_c-autocomplete-active-color);\n --_c-input-inactive-color: var(--_c-autocomplete-inactive-color);\n --_c-input-background-color: var(--_c-autocomplete-background-color);\n --_c-input-text-color: var(--_c-autocomplete-text-color);\n --_c-input-placeholder-color: var(--_c-autocomplete-placeholder-color);\n}\n\n@import '../c-input/c-input-menu';\n","import {\n AttachInternals,\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Listen,\n Watch,\n Method,\n} from '@stencil/core';\nimport { CAutocompleteItem } from '../../types';\nimport { mdiChevronDown, mdiClose } from '@mdi/js';\n\n/**\n * @group Form\n */\n@Component({\n tag: 'c-autocomplete',\n styleUrl: 'c-autocomplete.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class CAutocomplete {\n @Element() el: HTMLCAutocompleteElement;\n\n // eslint-disable-next-line\n @AttachInternals() internals: ElementInternals;\n\n private static _uniqueId = 0;\n\n private _dropdownElement: HTMLCDropdownElement;\n\n private _inputElement: HTMLInputElement;\n\n private _cInputElement: HTMLCInputElement;\n\n private _inputId: string;\n\n private _preventDialogOpen = false;\n\n private _debounce = null;\n\n private get _id() {\n return this.hostId || `autocomplete_${CAutocomplete._uniqueId}`;\n }\n\n /**\n * Dropdown items\n */\n @Prop() items: CAutocompleteItem[] = [];\n\n /**\n * Selected item\n */\n @Prop() value: string | number | CAutocompleteItem = null;\n\n /**\n * Search string\n */\n @Prop() query: string = null;\n\n /**\n * Id of the element\n */\n @Prop({ attribute: 'id' }) hostId: string;\n\n /**\n * Disable the input\n */\n @Prop() disabled = false;\n\n /**\n * Element label\n */\n @Prop() label: string;\n\n /**\n * Input field name\n */\n @Prop() name: string;\n\n /**\n * Placeholder text\n */\n @Prop() placeholder = '';\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 * Show loading state\n */\n @Prop() loading = false;\n\n /**\n * Show required validation\n */\n @Prop() required = false;\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 * Shadow variant\n */\n @Prop() shadow = false;\n\n /**\n * Return object instead of value\n */\n @Prop() returnObject = false;\n\n /**\n * Triggered when text is typed\n */\n @Event() changeQuery: EventEmitter;\n\n /**\n * Triggered when option is selected\n */\n @Event({ bubbles: false }) changeValue: EventEmitter;\n\n /**\n * Items per page before adding scroll\n */\n @Prop() itemsPerPage = 6;\n\n @State() optionElements: NodeListOf<HTMLCOptionElement>;\n\n @State() currentIndex: number = null;\n\n @State() dropdownVisible = false;\n\n @State() statusText = '';\n\n @State() optionElementsExist = false;\n\n /**\n * Reset autocomplete state\n */\n @Method()\n async reset() {\n this.query = '';\n\n this.changeValue.emit(null);\n\n this.internals.setFormValue(null);\n\n this.changeQuery.emit('');\n\n this._dropdownElement.updateList();\n }\n\n private _handleKeyDown(event: KeyboardEvent) {\n const alphanumeric = /^[0-9a-zA-Z ]+$/;\n\n if (event.key.match(alphanumeric) && event.key.length === 1) {\n if (!this.dropdownVisible) {\n this._dropdownElement.open();\n\n return;\n }\n\n this._inputElement.focus();\n\n return;\n }\n\n if (event.key === 'Escape') {\n event.preventDefault();\n\n this._preventDialogOpen = true;\n this._dropdownElement.close();\n\n requestAnimationFrame(() => {\n this._inputElement.focus();\n });\n\n return;\n }\n\n if (event.key === 'Tab') {\n this._inputElement.focus();\n\n requestAnimationFrame(() => {\n this._dropdownElement.close();\n });\n\n return;\n }\n\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n\n if (!this._items.length) return;\n\n if (!this.dropdownVisible || this.currentIndex === null) {\n this.currentIndex = 0;\n this._dropdownElement.open();\n this._dropdownElement.focusItem(this.currentIndex);\n\n return;\n }\n\n this.currentIndex = Math.min(\n this.currentIndex + 1,\n this._items.length - 1,\n );\n\n this._dropdownElement.focusItem(this.currentIndex);\n\n return;\n }\n\n if (event.key === 'ArrowUp') {\n event.preventDefault();\n\n if (this.currentIndex === 0) {\n this._dropdownElement.close();\n this._inputElement.focus();\n }\n\n if (!this.dropdownVisible || this.currentIndex === null) {\n this.currentIndex = this._items.length - 1;\n this._dropdownElement.open();\n this._dropdownElement.focusItem(this.currentIndex);\n\n return;\n }\n\n this.currentIndex = Math.max(this.currentIndex - 1, 0);\n\n this._dropdownElement.focusItem(this.currentIndex);\n }\n\n if (event.key === 'Enter') {\n event.preventDefault();\n\n if (this.currentIndex === null) return;\n\n this._dropdownElement.selectItem(this.currentIndex);\n }\n\n if (event.key === 'Home' && this.dropdownVisible) {\n this.currentIndex = 0;\n }\n\n if (event.key === 'End' && this.dropdownVisible) {\n this.currentIndex = this._items.length - 1;\n }\n }\n\n @Listen('dropdownStateChange')\n onDropdownStateChange(event: CustomEvent<boolean>) {\n const isOpen = event.detail;\n\n this.dropdownVisible = isOpen;\n\n if (!isOpen) {\n requestAnimationFrame(() => {\n this.currentIndex = null;\n });\n }\n }\n\n @Listen('selectOption')\n onSelectOption(event: CustomEvent<{ name: string; value: string }>) {\n this._dropdownElement.close();\n\n const { name, value } = event.detail;\n\n this.value = this.returnObject ? event.detail : value;\n\n this.changeValue.emit(this.value);\n\n this.internals.setFormValue(value);\n\n this.query = name;\n\n this.changeQuery.emit(name);\n\n this._preventDialogOpen = true;\n\n if (this.optionElementsExist) {\n Array.from(this.optionElements).forEach((item) => {\n item.selected = item.value === value && item.name === name;\n });\n\n this._dropdownElement.updateList();\n }\n\n this._inputElement.focus();\n }\n\n @Watch('query')\n handleQueryChange() {\n this._updateStatusText();\n }\n\n private _updateInput() {\n this._dropdownElement.open();\n\n this.query = this._inputElement.value;\n\n this.changeQuery.emit(this.query);\n\n this._dropdownElement.updateList();\n }\n\n private _handleSlotChange = () => {\n this.optionElements = this.el.querySelectorAll('c-option');\n\n const selection = Array.from(this.optionElements).find(\n (option) => option.selected,\n );\n\n if (selection) {\n this.value = this.returnObject\n ? { name: selection.name, value: selection.value }\n : selection.value;\n\n this.changeValue.emit(this.value);\n\n this.changeQuery.emit(this.query);\n\n this.internals.setFormValue(selection.value.toString());\n }\n\n if (this.optionElements.length && !this.optionElementsExist) {\n this.optionElementsExist = true;\n }\n };\n\n private _toggleDropdown = (event) => {\n event.stopPropagation();\n\n if (this.dropdownVisible) {\n this._dropdownElement.close();\n\n return;\n }\n\n this._dropdownElement.open();\n };\n\n private _onButtonKeyDown = (\n src: 'chevron' | 'reset',\n event: KeyboardEvent,\n ) => {\n event.stopPropagation();\n\n if (event.key !== 'Tab') event.preventDefault();\n\n if (['Enter', ' '].includes(event.key)) {\n if (src === 'chevron') {\n this._toggleDropdown(event);\n\n return;\n }\n\n this._reset(event);\n\n this._preventDialogOpen = true;\n\n this._inputElement.focus();\n }\n };\n\n private _renderLoader() {\n return <c-spinner color=\"var(--_c-autocomplete-active-color)\" size={20} />;\n }\n\n private _renderChevron() {\n const classes = {\n 'c-input-menu__chevron': true,\n 'c-input-menu__chevron--active': this.dropdownVisible,\n };\n\n return (\n <c-icon-button\n size=\"x-small\"\n class={classes}\n text\n onClick={(event) => this._toggleDropdown(event)}\n onKeyDown={(event) => this._onButtonKeyDown('chevron', event)}\n >\n <c-icon path={mdiChevronDown} size={24} />\n </c-icon-button>\n );\n }\n\n private _reset = (event) => {\n event.stopPropagation();\n\n this.query = '';\n\n this.value = null;\n\n this.changeValue.emit(null);\n\n this.internals.setFormValue(null);\n\n this.changeQuery.emit('');\n\n this._preventDialogOpen = true;\n\n this._cInputElement.reset();\n\n this._inputElement.focus();\n\n this._dropdownElement.updateList();\n };\n\n private _renderReset() {\n return (\n <c-icon-button\n aria-label=\"\"\n size=\"x-small\"\n text\n onClick={(event) => this._reset(event)}\n onKeyDown={(event) => this._onButtonKeyDown('reset', event)}\n >\n <c-icon path={mdiClose} size={20} />\n </c-icon-button>\n );\n }\n\n private _onInputFocus = () => {\n if (!this._preventDialogOpen) {\n this._dropdownElement.open();\n }\n\n this._updateStatusText();\n\n this._preventDialogOpen = false;\n };\n\n private _renderInputElement() {\n return (\n <div class=\"c-input-menu__input\">\n <input\n type=\"text\"\n ref={(el) => (this._inputElement = el)}\n aria-expanded={this.dropdownVisible.toString()}\n aria-owns={this._inputId + '-items'}\n aria-autocomplete=\"list\"\n autocomplete=\"off\"\n class=\"c-input__input\"\n role=\"combobox\"\n value={this.query}\n name={this.name ?? null}\n onInput={() => this._updateInput()}\n onFocus={() => this._onInputFocus()}\n />\n </div>\n );\n }\n\n componentWillLoad() {\n CAutocomplete._uniqueId += 1;\n\n this._inputId =\n 'input_' +\n (this.hostId || this.label || this.placeholder).replace(\n /[^a-zA-Z0-9-_]/g,\n '',\n );\n }\n\n private get _items() {\n return this.optionElementsExist ? this.optionElements : this.items;\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 ending = !!this._items.length\n ? ' or navigate using the up and down arrows'\n : '';\n\n if (this.currentIndex === null) {\n this.statusText = this._items.length\n ? `${this._items.length} result${\n this._items.length !== 1 ? 's' : ''\n } available`\n : 'No search results available';\n }\n\n if (this.query !== null && this._items.length) {\n this.statusText += ', input a search query to filter the results';\n }\n\n this._dropdownElement.setStatusText(this.statusText + ending);\n\n this._debounce = null;\n }, 1400);\n }\n\n render() {\n const itemType = this.optionElementsExist ? 'option' : 'item';\n\n return (\n <Host>\n <c-dropdown\n ref={(el) => (this._dropdownElement = el)}\n id={`${this._id}-dropdown`}\n index={this.currentIndex}\n items-per-page={this.itemsPerPage}\n item-type={itemType}\n items={\n this._items as NodeListOf<HTMLCOptionElement> & CAutocompleteItem[]\n }\n parent={this.el}\n type=\"autocomplete\"\n onKeyDown={(event) => this._handleKeyDown(event)}\n >\n <c-input\n slot=\"default\"\n ref={(el) => (this._cInputElement = el)}\n active={this.dropdownVisible}\n disabled={this.disabled}\n hide-details={this.hideDetails}\n hint={this.hint}\n id={this.hostId}\n input-id={this._inputId}\n label={this.label}\n name={this.name}\n placeholder={this.placeholder}\n required={this.required}\n shadow={this.shadow}\n valid={this.valid}\n validate={this.validate}\n validate-on-blur={this.validateOnBlur}\n validation={this.validation}\n value={this.query}\n variant=\"select\"\n >\n <slot name=\"pre\" slot=\"pre\"></slot>\n\n <div class=\"c-input__content\">\n {this._renderInputElement()}\n\n {this.loading && this._renderLoader()}\n\n {!this.loading && this.value && this._renderReset()}\n\n {!this.loading && !this.value && this._renderChevron()}\n\n <slot onSlotchange={() => this._handleSlotChange()}></slot>\n </div>\n\n <slot name=\"post\" slot=\"post\"></slot>\n </c-input>\n </c-dropdown>\n </Host>\n );\n }\n}\n",":host {\n /**\n * @prop --c-badge-background-color: Badge background color\n * @prop --c-badge-text-color: Badge text color\n * @prop --c-badge-border-color: Badge border color\n */\n --_c-badge-background-color: var(--c-badge-background-color, var(--c-warning-600));\n --_c-badge-text-color: var(--c-badge-text-color, var(--c-white));\n --_c-badge-border-color: var(--c-badge-border-color, var(--c-white));\n\n align-items: center;\n background-color: var(--_c-badge-background-color);\n border-radius: 16px;\n box-shadow: 0 0 0 2px var(--_c-badge-border-color);\n color: var(--_c-badge-text-color);\n display: flex;\n font-size: 12px;\n height: 16px;\n justify-content: center;\n justify-items: center;\n line-height: 1;\n min-width: 16px;\n padding: 0 4px;\n pointer-events: none;\n position: absolute;\n right: -6px;\n top: -6px;\n z-index: 2;\n}\n","import { Component, Host, h } from '@stencil/core';\n\n/**\n * @parent none\n */\n@Component({\n tag: 'c-badge',\n styleUrl: 'c-badge.scss',\n shadow: true,\n})\nexport class CBadge {\n render() {\n return (\n <Host class=\"c-badge\">\n <slot></slot>\n </Host>\n );\n }\n}\n",":host {\n /**\n * @prop --c-button-border-radius: Button border radius\n */\n --_c-button-border-radius: var(--c-button-border-radius, 4px);\n --_c-button-height: 44px;\n --_c-button-min-width: 88px;\n --_c-button-padding: 0 16px;\n --_c-button-font-size: 16px;\n --_c-button-icon-size: 24px;\n --_c-button-outline-offset: 2px;\n\n border-radius: var(--_c-button-border-radius);\n display: inline-flex;\n transform: translateZ(0); // Safari border-radius fix\n transition: background-color 0.3s ease-in-out;\n\n /**\n * @prop --c-button-background-color: Default button background color\n * @prop --c-button-text-color: Default button text color\n * @prop --c-button-loader-color: Default button loader color\n * @prop --c-button-outline-color: Default button outline color\n */\n --_c-button-background-color: var(--c-button-background-color, var(--c-primary-600));\n --_c-button-text-color: var(--c-button-text-color, var(--c-white));\n --_c-button-loader-color: var(--c-button-loader-color, var(--_c-button-text-color));\n --_c-button-outline-color: var(--c-button-outline-color, var(--_c-button-background-color));\n\n background-color: var(--_c-button-background-color);\n color: var(--_c-button-text-color);\n\n ::slotted(svg) {\n fill: var(--_c-button-loader-color);\n }\n}\n\n:host(.c-button--no-radius) {\n --_c-button-border-radius: 0;\n}\n\n:host(:host:not(.c-button--description)) {\n height: var(--_c-button-height);\n}\n\n:host(.c-button--description) {\n height: \"auto\";\n}\n\n:host(:host:hover) {\n /**\n * @prop --c-button-background-color-hover: Default button hover background color\n */\n --_c-button-background-color-hover: var(--c-button-background-color-hover, var(--c-primary-400));\n\n background-color: var(--_c-button-background-color-hover);\n}\n\n:host(.c-button--inverted) {\n /**\n * @prop --c-button-inverted-background-color: Inverted default button background color\n * @prop --c-button-inverted-text-color: Inverted default button text color\n */\n --_c-button-inverted-background-color: var(--c-button-inverted-background-color, var(--c-white));\n --_c-button-inverted-text-color: var(--c-button-inverted-text-color, var(--c-primary-600));\n\n // private\n --_c-button-outline-color: var(--_c-button-inverted-background-color);\n\n background-color: var(--_c-button-inverted-background-color);\n color: var(--_c-button-inverted-text-color);\n}\n\n:host(.c-button--inverted:hover) {\n /**\n * @prop --c-button-inverted-background-color-hover: Inverted default button hover background color\n */\n --_c-button-inverted-background-color-hover: var(--c-button-inverted-background-color-hover, var(--c-primary-200));\n\n background-color: var(--_c-button-inverted-background-color-hover);\n}\n\n:host(.c-button--inverted.c-button--disabled) {\n /**\n * @prop --c-button-inverted-disabled-background-color: Inverted disabled default button background color\n * @prop --c-button-inverted-disabled-text-color: Inverted disabled default button text color\n */\n --_c-button-inverted-disabled-background-color: var(--c-button-inverted-disabled-background-color, var(--_c-button-disabled-background-color));\n --_c-button-inverted-disabled-text-color: var(--c-button-inverted-disabled-text-color, var(--c-tertiary-500));\n\n background-color: var(--_c-button-inverted-disabled-background-color);\n color: var(--_c-button-inverted-disabled-text-color);\n}\n\n// ---- danger ----------------------------------------------------------------\n\n:host(.c-button--danger) {\n /**\n * @prop --c-button-danger-background-color: Danger button background color\n * @prop --c-button-danger-text-color: Danger button text color\n * @prop --c-button-danger-loader-color: Danger button loader color\n */\n --_c-button-danger-background-color: var(--c-button-danger-background-color, var(--c-error-600));\n --_c-button-danger-text-color: var(--c-button-danger-text-color, var(--c-white));\n --_c-button-danger-loader-color: var(--c-button-danger-loader-color, var(--_c-button-danger-text-color));\n\n // private\n --_c-button-loader-color: var(--_c-button-danger-loader-color);\n --_c-button-outline-color: var(--_c-button-danger-background-color);\n\n background-color: var(--_c-button-danger-background-color);\n color: var(--_c-button-danger-text-color);\n}\n\n:host(.c-button--danger:hover) {\n /**\n * @prop --c-button-danger-background-color-hover: Danger button hover background color\n */\n --_c-button-danger-background-color-hover: var(--c-button-danger-background-color-hover, var(--c-error-400));\n\n background-color: var(--_c-button-danger-background-color-hover);\n}\n\n:host(.c-button--danger.c-button--disabled) {\n /**\n * @prop --c-button-danger-disabled-background-color: Disabled danger button background color\n * @prop --c-button-danger-disabled-text-color: Disabled danger button text color\n */\n --_c-button-danger-disabled-background-color: var(--c-button-danger-disabled-background-color, var(--_c-button-disabled-background-color));\n --_c-button-danger-disabled-text-color: var(--c-button-danger-disabled-text-color, var(--_c-button-disabled-text-color));\n\n background-color: var(--_c-button-danger-disabled-background-color);\n color: var(--_c-button-danger-disabled-text-color);\n}\n\n:host(.c-button--danger.c-button--inverted) {\n /**\n * @prop --c-button-danger-inverted-background-color: Inverted danger button background color\n * @prop --c-button-danger-inverted-text-color: Inverted danger button text color\n */\n --_c-button-danger-inverted-text-color: var(--c-button-danger-inverted-text-color, var(--c-error-600));\n --_c-button-danger-inverted-background-color: var(--c-button-danger-inverted-background-color, var(--c-white));\n\n // private\n --_c-button-outline-color: var(--_c-button-danger-inverted-background-color);\n\n background-color: var(--_c-button-danger-inverted-background-color);\n color: var(--_c-button-danger-inverted-text-color);\n}\n\n:host(.c-button--danger.c-button--inverted:hover) {\n /**\n * @prop --c-button-danger-inverted-background-color-hover: Inverted danger button hover background color\n */\n --_c-button-danger-inverted-background-color-hover: var(--c-button-danger-inverted-background-color-hover, var(--c-error-100));\n\n background-color: var(--_c-button-danger-inverted-background-color-hover);\n}\n\n:host(.c-button--danger.c-button--inverted.c-button--disabled) {\n /**\n * @prop --c-button-danger-inverted-disabled-background-color: Disabled inverted danger button background color\n * @prop --c-button-danger-inverted-disabled-text-color: Disabled inverted danger button text color\n */\n --_c-button-danger-inverted-disabled-background-color: var(--c-button-danger-inverted-disabled-background-color, var(--_c-button-disabled-background-color));\n --_c-button-danger-inverted-disabled-text-color: var(--c-button-danger-inverted-disabled-text-color, var(--_c-button-disabled-text-color));\n\n background-color: var(--_c-button-danger-inverted-disabled-background-color);\n color: var(--_c-button-danger-inverted-disabled-text-color);\n}\n\n// ---- ghost ----------------------------------------------------------------\n\n:host(.c-button--ghost) {\n /**\n * @prop --c-button-ghost-background-color: Ghost button background color\n * @prop --c-button-ghost-text-color: Ghost button text color\n * @prop --c-button-ghost-loader-color: Ghost button loader color\n */\n --_c-button-ghost-background-color: var(--c-button-ghost-background-color, var(--c-primary-200));\n --_c-button-ghost-text-color: var(--c-button-ghost-text-color, var(--c-primary-600));\n --_c-button-ghost-loader-color: var(--c-button-ghost-loader-color, var(--_c-button-ghost-text-color));\n\n // private\n --_c-button-loader-color: var(--_c-button-ghost-loader-color);\n --_c-button-outline-color: var(--_c-button-ghost-text-color);\n\n background-color: var(--_c-button-ghost-background-color);\n color: var(--_c-button-ghost-text-color);\n}\n\n:host(.c-button--ghost:hover) {\n /**\n * @prop --c-button-ghost-background-color-hover: Ghost button hover background color\n */\n --_c-button-ghost-background-color-hover: var(--c-button-ghost-background-color-hover, var(--c-primary-100));\n\n background-color: var(--_c-button-ghost-background-color-hover);\n}\n\n:host(.c-button--ghost.c-button--disabled) {\n /**\n * @prop --c-button-ghost-disabled-background-color: Disabled ghost button background color\n * @prop --c-button-ghost-disabled-text-color: Disabled ghost button text color\n */\n --_c-button-ghost-disabled-background-color: var(--c-button-ghost-disabled-background-color, var(--_c-button-disabled-background-color));\n --_c-button-ghost-disabled-text-color: var(--c-button-ghost-disabled-text-color, var(--_c-button-disabled-text-color));\n\n background-color: var(--_c-button-ghost-disabled-background-color);\n color: var(--_c-button-ghost-disabled-text-color);\n}\n\n:host(.c-button--ghost.c-button--inverted) {\n /**\n * @prop --c-button-ghost-inverted-background-color: Inverted ghost button background color\n * @prop --c-button-ghost-inverted-text-color: Inverted ghost button text color\n */\n --_c-button-ghost-inverted-background-color: var(--c-button-ghost-inverted-background-color, rgba(var(--c-white-rgb), 0.2));\n --_c-button-ghost-inverted-text-color: var(--c-button-ghost-inverted-text-color, var(--c-white));\n\n // private\n --_c-button-outline-color: var(--_c-button-ghost-inverted-text-color);\n\n background-color: var(--_c-button-ghost-inverted-background-color);\n color: var(--_c-button-ghost-inverted-text-color);\n}\n\n:host(.c-button--ghost.c-button--inverted:hover) {\n /**\n * @prop --c-button-ghost-inverted-background-color-hover: Inverted ghost button hover text color\n */\n --_c-button-ghost-inverted-background-color-hover: var(--c-button-ghost-inverted-background-color-hover, rgba(var(--c-white-rgb), 0.3));\n\n background-color: var(--_c-button-ghost-inverted-background-color-hover);\n}\n\n:host(.c-button--ghost.c-button--inverted.c-button--disabled) {\n /**\n * @prop --c-button-ghost-inverted-disabled-background-color: Disabled inverted ghost button background color\n * @prop --c-button-ghost-inverted-disabled-text-color: Disabled inverted ghost button text color\n */\n --_c-button-ghost-inverted-disabled-background-color: var(--c-button-ghost-inverted-disabled-background-color, rgba(var(--c-white-rgb), 0.05));\n --_c-button-ghost-inverted-disabled-text-color: var(--c-button-ghost-inverted-disabled-text-color, var(--c-tertiary-400));\n\n background-color: var(--_c-button-ghost-inverted-disabled-background-color);\n color: var(--_c-button-ghost-inverted-disabled-text-color);\n}\n\n// ---- text ----------------------------------------------------------------\n\n:host(.c-button--text) {\n /**\n * @prop --c-button-text-background-color: Text button background color\n * @prop --c-button-text-text-color: Text button text color\n * @prop --c-button-text-loader-color: Text button loader color\n */\n --_c-button-text-background-color: var(--c-button-text-background-color, var(--c-transparent));\n --_c-button-text-text-color: var(--c-button-text-text-color, var(--c-primary-600));\n --_c-button-text-loader-color: var(--c-button-text-loader-color, var(--_c-button-text-text-color));\n\n // private\n --_c-button-loader-color: var(--_c-button-text-loader-color);\n --_c-button-outline-color: var(--_c-button-text-text-color);\n\n background-color: var(--_c-button-text-background-color);\n color: var(--_c-button-text-text-color);\n}\n\n:host(.c-button--text:hover) {\n /**\n * @prop --c-button-text-background-color-hover: Text button hover background color\n */\n --_c-button-text-background-color-hover: var(--c-button-text-background-color-hover, var(--c-primary-100));\n\n background-color: var(--_c-button-text-background-color-hover);\n}\n\n:host(.c-button--text.c-button--disabled) {\n /**\n * @prop --c-button-text-disabled-background-color: Disabled text button background color\n * @prop --c-button-text-disabled-text-color: Disabled text button text color\n */\n --_c-button-text-disabled-background-color: var(--c-button-text-disabled-background-color, var(--c-transparent));\n --_c-button-text-disabled-text-color: var(--c-button-text-disabled-text-color, var(--c-tertiary-500));\n\n background-color: var(--_c-button-text-disabled-background-color);\n color: var(--_c-button-text-disabled-text-color);\n}\n\n:host(.c-button--text.c-button--inverted) {\n /**\n * @prop --c-button-text-inverted-background-color: Inverted text button background color\n * @prop --c-button-text-inverted-text-color: Inverted text button text color\n */\n --_c-button-text-inverted-background-color: var(--c-button-text-inverted-background-color, var(--c-transparent));\n --_c-button-text-inverted-text-color: var(--c-button-text-inverted-text-color, var(--c-white));\n\n // private\n --_c-button-outline-color: var(--_c-button-text-inverted-text-color);\n\n background-color: var(--_c-button-text-inverted-background-color);\n color: var(--_c-button-text-inverted-text-color);\n}\n\n:host(.c-button--text.c-button--inverted:hover) {\n /**\n * @prop --c-button-text-inverted-background-color-hover: Inverted text button hover background color\n */\n --_c-button-text-inverted-background-color-hover: var(--c-button-text-inverted-background-color-hover, rgba(var(--c-white-rgb), 0.3));\n\n background-color: var(--_c-button-text-inverted-background-color-hover);\n}\n\n:host(.c-button--text.c-button--inverted.c-button--disabled) {\n /**\n * @prop --c-button-text-inverted-disabled-background-color: Disabled inverted text button background color\n * @prop --c-button-text-inverted-disabled-text-color: Disabled inverted text button text color\n */\n --_c-button-text-inverted-disabled-background-color: var(--c-button-text-inverted-disabled-background-color, var(--c-transparent));\n --_c-button-text-inverted-disabled-text-color: var(--c-button-text-inverted-disabled-text-color, var(--c-tertiary-400));\n\n background-color: var(--_c-button-text-inverted-disabled-background-color);\n color: var(--_c-button-text-inverted-disabled-text-color);\n}\n\n// ---- outlined ----------------------------------------------------------------\n\n:host(.c-button--outlined) {\n /**\n * @prop --c-button-outlined-background-color: Outlined button background color\n * @prop --c-button-outlined-border-color: Outlined button border color\n * @prop --c-button-outlined-text-color: Outlined button text color\n * @prop --c-button-outlined-loader-color: Outlined button loader color\n */\n --_c-button-outlined-text-color: var(--c-button-outlined-text-color, var(--c-primary-600));\n --_c-button-outlined-border-color: var(--c-button-outlined-border-color, var(--_c-button-outlined-text-color));\n --_c-button-outlined-background-color: var(--c-button-outlined-background-color, var(--c-transparent));\n --_c-button-outlined-loader-color: var(--c-button-outlined-loader-color, var(--_c-button-outlined-text-color));\n\n // private\n --_c-button-loader-color: var(--_c-button-outlined-loader-color);\n --_c-outline-color: var(--_c-button-outlined-border-color);\n --_c-button-outline-color: var(--_c-button-outlined-border-color);\n\n background-color: var(--_c-button-outlined-background-color);\n color: var(--_c-button-outlined-text-color);\n box-shadow: inset 0 0 0 2px var(--_c-outline-color);\n}\n\n:host(.c-button--outlined:hover) {\n /**\n * @prop --c-button-outlined-background-color-hover: Outlined button hover background color\n */\n --_c-button-outlined-background-color-hover: var(--c-button-outlined-background-color-hover, var(--c-primary-200));\n\n background-color: var(--_c-button-outlined-background-color-hover);\n}\n\n:host(.c-button--outlined.c-button--disabled) {\n /**\n * @prop --c-button-outlined-disabled-background-color: Disabled outlined button background color\n * @prop --c-button-outlined-disabled-border-color: Disabled outlined button border color\n * @prop --c-button-outlined-disabled-text-color: Disabled outlined button text color\n */\n --_c-button-outlined-disabled-text-color: var(--c-button-outlined-disabled-text-color, var(--c-tertiary-500));\n --_c-button-outlined-disabled-background-color: var(--c-button-outlined-disabled-background-color, var(--_c-button-outlined-background-color));\n --_c-button-outlined-disabled-border-color: var(--c-button-outlined-disabled-border-color, var(--c-tertiary-400));\n\n // private\n --_c-outline-color: var(--_c-button-outlined-disabled-border-color);\n\n background-color: var(--_c-button-outlined-disabled-background-color);\n color: var(--_c-button-outlined-disabled-text-color);\n}\n\n:host(.c-button--outlined.c-button--inverted) {\n /**\n * @prop --c-button-outlined-inverted-background-color: Inverted outlined button background color\n * @prop --c-button-outlined-inverted-border-color: Inverted outlined button border color\n * @prop --c-button-outlined-inverted-text-color: Inverted outlined button text color\n */\n --_c-button-outlined-inverted-text-color: var(--c-button-outlined-inverted-text-color, var(--c-white));\n --_c-button-outlined-inverted-border-color: var(--c-button-outlined-inverted-border-color, var(--_c-button-outlined-inverted-text-color));\n --_c-button-outlined-inverted-background-color: var(--c-button-outlined-inverted-background-color, var(--_c-button-outlined-background-color));\n\n // private\n --_c-outline-color: var(--_c-button-outlined-inverted-border-color);\n --_c-button-outline-color: var(--_c-button-outlined-inverted-border-color);\n\n background-color: var(--_c-button-outlined-inverted-background-color);\n color: var(--_c-button-outlined-inverted-text-color);\n}\n\n:host(.c-button--outlined.c-button--inverted:hover) {\n /**\n * @prop --c-button-outlined-background-color-hover: Outlined button hover background color\n */\n --_c-button-outlined-inverted-background-color-hover: var(--c-button-outlined-inverted-background-color-hover, rgba(var(--c-white-rgb), 0.3));\n\n background-color: var(--_c-button-outlined-inverted-background-color-hover);\n}\n\n:host(.c-button--outlined.c-button--inverted.c-button--disabled) {\n /**\n * @prop --c-button-outlined-inverted-disabled-background-color: Disabled inverted outlined button background color\n * @prop --c-button-outlined-inverted-disabled-border-color: Disabled inverted outlined button border color\n * @prop --c-button-outlined-inverted-disabled-text-color: Disabled inverted outlined button text color\n */\n --_c-button-outlined-inverted-disabled-border-color: var(--c-button-outlined-inverted-disabled-border-color, var(--c-tertiary-400));\n --_c-button-outlined-inverted-disabled-text-color: var(--c-button-outlined-inverted-disabled-text-color, var(--c-tertiary-400));\n --_c-button-outlined-inverted-disabled-background-color: var(--c-button-outlined-inverted-disabled-background-color, var(--_c-button-outlined-background-color));\n\n // private\n --_c-outline-color: var(--_c-button-outlined-inverted-disabled-border-color);\n\n background-color: var(--_c-button-outlined-inverted-disabled-background-color);\n color: var(--_c-button-outlined-inverted-disabled-text-color);\n}\n\n:host(.c-button--disabled) {\n /**\n * @prop --c-button-disabled-background-color: Disabled button background color\n * @prop --c-button-disabled-text-color: Disabled button text color\n */\n --_c-button-disabled-background-color: var(--c-button-disabled-background-color, var(--c-tertiary-100));\n --_c-button-disabled-text-color: var(--c-button-disabled-text-color, var(--c-tertiary-600));\n\n // private\n --_c-button-loader-color: var(--_c-button-disabled-text-color);\n\n background-color: var(--_c-button-disabled-background-color);\n color: var(--_c-button-disabled-text-color);\n pointer-events: none;\n}\n\n// ==========================================================================\n\n// :host(.c-button--active) {\n// --_c-button-text-color: var(--c-white);\n// }\n\n:host(.c-button:focus) {\n z-index: 2;\n}\n\n:host(.c-button) a:focus,\n:host(.c-button) button:focus {\n outline: none;\n}\n\n:host(.c-button) a:focus-visible,\n:host(.c-button) button:focus-visible {\n outline: 2px var(--_c-button-outline-color) solid;\n outline-offset: var(--_c-button-outline-offset);\n z-index: 1;\n}\n\n:host(.c-button--fit) {\n width: 100%;\n}\n\n:host(.c-button--small) {\n --_c-button-height: 28px;\n}\n\n:host(.c-button--large) {\n --_c-button-height: 52px;\n}\n\n:host(.c-button--fitted) {\n width: 100%;\n}\n\n::slotted([slot=\"icon\"]) {\n font-size: var(--_c-button-icon-size);\n}\n\n::slotted(svg) {\n fill: var(--_c-button-loader-color);\n}\n\na {\n text-decoration: none;\n}\n\nbutton,\na {\n background-color: transparent;\n border-radius: var(--_c-button-border-radius);\n color: currentColor;\n font-family: var(--c-font-family);\n display: inline-grid;\n place-items: center;\n border: none;\n padding: 0;\n position: relative;\n margin: 0;\n width: 100%;\n cursor: pointer;\n transition: background-color 0.3s cubic-bezier(0.25, 0.8, 0.5, 1),\n color 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);\n\n &:disabled {\n cursor: default;\n }\n}\n\n@media (max-width: 767px) {\n .full-width-mobile {\n max-width: 100% !important;\n width: 100% !important;\n margin: 0 !important;\n\n .c-button-padding {\n padding: 24px 38px;\n }\n }\n\n .full-width {\n flex-grow: 1 !important;\n }\n}\n\n.c-button__content {\n $this: &;\n\n border-radius: var(--_c-button-border-radius);\n position: relative;\n box-shadow: none;\n outline: none;\n backface-visibility: hidden;\n transform: translate3d(0, 0, 0);\n transition: background-color 0.3s;\n color: currentColor;\n margin: 0;\n text-decoration: none;\n display: flex;\n text-align: center;\n font-size: var(--_c-button-font-size);\n font-weight: 700;\n line-height: 18px;\n user-select: none;\n min-width: var(--_c-button-min-width);\n white-space: nowrap;\n height: 100%;\n width: 100%;\n align-items: center;\n justify-content: center;\n\n * {\n pointer-events: none;\n }\n\n svg {\n fill: var(--_c-button-loader-color);\n height: var(--_c-button-icon-size);\n width: var(--_c-button-icon-size);\n\n &.icon-by-path {\n margin-right: 8px;\n }\n\n &.button-icon {\n margin-right: 16px;\n font-size: 10px;\n margin-left: -8px;\n margin-bottom: -2px;\n }\n }\n\n &--small {\n --_c-button-padding: 0 12px;\n --_c-button-font-size: 14px;\n --_c-button-icon-size: 20px;\n }\n\n &--large {\n --_c-button-padding: 0 24px;\n --_c-button-font-size: 18px;\n }\n\n &--no-radius {\n --_c-button-border-radius: 0;\n }\n\n &--fitted {\n width: 100%;\n }\n\n &--description {\n display: grid;\n grid-template-columns: 1fr;\n gap: 0;\n }\n\n &__inner {\n display: flex;\n gap: 8px;\n height: var(--_c-button-height);\n align-items: center;\n justify-content: center;\n padding: var(--_c-button-padding);\n }\n\n &__description {\n font-weight: 400;\n font-size: 12px;\n padding: 0 12px 12px;\n\n &--loading {\n opacity: 0.8;\n }\n }\n}\n\n.hide-text {\n color: transparent !important;\n\n ::slotted([slot=\"icon\"]) {\n opacity: 0;\n }\n\n svg {\n fill: transparent !important;\n }\n\n .outlined.c-button svg {\n fill: transparent !important;\n }\n}\n\n.c-button__loader {\n width: 100%;\n position: absolute;\n height: var(--_c-button-height);\n display: grid;\n place-content: center;\n\n &.dense_spinner {\n padding-top: 7px;\n }\n}\n","import {\n Component,\n Prop,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n} from '@stencil/core';\n\n/**\n * @group Buttons\n * @slot Default slot - Button text\n * @slot icon - Icon\n * @slot description - Additional description to be shown below the button text\n */\n@Component({\n tag: 'c-button',\n styleUrl: 'c-button.scss',\n shadow: true,\n})\nexport class CButton {\n /**\n * Inverted button style for dark backgrounds\n */\n @Prop() inverted = false;\n\n /**\n * Outlined button style\n */\n @Prop() outlined = false;\n\n /**\n * Light button background\n */\n @Prop() ghost = false;\n\n /**\n * Danger variant style\n */\n @Prop() danger = false;\n\n /**\n * True when used as a tab button\n * @private\n */\n @Prop() grouped = false;\n\n /**\n * Transparent button background\n */\n @Prop() text = false;\n\n /**\n * Display loader on the button\n */\n @Prop() loading = false;\n\n /**\n * Fit width to containing element\n */\n @Prop() fit = false;\n\n /**\n * Remove the default border radius\n */\n @Prop() noRadius = false;\n\n /**\n * Button type\n */\n @Prop() type: 'button' | 'submit' = 'button';\n\n /**\n * Disable the button\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * Value for the button\n * - for use in the c-tab-buttons\n */\n @Prop() value?: number | string;\n\n /**\n * Id of the button\n */\n @Prop({ attribute: 'id' }) hostId: string;\n\n /**\n * Size of the button\n */\n @Prop() size: 'default' | 'small' | 'large' = 'default';\n\n /**\n * Hyperlink url\n */\n @Prop() href: string;\n\n /**\n * Hyperlink target\n */\n @Prop() target = '_blank';\n\n /**\n * Used a s atab button\n * @private\n */\n @Prop() tabs = false;\n\n /**\n * Emit changes to the parent\n * @private\n */\n @Event() tabChange: EventEmitter<{\n value: number | string;\n element: HTMLCButtonElement;\n }>;\n\n /**\n * Emit focus to the parent\n *\n * @private\n */\n @Event() tabFocus: EventEmitter<number | string>;\n\n @Element() hostElement: HTMLCButtonElement;\n\n @Listen('focus', { passive: true })\n onTabFocus() {\n this.tabFocus.emit(this.value ?? this.hostElement.dataset.index);\n }\n\n private _container?: HTMLDivElement;\n\n private _rippleElement: HTMLCRippleElement;\n\n private _onClick = (event, center = false) => {\n if (this.disabled) {\n event.preventDefault();\n\n return;\n }\n\n this._rippleElement.createRipple(event, this._container, center);\n\n if (this.tabs) {\n this.tabChange.emit({\n value: this.value ?? this.hostElement.dataset.index,\n element: this.hostElement,\n });\n }\n\n if (this.type === 'submit') {\n const submitButton = this._createHiddenSubmitButton();\n\n submitButton.click();\n\n submitButton.remove();\n }\n };\n\n private _createHiddenSubmitButton = () => {\n const form = this._closestElementComposed('form', this._container);\n\n const submitButton = document.createElement('button');\n submitButton.type = this.type;\n submitButton.style.display = 'none';\n submitButton.disabled = this.disabled;\n\n form.appendChild(submitButton);\n\n return submitButton;\n };\n\n private _onKeyDown = (event: KeyboardEvent) => {\n if (['Space', 'Enter'].includes(event.code)) {\n if (!!this.href) {\n window.open(this.href, this.target);\n }\n\n event.preventDefault();\n\n this._onClick(event, true);\n }\n };\n\n private _closestElementComposed(selector, base) {\n function __closestFrom(el) {\n const found = el.closest(selector);\n\n return found ? found : __closestFrom(el.getRootNode().host);\n }\n\n return __closestFrom(base);\n }\n\n private _containerhasDescriptionSlot: boolean;\n\n componentWillLoad() {\n this._containerhasDescriptionSlot = !!this.hostElement.querySelector(\n '[slot=\"description\"]',\n );\n }\n\n render() {\n const contentClasses = {\n 'c-button__content': true,\n 'c-button__content--description': this._containerhasDescriptionSlot,\n 'c-button__content--fitted': !!this.fit,\n 'c-button__content--large': this.size === 'large',\n 'c-button__content--no-radius': !!this.noRadius,\n 'c-button__content--small': this.size === 'small',\n };\n\n const innerClasses = {\n 'c-button__content__inner': true,\n 'hide-text': this.loading,\n };\n\n const buttonClasses = {\n fit: !!this.fit,\n grouped: this.grouped,\n outlined: this.outlined,\n };\n\n const hostClasses = {\n 'c-button': true,\n 'c-button--ghost': this.ghost,\n 'c-button--outlined': this.outlined,\n 'c-button--danger': this.danger,\n 'c-button--disabled': this.disabled,\n 'c-button--inverted': this.inverted,\n 'c-button--text': this.text,\n 'c-button--fitted': !!this.fit,\n 'c-button--description': !!this._containerhasDescriptionSlot,\n 'c-button--active': this.grouped && !this.outlined,\n 'c-button--no-radius': !!this.noRadius,\n [`c-button--${this.size}`]: true,\n };\n\n const descriptionSlotClasses = {\n 'c-button__content__description': this._containerhasDescriptionSlot,\n 'c-button__content__description--loading': this.loading,\n };\n\n const Tag = !!this.href ? 'a' : 'button';\n\n const hostAttributes = {\n onKeyDown: this._onKeyDown,\n };\n\n const attributes = {\n id: this.hostId,\n class: buttonClasses,\n disabled: this.disabled,\n onClick: this._onClick,\n type: this.type,\n };\n\n let linkAttributes = {};\n\n if (!!this.href) {\n linkAttributes = { href: this.href, target: this.target };\n }\n\n const spinnerSizes = {\n small: 20,\n default: 24,\n large: 28,\n };\n\n return (\n <Host class={hostClasses} {...hostAttributes}>\n <Tag {...attributes} {...linkAttributes}>\n <div\n class={contentClasses}\n ref={(el) => (this._container = el as HTMLDivElement)}\n >\n <div class={innerClasses}>\n {this.loading && (\n <div class=\"c-button__loader\">\n <c-spinner\n color=\"var(--_c-button-loader-color)\"\n size={spinnerSizes[this.size]}\n />\n </div>\n )}\n\n <slot></slot>\n </div>\n\n {this._containerhasDescriptionSlot && (\n <div class={descriptionSlotClasses}>\n <slot name=\"description\"></slot>\n </div>\n )}\n </div>\n\n <c-ripple ref={(el) => (this._rippleElement = el)}></c-ripple>\n </Tag>\n </Host>\n );\n }\n}\n",":host(c-card) {\n /**\n * @prop --c-card-gap: Card column gap / padding\n * @prop --c-card-background-color: Card background color\n */\n --_c-card-gap: var(--c-card-gap, clamp(1rem, 2vw, 1.5rem));\n --_c-card-background-color: var(--c-card-background-color, var(--c-white));\n\n display: flex;\n border-radius: 6px;\n box-shadow: rgba(0, 0, 0, 0.15) 0 10px 20px, rgba(0, 0, 0, 0.2) 0 5px 5px;\n padding-block: var(--_c-card-gap);\n position: relative;\n background-color: var(--_c-card-background-color);\n\n article {\n display: flex;\n flex-direction: column;\n flex: 1;\n gap: var(--_c-card-gap);\n max-width: 100%;\n }\n}\n\n:host(.c-card--fullscreen) {\n --c-icon-button-text-background-color: var(--c-white);\n\n overflow: auto;\n\n .c-card {\n &__fullscreen-toggle {\n position: fixed;\n\n @-moz-document url-prefix() {\n position: absolute;\n }\n }\n }\n}\n\n::slotted(c-loader) {\n border-radius: 6px;\n}\n\n.c-card {\n &__fullscreen-toggle {\n position: absolute;\n right: calc(var(--_c-card-gap) - 8px);\n top: calc(var(--_c-card-gap) - 8px);\n }\n}\n","import { mdiFullscreen, mdiFullscreenExit } from '@mdi/js';\nimport {\n Component,\n Element,\n Host,\n h,\n Prop,\n State,\n Method,\n} from '@stencil/core';\n\n/**\n * @group Cards\n * @slot Default slot - Card components\n */\n@Component({\n tag: 'c-card',\n styleUrl: 'c-card.scss',\n shadow: true,\n assetsDirs: ['assets'],\n})\nexport class CCard {\n /**\n * Enable the fullscreen toggle button\n */\n @Prop() fullscreen = false;\n\n @State() isFullscreen = false;\n\n @Element() host: HTMLCCardElement;\n\n private _toggleFullscreen() {\n this.isFullscreen = !this.isFullscreen;\n }\n\n private _onFullscreen() {\n if (document.fullscreenElement) {\n this.exitFullscreen();\n\n return;\n }\n\n this.host.requestFullscreen();\n\n const modalWrapper =\n this.host.parentElement?.shadowRoot?.querySelector('.modal-wrapper');\n\n if (modalWrapper) {\n (modalWrapper as HTMLDivElement).style.display = this.isFullscreen\n ? 'block'\n : 'flex';\n }\n }\n\n componentDidLoad() {\n const title = this.host.querySelector('c-card-title');\n\n if (!!title && this.fullscreen) {\n title.style.marginRight = '40px';\n }\n\n this.host.addEventListener(\n 'fullscreenchange',\n this._toggleFullscreen.bind(this),\n );\n }\n\n disconnectedCallback() {\n this.host.removeEventListener(\n 'fullscreenchange',\n this._toggleFullscreen.bind(this),\n );\n }\n\n /**\n * Exit fullscreen from the outside\n */\n @Method()\n async exitFullscreen() {\n if (!document.fullscreenElement) return;\n\n document.exitFullscreen();\n\n const modalWrapper =\n this.host.parentElement?.shadowRoot?.querySelector('.modal-wrapper');\n\n if (modalWrapper) {\n (modalWrapper as HTMLDivElement).style.display = 'flex';\n }\n }\n\n /**\n * Enter fullscreen from the outside\n */\n @Method()\n async enterFullscreen() {\n this.isFullscreen = true;\n }\n\n render() {\n const hostClasses = {\n 'c-card': true,\n 'c-card--fullscreen': this.isFullscreen,\n };\n\n return (\n <Host class={hostClasses}>\n <article>\n {this.fullscreen && (\n <c-icon-button\n aria-hidden=\"true\"\n class=\"c-card__fullscreen-toggle\"\n title={this.isFullscreen ? 'Exit fullscreen' : 'Enter fullscreen'}\n text\n onClick={() => this._onFullscreen()}\n >\n <c-icon\n path={this.isFullscreen ? mdiFullscreenExit : mdiFullscreen}\n />\n </c-icon-button>\n )}\n <slot></slot>\n </article>\n </Host>\n );\n }\n}\n",":host {\n padding: 0 var(--_c-card-gap, 24px);\n display: block;\n\n menu {\n margin: 0;\n padding: 0;\n }\n}\n\n.c-card-actions {\n align-items: center;\n display: flex;\n gap: 8px;\n\n ::slotted(c-button[fit]) {\n flex: 1;\n }\n\n &--align {\n &-center {\n align-items: center;\n }\n\n &-start {\n align-items: flex-start;\n }\n\n &-end {\n align-items: flex-end;\n }\n }\n\n &--justify {\n &-center {\n justify-content: center;\n }\n\n &-end {\n justify-content: flex-end;\n }\n\n &-start {\n justify-content: flex-start;\n }\n\n &-stretch {\n justify-content: stretch;\n\n ::slotted(*) {\n flex: 1;\n }\n }\n\n &-space-between {\n justify-content: space-between;\n }\n\n &-space-around {\n justify-content: space-around;\n }\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n/**\n * @parent c-card\n * @slot Default slot - Card actions\n */\n@Component({\n tag: 'c-card-actions',\n styleUrl: 'c-card-actions.scss',\n shadow: true,\n})\nexport class CCardActions {\n /**\n * Align the actions\n */\n @Prop() align: 'start' | 'center' | 'end' = 'center';\n\n /**\n * Justify the actions\n */\n @Prop() justify:\n | 'start'\n | 'center'\n | 'end'\n | 'space-between'\n | 'stretch'\n | 'space-around' = 'start';\n\n render() {\n const classes = {\n 'c-card-actions': true,\n [`c-card-actions--align-${this.align}`]: true,\n [`c-card-actions--justify-${this.justify}`]: true,\n };\n\n return (\n <footer>\n <menu class={classes}>\n <slot></slot>\n </menu>\n </footer>\n );\n }\n}\n",":host {\n display: block;\n padding: 0 var(--_c-card-gap, 24px);\n}\n\n.c-card-content {\n display: flex;\n flex-direction: column;\n gap: var(--_c-card-gap);\n\n ::slotted(*) {\n max-width: 100%;\n }\n}\n","import { Component, h } from '@stencil/core';\n/**\n * @parent c-card\n * @slot Default slot - Card contents\n */\n@Component({\n tag: 'c-card-content',\n styleUrl: 'c-card-content.scss',\n shadow: true,\n})\nexport class CCardContent {\n render() {\n return (\n <article class=\"c-card-content\">\n <slot></slot>\n </article>\n );\n }\n}\n",":host {\n /**\n * @prop --c-card-title-color: Card title color\n * @prop --c-card-title-underline-color: Card title underline color\n */\n --_c-card-title-color: var(--c-card-title-color, var(--c-text-system));\n --_c-card-title-underline-color: var(--c-card-title-underline-color, var(--c-primary-600));\n\n color: var(--_c-card-title-color);\n padding-inline: var(--_c-card-gap, 24px);\n display: block;\n font-family: var(--c-font-family);\n font-size: 1rem;\n font-weight: 500;\n text-transform: uppercase;\n}\n\n.c-card-title {\n &__underline {\n background-color: var(--_c-card-title-underline-color);\n border-radius: 4px;\n height: 4px;\n margin-top: 10px;\n width: 44px;\n }\n}\n","import { Component, h } from '@stencil/core';\n/**\n * @parent c-card\n * @slot Default slot - Card title text\n */\n@Component({\n tag: 'c-card-title',\n styleUrl: 'c-card-title.scss',\n shadow: true,\n})\nexport class CCardTitle {\n render() {\n return (\n <header class=\"c-card-title\">\n <slot></slot>\n <div class=\"c-card-title__underline\"></div>\n </header>\n );\n }\n}\n",":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(\n --c-dropdown-background-color,\n var(--c-white)\n );\n --_c-dropdown-background-color-hover: var(\n --c-dropdown-background-color-hover,\n var(--c-primary-200)\n );\n --_c-dropdown-text-color: var(--c-dropdown-text-color, var(--c-text-body));\n --_c-dropdown-text-color-active: var(\n --c-dropdown-text-color-active,\n var(--c-primary-600)\n );\n\n // private\n --_c-dropdown-font-size: 14px;\n --_c-dropdown-height: 42px;\n\n display: block;\n position: relative;\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 border-radius: 4px;\n background-color: transparent;\n border: none;\n margin: -4px 0 0;\n overflow: visible;\n padding: 4px 0 0;\n position: fixed;\n\n &::backdrop {\n display: none;\n }\n\n &[open].mobile {\n background-color: var(--_c-dropdown-background-color);\n width: 100vw;\n max-width: 100vw;\n height: 100vh;\n max-height: 100svh;\n inset: 0;\n\n .input-top-wrapper {\n padding: 8px;\n }\n }\n\n .input-bottom-wrapper.active {\n padding-top: 8px;\n }\n }\n\n .dummy {\n display: none;\n }\n\n ul {\n background-color: var(--_c-dropdown-background-color);\n box-shadow: 2px 4px 10px #00000029;\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 height: max-content;\n overflow-y: scroll;\n\n &.active {\n visibility: visible;\n animation: 0.2s 1 fade-in cubic-bezier(0.25, 0.8, 0.5, 1);\n\n &.mobile {\n width: 100vw;\n max-width: 100vw;\n height: 100vh;\n max-height: calc(100svh - 60px);\n }\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 &:hover,\n &:focus,\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 &:not(.disabled, :hover, :focus)[aria-selected=\"true\"] {\n background: var(--_c-dropdown-background-color-hover);\n color: var(--_c-dropdown-text-color-active);\n border-radius: 0;\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 { mdiAlert } from '@mdi/js';\nimport {\n Component,\n Host,\n Prop,\n h,\n Element,\n Method,\n Watch,\n Event,\n EventEmitter,\n State,\n} from '@stencil/core';\nimport { CAutocompleteItem, CSelectItem } from '../../types';\nimport { getScrollParent } from '../../utils';\n\n@Component({\n tag: 'c-dropdown',\n styleUrl: 'c-dropdown.scss',\n shadow: true,\n})\nexport class CDropdown {\n @Element() el: HTMLCDropdownElement;\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 * Dropdown options\n */\n @Prop() items:\n | NodeListOf<HTMLCOptionElement>\n | CAutocompleteItem[]\n | CSelectItem[];\n\n /**\n * Current index value\n */\n @Prop() index: number;\n\n /**\n * Id of the element\n */\n @Prop({ attribute: 'id' }) hostId: string;\n\n /**\n * Triggered when option is selected\n */\n @Event() selectOption: EventEmitter;\n\n /**\n * Type of the parent element\n */\n @Prop() type: 'select' | 'autocomplete';\n\n /**\n * Type of items\n */\n @Prop() itemType: 'option' | 'item';\n\n /**\n * Triggered when dropdown opens or closes\n */\n @Event() dropdownStateChange: EventEmitter<boolean>;\n\n /**\n * Dropdown dialog element\n */\n private _dialog: HTMLDialogElement;\n\n private _debounce = null;\n\n private _list: HTMLUListElement;\n\n private _outsideClickFn: () => void;\n\n private _resizeObserver: ResizeObserver;\n\n private _inputElement: HTMLCInputElement;\n\n private _dummyElement: HTMLDivElement;\n\n private _scrollParent: HTMLElement;\n\n private _isMobile = false;\n\n private _listItems: HTMLLIElement[] = [];\n\n @State() renderedList = null;\n\n @State() isOpen = false;\n\n @State() statusText = '';\n\n @Watch('items')\n optionsWatcher() {\n requestAnimationFrame(() => {\n this.renderedList = this._renderList();\n });\n }\n\n @Watch('isOpen')\n async stateWatcher(isOpen) {\n this.dropdownStateChange.emit(isOpen);\n\n this._scrollParent = this._scrollParent || (await getScrollParent(this.el));\n\n this._scrollParent.style.overflow = isOpen ? 'hidden' : null;\n }\n\n @Watch('index')\n handleIndexChange(index) {\n requestAnimationFrame(() => {\n this._updateStatusText();\n\n this._listItems[index]?.focus();\n });\n }\n\n /**\n * @private\n */\n @Method()\n async setStatusText(text: string) {\n requestAnimationFrame(() => {\n this.statusText = text;\n });\n }\n\n /**\n * @private\n */\n @Method()\n async focusItem(index: number) {\n requestAnimationFrame(() => {\n this._listItems[index]?.focus();\n });\n }\n\n /**\n * Open dropdown\n */\n @Method()\n async open() {\n if (this._dialog.open) return;\n\n this._outsideClickFn = this._handleOutsideClick.bind(this);\n\n window.addEventListener('click', this._outsideClickFn);\n\n requestAnimationFrame(() => {\n this.isOpen = true;\n\n this._positionMenu();\n });\n }\n\n /**\n * Open dropdown\n */\n @Method()\n async close() {\n this._dialog.close();\n\n this.isOpen = false;\n\n this._inputElement.slot = 'default';\n\n this._inputElement.hideDetails = this._hideDetails;\n\n this._dummyElement.style.width = '0';\n this._dummyElement.style.display = 'none';\n this._dialog.style.width = '0';\n\n window.removeEventListener('click', this._outsideClickFn);\n }\n\n private _setIsMobile() {\n this._isMobile = window.matchMedia(\n 'only screen and (max-width: 760px)',\n ).matches;\n }\n\n componentDidLoad() {\n this._setIsMobile();\n\n this._hideDetails = this.parent.hideDetails;\n\n this._inputElement = this.el.querySelector('c-input');\n\n this._resizeObserver = new ResizeObserver((entries) => {\n if (!this._dialog.open) return;\n\n requestAnimationFrame(() => {\n if (!Array.isArray(entries) || !entries.length) return;\n\n this._setIsMobile();\n\n this.close();\n });\n });\n\n this._resizeObserver.observe(window.document.body);\n\n requestAnimationFrame(() => {\n this.renderedList = this._renderList();\n });\n }\n\n /**\n * Select item\n * @returns the disabled status of the input\n */\n @Method()\n async selectItem(index: number) {\n const item = this._listItems[index];\n\n if (item.classList.contains('disabled')) {\n return true;\n }\n\n this._listItems[index].click();\n\n return false;\n }\n\n /**\n * Update list items\n */\n @Method()\n async updateList() {\n requestAnimationFrame(() => {\n this.renderedList = this._renderList();\n });\n }\n\n private _handleOutsideClick(event) {\n if (!this.isOpen) return;\n\n if (!event.composedPath().includes(this._dialog)) {\n this.close();\n }\n }\n\n private _inputSize = {\n height: 0,\n width: 0,\n };\n\n private _openedOnTop = false;\n\n private _hideDetails = false;\n\n private _highlightMatchingText(value: string) {\n const { query } = this.parent as HTMLCAutocompleteElement;\n\n if (this.parent.tagName === 'C-SELECT' || query === '') return value;\n\n const regex = new RegExp(query, 'gi');\n\n const highlighted = value\n .replace(/(<([^>]+)>)/gi, '')\n .replace(regex, (match) => `<mark>${match}</mark>`);\n\n return highlighted;\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 this._dialog.style.width = 'auto';\n this._dialog.style.opacity = '0';\n\n this._dialog.showModal();\n\n requestAnimationFrame(() => {\n let inputSlot = 'input-top';\n\n const { top: parentTop, width } = this._getParentPosition();\n\n const inputSize = this.el.getBoundingClientRect();\n\n this._inputSize = {\n height: inputSize.height,\n width: inputSize.width,\n };\n\n if (!this._isMobile) {\n this._dialog.style.width = `${width}px`;\n this._dialog.style.top = `${inputSize.top}px`;\n this._dialog.style.bottom = 'auto';\n this._dialog.style.left = `${inputSize.left}px`;\n\n const { bottom, right, height } = this._dialog.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._dialog.style.maxHeight = `${parentTop}px`;\n }\n\n if (!isInView.y || this._openedOnTop) {\n this._openedOnTop = true;\n\n this._inputElement.hideDetails = true;\n inputSlot = 'input-bottom';\n\n this._dialog.style.top = 'auto';\n this._dialog.style.bottom = `${innerHeight - inputSize.top - 44}px`;\n }\n }\n\n this._dummyElement.style.width = `${this._getParentPosition().width}px`;\n this._dummyElement.style.height = `${this._inputSize.height}px`;\n this._dummyElement.style.display = 'block';\n this._dummyElement.slot = 'default';\n\n this._inputElement.slot = inputSlot;\n\n this._inputElement.hideDetails = true;\n\n this._dialog.style.opacity = '1';\n\n const input = this.parent.shadowRoot.querySelector('input');\n\n input.focus();\n });\n }\n\n private _emptyItem() {\n const { query, loading } = this.parent as HTMLCAutocompleteElement;\n\n if (!query || loading) return;\n\n return (\n <li>\n <c-icon path={mdiAlert} size={18} color=\"var(--c-warning-600)\"></c-icon>\n No suggestions found\n </li>\n );\n }\n\n private _renderList() {\n return this.itemType === 'option'\n ? this._renderOptionsList()\n : this._renderItemsList();\n }\n\n private _renderOptionsList() {\n if (!this.items.length) return this._emptyItem();\n\n const options = Array.from(this.items) as HTMLCOptionElement[];\n\n this._listItems.length = 0;\n\n return options.map((option, index) => {\n const optionValue = option.querySelector('c-option-value');\n\n if (optionValue) {\n optionValue.innerHTML = this._highlightMatchingText(\n optionValue.textContent,\n );\n }\n\n return (\n <li\n ref={(el) => this._listItems.push(el)}\n id={`${this.hostId}-option-${option.value}`}\n tabindex=\"-1\"\n role=\"option\"\n aria-set-size={this.items.length.toString()}\n aria-pos-in-set={(index + 1).toString()}\n aria-selected={(!!option.selected).toString()}\n class={{ disabled: !!option.disabled }}\n data-name={option.name}\n onClick={(event) => {\n if (option.disabled) {\n event.preventDefault();\n\n return;\n }\n\n this.selectOption.emit({ name: option.name, value: option.value });\n }}\n innerHTML={option.outerHTML}\n ></li>\n );\n });\n }\n\n private _renderItemsList() {\n if (!this.items.length) return this._emptyItem();\n\n this._listItems.length = 0;\n\n return (this.items as unknown as CAutocompleteItem[]).map((item, index) => {\n return (\n <li\n ref={(el) => this._listItems.push(el)}\n id={`${this.hostId}-option-${item.value}`}\n tabindex=\"-1\"\n role=\"option\"\n aria-set-size={this.items.length.toString()}\n aria-pos-in-set={(index + 1).toString()}\n aria-selected={(this.index === index).toString()}\n class={{ disabled: !!item.disabled }}\n data-name={item.name}\n onClick={(event) => {\n if (item.disabled) {\n event.preventDefault();\n\n return;\n }\n\n this.selectOption.emit({ name: item.name, value: item.value });\n }}\n >\n <span innerHTML={this._highlightMatchingText(item.name)}></span>\n </li>\n );\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._listItems[this.index];\n\n const ending = !!this.items.length\n ? ', to navigate use up and down arrows'\n : '';\n\n const total = this._listItems.length;\n\n const position = this.index + 1;\n\n const isDisabled = !!selection?.classList?.contains('disabled');\n\n const beginning = isDisabled ? 'Disabled option - ' : '';\n\n let selectionText = !!selection\n ? `${beginning}${selection.dataset.name} - ${position} of ${total} is highlighted`\n : null;\n\n if (this.index === 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 render() {\n if (\n !this._isMobile &&\n this._dialog &&\n this.itemsPerPage &&\n this.itemsPerPage > 0 &&\n this.items.length > this.itemsPerPage\n ) {\n this._dialog.style.maxHeight = 42 * (this.itemsPerPage + 0.5) + 60 + 'px';\n this._list.style.maxHeight = 42 * (this.itemsPerPage + 0.5) + 'px';\n }\n\n return (\n <Host>\n <slot name=\"default\"></slot>\n\n <div class=\"dummy\" ref={(el) => (this._dummyElement = el)}></div>\n\n <dialog\n tabindex=\"-1\"\n ref={(el) => (this._dialog = el)}\n class={{ mobile: this._isMobile }}\n onCancel={() => this.close()}\n >\n <div\n id={'announce-' + this.hostId}\n class=\"visuallyhidden\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n {this.statusText}\n </div>\n\n <div class=\"input-top-wrapper\">\n <slot name=\"input-top\"></slot>\n </div>\n\n <ul\n ref={(el) => (this._list = el)}\n id={`${this.hostId}--results`}\n role=\"listbox\"\n aria-expanded={this.isOpen.toString()}\n class={{ active: this.isOpen, mobile: this._isMobile }}\n tabindex=\"-1\"\n >\n {this.renderedList}\n </ul>\n\n <div\n class={{ active: this._openedOnTop, 'input-bottom-wrapper': true }}\n >\n <slot name=\"input-bottom\"></slot>\n </div>\n </dialog>\n </Host>\n );\n }\n}\n",":host(c-icon) {\n /**\n * @prop --c-icon-color: Color of the icon\n */\n --_c-icon-color: var(\n --c-icon-color,\n var(--_c-icon-default-color, curentColor)\n );\n\n // private\n --_c-icon-size: var(--c-icon-size, 24px);\n\n display: inline-flex;\n align-items: center;\n height: var(--_c-icon-size);\n width: var(--_c-icon-size);\n\n svg {\n height: var(--_c-icon-size);\n width: var(--_c-icon-size);\n\n path {\n fill: var(--_c-icon-color);\n }\n }\n}\n","import { Component, Host, h, Prop, Element } from '@stencil/core';\n\n/**\n * @group Other\n */\n@Component({\n tag: 'c-icon',\n styleUrl: 'c-icon.scss',\n shadow: true,\n})\nexport class CIcon {\n @Element() host: HTMLCIconElement;\n\n /**\n * Svg path d attribute value\n */\n @Prop() path: string;\n\n /**\n * Icon size in pixels\n */\n @Prop() size = 24;\n\n /**\n * Fill color\n */\n @Prop() color = 'currentColor';\n\n render() {\n return (\n <Host\n style={{\n '--_c-icon-size': `${this.size}px`,\n '--_c-icon-default-color': this.color,\n }}\n >\n <svg viewBox=\"0 0 24 24\">\n <path d={this.path} />\n </svg>\n </Host>\n );\n }\n}\n",":host {\n /**\n * @prop --c-icon-button-background-color: Default icon button background color\n * @prop --c-icon-button-background-color-hover: Default icon button hover background\n * @prop --c-icon-button-badge-background-color: Default icon button badge background color\n * @prop --c-icon-button-badge-border-color: Default icon button badge outline color\n * @prop --c-icon-button-badge-text-color: Default icon button badge text color\n * @prop --c-icon-button-border-radius: Icon button border radius\n * @prop --c-icon-button-outline-color: Default icon button outline color\n * @prop --c-icon-button-text-color: Default icon button text color\n */\n --_c-icon-button-background-color: var(--c-icon-button-background-color, var(--c-primary-600));\n --_c-icon-button-background-color-hover: var(--c-icon-button-background-color-hover, var(--c-primary-400));\n --_c-icon-button-badge-background-color: var(--c-icon-button-badge-background-color, var(--c-warning-600));\n --_c-icon-button-badge-border-color: var(--c-icon-button-badge-border-color, var(--c-white));\n --_c-icon-button-badge-text-color: var(--c-icon-button-badge-text-color, var(--c-white));\n --_c-icon-button-border-radius: var(--c-icon-button-border-radius, 50%);\n --_c-icon-button-outline-color: var(--c-icon-button-outline-color, var(--c-primary-600));\n --_c-icon-button-text-color: var(--c-icon-button-text-color, var(--c-white));\n\n // private\n --_c-icon-button-loader-color: var(--_c-icon-button-text-color);\n --_c-icon-button-height: 40px;\n --_c-icon-button-width: 40px;\n\n display: block;\n position: relative;\n border-radius: var(--_c-icon-button-border-radius);\n\n button {\n background-color: transparent;\n color: currentColor;\n display: inline-grid;\n place-items: center;\n border: none;\n padding: 0;\n position: relative;\n margin: 0;\n width: 100%;\n height: 100%;\n cursor: pointer;\n transition:\n background-color 0.3s cubic-bezier(0.25, 0.8, 0.5, 1),\n color 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);\n outline: none;\n border-radius: var(--_c-icon-button-border-radius);\n\n &:disabled {\n cursor: default;\n }\n }\n\n c-badge {\n --_c-badge-background-color: var(--c-badge-background-color, var(--_c-icon-button-badge-background-color));\n --_c-badge-text-color: var(--c-badge-text-color, var(--_c-icon-button-badge-border-color));\n --_c-badge-border-color: var(--c-badge-border-color, var(--_c-icon-button-badge-text-color));\n }\n}\n\n:host(.c-icon-button) button {\n appearance: none;\n}\n\n:host(.c-icon-button) {\n font-family: var(--c-font-family);\n display: flex;\n border: none;\n padding: 0;\n width: var(--_c-icon-button-width);\n height: var(--_c-icon-button-height);\n background-color: var(--_c-icon-button-background-color);\n color: var(--_c-icon-button-text-color);\n transition: background-color 0.3s ease;\n cursor: pointer;\n position: relative;\n align-items: center;\n justify-content: center;\n backface-visibility: hidden;\n transform: translate3d(0, 0, 0);\n line-height: normal;\n\n ::slotted(c-icon) {\n --_c-icon-size: 24px;\n }\n\n ::slotted(svg),\n ::slotted(i),\n ::slotted(span) {\n width: 24px;\n height: 24px;\n font-size: 24px;\n }\n\n ::slotted(*),\n svg {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n}\n\n:host(:host:hover) {\n background-color: var(--_c-icon-button-background-color-hover);\n}\n\n:host(.c-icon-button--small) {\n --_c-icon-button-height: 32px;\n --_c-icon-button-width: 32px;\n\n ::slotted(c-icon) {\n --_c-icon-size: 20px;\n }\n\n ::slotted(svg),\n ::slotted(i),\n ::slotted(span) {\n width: 22px !important;\n height: 22px !important;\n font-size: 16px !important;\n }\n}\n\n:host(.c-icon-button--x-small) {\n --_c-icon-button-height: 28px;\n --_c-icon-button-width: 28px;\n\n ::slotted(c-icon) {\n --_c-icon-size: 14px;\n }\n\n ::slotted(svg),\n ::slotted(i),\n ::slotted(span) {\n width: 18px !important;\n height: 18px !important;\n font-size: 14px !important;\n }\n}\n\n:host(.c-icon-button) button:focus {\n outline: none;\n}\n\n:host(.c-icon-button) button:focus-visible {\n outline: 2px var(--_c-icon-button-outline-color) solid;\n outline-offset: 2px;\n}\n\n:host(.c-icon-button--inverted) {\n /**\n * @prop --c-icon-button-inverted-background-color: Inverted default button background color\n * @prop --c-icon-button-inverted-text-color: Iverted default button text color\n * @prop --c-icon-button-inverted-background-color-hover: Inverted default button hover background color\n * @prop --c-icon-button-inverted-badge-background-color: Iverted default button badge background color\n * @prop --c-icon-button-inverted-badge-border-color: Iverted default button badge outline color\n * @prop --c-icon-button-inverted-badge-text-color: Iverted default button badge text color\n */\n --_c-icon-button-inverted-background-color: var(--c-icon-button-inverted-background-color, var(--c-white));\n --_c-icon-button-inverted-text-color: var(--c-icon-button-inverted-text-color, var(--c-primary-600));\n --_c-icon-button-inverted-background-color-hover: var(--c-icon-button-inverted-background-color-hover, var(--c-primary-200));\n --_c-icon-button-inverted-badge-background-color: var(--c-icon-button-inverted-badge-background-color, var(--_c-icon-button-badge-background-color));\n --_c-icon-button-inverted-badge-border-color: var(--c-icon-button-inverted-badge-border-color, var(--c-transparent));\n --_c-icon-button-inverted-badge-text-color: var(--c-icon-button-inverted-badge-text-color, var(--_c-icon-button-badge-text-color));\n\n // private\n --_c-icon-button-loader-color: var(--_c-icon-button-inverted-text-color);\n\n background-color: var(--_c-icon-button-inverted-background-color);\n color: var(--_c-icon-button-inverted-text-color);\n\n c-badge {\n --_c-badge-text-color: var(--c-badge-text-color, var(--_c-icon-button-inverted-badge-border-color));\n --_c-badge-background-color: var(--c-badge-background-color, var(--_c-icon-button-inverted-badge-background-color));\n --_c-badge-border-color: var(--c-badge-border-color, var(--_c-icon-button-inverted-badge-text-color));\n }\n}\n\n:host(.c-icon-button--inverted:hover) {\n background-color: var(--_c-icon-button-inverted-background-color-hover);\n}\n\n:host(.c-icon-button--inverted.c-icon-button--disabled) {\n /**\n * @prop --c-icon-button-inverted-background-color-disabled: Disabled inverted default icon button background color\n * @prop --c-icon-button-inverted-text-color-disabled: Disabled inverted default icon button text color\n * @prop --c-icon-button-inverted-outline-color-disabled: Disabled inverted default icon button outline color\n * @prop --c-icon-button-inverted-badge-background-color-disabled: Disabled inverted default icon button badge background color\n * @prop --c-icon-button-inverted-badge-border-color-disabled: Disabled inverted default icon button badge border color\n * @prop --c-icon-button-inverted-badge-text-color-disabled: Disabled inverted default icon button badge text color\n */\n --_c-icon-button-inverted-background-color-disabled: var(--c-icon-button-inverted-background-color-disabled, var(--_c-icon-button-background-color-disabled));\n --_c-icon-button-inverted-text-color-disabled: var(--c-icon-button-inverted-text-color-disabled, var(--_c-icon-button-text-color-disabled));\n --_c-icon-button-inverted-outline-color-disabled: var(--c-icon-button-inverted-outline-color-disabled, var(--_c-icon-button-outline-color-disabled));\n --_c-icon-button-inverted-badge-background-color-disabled: var(--c-icon-button-inverted-badge-background-color-disabled, var(--c-tertiary-200));\n --_c-icon-button-inverted-badge-border-color-disabled: var(--c-icon-button-inverted-badge-border-color-disabled, var(--c-transparent));\n --_c-icon-button-inverted-badge-text-color-disabled: var(--c-icon-button-inverted-badge-text-color-disabled, var(--c-tertiary-700));\n\n // private\n --_c-icon-button-loader-color: var(--_c-icon-button-inverted-text-color-disabled);\n\n background-color: var(--_c-icon-button-inverted-background-color-disabled);\n color: var(--_c-icon-button-inverted-text-color-disabled);\n pointer-events: none;\n\n c-badge {\n --_c-badge-background-color: var(--c-badge-background-color, var(--_c-icon-button-inverted-badge-background-color-disabled));\n --_c-badge-text-color: var(--c-badge-text-color, var(--_c-icon-button-inverted-badge-border-color-disabled));\n --_c-badge-border-color: var(--c-badge-border-color, var(--_c-icon-button-inverted-badge-text-color-disabled));\n }\n\n .icon-button-badge {\n background: #acacac;\n }\n}\n\n:host(.c-icon-button--disabled) {\n /**\n * @prop --c-icon-button-background-color-disabled: Disabled default icon button background color\n * @prop --c-icon-button-background-color-disabled-hover: Disabled default icon button hover background color\n * @prop --c-icon-button-text-color-disabled: Disabled default icon button text color\n * @prop --c-icon-button-outline-color-disabled: Disabled default icon button outline color\n * @prop --c-icon-button-badge-background-color-disabled: Disabled default icon button badge background color\n * @prop --c-icon-button-badge-border-color-disabled: Disabled default icon button badge border color\n * @prop --c-icon-button-badge-text-color-disabled: Disabled default icon button badge text color\n */\n --_c-icon-button-background-color-disabled: var(--c-icon-button-background-color-disabled, var(--c-tertiary-100));\n --_c-icon-button-background-color-disabled-hover: var(--c-icon-button-background-color-disabled-hover, var(--c-tertiary-100));\n --_c-icon-button-text-color-disabled: var(--c-icon-button-text-color-disabled, var(--c-tertiary-600));\n --_c-icon-button-outline-color-disabled: var(--c-icon-button-outline-color-disabled, var(--c-tertiary-600));\n --_c-icon-button-badge-background-color-disabled: var(--c-icon-button-badge-background-color-disabled, var(--c-tertiary-600));\n --_c-icon-button-badge-border-color-disabled: var(--c-icon-button-badge-border-color-disabled, var(--_c-icon-button-badge-border-color));\n --_c-icon-button-badge-text-color-disabled: var(--c-icon-button-badge-text-color-disabled, var(--_c-icon-button-badge-text-color));\n\n // private\n --_c-icon-button-loader-color: var(--_c-icon-button-text-color-disabled);\n\n background-color: var(--_c-icon-button-background-color-disabled);\n color: var(--_c-icon-button-text-color-disabled);\n pointer-events: none;\n\n c-badge {\n --_c-badge-background-color: var(--c-badge-background-color, var(--_c-icon-button-badge-background-color-disabled));\n --_c-badge-text-color: var(--c-badge-text-color, var(--_c-icon-button-badge-border-color-disabled));\n --_c-badge-border-color: var(--c-badge-border-color, var(--_c-icon-button-badge-text-color-disabled));\n }\n}\n\n:host(.c-icon-button--danger) {\n /**\n * @prop --c-icon-button-danger-background-color: Danger icon button background color\n * @prop --c-icon-button-danger-text-color: Danger icon button text color\n * @prop --c-icon-button-danger-background-color-hover: Danger icon button hover background color\n * @prop --c-icon-button-danger-badge-background-color: Danger icon button badge background color\n * @prop --c-icon-button-danger-badge-border-color: Danger icon button badge border color\n * @prop --c-icon-button-danger-badge-text-color: Danger icon button badge text color\n */\n --_c-icon-button-danger-background-color: var(--c-icon-button-danger-background-color, var(--c-error-600));\n --_c-icon-button-danger-text-color: var(--c-icon-button-danger-text-color, var(--c-white));\n --_c-icon-button-danger-background-color-hover: var(--c-icon-button-danger-background-color-hover, var(--c-error-400));\n --_c-icon-button-danger-badge-background-color: var(--c-icon-button-danger-badge-background-color, var(--_c-icon-button-badge-background-color));\n --_c-icon-button-danger-badge-border-color: var(--c-icon-button-danger-badge-border-color, var(--_c-icon-button-badge-border-color));\n --_c-icon-button-danger-badge-text-color: var(--c-icon-button-danger-badge-text-color, var(--_c-icon-button-badge-text-color));\n\n // private\n --_c-icon-button-loader-color: var(--_c-icon-button-danger-text-color);\n\n background-color: var(--_c-icon-button-danger-background-color);\n color: var(--_c-icon-button-danger-text-color);\n\n c-badge {\n --_c-badge-background-color: var(--c-badge-background-color, var(--_c-icon-button-danger-badge-background-color));\n --_c-badge-text-color: var(--c-badge-text-color, var(--_c-icon-button-danger-badge-border-color));\n --_c-badge-border-color: var(--c-badge-border-color, var(--_c-icon-button-danger-badge-text-color));\n }\n}\n\n:host(.c-icon-button--danger:hover) {\n background-color: var(--_c-icon-button-danger-background-color-hover);\n}\n\n:host(.c-icon-button--danger.c-icon-button--disabled) {\n /**\n * @prop --c-icon-button-danger-background-color-disabled: Danger icon button background color\n * @prop --c-icon-button-danger-text-color-disabled: Danger icon button text color\n * @prop --c-icon-button-danger-badge-background-color-disabled: Danger icon button badge background color\n * @prop --c-icon-button-danger-badge-border-color-disabled: Danger icon button badge border color\n * @prop --c-icon-button-danger-badge-text-color-disabled: Danger icon button badge text color\n */\n --_c-icon-button-danger-background-color-disabled: var(--c-icon-button-danger-background-color-disabled, var(--_c-icon-button-background-color-disabled));\n --_c-icon-button-danger-text-color-disabled: var(--c-icon-button-danger-text-color-disabled, var(--_c-icon-button-text-color-disabled));\n --_c-icon-button-danger-badge-background-color-disabled: var(--c-icon-button-danger-badge-background-color-disabled, var(--_c-icon-button-badge-background-color-disabled));\n --_c-icon-button-danger-badge-border-color-disabled: var(--c-icon-button-danger-badge-border-color-disabled, var(--_c-icon-button-badge-border-color-disabled));\n --_c-icon-button-danger-badge-text-color-disabled: var(--c-icon-button-danger-badge-text-color-disabled, var(--_c-icon-button-badge-text-color-disabled));\n\n // private\n --_c-icon-button-loader-color: var(--_c-icon-button-danger-text-color-disabled);\n\n background-color: var(--_c-icon-button-danger-background-color-disabled);\n color: var(--_c-icon-button-danger-text-color-disabled);\n\n c-badge {\n --_c-badge-background-color: var(--c-badge-background-color, var(--_c-icon-button-danger-badge-background-color-disabled));\n --_c-badge-text-color: var(--c-badge-text-color, var(--_c-icon-button-danger-badge-border-color-disabled));\n --_c-badge-border-color: var(--c-badge-border-color, var(--_c-icon-button-danger-badge-text-color-disabled));\n }\n}\n\n:host(.c-icon-button--danger.c-icon-button--inverted) {\n /**\n * @prop --c-icon-button-danger-inverted-background-color: Danger icon button background color\n * @prop --c-icon-button-danger-inverted-text-color: Danger icon button text color\n * @prop --c-icon-button-danger-inverted-background-color-hover: Danger icon button hover background color\n * @prop --c-icon-button-danger-inverted-badge-background-color: Danger icon button badge background color\n * @prop --c-icon-button-danger-inverted-badge-border-color: Danger icon button badge border color\n * @prop --c-icon-button-danger-inverted-badge-text-color: Danger icon button badge text color\n */\n --_c-icon-button-danger-inverted-background-color: var(--_c-icon-button-inverted-background-color);\n --_c-icon-button-danger-inverted-text-color: var(--_c-icon-button-danger-background-color);\n --_c-icon-button-danger-inverted-badge-background-color: var(--_c-icon-button-inverted-badge-background-color);\n --_c-icon-button-danger-inverted-badge-border-color: var(--_c-icon-button-inverted-badge-border-color);\n --_c-icon-button-danger-inverted-badge-text-color: var(--_c-icon-button-inverted-badge-text-color);\n --_c-icon-button-loader-color: var(--_c-icon-button-danger-inverted-text-color);\n\n background-color: var(--_c-icon-button-danger-inverted-background-color);\n color: var(--_c-icon-button-danger-inverted-text-color);\n\n c-badge {\n --_c-badge-background-color: var(--c-badge-background-color, var(--_c-icon-button-danger-inverted-badge-background-color));\n --_c-badge-text-color: var(--c-badge-text-color, var(--_c-icon-button-danger-inverted-badge-border-color));\n --_c-badge-border-color: var(--c-badge-border-color, var(--_c-icon-button-danger-inverted-badge-text-color));\n }\n}\n\n:host(.c-icon-button--danger.c-icon-button--inverted.c-icon-button--disabled) {\n /**\n * @prop --c-icon-button-danger-inverted-background-color: Danger icon button background color\n * @prop --c-icon-button-danger-inverted-text-color: Danger icon button text color\n * @prop --c-icon-button-danger-inverted-background-color-hover: Danger icon button hover background color\n * @prop --c-icon-button-danger-inverted-badge-background-color: Danger icon button badge background color\n * @prop --c-icon-button-danger-inverted-badge-border-color: Danger icon button badge border color\n * @prop --c-icon-button-danger-inverted-badge-text-color: Danger icon button badge text color\n */\n --_c-icon-button-danger-inverted-disabled-background-color: var(--_c-icon-button-background-color-disabled);\n --_c-icon-button-danger-inverted-disabled-text-color: var(--_c-icon-button-text-color-disabled);\n --_c-icon-button-danger-inverted-disabled-badge-background-color: var(--_c-icon-button-inverted-badge-background-color-disabled);\n --_c-icon-button-danger-inverted-disabled-badge-border-color: var(--_c-icon-button-inverted-badge-border-color);\n --_c-icon-button-danger-inverted-disabled-badge-text-color: var(--_c-icon-button-inverted-badge-text-color-disabled);\n --_c-icon-button-loader-color: var(--_c-icon-button-danger-inverted-disabled-text-color);\n\n background-color: var(--_c-icon-button-danger-inverted-disabled-background-color);\n color: var(--_c-icon-button-danger-inverted-disabled-text-color);\n\n c-badge {\n --_c-badge-background-color: var(--c-badge-background-color, var(--_c-icon-button-danger-inverted-disabled-badge-background-color));\n --_c-badge-text-color: var(--c-badge-text-color, var(--_c-icon-button-danger-inverted-disabled-badge-border-color));\n --_c-badge-border-color: var(--c-badge-border-color, var(--_c-icon-button-danger-inverted-disabled-badge-text-color));\n }\n}\n\n:host(.c-icon-button--ghost) {\n /**\n * @prop --c-icon-button-ghost-background-color: Ghost icon button background color\n * @prop --c-icon-button-ghost-text-color: Ghost icon button text color\n * @prop --c-icon-button-ghost-background-color-hover: Ghost icon button hover background color\n * @prop --c-icon-button-ghost-badge-background-color: Ghost icon button badge background color\n * @prop --c-icon-button-ghost-badge-border-color: Ghost icon button badge border color\n * @prop --c-icon-button-ghost-badge-text-color: Ghost icon button badge text color\n */\n --_c-icon-button-ghost-background-color: var(--c-icon-button-ghost-background-color, rgba(var(--c-primary-rgb), 0.2));\n --_c-icon-button-ghost-text-color: var(--c-icon-button-ghost-text-color, var(--c-primary-600));\n --_c-icon-button-ghost-background-color-hover: var(--c-icon-button-ghost-background-color-hover, rgba(var(--c-primary-rgb), 0.3));\n --_c-icon-button-ghost-badge-background-color: var(--c-icon-button-ghost-badge-background-color, var(--_c-icon-button-badge-background-color));\n --_c-icon-button-ghost-badge-border-color: var(--c-icon-button-ghost-badge-border-color, var(--_c-icon-button-badge-border-color));\n --_c-icon-button-ghost-badge-text-color: var(--c-icon-button-ghost-badge-text-color, var(--_c-icon-button-badge-text-color));\n\n // private\n --_c-icon-button-loader-color: var(--_c-icon-button-ghost-text-color);\n\n background-color: var(--_c-icon-button-ghost-background-color);\n color: var(--_c-icon-button-ghost-text-color);\n\n c-badge {\n --_c-badge-background-color: var(--c-badge-background-color, var(--_c-icon-button-badge-background-color));\n --_c-badge-text-color: var(--c-badge-text-color, var(--_c-icon-button-badge-border-color));\n --_c-badge-border-color: var(--c-badge-border-color, var(--_c-icon-button-badge-text-color));\n }\n}\n\n:host(.c-icon-button--ghost:hover) {\n background-color: var(--_c-icon-button-ghost-background-color-hover);\n}\n\n:host(.c-icon-button--ghost.c-icon-button--inverted) {\n /**\n * @prop --c-icon-button-ghost-inverted-background-color: Inverted ghost icon button background color\n * @prop --c-icon-button-ghost-inverted-background-color-hover: Inverted ghost icon button hover background color\n * @prop --c-icon-button-ghost-inverted-text-color: Inverted ghost icon button text color\n * @prop --c-icon-button-ghost-inverted-badge-background-color: Inverted ghost icon button badge background color\n * @prop --c-icon-button-ghost-inverted-badge-border-color: Inverted ghost icon button badge border border color\n * @prop --c-icon-button-ghost-inverted-badge-text-color: Inverted ghost icon button badge text color\n */\n --_c-icon-button-ghost-inverted-background-color: var(--c-icon-button-ghost-inverted-background-color, rgba(var(--c-white-rgb), 0.2));\n --_c-icon-button-ghost-inverted-background-color-hover: var(--c-icon-button-ghost-inverted-background-color-hover, rgba(var(--c-white-rgb), 0.3));\n --_c-icon-button-ghost-inverted-text-color: var(--c-icon-button-ghost-inverted-text-color, var(--c-white));\n --_c-icon-button-ghost-inverted-badge-background-color: var(--c-icon-button-ghost-inverted-badge-background-color, var(--_c-icon-button-inverted-badge-background-color));\n --_c-icon-button-ghost-inverted-badge-border-color: var(--c-icon-button-ghost-inverted-badge-border-color, var(--_c-icon-button-inverted-badge-border-color));\n --_c-icon-button-ghost-inverted-badge-text-color: var(--c-icon-button-ghost-inverted-badge-text-color, var(--_c-icon-button-inverted-badge-text-color));\n\n // private\n --_c-icon-button-loader-color: var(--_c-icon-button-ghost-inverted-text-color);\n\n background-color: var(--_c-icon-button-ghost-inverted-background-color);\n color: var(--_c-icon-button-ghost-inverted-text-color);\n\n c-badge {\n --_c-badge-background-color: var(--c-badge-background-color, var(--_c-icon-button-ghost-inverted-badge-background-color));\n --_c-badge-text-color: var(--c-badge-text-color, var(--_c-icon-button-ghost-inverted-badge-border-color));\n --_c-badge-border-color: var(--c-badge-border-color, var(--_c-icon-button-ghost-inverted-badge-text-color));\n }\n}\n\n:host(.c-icon-button--ghost.c-icon-button--inverted:hover) {\n background-color: var(--_c-icon-button-ghost-inverted-background-color-hover);\n}\n\n:host(.c-icon-button--ghost.c-icon-button--disabled) {\n /**\n * @prop --c-icon-button-ghost-disabled-background-color: Disabled ghost icon button background color\n * @prop --c-icon-button-ghost-disabled-text-color: Disabled ghost icon button text color\n * @prop --c-icon-button-ghost-disabled-background-color-hover: Disabled ghost icon button hover background color\n * @prop --c-icon-button-ghost-disabled-badge-background-color: Disabled ghost icon button badge background color\n * @prop --c-icon-button-ghost-disabled-badge-border-color: Disabled ghost icon button badge border color\n * @prop --c-icon-button-ghost-disabled-badge-text-color: Disabled ghost icon button badge text color\n */\n --_c-icon-button-ghost-disabled-background-color: var(--c-icon-button-ghost-disabled-background-color, var(--c-tertiary-200));\n --_c-icon-button-ghost-disabled-text-color: var(--c-icon-button-ghost-disabled-text-color, var(--c-tertiary-500));\n --_c-icon-button-ghost-disabled-background-color-hover: var(--c-icon-button-ghost-disabled-background-color-hover, var(--c-tertiary-100));\n --_c-icon-button-ghost-disabled-badge-background-color: var(--c-icon-button-ghost-disabled-badge-background-color, var(--_c-icon-button-badge-background-color-disabled));\n --_c-icon-button-ghost-disabled-badge-border-color: var(--c-icon-button-ghost-disabled-badge-border-color, var(--_c-icon-button-badge-border-color-disabled));\n --_c-icon-button-ghost-disabled-badge-text-color: var(--c-icon-button-ghost-disabled-badge-text-color, var(--_c-icon-button-badge-text-color-disabled));\n\n // private\n --_c-icon-button-loader-color: var(--_c-icon-button-ghost-disabled-text-color);\n\n background-color: var(--_c-icon-button-ghost-disabled-background-color);\n color: var(--_c-icon-button-ghost-disabled-text-color);\n\n c-badge {\n --_c-badge-background-color: var(--c-badge-background-color, var(--_c-icon-button-ghost-disabled-badge-background-color));\n --_c-badge-text-color: var(--c-badge-text-color, var(--_c-icon-button-ghost-disabled-badge-border-color));\n --_c-badge-border-color: var(--c-badge-border-color, var(--_c-icon-button-ghost-disabled-badge-text-color));\n }\n}\n\n:host(.c-icon-button--ghost.c-icon-button--disabled:hover) {\n background-color: var(--_c-icon-button-ghost-disabled-background-color-hover);\n}\n\n:host(.c-icon-button--ghost.c-icon-button--inverted.c-icon-button--disabled) {\n /**\n * @prop --c-icon-button-ghost-inverted-disabled-background-color: Disabled ghost icon button background color\n * @prop --c-icon-button-ghost-inverted-disabled-text-color: Disabled ghost icon button text color\n * @prop --c-icon-button-ghost-inverted-disabled-badge-background-color: Disabled ghost icon button badge background color\n * @prop --c-icon-button-ghost-inverted-disabled-badge-border-color: Disabled ghost icon button badge border color\n * @prop --c-icon-button-ghost-inverted-disabled-badge-text-color: Disabled ghost icon button badge text color\n */\n --_c-icon-button-ghost-inverted-disabled-background-color: var(--c-icon-button-ghost-inverted-disabled-background-color, rgba(var(--c-white-rgb), 0.05));\n --_c-icon-button-ghost-inverted-disabled-text-color: var(--c-icon-button-ghost-inverted-disabled-text-color, var(--c-tertiary-400));\n --_c-icon-button-ghost-inverted-disabled-badge-background-color: var(--c-icon-button-ghost-inverted-disabled-badge-background-color, var(--_c-icon-button-inverted-badge-background-color-disabled));\n --_c-icon-button-ghost-inverted-disabled-badge-border-color: var(--c-icon-button-ghost-inverted-disabled-badge-border-color, var(--_c-icon-button-inverted-badge-border-color));\n --_c-icon-button-ghost-inverted-disabled-badge-text-color: var(--c-icon-button-ghost-inverted-disabled-badge-text-color, var(--_c-icon-button-inverted-badge-text-color-disabled));\n\n // private\n --_c-icon-button-loader-color: var(--_c-icon-button-ghost-inverted-disabled-text-color);\n\n background-color: var(--_c-icon-button-ghost-inverted-disabled-background-color);\n color: var(--_c-icon-button-ghost-inverted-disabled-text-color);\n\n c-badge {\n --_c-badge-background-color: var(--c-badge-background-color, var(--_c-icon-button-ghost-inverted-disabled-badge-background-color));\n --_c-badge-text-color: var(--c-badge-text-color, var(--_c-icon-button-ghost-inverted-disabled-badge-border-color));\n --_c-badge-border-color: var(--c-badge-border-color, var(--_c-icon-button-ghost-inverted-disabled-badge-text-color));\n }\n}\n\n:host(.c-icon-button--text) {\n /**\n * @prop --c-icon-button-text-text-color: Text icon button text color\n * @prop --c-icon-button-text-background-color: Text icon button background color\n * @prop --c-icon-button-text-background-color-hover: Text icon button hover background color\n * @prop --c-icon-button-text-badge-background-color: Text icon button badge background color\n * @prop --c-icon-button-text-badge-border-color: Text icon button badge border color\n * @prop --c-icon-button-text-badge-text-color: Text icon button badge text color\n */\n --_c-icon-button-text-text-color: var(--c-icon-button-text-text-color, var(--c-primary-600));\n --_c-icon-button-text-background-color: var(--c-icon-button-text-background-color, var(--c-transparent));\n --_c-icon-button-text-background-color-hover: var(--c-icon-button-text-background-color-hover, var(--c-primary-100));\n --_c-icon-button-text-badge-background-color: var(--c-icon-button-text-badge-background-color, var(--_c-icon-button-badge-background-color));\n --_c-icon-button-text-badge-border-color: var(--c-icon-button-text-badge-border-color, var(--_c-icon-button-badge-border-color));\n --_c-icon-button-text-badge-text-color: var(--c-icon-button-text-badge-text-color, var(--_c-icon-button-badge-text-color));\n\n // private\n --_c-icon-button-loader-color: var(--_c-icon-button-text-text-color);\n\n background-color: var(--_c-icon-button-text-background-color);\n color: var(--_c-icon-button-text-text-color);\n\n c-badge {\n --_c-badge-background-color: var(--c-badge-background-color, var(--_c-icon-button-text-badge-background-color));\n --_c-badge-text-color: var(--c-badge-text-color, var(--_c-icon-button-text-badge-border-color));\n --_c-badge-border-color: var(--c-badge-border-color, var(--_c-icon-button-text-badge-text-color));\n }\n}\n\n:host(.c-icon-button--text:hover) {\n background-color: var(--_c-icon-button-text-background-color-hover);\n}\n\n:host(.c-icon-button--text.c-icon-button--inverted) {\n /**\n * @prop --c-icon-button-text-text-color: Text icon button text color\n * @prop --c-icon-button-text-background-color: Text icon button background color\n * @prop --c-icon-button-text-background-color-hover: Text icon button hover background color\n * @prop --c-icon-button-text-badge-background-color: Text icon button badge background color\n * @prop --c-icon-button-text-badge-border-color: Text icon button badge border color\n * @prop --c-icon-button-text-badge-text-color: Text icon button badge text color\n */\n --_c-icon-button-text-inverted-text-color: var(--c-icon-button-text-inverted-text-color, var(--c-white));\n --_c-icon-button-text-inverted-background-color: var(--c-icon-button-text-inverted-background-color, var(--c-transparent));\n --_c-icon-button-text-inverted-background-color-hover: var(--c-icon-button-text-inverted-background-color-hover, rgba(var(--c-white-rgb), 0.2));\n --_c-icon-button-text-inverted-badge-background-color: var(--c-icon-button-text-inverted-badge-background-color, var(--_c-icon-button-badge-background-color));\n --_c-icon-button-text-inverted-badge-border-color: var(--c-icon-button-text-inverted-badge-border-color, var(--_c-icon-button-inverted-badge-border-color));\n --_c-icon-button-text-inverted-badge-text-color: var(--c-icon-button-text-inverted-badge-text-color, var(--_c-icon-button-badge-text-color));\n\n // private\n --_c-icon-button-loader-color: var(--_c-icon-button-text-inverted-text-color);\n\n background-color: var(--_c-icon-button-text-inverted-background-color);\n color: var(--_c-icon-button-text-inverted-text-color);\n\n c-badge {\n --_c-badge-background-color: var(--c-badge-background-color, var(--_c-icon-button-text-inverted-badge-background-color));\n --_c-badge-text-color: var(--c-badge-text-color, var(--_c-icon-button-text-inverted-badge-border-color));\n --_c-badge-border-color: var(--c-badge-border-color, var(--_c-icon-button-text-inverted-badge-text-color));\n }\n}\n\n:host(.c-icon-button--text.c-icon-button--inverted:hover) {\n background-color: var(--_c-icon-button-text-inverted-background-color-hover);\n}\n\n:host(.c-icon-button--text.c-icon-button--disabled) {\n /**\n * @prop --c-icon-button-text-disabled-text-color: Disabled text icon button text color\n * @prop --c-icon-button-text-disabled-background-color: Disabled text icon button background color\n * @prop --c-icon-button-text-disabled-badge-background-color: Disabled text icon button badge background color\n * @prop --c-icon-button-text-disabled-badge-border-color: Disabled text icon button badge border color\n * @prop --c-icon-button-text-disabled-badge-text-color: Disabled text icon button badge text color\n */\n --_c-icon-button-text-disabled-text-color: var(--c-icon-button-text-disabled-text-color, var(--c-tertiary-400));\n --_c-icon-button-text-disabled-background-color: var(--c-icon-button-text-disabled-background-color, var(--c-transparent));\n --_c-icon-button-text-disabled-badge-background-color: var(--c-icon-button-text-disabled-badge-background-color, var(--_c-icon-button-badge-background-color-disabled));\n --_c-icon-button-text-disabled-badge-border-color: var(--c-icon-button-text-disabled-badge-border-color, var(--_c-icon-button-badge-border-color-disabled));\n --_c-icon-button-text-disabled-badge-text-color: var(--c-icon-button-text-disabled-badge-text-color, var(--_c-icon-button-badge-text-color-disabled));\n\n // private\n --_c-icon-button-loader-color: var(--_c-icon-button-text-disabled-text-color);\n\n background-color: var(--_c-icon-button-text-disabled-background-color);\n color: var(--_c-icon-button-text-disabled-text-color);\n\n c-badge {\n --_c-badge-background-color: var(--c-badge-background-color, var(--_c-icon-button-text-disabled-badge-background-color));\n --_c-badge-text-color: var(--c-badge-text-color, var(--_c-icon-button-text-disabled-badge-border-color));\n --_c-badge-border-color: var(--c-badge-border-color, var(--_c-icon-button-text-disabled-badge-text-color));\n }\n}\n\n:host(.c-icon-button--text.c-icon-button--inverted.c-icon-button--disabled) {\n /**\n * @prop --c-icon-button-text-inverted-disabled-text-color: Disabled inverted text icon button text color\n * @prop --c-icon-button-text-inverted-disabled-background-color: Disabled inverted text icon button background color\n * @prop --c-icon-button-text-inverted-disabled-badge-background-color: Disabled inverted text icon button badge background color\n * @prop --c-icon-button-text-inverted-disabled-badge-border-color: Disabled inverted text icon button badge border color\n * @prop --c-icon-button-text-inverted-disabled-badge-text-color: Disabled inverted text icon button badge text color\n */\n --_c-icon-button-text-inverted-disabled-text-color: var(--c-icon-button-text-inverted-disabled-text-color, var(--c-tertiary-400));\n --_c-icon-button-text-inverted-disabled-background-color: var(--c-icon-button-text-inverted-disabled-background-color, var(--c-transparent));\n --_c-icon-button-text-inverted-disabled-badge-background-color: var(--c-icon-button-text-inverted-disabled-badge-background-color, var(--_c-icon-button-inverted-badge-background-color-disabled));\n --_c-icon-button-text-inverted-disabled-badge-border-color: var(--c-icon-button-text-inverted-disabled-badge-border-color, var(--_c-icon-button-inverted-badge-border-color-disabled));\n --_c-icon-button-text-inverted-disabled-badge-text-color: var(--c-icon-button-text-inverted-disabled-badge-text-color, var(--_c-icon-button-inverted-badge-text-color-disabled));\n\n // private\n --_c-icon-button-loader-color: var(--_c-icon-button-text-inverted-disabled-text-color);\n\n background-color: var(--_c-icon-button-text-inverted-disabled-background-color);\n color: var(--_c-icon-button-text-inverted-disabled-text-color);\n\n c-badge {\n --_c-badge-background-color: var(--c-badge-background-color, var(--_c-icon-button-text-inverted-disabled-badge-background-color));\n --_c-badge-text-color: var(--c-badge-text-color, var(--_c-icon-button-text-inverted-disabled-badge-border-color));\n --_c-badge-border-color: var(--c-badge-border-color, var(--_c-icon-button-text-inverted-disabled-badge-text-color));\n }\n}\n\n:host(.c-icon-button--outlined) {\n /**\n * @prop --c-icon-button-outlined-text-color: Outlined icon button text color\n * @prop --c-icon-button-outlined-background-color: Outlined icon button background color\n * @prop --c-icon-button-outlined-background-color-hover: Outlined icon button hover background color\n * @prop --c-icon-button-outlined-border-color: Outlined icon button border color\n * @prop --c-icon-button-outlined-badge-background-color: Outlined icon button badge background color\n * @prop --c-icon-button-outlined-badge-border-color: Outlined icon button badge border color\n * @prop --c-icon-button-outlined-badge-text-color: Outlined icon button badge text color\n */\n --_c-icon-button-outlined-text-color: var(--c-icon-button-outlined-text-color, var(--c-primary-600));\n --_c-icon-button-outlined-background-color: var(--c-icon-button-outlined-background-color, var(--c-transparent));\n --_c-icon-button-outlined-background-color-hover: var(--c-icon-button-outlined-background-color-hover, rgba(var(--c-primary-rgb), 0.1));\n --_c-icon-button-outlined-border-color: var(--c-icon-button-outlined-border-color, var(--_c-icon-button-outlined-text-color));\n --_c-icon-button-outlined-badge-background-color: var(--c-icon-button-outlined-badge-background-color, var(--_c-icon-button-badge-background-color));\n --_c-icon-button-outlined-badge-border-color: var(--c-icon-button-outlined-badge-border-color, var(--_c-icon-button-badge-border-color));\n --_c-icon-button-outlined-badge-text-color: var(--c-icon-button-outlined-badge-text-color, var(--_c-icon-button-badge-text-color));\n\n // private\n --_c-icon-button-loader-color: var(--_c-icon-button-outlined-text-color);\n\n background-color: var(--_c-icon-button-outlined-background-color);\n box-shadow: inset 0 0 0 2px var(--_c-icon-button-outlined-border-color);\n color: var(--_c-icon-button-outlined-text-color);\n\n c-badge {\n --_c-badge-background-color: var(--c-badge-background-color, var(--_c-icon-button-outlined-badge-background-color));\n --_c-badge-text-color: var(--c-badge-text-color, var(--_c-icon-button-outlined-badge-border-color));\n --_c-badge-border-color: var(--c-badge-border-color, var(--_c-icon-button-outlined-badge-text-color));\n }\n}\n\n:host(.c-icon-button--outlined:hover) {\n background-color: var(--_c-icon-button-outlined-background-color-hover);\n}\n\n:host(.c-icon-button--outlined.c-icon-button--disabled) {\n /**\n * @prop --c-icon-button-outlined-disabled-text-color: Disabled outlined icon button text color\n * @prop --c-icon-button-outlined-disabled-background-color: Disabled outlined icon button background color\n * @prop --c-icon-button-outlined-disabled-border-color: Disabled outlined icon button border color\n * @prop --c-icon-button-outlined-disabled-badge-background-color: Disabled outlined icon button badge background color\n * @prop --c-icon-button-outlined-disabled-badge-border-color: Disabled outlined icon button badge border color\n * @prop --c-icon-button-outlined-disabled-badge-text-color: Disabled outlined icon button badge text color\n */\n --_c-icon-button-outlined-disabled-text-color: var(--c-icon-button-outlined-disabled-text-color, var(--c-tertiary-500));\n --_c-icon-button-outlined-disabled-background-color: var(--c-icon-button-outlined-disabled-background-color, var(--c-transparent));\n --_c-icon-button-outlined-disabled-border-color: var(--c-icon-button-outlined-disabled-border-color, var(--c-tertiary-400));\n --_c-icon-button-outlined-disabled-badge-background-color: var(--c-icon-button-outlined-disabled-badge-background-color, var(--_c-icon-button-badge-background-color-disabled));\n --_c-icon-button-outlined-disabled-badge-border-color: var(--c-icon-button-outlined-disabled-badge-border-color, var(--_c-icon-button-badge-border-color-disabled));\n --_c-icon-button-outlined-disabled-badge-text-color: var(--c-icon-button-outlined-disabled-badge-text-color, var(--_c-icon-button-badge-text-color-disabled));\n\n // private\n --_c-icon-button-loader-color: var(--_c-icon-button-outlined-disabled-text-color);\n\n background-color: var(--_c-icon-button-outlined-disabled-background-color);\n box-shadow: inset 0 0 0 2px var(--_c-icon-button-outlined-disabled-border-color);\n color: var(--_c-icon-button-outlined-disabled-text-color);\n\n c-badge {\n --_c-badge-background-color: var(--c-badge-background-color, var(--_c-icon-button-outlined-disabled-badge-background-color));\n --_c-badge-text-color: var(--c-badge-text-color, var(--_c-icon-button-outlined-disabled-badge-border-color));\n --_c-badge-border-color: var(--c-badge-border-color, var(--_c-icon-button-outlined-disabled-badge-text-color));\n }\n}\n\n:host(.c-icon-button--outlined.c-icon-button--inverted) {\n /**\n * @prop --c-icon-button-outlined-inverted-text-color: Inverted outlined icon button text color\n * @prop --c-icon-button-outlined-inverted-background-color: Inverted outlined icon button background color\n * @prop --c-icon-button-outlined-inverted-background-color-hover: INverted outlined icon button hover background color\n * @prop --c-icon-button-outlined-inverted-border-color: Inverted outlined icon button border color\n * @prop --c-icon-button-outlined-inverted-badge-background-color: Inverted outlined icon button badge background color\n * @prop --c-icon-button-outlined-inverted-badge-border-color: Inverted outlined icon button badge border color\n * @prop --c-icon-button-outlined-inverted-badge-text-color: Inverted outlined icon button badge text color\n */\n --_c-icon-button-outlined-inverted-text-color: var(--c-icon-button-outlined-inverted-text-color, var(--c-white));\n --_c-icon-button-outlined-inverted-background-color: var(--c-icon-button-outlined-inverted-background-color, var(--c-transparent));\n --_c-icon-button-outlined-inverted-background-color-hover: var(--c-icon-button-outlined-inverted-background-color-hover, rgba(var(--c-white-rgb), 0.2));\n --_c-icon-button-outlined-inverted-border-color: var(--c-icon-button-outlined-inverted-border-color, var(--_c-icon-button-outlined-inverted-text-color));\n --_c-icon-button-outlined-inverted-badge-background-color: var(--c-icon-button-outlined-inverted-badge-background-color, var(--_c-icon-button-inverted-badge-background-color));\n --_c-icon-button-outlined-inverted-badge-border-color: var(--c-icon-button-outlined-inverted-badge-border-color, var(--_c-icon-button-inverted-badge-border-color));\n --_c-icon-button-outlined-inverted-badge-text-color: var(--c-icon-button-outlined-inverted-badge-text-color, var(--_c-icon-button-inverted-badge-text-color));\n\n // private\n --_c-icon-button-loader-color: var(--_c-icon-button-outlined-inverted-text-color);\n\n background-color: var(--_c-icon-button-outlined-inverted-background-color);\n box-shadow: inset 0 0 0 2px var(--_c-icon-button-outlined-inverted-border-color);\n color: var(--_c-icon-button-outlined-inverted-text-color);\n\n c-badge {\n --_c-badge-background-color: var(--c-badge-background-color, var(--_c-icon-button-outlined-inverted-badge-background-color));\n --_c-badge-text-color: var(--c-badge-text-color, var(--_c-icon-button-outlined-inverted-badge-border-color));\n --_c-badge-border-color: var(--c-badge-border-color, var(--_c-icon-button-outlined-inverted-badge-text-color));\n }\n}\n\n:host(.c-icon-button--outlined.c-icon-button--inverted:hover) {\n background-color: var(--_c-icon-button-outlined-inverted-background-color-hover);\n}\n\n:host(.c-icon-button--outlined.c-icon-button--inverted.c-icon-button--disabled) {\n /**\n * @prop --c-icon-button-outlined-inverted-disabled-text-color: Disabled outlined icon button text color\n * @prop --c-icon-button-outlined-inverted-disabled-background-color: Disabled outlined icon button background color\n * @prop --c-icon-button-outlined-inverted-disabled-border-color: Disabled outlined icon button border color\n * @prop --c-icon-button-outlined-inverted-disabled-badge-background-color: Disabled outlined icon button badge background color\n * @prop --c-icon-button-outlined-inverted-disabled-badge-border-color: Disabled outlined icon button badge border color\n * @prop --c-icon-button-outlined-inverted-disabled-badge-text-color: Disabled outlined icon button badge text color\n */\n --_c-icon-button-outlined-inverted-disabled-text-color: var(--c-icon-button-outlined-inverted-disabled-text-color, var(--c-tertiary-400));\n --_c-icon-button-outlined-inverted-disabled-background-color: var(--c-icon-button-outlined-inverted-disabled-background-color, var(--c-transparent));\n --_c-icon-button-outlined-inverted-disabled-border-color: var(--c-icon-button-outlined-inverted-disabled-border-color, var(--c-tertiary-500));\n --_c-icon-button-outlined-inverted-disabled-badge-background-color: var(--c-icon-button-outlined-inverted-disabled-badge-background-color, var(--_c-icon-button-inverted-badge-background-color-disabled));\n --_c-icon-button-outlined-inverted-disabled-badge-border-color: var(--c-icon-button-outlined-inverted-disabled-badge-border-color, var(--_c-icon-button-inverted-badge-border-color-disabled));\n --_c-icon-button-outlined-inverted-disabled-badge-text-color: var(--c-icon-button-outlined-inverted-disabled-badge-text-color, var(--_c-icon-button-inverted-badge-text-color-disabled));\n\n // private\n --_c-icon-button-loader-color: var(--_c-icon-button-outlined-iverted-disabled-text-color);\n\n background-color: var(--_c-icon-button-outlined-inverted-disabled-background-color);\n box-shadow: inset 0 0 0 2px var(--_c-icon-button-outlined-inverted-disabled-border-color);\n color: var(--_c-icon-button-outlined-inverted-disabled-text-color);\n\n c-badge {\n --_c-badge-background-color: var(--c-badge-background-color, var(--_c-icon-button-outlined-inverted-disabled-badge-background-color));\n --_c-badge-text-color: var(--c-badge-text-color, var(--_c-icon-button-outlined-inverted-disabled-badge-border-color));\n --_c-badge-border-color: var(--c-badge-border-color, var(--_c-icon-button-outlined-inverted-disabled-badge-text-color));\n }\n}\n\n::slotted(*),\nsvg {\n pointer-events: none;\n}\n\n.inner-container {\n align-items: center;\n display: flex;\n height: 100%;\n inset: 0;\n justify-content: center;\n overflow: hidden;\n position: relative;\n transform: translateZ(0);\n width: 100%;\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\n\n/**\n * @group Buttons\n * @slot Default slot - Default slot for the icon\n */\n@Component({\n tag: 'c-icon-button',\n styleUrl: 'c-icon-button.scss',\n shadow: true,\n})\nexport class CIconButton {\n /**\n * Show a badge on top of the icon\n */\n @Prop() badge: string;\n\n /**\n * Danger variant of the button\n */\n @Prop() danger = false;\n\n /**\n * Loading variant of the button\n */\n @Prop() loading = false;\n\n /**\n * Text variant of the button\n */\n @Prop() text = false;\n\n /**\n * Inverted color for dark backgrounds\n */\n @Prop() inverted = false;\n\n /**\n * Outlined variant of the button\n */\n @Prop() outlined = false;\n\n /**\n * Path for the svg icon\n */\n @Prop() path: string = null;\n\n /**\n * Ghost variant of the button\n */\n @Prop() ghost = false;\n\n /**\n * Disable the button\n */\n @Prop() disabled = false;\n\n /**\n * Size of the button\n */\n @Prop() size: 'default' | 'x-small' | 'small' = 'default';\n\n private _container?: HTMLDivElement;\n\n private _rippleElement: HTMLCRippleElement;\n\n private _renderBadge() {\n return <c-badge>{this.badge}</c-badge>;\n }\n\n private _hostClasses() {\n return {\n 'c-icon-button': true,\n 'c-icon-button--disabled': !!this.disabled,\n 'c-icon-button--danger': !!this.danger,\n 'c-icon-button--text': !!this.text,\n 'c-icon-button--ghost': !!this.ghost,\n 'c-icon-button--outlined': !!this.outlined,\n 'c-icon-button--inverted': !!this.inverted,\n 'c-icon-button--small': this.size === 'small',\n 'c-icon-button--x-small': this.size === 'x-small',\n };\n }\n\n private _onClick = (event) => {\n this._rippleElement.createRipple(event, this._container);\n };\n\n render() {\n const spinnerSizes = {\n 'x-small': 18,\n small: 20,\n default: 24,\n };\n\n return (\n <Host class={this._hostClasses()}>\n <button disabled={this.disabled} onClick={this._onClick}>\n <div\n class=\"inner-container\"\n ref={(el) => (this._container = el as HTMLDivElement)}\n >\n {this.loading && (\n <c-spinner\n color=\"var(--_c-icon-button-loader-color)\"\n size={spinnerSizes[this.size]}\n />\n )}\n\n {!this.loading && (\n <slot>\n {this.path && (\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\n <path d={this.path} />\n </svg>\n )}\n </slot>\n )}\n </div>\n\n {this.badge && this._renderBadge()}\n\n <c-ripple ref={(el) => (this._rippleElement = el)}></c-ripple>\n </button>\n </Host>\n );\n }\n}\n",":host(c-input) {\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 input[aria-expanded=\"true\"],\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 slot {\n display: none;\n }\n\n c-icon-button {\n aspect-ratio: 1;\n margin-right: -6px;\n }\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) 0.08s;\n white-space: nowrap;\n\n &.active {\n transform: translateY(-18px) scale(0.75);\n }\n\n span {\n color: var(--c-error-600);\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-error-600);\n\n fieldset {\n border-color: var(--c-error-600) !important;\n }\n\n label {\n color: var(--c-error-600) !important;\n }\n\n &:focus-within {\n color: var(--c-error-600);\n }\n }\n}\n","import {\n Component,\n Host,\n h,\n State,\n Prop,\n Event,\n EventEmitter,\n Element,\n Watch,\n Method,\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 * Active state\n */\n @Prop() active = false;\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 /**\n * @private\n */\n @Method()\n async reset() {\n this._onReset();\n }\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 if (!this.active) {\n this.isFocused = false;\n this._hasBlurred = true;\n }\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 if (\n !!this.placeholder &&\n !this.value &&\n (this.active || this.isFocused)\n ) {\n this.inputField.placeholder = this.placeholder;\n\n return;\n }\n\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 || this.active,\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> *</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 'c-input--active': this.isFocused || this.active,\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",":host {\n --_c-message-error-color: var(--c-error-600);\n --_c-message-hint-color: var(--c-text-system);\n\n display: block;\n line-height: 1;\n padding: 0 12px;\n}\n\n.c-message {\n $this: &;\n\n &--active {\n #{$this} {\n &-item {\n opacity: 1;\n transform: translateY(0);\n }\n }\n }\n\n &-item {\n font-size: 12px;\n min-height: 16px;\n opacity: 0;\n transform: translateY(-4px);\n transition: all 0.2s cubic-bezier(0.25, 0.8, 0.5, 1);\n\n &--hint {\n color: var(--_c-message-hint-color);\n }\n\n &--error {\n color: var(--_c-message-error-color);\n }\n\n span {\n align-items: flex-start;\n color: currentColor;\n display: flex;\n gap: 4px;\n min-height: 16px;\n }\n\n svg {\n fill: currentColor;\n height: 16px;\n width: 16px;\n position: relative;\n top: -2px;\n }\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","import { mdiCloseCircle } from '@mdi/js';\nimport { Component, Host, Prop, State, Watch, h } from '@stencil/core';\n\n/**\n * @parent None\n */\n@Component({\n tag: 'c-message',\n styleUrl: 'c-message.scss',\n shadow: true,\n})\nexport class CMessage {\n /**\n * Hint text for the input\n */\n @Prop() hint = '';\n\n /**\n * Id of the related input element\n */\n @Prop() inputId: string;\n\n /**\n * Parent validíty\n */\n @Prop() valid = true;\n\n /**\n * Custom validation message\n */\n @Prop() validation = 'Required field';\n\n @State() messageOptions = {\n show: true,\n type: 'hint',\n content: '',\n };\n\n @Watch('valid')\n onValidChange(valid: boolean) {\n // if (this.validateOnBlur && !this._hasBlurred) return;\n\n this._handleValidation(valid);\n }\n\n @Watch('validation')\n onValidationMessageChange(message: string) {\n if (this.valid || !message) return;\n\n this.messageOptions = {\n ...this.messageOptions,\n content: (\n <span>\n <span class=\"visuallyhidden\">Error: </span>\n {this._validationIcon} {message}\n </span>\n ),\n };\n }\n\n @Watch('hint')\n onHintMessageChange(message: string) {\n if (!this.valid || !message) return;\n\n this.messageOptions = {\n ...this.messageOptions,\n content: (\n <span>\n <span class=\"visuallyhidden\">Hint: </span>\n {message}\n </span>\n ),\n };\n }\n\n private _handleValidation(valid: boolean, timeout = 200) {\n this.messageOptions = {\n ...this.messageOptions,\n show: false,\n };\n\n setTimeout(() => {\n this.messageOptions = {\n ...this.messageOptions,\n type: valid ? 'hint' : 'error',\n show: true,\n content: valid ? (\n <span id={`hint-${this.inputId}`}>\n <span class=\"visuallyhidden\">Hint: </span>\n {this.hint}\n </span>\n ) : (\n <span id={`error-${this.inputId}`}>\n {this._validationIcon}\n <span class=\"visuallyhidden\">Error: </span>\n {this.validation}\n </span>\n ),\n };\n }, timeout);\n }\n\n private _validationIcon = (\n <svg height=\"16px\" width=\"16px\" viewBox=\"0 0 24 24\">\n <path d={mdiCloseCircle} />\n </svg>\n );\n\n componentDidLoad() {\n this._handleValidation(this.valid, 0);\n }\n\n render() {\n const classes = {\n 'c-message': true,\n 'c-message--active': this.messageOptions.show,\n };\n\n const messageClasses = {\n 'c-message-item': true,\n [`c-message-item--${this.messageOptions.type}`]: true,\n };\n\n return (\n <Host>\n <div class={classes}>\n <div class={messageClasses}>{this.messageOptions.content}</div>\n </div>\n </Host>\n );\n }\n}\n",":host {\n display: block;\n width: 100%;\n padding: 8px 0;\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\n/**\n * @parent c-select\n */\n@Component({\n tag: 'c-option',\n styleUrl: 'c-option.scss',\n shadow: true,\n})\nexport class COption {\n /**\n * Set option as selected\n */\n @Prop() selected = false;\n\n /**\n * Set option as disabled\n */\n @Prop() disabled = false;\n\n /**\n * Option name\n */\n @Prop() name: string;\n\n /**\n * Option value\n */\n @Prop() value: string | number;\n\n render() {\n return (\n <Host tabindex=\"-1\">\n <slot></slot>\n </Host>\n );\n }\n}\n",":host {\n pointer-events: none;\n user-select: none;\n display: block;\n overflow: hidden;\n position: absolute;\n top: 0;\n left: 0;\n border-radius: inherit;\n z-index: 1;\n}\n\n.c-ripple {\n position: absolute;\n pointer-events: none;\n border-radius: 50%;\n transform: scale(0);\n background: currentColor;\n opacity: 0;\n\n &.animate {\n animation: ripple 0.5s backwards linear;\n opacity: 0.3;\n }\n\n @keyframes ripple {\n 100% {\n opacity: 0;\n transform: scale(5);\n }\n }\n}\n","import { Component, Element, Host, Method, h } from '@stencil/core';\n\n/**\n * @parent None\n */\n@Component({\n tag: 'c-ripple',\n styleUrl: 'c-ripple.scss',\n shadow: true,\n})\nexport class CRipple {\n @Element() el: HTMLCRippleElement;\n\n private _rippleElement: HTMLDivElement;\n\n /**\n * Creates a ripple\n */\n @Method()\n async createRipple(event: MouseEvent, parent: HTMLElement, center = false) {\n // clear animation on repeat clicks\n this._rippleElement.classList.remove('animate');\n\n const width = parent.offsetWidth;\n const height = parent.offsetHeight;\n const rect = (event.target as HTMLElement).getBoundingClientRect();\n\n const maxDimension = this._calculateHeight(\n Math.max(parent.offsetWidth, parent.offsetHeight),\n );\n\n const x = event.clientX - rect.left;\n const y = event.clientY - rect.top;\n\n const top = y - maxDimension / 2 + 'px';\n const left = x - maxDimension / 2 + 'px';\n\n const centerPosition = {\n top:\n maxDimension === height\n ? '0px'\n : ((maxDimension - height) / 2) * -1 + 'px',\n left:\n maxDimension === width\n ? '0px'\n : ((maxDimension - width) / 2) * -1 + 'px',\n };\n\n this.el.style.width = width + 'px';\n this.el.style.height = height + 'px';\n\n this._rippleElement.style.width = maxDimension + 'px';\n this._rippleElement.style.height = maxDimension + 'px';\n\n this._rippleElement.style.top = center ? centerPosition.top : top;\n this._rippleElement.style.left = center ? centerPosition.left : left;\n\n this._rippleElement.classList.add('animate');\n\n setTimeout(() => {\n this._rippleElement.classList.remove('animate');\n }, 500);\n }\n\n private _calculateHeight(height: number) {\n const radius = (height / 2) * Math.sqrt(2);\n\n return radius * 2;\n }\n\n render() {\n return (\n <Host aria-hidden=\"true\">\n <div ref={(el) => (this._rippleElement = el)} class=\"c-ripple\" />\n </Host>\n );\n }\n}\n",":host {\n /**\n * @prop --c-select-active-color: Active select color\n * @prop --c-select-inactive-color: Inactive select color\n * @prop --c-select-background-color: Inactive select background color\n * @prop --c-select-text-color: Select text color\n * @prop --c-select-placeholder-color: Select placeholder color\n * @prop --c-select-option-background-color: Select option background color\n * @prop --c-select-option-background-color-hover: Select option hover background color\n * @prop --c-select-option-text-color: Select option text color\n */\n --_c-select-active-color: var(--c-select-active-color, var(--c-primary-600));\n --_c-select-inactive-color: var(--c-select-inactive-color, var(--c-tertiary-600));\n --_c-select-background-color: var(--c-select-background-color, var(--c-transparent));\n --_c-select-text-color: var(--c-select-text-color, var(--c-text-body));\n --_c-select-placeholder-color: var(--c-select-placeholder-color, var(--c-tertiary-500));\n --_c-select-option-background-color: var(--c-select-option-background-color, var(--c-white));\n --_c-select-option-background-color-hover: var(--c-select-option-background-color-hover, var(--c-primary-100));\n --_c-select-option-text-color: var(--c-select-option-text-color, var(--c-text-body));\n --_c-select-shadow-active-color: var(--c-select-shadow-active-color, var(--_c-select-active-color));\n --_c-select-shadow-background-color: var(--c-select-shadow-background-color, var(--c-white));\n --_c-select-shadow-text-color: var(--c-select-shadow-text-color, var(--_c-select-text-color));\n --_c-select-shadow-placeholder-color: var(--c-select-shadow-placeholder-color, var(--_c-select-placeholder-color));\n\n // private\n --_c-input-active-color: var(--_c-select-active-color);\n --_c-input-inactive-color: var(--_c-select-inactive-color);\n --_c-input-background-color: var(--_c-select-background-color);\n --_c-input-text-color: var(--_c-select-text-color);\n --_c-input-placeholder-color: var(--_c-select-placeholder-color);\n --_c-input-shadow-active-color: var(--_c-select-shadow-active-color);\n --_c-input-shadow-background-color: var(--_c-select-shadow-background-color);\n --_c-input-shadow-text-color: var(--_c-select-shadow-text-color);\n --_c-input-shadow-placeholder-color: var(--_c-select-shadow-placeholder-color);\n}\n\n@import \"../c-input/c-input-menu\";\n","import {\n AttachInternals,\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Method,\n Prop,\n State,\n h,\n} from '@stencil/core';\nimport { CSelectItem } from '../../types';\nimport { mdiChevronDown, mdiClose } from '@mdi/js';\n\n/**\n * @group Form\n * @slot Default slot - Use c-option elements only\n */\n@Component({\n tag: 'c-select',\n styleUrl: 'c-select.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class CSelect {\n @Element() el: HTMLCSelectElement;\n\n // eslint-disable-next-line\n @AttachInternals() internals: ElementInternals;\n\n /**\n * Dropdown items\n */\n @Prop() items: CSelectItem[] = [];\n\n /**\n * Selected item\n */\n @Prop() value: string | number | CSelectItem = null;\n\n /**\n * Id of the element\n */\n @Prop({ attribute: 'id' }) hostId: string;\n\n /**\n * Make the selected value clearable\n */\n @Prop() clearable = false;\n\n /**\n * Disable the input\n */\n @Prop() disabled = false;\n\n /**\n * Element label\n */\n @Prop() label: string;\n\n /**\n * Input field name\n */\n @Prop() name: string;\n\n /**\n * Placeholder text\n */\n @Prop() placeholder = '';\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 * Show loading state\n */\n @Prop() loading = false;\n\n /**\n * Show required validation\n */\n @Prop() required = false;\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 * Shadow variant\n */\n @Prop() shadow = false;\n\n /**\n * Return object instead of value\n */\n @Prop() returnObject = false;\n\n /**\n * Items per page before adding scroll\n */\n @Prop() itemsPerPage = 6;\n\n /**\n * display the option as selection (works only when c-option elements are used)\n */\n @Prop() optionAsSelection: false;\n\n /**\n * Triggered when option is selected\n */\n @Event({ bubbles: false }) changeValue: EventEmitter;\n\n @State() optionElements: NodeListOf<HTMLCOptionElement>;\n\n @State() currentIndex: number = null;\n\n @State() dropdownVisible = false;\n\n @State() statusText = '';\n\n @State() optionElementsExist = false;\n\n private static _uniqueId = 0;\n\n private _dropdownElement: HTMLCDropdownElement;\n\n private _inputElement: HTMLInputElement;\n\n private _cInputElement: HTMLCInputElement;\n\n private _selectionElement: HTMLDivElement;\n\n private _inputId: string;\n\n private _preventDialogOpen = false;\n\n private _debounce = null;\n\n private _lastKeyPressTime = null;\n\n private _searchString = '';\n\n private get _id() {\n return this.hostId || `select_${CSelect._uniqueId}`;\n }\n\n private get _items() {\n return this.optionElementsExist ? this.optionElements : this.items;\n }\n\n private get _value() {\n if (!this.value) return '';\n\n if (\n !this.returnObject &&\n !['number', 'string'].includes(typeof this.value)\n ) {\n console.warn(\n `[C-SELECT] The value should be of type 'number' or 'string' when return-object is not used.`,\n );\n\n return '';\n }\n\n if (\n !this.returnObject &&\n ['number', 'string'].includes(typeof this.value)\n ) {\n return Array.from(this._items)?.find((item) => item.value === this.value)\n ?.name;\n }\n\n return Array.from(this._items as CSelectItem[])?.find(\n (item) => item.value === (this.value as CSelectItem).value,\n )?.name;\n }\n\n /**\n * Reset select state\n */\n @Method()\n async reset() {\n this.changeValue.emit(null);\n\n this.internals.setFormValue(null);\n\n this._dropdownElement.updateList();\n }\n\n @Listen('keydown', { passive: true })\n handleKeyDown(event: KeyboardEvent) {\n const alphanumeric = /^[0-9a-zA-Z ]+$/;\n\n if (event.key.match(alphanumeric) && event.key.length === 1) {\n if (this.dropdownVisible) return;\n\n if (Date.now() - this._lastKeyPressTime > 3000) {\n this._searchString = event.key;\n } else {\n this._searchString += event.key;\n }\n\n this._lastKeyPressTime = Date.now();\n\n const selectionIndex = Array.from(this._items).findIndex((i) =>\n i.name.toLowerCase().startsWith(this._searchString),\n );\n\n this.currentIndex = selectionIndex >= 0 ? selectionIndex : null;\n\n if (this.currentIndex !== null) {\n this._dropdownElement.selectItem(this.currentIndex);\n }\n\n return;\n }\n\n if (event.key === 'Escape') {\n this._preventDialogOpen = true;\n this._dropdownElement.close();\n this._inputElement.focus();\n\n return;\n }\n\n if (event.key === 'Tab') {\n this._dropdownElement.close();\n }\n\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n\n if (!this._items.length) return;\n\n if (!this.dropdownVisible) {\n this._dropdownElement.open();\n }\n\n this.currentIndex =\n this.currentIndex === null\n ? 0\n : Math.min(this.currentIndex + 1, this._items.length - 1);\n\n this._dropdownElement.focusItem(this.currentIndex);\n }\n\n if (event.key === 'ArrowUp') {\n event.preventDefault();\n\n if (this.currentIndex === 0) {\n this._dropdownElement.close();\n this._inputElement.focus();\n }\n\n if (!this.dropdownVisible) {\n this._dropdownElement.open();\n }\n\n this.currentIndex =\n this.currentIndex === null\n ? this._items.length - 1\n : Math.max(this.currentIndex - 1, 0);\n\n this._dropdownElement.focusItem(this.currentIndex);\n }\n\n if (event.key === ' ') {\n event.preventDefault();\n }\n\n if (event.key === 'Enter') {\n event.preventDefault();\n\n if (this.currentIndex === null) return;\n\n this._dropdownElement.selectItem(this.currentIndex);\n }\n\n if (event.key === 'Home' && this.dropdownVisible) {\n this.currentIndex = 0;\n }\n\n if (event.key === 'End' && this.dropdownVisible) {\n this.currentIndex = this._items.length - 1;\n }\n }\n\n @Listen('dropdownStateChange')\n onDropdownStateChange(event: CustomEvent<boolean>) {\n const isOpen = event.detail;\n\n this.dropdownVisible = isOpen;\n }\n\n @Listen('selectOption')\n onSelectOption(event: CustomEvent<{ name: string; value: string }>) {\n this._dropdownElement.close();\n\n const { name, value } = event.detail;\n\n const selection = this._setCurrentIndex({ name, value });\n\n if (this.optionElementsExist && this.optionAsSelection && selection) {\n const clone = (selection as HTMLCOptionElement).cloneNode(true);\n\n this._selectionElement.classList.add('c-input-menu__selection--show');\n this._selectionElement.replaceChildren(clone);\n }\n\n this._dropdownElement.updateList();\n\n this.value = this.returnObject ? event.detail : value;\n\n this.changeValue.emit(this.value);\n\n this.internals.setFormValue(value);\n\n this._preventDialogOpen = true;\n\n this._inputElement.focus();\n }\n\n private _setCurrentIndex({ value, name }: { value: string; name: string }) {\n let selection: HTMLCOptionElement | CSelectItem | null = null;\n\n Array.from(this._items).forEach((item, index) => {\n const selected = item.value === value && item.name === name;\n\n if (this.optionElementsExist) {\n (item as HTMLCOptionElement).selected = selected;\n }\n\n if (selected) {\n this.currentIndex = index;\n\n selection = item;\n }\n });\n\n return selection;\n }\n\n private _toggleDropdown = (event) => {\n event.stopPropagation();\n\n if (this.dropdownVisible) {\n this._dropdownElement.close();\n\n return;\n }\n\n this._dropdownElement.open();\n };\n\n private _onButtonKeyDown = (\n src: 'chevron' | 'reset',\n event: KeyboardEvent,\n ) => {\n event.stopPropagation();\n\n if (event.key !== 'Tab') event.preventDefault();\n\n if (['Enter', ' '].includes(event.key)) {\n if (src === 'chevron') {\n this._toggleDropdown(event);\n\n return;\n }\n\n this._onReset(event);\n\n this._preventDialogOpen = true;\n\n requestAnimationFrame(() => {\n this._inputElement.focus();\n });\n }\n };\n\n private _onSlotChange = () => {\n this.optionElements = this.el.querySelectorAll('c-option');\n\n if (this.optionElements.length && !this.optionElementsExist) {\n this.optionElementsExist = true;\n }\n\n const selection = Array.from(this.optionElements).find(\n (option) => option.selected,\n );\n\n if (selection) {\n this.value = this.returnObject\n ? { name: selection.name, value: selection.value }\n : selection.value;\n\n this.changeValue.emit(this.value);\n\n this.internals.setFormValue(selection.value.toString());\n }\n };\n\n private _onReset = (event) => {\n event.stopPropagation();\n\n this.changeValue.emit(null);\n\n this.internals.setFormValue(null);\n\n this._selectionElement.classList.remove('c-input-menu__selection--show');\n this._selectionElement.replaceChildren(null);\n\n this._preventDialogOpen = true;\n\n this._cInputElement.reset();\n\n this._inputElement.focus();\n\n this._dropdownElement.updateList();\n };\n\n private _updateInput() {\n this._dropdownElement.open();\n\n this._dropdownElement.updateList();\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 = '';\n\n if (this.currentIndex === null) {\n this.statusText = this._items.length\n ? `${this._items.length} option${\n this._items.length !== 1 ? 's' : ''\n } available`\n : 'No options available';\n }\n\n const ending = !!this._items.length\n ? ', navigate using the up and down arrows'\n : '';\n\n this._dropdownElement.setStatusText(this.statusText + ending);\n\n this._debounce = null;\n }, 1400);\n }\n\n private _onInputFocus = () => {\n if (!this._preventDialogOpen) {\n this._dropdownElement.open();\n }\n\n this._updateStatusText();\n\n this._preventDialogOpen = false;\n };\n\n componentWillLoad() {\n CSelect._uniqueId += 1;\n\n this._inputId =\n 'input_' +\n (this.hostId || this.label || this.placeholder).replace(\n /[^a-zA-Z0-9-_]/g,\n '',\n );\n }\n\n componentDidLoad() {\n if (!this.value) return;\n\n const selection = Array.from(this._items).find((item) => {\n if (this.returnObject) {\n return (\n item.name === (this.value as CSelectItem).name &&\n item.value === (this.value as CSelectItem).value\n );\n }\n\n return item.value === this.value;\n });\n\n this._setCurrentIndex({\n name: selection.name,\n value: selection.value.toString(),\n });\n }\n\n private _renderLoader() {\n return <c-spinner color=\"var(--_c-autocomplete-active-color)\" size={20} />;\n }\n\n private _renderChevron() {\n const classes = {\n 'c-input-menu__chevron': true,\n 'c-input-menu__chevron--active': this.dropdownVisible,\n };\n\n return (\n <c-icon-button\n size=\"x-small\"\n class={classes}\n text\n onClick={(event) => this._toggleDropdown(event)}\n onKeyDown={(event) => this._onButtonKeyDown('chevron', event)}\n >\n <c-icon path={mdiChevronDown} size={24} />\n </c-icon-button>\n );\n }\n\n private _renderInputElement() {\n return (\n <div class=\"c-input-menu__input\">\n <input\n type=\"text\"\n readonly\n ref={(el) => (this._inputElement = el)}\n aria-expanded={this.dropdownVisible.toString()}\n aria-owns={this._inputId + '-items'}\n aria-autocomplete=\"list\"\n autocomplete=\"off\"\n class=\"c-input__input\"\n role=\"combobox\"\n value={this._value}\n name={this.name ?? null}\n onInput={() => this._updateInput()}\n onFocus={() => this._onInputFocus()}\n />\n\n <div\n ref={(el) => (this._selectionElement = el)}\n class=\"c-input-menu__selection\"\n />\n </div>\n );\n }\n\n private _renderReset() {\n return (\n <c-icon-button\n aria-label=\"\"\n size=\"x-small\"\n text\n onClick={(event) => this._onReset(event)}\n onKeyDown={(event) => this._onButtonKeyDown('reset', event)}\n >\n <c-icon path={mdiClose} size={20} />\n </c-icon-button>\n );\n }\n\n render() {\n const itemType = this.optionElementsExist ? 'option' : 'item';\n\n return (\n <Host>\n <c-dropdown\n ref={(el) => (this._dropdownElement = el)}\n id={`${this._id}-dropdown`}\n index={this.currentIndex}\n items-per-page={this.itemsPerPage}\n item-type={itemType}\n items={this._items as NodeListOf<HTMLCOptionElement> & CSelectItem[]}\n parent={this.el}\n type=\"select\"\n >\n <c-input\n slot=\"default\"\n ref={(el) => (this._cInputElement = el)}\n active={this.dropdownVisible}\n disabled={this.disabled}\n hide-details={this.hideDetails}\n hint={this.hint}\n id={this.hostId}\n input-id={this._inputId}\n label={this.label}\n name={this.name}\n placeholder={this.placeholder}\n required={this.required}\n shadow={this.shadow}\n valid={this.valid}\n validate={this.validate}\n validate-on-blur={this.validateOnBlur}\n validation={this.validation}\n value={this.value}\n variant=\"select\"\n onClick={() => this._dropdownElement.open()}\n >\n <slot name=\"pre\" slot=\"pre\"></slot>\n\n <div class=\"c-input__content\">\n {this._renderInputElement()}\n\n {this.loading && this._renderLoader()}\n\n {!this.loading &&\n this.value &&\n this.clearable &&\n this._renderReset()}\n\n {!this.loading &&\n (!this.value || !this.clearable) &&\n this._renderChevron()}\n\n <slot onSlotchange={() => this._onSlotChange()}></slot>\n </div>\n\n <slot name=\"post\" slot=\"post\"></slot>\n </c-input>\n </c-dropdown>\n </Host>\n );\n }\n}\n",":host {\n /**\n * @prop --c-spinner-color: Spinner color\n */\n --_c-spinner-color: var(--c-spinner-color, var(--c-color));\n\n // private\n --_c-spinner-size: var(--c-size);\n --_c-spinner-width: var(--c-width);\n\n display: block;\n height: var(--_c-spinner-size);\n width: var(--_c-spinner-size);\n}\n\n:host(.c-spinner) {\n svg {\n fill: var(--_c-spinner-color);\n height: var(--_c-spinner-size);\n overflow: visible;\n width: var(--_c-spinner-size);\n\n circle {\n animation: spinner 2.5s linear infinite;\n fill: transparent;\n stroke-dasharray: calc(3.14 * var(--_c-spinner-size));\n stroke-linecap: round;\n stroke-width: var(--_c-spinner-width);\n stroke: var(--_c-spinner-color);\n transform-origin: calc(0.5px * var(--_c-spinner-size))\n calc(0.5px * var(--_c-spinner-size)) 0;\n }\n }\n\n @keyframes spinner {\n 0% {\n transform: rotate(0deg);\n stroke-dashoffset: calc(0.66 * var(--_c-spinner-size));\n }\n\n 50% {\n transform: rotate(720deg);\n stroke-dashoffset: calc(3.14 * var(--_c-spinner-size));\n }\n\n 100% {\n transform: rotate(1080deg);\n stroke-dashoffset: calc(0.66 * var(--_c-spinner-size));\n }\n }\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\n/**\n * @group indicators\n */\n@Component({\n tag: 'c-spinner',\n styleUrl: 'c-spinner.scss',\n shadow: true,\n})\nexport class CSpinner {\n /**\n * Color of the spinner\n */\n @Prop() color = 'var(--c-primary-600)';\n\n /**\n * Size of the spinner\n */\n @Prop() size = 24;\n\n /**\n * Width of the spinner\n */\n @Prop() width = 2;\n\n render() {\n const iconParams = {\n cx: this.size / 2,\n cy: this.size / 2,\n r: this.size / 2 - 2,\n };\n\n const style = {\n '--c-size': `${this.size}px`,\n '--c-width': `${this.width}px`,\n '--c-color': this.color,\n };\n\n return (\n <Host class=\"c-spinner\" style={style}>\n <svg>\n <circle {...iconParams}></circle>\n </svg>\n </Host>\n );\n }\n}\n"],"mappings":"2KAAA,MAAMA,EAAmB,6tI,MC0BZC,EAAa,M,2QAgBhBC,KAAAC,mBAAqB,MAErBD,KAAAE,UAAY,KAqSZF,KAAAG,kBAAoB,KAC1BH,KAAKI,eAAiBJ,KAAKK,GAAGC,iBAAiB,YAE/C,MAAMC,EAAYC,MAAMC,KAAKT,KAAKI,gBAAgBM,MAC/CC,GAAWA,EAAOC,WAGrB,GAAIL,EAAW,CACbP,KAAKa,MAAQb,KAAKc,aACd,CAAEC,KAAMR,EAAUQ,KAAMF,MAAON,EAAUM,OACzCN,EAAUM,MAEdb,KAAKgB,YAAYC,KAAKjB,KAAKa,OAE3Bb,KAAKkB,YAAYD,KAAKjB,KAAKmB,OAE3BnB,KAAKoB,UAAUC,aAAad,EAAUM,MAAMS,W,CAG9C,GAAItB,KAAKI,eAAemB,SAAWvB,KAAKwB,oBAAqB,CAC3DxB,KAAKwB,oBAAsB,I,GAIvBxB,KAAAyB,gBAAmBC,IACzBA,EAAMC,kBAEN,GAAI3B,KAAK4B,gBAAiB,CACxB5B,KAAK6B,iBAAiBC,QAEtB,M,CAGF9B,KAAK6B,iBAAiBE,MAAM,EAGtB/B,KAAAgC,iBAAmB,CACzBC,EACAP,KAEAA,EAAMC,kBAEN,GAAID,EAAMQ,MAAQ,MAAOR,EAAMS,iBAE/B,GAAI,CAAC,QAAS,KAAKC,SAASV,EAAMQ,KAAM,CACtC,GAAID,IAAQ,UAAW,CACrBjC,KAAKyB,gBAAgBC,GAErB,M,CAGF1B,KAAKqC,OAAOX,GAEZ1B,KAAKC,mBAAqB,KAE1BD,KAAKsC,cAAcC,O,GA2BfvC,KAAAqC,OAAUX,I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E,MAAOA,GAC7B5E,EAAA,WACEA,EAAA,SAAAkH,OAAAC,OAAA,GAAYyN,K"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,H as s,g as o}from"./p-565ec8e4.js";import{q as r,r as a,s as c}from"./p-f24b9d97.js";const l="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-text-field-active-color:var(--c-text-field-active-color, var(--c-primary-600));--_c-text-field-inactive-color:var(--c-text-field-inactive-color, var(--c-tertiary-600));--_c-text-field-background-color:var(--c-text-field-background-color, var(--c-transparent));--_c-text-field-text-color:var(--c-text-field-text-color, var(--c-text-body));--_c-text-field-placeholder-color:var(--c-text-field-placeholder-color, var(--c-tertiary-500));--_c-text-field-shadow-active-color:var(--c-text-field-shadow-active-color, var(--_c-text-field-active-color));--_c-text-field-shadow-background-color:var(--c-text-field-shadow-background-color, var(--c-white));--_c-text-field-shadow-text-color:var(--c-text-field-shadow-text-color, var(--_c-text-field-text-color));--_c-text-field-shadow-placeholder-color:var(--c-text-field-shadow-placeholder-color, var(--_c-text-field-placeholder-color))}.c-input{--_c-input-active-color:var(--_c-text-field-active-color);--_c-input-inactive-color:var(--_c-text-field-inactive-color);--_c-input-background-color:var(--_c-text-field-background-color);--_c-input-text-color:var(--_c-text-field-text-color);--_c-input-placeholder-color:var(--_c-text-field-placeholder-color);--_c-input-shadow-active-color:var(--_c-text-field-shadow-active-color);--_c-input-shadow-background-color:var(--_c-text-field-shadow-background-color);--_c-input-shadow-text-color:var(--_c-text-field-shadow-text-color);--_c-input-shadow-placeholder-color:var(--_c-text-field-shadow-placeholder-color)}.c-input__password-toggle,.c-input__date-toggle{cursor:pointer;fill:currentColor;height:22px;width:22px}.c-input__password-toggle--disabled,.c-input__date-toggle--disabled{cursor:not-allowed;fill:var(--c-tertiary-500)}.c-input input[type=date]{opacity:0}.c-input input[type=date]::-webkit-calendar-picker-indicator,.c-input input[type=date]::-webkit-inner-spin-button{display:none;appearance:none}.c-input input[type=date]:focus,.c-input input[type=date].c-input__input--filled{opacity:1}";const h=class{constructor(e){t(this,e);this.changeValue=i(this,"changeValue",3);if(e.$hostElement$["s-ei"]){this.internals=e.$hostElement$["s-ei"]}else{this.internals=e.$hostElement$.attachInternals();e.$hostElement$["s-ei"]=this.internals}this._originalType="";this._handleChange=t=>{this.value=this.trimWhitespace?t.target.value.trim():t.target.value;this.changeValue.emit(this.value);this.internals.setFormValue(this.value)};this._handleBlur=t=>{if(this.trimWhitespace){const i=t.target.value.trim();t.target.value=i}};this._togglePasswordVisibility=()=>{if(this.disabled)return;this.type=this.type==="password"?"text":"password"};this.autofocus=false;this.autocapitalize="";this.autocorrect="";this.autocomplete="";this.disabled=false;this.hideDetails=false;this.hint="";this.hostId=undefined;this.trimWhitespace=false;this.label=undefined;this.max=null;this.min=null;this.name=undefined;this.number=false;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.isFocused=false;this.labelWidth=0;this.preSlotWidth=0;this.messageOptions={show:true,type:"hint",content:""}}componentWillLoad(){h._uniqueId+=1;this._originalType=this.type;this._inputId=`${(this.hostId||this.label||this.placeholder||"").replace(/[^a-zA-Z0-9-_]/g,"")}_${h._uniqueId}`;this.internals.setFormValue(this.value)}get isActive(){return!!this.value||this.isFocused}get passwordIcon(){return this.type==="password"?r:a}_renderInputElement(){const t={classes:{"c-input__input":true,"c-input__input--filled":!!this.value},shared:{id:this._inputId,name:this.name,disabled:this.disabled,readonly:this.readonly,value:this.value,onInput:this._handleChange,onChange:this._handleChange,onBlur:this._handleBlur},input:Object.assign(Object.assign(Object.assign({type:this.number?"number":this.type||"text",min:this.min,max:this.max,step:this.step},!!this.autocomplete&&{autocomplete:this.autocomplete}),!!this.autocapitalize&&{autocapitalize:this.autocapitalize}),!!this.autocorrect&&{autocorrect:this.autocorrect}),textArea:{rows:this.rows}};const i=e("input",Object.assign({class:t.classes},t.input,t.shared,{ref:t=>this._inputElement=t}));const s=e("textarea",Object.assign({class:t.classes},t.shared,t.textArea));return this.rows>1?s:i}_isFirefox(){return!!navigator.userAgent.match(/firefox|fxios/i)}_renderDateToggle(){if(this._originalType!=="date"||this._isFirefox())return;const t={"c-input__date-toggle":true,"c-input__date-toggle--disabled":this.disabled};return e("svg",{class:t,viewBox:"0 0 24 24",onClick:this._toggleDatepicker.bind(this)},e("path",{d:c}))}_toggleDatepicker(){var t;(t=this._inputElement)===null||t===void 0?void 0:t.showPicker()}_renderPasswordToggle(){if(this._originalType!=="password")return;const t={"c-input__password-toggle":true,"c-input__password-toggle--disabled":this.disabled};return e("svg",{class:t,viewBox:"0 0 24 24",onClick:this._togglePasswordVisibility},e("path",{d:this.passwordIcon}))}render(){return e(s,null,e("c-input",{autofocus:this.autofocus,disabled:this.disabled,"hide-details":this.hideDetails,hint:this.hint,id:this.hostId,"input-id":this._inputId,label:this.label,name:this.name,placeholder:this.placeholder,readonly:this.readonly,required:this.required,rows:this.rows,shadow:this.shadow,type:this.type,valid:this.valid,validate:this.validate,"validate-on-blur":this.validateOnBlur,validation:this.validation,value:this.value},e("slot",{name:"pre",slot:"pre"}),this._renderInputElement(),this._renderPasswordToggle(),this._renderDateToggle(),e("slot",{name:"post"})))}static get formAssociated(){return true}get hiddenEl(){return o(this)}};h._uniqueId=0;h.style=l;export{h as c_text_field};
|
|
2
|
-
//# sourceMappingURL=p-6e046723.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["cTextFieldCss","CTextField","this","_originalType","_handleChange","event","value","trimWhitespace","target","trim","changeValue","emit","internals","setFormValue","_handleBlur","trimmedValue","_togglePasswordVisibility","disabled","type","show","content","componentWillLoad","_uniqueId","_inputId","hostId","label","placeholder","replace","isActive","isFocused","passwordIcon","mdiEye","mdiEyeOff","_renderInputElement","props","classes","shared","id","name","readonly","onInput","onChange","onBlur","input","Object","assign","number","min","max","step","autocomplete","autocapitalize","autocorrect","textArea","rows","textInput","h","class","ref","el","_inputElement","_isFirefox","navigator","userAgent","match","_renderDateToggle","viewBox","onClick","_toggleDatepicker","bind","d","mdiCalendar","_a","showPicker","_renderPasswordToggle","render","Host","autofocus","hideDetails","hint","required","shadow","valid","validate","validateOnBlur","validation","slot"],"sources":["src/components/c-text-field/c-text-field.scss?tag=c-text-field&encapsulation=shadow","src/components/c-text-field/c-text-field.tsx"],"sourcesContent":[":root,\n:host {\n /**\n * @prop --c-text-field-active-color: Active text field color\n * @prop --c-text-field-inactive-color: Inactive text field color\n * @prop --c-text-field-background-color: Inactive text field background color\n * @prop --c-text-field-text-color: Text field text color\n * @prop --c-text-field-placeholder-color:Text field placeholder color\n * @prop --c-text-field-shadow-active-color: Shadow text field active color\n * @prop --c-text-field-shadow-background-color: Shadow text field background color\n * @prop --c-text-field-shadow-text-color: Shadow text field text color\n * @prop --c-text-field-shadow-placeholder-color: Shadow text field placeholder color\n */\n --_c-text-field-active-color: var(--c-text-field-active-color, var(--c-primary-600));\n --_c-text-field-inactive-color: var(--c-text-field-inactive-color, var(--c-tertiary-600));\n --_c-text-field-background-color: var(--c-text-field-background-color, var(--c-transparent));\n --_c-text-field-text-color: var(--c-text-field-text-color, var(--c-text-body));\n --_c-text-field-placeholder-color: var(--c-text-field-placeholder-color, var(--c-tertiary-500));\n --_c-text-field-shadow-active-color: var(--c-text-field-shadow-active-color, var(--_c-text-field-active-color));\n --_c-text-field-shadow-background-color: var(--c-text-field-shadow-background-color, var(--c-white));\n --_c-text-field-shadow-text-color: var(--c-text-field-shadow-text-color, var(--_c-text-field-text-color));\n --_c-text-field-shadow-placeholder-color: var(--c-text-field-shadow-placeholder-color, var(--_c-text-field-placeholder-color));\n}\n\n.c-input {\n --_c-input-active-color: var(--_c-text-field-active-color);\n --_c-input-inactive-color: var(--_c-text-field-inactive-color);\n --_c-input-background-color: var(--_c-text-field-background-color);\n --_c-input-text-color: var(--_c-text-field-text-color);\n --_c-input-placeholder-color: var(--_c-text-field-placeholder-color);\n --_c-input-shadow-active-color: var(--_c-text-field-shadow-active-color);\n --_c-input-shadow-background-color: var(--_c-text-field-shadow-background-color);\n --_c-input-shadow-text-color: var(--_c-text-field-shadow-text-color);\n --_c-input-shadow-placeholder-color: var(--_c-text-field-shadow-placeholder-color);\n\n &__password-toggle,\n &__date-toggle {\n cursor: pointer;\n fill: currentColor;\n height: 22px;\n width: 22px;\n\n &--disabled {\n cursor: not-allowed;\n fill: var(--c-tertiary-500);\n }\n }\n\n input {\n &[type=\"date\"] {\n opacity: 0;\n\n &::-webkit-calendar-picker-indicator,\n &::-webkit-inner-spin-button {\n display: none;\n appearance: none;\n }\n\n &:focus,\n &.c-input__input--filled {\n opacity: 1;\n }\n }\n }\n}\n","import {\n AttachInternals,\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n State,\n} from '@stencil/core';\nimport { mdiCalendar, mdiEye, mdiEyeOff } from '@mdi/js';\n\n/**\n * @group Form\n * @slot pre - Content added before the input\n * @slot post - Content added after the input\n */\n@Component({\n tag: 'c-text-field',\n styleUrl: 'c-text-field.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class CTextField {\n // eslint-disable-next-line\n @AttachInternals() internals: ElementInternals;\n\n /**\n * Auto focus the input\n */\n @Prop() autofocus = false;\n\n /**\n * HTML input autocapitalize\n */\n @Prop() autocapitalize = '';\n\n /**\n * HTML input autocorrect\n */\n @Prop() autocorrect = '';\n\n /**\n * HTML input autocomplete\n */\n @Prop() autocomplete = '';\n\n /**\n * Disable the input\n */\n @Prop() disabled = 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 * Trim whitespace from the return value\n */\n @Prop() trimWhitespace = false;\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 * Numeric input\n *\n * @deprecated Use type=\"number\" instead\n */\n @Prop() number = false;\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 validity 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({ mutable: true }) value: string;\n\n /**\n * Emit changes to the parent\n */\n @Event({ bubbles: false }) changeValue: EventEmitter;\n\n @State() isFocused = false;\n\n @State() labelWidth = 0;\n\n @State() preSlotWidth = 0;\n\n @State() messageOptions = {\n show: true,\n type: 'hint',\n content: '',\n };\n\n @Element() hiddenEl!: HTMLCTextFieldElement;\n\n private _inputElement: HTMLInputElement;\n\n private _originalType = '';\n\n private _inputId: string;\n\n private static _uniqueId = 0;\n\n componentWillLoad() {\n CTextField._uniqueId += 1;\n\n this._originalType = this.type;\n\n this._inputId = `${(\n this.hostId ||\n this.label ||\n this.placeholder ||\n ''\n ).replace(/[^a-zA-Z0-9-_]/g, '')}_${CTextField._uniqueId}`;\n\n this.internals.setFormValue(this.value);\n }\n\n get isActive() {\n return !!this.value || this.isFocused;\n }\n\n get passwordIcon() {\n return this.type === 'password' ? mdiEye : mdiEyeOff;\n }\n\n private _handleChange = (event) => {\n this.value = this.trimWhitespace\n ? event.target.value.trim()\n : event.target.value;\n\n this.changeValue.emit(this.value);\n this.internals.setFormValue(this.value);\n };\n\n private _handleBlur = (event) => {\n if (this.trimWhitespace) {\n const trimmedValue = event.target.value.trim();\n\n event.target.value = trimmedValue;\n }\n };\n\n private _renderInputElement() {\n const props = {\n classes: {\n 'c-input__input': true,\n 'c-input__input--filled': !!this.value,\n },\n shared: {\n id: this._inputId,\n name: this.name,\n disabled: this.disabled,\n readonly: this.readonly,\n value: this.value,\n onInput: this._handleChange,\n onChange: this._handleChange,\n onBlur: this._handleBlur,\n },\n input: {\n type: this.number ? 'number' : this.type || 'text',\n min: this.min,\n max: this.max,\n step: this.step,\n ...(!!this.autocomplete && { autocomplete: this.autocomplete }),\n ...(!!this.autocapitalize && { autocapitalize: this.autocapitalize }),\n ...(!!this.autocorrect && { autocorrect: this.autocorrect }),\n },\n textArea: {\n rows: this.rows,\n },\n };\n\n const textInput = (\n <input\n class={props.classes}\n {...props.input}\n {...props.shared}\n ref={(el) => (this._inputElement = el)}\n />\n );\n\n const textArea = (\n <textarea\n class={props.classes}\n {...props.shared}\n {...props.textArea}\n ></textarea>\n );\n\n return this.rows > 1 ? textArea : textInput;\n }\n\n private _isFirefox() {\n return !!navigator.userAgent.match(/firefox|fxios/i);\n }\n\n private _renderDateToggle() {\n if (this._originalType !== 'date' || this._isFirefox()) return;\n\n const classes = {\n 'c-input__date-toggle': true,\n 'c-input__date-toggle--disabled': this.disabled,\n };\n\n return (\n <svg\n class={classes}\n viewBox=\"0 0 24 24\"\n onClick={this._toggleDatepicker.bind(this)}\n >\n <path d={mdiCalendar} />\n </svg>\n );\n }\n\n private _toggleDatepicker() {\n this._inputElement?.showPicker();\n }\n\n private _renderPasswordToggle() {\n if (this._originalType !== 'password') return;\n\n const classes = {\n 'c-input__password-toggle': true,\n 'c-input__password-toggle--disabled': this.disabled,\n };\n\n return (\n <svg\n class={classes}\n viewBox=\"0 0 24 24\"\n onClick={this._togglePasswordVisibility}\n >\n <path d={this.passwordIcon} />\n </svg>\n );\n }\n\n private _togglePasswordVisibility = () => {\n if (this.disabled) return;\n\n this.type = this.type === 'password' ? 'text' : 'password';\n };\n\n render() {\n return (\n <Host>\n <c-input\n autofocus={this.autofocus}\n disabled={this.disabled}\n hide-details={this.hideDetails}\n hint={this.hint}\n id={this.hostId}\n input-id={this._inputId}\n label={this.label}\n name={this.name}\n placeholder={this.placeholder}\n readonly={this.readonly}\n required={this.required}\n rows={this.rows}\n shadow={this.shadow}\n type={this.type}\n valid={this.valid}\n validate={this.validate}\n validate-on-blur={this.validateOnBlur}\n validation={this.validation}\n value={this.value}\n >\n <slot name=\"pre\" slot=\"pre\"></slot>\n\n {this._renderInputElement()}\n\n {this._renderPasswordToggle()}\n\n {this._renderDateToggle()}\n\n <slot name=\"post\"></slot>\n </c-input>\n </Host>\n );\n }\n}\n"],"mappings":"kHAAA,MAAMA,EAAgB,4nE,MCwBTC,EAAU,M,kOA6JbC,KAAAC,cAAgB,GA6BhBD,KAAAE,cAAiBC,IACvBH,KAAKI,MAAQJ,KAAKK,eACdF,EAAMG,OAAOF,MAAMG,OACnBJ,EAAMG,OAAOF,MAEjBJ,KAAKQ,YAAYC,KAAKT,KAAKI,OAC3BJ,KAAKU,UAAUC,aAAaX,KAAKI,MAAM,EAGjCJ,KAAAY,YAAeT,IACrB,GAAIH,KAAKK,eAAgB,CACvB,MAAMQ,EAAeV,EAAMG,OAAOF,MAAMG,OAExCJ,EAAMG,OAAOF,MAAQS,C,GAoGjBb,KAAAc,0BAA4B,KAClC,GAAId,KAAKe,SAAU,OAEnBf,KAAKgB,KAAOhB,KAAKgB,OAAS,WAAa,OAAS,UAAU,E,eAvSxC,M,oBAKK,G,iBAKH,G,kBAKC,G,cAKJ,M,iBAKG,M,UAKP,G,0CAUU,M,8BAUH,K,SAKA,K,gCAYL,M,yCAUE,M,cAKA,M,UAKJ,E,YAKE,M,UAKM,K,+BAUP,K,cAKG,M,oBAKM,M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,QAAMlB,KAAK,MAAMgD,KAAK,QAErBpF,KAAK+B,sBAEL/B,KAAKwE,wBAELxE,KAAK+D,oBAENT,EAAA,QAAMlB,KAAK,U,yEAhLJrC,EAAAqB,UAAY,E"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as o,H as e}from"./p-565ec8e4.js";const s="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-otp-input-border-color:var(--c-otp-input-border-color, var(--c-tertiary-500));--_c-otp-input-border-color-active:var(--c-otp-input-border-color-active, var(--c-primary-600));--_c-otp-input-height:var(--c-otp-input-height, 56px);--_c-otp-input-width:var(--c-otp-input-width, 42px);--_c-otp-input-font-size:var(--c-otp-input-font-size, 24px);--_c-otp-input-text-color:var(--c-otp-input-text-color, var(--c-text-body));--_c-otp-input-border-width:1px;display:block}:host(.error){--_c-otp-input-border-color:var(--c-error-600);--_c-otp-input-border-color-active: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-otp-input{backface-visibility:hidden;display:inline-grid;gap:8px;grid-auto-columns:minmax(auto, var(--_c-otp-input-width));grid-auto-flow:column;margin-bottom:8px;transform:translate3d(0, 0, 0)}.c-otp-input--hide-details{margin-bottom:0}.c-otp-input input{border-radius:4px;border:none;box-shadow:inset 0 0 0 var(--_c-otp-input-border-width) var(--_c-otp-input-border-color);color:var(--_c-otp-input-text-color);font-size:var(--_c-otp-input-font-size);height:var(--_c-otp-input-height);max-width:var(--_c-otp-input-width);min-width:24px;text-align:center;width:100%}.c-otp-input input:focus{--_c-otp-input-border-width:2px;--_c-otp-input-border-color:var(--_c-otp-input-border-color-active);outline:none}.c-otp-input c-message{grid-column:1/span var(--_c-otp-input-count);grid-row:2}";const n=class{constructor(o){t(this,o);this.changeValue=i(this,"changeValue",3);this.completion=i(this,"completion",3);if(o.$hostElement$["s-ei"]){this.internals=o.$hostElement$["s-ei"]}else{this.internals=o.$hostElement$.attachInternals();o.$hostElement$["s-ei"]=this.internals}this._backSpacePressed=false;this._debounce=null;this._isPasting=false;this._inputs=new Array(this.length).fill(null);this._value="";this.hideDetails=false;this.hint="";this.elementId=undefined;this.length=6;this.valid=true;this.validation="Required field";this.statusText=""}onValidationMessageChange(){this._updateStatusText()}_emitValue(){requestAnimationFrame((()=>{this._value=[...this._inputs].map((t=>t.value)).join("");const t=this._value.length===this.length;this.changeValue.emit(t?this._value:null);if(t){this.completion.emit(this._value||null)}this.internals.setFormValue(this._value);this._updateStatusText()}))}_getElements(t){const i=t.target;const o=i.nextElementSibling;const e=i.previousElementSibling;return{target:i,nextElement:o,previousElement:e}}_onFocus(t){this._inputs[t].select()}_onKeyDown(t){this._backSpacePressed=false;const{target:i,previousElement:o}=this._getElements(t);if(t.key==="Backspace"){this._backSpacePressed=true;if(o&&!i.value){o.focus()}this._emitValue()}}get id(){return this.elementId||`c-otp-input--${n._uniqueId}`}_onInput(t){const{target:i,nextElement:o,previousElement:e}=this._getElements(t);if(isNaN(+i.value)){t.preventDefault();i.value=null;return}if(this._isPasting){this._isPasting=false;return}if(this._backSpacePressed){return}if(t.data){o===null||o===void 0?void 0:o.focus()}else{e===null||e===void 0?void 0:e.focus()}this._emitValue()}_onPaste(t){t.preventDefault();const i=t.clipboardData.getData("text");if(isNaN(+i)){return}this._isPasting=true;for(const[t,o]of i.split("").entries()){if(t>=this._inputs.length){continue}this._inputs[t].value=null;this._inputs[t].value=o}const o=Math.min(this.length,i.length)-1;requestAnimationFrame((()=>{this._inputs[o].focus();this._emitValue()}))}_updateStatusText(){if(this._debounce!==null){clearTimeout(this._debounce);this._debounce=null}this._debounce=window.setTimeout((()=>{this.statusText=this.valid?"":`Error: ${this.validation} `;this.statusText+=`Currently entered - ${this._value.split("").join(" - ")}`;this.statusText=this.statusText.trim();this._debounce=null}),1400)}_renderInput(t){return o("input",{id:`${this.id}--input-${t+1}`,ref:i=>this._inputs[t]=i,"aria-label":`Enter code - digit number - ${t+1} of ${this.length}`,type:"tel",maxlength:"1",onFocus:()=>this._onFocus(t),onInput:t=>this._onInput(t),onKeyDown:t=>this._onKeyDown(t),onPaste:i=>t===0&&this._onPaste(i)})}componentWillLoad(){n._uniqueId+=1;this.internals.setFormValue(this._value)}render(){const t={"c-otp-input":true,"c-otp-input--hide-details":this.hideDetails};return o(e,{id:this.id,style:{"--_c-otp-input-count":this.length.toString()},class:{error:!this.valid}},o("div",{id:"announce-"+this.id,class:"visuallyhidden","aria-live":"polite","aria-atomic":"true"},this.statusText),o("div",{class:t},new Array(this.length).fill(0).map(((t,i)=>this._renderInput(i))),o("c-message",{hint:this.hint,inputId:this.elementId,valid:this.valid,validation:this.validation})))}static get formAssociated(){return true}static get watchers(){return{validation:["onValidationMessageChange"]}}};n._uniqueId=0;n.style=s;export{n as c_otp_input};
|
|
2
|
-
//# sourceMappingURL=p-7ea05669.entry.js.map
|