@ni/nimble-components 35.2.1 → 35.2.2

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.
@@ -65438,7 +65438,9 @@ ${nextLine.slice(indentLevel + 2)}`;
65438
65438
  flex-direction: column;
65439
65439
  cursor: pointer;
65440
65440
  --ni-private-switch-height: 24px;
65441
- --ni-private-switch-indicator-size: 16px;
65441
+ --ni-private-switch-indicator-size: 24px;
65442
+ --ni-private-switch-indicator-inner-size: 18px;
65443
+ --ni-private-switch-indicator-margin: -2px;
65442
65444
  padding-bottom: calc(
65443
65445
  ${controlHeight} - var(--ni-private-switch-height)
65444
65446
  );
@@ -65476,20 +65478,36 @@ ${nextLine.slice(indentLevel + 2)}`;
65476
65478
  display: flex;
65477
65479
  height: var(--ni-private-switch-height);
65478
65480
  width: calc(var(--ni-private-switch-height) * 2);
65479
- background-color: ${fillHoverColor};
65481
+ background-color: var(--ni-private-switch-background-color);
65480
65482
  border-radius: calc(var(--ni-private-switch-height) / 2);
65481
65483
  align-items: center;
65482
- border: calc(${borderWidth} * 2) solid transparent;
65484
+ border: calc(${borderWidth}) solid transparent;
65483
65485
  }
65484
65486
 
