@c8y/tutorial 1020.7.4 → 1020.10.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/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@c8y/tutorial",
3
- "version": "1020.7.4",
3
+ "version": "1020.10.0",
4
4
  "description": "This package is used to scaffold a tutorial for Cumulocity IoT Web SDK which explains a lot of concepts.",
5
5
  "dependencies": {
6
- "@c8y/style": "1020.7.4",
7
- "@c8y/ngx-components": "1020.7.4",
8
- "@c8y/client": "1020.7.4",
9
- "@c8y/bootstrap": "1020.7.4",
6
+ "@c8y/style": "1020.10.0",
7
+ "@c8y/ngx-components": "1020.10.0",
8
+ "@c8y/client": "1020.10.0",
9
+ "@c8y/bootstrap": "1020.10.0",
10
10
  "@angular/cdk": "^17.3.9",
11
11
  "ngx-bootstrap": "12.0.0",
12
12
  "leaflet": "1.9.4",
13
13
  "rxjs": "^7.4.0"
14
14
  },
15
15
  "devDependencies": {
16
- "@c8y/options": "1020.7.4",
17
- "@c8y/devkit": "1020.7.4"
16
+ "@c8y/options": "1020.10.0",
17
+ "@c8y/devkit": "1020.10.0"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "@angular/common": ">=16 <18"
@@ -1,17 +1,25 @@
1
- :root{
2
- --primary-color:#3bbfce;
3
- --secundary-color:#2b9eab;
4
- --margin:8px;
1
+ /* Overwriting globally defined CSS variables only works with ViewEncapsulation.None enabled. See: Codex > Getting Started > Guides > Components styling */
2
+ :root {
3
+ /* Override globall CSS variable */
4
+ --c8y-brand-primary: red;
5
+ /* Local CSS variables */
6
+ --css-background-color: #e0aaaa;
7
+ --css-border-color: #ddd;
8
+ --css-header-color: #333;
9
+ --css-text-color: #666;
5
10
  }
6
11
 
12
+ /* Also you can use branding vars. Check Codex > UI guidelines > Foundations > Branding for more info */
13
+ .css-example {
14
+ background-color: var(--c8y-brand-primary);
15
+ padding: 15px;
16
+ border: 1px solid var(--css-border-color);
17
+ }
7
18
 
8
- .content-navigation {
9
- border-color: var(--secundary-color);
10
- color: var(--secundary-color);
19
+ .css-example h5 {
20
+ color: var(--css-header-color);
11
21
  }
12
22
 
13
- .border {
14
- padding: 8px;
15
- margin: var(--margin);
16
- border-color: #3bbfce;
23
+ .css-example p {
24
+ color: var(--css-text-color);
17
25
  }
@@ -3,7 +3,11 @@ import { HeaderModule } from '@c8y/ngx-components';
3
3
 
4
4
  @Component({
5
5
  selector: 'tut-cascading-style-sheets-example',
6
- template: `<c8y-title>CSS component styles</c8y-title>`,
6
+ template: `<c8y-title>CSS component styles</c8y-title>
7
+ <div class="css-example">
8
+ <h5>CSS Styles</h5>
9
+ <p>This is styled with plain CSS using CSS variables</p>
10
+ </div>`,
7
11
  styleUrls: ['./cascading-style-sheets-example.component.css'],
8
12
  standalone: true,
9
13
  imports: [HeaderModule]
@@ -1,14 +1,16 @@
1
- @primary-color:#3bbfce;
2
- @secundary-color:#2b9eab;
3
- @margin:8px;
1
+ @background-color: #e6f7ff;
2
+ @border-color: #91d5ff;
4
3
 
5
- .content-navigation {
6
- border-color: @secundary-color;
7
- color: @secundary-color;
8
- }
4
+ .less-example {
5
+ background-color: @background-color;
6
+ padding: 15px;
7
+ border: 1px solid @border-color;
8
+
9
+ h5 {
10
+ color: darken(@border-color, 30%);
11
+ }
9
12
 
10
- .border {
11
- padding: 8px;
12
- margin: @margin;
13
- border-color: #3bbfce;
13
+ p {
14
+ color: darken(@background-color, 50%);
15
+ }
14
16
  }
@@ -3,7 +3,11 @@ import { HeaderModule } from '@c8y/ngx-components';
3
3
 
4
4
  @Component({
5
5
  selector: 'tut-leaner-style-sheets-example',
6
- template: `<c8y-title>LESS component styles</c8y-title>`,
6
+ template: `<c8y-title>LESS component styles</c8y-title>
7
+ <div class="less-example">
8
+ <h5>LESS Styles</h5>
9
+ <p>This is styled with LESS</p>
10
+ </div>`,
7
11
  styleUrls: ['./leaner-style-sheets-example.component.less'],
8
12
  standalone: true,
9
13
  imports: [HeaderModule]
@@ -1,13 +1,16 @@
1
- $primary-color: #3bbfce;
2
- $margin: 16px;
1
+ $background-color: #f6ffed;
2
+ $border-color: #b7eb8f;
3
3
 
4
- .content-navigation {
5
- border-color: $primary-color;
6
- color: darken($primary-color, 10%);
7
- }
4
+ .scss-example {
5
+ background-color: $background-color;
6
+ padding: 15px;
7
+ border: 1px solid $border-color;
8
+
9
+ h5 {
10
+ color: darken($border-color, 30%);
11
+ }
8
12
 
9
- .border {
10
- padding: calc($margin / 2);
11
- margin: calc($margin / 2);
12
- border-color: $primary-color;
13
+ p {
14
+ color: darken($background-color, 50%);
15
+ }
13
16
  }
@@ -3,7 +3,11 @@ import { HeaderModule } from '@c8y/ngx-components';
3
3
 
4
4
  @Component({
5
5
  selector: 'tut-syntactically-awesome-style-sheets-example',
6
- template: `<c8y-title>SCSS component styles</c8y-title>`,
6
+ template: `<c8y-title>SCSS component styles</c8y-title>
7
+ <div class="scss-example">
8
+ <h5>SCSS Styles</h5>
9
+ <p>This is styled with SCSS</p>
10
+ </div>`,
7
11
  styleUrls: ['./syntactically-awesome-style-sheets-example.component.scss'],
8
12
  standalone: true,
9
13
  imports: [HeaderModule]