@ni/nimble-components 11.4.1 → 11.5.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.
@@ -2894,6 +2894,7 @@ const Xd=class extends li{}.compose({baseName:"menu-item",baseClass:li,template:
2894
2894
  js.getOrCreate().withPrefix("nimble").register(Xd())
2895
2895
  const Yd="underline",Gd="outline",Qd="block",Jd=mt`
2896
2896
  ${so("inline-block")}
2897
+ ${Mh}
2897
2898
 
2898
2899
  :host {
2899
2900
  font: ${_r};
@@ -2902,6 +2903,9 @@ const Yd="underline",Gd="outline",Qd="block",Jd=mt`
2902
2903
  color: ${zr};
2903
2904
  height: calc(${Qn} + ${Xn});
2904
2905
  --ni-private-hover-indicator-width: calc(${Jn} + 1px);
2906
+ --ni-private-height-within-border: calc(
2907
+ ${Xn} - 2 * ${Jn}
2908
+ );
2905
2909
  }
2906
2910
 
2907
2911
  :host([disabled]) {
@@ -2925,9 +2929,10 @@ const Yd="underline",Gd="outline",Qd="block",Jd=mt`
2925
2929
  display: flex;
2926
2930
  flex-direction: row;
2927
2931
  justify-content: center;
2932
+ align-items: center;
2928
2933
  border-radius: 0px;
2929
2934
  border: 0px solid rgba(${Dn}, 0.3);
2930
- gap: calc(${Gn} / 2);
2935
+ padding: ${Jn};
2931
2936
  }
2932
2937
 
2933
2938
  .root:focus-within {
@@ -2938,6 +2943,10 @@ const Yd="underline",Gd="outline",Qd="block",Jd=mt`
2938
2943
  border-color: rgba(${Dn}, 0.1);
2939
2944
  }
2940
2945
 
2946
+ :host(.invalid) .root {
2947
+ border-bottom-color: ${Fn};
2948
+ }
2949
+
2941
2950
  .root::before {
2942
2951
  ${""}
2943
2952
  content: ' ';
@@ -2984,10 +2993,11 @@ const Yd="underline",Gd="outline",Qd="block",Jd=mt`
2984
2993
  font: inherit;
2985
2994
  background: transparent;
2986
2995
  color: inherit;
2987
- height: ${Xn};
2996
+ height: var(--ni-private-height-within-border);
2988
2997
  width: 100%;
2989
2998
  border: none;
2990
2999
  padding: 0px;
3000
+ padding-left: calc(${Gn} / 2);
2991
3001
  }
2992
3002
 
2993
3003
  .control:hover,
@@ -3006,45 +3016,54 @@ const Yd="underline",Gd="outline",Qd="block",Jd=mt`
3006
3016
  color: ${Nr};
3007
3017
  }
3008
3018
 
3009
- .control:focus-within::placeholder {
3010
- opacity: 1;
3011
- }
3012
-
3013
3019
  .control[disabled]::placeholder {
3014
3020
  color: ${Ir};
3015
3021
  }
3016
3022
 
3017
3023
  .controls {
3018
- display: flex;
3019
- flex-direction: row-reverse;
3020
- justify-content: center;
3021
- align-items: center;
3024
+ display: contents;
3025
+ }
3026
+
3027
+ ${""}
3028
+ .step-up {
3029
+ order: 3;
3030
+ padding-right: calc(${Gn} / 4);
3031
+ }
3032
+
3033
+ .step-down {
3034
+ order: 2;
3022
3035
  }
3023
3036
 
3024
3037
  .step-up-down-button {
3025
3038
  ${Xn.cssCustomProperty}: 24px;
3026
3039
  }
3040
+
3041
+ [part='end'] {
3042
+ display: contents;
3043
+ }
3044
+
3045
+ .error-icon {
3046
+ order: 1;
3047
+ padding-right: calc(${Gn} / 4);
3048
+ }
3027
3049
  `.withBehaviors(fh(Yd,mt`
3028
3050
  .root {
3029
3051
  border-bottom-width: ${Jn};
3030
- padding-top: ${Jn};
3031
- padding-left: ${Jn};
3032
- padding-right: ${Jn};
3033
- }
3034
-
3035
- .control {
3036
- height: calc(${Xn} - 2 * ${Jn});
3052
+ padding-bottom: 0;
3037
3053
  }
3038
3054
  `),fh(Qd,mt`
3039
3055
  .root {
3040
3056
  background-color: rgba(${Dn}, 0.1);
3041
- padding-left: ${Jn};
3042
- padding-right: ${Jn};
3043
3057
  }
3044
3058
 
3045
3059
  .root:focus-within,
3046
3060
  :host(.invalid) .root {
3047
3061
  border-bottom-width: ${Jn};
3062
+ padding-bottom: 0;
3063
+ }
3064
+
3065
+ :host(:hover) .root {
3066
+ padding-bottom: 0;
3048
3067
  }
3049
3068
 
3050
3069
  :host([disabled]) .root {
@@ -3053,13 +3072,10 @@ const Yd="underline",Gd="outline",Qd="block",Jd=mt`
3053
3072
  `),fh(Gd,mt`
3054
3073
  .root {
3055
3074
  border-width: ${Jn};
3056
- }
3057
-
3058
- .control {
3059
- height: calc(${Xn} - 2 * ${Jn});
3075
+ padding: 0;
3060
3076
  }
3061
3077
  `))
