@cscfi/csc-ui 1.0.17 → 1.0.18

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.
Files changed (38) hide show
  1. package/dist/cjs/c-dropdown_2.cjs.entry.js +9 -4
  2. package/dist/cjs/c-dropdown_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/c-tabs.cjs.entry.js +1 -1
  4. package/dist/cjs/c-tabs.cjs.entry.js.map +1 -1
  5. package/dist/collection/components/c-dropdown/c-dropdown.js +8 -3
  6. package/dist/collection/components/c-dropdown/c-dropdown.js.map +1 -1
  7. package/dist/collection/components/c-input/c-input.css +1 -1
  8. package/dist/collection/components/c-tabs/c-tabs.js +1 -1
  9. package/dist/collection/components/c-tabs/c-tabs.js.map +1 -1
  10. package/dist/collection/dist/styles/css/theme.css +10 -10
  11. package/dist/collection/dist/styles/scss/_theme.scss +10 -10
  12. package/dist/collection/dist/styles/tailwind/theme.js +10 -10
  13. package/dist/collection/styles/tailwind/theme.js +10 -10
  14. package/dist/components/c-dropdown2.js +8 -3
  15. package/dist/components/c-dropdown2.js.map +1 -1
  16. package/dist/components/c-input2.js +1 -1
  17. package/dist/components/c-input2.js.map +1 -1
  18. package/dist/components/c-tabs.js +1 -1
  19. package/dist/components/c-tabs.js.map +1 -1
  20. package/dist/csc-ui/csc-ui.esm.js +1 -1
  21. package/dist/csc-ui/dist/styles/css/theme.css +10 -10
  22. package/dist/csc-ui/dist/styles/scss/_theme.scss +10 -10
  23. package/dist/csc-ui/dist/styles/tailwind/theme.js +10 -10
  24. package/dist/csc-ui/{p-30108adb.entry.js → p-27904068.entry.js} +2 -2
  25. package/dist/csc-ui/p-27904068.entry.js.map +1 -0
  26. package/dist/csc-ui/p-d62e2784.entry.js +2 -0
  27. package/dist/csc-ui/p-d62e2784.entry.js.map +1 -0
  28. package/dist/esm/c-dropdown_2.entry.js +9 -4
  29. package/dist/esm/c-dropdown_2.entry.js.map +1 -1
  30. package/dist/esm/c-tabs.entry.js +1 -1
  31. package/dist/esm/c-tabs.entry.js.map +1 -1
  32. package/dist/styles/css/theme.css +10 -10
  33. package/dist/styles/scss/_theme.scss +10 -10
  34. package/dist/styles/tailwind/theme.js +10 -10
  35. package/package.json +1 -1
  36. package/dist/csc-ui/p-1bb973d5.entry.js +0 -2
  37. package/dist/csc-ui/p-1bb973d5.entry.js.map +0 -1
  38. package/dist/csc-ui/p-30108adb.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"file":"c-dropdown.c-input.entry.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,iwFAAiwF;;MCoBzwF,SAAS;;;;;IAwDZ,cAAS,GAAG,IAAI,CAAC;IAYjB,cAAS,GAAG,KAAK,CAAC;IAElB,eAAU,GAAoB,EAAE,CAAC;IAgKjC,eAAU,GAAG;MACnB,MAAM,EAAE,CAAC;MACT,KAAK,EAAE,CAAC;KACT,CAAC;IAEM,iBAAY,GAAG,KAAK,CAAC;IAErB,iBAAY,GAAG,KAAK,CAAC;IA2FrB,eAAU,IAChB,cACE,cAAQ,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAC,sBAAsB,GAAU,yBAErE,CACN,CAAC;;;;;;;;wBArQsB,IAAI;kBAEV,KAAK;sBAED,EAAE;;EAGxB,cAAc;IACZ,qBAAqB,CAAC;MACpB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;KACxC,CAAC,CAAC;GACJ;EAGD,YAAY;IACV,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;GAC5C;EAGD,iBAAiB,CAAC,KAAK;IACrB,qBAAqB,CAAC;MACpB,IAAI,CAAC,iBAAiB,EAAE,CAAC;MAEzB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,SAAS;QACtC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,CAAC,MAAM,CAA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,EAEvB,IAAI,CAAC,YAAY,EAAE,EAEpB,eAAa,CACT,CACF,EAEL,IAAI,CAAC,OAAO,KAAK,QAAQ,IAAI,YAAM,IAAI,EAAC,UAAU,GAAQ,EAE1D,CAAC,IAAI,CAAC,WAAW,KAChB,iBACE,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,UAAU,EAAE,IAAI,CAAC,UAAU,GAC3B,CACH,CACG,CACF,CACD,EACP;GACH;;;;;;;;;;;;;","names":[],"sources":["src/components/c-dropdown/c-dropdown.scss?tag=c-dropdown&encapsulation=shadow","src/components/c-dropdown/c-dropdown.tsx","src/components/c-input/c-input.scss?tag=c-input","src/components/c-input/c-input.tsx"],"sourcesContent":[":host(c-dropdown) {\n /**\n * @prop --c-dropdown-background-color: Menu background color\n * @prop --c-dropdown-background-color-hover: Menu item hover background color\n * @prop --c-dropdown-text-color: Menu item text color\n * @prop --c-dropdown-text-color-active: Active menu item text color\n */\n --_c-dropdown-background-color: var(\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 background-color: white;\n border-radius: 4px;\n border: none;\n box-shadow: 2px 4px 10px #00000029;\n margin: -4px 0 0;\n overflow: hidden;\n padding: 4px 0 0;\n position: fixed;\n\n &::backdrop {\n display: none;\n }\n\n &[open].mobile {\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 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 &:not(.disabled):hover,\n &:not(.disabled):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 &.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';\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 _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 stateWatcher() {\n this.dropdownStateChange.emit(this.isOpen);\n }\n\n @Watch('index')\n handleIndexChange(index) {\n requestAnimationFrame(() => {\n this._updateStatusText();\n\n this._listItems.forEach((item, itemIndex) => {\n item?.classList.toggle('active', index === itemIndex);\n\n if (index === itemIndex) {\n item?.focus();\n }\n });\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 requestAnimationFrame(() => {\n if (!Array.isArray(entries) || !entries.length) return;\n\n this._setIsMobile();\n\n if (!this._dialog.open) return;\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 if (!this._isMobile) {\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 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 this._inputElement.scrollIntoView();\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 }\n\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 <li>\n <c-icon path={mdiAlert} size={18} color=\"var(--c-warning-600)\"></c-icon>\n No suggestions found\n </li>\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-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);\n white-space: nowrap;\n\n &.active {\n transform: translateY(-18px) scale(0.75);\n }\n\n span {\n color: var(--_c-input-error-color);\n }\n }\n }\n\n &--select {\n input {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .c-input__slot {\n cursor: pointer;\n }\n }\n\n fieldset {\n background-color: var(--_c-input-background-color);\n border-collapse: collapse;\n border-color: var(--_c-input-inactive-color);\n border-radius: inherit;\n border-style: solid;\n border-width: var(--_c-input-border-width);\n inset: 0;\n margin: 0;\n padding: 0 0 0 8px;\n pointer-events: none;\n position: absolute;\n transition-duration: 0.15s;\n transition-property: color;\n transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);\n\n legend {\n float: none;\n line-height: 11px;\n margin-left: -1px;\n padding: 0;\n text-align: left;\n transition: width 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);\n width: 0;\n\n &.active {\n width: var(--_c-input-legend-width);\n }\n }\n }\n\n &--shadow {\n #{$this} {\n &__slot {\n background-color: var(--_c-input-shadow-background-color);\n box-shadow: rgba(0, 0, 0, 0.15) 0 5px 15px 0;\n\n input,\n textarea {\n color: var(--_c-input-shadow-text-color);\n }\n\n &:focus-within {\n outline: 2px var(--_c-input-active-color) solid;\n\n c-icon {\n --c-icon-color: var(--_c-input-shadow-active-color) !important;\n }\n }\n }\n }\n\n input::placeholder,\n textarea::placeholder {\n color: var(--_c-input-shadow-placeholder-color);\n opacity: 1;\n }\n }\n\n &--disabled {\n input,\n textarea,\n fieldset,\n label {\n --_c-input-error-color: var(--c-tertiary-500);\n\n color: var(--c-tertiary-500);\n }\n }\n\n &--textarea {\n #{$this} {\n &__field {\n margin-right: -12px;\n }\n }\n }\n\n ::placeholder {\n color: var(--_c-input-placeholder-color);\n opacity: 1;\n }\n\n &:focus-within,\n &--active,\n &:not(.c-input--disabled):active {\n --_c-input-border-width: 2px;\n\n color: var(--_c-input-active-color);\n\n fieldset {\n border-color: var(--_c-input-active-color);\n }\n\n label {\n color: var(--_c-input-active-color);\n transform: translateX(0) translateY(-18px) scale(0.75);\n }\n\n legend {\n width: var(--_c-input-legend-width);\n }\n }\n\n &.active:not(.filled) {\n .c-input-menu__input {\n position: relative;\n\n &::after {\n display: flex;\n align-items: center;\n position: absolute;\n inset: 0;\n content: attr(data-placeholder);\n pointer-events: none;\n color: var(--_c-input-placeholder-color);\n }\n }\n }\n\n &--error {\n color: var(--_c-input-error-color);\n\n fieldset {\n border-color: var(--_c-input-error-color) !important;\n }\n\n label {\n color: var(--_c-input-error-color) !important;\n }\n\n &:focus-within {\n color: var(--_c-input-error-color);\n }\n }\n}\n","import {\n Component,\n Host,\n h,\n State,\n Prop,\n Event,\n EventEmitter,\n Element,\n Watch,\n 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>&nbsp;*</span>}\n </label>\n );\n }\n\n get inputField() {\n return this.el?.querySelector('.c-input__input') as\n | HTMLInputElement\n | HTMLTextAreaElement;\n }\n\n private _updateStatusText() {\n if (this._debounce !== null) {\n clearTimeout(this._debounce);\n this._debounce = null;\n }\n\n this._debounce = window.setTimeout(() => {\n this.statusText = this.valid ? '' : `Error: ${this.validation}`;\n\n this._debounce = null;\n }, 1400);\n }\n\n render() {\n const containerClasses = {\n 'c-input': true,\n 'c-input--disabled': this.disabled,\n 'c-input--shadow': this.shadow,\n 'c-input--textarea': this.rows > 1,\n 'c-input--error': !this.valid,\n '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"],"version":3}
