@ui5/webcomponents-theming 1.3.1 → 1.4.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.4.0](https://github.com/SAP/ui5-webcomponents/compare/v1.3.1...v1.4.0) (2022-05-25)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **framework:** fix fallback to default theme ([#5185](https://github.com/SAP/ui5-webcomponents/issues/5185)) ([0fc2f0d](https://github.com/SAP/ui5-webcomponents/commit/0fc2f0d)), closes [#5136](https://github.com/SAP/ui5-webcomponents/issues/5136) [#5136](https://github.com/SAP/ui5-webcomponents/issues/5136)
12
+
13
+
14
+
15
+
16
+
6
17
  ## [1.3.1](https://github.com/SAP/ui5-webcomponents/compare/v1.3.0...v1.3.1) (2022-04-27)
7
18
 
8
19
  **Note:** Version bump only for package @ui5/webcomponents-theming
@@ -87,6 +87,26 @@
87
87
  "--sapButton_Emphasized_Hover_BorderColor",
88
88
  "--sapButton_Emphasized_Hover_TextColor",
89
89
  "--sapButton_Emphasized_TextColor",
90
+ "--sapButton_Handle_Background",
91
+ "--sapButton_Handle_BorderColor",
92
+ "--sapButton_Handle_Hover_Background",
93
+ "--sapButton_Handle_Hover_BorderColor",
94
+ "--sapButton_Handle_Negative_Background",
95
+ "--sapButton_Handle_Negative_BorderColor",
96
+ "--sapButton_Handle_Negative_Hover_Background",
97
+ "--sapButton_Handle_Negative_Hover_BorderColor",
98
+ "--sapButton_Handle_Negative_TextColor",
99
+ "--sapButton_Handle_Positive_Background",
100
+ "--sapButton_Handle_Positive_BorderColor",
101
+ "--sapButton_Handle_Positive_Hover_Background",
102
+ "--sapButton_Handle_Positive_Hover_BorderColor",
103
+ "--sapButton_Handle_Positive_TextColor",
104
+ "--sapButton_Handle_Selected_Background",
105
+ "--sapButton_Handle_Selected_BorderColor",
106
+ "--sapButton_Handle_Selected_Hover_Background",
107
+ "--sapButton_Handle_Selected_Hover_BorderColor",
108
+ "--sapButton_Handle_Selected_TextColor",
109
+ "--sapButton_Handle_TextColor",
90
110
  "--sapButton_Hover_Background",
91
111
  "--sapButton_Hover_BorderColor",
92
112
  "--sapButton_Hover_TextColor",
@@ -123,9 +143,22 @@
123
143
  "--sapButton_TokenBackground",
124
144
  "--sapButton_TokenBorderColor",
125
145
  "--sapButton_Track_Background",
146
+ "--sapButton_Track_BorderColor",
147
+ "--sapButton_Track_Hover_Background",
148
+ "--sapButton_Track_Hover_BorderColor",
149
+ "--sapButton_Track_Negative_Background",
150
+ "--sapButton_Track_Negative_BorderColor",
151
+ "--sapButton_Track_Negative_Hover_Background",
152
+ "--sapButton_Track_Negative_Hover_BorderColor",
153
+ "--sapButton_Track_Positive_Background",
154
+ "--sapButton_Track_Positive_BorderColor",
155
+ "--sapButton_Track_Positive_Hover_Background",
156
+ "--sapButton_Track_Positive_Hover_BorderColor",
126
157
  "--sapButton_Track_Selected_Background",
158
+ "--sapButton_Track_Selected_BorderColor",
159
+ "--sapButton_Track_Selected_Hover_Background",
160
+ "--sapButton_Track_Selected_Hover_BorderColor",
127
161
  "--sapButton_Track_Selected_TextColor",
128
- "--sapButton_Track_TextColor",
129
162
  "--sapChart_Good",
130
163
  "--sapChart_Sequence_6",
131
164
  "--sapContent_BadgeBackground",
@@ -133,6 +166,7 @@
133
166
  "--sapContent_BusyColor",
134
167
  "--sapContent_ContrastFocusColor",
135
168
  "--sapContent_ContrastIconColor",
169
+ "--sapContent_ContrastShadowColor",
136
170
  "--sapContent_ContrastTextColor",
137
171
  "--sapContent_Critical_Shadow",
138
172
  "--sapContent_DisabledOpacity",
@@ -147,6 +181,7 @@
147
181
  "--sapContent_HeaderShadow",
148
182
  "--sapContent_HelpColor",
149
183
  "--sapContent_IconColor",
184
+ "--sapContent_IconFontFamily",
150
185
  "--sapContent_Illustrative_Color1",
151
186
  "--sapContent_Illustrative_Color2",
152
187
  "--sapContent_Illustrative_Color3",
@@ -160,6 +195,7 @@
160
195
  "--sapContent_Informative_Shadow",
161
196
  "--sapContent_Interaction_Shadow",
162
197
  "--sapContent_LabelColor",
198
+ "--sapContent_MeasureIndicatorColor",
163
199
  "--sapContent_Negative_Shadow",
164
200
  "--sapContent_NonInteractiveIconColor",
165
201
  "--sapContent_Positive_Shadow",
@@ -167,6 +203,7 @@
167
203
  "--sapContent_Selected_Background",
168
204
  "--sapContent_Selected_ForegroundColor",
169
205
  "--sapContent_Selected_Hover_Background",
206
+ "--sapContent_Selected_MeasureIndicatorColor",
170
207
  "--sapContent_Selected_Shadow",
171
208
  "--sapContent_Selected_TextColor",
172
209
  "--sapContent_Shadow0",
@@ -233,11 +270,10 @@
233
270
  "--sapFontSmallSize",
234
271
  "--sapGroup_ContentBackground",
235
272
  "--sapGroup_ContentBorderColor",
273
+ "--sapGroup_Title_FontSize",
236
274
  "--sapGroup_TitleBackground",
237
275
  "--sapGroup_TitleBorderColor",
238
- "--sapGroup_TitleFontSize",
239
276
  "--sapGroup_TitleTextColor",
240
- "--sapHC_ReducedAltForeground",
241
277
  "--sapHC_ReducedBackground",
242
278
  "--sapHC_ReducedForeground",
243
279
  "--sapHighlightColor",
@@ -304,7 +340,6 @@
304
340
  "--sapNegativeElementColor",
305
341
  "--sapNegativeTextColor",
306
342
  "--sapNeutralBackground",
307
- "--sapNeutralBorderColor",
308
343
  "--sapNeutralColor",
309
344
  "--sapNeutralElementColor",
310
345
  "--sapNeutralTextColor",
@@ -320,6 +355,27 @@
320
355
  "--sapPositiveColor",
321
356
  "--sapPositiveElementColor",
322
357
  "--sapPositiveTextColor",
358
+ "--sapProgress_Background",
359
+ "--sapProgress_CriticalBackground",
360
+ "--sapProgress_FontSize",
361
+ "--sapProgress_InformationBackground",
362
+ "--sapProgress_NegativeBackground",
363
+ "--sapProgress_PositiveBackground",
364
+ "--sapProgress_TextColor",
365
+ "--sapProgress_Value_Background",
366
+ "--sapProgress_Value_BorderColor",
367
+ "--sapProgress_Value_CriticalBackground",
368
+ "--sapProgress_Value_CriticalBorderColor",
369
+ "--sapProgress_Value_CriticalTextColor",
370
+ "--sapProgress_Value_InformationBackground",
371
+ "--sapProgress_Value_InformationBorderColor",
372
+ "--sapProgress_Value_InformationTextColor",
373
+ "--sapProgress_Value_NegativeBackground",
374
+ "--sapProgress_Value_NegativeBorderColor",
375
+ "--sapProgress_Value_NegativeTextColor",
376
+ "--sapProgress_Value_PositiveBackground",
377
+ "--sapProgress_Value_PositiveBorderColor",
378
+ "--sapProgress_Value_PositiveTextColor",
323
379
  "--sapScrollBar_Dimension",
324
380
  "--sapScrollBar_FaceColor",
325
381
  "--sapScrollBar_Hover_FaceColor",
@@ -329,10 +385,21 @@
329
385
  "--sapShell_Active_TextColor",
330
386
  "--sapShell_Background",
331
387
  "--sapShell_Hover_Background",
388
+ "--sapShell_InteractiveBackground",
332
389
  "--sapShell_InteractiveBorderColor",
333
390
  "--sapShell_InteractiveTextColor",
334
391
  "--sapShell_TextColor",
335
392
  "--sapShellColor",
393
+ "--sapSlider_Active_HandleBackground",
394
+ "--sapSlider_Active_RangeHandleBackground",
395
+ "--sapSlider_Background",
396
+ "--sapSlider_HandleBackground",
397
+ "--sapSlider_HandleBorderColor",
398
+ "--sapSlider_Hover_HandleBackground",
399
+ "--sapSlider_Hover_HandleBorderColor",
400
+ "--sapSlider_RangeHandleBackground",
401
+ "--sapSlider_Selected_Background",
402
+ "--sapSlider_Selected_BorderColor",
336
403
  "--sapSuccessBackground",
337
404
  "--sapSuccessBorderColor",
338
405
  "--sapTextColor",
@@ -1,12 +1,11 @@
1
- const fs = require('fs');
1
+ const fs = require('fs').promises;
2
2
  const path = require("path");
3
- const glob = require("glob");
4
3
  const beautify = require("json-beautify");
5
4
 
6
5
  const vars = new Set();
7
6
 
8
- const processFile = file => {
9
- const content = fs.readFileSync(file);
7
+ const processFile = async file => {
8
+ const content = await fs.readFile(file);
10
9
  const matches = `${content}`.match(/var\(--sap[\-_A-Za-z0-9]+\)/g);
11
10
  matches && matches.forEach(match => {
12
11
  const cssVar = match.match(/--sap[\-_A-Za-z0-9]+/)[0];
@@ -14,14 +13,19 @@ const processFile = file => {
14
13
  });
15
14
  };
16
15
 
17
- // Main
18
- glob.sync(path.join(__dirname, "../../../main/src/themes/**/*.css")).forEach(file => processFile(file));
16
+ const generate = async () => {
17
+ const { globby } = await import("globby");
19
18
 
20
- // Fiori
21
- glob.sync(path.join(__dirname, "../../../fiori/src/themes/**/*.css")).forEach(file => processFile(file));
19
+ const mainFiles = await globby(path.join(__dirname, "../../../main/src/themes/**/*.css"));
20
+ const fioriFiles = await globby(path.join(__dirname, "../../../fiori/src/themes/**/*.css"));
21
+ await Promise.all([...mainFiles.map(processFile), ...fioriFiles.map(processFile)]);
22
22
 
23
- const collator = new Intl.Collator(undefined, {numeric: true, sensitivity: 'base'});
24
- const result = Array.from(vars).sort(collator.compare); // natural sort
23
+ const collator = new Intl.Collator(undefined, {numeric: true, sensitivity: 'base'});
24
+ const result = Array.from(vars).sort(collator.compare); // natural sort
25
25
 
26
- fs.writeFileSync(path.join(__dirname, "../../css-vars-usage.json"), beautify(result, null, 2, 100));
27
- console.log("CSS Vars usage report generated.");
26
+ return fs.writeFile(path.join(__dirname, "../../css-vars-usage.json"), beautify(result, null, 2, 100));
27
+ }
28
+
29
+ generate().then(() => {
30
+ console.log("CSS Vars usage report generated.");
31
+ });
@@ -15,15 +15,11 @@ allThemes.forEach(theme => {
15
15
  buildThemesCommands[`copy_${theme}_bundle`] = `copy-and-watch "src/themes/${theme}/parameters-bundle.css" dist/themes/${theme}/`;
16
16
  });
17
17
 
18
- const generateHash = resolve.sync("@ui5/webcomponents-tools/lib/hash/generate.js");
19
- const hashIsUpToDate = resolve.sync("@ui5/webcomponents-tools/lib/hash/upToDate.js");
20
- const UP_TO_DATE = `node "${hashIsUpToDate}" dist/ hash.txt && echo "Up to date."`;
21
-
22
18
  module.exports = {
23
19
  scripts: {
24
20
  clean: "rimraf dist",
25
21
  build: {
26
- default: `${UP_TO_DATE} || nps clean build.src build.themes build.postcss build.jsonImports generateReport hash`,
22
+ default: `nps clean build.src build.themes build.postcss build.jsonImports generateReport`,
27
23
  src: `copy-and-watch "src/**/*.js" dist/`,
28
24
  themes: {
29
25
  default: `nps build.themes.prepare ${buildThemesCommandsNames}`,
@@ -33,6 +29,5 @@ module.exports = {
33
29
  jsonImports: `node "${jsonImportsScript}" dist/generated/assets/themes dist/generated/json-imports`,
34
30
  },
35
31
  generateReport: `node "${generateReportScript}"`,
36
- hash: `node ${generateHash} dist/ hash.txt`,
37
32
  },
38
33
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/webcomponents-theming",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "description": "UI5 Web Components: webcomponents.theming",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -20,7 +20,6 @@
20
20
  "build": "nps build",
21
21
  "start": "nps start",
22
22
  "verify": "node ./lib/verify-vars/index.js",
23
- "hash": "nps hash",
24
23
  "prepublishOnly": "npm run clean && npm run build"
25
24
  },
26
25
  "repository": {
@@ -30,13 +29,13 @@
30
29
  },
31
30
  "dependencies": {
32
31
  "@sap-theming/theming-base-content": "11.1.38",
33
- "@ui5/webcomponents-base": "1.3.1"
32
+ "@ui5/webcomponents-base": "1.4.0"
34
33
  },
35
34
  "devDependencies": {
36
- "@ui5/webcomponents-tools": "1.3.1",
37
- "chromedriver": "100.0.0",
35
+ "@ui5/webcomponents-tools": "1.4.0",
36
+ "chromedriver": "101.0.0",
38
37
  "cssnano": "^4.1.11",
39
- "glob": "^7.1.6",
38
+ "globby": "^13.1.1",
40
39
  "json-beautify": "^1.1.1",
41
40
  "nps": "^5.10.0",
42
41
  "postcss": "^8.4.5",
package/hash.txt DELETED
@@ -1 +0,0 @@
1
- jTxjP4q8ZYzq4ZcbwLrh2rt5ZuI=