65485
- :host([disabled]) .switch {
65486
- background-color: var(--ni-private-switch-background-disabled-color);
65487
+ :host([aria-checked='true']) .switch {
65488
+ background-color: var(--ni-private-switch-background-selected-color);
65489
+ }
65490
+
65491
+ :host([aria-checked='true']:hover) .switch {
65492
+ background-color: var(--ni-private-switch-background-selected-rollover-color);
65487
65493
  }
65488
65494
 
65489
65495
  :host(${focusVisible}) .switch {
65490
65496
  border-color: ${borderHoverColor};
65491
65497
  }
65492
65498
 
65499
+ :host(${focusVisible}[aria-checked='true']) .switch {
65500
+ background-color: var(--ni-private-switch-background-selected-rollover-color);
65501
+ }
65502
+
65503
+ :host([disabled]) .switch {
65504
+ background-color: var(--ni-private-switch-background-disabled-color);
65505
+ }
65506
+
65507
+ :host([disabled]:hover) .switch {
65508
+ background-color: var(--ni-private-switch-background-disabled-color);
65509
+ }
65510
+
65493
65511
  .checked-indicator-spacer {
65494
65512
  flex-grow: 0;
65495
65513
  transition: flex-grow ${smallDelay} ease-in-out;
@@ -65507,51 +65525,81 @@ ${nextLine.slice(indentLevel + 2)}`;
65507
65525
  width: var(--ni-private-switch-indicator-size);
65508
65526
  height: var(--ni-private-switch-indicator-size);
65509
65527
  border-radius: calc(var(--ni-private-switch-indicator-size) / 2);
65510
- margin: calc(
65511
- calc(
65512
- var(--ni-private-switch-height) - var(
65513
- --ni-private-switch-indicator-size
65514
- )
65515
- ) /
65516
- 2
65517
- );
65528
+ margin: var(--ni-private-switch-indicator-margin);
65518
65529
  border: ${borderWidth} solid
65519
65530
  var(--ni-private-switch-indicator-border-color);
65520
65531
  }
65521
65532
 
65533
+ :host([aria-checked='true']) .checked-indicator {
65534
+ border-color: var(--ni-private-switch-indicator-border-selected-color);
65535
+ }
65536
+
65522
65537
  :host(:hover) .checked-indicator {
65523
65538
  border: calc(${borderWidth} * 2) solid ${borderHoverColor};
65524
65539
  }
65525
65540
 
65541
+ :host(${focusVisible}) .checked-indicator {
65542
+ border: calc(${borderWidth} * 2) solid ${borderHoverColor};
65543
+ }
65544
+
65526
65545
  :host([disabled]) .checked-indicator {
65527
- background-color: var(
65528
- --ni-private-switch-indicator-background-disabled-color
65529
- );
65546
+ background-color: transparent;
65530
65547
  border: ${borderWidth} solid
65531
65548
  var(--ni-private-switch-indicator-border-disabled-color);
65532
65549
  }
65533
65550
 
65534
- :host(${focusVisible}) .checked-indicator {
65535
- border: ${borderWidth} solid ${borderHoverColor};
65551
+ :host([disabled]:hover) .checked-indicator {
65552
+ background-color: transparent;
65553
+ border: ${borderWidth} solid
65554
+ var(--ni-private-switch-indicator-border-disabled-color);
65536
65555
  }
65537
65556
 
65538
- .checked-indicator-inner {
65539
- width: calc(var(--ni-private-switch-indicator-size) / 2);
65540
- height: calc(var(--ni-private-switch-indicator-size) / 2);
65541
- border-radius: calc(var(--ni-private-switch-indicator-size) / 4);
65542
- background-color: var(--ni-private-switch-indicator-border-color);
65557
+ :host([disabled]${focusVisible}) .checked-indicator {
65558
+ background-color: transparent;
65559
+ border: ${borderWidth} solid
65560
+ var(--ni-private-switch-indicator-border-disabled-color);
65561
+ }
65562
+
65563
+ :host([disabled]:active) .checked-indicator-inner {
65564
+ background-color: var(
65565
+ --ni-private-switch-indicator-border-disabled-color
65566
+ );
65543
65567
  opacity: 0;
65544
- transition: opacity ${smallDelay} ease-in-out;
65545
65568
  }
65546
65569
 
65547
- :host([disabled]) .checked-indicator-inner {
65570
+ :host([disabled]${focusVisible}) .checked-indicator-inner {
65548
65571
  background-color: var(
65549
65572
  --ni-private-switch-indicator-border-disabled-color
65550
65573
  );
65574
+ opacity: 0;
65575
+ }
65576
+
65577
+ .checked-indicator-inner {
65578
+ width: var(--ni-private-switch-indicator-inner-size);
65579
+ height: var(--ni-private-switch-indicator-inner-size);
65580
+ border-radius: calc(var(--ni-private-switch-indicator-inner-size) / 2);
65581
+ opacity: 0;
65551
65582
  }
65552
65583
 
65553
65584
  :host([aria-checked='true']) .checked-indicator-inner {
65585
+ opacity: 0;
65586
+ }
65587
+
65588
+ :host(${focusVisible}) .checked-indicator-inner {
65554
65589
  opacity: 1;
65590
+ background-color: var(--ni-private-switch-indicator-background-color);
65591
+ border: 1px solid var(--ni-private-switch-indicator-border-selected-color);
65592
+ }
65593
+
65594
+ :host(:active) .checked-indicator-inner {
65595
+ opacity: 1;
65596
+ background-color: var(--ni-private-switch-indicator-background-active-color);
65597
+ }
65598
+
65599
+ :host([disabled]) .checked-indicator-inner {
65600
+ background-color: var(
65601
+ --ni-private-switch-indicator-border-disabled-color
65602
+ );
65555
65603
  }
65556
65604
 
65557
65605
  slot[name='checked-message']::slotted(*) {
@@ -65566,26 +65614,43 @@ ${nextLine.slice(indentLevel + 2)}`;
65566
65614
  }
65567
65615
  `.withBehaviors(themeBehavior(Theme.light, css `
65568
65616
  :host {
65617
+ --ni-private-switch-background-color: ${hexToRgbaCssColor(Black91, 0.1)};
65569
65618
  --ni-private-switch-background-disabled-color: ${hexToRgbaCssColor(Black91, 0.07)};
65619
+ --ni-private-switch-background-selected-color: ${hexToRgbaCssColor(DigitalGreenLight, 0.6)};
65620
+ --ni-private-switch-background-selected-rollover-color: ${hexToRgbaCssColor(DigitalGreenLight, 0.3)};
65570
65621
  --ni-private-switch-indicator-background-color: ${White};
65571
- --ni-private-switch-indicator-background-disabled-color: ${hexToRgbaCssColor(White, 0.1)};
65572
- --ni-private-switch-indicator-border-color: ${Black91};
65573
- --ni-private-switch-indicator-border-disabled-color: ${hexToRgbaCssColor(Black91, 0.3)};
65622
+ --ni-private-switch-indicator-background-disabled-color: ${hexToRgbaCssColor(Black91, 0.15)};
65623
+ --ni-private-switch-indicator-background-active-color: ${hexToRgbaCssColor(DigitalGreenLight, 0.3)};
65624
+
65625
+ --ni-private-switch-indicator-border-color: ${hexToRgbaCssColor(Black91, 0.3)};
65626
+ --ni-private-switch-indicator-border-selected-color: ${DigitalGreenLight};
65627
+ --ni-private-switch-indicator-border-disabled-color: ${hexToRgbaCssColor(Black91, 0.15)};
65628
+
65574
65629
  }
65575
65630
  `), themeBehavior(Theme.dark, css `
65576
65631
  :host {
65632
+ --ni-private-switch-background-color: ${hexToRgbaCssColor(Black15, 0.1)};
65577
65633
  --ni-private-switch-background-disabled-color: ${hexToRgbaCssColor(Black15, 0.07)};
65578
- --ni-private-switch-indicator-background-color: ${hexToRgbaCssColor(Black91, 0.3)};
65579
- --ni-private-switch-indicator-background-disabled-color: ${hexToRgbaCssColor(Black91, 0.1)};
65580
- --ni-private-switch-indicator-border-color: ${Black7};
65581
- --ni-private-switch-indicator-border-disabled-color: ${hexToRgbaCssColor(Black7, 0.3)};
65634
+ --ni-private-switch-background-selected-color: ${hexToRgbaCssColor(PowerGreen, 0.6)};
65635
+ --ni-private-switch-background-selected-rollover-color: ${hexToRgbaCssColor(PowerGreen, 0.3)};
65636
+ --ni-private-switch-indicator-background-color: ${Black75};
65637
+ --ni-private-switch-indicator-background-disabled-color: ${hexToRgbaCssColor(Black15, 0.1)};
65638
+ --ni-private-switch-indicator-background-active-color: ${hexToRgbaCssColor(PowerGreen, 0.3)};
65639
+ --ni-private-switch-indicator-border-color: ${hexToRgbaCssColor(Black15, 0.3)};
65640
+ --ni-private-switch-indicator-border-selected-color: ${PowerGreen};
65641
+ --ni-private-switch-indicator-border-disabled-color: ${hexToRgbaCssColor(Black15, 0.15)};
65582
65642
  }
65583
65643
  `), themeBehavior(Theme.color, css `
65584
65644
  :host {
65645
+ --ni-private-switch-background-color: ${hexToRgbaCssColor(White, 0.1)};
65585
65646
  --ni-private-switch-background-disabled-color: ${hexToRgbaCssColor(White, 0.07)};
65586
- --ni-private-switch-indicator-background-color: ${hexToRgbaCssColor(White, 0.1)};
65647
+ --ni-private-switch-background-selected-color: ${hexToRgbaCssColor(White, 0.6)};
65648
+ --ni-private-switch-background-selected-rollover-color: ${hexToRgbaCssColor(White, 0.3)};
65649
+ --ni-private-switch-indicator-background-color: ${hexToRgbaCssColor(White, 0.3)};
65587
65650
  --ni-private-switch-indicator-background-disabled-color: ${hexToRgbaCssColor(White, 0.1)};
65588
- --ni-private-switch-indicator-border-color: ${White};
65651
+ --ni-private-switch-indicator-background-active-color: ${hexToRgbaCssColor(White, 0.3)};
65652
+ --ni-private-switch-indicator-border-color: ${hexToRgbaCssColor(White, 0.3)};
65653
+ --ni-private-switch-indicator-border-selected-color: ${White} ;
65589
65654
  --ni-private-switch-indicator-border-disabled-color: ${hexToRgbaCssColor(White, 0.3)};
65590
65655
  }
65591
65656
  `));