@sb1/ffe-buttons 19.0.11 → 19.1.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/README.md CHANGED
@@ -14,6 +14,14 @@ Full documentation on button usage is available at https://design.sparebank1.no/
14
14
  @import 'path/to/node_modules/@sb1/ffe-buttons/less/buttons';
15
15
  ```
16
16
 
17
+ ### Importing compiled CSS
18
+
19
+ If your project does not use Less, you can import the compiled styling:
20
+
21
+ ```css
22
+ @import '~@sb1/ffe-buttons/css/buttons.css';
23
+ ```
24
+
17
25
  See also `@sb1/ffe-buttons-react`.
18
26
 
19
27
  ## Theming with CSS custom properties
@@ -0,0 +1,563 @@
1
+ :root,
2
+ :host {
3
+ /** Buttons */
4
+ /* Common button text color */
5
+ --ffe-v-button-text-color: var(--ffe-farge-hvit);
6
+ /* Button border radius renders as 50% */
7
+ --ffe-v-buttons-border-radius: 6em;
8
+ /* Button box shadow */
9
+ --ffe-v-button-shadow-color: var(--ffe-farge-vann);
10
+ /** Action button */
11
+ --ffe-v-button-action-color: var(--ffe-farge-skog);
12
+ --ffe-v-button-action-color-hover: #095139;
13
+ --ffe-v-button-action-color-text: var(--ffe-farge-hvit);
14
+ /** Primary button */
15
+ --ffe-v-button-primary-color: var(--ffe-farge-vann);
16
+ --ffe-v-button-primary-color-hover: var(--ffe-farge-fjell);
17
+ --ffe-v-button-primary-color-text: var(--ffe-farge-hvit);
18
+ /** Secondary buttons (+ back, expand, etc) */
19
+ --ffe-v-button-secondary-color: var(--ffe-farge-hvit);
20
+ --ffe-v-button-secondary-border-color: var(--ffe-farge-vann);
21
+ --ffe-v-button-secondary-color-text-hover: var(--ffe-farge-hvit);
22
+ --ffe-v-button-secondary-color-bg-hover: var(--ffe-farge-vann);
23
+ --ffe-v-button-secondary-color-text: var(--ffe-farge-vann);
24
+ /** Tertiary button */
25
+ --ffe-v-button-tertiary-color: var(--ffe-farge-vann);
26
+ --ffe-v-button-tertiary-color-hover: var(--ffe-farge-fjell);
27
+ --ffe-v-button-tertiary-color-focus: var(--ffe-farge-vann);
28
+ /** Task button */
29
+ --ffe-v-button-task-color: var(--ffe-farge-hvit);
30
+ --ffe-v-button-task-color-hover: var(--ffe-farge-vann);
31
+ --ffe-v-button-task-color-border-hover: var(--ffe-farge-vann);
32
+ --ffe-v-button-task-color-border: var(--ffe-farge-vann);
33
+ --ffe-v-button-task-color-text: var(--ffe-farge-vann);
34
+ --ffe-v-button-task-color-text-hover: var(--ffe-farge-fjell);
35
+ --ffe-v-button-task-color-icon: var(--ffe-farge-vann);
36
+ --ffe-v-button-task-color-icon-hover: var(--ffe-farge-hvit);
37
+ --ffe-v-button-task-border-focus: var(--ffe-farge-vann);
38
+ }
39
+ @media (prefers-color-scheme: dark) {
40
+ :root .regard-color-scheme-preference,
41
+ :host .regard-color-scheme-preference {
42
+ --ffe-v-button-text-color: var(--ffe-farge-svart);
43
+ --ffe-v-button-shadow-color: var(--ffe-farge-hvit);
44
+ /** Action button */
45
+ --ffe-v-button-action-color: var(--ffe-farge-skog-70);
46
+ --ffe-v-button-action-color-hover: var(--ffe-farge-skog-30);
47
+ --ffe-v-button-action-color-text: var(--ffe-farge-svart);
48
+ /** Primary button */
49
+ --ffe-v-button-primary-color: var(--ffe-farge-vann-70);
50
+ --ffe-v-button-primary-color-hover: var(--ffe-farge-vann-30);
51
+ --ffe-v-button-primary-color-text: var(--ffe-farge-svart);
52
+ /** Secondary buttons (+ task, back, expand, etc) */
53
+ --ffe-v-button-secondary-color: var(--ffe-farge-svart);
54
+ --ffe-v-button-secondary-border-color: var(--ffe-farge-vann-70);
55
+ --ffe-v-button-secondary-color-text-hover: var(--ffe-farge-svart);
56
+ --ffe-v-button-secondary-color-bg-hover: var(--ffe-farge-vann-30);
57
+ --ffe-v-button-secondary-color-text: var(--ffe-farge-vann-30);
58
+ /** Tertiary button */
59
+ --ffe-v-button-tertiary-color: var(--ffe-farge-vann-30);
60
+ --ffe-v-button-tertiary-color-hover: var(--ffe-farge-hvit);
61
+ --ffe-v-button-tertiary-color-focus: var(--ffe-farge-hvit);
62
+ /** Task button */
63
+ --ffe-v-button-task-color: transparent;
64
+ --ffe-v-button-task-color-hover: var(--ffe-farge-vann-70);
65
+ --ffe-v-button-task-color-border-hover: var(--ffe-farge-vann-70);
66
+ --ffe-v-button-task-color-border: var(--ffe-farge-vann-30);
67
+ --ffe-v-button-task-color-text: var(--ffe-farge-vann-30);
68
+ --ffe-v-button-task-color-text-hover: var(--ffe-farge-hvit);
69
+ --ffe-v-button-task-color-icon: var(--ffe-farge-vann-30);
70
+ --ffe-v-button-task-color-icon-hover: var(--ffe-farge-svart);
71
+ --ffe-v-button-task-border-focus: var(--ffe-farge-hvit);
72
+ }
73
+ }
74
+ .ffe-button-group {
75
+ display: -webkit-box;
76
+ display: -ms-flexbox;
77
+ display: flex;
78
+ -webkit-box-orient: vertical;
79
+ -webkit-box-direction: normal;
80
+ -ms-flex-direction: column;
81
+ flex-direction: column;
82
+ padding: var(--ffe-spacing-xl) 0;
83
+ width: 100%;
84
+ }
85
+ .ffe-button-group .ffe-button,
86
+ .ffe-button-group .ffe-inline-button {
87
+ -webkit-box-pack: center;
88
+ -ms-flex-pack: center;
89
+ justify-content: center;
90
+ margin: 0 0 var(--ffe-spacing-xs);
91
+ }
92
+ .ffe-button-group--thin {
93
+ padding: 0;
94
+ }
95
+ .ffe-button-group--inline {
96
+ -webkit-box-align: center;
97
+ -ms-flex-align: center;
98
+ align-items: center;
99
+ }
100
+ .ffe-button-group--inline .ffe-button,
101
+ .ffe-button-group--inline .ffe-inline-button {
102
+ display: inline;
103
+ width: -webkit-fit-content;
104
+ width: -moz-fit-content;
105
+ width: fit-content;
106
+ }
107
+ @media (min-width: 480px) {
108
+ .ffe-button-group {
109
+ display: -webkit-inline-box;
110
+ display: -ms-inline-flexbox;
111
+ display: inline-flex;
112
+ -webkit-box-orient: horizontal;
113
+ -webkit-box-direction: normal;
114
+ -ms-flex-direction: row;
115
+ flex-direction: row;
116
+ width: auto;
117
+ -ms-flex-wrap: wrap;
118
+ flex-wrap: wrap;
119
+ gap: var(--ffe-spacing-xs) var(--ffe-spacing-sm);
120
+ }
121
+ .ffe-button-group .ffe-button,
122
+ .ffe-button-group .ffe-inline-button {
123
+ width: auto;
124
+ }
125
+ }
126
+ .ffe-button {
127
+ -webkit-box-align: center;
128
+ -ms-flex-align: center;
129
+ align-items: center;
130
+ -webkit-appearance: none;
131
+ -moz-appearance: none;
132
+ appearance: none;
133
+ border: 2px solid transparent;
134
+ border-radius: var(--ffe-v-buttons-border-radius);
135
+ color: var(--ffe-farge-hvit);
136
+ cursor: pointer;
137
+ display: -webkit-box;
138
+ display: -ms-flexbox;
139
+ display: flex;
140
+ font-family: var(--ffe-g-font);
141
+ -webkit-box-pack: center;
142
+ -ms-flex-pack: center;
143
+ justify-content: center;
144
+ line-height: 1.5;
145
+ overflow: hidden;
146
+ padding: var(--ffe-spacing-xs) var(--ffe-spacing-md);
147
+ position: relative;
148
+ text-align: center;
149
+ text-decoration: none;
150
+ -webkit-transition: all var(--ffe-transition-duration) var(--ffe-ease);
151
+ -o-transition: all var(--ffe-transition-duration) var(--ffe-ease);
152
+ transition: all var(--ffe-transition-duration) var(--ffe-ease);
153
+ -webkit-user-select: none;
154
+ -moz-user-select: none;
155
+ -ms-user-select: none;
156
+ user-select: none;
157
+ hyphens: auto;
158
+ width: 100%;
159
+ font-size: var(--ffe-fontsize-button);
160
+ }
161
+ .ffe-button::after {
162
+ content: '';
163
+ opacity: 0;
164
+ display: block;
165
+ position: absolute;
166
+ background: transparent;
167
+ border-radius: 1.5rem;
168
+ inset: -5px;
169
+ -webkit-box-shadow: 0 0 0 2px var(--ffe-v-button-shadow-color);
170
+ box-shadow: 0 0 0 2px var(--ffe-v-button-shadow-color);
171
+ -webkit-transition: opacity var(--ffe-transition-duration) var(--ffe-ease);
172
+ -o-transition: opacity var(--ffe-transition-duration) var(--ffe-ease);
173
+ transition: opacity var(--ffe-transition-duration) var(--ffe-ease);
174
+ }
175
+ .ffe-button:focus::after {
176
+ opacity: 1;
177
+ }
178
+ .ffe-button:focus:not(:focus-visible)::after {
179
+ opacity: 0;
180
+ }
181
+ .ffe-button:focus {
182
+ outline: none;
183
+ position: relative;
184
+ overflow: unset;
185
+ }
186
+ .ffe-button:active {
187
+ -webkit-transform: scale(0.97);
188
+ transform: scale(0.97);
189
+ }
190
+ .ffe-button:visited {
191
+ color: var(--ffe-v-button-text-color);
192
+ }
193
+ @media (min-width: 480px) {
194
+ .ffe-button {
195
+ display: -webkit-inline-box;
196
+ display: -ms-inline-flexbox;
197
+ display: inline-flex;
198
+ width: auto;
199
+ }
200
+ }
201
+ .ffe-button .ffe-icons {
202
+ display: block;
203
+ }
204
+ .ffe-button--action {
205
+ --background-color: var(--ffe-v-button-action-color);
206
+ --color: var(--ffe-v-button-action-color-text);
207
+ background-color: var(--background-color);
208
+ color: var(--color);
209
+ }
210
+ .ffe-button--action :where(.ffe-button__icon) {
211
+ color: var(--color);
212
+ }
213
+ .ffe-button--action:focus {
214
+ --background-color: var(--ffe-v-button-action-color);
215
+ }
216
+ @media (hover: hover) and (pointer: fine) {
217
+ .ffe-button--action:hover {
218
+ --background-color: var(--ffe-v-button-action-color-hover);
219
+ }
220
+ }
221
+ .ffe-button--primary {
222
+ --background-color: var(--ffe-v-button-primary-color);
223
+ --color: var(--ffe-v-button-primary-color-text);
224
+ background-color: var(--background-color);
225
+ color: var(--color);
226
+ }
227
+ .ffe-button--primary :where(.ffe-button__icon) {
228
+ color: var(--color);
229
+ }
230
+ .ffe-button--primary:focus {
231
+ --background-color: var(--ffe-v-button-primary-color);
232
+ }
233
+ @media (hover: hover) and (pointer: fine) {
234
+ .ffe-button--primary:hover {
235
+ --background-color: var(--ffe-v-button-primary-color-hover);
236
+ }
237
+ }
238
+ .ffe-button--secondary,
239
+ .ffe-button--shortcut,
240
+ .ffe-button--expand {
241
+ --background-color: var(--ffe-v-button-secondary-color);
242
+ --border-color: var(--ffe-v-button-secondary-border-color);
243
+ --text-color: var(--ffe-v-button-secondary-color-text);
244
+ background-color: var(--background-color);
245
+ border: solid 2px var(--border-color);
246
+ color: var(--text-color);
247
+ }
248
+ .ffe-button--secondary :where(.ffe-button__label, .ffe-button__icon),
249
+ .ffe-button--shortcut :where(.ffe-button__label, .ffe-button__icon),
250
+ .ffe-button--expand :where(.ffe-button__label, .ffe-button__icon) {
251
+ color: var(--text-color);
252
+ }
253
+ .ffe-button--secondary:active,
254
+ .ffe-button--shortcut:active,
255
+ .ffe-button--expand:active,
256
+ .ffe-button--secondary:focus,
257
+ .ffe-button--shortcut:focus,
258
+ .ffe-button--expand:focus,
259
+ .ffe-button--secondary:visited,
260
+ .ffe-button--shortcut:visited,
261
+ .ffe-button--expand:visited {
262
+ color: var(--ffe-v-button-secondary-color-text);
263
+ }
264
+ @media (hover: hover) and (pointer: fine) {
265
+ .ffe-button--secondary:hover,
266
+ .ffe-button--shortcut:hover,
267
+ .ffe-button--expand:hover {
268
+ --background-color: var(--ffe-v-button-secondary-color-bg-hover);
269
+ --border-color: var(--ffe-v-button-secondary-color-bg-hover);
270
+ --text-color: var(--ffe-v-button-secondary-color-text-hover);
271
+ }
272
+ }
273
+ .ffe-button--shortcut:focus {
274
+ -webkit-transform: translateX(12px);
275
+ transform: translateX(12px);
276
+ }
277
+ .ffe-button--shortcut .ffe-button__icon {
278
+ -webkit-transition: all var(--ffe-transition-duration) var(--ffe-ease);
279
+ -o-transition: all var(--ffe-transition-duration) var(--ffe-ease);
280
+ transition: all var(--ffe-transition-duration) var(--ffe-ease);
281
+ will-change: transform;
282
+ }
283
+ @media (hover: hover) and (pointer: fine) {
284
+ .ffe-button--shortcut:hover .ffe-button__icon {
285
+ -webkit-transform: translateX(12px);
286
+ transform: translateX(12px);
287
+ }
288
+ }
289
+ .ffe-button--expand {
290
+ border-radius: 34px;
291
+ }
292
+ .ffe-button--expanded {
293
+ padding: var(--ffe-spacing-xs);
294
+ width: 45px;
295
+ }
296
+ .ffe-button--task {
297
+ --icon-color: var(--ffe-v-button-task-color-icon);
298
+ --text-color: var(--ffe-v-button-task-color-text);
299
+ --border-color: transparent;
300
+ background: transparent;
301
+ border-radius: 1.75rem;
302
+ border: 2px solid var(--border-color);
303
+ -webkit-box-shadow: none;
304
+ box-shadow: none;
305
+ color: var(--text-color);
306
+ display: inline-block;
307
+ padding: var(--ffe-spacing-2xs) var(--ffe-spacing-sm) var(--ffe-spacing-2xs) var(--ffe-spacing-2xs);
308
+ text-align: left;
309
+ -webkit-transition: all var(--ffe-transition-duration) var(--ffe-ease);
310
+ -o-transition: all var(--ffe-transition-duration) var(--ffe-ease);
311
+ transition: all var(--ffe-transition-duration) var(--ffe-ease);
312
+ width: auto;
313
+ }
314
+ .ffe-button--task :where(.ffe-button__icon) {
315
+ --border-color: var(--ffe-v-button-task-color-border);
316
+ --background-color: var(--ffe-v-button-task-color);
317
+ --color: var(--icon-color);
318
+ border: 2px solid var(--border-color);
319
+ background-color: var(--background-color);
320
+ border-radius: 50%;
321
+ height: 45px;
322
+ width: 45px;
323
+ display: -webkit-box;
324
+ display: -ms-flexbox;
325
+ display: flex;
326
+ -webkit-box-align: center;
327
+ -ms-flex-align: center;
328
+ align-items: center;
329
+ -webkit-box-pack: center;
330
+ -ms-flex-pack: center;
331
+ justify-content: center;
332
+ margin: 0 var(--ffe-spacing-xs) 0 0;
333
+ -webkit-transition: all var(--ffe-transition-duration) var(--ffe-ease);
334
+ -o-transition: all var(--ffe-transition-duration) var(--ffe-ease);
335
+ transition: all var(--ffe-transition-duration) var(--ffe-ease);
336
+ }
337
+ .ffe-button--task :where(.ffe-button__icon) :where(.ffe-icons) {
338
+ color: var(--color);
339
+ }
340
+ @media (hover: hover) and (pointer: fine) {
341
+ .ffe-button--task:hover .ffe-button__icon {
342
+ --background-color: var(--ffe-v-button-task-color-hover);
343
+ --border-color: var(--ffe-v-button-task-color-border-hover);
344
+ --icon-color: var(--ffe-v-button-task-color-icon-hover);
345
+ }
346
+ }
347
+ .ffe-button--task:focus {
348
+ --border-color: var(--ffe-v-button-task-border-focus);
349
+ }
350
+ .ffe-button--task:focus::after {
351
+ display: none;
352
+ }
353
+ .ffe-button--task:focus:not(:focus-visible) {
354
+ --border-color: transparent;
355
+ }
356
+ .ffe-button--loading {
357
+ pointer-events: none;
358
+ }
359
+ .ffe-button--loading .ffe-button__label {
360
+ -webkit-transform: translateY(-32px);
361
+ transform: translateY(-32px);
362
+ opacity: 0;
363
+ }
364
+ .ffe-button--loading .ffe-button__spinner {
365
+ opacity: 1;
366
+ -webkit-transform: none;
367
+ transform: none;
368
+ visibility: visible;
369
+ }
370
+ .ffe-button__label {
371
+ -webkit-box-align: center;
372
+ -ms-flex-align: center;
373
+ align-items: center;
374
+ display: -webkit-box;
375
+ display: -ms-flexbox;
376
+ display: flex;
377
+ -webkit-transition: -webkit-transform var(--ffe-transition-duration) var(--ffe-ease);
378
+ transition: -webkit-transform var(--ffe-transition-duration) var(--ffe-ease);
379
+ -o-transition: transform var(--ffe-transition-duration) var(--ffe-ease);
380
+ transition: transform var(--ffe-transition-duration) var(--ffe-ease);
381
+ transition: transform var(--ffe-transition-duration) var(--ffe-ease), -webkit-transform var(--ffe-transition-duration) var(--ffe-ease);
382
+ gap: var(--ffe-spacing-xs);
383
+ }
384
+ .ffe-button__spinner {
385
+ inset: 0;
386
+ opacity: 0;
387
+ position: absolute;
388
+ -webkit-transform: translateY(24px);
389
+ transform: translateY(24px);
390
+ -webkit-transition: all var(--ffe-transition-duration) var(--ffe-ease);
391
+ -o-transition: all var(--ffe-transition-duration) var(--ffe-ease);
392
+ transition: all var(--ffe-transition-duration) var(--ffe-ease);
393
+ visibility: hidden;
394
+ display: grid;
395
+ place-items: center;
396
+ }
397
+ .ffe-button__spinner::after {
398
+ -webkit-animation: 1s linear infinite button-loading-spin;
399
+ animation: 1s linear infinite button-loading-spin;
400
+ border: 3px solid currentcolor;
401
+ border-radius: 50%;
402
+ border-top-color: transparent;
403
+ content: '';
404
+ display: block;
405
+ height: 1.375rem;
406
+ aspect-ratio: 1;
407
+ }
408
+ @-webkit-keyframes button-loading-spin {
409
+ from {
410
+ -webkit-transform: none;
411
+ transform: none;
412
+ }
413
+ to {
414
+ -webkit-transform: rotate(360deg);
415
+ transform: rotate(360deg);
416
+ }
417
+ }
418
+ @keyframes button-loading-spin {
419
+ from {
420
+ -webkit-transform: none;
421
+ transform: none;
422
+ }
423
+ to {
424
+ -webkit-transform: rotate(360deg);
425
+ transform: rotate(360deg);
426
+ }
427
+ }
428
+ .ffe-inline-button {
429
+ -webkit-appearance: none;
430
+ -moz-appearance: none;
431
+ appearance: none;
432
+ background-color: transparent;
433
+ border: none;
434
+ border-radius: 1.375rem;
435
+ cursor: pointer;
436
+ display: -webkit-inline-box;
437
+ display: -ms-inline-flexbox;
438
+ display: inline-flex;
439
+ font-family: var(--ffe-g-font);
440
+ margin: 0 -4px;
441
+ -webkit-transition: all var(--ffe-transition-duration) var(--ffe-ease);
442
+ -o-transition: all var(--ffe-transition-duration) var(--ffe-ease);
443
+ transition: all var(--ffe-transition-duration) var(--ffe-ease);
444
+ overflow: hidden;
445
+ padding: 0 var(--ffe-spacing-2xs);
446
+ text-decoration: none;
447
+ font-size: var(--ffe-fontsize-body-text);
448
+ -webkit-box-align: center;
449
+ -ms-flex-align: center;
450
+ align-items: center;
451
+ }
452
+ .ffe-inline-button:active {
453
+ -webkit-transform: scale(0.97);
454
+ transform: scale(0.97);
455
+ }
456
+ .ffe-inline-button:focus {
457
+ -webkit-box-shadow: 0 0 0 2px var(--ffe-v-button-shadow-color);
458
+ box-shadow: 0 0 0 2px var(--ffe-v-button-shadow-color);
459
+ outline: none;
460
+ }
461
+ .ffe-inline-button:focus:not(:focus-visible) {
462
+ -webkit-box-shadow: none;
463
+ box-shadow: none;
464
+ }
465
+ .ffe-inline-button__icon {
466
+ margin-bottom: -2px;
467
+ will-change: transform, opacity;
468
+ }
469
+ .ffe-inline-button--expanded .ffe-inline-button__icon {
470
+ -webkit-transform: rotateZ(180deg);
471
+ transform: rotateZ(180deg);
472
+ }
473
+ .ffe-inline-button__icon--left {
474
+ margin-right: 6px;
475
+ }
476
+ .ffe-inline-button__icon--right {
477
+ margin-left: 6px;
478
+ }
479
+ .ffe-inline-button--back {
480
+ color: var(--ffe-v-button-primary-color);
481
+ line-height: 1;
482
+ padding: var(--ffe-spacing-xs) var(--ffe-spacing-md) var(--ffe-spacing-xs) var(--ffe-spacing-2xl);
483
+ outline: none;
484
+ }
485
+ .ffe-inline-button--back .ffe-inline-button__label {
486
+ -webkit-transition: all transform var(--ffe-transition-duration) var(--ffe-ease);
487
+ -o-transition: all transform var(--ffe-transition-duration) var(--ffe-ease);
488
+ transition: all transform var(--ffe-transition-duration) var(--ffe-ease);
489
+ border-bottom: 1px solid transparent;
490
+ }
491
+ .ffe-inline-button--back .ffe-inline-button__icon {
492
+ color: var(--ffe-v-button-primary-color);
493
+ display: block;
494
+ }
495
+ @media (hover: hover) and (pointer: fine) {
496
+ .ffe-inline-button--back:hover .ffe-inline-button__icon {
497
+ color: var(--ffe-v-button-primary-color-hover);
498
+ }
499
+ .ffe-inline-button--back:hover .ffe-inline-button__label {
500
+ color: var(--ffe-v-button-primary-color-hover);
501
+ border-bottom-color: var(--ffe-v-button-primary-color-hover);
502
+ }
503
+ }
504
+ .ffe-inline-button--expand {
505
+ color: var(--ffe-v-button-primary-color);
506
+ padding: 0 var(--ffe-spacing-xs);
507
+ margin: 0;
508
+ -webkit-box-align: center;
509
+ -ms-flex-align: center;
510
+ align-items: center;
511
+ }
512
+ .ffe-inline-button--expand .ffe-inline-button__icon {
513
+ color: var(--ffe-v-button-primary-color);
514
+ -webkit-transition: -webkit-transform var(--ffe-transition-duration) var(--ffe-ease-in-out-back);
515
+ transition: -webkit-transform var(--ffe-transition-duration) var(--ffe-ease-in-out-back);
516
+ -o-transition: transform var(--ffe-transition-duration) var(--ffe-ease-in-out-back);
517
+ transition: transform var(--ffe-transition-duration) var(--ffe-ease-in-out-back);
518
+ transition: transform var(--ffe-transition-duration) var(--ffe-ease-in-out-back), -webkit-transform var(--ffe-transition-duration) var(--ffe-ease-in-out-back);
519
+ }
520
+ @media (hover: hover) and (pointer: fine) {
521
+ .ffe-inline-button--expand:hover .ffe-inline-button__icon,
522
+ .ffe-inline-button--expand:hover .ffe-inline-button__label {
523
+ color: var(--ffe-v-button-primary-color-hover);
524
+ }
525
+ }
526
+ .ffe-inline-button--tertiary {
527
+ --icon-size-md: 1.5rem;
528
+ --border-width: 1px;
529
+ -ms-flex-line-pack: center;
530
+ align-content: center;
531
+ color: var(--ffe-v-button-tertiary-color);
532
+ -ms-flex-wrap: wrap;
533
+ flex-wrap: wrap;
534
+ padding: var(--ffe-spacing-xs) calc(var(--ffe-spacing-sm));
535
+ border: 2px solid transparent;
536
+ line-height: calc(var(--icon-size-md) - var(--border-width));
537
+ }
538
+ .ffe-inline-button--tertiary .ffe-inline-button__icon {
539
+ color: var(--ffe-v-button-tertiary-color);
540
+ }
541
+ .ffe-inline-button--tertiary .ffe-inline-button__label::after {
542
+ border-bottom: solid var(--border-width) currentcolor;
543
+ content: ' ';
544
+ display: block;
545
+ width: 100%;
546
+ }
547
+ .ffe-inline-button--tertiary:focus {
548
+ -webkit-box-shadow: none;
549
+ box-shadow: none;
550
+ border-color: var(--ffe-v-button-tertiary-color-focus);
551
+ color: var(--ffe-v-button-tertiary-color);
552
+ }
553
+ .ffe-inline-button--tertiary:focus:not(:focus-visible) {
554
+ border-color: transparent;
555
+ }
556
+ @media (hover: hover) and (pointer: fine) {
557
+ .ffe-inline-button--tertiary:hover {
558
+ color: var(--ffe-v-button-tertiary-color-hover);
559
+ }
560
+ .ffe-inline-button--tertiary:hover .ffe-inline-button__icon {
561
+ color: var(--ffe-v-button-tertiary-color-hover);
562
+ }
563
+ }
@@ -1,3 +1,5 @@
1
+ @import (reference) '@sb1/ffe-core/less/breakpoints';
2
+
1
3
  .ffe-button {
2
4
  align-items: center;
3
5
  appearance: none;
@@ -1,22 +1,9 @@
1
- // Button group
2
- //
3
- // Markup:
4
- // <div class="ffe-button-group ffe-button-group{{modifier_class}}">
5
- // <button class="ffe-button ffe-button--primary">
6
- // <span class="ffe-button__label">Click bait</span>
7
- // </button>
8
- // <button class="ffe-button ffe-button--secondary">
9
- // <span class="ffe-button__label">Click bait</span>
10
- // </button>
11
- // </div>
12
- //
13
- // --thin - Less vertical spacing
14
- //
15
- // Styleguide ffe-buttons.button-group
1
+ @import (reference) '@sb1/ffe-core/less/breakpoints';
2
+
16
3
  .ffe-button-group {
17
4
  display: flex;
18
5
  flex-direction: column;
19
- padding: @ffe-spacing-xl 0;
6
+ padding: var(--ffe-spacing-xl) 0;
20
7
  width: 100%;
21
8
 
22
9
  .ffe-button,
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@sb1/ffe-buttons",
3
- "version": "19.0.11",
3
+ "version": "19.1.1",
4
4
  "license": "MIT",
5
5
  "author": "SpareBank1",
6
6
  "files": [
7
- "less"
7
+ "less",
8
+ "css"
8
9
  ],
9
10
  "repository": {
10
11
  "type": "git",
@@ -12,10 +13,11 @@
12
13
  },
13
14
  "scripts": {
14
15
  "lint": "ffe-buildtool stylelint less/*.less",
15
- "test": "npm run lint"
16
+ "test": "npm run lint",
17
+ "build": "lessc less/buttons.less css/buttons.css --autoprefix"
16
18
  },
17
19
  "dependencies": {
18
- "@sb1/ffe-core": "^29.1.4"
20
+ "@sb1/ffe-core": "^29.3.0"
19
21
  },
20
22
  "devDependencies": {
21
23
  "@sb1/ffe-buildtool": "^0.9.0"
@@ -23,5 +25,5 @@
23
25
  "publishConfig": {
24
26
  "access": "public"
25
27
  },
26
- "gitHead": "d27089e01efb5feed58df9f4acd48981a8dd9e6f"
28
+ "gitHead": "f474381dd349e5f8a64b9e6883aa9cb4a6d184d8"
27
29
  }