@ndwnu/design-system 6.0.0 → 7.0.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 (204) hide show
  1. package/assets/icons.ts +83 -0
  2. package/fesm2022/ndwnu-design-system.mjs +869 -929
  3. package/fesm2022/ndwnu-design-system.mjs.map +1 -1
  4. package/index.d.ts +2 -5
  5. package/{components → lib/components}/card/card.component.d.ts +2 -1
  6. package/{components → lib/components}/form-field/checkbox/checkbox.component.d.ts +3 -2
  7. package/{components → lib/components}/form-field/clear-search-button/clear-search-button.component.d.ts +1 -1
  8. package/lib/components/form-field/clear-search-button/index.d.ts +1 -0
  9. package/{components → lib/components}/form-field/file-upload/file-upload.component.d.ts +8 -7
  10. package/{components → lib/components}/form-field/input-button/input-button.component.d.ts +1 -1
  11. package/{components → lib/components}/form-field/month-input/month-input.component.d.ts +8 -7
  12. package/{components → lib/components}/form-field/option-group/option-group.component.d.ts +7 -4
  13. package/lib/components/form-field/picker-button/index.d.ts +1 -0
  14. package/{components → lib/components}/form-field/picker-button/picker-button.component.d.ts +1 -2
  15. package/{components → lib/components}/icon/action-icon/action-icon.component.d.ts +1 -1
  16. package/lib/components/icon/icon.component.d.ts +6 -0
  17. package/{components → lib/components}/layout/layout.component.d.ts +2 -2
  18. package/{components → lib/components}/main-navigation/main-navigation.component.d.ts +2 -10
  19. package/lib/components/tab/tab.component.d.ts +17 -0
  20. package/{components → lib/components}/tab-group/tab-group.component.d.ts +7 -5
  21. package/{components → lib/components}/toast/toast.component.d.ts +4 -4
  22. package/package.json +14 -8
  23. package/styles/base/_colors.scss +234 -0
  24. package/styles/base/_typography.scss +135 -0
  25. package/styles/base/_variables.scss +79 -0
  26. package/styles/base/colors.stories.model.ts +143 -0
  27. package/styles/base/colors.stories.ts +14 -0
  28. package/styles/base/colors.stories.utils.ts +58 -0
  29. package/styles/base/index.scss +3 -0
  30. package/styles/base/typography.stories.ts +116 -0
  31. package/styles/components/_button.scss +133 -0
  32. package/styles/components/_card.scss +3 -0
  33. package/styles/components/_divider.scss +12 -0
  34. package/styles/components/_dropdown.scss +8 -0
  35. package/styles/components/_filter-button.scss +39 -0
  36. package/styles/components/_input.scss +198 -0
  37. package/styles/components/_label.scss +23 -0
  38. package/styles/components/_link.scss +35 -0
  39. package/styles/components/_menu-button.scss +38 -0
  40. package/styles/components/_popover.scss +19 -0
  41. package/styles/components/_summary-card.scss +227 -0
  42. package/styles/components/divider.stories.ts +80 -0
  43. package/styles/components/index.scss +11 -0
  44. package/styles/components/link.stories.ts +154 -0
  45. package/styles/index.scss +4 -0
  46. package/styles/layout/_grid.scss +57 -0
  47. package/styles/layout/_overlay.scss +7 -0
  48. package/styles/layout/grid.stories.ts +117 -0
  49. package/styles/layout/index.scss +2 -0
  50. package/styles/storybook/_core.scss +60 -0
  51. package/styles/storybook/_reset.scss +20 -0
  52. package/styles/storybook/index.scss +17 -0
  53. package/styles/storybook/overrides/_buttons.scss +95 -0
  54. package/styles/storybook/overrides/_code-previews.scss +97 -0
  55. package/styles/storybook/overrides/_content.scss +24 -0
  56. package/styles/storybook/overrides/_headers.scss +31 -0
  57. package/styles/storybook/overrides/_layout.scss +44 -0
  58. package/styles/storybook/overrides/_table.scss +112 -0
  59. package/styles/storybook/overrides/index.scss +6 -0
  60. package/styles/storybook/overrides.css +343 -0
  61. package/styles/utils/_screenreader.scss +18 -0
  62. package/styles/utils/index.scss +1 -0
  63. package/assets/fonts/ObjectSans-Bold.woff2 +0 -0
  64. package/assets/fonts/ObjectSans-Regular.woff2 +0 -0
  65. package/components/icon/icon.component.d.ts +0 -13
  66. package/components/tab/tab.component.d.ts +0 -9
  67. package/core/style/styles.css +0 -1380
  68. package/core/style/styles.scss +0 -1380
  69. package/public-api.d.ts +0 -1
  70. package/assets/images/{ndw-logo-short.svg → logos/ndw-logo-short.svg} +0 -0
  71. package/assets/images/{ndw-logo.svg → logos/ndw-logo.svg} +0 -0
  72. package/assets/images/{nwb-logo-short.svg → logos/nwb-logo-short.svg} +0 -0
  73. package/assets/images/{nwb-logo.svg → logos/nwb-logo.svg} +0 -0
  74. package/{components → lib/components}/accordion/accordion.component.d.ts +0 -0
  75. package/{components → lib/components}/accordion/accordion.service.d.ts +0 -0
  76. package/{components → lib/components}/accordion/index.d.ts +0 -0
  77. package/{components → lib/components}/alert/alert.component.d.ts +0 -0
  78. package/{components → lib/components}/alert/alert.model.d.ts +0 -0
  79. package/{components → lib/components}/alert/index.d.ts +0 -0
  80. package/{components → lib/components}/badge/badge.component.d.ts +0 -0
  81. package/{components → lib/components}/badge/index.d.ts +0 -0
  82. package/{components → lib/components}/banner/banner.component.d.ts +0 -0
  83. package/{components → lib/components}/banner/banner.model.d.ts +0 -0
  84. package/{components → lib/components}/banner/index.d.ts +0 -0
  85. package/{components → lib/components}/breadcrumb/breadcrumb.component.d.ts +0 -0
  86. package/{components → lib/components}/breadcrumb/index.d.ts +0 -0
  87. package/{components → lib/components}/breadcrumb-group/breadcrumb-group.component.d.ts +0 -0
  88. package/{components → lib/components}/breadcrumb-group/index.d.ts +0 -0
  89. package/{components → lib/components}/button/button.directive.d.ts +0 -0
  90. package/{components → lib/components}/button/index.d.ts +0 -0
  91. package/{components → lib/components}/card/card-content/card-content.component.d.ts +0 -0
  92. package/{components → lib/components}/card/card-content/index.d.ts +0 -0
  93. package/{components → lib/components}/card/card-footer/card-footer.component.d.ts +0 -0
  94. package/{components → lib/components}/card/card-footer/index.d.ts +0 -0
  95. package/{components → lib/components}/card/card-header/card-header.component.d.ts +0 -0
  96. package/{components → lib/components}/card/card-header/index.d.ts +0 -0
  97. package/{components → lib/components}/card/card.animation.d.ts +0 -0
  98. package/{components → lib/components}/card/index.d.ts +0 -0
  99. package/{components → lib/components}/collapsible/collapsible.animation.d.ts +0 -0
  100. package/{components → lib/components}/collapsible/collapsible.component.d.ts +0 -0
  101. package/{components → lib/components}/collapsible/index.d.ts +0 -0
  102. package/{components → lib/components}/dashboard-card/dashboard-card.component.d.ts +0 -0
  103. package/{components → lib/components}/dashboard-card/index.d.ts +0 -0
  104. package/{components → lib/components}/dropdown/dropdown.component.d.ts +0 -0
  105. package/{components → lib/components}/dropdown/index.d.ts +0 -0
  106. package/{components → lib/components}/form-field/autosuggest/autosuggest-add-option/autosuggest-add-option.component.d.ts +0 -0
  107. package/{components → lib/components}/form-field/autosuggest/autosuggest-add-option/index.d.ts +0 -0
  108. package/{components → lib/components}/form-field/autosuggest/autosuggest-option/autosuggest-option.component.d.ts +0 -0
  109. package/{components → lib/components}/form-field/autosuggest/autosuggest-option/autosuggest-option.model.d.ts +0 -0
  110. package/{components → lib/components}/form-field/autosuggest/autosuggest-option/base-autosuggest-option.component.d.ts +0 -0
  111. package/{components → lib/components}/form-field/autosuggest/autosuggest-option/index.d.ts +0 -0
  112. package/{components → lib/components}/form-field/autosuggest/autosuggest-panel/autosuggest-panel.component.d.ts +0 -0
  113. package/{components → lib/components}/form-field/autosuggest/autosuggest.directive.d.ts +0 -0
  114. package/{components → lib/components}/form-field/autosuggest/index.d.ts +0 -0
  115. package/{components → lib/components}/form-field/autosuggest/match-bold.pipe.d.ts +0 -0
  116. package/{components → lib/components}/form-field/checkbox/index.d.ts +0 -0
  117. package/{components → lib/components}/form-field/checkbox-group/checkbox-group.component.d.ts +0 -0
  118. package/{components → lib/components}/form-field/checkbox-group/index.d.ts +0 -0
  119. package/{components → lib/components}/form-field/error/error.component.d.ts +0 -0
  120. package/{components → lib/components}/form-field/error/index.d.ts +0 -0
  121. package/{components → lib/components}/form-field/file-upload/file-upload-text.interface.d.ts +0 -0
  122. package/{components → lib/components}/form-field/file-upload/index.d.ts +0 -0
  123. package/{components → lib/components}/form-field/form-field.component.d.ts +0 -0
  124. package/{components → lib/components}/form-field/form-field.constant.d.ts +0 -0
  125. package/{components → lib/components}/form-field/form-field.model.d.ts +0 -0
  126. package/{components → lib/components}/form-field/index.d.ts +0 -0
  127. package/{components → lib/components}/form-field/info/index.d.ts +0 -0
  128. package/{components → lib/components}/form-field/info/info.component.d.ts +0 -0
  129. package/{components → lib/components}/form-field/input/index.d.ts +0 -0
  130. package/{components → lib/components}/form-field/input/input.directive.d.ts +0 -0
  131. package/{components → lib/components}/form-field/input/input.model.d.ts +0 -0
  132. package/{components → lib/components}/form-field/input-button/index.d.ts +0 -0
  133. package/{components → lib/components}/form-field/input-icon/index.d.ts +0 -0
  134. package/{components → lib/components}/form-field/input-icon/input-icon.component.d.ts +0 -0
  135. package/{components → lib/components}/form-field/month-input/index.d.ts +0 -0
  136. package/{components → lib/components}/form-field/month-input/month-input-utils.d.ts +0 -0
  137. package/{components → lib/components}/form-field/option-group/index.d.ts +0 -0
  138. package/{components → lib/components}/form-field/option-group/option-group.model.d.ts +0 -0
  139. package/{components → lib/components}/form-field/option-group/option.component.d.ts +0 -0
  140. package/{components → lib/components}/form-field/radio-button/index.d.ts +0 -0
  141. package/{components → lib/components}/form-field/radio-button/radio-button.component.d.ts +0 -0
  142. package/{components → lib/components}/form-field/radio-group/index.d.ts +0 -0
  143. package/{components → lib/components}/form-field/radio-group/radio-group.component.d.ts +0 -0
  144. package/{components → lib/components}/form-field/success/index.d.ts +0 -0
  145. package/{components → lib/components}/form-field/success/success.component.d.ts +0 -0
  146. package/{components → lib/components}/form-field/textarea/auto-grow.directive.d.ts +0 -0
  147. package/{components → lib/components}/form-field/textarea/index.d.ts +0 -0
  148. package/{components → lib/components}/form-field/textarea/max-char.directive.d.ts +0 -0
  149. package/{components → lib/components}/icon/action-icon/index.d.ts +0 -0
  150. package/{components → lib/components}/icon/index.d.ts +0 -0
  151. package/{components → lib/components}/index.d.ts +0 -0
  152. package/{components → lib/components}/layout/index.d.ts +0 -0
  153. package/{components → lib/components}/layout-banners/index.d.ts +0 -0
  154. package/{components → lib/components}/layout-banners/layout-banners.component.d.ts +0 -0
  155. package/{components → lib/components}/loader/index.d.ts +0 -0
  156. package/{components → lib/components}/loader/loader.component.d.ts +0 -0
  157. package/{components → lib/components}/main-navigation/index.d.ts +0 -0
  158. package/{components → lib/components}/main-navigation/main-navigation.imports.d.ts +0 -0
  159. package/{components → lib/components}/main-navigation/main-navigation.model.d.ts +0 -0
  160. package/{components → lib/components}/main-navigation-menu/index.d.ts +0 -0
  161. package/{components → lib/components}/main-navigation-menu/main-navigation-menu.component.d.ts +0 -0
  162. package/{components → lib/components}/modal/index.d.ts +0 -0
  163. package/{components → lib/components}/modal/modal-content/index.d.ts +0 -0
  164. package/{components → lib/components}/modal/modal-content/modal-content.component.d.ts +0 -0
  165. package/{components → lib/components}/modal/modal-footer/index.d.ts +0 -0
  166. package/{components → lib/components}/modal/modal-footer/modal-footer.component.d.ts +0 -0
  167. package/{components → lib/components}/modal/modal-header/index.d.ts +0 -0
  168. package/{components → lib/components}/modal/modal-header/modal-header.component.d.ts +0 -0
  169. package/{components → lib/components}/modal/modal-ref.d.ts +0 -0
  170. package/{components → lib/components}/modal/modal.component.d.ts +0 -0
  171. package/{components → lib/components}/modal/modal.service.d.ts +0 -0
  172. package/{components → lib/components}/multi-select/checkbox-data.interface.d.ts +0 -0
  173. package/{components → lib/components}/multi-select/index.d.ts +0 -0
  174. package/{components → lib/components}/multi-select/multi-select.component.d.ts +0 -0
  175. package/{components → lib/components}/multi-select/select-all-text.interface.d.ts +0 -0
  176. package/{components → lib/components}/pill/index.d.ts +0 -0
  177. package/{components → lib/components}/pill/pill.component.d.ts +0 -0
  178. package/{components → lib/components}/pill/pill.model.d.ts +0 -0
  179. package/{components → lib/components}/popover/index.d.ts +0 -0
  180. package/{components → lib/components}/popover/popover-trigger.directive.d.ts +0 -0
  181. package/{components → lib/components}/router-breadcrumbs/index.d.ts +0 -0
  182. package/{components → lib/components}/router-breadcrumbs/router-breadcrumbs.component.d.ts +0 -0
  183. package/{components → lib/components}/summary-card/index.d.ts +0 -0
  184. package/{components → lib/components}/summary-card/summary-card-action/summary-card-action.component.d.ts +0 -0
  185. package/{components → lib/components}/summary-card/summary-card-actions/summary-card-actions.component.d.ts +0 -0
  186. package/{components → lib/components}/summary-card/summary-card-avatar/summary-card-avatar.component.d.ts +0 -0
  187. package/{components → lib/components}/summary-card/summary-card-content/summary-card-content.component.d.ts +0 -0
  188. package/{components → lib/components}/summary-card/summary-card-header/summary-card-header.component.d.ts +0 -0
  189. package/{components → lib/components}/summary-card/summary-card-subtitle/summary-card-subtitle.component.d.ts +0 -0
  190. package/{components → lib/components}/summary-card/summary-card-tag/summary-card-tag.component.d.ts +0 -0
  191. package/{components → lib/components}/summary-card/summary-card-tags/summary-card-tags.component.d.ts +0 -0
  192. package/{components → lib/components}/summary-card/summary-card.component.d.ts +0 -0
  193. package/{components → lib/components}/summary-card/summary-card.model.d.ts +0 -0
  194. package/{components → lib/components}/tab/index.d.ts +0 -0
  195. package/{components → lib/components}/tab-group/index.d.ts +0 -0
  196. package/{components → lib/components}/tag/index.d.ts +0 -0
  197. package/{components → lib/components}/tag/tag.component.d.ts +0 -0
  198. package/{components → lib/components}/toast/index.d.ts +0 -0
  199. package/{components → lib/components}/toast/toast.service.d.ts +0 -0
  200. package/{components → lib/components}/tooltip/index.d.ts +0 -0
  201. package/{components → lib/components}/tooltip/tooltip.component.d.ts +0 -0
  202. package/{components → lib/components}/tooltip/tooltip.directive.d.ts +1 -1
  203. /package/{models → lib/models}/aria.model.d.ts +0 -0
  204. /package/{models → lib/models}/index.d.ts +0 -0
