@decidables/discountable-elements 0.6.5 → 0.7.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.
@@ -10188,18 +10188,6 @@ class DecidablesElement extends i$2 {
10188
10188
  getComputedStyleValue(property) {
10189
10189
  return getComputedStyle(this).getPropertyValue(property).trim();
10190
10190
  }
10191
- firstUpdated(changedProperties) {
10192
- super.firstUpdated(changedProperties);
10193
-
10194
- // Use focus highlighting if keyboard is used at all
10195
- select(this.renderRoot.host).classed('keyboard', true).on('mousemove.keyboard touchstart.keyboard', event => {
10196
- const element = event.currentTarget;
10197
- select(element.renderRoot.host).classed('keyboard', false).on('mousemove.keyboard touchstart.keyboard', null);
10198
- }).on('keydown.keyboard', event => {
10199
- const element = event.currentTarget;
10200
- select(element.renderRoot.host).classed('keyboard', true).on('keydown.keyboard mousemove.keyboard touchstart.keyboard', null);
10201
- });
10202
- }
10203
10191
  static get greys() {
10204
10192
  const grey = '#999999';
10205
10193
  const greys = {};
@@ -10335,7 +10323,7 @@ class DecidablesElement extends i$2 {
10335
10323
  };
10336
10324
  /* eslint-enable key-spacing, object-curly-newline */
10337
10325
  }
10338
- static cssBoxShadow(elevation, rotate = false, inverse = false) {
10326
+ static cssBoxShadow(elevation, inverse = false) {
10339
10327
  const umbraO = this.shadows.opacityUmbra + this.shadows.opacityBoost;
10340
10328
  const penumbraO = this.shadows.opacityPenumbra + this.shadows.opacityBoost;
10341
10329
  const ambientO = this.shadows.opacityAmbient + this.shadows.opacityBoost;
@@ -10345,9 +10333,9 @@ class DecidablesElement extends i$2 {
10345
10333
  const umbraM = this.shadows.mapUmbra[elevation];
10346
10334
  const penumbraM = this.shadows.mapPenumbra[elevation];
10347
10335
  const ambientM = this.shadows.mapAmbient[elevation];
10348
- 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`;
10349
- 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`;
10350
- 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`;
10336
+ const umbraS = `${umbraM.y / 2}px ${umbraM.y}px ${umbraM.b}px ${umbraM.s}px`;
10337
+ const penumbraS = `${penumbraM.y / 2}px ${penumbraM.y}px ${penumbraM.b}px ${penumbraM.s}px`;
10338
+ const ambientS = `${ambientM.y / 2}px ${ambientM.y}px ${ambientM.b}px ${ambientM.s}px`;
10351
10339
  return `${umbraS} ${umbraC}, ${penumbraS} ${penumbraC}, ${ambientS} ${ambientC}`;
10352
10340
  }
10353
10341
  static get svgFilters() {
@@ -10483,49 +10471,58 @@ class DecidablesButton extends DecidablesElement {
10483
10471
  button {
10484
10472
  width: 100%;
10485
10473
  height: 100%;
10474
+
10486
10475
  padding: 0.375rem 0.75rem;
10487
10476
 
10488
10477
  font-family: var(---font-family-base);
10489
10478
  font-size: 1.125rem;
10479
+
10490
10480
  line-height: 1.5;
10481
+
10491
10482
  color: var(---color-text-inverse);
10492
10483
 
10484
+ outline: none;
10485
+
10493
10486
  border: 0;
10494
10487
  border-radius: var(---border-radius);
10495
- outline: none;
10496
10488
  }
10497
10489
 
10498
10490
  button:disabled {
10499
- background-color: var(---decidables-button-background-color-disabled);
10500
10491
  outline: none;
10492
+
10493
+ background-color: var(---decidables-button-background-color-disabled);
10501
10494
  box-shadow: none;
10502
10495
  }
10503
10496
 
10504
10497
  button:enabled {
10505
10498
  cursor: pointer;
10499
+ outline: none;
10506
10500
 
10507
10501
  background-color: var(---decidables-button-background-color-enabled);
10508
- outline: none;
10509
10502
  box-shadow: var(---shadow-2);
10510
10503
  }
10511
10504
 
10512
10505
  button:enabled:hover {
10513
10506
  outline: none;
10507
+
10514
10508
  box-shadow: var(---shadow-4);
10515
10509
  }
10516
10510
 
10517
10511
  button:enabled:active {
10518
10512
  outline: none;
10513
+
10519
10514
  box-shadow: var(---shadow-8);
10520
10515
  }
10521
10516
 
10522
- :host(.keyboard) button:enabled:focus {
10517
+ button:enabled:focus-visible {
10523
10518
  outline: none;
10519
+
10524
10520
  box-shadow: var(---shadow-4);
10525
10521
  }
10526
10522
 
10527
- :host(.keyboard) button:enabled:focus:active {
10523
+ button:enabled:focus-visible:active {
10528
10524
  outline: none;
10525
+
10529
10526
  box-shadow: var(---shadow-8);
10530
10527
  }
10531
10528
  `];
@@ -10642,10 +10639,6 @@ class DecidablesSlider extends DecidablesElement {
10642
10639
  ---decidables-slider-color: var(--decidables-slider-color, var(---color-element-enabled));
10643
10640
  ---decidables-spinner-background-color: var(--decidables-slider-background-color, none);
10644
10641
 
10645
- ---shadow-2-rotate: var(--shadow-2-rotate, ${r$4(this.cssBoxShadow(2, true, false))});
10646
- ---shadow-4-rotate: var(--shadow-4-rotate, ${r$4(this.cssBoxShadow(4, true, false))});
10647
- ---shadow-8-rotate: var(--shadow-8-rotate, ${r$4(this.cssBoxShadow(8, true, false))});
10648
-
10649
10642
  display: flex;
10650
10643
 
10651
10644
  flex-direction: column;
@@ -10660,12 +10653,14 @@ class DecidablesSlider extends DecidablesElement {
10660
10653
 
10661
10654
  .range {
10662
10655
  position: relative;
10656
+
10663
10657
  display: flex;
10664
10658
 
10665
10659
  flex-direction: row;
10666
10660
 
10667
10661
  width: 3.5rem;
10668
10662
  height: 4.75rem;
10663
+
10669
10664
  margin: 0 0.25rem 0.25rem;
10670
10665
  }
10671
10666
 
@@ -10677,21 +10672,20 @@ class DecidablesSlider extends DecidablesElement {
10677
10672
  background: var(---decidables-spinner-background-color);
10678
10673
  }
10679
10674
 
10680
- /* Adapted from http://danielstern.ca/range.css/#/ */
10681
10675
  /* Overall */
10682
10676
  input[type=range] {
10683
- width: 4.75rem;
10684
- height: 3.5rem;
10677
+ width: 3.5rem;
10678
+ height: 4.75rem;
10679
+
10685
10680
  padding: 0;
10686
10681
  margin: 0;
10682
+
10683
+ appearance: none;
10687
10684
 
10688
10685
  background-color: unset;
10689
10686
 
10690
- transform: rotate(-90deg);
10691
- transform-origin: 2.375rem 2.375rem;
10692
-
10693
- /* stylelint-disable-next-line property-no-vendor-prefix */
10694
- -webkit-appearance: none;
10687
+ direction: rtl;
10688
+ writing-mode: vertical-lr;
10695
10689
  }
10696
10690
 
10697
10691
  input[type=range]:enabled {
@@ -10702,16 +10696,10 @@ class DecidablesSlider extends DecidablesElement {
10702
10696
  outline: none;
10703
10697
  }
10704
10698
 
10705
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10706
- input[type=range]::-ms-tooltip {
10707
- display: none;
10708
- }
10709
-
10710
10699
  /* Track */
10711
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10712
10700
  input[type=range]::-webkit-slider-runnable-track {
10713
- width: 100%;
10714
- height: 4px;
10701
+ width: 4px;
10702
+ height: 100%;
10715
10703
 
10716
10704
  background: var(---decidables-slider-background-color);
10717
10705
  border: 0;
@@ -10723,10 +10711,9 @@ class DecidablesSlider extends DecidablesElement {
10723
10711
  background: var(---decidables-slider-background-color);
10724
10712
  }
10725
10713
 
10726
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10727
10714
  input[type=range]::-moz-range-track {
10728
- width: 100%;
10729
- height: 4px;
10715
+ width: 4px;
10716
+ height: 100%;
10730
10717
 
10731
10718
  background: var(---decidables-slider-background-color);
10732
10719
  border: 0;
@@ -10734,57 +10721,17 @@ class DecidablesSlider extends DecidablesElement {
10734
10721
  box-shadow: none;
10735
10722
  }
10736
10723
 
10737
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10738
- input[type=range]::-ms-track {
10739
- width: 100%;
10740
- height: 4px;
10741
-
10742
- color: transparent;
10743
-
10744
- background: transparent;
10745
- border-color: transparent;
10746
- }
10747
-
10748
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10749
- input[type=range]::-ms-fill-lower {
10750
- background: #cccccc;
10751
- /* background: var(---decidables-slider-background-color); */
10752
- border: 0;
10753
- border-radius: 2px;
10754
- box-shadow: none;
10755
- }
10756
-
10757
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10758
- input[type=range]::-ms-fill-upper {
10759
- background: #cccccc;
10760
- /* background: var(---decidables-slider-background-color); */
10761
- border: 0;
10762
- border-radius: 2px;
10763
- box-shadow: none;
10764
- }
10765
-
10766
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10767
- input[type=range]:focus::-ms-fill-lower {
10768
- background: var(---decidables-slider-background-color);
10769
- }
10770
-
10771
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10772
- input[type=range]:focus::-ms-fill-upper {
10773
- background: var(---decidables-slider-background-color);
10774
- }
10775
-
10776
10724
  /* Thumb */
10777
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10778
10725
  input[type=range]::-webkit-slider-thumb {
10779
- width: 10px;
10780
- height: 20px;
10781
- margin-top: -8px;
10726
+ width: 20px;
10727
+ height: 10px;
10728
+
10729
+ margin-left: -8px;
10730
+
10731
+ appearance: none;
10782
10732
 
10783
10733
  border: 0;
10784
10734
  border-radius: 4px;
10785
-
10786
- /* stylelint-disable-next-line property-no-vendor-prefix */
10787
- -webkit-appearance: none;
10788
10735
  }
10789
10736
 
10790
10737
  input[type=range]:disabled::-webkit-slider-thumb {
@@ -10794,112 +10741,65 @@ class DecidablesSlider extends DecidablesElement {
10794
10741
 
10795
10742
  input[type=range]:enabled::-webkit-slider-thumb {
10796
10743
  background: var(---decidables-slider-color);
10797
- box-shadow: var(---shadow-2-rotate);
10744
+ box-shadow: var(---shadow-2);
10798
10745
  }
10799
10746
 
10800
10747
  input[type=range]:enabled:hover::-webkit-slider-thumb {
10801
- box-shadow: var(---shadow-4-rotate);
10748
+ box-shadow: var(---shadow-4);
10802
10749
  }
10803
10750
 
10804
10751
  input[type=range]:enabled:active::-webkit-slider-thumb {
10805
- box-shadow: var(---shadow-8-rotate);
10752
+ box-shadow: var(---shadow-8);
10806
10753
  }
10807
10754
 
10808
- :host(.keyboard) input[type=range]:enabled:focus::-webkit-slider-thumb {
10809
- box-shadow: var(---shadow-4-rotate);
10755
+ input[type=range]:enabled:focus-visible::-webkit-slider-thumb {
10756
+ box-shadow: var(---shadow-4);
10810
10757
  }
10811
10758
 
10812
- :host(.keyboard) input[type=range]:focus:active::-webkit-slider-thumb {
10813
- box-shadow: var(---shadow-8-rotate);
10759
+ input[type=range]:enabled:focus-visible:active::-webkit-slider-thumb {
10760
+ box-shadow: var(---shadow-8);
10814
10761
  }
10815
10762
 
10816
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10817
10763
  input[type=range]::-moz-range-thumb {
10818
- width: 10px;
10819
- height: 20px;
10764
+ width: 20px;
10765
+ height: 10px;
10820
10766
 
10821
10767
  border: 0;
10822
10768
  border-radius: 4px;
10823
10769
  }
10824
10770
 
10825
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10826
10771
  input[type=range]:disabled::-moz-range-thumb {
10827
10772
  background: var(---decidables-slider-background-color);
10828
10773
  box-shadow: none;
10829
10774
  }
10830
10775
 
10831
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10832
10776
  input[type=range]:enabled::-moz-range-thumb {
10833
10777
  background: var(---decidables-slider-color);
10834
- box-shadow: var(---shadow-2-rotate);
10778
+ box-shadow: var(---shadow-2);
10835
10779
  }
10836
10780
 
10837
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10838
10781
  input[type=range]:enabled:hover::-moz-range-thumb {
10839
- box-shadow: var(---shadow-4-rotate);
10782
+ box-shadow: var(---shadow-4);
10840
10783
  }
10841
10784
 
10842
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10843
10785
  input[type=range]:enabled:active::-moz-range-thumb {
10844
- box-shadow: var(---shadow-8-rotate);
10845
- }
10846
-
10847
- :host(.keyboard) input[type=range]:enabled:focus::-moz-range-thumb {
10848
- box-shadow: var(---shadow-4-rotate);
10849
- }
10850
-
10851
- :host(.keyboard) input[type=range]:enabled:focus:active::-moz-range-thumb {
10852
- box-shadow: var(---shadow-8-rotate);
10853
- }
10854
-
10855
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10856
- input[type=range]::-ms-thumb {
10857
- width: 10px;
10858
- height: 20px;
10859
- margin-top: 0;
10860
-
10861
- background: #999999;
10862
- /* background: var(---color-element-enabled); */
10863
- border: 0;
10864
- border-radius: 4px;
10865
- box-shadow: var(---shadow-2-rotate);
10866
- }
10867
-
10868
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10869
- input[type=range]:disabled::-ms-thumb {
10870
- background: var(---decidables-slider-background-color);
10871
- box-shadow: none;
10872
- }
10873
-
10874
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10875
- input[type=range]:enabled::-ms-thumb {
10876
- background: var(---decidables-slider-color);
10877
- box-shadow: var(---shadow-2-rotate);
10878
- }
10879
-
10880
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10881
- input[type=range]:enabled:hover::-ms-thumb {
10882
- box-shadow: var(---shadow-4-rotate);
10883
- }
10884
-
10885
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10886
- input[type=range]:enabled:active::-ms-thumb {
10887
- box-shadow: var(---shadow-8-rotate);
10786
+ box-shadow: var(---shadow-8);
10888
10787
  }
10889
10788
 
10890
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
10891
- :host(.keyboard) input[type=range]:enabled:focus::-ms-thumb {
10892
- box-shadow: var(---shadow-4-rotate);
10789
+ input[type=range]:enabled:focus-visible::-moz-range-thumb {
10790
+ box-shadow: var(---shadow-4);
10893
10791
  }
10894
10792
 
10895
- :host(.keyboard) input[type=range]:enabled:focus:active::-ms-thumb {
10896
- box-shadow: var(---shadow-8-rotate);
10793
+ input[type=range]:enabled:focus-visible:active::-moz-range-thumb {
10794
+ box-shadow: var(---shadow-8);
10897
10795
  }
10898
10796
 
10899
- datalist {
10797
+ /* Tick marks */
10798
+ .datalist {
10900
10799
  position: absolute;
10901
10800
  left: 2rem;
10902
10801
  z-index: -1;
10802
+
10903
10803
  display: flex;
10904
10804
 
10905
10805
  flex-direction: column;
@@ -10912,14 +10812,13 @@ class DecidablesSlider extends DecidablesElement {
10912
10812
  font-size: 0.75rem;
10913
10813
  }
10914
10814
 
10915
- option {
10916
- padding: 0;
10917
-
10815
+ .option {
10918
10816
  line-height: 0.8;
10919
- min-block-size: 0;
10817
+
10818
+ white-space: nowrap;
10920
10819
  }
10921
10820
 
10922
- option::before {
10821
+ .option::before {
10923
10822
  content: "– ";
10924
10823
  }
10925
10824
  `];
@@ -10932,10 +10831,10 @@ class DecidablesSlider extends DecidablesElement {
10932
10831
  <div class="range">
10933
10832
  <input ?disabled=${this.disabled} type="range" id="slider" min=${o$2(this.rangeMin)} max=${o$2(this.rangeMax)} step=${o$2(this.rangeStep)} .value=${this.rangeValue} @change=${this.rangeChanged.bind(this)} @input=${this.rangeInputted.bind(this)}>
10934
10833
  ${this.scale ? x$2`
10935
- <datalist id="ticks">
10936
- <option value=${o$2(this.rangeMax)} label=${o$2(this.max)}></option>
10937
- <option value=${o$2(this.rangeMin)} label=${o$2(this.min)}></option>
10938
- </datalist>
10834
+ <div class="datalist">
10835
+ <div class="option">${o$2(this.max)}</div>
10836
+ <div class="option">${o$2(this.min)}</div>
10837
+ </div>
10939
10838
  ` : x$2``}
10940
10839
  </div>
10941
10840
  <decidables-spinner ?disabled=${this.disabled} min=${o$2(this.min)} max=${o$2(this.max)} step=${o$2(this.step)} .value=${this.value} @input=${this.spinnerInputted.bind(this)}></decidables-spinner>
@@ -10995,13 +10894,14 @@ class DecidablesSpinner extends DecidablesElement {
10995
10894
  ---decidables-spinner-prefix: var(--decidables-spinner-prefix, "");
10996
10895
 
10997
10896
  ---decidables-spinner-postfix: var(--decidables-spinner-postfix, "");
10998
- ---decidables-spinner-postfix-padding: var(--decidables-spinner-postfix-padding, 0);
10897
+ ---decidables-spinner-postfix-padding: var(--decidables-spinner-postfix-padding, 0rem);
10999
10898
 
11000
10899
  display: block;
11001
10900
  }
11002
10901
 
11003
10902
  label {
11004
10903
  position: relative;
10904
+
11005
10905
  display: flex;
11006
10906
 
11007
10907
  flex-direction: column;
@@ -11019,6 +10919,7 @@ class DecidablesSpinner extends DecidablesElement {
11019
10919
  left: calc(50% - var(---decidables-spinner-input-width) / 2 + 0.25rem);
11020
10920
 
11021
10921
  font-size: var(---decidables-spinner-font-size);
10922
+
11022
10923
  line-height: normal;
11023
10924
 
11024
10925
  content: var(---decidables-spinner-prefix);
@@ -11030,6 +10931,7 @@ class DecidablesSpinner extends DecidablesElement {
11030
10931
  bottom: 1px;
11031
10932
 
11032
10933
  font-size: var(---decidables-spinner-font-size);
10934
+
11033
10935
  line-height: normal;
11034
10936
 
11035
10937
  content: var(---decidables-spinner-postfix);
@@ -11037,20 +10939,24 @@ class DecidablesSpinner extends DecidablesElement {
11037
10939
 
11038
10940
  input[type=number] {
11039
10941
  width: var(---decidables-spinner-input-width);
11040
- padding-right: var(---decidables-spinner-postfix-padding);
10942
+
10943
+ padding: 1px var(---decidables-spinner-postfix-padding) 1px 2px;
10944
+ margin: 0;
11041
10945
 
11042
10946
  font-family: var(---font-family-base);
11043
10947
  font-size: var(---decidables-spinner-font-size);
10948
+
11044
10949
  color: inherit;
10950
+
11045
10951
  text-align: right;
11046
10952
 
10953
+ appearance: none;
10954
+ outline: none;
10955
+
11047
10956
  background: none;
11048
10957
  border: 0;
11049
10958
  border-radius: 0;
11050
- outline: none;
11051
10959
  box-shadow: var(---shadow-2);
11052
-
11053
- -webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */
11054
10960
  }
11055
10961
 
11056
10962
  input[type=number]:hover {
@@ -11067,20 +10973,54 @@ class DecidablesSpinner extends DecidablesElement {
11067
10973
 
11068
10974
  border: 0;
11069
10975
  box-shadow: none;
10976
+ }
10977
+
10978
+ /* HACK: Manage spinners in Firefox */
10979
+ @supports (-moz-appearance: textfield) {
10980
+ input[type=number] {
10981
+ padding-right: calc(18px + var(---decidables-spinner-postfix-padding));
10982
+
10983
+ appearance: textfield;
10984
+ }
10985
+
10986
+ input[type=number]:hover,
10987
+ input[type=number]:focus,
10988
+ input[type=number]:active {
10989
+ padding-right: var(---decidables-spinner-postfix-padding);
10990
+
10991
+ appearance: none;
10992
+ }
10993
+
10994
+ input[type=number]:disabled {
10995
+ padding-right: calc(18px + var(---decidables-spinner-postfix-padding));
10996
+
10997
+ appearance: textfield;
10998
+ }
10999
+ }
11000
+
11001
+ /* HACK: Manage spinners in Chrome/Edge/Safari */
11002
+ input[type=number]::-webkit-inner-spin-button {
11003
+ /* Avoid oversized spinners in Safari */
11004
+ font-size: 1.125rem;
11005
+
11006
+ opacity: 0;
11007
+ }
11070
11008
 
11071
- /* HACK: Use correct text color in Safari */
11072
- -webkit-opacity: 1;
11073
- /* HACK: Hide spinners in disabled input for Firefox and Safari */
11074
- -moz-appearance: textfield; /* stylelint-disable-line property-no-vendor-prefix */
11075
- /* HACK: Use correct text color in Safari */
11076
- -webkit-text-fill-color: var(---color-text);
11009
+ input[type=number]:hover::-webkit-inner-spin-button,
11010
+ input[type=number]:focus::-webkit-inner-spin-button,
11011
+ input[type=number]:active::-webkit-inner-spin-button {
11012
+ opacity: 1;
11077
11013
  }
11078
11014
 
11079
- /* HACK: Hide spinners in disabled input for Firefox and Safari */
11080
- input[type=number]:disabled::-webkit-outer-spin-button,
11081
11015
  input[type=number]:disabled::-webkit-inner-spin-button {
11082
- margin: 0;
11083
- -webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */
11016
+ opacity: 0;
11017
+ }
11018
+
11019
+ /* HACK: Adjust padding on mobile w/o spinners */
11020
+ @media only screen and (hover: none) and (pointer: coarse) {
11021
+ input[type=number] {
11022
+ padding-right: calc(1.125rem + var(---decidables-spinner-postfix-padding));
11023
+ }
11084
11024
  }
11085
11025
  `];
11086
11026
  }
@@ -11144,13 +11084,16 @@ class DecidablesSwitch extends DecidablesElement {
11144
11084
 
11145
11085
  width: 1px;
11146
11086
  height: 1px;
11087
+
11147
11088
  padding: 0;
11148
11089
  margin: -1px;
11090
+
11149
11091
  overflow: hidden;
11150
11092
 
11151
11093
  white-space: nowrap;
11152
11094
 
11153
11095
  border: 0;
11096
+
11154
11097
  clip-path: inset(100%); /* May cause a performance issue: https://github.com/h5bp/html5-boilerplate/issues/2021 */
11155
11098
  }
11156
11099
 
@@ -11166,6 +11109,7 @@ class DecidablesSwitch extends DecidablesElement {
11166
11109
  position: relative;
11167
11110
 
11168
11111
  min-width: 24px;
11112
+
11169
11113
  padding: 0 0 36px;
11170
11114
  margin: 0.25rem 0.25rem 0;
11171
11115
 
@@ -11177,17 +11121,17 @@ class DecidablesSwitch extends DecidablesElement {
11177
11121
  input[type=checkbox] + label + label::before,
11178
11122
  input[type=checkbox] + label + label::after {
11179
11123
  position: absolute;
11180
-
11181
11124
  left: 50%;
11182
11125
 
11183
11126
  margin: 0;
11184
11127
 
11185
- content: "";
11186
-
11187
11128
  outline: 0;
11188
11129
 
11189
- transition: all var(---transition-duration) ease;
11130
+ content: "";
11131
+
11190
11132
  transform: translate(-50%, 0);
11133
+
11134
+ transition: all var(---transition-duration) ease;
11191
11135
  }
11192
11136
 
11193
11137
  input[type=checkbox] + label + label::before {
@@ -11235,17 +11179,14 @@ class DecidablesSwitch extends DecidablesElement {
11235
11179
  box-shadow: var(---shadow-8);
11236
11180
  }
11237
11181
 
11238
- /* stylelint-disable-next-line selector-max-compound-selectors */
11239
- :host(.keyboard) input[type=checkbox]:enabled:focus + label + label::after {
11182
+ input[type=checkbox]:enabled:focus-visible + label + label::after {
11240
11183
  box-shadow: var(---shadow-4);
11241
11184
  }
11242
11185
 
11243
- /* stylelint-disable selector-max-compound-selectors */
11244
- :host(.keyboard) input[type=checkbox]:enabled:focus + label + label:active::after,
11245
- :host(.keyboard) input[type=checkbox]:enabled:focus:active + label + label::after {
11186
+ input[type=checkbox]:enabled:focus-visible + label + label:active::after,
11187
+ input[type=checkbox]:enabled:focus-visible:active + label + label::after {
11246
11188
  box-shadow: var(---shadow-8);
11247
11189
  }
11248
- /* stylelint-enable selector-max-compound-selectors */
11249
11190
  `];
11250
11191
  }
11251
11192
  render() {
@@ -11365,39 +11306,46 @@ class DecidablesToggleOption extends DecidablesElement {
11365
11306
 
11366
11307
  width: 1px;
11367
11308
  height: 1px;
11309
+
11368
11310
  padding: 0;
11369
11311
  margin: -1px;
11312
+
11370
11313
  overflow: hidden;
11371
11314
 
11372
11315
  white-space: nowrap;
11373
11316
 
11374
11317
  border: 0;
11318
+
11375
11319
  clip-path: inset(100%); /* May cause a performance issue: https://github.com/h5bp/html5-boilerplate/issues/2021 */
11376
11320
  }
11377
11321
 
11378
11322
  input[type=radio] + label {
11379
11323
  width: 100%;
11324
+
11380
11325
  padding: 0.375rem 0.75rem;
11381
11326
 
11382
11327
  font-family: var(---font-family-base);
11383
11328
  font-size: 1.125rem;
11329
+
11384
11330
  line-height: 1.5;
11331
+
11385
11332
  color: var(---color-text-inverse);
11333
+
11386
11334
  text-align: center;
11387
11335
 
11388
11336
  cursor: pointer;
11337
+ outline: none;
11389
11338
 
11390
11339
  background-color: var(---color-element-enabled);
11391
11340
  border: 0;
11392
11341
  border-radius: 0;
11393
- outline: none;
11394
-
11395
11342
  box-shadow: var(---shadow-2);
11396
11343
  }
11397
11344
 
11398
11345
  input[type=radio]:checked + label {
11399
- background-color: var(---color-element-selected);
11400
11346
  outline: none;
11347
+
11348
+ background-color: var(---color-element-selected);
11401
11349
  box-shadow: var(---shadow-2);
11402
11350
  }
11403
11351
 
@@ -11405,6 +11353,7 @@ class DecidablesToggleOption extends DecidablesElement {
11405
11353
  z-index: 1;
11406
11354
 
11407
11355
  outline: none;
11356
+
11408
11357
  box-shadow: var(---shadow-4);
11409
11358
  }
11410
11359
 
@@ -11412,6 +11361,7 @@ class DecidablesToggleOption extends DecidablesElement {
11412
11361
  z-index: 2;
11413
11362
 
11414
11363
  outline: none;
11364
+
11415
11365
  box-shadow: var(---shadow-8);
11416
11366
  }
11417
11367
 
@@ -11425,25 +11375,28 @@ class DecidablesToggleOption extends DecidablesElement {
11425
11375
  border-bottom-left-radius: 0.25rem;
11426
11376
  }
11427
11377
 
11428
- :host(.keyboard) input[type=radio]:focus + label {
11378
+ input[type=radio]:focus-visible + label {
11429
11379
  z-index: 1;
11430
11380
 
11431
11381
  outline: none;
11382
+
11432
11383
  box-shadow: var(---shadow-4);
11433
11384
  }
11434
11385
 
11435
- :host(.keyboard) input[type=radio]:focus:checked + label {
11386
+ input[type=radio]:focus-visible:checked + label {
11436
11387
  z-index: 1;
11437
11388
 
11438
- background-color: var(---color-element-selected);
11439
11389
  outline: none;
11390
+
11391
+ background-color: var(---color-element-selected);
11440
11392
  box-shadow: var(---shadow-4);
11441
11393
  }
11442
11394
 
11443
- :host(.keyboard) input[type=radio]:focus + label:active {
11395
+ input[type=radio]:focus-visible + label:active {
11444
11396
  z-index: 2;
11445
11397
 
11446
11398
  outline: none;
11399
+
11447
11400
  box-shadow: var(---shadow-8);
11448
11401
  }
11449
11402
  `];
@@ -11923,6 +11876,7 @@ class DiscountableResponse extends DiscountableElement {
11923
11876
 
11924
11877
  width: 5.25rem;
11925
11878
  height: 3.5rem;
11879
+
11926
11880
  padding: 0.375rem 0.75rem;
11927
11881
  margin: 0.25rem;
11928
11882
 
@@ -12448,11 +12402,13 @@ class HTDEquation extends DiscountableElement {
12448
12402
 
12449
12403
  .addend {
12450
12404
  position: relative;
12405
+
12451
12406
  display: inline-block;
12452
12407
  }
12453
12408
 
12454
12409
  .comparison {
12455
12410
  position: relative;
12411
+
12456
12412
  display: inline-block;
12457
12413
 
12458
12414
  font-size: 125%;
@@ -13016,8 +12972,9 @@ class HTDCurves extends DecidablesMixinResizeable(DiscountableElement) {
13016
12972
  }
13017
12973
 
13018
12974
  .option .interactive {
13019
- filter: url("#shadow-2");
13020
12975
  outline: none;
12976
+
12977
+ filter: url("#shadow-2");
13021
12978
  }
13022
12979
 
13023
12980
  .option .interactive:hover {
@@ -13035,7 +12992,7 @@ class HTDCurves extends DecidablesMixinResizeable(DiscountableElement) {
13035
12992
  transform: translateY(0);
13036
12993
  }
13037
12994
 
13038
- :host(.keyboard) .option .interactive:focus-within {
12995
+ .option .interactive:focus-visible {
13039
12996
  filter: url("#shadow-8");
13040
12997
 
13041
12998
  /* HACK: This gets Safari to correctly apply the filter! */
@@ -13056,7 +13013,7 @@ class HTDCurves extends DecidablesMixinResizeable(DiscountableElement) {
13056
13013
  transform: translateY(0);
13057
13014
  }
13058
13015
 
13059
- :host(.keyboard) .body.interactive:has(~ .point:focus-within) {
13016
+ .body.interactive:has(~ .point:focus-visible) {
13060
13017
  filter: url("#shadow-8");
13061
13018
 
13062
13019
  /* HACK: This gets Safari to correctly apply the filter! */
@@ -13089,7 +13046,6 @@ class HTDCurves extends DecidablesMixinResizeable(DiscountableElement) {
13089
13046
 
13090
13047
  .interactive .fill {
13091
13048
  cursor: move;
13092
-
13093
13049
  outline: none;
13094
13050
  }
13095
13051
 
@@ -13117,7 +13073,6 @@ class HTDCurves extends DecidablesMixinResizeable(DiscountableElement) {
13117
13073
 
13118
13074
  .interactive .bar {
13119
13075
  cursor: ew-resize;
13120
-
13121
13076
  outline: none;
13122
13077
  }
13123
13078
 
@@ -13131,14 +13086,13 @@ class HTDCurves extends DecidablesMixinResizeable(DiscountableElement) {
13131
13086
  font-size: 0.75rem;
13132
13087
 
13133
13088
  dominant-baseline: middle;
13134
- text-anchor: middle;
13135
13089
 
13090
+ text-anchor: middle;
13136
13091
  fill: var(---color-text-inverse);
13137
13092
  }
13138
13093
 
13139
13094
  .point.interact {
13140
13095
  cursor: ns-resize;
13141
-
13142
13096
  outline: none;
13143
13097
  }
13144
13098
 
@@ -13150,7 +13104,6 @@ class HTDCurves extends DecidablesMixinResizeable(DiscountableElement) {
13150
13104
 
13151
13105
  .curve.interactive {
13152
13106
  cursor: nwse-resize;
13153
-
13154
13107
  outline: none;
13155
13108
  }
13156
13109
 
@@ -13162,8 +13115,8 @@ class HTDCurves extends DecidablesMixinResizeable(DiscountableElement) {
13162
13115
 
13163
13116
  @media (pointer: coarse) {
13164
13117
  .interactive .touch {
13165
- stroke-linecap: round;
13166
13118
  stroke-width: 12;
13119
+ stroke-linecap: round;
13167
13120
  }
13168
13121
  }
13169
13122
  `];
@@ -23160,6 +23113,7 @@ class HTDParameters extends DiscountableElement {
23160
23113
 
23161
23114
  decidables-slider {
23162
23115
  line-height: 1;
23116
+
23163
23117
  text-align: center;
23164
23118
  }
23165
23119
 
@@ -23246,8 +23200,8 @@ class ITCOption extends DiscountableElement {
23246
23200
 
23247
23201
  width: 100%;
23248
23202
  height: 100%;
23203
+
23249
23204
  overflow: visible;
23250
-
23251
23205
 
23252
23206
  background: var(---color-element-background);
23253
23207
  border: 2px solid var(---color-element-emphasis);