@decidables/decidables-elements 0.5.6 → 0.6.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.
@@ -1567,10 +1567,6 @@
1567
1567
  [Symbol.iterator]: selection_iterator
1568
1568
  };
1569
1569
 
1570
- function select (selector) {
1571
- return typeof selector === "string" ? new Selection$1([[document.querySelector(selector)]], [document.documentElement]) : new Selection$1([[selector]], root);
1572
- }
1573
-
1574
1570
  function define (constructor, factory, prototype) {
1575
1571
  constructor.prototype = factory.prototype = prototype;
1576
1572
  prototype.constructor = constructor;
@@ -3092,18 +3088,6 @@
3092
3088
  getComputedStyleValue(property) {
3093
3089
  return getComputedStyle(this).getPropertyValue(property).trim();
3094
3090
  }
3095
- firstUpdated(changedProperties) {
3096
- super.firstUpdated(changedProperties);
3097
-
3098
- // Use focus highlighting if keyboard is used at all
3099
- select(this.renderRoot.host).classed('keyboard', true).on('mousemove.keyboard touchstart.keyboard', event => {
3100
- const element = event.currentTarget;
3101
- select(element.renderRoot.host).classed('keyboard', false).on('mousemove.keyboard touchstart.keyboard', null);
3102
- }).on('keydown.keyboard', event => {
3103
- const element = event.currentTarget;
3104
- select(element.renderRoot.host).classed('keyboard', true).on('keydown.keyboard mousemove.keyboard touchstart.keyboard', null);
3105
- });
3106
- }
3107
3091
  static get greys() {
3108
3092
  const grey = '#999999';
3109
3093
  const greys = {};
@@ -3239,7 +3223,7 @@
3239
3223
  };
3240
3224
  /* eslint-enable key-spacing, object-curly-newline */
3241
3225
  }
