@ni/ok-components 0.3.5 → 0.3.7

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.
@@ -17712,13 +17712,14 @@
17712
17712
  background-color: transparent;
17713
17713
  cursor: pointer;
17714
17714
  outline: none;
17715
- --ni-private-step-icon-background-full-size: 100% 100%;
17716
- ${'' /* 6px = (2px icon border + 1px inset) * 2 sides */}
17717
- --ni-private-step-icon-background-inset-size: calc(100% - 6px) calc(100% - 6px);
17718
- --ni-private-step-icon-background-none-size: 0% 0%;
17715
+ --ni-private-step-icon-background-full-size: scale(1,1);
17716
+ ${'' /* (32px - 2 * (2px focus border + 1px inset gap)) / 32px = .8125 */}
17717
+ --ni-private-step-icon-background-inset-size: scale(0.8125, 0.8125);
17718
+ --ni-private-step-icon-background-none-size: scale(0,0);
17719
17719
 
17720
17720
  --ni-private-step-icon-color: ${buttonLabelFontColor};
17721
17721
  --ni-private-step-icon-border-color: transparent;
17722
+ --ni-private-step-icon-border-width: 1px;
17722
17723
  --ni-private-step-icon-background-color: rgba(${borderRgbPartialColor}, 0.1);
17723
17724
  --ni-private-step-icon-background-size: var(--ni-private-step-icon-background-full-size);
17724
17725
  --ni-private-step-icon-outline-inset-color: transparent;
@@ -17821,6 +17822,20 @@ Defines an interaction area clip-path that leaves out the severity text so it is
17821
17822
  --ni-private-step-line-color: ${borderHoverColor};
17822
17823
  }
17823
17824
 
17825
+ .icon-background {
17826
+ grid-area: icon;
17827
+ display: inline-block;
17828
+ height: ${controlHeight};
17829
+ width: ${controlHeight};
17830
+ ${userSelectNone$1};
17831
+ background-color: var(--ni-private-step-icon-background-color);
17832
+ transform: var(--ni-private-step-icon-background-size);
17833
+ border: none;
17834
+ border-radius: 100%;
17835
+ transition:
17836
+ transform ${smallDelay} ease-in-out;
17837
+ }
17838
+
17824
17839
  .icon {
17825
17840
  grid-area: icon;
17826
17841
  display: inline-flex;
@@ -17833,31 +17848,16 @@ Defines an interaction area clip-path that leaves out the severity text so it is
17833
17848
  font: ${buttonLabelFont};
17834
17849
  color: var(--ni-private-step-icon-color);
17835
17850
  ${iconColor.cssCustomProperty}: var(--ni-private-step-icon-color);
17836
- border-style: solid;
17851
+ border: none;
17837
17852
  border-radius: 100%;
17838
- border-color: var(--ni-private-step-icon-border-color);
17839
- border-width: 1px;
17840
- background-image: radial-gradient(
17841
- closest-side,
17842
- ${'' /* Workaround to prevent aliasing on radial-gradient boundaries, see:
17843
- https://frontendmasters.com/blog/obsessing-over-smooth-radial-gradient-disc-edges
17844
- */}
17845
- var(--ni-private-step-icon-background-color) calc(100% - 1px/var(--ni-private-device-pixel-ratio, 1)),
17846
- transparent 100%
17847
- );
17848
- background-origin: border-box;
17849
- background-size: var(--ni-private-step-icon-background-size);
17850
- background-repeat: no-repeat;
17851
- background-position: center center;
17853
+ box-shadow: inset 0px 0px 0px var(--ni-private-step-icon-border-width) var(--ni-private-step-icon-border-color);
17852
17854
  position: relative;
17853
17855
  transition:
17854
- border-color ${smallDelay} ease-in-out,
17855
- border-width ${smallDelay} ease-in-out,
17856
- background-size ${smallDelay} ease-out;
17856
+ box-shadow ${smallDelay} ease-in-out;
17857
17857
  }
17858
17858
 
17859
17859
  :host([selected]) .icon {
17860
- border-width: 2px;
17860
+ --ni-private-step-icon-border-width: 2px;
17861
17861
  }
17862
17862
 
17863
17863
  .icon::before {
@@ -17870,10 +17870,9 @@ Defines an interaction area clip-path that leaves out the severity text so it is
17870
17870
  outline-style: solid;
17871
17871
  outline-width: 0px;
17872
17872
  outline-offset: 0px;
17873
- border: 1px solid transparent;
17873
+ border: none;
17874
17874
  border-radius: 100%;
17875
17875
  color: transparent;
17876
- background-clip: border-box;
17877
17876
  transition:
17878
17877
  outline-color ${smallDelay} ease-in-out,
17879
17878
  outline-width ${smallDelay} ease-in-out,
@@ -18025,7 +18024,7 @@ Defines an interaction area clip-path that leaves out the severity text so it is
18025
18024
  }
