@ndwnu/design-system 0.0.1-beta.1 → 1.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 (89) hide show
  1. package/README.md +3 -136
  2. package/assets/icons/icons.json +830 -46
  3. package/assets/images/ndw-logo-short.svg +1 -1
  4. package/assets/images/nwb-logo-short.svg +10 -0
  5. package/assets/images/nwb-logo.svg +3 -10
  6. package/components/collapsible/collapsible.animation.d.ts +1 -0
  7. package/components/collapsible/collapsible.component.d.ts +1 -0
  8. package/components/dropdown/dropdown-trigger.directive.d.ts +23 -0
  9. package/components/dropdown/dropdown.component.d.ts +6 -17
  10. package/components/dropdown/index.d.ts +1 -0
  11. package/components/form-field/checkbox/checkbox.component.d.ts +23 -0
  12. package/components/form-field/checkbox/index.d.ts +1 -0
  13. package/components/form-field/checkbox-group/checkbox-group.component.d.ts +5 -0
  14. package/components/form-field/checkbox-group/index.d.ts +1 -0
  15. package/components/form-field/form-field.component.d.ts +12 -8
  16. package/components/form-field/form-field.model.d.ts +1 -0
  17. package/components/form-field/index.d.ts +7 -0
  18. package/components/form-field/radio-button/index.d.ts +1 -0
  19. package/components/form-field/radio-button/radio-button.component.d.ts +22 -0
  20. package/components/form-field/radio-group/index.d.ts +1 -0
  21. package/components/form-field/radio-group/radio-group.component.d.ts +11 -0
  22. package/components/icon/icon.component.d.ts +2 -5
  23. package/components/index.d.ts +4 -4
  24. package/components/main-navigation/main-navigation.component.d.ts +18 -9
  25. package/components/main-navigation-menu/main-navigation-menu.component.d.ts +2 -4
  26. package/components/modal/index.d.ts +1 -0
  27. package/components/modal/modal-trigger.directive.d.ts +20 -0
  28. package/components/pill/index.d.ts +2 -0
  29. package/components/pill/pill.component.d.ts +8 -0
  30. package/components/pill/pill.model.d.ts +8 -0
  31. package/core/styles/ndw-styles.scss +48 -116
  32. package/core/styles/nwb-styles.scss +48 -116
  33. package/esm2022/components/accordion/accordion.component.mjs +1 -1
  34. package/esm2022/components/accordion/accordion.service.mjs +2 -2
  35. package/esm2022/components/badge/badge.component.mjs +3 -3
  36. package/esm2022/components/card/card.component.mjs +3 -3
  37. package/esm2022/components/collapsible/collapsible.animation.mjs +36 -0
  38. package/esm2022/components/collapsible/collapsible.component.mjs +7 -9
  39. package/esm2022/components/dropdown/dropdown-trigger.directive.mjs +99 -0
  40. package/esm2022/components/dropdown/dropdown.component.mjs +10 -65
  41. package/esm2022/components/dropdown/index.mjs +2 -1
  42. package/esm2022/components/form-field/checkbox/checkbox.component.mjs +91 -0
  43. package/esm2022/components/form-field/checkbox/index.mjs +2 -0
  44. package/esm2022/components/form-field/checkbox-group/checkbox-group.component.mjs +11 -0
  45. package/esm2022/components/form-field/checkbox-group/index.mjs +2 -0
  46. package/esm2022/components/form-field/error/error.component.mjs +12 -0
  47. package/esm2022/components/form-field/error/index.mjs +2 -0
  48. package/esm2022/components/form-field/form-field.component.mjs +67 -44
  49. package/esm2022/components/form-field/form-field.model.mjs +2 -1
  50. package/esm2022/components/form-field/index.mjs +8 -1
  51. package/esm2022/components/form-field/info/index.mjs +2 -0
  52. package/esm2022/components/{info → form-field/info}/info.component.mjs +1 -1
  53. package/esm2022/components/form-field/input/index.mjs +3 -0
  54. package/esm2022/components/form-field/input/input.directive.mjs +36 -0
  55. package/esm2022/components/form-field/input/input.model.mjs +13 -0
  56. package/esm2022/components/form-field/radio-button/index.mjs +2 -0
  57. package/esm2022/components/form-field/radio-button/radio-button.component.mjs +81 -0
  58. package/esm2022/components/form-field/radio-group/index.mjs +2 -0
  59. package/esm2022/components/form-field/radio-group/radio-group.component.mjs +34 -0
  60. package/esm2022/components/icon/icon.component.mjs +12 -20
  61. package/esm2022/components/icon/icon.service.mjs +2 -2
  62. package/esm2022/components/index.mjs +5 -5
  63. package/esm2022/components/main-navigation/main-navigation.component.mjs +50 -15
  64. package/esm2022/components/main-navigation-menu/main-navigation-menu.component.mjs +5 -13
  65. package/esm2022/components/modal/index.mjs +2 -0
  66. package/esm2022/components/modal/modal-trigger.directive.mjs +77 -0
  67. package/esm2022/components/pill/index.mjs +3 -0
  68. package/esm2022/components/pill/pill.component.mjs +20 -0
  69. package/esm2022/components/pill/pill.model.mjs +2 -0
  70. package/esm2022/components/tab/tab.component.mjs +2 -2
  71. package/esm2022/components/tab-group/tab-group.component.mjs +3 -3
  72. package/esm2022/components/tooltip/tooltip.component.mjs +3 -3
  73. package/esm2022/components/tooltip/tooltip.directive.mjs +4 -3
  74. package/fesm2022/ndwnu-design-system.mjs +610 -205
  75. package/fesm2022/ndwnu-design-system.mjs.map +1 -1
  76. package/package.json +3 -2
  77. package/esm2022/components/error/error.component.mjs +0 -14
  78. package/esm2022/components/error/index.mjs +0 -2
  79. package/esm2022/components/info/index.mjs +0 -2
  80. package/esm2022/components/input/index.mjs +0 -3
  81. package/esm2022/components/input/input.directive.mjs +0 -36
  82. package/esm2022/components/input/input.model.mjs +0 -13
  83. /package/components/{error → form-field/error}/error.component.d.ts +0 -0
  84. /package/components/{error → form-field/error}/index.d.ts +0 -0
  85. /package/components/{info → form-field/info}/index.d.ts +0 -0
  86. /package/components/{info → form-field/info}/info.component.d.ts +0 -0
  87. /package/components/{input → form-field/input}/index.d.ts +0 -0
  88. /package/components/{input → form-field/input}/input.directive.d.ts +0 -0
  89. /package/components/{input → form-field/input}/input.model.d.ts +0 -0
