@public-ui/components 1.1.16-rc.0 → 1.1.16-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"file":"component.js","mappings":";;;;;;;;;;;MAuLa,qBAAqB,GAAG,CAAC,SAAoC,EAAE,QAAgB,EAAE,KAAwB;EACrH,cAAc,CACb,SAAS,EACT,QAAQ,EACR,CAAC,KAAK,KAAK,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,MAAM,EACzF,IAAI,GAAG,CAAC,CAAC,6CAA6C,CAAC,CAAC,EACxD,KAAK,EACL;IACC,YAAY,EAAE,KAAK;GACnB,CACD,CAAC;AACH;;ACjKO,MAAM,cAAc,GAAG,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS;EAC7D,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,IAAI,IAAI,CAAC;EACjD,OAAO,GAAG,IAAI,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAC5B,CAAC,CAAC;AAGK,MAAM,iBAAiB,GAAG,CAAC,SAAc,EAAE,aAAkB,EAAE,KAAa,EAAE,GAAG,GAAG,CAAC;EAC3F,MAAM,KAAK,GAAQ;IAClB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;IACpG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,IA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CAAC,KAAK,CAAC,YAAY,CAAC,aAAa,EACpD,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,QAAQ,GAC1B,CACjB,CACK,EACN;GACF;EAkEM,aAAa,CAAC,KAA6B;IACjD,cAAc,CACb,IAAI,EACJ,QAAQ,EACR,CAAC,KAAK,KAAK,OAAO,KAAK,KAAK,QAAQ,KAAK,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC,EACrF,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,EACnC,KAAK,EACL;MACC,YAAY,EAAE,cAAc,CAAC,OAAO;MACpC,KAAK,EAAE;QACN,WAAW,EAAE,IAAI,CAAC,iBAAiB;OACnC;KACD,CACD,CAAC;GACF;EAMM,mBAAmB,CAAC,KAA4B;IACtD,mBAAmB,CAAC,KAAK,EAAE;MAC1B,IAAI;QACH,KAAK,GAAG,SAAS,CAAc,KAAe,CAAC,CAAC;OAEhD;MAAC,OAAO,CAAC,EAAE;OAEX;MACD,QAAQ,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,CAAC,CAAC;KACtC,CAAC,CAAC;GACH;EAKM,iBAAiB;IACvB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAChC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;GAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["hex","defaultStyleCss","HTMLElement"],"sources":["./src/types/button-link.ts","./src/components/badge/contrast.ts","./src/utils/reuse.ts","./src/utils/validators/tab-index.ts","./src/components/form/controller.ts","./src/components/button/controller.ts","./src/components/tooltip/style.sass?tag=kol-tooltip&mode=default","./src/components/tooltip/component.tsx","./src/components/button/component.tsx","./src/components/badge/style.sass?tag=kol-badge&mode=default&encapsulation=shadow","./src/components/badge/component.tsx"],"sourcesContent":["import { TooltipAlignment } from '../components/tooltip/component';\nimport { Events } from '../enums/events';\nimport { Generic } from '@public-ui/core';\nimport { watchValidator } from '../utils/prop.validators';\nimport { EventCallback } from './callbacks';\nimport { Alignment, KoliBriCustomIcon, KoliBriIconProp } from './icon';\nimport { Stringified } from './common';\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current#values\n */\nexport type AriaCurrent = boolean | 'page' | 'step' | 'location' | 'date' | 'time';\nexport type AlternativButtonLinkRole = 'tab';\n\n/**\n * https://twitter.com/housecor/status/1541037184622403584?t=HoUiOAZEcXFeuDl-VWAEZg\n * https://mui.com/material-ui/react-link/#accessibility\n * https://mui.com/material-ui/react-button/#text-button\n */\ntype RequiredButtonAndLinkProps = {\n\tlabel: string;\n};\ntype OptionalButtonAndLinkProps = {\n\tariaControls: string;\n\tariaCurrent: AriaCurrent;\n\tariaExpanded: boolean;\n\tariaLabel: string;\n\tariaSelected: boolean;\n\tdisabled: boolean; // TODO: Link disabled?!\n\ticon: Stringified<KoliBriIconProp>;\n\t/**\n\t * @deprecated\n\t */\n\ticonAlign: Alignment;\n\ticonOnly: boolean;\n\trole: AlternativButtonLinkRole;\n\ttabIndex: number;\n\ttooltipAlign: TooltipAlignment;\n};\n\ntype RequiredButtonAndLinkStates = {\n\tariaLabel: string;\n\ticon: {\n\t\ttop?: KoliBriCustomIcon;\n\t\tright?: KoliBriCustomIcon;\n\t\tbottom?: KoliBriCustomIcon;\n\t\tleft?: KoliBriCustomIcon;\n\t};\n\t/**\n\t * @deprecated\n\t */\n\ticonAlign: Alignment;\n\tlabel: string;\n};\ntype OptionalButtonAndLinkStates = {\n\tariaControls: string;\n\tariaCurrent: AriaCurrent;\n\tariaExpanded: boolean;\n\tariaSelected: boolean;\n\tdisabled: boolean;\n\ticonOnly: boolean;\n\trole: AlternativButtonLinkRole;\n\ttabIndex: number;\n\ttooltipAlign: TooltipAlignment;\n};\n\n/* Button */\n\nexport type KoliBriButtonType = 'button' | 'reset' | 'submit';\nexport type KoliBriButtonVariant = 'primary' | 'secondary' | 'normal' | 'danger' | 'ghost' | 'custom';\n\nexport type KoliBriButtonCallbacks = {\n\t[Events.onClick]?: EventCallback<PointerEvent>;\n\t[Events.onMouseDown]?: EventCallback<MouseEvent>;\n};\n\nexport type KoliBriButtonVariantCustomClass = {\n\tcustomClass: string;\n\tvariant: KoliBriButtonVariant;\n};\n\n/**\n * API ButtonLink\n */\nexport type RequiredButtonLinkProps = RequiredButtonAndLinkProps;\nexport type OptionalButtonLinkProps = OptionalButtonAndLinkProps & {\n\t/**\n\t * @deprecated Zweck?!\n\t */\n\taccessKey: string;\n\tid: string;\n\ton: KoliBriButtonCallbacks;\n\ttype: KoliBriButtonType;\n};\n// type ButtonLinkProps = Generic.Element.Members<RequiredButtonProps, OptionalButtonProps>;\n\nexport type RequiredButtonLinkStates = RequiredButtonAndLinkStates & {\n\ttype: KoliBriButtonType;\n};\nexport type OptionalButtonLinkStates = OptionalButtonAndLinkStates &\n\tKoliBriButtonVariantCustomClass & {\n\t\t/**\n\t\t * @deprecated Zweck?!\n\t\t */\n\t\taccessKey: string;\n\t\tid: string;\n\t\ton: KoliBriButtonCallbacks;\n\t};\n// type ButtonLinkStates = Generic.Element.Members<RequiredButtonStates, OptionalButtonStates>;\n\n/**\n * API Button\n */\nexport type RequiredButtonProps = RequiredButtonLinkProps;\nexport type OptionalButtonProps = OptionalButtonLinkProps & KoliBriButtonVariantCustomClass;\nexport type ButtonProps = Generic.Element.Members<RequiredButtonProps, OptionalButtonProps>;\n\nexport type RequiredButtonStates = RequiredButtonLinkStates;\nexport type OptionalButtonStates = OptionalButtonLinkStates & KoliBriButtonVariantCustomClass;\nexport type ButtonStates = Generic.Element.Members<RequiredButtonStates, OptionalButtonStates>;\n\n/* LINK */\n\nexport type LinkOnCallbacks = {\n\t[Events.onClick]?: EventCallback<Event>;\n};\n\n// https://www.w3schools.com/tags/att_a_target.asp\nexport type LinkTarget = '_blank' | '_parent' | '_self' | '_top' | string;\n\nexport type LinkUseCase = 'text' | 'image' | 'nav';\n\n/**\n * API Link\n */\nexport type RequiredLinkProps = RequiredButtonAndLinkProps;\nexport type OptionalLinkProps = OptionalButtonAndLinkProps & {\n\tfill: boolean;\n\thref: string;\n\t/**\n\t * @deprecated Verwende stattdessen einen Button _showAs=link.\n\t */\n\ton: LinkOnCallbacks;\n\tpart: string;\n\tselector: string;\n\tstealth: boolean;\n\ttarget: LinkTarget;\n\ttargetDescription: string;\n\tunderline: boolean;\n\tuseCase: LinkUseCase;\n};\nexport type LinkProps = Generic.Element.Members<RequiredLinkProps, OptionalLinkProps>;\n\nexport type RequiredLinkStates = RequiredButtonAndLinkStates;\nexport type OptionalLinkStates = OptionalButtonAndLinkStates & {\n\tariaSelected: boolean;\n\tfill: boolean;\n\thref: string;\n\t/**\n\t * @deprecated Verwende stattdessen einen Button _showAs=link.\n\t */\n\ton: LinkOnCallbacks;\n\tpart: string;\n\tselector: string;\n\tstealth: boolean;\n\ttarget: LinkTarget;\n\ttargetDescription: string;\n\tunderline: boolean;\n\tuseCase: LinkUseCase;\n};\nexport type LinkStates = Generic.Element.Members<RequiredLinkStates, OptionalLinkStates>;\n\n/**\n * API LinkButton\n */\nexport type RequiredLinkButtonProps = RequiredLinkProps;\nexport type OptionalLinkButtonProps = OptionalLinkProps & KoliBriButtonVariantCustomClass;\n// type LinkButtonProps = Generic.Element.Members<RequiredLinkButtonProps, OptionalLinkButtonProps>;\n\nexport type RequiredLinkButtonStates = RequiredLinkStates;\nexport type OptionalLinkButtonStates = OptionalLinkStates & KoliBriButtonVariantCustomClass;\nexport type LinkButtonStates = Generic.Element.Members<RequiredLinkButtonStates, OptionalLinkButtonStates>;\n\nexport const watchTooltipAlignment = (component: Generic.Element.Component, propName: string, value?: TooltipAlignment): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\tpropName,\n\t\t(value) => value === 'top' || value === 'right' || value === 'bottom' || value === 'left',\n\t\tnew Set(['TooltipAlignment {top, right, buttom, left}']),\n\t\tvalue,\n\t\t{\n\t\t\tdefaultValue: 'top',\n\t\t}\n\t);\n};\n","import { rgbaConvert } from './rgba-convert';\nimport { hex } from 'wcag-contrast';\nimport { colorRgba } from './color-rgba';\nimport { RGB } from 'color-convert/conversions';\n\ntype RGBA = [number, number, number, number];\n\n// const calcColor = (color: RGBA, diff: number): RGBA => [\n// Math.max(Math.min(Math.round(color[0] + (color[0] / 100 + 1) * diff), 255), 0),\n// Math.max(Math.min(Math.round(color[1] + (color[1] / 100 + 1) * diff), 255), 0),\n// Math.max(Math.min(Math.round(color[2] + (color[2] / 100 + 1) * diff), 255), 0),\n// color[3],\n// ];\n\n// const relativeLuminanceFormel = (c: number): number => {\n// if (c <= 0.03928) {\n// return c / 12.92;\n// } else {\n// return ((c + 0.055) / 1.055) ** 2.4;\n// }\n// };\n// // https://www.w3.org/TR/WCAG20/#contrast-ratiodef\n// const relativeLuminance = (r: number, g: number, b: number): number => {\n// return (\n// 0.2126 * relativeLuminanceFormel(r) + 0.7152 * relativeLuminanceFormel(g) + 0.0722 * relativeLuminanceFormel(b)\n// );\n// };\n\n// https://css-tricks.com/snippets/javascript/random-hex-color/\n// const randomColor = () => Math.floor(Math.random() * 16777215).toString(16);\n\n// https://24ways.org/2010/calculating-color-contrast/\n// ts-prune-ignore-next\nexport const getContrastYIQ = (r: number, g: number, b: number): number => {\n\tconst yiq = (r * 299 + g * 587 + b * 114) / 1000;\n\treturn yiq >= 128 ? -1 : 1;\n};\n\n// ts-prune-ignore-next\nexport const calcContrastColor = (baseColor: RGB, contrastColor: RGB, ratio: number, dir = 1): RGB => {\n\tconst color: RGB = [\n\t\tMath.max(Math.min(Math.round(contrastColor[0] + dir * Math.max(1, contrastColor[0] / 100)), 255), 0),\n\t\tMath.max(Math.min(Math.round(contrastColor[1] + dir * Math.max(1, contrastColor[1] / 100)), 255), 0),\n\t\tMath.max(Math.min(Math.round(contrastColor[2] + dir * Math.max(1, contrastColor[2] / 100)), 255), 0),\n\t];\n\tconst contrast = hex(rgbaConvert.hex(`rgba(${baseColor.join(',')},1)`), rgbaConvert.hex(`rgba(${color.join(',')},1)`));\n\tconst summe = color[0] + color[1] + color[2];\n\tif (summe === 0 || summe === 765 || contrast > ratio) {\n\t\treturn color;\n\t} else {\n\t\treturn calcContrastColor(baseColor, color, ratio, dir);\n\t}\n};\n\n// ts-prune-ignore-next\nexport const getContrastColor = (baseColor: RGB, contrastcolor: RGB, ratio: number, dir = 1): RGB => {\n\tif (cache.has(baseColor)) {\n\t\treturn cache.get(baseColor) as RGB;\n\t}\n\tconst color = calcContrastColor(baseColor, contrastcolor, ratio, dir);\n\tcache.set(baseColor, color);\n\treturn color;\n};\n\nconst cache: Map<unknown, RGB> = new Map();\n\nexport type KoliBriContrastColor = {\n\tbaseColor: string;\n\tcontrastColor: string;\n};\n\nexport const createContrastColorPair = (color: string | KoliBriContrastColor, contrastRatio = 7): KoliBriContrastColor => {\n\tlet baseColor: RGBA = [0, 0, 0, 1];\n\tlet contrastColor: RGBA = [255, 255, 255, 1];\n\tif (typeof color === 'string') {\n\t\tbaseColor = colorRgba(color);\n\t\tcontrastColor = baseColor;\n\t} else if (typeof color === 'object' && color !== null && typeof color.baseColor === 'string') {\n\t\tbaseColor = colorRgba(color.baseColor);\n\t\tif (typeof color.contrastColor === 'string') {\n\t\t\tcontrastColor = colorRgba(color.contrastColor);\n\t\t} else {\n\t\t\tcontrastColor = baseColor;\n\t\t}\n\t}\n\tconst yiq = getContrastYIQ(baseColor[0], baseColor[1], baseColor[2]);\n\tconst contrastColorRGB = getContrastColor(\n\t\t[baseColor[0], baseColor[1], baseColor[2]],\n\t\t[contrastColor[0], contrastColor[1], contrastColor[2]],\n\t\tcontrastRatio,\n\t\tyiq\n\t);\n\tcontrastColor = [...contrastColorRGB, 1];\n\n\treturn {\n\t\tbaseColor: rgbaConvert.hex(`rgba(${baseColor.join(',')})`),\n\t\tcontrastColor: rgbaConvert.hex(`rgba(${contrastColor.join(',')})`),\n\t};\n};\n","import { isObject } from './validator';\n\nexport const propergateFocus = <H extends HTMLElement, R extends HTMLElement>(host?: H, ref?: R) => {\n\tif (isObject(host) && host) {\n\t\thost.focus = (ops: FocusOptions) => ref?.focus(ops);\n\t}\n};\n\n/**\n * If you need a tiny setTimeout with clearTimeout, you can\n * use this compact implementation.\n *\n * @param cb Callback with the code to run\n * @param delay Timeout delay\n */\nexport const smartSetTimeout = (cb: () => void, delay?: number) => {\n\tconst timeout = setTimeout(() => {\n\t\tclearTimeout(timeout);\n\t\tcb();\n\t}, delay);\n};\n","import { Generic } from '@public-ui/core';\nimport { a11yHint } from '../a11y.tipps';\nimport { watchNumber, WatchNumberOptions } from '../prop.validators';\n\n/**\n * Accessibility hints\n * - https://adrianroselli.com/2014/11/dont-use-tabindex-greater-than-0.html\n */\n\nconst options: WatchNumberOptions = {\n\thooks: {\n\t\tafterPatch: (value) => {\n\t\t\tif (value !== -1 && value !== 0) {\n\t\t\t\ta11yHint(`Don’t Use Tabindex Greater than 0: https://adrianroselli.com/2014/11/dont-use-tabindex-greater-than-0.html`);\n\t\t\t}\n\t\t},\n\t},\n};\n\n/**\n * Diese Methode validiert das Property und setzt den State, wenn es valide ist.\n */\nexport const validateTabIndex = (component: Generic.Element.Component, value?: number): void => {\n\twatchNumber(component, '_tabIndex', value, options);\n};\n","import { devHint } from '../../utils/a11y.tipps';\nimport { getExperimalMode } from '../../utils/dev.utils';\nimport { KoliBriDevHelper, setEventTargetAndStopPropagation } from '../../utils/prop.validators';\n\nconst searchFormElement = (el?: HTMLElement | ParentNode | null): HTMLElement | ParentNode | null | undefined => {\n\tif (getExperimalMode()) {\n\t\tdevHint(`↓ Search form element start.`);\n\t\tconsole.log(el);\n\t}\n\twhile (el instanceof HTMLElement && el.tagName !== 'FORM' && el.tagName !== 'KOL-FORM') {\n\t\tif (el.parentElement instanceof HTMLElement) {\n\t\t\tel = el.parentElement;\n\t\t} else if (el.parentNode instanceof ShadowRoot) {\n\t\t\tel = el.parentNode.host;\n\t\t} else {\n\t\t\tel = null;\n\t\t}\n\t\tif (getExperimalMode()) {\n\t\t\tconsole.log(el);\n\t\t}\n\t}\n\tif (getExperimalMode()) {\n\t\tdevHint(`↑ Search form element finished.`);\n\t}\n\treturn el;\n};\n\nexport const propergateResetEventToForm = (\n\toptions: {\n\t\tform?: HTMLElement | ParentNode | null;\n\t\tref?: HTMLElement;\n\t} = {}\n): void => {\n\tconst form = searchFormElement(options.form);\n\tif (form instanceof HTMLElement) {\n\t\tconst event = new Event('reset', {\n\t\t\tbubbles: true,\n\t\t\tcancelable: true,\n\t\t});\n\t\tif (form.tagName === 'FORM') {\n\t\t\tsetEventTargetAndStopPropagation(event, form);\n\t\t\tform.dispatchEvent(event);\n\t\t} else if (form.tagName === 'KOL-FORM') {\n\t\t\tsetEventTargetAndStopPropagation(event, KoliBriDevHelper.querySelector('form', form) as HTMLFormElement);\n\t\t\tconst kolForm = form as HTMLKolFormElement;\n\t\t\tif (typeof kolForm._on === 'object' && typeof kolForm._on !== null && typeof kolForm._on.onReset === 'function') {\n\t\t\t\tkolForm._on.onReset(event);\n\t\t\t}\n\t\t}\n\t}\n};\n\nexport const propergateSubmitEventToForm = (\n\toptions: {\n\t\tform?: HTMLElement | ParentNode | null;\n\t\tref?: HTMLElement;\n\t} = {}\n): void => {\n\tconst form = searchFormElement(options.form);\n\tif (form instanceof HTMLElement) {\n\t\tconst event = new SubmitEvent('submit', {\n\t\t\tbubbles: true,\n\t\t\tcancelable: true,\n\t\t\tsubmitter: form,\n\t\t});\n\t\t/**\n\t\t * TODO: Wenn Formular-Action (nicht Ajax oder JS) verwendet wird,\n\t\t * dann müssen wir das Event an das HTMLFormElement innerhalb\n\t\t * der HTMLKolFormElements propagieren, wenn kein onSubmit\n\t\t * gesetzt wurde.\n\t\t *\n\t\t * TODO: Form-associated custom elements:\n\t\t * - https://web.dev/more-capable-form-controls/\n\t\t * - https://github.com/public-ui/kolibri/issues/946\n\t\t */\n\t\tif (form.tagName === 'FORM') {\n\t\t\tsetEventTargetAndStopPropagation(event, form);\n\t\t\tform.dispatchEvent(event);\n\t\t} else if (form.tagName === 'KOL-FORM') {\n\t\t\tsetEventTargetAndStopPropagation(event, KoliBriDevHelper.querySelector('form', form) as HTMLFormElement);\n\t\t\tconst kolForm = form as HTMLKolFormElement;\n\t\t\tif (typeof kolForm._on === 'object' && typeof kolForm._on !== null && typeof kolForm._on.onSubmit === 'function') {\n\t\t\t\tkolForm._on.onSubmit(event);\n\t\t\t}\n\t\t}\n\t}\n};\n","import { Generic } from '@public-ui/core';\nimport { KoliBriButtonType, KoliBriButtonVariant } from '../../types/button-link';\nimport { watchValidator } from '../../utils/prop.validators';\n\nexport const watchButtonType = (component: Generic.Element.Component, propName: string, value?: KoliBriButtonType): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\tpropName,\n\t\t(value) => value === 'button' || value === 'reset' || value === 'submit',\n\t\tnew Set(['KoliBriButtonType {button, reset, submit}']),\n\t\tvalue\n\t);\n};\n\nexport const watchButtonVariant = (component: Generic.Element.Component, propName: string, value?: KoliBriButtonVariant): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\tpropName,\n\t\t(value) => value === 'primary' || value === 'secondary' || value === 'normal' || value === 'danger' || value === 'ghost' || value === 'custom',\n\t\tnew Set(['KoliBriButtonVariant {primary, secondary, normal, danger, ghost, custom}']),\n\t\tvalue,\n\t\t{\n\t\t\tdefaultValue: 'normal',\n\t\t}\n\t);\n};\n","/* windicss-touch: 1637820161169 */\n// @import ../style\n\nkol-badge,\n.tooltip /* fix sass formatter */\n\tfont-size: 1rem\n\tposition: fixed\n\t\t// position: absolute\n\t\t// position: relative\n\tanimation-name: fadeInOpacity\n\tanimation-iteration-count: 1\n\tanimation-timing-function: ease-in\n\tanimation-duration: .5s\n\tdisplay: none\n\tz-index: 1000\n\tmax-width: 300px\n\tbox-shadow: 0 0 0.15rem rgba(255,255,255,0.8)\n\n\t&::after\n\t\tcontent: \" \"\n\t\tposition: absolute\n\t\tborder-style: solid\n\t\tborder-width: 5px\n\n\t&.arrow-left\n\t\t&::after\n\t\t\tmargin-top: -5px\n\t\t\ttop: 50%\n\t\t\tright: 100%\n\t\t\tborder-color: transparent black transparent transparent\n\n\t&.arrow-right\n\t\t&::after\n\t\t\tmargin-top: -5px\n\t\t\ttop: 50%\n\t\t\tleft: 100%\n\t\t\tborder-color: transparent transparent transparent black\n\n\t&.arrow-top\n\t\t&::after\n\t\t\tmargin-left: -5px\n\t\t\tleft: 50%\n\t\t\tbottom: 100%\n\t\t\tborder-color: transparent transparent black transparent\n\n\t&.arrow-bottom\n\t\t&::after\n\t\t\tmargin-left: -5px\n\t\t\tleft: 50%\n\t\t\ttop: 100%\n\t\t\tborder-color: black transparent transparent transparent\n\n\t// &::before\n\t// content: ''\n\t// display: inline-block\n\t// vertical-align: middle\n\t// -webkit-transform: rotate(360deg)\n\t// border-style: solid\n\t// border-width: .5rem .5rem .5rem 0\n\t// border-color: transparent black transparent transparent\n\n@keyframes fadeInOpacity\n\t0%\n\t\topacity: 0\n\n\t100%\n\t\topacity: 1\n","import { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@public-ui/core';\nimport { watchTooltipAlignment } from '../../types/button-link';\nimport { getDocument, nonce } from '../../utils/dev.utils';\nimport { watchString } from '../../utils/prop.validators';\n\nexport type TooltipAlignment = 'top' | 'right' | 'bottom' | 'left';\n\n/**\n * API\n */\ntype RequiredProps = {\n\tlabel: string;\n};\ntype OptionalProps = {\n\talign: TooltipAlignment;\n\tid: string;\n};\nexport type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = RequiredProps & OptionalProps;\ntype OptionalStates = unknown;\nexport type States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\n@Component({\n\ttag: 'kol-tooltip',\n\tstyleUrls: {\n\t\tdefault: './style.sass',\n\t},\n\tshadow: false,\n})\nexport class KolTooltip implements Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates> {\n\t// - eslint-disable-next-line @stencil/own-props-must-be-private\n\tpublic hydrated = false; // TODO: Why?!\n\n\tprivate hostElement?: HTMLElement | null = null;\n\tprivate readonly childElements: HTMLElement[] = [];\n\tprivate tooltipElement?: HTMLKolBadgeElement;\n\n\tprivate alignTooltip = (): void => {\n\t\tconst target = this.childElements[0];\n\n\t\t// getBoundingClientRect is not defined in test suite\n\t\tif (process.env.NODE_ENV !== 'test') {\n\t\t\tconst clientRect = target.getBoundingClientRect();\n\n\t\t\tif (this.tooltipElement instanceof HTMLElement) {\n\t\t\t\tswitch (this.state._align) {\n\t\t\t\t\tcase 'top':\n\t\t\t\t\tcase 'bottom':\n\t\t\t\t\t\tthis.tooltipElement.style.left = `${clientRect.left + target.offsetWidth / 2 - this.tooltipElement.offsetWidth / 2}px`;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'left':\n\t\t\t\t\tcase 'right':\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthis.tooltipElement.style.top = `${clientRect.top + clientRect.height / 2 - this.tooltipElement.offsetHeight / 2}px`;\n\t\t\t\t}\n\t\t\t\tswitch (this.state._align) {\n\t\t\t\t\tcase 'left':\n\t\t\t\t\t\tthis.tooltipElement.style.left = `calc(${clientRect.left - this.tooltipElement.offsetWidth}px - 0.5em)`;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'right':\n\t\t\t\t\t\tthis.tooltipElement.style.left = `calc(${clientRect.right}px + 0.5em)`;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'bottom':\n\t\t\t\t\t\tthis.tooltipElement.style.top = `calc(${clientRect.bottom}px + 0.5em)`;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'top':\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthis.tooltipElement.style.top = `calc(${clientRect.top - this.tooltipElement.offsetHeight}px - 0.5em)`;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\tprivate showTooltip = (): void => {\n\t\tif (this.tooltipElement instanceof HTMLElement) {\n\t\t\tthis.tooltipElement.style.setProperty('display', 'block');\n\t\t\tgetDocument().body.addEventListener('keyup', this.hideTooltipByEscape);\n\t\t\tthis.alignTooltip();\n\t\t\tthis.tooltipElement.style.setProperty('visibility', 'visible');\n\t\t\tdocument.addEventListener('scroll', this.alignTooltip);\n\t\t}\n\t};\n\n\tprivate hideTooltip = (): void => {\n\t\tif (this.tooltipElement instanceof HTMLElement) {\n\t\t\tthis.tooltipElement.style.setProperty('display', 'none');\n\t\t\tthis.tooltipElement.style.setProperty('visibility', 'hidden');\n\t\t\tdocument.removeEventListener('scroll', this.alignTooltip);\n\t\t}\n\t};\n\n\tprivate hideTooltipByEscape = (event: KeyboardEvent): void => {\n\t\tif (event.key === 'Escape') {\n\t\t\tgetDocument().body.removeEventListener('keyup', this.hideTooltipByEscape);\n\t\t\tthis.hideTooltip();\n\t\t}\n\t};\n\n\tprivate catchHostElement = (element: HTMLElement | null): void => {\n\t\tthis.hostElement = element;\n\t\tif (this.hostElement instanceof HTMLElement) {\n\t\t\tconst previousSibling = this.hostElement.previousElementSibling;\n\t\t\tif (previousSibling instanceof HTMLElement) {\n\t\t\t\tpreviousSibling.removeEventListener('mouseover', this.showTooltip);\n\t\t\t\tpreviousSibling.addEventListener('mouseover', this.showTooltip);\n\t\t\t\tpreviousSibling.removeEventListener('focus', this.showTooltip);\n\t\t\t\tpreviousSibling.addEventListener('focus', this.showTooltip);\n\t\t\t\tpreviousSibling.removeEventListener('mouseout', this.hideTooltip);\n\t\t\t\tpreviousSibling.addEventListener('mouseout', this.hideTooltip);\n\t\t\t\tpreviousSibling.removeEventListener('blur', this.hideTooltip);\n\t\t\t\tpreviousSibling.addEventListener('blur', this.hideTooltip);\n\t\t\t\tthis.childElements.push(previousSibling);\n\t\t\t}\n\t\t}\n\t};\n\n\tprivate catchTooltipElement = (element?: HTMLKolBadgeElement): void => {\n\t\tthis.tooltipElement = element;\n\t};\n\n\tpublic render(): JSX.Element {\n\t\tconst timeout = setTimeout(() => {\n\t\t\tclearTimeout(timeout);\n\t\t\tthis.alignTooltip();\n\t\t}, 250);\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tref={this.catchHostElement}\n\t\t\t\tstyle={{\n\t\t\t\t\tmaxWidth: '300px',\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{this.state._label !== '' && (\n\t\t\t\t\t<kol-badge\n\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t'arrow-bottom': this.state._align === 'top',\n\t\t\t\t\t\t\t'arrow-left': this.state._align === 'right',\n\t\t\t\t\t\t\t'arrow-top': this.state._align === 'bottom',\n\t\t\t\t\t\t\t'arrow-right': this.state._align === 'left',\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tid={this.state._id}\n\t\t\t\t\t\tref={this.catchTooltipElement}\n\t\t\t\t\t\t_color={{\n\t\t\t\t\t\t\tbackgroundColor: '#333',\n\t\t\t\t\t\t\tcolor: '#ddd',\n\t\t\t\t\t\t}}\n\t\t\t\t\t\t_label={this.state._label}\n\t\t\t\t\t></kol-badge>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt an, ob der Tooltip oben, rechts, unten oder links angezeigt werden soll.\n\t */\n\t@Prop() public _align?: TooltipAlignment = 'top';\n\n\t/**\n\t * Gibt die ID an, wenn z.B. Aria-Labelledby (Link) verwendet wird.\n\t */\n\t@Prop() public _id?: string;\n\n\t/**\n\t * Das Label gibt an, welcher Text in dem Tooltip beim Fokussieren oder Maus-drüberfahren angezeigt wird.\n\t */\n\t@Prop() public _label!: string;\n\n\t/**\n\t * @see: components/abbr/component.tsx (@State)\n\t */\n\t@State() public state: States = {\n\t\t_align: 'top',\n\t\t_id: nonce(),\n\t\t_label: '',\n\t};\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_align')\n\tpublic validateAlign(value?: TooltipAlignment): void {\n\t\twatchTooltipAlignment(this, '_align', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_id')\n\tpublic validateId(value?: string): void {\n\t\twatchString(this, '_id', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_label')\n\tpublic validateLabel(value?: string): void {\n\t\twatchString(this, '_label', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentWillLoad)\n\t */\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAlign(this._align);\n\t\tthis.validateId(this._id);\n\t\tthis.validateLabel(this._label);\n\t\tthis.hydrated = true;\n\t}\n}\n","import { Component, Element, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@public-ui/core';\nimport {\n\tAlternativButtonLinkRole,\n\tAriaCurrent,\n\tButtonStates,\n\tKoliBriButtonCallbacks,\n\tKoliBriButtonType,\n\tKoliBriButtonVariant,\n\tOptionalButtonProps,\n\tOptionalButtonStates,\n\tRequiredButtonProps,\n\tRequiredButtonStates,\n\twatchTooltipAlignment,\n} from '../../types/button-link';\nimport { Stringified } from '../../types/common';\nimport { Alignment, KoliBriIconProp } from '../../types/icon';\nimport { a11yHintDisabled, devHint } from '../../utils/a11y.tipps';\nimport { nonce } from '../../utils/dev.utils';\nimport {\n\tmapBoolean2String,\n\tmapStringOrBoolean2String,\n\tsetEventTargetAndStopPropagation,\n\twatchBoolean,\n\twatchString,\n\twatchValidator,\n} from '../../utils/prop.validators';\nimport { propergateFocus } from '../../utils/reuse';\nimport { validateIcon, watchIconAlign } from '../../utils/validators/icon';\nimport { validateAriaLabel, validateLabel } from '../../utils/validators/label';\nimport { validateTabIndex } from '../../utils/validators/tab-index';\nimport { propergateResetEventToForm, propergateSubmitEventToForm } from '../form/controller';\nimport { TooltipAlignment } from '../tooltip/component';\nimport { watchButtonType, watchButtonVariant } from './controller';\n\n/**\n * @internal\n */\n@Component({\n\ttag: 'kol-button-wc',\n\tshadow: false,\n})\nexport class KolButtonWc implements Generic.Element.ComponentApi<RequiredButtonProps, OptionalButtonProps, RequiredButtonStates, OptionalButtonStates> {\n\t@Element() private readonly host?: HTMLKolButtonWcElement;\n\tprivate readonly nonce = nonce();\n\tprivate ref?: HTMLButtonElement;\n\n\tprivate readonly catchRef = (ref?: HTMLButtonElement) => {\n\t\tthis.ref = ref;\n\t\tpropergateFocus(this.host, this.ref);\n\t};\n\n\tprivate readonly onClick = (event: Event) => {\n\t\tif (this.state._type === 'submit') {\n\t\t\tpropergateSubmitEventToForm({\n\t\t\t\tform: this.host,\n\t\t\t\tref: this.ref,\n\t\t\t});\n\t\t} else if (this.state._type === 'reset') {\n\t\t\tpropergateResetEventToForm({\n\t\t\t\tform: this.host,\n\t\t\t\tref: this.ref,\n\t\t\t});\n\t\t} else if (typeof this.state._on?.onClick === 'function') {\n\t\t\tsetEventTargetAndStopPropagation(event, this.ref);\n\t\t\tthis.state._on?.onClick(event as PointerEvent);\n\t\t} else {\n\t\t\tdevHint(`It was no button click callback configured!`);\n\t\t}\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<button\n\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\taccessKey={this.state._accessKey}\n\t\t\t\t\taria-controls={this.state._ariaControls}\n\t\t\t\t\taria-current={mapStringOrBoolean2String(this.state._ariaCurrent)}\n\t\t\t\t\taria-expanded={mapBoolean2String(this.state._ariaExpanded)}\n\t\t\t\t\taria-label={this.state._iconOnly === false ? this.state._ariaLabel || this.state._label : undefined}\n\t\t\t\t\taria-labelledby={this.state._iconOnly === true ? this.nonce : undefined}\n\t\t\t\t\taria-selected={mapStringOrBoolean2String(this.state._ariaSelected)}\n\t\t\t\t\tclass={{\n\t\t\t\t\t\t[this.state._variant as string]: this.state._variant !== 'custom',\n\t\t\t\t\t\t[this.state._customClass as string]:\n\t\t\t\t\t\t\tthis.state._variant === 'custom' && typeof this.state._customClass === 'string' && this.state._customClass.length > 0,\n\t\t\t\t\t\t'icon-only': this.state._iconOnly === true,\n\t\t\t\t\t}}\n\t\t\t\t\tdisabled={this.state._disabled}\n\t\t\t\t\tid={this.state._id}\n\t\t\t\t\t{...this.state._on}\n\t\t\t\t\tonClick={this.onClick}\n\t\t\t\t\trole={this.state._role}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\twidth: 'inherit',\n\t\t\t\t\t}}\n\t\t\t\t\ttabIndex={this.state._tabIndex}\n\t\t\t\t\ttype={this.state._type}\n\t\t\t\t>\n\t\t\t\t\t<kol-span-wc _icon={this._icon} _iconOnly={this._iconOnly} _label={this.state._ariaLabel || this.state._label}>\n\t\t\t\t\t\t<slot name=\"expert\" slot=\"expert\" />\n\t\t\t\t\t</kol-span-wc>\n\t\t\t\t</button>\n\t\t\t\t{this.state._iconOnly === true && (\n\t\t\t\t\t<kol-tooltip\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Dieses Aria-Hidden verhindert das doppelte Vorlesen des Labels,\n\t\t\t\t\t\t * verhindert aber nicht das Aria-Labelledby vorgelesen wird.\n\t\t\t\t\t\t */\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t_align={this.state._tooltipAlign}\n\t\t\t\t\t\t_id={this.nonce}\n\t\t\t\t\t\t_label={this.state._ariaLabel || this.state._label}\n\t\t\t\t\t></kol-tooltip>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt an, mit welcher Tastenkombination man den Button auslösen oder fokussieren kann.\n\t */\n\t@Prop() public _accessKey?: string;\n\n\t/**\n\t * Gibt an, welche Elemente kontrolliert werden. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls)\n\t */\n\t@Prop() public _ariaControls?: string;\n\n\t/**\n\t * Gibt an, welchen aktuellen Auswahlstatus der Button hat. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n\t */\n\t@Prop() public _ariaCurrent?: AriaCurrent;\n\n\t/**\n\t * Gibt an, ob durch den Button etwas aufgeklappt wurde. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n\t */\n\t@Prop({ reflect: true }) public _ariaExpanded?: boolean;\n\n\t/**\n\t * Gibt einen beschreibenden Text für den Screenreader an. Damit die\n\t * Sprachsteuerung von interaktiven Elementen funktioniert, muss der\n\t * Aria-Label-Text mit dem Label-Text des Buttons beginnen.\n\t *\n\t * - https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label\n\t */\n\t@Prop({ mutable: true, reflect: false }) public _ariaLabel?: string = '';\n\n\t/**\n\t * Gibt an, ob Element ausgewählt ist (role=tab). (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n\t */\n\t@Prop({ reflect: true }) public _ariaSelected?: boolean;\n\n\t/**\n\t * Gibt an, welche Custom-Class übergeben werden soll, wenn _variant=\"custom\" gesetzt ist.\n\t */\n\t@Prop() public _customClass?: string;\n\n\t/**\n\t * Gibt an, ob der Button deaktiviert ist.\n\t */\n\t@Prop({ reflect: true }) public _disabled?: boolean = false;\n\n\t/**\n\t * Gibt den Class-Identifier eines Icons eine eingebunden Icofont an. (z.B. https://icofont.com/)\n\t */\n\t@Prop() public _icon?: Stringified<KoliBriIconProp>;\n\n\t/**\n\t * Gibt an, ob das Icon links oder rechts dargestellt werden soll.\n\t *\n\t * @deprecated\n\t */\n\t@Prop() public _iconAlign?: Alignment = 'left';\n\n\t/**\n\t * Gibt an, ob nur das Icon angezeigt wird.\n\t */\n\t@Prop({ reflect: true }) public _iconOnly?: boolean = false;\n\n\t/**\n\t * Gibt die ID der Schaltfläche an. (Selection, Testing)\n\t */\n\t@Prop() public _id?: string;\n\n\t/**\n\t * Gibt den Label für die Beschriftung der Schaltfläche an.\n\t */\n\t// - eslint-disable-next-line @stencil/strict-mutable\n\t@Prop({ mutable: true, reflect: false }) public _label!: string;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für die Button-Events an.\n\t */\n\t@Prop() public _on?: KoliBriButtonCallbacks;\n\n\t/**\n\t * Gibt an, welche Role der Schalter hat.\n\t */\n\t@Prop() public _role?: AlternativButtonLinkRole;\n\n\t/**\n\t * Gibt an, welchen Tab-Index der Button hat. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Gibt an, ob der Tooltip oben, rechts, unten oder links angezeigt werden soll.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignment = 'top';\n\n\t/**\n\t * Gibt an, welche Typ der Button hat.\n\t */\n\t@Prop() public _type?: KoliBriButtonType = 'button';\n\n\t/**\n\t * Gibt an, welche Ausprägung der Button hat.\n\t */\n\t@Prop() public _variant?: KoliBriButtonVariant = 'normal';\n\n\t/**\n\t * @see: components/abbr/component.tsx (@State)\n\t */\n\t@State() public state: ButtonStates = {\n\t\t_ariaLabel: '',\n\t\t_icon: {},\n\t\t_iconAlign: 'left',\n\t\t_label: '',\n\t\t_on: {},\n\t\t_type: 'button',\n\t};\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_accessKey')\n\tpublic validateAccessKey(value?: string): void {\n\t\twatchString(this, '_accessKey', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_ariaControls')\n\tpublic validateAriaControls(value?: string): void {\n\t\twatchString(this, '_ariaControls', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_ariaCurrent')\n\tpublic validateAriaCurrent(value?: AriaCurrent): void {\n\t\twatchValidator(\n\t\t\tthis,\n\t\t\t'_ariaControls',\n\t\t\t(value) => value === true || value === 'date' || value === 'location' || value === 'page' || value === 'step' || value === 'time',\n\t\t\tnew Set(['boolean', 'String {data, location, page, step, time}']),\n\t\t\tvalue\n\t\t);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_ariaExpanded')\n\tpublic validateAriaExpanded(value?: boolean): void {\n\t\twatchBoolean(this, '_ariaExpanded', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_ariaLabel')\n\tpublic validateAriaLabel(value?: string): void {\n\t\tvalidateAriaLabel(this, value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_ariaSelected')\n\tpublic validateAriaSelected(value?: boolean): void {\n\t\twatchBoolean(this, '_ariaSelected', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_customClass')\n\tpublic validateCustomClass(value?: string): void {\n\t\twatchString(this, '_customClass', value, {\n\t\t\tdefaultValue: undefined,\n\t\t});\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_disabled')\n\tpublic validateDisabled(value?: boolean): void {\n\t\twatchBoolean(this, '_disabled', value);\n\t\tif (value === true) {\n\t\t\ta11yHintDisabled();\n\t\t}\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_icon')\n\tpublic validateIcon(value?: KoliBriIconProp): void {\n\t\tvalidateIcon(this, value);\n\t}\n\n\t/**\n\t * @deprecated\n\t */\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_iconAlign')\n\tpublic validateIconAlign(value?: Alignment): void {\n\t\twatchIconAlign(this, value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_iconOnly')\n\tpublic validateIconOnly(value?: boolean): void {\n\t\twatchBoolean(this, '_iconOnly', value, {\n\t\t\tdefaultValue: false,\n\t\t\t// hooks: {\n\t\t\t// beforePatch: (_value, nextState) => {\n\t\t\t// let ariaLabel = this.state._ariaLabel;\n\t\t\t// if (nextState.has('_ariaLabel')) {\n\t\t\t// ariaLabel = nextState.get('_ariaLabel') as string;\n\t\t\t// }\n\t\t\t// if (typeof ariaLabel !== 'string' || ariaLabel.length <= 0) {\n\t\t\t// devHint(`[KolButton]: Bevor Icon-Only aktiviert wird, muss ein Aria-Label bzw. Label gesetzt werden.`);\n\t\t\t// nextState.set('_iconOnly', false);\n\t\t\t// }\n\t\t\t// },\n\t\t\t// },\n\t\t});\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_id')\n\tpublic validateId(value?: string): void {\n\t\twatchString(this, '_id', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_label')\n\tpublic validateLabel(value?: string): void {\n\t\tvalidateLabel(this, value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_on')\n\tpublic validateOn(value?: KoliBriButtonCallbacks): void {\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\t_on: value,\n\t\t\t};\n\t\t}\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_role')\n\tpublic validateRole(value?: AlternativButtonLinkRole): void {\n\t\twatchString(this, '_role', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_tabIndex')\n\tpublic validateTabIndex(value?: number): void {\n\t\tvalidateTabIndex(this, value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_tooltipAlign')\n\tpublic validateTooltipAlign(value?: TooltipAlignment): void {\n\t\twatchTooltipAlignment(this, '_tooltipAlign', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_type')\n\tpublic validateType(value?: KoliBriButtonType): void {\n\t\twatchButtonType(this, '_type', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_variant')\n\tpublic validateVariant(value?: KoliBriButtonVariant): void {\n\t\twatchButtonVariant(this, '_variant', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentWillLoad)\n\t */\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAccessKey(this._accessKey);\n\t\tthis.validateAriaControls(this._ariaControls);\n\t\tthis.validateAriaCurrent(this._ariaCurrent);\n\t\tthis.validateAriaExpanded(this._ariaExpanded);\n\t\tthis.validateAriaLabel(this._ariaLabel);\n\t\tthis.validateAriaSelected(this._ariaSelected);\n\t\tthis.validateCustomClass(this._customClass);\n\t\tthis.validateDisabled(this._disabled);\n\t\tthis.validateIcon(this._icon);\n\t\t// this.validateIconAlign(this._iconAlign);\n\t\tthis.validateIconOnly(this._iconOnly);\n\t\tthis.validateId(this._id);\n\t\tthis.validateLabel(this._label);\n\t\tthis.validateOn(this._on);\n\t\tthis.validateRole(this._role);\n\t\tthis.validateTabIndex(this._tabIndex);\n\t\tthis.validateTooltipAlign(this._tooltipAlign);\n\t\tthis.validateType(this._type);\n\t\tthis.validateVariant(this._variant);\n\t}\n}\n","@import ../style\n\nspan\n display: inline-block\n border-radius: var(--kolibri-border-radius)\n @apply px-2 py-0.5\n","import { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@public-ui/core';\nimport { Nationalfarben } from '../../enums/color';\nimport { Alignment, KoliBriIconProp } from '../../types/icon';\nimport { devHint, featureHint } from '../../utils/a11y.tipps';\nimport { objectObjectHandler, parseJson, setState, watchValidator } from '../../utils/prop.validators';\nimport { createContrastColorPair, KoliBriContrastColor } from './contrast';\nimport { Stringified } from '../../types/common';\nimport { ButtonProps } from '../../types/button-link';\n\nfeatureHint(`[KolBadge] Optimierung des _color-Properties (rgba, rgb, hex usw.).`);\n\nconst HACK_REG_EX = /^([a-f0-9]{3}|[a-f0-9]{6})$/;\n\nexport type KoliBriColor = {\n\tbackgroundColor: string;\n\tcolor: string;\n};\n\n/**\n * API\n */\ntype RequiredProps = {\n\tlabel: string;\n};\ntype OptionalProps = {\n\tcolor: Stringified<KoliBriColor>;\n\ticon: Stringified<KoliBriIconProp>;\n\ticonOnly: boolean;\n\tsmarButton: Stringified<ButtonProps>;\n};\nexport type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = {\n\tcolor: Stringified<KoliBriColor>;\n};\ntype OptionalStates = {\n\tsmartButton: ButtonProps;\n};\nexport type States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\n@Component({\n\ttag: 'kol-badge',\n\tstyleUrls: {\n\t\tdefault: './style.sass',\n\t},\n\tshadow: true,\n})\nexport class KolBadge implements Props {\n\tprivate bgColorStr = '#000';\n\tprivate colorStr = '#fff';\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<kol-span-wc\n\t\t\t\t\tclass={{\n\t\t\t\t\t\t'smart-button': typeof this.state._smartButton === 'object' && this.state._smartButton !== null,\n\t\t\t\t\t}}\n\t\t\t\t\t_label={this._label}\n\t\t\t\t\t_icon={this._icon}\n\t\t\t\t\t_iconOnly={this._iconOnly}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tbackgroundColor: this.bgColorStr,\n\t\t\t\t\t\tcolor: this.colorStr,\n\t\t\t\t\t}}\n\t\t\t\t></kol-span-wc>\n\t\t\t\t{typeof this.state._smartButton === 'object' && this.state._smartButton !== null && (\n\t\t\t\t\t<kol-button-wc\n\t\t\t\t\t\t_ariaLabel={this.state._smartButton._ariaLabel}\n\t\t\t\t\t\t_customClass={this.state._smartButton._customClass}\n\t\t\t\t\t\t_disabled={this.state._smartButton._disabled}\n\t\t\t\t\t\t_icon={this.state._smartButton._icon}\n\t\t\t\t\t\t_iconOnly={true}\n\t\t\t\t\t\t_id={this.state._smartButton._id}\n\t\t\t\t\t\t_label={this.state._smartButton._label}\n\t\t\t\t\t\t_on={this.state._smartButton._on}\n\t\t\t\t\t\t_tooltipAlign={this.state._smartButton._tooltipAlign}\n\t\t\t\t\t\t_variant={this.state._smartButton._variant}\n\t\t\t\t\t></kol-button-wc>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt die Farbe des Hintergrundes bzw. der Schrift an.\n\t */\n\t@Prop() public _color?: string | KoliBriColor = Nationalfarben.Schwarz;\n\n\t/**\n\t * Gibt einen Identifier eines Icons aus den Icofont's an. (https://icofont.com/)\n\t */\n\t@Prop() public _icon?: Stringified<KoliBriIconProp>;\n\n\t/**\n\t * Gibt an, ob das Icon entweder links oder rechts dargestellt werden soll.\n\t * @deprecated\n\t */\n\t@Prop() public _iconAlign?: Alignment = 'left';\n\n\t/**\n\t * Gibt an, ob nur das Icon angezeigt wird.\n\t */\n\t@Prop({ reflect: true }) public _iconOnly?: boolean = false;\n\n\t/**\n\t * Gibt den Label-Text des Badges an.\n\t */\n\t@Prop() public _label!: string;\n\n\t/**\n\t * Ermöglicht einen Schalter ins das Eingabefeld mit einer beliebigen Aktion zu einzufügen (nur Icon-Only).\n\t */\n\t@Prop() public _smartButton?: Stringified<ButtonProps>;\n\n\t/**\n\t * @see: components/abbr/component.tsx (@State)\n\t */\n\t@State() public state: States = {\n\t\t_color: Nationalfarben.Schwarz,\n\t};\n\n\tprivate handleColorChange = (value: unknown) => {\n\t\tlet color = value as string | KoliBriColor;\n\t\tlet colorPair: KoliBriContrastColor;\n\t\tif (typeof color === 'string') {\n\t\t\tif (HACK_REG_EX.test(color)) {\n\t\t\t\t// Catch Breaking Change - remove next Major\n\t\t\t\tdevHint(\n\t\t\t\t\t`[KolBadge] Bitte verwenden Sie zukünftig nur noch das Standard-Farbformat für CSS (https://developer.mozilla.org/en-US/docs/Web/CSS/color_value).`\n\t\t\t\t);\n\t\t\t\tcolor = `#${color}`;\n\t\t\t}\n\t\t\tcolorPair = createContrastColorPair(color);\n\t\t} else {\n\t\t\tcolorPair = createContrastColorPair({\n\t\t\t\tbaseColor: color.backgroundColor,\n\t\t\t\tcontrastColor: color.color,\n\t\t\t});\n\t\t}\n\t\tthis.bgColorStr = colorPair.baseColor;\n\t\tthis.colorStr = colorPair.contrastColor;\n\t};\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_color')\n\tpublic validateColor(value?: string | KoliBriColor): void {\n\t\twatchValidator(\n\t\t\tthis,\n\t\t\t'_color',\n\t\t\t(value) => typeof value === 'string' || (typeof value === 'object' && value !== null),\n\t\t\tnew Set(['string', 'KoliBriColor']),\n\t\t\tvalue,\n\t\t\t{\n\t\t\t\tdefaultValue: Nationalfarben.Schwarz,\n\t\t\t\thooks: {\n\t\t\t\t\tbeforePatch: this.handleColorChange,\n\t\t\t\t},\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_smartButton')\n\tpublic validateSmartButton(value?: ButtonProps | string): void {\n\t\tobjectObjectHandler(value, () => {\n\t\t\ttry {\n\t\t\t\tvalue = parseJson<ButtonProps>(value as string);\n\t\t\t\t// eslint-disable-next-line no-empty\n\t\t\t} catch (e) {\n\t\t\t\t// value behält den ursprünglichen Wert\n\t\t\t}\n\t\t\tsetState(this, '_smartButton', value);\n\t\t});\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentWillLoad)\n\t */\n\tpublic componentWillLoad(): void {\n\t\tthis.validateColor(this._color);\n\t\tthis.validateSmartButton(this._smartButton);\n\t}\n}\n"],"version":3}
1
+ {"file":"component.js","mappings":";;;;;;;;;;;MAuLa,qBAAqB,GAAG,CAAC,SAAoC,EAAE,QAAgB,EAAE,KAAwB;EACrH,cAAc,CACb,SAAS,EACT,QAAQ,EACR,CAAC,KAAK,KAAK,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,MAAM,EACzF,IAAI,GAAG,CAAC,CAAC,6CAA6C,CAAC,CAAC,EACxD,KAAK,EACL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,IAAI,CAAC,iBAAiB;OACnC;KACD,CACD,CAAC;GACF;EAMM,mBAAmB,CAAC,KAA4B;IACtD,mBAAmB,CAAC,KAAK,EAAE;MAC1B,IAAI;QACH,KAAK,GAAG,SAAS,CAAc,KAAe,CAAC,CAAC;OAEhD;MAAC,OAAO,CAAC,EAAE;OAEX;MACD,QAAQ,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,CAAC,CAAC;KACtC,CAAC,CAAC;GACH;EAKM,iBAAiB;IACvB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAChC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;GAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["hex","defaultStyleCss","HTMLElement"],"sources":["./src/types/button-link.ts","./src/components/badge/contrast.ts","./src/utils/reuse.ts","./src/utils/validators/tab-index.ts","./src/components/form/controller.ts","./src/components/button/controller.ts","./src/components/tooltip/style.sass?tag=kol-tooltip&mode=default","./src/components/tooltip/component.tsx","./src/components/button/component.tsx","./src/components/badge/style.sass?tag=kol-badge&mode=default&encapsulation=shadow","./src/components/badge/component.tsx"],"sourcesContent":["import { TooltipAlignment } from '../components/tooltip/component';\nimport { Events } from '../enums/events';\nimport { Generic } from '@public-ui/core';\nimport { watchValidator } from '../utils/prop.validators';\nimport { EventCallback } from './callbacks';\nimport { Alignment, KoliBriCustomIcon, KoliBriIconProp } from './icon';\nimport { Stringified } from './common';\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current#values\n */\nexport type AriaCurrent = boolean | 'page' | 'step' | 'location' | 'date' | 'time';\nexport type AlternativButtonLinkRole = 'tab';\n\n/**\n * https://twitter.com/housecor/status/1541037184622403584?t=HoUiOAZEcXFeuDl-VWAEZg\n * https://mui.com/material-ui/react-link/#accessibility\n * https://mui.com/material-ui/react-button/#text-button\n */\ntype RequiredButtonAndLinkProps = {\n\tlabel: string;\n};\ntype OptionalButtonAndLinkProps = {\n\tariaControls: string;\n\tariaCurrent: AriaCurrent;\n\tariaExpanded: boolean;\n\tariaLabel: string;\n\tariaSelected: boolean;\n\tdisabled: boolean; // TODO: Link disabled?!\n\ticon: Stringified<KoliBriIconProp>;\n\t/**\n\t * @deprecated\n\t */\n\ticonAlign: Alignment;\n\ticonOnly: boolean;\n\trole: AlternativButtonLinkRole;\n\ttabIndex: number;\n\ttooltipAlign: TooltipAlignment;\n};\n\ntype RequiredButtonAndLinkStates = {\n\tariaLabel: string;\n\ticon: {\n\t\ttop?: KoliBriCustomIcon;\n\t\tright?: KoliBriCustomIcon;\n\t\tbottom?: KoliBriCustomIcon;\n\t\tleft?: KoliBriCustomIcon;\n\t};\n\t/**\n\t * @deprecated\n\t */\n\ticonAlign: Alignment;\n\tlabel: string;\n};\ntype OptionalButtonAndLinkStates = {\n\tariaControls: string;\n\tariaCurrent: AriaCurrent;\n\tariaExpanded: boolean;\n\tariaSelected: boolean;\n\tdisabled: boolean;\n\ticonOnly: boolean;\n\trole: AlternativButtonLinkRole;\n\ttabIndex: number;\n\ttooltipAlign: TooltipAlignment;\n};\n\n/* Button */\n\nexport type KoliBriButtonType = 'button' | 'reset' | 'submit';\nexport type KoliBriButtonVariant = 'primary' | 'secondary' | 'normal' | 'danger' | 'ghost' | 'custom';\n\nexport type KoliBriButtonCallbacks = {\n\t[Events.onClick]?: EventCallback<PointerEvent>;\n\t[Events.onMouseDown]?: EventCallback<MouseEvent>;\n};\n\nexport type KoliBriButtonVariantCustomClass = {\n\tcustomClass: string;\n\tvariant: KoliBriButtonVariant;\n};\n\n/**\n * API ButtonLink\n */\nexport type RequiredButtonLinkProps = RequiredButtonAndLinkProps;\nexport type OptionalButtonLinkProps = OptionalButtonAndLinkProps & {\n\t/**\n\t * @deprecated Zweck?!\n\t */\n\taccessKey: string;\n\tid: string;\n\ton: KoliBriButtonCallbacks;\n\ttype: KoliBriButtonType;\n};\n// type ButtonLinkProps = Generic.Element.Members<RequiredButtonProps, OptionalButtonProps>;\n\nexport type RequiredButtonLinkStates = RequiredButtonAndLinkStates & {\n\ttype: KoliBriButtonType;\n};\nexport type OptionalButtonLinkStates = OptionalButtonAndLinkStates &\n\tKoliBriButtonVariantCustomClass & {\n\t\t/**\n\t\t * @deprecated Zweck?!\n\t\t */\n\t\taccessKey: string;\n\t\tid: string;\n\t\ton: KoliBriButtonCallbacks;\n\t};\n// type ButtonLinkStates = Generic.Element.Members<RequiredButtonStates, OptionalButtonStates>;\n\n/**\n * API Button\n */\nexport type RequiredButtonProps = RequiredButtonLinkProps;\nexport type OptionalButtonProps = OptionalButtonLinkProps & KoliBriButtonVariantCustomClass;\nexport type ButtonProps = Generic.Element.Members<RequiredButtonProps, OptionalButtonProps>;\n\nexport type RequiredButtonStates = RequiredButtonLinkStates;\nexport type OptionalButtonStates = OptionalButtonLinkStates & KoliBriButtonVariantCustomClass;\nexport type ButtonStates = Generic.Element.Members<RequiredButtonStates, OptionalButtonStates>;\n\n/* LINK */\n\nexport type LinkOnCallbacks = {\n\t[Events.onClick]?: EventCallback<Event>;\n};\n\n// https://www.w3schools.com/tags/att_a_target.asp\nexport type LinkTarget = '_blank' | '_parent' | '_self' | '_top' | string;\n\nexport type LinkUseCase = 'text' | 'image' | 'nav';\n\n/**\n * API Link\n */\nexport type RequiredLinkProps = RequiredButtonAndLinkProps;\nexport type OptionalLinkProps = OptionalButtonAndLinkProps & {\n\tfill: boolean;\n\thref: string;\n\t/**\n\t * @deprecated Verwende stattdessen einen Button _showAs=link.\n\t */\n\ton: LinkOnCallbacks;\n\tpart: string;\n\tselector: string;\n\tstealth: boolean;\n\ttarget: LinkTarget;\n\ttargetDescription: string;\n\tunderline: boolean;\n\tuseCase: LinkUseCase;\n};\nexport type LinkProps = Generic.Element.Members<RequiredLinkProps, OptionalLinkProps>;\n\nexport type RequiredLinkStates = RequiredButtonAndLinkStates;\nexport type OptionalLinkStates = OptionalButtonAndLinkStates & {\n\tariaSelected: boolean;\n\tfill: boolean;\n\thref: string;\n\t/**\n\t * @deprecated Verwende stattdessen einen Button _showAs=link.\n\t */\n\ton: LinkOnCallbacks;\n\tpart: string;\n\tselector: string;\n\tstealth: boolean;\n\ttarget: LinkTarget;\n\ttargetDescription: string;\n\tunderline: boolean;\n\tuseCase: LinkUseCase;\n};\nexport type LinkStates = Generic.Element.Members<RequiredLinkStates, OptionalLinkStates>;\n\n/**\n * API LinkButton\n */\nexport type RequiredLinkButtonProps = RequiredLinkProps;\nexport type OptionalLinkButtonProps = OptionalLinkProps & KoliBriButtonVariantCustomClass;\n// type LinkButtonProps = Generic.Element.Members<RequiredLinkButtonProps, OptionalLinkButtonProps>;\n\nexport type RequiredLinkButtonStates = RequiredLinkStates;\nexport type OptionalLinkButtonStates = OptionalLinkStates & KoliBriButtonVariantCustomClass;\nexport type LinkButtonStates = Generic.Element.Members<RequiredLinkButtonStates, OptionalLinkButtonStates>;\n\nexport const watchTooltipAlignment = (component: Generic.Element.Component, propName: string, value?: TooltipAlignment): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\tpropName,\n\t\t(value) => value === 'top' || value === 'right' || value === 'bottom' || value === 'left',\n\t\tnew Set(['TooltipAlignment {top, right, buttom, left}']),\n\t\tvalue,\n\t\t{\n\t\t\tdefaultValue: 'top',\n\t\t}\n\t);\n};\n","import { rgbaConvert } from './rgba-convert';\nimport { hex } from 'wcag-contrast';\nimport { colorRgba } from './color-rgba';\nimport { RGB } from 'color-convert/conversions';\n\ntype RGBA = [number, number, number, number];\n\n// const calcColor = (color: RGBA, diff: number): RGBA => [\n// Math.max(Math.min(Math.round(color[0] + (color[0] / 100 + 1) * diff), 255), 0),\n// Math.max(Math.min(Math.round(color[1] + (color[1] / 100 + 1) * diff), 255), 0),\n// Math.max(Math.min(Math.round(color[2] + (color[2] / 100 + 1) * diff), 255), 0),\n// color[3],\n// ];\n\n// const relativeLuminanceFormel = (c: number): number => {\n// if (c <= 0.03928) {\n// return c / 12.92;\n// } else {\n// return ((c + 0.055) / 1.055) ** 2.4;\n// }\n// };\n// // https://www.w3.org/TR/WCAG20/#contrast-ratiodef\n// const relativeLuminance = (r: number, g: number, b: number): number => {\n// return (\n// 0.2126 * relativeLuminanceFormel(r) + 0.7152 * relativeLuminanceFormel(g) + 0.0722 * relativeLuminanceFormel(b)\n// );\n// };\n\n// https://css-tricks.com/snippets/javascript/random-hex-color/\n// const randomColor = () => Math.floor(Math.random() * 16777215).toString(16);\n\n// https://24ways.org/2010/calculating-color-contrast/\n// ts-prune-ignore-next\nexport const getContrastYIQ = (r: number, g: number, b: number): number => {\n\tconst yiq = (r * 299 + g * 587 + b * 114) / 1000;\n\treturn yiq >= 128 ? -1 : 1;\n};\n\n// ts-prune-ignore-next\nexport const calcContrastColor = (baseColor: RGB, contrastColor: RGB, ratio: number, dir = 1): RGB => {\n\tconst color: RGB = [\n\t\tMath.max(Math.min(Math.round(contrastColor[0] + dir * Math.max(1, contrastColor[0] / 100)), 255), 0),\n\t\tMath.max(Math.min(Math.round(contrastColor[1] + dir * Math.max(1, contrastColor[1] / 100)), 255), 0),\n\t\tMath.max(Math.min(Math.round(contrastColor[2] + dir * Math.max(1, contrastColor[2] / 100)), 255), 0),\n\t];\n\tconst contrast = hex(rgbaConvert.hex(`rgba(${baseColor.join(',')},1)`), rgbaConvert.hex(`rgba(${color.join(',')},1)`));\n\tconst summe = color[0] + color[1] + color[2];\n\tif (summe === 0 || summe === 765 || contrast > ratio) {\n\t\treturn color;\n\t} else {\n\t\treturn calcContrastColor(baseColor, color, ratio, dir);\n\t}\n};\n\n// ts-prune-ignore-next\nexport const getContrastColor = (baseColor: RGB, contrastcolor: RGB, ratio: number, dir = 1): RGB => {\n\tif (cache.has(baseColor)) {\n\t\treturn cache.get(baseColor) as RGB;\n\t}\n\tconst color = calcContrastColor(baseColor, contrastcolor, ratio, dir);\n\tcache.set(baseColor, color);\n\treturn color;\n};\n\nconst cache: Map<unknown, RGB> = new Map();\n\nexport type KoliBriContrastColor = {\n\tbaseColor: string;\n\tcontrastColor: string;\n};\n\nexport const createContrastColorPair = (color: string | KoliBriContrastColor, contrastRatio = 7): KoliBriContrastColor => {\n\tlet baseColor: RGBA = [0, 0, 0, 1];\n\tlet contrastColor: RGBA = [255, 255, 255, 1];\n\tif (typeof color === 'string') {\n\t\tbaseColor = colorRgba(color);\n\t\tcontrastColor = baseColor;\n\t} else if (typeof color === 'object' && color !== null && typeof color.baseColor === 'string') {\n\t\tbaseColor = colorRgba(color.baseColor);\n\t\tif (typeof color.contrastColor === 'string') {\n\t\t\tcontrastColor = colorRgba(color.contrastColor);\n\t\t} else {\n\t\t\tcontrastColor = baseColor;\n\t\t}\n\t}\n\tconst yiq = getContrastYIQ(baseColor[0], baseColor[1], baseColor[2]);\n\tconst contrastColorRGB = getContrastColor(\n\t\t[baseColor[0], baseColor[1], baseColor[2]],\n\t\t[contrastColor[0], contrastColor[1], contrastColor[2]],\n\t\tcontrastRatio,\n\t\tyiq\n\t);\n\tcontrastColor = [...contrastColorRGB, 1];\n\n\treturn {\n\t\tbaseColor: rgbaConvert.hex(`rgba(${baseColor.join(',')})`),\n\t\tcontrastColor: rgbaConvert.hex(`rgba(${contrastColor.join(',')})`),\n\t};\n};\n","import { isObject } from './validator';\n\nexport const propergateFocus = <H extends HTMLElement, R extends HTMLElement>(host?: H, ref?: R) => {\n\tif (isObject(host) && host) {\n\t\thost.focus = (ops: FocusOptions) => ref?.focus(ops);\n\t}\n};\n\n/**\n * If you need a tiny setTimeout with clearTimeout, you can\n * use this compact implementation.\n *\n * @param cb Callback with the code to run\n * @param delay Timeout delay\n */\n// ts-prune-ignore-next\nexport const smartSetTimeout = (cb: () => void, delay?: number) => {\n\tconst timeout = setTimeout(() => {\n\t\tclearTimeout(timeout);\n\t\tcb();\n\t}, delay);\n};\n","import { Generic } from '@public-ui/core';\nimport { a11yHint } from '../a11y.tipps';\nimport { watchNumber, WatchNumberOptions } from '../prop.validators';\n\n/**\n * Accessibility hints\n * - https://adrianroselli.com/2014/11/dont-use-tabindex-greater-than-0.html\n */\n\nconst options: WatchNumberOptions = {\n\thooks: {\n\t\tafterPatch: (value) => {\n\t\t\tif (value !== -1 && value !== 0) {\n\t\t\t\ta11yHint(`Don’t Use Tabindex Greater than 0: https://adrianroselli.com/2014/11/dont-use-tabindex-greater-than-0.html`);\n\t\t\t}\n\t\t},\n\t},\n};\n\n/**\n * Diese Methode validiert das Property und setzt den State, wenn es valide ist.\n */\nexport const validateTabIndex = (component: Generic.Element.Component, value?: number): void => {\n\twatchNumber(component, '_tabIndex', value, options);\n};\n","import { devHint } from '../../utils/a11y.tipps';\nimport { getExperimalMode } from '../../utils/dev.utils';\nimport { KoliBriDevHelper, setEventTargetAndStopPropagation } from '../../utils/prop.validators';\n\nconst searchFormElement = (el?: HTMLElement | ParentNode | null): HTMLElement | ParentNode | null | undefined => {\n\tif (getExperimalMode()) {\n\t\tdevHint(`↓ Search form element start.`);\n\t\tconsole.log(el);\n\t}\n\twhile (el instanceof HTMLElement && el.tagName !== 'FORM' && el.tagName !== 'KOL-FORM') {\n\t\tif (el.parentElement instanceof HTMLElement) {\n\t\t\tel = el.parentElement;\n\t\t} else if (el.parentNode instanceof ShadowRoot) {\n\t\t\tel = el.parentNode.host;\n\t\t} else {\n\t\t\tel = null;\n\t\t}\n\t\tif (getExperimalMode()) {\n\t\t\tconsole.log(el);\n\t\t}\n\t}\n\tif (getExperimalMode()) {\n\t\tdevHint(`↑ Search form element finished.`);\n\t}\n\treturn el;\n};\n\nexport const propergateResetEventToForm = (\n\toptions: {\n\t\tform?: HTMLElement | ParentNode | null;\n\t\tref?: HTMLElement;\n\t} = {}\n): void => {\n\tconst form = searchFormElement(options.form);\n\tif (form instanceof HTMLElement) {\n\t\tconst event = new Event('reset', {\n\t\t\tbubbles: true,\n\t\t\tcancelable: true,\n\t\t});\n\t\tif (form.tagName === 'FORM') {\n\t\t\tsetEventTargetAndStopPropagation(event, form);\n\t\t\tform.dispatchEvent(event);\n\t\t} else if (form.tagName === 'KOL-FORM') {\n\t\t\tsetEventTargetAndStopPropagation(event, KoliBriDevHelper.querySelector('form', form) as HTMLFormElement);\n\t\t\tconst kolForm = form as HTMLKolFormElement;\n\t\t\tif (typeof kolForm._on === 'object' && typeof kolForm._on !== null && typeof kolForm._on.onReset === 'function') {\n\t\t\t\tkolForm._on.onReset(event);\n\t\t\t}\n\t\t}\n\t}\n};\n\nexport const propergateSubmitEventToForm = (\n\toptions: {\n\t\tform?: HTMLElement | ParentNode | null;\n\t\tref?: HTMLElement;\n\t} = {}\n): void => {\n\tconst form = searchFormElement(options.form);\n\tif (form instanceof HTMLElement) {\n\t\tconst event = new SubmitEvent('submit', {\n\t\t\tbubbles: true,\n\t\t\tcancelable: true,\n\t\t\tsubmitter: form,\n\t\t});\n\t\t/**\n\t\t * TODO: Wenn Formular-Action (nicht Ajax oder JS) verwendet wird,\n\t\t * dann müssen wir das Event an das HTMLFormElement innerhalb\n\t\t * der HTMLKolFormElements propagieren, wenn kein onSubmit\n\t\t * gesetzt wurde.\n\t\t *\n\t\t * TODO: Form-associated custom elements:\n\t\t * - https://web.dev/more-capable-form-controls/\n\t\t * - https://github.com/public-ui/kolibri/issues/946\n\t\t */\n\t\tif (form.tagName === 'FORM') {\n\t\t\tsetEventTargetAndStopPropagation(event, form);\n\t\t\tform.dispatchEvent(event);\n\t\t} else if (form.tagName === 'KOL-FORM') {\n\t\t\tsetEventTargetAndStopPropagation(event, KoliBriDevHelper.querySelector('form', form) as HTMLFormElement);\n\t\t\tconst kolForm = form as HTMLKolFormElement;\n\t\t\tif (typeof kolForm._on === 'object' && typeof kolForm._on !== null && typeof kolForm._on.onSubmit === 'function') {\n\t\t\t\tkolForm._on.onSubmit(event);\n\t\t\t}\n\t\t}\n\t}\n};\n","import { Generic } from '@public-ui/core';\nimport { KoliBriButtonType, KoliBriButtonVariant } from '../../types/button-link';\nimport { watchValidator } from '../../utils/prop.validators';\n\nexport const watchButtonType = (component: Generic.Element.Component, propName: string, value?: KoliBriButtonType): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\tpropName,\n\t\t(value) => value === 'button' || value === 'reset' || value === 'submit',\n\t\tnew Set(['KoliBriButtonType {button, reset, submit}']),\n\t\tvalue\n\t);\n};\n\nexport const watchButtonVariant = (component: Generic.Element.Component, propName: string, value?: KoliBriButtonVariant): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\tpropName,\n\t\t(value) => value === 'primary' || value === 'secondary' || value === 'normal' || value === 'danger' || value === 'ghost' || value === 'custom',\n\t\tnew Set(['KoliBriButtonVariant {primary, secondary, normal, danger, ghost, custom}']),\n\t\tvalue,\n\t\t{\n\t\t\tdefaultValue: 'normal',\n\t\t}\n\t);\n};\n","/* windicss-touch: 1637820161169 */\n// @import ../style\n\nkol-badge,\n.tooltip /* fix sass formatter */\n\tfont-size: 1rem\n\tposition: fixed\n\t\t// position: absolute\n\t\t// position: relative\n\tanimation-name: fadeInOpacity\n\tanimation-iteration-count: 1\n\tanimation-timing-function: ease-in\n\tanimation-duration: .5s\n\tdisplay: none\n\tz-index: 1000\n\tmax-width: 300px\n\tbox-shadow: 0 0 0.15rem rgba(255,255,255,0.8)\n\n\t&::after\n\t\tcontent: \" \"\n\t\tposition: absolute\n\t\tborder-style: solid\n\t\tborder-width: 5px\n\n\t&.arrow-left\n\t\t&::after\n\t\t\tmargin-top: -5px\n\t\t\ttop: 50%\n\t\t\tright: 100%\n\t\t\tborder-color: transparent black transparent transparent\n\n\t&.arrow-right\n\t\t&::after\n\t\t\tmargin-top: -5px\n\t\t\ttop: 50%\n\t\t\tleft: 100%\n\t\t\tborder-color: transparent transparent transparent black\n\n\t&.arrow-top\n\t\t&::after\n\t\t\tmargin-left: -5px\n\t\t\tleft: 50%\n\t\t\tbottom: 100%\n\t\t\tborder-color: transparent transparent black transparent\n\n\t&.arrow-bottom\n\t\t&::after\n\t\t\tmargin-left: -5px\n\t\t\tleft: 50%\n\t\t\ttop: 100%\n\t\t\tborder-color: black transparent transparent transparent\n\n\t// &::before\n\t// content: ''\n\t// display: inline-block\n\t// vertical-align: middle\n\t// -webkit-transform: rotate(360deg)\n\t// border-style: solid\n\t// border-width: .5rem .5rem .5rem 0\n\t// border-color: transparent black transparent transparent\n\n@keyframes fadeInOpacity\n\t0%\n\t\topacity: 0\n\n\t100%\n\t\topacity: 1\n","import { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@public-ui/core';\nimport { watchTooltipAlignment } from '../../types/button-link';\nimport { getDocument, nonce } from '../../utils/dev.utils';\nimport { watchString } from '../../utils/prop.validators';\n\nexport type TooltipAlignment = 'top' | 'right' | 'bottom' | 'left';\n\n/**\n * API\n */\ntype RequiredProps = {\n\tlabel: string;\n};\ntype OptionalProps = {\n\talign: TooltipAlignment;\n\tid: string;\n};\nexport type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = RequiredProps & OptionalProps;\ntype OptionalStates = unknown;\nexport type States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\n@Component({\n\ttag: 'kol-tooltip',\n\tstyleUrls: {\n\t\tdefault: './style.sass',\n\t},\n\tshadow: false,\n})\nexport class KolTooltip implements Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates> {\n\t// - eslint-disable-next-line @stencil/own-props-must-be-private\n\tpublic hydrated = false; // TODO: Why?!\n\n\tprivate hostElement?: HTMLElement | null = null;\n\tprivate readonly childElements: HTMLElement[] = [];\n\tprivate tooltipElement?: HTMLKolBadgeElement;\n\n\tprivate alignTooltip = (): void => {\n\t\tconst target = this.childElements[0];\n\n\t\t// getBoundingClientRect is not defined in test suite\n\t\tif (process.env.NODE_ENV !== 'test') {\n\t\t\tconst clientRect = target.getBoundingClientRect();\n\n\t\t\tif (this.tooltipElement instanceof HTMLElement) {\n\t\t\t\tswitch (this.state._align) {\n\t\t\t\t\tcase 'top':\n\t\t\t\t\tcase 'bottom':\n\t\t\t\t\t\tthis.tooltipElement.style.left = `${clientRect.left + target.offsetWidth / 2 - this.tooltipElement.offsetWidth / 2}px`;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'left':\n\t\t\t\t\tcase 'right':\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthis.tooltipElement.style.top = `${clientRect.top + clientRect.height / 2 - this.tooltipElement.offsetHeight / 2}px`;\n\t\t\t\t}\n\t\t\t\tswitch (this.state._align) {\n\t\t\t\t\tcase 'left':\n\t\t\t\t\t\tthis.tooltipElement.style.left = `calc(${clientRect.left - this.tooltipElement.offsetWidth}px - 0.5em)`;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'right':\n\t\t\t\t\t\tthis.tooltipElement.style.left = `calc(${clientRect.right}px + 0.5em)`;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'bottom':\n\t\t\t\t\t\tthis.tooltipElement.style.top = `calc(${clientRect.bottom}px + 0.5em)`;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'top':\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthis.tooltipElement.style.top = `calc(${clientRect.top - this.tooltipElement.offsetHeight}px - 0.5em)`;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\tprivate showTooltip = (): void => {\n\t\tif (this.tooltipElement instanceof HTMLElement) {\n\t\t\tthis.tooltipElement.style.setProperty('display', 'block');\n\t\t\tgetDocument().body.addEventListener('keyup', this.hideTooltipByEscape);\n\t\t\tthis.alignTooltip();\n\t\t\tthis.tooltipElement.style.setProperty('visibility', 'visible');\n\t\t\tdocument.addEventListener('scroll', this.alignTooltip);\n\t\t}\n\t};\n\n\tprivate hideTooltip = (): void => {\n\t\tif (this.tooltipElement instanceof HTMLElement) {\n\t\t\tthis.tooltipElement.style.setProperty('display', 'none');\n\t\t\tthis.tooltipElement.style.setProperty('visibility', 'hidden');\n\t\t\tdocument.removeEventListener('scroll', this.alignTooltip);\n\t\t}\n\t};\n\n\tprivate hideTooltipByEscape = (event: KeyboardEvent): void => {\n\t\tif (event.key === 'Escape') {\n\t\t\tgetDocument().body.removeEventListener('keyup', this.hideTooltipByEscape);\n\t\t\tthis.hideTooltip();\n\t\t}\n\t};\n\n\tprivate catchHostElement = (element: HTMLElement | null): void => {\n\t\tthis.hostElement = element;\n\t\tif (this.hostElement instanceof HTMLElement) {\n\t\t\tconst previousSibling = this.hostElement.previousElementSibling;\n\t\t\tif (previousSibling instanceof HTMLElement) {\n\t\t\t\tpreviousSibling.removeEventListener('mouseover', this.showTooltip);\n\t\t\t\tpreviousSibling.addEventListener('mouseover', this.showTooltip);\n\t\t\t\tpreviousSibling.removeEventListener('focus', this.showTooltip);\n\t\t\t\tpreviousSibling.addEventListener('focus', this.showTooltip);\n\t\t\t\tpreviousSibling.removeEventListener('mouseout', this.hideTooltip);\n\t\t\t\tpreviousSibling.addEventListener('mouseout', this.hideTooltip);\n\t\t\t\tpreviousSibling.removeEventListener('blur', this.hideTooltip);\n\t\t\t\tpreviousSibling.addEventListener('blur', this.hideTooltip);\n\t\t\t\tthis.childElements.push(previousSibling);\n\t\t\t}\n\t\t}\n\t};\n\n\tprivate catchTooltipElement = (element?: HTMLKolBadgeElement): void => {\n\t\tthis.tooltipElement = element;\n\t};\n\n\tpublic render(): JSX.Element {\n\t\tconst timeout = setTimeout(() => {\n\t\t\tclearTimeout(timeout);\n\t\t\tthis.alignTooltip();\n\t\t}, 250);\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tref={this.catchHostElement}\n\t\t\t\tstyle={{\n\t\t\t\t\tmaxWidth: '300px',\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{this.state._label !== '' && (\n\t\t\t\t\t<kol-badge\n\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t'arrow-bottom': this.state._align === 'top',\n\t\t\t\t\t\t\t'arrow-left': this.state._align === 'right',\n\t\t\t\t\t\t\t'arrow-top': this.state._align === 'bottom',\n\t\t\t\t\t\t\t'arrow-right': this.state._align === 'left',\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tid={this.state._id}\n\t\t\t\t\t\tref={this.catchTooltipElement}\n\t\t\t\t\t\t_color={{\n\t\t\t\t\t\t\tbackgroundColor: '#333',\n\t\t\t\t\t\t\tcolor: '#ddd',\n\t\t\t\t\t\t}}\n\t\t\t\t\t\t_label={this.state._label}\n\t\t\t\t\t></kol-badge>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt an, ob der Tooltip oben, rechts, unten oder links angezeigt werden soll.\n\t */\n\t@Prop() public _align?: TooltipAlignment = 'top';\n\n\t/**\n\t * Gibt die ID an, wenn z.B. Aria-Labelledby (Link) verwendet wird.\n\t */\n\t@Prop() public _id?: string;\n\n\t/**\n\t * Das Label gibt an, welcher Text in dem Tooltip beim Fokussieren oder Maus-drüberfahren angezeigt wird.\n\t */\n\t@Prop() public _label!: string;\n\n\t/**\n\t * @see: components/abbr/component.tsx (@State)\n\t */\n\t@State() public state: States = {\n\t\t_align: 'top',\n\t\t_id: nonce(),\n\t\t_label: '',\n\t};\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_align')\n\tpublic validateAlign(value?: TooltipAlignment): void {\n\t\twatchTooltipAlignment(this, '_align', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_id')\n\tpublic validateId(value?: string): void {\n\t\twatchString(this, '_id', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_label')\n\tpublic validateLabel(value?: string): void {\n\t\twatchString(this, '_label', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentWillLoad)\n\t */\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAlign(this._align);\n\t\tthis.validateId(this._id);\n\t\tthis.validateLabel(this._label);\n\t\tthis.hydrated = true;\n\t}\n}\n","import { Component, Element, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@public-ui/core';\nimport {\n\tAlternativButtonLinkRole,\n\tAriaCurrent,\n\tButtonStates,\n\tKoliBriButtonCallbacks,\n\tKoliBriButtonType,\n\tKoliBriButtonVariant,\n\tOptionalButtonProps,\n\tOptionalButtonStates,\n\tRequiredButtonProps,\n\tRequiredButtonStates,\n\twatchTooltipAlignment,\n} from '../../types/button-link';\nimport { Stringified } from '../../types/common';\nimport { Alignment, KoliBriIconProp } from '../../types/icon';\nimport { a11yHintDisabled, devHint } from '../../utils/a11y.tipps';\nimport { nonce } from '../../utils/dev.utils';\nimport {\n\tmapBoolean2String,\n\tmapStringOrBoolean2String,\n\tsetEventTargetAndStopPropagation,\n\twatchBoolean,\n\twatchString,\n\twatchValidator,\n} from '../../utils/prop.validators';\nimport { propergateFocus } from '../../utils/reuse';\nimport { validateIcon, watchIconAlign } from '../../utils/validators/icon';\nimport { validateAriaLabel, validateLabel } from '../../utils/validators/label';\nimport { validateTabIndex } from '../../utils/validators/tab-index';\nimport { propergateResetEventToForm, propergateSubmitEventToForm } from '../form/controller';\nimport { TooltipAlignment } from '../tooltip/component';\nimport { watchButtonType, watchButtonVariant } from './controller';\n\n/**\n * @internal\n */\n@Component({\n\ttag: 'kol-button-wc',\n\tshadow: false,\n})\nexport class KolButtonWc implements Generic.Element.ComponentApi<RequiredButtonProps, OptionalButtonProps, RequiredButtonStates, OptionalButtonStates> {\n\t@Element() private readonly host?: HTMLKolButtonWcElement;\n\tprivate readonly nonce = nonce();\n\tprivate ref?: HTMLButtonElement;\n\n\tprivate readonly catchRef = (ref?: HTMLButtonElement) => {\n\t\tthis.ref = ref;\n\t\tpropergateFocus(this.host, this.ref);\n\t};\n\n\tprivate readonly onClick = (event: Event) => {\n\t\tif (this.state._type === 'submit') {\n\t\t\tpropergateSubmitEventToForm({\n\t\t\t\tform: this.host,\n\t\t\t\tref: this.ref,\n\t\t\t});\n\t\t} else if (this.state._type === 'reset') {\n\t\t\tpropergateResetEventToForm({\n\t\t\t\tform: this.host,\n\t\t\t\tref: this.ref,\n\t\t\t});\n\t\t} else if (typeof this.state._on?.onClick === 'function') {\n\t\t\tsetEventTargetAndStopPropagation(event, this.ref);\n\t\t\tthis.state._on?.onClick(event as PointerEvent);\n\t\t} else {\n\t\t\tdevHint(`It was no button click callback configured!`);\n\t\t}\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<button\n\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\taccessKey={this.state._accessKey}\n\t\t\t\t\taria-controls={this.state._ariaControls}\n\t\t\t\t\taria-current={mapStringOrBoolean2String(this.state._ariaCurrent)}\n\t\t\t\t\taria-expanded={mapBoolean2String(this.state._ariaExpanded)}\n\t\t\t\t\taria-label={this.state._iconOnly === false ? this.state._ariaLabel || this.state._label : undefined}\n\t\t\t\t\taria-labelledby={this.state._iconOnly === true ? this.nonce : undefined}\n\t\t\t\t\taria-selected={mapStringOrBoolean2String(this.state._ariaSelected)}\n\t\t\t\t\tclass={{\n\t\t\t\t\t\t[this.state._variant as string]: this.state._variant !== 'custom',\n\t\t\t\t\t\t[this.state._customClass as string]:\n\t\t\t\t\t\t\tthis.state._variant === 'custom' && typeof this.state._customClass === 'string' && this.state._customClass.length > 0,\n\t\t\t\t\t\t'icon-only': this.state._iconOnly === true,\n\t\t\t\t\t}}\n\t\t\t\t\tdisabled={this.state._disabled}\n\t\t\t\t\tid={this.state._id}\n\t\t\t\t\t{...this.state._on}\n\t\t\t\t\tonClick={this.onClick}\n\t\t\t\t\trole={this.state._role}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\twidth: 'inherit',\n\t\t\t\t\t}}\n\t\t\t\t\ttabIndex={this.state._tabIndex}\n\t\t\t\t\ttype={this.state._type}\n\t\t\t\t>\n\t\t\t\t\t<kol-span-wc _icon={this._icon} _iconOnly={this._iconOnly} _label={this.state._ariaLabel || this.state._label}>\n\t\t\t\t\t\t<slot name=\"expert\" slot=\"expert\" />\n\t\t\t\t\t</kol-span-wc>\n\t\t\t\t</button>\n\t\t\t\t{this.state._iconOnly === true && (\n\t\t\t\t\t<kol-tooltip\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Dieses Aria-Hidden verhindert das doppelte Vorlesen des Labels,\n\t\t\t\t\t\t * verhindert aber nicht das Aria-Labelledby vorgelesen wird.\n\t\t\t\t\t\t */\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t_align={this.state._tooltipAlign}\n\t\t\t\t\t\t_id={this.nonce}\n\t\t\t\t\t\t_label={this.state._ariaLabel || this.state._label}\n\t\t\t\t\t></kol-tooltip>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt an, mit welcher Tastenkombination man den Button auslösen oder fokussieren kann.\n\t */\n\t@Prop() public _accessKey?: string;\n\n\t/**\n\t * Gibt an, welche Elemente kontrolliert werden. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls)\n\t */\n\t@Prop() public _ariaControls?: string;\n\n\t/**\n\t * Gibt an, welchen aktuellen Auswahlstatus der Button hat. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n\t */\n\t@Prop() public _ariaCurrent?: AriaCurrent;\n\n\t/**\n\t * Gibt an, ob durch den Button etwas aufgeklappt wurde. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n\t */\n\t@Prop({ reflect: true }) public _ariaExpanded?: boolean;\n\n\t/**\n\t * Gibt einen beschreibenden Text für den Screenreader an. Damit die\n\t * Sprachsteuerung von interaktiven Elementen funktioniert, muss der\n\t * Aria-Label-Text mit dem Label-Text des Buttons beginnen.\n\t *\n\t * - https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label\n\t */\n\t@Prop({ mutable: true, reflect: false }) public _ariaLabel?: string = '';\n\n\t/**\n\t * Gibt an, ob Element ausgewählt ist (role=tab). (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n\t */\n\t@Prop({ reflect: true }) public _ariaSelected?: boolean;\n\n\t/**\n\t * Gibt an, welche Custom-Class übergeben werden soll, wenn _variant=\"custom\" gesetzt ist.\n\t */\n\t@Prop() public _customClass?: string;\n\n\t/**\n\t * Gibt an, ob der Button deaktiviert ist.\n\t */\n\t@Prop({ reflect: true }) public _disabled?: boolean = false;\n\n\t/**\n\t * Gibt den Class-Identifier eines Icons eine eingebunden Icofont an. (z.B. https://icofont.com/)\n\t */\n\t@Prop() public _icon?: Stringified<KoliBriIconProp>;\n\n\t/**\n\t * Gibt an, ob das Icon links oder rechts dargestellt werden soll.\n\t *\n\t * @deprecated\n\t */\n\t@Prop() public _iconAlign?: Alignment = 'left';\n\n\t/**\n\t * Gibt an, ob nur das Icon angezeigt wird.\n\t */\n\t@Prop({ reflect: true }) public _iconOnly?: boolean = false;\n\n\t/**\n\t * Gibt die ID der Schaltfläche an. (Selection, Testing)\n\t */\n\t@Prop() public _id?: string;\n\n\t/**\n\t * Gibt den Label für die Beschriftung der Schaltfläche an.\n\t */\n\t// - eslint-disable-next-line @stencil/strict-mutable\n\t@Prop({ mutable: true, reflect: false }) public _label!: string;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für die Button-Events an.\n\t */\n\t@Prop() public _on?: KoliBriButtonCallbacks;\n\n\t/**\n\t * Gibt an, welche Role der Schalter hat.\n\t */\n\t@Prop() public _role?: AlternativButtonLinkRole;\n\n\t/**\n\t * Gibt an, welchen Tab-Index der Button hat. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Gibt an, ob der Tooltip oben, rechts, unten oder links angezeigt werden soll.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignment = 'top';\n\n\t/**\n\t * Gibt an, welche Typ der Button hat.\n\t */\n\t@Prop() public _type?: KoliBriButtonType = 'button';\n\n\t/**\n\t * Gibt an, welche Ausprägung der Button hat.\n\t */\n\t@Prop() public _variant?: KoliBriButtonVariant = 'normal';\n\n\t/**\n\t * @see: components/abbr/component.tsx (@State)\n\t */\n\t@State() public state: ButtonStates = {\n\t\t_ariaLabel: '',\n\t\t_icon: {},\n\t\t_iconAlign: 'left',\n\t\t_label: '',\n\t\t_on: {},\n\t\t_type: 'button',\n\t};\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_accessKey')\n\tpublic validateAccessKey(value?: string): void {\n\t\twatchString(this, '_accessKey', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_ariaControls')\n\tpublic validateAriaControls(value?: string): void {\n\t\twatchString(this, '_ariaControls', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_ariaCurrent')\n\tpublic validateAriaCurrent(value?: AriaCurrent): void {\n\t\twatchValidator(\n\t\t\tthis,\n\t\t\t'_ariaControls',\n\t\t\t(value) => value === true || value === 'date' || value === 'location' || value === 'page' || value === 'step' || value === 'time',\n\t\t\tnew Set(['boolean', 'String {data, location, page, step, time}']),\n\t\t\tvalue\n\t\t);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_ariaExpanded')\n\tpublic validateAriaExpanded(value?: boolean): void {\n\t\twatchBoolean(this, '_ariaExpanded', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_ariaLabel')\n\tpublic validateAriaLabel(value?: string): void {\n\t\tvalidateAriaLabel(this, value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_ariaSelected')\n\tpublic validateAriaSelected(value?: boolean): void {\n\t\twatchBoolean(this, '_ariaSelected', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_customClass')\n\tpublic validateCustomClass(value?: string): void {\n\t\twatchString(this, '_customClass', value, {\n\t\t\tdefaultValue: undefined,\n\t\t});\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_disabled')\n\tpublic validateDisabled(value?: boolean): void {\n\t\twatchBoolean(this, '_disabled', value);\n\t\tif (value === true) {\n\t\t\ta11yHintDisabled();\n\t\t}\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_icon')\n\tpublic validateIcon(value?: KoliBriIconProp): void {\n\t\tvalidateIcon(this, value);\n\t}\n\n\t/**\n\t * @deprecated\n\t */\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_iconAlign')\n\tpublic validateIconAlign(value?: Alignment): void {\n\t\twatchIconAlign(this, value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_iconOnly')\n\tpublic validateIconOnly(value?: boolean): void {\n\t\twatchBoolean(this, '_iconOnly', value, {\n\t\t\tdefaultValue: false,\n\t\t\t// hooks: {\n\t\t\t// beforePatch: (_value, nextState) => {\n\t\t\t// let ariaLabel = this.state._ariaLabel;\n\t\t\t// if (nextState.has('_ariaLabel')) {\n\t\t\t// ariaLabel = nextState.get('_ariaLabel') as string;\n\t\t\t// }\n\t\t\t// if (typeof ariaLabel !== 'string' || ariaLabel.length <= 0) {\n\t\t\t// devHint(`[KolButton]: Bevor Icon-Only aktiviert wird, muss ein Aria-Label bzw. Label gesetzt werden.`);\n\t\t\t// nextState.set('_iconOnly', false);\n\t\t\t// }\n\t\t\t// },\n\t\t\t// },\n\t\t});\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_id')\n\tpublic validateId(value?: string): void {\n\t\twatchString(this, '_id', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_label')\n\tpublic validateLabel(value?: string): void {\n\t\tvalidateLabel(this, value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_on')\n\tpublic validateOn(value?: KoliBriButtonCallbacks): void {\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\t_on: value,\n\t\t\t};\n\t\t}\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_role')\n\tpublic validateRole(value?: AlternativButtonLinkRole): void {\n\t\twatchString(this, '_role', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_tabIndex')\n\tpublic validateTabIndex(value?: number): void {\n\t\tvalidateTabIndex(this, value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_tooltipAlign')\n\tpublic validateTooltipAlign(value?: TooltipAlignment): void {\n\t\twatchTooltipAlignment(this, '_tooltipAlign', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_type')\n\tpublic validateType(value?: KoliBriButtonType): void {\n\t\twatchButtonType(this, '_type', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_variant')\n\tpublic validateVariant(value?: KoliBriButtonVariant): void {\n\t\twatchButtonVariant(this, '_variant', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentWillLoad)\n\t */\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAccessKey(this._accessKey);\n\t\tthis.validateAriaControls(this._ariaControls);\n\t\tthis.validateAriaCurrent(this._ariaCurrent);\n\t\tthis.validateAriaExpanded(this._ariaExpanded);\n\t\tthis.validateAriaLabel(this._ariaLabel);\n\t\tthis.validateAriaSelected(this._ariaSelected);\n\t\tthis.validateCustomClass(this._customClass);\n\t\tthis.validateDisabled(this._disabled);\n\t\tthis.validateIcon(this._icon);\n\t\t// this.validateIconAlign(this._iconAlign);\n\t\tthis.validateIconOnly(this._iconOnly);\n\t\tthis.validateId(this._id);\n\t\tthis.validateLabel(this._label);\n\t\tthis.validateOn(this._on);\n\t\tthis.validateRole(this._role);\n\t\tthis.validateTabIndex(this._tabIndex);\n\t\tthis.validateTooltipAlign(this._tooltipAlign);\n\t\tthis.validateType(this._type);\n\t\tthis.validateVariant(this._variant);\n\t}\n}\n","@import ../style\n\nspan\n display: inline-block\n border-radius: var(--kolibri-border-radius)\n @apply px-2 py-0.5\n","import { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@public-ui/core';\nimport { Nationalfarben } from '../../enums/color';\nimport { Alignment, KoliBriIconProp } from '../../types/icon';\nimport { devHint, featureHint } from '../../utils/a11y.tipps';\nimport { objectObjectHandler, parseJson, setState, watchValidator } from '../../utils/prop.validators';\nimport { createContrastColorPair, KoliBriContrastColor } from './contrast';\nimport { Stringified } from '../../types/common';\nimport { ButtonProps } from '../../types/button-link';\n\nfeatureHint(`[KolBadge] Optimierung des _color-Properties (rgba, rgb, hex usw.).`);\n\nconst HACK_REG_EX = /^([a-f0-9]{3}|[a-f0-9]{6})$/;\n\nexport type KoliBriColor = {\n\tbackgroundColor: string;\n\tcolor: string;\n};\n\n/**\n * API\n */\ntype RequiredProps = {\n\tlabel: string;\n};\ntype OptionalProps = {\n\tcolor: Stringified<KoliBriColor>;\n\ticon: Stringified<KoliBriIconProp>;\n\ticonOnly: boolean;\n\tsmarButton: Stringified<ButtonProps>;\n};\nexport type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = {\n\tcolor: Stringified<KoliBriColor>;\n};\ntype OptionalStates = {\n\tsmartButton: ButtonProps;\n};\nexport type States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\n@Component({\n\ttag: 'kol-badge',\n\tstyleUrls: {\n\t\tdefault: './style.sass',\n\t},\n\tshadow: true,\n})\nexport class KolBadge implements Props {\n\tprivate bgColorStr = '#000';\n\tprivate colorStr = '#fff';\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<kol-span-wc\n\t\t\t\t\tclass={{\n\t\t\t\t\t\t'smart-button': typeof this.state._smartButton === 'object' && this.state._smartButton !== null,\n\t\t\t\t\t}}\n\t\t\t\t\t_label={this._label}\n\t\t\t\t\t_icon={this._icon}\n\t\t\t\t\t_iconOnly={this._iconOnly}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tbackgroundColor: this.bgColorStr,\n\t\t\t\t\t\tcolor: this.colorStr,\n\t\t\t\t\t}}\n\t\t\t\t></kol-span-wc>\n\t\t\t\t{typeof this.state._smartButton === 'object' && this.state._smartButton !== null && (\n\t\t\t\t\t<kol-button-wc\n\t\t\t\t\t\t_ariaLabel={this.state._smartButton._ariaLabel}\n\t\t\t\t\t\t_customClass={this.state._smartButton._customClass}\n\t\t\t\t\t\t_disabled={this.state._smartButton._disabled}\n\t\t\t\t\t\t_icon={this.state._smartButton._icon}\n\t\t\t\t\t\t_iconOnly={true}\n\t\t\t\t\t\t_id={this.state._smartButton._id}\n\t\t\t\t\t\t_label={this.state._smartButton._label}\n\t\t\t\t\t\t_on={this.state._smartButton._on}\n\t\t\t\t\t\t_tooltipAlign={this.state._smartButton._tooltipAlign}\n\t\t\t\t\t\t_variant={this.state._smartButton._variant}\n\t\t\t\t\t></kol-button-wc>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt die Farbe des Hintergrundes bzw. der Schrift an.\n\t */\n\t@Prop() public _color?: string | KoliBriColor = Nationalfarben.Schwarz;\n\n\t/**\n\t * Gibt einen Identifier eines Icons aus den Icofont's an. (https://icofont.com/)\n\t */\n\t@Prop() public _icon?: Stringified<KoliBriIconProp>;\n\n\t/**\n\t * Gibt an, ob das Icon entweder links oder rechts dargestellt werden soll.\n\t * @deprecated\n\t */\n\t@Prop() public _iconAlign?: Alignment = 'left';\n\n\t/**\n\t * Gibt an, ob nur das Icon angezeigt wird.\n\t */\n\t@Prop({ reflect: true }) public _iconOnly?: boolean = false;\n\n\t/**\n\t * Gibt den Label-Text des Badges an.\n\t */\n\t@Prop() public _label!: string;\n\n\t/**\n\t * Ermöglicht einen Schalter ins das Eingabefeld mit einer beliebigen Aktion zu einzufügen (nur Icon-Only).\n\t */\n\t@Prop() public _smartButton?: Stringified<ButtonProps>;\n\n\t/**\n\t * @see: components/abbr/component.tsx (@State)\n\t */\n\t@State() public state: States = {\n\t\t_color: Nationalfarben.Schwarz,\n\t};\n\n\tprivate handleColorChange = (value: unknown) => {\n\t\tlet color = value as string | KoliBriColor;\n\t\tlet colorPair: KoliBriContrastColor;\n\t\tif (typeof color === 'string') {\n\t\t\tif (HACK_REG_EX.test(color)) {\n\t\t\t\t// Catch Breaking Change - remove next Major\n\t\t\t\tdevHint(\n\t\t\t\t\t`[KolBadge] Bitte verwenden Sie zukünftig nur noch das Standard-Farbformat für CSS (https://developer.mozilla.org/en-US/docs/Web/CSS/color_value).`\n\t\t\t\t);\n\t\t\t\tcolor = `#${color}`;\n\t\t\t}\n\t\t\tcolorPair = createContrastColorPair(color);\n\t\t} else {\n\t\t\tcolorPair = createContrastColorPair({\n\t\t\t\tbaseColor: color.backgroundColor,\n\t\t\t\tcontrastColor: color.color,\n\t\t\t});\n\t\t}\n\t\tthis.bgColorStr = colorPair.baseColor;\n\t\tthis.colorStr = colorPair.contrastColor;\n\t};\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_color')\n\tpublic validateColor(value?: string | KoliBriColor): void {\n\t\twatchValidator(\n\t\t\tthis,\n\t\t\t'_color',\n\t\t\t(value) => typeof value === 'string' || (typeof value === 'object' && value !== null),\n\t\t\tnew Set(['string', 'KoliBriColor']),\n\t\t\tvalue,\n\t\t\t{\n\t\t\t\tdefaultValue: Nationalfarben.Schwarz,\n\t\t\t\thooks: {\n\t\t\t\t\tbeforePatch: this.handleColorChange,\n\t\t\t\t},\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_smartButton')\n\tpublic validateSmartButton(value?: ButtonProps | string): void {\n\t\tobjectObjectHandler(value, () => {\n\t\t\ttry {\n\t\t\t\tvalue = parseJson<ButtonProps>(value as string);\n\t\t\t\t// eslint-disable-next-line no-empty\n\t\t\t} catch (e) {\n\t\t\t\t// value behält den ursprünglichen Wert\n\t\t\t}\n\t\t\tsetState(this, '_smartButton', value);\n\t\t});\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentWillLoad)\n\t */\n\tpublic componentWillLoad(): void {\n\t\tthis.validateColor(this._color);\n\t\tthis.validateSmartButton(this._smartButton);\n\t}\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{t as setState,w as watchString,C as emptyStringByArrayHandler,q as parseJson,a as watchValidator,p as objectObjectHandler}from"./prop.validators.js";import{d as defineCustomElement$c}from"./component5.js";import{d as defineCustomElement$2,a as defineCustomElement$9,b as defineCustomElement$b}from"./component.js";import{d as defineCustomElement$a}from"./shadow2.js";import{d as defineCustomElement$8}from"./component4.js";import{d as defineCustomElement$7}from"./component2.js";import{d as defineCustomElement$6}from"./component9.js";import{d as defineCustomElement$5}from"./component12.js";import{d as defineCustomElement$4}from"./component13.js";import{d as defineCustomElement$3}from"./component3.js";const defaultStyleCss='/* windicss-touch: 1639175625181 */\n/* windicss-touch: 1649810622229 */\n/* windicss layer base */\n*, ::before, ::after {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n border-width: 0;\n border-style: solid;\n border-color: var(--kolibri-border-color);\n}\n* {\n --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: var(--kolibri-color);\n --tw-ring-color: rgba(undefined, 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n}\n:root {\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n}\n:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n:-moz-ui-invalid {\n box-shadow: none;\n}\n::moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n}\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n::-webkit-file-upload-button {\n -webkit-appearance: button;\n font: inherit;\n}\n[type=\'search\'] {\n -webkit-appearance: textfield;\n outline-offset: -2px;\n}\nabbr[title] {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\na {\n color: inherit;\n text-decoration: inherit;\n}\nbody {\n margin: 0;\n font-family: inherit;\n line-height: inherit;\n}\nb, strong {\n font-weight: bolder;\n}\nbutton, select {\n text-transform: none;\n}\nbutton, [type=\'button\'], [type=\'reset\'], [type=\'submit\'] {\n -webkit-appearance: button;\n}\nbutton {\n background-color: transparent;\n background-image: none;\n}\nbutton, [role="button"] {\n cursor: pointer;\n}\ncode {\n font-size: 1em;\n font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;\n}\nfieldset {\n margin: 0;\n padding: 0;\n}\nhtml {\n -webkit-text-size-adjust: 100%;\n font-family: ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";\n line-height: 1.5;\n}\nh1, p, h2, h3, h4, h5, h6 {\n margin: 0;\n}\nh1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n}\ninput, button, optgroup, select, textarea {\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n margin: 0;\n padding: 0;\n line-height: inherit;\n color: inherit;\n}\ninput::placeholder {\n opacity: 1;\n color: #9ca3af;\n}\ninput::webkit-input-placeholder {\n opacity: 1;\n color: #9ca3af;\n}\ninput::-moz-placeholder {\n opacity: 1;\n color: #9ca3af;\n}\ninput:-ms-input-placeholder {\n opacity: 1;\n color: #9ca3af;\n}\ninput::-ms-input-placeholder {\n opacity: 1;\n color: #9ca3af;\n}\nlegend {\n padding: 0;\n}\nprogress {\n vertical-align: baseline;\n}\nsmall {\n font-size: 80%;\n}\nsvg {\n display: block;\n vertical-align: middle;\n}\ntable {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n}\ntextarea {\n resize: vertical;\n}\ntextarea::placeholder {\n opacity: 1;\n color: #9ca3af;\n}\ntextarea::webkit-input-placeholder {\n opacity: 1;\n color: #9ca3af;\n}\ntextarea::-moz-placeholder {\n opacity: 1;\n color: #9ca3af;\n}\ntextarea:-ms-input-placeholder {\n opacity: 1;\n color: #9ca3af;\n}\ntextarea::-ms-input-placeholder {\n opacity: 1;\n color: #9ca3af;\n}\nul, ol {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n/* windicss layer components */\n/* windicss layer utilities */\n.container {\n width: 100%;\n}\n@media (min-width: 640px) {\n .container {\n max-width: 640px;\n }\n}\n@media (min-width: 768px) {\n .container {\n max-width: 768px;\n }\n}\n@media (min-width: 1024px) {\n .container {\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px) {\n .container {\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px) {\n .container {\n max-width: 1536px;\n }\n}\n.bg-normal {\n background-color: var(--kolibri-color-normal);\n}\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgba(255, 255, 255, var(--tw-bg-opacity));\n}\n.bg-spin-1 {\n background-color: var(--kolibri-color-spin-1);\n}\n.bg-spin-2 {\n background-color: var(--kolibri-color-spin-2);\n}\n.bg-spin-3 {\n background-color: var(--kolibri-color-spin-3);\n}\n.rounded {\n border-radius: var(--kolibri-border-radius);\n}\n.border-1 {\n border-width: 1px;\n}\n.cursor-pointer {\n cursor: pointer;\n}\n.block {\n display: block;\n}\n.inline-block {\n display: inline-block;\n}\n.flex {\n display: -webkit-box;\n display: -ms-flexbox;\n display: -webkit-flex;\n display: flex;\n}\n.inline-flex {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: -webkit-inline-flex;\n display: inline-flex;\n}\n.table {\n display: table;\n}\n.grid {\n display: -ms-grid;\n display: grid;\n}\n.hidden {\n display: none;\n}\n.flex-wrap {\n -ms-flex-wrap: wrap;\n -webkit-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.items-center {\n -webkit-box-align: center;\n -ms-flex-align: center;\n -webkit-align-items: center;\n align-items: center;\n}\n.content-center {\n -ms-flex-line-pack: center;\n -webkit-align-content: center;\n align-content: center;\n}\n.font-80 {\n font-weight: 80;\n}\n.font-60 {\n font-weight: 60;\n}\n.h-full {\n height: 100%;\n}\n.h-0 {\n height: 0px;\n}\n.h-0\\.41c-2\\.42\\2c 0-4\\.82-1\\.57-4\\.82-3\\.58c0\\.05-0\\.98\\2c 0\\.43-1\\.91\\2c 1\\.07-2\\.65c0\\.3\\2c 0\\.05\\2c 0\\.61\\2c 0\\.09\\2c 0\\.92\\2c 0\\.09c1\\.1\\2c 0\\2c 1\\.69-0\\.58\\2c 1\\.74-1\\.16 {\n height: 0.29rem;\n}\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.text-2xl {\n font-size: 1.5rem;\n line-height: 2rem;\n}\n.text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n.leading-normal {\n line-height: 1.5;\n}\n.list-none {\n list-style-type: none;\n}\n.list-disc {\n list-style-type: disc;\n}\n.list-decimal {\n list-style-type: decimal;\n}\n.mx-auto {\n margin-left: auto;\n margin-right: auto;\n}\n.mb-1 {\n margin-bottom: calc(1 * var(--kolibri-spacing));\n}\n.mt-2 {\n margin-top: calc(2 * var(--kolibri-spacing));\n}\n.mt-4 {\n margin-top: calc(4 * var(--kolibri-spacing));\n}\n.mr-2 {\n margin-right: calc(2 * var(--kolibri-spacing));\n}\n.ml-2 {\n margin-left: calc(2 * var(--kolibri-spacing));\n}\n.outline {\n outline-style: solid;\n}\n.overflow-hidden {\n overflow: hidden;\n}\n.overflow-y-visible {\n overflow-y: visible;\n}\n.p-2 {\n padding: calc(2 * var(--kolibri-spacing));\n}\n.p-4 {\n padding: calc(4 * var(--kolibri-spacing));\n}\n.px {\n padding-left: 1px;\n padding-right: 1px;\n}\n.py-2 {\n padding-top: calc(2 * var(--kolibri-spacing));\n padding-bottom: calc(2 * var(--kolibri-spacing));\n}\n.pl-8 {\n padding-left: 2rem;\n}\n.pb-2 {\n padding-bottom: calc(2 * var(--kolibri-spacing));\n}\n.tab {\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n}\n.absolute {\n position: absolute;\n}\n.text-center {\n text-align: center;\n}\n.text-normal {\n color: var(--kolibri-color-normal);\n}\n.hover\\:text-primary:hover {\n color: var(--kolibri-color-primary);\n}\n.italic {\n font-style: italic;\n}\n.underline {\n -webkit-text-decoration-line: underline;\n text-decoration-line: underline;\n}\n.indent {\n text-indent: 1.5rem;\n}\n.visible {\n visibility: visible;\n}\n.w-full {\n width: 100%;\n}\n.w-4\\/5 {\n width: 80%;\n}\n.z-50 {\n z-index: 50;\n}\n.gap-1 {\n grid-gap: calc(1 * var(--kolibri-spacing));\n gap: calc(1 * var(--kolibri-spacing));\n}\n.gap-2 {\n grid-gap: calc(2 * var(--kolibri-spacing));\n gap: calc(2 * var(--kolibri-spacing));\n}\n.grid-flow-col {\n grid-auto-flow: column;\n}\n.transform {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-rotate: 0;\n --tw-rotate-x: 0;\n --tw-rotate-y: 0;\n --tw-rotate-z: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-scale-z: 1;\n -webkit-transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) translateZ(var(--tw-translate-z)) rotate(var(--tw-rotate)) rotateX(var(--tw-rotate-x)) rotateY(var(--tw-rotate-y)) rotateZ(var(--tw-rotate-z)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) scaleZ(var(--tw-scale-z));\n -ms-transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) translateZ(var(--tw-translate-z)) rotate(var(--tw-rotate)) rotateX(var(--tw-rotate-x)) rotateY(var(--tw-rotate-y)) rotateZ(var(--tw-rotate-z)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) scaleZ(var(--tw-scale-z));\n transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) translateZ(var(--tw-translate-z)) rotate(var(--tw-rotate)) rotateX(var(--tw-rotate-x)) rotateY(var(--tw-rotate-y)) rotateZ(var(--tw-rotate-z)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) scaleZ(var(--tw-scale-z));\n}\n.animate {\n -webkit-animation-iteration-count: 1;\n animation-iteration-count: 1;\n}\n.filter {\n --tw-blur: var(--tw-empty,/*!*/ /*!*/);\n --tw-brightness: var(--tw-empty,/*!*/ /*!*/);\n --tw-contrast: var(--tw-empty,/*!*/ /*!*/);\n --tw-grayscale: var(--tw-empty,/*!*/ /*!*/);\n --tw-hue-rotate: var(--tw-empty,/*!*/ /*!*/);\n --tw-invert: var(--tw-empty,/*!*/ /*!*/);\n --tw-saturate: var(--tw-empty,/*!*/ /*!*/);\n --tw-sepia: var(--tw-empty,/*!*/ /*!*/);\n --tw-drop-shadow: var(--tw-empty,/*!*/ /*!*/);\n -webkit-filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.blur {\n -webkit-backdrop-filter: blur(8px);\n backdrop-filter: blur(8px);\n}\n:host * {\n -ms-hyphens: var(--kolibri-hyphens);\n -webkit-hyphens: var(--kolibri-hyphens);\n hyphens: var(--kolibri-hyphens);\n font-family: var(--kolibri-font-family);\n line-height: var(--kolibri-line-height);\n word-break: break-word;\n}\n\n:host {\n overflow: hidden;\n}\n:host > div {\n overflow-x: auto;\n border-radius: var(--kolibri-border-radius);\n border-style: solid;\n border-width: 1px;\n}\n:host > div table {\n border: 0;\n width: 100%;\n}\n:host > div table tr {\n border-top-style: solid;\n border-top-width: 1px;\n padding-top: calc(1 * var(--kolibri-spacing));\n padding-bottom: calc(1 * var(--kolibri-spacing));\n padding-left: calc(2 * var(--kolibri-spacing));\n padding-right: calc(2 * var(--kolibri-spacing));\n}\n:host > div table tr th, :host > div table tr td {\n border-right-style: solid;\n border-right-width: 1px;\n padding-top: calc(1 * var(--kolibri-spacing));\n padding-bottom: calc(1 * var(--kolibri-spacing));\n padding-left: calc(2 * var(--kolibri-spacing));\n padding-right: calc(2 * var(--kolibri-spacing));\n}\n:host > div table tr th:last-child,\n:host > div table tr td:last-child {\n border: 0;\n}\n:host > div table tr th, :host > div table tr .th {\n --tw-bg-opacity: 1;\n background-color: rgba(229, 231, 235, var(--tw-bg-opacity));\n}\n:host > div table tr:nth-child(even) {\n --tw-bg-opacity: 1;\n background-color: rgba(243, 244, 246, var(--tw-bg-opacity));\n}\n:host > div table tr:nth-child(odd) {\n @apply white;\n}\n:host > div.pagination {\n border-style: none;\n display: -ms-grid;\n display: grid;\n -webkit-box-align: center;\n -ms-flex-align: center;\n -webkit-align-items: center;\n align-items: center;\n -ms-flex-line-pack: center;\n -webkit-align-content: center;\n align-content: center;\n padding-top: calc(2 * var(--kolibri-spacing));\n padding-left: calc(1 * var(--kolibri-spacing));\n padding-right: calc(1 * var(--kolibri-spacing));\n width: 100%;\n grid-gap: calc(2 * var(--kolibri-spacing));\n gap: calc(2 * var(--kolibri-spacing));\n grid-auto-flow: column;\n}\n:host > div.pagination > div::last-child {\n display: -webkit-box;\n display: -ms-flexbox;\n display: -webkit-flex;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n -webkit-align-items: center;\n align-items: center;\n -ms-grid-column-align: end;\n justify-self: end;\n grid-gap: calc(2 * var(--kolibri-spacing));\n gap: calc(2 * var(--kolibri-spacing));\n}',PAGINATION_OPTIONS=[10,20,50,100],KolTable$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.horizontal=!0,this.sortDirections=new Map,this.showPagination=!1,this.pageStartSlice=0,this.pageEndSlice=10,this.handlePagination={onClick:(t,n)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onClick)&&this.state._pagination._on.onClick(t,n),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:n}))},onChangePage:(t,n)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onChangePage)&&this.state._pagination._on.onChangePage(t,n),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:n}))},onChangePageSize:(t,n)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onChangePageSize)&&this.state._pagination._on.onChangePageSize(t,n),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_pageSize:n})),setState(this,"_pageSize",n)}},this.beforePatchPagination=(t,n,e,i)=>{"_pagination"===i&&(this.showPagination=!0===t||""===t||"object"==typeof t&&null!==t)},this.updateSortedData=()=>{let t=this.state._data;if("function"==typeof this.sortFunction)switch(this.sortDirections.get(this.sortFunction)){case"NOS":t=[...this.state._data];break;case"ASC":t=this.sortFunction([...this.state._data]);break;default:t=this.sortFunction([...this.state._data]).reverse()}setState(this,"_sortedData",t)},this._caption=void 0,this._data=void 0,this._headers=void 0,this._minWidth=void 0,this._pagination=void 0,this.state={_caption:"",_data:[],_headers:{horizontal:[],vertical:[]},_pagination:{_page:1,_pageSize:10,_total:0},_sortedData:[]}}validateCaption(t){watchString(this,"_caption",t,{required:!0})}validateData(t){emptyStringByArrayHandler(t,(()=>{objectObjectHandler(t,(()=>{void 0===t&&(t=[]);try{t=parseJson(t)}catch(t){}Array.isArray(t)&&void 0===t.find((t=>!("object"==typeof t&&null!==t)))&&setState(this,"_data",t,{afterPatch:()=>{const t=setTimeout((()=>{clearTimeout(t),this.updateSortedData()}))}})}))}))}validateHeaders(t){emptyStringByArrayHandler(t,(()=>{objectObjectHandler(t,(()=>{try{t=parseJson(t)}catch(t){}watchValidator(this,"_headers",(t=>"object"==typeof t&&null!==t),new Set(["KoliBriTableHeaders"]),t,{hooks:{beforePatch:t=>{var n;null===(n=t.horizontal)||void 0===n||n.forEach((t=>{t.forEach((t=>{"function"==typeof t.sort&&"string"==typeof t.sortDirection&&this.sortDirections.set(t.sort,t.sortDirection)}))}))}}})}))}))}validateMinWidth(t){watchString(this,"_minWidth",t,{defaultValue:void 0})}validatePagination(t){try{t=parseJson(t)}catch(t){}watchValidator(this,"_pagination",(()=>!0),new Set(["boolean","KoliBriTablePagination"]),t,{hooks:{beforePatch:this.beforePatchPagination}})}componentWillLoad(){this.validateCaption(this._caption),this.validateData(this._data),this.validateHeaders(this._headers),this.validateMinWidth(this._minWidth),this.validatePagination(this._pagination)}getNumberOfCols(t,n){let e=0;return t.forEach((t=>{let n=0;t.forEach((t=>{var e;return n+=null!==(e=t.colSpan)&&void 0!==e?e:1})),e<n&&(e=n)})),0===e&&(e=n.length),e}getNumberOfRows(t,n){let e=0;return t.forEach((t=>{let n=0;t.forEach((t=>{var e;return n+=null!==(e=t.rowSpan)&&void 0!==e?e:1})),e<n&&(e=n)})),0===e&&(e=n.length),e}filterHeaderKeys(t){const n=[];return t.forEach((t=>{t.forEach((t=>{"string"==typeof t.key&&n.push(t)}))})),n}getPrimaryHeader(t){var n,e;let i=this.filterHeaderKeys(null!==(n=t.horizontal)&&void 0!==n?n:[]);return this.horizontal=!0,0===i.length&&(i=this.filterHeaderKeys(null!==(e=t.vertical)&&void 0!==e?e:[]),i.length>0&&(this.horizontal=!1)),i}createDataField(t,n){n.horizontal=Array.isArray(null==n?void 0:n.horizontal)?n.horizontal:[],n.vertical=Array.isArray(null==n?void 0:n.vertical)?n.vertical:[];const e=this.getPrimaryHeader(n),i=this.getNumberOfCols(n.horizontal,t),a=this.getNumberOfRows(n.vertical,t),o=[],r=[],s=[];n.vertical.forEach(((t,n)=>{r[n]=0,s[n]=[]}));for(let l=0;l<a;l++){const a=[];n.vertical.forEach(((t,n)=>{let e=0;if(s[n].forEach((t=>e+=t)),e<=l){const i=t[l-e+r[n]];if("object"==typeof i){a.push(Object.assign(Object.assign({},i),{asTd:!1,data:{}}));let t=1;if("number"==typeof i.rowSpan&&i.rowSpan>1&&(t=i.rowSpan),s[n].push(t),"number"==typeof i.colSpan&&i.colSpan>1)for(let e=1;e<i.colSpan;e++)s[n+e].push(t);r[n]++}}}));for(let n=0;n<i;n++)!0===this.horizontal?"object"==typeof e[n]&&null!==e[n]&&"string"==typeof e[n].key&&"object"==typeof t[l]&&null!==t[l]&&a.push(Object.assign(Object.assign({},e[n]),{colSpan:void 0,data:t[l],label:t[l][e[n].key],rowSpan:void 0})):"object"==typeof e[l]&&null!==e[l]&&"string"==typeof e[l].key&&"object"==typeof t[n]&&null!==t[n]&&a.push(Object.assign(Object.assign({},e[l]),{colSpan:void 0,data:t[n],label:t[n][e[l].key],rowSpan:void 0}));o.push(a)}if(0===t.length){let t=0,e=0;Array.isArray(n.horizontal)&&n.horizontal.length>0&&n.horizontal[0].forEach((n=>{t+=n.colSpan||1})),Array.isArray(n.vertical)&&n.vertical.length>0&&(t-=n.vertical.length,n.vertical[0].forEach((t=>{e+=t.rowSpan||1})));const i={colSpan:t,label:"Es sind keine Einträge vorhanden.",render:void 0,rowSpan:Math.max(e,1)};0===o.length?o.push([i]):o[0].push(i)}return o}selectDisplayedData(t,n,e){return"number"==typeof n&&n>0&&"number"==typeof e&&e>0?(this.pageStartSlice=n*(e-1),this.pageEndSlice=n*e>t.length?t.length:n*e,t.slice(this.pageStartSlice,this.pageEndSlice)):(this.pageStartSlice=0,this.pageEndSlice=t.length,t)}cellRender(t,n){const e=setTimeout((()=>{if(clearTimeout(e),"function"==typeof t.render&&n instanceof HTMLElement){const e=t.render(n,{asTd:t.asTd,label:t.label,textAlign:t.textAlign,width:t.width},t.data,this.state._data);"string"==typeof e&&(n.innerHTML=e)}}),50)}render(){var t,n;const e=this.selectDisplayedData(this.state._sortedData,this.showPagination?null!==(n=null===(t=this.state._pagination)||void 0===t?void 0:t._pageSize)&&void 0!==n?n:10:this.state._sortedData.length,this.state._pagination._page||1),i=this.createDataField(e,this.state._headers);return h(Host,null,h("div",{tabindex:"0"},h("table",{style:{minWidth:this.state._minWidth}},h("caption",null,this.state._caption),Array.isArray(this.state._headers.horizontal)&&h("thead",null,this.state._headers.horizontal.map((t=>h("tr",null,t.map((t=>!0===t.asTd?h("td",{class:{[t.textAlign]:"string"==typeof t.textAlign&&t.textAlign.length>0},colSpan:t.colSpan,rowSpan:t.rowSpan,style:{textAlign:t.textAlign,width:t.width},ref:"function"==typeof t.render?n=>{this.cellRender(t,n)}:void 0,innerHTML:"function"!=typeof t.render?t.label:""}):h("th",{scope:"number"==typeof t.colSpan&&t.colSpan>1?"colgroup":"col",colSpan:t.colSpan,rowSpan:t.rowSpan,style:{width:t.width},"aria-sort":"function"==typeof t.sort?"NOS"===this.sortDirections.get(t.sort)||void 0===this.sortDirections.get(t.sort)?"none":"ASC"===this.sortDirections.get(t.sort)?"ascending":"descending":void 0},h("div",{class:"w-full flex gap-1 items-center"},h("div",{class:{"w-full":!0,[t.textAlign]:"string"==typeof t.textAlign&&t.textAlign.length>0},innerHTML:t.label,style:{textAlign:t.textAlign}}),"function"==typeof t.sort&&h("kol-button",{exportparts:"button,ghost",_ariaLabel:"Sortierung von "+t.label+" ändern",_icon:"NOS"===this.sortDirections.get(t.sort)||void 0===this.sortDirections.get(t.sort)?"fas fa-sort":"ASC"===this.sortDirections.get(t.sort)?"fas fa-sort-up":"fas fa-sort-down",_iconOnly:!0,_label:"Sortierung von "+t.label+" ändern",_on:{onClick:()=>{if("function"==typeof t.sort){switch(this.sortFunction=t.sort,this.sortDirections.get(this.sortFunction)){case"ASC":this.sortDirections.set(this.sortFunction,"DESC");break;case"DESC":this.sortDirections.set(this.sortFunction,"NOS");break;default:this.sortDirections.set(this.sortFunction,"ASC")}this.updateSortedData()}}},_variant:"ghost"}))))))))),h("tbody",null,i.map(((t,n)=>h("tr",{key:`row-${n}`},t.map((t=>!1===t.asTd?h("th",{scope:"number"==typeof t.rowSpan&&t.rowSpan>1?"rowgroup":"row",colSpan:t.colSpan,rowSpan:t.rowSpan,style:{width:t.width},"aria-sort":"function"==typeof t.sort?"NOS"===this.sortDirections.get(t.sort)||void 0===this.sortDirections.get(t.sort)?"none":"ASC"===this.sortDirections.get(t.sort)?"ascending":"descending":void 0},h("div",{class:"w-full flex gap-1 items-center"},h("div",{class:{"w-full":!0,[t.textAlign]:"string"==typeof t.textAlign&&t.textAlign.length>0},innerHTML:t.label,style:{textAlign:t.textAlign}}),"function"==typeof t.sort&&h("kol-button",{exportparts:"button,ghost",_ariaLabel:"Sortierung von "+t.label+" ändern",_icon:"NOS"===this.sortDirections.get(t.sort)||void 0===this.sortDirections.get(t.sort)?"fas fa-sort":"ASC"===this.sortDirections.get(t.sort)?"fas fa-sort-up":"fas fa-sort-down",_iconOnly:!0,_label:"Sortierung von "+t.label+" ändern",_on:{onClick:()=>{if("function"==typeof t.sort){switch(this.sortFunction=t.sort,this.sortDirections.get(this.sortFunction)){case"ASC":this.sortDirections.set(this.sortFunction,"DESC");break;case"DESC":this.sortDirections.set(this.sortFunction,"NOS");break;default:this.sortDirections.set(this.sortFunction,"ASC")}this.updateSortedData()}}},_variant:"ghost"}))):h("td",{class:{[t.textAlign]:"string"==typeof t.textAlign&&t.textAlign.length>0},colSpan:t.colSpan,rowSpan:t.rowSpan,style:{textAlign:t.textAlign,width:t.width},ref:"function"==typeof t.render?n=>{this.cellRender(t,n)}:void 0,innerHTML:"function"!=typeof t.render?t.label:""}))))))))),this.pageEndSlice>0&&this.showPagination&&h("div",{class:"pagination"},h("span",null,"Einträge ",this.pageEndSlice>0?this.pageStartSlice+1:0," bis ",this.pageEndSlice," von"," ",this.state._pagination._total||(Array.isArray(this.state._data)?this.state._data.length:0)," angezeigt"),h("div",null,h("kol-pagination",{_boundaryCount:this.state._pagination._boundaryCount,_customClass:this.state._pagination._customClass,_on:this.handlePagination,_page:this.state._pagination._page,_pageSize:this.state._pagination._pageSize,_pageSizeOptions:this.state._pagination._pageSizeOptions||PAGINATION_OPTIONS,_siblingCount:this.state._pagination._siblingCount,_tooltipAlign:"bottom",_total:this.state._pagination._total||this.state._data.length}))))}static get watchers(){return{_caption:["validateCaption"],_data:["validateData"],_headers:["validateHeaders"],_minWidth:["validateMinWidth"],_pagination:["validatePagination"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-table",{_caption:[1],_data:[1],_headers:[1],_minWidth:[1,"_min-width"],_pagination:[8],state:[32]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-table","kol-alert","kol-badge","kol-button","kol-button-wc","kol-heading-wc","kol-icon","kol-input","kol-pagination","kol-select","kol-span-wc","kol-tooltip"].forEach((t=>{switch(t){case"kol-table":customElements.get(t)||customElements.define(t,KolTable$1);break;case"kol-alert":customElements.get(t)||defineCustomElement$c();break;case"kol-badge":customElements.get(t)||defineCustomElement$b();break;case"kol-button":customElements.get(t)||defineCustomElement$a();break;case"kol-button-wc":customElements.get(t)||defineCustomElement$9();break;case"kol-heading-wc":customElements.get(t)||defineCustomElement$8();break;case"kol-icon":customElements.get(t)||defineCustomElement$7();break;case"kol-input":customElements.get(t)||defineCustomElement$6();break;case"kol-pagination":customElements.get(t)||defineCustomElement$5();break;case"kol-select":customElements.get(t)||defineCustomElement$4();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$3();break;case"kol-tooltip":customElements.get(t)||defineCustomElement$2()}}))}const KolTable=KolTable$1,defineCustomElement=defineCustomElement$1;export{KolTable,defineCustomElement};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{t as setState,w as watchString,C as emptyStringByArrayHandler,q as parseJson,a as watchValidator,p as objectObjectHandler}from"./prop.validators.js";import{d as defineCustomElement$c}from"./component5.js";import{d as defineCustomElement$2,a as defineCustomElement$9,b as defineCustomElement$b}from"./component.js";import{d as defineCustomElement$a}from"./shadow2.js";import{d as defineCustomElement$8}from"./component4.js";import{d as defineCustomElement$7}from"./component2.js";import{d as defineCustomElement$6}from"./component9.js";import{d as defineCustomElement$5}from"./component12.js";import{d as defineCustomElement$4}from"./component13.js";import{d as defineCustomElement$3}from"./component3.js";const defaultStyleCss='/* windicss-touch: 1639175625181 */\n/* windicss-touch: 1649810622229 */\n/* windicss layer base */\n*, ::before, ::after {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n border-width: 0;\n border-style: solid;\n border-color: var(--kolibri-border-color);\n}\n* {\n --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: var(--kolibri-color);\n --tw-ring-color: rgba(undefined, 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n}\n:root {\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n}\n:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n:-moz-ui-invalid {\n box-shadow: none;\n}\n::moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n}\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n::-webkit-file-upload-button {\n -webkit-appearance: button;\n font: inherit;\n}\n[type=\'search\'] {\n -webkit-appearance: textfield;\n outline-offset: -2px;\n}\nabbr[title] {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\na {\n color: inherit;\n text-decoration: inherit;\n}\nbody {\n margin: 0;\n font-family: inherit;\n line-height: inherit;\n}\nb, strong {\n font-weight: bolder;\n}\nbutton, select {\n text-transform: none;\n}\nbutton, [type=\'button\'], [type=\'reset\'], [type=\'submit\'] {\n -webkit-appearance: button;\n}\nbutton {\n background-color: transparent;\n background-image: none;\n}\nbutton, [role="button"] {\n cursor: pointer;\n}\ncode {\n font-size: 1em;\n font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;\n}\nfieldset {\n margin: 0;\n padding: 0;\n}\nhtml {\n -webkit-text-size-adjust: 100%;\n font-family: ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";\n line-height: 1.5;\n}\nh1, p, h2, h3, h4, h5, h6 {\n margin: 0;\n}\nh1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n}\ninput, button, optgroup, select, textarea {\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n margin: 0;\n padding: 0;\n line-height: inherit;\n color: inherit;\n}\ninput::placeholder {\n opacity: 1;\n color: #9ca3af;\n}\ninput::webkit-input-placeholder {\n opacity: 1;\n color: #9ca3af;\n}\ninput::-moz-placeholder {\n opacity: 1;\n color: #9ca3af;\n}\ninput:-ms-input-placeholder {\n opacity: 1;\n color: #9ca3af;\n}\ninput::-ms-input-placeholder {\n opacity: 1;\n color: #9ca3af;\n}\nlegend {\n padding: 0;\n}\nprogress {\n vertical-align: baseline;\n}\nsmall {\n font-size: 80%;\n}\nsvg {\n display: block;\n vertical-align: middle;\n}\ntable {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n}\ntextarea {\n resize: vertical;\n}\ntextarea::placeholder {\n opacity: 1;\n color: #9ca3af;\n}\ntextarea::webkit-input-placeholder {\n opacity: 1;\n color: #9ca3af;\n}\ntextarea::-moz-placeholder {\n opacity: 1;\n color: #9ca3af;\n}\ntextarea:-ms-input-placeholder {\n opacity: 1;\n color: #9ca3af;\n}\ntextarea::-ms-input-placeholder {\n opacity: 1;\n color: #9ca3af;\n}\nul, ol {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n/* windicss layer components */\n/* windicss layer utilities */\n.container {\n width: 100%;\n}\n@media (min-width: 640px) {\n .container {\n max-width: 640px;\n }\n}\n@media (min-width: 768px) {\n .container {\n max-width: 768px;\n }\n}\n@media (min-width: 1024px) {\n .container {\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px) {\n .container {\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px) {\n .container {\n max-width: 1536px;\n }\n}\n.bg-normal {\n background-color: var(--kolibri-color-normal);\n}\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgba(255, 255, 255, var(--tw-bg-opacity));\n}\n.bg-spin-1 {\n background-color: var(--kolibri-color-spin-1);\n}\n.bg-spin-2 {\n background-color: var(--kolibri-color-spin-2);\n}\n.bg-spin-3 {\n background-color: var(--kolibri-color-spin-3);\n}\n.rounded {\n border-radius: var(--kolibri-border-radius);\n}\n.border-1 {\n border-width: 1px;\n}\n.cursor-pointer {\n cursor: pointer;\n}\n.block {\n display: block;\n}\n.inline-block {\n display: inline-block;\n}\n.flex {\n display: -webkit-box;\n display: -ms-flexbox;\n display: -webkit-flex;\n display: flex;\n}\n.inline-flex {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: -webkit-inline-flex;\n display: inline-flex;\n}\n.table {\n display: table;\n}\n.grid {\n display: -ms-grid;\n display: grid;\n}\n.hidden {\n display: none;\n}\n.flex-wrap {\n -ms-flex-wrap: wrap;\n -webkit-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.items-center {\n -webkit-box-align: center;\n -ms-flex-align: center;\n -webkit-align-items: center;\n align-items: center;\n}\n.content-center {\n -ms-flex-line-pack: center;\n -webkit-align-content: center;\n align-content: center;\n}\n.font-80 {\n font-weight: 80;\n}\n.font-60 {\n font-weight: 60;\n}\n.h-full {\n height: 100%;\n}\n.h-0 {\n height: 0px;\n}\n.h-0\\.41c-2\\.42\\2c 0-4\\.82-1\\.57-4\\.82-3\\.58c0\\.05-0\\.98\\2c 0\\.43-1\\.91\\2c 1\\.07-2\\.65c0\\.3\\2c 0\\.05\\2c 0\\.61\\2c 0\\.09\\2c 0\\.92\\2c 0\\.09c1\\.1\\2c 0\\2c 1\\.69-0\\.58\\2c 1\\.74-1\\.16 {\n height: 0.29rem;\n}\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.text-2xl {\n font-size: 1.5rem;\n line-height: 2rem;\n}\n.text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n.leading-normal {\n line-height: 1.5;\n}\n.list-none {\n list-style-type: none;\n}\n.list-disc {\n list-style-type: disc;\n}\n.list-decimal {\n list-style-type: decimal;\n}\n.mx-auto {\n margin-left: auto;\n margin-right: auto;\n}\n.mb-1 {\n margin-bottom: calc(1 * var(--kolibri-spacing));\n}\n.mt-2 {\n margin-top: calc(2 * var(--kolibri-spacing));\n}\n.mt-4 {\n margin-top: calc(4 * var(--kolibri-spacing));\n}\n.mr-2 {\n margin-right: calc(2 * var(--kolibri-spacing));\n}\n.ml-2 {\n margin-left: calc(2 * var(--kolibri-spacing));\n}\n.outline {\n outline-style: solid;\n}\n.overflow-hidden {\n overflow: hidden;\n}\n.overflow-y-visible {\n overflow-y: visible;\n}\n.p-2 {\n padding: calc(2 * var(--kolibri-spacing));\n}\n.p-4 {\n padding: calc(4 * var(--kolibri-spacing));\n}\n.px {\n padding-left: 1px;\n padding-right: 1px;\n}\n.py-2 {\n padding-top: calc(2 * var(--kolibri-spacing));\n padding-bottom: calc(2 * var(--kolibri-spacing));\n}\n.pl-8 {\n padding-left: 2rem;\n}\n.pb-2 {\n padding-bottom: calc(2 * var(--kolibri-spacing));\n}\n.tab {\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n}\n.absolute {\n position: absolute;\n}\n.text-center {\n text-align: center;\n}\n.text-normal {\n color: var(--kolibri-color-normal);\n}\n.hover\\:text-primary:hover {\n color: var(--kolibri-color-primary);\n}\n.italic {\n font-style: italic;\n}\n.underline {\n -webkit-text-decoration-line: underline;\n text-decoration-line: underline;\n}\n.indent {\n text-indent: 1.5rem;\n}\n.visible {\n visibility: visible;\n}\n.w-full {\n width: 100%;\n}\n.w-4\\/5 {\n width: 80%;\n}\n.z-50 {\n z-index: 50;\n}\n.gap-1 {\n grid-gap: calc(1 * var(--kolibri-spacing));\n gap: calc(1 * var(--kolibri-spacing));\n}\n.gap-2 {\n grid-gap: calc(2 * var(--kolibri-spacing));\n gap: calc(2 * var(--kolibri-spacing));\n}\n.grid-flow-col {\n grid-auto-flow: column;\n}\n.transform {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-rotate: 0;\n --tw-rotate-x: 0;\n --tw-rotate-y: 0;\n --tw-rotate-z: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-scale-z: 1;\n -webkit-transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) translateZ(var(--tw-translate-z)) rotate(var(--tw-rotate)) rotateX(var(--tw-rotate-x)) rotateY(var(--tw-rotate-y)) rotateZ(var(--tw-rotate-z)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) scaleZ(var(--tw-scale-z));\n -ms-transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) translateZ(var(--tw-translate-z)) rotate(var(--tw-rotate)) rotateX(var(--tw-rotate-x)) rotateY(var(--tw-rotate-y)) rotateZ(var(--tw-rotate-z)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) scaleZ(var(--tw-scale-z));\n transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) translateZ(var(--tw-translate-z)) rotate(var(--tw-rotate)) rotateX(var(--tw-rotate-x)) rotateY(var(--tw-rotate-y)) rotateZ(var(--tw-rotate-z)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) scaleZ(var(--tw-scale-z));\n}\n.animate {\n -webkit-animation-iteration-count: 1;\n animation-iteration-count: 1;\n}\n.filter {\n --tw-blur: var(--tw-empty,/*!*/ /*!*/);\n --tw-brightness: var(--tw-empty,/*!*/ /*!*/);\n --tw-contrast: var(--tw-empty,/*!*/ /*!*/);\n --tw-grayscale: var(--tw-empty,/*!*/ /*!*/);\n --tw-hue-rotate: var(--tw-empty,/*!*/ /*!*/);\n --tw-invert: var(--tw-empty,/*!*/ /*!*/);\n --tw-saturate: var(--tw-empty,/*!*/ /*!*/);\n --tw-sepia: var(--tw-empty,/*!*/ /*!*/);\n --tw-drop-shadow: var(--tw-empty,/*!*/ /*!*/);\n -webkit-filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.blur {\n -webkit-backdrop-filter: blur(8px);\n backdrop-filter: blur(8px);\n}\n:host * {\n -ms-hyphens: var(--kolibri-hyphens);\n -webkit-hyphens: var(--kolibri-hyphens);\n hyphens: var(--kolibri-hyphens);\n font-family: var(--kolibri-font-family);\n line-height: var(--kolibri-line-height);\n word-break: break-word;\n}\n\n:host {\n overflow: hidden;\n}\n:host > div {\n overflow-x: auto;\n border-radius: var(--kolibri-border-radius);\n border-style: solid;\n border-width: 1px;\n}\n:host > div table {\n border: 0;\n width: 100%;\n}\n:host > div table tr {\n border-top-style: solid;\n border-top-width: 1px;\n padding-top: calc(1 * var(--kolibri-spacing));\n padding-bottom: calc(1 * var(--kolibri-spacing));\n padding-left: calc(2 * var(--kolibri-spacing));\n padding-right: calc(2 * var(--kolibri-spacing));\n}\n:host > div table tr th, :host > div table tr td {\n border-right-style: solid;\n border-right-width: 1px;\n padding-top: calc(1 * var(--kolibri-spacing));\n padding-bottom: calc(1 * var(--kolibri-spacing));\n padding-left: calc(2 * var(--kolibri-spacing));\n padding-right: calc(2 * var(--kolibri-spacing));\n}\n:host > div table tr th:last-child,\n:host > div table tr td:last-child {\n border: 0;\n}\n:host > div table tr th, :host > div table tr .th {\n --tw-bg-opacity: 1;\n background-color: rgba(229, 231, 235, var(--tw-bg-opacity));\n}\n:host > div table tr:nth-child(even) {\n --tw-bg-opacity: 1;\n background-color: rgba(243, 244, 246, var(--tw-bg-opacity));\n}\n:host > div table tr:nth-child(odd) {\n @apply white;\n}\n:host > div.pagination {\n border-style: none;\n display: -ms-grid;\n display: grid;\n -webkit-box-align: center;\n -ms-flex-align: center;\n -webkit-align-items: center;\n align-items: center;\n -ms-flex-line-pack: center;\n -webkit-align-content: center;\n align-content: center;\n padding-top: calc(2 * var(--kolibri-spacing));\n padding-left: calc(1 * var(--kolibri-spacing));\n padding-right: calc(1 * var(--kolibri-spacing));\n width: 100%;\n grid-gap: calc(2 * var(--kolibri-spacing));\n gap: calc(2 * var(--kolibri-spacing));\n grid-auto-flow: column;\n}\n:host > div.pagination > div::last-child {\n display: -webkit-box;\n display: -ms-flexbox;\n display: -webkit-flex;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n -webkit-align-items: center;\n align-items: center;\n -ms-grid-column-align: end;\n justify-self: end;\n grid-gap: calc(2 * var(--kolibri-spacing));\n gap: calc(2 * var(--kolibri-spacing));\n}',PAGINATION_OPTIONS=[10,20,50,100],CELL_REFS=new Map,KolTable$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.horizontal=!0,this.sortDirections=new Map,this.showPagination=!1,this.pageStartSlice=0,this.pageEndSlice=10,this.setSortDirection=(t,n)=>{this.sortDirections.clear(),this.sortDirections.set(t,n),this.sortFunction=t},this.handlePagination={onClick:(t,n)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onClick)&&this.state._pagination._on.onClick(t,n),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:n}))},onChangePage:(t,n)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onChangePage)&&this.state._pagination._on.onChangePage(t,n),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:n}))},onChangePageSize:(t,n)=>{var e;"function"==typeof(null===(e=this.state._pagination._on)||void 0===e?void 0:e.onChangePageSize)&&this.state._pagination._on.onChangePageSize(t,n),setState(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_pageSize:n})),setState(this,"_pageSize",n)}},this.beforePatchPagination=(t,n,e,i)=>{"_pagination"===i&&(this.showPagination=!0===t||""===t||"object"==typeof t&&null!==t)},this.updateSortedData=()=>{let t=this.state._data;if("function"==typeof this.sortFunction)switch(this.sortDirections.get(this.sortFunction)){case"NOS":t=[...this.state._data];break;case"ASC":t=this.sortFunction([...this.state._data]);break;default:t=this.sortFunction([...this.state._data]).reverse()}setState(this,"_sortedData",t)},this._caption=void 0,this._data=void 0,this._headers=void 0,this._minWidth=void 0,this._pagination=void 0,this.state={_caption:"",_data:[],_headers:{horizontal:[],vertical:[]},_pagination:{_page:1,_pageSize:10,_total:0},_sortedData:[]}}validateCaption(t){watchString(this,"_caption",t,{required:!0})}validateData(t){emptyStringByArrayHandler(t,(()=>{objectObjectHandler(t,(()=>{void 0===t&&(t=[]);try{t=parseJson(t)}catch(t){}Array.isArray(t)&&void 0===t.find((t=>!("object"==typeof t&&null!==t)))&&setState(this,"_data",t,{afterPatch:()=>{const t=setTimeout((()=>{clearTimeout(t),this.updateSortedData()}))}})}))}))}validateHeaders(t){emptyStringByArrayHandler(t,(()=>{objectObjectHandler(t,(()=>{try{t=parseJson(t)}catch(t){}watchValidator(this,"_headers",(t=>"object"==typeof t&&null!==t),new Set(["KoliBriTableHeaders"]),t,{hooks:{beforePatch:t=>{var n,e;const i=t;null===(n=i.horizontal)||void 0===n||n.forEach((t=>{t.forEach((t=>{"function"==typeof t.sort&&"string"==typeof t.sortDirection&&this.setSortDirection(t.sort,t.sortDirection)}))})),null===(e=i.vertical)||void 0===e||e.forEach((t=>{t.forEach((t=>{"function"==typeof t.sort&&"string"==typeof t.sortDirection&&this.setSortDirection(t.sort,t.sortDirection)}))}))}}})}))}))}validateMinWidth(t){watchString(this,"_minWidth",t,{defaultValue:void 0})}validatePagination(t){try{t=parseJson(t)}catch(t){}watchValidator(this,"_pagination",(()=>!0),new Set(["boolean","KoliBriTablePagination"]),t,{hooks:{beforePatch:this.beforePatchPagination}})}componentWillLoad(){this.validateCaption(this._caption),this.validateData(this._data),this.validateHeaders(this._headers),this.validateMinWidth(this._minWidth),this.validatePagination(this._pagination)}getNumberOfCols(t,n){let e=0;return t.forEach((t=>{let n=0;t.forEach((t=>{var e;return n+=null!==(e=t.colSpan)&&void 0!==e?e:1})),e<n&&(e=n)})),0===e&&(e=n.length),e}getNumberOfRows(t,n){let e=0;return t.forEach((t=>{let n=0;t.forEach((t=>{var e;return n+=null!==(e=t.rowSpan)&&void 0!==e?e:1})),e<n&&(e=n)})),0===e&&(e=n.length),e}filterHeaderKeys(t){const n=[];return t.forEach((t=>{t.forEach((t=>{"string"==typeof t.key&&n.push(t)}))})),n}getPrimaryHeader(t){var n,e;let i=this.filterHeaderKeys(null!==(n=t.horizontal)&&void 0!==n?n:[]);return this.horizontal=!0,0===i.length&&(i=this.filterHeaderKeys(null!==(e=t.vertical)&&void 0!==e?e:[]),i.length>0&&(this.horizontal=!1)),i}createDataField(t,n){n.horizontal=Array.isArray(null==n?void 0:n.horizontal)?n.horizontal:[],n.vertical=Array.isArray(null==n?void 0:n.vertical)?n.vertical:[];const e=this.getPrimaryHeader(n),i=this.getNumberOfCols(n.horizontal,t),a=this.getNumberOfRows(n.vertical,t),o=[],r=[],s=[];n.vertical.forEach(((t,n)=>{r[n]=0,s[n]=[]}));for(let l=0;l<a;l++){const a=[];n.vertical.forEach(((t,n)=>{let e=0;if(s[n].forEach((t=>e+=t)),e<=l){const i=t[l-e+r[n]];if("object"==typeof i){a.push(Object.assign(Object.assign({},i),{asTd:!1,data:{}}));let t=1;if("number"==typeof i.rowSpan&&i.rowSpan>1&&(t=i.rowSpan),s[n].push(t),"number"==typeof i.colSpan&&i.colSpan>1)for(let e=1;e<i.colSpan;e++)s[n+e].push(t);r[n]++}}}));for(let n=0;n<i;n++)!0===this.horizontal?"object"==typeof e[n]&&null!==e[n]&&"string"==typeof e[n].key&&"object"==typeof t[l]&&null!==t[l]&&a.push(Object.assign(Object.assign({},e[n]),{colSpan:void 0,data:t[l],label:t[l][e[n].key],rowSpan:void 0})):"object"==typeof e[l]&&null!==e[l]&&"string"==typeof e[l].key&&"object"==typeof t[n]&&null!==t[n]&&a.push(Object.assign(Object.assign({},e[l]),{colSpan:void 0,data:t[n],label:t[n][e[l].key],rowSpan:void 0}));o.push(a)}if(0===t.length){let t=0,e=0;Array.isArray(n.horizontal)&&n.horizontal.length>0&&n.horizontal[0].forEach((n=>{t+=n.colSpan||1})),Array.isArray(n.vertical)&&n.vertical.length>0&&(t-=n.vertical.length,n.vertical[0].forEach((t=>{e+=t.rowSpan||1})));const i={colSpan:t,label:"Es sind keine Einträge vorhanden.",render:void 0,rowSpan:Math.max(e,1)};0===o.length?o.push([i]):o[0].push(i)}return o}selectDisplayedData(t,n,e){return"number"==typeof n&&n>0&&"number"==typeof e&&e>0?(this.pageStartSlice=n*(e-1),this.pageEndSlice=n*e>t.length?t.length:n*e,t.slice(this.pageStartSlice,this.pageEndSlice)):(this.pageStartSlice=0,this.pageEndSlice=t.length,t)}cellRender(t,n){n instanceof HTMLElement&&(clearTimeout(CELL_REFS.get(n)),CELL_REFS.set(n,setTimeout((()=>{if(clearTimeout(CELL_REFS.get(n)),"function"==typeof t.render){const e=t.render(n,{asTd:t.asTd,label:t.label,textAlign:t.textAlign,width:t.width},t.data,this.state._data);"string"==typeof e&&(n.innerHTML=e)}}))))}render(){var t,n;const e=this.selectDisplayedData(this.state._sortedData,this.showPagination?null!==(n=null===(t=this.state._pagination)||void 0===t?void 0:t._pageSize)&&void 0!==n?n:10:this.state._sortedData.length,this.state._pagination._page||1),i=this.createDataField(e,this.state._headers);return h(Host,null,h("div",{tabindex:"0"},h("table",{style:{minWidth:this.state._minWidth}},h("caption",null,this.state._caption),Array.isArray(this.state._headers.horizontal)&&h("thead",null,this.state._headers.horizontal.map(((t,n)=>h("tr",{key:`thead-${n}`},t.map(((t,e)=>!0===t.asTd?h("td",{key:`thead-${n}-${e}-${t.label}`,class:{[t.textAlign]:"string"==typeof t.textAlign&&t.textAlign.length>0},colSpan:t.colSpan,rowSpan:t.rowSpan,style:{textAlign:t.textAlign,width:t.width},ref:"function"==typeof t.render?n=>{this.cellRender(t,n)}:void 0,innerHTML:"function"!=typeof t.render?t.label:""}):h("th",{key:`thead-${n}-${e}-${t.label}`,scope:"number"==typeof t.colSpan&&t.colSpan>1?"colgroup":"col",colSpan:t.colSpan,rowSpan:t.rowSpan,style:{width:t.width},"aria-sort":"function"==typeof t.sort?t.sort!==this.sortFunction||"NOS"===this.sortDirections.get(t.sort)||void 0===this.sortDirections.get(t.sort)?"none":"ASC"===this.sortDirections.get(t.sort)?"ascending":"descending":void 0,"data-sort":`sort-${this.sortDirections.get(t.sort)}`},h("div",{class:"w-full flex gap-1 items-center"},h("div",{class:{"w-full":!0,[t.textAlign]:"string"==typeof t.textAlign&&t.textAlign.length>0},innerHTML:t.label,style:{textAlign:t.textAlign}}),"function"==typeof t.sort&&h("kol-button",{exportparts:"button,ghost",_ariaLabel:"Sortierung von "+t.label+" ändern",_icon:t.sort!==this.sortFunction||"NOS"===this.sortDirections.get(t.sort)||void 0===this.sortDirections.get(t.sort)?"fas fa-sort":"ASC"===this.sortDirections.get(t.sort)?"fas fa-sort-up":"fas fa-sort-down",_iconOnly:!0,_label:"Sortierung von "+t.label+" ändern",_on:{onClick:()=>{if("function"==typeof t.sort){switch(this.sortFunction=t.sort,this.sortDirections.get(this.sortFunction)){case"ASC":this.setSortDirection(this.sortFunction,"DESC");break;case"DESC":this.setSortDirection(this.sortFunction,"NOS");break;default:this.setSortDirection(this.sortFunction,"ASC")}this.updateSortedData()}}},_variant:"ghost"}))))))))),h("tbody",null,i.map(((t,n)=>h("tr",{key:`tbody-${n}`},t.map(((t,e)=>!1===t.asTd?h("th",{key:`tbody-${n}-${e}-${t.label}`,scope:"number"==typeof t.rowSpan&&t.rowSpan>1?"rowgroup":"row",colSpan:t.colSpan,rowSpan:t.rowSpan,style:{width:t.width},"aria-sort":"function"==typeof t.sort?t.sort!==this.sortFunction||"NOS"===this.sortDirections.get(t.sort)||void 0===this.sortDirections.get(t.sort)?"none":"ASC"===this.sortDirections.get(t.sort)?"ascending":"descending":void 0,"data-sort":`sort-${this.sortDirections.get(t.sort)}`},h("div",{class:"w-full flex gap-1 items-center"},h("div",{class:{"w-full":!0,[t.textAlign]:"string"==typeof t.textAlign&&t.textAlign.length>0},innerHTML:t.label,style:{textAlign:t.textAlign}}),"function"==typeof t.sort&&h("kol-button",{exportparts:"button,ghost",_ariaLabel:"Sortierung von "+t.label+" ändern",_icon:t.sort!==this.sortFunction||"NOS"===this.sortDirections.get(t.sort)||void 0===this.sortDirections.get(t.sort)?"fas fa-sort":"ASC"===this.sortDirections.get(t.sort)?"fas fa-sort-up":"fas fa-sort-down",_iconOnly:!0,_label:"Sortierung von "+t.label+" ändern",_on:{onClick:()=>{if("function"==typeof t.sort){switch(this.sortFunction=t.sort,this.sortDirections.get(this.sortFunction)){case"ASC":this.setSortDirection(this.sortFunction,"DESC");break;case"DESC":this.setSortDirection(this.sortFunction,"NOS");break;default:this.setSortDirection(this.sortFunction,"ASC")}this.updateSortedData()}}},_variant:"ghost"}))):h("td",{key:`tbody-${n}-${e}-${t.label}`,class:{[t.textAlign]:"string"==typeof t.textAlign&&t.textAlign.length>0},colSpan:t.colSpan,rowSpan:t.rowSpan,style:{textAlign:t.textAlign,width:t.width},ref:"function"==typeof t.render?n=>{this.cellRender(t,n)}:void 0,innerHTML:"function"!=typeof t.render?t.label:""}))))))))),this.pageEndSlice>0&&this.showPagination&&h("div",{class:"pagination"},h("span",null,"Einträge ",this.pageEndSlice>0?this.pageStartSlice+1:0," bis ",this.pageEndSlice," von"," ",this.state._pagination._total||(Array.isArray(this.state._data)?this.state._data.length:0)," angezeigt"),h("div",null,h("kol-pagination",{_boundaryCount:this.state._pagination._boundaryCount,_customClass:this.state._pagination._customClass,_on:this.handlePagination,_page:this.state._pagination._page,_pageSize:this.state._pagination._pageSize,_pageSizeOptions:this.state._pagination._pageSizeOptions||PAGINATION_OPTIONS,_siblingCount:this.state._pagination._siblingCount,_tooltipAlign:"bottom",_total:this.state._pagination._total||this.state._data.length}))))}static get watchers(){return{_caption:["validateCaption"],_data:["validateData"],_headers:["validateHeaders"],_minWidth:["validateMinWidth"],_pagination:["validatePagination"]}}static get style(){return{default:defaultStyleCss}}},[33,"kol-table",{_caption:[1],_data:[1],_headers:[1],_minWidth:[1,"_min-width"],_pagination:[8],state:[32]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-table","kol-alert","kol-badge","kol-button","kol-button-wc","kol-heading-wc","kol-icon","kol-input","kol-pagination","kol-select","kol-span-wc","kol-tooltip"].forEach((t=>{switch(t){case"kol-table":customElements.get(t)||customElements.define(t,KolTable$1);break;case"kol-alert":customElements.get(t)||defineCustomElement$c();break;case"kol-badge":customElements.get(t)||defineCustomElement$b();break;case"kol-button":customElements.get(t)||defineCustomElement$a();break;case"kol-button-wc":customElements.get(t)||defineCustomElement$9();break;case"kol-heading-wc":customElements.get(t)||defineCustomElement$8();break;case"kol-icon":customElements.get(t)||defineCustomElement$7();break;case"kol-input":customElements.get(t)||defineCustomElement$6();break;case"kol-pagination":customElements.get(t)||defineCustomElement$5();break;case"kol-select":customElements.get(t)||defineCustomElement$4();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$3();break;case"kol-tooltip":customElements.get(t)||defineCustomElement$2()}}))}const KolTable=KolTable$1,defineCustomElement=defineCustomElement$1;export{KolTable,defineCustomElement};