@entur/form 5.3.0 → 5.3.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [5.3.1](https://bitbucket.org/enturas/design-system/compare/@entur/form@5.3.0...@entur/form@5.3.1) (2022-04-19)
7
+
8
+ **Note:** Version bump only for package @entur/form
9
+
6
10
  # [5.3.0](https://bitbucket.org/enturas/design-system/compare/@entur/form@5.2.3...@entur/form@5.3.0) (2022-03-14)
7
11
 
8
12
  ### Features
package/dist/styles.css CHANGED
@@ -2,203 +2,6 @@
2
2
  --eds-form: 1;
3
3
  }/* DO NOT CHANGE!*/
4
4
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
5
- .eds-form-control-wrapper {
6
- --border-color: #181c56;
7
- --border-color-hover: #aeb7e2;
8
- align-items: center;
9
- background-color: #ffffff;
10
- border-radius: 0.25rem;
11
- border: 0.125rem solid #d1d3d3;
12
- box-shadow: 0 0 0 transparent;
13
- color: #181c56;
14
- display: flex;
15
- position: relative;
16
- width: 100%;
17
- min-height: 3rem;
18
- transition: border-color 0.1s ease-in-out;
19
- --textarea-label-background: $colors-brand-white;
20
- /*
21
- Some input controls require a darker design while inside a contrast block.
22
- These elements require the `--dark` modifier, even on the wrapper.
23
- */
24
- }
25
- .eds-contrast .eds-form-control-wrapper {
26
- --border-color: #aeb7e2;
27
- background-color: #ffffff;
28
- border-color: #54568c;
29
- }
30
- .eds-form-control-wrapper:focus-within, .eds-form-control-wrapper:hover {
31
- border-color: #181c56;
32
- }
33
- .eds-contrast .eds-form-control-wrapper:hover {
34
- border-color: #aeb7e2;
35
- background: #ebebf1;
36
- }
37
- .eds-form-control-wrapper:focus-within {
38
- box-shadow: inset 0 0 0 1px var(--border-color);
39
- }
40
- .eds-contrast .eds-form-control-wrapper:focus-within {
41
- border-color: #181c56;
42
- --border-color: #aeb7e2;
43
- box-shadow: 0 0 0 0.125rem var(--border-color);
44
- }
45
- .eds-form-control-wrapper ::placeholder {
46
- color: #656782;
47
- }
48
- .eds-form-control-wrapper--disabled {
49
- background-color: #e9e9e9;
50
- color: #656782;
51
- border-color: transparent;
52
- pointer-events: none;
53
- }
54
- .eds-form-control-wrapper--disabled::before, .eds-form-control-wrapper--disabled::after {
55
- display: none;
56
- }
57
- .eds-contrast .eds-form-control-wrapper--disabled {
58
- background: #292b6a;
59
- border-color: transparent;
60
- color: #8285a8;
61
- }
62
- .eds-form-control-wrapper--readonly {
63
- pointer-events: none;
64
- cursor: default;
65
- border-color: transparent;
66
- background: #f8f8f8;
67
- --textarea-label-background: $colors-greys-grey90;
68
- }
69
- .eds-contrast .eds-form-control-wrapper--readonly {
70
- background: #292b6a;
71
- --textarea-label-background: $colors-blues-blue10;
72
- color: #ffffff;
73
- border-color: transparent;
74
- }
75
- .eds-form-control-wrapper--readonly::before, .eds-form-control-wrapper--readonly::after {
76
- display: none;
77
- }
78
- .eds-form-control-wrapper--size-medium .eds-form-control,
79
- .eds-form-control-wrapper--size-medium .eds-form-control__append,
80
- .eds-form-control-wrapper--size-medium .eds-form-control__prepend {
81
- font-size: 1rem;
82
- line-height: 1rem;
83
- }
84
- .eds-form-control-wrapper--size-large {
85
- min-height: 4rem;
86
- padding: 0 0.5rem;
87
- }
88
- .eds-form-control-wrapper--size-large::before, .eds-form-control-wrapper--size-large::after {
89
- border-width: 0.25rem;
90
- }
91
- .eds-form-control-wrapper--size-large .eds-form-control,
92
- .eds-form-control-wrapper--size-large .eds-form-control__append,
93
- .eds-form-control-wrapper--size-large .eds-form-control__prepend {
94
- font-size: 1.5rem;
95
- line-height: 2.25rem;
96
- }
97
- .eds-form-control-wrapper--success {
98
- border-color: #1a8e60;
99
- --border-color: #1a8e60;
100
- }
101
- .eds-form-control-wrapper--success:hover {
102
- border-color: #5ac39a;
103
- }
104
- .eds-form-control-wrapper--success:focus-within {
105
- border-color: #1a8e60;
106
- }
107
- .eds-contrast .eds-form-control-wrapper--success {
108
- border-color: #5ac39a;
109
- --border-color: #5ac39a;
110
- }
111
- .eds-contrast .eds-form-control-wrapper--success:hover {
112
- border-color: #1a8e60;
113
- }
114
- .eds-contrast .eds-form-control-wrapper--success:focus-within {
115
- --border-color: #5ac39a;
116
- border-color: #181c56;
117
- }
118
- .eds-form-control-wrapper--error {
119
- border-color: #d31b1b;
120
- --border-color: #d31b1b;
121
- }
122
- .eds-form-control-wrapper--error:hover {
123
- border-color: #ff9494;
124
- }
125
- .eds-form-control-wrapper--error:focus-within {
126
- border-color: #d31b1b;
127
- }
128
- .eds-contrast .eds-form-control-wrapper--error {
129
- border-color: #ff9494;
130
- --border-color: #ff9494;
131
- }
132
- .eds-contrast .eds-form-control-wrapper--error:hover {
133
- border-color: #d31b1b;
134
- }
135
- .eds-contrast .eds-form-control-wrapper--error:focus-within {
136
- border-color: #181c56;
137
- --border-color: #ff9494;
138
- }
139
- .eds-contrast .eds-form-control-wrapper--dark {
140
- background-color: #181c56;
141
- color: #ffffff;
142
- }
143
- .eds-contrast .eds-form-control-wrapper--dark ::placeholder {
144
- color: #aeb7e2;
145
- }
146
- .eds-contrast .eds-form-control-wrapper--dark:hover {
147
- border-color: #aeb7e2;
148
- }
149
- .eds-contrast .eds-form-control-wrapper--dark:focus-within {
150
- background-color: #292b6a;
151
- border-color: #aeb7e2;
152
- }
153
- .eds-contrast .eds-form-control-wrapper--dark * {
154
- background-color: transparent;
155
- color: inherit;
156
- }
157
- .eds-contrast .eds-form-control-wrapper--dark.eds-form-control-wrapper--disabled {
158
- background-color: #292b6a;
159
- color: #8285a8;
160
- }
161
-
162
- .eds-form-control {
163
- appearance: none;
164
- background-color: transparent;
165
- border: 0;
166
- color: inherit;
167
- display: block;
168
- font-family: inherit;
169
- line-height: 1rem;
170
- font-size: 1rem;
171
- padding: 20px 1rem 0.25rem;
172
- width: 100%;
173
- }
174
- .eds-form-control::placeholder {
175
- opacity: 0;
176
- transition: opacity 0.2s ease-in-out;
177
- }
178
- .eds-form-control:focus {
179
- outline: none;
180
- }
181
- .eds-form-control:focus::placeholder {
182
- opacity: 1;
183
- }
184
- .eds-form-control__prepend, .eds-form-control__append {
185
- position: relative;
186
- margin: 0 1rem;
187
- line-height: inherit;
188
- }
189
- .eds-form-control__prepend--tooltip, .eds-form-control__append--tooltip {
190
- position: static;
191
- }
192
- .eds-form-control__prepend svg, .eds-form-control__append svg {
193
- top: 0.125rem;
194
- }
195
- .eds-form-control__prepend {
196
- margin-right: 0;
197
- }
198
- .eds-form-control__append {
199
- margin-left: 0;
200
- }/* DO NOT CHANGE!*/
201
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
202
5
  .eds-fieldset {
203
6
  margin: 0;
204
7
  padding: 0;
@@ -256,46 +59,145 @@
256
59
  color: #64b3e7;
257
60
  }/* DO NOT CHANGE!*/
