@ndwnu/design-system 14.1.2 → 14.2.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 (55) hide show
  1. package/CLAUDE.md +1525 -1525
  2. package/README.md +4 -4
  3. package/assets/icons.ts +83 -83
  4. package/fesm2022/ndwnu-design-system.mjs +168 -157
  5. package/fesm2022/ndwnu-design-system.mjs.map +1 -1
  6. package/package.json +1 -1
  7. package/styles/FONTS.md +46 -46
  8. package/styles/base/_colors.scss +246 -246
  9. package/styles/base/_fonts.scss +13 -13
  10. package/styles/base/_material.scss +17 -17
  11. package/styles/base/_typography.scss +133 -133
  12. package/styles/base/_variables.scss +92 -92
  13. package/styles/base/colors.stories.model.ts +85 -85
  14. package/styles/base/colors.stories.ts +24 -24
  15. package/styles/base/index.scss +5 -5
  16. package/styles/base/typography.stories.ts +111 -111
  17. package/styles/components/_button.scss +133 -133
  18. package/styles/components/_card.scss +3 -3
  19. package/styles/components/_datepicker.scss +134 -134
  20. package/styles/components/_divider.scss +10 -10
  21. package/styles/components/_dropdown.scss +8 -8
  22. package/styles/components/_edit-bar.scss +97 -97
  23. package/styles/components/_filter-button.scss +39 -39
  24. package/styles/components/_guided-tour.scss +70 -70
  25. package/styles/components/_input.scss +253 -253
  26. package/styles/components/_label.scss +23 -23
  27. package/styles/components/_link.scss +36 -36
  28. package/styles/components/_list-item.scss +7 -7
  29. package/styles/components/_map.scss +114 -114
  30. package/styles/components/_menu-button.scss +37 -37
  31. package/styles/components/_popover.scss +19 -19
  32. package/styles/components/_summary-card.scss +183 -183
  33. package/styles/components/_table.scss +8 -8
  34. package/styles/components/divider.stories.ts +80 -80
  35. package/styles/components/index.scss +17 -17
  36. package/styles/components/link.stories.ts +154 -154
  37. package/styles/index.scss +4 -4
  38. package/styles/layout/_grid.scss +165 -165
  39. package/styles/layout/_overlay.scss +7 -7
  40. package/styles/layout/grid.stories.ts +168 -168
  41. package/styles/layout/index.scss +2 -2
  42. package/styles/storybook/_core.scss +60 -60
  43. package/styles/storybook/_reset.scss +21 -21
  44. package/styles/storybook/index.scss +17 -17
  45. package/styles/storybook/overrides/_buttons.scss +95 -95
  46. package/styles/storybook/overrides/_code-previews.scss +97 -97
  47. package/styles/storybook/overrides/_content.scss +24 -24
  48. package/styles/storybook/overrides/_headers.scss +31 -31
  49. package/styles/storybook/overrides/_layout.scss +44 -44
  50. package/styles/storybook/overrides/_table.scss +112 -112
  51. package/styles/storybook/overrides/index.scss +6 -6
  52. package/styles/storybook/overrides.css +355 -355
  53. package/styles/utils/_screenreader.scss +13 -13
  54. package/styles/utils/classes.stories.ts +157 -157
  55. package/styles/utils/index.scss +1 -1
