@descope/web-components-ui 1.0.398 → 1.0.400-1

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.esm.js CHANGED
@@ -1550,13 +1550,17 @@ const externalInputMixin =
1550
1550
  }
1551
1551
 
1552
1552
  createExternalInput() {
1553
- if (!this.isExternalInput) {
1553
+ if (!this.isExternalInput || this.isReadOnly || this.isDisabled) {
1554
1554
  return null;
1555
1555
  }
1556
1556
 
1557
1557
  // use original input element as reference
1558
1558
  const origInput = this.baseElement.querySelector('input');
1559
1559
 
1560
+ if (!origInput) {
1561
+ return null;
1562
+ }
1563
+
1560
1564
  // to avoid focus loop between external-input and origInput
1561
1565
  // we set origInput's tabindex to -1
1562
1566
  // otherwise, shift-tab will never leave the component focus
@@ -2716,6 +2720,12 @@ const ContainerClass = compose(
2716
2720
  flexWrap: {},
2717
2721
 
2718
2722
  backgroundColor: {},
2723
+ backgroundImage: {},
2724
+ backgroundPositionX: {},
2725
+ backgroundPositionY: {},
2726
+ backgroundSize: {},
2727
+ backgroundRepeat: {},
2728
+
2719
2729
  color: {},
2720
2730
  borderRadius: {},
2721
2731
 
@@ -9072,9 +9082,9 @@ class RawPolicyValidation extends createBaseClass({ componentName: componentName
9072
9082
  updateLabel(val) {
9073
9083
  if (!val) {
9074
9084
  this.classList.add('hide-label');
9075
- this.label.innerHTML = '';
9085
+ this.label.textContent = '';
9076
9086
  } else {
9077
- this.label.innerHTML = val;
9087
+ this.label.textContent = val;
9078
9088
  this.classList.remove('hide-label');
9079
9089
  }
9080
9090
  }
@@ -9923,15 +9933,15 @@ class RawUploadFile extends BaseInputClass$3 {
9923
9933
  }
9924
9934
 
9925
9935
  updateTitle(val) {
9926
- this.title.innerHTML = val;
9936
+ this.title.textContent = val;
9927
9937
  }
9928
9938
 
9929
9939
  updateDescription(val) {
9930
- this.description.innerHTML = val;
9940
+ this.description.textContent = val;
9931
9941
  }
9932
9942
 
9933
9943
  updateButtonLabel(val) {
9934
- this.button.innerHTML = val;
9944
+ this.button.textContent = val;
9935
9945
  }
9936
9946
 
9937
9947
  updateButtonSize(val) {
@@ -11108,7 +11118,7 @@ const renderCodeSnippet = (value, lang) =>
11108
11118
 
11109
11119
  const renderText = (text) =>
11110
11120
  `<div class="row-details__value text" title="${text}">${text}</div>`;
11111
- const renderJson = (value) => renderCodeSnippet(JSON.stringify(value, null, 2), 'json');
11121
+ const renderJson = (value) => renderCodeSnippet(escapeXML(JSON.stringify(value, null, 2)), 'json');
11112
11122
  const renderXml = (value) => renderCodeSnippet(escapeXML(value), 'xml');
11113
11123
 
11114
11124
  const defaultRowDetailsValueRenderer = (value) => {
@@ -15340,7 +15350,14 @@ const themeToStyle = ({ globals, components }, themeName) => ({
15340
15350
  components: createComponentsTheme(components),
15341
15351
  });
15342
15352
 
15343
- const useVar = (varName) => `var(${varName})`;
15353
+ // allows to generate css variables with nested fallbacks
15354
+ const useVar = (...varNames) => {
15355
+ return varNames.reduceRight((acc, value) => {
15356
+ if (value.startsWith('--')) return `var(${value}${acc ? `, ${acc}` : acc})`;
15357
+
15358
+ return `${value}${acc ? `, ${acc}` : acc}`;
15359
+ }, '');
15360
+ };
15344
15361
 
15345
15362
  const createHelperVars = (theme, prefix) => {
15346
15363
  const res = transformTheme(theme, [], (path, value) => {
@@ -16253,7 +16270,15 @@ const container = {
16253
16270
  [compVars$5.itemsGrow]: '0',
16254
16271
  [compVars$5.hostWidth]: '100%',
16255
16272
  [compVars$5.boxShadow]: 'none',
16273
+
16256
16274
  [compVars$5.backgroundColor]: globalRefs$t.colors.surface.main,
16275
+
16276
+ [compVars$5.backgroundImage]: '', // we need to set a value to avoid inner containers from inheriting the parent's background image
16277
+ [compVars$5.backgroundPositionX]: 'center',
16278
+ [compVars$5.backgroundPositionY]: 'center',
16279
+ [compVars$5.backgroundSize]: 'cover',
16280
+ [compVars$5.backgroundRepeat]: 'no-repeat',
16281
+
16257
16282
  [compVars$5.color]: globalRefs$t.colors.surface.contrast,
16258
16283
  [compVars$5.borderRadius]: '0px',
16259
16284
  [compVars$5.hostDirection]: globalRefs$t.direction,