package/README.md CHANGED
@@ -1,137 +1,4 @@
1
- # NDW design
1
+ # NDW design system
2
2
 
3
- This library is meant as a central place for all NDW or NDW related components and features. Its components are built in Angular and can be used in Angular projects accordingly.
4
-
5
- Use the relevant library in your project, so you can contribute to the NDW look and feel while maintaining a uniformity across all NDW projects.
6
-
7
- ---
8
-
9
- _Table of Contents_
10
-
11
- 1. [Structure](#structure)
12
- 2. [Usage](#usage)
13
- 3. [Setup environment](#setup-environment)
14
- 1. [Publishing](#publishing)
15
- 2. [Troubleshooting](#troubleshooting)
16
- 4. [Contribution](#contribution)
17
- 1. [Components](#components)
18
-
19
- ---
20
-
21
- ## Structure [](#structure)
22
-
23
- This NDW library is part of the NDW design repository.
24
- The repository contains libraries for the following NDW divisions;
25
-
26
- - NDW
27
- - NTM
28
- - NWB and NWB+
29
-
30
- Next to that it holds common libraries for components and core features, which can be used locally in this repository by other libraries.
31
-
32
- ## Usage [](#usage)
33
-
34
- _WIP_
35
-
36
- In your Angular project you can install the required libraries as dependencies just the same as you would install a regualr NPM package.
37
-
38
- _Example_<br>
39
- You set up a project with the NDW brand and want to include the NDW design library for shared components and styling.
40
-
41
- In a terminal you can install the following package in the root of your project;
42
-
43
- - `npm install -d @noway/ndw`
44
-
45
- After installing first add the styles file to your `angular.json`;
46
-
47
- ```json
48
- "projects": {
49
- "[project-name]": {
50
- // [...]
51
- "architect": {
52
- "build": {
53
- // [...]
54
- "options": {
55
- "styles": [
56
- "node_modules/@noway/ndw/core/styles/styles.scss",
57
- ]
58
- }
59
- }
60
- }
61
- }
62
- }
63
- ```
64
-
65
- Adding this line will incorporate the NWB styling in your project.
66
-
67
- Next you can import the component(s) you need in your module or standalone component of choice;
68
-
69
- ```ts
70
- import { ButtonComponent } from '@noway/ndw/components';
71
- ```
72
-
73
- After this you can use the shared component and all its features.
74
-
75
- ## Setup environment [](#setup-environment)
76
-
77
- ### Publishing [](#publishing)
78
-
79
- Publishing is done via Azure Artifacts, for this project the artifact used is _ndw-shared-npm_.
80
-
81
- For publishing you need to add credentials to your local user .npmrc file.
82
- Follow the steps for this as provided in the Azure environment for ndw-shared-npm;<br>
83
- https://dev.azure.com/ndwnu/Frontend%20Guild/_artifacts/feed/ndw-shared-npm/connect
84
-
85
- ---
86
-
87
- When generating a Personal Access Token, be sure to select "Full access" under "Scopes".
88
-
89
- ### Troubleshooting [](#troubleshooting)
90
-
91
- **Q. _vsts-npm-auth_ is not working, how can I resolve this?**<br>
92
- **A.** The _vsts-npm-auth_ plugin is only working for Windows, if you are using another OS click on "Other" under "Project setup".
93
-
94
- If you are using Windows you should install the plugin globally first through NPM with the following command;<br>
95
- `npm install -g vsts-npm-auth`
96
-
97
- ## Contribution [](#contribution)
98
-
99
- _WIP_
100
-
101
- ### Components [](#components)
102
-
103
- #### When is it reusable?
104
-
105
- - Used more then once in different parts of a project,
106
- - Used across different projects
107
- - Generic and possible to be reused in the future
108
-
109
- #### When is it a component?
110
-
111
- - It uses functionality on top of HTML en CSS
112
- - If it only uses HTML/CSS it should be considered to use an attribute or directive instead
113
- - Its functionality is extending the functionality of a base HTML element
114
- - It is certain a default HTML element is not providing the functionality needed
115
-
116
- ##### Example 1
117
-
118
- - _Requirement_: Button with styling and event handling
119
- - _Check: Similar component already existing?_<br>
120
- **Yes**, the default HTML Button element
121
- - _Check: New component needed?_<br>
122
- **No**, the existing HTML Button element holds all functionality already and can be extended via an attribute which provides its own styling. In this way all functionality of the existing button can be utilized while visually displaying a custom button. No need to reinvent the wheel.
123
-
124
- ##### Example 2
125
-
126
- - _Requirement_: Card with styling and features for header, content and footer
127
- - _Check: Similar component already existing?_<br>
128
- **No**<br>
129
- - _Check: Does it have features or functionalities next to HTML and CSS?_<br>
130
- **Yes**, you can change the background color via input.
131
- - _Check: New component needed?_<br>
132
- **Yes**, there is no similar component and extra functionality is required.
133
-
134
- #### How should it be structured?
135
-
136
- - Project primary text or content via `ng-content`
137
- - Use `Input()`s for additional text and features
3
+ Ga van start om de package te gebruiken binnen jouw applicatie. De documentatie is te vinden op:
4
+ [design.ndw.nu/hulp/start-als-developer/](https://design.ndw.nu/hulp/start-als-developer/)