@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.
- package/dist/all-components-bundle.js +56 -42
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +52 -43
- 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/package.json +1 -1
|
@@ -20244,6 +20244,7 @@
|
|
|
20244
20244
|
|
|
20245
20245
|
const styles$c = css `
|
|
20246
20246
|
${display('inline-block')}
|
|
20247
|
+
${styles$k}
|
|
20247
20248
|
|
|
20248
20249
|
:host {
|
|
20249
20250
|
font: ${bodyFont};
|
|
@@ -20252,6 +20253,9 @@
|
|
|
20252
20253
|
color: ${bodyFontColor};
|
|
20253
20254
|
height: calc(${labelHeight} + ${controlHeight});
|
|
20254
20255
|
--ni-private-hover-indicator-width: calc(${borderWidth} + 1px);
|
|
20256
|
+
--ni-private-height-within-border: calc(
|
|
20257
|
+
${controlHeight} - 2 * ${borderWidth}
|
|
20258
|
+
);
|
|
20255
20259
|
}
|
|
20256
20260
|
|
|
20257
20261
|
:host([disabled]) {
|
|
@@ -20275,9 +20279,10 @@
|
|
|
20275
20279
|
display: flex;
|
|
20276
20280
|
flex-direction: row;
|
|
20277
20281
|
justify-content: center;
|
|
20282
|
+
align-items: center;
|
|
20278
20283
|
border-radius: 0px;
|
|
20279
20284
|
border: 0px solid rgba(${borderRgbPartialColor}, 0.3);
|
|
20280
|
-
|
|
20285
|
+
padding: ${borderWidth};
|
|
20281
20286
|
}
|
|
20282
20287
|
|
|
20283
20288
|
.root:focus-within {
|
|
@@ -20288,6 +20293,10 @@
|
|
|
20288
20293
|
border-color: rgba(${borderRgbPartialColor}, 0.1);
|
|
20289
20294
|
}
|
|
20290
20295
|
|
|
20296
|
+
:host(.invalid) .root {
|
|
20297
|
+
border-bottom-color: ${failColor};
|
|
20298
|
+
}
|
|
20299
|
+
|
|
20291
20300
|
.root::before {
|
|
20292
20301
|
${ /* Empty string causes alignment issue */''}
|
|
20293
20302
|
content: ' ';
|
|
@@ -20334,10 +20343,11 @@
|
|
|
20334
20343
|
font: inherit;
|
|
20335
20344
|
background: transparent;
|
|
20336
20345
|
color: inherit;
|
|
20337
|
-
height:
|
|
20346
|
+
height: var(--ni-private-height-within-border);
|
|
20338
20347
|
width: 100%;
|
|
20339
20348
|
border: none;
|
|
20340
20349
|
padding: 0px;
|
|
20350
|
+
padding-left: calc(${standardPadding} / 2);
|
|
20341
20351
|
}
|
|
20342
20352
|
|
|
20343
20353
|
.control:hover,
|
|
@@ -20356,45 +20366,55 @@
|
|
|
20356
20366
|
color: ${controlLabelFontColor};
|
|
20357
20367
|
}
|
|
20358
20368
|
|
|
20359
|
-
.control:focus-within::placeholder {
|
|
20360
|
-
opacity: 1;
|
|
20361
|
-
}
|
|
20362
|
-
|
|
20363
20369
|
.control[disabled]::placeholder {
|
|
20364
20370
|
color: ${bodyDisabledFontColor};
|
|
20365
20371
|
}
|
|
20366
20372
|
|
|
20367
20373
|
.controls {
|
|
20368
|
-
display:
|
|
20369
|
-
|
|
20370
|
-
|
|
20371
|
-
|
|
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;
|
|
20372
20386
|
}
|
|
20373
20387
|
|
|
20374
20388
|
.step-up-down-button {
|
|
20375
20389
|
${controlHeight.cssCustomProperty}: 24px;
|
|
20376
20390
|
}
|
|
20391
|
+
|
|
20392
|
+
[part='end'] {
|
|
20393
|
+
display: contents;
|
|
20394
|
+
}
|
|
20395
|
+
|
|
20396
|
+
.error-icon {
|
|
20397
|
+
order: 1;
|
|
20398
|
+
padding-right: calc(${standardPadding} / 4);
|
|
20399
|
+
}
|
|
20377
20400
|
`.withBehaviors(appearanceBehavior(NumberFieldAppearance.underline, css `
|
|
20378
20401
|
.root {
|
|
20379
20402
|
border-bottom-width: ${borderWidth};
|
|
20380
|
-
padding-
|
|
20381
|
-
padding-left: ${borderWidth};
|
|
20382
|
-
padding-right: ${borderWidth};
|
|
20383
|
-
}
|
|
20384
|
-
|
|
20385
|
-
.control {
|
|
20386
|
-
height: calc(${controlHeight} - 2 * ${borderWidth});
|
|
20403
|
+
padding-bottom: 0;
|
|
20387
20404
|
}
|
|
20388
20405
|
`), appearanceBehavior(NumberFieldAppearance.block, css `
|
|
20389
20406
|
.root {
|
|
20390
20407
|
background-color: rgba(${borderRgbPartialColor}, 0.1);
|
|
20391
|
-
padding-left: ${borderWidth};
|
|
20392
|
-
padding-right: ${borderWidth};
|
|
20393
20408
|
}
|
|
20394
20409
|
|
|
20395
20410
|
.root:focus-within,
|
|
20396
20411
|
:host(.invalid) .root {
|
|
20397
20412
|
border-bottom-width: ${borderWidth};
|
|
20413
|
+
padding-bottom: 0;
|
|
20414
|
+
}
|
|
20415
|
+
|
|
20416
|
+
:host(:hover) .root {
|
|
20417
|
+
padding-bottom: 0;
|
|
20398
20418
|
}
|
|
20399
20419
|
|
|
20400
20420
|
:host([disabled]) .root {
|
|
@@ -20403,10 +20423,7 @@
|
|
|
20403
20423
|
`), appearanceBehavior(NumberFieldAppearance.outline, css `
|
|
20404
20424
|
.root {
|
|
20405
20425
|
border-width: ${borderWidth};
|
|
20406
|
-
|
|
20407
|
-
|
|
20408
|
-
.control {
|
|
20409
|
-
height: calc(${controlHeight} - 2 * ${borderWidth});
|
|
20426
|
+
padding: 0;
|
|
20410
20427
|
}
|
|
20411
20428
|
`));
|
|
20412
20429
|
|
|
@@ -20427,6 +20444,9 @@
|
|
|
20427
20444
|
__decorate([
|
|
20428
20445
|
attr
|
|
20429
20446
|
], NumberField.prototype, "appearance", void 0);
|
|
20447
|
+
__decorate([
|
|
20448
|
+
attr({ attribute: 'error-text' })
|
|
20449
|
+
], NumberField.prototype, "errorText", void 0);
|
|
20430
20450
|
/**
|
|
20431
20451
|
* A function that returns a number-field registration for configuring the component with a DesignSystem.
|
|
20432
20452
|
*
|
|
@@ -20464,6 +20484,12 @@
|
|
|
20464
20484
|
"Increment"
|
|
20465
20485
|
<nimble-icon-add slot="start"></nimble-icon-add>
|
|
20466
20486
|
</nimble-button>
|
|
20487
|
+
`,
|
|
20488
|
+
end: html `
|
|
20489
|
+
<nimble-icon-exclamation-mark
|
|
20490
|
+
class="error-icon fail"
|
|
20491
|
+
></nimble-icon-exclamation-mark>
|
|
20492
|
+
${errorTextTemplate}
|
|
20467
20493
|
`
|
|
20468
20494
|
});
|
|
20469
20495
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleNumberField());
|
|
@@ -21148,6 +21174,7 @@
|
|
|
21148
21174
|
justify-content: center;
|
|
21149
21175
|
border: 0px solid rgba(${borderRgbPartialColor}, 0.3);
|
|
21150
21176
|
gap: calc(${standardPadding} / 2);
|
|
21177
|
+
padding: ${borderWidth};
|
|
21151
21178
|
}
|
|
21152
21179
|
|
|
21153
21180
|
:host([readonly]) .root {
|
|
@@ -21209,7 +21236,7 @@
|
|
|
21209
21236
|
background: transparent;
|
|
21210
21237
|
color: inherit;
|
|
21211
21238
|
padding: 0px;
|
|
21212
|
-
height:
|
|
21239
|
+
height: var(--ni-private-height-within-border);
|
|
21213
21240
|
width: 100%;
|
|
21214
21241
|
margin-top: auto;
|
|
21215
21242
|
margin-bottom: auto;
|
|
@@ -21241,10 +21268,6 @@
|
|
|
21241
21268
|
color: ${controlLabelFontColor};
|
|
21242
21269
|
}
|
|
21243
21270
|
|
|
21244
|
-
.control:not([readonly]):focus-within::placeholder {
|
|
21245
|
-
opacity: 1;
|
|
21246
|
-
}
|
|
21247
|
-
|
|
21248
21271
|
.control[disabled]::placeholder {
|
|
21249
21272
|
color: ${bodyDisabledFontColor};
|
|
21250
21273
|
}
|
|
@@ -21293,13 +21316,7 @@
|
|
|
21293
21316
|
`.withBehaviors(appearanceBehavior(TextFieldAppearance.underline, css `
|
|
21294
21317
|
.root {
|
|
21295
21318
|
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};
|
|
21319
|
+
padding-bottom: 0;
|
|
21303
21320
|
}
|
|
21304
21321
|
`), appearanceBehavior(TextFieldAppearance.block, css `
|
|
21305
21322
|
.root {
|
|
@@ -21314,11 +21331,11 @@
|
|
|
21314
21331
|
.root:focus-within,
|
|
21315
21332
|
:host(.invalid) .root {
|
|
21316
21333
|
border-bottom-width: ${borderWidth};
|
|
21334
|
+
padding-bottom: 0;
|
|
21317
21335
|
}
|
|
21318
21336
|
|
|
21319
|
-
.root
|
|
21320
|
-
|
|
21321
|
-
height: calc(${controlHeight} - ${borderWidth});
|
|
21337
|
+
:host(:hover) .root {
|
|
21338
|
+
padding-bottom: 0;
|
|
21322
21339
|
}
|
|
21323
21340
|
|
|
21324
21341
|
:host([readonly]) .root {
|
|
@@ -21332,10 +21349,7 @@
|
|
|
21332
21349
|
`), appearanceBehavior(TextFieldAppearance.outline, css `
|
|
21333
21350
|
.root {
|
|
21334
21351
|
border-width: ${borderWidth};
|
|
21335
|
-
|
|
21336
|
-
|
|
21337
|
-
.control {
|
|
21338
|
-
height: var(--ni-private-height-within-border);
|
|
21352
|
+
padding: 0;
|
|
21339
21353
|
}
|
|
21340
21354
|
`), appearanceBehavior(TextFieldAppearance.frameless, css `
|
|
21341
21355
|
.control {
|