3062
- class Zd extends fi{constructor(){super(...arguments),this.appearance=Yd}connectedCallback(){super.connectedCallback(),this.control.setAttribute("role","spinbutton")}}kn([ot],Zd.prototype,"appearance",void 0)
3078
+ class Zd extends fi{constructor(){super(...arguments),this.appearance=Yd}connectedCallback(){super.connectedCallback(),this.control.setAttribute("role","spinbutton")}}kn([ot],Zd.prototype,"appearance",void 0),kn([ot({attribute:"error-text"})],Zd.prototype,"errorText",void 0)
3063
3079
  const tu=Zd.compose({baseName:"number-field",baseClass:fi,template:(t,e)=>X`
3064
3080
  <template class="${t=>t.readOnly?"readonly":""}">
3065
3081
  <label
@@ -3155,6 +3171,11 @@ const tu=Zd.compose({baseName:"number-field",baseClass:fi,template:(t,e)=>X`
3155
3171
  "Increment"
3156
3172
  <nimble-icon-add slot="start"></nimble-icon-add>
3157
3173
  </nimble-button>
3174
+ `,end:X`
3175
+ <nimble-icon-exclamation-mark
3176
+ class="error-icon fail"
3177
+ ></nimble-icon-exclamation-mark>
3178
+ ${Ih}
3158
3179
  `})
3159
3180
  js.getOrCreate().withPrefix("nimble").register(tu())
3160
3181
  const eu=mt`
@@ -3820,6 +3841,7 @@ const xu="underline",yu="outline",$u="block",Cu="frameless",ku=mt`
3820
3841
  justify-content: center;
3821
3842
  border: 0px solid rgba(${Dn}, 0.3);
3822
3843
  gap: calc(${Gn} / 2);
3844
+ padding: ${Jn};
3823
3845
  }
3824
3846
 
3825
3847
  :host([readonly]) .root {
@@ -3881,7 +3903,7 @@ const xu="underline",yu="outline",$u="block",Cu="frameless",ku=mt`
3881
3903
  background: transparent;
3882
3904
  color: inherit;
3883
3905
  padding: 0px;
3884
- height: ${Xn};
3906
+ height: var(--ni-private-height-within-border);
3885
3907
  width: 100%;
3886
3908
  margin-top: auto;
3887
3909
  margin-bottom: auto;
@@ -3910,10 +3932,6 @@ const xu="underline",yu="outline",$u="block",Cu="frameless",ku=mt`
3910
3932
  color: ${Nr};
3911
3933
  }
3912
3934
 
3913
- .control:not([readonly]):focus-within::placeholder {
3914
- opacity: 1;
3915
- }
3916
-
3917
3935
  .control[disabled]::placeholder {
3918
3936
  color: ${Ir};
3919
3937
  }
@@ -3962,13 +3980,7 @@ const xu="underline",yu="outline",$u="block",Cu="frameless",ku=mt`
3962
3980
  `.withBehaviors(fh(xu,mt`
3963
3981
  .root {
3964
3982
  border-bottom-width: ${Jn};
3965
- }
3966
-
3967
- .control {
3968
- height: var(--ni-private-height-within-border);
3969
- padding-top: ${Jn};
3970
- padding-left: ${Jn};
3971
- padding-right: ${Jn};
3983
+ padding-bottom: 0;
3972
3984
  }
3973
3985
  `),fh($u,mt`
3974
3986
  .root {
@@ -3983,11 +3995,11 @@ const xu="underline",yu="outline",$u="block",Cu="frameless",ku=mt`
3983
3995
  .root:focus-within,
3984
3996
  :host(.invalid) .root {
3985
3997
  border-bottom-width: ${Jn};
3998
+ padding-bottom: 0;
3986
3999
  }
3987
4000
 
3988
- .root:focus-within .control,
3989
- :host(.invalid) .control {
3990
- height: calc(${Xn} - ${Jn});
4001
+ :host(:hover) .root {
4002
+ padding-bottom: 0;
3991
4003
  }
3992
4004
 
3993
4005
  :host([readonly]) .root {
@@ -4001,10 +4013,7 @@ const xu="underline",yu="outline",$u="block",Cu="frameless",ku=mt`
4001
4013
  `),fh(yu,mt`
4002
4014
  .root {
4003
4015
  border-width: ${Jn};
4004
- }
4005
-
4006
- .control {
4007
- height: var(--ni-private-height-within-border);
4016
+ padding: 0;
4008
4017
  }
4009
4018
  `),fh(Cu,mt`
4010
4019
  .control {