1
+ {"file":"c-dropdown.c-input.entry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IAAI,CAAC,IAAI,EACf,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,UAAU,EAAE,IAAI,CAAC,UAAU,GAC3B,CACH,CACG,CACF,CACD,EACP;GACH;;;;;;;;;;;;;","names":[],"sources":["src/components/c-dropdown/c-dropdown.scss?tag=c-dropdown&encapsulation=shadow","src/components/c-dropdown/c-dropdown.tsx","src/components/c-input/c-input.scss?tag=c-input","src/components/c-input/c-input.tsx"],"sourcesContent":[":host(c-dropdown) {\n /**\n * @prop --c-dropdown-background-color: Menu background color\n * @prop --c-dropdown-background-color-hover: Menu item hover background color\n * @prop --c-dropdown-text-color: Menu item text color\n * @prop --c-dropdown-text-color-active: Active menu item text color\n */\n --_c-dropdown-background-color: var(\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 background-color: white;\n border-radius: 4px;\n border: none;\n box-shadow: 2px 4px 10px #00000029;\n margin: -4px 0 0;\n overflow: hidden;\n padding: 4px 0 0;\n position: fixed;\n\n &::backdrop {\n display: none;\n }\n\n &[open].mobile {\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 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 &:not(.disabled):hover,\n &:not(.disabled):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 &.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';\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 _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 stateWatcher() {\n this.dropdownStateChange.emit(this.isOpen);\n }\n\n @Watch('index')\n handleIndexChange(index) {\n requestAnimationFrame(() => {\n this._updateStatusText();\n\n this._listItems.forEach((item, itemIndex) => {\n item?.classList.toggle('active', index === itemIndex);\n\n if (index === itemIndex) {\n item?.focus();\n }\n });\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 requestAnimationFrame(() => {\n if (!Array.isArray(entries) || !entries.length) return;\n\n this._setIsMobile();\n\n if (!this._dialog.open) return;\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 if (!this._isMobile) {\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 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 this._inputElement.scrollIntoView();\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 }\n\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-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-input-error-color);\n }\n }\n }\n\n &--select {\n input {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .c-input__slot {\n cursor: pointer;\n }\n }\n\n fieldset {\n background-color: var(--_c-input-background-color);\n border-collapse: collapse;\n border-color: var(--_c-input-inactive-color);\n border-radius: inherit;\n border-style: solid;\n border-width: var(--_c-input-border-width);\n inset: 0;\n margin: 0;\n padding: 0 0 0 8px;\n pointer-events: none;\n position: absolute;\n transition-duration: 0.15s;\n transition-property: color;\n transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);\n\n legend {\n float: none;\n line-height: 11px;\n margin-left: -1px;\n padding: 0;\n text-align: left;\n transition: width 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);\n width: 0;\n\n &.active {\n width: var(--_c-input-legend-width);\n }\n }\n }\n\n &--shadow {\n #{$this} {\n &__slot {\n background-color: var(--_c-input-shadow-background-color);\n box-shadow: rgba(0, 0, 0, 0.15) 0 5px 15px 0;\n\n input,\n textarea {\n color: var(--_c-input-shadow-text-color);\n }\n\n &:focus-within {\n outline: 2px var(--_c-input-active-color) solid;\n\n c-icon {\n --c-icon-color: var(--_c-input-shadow-active-color) !important;\n }\n }\n }\n }\n\n input::placeholder,\n textarea::placeholder {\n color: var(--_c-input-shadow-placeholder-color);\n opacity: 1;\n }\n }\n\n &--disabled {\n input,\n textarea,\n fieldset,\n label {\n --_c-input-error-color: var(--c-tertiary-500);\n\n color: var(--c-tertiary-500);\n }\n }\n\n &--textarea {\n #{$this} {\n &__field {\n margin-right: -12px;\n }\n }\n }\n\n ::placeholder {\n color: var(--_c-input-placeholder-color);\n opacity: 1;\n }\n\n &:focus-within,\n &--active,\n &:not(.c-input--disabled):active {\n --_c-input-border-width: 2px;\n\n color: var(--_c-input-active-color);\n\n fieldset {\n border-color: var(--_c-input-active-color);\n }\n\n label {\n color: var(--_c-input-active-color);\n transform: translateX(0) translateY(-18px) scale(0.75);\n }\n\n legend {\n width: var(--_c-input-legend-width);\n }\n }\n\n &.active:not(.filled) {\n .c-input-menu__input {\n position: relative;\n\n &::after {\n display: flex;\n align-items: center;\n position: absolute;\n inset: 0;\n content: attr(data-placeholder);\n pointer-events: none;\n color: var(--_c-input-placeholder-color);\n }\n }\n }\n\n &--error {\n color: var(--_c-input-error-color);\n\n fieldset {\n border-color: var(--_c-input-error-color) !important;\n }\n\n label {\n color: var(--_c-input-error-color) !important;\n }\n\n &:focus-within {\n color: var(--_c-input-error-color);\n }\n }\n}\n","import {\n Component,\n Host,\n h,\n State,\n Prop,\n Event,\n EventEmitter,\n Element,\n Watch,\n 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>&nbsp;*</span>}\n </label>\n );\n }\n\n get inputField() {\n return this.el?.querySelector('.c-input__input') as\n | HTMLInputElement\n | HTMLTextAreaElement;\n }\n\n private _updateStatusText() {\n if (this._debounce !== null) {\n clearTimeout(this._debounce);\n this._debounce = null;\n }\n\n this._debounce = window.setTimeout(() => {\n this.statusText = this.valid ? '' : `Error: ${this.validation}`;\n\n this._debounce = null;\n }, 1400);\n }\n\n render() {\n const containerClasses = {\n 'c-input': true,\n 'c-input--disabled': this.disabled,\n 'c-input--shadow': this.shadow,\n 'c-input--textarea': this.rows > 1,\n 'c-input--error': !this.valid,\n '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"],"version":3}
@@ -181,7 +181,7 @@ const CTabs = class {
181
181
  this._tabButtons.value = tab.value;
182
182
  }
183
183
  const item = Array.from(this.tabItems.querySelectorAll(':scope > c-tab-item')).find((child) => child.value === tab.value);
184
- item.setAttribute('disabled', tab.disabled.toString());
184
+ item.setAttribute('disabled', (!!tab.disabled).toString());
185
185
  item.setAttribute('id', tabItemId);
186
186
  item.setAttribute('aria-labelledby', tabId);
187
187
  item.active = isActive;
