@rijkshuisstijl-community/components-angular 1.2.0 → 2.0.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.
Files changed (27) hide show
  1. package/README.md +51 -17
  2. package/dist/README.md +51 -17
  3. package/dist/fesm2022/rijkshuisstijl-community-components-angular.mjs +44 -246
  4. package/dist/fesm2022/rijkshuisstijl-community-components-angular.mjs.map +1 -1
  5. package/dist/form-field-text-input/form-field-text-input.component.d.ts +10 -1
  6. package/dist/icon/icon.component.d.ts +1 -6
  7. package/dist/link/link.component.d.ts +3 -1
  8. package/dist/public-api.d.ts +1 -1
  9. package/dist/text-input/text-input.component.d.ts +10 -1
  10. package/package.json +2 -2
  11. package/dist/icon/RHCIconIDs.d.ts +0 -2
  12. package/dist/icon/dutch-map-icon/dutch-map-icon.component.d.ts +0 -5
  13. package/dist/icon/flag-icons/bg-flag/bg-flag.component.d.ts +0 -5
  14. package/dist/icon/flag-icons/de-flag/de-flag.component.d.ts +0 -5
  15. package/dist/icon/flag-icons/es-flag/es-flag.component.d.ts +0 -5
  16. package/dist/icon/flag-icons/fr-flag/fr-flag.component.d.ts +0 -5
  17. package/dist/icon/flag-icons/gr-flag/gr-flag.component.d.ts +0 -5
  18. package/dist/icon/flag-icons/hu-flag/hu-flag.component.d.ts +0 -5
  19. package/dist/icon/flag-icons/it-flag/it-flag.component.d.ts +0 -5
  20. package/dist/icon/flag-icons/lv-flag/lv-flag.component.d.ts +0 -5
  21. package/dist/icon/flag-icons/nl-flag/nl-flag.component.d.ts +0 -5
  22. package/dist/icon/flag-icons/pl-flag/pl-flag.component.d.ts +0 -5
  23. package/dist/icon/flag-icons/pt-flag/pt-flag.component.d.ts +0 -5
  24. package/dist/icon/flag-icons/ro-flag/ro-flag.component.d.ts +0 -5
  25. package/dist/icon/flag-icons/sk-flag/sk-flag.component.d.ts +0 -5
  26. package/dist/icon/flag-icons/uk-flag/uk-flag.component.d.ts +0 -5
  27. package/dist/icon/public-api.d.ts +0 -16
package/README.md CHANGED
@@ -11,55 +11,89 @@ Deze package is onderdeel van het [Rijkshuisstijl Community](../../README.md) pr
11
11
 
12
12
  ## Aan de slag met Angular-componenten
13
13
 
