@descope/web-components-ui 2.1.16 → 2.1.17
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/cjs/index.cjs.js +8 -4
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +8 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/8961.js +1 -1
- package/dist/umd/8961.js.map +1 -1
- package/dist/umd/9365.js +1 -1
- package/dist/umd/9365.js.map +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/DescopeDev.js.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +28 -28
- package/src/mixins/createStyleMixin/index.js +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -407,6 +407,10 @@ const injectStyle = (cssString, ref, { prepend = false } = {}) => {
|
|
|
407
407
|
_ref.adoptedStyleSheets = adoptedStyleSheets;
|
|
408
408
|
}
|
|
409
409
|
|
|
410
|
+
if(cssString && !style.cssRules[0]?.style){
|
|
411
|
+
console.warn(`No style rules were created, make sure the CSS is valid:\n "${cssString}"`);
|
|
412
|
+
}
|
|
413
|
+
|
|
410
414
|
return style;
|
|
411
415
|
};
|
|
412
416
|
|
|
@@ -1316,7 +1320,7 @@ const createStyleMixin$1 =
|
|
|
1316
1320
|
if (elementId) {
|
|
1317
1321
|
// basically this is enough to make the selector more specific
|
|
1318
1322
|
// but just in case there is no id, we will also add the class multiple times
|
|
1319
|
-
classSpecifier += `#${elementId}`;
|
|
1323
|
+
classSpecifier += `#${CSS.escape(elementId)}`;
|
|
1320
1324
|
}
|
|
1321
1325
|
|
|
1322
1326
|
this.#overrideStyleEle = injectStyle(`:host(${classSpecifier}) {}`, this.#rootElement);
|
|
@@ -1324,7 +1328,7 @@ const createStyleMixin$1 =
|
|
|
1324
1328
|
}
|
|
1325
1329
|
|
|
1326
1330
|
#setAttrOverride(attrName, value) {
|
|
1327
|
-
const style = this.#overrideStyleEle
|
|
1331
|
+
const style = this.#overrideStyleEle.cssRules[0].style;
|
|
1328
1332
|
|
|
1329
1333
|
if (!style) return;
|
|
1330
1334
|
|
|
@@ -3411,7 +3415,7 @@ const createStyleMixin =
|
|
|
3411
3415
|
if (elementId) {
|
|
3412
3416
|
// basically this is enough to make the selector more specific
|
|
3413
3417
|
// but just in case there is no id, we will also add the class multiple times
|
|
3414
|
-
classSpecifier += `#${elementId}`;
|
|
3418
|
+
classSpecifier += `#${CSS.escape(elementId)}`;
|
|
3415
3419
|
}
|
|
3416
3420
|
|
|
3417
3421
|
this.#overrideStyleEle = injectStyle(`:host(${classSpecifier}) {}`, this.#rootElement);
|
|
@@ -3420,7 +3424,7 @@ const createStyleMixin =
|
|
|
3420
3424
|
|
|
3421
3425
|
|
|
3422
3426
|
#setAttrOverride(attrName, value) {
|
|
3423
|
-
const style = this.#overrideStyleEle
|
|
3427
|
+
const style = this.#overrideStyleEle.cssRules[0].style;
|
|
3424
3428
|
|
|
3425
3429
|
if (!style) return;
|
|
3426
3430
|
|