@entur/button 2.7.3 → 2.8.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 +14 -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 +122 -72
- package/package.json +9 -9
package/dist/styles.css
CHANGED
|
@@ -2,12 +2,71 @@
|
|
|
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
|
-
|
|
5
|
+
.eds-floating-button {
|
|
6
|
+
align-items: center;
|
|
7
|
+
-webkit-appearance: none;
|
|
8
|
+
-moz-appearance: none;
|
|
9
|
+
appearance: none;
|
|
10
|
+
background: #181c56;
|
|
11
|
+
border: 0;
|
|
12
|
+
border-radius: 1.5rem;
|
|
13
|
+
box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.25);
|
|
14
|
+
color: #ffffff;
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
display: flex;
|
|
17
|
+
font-family: inherit;
|
|
18
|
+
font-size: 0.875rem;
|
|
19
|
+
font-weight: 500;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
min-height: 3rem;
|
|
10
22
|
margin: 0;
|
|
23
|
+
min-width: 3rem;
|
|
24
|
+
padding: 0 1rem;
|
|
25
|
+
position: relative;
|
|
26
|
+
z-index: 10;
|
|
27
|
+
}
|
|
28
|
+
.eds-floating-button--extended {
|
|
29
|
+
padding: 0 0.9375rem;
|
|
30
|
+
}
|
|
31
|
+
.eds-floating-button:hover {
|
|
32
|
+
background-color: #2f3367;
|
|
33
|
+
}
|
|
34
|
+
.eds-floating-button:focus {
|
|
35
|
+
outline-offset: 0.125rem;
|
|
36
|
+
outline: none;
|
|
37
|
+
box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
|
|
38
|
+
}
|
|
39
|
+
.eds-contrast .eds-floating-button:focus {
|
|
40
|
+
box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
|
|
41
|
+
}
|
|
42
|
+
.eds-contrast .eds-floating-button {
|
|
43
|
+
background: #ffffff;
|
|
44
|
+
color: #181c56;
|
|
45
|
+
box-shadow: 0 0.0625rem 0.1875rem #393d79;
|
|
46
|
+
}
|
|
47
|
+
.eds-contrast .eds-floating-button:hover {
|
|
48
|
+
background-color: #b6bee5;
|
|
49
|
+
}
|
|
50
|
+
.eds-floating-button--small {
|
|
51
|
+
border-radius: 1rem;
|
|
52
|
+
height: 2rem;
|
|
53
|
+
padding: 0 0.5rem;
|
|
54
|
+
min-width: 2rem;
|
|
55
|
+
min-height: 2rem;
|
|
56
|
+
flex: 0 1 auto;
|
|
57
|
+
}
|
|
58
|
+
.eds-floating-button--small.eds-floating-button--extended {
|
|
59
|
+
padding: 0 0.6875rem;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.eds-floating-button--extended > * {
|
|
63
|
+
margin: 0 0.5em;
|
|
64
|
+
}
|
|
65
|
+
.eds-floating-button--extended > *:first-child {
|
|
66
|
+
margin-left: 0;
|
|
67
|
+
}
|
|
68
|
+
.eds-floating-button--extended > *:last-child {
|
|
69
|
+
margin-right: 0;
|
|
11
70
|
}/* DO NOT CHANGE!*/
|
|
12
71
|
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
13
72
|
a.eds-button {
|
|
@@ -27,7 +86,9 @@ a.eds-button--size-large {
|
|
|
27
86
|
font-size: inherit;
|
|
28
87
|
cursor: pointer;
|
|
29
88
|
display: inline-block;
|
|
30
|
-
appearance: none;
|
|
89
|
+
-webkit-appearance: none;
|
|
90
|
+
-moz-appearance: none;
|
|
91
|
+
appearance: none;
|
|
31
92
|
text-decoration: none;
|
|
32
93
|
padding: 0 1rem;
|
|
33
94
|
height: 3rem;
|
|
@@ -223,6 +284,14 @@ a.eds-button--size-large {
|
|
|
223
284
|
color: #aeb7e2;
|
|
224
285
|
}/* DO NOT CHANGE!*/
|
|
225
286
|
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
287
|
+
.eds-button-group .eds-button {
|
|
288
|
+
margin-right: 0.75rem;
|
|
289
|
+
margin-bottom: 0.75rem;
|
|
290
|
+
}
|
|
291
|
+
.eds-button-group .eds-button:only-child {
|
|
292
|
+
margin: 0;
|
|
293
|
+
}/* DO NOT CHANGE!*/
|
|
294
|
+
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
226
295
|
.eds-icon-button {
|
|
227
296
|
border: 0.0625rem solid transparent;
|
|
228
297
|
border-radius: 0.25rem;
|
|
@@ -271,77 +340,14 @@ a.eds-button--size-large {
|
|
|
271
340
|
pointer-events: none;
|
|
272
341
|
}/* DO NOT CHANGE!*/
|
|
273
342
|
/* 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;
|
|
282
|
-
cursor: pointer;
|
|
283
|
-
display: flex;
|
|
284
|
-
font-family: inherit;
|
|
285
|
-
font-size: 0.875rem;
|
|
286
|
-
font-weight: 500;
|
|
287
|
-
justify-content: center;
|
|
288
|
-
min-height: 3rem;
|
|
289
|
-
margin: 0;
|
|
290
|
-
min-width: 3rem;
|
|
291
|
-
padding: 0 1rem;
|
|
292
|
-
position: relative;
|
|
293
|
-
z-index: 10;
|
|
294
|
-
}
|
|
295
|
-
.eds-floating-button--extended {
|
|
296
|
-
padding: 0 0.9375rem;
|
|
297
|
-
}
|
|
298
|
-
.eds-floating-button:hover {
|
|
299
|
-
background-color: #2f3367;
|
|
300
|
-
}
|
|
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;
|
|
305
|
-
}
|
|
306
|
-
.eds-contrast .eds-floating-button:focus {
|
|
307
|
-
box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
|
|
308
|
-
}
|
|
309
|
-
.eds-contrast .eds-floating-button {
|
|
310
|
-
background: #ffffff;
|
|
311
|
-
color: #181c56;
|
|
312
|
-
box-shadow: 0 0.0625rem 0.1875rem #393d79;
|
|
313
|
-
}
|
|
314
|
-
.eds-contrast .eds-floating-button:hover {
|
|
315
|
-
background-color: #b6bee5;
|
|
316
|
-
}
|
|
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;
|
|
324
|
-
}
|
|
325
|
-
.eds-floating-button--small.eds-floating-button--extended {
|
|
326
|
-
padding: 0 0.6875rem;
|
|
327
|
-
}
|
|
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;
|
|
337
|
-
}/* DO NOT CHANGE!*/
|
|
338
|
-
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
339
343
|
.eds-square-button {
|
|
340
344
|
--icon-color: var(--primary-text-color);
|
|
341
345
|
--icon-background: transparent;
|
|
342
346
|
--border-color: transparent;
|
|
343
347
|
align-items: center;
|
|
344
|
-
appearance: none;
|
|
348
|
+
-webkit-appearance: none;
|
|
349
|
+
-moz-appearance: none;
|
|
350
|
+
appearance: none;
|
|
345
351
|
background: transparent;
|
|
346
352
|
border: 0;
|
|
347
353
|
border-radius: 0.25rem;
|
|
@@ -436,4 +442,48 @@ a.eds-button--size-large {
|
|
|
436
442
|
.eds-square-button__label + .eds-square-button__icon,
|
|
437
443
|
.eds-square-button__icon + .eds-square-button__label {
|
|
438
444
|
margin-left: 1rem;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.eds-square-button--tertiary {
|
|
448
|
+
--icon-background: transparent;
|
|
449
|
+
--border-color: #181c56;
|
|
450
|
+
font-size: 0.875rem;
|
|
451
|
+
}
|
|
452
|
+
.eds-square-button--tertiary .eds-square-button__label + .eds-square-button__icon,
|
|
453
|
+
.eds-square-button--tertiary .eds-square-button__icon + .eds-square-button__label {
|
|
454
|
+
margin-left: 0.75rem;
|
|
455
|
+
}
|
|
456
|
+
.eds-square-button--tertiary .eds-square-button__icon {
|
|
457
|
+
height: 2rem;
|
|
458
|
+
width: 2rem;
|
|
459
|
+
border-width: 0.0625rem;
|
|
460
|
+
}
|
|
461
|
+
.eds-square-button--tertiary .eds-square-button__loading-dots .eds-loading-dots__dot {
|
|
462
|
+
background: #181c56;
|
|
463
|
+
}
|
|
464
|
+
.eds-square-button--tertiary:hover {
|
|
465
|
+
--icon-background: #d1d4e3;
|
|
466
|
+
}
|
|
467
|
+
.eds-square-button--tertiary:active {
|
|
468
|
+
--icon-background: #181c56;
|
|
469
|
+
--icon-color: #ffffff;
|
|
470
|
+
}
|
|
471
|
+
.eds-square-button--tertiary:active .eds-square-button__loading-dots .eds-loading-dots__dot {
|
|
472
|
+
background: #ffffff;
|
|
473
|
+
}
|
|
474
|
+
.eds-contrast .eds-square-button--tertiary {
|
|
475
|
+
--border-color: #ffffff;
|
|
476
|
+
}
|
|
477
|
+
.eds-contrast .eds-square-button--tertiary:hover {
|
|
478
|
+
--icon-background: rgba(255, 255, 255, 0.2);
|
|
479
|
+
}
|
|
480
|
+
.eds-contrast .eds-square-button--tertiary:active {
|
|
481
|
+
--icon-background: #ffffff;
|
|
482
|
+
--icon-color: #181c56;
|
|
483
|
+
}
|
|
484
|
+
.eds-contrast .eds-square-button--tertiary:active .eds-square-button__loading-dots .eds-loading-dots__dot {
|
|
485
|
+
background: #181c56;
|
|
486
|
+
}
|
|
487
|
+
.eds-contrast .eds-square-button--tertiary .eds-square-button__loading-dots .eds-loading-dots__dot {
|
|
488
|
+
background: #ffffff;
|
|
439
489
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entur/button",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.1",
|
|
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.6",
|
|
31
|
+
"@entur/utils": "^0.4.3",
|
|
32
32
|
"classnames": "^2.3.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@entur/tokens": "^3.2
|
|
35
|
+
"@entur/tokens": "^3.3.2"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "7b557782d62c07bdce744f9b084d57177e2202e9"
|
|
38
38
|
}
|