@public-ui/components 1.1.11 → 1.1.12-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +1 -1
- package/dist/cjs/{app-globals-fcbae472.js → app-globals-690aa626.js} +1 -1
- package/dist/cjs/{button-link-a24c38b6.js → button-link-94b04a11.js} +1 -1
- package/dist/cjs/{controller-e19ffc02.js → controller-0243c8f2.js} +1 -1
- package/dist/cjs/{controller-b9521d6f.js → controller-0ba8d31d.js} +1 -1
- package/dist/cjs/{controller-1dd601ef.js → controller-5b4763eb.js} +1 -1
- package/dist/cjs/{controller-9538707c.js → controller-797b64c8.js} +1 -1
- package/dist/cjs/{controller-8bd02c44.js → controller-7eacc90c.js} +1 -1
- package/dist/cjs/{controller-3fd0fec3.js → controller-ca473282.js} +1 -1
- package/dist/cjs/{devtools-3e7cd094.js → devtools-8f4c5675.js} +1 -1
- package/dist/cjs/{icon-5d44ff69.js → icon-468bcf01.js} +1 -1
- package/dist/cjs/index-33a14d78.js +4 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
- package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
- package/dist/cjs/kol-alert.cjs.entry.js +1 -1
- package/dist/cjs/kol-badge.cjs.entry.js +1 -1
- package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
- package/dist/cjs/kol-button-wc_3.cjs.entry.js +1 -1
- package/dist/cjs/kol-card.cjs.entry.js +1 -1
- package/dist/cjs/kol-details.cjs.entry.js +1 -1
- package/dist/cjs/kol-form.cjs.entry.js +1 -1
- package/dist/cjs/kol-icon.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
- package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-group.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-logo.cjs.entry.js +1 -1
- package/dist/cjs/kol-modal.cjs.entry.js +1 -1
- package/dist/cjs/kol-nav.cjs.entry.js +1 -1
- package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
- package/dist/cjs/kol-progress.cjs.entry.js +1 -1
- package/dist/cjs/kol-select.cjs.entry.js +1 -1
- package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
- package/dist/cjs/kol-span-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-spin.cjs.entry.js +1 -1
- package/dist/cjs/kol-symbol.cjs.entry.js +1 -1
- package/dist/cjs/kol-table.cjs.entry.js +1 -1
- package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
- package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
- package/dist/cjs/kol-toast.cjs.entry.js +1 -1
- package/dist/cjs/kol-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/kol-version.cjs.entry.js +1 -1
- package/dist/cjs/kolibri.cjs.js +1 -1
- package/dist/cjs/{label-67aac40e.js → label-853d8041.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{prop.validators-743a74b9.js → prop.validators-6d79e2d2.js} +1 -1
- package/dist/cjs/{tab-index-2f583ace.js → tab-index-a6f116a1.js} +1 -1
- package/dist/cjs/{validation-8c349304.js → validation-925ef32c.js} +1 -1
- package/dist/cjs/{validation-dc181808.js → validation-ede01005.js} +1 -1
- package/dist/components/kol-textarea.js +1 -1
- package/dist/components/prop.validators.js +1 -1
- package/dist/custom-elements/index.js +1 -1
- package/dist/esm/{app-globals-5b2f0ced.js → app-globals-16f22be4.js} +1 -1
- package/dist/esm/{button-link-fc772c87.js → button-link-e9366e8f.js} +1 -1
- package/dist/esm/{controller-8e65fa9e.js → controller-4936703b.js} +1 -1
- package/dist/esm/{controller-b7e433e2.js → controller-61d288ae.js} +1 -1
- package/dist/esm/{controller-391de345.js → controller-9f450bd0.js} +1 -1
- package/dist/esm/{controller-21762644.js → controller-a3d66528.js} +1 -1
- package/dist/esm/{controller-7a1f6859.js → controller-d0349394.js} +1 -1
- package/dist/esm/{controller-fcb20ac8.js → controller-e313d0df.js} +1 -1
- package/dist/esm/{devtools-6749c812.js → devtools-5ca74118.js} +1 -1
- package/dist/esm/{icon-0f70ef67.js → icon-95d3f877.js} +1 -1
- package/dist/esm/index-9dac7ade.js +4 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/kol-abbr.entry.js +1 -1
- package/dist/esm/kol-accordion.entry.js +1 -1
- package/dist/esm/kol-alert.entry.js +1 -1
- package/dist/esm/kol-badge.entry.js +1 -1
- package/dist/esm/kol-breadcrumb.entry.js +1 -1
- package/dist/esm/kol-button-link.entry.js +1 -1
- package/dist/esm/kol-button-wc_3.entry.js +1 -1
- package/dist/esm/kol-card.entry.js +1 -1
- package/dist/esm/kol-details.entry.js +1 -1
- package/dist/esm/kol-form.entry.js +1 -1
- package/dist/esm/kol-icon.entry.js +1 -1
- package/dist/esm/kol-input-checkbox.entry.js +1 -1
- package/dist/esm/kol-input-color.entry.js +1 -1
- package/dist/esm/kol-input-date.entry.js +1 -1
- package/dist/esm/kol-input-email.entry.js +1 -1
- package/dist/esm/kol-input-file.entry.js +1 -1
- package/dist/esm/kol-input-number.entry.js +1 -1
- package/dist/esm/kol-input-password.entry.js +1 -1
- package/dist/esm/kol-input-radio.entry.js +1 -1
- package/dist/esm/kol-input-range.entry.js +1 -1
- package/dist/esm/kol-input-text.entry.js +1 -1
- package/dist/esm/kol-kolibri.entry.js +1 -1
- package/dist/esm/kol-link-button.entry.js +1 -1
- package/dist/esm/kol-link-group.entry.js +1 -1
- package/dist/esm/kol-link-wc.entry.js +1 -1
- package/dist/esm/kol-logo.entry.js +1 -1
- package/dist/esm/kol-modal.entry.js +1 -1
- package/dist/esm/kol-nav.entry.js +1 -1
- package/dist/esm/kol-pagination.entry.js +1 -1
- package/dist/esm/kol-progress.entry.js +1 -1
- package/dist/esm/kol-select.entry.js +1 -1
- package/dist/esm/kol-skip-nav.entry.js +1 -1
- package/dist/esm/kol-span-wc.entry.js +1 -1
- package/dist/esm/kol-spin.entry.js +1 -1
- package/dist/esm/kol-symbol.entry.js +1 -1
- package/dist/esm/kol-table.entry.js +1 -1
- package/dist/esm/kol-tabs.entry.js +1 -1
- package/dist/esm/kol-textarea.entry.js +1 -1
- package/dist/esm/kol-toast.entry.js +1 -1
- package/dist/esm/kol-tooltip.entry.js +1 -1
- package/dist/esm/kol-version.entry.js +1 -1
- package/dist/esm/kolibri.js +1 -1
- package/dist/esm/{label-d640a1cc.js → label-c1c393f8.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{prop.validators-52f20cba.js → prop.validators-0706ab79.js} +1 -1
- package/dist/esm/{tab-index-0ac1b547.js → tab-index-6e2fc963.js} +1 -1
- package/dist/esm/{validation-e333ddb0.js → validation-0dcc1c53.js} +1 -1
- package/dist/esm/{validation-985202be.js → validation-8243671a.js} +1 -1
- package/dist/kolibri/app-globals-16f22be4.js +4 -0
- package/dist/kolibri/{button-link-fc772c87.js → button-link-e9366e8f.js} +1 -1
- package/dist/kolibri/{controller-8e65fa9e.js → controller-4936703b.js} +1 -1
- package/dist/kolibri/{controller-b7e433e2.js → controller-61d288ae.js} +1 -1
- package/dist/kolibri/{controller-391de345.js → controller-9f450bd0.js} +1 -1
- package/dist/kolibri/{controller-21762644.js → controller-a3d66528.js} +1 -1
- package/dist/kolibri/{controller-7a1f6859.js → controller-d0349394.js} +1 -1
- package/dist/kolibri/{controller-fcb20ac8.js → controller-e313d0df.js} +1 -1
- package/dist/kolibri/{devtools-6749c812.js → devtools-5ca74118.js} +1 -1
- package/dist/kolibri/{icon-0f70ef67.js → icon-95d3f877.js} +1 -1
- package/dist/kolibri/index-9dac7ade.js +4 -0
- package/dist/kolibri/index.esm.js +1 -1
- package/dist/kolibri/kol-abbr.entry.js +1 -1
- package/dist/kolibri/kol-accordion.entry.js +1 -1
- package/dist/kolibri/kol-alert.entry.js +1 -1
- package/dist/kolibri/kol-badge.entry.js +1 -1
- package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
- package/dist/kolibri/kol-button-link.entry.js +1 -1
- package/dist/kolibri/kol-button-wc_3.entry.js +1 -1
- package/dist/kolibri/kol-card.entry.js +1 -1
- package/dist/kolibri/kol-details.entry.js +1 -1
- package/dist/kolibri/kol-form.entry.js +1 -1
- package/dist/kolibri/kol-icon.entry.js +1 -1
- package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
- package/dist/kolibri/kol-input-color.entry.js +1 -1
- package/dist/kolibri/kol-input-date.entry.js +1 -1
- package/dist/kolibri/kol-input-email.entry.js +1 -1
- package/dist/kolibri/kol-input-file.entry.js +1 -1
- package/dist/kolibri/kol-input-number.entry.js +1 -1
- package/dist/kolibri/kol-input-password.entry.js +1 -1
- package/dist/kolibri/kol-input-radio.entry.js +1 -1
- package/dist/kolibri/kol-input-range.entry.js +1 -1
- package/dist/kolibri/kol-input-text.entry.js +1 -1
- package/dist/kolibri/kol-kolibri.entry.js +1 -1
- package/dist/kolibri/kol-link-button.entry.js +1 -1
- package/dist/kolibri/kol-link-group.entry.js +1 -1
- package/dist/kolibri/kol-link-wc.entry.js +1 -1
- package/dist/kolibri/kol-logo.entry.js +1 -1
- package/dist/kolibri/kol-modal.entry.js +1 -1
- package/dist/kolibri/kol-nav.entry.js +1 -1
- package/dist/kolibri/kol-pagination.entry.js +1 -1
- package/dist/kolibri/kol-progress.entry.js +1 -1
- package/dist/kolibri/kol-select.entry.js +1 -1
- package/dist/kolibri/kol-skip-nav.entry.js +1 -1
- package/dist/kolibri/kol-span-wc.entry.js +1 -1
- package/dist/kolibri/kol-spin.entry.js +1 -1
- package/dist/kolibri/kol-symbol.entry.js +1 -1
- package/dist/kolibri/kol-table.entry.js +1 -1
- package/dist/kolibri/kol-tabs.entry.js +1 -1
- package/dist/kolibri/kol-textarea.entry.js +1 -1
- package/dist/kolibri/kol-toast.entry.js +1 -1
- package/dist/kolibri/kol-tooltip.entry.js +1 -1
- package/dist/kolibri/kol-version.entry.js +1 -1
- package/dist/kolibri/kolibri.esm.js +1 -1
- package/dist/kolibri/{label-d640a1cc.js → label-c1c393f8.js} +1 -1
- package/dist/kolibri/{prop.validators-52f20cba.js → prop.validators-0706ab79.js} +1 -1
- package/dist/kolibri/{tab-index-0ac1b547.js → tab-index-6e2fc963.js} +1 -1
- package/dist/kolibri/{validation-e333ddb0.js → validation-0dcc1c53.js} +1 -1
- package/dist/kolibri/{validation-985202be.js → validation-8243671a.js} +1 -1
- package/dist/types/components/textarea/controller.d.ts +1 -0
- package/jest-test-results.json +1 -1
- package/package.json +1 -1
- package/dist/cjs/index-07448828.js +0 -4
- package/dist/esm/index-09eee154.js +0 -4
- package/dist/kolibri/app-globals-5b2f0ced.js +0 -4
- package/dist/kolibri/index-09eee154.js +0 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@public-ui/components",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.12-rc.0",
|
|
4
4
|
"description": "Das Components-Modul beinhaltet alle zur Komponenten-Bibliothek gehörenden Web Components.",
|
|
5
5
|
"license": "EUPL-1.2",
|
|
6
6
|
"homepage": "https://public-ui.github.io",
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* KoliBri - the accessible web component library
|
|
3
|
-
*/
|
|
4
|
-
"use strict";var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(e,t,o){return e(o={path:t,exports:{},require:function(e,t){return commonjsRequire()}},o.exports),o.exports}function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var loglevel=createCommonjsModule((function(e){var t,o;t=commonjsGlobal,o=function(){var e=function(){},t="undefined",o=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"];function s(e,t){var o=e[t];if("function"==typeof o.bind)return o.bind(e);try{return Function.prototype.bind.call(o,e)}catch(t){return function(){return Function.prototype.apply.apply(o,[e,arguments])}}}function r(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(n){return"debug"===n&&(n="log"),typeof console!==t&&("trace"===n&&o?r:void 0!==console[n]?s(console,n):void 0!==console.log?s(console,"log"):e)}function i(t,o){for(var s=0;s<n.length;s++){var r=n[s];this[r]=s<t?e:this.methodFactory(r,t,o)}this.log=this.debug}function c(e,o,n){return function(){typeof console!==t&&(i.call(this,o,n),this[e].apply(this,arguments))}}function a(e,t,o){return l(e)||c.apply(this,arguments)}function h(e,o,s){var r,l=this;o=null==o?"WARN":o;var c="loglevel";function h(){var e;if(typeof window!==t&&c){try{e=window.localStorage[c]}catch(e){}if(typeof e===t)try{var o=window.document.cookie,n=o.indexOf(encodeURIComponent(c)+"=");-1!==n&&(e=/^([^;]+)/.exec(o.slice(n))[1])}catch(e){}return void 0===l.levels[e]&&(e=void 0),e}}"string"==typeof e?c+=":"+e:"symbol"==typeof e&&(c=void 0),l.name=e,l.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},l.methodFactory=s||a,l.getLevel=function(){return r},l.setLevel=function(o,s){if("string"==typeof o&&void 0!==l.levels[o.toUpperCase()]&&(o=l.levels[o.toUpperCase()]),!("number"==typeof o&&o>=0&&o<=l.levels.SILENT))throw"log.setLevel() called with invalid level: "+o;if(r=o,!1!==s&&function(e){var o=(n[e]||"silent").toUpperCase();if(typeof window!==t&&c){try{return void(window.localStorage[c]=o)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"="+o+";"}catch(e){}}}(o),i.call(l,o,e),typeof console===t&&o<l.levels.SILENT)return"No console available for logging"},l.setDefaultLevel=function(e){o=e,h()||l.setLevel(e,!1)},l.resetLevel=function(){l.setLevel(o,!1),function(){if(typeof window!==t&&c){try{return void window.localStorage.removeItem(c)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}()},l.enableAll=function(e){l.setLevel(l.levels.TRACE,e)},l.disableAll=function(e){l.setLevel(l.levels.SILENT,e)};var f=h();null==f&&(f=o),l.setLevel(f,!1)}var f=new h,y={};f.getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=y[e];return t||(t=y[e]=new h(e,f.getLevel(),f.methodFactory)),t};var d=typeof window!==t?window.log:void 0;return f.noConflict=function(){return typeof window!==t&&window.log===f&&(window.log=d),f},f.getLoggers=function(){return y},f.default=f,f},e.exports?e.exports=o():t.log=o()}));const LOG_CACHE=[];function getEnvironment(){return"production"}class Logger{constructor(e,t={}){this.shield=[`%c${e}`,"string"==typeof t.shieldStyle&&t.shieldStyle.length>0?t.shieldStyle:"color: white; background: #666; font-weight: bold; font-size: 10px; padding: 2px 6px; border-radius: 3px; border: 1px solid #000"]}static getInstance(e,t={}){if("string"==typeof e&&e.length>0)return!1===Logger.instances.has(e)&&Logger.instances.set(e,new Logger(e)),Logger.instances.get(e);throw new Error("The identifier of the Logger must be a string with a min length of 1.")}log(e,t){switch("object"==typeof t.refObject&&null!==t.refObject&&"function"==typeof t.refObject.constructor&&"string"==typeof t.refObject.constructor.name&&(t.className=`[${t.refObject.constructor.name}]:`),LOG_CACHE.push({date:(new Date).toUTCString(),level:e,message:t}),e){case"trace":loglevel.trace(...this.shield,t);break;case"debug":loglevel.debug(...this.shield,t);break;case"info":loglevel.info(...this.shield,t);break;case"warn":loglevel.warn(...this.shield,t);break;default:loglevel.error(...this.shield,t)}}trace(e,t){return this.log("trace",{messageText:e,refObject:t}),this}debug(e,t){return this.log("debug",{messageText:e,refObject:t}),this}info(e,t){return this.log("info",{messageText:e,refObject:t}),this}warn(e,t){return this.log("warn",{messageText:e,refObject:t}),this}error(e,t){return this.log("error",{messageText:e,refObject:t}),this}static get cache(){return[].concat(LOG_CACHE)}}switch(Logger.instances=new Map,getEnvironment()){case"development":loglevel.setDefaultLevel("trace");break;case"test":loglevel.setDefaultLevel("warn");break;default:loglevel.setDefaultLevel("error")}const Log=Logger.getInstance("leanup"),GLOBAL="object"==typeof window?window:"object"==typeof global?global:"object"==typeof self?self:{};let warrentyWarning=!1;const patchThemeTag=(e,t,o)=>{!1===warrentyWarning&&(warrentyWarning=!0,Log.warn(`[Theming] The theme process is locked. This means that the theme "${e}" 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: HTMLDivElement | null = document.querySelector<HTMLDivElement>('div#app');\n if (htmlDivElement instanceof HTMLDivElement) {\n const root = createRoot(htmlDivElement);\n root.render(<AppComponent />);\n }\n })\n .catch(console.warn);`,{forceLog:!0})),"object"==typeof GLOBAL.A11yUi&&null!==GLOBAL.A11yUi||(GLOBAL.A11yUi={}),"object"!=typeof GLOBAL.A11yUi||null===GLOBAL.A11yUi||"object"==typeof GLOBAL.A11yUi.Themes&&null!==GLOBAL.A11yUi.Themes||(GLOBAL.A11yUi.Themes={}),"object"!=typeof GLOBAL.A11yUi||null===GLOBAL.A11yUi||"object"!=typeof GLOBAL.A11yUi.Themes||null===GLOBAL.A11yUi.Themes||"object"==typeof GLOBAL.A11yUi.Themes[e]&&null!==GLOBAL.A11yUi.Themes[e]||(GLOBAL.A11yUi.Themes[e]={}),"object"==typeof GLOBAL.A11yUi&&null!==GLOBAL.A11yUi&&"object"==typeof GLOBAL.A11yUi.Themes&&null!==GLOBAL.A11yUi.Themes&&"object"==typeof GLOBAL.A11yUi.Themes[e]&&null!==GLOBAL.A11yUi.Themes[e]&&(GLOBAL.A11yUi.Themes[e][t]=o)},patchTheme=(e,t)=>{if("object"==typeof t&&null!==t){Object.getOwnPropertyNames(t).forEach((o=>{const n=t[o];"string"==typeof n&&n.length>0&&patchThemeTag(e,o,n)}))}return e},getThemeNode=e=>{if(e instanceof HTMLElement){if("string"==typeof e.dataset.theme)return e;{let t=e.parentNode;for(;t instanceof ShadowRoot;)t=t.host;return getThemeNode(t)}}return null},getEncroachCss=e=>"false"===e.themeEncroachCss&&"false"===e.themeReset&&("string"==typeof e.themeEncroachCssMode&&"after"===e.themeEncroachCssMode||"before"===e.themeEncroachCssMode?{mode:e.themeEncroachCssMode}:{mode:"after"}),getThemeDetails=e=>{if("object"==typeof GLOBAL.A11yUi&&null!==GLOBAL.A11yUi&&"object"==typeof GLOBAL.A11yUi.Theme&&null!==GLOBAL.A11yUi.Theme&&"boolean"==typeof GLOBAL.A11yUi.Theme.cache&&"string"==typeof GLOBAL.A11yUi.Theme.name&&"boolean"==typeof GLOBAL.A11yUi.Theme.reset)return GLOBAL.A11yUi.Theme;{const o=getThemeNode(e),n={cache:!0,encroachCss:{mode:"after"},name:null};return o instanceof HTMLElement&&(n.cache="false"!==o.dataset.themeCache,n.encroachCss="false"===(t=o.dataset).themeEncroachCss&&"false"===t.themeReset&&("string"==typeof t.themeEncroachCssMode&&"after"===t.themeEncroachCssMode||"before"===t.themeEncroachCssMode?{mode:t.themeEncroachCssMode}:{mode:"after"}),n.name=o.dataset.theme||null),n}var t},CSS_PROPERTIES_REGISTERED=new Set,CSS_STYLE_SHEETS=new Map,HTML_STYLE_ELEMENTS=new Map,REGEX_CSS_PROPERTIES=/--[^;]+/g,REGEX_SPLT_CSS_PROPERTY=/:/,getCssStyleSheet=(e,t,o)=>{if(!0===e&&CSS_STYLE_SHEETS.has(t)&&CSS_STYLE_SHEETS.get(t)?.has(o))return CSS_STYLE_SHEETS.get(t)?.get(o);if(!0===e&&HTML_STYLE_ELEMENTS.has(t)&&HTML_STYLE_ELEMENTS.get(t)?.has(o))return HTML_STYLE_ELEMENTS.get(t)?.get(o);if("object"==typeof GLOBAL.A11yUi&&null!==GLOBAL.A11yUi&&"object"==typeof GLOBAL.A11yUi.Themes&&null!==GLOBAL.A11yUi.Themes&&"object"==typeof GLOBAL.A11yUi.Themes[t]&&null!==GLOBAL.A11yUi.Themes[t]&&"string"==typeof GLOBAL.A11yUi.Themes[t][o]){if(("GLOBAL"===o||"PROPERTIES"===o)&&!1===CSS_PROPERTIES_REGISTERED.has(t)){let e=GLOBAL.A11yUi.Themes[t][o].match(REGEX_CSS_PROPERTIES);if(Array.isArray(e)){e=e.filter((e=>REGEX_SPLT_CSS_PROPERTY.test(e)));const o=document.createElement("style");o.innerHTML=`.${t} {${e.join(";")}}`,document.querySelector("head")?.appendChild(o)}CSS_PROPERTIES_REGISTERED.add(t)}let n;try{n=new CSSStyleSheet,"function"==typeof n.replaceSync&&n.replaceSync(GLOBAL.A11yUi.Themes[t][o]),!0===e&&(!1===CSS_STYLE_SHEETS.has(t)&&CSS_STYLE_SHEETS.set(t,new Map),CSS_STYLE_SHEETS.get(t)?.set(o,n))}catch(e){n=document.createElement("style"),n.innerHTML=GLOBAL.A11yUi.Themes[t][o]}return n}return null},removeStyle=e=>{for(const t of Array.from(e.childNodes)){if(!(t instanceof HTMLElement&&"STYLE"===t.tagName))break;e.removeChild(t)}},GLOBAL_A11Y_STYLE="* {\n font-size: inherit;\n hyphens: auto;\n letter-spacing: inherit;\n word-break: break-word;\n word-spacing: inherit;\n}",patchAdopted=(e,t,o,n)=>{const s=setTimeout((()=>{if(clearTimeout(s),e.classList.contains("hydrated")){removeStyle(t);const s=new CSSStyleSheet;"function"==typeof s.replaceSync&&s.replaceSync(GLOBAL_A11Y_STYLE),o.unshift(s),t.adoptedStyleSheets=o,e.style.display=n}else patchAdopted(e,t,o,n)}),25)},patchStyle=(e,t,o,n)=>{const s=setTimeout((()=>{if(clearTimeout(s),e.classList.contains("hydrated")){removeStyle(t);const s=document.createElement("style");s.innerHTML=GLOBAL_A11Y_STYLE,o.unshift(s);const r=t.firstChild;o.forEach((e=>{r instanceof HTMLElement?t.insertBefore(e,r):t.appendChild(e)})),e.style.display=n}else patchStyle(e,t,o,n)}),25)},addEncroachCssStyleSheet=(e,t)=>{e.adoptedStyleSheets?.forEach((e=>{t.push(e)}))},addEncroachCssStyleElement=(e,t)=>{for(const o of Array.from(e.childNodes)){if(!(o instanceof HTMLStyleElement))break;t.push(o)}},setThemeStyle=(e,t)=>{const o=t.name||"default",n=t.cache,s=t.encroachCss,r=getCssStyleSheet(n,o,"GLOBAL"),l=getCssStyleSheet(n,o,e.tagName),i=e.shadowRoot;if(l instanceof CSSStyleSheet&&l.cssRules.length>0){const t=[];!1!==s&&"before"===s.mode&&addEncroachCssStyleSheet(i,t),r instanceof CSSStyleSheet&&r.cssRules.length>0&&!1===t.includes(r)&&t.push(r),l instanceof CSSStyleSheet&&l.cssRules.length>0&&!1===t.includes(l)&&t.push(l),!1!==s&&"after"===s.mode&&addEncroachCssStyleSheet(i,t);const o=e.style.display;e.style.display="none",patchAdopted(e,i,t,o)}else if(l instanceof HTMLStyleElement&&l.innerHTML.length>0){const t=[];!1!==s&&"before"===s.mode&&addEncroachCssStyleElement(i,t),r instanceof HTMLStyleElement&&r.innerHTML.length>0&&!1===t.includes(r)&&t.push(r),l instanceof HTMLStyleElement&&l.innerHTML.length>0&&!1===t.includes(l)&&t.push(l),!1!==s&&"after"===s.mode&&addEncroachCssStyleElement(i,t);const o=e.style.display;e.style.display="none",patchStyle(e,i,t,o)}};exports.getThemeDetails=getThemeDetails,exports.patchTheme=patchTheme,exports.patchThemeTag=patchThemeTag,exports.setThemeStyle=setThemeStyle;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* KoliBri - the accessible web component library
|
|
3
|
-
*/
|
|
4
|
-
var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(e,t,o){return e(o={path:t,exports:{},require:function(e,t){return commonjsRequire()}},o.exports),o.exports}function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var loglevel=createCommonjsModule((function(e){var t,o;t=commonjsGlobal,o=function(){var e=function(){},t="undefined",o=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"];function s(e,t){var o=e[t];if("function"==typeof o.bind)return o.bind(e);try{return Function.prototype.bind.call(o,e)}catch(t){return function(){return Function.prototype.apply.apply(o,[e,arguments])}}}function r(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(n){return"debug"===n&&(n="log"),typeof console!==t&&("trace"===n&&o?r:void 0!==console[n]?s(console,n):void 0!==console.log?s(console,"log"):e)}function i(t,o){for(var s=0;s<n.length;s++){var r=n[s];this[r]=s<t?e:this.methodFactory(r,t,o)}this.log=this.debug}function c(e,o,n){return function(){typeof console!==t&&(i.call(this,o,n),this[e].apply(this,arguments))}}function a(e,t,o){return l(e)||c.apply(this,arguments)}function h(e,o,s){var r,l=this;o=null==o?"WARN":o;var c="loglevel";function h(){var e;if(typeof window!==t&&c){try{e=window.localStorage[c]}catch(e){}if(typeof e===t)try{var o=window.document.cookie,n=o.indexOf(encodeURIComponent(c)+"=");-1!==n&&(e=/^([^;]+)/.exec(o.slice(n))[1])}catch(e){}return void 0===l.levels[e]&&(e=void 0),e}}"string"==typeof e?c+=":"+e:"symbol"==typeof e&&(c=void 0),l.name=e,l.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},l.methodFactory=s||a,l.getLevel=function(){return r},l.setLevel=function(o,s){if("string"==typeof o&&void 0!==l.levels[o.toUpperCase()]&&(o=l.levels[o.toUpperCase()]),!("number"==typeof o&&o>=0&&o<=l.levels.SILENT))throw"log.setLevel() called with invalid level: "+o;if(r=o,!1!==s&&function(e){var o=(n[e]||"silent").toUpperCase();if(typeof window!==t&&c){try{return void(window.localStorage[c]=o)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"="+o+";"}catch(e){}}}(o),i.call(l,o,e),typeof console===t&&o<l.levels.SILENT)return"No console available for logging"},l.setDefaultLevel=function(e){o=e,h()||l.setLevel(e,!1)},l.resetLevel=function(){l.setLevel(o,!1),function(){if(typeof window!==t&&c){try{return void window.localStorage.removeItem(c)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}()},l.enableAll=function(e){l.setLevel(l.levels.TRACE,e)},l.disableAll=function(e){l.setLevel(l.levels.SILENT,e)};var f=h();null==f&&(f=o),l.setLevel(f,!1)}var f=new h,y={};f.getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=y[e];return t||(t=y[e]=new h(e,f.getLevel(),f.methodFactory)),t};var d=typeof window!==t?window.log:void 0;return f.noConflict=function(){return typeof window!==t&&window.log===f&&(window.log=d),f},f.getLoggers=function(){return y},f.default=f,f},e.exports?e.exports=o():t.log=o()}));const LOG_CACHE=[];function getEnvironment(){return"production"}class Logger{constructor(e,t={}){this.shield=[`%c${e}`,"string"==typeof t.shieldStyle&&t.shieldStyle.length>0?t.shieldStyle:"color: white; background: #666; font-weight: bold; font-size: 10px; padding: 2px 6px; border-radius: 3px; border: 1px solid #000"]}static getInstance(e,t={}){if("string"==typeof e&&e.length>0)return!1===Logger.instances.has(e)&&Logger.instances.set(e,new Logger(e)),Logger.instances.get(e);throw new Error("The identifier of the Logger must be a string with a min length of 1.")}log(e,t){switch("object"==typeof t.refObject&&null!==t.refObject&&"function"==typeof t.refObject.constructor&&"string"==typeof t.refObject.constructor.name&&(t.className=`[${t.refObject.constructor.name}]:`),LOG_CACHE.push({date:(new Date).toUTCString(),level:e,message:t}),e){case"trace":loglevel.trace(...this.shield,t);break;case"debug":loglevel.debug(...this.shield,t);break;case"info":loglevel.info(...this.shield,t);break;case"warn":loglevel.warn(...this.shield,t);break;default:loglevel.error(...this.shield,t)}}trace(e,t){return this.log("trace",{messageText:e,refObject:t}),this}debug(e,t){return this.log("debug",{messageText:e,refObject:t}),this}info(e,t){return this.log("info",{messageText:e,refObject:t}),this}warn(e,t){return this.log("warn",{messageText:e,refObject:t}),this}error(e,t){return this.log("error",{messageText:e,refObject:t}),this}static get cache(){return[].concat(LOG_CACHE)}}switch(Logger.instances=new Map,getEnvironment()){case"development":loglevel.setDefaultLevel("trace");break;case"test":loglevel.setDefaultLevel("warn");break;default:loglevel.setDefaultLevel("error")}const Log=Logger.getInstance("leanup"),GLOBAL="object"==typeof window?window:"object"==typeof global?global:"object"==typeof self?self:{};let warrentyWarning=!1;const patchThemeTag=(e,t,o)=>{!1===warrentyWarning&&(warrentyWarning=!0,Log.warn(`[Theming] The theme process is locked. This means that the theme "${e}" 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: HTMLDivElement | null = document.querySelector<HTMLDivElement>('div#app');\n if (htmlDivElement instanceof HTMLDivElement) {\n const root = createRoot(htmlDivElement);\n root.render(<AppComponent />);\n }\n })\n .catch(console.warn);`,{forceLog:!0})),"object"==typeof GLOBAL.A11yUi&&null!==GLOBAL.A11yUi||(GLOBAL.A11yUi={}),"object"!=typeof GLOBAL.A11yUi||null===GLOBAL.A11yUi||"object"==typeof GLOBAL.A11yUi.Themes&&null!==GLOBAL.A11yUi.Themes||(GLOBAL.A11yUi.Themes={}),"object"!=typeof GLOBAL.A11yUi||null===GLOBAL.A11yUi||"object"!=typeof GLOBAL.A11yUi.Themes||null===GLOBAL.A11yUi.Themes||"object"==typeof GLOBAL.A11yUi.Themes[e]&&null!==GLOBAL.A11yUi.Themes[e]||(GLOBAL.A11yUi.Themes[e]={}),"object"==typeof GLOBAL.A11yUi&&null!==GLOBAL.A11yUi&&"object"==typeof GLOBAL.A11yUi.Themes&&null!==GLOBAL.A11yUi.Themes&&"object"==typeof GLOBAL.A11yUi.Themes[e]&&null!==GLOBAL.A11yUi.Themes[e]&&(GLOBAL.A11yUi.Themes[e][t]=o)},patchTheme=(e,t)=>{if("object"==typeof t&&null!==t){Object.getOwnPropertyNames(t).forEach((o=>{const n=t[o];"string"==typeof n&&n.length>0&&patchThemeTag(e,o,n)}))}return e},getThemeNode=e=>{if(e instanceof HTMLElement){if("string"==typeof e.dataset.theme)return e;{let t=e.parentNode;for(;t instanceof ShadowRoot;)t=t.host;return getThemeNode(t)}}return null},getEncroachCss=e=>"false"===e.themeEncroachCss&&"false"===e.themeReset&&("string"==typeof e.themeEncroachCssMode&&"after"===e.themeEncroachCssMode||"before"===e.themeEncroachCssMode?{mode:e.themeEncroachCssMode}:{mode:"after"}),getThemeDetails=e=>{if("object"==typeof GLOBAL.A11yUi&&null!==GLOBAL.A11yUi&&"object"==typeof GLOBAL.A11yUi.Theme&&null!==GLOBAL.A11yUi.Theme&&"boolean"==typeof GLOBAL.A11yUi.Theme.cache&&"string"==typeof GLOBAL.A11yUi.Theme.name&&"boolean"==typeof GLOBAL.A11yUi.Theme.reset)return GLOBAL.A11yUi.Theme;{const o=getThemeNode(e),n={cache:!0,encroachCss:{mode:"after"},name:null};return o instanceof HTMLElement&&(n.cache="false"!==o.dataset.themeCache,n.encroachCss="false"===(t=o.dataset).themeEncroachCss&&"false"===t.themeReset&&("string"==typeof t.themeEncroachCssMode&&"after"===t.themeEncroachCssMode||"before"===t.themeEncroachCssMode?{mode:t.themeEncroachCssMode}:{mode:"after"}),n.name=o.dataset.theme||null),n}var t},CSS_PROPERTIES_REGISTERED=new Set,CSS_STYLE_SHEETS=new Map,HTML_STYLE_ELEMENTS=new Map,REGEX_CSS_PROPERTIES=/--[^;]+/g,REGEX_SPLT_CSS_PROPERTY=/:/,getCssStyleSheet=(e,t,o)=>{if(!0===e&&CSS_STYLE_SHEETS.has(t)&&CSS_STYLE_SHEETS.get(t)?.has(o))return CSS_STYLE_SHEETS.get(t)?.get(o);if(!0===e&&HTML_STYLE_ELEMENTS.has(t)&&HTML_STYLE_ELEMENTS.get(t)?.has(o))return HTML_STYLE_ELEMENTS.get(t)?.get(o);if("object"==typeof GLOBAL.A11yUi&&null!==GLOBAL.A11yUi&&"object"==typeof GLOBAL.A11yUi.Themes&&null!==GLOBAL.A11yUi.Themes&&"object"==typeof GLOBAL.A11yUi.Themes[t]&&null!==GLOBAL.A11yUi.Themes[t]&&"string"==typeof GLOBAL.A11yUi.Themes[t][o]){if(("GLOBAL"===o||"PROPERTIES"===o)&&!1===CSS_PROPERTIES_REGISTERED.has(t)){let e=GLOBAL.A11yUi.Themes[t][o].match(REGEX_CSS_PROPERTIES);if(Array.isArray(e)){e=e.filter((e=>REGEX_SPLT_CSS_PROPERTY.test(e)));const o=document.createElement("style");o.innerHTML=`.${t} {${e.join(";")}}`,document.querySelector("head")?.appendChild(o)}CSS_PROPERTIES_REGISTERED.add(t)}let n;try{n=new CSSStyleSheet,"function"==typeof n.replaceSync&&n.replaceSync(GLOBAL.A11yUi.Themes[t][o]),!0===e&&(!1===CSS_STYLE_SHEETS.has(t)&&CSS_STYLE_SHEETS.set(t,new Map),CSS_STYLE_SHEETS.get(t)?.set(o,n))}catch(e){n=document.createElement("style"),n.innerHTML=GLOBAL.A11yUi.Themes[t][o]}return n}return null},removeStyle=e=>{for(const t of Array.from(e.childNodes)){if(!(t instanceof HTMLElement&&"STYLE"===t.tagName))break;e.removeChild(t)}},GLOBAL_A11Y_STYLE="* {\n font-size: inherit;\n hyphens: auto;\n letter-spacing: inherit;\n word-break: break-word;\n word-spacing: inherit;\n}",patchAdopted=(e,t,o,n)=>{const s=setTimeout((()=>{if(clearTimeout(s),e.classList.contains("hydrated")){removeStyle(t);const s=new CSSStyleSheet;"function"==typeof s.replaceSync&&s.replaceSync(GLOBAL_A11Y_STYLE),o.unshift(s),t.adoptedStyleSheets=o,e.style.display=n}else patchAdopted(e,t,o,n)}),25)},patchStyle=(e,t,o,n)=>{const s=setTimeout((()=>{if(clearTimeout(s),e.classList.contains("hydrated")){removeStyle(t);const s=document.createElement("style");s.innerHTML=GLOBAL_A11Y_STYLE,o.unshift(s);const r=t.firstChild;o.forEach((e=>{r instanceof HTMLElement?t.insertBefore(e,r):t.appendChild(e)})),e.style.display=n}else patchStyle(e,t,o,n)}),25)},addEncroachCssStyleSheet=(e,t)=>{e.adoptedStyleSheets?.forEach((e=>{t.push(e)}))},addEncroachCssStyleElement=(e,t)=>{for(const o of Array.from(e.childNodes)){if(!(o instanceof HTMLStyleElement))break;t.push(o)}},setThemeStyle=(e,t)=>{const o=t.name||"default",n=t.cache,s=t.encroachCss,r=getCssStyleSheet(n,o,"GLOBAL"),l=getCssStyleSheet(n,o,e.tagName),i=e.shadowRoot;if(l instanceof CSSStyleSheet&&l.cssRules.length>0){const t=[];!1!==s&&"before"===s.mode&&addEncroachCssStyleSheet(i,t),r instanceof CSSStyleSheet&&r.cssRules.length>0&&!1===t.includes(r)&&t.push(r),l instanceof CSSStyleSheet&&l.cssRules.length>0&&!1===t.includes(l)&&t.push(l),!1!==s&&"after"===s.mode&&addEncroachCssStyleSheet(i,t);const o=e.style.display;e.style.display="none",patchAdopted(e,i,t,o)}else if(l instanceof HTMLStyleElement&&l.innerHTML.length>0){const t=[];!1!==s&&"before"===s.mode&&addEncroachCssStyleElement(i,t),r instanceof HTMLStyleElement&&r.innerHTML.length>0&&!1===t.includes(r)&&t.push(r),l instanceof HTMLStyleElement&&l.innerHTML.length>0&&!1===t.includes(l)&&t.push(l),!1!==s&&"after"===s.mode&&addEncroachCssStyleElement(i,t);const o=e.style.display;e.style.display="none",patchStyle(e,i,t,o)}};export{patchThemeTag as a,getThemeDetails as g,patchTheme as p,setThemeStyle as s};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* KoliBri - the accessible web component library
|
|
3
|
-
*/
|
|
4
|
-
import{s as o}from"./index-bc1a7f22.js";import{L as e}from"./dev.utils-bbaf8793.js";import{s as n,g as s}from"./index-09eee154.js";const t=()=>{e.info("\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | `--' | |) /_ ,--.--. `--'\n| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n| |\\ \\ | '-' | | | | | | '--' / | | | |\n`--' `--´ `---´ `--' `--' `------´ `--' `--'\n - the accessible web component library -\n"),o((o=>(o.shadowRoot instanceof ShadowRoot&&n(o,s(o)),"default"))),import("./devtools-6749c812.js").then((o=>{"object"==typeof o&&null!==o&&"function"==typeof o.initialize&&o.initialize()})).catch((o=>{e.error(o)}))};export{t as g};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* KoliBri - the accessible web component library
|
|
3
|
-
*/
|
|
4
|
-
var e,t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(function(e){var n,o;n=t,o=function(){var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),o=["trace","debug","info","warn","error"];function s(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(t){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function r(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function i(o){return"debug"===o&&(o="log"),typeof console!==t&&("trace"===o&&n?r:void 0!==console[o]?s(console,o):void 0!==console.log?s(console,"log"):e)}function c(t,n){for(var s=0;s<o.length;s++){var r=o[s];this[r]=s<t?e:this.methodFactory(r,t,n)}this.log=this.debug}function l(e,n,o){return function(){typeof console!==t&&(c.call(this,n,o),this[e].apply(this,arguments))}}function a(e,t,n){return i(e)||l.apply(this,arguments)}function f(e,n,s){var r,i=this;n=null==n?"WARN":n;var l="loglevel";function f(){var e;if(typeof window!==t&&l){try{e=window.localStorage[l]}catch(e){}if(typeof e===t)try{var n=window.document.cookie,o=n.indexOf(encodeURIComponent(l)+"=");-1!==o&&(e=/^([^;]+)/.exec(n.slice(o))[1])}catch(e){}return void 0===i.levels[e]&&(e=void 0),e}}"string"==typeof e?l+=":"+e:"symbol"==typeof e&&(l=void 0),i.name=e,i.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},i.methodFactory=s||a,i.getLevel=function(){return r},i.setLevel=function(n,s){if("string"==typeof n&&void 0!==i.levels[n.toUpperCase()]&&(n=i.levels[n.toUpperCase()]),!("number"==typeof n&&n>=0&&n<=i.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(r=n,!1!==s&&function(e){var n=(o[e]||"silent").toUpperCase();if(typeof window!==t&&l){try{return void(window.localStorage[l]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(l)+"="+n+";"}catch(e){}}}(n),c.call(i,n,e),typeof console===t&&n<i.levels.SILENT)return"No console available for logging"},i.setDefaultLevel=function(e){n=e,f()||i.setLevel(e,!1)},i.resetLevel=function(){i.setLevel(n,!1),function(){if(typeof window!==t&&l){try{return void window.localStorage.removeItem(l)}catch(e){}try{window.document.cookie=encodeURIComponent(l)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}()},i.enableAll=function(e){i.setLevel(i.levels.TRACE,e)},i.disableAll=function(e){i.setLevel(i.levels.SILENT,e)};var h=f();null==h&&(h=n),i.setLevel(h,!1)}var h=new f,y={};h.getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=y[e];return t||(t=y[e]=new f(e,h.getLevel(),h.methodFactory)),t};var u=typeof window!==t?window.log:void 0;return h.noConflict=function(){return typeof window!==t&&window.log===h&&(window.log=u),h},h.getLoggers=function(){return y},h.default=h,h},e.exports?e.exports=o():n.log=o()}(e={path:void 0,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}),e.exports);const o=[];class r{constructor(e,t={}){this.shield=[`%c${e}`,"string"==typeof t.shieldStyle&&t.shieldStyle.length>0?t.shieldStyle:"color: white; background: #666; font-weight: bold; font-size: 10px; padding: 2px 6px; border-radius: 3px; border: 1px solid #000"]}static getInstance(e,t={}){if("string"==typeof e&&e.length>0)return!1===r.instances.has(e)&&r.instances.set(e,new r(e)),r.instances.get(e);throw new Error("The identifier of the Logger must be a string with a min length of 1.")}log(e,t){switch("object"==typeof t.refObject&&null!==t.refObject&&"function"==typeof t.refObject.constructor&&"string"==typeof t.refObject.constructor.name&&(t.className=`[${t.refObject.constructor.name}]:`),o.push({date:(new Date).toUTCString(),level:e,message:t}),e){case"trace":n.trace(...this.shield,t);break;case"debug":n.debug(...this.shield,t);break;case"info":n.info(...this.shield,t);break;case"warn":n.warn(...this.shield,t);break;default:n.error(...this.shield,t)}}trace(e,t){return this.log("trace",{messageText:e,refObject:t}),this}debug(e,t){return this.log("debug",{messageText:e,refObject:t}),this}info(e,t){return this.log("info",{messageText:e,refObject:t}),this}warn(e,t){return this.log("warn",{messageText:e,refObject:t}),this}error(e,t){return this.log("error",{messageText:e,refObject:t}),this}static get cache(){return[].concat(o)}}r.instances=new Map,n.setDefaultLevel("error");const i=r.getInstance("leanup"),c="object"==typeof window?window:"object"==typeof global?global:"object"==typeof self?self:{};let f=!1;const s=(e,t,n)=>{!1===f&&(f=!0,i.warn(`[Theming] The theme process is locked. This means that the theme "${e}" 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: HTMLDivElement | null = document.querySelector<HTMLDivElement>('div#app');\n if (htmlDivElement instanceof HTMLDivElement) {\n const root = createRoot(htmlDivElement);\n root.render(<AppComponent />);\n }\n })\n .catch(console.warn);`,{forceLog:!0})),"object"==typeof c.A11yUi&&null!==c.A11yUi||(c.A11yUi={}),"object"!=typeof c.A11yUi||null===c.A11yUi||"object"==typeof c.A11yUi.Themes&&null!==c.A11yUi.Themes||(c.A11yUi.Themes={}),"object"!=typeof c.A11yUi||null===c.A11yUi||"object"!=typeof c.A11yUi.Themes||null===c.A11yUi.Themes||"object"==typeof c.A11yUi.Themes[e]&&null!==c.A11yUi.Themes[e]||(c.A11yUi.Themes[e]={}),"object"==typeof c.A11yUi&&null!==c.A11yUi&&"object"==typeof c.A11yUi.Themes&&null!==c.A11yUi.Themes&&"object"==typeof c.A11yUi.Themes[e]&&null!==c.A11yUi.Themes[e]&&(c.A11yUi.Themes[e][t]=n)},l=(e,t)=>("object"==typeof t&&null!==t&&Object.getOwnPropertyNames(t).forEach((n=>{const o=t[n];"string"==typeof o&&o.length>0&&s(e,n,o)})),e),a=e=>{if(e instanceof HTMLElement){if("string"==typeof e.dataset.theme)return e;{let t=e.parentNode;for(;t instanceof ShadowRoot;)t=t.host;return a(t)}}return null},u=e=>{if("object"==typeof c.A11yUi&&null!==c.A11yUi&&"object"==typeof c.A11yUi.Theme&&null!==c.A11yUi.Theme&&"boolean"==typeof c.A11yUi.Theme.cache&&"string"==typeof c.A11yUi.Theme.name&&"boolean"==typeof c.A11yUi.Theme.reset)return c.A11yUi.Theme;{const n=a(e),o={cache:!0,encroachCss:{mode:"after"},name:null};return n instanceof HTMLElement&&(o.cache="false"!==n.dataset.themeCache,o.encroachCss="false"===(t=n.dataset).themeEncroachCss&&"false"===t.themeReset&&("string"==typeof t.themeEncroachCssMode&&"after"===t.themeEncroachCssMode||"before"===t.themeEncroachCssMode?{mode:t.themeEncroachCssMode}:{mode:"after"}),o.name=n.dataset.theme||null),o}var t},p=new Set,d=new Map,y=new Map,h=/--[^;]+/g,w=/:/,m=(e,t,n)=>{if(!0===e&&d.has(t)&&d.get(t)?.has(n))return d.get(t)?.get(n);if(!0===e&&y.has(t)&&y.get(t)?.has(n))return y.get(t)?.get(n);if("object"==typeof c.A11yUi&&null!==c.A11yUi&&"object"==typeof c.A11yUi.Themes&&null!==c.A11yUi.Themes&&"object"==typeof c.A11yUi.Themes[t]&&null!==c.A11yUi.Themes[t]&&"string"==typeof c.A11yUi.Themes[t][n]){if(("GLOBAL"===n||"PROPERTIES"===n)&&!1===p.has(t)){let e=c.A11yUi.Themes[t][n].match(h);if(Array.isArray(e)){e=e.filter((e=>w.test(e)));const n=document.createElement("style");n.innerHTML=`.${t} {${e.join(";")}}`,document.querySelector("head")?.appendChild(n)}p.add(t)}let o;try{o=new CSSStyleSheet,"function"==typeof o.replaceSync&&o.replaceSync(c.A11yUi.Themes[t][n]),!0===e&&(!1===d.has(t)&&d.set(t,new Map),d.get(t)?.set(n,o))}catch(e){o=document.createElement("style"),o.innerHTML=c.A11yUi.Themes[t][n]}return o}return null},b=e=>{for(const t of Array.from(e.childNodes)){if(!(t instanceof HTMLElement&&"STYLE"===t.tagName))break;e.removeChild(t)}},g="* {\n font-size: inherit;\n hyphens: auto;\n letter-spacing: inherit;\n word-break: break-word;\n word-spacing: inherit;\n}",v=(e,t,n,o)=>{const s=setTimeout((()=>{if(clearTimeout(s),e.classList.contains("hydrated")){b(t);const s=new CSSStyleSheet;"function"==typeof s.replaceSync&&s.replaceSync(g),n.unshift(s),t.adoptedStyleSheets=n,e.style.display=o}else v(e,t,n,o)}),25)},T=(e,t,n,o)=>{const s=setTimeout((()=>{if(clearTimeout(s),e.classList.contains("hydrated")){b(t);const s=document.createElement("style");s.innerHTML=g,n.unshift(s);const r=t.firstChild;n.forEach((e=>{r instanceof HTMLElement?t.insertBefore(e,r):t.appendChild(e)})),e.style.display=o}else T(e,t,n,o)}),25)},E=(e,t)=>{e.adoptedStyleSheets?.forEach((e=>{t.push(e)}))},S=(e,t)=>{for(const n of Array.from(e.childNodes)){if(!(n instanceof HTMLStyleElement))break;t.push(n)}},j=(e,t)=>{const n=t.name||"default",o=t.cache,s=t.encroachCss,r=m(o,n,"GLOBAL"),i=m(o,n,e.tagName),c=e.shadowRoot;if(i instanceof CSSStyleSheet&&i.cssRules.length>0){const t=[];!1!==s&&"before"===s.mode&&E(c,t),r instanceof CSSStyleSheet&&r.cssRules.length>0&&!1===t.includes(r)&&t.push(r),i instanceof CSSStyleSheet&&i.cssRules.length>0&&!1===t.includes(i)&&t.push(i),!1!==s&&"after"===s.mode&&E(c,t);const n=e.style.display;e.style.display="none",v(e,c,t,n)}else if(i instanceof HTMLStyleElement&&i.innerHTML.length>0){const t=[];!1!==s&&"before"===s.mode&&S(c,t),r instanceof HTMLStyleElement&&r.innerHTML.length>0&&!1===t.includes(r)&&t.push(r),i instanceof HTMLStyleElement&&i.innerHTML.length>0&&!1===t.includes(i)&&t.push(i),!1!==s&&"after"===s.mode&&S(c,t);const n=e.style.display;e.style.display="none",T(e,c,t,n)}};export{s as a,u as g,l as p,j as s};
|