Skip to content

Commit 880a8ab

Browse files
fix: ensure theming parameters are in sync with ui5/webcomponents-theme-base (#737)
1 parent 85f76f3 commit 880a8ab

File tree

4 files changed

+42
-17
lines changed

4 files changed

+42
-17
lines changed

packages/base/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@
3232
"resize-observer-polyfill": "1.5.1",
3333
"smoothscroll-polyfill": "0.4.4"
3434
},
35-
"devDependencies": {
36-
"@sap-theming/theming-base-content": "11.1.18"
37-
},
3835
"peerDependencies": {
3936
"@ui5/webcomponents-base": "1.0.0-rc.9",
4037
"react": "^16.8.0",

packages/base/src/styling/ThemingParameters.ts

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* ### WARNING ###
55
* This is an autogenerated file, do not change manually.
6-
* In order to recreate this file, please run 'node packages/base/scripts/cssVariables/parse.js'
6+
* In order to recreate this file, please run 'node scripts/generate-theming-parameters.js'
77
*/
88

99
export const ThemingParameters = {
@@ -31,6 +31,7 @@ export const ThemingParameters = {
3131
sapLink_Active_Color: 'var(--sapLink_Active_Color)',
3232
sapLink_Visited_Color: 'var(--sapLink_Visited_Color)',
3333
sapLink_InvertedColor: 'var(--sapLink_InvertedColor)',
34+
sapLink_SubtleColor: 'var(--sapLink_SubtleColor)',
3435
sapCompanyLogo: 'var(--sapCompanyLogo)',
3536
sapBackgroundImage: 'var(--sapBackgroundImage)',
3637
sapBackgroundImageOpacity: 'var(--sapBackgroundImageOpacity)',
@@ -69,13 +70,37 @@ export const ThemingParameters = {
6970
sapInformationBackground: 'var(--sapInformationBackground)',
7071
sapNeutralBackground: 'var(--sapNeutralBackground)',
7172
sapIndicationColor_1: 'var(--sapIndicationColor_1)',
73+
sapIndicationColor_1_Hover_Background: 'var(--sapIndicationColor_1_Hover_Background)',
74+
sapIndicationColor_1_Active_Background: 'var(--sapIndicationColor_1_Active_Background)',
75+
sapIndicationColor_1_TextColor: 'var(--sapIndicationColor_1_TextColor)',
7276
sapIndicationColor_2: 'var(--sapIndicationColor_2)',
77+
sapIndicationColor_2_Hover_Background: 'var(--sapIndicationColor_2_Hover_Background)',
78+
sapIndicationColor_2_Active_Background: 'var(--sapIndicationColor_2_Active_Background)',
79+
sapIndicationColor_2_TextColor: 'var(--sapIndicationColor_2_TextColor)',
7380
sapIndicationColor_3: 'var(--sapIndicationColor_3)',
81+
sapIndicationColor_3_Hover_Background: 'var(--sapIndicationColor_3_Hover_Background)',
82+
sapIndicationColor_3_Active_Background: 'var(--sapIndicationColor_3_Active_Background)',
83+
sapIndicationColor_3_TextColor: 'var(--sapIndicationColor_3_TextColor)',
7484
sapIndicationColor_4: 'var(--sapIndicationColor_4)',
85+
sapIndicationColor_4_Hover_Background: 'var(--sapIndicationColor_4_Hover_Background)',
86+
sapIndicationColor_4_Active_Background: 'var(--sapIndicationColor_4_Active_Background)',
87+
sapIndicationColor_4_TextColor: 'var(--sapIndicationColor_4_TextColor)',
7588
sapIndicationColor_5: 'var(--sapIndicationColor_5)',
89+
sapIndicationColor_5_Hover_Background: 'var(--sapIndicationColor_5_Hover_Background)',
90+
sapIndicationColor_5_Active_Background: 'var(--sapIndicationColor_5_Active_Background)',
91+
sapIndicationColor_5_TextColor: 'var(--sapIndicationColor_5_TextColor)',
7692
sapIndicationColor_6: 'var(--sapIndicationColor_6)',
93+
sapIndicationColor_6_Hover_Background: 'var(--sapIndicationColor_6_Hover_Background)',
94+
sapIndicationColor_6_Active_Background: 'var(--sapIndicationColor_6_Active_Background)',
95+
sapIndicationColor_6_TextColor: 'var(--sapIndicationColor_6_TextColor)',
7796
sapIndicationColor_7: 'var(--sapIndicationColor_7)',
97+
sapIndicationColor_7_Hover_Background: 'var(--sapIndicationColor_7_Hover_Background)',
98+
sapIndicationColor_7_Active_Background: 'var(--sapIndicationColor_7_Active_Background)',
99+
sapIndicationColor_7_TextColor: 'var(--sapIndicationColor_7_TextColor)',
78100
sapIndicationColor_8: 'var(--sapIndicationColor_8)',
101+
sapIndicationColor_8_Hover_Background: 'var(--sapIndicationColor_8_Hover_Background)',
102+
sapIndicationColor_8_Active_Background: 'var(--sapIndicationColor_8_Active_Background)',
103+
sapIndicationColor_8_TextColor: 'var(--sapIndicationColor_8_TextColor)',
79104
sapElement_LineHeight: 'var(--sapElement_LineHeight)',
80105
sapElement_Height: 'var(--sapElement_Height)',
81106
sapElement_BorderWidth: 'var(--sapElement_BorderWidth)',
@@ -253,6 +278,14 @@ export const ThemingParameters = {
253278
sapButton_Success_Hover_TextColor: 'var(--sapButton_Success_Hover_TextColor)',
254279
sapButton_Success_Active_Background: 'var(--sapButton_Success_Active_Background)',
255280
sapButton_Success_Active_BorderColor: 'var(--sapButton_Success_Active_BorderColor)',
281+
sapButton_Information_Background: 'var(--sapButton_Information_Background)',
282+
sapButton_Information_BorderColor: 'var(--sapButton_Information_BorderColor)',
283+
sapButton_Information_TextColor: 'var(--sapButton_Information_TextColor)',
284+
sapButton_Information_Hover_Background: 'var(--sapButton_Information_Hover_Background)',
285+
sapButton_Information_Hover_BorderColor: 'var(--sapButton_Information_Hover_BorderColor)',
286+
sapButton_Information_Hover_TextColor: 'var(--sapButton_Information_Hover_TextColor)',
287+
sapButton_Information_Active_Background: 'var(--sapButton_Information_Active_Background)',
288+
sapButton_Information_Active_BorderColor: 'var(--sapButton_Information_Active_BorderColor)',
256289
sapButton_Neutral_Background: 'var(--sapButton_Neutral_Background)',
257290
sapButton_Neutral_BorderColor: 'var(--sapButton_Neutral_BorderColor)',
258291
sapButton_Neutral_TextColor: 'var(--sapButton_Neutral_TextColor)',
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
const { writeFileSync } = require('fs');
2-
const { root } = require('@sap-theming/theming-base-content/content/Base/baseLib/sap_fiori_3/variables.json');
3-
const PATHS = require('../../../../config/paths');
2+
const {
3+
root: ThemingParameters
4+
} = require('@sap-theming/theming-base-content/content/Base/baseLib/sap_fiori_3/variables.json');
5+
const PATHS = require('../config/paths');
46
const path = require('path');
57
const prettier = require('prettier');
6-
const prettierConfig = require('../../../../prettier.config');
7-
8-
const variables = Object.keys(root);
8+
const prettierConfig = require('../prettier.config');
99

1010
let fileContent = `/* eslint-disable camelcase */
1111
1212
/*
1313
* ### WARNING ###
1414
* This is an autogenerated file, do not change manually.
15-
* In order to recreate this file, please run 'node packages/base/scripts/cssVariables/parse.js'
15+
* In order to recreate this file, please run 'node scripts/generate-theming-parameters.js'
1616
*/
1717
1818
`;
1919

2020
fileContent += 'export const ThemingParameters = {\n';
21-
for (const variable of variables) {
21+
for (const variable in ThemingParameters) {
2222
fileContent += ` '${variable}': 'var(--${variable})',\n`;
2323
}
2424
fileContent += '}\n';
2525

2626
writeFileSync(
2727
path.join(PATHS.packages, 'base', 'src', 'styling', 'ThemingParameters.ts'),
28-
prettier.format(fileContent, prettierConfig)
28+
prettier.format(fileContent, { ...prettierConfig, parser: 'typescript' })
2929
);

yarn.lock

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3706,11 +3706,6 @@
37063706
estree-walker "^1.0.1"
37073707
picomatch "^2.2.2"
37083708

3709-
"@sap-theming/[email protected]":
3710-
version "11.1.18"
3711-
resolved "https://registry.yarnpkg.com/@sap-theming/theming-base-content/-/theming-base-content-11.1.18.tgz#041965002a47326f2791241e3539e9bffeb2359f"
3712-
integrity sha512-NDqUq35hc/eZQomLhsDQEO8PeCnNCZmJIittafuho5VlGNdJWR1ZsXj97MZSJnLLfttVWcpb5KNrj+b84F6aAw==
3713-
37143709
"@sap-theming/[email protected]":
37153710
version "11.1.19"
37163711
resolved "https://registry.yarnpkg.com/@sap-theming/theming-base-content/-/theming-base-content-11.1.19.tgz#301b8085807cd410e5c7269cca55cd4ca385534c"

0 commit comments

Comments
 (0)