@acorex/styles 19.11.7 → 19.11.9

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.
@@ -24,7 +24,7 @@ export const createSurfaces = function (colorName) {
24
24
  const variations = ['lightest', 'lighter', 'light', 'surface', 'dark', 'darker', 'darkest'];
25
25
 
26
26
  return variations.reduce((surfaces, variation) => {
27
- surfaces[variation] = `rgba(var(--ax-sys-color-${colorName}-${variation}-surface), <alpha-value>)`;
27
+ surfaces[variation] = `rgba(var(--ax-sys-color-${colorName}-${variation}), <alpha-value>)`;
28
28
  return surfaces;
29
29
  }, {});
30
30
  };
@@ -38,7 +38,7 @@ export const createOnSurfaces = function (colorName) {
38
38
 
39
39
  return variations.reduce((onSurfaces, variation) => {
40
40
  const key = variation === 'contrast' ? `on-${variation}` : `on-${variation}`;
41
- onSurfaces[key] = `rgba(var(--ax-sys-color-on-${colorName}-${variation}-surface), <alpha-value>)`;
41
+ onSurfaces[key] = `rgba(var(--ax-sys-color-on-${colorName}-${variation}), <alpha-value>)`;
42
42
  return onSurfaces;
43
43
  }, {});
44
44
  };
@@ -50,28 +50,19 @@ export const createBorderSurfaces = function (colorName) {
50
50
  const variations = ['lightest', 'lighter', 'light', 'surface', 'dark', 'darker', 'darkest'];
51
51
 
52
52
  return variations.reduce((borderSurfaces, variation) => {
53
- borderSurfaces[variation] = `rgba(var(--ax-sys-color-border-${colorName}-${variation}-surface), <alpha-value>)`;
53
+ borderSurfaces[variation] = `rgba(var(--ax-sys-color-border-${colorName}-${variation}), <alpha-value>)`;
54
54
  return borderSurfaces;
55
55
  }, {});
56
56
  };
57
57
 
58
58
  export function createColoredSurfaces(colorName) {
59
- const variations = [
60
- 'surface',
61
- 'lightest-surface',
62
- 'lighter-surface',
63
- 'light-surface',
64
- 'dark-surface',
65
- 'darker-surface',
66
- 'darkest-surface',
67
- ];
59
+ const variations = ['surface', 'lightest', 'lighter', 'light', 'dark', 'darker', 'darkest'];
68
60
 
69
61
  return variations.reduce((classes, variation) => {
70
- const baseName = variation.replace('-surface', ''); // Extract the base name (e.g., 'lightest', 'lighter', etc.)
71
62
  classes[`.${colorName}-${variation}`] = {
72
- backgroundColor: `rgb(var(--ax-sys-color-${colorName}-${baseName || 'surface'}))`,
73
- color: `rgb(var(--ax-sys-color-on-${colorName}-${baseName || 'surface'}))`,
74
- borderColor: `rgb(var(--ax-sys-color-border-${colorName}-${baseName || 'surface'}))`,
63
+ backgroundColor: `rgb(var(--ax-sys-color-${colorName}-${variation}))`,
64
+ color: `rgb(var(--ax-sys-color-on-${colorName}-${variation}))`,
65
+ borderColor: `rgb(var(--ax-sys-color-border-${colorName}-${variation}))`,
75
66
  };
76
67
  return classes;
77
68
  }, {});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acorex/styles",
3
- "version": "19.11.7",
3
+ "version": "19.11.9",
4
4
  "main": "index.js",
5
5
  "author": "Ali Safari",
6
6
  "license": "ISC",