@public-ui/components 1.4.2-rc.1 → 1.4.2-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/cheat-sheet.html +6 -6
  2. package/custom-elements.json +1 -1
  3. package/dist/cjs/index-29c5d3c6.js.map +1 -1
  4. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  5. package/dist/cjs/kol-button.cjs.entry.js.map +1 -1
  6. package/dist/cjs/kol-heading-wc_2.cjs.entry.js +1 -1
  7. package/dist/cjs/kol-heading-wc_2.cjs.entry.js.map +1 -1
  8. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  9. package/dist/cjs/kol-link-button.cjs.entry.js.map +1 -1
  10. package/dist/cjs/kol-tooltip.cjs.entry.js +1 -1
  11. package/dist/cjs/kol-tooltip.cjs.entry.js.map +1 -1
  12. package/dist/cjs/kolibri.cjs.js.map +1 -1
  13. package/dist/cjs/loader.cjs.js.map +1 -1
  14. package/dist/components/component.js +1 -1
  15. package/dist/components/component.js.map +1 -1
  16. package/dist/components/component9.js +1 -1
  17. package/dist/components/component9.js.map +1 -1
  18. package/dist/components/kol-link-button.js +1 -1
  19. package/dist/components/kol-link-button.js.map +1 -1
  20. package/dist/components/shadow2.js +1 -1
  21. package/dist/components/shadow2.js.map +1 -1
  22. package/dist/esm/index-50adf9a0.js.map +1 -1
  23. package/dist/esm/kol-button.entry.js +1 -1
  24. package/dist/esm/kol-button.entry.js.map +1 -1
  25. package/dist/esm/kol-heading-wc_2.entry.js +1 -1
  26. package/dist/esm/kol-heading-wc_2.entry.js.map +1 -1
  27. package/dist/esm/kol-link-button.entry.js +1 -1
  28. package/dist/esm/kol-link-button.entry.js.map +1 -1
  29. package/dist/esm/kol-tooltip.entry.js +1 -1
  30. package/dist/esm/kol-tooltip.entry.js.map +1 -1
  31. package/dist/esm/kolibri.js.map +1 -1
  32. package/dist/esm/loader.js.map +1 -1
  33. package/dist/kolibri/i18n-1d6d91ab.js.map +1 -1
  34. package/dist/kolibri/index-50adf9a0.js.map +1 -1
  35. package/dist/kolibri/index-599f5430.js.map +1 -1
  36. package/dist/kolibri/kol-button.entry.js +1 -1
  37. package/dist/kolibri/kol-button.entry.js.map +1 -1
  38. package/dist/kolibri/kol-heading-wc_2.entry.js +1 -1
  39. package/dist/kolibri/kol-heading-wc_2.entry.js.map +1 -1
  40. package/dist/kolibri/kol-link-button.entry.js +1 -1
  41. package/dist/kolibri/kol-link-button.entry.js.map +1 -1
  42. package/dist/kolibri/kol-tooltip.entry.js +1 -1
  43. package/dist/kolibri/kol-tooltip.entry.js.map +1 -1
  44. package/dist/kolibri/kolibri.esm.js.map +1 -1
  45. package/jest-test-results.json +1 -1
  46. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["root","definition","module","exports","log","this","noop","undefinedType","isIE","window","navigator","test","userAgent","logMethods","bindMethod","obj","methodName","method","bind","Function","prototype","call","e","apply","arguments","traceForIE","console","trace","realMethod","undefined","replaceLoggingMethods","level","loggerName","i","length","methodFactory","debug","enableLoggingWhenConsoleArrives","defaultMethodFactory","Logger","name","defaultLevel","factory","self","currentLevel","storageKey","persistLevelIfPossible","levelNum","levelName","toUpperCase","localStorage","ignore","document","cookie","encodeURIComponent","getPersistedLevel","storedLevel","location","indexOf","exec","slice","levels","clearPersistedLevel","removeItem","TRACE","DEBUG","INFO","WARN","ERROR","SILENT","getLevel","setLevel","persist","setDefaultLevel","resetLevel","enableAll","disableAll","initialLevel","defaultLogger","_loggersByName","getLogger","TypeError","logger","_log","noConflict","getLoggers","STORE","global","lockThemePatching","warrentyWarning","THEME_NAME_PATTERN","isThemeNameValid","validateThemeName","Error","patchThemeTag","themeName","tagName","css","warn","A11yUi","Themes","patchTheme","map","tagNames","Object","getOwnPropertyNames","forEach","cssStyle","getThemeNode","element","HTMLElement","dataset","theme","parentNode","ShadowRoot","host","getEncroachCss","themeEncroachCss","themeReset","mode","themeEncroachCssMode","isTheCurrentThemeConfigValid","Theme","cache","encroachCss","isTheCurrentThemeNotDefault","getThemeDetails","details","loglevel","themeNode","themeCache","themeLoglevel","getThemeOptionDefaults","options","detect","setConfigureTheme","info","registered","register","themes","loaders","Set","Array","isArray","error","promises","loader","push","Promise","all","STYLING_TASK_QUEUE","Map","HYDRATED_HISTORY","CSS_PROPERTIES_REGISTERED","CSS_STYLE_CACHE","REGEX_CSS_PROPERTIES","REGEX_SPLIT_CSS_PROPERTY","extractProperties","properties","match","filter","property","style","createElement","innerHTML","join","querySelector","appendChild","add","getCssStyle","replace","removeStyle","shadow","childNode","from","childNodes","HTMLStyleElement","removeChild","patchStyle","styles","styleSheets","styleSheet","CSSStyleSheet","replaceSync","adoptedStyleSheets","reverse","styleElement","insertBefore","firstChild","encroachStyles","defaultStyleNodes","node","defaultStyleSheets","unshift","cssRules","rule","cssText","setThemeStyleAfterHydrated","elm","themeDetails","styleDisplay","shadowRoot","get","has","switchStyle","PROPERTY_STYLE","GLOBAL_STYLE","TAG_STYLE","STYLES","set","display","logHydratedHistory","timestamp","Date","now","numberOfTasks","size","pushToDoTask","loggedPushToDoTask","deleteDoneTask","delete","loggedDeleteDoneTask","waitForHydrated","T","setTimeout","clearTimeout","classList","contains","observerCallback","mutationsList","mutation","target","observerOptions","attributes","attributeFilter","childList","subtree","observer","MutationObserver","setThemeStyle","observe"],"sources":["./node_modules/loglevel/lib/loglevel.js","./node_modules/@a11y-ui/core/dist/index.mjs"],"sourcesContent":["/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (\n /Trident\\/|MSIE /.test(window.navigator.userAgent)\n );\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Trace() doesn't print the message in IE, so for that case we need to wrap it\n function traceForIE() {\n if (console.log) {\n if (console.log.apply) {\n console.log.apply(console, arguments);\n } else {\n // In old IE, native console methods themselves don't have apply().\n Function.prototype.apply.apply(console.log, [console, arguments]);\n }\n }\n if (console.trace) console.trace();\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (methodName === 'trace' && isIE) {\n return traceForIE;\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods(level, loggerName) {\n /*jshint validthis:true */\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, loggerName);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this, level, loggerName);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, level, loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, defaultLevel, factory) {\n var self = this;\n var currentLevel;\n defaultLevel = defaultLevel == null ? \"WARN\" : defaultLevel;\n\n var storageKey = \"loglevel\";\n if (typeof name === \"string\") {\n storageKey += \":\" + name;\n } else if (typeof name === \"symbol\") {\n storageKey = undefined;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType || !storageKey) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var location = cookie.indexOf(\n encodeURIComponent(storageKey) + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n function clearPersistedLevel() {\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage.removeItem(storageKey);\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC\";\n } catch (ignore) {}\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n return currentLevel;\n };\n\n self.setLevel = function (level, persist) {\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n currentLevel = level;\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(level);\n }\n replaceLoggingMethods.call(self, level, name);\n if (typeof console === undefinedType && level < self.levels.SILENT) {\n return \"No console available for logging\";\n }\n } else {\n throw \"log.setLevel() called with invalid level: \" + level;\n }\n };\n\n self.setDefaultLevel = function (level) {\n defaultLevel = level;\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.resetLevel = function () {\n self.setLevel(defaultLevel, false);\n clearPersistedLevel();\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n // Initialize with the right level\n var initialLevel = getPersistedLevel();\n if (initialLevel == null) {\n initialLevel = defaultLevel;\n }\n self.setLevel(initialLevel, false);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n var defaultLogger = new Logger();\n\n var _loggersByName = {};\n defaultLogger.getLogger = function getLogger(name) {\n if ((typeof name !== \"symbol\" && typeof name !== \"string\") || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name, defaultLogger.getLevel(), defaultLogger.methodFactory);\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n // ES6 default export, for compatibility\n defaultLogger['default'] = defaultLogger;\n\n return defaultLogger;\n}));\n","import log from 'loglevel';\n\nconst createTranslation = (name, map) => {\n return (patch) => patch(name, map);\n};\n\nconst createTheme = (name, map) => {\n return (patch) => patch(name, map);\n};\n\nconst STORE = typeof window === \"object\" ? window : typeof global === \"object\" ? global : typeof self === \"object\" ? self : {};\n\nlet lockThemePatching = true;\nlet warrentyWarning = false;\nconst THEME_NAME_PATTERN = /^[a-z][a-z0-9]{1,}(-[a-z0-9]+)?$/;\nconst isThemeNameValid = (name) => {\n return typeof name === \"string\" && THEME_NAME_PATTERN.test(name);\n};\nconst validateThemeName = (name) => {\n if (isThemeNameValid(name) === false) {\n throw new Error(\n `[Theming] The theme identifier \"${typeof name === \"string\" ? name : \"\"}\" (Type: ${typeof name}) is not valid. Please use only follow this pattern: /^[a-z][a-z0-9]{1,}(-[a-z0-9]+)?$/`\n );\n }\n};\nconst patchThemeTag = (themeName, tagName, css) => {\n validateThemeName(themeName);\n if (lockThemePatching === true && warrentyWarning === false) {\n warrentyWarning = true;\n log.warn(\n `[Theming] The theme process is locked. This means that the theme \"${themeName}\" should not be patched.\n\nimport { register } from '@a11y-ui/core';\nimport { defineCustomElements } from '...';\nimport { THEME } from '...';\n\nregister(THEME, defineCustomElements)\n\t.then(() => {\n\t\tconst htmlDivElement: HTMLElement | null = document.querySelector<HTMLElement>('#my-app');\n if (htmlDivElement instanceof HTMLElement) {\n const root = createRoot(htmlDivElement);\n root.render(<App />);\n }\n })\n .catch(console.warn);`\n );\n }\n if (typeof STORE.A11yUi !== \"object\" || STORE.A11yUi === null) {\n STORE.A11yUi = {};\n }\n if (typeof STORE.A11yUi === \"object\" && STORE.A11yUi !== null && (typeof STORE.A11yUi.Themes !== \"object\" || STORE.A11yUi.Themes === null)) {\n STORE.A11yUi.Themes = {};\n }\n if (typeof STORE.A11yUi === \"object\" && STORE.A11yUi !== null && typeof STORE.A11yUi.Themes === \"object\" && STORE.A11yUi.Themes !== null && (typeof STORE.A11yUi.Themes[themeName] !== \"object\" || STORE.A11yUi.Themes[themeName] === null)) {\n STORE.A11yUi.Themes[themeName] = {};\n }\n if (typeof STORE.A11yUi === \"object\" && STORE.A11yUi !== null && typeof STORE.A11yUi.Themes === \"object\" && STORE.A11yUi.Themes !== null && typeof STORE.A11yUi.Themes[themeName] === \"object\" && STORE.A11yUi.Themes[themeName] !== null) {\n STORE.A11yUi.Themes[themeName][tagName] = css;\n }\n};\nconst patchTheme = (name, map) => {\n validateThemeName(name);\n if (typeof map === \"object\" && map !== null) {\n const tagNames = Object.getOwnPropertyNames(map);\n tagNames.forEach((tagName) => {\n const cssStyle = map[tagName];\n if (typeof cssStyle === \"string\" && cssStyle.length > 0) {\n patchThemeTag(name, tagName, cssStyle);\n }\n });\n }\n return name;\n};\nconst getThemeNode = (element) => {\n if (element instanceof HTMLElement) {\n if (typeof element.dataset.theme === \"string\") {\n return element;\n } else {\n let parentNode = element.parentNode;\n while (parentNode instanceof ShadowRoot) {\n parentNode = parentNode.host;\n }\n return getThemeNode(parentNode);\n }\n } else {\n return null;\n }\n};\nconst getEncroachCss = (dataset = {}) => {\n if (dataset.themeEncroachCss === \"false\" || dataset.themeReset === \"true\") {\n return false;\n } else {\n return {\n mode: dataset.themeEncroachCssMode === \"after\" || dataset.themeEncroachCssMode === \"before\" ? dataset.themeEncroachCssMode : \"before\"\n };\n }\n};\nconst isTheCurrentThemeConfigValid = () => typeof STORE.A11yUi === \"object\" && STORE.A11yUi !== null && typeof STORE.A11yUi.Theme === \"object\" && STORE.A11yUi.Theme !== null && typeof STORE.A11yUi.Theme.cache === \"boolean\" && typeof STORE.A11yUi.Theme.encroachCss === \"object\" && typeof STORE.A11yUi.Theme.encroachCss !== null && typeof STORE.A11yUi.Theme.encroachCss.mode === \"string\" && typeof STORE.A11yUi.Theme.name === \"string\";\nconst isTheCurrentThemeNotDefault = () => (typeof STORE.A11yUi === \"object\" && STORE.A11yUi !== null) === false || (typeof STORE.A11yUi.Theme === \"object\" && STORE.A11yUi.Theme !== null) === false || STORE.A11yUi.Theme.name !== \"default\";\nconst getThemeDetails = (element) => {\n if (isTheCurrentThemeConfigValid()) {\n return STORE.A11yUi.Theme;\n } else {\n const details = {\n cache: true,\n encroachCss: getEncroachCss(),\n loglevel: \"silent\",\n name: null\n };\n const themeNode = getThemeNode(element);\n if (themeNode instanceof HTMLElement) {\n details.cache = themeNode.dataset.themeCache !== \"false\";\n details.encroachCss = getEncroachCss(themeNode.dataset);\n details.loglevel = themeNode.dataset.themeLoglevel === \"debug\" ? themeNode.dataset.themeLoglevel : \"silent\";\n details.name = themeNode.dataset.theme || null;\n }\n return details;\n }\n};\nconst getTheme = (element) => {\n return getThemeDetails(element).name;\n};\nconst getThemeOptionDefaults = (themeName, options) => {\n return {\n cache: options.cache !== false,\n // default: true\n detect: options.detect === \"auto\" ? \"auto\" : \"fixed\",\n // default: 'fixed'\n encroachCss: options.encroachCss === false ? false : typeof options.encroachCss === \"object\" && options.encroachCss != null && (options.encroachCss.mode === \"after\" || options.encroachCss.mode === \"before\") ? options.encroachCss : {\n mode: \"before\"\n // default: 'before'\n },\n loglevel: options.loglevel === \"debug\" ? options.loglevel : \"silent\",\n // default: 'silent'\n name: typeof options.name === \"string\" ? options.name : themeName\n // default: themeName\n };\n};\nconst setConfigureTheme = (themeName, options) => {\n if (isTheCurrentThemeConfigValid() === false && isTheCurrentThemeNotDefault()) {\n if (\n // Die Options müssen ein Objekt sein.\n typeof options === \"object\" && options !== null\n ) {\n options = getThemeOptionDefaults(themeName, options);\n if (\n /**\n * The presetting of theme options is only relevant by using 'fixed'\n * detection mode.\n */\n options.detect === \"fixed\"\n ) {\n if (options.name === null && typeof themeName === \"string\") {\n options.name = themeName;\n }\n if (\n /**\n * Wenn mehrere Themes geladen werden, dann wird nur der Theme-Name gesetzt,\n * der mit dem Name eines Themes übereinstimmt.\n */\n themeName === options.name\n ) {\n if (typeof STORE.A11yUi !== \"object\" || STORE.A11yUi === null) {\n STORE.A11yUi = {};\n }\n STORE.A11yUi.Theme = options;\n log.info(`[Theming] Theme \"${themeName}\" was set as default theme.`);\n }\n } else {\n log.warn(`[Theming] The presetting of theme options is only relevant by using 'fixed' detection mode.`);\n }\n }\n }\n};\nlet registered = false;\nconst register = (themes, loaders, options = {}) => {\n if (registered === false) {\n registered = true;\n lockThemePatching = false;\n }\n if (typeof themes === \"function\") {\n themes = /* @__PURE__ */ new Set([themes]);\n } else if (Array.isArray(themes)) {\n themes = new Set(themes);\n }\n if (themes instanceof Set) {\n themes.forEach((theme) => {\n if (typeof theme === \"function\" && theme.length === 1) {\n setConfigureTheme(theme(patchTheme), {\n cache: options.theme?.cache,\n detect: options.theme?.detect,\n encroachCss: options.theme?.encroachCss,\n name: options.theme?.name\n });\n } else {\n log.error(`[Theming] Es wurde versucht eine nicht kompatibles Theme zu laden.`);\n }\n });\n }\n lockThemePatching = true;\n if (typeof loaders === \"function\") {\n loaders = /* @__PURE__ */ new Set([loaders]);\n } else if (Array.isArray(loaders)) {\n loaders = new Set(loaders);\n }\n const promises = [];\n loaders.forEach((loader) => promises.push(loader()));\n return Promise.all(promises);\n};\n\nconst _RobustStore = class {\n constructor(object, identifier) {\n this.store = this.createStore(object, identifier);\n }\n static getInstance(identifier, object) {\n let instance = _RobustStore.instances.get(identifier);\n if (instance === void 0) {\n instance = new _RobustStore(object, identifier);\n _RobustStore.instances.set(identifier, instance);\n }\n return instance;\n }\n createStore(object, identifier) {\n Object.defineProperty(object, identifier, {\n enumerable: false,\n value: {},\n writable: false\n });\n return object[identifier];\n }\n recursiveSetItem(store, key, value, options = _RobustStore.options) {\n let storeValue = typeof value === \"object\" && value !== null ? {} : value;\n Object.defineProperty(store, key, {\n enumerable: options.enumerable === true,\n get: () => storeValue,\n /**\n * Die set Methode muss eigentlich ein this.recursiveSetItem aufrufen.\n */\n set: options.immutable === true ? void 0 : (value2) => storeValue = value2\n });\n if (typeof value === \"object\" && value !== null) {\n for (const [k, v] of Object.entries(value)) {\n this.recursiveSetItem(store[key], k, v, options);\n }\n }\n }\n setItem(key, value, options = _RobustStore.options) {\n this.recursiveSetItem(this.store, key, value, options);\n return this;\n }\n getItem(key) {\n if (Array.isArray(key)) {\n return key.map((k) => this.getItem(k));\n }\n return this.store[key];\n }\n};\nlet RobustStore = _RobustStore;\nRobustStore.options = {\n enumerable: false,\n immutable: false\n};\nRobustStore.instances = /* @__PURE__ */ new Map();\n\nconst STYLING_TASK_QUEUE = /* @__PURE__ */ new Map();\nconst HYDRATED_HISTORY = [];\nconst CSS_PROPERTIES_REGISTERED = /* @__PURE__ */ new Set();\nconst CSS_STYLE_CACHE = /* @__PURE__ */ new Map();\nconst REGEX_CSS_PROPERTIES = /--[^;]+/g;\nconst REGEX_SPLIT_CSS_PROPERTY = /:/;\nif (typeof STORE.A11yUi !== \"object\" || STORE.A11yUi === null) {\n STORE.A11yUi = {\n CSS_STYLE_CACHE,\n HYDRATED_HISTORY,\n STYLING_TASK_QUEUE\n };\n}\nconst extractProperties = (themeName, css) => {\n let properties = css.match(REGEX_CSS_PROPERTIES);\n if (Array.isArray(properties)) {\n properties = properties.filter((property) => REGEX_SPLIT_CSS_PROPERTY.test(property));\n const style = document.createElement(\"style\");\n style.innerHTML = `.${themeName} {${properties.join(\";\")}}`;\n document.querySelector(\"head\")?.appendChild(style);\n }\n CSS_PROPERTIES_REGISTERED.add(themeName);\n};\nconst getCssStyle = (themeName, tagName) => {\n if (\n /**\n * Search custom StyleSheet in Config\n * TODO: Performance???\n */\n typeof STORE.A11yUi === \"object\" && STORE.A11yUi !== null && typeof STORE.A11yUi.Themes === \"object\" && STORE.A11yUi.Themes !== null && typeof STORE.A11yUi.Themes[themeName] === \"object\" && STORE.A11yUi.Themes[themeName] !== null && typeof STORE.A11yUi.Themes[themeName][tagName] === \"string\"\n ) {\n return STORE.A11yUi.Themes[themeName][tagName].replace(\n /\\r?\\n/g,\n \"\"\n );\n } else {\n return \"\";\n }\n};\nconst removeStyle = (shadow) => {\n for (const childNode of Array.from(shadow.childNodes)) {\n if (childNode instanceof HTMLStyleElement && childNode.tagName === \"STYLE\") {\n shadow.removeChild(childNode);\n } else {\n break;\n }\n }\n};\nconst patchStyle = (shadow, styles) => {\n try {\n const styleSheets = [];\n styles.forEach((style) => {\n const styleSheet = new CSSStyleSheet();\n styleSheet.replaceSync(style);\n styleSheets.push(styleSheet);\n });\n shadow.adoptedStyleSheets = styleSheets;\n } catch (e) {\n styles.reverse().forEach((style) => {\n const styleElement = document.createElement(\"style\");\n styleElement.innerHTML = style;\n shadow.insertBefore(styleElement, shadow.firstChild);\n });\n }\n};\nconst encroachStyles = (shadow, styles, encroachCss) => {\n if (encroachCss !== false) {\n const defaultStyleNodes = [\n ...Array.from(shadow.childNodes).filter((node) => node instanceof HTMLStyleElement && node.tagName === \"STYLE\")\n ];\n let defaultStyleSheets;\n try {\n defaultStyleSheets = [...Array.from(shadow.adoptedStyleSheets)];\n } catch (e) {\n defaultStyleSheets = [];\n }\n if (encroachCss?.mode === \"before\") {\n defaultStyleNodes.reverse().forEach((style) => styles.unshift(style.innerHTML));\n defaultStyleSheets.reverse().forEach(\n (style) => styles.unshift(\n Array.from(style.cssRules).map((rule) => rule.cssText).join(\"\")\n )\n );\n } else if (encroachCss?.mode === \"after\") {\n defaultStyleNodes.forEach((style) => styles.push(style.innerHTML));\n defaultStyleSheets.forEach(\n (style) => styles.push(\n Array.from(style.cssRules).map((rule) => rule.cssText).join(\"\")\n )\n );\n }\n }\n};\nconst setThemeStyleAfterHydrated = (elm, themeDetails, styleDisplay) => {\n const themeName = themeDetails.name || \"default\";\n let shadow;\n try {\n if (elm.shadowRoot === null) {\n throw new Error(\"ShadowRoot is null\");\n }\n shadow = elm.shadowRoot;\n } catch (e) {\n shadow = elm;\n }\n if (CSS_STYLE_CACHE.get(themeName)?.has(elm.tagName)) {\n switchStyle(elm, shadow, CSS_STYLE_CACHE.get(themeName)?.get(elm.tagName), styleDisplay);\n } else {\n const PROPERTY_STYLE = getCssStyle(themeName, \"PROPERTIES\");\n const GLOBAL_STYLE = getCssStyle(themeName, \"GLOBAL\");\n const TAG_STYLE = getCssStyle(themeName, elm.tagName);\n if (CSS_PROPERTIES_REGISTERED.has(themeName) === false) {\n extractProperties(themeName, GLOBAL_STYLE);\n }\n const STYLES = [PROPERTY_STYLE, GLOBAL_STYLE, TAG_STYLE];\n encroachStyles(shadow, STYLES, themeDetails.encroachCss);\n if (themeDetails.loglevel === \"debug\") {\n console.log(elm.tagName, STYLES);\n }\n if (themeDetails.cache === true) {\n if (CSS_STYLE_CACHE.has(themeName) === false) {\n CSS_STYLE_CACHE.set(themeName, /* @__PURE__ */ new Map());\n }\n CSS_STYLE_CACHE.get(themeName)?.set(elm.tagName, STYLES);\n }\n switchStyle(elm, shadow, STYLES, styleDisplay);\n }\n};\nconst switchStyle = (elm, shadow, styles, styleDisplay) => {\n removeStyle(shadow);\n patchStyle(shadow, styles);\n elm.style.display = styleDisplay;\n};\nconst logHydratedHistory = (themeDetails) => {\n if (themeDetails.loglevel === \"debug\") {\n HYDRATED_HISTORY.push({\n timestamp: Date.now(),\n numberOfTasks: STYLING_TASK_QUEUE.size\n });\n }\n};\nconst pushToDoTask = (elm, themeDetails) => {\n STYLING_TASK_QUEUE.set(elm, {\n /**\n * Das Element soll solange nicht sichtbar bleiben\n * bis der Style im DOM gesetzt ist.\n */\n styleDisplay: `${elm.style.display}`,\n themeDetails\n });\n};\nconst loggedPushToDoTask = (elm, themeDetails) => {\n pushToDoTask(elm, themeDetails);\n logHydratedHistory(themeDetails);\n};\nconst deleteDoneTask = (elm) => {\n STYLING_TASK_QUEUE.delete(elm);\n};\nconst loggedDeleteDoneTask = (elm, themeDetails) => {\n deleteDoneTask(elm);\n logHydratedHistory(themeDetails);\n};\nconst waitForHydrated = (elm) => {\n const T = setTimeout(() => {\n clearTimeout(T);\n if (STYLING_TASK_QUEUE.has(elm) && elm.classList.contains(\"hydrated\")) {\n const { styleDisplay, themeDetails } = STYLING_TASK_QUEUE.get(elm);\n setThemeStyleAfterHydrated(elm, themeDetails, styleDisplay);\n loggedDeleteDoneTask(elm, themeDetails);\n } else {\n waitForHydrated(elm);\n }\n }, 25);\n};\nconst observerCallback = (mutationsList) => {\n for (const mutation of mutationsList) {\n if (\n /**\n * Save by observer config\n */\n // mutation.type === 'attributes' &&\n // mutation.attributeName === 'class' &&\n /**\n * Implizit check for HTMLElement\n */\n // mutation.target &&\n STYLING_TASK_QUEUE.has(mutation.target) && mutation.target.classList.contains(\"hydrated\")\n ) {\n const { styleDisplay, themeDetails } = STYLING_TASK_QUEUE.get(mutation.target);\n setThemeStyleAfterHydrated(mutation.target, themeDetails, styleDisplay);\n loggedDeleteDoneTask(mutation.target, themeDetails);\n }\n }\n};\nconst observerOptions = {\n attributes: true,\n attributeFilter: [\"class\"],\n childList: false,\n subtree: false\n};\nlet observer;\ntry {\n observer = new MutationObserver(observerCallback);\n} catch (e) {\n observer = null;\n}\nconst setThemeStyle = (elm, themeDetails) => {\n loggedPushToDoTask(elm, themeDetails);\n if (observer) {\n observer.observe(elm, observerOptions);\n } else {\n waitForHydrated(elm);\n }\n elm.style.display = \"none\";\n};\n\nclass Theme {\n constructor(prefix, keyEnum, tagEnum) {\n this.createTheme = (name, map) => createTheme(name, map);\n this.createTranslation = (name, map) => createTranslation(name, map);\n this.Prefix = prefix;\n this.Key = Object.getOwnPropertyNames(keyEnum);\n this.Tag = Object.getOwnPropertyNames(tagEnum);\n }\n}\n\nexport { RobustStore, STORE, Theme, getTheme, getThemeDetails, patchTheme, patchThemeTag, register, setThemeStyle };\n"],"mappings":";;;iYAMC,SAAUA,EAAMC,GAIN,GAAkCC,EAAOC,QAAS,CACrDD,EAAAC,QAAiBF,GACzB,KAAW,CACHD,EAAKI,IAAMH,GACnB,CACA,EATA,CASEI,GAAM,WAIJ,IAAIC,EAAO,WAAW,EACtB,IAAIC,EAAgB,YACpB,IA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AIpC,MAAMgD,QAAU,MAAM,S"}
