@descope/web-components-ui 1.0.370 → 1.0.371
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 +18 -32
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +18 -32
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +1 -1
- package/dist/umd/descope-button-index-js.js +2 -2
- package/dist/umd/descope-icon-index-js.js +1 -1
- package/dist/umd/descope-upload-file-index-js.js +1 -1
- package/dist/umd/descope-user-attribute-index-js.js +1 -1
- package/dist/umd/descope-user-auth-method-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
- package/package.json +1 -1
- package/src/components/descope-icon/IconClass.js +17 -30
- package/src/theme/components/button.js +0 -1
package/dist/index.esm.js
CHANGED
@@ -1453,7 +1453,7 @@ const componentName$_ = getComponentName('icon');
|
|
1453
1453
|
|
1454
1454
|
class RawIcon extends createBaseClass({ componentName: componentName$_, baseSelector: 'slot' }) {
|
1455
1455
|
static get observedAttributes() {
|
1456
|
-
return ['src'
|
1456
|
+
return ['src'];
|
1457
1457
|
}
|
1458
1458
|
|
1459
1459
|
#icon;
|
@@ -1478,36 +1478,23 @@ class RawIcon extends createBaseClass({ componentName: componentName$_, baseSele
|
|
1478
1478
|
`;
|
1479
1479
|
}
|
1480
1480
|
|
1481
|
-
get fillColor() {
|
1482
|
-
return this.getAttribute('fill-color') === 'true';
|
1483
|
-
}
|
1484
|
-
|
1485
1481
|
get src() {
|
1486
1482
|
return this.getAttribute('src');
|
1487
1483
|
}
|
1488
1484
|
|
1489
1485
|
// in order to fill an SVG with `currentColor` override all of its `fill` and `path` nodes
|
1490
1486
|
// with the value from the `st-fill` attribute
|
1491
|
-
|
1492
|
-
|
1493
|
-
|
1494
|
-
|
1495
|
-
|
1496
|
-
|
1497
|
-
|
1498
|
-
|
1499
|
-
)
|
1500
|
-
|
1501
|
-
|
1502
|
-
fillCssVar('*[fill]');
|
1503
|
-
fillCssVar('path');
|
1504
|
-
}
|
1505
|
-
}
|
1506
|
-
|
1507
|
-
resetIcon() {
|
1508
|
-
if (!this.#icon) return;
|
1509
|
-
this.innerHTML = '';
|
1510
|
-
this.appendChild(this.#icon.cloneNode(true));
|
1487
|
+
// eslint-disable-next-line class-methods-use-this
|
1488
|
+
updateFillColor(node) {
|
1489
|
+
// set fill to root node and all its relevant selectors
|
1490
|
+
const elementsToReplace = [node, ...node.querySelectorAll('*[fill]')];
|
1491
|
+
|
1492
|
+
elementsToReplace.forEach((ele) => {
|
1493
|
+
ele.setAttribute(
|
1494
|
+
'fill',
|
1495
|
+
`var(${IconClass.cssVarList.fill}, ${ele.getAttribute('fill') || "''"})`
|
1496
|
+
);
|
1497
|
+
});
|
1511
1498
|
}
|
1512
1499
|
|
1513
1500
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
@@ -1517,13 +1504,13 @@ class RawIcon extends createBaseClass({ componentName: componentName$_, baseSele
|
|
1517
1504
|
|
1518
1505
|
if (attrName === 'src') {
|
1519
1506
|
createIcon(this.src).then((res) => {
|
1520
|
-
this
|
1521
|
-
|
1522
|
-
|
1507
|
+
this.innerHTML = '';
|
1508
|
+
if (res) {
|
1509
|
+
const clonedNode = res.cloneNode(true);
|
1510
|
+
this.updateFillColor(clonedNode);
|
1511
|
+
this.appendChild(clonedNode);
|
1512
|
+
}
|
1523
1513
|
});
|
1524
|
-
} else if (attrName === 'fill-color') {
|
1525
|
-
this.resetIcon();
|
1526
|
-
this.updateFillColor();
|
1527
1514
|
}
|
1528
1515
|
}
|
1529
1516
|
}
|
@@ -12791,7 +12778,6 @@ const button = {
|
|
12791
12778
|
[compVars$6.outlineColor]: 'transparent',
|
12792
12779
|
|
12793
12780
|
[compVars$6.iconSize]: '1.5em',
|
12794
|
-
[compVars$6.iconColor]: 'currentColor',
|
12795
12781
|
|
12796
12782
|
size: {
|
12797
12783
|
xs: { [compVars$6.fontSize]: '12px' },
|