@ndwnu/design-system 14.2.1 → 14.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +1539 -1525
- package/README.md +4 -4
- package/assets/icons.ts +83 -83
- package/fesm2022/ndwnu-design-system.mjs +260 -220
- package/fesm2022/ndwnu-design-system.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/FONTS.md +46 -46
- package/styles/base/_colors.scss +246 -246
- package/styles/base/_fonts.scss +13 -13
- package/styles/base/_material.scss +17 -17
- package/styles/base/_typography.scss +133 -133
- package/styles/base/_variables.scss +92 -92
- package/styles/base/colors.stories.model.ts +85 -85
- package/styles/base/colors.stories.ts +24 -24
- package/styles/base/index.scss +5 -5
- package/styles/base/typography.stories.ts +111 -111
- package/styles/components/_button.scss +133 -133
- package/styles/components/_card.scss +3 -3
- package/styles/components/_datepicker.scss +134 -134
- package/styles/components/_divider.scss +10 -10
- package/styles/components/_dropdown.scss +8 -8
- package/styles/components/_edit-bar.scss +97 -97
- package/styles/components/_filter-button.scss +39 -39
- package/styles/components/_guided-tour.scss +70 -70
- package/styles/components/_input.scss +253 -253
- package/styles/components/_label.scss +23 -23
- package/styles/components/_link.scss +36 -36
- package/styles/components/_list-item.scss +7 -7
- package/styles/components/_map.scss +144 -114
- package/styles/components/_menu-button.scss +37 -37
- package/styles/components/_popover.scss +19 -19
- package/styles/components/_summary-card.scss +205 -183
- package/styles/components/_table.scss +8 -8
- package/styles/components/divider.stories.ts +80 -80
- package/styles/components/index.scss +17 -17
- package/styles/components/link.stories.ts +154 -154
- package/styles/index.scss +4 -4
- package/styles/layout/_grid.scss +165 -165
- package/styles/layout/_overlay.scss +7 -7
- package/styles/layout/grid.stories.ts +168 -168
- package/styles/layout/index.scss +2 -2
- package/styles/storybook/_core.scss +60 -60
- package/styles/storybook/_reset.scss +21 -21
- package/styles/storybook/index.scss +17 -17
- package/styles/storybook/overrides/_buttons.scss +95 -95
- package/styles/storybook/overrides/_code-previews.scss +97 -97
- package/styles/storybook/overrides/_content.scss +24 -24
- package/styles/storybook/overrides/_headers.scss +31 -31
- package/styles/storybook/overrides/_layout.scss +44 -44
- package/styles/storybook/overrides/_table.scss +112 -112
- package/styles/storybook/overrides/index.scss +6 -6
- package/styles/storybook/overrides.css +355 -355
- package/styles/utils/_screenreader.scss +13 -13
- package/styles/utils/classes.stories.ts +157 -157
- package/styles/utils/index.scss +1 -1
- package/types/ndwnu-design-system.d.ts +46 -48
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
@use 'shepherd.js/dist/css/shepherd.css';
|
|
2
|
-
@use '../base/typography' as typo;
|
|
3
|
-
@use '../components/button' as ndwButton;
|
|
4
|
-
|
|
5
|
-
.shepherd-theme-ndw {
|
|
6
|
-
--image-height: 200px;
|
|
7
|
-
|
|
8
|
-
position: relative;
|
|
9
|
-
background-color: var(--ndw-color-white);
|
|
10
|
-
border-radius: var(--ndw-border-radius-md);
|
|
11
|
-
box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.5);
|
|
12
|
-
padding: var(--ndw-spacing-lg);
|
|
13
|
-
|
|
14
|
-
&.shepherd-has-title {
|
|
15
|
-
.shepherd-header {
|
|
16
|
-
padding: 0;
|
|
17
|
-
background-color: var(--ndw-color-white);
|
|
18
|
-
|
|
19
|
-
.shepherd-title {
|
|
20
|
-
@include typo.ndw-heading-sm;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// Add padding-top when image is present to make room for the absolute positioned image
|
|
26
|
-
&.shepherd-has-image {
|
|
27
|
-
padding-top: calc(var(--image-height) + var(--ndw-spacing-lg));
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.shepherd-text {
|
|
31
|
-
display: block;
|
|
32
|
-
padding: 0;
|
|
33
|
-
margin-block: var(--ndw-spacing-md);
|
|
34
|
-
@include typo.ndw-paragraph-md;
|
|
35
|
-
|
|
36
|
-
// Styling for optional step images - positioned absolutely above title
|
|
37
|
-
.shepherd-step-image {
|
|
38
|
-
position: absolute;
|
|
39
|
-
top: 0;
|
|
40
|
-
left: 0;
|
|
41
|
-
right: 0;
|
|
42
|
-
display: block;
|
|
43
|
-
width: 100%;
|
|
44
|
-
height: var(--image-height);
|
|
45
|
-
border-radius: var(--ndw-border-radius-md) var(--ndw-border-radius-md) 0 0;
|
|
46
|
-
object-fit: cover;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.shepherd-footer {
|
|
51
|
-
padding: 0;
|
|
52
|
-
|
|
53
|
-
.primary.shepherd-button {
|
|
54
|
-
@extend [ndwButton];
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.secondary.shepherd-button {
|
|
58
|
-
@extend [ndwButton], [secondary];
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.tertiary.shepherd-button {
|
|
62
|
-
@extend [ndwButton], [tertiary];
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// Override Shepherd's default grey arrow for elements with titles
|
|
67
|
-
&.shepherd-has-title[data-popper-placement^='bottom'] > .shepherd-arrow:before {
|
|
68
|
-
background-color: var(--ndw-color-white);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
1
|
+
@use 'shepherd.js/dist/css/shepherd.css';
|
|
2
|
+
@use '../base/typography' as typo;
|
|
3
|
+
@use '../components/button' as ndwButton;
|
|
4
|
+
|
|
5
|
+
.shepherd-theme-ndw {
|
|
6
|
+
--image-height: 200px;
|
|
7
|
+
|
|
8
|
+
position: relative;
|
|
9
|
+
background-color: var(--ndw-color-white);
|
|
10
|
+
border-radius: var(--ndw-border-radius-md);
|
|
11
|
+
box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.5);
|
|
12
|
+
padding: var(--ndw-spacing-lg);
|
|
13
|
+
|
|
14
|
+
&.shepherd-has-title {
|
|
15
|
+
.shepherd-header {
|
|
16
|
+
padding: 0;
|
|
17
|
+
background-color: var(--ndw-color-white);
|
|
18
|
+
|
|
19
|
+
.shepherd-title {
|
|
20
|
+
@include typo.ndw-heading-sm;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Add padding-top when image is present to make room for the absolute positioned image
|
|
26
|
+
&.shepherd-has-image {
|
|
27
|
+
padding-top: calc(var(--image-height) + var(--ndw-spacing-lg));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.shepherd-text {
|
|
31
|
+
display: block;
|
|
32
|
+
padding: 0;
|
|
33
|
+
margin-block: var(--ndw-spacing-md);
|
|
34
|
+
@include typo.ndw-paragraph-md;
|
|
35
|
+
|
|
36
|
+
// Styling for optional step images - positioned absolutely above title
|
|
37
|
+
.shepherd-step-image {
|
|
38
|
+
position: absolute;
|
|
39
|
+
top: 0;
|
|
40
|
+
left: 0;
|
|
41
|
+
right: 0;
|
|
42
|
+
display: block;
|
|
43
|
+
width: 100%;
|
|
44
|
+
height: var(--image-height);
|
|
45
|
+
border-radius: var(--ndw-border-radius-md) var(--ndw-border-radius-md) 0 0;
|
|
46
|
+
object-fit: cover;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.shepherd-footer {
|
|
51
|
+
padding: 0;
|
|
52
|
+
|
|
53
|
+
.primary.shepherd-button {
|
|
54
|
+
@extend [ndwButton];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.secondary.shepherd-button {
|
|
58
|
+
@extend [ndwButton], [secondary];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.tertiary.shepherd-button {
|
|
62
|
+
@extend [ndwButton], [tertiary];
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Override Shepherd's default grey arrow for elements with titles
|
|
67
|
+
&.shepherd-has-title[data-popper-placement^='bottom'] > .shepherd-arrow:before {
|
|
68
|
+
background-color: var(--ndw-color-white);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -1,253 +1,253 @@
|
|
|
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-info-500);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
&[error] {
|
|
47
|
-
background-color: var(--ndw-color-critical-100);
|
|
48
|
-
border-color: var(--ndw-color-critical-500);
|
|
49
|
-
|
|
50
|
-
[ndwInput] {
|
|
51
|
-
background-color: var(--ndw-color-critical-100);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&:hover {
|
|
55
|
-
border-color: var(--ndw-color-grey-300);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
&:active,
|
|
59
|
-
&:focus,
|
|
60
|
-
&:focus-visible {
|
|
61
|
-
background-color: var(--ndw-color-white);
|
|
62
|
-
border-color: transparent;
|
|
63
|
-
outline-color: var(--ndw-color-info-500);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
&[disabled],
|
|
68
|
-
&[readonly],
|
|
69
|
-
&:has([ndwInput]:disabled),
|
|
70
|
-
&:has([ndwInput]:read-only):not(:has(select[ndwInput])) {
|
|
71
|
-
background-color: var(--ndw-color-grey-100);
|
|
72
|
-
border-color: var(--ndw-color-grey-300);
|
|
73
|
-
color: var(--ndw-color-grey-500);
|
|
74
|
-
cursor: default;
|
|
75
|
-
|
|
76
|
-
&:hover,
|
|
77
|
-
&:has([ndwInput]:hover) {
|
|
78
|
-
border-color: var(--ndw-color-grey-300);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
&:has([ndwInput]:active),
|
|
82
|
-
&:has([ndwInput]:focus),
|
|
83
|
-
&:has([ndwInput]:focus-visible) {
|
|
84
|
-
border-color: var(--ndw-color-grey-300);
|
|
85
|
-
box-shadow: none;
|
|
86
|
-
outline-color: transparent;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
[ndwInput] {
|
|
90
|
-
background-color: var(--ndw-color-grey-100);
|
|
91
|
-
user-select: text;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
ndw-icon {
|
|
95
|
-
color: var(--ndw-color-grey-500);
|
|
96
|
-
pointer-events: none;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
@mixin input-focus-visible-label {
|
|
102
|
-
outline-color: Highlight;
|
|
103
|
-
outline-color: -webkit-focus-ring-color;
|
|
104
|
-
outline-style: auto;
|
|
105
|
-
outline-width: 1px;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.input-container:has([ndwInput][error]) {
|
|
109
|
-
background-color: var(--ndw-color-critical-100);
|
|
110
|
-
border-color: var(--ndw-color-critical-500);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// Add input container right padding when select element is used
|
|
114
|
-
.input-container:has(select[ndwInput]) {
|
|
115
|
-
padding-inline-end: var(--ndw-spacing-xs);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.input-container[error]:has([ndwInput]:is(:active, :focus, :focus-visible)) {
|
|
119
|
-
background-color: var(--ndw-color-white);
|
|
120
|
-
select[ndwInput] {
|
|
121
|
-
background-color: var(--ndw-color-white);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// When an ndwInput is contained in an input-container hide the
|
|
126
|
-
// ndwInput borders and instead put the borders on the container.
|
|
127
|
-
.input-container:has([ndwInput]) {
|
|
128
|
-
@include shared-style();
|
|
129
|
-
|
|
130
|
-
gap: var(--ndw-spacing-xs);
|
|
131
|
-
|
|
132
|
-
// When input has a ndw-input-icon enable the inline padding
|
|
133
|
-
&:has(> ndw-input-icon) {
|
|
134
|
-
padding-inline: var(--ndw-spacing-xs);
|
|
135
|
-
}
|
|
136
|
-
&:has(> ndw-picker-button) {
|
|
137
|
-
padding-inline-end: var(--ndw-spacing-xs);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
// Any elements before the input have a lighter grey color
|
|
141
|
-
> *:has(~ [ndwInput]) {
|
|
142
|
-
color: var(--ndw-color-grey-400);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// Remove inline padding when the input has prefix or suffix items
|
|
146
|
-
* + [ndwInput] {
|
|
147
|
-
padding-inline-start: 0;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
[ndwInput]:has(+ *) {
|
|
151
|
-
padding-inline-end: 0;
|
|
152
|
-
}
|
|
153
|
-
[ndwInput]:is(textarea) {
|
|
154
|
-
padding-inline-end: var(--ndw-spacing-sm);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
// Except when the input is a select, to prevent text from overflowing the chevron
|
|
158
|
-
select[ndwInput]:has(+ *) {
|
|
159
|
-
padding-inline-end: 0;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
// Remove border from the input, the container has the borders
|
|
163
|
-
[ndwInput] {
|
|
164
|
-
border: none;
|
|
165
|
-
outline: none;
|
|
166
|
-
|
|
167
|
-
&:hover,
|
|
168
|
-
&:active,
|
|
169
|
-
&:focus,
|
|
170
|
-
&:focus-visible {
|
|
171
|
-
border: none;
|
|
172
|
-
outline: none;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
&:has(textarea) {
|
|
177
|
-
padding-inline: 0;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
// Set correct background color for max char counter for text areas
|
|
181
|
-
& .max-char-counter {
|
|
182
|
-
background-color: var(--ndw-color-white);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
&[success] .max-char-counter {
|
|
186
|
-
background-color: var(--ndw-color-positive-100);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
&[error] .max-char-counter {
|
|
190
|
-
background-color: var(--ndw-color-critical-100);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
[ndwInput] {
|
|
195
|
-
@include shared-style();
|
|
196
|
-
|
|
197
|
-
width: 100%;
|
|
198
|
-
padding-inline: var(--ndw-spacing-sm);
|
|
199
|
-
color: var(--ndw-color-grey-700);
|
|
200
|
-
font-family: var(--ndw-font-family-body);
|
|
201
|
-
font-size: var(--ndw-font-size-sm);
|
|
202
|
-
height: var(--ndw-spacing-2xl);
|
|
203
|
-
line-height: var(--ndw-line-height-md);
|
|
204
|
-
border-radius: var(--ndw-border-radius-sm);
|
|
205
|
-
text-overflow: ellipsis;
|
|
206
|
-
white-space: nowrap;
|
|
207
|
-
|
|
208
|
-
&::placeholder {
|
|
209
|
-
color: var(--ndw-color-grey-400);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
// Hide clear button in search inputs on chrome-based browsers
|
|
213
|
-
&[type='search']::-webkit-search-decoration,
|
|
214
|
-
&[type='search']::-webkit-search-cancel-button,
|
|
215
|
-
&[type='search']::-webkit-search-results-button,
|
|
216
|
-
&[type='search']::-webkit-search-results-decoration {
|
|
217
|
-
display: none;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
&[type='date'],
|
|
221
|
-
&[type='datetime-local'],
|
|
222
|
-
&[type='month'],
|
|
223
|
-
&[type='time'],
|
|
224
|
-
&[type='week'] {
|
|
225
|
-
&::-webkit-calendar-picker-indicator {
|
|
226
|
-
cursor: pointer;
|
|
227
|
-
opacity: 0;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
select[ndwInput] {
|
|
233
|
-
appearance: none;
|
|
234
|
-
cursor: pointer;
|
|
235
|
-
|
|
236
|
-
&[ndw-placeholder],
|
|
237
|
-
option[disabled] {
|
|
238
|
-
color: var(--ndw-color-grey-400);
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
option:not([disabled]) {
|
|
242
|
-
color: var(--ndw-color-grey-700);
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
textarea[ndwInput] {
|
|
247
|
-
min-height: 4rem;
|
|
248
|
-
padding-block: calc(var(--ndw-spacing-xs) + var(--ndw-border-size-sm));
|
|
249
|
-
padding-inline: var(--ndw-spacing-sm);
|
|
250
|
-
line-height: normal;
|
|
251
|
-
white-space: pre-wrap;
|
|
252
|
-
resize: vertical;
|
|
253
|
-
}
|
|
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-info-500);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&[error] {
|
|
47
|
+
background-color: var(--ndw-color-critical-100);
|
|
48
|
+
border-color: var(--ndw-color-critical-500);
|
|
49
|
+
|
|
50
|
+
[ndwInput] {
|
|
51
|
+
background-color: var(--ndw-color-critical-100);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&:hover {
|
|
55
|
+
border-color: var(--ndw-color-grey-300);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&:active,
|
|
59
|
+
&:focus,
|
|
60
|
+
&:focus-visible {
|
|
61
|
+
background-color: var(--ndw-color-white);
|
|
62
|
+
border-color: transparent;
|
|
63
|
+
outline-color: var(--ndw-color-info-500);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&[disabled],
|
|
68
|
+
&[readonly],
|
|
69
|
+
&:has([ndwInput]:disabled),
|
|
70
|
+
&:has([ndwInput]:read-only):not(:has(select[ndwInput])) {
|
|
71
|
+
background-color: var(--ndw-color-grey-100);
|
|
72
|
+
border-color: var(--ndw-color-grey-300);
|
|
73
|
+
color: var(--ndw-color-grey-500);
|
|
74
|
+
cursor: default;
|
|
75
|
+
|
|
76
|
+
&:hover,
|
|
77
|
+
&:has([ndwInput]:hover) {
|
|
78
|
+
border-color: var(--ndw-color-grey-300);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&:has([ndwInput]:active),
|
|
82
|
+
&:has([ndwInput]:focus),
|
|
83
|
+
&:has([ndwInput]:focus-visible) {
|
|
84
|
+
border-color: var(--ndw-color-grey-300);
|
|
85
|
+
box-shadow: none;
|
|
86
|
+
outline-color: transparent;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
[ndwInput] {
|
|
90
|
+
background-color: var(--ndw-color-grey-100);
|
|
91
|
+
user-select: text;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
ndw-icon {
|
|
95
|
+
color: var(--ndw-color-grey-500);
|
|
96
|
+
pointer-events: none;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@mixin input-focus-visible-label {
|
|
102
|
+
outline-color: Highlight;
|
|
103
|
+
outline-color: -webkit-focus-ring-color;
|
|
104
|
+
outline-style: auto;
|
|
105
|
+
outline-width: 1px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.input-container:has([ndwInput][error]) {
|
|
109
|
+
background-color: var(--ndw-color-critical-100);
|
|
110
|
+
border-color: var(--ndw-color-critical-500);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Add input container right padding when select element is used
|
|
114
|
+
.input-container:has(select[ndwInput]) {
|
|
115
|
+
padding-inline-end: var(--ndw-spacing-xs);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.input-container[error]:has([ndwInput]:is(:active, :focus, :focus-visible)) {
|
|
119
|
+
background-color: var(--ndw-color-white);
|
|
120
|
+
select[ndwInput] {
|
|
121
|
+
background-color: var(--ndw-color-white);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// When an ndwInput is contained in an input-container hide the
|
|
126
|
+
// ndwInput borders and instead put the borders on the container.
|
|
127
|
+
.input-container:has([ndwInput]) {
|
|
128
|
+
@include shared-style();
|
|
129
|
+
|
|
130
|
+
gap: var(--ndw-spacing-xs);
|
|
131
|
+
|
|
132
|
+
// When input has a ndw-input-icon enable the inline padding
|
|
133
|
+
&:has(> ndw-input-icon) {
|
|
134
|
+
padding-inline: var(--ndw-spacing-xs);
|
|
135
|
+
}
|
|
136
|
+
&:has(> ndw-picker-button) {
|
|
137
|
+
padding-inline-end: var(--ndw-spacing-xs);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Any elements before the input have a lighter grey color
|
|
141
|
+
> *:has(~ [ndwInput]) {
|
|
142
|
+
color: var(--ndw-color-grey-400);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Remove inline padding when the input has prefix or suffix items
|
|
146
|
+
* + [ndwInput] {
|
|
147
|
+
padding-inline-start: 0;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
[ndwInput]:has(+ *) {
|
|
151
|
+
padding-inline-end: 0;
|
|
152
|
+
}
|
|
153
|
+
[ndwInput]:is(textarea) {
|
|
154
|
+
padding-inline-end: var(--ndw-spacing-sm);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// Except when the input is a select, to prevent text from overflowing the chevron
|
|
158
|
+
select[ndwInput]:has(+ *) {
|
|
159
|
+
padding-inline-end: 0;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// Remove border from the input, the container has the borders
|
|
163
|
+
[ndwInput] {
|
|
164
|
+
border: none;
|
|
165
|
+
outline: none;
|
|
166
|
+
|
|
167
|
+
&:hover,
|
|
168
|
+
&:active,
|
|
169
|
+
&:focus,
|
|
170
|
+
&:focus-visible {
|
|
171
|
+
border: none;
|
|
172
|
+
outline: none;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
&:has(textarea) {
|
|
177
|
+
padding-inline: 0;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// Set correct background color for max char counter for text areas
|
|
181
|
+
& .max-char-counter {
|
|
182
|
+
background-color: var(--ndw-color-white);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
&[success] .max-char-counter {
|
|
186
|
+
background-color: var(--ndw-color-positive-100);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
&[error] .max-char-counter {
|
|
190
|
+
background-color: var(--ndw-color-critical-100);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
[ndwInput] {
|
|
195
|
+
@include shared-style();
|
|
196
|
+
|
|
197
|
+
width: 100%;
|
|
198
|
+
padding-inline: var(--ndw-spacing-sm);
|
|
199
|
+
color: var(--ndw-color-grey-700);
|
|
200
|
+
font-family: var(--ndw-font-family-body);
|
|
201
|
+
font-size: var(--ndw-font-size-sm);
|
|
202
|
+
height: var(--ndw-spacing-2xl);
|
|
203
|
+
line-height: var(--ndw-line-height-md);
|
|
204
|
+
border-radius: var(--ndw-border-radius-sm);
|
|
205
|
+
text-overflow: ellipsis;
|
|
206
|
+
white-space: nowrap;
|
|
207
|
+
|
|
208
|
+
&::placeholder {
|
|
209
|
+
color: var(--ndw-color-grey-400);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Hide clear button in search inputs on chrome-based browsers
|
|
213
|
+
&[type='search']::-webkit-search-decoration,
|
|
214
|
+
&[type='search']::-webkit-search-cancel-button,
|
|
215
|
+
&[type='search']::-webkit-search-results-button,
|
|
216
|
+
&[type='search']::-webkit-search-results-decoration {
|
|
217
|
+
display: none;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
&[type='date'],
|
|
221
|
+
&[type='datetime-local'],
|
|
222
|
+
&[type='month'],
|
|
223
|
+
&[type='time'],
|
|
224
|
+
&[type='week'] {
|
|
225
|
+
&::-webkit-calendar-picker-indicator {
|
|
226
|
+
cursor: pointer;
|
|
227
|
+
opacity: 0;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
select[ndwInput] {
|
|
233
|
+
appearance: none;
|
|
234
|
+
cursor: pointer;
|
|
235
|
+
|
|
236
|
+
&[ndw-placeholder],
|
|
237
|
+
option[disabled] {
|
|
238
|
+
color: var(--ndw-color-grey-400);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
option:not([disabled]) {
|
|
242
|
+
color: var(--ndw-color-grey-700);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
textarea[ndwInput] {
|
|
247
|
+
min-height: 4rem;
|
|
248
|
+
padding-block: calc(var(--ndw-spacing-xs) + var(--ndw-border-size-sm));
|
|
249
|
+
padding-inline: var(--ndw-spacing-sm);
|
|
250
|
+
line-height: normal;
|
|
251
|
+
white-space: pre-wrap;
|
|
252
|
+
resize: vertical;
|
|
253
|
+
}
|