@ndwnu/design-system 14.2.0 → 14.2.2

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 (56) 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 +161 -158
  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 +137 -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
  56. package/types/ndwnu-design-system.d.ts +6 -3
@@ -1,168 +1,168 @@
1
- import { type Meta, type StoryObj } from '@storybook/angular';
2
-
3
- interface StoryArgs {
4
- columnClasses: string[][];
5
- disablePadding?: boolean;
6
- useContainerQueries?: boolean;
7
- }
8
-
9
- /**
10
- * Create a responsive grid layout with columns. There are multiple breakpoints based
11
- * on the viewport size. Each breakpoint has a specific number of columns:
12
- * - Above 1024px (sm): 12 columns
13
- * - 768px-1024px (xs): 6 columns
14
- * - 480px-768px (2xs): 4 columns
15
- * - Below 480px: 2 columns
16
- * - Maximum width: 1440px
17
- *
18
- * The grid needs a container element with the class `ndw-grid`. Column elements
19
- * should have classes like:
20
- * - `column-{span}`: all screen sizes
21
- * - `column-2xs-{span}`: below 480px
22
- * - `column-xs-{span}`: 480px-768px
23
- * - `column-sm-{span}`: 768px-1024px
24
- * - `column-md-{span}`: above 1024px
25
- *
26
- * Where `{span}` is the number of columns to span.
27
- *
28
- * Use the viewport tool to see responsive behavior.
29
- *
30
- * ## Disable padding
31
- *
32
- * Sometimes you may want to disable padding on the columns, for example when using a card component.
33
- * To do this, add the class `ndw-grid--no-padding` to the `.ndw-grid` element.
34
- *
35
- * ## Container grid
36
- *
37
- * It is also possible to use a container grid which uses breakpoints
38
- * based on it's container instead of the viewport.
39
- *
40
- * There are a few notable differences when using a container grid:
41
- * - Container queries are used instead of media queries.
42
- * - The container element must have the `ndw-c-grid` class instead of `ndw-grid`.
43
- * - The column classes are prefixed with `ndw-c-col-` instead of `column-`
44
- * - The container grid always has 12 columns, regardless of the container size.
45
- * - The container grid does not have padding on the outside of between columns.
46
- * - The container grid uses flex layout instead of CSS grid.
47
- */
48
-
49
- const meta: Meta<StoryArgs> = {
50
- tags: ['autodocs', 'ndw', 'ntm', 'nwb'],
51
- title: 'Core/Grid',
52
- parameters: {
53
- viewport: {
54
- defaultViewport: 'mobile',
55
- },
56
- },
57
- render: (props) => ({
58
- props,
59
- styles: [
60
- `
61
- .ndw-grid > div,
62
- .ndw-c-grid > div {
63
- text-align: center;
64
- background-color: var(--ndw-color-grey-300);
65
- border: 1px solid var(--ndw-color-grey-400);
66
- padding: var(--ndw-spacing-xs);
67
- }
68
- .ndw-grid,
69
- .ndw-c-grid {
70
- background-color: var(--ndw-color-grey-100);
71
- margin-bottom: var(--ndw-spacing-xl);
72
- }
73
- `,
74
- ],
75
- template: `
76
- <div class="${props.useContainerQueries ? 'ndw-c-grid' : 'ndw-grid'} ${props.disablePadding ? 'ndw-grid--no-padding' : ''}">
77
- ${props.columnClasses
78
- .map(
79
- (classes, index) =>
80
- `<div class="${classes.map((c) => `${props.useContainerQueries ? 'ndw-c-col-' : 'column-'}${c}`).join(' ')}">
81
- ${index + 1}
82
- </div>`,
83
- )
84
- .join('')}
85
- </div>
86
- `,
87
- }),
88
- argTypes: {
89
- disablePadding: {
90
- description: 'Disable the inline padding on the grid.',
91
- control: { type: 'boolean' },
92
- table: { category: 'Grid configuration' },
93
- },
94
- columnClasses: {
95
- description: 'Array of classes to apply to each column.',
96
- table: {
97
- category: 'Story inputs',
98
- },
99
- },
100
- useContainerQueries: {
101
- description: 'Use container queries instead of media queries for the grid.',
102
- control: { type: 'boolean' },
103
- table: {
104
- category: 'Story inputs',
105
- },
106
- },
107
- },
108
- };
109
- export default meta;
110
- type Story = StoryObj<StoryArgs>;
111
-
112
- export const Default: Story = {
113
- args: {
114
- columnClasses: [
115
- ['1', '2xs-4', 'xs-2', 'sm-1'],
116
- ['1', '2xs-4', 'xs-2', 'sm-1'],
117
- ['1', 'xs-2', 'sm-1'],
118
- ['1', 'xs-2', 'sm-1'],
119
- ['1', 'sm-1'],
120
- ['1', 'sm-1'],
121
- ['1'],
122
- ['1'],
123
- ['1'],
124
- ['1'],
125
- ['1'],
126
- ['1'],
127
- ],
128
- disablePadding: false,
129
- useContainerQueries: false,
130
- },
131
- };
132
-
133
- /**
134
- * Use the viewport button to see different column sizes for different screen sizes.
135
- */
136
- export const ResponsiveColumns: Story = {
137
- args: {
138
- columnClasses: [
139
- ['12', 'sm-3', 'md-4'],
140
- ['12', 'sm-3', 'md-4'],
141
- ['12', 'sm-6', 'md-4'],
142
- ],
143
- },
144
- };
145
-
146
- export const MixedColumnWidth: Story = {
147
- args: {
148
- columnClasses: [['6'], ['2'], ['4'], ['2'], ['2'], ['2'], ['6'], ['12']],
149
- },
150
- };
151
-
152
- export const NoPadding: Story = {
153
- args: {
154
- columnClasses: [['6'], ['6'], ['2'], ['2'], ['2'], ['6']],
155
- disablePadding: true,
156
- },
157
- };
158
-
159
- export const ContainerQueryGrid: Story = {
160
- args: {
161
- useContainerQueries: true,
162
- columnClasses: [
163
- ['12', 'sm-6', 'md-4'],
164
- ['12', 'sm-6', 'md-4'],
165
- ['12', 'sm-12', 'md-4'],
166
- ],
167
- },
168
- };
1
+ import { type Meta, type StoryObj } from '@storybook/angular';
2
+
3
+ interface StoryArgs {
4
+ columnClasses: string[][];
5
+ disablePadding?: boolean;
6
+ useContainerQueries?: boolean;
7
+ }
8
+
9
+ /**
10
+ * Create a responsive grid layout with columns. There are multiple breakpoints based
11
+ * on the viewport size. Each breakpoint has a specific number of columns:
12
+ * - Above 1024px (sm): 12 columns
13
+ * - 768px-1024px (xs): 6 columns
14
+ * - 480px-768px (2xs): 4 columns
15
+ * - Below 480px: 2 columns
16
+ * - Maximum width: 1440px
17
+ *
18
+ * The grid needs a container element with the class `ndw-grid`. Column elements
19
+ * should have classes like:
20
+ * - `column-{span}`: all screen sizes
21
+ * - `column-2xs-{span}`: below 480px
22
+ * - `column-xs-{span}`: 480px-768px
23
+ * - `column-sm-{span}`: 768px-1024px
24
+ * - `column-md-{span}`: above 1024px
25
+ *
26
+ * Where `{span}` is the number of columns to span.
27
+ *
28
+ * Use the viewport tool to see responsive behavior.
29
+ *
30
+ * ## Disable padding
31
+ *
32
+ * Sometimes you may want to disable padding on the columns, for example when using a card component.
33
+ * To do this, add the class `ndw-grid--no-padding` to the `.ndw-grid` element.
34
+ *
35
+ * ## Container grid
36
+ *
37
+ * It is also possible to use a container grid which uses breakpoints
38
+ * based on it's container instead of the viewport.
39
+ *
40
+ * There are a few notable differences when using a container grid:
41
+ * - Container queries are used instead of media queries.
42
+ * - The container element must have the `ndw-c-grid` class instead of `ndw-grid`.
43
+ * - The column classes are prefixed with `ndw-c-col-` instead of `column-`
44
+ * - The container grid always has 12 columns, regardless of the container size.
45
+ * - The container grid does not have padding on the outside of between columns.
46
+ * - The container grid uses flex layout instead of CSS grid.
47
+ */
48
+
49
+ const meta: Meta<StoryArgs> = {
50
+ tags: ['autodocs', 'ndw', 'ntm', 'nwb'],
51
+ title: 'Core/Grid',
52
+ parameters: {
53
+ viewport: {
54
+ defaultViewport: 'mobile',
55
+ },
56
+ },
57
+ render: (props) => ({
58
+ props,
59
+ styles: [
60
+ `
61
+ .ndw-grid > div,
62
+ .ndw-c-grid > div {
63
+ text-align: center;
64
+ background-color: var(--ndw-color-grey-300);
65
+ border: 1px solid var(--ndw-color-grey-400);
66
+ padding: var(--ndw-spacing-xs);
67
+ }
68
+ .ndw-grid,
69
+ .ndw-c-grid {
70
+ background-color: var(--ndw-color-grey-100);
71
+ margin-bottom: var(--ndw-spacing-xl);
72
+ }
73
+ `,
74
+ ],
75
+ template: `
76
+ <div class="${props.useContainerQueries ? 'ndw-c-grid' : 'ndw-grid'} ${props.disablePadding ? 'ndw-grid--no-padding' : ''}">
77
+ ${props.columnClasses
78
+ .map(
79
+ (classes, index) =>
80
+ `<div class="${classes.map((c) => `${props.useContainerQueries ? 'ndw-c-col-' : 'column-'}${c}`).join(' ')}">
81
+ ${index + 1}
82
+ </div>`,
83
+ )
84
+ .join('')}
85
+ </div>
86
+ `,
87
+ }),
88
+ argTypes: {
89
+ disablePadding: {
90
+ description: 'Disable the inline padding on the grid.',
91
+ control: { type: 'boolean' },
92
+ table: { category: 'Grid configuration' },
93
+ },
94
+ columnClasses: {
95
+ description: 'Array of classes to apply to each column.',
96
+ table: {
97
+ category: 'Story inputs',
98
+ },
99
+ },
100
+ useContainerQueries: {
101
+ description: 'Use container queries instead of media queries for the grid.',
102
+ control: { type: 'boolean' },
103
+ table: {
104
+ category: 'Story inputs',
105
+ },
106
+ },
107
+ },
108
+ };
109
+ export default meta;
110
+ type Story = StoryObj<StoryArgs>;
111
+
112
+ export const Default: Story = {
113
+ args: {
114
+ columnClasses: [
115
+ ['1', '2xs-4', 'xs-2', 'sm-1'],
116
+ ['1', '2xs-4', 'xs-2', 'sm-1'],
117
+ ['1', 'xs-2', 'sm-1'],
118
+ ['1', 'xs-2', 'sm-1'],
119
+ ['1', 'sm-1'],
120
+ ['1', 'sm-1'],
121
+ ['1'],
122
+ ['1'],
123
+ ['1'],
124
+ ['1'],
125
+ ['1'],
126
+ ['1'],
127
+ ],
128
+ disablePadding: false,
129
+ useContainerQueries: false,
130
+ },
131
+ };
132
+
133
+ /**
134
+ * Use the viewport button to see different column sizes for different screen sizes.
135
+ */
136
+ export const ResponsiveColumns: Story = {
137
+ args: {
138
+ columnClasses: [
139
+ ['12', 'sm-3', 'md-4'],
140
+ ['12', 'sm-3', 'md-4'],
141
+ ['12', 'sm-6', 'md-4'],
142
+ ],
143
+ },
144
+ };
145
+
146
+ export const MixedColumnWidth: Story = {
147
+ args: {
148
+ columnClasses: [['6'], ['2'], ['4'], ['2'], ['2'], ['2'], ['6'], ['12']],
149
+ },
150
+ };
151
+
152
+ export const NoPadding: Story = {
153
+ args: {
154
+ columnClasses: [['6'], ['6'], ['2'], ['2'], ['2'], ['6']],
155
+ disablePadding: true,
156
+ },
157
+ };
158
+
159
+ export const ContainerQueryGrid: Story = {
160
+ args: {
161
+ useContainerQueries: true,
162
+ columnClasses: [
163
+ ['12', 'sm-6', 'md-4'],
164
+ ['12', 'sm-6', 'md-4'],
165
+ ['12', 'sm-12', 'md-4'],
166
+ ],
167
+ },
168
+ };
@@ -1,2 +1,2 @@
1
- @forward 'grid';
2
- @forward 'overlay';
1
+ @forward 'grid';
2
+ @forward 'overlay';
@@ -1,60 +1,60 @@
1
- .overview {
2
- align-content: flex-start;
3
- display: grid;
4
- gap: var(--ndw-spacing-xl);
5
-
6
- > h1 {
7
- margin-bottom: 0;
8
- }
9
-
10
- section {
11
- display: grid;
12
- gap: var(--ndw-spacing-sm);
13
-
14
- > h2 {
15
- margin-block: 0 var(--ndw-spacing-lg);
16
- }
17
-
18
- > p {
19
- padding-bottom: var(--ndw-spacing-lg);
20
- }
21
-
22
- .header,
23
- .content {
24
- display: grid;
25
- gap: var(--ndw-spacing-md);
26
- grid-template-columns: repeat(3, 2fr);
27
- }
28
-
29
- .header {
30
- font-weight: var(--ndw-font-weight-bold);
31
- margin-top: calc(var(--ndw-spacing-md) * -1);
32
- }
33
-
34
- .content {
35
- .block {
36
- border: var(--ndw-border-size-sm) solid var(--ndw-color-grey-400);
37
- height: var(--ndw-spacing-3xl);
38
- width: var(--ndw-spacing-3xl);
39
- }
40
- }
41
- }
42
-
43
- &.colors {
44
- section {
45
- .header,
46
- .content {
47
- grid-template-columns: 3.5rem repeat(2, 2fr) 3fr;
48
- }
49
- }
50
- }
51
-
52
- &.typography {
53
- section {
54
- .header,
55
- .content {
56
- grid-template-columns: 4fr 2fr 7fr;
57
- }
58
- }
59
- }
60
- }
1
+ .overview {
2
+ align-content: flex-start;
3
+ display: grid;
4
+ gap: var(--ndw-spacing-xl);
5
+
6
+ > h1 {
7
+ margin-bottom: 0;
8
+ }
9
+
10
+ section {
11
+ display: grid;
12
+ gap: var(--ndw-spacing-sm);
13
+
14
+ > h2 {
15
+ margin-block: 0 var(--ndw-spacing-lg);
16
+ }
17
+
18
+ > p {
19
+ padding-bottom: var(--ndw-spacing-lg);
20
+ }
21
+
22
+ .header,
23
+ .content {
24
+ display: grid;
25
+ gap: var(--ndw-spacing-md);
26
+ grid-template-columns: repeat(3, 2fr);
27
+ }
28
+
29
+ .header {
30
+ font-weight: var(--ndw-font-weight-bold);
31
+ margin-top: calc(var(--ndw-spacing-md) * -1);
32
+ }
33
+
34
+ .content {
35
+ .block {
36
+ border: var(--ndw-border-size-sm) solid var(--ndw-color-grey-400);
37
+ height: var(--ndw-spacing-3xl);
38
+ width: var(--ndw-spacing-3xl);
39
+ }
40
+ }
41
+ }
42
+
43
+ &.colors {
44
+ section {
45
+ .header,
46
+ .content {
47
+ grid-template-columns: 3.5rem repeat(2, 2fr) 3fr;
48
+ }
49
+ }
50
+ }
51
+
52
+ &.typography {
53
+ section {
54
+ .header,
55
+ .content {
56
+ grid-template-columns: 4fr 2fr 7fr;
57
+ }
58
+ }
59
+ }
60
+ }
@@ -1,21 +1,21 @@
1
- * {
2
- -webkit-font-smoothing: antialiased;
3
- -moz-osx-font-smoothing: grayscale;
4
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
5
- -webkit-overflow-scrolling: touch;
6
- box-sizing: border-box;
7
- }
8
-
9
- body {
10
- font-family: var(--ndw-font-family-body);
11
- font-size: var(--ndw-base-font-size);
12
- }
13
-
14
- h1,
15
- h2,
16
- h3,
17
- h4,
18
- h5,
19
- h6 {
20
- font-family: var(--ndw-font-family-heading);
21
- }
1
+ * {
2
+ -webkit-font-smoothing: antialiased;
3
+ -moz-osx-font-smoothing: grayscale;
4
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
5
+ -webkit-overflow-scrolling: touch;
6
+ box-sizing: border-box;
7
+ }
8
+
9
+ body {
10
+ font-family: var(--ndw-font-family-body);
11
+ font-size: var(--ndw-base-font-size);
12
+ }
13
+
14
+ h1,
15
+ h2,
16
+ h3,
17
+ h4,
18
+ h5,
19
+ h6 {
20
+ font-family: var(--ndw-font-family-heading);
21
+ }
@@ -1,17 +1,17 @@
1
- @forward 'reset';
2
- @forward 'overrides';
3
- @forward 'core';
4
-
5
- .sb {
6
- box-sizing: border-box;
7
- display: flex;
8
- gap: var(--ndw-spacing-3xl);
9
- justify-content: center;
10
- min-height: calc(100vh - 8rem);
11
- padding: 4rem 1.5rem;
12
-
13
- &_content {
14
- max-width: 61.5rem;
15
- width: 100%;
16
- }
17
- }
1
+ @forward 'reset';
2
+ @forward 'overrides';
3
+ @forward 'core';
4
+
5
+ .sb {
6
+ box-sizing: border-box;
7
+ display: flex;
8
+ gap: var(--ndw-spacing-3xl);
9
+ justify-content: center;
10
+ min-height: calc(100vh - 8rem);
11
+ padding: 4rem 1.5rem;
12
+
13
+ &_content {
14
+ max-width: 61.5rem;
15
+ width: 100%;
16
+ }
17
+ }