@ndwnu/design-system 0.0.1-beta.1

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 (96) hide show
  1. package/README.md +137 -0
  2. package/assets/fonts/ObjectSans-Bold.woff2 +0 -0
  3. package/assets/fonts/ObjectSans-Regular.woff2 +0 -0
  4. package/assets/icons/icons.json +94 -0
  5. package/assets/images/ndw-logo-short.svg +3 -0
  6. package/assets/images/ndw-logo.svg +3 -0
  7. package/assets/images/nwb-logo.svg +11 -0
  8. package/components/accordion/accordion.component.d.ts +11 -0
  9. package/components/accordion/accordion.service.d.ts +8 -0
  10. package/components/accordion/index.d.ts +2 -0
  11. package/components/badge/badge.component.d.ts +6 -0
  12. package/components/badge/index.d.ts +1 -0
  13. package/components/button/button.directive.d.ts +9 -0
  14. package/components/button/index.d.ts +1 -0
  15. package/components/card/card.component.d.ts +5 -0
  16. package/components/card/index.d.ts +1 -0
  17. package/components/collapsible/collapsible.component.d.ts +14 -0
  18. package/components/collapsible/index.d.ts +1 -0
  19. package/components/dropdown/dropdown.component.d.ts +21 -0
  20. package/components/dropdown/index.d.ts +1 -0
  21. package/components/error/error.component.d.ts +5 -0
  22. package/components/error/index.d.ts +1 -0
  23. package/components/form-field/form-field.component.d.ts +26 -0
  24. package/components/form-field/form-field.model.d.ts +5 -0
  25. package/components/form-field/index.d.ts +2 -0
  26. package/components/icon/icon.component.d.ts +14 -0
  27. package/components/icon/icon.model.d.ts +5 -0
  28. package/components/icon/icon.service.d.ts +9 -0
  29. package/components/icon/index.d.ts +3 -0
  30. package/components/index.d.ts +15 -0
  31. package/components/info/index.d.ts +1 -0
  32. package/components/info/info.component.d.ts +5 -0
  33. package/components/input/index.d.ts +2 -0
  34. package/components/input/input.directive.d.ts +12 -0
  35. package/components/input/input.model.d.ts +11 -0
  36. package/components/main-navigation/index.d.ts +2 -0
  37. package/components/main-navigation/main-navigation.component.d.ts +26 -0
  38. package/components/main-navigation/main-navigation.model.d.ts +13 -0
  39. package/components/main-navigation-menu/index.d.ts +1 -0
  40. package/components/main-navigation-menu/main-navigation-menu.component.d.ts +11 -0
  41. package/components/tab/index.d.ts +1 -0
  42. package/components/tab/tab.component.d.ts +12 -0
  43. package/components/tab-group/index.d.ts +1 -0
  44. package/components/tab-group/tab-group.component.d.ts +11 -0
  45. package/components/tooltip/index.d.ts +2 -0
  46. package/components/tooltip/tooltip.component.d.ts +6 -0
  47. package/components/tooltip/tooltip.directive.d.ts +13 -0
  48. package/core/styles/ndw-styles.scss +564 -0
  49. package/core/styles/nwb-styles.scss +564 -0
  50. package/esm2022/components/accordion/accordion.component.mjs +28 -0
  51. package/esm2022/components/accordion/accordion.service.mjs +20 -0
  52. package/esm2022/components/accordion/index.mjs +3 -0
  53. package/esm2022/components/badge/badge.component.mjs +14 -0
  54. package/esm2022/components/badge/index.mjs +2 -0
  55. package/esm2022/components/button/button.directive.mjs +36 -0
  56. package/esm2022/components/button/index.mjs +2 -0
  57. package/esm2022/components/card/card.component.mjs +11 -0
  58. package/esm2022/components/card/index.mjs +2 -0
  59. package/esm2022/components/collapsible/collapsible.component.mjs +48 -0
  60. package/esm2022/components/collapsible/index.mjs +2 -0
  61. package/esm2022/components/dropdown/dropdown.component.mjs +75 -0
  62. package/esm2022/components/dropdown/index.mjs +2 -0
  63. package/esm2022/components/error/error.component.mjs +14 -0
  64. package/esm2022/components/error/index.mjs +2 -0
  65. package/esm2022/components/form-field/form-field.component.mjs +88 -0
  66. package/esm2022/components/form-field/form-field.model.mjs +7 -0
  67. package/esm2022/components/form-field/index.mjs +3 -0
  68. package/esm2022/components/icon/icon.component.mjs +37 -0
  69. package/esm2022/components/icon/icon.model.mjs +2 -0
  70. package/esm2022/components/icon/icon.service.mjs +26 -0
  71. package/esm2022/components/icon/index.mjs +4 -0
  72. package/esm2022/components/index.mjs +16 -0
  73. package/esm2022/components/info/index.mjs +2 -0
  74. package/esm2022/components/info/info.component.mjs +11 -0
  75. package/esm2022/components/input/index.mjs +3 -0
  76. package/esm2022/components/input/input.directive.mjs +36 -0
  77. package/esm2022/components/input/input.model.mjs +13 -0
  78. package/esm2022/components/main-navigation/index.mjs +3 -0
  79. package/esm2022/components/main-navigation/main-navigation.component.mjs +88 -0
  80. package/esm2022/components/main-navigation/main-navigation.model.mjs +6 -0
  81. package/esm2022/components/main-navigation-menu/index.mjs +2 -0
  82. package/esm2022/components/main-navigation-menu/main-navigation-menu.component.mjs +26 -0
  83. package/esm2022/components/tab/index.mjs +2 -0
  84. package/esm2022/components/tab/tab.component.mjs +48 -0
  85. package/esm2022/components/tab-group/index.mjs +2 -0
  86. package/esm2022/components/tab-group/tab-group.component.mjs +36 -0
  87. package/esm2022/components/tooltip/index.mjs +3 -0
  88. package/esm2022/components/tooltip/tooltip.component.mjs +14 -0
  89. package/esm2022/components/tooltip/tooltip.directive.mjs +64 -0
  90. package/esm2022/ndwnu-design-system.mjs +5 -0
  91. package/esm2022/public-api.mjs +5 -0
  92. package/fesm2022/ndwnu-design-system.mjs +690 -0
  93. package/fesm2022/ndwnu-design-system.mjs.map +1 -0
  94. package/index.d.ts +5 -0
  95. package/package.json +29 -0
  96. package/public-api.d.ts +1 -0
