@ni/nimble-components 19.6.0 → 19.6.1

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.
@@ -16232,7 +16232,7 @@
16232
16232
 
16233
16233
  /**
16234
16234
  * Do not edit directly
16235
- * Generated on Fri, 14 Jul 2023 20:41:52 GMT
16235
+ * Generated on Fri, 14 Jul 2023 21:58:02 GMT
16236
16236
  */
16237
16237
  const Information100DarkUi = "#a46eff";
16238
16238
  const Information100LightUi = "#804ad9";
@@ -16265,7 +16265,7 @@
16265
16265
  const GroupLabel1Family = "Source Sans Pro";
16266
16266
  const GroupLabel1Weight = "600";
16267
16267
  const ButtonLabel1Family = "Source Sans Pro";
16268
- const ButtonLabel1Weight = "400";
16268
+ const ButtonLabel1Weight = "600";
16269
16269
  const Title1Family = "Source Sans Pro";
16270
16270
  const Title1Weight = "400";
16271
16271
  const Headline2Family = "Noto Serif";
@@ -16706,7 +16706,7 @@
16706
16706
  const warningColor = DesignToken.create(styleNameFromTokenName(tokenNames.warningColor)).withDefault((element) => getWarningColorForTheme(element));
16707
16707
  const passColor = DesignToken.create(styleNameFromTokenName(tokenNames.passColor)).withDefault((element) => getPassColorForTheme(element));
16708
16708
  const informationColor = DesignToken.create(styleNameFromTokenName(tokenNames.informationColor)).withDefault((element) => getInformationColorForTheme(element));
16709
- const borderHoverColor = DesignToken.create(styleNameFromTokenName(tokenNames.borderHoverColor)).withDefault((element) => getColorForTheme(element, DigitalGreenLight, DigitalGreenLight, White));
16709
+ const borderHoverColor = DesignToken.create(styleNameFromTokenName(tokenNames.borderHoverColor)).withDefault((element) => getColorForTheme(element, DigitalGreenLight, PowerGreen, White));
16710
16710
  // Component Color Tokens
16711
16711
  const iconColor = DesignToken.create(styleNameFromTokenName(tokenNames.iconColor)).withDefault((element) => getColorForTheme(element, Black91, Black15, White));
16712
16712
  DesignToken.create(styleNameFromTokenName(tokenNames.modalBackdropColor)).withDefault((element) => getModalBackdropForTheme(element));
@@ -16827,7 +16827,7 @@
16827
16827
  return getColorForTheme(element, Black91, Black15, White);
16828
16828
  }
16829
16829
  function getFillSelectedColorForTheme(element) {
16830
- return getColorForTheme(element, DigitalGreenLight, DigitalGreenLight, White);
16830
+ return getColorForTheme(element, DigitalGreenLight, PowerGreen, White);
16831
16831
  }
16832
16832
  function getFillHoverColorForTheme(element) {
16833
16833
  return getColorForTheme(element, Black91, Black15, White);
@@ -17136,7 +17136,13 @@
17136
17136
  outline: none;
17137
17137
  margin: 0;
17138
17138
  padding: 0 ${standardPadding};
17139
- transition: box-shadow ${smallDelay};
17139
+ position: relative;
17140
+ transition: box-shadow ${smallDelay} ease-in-out,
17141
+ border-color ${smallDelay} ease-in-out,
17142
+ background-size ${smallDelay} ease-in-out;
17143
+ background-size: 100% 100%;
17144
+ background-repeat: no-repeat;
17145
+ background-position: center;
17140
17146
  }
17141
17147
 
17142
17148
  :host([content-hidden]) .control {
@@ -17151,26 +17157,55 @@
17151
17157
  }
17152
17158
 
17153
17159
  .control:hover {
17160
+ border-color: ${borderHoverColor};
17154
17161
  box-shadow: 0px 0px 0px ${borderWidth} ${borderHoverColor} inset;
17155
- outline: none;
17156
17162
  }
17157
17163
 
17158
17164
  .control${focusVisible} {
17165
+ border-color: ${borderHoverColor};
17159
17166
  box-shadow: 0px 0px 0px ${borderWidth} ${borderHoverColor} inset;
17160
- outline: ${borderWidth} solid ${borderHoverColor};
17161
- outline-offset: -4px;
17162
17167
  }
