@entur/form 7.0.35-alpha.0 → 7.0.36

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 (2) hide show
  1. package/dist/styles.css +447 -447
  2. package/package.json +6 -6
package/dist/styles.css CHANGED
@@ -52,253 +52,6 @@
52
52
  }
53
53
  /* DO NOT CHANGE!*/
54
54
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
55
- .eds-form-control-wrapper {
56
- --border-color: #7C7F9F;
57
- --border-color-hover: #aeb7e2;
58
- align-items: center;
59
- background-color: #ffffff;
60
- border-radius: 0.25rem;
61
- border: 0.125rem solid var(--border-color);
62
- box-shadow: 0 0 0 transparent;
63
- color: #181c56;
64
- display: flex;
65
- position: relative;
66
- width: 100%;
67
- min-height: 3rem;
68
- transition: border-color 0.1s ease-in-out;
69
- --textarea-label-background: t.$colors-brand-white;
70
- /*
71
- Some input controls require a darker design while inside a contrast block.
72
- These elements require the `--dark` modifier, even on the wrapper.
73
- */
74
- }
75
- .eds-form-control-wrapper[focus-within], .eds-form-control-wrapper:hover {
76
- --border-color: #181c56;
77
- }
78
- .eds-form-control-wrapper:focus-within, .eds-form-control-wrapper:hover {
79
- --border-color: #181c56;
80
- }
81
- .eds-contrast .eds-form-control-wrapper:hover {
82
- --border-color: #aeb7e2;
83
- }
84
- .eds-form-control-wrapper[focus-within] {
85
- box-shadow: inset 0 0 0 1px var(--border-color);
86
- }
87
- .eds-form-control-wrapper:focus-within {
88
- box-shadow: inset 0 0 0 1px var(--border-color);
89
- }
90
- .eds-contrast .eds-form-control-wrapper[focus-within] {
91
- --border-color: #181c56;
92
- box-shadow: 0 0 0 0.125rem #aeb7e2;
93
- }
94
- .eds-contrast .eds-form-control-wrapper:focus-within {
95
- --border-color: #181c56;
96
- box-shadow: 0 0 0 0.125rem #aeb7e2;
97
- }
98
- .eds-form-control-wrapper ::-moz-placeholder {
99
- color: #656782;
100
- }
101
- .eds-form-control-wrapper ::placeholder {
102
- color: #656782;
103
- }
104
- .eds-form-control-wrapper--disabled {
105
- --border-color: transparent;
106
- background-color: #e9e9e9;
107
- pointer-events: none;
108
- color: #646464;
109
- }
110
- .eds-form-control-wrapper--disabled .eds-input-group__label {
111
- color: #646464;
112
- }
113
- .eds-contrast .eds-form-control-wrapper--disabled {
114
- background: #292b6a;
115
- color: #8285a8;
116
- }
117
- .eds-contrast .eds-form-control-wrapper--disabled .eds-input-group__label {
118
- color: #8285a8;
119
- }
120
- .eds-form-control-wrapper--disabled::before, .eds-form-control-wrapper--disabled::after {
121
- display: none;
122
- }
123
- .eds-form-control-wrapper--readonly {
124
- --border-color: transparent;
125
- --textarea-label-background: t.$colors-greys-grey90;
126
- pointer-events: none;
127
- cursor: default;
128
- background: #f8f8f8;
129
- }
130
- .eds-contrast .eds-form-control-wrapper--readonly {
131
- --textarea-label-background: t.$colors-blues-blue10;
132
- background: #292b6a;
133
- color: #ffffff;
134
- }
135
- .eds-contrast .eds-form-control-wrapper--readonly .eds-input-group__label {
136
- color: #aeb7e2;
137
- }
138
- .eds-form-control-wrapper--readonly::before, .eds-form-control-wrapper--readonly::after {
139
- display: none;
140
- }
141
- .eds-form-control-wrapper--size-medium .eds-form-control,
142
- .eds-form-control-wrapper--size-medium .eds-form-control__append,
143
- .eds-form-control-wrapper--size-medium .eds-form-control__prepend {
144
- font-size: 1rem;
145
- line-height: 1rem;
146
- }
147
- .eds-form-control-wrapper--size-large {
148
- min-height: 4rem;
149
- padding: 0 0.5rem;
150
- }
151
- .eds-form-control-wrapper--size-large::before, .eds-form-control-wrapper--size-large::after {
152
- border-width: 0.25rem;
153
- }
154
- .eds-form-control-wrapper--size-large .eds-form-control,
155
- .eds-form-control-wrapper--size-large .eds-form-control__append,
156
- .eds-form-control-wrapper--size-large .eds-form-control__prepend {
157
- font-size: 1.5rem;
158
- line-height: 2.25rem;
159
- }
160
- .eds-form-control-wrapper--success {
161
- border-color: #1a8e60;
162
- --border-color: #1a8e60;
163
- }
164
- .eds-form-control-wrapper--success:hover {
165
- border-color: #5ac39a;
166
- }
167
- .eds-form-control-wrapper--success[focus-within] {
168
- border-color: #1a8e60;
169
- }
170
- .eds-form-control-wrapper--success:focus-within {
171
- border-color: #1a8e60;
172
- }
173
- .eds-contrast .eds-form-control-wrapper--success {
174
- border-color: #5ac39a;
175
- --border-color: #5ac39a;
176
- }
177
- .eds-contrast .eds-form-control-wrapper--success:hover {
178
- border-color: #1a8e60;
179
- }
180
- .eds-contrast .eds-form-control-wrapper--success[focus-within] {
181
- --border-color: #5ac39a;
182
- border-color: #181c56;
183
- }
184
- .eds-contrast .eds-form-control-wrapper--success:focus-within {
185
- --border-color: #5ac39a;
186
- border-color: #181c56;
187
- }
188
- .eds-form-control-wrapper--error {
189
- border-color: #d31b1b;
190
- --border-color: #d31b1b;
191
- }
192
- .eds-form-control-wrapper--error:hover {
193
- border-color: #ff9494;
194
- }
195
- .eds-form-control-wrapper--error[focus-within] {
196
- border-color: #d31b1b;
197
- }
198
- .eds-form-control-wrapper--error:focus-within {
199
- border-color: #d31b1b;
200
- }
201
- .eds-contrast .eds-form-control-wrapper--error {
202
- border-color: #ff9494;
203
- --border-color: #ff9494;
204
- }
205
- .eds-contrast .eds-form-control-wrapper--error:hover {
206
- border-color: #d31b1b;
207
- }
208
- .eds-contrast .eds-form-control-wrapper--error[focus-within] {
209
- border-color: #181c56;
210
- --border-color: #ff9494;
211
- }
212
- .eds-contrast .eds-form-control-wrapper--error:focus-within {
213
- border-color: #181c56;
214
- --border-color: #ff9494;
215
- }
216
- .eds-contrast .eds-form-control-wrapper--dark {
217
- background-color: #181c56;
218
- color: #ffffff;
219
- }
220
- .eds-contrast .eds-form-control-wrapper--dark ::-moz-placeholder {
221
- color: #aeb7e2;
222
- }
223
- .eds-contrast .eds-form-control-wrapper--dark ::placeholder {
224
- color: #aeb7e2;
225
- }
226
- .eds-contrast .eds-form-control-wrapper--dark:hover {
227
- border-color: #aeb7e2;
228
- }
229
- .eds-contrast .eds-form-control-wrapper--dark[focus-within] {
230
- background-color: #292b6a;
231
- border-color: #aeb7e2;
232
- }
233
- .eds-contrast .eds-form-control-wrapper--dark:focus-within {
234
- background-color: #292b6a;
235
- border-color: #aeb7e2;
236
- }
237
- .eds-contrast .eds-form-control-wrapper--dark * {
238
- background-color: transparent;
239
- color: inherit;
240
- }
241
- .eds-contrast .eds-form-control-wrapper--dark.eds-form-control-wrapper--disabled {
242
- background-color: #292b6a;
243
- color: #8285a8;
244
- }
245
-
246
- .eds-form-control {
247
- -webkit-appearance: none;
248
- -moz-appearance: none;
249
- appearance: none;
250
- background-color: transparent;
251
- border: 0;
252
- color: inherit;
253
- display: block;
254
- font-family: inherit;
255
- line-height: 1rem;
256
- font-size: 1rem;
257
- padding: 20px 1rem 0.25rem;
258
- width: 100%;
259
- }
260
- .eds-form-control::-moz-placeholder {
261
- opacity: 0;
262
- -moz-transition: opacity 0.2s ease-in-out;
263
- transition: opacity 0.2s ease-in-out;
264
- }
265
- .eds-form-control::placeholder {
266
- opacity: 0;
267
- transition: opacity 0.2s ease-in-out;
268
- }
269
- .eds-form-control:focus {
270
- outline: none;
271
- }
272
- .eds-form-control:focus::-moz-placeholder {
273
- opacity: 1;
274
- }
275
- .eds-form-control:focus::placeholder {
276
- opacity: 1;
277
- }
278
- .eds-form-control__prepend, .eds-form-control__append {
279
- position: relative;
280
- margin: 0 1rem;
281
- line-height: inherit;
282
- }
283
- .eds-form-control__prepend--tooltip, .eds-form-control__append--tooltip {
284
- position: static;
285
- }
286
- .eds-form-control__prepend svg, .eds-form-control__append svg {
287
- top: 0.125rem;
288
- }
289
- .eds-form-control__prepend {
290
- margin-right: 0;
291
- }
292
- .eds-form-control__append {
293
- margin-left: 0;
294
- }
295
- .eds-fieldset {
296
- margin: 0;
297
- padding: 0;
298
- border: 0;
299
- }
300
- /* DO NOT CHANGE!*/
301
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
302
55
  .eds-checkbox__container {
303
56
  display: flex;
304
57
  align-items: center;
@@ -461,15 +214,222 @@
461
214
  }
