@aristobyte-ui/button 2.9.1 → 2.10.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.
@@ -30,752 +30,137 @@
30
30
  background-color: transparent !important;
31
31
  }
32
32
 
33
- &-variant {
34
- &--default.button-appearance {
35
- &--solid {
36
- background-color: $color-default;
37
- backdrop-filter: 8px;
38
- color: $text-color-white;
39
-
40
- &:hover {
41
- background-color: $color-default-hover;
42
- }
43
-
44
- &:disabled {
45
- background-color: $color-default-disabled;
46
- color: $text-color-white-disabled;
33
+ @mixin button-variant($name, $color, $color-hover, $color-disabled) {
34
+ .button-variant--#{$name}.button-appearance--solid {
35
+ background-color: $color;
36
+ backdrop-filter: 8px;
37
+ color: $text-color-white;
47
38
 
48
- .icon {
49
- color: $text-color-white-disabled;
50
- }
51
- }
52
-
53
- .icon {
54
- color: $text-color-white;
55
- }
39
+ &:hover {
40
+ background-color: $color-hover;
56
41
  }
57
42
 
58
- &--outline {
59
- background-color: rgba($color-default, 0.2);
60
- backdrop-filter: 8px;
61
- border: 1px solid $color-default;
62
- color: $text-color-white;
63
-
64
- &:hover {
65
- background-color: $color-default;
66
- }
67
-
68
- &:disabled {
69
- background-color: rgba($color-default-disabled, 0.2);
70
- color: $text-color-white-disabled;
71
-
72
- .icon {
73
- color: $text-color-white-disabled;
74
- }
75
- }
43
+ &:disabled {
44
+ background-color: $color-disabled;
45
+ color: $text-color-white-disabled;
76
46
 
77
47
  .icon {
78
- color: $text-color-white;
79
- }
80
- }
81
-
82
- &--outline-dashed {
83
- background-color: rgba($color-default, 0.2);
84
- backdrop-filter: 8px;
85
- border: 1px dashed $color-default;
86
- color: $text-color-white;
87
-
88
- &:hover {
89
- background-color: $color-default;
90
- }
91
-
92
- &:disabled {
93
- background-color: rgba($color-default-disabled, 0.2);
94
48
  color: $text-color-white-disabled;
95
-
96
- .icon {
97
- color: $text-color-white-disabled;
98
- }
99
- }
100
-
101
- .icon {
102
- color: $text-color-white;
103
- }
104
- }
105
-
106
- &--no-outline {
107
- background-color: rgba($color-default, 0.2);
108
- backdrop-filter: 8px;
109
- color: $text-color-white;
110
-
111
- &:hover {
112
- background-color: $color-default;
113
- }
114
-
115
- &:disabled {
116
- background-color: rgba($color-default-disabled, 0.2);
117
- color: $text-color-white-disabled;
118
-
119
- .icon {
120
- color: $text-color-white-disabled;
121
- }
122
- }
123
-
124
- .icon {
125
- color: $text-color-white;
126
49
  }
127
50
  }
128
51
 
129
- &--glowing {
130
- background-color: rgba($color-default, 0.2);
131
- backdrop-filter: 8px;
132
- border: 1px solid $color-default;
52
+ .icon {
133
53
  color: $text-color-white;
134
- box-shadow:
135
- 0 0 8px rgba($color-default, 0.5),
136
- 0 0 16px rgba($color-default, 0.4),
137
- 0 0 24px rgba($color-default, 0.3);
138
-
139
- &:hover {
140
- background-color: $color-default;
141
- }
142
-
143
- &:disabled {
144
- background-color: rgba($color-default-disabled, 0.2);
145
- color: $text-color-white-disabled;
146
-
147
- .icon {
148
- color: $text-color-white-disabled;
149
- }
150
- }
151
-
152
- .icon {
153
- color: $text-color-white;
154
- }
155
54
  }
156
55
  }
157
56
 
158
- &--primary.button-appearance {
159
- &--solid {
160
- background-color: $color-primary;
161
- backdrop-filter: 8px;
162
- color: $text-color-white;
163
-
164
- &:hover {
165
- background-color: $color-primary-hover;
166
- }
167
-
168
- &:disabled {
169
- background-color: $color-primary-disabled;
170
- color: $text-color-white-disabled;
171
-
172
- .icon {
173
- color: $text-color-white-disabled;
174
- }
175
- }
176
-
177
- .icon {
178
- color: $text-color-white;
179
- }
180
- }
181
-
182
- &--outline {
183
- background-color: rgba($color-primary, 0.2);
184
- backdrop-filter: 8px;
185
- border: 1px solid $color-primary;
186
- color: $text-color-white;
187
-
188
- &:hover {
189
- background-color: $color-primary;
190
- }
191
-
192
- &:disabled {
193
- background-color: rgba($color-primary-disabled, 0.2);
194
- color: $text-color-white-disabled;
195
-
196
- .icon {
197
- color: $text-color-white-disabled;
198
- }
199
- }
57
+ .button-variant--#{$name}.button-appearance--outline {
58
+ background-color: rgba($color, 0.2);
59
+ backdrop-filter: 8px;
60
+ border: 1px solid $color;
61
+ color: $text-color-white;
200
62
 
201
- .icon {
202
- color: $text-color-white;
203
- }
63
+ &:hover {
64
+ background-color: $color;
204
65
  }
205
66
 
206
- &--outline-dashed {
207
- background-color: rgba($color-primary, 0.2);
208
- backdrop-filter: 8px;
209
- border: 1px dashed $color-primary;
210
- color: $text-color-white;
211
-
212
- &:hover {
213
- background-color: $color-primary;
214
- }
215
-
216
- &:disabled {
217
- background-color: rgba($color-primary-disabled, 0.2);
218
- color: $text-color-white-disabled;
219
-
220
- .icon {
221
- color: $text-color-white-disabled;
222
- }
223
- }
67
+ &:disabled {
68
+ background-color: rgba($color-disabled, 0.2);
69
+ color: $text-color-white-disabled;
224
70
 
225
71
  .icon {
226
- color: $text-color-white;
227
- }
228
- }
229
-
230
- &--no-outline {
231
- background-color: rgba($color-primary, 0.2);
232
- backdrop-filter: 8px;
233
- color: $text-color-white;
234
-
235
- &:hover {
236
- background-color: $color-primary;
237
- }
238
-
239
- &:disabled {
240
- background-color: rgba($color-primary-disabled, 0.2);
241
72
  color: $text-color-white-disabled;
242
-
243
- .icon {
244
- color: $text-color-white-disabled;
245
- }
246
- }
247
-
248
- .icon {
249
- color: $text-color-white;
250
73
  }
251
74
  }
252
75
 
253
- &--glowing {
254
- background-color: rgba($color-primary, 0.2);
255
- backdrop-filter: 8px;
256
- border: 1px solid $color-primary;
76
+ .icon {
257
77
  color: $text-color-white;
258
- box-shadow:
259
- 0 0 8px rgba($color-primary, 0.5),
260
- 0 0 16px rgba($color-primary, 0.4),
261
- 0 0 24px rgba($color-primary, 0.3);
262
-
263
- &:hover {
264
- background-color: $color-primary;
265
- }
266
-
267
- &:disabled {
268
- background-color: rgba($color-primary-disabled, 0.2);
269
- color: $text-color-white-disabled;
270
-
271
- .icon {
272
- color: $text-color-white-disabled;
273
- }
274
- }
275
-
276
- .icon {
277
- color: $text-color-white;
278
- }
279
78
  }
280
79
  }
281
80
 
282
- &--secondary.button-appearance {
283
- &--solid {
284
- background-color: $color-secondary;
285
- backdrop-filter: 8px;
286
- color: $text-color-white;
287
-
288
- &:hover {
289
- background-color: $color-secondary-hover;
290
- }
291
-
292
- &:disabled {
293
- background-color: $color-secondary-disabled;
294
- color: $text-color-white-disabled;
295
-
296
- .icon {
297
- color: $text-color-white-disabled;
298
- }
299
- }
81
+ .button-variant--#{$name}.button-appearance--outline-dashed {
82
+ background-color: rgba($color, 0.2);
83
+ backdrop-filter: 8px;
84
+ border: 1px dashed $color;
85
+ color: $text-color-white;
300
86
 
301
- .icon {
302
- color: $text-color-white;
303
- }
87
+ &:hover {
88
+ background-color: $color;
304
89
  }
305
90
 
306
- &--outline {
307
- background-color: rgba($color-secondary, 0.2);
308
- backdrop-filter: 8px;
309
- border: 1px solid $color-secondary;
310
- color: $text-color-white;
311
-
312
- &:hover {
313
- background-color: $color-secondary;
314
- }
315
-
316
- &:disabled {
317
- background-color: rgba($color-secondary-disabled, 0.2);
318
- color: $text-color-white-disabled;
319
-
320
- .icon {
321
- color: $text-color-white-disabled;
322
- }
323
- }
91
+ &:disabled {
92
+ background-color: rgba($color-disabled, 0.2);
93
+ color: $text-color-white-disabled;
324
94
 
325
95
  .icon {
326
- color: $text-color-white;
327
- }
328
- }
329
-
330
- &--outline-dashed {
331
- background-color: rgba($color-secondary, 0.2);
332
- backdrop-filter: 8px;
333
- border: 1px dashed $color-secondary;
334
- color: $text-color-white;
335
-
336
- &:hover {
337
- background-color: $color-secondary;
338
- }
339
-
340
- &:disabled {
341
- background-color: rgba($color-secondary-disabled, 0.2);
342
- color: $text-color-white-disabled;
343
-
344
- .icon {
345
- color: $text-color-white-disabled;
346
- }
347
- }
348
-
349
- .icon {
350
- color: $text-color-white;
351
- }
352
- }
353
-
354
- &--no-outline {
355
- background-color: rgba($color-secondary, 0.2);
356
- backdrop-filter: 8px;
357
- color: $text-color-white;
358
-
359
- &:hover {
360
- background-color: $color-secondary;
361
- }
362
-
363
- &:disabled {
364
- background-color: rgba($color-secondary-disabled, 0.2);
365
- color: $text-color-white-disabled;
366
-
367
- .icon {
368
- color: $text-color-white-disabled;
369
- }
370
- }
371
-
372
- .icon {
373
- color: $text-color-white;
374
- }
375
- }
376
-
377
- &--glowing {
378
- background-color: rgba($color-secondary, 0.2);
379
- backdrop-filter: 8px;
380
- border: 1px solid $color-secondary;
381
- color: $text-color-white;
382
- box-shadow:
383
- 0 0 8px rgba($color-secondary, 0.5),
384
- 0 0 16px rgba($color-secondary, 0.4),
385
- 0 0 24px rgba($color-secondary, 0.3);
386
-
387
- &:hover {
388
- background-color: $color-secondary;
389
- }
390
-
391
- &:disabled {
392
- background-color: rgba($color-secondary-disabled, 0.2);
393
96
  color: $text-color-white-disabled;
394
-
395
- .icon {
396
- color: $text-color-white-disabled;
397
- }
398
- }
399
-
400
- .icon {
401
- color: $text-color-white;
402
97
  }
403
98
  }
404
- }
405
-
406
- &--success.button-appearance {
407
- &--solid {
408
- background-color: $color-success;
409
- backdrop-filter: 8px;
410
- color: $text-color-white;
411
-
412
- &:hover {
413
- background-color: $color-success-hover;
414
- }
415
99
 
416
- &:disabled {
417
- background-color: $color-success-disabled;
418
- color: $text-color-white-disabled;
419
-
420
- .icon {
421
- color: $text-color-white-disabled;
422
- }
423
- }
424
-
425
- .icon {
426
- color: $text-color-white;
427
- }
428
- }
429
-
430
- &--outline {
431
- background-color: rgba($color-success, 0.2);
432
- backdrop-filter: 8px;
433
- border: 1px solid $color-success;
434
- color: $text-color-white;
435
-
436
- &:hover {
437
- background-color: $color-success;
438
- }
439
-
440
- &:disabled {
441
- background-color: rgba($color-success-disabled, 0.2);
442
- color: $text-color-white-disabled;
443
-
444
- .icon {
445
- color: $text-color-white-disabled;
446
- }
447
- }
448
-
449
- .icon {
450
- color: $text-color-white;
451
- }
452
- }
453
-
454
- &--outline-dashed {
455
- background-color: rgba($color-success, 0.2);
456
- backdrop-filter: 8px;
457
- border: 1px dashed $color-success;
458
- color: $text-color-white;
459
-
460
- &:hover {
461
- background-color: $color-success;
462
- }
463
-
464
- &:disabled {
465
- background-color: rgba($color-success-disabled, 0.2);
466
- color: $text-color-white-disabled;
467
-
468
- .icon {
469
- color: $text-color-white-disabled;
470
- }
471
- }
472
-
473
- .icon {
474
- color: $text-color-white;
475
- }
476
- }
477
-
478
- &--no-outline {
479
- background-color: rgba($color-success, 0.2);
480
- backdrop-filter: 8px;
481
- color: $text-color-white;
482
-
483
- &:hover {
484
- background-color: $color-success;
485
- }
486
-
487
- &:disabled {
488
- background-color: rgba($color-success-disabled, 0.2);
489
- color: $text-color-white-disabled;
490
-
491
- .icon {
492
- color: $text-color-white-disabled;
493
- }
494
- }
495
-
496
- .icon {
497
- color: $text-color-white;
498
- }
499
- }
500
-
501
- &--glowing {
502
- background-color: rgba($color-success, 0.2);
503
- backdrop-filter: 8px;
504
- border: 1px solid $color-success;
100
+ .icon {
505
101
  color: $text-color-white;
506
- box-shadow:
507
- 0 0 8px rgba($color-success, 0.5),
508
- 0 0 16px rgba($color-success, 0.4),
509
- 0 0 24px rgba($color-success, 0.3);
510
-
511
- &:hover {
512
- background-color: $color-success;
513
- }
514
-
515
- &:disabled {
516
- background-color: rgba($color-success-disabled, 0.2);
517
- color: $text-color-white-disabled;
518
-
519
- .icon {
520
- color: $text-color-white-disabled;
521
- }
522
- }
523
-
524
- .icon {
525
- color: $text-color-white;
526
- }
527
102
  }
528
103
  }
529
104
 
530
- &--error.button-appearance {
531
- &--solid {
532
- background-color: $color-error;
533
- backdrop-filter: 8px;
534
- color: $text-color-white;
535
-
536
- &:hover {
537
- background-color: $color-error-hover;
538
- }
539
-
540
- &:disabled {
541
- background-color: $color-error-disabled;
542
- color: $text-color-white-disabled;
543
-
544
- .icon {
545
- color: $text-color-white-disabled;
546
- }
547
- }
105
+ .button-variant--#{$name}.button-appearance--no-outline {
106
+ background-color: rgba($color, 0.2);
107
+ backdrop-filter: 8px;
108
+ color: $text-color-white;
548
109
 
549
- .icon {
550
- color: $text-color-white;
551
- }
110
+ &:hover {
111
+ background-color: $color;
552
112
  }
553
113
 
554
- &--outline {
555
- background-color: rgba($color-error, 0.2);
556
- backdrop-filter: 8px;
557
- border: 1px solid $color-error;
558
- color: $text-color-white;
559
-
560
- &:hover {
561
- background-color: $color-error;
562
- }
563
-
564
- &:disabled {
565
- background-color: rgba($color-error-disabled, 0.2);
566
- color: $text-color-white-disabled;
567
-
568
- .icon {
569
- color: $text-color-white-disabled;
570
- }
571
- }
114
+ &:disabled {
115
+ background-color: rgba($color-disabled, 0.2);
116
+ color: $text-color-white-disabled;
572
117
 
573
118
  .icon {
574
- color: $text-color-white;
575
- }
576
- }
577
-
578
- &--outline-dashed {
579
- background-color: rgba($color-error, 0.2);
580
- backdrop-filter: 8px;
581
- border: 1px dashed $color-error;
582
- color: $text-color-white;
583
-
584
- &:hover {
585
- background-color: $color-error;
586
- }
587
-
588
- &:disabled {
589
- background-color: rgba($color-error-disabled, 0.2);
590
119
  color: $text-color-white-disabled;
591
-
592
- .icon {
593
- color: $text-color-white-disabled;
594
- }
595
- }
596
-
597
- .icon {
598
- color: $text-color-white;
599
120
  }
600
121
  }
601
122
 
602
- &--no-outline {
603
- background-color: rgba($color-error, 0.2);
604
- backdrop-filter: 8px;
605
- color: $text-color-white;
606
-
607
- &:hover {
608
- background-color: $color-error;
609
- }
610
-
611
- &:disabled {
612
- background-color: rgba($color-error-disabled, 0.2);
613
- color: $text-color-white-disabled;
614
-
615
- .icon {
616
- color: $text-color-white-disabled;
617
- }
618
- }
619
-
620
- .icon {
621
- color: $text-color-white;
622
- }
623
- }
624
-
625
- &--glowing {
626
- background-color: rgba($color-error, 0.2);
627
- backdrop-filter: 8px;
628
- border: 1px solid $color-error;
123
+ .icon {
629
124
  color: $text-color-white;
630
- box-shadow:
631
- 0 0 8px rgba($color-error, 0.5),
632
- 0 0 16px rgba($color-error, 0.4),
633
- 0 0 24px rgba($color-error, 0.3);
634
-
635
- &:hover {
636
- background-color: $color-error;
637
- }
638
-
639
- &:disabled {
640
- background-color: rgba($color-error-disabled, 0.2);
641
- color: $text-color-white-disabled;
642
-
643
- .icon {
644
- color: $text-color-white-disabled;
645
- }
646
- }
647
-
648
- .icon {
649
- color: $text-color-white;
650
- }
651
125
  }
652
126
  }
653
127
 
654
- &--warning.button-appearance {
655
- &--solid {
656
- background-color: $color-warning;
657
- backdrop-filter: 8px;
658
- color: $text-color-white;
659
-
660
- &:hover {
661
- background-color: $color-warning-hover;
662
- }
663
-
664
- &:disabled {
665
- background-color: $color-warning-disabled;
666
- color: $text-color-white-disabled;
667
-
668
- .icon {
669
- color: $text-color-white-disabled;
670
- }
671
- }
672
-
673
- .icon {
674
- color: $text-color-white;
675
- }
676
- }
677
-
678
- &--outline {
679
- background-color: rgba($color-warning, 0.2);
680
- backdrop-filter: 8px;
681
- border: 1px solid $color-warning;
682
- color: $text-color-white;
683
-
684
- &:hover {
685
- background-color: $color-warning;
686
- }
687
-
688
- &:disabled {
689
- background-color: rgba($color-warning-disabled, 0.2);
690
- color: $text-color-white-disabled;
128
+ .button-variant--#{$name}.button-appearance--glowing {
129
+ background-color: rgba($color, 0.2);
130
+ backdrop-filter: 8px;
131
+ border: 1px solid $color;
132
+ color: $text-color-white;
133
+ box-shadow:
134
+ 0 0 8px rgba($color, 0.5),
135
+ 0 0 16px rgba($color, 0.4),
136
+ 0 0 24px rgba($color, 0.3);
691
137
 
692
- .icon {
693
- color: $text-color-white-disabled;
694
- }
695
- }
696
-
697
- .icon {
698
- color: $text-color-white;
699
- }
138
+ &:hover {
139
+ background-color: $color;
700
140
  }
701
141
 
702
- &--outline-dashed {
703
- background-color: rgba($color-warning, 0.2);
704
- backdrop-filter: 8px;
705
- border: 1px dashed $color-warning;
706
- color: $text-color-white;
707
-
708
- &:hover {
709
- background-color: $color-warning;
710
- }
711
-
712
- &:disabled {
713
- background-color: rgba($color-warning-disabled, 0.2);
714
- color: $text-color-white-disabled;
715
-
716
- .icon {
717
- color: $text-color-white-disabled;
718
- }
719
- }
142
+ &:disabled {
143
+ background-color: rgba($color-disabled, 0.2);
144
+ color: $text-color-white-disabled;
720
145
 
721
146
  .icon {
722
- color: $text-color-white;
723
- }
724
- }
725
-
726
- &--no-outline {
727
- background-color: rgba($color-warning, 0.2);
728
- backdrop-filter: 8px;
729
- color: $text-color-white;
730
-
731
- &:hover {
732
- background-color: $color-warning;
733
- }
734
-
735
- &:disabled {
736
- background-color: rgba($color-warning-disabled, 0.2);
737
147
  color: $text-color-white-disabled;
738
-
739
- .icon {
740
- color: $text-color-white-disabled;
741
- }
742
- }
743
-
744
- .icon {
745
- color: $text-color-white;
746
148
  }
747
149
  }
748
150
 
749
- &--glowing {
750
- background-color: rgba($color-warning, 0.2);
751
- backdrop-filter: 8px;
752
- border: 1px solid $color-warning;
151
+ .icon {
753
152
  color: $text-color-white;
754
- box-shadow:
755
- 0 0 8px rgba($color-warning, 0.5),
756
- 0 0 16px rgba($color-warning, 0.4),
757
- 0 0 24px rgba($color-warning, 0.3);
758
-
759
- &:hover {
760
- background-color: $color-warning;
761
- }
762
-
763
- &:disabled {
764
- background-color: rgba($color-warning-disabled, 0.2);
765
- color: $text-color-white-disabled;
766
-
767
- .icon {
768
- color: $text-color-white-disabled;
769
- }
770
- }
771
-
772
- .icon {
773
- color: $text-color-white;
774
- }
775
153
  }
776
154
  }
777
155
  }
778
156
 
157
+ @include button-variant('default', $color-default, $color-default-hover, $color-default-disabled);
158
+ @include button-variant('primary', $color-primary, $color-primary-hover, $color-primary-disabled);
159
+ @include button-variant('secondary', $color-secondary, $color-secondary-hover, $color-secondary-disabled);
160
+ @include button-variant('success', $color-success, $color-success-hover, $color-success-disabled);
161
+ @include button-variant('error', $color-error, $color-error-hover, $color-error-disabled);
162
+ @include button-variant('warning', $color-warning, $color-warning-hover, $color-warning-disabled);
163
+
779
164
  &-size {
780
165
  &--xsm {
781
166
  font-size: 0.75rem; // 12px