17163
17168
 
17164
17169
  .control:active {
17165
17170
  box-shadow: none;
17166
- outline: none;
17171
+ background-image: linear-gradient(
17172
+ ${fillSelectedColor},
17173
+ ${fillSelectedColor}
17174
+ );
17175
+ background-size: calc(100% - 2px) calc(100% - 2px);
17167
17176
  }
17168
17177
 
17169
17178
  :host([disabled]) .control {
17170
17179
  box-shadow: none;
17180
+ background-image: none;
17181
+ }
17182
+
17183
+ .control::before {
17184
+ content: '';
17185
+ position: absolute;
17186
+ width: 100%;
17187
+ height: 100%;
17188
+ pointer-events: none;
17189
+ box-sizing: border-box;
17190
+ outline: 0px solid transparent;
17191
+ color: transparent;
17192
+ background-clip: content-box;
17193
+ transition: outline ${smallDelay} ease-in-out;
17194
+ }
17195
+
17196
+ .control${focusVisible}::before {
17197
+ outline: ${borderWidth} solid ${borderHoverColor};
17198
+ outline-offset: -3px;
17199
+ }
17200
+
17201
+ .control:active::before {
17171
17202
  outline: none;
17172
17203
  }
17173
17204
 
17205
+ :host([disabled]) .control::before {
17206
+ box-shadow: none;
17207
+ }
17208
+
17174
17209
  .content {
17175
17210
  display: contents;
17176
17211
  }
@@ -17217,77 +17252,57 @@
17217
17252
  }
17218
17253
  `.withBehaviors(appearanceBehavior(ButtonAppearance.outline, css `
17219
17254
  .control {
17220
- background-color: transparent;
17221
17255
  border-color: rgba(${actionRgbPartialColor}, 0.3);
17222
17256
  }
17223
17257
 
17224
17258
  .control:hover {
17225
17259
  background-color: transparent;
17226
- border-color: ${borderHoverColor};
17227
- }
17228
-
17229
- .control${focusVisible} {
17230
- background-color: transparent;
17231
- border-color: ${borderHoverColor};
17232
- }
17233
-
17234
- .control:active {
17235
- background-color: ${fillSelectedColor};
17236
- border-color: ${fillSelectedColor};
17237
17260
  }
17238
17261
 
17239
17262
  :host([disabled]) .control {
17240
- background-color: transparent;
17241
- border-color: rgba(${borderRgbPartialColor}, 0.2);
17263
+ border-color: rgba(${borderRgbPartialColor}, 0.3);
17242
17264
  }
17243
17265
  `), appearanceBehavior(ButtonAppearance.ghost, css `
17244
- .control {
17245
- background-color: transparent;
17246
- border-color: transparent;
17247
- }
17248
-
17249
17266
  .control:hover {
17250
17267
  background-color: transparent;
17251
- border-color: ${borderHoverColor};
17252
17268
  }
17253
17269
 
17254
17270
  .control${focusVisible} {
17255
17271
  background-color: transparent;
17256
- border-color: ${borderHoverColor};
17257
- }
17258
-
17259
- .control:active {
17260
- background-color: ${fillSelectedColor};
17261
- border-color: ${fillSelectedColor};
17262
17272
  }
17263
17273
 
17264
17274
  :host([disabled]) .control {
17265
- background-color: transparent;
17266
17275
  border-color: transparent;
17267
17276
  }
17268
17277
  `), appearanceBehavior(ButtonAppearance.block, css `
17269
17278
  .control {
17270
17279
  background-color: rgba(${borderRgbPartialColor}, 0.1);
17271
- border-color: transparent;
17272
17280
  }
17273
17281
 
17274
17282
  .control:hover {
17275
17283
  background-color: transparent;
17276
- border-color: ${borderHoverColor};
17284
+ background-image: linear-gradient(
17285
+ rgba(${borderRgbPartialColor}, 0.1),
17286
+ rgba(${borderRgbPartialColor}, 0.1)
17287
+ );
17288
+ background-size: calc(100% - 4px) calc(100% - 4px);
17277
17289
  }
17278
17290
 
