@ui5/webcomponents-base 1.2.1 → 1.2.2

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/hash.txt CHANGED
@@ -1 +1 @@
1
- wkzVAlQ/fYfPNBufpuaT/G77X18=
1
+ 46lbK6+vsQuteRCCbgMD8Xa14pY=
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/webcomponents-base",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "UI5 Web Components: webcomponents.base",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -37,8 +37,8 @@
37
37
  "devDependencies": {
38
38
  "@buxlabs/amd-to-es6": "0.16.1",
39
39
  "@openui5/sap.ui.core": "1.94.0",
40
- "@ui5/webcomponents-tools": "1.2.1",
41
- "chromedriver": "98.0.0",
40
+ "@ui5/webcomponents-tools": "1.2.2",
41
+ "chromedriver": "99.0.0",
42
42
  "clean-css": "^5.2.2",
43
43
  "copy-and-watch": "^0.1.5",
44
44
  "eslint": "^7.22.0",
@@ -1,6 +1,6 @@
1
1
  import getSharedResource from "../getSharedResource.js";
2
2
  import IconCollectionsAlias from "../assets-meta/IconCollectionsAlias.js";
3
- import { isTheme } from "../config/Theme.js";
3
+ import { isThemeFamily } from "../config/Theme.js";
4
4
 
5
5
  const loaders = new Map();
6
6
  const registry = getSharedResource("SVGIcons.registry", new Map());
@@ -118,7 +118,7 @@ const _getRegisteredNames = async () => {
118
118
  };
119
119
 
120
120
  const _getDefaultCollection = () => {
121
- return isTheme("sap_horizon") ? "SAP-icons-v5" : "SAP-icons";
121
+ return isThemeFamily("sap_horizon") ? "SAP-icons-v5" : "SAP-icons";
122
122
  };
123
123
 
124
124
  const _normalizeCollection = collectionName => {
@@ -13,7 +13,6 @@ const M_ISO639_OLD_TO_NEW = {
13
13
  "iw": "he",
14
14
  "ji": "yi",
15
15
  "in": "id",
16
- "sh": "sr",
17
16
  };
18
17
 
19
18
  const DEV_MODE = false;
@@ -48,6 +47,12 @@ const calcLocale = (language, region, script) => {
48
47
  }
49
48
  }
50
49
 
50
+ // Special case 3: for Serbian, there are cyrillic and latin scripts, "sh" and "sr-latn" map to "latin", "sr" maps to cyrillic.
51
+ if (language === "sh" || (language === "sr" && script === "Latn")) {
52
+ language = "sr";
53
+ region = "Latn";
54
+ }
55
+
51
56
  // try language + region
52
57
  let localeId = `${language}_${region}`;
53
58
  if (SUPPORTED_LOCALES.includes(localeId)) {
@@ -35,8 +35,19 @@ const isTheme = _theme => {
35
35
  return currentTheme === _theme || currentTheme === `${_theme}_exp`;
36
36
  };
37
37
 
38
+ /**
39
+ * Returns if the current theme is part of given theme family
40
+ * @private
41
+ * @param {String} the theme family
42
+ * @returns {boolean}
43
+ */
44
+ const isThemeFamily = _theme => {
45
+ return getTheme().startsWith(_theme);
46
+ };
47
+
38
48
  export {
39
49
  getTheme,
40
50
  setTheme,
41
51
  isTheme,
52
+ isThemeFamily,
42
53
  };
@@ -35,6 +35,36 @@
35
35
  url(https://ui5.sap.com/sdk/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Bold-full.woff?ui5-webcomponents) format("woff");
36
36
  }
37
37
 
38
+ @font-face {
39
+ font-family: '72-Bold';
40
+ font-style: normal;
41
+ src: local('72-Bold'),
42
+ url(https://ui5.sap.com/sdk/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Bold.woff2?ui5-webcomponents) format("woff2"),
43
+ url(https://ui5.sap.com/sdk/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Bold.woff?ui5-webcomponents) format("woff");
44
+ }
45
+
46
+ @font-face {
47
+ font-family: '72-Boldfull';
48
+ font-style: normal;
49
+ src: url(https://ui5.sap.com/sdk/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Bold-full.woff2?ui5-webcomponents) format("woff2"),
50
+ url(https://ui5.sap.com/sdk/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Bold-full.woff?ui5-webcomponents) format("woff");
51
+ }
52
+
53
+ @font-face {
54
+ font-family: '72-Light';
55
+ font-style: normal;
56
+ src: local('72-Light'),
57
+ url(https://ui5.sap.com/sdk/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Light.woff2?ui5-webcomponents) format("woff2"),
58
+ url(https://ui5.sap.com/sdk/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Light.woff?ui5-webcomponents) format("woff");
59
+ }
60
+
61
+ @font-face {
62
+ font-family: '72-Lightfull';
63
+ font-style: normal;
64
+ src: url(https://ui5.sap.com/sdk/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Light-full.woff2?ui5-webcomponents) format("woff2"),
65
+ url(https://ui5.sap.com/sdk/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Light-full.woff?ui5-webcomponents) format("woff");
66
+ }
67
+
38
68
  @font-face {
39
69
  font-family: "72Black";
40
70
  font-style: bold;