@ni/nimble-components 11.4.0 → 11.6.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 +110 -51
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +878 -840
- 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/patterns/dropdown/styles.js +1 -4
- package/dist/esm/patterns/dropdown/styles.js.map +1 -1
- package/dist/esm/patterns/dropdown/types.d.ts +6 -0
- package/dist/esm/patterns/dropdown/types.js +5 -0
- package/dist/esm/patterns/dropdown/types.js.map +1 -1
- package/dist/esm/select/index.d.ts +3 -1
- package/dist/esm/select/index.js +11 -1
- package/dist/esm/select/index.js.map +1 -1
- package/dist/esm/select/styles.js +35 -1
- package/dist/esm/select/styles.js.map +1 -1
- package/dist/esm/select/types.d.ts +5 -0
- package/dist/esm/select/types.js +6 -0
- package/dist/esm/select/types.js.map +1 -0
- 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-tokens.js +3 -3
- package/dist/esm/theme-provider/design-tokens.js.map +1 -1
- package/package.json +1 -1
|
@@ -14835,13 +14835,13 @@
|
|
|
14835
14835
|
}
|
|
14836
14836
|
}
|
|
14837
14837
|
function getWarningColorForTheme(element) {
|
|
14838
|
-
return getColorForTheme(element, Warning100LightUi, Warning100DarkUi,
|
|
14838
|
+
return getColorForTheme(element, Warning100LightUi, Warning100DarkUi, White);
|
|
14839
14839
|
}
|
|
14840
14840
|
function getFailColorForTheme(element) {
|
|
14841
|
-
return getColorForTheme(element, Fail100LightUi, Fail100DarkUi,
|
|
14841
|
+
return getColorForTheme(element, Fail100LightUi, Fail100DarkUi, White);
|
|
14842
14842
|
}
|
|
14843
14843
|
function getPassColorForTheme(element) {
|
|
14844
|
-
return getColorForTheme(element, Pass100LightUi, Pass100DarkUi,
|
|
14844
|
+
return getColorForTheme(element, Pass100LightUi, Pass100DarkUi, White);
|
|
14845
14845
|
}
|
|
14846
14846
|
function getDefaultLineColorForTheme(element) {
|
|
14847
14847
|
return getColorForTheme(element, Black91, Black15, White);
|
|
@@ -16283,10 +16283,7 @@
|
|
|
16283
16283
|
:host::before {
|
|
16284
16284
|
content: '';
|
|
16285
16285
|
position: absolute;
|
|
16286
|
-
bottom: calc(
|
|
16287
|
-
var(--ni-private-hover-indicator-width) +
|
|
16288
|
-
var(--ni-private-indicator-lines-gap)
|
|
16289
|
-
);
|
|
16286
|
+
bottom: calc(${borderWidth} + var(--ni-private-indicator-lines-gap));
|
|
16290
16287
|
width: 0px;
|
|
16291
16288
|
height: 0px;
|
|
16292
16289
|
justify-self: center;
|
|
@@ -20244,6 +20241,7 @@
|
|
|
20244
20241
|
|
|
20245
20242
|
const styles$c = css `
|
|
20246
20243
|
${display('inline-block')}
|
|
20244
|
+
${styles$k}
|
|
20247
20245
|
|
|
20248
20246
|
:host {
|
|
20249
20247
|
font: ${bodyFont};
|
|
@@ -20252,6 +20250,9 @@
|
|
|
20252
20250
|
color: ${bodyFontColor};
|
|
20253
20251
|
height: calc(${labelHeight} + ${controlHeight});
|
|
20254
20252
|
--ni-private-hover-indicator-width: calc(${borderWidth} + 1px);
|
|
20253
|
+
--ni-private-height-within-border: calc(
|
|
20254
|
+
${controlHeight} - 2 * ${borderWidth}
|
|
20255
|
+
);
|
|
20255
20256
|
}
|
|
20256
20257
|
|
|
20257
20258
|
:host([disabled]) {
|
|
@@ -20275,9 +20276,10 @@
|
|
|
20275
20276
|
display: flex;
|
|
20276
20277
|
flex-direction: row;
|
|
20277
20278
|
justify-content: center;
|
|
20279
|
+
align-items: center;
|
|
20278
20280
|
border-radius: 0px;
|
|
20279
20281
|
border: 0px solid rgba(${borderRgbPartialColor}, 0.3);
|
|
20280
|
-
|
|
20282
|
+
padding: ${borderWidth};
|
|
20281
20283
|
}
|
|
20282
20284
|
|
|
20283
20285
|
.root:focus-within {
|
|
@@ -20288,6 +20290,10 @@
|
|
|
20288
20290
|
border-color: rgba(${borderRgbPartialColor}, 0.1);
|
|
20289
20291
|
}
|
|
20290
20292
|
|
|
20293
|
+
:host(.invalid) .root {
|
|
20294
|
+
border-bottom-color: ${failColor};
|
|
20295
|
+
}
|
|
20296
|
+
|
|
20291
20297
|
.root::before {
|
|
20292
20298
|
${ /* Empty string causes alignment issue */''}
|
|
20293
20299
|
content: ' ';
|
|
@@ -20334,10 +20340,11 @@
|
|
|
20334
20340
|
font: inherit;
|
|
20335
20341
|
background: transparent;
|
|
20336
20342
|
color: inherit;
|
|
20337
|
-
height:
|
|
20343
|
+
height: var(--ni-private-height-within-border);
|
|
20338
20344
|
width: 100%;
|
|
20339
20345
|
border: none;
|
|
20340
20346
|
padding: 0px;
|
|
20347
|
+
padding-left: calc(${standardPadding} / 2);
|
|
20341
20348
|
}
|
|
20342
20349
|
|
|
20343
20350
|
.control:hover,
|
|
@@ -20356,45 +20363,55 @@
|
|
|
20356
20363
|
color: ${controlLabelFontColor};
|
|
20357
20364
|
}
|
|
20358
20365
|
|
|
20359
|
-
.control:focus-within::placeholder {
|
|
20360
|
-
opacity: 1;
|
|
20361
|
-
}
|
|
20362
|
-
|
|
20363
20366
|
.control[disabled]::placeholder {
|
|
20364
20367
|
color: ${bodyDisabledFontColor};
|
|
20365
20368
|
}
|
|
20366
20369
|
|
|
20367
20370
|
.controls {
|
|
20368
|
-
display:
|
|
20369
|
-
|
|
20370
|
-
|
|
20371
|
-
|
|
20371
|
+
display: contents;
|
|
20372
|
+
}
|
|
20373
|
+
|
|
20374
|
+
${
|
|
20375
|
+
/* 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 */ ''}
|
|
20376
|
+
.step-up {
|
|
20377
|
+
order: 3;
|
|
20378
|
+
padding-right: calc(${standardPadding} / 4);
|
|
20379
|
+
}
|
|
20380
|
+
|
|
20381
|
+
.step-down {
|
|
20382
|
+
order: 2;
|
|
20372
20383
|
}
|
|
20373
20384
|
|
|
20374
20385
|
.step-up-down-button {
|
|
20375
20386
|
${controlHeight.cssCustomProperty}: 24px;
|
|
20376
20387
|
}
|
|
20388
|
+
|
|
20389
|
+
[part='end'] {
|
|
20390
|
+
display: contents;
|
|
20391
|
+
}
|
|
20392
|
+
|
|
20393
|
+
.error-icon {
|
|
20394
|
+
order: 1;
|
|
20395
|
+
padding-right: calc(${standardPadding} / 4);
|
|
20396
|
+
}
|
|
20377
20397
|
`.withBehaviors(appearanceBehavior(NumberFieldAppearance.underline, css `
|
|
20378
20398
|
.root {
|
|
20379
20399
|
border-bottom-width: ${borderWidth};
|
|
20380
|
-
padding-
|
|
20381
|
-
padding-left: ${borderWidth};
|
|
20382
|
-
padding-right: ${borderWidth};
|
|
20383
|
-
}
|
|
20384
|
-
|
|
20385
|
-
.control {
|
|
20386
|
-
height: calc(${controlHeight} - 2 * ${borderWidth});
|
|
20400
|
+
padding-bottom: 0;
|
|
20387
20401
|
}
|
|
20388
20402
|
`), appearanceBehavior(NumberFieldAppearance.block, css `
|
|
20389
20403
|
.root {
|
|
20390
20404
|
background-color: rgba(${borderRgbPartialColor}, 0.1);
|
|
20391
|
-
padding-left: ${borderWidth};
|
|
20392
|
-
padding-right: ${borderWidth};
|
|
20393
20405
|
}
|
|
20394
20406
|
|
|
20395
20407
|
.root:focus-within,
|
|
20396
20408
|
:host(.invalid) .root {
|
|
20397
20409
|
border-bottom-width: ${borderWidth};
|
|
20410
|
+
padding-bottom: 0;
|
|
20411
|
+
}
|
|
20412
|
+
|
|
20413
|
+
:host(:hover) .root {
|
|
20414
|
+
padding-bottom: 0;
|
|
20398
20415
|
}
|
|
20399
20416
|
|
|
20400
20417
|
:host([disabled]) .root {
|
|
@@ -20403,10 +20420,7 @@
|
|
|
20403
20420
|
`), appearanceBehavior(NumberFieldAppearance.outline, css `
|
|
20404
20421
|
.root {
|
|
20405
20422
|
border-width: ${borderWidth};
|
|
20406
|
-
|
|
20407
|
-
|
|
20408
|
-
.control {
|
|
20409
|
-
height: calc(${controlHeight} - 2 * ${borderWidth});
|
|
20423
|
+
padding: 0;
|
|
20410
20424
|
}
|
|
20411
20425
|
`));
|
|
20412
20426
|
|
|
@@ -20427,6 +20441,9 @@
|
|
|
20427
20441
|
__decorate([
|
|
20428
20442
|
attr
|
|
20429
20443
|
], NumberField.prototype, "appearance", void 0);
|
|
20444
|
+
__decorate([
|
|
20445
|
+
attr({ attribute: 'error-text' })
|
|
20446
|
+
], NumberField.prototype, "errorText", void 0);
|
|
20430
20447
|
/**
|
|
20431
20448
|
* A function that returns a number-field registration for configuring the component with a DesignSystem.
|
|
20432
20449
|
*
|
|
@@ -20464,18 +20481,69 @@
|
|
|
20464
20481
|
"Increment"
|
|
20465
20482
|
<nimble-icon-add slot="start"></nimble-icon-add>
|
|
20466
20483
|
</nimble-button>
|
|
20484
|
+
`,
|
|
20485
|
+
end: html `
|
|
20486
|
+
<nimble-icon-exclamation-mark
|
|
20487
|
+
class="error-icon fail"
|
|
20488
|
+
></nimble-icon-exclamation-mark>
|
|
20489
|
+
${errorTextTemplate}
|
|
20467
20490
|
`
|
|
20468
20491
|
});
|
|
20469
20492
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleNumberField());
|
|
20470
20493
|
|
|
20494
|
+
({
|
|
20495
|
+
above: SelectPosition.above,
|
|
20496
|
+
below: SelectPosition.below
|
|
20497
|
+
});
|
|
20498
|
+
const DropdownAppearance = {
|
|
20499
|
+
underline: 'underline',
|
|
20500
|
+
outline: 'outline',
|
|
20501
|
+
block: 'block'
|
|
20502
|
+
};
|
|
20503
|
+
|
|
20471
20504
|
const styles$b = css `
|
|
20472
20505
|
${styles$l}
|
|
20473
|
-
|
|
20506
|
+
`.withBehaviors(appearanceBehavior(DropdownAppearance.underline, css `
|
|
20507
|
+
.control {
|
|
20508
|
+
padding-top: ${borderWidth};
|
|
20509
|
+
padding-left: calc(${borderWidth} + ${standardPadding} / 2);
|
|
20510
|
+
padding-right: ${borderWidth};
|
|
20511
|
+
}
|
|
20512
|
+
|
|
20513
|
+
:host([disabled]) .control {
|
|
20514
|
+
border-color: rgba(${borderRgbPartialColor}, 0.1);
|
|
20515
|
+
}
|
|
20516
|
+
`), appearanceBehavior(DropdownAppearance.outline, css `
|
|
20517
|
+
.control {
|
|
20518
|
+
border: ${borderWidth} solid rgba(${borderRgbPartialColor}, 0.3);
|
|
20519
|
+
}
|
|
20520
|
+
|
|
20521
|
+
:host(.invalid) .errortext {
|
|
20522
|
+
top: calc(${controlHeight} - ${borderWidth});
|
|
20523
|
+
}
|
|
20524
|
+
`), appearanceBehavior(DropdownAppearance.block, css `
|
|
20525
|
+
.control {
|
|
20526
|
+
background-color: rgba(${borderRgbPartialColor}, 0.1);
|
|
20527
|
+
padding-left: calc(${borderWidth} + ${standardPadding} / 2);
|
|
20528
|
+
padding-right: ${borderWidth};
|
|
20529
|
+
padding-bottom: calc(${borderWidth});
|
|
20530
|
+
border-bottom: ${borderWidth}
|
|
20531
|
+
rgba(${borderRgbPartialColor}, 0.07);
|
|
20532
|
+
}
|
|
20533
|
+
|
|
20534
|
+
:host([disabled]) .control {
|
|
20535
|
+
background-color: rgba(${borderRgbPartialColor}, 0.07);
|
|
20536
|
+
}
|
|
20537
|
+
`));
|
|
20474
20538
|
|
|
20475
20539
|
/**
|
|
20476
|
-
* A nimble-
|
|
20540
|
+
* A nimble-styled HTML select
|
|
20477
20541
|
*/
|
|
20478
20542
|
class Select extends Select$1 {
|
|
20543
|
+
constructor() {
|
|
20544
|
+
super(...arguments);
|
|
20545
|
+
this.appearance = DropdownAppearance.underline;
|
|
20546
|
+
}
|
|
20479
20547
|
// Workaround for https://github.com/microsoft/fast/issues/5123
|
|
20480
20548
|
setPositioning() {
|
|
20481
20549
|
if (!this.$fastController.isConnected) {
|
|
@@ -20503,6 +20571,9 @@
|
|
|
20503
20571
|
}
|
|
20504
20572
|
}
|
|
20505
20573
|
}
|
|
20574
|
+
__decorate([
|
|
20575
|
+
attr
|
|
20576
|
+
], Select.prototype, "appearance", void 0);
|
|
20506
20577
|
const nimbleSelect = Select.compose({
|
|
20507
20578
|
baseName: 'select',
|
|
20508
20579
|
baseClass: Select$1,
|
|
@@ -21148,6 +21219,7 @@
|
|
|
21148
21219
|
justify-content: center;
|
|
21149
21220
|
border: 0px solid rgba(${borderRgbPartialColor}, 0.3);
|
|
21150
21221
|
gap: calc(${standardPadding} / 2);
|
|
21222
|
+
padding: ${borderWidth};
|
|
21151
21223
|
}
|
|
21152
21224
|
|
|
21153
21225
|
:host([readonly]) .root {
|
|
@@ -21209,7 +21281,7 @@
|
|
|
21209
21281
|
background: transparent;
|
|
21210
21282
|
color: inherit;
|
|
21211
21283
|
padding: 0px;
|
|
21212
|
-
height:
|
|
21284
|
+
height: var(--ni-private-height-within-border);
|
|
21213
21285
|
width: 100%;
|
|
21214
21286
|
margin-top: auto;
|
|
21215
21287
|
margin-bottom: auto;
|
|
@@ -21241,10 +21313,6 @@
|
|
|
21241
21313
|
color: ${controlLabelFontColor};
|
|
21242
21314
|
}
|
|
21243
21315
|
|
|
21244
|
-
.control:not([readonly]):focus-within::placeholder {
|
|
21245
|
-
opacity: 1;
|
|
21246
|
-
}
|
|
21247
|
-
|
|
21248
21316
|
.control[disabled]::placeholder {
|
|
21249
21317
|
color: ${bodyDisabledFontColor};
|
|
21250
21318
|
}
|
|
@@ -21293,13 +21361,7 @@
|
|
|
21293
21361
|
`.withBehaviors(appearanceBehavior(TextFieldAppearance.underline, css `
|
|
21294
21362
|
.root {
|
|
21295
21363
|
border-bottom-width: ${borderWidth};
|
|
21296
|
-
|
|
21297
|
-
|
|
21298
|
-
.control {
|
|
21299
|
-
height: var(--ni-private-height-within-border);
|
|
21300
|
-
padding-top: ${borderWidth};
|
|
21301
|
-
padding-left: ${borderWidth};
|
|
21302
|
-
padding-right: ${borderWidth};
|
|
21364
|
+
padding-bottom: 0;
|
|
21303
21365
|
}
|
|
21304
21366
|
`), appearanceBehavior(TextFieldAppearance.block, css `
|
|
21305
21367
|
.root {
|
|
@@ -21314,11 +21376,11 @@
|
|
|
21314
21376
|
.root:focus-within,
|
|
21315
21377
|
:host(.invalid) .root {
|
|
21316
21378
|
border-bottom-width: ${borderWidth};
|
|
21379
|
+
padding-bottom: 0;
|
|
21317
21380
|
}
|
|
21318
21381
|
|
|
21319
|
-
.root
|
|
21320
|
-
|
|
21321
|
-
height: calc(${controlHeight} - ${borderWidth});
|
|
21382
|
+
:host(:hover) .root {
|
|
21383
|
+
padding-bottom: 0;
|
|
21322
21384
|
}
|
|
21323
21385
|
|
|
21324
21386
|
:host([readonly]) .root {
|
|
@@ -21332,10 +21394,7 @@
|
|
|
21332
21394
|
`), appearanceBehavior(TextFieldAppearance.outline, css `
|
|
21333
21395
|
.root {
|
|
21334
21396
|
border-width: ${borderWidth};
|
|
21335
|
-
|
|
21336
|
-
|
|
21337
|
-
.control {
|
|
21338
|
-
height: var(--ni-private-height-within-border);
|
|
21397
|
+
padding: 0;
|
|
21339
21398
|
}
|
|
21340
21399
|
`), appearanceBehavior(TextFieldAppearance.frameless, css `
|
|
21341
21400
|
.control {
|