@descope/web-components-ui 1.3.0 → 1.5.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/dist/cjs/index.cjs.js +16 -20
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +18 -22
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/descope-alert-index-js.js +1 -1
- package/package.json +2 -2
- package/src/components/descope-alert/AlertClass.js +12 -0
package/dist/cjs/index.cjs.js
CHANGED
@@ -375,11 +375,6 @@ const isNearBlack$1 = (color) => color.luminosity() < 0.01;
|
|
375
375
|
const isNearWhite$1 = (color) => color.luminosity() > 0.99;
|
376
376
|
|
377
377
|
const generateDarkColor$1 = (color, theme) => {
|
378
|
-
if (theme === 'dark') {
|
379
|
-
return isNearWhite$1(color)
|
380
|
-
? darken$1(color, colorGaps$1.edgeColor.darkLight)
|
381
|
-
: lighten$1(color, colorGaps$1.darkLight);
|
382
|
-
}
|
383
378
|
|
384
379
|
return isNearBlack$1(color)
|
385
380
|
? lighten$1(color, colorGaps$1.edgeColor.darkLight)
|
@@ -387,11 +382,6 @@ const generateDarkColor$1 = (color, theme) => {
|
|
387
382
|
};
|
388
383
|
|
389
384
|
const generateLightColor$1 = (color, theme) => {
|
390
|
-
if (theme === 'dark') {
|
391
|
-
return isNearBlack$1(color)
|
392
|
-
? lighten$1(color, colorGaps$1.edgeColor.darkLight)
|
393
|
-
: darken$1(color, colorGaps$1.darkLight);
|
394
|
-
}
|
395
385
|
|
396
386
|
return isNearWhite$1(color)
|
397
387
|
? darken$1(color, colorGaps$1.edgeColor.darkLight)
|
@@ -399,11 +389,6 @@ const generateLightColor$1 = (color, theme) => {
|
|
399
389
|
};
|
400
390
|
|
401
391
|
const generateHighlightColor$1 = (color, theme) => {
|
402
|
-
if (theme === 'dark') {
|
403
|
-
return isNearBlack$1(color)
|
404
|
-
? lighten$1(color, colorGaps$1.edgeColor.highlight)
|
405
|
-
: darken$1(color, colorGaps$1.highlight);
|
406
|
-
}
|
407
392
|
|
408
393
|
return isNearWhite$1(color)
|
409
394
|
? darken$1(color, colorGaps$1.edgeColor.highlight)
|
@@ -415,9 +400,9 @@ const genColor$1 = (color, theme) => {
|
|
415
400
|
|
416
401
|
const res = {
|
417
402
|
main: mainColor.hex(),
|
418
|
-
dark: color.dark || generateDarkColor$1(mainColor
|
419
|
-
light: color.light || generateLightColor$1(mainColor
|
420
|
-
highlight: color.highlight || generateHighlightColor$1(mainColor
|
403
|
+
dark: color.dark || generateDarkColor$1(mainColor),
|
404
|
+
light: color.light || generateLightColor$1(mainColor),
|
405
|
+
highlight: color.highlight || generateHighlightColor$1(mainColor),
|
421
406
|
contrast: color.contrast || contrast$1(mainColor),
|
422
407
|
};
|
423
408
|
|
@@ -531,12 +516,12 @@ const transformTheme$1 = (theme, path, getTransformation) => {
|
|
531
516
|
|
532
517
|
const getThemeRefs$1 = (theme, prefix) =>
|
533
518
|
transformTheme$1(theme, [], (path) =>
|
534
|
-
set$1({}, path, `var(${getVarName$1(
|
519
|
+
set$1({}, path, `var(${getVarName$1(path)})`),
|
535
520
|
);
|
536
521
|
|
537
522
|
const getThemeVars$1 = (theme, prefix) =>
|
538
523
|
transformTheme$1(theme, [], (path) =>
|
539
|
-
set$1({}, path, getVarName$1(
|
524
|
+
set$1({}, path, getVarName$1(path)),
|
540
525
|
);
|
541
526
|
|
542
527
|
// allows to generate css variables with nested fallbacks
|
@@ -18583,6 +18568,9 @@ class RawAlert extends createBaseClass$1({ componentName: componentName$2, baseS
|
|
18583
18568
|
display: flex;
|
18584
18569
|
width: 100%;
|
18585
18570
|
}
|
18571
|
+
:host([empty="true"]) {
|
18572
|
+
display: none;
|
18573
|
+
}
|
18586
18574
|
.icon {
|
18587
18575
|
flex-shrink: 0;
|
18588
18576
|
}
|
@@ -18612,11 +18600,19 @@ class RawAlert extends createBaseClass$1({ componentName: componentName$2, baseS
|
|
18612
18600
|
|
18613
18601
|
this.slotEle.addEventListener('slotchange', this.handleSlotChange.bind(this));
|
18614
18602
|
|
18603
|
+
syncAttrs(this.textComp, this, { includeAttrs: ['empty'] });
|
18604
|
+
|
18605
|
+
observeChildren(this, this.handleChildrenChange.bind(this));
|
18606
|
+
|
18615
18607
|
forwardAttrs$1(this, this.textComp, {
|
18616
18608
|
includeAttrs: ['variant', 'full-width', 'link-target-blank'],
|
18617
18609
|
});
|
18618
18610
|
}
|
18619
18611
|
|
18612
|
+
handleChildrenChange() {
|
18613
|
+
this.textComp.textContent = this.textContent;
|
18614
|
+
}
|
18615
|
+
|
18620
18616
|
handleSlotChange() {
|
18621
18617
|
const assignedNodes = this.slotEle.assignedNodes({ flatten: true });
|
18622
18618
|
if (!assignedNodes.length) return;
|