@@ -0,0 +1,39 @@
1
+ [ndwButton] {
2
+ &[filter] {
3
+ background-color: var(--ndw-color-white);
4
+ border-color: var(--ndw-color-grey-300);
5
+ color: var(--ndw-color-grey-700);
6
+ height: var(--ndw-spacing-2xl);
7
+
8
+ ndw-icon.button-icon {
9
+ color: var(--ndw-color-primary);
10
+ }
11
+
12
+ ndw-icon.prefix-icon {
13
+ color: var(--ndw-color-grey-300);
14
+ }
15
+
16
+ &:hover {
17
+ border-color: var(--ndw-color-primary);
18
+ }
19
+
20
+ &:active,
21
+ &:focus,
22
+ &:focus-visible {
23
+ border-color: var(--ndw-color-info-500);
24
+ box-shadow: var(--ndw-elevation-info);
25
+ outline-color: var(--ndw-color-info-500);
26
+ }
27
+
28
+ &[disabled] {
29
+ background-color: var(--ndw-color-grey-100);
30
+ color: var(--ndw-color-grey-500);
31
+ pointer-events: none;
32
+ user-select: none;
33
+
34
+ ndw-icon {
35
+ color: var(--ndw-color-grey-500);
36
+ }
37
+ }
38
+ }
39
+ }
@@ -0,0 +1,198 @@
1
+ // Styles shared between regular [ndwInput] and [ndwInput] inside .input-container.
2
+ @mixin shared-style() {
3
+ display: flex;
4
+ align-items: center;
5
+ background-color: var(--ndw-color-white);
6
+ border: var(--ndw-border-size-sm) solid var(--ndw-color-grey-300);
7
+ border-radius: var(--ndw-border-radius-sm);
8
+ box-sizing: border-box;
9
+ outline: var(--ndw-border-size-sm) solid transparent;
10
+ outline-offset: calc(var(--ndw-border-size-sm) * -1);
11
+ transition: (
12
+ background-color 150ms ease-in-out,
13
+ border-color 150ms ease-in-out,
14
+ outline-color 150ms ease-in-out
15
+ );
16
+
17
+ &:has([ndwInput]:hover) {
18
+ border-color: var(--ndw-color-grey-400);
19
+ }
20
+
21
+ &:has([ndwInput]:active),
22
+ &:has([ndwInput]:focus),
23
+ &:has([ndwInput]:focus-visible) {
24
+ border-color: transparent;
25
+ box-shadow: var(--ndw-elevation-info);
26
+ outline-color: var(--ndw-color-info-500);
27
+ }
28
+
29
+ &[success] {
30
+ background-color: var(--ndw-color-positive-100);
31
+ border-color: var(--ndw-color-positive-500);
32
+
33
+ &:hover {
34
+ border-color: var(--ndw-color-grey-300);
35
+ }
36
+
37
+ &:active,
38
+ &:focus,
39
+ &:focus-visible {
40
+ background-color: var(--ndw-color-white);
41
+ border-color: transparent;
42
+ outline-color: var(--ndw-color-secondary-500);
43
+ }
44
+ }
45
+
46
+ &[error] {
47
+ background-color: var(--ndw-color-critical-100);
48
+ border-color: var(--ndw-color-critical-500);
49
+
50
+ &:hover {
51
+ border-color: var(--ndw-color-grey-300);
52
+ }
53
+
54
+ &:active,
55
+ &:focus,
56
+ &:focus-visible {
57
+ background-color: var(--ndw-color-white);
58
+ border-color: transparent;
59
+ outline-color: var(--ndw-color-secondary-500);
60
+ }
61
+ }
62
+
63
+ &[disabled],
64
+ &[readonly],
65
+ &:has([ndwInput]:disabled),
66
+ &:has([ndwInput]:read-only):not(:has(select[ndwInput])) {
67
+ background-color: var(--ndw-color-grey-100);
68
+ border-color: var(--ndw-color-grey-300);
69
+ color: var(--ndw-color-grey-500);
70
+ pointer-events: none;
71
+
72
+ ndw-icon {
73
+ color: var(--ndw-color-grey-300);
74
+ }
75
+ }
76
+ }
77
+
78
+ // Add input container right padding when select element is used
79
+ .input-container:has(> select[ndwInput]) {
80
+ padding-inline-end: var(--ndw-spacing-xs);
81
+ }
82
+
83
+ // When an ndwInput is contained in an input-container hide the
84
+ // ndwInput borders and instead put the borders on the container.
85
+ .input-container:has(> [ndwInput]) {
86
+ @include shared-style();
87
+
88
+ // When input has a ndw-input-icon enable the inline padding
89
+ &:has(> ndw-input-icon) {
90
+ padding-inline: var(--ndw-spacing-xs);
91
+ }
92
+ &:has(> ndw-picker-button) {
93
+ padding-inline-end: var(--ndw-spacing-xs);
94
+ }
95
+
96
+ gap: var(--ndw-spacing-xs);
97
+
98
+ // Any elements before the input have a lighter grey color
99
+ > *:has(~ [ndwInput]) {
100
+ color: var(--ndw-color-grey-400);
101
+ }
102
+
103
+ // Remove inline padding when the input has prefix or suffix items
104
+ * + [ndwInput] {
105
+ padding-inline-start: 0;
106
+ }
107
+
108
+ [ndwInput]:has(+ *) {
109
+ padding-inline-end: 0;
110
+ }
111
+ [ndwInput]:is(textarea) {
112
+ padding-inline-end: var(--ndw-spacing-sm);
113
+ }
114
+
115
+ // Except when the input is a select, to prevent text from overflowing the chevron
116
+ select[ndwInput]:has(+ *) {
117
+ padding-inline-end: 0;
118
+ }
119
+
120
+ // Remove border from the input, the container has the borders
121
+ [ndwInput] {
122
+ border: none;
123
+ outline: none;
124
+
125
+ &:hover,
126
+ &:active,
127
+ &:focus,
128
+ &:focus-visible {
129
+ border: none;
130
+ outline: none;
131
+ }
132
+ }
133
+
134
+ &:has(textarea) {
135
+ padding-inline: 0;
136
+ }
137
+ }
138
+
139
+ [ndwInput] {
140
+ @include shared-style();
141
+
142
+ width: 100%;
143
+ padding-inline: var(--ndw-spacing-sm);
144
+ color: var(--ndw-color-grey-700);
145
+ font-family: var(--ndw-font-family-body);
146
+ font-size: var(--ndw-font-size-sm);
147
+ height: var(--ndw-spacing-2xl);
148
+ line-height: var(--ndw-line-height-md);
149
+ border-radius: var(--ndw-border-radius-sm);
150
+ text-overflow: ellipsis;
151
+ white-space: nowrap;
152
+
153
+ &::placeholder {
154
+ color: var(--ndw-color-grey-400);
155
+ }
156
+
157
+ // Hide clear button in search inputs on chrome-based browsers
158
+ &[type='search']::-webkit-search-decoration,
159
+ &[type='search']::-webkit-search-cancel-button,
160
+ &[type='search']::-webkit-search-results-button,
161
+ &[type='search']::-webkit-search-results-decoration {
162
+ display: none;
163
+ }
164
+
165
+ &[type='date'],
166
+ &[type='datetime-local'],
167
+ &[type='month'],
168
+ &[type='time'],
169
+ &[type='week'] {
170
+ &::-webkit-calendar-picker-indicator {
171
+ cursor: pointer;
172
+ opacity: 0;
173
+ }
174
+ }
175
+ }
176
+
177
+ select[ndwInput] {
178
+ appearance: none;
179
+ cursor: pointer;
180
+
181
+ &[ndw-placeholder],
182
+ option[disabled] {
183
+ color: var(--ndw-color-grey-400);
184
+ }
185
+
186
+ option:not([disabled]) {
187
+ color: var(--ndw-color-grey-700);
188
+ }
189
+ }
190
+
191
+ textarea[ndwInput] {
192
+ min-height: 4rem;
193
+ padding-block: calc(var(--ndw-spacing-xs) + var(--ndw-border-size-sm));
194
+ padding-inline: var(--ndw-spacing-sm);
195
+ line-height: normal;
196
+ white-space: pre-wrap;
197
+ resize: vertical;
198
+ }
@@ -0,0 +1,23 @@
1
+ [ndwLabel] {
2
+ align-content: center;
3
+ align-items: center;
4
+ display: grid;
5
+ font-family: var(--ndw-font-family-body);
6
+ font-size: var(--ndw-font-size-sm);
7
+ font-weight: var(--ndw-font-weight-bold);
8
+ gap: var(--ndw-spacing-3xs);
9
+ grid-template-columns: repeat(3, auto);
10
+ justify-content: start;
11
+ line-height: 100%;
12
+ margin-bottom: var(--ndw-spacing-2xs);
13
+
14
+ ndw-icon {
15
+ color: var(--ndw-color-grey-400);
16
+ font-size: var(--ndw-icon-size-md);
17
+ margin-top: calc(var(--ndw-spacing-3xs) * -1);
18
+ }
19
+
20
+ .required {
21
+ color: var(--ndw-color-grey-400);
22
+ }
23
+ }
@@ -0,0 +1,35 @@
1
+ [ndwLink] {
2
+ display: inline-flex;
3
+ align-items: baseline;
4
+ gap: var(--ndw-spacing-2xs);
5
+ padding: 0;
6
+ border: 0;
7
+
8
+ font-size: inherit;
9
+ text-decoration: underline var(--ndw-border-size-sm) transparent;
10
+ text-underline-offset: var(--ndw-border-size-md);
11
+
12
+ color: var(--ndw-color-link-400);
13
+ background-color: transparent;
14
+ transition: text-decoration-color var(--ndw-animation-speed-fast) ease-in-out;
15
+
16
+ > * {
17
+ align-self: center;
18
+ }
19
+
20
+ ndw-icon {
21
+ font-size: 1.25em;
22
+ overflow: hidden;
23
+ }
24
+
25
+ &:hover {
26
+ color: var(--ndw-color-link-500);
27
+ text-decoration-color: var(--ndw-color-link-500);
28
+ }
29
+
30
+ &[disabled] {
31
+ color: var(--ndw-color-grey-400);
32
+ pointer-events: none;
33
+ user-select: none;
34
+ }
35
+ }
@@ -0,0 +1,38 @@
1
+ [ndwButton] {
2
+ &[menu] {
3
+ background-color: transparent;
4
+ border-color: transparent;
5
+ border-radius: 0;
6
+ color: var(--ndw-color-grey-400);
7
+ gap: var(--ndw-spacing-xs);
8
+ height: 2.625rem;
9
+ padding-inline: 0;
10
+ position: relative;
11
+ width: 100%;
12
+ cursor: default;
13
+
14
+ &:hover,
15
+ &:active,
16
+ &[active],
17
+ &[selected] {
18
+ color: var(--ndw-color-white);
19
+ cursor: pointer;
20
+ }
21
+
22
+ &:active,
23
+ &[selected] {
24
+ background-color: transparent;
25
+ border-color: transparent;
26
+ }
27
+
28
+ &:hover,
29
+ &[active] {
30
+ background-color: var(--ndw-color-grey-600);
31
+ border-color: var(--ndw-color-grey-600);
32
+ }
33
+
34
+ &:not([clickable]) {
35
+ cursor: default;
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,19 @@
1
+ @keyframes show {
2
+ from {
3
+ opacity: 0;
4
+ }
5
+ to {
6
+ opacity: 1;
7
+ }
8
+ }
9
+
10
+ .cdk-overlay-pane {
11
+ &.ndw-popover-panel {
12
+ animation: show var(--ndw-animation-speed-fast) ease-out;
13
+ background-color: var(--ndw-color-white);
14
+ border-radius: var(--ndw-border-radius-md);
15
+ box-shadow: var(--ndw-elevation-popover);
16
+ display: grid;
17
+ padding: var(--ndw-spacing-sm);
18
+ }
19
+ }
@@ -0,0 +1,227 @@
1
+ .ndw-summary-card {
2
+ display: block;
3
+
4
+ &__wrapper {
5
+ position: relative;
6
+ overflow: hidden;
7
+
8
+ display: grid;
9
+ gap: var(--ndw-spacing-md);
10
+ height: 100%;
11
+ align-items: start;
12
+ box-sizing: border-box;
13
+
14
+ &:has(ndw-summary-card-avatar) {
15
+ grid-template-columns: max-content 1fr;
16
+ }
17
+
18
+ &:has(a:focus:not(:active)) {
19
+ outline: var(--ndw-border-size-sm) solid var(--ndw-color-secondary-500);
20
+ }
21
+ }
22
+
23
+ &__content {
24
+ display: grid;
25
+ gap: var(--ndw-spacing-xs);
26
+ }
27
+
28
+ .ndw-summary-card-tags {
29
+ display: flex;
30
+ flex-wrap: wrap;
31
+ gap: var(--ndw-spacing-xs);
32
+ }
33
+
34
+ .ndw-summary-card-tag {
35
+ display: flex;
36
+ flex-wrap: nowrap;
37
+ gap: var(--ndw-spacing-2xs);
38
+ align-items: center;
39
+
40
+ border: 1px solid var(--ndw-color-grey-100);
41
+ border-radius: var(--ndw-border-radius-xs);
42
+ padding: var(--ndw-spacing-2xs);
43
+
44
+ color: var(--ndw-color-grey-500);
45
+ font-size: var(--ndw-font-size-xs);
46
+
47
+ ndw-icon {
48
+ font-size: var(--ndw-font-size-sm);
49
+ }
50
+
51
+ img {
52
+ display: block;
53
+ height: var(--ndw-font-size-sm);
54
+ }
55
+ }
56
+
57
+ .ndw-summary-card-subtitle {
58
+ display: grid;
59
+ grid-template-columns: max-content 1fr;
60
+ align-items: center;
61
+ gap: var(--ndw-spacing-3xs);
62
+
63
+ color: var(--ndw-color-grey-500);
64
+ font-size: var(--ndw-font-size-xs);
65
+
66
+ ndw-icon {
67
+ font-size: var(--ndw-font-size-sm);
68
+ }
69
+
70
+ &__text {
71
+ overflow: hidden;
72
+ text-overflow: ellipsis;
73
+ white-space: nowrap;
74
+ }
75
+ }
76
+
77
+ .ndw-summary-card-header {
78
+ display: flex;
79
+ gap: var(--ndw-spacing-xs);
80
+
81
+ &__wrapper {
82
+ display: grid;
83
+ gap: var(--ndw-spacing-2xs);
84
+ justify-items: left;
85
+ }
86
+
87
+ &__title {
88
+ width: 100%;
89
+ white-space: nowrap;
90
+ overflow: hidden;
91
+ text-overflow: ellipsis;
92
+ margin: 0;
93
+
94
+ font-size: var(--ndw-base-font-size);
95
+ font-weight: var(--ndw-font-weight-bold);
96
+ font-family: var(--ndw-font-family-heading);
97
+
98
+ a {
99
+ color: inherit;
100
+ text-decoration: none;
101
+ font-family: var(--ndw-font-family-heading);
102
+
103
+ &:hover {
104
+ text-decoration: underline;
105
+ }
106
+
107
+ &:after {
108
+ content: '';
109
+ position: absolute;
110
+ inset: 0;
111
+ }
112
+
113
+ &:focus {
114
+ outline: 0;
115
+ }
116
+ }
117
+ }
118
+ }
119
+
120
+ .ndw-summary-card-content {
121
+ overflow: hidden;
122
+ text-overflow: ellipsis;
123
+ display: -webkit-box;
124
+ -webkit-line-clamp: 2;
125
+ -webkit-box-orient: vertical;
126
+
127
+ font-family: var(--ndw-font-family-body);
128
+ font-size: var(--ndw-font-size-sm);
129
+ color: var(--ndw-color-grey-500);
130
+ }
131
+
132
+ .ndw-summary-card-avatar {
133
+ display: grid;
134
+ place-content: center;
135
+ position: relative;
136
+ width: 30px;
137
+ aspect-ratio: 1 / 1;
138
+ border-radius: 50%;
139
+ font-size: var(--ndw-font-size-sm);
140
+
141
+ &.ndw-summary-card-avatar--default {
142
+ color: var(--ndw-color-grey-700);
143
+ background-color: var(--ndw-color-grey-300);
144
+ }
145
+
146
+ &.ndw-summary-card-avatar--orange {
147
+ color: var(--ndw-color-primary-700);
148
+ background-color: var(--ndw-color-primary-050);
149
+ }
150
+
151
+ &.ndw-summary-card-avatar--blue {
152
+ color: var(--ndw-color-info-500);
153
+ background-color: var(--ndw-color-info-100);
154
+ }
155
+
156
+ &.ndw-summary-card-avatar--green {
157
+ color: var(--ndw-color-positive-500);
158
+ background-color: var(--ndw-color-positive-100);
159
+ }
160
+
161
+ &.ndw-summary-card-avatar--red {
162
+ color: var(--ndw-color-critical-500);
163
+ background-color: var(--ndw-color-critical-100);
164
+ }
165
+
166
+ &.ndw-summary-card-avatar--yellow {
167
+ color: var(--ndw-color-warning-500);
168
+ background-color: var(--ndw-color-warning-100);
169
+ }
170
+
171
+ &.ndw-summary-card-avatar--purple {
172
+ color: var(--ndw-color-alternative-500);
173
+ background-color: var(--ndw-color-alternative-100);
174
+ }
175
+
176
+ > img {
177
+ display: block;
178
+ width: 100%;
179
+ height: 100%;
180
+ object-fit: cover;
181
+ border-radius: 50%;
182
+ }
183
+
184
+ ndw-icon {
185
+ font-size: var(--ndw-font-size-lg);
186
+ }
187
+ }
188
+
189
+ .ndw-summary-card-actions {
190
+ flex: 1;
191
+ display: flex;
192
+ justify-content: flex-end;
193
+
194
+ &--auto {
195
+ container-type: inline-size;
196
+ }
197
+
198
+ .actions {
199
+ gap: var(--ndw-spacing-2xs);
200
+
201
+ &--popover {
202
+ display: grid;
203
+ }
204
+
205
+ &--visible,
206
+ &--auto {
207
+ display: flex;
208
+ }
209
+ }
210
+
211
+ .popover-wrapper {
212
+ display: block;
213
+
214
+ @container (width > 140px) {
215
+ display: none;
216
+ }
217
+ }
218
+
219
+ .regular-wrapper {
220
+ display: none;
221
+
222
+ @container (width > 140px) {
223
+ display: block;
224
+ }
225
+ }
226
+ }
227
+ }
@@ -0,0 +1,80 @@
1
+ import { type Meta, type StoryObj } from '@storybook/angular';
2
+
3
+ interface StoryArgs {
4
+ noMargin: boolean;
5
+ }
6
+
7
+ const args: StoryArgs = {
8
+ noMargin: false,
9
+ };
10
+
11
+ /**
12
+ * The divider is used to separate content.
13
+ *
14
+ * ## Usage
15
+ *
16
+ * Use the `<hr />` element with the `ndwDivider` attribute to add a horizontal line to separate content.
17
+ *
18
+ * ```html
19
+ * [[ content ]]
20
+ * <hr ndwDivider />
21
+ * [[ content ]]
22
+ * ```
23
+ *
24
+ * ### No margin
25
+ *
26
+ * To remove the default margin from the divider, use the `[noMargin]` attribute.
27
+ *
28
+ * ```html
29
+ * [[ content ]]
30
+ * <hr ndwDivider noMargin />
31
+ * [[ content ]]
32
+ * ```
33
+ */
34
+
35
+ const meta: Meta<StoryArgs> = {
36
+ tags: ['autodocs', 'ndw', 'nwb'],
37
+ title: 'Components/Divider',
38
+ render: (props) => ({
39
+ props,
40
+ styles: [
41
+ `
42
+ .content {
43
+ background-color: var(--ndw-color-grey-200);
44
+ padding: var(--ndw-spacing-xs);
45
+ }
46
+ `,
47
+ ],
48
+ template: `
49
+ <div class="content">
50
+ Content
51
+ </div>
52
+ <hr ndwDivider ${props.noMargin ? 'noMargin' : ''} />
53
+ <div class="content">
54
+ Content
55
+ </div>
56
+ `,
57
+ }),
58
+ args,
59
+ argTypes: {
60
+ noMargin: {
61
+ control: 'boolean',
62
+ description: 'Remove the default margin from the divider.',
63
+ name: '[noMargin]',
64
+ table: {
65
+ category: 'Inputs',
66
+ defaultValue: { summary: 'false' },
67
+ },
68
+ },
69
+ },
70
+ };
71
+ export default meta;
72
+ type Story = StoryObj;
73
+
74
+ export const Default: Story = {};
75
+
76
+ export const NoMargin: Story = {
77
+ args: {
78
+ noMargin: true,
79
+ },
80
+ };
@@ -0,0 +1,11 @@
1
+ @forward 'button';
2
+ @forward 'card';
3
+ @forward 'divider';
4
+ @forward 'dropdown';
5
+ @forward 'filter-button';
6
+ @forward 'input';
7
+ @forward 'label';
8
+ @forward 'link';
9
+ @forward 'menu-button';
10
+ @forward 'popover';
11
+ @forward 'summary-card';