@@ -1,154 +1,154 @@
1
- import {
2
- componentWrapperDecorator,
3
- moduleMetadata,
4
- type Meta,
5
- type StoryObj,
6
- } from '@storybook/angular';
7
-
8
- import { icons } from '../../assets/icons';
9
- import { IconComponent } from '../../lib/components';
10
-
11
- interface StoryArgs {
12
- disabled: boolean;
13
- icon: string;
14
- showInContext: boolean;
15
- text: string;
16
- }
17
-
18
- const args: StoryArgs = {
19
- disabled: false,
20
- icon: 'schedule',
21
- showInContext: false,
22
- text: 'tekst',
23
- };
24
-
25
- /**
26
- * The Link component is used to create styled anchor links with optional icons.
27
- *
28
- * # Usage
29
- *
30
- * The link styling is applied automatically to every element that has `[ndwLink]` as attribute.
31
- *
32
- * ```html
33
- * <a ndwLink href="https://design.staging.ndw.nu/" target="_blank">
34
- * <ndw-icon>schedule</ndw-icon>
35
- * Voorbeeld
36
- * </a>
37
- * ```
38
- *
39
- * ```html
40
- * <button ndwLink>
41
- * <ndw-icon>schedule</ndw-icon>
42
- * Voorbeeld
43
- * </button>
44
- * ```
45
- *
46
- **/
47
-
48
- const meta: Meta<StoryArgs> = {
49
- tags: ['autodocs', 'ndw', 'nwb'],
50
- title: 'Components/Link',
51
- decorators: [
52
- componentWrapperDecorator(
53
- (story) => `<div style="font-size: var(--ndw-font-size-sm);">${story}</div>`,
54
- ),
55
- moduleMetadata({
56
- imports: [IconComponent],
57
- }),
58
- ],
59
- render: (props) => ({
60
- props,
61
- template: `
62
- <p>
63
- @if (${props.showInContext}) {
64
- Om een contextueel voorbeeld te schetsen is de link
65
- }
66
- <a
67
- ndwLink
68
- href="https://design.staging.ndw.nu/"
69
- target="_blank"
70
- ${props.disabled ? 'disabled' : ''}
71
- >
72
- ${props.icon ? `<ndw-icon>${props.icon}</ndw-icon>` : ''}
73
- a element ${props.text}
74
- </a>
75
- @if (${props.showInContext}) {
76
- in deze zin geplaatst.
77
- }
78
- </p>
79
-
80
- <p>
81
- @if (${props.showInContext}) {
82
- Om een contextueel voorbeeld te schetsen is de link
83
- }
84
- <button
85
- ndwLink
86
- ${props.disabled ? 'disabled' : ''}
87
- >
88
- ${props.icon ? `<ndw-icon>${props.icon}</ndw-icon>` : ''}
89
- button element ${props.text}
90
- </button>
91
- @if (${props.showInContext}) {
92
- in deze zin geplaatst.
93
- }
94
- </p>
95
- `,
96
- }),
97
- argTypes: {
98
- disabled: {
99
- description: 'Whether the link is disabled.',
100
- name: 'disabled',
101
- table: {
102
- category: 'Custom content',
103
- defaultValue: { summary: 'false' },
104
- },
105
- },
106
- icon: {
107
- control: 'select',
108
- options: ['', ...icons],
109
- description: 'The name of the icon to display.',
110
- name: 'icon',
111
- table: {
112
- category: 'Custom content',
113
- defaultValue: { summary: 'undefined' },
114
- },
115
- },
116
- showInContext: {
117
- description: 'Whether to show the link in context.',
118
- name: 'showInContext',
119
- table: {
120
- category: 'Custom content',
121
- defaultValue: { summary: 'false' },
122
- },
123
- },
124
- text: {
125
- description: 'The text to display in the link.',
126
- name: 'text',
127
- table: {
128
- category: 'Custom content',
129
- defaultValue: { summary: 'undefined' },
130
- },
131
- },
132
- },
133
- };
134
- export default meta;
135
- type Story = StoryObj<StoryArgs>;
136
-
137
- export const Default: Story = {
138
- args,
139
- };
140
-
141
- export const Disabled: Story = {
142
- args: {
143
- ...args,
144
- disabled: true,
145
- },
146
- };
147
-
148
- export const InContext: Story = {
149
- args: {
150
- ...args,
151
- icon: '',
152
- showInContext: true,
153
- },
154
- };
1
+ import {
2
+ componentWrapperDecorator,
3
+ moduleMetadata,
4
+ type Meta,
5
+ type StoryObj,
6
+ } from '@storybook/angular';
7
+
8
+ import { icons } from '../../assets/icons';
9
+ import { IconComponent } from '../../lib/components';
10
+
11
+ interface StoryArgs {
12
+ disabled: boolean;
13
+ icon: string;
14
+ showInContext: boolean;
15
+ text: string;
16
+ }
17
+
18
+ const args: StoryArgs = {
19
+ disabled: false,
20
+ icon: 'schedule',
21
+ showInContext: false,
22
+ text: 'tekst',
23
+ };
24
+
25
+ /**
26
+ * The Link component is used to create styled anchor links with optional icons.
27
+ *
28
+ * # Usage
29
+ *
30
+ * The link styling is applied automatically to every element that has `[ndwLink]` as attribute.
31
+ *
32
+ * ```html
33
+ * <a ndwLink href="https://design.staging.ndw.nu/" target="_blank">
34
+ * <ndw-icon>schedule</ndw-icon>
35
+ * Voorbeeld
36
+ * </a>
37
+ * ```
38
+ *
39
+ * ```html
40
+ * <button ndwLink>
41
+ * <ndw-icon>schedule</ndw-icon>
42
+ * Voorbeeld
43
+ * </button>
44
+ * ```
45
+ *
46
+ **/
47
+
48
+ const meta: Meta<StoryArgs> = {
49
+ tags: ['autodocs', 'ndw', 'nwb'],
50
+ title: 'Components/Link',
51
+ decorators: [
52
+ componentWrapperDecorator(
53
+ (story) => `<div style="font-size: var(--ndw-font-size-sm);">${story}</div>`,
54
+ ),
55
+ moduleMetadata({
56
+ imports: [IconComponent],
57
+ }),
58
+ ],
59
+ render: (props) => ({
60
+ props,
61
+ template: `
62
+ <p>
63
+ @if (${props.showInContext}) {
64
+ Om een contextueel voorbeeld te schetsen is de link
65
+ }
66
+ <a
67
+ ndwLink
68
+ href="https://design.staging.ndw.nu/"
69
+ target="_blank"
70
+ ${props.disabled ? 'disabled' : ''}
71
+ >
72
+ ${props.icon ? `<ndw-icon>${props.icon}</ndw-icon>` : ''}
73
+ a element ${props.text}
74
+ </a>
75
+ @if (${props.showInContext}) {
76
+ in deze zin geplaatst.
77
+ }
78
+ </p>
79
+
80
+ <p>
81
+ @if (${props.showInContext}) {
82
+ Om een contextueel voorbeeld te schetsen is de link
83
+ }
84
+ <button
85
+ ndwLink
86
+ ${props.disabled ? 'disabled' : ''}
87
+ >
88
+ ${props.icon ? `<ndw-icon>${props.icon}</ndw-icon>` : ''}
89
+ button element ${props.text}
90
+ </button>
91
+ @if (${props.showInContext}) {
92
+ in deze zin geplaatst.
93
+ }
94
+ </p>
95
+ `,
96
+ }),
97
+ argTypes: {
98
+ disabled: {
99
+ description: 'Whether the link is disabled.',
100
+ name: 'disabled',
101
+ table: {
102
+ category: 'Custom content',
103
+ defaultValue: { summary: 'false' },
104
+ },
105
+ },
106
+ icon: {
107
+ control: 'select',
108
+ options: ['', ...icons],
109
+ description: 'The name of the icon to display.',
110
+ name: 'icon',
111
+ table: {
112
+ category: 'Custom content',
113
+ defaultValue: { summary: 'undefined' },
114
+ },
115
+ },
116
+ showInContext: {
117
+ description: 'Whether to show the link in context.',
118
+ name: 'showInContext',
119
+ table: {
120
+ category: 'Custom content',
121
+ defaultValue: { summary: 'false' },
122
+ },
123
+ },
124
+ text: {
125
+ description: 'The text to display in the link.',
126
+ name: 'text',
127
+ table: {
128
+ category: 'Custom content',
129
+ defaultValue: { summary: 'undefined' },
130
+ },
131
+ },
132
+ },
133
+ };
134
+ export default meta;
135
+ type Story = StoryObj<StoryArgs>;
136
+
137
+ export const Default: Story = {
138
+ args,
139
+ };
140
+
141
+ export const Disabled: Story = {
142
+ args: {
143
+ ...args,
144
+ disabled: true,
145
+ },
146
+ };
147
+
148
+ export const InContext: Story = {
149
+ args: {
150
+ ...args,
151
+ icon: '',
152
+ showInContext: true,
153
+ },
154
+ };
package/styles/index.scss CHANGED
@@ -1,4 +1,4 @@
1
- @forward 'base';
2
- @forward 'components';
3
- @forward 'layout';
4
- @forward 'utils';
1
+ @forward 'base';
2
+ @forward 'components';
3
+ @forward 'layout';
4
+ @forward 'utils';
@@ -1,165 +1,165 @@
1
- @use '../base/variables' as *;
2
-
3
- $breakpoints: (
4
- 2xs: $ndw-screen-2xs,
5
- xs: $ndw-screen-xs,
6
- sm: $ndw-screen-sm,
7
- md: $ndw-screen-md,
8
- );
9
-
10
- @mixin column($span) {
11
- grid-column: span $span;
12
- }
13
-
14
- .ndw-grid {
15
- $grid-columns-2xs: 2;
16
- $grid-columns-xs: 4;
17
- $grid-columns-sm: 6;
18
- $grid-columns-md: 12;
19
-
20
- display: grid;
21
- justify-items: stretch;
22
- grid-template-columns: repeat(var(--grid-columns), minmax(1rem, 1fr));
23
- gap: var(--grid-spacing);
24
- padding: 0 var(--grid-spacing);
25
- margin: 0 auto;
26
- width: 100%;
27
- min-width: min-content;
28
- max-width: $ndw-screen-md;
29
-
30
- &--no-padding {
31
- padding: 0;
32
- }
33
-
34
- @for $i from 1 through $grid-columns-md {
35
- .column-#{$i} {
36
- @include column(min($i, var(--grid-columns)));
37
- }
38
- }
39
-
40
- @media screen and (max-width: $ndw-screen-2xs) {
41
- --grid-columns: #{$grid-columns-2xs};
42
- --grid-spacing: var(--ndw-spacing-sm);
43
-
44
- @for $i from 1 through $grid-columns-md {
45
- .column-xs-#{$i},
46
- .column-sm-#{$i},
47
- .column-md-#{$i} {
48
- display: none;
49
- }
50
- }
51
-
52
- @for $i from 1 through $grid-columns-2xs {
53
- .column-2xs-#{$i} {
54
- @include column($i);
55
- display: initial;
56
- }
57
- }
58
- }
59
-
60
- @media screen and (max-width: $ndw-screen-xs) {
61
- --grid-columns: #{$grid-columns-xs};
62
- --grid-spacing: var(--ndw-spacing-sm);
63
-
64
- @for $i from 1 through $grid-columns-md {
65
- .column-sm-#{$i},
66
- .column-md-#{$i} {
67
- display: none;
68
- }
69
- }
70
-
71
- @for $i from 1 through $grid-columns-xs {
72
- .column-xs-#{$i} {
73
- @include column($i);
74
- display: initial;
75
- }
76
- }
77
- }
78
-
79
- @media screen and (max-width: $ndw-screen-sm) {
80
- --grid-columns: #{$grid-columns-sm};
81
- --grid-spacing: var(--ndw-spacing-md);
82
-
83
- @for $i from 1 through $grid-columns-md {
84
- .column-md-#{$i} {
85
- display: none;
86
- }
87
- }
88
-
89
- @for $i from 1 through $grid-columns-sm {
90
- .column-sm-#{$i} {
91
- @include column($i);
92
- display: initial;
93
- }
94
- }
95
- }
96
-
97
- @media screen and (min-width: calc($ndw-screen-sm + 1px)) {
98
- --grid-columns: #{$grid-columns-md};
99
- --grid-spacing: var(--ndw-spacing-lg);
100
-
101
- @for $i from 1 through $grid-columns-md {
102
- .column-md-#{$i} {
103
- @include column($i);
104
- display: initial;
105
- }
106
- }
107
- }
108
- }
109
-
110
- .ndw-c-grid {
111
- display: flex;
112
- flex-wrap: wrap;
113
- container-type: inline-size;
114
- container-name: ndw-c-grid;
115
-
116
- @mixin ndw-c-col-span($size, $important: false) {
117
- $flag: if(sass($important), '!important', '');
118
- flex: 0 0 calc((100% / 12) * #{$size}) #{$flag};
119
- max-width: calc((100% / 12) * #{$size}) #{$flag};
120
- }
121
-
122
- @mixin ndw-c-breakpoint($name, $min-width) {
123
- @container ndw-c-grid (min-width: #{$min-width}) {
124
- @content;
125
- }
126
- }
127
-
128
- @for $i from 1 through 12 {
129
- .ndw-c-col-#{$i} {
130
- @include ndw-c-col-span($i, false);
131
- }
132
- }
133
-
134
- @each $name, $width in $breakpoints {
135
- @include ndw-c-breakpoint($name, $width) {
136
- @for $i from 1 through 12 {
137
- .ndw-c-col-#{$name}-#{$i} {
138
- @include ndw-c-col-span($i, true);
139
- }
140
- }
141
- }
142
- }
143
-
144
- $order-range: 0 1 2 3 4 5;
145
-
146
- @each $i in $order-range {
147
- .ndw-c-order-#{$i} {
148
- order: $i !important;
149
- }
150
- }
151
-
152
- @each $name, $width in $breakpoints {
153
- @container ndw-c-grid (min-width: #{$width}) {
154
- @each $i in $order-range {
155
- .ndw-c-order-#{$name}-#{$i} {
156
- order: $i !important;
157
- }
158
- }
159
- }
160
- }
161
- }
162
-
163
- .ndw-c-col {
164
- flex: 1 1 100%;
165
- }
1
+ @use '../base/variables' as *;
2
+
3
+ $breakpoints: (
4
+ 2xs: $ndw-screen-2xs,
5
+ xs: $ndw-screen-xs,
6
+ sm: $ndw-screen-sm,
7
+ md: $ndw-screen-md,
8
+ );
9
+
10
+ @mixin column($span) {
11
+ grid-column: span $span;
12
+ }
13
+
14
+ .ndw-grid {
15
+ $grid-columns-2xs: 2;
16
+ $grid-columns-xs: 4;
17
+ $grid-columns-sm: 6;
18
+ $grid-columns-md: 12;
19
+
20
+ display: grid;
21
+ justify-items: stretch;
22
+ grid-template-columns: repeat(var(--grid-columns), minmax(1rem, 1fr));
23
+ gap: var(--grid-spacing);
24
+ padding: 0 var(--grid-spacing);
25
+ margin: 0 auto;
26
+ width: 100%;
27
+ min-width: min-content;
28
+ max-width: $ndw-screen-md;
29
+
30
+ &--no-padding {
31
+ padding: 0;
32
+ }
33
+
34
+ @for $i from 1 through $grid-columns-md {
35
+ .column-#{$i} {
36
+ @include column(min($i, var(--grid-columns)));
37
+ }
38
+ }
39
+
40
+ @media screen and (max-width: $ndw-screen-2xs) {
41
+ --grid-columns: #{$grid-columns-2xs};
42
+ --grid-spacing: var(--ndw-spacing-sm);
43
+
44
+ @for $i from 1 through $grid-columns-md {
45
+ .column-xs-#{$i},
46
+ .column-sm-#{$i},
47
+ .column-md-#{$i} {
48
+ display: none;
49
+ }
50
+ }
51
+
52
+ @for $i from 1 through $grid-columns-2xs {
53
+ .column-2xs-#{$i} {
54
+ @include column($i);
55
+ display: initial;
56
+ }
57
+ }
58
+ }
59
+
60
+ @media screen and (max-width: $ndw-screen-xs) {
61
+ --grid-columns: #{$grid-columns-xs};
62
+ --grid-spacing: var(--ndw-spacing-sm);
63
+
64
+ @for $i from 1 through $grid-columns-md {
65
+ .column-sm-#{$i},
66
+ .column-md-#{$i} {
67
+ display: none;
68
+ }
69
+ }
70
+
71
+ @for $i from 1 through $grid-columns-xs {
72
+ .column-xs-#{$i} {
73
+ @include column($i);
74
+ display: initial;
75
+ }
76
+ }
77
+ }
78
+
79
+ @media screen and (max-width: $ndw-screen-sm) {
80
+ --grid-columns: #{$grid-columns-sm};
81
+ --grid-spacing: var(--ndw-spacing-md);
82
+
83
+ @for $i from 1 through $grid-columns-md {
84
+ .column-md-#{$i} {
85
+ display: none;
86
+ }
87
+ }
88
+
89
+ @for $i from 1 through $grid-columns-sm {
90
+ .column-sm-#{$i} {
91
+ @include column($i);
92
+ display: initial;
93
+ }
94
+ }
95
+ }
96
+
97
+ @media screen and (min-width: calc($ndw-screen-sm + 1px)) {
98
+ --grid-columns: #{$grid-columns-md};
99
+ --grid-spacing: var(--ndw-spacing-lg);
100
+
101
+ @for $i from 1 through $grid-columns-md {
102
+ .column-md-#{$i} {
103
+ @include column($i);
104
+ display: initial;
105
+ }
106
+ }
107
+ }
108
+ }
109
+
110
+ .ndw-c-grid {
111
+ display: flex;
112
+ flex-wrap: wrap;
113
+ container-type: inline-size;
114
+ container-name: ndw-c-grid;
115
+
116
+ @mixin ndw-c-col-span($size, $important: false) {
117
+ $flag: if(sass($important), '!important', '');
118
+ flex: 0 0 calc((100% / 12) * #{$size}) #{$flag};
119
+ max-width: calc((100% / 12) * #{$size}) #{$flag};
120
+ }
121
+
122
+ @mixin ndw-c-breakpoint($name, $min-width) {
123
+ @container ndw-c-grid (min-width: #{$min-width}) {
124
+ @content;
125
+ }
126
+ }
127
+
128
+ @for $i from 1 through 12 {
129
+ .ndw-c-col-#{$i} {
130
+ @include ndw-c-col-span($i, false);
131
+ }
132
+ }
133
+
134
+ @each $name, $width in $breakpoints {
135
+ @include ndw-c-breakpoint($name, $width) {
136
+ @for $i from 1 through 12 {
137
+ .ndw-c-col-#{$name}-#{$i} {
138
+ @include ndw-c-col-span($i, true);
139
+ }
140
+ }
141
+ }
142
+ }
143
+
144
+ $order-range: 0 1 2 3 4 5;
145
+
146
+ @each $i in $order-range {
147
+ .ndw-c-order-#{$i} {
148
+ order: $i !important;
149
+ }
150
+ }
151
+
152
+ @each $name, $width in $breakpoints {
153
+ @container ndw-c-grid (min-width: #{$width}) {
154
+ @each $i in $order-range {
155
+ .ndw-c-order-#{$name}-#{$i} {
156
+ order: $i !important;
157
+ }
158
+ }
159
+ }
160
+ }
161
+ }
162
+
163
+ .ndw-c-col {
164
+ flex: 1 1 100%;
165
+ }
@@ -1,7 +1,7 @@
1
- .ndw-overlay-backdrop {
2
- background-color: var(--ndw-backdrop-color);
3
- }
4
-
5
- .cdk-overlay-pane:has(> ndw-modal) {
6
- max-height: 90vh;
7
- }
1
+ .ndw-overlay-backdrop {
2
+ background-color: var(--ndw-backdrop-color);
3
+ }
4
+
5
+ .cdk-overlay-pane:has(> ndw-modal) {
6
+ max-height: 90vh;
7
+ }