@ni/ok-components 1.12.2 → 1.12.3

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.
@@ -108474,8 +108474,6 @@ focus outline in that case.
108474
108474
 
108475
108475
  :host {
108476
108476
  --ni-private-ok-fv-split-button-background-image: none;
108477
- --ni-private-ok-fv-split-button-background-size: 100% 100%;
108478
- --ni-private-ok-fv-split-button-background-size-emphasis: 100% 100%;
108479
108477
  --ni-private-ok-fv-split-button-border: rgba(${actionRgbPartialColor}, 0.3);
108480
108478
  --ni-private-ok-fv-split-button-color: ${buttonLabelFontColor};
108481
108479
  position: relative;
@@ -108493,7 +108491,6 @@ focus outline in that case.
108493
108491
  rgba(${borderRgbPartialColor}, 0.1)
108494
108492
  );
108495
108493
  --ni-private-ok-fv-split-button-border: rgba(${borderRgbPartialColor}, 0.1);
108496
- --ni-private-ok-fv-split-button-background-size-emphasis: calc(100% - 4px) calc(100% - 4px);
108497
108494
  }
108498
108495
 
108499
108496
  :host([appearance='outline'][appearance-variant='primary']) {
@@ -108530,6 +108527,16 @@ focus outline in that case.
108530
108527
  height: 100%;
108531
108528
  }
108532
108529
 
108530
+ .split-button-container::before {
108531
+ content: '';
108532
+ position: absolute;
108533
+ inset: 0;
108534
+ border: ${borderWidth} solid var(--ni-private-ok-fv-split-button-border);
108535
+ background-image: var(--ni-private-ok-fv-split-button-background-image);
108536
+ background-repeat: no-repeat;
108537
+ pointer-events: none;
108538
+ }
108539
+
108533
108540
  .split-button-primary,
108534
108541
  .split-button-toggle {
108535
108542
  appearance: none;
@@ -108538,12 +108545,12 @@ focus outline in that case.
108538
108545
  height: 100%;
108539
108546
  box-sizing: border-box;
108540
108547
  margin: 0;
108541
- border: ${borderWidth} solid var(--ni-private-ok-fv-split-button-border);
108548
+ border: ${borderWidth} solid transparent;
108542
108549
  background-color: transparent;
108543
- background-image: var(--ni-private-ok-fv-split-button-background-image);
108544
108550
  background-position: center;
108545
108551
  background-repeat: no-repeat;
108546
- background-size: var(--ni-private-ok-fv-split-button-background-size);
108552
+ background-origin: border-box;
108553
+ background-size: 100% 100%;
108547
108554
  color: var(--ni-private-ok-fv-split-button-color);
108548
108555
  fill: currentcolor;
108549
108556
  font: ${buttonLabelFont};
@@ -108568,7 +108575,7 @@ focus outline in that case.
108568
108575
 
108569
108576
  .split-button-primary {
108570
108577
  padding: 0 ${standardPadding};
108571
- border-inline-end-color: transparent;
108578
+ padding-inline-end: ${mediumPadding};
108572
108579
  white-space: nowrap;
108573
108580
  }
108574
108581
 
@@ -108578,8 +108585,17 @@ focus outline in that case.
108578
108585
  display: inline-flex;
108579
108586
  align-items: center;
108580
108587
  justify-content: center;
108581
- border-inline-start-color: var(--ni-private-ok-fv-split-button-border);
108582
- margin-inline-start: calc(-1 * ${borderWidth});
108588
+ padding: 0;
108589
+ }
108590
+
108591
+ .split-button-toggle::after {
108592
+ content: '';
108593
+ position: absolute;
108594
+ inset-block: ${smallPadding};
108595
+ inset-inline-start: calc(-1 * ${borderWidth});
108596
+ width: calc(2 * ${borderWidth});
108597
+ background: rgba(${borderRgbPartialColor}, 0.1);
108598
+ pointer-events: none;
108583
108599
  }
108584
108600
 
108585
108601
  .split-button-toggle > * {
@@ -108587,40 +108603,31 @@ focus outline in that case.
108587
108603
  ${iconColor.cssCustomProperty}: currentColor;
108588
108604
  }
108589
108605
 
108590
- :host([appearance='ghost']) .split-button-primary,
108591
- :host([appearance='ghost']) .split-button-toggle {
108592
- border-color: transparent;
108593
- box-shadow: none;
108594
- }
108595
-
108596
108606
  slot[name='menu']::slotted(*) {
108597
108607
  min-width: 100%;
108598
- margin: 4px 0 0;
108608
+ margin: ${smallPadding} 0 0;
108599
108609
  }
108600
108610
  }
108601
108611
 
