@ni/nimble-components 11.4.1 → 11.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.
- package/dist/all-components-bundle.js +111 -48
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +158 -116
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/combobox/styles.js +5 -1
- package/dist/esm/combobox/styles.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/package.json +1 -1
|
@@ -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;
|
|
@@ -16507,6 +16504,10 @@
|
|
|
16507
16504
|
bottom-border-width: var(--ni-private-bottom-border-width);
|
|
16508
16505
|
}
|
|
16509
16506
|
|
|
16507
|
+
.control:focus-within {
|
|
16508
|
+
border-bottom-color: ${borderHoverColor};
|
|
16509
|
+
}
|
|
16510
|
+
|
|
16510
16511
|
:host(.invalid) .control {
|
|
16511
16512
|
border-bottom: var(--ni-private-bottom-border-width) solid ${failColor};
|
|
16512
16513
|
}
|
|
@@ -20244,6 +20245,7 @@
|
|
|
20244
20245
|
|
|
20245
20246
|
const styles$c = css `
|
|
20246
20247
|
${display('inline-block')}
|
|
20248
|
+
${styles$k}
|
|
20247
20249
|
|
|
20248
20250
|
:host {
|
|
20249
20251
|
font: ${bodyFont};
|
|
@@ -20252,6 +20254,9 @@
|
|
|
20252
20254
|
color: ${bodyFontColor};
|
|
20253
20255
|
height: calc(${labelHeight} + ${controlHeight});
|
|
20254
20256
|
--ni-private-hover-indicator-width: calc(${borderWidth} + 1px);
|
|
20257
|
+
--ni-private-height-within-border: calc(
|
|
20258
|
+
${controlHeight} - 2 * ${borderWidth}
|
|
20259
|
+
);
|
|
20255
20260
|
}
|
|
20256
20261
|
|
|
20257
20262
|
:host([disabled]) {
|
|
@@ -20275,9 +20280,10 @@
|
|
|
20275
20280
|
display: flex;
|
|
20276
20281
|
flex-direction: row;
|
|
20277
20282
|
justify-content: center;
|
|
20283
|
+
align-items: center;
|
|
20278
20284
|
border-radius: 0px;
|
|
20279
20285
|
border: 0px solid rgba(${borderRgbPartialColor}, 0.3);
|
|
20280
|
-
|
|
20286
|
+
padding: ${borderWidth};
|
|
20281
20287
|
}
|
|
20282
20288
|
|
|
20283
20289
|
.root:focus-within {
|
|
@@ -20288,6 +20294,10 @@
|
|
|
20288
20294
|
border-color: rgba(${borderRgbPartialColor}, 0.1);
|
|
20289
20295
|
}
|
|
20290
20296
|
|
|
20297
|
+
:host(.invalid) .root {
|
|
20298
|
+
border-bottom-color: ${failColor};
|
|
20299
|
+
}
|
|
20300
|
+
|
|
20291
20301
|
.root::before {
|
|
20292
20302
|
${ /* Empty string causes alignment issue */''}
|
|
20293
20303
|
content: ' ';
|
|
@@ -20334,10 +20344,11 @@
|
|
|
20334
20344
|
font: inherit;
|
|
20335
20345
|
background: transparent;
|
|
20336
20346
|
color: inherit;
|
|
20337
|
-
height:
|
|
20347
|
+
height: var(--ni-private-height-within-border);
|
|
20338
20348
|
width: 100%;
|
|
20339
20349
|
border: none;
|
|
20340
20350
|
padding: 0px;
|
|
20351
|
+
padding-left: calc(${standardPadding} / 2);
|
|
20341
20352
|
}
|
|
20342
20353
|
|
|
20343
20354
|
.control:hover,
|
|
@@ -20356,45 +20367,55 @@
|
|
|
20356
20367
|
color: ${controlLabelFontColor};
|
|
20357
20368
|
}
|
|
20358
20369
|
|
|
20359
|
-
.control:focus-within::placeholder {
|
|
20360
|
-
opacity: 1;
|
|
20361
|
-
}
|
|
20362
|
-
|
|
20363
20370
|
.control[disabled]::placeholder {
|
|
20364
20371
|
color: ${bodyDisabledFontColor};
|
|
20365
20372
|
}
|
|
20366
20373
|
|
|
20367
20374
|
.controls {
|
|
20368
|
-
display:
|
|
20369
|
-
|
|
20370
|
-
|
|
20371
|
-
|
|
20375
|
+
display: contents;
|
|
20376
|
+
}
|
|
20377
|
+
|
|
20378
|
+
${
|
|
20379
|
+
/* 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 */ ''}
|
|
20380
|
+
.step-up {
|
|
20381
|
+
order: 3;
|
|
20382
|
+
padding-right: calc(${standardPadding} / 4);
|
|
20383
|
+
}
|
|
20384
|
+
|
|
20385
|
+
.step-down {
|
|
20386
|
+
order: 2;
|
|
20372
20387
|
}
|
|
20373
20388
|
|
|
20374
20389
|
.step-up-down-button {
|
|
20375
20390
|
${controlHeight.cssCustomProperty}: 24px;
|
|
20376
20391
|
}
|
|
20392
|
+
|
|
20393
|
+
[part='end'] {
|
|
20394
|
+
display: contents;
|
|
20395
|
+
}
|
|
20396
|
+
|
|
20397
|
+
.error-icon {
|
|
20398
|
+
order: 1;
|
|
20399
|
+
padding-right: calc(${standardPadding} / 4);
|
|
20400
|
+
}
|
|
20377
20401
|
`.withBehaviors(appearanceBehavior(NumberFieldAppearance.underline, css `
|
|
20378
20402
|
.root {
|
|
20379
20403
|
border-bottom-width: ${borderWidth};
|
|
20380
|
-
padding-
|
|
20381
|
-
padding-left: ${borderWidth};
|
|
20382
|
-
padding-right: ${borderWidth};
|
|
20383
|
-
}
|
|
20384
|
-
|
|
20385
|
-
.control {
|
|
20386
|
-
height: calc(${controlHeight} - 2 * ${borderWidth});
|
|
20404
|
+
padding-bottom: 0;
|
|
20387
20405
|
}
|
|
20388
20406
|
`), appearanceBehavior(NumberFieldAppearance.block, css `
|
|
20389
20407
|
.root {
|
|
20390
20408
|
background-color: rgba(${borderRgbPartialColor}, 0.1);
|
|
20391
|
-
padding-left: ${borderWidth};
|
|
20392
|
-
padding-right: ${borderWidth};
|
|
20393
20409
|
}
|
|
20394
20410
|
|
|
20395
20411
|
.root:focus-within,
|
|
20396
20412
|
:host(.invalid) .root {
|
|
20397
20413
|
border-bottom-width: ${borderWidth};
|
|
20414
|
+
padding-bottom: 0;
|
|
20415
|
+
}
|
|
20416
|
+
|
|
20417
|
+
:host(:hover) .root {
|
|
20418
|
+
padding-bottom: 0;
|
|
20398
20419
|
}
|
|
20399
20420
|
|
|
20400
20421
|
:host([disabled]) .root {
|
|
@@ -20403,10 +20424,7 @@
|
|
|
20403
20424
|
`), appearanceBehavior(NumberFieldAppearance.outline, css `
|
|
20404
20425
|
.root {
|
|
20405
20426
|
border-width: ${borderWidth};
|
|
20406
|
-
|
|
20407
|
-
|
|
20408
|
-
.control {
|
|
20409
|
-
height: calc(${controlHeight} - 2 * ${borderWidth});
|
|
20427
|
+
padding: 0;
|
|
20410
20428
|
}
|
|
20411
20429
|
`));
|
|
20412
20430
|
|
|
@@ -20427,6 +20445,9 @@
|
|
|
20427
20445
|
__decorate([
|
|
20428
20446
|
attr
|
|
20429
20447
|
], NumberField.prototype, "appearance", void 0);
|
|
20448
|
+
__decorate([
|
|
20449
|
+
attr({ attribute: 'error-text' })
|
|
20450
|
+
], NumberField.prototype, "errorText", void 0);
|
|
20430
20451
|
/**
|
|
20431
20452
|
* A function that returns a number-field registration for configuring the component with a DesignSystem.
|
|
20432
20453
|
*
|
|
@@ -20464,18 +20485,69 @@
|
|
|
20464
20485
|
"Increment"
|
|
20465
20486
|
<nimble-icon-add slot="start"></nimble-icon-add>
|
|
20466
20487
|
</nimble-button>
|
|
20488
|
+
`,
|
|
20489
|
+
end: html `
|
|
20490
|
+
<nimble-icon-exclamation-mark
|
|
20491
|
+
class="error-icon fail"
|
|
20492
|
+
></nimble-icon-exclamation-mark>
|
|
20493
|
+
${errorTextTemplate}
|
|
20467
20494
|
`
|
|
20468
20495
|
});
|
|
20469
20496
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleNumberField());
|
|
20470
20497
|
|
|
20498
|
+
({
|
|
20499
|
+
above: SelectPosition.above,
|
|
20500
|
+
below: SelectPosition.below
|
|
20501
|
+
});
|
|
20502
|
+
const DropdownAppearance = {
|
|
20503
|
+
underline: 'underline',
|
|
20504
|
+
outline: 'outline',
|
|
20505
|
+
block: 'block'
|
|
20506
|
+
};
|
|
20507
|
+
|
|
20471
20508
|
const styles$b = css `
|
|
20472
20509
|
${styles$l}
|
|
20473
|
-
|
|
20510
|
+
`.withBehaviors(appearanceBehavior(DropdownAppearance.underline, css `
|
|
20511
|
+
.control {
|
|
20512
|
+
padding-top: ${borderWidth};
|
|
20513
|
+
padding-left: calc(${borderWidth} + ${standardPadding} / 2);
|
|
20514
|
+
padding-right: ${borderWidth};
|
|
20515
|
+
}
|
|
20516
|
+
|
|
20517
|
+
:host([disabled]) .control {
|
|
20518
|
+
border-color: rgba(${borderRgbPartialColor}, 0.1);
|
|
20519
|
+
}
|
|
20520
|
+
`), appearanceBehavior(DropdownAppearance.outline, css `
|
|
20521
|
+
.control {
|
|
20522
|
+
border: ${borderWidth} solid rgba(${borderRgbPartialColor}, 0.3);
|
|
20523
|
+
}
|
|
20524
|
+
|
|
20525
|
+
:host(.invalid) .errortext {
|
|
20526
|
+
top: calc(${controlHeight} - ${borderWidth});
|
|
20527
|
+
}
|
|
20528
|
+
`), appearanceBehavior(DropdownAppearance.block, css `
|
|
20529
|
+
.control {
|
|
20530
|
+
background-color: rgba(${borderRgbPartialColor}, 0.1);
|
|
20531
|
+
padding-left: calc(${borderWidth} + ${standardPadding} / 2);
|
|
20532
|
+
padding-right: ${borderWidth};
|
|
20533
|
+
padding-bottom: calc(${borderWidth});
|
|
20534
|
+
border-bottom: ${borderWidth}
|
|
20535
|
+
rgba(${borderRgbPartialColor}, 0.07);
|
|
20536
|
+
}
|
|
20537
|
+
|
|
20538
|
+
:host([disabled]) .control {
|
|
20539
|
+
background-color: rgba(${borderRgbPartialColor}, 0.07);
|
|
20540
|
+
}
|
|
20541
|
+
`));
|
|
20474
20542
|
|
|
20475
20543
|
/**
|
|
20476
|
-
* A nimble-
|
|
20544
|
+
* A nimble-styled HTML select
|
|
20477
20545
|
*/
|
|
20478
20546
|
class Select extends Select$1 {
|
|
20547
|
+
constructor() {
|
|
20548
|
+
super(...arguments);
|
|
20549
|
+
this.appearance = DropdownAppearance.underline;
|
|
20550
|
+
}
|
|
20479
20551
|
// Workaround for https://github.com/microsoft/fast/issues/5123
|
|
20480
20552
|
setPositioning() {
|
|
20481
20553
|
if (!this.$fastController.isConnected) {
|
|
@@ -20503,6 +20575,9 @@
|
|
|
20503
20575
|
}
|
|
20504
20576
|
}
|
|
20505
20577
|
}
|
|
20578
|
+
__decorate([
|
|
20579
|
+
attr
|
|
20580
|
+
], Select.prototype, "appearance", void 0);
|
|
20506
20581
|
const nimbleSelect = Select.compose({
|
|
20507
20582
|
baseName: 'select',
|
|
20508
20583
|
baseClass: Select$1,
|
|
@@ -21148,6 +21223,7 @@
|
|
|
21148
21223
|
justify-content: center;
|
|
21149
21224
|
border: 0px solid rgba(${borderRgbPartialColor}, 0.3);
|
|
21150
21225
|
gap: calc(${standardPadding} / 2);
|
|
21226
|
+
padding: ${borderWidth};
|
|
21151
21227
|
}
|
|
21152
21228
|
|
|
21153
21229
|
:host([readonly]) .root {
|
|
@@ -21209,7 +21285,7 @@
|
|
|
21209
21285
|
background: transparent;
|
|
21210
21286
|
color: inherit;
|
|
21211
21287
|
padding: 0px;
|
|
21212
|
-
height:
|
|
21288
|
+
height: var(--ni-private-height-within-border);
|
|
21213
21289
|
width: 100%;
|
|
21214
21290
|
margin-top: auto;
|
|
21215
21291
|
margin-bottom: auto;
|
|
@@ -21241,10 +21317,6 @@
|
|
|
21241
21317
|
color: ${controlLabelFontColor};
|
|
21242
21318
|
}
|
|
21243
21319
|
|
|
21244
|
-
.control:not([readonly]):focus-within::placeholder {
|
|
21245
|
-
opacity: 1;
|
|
21246
|
-
}
|
|
21247
|
-
|
|
21248
21320
|
.control[disabled]::placeholder {
|
|
21249
21321
|
color: ${bodyDisabledFontColor};
|
|
21250
21322
|
}
|
|
@@ -21293,13 +21365,7 @@
|
|
|
21293
21365
|
`.withBehaviors(appearanceBehavior(TextFieldAppearance.underline, css `
|
|
21294
21366
|
.root {
|
|
21295
21367
|
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};
|
|
21368
|
+
padding-bottom: 0;
|
|
21303
21369
|
}
|
|
21304
21370
|
`), appearanceBehavior(TextFieldAppearance.block, css `
|
|
21305
21371
|
.root {
|
|
@@ -21314,11 +21380,11 @@
|
|
|
21314
21380
|
.root:focus-within,
|
|
21315
21381
|
:host(.invalid) .root {
|
|
21316
21382
|
border-bottom-width: ${borderWidth};
|
|
21383
|
+
padding-bottom: 0;
|
|
21317
21384
|
}
|
|
21318
21385
|
|
|
21319
|
-
.root
|
|
21320
|
-
|
|
21321
|
-
height: calc(${controlHeight} - ${borderWidth});
|
|
21386
|
+
:host(:hover) .root {
|
|
21387
|
+
padding-bottom: 0;
|
|
21322
21388
|
}
|
|
21323
21389
|
|
|
21324
21390
|
:host([readonly]) .root {
|
|
@@ -21332,10 +21398,7 @@
|
|
|
21332
21398
|
`), appearanceBehavior(TextFieldAppearance.outline, css `
|
|
21333
21399
|
.root {
|
|
21334
21400
|
border-width: ${borderWidth};
|
|
21335
|
-
|
|
21336
|
-
|
|
21337
|
-
.control {
|
|
21338
|
-
height: var(--ni-private-height-within-border);
|
|
21401
|
+
padding: 0;
|
|
21339
21402
|
}
|
|
21340
21403
|
`), appearanceBehavior(TextFieldAppearance.frameless, css `
|
|
21341
21404
|
.control {
|