@decidables/detectable-elements 0.5.0 → 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.
@@ -5962,18 +5962,6 @@ class DecidablesElement extends i {
5962
5962
  getComputedStyleValue(property) {
5963
5963
  return getComputedStyle(this).getPropertyValue(property).trim();
5964
5964
  }
5965
- firstUpdated(changedProperties) {
5966
- super.firstUpdated(changedProperties);
5967
-
5968
- // Use focus highlighting if keyboard is used at all
5969
- select(this.renderRoot.host).classed('keyboard', true).on('mousemove.keyboard touchstart.keyboard', event => {
5970
- const element = event.currentTarget;
5971
- select(element.renderRoot.host).classed('keyboard', false).on('mousemove.keyboard touchstart.keyboard', null);
5972
- }).on('keydown.keyboard', event => {
5973
- const element = event.currentTarget;
5974
- select(element.renderRoot.host).classed('keyboard', true).on('keydown.keyboard mousemove.keyboard touchstart.keyboard', null);
5975
- });
5976
- }
5977
5965
  static get greys() {
5978
5966
  const grey = '#999999';
5979
5967
  const greys = {};
@@ -6109,7 +6097,7 @@ class DecidablesElement extends i {
6109
6097
  };
6110
6098
  /* eslint-enable key-spacing, object-curly-newline */
6111
6099
  }
6112
- static cssBoxShadow(elevation, rotate = false, inverse = false) {
6100
+ static cssBoxShadow(elevation, inverse = false) {
6113
6101
  const umbraO = this.shadows.opacityUmbra + this.shadows.opacityBoost;
6114
6102
  const penumbraO = this.shadows.opacityPenumbra + this.shadows.opacityBoost;
6115
6103
  const ambientO = this.shadows.opacityAmbient + this.shadows.opacityBoost;
@@ -6119,9 +6107,9 @@ class DecidablesElement extends i {
6119
6107
  const umbraM = this.shadows.mapUmbra[elevation];
6120
6108
  const penumbraM = this.shadows.mapPenumbra[elevation];
6121
6109
  const ambientM = this.shadows.mapAmbient[elevation];
6122
- 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`;
6123
- 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`;
6124
- 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`;
6110
+ const umbraS = `${umbraM.y / 2}px ${umbraM.y}px ${umbraM.b}px ${umbraM.s}px`;
6111
+ const penumbraS = `${penumbraM.y / 2}px ${penumbraM.y}px ${penumbraM.b}px ${penumbraM.s}px`;
6112
+ const ambientS = `${ambientM.y / 2}px ${ambientM.y}px ${ambientM.b}px ${ambientM.s}px`;
6125
6113
  return `${umbraS} ${umbraC}, ${penumbraS} ${penumbraC}, ${ambientS} ${ambientC}`;
6126
6114
  }
6127
6115
  static get svgFilters() {
@@ -6257,49 +6245,58 @@ class DecidablesButton extends DecidablesElement {
6257
6245
  button {
6258
6246
  width: 100%;
6259
6247
  height: 100%;
6248
+
6260
6249
  padding: 0.375rem 0.75rem;
6261
6250
 
6262
6251
  font-family: var(---font-family-base);
6263
6252
  font-size: 1.125rem;
6253
+
6264
6254
  line-height: 1.5;
6255
+
6265
6256
  color: var(---color-text-inverse);
6266
6257
 
6258
+ outline: none;
6259
+
6267
6260
  border: 0;
6268
6261
  border-radius: var(---border-radius);
6269
- outline: none;
6270
6262
  }
6271
6263
 
6272
6264
  button:disabled {
6273
- background-color: var(---decidables-button-background-color-disabled);
6274
6265
  outline: none;
6266
+
6267
+ background-color: var(---decidables-button-background-color-disabled);
6275
6268
  box-shadow: none;
6276
6269
  }
6277
6270
 
6278
6271
  button:enabled {
6279
6272
  cursor: pointer;
6273
+ outline: none;
6280
6274
 
6281
6275
  background-color: var(---decidables-button-background-color-enabled);
6282
- outline: none;
6283
6276
  box-shadow: var(---shadow-2);
6284
6277
  }
6285
6278
 
6286
6279
  button:enabled:hover {
6287
6280
  outline: none;
6281
+
6288
6282
  box-shadow: var(---shadow-4);
6289
6283
  }
6290
6284
 
6291
6285
  button:enabled:active {
6292
6286
  outline: none;
6287
+
6293
6288
  box-shadow: var(---shadow-8);
6294
6289
  }
6295
6290
 
6296
- :host(.keyboard) button:enabled:focus {
6291
+ button:enabled:focus-visible {
6297
6292
  outline: none;
6293
+
6298
6294
  box-shadow: var(---shadow-4);
6299
6295
  }
6300
6296
 
6301
- :host(.keyboard) button:enabled:focus:active {
6297
+ button:enabled:focus-visible:active {
6302
6298
  outline: none;
6299
+
6303
6300
  box-shadow: var(---shadow-8);
6304
6301
  }
6305
6302
  `];
@@ -6416,10 +6413,6 @@ class DecidablesSlider extends DecidablesElement {
6416
6413
  ---decidables-slider-color: var(--decidables-slider-color, var(---color-element-enabled));
6417
6414
  ---decidables-spinner-background-color: var(--decidables-slider-background-color, none);
6418
6415
 
6419
- ---shadow-2-rotate: var(--shadow-2-rotate, ${r$2(this.cssBoxShadow(2, true, false))});
6420
- ---shadow-4-rotate: var(--shadow-4-rotate, ${r$2(this.cssBoxShadow(4, true, false))});
6421
- ---shadow-8-rotate: var(--shadow-8-rotate, ${r$2(this.cssBoxShadow(8, true, false))});
6422
-
6423
6416
  display: flex;
6424
6417
 
6425
6418
  flex-direction: column;
@@ -6434,12 +6427,14 @@ class DecidablesSlider extends DecidablesElement {
6434
6427
 
6435
6428
  .range {
6436
6429
  position: relative;
6430
+
6437
6431
  display: flex;
6438
6432
 
6439
6433
  flex-direction: row;
6440
6434
 
6441
6435
  width: 3.5rem;
6442
6436
  height: 4.75rem;
6437
+
6443
6438
  margin: 0 0.25rem 0.25rem;
6444
6439
  }
6445
6440
 
@@ -6451,21 +6446,20 @@ class DecidablesSlider extends DecidablesElement {
6451
6446
  background: var(---decidables-spinner-background-color);
6452
6447
  }
6453
6448
 
6454
- /* Adapted from http://danielstern.ca/range.css/#/ */
6455
6449
  /* Overall */
6456
6450
  input[type=range] {
6457
- width: 4.75rem;
6458
- height: 3.5rem;
6451
+ width: 3.5rem;
6452
+ height: 4.75rem;
6453
+
6459
6454
  padding: 0;
6460
6455
  margin: 0;
6456
+
6457
+ appearance: none;
6461
6458
 
6462
6459
  background-color: unset;
6463
6460
 
6464
- transform: rotate(-90deg);
6465
- transform-origin: 2.375rem 2.375rem;
6466
-
6467
- /* stylelint-disable-next-line property-no-vendor-prefix */
6468
- -webkit-appearance: none;
6461
+ direction: rtl;
6462
+ writing-mode: vertical-lr;
6469
6463
  }
6470
6464
 
6471
6465
  input[type=range]:enabled {
@@ -6476,16 +6470,10 @@ class DecidablesSlider extends DecidablesElement {
6476
6470
  outline: none;
6477
6471
  }
6478
6472
 
6479
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
6480
- input[type=range]::-ms-tooltip {
6481
- display: none;
6482
- }
6483
-
6484
6473
  /* Track */
6485
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
6486
6474
  input[type=range]::-webkit-slider-runnable-track {
6487
- width: 100%;
6488
- height: 4px;
6475
+ width: 4px;
6476
+ height: 100%;
6489
6477
 
6490
6478
  background: var(---decidables-slider-background-color);
6491
6479
  border: 0;
@@ -6497,10 +6485,9 @@ class DecidablesSlider extends DecidablesElement {
6497
6485
  background: var(---decidables-slider-background-color);
6498
6486
  }
6499
6487
 
6500
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
6501
6488
  input[type=range]::-moz-range-track {
6502
- width: 100%;
6503
- height: 4px;
6489
+ width: 4px;
6490
+ height: 100%;
6504
6491
 
6505
6492
  background: var(---decidables-slider-background-color);
6506
6493
  border: 0;
@@ -6508,57 +6495,17 @@ class DecidablesSlider extends DecidablesElement {
6508
6495
  box-shadow: none;
6509
6496
  }
6510
6497
 
6511
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
6512
- input[type=range]::-ms-track {
6513
- width: 100%;
6514
- height: 4px;
6515
-
6516
- color: transparent;
6517
-
6518
- background: transparent;
6519
- border-color: transparent;
6520
- }
6521
-
6522
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
6523
- input[type=range]::-ms-fill-lower {
6524
- background: #cccccc;
6525
- /* background: var(---decidables-slider-background-color); */
6526
- border: 0;
6527
- border-radius: 2px;
6528
- box-shadow: none;
6529
- }
6530
-
6531
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
6532
- input[type=range]::-ms-fill-upper {
6533
- background: #cccccc;
6534
- /* background: var(---decidables-slider-background-color); */
6535
- border: 0;
6536
- border-radius: 2px;
6537
- box-shadow: none;
6538
- }
6539
-
6540
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
6541
- input[type=range]:focus::-ms-fill-lower {
6542
- background: var(---decidables-slider-background-color);
6543
- }
6544
-
6545
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
6546
- input[type=range]:focus::-ms-fill-upper {
6547
- background: var(---decidables-slider-background-color);
6548
- }
6549
-
6550
6498
  /* Thumb */
6551
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
6552
6499
  input[type=range]::-webkit-slider-thumb {
6553
- width: 10px;
6554
- height: 20px;
6555
- margin-top: -8px;
6500
+ width: 20px;
6501
+ height: 10px;
6502
+
6503
+ margin-left: -8px;
6504
+
6505
+ appearance: none;
6556
6506
 
6557
6507
  border: 0;
6558
6508
  border-radius: 4px;
6559
-
6560
- /* stylelint-disable-next-line property-no-vendor-prefix */
6561
- -webkit-appearance: none;
6562
6509
  }
6563
6510
 
6564
6511
  input[type=range]:disabled::-webkit-slider-thumb {
@@ -6568,112 +6515,65 @@ class DecidablesSlider extends DecidablesElement {
6568
6515
 
6569
6516
  input[type=range]:enabled::-webkit-slider-thumb {
6570
6517
  background: var(---decidables-slider-color);
6571
- box-shadow: var(---shadow-2-rotate);
6518
+ box-shadow: var(---shadow-2);
6572
6519
  }
6573
6520
 
6574
6521
  input[type=range]:enabled:hover::-webkit-slider-thumb {
6575
- box-shadow: var(---shadow-4-rotate);
6522
+ box-shadow: var(---shadow-4);
6576
6523
  }
6577
6524
 
6578
6525
  input[type=range]:enabled:active::-webkit-slider-thumb {
6579
- box-shadow: var(---shadow-8-rotate);
6526
+ box-shadow: var(---shadow-8);
6580
6527
  }
6581
6528
 
6582
- :host(.keyboard) input[type=range]:enabled:focus::-webkit-slider-thumb {
6583
- box-shadow: var(---shadow-4-rotate);
6529
+ input[type=range]:enabled:focus-visible::-webkit-slider-thumb {
6530
+ box-shadow: var(---shadow-4);
6584
6531
  }
6585
6532
 
6586
- :host(.keyboard) input[type=range]:focus:active::-webkit-slider-thumb {
6587
- box-shadow: var(---shadow-8-rotate);
6533
+ input[type=range]:enabled:focus-visible:active::-webkit-slider-thumb {
6534
+ box-shadow: var(---shadow-8);
6588
6535
  }
6589
6536
 
6590
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
6591
6537
  input[type=range]::-moz-range-thumb {
6592
- width: 10px;
6593
- height: 20px;
6538
+ width: 20px;
6539
+ height: 10px;
6594
6540
 
6595
6541
  border: 0;
6596
6542
  border-radius: 4px;
6597
6543
  }
6598
6544
 
6599
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
6600
6545
  input[type=range]:disabled::-moz-range-thumb {
6601
6546
  background: var(---decidables-slider-background-color);
6602
6547
  box-shadow: none;
6603
6548
  }
6604
6549
 
6605
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
6606
6550
  input[type=range]:enabled::-moz-range-thumb {
6607
6551
  background: var(---decidables-slider-color);
6608
- box-shadow: var(---shadow-2-rotate);
6552
+ box-shadow: var(---shadow-2);
6609
6553
  }
6610
6554
 
6611
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
6612
6555
  input[type=range]:enabled:hover::-moz-range-thumb {
6613
- box-shadow: var(---shadow-4-rotate);
6556
+ box-shadow: var(---shadow-4);
6614
6557
  }
6615
6558
 
6616
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
6617
6559
  input[type=range]:enabled:active::-moz-range-thumb {
6618
- box-shadow: var(---shadow-8-rotate);
6619
- }
6620
-
6621
- :host(.keyboard) input[type=range]:enabled:focus::-moz-range-thumb {
6622
- box-shadow: var(---shadow-4-rotate);
6623
- }
6624
-
6625
- :host(.keyboard) input[type=range]:enabled:focus:active::-moz-range-thumb {
6626
- box-shadow: var(---shadow-8-rotate);
6627
- }
6628
-
6629
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
6630
- input[type=range]::-ms-thumb {
6631
- width: 10px;
6632
- height: 20px;
6633
- margin-top: 0;
6634
-
6635
- background: #999999;
6636
- /* background: var(---color-element-enabled); */
6637
- border: 0;
6638
- border-radius: 4px;
6639
- box-shadow: var(---shadow-2-rotate);
6640
- }
6641
-
6642
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
6643
- input[type=range]:disabled::-ms-thumb {
6644
- background: var(---decidables-slider-background-color);
6645
- box-shadow: none;
6646
- }
6647
-
6648
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
6649
- input[type=range]:enabled::-ms-thumb {
6650
- background: var(---decidables-slider-color);
6651
- box-shadow: var(---shadow-2-rotate);
6652
- }
6653
-
6654
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
6655
- input[type=range]:enabled:hover::-ms-thumb {
6656
- box-shadow: var(---shadow-4-rotate);
6657
- }
6658
-
6659
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
6660
- input[type=range]:enabled:active::-ms-thumb {
6661
- box-shadow: var(---shadow-8-rotate);
6560
+ box-shadow: var(---shadow-8);
6662
6561
  }
6663
6562
 
6664
- /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
6665
- :host(.keyboard) input[type=range]:enabled:focus::-ms-thumb {
6666
- box-shadow: var(---shadow-4-rotate);
6563
+ input[type=range]:enabled:focus-visible::-moz-range-thumb {
6564
+ box-shadow: var(---shadow-4);
6667
6565
  }
6668
6566
 
6669
- :host(.keyboard) input[type=range]:enabled:focus:active::-ms-thumb {
6670
- box-shadow: var(---shadow-8-rotate);
6567
+ input[type=range]:enabled:focus-visible:active::-moz-range-thumb {
6568
+ box-shadow: var(---shadow-8);
6671
6569
  }
6672
6570
 
6673
- datalist {
6571
+ /* Tick marks */
6572
+ .datalist {
6674
6573
  position: absolute;
6675
6574
  left: 2rem;
6676
6575
  z-index: -1;
6576
+
6677
6577
  display: flex;
6678
6578
 
6679
6579
  flex-direction: column;
@@ -6686,14 +6586,13 @@ class DecidablesSlider extends DecidablesElement {
6686
6586
  font-size: 0.75rem;
6687
6587
  }
6688
6588
 
6689
- option {
6690
- padding: 0;
6691
-
6589
+ .option {
6692
6590
  line-height: 0.8;
6693
- min-block-size: 0;
6591
+
6592
+ white-space: nowrap;
6694
6593
  }
6695
6594
 
6696
- option::before {
6595
+ .option::before {
6697
6596
  content: "– ";
6698
6597
  }
6699
6598
  `];
@@ -6706,10 +6605,10 @@ class DecidablesSlider extends DecidablesElement {
6706
6605
  <div class="range">
6707
6606
  <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)}>
6708
6607
  ${this.scale ? x$1`
6709
- <datalist id="ticks">
6710
- <option value=${o(this.rangeMax)} label=${o(this.max)}></option>
6711
- <option value=${o(this.rangeMin)} label=${o(this.min)}></option>
6712
- </datalist>
6608
+ <div class="datalist">
6609
+ <div class="option">${o(this.max)}</div>
6610
+ <div class="option">${o(this.min)}</div>
6611
+ </div>
6713
6612
  ` : x$1``}
6714
6613
  </div>
6715
6614
  <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>
@@ -6769,13 +6668,14 @@ class DecidablesSpinner extends DecidablesElement {
6769
6668
  ---decidables-spinner-prefix: var(--decidables-spinner-prefix, "");
6770
6669
 
6771
6670
  ---decidables-spinner-postfix: var(--decidables-spinner-postfix, "");
6772
- ---decidables-spinner-postfix-padding: var(--decidables-spinner-postfix-padding, 0);
6671
+ ---decidables-spinner-postfix-padding: var(--decidables-spinner-postfix-padding, 0rem);
6773
6672
 
6774
6673
  display: block;
6775
6674
  }
6776
6675
 
6777
6676
  label {
6778
6677
  position: relative;
6678
+
6779
6679
  display: flex;
6780
6680
 
6781
6681
  flex-direction: column;
@@ -6793,6 +6693,7 @@ class DecidablesSpinner extends DecidablesElement {
6793
6693
  left: calc(50% - var(---decidables-spinner-input-width) / 2 + 0.25rem);
6794
6694
 
6795
6695
  font-size: var(---decidables-spinner-font-size);
6696
+
6796
6697
  line-height: normal;
6797
6698
 
6798
6699
  content: var(---decidables-spinner-prefix);
@@ -6804,6 +6705,7 @@ class DecidablesSpinner extends DecidablesElement {
6804
6705
  bottom: 1px;
6805
6706
 
6806
6707
  font-size: var(---decidables-spinner-font-size);
6708
+
6807
6709
  line-height: normal;
6808
6710
 
6809
6711
  content: var(---decidables-spinner-postfix);
@@ -6811,20 +6713,24 @@ class DecidablesSpinner extends DecidablesElement {
6811
6713
 
6812
6714
  input[type=number] {
6813
6715
  width: var(---decidables-spinner-input-width);
6814
- padding-right: var(---decidables-spinner-postfix-padding);
6716
+
6717
+ padding: 1px var(---decidables-spinner-postfix-padding) 1px 2px;
6718
+ margin: 0;
6815
6719
 
6816
6720
  font-family: var(---font-family-base);
6817
6721
  font-size: var(---decidables-spinner-font-size);
6722
+
6818
6723
  color: inherit;
6724
+
6819
6725
  text-align: right;
6820
6726
 
6727
+ appearance: none;
6728
+ outline: none;
6729
+
6821
6730
  background: none;
6822
6731
  border: 0;
6823
6732
  border-radius: 0;
6824
- outline: none;
6825
6733
  box-shadow: var(---shadow-2);
6826
-
6827
- -webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */
6828
6734
  }
6829
6735
 
6830
6736
  input[type=number]:hover {
@@ -6841,20 +6747,54 @@ class DecidablesSpinner extends DecidablesElement {
6841
6747
 
6842
6748
  border: 0;
6843
6749
  box-shadow: none;
6750
+ }
6751
+
6752
+ /* HACK: Manage spinners in Firefox */
6753
+ @supports (-moz-appearance: textfield) {
6754
+ input[type=number] {
6755
+ padding-right: calc(18px + var(---decidables-spinner-postfix-padding));
6756
+
6757
+ appearance: textfield;
6758
+ }
6844
6759
 
6845
- /* HACK: Use correct text color in Safari */
6846
- -webkit-opacity: 1;
6847
- /* HACK: Hide spinners in disabled input for Firefox and Safari */
6848
- -moz-appearance: textfield; /* stylelint-disable-line property-no-vendor-prefix */
6849
- /* HACK: Use correct text color in Safari */
6850
- -webkit-text-fill-color: var(---color-text);
6760
+ input[type=number]:hover,
6761
+ input[type=number]:focus,
6762
+ input[type=number]:active {
6763
+ padding-right: var(---decidables-spinner-postfix-padding);
6764
+
6765
+ appearance: none;
6766
+ }
6767
+
6768
+ input[type=number]:disabled {
6769
+ padding-right: calc(18px + var(---decidables-spinner-postfix-padding));
6770
+
6771
+ appearance: textfield;
6772
+ }
6773
+ }
6774
+
6775
+ /* HACK: Manage spinners in Chrome/Edge/Safari */
6776
+ input[type=number]::-webkit-inner-spin-button {
6777
+ /* Avoid oversized spinners in Safari */
6778
+ font-size: 1.125rem;
6779
+
6780
+ opacity: 0;
6781
+ }
6782
+
6783
+ input[type=number]:hover::-webkit-inner-spin-button,
6784
+ input[type=number]:focus::-webkit-inner-spin-button,
6785
+ input[type=number]:active::-webkit-inner-spin-button {
6786
+ opacity: 1;
6851
6787
  }
6852
6788
 
6853
- /* HACK: Hide spinners in disabled input for Firefox and Safari */
6854
- input[type=number]:disabled::-webkit-outer-spin-button,
6855
6789
  input[type=number]:disabled::-webkit-inner-spin-button {
6856
- margin: 0;
6857
- -webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */
6790
+ opacity: 0;
6791
+ }
6792
+
6793
+ /* HACK: Adjust padding on mobile w/o spinners */
6794
+ @media only screen and (hover: none) and (pointer: coarse) {
6795
+ input[type=number] {
6796
+ padding-right: calc(1.125rem + var(---decidables-spinner-postfix-padding));
6797
+ }
6858
6798
  }
6859
6799
  `];
6860
6800
  }
@@ -6918,13 +6858,16 @@ class DecidablesSwitch extends DecidablesElement {
6918
6858
 
6919
6859
  width: 1px;
6920
6860
  height: 1px;
6861
+
6921
6862
  padding: 0;
6922
6863
  margin: -1px;
6864
+
6923
6865
  overflow: hidden;
6924
6866
 
6925
6867
  white-space: nowrap;
6926
6868
 
6927
6869
  border: 0;
6870
+
6928
6871
  clip-path: inset(100%); /* May cause a performance issue: https://github.com/h5bp/html5-boilerplate/issues/2021 */
6929
6872
  }
6930
6873
 
@@ -6940,6 +6883,7 @@ class DecidablesSwitch extends DecidablesElement {
6940
6883
  position: relative;
6941
6884
 
6942
6885
  min-width: 24px;
6886
+
6943
6887
  padding: 0 0 36px;
6944
6888
  margin: 0.25rem 0.25rem 0;
6945
6889
 
@@ -6951,17 +6895,17 @@ class DecidablesSwitch extends DecidablesElement {
6951
6895
  input[type=checkbox] + label + label::before,
6952
6896
  input[type=checkbox] + label + label::after {
6953
6897
  position: absolute;
6954
-
6955
6898
  left: 50%;
6956
6899
 
6957
6900
  margin: 0;
6958
6901
 
6959
- content: "";
6960
-
6961
6902
  outline: 0;
6962
6903
 
6963
- transition: all var(---transition-duration) ease;
6904
+ content: "";
6905
+
6964
6906
  transform: translate(-50%, 0);
6907
+
6908
+ transition: all var(---transition-duration) ease;
6965
6909
  }
6966
6910
 
6967
6911
  input[type=checkbox] + label + label::before {
@@ -7009,17 +6953,14 @@ class DecidablesSwitch extends DecidablesElement {
7009
6953
  box-shadow: var(---shadow-8);
7010
6954
  }
7011
6955
 
7012
- /* stylelint-disable-next-line selector-max-compound-selectors */
7013
- :host(.keyboard) input[type=checkbox]:enabled:focus + label + label::after {
6956
+ input[type=checkbox]:enabled:focus-visible + label + label::after {
7014
6957
  box-shadow: var(---shadow-4);
7015
6958
  }
7016
6959
 
7017
- /* stylelint-disable selector-max-compound-selectors */
7018
- :host(.keyboard) input[type=checkbox]:enabled:focus + label + label:active::after,
7019
- :host(.keyboard) input[type=checkbox]:enabled:focus:active + label + label::after {
6960
+ input[type=checkbox]:enabled:focus-visible + label + label:active::after,
6961
+ input[type=checkbox]:enabled:focus-visible:active + label + label::after {
7020
6962
  box-shadow: var(---shadow-8);
7021
6963
  }
7022
- /* stylelint-enable selector-max-compound-selectors */
7023
6964
  `];
7024
6965
  }
7025
6966
  render() {
@@ -7139,39 +7080,46 @@ class DecidablesToggleOption extends DecidablesElement {
7139
7080
 
7140
7081
  width: 1px;
7141
7082
  height: 1px;
7083
+
7142
7084
  padding: 0;
7143
7085
  margin: -1px;
7086
+
7144
7087
  overflow: hidden;
7145
7088
 
7146
7089
  white-space: nowrap;
7147
7090
 
7148
7091
  border: 0;
7092
+
7149
7093
  clip-path: inset(100%); /* May cause a performance issue: https://github.com/h5bp/html5-boilerplate/issues/2021 */
7150
7094
  }
7151
7095
 
7152
7096
  input[type=radio] + label {
7153
7097
  width: 100%;
7098
+
7154
7099
  padding: 0.375rem 0.75rem;
7155
7100
 
7156
7101
  font-family: var(---font-family-base);
7157
7102
  font-size: 1.125rem;
7103
+
7158
7104
  line-height: 1.5;
7105
+
7159
7106
  color: var(---color-text-inverse);
7107
+
7160
7108
  text-align: center;
7161
7109
 
7162
7110
  cursor: pointer;
7111
+ outline: none;
7163
7112
 
7164
7113
  background-color: var(---color-element-enabled);
7165
7114
  border: 0;
7166
7115
  border-radius: 0;
7167
- outline: none;
7168
-
7169
7116
  box-shadow: var(---shadow-2);
7170
7117
  }
7171
7118
 
7172
7119
  input[type=radio]:checked + label {
7173
- background-color: var(---color-element-selected);
7174
7120
  outline: none;
7121
+
7122
+ background-color: var(---color-element-selected);
7175
7123
  box-shadow: var(---shadow-2);
7176
7124
  }
7177
7125
 
@@ -7179,6 +7127,7 @@ class DecidablesToggleOption extends DecidablesElement {
7179
7127
  z-index: 1;
7180
7128
 
7181
7129
  outline: none;
7130
+
7182
7131
  box-shadow: var(---shadow-4);
7183
7132
  }
7184
7133
 
@@ -7186,6 +7135,7 @@ class DecidablesToggleOption extends DecidablesElement {
7186
7135
  z-index: 2;
7187
7136
 
7188
7137
  outline: none;
7138
+
7189
7139
  box-shadow: var(---shadow-8);
7190
7140
  }
7191
7141
 
@@ -7199,25 +7149,28 @@ class DecidablesToggleOption extends DecidablesElement {
7199
7149
  border-bottom-left-radius: 0.25rem;
7200
7150
  }
7201
7151
 
7202
- :host(.keyboard) input[type=radio]:focus + label {
7152
+ input[type=radio]:focus-visible + label {
7203
7153
  z-index: 1;
7204
7154
 
7205
7155
  outline: none;
7156
+
7206
7157
  box-shadow: var(---shadow-4);
7207
7158
  }
7208
7159
 
7209
- :host(.keyboard) input[type=radio]:focus:checked + label {
7160
+ input[type=radio]:focus-visible:checked + label {
7210
7161
  z-index: 1;
7211
7162
 
7212
- background-color: var(---color-element-selected);
7213
7163
  outline: none;
7164
+
7165
+ background-color: var(---color-element-selected);
7214
7166
  box-shadow: var(---shadow-4);
7215
7167
  }
7216
7168
 
7217
- :host(.keyboard) input[type=radio]:focus + label:active {
7169
+ input[type=radio]:focus-visible + label:active {
7218
7170
  z-index: 2;
7219
7171
 
7220
7172
  outline: none;
7173
+
7221
7174
  box-shadow: var(---shadow-8);
7222
7175
  }
7223
7176
  `];
@@ -7926,6 +7879,7 @@ class DetectableResponse extends DetectableElement {
7926
7879
 
7927
7880
  width: 6rem;
7928
7881
  height: 3.5rem;
7882
+
7929
7883
  padding: 0.375rem 0.75rem;
7930
7884
  margin: 0.25rem;
7931
7885
 
@@ -7972,6 +7926,7 @@ class DetectableResponse extends DetectableElement {
7972
7926
 
7973
7927
  .feedback .outcome {
7974
7928
  font-weight: 600;
7929
+
7975
7930
  line-height: 1.15;
7976
7931
  }
7977
7932
 
@@ -12796,6 +12751,7 @@ class DetectableTable extends DetectableElement {
12796
12751
  /* Labels */
12797
12752
  .payoff {
12798
12753
  font-weight: 600;
12754
+
12799
12755
  line-height: 0.75rem;
12800
12756
  }
12801
12757
 
@@ -16241,9 +16197,9 @@ class ROCSpace extends DecidablesMixinResizeable(DetectableElement) {
16241
16197
 
16242
16198
  .point.interactive {
16243
16199
  cursor: move;
16200
+ outline: none;
16244
16201
 
16245
16202
  filter: url("#shadow-2");
16246
- outline: none;
16247
16203
 
16248
16204
  /* HACK: This gets Safari to correctly apply the filter! */
16249
16205
  /* https://github.com/emilbjorklund/svg-weirdness/issues/27 */
@@ -16266,7 +16222,7 @@ class ROCSpace extends DecidablesMixinResizeable(DetectableElement) {
16266
16222
  stroke: #00ff00;
16267
16223
  }
16268
16224
 
16269
- :host(.keyboard) .point.interactive:focus {
16225
+ .point.interactive:focus-visible {
16270
16226
  filter: url("#shadow-8");
16271
16227
 
16272
16228
  /* HACK: This gets Safari to correctly apply the filter! */
@@ -16305,8 +16261,8 @@ class ROCSpace extends DecidablesMixinResizeable(DetectableElement) {
16305
16261
 
16306
16262
  .diagonal {
16307
16263
  stroke: var(---color-element-border);
16308
- stroke-dasharray: 4;
16309
16264
  stroke-width: 1;
16265
+ stroke-dasharray: 4;
16310
16266
  }
16311
16267
 
16312
16268
  .curve-iso-d {
@@ -16331,8 +16287,8 @@ class ROCSpace extends DecidablesMixinResizeable(DetectableElement) {
16331
16287
  font-size: 0.75rem;
16332
16288
 
16333
16289
  dominant-baseline: central;
16334
- text-anchor: middle;
16335
16290
 
16291
+ text-anchor: middle;
16336
16292
  fill: var(---color-text-inverse);
16337
16293
  }
16338
16294
 
@@ -16344,8 +16300,8 @@ class ROCSpace extends DecidablesMixinResizeable(DetectableElement) {
16344
16300
 
16345
16301
  @media (pointer: coarse) {
16346
16302
  .interactive .touch {
16347
- stroke-linecap: round;
16348
16303
  stroke-width: 12;
16304
+ stroke-linecap: round;
16349
16305
  }
16350
16306
  }
16351
16307
  `];
@@ -17105,16 +17061,16 @@ class SDTModel extends DecidablesMixinResizeable(DetectableElement) {
17105
17061
  .signal.interactive,
17106
17062
  .threshold.interactive {
17107
17063
  cursor: ew-resize;
17064
+ outline: none;
17108
17065
 
17109
17066
  filter: url("#shadow-2");
17110
- outline: none;
17111
17067
  }
17112
17068
 
17113
17069
  .signal.unequal {
17114
17070
  cursor: ns-resize;
17071
+ outline: none;
17115
17072
 
17116
17073
  filter: url("#shadow-2");
17117
- outline: none;
17118
17074
  }
17119
17075
 
17120
17076
  .signal.interactive.unequal {
@@ -17142,10 +17098,10 @@ class SDTModel extends DecidablesMixinResizeable(DetectableElement) {
17142
17098
  transform: translateY(0);
17143
17099
  }
17144
17100
 
17145
- :host(.keyboard) .noise.interactive:focus,
17146
- :host(.keyboard) .signal.interactive:focus,
17147
- :host(.keyboard) .signal.unequal:focus,
17148
- :host(.keyboard) .threshold.interactive:focus {
17101
+ .noise.interactive:focus-visible,
17102
+ .signal.interactive:focus-visible,
17103
+ .signal.unequal:focus-visible,
17104
+ .threshold.interactive:focus-visible {
17149
17105
  filter: url("#shadow-8");
17150
17106
 
17151
17107
  /* HACK: This gets Safari to correctly apply the filter! */
@@ -17310,8 +17266,8 @@ class SDTModel extends DecidablesMixinResizeable(DetectableElement) {
17310
17266
 
17311
17267
  @media (pointer: coarse) {
17312
17268
  .interactive .touch {
17313
- stroke-linecap: round;
17314
17269
  stroke-width: 12;
17270
+ stroke-linecap: round;
17315
17271
  }
17316
17272
  }
17317
17273
  `];
@@ -18196,7 +18152,7 @@ customElements.define('sdt-model', SDTModel);
18196
18152
 
18197
18153
  /*
18198
18154
  SDTParameters element
18199
- <sdt-paramters>
18155
+ <sdt-parameters>
18200
18156
 
18201
18157
  Attributes:
18202
18158
 
@@ -18273,6 +18229,7 @@ class SDTParameters extends DetectableElement {
18273
18229
 
18274
18230
  decidables-slider {
18275
18231
  line-height: 1;
18232
+
18276
18233
  text-align: center;
18277
18234
  }
18278
18235