@ni/nimble-components 11.3.0 → 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.
- package/dist/all-components-bundle.js +63 -47
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +833 -824
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/number-field/index.d.ts +11 -0
- package/dist/esm/number-field/index.js +13 -0
- package/dist/esm/number-field/index.js.map +1 -1
- package/dist/esm/number-field/styles.js +41 -23
- package/dist/esm/number-field/styles.js.map +1 -1
- package/dist/esm/text-field/styles.js +7 -19
- package/dist/esm/text-field/styles.js.map +1 -1
- package/dist/esm/theme-provider/design-token-comments.js +1 -0
- package/dist/esm/theme-provider/design-token-comments.js.map +1 -1
- package/dist/esm/theme-provider/design-token-names.js +1 -0
- package/dist/esm/theme-provider/design-token-names.js.map +1 -1
- package/dist/esm/theme-provider/design-tokens.d.ts +1 -0
- package/dist/esm/theme-provider/design-tokens.js +6 -5
- package/dist/esm/theme-provider/design-tokens.js.map +1 -1
- package/dist/tokens-internal.scss +6 -0
- package/dist/tokens.scss +3 -0
- package/package.json +1 -1
|
@@ -14338,11 +14338,11 @@
|
|
|
14338
14338
|
const White = "#ffffff";
|
|
14339
14339
|
const Black88 = "#252526";
|
|
14340
14340
|
const Black85 = "#363738";
|
|
14341
|
+
const Black80 = "#505153";
|
|
14341
14342
|
const Black91 = "#161617";
|
|
14342
14343
|
const ForestGreen = "#074023";
|
|
14343
14344
|
const DigitalGreenLight = "#009b65";
|
|
14344
14345
|
const Warning100LightUi = "#ff4b00";
|
|
14345
|
-
const Black30 = "#d3d5d6";
|
|
14346
14346
|
const DigitalGreenDark = "#006b46";
|
|
14347
14347
|
const PowerGreen = "#32eb96";
|
|
14348
14348
|
const Title2Family = "Source Sans Pro";
|
|
@@ -14471,6 +14471,7 @@
|
|
|
14471
14471
|
const tokenNames = {
|
|
14472
14472
|
actionRgbPartialColor: 'action-rgb-partial-color',
|
|
14473
14473
|
applicationBackgroundColor: 'application-background-color',
|
|
14474
|
+
dividerBackgroundColor: 'divider-background-color',
|
|
14474
14475
|
headerBackgroundColor: 'header-background-color',
|
|
14475
14476
|
sectionBackgroundColor: 'section-background-color',
|
|
14476
14477
|
fillSelectedColor: 'fill-selected-color',
|
|
@@ -14734,7 +14735,8 @@
|
|
|
14734
14735
|
const actionRgbPartialColor = DesignToken.create(styleNameFromTokenName(tokenNames.actionRgbPartialColor)).withDefault((element) => hexToRgbPartial(getColorForTheme(element, Black91, Black15, White)));
|
|
14735
14736
|
const applicationBackgroundColor = DesignToken.create(styleNameFromTokenName(tokenNames.applicationBackgroundColor)).withDefault((element) => getColorForTheme(element, White, Black85, ForestGreen));
|
|
14736
14737
|
DesignToken.create(styleNameFromTokenName(tokenNames.headerBackgroundColor)).withDefault((element) => getColorForTheme(element, Black7, Black88, ForestGreen));
|
|
14737
|
-
DesignToken.create(styleNameFromTokenName(tokenNames.sectionBackgroundColor)).withDefault((element) => getColorForTheme(element,
|
|
14738
|
+
DesignToken.create(styleNameFromTokenName(tokenNames.sectionBackgroundColor)).withDefault((element) => getColorForTheme(element, Black15, Black80, ForestGreen));
|
|
14739
|
+
DesignToken.create(styleNameFromTokenName(tokenNames.dividerBackgroundColor)).withDefault((element) => getColorForTheme(element, Black15, Black80, ForestGreen));
|
|
14738
14740
|
const fillSelectedColor = DesignToken.create(styleNameFromTokenName(tokenNames.fillSelectedColor)).withDefault((element) => hexToRgbaCssColor(getFillSelectedColorForTheme(element), 0.2));
|
|
14739
14741
|
const fillSelectedRgbPartialColor = DesignToken.create(styleNameFromTokenName(tokenNames.fillSelectedRgbPartialColor)).withDefault((element) => hexToRgbPartial(getFillSelectedColorForTheme(element)));
|
|
14740
14742
|
const fillHoverSelectedColor = DesignToken.create(styleNameFromTokenName(tokenNames.fillHoverSelectedColor)).withDefault((element) => hexToRgbaCssColor(getFillSelectedColorForTheme(element), 0.15));
|
|
@@ -14833,13 +14835,13 @@
|
|
|
14833
14835
|
}
|
|
14834
14836
|
}
|
|
14835
14837
|
function getWarningColorForTheme(element) {
|
|
14836
|
-
return getColorForTheme(element, Warning100LightUi, Warning100DarkUi,
|
|
14838
|
+
return getColorForTheme(element, Warning100LightUi, Warning100DarkUi, White);
|
|
14837
14839
|
}
|
|
14838
14840
|
function getFailColorForTheme(element) {
|
|
14839
|
-
return getColorForTheme(element, Fail100LightUi, Fail100DarkUi,
|
|
14841
|
+
return getColorForTheme(element, Fail100LightUi, Fail100DarkUi, White);
|
|
14840
14842
|
}
|
|
14841
14843
|
function getPassColorForTheme(element) {
|
|
14842
|
-
return getColorForTheme(element, Pass100LightUi, Pass100DarkUi,
|
|
14844
|
+
return getColorForTheme(element, Pass100LightUi, Pass100DarkUi, White);
|
|
14843
14845
|
}
|
|
14844
14846
|
function getDefaultLineColorForTheme(element) {
|
|
14845
14847
|
return getColorForTheme(element, Black91, Black15, White);
|
|
@@ -20242,6 +20244,7 @@
|
|
|
20242
20244
|
|
|
20243
20245
|
const styles$c = css `
|
|
20244
20246
|
${display('inline-block')}
|
|
20247
|
+
${styles$k}
|
|
20245
20248
|
|
|
20246
20249
|
:host {
|
|
20247
20250
|
font: ${bodyFont};
|
|
@@ -20250,6 +20253,9 @@
|
|
|
20250
20253
|
color: ${bodyFontColor};
|
|
20251
20254
|
height: calc(${labelHeight} + ${controlHeight});
|
|
20252
20255
|
--ni-private-hover-indicator-width: calc(${borderWidth} + 1px);
|
|
20256
|
+
--ni-private-height-within-border: calc(
|
|
20257
|
+
${controlHeight} - 2 * ${borderWidth}
|
|
20258
|
+
);
|
|
20253
20259
|
}
|
|
20254
20260
|
|
|
20255
20261
|
:host([disabled]) {
|
|
@@ -20273,9 +20279,10 @@
|
|
|
20273
20279
|
display: flex;
|
|
20274
20280
|
flex-direction: row;
|
|
20275
20281
|
justify-content: center;
|
|
20282
|
+
align-items: center;
|
|
20276
20283
|
border-radius: 0px;
|
|
20277
20284
|
border: 0px solid rgba(${borderRgbPartialColor}, 0.3);
|
|
20278
|
-
|
|
20285
|
+
padding: ${borderWidth};
|
|
20279
20286
|
}
|
|
20280
20287
|
|
|
20281
20288
|
.root:focus-within {
|
|
@@ -20286,6 +20293,10 @@
|
|
|
20286
20293
|
border-color: rgba(${borderRgbPartialColor}, 0.1);
|
|
20287
20294
|
}
|
|
20288
20295
|
|
|
20296
|
+
:host(.invalid) .root {
|
|
20297
|
+
border-bottom-color: ${failColor};
|
|
20298
|
+
}
|
|
20299
|
+
|
|
20289
20300
|
.root::before {
|
|
20290
20301
|
${ /* Empty string causes alignment issue */''}
|
|
20291
20302
|
content: ' ';
|
|
@@ -20332,10 +20343,11 @@
|
|
|
20332
20343
|
font: inherit;
|
|
20333
20344
|
background: transparent;
|
|
20334
20345
|
color: inherit;
|
|
20335
|
-
height:
|
|
20346
|
+
height: var(--ni-private-height-within-border);
|
|
20336
20347
|
width: 100%;
|
|
20337
20348
|
border: none;
|
|
20338
20349
|
padding: 0px;
|
|
20350
|
+
padding-left: calc(${standardPadding} / 2);
|
|
20339
20351
|
}
|
|
20340
20352
|
|
|
20341
20353
|
.control:hover,
|
|
@@ -20354,45 +20366,55 @@
|
|
|
20354
20366
|
color: ${controlLabelFontColor};
|
|
20355
20367
|
}
|
|
20356
20368
|
|
|
20357
|
-
.control:focus-within::placeholder {
|
|
20358
|
-
opacity: 1;
|
|
20359
|
-
}
|
|
20360
|
-
|
|
20361
20369
|
.control[disabled]::placeholder {
|
|
20362
20370
|
color: ${bodyDisabledFontColor};
|
|
20363
20371
|
}
|
|
20364
20372
|
|
|
20365
20373
|
.controls {
|
|
20366
|
-
display:
|
|
20367
|
-
|
|
20368
|
-
|
|
20369
|
-
|
|
20374
|
+
display: contents;
|
|
20375
|
+
}
|
|
20376
|
+
|
|
20377
|
+
${
|
|
20378
|
+
/* We are using flex `order` to define the visual ordering of the inc/dec buttons and the invalid icon because they are not "interactive" i.e. part of the tab order */ ''}
|
|
20379
|
+
.step-up {
|
|
20380
|
+
order: 3;
|
|
20381
|
+
padding-right: calc(${standardPadding} / 4);
|
|
20382
|
+
}
|
|
20383
|
+
|
|
20384
|
+
.step-down {
|
|
20385
|
+
order: 2;
|
|
20370
20386
|
}
|
|
20371
20387
|
|
|
20372
20388
|
.step-up-down-button {
|
|
20373
20389
|
${controlHeight.cssCustomProperty}: 24px;
|
|
20374
20390
|
}
|
|
20391
|
+
|
|
20392
|
+
[part='end'] {
|
|
20393
|
+
display: contents;
|
|
20394
|
+
}
|
|
20395
|
+
|
|
20396
|
+
.error-icon {
|
|
20397
|
+
order: 1;
|
|
20398
|
+
padding-right: calc(${standardPadding} / 4);
|
|
20399
|
+
}
|
|
20375
20400
|
`.withBehaviors(appearanceBehavior(NumberFieldAppearance.underline, css `
|
|
20376
20401
|
.root {
|
|
20377
20402
|
border-bottom-width: ${borderWidth};
|
|
20378
|
-
padding-
|
|
20379
|
-
padding-left: ${borderWidth};
|
|
20380
|
-
padding-right: ${borderWidth};
|
|
20381
|
-
}
|
|
20382
|
-
|
|
20383
|
-
.control {
|
|
20384
|
-
height: calc(${controlHeight} - 2 * ${borderWidth});
|
|
20403
|
+
padding-bottom: 0;
|
|
20385
20404
|
}
|
|
20386
20405
|
`), appearanceBehavior(NumberFieldAppearance.block, css `
|
|
20387
20406
|
.root {
|
|
20388
20407
|
background-color: rgba(${borderRgbPartialColor}, 0.1);
|
|
20389
|
-
padding-left: ${borderWidth};
|
|
20390
|
-
padding-right: ${borderWidth};
|
|
20391
20408
|
}
|
|
20392
20409
|
|
|
20393
20410
|
.root:focus-within,
|
|
20394
20411
|
:host(.invalid) .root {
|
|
20395
20412
|
border-bottom-width: ${borderWidth};
|
|
20413
|
+
padding-bottom: 0;
|
|
20414
|
+
}
|
|
20415
|
+
|
|
20416
|
+
:host(:hover) .root {
|
|
20417
|
+
padding-bottom: 0;
|
|
20396
20418
|
}
|
|
20397
20419
|
|
|
20398
20420
|
:host([disabled]) .root {
|
|
@@ -20401,10 +20423,7 @@
|
|
|
20401
20423
|
`), appearanceBehavior(NumberFieldAppearance.outline, css `
|
|
20402
20424
|
.root {
|
|
20403
20425
|
border-width: ${borderWidth};
|
|
20404
|
-
|
|
20405
|
-
|
|
20406
|
-
.control {
|
|
20407
|
-
height: calc(${controlHeight} - 2 * ${borderWidth});
|
|
20426
|
+
padding: 0;
|
|
20408
20427
|
}
|
|
20409
20428
|
`));
|
|
20410
20429
|
|
|
@@ -20425,6 +20444,9 @@
|
|
|
20425
20444
|
__decorate([
|
|
20426
20445
|
attr
|
|
20427
20446
|
], NumberField.prototype, "appearance", void 0);
|
|
20447
|
+
__decorate([
|
|
20448
|
+
attr({ attribute: 'error-text' })
|
|
20449
|
+
], NumberField.prototype, "errorText", void 0);
|
|
20428
20450
|
/**
|
|
20429
20451
|
* A function that returns a number-field registration for configuring the component with a DesignSystem.
|
|
20430
20452
|
*
|
|
@@ -20462,6 +20484,12 @@
|
|
|
20462
20484
|
"Increment"
|
|
20463
20485
|
<nimble-icon-add slot="start"></nimble-icon-add>
|
|
20464
20486
|
</nimble-button>
|
|
20487
|
+
`,
|
|
20488
|
+
end: html `
|
|
20489
|
+
<nimble-icon-exclamation-mark
|
|
20490
|
+
class="error-icon fail"
|
|
20491
|
+
></nimble-icon-exclamation-mark>
|
|
20492
|
+
${errorTextTemplate}
|
|
20465
20493
|
`
|
|
20466
20494
|
});
|
|
20467
20495
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleNumberField());
|
|
@@ -21146,6 +21174,7 @@
|
|
|
21146
21174
|
justify-content: center;
|
|
21147
21175
|
border: 0px solid rgba(${borderRgbPartialColor}, 0.3);
|
|
21148
21176
|
gap: calc(${standardPadding} / 2);
|
|
21177
|
+
padding: ${borderWidth};
|
|
21149
21178
|
}
|
|
21150
21179
|
|
|
21151
21180
|
:host([readonly]) .root {
|
|
@@ -21207,7 +21236,7 @@
|
|
|
21207
21236
|
background: transparent;
|
|
21208
21237
|
color: inherit;
|
|
21209
21238
|
padding: 0px;
|
|
21210
|
-
height:
|
|
21239
|
+
height: var(--ni-private-height-within-border);
|
|
21211
21240
|
width: 100%;
|
|
21212
21241
|
margin-top: auto;
|
|
21213
21242
|
margin-bottom: auto;
|
|
@@ -21239,10 +21268,6 @@
|
|
|
21239
21268
|
color: ${controlLabelFontColor};
|
|
21240
21269
|
}
|
|
21241
21270
|
|
|
21242
|
-
.control:not([readonly]):focus-within::placeholder {
|
|
21243
|
-
opacity: 1;
|
|
21244
|
-
}
|
|
21245
|
-
|
|
21246
21271
|
.control[disabled]::placeholder {
|
|
21247
21272
|
color: ${bodyDisabledFontColor};
|
|
21248
21273
|
}
|
|
@@ -21291,13 +21316,7 @@
|
|
|
21291
21316
|
`.withBehaviors(appearanceBehavior(TextFieldAppearance.underline, css `
|
|
21292
21317
|
.root {
|
|
21293
21318
|
border-bottom-width: ${borderWidth};
|
|
21294
|
-
|
|
21295
|
-
|
|
21296
|
-
.control {
|
|
21297
|
-
height: var(--ni-private-height-within-border);
|
|
21298
|
-
padding-top: ${borderWidth};
|
|
21299
|
-
padding-left: ${borderWidth};
|
|
21300
|
-
padding-right: ${borderWidth};
|
|
21319
|
+
padding-bottom: 0;
|
|
21301
21320
|
}
|
|
21302
21321
|
`), appearanceBehavior(TextFieldAppearance.block, css `
|
|
21303
21322
|
.root {
|
|
@@ -21312,11 +21331,11 @@
|
|
|
21312
21331
|
.root:focus-within,
|
|
21313
21332
|
:host(.invalid) .root {
|
|
21314
21333
|
border-bottom-width: ${borderWidth};
|
|
21334
|
+
padding-bottom: 0;
|
|
21315
21335
|
}
|
|
21316
21336
|
|
|
21317
|
-
.root
|
|
21318
|
-
|
|
21319
|
-
height: calc(${controlHeight} - ${borderWidth});
|
|
21337
|
+
:host(:hover) .root {
|
|
21338
|
+
padding-bottom: 0;
|
|
21320
21339
|
}
|
|
21321
21340
|
|
|
21322
21341
|
:host([readonly]) .root {
|
|
@@ -21330,10 +21349,7 @@
|
|
|
21330
21349
|
`), appearanceBehavior(TextFieldAppearance.outline, css `
|
|
21331
21350
|
.root {
|
|
21332
21351
|
border-width: ${borderWidth};
|
|
21333
|
-
|
|
21334
|
-
|
|
21335
|
-
.control {
|
|
21336
|
-
height: var(--ni-private-height-within-border);
|
|
21352
|
+
padding: 0;
|
|
21337
21353
|
}
|
|
21338
21354
|
`), appearanceBehavior(TextFieldAppearance.frameless, css `
|
|
21339
21355
|
.control {
|