@ui5/create-webcomponents-package 0.0.0-81513ce21 → 0.0.0-820a5a869

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,72 @@
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.15.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.15.0-rc.0...v1.15.0-rc.1) (2023-06-15)
7
+
8
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+ # [1.15.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.14.0...v1.15.0-rc.0) (2023-06-08)
19
+
20
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
21
+
22
+
23
+
24
+
25
+
26
+ # [1.14.0](https://github.com/SAP/ui5-webcomponents/compare/v1.14.0-rc.2...v1.14.0) (2023-06-01)
27
+
28
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
29
+
30
+
31
+
32
+
33
+
34
+ # [1.14.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.14.0-rc.1...v1.14.0-rc.2) (2023-06-01)
35
+
36
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
37
+
38
+
39
+
40
+
41
+
42
+ # [1.14.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.14.0-rc.0...v1.14.0-rc.1) (2023-05-25)
43
+
44
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
45
+
46
+
47
+
48
+
49
+
50
+ # [1.14.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.13.2...v1.14.0-rc.0) (2023-05-18)
51
+
52
+
53
+ ### Features
54
+
55
+ * users can provide a JSDoc namespeace when creating a package ([#7034](https://github.com/SAP/ui5-webcomponents/issues/7034)) ([0af8d23](https://github.com/SAP/ui5-webcomponents/commit/0af8d2376e25e5abe6d940c72286ab7c682eea56))
56
+
57
+
58
+
59
+
60
+
61
+ ## [1.13.1](https://github.com/SAP/ui5-webcomponents/compare/v1.13.0-rc.5...v1.13.1) (2023-05-11)
62
+
63
+
64
+ ### Bug Fixes
65
+
66
+ * **create-package:** revert `moduleResolution` setting to `node` ([#7020](https://github.com/SAP/ui5-webcomponents/issues/7020)) ([9fc84e2](https://github.com/SAP/ui5-webcomponents/commit/9fc84e288452616ee72f3a2b6fc31d9752f05f6f))
67
+
68
+
69
+
70
+
71
+
6
72
  # [1.13.0-rc.5](https://github.com/SAP/ui5-webcomponents/compare/v1.13.0-rc.4...v1.13.0-rc.5) (2023-05-11)
7
73
 
8
74
 
package/README.md CHANGED
@@ -18,8 +18,8 @@ Usage:
18
18
 
19
19
  Options:
20
20
  --name <string> - defines the package name
21
- --componentName <string> - defines the component class name that will be created in your new package
22
- --tag <string> - defines the tag name of the sample web component that will be created in your new package. The tag will be derived from the component name if not provided.
21
+ --component-name <string> - defines the component class name that will be created in your new package
22
+ --tag <string> - defines the tag name of the sample web component that will be created in your new package. The tag will be derived from the component name if not provided.
23
23
  --enable-typescript - enables TypeScript support for the package
24
24
  --skip - skips configuration and generates package with a default value for each parameter that wasn't passed
25
25
  ```
@@ -34,6 +34,7 @@ Usage:
34
34
  yarn create @ui5/webcomponents-package [OPTIONS]
35
35
  Options:
36
36
  --name <string> - defines the package name
37
+ --component-name <string> - defines the component class name that will be created in your new package
37
38
  --tag <string> - defines the tag name of the sample web component that will be created in your new package
38
39
  --enable-typescript - enables TypeScript support for the package
39
40
  --skip - skips configuration and generates package with a default value for each parameter that wasn't passed
package/create-package.js CHANGED
@@ -10,19 +10,14 @@ const { hideBin } = require("yargs/helpers");
10
10
 
11
11
  const argv = yargs(hideBin(process.argv)).argv;
12
12
 
13
- const version = JSON.parse(fs.readFileSync(path.join(__dirname, "package.json"))).version;
13
+ const version = JSON.parse(fs.readFileSync(path.join(__dirname, "package.json"))).version; // f.e. 1.15.3
14
+ const versionParts = version.split(".") // f.e. 1, 15, 3
15
+ const effVersion = `^${versionParts[0]}.${versionParts[1]}.0` // f.e. ^1.15.0
14
16
 
15
17
  // from where all the files will be copied
16
18
  const TEMPLATE_DIR = path.join(`${__dirname}`, `template/`);
17
19
 
18
20
  // String utils
19
- const capitalizeFirst = str => str.substr(0,1).toUpperCase() + str.substr(1);
20
- const kebabToCamelCase = string => toCamelCase(string.split("-"));
21
- const toCamelCase = parts => {
22
- return parts.map((string, index) => {
23
- return index === 0 ? string.toLowerCase() : string.charAt(0).toUpperCase() + string.slice(1).toLowerCase();
24
- }).join("");
25
- };
26
21
  const isTSRelatedFile = sourcePath => {
27
22
  return ["Assets.ts", "MyFirstComponent.ts", "tsconfig.json", "global.d.ts"].some(fileName => sourcePath.includes(fileName));
28
23
  };
@@ -32,14 +27,19 @@ const isJSRelatedFile = sourcePath => {
32
27
  const isGitIgnore = sourcePath => {
33
28
  return sourcePath.includes("gitignore");
34
29
  };
30
+ const isLogo = sourcePath => {
31
+ return sourcePath.includes("logo");
32
+ };
35
33
  const isNPMRC = sourcePath => {
36
34
  return sourcePath.includes("npmrc");
37
35
  };
38
36
 
39
37
  // Validation of user input
40
38
  const ComponentNamePattern = /^[A-Z][A-Za-z0-9]+$/;
41
- const isNameValid = name => typeof name === "string" && name.match(/^[a-zA-Z][a-zA-Z0-9\-_]+$/);
39
+ const NamespacePattern = /^[a-z][a-z0-9\.\-]+$/;
40
+ const isPackageNameValid = name => typeof name === "string" && name.match(/^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/);
42
41
  const isComponentNameValid = name => typeof name === "string" && ComponentNamePattern.test(name);
42
+ const isNamespaceValid = name => typeof name === "string" && NamespacePattern.test(name);
43
43
  const isTagValid = tag => typeof tag === "string" && tag.match(/^[a-z0-9]+?-[a-zA-Z0-9\-_]+?[a-z0-9]$/);
44
44
 
45
45
  /**
@@ -74,6 +74,11 @@ const copyFile = (vars, sourcePath, destPath) => {
74
74
  return;
75
75
  }
76
76
 
77
+ if (isLogo(sourcePath)) {
78
+ fs.copyFileSync(sourcePath, destPath);
79
+ return;
80
+ }
81
+
77
82
  let content = fs.readFileSync(sourcePath, { encoding: "UTF-8" });
78
83
  content = replaceVarsInFileContent(vars, content);
79
84
  destPath = replaceVarsInFileName(vars, destPath);
@@ -105,19 +110,20 @@ const copyFiles = (vars, sourcePath, destPath) => {
105
110
  }
106
111
  };
107
112
 
108
- const generateFilesContent = (name, componentName, typescript, skipSubfolder) => {
113
+ const generateFilesContent = (packageName, componentName, namespace, typescript, skipSubfolder) => {
109
114
  const tagName = argv.tag || hyphaneteComponentName(componentName);
110
115
 
111
116
  // All variables that will be replaced in the content of the resources/
112
117
  const vars = {
113
- INIT_PACKAGE_VAR_NAME: name,
118
+ INIT_PACKAGE_VAR_NAMESPACE: namespace, // namespace must be replaced before name
119
+ INIT_PACKAGE_VAR_NAME: packageName,
114
120
  INIT_PACKAGE_VAR_TAG: tagName,
115
121
  INIT_PACKAGE_VAR_CLASS_NAME: componentName,
116
122
  INIT_PACKAGE_VAR_TYPESCRIPT: typescript,
117
123
  };
118
124
 
119
125
  const packageContent = {
120
- name,
126
+ name: packageName,
121
127
  version: "0.0.1",
122
128
  ui5: {
123
129
  webComponentsPackage: true,
@@ -140,11 +146,11 @@ const generateFilesContent = (name, componentName, typescript, skipSubfolder) =>
140
146
  "./*": "./dist/*",
141
147
  },
142
148
  "dependencies": {
143
- "@ui5/webcomponents-base": version,
144
- "@ui5/webcomponents-theming": version,
149
+ "@ui5/webcomponents-base": effVersion,
150
+ "@ui5/webcomponents-theming": effVersion,
145
151
  },
146
152
  "devDependencies": {
147
- "@ui5/webcomponents-tools": version,
153
+ "@ui5/webcomponents-tools": effVersion,
148
154
  "chromedriver": "*",
149
155
  },
150
156
  };
@@ -154,14 +160,16 @@ const generateFilesContent = (name, componentName, typescript, skipSubfolder) =>
154
160
  }
155
161
 
156
162
  // Update package.json
157
- const destDir = skipSubfolder ? path.join("./") : path.join("./", name);
163
+ let destDir = packageName.includes("@") ? packageName.slice(packageName.lastIndexOf("/") + 1) : packageName;
164
+
165
+ destDir = skipSubfolder ? path.join("./") : path.join("./", destDir);
158
166
  mkdirp.sync(destDir);
159
167
  fs.writeFileSync(path.join(destDir, "package.json"), JSON.stringify(packageContent, null, 2));
160
168
  // Copy files
161
169
  copyFiles(vars, TEMPLATE_DIR, destDir);
162
170
 
163
171
  console.log("\nPackage successfully created!\nNext steps:\n");
164
- console.log(`$ cd ${name}`);
172
+ console.log(`$ cd ${destDir}`);
165
173
 
166
174
  let userAgentInfo;
167
175
  try {
@@ -182,7 +190,7 @@ const generateFilesContent = (name, componentName, typescript, skipSubfolder) =>
182
190
  // Main function
183
191
  const createWebcomponentsPackage = async () => {
184
192
  let response;
185
- if (argv.name && !isNameValid(argv.name)) {
193
+ if (argv.name && !isPackageNameValid(argv.name)) {
186
194
  throw new Error("The package name should be a string, starting with letter and containing the following symbols [a-z, A-Z, 0-9].");
187
195
  }
188
196
 
@@ -190,17 +198,22 @@ const createWebcomponentsPackage = async () => {
190
198
  throw new Error("The component name should be a string, starting with a capital letter [A-Z][a-z], for example: Button, MyButton, etc.");
191
199
  }
192
200
 
201
+ if (argv.namespace && !isNamespaceValid(argv.namespace)) {
202
+ throw new Error("The JSDoc namespace must start with a letter and can only contain small-case letters, numbers, dots and dashes.");
203
+ }
204
+
193
205
  if (argv.tag && !isTagValid(argv.tag) ) {
194
206
  throw new Error("The tag should be in kebab-case (f.e my-component) and it can't be a single word.");
195
207
  }
196
208
 
197
- let name = argv.name || "my-package";
209
+ let packageName = argv.name || "my-package";
198
210
  let componentName = argv.componentName || "MyComponent";
211
+ let namespace = argv.namespace || "demo.components";
199
212
  let typescriptSupport = !!argv.enableTypescript;
200
213
  const skipSubfolder = !!argv.skipSubfolder;
201
214
 
202
215
  if (argv.skip) {
203
- return generateFilesContent(name, componentName, typescriptSupport, skipSubfolder);
216
+ return generateFilesContent(packageName, componentName, namespace, typescriptSupport, skipSubfolder);
204
217
  }
205
218
 
206
219
  if (!argv.name) {
@@ -208,9 +221,9 @@ const createWebcomponentsPackage = async () => {
208
221
  type: "text",
209
222
  name: "name",
210
223
  message: "Package name:",
211
- validate: (value) => isNameValid(value) ? true : "Package name should be a string, starting with a letter and containing the following symbols [a-z, A-Z ,0-9, _, -].",
224
+ validate: (value) => isPackageNameValid(value) ? true : "Package name should be a string, starting with a letter and containing the following symbols [a-z, A-Z ,0-9, _, -].",
212
225
  });
213
- name = response.name;
226
+ packageName = response.name;
214
227
  }
215
228
 
216
229
  if (!typescriptSupport) {
@@ -243,7 +256,18 @@ const createWebcomponentsPackage = async () => {
243
256
  componentName = response.componentName;
244
257
  }
245
258
 
246
- return generateFilesContent(name, componentName, typescriptSupport, skipSubfolder);
259
+ if (!argv.namespace) {
260
+ response = await prompts({
261
+ type: "text",
262
+ name: "namespace",
263
+ message: "JSDoc namespace:",
264
+ initial: "demo.components",
265
+ validate: (value) => isNamespaceValid(value) ? true : "The JSDoc namespace must start with a letter and can only contain small-case letters, numbers, dots and dashes.",
266
+ });
267
+ namespace = response.namespace;
268
+ }
269
+
270
+ return generateFilesContent(packageName, componentName, namespace, typescriptSupport, skipSubfolder);
247
271
  };
248
272
 
249
273
  createWebcomponentsPackage();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/create-webcomponents-package",
3
- "version": "0.0.0-81513ce21",
3
+ "version": "0.0.0-820a5a869",
4
4
  "description": "UI5 Web Components: create package",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -1 +1 @@
1
- <div>This is: INIT_PACKAGE_VAR_TAG. {{pleaseWaitText}}</div>
1
+ <div @click="{{onClick}}">{{counterText}} :: {{count}}</div>
@@ -1,6 +1,7 @@
1
1
  import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
2
2
  import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
3
3
  import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
4
+ import Integer from "@ui5/webcomponents-base/dist/types/Integer.js";
4
5
 
5
6
  // Template
6
7
  import INIT_PACKAGE_VAR_CLASS_NAMETemplate from "./generated/templates/INIT_PACKAGE_VAR_CLASS_NAMETemplate.lit.js";
@@ -8,14 +9,24 @@ import INIT_PACKAGE_VAR_CLASS_NAMETemplate from "./generated/templates/INIT_PACK
8
9
  // Styles
9
10
  import INIT_PACKAGE_VAR_CLASS_NAMECss from "./generated/themes/INIT_PACKAGE_VAR_CLASS_NAME.css.js";
10
11
 
11
- import { PLEASE_WAIT } from "./generated/i18n/i18n-defaults.js";
12
+ import { COUNT } from "./generated/i18n/i18n-defaults.js";
12
13
 
13
14
  /**
14
15
  * @public
15
16
  */
16
17
  const metadata = {
17
18
  tag: "INIT_PACKAGE_VAR_TAG",
18
- properties: {
19
+ properties: /** @lends INIT_PACKAGE_VAR_NAMESPACE.INIT_PACKAGE_VAR_CLASS_NAME.prototype */ {
20
+ /**
21
+ * Defines the count of the component.
22
+ * @type { sap.ui.webc.base.types.Integer }
23
+ * @defaultvalue 0
24
+ * @public
25
+ */
26
+ count: {
27
+ validator: Integer,
28
+ defaultValue: 0,
29
+ },
19
30
  },
20
31
  slots: {
21
32
  },
@@ -31,7 +42,7 @@ const metadata = {
31
42
  * The <code>INIT_PACKAGE_VAR_TAG</code> component is a demo component that displays some text.
32
43
  *
33
44
  * @constructor
34
- * @alias demo.components.INIT_PACKAGE_VAR_CLASS_NAME
45
+ * @alias INIT_PACKAGE_VAR_NAMESPACE.INIT_PACKAGE_VAR_CLASS_NAME
35
46
  * @extends sap.ui.webc.base.UI5Element
36
47
  * @tagname INIT_PACKAGE_VAR_TAG
37
48
  * @public
@@ -57,8 +68,12 @@ class INIT_PACKAGE_VAR_CLASS_NAME extends UI5Element {
57
68
  INIT_PACKAGE_VAR_CLASS_NAME.i18nBundle = await getI18nBundle("INIT_PACKAGE_VAR_NAME");
58
69
  }
59
70
 
60
- get pleaseWaitText() {
61
- return INIT_PACKAGE_VAR_CLASS_NAME.i18nBundle.getText(PLEASE_WAIT);
71
+ onClick() {
72
+ this.count++;
73
+ }
74
+
75
+ get counterText() {
76
+ return INIT_PACKAGE_VAR_CLASS_NAME.i18nBundle.getText(COUNT);
62
77
  }
63
78
  }
64
79
 
@@ -1,8 +1,10 @@
1
1
  import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
2
2
  import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
3
+ import property from "@ui5/webcomponents-base/dist/decorators/property.js";
3
4
  import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
4
5
  import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
5
6
  import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
7
+ import Integer from "@ui5/webcomponents-base/dist/types/Integer.js";
6
8
 
7
9
  // Template
8
10
  import INIT_PACKAGE_VAR_CLASS_NAMETemplate from "./generated/templates/INIT_PACKAGE_VAR_CLASS_NAMETemplate.lit.js";
@@ -10,7 +12,7 @@ import INIT_PACKAGE_VAR_CLASS_NAMETemplate from "./generated/templates/INIT_PACK
10
12
  // Styles
11
13
  import INIT_PACKAGE_VAR_CLASS_NAMECss from "./generated/themes/INIT_PACKAGE_VAR_CLASS_NAME.css.js";
12
14
 
13
- import { PLEASE_WAIT } from "./generated/i18n/i18n-defaults.js";
15
+ import { COUNT } from "./generated/i18n/i18n-defaults.js";
14
16
 
15
17
  /**
16
18
  * @class
@@ -20,7 +22,7 @@ import { PLEASE_WAIT } from "./generated/i18n/i18n-defaults.js";
20
22
  * The <code>INIT_PACKAGE_VAR_TAG</code> component is a demo component that displays some text.
21
23
  *
22
24
  * @constructor
23
- * @alias demo.components.INIT_PACKAGE_VAR_CLASS_NAME
25
+ * @alias INIT_PACKAGE_VAR_NAMESPACE.INIT_PACKAGE_VAR_CLASS_NAME
24
26
  * @extends sap.ui.webc.base.UI5Element
25
27
  * @tagname INIT_PACKAGE_VAR_TAG
26
28
  * @public
@@ -38,8 +40,21 @@ class INIT_PACKAGE_VAR_CLASS_NAME extends UI5Element {
38
40
  INIT_PACKAGE_VAR_CLASS_NAME.i18nBundle = await getI18nBundle("INIT_PACKAGE_VAR_NAME");
39
41
  }
40
42
 
41
- get pleaseWaitText() {
42
- return INIT_PACKAGE_VAR_CLASS_NAME.i18nBundle.getText(PLEASE_WAIT);
43
+ /**
44
+ * Defines the component count.
45
+ * @name NIT_PACKAGE_VAR_NAMESPACE.INIT_PACKAGE_VAR_CLASS_NAME.prototype.count
46
+ * @public
47
+ * @type { sap.ui.webc.base.types.Integer }
48
+ */
49
+ @property({ validator: Integer, defaultValue: 0 })
50
+ count!: number;
51
+
52
+ onClick() {
53
+ this.count++;
54
+ }
55
+
56
+ get counterText() {
57
+ return INIT_PACKAGE_VAR_CLASS_NAME.i18nBundle.getText(COUNT);
43
58
  }
44
59
  }
45
60
 
@@ -1,2 +1,3 @@
1
- #please wait text for the sample component
2
- PLEASE_WAIT=wait
1
+ # the "counter" text for the sample component
2
+ COUNT=Count
3
+
@@ -1 +1 @@
1
- PLEASE_WAIT=Bitte warten
1
+ COUNT=Zählung
@@ -1 +1 @@
1
- PLEASE_WAIT=Please wait
1
+ COUNT=Count
@@ -1 +1 @@
1
- PLEASE_WAIT=Espere
1
+ COUNT=Cuenta
@@ -1 +1 @@
1
- PLEASE_WAIT=Patientez.
1
+ COUNT=Comte
@@ -1,11 +1,12 @@
1
1
  :host {
2
- border: 2px solid var(--my-component-border-color);
3
- background-color: var(--sapBackgroundColor);
4
- color: var(--sapTextColor);
5
- display: block;
6
- width: 24rem;
7
- height: 3rem;
8
- text-align: center;
9
- vertical-align: middle;
10
- line-height: 3rem;
2
+ padding: 0 2rem;
3
+ color: var(--sapAvatar_6_TextColor);
4
+ background-color: var(--sapAvatar_6_Background);
5
+ border: 2px solid var(--my-component-border-color);
6
+ border-radius: 0.5rem;
7
+ box-shadow: var(--sapContent_Shadow0);
8
+ text-align: center;
9
+ line-height: 3rem;
10
+ font-size: 1.25rem;
11
+ user-select: none;
11
12
  }
@@ -1,3 +1,3 @@
1
1
  :root {
2
- --my-component-border-color: green;
2
+ --my-component-border-color: blue;
3
3
  }
@@ -1,3 +1,3 @@
1
1
  :root {
2
- --my-component-border-color: blue;
2
+ --my-component-border-color: darkblue;
3
3
  }
@@ -0,0 +1,36 @@
1
+ body {
2
+ color: var(--sapTextColor);
3
+ background-color: var(--sapBackgroundColor);
4
+ font-size: var(--sapFontSize);
5
+ font-family: var(--sapFontFamily);
6
+ }
7
+
8
+ h1 {
9
+ font-size: var(--sapFontHeader2Size);
10
+ margin-bottom: 0.5rem;
11
+ }
12
+
13
+ h2 {
14
+ font-size: var(--sapFontHeader3Size);
15
+ margin-bottom: 0.5rem;
16
+ }
17
+
18
+ .app, .app-first-component, .app-settings, .app-docs {
19
+ display: flex;
20
+ align-items: center;
21
+ justify-content: center;
22
+ flex-direction: column;
23
+ }
24
+
25
+ .app-first-component {
26
+ margin-bottom: 3rem;
27
+ }
28
+
29
+ .app-docs {
30
+ margin-top: 3rem;
31
+ }
32
+
33
+ a {
34
+ margin: 0.25rem;
35
+ color: var(--sapLinkColor);
36
+ }
Binary file
@@ -10,44 +10,48 @@
10
10
 
11
11
  <script data-ui5-config type="application/json">
12
12
  {
13
+ "theme": "sap_horizon_dark",
13
14
  "language": "EN"
14
15
  }
15
16
  </script>
16
-
17
+
18
+ <link rel="stylesheet" type="text/css" href="./css/index.css">
17
19
  <script src="../../bundle.esm.js" type="module"></script>
18
-
19
- <style>
20
- code { color: blue; font-size: small; }
21
- </style>
22
-
23
20
  </head>
24
21
 
25
22
  <body>
26
- <ul>
27
- <li><a href="?sap-ui-theme=sap_fiori_3">Fiori 3</a></li>
28
- <li><a href="?sap-ui-theme=sap_fiori_3_dark">Fiori 3 Dark</a></li>
29
- <li><a href="?sap-ui-theme=sap_fiori_3_hcb">Fiori 3 High Contrast Black</a></li>
30
- <li><a href="?sap-ui-theme=sap_fiori_3_hcw">Fiori 3 High Contrast White</a></li>
31
- <li><a href="?sap-ui-theme=sap_horizon">Horizon</a></li>
32
- <li><a href="?sap-ui-theme=sap_horizon_dark">Horizon Dark</a></li>
33
- <li><a href="?sap-ui-theme=sap_horizon_hcb">Horizon High Contrast Black</a></li>
34
- <li><a href="?sap-ui-theme=sap_horizon_hcw">Horizon High Contrast White</a></li>
35
- </ul>
36
- <br>
37
- <span>or in the browser console, for example:</span>
38
- <code>window['sap-ui-webcomponents-bundle'].configuration.setTheme("sap_horizon_hcb")</code>
39
-
40
- <br><br>
41
-
42
- <a href="?sap-ui-language=en">English</a> |
43
- <a href="?sap-ui-language=de">German</a> |
44
- <a href="?sap-ui-language=es">Spanish</a> |
45
- <a href="?sap-ui-language=fr">French</a>
46
-
47
- <br><br>
48
-
49
- <h1>Test your web components here</h1>
50
- <INIT_PACKAGE_VAR_TAG id="myFirstComponent"></INIT_PACKAGE_VAR_TAG>
23
+ <div class="app">
24
+ <a href="https://sap.github.io/ui5-webcomponents/playground/getting-started" target="_blank"><img src="./img/logo.png" alt="logo"/></a>
25
+
26
+ <div class="app-first-component">
27
+ <h1>Hooray! It's Your First Web Component!</h1>
28
+ <div> <pre>&lt;INIT_PACKAGE_VAR_TAG>&lt;/INIT_PACKAGE_VAR_TAG> </pre></div>
29
+ <INIT_PACKAGE_VAR_TAG id="myFirstComponent"></INIT_PACKAGE_VAR_TAG>
30
+ </div>
31
+
32
+ <div class="app-settings">
33
+
34
+ <h2>Switch themes</h2>
35
+ <div style="display: flex; flex-direction: row;">
36
+ <a class="link" href="?sap-ui-theme=sap_horizon">Horizon</a>
37
+ <a class="link" href="?sap-ui-theme=sap_horizon_dark">Horizon Dark</a>
38
+ <a class="link" href="?sap-ui-theme=sap_horizon_hcb">Horizon High Contrast Black</a>
39
+ <a class="link" href="?sap-ui-theme=sap_horizon_hcw">Horizon High Contrast White</a>
40
+ </div>
41
+
42
+ <h2>Switch language</h2>
43
+ <div>
44
+ <a class="link" href="?sap-ui-language=en">English</a>
45
+ <a class="link" href="?sap-ui-language=de">German</a>
46
+ <a class="link" href="?sap-ui-language=es">Spanish</a>
47
+ <a class="link" href="?sap-ui-language=fr">French</a>
48
+ </div>
49
+ </div>
50
+
51
+ <div class="app-docs">
52
+ <h2>Documentation</h2>
53
+ <a class="link" href="https://sap.github.io/ui5-webcomponents/playground/development">Custom Component Development</a>
54
+ </div>
55
+ </div>
51
56
  </body>
52
-
53
57
  </html>
@@ -6,7 +6,6 @@ describe("INIT_PACKAGE_VAR_TAG rendering", async () => {
6
6
  });
7
7
 
8
8
  it("tests if web component is correctly rendered", async () => {
9
-
10
9
  const innerContent = await browser.$("#myFirstComponent").shadow$("div");
11
10
 
12
11
  assert.ok(innerContent, "content rendered");
@@ -1,3 +0,0 @@
1
- :root {
2
- --my-component-border-color: blue;
3
- }
@@ -1,3 +0,0 @@
1
- :root {
2
- --my-component-border-color: lightblue;
3
- }
@@ -1,3 +0,0 @@
1
- :root {
2
- --my-component-border-color: gray;
3
- }