@public-ui/theme-default 2.0.0 → 2.0.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.
- package/dist/index.cjs +5 -6
- package/dist/index.d.ts +3 -1
- package/dist/index.mjs +5 -6
- package/package.json +8 -8
package/dist/index.cjs
CHANGED
|
@@ -301,7 +301,7 @@ var loglevel = {exports: {}};
|
|
|
301
301
|
}));
|
|
302
302
|
} (loglevel));
|
|
303
303
|
|
|
304
|
-
const
|
|
304
|
+
const N=(e,t)=>s=>s(e,t),P=(e,t)=>s=>s(e,t,{append:!1}),o=typeof window=="object"?window:typeof global=="object"?global:typeof self=="object"?self:{};const c=new Map,C=[],v=new Set,h=new Map,B=/--[^;]+/g,G=/:/;(typeof o.A11yUi!="object"||o.A11yUi===null)&&(o.A11yUi={CSS_STYLE_CACHE:h,HYDRATED_HISTORY:C,STYLING_TASK_QUEUE:c});const K=(e,t)=>{let s=t.match(B);if(Array.isArray(s)){s=s.filter(r=>G.test(r));const a=document.createElement("style");a.innerHTML=`.${e} {${s.join(";")}}`,document.querySelector("head")?.appendChild(a);}v.add(e);},d=(e,t)=>typeof o.A11yUi=="object"&&o.A11yUi!==null&&typeof o.A11yUi.Themes=="object"&&o.A11yUi.Themes!==null&&typeof o.A11yUi.Themes[e]=="object"&&o.A11yUi.Themes[e]!==null&&typeof o.A11yUi.Themes[e][t]=="string"?o.A11yUi.Themes[e][t].replace(/\r?\n/g,""):"",q=e=>{for(const t of Array.from(e.childNodes))if(t instanceof HTMLStyleElement&&t.tagName==="STYLE")e.removeChild(t);else break},F=(e,t)=>{try{const s=[];t.forEach(a=>{const r=new CSSStyleSheet;r.replaceSync(a),s.push(r);}),e.adoptedStyleSheets=s;}catch{t.reverse().forEach(s=>{const a=document.createElement("style");a.innerHTML=s,e.insertBefore(a,e.firstChild);});}},Q=(e,t,s)=>{if(s!==!1){const a=[...Array.from(e.childNodes).filter(n=>n instanceof HTMLStyleElement&&n.tagName==="STYLE")];let r;try{r=[...Array.from(e.adoptedStyleSheets)];}catch{r=[];}s?.mode==="before"?(a.reverse().forEach(n=>t.unshift(n.innerHTML)),r.reverse().forEach(n=>t.unshift(Array.from(n.cssRules).map(i=>i.cssText).join("")))):s?.mode==="after"&&(a.forEach(n=>t.push(n.innerHTML)),r.forEach(n=>t.push(Array.from(n.cssRules).map(i=>i.cssText).join(""))));}},L=(e,t,s)=>{const a=t.name||"default";let r;try{if(e.shadowRoot===null)throw new Error("ShadowRoot is null");r=e.shadowRoot;}catch{r=e;}if(h.get(a)?.has(e.tagName))M(e,r,h.get(a)?.get(e.tagName),s);else {const n=d(a,"PROPERTIES"),i=d(a,"GLOBAL"),H=d(a,e.tagName);v.has(a)===!1&&K(a,i);const m=[n,i,H];Q(r,m,t.encroachCss),t.loglevel==="debug"&&console.log(e.tagName,m),t.cache===!0&&(h.has(a)===!1&&h.set(a,new Map),h.get(a)?.set(e.tagName,m)),M(e,r,m,s);}},M=(e,t,s,a)=>{q(t),F(t,s),e.style.display=a;},$=e=>{e.loglevel==="debug"&&C.push({timestamp:Date.now(),numberOfTasks:c.size});},W=e=>{c.delete(e);},O=(e,t)=>{W(e),$(t);},X=e=>{for(const t of e)if(c.has(t.target)&&t.target.classList.contains("hydrated")){const{styleDisplay:s,themeDetails:a}=c.get(t.target);L(t.target,a,s),O(t.target,a);}};let f;try{f=new MutationObserver(X);}catch{f=null;}class te{constructor(t,s,a){this.createTheme=(r,n)=>P(r,n),this.createTranslation=(r,n)=>N(r,n),this.Prefix=t,this.Key=Object.getOwnPropertyNames(s),this.Tag=Object.getOwnPropertyNames(a);}}
|
|
305
305
|
|
|
306
306
|
var KeyEnum = /* @__PURE__ */ ((KeyEnum2) => {
|
|
307
307
|
KeyEnum2[KeyEnum2["error"] = 0] = "error";
|
|
@@ -382,7 +382,7 @@ var TagEnum = /* @__PURE__ */ ((TagEnum2) => {
|
|
|
382
382
|
return TagEnum2;
|
|
383
383
|
})(TagEnum || {});
|
|
384
384
|
|
|
385
|
-
const KoliBri = new
|
|
385
|
+
const KoliBri = new te("kol", KeyEnum, TagEnum);
|
|
386
386
|
|
|
387
387
|
const cssWithCustomLayerName = (layerName) => (input) => `@layer ${layerName} { ${input.join(``)} }`;
|
|
388
388
|
const css = (input) => cssWithCustomLayerName("kol-theme-component")(input);
|
|
@@ -406,6 +406,7 @@ const DEFAULT = KoliBri.createTheme("default", {
|
|
|
406
406
|
--color-mute-variant: var(--kolibri-color-mute-variant, #bec5c9);
|
|
407
407
|
}
|
|
408
408
|
:host {
|
|
409
|
+
background-color: transparent; /* Reset global background-color defined by components */
|
|
409
410
|
font-family: var(--font-family);
|
|
410
411
|
font-size: var(--font-size);
|
|
411
412
|
}
|
|
@@ -2197,7 +2198,7 @@ const DEFAULT = KoliBri.createTheme("default", {
|
|
|
2197
2198
|
cursor: not-allowed;
|
|
2198
2199
|
background-color: var(--color-mute-variant);
|
|
2199
2200
|
}
|
|
2200
|
-
|
|
2201
|
+
kol-alert.error {
|
|
2201
2202
|
order: 1;
|
|
2202
2203
|
}
|
|
2203
2204
|
fieldset legend {
|
|
@@ -2208,12 +2209,10 @@ const DEFAULT = KoliBri.createTheme("default", {
|
|
|
2208
2209
|
order: 3;
|
|
2209
2210
|
}
|
|
2210
2211
|
fieldset.error {
|
|
2211
|
-
padding-left: 1rem;
|
|
2212
2212
|
border-left: 3px solid var(--color-danger);
|
|
2213
|
-
}
|
|
2214
|
-
fieldset kol-alert#error {
|
|
2215
2213
|
color: var(--color-danger);
|
|
2216
2214
|
font-weight: 700;
|
|
2215
|
+
padding-left: 1rem;
|
|
2217
2216
|
}
|
|
2218
2217
|
fieldset.error input:focus,
|
|
2219
2218
|
fieldset.error select:focus,
|
package/dist/index.d.ts
CHANGED
|
@@ -47,6 +47,8 @@ declare const DEFAULT: (patch: (name: string, map: {
|
|
|
47
47
|
"KOL-TOAST-CONTAINER"?: string | undefined;
|
|
48
48
|
"KOL-TOOLBAR"?: string | undefined;
|
|
49
49
|
"KOL-TOOLTIP"?: string | undefined;
|
|
50
|
-
}
|
|
50
|
+
}, options?: {
|
|
51
|
+
append?: boolean | undefined;
|
|
52
|
+
} | undefined) => string) => string;
|
|
51
53
|
|
|
52
54
|
export { DEFAULT };
|
package/dist/index.mjs
CHANGED
|
@@ -299,7 +299,7 @@ var loglevel = {exports: {}};
|
|
|
299
299
|
}));
|
|
300
300
|
} (loglevel));
|
|
301
301
|
|
|
302
|
-
const
|
|
302
|
+
const N=(e,t)=>s=>s(e,t),P=(e,t)=>s=>s(e,t,{append:!1}),o=typeof window=="object"?window:typeof global=="object"?global:typeof self=="object"?self:{};const c=new Map,C=[],v=new Set,h=new Map,B=/--[^;]+/g,G=/:/;(typeof o.A11yUi!="object"||o.A11yUi===null)&&(o.A11yUi={CSS_STYLE_CACHE:h,HYDRATED_HISTORY:C,STYLING_TASK_QUEUE:c});const K=(e,t)=>{let s=t.match(B);if(Array.isArray(s)){s=s.filter(r=>G.test(r));const a=document.createElement("style");a.innerHTML=`.${e} {${s.join(";")}}`,document.querySelector("head")?.appendChild(a);}v.add(e);},d=(e,t)=>typeof o.A11yUi=="object"&&o.A11yUi!==null&&typeof o.A11yUi.Themes=="object"&&o.A11yUi.Themes!==null&&typeof o.A11yUi.Themes[e]=="object"&&o.A11yUi.Themes[e]!==null&&typeof o.A11yUi.Themes[e][t]=="string"?o.A11yUi.Themes[e][t].replace(/\r?\n/g,""):"",q=e=>{for(const t of Array.from(e.childNodes))if(t instanceof HTMLStyleElement&&t.tagName==="STYLE")e.removeChild(t);else break},F=(e,t)=>{try{const s=[];t.forEach(a=>{const r=new CSSStyleSheet;r.replaceSync(a),s.push(r);}),e.adoptedStyleSheets=s;}catch{t.reverse().forEach(s=>{const a=document.createElement("style");a.innerHTML=s,e.insertBefore(a,e.firstChild);});}},Q=(e,t,s)=>{if(s!==!1){const a=[...Array.from(e.childNodes).filter(n=>n instanceof HTMLStyleElement&&n.tagName==="STYLE")];let r;try{r=[...Array.from(e.adoptedStyleSheets)];}catch{r=[];}s?.mode==="before"?(a.reverse().forEach(n=>t.unshift(n.innerHTML)),r.reverse().forEach(n=>t.unshift(Array.from(n.cssRules).map(i=>i.cssText).join("")))):s?.mode==="after"&&(a.forEach(n=>t.push(n.innerHTML)),r.forEach(n=>t.push(Array.from(n.cssRules).map(i=>i.cssText).join(""))));}},L=(e,t,s)=>{const a=t.name||"default";let r;try{if(e.shadowRoot===null)throw new Error("ShadowRoot is null");r=e.shadowRoot;}catch{r=e;}if(h.get(a)?.has(e.tagName))M(e,r,h.get(a)?.get(e.tagName),s);else {const n=d(a,"PROPERTIES"),i=d(a,"GLOBAL"),H=d(a,e.tagName);v.has(a)===!1&&K(a,i);const m=[n,i,H];Q(r,m,t.encroachCss),t.loglevel==="debug"&&console.log(e.tagName,m),t.cache===!0&&(h.has(a)===!1&&h.set(a,new Map),h.get(a)?.set(e.tagName,m)),M(e,r,m,s);}},M=(e,t,s,a)=>{q(t),F(t,s),e.style.display=a;},$=e=>{e.loglevel==="debug"&&C.push({timestamp:Date.now(),numberOfTasks:c.size});},W=e=>{c.delete(e);},O=(e,t)=>{W(e),$(t);},X=e=>{for(const t of e)if(c.has(t.target)&&t.target.classList.contains("hydrated")){const{styleDisplay:s,themeDetails:a}=c.get(t.target);L(t.target,a,s),O(t.target,a);}};let f;try{f=new MutationObserver(X);}catch{f=null;}class te{constructor(t,s,a){this.createTheme=(r,n)=>P(r,n),this.createTranslation=(r,n)=>N(r,n),this.Prefix=t,this.Key=Object.getOwnPropertyNames(s),this.Tag=Object.getOwnPropertyNames(a);}}
|
|
303
303
|
|
|
304
304
|
var KeyEnum = /* @__PURE__ */ ((KeyEnum2) => {
|
|
305
305
|
KeyEnum2[KeyEnum2["error"] = 0] = "error";
|
|
@@ -380,7 +380,7 @@ var TagEnum = /* @__PURE__ */ ((TagEnum2) => {
|
|
|
380
380
|
return TagEnum2;
|
|
381
381
|
})(TagEnum || {});
|
|
382
382
|
|
|
383
|
-
const KoliBri = new
|
|
383
|
+
const KoliBri = new te("kol", KeyEnum, TagEnum);
|
|
384
384
|
|
|
385
385
|
const cssWithCustomLayerName = (layerName) => (input) => `@layer ${layerName} { ${input.join(``)} }`;
|
|
386
386
|
const css = (input) => cssWithCustomLayerName("kol-theme-component")(input);
|
|
@@ -404,6 +404,7 @@ const DEFAULT = KoliBri.createTheme("default", {
|
|
|
404
404
|
--color-mute-variant: var(--kolibri-color-mute-variant, #bec5c9);
|
|
405
405
|
}
|
|
406
406
|
:host {
|
|
407
|
+
background-color: transparent; /* Reset global background-color defined by components */
|
|
407
408
|
font-family: var(--font-family);
|
|
408
409
|
font-size: var(--font-size);
|
|
409
410
|
}
|
|
@@ -2195,7 +2196,7 @@ const DEFAULT = KoliBri.createTheme("default", {
|
|
|
2195
2196
|
cursor: not-allowed;
|
|
2196
2197
|
background-color: var(--color-mute-variant);
|
|
2197
2198
|
}
|
|
2198
|
-
|
|
2199
|
+
kol-alert.error {
|
|
2199
2200
|
order: 1;
|
|
2200
2201
|
}
|
|
2201
2202
|
fieldset legend {
|
|
@@ -2206,12 +2207,10 @@ const DEFAULT = KoliBri.createTheme("default", {
|
|
|
2206
2207
|
order: 3;
|
|
2207
2208
|
}
|
|
2208
2209
|
fieldset.error {
|
|
2209
|
-
padding-left: 1rem;
|
|
2210
2210
|
border-left: 3px solid var(--color-danger);
|
|
2211
|
-
}
|
|
2212
|
-
fieldset kol-alert#error {
|
|
2213
2211
|
color: var(--color-danger);
|
|
2214
2212
|
font-weight: 700;
|
|
2213
|
+
padding-left: 1rem;
|
|
2215
2214
|
}
|
|
2216
2215
|
fieldset.error input:focus,
|
|
2217
2216
|
fieldset.error select:focus,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@public-ui/theme-default",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
5
|
"homepage": "https://public-ui.github.io",
|
|
6
6
|
"repository": "https://github.com/public-ui/kolibri",
|
|
@@ -38,18 +38,18 @@
|
|
|
38
38
|
"wcag"
|
|
39
39
|
],
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@public-ui/schema": "2.0.
|
|
42
|
-
"@public-ui/visual-tests": "2.0.
|
|
41
|
+
"@public-ui/schema": "2.0.2",
|
|
42
|
+
"@public-ui/visual-tests": "2.0.2",
|
|
43
43
|
"@types/node": "ts5.3",
|
|
44
|
-
"@typescript-eslint/eslint-plugin": "6.
|
|
45
|
-
"@typescript-eslint/parser": "6.
|
|
46
|
-
"eslint": "8.
|
|
44
|
+
"@typescript-eslint/eslint-plugin": "6.15.0",
|
|
45
|
+
"@typescript-eslint/parser": "6.15.0",
|
|
46
|
+
"eslint": "8.56.0",
|
|
47
47
|
"eslint-plugin-no-loops": "0.3.0",
|
|
48
|
-
"typescript": "5.3.
|
|
48
|
+
"typescript": "5.3.3",
|
|
49
49
|
"unbuild": "1.2.1"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@public-ui/components": "2.0.
|
|
52
|
+
"@public-ui/components": "2.0.2"
|
|
53
53
|
},
|
|
54
54
|
"sideEffects": false,
|
|
55
55
|
"type": "module",
|