17279
17291
  .control${focusVisible} {
17280
- background-color: rgba(${borderRgbPartialColor}, 0.1);
17281
- border-color: ${borderHoverColor};
17282
- }
17283
-
17284
- .control${focusVisible}:hover {
17285
17292
  background-color: transparent;
17293
+ background-image: linear-gradient(
17294
+ rgba(${borderRgbPartialColor}, 0.1),
17295
+ rgba(${borderRgbPartialColor}, 0.1)
17296
+ );
17297
+ background-size: calc(100% - 4px) calc(100% - 4px);
17286
17298
  }
17287
17299
 
17288
17300
  .control:active {
17289
- background-color: ${fillSelectedColor};
17290
- border-color: ${fillSelectedColor};
17301
+ background-image: linear-gradient(
17302
+ ${fillSelectedColor},
17303
+ ${fillSelectedColor}
17304
+ );
17305
+ background-size: calc(100% - 2px) calc(100% - 2px);
17291
17306
  }
17292
17307
 
17293
17308
  :host([disabled]) .control {
@@ -17310,7 +17325,8 @@
17310
17325
  }
17311
17326
 
17312
17327
  :host([appearance-variant='primary']) .control:active {
17313
- box-shadow: none;
17328
+ box-shadow: 0px 0px 0px ${borderWidth} ${fillSelectedColor}
17329
+ inset;
17314
17330
  }
17315
17331
 
17316
17332
  :host([appearance-variant='primary'][disabled]) .control {
@@ -17318,10 +17334,9 @@
17318
17334
  }
17319
17335
  `), appearanceBehavior(ButtonAppearance.block, css `
17320
17336
  :host([appearance-variant='primary']) .control {
17321
- background-clip: padding-box;
17322
17337
  border-color: rgba(${actionRgbPartialColor}, 0.3);
17323
- border-width: calc(2 * ${borderWidth});
17324
- padding: 0 calc(${standardPadding} - ${borderWidth});
17338
+ box-shadow: 0px 0px 0px ${borderWidth}
17339
+ rgba(${actionRgbPartialColor}, 0.3) inset;
17325
17340
  }
17326
17341
 
