@public-ui/components 1.4.2-rc.1 → 1.4.2-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.
Files changed (46) hide show
  1. package/cheat-sheet.html +6 -6
  2. package/custom-elements.json +1 -1
  3. package/dist/cjs/index-29c5d3c6.js.map +1 -1
  4. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  5. package/dist/cjs/kol-button.cjs.entry.js.map +1 -1
  6. package/dist/cjs/kol-heading-wc_2.cjs.entry.js +1 -1
  7. package/dist/cjs/kol-heading-wc_2.cjs.entry.js.map +1 -1
  8. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  9. package/dist/cjs/kol-link-button.cjs.entry.js.map +1 -1
  10. package/dist/cjs/kol-tooltip.cjs.entry.js +1 -1
  11. package/dist/cjs/kol-tooltip.cjs.entry.js.map +1 -1
  12. package/dist/cjs/kolibri.cjs.js.map +1 -1
  13. package/dist/cjs/loader.cjs.js.map +1 -1
  14. package/dist/components/component.js +1 -1
  15. package/dist/components/component.js.map +1 -1
  16. package/dist/components/component9.js +1 -1
  17. package/dist/components/component9.js.map +1 -1
  18. package/dist/components/kol-link-button.js +1 -1
  19. package/dist/components/kol-link-button.js.map +1 -1
  20. package/dist/components/shadow2.js +1 -1
  21. package/dist/components/shadow2.js.map +1 -1
  22. package/dist/esm/index-50adf9a0.js.map +1 -1
  23. package/dist/esm/kol-button.entry.js +1 -1
  24. package/dist/esm/kol-button.entry.js.map +1 -1
  25. package/dist/esm/kol-heading-wc_2.entry.js +1 -1
  26. package/dist/esm/kol-heading-wc_2.entry.js.map +1 -1
  27. package/dist/esm/kol-link-button.entry.js +1 -1
  28. package/dist/esm/kol-link-button.entry.js.map +1 -1
  29. package/dist/esm/kol-tooltip.entry.js +1 -1
  30. package/dist/esm/kol-tooltip.entry.js.map +1 -1
  31. package/dist/esm/kolibri.js.map +1 -1
  32. package/dist/esm/loader.js.map +1 -1
  33. package/dist/kolibri/i18n-1d6d91ab.js.map +1 -1
  34. package/dist/kolibri/index-50adf9a0.js.map +1 -1
  35. package/dist/kolibri/index-599f5430.js.map +1 -1
  36. package/dist/kolibri/kol-button.entry.js +1 -1
  37. package/dist/kolibri/kol-button.entry.js.map +1 -1
  38. package/dist/kolibri/kol-heading-wc_2.entry.js +1 -1
  39. package/dist/kolibri/kol-heading-wc_2.entry.js.map +1 -1
  40. package/dist/kolibri/kol-link-button.entry.js +1 -1
  41. package/dist/kolibri/kol-link-button.entry.js.map +1 -1
  42. package/dist/kolibri/kol-tooltip.entry.js +1 -1
  43. package/dist/kolibri/kol-tooltip.entry.js.map +1 -1
  44. package/dist/kolibri/kolibri.esm.js.map +1 -1
  45. package/jest-test-results.json +1 -1
  46. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as registerInstance,h,H as Host,g as getElement}from"./index-50adf9a0.js";import{a as propergateFocus}from"./reuse-9dd1192b.js";const defaultStyleCss=":host{--kolibri-border-color:#666;--kolibri-border-radius:0.125rem;--kolibri-border-width:1px;--kolibri-color-error:#f44336;--kolibri-color-info:#2196f3;--kolibri-color-success:#4caf50;--kolibri-color-warning:#ff9800;--kolibri-color-primary:#3f51b5;--kolibri-color-secondary:#ff4081;--kolibri-color-normal:#9e9e9e;--kolibri-color-danger:#f44336;--kolibri-color-ghost:#f5f5f5;--kolibri-color-disabled:#bdbdbd;--kolibri-color-text:#222222;--kolibri-color-visited:#9c27b0;--kolibri-font-family:Verdana, Arial, Tahoma, Helvetica, sans-serif;--kolibri-font-size:16px;--kolibri-spacing:0.25rem}:host{font-family:inherit;font-size:inherit}:host *{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{font-family:var(--kolibri-font-family);font-size:inherit}*{box-sizing:border-box}kol-icon{color:inherit}kol-span-wc{display:grid;place-items:center;width:100%}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}a{display:inline-flex;place-items:baseline}button{background-color:transparent;border-width:0;margin:0;min-height:44px;min-width:44px;padding:0}a,button,input,select,textarea{cursor:pointer}a.icon-only>kol-span-wc>span>span,:host button.icon-only>kol-span-wc>span>span{display:none}h1,h2,h3,h4,h5,h6{font-family:var(--kolibri-font-family);font-size:var(--kolibri-font-size);margin:0;padding:0}:host{display:inline-block}:host>kol-button-wc,:host>kol-link-wc{width:inherit}:host>kol-button-wc a,:host>kol-button-wc button,:host>kol-link-wc a,:host>kol-link-wc button{cursor:pointer;display:inline-block;min-height:44px;min-width:44px;padding:0;text-align:center;transition-duration:0.5s;transition-property:background-color, color, border-color;width:inherit}:host>kol-button-wc a:active,:host>kol-button-wc button:active,:host>kol-link-wc a:active,:host>kol-link-wc button:active{outline:0;box-shadow:none}:host>kol-button-wc a:disabled,:host>kol-button-wc button:disabled,:host>kol-link-wc a:disabled,:host>kol-link-wc button:disabled{box-shadow:none;cursor:not-allowed;opacity:0.5}",KolButton=class{constructor(i){registerInstance(this,i),this.catchRef=i=>{this.ref=i,propergateFocus(this.host,this.ref)},this._accessKey=void 0,this._ariaControls=void 0,this._ariaCurrent=void 0,this._ariaExpanded=void 0,this._ariaLabel="",this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._icon=void 0,this._iconAlign="left",this._iconOnly=!1,this._id=void 0,this._label=void 0,this._on=void 0,this._role=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._type="button",this._value=void 0,this._variant="normal"}render(){return h(Host,null,h("kol-button-wc",{ref:this.catchRef,class:{button:!0,[this._variant]:"custom"!==this._variant,[this._customClass]:"custom"===this._variant&&"string"==typeof this._customClass&&this._customClass.length>0},_accessKey:this._accessKey,_ariaControls:this._ariaControls,_ariaCurrent:this._ariaCurrent,_ariaExpanded:this._ariaExpanded,_ariaLabel:this._ariaLabel,_ariaSelected:this._ariaSelected,_customClass:this._customClass,_disabled:this._disabled,_icon:this._icon,_iconAlign:this._iconAlign,_iconOnly:this._iconOnly,_id:this._id,_label:this._label,_on:this._on,_role:this._role,_tabIndex:this._tabIndex,_tooltipAlign:this._tooltipAlign,_type:this._type,_value:this._value,_variant:this._variant},h("slot",{name:"expert",slot:"expert"})))}get host(){return getElement(this)}};KolButton.style={default:defaultStyleCss};export{KolButton as kol_button};
