@public-ui/components 1.6.0-rc.7 → 1.6.0-rc.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +3 -3
- package/dist/cjs/button-link-1df10d7c.js.map +1 -1
- package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-wc.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-progress.cjs.entry.js.map +1 -1
- package/dist/cjs/kolibri.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/components/component.js.map +1 -1
- package/dist/components/component8.js +1 -1
- package/dist/components/component8.js.map +1 -1
- package/dist/components/kol-progress.js +1 -1
- package/dist/components/kol-progress.js.map +1 -1
- package/dist/esm/button-link-2ad7f3cf.js.map +1 -1
- package/dist/esm/kol-link-wc.entry.js +1 -1
- package/dist/esm/kol-link-wc.entry.js.map +1 -1
- package/dist/esm/kol-progress.entry.js.map +1 -1
- package/dist/esm/kolibri.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/kolibri/button-link-2ad7f3cf.js.map +1 -1
- package/dist/kolibri/kol-link-wc.entry.js +1 -1
- package/dist/kolibri/kol-link-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-progress.entry.js.map +1 -1
- package/dist/kolibri/kolibri.esm.js +1 -1
- package/dist/types/components/progress/component.d.ts +5 -5
- package/dist/types/components.d.ts +8 -6
- package/dist/types/types/button-link.d.ts +3 -3
- package/doc/modal.md +11 -11
- package/doc/progress.md +8 -8
- package/jest-test-results.json +1 -1
- package/package.json +1 -1
- package/vscode-custom-data.json +30 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["validateDownload","component","value","watchBoolean","watchString","validateStealth","validateHref","options","KolLinkWc","this","nonce","catchRef","ref","propagateFocus","host","onClick","event","_a","state","_on","preventDefault","setEventTarget","_b","_href","getRenderValues","goToProps","_selector","role","tabIndex","scrollBySelector","onKeyPress","isExternal","_target","tagAttrs","href","length","target","undefined","rel","_useCase","_hideLabel","_label","devHint","translate","_icon","render","h","Host","Object","assign","_ariaControls","_ariaCurrent","mapBoolean2String","_ariaExpanded","_ariaSelected","class","disabled","_disabled","_stealth","_role","_tabIndex","name","slot","_targetDescription","hidden","_align","_tooltipAlign","_id","validateAriaControls","validateAriaCurrent","validateAriaExpanded","validateAriaLabel","validateLabel","validateAriaSelected","validateDisabled","a11yHintDisabled","validateHideLabel","validateIcon","validateIconAlign","watchIconAlign","validateIconOnly","validateOn","validateRole","validateSelector","validateTabIndex","validateTarget","validateTargetDescription","validateTooltipAlign","watchTooltipAlignment","validateUseCase","componentWillLoad","_download","_iconOnly","_iconAlign","_ariaLabel"],"sources":["src/types/props/download.ts","src/types/props/stealth.ts","src/types/props/href.ts","src/components/link/component.tsx"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\nimport { watchBoolean, watchString } from '../../utils/prop.validators';\n\n/* types */\n/** de\n * Teilt dem Browser mit, dass sich hinter dem Link eine Datei befindet. Setzt optional den Dateinamen.\n */\n/** en\n * Tells the browser that the link contains a file. Optionally sets the filename.\n */\nexport type PropDownload = {\n\tdownload?: boolean | string;\n};\n\n/* validator */\nexport const validateDownload = (component: Generic.Element.Component, value?: boolean | string): void => {\n\tif (typeof value === 'boolean') watchBoolean(component, '_download', value);\n\telse watchString(component, '_download', value);\n};\n","import { Generic } from '@a11y-ui/core';\nimport { watchBoolean } from '../../utils/prop.validators';\n\n/* types */\n/** de\n * Versteckt den Link und lässt ihn bei Fokussierung erscheinen.\n */\n/** en\n * Hides the link und makes it appear on focus.\n */\nexport type PropStealth = {\n\tstealth: boolean;\n};\n\n/* validator */\nexport const validateStealth = (component: Generic.Element.Component, value?: boolean): void => {\n\twatchBoolean(component, '_stealth', value);\n};\n","import { Generic } from '@a11y-ui/core';\nimport { WatchStringOptions, watchString } from '../../utils/prop.validators';\n\n/**\n * This property is used for a link from a reference to the target URL.\n */\nexport type PropHref = {\n\thref: string;\n};\n\nexport type HrefProp = Generic.Element.Members<PropHref, unknown>;\n\nexport const validateHref = (component: Generic.Element.Component, value?: string, options: WatchStringOptions = {}): void => {\n\twatchString(component, '_href', value, options);\n};\n","import { Component, Element, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { translate } from '../../i18n';\nimport { AlternativButtonLinkRole, KoliBriLinkAPI, LinkOnCallbacks, LinkStates, LinkTarget, LinkUseCase, watchTooltipAlignment } from '../../types/button-link';\nimport { Stringified } from '../../types/common';\nimport { KoliBriIconProp } from '../../types/icon';\nimport { AriaCurrent, Align, validateAriaCurrent, validateAriaSelected, validateStealth, validateDownload, validateHideLabel } from '../../types/props';\nimport { a11yHintDisabled, devHint } from '../../utils/a11y.tipps';\nimport { nonce } from '../../utils/dev.utils';\nimport { mapBoolean2String, scrollBySelector, setEventTarget, watchBoolean, watchString } from '../../utils/prop.validators';\nimport { propagateFocus } from '../../utils/reuse';\nimport { validateIcon, watchIconAlign } from '../../types/props/icon';\nimport { validateLabel } from '../../types/props/label';\nimport { validateTabIndex } from '../../utils/validators/tab-index';\nimport { validateHref } from '../../types/props/href';\n\n/**\n * @internal\n */\n@Component({\n\ttag: 'kol-link-wc',\n\tshadow: false,\n})\nexport class KolLinkWc implements KoliBriLinkAPI {\n\t@Element() private readonly host?: HTMLKolLinkWcElement;\n\tprivate readonly nonce = nonce();\n\tprivate ref?: HTMLAnchorElement;\n\n\tprivate readonly catchRef = (ref?: HTMLAnchorElement) => {\n\t\tthis.ref = ref;\n\t\tpropagateFocus(this.host, this.ref);\n\t};\n\n\tprivate readonly onClick = (event: Event) => {\n\t\tif (typeof this.state._on?.onClick === 'function') {\n\t\t\tevent.preventDefault();\n\t\t\tsetEventTarget(event, this.ref);\n\t\t\tthis.state._on?.onClick(event, this.state._href);\n\t\t}\n\t};\n\n\tprivate readonly getRenderValues = () => {\n\t\t/**\n\t\t * DX\n\t\t * Das möchte ich ungern für HTML machen, sondern nur für Barrierefreiheitsthemen.\n\t\t */\n\t\t// if (typeof this.state._href === 'string' && this.state._href.length > 0) {\n\t\t// console.error('Setz den URL.');\n\t\t// throw new Error('Setz den URL.');\n\t\t// }\n\n\t\t// switch (this.state._target) {\n\t\t// case '_blank':\n\t\t// case '_self':\n\t\t// break;\n\t\t// default:\n\t\t// console.error('Fehlerhaftes Target.');\n\t\t// throw new Error('Fehlerhaftes Target.');\n\t\t// }\n\n\t\t// ROBUSTHEIT durch Validierung\n\t\tlet goToProps = {};\n\t\tif (typeof this.state._selector === 'string') {\n\t\t\tgoToProps = {\n\t\t\t\trole: 'link',\n\t\t\t\ttabIndex: 0,\n\t\t\t\tonClick: () => {\n\t\t\t\t\tscrollBySelector(this.state._selector as string);\n\t\t\t\t},\n\t\t\t\tonKeyPress: () => {\n\t\t\t\t\tscrollBySelector(this.state._selector as string);\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\n\t\tconst isExternal = typeof this.state._target === 'string' && this.state._target !== '_self';\n\n\t\tconst tagAttrs = {\n\t\t\thref: typeof this.state._href === 'string' && this.state._href.length > 0 ? this.state._href : 'javascript:void(0);',\n\t\t\ttarget: typeof this.state._target === 'string' && this.state._target.length > 0 ? this.state._target : undefined,\n\t\t\trel: isExternal ? 'noopener' : undefined,\n\t\t};\n\n\t\tif ((this.state._useCase === 'image' || this.state._hideLabel === true) && !this.state._label) {\n\t\t\tdevHint(`[KolLink] Es muss ein Aria-Label gesetzt werden, wenn eine Grafik verlinkt oder der _hide-label gesetzt ist.`);\n\t\t}\n\t\treturn { isExternal, tagAttrs, goToProps };\n\t};\n\n\tpublic render(): JSX.Element {\n\t\tconst { isExternal, tagAttrs, goToProps } = this.getRenderValues();\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<a\n\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\t{...tagAttrs}\n\t\t\t\t\taria-controls={this.state._ariaControls}\n\t\t\t\t\taria-current={this.state._ariaCurrent}\n\t\t\t\t\taria-expanded={mapBoolean2String(this.state._ariaExpanded)}\n\t\t\t\t\taria-labelledby={this.state._useCase === 'image' || this.state._hideLabel === true ? this.nonce : undefined}\n\t\t\t\t\taria-selected={mapBoolean2String(this.state._ariaSelected)}\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tdisabled: this.state._disabled === true,\n\t\t\t\t\t\t'skip ': this.state._stealth !== false,\n\t\t\t\t\t\t'icon-only': this.state._hideLabel === true, // @deprecated in v2\n\t\t\t\t\t\t'hide-label': this.state._hideLabel === true,\n\t\t\t\t\t\t'external-link': isExternal,\n\t\t\t\t\t}}\n\t\t\t\t\t{...this.state._on}\n\t\t\t\t\t// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/click-events-have-key-events.md\n\t\t\t\t\tonClick={this.onClick}\n\t\t\t\t\tonKeyPress={this.onClick}\n\t\t\t\t\t{...goToProps}\n\t\t\t\t\trole={this.state._role}\n\t\t\t\t\ttabIndex={this.state._tabIndex}\n\t\t\t\t>\n\t\t\t\t\t<kol-span-wc _icon={this._icon} _hideLabel={this._hideLabel} _label={this.state._label}>\n\t\t\t\t\t\t<slot name=\"expert\" slot=\"expert\"></slot>\n\t\t\t\t\t</kol-span-wc>\n\t\t\t\t\t{isExternal && <kol-icon class=\"external-link-icon\" _label={this.state._targetDescription as string} _icon={'codicon codicon-link-external'} />}\n\t\t\t\t</a>\n\t\t\t\t<kol-tooltip\n\t\t\t\t\t/**\n\t\t\t\t\t * Dieses Aria-Hidden verhindert das doppelte Vorlesen des Labels,\n\t\t\t\t\t * verhindert aber nicht das Aria-Labelledby vorgelesen wird.\n\t\t\t\t\t */\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\thidden={this.state._hideLabel !== true}\n\t\t\t\t\t_align={this.state._tooltipAlign}\n\t\t\t\t\t_id={this.nonce}\n\t\t\t\t\t_label={this.state._label}\n\t\t\t\t></kol-tooltip>\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 das interaktive Element der Komponente 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 das interaktive Element in der Komponente etwas aufgeklappt wurde. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n\t */\n\t@Prop() public _ariaExpanded?: boolean;\n\n\t/**\n\t * Setzt die sichtbare oder semantische Beschriftung der Komponente (z.B. Aria-Label, Label, Headline, Caption, Summary usw.).\n\t *\n\t * @deprecated use _label instead\n\t */\n\t@Prop() public _ariaLabel?: string;\n\n\t/**\n\t * Gibt an, ob interaktive Element in der Komponente ausgewählt ist (z.B. role=tab). (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n\t */\n\t@Prop() public _ariaSelected?: boolean;\n\n\t/**\n\t * Deaktiviert das interaktive Element in der Komponente und erlaubt keine Interaktion mehr damit.\n\t *\n\t * @deprecated Ein Link kann nicht deaktiviert werden, nutzen Sie den Button-Link stattdessen.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Teilt dem Browser mit, dass sich hinter dem Link eine Datei befindet. Setzt optional den Dateinamen.\n\t */\n\t@Prop() public _download?: boolean | string = false;\n\n\t/**\n\t * Blendet die Beschriftung (Label) aus und zeigt sie stattdessen mittels eines Tooltips an.\n\t */\n\t@Prop() public _hideLabel?: 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 * Setzt die Iconklasse (z.B.: `_icon=\"codicon codicon-home`).\n\t */\n\t@Prop() public _icon?: Stringified<KoliBriIconProp>;\n\n\t/**\n\t * Deprecated: Gibt an, ob das Icon links oder rechts von der Beschriftung angezeigt werden soll.\n\t *\n\t * @deprecated Wird durch das neue flexibleren Icon-Typ abgedeckt.\n\t */\n\t@Prop() public _iconAlign?: Align;\n\n\t/**\n\t * Blendet die Beschriftung (Label) aus und zeigt sie stattdessen mittels eines Tooltips an.\n\t * @deprecated use _hide-label\n\t */\n\t@Prop() public _iconOnly?: boolean;\n\n\t/**\n\t * Setzt die sichtbare oder semantische Beschriftung der Komponente (z.B. Aria-Label, Label, Headline, Caption, Summary usw.).\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 * @deprecated will be removed in v2\n\t */\n\t@Prop() public _on?: LinkOnCallbacks;\n\n\t/**\n\t * Gibt die Rolle des primären Elements in der Komponente an.\n\t */\n\t@Prop() public _role?: AlternativButtonLinkRole;\n\n\t/**\n\t * Gibt die ID eines DOM-Elements, zu dem gesprungen werden soll, aus.\n\t *\n\t * @deprecated will be removed in v2\n\t */\n\t@Prop() public _selector?: string;\n\n\t/**\n\t * Gibt an, ob der Link nur beim Fokus sichtbar ist.\n\t *\n\t * @deprecated will be removed in v2\n\t */\n\t@Prop() public _stealth?: boolean = false;\n\n\t/**\n\t * Gibt an, welchen Tab-Index das primäre Element in der Komponente 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 wo 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 bevorzugt entweder oben, rechts, unten oder links angezeigt werden soll.\n\t */\n\t@Prop() public _tooltipAlign?: Align = 'right';\n\n\t/**\n\t * Gibt den Verwendungsfall des Links an.\n\t *\n\t * @deprecated will be removed in v2\n\t */\n\t@Prop() public _useCase?: LinkUseCase = 'text';\n\n\t@State() public state: LinkStates = {\n\t\t_href: 'javascript:void(0);', // ⚠ required\n\t\t_icon: {},\n\t\t_label: '…',\n\t};\n\n\t@Watch('_ariaControls')\n\tpublic validateAriaControls(value?: string): void {\n\t\twatchString(this, '_ariaControls', value);\n\t}\n\n\t@Watch('_ariaCurrent')\n\tpublic validateAriaCurrent(value?: AriaCurrent): void {\n\t\tvalidateAriaCurrent(this, value);\n\t}\n\n\t@Watch('_ariaExpanded')\n\tpublic validateAriaExpanded(value?: boolean): void {\n\t\twatchBoolean(this, '_ariaExpanded', value);\n\t}\n\n\t/**\n\t * @deprecated\n\t */\n\t@Watch('_ariaLabel')\n\tpublic validateAriaLabel(value?: string): void {\n\t\tthis.validateLabel(value);\n\t}\n\n\t@Watch('_ariaSelected')\n\tpublic validateAriaSelected(value?: boolean): void {\n\t\tvalidateAriaSelected(this, value);\n\t}\n\n\t/**\n\t * @deprecated\n\t */\n\t@Watch('_disabled')\n\tpublic validateDisabled(value?: boolean): void {\n\t\twatchBoolean(this, '_disabled', value);\n\t\tif (value === true) {\n\t\t\ta11yHintDisabled();\n\t\t}\n\t}\n\n\t@Watch('_download')\n\tpublic validateDownload(value?: boolean | string): void {\n\t\tvalidateDownload(this, value);\n\t}\n\n\t@Watch('_hideLabel')\n\tpublic validateHideLabel(value?: boolean): void {\n\t\tvalidateHideLabel(this, value);\n\t}\n\n\t@Watch('_href')\n\tpublic validateHref(value?: string): void {\n\t\tvalidateHref(this, value);\n\t}\n\n\t@Watch('_icon')\n\tpublic validateIcon(value?: KoliBriIconProp): void {\n\t\tvalidateIcon(this, value);\n\t}\n\n\t/**\n\t * @deprecated\n\t */\n\t@Watch('_iconAlign')\n\tpublic validateIconAlign(value?: Align): void {\n\t\twatchIconAlign(this, value);\n\t}\n\n\t/**\n\t * @deprecated use _hide-label\n\t */\n\t@Watch('_iconOnly')\n\tpublic validateIconOnly(value?: boolean): void {\n\t\tthis.validateHideLabel(value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: string): void {\n\t\tvalidateLabel(this, value);\n\t}\n\n\t/**\n\t * @deprecated\n\t */\n\t@Watch('_on')\n\tpublic validateOn(value?: LinkOnCallbacks): void {\n\t\tif (typeof value === 'object' && typeof value?.onClick === 'function') {\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\t_on: value,\n\t\t\t};\n\t\t}\n\t}\n\n\t@Watch('_role')\n\tpublic validateRole(value?: AlternativButtonLinkRole): void {\n\t\twatchString(this, '_role', value);\n\t}\n\n\t/**\n\t * @deprecated\n\t */\n\t@Watch('_selector')\n\tpublic validateSelector(value?: string): void {\n\t\twatchString(this, '_selector', value);\n\t}\n\n\t/**\n\t * @deprecated\n\t */\n\t@Watch('_stealth')\n\tpublic validateStealth(value?: boolean): void {\n\t\tvalidateStealth(this, value);\n\t}\n\n\t@Watch('_tabIndex')\n\tpublic validateTabIndex(value?: number): void {\n\t\tvalidateTabIndex(this, value);\n\t}\n\n\t@Watch('_target')\n\tpublic validateTarget(value?: LinkTarget): void {\n\t\twatchString(this, '_target', value);\n\t}\n\n\t@Watch('_targetDescription')\n\tpublic validateTargetDescription(value?: string): void {\n\t\twatchString(this, '_targetDescription', value);\n\t}\n\n\t@Watch('_tooltipAlign')\n\tpublic validateTooltipAlign(value?: Align): void {\n\t\twatchTooltipAlignment(this, '_tooltipAlign', value);\n\t}\n\n\t/**\n\t * @deprecated\n\t */\n\t@Watch('_useCase')\n\tpublic validateUseCase(value?: LinkUseCase): void {\n\t\tif (typeof value === 'string') {\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\t_useCase: value,\n\t\t\t};\n\t\t}\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAriaControls(this._ariaControls);\n\t\tthis.validateAriaCurrent(this._ariaCurrent);\n\t\tthis.validateAriaExpanded(this._ariaExpanded);\n\t\tthis.validateAriaSelected(this._ariaSelected);\n\t\tthis.validateDisabled(this._disabled);\n\t\tthis.validateDownload(this._download);\n\t\tthis.validateHideLabel(this._hideLabel || this._iconOnly);\n\t\tthis.validateHref(this._href);\n\t\tthis.validateIcon(this._icon);\n\t\tthis.validateIconAlign(this._iconAlign);\n\t\tthis.validateLabel(this._label || this._ariaLabel);\n\t\tthis.validateOn(this._on);\n\t\tthis.validateRole(this._role);\n\t\tthis.validateSelector(this._selector);\n\t\tthis.validateStealth(this._stealth);\n\t\tthis.validateTabIndex(this._tabIndex);\n\t\tthis.validateTarget(this._target);\n\t\tthis.validateTargetDescription(this._targetDescription);\n\t\tthis.validateTooltipAlign(this._tooltipAlign);\n\t\tthis.validateUseCase(this._useCase);\n\t}\n}\n"],"mappings":";;;4nBAeO,MAAMA,EAAmB,CAACC,EAAsCC,KACtE,UAAWA,IAAU,UAAWC,EAAaF,EAAW,YAAaC,QAChEE,EAAYH,EAAW,YAAaC,EAAM,ECFzC,MAAMG,EAAkB,CAACJ,EAAsCC,KACrEC,EAAaF,EAAW,WAAYC,EAAM,ECJpC,MAAMI,EAAe,CAACL,EAAsCC,EAAgBK,EAA8B,MAChHH,EAAYH,EAAW,QAASC,EAAOK,EAAQ,E,MCUnCC,EAAS,M,yBAEJC,KAAAC,MAAQA,IAGRD,KAAAE,SAAYC,IAC5BH,KAAKG,IAAMA,EACXC,EAAeJ,KAAKK,KAAML,KAAKG,IAAI,EAGnBH,KAAAM,QAAWC,I,QAC3B,WAAWC,EAAAR,KAAKS,MAAMC,OAAG,MAAAF,SAAA,SAAAA,EAAEF,WAAY,WAAY,CAClDC,EAAMI,iBACNC,EAAeL,EAAOP,KAAKG,MAC3BU,EAAAb,KAAKS,MAAMC,OAAG,MAAAG,SAAA,SAAAA,EAAEP,QAAQC,EAAOP,KAAKS,MAAMK,M,GAI3Bd,KAAAe,gBAAkB,KAoBlC,IAAIC,EAAY,GAChB,UAAWhB,KAAKS,MAAMQ,YAAc,SAAU,CAC7CD,EAAY,CACXE,KAAM,OACNC,SAAU,EACVb,QAAS,KACRc,EAAiBpB,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K4E,eAAe5E,KAAKuB,SACzBvB,KAAK6E,0BAA0B7E,KAAKsD,oBACpCtD,KAAK8E,qBAAqB9E,KAAKyD,eAC/BzD,KAAKgF,gBAAgBhF,KAAK8B,S"}
|
|
1
|
+
{"version":3,"names":["validateDownload","component","value","watchBoolean","watchString","validateStealth","validateHref","options","KolLinkWc","this","nonce","catchRef","ref","propagateFocus","host","onClick","event","_a","state","_on","preventDefault","setEventTarget","_b","_href","getRenderValues","goToProps","_selector","role","tabIndex","scrollBySelector","onKeyPress","isExternal","_target","tagAttrs","href","length","target","undefined","rel","_useCase","_hideLabel","_label","devHint","translate","_icon","render","h","Host","Object","assign","_ariaControls","_ariaCurrent","mapBoolean2String","_ariaExpanded","_ariaSelected","class","disabled","_disabled","_stealth","_role","_tabIndex","name","slot","_targetDescription","hidden","_align","_tooltipAlign","_id","validateAriaControls","validateAriaCurrent","validateAriaExpanded","validateAriaLabel","validateLabel","validateAriaSelected","validateDisabled","a11yHintDisabled","validateHideLabel","validateIcon","validateIconAlign","watchIconAlign","validateIconOnly","validateOn","validateRole","validateSelector","validateTabIndex","validateTarget","validateTargetDescription","validateTooltipAlign","watchTooltipAlignment","validateUseCase","componentWillLoad","_download","_iconOnly","_iconAlign","_ariaLabel"],"sources":["src/types/props/download.ts","src/types/props/stealth.ts","src/types/props/href.ts","src/components/link/component.tsx"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\nimport { watchBoolean, watchString } from '../../utils/prop.validators';\n\n/* types */\n/** de\n * Teilt dem Browser mit, dass sich hinter dem Link eine Datei befindet. Setzt optional den Dateinamen.\n */\n/** en\n * Tells the browser that the link contains a file. Optionally sets the filename.\n */\nexport type PropDownload = {\n\tdownload?: boolean | string;\n};\n\n/* validator */\nexport const validateDownload = (component: Generic.Element.Component, value?: boolean | string): void => {\n\tif (typeof value === 'boolean') watchBoolean(component, '_download', value);\n\telse watchString(component, '_download', value);\n};\n","import { Generic } from '@a11y-ui/core';\nimport { watchBoolean } from '../../utils/prop.validators';\n\n/* types */\n/** de\n * Versteckt den Link und lässt ihn bei Fokussierung erscheinen.\n */\n/** en\n * Hides the link und makes it appear on focus.\n */\nexport type PropStealth = {\n\tstealth: boolean;\n};\n\n/* validator */\nexport const validateStealth = (component: Generic.Element.Component, value?: boolean): void => {\n\twatchBoolean(component, '_stealth', value);\n};\n","import { Generic } from '@a11y-ui/core';\nimport { WatchStringOptions, watchString } from '../../utils/prop.validators';\n\n/**\n * This property is used for a link from a reference to the target URL.\n */\nexport type PropHref = {\n\thref: string;\n};\n\nexport type HrefProp = Generic.Element.Members<PropHref, unknown>;\n\nexport const validateHref = (component: Generic.Element.Component, value?: string, options: WatchStringOptions = {}): void => {\n\twatchString(component, '_href', value, options);\n};\n","import { Component, Element, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { translate } from '../../i18n';\nimport { AlternativButtonLinkRole, KoliBriLinkAPI, LinkOnCallbacks, LinkStates, LinkTarget, LinkUseCase, watchTooltipAlignment } from '../../types/button-link';\nimport { Stringified } from '../../types/common';\nimport { KoliBriIconProp } from '../../types/icon';\nimport { AriaCurrent, Align, validateAriaCurrent, validateAriaSelected, validateStealth, validateDownload, validateHideLabel } from '../../types/props';\nimport { a11yHintDisabled, devHint } from '../../utils/a11y.tipps';\nimport { nonce } from '../../utils/dev.utils';\nimport { mapBoolean2String, scrollBySelector, setEventTarget, watchBoolean, watchString } from '../../utils/prop.validators';\nimport { propagateFocus } from '../../utils/reuse';\nimport { validateIcon, watchIconAlign } from '../../types/props/icon';\nimport { validateLabel } from '../../types/props/label';\nimport { validateTabIndex } from '../../utils/validators/tab-index';\nimport { validateHref } from '../../types/props/href';\n\n/**\n * @internal\n */\n@Component({\n\ttag: 'kol-link-wc',\n\tshadow: false,\n})\nexport class KolLinkWc implements KoliBriLinkAPI {\n\t@Element() private readonly host?: HTMLKolLinkWcElement;\n\tprivate readonly nonce = nonce();\n\tprivate ref?: HTMLAnchorElement;\n\n\tprivate readonly catchRef = (ref?: HTMLAnchorElement) => {\n\t\tthis.ref = ref;\n\t\tpropagateFocus(this.host, this.ref);\n\t};\n\n\tprivate readonly onClick = (event: Event) => {\n\t\tif (typeof this.state._on?.onClick === 'function') {\n\t\t\tevent.preventDefault();\n\t\t\tsetEventTarget(event, this.ref);\n\t\t\tthis.state._on?.onClick(event, this.state._href);\n\t\t}\n\t};\n\n\tprivate readonly getRenderValues = () => {\n\t\t/**\n\t\t * DX\n\t\t * Das möchte ich ungern für HTML machen, sondern nur für Barrierefreiheitsthemen.\n\t\t */\n\t\t// if (typeof this.state._href === 'string' && this.state._href.length > 0) {\n\t\t// console.error('Setz den URL.');\n\t\t// throw new Error('Setz den URL.');\n\t\t// }\n\n\t\t// switch (this.state._target) {\n\t\t// case '_blank':\n\t\t// case '_self':\n\t\t// break;\n\t\t// default:\n\t\t// console.error('Fehlerhaftes Target.');\n\t\t// throw new Error('Fehlerhaftes Target.');\n\t\t// }\n\n\t\t// ROBUSTHEIT durch Validierung\n\t\tlet goToProps = {};\n\t\tif (typeof this.state._selector === 'string') {\n\t\t\tgoToProps = {\n\t\t\t\trole: 'link',\n\t\t\t\ttabIndex: 0,\n\t\t\t\tonClick: () => {\n\t\t\t\t\tscrollBySelector(this.state._selector as string);\n\t\t\t\t},\n\t\t\t\tonKeyPress: () => {\n\t\t\t\t\tscrollBySelector(this.state._selector as string);\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\n\t\tconst isExternal = typeof this.state._target === 'string' && this.state._target !== '_self';\n\n\t\tconst tagAttrs = {\n\t\t\thref: typeof this.state._href === 'string' && this.state._href.length > 0 ? this.state._href : 'javascript:void(0);',\n\t\t\ttarget: typeof this.state._target === 'string' && this.state._target.length > 0 ? this.state._target : undefined,\n\t\t\trel: isExternal ? 'noopener' : undefined,\n\t\t};\n\n\t\tif ((this.state._useCase === 'image' || this.state._hideLabel === true) && !this.state._label) {\n\t\t\tdevHint(`[KolLink] Es muss ein Aria-Label gesetzt werden, wenn eine Grafik verlinkt oder der _hide-label gesetzt ist.`);\n\t\t}\n\t\treturn { isExternal, tagAttrs, goToProps };\n\t};\n\n\tpublic render(): JSX.Element {\n\t\tconst { isExternal, tagAttrs, goToProps } = this.getRenderValues();\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<a\n\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\t{...tagAttrs}\n\t\t\t\t\taria-controls={this.state._ariaControls}\n\t\t\t\t\taria-current={this.state._ariaCurrent}\n\t\t\t\t\taria-expanded={mapBoolean2String(this.state._ariaExpanded)}\n\t\t\t\t\taria-labelledby={this.state._useCase === 'image' || this.state._hideLabel === true ? this.nonce : undefined}\n\t\t\t\t\taria-selected={mapBoolean2String(this.state._ariaSelected)}\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tdisabled: this.state._disabled === true,\n\t\t\t\t\t\t'skip ': this.state._stealth !== false,\n\t\t\t\t\t\t'icon-only': this.state._hideLabel === true, // @deprecated in v2\n\t\t\t\t\t\t'hide-label': this.state._hideLabel === true,\n\t\t\t\t\t\t'external-link': isExternal,\n\t\t\t\t\t}}\n\t\t\t\t\t{...this.state._on}\n\t\t\t\t\t// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/click-events-have-key-events.md\n\t\t\t\t\tonClick={this.onClick}\n\t\t\t\t\tonKeyPress={this.onClick}\n\t\t\t\t\t{...goToProps}\n\t\t\t\t\trole={this.state._role}\n\t\t\t\t\ttabIndex={this.state._tabIndex}\n\t\t\t\t>\n\t\t\t\t\t<kol-span-wc _icon={this._icon} _hideLabel={this._hideLabel} _label={this.state._label || this.state._href}>\n\t\t\t\t\t\t<slot name=\"expert\" slot=\"expert\"></slot>\n\t\t\t\t\t</kol-span-wc>\n\t\t\t\t\t{isExternal && <kol-icon class=\"external-link-icon\" _label={this.state._targetDescription as string} _icon={'codicon codicon-link-external'} />}\n\t\t\t\t</a>\n\t\t\t\t<kol-tooltip\n\t\t\t\t\t/**\n\t\t\t\t\t * Dieses Aria-Hidden verhindert das doppelte Vorlesen des Labels,\n\t\t\t\t\t * verhindert aber nicht das Aria-Labelledby vorgelesen wird.\n\t\t\t\t\t */\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\thidden={this.state._hideLabel !== true}\n\t\t\t\t\t_align={this.state._tooltipAlign}\n\t\t\t\t\t_id={this.nonce}\n\t\t\t\t\t_label={this.state._label || this.state._href}\n\t\t\t\t></kol-tooltip>\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 das interaktive Element der Komponente 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 das interaktive Element in der Komponente etwas aufgeklappt wurde. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n\t */\n\t@Prop() public _ariaExpanded?: boolean;\n\n\t/**\n\t * Setzt die sichtbare oder semantische Beschriftung der Komponente (z.B. Aria-Label, Label, Headline, Caption, Summary usw.).\n\t *\n\t * @deprecated use _label instead\n\t */\n\t@Prop() public _ariaLabel?: string;\n\n\t/**\n\t * Gibt an, ob interaktive Element in der Komponente ausgewählt ist (z.B. role=tab). (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n\t */\n\t@Prop() public _ariaSelected?: boolean;\n\n\t/**\n\t * Deaktiviert das interaktive Element in der Komponente und erlaubt keine Interaktion mehr damit.\n\t *\n\t * @deprecated Ein Link kann nicht deaktiviert werden, nutzen Sie den Button-Link stattdessen.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Teilt dem Browser mit, dass sich hinter dem Link eine Datei befindet. Setzt optional den Dateinamen.\n\t */\n\t@Prop() public _download?: boolean | string = false;\n\n\t/**\n\t * Blendet die Beschriftung (Label) aus und zeigt sie stattdessen mittels eines Tooltips an.\n\t */\n\t@Prop() public _hideLabel?: 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 * Setzt die Iconklasse (z.B.: `_icon=\"codicon codicon-home`).\n\t */\n\t@Prop() public _icon?: Stringified<KoliBriIconProp>;\n\n\t/**\n\t * Deprecated: Gibt an, ob das Icon links oder rechts von der Beschriftung angezeigt werden soll.\n\t *\n\t * @deprecated Wird durch das neue flexibleren Icon-Typ abgedeckt.\n\t */\n\t@Prop() public _iconAlign?: Align;\n\n\t/**\n\t * Blendet die Beschriftung (Label) aus und zeigt sie stattdessen mittels eines Tooltips an.\n\t * @deprecated use _hide-label\n\t */\n\t@Prop() public _iconOnly?: boolean;\n\n\t/**\n\t * Setzt die sichtbare oder semantische Beschriftung der Komponente (z.B. Aria-Label, Label, Headline, Caption, Summary usw.).\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 * @deprecated will be removed in v2\n\t */\n\t@Prop() public _on?: LinkOnCallbacks;\n\n\t/**\n\t * Gibt die Rolle des primären Elements in der Komponente an.\n\t */\n\t@Prop() public _role?: AlternativButtonLinkRole;\n\n\t/**\n\t * Gibt die ID eines DOM-Elements, zu dem gesprungen werden soll, aus.\n\t *\n\t * @deprecated will be removed in v2\n\t */\n\t@Prop() public _selector?: string;\n\n\t/**\n\t * Gibt an, ob der Link nur beim Fokus sichtbar ist.\n\t *\n\t * @deprecated will be removed in v2\n\t */\n\t@Prop() public _stealth?: boolean = false;\n\n\t/**\n\t * Gibt an, welchen Tab-Index das primäre Element in der Komponente 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 wo 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 bevorzugt entweder oben, rechts, unten oder links angezeigt werden soll.\n\t */\n\t@Prop() public _tooltipAlign?: Align = 'right';\n\n\t/**\n\t * Gibt den Verwendungsfall des Links an.\n\t *\n\t * @deprecated will be removed in v2\n\t */\n\t@Prop() public _useCase?: LinkUseCase = 'text';\n\n\t@State() public state: LinkStates = {\n\t\t_href: '…', // ⚠ required\n\t\t_icon: {},\n\t};\n\n\t@Watch('_ariaControls')\n\tpublic validateAriaControls(value?: string): void {\n\t\twatchString(this, '_ariaControls', value);\n\t}\n\n\t@Watch('_ariaCurrent')\n\tpublic validateAriaCurrent(value?: AriaCurrent): void {\n\t\tvalidateAriaCurrent(this, value);\n\t}\n\n\t@Watch('_ariaExpanded')\n\tpublic validateAriaExpanded(value?: boolean): void {\n\t\twatchBoolean(this, '_ariaExpanded', value);\n\t}\n\n\t/**\n\t * @deprecated\n\t */\n\t@Watch('_ariaLabel')\n\tpublic validateAriaLabel(value?: string): void {\n\t\tthis.validateLabel(value);\n\t}\n\n\t@Watch('_ariaSelected')\n\tpublic validateAriaSelected(value?: boolean): void {\n\t\tvalidateAriaSelected(this, value);\n\t}\n\n\t/**\n\t * @deprecated\n\t */\n\t@Watch('_disabled')\n\tpublic validateDisabled(value?: boolean): void {\n\t\twatchBoolean(this, '_disabled', value);\n\t\tif (value === true) {\n\t\t\ta11yHintDisabled();\n\t\t}\n\t}\n\n\t@Watch('_download')\n\tpublic validateDownload(value?: boolean | string): void {\n\t\tvalidateDownload(this, value);\n\t}\n\n\t@Watch('_hideLabel')\n\tpublic validateHideLabel(value?: boolean): void {\n\t\tvalidateHideLabel(this, value);\n\t}\n\n\t@Watch('_href')\n\tpublic validateHref(value?: string): void {\n\t\tvalidateHref(this, value);\n\t}\n\n\t@Watch('_icon')\n\tpublic validateIcon(value?: KoliBriIconProp): void {\n\t\tvalidateIcon(this, value);\n\t}\n\n\t/**\n\t * @deprecated\n\t */\n\t@Watch('_iconAlign')\n\tpublic validateIconAlign(value?: Align): void {\n\t\twatchIconAlign(this, value);\n\t}\n\n\t/**\n\t * @deprecated use _hide-label\n\t */\n\t@Watch('_iconOnly')\n\tpublic validateIconOnly(value?: boolean): void {\n\t\tthis.validateHideLabel(value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: string): void {\n\t\tvalidateLabel(this, value);\n\t}\n\n\t/**\n\t * @deprecated\n\t */\n\t@Watch('_on')\n\tpublic validateOn(value?: LinkOnCallbacks): void {\n\t\tif (typeof value === 'object' && typeof value?.onClick === 'function') {\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\t_on: value,\n\t\t\t};\n\t\t}\n\t}\n\n\t@Watch('_role')\n\tpublic validateRole(value?: AlternativButtonLinkRole): void {\n\t\twatchString(this, '_role', value);\n\t}\n\n\t/**\n\t * @deprecated\n\t */\n\t@Watch('_selector')\n\tpublic validateSelector(value?: string): void {\n\t\twatchString(this, '_selector', value);\n\t}\n\n\t/**\n\t * @deprecated\n\t */\n\t@Watch('_stealth')\n\tpublic validateStealth(value?: boolean): void {\n\t\tvalidateStealth(this, value);\n\t}\n\n\t@Watch('_tabIndex')\n\tpublic validateTabIndex(value?: number): void {\n\t\tvalidateTabIndex(this, value);\n\t}\n\n\t@Watch('_target')\n\tpublic validateTarget(value?: LinkTarget): void {\n\t\twatchString(this, '_target', value);\n\t}\n\n\t@Watch('_targetDescription')\n\tpublic validateTargetDescription(value?: string): void {\n\t\twatchString(this, '_targetDescription', value);\n\t}\n\n\t@Watch('_tooltipAlign')\n\tpublic validateTooltipAlign(value?: Align): void {\n\t\twatchTooltipAlignment(this, '_tooltipAlign', value);\n\t}\n\n\t/**\n\t * @deprecated\n\t */\n\t@Watch('_useCase')\n\tpublic validateUseCase(value?: LinkUseCase): void {\n\t\tif (typeof value === 'string') {\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\t_useCase: value,\n\t\t\t};\n\t\t}\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAriaControls(this._ariaControls);\n\t\tthis.validateAriaCurrent(this._ariaCurrent);\n\t\tthis.validateAriaExpanded(this._ariaExpanded);\n\t\tthis.validateAriaSelected(this._ariaSelected);\n\t\tthis.validateDisabled(this._disabled);\n\t\tthis.validateDownload(this._download);\n\t\tthis.validateHideLabel(this._hideLabel || this._iconOnly);\n\t\tthis.validateHref(this._href);\n\t\tthis.validateIcon(this._icon);\n\t\tthis.validateIconAlign(this._iconAlign);\n\t\tthis.validateLabel(this._label || this._ariaLabel);\n\t\tthis.validateOn(this._on);\n\t\tthis.validateRole(this._role);\n\t\tthis.validateSelector(this._selector);\n\t\tthis.validateStealth(this._stealth);\n\t\tthis.validateTabIndex(this._tabIndex);\n\t\tthis.validateTarget(this._target);\n\t\tthis.validateTargetDescription(this._targetDescription);\n\t\tthis.validateTooltipAlign(this._tooltipAlign);\n\t\tthis.validateUseCase(this._useCase);\n\t}\n}\n"],"mappings":";;;4nBAeO,MAAMA,EAAmB,CAACC,EAAsCC,KACtE,UAAWA,IAAU,UAAWC,EAAaF,EAAW,YAAaC,QAChEE,EAAYH,EAAW,YAAaC,EAAM,ECFzC,MAAMG,EAAkB,CAACJ,EAAsCC,KACrEC,EAAaF,EAAW,WAAYC,EAAM,ECJpC,MAAMI,EAAe,CAACL,EAAsCC,EAAgBK,EAA8B,MAChHH,EAAYH,EAAW,QAASC,EAAOK,EAAQ,E,MCUnCC,EAAS,M,yBAEJC,KAAAC,MAAQA,IAGRD,KAAAE,SAAYC,IAC5BH,KAAKG,IAAMA,EACXC,EAAeJ,KAAKK,KAAML,KAAKG,IAAI,EAGnBH,KAAAM,QAAWC,I,QAC3B,WAAWC,EAAAR,KAAKS,MAAMC,OAAG,MAAAF,SAAA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YAAc/B,KAAKmF,WAC/CnF,KAAKH,aAAaG,KAAKc,OACvBd,KAAKoE,aAAapE,KAAKmC,OACvBnC,KAAKqE,kBAAkBrE,KAAKoF,YAC5BpF,KAAK+D,cAAc/D,KAAKgC,QAAUhC,KAAKqF,YACvCrF,KAAKwE,WAAWxE,KAAKU,KACrBV,KAAKyE,aAAazE,KAAKkD,OACvBlD,KAAK0E,iBAAiB1E,KAAKiB,WAC3BjB,KAAKJ,gBAAgBI,KAAKiD,UAC1BjD,KAAK2E,iBAAiB3E,KAAKmD,WAC3BnD,KAAK4E,eAAe5E,KAAKuB,SACzBvB,KAAK6E,0BAA0B7E,KAAKsD,oBACpCtD,KAAK8E,qBAAqB9E,KAAKyD,eAC/BzD,KAAKgF,gBAAgBhF,KAAK8B,S"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["KoliBriProgressVariantEnum","defaultStyleCss","VALID_VARIANTS","Object","keys","createProgressSVG","state","fullCircle","textPositionTop","textPositionBottom","labelY","valueY","_label","_variant","h","class","width","viewBox","xmlns","cx","cy","r","fill","stroke","Math","round","_value","_max","x","y","_unit","style","display","gap","height","rx","KolProcess","_liveValue","render","Host","this","max","value","hidden","validateLabel","validateMax","watchNumber","required","validateType","validateVariant","validateUnit","watchString","validateValue","watchValidator","includes","Set","componentWillLoad","_type","interval","setInterval","assign","disconnectedCallback","clearInterval"],"sources":["src/types/progress.ts","src/components/progress/style.css?tag=kol-progress&mode=default&encapsulation=shadow","src/components/progress/component.tsx"],"sourcesContent":["export enum KoliBriProgressVariantEnum {\n\t'bar' = 'bar',\n\t'cycle' = 'cycle',\n\t'cycle-value-label' = 'cycle-value-label',\n\t'cycle-label-value' = 'cycle-label-value',\n}\n\nexport type KoliBriProgressVariantType = `${KoliBriProgressVariantEnum}`;\n","@import url(../style.css);\nprogress {\n\tdisplay: block;\n\theight: 0;\n\toverflow: hidden;\n\twidth: 0;\n}\n.bar .border {\n\tfill: transparent;\n\tstroke: black;\n}\n.bar .background {\n\tfill: lightgray;\n\tstroke: white;\n}\n.bar .progress {\n\tfill: #0075ff;\n\tstroke: transparent;\n\ttransition: 250ms ease-in-out 50ms;\n}\n.cycle .background {\n\tfill: transparent;\n\tstroke: lightgray;\n}\n.cycle .border {\n\tfill: transparent;\n\tstroke: black;\n}\n.cycle .whitespace {\n\tfill: transparent;\n\tstroke: white;\n}\n.cycle .progress {\n\tfill: transparent;\n\tstroke: #0075ff;\n\ttransform-origin: 50% 50%;\n\ttransform: rotate(-90deg);\n\ttransition: 250ms ease-in-out 50ms;\n}\n/* https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion */\n@media (prefers-reduced-motion) {\n\t.progress {\n\t\ttransition-duration: 0s;\n\t\ttransition-delay: 0s;\n\t}\n}\n","import { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { watchNumber, watchString, watchValidator } from '../../utils/prop.validators';\nimport { KoliBriProgressAPI, KoliBriProgressStates } from './types';\nimport { KoliBriProgressType } from '../../components';\nimport { validateLabel } from '../../types/props';\nimport { KoliBriProgressVariantEnum } from '../../types/progress';\n\nconst VALID_VARIANTS = Object.keys(KoliBriProgressVariantEnum);\n\n// https://css-tricks.com/html5-progress-element/\nconst createProgressSVG = (state: KoliBriProgressStates): JSX.Element => {\n\tconst fullCircle = 342;\n\tconst textPositionTop = '43%';\n\tconst textPositionBottom = '57%';\n\n\tlet labelY = textPositionTop;\n\tlet valueY = state._label ? textPositionBottom : '50%';\n\tswitch (state._variant) {\n\t\tcase 'cycle-value-label':\n\t\t\tif (state._label) {\n\t\t\t\tlabelY = textPositionBottom;\n\t\t\t\tvalueY = textPositionTop;\n\t\t\t}\n\t\t// eslint-disable-next-line no-fallthrough\n\t\tcase 'cycle':\n\t\tcase 'cycle-label-value':\n\t\t\treturn (\n\t\t\t\t<svg class=\"cycle\" width=\"100\" viewBox=\"0 0 120 120\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t\t\t<circle class=\"background\" cx=\"60\" cy=\"60\" r=\"54.5\" fill=\"currentColor\" stroke=\"currentColor\" stroke-width=\"8\"></circle>\n\t\t\t\t\t<circle class=\"whitespace\" cx=\"60\" cy=\"60\" r=\"59\" fill=\"currentColor\" stroke=\"currentColor\" stroke-width=\"3\"></circle>\n\t\t\t\t\t<circle class=\"border\" cx=\"60\" cy=\"60\" r=\"59\" fill=\"currentColor\" stroke=\"currentColor\" stroke-width=\"1\"></circle>\n\t\t\t\t\t<circle class=\"whitespace\" cx=\"60\" cy=\"60\" r=\"51\" fill=\"currentColor\" stroke=\"currentColor\" stroke-width=\"1\"></circle>\n\t\t\t\t\t<circle class=\"border\" cx=\"60\" cy=\"60\" r=\"50\" fill=\"currentColor\" stroke=\"currentColor\" stroke-width=\"1\"></circle>\n\t\t\t\t\t<circle\n\t\t\t\t\t\tclass=\"progress\"\n\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\tstroke-dasharray={`${Math.round((state._value / state._max) * fullCircle)}px ${fullCircle}px`}\n\t\t\t\t\t\tstroke-width=\"6\"\n\t\t\t\t\t\tcx=\"60\"\n\t\t\t\t\t\tcy=\"60\"\n\t\t\t\t\t\tr=\"54.5\"\n\t\t\t\t\t></circle>\n\t\t\t\t\t{state._label && (\n\t\t\t\t\t\t<text aria-hidden=\"true\" x=\"50%\" y={labelY} text-anchor=\"middle\" fill=\"currentColor\">\n\t\t\t\t\t\t\t{state._label}\n\t\t\t\t\t\t</text>\n\t\t\t\t\t)}\n\t\t\t\t\t<text aria-hidden=\"true\" x=\"50%\" y={valueY} text-anchor=\"middle\" fill=\"currentColor\">\n\t\t\t\t\t\t{state._value}\n\t\t\t\t\t\t{state._unit}\n\t\t\t\t\t</text>\n\t\t\t\t</svg>\n\t\t\t);\n\t\tdefault:\n\t\t\treturn (\n\t\t\t\t<div class=\"bar\">\n\t\t\t\t\t{state._label && <div>{state._label}</div>}\n\t\t\t\t\t<div style={{ display: 'flex', gap: '0.3em' }}>\n\t\t\t\t\t\t<svg width=\"100\" viewBox=\"0 0 102 8\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t\t\t\t\t<rect class=\"background\" x=\"1\" y=\"1\" height=\"10\" rx=\"5\" fill=\"currentColor\" stroke=\"currentColor\" stroke-width=\"3\" width=\"100\"></rect>\n\t\t\t\t\t\t\t<rect\n\t\t\t\t\t\t\t\tclass=\"progress\"\n\t\t\t\t\t\t\t\tx=\"2.5\"\n\t\t\t\t\t\t\t\ty=\"2.5\"\n\t\t\t\t\t\t\t\theight=\"7\"\n\t\t\t\t\t\t\t\trx=\"3.5\"\n\t\t\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\tstroke-width=\"3\"\n\t\t\t\t\t\t\t\twidth={95 * (state._value / state._max)}\n\t\t\t\t\t\t\t></rect>\n\t\t\t\t\t\t\t<rect class=\"border\" x=\"1\" y=\"1\" height=\"10\" rx=\"5\" fill=\"currentColor\" stroke=\"currentColor\" stroke-width=\"1\" width=\"100\"></rect>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t<text aria-hidden=\"true\" text-anchor=\"middle\" dominant-baseline=\"central\" fill=\"currentColor\">\n\t\t\t\t\t\t\t{state._value}\n\t\t\t\t\t\t\t{state._unit}\n\t\t\t\t\t\t</text>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t);\n\t}\n};\n\n@Component({\n\ttag: 'kol-progress',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolProcess implements KoliBriProgressAPI {\n\tprivate interval?: NodeJS.Timer;\n\n\t// https://dequeuniversity.com/library/aria/progress-bar-bounded\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t{createProgressSVG(this.state)}\n\t\t\t\t<progress aria-busy={this.state._value < this.state._max ? 'true' : 'false'} max={this.state._max} value={this.state._value}></progress>\n\t\t\t\t<span aria-live=\"polite\" aria-relevant=\"removals text\" hidden>\n\t\t\t\t\t{this.state._liveValue} von {this.state._max} {this.state._unit}\n\t\t\t\t</span>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Setzt die sichtbare oder semantische Beschriftung der Komponente (z.B. Aria-Label, Label, Headline, Caption, Summary usw.).\n\t */\n\t@Prop() public _label?: string;\n\n\t/**\n\t * Gibt an, bei welchem Wert die Fortschrittsanzeige abgeschlossen ist.\n\t */\n\t@Prop() public _max!: number;\n\n\t/**\n\t * Deprecated: Gibt an, ob der Prozess als Balken oder Kreis dargestellt wird.\n\t * @deprecated will be removed in v2, use _variant\n\t */\n\t@Prop() public _type?: KoliBriProgressType;\n\n\t/**\n\t * Setzt die Einheit der Fortschrittswerte. (wird nicht angezeigt)\n\t */\n\t@Prop() public _unit?: string = '%';\n\n\t/**\n\t * Gibt an, wie weit die Anzeige fortgeschritten ist.\n\t */\n\t@Prop() public _value!: number;\n\n\t/**\n\t * Gibt an, welche Variante der Darstellung genutzt werden soll.\n\t */\n\t@Prop() public _variant?: KoliBriProgressType;\n\n\t@State() public state: KoliBriProgressStates = {\n\t\t_max: 100,\n\t\t_unit: '%',\n\t\t_value: 0,\n\t\t_variant: 'bar',\n\t\t_liveValue: 0,\n\t};\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: string): void {\n\t\tvalidateLabel(this, value);\n\t}\n\n\t@Watch('_max')\n\tpublic validateMax(value?: number): void {\n\t\tif (typeof value !== 'number') {\n\t\t\tvalue = 100;\n\t\t}\n\t\twatchNumber(this, '_max', value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\t// @deprecated remove with v2\n\t@Watch('_type')\n\tpublic validateType(value?: KoliBriProgressType): void {\n\t\tthis.validateVariant(value);\n\t}\n\n\t@Watch('_unit')\n\tpublic validateUnit(value?: string): void {\n\t\twatchString(this, '_unit', value);\n\t}\n\n\t@Watch('_value')\n\tpublic validateValue(value?: number): void {\n\t\tif (typeof value !== 'number') {\n\t\t\tvalue = 0;\n\t\t}\n\t\twatchNumber(this, '_value', value, {\n\t\t\t// max: this._max, TODO as Function\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\t@Watch('_variant')\n\tpublic validateVariant(value?: KoliBriProgressType): void {\n\t\twatchValidator(this, '_variant', (value) => typeof value === 'string' && VALID_VARIANTS.includes(value), new Set(VALID_VARIANTS), value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateLabel(this._label);\n\t\tthis.validateMax(this._max);\n\t\tthis.validateUnit(this._unit);\n\t\tthis.validateValue(this._value);\n\t\tthis.validateVariant(this._variant || this._type);\n\n\t\tthis.interval = setInterval(() => {\n\t\t\tif (this.state._liveValue !== this.state._value) {\n\t\t\t\tthis.state = {\n\t\t\t\t\t...this.state,\n\t\t\t\t\t_liveValue: this.state._value,\n\t\t\t\t};\n\t\t\t}\n\t\t}, 5000);\n\t}\n\n\tpublic disconnectedCallback(): void {\n\t\tclearInterval(this.interval);\n\t}\n}\n"],"mappings":";;;kRAAA,IAAYA,GAAZ,SAAYA,GACXA,EAAA,aACAA,EAAA,iBACAA,EAAA,yCACAA,EAAA,wCACA,EALD,CAAYA,MAA0B,KCAtC,MAAMC,EAAkB,swCCQxB,MAAMC,EAAiBC,OAAOC,KAAKJ,GAGnC,MAAMK,EAAqBC,IAC1B,MAAMC,EAAa,IACnB,MAAMC,EAAkB,MACxB,MAAMC,EAAqB,MAE3B,IAAIC,EAASF,EACb,IAAIG,EAASL,EAAMM,OAASH,EAAqB,MACjD,OAAQH,EAAMO,UACb,IAAK,oBACJ,GAAIP,EAAMM,OAAQ,CACjBF,EAASD,EACTE,EAASH,C,CAGX,IAAK,QACL,IAAK,oBACJ,OACCM,EAAA,OAAKC,MAAM,QAAQC,MAAM,MAAMC,QAAQ,cAAcC,MAAM,8BAC1DJ,EAAA,UAAQC,MAAM,aAAaI,GAAG,KAAKC,GAAG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GAAiBwC,E,CAG5Hc,oBACNhB,KAAKI,cAAcJ,KAAK5B,QACxB4B,KAAKK,YAAYL,KAAKb,MACtBa,KAAKU,aAAaV,KAAKV,OACvBU,KAAKY,cAAcZ,KAAKd,QACxBc,KAAKS,gBAAgBT,KAAK3B,UAAY2B,KAAKiB,OAE3CjB,KAAKkB,SAAWC,aAAY,KAC3B,GAAInB,KAAKlC,MAAM+B,aAAeG,KAAKlC,MAAMoB,OAAQ,CAChDc,KAAKlC,MAAKH,OAAAyD,OAAAzD,OAAAyD,OAAA,GACNpB,KAAKlC,OAAK,CACb+B,WAAYG,KAAKlC,MAAMoB,Q,IAGvB,I,CAGGmC,uBACNC,cAActB,KAAKkB,S"}
|
|
1
|
+
{"version":3,"names":["KoliBriProgressVariantEnum","defaultStyleCss","VALID_VARIANTS","Object","keys","createProgressSVG","state","fullCircle","textPositionTop","textPositionBottom","labelY","valueY","_label","_variant","h","class","width","viewBox","xmlns","cx","cy","r","fill","stroke","Math","round","_value","_max","x","y","_unit","style","display","gap","height","rx","KolProcess","_liveValue","render","Host","this","max","value","hidden","validateLabel","validateMax","watchNumber","required","validateType","validateVariant","validateUnit","watchString","validateValue","watchValidator","includes","Set","componentWillLoad","_type","interval","setInterval","assign","disconnectedCallback","clearInterval"],"sources":["src/types/progress.ts","src/components/progress/style.css?tag=kol-progress&mode=default&encapsulation=shadow","src/components/progress/component.tsx"],"sourcesContent":["export enum KoliBriProgressVariantEnum {\n\t'bar' = 'bar',\n\t'cycle' = 'cycle',\n\t'cycle-value-label' = 'cycle-value-label',\n\t'cycle-label-value' = 'cycle-label-value',\n}\n\nexport type KoliBriProgressVariantType = `${KoliBriProgressVariantEnum}`;\n","@import url(../style.css);\nprogress {\n\tdisplay: block;\n\theight: 0;\n\toverflow: hidden;\n\twidth: 0;\n}\n.bar .border {\n\tfill: transparent;\n\tstroke: black;\n}\n.bar .background {\n\tfill: lightgray;\n\tstroke: white;\n}\n.bar .progress {\n\tfill: #0075ff;\n\tstroke: transparent;\n\ttransition: 250ms ease-in-out 50ms;\n}\n.cycle .background {\n\tfill: transparent;\n\tstroke: lightgray;\n}\n.cycle .border {\n\tfill: transparent;\n\tstroke: black;\n}\n.cycle .whitespace {\n\tfill: transparent;\n\tstroke: white;\n}\n.cycle .progress {\n\tfill: transparent;\n\tstroke: #0075ff;\n\ttransform-origin: 50% 50%;\n\ttransform: rotate(-90deg);\n\ttransition: 250ms ease-in-out 50ms;\n}\n/* https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion */\n@media (prefers-reduced-motion) {\n\t.progress {\n\t\ttransition-duration: 0s;\n\t\ttransition-delay: 0s;\n\t}\n}\n","import { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { watchNumber, watchString, watchValidator } from '../../utils/prop.validators';\nimport { KoliBriProgressAPI, KoliBriProgressStates } from './types';\nimport { validateLabel } from '../../types/props';\nimport { KoliBriProgressVariantEnum, KoliBriProgressVariantType } from '../../types/progress';\n\nconst VALID_VARIANTS = Object.keys(KoliBriProgressVariantEnum);\n\n// https://css-tricks.com/html5-progress-element/\nconst createProgressSVG = (state: KoliBriProgressStates): JSX.Element => {\n\tconst fullCircle = 342;\n\tconst textPositionTop = '43%';\n\tconst textPositionBottom = '57%';\n\n\tlet labelY = textPositionTop;\n\tlet valueY = state._label ? textPositionBottom : '50%';\n\tswitch (state._variant) {\n\t\tcase 'cycle-value-label':\n\t\t\tif (state._label) {\n\t\t\t\tlabelY = textPositionBottom;\n\t\t\t\tvalueY = textPositionTop;\n\t\t\t}\n\t\t// eslint-disable-next-line no-fallthrough\n\t\tcase 'cycle':\n\t\tcase 'cycle-label-value':\n\t\t\treturn (\n\t\t\t\t<svg class=\"cycle\" width=\"100\" viewBox=\"0 0 120 120\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t\t\t<circle class=\"background\" cx=\"60\" cy=\"60\" r=\"54.5\" fill=\"currentColor\" stroke=\"currentColor\" stroke-width=\"8\"></circle>\n\t\t\t\t\t<circle class=\"whitespace\" cx=\"60\" cy=\"60\" r=\"59\" fill=\"currentColor\" stroke=\"currentColor\" stroke-width=\"3\"></circle>\n\t\t\t\t\t<circle class=\"border\" cx=\"60\" cy=\"60\" r=\"59\" fill=\"currentColor\" stroke=\"currentColor\" stroke-width=\"1\"></circle>\n\t\t\t\t\t<circle class=\"whitespace\" cx=\"60\" cy=\"60\" r=\"51\" fill=\"currentColor\" stroke=\"currentColor\" stroke-width=\"1\"></circle>\n\t\t\t\t\t<circle class=\"border\" cx=\"60\" cy=\"60\" r=\"50\" fill=\"currentColor\" stroke=\"currentColor\" stroke-width=\"1\"></circle>\n\t\t\t\t\t<circle\n\t\t\t\t\t\tclass=\"progress\"\n\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\tstroke-dasharray={`${Math.round((state._value / state._max) * fullCircle)}px ${fullCircle}px`}\n\t\t\t\t\t\tstroke-width=\"6\"\n\t\t\t\t\t\tcx=\"60\"\n\t\t\t\t\t\tcy=\"60\"\n\t\t\t\t\t\tr=\"54.5\"\n\t\t\t\t\t></circle>\n\t\t\t\t\t{state._label && (\n\t\t\t\t\t\t<text aria-hidden=\"true\" x=\"50%\" y={labelY} text-anchor=\"middle\" fill=\"currentColor\">\n\t\t\t\t\t\t\t{state._label}\n\t\t\t\t\t\t</text>\n\t\t\t\t\t)}\n\t\t\t\t\t<text aria-hidden=\"true\" x=\"50%\" y={valueY} text-anchor=\"middle\" fill=\"currentColor\">\n\t\t\t\t\t\t{state._value}\n\t\t\t\t\t\t{state._unit}\n\t\t\t\t\t</text>\n\t\t\t\t</svg>\n\t\t\t);\n\t\tdefault:\n\t\t\treturn (\n\t\t\t\t<div class=\"bar\">\n\t\t\t\t\t{state._label && <div>{state._label}</div>}\n\t\t\t\t\t<div style={{ display: 'flex', gap: '0.3em' }}>\n\t\t\t\t\t\t<svg width=\"100\" viewBox=\"0 0 102 8\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t\t\t\t\t<rect class=\"background\" x=\"1\" y=\"1\" height=\"10\" rx=\"5\" fill=\"currentColor\" stroke=\"currentColor\" stroke-width=\"3\" width=\"100\"></rect>\n\t\t\t\t\t\t\t<rect\n\t\t\t\t\t\t\t\tclass=\"progress\"\n\t\t\t\t\t\t\t\tx=\"2.5\"\n\t\t\t\t\t\t\t\ty=\"2.5\"\n\t\t\t\t\t\t\t\theight=\"7\"\n\t\t\t\t\t\t\t\trx=\"3.5\"\n\t\t\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\tstroke-width=\"3\"\n\t\t\t\t\t\t\t\twidth={95 * (state._value / state._max)}\n\t\t\t\t\t\t\t></rect>\n\t\t\t\t\t\t\t<rect class=\"border\" x=\"1\" y=\"1\" height=\"10\" rx=\"5\" fill=\"currentColor\" stroke=\"currentColor\" stroke-width=\"1\" width=\"100\"></rect>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t<text aria-hidden=\"true\" text-anchor=\"middle\" dominant-baseline=\"central\" fill=\"currentColor\">\n\t\t\t\t\t\t\t{state._value}\n\t\t\t\t\t\t\t{state._unit}\n\t\t\t\t\t\t</text>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t);\n\t}\n};\n\n@Component({\n\ttag: 'kol-progress',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolProcess implements KoliBriProgressAPI {\n\tprivate interval?: NodeJS.Timer;\n\n\t// https://dequeuniversity.com/library/aria/progress-bar-bounded\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t{createProgressSVG(this.state)}\n\t\t\t\t<progress aria-busy={this.state._value < this.state._max ? 'true' : 'false'} max={this.state._max} value={this.state._value}></progress>\n\t\t\t\t<span aria-live=\"polite\" aria-relevant=\"removals text\" hidden>\n\t\t\t\t\t{this.state._liveValue} von {this.state._max} {this.state._unit}\n\t\t\t\t</span>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Setzt die sichtbare oder semantische Beschriftung der Komponente (z.B. Aria-Label, Label, Headline, Caption, Summary usw.).\n\t */\n\t@Prop() public _label?: string;\n\n\t/**\n\t * Gibt an, bei welchem Wert die Fortschrittsanzeige abgeschlossen ist.\n\t */\n\t@Prop() public _max!: number;\n\n\t/**\n\t * Deprecated: Gibt an, ob der Prozess als Balken oder Kreis dargestellt wird.\n\t * @deprecated will be removed in v2, use _variant\n\t */\n\t@Prop() public _type?: KoliBriProgressVariantType;\n\n\t/**\n\t * Setzt die Einheit der Fortschrittswerte. (wird nicht angezeigt)\n\t */\n\t@Prop() public _unit?: string = '%';\n\n\t/**\n\t * Gibt an, wie weit die Anzeige fortgeschritten ist.\n\t */\n\t@Prop() public _value!: number;\n\n\t/**\n\t * Gibt an, welche Variante der Darstellung genutzt werden soll.\n\t */\n\t@Prop() public _variant?: KoliBriProgressVariantType;\n\n\t@State() public state: KoliBriProgressStates = {\n\t\t_max: 100,\n\t\t_unit: '%',\n\t\t_value: 0,\n\t\t_variant: 'bar',\n\t\t_liveValue: 0,\n\t};\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: string): void {\n\t\tvalidateLabel(this, value);\n\t}\n\n\t@Watch('_max')\n\tpublic validateMax(value?: number): void {\n\t\tif (typeof value !== 'number') {\n\t\t\tvalue = 100;\n\t\t}\n\t\twatchNumber(this, '_max', value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\t// @deprecated remove with v2\n\t@Watch('_type')\n\tpublic validateType(value?: KoliBriProgressVariantType): void {\n\t\tthis.validateVariant(value);\n\t}\n\n\t@Watch('_unit')\n\tpublic validateUnit(value?: string): void {\n\t\twatchString(this, '_unit', value);\n\t}\n\n\t@Watch('_value')\n\tpublic validateValue(value?: number): void {\n\t\tif (typeof value !== 'number') {\n\t\t\tvalue = 0;\n\t\t}\n\t\twatchNumber(this, '_value', value, {\n\t\t\t// max: this._max, TODO as Function\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\t@Watch('_variant')\n\tpublic validateVariant(value?: KoliBriProgressVariantType): void {\n\t\twatchValidator(this, '_variant', (value) => typeof value === 'string' && VALID_VARIANTS.includes(value), new Set(VALID_VARIANTS), value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateLabel(this._label);\n\t\tthis.validateMax(this._max);\n\t\tthis.validateUnit(this._unit);\n\t\tthis.validateValue(this._value);\n\t\tthis.validateVariant(this._variant || this._type);\n\n\t\tthis.interval = setInterval(() => {\n\t\t\tif (this.state._liveValue !== this.state._value) {\n\t\t\t\tthis.state = {\n\t\t\t\t\t...this.state,\n\t\t\t\t\t_liveValue: this.state._value,\n\t\t\t\t};\n\t\t\t}\n\t\t}, 5000);\n\t}\n\n\tpublic disconnectedCallback(): void {\n\t\tclearInterval(this.interval);\n\t}\n}\n"],"mappings":";;;kRAAA,IAAYA,GAAZ,SAAYA,GACXA,EAAA,aACAA,EAAA,iBACAA,EAAA,yCACAA,EAAA,wCACA,EALD,CAAYA,MAA0B,KCAtC,MAAMC,EAAkB,swCCOxB,MAAMC,EAAiBC,OAAOC,KAAKJ,GAGnC,MAAMK,EAAqBC,IAC1B,MAAMC,EAAa,IACnB,MAAMC,EAAkB,MACxB,MAAMC,EAAqB,MAE3B,IAAIC,EAASF,EACb,IAAIG,EAASL,EAAMM,OAASH,EAAqB,MACjD,OAAQH,EAAMO,UACb,IAAK,oBACJ,GAAIP,EAAMM,OAAQ,CACjBF,EAASD,EACTE,EAASH,C,CAGX,IAAK,QACL,IAAK,oBACJ,OACCM,EAAA,OAAKC,MAAM,QAAQC,MAAM,MAAMC,QAAQ,cAAcC,MAAM,8BAC1DJ,EAAA,UAAQC,MAAM,aAAaI,GAAG,KAAKC,GAAG,KAAKC,EAAE,OAAOC,KAAK,eAAeC,OAAO,eAAc,eAAc,MAC3GT,EAAA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KK,YAAYL,KAAKb,MACtBa,KAAKU,aAAaV,KAAKV,OACvBU,KAAKY,cAAcZ,KAAKd,QACxBc,KAAKS,gBAAgBT,KAAK3B,UAAY2B,KAAKiB,OAE3CjB,KAAKkB,SAAWC,aAAY,KAC3B,GAAInB,KAAKlC,MAAM+B,aAAeG,KAAKlC,MAAMoB,OAAQ,CAChDc,KAAKlC,MAAKH,OAAAyD,OAAAzD,OAAAyD,OAAA,GACNpB,KAAKlC,OAAK,CACb+B,WAAYG,KAAKlC,MAAMoB,Q,IAGvB,I,CAGGmC,uBACNC,cAActB,KAAKkB,S"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{p as e,b as a}from"./index-2c046ff1.js";export{s as setNonce}from"./index-2c046ff1.js";import{g as _}from"./app-globals-8254f2e8.js";import"./index-4e5a5ff3.js";import"./index-37b5cbcf.js";import"./dev.utils-8aef00f6.js";import"./reuse-c2156413.js";const l=()=>{const a=import.meta.url,_={};return""!==a&&(_.resourcesUrl=new URL(".",a).href),e(_)};l().then((e=>(_(),a(JSON.parse('[["kol-table",[[33,"kol-table",{"_caption":[1],"_data":[1],"_dataFoot":[1,"_data-foot"],"_headers":[1],"_minWidth":[1,"_min-width"],"_pagination":[8],"state":[32]}]]],["kol-input-adapter-leanup",[[1,"kol-input-adapter-leanup"]]],["kol-input-radio-group",[[1,"kol-input-radio-group",{"_accessKey":[1,"_access-key"],"_alert":[4],"_disabled":[4],"_error":[1],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_id":[1],"_label":[1],"_list":[1],"_name":[1],"_on":[16],"_orientation":[1],"_required":[4],"_tabIndex":[2,"_tab-index"],"_touched":[4],"_value":[8]}]]],["kol-input-checkbox",[[33,"kol-input-checkbox",{"_accessKey":[1,"_access-key"],"_alert":[1540],"_checked":[1540],"_disabled":[4],"_error":[1],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_icon":[1],"_id":[1],"_indeterminate":[1540],"_label":[1],"_name":[1],"_on":[16],"_required":[4],"_syncValueBySelector":[1,"_sync-value-by-selector"],"_tabIndex":[2,"_tab-index"],"_touched":[1540],"_type":[1],"_value":[1],"_variant":[1],"state":[32]}]]],["kol-input-color",[[33,"kol-input-color",{"_accessKey":[1,"_access-key"],"_alert":[1540],"_autoComplete":[1,"_auto-complete"],"_disabled":[4],"_error":[1],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_icon":[1],"_id":[1],"_label":[1],"_list":[1],"_name":[1],"_on":[16],"_smartButton":[16],"_syncValueBySelector":[1,"_sync-value-by-selector"],"_tabIndex":[2,"_tab-index"],"_touched":[1540],"_value":[1],"state":[32]}]]],["kol-input-date",[[33,"kol-input-date",{"_accessKey":[1,"_access-key"],"_alert":[1540],"_autoComplete":[1,"_auto-complete"],"_disabled":[4],"_error":[1],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_icon":[1],"_id":[1],"_label":[1],"_list":[1],"_max":[1],"_min":[1],"_name":[1],"_on":[16],"_readOnly":[4,"_read-only"],"_required":[4],"_smartButton":[16],"_syncValueBySelector":[1,"_sync-value-by-selector"],"_step":[2],"_tabIndex":[2,"_tab-index"],"_touched":[1540],"_type":[1],"_value":[1025],"state":[32]}]]],["kol-input-email",[[33,"kol-input-email",{"_accessKey":[1,"_access-key"],"_alert":[1540],"_autoComplete":[1,"_auto-complete"],"_disabled":[4],"_error":[1],"_hasCounter":[4,"_has-counter"],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_icon":[1],"_id":[1],"_label":[1],"_list":[1],"_maxLength":[2,"_max-length"],"_multiple":[4],"_name":[1],"_on":[16],"_pattern":[1],"_placeholder":[1],"_readOnly":[4,"_read-only"],"_required":[4],"_size":[2],"_smartButton":[16],"_syncValueBySelector":[1,"_sync-value-by-selector"],"_tabIndex":[2,"_tab-index"],"_touched":[1540],"_value":[1],"state":[32]}]]],["kol-input-file",[[33,"kol-input-file",{"_accept":[1],"_accessKey":[1,"_access-key"],"_alert":[1540],"_disabled":[4],"_error":[1],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_icon":[1],"_id":[1],"_label":[1],"_multiple":[4],"_name":[1],"_on":[16],"_required":[4],"_smartButton":[16],"_syncValueBySelector":[1,"_sync-value-by-selector"],"_tabIndex":[2,"_tab-index"],"_touched":[1540],"_value":[1],"state":[32]}]]],["kol-input-number",[[33,"kol-input-number",{"_accessKey":[1,"_access-key"],"_alert":[1540],"_autoComplete":[1,"_auto-complete"],"_disabled":[4],"_error":[1],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_icon":[1],"_id":[1],"_label":[1],"_list":[1],"_max":[8],"_min":[8],"_name":[1],"_on":[16],"_placeholder":[1],"_readOnly":[4,"_read-only"],"_required":[4],"_smartButton":[16],"_step":[2],"_syncValueBySelector":[1,"_sync-value-by-selector"],"_tabIndex":[2,"_tab-index"],"_touched":[1540],"_type":[1],"_value":[1032],"state":[32]}]]],["kol-input-password",[[33,"kol-input-password",{"_accessKey":[1,"_access-key"],"_alert":[1540],"_autoComplete":[1,"_auto-complete"],"_disabled":[4],"_error":[1],"_hasCounter":[4,"_has-counter"],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_icon":[1],"_id":[1],"_label":[1],"_maxLength":[2,"_max-length"],"_name":[1],"_on":[16],"_pattern":[1],"_placeholder":[1],"_readOnly":[4,"_read-only"],"_required":[4],"_size":[2],"_smartButton":[16],"_syncValueBySelector":[1,"_sync-value-by-selector"],"_tabIndex":[2,"_tab-index"],"_touched":[1540],"_value":[1],"state":[32]}]]],["kol-input-range",[[33,"kol-input-range",{"_accessKey":[1,"_access-key"],"_alert":[1540],"_autoComplete":[1,"_auto-complete"],"_disabled":[4],"_error":[1],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_icon":[1],"_id":[1],"_label":[1],"_list":[1],"_max":[2],"_min":[2],"_name":[1],"_on":[16],"_step":[2],"_syncValueBySelector":[1,"_sync-value-by-selector"],"_tabIndex":[2,"_tab-index"],"_touched":[1540],"_value":[2],"state":[32]}]]],["kol-input-text",[[33,"kol-input-text",{"_accessKey":[1,"_access-key"],"_alert":[1540],"_autoComplete":[1,"_auto-complete"],"_disabled":[4],"_error":[1],"_hasCounter":[4,"_has-counter"],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_icon":[1],"_id":[1],"_label":[1],"_list":[1],"_maxLength":[2,"_max-length"],"_name":[1],"_on":[16],"_pattern":[1],"_placeholder":[1],"_readOnly":[4,"_read-only"],"_required":[4],"_size":[2],"_smartButton":[16],"_syncValueBySelector":[1,"_sync-value-by-selector"],"_tabIndex":[2,"_tab-index"],"_touched":[1540],"_type":[1],"_value":[1025],"state":[32]}]]],["kol-textarea",[[33,"kol-textarea",{"_accessKey":[1,"_access-key"],"_adjustHeight":[4,"_adjust-height"],"_alert":[1540],"_disabled":[4],"_error":[1],"_hasCounter":[4,"_has-counter"],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_id":[1],"_label":[1],"_maxLength":[2,"_max-length"],"_name":[1],"_on":[16],"_placeholder":[1],"_readOnly":[4,"_read-only"],"_resize":[1],"_required":[4],"_rows":[1026],"_syncValueBySelector":[1,"_sync-value-by-selector"],"_tabIndex":[2,"_tab-index"],"_touched":[1540],"_value":[1],"state":[32]}]]],["kol-nav",[[33,"kol-nav",{"_ariaCurrentValue":[8,"_aria-current-value"],"_ariaLabel":[1,"_aria-label"],"_collapsible":[4],"_compact":[4],"_hasCompactButton":[4,"_has-compact-button"],"_label":[1],"_links":[1],"_orientation":[1],"_variant":[1],"state":[32]}]]],["kol-toast",[[33,"kol-toast",{"_alert":[4],"_hasCloser":[4,"_has-closer"],"_heading":[1],"_level":[2],"_on":[16],"_show":[1540],"_showDuration":[2,"_show-duration"],"_type":[1],"state":[32]}]]],["kol-link-group",[[33,"kol-link-group",{"_ariaLabel":[1,"_aria-label"],"_listStyleType":[1,"_list-style-type"],"_heading":[1],"_label":[1],"_level":[2],"_links":[1],"_ordered":[4],"_orientation":[1],"state":[32]}]]],["kol-accordion",[[33,"kol-accordion",{"_heading":[1],"_level":[2],"_on":[16],"_open":[1540],"state":[32]}]]],["kol-breadcrumb",[[33,"kol-breadcrumb",{"_ariaLabel":[1,"_aria-label"],"_label":[1],"_links":[1],"state":[32]}]]],["kol-quote",[[33,"kol-quote",{"_caption":[1],"_href":[1],"_quote":[1],"_variant":[1],"state":[32]}]]],["kol-tabs",[[33,"kol-tabs",{"_ariaLabel":[1,"_aria-label"],"_label":[1],"_on":[16],"_selected":[1538],"_tabs":[1],"_tabsAlign":[1,"_tabs-align"],"state":[32]}]]],["kol-version",[[33,"kol-version",{"_label":[1],"_version":[1],"state":[32]}]]],["kol-button-link",[[33,"kol-button-link",{"_accessKey":[1,"_access-key"],"_ariaControls":[1,"_aria-controls"],"_ariaCurrent":[8,"_aria-current"],"_ariaExpanded":[4,"_aria-expanded"],"_ariaLabel":[1025,"_aria-label"],"_ariaSelected":[4,"_aria-selected"],"_disabled":[4],"_hideLabel":[4,"_hide-label"],"_icon":[1],"_iconOnly":[4,"_icon-only"],"_id":[1],"_label":[1],"_on":[16],"_role":[1],"_tabIndex":[2,"_tab-index"],"_tooltipAlign":[1,"_tooltip-align"],"_type":[1],"_value":[16]}]]],["kol-link-button",[[33,"kol-link-button",{"_ariaControls":[1,"_aria-controls"],"_ariaCurrent":[8,"_aria-current"],"_ariaExpanded":[4,"_aria-expanded"],"_ariaLabel":[1,"_aria-label"],"_ariaSelected":[4,"_aria-selected"],"_customClass":[1,"_custom-class"],"_disabled":[4],"_download":[8],"_hideLabel":[4,"_hide-label"],"_href":[1],"_icon":[1],"_iconOnly":[4,"_icon-only"],"_label":[1],"_on":[16],"_role":[1],"_tabIndex":[2,"_tab-index"],"_target":[1],"_targetDescription":[1,"_target-description"],"_tooltipAlign":[1,"_tooltip-align"],"_variant":[1]}]]],["kol-skip-nav",[[33,"kol-skip-nav",{"_ariaLabel":[1,"_aria-label"],"_label":[1],"_links":[1],"state":[32]}]]],["kol-split-button",[[33,"kol-split-button",{"_accessKey":[1,"_access-key"],"_ariaControls":[1,"_aria-controls"],"_ariaCurrent":[8,"_aria-current"],"_ariaExpanded":[4,"_aria-expanded"],"_ariaLabel":[1025,"_aria-label"],"_ariaSelected":[4,"_aria-selected"],"_customClass":[1,"_custom-class"],"_disabled":[4],"_hideLabel":[4,"_hide-label"],"_icon":[1],"_iconOnly":[4,"_icon-only"],"_label":[1025],"_on":[16],"_role":[1],"_showDropdown":[1540,"_show-dropdown"],"_tabIndex":[2,"_tab-index"],"_tooltipAlign":[1,"_tooltip-align"],"_type":[1],"_value":[16],"_variant":[1],"state":[32]}]]],["kol-abbr",[[33,"kol-abbr",{"_tooltipAlign":[1,"_tooltip-align"],"_title":[1],"state":[32]}]]],["kol-details",[[33,"kol-details",{"_open":[1540],"_summary":[1],"state":[32]}]]],["kol-span",[[33,"kol-span",{"_hideLabel":[4,"_hide-label"],"_icon":[1],"_iconOnly":[4,"_icon-only"],"_label":[1]}]]],["kol-button-group",[[33,"kol-button-group"]]],["kol-card",[[33,"kol-card",{"_hasFooter":[4,"_has-footer"],"_heading":[1],"_headline":[1],"_level":[2],"state":[32]}]]],["kol-form",[[1,"kol-form",{"_on":[16],"_requiredText":[8,"_required-text"],"state":[32]}]]],["kol-heading",[[33,"kol-heading",{"_label":[1],"_level":[2],"_secondaryHeadline":[1,"_secondary-headline"]}]]],["kol-icon-font-awesome",[[0,"kol-icon-font-awesome",{"_ariaLabel":[1,"_aria-label"],"_icon":[1],"_prefix":[1],"_part":[1]}]]],["kol-image",[[33,"kol-image",{"_alt":[1],"_loading":[1],"_sizes":[1],"_src":[1],"_srcset":[1],"state":[32]}]]],["kol-kolibri",[[33,"kol-kolibri",{"_animate":[4],"_color":[1],"_labeled":[4],"state":[32]}]]],["kol-logo",[[33,"kol-logo",{"_abbr":[1],"_org":[1],"state":[32]}]]],["kol-modal",[[33,"kol-modal",{"_activeElement":[1040],"_ariaLabel":[1,"_aria-label"],"_label":[1],"_on":[16],"_width":[1],"state":[32]}]]],["kol-popover",[[4,"kol-popover",{"_align":[1],"_show":[1540],"state":[32]}]]],["kol-progress",[[33,"kol-progress",{"_label":[1],"_max":[2],"_type":[8],"_unit":[1],"_value":[2],"_variant":[8],"state":[32]}]]],["kol-spin",[[33,"kol-spin",{"_show":[4],"_variant":[1],"state":[32]}]]],["kol-button-group-wc",[[4,"kol-button-group-wc",{"state":[32]}]]],["kol-icon",[[33,"kol-icon",{"_ariaLabel":[1,"_aria-label"],"_icon":[1],"_label":[1],"_part":[1],"state":[32]}]]],["kol-icon-icofont",[[0,"kol-icon-icofont",{"_ariaLabel":[1,"_aria-label"],"_icon":[1],"_part":[1]}]]],["kol-symbol",[[0,"kol-symbol",{"_ariaLabel":[1,"_aria-label"],"_label":[1],"_symbol":[1],"state":[32]}]]],["kol-span-wc",[[4,"kol-span-wc",{"_hideLabel":[4,"_hide-label"],"_icon":[1],"_iconOnly":[4,"_icon-only"],"_label":[1],"state":[32]}]]],["kol-tooltip",[[0,"kol-tooltip",{"_align":[1],"_id":[1],"_label":[1],"state":[32]}]]],["kol-button-wc_2",[[4,"kol-heading-wc",{"_label":[1],"_level":[2],"_secondaryHeadline":[1,"_secondary-headline"],"state":[32]}],[4,"kol-button-wc",{"_accessKey":[1,"_access-key"],"_ariaControls":[1,"_aria-controls"],"_ariaCurrent":[8,"_aria-current"],"_ariaExpanded":[4,"_aria-expanded"],"_ariaLabel":[1,"_aria-label"],"_ariaSelected":[4,"_aria-selected"],"_customClass":[1,"_custom-class"],"_disabled":[4],"_hideLabel":[4,"_hide-label"],"_icon":[1],"_iconAlign":[1,"_icon-align"],"_iconOnly":[4,"_icon-only"],"_id":[1],"_label":[1],"_on":[16],"_role":[1],"_tabIndex":[2,"_tab-index"],"_tooltipAlign":[1,"_tooltip-align"],"_type":[1],"_value":[16],"_variant":[1],"state":[32]}]]],["kol-pagination",[[33,"kol-pagination",{"_boundaryCount":[2,"_boundary-count"],"_customClass":[1,"_custom-class"],"_hasButtons":[8,"_has-buttons"],"_page":[2],"_pageSize":[1026,"_page-size"],"_pageSizeOptions":[1,"_page-size-options"],"_on":[16],"_siblingCount":[2,"_sibling-count"],"_tooltipAlign":[1,"_tooltip-align"],"_total":[2],"_variant":[1],"state":[32]}]]],["kol-input-radio",[[33,"kol-input-radio",{"_accessKey":[1,"_access-key"],"_alert":[1540],"_disabled":[4],"_error":[1],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_id":[1],"_label":[1],"_list":[1],"_name":[1],"_on":[16],"_orientation":[1],"_required":[4],"_syncValueBySelector":[1,"_sync-value-by-selector"],"_tabIndex":[2,"_tab-index"],"_touched":[1540],"_value":[8],"state":[32]}]]],["kol-button-link-text-switch",[[0,"kol-button-link-text-switch",{"_ariaCurrentValue":[8,"_aria-current-value"],"_hasChildren":[4,"_has-children"],"_link":[16],"_hideLabel":[4,"_hide-label"],"_selected":[4]}]]],["kol-badge",[[33,"kol-badge",{"_color":[1],"_hideLabel":[4,"_hide-label"],"_icon":[1],"_iconOnly":[4,"_icon-only"],"_label":[1],"_smartButton":[1,"_smart-button"],"state":[32]}]]],["kol-select",[[33,"kol-select",{"_accessKey":[1,"_access-key"],"_alert":[1540],"_disabled":[4],"_error":[1],"_height":[1],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_icon":[1],"_id":[1],"_label":[1],"_list":[1],"_multiple":[4],"_name":[1],"_on":[16],"_required":[4],"_size":[2],"_syncValueBySelector":[1,"_sync-value-by-selector"],"_tabIndex":[2,"_tab-index"],"_touched":[1540],"_value":[1025],"state":[32]}]]],["kol-indented-text",[[33,"kol-indented-text",{"state":[32]}]]],["kol-button",[[33,"kol-button",{"_accessKey":[1,"_access-key"],"_ariaControls":[1,"_aria-controls"],"_ariaCurrent":[8,"_aria-current"],"_ariaExpanded":[4,"_aria-expanded"],"_ariaLabel":[1,"_aria-label"],"_ariaSelected":[4,"_aria-selected"],"_customClass":[1,"_custom-class"],"_disabled":[4],"_hideLabel":[4,"_hide-label"],"_icon":[1],"_iconAlign":[1,"_icon-align"],"_iconOnly":[4,"_icon-only"],"_id":[1],"_label":[1],"_on":[16],"_role":[1],"_tabIndex":[2,"_tab-index"],"_tooltipAlign":[1,"_tooltip-align"],"_type":[1],"_value":[16],"_variant":[1]}]]],["kol-link-wc",[[4,"kol-link-wc",{"_ariaControls":[1,"_aria-controls"],"_ariaCurrent":[8,"_aria-current"],"_ariaExpanded":[4,"_aria-expanded"],"_ariaLabel":[1,"_aria-label"],"_ariaSelected":[4,"_aria-selected"],"_disabled":[4],"_download":[8],"_hideLabel":[4,"_hide-label"],"_href":[1],"_icon":[1],"_iconAlign":[1,"_icon-align"],"_iconOnly":[4,"_icon-only"],"_label":[1],"_on":[16],"_role":[1],"_selector":[1],"_stealth":[4],"_tabIndex":[2,"_tab-index"],"_target":[1],"_targetDescription":[1,"_target-description"],"_tooltipAlign":[1,"_tooltip-align"],"_useCase":[1,"_use-case"],"state":[32]}]]],["kol-link",[[33,"kol-link",{"_ariaControls":[1,"_aria-controls"],"_ariaCurrent":[8,"_aria-current"],"_ariaExpanded":[4,"_aria-expanded"],"_ariaLabel":[1,"_aria-label"],"_ariaSelected":[4,"_aria-selected"],"_disabled":[4],"_download":[8],"_hideLabel":[4,"_hide-label"],"_href":[1],"_icon":[1],"_iconAlign":[1,"_icon-align"],"_iconOnly":[4,"_icon-only"],"_label":[1],"_on":[16],"_role":[1],"_selector":[1],"_stealth":[4],"_tabIndex":[2,"_tab-index"],"_target":[1],"_targetDescription":[1,"_target-description"],"_tooltipAlign":[1,"_tooltip-align"],"_useCase":[1,"_use-case"]}]]],["kol-alert",[[33,"kol-alert",{"_alert":[4],"_hasCloser":[4,"_has-closer"],"_heading":[1],"_level":[2],"_on":[16],"_type":[1],"_variant":[1],"state":[32]}]]],["kol-alert-wc_2",[[4,"kol-input",{"_alert":[4],"_currentLength":[2,"_current-length"],"_disabled":[4],"_error":[1],"_hasCounter":[4,"_has-counter"],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_icon":[16],"_id":[1],"_list":[1],"_maxLength":[2,"_max-length"],"_readOnly":[4,"_read-only"],"_renderNoLabel":[4,"_render-no-label"],"_required":[4],"_slotName":[1,"_slot-name"],"_smartButton":[16],"_touched":[4]}],[4,"kol-alert-wc",{"_alert":[4],"_hasCloser":[4,"_has-closer"],"_heading":[1],"_level":[2],"_on":[16],"_type":[1],"_variant":[1],"state":[32]}]]]]'),e))));
|
|
4
|
+
import{p as e,b as a}from"./index-2c046ff1.js";export{s as setNonce}from"./index-2c046ff1.js";import{g as _}from"./app-globals-8254f2e8.js";import"./index-4e5a5ff3.js";import"./index-37b5cbcf.js";import"./dev.utils-8aef00f6.js";import"./reuse-c2156413.js";const l=()=>{const a=import.meta.url,_={};return""!==a&&(_.resourcesUrl=new URL(".",a).href),e(_)};l().then((e=>(_(),a(JSON.parse('[["kol-table",[[33,"kol-table",{"_caption":[1],"_data":[1],"_dataFoot":[1,"_data-foot"],"_headers":[1],"_minWidth":[1,"_min-width"],"_pagination":[8],"state":[32]}]]],["kol-input-adapter-leanup",[[1,"kol-input-adapter-leanup"]]],["kol-input-radio-group",[[1,"kol-input-radio-group",{"_accessKey":[1,"_access-key"],"_alert":[4],"_disabled":[4],"_error":[1],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_id":[1],"_label":[1],"_list":[1],"_name":[1],"_on":[16],"_orientation":[1],"_required":[4],"_tabIndex":[2,"_tab-index"],"_touched":[4],"_value":[8]}]]],["kol-input-checkbox",[[33,"kol-input-checkbox",{"_accessKey":[1,"_access-key"],"_alert":[1540],"_checked":[1540],"_disabled":[4],"_error":[1],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_icon":[1],"_id":[1],"_indeterminate":[1540],"_label":[1],"_name":[1],"_on":[16],"_required":[4],"_syncValueBySelector":[1,"_sync-value-by-selector"],"_tabIndex":[2,"_tab-index"],"_touched":[1540],"_type":[1],"_value":[1],"_variant":[1],"state":[32]}]]],["kol-input-color",[[33,"kol-input-color",{"_accessKey":[1,"_access-key"],"_alert":[1540],"_autoComplete":[1,"_auto-complete"],"_disabled":[4],"_error":[1],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_icon":[1],"_id":[1],"_label":[1],"_list":[1],"_name":[1],"_on":[16],"_smartButton":[16],"_syncValueBySelector":[1,"_sync-value-by-selector"],"_tabIndex":[2,"_tab-index"],"_touched":[1540],"_value":[1],"state":[32]}]]],["kol-input-date",[[33,"kol-input-date",{"_accessKey":[1,"_access-key"],"_alert":[1540],"_autoComplete":[1,"_auto-complete"],"_disabled":[4],"_error":[1],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_icon":[1],"_id":[1],"_label":[1],"_list":[1],"_max":[1],"_min":[1],"_name":[1],"_on":[16],"_readOnly":[4,"_read-only"],"_required":[4],"_smartButton":[16],"_syncValueBySelector":[1,"_sync-value-by-selector"],"_step":[2],"_tabIndex":[2,"_tab-index"],"_touched":[1540],"_type":[1],"_value":[1025],"state":[32]}]]],["kol-input-email",[[33,"kol-input-email",{"_accessKey":[1,"_access-key"],"_alert":[1540],"_autoComplete":[1,"_auto-complete"],"_disabled":[4],"_error":[1],"_hasCounter":[4,"_has-counter"],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_icon":[1],"_id":[1],"_label":[1],"_list":[1],"_maxLength":[2,"_max-length"],"_multiple":[4],"_name":[1],"_on":[16],"_pattern":[1],"_placeholder":[1],"_readOnly":[4,"_read-only"],"_required":[4],"_size":[2],"_smartButton":[16],"_syncValueBySelector":[1,"_sync-value-by-selector"],"_tabIndex":[2,"_tab-index"],"_touched":[1540],"_value":[1],"state":[32]}]]],["kol-input-file",[[33,"kol-input-file",{"_accept":[1],"_accessKey":[1,"_access-key"],"_alert":[1540],"_disabled":[4],"_error":[1],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_icon":[1],"_id":[1],"_label":[1],"_multiple":[4],"_name":[1],"_on":[16],"_required":[4],"_smartButton":[16],"_syncValueBySelector":[1,"_sync-value-by-selector"],"_tabIndex":[2,"_tab-index"],"_touched":[1540],"_value":[1],"state":[32]}]]],["kol-input-number",[[33,"kol-input-number",{"_accessKey":[1,"_access-key"],"_alert":[1540],"_autoComplete":[1,"_auto-complete"],"_disabled":[4],"_error":[1],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_icon":[1],"_id":[1],"_label":[1],"_list":[1],"_max":[8],"_min":[8],"_name":[1],"_on":[16],"_placeholder":[1],"_readOnly":[4,"_read-only"],"_required":[4],"_smartButton":[16],"_step":[2],"_syncValueBySelector":[1,"_sync-value-by-selector"],"_tabIndex":[2,"_tab-index"],"_touched":[1540],"_type":[1],"_value":[1032],"state":[32]}]]],["kol-input-password",[[33,"kol-input-password",{"_accessKey":[1,"_access-key"],"_alert":[1540],"_autoComplete":[1,"_auto-complete"],"_disabled":[4],"_error":[1],"_hasCounter":[4,"_has-counter"],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_icon":[1],"_id":[1],"_label":[1],"_maxLength":[2,"_max-length"],"_name":[1],"_on":[16],"_pattern":[1],"_placeholder":[1],"_readOnly":[4,"_read-only"],"_required":[4],"_size":[2],"_smartButton":[16],"_syncValueBySelector":[1,"_sync-value-by-selector"],"_tabIndex":[2,"_tab-index"],"_touched":[1540],"_value":[1],"state":[32]}]]],["kol-input-range",[[33,"kol-input-range",{"_accessKey":[1,"_access-key"],"_alert":[1540],"_autoComplete":[1,"_auto-complete"],"_disabled":[4],"_error":[1],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_icon":[1],"_id":[1],"_label":[1],"_list":[1],"_max":[2],"_min":[2],"_name":[1],"_on":[16],"_step":[2],"_syncValueBySelector":[1,"_sync-value-by-selector"],"_tabIndex":[2,"_tab-index"],"_touched":[1540],"_value":[2],"state":[32]}]]],["kol-input-text",[[33,"kol-input-text",{"_accessKey":[1,"_access-key"],"_alert":[1540],"_autoComplete":[1,"_auto-complete"],"_disabled":[4],"_error":[1],"_hasCounter":[4,"_has-counter"],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_icon":[1],"_id":[1],"_label":[1],"_list":[1],"_maxLength":[2,"_max-length"],"_name":[1],"_on":[16],"_pattern":[1],"_placeholder":[1],"_readOnly":[4,"_read-only"],"_required":[4],"_size":[2],"_smartButton":[16],"_syncValueBySelector":[1,"_sync-value-by-selector"],"_tabIndex":[2,"_tab-index"],"_touched":[1540],"_type":[1],"_value":[1025],"state":[32]}]]],["kol-textarea",[[33,"kol-textarea",{"_accessKey":[1,"_access-key"],"_adjustHeight":[4,"_adjust-height"],"_alert":[1540],"_disabled":[4],"_error":[1],"_hasCounter":[4,"_has-counter"],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_id":[1],"_label":[1],"_maxLength":[2,"_max-length"],"_name":[1],"_on":[16],"_placeholder":[1],"_readOnly":[4,"_read-only"],"_resize":[1],"_required":[4],"_rows":[1026],"_syncValueBySelector":[1,"_sync-value-by-selector"],"_tabIndex":[2,"_tab-index"],"_touched":[1540],"_value":[1],"state":[32]}]]],["kol-nav",[[33,"kol-nav",{"_ariaCurrentValue":[8,"_aria-current-value"],"_ariaLabel":[1,"_aria-label"],"_collapsible":[4],"_compact":[4],"_hasCompactButton":[4,"_has-compact-button"],"_label":[1],"_links":[1],"_orientation":[1],"_variant":[1],"state":[32]}]]],["kol-toast",[[33,"kol-toast",{"_alert":[4],"_hasCloser":[4,"_has-closer"],"_heading":[1],"_level":[2],"_on":[16],"_show":[1540],"_showDuration":[2,"_show-duration"],"_type":[1],"state":[32]}]]],["kol-link-group",[[33,"kol-link-group",{"_ariaLabel":[1,"_aria-label"],"_listStyleType":[1,"_list-style-type"],"_heading":[1],"_label":[1],"_level":[2],"_links":[1],"_ordered":[4],"_orientation":[1],"state":[32]}]]],["kol-accordion",[[33,"kol-accordion",{"_heading":[1],"_level":[2],"_on":[16],"_open":[1540],"state":[32]}]]],["kol-breadcrumb",[[33,"kol-breadcrumb",{"_ariaLabel":[1,"_aria-label"],"_label":[1],"_links":[1],"state":[32]}]]],["kol-quote",[[33,"kol-quote",{"_caption":[1],"_href":[1],"_quote":[1],"_variant":[1],"state":[32]}]]],["kol-tabs",[[33,"kol-tabs",{"_ariaLabel":[1,"_aria-label"],"_label":[1],"_on":[16],"_selected":[1538],"_tabs":[1],"_tabsAlign":[1,"_tabs-align"],"state":[32]}]]],["kol-version",[[33,"kol-version",{"_label":[1],"_version":[1],"state":[32]}]]],["kol-button-link",[[33,"kol-button-link",{"_accessKey":[1,"_access-key"],"_ariaControls":[1,"_aria-controls"],"_ariaCurrent":[8,"_aria-current"],"_ariaExpanded":[4,"_aria-expanded"],"_ariaLabel":[1025,"_aria-label"],"_ariaSelected":[4,"_aria-selected"],"_disabled":[4],"_hideLabel":[4,"_hide-label"],"_icon":[1],"_iconOnly":[4,"_icon-only"],"_id":[1],"_label":[1],"_on":[16],"_role":[1],"_tabIndex":[2,"_tab-index"],"_tooltipAlign":[1,"_tooltip-align"],"_type":[1],"_value":[16]}]]],["kol-link-button",[[33,"kol-link-button",{"_ariaControls":[1,"_aria-controls"],"_ariaCurrent":[8,"_aria-current"],"_ariaExpanded":[4,"_aria-expanded"],"_ariaLabel":[1,"_aria-label"],"_ariaSelected":[4,"_aria-selected"],"_customClass":[1,"_custom-class"],"_disabled":[4],"_download":[8],"_hideLabel":[4,"_hide-label"],"_href":[1],"_icon":[1],"_iconOnly":[4,"_icon-only"],"_label":[1],"_on":[16],"_role":[1],"_tabIndex":[2,"_tab-index"],"_target":[1],"_targetDescription":[1,"_target-description"],"_tooltipAlign":[1,"_tooltip-align"],"_variant":[1]}]]],["kol-skip-nav",[[33,"kol-skip-nav",{"_ariaLabel":[1,"_aria-label"],"_label":[1],"_links":[1],"state":[32]}]]],["kol-split-button",[[33,"kol-split-button",{"_accessKey":[1,"_access-key"],"_ariaControls":[1,"_aria-controls"],"_ariaCurrent":[8,"_aria-current"],"_ariaExpanded":[4,"_aria-expanded"],"_ariaLabel":[1025,"_aria-label"],"_ariaSelected":[4,"_aria-selected"],"_customClass":[1,"_custom-class"],"_disabled":[4],"_hideLabel":[4,"_hide-label"],"_icon":[1],"_iconOnly":[4,"_icon-only"],"_label":[1025],"_on":[16],"_role":[1],"_showDropdown":[1540,"_show-dropdown"],"_tabIndex":[2,"_tab-index"],"_tooltipAlign":[1,"_tooltip-align"],"_type":[1],"_value":[16],"_variant":[1],"state":[32]}]]],["kol-abbr",[[33,"kol-abbr",{"_tooltipAlign":[1,"_tooltip-align"],"_title":[1],"state":[32]}]]],["kol-details",[[33,"kol-details",{"_open":[1540],"_summary":[1],"state":[32]}]]],["kol-span",[[33,"kol-span",{"_hideLabel":[4,"_hide-label"],"_icon":[1],"_iconOnly":[4,"_icon-only"],"_label":[1]}]]],["kol-button-group",[[33,"kol-button-group"]]],["kol-card",[[33,"kol-card",{"_hasFooter":[4,"_has-footer"],"_heading":[1],"_headline":[1],"_level":[2],"state":[32]}]]],["kol-form",[[1,"kol-form",{"_on":[16],"_requiredText":[8,"_required-text"],"state":[32]}]]],["kol-heading",[[33,"kol-heading",{"_label":[1],"_level":[2],"_secondaryHeadline":[1,"_secondary-headline"]}]]],["kol-icon-font-awesome",[[0,"kol-icon-font-awesome",{"_ariaLabel":[1,"_aria-label"],"_icon":[1],"_prefix":[1],"_part":[1]}]]],["kol-image",[[33,"kol-image",{"_alt":[1],"_loading":[1],"_sizes":[1],"_src":[1],"_srcset":[1],"state":[32]}]]],["kol-kolibri",[[33,"kol-kolibri",{"_animate":[4],"_color":[1],"_labeled":[4],"state":[32]}]]],["kol-logo",[[33,"kol-logo",{"_abbr":[1],"_org":[1],"state":[32]}]]],["kol-modal",[[33,"kol-modal",{"_activeElement":[1040],"_ariaLabel":[1,"_aria-label"],"_label":[1],"_on":[16],"_width":[1],"state":[32]}]]],["kol-popover",[[4,"kol-popover",{"_align":[1],"_show":[1540],"state":[32]}]]],["kol-progress",[[33,"kol-progress",{"_label":[1],"_max":[2],"_type":[1],"_unit":[1],"_value":[2],"_variant":[1],"state":[32]}]]],["kol-spin",[[33,"kol-spin",{"_show":[4],"_variant":[1],"state":[32]}]]],["kol-button-group-wc",[[4,"kol-button-group-wc",{"state":[32]}]]],["kol-icon",[[33,"kol-icon",{"_ariaLabel":[1,"_aria-label"],"_icon":[1],"_label":[1],"_part":[1],"state":[32]}]]],["kol-icon-icofont",[[0,"kol-icon-icofont",{"_ariaLabel":[1,"_aria-label"],"_icon":[1],"_part":[1]}]]],["kol-symbol",[[0,"kol-symbol",{"_ariaLabel":[1,"_aria-label"],"_label":[1],"_symbol":[1],"state":[32]}]]],["kol-span-wc",[[4,"kol-span-wc",{"_hideLabel":[4,"_hide-label"],"_icon":[1],"_iconOnly":[4,"_icon-only"],"_label":[1],"state":[32]}]]],["kol-tooltip",[[0,"kol-tooltip",{"_align":[1],"_id":[1],"_label":[1],"state":[32]}]]],["kol-button-wc_2",[[4,"kol-heading-wc",{"_label":[1],"_level":[2],"_secondaryHeadline":[1,"_secondary-headline"],"state":[32]}],[4,"kol-button-wc",{"_accessKey":[1,"_access-key"],"_ariaControls":[1,"_aria-controls"],"_ariaCurrent":[8,"_aria-current"],"_ariaExpanded":[4,"_aria-expanded"],"_ariaLabel":[1,"_aria-label"],"_ariaSelected":[4,"_aria-selected"],"_customClass":[1,"_custom-class"],"_disabled":[4],"_hideLabel":[4,"_hide-label"],"_icon":[1],"_iconAlign":[1,"_icon-align"],"_iconOnly":[4,"_icon-only"],"_id":[1],"_label":[1],"_on":[16],"_role":[1],"_tabIndex":[2,"_tab-index"],"_tooltipAlign":[1,"_tooltip-align"],"_type":[1],"_value":[16],"_variant":[1],"state":[32]}]]],["kol-pagination",[[33,"kol-pagination",{"_boundaryCount":[2,"_boundary-count"],"_customClass":[1,"_custom-class"],"_hasButtons":[8,"_has-buttons"],"_page":[2],"_pageSize":[1026,"_page-size"],"_pageSizeOptions":[1,"_page-size-options"],"_on":[16],"_siblingCount":[2,"_sibling-count"],"_tooltipAlign":[1,"_tooltip-align"],"_total":[2],"_variant":[1],"state":[32]}]]],["kol-input-radio",[[33,"kol-input-radio",{"_accessKey":[1,"_access-key"],"_alert":[1540],"_disabled":[4],"_error":[1],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_id":[1],"_label":[1],"_list":[1],"_name":[1],"_on":[16],"_orientation":[1],"_required":[4],"_syncValueBySelector":[1,"_sync-value-by-selector"],"_tabIndex":[2,"_tab-index"],"_touched":[1540],"_value":[8],"state":[32]}]]],["kol-button-link-text-switch",[[0,"kol-button-link-text-switch",{"_ariaCurrentValue":[8,"_aria-current-value"],"_hasChildren":[4,"_has-children"],"_link":[16],"_hideLabel":[4,"_hide-label"],"_selected":[4]}]]],["kol-badge",[[33,"kol-badge",{"_color":[1],"_hideLabel":[4,"_hide-label"],"_icon":[1],"_iconOnly":[4,"_icon-only"],"_label":[1],"_smartButton":[1,"_smart-button"],"state":[32]}]]],["kol-select",[[33,"kol-select",{"_accessKey":[1,"_access-key"],"_alert":[1540],"_disabled":[4],"_error":[1],"_height":[1],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_icon":[1],"_id":[1],"_label":[1],"_list":[1],"_multiple":[4],"_name":[1],"_on":[16],"_required":[4],"_size":[2],"_syncValueBySelector":[1,"_sync-value-by-selector"],"_tabIndex":[2,"_tab-index"],"_touched":[1540],"_value":[1025],"state":[32]}]]],["kol-indented-text",[[33,"kol-indented-text",{"state":[32]}]]],["kol-button",[[33,"kol-button",{"_accessKey":[1,"_access-key"],"_ariaControls":[1,"_aria-controls"],"_ariaCurrent":[8,"_aria-current"],"_ariaExpanded":[4,"_aria-expanded"],"_ariaLabel":[1,"_aria-label"],"_ariaSelected":[4,"_aria-selected"],"_customClass":[1,"_custom-class"],"_disabled":[4],"_hideLabel":[4,"_hide-label"],"_icon":[1],"_iconAlign":[1,"_icon-align"],"_iconOnly":[4,"_icon-only"],"_id":[1],"_label":[1],"_on":[16],"_role":[1],"_tabIndex":[2,"_tab-index"],"_tooltipAlign":[1,"_tooltip-align"],"_type":[1],"_value":[16],"_variant":[1]}]]],["kol-link-wc",[[4,"kol-link-wc",{"_ariaControls":[1,"_aria-controls"],"_ariaCurrent":[8,"_aria-current"],"_ariaExpanded":[4,"_aria-expanded"],"_ariaLabel":[1,"_aria-label"],"_ariaSelected":[4,"_aria-selected"],"_disabled":[4],"_download":[8],"_hideLabel":[4,"_hide-label"],"_href":[1],"_icon":[1],"_iconAlign":[1,"_icon-align"],"_iconOnly":[4,"_icon-only"],"_label":[1],"_on":[16],"_role":[1],"_selector":[1],"_stealth":[4],"_tabIndex":[2,"_tab-index"],"_target":[1],"_targetDescription":[1,"_target-description"],"_tooltipAlign":[1,"_tooltip-align"],"_useCase":[1,"_use-case"],"state":[32]}]]],["kol-link",[[33,"kol-link",{"_ariaControls":[1,"_aria-controls"],"_ariaCurrent":[8,"_aria-current"],"_ariaExpanded":[4,"_aria-expanded"],"_ariaLabel":[1,"_aria-label"],"_ariaSelected":[4,"_aria-selected"],"_disabled":[4],"_download":[8],"_hideLabel":[4,"_hide-label"],"_href":[1],"_icon":[1],"_iconAlign":[1,"_icon-align"],"_iconOnly":[4,"_icon-only"],"_label":[1],"_on":[16],"_role":[1],"_selector":[1],"_stealth":[4],"_tabIndex":[2,"_tab-index"],"_target":[1],"_targetDescription":[1,"_target-description"],"_tooltipAlign":[1,"_tooltip-align"],"_useCase":[1,"_use-case"]}]]],["kol-alert",[[33,"kol-alert",{"_alert":[4],"_hasCloser":[4,"_has-closer"],"_heading":[1],"_level":[2],"_on":[16],"_type":[1],"_variant":[1],"state":[32]}]]],["kol-alert-wc_2",[[4,"kol-input",{"_alert":[4],"_currentLength":[2,"_current-length"],"_disabled":[4],"_error":[1],"_hasCounter":[4,"_has-counter"],"_hideLabel":[4,"_hide-label"],"_hint":[1],"_icon":[16],"_id":[1],"_list":[1],"_maxLength":[2,"_max-length"],"_readOnly":[4,"_read-only"],"_renderNoLabel":[4,"_render-no-label"],"_required":[4],"_slotName":[1,"_slot-name"],"_smartButton":[16],"_touched":[4]}],[4,"kol-alert-wc",{"_alert":[4],"_hasCloser":[4,"_has-closer"],"_heading":[1],"_level":[2],"_on":[16],"_type":[1],"_variant":[1],"state":[32]}]]]]'),e))));
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { JSX } from '../../stencil-public-runtime';
|
|
2
2
|
import { KoliBriProgressAPI, KoliBriProgressStates } from './types';
|
|
3
|
-
import {
|
|
3
|
+
import { KoliBriProgressVariantType } from '../../types/progress';
|
|
4
4
|
export declare class KolProcess implements KoliBriProgressAPI {
|
|
5
5
|
private interval?;
|
|
6
6
|
render(): JSX.Element;
|
|
7
7
|
_label?: string;
|
|
8
8
|
_max: number;
|
|
9
|
-
_type?:
|
|
9
|
+
_type?: KoliBriProgressVariantType;
|
|
10
10
|
_unit?: string;
|
|
11
11
|
_value: number;
|
|
12
|
-
_variant?:
|
|
12
|
+
_variant?: KoliBriProgressVariantType;
|
|
13
13
|
state: KoliBriProgressStates;
|
|
14
14
|
validateLabel(value?: string): void;
|
|
15
15
|
validateMax(value?: number): void;
|
|
16
|
-
validateType(value?:
|
|
16
|
+
validateType(value?: KoliBriProgressVariantType): void;
|
|
17
17
|
validateUnit(value?: string): void;
|
|
18
18
|
validateValue(value?: number): void;
|
|
19
|
-
validateVariant(value?:
|
|
19
|
+
validateVariant(value?: KoliBriProgressVariantType): void;
|
|
20
20
|
componentWillLoad(): void;
|
|
21
21
|
disconnectedCallback(): void;
|
|
22
22
|
}
|
|
@@ -13,7 +13,7 @@ import { Stringified } from "./types/common";
|
|
|
13
13
|
import { PropColor } from "./types/props/color";
|
|
14
14
|
import { KoliBriHorizontalIcon, KoliBriIconProp } from "./types/icon";
|
|
15
15
|
import { AlternativButtonLinkRole, ButtonProps, KoliBriButtonCallbacks, KoliBriButtonType, KoliBriButtonVariant, LinkOnCallbacks, LinkProps, LinkTarget, LinkUseCase } from "./types/button-link";
|
|
16
|
-
import { AriaCurrent as AriaCurrent1,
|
|
16
|
+
import { AriaCurrent as AriaCurrent1, Stringified as Stringified1 } from "./components";
|
|
17
17
|
import { ButtonOrLinkOrTextWithChildrenProps } from "./types/button-link-text";
|
|
18
18
|
import { KoliBriFormCallbacks } from "./components/form/types";
|
|
19
19
|
import { FontAwesome, FontAwesomeOssPrefix } from "./enums/font-awesome";
|
|
@@ -31,6 +31,7 @@ import { Bundesamt, Bundesanstalt, Bundesministerium } from "./enums/bund";
|
|
|
31
31
|
import { KoliBriModalEventCallbacks } from "./types/modal";
|
|
32
32
|
import { KoliBriNavVariant } from "./components/nav/component";
|
|
33
33
|
import { KoliBriPaginationButtonCallbacks, PaginationHasButton } from "./components/pagination/types";
|
|
34
|
+
import { KoliBriProgressVariantType } from "./types/progress";
|
|
34
35
|
import { KoliBriQuoteVariant } from "./components/quote/types";
|
|
35
36
|
import { SpinVariant } from "./types/props/variant/spin";
|
|
36
37
|
import { KoliBriSplitButtonCallback } from "./components/split-button/types";
|
|
@@ -46,7 +47,7 @@ export { Stringified } from "./types/common";
|
|
|
46
47
|
export { PropColor } from "./types/props/color";
|
|
47
48
|
export { KoliBriHorizontalIcon, KoliBriIconProp } from "./types/icon";
|
|
48
49
|
export { AlternativButtonLinkRole, ButtonProps, KoliBriButtonCallbacks, KoliBriButtonType, KoliBriButtonVariant, LinkOnCallbacks, LinkProps, LinkTarget, LinkUseCase } from "./types/button-link";
|
|
49
|
-
export { AriaCurrent as AriaCurrent1,
|
|
50
|
+
export { AriaCurrent as AriaCurrent1, Stringified as Stringified1 } from "./components";
|
|
50
51
|
export { ButtonOrLinkOrTextWithChildrenProps } from "./types/button-link-text";
|
|
51
52
|
export { KoliBriFormCallbacks } from "./components/form/types";
|
|
52
53
|
export { FontAwesome, FontAwesomeOssPrefix } from "./enums/font-awesome";
|
|
@@ -64,6 +65,7 @@ export { Bundesamt, Bundesanstalt, Bundesministerium } from "./enums/bund";
|
|
|
64
65
|
export { KoliBriModalEventCallbacks } from "./types/modal";
|
|
65
66
|
export { KoliBriNavVariant } from "./components/nav/component";
|
|
66
67
|
export { KoliBriPaginationButtonCallbacks, PaginationHasButton } from "./components/pagination/types";
|
|
68
|
+
export { KoliBriProgressVariantType } from "./types/progress";
|
|
67
69
|
export { KoliBriQuoteVariant } from "./components/quote/types";
|
|
68
70
|
export { SpinVariant } from "./types/props/variant/spin";
|
|
69
71
|
export { KoliBriSplitButtonCallback } from "./components/split-button/types";
|
|
@@ -2150,7 +2152,7 @@ export namespace Components {
|
|
|
2150
2152
|
* Deprecated: Gibt an, ob der Prozess als Balken oder Kreis dargestellt wird.
|
|
2151
2153
|
* @deprecated will be removed in v2, use _variant
|
|
2152
2154
|
*/
|
|
2153
|
-
"_type"?:
|
|
2155
|
+
"_type"?: KoliBriProgressVariantType;
|
|
2154
2156
|
/**
|
|
2155
2157
|
* Setzt die Einheit der Fortschrittswerte. (wird nicht angezeigt)
|
|
2156
2158
|
*/
|
|
@@ -2162,7 +2164,7 @@ export namespace Components {
|
|
|
2162
2164
|
/**
|
|
2163
2165
|
* Gibt an, welche Variante der Darstellung genutzt werden soll.
|
|
2164
2166
|
*/
|
|
2165
|
-
"_variant"?:
|
|
2167
|
+
"_variant"?: KoliBriProgressVariantType;
|
|
2166
2168
|
}
|
|
2167
2169
|
interface KolQuote {
|
|
2168
2170
|
/**
|
|
@@ -5103,7 +5105,7 @@ declare namespace LocalJSX {
|
|
|
5103
5105
|
* Deprecated: Gibt an, ob der Prozess als Balken oder Kreis dargestellt wird.
|
|
5104
5106
|
* @deprecated will be removed in v2, use _variant
|
|
5105
5107
|
*/
|
|
5106
|
-
"_type"?:
|
|
5108
|
+
"_type"?: KoliBriProgressVariantType;
|
|
5107
5109
|
/**
|
|
5108
5110
|
* Setzt die Einheit der Fortschrittswerte. (wird nicht angezeigt)
|
|
5109
5111
|
*/
|
|
@@ -5115,7 +5117,7 @@ declare namespace LocalJSX {
|
|
|
5115
5117
|
/**
|
|
5116
5118
|
* Gibt an, welche Variante der Darstellung genutzt werden soll.
|
|
5117
5119
|
*/
|
|
5118
|
-
"_variant"?:
|
|
5120
|
+
"_variant"?: KoliBriProgressVariantType;
|
|
5119
5121
|
}
|
|
5120
5122
|
interface KolQuote {
|
|
5121
5123
|
/**
|
|
@@ -17,7 +17,7 @@ type OptionalButtonAndLinkProps = {
|
|
|
17
17
|
} & PropAriaCurrent & PropAriaExpanded & PropAriaLabel & PropAriaSelected & PropDisabled & PropHideLabel;
|
|
18
18
|
type RequiredButtonAndLinkStates = {
|
|
19
19
|
icon: KoliBriAllIcon;
|
|
20
|
-
}
|
|
20
|
+
};
|
|
21
21
|
type OptionalButtonAndLinkStates = {
|
|
22
22
|
ariaControls: string;
|
|
23
23
|
iconAlign: Align;
|
|
@@ -47,7 +47,7 @@ export type OptionalButtonLinkProps = OptionalButtonAndLinkProps & {
|
|
|
47
47
|
type: KoliBriButtonType;
|
|
48
48
|
value: Stringified<unknown>;
|
|
49
49
|
};
|
|
50
|
-
type RequiredButtonLinkStates = RequiredButtonAndLinkStates & KoliBriButtonVariantPropState & {
|
|
50
|
+
type RequiredButtonLinkStates = RequiredButtonAndLinkStates & PropLabel & KoliBriButtonVariantPropState & {
|
|
51
51
|
type: KoliBriButtonType;
|
|
52
52
|
};
|
|
53
53
|
type OptionalButtonLinkStates = OptionalButtonAndLinkStates & KoliBriButtonCustomClassPropState & {
|
|
@@ -88,7 +88,7 @@ type OptionalLinkStates = OptionalButtonAndLinkStates & {
|
|
|
88
88
|
target: LinkTarget;
|
|
89
89
|
targetDescription: string;
|
|
90
90
|
useCase: LinkUseCase;
|
|
91
|
-
} & PropAriaSelected & PropDownload & PropStealth;
|
|
91
|
+
} & PropAriaSelected & PropDownload & PropLabel & PropStealth;
|
|
92
92
|
export type LinkStates = Generic.Element.Members<RequiredLinkStates, OptionalLinkStates>;
|
|
93
93
|
export type KoliBriLinkAPI = Generic.Element.ComponentApi<RequiredLinkProps, OptionalLinkProps, RequiredLinkStates, OptionalLinkStates>;
|
|
94
94
|
export type RequiredLinkButtonProps = RequiredLinkProps;
|
package/doc/modal.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Vielen Dank, dass Sie diese Komponente zur Umsetzung eines Modals verwenden wollen. Inzwischen ist das native `<dialog>` Element sehr gut unterstützt ([caniuse](https://caniuse.com/?search=dialog)), barrierefrei, einfach zu benutzen und performanter (da nativ), daher empfehlen wir dieses zu verwenden. Wenn Sie aufgrund von Abwärtskompatibilität, oder weil Sie die **Modal**-Komponente bereits eingebaut haben, die Dokumentation zu unserem KolModal suchen, finden Sie diese etwas weiter unten. Die **Modal**-Komponente wird in Version 2 noch zur Verfügung stehen.
|
|
4
4
|
|
|
5
|
-
## Verwendung von
|
|
5
|
+
## Verwendung von `<dialog>`
|
|
6
6
|
|
|
7
7
|
Die Dokumentation des `<dialog>` finden Sie [hier(MDN)](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog).
|
|
8
8
|
Das **Dialog**-Element kann wie jedes andere HTML-Tag verwendet werden, alle Elemente innerhalb werden wie gewohnt dargestellt.
|
|
@@ -13,20 +13,20 @@ Der Dialog ist standardmäßig nicht sichtbar, über das Setzen des Attributs `o
|
|
|
13
13
|
- Die Modalvariante hat einen Hintergrund, der eine sanfte Abdunklung verursacht (unser Tipp: die Opacity der Hintergrundfarbe erhöhen), der über `::backdrop` gestylt werden kann und Klickevents auf den Dialog weiterleitet.
|
|
14
14
|
- Die Modalvariante ist in der Bildschirmmitte zentriert (via `margin: auto`, kann von CSS Resets überschrieben werden)
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
## Modal
|
|
17
17
|
|
|
18
18
|
Mit Hilfe der **Modal**-Komponente können zusätzliche Informationen oder auch Eingabeformulare in einem Dialogfenster angezeigt werden. Ein offenes **Modal** kann via **ESC** geschlossen werden.
|
|
19
19
|
Die **Modal**-Komponente ist standardmäßig versteckt. Sie wird i.d.R. erst nach Klick auf einen Button oder sonstigem Trigger angezeigt. Dabei wird der Hintergrund des Fensters deaktiviert und allein der Inhalt des Modal-Fensters ist aktiv.
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
### Funktionsweise
|
|
22
22
|
|
|
23
23
|
Das **Modal** realisiert die Basis für barrierefreie Overlays und ermöglicht es beliebige HTML-Inhalte anzuzeigen. Beispielsweise wäre eine Dialog-Komponente eine Komposition aus einer Card-Komponente die in einer **Modal**-Komponente eingefügt wird.
|
|
24
24
|
|
|
25
25
|
Sobald ein **Modal** geöffnet wird, werden alle selektierbaren Elemente in der Webseite deaktiviert, außer die innerhalb des aktiven Modals.
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
### Konstruktion
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
#### Code
|
|
30
30
|
|
|
31
31
|
```html
|
|
32
32
|
<kol-modal id="test-modal" _label="Beschreibung zur Modalbox">
|
|
@@ -54,7 +54,7 @@ Sobald ein **Modal** geöffnet wird, werden alle selektierbaren Elemente in der
|
|
|
54
54
|
</script>
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
### Verwendung
|
|
58
58
|
|
|
59
59
|
Über das Attribut **`_width`** geben Sie die gewünschte Breite der Modalbox an. Sie wird in der gewählten Größe immer mittig auf dem Bildschirm angezeigt.
|
|
60
60
|
|
|
@@ -64,19 +64,19 @@ Da das Modal vom eigentlichen Modal entkoppelt ist, aber für eine teilweisen Sp
|
|
|
64
64
|
|
|
65
65
|
Das **Modal** hat einen `z-index` von `100`.
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
#### Best practices
|
|
68
68
|
|
|
69
69
|
- Verwenden Sie die Modalbox, um weiterführende Informationen zu einem Thema anzuzeigen.
|
|
70
70
|
- Verwenden Sie die Modalbox, um umfangreiche Inhalte optisch kompakter zu gestalten.
|
|
71
71
|
- Vermeiden Sie es, wichtige Informationen wie z.B. rechtliche Themen, auf die Nutzer:innen reagieren müssen, in Modalboxen zu platzieren.
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
#### Anwendungsfälle
|
|
74
74
|
|
|
75
75
|
- Nutzen Sie die Modalbox, als Erklärungshilfe zu einzelnen Eingabefeldern in Formularen.
|
|
76
76
|
- Nutzen Sie die Modalbox, um ergänzende Informationen erst nach Anforderung durch die Nutzer:innen anzuzeigen.
|
|
77
77
|
- Nutzen Sie die Modalbox, um ein Feedback zu Speichervorgängen oder ähnliches anzuzeigen, z.B. **_Vielen Dank für Ihre Rückmeldung_** nach Absenden eines Formulars.
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
### Barrierefreiheit
|
|
80
80
|
|
|
81
81
|
> Die optische Standardausgabe der Komponente ist auf die Umsetzung der Barrierefreiheit hin optimiert. Wenn Sie eigene Custom Styles verwenden, kann das zu einer Einschränkung der Barrierefreiheit führen.
|
|
82
82
|
|
|
@@ -90,14 +90,14 @@ Achten Sie für eine optimale Ausgabe der **Modal**-Komponente in Screenreadern
|
|
|
90
90
|
|
|
91
91
|
Des Weiteren gibt es immer nur maximal ein aktives Modal, welches alle selektierbaren Elemente deaktiviert außer die innerhalb des eigenen Modals. Hierbei ist zu beachten, dass KoliBri nur Elemente deaktiviert die sich im Browser-Seitenbereich befinden. Das Fokussieren den Browser-Menü's ist weiterhin möglich.
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
#### Tastatursteuerung
|
|
94
94
|
|
|
95
95
|
| Taste | Funktion |
|
|
96
96
|
| ----- | ------------------------------------------------------------------------------------------- |
|
|
97
97
|
| `Tab` | Bei geöffnetem Modal werden alle fokussierbaren Elemente der Reihenfolge nach angesprungen. |
|
|
98
98
|
| `ESC` | Schließt das Modal. |
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
### Links und Referenzen
|
|
101
101
|
|
|
102
102
|
- https://www.w3.org/TR/wai-aria-practices/#dialog_modal
|
|
103
103
|
- https://www.w3.org/TR/wai-aria-practices-1.1/examples/dialog-modal/dialog.html
|
package/doc/progress.md
CHANGED
|
@@ -45,14 +45,14 @@ Verwenden Sie das Attribut **`_value`**, um den aktuellen Wert der Komponente zu
|
|
|
45
45
|
|
|
46
46
|
## Properties
|
|
47
47
|
|
|
48
|
-
| Property | Attribute | Description | Type
|
|
49
|
-
| --------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
50
|
-
| `_label` | `_label` | Setzt die sichtbare oder semantische Beschriftung der Komponente (z.B. Aria-Label, Label, Headline, Caption, Summary usw.). | `string` \| `undefined`
|
|
51
|
-
| `_max` _(required)_ | `_max` | Gibt an, bei welchem Wert die Fortschrittsanzeige abgeschlossen ist. | `number`
|
|
52
|
-
| `_type` | `_type` | <span class="text-red-500">**[DEPRECATED]**</span> will be removed in v2, use _variant<br/><br/>Deprecated: Gibt an, ob der Prozess als Balken oder Kreis dargestellt wird. | `
|
|
53
|
-
| `_unit` | `_unit` | Setzt die Einheit der Fortschrittswerte. (wird nicht angezeigt) | `string` \| `undefined`
|
|
54
|
-
| `_value` _(required)_ | `_value` | Gibt an, wie weit die Anzeige fortgeschritten ist. | `number`
|
|
55
|
-
| `_variant` | `_variant` | Gibt an, welche Variante der Darstellung genutzt werden soll. | `
|
|
48
|
+
| Property | Attribute | Description | Type | Default |
|
|
49
|
+
| --------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------- | ----------- |
|
|
50
|
+
| `_label` | `_label` | Setzt die sichtbare oder semantische Beschriftung der Komponente (z.B. Aria-Label, Label, Headline, Caption, Summary usw.). | `string` \| `undefined` | `undefined` |
|
|
51
|
+
| `_max` _(required)_ | `_max` | Gibt an, bei welchem Wert die Fortschrittsanzeige abgeschlossen ist. | `number` | `undefined` |
|
|
52
|
+
| `_type` | `_type` | <span class="text-red-500">**[DEPRECATED]**</span> will be removed in v2, use _variant<br/><br/>Deprecated: Gibt an, ob der Prozess als Balken oder Kreis dargestellt wird. | `"bar"` \| `"cycle"` \| `"cycle-label-value"` \| `"cycle-value-label"` \| `undefined` | `undefined` |
|
|
53
|
+
| `_unit` | `_unit` | Setzt die Einheit der Fortschrittswerte. (wird nicht angezeigt) | `string` \| `undefined` | `'%'` |
|
|
54
|
+
| `_value` _(required)_ | `_value` | Gibt an, wie weit die Anzeige fortgeschritten ist. | `number` | `undefined` |
|
|
55
|
+
| `_variant` | `_variant` | Gibt an, welche Variante der Darstellung genutzt werden soll. | `"bar"` \| `"cycle"` \| `"cycle-label-value"` \| `"cycle-value-label"` \| `undefined` | `undefined` |
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
----------------------------------------------
|