@ni/nimble-components 11.0.1 → 11.0.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.
@@ -2444,6 +2444,7 @@ const ld=mt`
2444
2444
  user-select: none;
2445
2445
  color: ${Zn};
2446
2446
  height: calc(${kn} + ${yn});
2447
+ --ni-private-hover-indicator-width: calc(${_n} + 1px);
2447
2448
  }
2448
2449
 
2449
2450
  :host([disabled]) {
@@ -2451,32 +2452,71 @@ const ld=mt`
2451
2452
  cursor: default;
2452
2453
  }
2453
2454
 
2455
+ .label {
2456
+ display: flex;
2457
+ color: ${gr};
2458
+ font: ${vr};
2459
+ }
2460
+
2454
2461
  .root {
2455
2462
  box-sizing: border-box;
2456
2463
  position: relative;
2457
2464
  display: flex;
2458
2465
  flex-direction: row;
2466
+ justify-content: center;
2459
2467
  border-radius: 0px;
2460
2468
  border-bottom: ${_n} solid rgba(${pn}, 0.3);
2461
- padding-bottom: 1px;
2462
- transition: border-bottom ${Fr}, padding-bottom ${Fr};
2469
+ gap: calc(${Cn} / 2);
2470
+ }
2471
+
2472
+ .root:focus-within {
2473
+ border-bottom-color: ${fn};
2474
+ }
2475
+
2476
+ :host([disabled]) .root,
2477
+ :host([disabled]) .root:hover {
2478
+ border-bottom: ${_n} solid ${tr};
2479
+ }
2480
+
2481
+ .root::before {
2482
+ ${""}
2483
+ content: ' ';
2484
+ color: transparent;
2485
+ width: 0px;
2486
+ user-select: none;
2487
+ }
2488
+
2489
+ .root::after {
2490
+ content: '';
2491
+ position: absolute;
2492
+ bottom: calc(-1 * ${_n});
2493
+ width: 0px;
2494
+ height: 0px;
2495
+ border-bottom: ${fn}
2496
+ var(--ni-private-hover-indicator-width) solid;
2497
+ transition: width ${Fr} ease-in;
2463
2498
  }
2464
2499
 