3242
- static cssBoxShadow(elevation, rotate = false, inverse = false) {
3226
+ static cssBoxShadow(elevation, inverse = false) {
3243
3227
  const umbraO = this.shadows.opacityUmbra + this.shadows.opacityBoost;
3244
3228
  const penumbraO = this.shadows.opacityPenumbra + this.shadows.opacityBoost;
3245
3229
  const ambientO = this.shadows.opacityAmbient + this.shadows.opacityBoost;
@@ -3249,9 +3233,9 @@
3249
3233
  const umbraM = this.shadows.mapUmbra[elevation];
3250
3234
  const penumbraM = this.shadows.mapPenumbra[elevation];
3251
3235
  const ambientM = this.shadows.mapAmbient[elevation];
3252
- const umbraS = rotate ? `${-umbraM.y}px ${umbraM.y / 2}px ${umbraM.b}px ${umbraM.s}px` : `${umbraM.y / 2}px ${umbraM.y}px ${umbraM.b}px ${umbraM.s}px`;
3253
- const penumbraS = rotate ? `${-penumbraM.y}px ${penumbraM.y / 2}px ${penumbraM.b}px ${penumbraM.s}px` : `${penumbraM.y / 2}px ${penumbraM.y}px ${penumbraM.b}px ${penumbraM.s}px`;
3254
- const ambientS = rotate ? `${-ambientM.y}px ${ambientM.y / 2}px ${ambientM.b}px ${ambientM.s}px` : `${ambientM.y / 2}px ${ambientM.y}px ${ambientM.b}px ${ambientM.s}px`;
3236
+ const umbraS = `${umbraM.y / 2}px ${umbraM.y}px ${umbraM.b}px ${umbraM.s}px`;
3237
+ const penumbraS = `${penumbraM.y / 2}px ${penumbraM.y}px ${penumbraM.b}px ${penumbraM.s}px`;
3238
+ const ambientS = `${ambientM.y / 2}px ${ambientM.y}px ${ambientM.b}px ${ambientM.s}px`;
3255
3239
  return `${umbraS} ${umbraC}, ${penumbraS} ${penumbraC}, ${ambientS} ${ambientC}`;
3256
3240
  }
3257
3241
  static get svgFilters() {
@@ -3387,49 +3371,58 @@
3387
3371
  button {
3388
3372
  width: 100%;
3389
3373
  height: 100%;
3374
+
3390
3375
  padding: 0.375rem 0.75rem;
3391
3376
 
3392
3377
  font-family: var(---font-family-base);
3393
3378
  font-size: 1.125rem;
3379
+
3394
3380
  line-height: 1.5;
3381
+
3395
3382
  color: var(---color-text-inverse);
3396
3383
 
3384
+ outline: none;
3385
+
3397
3386
  border: 0;
3398
3387
  border-radius: var(---border-radius);
3399
- outline: none;
3400
3388
  }
3401
3389
 
3402
3390
  button:disabled {
3403
- background-color: var(---decidables-button-background-color-disabled);
3404
3391
  outline: none;
3392
+
3393
+ background-color: var(---decidables-button-background-color-disabled);
3405
3394
  box-shadow: none;
3406
3395
  }
3407
3396
 
3408
3397
  button:enabled {
3409
3398
  cursor: pointer;
3399
+ outline: none;
3410
3400
 
3411
3401
  background-color: var(---decidables-button-background-color-enabled);
3412
- outline: none;
3413
3402
  box-shadow: var(---shadow-2);
3414
3403
  }
3415
3404
 
3416
3405
  button:enabled:hover {
3417
3406
  outline: none;
3407
+
3418
3408
  box-shadow: var(---shadow-4);
3419
3409
  }
3420
3410
 
3421
3411
  button:enabled:active {
3422
3412
  outline: none;
3413
+
3423
3414
  box-shadow: var(---shadow-8);
3424
3415
  }
3425
3416
 
3426
- :host(.keyboard) button:enabled:focus {
3417
+ button:enabled:focus-visible {
3427
3418
  outline: none;
3419
+
3428
3420
  box-shadow: var(---shadow-4);
3429
3421
  }
3430
3422
 
3431
- :host(.keyboard) button:enabled:focus:active {
3423
+ button:enabled:focus-visible:active {
3432
3424
  outline: none;
3425
+
3433
3426
  box-shadow: var(---shadow-8);
3434
3427
  }
3435
3428
  `];
@@ -3546,10 +3539,6 @@
3546
3539
  ---decidables-slider-color: var(--decidables-slider-color, var(---color-element-enabled));
3547
3540
  ---decidables-spinner-background-color: var(--decidables-slider-background-color, none);
3548
3541
 
3549
- ---shadow-2-rotate: var(--shadow-2-rotate, ${r$2(this.cssBoxShadow(2, true, false))});
3550
- ---shadow-4-rotate: var(--shadow-4-rotate, ${r$2(this.cssBoxShadow(4, true, false))});
3551
- ---shadow-8-rotate: var(--shadow-8-rotate, ${r$2(this.cssBoxShadow(8, true, false))});
3552
-
3553
3542
  display: flex;
3554
3543
 
3555
3544
  flex-direction: column;
@@ -3564,12 +3553,14 @@
3564
3553
 
3565
3554
  .range {
3566
3555
  position: relative;
3556
+
3567
3557
  display: flex;
3568
3558
 
3569
3559
  flex-direction: row;
3570
3560
 
3571
3561
  width: 3.5rem;
3572
3562
  height: 4.75rem;
3563
+
3573
3564
  margin: 0 0.25rem 0.25rem;
3574
3565
  }
3575
3566
 
@@ -3581,21 +3572,20 @@
3581
3572
  background: var(---decidables-spinner-background-color);
3582
3573
  }
3583
3574
 
3584
- /* Adapted from http://danielstern.ca/range.css/#/ */
3585
3575
  /* Overall */
3586
3576
  input[type=range] {
3587
- width: 4.75rem;
3588
- height: 3.5rem;
3577
+ width: 3.5rem;
3578
+ height: 4.75rem;
3579
+
3589
3580
  padding: 0;
3590
3581
  margin: 0;
3582
+
3583
+ appearance: none;
3591
3584
 
3592
3585
  background-color: unset;
3593
3586
 
3594
- transform: rotate(-90deg);
3595
- transform-origin: 2.375rem 2.375rem;
3596
-
3597
- /* stylelint-disable-next-line property-no-vendor-prefix */
3598
- -webkit-appearance: none;
3587
+ direction: rtl;
3588
+ writing-mode: vertical-lr;
3599
3589
  }
3600
3590
 
3601
3591
  input[type=range]:enabled {
@@ -3606,16 +3596,10 @@
3606
3596
  outline: none;
3607
3597
  }
3608
3598
 
3609
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3610
- input[type=range]::-ms-tooltip {
3611
- display: none;
3612
- }
3613
-
3614
3599
  /* Track */
3615
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3616
3600
  input[type=range]::-webkit-slider-runnable-track {
3617
- width: 100%;
3618
- height: 4px;
3601
+ width: 4px;
3602
+ height: 100%;
3619
3603
 
3620
3604
  background: var(---decidables-slider-background-color);
3621
3605
  border: 0;
@@ -3627,10 +3611,9 @@
3627
3611
  background: var(---decidables-slider-background-color);
3628
3612
  }
3629
3613
 
3630
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3631
3614
  input[type=range]::-moz-range-track {
3632
- width: 100%;
3633
- height: 4px;
3615
+ width: 4px;
3616
+ height: 100%;
3634
3617
 
3635
3618
  background: var(---decidables-slider-background-color);
3636
3619
  border: 0;
@@ -3638,57 +3621,17 @@
3638
3621
  box-shadow: none;
3639
3622
  }
3640
3623
 
3641
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3642
- input[type=range]::-ms-track {
3643
- width: 100%;
3644
- height: 4px;
3645
-
3646
- color: transparent;
3647
-
3648
- background: transparent;
3649
- border-color: transparent;
3650
- }
3651
-
3652
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3653
- input[type=range]::-ms-fill-lower {
3654
- background: #cccccc;
3655
- /* background: var(---decidables-slider-background-color); */
3656
- border: 0;
3657
- border-radius: 2px;
3658
- box-shadow: none;
3659
- }
3660
-
3661
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3662
- input[type=range]::-ms-fill-upper {
3663
- background: #cccccc;
3664
- /* background: var(---decidables-slider-background-color); */
3665
- border: 0;
3666
- border-radius: 2px;
3667
- box-shadow: none;
3668
- }
3669
-
3670
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3671
- input[type=range]:focus::-ms-fill-lower {
3672
- background: var(---decidables-slider-background-color);
3673
- }
3674
-
3675
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3676
- input[type=range]:focus::-ms-fill-upper {
3677
- background: var(---decidables-slider-background-color);
3678
- }
3679
-
3680
3624
  /* Thumb */
3681
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3682
3625
  input[type=range]::-webkit-slider-thumb {
3683
- width: 10px;
3684
- height: 20px;
3685
- margin-top: -8px;
3626
+ width: 20px;
3627
+ height: 10px;
3628
+
3629
+ margin-left: -8px;
3630
+
3631
+ appearance: none;
3686
3632
 
3687
3633
  border: 0;
3688
3634
  border-radius: 4px;
3689
-
3690
- /* stylelint-disable-next-line property-no-vendor-prefix */
3691
- -webkit-appearance: none;
3692
3635
  }
3693
3636
 
3694
3637
  input[type=range]:disabled::-webkit-slider-thumb {
@@ -3698,112 +3641,65 @@
3698
3641
 
3699
3642
  input[type=range]:enabled::-webkit-slider-thumb {
3700
3643
  background: var(---decidables-slider-color);
3701
- box-shadow: var(---shadow-2-rotate);
3644
+ box-shadow: var(---shadow-2);
3702
3645
  }
3703
3646
 
3704
3647
  input[type=range]:enabled:hover::-webkit-slider-thumb {
3705
- box-shadow: var(---shadow-4-rotate);
3648
+ box-shadow: var(---shadow-4);
3706
3649
  }
3707
3650
 
3708
3651
  input[type=range]:enabled:active::-webkit-slider-thumb {
3709
- box-shadow: var(---shadow-8-rotate);
3652
+ box-shadow: var(---shadow-8);
3710
3653
  }
3711
3654
 
3712
- :host(.keyboard) input[type=range]:enabled:focus::-webkit-slider-thumb {
3713
- box-shadow: var(---shadow-4-rotate);
3655
+ input[type=range]:enabled:focus-visible::-webkit-slider-thumb {
3656
+ box-shadow: var(---shadow-4);
3714
3657
  }
3715
3658
 
3716
- :host(.keyboard) input[type=range]:focus:active::-webkit-slider-thumb {
3717
- box-shadow: var(---shadow-8-rotate);
3659
+ input[type=range]:enabled:focus-visible:active::-webkit-slider-thumb {
3660
+ box-shadow: var(---shadow-8);
3718
3661
  }
3719
3662
 
3720
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3721
3663
  input[type=range]::-moz-range-thumb {
3722
- width: 10px;
3723
- height: 20px;
3664
+ width: 20px;
3665
+ height: 10px;
3724
3666
 
3725
3667
  border: 0;
3726
3668
  border-radius: 4px;
3727
3669
  }
3728
3670
 
3729
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3730
3671
  input[type=range]:disabled::-moz-range-thumb {
3731
3672
  background: var(---decidables-slider-background-color);
3732
3673
  box-shadow: none;
3733
3674
  }
3734
3675
 
3735
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3736
3676
  input[type=range]:enabled::-moz-range-thumb {
3737
3677
  background: var(---decidables-slider-color);
3738
- box-shadow: var(---shadow-2-rotate);
3678
+ box-shadow: var(---shadow-2);
3739
3679
  }
3740
3680
 
3741
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3742
3681
  input[type=range]:enabled:hover::-moz-range-thumb {
3743
- box-shadow: var(---shadow-4-rotate);
3682
+ box-shadow: var(---shadow-4);
3744
3683
  }
3745
3684
 
3746
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3747
3685
  input[type=range]:enabled:active::-moz-range-thumb {
3748
- box-shadow: var(---shadow-8-rotate);
3749
- }
3750
-
3751
- :host(.keyboard) input[type=range]:enabled:focus::-moz-range-thumb {
3752
- box-shadow: var(---shadow-4-rotate);
3753
- }
3754
-
3755
- :host(.keyboard) input[type=range]:enabled:focus:active::-moz-range-thumb {
3756
- box-shadow: var(---shadow-8-rotate);
3757
- }
3758
-
3759
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3760
- input[type=range]::-ms-thumb {
3761
- width: 10px;
3762
- height: 20px;
3763
- margin-top: 0;
3764
-
3765
- background: #999999;
3766
- /* background: var(---color-element-enabled); */
3767
- border: 0;
3768
- border-radius: 4px;
3769
- box-shadow: var(---shadow-2-rotate);
3770
- }
3771
-
3772
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3773
- input[type=range]:disabled::-ms-thumb {
3774
- background: var(---decidables-slider-background-color);
3775
- box-shadow: none;
3776
- }
3777
-
3778
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3779
- input[type=range]:enabled::-ms-thumb {
3780
- background: var(---decidables-slider-color);
3781
- box-shadow: var(---shadow-2-rotate);
3782
- }
3783
-
3784
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3785
- input[type=range]:enabled:hover::-ms-thumb {
3786
- box-shadow: var(---shadow-4-rotate);
3787
- }
3788
-
3789
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3790
- input[type=range]:enabled:active::-ms-thumb {
3791
- box-shadow: var(---shadow-8-rotate);
3686
+ box-shadow: var(---shadow-8);
3792
3687
  }
3793
3688
 
3794
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3795
- :host(.keyboard) input[type=range]:enabled:focus::-ms-thumb {
3796
- box-shadow: var(---shadow-4-rotate);
3689
+ input[type=range]:enabled:focus-visible::-moz-range-thumb {
3690
+ box-shadow: var(---shadow-4);
3797
3691
  }
3798
3692
 
3799
- :host(.keyboard) input[type=range]:enabled:focus:active::-ms-thumb {
3800
- box-shadow: var(---shadow-8-rotate);
3693
+ input[type=range]:enabled:focus-visible:active::-moz-range-thumb {
3694
+ box-shadow: var(---shadow-8);
3801
3695
  }
3802
3696
 
3803
- datalist {
3697
+ /* Tick marks */
3698
+ .datalist {
3804
3699
  position: absolute;
3805
3700
  left: 2rem;
3806
3701
  z-index: -1;
3702
+
3807
3703
  display: flex;
3808
3704
 
3809
3705
  flex-direction: column;
@@ -3816,14 +3712,13 @@
3816
3712
  font-size: 0.75rem;
3817
3713
  }
3818
3714
 
3819
- option {
3820
- padding: 0;
3821
-
3715
+ .option {
3822
3716
  line-height: 0.8;
3823
- min-block-size: 0;
3717
+
3718
+ white-space: nowrap;
3824
3719
  }
3825
3720
 
3826
- option::before {
3721
+ .option::before {
3827
3722
  content: "– ";
3828
3723
  }
3829
3724
  `];
@@ -3836,10 +3731,10 @@
3836
3731
  <div class="range">
3837
3732
  <input ?disabled=${this.disabled} type="range" id="slider" min=${o(this.rangeMin)} max=${o(this.rangeMax)} step=${o(this.rangeStep)} .value=${this.rangeValue} @change=${this.rangeChanged.bind(this)} @input=${this.rangeInputted.bind(this)}>
3838
3733
  ${this.scale ? x`
3839
- <datalist id="ticks">
3840
- <option value=${o(this.rangeMax)} label=${o(this.max)}></option>
3841
- <option value=${o(this.rangeMin)} label=${o(this.min)}></option>
3842
- </datalist>
3734
+ <div class="datalist">
3735
+ <div class="option">${o(this.max)}</div>
3736
+ <div class="option">${o(this.min)}</div>
3737
+ </div>
3843
3738
  ` : x``}
3844
3739
  </div>
3845
3740
  <decidables-spinner ?disabled=${this.disabled} min=${o(this.min)} max=${o(this.max)} step=${o(this.step)} .value=${this.value} @input=${this.spinnerInputted.bind(this)}></decidables-spinner>
@@ -3899,13 +3794,14 @@
3899
3794
  ---decidables-spinner-prefix: var(--decidables-spinner-prefix, "");
3900
3795
 
3901
3796
  ---decidables-spinner-postfix: var(--decidables-spinner-postfix, "");
3902
- ---decidables-spinner-postfix-padding: var(--decidables-spinner-postfix-padding, 0);
3797
+ ---decidables-spinner-postfix-padding: var(--decidables-spinner-postfix-padding, 0rem);
3903
3798
 
3904
3799
  display: block;
3905
3800
  }
3906
3801
 
3907
3802
  label {
3908
3803
  position: relative;
3804
+
3909
3805
  display: flex;
3910
3806
 
3911
3807
  flex-direction: column;
@@ -3923,6 +3819,7 @@
3923
3819
  left: calc(50% - var(---decidables-spinner-input-width) / 2 + 0.25rem);
3924
3820
 
3925
3821
  font-size: var(---decidables-spinner-font-size);
3822
+
3926
3823
  line-height: normal;
3927
3824
 
3928
3825
  content: var(---decidables-spinner-prefix);
@@ -3934,6 +3831,7 @@
3934
3831
  bottom: 1px;
3935
3832
 
3936
3833
  font-size: var(---decidables-spinner-font-size);
3834
+
3937
3835
  line-height: normal;
3938
3836
 
3939
3837
  content: var(---decidables-spinner-postfix);
@@ -3941,20 +3839,24 @@
3941
3839
 
3942
3840
  input[type=number] {
3943
3841
  width: var(---decidables-spinner-input-width);
3944
- padding-right: var(---decidables-spinner-postfix-padding);
3842
+
3843
+ padding: 1px var(---decidables-spinner-postfix-padding) 1px 2px;
3844
+ margin: 0;
3945
3845
 
3946
3846
  font-family: var(---font-family-base);
3947
3847
  font-size: var(---decidables-spinner-font-size);
3848
+
3948
3849
  color: inherit;
3850
+
3949
3851
  text-align: right;
3950
3852
 
3853
+ appearance: none;
3854
+ outline: none;
3855
+
3951
3856
  background: none;
3952
3857
  border: 0;
3953
3858
  border-radius: 0;
3954
- outline: none;
3955
3859
  box-shadow: var(---shadow-2);
3956
-
3957
- -webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */
3958
3860
  }
3959
3861
 
3960
3862
  input[type=number]:hover {
@@ -3971,20 +3873,54 @@
3971
3873
 
3972
3874
  border: 0;
3973
3875
  box-shadow: none;
3876
+ }
3877
+
3878
+ /* HACK: Manage spinners in Firefox */
3879
+ @supports (-moz-appearance: textfield) {
3880
+ input[type=number] {
3881
+ padding-right: calc(18px + var(---decidables-spinner-postfix-padding));
3882
+
3883
+ appearance: textfield;
3884
+ }
3885
+
3886
+ input[type=number]:hover,
3887
+ input[type=number]:focus,
3888
+ input[type=number]:active {
3889
+ padding-right: var(---decidables-spinner-postfix-padding);
3890
+
3891
+ appearance: none;
3892
+ }
3893
+
3894
+ input[type=number]:disabled {
3895
+ padding-right: calc(18px + var(---decidables-spinner-postfix-padding));
3896
+
3897
+ appearance: textfield;
3898
+ }
3899
+ }
3900
+
3901
+ /* HACK: Manage spinners in Chrome/Edge/Safari */
3902
+ input[type=number]::-webkit-inner-spin-button {
3903
+ /* Avoid oversized spinners in Safari */
3904
+ font-size: 1.125rem;
3905
+
3906
+ opacity: 0;
3907
+ }
3974
3908
 
3975
- /* HACK: Use correct text color in Safari */
3976
- -webkit-opacity: 1;
3977
- /* HACK: Hide spinners in disabled input for Firefox and Safari */
3978
- -moz-appearance: textfield; /* stylelint-disable-line property-no-vendor-prefix */
3979
- /* HACK: Use correct text color in Safari */
3980
- -webkit-text-fill-color: var(---color-text);
3909
+ input[type=number]:hover::-webkit-inner-spin-button,
3910
+ input[type=number]:focus::-webkit-inner-spin-button,
3911
+ input[type=number]:active::-webkit-inner-spin-button {
3912
+ opacity: 1;
3981
3913
  }
3982
3914
 
3983
- /* HACK: Hide spinners in disabled input for Firefox and Safari */
3984
- input[type=number]:disabled::-webkit-outer-spin-button,
3985
3915
  input[type=number]:disabled::-webkit-inner-spin-button {
3986
- margin: 0;
3987
- -webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */
3916
+ opacity: 0;
3917
+ }
3918
+
3919
+ /* HACK: Adjust padding on mobile w/o spinners */
3920
+ @media only screen and (hover: none) and (pointer: coarse) {
3921
+ input[type=number] {
3922
+ padding-right: calc(1.125rem + var(---decidables-spinner-postfix-padding));
3923
+ }
3988
3924
  }
3989
3925
  `];
3990
3926
  }
@@ -4048,13 +3984,16 @@
4048
3984
 
4049
3985
  width: 1px;
4050
3986
  height: 1px;
3987
+
4051
3988
  padding: 0;
4052
3989
  margin: -1px;
3990
+
4053
3991
  overflow: hidden;
4054
3992
 
4055
3993
  white-space: nowrap;
4056
3994
 
4057
3995
  border: 0;
3996
+
4058
3997
  clip-path: inset(100%); /* May cause a performance issue: https://github.com/h5bp/html5-boilerplate/issues/2021 */
4059
3998
  }
4060
3999
 
@@ -4070,6 +4009,7 @@
4070
4009
  position: relative;
4071
4010
 
4072
4011
  min-width: 24px;
4012
+
4073
4013
  padding: 0 0 36px;
4074
4014
  margin: 0.25rem 0.25rem 0;
4075
4015
 
@@ -4081,17 +4021,17 @@
4081
4021
  input[type=checkbox] + label + label::before,
4082
4022
  input[type=checkbox] + label + label::after {
4083
4023
  position: absolute;
4084
-
4085
4024
  left: 50%;
4086
4025
 
4087
4026
  margin: 0;
4088
4027
 
4089
- content: "";
4090
-
4091
4028
  outline: 0;
4092
4029
 
4093
- transition: all var(---transition-duration) ease;
4030
+ content: "";
4031
+
4094
4032
  transform: translate(-50%, 0);
4033
+
4034
+ transition: all var(---transition-duration) ease;
4095
4035
  }
4096
4036
 
4097
4037
  input[type=checkbox] + label + label::before {
@@ -4139,17 +4079,14 @@
4139
4079
  box-shadow: var(---shadow-8);
4140
4080
  }
4141
4081
 
4142
- /* stylelint-disable-next-line selector-max-compound-selectors */
4143
- :host(.keyboard) input[type=checkbox]:enabled:focus + label + label::after {
4082
+ input[type=checkbox]:enabled:focus-visible + label + label::after {
4144
4083
  box-shadow: var(---shadow-4);
4145
4084
  }
4146
4085
 
4147
- /* stylelint-disable selector-max-compound-selectors */
4148
- :host(.keyboard) input[type=checkbox]:enabled:focus + label + label:active::after,
4149
- :host(.keyboard) input[type=checkbox]:enabled:focus:active + label + label::after {
4086
+ input[type=checkbox]:enabled:focus-visible + label + label:active::after,
4087
+ input[type=checkbox]:enabled:focus-visible:active + label + label::after {
4150
4088
  box-shadow: var(---shadow-8);
4151
4089
  }
4152
- /* stylelint-enable selector-max-compound-selectors */
4153
4090
  `];
4154
4091
  }
4155
4092
  render() {
@@ -4269,39 +4206,46 @@
4269
4206
 
4270
4207
  width: 1px;
4271
4208
  height: 1px;
4209
+
4272
4210
  padding: 0;
4273
4211
  margin: -1px;
4212
+
4274
4213
  overflow: hidden;
4275
4214
 
4276
4215
  white-space: nowrap;
4277
4216
 
4278
4217
  border: 0;
4218
+
4279
4219
  clip-path: inset(100%); /* May cause a performance issue: https://github.com/h5bp/html5-boilerplate/issues/2021 */
4280
4220
  }
4281
4221
 
4282
4222
  input[type=radio] + label {
4283
4223
  width: 100%;
4224
+
4284
4225
  padding: 0.375rem 0.75rem;
4285
4226
 
4286
4227
  font-family: var(---font-family-base);
4287
4228
  font-size: 1.125rem;
4229
+
4288
4230
  line-height: 1.5;
4231
+
4289
4232
  color: var(---color-text-inverse);
4233
+
4290
4234
  text-align: center;
4291
4235
 
4292
4236
  cursor: pointer;
4237
+ outline: none;
4293
4238
 
4294
4239
  background-color: var(---color-element-enabled);
4295
4240
  border: 0;
4296
4241
  border-radius: 0;
4297
- outline: none;
4298
-
4299
4242
  box-shadow: var(---shadow-2);
4300
4243
  }
4301
4244
 
4302
4245
  input[type=radio]:checked + label {
4303
- background-color: var(---color-element-selected);
4304
4246
  outline: none;
4247
+
4248
+ background-color: var(---color-element-selected);
4305
4249
  box-shadow: var(---shadow-2);
4306
4250
  }
4307
4251
 
@@ -4309,6 +4253,7 @@
4309
4253
  z-index: 1;
4310
4254
 
4311
4255
  outline: none;
4256
+
4312
4257
  box-shadow: var(---shadow-4);
4313
4258
  }