17327
17342
  :host([appearance-variant='primary'][content-hidden]) .control {
@@ -17330,7 +17345,7 @@
17330
17345
 
17331
17346
  :host([appearance-variant='primary']) .control:hover {
17332
17347
  border-color: ${borderHoverColor};
17333
- box-shadow: none;
17348
+ box-shadow: 0px 0px 0px ${borderWidth} ${borderHoverColor} inset;
17334
17349
  }
17335
17350
 
17336
17351
  :host([appearance-variant='primary']) .control${focusVisible} {
@@ -17347,11 +17362,7 @@
17347
17362
  }
17348
17363
 
17349
17364
  :host([appearance-variant='primary']) .control:active {
17350
- background-clip: border-box;
17351
- border-color: ${fillSelectedColor};
17352
- border-width: ${borderWidth};
17353
17365
  box-shadow: none;
17354
- padding: 0 ${standardPadding};
17355
17366
  }
17356
17367
 
17357
17368
  :host([appearance-variant='primary'][content-hidden])
@@ -17371,6 +17382,11 @@
17371
17382
  .control {
17372
17383
  padding: 0px;
17373
17384
  }
17385
+
17386
+ :host([appearance-variant='primary']) .control:active::before {
17387
+ border-color: ${fillSelectedColor};
17388
+ border-width: ${borderWidth};
17389
+ }
17374
17390
  `));
17375
17391
 
17376
17392
  const styles$N = css `
@@ -17687,7 +17703,7 @@
17687
17703
  :host {
17688
17704
  position: relative;
17689
17705
  box-sizing: border-box;
17690
- font: ${bodyFont};
17706
+ font: ${buttonLabelFont};
17691
17707
  height: ${controlHeight};
17692
17708
  color: ${bodyFontColor};
17693
17709
  align-items: center;
@@ -19888,7 +19904,7 @@
19888
19904
  ${display('inline-flex')}
19889
19905
 
19890
19906
  :host {
19891
- font: ${buttonLabelFont};
19907
+ font: ${bodyFont};
19892
19908
  align-items: center;
19893
19909
  cursor: pointer;
19894
19910
  outline: none;
@@ -20015,24 +20031,78 @@
20015
20031
  .control[aria-pressed='true'] {
20016
20032
  background-color: ${fillSelectedColor};
20017
20033
  border-color: ${fillSelectedColor};
20034
+ position: relative;
20035
+ transition: box-shadow ${smallDelay} ease-in-out,
20036
+ border-color ${smallDelay} ease-in-out,
20037
+ background-size ${smallDelay} ease-in-out;
20038
+ background-size: 100% 100%;
20039
+ background-repeat: no-repeat;
20040
+ background-position: center;
20018
20041
  }
20019
20042
 
20020
20043
  .control[aria-pressed='true']:hover {
20021
- background-color: ${fillSelectedColor};
20044
+ border-color: ${borderHoverColor};
20045
+ box-shadow: 0px 0px 0px ${borderWidth} ${borderHoverColor} inset;
20046
+ background-image: linear-gradient(
20047
+ ${fillSelectedColor},
20048
+ ${fillSelectedColor}
20049
+ );
20050
+ background-size: calc(100% - 4px) calc(100% - 4px);
20022
20051
  }
20023
20052
 
20024
20053
  .control[aria-pressed='true']${focusVisible} {
20025
- background-color: ${fillSelectedColor};
20054
+ background-color: transparent;
20055
+ border-color: ${borderHoverColor};
20056
+ box-shadow: 0px 0px 0px ${borderWidth} ${borderHoverColor} inset;
20057
+ background-image: linear-gradient(
20058
+ ${fillSelectedColor},
20059
+ ${fillSelectedColor}
20060
+ );
20061
+ background-size: calc(100% - 4px) calc(100% - 4px);
20062
+ }
20063
+
20064
+ .control[aria-pressed='true']:active {
20065
+ box-shadow: none;
20066
+ background-image: linear-gradient(
20067
+ ${fillSelectedColor},
20068
+ ${fillSelectedColor}
20069
+ );
20070
+ background-size: calc(100% - 2px) calc(100% - 2px);
20026
20071
  }
20027
20072
 
20028
20073
  :host([disabled]) .control[aria-pressed='true'] {
20029
- background-color: ${fillSelectedColor};
20030
20074
  border-color: ${fillSelectedColor};
20075
+ background-color: ${fillSelectedColor};
20076
+ background-image: none;
20031
20077
  }
20032
20078
 
20033
20079
  :host([disabled]) .control[aria-pressed='true']:hover {
20034
- background-color: ${fillSelectedColor};
20035
20080
  border-color: ${fillSelectedColor};
20081
+ background-color: ${fillSelectedColor};
20082
+ box-shadow: none;
20083
+ }
20084
+
20085
+ .control[aria-pressed='true']::before {
20086
+ content: '';
20087
+ position: absolute;
20088
+ width: 100%;
20089
+ height: 100%;
20090
+ pointer-events: none;
20091
+ box-sizing: border-box;
20092
+ outline: 0px solid transparent;
20093
+ outline: none;
20094
+ background-clip: content-box;
20095
+ transition: outline ${smallDelay} ease-in-out;
20096
+ }
20097
+
20098
+ .control[aria-pressed='true']${focusVisible}::before {
20099
+ outline: ${borderWidth} solid ${borderHoverColor};
20100
+ outline-offset: -3px;
20101
+ color: transparent;
20102
+ }
20103
+
20104
+ .control[aria-pressed='true']:active::before {
20105
+ outline: none;
20036
20106
  }
20037
20107
  `;
20038
20108
 
@@ -24176,7 +24246,7 @@
24176
24246
  ${display('inline-flex')}
24177
24247
 
24178
24248
  :host {
24179
- font: ${buttonLabelFont};
24249
+ font: ${bodyFont};
24180
24250
  align-items: center;
24181
24251
  outline: none;
24182
24252
  width: fit-content;
@@ -24706,7 +24776,7 @@
24706
24776
 
24707
24777
  :host {
24708
24778
  outline: none;
24709
- font: ${buttonLabelFont};
24779
+ font: ${bodyFont};
24710
24780
  color: ${buttonLabelFontColor};
24711
24781
  flex-direction: column;
24712
24782
  cursor: pointer;