@public-ui/theme-ecl 4.0.3 → 4.0.4-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/assets/kolicons/kolicons.eot +0 -0
- package/assets/kolicons/kolicons.ttf +0 -0
- package/assets/kolicons/kolicons.woff +0 -0
- package/assets/kolicons/kolicons.woff2 +0 -0
- package/assets/kolicons/style.css +6 -6
- package/dist/index.cjs +4 -96
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +4 -96
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -12
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
function getDefaultExportFromCjs (x) {
|
|
5
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
6
|
-
}
|
|
7
4
|
|
|
8
5
|
var loglevel$1 = {exports: {}};
|
|
9
6
|
|
|
@@ -374,7 +371,7 @@ function requireLoglevel () {
|
|
|
374
371
|
|
|
375
372
|
requireLoglevel();
|
|
376
373
|
|
|
377
|
-
const
|
|
374
|
+
const j=(t,e)=>s=>s(t,e),F=(t,e)=>s=>s(t,e,{append:false}),Y=()=>{const t=typeof process<"u"&&process.env?process.env:{},e=t.NODE_ENV==="test",s="VITEST"in t,o="JEST_WORKER_ID"in t,a="PLAYWRIGHT_TEST_BASE_URL"in t,r=t.CI==="true",i=t.TEST==="true"||t.IS_TEST==="true",c=typeof navigator<"u"&&navigator.webdriver===true,y=typeof navigator<"u"&&/playwright|puppeteer|webdriver|selenium|testcafe/i.test(navigator.userAgent);return e||s||o||a||r||i||c||y},n$1={A11yUi:{CSS_STYLE_CACHE:new Map,IS_TEST_ENVIRONMENT:Y(),PERFORMANCE_MEASURES:new Map,STYLING_TASK_QUEUE:new Map,THEMES:new Map,showAverageTimes:()=>{const t={};for(const[s,o]of n$1.A11yUi.PERFORMANCE_MEASURES.entries())t[s]=[o.totalTime/o.count,o.count];const e=Object.entries(t).sort((s,o)=>o[1][0]-s[1][0]);return console.table(Object.fromEntries(e.map(([s,[o,a]])=>[s,{"avg (ms)":parseFloat(o.toFixed(2)),count:a}]))),t}}};const v=new Set,N=new Map,X=/--[^;]+/g,Z=/:/,ee=typeof MutationObserver<"u";let R=()=>{Math.min(25+Math.log2(n$1.A11yUi.STYLING_TASK_QUEUE.size+1)*20,250);};const te=(t,e)=>{let s=e.match(X);if(Array.isArray(s)){s=s.filter(a=>Z.test(a));const o=document.createElement("style");o.innerHTML=`.${t} {${s.join(";")}}`,document.querySelector("head")?.appendChild(o);}v.add(t);},d=(t,e)=>{const s=n$1.A11yUi.THEMES.get(t);if(s instanceof Map){const o=s.get(e);if(o!==void 0)return o}return ""},se=t=>{const e=t.firstChild;if(!(!(e instanceof HTMLStyleElement)||e.dataset.themingFallback!==void 0))for(const s of Array.from(t.childNodes))if(s instanceof HTMLStyleElement&&s.tagName==="STYLE"&&s.dataset.themingFallback===void 0)t.removeChild(s);else break},oe=(t,e)=>{try{if(n$1.A11yUi.Theme?.mode==="ssr")throw new Error("SSR");const s=e.filter(o=>typeof o=="string"&&o.length>0).map(o=>{let a=N.get(o);return a||(a=new CSSStyleSheet,a.replaceSync(o),N.set(o,a)),a});t.adoptedStyleSheets=s;}catch{for(let o=e.length-1;o>=0;o--){const a=e[o];if(typeof a!="string"||a.length===0)continue;const r=e.length-1-o,i=document.createElement("style");switch(i.dataset.themingFallback="",r){case 4:i.dataset.themingBaseA11y="";break;case 3:i.dataset.themingBaseGlobal="";break;case 2:i.dataset.themingBaseComponent="";break;case 1:i.dataset.themingCustomGlobal="";break;case 0:i.dataset.themingCustomComponent="";break;default:i.dataset.themingUnknown="";break}i.innerHTML=a,t.insertBefore(i,t.firstChild);}}},ae=(t,e,s)=>{if(s===false||s?.mode!=="before"&&s?.mode!=="after")return;const o=Array.from(t.childNodes).filter(r=>r instanceof HTMLStyleElement&&r.tagName==="STYLE");let a;try{a=Array.from(t.adoptedStyleSheets);}catch{a=[];}if(!(o.length===0&&a.length===0))if(s.mode==="before"){const r=[...a.map(i=>Array.from(i.cssRules).map(c=>c.cssText).join("")),...o.map(i=>i.innerHTML)];e.unshift(...r);}else o.forEach(r=>e.push(r.innerHTML)),a.forEach(r=>e.push(Array.from(r.cssRules).map(i=>i.cssText).join("")));},ne=(t,e,s)=>{const o=e.name||"default";let a;try{if(t.shadowRoot===null)throw new Error("ShadowRoot is null");a=t.shadowRoot;}catch{a=t;}const r=n$1.A11yUi.CSS_STYLE_CACHE.get(o)?.get(t.tagName);if(r)_(t,a,r,s);else {const i=d(o,"PROPERTIES"),c=d(o,"GLOBAL"),y=d(o,t.tagName);v.has(o)===false&&te(o,c);const u=[i,c,y];if(ae(a,u,e.encroachCss),e.cache===true){let m=n$1.A11yUi.CSS_STYLE_CACHE.get(o);m||(m=new Map,n$1.A11yUi.CSS_STYLE_CACHE.set(o,m)),m.set(t.tagName,u);}_(t,a,u,s);}},_=(t,e,s,o)=>{const a=n$1.A11yUi.Theme?.loglevel==="debug",r=a?performance.now():0;if(se(e),oe(e,s),me(t),requestAnimationFrame(o),a){const i=performance.now()-r,c=n$1.A11yUi.PERFORMANCE_MEASURES.get(t.tagName);c?(c.count+=1,c.totalTime+=i):n$1.A11yUi.PERFORMANCE_MEASURES.set(t.tagName,{count:1,totalTime:i});}},O=t=>{const e=n$1.A11yUi.STYLING_TASK_QUEUE.get(t);if(e){const{resetCss:s,themeDetails:o}=e;ne(t,o,s);}};const ce={attributes:true,attributeFilter:[],childList:false,subtree:false},I=ee?new MutationObserver((t,e)=>{const s=[];for(const o of t){const a=o.target;a.classList.contains("hydrated")&&n$1.A11yUi.STYLING_TASK_QUEUE.has(a)&&(O(a),s.push(a));}for(const o of s)e.observe(o,ce);}):null;I&&(R=()=>{});const me=t=>{n$1.A11yUi.STYLING_TASK_QUEUE.delete(t),R();};class fe{Prefix;Key;Tag;createTheme=(e,s)=>F(e,s);createTranslation=(e,s)=>j(e,s);constructor(e,s,o){this.Prefix=e,this.Key=Object.getOwnPropertyNames(s),this.Tag=Object.getOwnPropertyNames(o);}}
|
|
378
375
|
|
|
379
376
|
var KeyEnum;
|
|
380
377
|
(function (KeyEnum) {
|
|
@@ -472,7 +469,7 @@ const setRuntimeMode = (mode) => {
|
|
|
472
469
|
throw new Error(`Invalid NODE_ENV value: ${mode}. Expected one of ${MODES.join(', ')}.`);
|
|
473
470
|
}
|
|
474
471
|
}
|
|
475
|
-
catch (
|
|
472
|
+
catch (_a) {
|
|
476
473
|
runtimeMode = 'production';
|
|
477
474
|
}
|
|
478
475
|
};
|
|
@@ -483,7 +480,7 @@ const getInitialMode = () => {
|
|
|
483
480
|
return nodeEnv;
|
|
484
481
|
}
|
|
485
482
|
}
|
|
486
|
-
catch (
|
|
483
|
+
catch (_a) {
|
|
487
484
|
}
|
|
488
485
|
return 'production';
|
|
489
486
|
};
|
|
@@ -791,95 +788,6 @@ function requireRgbaConvert () {
|
|
|
791
788
|
requireRgbaConvert();
|
|
792
789
|
new Event('StateChange');
|
|
793
790
|
|
|
794
|
-
/*!
|
|
795
|
-
* KoliBri - The accessible HTML-Standard
|
|
796
|
-
*/
|
|
797
|
-
|
|
798
|
-
var easyBem;
|
|
799
|
-
var hasRequiredEasyBem;
|
|
800
|
-
|
|
801
|
-
function requireEasyBem () {
|
|
802
|
-
if (hasRequiredEasyBem) return easyBem;
|
|
803
|
-
hasRequiredEasyBem = 1;
|
|
804
|
-
|
|
805
|
-
/**
|
|
806
|
-
* BEM class name factory.
|
|
807
|
-
*
|
|
808
|
-
* @typedef {Function} Bem
|
|
809
|
-
* @param {String|Object} [elementOrMods] Element name or hash object with mods
|
|
810
|
-
* @param {Object} [mods] Hash object with mods
|
|
811
|
-
* @returns {String}
|
|
812
|
-
*/
|
|
813
|
-
|
|
814
|
-
/**
|
|
815
|
-
* Returns BEM class name factory.
|
|
816
|
-
*
|
|
817
|
-
* @param {String} componentName Block name
|
|
818
|
-
* @returns {Bem}
|
|
819
|
-
*/
|
|
820
|
-
easyBem = function bem(componentName) {
|
|
821
|
-
return function (elementOrMods, mods) {
|
|
822
|
-
if (!elementOrMods) {
|
|
823
|
-
return componentName;
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
var element;
|
|
827
|
-
|
|
828
|
-
if (typeof elementOrMods === 'string') {
|
|
829
|
-
element = elementOrMods;
|
|
830
|
-
} else {
|
|
831
|
-
mods = elementOrMods;
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
var base = componentName;
|
|
835
|
-
if (element) {
|
|
836
|
-
base += '__' + element;
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
return base + (
|
|
840
|
-
mods
|
|
841
|
-
? Object.keys(mods).reduce(function (result, name) {
|
|
842
|
-
var value = mods[name];
|
|
843
|
-
|
|
844
|
-
if (value) {
|
|
845
|
-
result += ' ' + (
|
|
846
|
-
typeof value === 'boolean'
|
|
847
|
-
? (base + '--' + name)
|
|
848
|
-
: (base + '--' + name + '_' + value)
|
|
849
|
-
);
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
return result;
|
|
853
|
-
}, '')
|
|
854
|
-
: ''
|
|
855
|
-
);
|
|
856
|
-
};
|
|
857
|
-
};
|
|
858
|
-
return easyBem;
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
var easyBemExports = requireEasyBem();
|
|
862
|
-
var a = /*@__PURE__*/getDefaultExportFromCjs(easyBemExports);
|
|
863
|
-
|
|
864
|
-
function c(){const e=new Map,n=(t,o,r)=>{try{return e.get(t)(o,r)}catch{return e.set(t,a(t)).get(t)(o,r)}};return n.forBlock=t=>{const o=(r,s)=>n(t,r,s);return o.forElement=r=>s=>n(t,r,s),o},n}
|
|
865
|
-
|
|
866
|
-
/*!
|
|
867
|
-
* KoliBri - The accessible HTML-Standard
|
|
868
|
-
*/
|
|
869
|
-
|
|
870
|
-
const bem$1 = c();
|
|
871
|
-
bem$1('kol-icon');
|
|
872
|
-
bem$1('kol-icon', 'icon');
|
|
873
|
-
|
|
874
|
-
/*!
|
|
875
|
-
* KoliBri - The accessible HTML-Standard
|
|
876
|
-
*/
|
|
877
|
-
|
|
878
|
-
const bem = c();
|
|
879
|
-
bem('kol-alert', 'closer');
|
|
880
|
-
bem('kol-alert', 'content');
|
|
881
|
-
bem('kol-alert', 'icon');
|
|
882
|
-
|
|
883
791
|
/*!
|
|
884
792
|
* KoliBri - The accessible HTML-Standard
|
|
885
793
|
*/
|
|
@@ -909,7 +817,7 @@ var KolEvent;
|
|
|
909
817
|
* KoliBri - The accessible HTML-Standard
|
|
910
818
|
*/
|
|
911
819
|
|
|
912
|
-
const KoliBri = new
|
|
820
|
+
const KoliBri = new fe('kol', KeyEnum, TagEnum);
|
|
913
821
|
|
|
914
822
|
var Bundesministerium;
|
|
915
823
|
(function (Bundesministerium) {
|