4314
4259
 
@@ -4316,6 +4261,7 @@
4316
4261
  z-index: 2;
4317
4262
 
4318
4263
  outline: none;
4264
+
4319
4265
  box-shadow: var(---shadow-8);
4320
4266
  }
4321
4267
 
@@ -4329,25 +4275,28 @@
4329
4275
  border-bottom-left-radius: 0.25rem;
4330
4276
  }
4331
4277
 
4332
- :host(.keyboard) input[type=radio]:focus + label {
4278
+ input[type=radio]:focus-visible + label {
4333
4279
  z-index: 1;
4334
4280
 
4335
4281
  outline: none;
4282
+
4336
4283
  box-shadow: var(---shadow-4);
4337
4284
  }
4338
4285
 
4339
- :host(.keyboard) input[type=radio]:focus:checked + label {
4286
+ input[type=radio]:focus-visible:checked + label {
4340
4287
  z-index: 1;
4341
4288
 
4342
- background-color: var(---color-element-selected);
4343
4289
  outline: none;
4290
+
4291
+ background-color: var(---color-element-selected);
4344
4292
  box-shadow: var(---shadow-4);
4345
4293
  }
4346
4294
 
4347
- :host(.keyboard) input[type=radio]:focus + label:active {
4295
+ input[type=radio]:focus-visible + label:active {
4348
4296
  z-index: 2;
4349
4297
 
4350
4298
  outline: none;
4299
+
4351
4300
  box-shadow: var(---shadow-8);
4352
4301
  }
4353
4302
  `];