18026
18025
 
18027
18026
  .control:hover .icon {
18028
- border-width: 2px;
18027
+ --ni-private-step-icon-border-width: 2px;
18029
18028
  }
18030
18029
 
18031
18030
  .control:hover .line {
@@ -18076,12 +18075,13 @@ Defines an interaction area clip-path that leaves out the severity text so it is
18076
18075
  }
18077
18076
 
18078
18077
  .control${focusVisible} .icon {
18079
- border-width: 2px;
18078
+ --ni-private-step-icon-border-width: 2px;
18080
18079
  }
18081
18080
 
18082
18081
  .control${focusVisible} .icon::before {
18083
18082
  outline-width: ${borderWidth};
18084
- outline-offset: -2px;
18083
+ ${'' /* -1px control to outline edge -2px focus border -1px inset gap */}
18084
+ outline-offset: -4px;
18085
18085
  }
18086
18086
 
18087
18087
  .control${focusVisible} .line {
@@ -18128,7 +18128,7 @@ Defines an interaction area clip-path that leaves out the severity text so it is
18128
18128
  }
18129
18129
 
18130
18130
  .control:active .icon {
18131
- border-width: 2px;
18131
+ --ni-private-step-icon-border-width: 2px;
18132
18132
  }
18133
18133
 
18134
18134
  .control:active .icon::before {
@@ -19462,6 +19462,7 @@ Defines an interaction area clip-path that leaves out the severity text so it is
19462
19462
  aria-roledescription="${x => x.ariaRoledescription}"
19463
19463
  ${ref('control')}
19464
19464
  >
19465
+ <div class="icon-background"></div>
19465
19466
  <div class="icon">
19466
19467
  <span class="current-label">${x => (x.selected ? popupIconCurrentLabel.getValueFor(x) : '')}</span>
19467
19468
  <div class="step-indicator"><slot name="step-indicator"><span aria-hidden="true">${x => x.stepInternals.position}</span></slot></div>
@@ -66453,6 +66454,7 @@ ${nextLine.slice(indentLevel + 2)}`;
66453
66454
  aria-roledescription="${x => x.ariaRoledescription}"
66454
66455
  ${ref('control')}
66455
66456
  >
66457
+ <div class="icon-background"></div>
66456
66458
  <div class="icon">
66457
66459
  <span class="current-label">${x => (x.selected ? popupIconCurrentLabel.getValueFor(x) : '')}</span>
66458
66460
  <div class="step-indicator"><slot name="step-indicator"><span aria-hidden="true">${x => x.stepInternals.position}</span></slot></div>
@@ -66551,28 +66553,7 @@ ${nextLine.slice(indentLevel + 2)}`;
66551
66553
  }
66552
66554
  `;
66553
66555
 
66554
- /**
66555
- * Observable class to subscribe to changes in the page's device pixel ratio
66556
- * Based on: https://frontendmasters.com/blog/obsessing-over-smooth-radial-gradient-disc-edges/#the-less-code-and-more-flexible-js-solution
66557
- */
66558
- class DevicePixelRatio {
66559
- constructor() {
66560
- const update = () => {
66561
- this.current = window.devicePixelRatio;
66562
- window
66563
- .matchMedia(`(resolution: ${this.current}x)`)
66564
- .addEventListener('change', update, { once: true });
66565
- };
66566
- update();
66567
- }
66568
- }
66569
- __decorate([
66570
- observable
66571
- ], DevicePixelRatio.prototype, "current", void 0);
66572
- const devicePixelRatio = new DevicePixelRatio();
66573
-
66574
66556
  const template$w = html `<ol><slot
66575
- style="--ni-private-device-pixel-ratio: ${() => devicePixelRatio.current};"
66576
66557
  name="step"
66577
66558
  ${slotted('steps')}
66578
66559
  ></slot></ol>`;
@@ -98084,9 +98065,9 @@ focus outline in that case.
98084
98065
  }
98085
98066
 
98086
98067
  ::slotted([slot="end"]) {
98068
+ font: ${errorTextFont};
98087
98069
  color: ${placeholderFontColor};
98088
- font: ${controlLabelFont};
98089
- ${linkFont.cssCustomProperty}: ${controlLabelFont};
98070
+ ${linkFont.cssCustomProperty}: ${errorTextFont};
98090
98071
  ${linkFontColor.cssCustomProperty}: ${placeholderFontColor};
98091
98072
  }
98092
98073