@aristobyte-ui/button 2.11.2 → 2.13.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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  .button {
4
4
  align-items: center;
5
- border: 0;
5
+ border: none;
6
6
  cursor: pointer;
7
7
  display: flex;
8
8
  font-weight: 500;
@@ -30,136 +30,751 @@
30
30
  background-color: transparent !important;
31
31
  }
32
32
 
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;
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;
38
47
 
39
- &:hover {
40
- background-color: $color-hover;
48
+ .icon {
49
+ color: $text-color-white-disabled;
50
+ }
51
+ }
52
+
53
+ .icon {
54
+ color: $text-color-white;
55
+ }
41
56
  }
42
57
 
43
- &:disabled {
44
- background-color: $color-disabled;
45
- color: $text-color-white-disabled;
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
+ }
46
76
 
47
77
  .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);
48
94
  color: $text-color-white-disabled;
95
+
96
+ .icon {
97
+ color: $text-color-white-disabled;
98
+ }
99
+ }
100
+
101
+ .icon {
102
+ color: $text-color-white;
49
103
  }
50
104
  }
51
105
 
52
- .icon {
106
+ &--no-outline {
107
+ background-color: rgba($color-default, 0.2);
108
+ backdrop-filter: 8px;
53
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
+ }
127
+ }
128
+
129
+ &--glowing {
130
+ background-color: rgba($color-default, 0.2);
131
+ backdrop-filter: 8px;
132
+ border: 1px solid $color-default;
133
+ 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
+ }
54
155
  }
55
156
  }
56
157
 
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;
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;
62
171
 
63
- &:hover {
64
- background-color: $color;
172
+ .icon {
173
+ color: $text-color-white-disabled;
174
+ }
175
+ }
176
+
177
+ .icon {
178
+ color: $text-color-white;
179
+ }
65
180
  }
66
181
 
67
- &:disabled {
68
- background-color: rgba($color-disabled, 0.2);
69
- color: $text-color-white-disabled;
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
+ }
70
200
 
71
201
  .icon {
202
+ color: $text-color-white;
203
+ }
204
+ }
205
+
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);
72
218
  color: $text-color-white-disabled;
219
+
220
+ .icon {
221
+ color: $text-color-white-disabled;
222
+ }
223
+ }
224
+
225
+ .icon {
226
+ color: $text-color-white;
73
227
  }
74
228
  }
75
229
 
76
- .icon {
230
+ &--no-outline {
231
+ background-color: rgba($color-primary, 0.2);
232
+ backdrop-filter: 8px;
77
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
+ 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
+ }
251
+ }
252
+
253
+ &--glowing {
254
+ background-color: rgba($color-primary, 0.2);
255
+ backdrop-filter: 8px;
256
+ border: 1px solid $color-primary;
257
+ 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
+ }
78
279
  }
79
280
  }
80
281
 
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;
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
+ }
86
300
 
87
- &:hover {
88
- background-color: $color;
301
+ .icon {
302
+ color: $text-color-white;
303
+ }
89
304
  }
90
305
 
91
- &:disabled {
92
- background-color: rgba($color-disabled, 0.2);
93
- color: $text-color-white-disabled;
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
+ }
94
324
 
95
325
  .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);
96
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;
97
351
  }
98
352
  }
99
353
 
100
- .icon {
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;
101
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
+ 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
+ }
102
403
  }
103
404
  }
104
405
 
105
- .button-variant--#{$name}.button-appearance--no-outline {
106
- background-color: rgba($color, 0.2);
107
- backdrop-filter: 8px;
108
- color: $text-color-white;
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
+
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
+ }
109
424
 
110
- &:hover {
111
- background-color: $color;
425
+ .icon {
426
+ color: $text-color-white;
427
+ }
112
428
  }
113
429
 
114
- &:disabled {
115
- background-color: rgba($color-disabled, 0.2);
116
- color: $text-color-white-disabled;
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
+ }
117
448
 
118
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);
119
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;
120
475
  }
121
476
  }
122
477
 
123
- .icon {
478
+ &--no-outline {
479
+ background-color: rgba($color-success, 0.2);
480
+ backdrop-filter: 8px;
124
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;
505
+ 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
+ }
125
527
  }
126
528
  }
127
529
 
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);
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
+ }
137
548
 
138
- &:hover {
139
- background-color: $color;
549
+ .icon {
550
+ color: $text-color-white;
551
+ }
140
552
  }
141
553
 
142
- &:disabled {
143
- background-color: rgba($color-disabled, 0.2);
144
- color: $text-color-white-disabled;
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
+ }
145
572
 
146
573
  .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);
147
590
  color: $text-color-white-disabled;
591
+
592
+ .icon {
593
+ color: $text-color-white-disabled;
594
+ }
595
+ }
596
+
597
+ .icon {
598
+ color: $text-color-white;
148
599
  }
149
600
  }
150
601
 
151
- .icon {
602
+ &--no-outline {
603
+ background-color: rgba($color-error, 0.2);
604
+ backdrop-filter: 8px;
152
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;
629
+ 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
+ }
153
651
  }
154
652
  }
155
- }
156
653
 
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);
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;
691
+
692
+ .icon {
693
+ color: $text-color-white-disabled;
694
+ }
695
+ }
696
+
697
+ .icon {
698
+ color: $text-color-white;
699
+ }
700
+ }
701
+
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
+ }
720
+
721
+ .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
+ 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
+ }
747
+ }
748
+
749
+ &--glowing {
750
+ background-color: rgba($color-warning, 0.2);
751
+ backdrop-filter: 8px;
752
+ border: 1px solid $color-warning;
753
+ 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
+ }
776
+ }
777
+ }
163
778
 
164
779
  &-size {
165
780
  &--xsm {