@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/cjs/index.cjs.js +22 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +22 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/descope-container-index-js.js +1 -1
- package/package.json +2 -2
- package/src/components/descope-container/ContainerClass.js +6 -0
- package/src/helpers/themeHelpers/index.js +8 -1
- package/src/theme/components/container.js +10 -2
package/dist/cjs/index.cjs.js
CHANGED
@@ -366,7 +366,14 @@ const themeToStyle = ({ globals, components }, themeName) => ({
|
|
366
366
|
components: createComponentsTheme(components),
|
367
367
|
});
|
368
368
|
|
369
|
-
|
369
|
+
// allows to generate css variables with nested fallbacks
|
370
|
+
const useVar = (...varNames) => {
|
371
|
+
return varNames.reduceRight((acc, value) => {
|
372
|
+
if (value.startsWith('--')) return `var(${value}${acc ? `, ${acc}` : acc})`;
|
373
|
+
|
374
|
+
return `${value}${acc ? `, ${acc}` : acc}`;
|
375
|
+
}, '');
|
376
|
+
};
|
370
377
|
|
371
378
|
const createHelperVars = (theme, prefix) => {
|
372
379
|
const res = transformTheme(theme, [], (path, value) => {
|
@@ -5123,6 +5130,12 @@ const ContainerClass = compose(
|
|
5123
5130
|
flexWrap: {},
|
5124
5131
|
|
5125
5132
|
backgroundColor: {},
|
5133
|
+
backgroundImage: {},
|
5134
|
+
backgroundPositionX: {},
|
5135
|
+
backgroundPositionY: {},
|
5136
|
+
backgroundSize: {},
|
5137
|
+
backgroundRepeat: {},
|
5138
|
+
|
5126
5139
|
color: {},
|
5127
5140
|
borderRadius: {},
|
5128
5141
|
|
@@ -5170,7 +5183,15 @@ const container = {
|
|
5170
5183
|
[compVars$5.itemsGrow]: '0',
|
5171
5184
|
[compVars$5.hostWidth]: '100%',
|
5172
5185
|
[compVars$5.boxShadow]: 'none',
|
5186
|
+
|
5173
5187
|
[compVars$5.backgroundColor]: globalRefs$t.colors.surface.main,
|
5188
|
+
|
5189
|
+
[compVars$5.backgroundImage]: '', // we need to set a value to avoid inner containers from inheriting the parent's background image
|
5190
|
+
[compVars$5.backgroundPositionX]: 'center',
|
5191
|
+
[compVars$5.backgroundPositionY]: 'center',
|
5192
|
+
[compVars$5.backgroundSize]: 'cover',
|
5193
|
+
[compVars$5.backgroundRepeat]: 'no-repeat',
|
5194
|
+
|
5174
5195
|
[compVars$5.color]: globalRefs$t.colors.surface.contrast,
|
5175
5196
|
[compVars$5.borderRadius]: '0px',
|
5176
5197
|
[compVars$5.hostDirection]: globalRefs$t.direction,
|