@@ -0,0 +1,564 @@
1
+ :root {
2
+ --_primary: 177, 23%;
3
+ --_primary-700: var(--_primary), 54%;
4
+ --_primary-600: var(--_primary), 64%;
5
+ --_primary-500: var(--_primary), 81%;
6
+ --_primary-100: var(--_primary), 90%;
7
+ --ndw-color-primary-700: hsl(var(--_primary-700));
8
+ --ndw-color-primary-600: hsl(var(--_primary-600));
9
+ --ndw-color-primary-500: hsl(var(--_primary-500));
10
+ --ndw-color-primary-100: hsl(var(--_primary-100));
11
+ --ndw-color-primary: var(--ndw-color-primary-500);
12
+ --ndw-color-primary-hover: var(--ndw-color-primary-600);
13
+ --ndw-color-primary-active: var(--ndw-color-primary-700);
14
+ --ndw-background-primary: var(--ndw-color-primary);
15
+ --ndw-background-primary-hover: var(--ndw-color-primary-hover);
16
+ --ndw-background-primary-active: var(--ndw-color-primary-active);
17
+ --ndw-foreground-primary: var(--ndw-color-grey-600);
18
+ --ndw-foreground-primary-hover: var(--ndw-color-white);
19
+ --ndw-foreground-primary-active: var(--ndw-color-white);
20
+ --ndw-text-primary: var(--ndw-color-grey-600);
21
+ }
22
+
23
+ :root {
24
+ /* Colors */
25
+ --_grey: 0, 0%;
26
+ --_grey-600: 210, 9%, 17%;
27
+ --_grey-500: var(--_grey), 27%;
28
+ --_grey-400: var(--_grey), 40%;
29
+ --_grey-300: var(--_grey), 57%;
30
+ --_grey-200: var(--_grey), 81%;
31
+ --_grey-100: var(--_grey), 96%;
32
+ --_white: var(--_grey), 100%;
33
+ --ndw-color-grey-600: hsl(var(--_grey-600));
34
+ --ndw-color-grey-500: hsl(var(--_grey-500));
35
+ --ndw-color-grey-400: hsl(var(--_grey-400));
36
+ --ndw-color-grey-300: hsl(var(--_grey-300));
37
+ --ndw-color-grey-200: hsl(var(--_grey-200));
38
+ --ndw-color-grey-100: hsl(var(--_grey-100));
39
+ --ndw-color-white: hsl(var(--_white));
40
+ --_info: 210, 100%;
41
+ --_info-500: var(--_info), 43%;
42
+ --_info-200: var(--_info), 91%;
43
+ --_info-100: var(--_info), 95%;
44
+ --_positive: 133, 92%;
45
+ --_positive-500: var(--_positive), 33%;
46
+ --_positive-100: 117, 56%, 92%;
47
+ --_negative: 0, 100%;
48
+ --_negative-700: var(--_negative), 46%;
49
+ --_negative-500: var(--_negative), 59%;
50
+ --_negative-100: var(--_negative), 98%;
51
+ --ndw-color-info-500: hsl(var(--_info-500));
52
+ --ndw-color-info-200: hsl(var(--_info-200));
53
+ --ndw-color-info-100: hsl(var(--_info-100));
54
+ --ndw-color-positive-500: hsl(var(--_positive-500));
55
+ --ndw-color-positive-100: hsl(var(--_positive-100));
56
+ --ndw-color-negative-700: hsl(var(--_negative-700));
57
+ --ndw-color-negative-500: hsl(var(--_negative-500));
58
+ --ndw-color-negative-100: hsl(var(--_negative-100));
59
+ --ndw-color-notification: hsl(19, 100%, 35%);
60
+ --_data-a-500: 133, 100%, 21%;
61
+ --_data-a-100: 101, 61%, 81%;
62
+ --_data-b-500: 0, 0%, 27%;
63
+ --_data-b-100: 0, 0%, 87%;
64
+ --_data-c-500: 209, 97%, 38%;
65
+ --_data-c-100: 194, 95%, 84%;
66
+ --_data-d-500: 292, 95%, 33%;
67
+ --_data-d-100: 292, 79%, 83%;
68
+ --_data-e-500: 51, 95%, 23%;
69
+ --_data-e-100: 54, 70%, 72%;
70
+ --ndw-color-data-a-500: hsl(var(--_data-a-500));
71
+ --ndw-color-data-a-100: hsl(var(--_data-a-100));
72
+ --ndw-color-data-b-500: hsl(var(--_data-b-500));
73
+ --ndw-color-data-b-100: hsl(var(--_data-b-100));
74
+ --ndw-color-data-c-500: hsl(var(--_data-c-500));
75
+ --ndw-color-data-c-100: hsl(var(--_data-c-100));
76
+ --ndw-color-data-d-500: hsl(var(--_data-d-500));
77
+ --ndw-color-data-d-100: hsl(var(--_data-d-100));
78
+ --ndw-color-data-e-500: hsl(var(--_data-e-500));
79
+ --ndw-color-data-e-100: hsl(var(--_data-e-100));
80
+ /* Alpha */
81
+ --ndw-alpha-40: 0.40;
82
+ --ndw-alpha-15: 0.15;
83
+ --ndw-alpha-7: 0.07;
84
+ /* Spacing */
85
+ --ndw-spacing-3xs: 0.125rem;
86
+ --ndw-spacing-2xs: 0.25rem;
87
+ --ndw-spacing-xs: 0.5rem;
88
+ --ndw-spacing-sm: 0.75rem;
89
+ --ndw-spacing-md: 1rem;
90
+ --ndw-spacing-lg: 1.5rem;
91
+ --ndw-spacing-xl: 2rem;
92
+ --ndw-spacing-2xl: 2.5rem;
93
+ --ndw-spacing-3xl: 3rem;
94
+ --ndw-spacing-4xl: 5rem;
95
+ --ndw-spacing-5xl: 8rem;
96
+ /* Border */
97
+ --ndw-border-size-sm: 1px;
98
+ --ndw-border-size-md: 2px;
99
+ --ndw-border-size-lg: 3px;
100
+ /* Radius */
101
+ --ndw-border-radius-xs: 0.125rem;
102
+ --ndw-border-radius-sm: 0.25rem;
103
+ --ndw-border-radius-md: 0.5rem;
104
+ --ndw-border-radius-lg: 1.5rem;
105
+ /* Elevation */
106
+ --ndw-elevation-info: 0 0 0.5rem 0 hsla(var(--_info-500), 0.25);
107
+ --ndw-elevation-content: 0 0.125rem 0.125rem 0 hsla(var(--_grey-600), 0.05);
108
+ --ndw-elevation-dropdown: 0 0.25rem 1rem hsla(var(--_grey-600), 0.125);
109
+ /* Animation */
110
+ --ndw-animation-speed-fast: 200ms;
111
+ --ndw-animation-speed-default: 300ms;
112
+ --ndw-animation-speed-slow: 500ms;
113
+ /* Icon Size */
114
+ --ndw-icon-size-md: 1rem;
115
+ --ndw-icon-size-lg: 1.5rem;
116
+ /* Typography */
117
+ --ndw-font-family: "Object Sans", sans-serif;
118
+ --ndw-base-font-size: 16px;
119
+ --ndw-font-size-xs: 0.6875rem;
120
+ --ndw-font-size-sm: 0.8125rem;
121
+ --ndw-font-size-md: 1.125rem;
122
+ --ndw-font-size-lg: 1.25rem;
123
+ --ndw-font-size-xl: 1.5rem;
124
+ --ndw-font-weight-regular: 500;
125
+ --ndw-font-weight-bold: 600;
126
+ --ndw-line-height-md: 1.5em;
127
+ /* Transform */
128
+ --ndw-rotate-half: rotate(180deg);
129
+ }
130
+
131
+ @font-face {
132
+ font-family: "Object Sans";
133
+ font-weight: 500;
134
+ font-style: normal;
135
+ src: url("../../assets/fonts/ObjectSans-Regular.woff2") format("woff2");
136
+ }
137
+ @font-face {
138
+ font-family: "Object Sans";
139
+ font-weight: 600;
140
+ font-style: normal;
141
+ src: url("../../assets/fonts/ObjectSans-Bold.woff2") format("woff2");
142
+ }
143
+ /* Mixins */
144
+ /* Classes */
145
+ .ndw-heading-xl {
146
+ font-family: var(--ndw-font-family);
147
+ font-size: 2.5rem;
148
+ font-weight: var(--ndw-font-weight-bold);
149
+ line-height: 150%;
150
+ }
151
+
152
+ .ndw-heading-lg {
153
+ font-family: var(--ndw-font-family);
154
+ font-size: 2rem;
155
+ font-weight: var(--ndw-font-weight-bold);
156
+ line-height: 150%;
157
+ }
158
+
159
+ .ndw-heading-md {
160
+ font-family: var(--ndw-font-family);
161
+ font-size: 1.5rem;
162
+ font-weight: var(--ndw-font-weight-bold);
163
+ line-height: 150%;
164
+ }
165
+
166
+ .ndw-heading-sm {
167
+ font-family: var(--ndw-font-family);
168
+ font-size: 1.25rem;
169
+ font-weight: var(--ndw-font-weight-bold);
170
+ line-height: 150%;
171
+ }
172
+
173
+ .ndw-paragraph-bold-xl {
174
+ font-family: var(--ndw-font-family);
175
+ font-size: 1.125rem;
176
+ font-weight: var(--ndw-font-weight-bold);
177
+ line-height: 150%;
178
+ }
179
+
180
+ .ndw-paragraph-xl {
181
+ font-family: var(--ndw-font-family);
182
+ font-size: 1.125rem;
183
+ font-weight: var(--ndw-font-weight-regular);
184
+ line-height: 150%;
185
+ }
186
+
187
+ .ndw-paragraph-bold-lg {
188
+ font-family: var(--ndw-font-family);
189
+ font-size: 1rem;
190
+ font-weight: var(--ndw-font-weight-bold);
191
+ line-height: 150%;
192
+ }
193
+
194
+ .ndw-paragraph-lg {
195
+ font-family: var(--ndw-font-family);
196
+ font-size: 1rem;
197
+ font-weight: var(--ndw-font-weight-regular);
198
+ line-height: 150%;
199
+ }
200
+
201
+ .ndw-paragraph-bold-md {
202
+ font-family: var(--ndw-font-family);
203
+ font-size: 0.8125rem;
204
+ font-weight: var(--ndw-font-weight-bold);
205
+ line-height: 150%;
206
+ }
207
+
208
+ .ndw-paragraph-md {
209
+ font-family: var(--ndw-font-family);
210
+ font-size: 0.8125rem;
211
+ font-weight: var(--ndw-font-weight-regular);
212
+ line-height: 150%;
213
+ }
214
+
215
+ .ndw-paragraph-bold-sm {
216
+ font-family: var(--ndw-font-family);
217
+ font-size: 0.6875rem;
218
+ font-weight: var(--ndw-font-weight-bold);
219
+ line-height: 150%;
220
+ }
221
+
222
+ .ndw-paragraph-sm {
223
+ font-family: var(--ndw-font-family);
224
+ font-size: 0.6875rem;
225
+ font-weight: var(--ndw-font-weight-regular);
226
+ line-height: 150%;
227
+ }
228
+
229
+ [ndwButton] {
230
+ box-sizing: border-box;
231
+ display: flex;
232
+ align-items: center;
233
+ gap: var(--ndw-spacing-2xs);
234
+ height: var(--ndw-spacing-xl);
235
+ padding: var(--ndw-spacing-2xs) var(--ndw-spacing-xs);
236
+ cursor: pointer;
237
+ background-color: var(--ndw-background-primary);
238
+ border: var(--ndw-border-size-sm) solid var(--ndw-background-primary);
239
+ border-radius: var(--ndw-border-radius-sm);
240
+ transition: color 200ms ease-out, background-color 200ms ease-out, border-color 200ms ease-out;
241
+ color: var(--ndw-foreground-primary);
242
+ font-family: "Object Sans", sans-serif;
243
+ font-size: var(--ndw-font-size-sm);
244
+ font-weight: var(--ndw-font-weight-regular);
245
+ text-align: start;
246
+ }
247
+ [ndwButton]:hover {
248
+ background-color: var(--ndw-background-primary-hover);
249
+ border-color: var(--ndw-background-primary-hover);
250
+ color: var(--ndw-foreground-primary-hover);
251
+ }
252
+ [ndwButton]:active {
253
+ background-color: var(--ndw-background-primary-active);
254
+ border-color: var(--ndw-background-primary-active);
255
+ color: var(--ndw-foreground-primary-active);
256
+ }
257
+ [ndwButton][outline] {
258
+ background-color: transparent;
259
+ border-color: var(--ndw-background-primary);
260
+ color: var(--ndw-text-primary);
261
+ }
262
+ [ndwButton][outline]:hover {
263
+ background-color: var(--ndw-background-primary);
264
+ border-color: var(--ndw-background-primary);
265
+ color: var(--ndw-foreground-primary);
266
+ }
267
+ [ndwButton][outline]:active {
268
+ background-color: var(--ndw-background-primary-hover);
269
+ border-color: var(--ndw-background-primary-hover);
270
+ color: var(--ndw-foreground-primary-hover);
271
+ }
272
+ [ndwButton][secondary] {
273
+ background-color: transparent;
274
+ border-color: var(--ndw-color-grey-200);
275
+ color: var(--ndw-color-grey-600);
276
+ }
277
+ [ndwButton][secondary]:hover {
278
+ background-color: var(--ndw-color-grey-300);
279
+ border-color: var(--ndw-color-grey-300);
280
+ color: var(--ndw-color-white);
281
+ }
282
+ [ndwButton][secondary]:active {
283
+ background-color: var(--ndw-color-grey-400);
284
+ border-color: var(--ndw-color-grey-400);
285
+ color: var(--ndw-color-white);
286
+ }
287
+ [ndwButton][large] {
288
+ height: var(--ndw-spacing-2xl);
289
+ padding-inline: var(--ndw-spacing-sm);
290
+ }
291
+ [ndwButton][disabled] {
292
+ background-color: var(--ndw-color-grey-200);
293
+ border-color: var(--ndw-color-grey-200);
294
+ color: var(--ndw-color-grey-600);
295
+ pointer-events: none;
296
+ user-select: none;
297
+ }
298
+
299
+ input[type=checkbox][ndwInput] {
300
+ display: none;
301
+ }
302
+ input[type=checkbox][ndwInput] ~ label {
303
+ font-family: var(--ndw-font-family);
304
+ font-size: 0.8125rem;
305
+ font-weight: var(--ndw-font-weight-regular);
306
+ line-height: 150%;
307
+ align-items: center;
308
+ color: var(--ndw-color-grey-600);
309
+ cursor: pointer;
310
+ display: flex;
311
+ margin-top: var(--ndw-spacing-2xs);
312
+ width: fit-content;
313
+ }
314
+ input[type=checkbox][ndwInput] ~ label::before {
315
+ background-color: var(--ndw-color-white);
316
+ box-sizing: border-box;
317
+ content: "";
318
+ width: 1.25rem;
319
+ height: 1.25rem;
320
+ border: var(--ndw-border-size-sm) solid var(--ndw-color-grey-200);
321
+ margin: calc(var(--ndw-spacing-2xs) * -1) var(--ndw-spacing-xs) 0 auto;
322
+ padding: var(--ndw-spacing-3xs);
323
+ transition: background-color 150ms ease-in-out, border-color 150ms ease-in-out;
324
+ }
325
+ input[type=checkbox][ndwInput]:checked ~ label::before {
326
+ background-color: var(--ndw-color-primary-500);
327
+ border-color: var(--ndw-color-primary-500);
328
+ }
329
+ input[type=checkbox][ndwInput]:not(:checked) ~ label:hover::before {
330
+ background-color: var(--ndw-color-white);
331
+ border-color: var(--ndw-color-primary-500);
332
+ }
333
+ input[type=checkbox][ndwInput]:not(:checked) ~ label:active::before, input[type=checkbox][ndwInput]:not(:checked) ~ label:focus::before, input[type=checkbox][ndwInput]:not(:checked) ~ label:focus-visible::before {
334
+ border-color: var(--ndw-color-info-500);
335
+ }
336
+ input[type=checkbox][ndwInput][error] ~ label::before {
337
+ border-color: var(--ndw-color-negative-500);
338
+ }
339
+ input[type=checkbox][ndwInput][error]:not(:checked) ~ label::before {
340
+ background-color: var(--ndw-color-negative-100);
341
+ }
342
+ input[type=checkbox][ndwInput][disabled] ~ label {
343
+ color: var(--ndw-color-grey-400);
344
+ pointer-events: none;
345
+ user-select: none;
346
+ }
347
+ input[type=checkbox][ndwInput][disabled] ~ label::before {
348
+ background-color: var(--ndw-color-grey-100);
349
+ border-color: var(--ndw-color-grey-200);
350
+ }
351
+ input[type=checkbox][ndwInput][disabled]:checked ~ label::before {
352
+ background-color: var(--ndw-color-grey-200);
353
+ }
354
+ input[type=checkbox][ndwInput] ~ label::before {
355
+ border-radius: var(--ndw-border-radius-sm);
356
+ }
357
+ input[type=checkbox][ndwInput]:checked ~ label::before {
358
+ content: url('data:image/svg+xml, %3Csvg viewBox="0 0 15 12" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M4.707 8.7325L1.414 5.4395L0 6.8535L4.707 11.5605L14.414 1.8535L13 0.439499L4.707 8.7325Z" fill="white"/%3E%3C/svg%3E');
359
+ }
360
+
361
+ [ndwInput] {
362
+ background-color: var(--ndw-color-white);
363
+ border: var(--ndw-border-size-sm) solid var(--ndw-color-grey-200);
364
+ border-radius: var(--ndw-border-radius-sm);
365
+ color: var(--ndw-color-grey-600);
366
+ font-size: var(--ndw-font-size-sm);
367
+ height: var(--ndw-spacing-2xl);
368
+ line-height: var(--ndw-line-height-md);
369
+ outline: var(--ndw-border-size-sm) solid transparent;
370
+ outline-offset: calc(var(--ndw-border-size-sm) * -1);
371
+ padding: var(--ndw-spacing-sm);
372
+ position: relative;
373
+ transition: background-color 150ms ease-in-out, border-color 150ms ease-in-out, outline-color 150ms ease-in-out;
374
+ }
375
+ [ndwInput]:hover {
376
+ border-color: var(--ndw-color-grey-300);
377
+ }
378
+ [ndwInput]:active, [ndwInput]:focus, [ndwInput]:focus-visible {
379
+ border-color: transparent;
380
+ box-shadow: var(--ndw-elevation-info);
381
+ outline-color: var(--ndw-color-info-500);
382
+ }
383
+ [ndwInput]::placeholder {
384
+ color: var(--ndw-color-grey-300);
385
+ }
386
+ [ndwInput][type=search]::-webkit-search-decoration, [ndwInput][type=search]::-webkit-search-cancel-button, [ndwInput][type=search]::-webkit-search-results-button, [ndwInput][type=search]::-webkit-search-results-decoration {
387
+ display: none;
388
+ }
389
+ [ndwInput][type=date]::-webkit-calendar-picker-indicator, [ndwInput][type=time]::-webkit-calendar-picker-indicator {
390
+ cursor: pointer;
391
+ opacity: 0;
392
+ }
393
+ [ndwInput][error] {
394
+ background-color: var(--ndw-color-negative-100);
395
+ border-color: var(--ndw-color-negative-500);
396
+ }
397
+ [ndwInput][error]:hover {
398
+ border-color: var(--ndw-color-grey-300);
399
+ }
400
+ [ndwInput][error]:active, [ndwInput][error]:focus, [ndwInput][error]:focus-visible {
401
+ background-color: var(--ndw-color-white);
402
+ border-color: transparent;
403
+ outline-color: var(--ndw-color-info-500);
404
+ }
405
+ [ndwInput][disabled] {
406
+ background-color: var(--ndw-color-grey-100);
407
+ border-color: var(--ndw-color-grey-200);
408
+ color: var(--ndw-color-grey-400);
409
+ pointer-events: none;
410
+ }
411
+ [ndwInput].prefix-icon {
412
+ padding-left: calc(var(--ndw-font-size-lg) + var(--ndw-spacing-md));
413
+ }
414
+
415
+ select[ndwInput] {
416
+ appearance: none;
417
+ cursor: pointer;
418
+ padding-top: calc(var(--ndw-spacing-xs) + var(--ndw-border-size-sm));
419
+ width: 100%;
420
+ text-overflow: ellipsis;
421
+ white-space: nowrap;
422
+ padding-right: var(--ndw-spacing-xl);
423
+ }
424
+ select[ndwInput]:not([ndw-changed]) {
425
+ color: var(--ndw-color-grey-300);
426
+ }
427
+
428
+ textarea[ndwInput] {
429
+ min-height: 6.5rem;
430
+ padding-top: calc(var(--ndw-spacing-xs) + var(--ndw-border-size-sm));
431
+ resize: vertical;
432
+ }
433
+
434
+ [ndwLabel] {
435
+ align-content: center;
436
+ align-items: center;
437
+ display: grid;
438
+ font-family: var(--ndw-font-family);
439
+ font-size: var(--ndw-font-size-sm);
440
+ font-weight: var(--ndw-font-weight-regular);
441
+ gap: var(--ndw-spacing-3xs);
442
+ grid-template-columns: repeat(3, auto);
443
+ height: 1.5rem;
444
+ justify-content: start;
445
+ line-height: 100%;
446
+ }
447
+ [ndwLabel] ndw-icon {
448
+ color: var(--ndw-color-grey-300);
449
+ margin-top: calc(var(--ndw-spacing-3xs) * -1);
450
+ }
451
+ [ndwLabel] .required {
452
+ color: var(--ndw-color-grey-300);
453
+ }
454
+
455
+ a[ndwLink] {
456
+ align-items: baseline;
457
+ color: var(--ndw-color-info-500);
458
+ display: inline-flex;
459
+ font-size: inherit;
460
+ gap: var(--ndw-spacing-2xs);
461
+ text-decoration: underline var(--ndw-border-size-sm) transparent;
462
+ text-underline-offset: var(--ndw-border-size-md);
463
+ transition: text-decoration-color var(--ndw-animation-speed-fast) ease-in-out;
464
+ }
465
+ a[ndwLink] > * {
466
+ align-self: center;
467
+ }
468
+ a[ndwLink]:hover {
469
+ text-decoration-color: var(--ndw-color-info-500);
470
+ }
471
+ a[ndwLink][disabled] {
472
+ color: var(--ndw-color-grey-300);
473
+ pointer-events: none;
474
+ user-select: none;
475
+ }
476
+
477
+ [ndwButton][menu] {
478
+ background-color: transparent;
479
+ border-color: transparent;
480
+ border-radius: 0;
481
+ color: var(--ndw-color-grey-300);
482
+ gap: var(--ndw-spacing-xs);
483
+ height: 2.75rem;
484
+ padding-inline: 0;
485
+ position: relative;
486
+ width: 100%;
487
+ }
488
+ [ndwButton][menu]:hover {
489
+ background-color: var(--ndw-color-grey-500);
490
+ border-color: var(--ndw-color-grey-500);
491
+ color: var(--ndw-color-white);
492
+ }
493
+ [ndwButton][menu]:active {
494
+ background-color: transparent;
495
+ border-color: transparent;
496
+ color: var(--ndw-color-white);
497
+ }
498
+
499
+ input[type=radio][ndwInput] {
500
+ display: none;
501
+ }
502
+ input[type=radio][ndwInput] ~ label {
503
+ font-family: var(--ndw-font-family);
504
+ font-size: 0.8125rem;
505
+ font-weight: var(--ndw-font-weight-regular);
506
+ line-height: 150%;
507
+ align-items: center;
508
+ color: var(--ndw-color-grey-600);
509
+ cursor: pointer;
510
+ display: flex;
511
+ margin-top: var(--ndw-spacing-2xs);
512
+ width: fit-content;
513
+ }
514
+ input[type=radio][ndwInput] ~ label::before {
515
+ background-color: var(--ndw-color-white);
516
+ box-sizing: border-box;
517
+ content: "";
518
+ width: 1.25rem;
519
+ height: 1.25rem;
520
+ border: var(--ndw-border-size-sm) solid var(--ndw-color-grey-200);
521
+ margin: calc(var(--ndw-spacing-2xs) * -1) var(--ndw-spacing-xs) 0 auto;
522
+ padding: var(--ndw-spacing-3xs);
523
+ transition: background-color 150ms ease-in-out, border-color 150ms ease-in-out;
524
+ }
525
+ input[type=radio][ndwInput]:checked ~ label::before {
526
+ background-color: var(--ndw-color-primary-500);
527
+ border-color: var(--ndw-color-primary-500);
528
+ }
529
+ input[type=radio][ndwInput]:not(:checked) ~ label:hover::before {
530
+ background-color: var(--ndw-color-white);
531
+ border-color: var(--ndw-color-primary-500);
532
+ }
533
+ input[type=radio][ndwInput]:not(:checked) ~ label:active::before, input[type=radio][ndwInput]:not(:checked) ~ label:focus::before, input[type=radio][ndwInput]:not(:checked) ~ label:focus-visible::before {
534
+ border-color: var(--ndw-color-info-500);
535
+ }
536
+ input[type=radio][ndwInput][error] ~ label::before {
537
+ border-color: var(--ndw-color-negative-500);
538
+ }
539
+ input[type=radio][ndwInput][error]:not(:checked) ~ label::before {
540
+ background-color: var(--ndw-color-negative-100);
541
+ }
542
+ input[type=radio][ndwInput][disabled] ~ label {
543
+ color: var(--ndw-color-grey-400);
544
+ pointer-events: none;
545
+ user-select: none;
546
+ }
547
+ input[type=radio][ndwInput][disabled] ~ label::before {
548
+ background-color: var(--ndw-color-grey-100);
549
+ border-color: var(--ndw-color-grey-200);
550
+ }
551
+ input[type=radio][ndwInput][disabled]:checked ~ label::before {
552
+ background-color: var(--ndw-color-grey-200);
553
+ }
554
+ input[type=radio][ndwInput] ~ label::before {
555
+ border-radius: 50%;
556
+ }
557
+ input[type=radio][ndwInput]:checked ~ label::before {
558
+ content: url('data:image/svg+xml, %3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E%3Ccircle r="6" cx="10" cy="10" fill="white"/%3E%3C/svg%3E');
559
+ }
560
+
561
+ .cdk-overlay-pane.tooltip-bottom ndw-tooltip::before {
562
+ bottom: auto;
563
+ top: calc(var(--ndw-spacing-2xs) * -1);
564
+ }
@@ -0,0 +1,28 @@
1
+ import { Component, contentChildren, inject, input } from '@angular/core';
2
+ import { AccordionService } from './accordion.service';
3
+ import { CollapsibleComponent } from '../collapsible';
4
+ import * as i0 from "@angular/core";
5
+ export class AccordionComponent {
6
+ constructor() {
7
+ this.collapseOthers = input(false);
8
+ this.collapsibles = contentChildren(CollapsibleComponent);
9
+ this.accordionService = inject(AccordionService);
10
+ }
11
+ ngOnInit() {
12
+ this.accordionService.expanded$.subscribe((index) => {
13
+ if (!this.collapseOthers()) {
14
+ return;
15
+ }
16
+ this.collapsibles().forEach((collapsible) => {
17
+ collapsible.expanded.set(collapsible.index() === index);
18
+ });
19
+ });
20
+ }
21
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: AccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
22
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "17.3.0", type: AccordionComponent, isStandalone: true, selector: "ndw-accordion", inputs: { collapseOthers: { classPropertyName: "collapseOthers", publicName: "collapseOthers", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "collapsibles", predicate: CollapsibleComponent, isSignal: true }], ngImport: i0, template: "<ng-content />\n", styles: [""] }); }
23
+ }
24
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: AccordionComponent, decorators: [{
25
+ type: Component,
26
+ args: [{ selector: 'ndw-accordion', standalone: true, imports: [], template: "<ng-content />\n" }]
27
+ }] });
28
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjb3JkaW9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25kdy9zcmMvY29tcG9uZW50cy9hY2NvcmRpb24vYWNjb3JkaW9uLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25kdy9zcmMvY29tcG9uZW50cy9hY2NvcmRpb24vYWNjb3JkaW9uLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQVUsZUFBZSxFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFbEYsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDdkQsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sZ0JBQWdCLENBQUM7O0FBU3RELE1BQU0sT0FBTyxrQkFBa0I7SUFQL0I7UUFRUyxtQkFBYyxHQUFHLEtBQUssQ0FBQyxLQUFLLENBQUMsQ0FBQztRQUU5QixpQkFBWSxHQUFHLGVBQWUsQ0FBQyxvQkFBb0IsQ0FBQyxDQUFDO1FBRTNDLHFCQUFnQixHQUFHLE1BQU0sQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFDO0tBYTlEO0lBWFEsUUFBUTtRQUNiLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxTQUFTLENBQUMsU0FBUyxDQUFDLENBQUMsS0FBYSxFQUFFLEVBQUU7WUFDMUQsSUFBSSxDQUFDLElBQUksQ0FBQyxjQUFjLEVBQUUsRUFBRSxDQUFDO2dCQUMzQixPQUFPO1lBQ1QsQ0FBQztZQUVELElBQUksQ0FBQyxZQUFZLEVBQUUsQ0FBQyxPQUFPLENBQUMsQ0FBQyxXQUFpQyxFQUFFLEVBQUU7Z0JBQ2hFLFdBQVcsQ0FBQyxRQUFRLENBQUMsR0FBRyxDQUFDLFdBQVcsQ0FBQyxLQUFLLEVBQUUsS0FBSyxLQUFLLENBQUMsQ0FBQztZQUMxRCxDQUFDLENBQUMsQ0FBQztRQUNMLENBQUMsQ0FBQyxDQUFDO0lBQ0wsQ0FBQzs4R0FqQlUsa0JBQWtCO2tHQUFsQixrQkFBa0IscVFBR1Msb0JBQW9CLDZDQ2Y1RCxrQkFDQTs7MkZEV2Esa0JBQWtCO2tCQVA5QixTQUFTOytCQUNFLGVBQWUsY0FDYixJQUFJLFdBQ1AsRUFBRSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENvbXBvbmVudCwgT25Jbml0LCBjb250ZW50Q2hpbGRyZW4sIGluamVjdCwgaW5wdXQgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuaW1wb3J0IHsgQWNjb3JkaW9uU2VydmljZSB9IGZyb20gJy4vYWNjb3JkaW9uLnNlcnZpY2UnO1xuaW1wb3J0IHsgQ29sbGFwc2libGVDb21wb25lbnQgfSBmcm9tICcuLi9jb2xsYXBzaWJsZSc7XG5cbkBDb21wb25lbnQoe1xuICBzZWxlY3RvcjogJ25kdy1hY2NvcmRpb24nLFxuICBzdGFuZGFsb25lOiB0cnVlLFxuICBpbXBvcnRzOiBbXSxcbiAgdGVtcGxhdGVVcmw6ICcuL2FjY29yZGlvbi5jb21wb25lbnQuaHRtbCcsXG4gIHN0eWxlVXJsOiAnLi9hY2NvcmRpb24uY29tcG9uZW50LnNjc3MnXG59KVxuZXhwb3J0IGNsYXNzIEFjY29yZGlvbkNvbXBvbmVudCBpbXBsZW1lbnRzIE9uSW5pdCB7XG4gIHB1YmxpYyBjb2xsYXBzZU90aGVycyA9IGlucHV0KGZhbHNlKTtcblxuICBwdWJsaWMgY29sbGFwc2libGVzID0gY29udGVudENoaWxkcmVuKENvbGxhcHNpYmxlQ29tcG9uZW50KTtcblxuICBwcml2YXRlIHJlYWRvbmx5IGFjY29yZGlvblNlcnZpY2UgPSBpbmplY3QoQWNjb3JkaW9uU2VydmljZSk7XG5cbiAgcHVibGljIG5nT25Jbml0KCk6IHZvaWQge1xuICAgIHRoaXMuYWNjb3JkaW9uU2VydmljZS5leHBhbmRlZCQuc3Vic2NyaWJlKChpbmRleDogbnVtYmVyKSA9PiB7XG4gICAgICBpZiAoIXRoaXMuY29sbGFwc2VPdGhlcnMoKSkge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIHRoaXMuY29sbGFwc2libGVzKCkuZm9yRWFjaCgoY29sbGFwc2libGU6IENvbGxhcHNpYmxlQ29tcG9uZW50KSA9PiB7XG4gICAgICAgIGNvbGxhcHNpYmxlLmV4cGFuZGVkLnNldChjb2xsYXBzaWJsZS5pbmRleCgpID09PSBpbmRleCk7XG4gICAgICB9KTtcbiAgICB9KTtcbiAgfVxufVxuIiwiPG5nLWNvbnRlbnQgLz5cbiJdfQ==
@@ -0,0 +1,20 @@
1
+ import { Injectable } from '@angular/core';
2
+ import { Subject } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ export class AccordionService {
5
+ constructor() {
6
+ this.expanded$ = new Subject();
7
+ }
8
+ setExpandedCollapsible(index) {
9
+ this.expanded$.next(index);
10
+ }
11
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: AccordionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
12
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: AccordionService, providedIn: 'root' }); }
13
+ }
14
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: AccordionService, decorators: [{
15
+ type: Injectable,
16
+ args: [{
17
+ providedIn: 'root'
18
+ }]
19
+ }] });
20
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjb3JkaW9uLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZHcvc3JjL2NvbXBvbmVudHMvYWNjb3JkaW9uL2FjY29yZGlvbi5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLE1BQU0sQ0FBQzs7QUFLL0IsTUFBTSxPQUFPLGdCQUFnQjtJQUg3QjtRQUlTLGNBQVMsR0FBRyxJQUFJLE9BQU8sRUFBVSxDQUFDO0tBSzFDO0lBSFEsc0JBQXNCLENBQUMsS0FBYTtRQUN6QyxJQUFJLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQztJQUM3QixDQUFDOzhHQUxVLGdCQUFnQjtrSEFBaEIsZ0JBQWdCLGNBRmYsTUFBTTs7MkZBRVAsZ0JBQWdCO2tCQUg1QixVQUFVO21CQUFDO29CQUNWLFVBQVUsRUFBRSxNQUFNO2lCQUNuQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEluamVjdGFibGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IFN1YmplY3QgfSBmcm9tICdyeGpzJztcblxuQEluamVjdGFibGUoe1xuICBwcm92aWRlZEluOiAncm9vdCdcbn0pXG5leHBvcnQgY2xhc3MgQWNjb3JkaW9uU2VydmljZSB7XG4gIHB1YmxpYyBleHBhbmRlZCQgPSBuZXcgU3ViamVjdDxudW1iZXI+KCk7XG5cbiAgcHVibGljIHNldEV4cGFuZGVkQ29sbGFwc2libGUoaW5kZXg6IG51bWJlcik6IHZvaWQge1xuICAgIHRoaXMuZXhwYW5kZWQkLm5leHQoaW5kZXgpO1xuICB9XG59XG4iXX0=
@@ -0,0 +1,3 @@
1
+ export * from './accordion.component';
2
+ export * from './accordion.service';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZHcvc3JjL2NvbXBvbmVudHMvYWNjb3JkaW9uL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsdUJBQXVCLENBQUM7QUFDdEMsY0FBYyxxQkFBcUIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vYWNjb3JkaW9uLmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL2FjY29yZGlvbi5zZXJ2aWNlJztcbiJdfQ==