4
+ import{r as registerInstance,h,H as Host,g as getElement}from"./index-50adf9a0.js";import{a as propergateFocus}from"./reuse-9dd1192b.js";const defaultStyleCss=":host{--kolibri-border-color:#666;--kolibri-border-radius:0.125rem;--kolibri-border-width:1px;--kolibri-color-error:#f44336;--kolibri-color-info:#2196f3;--kolibri-color-success:#4caf50;--kolibri-color-warning:#ff9800;--kolibri-color-primary:#3f51b5;--kolibri-color-secondary:#ff4081;--kolibri-color-normal:#9e9e9e;--kolibri-color-danger:#f44336;--kolibri-color-ghost:#f5f5f5;--kolibri-color-disabled:#bdbdbd;--kolibri-color-text:#222222;--kolibri-color-visited:#9c27b0;--kolibri-font-family:Verdana, Arial, Tahoma, Helvetica, sans-serif;--kolibri-font-size:16px;--kolibri-spacing:0.25rem}:host{font-family:inherit;font-size:inherit}:host *{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{font-family:var(--kolibri-font-family);font-size:inherit}*{box-sizing:border-box}kol-icon{color:inherit}kol-span-wc{display:grid;place-items:center;width:100%}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}a{display:inline-flex;place-items:baseline}button{background-color:transparent;border-width:0;margin:0;min-height:44px;min-width:44px;padding:0}a,button,input,select,textarea{cursor:pointer}a.icon-only>kol-span-wc>span>span,:host button.icon-only>kol-span-wc>span>span{display:none}h1,h2,h3,h4,h5,h6{font-family:var(--kolibri-font-family);font-size:var(--kolibri-font-size);margin:0;padding:0}:host{display:inline-block}:host>kol-button-wc,:host>kol-link-wc{width:inherit}:host>kol-button-wc a,:host>kol-button-wc button,:host>kol-link-wc a,:host>kol-link-wc button{cursor:pointer;display:inline-block;font-size:1rem;min-height:44px;min-width:44px;padding:0;text-align:center;transition-duration:0.5s;transition-property:background-color, color, border-color;width:inherit}:host>kol-button-wc a:active,:host>kol-button-wc button:active,:host>kol-link-wc a:active,:host>kol-link-wc button:active{outline:0;box-shadow:none}:host>kol-button-wc a:disabled,:host>kol-button-wc button:disabled,:host>kol-link-wc a:disabled,:host>kol-link-wc button:disabled{box-shadow:none;cursor:not-allowed;opacity:0.5}",KolButton=class{constructor(i){registerInstance(this,i),this.catchRef=i=>{this.ref=i,propergateFocus(this.host,this.ref)},this._accessKey=void 0,this._ariaControls=void 0,this._ariaCurrent=void 0,this._ariaExpanded=void 0,this._ariaLabel="",this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._icon=void 0,this._iconAlign="left",this._iconOnly=!1,this._id=void 0,this._label=void 0,this._on=void 0,this._role=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._type="button",this._value=void 0,this._variant="normal"}render(){return h(Host,null,h("kol-button-wc",{ref:this.catchRef,class:{button:!0,[this._variant]:"custom"!==this._variant,[this._customClass]:"custom"===this._variant&&"string"==typeof this._customClass&&this._customClass.length>0},_accessKey:this._accessKey,_ariaControls:this._ariaControls,_ariaCurrent:this._ariaCurrent,_ariaExpanded:this._ariaExpanded,_ariaLabel:this._ariaLabel,_ariaSelected:this._ariaSelected,_customClass:this._customClass,_disabled:this._disabled,_icon:this._icon,_iconAlign:this._iconAlign,_iconOnly:this._iconOnly,_id:this._id,_label:this._label,_on:this._on,_role:this._role,_tabIndex:this._tabIndex,_tooltipAlign:this._tooltipAlign,_type:this._type,_value:this._value,_variant:this._variant},h("slot",{name:"expert",slot:"expert"})))}get host(){return getElement(this)}};KolButton.style={default:defaultStyleCss};export{KolButton as kol_button};
@@ -1 +1 @@
1
- {"file":"kol-button.entry.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,6/DAA6/D;;MCwBxgE,SAAS;;;IAIJ,aAAQ,GAAG,CAAC,GAA4B;MACxD,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;MACf,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;KACrC,CAAC;;;;;sBAkEmC,EAAE;;;qBAee,KAAK;;sBAYnB,MAAM;qBAKQ,KAAK;;;;;;yBA8BhB,KAAK;iBAKL,QAAQ;;oBAUF,QAAQ;;EA7IlD,MAAM;IACZ,QACC,EAAC,IAAI,QACJ,qBACC,GAAG,EAAE,IAAI,CAAC,QAAQ,EAClB,KAAK,EAAE;QACN,MAAM,EAAE,IAAI;QACZ,CAAC,IAAI,CAAC,QAAkB,GAAG,IAAI,CAAC,QAAQ,KAAK,QAAQ;QACrD,CAAC,IAAI,CAAC,YAAsB,GAAG,IAAI,CAAC,QAAQ,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,YAAY,KAAK,QAAQ,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC;OAClI,EACD,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAMvB,YAAM,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,GAAG,CACrB,CACV,EACN;GACF;;;;;;;;;","names":[],"sources":["./src/components/button/style.css?tag=kol-button&mode=default&encapsulation=shadow","./src/components/button/shadow.tsx"],"sourcesContent":["@import '../button.css';\n","import { Component, Element, h, Host, JSX, Prop } from '@stencil/core';\n\nimport { Generic } from '@a11y-ui/core';\nimport {\n\tAlternativButtonLinkRole,\n\tAriaCurrent,\n\tKoliBriButtonCallbacks,\n\tKoliBriButtonType,\n\tKoliBriButtonVariant,\n\tOptionalButtonProps,\n\tRequiredButtonProps,\n} from '../../types/button-link';\nimport { Stringified } from '../../types/common';\nimport { KoliBriIconProp } from '../../types/icon';\nimport { Alignment } from '../../types/props/alignment';\nimport { propergateFocus } from '../../utils/reuse';\n\n@Component({\n\ttag: 'kol-button',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolButton implements Generic.Element.Members<RequiredButtonProps, OptionalButtonProps> {\n\t@Element() private readonly host?: HTMLKolButtonElement;\n\tprivate ref?: HTMLKolButtonWcElement;\n\n\tprivate readonly catchRef = (ref?: HTMLKolButtonWcElement) => {\n\t\tthis.ref = ref;\n\t\tpropergateFocus(this.host, this.ref);\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<kol-button-wc\n\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tbutton: true,\n\t\t\t\t\t\t[this._variant as string]: this._variant !== 'custom',\n\t\t\t\t\t\t[this._customClass as string]: this._variant === 'custom' && typeof this._customClass === 'string' && this._customClass.length > 0,\n\t\t\t\t\t}}\n\t\t\t\t\t_accessKey={this._accessKey}\n\t\t\t\t\t_ariaControls={this._ariaControls}\n\t\t\t\t\t_ariaCurrent={this._ariaCurrent}\n\t\t\t\t\t_ariaExpanded={this._ariaExpanded}\n\t\t\t\t\t_ariaLabel={this._ariaLabel}\n\t\t\t\t\t_ariaSelected={this._ariaSelected}\n\t\t\t\t\t_customClass={this._customClass}\n\t\t\t\t\t_disabled={this._disabled}\n\t\t\t\t\t_icon={this._icon}\n\t\t\t\t\t_iconAlign={this._iconAlign}\n\t\t\t\t\t_iconOnly={this._iconOnly}\n\t\t\t\t\t_id={this._id}\n\t\t\t\t\t_label={this._label}\n\t\t\t\t\t_on={this._on}\n\t\t\t\t\t_role={this._role}\n\t\t\t\t\t_tabIndex={this._tabIndex}\n\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t\t_type={this._type}\n\t\t\t\t\t_value={this._value}\n\t\t\t\t\t_variant={this._variant}\n\t\t\t\t>\n\t\t\t\t\t{/*\n\t\t\t\t\t\tEs ist keine gute Idee hier einen Slot einzufügen, da dadurch ermöglicht wird,\n\t\t\t\t\t\tdie Unterstützung hinsichtlich der Barrierefreiheit der Komponente zu umgehen.\n\t\t\t\t\t*/}\n\t\t\t\t\t<slot name=\"expert\" slot=\"expert\" />\n\t\t\t\t</kol-button-wc>\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 des Buttons an. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label)\n\t */\n\t@Prop() 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@Prop() 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<unknown>;\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?: Alignment = '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 einen Wert an, den der Schalter bei einem Klick zurückgibt.\n\t */\n\t@Prop() public _value?: Stringified<unknown>;\n\n\t/**\n\t * Gibt an, welche Ausprägung der Button hat.\n\t */\n\t@Prop() public _variant?: KoliBriButtonVariant = 'normal';\n}\n"],"version":3}
1
+ {"file":"kol-button.entry.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,4gEAA4gE;;MCwBvhE,SAAS;;;IAIJ,aAAQ,GAAG,CAAC,GAA4B;MACxD,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;MACf,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;KACrC,CAAC;;;;;sBAkEmC,EAAE;;;qBAee,KAAK;;sBAYnB,MAAM;qBAKQ,KAAK;;;;;;yBA8BhB,KAAK;iBAKL,QAAQ;;oBAUF,QAAQ;;EA7IlD,MAAM;IACZ,QACC,EAAC,IAAI,QACJ,qBACC,GAAG,EAAE,IAAI,CAAC,QAAQ,EAClB,KAAK,EAAE;QACN,MAAM,EAAE,IAAI;QACZ,CAAC,IAAI,CAAC,QAAkB,GAAG,IAAI,CAAC,QAAQ,KAAK,QAAQ;QACrD,CAAC,IAAI,CAAC,YAAsB,GAAG,IAAI,CAAC,QAAQ,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,YAAY,KAAK,QAAQ,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC;OAClI,EACD,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAMvB,YAAM,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,GAAG,CACrB,CACV,EACN;GACF;;;;;;;;;","names":[],"sources":["./src/components/button/style.css?tag=kol-button&mode=default&encapsulation=shadow","./src/components/button/shadow.tsx"],"sourcesContent":["@import '../button.css';\n","import { Component, Element, h, Host, JSX, Prop } from '@stencil/core';\n\nimport { Generic } from '@a11y-ui/core';\nimport {\n\tAlternativButtonLinkRole,\n\tAriaCurrent,\n\tKoliBriButtonCallbacks,\n\tKoliBriButtonType,\n\tKoliBriButtonVariant,\n\tOptionalButtonProps,\n\tRequiredButtonProps,\n} from '../../types/button-link';\nimport { Stringified } from '../../types/common';\nimport { KoliBriIconProp } from '../../types/icon';\nimport { Alignment } from '../../types/props/alignment';\nimport { propergateFocus } from '../../utils/reuse';\n\n@Component({\n\ttag: 'kol-button',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolButton implements Generic.Element.Members<RequiredButtonProps, OptionalButtonProps> {\n\t@Element() private readonly host?: HTMLKolButtonElement;\n\tprivate ref?: HTMLKolButtonWcElement;\n\n\tprivate readonly catchRef = (ref?: HTMLKolButtonWcElement) => {\n\t\tthis.ref = ref;\n\t\tpropergateFocus(this.host, this.ref);\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<kol-button-wc\n\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tbutton: true,\n\t\t\t\t\t\t[this._variant as string]: this._variant !== 'custom',\n\t\t\t\t\t\t[this._customClass as string]: this._variant === 'custom' && typeof this._customClass === 'string' && this._customClass.length > 0,\n\t\t\t\t\t}}\n\t\t\t\t\t_accessKey={this._accessKey}\n\t\t\t\t\t_ariaControls={this._ariaControls}\n\t\t\t\t\t_ariaCurrent={this._ariaCurrent}\n\t\t\t\t\t_ariaExpanded={this._ariaExpanded}\n\t\t\t\t\t_ariaLabel={this._ariaLabel}\n\t\t\t\t\t_ariaSelected={this._ariaSelected}\n\t\t\t\t\t_customClass={this._customClass}\n\t\t\t\t\t_disabled={this._disabled}\n\t\t\t\t\t_icon={this._icon}\n\t\t\t\t\t_iconAlign={this._iconAlign}\n\t\t\t\t\t_iconOnly={this._iconOnly}\n\t\t\t\t\t_id={this._id}\n\t\t\t\t\t_label={this._label}\n\t\t\t\t\t_on={this._on}\n\t\t\t\t\t_role={this._role}\n\t\t\t\t\t_tabIndex={this._tabIndex}\n\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t\t_type={this._type}\n\t\t\t\t\t_value={this._value}\n\t\t\t\t\t_variant={this._variant}\n\t\t\t\t>\n\t\t\t\t\t{/*\n\t\t\t\t\t\tEs ist keine gute Idee hier einen Slot einzufügen, da dadurch ermöglicht wird,\n\t\t\t\t\t\tdie Unterstützung hinsichtlich der Barrierefreiheit der Komponente zu umgehen.\n\t\t\t\t\t*/}\n\t\t\t\t\t<slot name=\"expert\" slot=\"expert\" />\n\t\t\t\t</kol-button-wc>\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 des Buttons an. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label)\n\t */\n\t@Prop() 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@Prop() 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<unknown>;\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?: Alignment = '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 einen Wert an, den der Schalter bei einem Klick zurückgibt.\n\t */\n\t@Prop() public _value?: Stringified<unknown>;\n\n\t/**\n\t * Gibt an, welche Ausprägung der Button hat.\n\t */\n\t@Prop() public _variant?: KoliBriButtonVariant = 'normal';\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as registerInstance,h,H as Host}from"./index-50adf9a0.js";import{w as watchHeadingLevel}from"./validation-1165b64b.js";import{w as watchString}from"./prop.validators-dd337216.js";import"./index-599f5430.js";import"./a11y.tipps-a876ebb7.js";import"./dev.utils-ec1c1b88.js";import"./reuse-9dd1192b.js";const KolHeadingWc=class{constructor(t){registerInstance(this,t),this.renderHeadline=(t,i)=>{switch(i){case 1:return h("h1",{class:"headline"},t,h("slot",null));case 2:return h("h2",{class:"headline"},t,h("slot",null));case 3:return h("h3",{class:"headline"},t,h("slot",null));case 4:return h("h4",{class:"headline"},t,h("slot",null));case 5:return h("h5",{class:"headline"},t,h("slot",null));case 6:return h("h6",{class:"headline"},t,h("slot",null));default:return h("strong",{class:"headline"},t,h("slot",null))}},this._level=1,this._label=void 0,this._overline="",this.state={_label:""}}validateLabel(t){watchString(this,"_label",t)}validateLevel(t){watchHeadingLevel(this,t)}validateOverline(t){watchString(this,"_overline",t)}componentWillLoad(){this.validateLabel(this._label),this.validateLevel(this._level),this.validateOverline(this._overline)}render(){return h(Host,null,this.renderHeadline(this.state._label,this.state._level),this.state._overline&&h("span",{class:"overline"},this.state._overline))}static get watchers(){return{_label:["validateLabel"],_level:["validateLevel"],_overline:["validateOverline"]}}},KolInput=class{constructor(t){registerInstance(this,t),this._alert=!0,this._disabled=!1,this._error="",this._hideLabel=!1,this._hint="",this._icon=void 0,this._id=void 0,this._list=void 0,this._readOnly=!1,this._renderNoLabel=!1,this._required=!1,this._smartButton=void 0,this._touched=!1}render(){var t,i,e,s;const l="string"==typeof this._error&&this._error.length>0&&!0===this._touched,a="string"==typeof this._hint&&this._hint.length>0,n=!0===this._hideLabel&&!0!==this._required;return h(Host,{class:{disabled:!0===this._disabled,error:!0===l,"read-only":!0===this._readOnly,required:!0===this._required,touched:!0===this._touched}},!1===this._renderNoLabel&&h("label",{htmlFor:this._id,id:`${this._id}-label`,style:{height:n?"0":void 0,margin:n?"0":void 0,padding:n?"0":void 0,visibility:n?"hidden":void 0}},h("span",null,h("slot",{name:"label"}))),a&&h("span",{class:"hint",id:`${this._id}-hint`},this._hint),h("div",{class:{input:!0,"icon-left":"object"==typeof(null===(t=this._icon)||void 0===t?void 0:t.left),"icon-right":"object"==typeof(null===(i=this._icon)||void 0===i?void 0:i.right)}},h("div",{class:"icons"},(null===(e=this._icon)||void 0===e?void 0:e.left)?h("kol-icon",{_ariaLabel:"",_icon:this._icon.left.icon}):h("i",null),(null===(s=this._icon)||void 0===s?void 0:s.right)?h("kol-icon",{_ariaLabel:"",_icon:this._icon.right.icon}):h("i",null)),h("slot",{name:"input"}),"object"==typeof this._smartButton&&null!==this._smartButton&&h("kol-button-wc",{_ariaLabel:this._smartButton._ariaLabel,_customClass:this._smartButton._customClass,_disabled:this._smartButton._disabled,_icon:this._smartButton._icon,_iconOnly:!0,_id:this._smartButton._id,_label:this._smartButton._label,_on:this._smartButton._on,_tooltipAlign:this._smartButton._tooltipAlign,_variant:this._smartButton._variant})),l&&h("kol-alert",{class:"error",id:`${this._id}-error`,_alert:this._alert,_type:"error",_variant:"msg"},this._error),Array.isArray(this._list)&&this._list.length>0&&h("datalist",{id:`${this._id}-list`},this._list.map((t=>h("option",{value:t})))))}};export{KolHeadingWc as kol_heading_wc,KolInput as kol_input};
4
+ import{r as registerInstance,h,H as Host}from"./index-50adf9a0.js";import{w as watchHeadingLevel}from"./validation-1165b64b.js";import{w as watchString}from"./prop.validators-dd337216.js";import"./index-599f5430.js";import"./a11y.tipps-a876ebb7.js";import"./dev.utils-ec1c1b88.js";import"./reuse-9dd1192b.js";const KolHeadingWc=class{constructor(t){registerInstance(this,t),this.renderHeadline=(t,i)=>{switch(i){case 1:return h("h1",{class:"headline"},t,h("slot",null));case 2:return h("h2",{class:"headline"},t,h("slot",null));case 3:return h("h3",{class:"headline"},t,h("slot",null));case 4:return h("h4",{class:"headline"},t,h("slot",null));case 5:return h("h5",{class:"headline"},t,h("slot",null));case 6:return h("h6",{class:"headline"},t,h("slot",null));default:return h("strong",{class:"headline"},t,h("slot",null))}},this._level=1,this._label=void 0,this._overline="",this.state={_label:""}}validateLabel(t){watchString(this,"_label",t)}validateLevel(t){watchHeadingLevel(this,t)}validateOverline(t){watchString(this,"_overline",t)}componentWillLoad(){this.validateLabel(this._label),this.validateLevel(this._level),this.validateOverline(this._overline)}render(){return h(Host,null,this.renderHeadline(this.state._label,this.state._level),this.state._overline&&h("span",{class:"overline"},this.state._overline))}static get watchers(){return{_label:["validateLabel"],_level:["validateLevel"],_overline:["validateOverline"]}}},KolInput=class{constructor(t){registerInstance(this,t),this._alert=!0,this._disabled=!1,this._error="",this._hideLabel=!1,this._hint="",this._icon=void 0,this._id=void 0,this._list=void 0,this._readOnly=!1,this._renderNoLabel=!1,this._required=!1,this._smartButton=void 0,this._touched=!1}render(){var t,i,e,s;const l="string"==typeof this._error&&this._error.length>0&&!0===this._touched,a="string"==typeof this._hint&&this._hint.length>0,r=!0===this._hideLabel&&!0!==this._required;return h(Host,{class:{disabled:!0===this._disabled,error:!0===l,"read-only":!0===this._readOnly,required:!0===this._required,touched:!0===this._touched}},!1===this._renderNoLabel&&h("label",{id:`${this._id}-label`,hidden:r,htmlFor:this._id},h("span",null,h("slot",{name:"label"}))),a&&h("span",{class:"hint",id:`${this._id}-hint`},this._hint),h("div",{class:{input:!0,"icon-left":"object"==typeof(null===(t=this._icon)||void 0===t?void 0:t.left),"icon-right":"object"==typeof(null===(i=this._icon)||void 0===i?void 0:i.right)}},h("div",{class:"icons"},(null===(e=this._icon)||void 0===e?void 0:e.left)?h("kol-icon",{_ariaLabel:"",_icon:this._icon.left.icon}):h("i",null),(null===(s=this._icon)||void 0===s?void 0:s.right)?h("kol-icon",{_ariaLabel:"",_icon:this._icon.right.icon}):h("i",null)),h("slot",{name:"input"}),"object"==typeof this._smartButton&&null!==this._smartButton&&h("kol-button-wc",{_ariaLabel:this._smartButton._ariaLabel,_customClass:this._smartButton._customClass,_disabled:this._smartButton._disabled,_icon:this._smartButton._icon,_iconOnly:!0,_id:this._smartButton._id,_label:this._smartButton._label,_on:this._smartButton._on,_tooltipAlign:this._smartButton._tooltipAlign,_variant:this._smartButton._variant})),l&&h("kol-alert",{class:"error",id:`${this._id}-error`,_alert:this._alert,_type:"error",_variant:"msg"},this._error),Array.isArray(this._list)&&this._list.length>0&&h("datalist",{id:`${this._id}-list`},this._list.map((t=>h("option",{value:t})))))}};export{KolHeadingWc as kol_heading_wc,KolInput as kol_input};
@@ -1 +1 @@
1
- {"file":"kol-heading-wc.kol-input.entry.js","mappings":"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","names":[],"sources":["./src/components/heading/component.tsx","./src/components/input/component.tsx"],"sourcesContent":["import { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@a11y-ui/core';\nimport { HeadingLevel } from '../../types/heading-level';\nimport { watchHeadingLevel } from './validation';\nimport { watchString } from '../../utils/prop.validators';\n\n/**\n * API\n */\ntype RequiredProps = {\n\tlabel: string;\n};\ntype OptionalProps = {\n\toverline: string;\n\tlevel: HeadingLevel;\n};\nexport type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = RequiredProps;\ntype OptionalStates = OptionalProps;\ntype States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\n@Component({\n\ttag: 'kol-heading-wc',\n\tshadow: false,\n})\nexport class KolHeadingWc implements Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates> {\n\t/**\n\t * Gibt an, welchen H-Level von 1 bis 6 die Überschrift hat. Oder ob es keine Überschrift ist, sondern nur fett gedruckt.\n\t */\n\t@Prop() public _level?: HeadingLevel = 1;\n\n\t/**\n\t * Gibt den Text der Überschrift an.\n\t */\n\t@Prop() public _label!: string;\n\n\t/**\n\t * Gibt den Text der zusätzlichen Beschriftung an.\n\t */\n\t@Prop() public _overline?: string = '';\n\n\t/**\n\t * @see: components/abbr/component.tsx (@State)\n\t */\n\t@State() public state: States = {\n\t\t_label: '',\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 (@Watch)\n\t */\n\t@Watch('_level')\n\tpublic validateLevel(value?: HeadingLevel): void {\n\t\twatchHeadingLevel(this, value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_overline')\n\tpublic validateOverline(value?: string): void {\n\t\twatchString(this, '_overline', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentWillLoad)\n\t */\n\tpublic componentWillLoad(): void {\n\t\tthis.validateLabel(this._label);\n\t\tthis.validateLevel(this._level);\n\t\tthis.validateOverline(this._overline);\n\t}\n\n\tprivate readonly renderHeadline = (label: string, level?: HeadingLevel): JSX.Element => {\n\t\tswitch (level) {\n\t\t\tcase 1:\n\t\t\t\treturn (\n\t\t\t\t\t<h1 class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</h1>\n\t\t\t\t);\n\t\t\tcase 2:\n\t\t\t\treturn (\n\t\t\t\t\t<h2 class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</h2>\n\t\t\t\t);\n\t\t\tcase 3:\n\t\t\t\treturn (\n\t\t\t\t\t<h3 class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</h3>\n\t\t\t\t);\n\t\t\tcase 4:\n\t\t\t\treturn (\n\t\t\t\t\t<h4 class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</h4>\n\t\t\t\t);\n\t\t\tcase 5:\n\t\t\t\treturn (\n\t\t\t\t\t<h5 class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</h5>\n\t\t\t\t);\n\t\t\tcase 6:\n\t\t\t\treturn (\n\t\t\t\t\t<h6 class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</h6>\n\t\t\t\t);\n\t\t\tdefault:\n\t\t\t\treturn (\n\t\t\t\t\t<strong class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</strong>\n\t\t\t\t);\n\t\t}\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t{this.renderHeadline(this.state._label, this.state._level)}\n\t\t\t\t{this.state._overline && <span class=\"overline\">{this.state._overline}</span>}\n\t\t\t</Host>\n\t\t);\n\t}\n}\n","/* eslint-disable jsx-a11y/label-has-associated-control */\nimport { Component, h, Host, JSX, Prop } from '@stencil/core';\nimport { ButtonProps } from '../../types/button-link';\nimport { Stringified } from '../../types/common';\nimport { KoliBriCustomIcon } from '../../types/icon';\n\nimport { KoliBriHorizontalIcon } from '../../types/icon';\nimport { Props } from './types';\n\n/**\n * @internal\n */\n@Component({\n\ttag: 'kol-input',\n\tshadow: false,\n})\nexport class KolInput implements Props {\n\tpublic render(): JSX.Element {\n\t\tconst hasError = typeof this._error === 'string' && this._error.length > 0 && this._touched === true;\n\t\tconst hasHint = typeof this._hint === 'string' && this._hint.length > 0;\n\t\tconst hideLabel = this._hideLabel === true && this._required !== true;\n\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={{\n\t\t\t\t\tdisabled: this._disabled === true,\n\t\t\t\t\terror: hasError === true,\n\t\t\t\t\t'read-only': this._readOnly === true,\n\t\t\t\t\trequired: this._required === true,\n\t\t\t\t\ttouched: this._touched === true,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{this._renderNoLabel === false && (\n\t\t\t\t\t<label\n\t\t\t\t\t\thtmlFor={this._id}\n\t\t\t\t\t\tid={`${this._id}-label`}\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\theight: hideLabel ? '0' : undefined,\n\t\t\t\t\t\t\tmargin: hideLabel ? '0' : undefined,\n\t\t\t\t\t\t\tpadding: hideLabel ? '0' : undefined,\n\t\t\t\t\t\t\tvisibility: hideLabel ? 'hidden' : undefined,\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<slot name=\"label\"></slot>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</label>\n\t\t\t\t)}\n\t\t\t\t{hasHint && (\n\t\t\t\t\t<span class=\"hint\" id={`${this._id}-hint`}>\n\t\t\t\t\t\t{this._hint}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t<div\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tinput: true,\n\t\t\t\t\t\t'icon-left': typeof this._icon?.left === 'object',\n\t\t\t\t\t\t'icon-right': typeof this._icon?.right === 'object',\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{/* grid grid-cols-2 justify-between h-0 mx-3 my-2 */}\n\t\t\t\t\t<div class=\"icons\">\n\t\t\t\t\t\t{this._icon?.left ? <kol-icon _ariaLabel=\"\" _icon={(this._icon.left as KoliBriCustomIcon).icon}></kol-icon> : <i />}\n\t\t\t\t\t\t{this._icon?.right ? <kol-icon _ariaLabel=\"\" _icon={(this._icon.right as KoliBriCustomIcon).icon}></kol-icon> : <i />}\n\t\t\t\t\t</div>\n\t\t\t\t\t<slot name=\"input\"></slot>\n\t\t\t\t\t{typeof this._smartButton === 'object' && this._smartButton !== null && (\n\t\t\t\t\t\t<kol-button-wc\n\t\t\t\t\t\t\t_ariaLabel={this._smartButton._ariaLabel}\n\t\t\t\t\t\t\t_customClass={this._smartButton._customClass}\n\t\t\t\t\t\t\t_disabled={this._smartButton._disabled}\n\t\t\t\t\t\t\t_icon={this._smartButton._icon}\n\t\t\t\t\t\t\t_iconOnly={true}\n\t\t\t\t\t\t\t_id={this._smartButton._id}\n\t\t\t\t\t\t\t_label={this._smartButton._label}\n\t\t\t\t\t\t\t_on={this._smartButton._on}\n\t\t\t\t\t\t\t_tooltipAlign={this._smartButton._tooltipAlign}\n\t\t\t\t\t\t\t_variant={this._smartButton._variant}\n\t\t\t\t\t\t></kol-button-wc>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{hasError && (\n\t\t\t\t\t<kol-alert class=\"error\" id={`${this._id}-error`} _alert={this._alert} _type=\"error\" _variant=\"msg\">\n\t\t\t\t\t\t{this._error}\n\t\t\t\t\t</kol-alert>\n\t\t\t\t)}\n\t\t\t\t{Array.isArray(this._list) && this._list.length > 0 && (\n\t\t\t\t\t<datalist id={`${this._id}-list`}>\n\t\t\t\t\t\t{this._list.map((option: string) => (\n\t\t\t\t\t\t\t<option value={option} />\n\t\t\t\t\t\t))}\n\t\t\t\t\t</datalist>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt an, ob die Fehlermeldung vorgelesen werden soll, wenn es eine gibt.\n\t */\n\t@Prop({ reflect: true }) public _alert?: boolean = true;\n\n\t/**\n\t * Gibt an, ob das Eingabefeld aktiviert oder deaktiviert ist.\n\t */\n\t@Prop({ reflect: true }) public _disabled?: boolean = false;\n\n\t/**\n\t * Gibt den Text für eine Fehlermeldung an.\n\t */\n\t@Prop() public _error?: string = '';\n\n\t/**\n\t * Gibt an, ob das Eingabefeld kein sichtbares Label haben soll.\n\t */\n\t@Prop({ reflect: true }) public _hideLabel?: boolean = false;\n\n\t/**\n\t * Gibt den Text für eine Hinweistext an.\n\t */\n\t@Prop() public _hint?: string = '';\n\n\t/**\n\t * Ermöglicht das Anzeigen von Icons links und/oder rechts am Rand des Eingabefeldes.\n\t */\n\t@Prop() public _icon?: KoliBriHorizontalIcon;\n\n\t/**\n\t * Gibt die technische ID des Eingabefeldes an.\n\t */\n\t@Prop() public _id!: string;\n\n\t/**\n\t * Gibt die Liste der Vorschlagswörter an.\n\t */\n\t@Prop() public _list?: Stringified<string[]>;\n\n\t/**\n\t * Gibt an, ob die Eingabefeld nur lesend ist.\n\t */\n\t@Prop({ reflect: true }) public _readOnly?: boolean = false;\n\n\t/**\n\t * Gibt an, ob die Komponente kein Label rendern soll.\n\t */\n\t@Prop({ reflect: true }) public _renderNoLabel?: boolean = false;\n\n\t/**\n\t * Gibt an, ob die Checkbox ein Pflichtfeld ist.\n\t */\n\t@Prop({ reflect: true }) public _required?: boolean = false;\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?: ButtonProps;\n\n\t/**\n\t * Gibt an, ob dieses Eingabefeld von Nutzer:innen einmal besucht/berührt wurde.\n\t */\n\t@Prop({ reflect: true }) public _touched?: boolean = false;\n}\n"],"version":3}
1
+ {"file":"kol-heading-wc.kol-input.entry.js","mappings":"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","names":[],"sources":["./src/components/heading/component.tsx","./src/components/input/component.tsx"],"sourcesContent":["import { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@a11y-ui/core';\nimport { HeadingLevel } from '../../types/heading-level';\nimport { watchHeadingLevel } from './validation';\nimport { watchString } from '../../utils/prop.validators';\n\n/**\n * API\n */\ntype RequiredProps = {\n\tlabel: string;\n};\ntype OptionalProps = {\n\toverline: string;\n\tlevel: HeadingLevel;\n};\nexport type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = RequiredProps;\ntype OptionalStates = OptionalProps;\ntype States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\n@Component({\n\ttag: 'kol-heading-wc',\n\tshadow: false,\n})\nexport class KolHeadingWc implements Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates> {\n\t/**\n\t * Gibt an, welchen H-Level von 1 bis 6 die Überschrift hat. Oder ob es keine Überschrift ist, sondern nur fett gedruckt.\n\t */\n\t@Prop() public _level?: HeadingLevel = 1;\n\n\t/**\n\t * Gibt den Text der Überschrift an.\n\t */\n\t@Prop() public _label!: string;\n\n\t/**\n\t * Gibt den Text der zusätzlichen Beschriftung an.\n\t */\n\t@Prop() public _overline?: string = '';\n\n\t/**\n\t * @see: components/abbr/component.tsx (@State)\n\t */\n\t@State() public state: States = {\n\t\t_label: '',\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 (@Watch)\n\t */\n\t@Watch('_level')\n\tpublic validateLevel(value?: HeadingLevel): void {\n\t\twatchHeadingLevel(this, value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_overline')\n\tpublic validateOverline(value?: string): void {\n\t\twatchString(this, '_overline', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentWillLoad)\n\t */\n\tpublic componentWillLoad(): void {\n\t\tthis.validateLabel(this._label);\n\t\tthis.validateLevel(this._level);\n\t\tthis.validateOverline(this._overline);\n\t}\n\n\tprivate readonly renderHeadline = (label: string, level?: HeadingLevel): JSX.Element => {\n\t\tswitch (level) {\n\t\t\tcase 1:\n\t\t\t\treturn (\n\t\t\t\t\t<h1 class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</h1>\n\t\t\t\t);\n\t\t\tcase 2:\n\t\t\t\treturn (\n\t\t\t\t\t<h2 class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</h2>\n\t\t\t\t);\n\t\t\tcase 3:\n\t\t\t\treturn (\n\t\t\t\t\t<h3 class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</h3>\n\t\t\t\t);\n\t\t\tcase 4:\n\t\t\t\treturn (\n\t\t\t\t\t<h4 class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</h4>\n\t\t\t\t);\n\t\t\tcase 5:\n\t\t\t\treturn (\n\t\t\t\t\t<h5 class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</h5>\n\t\t\t\t);\n\t\t\tcase 6:\n\t\t\t\treturn (\n\t\t\t\t\t<h6 class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</h6>\n\t\t\t\t);\n\t\t\tdefault:\n\t\t\t\treturn (\n\t\t\t\t\t<strong class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</strong>\n\t\t\t\t);\n\t\t}\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t{this.renderHeadline(this.state._label, this.state._level)}\n\t\t\t\t{this.state._overline && <span class=\"overline\">{this.state._overline}</span>}\n\t\t\t</Host>\n\t\t);\n\t}\n}\n","/* eslint-disable jsx-a11y/label-has-associated-control */\nimport { Component, h, Host, JSX, Prop } from '@stencil/core';\nimport { ButtonProps } from '../../types/button-link';\nimport { Stringified } from '../../types/common';\nimport { KoliBriCustomIcon } from '../../types/icon';\n\nimport { KoliBriHorizontalIcon } from '../../types/icon';\nimport { Props } from './types';\n\n/**\n * @internal\n */\n@Component({\n\ttag: 'kol-input',\n\tshadow: false,\n})\nexport class KolInput implements Props {\n\tpublic render(): JSX.Element {\n\t\tconst hasError = typeof this._error === 'string' && this._error.length > 0 && this._touched === true;\n\t\tconst hasHint = typeof this._hint === 'string' && this._hint.length > 0;\n\t\tconst hideLabel = this._hideLabel === true && this._required !== true;\n\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={{\n\t\t\t\t\tdisabled: this._disabled === true,\n\t\t\t\t\terror: hasError === true,\n\t\t\t\t\t'read-only': this._readOnly === true,\n\t\t\t\t\trequired: this._required === true,\n\t\t\t\t\ttouched: this._touched === true,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{this._renderNoLabel === false && (\n\t\t\t\t\t<label id={`${this._id}-label`} hidden={hideLabel} htmlFor={this._id}>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<slot name=\"label\"></slot>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</label>\n\t\t\t\t)}\n\t\t\t\t{hasHint && (\n\t\t\t\t\t<span class=\"hint\" id={`${this._id}-hint`}>\n\t\t\t\t\t\t{this._hint}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t<div\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tinput: true,\n\t\t\t\t\t\t'icon-left': typeof this._icon?.left === 'object',\n\t\t\t\t\t\t'icon-right': typeof this._icon?.right === 'object',\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{/* grid grid-cols-2 justify-between h-0 mx-3 my-2 */}\n\t\t\t\t\t<div class=\"icons\">\n\t\t\t\t\t\t{this._icon?.left ? <kol-icon _ariaLabel=\"\" _icon={(this._icon.left as KoliBriCustomIcon).icon}></kol-icon> : <i />}\n\t\t\t\t\t\t{this._icon?.right ? <kol-icon _ariaLabel=\"\" _icon={(this._icon.right as KoliBriCustomIcon).icon}></kol-icon> : <i />}\n\t\t\t\t\t</div>\n\t\t\t\t\t<slot name=\"input\"></slot>\n\t\t\t\t\t{typeof this._smartButton === 'object' && this._smartButton !== null && (\n\t\t\t\t\t\t<kol-button-wc\n\t\t\t\t\t\t\t_ariaLabel={this._smartButton._ariaLabel}\n\t\t\t\t\t\t\t_customClass={this._smartButton._customClass}\n\t\t\t\t\t\t\t_disabled={this._smartButton._disabled}\n\t\t\t\t\t\t\t_icon={this._smartButton._icon}\n\t\t\t\t\t\t\t_iconOnly={true}\n\t\t\t\t\t\t\t_id={this._smartButton._id}\n\t\t\t\t\t\t\t_label={this._smartButton._label}\n\t\t\t\t\t\t\t_on={this._smartButton._on}\n\t\t\t\t\t\t\t_tooltipAlign={this._smartButton._tooltipAlign}\n\t\t\t\t\t\t\t_variant={this._smartButton._variant}\n\t\t\t\t\t\t></kol-button-wc>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{hasError && (\n\t\t\t\t\t<kol-alert class=\"error\" id={`${this._id}-error`} _alert={this._alert} _type=\"error\" _variant=\"msg\">\n\t\t\t\t\t\t{this._error}\n\t\t\t\t\t</kol-alert>\n\t\t\t\t)}\n\t\t\t\t{Array.isArray(this._list) && this._list.length > 0 && (\n\t\t\t\t\t<datalist id={`${this._id}-list`}>\n\t\t\t\t\t\t{this._list.map((option: string) => (\n\t\t\t\t\t\t\t<option value={option} />\n\t\t\t\t\t\t))}\n\t\t\t\t\t</datalist>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt an, ob die Fehlermeldung vorgelesen werden soll, wenn es eine gibt.\n\t */\n\t@Prop({ reflect: true }) public _alert?: boolean = true;\n\n\t/**\n\t * Gibt an, ob das Eingabefeld aktiviert oder deaktiviert ist.\n\t */\n\t@Prop({ reflect: true }) public _disabled?: boolean = false;\n\n\t/**\n\t * Gibt den Text für eine Fehlermeldung an.\n\t */\n\t@Prop() public _error?: string = '';\n\n\t/**\n\t * Gibt an, ob das Eingabefeld kein sichtbares Label haben soll.\n\t */\n\t@Prop({ reflect: true }) public _hideLabel?: boolean = false;\n\n\t/**\n\t * Gibt den Text für eine Hinweistext an.\n\t */\n\t@Prop() public _hint?: string = '';\n\n\t/**\n\t * Ermöglicht das Anzeigen von Icons links und/oder rechts am Rand des Eingabefeldes.\n\t */\n\t@Prop() public _icon?: KoliBriHorizontalIcon;\n\n\t/**\n\t * Gibt die technische ID des Eingabefeldes an.\n\t */\n\t@Prop() public _id!: string;\n\n\t/**\n\t * Gibt die Liste der Vorschlagswörter an.\n\t */\n\t@Prop() public _list?: Stringified<string[]>;\n\n\t/**\n\t * Gibt an, ob die Eingabefeld nur lesend ist.\n\t */\n\t@Prop({ reflect: true }) public _readOnly?: boolean = false;\n\n\t/**\n\t * Gibt an, ob die Komponente kein Label rendern soll.\n\t */\n\t@Prop({ reflect: true }) public _renderNoLabel?: boolean = false;\n\n\t/**\n\t * Gibt an, ob die Checkbox ein Pflichtfeld ist.\n\t */\n\t@Prop({ reflect: true }) public _required?: boolean = false;\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?: ButtonProps;\n\n\t/**\n\t * Gibt an, ob dieses Eingabefeld von Nutzer:innen einmal besucht/berührt wurde.\n\t */\n\t@Prop({ reflect: true }) public _touched?: boolean = false;\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as registerInstance,h,H as Host,g as getElement}from"./index-50adf9a0.js";import{w as watchString}from"./prop.validators-dd337216.js";import{a as propergateFocus}from"./reuse-9dd1192b.js";import{w as watchButtonVariant}from"./controller-b4263f6b.js";import{a as translate}from"./i18n-1d6d91ab.js";import"./index-599f5430.js";import"./a11y.tipps-a876ebb7.js";import"./dev.utils-ec1c1b88.js";const defaultStyleCss=":host{--kolibri-border-color:#666;--kolibri-border-radius:0.125rem;--kolibri-border-width:1px;--kolibri-color-error:#f44336;--kolibri-color-info:#2196f3;--kolibri-color-success:#4caf50;--kolibri-color-warning:#ff9800;--kolibri-color-primary:#3f51b5;--kolibri-color-secondary:#ff4081;--kolibri-color-normal:#9e9e9e;--kolibri-color-danger:#f44336;--kolibri-color-ghost:#f5f5f5;--kolibri-color-disabled:#bdbdbd;--kolibri-color-text:#222222;--kolibri-color-visited:#9c27b0;--kolibri-font-family:Verdana, Arial, Tahoma, Helvetica, sans-serif;--kolibri-font-size:16px;--kolibri-spacing:0.25rem}:host{font-family:inherit;font-size:inherit}:host *{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{font-family:var(--kolibri-font-family);font-size:inherit}*{box-sizing:border-box}kol-icon{color:inherit}kol-span-wc{display:grid;place-items:center;width:100%}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}a{display:inline-flex;place-items:baseline}button{background-color:transparent;border-width:0;margin:0;min-height:44px;min-width:44px;padding:0}a,button,input,select,textarea{cursor:pointer}a.icon-only>kol-span-wc>span>span,:host button.icon-only>kol-span-wc>span>span{display:none}h1,h2,h3,h4,h5,h6{font-family:var(--kolibri-font-family);font-size:var(--kolibri-font-size);margin:0;padding:0}:host{display:inline-block}:host>kol-button-wc,:host>kol-link-wc{width:inherit}:host>kol-button-wc a,:host>kol-button-wc button,:host>kol-link-wc a,:host>kol-link-wc button{cursor:pointer;display:inline-block;min-height:44px;min-width:44px;padding:0;text-align:center;transition-duration:0.5s;transition-property:background-color, color, border-color;width:inherit}:host>kol-button-wc a:active,:host>kol-button-wc button:active,:host>kol-link-wc a:active,:host>kol-link-wc button:active{outline:0;box-shadow:none}:host>kol-button-wc a:disabled,:host>kol-button-wc button:disabled,:host>kol-link-wc a:disabled,:host>kol-link-wc button:disabled{box-shadow:none;cursor:not-allowed;opacity:0.5}",KolLinkButton=class{constructor(t){registerInstance(this,t),this.catchRef=t=>{this.ref=t,propergateFocus(this.host,this.ref)},this._ariaControls=void 0,this._ariaCurrent=void 0,this._ariaExpanded=void 0,this._ariaLabel=void 0,this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._href=void 0,this._icon=void 0,this._iconOnly=!1,this._label=void 0,this._on=void 0,this._role=void 0,this._tabIndex=void 0,this._target=void 0,this._targetDescription=translate("kol-open-link-in-tab"),this._tooltipAlign="right",this._variant="normal",this.state={}}render(){return h(Host,null,h("kol-link-wc",{ref:this.catchRef,class:{button:!0,[this.state._variant]:"custom"!==this.state._variant,[this.state._customClass]:"custom"===this.state._variant&&"string"==typeof this.state._customClass&&this.state._customClass.length>0},_ariaControls:this._ariaControls,_ariaCurrent:this._ariaCurrent,_ariaExpanded:this._ariaExpanded,_ariaLabel:this._ariaLabel,_ariaSelected:this._ariaSelected,_disabled:this._disabled,_href:this._href,_icon:this._icon,_iconOnly:this._iconOnly,_label:this._label,_on:this._on,_role:"button",_tabIndex:this._tabIndex,_target:this._target,_targetDescription:this._targetDescription,_tooltipAlign:this._tooltipAlign},h("slot",{name:"expert",slot:"expert"})))}validateCustomClass(t){watchString(this,"_customClass",t,{defaultValue:void 0})}validateVariant(t){watchButtonVariant(this,"_variant",t)}componentWillLoad(){this.validateCustomClass(this._customClass),this.validateVariant(this._variant)}get host(){return getElement(this)}static get watchers(){return{_customClass:["validateCustomClass"],_variant:["validateVariant"]}}};KolLinkButton.style={default:defaultStyleCss};export{KolLinkButton as kol_link_button};
4
+ import{r as registerInstance,h,H as Host,g as getElement}from"./index-50adf9a0.js";import{w as watchString}from"./prop.validators-dd337216.js";import{a as propergateFocus}from"./reuse-9dd1192b.js";import{w as watchButtonVariant}from"./controller-b4263f6b.js";import{a as translate}from"./i18n-1d6d91ab.js";import"./index-599f5430.js";import"./a11y.tipps-a876ebb7.js";import"./dev.utils-ec1c1b88.js";const defaultStyleCss=":host{--kolibri-border-color:#666;--kolibri-border-radius:0.125rem;--kolibri-border-width:1px;--kolibri-color-error:#f44336;--kolibri-color-info:#2196f3;--kolibri-color-success:#4caf50;--kolibri-color-warning:#ff9800;--kolibri-color-primary:#3f51b5;--kolibri-color-secondary:#ff4081;--kolibri-color-normal:#9e9e9e;--kolibri-color-danger:#f44336;--kolibri-color-ghost:#f5f5f5;--kolibri-color-disabled:#bdbdbd;--kolibri-color-text:#222222;--kolibri-color-visited:#9c27b0;--kolibri-font-family:Verdana, Arial, Tahoma, Helvetica, sans-serif;--kolibri-font-size:16px;--kolibri-spacing:0.25rem}:host{font-family:inherit;font-size:inherit}:host *{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{font-family:var(--kolibri-font-family);font-size:inherit}*{box-sizing:border-box}kol-icon{color:inherit}kol-span-wc{display:grid;place-items:center;width:100%}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}a{display:inline-flex;place-items:baseline}button{background-color:transparent;border-width:0;margin:0;min-height:44px;min-width:44px;padding:0}a,button,input,select,textarea{cursor:pointer}a.icon-only>kol-span-wc>span>span,:host button.icon-only>kol-span-wc>span>span{display:none}h1,h2,h3,h4,h5,h6{font-family:var(--kolibri-font-family);font-size:var(--kolibri-font-size);margin:0;padding:0}:host{display:inline-block}:host>kol-button-wc,:host>kol-link-wc{width:inherit}:host>kol-button-wc a,:host>kol-button-wc button,:host>kol-link-wc a,:host>kol-link-wc button{cursor:pointer;display:inline-block;font-size:1rem;min-height:44px;min-width:44px;padding:0;text-align:center;transition-duration:0.5s;transition-property:background-color, color, border-color;width:inherit}:host>kol-button-wc a:active,:host>kol-button-wc button:active,:host>kol-link-wc a:active,:host>kol-link-wc button:active{outline:0;box-shadow:none}:host>kol-button-wc a:disabled,:host>kol-button-wc button:disabled,:host>kol-link-wc a:disabled,:host>kol-link-wc button:disabled{box-shadow:none;cursor:not-allowed;opacity:0.5}",KolLinkButton=class{constructor(t){registerInstance(this,t),this.catchRef=t=>{this.ref=t,propergateFocus(this.host,this.ref)},this._ariaControls=void 0,this._ariaCurrent=void 0,this._ariaExpanded=void 0,this._ariaLabel=void 0,this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._href=void 0,this._icon=void 0,this._iconOnly=!1,this._label=void 0,this._on=void 0,this._role=void 0,this._tabIndex=void 0,this._target=void 0,this._targetDescription=translate("kol-open-link-in-tab"),this._tooltipAlign="right",this._variant="normal",this.state={}}render(){return h(Host,null,h("kol-link-wc",{ref:this.catchRef,class:{button:!0,[this.state._variant]:"custom"!==this.state._variant,[this.state._customClass]:"custom"===this.state._variant&&"string"==typeof this.state._customClass&&this.state._customClass.length>0},_ariaControls:this._ariaControls,_ariaCurrent:this._ariaCurrent,_ariaExpanded:this._ariaExpanded,_ariaLabel:this._ariaLabel,_ariaSelected:this._ariaSelected,_disabled:this._disabled,_href:this._href,_icon:this._icon,_iconOnly:this._iconOnly,_label:this._label,_on:this._on,_role:"button",_tabIndex:this._tabIndex,_target:this._target,_targetDescription:this._targetDescription,_tooltipAlign:this._tooltipAlign},h("slot",{name:"expert",slot:"expert"})))}validateCustomClass(t){watchString(this,"_customClass",t,{defaultValue:void 0})}validateVariant(t){watchButtonVariant(this,"_variant",t)}componentWillLoad(){this.validateCustomClass(this._customClass),this.validateVariant(this._variant)}get host(){return getElement(this)}static get watchers(){return{_customClass:["validateCustomClass"],_variant:["validateVariant"]}}};KolLinkButton.style={default:defaultStyleCss};export{KolLinkButton as kol_link_button};
@@ -1 +1 @@
1
- {"file":"kol-link-button.entry.js","mappings":";;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,6/DAA6/D;;MCkCxgE,aAAa;;;IASR,aAAQ,GAAG,CAAC,GAA0B;MACtD,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;MACf,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;KACrC,CAAC;;;;;;;qBA6EoD,KAAK;;;qBAeL,KAAK;;;;;;8BA8Bd,SAAS,CAAC,sBAAsB,CAAC;yBAKnC,OAAO;oBAKD,QAAQ;iBAKf,EAAE;;EAvIrC,MAAM;IACZ,QACC,EAAC,IAAI,QACJ,mBACC,GAAG,EAAE,IAAI,CAAC,QAAQ,EAClB,KAAK,EAAE;QACN,MAAM,EAAE,IAAI;QACZ,CAAC,IAAI,CAAC,KAAK,CAAC,QAAkB,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,QAAQ;QACjE,CAAC,IAAI,CAAC,KAAK,CAAC,YAAsB,GACjC,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,KAAK,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC;OACtH,EACD,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,KAAK,EAAC,QAAQ,EACd,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,EAC3C,aAAa,EAAE,IAAI,CAAC,aAAa,IAMjC,YAAM,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,GAAQ,CAC5B,CACR,EACN;GACF;EAyGM,mBAAmB,CAAC,KAAc;IACxC,WAAW,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE;MACxC,YAAY,EAAE,SAAS;KACvB,CAAC,CAAC;GACH;EAMM,eAAe,CAAC,KAA4B;IAClD,kBAAkB,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;GAC5C;EAKM,iBAAiB;IACvB,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC5C,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;GACpC;;;;;;;;;;;;;","names":[],"sources":["./src/components/link-button/style.css?tag=kol-link-button&mode=default&encapsulation=shadow","./src/components/link-button/component.tsx"],"sourcesContent":["@import '../button.css';\n","import { Component, Element, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@a11y-ui/core';\nimport {\n\tAlternativButtonLinkRole,\n\tAriaCurrent,\n\tKoliBriButtonVariant,\n\tLinkButtonStates,\n\tLinkOnCallbacks,\n\tLinkTarget,\n\tOptionalLinkButtonProps,\n\tOptionalLinkButtonStates,\n\tRequiredLinkButtonProps,\n\tRequiredLinkButtonStates,\n} from '../../types/button-link';\nimport { Stringified } from '../../types/common';\nimport { KoliBriIconProp } from '../../types/icon';\nimport { watchString } from '../../utils/prop.validators';\nimport { propergateFocus } from '../../utils/reuse';\nimport { watchButtonVariant } from '../button/controller';\nimport { Alignment } from '../../types/props/alignment';\nimport { translate } from '../../i18n';\n\ntype State = {\n\tstate: Generic.Element.Members<RequiredLinkButtonStates, OptionalLinkButtonStates>;\n};\n\n@Component({\n\ttag: 'kol-link-button',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolLinkButton\n\timplements\n\t\tGeneric.Element.Members<RequiredLinkButtonProps, OptionalLinkButtonProps>,\n\t\tGeneric.Element.Watchers<RequiredLinkButtonStates, OptionalLinkButtonStates>,\n\t\tState\n{\n\t@Element() private readonly host?: HTMLKolLinkButtonElement;\n\tprivate ref?: HTMLKolLinkWcElement;\n\n\tprivate readonly catchRef = (ref?: HTMLKolLinkWcElement) => {\n\t\tthis.ref = ref;\n\t\tpropergateFocus(this.host, this.ref);\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<kol-link-wc\n\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tbutton: true,\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}}\n\t\t\t\t\t_ariaControls={this._ariaControls}\n\t\t\t\t\t_ariaCurrent={this._ariaCurrent}\n\t\t\t\t\t_ariaExpanded={this._ariaExpanded}\n\t\t\t\t\t_ariaLabel={this._ariaLabel}\n\t\t\t\t\t_ariaSelected={this._ariaSelected}\n\t\t\t\t\t_disabled={this._disabled}\n\t\t\t\t\t_href={this._href}\n\t\t\t\t\t_icon={this._icon}\n\t\t\t\t\t_iconOnly={this._iconOnly}\n\t\t\t\t\t_label={this._label}\n\t\t\t\t\t_on={this._on}\n\t\t\t\t\t_role=\"button\"\n\t\t\t\t\t_tabIndex={this._tabIndex}\n\t\t\t\t\t_target={this._target}\n\t\t\t\t\t_targetDescription={this._targetDescription}\n\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t>\n\t\t\t\t\t{/*\n\t\t\t\t\t\tEs ist keine gute Idee hier einen Slot einzufügen, da dadurch ermöglicht wird,\n\t\t\t\t\t\tdie Unterstützung hinsichtlich der Barrierefreiheit der Komponente zu umgehen.\n\t\t\t\t\t*/}\n\t\t\t\t\t<slot name=\"expert\" slot=\"expert\"></slot>\n\t\t\t\t</kol-link-wc>\n\t\t\t</Host>\n\t\t);\n\t}\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 Link 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 Link 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() 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 Link deaktiviert ist.\n\t */\n\t@Prop({ reflect: true }) public _disabled?: boolean = false;\n\n\t/**\n\t * Gibt die Ziel-Url des Links an.\n\t */\n\t@Prop() public _href!: string;\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 nur das Icon angezeigt wird.\n\t */\n\t@Prop({ reflect: true }) public _iconOnly?: boolean = false;\n\n\t/**\n\t * Gibt einen beschreibenden Text für das Text-Element an.\n\t */\n\t@Prop() public _label!: string;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für den Link an.\n\t */\n\t@Prop() public _on?: LinkOnCallbacks;\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 * Definiert das Verhalten, bei dem der Link geöffnet werden soll.\n\t */\n\t@Prop() public _target?: LinkTarget;\n\n\t/**\n\t * Gibt die Beschreibung an, wenn der Link in einem anderen Programm geöffnet wird.\n\t */\n\t@Prop() public _targetDescription?: string = translate('kol-open-link-in-tab');\n\n\t/**\n\t * Gibt an, ob der Tooltip entweder oben, rechts, unten oder links angezeigt werden soll.\n\t */\n\t@Prop() public _tooltipAlign?: Alignment = 'right';\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: LinkButtonStates = {};\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('_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.validateCustomClass(this._customClass);\n\t\tthis.validateVariant(this._variant);\n\t}\n}\n"],"version":3}
1
+ {"file":"kol-link-button.entry.js","mappings":";;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,4gEAA4gE;;MCkCvhE,aAAa;;;IASR,aAAQ,GAAG,CAAC,GAA0B;MACtD,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;MACf,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;KACrC,CAAC;;;;;;;qBA6EoD,KAAK;;;qBAeL,KAAK;;;;;;8BA8Bd,SAAS,CAAC,sBAAsB,CAAC;yBAKnC,OAAO;oBAKD,QAAQ;iBAKf,EAAE;;EAvIrC,MAAM;IACZ,QACC,EAAC,IAAI,QACJ,mBACC,GAAG,EAAE,IAAI,CAAC,QAAQ,EAClB,KAAK,EAAE;QACN,MAAM,EAAE,IAAI;QACZ,CAAC,IAAI,CAAC,KAAK,CAAC,QAAkB,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,QAAQ;QACjE,CAAC,IAAI,CAAC,KAAK,CAAC,YAAsB,GACjC,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,KAAK,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC;OACtH,EACD,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,KAAK,EAAC,QAAQ,EACd,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,EAC3C,aAAa,EAAE,IAAI,CAAC,aAAa,IAMjC,YAAM,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,GAAQ,CAC5B,CACR,EACN;GACF;EAyGM,mBAAmB,CAAC,KAAc;IACxC,WAAW,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE;MACxC,YAAY,EAAE,SAAS;KACvB,CAAC,CAAC;GACH;EAMM,eAAe,CAAC,KAA4B;IAClD,kBAAkB,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;GAC5C;EAKM,iBAAiB;IACvB,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC5C,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;GACpC;;;;;;;;;;;;;","names":[],"sources":["./src/components/link-button/style.css?tag=kol-link-button&mode=default&encapsulation=shadow","./src/components/link-button/component.tsx"],"sourcesContent":["@import '../button.css';\n","import { Component, Element, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@a11y-ui/core';\nimport {\n\tAlternativButtonLinkRole,\n\tAriaCurrent,\n\tKoliBriButtonVariant,\n\tLinkButtonStates,\n\tLinkOnCallbacks,\n\tLinkTarget,\n\tOptionalLinkButtonProps,\n\tOptionalLinkButtonStates,\n\tRequiredLinkButtonProps,\n\tRequiredLinkButtonStates,\n} from '../../types/button-link';\nimport { Stringified } from '../../types/common';\nimport { KoliBriIconProp } from '../../types/icon';\nimport { watchString } from '../../utils/prop.validators';\nimport { propergateFocus } from '../../utils/reuse';\nimport { watchButtonVariant } from '../button/controller';\nimport { Alignment } from '../../types/props/alignment';\nimport { translate } from '../../i18n';\n\ntype State = {\n\tstate: Generic.Element.Members<RequiredLinkButtonStates, OptionalLinkButtonStates>;\n};\n\n@Component({\n\ttag: 'kol-link-button',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolLinkButton\n\timplements\n\t\tGeneric.Element.Members<RequiredLinkButtonProps, OptionalLinkButtonProps>,\n\t\tGeneric.Element.Watchers<RequiredLinkButtonStates, OptionalLinkButtonStates>,\n\t\tState\n{\n\t@Element() private readonly host?: HTMLKolLinkButtonElement;\n\tprivate ref?: HTMLKolLinkWcElement;\n\n\tprivate readonly catchRef = (ref?: HTMLKolLinkWcElement) => {\n\t\tthis.ref = ref;\n\t\tpropergateFocus(this.host, this.ref);\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<kol-link-wc\n\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tbutton: true,\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}}\n\t\t\t\t\t_ariaControls={this._ariaControls}\n\t\t\t\t\t_ariaCurrent={this._ariaCurrent}\n\t\t\t\t\t_ariaExpanded={this._ariaExpanded}\n\t\t\t\t\t_ariaLabel={this._ariaLabel}\n\t\t\t\t\t_ariaSelected={this._ariaSelected}\n\t\t\t\t\t_disabled={this._disabled}\n\t\t\t\t\t_href={this._href}\n\t\t\t\t\t_icon={this._icon}\n\t\t\t\t\t_iconOnly={this._iconOnly}\n\t\t\t\t\t_label={this._label}\n\t\t\t\t\t_on={this._on}\n\t\t\t\t\t_role=\"button\"\n\t\t\t\t\t_tabIndex={this._tabIndex}\n\t\t\t\t\t_target={this._target}\n\t\t\t\t\t_targetDescription={this._targetDescription}\n\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t>\n\t\t\t\t\t{/*\n\t\t\t\t\t\tEs ist keine gute Idee hier einen Slot einzufügen, da dadurch ermöglicht wird,\n\t\t\t\t\t\tdie Unterstützung hinsichtlich der Barrierefreiheit der Komponente zu umgehen.\n\t\t\t\t\t*/}\n\t\t\t\t\t<slot name=\"expert\" slot=\"expert\"></slot>\n\t\t\t\t</kol-link-wc>\n\t\t\t</Host>\n\t\t);\n\t}\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 Link 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 Link 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() 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 Link deaktiviert ist.\n\t */\n\t@Prop({ reflect: true }) public _disabled?: boolean = false;\n\n\t/**\n\t * Gibt die Ziel-Url des Links an.\n\t */\n\t@Prop() public _href!: string;\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 nur das Icon angezeigt wird.\n\t */\n\t@Prop({ reflect: true }) public _iconOnly?: boolean = false;\n\n\t/**\n\t * Gibt einen beschreibenden Text für das Text-Element an.\n\t */\n\t@Prop() public _label!: string;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für den Link an.\n\t */\n\t@Prop() public _on?: LinkOnCallbacks;\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 * Definiert das Verhalten, bei dem der Link geöffnet werden soll.\n\t */\n\t@Prop() public _target?: LinkTarget;\n\n\t/**\n\t * Gibt die Beschreibung an, wenn der Link in einem anderen Programm geöffnet wird.\n\t */\n\t@Prop() public _targetDescription?: string = translate('kol-open-link-in-tab');\n\n\t/**\n\t * Gibt an, ob der Tooltip entweder oben, rechts, unten oder links angezeigt werden soll.\n\t */\n\t@Prop() public _tooltipAlign?: Alignment = 'right';\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: LinkButtonStates = {};\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('_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.validateCustomClass(this._customClass);\n\t\tthis.validateVariant(this._variant);\n\t}\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as registerInstance,h,H as Host}from"./index-50adf9a0.js";import{w as watchTooltipAlignment}from"./button-link-c6783bbf.js";import{g as getDocument,n as nonce}from"./dev.utils-ec1c1b88.js";import{w as watchString}from"./prop.validators-dd337216.js";import{s as smartSetTimeout,p as processEnv}from"./reuse-9dd1192b.js";import"./index-599f5430.js";import"./a11y.tipps-a876ebb7.js";function getAlignment(t){return t.split("-")[1]}function getLengthFromAxis(t){return"y"===t?"height":"width"}function getSide(t){return t.split("-")[0]}function getMainAxisFromPlacement(t){return["top","bottom"].includes(getSide(t))?"x":"y"}function computeCoordsFromPlacement(t,e,i){let{reference:n,floating:o}=t;const l=n.x+n.width/2-o.width/2,r=n.y+n.height/2-o.height/2,s=getMainAxisFromPlacement(e),a=getLengthFromAxis(s),c=n[a]/2-o[a]/2,d="x"===s;let m;switch(getSide(e)){case"top":m={x:l,y:n.y-o.height};break;case"bottom":m={x:l,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:r};break;case"left":m={x:n.x-o.width,y:r};break;default:m={x:n.x,y:n.y}}switch(getAlignment(e)){case"start":m[s]-=c*(i&&d?-1:1);break;case"end":m[s]+=c*(i&&d?-1:1)}return m}const computePosition$1=async(t,e,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:l=[],platform:r}=i,s=l.filter(Boolean),a=await(null==r.isRTL?void 0:r.isRTL(e));let c=await r.getElementRects({reference:t,floating:e,strategy:o}),{x:d,y:m}=computeCoordsFromPlacement(c,n,a),f=n,g={},u=0;for(let i=0;i<s.length;i++){const{name:l,fn:p}=s[i],{x:h,y:v,data:y,reset:w}=await p({x:d,y:m,initialPlacement:n,placement:f,strategy:o,middlewareData:g,rects:c,platform:r,elements:{reference:t,floating:e}});d=null!=h?h:d,m=null!=v?v:m,g={...g,[l]:{...g[l],...y}},w&&u<=50&&(u++,"object"==typeof w&&(w.placement&&(f=w.placement),w.rects&&(c=!0===w.rects?await r.getElementRects({reference:t,floating:e,strategy:o}):w.rects),({x:d,y:m}=computeCoordsFromPlacement(c,f,a))),i=-1)}return{x:d,y:m,placement:f,strategy:o,middlewareData:g}};function expandPaddingObject(t){return{top:0,right:0,bottom:0,left:0,...t}}function getSideObjectFromPadding(t){return"number"!=typeof t?expandPaddingObject(t):{top:t,right:t,bottom:t,left:t}}function rectToClientRect(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function detectOverflow(t,e){var i;void 0===e&&(e={});const{x:n,y:o,platform:l,rects:r,elements:s,strategy:a}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:m="floating",altBoundary:f=!1,padding:g=0}=e,u=getSideObjectFromPadding(g),p=s[f?"floating"===m?"reference":"floating":m],h=rectToClientRect(await l.getClippingRect({element:null==(i=await(null==l.isElement?void 0:l.isElement(p)))||i?p:p.contextElement||await(null==l.getDocumentElement?void 0:l.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:a})),v="floating"===m?{...r.floating,x:n,y:o}:r.reference,y=await(null==l.getOffsetParent?void 0:l.getOffsetParent(s.floating)),w=await(null==l.isElement?void 0:l.isElement(y))&&await(null==l.getScale?void 0:l.getScale(y))||{x:1,y:1},b=rectToClientRect(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:y,strategy:a}):v);return{top:(h.top-b.top+u.top)/w.y,bottom:(b.bottom-h.bottom+u.bottom)/w.y,left:(h.left-b.left+u.left)/w.x,right:(b.right-h.right+u.right)/w.x}}const min$1=Math.min,max$1=Math.max;function within(t,e,i){return max$1(t,min$1(e,i))}const arrow=t=>({name:"arrow",options:t,async fn(e){const{element:i,padding:n=0}=t||{},{x:o,y:l,placement:r,rects:s,platform:a,elements:c}=e;if(null==i)return{};const d=getSideObjectFromPadding(n),m={x:o,y:l},f=getMainAxisFromPlacement(r),g=getLengthFromAxis(f),u=await a.getDimensions(i),p="y"===f,h=p?"top":"left",v=p?"bottom":"right",y=p?"clientHeight":"clientWidth",w=s.reference[g]+s.reference[f]-m[f]-s.floating[g],b=m[f]-s.reference[f],x=await(null==a.getOffsetParent?void 0:a.getOffsetParent(i));let E=x?x[y]:0;E&&await(null==a.isElement?void 0:a.isElement(x))||(E=c.floating[y]||s.floating[g]);const T=w/2-b/2,C=d[h],S=E-u[g]-d[v],A=E/2-u[g]/2+T,L=within(C,A,S),R=null!=getAlignment(r)&&A!=L&&s.reference[g]/2-(A<C?d[h]:d[v])-u[g]/2<0;return{[f]:m[f]-(R?A<C?C-A:S-A:0),data:{[f]:L,centerOffset:A-L}}}}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(t){return t.replace(/left|right|bottom|top/g,(t=>oppositeSideMap[t]))}function getAlignmentSides(t,e,i){void 0===i&&(i=!1);const n=getAlignment(t),o=getMainAxisFromPlacement(t),l=getLengthFromAxis(o);let r="x"===o?n===(i?"end":"start")?"right":"left":"start"===n?"bottom":"top";return e.reference[l]>e.floating[l]&&(r=getOppositePlacement(r)),{main:r,cross:getOppositePlacement(r)}}const oppositeAlignmentMap={start:"end",end:"start"};function getOppositeAlignmentPlacement(t){return t.replace(/start|end/g,(t=>oppositeAlignmentMap[t]))}function getExpandedPlacements(t){const e=getOppositePlacement(t);return[getOppositeAlignmentPlacement(t),e,getOppositeAlignmentPlacement(e)]}function getSideList(t,e,i){const n=["left","right"],o=["right","left"],l=["top","bottom"],r=["bottom","top"];switch(t){case"top":case"bottom":return i?e?o:n:e?n:o;case"left":case"right":return e?l:r;default:return[]}}function getOppositeAxisPlacements(t,e,i,n){const o=getAlignment(t);let l=getSideList(getSide(t),"start"===i,n);return o&&(l=l.map((t=>t+"-"+o)),e&&(l=l.concat(l.map(getOppositeAlignmentPlacement)))),l}const flip=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var i;const{placement:n,middlewareData:o,rects:l,initialPlacement:r,platform:s,elements:a}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:u=!0,...p}=t,h=getSide(n),v=getSide(r)===r,y=await(null==s.isRTL?void 0:s.isRTL(a.floating)),w=m||(v||!u?[getOppositePlacement(r)]:getExpandedPlacements(r));m||"none"===g||w.push(...getOppositeAxisPlacements(r,u,g,y));const b=[r,...w],x=await detectOverflow(e,p),E=[];let T=(null==(i=o.flip)?void 0:i.overflows)||[];if(c&&E.push(x[h]),d){const{main:t,cross:e}=getAlignmentSides(n,l,y);E.push(x[t],x[e])}if(T=[...T,{placement:n,overflows:E}],!E.every((t=>t<=0))){var C,S;const t=((null==(C=o.flip)?void 0:C.index)||0)+1,e=b[t];if(e)return{data:{index:t,overflows:T},reset:{placement:e}};let i=null==(S=T.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:S.placement;if(!i)switch(f){case"bestFit":{var A;const t=null==(A=T.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:A[0];t&&(i=t);break}case"initialPlacement":i=r}if(n!==i)return{reset:{placement:i}}}return{}}}};async function convertValueToCoords(t,e){const{placement:i,platform:n,elements:o}=t,l=await(null==n.isRTL?void 0:n.isRTL(o.floating)),r=getSide(i),s=getAlignment(i),a="x"===getMainAxisFromPlacement(i),c=["left","top"].includes(r)?-1:1,d=l&&a?-1:1,m="function"==typeof e?e(t):e;let{mainAxis:f,crossAxis:g,alignmentAxis:u}="number"==typeof m?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...m};return s&&"number"==typeof u&&(g="end"===s?-1*u:u),a?{x:g*d,y:f*c}:{x:f*c,y:g*d}}const offset=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){const{x:i,y:n}=e,o=await convertValueToCoords(e,t);return{x:i+o.x,y:n+o.y,data:o}}}};function getCrossAxis(t){return"x"===t?"y":"x"}const shift=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:i,y:n,placement:o}=e,{mainAxis:l=!0,crossAxis:r=!1,limiter:s={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...a}=t,c={x:i,y:n},d=await detectOverflow(e,a),m=getMainAxisFromPlacement(getSide(o)),f=getCrossAxis(m);let g=c[m],u=c[f];if(l){const t="y"===m?"bottom":"right";g=within(g+d["y"===m?"top":"left"],g,g-d[t])}if(r){const t="y"===f?"bottom":"right";u=within(u+d["y"===f?"top":"left"],u,u-d[t])}const p=s.fn({...e,[m]:g,[f]:u});return{...p,data:{x:p.x-i,y:p.y-n}}}}};function getWindow(t){var e;return(null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function getComputedStyle$1(t){return getWindow(t).getComputedStyle(t)}const min=Math.min,max=Math.max,round=Math.round;function getCssDimensions(t){const e=getComputedStyle$1(t);let i=parseFloat(e.width),n=parseFloat(e.height);const o=t.offsetWidth,l=t.offsetHeight,r=round(i)!==o||round(n)!==l;return r&&(i=o,n=l),{width:i,height:n,fallback:r}}function getNodeName(t){return isNode(t)?(t.nodeName||"").toLowerCase():""}let uaString;function getUAString(){if(uaString)return uaString;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(uaString=t.brands.map((t=>t.brand+"/"+t.version)).join(" "),uaString):navigator.userAgent}function isHTMLElement(t){return t instanceof getWindow(t).HTMLElement}function isElement(t){return t instanceof getWindow(t).Element}function isNode(t){return t instanceof getWindow(t).Node}function isShadowRoot(t){if("undefined"==typeof ShadowRoot)return!1;return t instanceof getWindow(t).ShadowRoot||t instanceof ShadowRoot}function isOverflowElement(t){const{overflow:e,overflowX:i,overflowY:n,display:o}=getComputedStyle$1(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+i)&&!["inline","contents"].includes(o)}function isTableElement(t){return["table","td","th"].includes(getNodeName(t))}function isContainingBlock(t){const e=/firefox/i.test(getUAString()),i=getComputedStyle$1(t),n=i.backdropFilter||i.WebkitBackdropFilter;return"none"!==i.transform||"none"!==i.perspective||!!n&&"none"!==n||e&&"filter"===i.willChange||e&&!!i.filter&&"none"!==i.filter||["transform","perspective"].some((t=>i.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const e=i.contain;return null!=e&&e.includes(t)}))}function isClientRectVisualViewportBased(){return/^((?!chrome|android).)*safari/i.test(getUAString())}function isLastTraversableNode(t){return["html","body","#document"].includes(getNodeName(t))}function unwrapElement(t){return isElement(t)?t:t.contextElement}const FALLBACK_SCALE={x:1,y:1};function getScale(t){const e=unwrapElement(t);if(!isHTMLElement(e))return FALLBACK_SCALE;const i=e.getBoundingClientRect(),{width:n,height:o,fallback:l}=getCssDimensions(e);let r=(l?round(i.width):i.width)/n,s=(l?round(i.height):i.height)/o;return r&&Number.isFinite(r)||(r=1),s&&Number.isFinite(s)||(s=1),{x:r,y:s}}function getBoundingClientRect(t,e,i,n){var o,l;void 0===e&&(e=!1),void 0===i&&(i=!1);const r=t.getBoundingClientRect(),s=unwrapElement(t);let a=FALLBACK_SCALE;e&&(n?isElement(n)&&(a=getScale(n)):a=getScale(t));const c=s?getWindow(s):window,d=isClientRectVisualViewportBased()&&i;let m=(r.left+(d&&(null==(o=c.visualViewport)?void 0:o.offsetLeft)||0))/a.x,f=(r.top+(d&&(null==(l=c.visualViewport)?void 0:l.offsetTop)||0))/a.y,g=r.width/a.x,u=r.height/a.y;if(s){const t=getWindow(s),e=n&&isElement(n)?getWindow(n):n;let i=t.frameElement;for(;i&&n&&e!==t;){const t=getScale(i),e=i.getBoundingClientRect(),n=getComputedStyle(i);e.x+=(i.clientLeft+parseFloat(n.paddingLeft))*t.x,e.y+=(i.clientTop+parseFloat(n.paddingTop))*t.y,m*=t.x,f*=t.y,g*=t.x,u*=t.y,m+=e.x,f+=e.y,i=getWindow(i).frameElement}}return{width:g,height:u,top:f,right:m+g,bottom:f+u,left:m,x:m,y:f}}function getDocumentElement(t){return((isNode(t)?t.ownerDocument:t.document)||window.document).documentElement}function getNodeScroll(t){return isElement(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function convertOffsetParentRelativeRectToViewportRelativeRect(t){let{rect:e,offsetParent:i,strategy:n}=t;const o=isHTMLElement(i),l=getDocumentElement(i);if(i===l)return e;let r={scrollLeft:0,scrollTop:0},s={x:1,y:1};const a={x:0,y:0};if((o||!o&&"fixed"!==n)&&(("body"!==getNodeName(i)||isOverflowElement(l))&&(r=getNodeScroll(i)),isHTMLElement(i))){const t=getBoundingClientRect(i);s=getScale(i),a.x=t.x+i.clientLeft,a.y=t.y+i.clientTop}return{width:e.width*s.x,height:e.height*s.y,x:e.x*s.x-r.scrollLeft*s.x+a.x,y:e.y*s.y-r.scrollTop*s.y+a.y}}function getWindowScrollBarX(t){return getBoundingClientRect(getDocumentElement(t)).left+getNodeScroll(t).scrollLeft}function getDocumentRect(t){const e=getDocumentElement(t),i=getNodeScroll(t),n=t.ownerDocument.body,o=max(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),l=max(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let r=-i.scrollLeft+getWindowScrollBarX(t);const s=-i.scrollTop;return"rtl"===getComputedStyle$1(n).direction&&(r+=max(e.clientWidth,n.clientWidth)-o),{width:o,height:l,x:r,y:s}}function getParentNode(t){if("html"===getNodeName(t))return t;const e=t.assignedSlot||t.parentNode||isShadowRoot(t)&&t.host||getDocumentElement(t);return isShadowRoot(e)?e.host:e}function getNearestOverflowAncestor(t){const e=getParentNode(t);return isLastTraversableNode(e)?e.ownerDocument.body:isHTMLElement(e)&&isOverflowElement(e)?e:getNearestOverflowAncestor(e)}function getOverflowAncestors(t,e){var i;void 0===e&&(e=[]);const n=getNearestOverflowAncestor(t),o=n===(null==(i=t.ownerDocument)?void 0:i.body),l=getWindow(n);return o?e.concat(l,l.visualViewport||[],isOverflowElement(n)?n:[]):e.concat(n,getOverflowAncestors(n))}function getViewportRect(t,e){const i=getWindow(t),n=getDocumentElement(t),o=i.visualViewport;let l=n.clientWidth,r=n.clientHeight,s=0,a=0;if(o){l=o.width,r=o.height;const t=isClientRectVisualViewportBased();(!t||t&&"fixed"===e)&&(s=o.offsetLeft,a=o.offsetTop)}return{width:l,height:r,x:s,y:a}}function getInnerBoundingClientRect(t,e){const i=getBoundingClientRect(t,!0,"fixed"===e),n=i.top+t.clientTop,o=i.left+t.clientLeft,l=isHTMLElement(t)?getScale(t):{x:1,y:1};return{width:t.clientWidth*l.x,height:t.clientHeight*l.y,x:o*l.x,y:n*l.y}}function getClientRectFromClippingAncestor(t,e,i){let n;if("viewport"===e)n=getViewportRect(t,i);else if("document"===e)n=getDocumentRect(getDocumentElement(t));else if(isElement(e))n=getInnerBoundingClientRect(e,i);else{const i={...e};if(isClientRectVisualViewportBased()){var o,l;const e=getWindow(t);i.x-=(null==(o=e.visualViewport)?void 0:o.offsetLeft)||0,i.y-=(null==(l=e.visualViewport)?void 0:l.offsetTop)||0}n=i}return rectToClientRect(n)}function getClippingElementAncestors(t,e){const i=e.get(t);if(i)return i;let n=getOverflowAncestors(t).filter((t=>isElement(t)&&"body"!==getNodeName(t))),o=null;const l="fixed"===getComputedStyle$1(t).position;let r=l?getParentNode(t):t;for(;isElement(r)&&!isLastTraversableNode(r);){const t=getComputedStyle$1(r),e=isContainingBlock(r);if("fixed"===t.position)o=null;else{(l?!e&&!o:!e&&"static"===t.position&&!!o&&["absolute","fixed"].includes(o.position))?n=n.filter((t=>t!==r)):o=t}r=getParentNode(r)}return e.set(t,n),n}function getClippingRect(t){let{element:e,boundary:i,rootBoundary:n,strategy:o}=t;const l=[..."clippingAncestors"===i?getClippingElementAncestors(e,this._c):[].concat(i),n],r=l[0],s=l.reduce(((t,i)=>{const n=getClientRectFromClippingAncestor(e,i,o);return t.top=max(n.top,t.top),t.right=min(n.right,t.right),t.bottom=min(n.bottom,t.bottom),t.left=max(n.left,t.left),t}),getClientRectFromClippingAncestor(e,r,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function getDimensions(t){return isHTMLElement(t)?getCssDimensions(t):t.getBoundingClientRect()}function getTrueOffsetParent(t,e){return isHTMLElement(t)&&"fixed"!==getComputedStyle$1(t).position?e?e(t):t.offsetParent:null}function getContainingBlock(t){let e=getParentNode(t);for(;isHTMLElement(e)&&!isLastTraversableNode(e);){if(isContainingBlock(e))return e;e=getParentNode(e)}return null}function getOffsetParent(t,e){const i=getWindow(t);let n=getTrueOffsetParent(t,e);for(;n&&isTableElement(n)&&"static"===getComputedStyle$1(n).position;)n=getTrueOffsetParent(n,e);return n&&("html"===getNodeName(n)||"body"===getNodeName(n)&&"static"===getComputedStyle$1(n).position&&!isContainingBlock(n))?i:n||getContainingBlock(t)||i}function getRectRelativeToOffsetParent(t,e,i){const n=isHTMLElement(e),o=getDocumentElement(e),l=getBoundingClientRect(t,!0,"fixed"===i,e);let r={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(n||!n&&"fixed"!==i)if(("body"!==getNodeName(e)||isOverflowElement(o))&&(r=getNodeScroll(e)),isHTMLElement(e)){const t=getBoundingClientRect(e,!0);s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}else o&&(s.x=getWindowScrollBarX(o));return{x:l.left+r.scrollLeft-s.x,y:l.top+r.scrollTop-s.y,width:l.width,height:l.height}}const platform={getClippingRect:getClippingRect,convertOffsetParentRelativeRectToViewportRelativeRect:convertOffsetParentRelativeRectToViewportRelativeRect,isElement:isElement,getDimensions:getDimensions,getOffsetParent:getOffsetParent,getDocumentElement:getDocumentElement,getScale:getScale,async getElementRects(t){let{reference:e,floating:i,strategy:n}=t;const o=this.getOffsetParent||getOffsetParent,l=this.getDimensions;return{reference:getRectRelativeToOffsetParent(e,await o(i),n),floating:{x:0,y:0,...await l(i)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===getComputedStyle$1(t).direction},computePosition=(t,e,i)=>{const n=new Map,o={platform:platform,...i},l={...o.platform,_c:n};return computePosition$1(t,e,{...o,platform:l})},defaultStyleCss=":host{--kolibri-border-color:#666;--kolibri-border-radius:0.125rem;--kolibri-border-width:1px;--kolibri-color-error:#f44336;--kolibri-color-info:#2196f3;--kolibri-color-success:#4caf50;--kolibri-color-warning:#ff9800;--kolibri-color-primary:#3f51b5;--kolibri-color-secondary:#ff4081;--kolibri-color-normal:#9e9e9e;--kolibri-color-danger:#f44336;--kolibri-color-ghost:#f5f5f5;--kolibri-color-disabled:#bdbdbd;--kolibri-color-text:#222222;--kolibri-color-visited:#9c27b0;--kolibri-font-family:Verdana, Arial, Tahoma, Helvetica, sans-serif;--kolibri-font-size:16px;--kolibri-spacing:0.25rem}:host{font-family:inherit;font-size:inherit}:host *{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{font-family:var(--kolibri-font-family);font-size:inherit}*{box-sizing:border-box}kol-icon{color:inherit}kol-span-wc{display:grid;place-items:center;width:100%}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}a{display:inline-flex;place-items:baseline}button{background-color:transparent;border-width:0;margin:0;min-height:44px;min-width:44px;padding:0}a,button,input,select,textarea{cursor:pointer}a.icon-only>kol-span-wc>span>span,:host button.icon-only>kol-span-wc>span>span{display:none}h1,h2,h3,h4,h5,h6{font-family:var(--kolibri-font-family);font-size:var(--kolibri-font-size);margin:0;padding:0}kol-tooltip #floating{animation-name:fadeInOpacity;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:0.5s;box-sizing:border-box;display:none;position:absolute}kol-tooltip #arrow{background:#333;height:10px;position:absolute;transform:rotate(45deg);width:10px;z-index:999}kol-tooltip kol-badge{border-radius:var(--kolibri-border-radius);font-size:calc(4 * var(--kolibri-spacing));max-width:300px;position:relative;z-index:1000}@keyframes fadeInOpacity{0%{opacity:0}100%{opacity:1}}",KolTooltip=class{constructor(t){registerInstance(this,t),this.alignTooltip=()=>{var t,e,i;if("test"!==processEnv&&this.previousSibling){const n=this.previousSibling;if(this.tooltipElement){const o=this.tooltipElement,l=this.arrowElement,r=[(i=null!==(t=null==l?void 0:l.offsetHeight)&&void 0!==t?t:10,void 0===i&&(i=0),{name:"offset",options:i,async fn(t){const{x:e,y:n}=t,o=await convertValueToCoords(t,i);return{x:e+o.x,y:n+o.y,data:o}}}),(void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i;const{placement:n,middlewareData:o,rects:l,initialPlacement:r,platform:s,elements:a}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:u=!0,...p}=e,h=getSide(n),v=getSide(r)===r,y=await(null==s.isRTL?void 0:s.isRTL(a.floating)),w=m||(v||!u?[getOppositePlacement(r)]:getExpandedPlacements(r));m||"none"===g||w.push(...getOppositeAxisPlacements(r,u,g,y));const b=[r,...w],x=await detectOverflow(t,p),E=[];let T=(null==(i=o.flip)?void 0:i.overflows)||[];if(c&&E.push(x[h]),d){const{main:t,cross:e}=getAlignmentSides(n,l,y);E.push(x[t],x[e])}if(T=[...T,{placement:n,overflows:E}],!E.every((t=>t<=0))){var C,S;const t=((null==(C=o.flip)?void 0:C.index)||0)+1,e=b[t];if(e)return{data:{index:t,overflows:T},reset:{placement:e}};let i=null==(S=T.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:S.placement;if(!i)switch(f){case"bestFit":{var A;const t=null==(A=T.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:A[0];t&&(i=t);break}case"initialPlacement":i=r}if(n!==i)return{reset:{placement:i}}}return{}}}),shift()];l&&r.push(arrow({element:l})),computePosition(n,o,{placement:this.state._align,middleware:r}).then((({x:t,y:e,middlewareData:i,placement:n})=>{var r,s;Object.assign(o.style,{left:`${t}px`,top:`${e}px`}),l&&((null===(r=i.arrow)||void 0===r?void 0:r.x)?Object.assign(l.style,{left:`${i.arrow.x}px`,top:"bottom"===n?-l.offsetHeight/2+"px":"",bottom:"top"===n?-l.offsetHeight/2+"px":""}):(null===(s=i.arrow)||void 0===s?void 0:s.y)&&Object.assign(l.style,{left:"right"===n?-l.offsetWidth/2+"px":"",right:"left"===n?-l.offsetWidth/2+"px":"",top:`${i.arrow.y}px`}))}))}}},this.showTooltip=()=>{this.tooltipElement&&(this.tooltipElement.style.setProperty("display","block"),getDocument().body.addEventListener("keyup",this.hideTooltipByEscape),this.alignTooltip(),this.tooltipElement.style.setProperty("visibility","visible"),document.addEventListener("scroll",this.alignTooltip))},this.hideTooltip=()=>{this.tooltipElement&&(this.tooltipElement.style.setProperty("display","none"),this.tooltipElement.style.setProperty("visibility","hidden"),document.removeEventListener("scroll",this.alignTooltip))},this.hideTooltipByEscape=t=>{"Escape"===t.key&&(getDocument().body.removeEventListener("keyup",this.hideTooltipByEscape),this.hideTooltip())},this.addListeners=t=>{t.addEventListener("mouseover",this.incrementOverFocusCount),t.addEventListener("focus",this.incrementOverFocusCount),t.addEventListener("mouseout",this.decrementOverFocusCount),t.addEventListener("blur",this.decrementOverFocusCount)},this.removeListeners=t=>{t.removeEventListener("mouseover",this.incrementOverFocusCount),t.removeEventListener("focus",this.incrementOverFocusCount),t.removeEventListener("mouseout",this.decrementOverFocusCount),t.removeEventListener("blur",this.decrementOverFocusCount)},this.resyncListeners=t=>{this.removeListeners(t),this.addListeners(t)},this.catchHostElement=t=>{t&&(this.previousSibling=t.previousElementSibling,this.previousSibling&&this.resyncListeners(this.previousSibling))},this.catchTooltipElement=t=>{this.tooltipElement=t,this.tooltipElement&&this.resyncListeners(this.tooltipElement)},this.catchArrowElement=t=>{this.arrowElement=t},this.overFocusCount=0,this.incrementOverFocusCount=()=>{this.overFocusCount++,this.showOrHideTooltip()},this.decrementOverFocusCount=()=>{this.overFocusCount--,this.showOrHideTooltip()},this.showOrHideTooltip=()=>{clearTimeout(this.overFocusTimeout),this.overFocusTimeout=setTimeout((()=>{clearTimeout(this.overFocusTimeout),this.overFocusCount>0?this.showTooltip():this.hideTooltip()}),250)},this._align="top",this._id=void 0,this._label=void 0,this.state={_align:"top",_id:nonce(),_label:""}}render(){return smartSetTimeout((()=>{this.alignTooltip(),smartSetTimeout(this.alignTooltip,750)}),250),h(Host,{ref:this.catchHostElement},""!==this.state._label&&h("div",{id:"floating",ref:this.catchTooltipElement},h("div",{id:"arrow",ref:this.catchArrowElement}),h("kol-badge",{id:this.state._id,_color:{backgroundColor:"#333",color:"#ddd"},_label:this.state._label})))}validateAlign(t){watchTooltipAlignment(this,"_align",t)}validateId(t){watchString(this,"_id",t)}validateLabel(t){watchString(this,"_label",t)}componentWillLoad(){this.validateAlign(this._align),this.validateId(this._id),this.validateLabel(this._label)}disconnectedCallback(){this.previousSibling&&this.removeListeners(this.previousSibling),this.tooltipElement&&this.removeListeners(this.tooltipElement)}static get watchers(){return{_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}}};KolTooltip.style={default:defaultStyleCss};export{KolTooltip as kol_tooltip};
4
+ import{r as registerInstance,h,H as Host}from"./index-50adf9a0.js";import{w as watchTooltipAlignment}from"./button-link-c6783bbf.js";import{g as getDocument,n as nonce}from"./dev.utils-ec1c1b88.js";import{w as watchString}from"./prop.validators-dd337216.js";import{s as smartSetTimeout,p as processEnv}from"./reuse-9dd1192b.js";import"./index-599f5430.js";import"./a11y.tipps-a876ebb7.js";function getAlignment(t){return t.split("-")[1]}function getLengthFromAxis(t){return"y"===t?"height":"width"}function getSide(t){return t.split("-")[0]}function getMainAxisFromPlacement(t){return["top","bottom"].includes(getSide(t))?"x":"y"}function computeCoordsFromPlacement(t,e,i){let{reference:n,floating:o}=t;const l=n.x+n.width/2-o.width/2,r=n.y+n.height/2-o.height/2,s=getMainAxisFromPlacement(e),a=getLengthFromAxis(s),c=n[a]/2-o[a]/2,d="x"===s;let m;switch(getSide(e)){case"top":m={x:l,y:n.y-o.height};break;case"bottom":m={x:l,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:r};break;case"left":m={x:n.x-o.width,y:r};break;default:m={x:n.x,y:n.y}}switch(getAlignment(e)){case"start":m[s]-=c*(i&&d?-1:1);break;case"end":m[s]+=c*(i&&d?-1:1)}return m}const computePosition$1=async(t,e,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:l=[],platform:r}=i,s=l.filter(Boolean),a=await(null==r.isRTL?void 0:r.isRTL(e));let c=await r.getElementRects({reference:t,floating:e,strategy:o}),{x:d,y:m}=computeCoordsFromPlacement(c,n,a),f=n,g={},u=0;for(let i=0;i<s.length;i++){const{name:l,fn:p}=s[i],{x:h,y:v,data:y,reset:w}=await p({x:d,y:m,initialPlacement:n,placement:f,strategy:o,middlewareData:g,rects:c,platform:r,elements:{reference:t,floating:e}});d=null!=h?h:d,m=null!=v?v:m,g={...g,[l]:{...g[l],...y}},w&&u<=50&&(u++,"object"==typeof w&&(w.placement&&(f=w.placement),w.rects&&(c=!0===w.rects?await r.getElementRects({reference:t,floating:e,strategy:o}):w.rects),({x:d,y:m}=computeCoordsFromPlacement(c,f,a))),i=-1)}return{x:d,y:m,placement:f,strategy:o,middlewareData:g}};function expandPaddingObject(t){return{top:0,right:0,bottom:0,left:0,...t}}function getSideObjectFromPadding(t){return"number"!=typeof t?expandPaddingObject(t):{top:t,right:t,bottom:t,left:t}}function rectToClientRect(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function detectOverflow(t,e){var i;void 0===e&&(e={});const{x:n,y:o,platform:l,rects:r,elements:s,strategy:a}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:m="floating",altBoundary:f=!1,padding:g=0}=e,u=getSideObjectFromPadding(g),p=s[f?"floating"===m?"reference":"floating":m],h=rectToClientRect(await l.getClippingRect({element:null==(i=await(null==l.isElement?void 0:l.isElement(p)))||i?p:p.contextElement||await(null==l.getDocumentElement?void 0:l.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:a})),v="floating"===m?{...r.floating,x:n,y:o}:r.reference,y=await(null==l.getOffsetParent?void 0:l.getOffsetParent(s.floating)),w=await(null==l.isElement?void 0:l.isElement(y))&&await(null==l.getScale?void 0:l.getScale(y))||{x:1,y:1},b=rectToClientRect(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:y,strategy:a}):v);return{top:(h.top-b.top+u.top)/w.y,bottom:(b.bottom-h.bottom+u.bottom)/w.y,left:(h.left-b.left+u.left)/w.x,right:(b.right-h.right+u.right)/w.x}}const min$1=Math.min,max$1=Math.max;function within(t,e,i){return max$1(t,min$1(e,i))}const arrow=t=>({name:"arrow",options:t,async fn(e){const{element:i,padding:n=0}=t||{},{x:o,y:l,placement:r,rects:s,platform:a,elements:c}=e;if(null==i)return{};const d=getSideObjectFromPadding(n),m={x:o,y:l},f=getMainAxisFromPlacement(r),g=getLengthFromAxis(f),u=await a.getDimensions(i),p="y"===f,h=p?"top":"left",v=p?"bottom":"right",y=p?"clientHeight":"clientWidth",w=s.reference[g]+s.reference[f]-m[f]-s.floating[g],b=m[f]-s.reference[f],x=await(null==a.getOffsetParent?void 0:a.getOffsetParent(i));let E=x?x[y]:0;E&&await(null==a.isElement?void 0:a.isElement(x))||(E=c.floating[y]||s.floating[g]);const T=w/2-b/2,C=d[h],S=E-u[g]-d[v],A=E/2-u[g]/2+T,L=within(C,A,S),R=null!=getAlignment(r)&&A!=L&&s.reference[g]/2-(A<C?d[h]:d[v])-u[g]/2<0;return{[f]:m[f]-(R?A<C?C-A:S-A:0),data:{[f]:L,centerOffset:A-L}}}}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(t){return t.replace(/left|right|bottom|top/g,(t=>oppositeSideMap[t]))}function getAlignmentSides(t,e,i){void 0===i&&(i=!1);const n=getAlignment(t),o=getMainAxisFromPlacement(t),l=getLengthFromAxis(o);let r="x"===o?n===(i?"end":"start")?"right":"left":"start"===n?"bottom":"top";return e.reference[l]>e.floating[l]&&(r=getOppositePlacement(r)),{main:r,cross:getOppositePlacement(r)}}const oppositeAlignmentMap={start:"end",end:"start"};function getOppositeAlignmentPlacement(t){return t.replace(/start|end/g,(t=>oppositeAlignmentMap[t]))}function getExpandedPlacements(t){const e=getOppositePlacement(t);return[getOppositeAlignmentPlacement(t),e,getOppositeAlignmentPlacement(e)]}function getSideList(t,e,i){const n=["left","right"],o=["right","left"],l=["top","bottom"],r=["bottom","top"];switch(t){case"top":case"bottom":return i?e?o:n:e?n:o;case"left":case"right":return e?l:r;default:return[]}}function getOppositeAxisPlacements(t,e,i,n){const o=getAlignment(t);let l=getSideList(getSide(t),"start"===i,n);return o&&(l=l.map((t=>t+"-"+o)),e&&(l=l.concat(l.map(getOppositeAlignmentPlacement)))),l}const flip=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var i;const{placement:n,middlewareData:o,rects:l,initialPlacement:r,platform:s,elements:a}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:u=!0,...p}=t,h=getSide(n),v=getSide(r)===r,y=await(null==s.isRTL?void 0:s.isRTL(a.floating)),w=m||(v||!u?[getOppositePlacement(r)]:getExpandedPlacements(r));m||"none"===g||w.push(...getOppositeAxisPlacements(r,u,g,y));const b=[r,...w],x=await detectOverflow(e,p),E=[];let T=(null==(i=o.flip)?void 0:i.overflows)||[];if(c&&E.push(x[h]),d){const{main:t,cross:e}=getAlignmentSides(n,l,y);E.push(x[t],x[e])}if(T=[...T,{placement:n,overflows:E}],!E.every((t=>t<=0))){var C,S;const t=((null==(C=o.flip)?void 0:C.index)||0)+1,e=b[t];if(e)return{data:{index:t,overflows:T},reset:{placement:e}};let i=null==(S=T.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:S.placement;if(!i)switch(f){case"bestFit":{var A;const t=null==(A=T.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:A[0];t&&(i=t);break}case"initialPlacement":i=r}if(n!==i)return{reset:{placement:i}}}return{}}}};async function convertValueToCoords(t,e){const{placement:i,platform:n,elements:o}=t,l=await(null==n.isRTL?void 0:n.isRTL(o.floating)),r=getSide(i),s=getAlignment(i),a="x"===getMainAxisFromPlacement(i),c=["left","top"].includes(r)?-1:1,d=l&&a?-1:1,m="function"==typeof e?e(t):e;let{mainAxis:f,crossAxis:g,alignmentAxis:u}="number"==typeof m?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...m};return s&&"number"==typeof u&&(g="end"===s?-1*u:u),a?{x:g*d,y:f*c}:{x:f*c,y:g*d}}const offset=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){const{x:i,y:n}=e,o=await convertValueToCoords(e,t);return{x:i+o.x,y:n+o.y,data:o}}}};function getCrossAxis(t){return"x"===t?"y":"x"}const shift=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:i,y:n,placement:o}=e,{mainAxis:l=!0,crossAxis:r=!1,limiter:s={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...a}=t,c={x:i,y:n},d=await detectOverflow(e,a),m=getMainAxisFromPlacement(getSide(o)),f=getCrossAxis(m);let g=c[m],u=c[f];if(l){const t="y"===m?"bottom":"right";g=within(g+d["y"===m?"top":"left"],g,g-d[t])}if(r){const t="y"===f?"bottom":"right";u=within(u+d["y"===f?"top":"left"],u,u-d[t])}const p=s.fn({...e,[m]:g,[f]:u});return{...p,data:{x:p.x-i,y:p.y-n}}}}};function getWindow(t){var e;return(null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function getComputedStyle$1(t){return getWindow(t).getComputedStyle(t)}const min=Math.min,max=Math.max,round=Math.round;function getCssDimensions(t){const e=getComputedStyle$1(t);let i=parseFloat(e.width),n=parseFloat(e.height);const o=t.offsetWidth,l=t.offsetHeight,r=round(i)!==o||round(n)!==l;return r&&(i=o,n=l),{width:i,height:n,fallback:r}}function getNodeName(t){return isNode(t)?(t.nodeName||"").toLowerCase():""}let uaString;function getUAString(){if(uaString)return uaString;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(uaString=t.brands.map((t=>t.brand+"/"+t.version)).join(" "),uaString):navigator.userAgent}function isHTMLElement(t){return t instanceof getWindow(t).HTMLElement}function isElement(t){return t instanceof getWindow(t).Element}function isNode(t){return t instanceof getWindow(t).Node}function isShadowRoot(t){if("undefined"==typeof ShadowRoot)return!1;return t instanceof getWindow(t).ShadowRoot||t instanceof ShadowRoot}function isOverflowElement(t){const{overflow:e,overflowX:i,overflowY:n,display:o}=getComputedStyle$1(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+i)&&!["inline","contents"].includes(o)}function isTableElement(t){return["table","td","th"].includes(getNodeName(t))}function isContainingBlock(t){const e=/firefox/i.test(getUAString()),i=getComputedStyle$1(t),n=i.backdropFilter||i.WebkitBackdropFilter;return"none"!==i.transform||"none"!==i.perspective||!!n&&"none"!==n||e&&"filter"===i.willChange||e&&!!i.filter&&"none"!==i.filter||["transform","perspective"].some((t=>i.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const e=i.contain;return null!=e&&e.includes(t)}))}function isClientRectVisualViewportBased(){return/^((?!chrome|android).)*safari/i.test(getUAString())}function isLastTraversableNode(t){return["html","body","#document"].includes(getNodeName(t))}function unwrapElement(t){return isElement(t)?t:t.contextElement}const FALLBACK_SCALE={x:1,y:1};function getScale(t){const e=unwrapElement(t);if(!isHTMLElement(e))return FALLBACK_SCALE;const i=e.getBoundingClientRect(),{width:n,height:o,fallback:l}=getCssDimensions(e);let r=(l?round(i.width):i.width)/n,s=(l?round(i.height):i.height)/o;return r&&Number.isFinite(r)||(r=1),s&&Number.isFinite(s)||(s=1),{x:r,y:s}}function getBoundingClientRect(t,e,i,n){var o,l;void 0===e&&(e=!1),void 0===i&&(i=!1);const r=t.getBoundingClientRect(),s=unwrapElement(t);let a=FALLBACK_SCALE;e&&(n?isElement(n)&&(a=getScale(n)):a=getScale(t));const c=s?getWindow(s):window,d=isClientRectVisualViewportBased()&&i;let m=(r.left+(d&&(null==(o=c.visualViewport)?void 0:o.offsetLeft)||0))/a.x,f=(r.top+(d&&(null==(l=c.visualViewport)?void 0:l.offsetTop)||0))/a.y,g=r.width/a.x,u=r.height/a.y;if(s){const t=getWindow(s),e=n&&isElement(n)?getWindow(n):n;let i=t.frameElement;for(;i&&n&&e!==t;){const t=getScale(i),e=i.getBoundingClientRect(),n=getComputedStyle(i);e.x+=(i.clientLeft+parseFloat(n.paddingLeft))*t.x,e.y+=(i.clientTop+parseFloat(n.paddingTop))*t.y,m*=t.x,f*=t.y,g*=t.x,u*=t.y,m+=e.x,f+=e.y,i=getWindow(i).frameElement}}return rectToClientRect({width:g,height:u,x:m,y:f})}function getDocumentElement(t){return((isNode(t)?t.ownerDocument:t.document)||window.document).documentElement}function getNodeScroll(t){return isElement(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function convertOffsetParentRelativeRectToViewportRelativeRect(t){let{rect:e,offsetParent:i,strategy:n}=t;const o=isHTMLElement(i),l=getDocumentElement(i);if(i===l)return e;let r={scrollLeft:0,scrollTop:0},s={x:1,y:1};const a={x:0,y:0};if((o||!o&&"fixed"!==n)&&(("body"!==getNodeName(i)||isOverflowElement(l))&&(r=getNodeScroll(i)),isHTMLElement(i))){const t=getBoundingClientRect(i);s=getScale(i),a.x=t.x+i.clientLeft,a.y=t.y+i.clientTop}return{width:e.width*s.x,height:e.height*s.y,x:e.x*s.x-r.scrollLeft*s.x+a.x,y:e.y*s.y-r.scrollTop*s.y+a.y}}function getWindowScrollBarX(t){return getBoundingClientRect(getDocumentElement(t)).left+getNodeScroll(t).scrollLeft}function getDocumentRect(t){const e=getDocumentElement(t),i=getNodeScroll(t),n=t.ownerDocument.body,o=max(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),l=max(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let r=-i.scrollLeft+getWindowScrollBarX(t);const s=-i.scrollTop;return"rtl"===getComputedStyle$1(n).direction&&(r+=max(e.clientWidth,n.clientWidth)-o),{width:o,height:l,x:r,y:s}}function getParentNode(t){if("html"===getNodeName(t))return t;const e=t.assignedSlot||t.parentNode||isShadowRoot(t)&&t.host||getDocumentElement(t);return isShadowRoot(e)?e.host:e}function getNearestOverflowAncestor(t){const e=getParentNode(t);return isLastTraversableNode(e)?e.ownerDocument.body:isHTMLElement(e)&&isOverflowElement(e)?e:getNearestOverflowAncestor(e)}function getOverflowAncestors(t,e){var i;void 0===e&&(e=[]);const n=getNearestOverflowAncestor(t),o=n===(null==(i=t.ownerDocument)?void 0:i.body),l=getWindow(n);return o?e.concat(l,l.visualViewport||[],isOverflowElement(n)?n:[]):e.concat(n,getOverflowAncestors(n))}function getViewportRect(t,e){const i=getWindow(t),n=getDocumentElement(t),o=i.visualViewport;let l=n.clientWidth,r=n.clientHeight,s=0,a=0;if(o){l=o.width,r=o.height;const t=isClientRectVisualViewportBased();(!t||t&&"fixed"===e)&&(s=o.offsetLeft,a=o.offsetTop)}return{width:l,height:r,x:s,y:a}}function getInnerBoundingClientRect(t,e){const i=getBoundingClientRect(t,!0,"fixed"===e),n=i.top+t.clientTop,o=i.left+t.clientLeft,l=isHTMLElement(t)?getScale(t):{x:1,y:1};return{width:t.clientWidth*l.x,height:t.clientHeight*l.y,x:o*l.x,y:n*l.y}}function getClientRectFromClippingAncestor(t,e,i){let n;if("viewport"===e)n=getViewportRect(t,i);else if("document"===e)n=getDocumentRect(getDocumentElement(t));else if(isElement(e))n=getInnerBoundingClientRect(e,i);else{const i={...e};if(isClientRectVisualViewportBased()){var o,l;const e=getWindow(t);i.x-=(null==(o=e.visualViewport)?void 0:o.offsetLeft)||0,i.y-=(null==(l=e.visualViewport)?void 0:l.offsetTop)||0}n=i}return rectToClientRect(n)}function getClippingElementAncestors(t,e){const i=e.get(t);if(i)return i;let n=getOverflowAncestors(t).filter((t=>isElement(t)&&"body"!==getNodeName(t))),o=null;const l="fixed"===getComputedStyle$1(t).position;let r=l?getParentNode(t):t;for(;isElement(r)&&!isLastTraversableNode(r);){const t=getComputedStyle$1(r),e=isContainingBlock(r);if("fixed"===t.position)o=null;else{(l?!e&&!o:!e&&"static"===t.position&&!!o&&["absolute","fixed"].includes(o.position))?n=n.filter((t=>t!==r)):o=t}r=getParentNode(r)}return e.set(t,n),n}function getClippingRect(t){let{element:e,boundary:i,rootBoundary:n,strategy:o}=t;const l=[..."clippingAncestors"===i?getClippingElementAncestors(e,this._c):[].concat(i),n],r=l[0],s=l.reduce(((t,i)=>{const n=getClientRectFromClippingAncestor(e,i,o);return t.top=max(n.top,t.top),t.right=min(n.right,t.right),t.bottom=min(n.bottom,t.bottom),t.left=max(n.left,t.left),t}),getClientRectFromClippingAncestor(e,r,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function getDimensions(t){return isHTMLElement(t)?getCssDimensions(t):t.getBoundingClientRect()}function getTrueOffsetParent(t,e){return isHTMLElement(t)&&"fixed"!==getComputedStyle$1(t).position?e?e(t):t.offsetParent:null}function getContainingBlock(t){let e=getParentNode(t);for(;isHTMLElement(e)&&!isLastTraversableNode(e);){if(isContainingBlock(e))return e;e=getParentNode(e)}return null}function getOffsetParent(t,e){const i=getWindow(t);if(!isHTMLElement(t))return i;let n=getTrueOffsetParent(t,e);for(;n&&isTableElement(n)&&"static"===getComputedStyle$1(n).position;)n=getTrueOffsetParent(n,e);return n&&("html"===getNodeName(n)||"body"===getNodeName(n)&&"static"===getComputedStyle$1(n).position&&!isContainingBlock(n))?i:n||getContainingBlock(t)||i}function getRectRelativeToOffsetParent(t,e,i){const n=isHTMLElement(e),o=getDocumentElement(e),l=getBoundingClientRect(t,!0,"fixed"===i,e);let r={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(n||!n&&"fixed"!==i)if(("body"!==getNodeName(e)||isOverflowElement(o))&&(r=getNodeScroll(e)),isHTMLElement(e)){const t=getBoundingClientRect(e,!0);s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}else o&&(s.x=getWindowScrollBarX(o));return{x:l.left+r.scrollLeft-s.x,y:l.top+r.scrollTop-s.y,width:l.width,height:l.height}}const platform={getClippingRect:getClippingRect,convertOffsetParentRelativeRectToViewportRelativeRect:convertOffsetParentRelativeRectToViewportRelativeRect,isElement:isElement,getDimensions:getDimensions,getOffsetParent:getOffsetParent,getDocumentElement:getDocumentElement,getScale:getScale,async getElementRects(t){let{reference:e,floating:i,strategy:n}=t;const o=this.getOffsetParent||getOffsetParent,l=this.getDimensions;return{reference:getRectRelativeToOffsetParent(e,await o(i),n),floating:{x:0,y:0,...await l(i)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===getComputedStyle$1(t).direction},computePosition=(t,e,i)=>{const n=new Map,o={platform:platform,...i},l={...o.platform,_c:n};return computePosition$1(t,e,{...o,platform:l})},defaultStyleCss=":host{--kolibri-border-color:#666;--kolibri-border-radius:0.125rem;--kolibri-border-width:1px;--kolibri-color-error:#f44336;--kolibri-color-info:#2196f3;--kolibri-color-success:#4caf50;--kolibri-color-warning:#ff9800;--kolibri-color-primary:#3f51b5;--kolibri-color-secondary:#ff4081;--kolibri-color-normal:#9e9e9e;--kolibri-color-danger:#f44336;--kolibri-color-ghost:#f5f5f5;--kolibri-color-disabled:#bdbdbd;--kolibri-color-text:#222222;--kolibri-color-visited:#9c27b0;--kolibri-font-family:Verdana, Arial, Tahoma, Helvetica, sans-serif;--kolibri-font-size:16px;--kolibri-spacing:0.25rem}:host{font-family:inherit;font-size:inherit}:host *{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{font-family:var(--kolibri-font-family);font-size:inherit}*{box-sizing:border-box}kol-icon{color:inherit}kol-span-wc{display:grid;place-items:center;width:100%}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}a{display:inline-flex;place-items:baseline}button{background-color:transparent;border-width:0;margin:0;min-height:44px;min-width:44px;padding:0}a,button,input,select,textarea{cursor:pointer}a.icon-only>kol-span-wc>span>span,:host button.icon-only>kol-span-wc>span>span{display:none}h1,h2,h3,h4,h5,h6{font-family:var(--kolibri-font-family);font-size:var(--kolibri-font-size);margin:0;padding:0}kol-tooltip #floating{animation-name:fadeInOpacity;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:0.5s;box-sizing:border-box;display:none;position:absolute}kol-tooltip #arrow{background:#333;height:10px;position:absolute;transform:rotate(45deg);width:10px;z-index:999}kol-tooltip kol-badge{border-radius:var(--kolibri-border-radius);font-size:calc(4 * var(--kolibri-spacing));max-width:300px;position:relative;z-index:1000}@keyframes fadeInOpacity{0%{opacity:0}100%{opacity:1}}",KolTooltip=class{constructor(t){registerInstance(this,t),this.alignTooltip=()=>{var t,e,i;if("test"!==processEnv&&this.previousSibling){const n=this.previousSibling;if(this.tooltipElement){const o=this.tooltipElement,l=this.arrowElement,r=[(i=null!==(t=null==l?void 0:l.offsetHeight)&&void 0!==t?t:10,void 0===i&&(i=0),{name:"offset",options:i,async fn(t){const{x:e,y:n}=t,o=await convertValueToCoords(t,i);return{x:e+o.x,y:n+o.y,data:o}}}),(void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i;const{placement:n,middlewareData:o,rects:l,initialPlacement:r,platform:s,elements:a}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:u=!0,...p}=e,h=getSide(n),v=getSide(r)===r,y=await(null==s.isRTL?void 0:s.isRTL(a.floating)),w=m||(v||!u?[getOppositePlacement(r)]:getExpandedPlacements(r));m||"none"===g||w.push(...getOppositeAxisPlacements(r,u,g,y));const b=[r,...w],x=await detectOverflow(t,p),E=[];let T=(null==(i=o.flip)?void 0:i.overflows)||[];if(c&&E.push(x[h]),d){const{main:t,cross:e}=getAlignmentSides(n,l,y);E.push(x[t],x[e])}if(T=[...T,{placement:n,overflows:E}],!E.every((t=>t<=0))){var C,S;const t=((null==(C=o.flip)?void 0:C.index)||0)+1,e=b[t];if(e)return{data:{index:t,overflows:T},reset:{placement:e}};let i=null==(S=T.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:S.placement;if(!i)switch(f){case"bestFit":{var A;const t=null==(A=T.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:A[0];t&&(i=t);break}case"initialPlacement":i=r}if(n!==i)return{reset:{placement:i}}}return{}}}),shift()];l&&r.push(arrow({element:l})),computePosition(n,o,{placement:this.state._align,middleware:r}).then((({x:t,y:e,middlewareData:i,placement:n})=>{var r,s;Object.assign(o.style,{left:`${t}px`,top:`${e}px`}),l&&((null===(r=i.arrow)||void 0===r?void 0:r.x)?Object.assign(l.style,{left:`${i.arrow.x}px`,top:"bottom"===n?-l.offsetHeight/2+"px":"",bottom:"top"===n?-l.offsetHeight/2+"px":""}):(null===(s=i.arrow)||void 0===s?void 0:s.y)&&Object.assign(l.style,{left:"right"===n?-l.offsetWidth/2+"px":"",right:"left"===n?-l.offsetWidth/2+"px":"",top:`${i.arrow.y}px`}))}))}}},this.showTooltip=()=>{this.tooltipElement&&(this.tooltipElement.style.setProperty("display","block"),getDocument().body.addEventListener("keyup",this.hideTooltipByEscape),this.alignTooltip(),this.tooltipElement.style.setProperty("visibility","visible"),document.addEventListener("scroll",this.alignTooltip))},this.hideTooltip=()=>{this.tooltipElement&&(this.tooltipElement.style.setProperty("display","none"),this.tooltipElement.style.setProperty("visibility","hidden"),document.removeEventListener("scroll",this.alignTooltip))},this.hideTooltipByEscape=t=>{"Escape"===t.key&&(getDocument().body.removeEventListener("keyup",this.hideTooltipByEscape),this.hideTooltip())},this.addListeners=t=>{t.addEventListener("mouseover",this.incrementOverFocusCount),t.addEventListener("focus",this.incrementOverFocusCount),t.addEventListener("mouseout",this.decrementOverFocusCount),t.addEventListener("blur",this.decrementOverFocusCount)},this.removeListeners=t=>{t.removeEventListener("mouseover",this.incrementOverFocusCount),t.removeEventListener("focus",this.incrementOverFocusCount),t.removeEventListener("mouseout",this.decrementOverFocusCount),t.removeEventListener("blur",this.decrementOverFocusCount)},this.resyncListeners=t=>{this.removeListeners(t),this.addListeners(t)},this.catchHostElement=t=>{t&&(this.previousSibling=t.previousElementSibling,this.previousSibling&&this.resyncListeners(this.previousSibling))},this.catchTooltipElement=t=>{this.tooltipElement=t,this.tooltipElement&&this.resyncListeners(this.tooltipElement)},this.catchArrowElement=t=>{this.arrowElement=t},this.overFocusCount=0,this.incrementOverFocusCount=()=>{this.overFocusCount++,this.showOrHideTooltip()},this.decrementOverFocusCount=()=>{this.overFocusCount--,this.showOrHideTooltip()},this.showOrHideTooltip=()=>{clearTimeout(this.overFocusTimeout),this.overFocusTimeout=setTimeout((()=>{clearTimeout(this.overFocusTimeout),this.overFocusCount>0?this.showTooltip():this.hideTooltip()}),250)},this._align="top",this._id=void 0,this._label=void 0,this.state={_align:"top",_id:nonce(),_label:""}}render(){return smartSetTimeout((()=>{this.alignTooltip(),smartSetTimeout(this.alignTooltip,750)}),250),h(Host,{ref:this.catchHostElement},""!==this.state._label&&h("div",{id:"floating",ref:this.catchTooltipElement},h("div",{id:"arrow",ref:this.catchArrowElement}),h("kol-badge",{id:this.state._id,_color:{backgroundColor:"#333",color:"#ddd"},_label:this.state._label})))}validateAlign(t){watchTooltipAlignment(this,"_align",t)}validateId(t){watchString(this,"_id",t)}validateLabel(t){watchString(this,"_label",t)}componentWillLoad(){this.validateAlign(this._align),this.validateId(this._id),this.validateLabel(this._label)}disconnectedCallback(){this.previousSibling&&this.removeListeners(this.previousSibling),this.tooltipElement&&this.removeListeners(this.tooltipElement)}static get watchers(){return{_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}}};KolTooltip.style={default:defaultStyleCss};export{KolTooltip as kol_tooltip};