2465
2500
  @media (prefers-reduced-motion) {
2466
- .root {
2501
+ .root::after {
2467
2502
  transition-duration: 0s;
2468
2503
  }
2469
2504
  }
2470
2505
 
2471
- .root:hover {
2472
- border-bottom: 2px solid ${fn};
2473
- padding-bottom: 0px;
2506
+ :host(.invalid) .root::after {
2507
+ border-bottom-color: ${vn};
2474
2508
  }
2475
2509
 
2476
- :host([disabled]) .root,
2477
- :host([disabled]) .root:hover {
2478
- border-bottom: ${_n} solid ${tr};
2479
- padding-bottom: 1px;
2510
+ :host(:hover) .root::after {
2511
+ width: 100%;
2512
+ }
2513
+
2514
+ :host([disabled]:hover) .root::after {
2515
+ width: 0px;
2516
+ }
2517
+
2518
+ [part='start'] {
2519
+ display: contents;
2480
2520
  }
2481
2521
 
2482
2522
  .control {
@@ -2484,11 +2524,10 @@ const ld=mt`
2484
2524
  font: inherit;
2485
2525
  background: transparent;
2486
2526
  color: inherit;
2487
- height: 28px;
2527
+ height: calc(${yn} - ${_n});
2488
2528
  width: 100%;
2489
- margin-top: auto;
2490
- margin-bottom: auto;
2491
2529
  border: none;
2530
+ padding: 0px;
2492
2531
  }
2493
2532
 
2494
2533
  .control:hover,
@@ -2515,12 +2554,6 @@ const ld=mt`
2515
2554
  color: ${tr};
2516
2555
  }
2517
2556
 
2518
- .label {
2519
- display: flex;
2520
- color: ${gr};
2521
- font: ${vr};
2522
- }
2523
-
2524
2557
  .controls {
2525
2558
  display: flex;
2526
2559
  flex-direction: column;
@@ -3388,6 +3421,10 @@ const Sd="underline",Ad="outline",Ed="block",Md="frameless",Hd=mt`
3388
3421
  --webkit-user-select: none;
3389
3422
  color: ${Zn};
3390
3423
  height: calc(${kn} + ${yn});
3424
+ --ni-private-hover-indicator-width: calc(${_n} + 1px);
3425
+ --ni-private-height-within-border: calc(
3426
+ ${yn} - 2 * ${_n}
3427
+ );
3391
3428
  }
3392
3429
 
3393
3430
  :host([disabled]) {
@@ -3411,22 +3448,10 @@ const Sd="underline",Ad="outline",Ed="block",Md="frameless",Hd=mt`
3411
3448
  flex-direction: row;
3412
3449
  border-radius: 0px;
3413
3450
  font: inherit;
3414
- transition: border-bottom ${Fr}, padding-bottom ${Fr};
3415
3451
  align-items: center;
3416
- --ni-private-hover-bottom-border-width: 2px;
3452
+ justify-content: center;
3417
3453
  border: 0px solid rgba(${pn}, 0.3);
3418
- border-bottom-width: var(--ni-private-bottom-border-width);
3419
3454
  gap: calc(${Cn} / 2);
3420
- padding-bottom: calc(
3421
- var(--ni-private-hover-bottom-border-width) -
3422
- var(--ni-private-bottom-border-width)
3423
- );
3424
- }
3425
-
3426
- @media (prefers-reduced-motion) {
3427
- .root {
3428
- transition-duration: 0s;
3429
- }
3430
3455
  }
3431
3456
 
3432
3457
  :host(.invalid) .root {
@@ -3441,21 +3466,6 @@ const Sd="underline",Ad="outline",Ed="block",Md="frameless",Hd=mt`
3441
3466
  border-color: rgba(${pn}, 0.1);
3442
3467
  }
3443
3468
 
3444
- .root:hover {
3445
- --ni-private-bottom-border-width: var(
3446
- --ni-private-hover-bottom-border-width
3447
- );
3448
- border-bottom-color: ${fn};
3449
- }
3450
-
3451
- :host([readonly]) .root:hover {
3452
- --ni-private-bottom-border-width: 1px;
3453
- }
3454
-
3455
- :host([disabled]) .root:hover {
3456
- --ni-private-bottom-border-width: 1px;
3457
- }
3458
-
3459
3469
  .root:focus-within {
3460
3470
  border-bottom-color: ${fn};
3461
3471
  }
@@ -3503,10 +3513,7 @@ const Sd="underline",Ad="outline",Ed="block",Md="frameless",Hd=mt`
3503
3513
  background: transparent;
3504
3514
  color: inherit;
3505
3515
  padding: 0px;
3506
- height: calc(
3507
- ${yn} - ${_n} -
3508
- var(--ni-private-hover-bottom-border-width)
3509
- );
3516
+ height: ${yn};
3510
3517
  width: 100%;
3511
3518
  margin-top: auto;
3512
3519
  margin-bottom: auto;
@@ -3547,6 +3554,36 @@ const Sd="underline",Ad="outline",Ed="block",Md="frameless",Hd=mt`
3547
3554
  display: contents;
3548
3555
  }
3549
3556
 
3557
+ [part='end']::after {
3558
+ content: '';
3559
+ position: absolute;
3560
+ bottom: calc(-1 * ${_n});
3561
+ width: 0px;
3562
+ height: 0px;
3563
+ border-bottom: ${fn}
3564
+ var(--ni-private-hover-indicator-width) solid;
3565
+ transition: width ${Fr} ease-in;
3566
+ }
3567
+
3568
+ @media (prefers-reduced-motion) {
3569
+ [part='end']::after {
3570
+ transition-duration: 0s;
3571
+ }
3572
+ }
3573
+
3574
+ :host(.invalid) [part='end']::after {
3575
+ border-bottom-color: ${vn};
3576
+ }
3577
+
3578
+ :host(:hover) [part='end']::after {
3579
+ width: 100%;
3580
+ }
3581
+
3582
+ :host([disabled]:hover) [part='end']::after,
3583
+ :host([readonly]:hover) [part='end']::after {
3584
+ width: 0px;
3585
+ }
3586
+
3550
3587
  .error-content {
3551
3588
  display: none;
3552
3589
  }
@@ -3602,46 +3639,33 @@ const Sd="underline",Ad="outline",Ed="block",Md="frameless",Hd=mt`
3602
3639
  }
3603
3640
  `.withBehaviors(Tc(Sd,mt`
3604
3641
  .root {
3605
- --ni-private-bottom-border-width: 1px;
3642
+ border-bottom-width: ${_n};
3643
+ }
3644
+
3645
+ .control {
3646
+ height: var(--ni-private-height-within-border);
3606
3647
  padding-top: ${_n};
3607
3648
  padding-left: ${_n};
3608
3649
  padding-right: ${_n};
3609
3650
  }
3610
-
3611
- :host([disabled]) .root {
3612
- border-color: rgba(${pn}, 0.1);
3613
- }
3614
-
3615
- :host([disabled]) .root:hover {
3616
- --ni-private-bottom-border-width: 1px;
3617
- }
3618
3651
  `),Tc(Ed,mt`
3619
3652
  .root {
3620
3653
  background-color: rgba(${pn}, 0.1);
3621
- --ni-private-bottom-border-width: 0px;
3622
- padding-top: ${_n};
3623
- padding-left: ${_n};
3624
- padding-right: ${_n};
3625
3654
  }
3626
3655
 
3627
- .root:focus-within {
3628
- --ni-private-bottom-border-width: 1px;
3629
- }
3630
-
3631
- .root:focus-within:hover {
3632
- --ni-private-bottom-border-width: var(
3633
- --ni-private-hover-bottom-border-width
3634
- );
3656
+ .control {
3657
+ padding-left: ${_n};
3658
+ padding-right: ${_n};
3635
3659
  }
3636
3660
 
3661
+ .root:focus-within,
3637
3662
  :host(.invalid) .root {
3638
- --ni-private-bottom-border-width: 1px;
3663
+ border-bottom-width: ${_n};
3639
3664
  }
3640
3665
 
3641
- :host(.invalid) .root:hover {
3642
- --ni-private-bottom-border-width: var(
3643
- --ni-private-hover-bottom-border-width
3644
- );
3666
+ .root:focus-within .control,
3667
+ :host(.invalid) .control {
3668
+ height: calc(${yn} - ${_n});
3645
3669
  }
3646
3670
 
3647
3671
  :host([readonly]) .root {
@@ -3652,28 +3676,20 @@ const Sd="underline",Ad="outline",Ed="block",Md="frameless",Hd=mt`
3652
3676
  :host([disabled]) .root {
3653
3677
  background-color: rgba(${pn}, 0.07);
3654
3678
  }
3655
-
3656
- :host([disabled]) .root:hover {
3657
- --ni-private-bottom-border-width: 0px;
3658
- }
3659
-
3660
- :host(.invalid[disabled]) .root {
3661
- --ni-private-bottom-border-width: 1px;
3662
- }
3663
3679
  `),Tc(Ad,mt`
3664
3680
  .root {
3665
- --ni-private-bottom-border-width: 1px;
3666
3681
  border-width: ${_n};
3667
- border-bottom-width: var(--ni-private-bottom-border-width);
3682
+ }
3683
+
3684
+ .control {
3685
+ height: var(--ni-private-height-within-border);
3668
3686
  }
3669
3687
 
3670
3688
  :host(.invalid) .errortext {
3671
3689
  top: calc(${yn} - ${_n});
3672
3690
  }
3673
3691
  `),Tc(Md,mt`
3674
- .root {
3675
- --ni-private-bottom-border-width: 0px;
3676
- padding-top: ${_n};
3692
+ .control {
3677
3693
  padding-left: ${_n};
3678
3694
  padding-right: ${_n};
3679
3695
  }
@@ -3681,10 +3697,6 @@ const Sd="underline",Ad="outline",Ed="block",Md="frameless",Hd=mt`
3681
3697
  :host([readonly]) .root {
3682
3698
  border-color: transparent;
3683
3699
  }
3684
-
3685
- .root:hover {
3686
- --ni-private-bottom-border-width: 0px;
3687
- }
3688
3700
  `),Gr(mt`
3689
3701
  ${""}
3690
3702
  .control::-ms-reveal {