14
- Om de Angular-componenten van de Rijkshuisstijl-community te gebruiken, installeer je het [components-angular npm package](https://www.npmjs.com/package/@rijkshuisstijl-community/components-angular).
14
+ Om de Angular-componenten van de Rijkshuisstijl Community te gebruiken, installeer je het [components-angular npm package](https://www.npmjs.com/package/@rijkshuisstijl-community/components-angular).
15
+
16
+ De Angular-componenten hebben geen eigen styling. Om de Rijkshuisstijl aan je project toe te voegen, installeer je het [design-tokens npm package](https://www.npmjs.com/package/@rijkshuisstijl-community/design-tokens) en [component-css npm package](https://www.npmjs.com/package/@rijkshuisstijl-community/components-css).
17
+
18
+ > [!NOTE]
19
+ > Let erop dat je zowel `@rijkshuisstijl-community/design-tokens/dist/index.css` als `@rijkshuisstijl-community/components-css/dist/index.css` importeert in je globale `styles.css` of `styles.scss` **en** dat je componenten gebruikt binnen een element met de `rhc-theme` class. Anders zie je de componenten zonder styling.
15
20
 
16
21
  ```bash
17
- npm install --save-dev @rijkshuisstijl-community/components-angular
22
+ npm install --save-dev @rijkshuisstijl-community/components-angular @rijkshuisstijl-community/components-css @rijkshuisstijl-community/design-tokens
18
23
  ```
19
24
 
20
- Dit installeert de Angular-componenten. Om deze componenten te gebruiken, kun je ze importeren in jouw app.
25
+ Dit installeert de Angular-componenten, de design tokens en de styling. Om deze te gebruiken, importeer je de CSS-bestanden in je globale stylesheet en de Angular modules in je app.
26
+
27
+ ```css
28
+ @import '@rijkshuisstijl-community/design-tokens/dist/index.css';
29
+ @import '@rijkshuisstijl-community/components-css/dist/index.css';
30
+ ```
21
31
 
22
32
  ```ts
33
+ import { Component } from '@angular/core';
23
34
  import { ButtonComponent } from '@rijkshuisstijl-community/components-angular';
24
35
 
25
36
  @Component({
26
37
  selector: 'app-root',
27
38
  imports: [ButtonComponent],
28
- templateUrl: './app.component.html',
29
- styleUrl: './app.component.css',
39
+ template: `
40
+ <main class="rhc-theme">
41
+ <button rhc-button [appearance]="'primary-action'" [disabled]="false">hello world</button>
42
+ </main>
43
+ `,
30
44
  })
31
- export class AppComponent {
32
- title = 'angular-test';
45
+ export class App {
46
+ protected title = 'angular-readme';
33
47
  }
34
48
  ```
35
49
 
36
50
  ### Thema toepassen
37
51
 
38
- De Angular-componenten hebben geen eigen styling. Om de Rijkshuisstijl aan je project toe te voegen, installeer je het [design-tokens npm package](https://www.npmjs.com/package/@rijkshuisstijl-community/design-tokens) en het [components-css npm package](https://www.npmjs.com/package/@rijkshuisstijl-community/components-css).
52
+ Voor de themas maken we gebruik van de volgende 2 packages: [design-tokens npm package](https://www.npmjs.com/package/@rijkshuisstijl-community/design-tokens) en [component-css npm package](https://www.npmjs.com/package/@rijkshuisstijl-community/components-css).
39
53
 
40
- ```bash
41
- npm install --save-dev @rijkshuisstijl-community/design-tokens
42
- npm install --save-dev @rijkshuisstijl-community/components-css
43
- ```
54
+ Dit pakket bevat de CSS-variabelen van het design systeem. Importeer het `index.css`-bestand uit de `dist` map van het
55
+ pakket, en omring het deel van je applicatie waar je het thema wilt toepassen met het Rijkshuisstijl-thema met de `rhc-theme` class.
56
+
57
+ #### Thema wijzigen
44
58
 
45
- Deze pakketten bevat de CSS-variabelen van het design systeem en de CSS-classes die de componenten aan de variabelen koppelen. Importeer het `index.css`-bestand uit de `dist` mappen van de pakketten, en omring het deel van je applicatie waar je het thema wilt toepassen met het Rijkshuisstijl-thema: `rhc-theme`.
59
+ Om een ander thema toe te passen moet je het importeren van `import '@rijkshuisstijl-community/design-tokens/dist/{thema}/index.css';` en de class aanpassen naar het desbetreffende thema.
60
+ Zie het volgende voorbeeld om het uitvoerend-groen thema toe te passen:
61
+
62
+ ```css
63
+ @import '@rijkshuisstijl-community/design-tokens/dist/uitvoerend-groen/index.css';
64
+ @import '@rijkshuisstijl-community/components-css/dist/index.css';
65
+ ```
46
66
 
47
67
  ```ts
48
68
  import { Component } from '@angular/core';
49
69
  import { ButtonComponent } from '@rijkshuisstijl-community/components-angular';
50
- import '@rijkshuisstijl-community/design-tokens/dist/index.css'; // design tokens importeren
51
- import '@rijkshuisstijl-community/components-css/dist/index.css'; // css importeren
52
70
 
53
71
  @Component({
54
72
  selector: 'app-root',
55
73
  imports: [ButtonComponent],
56
74
  template: `
57
- <main class="main" class="rhc-theme">
75
+ <main class="uitvoerend-groen">
58
76
  <button rhc-button [appearance]="'primary-action'" [disabled]="false">hello world</button>
59
77
  </main>
60
78
  `,
61
79
  })
62
- export class AppComponent {}
80
+ export class App {
81
+ protected title = 'angular-readme';
82
+ }
63
83
  ```
64
84
 
65
85
  Bekijk de [packages/font/README.md](https://github.com/nl-design-system/rijkshuisstijl-community/blob/main/packages/font/README.md) voor de meerdere manieren om de lettertypen te installeren voor jouw project.
86
+
87
+ ## Development
88
+
89
+ Om de storybook lokaal te runnen, gebruik je:
90
+
91
+ ```bash
92
+ pnpm --filter @rijkshuisstijl-community/storybook-angular storybook
93
+ ```
94
+
95
+ om de storybook te verversen, moet je eerst de storybook server interrumperen en dan het volgende commando draaien:
96
+
97
+ ```bash
98
+ pnpm --filter @rijkshuisstijl-community/components-angular build
99
+ ```
package/dist/README.md CHANGED
@@ -11,55 +11,89 @@ Deze package is onderdeel van het [Rijkshuisstijl Community](../../README.md) pr
11
11
 
12
12
  ## Aan de slag met Angular-componenten
13
13
 
14
- Om de Angular-componenten van de Rijkshuisstijl-community te gebruiken, installeer je het [components-angular npm package](https://www.npmjs.com/package/@rijkshuisstijl-community/components-angular).
14
+ Om de Angular-componenten van de Rijkshuisstijl Community te gebruiken, installeer je het [components-angular npm package](https://www.npmjs.com/package/@rijkshuisstijl-community/components-angular).
15
+
16
+ De Angular-componenten hebben geen eigen styling. Om de Rijkshuisstijl aan je project toe te voegen, installeer je het [design-tokens npm package](https://www.npmjs.com/package/@rijkshuisstijl-community/design-tokens) en [component-css npm package](https://www.npmjs.com/package/@rijkshuisstijl-community/components-css).
17
+
18
+ > [!NOTE]
19
+ > Let erop dat je zowel `@rijkshuisstijl-community/design-tokens/dist/index.css` als `@rijkshuisstijl-community/components-css/dist/index.css` importeert in je globale `styles.css` of `styles.scss` **en** dat je componenten gebruikt binnen een element met de `rhc-theme` class. Anders zie je de componenten zonder styling.
15
20
 
16
21
  ```bash
17
- npm install --save-dev @rijkshuisstijl-community/components-angular
22
+ npm install --save-dev @rijkshuisstijl-community/components-angular @rijkshuisstijl-community/components-css @rijkshuisstijl-community/design-tokens
18
23
  ```
19
24
 
20
- Dit installeert de Angular-componenten. Om deze componenten te gebruiken, kun je ze importeren in jouw app.
25
+ Dit installeert de Angular-componenten, de design tokens en de styling. Om deze te gebruiken, importeer je de CSS-bestanden in je globale stylesheet en de Angular modules in je app.
26
+
27
+ ```css
28
+ @import '@rijkshuisstijl-community/design-tokens/dist/index.css';
29
+ @import '@rijkshuisstijl-community/components-css/dist/index.css';
30
+ ```
21
31
 
22
32
  ```ts
33
+ import { Component } from '@angular/core';
23
34
  import { ButtonComponent } from '@rijkshuisstijl-community/components-angular';
24
35
 
25
36
  @Component({
26
37
  selector: 'app-root',
27
38
  imports: [ButtonComponent],
28
- templateUrl: './app.component.html',
29
- styleUrl: './app.component.css',
39
+ template: `
40
+ <main class="rhc-theme">
41
+ <button rhc-button [appearance]="'primary-action'" [disabled]="false">hello world</button>
42
+ </main>
43
+ `,
30
44
  })
31
- export class AppComponent {
32
- title = 'angular-test';
45
+ export class App {
46
+ protected title = 'angular-readme';
33
47
  }
34
48
  ```
35
49
 
36
50
  ### Thema toepassen
37
51
 
38
- De Angular-componenten hebben geen eigen styling. Om de Rijkshuisstijl aan je project toe te voegen, installeer je het [design-tokens npm package](https://www.npmjs.com/package/@rijkshuisstijl-community/design-tokens) en het [components-css npm package](https://www.npmjs.com/package/@rijkshuisstijl-community/components-css).
52
+ Voor de themas maken we gebruik van de volgende 2 packages: [design-tokens npm package](https://www.npmjs.com/package/@rijkshuisstijl-community/design-tokens) en [component-css npm package](https://www.npmjs.com/package/@rijkshuisstijl-community/components-css).
39
53
 
40
- ```bash
41
- npm install --save-dev @rijkshuisstijl-community/design-tokens
42
- npm install --save-dev @rijkshuisstijl-community/components-css
43
- ```
54
+ Dit pakket bevat de CSS-variabelen van het design systeem. Importeer het `index.css`-bestand uit de `dist` map van het
55
+ pakket, en omring het deel van je applicatie waar je het thema wilt toepassen met het Rijkshuisstijl-thema met de `rhc-theme` class.
56
+
57
+ #### Thema wijzigen
44
58
 
45
- Deze pakketten bevat de CSS-variabelen van het design systeem en de CSS-classes die de componenten aan de variabelen koppelen. Importeer het `index.css`-bestand uit de `dist` mappen van de pakketten, en omring het deel van je applicatie waar je het thema wilt toepassen met het Rijkshuisstijl-thema: `rhc-theme`.
59
+ Om een ander thema toe te passen moet je het importeren van `import '@rijkshuisstijl-community/design-tokens/dist/{thema}/index.css';` en de class aanpassen naar het desbetreffende thema.
60
+ Zie het volgende voorbeeld om het uitvoerend-groen thema toe te passen:
61
+
62
+ ```css
63
+ @import '@rijkshuisstijl-community/design-tokens/dist/uitvoerend-groen/index.css';
64
+ @import '@rijkshuisstijl-community/components-css/dist/index.css';
65
+ ```
46
66
 
47
67
  ```ts
48
68
  import { Component } from '@angular/core';
49
69
  import { ButtonComponent } from '@rijkshuisstijl-community/components-angular';
50
- import '@rijkshuisstijl-community/design-tokens/dist/index.css'; // design tokens importeren
51
- import '@rijkshuisstijl-community/components-css/dist/index.css'; // css importeren
52
70
 
53
71
  @Component({
54
72
  selector: 'app-root',
55
73
  imports: [ButtonComponent],
56
74
  template: `
57
- <main class="main" class="rhc-theme">
75
+ <main class="uitvoerend-groen">
58
76
  <button rhc-button [appearance]="'primary-action'" [disabled]="false">hello world</button>
59
77
  </main>
60
78
  `,
61
79
  })
62
- export class AppComponent {}
80
+ export class App {
81
+ protected title = 'angular-readme';
82
+ }
63
83
  ```
64
84
 
65
85
  Bekijk de [packages/font/README.md](https://github.com/nl-design-system/rijkshuisstijl-community/blob/main/packages/font/README.md) voor de meerdere manieren om de lettertypen te installeren voor jouw project.
86
+
87
+ ## Development
88
+
89
+ Om de storybook lokaal te runnen, gebruik je:
90
+
91
+ ```bash
92
+ pnpm --filter @rijkshuisstijl-community/storybook-angular storybook
93
+ ```
94
+
95
+ om de storybook te verversen, moet je eerst de storybook server interrumperen en dan het volgende commando draaien:
96
+
97
+ ```bash
98
+ pnpm --filter @rijkshuisstijl-community/components-angular build
99
+ ```