@descope/web-components-ui 1.0.115 → 1.0.117

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/web-components-ui",
3
- "version": "1.0.115",
3
+ "version": "1.0.117",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -45,14 +45,16 @@ export const getThemeVars = (theme, prefix) =>
45
45
  set({}, path, getVarName(prefix ? [prefix, ...path] : path))
46
46
  );
47
47
 
48
- export const globalsThemeToStyle = (theme, themeName = '') => `
49
- *[data-theme="${themeName}"] {
50
- ${Object.entries(themeToCSSVarsObj(theme)).reduce(
51
- (acc, entry) => (acc += `${entry.join(':')};\n`),
52
- ''
53
- )}
54
- }
55
- `;
48
+ export const globalsThemeToStyle = (theme, themeName = '') => {
49
+ const style = Object.entries(themeToCSSVarsObj(theme)).reduce(
50
+ (acc, entry) => (acc += `${entry.join(':')};\n`),
51
+ ''
52
+ );
53
+
54
+ if(!themeName) return style
55
+
56
+ return `*[data-theme="${themeName}"] {${style}}`
57
+ };
56
58
 
57
59
  const componentsThemeToStyleObj = (componentsTheme) =>
58
60
  transformTheme(componentsTheme, [], (path, val) => {
@@ -8,13 +8,13 @@ const compVars = ContainerClass.cssVarList
8
8
 
9
9
  const verticalAlignment = {
10
10
  start: { verticalAlignment: 'start' },
11
- center: { verticalAlignment: 'center' },
11
+ center: { verticalAlignment: 'safe center' },
12
12
  end: { verticalAlignment: 'end' },
13
13
  }
14
14
 
15
15
  const horizontalAlignment = {
16
16
  start: { horizontalAlignment: 'start' },
17
- center: { horizontalAlignment: 'center' },
17
+ center: { horizontalAlignment: 'safe center' },
18
18
  end: { horizontalAlignment: 'end' },
19
19
  }
20
20