@linzjs/lui 24.15.0 → 24.16.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.
@@ -19,6 +19,7 @@
19
19
  .LuiSelect-select {
20
20
  @include fonts.font-regular();
21
21
  margin-bottom: 0;
22
+ background: colors.$snow;
22
23
  border: 1px solid colors.$silver;
23
24
  border-radius: MiscVars.$borderRadius;
24
25
  display: block;
@@ -23,8 +23,7 @@ $btnLine-height: 24px;
23
23
  padding: toRem(7px) spacing.$unit-xs * 2; //magic number to allow for 1px border to add to height
24
24
  border: none;
25
25
  border-radius: misc.$borderRadius;
26
- transition: background-color 0.3s, color 0.3s, height 0.3s, border 0.3s,
27
- fill 0.3s;
26
+ transition: background-color 0.3s, height 0.3s, border 0.3s, fill 0.3s;
28
27
 
29
28
  i,
30
29
  svg * {
@@ -76,7 +75,7 @@ button {
76
75
  $btnBgColActive,
77
76
  $borderColActive
78
77
  ) {
79
- &:hover {
78
+ &:hover:where(:not([aria-busy])) {
80
79
  background-color: $btnBgColHover;
81
80
  cursor: pointer;
82
81
  color: $btnTxtColHover;
@@ -89,7 +88,7 @@ button {
89
88
  }
90
89
  }
91
90
 
92
- &:disabled {
91
+ &:disabled:where(:not([aria-busy])) {
93
92
  color: colors.$disabled-color;
94
93
  background: colors.$disabled-bg-color;
95
94
  border-color: colors.$disabled-color-dark;
@@ -105,6 +104,21 @@ button {
105
104
  }
106
105
  }
107
106
 
107
+ &[aria-busy] {
108
+ &:hover {
109
+ cursor: progress;
110
+ }
111
+
112
+ &:not(:active) {
113
+ transition: none;
114
+
115
+ i,
116
+ svg * {
117
+ transition: none;
118
+ }
119
+ }
120
+ }
121
+
108
122
  &:active:enabled {
109
123
  background-color: $btnBgColActive;
110
124
  cursor: pointer;
@@ -122,6 +136,62 @@ button {
122
136
  }
123
137
  }
124
138
 
139
+ @mixin button-intent-builder(
140
+ $btnTxtCol,
141
+ $btnBgCol,
142
+ $btnBorderCol,
143
+ $btnTxtColHover,
144
+ $btnBgColHover,
145
+ $btnBorderColHover,
146
+ $btnTxtColActive,
147
+ $btnBgColActive,
148
+ $btnBorderColActive
149
+ ) {
150
+ &:not(:disabled) {
151
+ color: $btnTxtCol;
152
+ }
153
+
154
+ &:where([aria-busy]) {
155
+ color: $btnTxtCol;
156
+ }
157
+
158
+ &:not(:disabled),
159
+ &[aria-busy] {
160
+ background-color: $btnBgCol;
161
+ border-color: $btnBorderCol;
162
+
163
+ i,
164
+ svg * {
165
+ color: $btnTxtCol;
166
+ fill: $btnTxtCol;
167
+ }
168
+ }
169
+
170
+ &:hover:enabled {
171
+ background-color: $btnBgColHover;
172
+ border-color: $btnBorderColHover;
173
+ color: $btnTxtColHover;
174
+
175
+ i,
176
+ svg * {
177
+ color: $btnTxtColHover;
178
+ fill: $btnTxtColHover;
179
+ }
180
+ }
181
+
182
+ &:active:enabled {
183
+ background-color: $btnBgColActive;
184
+ border-color: $btnBorderColActive;
185
+ color: rgba($btnTxtColActive, 0.9);
186
+
187
+ i,
188
+ svg * {
189
+ color: rgba($btnTxtColActive, 0.9);
190
+ fill: rgba($btnTxtColActive, 0.9);
191
+ }
192
+ }
193
+ }
194
+
125
195
  a.lui-button {
126
196
  @include button();
127
197
  display: inline-block;
@@ -137,7 +207,7 @@ a.lui-button {
137
207
  spacing.$unit-sm; // magic numbers to account for border
138
208
 
139
209
  .LuiIcon {
140
- margin: 3px 0 -7px 12px; // magic numbers to allow the resize to work but to be fixed by future LUI buttons
210
+ margin: 3px 0 -7px 11px; // magic numbers to allow the resize to work but to be fixed by future LUI buttons
141
211
  }
142
212
 
143
213
  i {
@@ -176,8 +246,7 @@ a.lui-button {
176
246
  );
177
247
  }
178
248
 
179
- &-secondary,
180
- &-warning {
249
+ &-secondary {
181
250
  // var $btnTxtCol, $btnBgCol, $borderCol, $myStrokeWeight : 2px, $myBtnLineHeight : 40px
182
251
  @include button-builder(colors.$sea, #fff, colors.$sea);
183
252
  // var $btnTxtColHover, $btnBgColHover, $borderColHover, $btnTxtColActive, $btnBgColActive, $borderColActive
@@ -190,26 +259,27 @@ a.lui-button {
190
259
  colors.$secondary-active-btn
191
260
  );
192
261
 
193
- i,
194
- svg * {
195
- color: colors.$sea;
196
- }
197
-
198
- &:hover i {
199
- color: colors.$sea;
262
+ &.lui-button-danger {
263
+ @include button-intent-builder(
264
+ colors.$error,
265
+ colors.$white,
266
+ colors.$error,
267
+ colors.$error,
268
+ colors.$error-bg,
269
+ colors.$error,
270
+ colors.$error-bg,
271
+ colors.$error,
272
+ colors.$error
273
+ );
200
274
  }
201
- }
202
275
 
203
- &-warning {
204
276
  i,
205
277
  svg * {
206
- fill: colors.$warning;
207
- color: colors.$warning;
278
+ color: colors.$sea;
208
279
  }
209
280
 
210
- &:hover i {
211
- fill: colors.$warning-focus;
212
- color: colors.$warning-focus;
281
+ &:hover:where(:not([aria-busy])) i {
282
+ color: colors.$sea;
213
283
  }
214
284
  }
215
285
 
@@ -230,21 +300,35 @@ a.lui-button {
230
300
  #fff
231
301
  );
232
302
 
303
+ &.lui-button-danger {
304
+ @include button-intent-builder(
305
+ colors.$error,
306
+ transparent,
307
+ transparent,
308
+ colors.$error,
309
+ colors.$error-bg,
310
+ colors.$error-bg,
311
+ colors.$error-bg,
312
+ colors.$error,
313
+ colors.$error,
314
+ );
315
+ }
316
+
233
317
  & {
234
318
  @include fonts.font-regular();
235
319
  border: none;
236
320
  margin: 2px; //account for the slightly smaller button size;
237
321
  }
238
322
 
239
- &:hover {
323
+ &:hover:where(:not([aria-busy])) {
240
324
  border: none;
241
325
  }
242
326
 
243
- &:active:enabled {
327
+ &:active:enabled:where(:not([aria-busy])) {
244
328
  border: none;
245
329
  }
246
330
 
247
- &:disabled {
331
+ &:disabled:where(:not([aria-busy])) {
248
332
  color: colors.$disabled-color;
249
333
  background: none;
250
334
  text-decoration: none;
@@ -252,7 +336,6 @@ a.lui-button {
252
336
 
253
337
  &:hover {
254
338
  cursor: not-allowed;
255
- border: none;
256
339
  }
257
340
 
258
341
  i,
@@ -264,33 +347,38 @@ a.lui-button {
264
347
  }
265
348
 
266
349
  &-success {
267
- // var $btnTxtCol, $btnBgCol, $borderCol, $myStrokeWeight : 2px, $myBtnLineHeight : 40px
268
- @include button-builder(#fff, colors.$green-btn, colors.$green-btn);
269
- // var $btnTxtColHover, $btnBgColHover, $borderColHover, $btnTxtColActive, $btnBgColActive, $borderColActive
270
- @include button-states-builder(
271
- #fff,
350
+ @include button-intent-builder(
351
+ colors.$white,
352
+ colors.$green-btn,
353
+ colors.$green-btn,
354
+ colors.$white,
272
355
  colors.$green-hover,
273
356
  colors.$green-hover,
274
- $reversed-btn-active-txt,
357
+ colors.$white,
275
358
  colors.$green-active,
276
359
  colors.$green-active
277
360
  );
278
361
  }
279
362
 
280
- &-error {
281
- // var $btnTxtCol, $btnBgCol, $borderCol, $myStrokeWeight : 2px, $myBtnLineHeight : 40px
282
- @include button-builder(#fff, colors.$error, colors.$error);
283
- // var $btnTxtColHover, $btnBgColHover, $borderColHover, $btnTxtColActive, $btnBgColActive, $borderColActive
284
- @include button-states-builder(
285
- #fff,
363
+ &-error, &.lui-button-primary.lui-button-danger {
364
+ @include button-intent-builder(
365
+ colors.$white,
366
+ colors.$error,
367
+ colors.$error,
368
+ colors.$white,
286
369
  colors.$error-hover-btn,
287
370
  colors.$error-hover-btn,
288
- $reversed-btn-active-txt,
371
+ colors.$white,
289
372
  colors.$error-active-btn,
290
373
  colors.$error-active-btn
291
374
  );
292
375
  }
293
376
 
377
+ &-success, &-error {
378
+ line-height: $btnLine-height;
379
+ font-weight: 600;
380
+ }
381
+
294
382
  &-reversed-no-bg {
295
383
  // var $btnTxtCol, $btnBgCol, $borderCol, $myStrokeWeight : 2px, $myBtnLineHeight : 40px
296
384
  @include button-builder(#fff, transparent, transparent);
@@ -309,7 +397,7 @@ a.lui-button {
309
397
  top: 13px !important; // overwrite the base btn icon positioning without reworking mulitple classes
310
398
  }
311
399
 
312
- &:disabled {
400
+ &:disabled:where(:not([aria-busy])) {
313
401
  color: $disabled-reversed-no-bg-btn-txt;
314
402
  background: none;
315
403
  border: 0;
@@ -319,10 +407,10 @@ a.lui-button {
319
407
  color: $disabled-reversed-no-bg-btn-txt;
320
408
  fill: $disabled-reversed-no-bg-btn-txt;
321
409
  }
410
+ }
322
411
 
323
- &:hover {
324
- cursor: not-allowed;
325
- }
412
+ &:disabled:hover {
413
+ cursor: not-allowed;
326
414
  }
327
415
  }
328
416
 
@@ -338,6 +426,21 @@ a.lui-button {
338
426
  none,
339
427
  none
340
428
  );
429
+
430
+ &.lui-button-danger {
431
+ @include button-intent-builder(
432
+ colors.$error,
433
+ transparent,
434
+ colors.$error,
435
+ colors.$error-hover-btn,
436
+ transparent,
437
+ colors.$error-hover-btn,
438
+ colors.$error-active-btn,
439
+ transparent,
440
+ colors.$error-active-btn
441
+ );
442
+ }
443
+
341
444
  // border bottom mimics what we have for text link styling
342
445
  //border-bottom: 1px solid;
343
446
  & {
@@ -367,12 +470,11 @@ a.lui-button {
367
470
  }
368
471
  }
369
472
 
370
- &:disabled {
473
+ &:disabled:where(:not([aria-busy])) {
371
474
  color: colors.$disabled-color;
372
475
  background: none;
373
476
  //border: 0;
374
477
  text-decoration: underline;
375
-
376
478
  &:hover {
377
479
  cursor: not-allowed;
378
480
  }
@@ -383,12 +485,30 @@ a.lui-button {
383
485
  fill: colors.$gray;
384
486
  }
385
487
  }
488
+
489
+ &[aria-busy]:hover {
490
+ cursor: progress;
491
+ }
386
492
  }
387
493
 
388
494
  &-plain-text {
389
495
  // var $btnTxtCol, $btnBgCol, $borderCol
390
496
  @include button-builder(inherit, transparent, #fff, 0);
391
497
 
498
+ &.lui-button-danger {
499
+ @include button-intent-builder(
500
+ colors.$error,
501
+ transparent,
502
+ colors.$error,
503
+ colors.$error,
504
+ transparent,
505
+ colors.$error,
506
+ colors.$error,
507
+ transparent,
508
+ colors.$error,
509
+ );
510
+ }
511
+
392
512
  & {
393
513
  // remove the padding and margin off the buttons - used for text only buttons
394
514
  padding: 0;
@@ -406,7 +526,7 @@ a.lui-button {
406
526
  fill: colors.$fuscous;
407
527
  }
408
528
 
409
- &:disabled {
529
+ &:disabled:where(:not([aria-busy])) {
410
530
  color: colors.$disabled-color;
411
531
  background: none;
412
532
  border: 0;
@@ -421,6 +541,10 @@ a.lui-button {
421
541
  fill: colors.$disabled-color;
422
542
  }
423
543
  }
544
+
545
+ &[aria-busy]:hover {
546
+ cursor: progress;
547
+ }
424
548
  }
425
549
 
426
550
  &-icon-only {
@@ -474,9 +598,11 @@ a.lui-button {
474
598
  svg * {
475
599
  color: #fff;
476
600
  }
477
- &:disabled,
478
- &:disabled:hover {
601
+ &:disabled:where(:not([aria-busy])),
602
+ &:disabled:hover:where(:not([aria-busy])) {
479
603
  color: $disabled-reversed-no-bg-btn-txt;
604
+ background-color: transparent;
605
+ border: 0;
480
606
 
481
607
  i,
482
608
  svg * {
@@ -484,7 +610,7 @@ a.lui-button {
484
610
  fill: $disabled-reversed-no-bg-btn-txt;
485
611
  }
486
612
  }
487
- &:hover {
613
+ &:hover:where(:not([aria-busy])) {
488
614
  i,
489
615
  svg * {
490
616
  color: colors.$spray;
@@ -497,6 +623,26 @@ a.lui-button {
497
623
  color: colors.$txt-link;
498
624
  }
499
625
 
626
+ &[aria-busy] {
627
+ position: relative;
628
+ }
629
+
630
+ &[aria-busy]:has(.lui-button-loading-spinner) {
631
+ color: transparent;
632
+
633
+ > *:not(.lui-button-loading-spinner) {
634
+ visibility: hidden;
635
+ }
636
+ }
637
+
638
+ &-loading-spinner {
639
+ position: absolute;
640
+ inset: 0;
641
+ display: flex;
642
+ align-items: center;
643
+ justify-content: center;
644
+ }
645
+
500
646
  &.lui-button-sm {
501
647
  padding: toRem(3px) spacing.$unit-xs;
502
648
 
@@ -600,7 +746,11 @@ a.lui-button {
600
746
  }
601
747
 
602
748
  &.lui-button-icon-right {
603
- padding: toRem(11px) spacing.$unit-sm toRem(11px) spacing.$px; // magic numbers to account for border
749
+ padding: toRem(11px) spacing.$unit-sm toRem(11px) toRem(16px); // magic numbers to account for border
750
+
751
+ .LuiIcon {
752
+ margin: 0 0 toRem(-7px) toRem(8px);
753
+ }
604
754
 
605
755
  i {
606
756
  position: relative;
@@ -686,7 +836,7 @@ a.lui-button {
686
836
  fill: colors.$white;
687
837
  }
688
838
  //style selected button when disabled
689
- &:disabled {
839
+ &:disabled:where(:not([aria-busy])) {
690
840
  background-color: colors.$disabled-color;
691
841
  color: colors.$white;
692
842
  &.lui-button-icon-only svg * {
@@ -695,7 +845,7 @@ a.lui-button {
695
845
  }
696
846
  }
697
847
 
698
- &:hover {
848
+ &:hover:where(:not([aria-busy])) {
699
849
  background: colors.$sea;
700
850
  cursor: pointer;
701
851
  color: colors.$white;
@@ -706,11 +856,13 @@ a.lui-button {
706
856
  // make sure the button sits above the others so the outline is not cut off on focus
707
857
  position: relative;
708
858
  }
709
- &:disabled {
859
+ &:disabled:where(:not([aria-busy])) {
710
860
  background-color: colors.$disabled-bg-color;
711
861
  border: 1px solid colors.$disabled-color-dark;
712
862
  color: colors.$disabled-color;
713
- cursor: not-allowed;
863
+ &:disabled:hover {
864
+ cursor: not-allowed;
865
+ }
714
866
  &.lui-button-icon-only svg * {
715
867
  fill: colors.$disabled-color;
716
868
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "24.15.0",
2
+ "version": "24.16.1",
3
3
  "license": "MIT",
4
4
  "repository": {
5
5
  "type": "git",