@rijkshuisstijl-community/components-angular 1.0.0 → 1.1.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 (90) hide show
  1. package/dist/button/button.component.d.ts +1 -2
  2. package/dist/column-layout/column-layout.component.d.ts +6 -0
  3. package/dist/fesm2022/rijkshuisstijl-community-components-angular.mjs +437 -7
  4. package/dist/fesm2022/rijkshuisstijl-community-components-angular.mjs.map +1 -1
  5. package/dist/figure/figure.component.d.ts +9 -0
  6. package/dist/figure-caption/figure-caption.component.d.ts +5 -0
  7. package/dist/form-field/form-field.component.d.ts +12 -0
  8. package/dist/form-field-description/form-field-description.component.d.ts +9 -0
  9. package/dist/form-field-error-message/form-field-error-message.component.d.ts +5 -0
  10. package/dist/form-field-text-input/form-field-text-input.component.d.ts +37 -0
  11. package/dist/form-label/form-label.component.d.ts +8 -0
  12. package/dist/image/image.component.d.ts +5 -0
  13. package/dist/link-list/link-list.component.d.ts +5 -0
  14. package/dist/link-list-item/link-list-item.component.d.ts +5 -0
  15. package/dist/link-list-link/link-list-link.component.d.ts +6 -0
  16. package/dist/logo/logo.component.d.ts +7 -0
  17. package/dist/navbar/navbar.component.d.ts +6 -0
  18. package/dist/navbar-item/end-item.directive.d.ts +9 -0
  19. package/dist/navbar-item/heading-item.directive.d.ts +6 -0
  20. package/dist/navbar-item/navbar-item.component.d.ts +6 -0
  21. package/dist/public-api.d.ts +20 -0
  22. package/dist/text-input/text-input.component.d.ts +9 -0
  23. package/dist/unordered-list/unordered-list.component.d.ts +6 -0
  24. package/dist/unordered-list-item/unordered-list-item.component.d.ts +5 -0
  25. package/package.json +14 -6
  26. package/.eslintrc.json +0 -5
  27. package/CHANGELOG.md +0 -15
  28. package/angular.json +0 -37
  29. package/jest.config.js +0 -5
  30. package/ng-package.json +0 -7
  31. package/setup-jest.ts +0 -3
  32. package/src/action-group/action-group.component.html +0 -9
  33. package/src/action-group/action-group.component.spec.ts +0 -46
  34. package/src/action-group/action-group.component.ts +0 -10
  35. package/src/button/button.component.html +0 -3
  36. package/src/button/button.component.spec.ts +0 -41
  37. package/src/button/button.component.ts +0 -14
  38. package/src/heading/heading.component.css +0 -1
  39. package/src/heading/heading.component.html +0 -31
  40. package/src/heading/heading.component.spec.ts +0 -54
  41. package/src/heading/heading.component.ts +0 -19
  42. package/src/icon/RHCIconIDs.ts +0 -1182
  43. package/src/icon/dutch-map-icon/dutch-map-icon.component.html +0 -6
  44. package/src/icon/dutch-map-icon/dutch-map-icon.component.ts +0 -8
  45. package/src/icon/flag-icons/bg-flag/bg-flag.component.html +0 -5
  46. package/src/icon/flag-icons/bg-flag/bg-flag.component.ts +0 -8
  47. package/src/icon/flag-icons/de-flag/de-flag.component.html +0 -6
  48. package/src/icon/flag-icons/de-flag/de-flag.component.ts +0 -8
  49. package/src/icon/flag-icons/es-flag/es-flag.component.html +0 -2233
  50. package/src/icon/flag-icons/es-flag/es-flag.component.ts +0 -8
  51. package/src/icon/flag-icons/fr-flag/fr-flag.component.html +0 -5
  52. package/src/icon/flag-icons/fr-flag/fr-flag.component.ts +0 -8
  53. package/src/icon/flag-icons/gr-flag/gr-flag.component.html +0 -4
  54. package/src/icon/flag-icons/gr-flag/gr-flag.component.ts +0 -8
  55. package/src/icon/flag-icons/hu-flag/hu-flag.component.html +0 -5
  56. package/src/icon/flag-icons/hu-flag/hu-flag.component.ts +0 -8
  57. package/src/icon/flag-icons/it-flag/it-flag.component.html +0 -5
  58. package/src/icon/flag-icons/it-flag/it-flag.component.ts +0 -8
  59. package/src/icon/flag-icons/lv-flag/lv-flag.component.html +0 -4
  60. package/src/icon/flag-icons/lv-flag/lv-flag.component.ts +0 -8
  61. package/src/icon/flag-icons/nl-flag/nl-flag.component.html +0 -5
  62. package/src/icon/flag-icons/nl-flag/nl-flag.component.ts +0 -8
  63. package/src/icon/flag-icons/pl-flag/pl-flag.component.html +0 -4
  64. package/src/icon/flag-icons/pl-flag/pl-flag.component.ts +0 -8
  65. package/src/icon/flag-icons/pt-flag/pt-flag.component.html +0 -156
  66. package/src/icon/flag-icons/pt-flag/pt-flag.component.ts +0 -8
  67. package/src/icon/flag-icons/ro-flag/ro-flag.component.html +0 -5
  68. package/src/icon/flag-icons/ro-flag/ro-flag.component.ts +0 -8
  69. package/src/icon/flag-icons/sk-flag/sk-flag.component.html +0 -34
  70. package/src/icon/flag-icons/sk-flag/sk-flag.component.ts +0 -8
  71. package/src/icon/flag-icons/uk-flag/uk-flag.component.html +0 -15
  72. package/src/icon/flag-icons/uk-flag/uk-flag.component.ts +0 -8
  73. package/src/icon/icon.component.css +0 -3
  74. package/src/icon/icon.component.html +0 -6
  75. package/src/icon/icon.component.spec.ts +0 -61
  76. package/src/icon/icon.component.ts +0 -105
  77. package/src/icon/public-api.ts +0 -16
  78. package/src/link/link.component.css +0 -1
  79. package/src/link/link.component.html +0 -3
  80. package/src/link/link.component.spec.ts +0 -33
  81. package/src/link/link.component.ts +0 -11
  82. package/src/paragraph/paragraph.component.css +0 -1
  83. package/src/paragraph/paragraph.component.html +0 -3
  84. package/src/paragraph/paragraph.component.spec.ts +0 -45
  85. package/src/paragraph/paragraph.component.ts +0 -23
  86. package/src/public-api.ts +0 -9
  87. package/tsconfig.json +0 -28
  88. package/tsconfig.lib.json +0 -11
  89. package/tsconfig.lib.prod.json +0 -9
  90. package/tsconfig.spec.json +0 -11
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class FigureComponent {
3
+ borderEndEndRadius?: number;
4
+ borderEndStartRadius?: number;
5
+ borderStartEndRadius?: number;
6
+ borderStartStartRadius?: number;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<FigureComponent, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<FigureComponent, "figure[rhc-figure]", never, { "borderEndEndRadius": { "alias": "borderEndEndRadius"; "required": false; }; "borderEndStartRadius": { "alias": "borderEndStartRadius"; "required": false; }; "borderStartEndRadius": { "alias": "borderStartEndRadius"; "required": false; }; "borderStartStartRadius": { "alias": "borderStartStartRadius"; "required": false; }; }, {}, never, ["*"], true, never>;
9
+ }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class FigureCaptionComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<FigureCaptionComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<FigureCaptionComponent, "figcaption[rhc-figure-caption]", never, {}, {}, never, ["*"], true, never>;
5
+ }
@@ -0,0 +1,12 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class FormFieldComponent {
3
+ type?: 'checkbox' | 'radio' | 'text';
4
+ class?: string;
5
+ invalid?: boolean;
6
+ showInput?: boolean;
7
+ showLabel?: boolean;
8
+ showDescription?: boolean;
9
+ constructor();
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldComponent, never>;
11
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldComponent, "rhc-form-field", never, { "type": { "alias": "type"; "required": false; }; "class": { "alias": "class"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; "showInput": { "alias": "showInput"; "required": false; }; "showLabel": { "alias": "showLabel"; "required": false; }; "showDescription": { "alias": "showDescription"; "required": false; }; }, {}, never, ["[rhc-form-label]", "rhc-form-field-description", "rhc-form-field-error-message", "[rhc-text-input]", "*"], true, never>;
12
+ }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class FormFieldDescriptionComponent {
3
+ invalid?: boolean;
4
+ valid?: boolean;
5
+ warning?: boolean;
6
+ class?: string;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldDescriptionComponent, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldDescriptionComponent, "rhc-form-field-description", never, { "invalid": { "alias": "invalid"; "required": false; }; "valid": { "alias": "valid"; "required": false; }; "warning": { "alias": "warning"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, {}, never, ["*"], true, never>;
9
+ }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class FormFieldErrorMessageComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldErrorMessageComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldErrorMessageComponent, "rhc-form-field-error-message", never, {}, {}, never, ["*"], true, never>;
5
+ }
@@ -0,0 +1,37 @@
1
+ import { ControlValueAccessor } from '@angular/forms';
2
+ import * as i0 from "@angular/core";
3
+ export type TextInputTypes = 'date' | 'datetime-local' | 'email' | 'month' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'time' | 'url' | 'week';
4
+ export declare class FormFieldTextInputComponent implements ControlValueAccessor {
5
+ invalid?: boolean;
6
+ showDescription?: boolean;
7
+ label?: string;
8
+ errorMessage?: string;
9
+ description?: string;
10
+ status?: string;
11
+ required?: boolean;
12
+ readonly?: boolean;
13
+ dir?: 'auto' | 'ltr' | 'rtl';
14
+ name?: string;
15
+ autocomplete?: string;
16
+ placeholder?: string;
17
+ size?: number;
18
+ minLength?: number;
19
+ maxLength?: number;
20
+ min?: number;
21
+ max?: number;
22
+ step?: number;
23
+ type?: TextInputTypes;
24
+ inputId: string;
25
+ value: string;
26
+ disabled: boolean;
27
+ private onChange;
28
+ private onTouched;
29
+ onValueChange(event: Event): void;
30
+ markAsTouched(): void;
31
+ writeValue(value: string): void;
32
+ registerOnChange(fn: (value: string) => void): void;
33
+ registerOnTouched(fn: () => void): void;
34
+ setDisabledState(isDisabled: boolean): void;
35
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldTextInputComponent, never>;
36
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldTextInputComponent, "rhc-form-field-text-input", never, { "invalid": { "alias": "invalid"; "required": false; }; "showDescription": { "alias": "showDescription"; "required": false; }; "label": { "alias": "label"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "description": { "alias": "description"; "required": false; }; "status": { "alias": "status"; "required": false; }; "required": { "alias": "required"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "dir": { "alias": "dir"; "required": false; }; "name": { "alias": "name"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "size": { "alias": "size"; "required": false; }; "minLength": { "alias": "minLength"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "step": { "alias": "step"; "required": false; }; "type": { "alias": "type"; "required": false; }; "inputId": { "alias": "inputId"; "required": true; }; }, {}, never, never, true, never>;
37
+ }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class FormLabelComponent {
3
+ disabled?: boolean;
4
+ checked?: boolean;
5
+ type?: 'checkbox' | 'radio';
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormLabelComponent, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormLabelComponent, "label[rhc-form-label]", never, { "disabled": { "alias": "disabled"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "type": { "alias": "type"; "required": false; }; }, {}, never, ["*"], true, never>;
8
+ }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class ImageComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<ImageComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<ImageComponent, "img[rhc-image]", never, {}, {}, never, ["*"], true, never>;
5
+ }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class LinkListComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<LinkListComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<LinkListComponent, "rhc-link-list", never, {}, {}, never, ["*"], true, never>;
5
+ }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class LinkListItemComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<LinkListItemComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<LinkListItemComponent, "li[rhc-link-list-item]", never, {}, {}, never, ["*"], true, never>;
5
+ }
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class LinkListLinkComponent {
3
+ href: string;
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<LinkListLinkComponent, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<LinkListLinkComponent, "a[rhc-link-list-link]", never, { "href": { "alias": "href"; "required": true; }; }, {}, never, ["[icon]", "*"], true, never>;
6
+ }
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class LogoComponent {
3
+ organisation: string;
4
+ subtitle?: string | null;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<LogoComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<LogoComponent, "figure[rhc-logo]", never, { "organisation": { "alias": "organisation"; "required": true; }; "subtitle": { "alias": "subtitle"; "required": false; }; }, {}, never, ["*"], true, never>;
7
+ }
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class NavbarComponent {
3
+ showEndItems?: boolean;
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<NavbarComponent, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<NavbarComponent, "rhc-navbar", never, { "showEndItems": { "alias": "showEndItems"; "required": false; }; }, {}, never, ["[rhc-navbar-item][rhcHeadingItem]", "[rhc-navbar-item]:not([rhcEndItem])", "[rhc-navbar-item][rhcEndItem]", "*"], true, never>;
6
+ }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ /**
3
+ * Deze directive wordt gebruikt als "marker". Hiermee kunnen <li>'s gemarkeerd worden als endItem.
4
+ * Een endItem wordt aan het einde van de navbar geplaatst.
5
+ */
6
+ export declare class EndItemDirective {
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<EndItemDirective, never>;
8
+ static ɵdir: i0.ɵɵDirectiveDeclaration<EndItemDirective, "[rhcEndItem]", never, {}, {}, never, never, true, never>;
9
+ }
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class HeadingItemDirective {
3
+ className: string;
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<HeadingItemDirective, never>;
5
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HeadingItemDirective, "[rhcHeadingItem]", never, {}, {}, never, never, true, never>;
6
+ }
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class NavbarItemComponent {
3
+ href: string;
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<NavbarItemComponent, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<NavbarItemComponent, "li[rhc-navbar-item]", never, { "href": { "alias": "href"; "required": true; }; }, {}, never, ["[icon]", "*"], true, never>;
6
+ }
@@ -3,4 +3,24 @@ export * from './paragraph/paragraph.component';
3
3
  export * from './link/link.component';
4
4
  export * from './button/button.component';
5
5
  export * from './action-group/action-group.component';
6
+ export * from './image/image.component';
7
+ export * from './figure/figure.component';
8
+ export * from './figure-caption/figure-caption.component';
6
9
  export * from './icon/public-api';
10
+ export * from './unordered-list/unordered-list.component';
11
+ export * from './unordered-list-item/unordered-list-item.component';
12
+ export * from './column-layout/column-layout.component';
13
+ export * from './logo/logo.component';
14
+ export * from './form-field/form-field.component';
15
+ export * from './form-field-description/form-field-description.component';
16
+ export * from './form-field-error-message/form-field-error-message.component';
17
+ export * from './form-field-text-input/form-field-text-input.component';
18
+ export * from './form-label/form-label.component';
19
+ export * from './text-input/text-input.component';
20
+ export * from './link-list-link/link-list-link.component';
21
+ export * from './link-list/link-list.component';
22
+ export * from './link-list-item/link-list-item.component';
23
+ export * from './navbar/navbar.component';
24
+ export * from './navbar-item/navbar-item.component';
25
+ export * from './navbar-item/heading-item.directive';
26
+ export * from './navbar-item/end-item.directive';
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class TextInputComponent {
3
+ disabled?: boolean | undefined;
4
+ invalid?: boolean | undefined;
5
+ required?: boolean | undefined;
6
+ readonly?: boolean | undefined;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<TextInputComponent, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<TextInputComponent, "input[rhc-text-input]", never, { "disabled": { "alias": "disabled"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; "required": { "alias": "required"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; }, {}, never, ["*"], true, never>;
9
+ }
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class UnorderedListComponent {
3
+ nested?: boolean;
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<UnorderedListComponent, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<UnorderedListComponent, "ul[rhc-unordered-list]", never, { "nested": { "alias": "nested"; "required": false; }; }, {}, never, ["*"], true, never>;
6
+ }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class UnorderedListItemComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<UnorderedListItemComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<UnorderedListItemComponent, "li[rhc-unordered-list-item]", never, {}, {}, never, ["*"], true, never>;
5
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rijkshuisstijl-community/components-angular",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "author": "Community for NL Design System",
5
5
  "description": "Angular component library for the Rijkshuisstijl Community repository, based on the NL Design System architecture",
6
6
  "license": "EUPL-1.2",
@@ -19,9 +19,10 @@
19
19
  "directory": "packages/components-angular"
20
20
  },
21
21
  "dependencies": {
22
- "tslib": "2.3.0"
22
+ "tslib": "2.3.0",
23
+ "angular-tabler-icons": "3.26.0"
23
24
  },
24
- "devDependencies": {
25
+ "peerDependencies": {
25
26
  "@angular-devkit/build-angular": "19.2.0",
26
27
  "@angular/cli": "19.2.3",
27
28
  "@angular/common": "19.2.0",
@@ -31,22 +32,29 @@
31
32
  "@angular/forms": "19.2.0",
32
33
  "@angular/platform-browser": "19.2.0",
33
34
  "@angular/platform-browser-dynamic": "19.2.0",
34
- "@angular/router": "19.2.0",
35
+ "@angular/router": "19.2.0"
36
+ },
37
+ "devDependencies": {
35
38
  "@nl-design-system-candidate/heading-css": "1.0.0",
36
39
  "@nl-design-system-candidate/link-css": "1.0.1",
37
40
  "@nl-design-system-candidate/paragraph-css": "2.0.1",
38
41
  "@testing-library/jest-dom": "5.17.0",
39
42
  "@types/jest": "29.5.14",
40
43
  "@types/testing-library__jest-dom": "5.14.9",
41
- "angular-tabler-icons": "3.26.0",
42
44
  "jest": "29.7.0",
43
45
  "jest-preset-angular": "14.5.4",
44
46
  "ng-packagr": "19.2.0",
45
47
  "rxjs": "7.8.0",
46
48
  "typescript": "5.7.2",
47
49
  "zone.js": "0.15.0",
48
- "@rijkshuisstijl-community/components-css": "1.1.0"
50
+ "@rijkshuisstijl-community/components-css": "1.2.0"
49
51
  },
52
+ "files": [
53
+ "dist/"
54
+ ],
55
+ "main": "./dist/fesm2022/rijkshuisstijl-community-components-angular.mjs",
56
+ "module": "./dist/fesm2022/rijkshuisstijl-community-components-angular.mjs",
57
+ "types": "./dist/index.d.ts",
50
58
  "scripts": {
51
59
  "ng": "ng",
52
60
  "build": "ng build",
package/.eslintrc.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "env": {
3
- "jest": true
4
- }
5
- }
package/CHANGELOG.md DELETED
@@ -1,15 +0,0 @@
1
- # @rijkshuisstijl-community/components-angular
2
-
3
- ## 1.0.0
4
-
5
- ### Major Changes
6
-
7
- - 6deb00e: Initial release
8
-
9
- ### Minor Changes
10
-
11
- - 5d9ff09: Added paragraph component
12
- - d6ef9eb: Added Link component
13
- - ffb7e8e: Added Angular Button component and installed the icons package
14
- - a961845: Added action-group Angular component
15
- - d369cf5: Added icon components in Angular
package/angular.json DELETED
@@ -1,37 +0,0 @@
1
- {
2
- "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3
- "version": 1,
4
- "newProjectRoot": "projects",
5
- "projects": {
6
- "components-angular": {
7
- "projectType": "library",
8
- "root": "",
9
- "sourceRoot": "/src",
10
- "prefix": "lib",
11
- "architect": {
12
- "build": {
13
- "builder": "@angular-devkit/build-angular:ng-packagr",
14
- "options": {
15
- "project": "./ng-package.json"
16
- },
17
- "configurations": {
18
- "production": {
19
- "tsConfig": "./tsconfig.lib.prod.json"
20
- },
21
- "development": {
22
- "tsConfig": "./tsconfig.lib.json"
23
- }
24
- },
25
- "defaultConfiguration": "production"
26
- },
27
- "test": {
28
- "builder": "@angular-devkit/build-angular:karma",
29
- "options": {
30
- "tsConfig": "./tsconfig.spec.json",
31
- "polyfills": ["zone.js", "zone.js/testing"]
32
- }
33
- }
34
- }
35
- }
36
- }
37
- }
package/jest.config.js DELETED
@@ -1,5 +0,0 @@
1
- export default {
2
- preset: 'jest-preset-angular',
3
- setupFilesAfterEnv: ['<rootDir>/setup-jest.ts'],
4
- globalSetup: 'jest-preset-angular/global-setup',
5
- };
package/ng-package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "$schema": "./node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "dist",
4
- "lib": {
5
- "entryFile": "./src/public-api.ts"
6
- }
7
- }
package/setup-jest.ts DELETED
@@ -1,3 +0,0 @@
1
- import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone';
2
- setupZoneTestEnv();
3
- import '@testing-library/jest-dom';
@@ -1,9 +0,0 @@
1
- <div
2
- [class]="{
3
- 'utrecht-button-group': true,
4
- 'utrecht-button-group--column': direction === 'column',
5
- 'utrecht-button-group--row': direction === 'row',
6
- }"
7
- >
8
- <ng-content />
9
- </div>
@@ -1,46 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
- import { By } from '@angular/platform-browser';
3
- import { ActionGroupComponent } from './action-group.component';
4
-
5
- describe('ActionGroupComponent', () => {
6
- let component: ActionGroupComponent;
7
- let fixture: ComponentFixture<ActionGroupComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- imports: [ActionGroupComponent],
12
- }).compileComponents();
13
-
14
- fixture = TestBed.createComponent(ActionGroupComponent);
15
- component = fixture.componentInstance;
16
- fixture.detectChanges();
17
- });
18
-
19
- it('should create', () => {
20
- expect(component).toBeTruthy();
21
- });
22
-
23
- it('should have "utrecht-button-group--row" class by default', () => {
24
- const divEl = fixture.debugElement.query(By.css('div')).nativeElement;
25
- expect(divEl.classList).toContain('utrecht-button-group--row');
26
- expect(divEl.classList).not.toContain('utrecht-button-group--column');
27
- });
28
-
29
- it('should apply "column" direction class when input is column', () => {
30
- component.direction = 'column';
31
- fixture.detectChanges();
32
-
33
- const divEl = fixture.debugElement.query(By.css('div')).nativeElement;
34
- expect(divEl.classList).toContain('utrecht-button-group--column');
35
- expect(divEl.classList).not.toContain('utrecht-button-group--row');
36
- });
37
-
38
- it('should apply "row" direction class when input is row', () => {
39
- component.direction = 'row';
40
- fixture.detectChanges();
41
-
42
- const divEl = fixture.debugElement.query(By.css('div')).nativeElement;
43
- expect(divEl.classList).toContain('utrecht-button-group--row');
44
- expect(divEl.classList).not.toContain('utrecht-button-group--column');
45
- });
46
- });
@@ -1,10 +0,0 @@
1
- import { Component, Input } from '@angular/core';
2
-
3
- @Component({
4
- selector: 'rhc-action-group',
5
- imports: [],
6
- templateUrl: './action-group.component.html',
7
- })
8
- export class ActionGroupComponent {
9
- @Input() direction: 'column' | 'row' = 'row';
10
- }
@@ -1,3 +0,0 @@
1
- <button class="{{ computedClasses() }}" [disabled]="disabled">
2
- <ng-content></ng-content>
3
- </button>
@@ -1,41 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
- import { ButtonComponent } from './button.component';
3
-
4
- describe('ButtonComponent', () => {
5
- let component: ButtonComponent;
6
- let fixture: ComponentFixture<ButtonComponent>;
7
-
8
- beforeEach(async () => {
9
- await TestBed.configureTestingModule({
10
- imports: [ButtonComponent],
11
- }).compileComponents();
12
-
13
- fixture = TestBed.createComponent(ButtonComponent);
14
- component = fixture.componentInstance;
15
- fixture.detectChanges();
16
- });
17
-
18
- it('should create', () => {
19
- expect(component).toBeTruthy();
20
- });
21
-
22
- it('should render a native <button>', () => {
23
- const button = fixture.nativeElement.querySelector('button');
24
- expect(button).toBeTruthy();
25
- expect(button.tagName.toLowerCase()).toBe('button');
26
- });
27
-
28
- it('should apply the primary-action class', () => {
29
- component.appearance = 'primary-action';
30
- fixture.detectChanges();
31
- const button = fixture.nativeElement.querySelector('button');
32
- expect(button.classList).toContain('utrecht-button--primary-action');
33
- });
34
-
35
- it('should be disabled when the disabled input is true', () => {
36
- component.disabled = true;
37
- fixture.detectChanges();
38
- const button = fixture.nativeElement.querySelector('button');
39
- expect(button.disabled).toBe(true);
40
- });
41
- });
@@ -1,14 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { Component, Input } from '@angular/core';
3
-
4
- @Component({
5
- selector: 'rhc-button',
6
- imports: [CommonModule],
7
- templateUrl: './button.component.html',
8
- })
9
- export class ButtonComponent {
10
- @Input() appearance?: '' | 'primary-action' | 'secondary-action' | 'subtle' = '';
11
- @Input() disabled?: boolean = false;
12
-
13
- computedClasses = () => `utrecht-button utrecht-button--${this.appearance}`;
14
- }
@@ -1 +0,0 @@
1
- @import "@nl-design-system-candidate/heading-css/heading.css";
@@ -1,31 +0,0 @@
1
- @switch (level) {
2
- @case (1) {
3
- <h1 class="{{ computedClasses() }}">
4
- <ng-container [ngTemplateOutlet]="content"></ng-container>
5
- </h1>
6
- }
7
- @case (2) {
8
- <h2 class="{{ computedClasses() }}">
9
- <ng-container [ngTemplateOutlet]="content"></ng-container>
10
- </h2>
11
- }
12
- @case (3) {
13
- <h3 class="{{ computedClasses() }}">
14
- <ng-container [ngTemplateOutlet]="content"></ng-container>
15
- </h3>
16
- }
17
- @case (4) {
18
- <h4 class="{{ computedClasses() }}">
19
- <ng-container [ngTemplateOutlet]="content"></ng-container>
20
- </h4>
21
- }
22
- @case (5) {
23
- <h5 class="{{ computedClasses() }}">
24
- <ng-container [ngTemplateOutlet]="content"></ng-container>
25
- </h5>
26
- }
27
- }
28
-
29
- <ng-template #content>
30
- <ng-content></ng-content>
31
- </ng-template>
@@ -1,54 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
- import { By } from '@angular/platform-browser';
3
- import { HeadingComponent, HeadingLevel } from './heading.component';
4
-
5
- describe('HeadingComponent', () => {
6
- let component: HeadingComponent;
7
- let fixture: ComponentFixture<HeadingComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- imports: [HeadingComponent],
12
- }).compileComponents();
13
-
14
- fixture = TestBed.createComponent(HeadingComponent);
15
- component = fixture.componentInstance;
16
- fixture.detectChanges();
17
- });
18
-
19
- it('should create', () => {
20
- expect(component).toBeTruthy();
21
- });
22
-
23
- it('should use the correct heading level', () => {
24
- for (let level of [1, 2, 3, 4, 5] as HeadingLevel[]) {
25
- component.level = level;
26
- fixture.detectChanges();
27
- const element = fixture.nativeElement.querySelector(`h${level}`);
28
- expect(element).toBeTruthy();
29
- }
30
- });
31
-
32
- it('should apply the css class according to appearance level', () => {
33
- component.level = 5;
34
- component.appearanceLevel = 2;
35
- fixture.detectChanges();
36
- const element = fixture.debugElement.query(By.css('.nl-heading--level-2'));
37
- expect(element).toBeTruthy();
38
- });
39
-
40
- it('should contain the nl-heading class', () => {
41
- component.level = 3;
42
- fixture.detectChanges();
43
- const element = fixture.debugElement.query(By.css('.nl-heading'));
44
- expect(element).toBeTruthy();
45
- });
46
-
47
- it('should render rich text content', () => {
48
- component.level = 1;
49
- fixture.detectChanges();
50
- const headingDebugElement = fixture.debugElement.query(By.css('.nl-heading--level-1'));
51
- headingDebugElement.nativeElement.innerHTML = '<strong>Breaking</strong> news';
52
- expect(fixture.nativeElement).toContainHTML('strong');
53
- });
54
- });
@@ -1,19 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { Component, Input } from '@angular/core';
3
-
4
- export const headingLevels = [1, 2, 3, 4, 5] as const;
5
- export type HeadingLevel = (typeof headingLevels)[number];
6
-
7
- @Component({
8
- selector: 'rhc-heading',
9
- imports: [CommonModule],
10
- templateUrl: './heading.component.html',
11
- styleUrl: './heading.component.css',
12
- })
13
- export class HeadingComponent {
14
- @Input({ required: true }) level!: HeadingLevel;
15
- @Input() appearanceLevel?: HeadingLevel;
16
-
17
- stylingLevel = () => this.appearanceLevel ?? this.level;
18
- computedClasses = () => `nl-heading nl-heading--level-${this.stylingLevel()}`;
19
- }