@entur/button 2.7.1 → 2.8.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/CHANGELOG.md +21 -0
- package/dist/BaseSquareButton.d.ts +1 -1
- package/dist/TertiarySquareButton.d.ts +20 -0
- package/dist/button.cjs.development.js +122 -64
- package/dist/button.cjs.development.js.map +1 -1
- package/dist/button.cjs.production.min.js +1 -1
- package/dist/button.cjs.production.min.js.map +1 -1
- package/dist/button.esm.js +82 -45
- package/dist/button.esm.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/styles.css +141 -94
- package/package.json +9 -9
package/dist/styles.css
CHANGED
|
@@ -2,77 +2,52 @@
|
|
|
2
2
|
--eds-button: 1;
|
|
3
3
|
}/* DO NOT CHANGE!*/
|
|
4
4
|
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
5
|
-
.eds-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
margin: 0;
|
|
11
|
-
}/* DO NOT CHANGE!*/
|
|
12
|
-
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
13
|
-
.eds-floating-button {
|
|
14
|
-
align-items: center;
|
|
15
|
-
appearance: none;
|
|
16
|
-
background: #181c56;
|
|
17
|
-
border: 0;
|
|
18
|
-
border-radius: 1.5rem;
|
|
19
|
-
box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.25);
|
|
20
|
-
color: #ffffff;
|
|
5
|
+
.eds-icon-button {
|
|
6
|
+
border: 0.0625rem solid transparent;
|
|
7
|
+
border-radius: 0.25rem;
|
|
8
|
+
background: none;
|
|
9
|
+
color: inherit;
|
|
21
10
|
cursor: pointer;
|
|
22
11
|
display: flex;
|
|
23
|
-
font-family: inherit;
|
|
24
|
-
font-size: 0.875rem;
|
|
25
|
-
font-weight: 500;
|
|
26
12
|
justify-content: center;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
padding: 0 1rem;
|
|
31
|
-
position: relative;
|
|
32
|
-
z-index: 10;
|
|
33
|
-
}
|
|
34
|
-
.eds-floating-button--extended {
|
|
35
|
-
padding: 0 0.9375rem;
|
|
13
|
+
align-items: center;
|
|
14
|
+
font-size: 1rem;
|
|
15
|
+
padding: 0.5rem;
|
|
36
16
|
}
|
|
37
|
-
.eds-
|
|
38
|
-
background-color: #
|
|
17
|
+
.eds-contrast .eds-icon-button > .eds-loading-dots .eds-loading-dots__dot {
|
|
18
|
+
background-color: #ffffff;
|
|
39
19
|
}
|
|
40
|
-
.eds-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
20
|
+
.eds-icon-button--size-small {
|
|
21
|
+
height: 1.5rem;
|
|
22
|
+
width: 1.5rem;
|
|
23
|
+
padding: 0;
|
|
44
24
|
}
|
|
45
|
-
.eds-
|
|
46
|
-
|
|
25
|
+
.eds-icon-button--size-medium {
|
|
26
|
+
height: 2rem;
|
|
27
|
+
width: 2rem;
|
|
47
28
|
}
|
|
48
|
-
.eds-
|
|
49
|
-
background: #
|
|
50
|
-
color: #181c56;
|
|
51
|
-
box-shadow: 0 0.0625rem 0.1875rem #393d79;
|
|
29
|
+
.eds-icon-button:hover {
|
|
30
|
+
background-color: #d1d4e3;
|
|
52
31
|
}
|
|
53
|
-
.eds-contrast .eds-
|
|
54
|
-
background-color: #
|
|
32
|
+
.eds-contrast .eds-icon-button:hover {
|
|
33
|
+
background-color: #393d79;
|
|
55
34
|
}
|
|
56
|
-
.eds-
|
|
57
|
-
|
|
58
|
-
height: 2rem;
|
|
59
|
-
padding: 0 0.5rem;
|
|
60
|
-
min-width: 2rem;
|
|
61
|
-
min-height: 2rem;
|
|
62
|
-
flex: 0 1 auto;
|
|
35
|
+
.eds-icon-button:active {
|
|
36
|
+
background: #babbcf;
|
|
63
37
|
}
|
|
64
|
-
.eds-
|
|
65
|
-
|
|
38
|
+
.eds-contrast .eds-icon-button:active {
|
|
39
|
+
background: #292b6a;
|
|
66
40
|
}
|
|
67
|
-
|
|
68
|
-
.
|
|
69
|
-
|
|
41
|
+
.eds-icon-button:focus {
|
|
42
|
+
border: 0.0625rem solid #181c56;
|
|
43
|
+
outline: none;
|
|
70
44
|
}
|
|
71
|
-
.eds-
|
|
72
|
-
|
|
45
|
+
.eds-contrast .eds-icon-button:focus {
|
|
46
|
+
border: 0.0625rem solid #ffffff;
|
|
73
47
|
}
|
|
74
|
-
.eds-
|
|
75
|
-
|
|
48
|
+
.eds-icon-button--disabled {
|
|
49
|
+
opacity: 0.5;
|
|
50
|
+
pointer-events: none;
|
|
76
51
|
}/* DO NOT CHANGE!*/
|
|
77
52
|
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
78
53
|
a.eds-button {
|
|
@@ -110,10 +85,10 @@ a.eds-button--size-large {
|
|
|
110
85
|
.eds-button:focus {
|
|
111
86
|
outline-offset: 0.125rem;
|
|
112
87
|
outline: none;
|
|
113
|
-
box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.
|
|
88
|
+
box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
|
|
114
89
|
}
|
|
115
90
|
.eds-contrast .eds-button:focus {
|
|
116
|
-
box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.
|
|
91
|
+
box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
|
|
117
92
|
}
|
|
118
93
|
.eds-button .eds-icon {
|
|
119
94
|
position: relative;
|
|
@@ -244,7 +219,7 @@ a.eds-button--size-large {
|
|
|
244
219
|
color: #181c56;
|
|
245
220
|
height: 2rem;
|
|
246
221
|
padding: 0 0.75rem;
|
|
247
|
-
min-width:
|
|
222
|
+
min-width: 6rem;
|
|
248
223
|
}
|
|
249
224
|
.eds-button--variant-tertiary:hover {
|
|
250
225
|
background-color: #d1d4e3;
|
|
@@ -288,49 +263,77 @@ a.eds-button--size-large {
|
|
|
288
263
|
color: #aeb7e2;
|
|
289
264
|
}/* DO NOT CHANGE!*/
|
|
290
265
|
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
291
|
-
.eds-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
266
|
+
.eds-button-group .eds-button {
|
|
267
|
+
margin-right: 0.75rem;
|
|
268
|
+
margin-bottom: 0.75rem;
|
|
269
|
+
}
|
|
270
|
+
.eds-button-group .eds-button:only-child {
|
|
271
|
+
margin: 0;
|
|
272
|
+
}/* DO NOT CHANGE!*/
|
|
273
|
+
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
274
|
+
.eds-floating-button {
|
|
275
|
+
align-items: center;
|
|
276
|
+
appearance: none;
|
|
277
|
+
background: #181c56;
|
|
278
|
+
border: 0;
|
|
279
|
+
border-radius: 1.5rem;
|
|
280
|
+
box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.25);
|
|
281
|
+
color: #ffffff;
|
|
296
282
|
cursor: pointer;
|
|
297
283
|
display: flex;
|
|
284
|
+
font-family: inherit;
|
|
285
|
+
font-size: 0.875rem;
|
|
286
|
+
font-weight: 500;
|
|
298
287
|
justify-content: center;
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
288
|
+
min-height: 3rem;
|
|
289
|
+
margin: 0;
|
|
290
|
+
min-width: 3rem;
|
|
291
|
+
padding: 0 1rem;
|
|
292
|
+
position: relative;
|
|
293
|
+
z-index: 10;
|
|
302
294
|
}
|
|
303
|
-
.eds-
|
|
304
|
-
|
|
305
|
-
width: 1.5rem;
|
|
306
|
-
padding: 0;
|
|
295
|
+
.eds-floating-button--extended {
|
|
296
|
+
padding: 0 0.9375rem;
|
|
307
297
|
}
|
|
308
|
-
.eds-
|
|
309
|
-
|
|
310
|
-
width: 2rem;
|
|
298
|
+
.eds-floating-button:hover {
|
|
299
|
+
background-color: #2f3367;
|
|
311
300
|
}
|
|
312
|
-
.eds-
|
|
313
|
-
|
|
301
|
+
.eds-floating-button:focus {
|
|
302
|
+
outline-offset: 0.125rem;
|
|
303
|
+
outline: none;
|
|
304
|
+
box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
|
|
314
305
|
}
|
|
315
|
-
.eds-contrast .eds-
|
|
316
|
-
|
|
306
|
+
.eds-contrast .eds-floating-button:focus {
|
|
307
|
+
box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
|
|
317
308
|
}
|
|
318
|
-
.eds-
|
|
319
|
-
background: #
|
|
309
|
+
.eds-contrast .eds-floating-button {
|
|
310
|
+
background: #ffffff;
|
|
311
|
+
color: #181c56;
|
|
312
|
+
box-shadow: 0 0.0625rem 0.1875rem #393d79;
|
|
320
313
|
}
|
|
321
|
-
.eds-contrast .eds-
|
|
322
|
-
background: #
|
|
314
|
+
.eds-contrast .eds-floating-button:hover {
|
|
315
|
+
background-color: #b6bee5;
|
|
323
316
|
}
|
|
324
|
-
.eds-
|
|
325
|
-
border:
|
|
326
|
-
|
|
317
|
+
.eds-floating-button--small {
|
|
318
|
+
border-radius: 1rem;
|
|
319
|
+
height: 2rem;
|
|
320
|
+
padding: 0 0.5rem;
|
|
321
|
+
min-width: 2rem;
|
|
322
|
+
min-height: 2rem;
|
|
323
|
+
flex: 0 1 auto;
|
|
327
324
|
}
|
|
328
|
-
.eds-
|
|
329
|
-
|
|
325
|
+
.eds-floating-button--small.eds-floating-button--extended {
|
|
326
|
+
padding: 0 0.6875rem;
|
|
330
327
|
}
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
328
|
+
|
|
329
|
+
.eds-floating-button--extended > * {
|
|
330
|
+
margin: 0 0.5em;
|
|
331
|
+
}
|
|
332
|
+
.eds-floating-button--extended > *:first-child {
|
|
333
|
+
margin-left: 0;
|
|
334
|
+
}
|
|
335
|
+
.eds-floating-button--extended > *:last-child {
|
|
336
|
+
margin-right: 0;
|
|
334
337
|
}/* DO NOT CHANGE!*/
|
|
335
338
|
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
336
339
|
.eds-square-button {
|
|
@@ -357,10 +360,10 @@ a.eds-button--size-large {
|
|
|
357
360
|
.eds-square-button:focus .eds-square-button__icon {
|
|
358
361
|
outline-offset: 0.125rem;
|
|
359
362
|
outline: none;
|
|
360
|
-
box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.
|
|
363
|
+
box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
|
|
361
364
|
}
|
|
362
365
|
.eds-contrast .eds-square-button:focus .eds-square-button__icon {
|
|
363
|
-
box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.
|
|
366
|
+
box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
|
|
364
367
|
}
|
|
365
368
|
.eds-square-button[disabled] {
|
|
366
369
|
opacity: 0.5;
|
|
@@ -433,4 +436,48 @@ a.eds-button--size-large {
|
|
|
433
436
|
.eds-square-button__label + .eds-square-button__icon,
|
|
434
437
|
.eds-square-button__icon + .eds-square-button__label {
|
|
435
438
|
margin-left: 1rem;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
.eds-square-button--tertiary {
|
|
442
|
+
--icon-background: transparent;
|
|
443
|
+
--border-color: #181c56;
|
|
444
|
+
font-size: 0.875rem;
|
|
445
|
+
}
|
|
446
|
+
.eds-square-button--tertiary .eds-square-button__label + .eds-square-button__icon,
|
|
447
|
+
.eds-square-button--tertiary .eds-square-button__icon + .eds-square-button__label {
|
|
448
|
+
margin-left: 0.75rem;
|
|
449
|
+
}
|
|
450
|
+
.eds-square-button--tertiary .eds-square-button__icon {
|
|
451
|
+
height: 2rem;
|
|
452
|
+
width: 2rem;
|
|
453
|
+
border-width: 0.0625rem;
|
|
454
|
+
}
|
|
455
|
+
.eds-square-button--tertiary .eds-square-button__loading-dots .eds-loading-dots__dot {
|
|
456
|
+
background: #181c56;
|
|
457
|
+
}
|
|
458
|
+
.eds-square-button--tertiary:hover {
|
|
459
|
+
--icon-background: #d1d4e3;
|
|
460
|
+
}
|
|
461
|
+
.eds-square-button--tertiary:active {
|
|
462
|
+
--icon-background: #181c56;
|
|
463
|
+
--icon-color: #ffffff;
|
|
464
|
+
}
|
|
465
|
+
.eds-square-button--tertiary:active .eds-square-button__loading-dots .eds-loading-dots__dot {
|
|
466
|
+
background: #ffffff;
|
|
467
|
+
}
|
|
468
|
+
.eds-contrast .eds-square-button--tertiary {
|
|
469
|
+
--border-color: #ffffff;
|
|
470
|
+
}
|
|
471
|
+
.eds-contrast .eds-square-button--tertiary:hover {
|
|
472
|
+
--icon-background: rgba(255, 255, 255, 0.2);
|
|
473
|
+
}
|
|
474
|
+
.eds-contrast .eds-square-button--tertiary:active {
|
|
475
|
+
--icon-background: #ffffff;
|
|
476
|
+
--icon-color: #181c56;
|
|
477
|
+
}
|
|
478
|
+
.eds-contrast .eds-square-button--tertiary:active .eds-square-button__loading-dots .eds-loading-dots__dot {
|
|
479
|
+
background: #181c56;
|
|
480
|
+
}
|
|
481
|
+
.eds-contrast .eds-square-button--tertiary .eds-square-button__loading-dots .eds-loading-dots__dot {
|
|
482
|
+
background: #ffffff;
|
|
436
483
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entur/button",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/button.esm.js",
|
|
@@ -17,22 +17,22 @@
|
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
|
-
"start": "
|
|
21
|
-
"build": "
|
|
22
|
-
"test": "
|
|
23
|
-
"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/loader": "^0.4.
|
|
31
|
-
"@entur/utils": "^0.4.
|
|
30
|
+
"@entur/loader": "^0.4.5",
|
|
31
|
+
"@entur/utils": "^0.4.3",
|
|
32
32
|
"classnames": "^2.3.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@entur/tokens": "^3.
|
|
35
|
+
"@entur/tokens": "^3.3.1"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "61e643371cfc5653c93160b7c220152e5b2bafeb"
|
|
38
38
|
}
|