462
215
  /* DO NOT CHANGE!*/
463
216
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
464
- .eds-input-group {
465
- color: inherit;
466
- display: block;
467
- position: relative;
468
- }
469
- .eds-input-group__label {
470
- color: #656782;
471
- display: flex;
472
- font-size: 1rem;
217
+ .eds-switch {
218
+ cursor: pointer;
219
+ -webkit-user-select: none;
220
+ -moz-user-select: none;
221
+ user-select: none;
222
+ padding: 0.5rem 0;
223
+ width: -moz-fit-content;
224
+ width: fit-content;
225
+ }
226
+ .eds-switch input {
227
+ opacity: 0;
228
+ pointer-events: none;
229
+ position: absolute;
230
+ }
231
+ .eds-switch--right {
232
+ display: flex;
233
+ flex-direction: row;
234
+ align-items: center;
235
+ }
236
+ .eds-switch--bottom {
237
+ display: flex;
238
+ flex-direction: column;
239
+ align-items: center;
240
+ }
241
+ .eds-switch__circle {
242
+ border-radius: 50%;
243
+ height: 1.25rem;
244
+ width: 1.25rem;
245
+ content: "";
246
+ display: flex;
247
+ align-items: center;
248
+ justify-content: center;
249
+ transition: left 0.1s ease-in-out, background-color 0.1s ease-in-out;
250
+ box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.25);
251
+ background-color: #ffffff;
252
+ top: 0.125rem;
253
+ left: 0.125rem;
254
+ position: relative;
255
+ }
256
+ .eds-switch__switch--large .eds-switch__circle {
257
+ height: 1.75rem;
258
+ width: 1.75rem;
259
+ }
260
+ .eds-contrast .eds-switch__circle {
261
+ box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.5);
262
+ }
263
+ .eds-switch__switch {
264
+ position: relative;
265
+ background-color: #949494;
266
+ content: "";
267
+ display: block;
268
+ transition: background-color 0.1s ease-in-out;
269
+ height: 1.5rem;
270
+ width: 3rem;
271
+ border-radius: 1.5rem;
272
+ box-shadow: inset 0px 2px 2px -1px rgba(0, 0, 0, 0.1);
273
+ }
274
+ .eds-contrast .eds-switch__switch {
275
+ background-color: #8285a8;
276
+ }
277
+ .eds-switch--right .eds-switch__switch {
278
+ margin-right: 0.75rem;
279
+ }
280
+ .eds-switch__switch svg g,
281
+ .eds-switch__switch path {
282
+ fill: #646464;
283
+ transition: fill ease-in-out 0.1s;
284
+ }
285
+ .eds-contrast .eds-switch__switch svg g,
286
+ .eds-contrast .eds-switch__switch path {
287
+ fill: #181c56;
288
+ }
289
+ :checked + .eds-switch__switch {
290
+ background-color: var(--eds-switch-color);
291
+ }
292
+ :checked + .eds-switch__switch .eds-switch__circle {
293
+ left: 1.625rem;
294
+ }
295
+ :checked + .eds-switch__switch .eds-switch__circle svg g,
296
+ :checked + .eds-switch__switch .eds-switch__circle path {
297
+ fill: var(--eds-switch-color);
298
+ }
299
+ .eds-contrast :checked + .eds-switch__switch {
300
+ background-color: var(--eds-switch-contrast-color);
301
+ }
302
+ :focus + .eds-switch__switch {
303
+ outline: none;
304
+ box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
305
+ outline-offset: 0.125rem;
306
+ }
307
+ .eds-contrast :focus + .eds-switch__switch {
308
+ box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
309
+ }
310
+ .eds-switch__switch--large {
311
+ width: 3.75rem;
312
+ height: 2rem;
313
+ border-radius: 3.75rem;
314
+ }
315
+ :checked + .eds-switch__switch--large .eds-switch__circle {
316
+ left: 1.875rem;
317
+ }
318
+ .eds-switch__switch--large svg {
319
+ position: relative;
320
+ right: 0.05rem;
321
+ }
322
+ .eds-switch__label--large--right {
323
+ font-size: 1rem;
324
+ }
325
+ .eds-switch__label--large--bottom {
326
+ font-size: 0.875rem;
327
+ }
328
+ .eds-switch__label--medium--right {
329
+ font-size: 0.875rem;
330
+ }
331
+ .eds-switch__label--medium--bottom {
332
+ font-size: 0.75rem;
333
+ }
334
+ /* DO NOT CHANGE!*/
335
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
336
+ .eds-form-component--radio__container {
337
+ display: flex;
338
+ justify-content: center;
339
+ align-items: center;
340
+ position: relative;
341
+ cursor: pointer;
342
+ height: 2rem;
343
+ width: -moz-fit-content;
344
+ width: fit-content;
345
+ -webkit-user-select: none;
346
+ -moz-user-select: none;
347
+ user-select: none;
348
+ }
349
+ .eds-form-component--radio__container :hover ~ .eds-form-component--radio__radio {
350
+ border-color: #54568c;
351
+ }
352
+ .eds-form-component--radio__container :hover ~ .eds-form-component--radio__radio .eds-form-component--radio__circle {
353
+ background-color: #54568c;
354
+ }
355
+ .eds-contrast .eds-form-component--radio__container :hover ~ .eds-form-component--radio__radio {
356
+ border-color: #8285a8;
357
+ }
358
+ .eds-contrast .eds-form-component--radio__container :hover ~ .eds-form-component--radio__radio .eds-form-component--radio__circle {
359
+ background-color: #8285a8;
360
+ }
361
+ .eds-form-component--radio__container input {
362
+ position: absolute;
363
+ opacity: 0;
364
+ cursor: pointer;
365
+ height: 0;
366
+ width: 0;
367
+ }
368
+ .eds-form-component--radio__container input:checked ~ .eds-form-component--radio__radio .eds-form-component--radio__circle {
369
+ height: 0.625rem;
370
+ width: 0.625rem;
371
+ }
372
+ .eds-form-component--radio__container input:focus ~ .eds-form-component--radio__radio {
373
+ outline: none;
374
+ box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
375
+ outline-offset: 0.125rem;
376
+ }
377
+ .eds-contrast .eds-form-component--radio__container input:focus ~ .eds-form-component--radio__radio {
378
+ box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
379
+ }
380
+ .eds-form-component--radio__container .eds-form-component--radio__radio {
381
+ position: relative;
382
+ height: 1.25rem;
383
+ width: 1.25rem;
384
+ margin-right: 1rem;
385
+ background-color: #ffffff;
386
+ border: 0.125rem solid #181c56;
387
+ border-radius: 50%;
388
+ display: flex;
389
+ align-items: center;
390
+ justify-content: center;
391
+ }
392
+ .eds-contrast .eds-form-component--radio__container .eds-form-component--radio__radio {
393
+ background-color: #181c56;
394
+ border-color: #aeb7e2;
395
+ }
396
+ .eds-form-component--radio__container .eds-form-component--radio__radio.eds-form-component--radio__radio--disabled {
397
+ background: #d1d3d3;
398
+ border-color: #d1d3d3;
399
+ cursor: not-allowed;
400
+ }
401
+ .eds-form-component--radio__container .eds-form-component--radio__radio.eds-form-component--radio__radio--disabled:hover {
402
+ border-color: #d1d3d3;
403
+ }
404
+ .eds-contrast .eds-form-component--radio__container .eds-form-component--radio__radio.eds-form-component--radio__radio--disabled {
405
+ background: #d1d3d3;
406
+ border-color: #d1d3d3;
407
+ }
408
+ .eds-form-component--radio__container .eds-form-component--radio__radio.eds-form-component--radio__radio--disabled ~ .eds-form-component--radio__label {
409
+ color: #656782;
410
+ }
411
+ .eds-form-component--radio__container .eds-form-component--radio__radio .eds-form-component--radio__circle {
412
+ display: block;
413
+ width: 0;
414
+ height: 0;
415
+ border-radius: 50%;
416
+ background-color: #181c56;
417
+ transition: width 0.1s ease-in-out, height 0.1s ease-in-out;
418
+ }
419
+ .eds-contrast .eds-form-component--radio__container .eds-form-component--radio__radio .eds-form-component--radio__circle {
420
+ background-color: #aeb7e2;
421
+ }
422
+ /* DO NOT CHANGE!*/
423
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
424
+ .eds-input-group {
425
+ color: inherit;
426
+ display: block;
427
+ position: relative;
428
+ }
429
+ .eds-input-group__label {
430
+ color: #656782;
431
+ display: flex;
432
+ font-size: 1rem;
473
433
  position: absolute;
474
434
  line-height: 1rem;
475
435
  height: 3rem;
@@ -593,111 +553,23 @@
593
553
  }
