@entur/form 5.2.1 → 5.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/dist/styles.css CHANGED
@@ -2,166 +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-feedback-text {
6
- display: flex;
7
- align-items: center;
8
- margin-top: 0.25rem;
9
- }
10
- .eds-feedback-text--info {
11
- padding-left: calc(1rem + 0.125rem);
12
- }
13
- .eds-feedback-text__text {
14
- color: #181c56;
15
- }
16
- .eds-contrast .eds-feedback-text__text {
17
- color: #ffffff;
18
- }
19
-
20
- .eds-feedback-text__icon {
21
- font-size: 1.5rem;
22
- min-height: 1.5rem;
23
- min-width: 1.5rem;
24
- padding-right: 0.5rem;
25
- position: relative;
26
- top: -0.1rem;
27
- }
28
- .eds-feedback-text__icon--success {
29
- color: #1a8e60;
30
- }
31
- .eds-contrast .eds-feedback-text__icon--success {
32
- color: #5ac39a;
33
- }
34
- .eds-feedback-text__icon--error {
35
- color: #d31b1b;
36
- }
37
- .eds-contrast .eds-feedback-text__icon--error {
38
- color: #ff9494;
39
- }
40
- .eds-feedback-text__icon--info {
41
- color: #0082b9;
42
- }
43
- .eds-contrast .eds-feedback-text__icon--info {
44
- color: #64b3e7;
45
- }
46
- .eds-feedback-text__icon--warning {
47
- color: #0082b9;
48
- }
49
- .eds-contrast .eds-feedback-text__icon--warning {
50
- color: #64b3e7;
51
- }/* DO NOT CHANGE!*/
52
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
53
- .eds-checkbox__container {
54
- display: flex;
55
- align-items: center;
56
- position: relative;
57
- appearance: none;
58
- cursor: pointer;
59
- height: 2rem;
60
- user-select: none;
61
- width: fit-content;
62
- }
63
- .eds-checkbox__container--reduced-click-area {
64
- height: fit-content;
65
- }
66
- .eds-checkbox__container input {
67
- position: absolute;
68
- opacity: 0;
69
- height: 0;
70
- width: 0;
71
- }
72
- .eds-checkbox__container input:checked + .eds-checkbox__icon, .eds-checkbox__container input:indeterminate + .eds-checkbox__icon {
73
- background-color: #181c56;
74
- }
75
- .eds-checkbox__container input:checked + .eds-checkbox__icon .eds-checkbox-icon, .eds-checkbox__container input:indeterminate + .eds-checkbox__icon .eds-checkbox-icon {
76
- visibility: visible;
77
- }
78
- .eds-checkbox__container input:checked + .eds-checkbox__icon .eds-checkbox-icon__path, .eds-checkbox__container input:indeterminate + .eds-checkbox__icon .eds-checkbox-icon__path {
79
- stroke: #ffffff;
80
- animation: stroke ease-in-out 0.2s 0.1s forwards;
81
- }
82
- .eds-checkbox__container input:checked + .eds-checkbox__icon--disabled, .eds-checkbox__container input:indeterminate + .eds-checkbox__icon--disabled {
83
- opacity: 0.5;
84
- }
85
- .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 {
86
- opacity: 0.5;
87
- }
88
- .eds-contrast .eds-checkbox__container input:checked + .eds-checkbox__icon, .eds-contrast .eds-checkbox__container input:indeterminate + .eds-checkbox__icon {
89
- background: #54568c;
90
- }
91
- .eds-checkbox__container:hover input + .eds-checkbox__icon {
92
- border-color: #54568c;
93
- background: #f3f3f3;
94
- }
95
- .eds-contrast .eds-checkbox__container:hover input + .eds-checkbox__icon {
96
- border-color: #656782;
97
- background: #292b6a;
98
- }
99
- .eds-checkbox__container:hover input:checked + .eds-checkbox__icon,
100
- .eds-checkbox__container:hover input:indeterminate + .eds-checkbox__icon {
101
- border-color: #54568c;
102
- background-color: #54568c;
103
- }
104
- .eds-contrast .eds-checkbox__container:hover input:checked + .eds-checkbox__icon,
105
- .eds-contrast .eds-checkbox__container:hover input:indeterminate + .eds-checkbox__icon {
106
- background: #8285a8;
107
- border-color: #8285a8;
108
- }
109
- .eds-checkbox__container:focus + .eds-checkbox__icon,
110
- .eds-checkbox__container :focus-within + .eds-checkbox__icon {
111
- outline: none;
112
- box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
113
- outline-offset: 0.125rem;
114
- }
115
- .eds-contrast .eds-checkbox__container:focus + .eds-checkbox__icon,
116
- .eds-contrast .eds-checkbox__container :focus-within + .eds-checkbox__icon {
117
- box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
118
- }
119
- .eds-checkbox--disabled {
120
- pointer-events: none;
121
- }
122
- .eds-checkbox--disabled .eds-checkbox__label {
123
- opacity: 0.5;
124
- }
125
- .eds-checkbox--disabled .eds-checkbox__icon {
126
- opacity: 0.5;
127
- }
128
- .eds-checkbox__icon {
129
- display: inline-flex;
130
- justify-content: center;
131
- align-items: center;
132
- position: relative;
133
- margin-right: 1rem;
134
- height: 1.25rem;
135
- width: 1.25rem;
136
- border: 0.125rem solid #181c56;
137
- border-radius: 0.0625rem;
138
- background-color: transparent;
139
- color: #ffffff;
140
- }
141
- .eds-checkbox__icon--reduced-click-area {
142
- margin-right: 0;
143
- }
144
- .eds-contrast .eds-checkbox__icon {
145
- border-color: #54568c;
146
- }
147
- .eds-checkbox__icon .eds-checkbox-icon {
148
- height: 1rem;
149
- width: 1rem;
150
- visibility: hidden;
151
- }
152
- .eds-checkbox__icon .eds-checkbox-icon__path {
153
- transform-origin: 50% 50%;
154
- stroke-dasharray: 48;
155
- stroke-dashoffset: 48;
156
- stroke-width: 0.375rem;
157
- }
158
-
159
- @keyframes stroke {
160
- 100% {
161
- stroke-dashoffset: 0;
162
- }
163
- }/* DO NOT CHANGE!*/
164
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
165
5
  .eds-form-control-wrapper {
166
6
  --border-color: #181c56;
167
7
  --border-color-hover: #aeb7e2;
@@ -359,12 +199,6 @@
359
199
  margin-left: 0;
360
200
  }/* DO NOT CHANGE!*/