108602
108612
  @layer hover {
108603
- .split-button-primary:hover,
108604
- .split-button-toggle:hover {
108613
+ .split-button-primary:enabled:hover,
108614
+ .split-button-toggle:enabled:hover {
108605
108615
  border-color: ${borderHoverColor};
108606
108616
  box-shadow: 0 0 0 ${borderWidth} ${borderHoverColor} inset;
108607
- background-size: var(--ni-private-ok-fv-split-button-background-size-emphasis);
108608
108617
  z-index: 1;
108609
108618
  }
108610
108619
 
108611
- :host([appearance='ghost']) .split-button-primary:hover,
108612
- :host([appearance='ghost']) .split-button-toggle:hover {
108613
- border-color: ${borderHoverColor};
108614
- box-shadow: 0 0 0 ${borderWidth} ${borderHoverColor} inset;
108620
+ .split-button-primary:enabled:hover + .split-button-toggle::after,
108621
+ .split-button-toggle:enabled:hover::after {
108622
+ visibility: hidden;
108615
108623
  }
108616
108624
  }
108617
108625
 
108618
108626
  @layer focusVisible {
108619
- .split-button-primary:focus-visible,
108620
- .split-button-toggle:focus-visible {
108627
+ .split-button-primary:enabled:focus-visible,
108628
+ .split-button-toggle:enabled:focus-visible {
108621
108629
  border-color: ${borderHoverColor};
108622
108630
  box-shadow: 0 0 0 ${borderWidth} ${borderHoverColor} inset;
108623
- background-size: var(--ni-private-ok-fv-split-button-background-size-emphasis);
108624
108631
  z-index: 1;
108625
108632
  }
108626
108633
 
@@ -108629,16 +108636,15 @@ focus outline in that case.
108629
108636
  outline: ${borderWidth} solid ${borderHoverColor};
108630
108637
  }
108631
108638
 
108632
- :host([appearance='ghost']) .split-button-primary:focus-visible,
108633
- :host([appearance='ghost']) .split-button-toggle:focus-visible {
108634
- border-color: ${borderHoverColor};
108635
- box-shadow: 0 0 0 ${borderWidth} ${borderHoverColor} inset;
108639
+ .split-button-primary:focus-visible + .split-button-toggle::after,
108640
+ .split-button-toggle:focus-visible::after {
108641
+ visibility: hidden;
108636
108642
  }
108637
108643
  }
108638
108644
 
108639
108645
  @layer active {
108640
- .split-button-primary:active,
108641
- .split-button-toggle:active,
108646
+ .split-button-primary:enabled:active,
108647
+ .split-button-toggle:enabled:active,
108642
108648
  :host([open]) .split-button-toggle {
108643
108649
  border-color: ${borderHoverColor};
108644
108650
  box-shadow: none;
@@ -108646,10 +108652,19 @@ focus outline in that case.
108646
108652
  background-size: calc(100% - 2px) calc(100% - 2px);
108647
108653
  }
108648
108654
 
108649
- :host([appearance='block']) .split-button-primary:active,
108650
- :host([appearance='block']) .split-button-toggle:active,
108655
+ :host([open]) .split-button-toggle {
108656
+ border-color: rgba(${fillSelectedRgbPartialColor}, 0.3);
108657
+ background-size: 100% 100%;
108658
+ }
108659
+
108660
+ :host([open]) .split-button-toggle::after {
108661
+ visibility: hidden;
108662
+ }
108663
+
108664
+ :host([appearance='block']) .split-button-primary:enabled:active,
108665
+ :host([appearance='block']) .split-button-toggle:enabled:active,
108651
108666
  :host([appearance='block'][open]) .split-button-toggle {
108652
- background-size: calc(100% - 4px) calc(100% - 4px);
108667
+ background-color: ${applicationBackgroundColor};
108653
108668
  }
108654
108669
 
108655
108670
  :host([appearance='outline'][appearance-variant='accent']) .split-button-primary:active,
@@ -108686,7 +108701,6 @@ focus outline in that case.
108686
108701
  const template$b = html `
108687
108702
  <div
108688
108703
  class="split-button-container"
108689
- ${ref('splitButtonContainer')}
108690
108704
  >
108691
108705
  <button
108692
108706
  class="split-button-primary"
@@ -108701,6 +108715,7 @@ focus outline in that case.
108701
108715
  </button>
108702
108716
  <button
108703
108717
  class="split-button-toggle"
108718
+ ${ref('toggleButton')}
108704
108719
  type="button"
108705
108720
  ?disabled="${x => x.disabled}"
108706
108721
  aria-label="${x => `More actions for ${x.label}`}"
@@ -108720,9 +108735,9 @@ focus outline in that case.
108720
108735
  auto-update-mode="auto"
108721
108736
  horizontal-inset
108722
108737
  horizontal-positioning-mode="dynamic"
108738
+ horizontal-default-position="end"
108723
108739
  vertical-positioning-mode="locktodefault"
108724
108740
  vertical-default-position="bottom"
108725
- horizontal-scaling="anchor"
108726
108741
  ${ref('region')}
108727
108742
  >
108728
108743
  <span part="menu">
@@ -108810,14 +108825,14 @@ focus outline in that case.
108810
108825
  prev.removeEventListener('change', this.menuChangeHandler);
108811
108826
  }
108812
108827
  if (this.region) {
108813
- this.region.anchorElement = this.splitButtonContainer ?? this;
108828
+ this.region.anchorElement = this.toggleButton ?? this;
108814
108829
  this.region.addEventListener('change', this.menuChangeHandler, { capture: true });
108815
108830
  }
108816
108831
  }
108817
108832
  /** @internal */
108818
- splitButtonContainerChanged() {
108833
+ toggleButtonChanged() {
108819
108834
  if (this.region) {
108820
- this.region.anchorElement = this.splitButtonContainer ?? this;
108835
+ this.region.anchorElement = this.toggleButton ?? this;
108821
108836
  }
108822
108837
  }
108823
108838
  setOpen(nextOpen) {
@@ -108849,7 +108864,7 @@ focus outline in that case.
108849
108864
  ], FvSplitButton.prototype, "appearanceVariant", void 0);
108850
108865
  __decorate([
108851
108866
  observable
108852
- ], FvSplitButton.prototype, "splitButtonContainer", void 0);
108867
+ ], FvSplitButton.prototype, "toggleButton", void 0);
108853
108868
  __decorate([
108854
108869
  observable
108855
108870
  ], FvSplitButton.prototype, "region", void 0);