594
554
  /* DO NOT CHANGE!*/
595
555
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
596
- .eds-form-component--radio__container {
597
- display: flex;
598
- justify-content: center;
599
- align-items: center;
600
- position: relative;
601
- cursor: pointer;
602
- height: 2rem;
603
- width: -moz-fit-content;
604
- width: fit-content;
605
- -webkit-user-select: none;
606
- -moz-user-select: none;
607
- user-select: none;
608
- }
609
- .eds-form-component--radio__container :hover ~ .eds-form-component--radio__radio {
610
- border-color: #54568c;
556
+ .eds-input-panel[focus-within] .eds-input-panel__container {
557
+ border-color: #181c56;
558
+ box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
611
559
  }
612
- .eds-form-component--radio__container :hover ~ .eds-form-component--radio__radio .eds-form-component--radio__circle {
613
- background-color: #54568c;
560
+ .eds-input-panel:focus-within .eds-input-panel__container {
561
+ border-color: #181c56;
562
+ box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
614
563
  }
615
- .eds-contrast .eds-form-component--radio__container :hover ~ .eds-form-component--radio__radio {
616
- border-color: #8285a8;
564
+ .eds-contrast .eds-input-panel[focus-within] .eds-input-panel__container {
565
+ border-color: #ffffff;
566
+ box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
617
567
  }
618
- .eds-contrast .eds-form-component--radio__container :hover ~ .eds-form-component--radio__radio .eds-form-component--radio__circle {
619
- background-color: #8285a8;
568
+ .eds-contrast .eds-input-panel:focus-within .eds-input-panel__container {
569
+ border-color: #ffffff;
570
+ box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
620
571
  }
621
- .eds-form-component--radio__container input {
622
- position: absolute;
623
- opacity: 0;
624
- cursor: pointer;
625
- height: 0;
626
- width: 0;
627
- }
628
- .eds-form-component--radio__container input:checked ~ .eds-form-component--radio__radio .eds-form-component--radio__circle {
629
- height: 0.625rem;
630
- width: 0.625rem;
631
- }
632
- .eds-form-component--radio__container input:focus ~ .eds-form-component--radio__radio {
633
- outline: none;
634
- box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
635
- outline-offset: 0.125rem;
636
- }
637
- .eds-contrast .eds-form-component--radio__container input:focus ~ .eds-form-component--radio__radio {
638
- box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
639
- }
640
- .eds-form-component--radio__container .eds-form-component--radio__radio {
641
- position: relative;
642
- height: 1.25rem;
643
- width: 1.25rem;
644
- margin-right: 1rem;
645
- background-color: #ffffff;
646
- border: 0.125rem solid #181c56;
647
- border-radius: 50%;
648
- display: flex;
649
- align-items: center;
650
- justify-content: center;
651
- }
652
- .eds-contrast .eds-form-component--radio__container .eds-form-component--radio__radio {
653
- background-color: #181c56;
654
- border-color: #aeb7e2;
655
- }
656
- .eds-form-component--radio__container .eds-form-component--radio__radio.eds-form-component--radio__radio--disabled {
657
- background: #d1d3d3;
658
- border-color: #d1d3d3;
659
- cursor: not-allowed;
660
- }
661
- .eds-form-component--radio__container .eds-form-component--radio__radio.eds-form-component--radio__radio--disabled:hover {
662
- border-color: #d1d3d3;
663
- }
664
- .eds-contrast .eds-form-component--radio__container .eds-form-component--radio__radio.eds-form-component--radio__radio--disabled {
665
- background: #d1d3d3;
666
- border-color: #d1d3d3;
667
- }
668
- .eds-form-component--radio__container .eds-form-component--radio__radio.eds-form-component--radio__radio--disabled ~ .eds-form-component--radio__label {
669
- color: #656782;
670
- }
671
- .eds-form-component--radio__container .eds-form-component--radio__radio .eds-form-component--radio__circle {
672
- display: block;
673
- width: 0;
674
- height: 0;
675
- border-radius: 50%;
676
- background-color: #181c56;
677
- transition: width 0.1s ease-in-out, height 0.1s ease-in-out;
678
- }
679
- .eds-contrast .eds-form-component--radio__container .eds-form-component--radio__radio .eds-form-component--radio__circle {
680
- background-color: #aeb7e2;
681
- }
682
- /* DO NOT CHANGE!*/
683
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
684
- .eds-input-panel[focus-within] .eds-input-panel__container {
685
- border-color: #181c56;
686
- box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
687
- }
688
- .eds-input-panel:focus-within .eds-input-panel__container {
689
- border-color: #181c56;
690
- box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
691
- }
692
- .eds-contrast .eds-input-panel[focus-within] .eds-input-panel__container {
693
- border-color: #ffffff;
694
- box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
695
- }
696
- .eds-contrast .eds-input-panel:focus-within .eds-input-panel__container {
697
- border-color: #ffffff;
698
- box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
699
- }
700
- .eds-input-panel > input {
572
+ .eds-input-panel > input {
701
573
  position: absolute;
702
574
  opacity: 0;
703
575
  cursor: pointer;
@@ -843,122 +715,250 @@ input:disabled + .eds-input-panel__container {
843
715
  }
844
716
  /* DO NOT CHANGE!*/
845
717
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
846
- .eds-switch {
847
- cursor: pointer;
848
- -webkit-user-select: none;
849
- -moz-user-select: none;
850
- user-select: none;
851
- padding: 0.5rem 0;
852
- width: -moz-fit-content;
853
- width: fit-content;
718
+ .eds-form-control-wrapper {
719
+ --border-color: #7C7F9F;
720
+ --border-color-hover: #aeb7e2;
721
+ align-items: center;
722
+ background-color: #ffffff;
723
+ border-radius: 0.25rem;
724
+ border: 0.125rem solid var(--border-color);
725
+ box-shadow: 0 0 0 transparent;
726
+ color: #181c56;
727
+ display: flex;
728
+ position: relative;
729
+ width: 100%;
730
+ min-height: 3rem;
731
+ transition: border-color 0.1s ease-in-out;
732
+ --textarea-label-background: t.$colors-brand-white;
733
+ /*
734
+ Some input controls require a darker design while inside a contrast block.
735
+ These elements require the `--dark` modifier, even on the wrapper.
736
+ */
854
737
  }
855
- .eds-switch input {
856
- opacity: 0;
738
+ .eds-form-control-wrapper[focus-within], .eds-form-control-wrapper:hover {
739
+ --border-color: #181c56;
740
+ }
741
+ .eds-form-control-wrapper:focus-within, .eds-form-control-wrapper:hover {
742
+ --border-color: #181c56;
743
+ }
744
+ .eds-contrast .eds-form-control-wrapper:hover {
745
+ --border-color: #aeb7e2;
746
+ }
747
+ .eds-form-control-wrapper[focus-within] {
748
+ box-shadow: inset 0 0 0 1px var(--border-color);
749
+ }
750
+ .eds-form-control-wrapper:focus-within {
751
+ box-shadow: inset 0 0 0 1px var(--border-color);
752
+ }
753
+ .eds-contrast .eds-form-control-wrapper[focus-within] {
754
+ --border-color: #181c56;
755
+ box-shadow: 0 0 0 0.125rem #aeb7e2;
756
+ }
757
+ .eds-contrast .eds-form-control-wrapper:focus-within {
758
+ --border-color: #181c56;
759
+ box-shadow: 0 0 0 0.125rem #aeb7e2;
760
+ }
761
+ .eds-form-control-wrapper ::-moz-placeholder {
762
+ color: #656782;
763
+ }
764
+ .eds-form-control-wrapper ::placeholder {
765
+ color: #656782;
766
+ }
767
+ .eds-form-control-wrapper--disabled {
768
+ --border-color: transparent;
769
+ background-color: #e9e9e9;
857
770
  pointer-events: none;
858
- position: absolute;
771
+ color: #646464;
859
772
  }
860
- .eds-switch--right {
861
- display: flex;
862
- flex-direction: row;
863
- align-items: center;
773
+ .eds-form-control-wrapper--disabled .eds-input-group__label {
774
+ color: #646464;
864
775
  }
865
- .eds-switch--bottom {
866
- display: flex;
867
- flex-direction: column;
868
- align-items: center;
776
+ .eds-contrast .eds-form-control-wrapper--disabled {
777
+ background: #292b6a;
778
+ color: #8285a8;
869
779
  }
870
- .eds-switch__circle {
871
- border-radius: 50%;
872
- height: 1.25rem;
873
- width: 1.25rem;
874
- content: "";
875
- display: flex;
876
- align-items: center;
877
- justify-content: center;
878
- transition: left 0.1s ease-in-out, background-color 0.1s ease-in-out;
879
- box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.25);
880
- background-color: #ffffff;
881
- top: 0.125rem;
882
- left: 0.125rem;
883
- position: relative;
780
+ .eds-contrast .eds-form-control-wrapper--disabled .eds-input-group__label {
781
+ color: #8285a8;
884
782
  }
885
- .eds-switch__switch--large .eds-switch__circle {
886
- height: 1.75rem;
887
- width: 1.75rem;
783
+ .eds-form-control-wrapper--disabled::before, .eds-form-control-wrapper--disabled::after {
784
+ display: none;
888
785
  }
889
- .eds-contrast .eds-switch__circle {
890
- box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.5);
786
+ .eds-form-control-wrapper--readonly {
787
+ --border-color: transparent;
788
+ --textarea-label-background: t.$colors-greys-grey90;
789
+ pointer-events: none;
790
+ cursor: default;
791
+ background: #f8f8f8;
891
792
  }
892
- .eds-switch__switch {
893
- position: relative;
894
- background-color: #949494;
895
- content: "";
896
- display: block;
897
- transition: background-color 0.1s ease-in-out;
898
- height: 1.5rem;
899
- width: 3rem;
900
- border-radius: 1.5rem;
901
- box-shadow: inset 0px 2px 2px -1px rgba(0, 0, 0, 0.1);
793
+ .eds-contrast .eds-form-control-wrapper--readonly {
794
+ --textarea-label-background: t.$colors-blues-blue10;
795
+ background: #292b6a;
796
+ color: #ffffff;
902
797
  }
903
- .eds-contrast .eds-switch__switch {
904
- background-color: #8285a8;
798
+ .eds-contrast .eds-form-control-wrapper--readonly .eds-input-group__label {
799
+ color: #aeb7e2;
905
800
  }
906
- .eds-switch--right .eds-switch__switch {
907
- margin-right: 0.75rem;
801
+ .eds-form-control-wrapper--readonly::before, .eds-form-control-wrapper--readonly::after {
802
+ display: none;
908
803
  }
909
- .eds-switch__switch svg g,
910
- .eds-switch__switch path {
911
- fill: #646464;
912
- transition: fill ease-in-out 0.1s;
804
+ .eds-form-control-wrapper--size-medium .eds-form-control,
805
+ .eds-form-control-wrapper--size-medium .eds-form-control__append,
806
+ .eds-form-control-wrapper--size-medium .eds-form-control__prepend {
807
+ font-size: 1rem;
808
+ line-height: 1rem;
913
809
  }
914
- .eds-contrast .eds-switch__switch svg g,
915
- .eds-contrast .eds-switch__switch path {
916
- fill: #181c56;
810
+ .eds-form-control-wrapper--size-large {
811
+ min-height: 4rem;
812
+ padding: 0 0.5rem;
917
813
  }
918
- :checked + .eds-switch__switch {
919
- background-color: var(--eds-switch-color);
814
+ .eds-form-control-wrapper--size-large::before, .eds-form-control-wrapper--size-large::after {
815
+ border-width: 0.25rem;
920
816
  }
921
- :checked + .eds-switch__switch .eds-switch__circle {
922
- left: 1.625rem;
817
+ .eds-form-control-wrapper--size-large .eds-form-control,
818
+ .eds-form-control-wrapper--size-large .eds-form-control__append,
819
+ .eds-form-control-wrapper--size-large .eds-form-control__prepend {
820
+ font-size: 1.5rem;
821
+ line-height: 2.25rem;
923
822
  }
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);
823
+ .eds-form-control-wrapper--success {
824
+ border-color: #1a8e60;
825
+ --border-color: #1a8e60;
927
826
  }
928
- .eds-contrast :checked + .eds-switch__switch {
929
- background-color: var(--eds-switch-contrast-color);
827
+ .eds-form-control-wrapper--success:hover {
828
+ border-color: #5ac39a;
930
829
  }
931
- :focus + .eds-switch__switch {
932
- outline: none;
933
- box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
934
- outline-offset: 0.125rem;
830
+ .eds-form-control-wrapper--success[focus-within] {
831
+ border-color: #1a8e60;
935
832
  }
936
- .eds-contrast :focus + .eds-switch__switch {
937
- box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
833
+ .eds-form-control-wrapper--success:focus-within {
834
+ border-color: #1a8e60;
938
835
  }
939
- .eds-switch__switch--large {
940
- width: 3.75rem;
941
- height: 2rem;
942
- border-radius: 3.75rem;
836
+ .eds-contrast .eds-form-control-wrapper--success {
837
+ border-color: #5ac39a;
838
+ --border-color: #5ac39a;
943
839
  }
944
- :checked + .eds-switch__switch--large .eds-switch__circle {
945
- left: 1.875rem;
840
+ .eds-contrast .eds-form-control-wrapper--success:hover {
841
+ border-color: #1a8e60;
946
842
  }
947
- .eds-switch__switch--large svg {
948
- position: relative;
949
- right: 0.05rem;
843
+ .eds-contrast .eds-form-control-wrapper--success[focus-within] {
844
+ --border-color: #5ac39a;
845
+ border-color: #181c56;
950
846
  }
951
- .eds-switch__label--large--right {
847
+ .eds-contrast .eds-form-control-wrapper--success:focus-within {
848
+ --border-color: #5ac39a;
849
+ border-color: #181c56;
850
+ }
851
+ .eds-form-control-wrapper--error {
852
+ border-color: #d31b1b;
853
+ --border-color: #d31b1b;
854
+ }
855
+ .eds-form-control-wrapper--error:hover {
856
+ border-color: #ff9494;
857
+ }
858
+ .eds-form-control-wrapper--error[focus-within] {
859
+ border-color: #d31b1b;
860
+ }
861
+ .eds-form-control-wrapper--error:focus-within {
862
+ border-color: #d31b1b;
863
+ }
864
+ .eds-contrast .eds-form-control-wrapper--error {
865
+ border-color: #ff9494;
866
+ --border-color: #ff9494;
867
+ }
868
+ .eds-contrast .eds-form-control-wrapper--error:hover {
869
+ border-color: #d31b1b;
870
+ }
871
+ .eds-contrast .eds-form-control-wrapper--error[focus-within] {
872
+ border-color: #181c56;
873
+ --border-color: #ff9494;
874
+ }
875
+ .eds-contrast .eds-form-control-wrapper--error:focus-within {
876
+ border-color: #181c56;
877
+ --border-color: #ff9494;
878
+ }
879
+ .eds-contrast .eds-form-control-wrapper--dark {
880
+ background-color: #181c56;
881
+ color: #ffffff;
882
+ }
883
+ .eds-contrast .eds-form-control-wrapper--dark ::-moz-placeholder {
884
+ color: #aeb7e2;
885
+ }
886
+ .eds-contrast .eds-form-control-wrapper--dark ::placeholder {
887
+ color: #aeb7e2;
888
+ }
889
+ .eds-contrast .eds-form-control-wrapper--dark:hover {
890
+ border-color: #aeb7e2;
891
+ }
892
+ .eds-contrast .eds-form-control-wrapper--dark[focus-within] {
893
+ background-color: #292b6a;
894
+ border-color: #aeb7e2;
895
+ }
896
+ .eds-contrast .eds-form-control-wrapper--dark:focus-within {
897
+ background-color: #292b6a;
898
+ border-color: #aeb7e2;
899
+ }
900
+ .eds-contrast .eds-form-control-wrapper--dark * {
901
+ background-color: transparent;
902
+ color: inherit;
903
+ }
904
+ .eds-contrast .eds-form-control-wrapper--dark.eds-form-control-wrapper--disabled {
905
+ background-color: #292b6a;
906
+ color: #8285a8;
907
+ }
908
+
909
+ .eds-form-control {
910
+ -webkit-appearance: none;
911
+ -moz-appearance: none;
912
+ appearance: none;
913
+ background-color: transparent;
914
+ border: 0;
915
+ color: inherit;
916
+ display: block;
917
+ font-family: inherit;
918
+ line-height: 1rem;
952
919
  font-size: 1rem;
920
+ padding: 20px 1rem 0.25rem;
921
+ width: 100%;
953
922
  }
954
- .eds-switch__label--large--bottom {
955
- font-size: 0.875rem;
923
+ .eds-form-control::-moz-placeholder {
924
+ opacity: 0;
925
+ -moz-transition: opacity 0.2s ease-in-out;
926
+ transition: opacity 0.2s ease-in-out;
956
927
  }
957
- .eds-switch__label--medium--right {
958
- font-size: 0.875rem;
928
+ .eds-form-control::placeholder {
929
+ opacity: 0;
930
+ transition: opacity 0.2s ease-in-out;
959
931
  }
960
- .eds-switch__label--medium--bottom {
961
- font-size: 0.75rem;
932
+ .eds-form-control:focus {
933
+ outline: none;
934
+ }
935
+ .eds-form-control:focus::-moz-placeholder {
936
+ opacity: 1;
937
+ }
938
+ .eds-form-control:focus::placeholder {
939
+ opacity: 1;
940
+ }
941
+ .eds-form-control__prepend, .eds-form-control__append {
942
+ position: relative;
943
+ margin: 0 1rem;
944
+ line-height: inherit;
945
+ }
946
+ .eds-form-control__prepend--tooltip, .eds-form-control__append--tooltip {
947
+ position: static;
948
+ }
949
+ .eds-form-control__prepend svg, .eds-form-control__append svg {
950
+ top: 0.125rem;
951
+ }
952
+ .eds-form-control__prepend {
953
+ margin-right: 0;
954
+ }
955
+ .eds-form-control__append {
956
+ margin-left: 0;
957
+ }
958
+ .eds-fieldset {
959
+ margin: 0;
960
+ padding: 0;
961
+ border: 0;
962
962
  }
963
963
  /* DO NOT CHANGE!*/
964
964
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@entur/form",
3
- "version": "7.0.35-alpha.0",
3
+ "version": "7.0.36",
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": "^6.13.3-alpha.0",
31
- "@entur/tokens": "^3.12.1-alpha.0",
32
- "@entur/tooltip": "^2.6.44-alpha.0",
33
- "@entur/typography": "^1.8.22-alpha.0",
30
+ "@entur/icons": "^6.15.0",
31
+ "@entur/tokens": "^3.12.0",
32
+ "@entur/tooltip": "^2.6.45",
33
+ "@entur/typography": "^1.8.23",
34
34
  "@entur/utils": "^0.10.0",
35
35
  "classnames": "^2.3.1"
36
36
  },
37
- "gitHead": "d6797c03d0ad7c0629f3851445759d9552660dcd"
37
+ "gitHead": "3842f90322ff4340572e6597baf4ce753a6bf355"
38
38
  }