361
201
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
362
- textarea.eds-form-control.eds-textarea {
363
- min-height: 7.75rem;
364
- resize: vertical;
365
- line-height: 1.5rem;
366
- }/* DO NOT CHANGE!*/
367
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
368
202
  .eds-fieldset {
369
203
  margin: 0;
370
204
  padding: 0;
@@ -374,40 +208,170 @@ textarea.eds-form-control.eds-textarea {
374
208
  margin: 0 0 0.5rem;
375
209
  }/* DO NOT CHANGE!*/
376
210
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
377
- .eds-textfield__clear-button {
378
- background: none;
379
- border: none;
380
- border-radius: 50%;
381
- color: inherit;
382
- cursor: pointer;
211
+ .eds-feedback-text {
383
212
  display: flex;
384
- font: inherit;
385
- font-size: 1rem;
386
- line-height: 1rem;
387
- padding: 0.5rem;
388
- margin-right: -0.75rem;
213
+ align-items: center;
214
+ margin-top: 0.25rem;
389
215
  }
390
- .eds-textfield__clear-button-wrapper {
216
+ .eds-feedback-text--info {
217
+ padding-left: calc(1rem + 0.125rem);
218
+ }
219
+ .eds-feedback-text__text {
220
+ color: #181c56;
221
+ }
222
+ .eds-contrast .eds-feedback-text__text {
223
+ color: #ffffff;
224
+ }
225
+
226
+ .eds-feedback-text__icon {
227
+ font-size: 1.5rem;
228
+ min-height: 1.5rem;
229
+ min-width: 1.5rem;
230
+ padding-right: 0.5rem;
231
+ position: relative;
232
+ top: -0.1rem;
233
+ }
234
+ .eds-feedback-text__icon--success {
235
+ color: #1a8e60;
236
+ }
237
+ .eds-contrast .eds-feedback-text__icon--success {
238
+ color: #5ac39a;
239
+ }
240
+ .eds-feedback-text__icon--error {
241
+ color: #d31b1b;
242
+ }
243
+ .eds-contrast .eds-feedback-text__icon--error {
244
+ color: #ff9494;
245
+ }
246
+ .eds-feedback-text__icon--info {
247
+ color: #0082b9;
248
+ }
249
+ .eds-contrast .eds-feedback-text__icon--info {
250
+ color: #64b3e7;
251
+ }
252
+ .eds-feedback-text__icon--warning {
253
+ color: #0082b9;
254
+ }
255
+ .eds-contrast .eds-feedback-text__icon--warning {
256
+ color: #64b3e7;
257
+ }/* DO NOT CHANGE!*/
258
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
259
+ .eds-checkbox__container {
391
260
  display: flex;
392
261
  align-items: center;
262
+ position: relative;
263
+ appearance: none;
264
+ cursor: pointer;
265
+ height: 2rem;
266
+ user-select: none;
267
+ width: fit-content;
393
268
  }
394
- .eds-textfield__clear-button:hover {
269
+ .eds-checkbox__container--reduced-click-area {
270
+ height: fit-content;
271
+ }
272
+ .eds-checkbox__container input {
273
+ position: absolute;
274
+ opacity: 0;
275
+ height: 0;
276
+ width: 0;
277
+ }
278
+ .eds-checkbox__container input:checked + .eds-checkbox__icon, .eds-checkbox__container input:indeterminate + .eds-checkbox__icon {
279
+ background-color: #181c56;
280
+ }
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;
283
+ }
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;
287
+ }
288
+ .eds-checkbox__container input:checked + .eds-checkbox__icon--disabled, .eds-checkbox__container input:indeterminate + .eds-checkbox__icon--disabled {
289
+ opacity: 0.5;
290
+ }
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;
293
+ }
294
+ .eds-contrast .eds-checkbox__container input:checked + .eds-checkbox__icon, .eds-contrast .eds-checkbox__container input:indeterminate + .eds-checkbox__icon {
295
+ background: #54568c;
296
+ }
297
+ .eds-checkbox__container:hover input + .eds-checkbox__icon {
298
+ border-color: #54568c;
395
299
  background: #f3f3f3;
396
300
  }
397
- .eds-textfield__clear-button:focus {
301
+ .eds-contrast .eds-checkbox__container:hover input + .eds-checkbox__icon {
302
+ border-color: #656782;
303
+ background: #292b6a;
304
+ }
305
+ .eds-checkbox__container:hover input:checked + .eds-checkbox__icon,
306
+ .eds-checkbox__container:hover input:indeterminate + .eds-checkbox__icon {
307
+ border-color: #54568c;
308
+ background-color: #54568c;
309
+ }
310
+ .eds-contrast .eds-checkbox__container:hover input:checked + .eds-checkbox__icon,
311
+ .eds-contrast .eds-checkbox__container:hover input:indeterminate + .eds-checkbox__icon {
312
+ background: #8285a8;
313
+ border-color: #8285a8;
314
+ }
315
+ .eds-checkbox__container:focus + .eds-checkbox__icon,
316
+ .eds-checkbox__container :focus-within + .eds-checkbox__icon {
398
317
  outline: none;
399
318
  box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
319
+ outline-offset: 0.125rem;
400
320
  }
401
-
402
- .eds-textfield__divider {
403
- content: "";
404
- display: block;
405
- background-color: #e9e9e9;
406
- height: 1.5rem;
407
- width: 1px;
321
+ .eds-contrast .eds-checkbox__container:focus + .eds-checkbox__icon,
322
+ .eds-contrast .eds-checkbox__container :focus-within + .eds-checkbox__icon {
323
+ box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
408
324
  }
409
- .eds-contrast .eds-form-control-wrapper--disabled .eds-textfield__divider {
410
- background-color: #8285a8;
325
+ .eds-checkbox--disabled {
326
+ pointer-events: none;
327
+ }
328
+ .eds-checkbox--disabled .eds-checkbox__label {
329
+ opacity: 0.5;
330
+ }
331
+ .eds-checkbox--disabled .eds-checkbox__icon {
332
+ opacity: 0.5;
333
+ }
334
+ .eds-checkbox__icon {
335
+ display: inline-flex;
336
+ justify-content: center;
337
+ align-items: center;
338
+ position: relative;
339
+ margin-right: 1rem;
340
+ height: 1.25rem;
341
+ width: 1.25rem;
342
+ border: 0.125rem solid #181c56;
343
+ border-radius: 0.0625rem;
344
+ background-color: transparent;
345
+ color: #ffffff;
346
+ }
347
+ .eds-checkbox__icon--reduced-click-area {
348
+ margin-right: 0;
349
+ }
350
+ .eds-contrast .eds-checkbox__icon {
351
+ border-color: #54568c;
352
+ }
353
+ .eds-checkbox__icon .eds-checkbox-icon {
354
+ height: 1rem;
355
+ width: 1rem;
356
+ visibility: hidden;
357
+ }
358
+ .eds-checkbox__icon .eds-checkbox-icon__path {
359
+ transform-origin: 50% 50%;
360
+ stroke-dasharray: 48;
361
+ stroke-dashoffset: 48;
362
+ stroke-width: 0.375rem;
363
+ }
364
+
365
+ @keyframes stroke {
366
+ 100% {
367
+ stroke-dashoffset: 0;
368
+ }
369
+ }/* DO NOT CHANGE!*/
370
+ /* 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;
411
375
  }/* DO NOT CHANGE!*/
412
376
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
413
377
  .eds-form-component--radio__container {
@@ -831,6 +795,52 @@ textarea.eds-form-control.eds-textarea {
831
795
  margin-left: 1rem;
832
796
  }/* DO NOT CHANGE!*/
833
797
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
798
+ .eds-textfield__clear-button {
799
+ background: none;
800
+ border: none;
801
+ border-radius: 50%;
802
+ color: inherit;
803
+ cursor: pointer;
804
+ display: flex;
805
+ font: inherit;
806
+ font-size: 1rem;
807
+ line-height: 1rem;
808
+ padding: 0.5rem;
809
+ margin-right: -0.75rem;
810
+ }
811
+ .eds-textfield__clear-button-wrapper {
812
+ display: flex;
813
+ align-items: center;
814
+ }
815
+ .eds-textfield__clear-button:hover {
816
+ background: #f3f3f3;
817
+ }
818
+ .eds-textfield__clear-button:focus {
819
+ outline: none;
820
+ box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
821
+ }
822
+
823
+ .eds-textfield__divider {
824
+ content: "";
825
+ display: block;
826
+ background-color: #e9e9e9;
827
+ height: 1.5rem;
828
+ width: 1px;
829
+ }
830
+ .eds-contrast .eds-form-control-wrapper--disabled .eds-textfield__divider {
831
+ background-color: #8285a8;
832
+ }/* DO NOT CHANGE!*/
833
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
834
+ .eds-segmented-control {
835
+ margin-top: 0.25rem;
836
+ display: flex;
837
+ background: #d1d4e3;
838
+ border-radius: 0.25rem;
839
+ }
840
+ .eds-contrast .eds-segmented-control {
841
+ background: #393d79;
842
+ }/* DO NOT CHANGE!*/
843
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
834
844
  .eds-segmented-choice {
835
845
  display: block;
836
846
  flex: 1 1 0px;
@@ -893,14 +903,4 @@ textarea.eds-form-control.eds-textarea {
893
903
  }
894
904
  .eds-contrast .eds-segmented-choice:hover input:checked + .eds-base-segmented {
895
905
  --background-color: #d1d4e3;
896
- }/* DO NOT CHANGE!*/
897
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
898
- .eds-segmented-control {
899
- margin-top: 0.25rem;
900
- display: flex;
901
- background: #d1d4e3;
902
- border-radius: 0.25rem;
903
- }
904
- .eds-contrast .eds-segmented-control {
905
- background: #393d79;
906
906
  }
package/dist/utils.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export declare function hasValue(value: any): boolean;
2
- export declare function isFilled(obj: any, SSR?: boolean): boolean;
2
+ export declare function isFilled(obj: any, SSR?: boolean): any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@entur/form",
3
- "version": "5.2.1",
3
+ "version": "5.3.0",
4
4
  "license": "EUPL-1.2",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/form.esm.js",
@@ -17,22 +17,22 @@
17
17
  "access": "public"
18
18
  },
19
19
  "scripts": {
20
- "start": "tsdx watch --noClean",
21
- "build": "tsdx build",
22
- "test": "tsdx test --env=jsdom",
23
- "lint": "tsdx lint"
20
+ "start": "dts watch --noClean",
21
+ "build": "dts build",
22
+ "test": "dts test --env=jsdom",
23
+ "lint": "dts lint"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "react": ">=16.8.0",
27
27
  "react-dom": ">=16.8.0"
28
28
  },
29
29
  "dependencies": {
30
- "@entur/icons": "^3.4.0",
31
- "@entur/tokens": "^3.3.0",
32
- "@entur/tooltip": "^2.5.1",
33
- "@entur/typography": "^1.6.10",
34
- "@entur/utils": "^0.4.2",
30
+ "@entur/icons": "^3.5.0",
31
+ "@entur/tokens": "^3.3.1",
32
+ "@entur/tooltip": "^2.5.3",
33
+ "@entur/typography": "^1.6.11",
34
+ "@entur/utils": "^0.4.3",
35
35
  "classnames": "^2.3.1"
36
36
  },
37
- "gitHead": "6a15d9e27a27775ee3f86e1d3c09d0e9ce484749"
37
+ "gitHead": "c672c8396ce0c3d436746e4299680137488d579d"
38
38
  }