258
61
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
259
- .eds-checkbox__container {
62
+ .eds-form-component--radio__container {
260
63
  display: flex;
64
+ justify-content: center;
261
65
  align-items: center;
262
66
  position: relative;
263
- appearance: none;
264
67
  cursor: pointer;
265
68
  height: 2rem;
266
- user-select: none;
69
+ width: -webkit-fit-content;
70
+ width: -moz-fit-content;
267
71
  width: fit-content;
72
+ -webkit-user-select: none;
73
+ -moz-user-select: none;
74
+ -ms-user-select: none;
75
+ user-select: none;
268
76
  }
269
- .eds-checkbox__container--reduced-click-area {
270
- height: fit-content;
77
+ .eds-form-component--radio__container :hover ~ .eds-form-component--radio__radio {
78
+ border-color: #54568c;
271
79
  }
272
- .eds-checkbox__container input {
80
+ .eds-form-component--radio__container :hover ~ .eds-form-component--radio__radio .eds-form-component--radio__circle {
81
+ background-color: #54568c;
82
+ }
83
+ .eds-contrast .eds-form-component--radio__container :hover ~ .eds-form-component--radio__radio {
84
+ border-color: #8285a8;
85
+ }
86
+ .eds-contrast .eds-form-component--radio__container :hover ~ .eds-form-component--radio__radio .eds-form-component--radio__circle {
87
+ background-color: #8285a8;
88
+ }
89
+ .eds-form-component--radio__container input {
273
90
  position: absolute;
274
91
  opacity: 0;
92
+ cursor: pointer;
275
93
  height: 0;
276
94
  width: 0;
277
95
  }
278
- .eds-checkbox__container input:checked + .eds-checkbox__icon, .eds-checkbox__container input:indeterminate + .eds-checkbox__icon {
279
- background-color: #181c56;
96
+ .eds-form-component--radio__container input:checked ~ .eds-form-component--radio__radio .eds-form-component--radio__circle {
97
+ height: 0.625rem;
98
+ width: 0.625rem;
280
99
  }
281
- .eds-checkbox__container input:checked + .eds-checkbox__icon .eds-checkbox-icon, .eds-checkbox__container input:indeterminate + .eds-checkbox__icon .eds-checkbox-icon {
282
- visibility: visible;
100
+ .eds-form-component--radio__container input:focus ~ .eds-form-component--radio__radio {
101
+ outline: none;
102
+ box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
103
+ outline-offset: 0.125rem;
283
104
  }
284
- .eds-checkbox__container input:checked + .eds-checkbox__icon .eds-checkbox-icon__path, .eds-checkbox__container input:indeterminate + .eds-checkbox__icon .eds-checkbox-icon__path {
285
- stroke: #ffffff;
286
- animation: stroke ease-in-out 0.2s 0.1s forwards;
105
+ .eds-contrast .eds-form-component--radio__container input:focus ~ .eds-form-component--radio__radio {
106
+ box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
287
107
  }
288
- .eds-checkbox__container input:checked + .eds-checkbox__icon--disabled, .eds-checkbox__container input:indeterminate + .eds-checkbox__icon--disabled {
289
- opacity: 0.5;
108
+ .eds-form-component--radio__container .eds-form-component--radio__radio {
109
+ position: relative;
110
+ height: 1.25rem;
111
+ width: 1.25rem;
112
+ margin-right: 1rem;
113
+ background-color: #ffffff;
114
+ border: 0.125rem solid #181c56;
115
+ border-radius: 50%;
116
+ display: flex;
117
+ align-items: center;
118
+ justify-content: center;
290
119
  }
291
- .eds-checkbox__container input:checked + .eds-checkbox__icon--disabled .eds-checkbox-icon__path, .eds-checkbox__container input:indeterminate + .eds-checkbox__icon--disabled .eds-checkbox-icon__path {
292
- opacity: 0.5;
120
+ .eds-contrast .eds-form-component--radio__container .eds-form-component--radio__radio {
121
+ background-color: #181c56;
122
+ border-color: #aeb7e2;
293
123
  }
294
- .eds-contrast .eds-checkbox__container input:checked + .eds-checkbox__icon, .eds-contrast .eds-checkbox__container input:indeterminate + .eds-checkbox__icon {
295
- background: #54568c;
124
+ .eds-form-component--radio__container .eds-form-component--radio__radio.eds-form-component--radio__radio--disabled {
125
+ background: #d1d3d3;
126
+ border-color: #d1d3d3;
127
+ cursor: not-allowed;
296
128
  }
297
- .eds-checkbox__container:hover input + .eds-checkbox__icon {
298
- border-color: #54568c;
129
+ .eds-form-component--radio__container .eds-form-component--radio__radio.eds-form-component--radio__radio--disabled:hover {
130
+ border-color: #d1d3d3;
131
+ }
132
+ .eds-contrast .eds-form-component--radio__container .eds-form-component--radio__radio.eds-form-component--radio__radio--disabled {
133
+ background: #d1d3d3;
134
+ border-color: #d1d3d3;
135
+ }
136
+ .eds-form-component--radio__container .eds-form-component--radio__radio.eds-form-component--radio__radio--disabled ~ .eds-form-component--radio__label {
137
+ color: #656782;
138
+ }
139
+ .eds-form-component--radio__container .eds-form-component--radio__radio .eds-form-component--radio__circle {
140
+ display: block;
141
+ width: 0;
142
+ height: 0;
143
+ border-radius: 50%;
144
+ background-color: #181c56;
145
+ transition: width 0.1s ease-in-out, height 0.1s ease-in-out;
146
+ }
147
+ .eds-contrast .eds-form-component--radio__container .eds-form-component--radio__radio .eds-form-component--radio__circle {
148
+ background-color: #aeb7e2;
149
+ }/* DO NOT CHANGE!*/
150
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
151
+ .eds-checkbox__container {
152
+ display: flex;
153
+ align-items: center;
154
+ position: relative;
155
+ -webkit-appearance: none;
156
+ -moz-appearance: none;
157
+ appearance: none;
158
+ cursor: pointer;
159
+ height: 2rem;
160
+ -webkit-user-select: none;
161
+ -moz-user-select: none;
162
+ -ms-user-select: none;
163
+ user-select: none;
164
+ width: -webkit-fit-content;
165
+ width: -moz-fit-content;
166
+ width: fit-content;
167
+ }
168
+ .eds-checkbox__container--reduced-click-area {
169
+ height: -webkit-fit-content;
170
+ height: -moz-fit-content;
171
+ height: fit-content;
172
+ }
173
+ .eds-checkbox__container input {
174
+ position: absolute;
175
+ opacity: 0;
176
+ height: 0;
177
+ width: 0;
178
+ }
179
+ .eds-checkbox__container input:checked + .eds-checkbox__icon, .eds-checkbox__container input:indeterminate + .eds-checkbox__icon {
180
+ background-color: #181c56;
181
+ }
182
+ .eds-checkbox__container input:checked + .eds-checkbox__icon .eds-checkbox-icon, .eds-checkbox__container input:indeterminate + .eds-checkbox__icon .eds-checkbox-icon {
183
+ visibility: visible;
184
+ }
185
+ .eds-checkbox__container input:checked + .eds-checkbox__icon .eds-checkbox-icon__path, .eds-checkbox__container input:indeterminate + .eds-checkbox__icon .eds-checkbox-icon__path {
186
+ stroke: #ffffff;
187
+ -webkit-animation: stroke ease-in-out 0.2s 0.1s forwards;
188
+ animation: stroke ease-in-out 0.2s 0.1s forwards;
189
+ }
190
+ .eds-checkbox__container input:checked + .eds-checkbox__icon--disabled, .eds-checkbox__container input:indeterminate + .eds-checkbox__icon--disabled {
191
+ opacity: 0.5;
192
+ }
193
+ .eds-checkbox__container input:checked + .eds-checkbox__icon--disabled .eds-checkbox-icon__path, .eds-checkbox__container input:indeterminate + .eds-checkbox__icon--disabled .eds-checkbox-icon__path {
194
+ opacity: 0.5;
195
+ }
196
+ .eds-contrast .eds-checkbox__container input:checked + .eds-checkbox__icon, .eds-contrast .eds-checkbox__container input:indeterminate + .eds-checkbox__icon {
197
+ background: #54568c;
198
+ }
199
+ .eds-checkbox__container:hover input + .eds-checkbox__icon {
200
+ border-color: #54568c;
299
201
  background: #f3f3f3;
300
202
  }
301
203
  .eds-contrast .eds-checkbox__container:hover input + .eds-checkbox__icon {
@@ -313,12 +215,22 @@
313
215
  border-color: #8285a8;
314
216
  }
315
217
  .eds-checkbox__container:focus + .eds-checkbox__icon,
218
+ .eds-checkbox__container [focus-within] + .eds-checkbox__icon {
219
+ outline: none;
220
+ box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
221
+ outline-offset: 0.125rem;
222
+ }
223
+ .eds-checkbox__container:focus + .eds-checkbox__icon,
316
224
  .eds-checkbox__container :focus-within + .eds-checkbox__icon {
317
225
  outline: none;
318
226
  box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
319
227
  outline-offset: 0.125rem;
320
228
  }
321
229
  .eds-contrast .eds-checkbox__container:focus + .eds-checkbox__icon,
230
+ .eds-contrast .eds-checkbox__container [focus-within] + .eds-checkbox__icon {
231
+ box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
232
+ }
233
+ .eds-contrast .eds-checkbox__container:focus + .eds-checkbox__icon,
322
234
  .eds-contrast .eds-checkbox__container :focus-within + .eds-checkbox__icon {
323
235
  box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
324
236
  }
@@ -362,213 +274,418 @@
362
274
  stroke-width: 0.375rem;
363
275
  }
364
276
 
277
+ @-webkit-keyframes stroke {
278
+ 100% {
279
+ stroke-dashoffset: 0;
280
+ }
281
+ }
282
+
365
283
  @keyframes stroke {
366
284
  100% {
367
285
  stroke-dashoffset: 0;
368
286
  }
369
287
  }/* DO NOT CHANGE!*/
370
288
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
371
- textarea.eds-form-control.eds-textarea {
372
- min-height: 7.75rem;
373
- resize: vertical;
374
- line-height: 1.5rem;
375
- }/* DO NOT CHANGE!*/
376
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
377
- .eds-form-component--radio__container {
378
- display: flex;
379
- justify-content: center;
380
- align-items: center;
289
+ .eds-input-group {
290
+ color: inherit;
291
+ display: block;
381
292
  position: relative;
382
- cursor: pointer;
383
- height: 2rem;
384
- width: fit-content;
385
- user-select: none;
386
293
  }
387
- .eds-form-component--radio__container :hover ~ .eds-form-component--radio__radio {
388
- border-color: #54568c;
294
+ .eds-input-group__label {
295
+ color: #656782;
296
+ display: flex;
297
+ font-size: 1rem;
298
+ position: absolute;
299
+ line-height: 1rem;
300
+ height: 3rem;
301
+ padding: 1rem;
302
+ padding-left: 0;
303
+ margin-left: 1rem;
304
+ top: -0.125rem;
305
+ transition: top 0.2s ease-in-out, font-size 0.2s ease-in-out, padding 0.2s ease-in-out, line-height ease-in-out 0.2s;
306
+ -webkit-user-select: none;
307
+ -moz-user-select: none;
308
+ -ms-user-select: none;
309
+ user-select: none;
310
+ pointer-events: none;
389
311
  }
390
- .eds-form-component--radio__container :hover ~ .eds-form-component--radio__radio .eds-form-component--radio__circle {
391
- background-color: #54568c;
312
+ .eds-form-control-wrapper--is-filled .eds-input-group__label {
313
+ top: calc(0.5rem - 0.125rem);
314
+ font-size: 0.75rem;
315
+ line-height: 0.75rem;
316
+ height: 10px;
317
+ padding: 0;
318
+ margin-left: 1rem;
392
319
  }
393
- .eds-contrast .eds-form-component--radio__container :hover ~ .eds-form-component--radio__radio {
394
- border-color: #8285a8;
320
+ .eds-textarea__label .eds-form-control-wrapper--is-filled .eds-input-group__label {
321
+ box-shadow: 0px -2px 0px 4px var(--textarea-label-background);
322
+ background: var(--textarea-label-background);
323
+ width: calc( 100% - 1rem - 1rem - 4px );
395
324
  }
396
- .eds-contrast .eds-form-component--radio__container :hover ~ .eds-form-component--radio__radio .eds-form-component--radio__circle {
397
- background-color: #8285a8;
325
+ .eds-form-control-wrapper--size-large .eds-form-control-wrapper--is-filled .eds-input-group__label {
326
+ top: 0.5rem;
327
+ font-size: 0.875rem;
328
+ line-height: 1rem;
329
+ padding: 0;
330
+ margin-left: 1rem;
398
331
  }
399
- .eds-form-component--radio__container input {
400
- position: absolute;
401
- opacity: 0;
402
- cursor: pointer;
403
- height: 0;
404
- width: 0;
332
+ .eds-contrast .eds-input-group__label {
333
+ color: #8285a8;
405
334
  }
406
- .eds-form-component--radio__container input:checked ~ .eds-form-component--radio__radio .eds-form-component--radio__circle {
407
- height: 0.625rem;
408
- width: 0.625rem;
335
+ .eds-contrast .eds-form-control-wrapper--dark .eds-input-group__label {
336
+ color: #aeb7e2;
409
337
  }
410
- .eds-form-component--radio__container input:focus ~ .eds-form-component--radio__radio {
411
- outline: none;
412
- box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
413
- outline-offset: 0.125rem;
338
+ .eds-form-control-wrapper--size-large .eds-input-group__label {
339
+ font-size: 1.5rem;
340
+ line-height: 2.25rem;
341
+ height: 4rem;
414
342
  }
415
- .eds-contrast .eds-form-component--radio__container input:focus ~ .eds-form-component--radio__radio {
416
- box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
343
+ .eds-input-group__label--filled {
344
+ top: calc(0.5rem - 0.125rem);
345
+ font-size: 0.75rem;
346
+ line-height: 0.75rem;
347
+ height: 10px;
348
+ padding: 0;
349
+ margin-left: 1rem;
417
350
  }
418
- .eds-form-component--radio__container .eds-form-component--radio__radio {
419
- position: relative;
420
- height: 1.25rem;
421
- width: 1.25rem;
422
- margin-right: 1rem;
423
- background-color: #ffffff;
424
- border: 0.125rem solid #181c56;
425
- border-radius: 50%;
351
+ .eds-textarea__label .eds-input-group__label--filled {
352
+ box-shadow: 0px -2px 0px 4px var(--textarea-label-background);
353
+ background: var(--textarea-label-background);
354
+ width: calc( 100% - 1rem - 1rem - 4px );
355
+ }
356
+ .eds-form-control-wrapper--size-large .eds-input-group__label--filled {
357
+ top: 0.5rem;
358
+ font-size: 0.875rem;
359
+ line-height: 1rem;
360
+ padding: 0;
361
+ margin-left: 1rem;
362
+ }
363
+ .eds-input-group__label-tooltip-icon {
364
+ color: #0082b9;
365
+ padding-left: 0.25rem;
366
+ padding-right: 0.25rem;
426
367
  display: flex;
427
368
  align-items: center;
428
- justify-content: center;
369
+ cursor: help;
370
+ font-size: 1rem;
429
371
  }
430
- .eds-contrast .eds-form-component--radio__container .eds-form-component--radio__radio {
431
- background-color: #181c56;
372
+
373
+ .eds-form-control-wrapper[focus-within] .eds-input-group__label {
374
+ top: calc(0.5rem - 0.125rem);
375
+ font-size: 0.75rem;
376
+ line-height: 0.75rem;
377
+ height: 10px;
378
+ padding: 0;
379
+ margin-left: 1rem;
380
+ }
381
+
382
+ .eds-form-control-wrapper:focus-within .eds-input-group__label {
383
+ top: calc(0.5rem - 0.125rem);
384
+ font-size: 0.75rem;
385
+ line-height: 0.75rem;
386
+ height: 10px;
387
+ padding: 0;
388
+ margin-left: 1rem;
389
+ }
390
+ .eds-textarea__label .eds-form-control-wrapper[focus-within] .eds-input-group__label {
391
+ box-shadow: 0px -2px 0px 4px var(--textarea-label-background);
392
+ background: var(--textarea-label-background);
393
+ width: calc( 100% - 1rem - 1rem - 4px );
394
+ }
395
+ .eds-textarea__label .eds-form-control-wrapper:focus-within .eds-input-group__label {
396
+ box-shadow: 0px -2px 0px 4px var(--textarea-label-background);
397
+ background: var(--textarea-label-background);
398
+ width: calc( 100% - 1rem - 1rem - 4px );
399
+ }
400
+ .eds-form-control-wrapper--size-large[focus-within] .eds-input-group__label {
401
+ top: 0.5rem;
402
+ font-size: 0.875rem;
403
+ line-height: 1rem;
404
+ padding: 0;
405
+ margin-left: 1rem;
406
+ }
407
+ .eds-form-control-wrapper--size-large:focus-within .eds-input-group__label {
408
+ top: 0.5rem;
409
+ font-size: 0.875rem;
410
+ line-height: 1rem;
411
+ padding: 0;
412
+ margin-left: 1rem;
413
+ }/* DO NOT CHANGE!*/
414
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
415
+ .eds-form-control-wrapper {
416
+ --border-color: #181c56;
417
+ --border-color-hover: #aeb7e2;
418
+ align-items: center;
419
+ background-color: #ffffff;
420
+ border-radius: 0.25rem;
421
+ border: 0.125rem solid #d1d3d3;
422
+ box-shadow: 0 0 0 transparent;
423
+ color: #181c56;
424
+ display: flex;
425
+ position: relative;
426
+ width: 100%;
427
+ min-height: 3rem;
428
+ transition: border-color 0.1s ease-in-out;
429
+ --textarea-label-background: $colors-brand-white;
430
+ /*
431
+ Some input controls require a darker design while inside a contrast block.
432
+ These elements require the `--dark` modifier, even on the wrapper.
433
+ */
434
+ }
435
+ .eds-contrast .eds-form-control-wrapper {
436
+ --border-color: #aeb7e2;
437
+ background-color: #ffffff;
438
+ border-color: #54568c;
439
+ }
440
+ .eds-form-control-wrapper[focus-within], .eds-form-control-wrapper:hover {
441
+ border-color: #181c56;
442
+ }
443
+ .eds-form-control-wrapper:focus-within, .eds-form-control-wrapper:hover {
444
+ border-color: #181c56;
445
+ }
446
+ .eds-contrast .eds-form-control-wrapper:hover {
432
447
  border-color: #aeb7e2;
448
+ background: #ebebf1;
433
449
  }
434
- .eds-form-component--radio__container .eds-form-component--radio__radio.eds-form-component--radio__radio--disabled {
435
- background: #d1d3d3;
436
- border-color: #d1d3d3;
437
- cursor: not-allowed;
450
+ .eds-form-control-wrapper[focus-within] {
451
+ box-shadow: inset 0 0 0 1px var(--border-color);
438
452
  }
439
- .eds-form-component--radio__container .eds-form-component--radio__radio.eds-form-component--radio__radio--disabled:hover {
440
- border-color: #d1d3d3;
453
+ .eds-form-control-wrapper:focus-within {
454
+ box-shadow: inset 0 0 0 1px var(--border-color);
441
455
  }
442
- .eds-contrast .eds-form-component--radio__container .eds-form-component--radio__radio.eds-form-component--radio__radio--disabled {
443
- background: #d1d3d3;
444
- border-color: #d1d3d3;
456
+ .eds-contrast .eds-form-control-wrapper[focus-within] {
457
+ border-color: #181c56;
458
+ --border-color: #aeb7e2;
459
+ box-shadow: 0 0 0 0.125rem var(--border-color);
445
460
  }
446
- .eds-form-component--radio__container .eds-form-component--radio__radio.eds-form-component--radio__radio--disabled ~ .eds-form-component--radio__label {
461
+ .eds-contrast .eds-form-control-wrapper:focus-within {
462
+ border-color: #181c56;
463
+ --border-color: #aeb7e2;
464
+ box-shadow: 0 0 0 0.125rem var(--border-color);
465
+ }
466
+ .eds-form-control-wrapper ::-moz-placeholder {
447
467
  color: #656782;
448
468
  }
449
- .eds-form-component--radio__container .eds-form-component--radio__radio .eds-form-component--radio__circle {
450
- display: block;
451
- width: 0;
452
- height: 0;
453
- border-radius: 50%;
454
- background-color: #181c56;
455
- transition: width 0.1s ease-in-out, height 0.1s ease-in-out;
469
+ .eds-form-control-wrapper :-ms-input-placeholder {
470
+ color: #656782;
456
471
  }
457
- .eds-contrast .eds-form-component--radio__container .eds-form-component--radio__radio .eds-form-component--radio__circle {
458
- background-color: #aeb7e2;
459
- }/* DO NOT CHANGE!*/
460
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
461
- .eds-switch {
462
- cursor: pointer;
463
- user-select: none;
464
- padding: 0.5rem 0;
465
- width: fit-content;
472
+ .eds-form-control-wrapper ::placeholder {
473
+ color: #656782;
466
474
  }
467
- .eds-switch input {
468
- opacity: 0;
475
+ .eds-form-control-wrapper--disabled {
476
+ background-color: #e9e9e9;
477
+ color: #656782;
478
+ border-color: transparent;
469
479
  pointer-events: none;
470
- position: absolute;
471
480
  }
472
- .eds-switch--right {
473
- display: flex;
474
- flex-direction: row;
475
- align-items: center;
481
+ .eds-form-control-wrapper--disabled::before, .eds-form-control-wrapper--disabled::after {
482
+ display: none;
476
483
  }
477
- .eds-switch--bottom {
478
- display: flex;
479
- flex-direction: column;
480
- align-items: center;
484
+ .eds-contrast .eds-form-control-wrapper--disabled {
485
+ background: #292b6a;
486
+ border-color: transparent;
487
+ color: #8285a8;
481
488
  }
482
- .eds-switch__circle {
483
- border-radius: 50%;
484
- height: 1.25rem;
485
- width: 1.25rem;
486
- content: "";
487
- display: flex;
488
- align-items: center;
489
- justify-content: center;
490
- transition: left 0.1s ease-in-out, background-color 0.1s ease-in-out;
491
- box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.25);
492
- background-color: #ffffff;
493
- top: 0.125rem;
494
- left: 0.125rem;
495
- position: relative;
489
+ .eds-form-control-wrapper--readonly {
490
+ pointer-events: none;
491
+ cursor: default;
492
+ border-color: transparent;
493
+ background: #f8f8f8;
494
+ --textarea-label-background: $colors-greys-grey90;
496
495
  }
497
- .eds-switch__switch--large .eds-switch__circle {
498
- height: 1.75rem;
499
- width: 1.75rem;
496
+ .eds-contrast .eds-form-control-wrapper--readonly {
497
+ background: #292b6a;
498
+ --textarea-label-background: $colors-blues-blue10;
499
+ color: #ffffff;
500
+ border-color: transparent;
500
501
  }
501
- .eds-switch .eds-switch__switch svg g,
502
- .eds-switch .eds-switch__switch path {
503
- fill: #949494;
504
- transition: fill ease-in-out 0.1s;
502
+ .eds-form-control-wrapper--readonly::before, .eds-form-control-wrapper--readonly::after {
503
+ display: none;
505
504
  }
506
- .eds-switch__switch {
507
- position: relative;
508
- background-color: #d1d3d3;
509
- content: "";
510
- display: block;
511
- transition: background-color 0.1s ease-in-out;
512
- height: 1.5rem;
513
- width: 3rem;
514
- border-radius: 1.5rem;
505
+ .eds-form-control-wrapper--size-medium .eds-form-control,
506
+ .eds-form-control-wrapper--size-medium .eds-form-control__append,
507
+ .eds-form-control-wrapper--size-medium .eds-form-control__prepend {
508
+ font-size: 1rem;
509
+ line-height: 1rem;
515
510
  }
516
- .eds-switch--right .eds-switch__switch {
517
- margin-right: 0.75rem;
511
+ .eds-form-control-wrapper--size-large {
512
+ min-height: 4rem;
513
+ padding: 0 0.5rem;
518
514
  }
519
- :checked + .eds-switch__switch {
520
- background-color: var(--eds-switch-color);
515
+ .eds-form-control-wrapper--size-large::before, .eds-form-control-wrapper--size-large::after {
516
+ border-width: 0.25rem;
521
517
  }
522
- :checked + .eds-switch__switch .eds-switch__circle {
523
- left: 1.625rem;
518
+ .eds-form-control-wrapper--size-large .eds-form-control,
519
+ .eds-form-control-wrapper--size-large .eds-form-control__append,
520
+ .eds-form-control-wrapper--size-large .eds-form-control__prepend {
521
+ font-size: 1.5rem;
522
+ line-height: 2.25rem;
524
523
  }
525
- :checked + .eds-switch__switch .eds-switch__circle svg g,
526
- :checked + .eds-switch__switch .eds-switch__circle path {
527
- fill: var(--eds-switch-color);
524
+ .eds-form-control-wrapper--success {
525
+ border-color: #1a8e60;
526
+ --border-color: #1a8e60;
528
527
  }
529
- .eds-contrast :checked + .eds-switch__switch .eds-switch__circle svg g,
530
- .eds-contrast :checked + .eds-switch__switch .eds-switch__circle path {
531
- fill: var(--eds-switch-color);
528
+ .eds-form-control-wrapper--success:hover {
529
+ border-color: #5ac39a;
532
530
  }
533
- .eds-contrast :checked + .eds-switch__switch {
534
- background-color: var(--eds-switch-contrast-color);
531
+ .eds-form-control-wrapper--success[focus-within] {
532
+ border-color: #1a8e60;
535
533
  }
536
- :focus + .eds-switch__switch {
534
+ .eds-form-control-wrapper--success:focus-within {
535
+ border-color: #1a8e60;
536
+ }
537
+ .eds-contrast .eds-form-control-wrapper--success {
538
+ border-color: #5ac39a;
539
+ --border-color: #5ac39a;
540
+ }
541
+ .eds-contrast .eds-form-control-wrapper--success:hover {
542
+ border-color: #1a8e60;
543
+ }
544
+ .eds-contrast .eds-form-control-wrapper--success[focus-within] {
545
+ --border-color: #5ac39a;
546
+ border-color: #181c56;
547
+ }
548
+ .eds-contrast .eds-form-control-wrapper--success:focus-within {
549
+ --border-color: #5ac39a;
550
+ border-color: #181c56;
551
+ }
552
+ .eds-form-control-wrapper--error {
553
+ border-color: #d31b1b;
554
+ --border-color: #d31b1b;
555
+ }
556
+ .eds-form-control-wrapper--error:hover {
557
+ border-color: #ff9494;
558
+ }
559
+ .eds-form-control-wrapper--error[focus-within] {
560
+ border-color: #d31b1b;
561
+ }
562
+ .eds-form-control-wrapper--error:focus-within {
563
+ border-color: #d31b1b;
564
+ }
565
+ .eds-contrast .eds-form-control-wrapper--error {
566
+ border-color: #ff9494;
567
+ --border-color: #ff9494;
568
+ }
569
+ .eds-contrast .eds-form-control-wrapper--error:hover {
570
+ border-color: #d31b1b;
571
+ }
572
+ .eds-contrast .eds-form-control-wrapper--error[focus-within] {
573
+ border-color: #181c56;
574
+ --border-color: #ff9494;
575
+ }
576
+ .eds-contrast .eds-form-control-wrapper--error:focus-within {
577
+ border-color: #181c56;
578
+ --border-color: #ff9494;
579
+ }
580
+ .eds-contrast .eds-form-control-wrapper--dark {
581
+ background-color: #181c56;
582
+ color: #ffffff;
583
+ }
584
+ .eds-contrast .eds-form-control-wrapper--dark ::-moz-placeholder {
585
+ color: #aeb7e2;
586
+ }
587
+ .eds-contrast .eds-form-control-wrapper--dark :-ms-input-placeholder {
588
+ color: #aeb7e2;
589
+ }
590
+ .eds-contrast .eds-form-control-wrapper--dark ::placeholder {
591
+ color: #aeb7e2;
592
+ }
593
+ .eds-contrast .eds-form-control-wrapper--dark:hover {
594
+ border-color: #aeb7e2;
595
+ }
596
+ .eds-contrast .eds-form-control-wrapper--dark[focus-within] {
597
+ background-color: #292b6a;
598
+ border-color: #aeb7e2;
599
+ }
600
+ .eds-contrast .eds-form-control-wrapper--dark:focus-within {
601
+ background-color: #292b6a;
602
+ border-color: #aeb7e2;
603
+ }
604
+ .eds-contrast .eds-form-control-wrapper--dark * {
605
+ background-color: transparent;
606
+ color: inherit;
607
+ }
608
+ .eds-contrast .eds-form-control-wrapper--dark.eds-form-control-wrapper--disabled {
609
+ background-color: #292b6a;
610
+ color: #8285a8;
611
+ }
612
+
613
+ .eds-form-control {
614
+ -webkit-appearance: none;
615
+ -moz-appearance: none;
616
+ appearance: none;
617
+ background-color: transparent;
618
+ border: 0;
619
+ color: inherit;
620
+ display: block;
621
+ font-family: inherit;
622
+ line-height: 1rem;
623
+ font-size: 1rem;
624
+ padding: 20px 1rem 0.25rem;
625
+ width: 100%;
626
+ }
627
+ .eds-form-control::-moz-placeholder {
628
+ opacity: 0;
629
+ -moz-transition: opacity 0.2s ease-in-out;
630
+ transition: opacity 0.2s ease-in-out;
631
+ }
632
+ .eds-form-control:-ms-input-placeholder {
633
+ opacity: 0;
634
+ -ms-transition: opacity 0.2s ease-in-out;
635
+ transition: opacity 0.2s ease-in-out;
636
+ }
637
+ .eds-form-control::placeholder {
638
+ opacity: 0;
639
+ transition: opacity 0.2s ease-in-out;
640
+ }
641
+ .eds-form-control:focus {
537
642
  outline: none;
538
- box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
539
- outline-offset: 0.125rem;
540
643
  }
541
- .eds-contrast :focus + .eds-switch__switch {
542
- box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
644
+ .eds-form-control:focus::-moz-placeholder {
645
+ opacity: 1;
543
646
  }
544
- .eds-contrast .eds-switch__switch {
545
- background-color: #54568c;
647
+ .eds-form-control:focus:-ms-input-placeholder {
648
+ opacity: 1;
546
649
  }
547
- .eds-switch__switch--large {
548
- width: 3.75rem;
549
- height: 2rem;
550
- border-radius: 3.75rem;
650
+ .eds-form-control:focus::placeholder {
651
+ opacity: 1;
551
652
  }
552
- :checked + .eds-switch__switch--large .eds-switch__circle {
553
- left: 1.875rem;
653
+ .eds-form-control__prepend, .eds-form-control__append {
654
+ position: relative;
655
+ margin: 0 1rem;
656
+ line-height: inherit;
554
657
  }
555
- .eds-switch__label--large--right {
556
- font-size: 1rem;
658
+ .eds-form-control__prepend--tooltip, .eds-form-control__append--tooltip {
659
+ position: static;
557
660
  }
558
- .eds-switch__label--large--bottom {
559
- font-size: 0.875rem;
661
+ .eds-form-control__prepend svg, .eds-form-control__append svg {
662
+ top: 0.125rem;
560
663
  }
561
- .eds-switch__label--medium--right {
562
- font-size: 0.875rem;
664
+ .eds-form-control__prepend {
665
+ margin-right: 0;
563
666
  }
564
- .eds-switch__label--medium--bottom {
565
- font-size: 0.75rem;
667
+ .eds-form-control__append {
668
+ margin-left: 0;
669
+ }/* DO NOT CHANGE!*/
670
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
671
+ textarea.eds-form-control.eds-textarea {
672
+ min-height: 7.75rem;
673
+ resize: vertical;
674
+ line-height: 1.5rem;
566
675
  }/* DO NOT CHANGE!*/
567
676
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
677
+ .eds-radio-panel__wrapper[focus-within] .eds-radio-panel__container {
678
+ border-color: #181c56;
679
+ box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
680
+ }
568
681
  .eds-radio-panel__wrapper:focus-within .eds-radio-panel__container {
569
682
  border-color: #181c56;
570
683
  box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
571
684
  }
685
+ .eds-contrast .eds-radio-panel__wrapper[focus-within] .eds-radio-panel__container {
686
+ border-color: #ffffff;
687
+ box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
688
+ }
572
689
  .eds-contrast .eds-radio-panel__wrapper:focus-within .eds-radio-panel__container {
573
690
  border-color: #ffffff;
574
691
  box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
@@ -597,7 +714,8 @@ textarea.eds-form-control.eds-textarea {
597
714
  }
598
715
  .eds-radio-panel__wrapper input:checked + .eds-radio-panel__container .eds-radio-panel__check .eds-checkbox-icon__path {
599
716
  stroke: #5ac39a;
600
- animation: stroke ease-in-out 0.2s 0.1s forwards;
717
+ -webkit-animation: stroke ease-in-out 0.2s 0.1s forwards;
718
+ animation: stroke ease-in-out 0.2s 0.1s forwards;
601
719
  }
602
720
  .eds-radio-panel__wrapper input:checked + .eds-radio-panel__container .eds-radio-panel__check--disabled {
603
721
  opacity: 0.5;
@@ -615,7 +733,12 @@ textarea.eds-form-control.eds-textarea {
615
733
  min-width: 20rem;
616
734
  position: relative;
617
735
  padding: 1rem;
618
- user-select: none;
736
+ -webkit-user-select: none;
737
+ -moz-user-select: none;
738
+ -ms-user-select: none;
739
+ user-select: none;
740
+ width: -webkit-fit-content;
741
+ width: -moz-fit-content;
619
742
  width: fit-content;
620
743
  }
621
744
  .eds-contrast .eds-radio-panel__container {
@@ -693,108 +816,6 @@ textarea.eds-form-control.eds-textarea {
693
816
  stroke-width: 0.375rem;
694
817
  }/* DO NOT CHANGE!*/
695
818
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
696
- .eds-input-group {
697
- color: inherit;
698
- display: block;
699
- position: relative;
700
- }
701
- .eds-input-group__label {
702
- color: #656782;
703
- display: flex;
704
- font-size: 1rem;
705
- position: absolute;
706
- line-height: 1rem;
707
- height: 3rem;
708
- padding: 1rem;
709
- padding-left: 0;
710
- margin-left: 1rem;
711
- top: -0.125rem;
712
- transition: top 0.2s ease-in-out, font-size 0.2s ease-in-out, padding 0.2s ease-in-out, line-height ease-in-out 0.2s;
713
- user-select: none;
714
- pointer-events: none;
715
- }
716
- .eds-form-control-wrapper--is-filled .eds-input-group__label {
717
- top: calc(0.5rem - 0.125rem);
718
- font-size: 0.75rem;
719
- line-height: 0.75rem;
720
- height: 10px;
721
- padding: 0;
722
- margin-left: 1rem;
723
- }
724
- .eds-textarea__label .eds-form-control-wrapper--is-filled .eds-input-group__label {
725
- box-shadow: 0px -2px 0px 4px var(--textarea-label-background);
726
- background: var(--textarea-label-background);
727
- width: calc( 100% - 1rem - 1rem - 4px );
728
- }
729
- .eds-form-control-wrapper--size-large .eds-form-control-wrapper--is-filled .eds-input-group__label {
730
- top: 0.5rem;
731
- font-size: 0.875rem;
732
- line-height: 1rem;
733
- padding: 0;
734
- margin-left: 1rem;
735
- }
736
- .eds-contrast .eds-input-group__label {
737
- color: #8285a8;
738
- }
739
- .eds-contrast .eds-form-control-wrapper--dark .eds-input-group__label {
740
- color: #aeb7e2;
741
- }
742
- .eds-form-control-wrapper--size-large .eds-input-group__label {
743
- font-size: 1.5rem;
744
- line-height: 2.25rem;
745
- height: 4rem;
746
- }
747
- .eds-input-group__label--filled {
748
- top: calc(0.5rem - 0.125rem);
749
- font-size: 0.75rem;
750
- line-height: 0.75rem;
751
- height: 10px;
752
- padding: 0;
753
- margin-left: 1rem;
754
- }
755
- .eds-textarea__label .eds-input-group__label--filled {
756
- box-shadow: 0px -2px 0px 4px var(--textarea-label-background);
757
- background: var(--textarea-label-background);
758
- width: calc( 100% - 1rem - 1rem - 4px );
759
- }
760
- .eds-form-control-wrapper--size-large .eds-input-group__label--filled {
761
- top: 0.5rem;
762
- font-size: 0.875rem;
763
- line-height: 1rem;
764
- padding: 0;
765
- margin-left: 1rem;
766
- }
767
- .eds-input-group__label-tooltip-icon {
768
- color: #0082b9;
769
- padding-left: 0.25rem;
770
- padding-right: 0.25rem;
771
- display: flex;
772
- align-items: center;
773
- cursor: help;
774
- font-size: 1rem;
775
- }
776
-
777
- .eds-form-control-wrapper:focus-within .eds-input-group__label {
778
- top: calc(0.5rem - 0.125rem);
779
- font-size: 0.75rem;
780
- line-height: 0.75rem;
781
- height: 10px;
782
- padding: 0;
783
- margin-left: 1rem;
784
- }
785
- .eds-textarea__label .eds-form-control-wrapper:focus-within .eds-input-group__label {
786
- box-shadow: 0px -2px 0px 4px var(--textarea-label-background);
787
- background: var(--textarea-label-background);
788
- width: calc( 100% - 1rem - 1rem - 4px );
789
- }
790
- .eds-form-control-wrapper--size-large:focus-within .eds-input-group__label {
791
- top: 0.5rem;
792
- font-size: 0.875rem;
793
- line-height: 1rem;
794
- padding: 0;
795
- margin-left: 1rem;
796
- }/* DO NOT CHANGE!*/
797
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
798
819
  .eds-textfield__clear-button {
799
820
  background: none;
800
821
  border: none;
@@ -831,6 +852,118 @@ textarea.eds-form-control.eds-textarea {
831
852
  background-color: #8285a8;
832
853
  }/* DO NOT CHANGE!*/
833
854
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
855
+ .eds-switch {
856
+ cursor: pointer;
857
+ -webkit-user-select: none;
858
+ -moz-user-select: none;
859
+ -ms-user-select: none;
860
+ user-select: none;
861
+ padding: 0.5rem 0;
862
+ width: -webkit-fit-content;
863
+ width: -moz-fit-content;
864
+ width: fit-content;
865
+ }
866
+ .eds-switch input {
867
+ opacity: 0;
868
+ pointer-events: none;
869
+ position: absolute;
870
+ }
871
+ .eds-switch--right {
872
+ display: flex;
873
+ flex-direction: row;
874
+ align-items: center;
875
+ }
876
+ .eds-switch--bottom {
877
+ display: flex;
878
+ flex-direction: column;
879
+ align-items: center;
880
+ }
881
+ .eds-switch__circle {
882
+ border-radius: 50%;
883
+ height: 1.25rem;
884
+ width: 1.25rem;
885
+ content: "";
886
+ display: flex;
887
+ align-items: center;
888
+ justify-content: center;
889
+ transition: left 0.1s ease-in-out, background-color 0.1s ease-in-out;
890
+ box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.25);
891
+ background-color: #ffffff;
892
+ top: 0.125rem;
893
+ left: 0.125rem;
894
+ position: relative;
895
+ }
896
+ .eds-switch__switch--large .eds-switch__circle {
897
+ height: 1.75rem;
898
+ width: 1.75rem;
899
+ }
900
+ .eds-switch .eds-switch__switch svg g,
901
+ .eds-switch .eds-switch__switch path {
902
+ fill: #949494;
903
+ transition: fill ease-in-out 0.1s;
904
+ }
905
+ .eds-switch__switch {
906
+ position: relative;
907
+ background-color: #d1d3d3;
908
+ content: "";
909
+ display: block;
910
+ transition: background-color 0.1s ease-in-out;
911
+ height: 1.5rem;
912
+ width: 3rem;
913
+ border-radius: 1.5rem;
914
+ }
915
+ .eds-switch--right .eds-switch__switch {
916
+ margin-right: 0.75rem;
917
+ }
918
+ :checked + .eds-switch__switch {
919
+ background-color: var(--eds-switch-color);
920
+ }
921
+ :checked + .eds-switch__switch .eds-switch__circle {
922
+ left: 1.625rem;
923
+ }
924
+ :checked + .eds-switch__switch .eds-switch__circle svg g,
925
+ :checked + .eds-switch__switch .eds-switch__circle path {
926
+ fill: var(--eds-switch-color);
927
+ }
928
+ .eds-contrast :checked + .eds-switch__switch .eds-switch__circle svg g,
929
+ .eds-contrast :checked + .eds-switch__switch .eds-switch__circle path {
930
+ fill: var(--eds-switch-color);
931
+ }
932
+ .eds-contrast :checked + .eds-switch__switch {
933
+ background-color: var(--eds-switch-contrast-color);
934
+ }
935
+ :focus + .eds-switch__switch {
936
+ outline: none;
937
+ box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
938
+ outline-offset: 0.125rem;
939
+ }
940
+ .eds-contrast :focus + .eds-switch__switch {
941
+ box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
942
+ }
943
+ .eds-contrast .eds-switch__switch {
944
+ background-color: #54568c;
945
+ }
946
+ .eds-switch__switch--large {
947
+ width: 3.75rem;
948
+ height: 2rem;
949
+ border-radius: 3.75rem;
950
+ }
951
+ :checked + .eds-switch__switch--large .eds-switch__circle {
952
+ left: 1.875rem;
953
+ }
954
+ .eds-switch__label--large--right {
955
+ font-size: 1rem;
956
+ }
957
+ .eds-switch__label--large--bottom {
958
+ font-size: 0.875rem;
959
+ }
960
+ .eds-switch__label--medium--right {
961
+ font-size: 0.875rem;
962
+ }
963
+ .eds-switch__label--medium--bottom {
964
+ font-size: 0.75rem;
965
+ }/* DO NOT CHANGE!*/
966
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
834
967
  .eds-segmented-control {
835
968
  margin-top: 0.25rem;
836
969
  display: flex;
@@ -858,7 +991,10 @@ textarea.eds-form-control.eds-textarea {
858
991
  padding: calc(0.25rem/ 2) 0.75rem;
859
992
  height: 1.5rem;
860
993
  text-align: center;
861
- user-select: none;
994
+ -webkit-user-select: none;
995
+ -moz-user-select: none;
996
+ -ms-user-select: none;
997
+ user-select: none;
862
998
  }
863
999
  .eds-contrast .eds-segmented-choice .eds-base-segmented {
864
1000
  border-color: #393d79;
@@ -876,7 +1012,9 @@ textarea.eds-form-control.eds-textarea {
876
1012
  --background-color: #54568c;
877
1013
  }
878
1014
  .eds-segmented-choice input {
879
- appearance: none;
1015
+ -webkit-appearance: none;
1016
+ -moz-appearance: none;
1017
+ appearance: none;
880
1018
  position: absolute;
881
1019
  opacity: 0;
882
1020
  height: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@entur/form",
3
- "version": "5.3.0",
3
+ "version": "5.3.1",
4
4
  "license": "EUPL-1.2",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/form.esm.js",
@@ -27,12 +27,12 @@
27
27
  "react-dom": ">=16.8.0"
28
28
  },
29
29
  "dependencies": {
30
- "@entur/icons": "^3.5.0",
30
+ "@entur/icons": "^4.0.0",
31
31
  "@entur/tokens": "^3.3.1",
32
- "@entur/tooltip": "^2.5.3",
32
+ "@entur/tooltip": "^2.5.4",
33
33
  "@entur/typography": "^1.6.11",
34
34
  "@entur/utils": "^0.4.3",
35
35
  "classnames": "^2.3.1"
36
36
  },
37
- "gitHead": "c672c8396ce0c3d436746e4299680137488d579d"
37
+ "gitHead": "f760e1b8cfdc14231bd6391a8d82dfed1d71daa4"
38
38
  }