@ui5/webcomponents-theming 1.3.0 → 1.5.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,32 @@
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.5.0](https://github.com/SAP/ui5-webcomponents/compare/v1.4.0...v1.5.0) (2022-07-03)
7
+
8
+
9
+
10
+
11
+
12
+
13
+ # [1.4.0](https://github.com/SAP/ui5-webcomponents/compare/v1.3.1...v1.4.0) (2022-05-25)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * **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)
19
+
20
+
21
+
22
+
23
+
24
+ ## [1.3.1](https://github.com/SAP/ui5-webcomponents/compare/v1.3.0...v1.3.1) (2022-04-27)
25
+
26
+ **Note:** Version bump only for package @ui5/webcomponents-theming
27
+
28
+
29
+
30
+
31
+
6
32
  # [1.3.0](https://github.com/SAP/ui5-webcomponents/compare/v1.2.4...v1.3.0) (2022-04-19)
7
33
 
8
34
 
package/README.md CHANGED
@@ -1,8 +1,7 @@
1
- ![UI5 icon](https://raw.githubusercontent.com/SAP/ui5-webcomponents/master/docs/images/UI5_logo_wide.png)
1
+ ![UI5 icon](https://raw.githubusercontent.com/SAP/ui5-webcomponents/main/docs/images/UI5_logo_wide.png)
2
2
 
3
3
  # UI5 Web Components - Theming
4
4
 
5
- [![Travis CI Build Status](https://travis-ci.org/SAP/ui5-webcomponents.svg?branch=master)](https://travis-ci.org/SAP/ui5-webcomponents)
6
5
  [![npm Package Version](https://badge.fury.io/js/%40ui5%2Fwebcomponents.svg)](https://www.npmjs.com/package/@ui5/webcomponents)
7
6
 
8
7
  Provides common theming assets, used by other UI5 Web Components packages, such as `main` and `fiori`.
@@ -18,16 +17,16 @@ The assets, provided by this package, are additional themes:
18
17
  *Note:* These assets are already imported by the UI5 Web Components packages that need them.
19
18
 
20
19
  ## Resources
21
- - [UI5 Web Components - README.md](https://github.com/SAP/ui5-webcomponents/blob/master/README.md)
20
+ - [UI5 Web Components - README.md](https://github.com/SAP/ui5-webcomponents/blob/main/README.md)
22
21
  - [UI5 Web Components - Home Page](https://sap.github.io/ui5-webcomponents)
23
22
  - [UI5 Web Components - Playground and API Reference](https://sap.github.io/ui5-webcomponents/playground/)
24
23
 
25
24
  ## Support
26
- We welcome all comments, suggestions, questions, and bug reports. Please follow our [Support Guidelines](https://github.com/SAP/ui5-webcomponents/blob/master/SUPPORT.md#-content) on how to report an issue, or chat with us in the `#webcomponents` channel of the [OpenUI5 Community Slack](https://join-ui5-slack.herokuapp.com/).
25
+ We welcome all comments, suggestions, questions, and bug reports. Please follow our [Support Guidelines](https://github.com/SAP/ui5-webcomponents/blob/main/SUPPORT.md#-content) on how to report an issue, or chat with us in the `#webcomponents` channel of the [OpenUI5 Community Slack](https://join-ui5-slack.herokuapp.com/).
27
26
 
28
27
  ## Contribute
29
- Please check our [Contribution Guidelines](https://github.com/SAP/ui5-webcomponents/blob/master/docs/6-contributing/02-conventions-and-guidelines.md).
28
+ Please check our [Contribution Guidelines](https://github.com/SAP/ui5-webcomponents/blob/main/docs/6-contributing/02-conventions-and-guidelines.md).
30
29
 
31
30
  ## License
32
31
  Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
33
- This file is licensed under the Apache Software License, Version 2.0 except as noted otherwise in the [LICENSE](https://github.com/SAP/ui5-webcomponents/blob/master/LICENSE.txt) file.
32
+ This file is licensed under the Apache Software License, Version 2.0 except as noted otherwise in the [LICENSE](https://github.com/SAP/ui5-webcomponents/blob/main/LICENSE.txt) file.
@@ -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",
@@ -274,7 +310,6 @@
274
310
  "--sapLink_Active_Color",
275
311
  "--sapLink_Hover_Color",
276
312
  "--sapLink_SubtleColor",
277
- "--sapLink_Visited_Color",
278
313
  "--sapLinkColor",
279
314
  "--sapList_Active_Background",
280
315
  "--sapList_Active_TextColor",
@@ -304,7 +339,6 @@
304
339
  "--sapNegativeElementColor",
305
340
  "--sapNegativeTextColor",
306
341
  "--sapNeutralBackground",
307
- "--sapNeutralBorderColor",
308
342
  "--sapNeutralColor",
309
343
  "--sapNeutralElementColor",
310
344
  "--sapNeutralTextColor",
@@ -320,6 +354,27 @@
320
354
  "--sapPositiveColor",
321
355
  "--sapPositiveElementColor",
322
356
  "--sapPositiveTextColor",
357
+ "--sapProgress_Background",
358
+ "--sapProgress_CriticalBackground",
359
+ "--sapProgress_FontSize",
360
+ "--sapProgress_InformationBackground",
361
+ "--sapProgress_NegativeBackground",
362
+ "--sapProgress_PositiveBackground",
363
+ "--sapProgress_TextColor",
364
+ "--sapProgress_Value_Background",
365
+ "--sapProgress_Value_BorderColor",
366
+ "--sapProgress_Value_CriticalBackground",
367
+ "--sapProgress_Value_CriticalBorderColor",
368
+ "--sapProgress_Value_CriticalTextColor",
369
+ "--sapProgress_Value_InformationBackground",
370
+ "--sapProgress_Value_InformationBorderColor",
371
+ "--sapProgress_Value_InformationTextColor",
372
+ "--sapProgress_Value_NegativeBackground",
373
+ "--sapProgress_Value_NegativeBorderColor",
374
+ "--sapProgress_Value_NegativeTextColor",
375
+ "--sapProgress_Value_PositiveBackground",
376
+ "--sapProgress_Value_PositiveBorderColor",
377
+ "--sapProgress_Value_PositiveTextColor",
323
378
  "--sapScrollBar_Dimension",
324
379
  "--sapScrollBar_FaceColor",
325
380
  "--sapScrollBar_Hover_FaceColor",
@@ -329,10 +384,21 @@
329
384
  "--sapShell_Active_TextColor",
330
385
  "--sapShell_Background",
331
386
  "--sapShell_Hover_Background",
387
+ "--sapShell_InteractiveBackground",
332
388
  "--sapShell_InteractiveBorderColor",
333
389
  "--sapShell_InteractiveTextColor",
334
390
  "--sapShell_TextColor",
335
391
  "--sapShellColor",
392
+ "--sapSlider_Active_HandleBackground",
393
+ "--sapSlider_Active_RangeHandleBackground",
394
+ "--sapSlider_Background",
395
+ "--sapSlider_HandleBackground",
396
+ "--sapSlider_HandleBorderColor",
397
+ "--sapSlider_Hover_HandleBackground",
398
+ "--sapSlider_Hover_HandleBorderColor",
399
+ "--sapSlider_RangeHandleBackground",
400
+ "--sapSlider_Selected_Background",
401
+ "--sapSlider_Selected_BorderColor",
336
402
  "--sapSuccessBackground",
337
403
  "--sapSuccessBorderColor",
338
404
  "--sapTextColor",
@@ -35,7 +35,7 @@ const loadThemeProperties = async (themeName) => {
35
35
  throw new Error("[themes] Inlined JSON not supported with static imports of assets. Use dynamic imports of assets or configure JSON imports as URLs");
36
36
  }
37
37
  return (await fetch(themeUrlsByName[themeName])).json();
38
- }
38
+ };
39
39
 
40
40
  ["sap_belize", "sap_belize_hcb", "sap_belize_hcw", "sap_fiori_3", "sap_fiori_3_dark", "sap_fiori_3_hcb", "sap_fiori_3_hcw", "sap_horizon", "sap_horizon_dark", "sap_horizon_exp", "sap_horizon_hcb", "sap_horizon_hcw"]
41
41
  .forEach(themeName => registerThemePropertiesLoader("@ui5/webcomponents-theming", themeName, loadThemeProperties));
@@ -16,7 +16,7 @@ const loadThemeProperties = async (themeName) => {
16
16
  case "sap_horizon_hcw": return (await import("../assets/themes/sap_horizon_hcw/parameters-bundle.css.json")).default;
17
17
  default: throw "unknown theme"
18
18
  }
19
- }
19
+ };
20
20
 
21
21
  const loadAndCheck = async (themeName) => {
22
22
  const data = await loadThemeProperties(themeName);
@@ -24,7 +24,7 @@ const loadAndCheck = async (themeName) => {
24
24
  throw new Error(`[themes] Invalid bundling detected - dynamic JSON imports bundled as URLs. Switch to inlining JSON files from the build or use 'import ".../Assets-static.js"'. Check the "Assets" documentation for more information.`);
25
25
  }
26
26
  return data;
27
- }
27
+ };
28
28
 
29
29
  ["sap_belize", "sap_belize_hcb", "sap_belize_hcw", "sap_fiori_3", "sap_fiori_3_dark", "sap_fiori_3_hcb", "sap_fiori_3_hcw", "sap_horizon", "sap_horizon_dark", "sap_horizon_exp", "sap_horizon_hcb", "sap_horizon_hcw"]
30
30
  .forEach(themeName => registerThemePropertiesLoader("@ui5/webcomponents-theming", themeName, loadAndCheck));
@@ -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,20 @@ 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").replace(/\\/g, "/"));
20
+ const fioriFiles = await globby(path.join(__dirname, "../../../fiori/src/themes/**/*.css").replace(/\\/g, "/"));
22
21
 
23
- const collator = new Intl.Collator(undefined, {numeric: true, sensitivity: 'base'});
24
- const result = Array.from(vars).sort(collator.compare); // natural sort
22
+ await Promise.all([...mainFiles.map(processFile), ...fioriFiles.map(processFile)]);
25
23
 
26
- fs.writeFileSync(path.join(__dirname, "../../css-vars-usage.json"), beautify(result, null, 2, 100));
27
- console.log("CSS Vars usage report generated.");
24
+ const collator = new Intl.Collator(undefined, {numeric: true, sensitivity: 'base'});
25
+ const result = Array.from(vars).sort(collator.compare); // natural sort
26
+
27
+ return fs.writeFile(path.join(__dirname, "../../css-vars-usage.json"), beautify(result, null, 2, 100));
28
+ }
29
+
30
+ generate().then(() => {
31
+ console.log("CSS Vars usage report generated.");
32
+ });
@@ -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.0",
3
+ "version": "1.5.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.0"
32
+ "@ui5/webcomponents-base": "1.5.0"
34
33
  },
35
34
  "devDependencies": {
36
- "@ui5/webcomponents-tools": "1.3.0",
37
- "chromedriver": "100.0.0",
35
+ "@ui5/webcomponents-tools": "1.5.0",
36
+ "chromedriver": "102.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=