@descope/web-components-ui 1.0.399 → 1.0.400

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
@@ -2720,6 +2720,12 @@ const ContainerClass = compose(
2720
2720
  flexWrap: {},
2721
2721
 
2722
2722
  backgroundColor: {},
2723
+ backgroundImage: {},
2724
+ backgroundPositionX: {},
2725
+ backgroundPositionY: {},
2726
+ backgroundSize: {},
2727
+ backgroundRepeat: {},
2728
+
2723
2729
  color: {},
2724
2730
  borderRadius: {},
2725
2731
 
@@ -15344,7 +15350,14 @@ const themeToStyle = ({ globals, components }, themeName) => ({
15344
15350
  components: createComponentsTheme(components),
15345
15351
  });
15346
15352
 
15347
- 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
+ };
15348
15361
 
15349
15362
  const createHelperVars = (theme, prefix) => {
15350
15363
  const res = transformTheme(theme, [], (path, value) => {
@@ -16257,7 +16270,15 @@ const container = {
16257
16270
  [compVars$5.itemsGrow]: '0',
16258
16271
  [compVars$5.hostWidth]: '100%',
16259
16272
  [compVars$5.boxShadow]: 'none',
16273
+
16260
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
+
16261
16282
  [compVars$5.color]: globalRefs$t.colors.surface.contrast,
16262
16283
  [compVars$5.borderRadius]: '0px',
16263
16284
  [compVars$5.hostDirection]: globalRefs$t.direction,