@@ -1 +1 @@
1
- {"file":"c-tabs.entry.js","mappings":";;;AAAA,MAAM,QAAQ,GAAG,muHAAmuH;;ACepvH,IAAK,eAGJ;AAHD,WAAK,eAAe;EAClB,qDAAQ,CAAA;EACR,uDAAS,CAAA;AACX,CAAC,EAHI,eAAe,KAAf,eAAe,QAGnB;MAWY,KAAK;;;;IA2CR,iBAAY,GAAG,KAAK,CAAC;IAIrB,cAAS,GAAG,IAAI,CAAC;IAEjB,kBAAa,GAAG,IAAI,CAAC;IAErB,aAAQ,GAAG,KAAK,CAAC;IAEjB,qBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC;IA0G9B,0BAAqB,GAAG,IAAI,oBAAoB,CACtD,CAAC,CAAC,KAAK,CAAC;MACN,IAAI,KAAK,CAAC,cAAc,EAAE;QACxB,UAAU,CAAC;UACT,IAAI,CAAC,eAAe,EAAE,CAAC;SACxB,EAAE,IAAI,CAAC,CAAC;OACV;KACF,EACD,EAAE,SAAS,EAAE,CAAC,EAAE,CACjB,CAAC;IAoEM,mBAAc,GAAG,CAAC,CAAC;IA2GnB,qBAAgB,GAAG,CAAC,CAAC;IAqJrB,YAAO,GAAG,CAAC,CAAC;IAEZ,iBAAY,GAAG,CAAC,CAAC;;sBAreJ,KAAK;4BAKC,KAAK;mBAKA,SAAS;4BAMd,GAAG;oBAKX,KAAK;yBAkdC,KAAK;oBAEV,KAAK;wBAED,CAAC;;EA1bzB,qBAAqB;IACnB,IAAI,CAAC,gBAAgB,EAAE,CAAC;GACzB;EAGD,qBAAqB;IACnB,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAExB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;GACnC;EAGD,eAAe,CAAC,KAAkB;IAChC,KAAK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,CAAC,IAExC,cAAQ,IAAI,EAAE,aAAa,GAAW,CACxB,CACjB,CACG,EAEN,WAAK,KAAK,EAAC,iBAAiB,IAC1B,YAAM,IAAI,EAAC,OAAO,GAAQ,CACtB,CACD,EACP;GACH;;;;;;;;AA5nBc,eAAS,GAAG,CAAH,CAAK;;;;;","names":[],"sources":["src/components/c-tabs/c-tabs.scss?tag=c-tabs&encapsulation=shadow","src/components/c-tabs/c-tabs.tsx"],"sourcesContent":[":host(.c-tabs) {\n /**\n * @prop --c-tabs-border-color: Tabs border color\n * @prop --c-tabs-indicator-color: Tab indicator color\n */\n --_c-tabs-border-color: var(--c-tabs-border-color, var(--c-tertiary-200));\n --_c-tabs-indicator-color: var(--c-tabs-indicator-color, var(--c-primary-600));\n\n // private\n --_c-tabs-transition-speed: 0.001ms;\n\n display: block;\n width: 100%;\n transform: translateX(0%);\n max-width: 100%;\n\n .c-tabs__container {\n display: grid;\n grid-template-columns: 1fr;\n align-items: center;\n gap: 4px;\n\n --c-icon-button-border-radius: 4px;\n }\n\n .c-tabs__tabs {\n display: flex;\n overflow: hidden;\n padding: 4px;\n position: relative;\n margin: -4px;\n\n &::after {\n position: absolute;\n content: \"\";\n bottom: 4px;\n inset-inline: 0;\n height: 1px;\n background-color: var(--_c-tabs-border-color);\n }\n }\n\n .c-tabs__scroll {\n transform: translateX(var(--_c-tabs-scroll-position-x));\n transition: transform var(--_c-tabs-transition-speed) cubic-bezier(0.075, 0.82, 0.165, 1);\n display: flex;\n margin: 0;\n padding: 0;\n position: relative;\n flex-grow: 1;\n\n &::after {\n content: \"\";\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n height: 3px;\n scale: var(--_c-tabs-indicator-width, 0.125) 1;\n opacity: 0.01;\n translate: var(--_c-tabs-indicator-left, 0) 0;\n transform-origin: left;\n transition:\n scale var(--_c-tabs-transition-speed) cubic-bezier(0.075, 0.82, 0.165, 1),\n translate var(--_c-tabs-transition-speed) cubic-bezier(0.075, 0.82, 0.165, 1);\n background: var(--_c-tabs-indicator-color);\n }\n }\n\n .c-tabs__content {\n display: flex;\n }\n\n ::slotted(c-tab-buttons) {\n flex-grow: 1;\n }\n}\n\n:host(.c-tabs.c-tabs--justify-start:not(.c-tabs--vertical)) {\n ::slotted(c-tab-buttons),\n ::slotted(c-tab) {\n flex-grow: 0;\n }\n}\n\n:host(.c-tabs.c-tabs--justify-end:not(.c-tabs--vertical)) {\n .c-tabs__scroll {\n justify-content: end;\n }\n\n ::slotted(c-tab-buttons),\n ::slotted(c-tab) {\n flex-grow: 0;\n }\n}\n\n:host(.c-tabs.c-tabs--justify-center:not(.c-tabs--vertical)) {\n .c-tabs__scroll {\n justify-content: center;\n }\n\n ::slotted(c-tab-buttons),\n ::slotted(c-tab) {\n flex-grow: 0;\n }\n}\n\n:host(.c-tabs.c-tabs--vertical.c-tabs--mobile) {\n grid-template-columns: 1fr;\n}\n\n:host(.c-tabs.c-tabs--vertical) {\n display: grid;\n grid-template-columns: auto 1fr;\n grid-template-rows: 1fr;\n\n .c-tabs__tabs::after {\n display: none;\n }\n\n ::slotted(c-tab-items) {\n position: relative;\n min-height: 100%;\n }\n\n .c-tabs__scroll {\n display: grid;\n max-width: 100%;\n\n &::after {\n display: none;\n }\n\n &::before {\n content: \"\";\n position: absolute;\n width: 4px;\n top: 0;\n bottom: 0;\n right: 0;\n scale: 1 var(--_c-tabs-indicator-width, 0.125);\n opacity: 0.01;\n translate: 0 var(--_c-tabs-indicator-top, 0);\n transform-origin: top left;\n transition: scale var(--_c-tabs-transition-speed) cubic-bezier(0.075, 0.82, 0.165, 1), translate var(--_c-tabs-transition-speed) cubic-bezier(0.075, 0.82, 0.165, 1);\n background: var(--_c-tabs-indicator-color);\n }\n }\n\n ::slotted(c-tab) {\n box-shadow: inset -1px 0 0 0 var(--_c-tabs-border-color);\n padding-inline: 24px;\n justify-content: start;\n max-width: 100%;\n min-width: 100%;\n }\n}\n\n:host(.c-tabs.c-tabs--buttons) {\n .c-tabs__tabs::after,\n .c-tabs__scroll::after {\n display: none;\n }\n}\n\n:host(.c-tabs--borderless) ::slotted(c-tab) {\n box-shadow: none;\n}\n\n:host(.c-tabs.c-tabs--initialized) {\n .c-tabs__scroll::after {\n opacity: 1;\n }\n\n .c-tabs__scroll::before {\n opacity: 1;\n }\n}\n\n:host(.c-tabs.c-tabs--overflow) {\n .c-tabs__container {\n grid-template-columns: auto 1fr auto;\n }\n}\n","import { mdiArrowLeft, mdiArrowRight } from '@mdi/js';\nimport {\n Component,\n h,\n Host,\n Element,\n Event,\n Prop,\n EventEmitter,\n Listen,\n Watch,\n State,\n} from '@stencil/core';\nimport { CTabsJustify } from '../../types';\n\nenum ScrollDirection {\n Left = 2,\n Right = 4,\n}\n\n/**\n * @group Content Selectors\n * @slot Default slot - Default slot\n */\n@Component({\n tag: 'c-tabs',\n styleUrl: 'c-tabs.scss',\n shadow: true,\n})\nexport class CTabs {\n /**\n * Currently active tab\n */\n @Prop({ mutable: true }) value!: number | string;\n\n /**\n * Disable the bottom border\n */\n @Prop() borderless = false;\n\n /**\n * Disable animation\n */\n @Prop() disableAnimation = false;\n\n /**\n * Justification of the children\n */\n @Prop() justify: CTabsJustify = 'stretch';\n\n /**\n * Mobile breakpoint in pixels\n * - affects the content stacking with the vertical tabs\n */\n @Prop() mobileBreakpoint = 640;\n\n /**\n * Vertical tabs\n */\n @Prop() vertical = false;\n\n /**\n * Emit changes to the parent\n */\n @Event({ bubbles: false }) changeValue: EventEmitter;\n\n @Element() el: HTMLCTabsElement;\n\n private _tabsTabsElement: HTMLDivElement;\n\n private _tabsScrollElement: HTMLDivElement;\n\n private _initialized = false;\n\n private _resizeObserver: ResizeObserver;\n\n private _debounce = null;\n\n private _moveDebounce = null;\n\n private _isDirty = false;\n\n private _focusedTabValue = this.value;\n\n private static _uniqueId = 0;\n\n @Watch('justify')\n onJustificationChange() {\n this._handleActiveTab();\n }\n\n @Watch('value')\n onExternalValueChange() {\n this._handleActiveTab();\n\n this.changeValue.emit(this.value);\n }\n\n @Listen('tabFocus', { passive: true })\n tabFocusHandler(event: CustomEvent) {\n event.stopPropagation();\n\n this._focusedTabValue = event.detail;\n }\n\n @Listen('tabChange', { passive: true })\n tabChangeHandler(\n event: CustomEvent<{\n value: number | string;\n element: HTMLCTabElement;\n }>,\n ) {\n event.stopPropagation();\n\n this.value = event.detail.value;\n\n this._updateItemsValue();\n }\n\n @Listen('keydown', { capture: true })\n handleKeyDown(event: KeyboardEvent) {\n // @ts-expect-error - type of the event.target is unknown\n if (!this.tabs.includes(event.target) || event.target.disabled) return;\n\n if (event.key === 'Enter' || event.code === 'Space') {\n this.value = (event.target as HTMLCTabElement).value;\n }\n }\n\n @Listen('keyup', { capture: true })\n handleKeyUp(event: KeyboardEvent) {\n this._isDirty = true;\n\n // @ts-expect-error - type of the event.target is unknown\n if (!this.tabs.includes(event.target)) return;\n\n const isArrowLeft = event.key === 'ArrowLeft';\n const isArrowRight = event.key === 'ArrowRight';\n\n if (!isArrowRight && !isArrowLeft) return;\n\n const tabIndex = this._getTabIndex(this._focusedTabValue);\n\n const firstAvailableValue = this.availableValues.at(0);\n const lastAvailableValue = this.availableValues.at(-1);\n\n const isBeginning = this._focusedTabValue === firstAvailableValue;\n const isEnd = this._focusedTabValue === lastAvailableValue;\n\n const nextValue = isEnd\n ? firstAvailableValue\n : this.availableValues[tabIndex + 1];\n\n const previousValue = isBeginning\n ? lastAvailableValue\n : this.availableValues[tabIndex - 1];\n\n if (isArrowLeft) {\n if (isBeginning) return;\n\n this._focusTab(previousValue);\n }\n\n if (isArrowRight) {\n if (isEnd) return;\n this._focusTab(nextValue);\n }\n }\n\n private get _prefersReducedMotion() {\n return (\n window.matchMedia('(prefers-reduced-motion: reduce)').matches ||\n this.disableAnimation\n );\n }\n\n private get _tabItems() {\n return this.el.querySelector(\n ':scope > c-tab-items',\n ) as HTMLCTabItemsElement;\n }\n\n private get _tabButtons() {\n return this.el.querySelector(\n ':scope > c-tab-buttons',\n ) as HTMLCTabButtonsElement;\n }\n\n private _intersectionObserver = new IntersectionObserver(\n ([entry]) => {\n if (entry.isIntersecting) {\n setTimeout(() => {\n this._handleOverflow();\n }, 1000);\n }\n },\n { threshold: 1 },\n );\n\n private _updateItemsValue() {\n this.tabItems.value = this.value;\n\n if (this._tabButtons) {\n this._tabButtons.value = this.value;\n }\n }\n\n componentWillLoad() {\n CTabs._uniqueId += 1;\n\n this._tabItems.disableAnimation = this._prefersReducedMotion;\n\n // if tab buttons are used, mark them as tab controller\n if (this._tabButtons) {\n this.el.classList.add('c-tabs--buttons');\n this._tabButtons.setAttribute('tabs', 'true');\n }\n\n this._updateItemsValue();\n }\n\n componentDidLoad() {\n this._resizeObserver = new ResizeObserver((entries) => {\n this._handleResize(entries[0].contentRect.width);\n });\n\n this._resizeObserver.observe(this.el);\n\n this._intersectionObserver.observe(this.el);\n\n this.el.style.setProperty('--_c-tabs-count', this.setsize.toString());\n\n requestAnimationFrame(() => {\n this._handleOverflow();\n });\n }\n\n disconnectedCallback() {\n this._intersectionObserver.disconnect();\n }\n\n get tabs() {\n if (!!this._tabButtons) {\n return Array.from(\n this._tabButtons.querySelectorAll(':scope > c-button'),\n ) as HTMLCButtonElement[];\n }\n\n return Array.from(\n this.el.querySelectorAll(':scope > c-tab'),\n ) as HTMLCTabElement[];\n }\n\n get tabItems() {\n return this.el.querySelector('c-tab-items') as HTMLCTabItemsElement;\n }\n\n get setsize() {\n return this.tabs.length;\n }\n\n get availableValues() {\n return this.tabs.map((tab) => tab.value);\n }\n\n private _previousWidth = 0;\n\n private _getTabIndex(value: string | number) {\n return this.availableValues.findIndex((tab) => tab === value);\n }\n\n private _setIndicatorTop(value: number) {\n const container = this.el.shadowRoot.querySelector(\n '.c-tabs__tabs',\n ) as HTMLDivElement;\n\n container.style.setProperty('--_c-tabs-indicator-top', `${value}px`);\n }\n\n private _setIndicatorLeft(value: number) {\n const container = this.el.shadowRoot.querySelector(\n '.c-tabs__tabs',\n ) as HTMLDivElement;\n\n container.style.setProperty('--_c-tabs-indicator-left', `${value}px`);\n }\n\n private _setIndicatorWidth(value: number) {\n const container = this.el.shadowRoot.querySelector(\n '.c-tabs__tabs',\n ) as HTMLDivElement;\n\n container.style.setProperty('--_c-tabs-indicator-width', value.toString());\n }\n\n private _handleActiveTab() {\n requestAnimationFrame(() => {\n let position = 0;\n\n const oldTab =\n (this.el.querySelector('[aria-selected=\"true\"]') as HTMLCTabElement) ??\n this.tabs[0];\n\n this.tabs.forEach(\n (tab: HTMLCTabElement | HTMLCButtonElement, index: number) => {\n if (!tab.disabled) {\n position += 1;\n }\n\n const isActive = tab.value === this.value;\n\n const tabId = `c-tab-${CTabs._uniqueId}-${index + 1}`;\n\n const tabItemId = `c-tab-item-${CTabs._uniqueId}-${index + 1}`;\n\n tab.setAttribute('id', tabId);\n tab.setAttribute('aria-controls', tabItemId);\n\n if (!this._tabButtons) {\n (tab as HTMLCTabElement).active = isActive;\n } else if (isActive) {\n this._tabButtons.value = tab.value;\n }\n\n const item = (\n Array.from(\n this.tabItems.querySelectorAll(':scope > c-tab-item'),\n ) as HTMLCTabItemElement[]\n ).find((child) => child.value === tab.value);\n\n item.setAttribute('disabled', tab.disabled.toString());\n\n item.setAttribute('id', tabItemId);\n item.setAttribute('aria-labelledby', tabId);\n item.active = isActive;\n item.setAttribute('active', isActive.toString());\n\n if (!tab.disabled) {\n tab.setAttribute('aria-posinset', position.toString());\n tab.setAttribute('setsize', this.availableValues.length.toString());\n }\n\n if (isActive && !this._tabButtons) {\n this._moveIndicator(\n oldTab as HTMLCTabElement,\n tab as HTMLCTabElement,\n );\n\n requestAnimationFrame(() => {\n if (!this.isOverflowing) return;\n\n const selectedTab = this.el.querySelector(\n 'c-tab[aria-selected=\"true\"]',\n ) as HTMLCTabElement;\n\n this._moveToTab(selectedTab);\n\n this._tabsTabsElement.style.setProperty(\n '--_c-tabs-transition-speed',\n '200ms',\n );\n });\n }\n\n if (isActive && this._isDirty) {\n tab.focus();\n }\n },\n );\n });\n }\n\n private _maxScrollOffset = 0;\n\n private _getDimensions(item: HTMLCTabElement) {\n const { x, width } = item.getBoundingClientRect();\n\n const { x: containerX, width: containerWidth } =\n this._tabsTabsElement.getBoundingClientRect();\n\n const { x: scrollerX, width: scrollerWidth } =\n this._tabsScrollElement.getBoundingClientRect();\n\n return {\n x,\n width,\n containerWidth,\n containerX,\n scrollerX,\n scrollerWidth,\n };\n }\n\n private _focusTab(value: string | number) {\n if (this._tabButtons) {\n return;\n }\n\n requestAnimationFrame(() => {\n const item = this.tabs.find(\n (tab) => tab.value === value,\n ) as HTMLCTabElement;\n\n const { x, width, containerX, containerWidth } =\n this._getDimensions(item);\n\n const isInView =\n x >= containerX && x + width <= containerX + containerWidth;\n\n if (isInView) {\n item?.focus();\n\n return;\n }\n\n this._moveToTab(item);\n });\n }\n\n private _handleResize(width: number) {\n if (this._moveDebounce !== null) return;\n\n if (this._debounce !== null) {\n clearTimeout(this._debounce);\n this._debounce = null;\n }\n\n this._debounce = setTimeout(() => {\n const content = this.el.shadowRoot.querySelector('.c-tabs__scroll');\n const container = this.el.shadowRoot.querySelector('.c-tabs__tabs');\n\n requestAnimationFrame(() => {\n if (width === this._previousWidth) return;\n this._handleOverflow();\n\n this.isMobile = width < this.mobileBreakpoint;\n\n this._maxScrollOffset =\n -1 * (content.scrollWidth - container.clientWidth);\n\n this._handleActiveTab();\n this._previousWidth = width;\n });\n }, 200);\n }\n\n private _moveIndicator(oldTab: HTMLCTabElement, newTab: HTMLCTabElement) {\n if (this._moveDebounce !== null) return;\n\n this._moveDebounce = setTimeout(() => {\n requestAnimationFrame(() => {\n const content = this.el.shadowRoot.querySelector(\n '.c-tabs__scroll',\n ) as HTMLDivElement;\n\n const container = this.el.shadowRoot.querySelector(\n '.c-tabs__tabs',\n ) as HTMLDivElement;\n\n if (this._initialized && !this._prefersReducedMotion) {\n container.style.setProperty('--_c-tabs-transition-speed', '200ms');\n }\n\n const buttonOffset = this.isOverflowing ? 32 : 0;\n\n const newTabWidth = newTab.offsetWidth / content.offsetWidth;\n\n const newTabHeight = this.vertical\n ? newTab.offsetHeight / content.offsetHeight\n : newTab.offsetHeight / content.offsetHeight;\n\n const newTabPosition = oldTab.compareDocumentPosition(newTab);\n\n let transitionWidth = 0;\n\n // if the new tab is to the right of down\n if (newTabPosition === ScrollDirection.Right) {\n transitionWidth = this.vertical\n ? newTab.offsetTop + newTab.offsetHeight - oldTab.offsetTop\n : newTab.offsetLeft + newTab.offsetWidth - oldTab.offsetLeft;\n } else {\n // if the tab is to the left or top\n transitionWidth = this.vertical\n ? oldTab.offsetTop + oldTab.offsetHeight - newTab.offsetTop\n : oldTab.offsetLeft + oldTab.offsetWidth - newTab.offsetLeft;\n\n this._setIndicatorLeft(newTab.offsetLeft - buttonOffset);\n this._setIndicatorTop(newTab.offsetTop - buttonOffset);\n }\n\n this._setIndicatorWidth(\n this.vertical\n ? transitionWidth / content.offsetHeight\n : transitionWidth / content.offsetWidth,\n );\n\n const onTransitionEnd = (event) => {\n if (event.propertyName !== 'scale') return;\n\n this._setIndicatorLeft(newTab.offsetLeft - buttonOffset);\n this._setIndicatorTop(newTab.offsetTop - buttonOffset);\n\n this._setIndicatorWidth(this.vertical ? newTabHeight : newTabWidth);\n\n content.removeEventListener('transitionend', onTransitionEnd);\n\n if (!this._initialized) {\n this.el.classList.add('c-tabs--initialized');\n }\n\n this._initialized = true;\n };\n\n content.addEventListener('transitionend', onTransitionEnd);\n });\n\n clearTimeout(this._moveDebounce);\n this._moveDebounce = null;\n }, 200);\n }\n\n private _startX = 0;\n\n private _touchOffset = 0;\n\n @State() isOverflowing = false;\n\n @State() isMobile = false;\n\n @State() scrollOffset = 0;\n\n @Watch('scrollOffset')\n onScrollOffsetChange(offset) {\n this._tabsTabsElement.style.setProperty(\n '--_c-tabs-scroll-position-x',\n `${offset}px`,\n );\n }\n\n private _handleOverflow() {\n if (this._tabButtons) {\n this.isOverflowing = false;\n\n return;\n }\n\n const content = this.el.shadowRoot.querySelector('.c-tabs__scroll');\n const container = this.el.shadowRoot.querySelector('.c-tabs__tabs');\n\n const contentSize = content.scrollWidth;\n const containerSize = container.clientWidth;\n\n this.isOverflowing = containerSize + 1 < contentSize;\n }\n\n private _onTouchEnd() {\n this._tabsTabsElement.style.setProperty(\n '--_c-tabs-transition-speed',\n '200ms',\n );\n }\n\n private _onTouchMove(event: TouchEvent) {\n if (this.vertical) return;\n\n event.preventDefault();\n\n this._tabsTabsElement.style.setProperty(\n '--_c-tabs-transition-speed',\n '0ms',\n );\n\n const offset =\n -1 * (this._touchOffset + this._startX - event.touches[0].clientX);\n\n const isInRange = offset <= 0 && offset >= this._maxScrollOffset;\n\n if (isInRange) {\n this.scrollOffset = offset;\n } else if (offset > 0 || !this.isOverflowing) {\n this.scrollOffset = 0;\n } else if (offset < this._maxScrollOffset) {\n this.scrollOffset = this._maxScrollOffset;\n }\n }\n\n private _onTouchStart(event: TouchEvent) {\n this._handleOverflow();\n\n if (!this.isOverflowing) return;\n\n this._touchOffset = this.scrollOffset * -1;\n this._startX = event.touches[0].clientX;\n }\n\n private _onBackClick() {\n const min = 0;\n\n const step = this._tabsTabsElement.clientWidth / 2;\n\n this.scrollOffset = Math.min(this.scrollOffset + step, min);\n }\n\n private _onForwardClick() {\n const max =\n (this._tabsScrollElement.scrollWidth -\n this._tabsTabsElement.clientWidth) *\n -1;\n\n const step = this._tabsTabsElement.clientWidth / 2;\n\n this.scrollOffset = Math.max(-1 * step + this.scrollOffset, max);\n }\n\n private _moveToTab(tab: HTMLCTabElement) {\n const onTransitionEnd = () => {\n tab?.focus();\n\n this._tabsScrollElement.removeEventListener(\n 'transitionend',\n onTransitionEnd,\n );\n };\n\n requestAnimationFrame(() => {\n const tabIndex = this._getTabIndex(tab.dataset.value);\n const isFirstTab = tabIndex === 0;\n const isLastTab = tabIndex === this.availableValues.length - 1;\n\n if (isFirstTab) {\n this.scrollOffset = 0;\n\n return;\n }\n\n if (isLastTab) {\n this.scrollOffset = this._maxScrollOffset - 8;\n\n return;\n }\n\n const { x, width, containerWidth, containerX } = this._getDimensions(tab);\n\n const tabEnd = x + width;\n const containerEnd = containerX + containerWidth;\n\n const isOverflowingStart = x < containerX;\n const isOverflowingEnd = tabEnd > containerEnd;\n\n if (isOverflowingStart) {\n const tabInside = tabEnd - containerX;\n const tabOutside = tabInside - width;\n\n this.scrollOffset = this.scrollOffset - tabOutside + 4;\n }\n\n if (isOverflowingEnd) {\n this.scrollOffset -= tabEnd - containerEnd + 4;\n }\n });\n\n const content = this.el.shadowRoot.querySelector('.c-tabs__scroll');\n\n content.addEventListener('transitionend', onTransitionEnd);\n }\n\n render() {\n const classes = {\n 'c-tabs': true,\n 'c-tabs--borderless': this.borderless,\n 'c-tabs--vertical': this.vertical,\n 'c-tabs--overflow': this.isOverflowing,\n 'c-tabs--mobile': this.isMobile,\n [`c-tabs--justify-${this.justify}`]: true,\n };\n\n return (\n <Host role=\"tablist\" class={classes}>\n <div class=\"c-tabs__container\">\n {this.isOverflowing && !this.vertical && (\n <c-icon-button\n size=\"x-small\"\n ghost\n onClick={this._onBackClick.bind(this)}\n >\n <c-icon path={mdiArrowLeft}></c-icon>\n </c-icon-button>\n )}\n\n <div\n ref={(el) => (this._tabsTabsElement = el)}\n class=\"c-tabs__tabs\"\n onTouchStart={this._onTouchStart.bind(this)}\n onTouchMove={this._onTouchMove.bind(this)}\n onTouchEnd={this._onTouchEnd.bind(this)}\n >\n <div\n ref={(el) => (this._tabsScrollElement = el)}\n class=\"c-tabs__scroll\"\n >\n <slot></slot>\n </div>\n </div>\n\n {this.isOverflowing && !this.vertical && (\n <c-icon-button\n size=\"x-small\"\n ghost\n onClick={this._onForwardClick.bind(this)}\n >\n <c-icon path={mdiArrowRight}></c-icon>\n </c-icon-button>\n )}\n </div>\n\n <div class=\"c-tabs__content\">\n <slot name=\"items\"></slot>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"c-tabs.entry.js","mappings":";;;AAAA,MAAM,QAAQ,GAAG,muHAAmuH;;ACepvH,IAA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"sources":["src/components/c-tabs/c-tabs.scss?tag=c-tabs&encapsulation=shadow","src/components/c-tabs/c-tabs.tsx"],"sourcesContent":[":host(.c-tabs) {\n /**\n * @prop --c-tabs-border-color: Tabs border color\n * @prop --c-tabs-indicator-color: Tab indicator color\n */\n --_c-tabs-border-color: var(--c-tabs-border-color, var(--c-tertiary-200));\n --_c-tabs-indicator-color: var(--c-tabs-indicator-color, var(--c-primary-600));\n\n // private\n --_c-tabs-transition-speed: 0.001ms;\n\n display: block;\n width: 100%;\n transform: translateX(0%);\n max-width: 100%;\n\n .c-tabs__container {\n display: grid;\n grid-template-columns: 1fr;\n align-items: center;\n gap: 4px;\n\n --c-icon-button-border-radius: 4px;\n }\n\n .c-tabs__tabs {\n display: flex;\n overflow: hidden;\n padding: 4px;\n position: relative;\n margin: -4px;\n\n &::after {\n position: absolute;\n content: \"\";\n bottom: 4px;\n inset-inline: 0;\n height: 1px;\n background-color: var(--_c-tabs-border-color);\n }\n }\n\n .c-tabs__scroll {\n transform: translateX(var(--_c-tabs-scroll-position-x));\n transition: transform var(--_c-tabs-transition-speed) cubic-bezier(0.075, 0.82, 0.165, 1);\n display: flex;\n margin: 0;\n padding: 0;\n position: relative;\n flex-grow: 1;\n\n &::after {\n content: \"\";\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n height: 3px;\n scale: var(--_c-tabs-indicator-width, 0.125) 1;\n opacity: 0.01;\n translate: var(--_c-tabs-indicator-left, 0) 0;\n transform-origin: left;\n transition:\n scale var(--_c-tabs-transition-speed) cubic-bezier(0.075, 0.82, 0.165, 1),\n translate var(--_c-tabs-transition-speed) cubic-bezier(0.075, 0.82, 0.165, 1);\n background: var(--_c-tabs-indicator-color);\n }\n }\n\n .c-tabs__content {\n display: flex;\n }\n\n ::slotted(c-tab-buttons) {\n flex-grow: 1;\n }\n}\n\n:host(.c-tabs.c-tabs--justify-start:not(.c-tabs--vertical)) {\n ::slotted(c-tab-buttons),\n ::slotted(c-tab) {\n flex-grow: 0;\n }\n}\n\n:host(.c-tabs.c-tabs--justify-end:not(.c-tabs--vertical)) {\n .c-tabs__scroll {\n justify-content: end;\n }\n\n ::slotted(c-tab-buttons),\n ::slotted(c-tab) {\n flex-grow: 0;\n }\n}\n\n:host(.c-tabs.c-tabs--justify-center:not(.c-tabs--vertical)) {\n .c-tabs__scroll {\n justify-content: center;\n }\n\n ::slotted(c-tab-buttons),\n ::slotted(c-tab) {\n flex-grow: 0;\n }\n}\n\n:host(.c-tabs.c-tabs--vertical.c-tabs--mobile) {\n grid-template-columns: 1fr;\n}\n\n:host(.c-tabs.c-tabs--vertical) {\n display: grid;\n grid-template-columns: auto 1fr;\n grid-template-rows: 1fr;\n\n .c-tabs__tabs::after {\n display: none;\n }\n\n ::slotted(c-tab-items) {\n position: relative;\n min-height: 100%;\n }\n\n .c-tabs__scroll {\n display: grid;\n max-width: 100%;\n\n &::after {\n display: none;\n }\n\n &::before {\n content: \"\";\n position: absolute;\n width: 4px;\n top: 0;\n bottom: 0;\n right: 0;\n scale: 1 var(--_c-tabs-indicator-width, 0.125);\n opacity: 0.01;\n translate: 0 var(--_c-tabs-indicator-top, 0);\n transform-origin: top left;\n transition: scale var(--_c-tabs-transition-speed) cubic-bezier(0.075, 0.82, 0.165, 1), translate var(--_c-tabs-transition-speed) cubic-bezier(0.075, 0.82, 0.165, 1);\n background: var(--_c-tabs-indicator-color);\n }\n }\n\n ::slotted(c-tab) {\n box-shadow: inset -1px 0 0 0 var(--_c-tabs-border-color);\n padding-inline: 24px;\n justify-content: start;\n max-width: 100%;\n min-width: 100%;\n }\n}\n\n:host(.c-tabs.c-tabs--buttons) {\n .c-tabs__tabs::after,\n .c-tabs__scroll::after {\n display: none;\n }\n}\n\n:host(.c-tabs--borderless) ::slotted(c-tab) {\n box-shadow: none;\n}\n\n:host(.c-tabs.c-tabs--initialized) {\n .c-tabs__scroll::after {\n opacity: 1;\n }\n\n .c-tabs__scroll::before {\n opacity: 1;\n }\n}\n\n:host(.c-tabs.c-tabs--overflow) {\n .c-tabs__container {\n grid-template-columns: auto 1fr auto;\n }\n}\n","import { mdiArrowLeft, mdiArrowRight } from '@mdi/js';\nimport {\n Component,\n h,\n Host,\n Element,\n Event,\n Prop,\n EventEmitter,\n Listen,\n Watch,\n State,\n} from '@stencil/core';\nimport { CTabsJustify } from '../../types';\n\nenum ScrollDirection {\n Left = 2,\n Right = 4,\n}\n\n/**\n * @group Content Selectors\n * @slot Default slot - Default slot\n */\n@Component({\n tag: 'c-tabs',\n styleUrl: 'c-tabs.scss',\n shadow: true,\n})\nexport class CTabs {\n /**\n * Currently active tab\n */\n @Prop({ mutable: true }) value!: number | string;\n\n /**\n * Disable the bottom border\n */\n @Prop() borderless = false;\n\n /**\n * Disable animation\n */\n @Prop() disableAnimation = false;\n\n /**\n * Justification of the children\n */\n @Prop() justify: CTabsJustify = 'stretch';\n\n /**\n * Mobile breakpoint in pixels\n * - affects the content stacking with the vertical tabs\n */\n @Prop() mobileBreakpoint = 640;\n\n /**\n * Vertical tabs\n */\n @Prop() vertical = false;\n\n /**\n * Emit changes to the parent\n */\n @Event({ bubbles: false }) changeValue: EventEmitter;\n\n @Element() el: HTMLCTabsElement;\n\n private _tabsTabsElement: HTMLDivElement;\n\n private _tabsScrollElement: HTMLDivElement;\n\n private _initialized = false;\n\n private _resizeObserver: ResizeObserver;\n\n private _debounce = null;\n\n private _moveDebounce = null;\n\n private _isDirty = false;\n\n private _focusedTabValue = this.value;\n\n private static _uniqueId = 0;\n\n @Watch('justify')\n onJustificationChange() {\n this._handleActiveTab();\n }\n\n @Watch('value')\n onExternalValueChange() {\n this._handleActiveTab();\n\n this.changeValue.emit(this.value);\n }\n\n @Listen('tabFocus', { passive: true })\n tabFocusHandler(event: CustomEvent) {\n event.stopPropagation();\n\n this._focusedTabValue = event.detail;\n }\n\n @Listen('tabChange', { passive: true })\n tabChangeHandler(\n event: CustomEvent<{\n value: number | string;\n element: HTMLCTabElement;\n }>,\n ) {\n event.stopPropagation();\n\n this.value = event.detail.value;\n\n this._updateItemsValue();\n }\n\n @Listen('keydown', { capture: true })\n handleKeyDown(event: KeyboardEvent) {\n // @ts-expect-error - type of the event.target is unknown\n if (!this.tabs.includes(event.target) || event.target.disabled) return;\n\n if (event.key === 'Enter' || event.code === 'Space') {\n this.value = (event.target as HTMLCTabElement).value;\n }\n }\n\n @Listen('keyup', { capture: true })\n handleKeyUp(event: KeyboardEvent) {\n this._isDirty = true;\n\n // @ts-expect-error - type of the event.target is unknown\n if (!this.tabs.includes(event.target)) return;\n\n const isArrowLeft = event.key === 'ArrowLeft';\n const isArrowRight = event.key === 'ArrowRight';\n\n if (!isArrowRight && !isArrowLeft) return;\n\n const tabIndex = this._getTabIndex(this._focusedTabValue);\n\n const firstAvailableValue = this.availableValues.at(0);\n const lastAvailableValue = this.availableValues.at(-1);\n\n const isBeginning = this._focusedTabValue === firstAvailableValue;\n const isEnd = this._focusedTabValue === lastAvailableValue;\n\n const nextValue = isEnd\n ? firstAvailableValue\n : this.availableValues[tabIndex + 1];\n\n const previousValue = isBeginning\n ? lastAvailableValue\n : this.availableValues[tabIndex - 1];\n\n if (isArrowLeft) {\n if (isBeginning) return;\n\n this._focusTab(previousValue);\n }\n\n if (isArrowRight) {\n if (isEnd) return;\n this._focusTab(nextValue);\n }\n }\n\n private get _prefersReducedMotion() {\n return (\n window.matchMedia('(prefers-reduced-motion: reduce)').matches ||\n this.disableAnimation\n );\n }\n\n private get _tabItems() {\n return this.el.querySelector(\n ':scope > c-tab-items',\n ) as HTMLCTabItemsElement;\n }\n\n private get _tabButtons() {\n return this.el.querySelector(\n ':scope > c-tab-buttons',\n ) as HTMLCTabButtonsElement;\n }\n\n private _intersectionObserver = new IntersectionObserver(\n ([entry]) => {\n if (entry.isIntersecting) {\n setTimeout(() => {\n this._handleOverflow();\n }, 1000);\n }\n },\n { threshold: 1 },\n );\n\n private _updateItemsValue() {\n this.tabItems.value = this.value;\n\n if (this._tabButtons) {\n this._tabButtons.value = this.value;\n }\n }\n\n componentWillLoad() {\n CTabs._uniqueId += 1;\n\n this._tabItems.disableAnimation = this._prefersReducedMotion;\n\n // if tab buttons are used, mark them as tab controller\n if (this._tabButtons) {\n this.el.classList.add('c-tabs--buttons');\n this._tabButtons.setAttribute('tabs', 'true');\n }\n\n this._updateItemsValue();\n }\n\n componentDidLoad() {\n this._resizeObserver = new ResizeObserver((entries) => {\n this._handleResize(entries[0].contentRect.width);\n });\n\n this._resizeObserver.observe(this.el);\n\n this._intersectionObserver.observe(this.el);\n\n this.el.style.setProperty('--_c-tabs-count', this.setsize.toString());\n\n requestAnimationFrame(() => {\n this._handleOverflow();\n });\n }\n\n disconnectedCallback() {\n this._intersectionObserver.disconnect();\n }\n\n get tabs() {\n if (!!this._tabButtons) {\n return Array.from(\n this._tabButtons.querySelectorAll(':scope > c-button'),\n ) as HTMLCButtonElement[];\n }\n\n return Array.from(\n this.el.querySelectorAll(':scope > c-tab'),\n ) as HTMLCTabElement[];\n }\n\n get tabItems() {\n return this.el.querySelector('c-tab-items') as HTMLCTabItemsElement;\n }\n\n get setsize() {\n return this.tabs.length;\n }\n\n get availableValues() {\n return this.tabs.map((tab) => tab.value);\n }\n\n private _previousWidth = 0;\n\n private _getTabIndex(value: string | number) {\n return this.availableValues.findIndex((tab) => tab === value);\n }\n\n private _setIndicatorTop(value: number) {\n const container = this.el.shadowRoot.querySelector(\n '.c-tabs__tabs',\n ) as HTMLDivElement;\n\n container.style.setProperty('--_c-tabs-indicator-top', `${value}px`);\n }\n\n private _setIndicatorLeft(value: number) {\n const container = this.el.shadowRoot.querySelector(\n '.c-tabs__tabs',\n ) as HTMLDivElement;\n\n container.style.setProperty('--_c-tabs-indicator-left', `${value}px`);\n }\n\n private _setIndicatorWidth(value: number) {\n const container = this.el.shadowRoot.querySelector(\n '.c-tabs__tabs',\n ) as HTMLDivElement;\n\n container.style.setProperty('--_c-tabs-indicator-width', value.toString());\n }\n\n private _handleActiveTab() {\n requestAnimationFrame(() => {\n let position = 0;\n\n const oldTab =\n (this.el.querySelector('[aria-selected=\"true\"]') as HTMLCTabElement) ??\n this.tabs[0];\n\n this.tabs.forEach(\n (tab: HTMLCTabElement | HTMLCButtonElement, index: number) => {\n if (!tab.disabled) {\n position += 1;\n }\n\n const isActive = tab.value === this.value;\n\n const tabId = `c-tab-${CTabs._uniqueId}-${index + 1}`;\n\n const tabItemId = `c-tab-item-${CTabs._uniqueId}-${index + 1}`;\n\n tab.setAttribute('id', tabId);\n tab.setAttribute('aria-controls', tabItemId);\n\n if (!this._tabButtons) {\n (tab as HTMLCTabElement).active = isActive;\n } else if (isActive) {\n this._tabButtons.value = tab.value;\n }\n\n const item = (\n Array.from(\n this.tabItems.querySelectorAll(':scope > c-tab-item'),\n ) as HTMLCTabItemElement[]\n ).find((child) => child.value === tab.value);\n\n item.setAttribute('disabled', (!!tab.disabled).toString());\n\n item.setAttribute('id', tabItemId);\n item.setAttribute('aria-labelledby', tabId);\n item.active = isActive;\n item.setAttribute('active', isActive.toString());\n\n if (!tab.disabled) {\n tab.setAttribute('aria-posinset', position.toString());\n tab.setAttribute('setsize', this.availableValues.length.toString());\n }\n\n if (isActive && !this._tabButtons) {\n this._moveIndicator(\n oldTab as HTMLCTabElement,\n tab as HTMLCTabElement,\n );\n\n requestAnimationFrame(() => {\n if (!this.isOverflowing) return;\n\n const selectedTab = this.el.querySelector(\n 'c-tab[aria-selected=\"true\"]',\n ) as HTMLCTabElement;\n\n this._moveToTab(selectedTab);\n\n this._tabsTabsElement.style.setProperty(\n '--_c-tabs-transition-speed',\n '200ms',\n );\n });\n }\n\n if (isActive && this._isDirty) {\n tab.focus();\n }\n },\n );\n });\n }\n\n private _maxScrollOffset = 0;\n\n private _getDimensions(item: HTMLCTabElement) {\n const { x, width } = item.getBoundingClientRect();\n\n const { x: containerX, width: containerWidth } =\n this._tabsTabsElement.getBoundingClientRect();\n\n const { x: scrollerX, width: scrollerWidth } =\n this._tabsScrollElement.getBoundingClientRect();\n\n return {\n x,\n width,\n containerWidth,\n containerX,\n scrollerX,\n scrollerWidth,\n };\n }\n\n private _focusTab(value: string | number) {\n if (this._tabButtons) {\n return;\n }\n\n requestAnimationFrame(() => {\n const item = this.tabs.find(\n (tab) => tab.value === value,\n ) as HTMLCTabElement;\n\n const { x, width, containerX, containerWidth } =\n this._getDimensions(item);\n\n const isInView =\n x >= containerX && x + width <= containerX + containerWidth;\n\n if (isInView) {\n item?.focus();\n\n return;\n }\n\n this._moveToTab(item);\n });\n }\n\n private _handleResize(width: number) {\n if (this._moveDebounce !== null) return;\n\n if (this._debounce !== null) {\n clearTimeout(this._debounce);\n this._debounce = null;\n }\n\n this._debounce = setTimeout(() => {\n const content = this.el.shadowRoot.querySelector('.c-tabs__scroll');\n const container = this.el.shadowRoot.querySelector('.c-tabs__tabs');\n\n requestAnimationFrame(() => {\n if (width === this._previousWidth) return;\n this._handleOverflow();\n\n this.isMobile = width < this.mobileBreakpoint;\n\n this._maxScrollOffset =\n -1 * (content.scrollWidth - container.clientWidth);\n\n this._handleActiveTab();\n this._previousWidth = width;\n });\n }, 200);\n }\n\n private _moveIndicator(oldTab: HTMLCTabElement, newTab: HTMLCTabElement) {\n if (this._moveDebounce !== null) return;\n\n this._moveDebounce = setTimeout(() => {\n requestAnimationFrame(() => {\n const content = this.el.shadowRoot.querySelector(\n '.c-tabs__scroll',\n ) as HTMLDivElement;\n\n const container = this.el.shadowRoot.querySelector(\n '.c-tabs__tabs',\n ) as HTMLDivElement;\n\n if (this._initialized && !this._prefersReducedMotion) {\n container.style.setProperty('--_c-tabs-transition-speed', '200ms');\n }\n\n const buttonOffset = this.isOverflowing ? 32 : 0;\n\n const newTabWidth = newTab.offsetWidth / content.offsetWidth;\n\n const newTabHeight = this.vertical\n ? newTab.offsetHeight / content.offsetHeight\n : newTab.offsetHeight / content.offsetHeight;\n\n const newTabPosition = oldTab.compareDocumentPosition(newTab);\n\n let transitionWidth = 0;\n\n // if the new tab is to the right of down\n if (newTabPosition === ScrollDirection.Right) {\n transitionWidth = this.vertical\n ? newTab.offsetTop + newTab.offsetHeight - oldTab.offsetTop\n : newTab.offsetLeft + newTab.offsetWidth - oldTab.offsetLeft;\n } else {\n // if the tab is to the left or top\n transitionWidth = this.vertical\n ? oldTab.offsetTop + oldTab.offsetHeight - newTab.offsetTop\n : oldTab.offsetLeft + oldTab.offsetWidth - newTab.offsetLeft;\n\n this._setIndicatorLeft(newTab.offsetLeft - buttonOffset);\n this._setIndicatorTop(newTab.offsetTop - buttonOffset);\n }\n\n this._setIndicatorWidth(\n this.vertical\n ? transitionWidth / content.offsetHeight\n : transitionWidth / content.offsetWidth,\n );\n\n const onTransitionEnd = (event) => {\n if (event.propertyName !== 'scale') return;\n\n this._setIndicatorLeft(newTab.offsetLeft - buttonOffset);\n this._setIndicatorTop(newTab.offsetTop - buttonOffset);\n\n this._setIndicatorWidth(this.vertical ? newTabHeight : newTabWidth);\n\n content.removeEventListener('transitionend', onTransitionEnd);\n\n if (!this._initialized) {\n this.el.classList.add('c-tabs--initialized');\n }\n\n this._initialized = true;\n };\n\n content.addEventListener('transitionend', onTransitionEnd);\n });\n\n clearTimeout(this._moveDebounce);\n this._moveDebounce = null;\n }, 200);\n }\n\n private _startX = 0;\n\n private _touchOffset = 0;\n\n @State() isOverflowing = false;\n\n @State() isMobile = false;\n\n @State() scrollOffset = 0;\n\n @Watch('scrollOffset')\n onScrollOffsetChange(offset) {\n this._tabsTabsElement.style.setProperty(\n '--_c-tabs-scroll-position-x',\n `${offset}px`,\n );\n }\n\n private _handleOverflow() {\n if (this._tabButtons) {\n this.isOverflowing = false;\n\n return;\n }\n\n const content = this.el.shadowRoot.querySelector('.c-tabs__scroll');\n const container = this.el.shadowRoot.querySelector('.c-tabs__tabs');\n\n const contentSize = content.scrollWidth;\n const containerSize = container.clientWidth;\n\n this.isOverflowing = containerSize + 1 < contentSize;\n }\n\n private _onTouchEnd() {\n this._tabsTabsElement.style.setProperty(\n '--_c-tabs-transition-speed',\n '200ms',\n );\n }\n\n private _onTouchMove(event: TouchEvent) {\n if (this.vertical) return;\n\n event.preventDefault();\n\n this._tabsTabsElement.style.setProperty(\n '--_c-tabs-transition-speed',\n '0ms',\n );\n\n const offset =\n -1 * (this._touchOffset + this._startX - event.touches[0].clientX);\n\n const isInRange = offset <= 0 && offset >= this._maxScrollOffset;\n\n if (isInRange) {\n this.scrollOffset = offset;\n } else if (offset > 0 || !this.isOverflowing) {\n this.scrollOffset = 0;\n } else if (offset < this._maxScrollOffset) {\n this.scrollOffset = this._maxScrollOffset;\n }\n }\n\n private _onTouchStart(event: TouchEvent) {\n this._handleOverflow();\n\n if (!this.isOverflowing) return;\n\n this._touchOffset = this.scrollOffset * -1;\n this._startX = event.touches[0].clientX;\n }\n\n private _onBackClick() {\n const min = 0;\n\n const step = this._tabsTabsElement.clientWidth / 2;\n\n this.scrollOffset = Math.min(this.scrollOffset + step, min);\n }\n\n private _onForwardClick() {\n const max =\n (this._tabsScrollElement.scrollWidth -\n this._tabsTabsElement.clientWidth) *\n -1;\n\n const step = this._tabsTabsElement.clientWidth / 2;\n\n this.scrollOffset = Math.max(-1 * step + this.scrollOffset, max);\n }\n\n private _moveToTab(tab: HTMLCTabElement) {\n const onTransitionEnd = () => {\n tab?.focus();\n\n this._tabsScrollElement.removeEventListener(\n 'transitionend',\n onTransitionEnd,\n );\n };\n\n requestAnimationFrame(() => {\n const tabIndex = this._getTabIndex(tab.dataset.value);\n const isFirstTab = tabIndex === 0;\n const isLastTab = tabIndex === this.availableValues.length - 1;\n\n if (isFirstTab) {\n this.scrollOffset = 0;\n\n return;\n }\n\n if (isLastTab) {\n this.scrollOffset = this._maxScrollOffset - 8;\n\n return;\n }\n\n const { x, width, containerWidth, containerX } = this._getDimensions(tab);\n\n const tabEnd = x + width;\n const containerEnd = containerX + containerWidth;\n\n const isOverflowingStart = x < containerX;\n const isOverflowingEnd = tabEnd > containerEnd;\n\n if (isOverflowingStart) {\n const tabInside = tabEnd - containerX;\n const tabOutside = tabInside - width;\n\n this.scrollOffset = this.scrollOffset - tabOutside + 4;\n }\n\n if (isOverflowingEnd) {\n this.scrollOffset -= tabEnd - containerEnd + 4;\n }\n });\n\n const content = this.el.shadowRoot.querySelector('.c-tabs__scroll');\n\n content.addEventListener('transitionend', onTransitionEnd);\n }\n\n render() {\n const classes = {\n 'c-tabs': true,\n 'c-tabs--borderless': this.borderless,\n 'c-tabs--vertical': this.vertical,\n 'c-tabs--overflow': this.isOverflowing,\n 'c-tabs--mobile': this.isMobile,\n [`c-tabs--justify-${this.justify}`]: true,\n };\n\n return (\n <Host role=\"tablist\" class={classes}>\n <div class=\"c-tabs__container\">\n {this.isOverflowing && !this.vertical && (\n <c-icon-button\n size=\"x-small\"\n ghost\n onClick={this._onBackClick.bind(this)}\n >\n <c-icon path={mdiArrowLeft}></c-icon>\n </c-icon-button>\n )}\n\n <div\n ref={(el) => (this._tabsTabsElement = el)}\n class=\"c-tabs__tabs\"\n onTouchStart={this._onTouchStart.bind(this)}\n onTouchMove={this._onTouchMove.bind(this)}\n onTouchEnd={this._onTouchEnd.bind(this)}\n >\n <div\n ref={(el) => (this._tabsScrollElement = el)}\n class=\"c-tabs__scroll\"\n >\n <slot></slot>\n </div>\n </div>\n\n {this.isOverflowing && !this.vertical && (\n <c-icon-button\n size=\"x-small\"\n ghost\n onClick={this._onForwardClick.bind(this)}\n >\n <c-icon path={mdiArrowRight}></c-icon>\n </c-icon-button>\n )}\n </div>\n\n <div class=\"c-tabs__content\">\n <slot name=\"items\"></slot>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -11,16 +11,16 @@
11
11
  --c-accent-900: #005047ff;
12
12
  --c-black: #000000ff;
13
13
  --c-black-rgb: 0, 0, 0;
14
- --c-error-100: #f8e6e9ff;
15
- --c-error-200: #f1cdd4ff;
16
- --c-error-300: #e39ca9ff;
17
- --c-error-400: #d56a7fff;
18
- --c-error-500: #c73954ff;
19
- --c-error-600: #b90729ff;
20
- --c-error-rgb: 185, 7, 41;
21
- --c-error-700: #940621ff;
22
- --c-error-800: #6f0419ff;
23
- --c-error-900: #4a0310ff;
14
+ --c-error-100: #fce7e7ff;
15
+ --c-error-200: #f8ceceff;
16
+ --c-error-300: #f19e9eff;
17
+ --c-error-400: #eb6d6dff;
18
+ --c-error-500: #e43d3dff;
19
+ --c-error-600: #dd0c0cff;
20
+ --c-error-rgb: 221, 12, 12;
21
+ --c-error-700: #ae0909ff;
22
+ --c-error-800: #7e0707ff;
23
+ --c-error-900: #4d0404ff;
24
24
  --c-info-100: #e5f2f8ff;
25
25
  --c-info-200: #cce6f1ff;
26
26
  --c-info-300: #99cde4ff;
@@ -10,16 +10,16 @@ $c-accent-800: #00776bff;
10
10
  $c-accent-900: #005047ff;
11
11
  $c-black: #000000ff;
12
12
  $c-black-rgb: 0, 0, 0;
13
- $c-error-100: #f8e6e9ff;
14
- $c-error-200: #f1cdd4ff;
15
- $c-error-300: #e39ca9ff;
16
- $c-error-400: #d56a7fff;
17
- $c-error-500: #c73954ff;
18
- $c-error-600: #b90729ff;
19
- $c-error-rgb: 185, 7, 41;
20
- $c-error-700: #940621ff;
21
- $c-error-800: #6f0419ff;
22
- $c-error-900: #4a0310ff;
13
+ $c-error-100: #fce7e7ff;
14
+ $c-error-200: #f8ceceff;
15
+ $c-error-300: #f19e9eff;
16
+ $c-error-400: #eb6d6dff;
17
+ $c-error-500: #e43d3dff;
18
+ $c-error-600: #dd0c0cff;
19
+ $c-error-rgb: 221, 12, 12;
20
+ $c-error-700: #ae0909ff;
21
+ $c-error-800: #7e0707ff;
22
+ $c-error-900: #4d0404ff;
23
23
  $c-info-100: #e5f2f8ff;
24
24
  $c-info-200: #cce6f1ff;
25
25
  $c-info-300: #99cde4ff;
@@ -14,16 +14,16 @@ export const theme = {
14
14
  },
15
15
  black: "#000000ff",
16
16
  error: {
17
- 100: "#f8e6e9ff",
18
- 200: "#f1cdd4ff",
19
- 300: "#e39ca9ff",
20
- 400: "#d56a7fff",
21
- 500: "#c73954ff",
22
- 600: "#b90729ff",
23
- 700: "#940621ff",
24
- 800: "#6f0419ff",
25
- 900: "#4a0310ff",
26
- DEFAULT: "#b90729ff",
17
+ 100: "#fce7e7ff",
18
+ 200: "#f8ceceff",
19
+ 300: "#f19e9eff",
20
+ 400: "#eb6d6dff",
21
+ 500: "#e43d3dff",
22
+ 600: "#dd0c0cff",
23
+ 700: "#ae0909ff",
24
+ 800: "#7e0707ff",
25
+ 900: "#4d0404ff",
26
+ DEFAULT: "#dd0c0cff",
27
27
  },
28
28
  info: {
29
29
  100: "#e5f2f8ff",
package/package.json CHANGED
@@ -91,5 +91,5 @@
91
91
  },
92
92
  "types": "dist/types/index.d.ts",
93
93
  "unpkg": "dist/csc-ui/csc-ui.esm.js",
94
- "version": "1.0.17"
94
+ "version": "1.0.18"
95
95
  }
@@ -1,2 +0,0 @@
1
- import{r as t,c as i,h as e,H as n,g as o}from"./p-565ec8e4.js";import{c as s}from"./p-5461ca29.js";const r="html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;-webkit-tap-highlight-color:transparent}:host{font-family:var(--c-font-family)}::-ms-reveal{display:none}:host(c-dropdown){--_c-dropdown-background-color:var(\n --c-dropdown-background-color,\n var(--c-white)\n );--_c-dropdown-background-color-hover:var(\n --c-dropdown-background-color-hover,\n var(--c-primary-200)\n );--_c-dropdown-text-color:var(--c-dropdown-text-color, var(--c-text-body));--_c-dropdown-text-color-active:var(\n --c-dropdown-text-color-active,\n var(--c-primary-600)\n );--_c-dropdown-font-size:14px;--_c-dropdown-height:42px;display:block;position:relative}:host(c-dropdown) mark{background-color:transparent;box-shadow:0 2px 0 0 var(--_c-dropdown-text-color-active);color:inherit}:host(c-dropdown) dialog{background-color:white;border-radius:4px;border:none;box-shadow:2px 4px 10px rgba(0, 0, 0, 0.1607843137);margin:-4px 0 0;overflow:hidden;padding:4px 0 0;position:fixed}:host(c-dropdown) dialog::backdrop{display:none}:host(c-dropdown) dialog[open].mobile{width:100vw;max-width:100vw;height:100vh;max-height:100svh;inset:0}:host(c-dropdown) dialog[open].mobile .input-top-wrapper{padding:8px}:host(c-dropdown) dialog .input-bottom-wrapper.active{padding-top:8px}:host(c-dropdown) .dummy{display:none}:host(c-dropdown) ul{background-color:var(--_c-dropdown-background-color);border-radius:4px;list-style:none;margin:0;outline:none;padding:0;pointer-events:auto;visibility:hidden;width:100%;height:max-content;overflow-y:scroll}:host(c-dropdown) ul.active{visibility:visible;animation:0.2s 1 fade-in cubic-bezier(0.25, 0.8, 0.5, 1)}:host(c-dropdown) ul.active.mobile{width:100vw;max-width:100vw;height:100vh;max-height:calc(100svh - 60px)}:host(c-dropdown) li{align-items:center;column-gap:12px;cursor:pointer;display:flex;flex-wrap:nowrap;font-size:var(--_c-dropdown-font-size);min-height:var(--_c-dropdown-height);outline:none;padding-left:10px;padding-right:10px;pointer-events:auto;white-space:nowrap;width:100%;border-radius:4px}:host(c-dropdown) li span,:host(c-dropdown) li c-option-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}:host(c-dropdown) li:not(.disabled):hover,:host(c-dropdown) li:not(.disabled):focus,:host(c-dropdown) li.active{background:var(--_c-dropdown-background-color-hover);color:var(--_c-dropdown-text-color-active);box-shadow:inset 0 0 0 1px var(--_c-dropdown-text-color-active)}:host(c-dropdown) li.disabled{background-color:rgba(var(--c-tertiary-rgb), 0.05);cursor:default;filter:grayscale(1) opacity(0.75)}:host(c-dropdown) .visuallyhidden{border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}@keyframes fade-in{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}";const a=class{constructor(n){t(this,n);this.selectOption=i(this,"selectOption",7);this.dropdownStateChange=i(this,"dropdownStateChange",7);this._debounce=null;this._isMobile=false;this._listItems=[];this._inputSize={height:0,width:0};this._openedOnTop=false;this._hideDetails=false;this._emptyItem=e("li",null,e("c-icon",{path:s,size:18,color:"var(--c-warning-600)"}),"No suggestions found");this.itemsPerPage=undefined;this.parent=undefined;this.items=undefined;this.index=undefined;this.hostId=undefined;this.type=undefined;this.itemType=undefined;this.renderedList=null;this.isOpen=false;this.statusText=""}optionsWatcher(){requestAnimationFrame((()=>{this.renderedList=this._renderList()}))}stateWatcher(){this.dropdownStateChange.emit(this.isOpen)}handleIndexChange(t){requestAnimationFrame((()=>{this._updateStatusText();this._listItems.forEach(((i,e)=>{i===null||i===void 0?void 0:i.classList.toggle("active",t===e);if(t===e){i===null||i===void 0?void 0:i.focus()}}))}))}async setStatusText(t){requestAnimationFrame((()=>{this.statusText=t}))}async focusItem(t){requestAnimationFrame((()=>{var i;(i=this._listItems[t])===null||i===void 0?void 0:i.focus()}))}async open(){if(this._dialog.open)return;this._outsideClickFn=this._handleOutsideClick.bind(this);window.addEventListener("click",this._outsideClickFn);requestAnimationFrame((()=>{this.isOpen=true;this._positionMenu()}))}async close(){this._dialog.close();this.isOpen=false;this._inputElement.slot="default";this._inputElement.hideDetails=this._hideDetails;this._dummyElement.style.width="0";this._dummyElement.style.display="none";this._dialog.style.width="0";window.removeEventListener("click",this._outsideClickFn)}_setIsMobile(){this._isMobile=window.matchMedia("only screen and (max-width: 760px)").matches}componentDidLoad(){this._setIsMobile();this._hideDetails=this.parent.hideDetails;this._inputElement=this.el.querySelector("c-input");this._resizeObserver=new ResizeObserver((t=>{requestAnimationFrame((()=>{if(!Array.isArray(t)||!t.length)return;this._setIsMobile();if(!this._dialog.open)return;this.close()}))}));this._resizeObserver.observe(window.document.body);requestAnimationFrame((()=>{this.renderedList=this._renderList()}))}async selectItem(t){const i=this._listItems[t];if(i.classList.contains("disabled")){return true}this._listItems[t].click();return false}async updateList(){requestAnimationFrame((()=>{this.renderedList=this._renderList()}))}_handleOutsideClick(t){if(!this.isOpen)return;if(!t.composedPath().includes(this._dialog)){this.close()}}_highlightMatchingText(t){const{query:i}=this.parent;if(this.parent.tagName==="C-SELECT"||i==="")return t;const e=new RegExp(i,"gi");const n=t.replace(/(<([^>]+)>)/gi,"").replace(e,(t=>`<mark>${t}</mark>`));return n}_getParentPosition(){return this.parent.shadowRoot.querySelector(".c-input__slot").getBoundingClientRect()}_positionMenu(){const{innerWidth:t,innerHeight:i}=window;this._dialog.style.width="auto";this._dialog.style.opacity="0";this._dialog.showModal();requestAnimationFrame((()=>{let e="input-top";if(!this._isMobile){const{top:n,width:o}=this._getParentPosition();const s=this.el.getBoundingClientRect();this._inputSize={height:s.height,width:s.width};this._dialog.style.width=`${o}px`;this._dialog.style.top=`${s.top}px`;this._dialog.style.bottom="auto";this._dialog.style.left=`${s.left}px`;const{bottom:r,right:a,height:l}=this._dialog.getBoundingClientRect();const h={x:a<t,y:r<i};const c=n-l>0;if(!c&&!h.y){this._dialog.style.maxHeight=`${n}px`}if(!h.y||this._openedOnTop){this._openedOnTop=true;this._inputElement.hideDetails=true;e="input-bottom";this._dialog.style.top="auto";this._dialog.style.bottom=`${i-s.top-44}px`;this._inputElement.scrollIntoView()}this._dummyElement.style.width=`${this._getParentPosition().width}px`;this._dummyElement.style.height=`${this._inputSize.height}px`;this._dummyElement.style.display="block"}this._dummyElement.slot="default";this._inputElement.slot=e;this._inputElement.hideDetails=true;this._dialog.style.opacity="1";const n=this.parent.shadowRoot.querySelector("input");n.focus()}))}_renderList(){return this.itemType==="option"?this._renderOptionsList():this._renderItemsList()}_renderOptionsList(){if(!this.items.length)return this._emptyItem;const t=Array.from(this.items);this._listItems.length=0;return t.map(((t,i)=>{const n=t.querySelector("c-option-value");if(n){n.innerHTML=this._highlightMatchingText(n.textContent)}return e("li",{ref:t=>this._listItems.push(t),id:`${this.hostId}-option-${t.value}`,tabindex:"-1",role:"option","aria-set-size":this.items.length.toString(),"aria-pos-in-set":(i+1).toString(),"aria-selected":(!!t.selected).toString(),class:{disabled:!!t.disabled},"data-name":t.name,onClick:i=>{if(t.disabled){i.preventDefault();return}this.selectOption.emit({name:t.name,value:t.value})},innerHTML:t.outerHTML})}))}_renderItemsList(){if(!this.items.length)return this._emptyItem;this._listItems.length=0;return this.items.map(((t,i)=>e("li",{ref:t=>this._listItems.push(t),id:`${this.hostId}-option-${t.value}`,tabindex:"-1",role:"option","aria-set-size":this.items.length.toString(),"aria-pos-in-set":(i+1).toString(),"aria-selected":(this.index===i).toString(),class:{disabled:!!t.disabled},"data-name":t.name,onClick:i=>{if(t.disabled){i.preventDefault();return}this.selectOption.emit({name:t.name,value:t.value})}},e("span",{innerHTML:this._highlightMatchingText(t.name)}))))}_updateStatusText(){if(this._debounce!==null){clearTimeout(this._debounce);this._debounce=null}this._debounce=window.setTimeout((()=>{var t;const i=this._listItems[this.index];const e=!!this.items.length?", to navigate use up and down arrows":"";const n=this._listItems.length;const o=this.index+1;const s=!!((t=i===null||i===void 0?void 0:i.classList)===null||t===void 0?void 0:t.contains("disabled"));const r=s?"Disabled option - ":"";let a=!!i?`${r}${i.dataset.name} - ${o} of ${n} is highlighted`:null;if(this.index===null&&this.type==="autocomplete"){a=this.items.length?`${this.items.length} result${this.items.length!==1?"s":""} available`:"No search results available"}this.statusText=`${a||e}`;this._debounce=null}),1400)}render(){if(!this._isMobile&&this._dialog&&this.itemsPerPage&&this.itemsPerPage>0&&this.items.length>this.itemsPerPage){this._dialog.style.maxHeight=42*(this.itemsPerPage+.5)+60+"px";this._list.style.maxHeight=42*(this.itemsPerPage+.5)+"px"}return e(n,null,e("slot",{name:"default"}),e("div",{class:"dummy",ref:t=>this._dummyElement=t}),e("dialog",{tabindex:"-1",ref:t=>this._dialog=t,class:{mobile:this._isMobile},onCancel:()=>this.close()},e("div",{id:"announce-"+this.hostId,class:"visuallyhidden","aria-live":"polite","aria-atomic":"true"},this.statusText),e("div",{class:"input-top-wrapper"},e("slot",{name:"input-top"})),e("ul",{ref:t=>this._list=t,id:`${this.hostId}--results`,role:"listbox","aria-expanded":this.isOpen.toString(),class:{active:this.isOpen,mobile:this._isMobile},tabindex:"-1"},this.renderedList),e("div",{class:{active:this._openedOnTop,"input-bottom-wrapper":true}},e("slot",{name:"input-bottom"}))))}get el(){return o(this)}static get watchers(){return{items:["optionsWatcher"],isOpen:["stateWatcher"],index:["handleIndexChange"]}}};a.style=r;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}:host(c-input){--_c-input-inactive-color:var(--c-tertiary-600);--_c-input-active-color:var(--c-primary-600);--_c-input-background-color:var(--c-transparent);--_c-input-text-color:var(--c-text-body);--_c-input-placeholder-color:var(--c-tertiary-500);--_c-input-shadow-active-color:var(--_c-input-active-color);--_c-input-shadow-background-color:var(--c-white);--_c-input-shadow-text-color:var(--_c-input-text-color);--_c-input-shadow-placeholder-color:var(--_c-input-placeholder-color);--_c-input-error-color:var(--c-error-600)}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.c-input{--_c-input-border-width:1px;align-items:flex-start;border-radius:4px;display:flex;flex:1 1 auto;font-family:var(--c-font-family);font-size:16px;letter-spacing:normal;max-width:100%;text-align:left}.c-input input,.c-input select,.c-input textarea{background:none;border:0;display:inline-block;font-family:var(--c-font-family);font-size:16px;line-height:1;margin:0;padding:0;vertical-align:middle;white-space:normal}.c-input input,.c-input textarea{box-sizing:content-box;background-color:transparent;border:none;color:var(--_c-input-text-color);flex:1 1 auto;font-family:var(--c-font-family);font-size:16px;line-height:20px;max-width:100%;min-width:0;width:100%}.c-input input[type=checkbox],.c-input input[type=radio],.c-input select{box-sizing:border-box}.c-input input[type=search]{appearance:textfield;box-sizing:content-box}.c-input ::-webkit-search-decoration{display:none}.c-input textarea{margin-top:4px;min-height:44px;overflow:auto;padding:8px 12px 8px 0;resize:vertical;vertical-align:top}.c-input input{max-height:32px;padding:8px 0}.c-input input:focus,.c-input input:active,.c-input input[aria-expanded=true],.c-input textarea:focus,.c-input textarea:active{outline:none}.c-input .c-input__content{align-items:center;display:flex;width:100%}.c-input .c-input__content slot{display:none}.c-input .c-input__content c-icon-button{aspect-ratio:1;margin-right:-6px}.c-input__control{border-radius:inherit;color:currentColor;display:flex;flex-flow:column wrap;flex-grow:1;gap:8px;height:auto;min-width:0;width:100%;position:relative}.c-input__slot{align-items:stretch;background:transparent;border-radius:inherit;color:inherit;cursor:text;display:flex;min-height:44px;padding:0 12px;position:relative;transition:0.3s cubic-bezier(0.25, 0.8, 0.5, 1);width:100%}.c-input__field{align-items:center;display:flex;flex:1 1 auto;gap:8px;position:relative}.c-input__field input,.c-input__field textarea{flex:1;outline:0}.c-input__field label{font-size:16px;height:20px;left:0;letter-spacing:normal;line-height:20px;max-width:90%;min-height:8px;overflow:hidden;pointer-events:none;position:absolute;right:auto;text-overflow:ellipsis;top:12px;transform-origin:top left;transform:translateX(var(--_c-input-label-position)) translateY(0) scale(1);transition:0.3s cubic-bezier(0.25, 0.8, 0.5, 1);white-space:nowrap}.c-input__field label.active{transform:translateY(-18px) scale(0.75)}.c-input__field label span{color:var(--_c-input-error-color)}.c-input--select input{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-input--select .c-input__slot{cursor:pointer}.c-input fieldset{background-color:var(--_c-input-background-color);border-collapse:collapse;border-color:var(--_c-input-inactive-color);border-radius:inherit;border-style:solid;border-width:var(--_c-input-border-width);inset:0;margin:0;padding:0 0 0 8px;pointer-events:none;position:absolute;transition-duration:0.15s;transition-property:color;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1)}.c-input fieldset legend{float:none;line-height:11px;margin-left:-1px;padding:0;text-align:left;transition:width 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);width:0}.c-input fieldset legend.active{width:var(--_c-input-legend-width)}.c-input--shadow .c-input__slot{background-color:var(--_c-input-shadow-background-color);box-shadow:rgba(0, 0, 0, 0.15) 0 5px 15px 0}.c-input--shadow .c-input__slot input,.c-input--shadow .c-input__slot textarea{color:var(--_c-input-shadow-text-color)}.c-input--shadow .c-input__slot:focus-within{outline:2px var(--_c-input-active-color) solid}.c-input--shadow .c-input__slot:focus-within c-icon{--c-icon-color:var(--_c-input-shadow-active-color) !important}.c-input--shadow input::placeholder,.c-input--shadow textarea::placeholder{color:var(--_c-input-shadow-placeholder-color);opacity:1}.c-input--disabled input,.c-input--disabled textarea,.c-input--disabled fieldset,.c-input--disabled label{--_c-input-error-color:var(--c-tertiary-500);color:var(--c-tertiary-500)}.c-input--textarea .c-input__field{margin-right:-12px}.c-input ::placeholder{color:var(--_c-input-placeholder-color);opacity:1}.c-input:focus-within,.c-input--active,.c-input:not(.c-input--disabled):active{--_c-input-border-width:2px;color:var(--_c-input-active-color)}.c-input:focus-within fieldset,.c-input--active fieldset,.c-input:not(.c-input--disabled):active fieldset{border-color:var(--_c-input-active-color)}.c-input:focus-within label,.c-input--active label,.c-input:not(.c-input--disabled):active label{color:var(--_c-input-active-color);transform:translateX(0) translateY(-18px) scale(0.75)}.c-input:focus-within legend,.c-input--active legend,.c-input:not(.c-input--disabled):active legend{width:var(--_c-input-legend-width)}.c-input.active:not(.filled) .c-input-menu__input{position:relative}.c-input.active:not(.filled) .c-input-menu__input::after{display:flex;align-items:center;position:absolute;inset:0;content:attr(data-placeholder);pointer-events:none;color:var(--_c-input-placeholder-color)}.c-input--error{color:var(--_c-input-error-color)}.c-input--error fieldset{border-color:var(--_c-input-error-color) !important}.c-input--error label{color:var(--_c-input-error-color) !important}.c-input--error:focus-within{color:var(--_c-input-error-color)}";const h=class{constructor(e){t(this,e);this.changeValue=i(this,"changeValue",3);this.itemClick=i(this,"itemClick",3);this.dropdownClose=i(this,"dropdownClose",3);this._hasBlurred=false;this._debounce=null;this._observer=new IntersectionObserver(((t,i)=>{t.forEach((t=>{if(t.isIntersecting){this._calculateElementWidths();i.unobserve(t.target)}}))}),{threshold:1});this._onBlur=()=>{setTimeout((()=>{if(!this.active){this.isFocused=false;this._hasBlurred=true}this._onReset()}),100)};this._onFocus=(t=true)=>{var i,e;if(this.disabled)return;this.isFocused=true;(i=this.inputField)===null||i===void 0?void 0:i.focus();if(t){(e=this.inputField)===null||e===void 0?void 0:e.click();if(this.variant==="select"){this.itemClick.emit()}}if(this.inputField){this.inputField.placeholder=!!this.value||!this.placeholder?"":this.placeholder}};this.active=false;this.autofocus=false;this.disabled=false;this.form=false;this.hideDetails=false;this.hint="";this.hostId=undefined;this.inputId=undefined;this.items=undefined;this.itemsPerPage=6;this.label=undefined;this.max=null;this.min=null;this.name=undefined;this.placeholder=undefined;this.readonly=false;this.required=false;this.rows=1;this.shadow=false;this.step=null;this.type=undefined;this.valid=true;this.validate=false;this.validateOnBlur=false;this.validation="Required field";this.value=undefined;this.variant="text";this.isFocused=false;this.labelWidth=0;this.preSlotWidth=0;this.statusText="";this.currentIndex=null}onValidChange(){if(this.validateOnBlur&&!this._hasBlurred)return;this._setAriaDescriptionId()}onValidationMessageChange(){this._updateStatusText()}onValueChange(t){if(!t){this._onReset()}}onPlaceholderChange(t){if(t)this._onReset()}async reset(){this._onReset()}componentDidLoad(){var t,i,e,n;if(this.autofocus){setTimeout((()=>{this._onFocus(false)}),500)}this._calculateElementWidths();this._setAriaDescriptionId();if(this.label){this._observer.observe(this._labelRef)}(t=this.inputField)===null||t===void 0?void 0:t.addEventListener("focus",(()=>this._onFocus(false)));(i=this.inputField)===null||i===void 0?void 0:i.addEventListener("blur",(()=>this._onBlur()));(e=this.inputField)===null||e===void 0?void 0:e.addEventListener("keypress",this._preventNonNumericalInput);if(this.inputField){this.inputField.placeholder=!!this.label||!this.placeholder?"":this.placeholder;this.inputField.title=(n=this.label)!==null&&n!==void 0?n:this.placeholder;requestAnimationFrame((()=>{const t=this.inputField.closest(".c-input-menu__input");if(!t)return;t.dataset.placeholder=this.placeholder}))}}disconnectedCallback(){var t,i,e,n;(t=this.inputField)===null||t===void 0?void 0:t.removeEventListener("focus",(()=>this._onFocus(false)));(i=this.inputField)===null||i===void 0?void 0:i.removeEventListener("blur",(()=>this._onBlur()));(e=this.inputField)===null||e===void 0?void 0:e.removeEventListener("keypress",this._preventNonNumericalInput);this._observer.disconnect();(n=this._dropdownElement)===null||n===void 0?void 0:n.remove()}get isActive(){return!!this.value||typeof this.value==="boolean"||this.isFocused}_setAriaDescriptionId(){this.inputField.removeAttribute("aria-describedby");let t=null;if(this.valid&&!this.value&&this.hint){t="hint"}if(!this.valid){t="error"}if(t){this.inputField.setAttribute("aria-describedby",`${t}-${this.inputId}`)}}_calculateElementWidths(){this.labelWidth=!!this.label?this._labelRef.scrollWidth*.75+6:0;this.preSlotWidth=this.inputField.offsetLeft}_onReset(){if(this.inputField){if(!!this.placeholder&&!this.value&&(this.active||this.isFocused)){this.inputField.placeholder=this.placeholder;return}this.inputField.placeholder=!this.label&&!this.value&&!!this.placeholder?this.placeholder:""}}_preventNonNumericalInput(t){if(this.type!=="number")return;if(!t.key.match(/^[0-9,\.]+$/))t.preventDefault()}_renderBorders(){if(this.shadow)return;const t={active:this.isActive||this.active};return e("fieldset",{"aria-hidden":"true"},e("legend",{class:t,style:{"--_c-input-legend-width":this.labelWidth+"px"}},e("span",{class:"notranslate"})))}_renderLabel(){if(!this.label)return;const t={active:this.isActive};return e("label",{htmlFor:this.inputId,ref:t=>this._labelRef=t,class:t},this.label,this.required&&e("span",null," *"))}get inputField(){var t;return(t=this.el)===null||t===void 0?void 0:t.querySelector(".c-input__input")}_updateStatusText(){if(this._debounce!==null){clearTimeout(this._debounce);this._debounce=null}this._debounce=window.setTimeout((()=>{this.statusText=this.valid?"":`Error: ${this.validation}`;this._debounce=null}),1400)}render(){const t={"c-input":true,"c-input--disabled":this.disabled,"c-input--shadow":this.shadow,"c-input--textarea":this.rows>1,"c-input--error":!this.valid,"c-input--active":this.isFocused||this.active,filled:!!this.value,[`c-input--${this.variant}`]:true};return e(n,{disabled:this.disabled},e("div",{id:"announce-"+this.inputId,class:"visuallyhidden","aria-live":"polite","aria-atomic":"true"},this.statusText),e("div",{class:t},e("div",{class:"c-input__control"},e("div",{class:"c-input__slot",onClick:()=>this._onFocus()},this._renderBorders(),e("div",{class:"c-input__field",style:{"--_c-input-label-position":this.preSlotWidth+"px"}},e("slot",{name:"pre"}),this._renderLabel(),e("slot",null))),this.variant==="select"&&e("slot",{name:"dropdown"}),!this.hideDetails&&e("c-message",{hint:this.hint,inputId:this.inputId,valid:this.valid,validation:this.validation}))))}get el(){return o(this)}static get watchers(){return{valid:["onValidChange"],validation:["onValidationMessageChange"],value:["onValueChange"],placeholder:["onPlaceholderChange"]}}};h.style=l;export{a as c_dropdown,h as c_input};
2
- //# sourceMappingURL=p-1bb973d5.entry.js.map