@dialpad/dialtone-css 8.74.0 → 8.75.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.
@@ -561,7 +561,38 @@
561
561
  // $$ LOADING STATE
562
562
  // ----------------------------------------------------------------------------
563
563
  .d-btn--loading {
564
- .d-btn-loading();
564
+ // Disable clicking while the loader is in place
565
+ pointer-events: none;
566
+
567
+ // Hide anything that was there before
568
+ .d-btn__icon,
569
+ .d-btn__label {
570
+ opacity: 0;
571
+ transition: opacity 50ms var(--ttf-in-out);
572
+ }
573
+
574
+ // Pseudo-element spinner (fallback for raw HTML consumers)
575
+ &::before {
576
+ position: absolute;
577
+ width: var(--dt-size-500);
578
+ height: var(--dt-size-500);
579
+ border: var(--dt-size-200) solid currentColor;
580
+ border-left-color: transparent !important;
581
+ border-radius: var(--dt-size-radius-circle);
582
+ animation: d-loading-circle 900ms infinite linear;
583
+ content: "";
584
+ }
585
+
586
+ // When a real DtLoader element is present, suppress the pseudo-element.
587
+ // Back-compat with old class name.
588
+ &:has(> .d-btn__loader)::before {
589
+ content: none;
590
+ }
591
+
592
+ // Position the DtLoader element within the button
593
+ > :where(.d-btn__loader) {
594
+ position: absolute;
595
+ }
565
596
  }
566
597
 
567
598
  // $$ DISABLED STATE
@@ -650,35 +681,6 @@
650
681
  --brand-color-l: 26%;
651
682
  }
652
683
 
653
- // ============================================================================
654
- // @ BUTTON LOADER
655
- // Changes the button
656
- // ----------------------------------------------------------------------------
657
- // @@ BASE STYLE
658
- // ----------------------------------------------------------------------------
659
- .d-btn-loading() {
660
- // Disable clicking while the loader is in place
661
- pointer-events: none;
662
-
663
- // Hide anything that was there before
664
- .d-btn__icon,
665
- .d-btn__label {
666
- opacity: 0;
667
- transition: opacity 50ms var(--ttf-in-out);
668
- }
669
-
670
- // Show the loading animation
671
- &::before {
672
- position: absolute;
673
- width: var(--dt-size-500);
674
- height: var(--dt-size-500);
675
- border: var(--dt-size-200) solid currentColor;
676
- border-left-color: transparent !important;
677
- border-radius: var(--dt-size-radius-circle);
678
- animation: d-loading-circle 900ms infinite linear;
679
- content: "";
680
- }
681
- }
682
684
 
683
685
  // ============================================================================
684
686
  // $ SPLIT BUTTON
@@ -2040,6 +2040,12 @@ template {
2040
2040
  animation: d-loading-circle 900ms infinite linear;
2041
2041
  content: "";
2042
2042
  }
2043
+ .d-btn--loading:has(> .d-btn__loader)::before {
2044
+ content: none;
2045
+ }
2046
+ .d-btn--loading > :where(.d-btn__loader) {
2047
+ position: absolute;
2048
+ }
2043
2049
  .d-btn--disabled {
2044
2050
  --button-color-text: var(--dt-action-color-foreground-disabled-default) !important;
2045
2051
  --button-color-background: var(--dt-action-color-background-disabled-default) !important;