1
+ {"version":3,"names":["root","definition","module","exports","log","this","noop","undefinedType","isIE","window","navigator","test","userAgent","logMethods","bindMethod","obj","methodName","method","bind","Function","prototype","call","e","apply","arguments","traceForIE","console","trace","realMethod","undefined","replaceLoggingMethods","level","loggerName","i","length","methodFactory","debug","enableLoggingWhenConsoleArrives","defaultMethodFactory","Logger","name","defaultLevel","factory","self","currentLevel","storageKey","persistLevelIfPossible","levelNum","levelName","toUpperCase","localStorage","ignore","document","cookie","encodeURIComponent","getPersistedLevel","storedLevel","location","indexOf","exec","slice","levels","clearPersistedLevel","removeItem","TRACE","DEBUG","INFO","WARN","ERROR","SILENT","getLevel","setLevel","persist","setDefaultLevel","resetLevel","enableAll","disableAll","initialLevel","defaultLogger","_loggersByName","getLogger","TypeError","logger","_log","noConflict","getLoggers","STORE","global","lockThemePatching","warrentyWarning","THEME_NAME_PATTERN","isThemeNameValid","validateThemeName","Error","patchThemeTag","themeName","tagName","css","warn","A11yUi","Themes","patchTheme","map","tagNames","Object","getOwnPropertyNames","forEach","cssStyle","getThemeNode","element","HTMLElement","dataset","theme","parentNode","ShadowRoot","host","getEncroachCss","themeEncroachCss","themeReset","mode","themeEncroachCssMode","isTheCurrentThemeConfigValid","Theme","cache","encroachCss","isTheCurrentThemeNotDefault","getThemeDetails","details","loglevel","themeNode","themeCache","themeLoglevel","getThemeOptionDefaults","options","detect","setConfigureTheme","info","registered","register","themes","loaders","Set","Array","isArray","error","promises","loader","push","Promise","all","STYLING_TASK_QUEUE","Map","HYDRATED_HISTORY","CSS_PROPERTIES_REGISTERED","CSS_STYLE_CACHE","REGEX_CSS_PROPERTIES","REGEX_SPLIT_CSS_PROPERTY","extractProperties","properties","match","filter","property","style","createElement","innerHTML","join","querySelector","appendChild","add","getCssStyle","replace","removeStyle","shadow","childNode","from","childNodes","HTMLStyleElement","removeChild","patchStyle","styles","styleSheets","styleSheet","CSSStyleSheet","replaceSync","adoptedStyleSheets","reverse","styleElement","insertBefore","firstChild","encroachStyles","defaultStyleNodes","node","defaultStyleSheets","unshift","cssRules","rule","cssText","setThemeStyleAfterHydrated","elm","themeDetails","styleDisplay","shadowRoot","get","has","switchStyle","PROPERTY_STYLE","GLOBAL_STYLE","TAG_STYLE","STYLES","set","display","logHydratedHistory","timestamp","Date","now","numberOfTasks","size","pushToDoTask","loggedPushToDoTask","deleteDoneTask","delete","loggedDeleteDoneTask","waitForHydrated","T","setTimeout","clearTimeout","classList","contains","observerCallback","mutationsList","mutation","target","observerOptions","attributes","attributeFilter","childList","subtree","observer","MutationObserver","setThemeStyle","observe"],"sources":["./node_modules/loglevel/lib/loglevel.js","./node_modules/@a11y-ui/core/dist/index.mjs"],"sourcesContent":["/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (\n /Trident\\/|MSIE /.test(window.navigator.userAgent)\n );\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Trace() doesn't print the message in IE, so for that case we need to wrap it\n function traceForIE() {\n if (console.log) {\n if (console.log.apply) {\n console.log.apply(console, arguments);\n } else {\n // In old IE, native console methods themselves don't have apply().\n Function.prototype.apply.apply(console.log, [console, arguments]);\n }\n }\n if (console.trace) console.trace();\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (methodName === 'trace' && isIE) {\n return traceForIE;\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods(level, loggerName) {\n /*jshint validthis:true */\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, loggerName);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this, level, loggerName);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, level, loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, defaultLevel, factory) {\n var self = this;\n var currentLevel;\n defaultLevel = defaultLevel == null ? \"WARN\" : defaultLevel;\n\n var storageKey = \"loglevel\";\n if (typeof name === \"string\") {\n storageKey += \":\" + name;\n } else if (typeof name === \"symbol\") {\n storageKey = undefined;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType || !storageKey) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var location = cookie.indexOf(\n encodeURIComponent(storageKey) + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n function clearPersistedLevel() {\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage.removeItem(storageKey);\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC\";\n } catch (ignore) {}\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n return currentLevel;\n };\n\n self.setLevel = function (level, persist) {\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n currentLevel = level;\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(level);\n }\n replaceLoggingMethods.call(self, level, name);\n if (typeof console === undefinedType && level < self.levels.SILENT) {\n return \"No console available for logging\";\n }\n } else {\n throw \"log.setLevel() called with invalid level: \" + level;\n }\n };\n\n self.setDefaultLevel = function (level) {\n defaultLevel = level;\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.resetLevel = function () {\n self.setLevel(defaultLevel, false);\n clearPersistedLevel();\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n // Initialize with the right level\n var initialLevel = getPersistedLevel();\n if (initialLevel == null) {\n initialLevel = defaultLevel;\n }\n self.setLevel(initialLevel, false);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n var defaultLogger = new Logger();\n\n var _loggersByName = {};\n defaultLogger.getLogger = function getLogger(name) {\n if ((typeof name !== \"symbol\" && typeof name !== \"string\") || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name, defaultLogger.getLevel(), defaultLogger.methodFactory);\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n // ES6 default export, for compatibility\n defaultLogger['default'] = defaultLogger;\n\n return defaultLogger;\n}));\n","import log from 'loglevel';\n\nconst createTranslation = (name, map) => {\n return (patch) => patch(name, map);\n};\n\nconst createTheme = (name, map) => {\n return (patch) => patch(name, map);\n};\n\nconst STORE = typeof window === \"object\" ? window : typeof global === \"object\" ? global : typeof self === \"object\" ? self : {};\n\nlet lockThemePatching = true;\nlet warrentyWarning = false;\nconst THEME_NAME_PATTERN = /^[a-z][a-z0-9]{1,}(-[a-z0-9]+)?$/;\nconst isThemeNameValid = (name) => {\n return typeof name === \"string\" && THEME_NAME_PATTERN.test(name);\n};\nconst validateThemeName = (name) => {\n if (isThemeNameValid(name) === false) {\n throw new Error(\n `[Theming] The theme identifier \"${typeof name === \"string\" ? name : \"\"}\" (Type: ${typeof name}) is not valid. Please use only follow this pattern: /^[a-z][a-z0-9]{1,}(-[a-z0-9]+)?$/`\n );\n }\n};\nconst patchThemeTag = (themeName, tagName, css) => {\n validateThemeName(themeName);\n if (lockThemePatching === true && warrentyWarning === false) {\n warrentyWarning = true;\n log.warn(\n `[Theming] The theme process is locked. This means that the theme \"${themeName}\" should not be patched.\n\nimport { register } from '@a11y-ui/core';\nimport { defineCustomElements } from '...';\nimport { THEME } from '...';\n\nregister(THEME, defineCustomElements)\n\t.then(() => {\n\t\tconst htmlDivElement: HTMLElement | null = document.querySelector<HTMLElement>('#my-app');\n if (htmlDivElement instanceof HTMLElement) {\n const root = createRoot(htmlDivElement);\n root.render(<App />);\n }\n })\n .catch(console.warn);`\n );\n }\n if (typeof STORE.A11yUi !== \"object\" || STORE.A11yUi === null) {\n STORE.A11yUi = {};\n }\n if (typeof STORE.A11yUi === \"object\" && STORE.A11yUi !== null && (typeof STORE.A11yUi.Themes !== \"object\" || STORE.A11yUi.Themes === null)) {\n STORE.A11yUi.Themes = {};\n }\n if (typeof STORE.A11yUi === \"object\" && STORE.A11yUi !== null && typeof STORE.A11yUi.Themes === \"object\" && STORE.A11yUi.Themes !== null && (typeof STORE.A11yUi.Themes[themeName] !== \"object\" || STORE.A11yUi.Themes[themeName] === null)) {\n STORE.A11yUi.Themes[themeName] = {};\n }\n if (typeof STORE.A11yUi === \"object\" && STORE.A11yUi !== null && typeof STORE.A11yUi.Themes === \"object\" && STORE.A11yUi.Themes !== null && typeof STORE.A11yUi.Themes[themeName] === \"object\" && STORE.A11yUi.Themes[themeName] !== null) {\n STORE.A11yUi.Themes[themeName][tagName] = css;\n }\n};\nconst patchTheme = (name, map) => {\n validateThemeName(name);\n if (typeof map === \"object\" && map !== null) {\n const tagNames = Object.getOwnPropertyNames(map);\n tagNames.forEach((tagName) => {\n const cssStyle = map[tagName];\n if (typeof cssStyle === \"string\" && cssStyle.length > 0) {\n patchThemeTag(name, tagName, cssStyle);\n }\n });\n }\n return name;\n};\nconst getThemeNode = (element) => {\n if (element instanceof HTMLElement) {\n if (typeof element.dataset.theme === \"string\") {\n return element;\n } else {\n let parentNode = element.parentNode;\n while (parentNode instanceof ShadowRoot) {\n parentNode = parentNode.host;\n }\n return getThemeNode(parentNode);\n }\n } else {\n return null;\n }\n};\nconst getEncroachCss = (dataset = {}) => {\n if (dataset.themeEncroachCss === \"false\" || dataset.themeReset === \"true\") {\n return false;\n } else {\n return {\n mode: dataset.themeEncroachCssMode === \"after\" || dataset.themeEncroachCssMode === \"before\" ? dataset.themeEncroachCssMode : \"before\"\n };\n }\n};\nconst isTheCurrentThemeConfigValid = () => typeof STORE.A11yUi === \"object\" && STORE.A11yUi !== null && typeof STORE.A11yUi.Theme === \"object\" && STORE.A11yUi.Theme !== null && typeof STORE.A11yUi.Theme.cache === \"boolean\" && typeof STORE.A11yUi.Theme.encroachCss === \"object\" && typeof STORE.A11yUi.Theme.encroachCss !== null && typeof STORE.A11yUi.Theme.encroachCss.mode === \"string\" && typeof STORE.A11yUi.Theme.name === \"string\";\nconst isTheCurrentThemeNotDefault = () => (typeof STORE.A11yUi === \"object\" && STORE.A11yUi !== null) === false || (typeof STORE.A11yUi.Theme === \"object\" && STORE.A11yUi.Theme !== null) === false || STORE.A11yUi.Theme.name !== \"default\";\nconst getThemeDetails = (element) => {\n if (isTheCurrentThemeConfigValid()) {\n return STORE.A11yUi.Theme;\n } else {\n const details = {\n cache: true,\n encroachCss: getEncroachCss(),\n loglevel: \"silent\",\n name: null\n };\n const themeNode = getThemeNode(element);\n if (themeNode instanceof HTMLElement) {\n details.cache = themeNode.dataset.themeCache !== \"false\";\n details.encroachCss = getEncroachCss(themeNode.dataset);\n details.loglevel = themeNode.dataset.themeLoglevel === \"debug\" ? themeNode.dataset.themeLoglevel : \"silent\";\n details.name = themeNode.dataset.theme || null;\n }\n return details;\n }\n};\nconst getTheme = (element) => {\n return getThemeDetails(element).name;\n};\nconst getThemeOptionDefaults = (themeName, options) => {\n return {\n cache: options.cache !== false,\n // default: true\n detect: options.detect === \"auto\" ? \"auto\" : \"fixed\",\n // default: 'fixed'\n encroachCss: options.encroachCss === false ? false : typeof options.encroachCss === \"object\" && options.encroachCss != null && (options.encroachCss.mode === \"after\" || options.encroachCss.mode === \"before\") ? options.encroachCss : {\n mode: \"before\"\n // default: 'before'\n },\n loglevel: options.loglevel === \"debug\" ? options.loglevel : \"silent\",\n // default: 'silent'\n name: typeof options.name === \"string\" ? options.name : themeName\n // default: themeName\n };\n};\nconst setConfigureTheme = (themeName, options) => {\n if (isTheCurrentThemeConfigValid() === false && isTheCurrentThemeNotDefault()) {\n if (\n // Die Options müssen ein Objekt sein.\n typeof options === \"object\" && options !== null\n ) {\n options = getThemeOptionDefaults(themeName, options);\n if (\n /**\n * The presetting of theme options is only relevant by using 'fixed'\n * detection mode.\n */\n options.detect === \"fixed\"\n ) {\n if (options.name === null && typeof themeName === \"string\") {\n options.name = themeName;\n }\n if (\n /**\n * Wenn mehrere Themes geladen werden, dann wird nur der Theme-Name gesetzt,\n * der mit dem Name eines Themes übereinstimmt.\n */\n themeName === options.name\n ) {\n if (typeof STORE.A11yUi !== \"object\" || STORE.A11yUi === null) {\n STORE.A11yUi = {};\n }\n STORE.A11yUi.Theme = options;\n log.info(`[Theming] Theme \"${themeName}\" was set as default theme.`);\n }\n } else {\n log.warn(`[Theming] The presetting of theme options is only relevant by using 'fixed' detection mode.`);\n }\n }\n }\n};\nlet registered = false;\nconst register = (themes, loaders, options = {}) => {\n if (registered === false) {\n registered = true;\n lockThemePatching = false;\n }\n if (typeof themes === \"function\") {\n themes = /* @__PURE__ */ new Set([themes]);\n } else if (Array.isArray(themes)) {\n themes = new Set(themes);\n }\n if (themes instanceof Set) {\n themes.forEach((theme) => {\n if (typeof theme === \"function\" && theme.length === 1) {\n setConfigureTheme(theme(patchTheme), {\n cache: options.theme?.cache,\n detect: options.theme?.detect,\n encroachCss: options.theme?.encroachCss,\n name: options.theme?.name\n });\n } else {\n log.error(`[Theming] Es wurde versucht eine nicht kompatibles Theme zu laden.`);\n }\n });\n }\n lockThemePatching = true;\n if (typeof loaders === \"function\") {\n loaders = /* @__PURE__ */ new Set([loaders]);\n } else if (Array.isArray(loaders)) {\n loaders = new Set(loaders);\n }\n const promises = [];\n loaders.forEach((loader) => promises.push(loader()));\n return Promise.all(promises);\n};\n\nconst _RobustStore = class {\n constructor(object, identifier) {\n this.store = this.createStore(object, identifier);\n }\n static getInstance(identifier, object) {\n let instance = _RobustStore.instances.get(identifier);\n if (instance === void 0) {\n instance = new _RobustStore(object, identifier);\n _RobustStore.instances.set(identifier, instance);\n }\n return instance;\n }\n createStore(object, identifier) {\n Object.defineProperty(object, identifier, {\n enumerable: false,\n value: {},\n writable: false\n });\n return object[identifier];\n }\n recursiveSetItem(store, key, value, options = _RobustStore.options) {\n let storeValue = typeof value === \"object\" && value !== null ? {} : value;\n Object.defineProperty(store, key, {\n enumerable: options.enumerable === true,\n get: () => storeValue,\n /**\n * Die set Methode muss eigentlich ein this.recursiveSetItem aufrufen.\n */\n set: options.immutable === true ? void 0 : (value2) => storeValue = value2\n });\n if (typeof value === \"object\" && value !== null) {\n for (const [k, v] of Object.entries(value)) {\n this.recursiveSetItem(store[key], k, v, options);\n }\n }\n }\n setItem(key, value, options = _RobustStore.options) {\n this.recursiveSetItem(this.store, key, value, options);\n return this;\n }\n getItem(key) {\n if (Array.isArray(key)) {\n return key.map((k) => this.getItem(k));\n }\n return this.store[key];\n }\n};\nlet RobustStore = _RobustStore;\nRobustStore.options = {\n enumerable: false,\n immutable: false\n};\nRobustStore.instances = /* @__PURE__ */ new Map();\n\nconst STYLING_TASK_QUEUE = /* @__PURE__ */ new Map();\nconst HYDRATED_HISTORY = [];\nconst CSS_PROPERTIES_REGISTERED = /* @__PURE__ */ new Set();\nconst CSS_STYLE_CACHE = /* @__PURE__ */ new Map();\nconst REGEX_CSS_PROPERTIES = /--[^;]+/g;\nconst REGEX_SPLIT_CSS_PROPERTY = /:/;\nif (typeof STORE.A11yUi !== \"object\" || STORE.A11yUi === null) {\n STORE.A11yUi = {\n CSS_STYLE_CACHE,\n HYDRATED_HISTORY,\n STYLING_TASK_QUEUE\n };\n}\nconst extractProperties = (themeName, css) => {\n let properties = css.match(REGEX_CSS_PROPERTIES);\n if (Array.isArray(properties)) {\n properties = properties.filter((property) => REGEX_SPLIT_CSS_PROPERTY.test(property));\n const style = document.createElement(\"style\");\n style.innerHTML = `.${themeName} {${properties.join(\";\")}}`;\n document.querySelector(\"head\")?.appendChild(style);\n }\n CSS_PROPERTIES_REGISTERED.add(themeName);\n};\nconst getCssStyle = (themeName, tagName) => {\n if (\n /**\n * Search custom StyleSheet in Config\n * TODO: Performance???\n */\n typeof STORE.A11yUi === \"object\" && STORE.A11yUi !== null && typeof STORE.A11yUi.Themes === \"object\" && STORE.A11yUi.Themes !== null && typeof STORE.A11yUi.Themes[themeName] === \"object\" && STORE.A11yUi.Themes[themeName] !== null && typeof STORE.A11yUi.Themes[themeName][tagName] === \"string\"\n ) {\n return STORE.A11yUi.Themes[themeName][tagName].replace(\n /\\r?\\n/g,\n \"\"\n );\n } else {\n return \"\";\n }\n};\nconst removeStyle = (shadow) => {\n for (const childNode of Array.from(shadow.childNodes)) {\n if (childNode instanceof HTMLStyleElement && childNode.tagName === \"STYLE\") {\n shadow.removeChild(childNode);\n } else {\n break;\n }\n }\n};\nconst patchStyle = (shadow, styles) => {\n try {\n const styleSheets = [];\n styles.forEach((style) => {\n const styleSheet = new CSSStyleSheet();\n styleSheet.replaceSync(style);\n styleSheets.push(styleSheet);\n });\n shadow.adoptedStyleSheets = styleSheets;\n } catch (e) {\n styles.reverse().forEach((style) => {\n const styleElement = document.createElement(\"style\");\n styleElement.innerHTML = style;\n shadow.insertBefore(styleElement, shadow.firstChild);\n });\n }\n};\nconst encroachStyles = (shadow, styles, encroachCss) => {\n if (encroachCss !== false) {\n const defaultStyleNodes = [\n ...Array.from(shadow.childNodes).filter((node) => node instanceof HTMLStyleElement && node.tagName === \"STYLE\")\n ];\n let defaultStyleSheets;\n try {\n defaultStyleSheets = [...Array.from(shadow.adoptedStyleSheets)];\n } catch (e) {\n defaultStyleSheets = [];\n }\n if (encroachCss?.mode === \"before\") {\n defaultStyleNodes.reverse().forEach((style) => styles.unshift(style.innerHTML));\n defaultStyleSheets.reverse().forEach(\n (style) => styles.unshift(\n Array.from(style.cssRules).map((rule) => rule.cssText).join(\"\")\n )\n );\n } else if (encroachCss?.mode === \"after\") {\n defaultStyleNodes.forEach((style) => styles.push(style.innerHTML));\n defaultStyleSheets.forEach(\n (style) => styles.push(\n Array.from(style.cssRules).map((rule) => rule.cssText).join(\"\")\n )\n );\n }\n }\n};\nconst setThemeStyleAfterHydrated = (elm, themeDetails, styleDisplay) => {\n const themeName = themeDetails.name || \"default\";\n let shadow;\n try {\n if (elm.shadowRoot === null) {\n throw new Error(\"ShadowRoot is null\");\n }\n shadow = elm.shadowRoot;\n } catch (e) {\n shadow = elm;\n }\n if (CSS_STYLE_CACHE.get(themeName)?.has(elm.tagName)) {\n switchStyle(elm, shadow, CSS_STYLE_CACHE.get(themeName)?.get(elm.tagName), styleDisplay);\n } else {\n const PROPERTY_STYLE = getCssStyle(themeName, \"PROPERTIES\");\n const GLOBAL_STYLE = getCssStyle(themeName, \"GLOBAL\");\n const TAG_STYLE = getCssStyle(themeName, elm.tagName);\n if (CSS_PROPERTIES_REGISTERED.has(themeName) === false) {\n extractProperties(themeName, GLOBAL_STYLE);\n }\n const STYLES = [PROPERTY_STYLE, GLOBAL_STYLE, TAG_STYLE];\n encroachStyles(shadow, STYLES, themeDetails.encroachCss);\n if (themeDetails.loglevel === \"debug\") {\n console.log(elm.tagName, STYLES);\n }\n if (themeDetails.cache === true) {\n if (CSS_STYLE_CACHE.has(themeName) === false) {\n CSS_STYLE_CACHE.set(themeName, /* @__PURE__ */ new Map());\n }\n CSS_STYLE_CACHE.get(themeName)?.set(elm.tagName, STYLES);\n }\n switchStyle(elm, shadow, STYLES, styleDisplay);\n }\n};\nconst switchStyle = (elm, shadow, styles, styleDisplay) => {\n removeStyle(shadow);\n patchStyle(shadow, styles);\n elm.style.display = styleDisplay;\n};\nconst logHydratedHistory = (themeDetails) => {\n if (themeDetails.loglevel === \"debug\") {\n HYDRATED_HISTORY.push({\n timestamp: Date.now(),\n numberOfTasks: STYLING_TASK_QUEUE.size\n });\n }\n};\nconst pushToDoTask = (elm, themeDetails) => {\n STYLING_TASK_QUEUE.set(elm, {\n /**\n * Das Element soll solange nicht sichtbar bleiben\n * bis der Style im DOM gesetzt ist.\n */\n styleDisplay: `${elm.style.display}`,\n themeDetails\n });\n};\nconst loggedPushToDoTask = (elm, themeDetails) => {\n pushToDoTask(elm, themeDetails);\n logHydratedHistory(themeDetails);\n};\nconst deleteDoneTask = (elm) => {\n STYLING_TASK_QUEUE.delete(elm);\n};\nconst loggedDeleteDoneTask = (elm, themeDetails) => {\n deleteDoneTask(elm);\n logHydratedHistory(themeDetails);\n};\nconst waitForHydrated = (elm) => {\n const T = setTimeout(() => {\n clearTimeout(T);\n if (STYLING_TASK_QUEUE.has(elm) && elm.classList.contains(\"hydrated\")) {\n const { styleDisplay, themeDetails } = STYLING_TASK_QUEUE.get(elm);\n setThemeStyleAfterHydrated(elm, themeDetails, styleDisplay);\n loggedDeleteDoneTask(elm, themeDetails);\n } else {\n waitForHydrated(elm);\n }\n }, 25);\n};\nconst observerCallback = (mutationsList) => {\n for (const mutation of mutationsList) {\n if (\n /**\n * Save by observer config\n */\n // mutation.type === 'attributes' &&\n // mutation.attributeName === 'class' &&\n /**\n * Implizit check for HTMLElement\n */\n // mutation.target &&\n STYLING_TASK_QUEUE.has(mutation.target) && mutation.target.classList.contains(\"hydrated\")\n ) {\n const { styleDisplay, themeDetails } = STYLING_TASK_QUEUE.get(mutation.target);\n setThemeStyleAfterHydrated(mutation.target, themeDetails, styleDisplay);\n loggedDeleteDoneTask(mutation.target, themeDetails);\n }\n }\n};\nconst observerOptions = {\n attributes: true,\n attributeFilter: [\"class\"],\n childList: false,\n subtree: false\n};\nlet observer;\ntry {\n observer = new MutationObserver(observerCallback);\n} catch (e) {\n observer = null;\n}\nconst setThemeStyle = (elm, themeDetails) => {\n loggedPushToDoTask(elm, themeDetails);\n if (observer) {\n observer.observe(elm, observerOptions);\n } else {\n waitForHydrated(elm);\n }\n elm.style.display = \"none\";\n};\n\nclass Theme {\n constructor(prefix, keyEnum, tagEnum) {\n this.createTheme = (name, map) => createTheme(name, map);\n this.createTranslation = (name, map) => createTranslation(name, map);\n this.Prefix = prefix;\n this.Key = Object.getOwnPropertyNames(keyEnum);\n this.Tag = Object.getOwnPropertyNames(tagEnum);\n }\n}\n\nexport { RobustStore, STORE, Theme, getTheme, getThemeDetails, patchTheme, patchThemeTag, register, setThemeStyle };\n"],"mappings":";;;iYAMC,SAAUA,EAAMC,GAIN,GAAkCC,EAAOC,QAAS,CACrDD,EAAAC,QAAiBF,GACzB,KAAW,CACHD,EAAKI,IAAMH,GACnB,CACA,EATA,CASEI,GAAM,WAIJ,IAAIC,EAAO,WAAW,EACtB,IAAIC,EAAgB,YACpB,IAAIC,SAAeC,SAAWF,UAA0BE,OAAOC,YAAcH,GACzE,kBAAkBI,KAAKF,OAAOC,UAAUE,WAG5C,IAAIC,EAAa,CACb,QACA,QACA,OACA,OACA,SAIJ,SAASC,EAAWC,EAAKC,GACrB,IAAIC,EAASF,EAAIC,GACjB,UAAWC,EAAOC,OAAS,WAAY,CACnC,OAAOD,EAAOC,KAAKH,EAC/B,KAAe,CACH,IACI,OAAOI,SAASC,UAAUF,KAAKG,KAAKJ,EAAQF,EAC5D,CAAc,MAAOO,GAEL,OAAO,WACH,OAAOH,SAASC,UAAUG,MAAMA,MAAMN,EAAQ,CAACF,EAAKS,WACxE,CACA,CACA,CACA,CAGI,SAASC,IACL,GAAIC,QAAQtB,IAAK,CACb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E,MAAM3B,aAAEA,EAAYD,aAAEA,GAAiBjD,EAAmBoD,IAAIJ,GAC9DD,EAA2BC,EAAKC,EAAcC,GAC9CqB,EAAqBvB,EAAKC,EAChC,KAAW,CACLuB,EAAgBxB,EACtB,IACK,GAAG,EAER,MAAM8B,EAAoBC,IACxB,IAAK,MAAMC,KAAYD,EAAe,CACpC,GAUE/E,EAAmBqD,IAAI2B,EAASC,SAAWD,EAASC,OAAOL,UAAUC,SAAS,YAC9E,CACA,MAAM3B,aAAEA,EAAYD,aAAEA,GAAiBjD,EAAmBoD,IAAI4B,EAASC,QACvElC,EAA2BiC,EAASC,OAAQhC,EAAcC,GAC1DqB,EAAqBS,EAASC,OAAQhC,EAC5C,CACA,GAEA,MAAMiC,EAAkB,CACtBC,WAAY,KACZC,gBAAiB,CAAC,SAClBC,UAAW,MACXC,QAAS,OAEX,IAAIC,EACJ,IACEA,EAAW,IAAIC,iBAAiBV,EAClC,CAAE,MAAO9M,GACPuN,EAAW,IACb,CACK,MAACE,EAAgB,CAACzC,EAAKC,KAC1BmB,EAAmBpB,EAAKC,GACxB,GAAIsC,EAAU,CACZA,EAASG,QAAQ1C,EAAKkC,EAC1B,KAAS,CACLV,EAAgBxB,EACpB,CACEA,EAAIpC,MAAMgD,QAAU,MAAM,S"}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as i,h as t,H as o,g as n}from"./index-50adf9a0.js";import{a as s}from"./reuse-9dd1192b.js";const e=":host{--kolibri-border-color:#666;--kolibri-border-radius:0.125rem;--kolibri-border-width:1px;--kolibri-color-error:#f44336;--kolibri-color-info:#2196f3;--kolibri-color-success:#4caf50;--kolibri-color-warning:#ff9800;--kolibri-color-primary:#3f51b5;--kolibri-color-secondary:#ff4081;--kolibri-color-normal:#9e9e9e;--kolibri-color-danger:#f44336;--kolibri-color-ghost:#f5f5f5;--kolibri-color-disabled:#bdbdbd;--kolibri-color-text:#222222;--kolibri-color-visited:#9c27b0;--kolibri-font-family:Verdana, Arial, Tahoma, Helvetica, sans-serif;--kolibri-font-size:16px;--kolibri-spacing:0.25rem}:host{font-family:inherit;font-size:inherit}:host *{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{font-family:var(--kolibri-font-family);font-size:inherit}*{box-sizing:border-box}kol-icon{color:inherit}kol-span-wc{display:grid;place-items:center;width:100%}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}a{display:inline-flex;place-items:baseline}button{background-color:transparent;border-width:0;margin:0;min-height:44px;min-width:44px;padding:0}a,button,input,select,textarea{cursor:pointer}a.icon-only>kol-span-wc>span>span,:host button.icon-only>kol-span-wc>span>span{display:none}h1,h2,h3,h4,h5,h6{font-family:var(--kolibri-font-family);font-size:var(--kolibri-font-size);margin:0;padding:0}:host{display:inline-block}:host>kol-button-wc,:host>kol-link-wc{width:inherit}:host>kol-button-wc a,:host>kol-button-wc button,:host>kol-link-wc a,:host>kol-link-wc button{cursor:pointer;display:inline-block;min-height:44px;min-width:44px;padding:0;text-align:center;transition-duration:0.5s;transition-property:background-color, color, border-color;width:inherit}:host>kol-button-wc a:active,:host>kol-button-wc button:active,:host>kol-link-wc a:active,:host>kol-link-wc button:active{outline:0;box-shadow:none}:host>kol-button-wc a:disabled,:host>kol-button-wc button:disabled,:host>kol-link-wc a:disabled,:host>kol-link-wc button:disabled{box-shadow:none;cursor:not-allowed;opacity:0.5}",r=class{constructor(o){i(this,o),this.catchRef=i=>{this.ref=i,s(this.host,this.ref)},this._accessKey=void 0,this._ariaControls=void 0,this._ariaCurrent=void 0,this._ariaExpanded=void 0,this._ariaLabel="",this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._icon=void 0,this._iconAlign="left",this._iconOnly=!1,this._id=void 0,this._label=void 0,this._on=void 0,this._role=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._type="button",this._value=void 0,this._variant="normal"}render(){return t(o,null,t("kol-button-wc",{ref:this.catchRef,class:{button:!0,[this._variant]:"custom"!==this._variant,[this._customClass]:"custom"===this._variant&&"string"==typeof this._customClass&&this._customClass.length>0},_accessKey:this._accessKey,_ariaControls:this._ariaControls,_ariaCurrent:this._ariaCurrent,_ariaExpanded:this._ariaExpanded,_ariaLabel:this._ariaLabel,_ariaSelected:this._ariaSelected,_customClass:this._customClass,_disabled:this._disabled,_icon:this._icon,_iconAlign:this._iconAlign,_iconOnly:this._iconOnly,_id:this._id,_label:this._label,_on:this._on,_role:this._role,_tabIndex:this._tabIndex,_tooltipAlign:this._tooltipAlign,_type:this._type,_value:this._value,_variant:this._variant},t("slot",{name:"expert",slot:"expert"})))}get host(){return n(this)}};r.style={default:e};export{r as kol_button};
4
+ import{r as i,h as t,H as o,g as n}from"./index-50adf9a0.js";import{a as s}from"./reuse-9dd1192b.js";const e=":host{--kolibri-border-color:#666;--kolibri-border-radius:0.125rem;--kolibri-border-width:1px;--kolibri-color-error:#f44336;--kolibri-color-info:#2196f3;--kolibri-color-success:#4caf50;--kolibri-color-warning:#ff9800;--kolibri-color-primary:#3f51b5;--kolibri-color-secondary:#ff4081;--kolibri-color-normal:#9e9e9e;--kolibri-color-danger:#f44336;--kolibri-color-ghost:#f5f5f5;--kolibri-color-disabled:#bdbdbd;--kolibri-color-text:#222222;--kolibri-color-visited:#9c27b0;--kolibri-font-family:Verdana, Arial, Tahoma, Helvetica, sans-serif;--kolibri-font-size:16px;--kolibri-spacing:0.25rem}:host{font-family:inherit;font-size:inherit}:host *{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{font-family:var(--kolibri-font-family);font-size:inherit}*{box-sizing:border-box}kol-icon{color:inherit}kol-span-wc{display:grid;place-items:center;width:100%}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}a{display:inline-flex;place-items:baseline}button{background-color:transparent;border-width:0;margin:0;min-height:44px;min-width:44px;padding:0}a,button,input,select,textarea{cursor:pointer}a.icon-only>kol-span-wc>span>span,:host button.icon-only>kol-span-wc>span>span{display:none}h1,h2,h3,h4,h5,h6{font-family:var(--kolibri-font-family);font-size:var(--kolibri-font-size);margin:0;padding:0}:host{display:inline-block}:host>kol-button-wc,:host>kol-link-wc{width:inherit}:host>kol-button-wc a,:host>kol-button-wc button,:host>kol-link-wc a,:host>kol-link-wc button{cursor:pointer;display:inline-block;font-size:1rem;min-height:44px;min-width:44px;padding:0;text-align:center;transition-duration:0.5s;transition-property:background-color, color, border-color;width:inherit}:host>kol-button-wc a:active,:host>kol-button-wc button:active,:host>kol-link-wc a:active,:host>kol-link-wc button:active{outline:0;box-shadow:none}:host>kol-button-wc a:disabled,:host>kol-button-wc button:disabled,:host>kol-link-wc a:disabled,:host>kol-link-wc button:disabled{box-shadow:none;cursor:not-allowed;opacity:0.5}",r=class{constructor(o){i(this,o),this.catchRef=i=>{this.ref=i,s(this.host,this.ref)},this._accessKey=void 0,this._ariaControls=void 0,this._ariaCurrent=void 0,this._ariaExpanded=void 0,this._ariaLabel="",this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._icon=void 0,this._iconAlign="left",this._iconOnly=!1,this._id=void 0,this._label=void 0,this._on=void 0,this._role=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._type="button",this._value=void 0,this._variant="normal"}render(){return t(o,null,t("kol-button-wc",{ref:this.catchRef,class:{button:!0,[this._variant]:"custom"!==this._variant,[this._customClass]:"custom"===this._variant&&"string"==typeof this._customClass&&this._customClass.length>0},_accessKey:this._accessKey,_ariaControls:this._ariaControls,_ariaCurrent:this._ariaCurrent,_ariaExpanded:this._ariaExpanded,_ariaLabel:this._ariaLabel,_ariaSelected:this._ariaSelected,_customClass:this._customClass,_disabled:this._disabled,_icon:this._icon,_iconAlign:this._iconAlign,_iconOnly:this._iconOnly,_id:this._id,_label:this._label,_on:this._on,_role:this._role,_tabIndex:this._tabIndex,_tooltipAlign:this._tooltipAlign,_type:this._type,_value:this._value,_variant:this._variant},t("slot",{name:"expert",slot:"expert"})))}get host(){return n(this)}};r.style={default:e};export{r as kol_button};
@@ -1 +1 @@
1
- {"version":3,"names":["defaultStyleCss","KolButton","this","catchRef","ref","propergateFocus","host","render","h","Host","class","button","_variant","_customClass","length","_accessKey","_ariaControls","_ariaCurrent","_ariaExpanded","_ariaLabel","_ariaSelected","_disabled","_icon","_iconAlign","_iconOnly","_id","_label","_on","_role","_tabIndex","_tooltipAlign","_type","_value","name","slot"],"sources":["./src/components/button/style.css?tag=kol-button&mode=default&encapsulation=shadow","./src/components/button/shadow.tsx"],"sourcesContent":["@import '../button.css';\n","import { Component, Element, h, Host, JSX, Prop } from '@stencil/core';\n\nimport { Generic } from '@a11y-ui/core';\nimport {\n\tAlternativButtonLinkRole,\n\tAriaCurrent,\n\tKoliBriButtonCallbacks,\n\tKoliBriButtonType,\n\tKoliBriButtonVariant,\n\tOptionalButtonProps,\n\tRequiredButtonProps,\n} from '../../types/button-link';\nimport { Stringified } from '../../types/common';\nimport { KoliBriIconProp } from '../../types/icon';\nimport { Alignment } from '../../types/props/alignment';\nimport { propergateFocus } from '../../utils/reuse';\n\n@Component({\n\ttag: 'kol-button',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolButton implements Generic.Element.Members<RequiredButtonProps, OptionalButtonProps> {\n\t@Element() private readonly host?: HTMLKolButtonElement;\n\tprivate ref?: HTMLKolButtonWcElement;\n\n\tprivate readonly catchRef = (ref?: HTMLKolButtonWcElement) => {\n\t\tthis.ref = ref;\n\t\tpropergateFocus(this.host, this.ref);\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<kol-button-wc\n\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tbutton: true,\n\t\t\t\t\t\t[this._variant as string]: this._variant !== 'custom',\n\t\t\t\t\t\t[this._customClass as string]: this._variant === 'custom' && typeof this._customClass === 'string' && this._customClass.length > 0,\n\t\t\t\t\t}}\n\t\t\t\t\t_accessKey={this._accessKey}\n\t\t\t\t\t_ariaControls={this._ariaControls}\n\t\t\t\t\t_ariaCurrent={this._ariaCurrent}\n\t\t\t\t\t_ariaExpanded={this._ariaExpanded}\n\t\t\t\t\t_ariaLabel={this._ariaLabel}\n\t\t\t\t\t_ariaSelected={this._ariaSelected}\n\t\t\t\t\t_customClass={this._customClass}\n\t\t\t\t\t_disabled={this._disabled}\n\t\t\t\t\t_icon={this._icon}\n\t\t\t\t\t_iconAlign={this._iconAlign}\n\t\t\t\t\t_iconOnly={this._iconOnly}\n\t\t\t\t\t_id={this._id}\n\t\t\t\t\t_label={this._label}\n\t\t\t\t\t_on={this._on}\n\t\t\t\t\t_role={this._role}\n\t\t\t\t\t_tabIndex={this._tabIndex}\n\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t\t_type={this._type}\n\t\t\t\t\t_value={this._value}\n\t\t\t\t\t_variant={this._variant}\n\t\t\t\t>\n\t\t\t\t\t{/*\n\t\t\t\t\t\tEs ist keine gute Idee hier einen Slot einzufügen, da dadurch ermöglicht wird,\n\t\t\t\t\t\tdie Unterstützung hinsichtlich der Barrierefreiheit der Komponente zu umgehen.\n\t\t\t\t\t*/}\n\t\t\t\t\t<slot name=\"expert\" slot=\"expert\" />\n\t\t\t\t</kol-button-wc>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt an, mit welcher Tastenkombination man den Button auslösen oder fokussieren kann.\n\t */\n\t@Prop() public _accessKey?: string;\n\n\t/**\n\t * Gibt an, welche Elemente kontrolliert werden. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls)\n\t */\n\t@Prop() public _ariaControls?: string;\n\n\t/**\n\t * Gibt an, welchen aktuellen Auswahlstatus der Button hat. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n\t */\n\t@Prop() public _ariaCurrent?: AriaCurrent;\n\n\t/**\n\t * Gibt an, ob durch den Button etwas aufgeklappt wurde. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n\t */\n\t@Prop({ reflect: true }) public _ariaExpanded?: boolean;\n\n\t/**\n\t * Gibt einen beschreibenden Text des Buttons an. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label)\n\t */\n\t@Prop() public _ariaLabel?: string = '';\n\n\t/**\n\t * Gibt an, ob Element ausgewählt ist (role=tab). (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n\t */\n\t@Prop({ reflect: true }) public _ariaSelected?: boolean;\n\n\t/**\n\t * Gibt an, welche Custom-Class übergeben werden soll, wenn _variant=\"custom\" gesetzt ist.\n\t */\n\t@Prop() public _customClass?: string;\n\n\t/**\n\t * Gibt an, ob der Button deaktiviert ist.\n\t */\n\t@Prop({ reflect: true }) public _disabled?: boolean = false;\n\n\t/**\n\t * Gibt den Class-Identifier eines Icons eine eingebunden Icofont an. (z.B. https://icofont.com/)\n\t */\n\t@Prop() public _icon?: Stringified<KoliBriIconProp>;\n\n\t/**\n\t * Gibt an, ob das Icon links oder rechts dargestellt werden soll.\n\t *\n\t * @deprecated\n\t */\n\t@Prop() public _iconAlign?: Alignment = 'left';\n\n\t/**\n\t * Gibt an, ob nur das Icon angezeigt wird.\n\t */\n\t@Prop({ reflect: true }) public _iconOnly?: boolean = false;\n\n\t/**\n\t * Gibt die ID der Schaltfläche an. (Selection, Testing)\n\t */\n\t@Prop() public _id?: string;\n\n\t/**\n\t * Gibt den Label für die Beschriftung der Schaltfläche an.\n\t */\n\t@Prop() public _label!: string;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für die Button-Events an.\n\t */\n\t@Prop() public _on?: KoliBriButtonCallbacks<unknown>;\n\n\t/**\n\t * Gibt an, welche Role der Schalter hat.\n\t */\n\t@Prop() public _role?: AlternativButtonLinkRole;\n\n\t/**\n\t * Gibt an, welchen Tab-Index der Button hat. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Gibt an, ob der Tooltip oben, rechts, unten oder links angezeigt werden soll.\n\t */\n\t@Prop() public _tooltipAlign?: Alignment = 'top';\n\n\t/**\n\t * Gibt an, welche Typ der Button hat.\n\t */\n\t@Prop() public _type?: KoliBriButtonType = 'button';\n\n\t/**\n\t * Gibt einen Wert an, den der Schalter bei einem Klick zurückgibt.\n\t */\n\t@Prop() public _value?: Stringified<unknown>;\n\n\t/**\n\t * Gibt an, welche Ausprägung der Button hat.\n\t */\n\t@Prop() public _variant?: KoliBriButtonVariant = 'normal';\n}\n"],"mappings":";;;qGAAA,MAAMA,EAAkB,8/D,MCwBXC,EAAS,M,yBAIJC,KAAAC,SAAYC,IAC5BF,KAAKE,IAAMA,EACXC,EAAgBH,KAAKI,KAAMJ,KAAKE,IAAI,E,gIAmEA,G,wEAeiB,M,qCAYd,O,eAKc,M,6HA8BX,M,WAKA,S,oCAUM,Q,CA7I1CG,SACN,OACCC,EAACC,EAAI,KACJD,EAAA,iBACCJ,IAAKF,KAAKC,SACVO,MAAO,CACNC,OAAQ,KACR,CAACT,KAAKU,UAAqBV,KAAKU,WAAa,SAC7C,CAACV,KAAKW,cAAyBX,KAAKU,WAAa,iBAAmBV,KAAKW,eAAiB,UAAYX,KAAKW,aAAaC,OAAS,GAElIC,WAAYb,KAAKa,WACjBC,cAAed,KAAKc,cACpBC,aAAcf,KAAKe,aACnBC,cAAehB,KAAKgB,cACpBC,WAAYjB,KAAKiB,WACjBC,cAAelB,KAAKkB,cACpBP,aAAcX,KAAKW,aACnBQ,UAAWnB,KAAKmB,UAChBC,MAAOpB,KAAKoB,MACZC,WAAYrB,KAAKqB,WACjBC,UAAWtB,KAAKsB,UAChBC,IAAKvB,KAAKuB,IACVC,OAAQxB,KAAKwB,OACbC,IAAKzB,KAAKyB,IACVC,MAAO1B,KAAK0B,MACZC,UAAW3B,KAAK2B,UAChBC,cAAe5B,KAAK4B,cACpBC,MAAO7B,KAAK6B,MACZC,OAAQ9B,KAAK8B,OACbpB,SAAUV,KAAKU,UAMfJ,EAAA,QAAMyB,KAAK,SAASC,KAAK,Y"}
1
+ {"version":3,"names":["defaultStyleCss","KolButton","this","catchRef","ref","propergateFocus","host","render","h","Host","class","button","_variant","_customClass","length","_accessKey","_ariaControls","_ariaCurrent","_ariaExpanded","_ariaLabel","_ariaSelected","_disabled","_icon","_iconAlign","_iconOnly","_id","_label","_on","_role","_tabIndex","_tooltipAlign","_type","_value","name","slot"],"sources":["./src/components/button/style.css?tag=kol-button&mode=default&encapsulation=shadow","./src/components/button/shadow.tsx"],"sourcesContent":["@import '../button.css';\n","import { Component, Element, h, Host, JSX, Prop } from '@stencil/core';\n\nimport { Generic } from '@a11y-ui/core';\nimport {\n\tAlternativButtonLinkRole,\n\tAriaCurrent,\n\tKoliBriButtonCallbacks,\n\tKoliBriButtonType,\n\tKoliBriButtonVariant,\n\tOptionalButtonProps,\n\tRequiredButtonProps,\n} from '../../types/button-link';\nimport { Stringified } from '../../types/common';\nimport { KoliBriIconProp } from '../../types/icon';\nimport { Alignment } from '../../types/props/alignment';\nimport { propergateFocus } from '../../utils/reuse';\n\n@Component({\n\ttag: 'kol-button',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolButton implements Generic.Element.Members<RequiredButtonProps, OptionalButtonProps> {\n\t@Element() private readonly host?: HTMLKolButtonElement;\n\tprivate ref?: HTMLKolButtonWcElement;\n\n\tprivate readonly catchRef = (ref?: HTMLKolButtonWcElement) => {\n\t\tthis.ref = ref;\n\t\tpropergateFocus(this.host, this.ref);\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<kol-button-wc\n\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tbutton: true,\n\t\t\t\t\t\t[this._variant as string]: this._variant !== 'custom',\n\t\t\t\t\t\t[this._customClass as string]: this._variant === 'custom' && typeof this._customClass === 'string' && this._customClass.length > 0,\n\t\t\t\t\t}}\n\t\t\t\t\t_accessKey={this._accessKey}\n\t\t\t\t\t_ariaControls={this._ariaControls}\n\t\t\t\t\t_ariaCurrent={this._ariaCurrent}\n\t\t\t\t\t_ariaExpanded={this._ariaExpanded}\n\t\t\t\t\t_ariaLabel={this._ariaLabel}\n\t\t\t\t\t_ariaSelected={this._ariaSelected}\n\t\t\t\t\t_customClass={this._customClass}\n\t\t\t\t\t_disabled={this._disabled}\n\t\t\t\t\t_icon={this._icon}\n\t\t\t\t\t_iconAlign={this._iconAlign}\n\t\t\t\t\t_iconOnly={this._iconOnly}\n\t\t\t\t\t_id={this._id}\n\t\t\t\t\t_label={this._label}\n\t\t\t\t\t_on={this._on}\n\t\t\t\t\t_role={this._role}\n\t\t\t\t\t_tabIndex={this._tabIndex}\n\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t\t_type={this._type}\n\t\t\t\t\t_value={this._value}\n\t\t\t\t\t_variant={this._variant}\n\t\t\t\t>\n\t\t\t\t\t{/*\n\t\t\t\t\t\tEs ist keine gute Idee hier einen Slot einzufügen, da dadurch ermöglicht wird,\n\t\t\t\t\t\tdie Unterstützung hinsichtlich der Barrierefreiheit der Komponente zu umgehen.\n\t\t\t\t\t*/}\n\t\t\t\t\t<slot name=\"expert\" slot=\"expert\" />\n\t\t\t\t</kol-button-wc>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt an, mit welcher Tastenkombination man den Button auslösen oder fokussieren kann.\n\t */\n\t@Prop() public _accessKey?: string;\n\n\t/**\n\t * Gibt an, welche Elemente kontrolliert werden. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls)\n\t */\n\t@Prop() public _ariaControls?: string;\n\n\t/**\n\t * Gibt an, welchen aktuellen Auswahlstatus der Button hat. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n\t */\n\t@Prop() public _ariaCurrent?: AriaCurrent;\n\n\t/**\n\t * Gibt an, ob durch den Button etwas aufgeklappt wurde. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n\t */\n\t@Prop({ reflect: true }) public _ariaExpanded?: boolean;\n\n\t/**\n\t * Gibt einen beschreibenden Text des Buttons an. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label)\n\t */\n\t@Prop() public _ariaLabel?: string = '';\n\n\t/**\n\t * Gibt an, ob Element ausgewählt ist (role=tab). (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n\t */\n\t@Prop({ reflect: true }) public _ariaSelected?: boolean;\n\n\t/**\n\t * Gibt an, welche Custom-Class übergeben werden soll, wenn _variant=\"custom\" gesetzt ist.\n\t */\n\t@Prop() public _customClass?: string;\n\n\t/**\n\t * Gibt an, ob der Button deaktiviert ist.\n\t */\n\t@Prop({ reflect: true }) public _disabled?: boolean = false;\n\n\t/**\n\t * Gibt den Class-Identifier eines Icons eine eingebunden Icofont an. (z.B. https://icofont.com/)\n\t */\n\t@Prop() public _icon?: Stringified<KoliBriIconProp>;\n\n\t/**\n\t * Gibt an, ob das Icon links oder rechts dargestellt werden soll.\n\t *\n\t * @deprecated\n\t */\n\t@Prop() public _iconAlign?: Alignment = 'left';\n\n\t/**\n\t * Gibt an, ob nur das Icon angezeigt wird.\n\t */\n\t@Prop({ reflect: true }) public _iconOnly?: boolean = false;\n\n\t/**\n\t * Gibt die ID der Schaltfläche an. (Selection, Testing)\n\t */\n\t@Prop() public _id?: string;\n\n\t/**\n\t * Gibt den Label für die Beschriftung der Schaltfläche an.\n\t */\n\t@Prop() public _label!: string;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für die Button-Events an.\n\t */\n\t@Prop() public _on?: KoliBriButtonCallbacks<unknown>;\n\n\t/**\n\t * Gibt an, welche Role der Schalter hat.\n\t */\n\t@Prop() public _role?: AlternativButtonLinkRole;\n\n\t/**\n\t * Gibt an, welchen Tab-Index der Button hat. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Gibt an, ob der Tooltip oben, rechts, unten oder links angezeigt werden soll.\n\t */\n\t@Prop() public _tooltipAlign?: Alignment = 'top';\n\n\t/**\n\t * Gibt an, welche Typ der Button hat.\n\t */\n\t@Prop() public _type?: KoliBriButtonType = 'button';\n\n\t/**\n\t * Gibt einen Wert an, den der Schalter bei einem Klick zurückgibt.\n\t */\n\t@Prop() public _value?: Stringified<unknown>;\n\n\t/**\n\t * Gibt an, welche Ausprägung der Button hat.\n\t */\n\t@Prop() public _variant?: KoliBriButtonVariant = 'normal';\n}\n"],"mappings":";;;qGAAA,MAAMA,EAAkB,6gE,MCwBXC,EAAS,M,yBAIJC,KAAAC,SAAYC,IAC5BF,KAAKE,IAAMA,EACXC,EAAgBH,KAAKI,KAAMJ,KAAKE,IAAI,E,gIAmEA,G,wEAeiB,M,qCAYd,O,eAKc,M,6HA8BX,M,WAKA,S,oCAUM,Q,CA7I1CG,SACN,OACCC,EAACC,EAAI,KACJD,EAAA,iBACCJ,IAAKF,KAAKC,SACVO,MAAO,CACNC,OAAQ,KACR,CAACT,KAAKU,UAAqBV,KAAKU,WAAa,SAC7C,CAACV,KAAKW,cAAyBX,KAAKU,WAAa,iBAAmBV,KAAKW,eAAiB,UAAYX,KAAKW,aAAaC,OAAS,GAElIC,WAAYb,KAAKa,WACjBC,cAAed,KAAKc,cACpBC,aAAcf,KAAKe,aACnBC,cAAehB,KAAKgB,cACpBC,WAAYjB,KAAKiB,WACjBC,cAAelB,KAAKkB,cACpBP,aAAcX,KAAKW,aACnBQ,UAAWnB,KAAKmB,UAChBC,MAAOpB,KAAKoB,MACZC,WAAYrB,KAAKqB,WACjBC,UAAWtB,KAAKsB,UAChBC,IAAKvB,KAAKuB,IACVC,OAAQxB,KAAKwB,OACbC,IAAKzB,KAAKyB,IACVC,MAAO1B,KAAK0B,MACZC,UAAW3B,KAAK2B,UAChBC,cAAe5B,KAAK4B,cACpBC,MAAO7B,KAAK6B,MACZC,OAAQ9B,KAAK8B,OACbpB,SAAUV,KAAKU,UAMfJ,EAAA,QAAMyB,KAAK,SAASC,KAAK,Y"}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as t,h as i,H as s}from"./index-50adf9a0.js";import{w as e}from"./validation-1165b64b.js";import{w as l}from"./prop.validators-dd337216.js";import"./index-599f5430.js";import"./a11y.tipps-a876ebb7.js";import"./dev.utils-ec1c1b88.js";import"./reuse-9dd1192b.js";const a=class{constructor(s){t(this,s),this.renderHeadline=(t,s)=>{switch(s){case 1:return i("h1",{class:"headline"},t,i("slot",null));case 2:return i("h2",{class:"headline"},t,i("slot",null));case 3:return i("h3",{class:"headline"},t,i("slot",null));case 4:return i("h4",{class:"headline"},t,i("slot",null));case 5:return i("h5",{class:"headline"},t,i("slot",null));case 6:return i("h6",{class:"headline"},t,i("slot",null));default:return i("strong",{class:"headline"},t,i("slot",null))}},this._level=1,this._label=void 0,this._overline="",this.state={_label:""}}validateLabel(i){l(this,"_label",i)}validateLevel(i){e(this,i)}validateOverline(i){l(this,"_overline",i)}componentWillLoad(){this.validateLabel(this._label),this.validateLevel(this._level),this.validateOverline(this._overline)}render(){return i(s,null,this.renderHeadline(this.state._label,this.state._level),this.state._overline&&i("span",{class:"overline"},this.state._overline))}static get watchers(){return{_label:["validateLabel"],_level:["validateLevel"],_overline:["validateOverline"]}}},n=class{constructor(i){t(this,i),this._alert=!0,this._disabled=!1,this._error="",this._hideLabel=!1,this._hint="",this._icon=void 0,this._id=void 0,this._list=void 0,this._readOnly=!1,this._renderNoLabel=!1,this._required=!1,this._smartButton=void 0,this._touched=!1}render(){var t,e,l,a;const r="string"==typeof this._error&&this._error.length>0&&!0===this._touched,n="string"==typeof this._hint&&this._hint.length>0,o=!0===this._hideLabel&&!0!==this._required;return i(s,{class:{disabled:!0===this._disabled,error:!0===r,"read-only":!0===this._readOnly,required:!0===this._required,touched:!0===this._touched}},!1===this._renderNoLabel&&i("label",{htmlFor:this._id,id:`${this._id}-label`,style:{height:o?"0":void 0,margin:o?"0":void 0,padding:o?"0":void 0,visibility:o?"hidden":void 0}},i("span",null,i("slot",{name:"label"}))),n&&i("span",{class:"hint",id:`${this._id}-hint`},this._hint),i("div",{class:{input:!0,"icon-left":"object"==typeof(null===(t=this._icon)||void 0===t?void 0:t.left),"icon-right":"object"==typeof(null===(e=this._icon)||void 0===e?void 0:e.right)}},i("div",{class:"icons"},(null===(l=this._icon)||void 0===l?void 0:l.left)?i("kol-icon",{_ariaLabel:"",_icon:this._icon.left.icon}):i("i",null),(null===(a=this._icon)||void 0===a?void 0:a.right)?i("kol-icon",{_ariaLabel:"",_icon:this._icon.right.icon}):i("i",null)),i("slot",{name:"input"}),"object"==typeof this._smartButton&&null!==this._smartButton&&i("kol-button-wc",{_ariaLabel:this._smartButton._ariaLabel,_customClass:this._smartButton._customClass,_disabled:this._smartButton._disabled,_icon:this._smartButton._icon,_iconOnly:!0,_id:this._smartButton._id,_label:this._smartButton._label,_on:this._smartButton._on,_tooltipAlign:this._smartButton._tooltipAlign,_variant:this._smartButton._variant})),r&&i("kol-alert",{class:"error",id:`${this._id}-error`,_alert:this._alert,_type:"error",_variant:"msg"},this._error),Array.isArray(this._list)&&this._list.length>0&&i("datalist",{id:`${this._id}-list`},this._list.map((t=>i("option",{value:t})))))}};export{a as kol_heading_wc,n as kol_input};
4
+ import{r as t,h as s,H as i}from"./index-50adf9a0.js";import{w as e}from"./validation-1165b64b.js";import{w as l}from"./prop.validators-dd337216.js";import"./index-599f5430.js";import"./a11y.tipps-a876ebb7.js";import"./dev.utils-ec1c1b88.js";import"./reuse-9dd1192b.js";const a=class{constructor(i){t(this,i),this.renderHeadline=(t,i)=>{switch(i){case 1:return s("h1",{class:"headline"},t,s("slot",null));case 2:return s("h2",{class:"headline"},t,s("slot",null));case 3:return s("h3",{class:"headline"},t,s("slot",null));case 4:return s("h4",{class:"headline"},t,s("slot",null));case 5:return s("h5",{class:"headline"},t,s("slot",null));case 6:return s("h6",{class:"headline"},t,s("slot",null));default:return s("strong",{class:"headline"},t,s("slot",null))}},this._level=1,this._label=void 0,this._overline="",this.state={_label:""}}validateLabel(t){l(this,"_label",t)}validateLevel(t){e(this,t)}validateOverline(t){l(this,"_overline",t)}componentWillLoad(){this.validateLabel(this._label),this.validateLevel(this._level),this.validateOverline(this._overline)}render(){return s(i,null,this.renderHeadline(this.state._label,this.state._level),this.state._overline&&s("span",{class:"overline"},this.state._overline))}static get watchers(){return{_label:["validateLabel"],_level:["validateLevel"],_overline:["validateOverline"]}}},h=class{constructor(s){t(this,s),this._alert=!0,this._disabled=!1,this._error="",this._hideLabel=!1,this._hint="",this._icon=void 0,this._id=void 0,this._list=void 0,this._readOnly=!1,this._renderNoLabel=!1,this._required=!1,this._smartButton=void 0,this._touched=!1}render(){var t,e,l,a;const r="string"==typeof this._error&&this._error.length>0&&!0===this._touched,n="string"==typeof this._hint&&this._hint.length>0,o=!0===this._hideLabel&&!0!==this._required;return s(i,{class:{disabled:!0===this._disabled,error:!0===r,"read-only":!0===this._readOnly,required:!0===this._required,touched:!0===this._touched}},!1===this._renderNoLabel&&s("label",{id:`${this._id}-label`,hidden:o,htmlFor:this._id},s("span",null,s("slot",{name:"label"}))),n&&s("span",{class:"hint",id:`${this._id}-hint`},this._hint),s("div",{class:{input:!0,"icon-left":"object"==typeof(null===(t=this._icon)||void 0===t?void 0:t.left),"icon-right":"object"==typeof(null===(e=this._icon)||void 0===e?void 0:e.right)}},s("div",{class:"icons"},(null===(l=this._icon)||void 0===l?void 0:l.left)?s("kol-icon",{_ariaLabel:"",_icon:this._icon.left.icon}):s("i",null),(null===(a=this._icon)||void 0===a?void 0:a.right)?s("kol-icon",{_ariaLabel:"",_icon:this._icon.right.icon}):s("i",null)),s("slot",{name:"input"}),"object"==typeof this._smartButton&&null!==this._smartButton&&s("kol-button-wc",{_ariaLabel:this._smartButton._ariaLabel,_customClass:this._smartButton._customClass,_disabled:this._smartButton._disabled,_icon:this._smartButton._icon,_iconOnly:!0,_id:this._smartButton._id,_label:this._smartButton._label,_on:this._smartButton._on,_tooltipAlign:this._smartButton._tooltipAlign,_variant:this._smartButton._variant})),r&&s("kol-alert",{class:"error",id:`${this._id}-error`,_alert:this._alert,_type:"error",_variant:"msg"},this._error),Array.isArray(this._list)&&this._list.length>0&&s("datalist",{id:`${this._id}-list`},this._list.map((t=>s("option",{value:t})))))}};export{a as kol_heading_wc,h as kol_input};
@@ -1 +1 @@
1
- {"version":3,"names":["KolHeadingWc","this","renderHeadline","label","level","h","class","_label","validateLabel","value","watchString","validateLevel","watchHeadingLevel","validateOverline","componentWillLoad","_level","_overline","render","Host","state","KolInput","hasError","_error","length","_touched","hasHint","_hint","hideLabel","_hideLabel","_required","disabled","_disabled","error","_readOnly","required","touched","_renderNoLabel","htmlFor","_id","id","style","height","undefined","margin","padding","visibility","name","input","_a","_icon","left","_b","right","_c","_ariaLabel","icon","_d","_smartButton","_customClass","_iconOnly","_on","_tooltipAlign","_variant","_alert","_type","Array","isArray","_list","map","option"],"sources":["./src/components/heading/component.tsx","./src/components/input/component.tsx"],"sourcesContent":["import { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@a11y-ui/core';\nimport { HeadingLevel } from '../../types/heading-level';\nimport { watchHeadingLevel } from './validation';\nimport { watchString } from '../../utils/prop.validators';\n\n/**\n * API\n */\ntype RequiredProps = {\n\tlabel: string;\n};\ntype OptionalProps = {\n\toverline: string;\n\tlevel: HeadingLevel;\n};\nexport type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = RequiredProps;\ntype OptionalStates = OptionalProps;\ntype States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\n@Component({\n\ttag: 'kol-heading-wc',\n\tshadow: false,\n})\nexport class KolHeadingWc implements Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates> {\n\t/**\n\t * Gibt an, welchen H-Level von 1 bis 6 die Überschrift hat. Oder ob es keine Überschrift ist, sondern nur fett gedruckt.\n\t */\n\t@Prop() public _level?: HeadingLevel = 1;\n\n\t/**\n\t * Gibt den Text der Überschrift an.\n\t */\n\t@Prop() public _label!: string;\n\n\t/**\n\t * Gibt den Text der zusätzlichen Beschriftung an.\n\t */\n\t@Prop() public _overline?: string = '';\n\n\t/**\n\t * @see: components/abbr/component.tsx (@State)\n\t */\n\t@State() public state: States = {\n\t\t_label: '',\n\t};\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_label')\n\tpublic validateLabel(value?: string): void {\n\t\twatchString(this, '_label', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_level')\n\tpublic validateLevel(value?: HeadingLevel): void {\n\t\twatchHeadingLevel(this, value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_overline')\n\tpublic validateOverline(value?: string): void {\n\t\twatchString(this, '_overline', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentWillLoad)\n\t */\n\tpublic componentWillLoad(): void {\n\t\tthis.validateLabel(this._label);\n\t\tthis.validateLevel(this._level);\n\t\tthis.validateOverline(this._overline);\n\t}\n\n\tprivate readonly renderHeadline = (label: string, level?: HeadingLevel): JSX.Element => {\n\t\tswitch (level) {\n\t\t\tcase 1:\n\t\t\t\treturn (\n\t\t\t\t\t<h1 class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</h1>\n\t\t\t\t);\n\t\t\tcase 2:\n\t\t\t\treturn (\n\t\t\t\t\t<h2 class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</h2>\n\t\t\t\t);\n\t\t\tcase 3:\n\t\t\t\treturn (\n\t\t\t\t\t<h3 class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</h3>\n\t\t\t\t);\n\t\t\tcase 4:\n\t\t\t\treturn (\n\t\t\t\t\t<h4 class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</h4>\n\t\t\t\t);\n\t\t\tcase 5:\n\t\t\t\treturn (\n\t\t\t\t\t<h5 class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</h5>\n\t\t\t\t);\n\t\t\tcase 6:\n\t\t\t\treturn (\n\t\t\t\t\t<h6 class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</h6>\n\t\t\t\t);\n\t\t\tdefault:\n\t\t\t\treturn (\n\t\t\t\t\t<strong class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</strong>\n\t\t\t\t);\n\t\t}\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t{this.renderHeadline(this.state._label, this.state._level)}\n\t\t\t\t{this.state._overline && <span class=\"overline\">{this.state._overline}</span>}\n\t\t\t</Host>\n\t\t);\n\t}\n}\n","/* eslint-disable jsx-a11y/label-has-associated-control */\nimport { Component, h, Host, JSX, Prop } from '@stencil/core';\nimport { ButtonProps } from '../../types/button-link';\nimport { Stringified } from '../../types/common';\nimport { KoliBriCustomIcon } from '../../types/icon';\n\nimport { KoliBriHorizontalIcon } from '../../types/icon';\nimport { Props } from './types';\n\n/**\n * @internal\n */\n@Component({\n\ttag: 'kol-input',\n\tshadow: false,\n})\nexport class KolInput implements Props {\n\tpublic render(): JSX.Element {\n\t\tconst hasError = typeof this._error === 'string' && this._error.length > 0 && this._touched === true;\n\t\tconst hasHint = typeof this._hint === 'string' && this._hint.length > 0;\n\t\tconst hideLabel = this._hideLabel === true && this._required !== true;\n\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={{\n\t\t\t\t\tdisabled: this._disabled === true,\n\t\t\t\t\terror: hasError === true,\n\t\t\t\t\t'read-only': this._readOnly === true,\n\t\t\t\t\trequired: this._required === true,\n\t\t\t\t\ttouched: this._touched === true,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{this._renderNoLabel === false && (\n\t\t\t\t\t<label\n\t\t\t\t\t\thtmlFor={this._id}\n\t\t\t\t\t\tid={`${this._id}-label`}\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\theight: hideLabel ? '0' : undefined,\n\t\t\t\t\t\t\tmargin: hideLabel ? '0' : undefined,\n\t\t\t\t\t\t\tpadding: hideLabel ? '0' : undefined,\n\t\t\t\t\t\t\tvisibility: hideLabel ? 'hidden' : undefined,\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<slot name=\"label\"></slot>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</label>\n\t\t\t\t)}\n\t\t\t\t{hasHint && (\n\t\t\t\t\t<span class=\"hint\" id={`${this._id}-hint`}>\n\t\t\t\t\t\t{this._hint}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t<div\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tinput: true,\n\t\t\t\t\t\t'icon-left': typeof this._icon?.left === 'object',\n\t\t\t\t\t\t'icon-right': typeof this._icon?.right === 'object',\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{/* grid grid-cols-2 justify-between h-0 mx-3 my-2 */}\n\t\t\t\t\t<div class=\"icons\">\n\t\t\t\t\t\t{this._icon?.left ? <kol-icon _ariaLabel=\"\" _icon={(this._icon.left as KoliBriCustomIcon).icon}></kol-icon> : <i />}\n\t\t\t\t\t\t{this._icon?.right ? <kol-icon _ariaLabel=\"\" _icon={(this._icon.right as KoliBriCustomIcon).icon}></kol-icon> : <i />}\n\t\t\t\t\t</div>\n\t\t\t\t\t<slot name=\"input\"></slot>\n\t\t\t\t\t{typeof this._smartButton === 'object' && this._smartButton !== null && (\n\t\t\t\t\t\t<kol-button-wc\n\t\t\t\t\t\t\t_ariaLabel={this._smartButton._ariaLabel}\n\t\t\t\t\t\t\t_customClass={this._smartButton._customClass}\n\t\t\t\t\t\t\t_disabled={this._smartButton._disabled}\n\t\t\t\t\t\t\t_icon={this._smartButton._icon}\n\t\t\t\t\t\t\t_iconOnly={true}\n\t\t\t\t\t\t\t_id={this._smartButton._id}\n\t\t\t\t\t\t\t_label={this._smartButton._label}\n\t\t\t\t\t\t\t_on={this._smartButton._on}\n\t\t\t\t\t\t\t_tooltipAlign={this._smartButton._tooltipAlign}\n\t\t\t\t\t\t\t_variant={this._smartButton._variant}\n\t\t\t\t\t\t></kol-button-wc>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{hasError && (\n\t\t\t\t\t<kol-alert class=\"error\" id={`${this._id}-error`} _alert={this._alert} _type=\"error\" _variant=\"msg\">\n\t\t\t\t\t\t{this._error}\n\t\t\t\t\t</kol-alert>\n\t\t\t\t)}\n\t\t\t\t{Array.isArray(this._list) && this._list.length > 0 && (\n\t\t\t\t\t<datalist id={`${this._id}-list`}>\n\t\t\t\t\t\t{this._list.map((option: string) => (\n\t\t\t\t\t\t\t<option value={option} />\n\t\t\t\t\t\t))}\n\t\t\t\t\t</datalist>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt an, ob die Fehlermeldung vorgelesen werden soll, wenn es eine gibt.\n\t */\n\t@Prop({ reflect: true }) public _alert?: boolean = true;\n\n\t/**\n\t * Gibt an, ob das Eingabefeld aktiviert oder deaktiviert ist.\n\t */\n\t@Prop({ reflect: true }) public _disabled?: boolean = false;\n\n\t/**\n\t * Gibt den Text für eine Fehlermeldung an.\n\t */\n\t@Prop() public _error?: string = '';\n\n\t/**\n\t * Gibt an, ob das Eingabefeld kein sichtbares Label haben soll.\n\t */\n\t@Prop({ reflect: true }) public _hideLabel?: boolean = false;\n\n\t/**\n\t * Gibt den Text für eine Hinweistext an.\n\t */\n\t@Prop() public _hint?: string = '';\n\n\t/**\n\t * Ermöglicht das Anzeigen von Icons links und/oder rechts am Rand des Eingabefeldes.\n\t */\n\t@Prop() public _icon?: KoliBriHorizontalIcon;\n\n\t/**\n\t * Gibt die technische ID des Eingabefeldes an.\n\t */\n\t@Prop() public _id!: string;\n\n\t/**\n\t * Gibt die Liste der Vorschlagswörter an.\n\t */\n\t@Prop() public _list?: Stringified<string[]>;\n\n\t/**\n\t * Gibt an, ob die Eingabefeld nur lesend ist.\n\t */\n\t@Prop({ reflect: true }) public _readOnly?: boolean = false;\n\n\t/**\n\t * Gibt an, ob die Komponente kein Label rendern soll.\n\t */\n\t@Prop({ reflect: true }) public _renderNoLabel?: boolean = false;\n\n\t/**\n\t * Gibt an, ob die Checkbox ein Pflichtfeld ist.\n\t */\n\t@Prop({ reflect: true }) public _required?: boolean = false;\n\n\t/**\n\t * Ermöglicht einen Schalter ins das Eingabefeld mit einer beliebigen Aktion zu einzufügen (nur Icon-Only).\n\t */\n\t@Prop() public _smartButton?: ButtonProps;\n\n\t/**\n\t * Gibt an, ob dieses Eingabefeld von Nutzer:innen einmal besucht/berührt wurde.\n\t */\n\t@Prop({ reflect: true }) public _touched?: boolean = false;\n}\n"],"mappings":";;;oRA2BaA,EAAY,M,yBAwDPC,KAAAC,eAAiB,CAACC,EAAeC,KACjD,OAAQA,GACP,KAAK,EACJ,OACCC,EAAA,MAAIC,MAAM,YACRH,EACDE,EAAA,cAGH,KAAK,EACJ,OACCA,EAAA,MAAIC,MAAM,YACRH,EACDE,EAAA,cAGH,KAAK,EACJ,OACCA,EAAA,MAAIC,MAAM,YACRH,EACDE,EAAA,cAGH,KAAK,EACJ,OACCA,EAAA,MAAIC,MAAM,YACRH,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KAAKqC,YAAayB,OAAQ9D,KAAK8D,OAAQC,MAAM,QAAQF,SAAS,OAC5F7D,KAAKqB,QAGP2C,MAAMC,QAAQjE,KAAKkE,QAAUlE,KAAKkE,MAAM5C,OAAS,GACjDlB,EAAA,YAAUkC,GAAI,GAAGtC,KAAKqC,YACpBrC,KAAKkE,MAAMC,KAAKC,GAChBhE,EAAA,UAAQI,MAAO4D,O"}
1
+ {"version":3,"names":["KolHeadingWc","this","renderHeadline","label","level","h","class","_label","validateLabel","value","watchString","validateLevel","watchHeadingLevel","validateOverline","componentWillLoad","_level","_overline","render","Host","state","KolInput","hasError","_error","length","_touched","hasHint","_hint","hideLabel","_hideLabel","_required","disabled","_disabled","error","_readOnly","required","touched","_renderNoLabel","id","_id","hidden","htmlFor","name","input","_a","_icon","left","_b","right","_c","_ariaLabel","icon","_d","_smartButton","_customClass","_iconOnly","_on","_tooltipAlign","_variant","_alert","_type","Array","isArray","_list","map","option"],"sources":["./src/components/heading/component.tsx","./src/components/input/component.tsx"],"sourcesContent":["import { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@a11y-ui/core';\nimport { HeadingLevel } from '../../types/heading-level';\nimport { watchHeadingLevel } from './validation';\nimport { watchString } from '../../utils/prop.validators';\n\n/**\n * API\n */\ntype RequiredProps = {\n\tlabel: string;\n};\ntype OptionalProps = {\n\toverline: string;\n\tlevel: HeadingLevel;\n};\nexport type Props = Generic.Element.Members<RequiredProps, OptionalProps>;\n\ntype RequiredStates = RequiredProps;\ntype OptionalStates = OptionalProps;\ntype States = Generic.Element.Members<RequiredStates, OptionalStates>;\n\n@Component({\n\ttag: 'kol-heading-wc',\n\tshadow: false,\n})\nexport class KolHeadingWc implements Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates> {\n\t/**\n\t * Gibt an, welchen H-Level von 1 bis 6 die Überschrift hat. Oder ob es keine Überschrift ist, sondern nur fett gedruckt.\n\t */\n\t@Prop() public _level?: HeadingLevel = 1;\n\n\t/**\n\t * Gibt den Text der Überschrift an.\n\t */\n\t@Prop() public _label!: string;\n\n\t/**\n\t * Gibt den Text der zusätzlichen Beschriftung an.\n\t */\n\t@Prop() public _overline?: string = '';\n\n\t/**\n\t * @see: components/abbr/component.tsx (@State)\n\t */\n\t@State() public state: States = {\n\t\t_label: '',\n\t};\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_label')\n\tpublic validateLabel(value?: string): void {\n\t\twatchString(this, '_label', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_level')\n\tpublic validateLevel(value?: HeadingLevel): void {\n\t\twatchHeadingLevel(this, value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_overline')\n\tpublic validateOverline(value?: string): void {\n\t\twatchString(this, '_overline', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentWillLoad)\n\t */\n\tpublic componentWillLoad(): void {\n\t\tthis.validateLabel(this._label);\n\t\tthis.validateLevel(this._level);\n\t\tthis.validateOverline(this._overline);\n\t}\n\n\tprivate readonly renderHeadline = (label: string, level?: HeadingLevel): JSX.Element => {\n\t\tswitch (level) {\n\t\t\tcase 1:\n\t\t\t\treturn (\n\t\t\t\t\t<h1 class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</h1>\n\t\t\t\t);\n\t\t\tcase 2:\n\t\t\t\treturn (\n\t\t\t\t\t<h2 class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</h2>\n\t\t\t\t);\n\t\t\tcase 3:\n\t\t\t\treturn (\n\t\t\t\t\t<h3 class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</h3>\n\t\t\t\t);\n\t\t\tcase 4:\n\t\t\t\treturn (\n\t\t\t\t\t<h4 class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</h4>\n\t\t\t\t);\n\t\t\tcase 5:\n\t\t\t\treturn (\n\t\t\t\t\t<h5 class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</h5>\n\t\t\t\t);\n\t\t\tcase 6:\n\t\t\t\treturn (\n\t\t\t\t\t<h6 class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</h6>\n\t\t\t\t);\n\t\t\tdefault:\n\t\t\t\treturn (\n\t\t\t\t\t<strong class=\"headline\">\n\t\t\t\t\t\t{label}\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</strong>\n\t\t\t\t);\n\t\t}\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t{this.renderHeadline(this.state._label, this.state._level)}\n\t\t\t\t{this.state._overline && <span class=\"overline\">{this.state._overline}</span>}\n\t\t\t</Host>\n\t\t);\n\t}\n}\n","/* eslint-disable jsx-a11y/label-has-associated-control */\nimport { Component, h, Host, JSX, Prop } from '@stencil/core';\nimport { ButtonProps } from '../../types/button-link';\nimport { Stringified } from '../../types/common';\nimport { KoliBriCustomIcon } from '../../types/icon';\n\nimport { KoliBriHorizontalIcon } from '../../types/icon';\nimport { Props } from './types';\n\n/**\n * @internal\n */\n@Component({\n\ttag: 'kol-input',\n\tshadow: false,\n})\nexport class KolInput implements Props {\n\tpublic render(): JSX.Element {\n\t\tconst hasError = typeof this._error === 'string' && this._error.length > 0 && this._touched === true;\n\t\tconst hasHint = typeof this._hint === 'string' && this._hint.length > 0;\n\t\tconst hideLabel = this._hideLabel === true && this._required !== true;\n\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={{\n\t\t\t\t\tdisabled: this._disabled === true,\n\t\t\t\t\terror: hasError === true,\n\t\t\t\t\t'read-only': this._readOnly === true,\n\t\t\t\t\trequired: this._required === true,\n\t\t\t\t\ttouched: this._touched === true,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{this._renderNoLabel === false && (\n\t\t\t\t\t<label id={`${this._id}-label`} hidden={hideLabel} htmlFor={this._id}>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<slot name=\"label\"></slot>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</label>\n\t\t\t\t)}\n\t\t\t\t{hasHint && (\n\t\t\t\t\t<span class=\"hint\" id={`${this._id}-hint`}>\n\t\t\t\t\t\t{this._hint}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t<div\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tinput: true,\n\t\t\t\t\t\t'icon-left': typeof this._icon?.left === 'object',\n\t\t\t\t\t\t'icon-right': typeof this._icon?.right === 'object',\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{/* grid grid-cols-2 justify-between h-0 mx-3 my-2 */}\n\t\t\t\t\t<div class=\"icons\">\n\t\t\t\t\t\t{this._icon?.left ? <kol-icon _ariaLabel=\"\" _icon={(this._icon.left as KoliBriCustomIcon).icon}></kol-icon> : <i />}\n\t\t\t\t\t\t{this._icon?.right ? <kol-icon _ariaLabel=\"\" _icon={(this._icon.right as KoliBriCustomIcon).icon}></kol-icon> : <i />}\n\t\t\t\t\t</div>\n\t\t\t\t\t<slot name=\"input\"></slot>\n\t\t\t\t\t{typeof this._smartButton === 'object' && this._smartButton !== null && (\n\t\t\t\t\t\t<kol-button-wc\n\t\t\t\t\t\t\t_ariaLabel={this._smartButton._ariaLabel}\n\t\t\t\t\t\t\t_customClass={this._smartButton._customClass}\n\t\t\t\t\t\t\t_disabled={this._smartButton._disabled}\n\t\t\t\t\t\t\t_icon={this._smartButton._icon}\n\t\t\t\t\t\t\t_iconOnly={true}\n\t\t\t\t\t\t\t_id={this._smartButton._id}\n\t\t\t\t\t\t\t_label={this._smartButton._label}\n\t\t\t\t\t\t\t_on={this._smartButton._on}\n\t\t\t\t\t\t\t_tooltipAlign={this._smartButton._tooltipAlign}\n\t\t\t\t\t\t\t_variant={this._smartButton._variant}\n\t\t\t\t\t\t></kol-button-wc>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{hasError && (\n\t\t\t\t\t<kol-alert class=\"error\" id={`${this._id}-error`} _alert={this._alert} _type=\"error\" _variant=\"msg\">\n\t\t\t\t\t\t{this._error}\n\t\t\t\t\t</kol-alert>\n\t\t\t\t)}\n\t\t\t\t{Array.isArray(this._list) && this._list.length > 0 && (\n\t\t\t\t\t<datalist id={`${this._id}-list`}>\n\t\t\t\t\t\t{this._list.map((option: string) => (\n\t\t\t\t\t\t\t<option value={option} />\n\t\t\t\t\t\t))}\n\t\t\t\t\t</datalist>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt an, ob die Fehlermeldung vorgelesen werden soll, wenn es eine gibt.\n\t */\n\t@Prop({ reflect: true }) public _alert?: boolean = true;\n\n\t/**\n\t * Gibt an, ob das Eingabefeld aktiviert oder deaktiviert ist.\n\t */\n\t@Prop({ reflect: true }) public _disabled?: boolean = false;\n\n\t/**\n\t * Gibt den Text für eine Fehlermeldung an.\n\t */\n\t@Prop() public _error?: string = '';\n\n\t/**\n\t * Gibt an, ob das Eingabefeld kein sichtbares Label haben soll.\n\t */\n\t@Prop({ reflect: true }) public _hideLabel?: boolean = false;\n\n\t/**\n\t * Gibt den Text für eine Hinweistext an.\n\t */\n\t@Prop() public _hint?: string = '';\n\n\t/**\n\t * Ermöglicht das Anzeigen von Icons links und/oder rechts am Rand des Eingabefeldes.\n\t */\n\t@Prop() public _icon?: KoliBriHorizontalIcon;\n\n\t/**\n\t * Gibt die technische ID des Eingabefeldes an.\n\t */\n\t@Prop() public _id!: string;\n\n\t/**\n\t * Gibt die Liste der Vorschlagswörter an.\n\t */\n\t@Prop() public _list?: Stringified<string[]>;\n\n\t/**\n\t * Gibt an, ob die Eingabefeld nur lesend ist.\n\t */\n\t@Prop({ reflect: true }) public _readOnly?: boolean = false;\n\n\t/**\n\t * Gibt an, ob die Komponente kein Label rendern soll.\n\t */\n\t@Prop({ reflect: true }) public _renderNoLabel?: boolean = false;\n\n\t/**\n\t * Gibt an, ob die Checkbox ein Pflichtfeld ist.\n\t */\n\t@Prop({ reflect: true }) public _required?: boolean = false;\n\n\t/**\n\t * Ermöglicht einen Schalter ins das Eingabefeld mit einer beliebigen Aktion zu einzufügen (nur Icon-Only).\n\t */\n\t@Prop() public _smartButton?: ButtonProps;\n\n\t/**\n\t * Gibt an, ob dieses Eingabefeld von Nutzer:innen einmal besucht/berührt wurde.\n\t */\n\t@Prop({ reflect: true }) public _touched?: boolean = false;\n}\n"],"mappings":";;;oRA2BaA,EAAY,M,yBAwDPC,KAAAC,eAAiB,CAACC,EAAeC,KACjD,OAAQA,GACP,KAAK,EACJ,OACCC,EAAA,MAAIC,MAAM,YACRH,EACDE,EAAA,cAGH,KAAK,EACJ,OACCA,EAAA,MAAIC,MAAM,YACRH,EACDE,EAAA,cAGH,KAAK,EACJ,OACCA,EAAA,MAAIC,MAAM,YACRH,EACDE,EAAA,cAGH,KAAK,EACJ,OACCA,EAAA,MAAIC,MAAM,YACRH,EACDE,EAAA,cAGH,KAAK,EACJ,OACCA,EAAA,MAAIC,MAAM,YACRH,EACDE,EAAA,cAGH,KAAK,EACJ,OACCA,EAAA,MAAIC,MAAM,YACRH,EACDE,EAAA,cAGH,QACC,OACCA,EAAA,UAAQC,MAAM,YACZH,EACDE,EAAA,c,cApGkC,E,qCAUH,G,WAKJ,CAC/BE,OAAQ,G,CAOFC,cAAcC,GACpBC,EAAYT,KAAM,SAAUQ,E,CAOtBE,cAAcF,GACpBG,EAAkBX,KAAMQ,E,CAOlBI,iBAAiBJ,GACvBC,EAAYT,KAAM,YAAaQ,E,CAMzBK,oBACNb,KAAKO,cAAcP,KAAKM,QACxBN,KAAKU,cAAcV,KAAKc,QACxBd,KAAKY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AU4C,WAAW,GAAGL,MAAQ3C,KAAK2C,MAAMC,KAA2BK,OAAoB7C,EAAA,YAC7G8C,EAAAlD,KAAK2C,SAAK,MAAAO,SAAA,SAAAA,EAAEJ,OAAQ1C,EAAA,YAAU4C,WAAW,GAAGL,MAAQ3C,KAAK2C,MAAMG,MAA4BG,OAAoB7C,EAAA,WAEjHA,EAAA,QAAMoC,KAAK,iBACHxC,KAAKmD,eAAiB,UAAYnD,KAAKmD,eAAiB,MAC/D/C,EAAA,iBACC4C,WAAYhD,KAAKmD,aAAaH,WAC9BI,aAAcpD,KAAKmD,aAAaC,aAChCtB,UAAW9B,KAAKmD,aAAarB,UAC7Ba,MAAO3C,KAAKmD,aAAaR,MACzBU,UAAW,KACXhB,IAAKrC,KAAKmD,aAAad,IACvB/B,OAAQN,KAAKmD,aAAa7C,OAC1BgD,IAAKtD,KAAKmD,aAAaG,IACvBC,cAAevD,KAAKmD,aAAaI,cACjCC,SAAUxD,KAAKmD,aAAaK,YAI9BpC,GACAhB,EAAA,aAAWC,MAAM,QAAQ+B,GAAI,GAAGpC,KAAKqC,YAAaoB,OAAQzD,KAAKyD,OAAQC,MAAM,QAAQF,SAAS,OAC5FxD,KAAKqB,QAGPsC,MAAMC,QAAQ5D,KAAK6D,QAAU7D,KAAK6D,MAAMvC,OAAS,GACjDlB,EAAA,YAAUgC,GAAI,GAAGpC,KAAKqC,YACpBrC,KAAK6D,MAAMC,KAAKC,GAChB3D,EAAA,UAAQI,MAAOuD,O"}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as i,h as t,H as o,g as s}from"./index-50adf9a0.js";import{w as n}from"./prop.validators-dd337216.js";import{a as r}from"./reuse-9dd1192b.js";import{w as e}from"./controller-b4263f6b.js";import{a}from"./i18n-1d6d91ab.js";import"./index-599f5430.js";import"./a11y.tipps-a876ebb7.js";import"./dev.utils-ec1c1b88.js";const l=":host{--kolibri-border-color:#666;--kolibri-border-radius:0.125rem;--kolibri-border-width:1px;--kolibri-color-error:#f44336;--kolibri-color-info:#2196f3;--kolibri-color-success:#4caf50;--kolibri-color-warning:#ff9800;--kolibri-color-primary:#3f51b5;--kolibri-color-secondary:#ff4081;--kolibri-color-normal:#9e9e9e;--kolibri-color-danger:#f44336;--kolibri-color-ghost:#f5f5f5;--kolibri-color-disabled:#bdbdbd;--kolibri-color-text:#222222;--kolibri-color-visited:#9c27b0;--kolibri-font-family:Verdana, Arial, Tahoma, Helvetica, sans-serif;--kolibri-font-size:16px;--kolibri-spacing:0.25rem}:host{font-family:inherit;font-size:inherit}:host *{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{font-family:var(--kolibri-font-family);font-size:inherit}*{box-sizing:border-box}kol-icon{color:inherit}kol-span-wc{display:grid;place-items:center;width:100%}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}a{display:inline-flex;place-items:baseline}button{background-color:transparent;border-width:0;margin:0;min-height:44px;min-width:44px;padding:0}a,button,input,select,textarea{cursor:pointer}a.icon-only>kol-span-wc>span>span,:host button.icon-only>kol-span-wc>span>span{display:none}h1,h2,h3,h4,h5,h6{font-family:var(--kolibri-font-family);font-size:var(--kolibri-font-size);margin:0;padding:0}:host{display:inline-block}:host>kol-button-wc,:host>kol-link-wc{width:inherit}:host>kol-button-wc a,:host>kol-button-wc button,:host>kol-link-wc a,:host>kol-link-wc button{cursor:pointer;display:inline-block;min-height:44px;min-width:44px;padding:0;text-align:center;transition-duration:0.5s;transition-property:background-color, color, border-color;width:inherit}:host>kol-button-wc a:active,:host>kol-button-wc button:active,:host>kol-link-wc a:active,:host>kol-link-wc button:active{outline:0;box-shadow:none}:host>kol-button-wc a:disabled,:host>kol-button-wc button:disabled,:host>kol-link-wc a:disabled,:host>kol-link-wc button:disabled{box-shadow:none;cursor:not-allowed;opacity:0.5}",h=class{constructor(t){i(this,t),this.catchRef=t=>{this.ref=t,r(this.host,this.ref)},this._ariaControls=void 0,this._ariaCurrent=void 0,this._ariaExpanded=void 0,this._ariaLabel=void 0,this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._href=void 0,this._icon=void 0,this._iconOnly=!1,this._label=void 0,this._on=void 0,this._role=void 0,this._tabIndex=void 0,this._target=void 0,this._targetDescription=a("kol-open-link-in-tab"),this._tooltipAlign="right",this._variant="normal",this.state={}}render(){return t(o,null,t("kol-link-wc",{ref:this.catchRef,class:{button:!0,[this.state._variant]:"custom"!==this.state._variant,[this.state._customClass]:"custom"===this.state._variant&&"string"==typeof this.state._customClass&&this.state._customClass.length>0},_ariaControls:this._ariaControls,_ariaCurrent:this._ariaCurrent,_ariaExpanded:this._ariaExpanded,_ariaLabel:this._ariaLabel,_ariaSelected:this._ariaSelected,_disabled:this._disabled,_href:this._href,_icon:this._icon,_iconOnly:this._iconOnly,_label:this._label,_on:this._on,_role:"button",_tabIndex:this._tabIndex,_target:this._target,_targetDescription:this._targetDescription,_tooltipAlign:this._tooltipAlign},t("slot",{name:"expert",slot:"expert"})))}validateCustomClass(t){n(this,"_customClass",t,{defaultValue:void 0})}validateVariant(t){e(this,"_variant",t)}componentWillLoad(){this.validateCustomClass(this._customClass),this.validateVariant(this._variant)}get host(){return s(this)}static get watchers(){return{_customClass:["validateCustomClass"],_variant:["validateVariant"]}}};h.style={default:l};export{h as kol_link_button};
4
+ import{r as i,h as t,H as o,g as s}from"./index-50adf9a0.js";import{w as n}from"./prop.validators-dd337216.js";import{a as r}from"./reuse-9dd1192b.js";import{w as e}from"./controller-b4263f6b.js";import{a}from"./i18n-1d6d91ab.js";import"./index-599f5430.js";import"./a11y.tipps-a876ebb7.js";import"./dev.utils-ec1c1b88.js";const l=":host{--kolibri-border-color:#666;--kolibri-border-radius:0.125rem;--kolibri-border-width:1px;--kolibri-color-error:#f44336;--kolibri-color-info:#2196f3;--kolibri-color-success:#4caf50;--kolibri-color-warning:#ff9800;--kolibri-color-primary:#3f51b5;--kolibri-color-secondary:#ff4081;--kolibri-color-normal:#9e9e9e;--kolibri-color-danger:#f44336;--kolibri-color-ghost:#f5f5f5;--kolibri-color-disabled:#bdbdbd;--kolibri-color-text:#222222;--kolibri-color-visited:#9c27b0;--kolibri-font-family:Verdana, Arial, Tahoma, Helvetica, sans-serif;--kolibri-font-size:16px;--kolibri-spacing:0.25rem}:host{font-family:inherit;font-size:inherit}:host *{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{font-family:var(--kolibri-font-family);font-size:inherit}*{box-sizing:border-box}kol-icon{color:inherit}kol-span-wc{display:grid;place-items:center;width:100%}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}a{display:inline-flex;place-items:baseline}button{background-color:transparent;border-width:0;margin:0;min-height:44px;min-width:44px;padding:0}a,button,input,select,textarea{cursor:pointer}a.icon-only>kol-span-wc>span>span,:host button.icon-only>kol-span-wc>span>span{display:none}h1,h2,h3,h4,h5,h6{font-family:var(--kolibri-font-family);font-size:var(--kolibri-font-size);margin:0;padding:0}:host{display:inline-block}:host>kol-button-wc,:host>kol-link-wc{width:inherit}:host>kol-button-wc a,:host>kol-button-wc button,:host>kol-link-wc a,:host>kol-link-wc button{cursor:pointer;display:inline-block;font-size:1rem;min-height:44px;min-width:44px;padding:0;text-align:center;transition-duration:0.5s;transition-property:background-color, color, border-color;width:inherit}:host>kol-button-wc a:active,:host>kol-button-wc button:active,:host>kol-link-wc a:active,:host>kol-link-wc button:active{outline:0;box-shadow:none}:host>kol-button-wc a:disabled,:host>kol-button-wc button:disabled,:host>kol-link-wc a:disabled,:host>kol-link-wc button:disabled{box-shadow:none;cursor:not-allowed;opacity:0.5}",h=class{constructor(t){i(this,t),this.catchRef=t=>{this.ref=t,r(this.host,this.ref)},this._ariaControls=void 0,this._ariaCurrent=void 0,this._ariaExpanded=void 0,this._ariaLabel=void 0,this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._href=void 0,this._icon=void 0,this._iconOnly=!1,this._label=void 0,this._on=void 0,this._role=void 0,this._tabIndex=void 0,this._target=void 0,this._targetDescription=a("kol-open-link-in-tab"),this._tooltipAlign="right",this._variant="normal",this.state={}}render(){return t(o,null,t("kol-link-wc",{ref:this.catchRef,class:{button:!0,[this.state._variant]:"custom"!==this.state._variant,[this.state._customClass]:"custom"===this.state._variant&&"string"==typeof this.state._customClass&&this.state._customClass.length>0},_ariaControls:this._ariaControls,_ariaCurrent:this._ariaCurrent,_ariaExpanded:this._ariaExpanded,_ariaLabel:this._ariaLabel,_ariaSelected:this._ariaSelected,_disabled:this._disabled,_href:this._href,_icon:this._icon,_iconOnly:this._iconOnly,_label:this._label,_on:this._on,_role:"button",_tabIndex:this._tabIndex,_target:this._target,_targetDescription:this._targetDescription,_tooltipAlign:this._tooltipAlign},t("slot",{name:"expert",slot:"expert"})))}validateCustomClass(t){n(this,"_customClass",t,{defaultValue:void 0})}validateVariant(t){e(this,"_variant",t)}componentWillLoad(){this.validateCustomClass(this._customClass),this.validateVariant(this._variant)}get host(){return s(this)}static get watchers(){return{_customClass:["validateCustomClass"],_variant:["validateVariant"]}}};h.style={default:l};export{h as kol_link_button};
@@ -1 +1 @@
1
- {"version":3,"names":["defaultStyleCss","KolLinkButton","this","catchRef","ref","propergateFocus","host","translate","render","h","Host","class","button","state","_variant","_customClass","length","_ariaControls","_ariaCurrent","_ariaExpanded","_ariaLabel","_ariaSelected","_disabled","_href","_icon","_iconOnly","_label","_on","_role","_tabIndex","_target","_targetDescription","_tooltipAlign","name","slot","validateCustomClass","value","watchString","defaultValue","undefined","validateVariant","watchButtonVariant","componentWillLoad"],"sources":["./src/components/link-button/style.css?tag=kol-link-button&mode=default&encapsulation=shadow","./src/components/link-button/component.tsx"],"sourcesContent":["@import '../button.css';\n","import { Component, Element, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@a11y-ui/core';\nimport {\n\tAlternativButtonLinkRole,\n\tAriaCurrent,\n\tKoliBriButtonVariant,\n\tLinkButtonStates,\n\tLinkOnCallbacks,\n\tLinkTarget,\n\tOptionalLinkButtonProps,\n\tOptionalLinkButtonStates,\n\tRequiredLinkButtonProps,\n\tRequiredLinkButtonStates,\n} from '../../types/button-link';\nimport { Stringified } from '../../types/common';\nimport { KoliBriIconProp } from '../../types/icon';\nimport { watchString } from '../../utils/prop.validators';\nimport { propergateFocus } from '../../utils/reuse';\nimport { watchButtonVariant } from '../button/controller';\nimport { Alignment } from '../../types/props/alignment';\nimport { translate } from '../../i18n';\n\ntype State = {\n\tstate: Generic.Element.Members<RequiredLinkButtonStates, OptionalLinkButtonStates>;\n};\n\n@Component({\n\ttag: 'kol-link-button',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolLinkButton\n\timplements\n\t\tGeneric.Element.Members<RequiredLinkButtonProps, OptionalLinkButtonProps>,\n\t\tGeneric.Element.Watchers<RequiredLinkButtonStates, OptionalLinkButtonStates>,\n\t\tState\n{\n\t@Element() private readonly host?: HTMLKolLinkButtonElement;\n\tprivate ref?: HTMLKolLinkWcElement;\n\n\tprivate readonly catchRef = (ref?: HTMLKolLinkWcElement) => {\n\t\tthis.ref = ref;\n\t\tpropergateFocus(this.host, this.ref);\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<kol-link-wc\n\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tbutton: true,\n\t\t\t\t\t\t[this.state._variant as string]: this.state._variant !== 'custom',\n\t\t\t\t\t\t[this.state._customClass as string]:\n\t\t\t\t\t\t\tthis.state._variant === 'custom' && typeof this.state._customClass === 'string' && this.state._customClass.length > 0,\n\t\t\t\t\t}}\n\t\t\t\t\t_ariaControls={this._ariaControls}\n\t\t\t\t\t_ariaCurrent={this._ariaCurrent}\n\t\t\t\t\t_ariaExpanded={this._ariaExpanded}\n\t\t\t\t\t_ariaLabel={this._ariaLabel}\n\t\t\t\t\t_ariaSelected={this._ariaSelected}\n\t\t\t\t\t_disabled={this._disabled}\n\t\t\t\t\t_href={this._href}\n\t\t\t\t\t_icon={this._icon}\n\t\t\t\t\t_iconOnly={this._iconOnly}\n\t\t\t\t\t_label={this._label}\n\t\t\t\t\t_on={this._on}\n\t\t\t\t\t_role=\"button\"\n\t\t\t\t\t_tabIndex={this._tabIndex}\n\t\t\t\t\t_target={this._target}\n\t\t\t\t\t_targetDescription={this._targetDescription}\n\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t>\n\t\t\t\t\t{/*\n\t\t\t\t\t\tEs ist keine gute Idee hier einen Slot einzufügen, da dadurch ermöglicht wird,\n\t\t\t\t\t\tdie Unterstützung hinsichtlich der Barrierefreiheit der Komponente zu umgehen.\n\t\t\t\t\t*/}\n\t\t\t\t\t<slot name=\"expert\" slot=\"expert\"></slot>\n\t\t\t\t</kol-link-wc>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt an, welche Elemente kontrolliert werden. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls)\n\t */\n\t@Prop() public _ariaControls?: string;\n\n\t/**\n\t * Gibt an, welchen aktuellen Auswahlstatus der Link hat. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n\t */\n\t@Prop() public _ariaCurrent?: AriaCurrent;\n\n\t/**\n\t * Gibt an, ob durch den Link etwas aufgeklappt wurde. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n\t */\n\t@Prop({ reflect: true }) public _ariaExpanded?: boolean;\n\n\t/**\n\t * Gibt einen beschreibenden Text für den Screenreader an. Damit die\n\t * Sprachsteuerung von interaktiven Elementen funktioniert, muss der\n\t * Aria-Label-Text mit dem Label-Text des Buttons beginnen.\n\t *\n\t * - https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label\n\t */\n\t@Prop() public _ariaLabel?: string;\n\n\t/**\n\t * Gibt an, ob Element ausgewählt ist (role=tab). (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n\t */\n\t@Prop({ reflect: true }) public _ariaSelected?: boolean;\n\n\t/**\n\t * Gibt an, welche Custom-Class übergeben werden soll, wenn _variant=\"custom\" gesetzt ist.\n\t */\n\t@Prop() public _customClass?: string;\n\n\t/**\n\t * Gibt an, ob der Link deaktiviert ist.\n\t */\n\t@Prop({ reflect: true }) public _disabled?: boolean = false;\n\n\t/**\n\t * Gibt die Ziel-Url des Links an.\n\t */\n\t@Prop() public _href!: string;\n\n\t/**\n\t * Gibt den Class-Identifier eines Icons eine eingebunden Icofont an. (z.B. https://icofont.com/)\n\t */\n\t@Prop() public _icon?: Stringified<KoliBriIconProp>;\n\n\t/**\n\t * Gibt an, ob nur das Icon angezeigt wird.\n\t */\n\t@Prop({ reflect: true }) public _iconOnly?: boolean = false;\n\n\t/**\n\t * Gibt einen beschreibenden Text für das Text-Element an.\n\t */\n\t@Prop() public _label!: string;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für den Link an.\n\t */\n\t@Prop() public _on?: LinkOnCallbacks;\n\n\t/**\n\t * Gibt an, welche Role der Schalter hat.\n\t */\n\t@Prop() public _role?: AlternativButtonLinkRole;\n\n\t/**\n\t * Gibt an, welchen Tab-Index der Button hat. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Definiert das Verhalten, bei dem der Link geöffnet werden soll.\n\t */\n\t@Prop() public _target?: LinkTarget;\n\n\t/**\n\t * Gibt die Beschreibung an, wenn der Link in einem anderen Programm geöffnet wird.\n\t */\n\t@Prop() public _targetDescription?: string = translate('kol-open-link-in-tab');\n\n\t/**\n\t * Gibt an, ob der Tooltip entweder oben, rechts, unten oder links angezeigt werden soll.\n\t */\n\t@Prop() public _tooltipAlign?: Alignment = 'right';\n\n\t/**\n\t * Gibt an, welche Ausprägung der Button hat.\n\t */\n\t@Prop() public _variant?: KoliBriButtonVariant = 'normal';\n\n\t/**\n\t * @see: components/abbr/component.tsx (@State)\n\t */\n\t@State() public state: LinkButtonStates = {};\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_customClass')\n\tpublic validateCustomClass(value?: string): void {\n\t\twatchString(this, '_customClass', value, {\n\t\t\tdefaultValue: undefined,\n\t\t});\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_variant')\n\tpublic validateVariant(value?: KoliBriButtonVariant): void {\n\t\twatchButtonVariant(this, '_variant', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentWillLoad)\n\t */\n\tpublic componentWillLoad(): void {\n\t\tthis.validateCustomClass(this._customClass);\n\t\tthis.validateVariant(this._variant);\n\t}\n}\n"],"mappings":";;;mUAAA,MAAMA,EAAkB,8/D,MCkCXC,EAAa,M,yBASRC,KAAAC,SAAYC,IAC5BF,KAAKE,IAAMA,EACXC,EAAgBH,KAAKI,KAAMJ,KAAKE,IAAI,E,wLA8EiB,M,yDAeA,M,sIA8BTG,EAAU,wB,mBAKZ,Q,cAKM,S,WAKP,E,CAvInCC,SACN,OACCC,EAACC,EAAI,KACJD,EAAA,eACCL,IAAKF,KAAKC,SACVQ,MAAO,CACNC,OAAQ,KACR,CAACV,KAAKW,MAAMC,UAAqBZ,KAAKW,MAAMC,WAAa,SACzD,CAACZ,KAAKW,MAAME,cACXb,KAAKW,MAAMC,WAAa,iBAAmBZ,KAAKW,MAAME,eAAiB,UAAYb,KAAKW,MAAME,aAAaC,OAAS,GAEtHC,cAAef,KAAKe,cACpBC,aAAchB,KAAKgB,aACnBC,cAAejB,KAAKiB,cACpBC,WAAYlB,KAAKkB,WACjBC,cAAenB,KAAKmB,cACpBC,UAAWpB,KAAKoB,UAChBC,MAAOrB,KAAKqB,MACZC,MAAOtB,KAAKsB,MACZC,UAAWvB,KAAKuB,UAChBC,OAAQxB,KAAKwB,OACbC,IAAKzB,KAAKyB,IACVC,MAAM,SACNC,UAAW3B,KAAK2B,UAChBC,QAAS5B,KAAK4B,QACdC,mBAAoB7B,KAAK6B,mBACzBC,cAAe9B,KAAK8B,eAMpBvB,EAAA,QAAMwB,KAAK,SAASC,KAAK,Y,CA6GtBC,oBAAoBC,GAC1BC,EAAYnC,KAAM,eAAgBkC,EAAO,CACxCE,aAAcC,W,CAQTC,gBAAgBJ,GACtBK,EAAmBvC,KAAM,WAAYkC,E,CAM/BM,oBACNxC,KAAKiC,oBAAoBjC,KAAKa,cAC9Bb,KAAKsC,gBAAgBtC,KAAKY,S"}
1
+ {"version":3,"names":["defaultStyleCss","KolLinkButton","this","catchRef","ref","propergateFocus","host","translate","render","h","Host","class","button","state","_variant","_customClass","length","_ariaControls","_ariaCurrent","_ariaExpanded","_ariaLabel","_ariaSelected","_disabled","_href","_icon","_iconOnly","_label","_on","_role","_tabIndex","_target","_targetDescription","_tooltipAlign","name","slot","validateCustomClass","value","watchString","defaultValue","undefined","validateVariant","watchButtonVariant","componentWillLoad"],"sources":["./src/components/link-button/style.css?tag=kol-link-button&mode=default&encapsulation=shadow","./src/components/link-button/component.tsx"],"sourcesContent":["@import '../button.css';\n","import { Component, Element, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Generic } from '@a11y-ui/core';\nimport {\n\tAlternativButtonLinkRole,\n\tAriaCurrent,\n\tKoliBriButtonVariant,\n\tLinkButtonStates,\n\tLinkOnCallbacks,\n\tLinkTarget,\n\tOptionalLinkButtonProps,\n\tOptionalLinkButtonStates,\n\tRequiredLinkButtonProps,\n\tRequiredLinkButtonStates,\n} from '../../types/button-link';\nimport { Stringified } from '../../types/common';\nimport { KoliBriIconProp } from '../../types/icon';\nimport { watchString } from '../../utils/prop.validators';\nimport { propergateFocus } from '../../utils/reuse';\nimport { watchButtonVariant } from '../button/controller';\nimport { Alignment } from '../../types/props/alignment';\nimport { translate } from '../../i18n';\n\ntype State = {\n\tstate: Generic.Element.Members<RequiredLinkButtonStates, OptionalLinkButtonStates>;\n};\n\n@Component({\n\ttag: 'kol-link-button',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolLinkButton\n\timplements\n\t\tGeneric.Element.Members<RequiredLinkButtonProps, OptionalLinkButtonProps>,\n\t\tGeneric.Element.Watchers<RequiredLinkButtonStates, OptionalLinkButtonStates>,\n\t\tState\n{\n\t@Element() private readonly host?: HTMLKolLinkButtonElement;\n\tprivate ref?: HTMLKolLinkWcElement;\n\n\tprivate readonly catchRef = (ref?: HTMLKolLinkWcElement) => {\n\t\tthis.ref = ref;\n\t\tpropergateFocus(this.host, this.ref);\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<kol-link-wc\n\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tbutton: true,\n\t\t\t\t\t\t[this.state._variant as string]: this.state._variant !== 'custom',\n\t\t\t\t\t\t[this.state._customClass as string]:\n\t\t\t\t\t\t\tthis.state._variant === 'custom' && typeof this.state._customClass === 'string' && this.state._customClass.length > 0,\n\t\t\t\t\t}}\n\t\t\t\t\t_ariaControls={this._ariaControls}\n\t\t\t\t\t_ariaCurrent={this._ariaCurrent}\n\t\t\t\t\t_ariaExpanded={this._ariaExpanded}\n\t\t\t\t\t_ariaLabel={this._ariaLabel}\n\t\t\t\t\t_ariaSelected={this._ariaSelected}\n\t\t\t\t\t_disabled={this._disabled}\n\t\t\t\t\t_href={this._href}\n\t\t\t\t\t_icon={this._icon}\n\t\t\t\t\t_iconOnly={this._iconOnly}\n\t\t\t\t\t_label={this._label}\n\t\t\t\t\t_on={this._on}\n\t\t\t\t\t_role=\"button\"\n\t\t\t\t\t_tabIndex={this._tabIndex}\n\t\t\t\t\t_target={this._target}\n\t\t\t\t\t_targetDescription={this._targetDescription}\n\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t>\n\t\t\t\t\t{/*\n\t\t\t\t\t\tEs ist keine gute Idee hier einen Slot einzufügen, da dadurch ermöglicht wird,\n\t\t\t\t\t\tdie Unterstützung hinsichtlich der Barrierefreiheit der Komponente zu umgehen.\n\t\t\t\t\t*/}\n\t\t\t\t\t<slot name=\"expert\" slot=\"expert\"></slot>\n\t\t\t\t</kol-link-wc>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Gibt an, welche Elemente kontrolliert werden. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls)\n\t */\n\t@Prop() public _ariaControls?: string;\n\n\t/**\n\t * Gibt an, welchen aktuellen Auswahlstatus der Link hat. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n\t */\n\t@Prop() public _ariaCurrent?: AriaCurrent;\n\n\t/**\n\t * Gibt an, ob durch den Link etwas aufgeklappt wurde. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n\t */\n\t@Prop({ reflect: true }) public _ariaExpanded?: boolean;\n\n\t/**\n\t * Gibt einen beschreibenden Text für den Screenreader an. Damit die\n\t * Sprachsteuerung von interaktiven Elementen funktioniert, muss der\n\t * Aria-Label-Text mit dem Label-Text des Buttons beginnen.\n\t *\n\t * - https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label\n\t */\n\t@Prop() public _ariaLabel?: string;\n\n\t/**\n\t * Gibt an, ob Element ausgewählt ist (role=tab). (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n\t */\n\t@Prop({ reflect: true }) public _ariaSelected?: boolean;\n\n\t/**\n\t * Gibt an, welche Custom-Class übergeben werden soll, wenn _variant=\"custom\" gesetzt ist.\n\t */\n\t@Prop() public _customClass?: string;\n\n\t/**\n\t * Gibt an, ob der Link deaktiviert ist.\n\t */\n\t@Prop({ reflect: true }) public _disabled?: boolean = false;\n\n\t/**\n\t * Gibt die Ziel-Url des Links an.\n\t */\n\t@Prop() public _href!: string;\n\n\t/**\n\t * Gibt den Class-Identifier eines Icons eine eingebunden Icofont an. (z.B. https://icofont.com/)\n\t */\n\t@Prop() public _icon?: Stringified<KoliBriIconProp>;\n\n\t/**\n\t * Gibt an, ob nur das Icon angezeigt wird.\n\t */\n\t@Prop({ reflect: true }) public _iconOnly?: boolean = false;\n\n\t/**\n\t * Gibt einen beschreibenden Text für das Text-Element an.\n\t */\n\t@Prop() public _label!: string;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für den Link an.\n\t */\n\t@Prop() public _on?: LinkOnCallbacks;\n\n\t/**\n\t * Gibt an, welche Role der Schalter hat.\n\t */\n\t@Prop() public _role?: AlternativButtonLinkRole;\n\n\t/**\n\t * Gibt an, welchen Tab-Index der Button hat. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Definiert das Verhalten, bei dem der Link geöffnet werden soll.\n\t */\n\t@Prop() public _target?: LinkTarget;\n\n\t/**\n\t * Gibt die Beschreibung an, wenn der Link in einem anderen Programm geöffnet wird.\n\t */\n\t@Prop() public _targetDescription?: string = translate('kol-open-link-in-tab');\n\n\t/**\n\t * Gibt an, ob der Tooltip entweder oben, rechts, unten oder links angezeigt werden soll.\n\t */\n\t@Prop() public _tooltipAlign?: Alignment = 'right';\n\n\t/**\n\t * Gibt an, welche Ausprägung der Button hat.\n\t */\n\t@Prop() public _variant?: KoliBriButtonVariant = 'normal';\n\n\t/**\n\t * @see: components/abbr/component.tsx (@State)\n\t */\n\t@State() public state: LinkButtonStates = {};\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_customClass')\n\tpublic validateCustomClass(value?: string): void {\n\t\twatchString(this, '_customClass', value, {\n\t\t\tdefaultValue: undefined,\n\t\t});\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (@Watch)\n\t */\n\t@Watch('_variant')\n\tpublic validateVariant(value?: KoliBriButtonVariant): void {\n\t\twatchButtonVariant(this, '_variant', value);\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentWillLoad)\n\t */\n\tpublic componentWillLoad(): void {\n\t\tthis.validateCustomClass(this._customClass);\n\t\tthis.validateVariant(this._variant);\n\t}\n}\n"],"mappings":";;;mUAAA,MAAMA,EAAkB,6gE,MCkCXC,EAAa,M,yBASRC,KAAAC,SAAYC,IAC5BF,KAAKE,IAAMA,EACXC,EAAgBH,KAAKI,KAAMJ,KAAKE,IAAI,E,wLA8EiB,M,yDAeA,M,sIA8BTG,EAAU,wB,mBAKZ,Q,cAKM,S,WAKP,E,CAvInCC,SACN,OACCC,EAACC,EAAI,KACJD,EAAA,eACCL,IAAKF,KAAKC,SACVQ,MAAO,CACNC,OAAQ,KACR,CAACV,KAAKW,MAAMC,UAAqBZ,KAAKW,MAAMC,WAAa,SACzD,CAACZ,KAAKW,MAAME,cACXb,KAAKW,MAAMC,WAAa,iBAAmBZ,KAAKW,MAAME,eAAiB,UAAYb,KAAKW,MAAME,aAAaC,OAAS,GAEtHC,cAAef,KAAKe,cACpBC,aAAchB,KAAKgB,aACnBC,cAAejB,KAAKiB,cACpBC,WAAYlB,KAAKkB,WACjBC,cAAenB,KAAKmB,cACpBC,UAAWpB,KAAKoB,UAChBC,MAAOrB,KAAKqB,MACZC,MAAOtB,KAAKsB,MACZC,UAAWvB,KAAKuB,UAChBC,OAAQxB,KAAKwB,OACbC,IAAKzB,KAAKyB,IACVC,MAAM,SACNC,UAAW3B,KAAK2B,UAChBC,QAAS5B,KAAK4B,QACdC,mBAAoB7B,KAAK6B,mBACzBC,cAAe9B,KAAK8B,eAMpBvB,EAAA,QAAMwB,KAAK,SAASC,KAAK,Y,CA6GtBC,oBAAoBC,GAC1BC,EAAYnC,KAAM,eAAgBkC,EAAO,CACxCE,aAAcC,W,CAQTC,gBAAgBJ,GACtBK,EAAmBvC,KAAM,WAAYkC,E,CAM/BM,oBACNxC,KAAKiC,oBAAoBjC,KAAKa,cAC9Bb,KAAKsC,gBAAgBtC,KAAKY,S"}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{r as t,h as n,H as o}from"./index-50adf9a0.js";import{w as i}from"./button-link-c6783bbf.js";import{g as e,n as s}from"./dev.utils-ec1c1b88.js";import{w as r}from"./prop.validators-dd337216.js";import{s as c,p as l}from"./reuse-9dd1192b.js";import"./index-599f5430.js";import"./a11y.tipps-a876ebb7.js";function a(t){return t.split("-")[1]}function f(t){return"y"===t?"height":"width"}function u(t){return t.split("-")[0]}function d(t){return["top","bottom"].includes(u(t))?"x":"y"}function h(t,e,i){let{reference:o,floating:n}=t;const r=o.x+o.width/2-n.width/2,l=o.y+o.height/2-n.height/2,s=d(e),c=f(s),h=o[c]/2-n[c]/2,p="x"===s;let m;switch(u(e)){case"top":m={x:r,y:o.y-n.height};break;case"bottom":m={x:r,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:l};break;case"left":m={x:o.x-n.width,y:l};break;default:m={x:o.x,y:o.y}}switch(a(e)){case"start":m[s]-=h*(i&&p?-1:1);break;case"end":m[s]+=h*(i&&p?-1:1)}return m}const p=async(t,e,i)=>{const{placement:o="bottom",strategy:n="absolute",middleware:r=[],platform:l}=i,s=r.filter(Boolean),a=await(null==l.isRTL?void 0:l.isRTL(e));let c=await l.getElementRects({reference:t,floating:e,strategy:n}),{x:f,y:u}=h(c,o,a),d=o,p={},m=0;for(let i=0;i<s.length;i++){const{name:r,fn:g}=s[i],{x:y,y:b,data:v,reset:x}=await g({x:f,y:u,initialPlacement:o,placement:d,strategy:n,middlewareData:p,rects:c,platform:l,elements:{reference:t,floating:e}});f=null!=y?y:f,u=null!=b?b:u,p={...p,[r]:{...p[r],...v}},x&&m<=50&&(m++,"object"==typeof x&&(x.placement&&(d=x.placement),x.rects&&(c=!0===x.rects?await l.getElementRects({reference:t,floating:e,strategy:n}):x.rects),({x:f,y:u}=h(c,d,a))),i=-1)}return{x:f,y:u,placement:d,strategy:n,middlewareData:p}};function m(t){return{top:0,right:0,bottom:0,left:0,...t}}function b(t){return"number"!=typeof t?m(t):{top:t,right:t,bottom:t,left:t}}function y(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function g(t,e){var i;void 0===e&&(e={});const{x:o,y:n,platform:r,rects:l,elements:s,strategy:a}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:d=!1,padding:h=0}=e,p=b(h),m=s[d?"floating"===u?"reference":"floating":u],g=y(await r.getClippingRect({element:null==(i=await(null==r.isElement?void 0:r.isElement(m)))||i?m:m.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(s.floating)),boundary:c,rootBoundary:f,strategy:a})),v="floating"===u?{...l.floating,x:o,y:n}:l.reference,x=await(null==r.getOffsetParent?void 0:r.getOffsetParent(s.floating)),w=await(null==r.isElement?void 0:r.isElement(x))&&await(null==r.getScale?void 0:r.getScale(x))||{x:1,y:1},k=y(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:x,strategy:a}):v);return{top:(g.top-k.top+p.top)/w.y,bottom:(k.bottom-g.bottom+p.bottom)/w.y,left:(g.left-k.left+p.left)/w.x,right:(k.right-g.right+p.right)/w.x}}const x=Math.min,v=Math.max;function w(t,e,i){return v(t,x(e,i))}const k=t=>({name:"arrow",options:t,async fn(e){const{element:i,padding:o=0}=t||{},{x:n,y:r,placement:l,rects:s,platform:c,elements:u}=e;if(null==i)return{};const h=b(o),p={x:n,y:r},m=d(l),g=f(m),y=await c.getDimensions(i),v="y"===m,x=v?"top":"left",k=v?"bottom":"right",E=v?"clientHeight":"clientWidth",T=s.reference[g]+s.reference[m]-p[m]-s.floating[g],L=p[m]-s.reference[m],R=await(null==c.getOffsetParent?void 0:c.getOffsetParent(i));let A=R?R[E]:0;A&&await(null==c.isElement?void 0:c.isElement(R))||(A=u.floating[E]||s.floating[g]);const C=T/2-L/2,O=h[x],_=A-y[g]-h[k],S=A/2-y[g]/2+C,F=w(O,S,_),H=null!=a(l)&&S!=F&&s.reference[g]/2-(S<O?h[x]:h[k])-y[g]/2<0;return{[m]:p[m]-(H?S<O?O-S:_-S:0),data:{[m]:F,centerOffset:S-F}}}}),A={left:"right",right:"left",bottom:"top",top:"bottom"};function _(t){return t.replace(/left|right|bottom|top/g,(t=>A[t]))}function j(t,e,i){void 0===i&&(i=!1);const o=a(t),n=d(t),r=f(n);let l="x"===n?o===(i?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[r]>e.floating[r]&&(l=_(l)),{main:l,cross:_(l)}}const z={start:"end",end:"start"};function R(t){return t.replace(/start|end/g,(t=>z[t]))}function T(t){const e=_(t);return[R(t),e,R(e)]}function L(t,e,i){const o=["left","right"],n=["right","left"],r=["top","bottom"],l=["bottom","top"];switch(t){case"top":case"bottom":return i?e?n:o:e?o:n;case"left":case"right":return e?r:l;default:return[]}}function O(t,e,i,o){const n=a(t);let r=L(u(t),"start"===i,o);return n&&(r=r.map((t=>t+"-"+n)),e&&(r=r.concat(r.map(R)))),r}const P=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var i;const{placement:o,middlewareData:n,rects:r,initialPlacement:l,platform:s,elements:a}=e,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...y}=t,b=u(o),v=u(l)===l,x=await(null==s.isRTL?void 0:s.isRTL(a.floating)),w=d||(v||!m?[_(l)]:T(l));d||"none"===p||w.push(...O(l,m,p,x));const k=[l,...w],E=await g(e,y),L=[];let R=(null==(i=n.flip)?void 0:i.overflows)||[];if(c&&L.push(E[b]),f){const{main:t,cross:e}=j(o,r,x);L.push(E[t],E[e])}if(R=[...R,{placement:o,overflows:L}],!L.every((t=>t<=0))){var A,C;const t=((null==(A=n.flip)?void 0:A.index)||0)+1,e=k[t];if(e)return{data:{index:t,overflows:R},reset:{placement:e}};let i=null==(C=R.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:C.placement;if(!i)switch(h){case"bestFit":{var S;const t=null==(S=R.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:S[0];t&&(i=t);break}case"initialPlacement":i=l}if(o!==i)return{reset:{placement:i}}}return{}}}};async function $(t,e){const{placement:i,platform:o,elements:n}=t,r=await(null==o.isRTL?void 0:o.isRTL(n.floating)),l=u(i),s=a(i),c="x"===d(i),f=["left","top"].includes(l)?-1:1,h=r&&c?-1:1,p="function"==typeof e?e(t):e;let{mainAxis:m,crossAxis:g,alignmentAxis:y}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return s&&"number"==typeof y&&(g="end"===s?-1*y:y),c?{x:g*h,y:m*f}:{x:m*f,y:g*h}}const D=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){const{x:i,y:o}=e,n=await $(e,t);return{x:i+n.x,y:o+n.y,data:n}}}};function C(t){return"x"===t?"y":"x"}const F=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:i,y:o,placement:n}=e,{mainAxis:r=!0,crossAxis:l=!1,limiter:s={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...a}=t,c={x:i,y:o},f=await g(e,a),h=d(u(n)),p=C(h);let m=c[h],y=c[p];if(r){const t="y"===h?"bottom":"right";m=w(m+f["y"===h?"top":"left"],m,m-f[t])}if(l){const t="y"===p?"bottom":"right";y=w(y+f["y"===p?"top":"left"],y,y-f[t])}const b=s.fn({...e,[h]:m,[p]:y});return{...b,data:{x:b.x-i,y:b.y-o}}}}};function M(t){var e;return(null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function S(t){return M(t).getComputedStyle(t)}const B=Math.min,E=Math.max,I=Math.round;function H(t){const e=S(t);let i=parseFloat(e.width),o=parseFloat(e.height);const n=t.offsetWidth,r=t.offsetHeight,l=I(i)!==n||I(o)!==r;return l&&(i=n,o=r),{width:i,height:o,fallback:l}}function N(t){return q(t)?(t.nodeName||"").toLowerCase():""}let V;function W(){if(V)return V;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(V=t.brands.map((t=>t.brand+"/"+t.version)).join(" "),V):navigator.userAgent}function X(t){return t instanceof M(t).HTMLElement}function Y(t){return t instanceof M(t).Element}function q(t){return t instanceof M(t).Node}function G(t){if("undefined"==typeof ShadowRoot)return!1;return t instanceof M(t).ShadowRoot||t instanceof ShadowRoot}function J(t){const{overflow:e,overflowX:i,overflowY:o,display:n}=S(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+i)&&!["inline","contents"].includes(n)}function K(t){return["table","td","th"].includes(N(t))}function Q(t){const e=/firefox/i.test(W()),i=S(t),o=i.backdropFilter||i.WebkitBackdropFilter;return"none"!==i.transform||"none"!==i.perspective||!!o&&"none"!==o||e&&"filter"===i.willChange||e&&!!i.filter&&"none"!==i.filter||["transform","perspective"].some((t=>i.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const e=i.contain;return null!=e&&e.includes(t)}))}function U(){return/^((?!chrome|android).)*safari/i.test(W())}function Z(t){return["html","body","#document"].includes(N(t))}function tt(t){return Y(t)?t:t.contextElement}const nt={x:1,y:1};function ot(t){const e=tt(t);if(!X(e))return nt;const i=e.getBoundingClientRect(),{width:o,height:n,fallback:r}=H(e);let l=(r?I(i.width):i.width)/o,s=(r?I(i.height):i.height)/n;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}function it(t,e,i,o){var n,r;void 0===e&&(e=!1),void 0===i&&(i=!1);const l=t.getBoundingClientRect(),s=tt(t);let a=nt;e&&(o?Y(o)&&(a=ot(o)):a=ot(t));const c=s?M(s):window,f=U()&&i;let u=(l.left+(f&&(null==(n=c.visualViewport)?void 0:n.offsetLeft)||0))/a.x,d=(l.top+(f&&(null==(r=c.visualViewport)?void 0:r.offsetTop)||0))/a.y,h=l.width/a.x,p=l.height/a.y;if(s){const t=M(s),e=o&&Y(o)?M(o):o;let i=t.frameElement;for(;i&&o&&e!==t;){const t=ot(i),e=i.getBoundingClientRect(),o=getComputedStyle(i);e.x+=(i.clientLeft+parseFloat(o.paddingLeft))*t.x,e.y+=(i.clientTop+parseFloat(o.paddingTop))*t.y,u*=t.x,d*=t.y,h*=t.x,p*=t.y,u+=e.x,d+=e.y,i=M(i).frameElement}}return{width:h,height:p,top:d,right:u+h,bottom:d+p,left:u,x:u,y:d}}function et(t){return((q(t)?t.ownerDocument:t.document)||window.document).documentElement}function st(t){return Y(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function rt(t){let{rect:e,offsetParent:i,strategy:o}=t;const n=X(i),r=et(i);if(i===r)return e;let l={scrollLeft:0,scrollTop:0},s={x:1,y:1};const a={x:0,y:0};if((n||!n&&"fixed"!==o)&&(("body"!==N(i)||J(r))&&(l=st(i)),X(i))){const t=it(i);s=ot(i),a.x=t.x+i.clientLeft,a.y=t.y+i.clientTop}return{width:e.width*s.x,height:e.height*s.y,x:e.x*s.x-l.scrollLeft*s.x+a.x,y:e.y*s.y-l.scrollTop*s.y+a.y}}function ct(t){return it(et(t)).left+st(t).scrollLeft}function lt(t){const e=et(t),i=st(t),o=t.ownerDocument.body,n=E(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=E(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let l=-i.scrollLeft+ct(t);const s=-i.scrollTop;return"rtl"===S(o).direction&&(l+=E(e.clientWidth,o.clientWidth)-n),{width:n,height:r,x:l,y:s}}function at(t){if("html"===N(t))return t;const e=t.assignedSlot||t.parentNode||G(t)&&t.host||et(t);return G(e)?e.host:e}function ft(t){const e=at(t);return Z(e)?e.ownerDocument.body:X(e)&&J(e)?e:ft(e)}function ut(t,e){var i;void 0===e&&(e=[]);const o=ft(t),n=o===(null==(i=t.ownerDocument)?void 0:i.body),r=M(o);return n?e.concat(r,r.visualViewport||[],J(o)?o:[]):e.concat(o,ut(o))}function dt(t,e){const i=M(t),o=et(t),n=i.visualViewport;let r=o.clientWidth,l=o.clientHeight,s=0,a=0;if(n){r=n.width,l=n.height;const t=U();(!t||t&&"fixed"===e)&&(s=n.offsetLeft,a=n.offsetTop)}return{width:r,height:l,x:s,y:a}}function ht(t,e){const i=it(t,!0,"fixed"===e),o=i.top+t.clientTop,n=i.left+t.clientLeft,r=X(t)?ot(t):{x:1,y:1};return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:n*r.x,y:o*r.y}}function pt(t,e,i){let o;if("viewport"===e)o=dt(t,i);else if("document"===e)o=lt(et(t));else if(Y(e))o=ht(e,i);else{const i={...e};if(U()){var n,r;const e=M(t);i.x-=(null==(n=e.visualViewport)?void 0:n.offsetLeft)||0,i.y-=(null==(r=e.visualViewport)?void 0:r.offsetTop)||0}o=i}return y(o)}function mt(t,e){const i=e.get(t);if(i)return i;let o=ut(t).filter((t=>Y(t)&&"body"!==N(t))),n=null;const r="fixed"===S(t).position;let l=r?at(t):t;for(;Y(l)&&!Z(l);){const t=S(l),e=Q(l);if("fixed"===t.position)n=null;else{(r?!e&&!n:!e&&"static"===t.position&&!!n&&["absolute","fixed"].includes(n.position))?o=o.filter((t=>t!==l)):n=t}l=at(l)}return e.set(t,o),o}function bt(t){let{element:e,boundary:i,rootBoundary:o,strategy:n}=t;const r=[..."clippingAncestors"===i?mt(e,this._c):[].concat(i),o],l=r[0],s=r.reduce(((t,i)=>{const o=pt(e,i,n);return t.top=E(o.top,t.top),t.right=B(o.right,t.right),t.bottom=B(o.bottom,t.bottom),t.left=E(o.left,t.left),t}),pt(e,l,n));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function yt(t){return X(t)?H(t):t.getBoundingClientRect()}function gt(t,e){return X(t)&&"fixed"!==S(t).position?e?e(t):t.offsetParent:null}function xt(t){let e=at(t);for(;X(e)&&!Z(e);){if(Q(e))return e;e=at(e)}return null}function vt(t,e){const i=M(t);let o=gt(t,e);for(;o&&K(o)&&"static"===S(o).position;)o=gt(o,e);return o&&("html"===N(o)||"body"===N(o)&&"static"===S(o).position&&!Q(o))?i:o||xt(t)||i}function wt(t,e,i){const o=X(e),n=et(e),r=it(t,!0,"fixed"===i,e);let l={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(o||!o&&"fixed"!==i)if(("body"!==N(e)||J(n))&&(l=st(e)),X(e)){const t=it(e,!0);s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}else n&&(s.x=ct(n));return{x:r.left+l.scrollLeft-s.x,y:r.top+l.scrollTop-s.y,width:r.width,height:r.height}}const kt={getClippingRect:bt,convertOffsetParentRelativeRectToViewportRelativeRect:rt,isElement:Y,getDimensions:yt,getOffsetParent:vt,getDocumentElement:et,getScale:ot,async getElementRects(t){let{reference:e,floating:i,strategy:o}=t;const n=this.getOffsetParent||vt,r=this.getDimensions;return{reference:wt(e,await n(i),o),floating:{x:0,y:0,...await r(i)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===S(t).direction},At=(t,e,i)=>{const o=new Map,n={platform:kt,...i},r={...n.platform,_c:o};return p(t,e,{...n,platform:r})},_t=":host{--kolibri-border-color:#666;--kolibri-border-radius:0.125rem;--kolibri-border-width:1px;--kolibri-color-error:#f44336;--kolibri-color-info:#2196f3;--kolibri-color-success:#4caf50;--kolibri-color-warning:#ff9800;--kolibri-color-primary:#3f51b5;--kolibri-color-secondary:#ff4081;--kolibri-color-normal:#9e9e9e;--kolibri-color-danger:#f44336;--kolibri-color-ghost:#f5f5f5;--kolibri-color-disabled:#bdbdbd;--kolibri-color-text:#222222;--kolibri-color-visited:#9c27b0;--kolibri-font-family:Verdana, Arial, Tahoma, Helvetica, sans-serif;--kolibri-font-size:16px;--kolibri-spacing:0.25rem}:host{font-family:inherit;font-size:inherit}:host *{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{font-family:var(--kolibri-font-family);font-size:inherit}*{box-sizing:border-box}kol-icon{color:inherit}kol-span-wc{display:grid;place-items:center;width:100%}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}a{display:inline-flex;place-items:baseline}button{background-color:transparent;border-width:0;margin:0;min-height:44px;min-width:44px;padding:0}a,button,input,select,textarea{cursor:pointer}a.icon-only>kol-span-wc>span>span,:host button.icon-only>kol-span-wc>span>span{display:none}h1,h2,h3,h4,h5,h6{font-family:var(--kolibri-font-family);font-size:var(--kolibri-font-size);margin:0;padding:0}kol-tooltip #floating{animation-name:fadeInOpacity;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:0.5s;box-sizing:border-box;display:none;position:absolute}kol-tooltip #arrow{background:#333;height:10px;position:absolute;transform:rotate(45deg);width:10px;z-index:999}kol-tooltip kol-badge{border-radius:var(--kolibri-border-radius);font-size:calc(4 * var(--kolibri-spacing));max-width:300px;position:relative;z-index:1000}@keyframes fadeInOpacity{0%{opacity:0}100%{opacity:1}}",jt=class{constructor(i){t(this,i),this.alignTooltip=()=>{var t;if("test"!==l&&this.previousSibling){const e=this.previousSibling;if(this.tooltipElement){const i=this.tooltipElement,o=this.arrowElement,n=[D(null!==(t=null==o?void 0:o.offsetHeight)&&void 0!==t?t:10),P(),F()];o&&n.push(k({element:o})),At(e,i,{placement:this.state._align,middleware:n}).then((({x:t,y:e,middlewareData:n,placement:r})=>{var l,s;Object.assign(i.style,{left:`${t}px`,top:`${e}px`}),o&&((null===(l=n.arrow)||void 0===l?void 0:l.x)?Object.assign(o.style,{left:`${n.arrow.x}px`,top:"bottom"===r?-o.offsetHeight/2+"px":"",bottom:"top"===r?-o.offsetHeight/2+"px":""}):(null===(s=n.arrow)||void 0===s?void 0:s.y)&&Object.assign(o.style,{left:"right"===r?-o.offsetWidth/2+"px":"",right:"left"===r?-o.offsetWidth/2+"px":"",top:`${n.arrow.y}px`}))}))}}},this.showTooltip=()=>{this.tooltipElement&&(this.tooltipElement.style.setProperty("display","block"),e().body.addEventListener("keyup",this.hideTooltipByEscape),this.alignTooltip(),this.tooltipElement.style.setProperty("visibility","visible"),document.addEventListener("scroll",this.alignTooltip))},this.hideTooltip=()=>{this.tooltipElement&&(this.tooltipElement.style.setProperty("display","none"),this.tooltipElement.style.setProperty("visibility","hidden"),document.removeEventListener("scroll",this.alignTooltip))},this.hideTooltipByEscape=t=>{"Escape"===t.key&&(e().body.removeEventListener("keyup",this.hideTooltipByEscape),this.hideTooltip())},this.addListeners=t=>{t.addEventListener("mouseover",this.incrementOverFocusCount),t.addEventListener("focus",this.incrementOverFocusCount),t.addEventListener("mouseout",this.decrementOverFocusCount),t.addEventListener("blur",this.decrementOverFocusCount)},this.removeListeners=t=>{t.removeEventListener("mouseover",this.incrementOverFocusCount),t.removeEventListener("focus",this.incrementOverFocusCount),t.removeEventListener("mouseout",this.decrementOverFocusCount),t.removeEventListener("blur",this.decrementOverFocusCount)},this.resyncListeners=t=>{this.removeListeners(t),this.addListeners(t)},this.catchHostElement=t=>{t&&(this.previousSibling=t.previousElementSibling,this.previousSibling&&this.resyncListeners(this.previousSibling))},this.catchTooltipElement=t=>{this.tooltipElement=t,this.tooltipElement&&this.resyncListeners(this.tooltipElement)},this.catchArrowElement=t=>{this.arrowElement=t},this.overFocusCount=0,this.incrementOverFocusCount=()=>{this.overFocusCount++,this.showOrHideTooltip()},this.decrementOverFocusCount=()=>{this.overFocusCount--,this.showOrHideTooltip()},this.showOrHideTooltip=()=>{clearTimeout(this.overFocusTimeout),this.overFocusTimeout=setTimeout((()=>{clearTimeout(this.overFocusTimeout),this.overFocusCount>0?this.showTooltip():this.hideTooltip()}),250)},this._align="top",this._id=void 0,this._label=void 0,this.state={_align:"top",_id:s(),_label:""}}render(){return c((()=>{this.alignTooltip(),c(this.alignTooltip,750)}),250),n(o,{ref:this.catchHostElement},""!==this.state._label&&n("div",{id:"floating",ref:this.catchTooltipElement},n("div",{id:"arrow",ref:this.catchArrowElement}),n("kol-badge",{id:this.state._id,_color:{backgroundColor:"#333",color:"#ddd"},_label:this.state._label})))}validateAlign(t){i(this,"_align",t)}validateId(t){r(this,"_id",t)}validateLabel(t){r(this,"_label",t)}componentWillLoad(){this.validateAlign(this._align),this.validateId(this._id),this.validateLabel(this._label)}disconnectedCallback(){this.previousSibling&&this.removeListeners(this.previousSibling),this.tooltipElement&&this.removeListeners(this.tooltipElement)}static get watchers(){return{_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}}};jt.style={default:_t};export{jt as kol_tooltip};
4
+ import{r as t,h as n,H as o}from"./index-50adf9a0.js";import{w as i}from"./button-link-c6783bbf.js";import{g as e,n as s}from"./dev.utils-ec1c1b88.js";import{w as r}from"./prop.validators-dd337216.js";import{s as c,p as l}from"./reuse-9dd1192b.js";import"./index-599f5430.js";import"./a11y.tipps-a876ebb7.js";function a(t){return t.split("-")[1]}function f(t){return"y"===t?"height":"width"}function u(t){return t.split("-")[0]}function d(t){return["top","bottom"].includes(u(t))?"x":"y"}function h(t,e,i){let{reference:o,floating:n}=t;const r=o.x+o.width/2-n.width/2,l=o.y+o.height/2-n.height/2,s=d(e),c=f(s),h=o[c]/2-n[c]/2,p="x"===s;let m;switch(u(e)){case"top":m={x:r,y:o.y-n.height};break;case"bottom":m={x:r,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:l};break;case"left":m={x:o.x-n.width,y:l};break;default:m={x:o.x,y:o.y}}switch(a(e)){case"start":m[s]-=h*(i&&p?-1:1);break;case"end":m[s]+=h*(i&&p?-1:1)}return m}const p=async(t,e,i)=>{const{placement:o="bottom",strategy:n="absolute",middleware:r=[],platform:l}=i,s=r.filter(Boolean),a=await(null==l.isRTL?void 0:l.isRTL(e));let c=await l.getElementRects({reference:t,floating:e,strategy:n}),{x:f,y:u}=h(c,o,a),d=o,p={},m=0;for(let i=0;i<s.length;i++){const{name:r,fn:g}=s[i],{x:y,y:b,data:v,reset:x}=await g({x:f,y:u,initialPlacement:o,placement:d,strategy:n,middlewareData:p,rects:c,platform:l,elements:{reference:t,floating:e}});f=null!=y?y:f,u=null!=b?b:u,p={...p,[r]:{...p[r],...v}},x&&m<=50&&(m++,"object"==typeof x&&(x.placement&&(d=x.placement),x.rects&&(c=!0===x.rects?await l.getElementRects({reference:t,floating:e,strategy:n}):x.rects),({x:f,y:u}=h(c,d,a))),i=-1)}return{x:f,y:u,placement:d,strategy:n,middlewareData:p}};function m(t){return{top:0,right:0,bottom:0,left:0,...t}}function b(t){return"number"!=typeof t?m(t):{top:t,right:t,bottom:t,left:t}}function y(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function g(t,e){var i;void 0===e&&(e={});const{x:o,y:n,platform:r,rects:l,elements:s,strategy:a}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:d=!1,padding:h=0}=e,p=b(h),m=s[d?"floating"===u?"reference":"floating":u],g=y(await r.getClippingRect({element:null==(i=await(null==r.isElement?void 0:r.isElement(m)))||i?m:m.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(s.floating)),boundary:c,rootBoundary:f,strategy:a})),v="floating"===u?{...l.floating,x:o,y:n}:l.reference,x=await(null==r.getOffsetParent?void 0:r.getOffsetParent(s.floating)),w=await(null==r.isElement?void 0:r.isElement(x))&&await(null==r.getScale?void 0:r.getScale(x))||{x:1,y:1},k=y(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:x,strategy:a}):v);return{top:(g.top-k.top+p.top)/w.y,bottom:(k.bottom-g.bottom+p.bottom)/w.y,left:(g.left-k.left+p.left)/w.x,right:(k.right-g.right+p.right)/w.x}}const x=Math.min,v=Math.max;function w(t,e,i){return v(t,x(e,i))}const k=t=>({name:"arrow",options:t,async fn(e){const{element:i,padding:o=0}=t||{},{x:n,y:r,placement:l,rects:s,platform:c,elements:u}=e;if(null==i)return{};const h=b(o),p={x:n,y:r},m=d(l),g=f(m),y=await c.getDimensions(i),v="y"===m,x=v?"top":"left",k=v?"bottom":"right",E=v?"clientHeight":"clientWidth",T=s.reference[g]+s.reference[m]-p[m]-s.floating[g],L=p[m]-s.reference[m],R=await(null==c.getOffsetParent?void 0:c.getOffsetParent(i));let A=R?R[E]:0;A&&await(null==c.isElement?void 0:c.isElement(R))||(A=u.floating[E]||s.floating[g]);const C=T/2-L/2,O=h[x],_=A-y[g]-h[k],S=A/2-y[g]/2+C,F=w(O,S,_),H=null!=a(l)&&S!=F&&s.reference[g]/2-(S<O?h[x]:h[k])-y[g]/2<0;return{[m]:p[m]-(H?S<O?O-S:_-S:0),data:{[m]:F,centerOffset:S-F}}}}),A={left:"right",right:"left",bottom:"top",top:"bottom"};function _(t){return t.replace(/left|right|bottom|top/g,(t=>A[t]))}function j(t,e,i){void 0===i&&(i=!1);const o=a(t),n=d(t),r=f(n);let l="x"===n?o===(i?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[r]>e.floating[r]&&(l=_(l)),{main:l,cross:_(l)}}const z={start:"end",end:"start"};function R(t){return t.replace(/start|end/g,(t=>z[t]))}function T(t){const e=_(t);return[R(t),e,R(e)]}function L(t,e,i){const o=["left","right"],n=["right","left"],r=["top","bottom"],l=["bottom","top"];switch(t){case"top":case"bottom":return i?e?n:o:e?o:n;case"left":case"right":return e?r:l;default:return[]}}function O(t,e,i,o){const n=a(t);let r=L(u(t),"start"===i,o);return n&&(r=r.map((t=>t+"-"+n)),e&&(r=r.concat(r.map(R)))),r}const P=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var i;const{placement:o,middlewareData:n,rects:r,initialPlacement:l,platform:s,elements:a}=e,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...y}=t,b=u(o),v=u(l)===l,x=await(null==s.isRTL?void 0:s.isRTL(a.floating)),w=d||(v||!m?[_(l)]:T(l));d||"none"===p||w.push(...O(l,m,p,x));const k=[l,...w],E=await g(e,y),L=[];let R=(null==(i=n.flip)?void 0:i.overflows)||[];if(c&&L.push(E[b]),f){const{main:t,cross:e}=j(o,r,x);L.push(E[t],E[e])}if(R=[...R,{placement:o,overflows:L}],!L.every((t=>t<=0))){var A,C;const t=((null==(A=n.flip)?void 0:A.index)||0)+1,e=k[t];if(e)return{data:{index:t,overflows:R},reset:{placement:e}};let i=null==(C=R.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:C.placement;if(!i)switch(h){case"bestFit":{var S;const t=null==(S=R.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:S[0];t&&(i=t);break}case"initialPlacement":i=l}if(o!==i)return{reset:{placement:i}}}return{}}}};async function $(t,e){const{placement:i,platform:o,elements:n}=t,r=await(null==o.isRTL?void 0:o.isRTL(n.floating)),l=u(i),s=a(i),c="x"===d(i),f=["left","top"].includes(l)?-1:1,h=r&&c?-1:1,p="function"==typeof e?e(t):e;let{mainAxis:m,crossAxis:g,alignmentAxis:y}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return s&&"number"==typeof y&&(g="end"===s?-1*y:y),c?{x:g*h,y:m*f}:{x:m*f,y:g*h}}const D=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){const{x:i,y:o}=e,n=await $(e,t);return{x:i+n.x,y:o+n.y,data:n}}}};function C(t){return"x"===t?"y":"x"}const F=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:i,y:o,placement:n}=e,{mainAxis:r=!0,crossAxis:l=!1,limiter:s={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...a}=t,c={x:i,y:o},f=await g(e,a),h=d(u(n)),p=C(h);let m=c[h],y=c[p];if(r){const t="y"===h?"bottom":"right";m=w(m+f["y"===h?"top":"left"],m,m-f[t])}if(l){const t="y"===p?"bottom":"right";y=w(y+f["y"===p?"top":"left"],y,y-f[t])}const b=s.fn({...e,[h]:m,[p]:y});return{...b,data:{x:b.x-i,y:b.y-o}}}}};function M(t){var e;return(null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function S(t){return M(t).getComputedStyle(t)}const B=Math.min,E=Math.max,I=Math.round;function H(t){const e=S(t);let i=parseFloat(e.width),o=parseFloat(e.height);const n=t.offsetWidth,r=t.offsetHeight,l=I(i)!==n||I(o)!==r;return l&&(i=n,o=r),{width:i,height:o,fallback:l}}function N(t){return q(t)?(t.nodeName||"").toLowerCase():""}let V;function W(){if(V)return V;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(V=t.brands.map((t=>t.brand+"/"+t.version)).join(" "),V):navigator.userAgent}function X(t){return t instanceof M(t).HTMLElement}function Y(t){return t instanceof M(t).Element}function q(t){return t instanceof M(t).Node}function G(t){if("undefined"==typeof ShadowRoot)return!1;return t instanceof M(t).ShadowRoot||t instanceof ShadowRoot}function J(t){const{overflow:e,overflowX:i,overflowY:o,display:n}=S(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+i)&&!["inline","contents"].includes(n)}function K(t){return["table","td","th"].includes(N(t))}function Q(t){const e=/firefox/i.test(W()),i=S(t),o=i.backdropFilter||i.WebkitBackdropFilter;return"none"!==i.transform||"none"!==i.perspective||!!o&&"none"!==o||e&&"filter"===i.willChange||e&&!!i.filter&&"none"!==i.filter||["transform","perspective"].some((t=>i.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const e=i.contain;return null!=e&&e.includes(t)}))}function U(){return/^((?!chrome|android).)*safari/i.test(W())}function Z(t){return["html","body","#document"].includes(N(t))}function tt(t){return Y(t)?t:t.contextElement}const nt={x:1,y:1};function ot(t){const e=tt(t);if(!X(e))return nt;const i=e.getBoundingClientRect(),{width:o,height:n,fallback:r}=H(e);let l=(r?I(i.width):i.width)/o,s=(r?I(i.height):i.height)/n;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}function it(t,e,i,o){var n,r;void 0===e&&(e=!1),void 0===i&&(i=!1);const l=t.getBoundingClientRect(),s=tt(t);let a=nt;e&&(o?Y(o)&&(a=ot(o)):a=ot(t));const c=s?M(s):window,f=U()&&i;let u=(l.left+(f&&(null==(n=c.visualViewport)?void 0:n.offsetLeft)||0))/a.x,d=(l.top+(f&&(null==(r=c.visualViewport)?void 0:r.offsetTop)||0))/a.y,h=l.width/a.x,p=l.height/a.y;if(s){const t=M(s),e=o&&Y(o)?M(o):o;let i=t.frameElement;for(;i&&o&&e!==t;){const t=ot(i),e=i.getBoundingClientRect(),o=getComputedStyle(i);e.x+=(i.clientLeft+parseFloat(o.paddingLeft))*t.x,e.y+=(i.clientTop+parseFloat(o.paddingTop))*t.y,u*=t.x,d*=t.y,h*=t.x,p*=t.y,u+=e.x,d+=e.y,i=M(i).frameElement}}return y({width:h,height:p,x:u,y:d})}function et(t){return((q(t)?t.ownerDocument:t.document)||window.document).documentElement}function st(t){return Y(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function rt(t){let{rect:e,offsetParent:i,strategy:o}=t;const n=X(i),r=et(i);if(i===r)return e;let l={scrollLeft:0,scrollTop:0},s={x:1,y:1};const a={x:0,y:0};if((n||!n&&"fixed"!==o)&&(("body"!==N(i)||J(r))&&(l=st(i)),X(i))){const t=it(i);s=ot(i),a.x=t.x+i.clientLeft,a.y=t.y+i.clientTop}return{width:e.width*s.x,height:e.height*s.y,x:e.x*s.x-l.scrollLeft*s.x+a.x,y:e.y*s.y-l.scrollTop*s.y+a.y}}function ct(t){return it(et(t)).left+st(t).scrollLeft}function lt(t){const e=et(t),i=st(t),o=t.ownerDocument.body,n=E(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=E(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let l=-i.scrollLeft+ct(t);const s=-i.scrollTop;return"rtl"===S(o).direction&&(l+=E(e.clientWidth,o.clientWidth)-n),{width:n,height:r,x:l,y:s}}function at(t){if("html"===N(t))return t;const e=t.assignedSlot||t.parentNode||G(t)&&t.host||et(t);return G(e)?e.host:e}function ft(t){const e=at(t);return Z(e)?e.ownerDocument.body:X(e)&&J(e)?e:ft(e)}function ut(t,e){var i;void 0===e&&(e=[]);const o=ft(t),n=o===(null==(i=t.ownerDocument)?void 0:i.body),r=M(o);return n?e.concat(r,r.visualViewport||[],J(o)?o:[]):e.concat(o,ut(o))}function dt(t,e){const i=M(t),o=et(t),n=i.visualViewport;let r=o.clientWidth,l=o.clientHeight,s=0,a=0;if(n){r=n.width,l=n.height;const t=U();(!t||t&&"fixed"===e)&&(s=n.offsetLeft,a=n.offsetTop)}return{width:r,height:l,x:s,y:a}}function ht(t,e){const i=it(t,!0,"fixed"===e),o=i.top+t.clientTop,n=i.left+t.clientLeft,r=X(t)?ot(t):{x:1,y:1};return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:n*r.x,y:o*r.y}}function pt(t,e,i){let o;if("viewport"===e)o=dt(t,i);else if("document"===e)o=lt(et(t));else if(Y(e))o=ht(e,i);else{const i={...e};if(U()){var n,r;const e=M(t);i.x-=(null==(n=e.visualViewport)?void 0:n.offsetLeft)||0,i.y-=(null==(r=e.visualViewport)?void 0:r.offsetTop)||0}o=i}return y(o)}function mt(t,e){const i=e.get(t);if(i)return i;let o=ut(t).filter((t=>Y(t)&&"body"!==N(t))),n=null;const r="fixed"===S(t).position;let l=r?at(t):t;for(;Y(l)&&!Z(l);){const t=S(l),e=Q(l);if("fixed"===t.position)n=null;else{(r?!e&&!n:!e&&"static"===t.position&&!!n&&["absolute","fixed"].includes(n.position))?o=o.filter((t=>t!==l)):n=t}l=at(l)}return e.set(t,o),o}function bt(t){let{element:e,boundary:i,rootBoundary:o,strategy:n}=t;const r=[..."clippingAncestors"===i?mt(e,this._c):[].concat(i),o],l=r[0],s=r.reduce(((t,i)=>{const o=pt(e,i,n);return t.top=E(o.top,t.top),t.right=B(o.right,t.right),t.bottom=B(o.bottom,t.bottom),t.left=E(o.left,t.left),t}),pt(e,l,n));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function yt(t){return X(t)?H(t):t.getBoundingClientRect()}function gt(t,e){return X(t)&&"fixed"!==S(t).position?e?e(t):t.offsetParent:null}function xt(t){let e=at(t);for(;X(e)&&!Z(e);){if(Q(e))return e;e=at(e)}return null}function vt(t,e){const i=M(t);if(!X(t))return i;let o=gt(t,e);for(;o&&K(o)&&"static"===S(o).position;)o=gt(o,e);return o&&("html"===N(o)||"body"===N(o)&&"static"===S(o).position&&!Q(o))?i:o||xt(t)||i}function wt(t,e,i){const o=X(e),n=et(e),r=it(t,!0,"fixed"===i,e);let l={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(o||!o&&"fixed"!==i)if(("body"!==N(e)||J(n))&&(l=st(e)),X(e)){const t=it(e,!0);s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}else n&&(s.x=ct(n));return{x:r.left+l.scrollLeft-s.x,y:r.top+l.scrollTop-s.y,width:r.width,height:r.height}}const kt={getClippingRect:bt,convertOffsetParentRelativeRectToViewportRelativeRect:rt,isElement:Y,getDimensions:yt,getOffsetParent:vt,getDocumentElement:et,getScale:ot,async getElementRects(t){let{reference:e,floating:i,strategy:o}=t;const n=this.getOffsetParent||vt,r=this.getDimensions;return{reference:wt(e,await n(i),o),floating:{x:0,y:0,...await r(i)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===S(t).direction},At=(t,e,i)=>{const o=new Map,n={platform:kt,...i},r={...n.platform,_c:o};return p(t,e,{...n,platform:r})},_t=":host{--kolibri-border-color:#666;--kolibri-border-radius:0.125rem;--kolibri-border-width:1px;--kolibri-color-error:#f44336;--kolibri-color-info:#2196f3;--kolibri-color-success:#4caf50;--kolibri-color-warning:#ff9800;--kolibri-color-primary:#3f51b5;--kolibri-color-secondary:#ff4081;--kolibri-color-normal:#9e9e9e;--kolibri-color-danger:#f44336;--kolibri-color-ghost:#f5f5f5;--kolibri-color-disabled:#bdbdbd;--kolibri-color-text:#222222;--kolibri-color-visited:#9c27b0;--kolibri-font-family:Verdana, Arial, Tahoma, Helvetica, sans-serif;--kolibri-font-size:16px;--kolibri-spacing:0.25rem}:host{font-family:inherit;font-size:inherit}:host *{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}:host{font-family:var(--kolibri-font-family);font-size:inherit}*{box-sizing:border-box}kol-icon{color:inherit}kol-span-wc{display:grid;place-items:center;width:100%}kol-span-wc>span{display:flex;gap:var(--kolibri-spacing);place-items:center}a{display:inline-flex;place-items:baseline}button{background-color:transparent;border-width:0;margin:0;min-height:44px;min-width:44px;padding:0}a,button,input,select,textarea{cursor:pointer}a.icon-only>kol-span-wc>span>span,:host button.icon-only>kol-span-wc>span>span{display:none}h1,h2,h3,h4,h5,h6{font-family:var(--kolibri-font-family);font-size:var(--kolibri-font-size);margin:0;padding:0}kol-tooltip #floating{animation-name:fadeInOpacity;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:0.5s;box-sizing:border-box;display:none;position:absolute}kol-tooltip #arrow{background:#333;height:10px;position:absolute;transform:rotate(45deg);width:10px;z-index:999}kol-tooltip kol-badge{border-radius:var(--kolibri-border-radius);font-size:calc(4 * var(--kolibri-spacing));max-width:300px;position:relative;z-index:1000}@keyframes fadeInOpacity{0%{opacity:0}100%{opacity:1}}",jt=class{constructor(i){t(this,i),this.alignTooltip=()=>{var t;if("test"!==l&&this.previousSibling){const e=this.previousSibling;if(this.tooltipElement){const i=this.tooltipElement,o=this.arrowElement,n=[D(null!==(t=null==o?void 0:o.offsetHeight)&&void 0!==t?t:10),P(),F()];o&&n.push(k({element:o})),At(e,i,{placement:this.state._align,middleware:n}).then((({x:t,y:e,middlewareData:n,placement:r})=>{var l,s;Object.assign(i.style,{left:`${t}px`,top:`${e}px`}),o&&((null===(l=n.arrow)||void 0===l?void 0:l.x)?Object.assign(o.style,{left:`${n.arrow.x}px`,top:"bottom"===r?-o.offsetHeight/2+"px":"",bottom:"top"===r?-o.offsetHeight/2+"px":""}):(null===(s=n.arrow)||void 0===s?void 0:s.y)&&Object.assign(o.style,{left:"right"===r?-o.offsetWidth/2+"px":"",right:"left"===r?-o.offsetWidth/2+"px":"",top:`${n.arrow.y}px`}))}))}}},this.showTooltip=()=>{this.tooltipElement&&(this.tooltipElement.style.setProperty("display","block"),e().body.addEventListener("keyup",this.hideTooltipByEscape),this.alignTooltip(),this.tooltipElement.style.setProperty("visibility","visible"),document.addEventListener("scroll",this.alignTooltip))},this.hideTooltip=()=>{this.tooltipElement&&(this.tooltipElement.style.setProperty("display","none"),this.tooltipElement.style.setProperty("visibility","hidden"),document.removeEventListener("scroll",this.alignTooltip))},this.hideTooltipByEscape=t=>{"Escape"===t.key&&(e().body.removeEventListener("keyup",this.hideTooltipByEscape),this.hideTooltip())},this.addListeners=t=>{t.addEventListener("mouseover",this.incrementOverFocusCount),t.addEventListener("focus",this.incrementOverFocusCount),t.addEventListener("mouseout",this.decrementOverFocusCount),t.addEventListener("blur",this.decrementOverFocusCount)},this.removeListeners=t=>{t.removeEventListener("mouseover",this.incrementOverFocusCount),t.removeEventListener("focus",this.incrementOverFocusCount),t.removeEventListener("mouseout",this.decrementOverFocusCount),t.removeEventListener("blur",this.decrementOverFocusCount)},this.resyncListeners=t=>{this.removeListeners(t),this.addListeners(t)},this.catchHostElement=t=>{t&&(this.previousSibling=t.previousElementSibling,this.previousSibling&&this.resyncListeners(this.previousSibling))},this.catchTooltipElement=t=>{this.tooltipElement=t,this.tooltipElement&&this.resyncListeners(this.tooltipElement)},this.catchArrowElement=t=>{this.arrowElement=t},this.overFocusCount=0,this.incrementOverFocusCount=()=>{this.overFocusCount++,this.showOrHideTooltip()},this.decrementOverFocusCount=()=>{this.overFocusCount--,this.showOrHideTooltip()},this.showOrHideTooltip=()=>{clearTimeout(this.overFocusTimeout),this.overFocusTimeout=setTimeout((()=>{clearTimeout(this.overFocusTimeout),this.overFocusCount>0?this.showTooltip():this.hideTooltip()}),250)},this._align="top",this._id=void 0,this._label=void 0,this.state={_align:"top",_id:s(),_label:""}}render(){return c((()=>{this.alignTooltip(),c(this.alignTooltip,750)}),250),n(o,{ref:this.catchHostElement},""!==this.state._label&&n("div",{id:"floating",ref:this.catchTooltipElement},n("div",{id:"arrow",ref:this.catchArrowElement}),n("kol-badge",{id:this.state._id,_color:{backgroundColor:"#333",color:"#ddd"},_label:this.state._label})))}validateAlign(t){i(this,"_align",t)}validateId(t){r(this,"_id",t)}validateLabel(t){r(this,"_label",t)}componentWillLoad(){this.validateAlign(this._align),this.validateId(this._id),this.validateLabel(this._label)}disconnectedCallback(){this.previousSibling&&this.removeListeners(this.previousSibling),this.tooltipElement&&this.removeListeners(this.tooltipElement)}static get watchers(){return{_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}}};jt.style={default:_t};export{jt as kol_tooltip};