@ni/nimble-components 13.0.0 → 15.0.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 +149 -16
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +643 -550
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/all-components.d.ts +1 -1
- package/dist/esm/all-components.js +1 -1
- package/dist/esm/all-components.js.map +1 -1
- package/dist/esm/dialog/index.d.ts +17 -0
- package/dist/esm/dialog/index.js +30 -1
- package/dist/esm/dialog/index.js.map +1 -1
- package/dist/esm/dialog/styles.js +92 -4
- package/dist/esm/dialog/styles.js.map +1 -1
- package/dist/esm/dialog/template.js +20 -4
- package/dist/esm/dialog/template.js.map +1 -1
- package/dist/esm/{radio-button → radio}/index.d.ts +2 -2
- package/dist/esm/{radio-button → radio}/index.js +4 -4
- package/dist/esm/radio/index.js.map +1 -0
- package/dist/esm/{radio-button → radio}/styles.d.ts +0 -0
- package/dist/esm/{radio-button → radio}/styles.js +0 -0
- package/dist/esm/radio/styles.js.map +1 -0
- package/package.json +1 -1
- package/dist/esm/radio-button/index.js.map +0 -1
- package/dist/esm/radio-button/styles.js.map +0 -1
|
@@ -11554,7 +11554,7 @@
|
|
|
11554
11554
|
*
|
|
11555
11555
|
* @public
|
|
11556
11556
|
*/
|
|
11557
|
-
class Radio extends FormAssociatedRadio {
|
|
11557
|
+
class Radio$1 extends FormAssociatedRadio {
|
|
11558
11558
|
constructor() {
|
|
11559
11559
|
super();
|
|
11560
11560
|
/**
|
|
@@ -11639,13 +11639,13 @@
|
|
|
11639
11639
|
}
|
|
11640
11640
|
__decorate$1([
|
|
11641
11641
|
attr({ attribute: "readonly", mode: "boolean" })
|
|
11642
|
-
], Radio.prototype, "readOnly", void 0);
|
|
11642
|
+
], Radio$1.prototype, "readOnly", void 0);
|
|
11643
11643
|
__decorate$1([
|
|
11644
11644
|
observable
|
|
11645
|
-
], Radio.prototype, "name", void 0);
|
|
11645
|
+
], Radio$1.prototype, "name", void 0);
|
|
11646
11646
|
__decorate$1([
|
|
11647
11647
|
observable
|
|
11648
|
-
], Radio.prototype, "defaultSlottedNodes", void 0);
|
|
11648
|
+
], Radio$1.prototype, "defaultSlottedNodes", void 0);
|
|
11649
11649
|
|
|
11650
11650
|
/**
|
|
11651
11651
|
* a method to filter out any whitespace _only_ nodes, to be used inside a template
|
|
@@ -14908,7 +14908,7 @@
|
|
|
14908
14908
|
const [titlePlus1Font, titlePlus1FontColor, titlePlus1DisabledFontColor, titlePlus1FontFamily, titlePlus1FontWeight, titlePlus1FontSize, titlePlus1FontLineHeight, titlePlus1FallbackFontFamily] = createFontTokens(tokenNames.titlePlus1Font, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), Title2Family, Title2Weight, Title2Size, Title2LineHeight, 'sans-serif');
|
|
14909
14909
|
createFontTokens(tokenNames.titleFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), Title1Family, Title1Weight, Title1Size, Title1LineHeight, 'sans-serif');
|
|
14910
14910
|
createFontTokens(tokenNames.subtitlePlus1Font, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), Subtitle2Family, Subtitle2Weight, Subtitle2Size, Subtitle2LineHeight, 'sans-serif');
|
|
14911
|
-
createFontTokens(tokenNames.subtitleFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), Subtitle1Family, Subtitle1Weight, Subtitle1Size, Subtitle1LineHeight, 'sans-serif');
|
|
14911
|
+
const [subtitleFont, subtitleFontColor, subtitleDisabledFontColor, subtitleFontFamily, subtitleFontWeight, subtitleFontSize, subtitleFontLineHeight, subtitleFallbackFontFamily] = createFontTokens(tokenNames.subtitleFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), Subtitle1Family, Subtitle1Weight, Subtitle1Size, Subtitle1LineHeight, 'sans-serif');
|
|
14912
14912
|
createFontTokens(tokenNames.linkStandardFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), LinkLightUiFamily, LinkLightUiWeight, LinkLightUiSize, LinkLineHeight, 'sans-serif');
|
|
14913
14913
|
const [placeholderFont, placeholderFontColor, placeholderDisabledFontColor, placeholderFontFamily, placeholderFontWeight, placeholderFontSize, placeholderFontLineHeight, placeholderFallbackFontFamily] = createFontTokens(tokenNames.placeholderFont, (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.6), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), PlaceholderFamily, PlaceholderWeight, PlaceholderSize, PlaceholderLineHeight, 'sans-serif');
|
|
14914
14914
|
const [bodyEmphasizedFont, bodyEmphasizedFontColor, bodyEmphasizedDisabledFontColor, bodyEmphasizedFontFamily, bodyEmphasizedFontWeight, bodyEmphasizedFontSize, bodyEmphasizedFontLineHeight, bodyEmphasizedFallbackFontFamily] = createFontTokens(tokenNames.bodyEmphasizedFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), BodyEmphasizedFamily, BodyEmphasizedWeight, BodyEmphasizedSize, BodyEmphasizedLineHeight, 'sans-serif');
|
|
@@ -17307,10 +17307,98 @@
|
|
|
17307
17307
|
${display('grid')}
|
|
17308
17308
|
|
|
17309
17309
|
dialog {
|
|
17310
|
+
flex-direction: column;
|
|
17310
17311
|
background-color: ${applicationBackgroundColor};
|
|
17311
|
-
border:
|
|
17312
|
-
box-shadow: 0px
|
|
17313
|
-
|
|
17312
|
+
border: none;
|
|
17313
|
+
box-shadow: 0px 4px 8px #0000004d;
|
|
17314
|
+
padding: 0px;
|
|
17315
|
+
width: 400px;
|
|
17316
|
+
max-height: 600px;
|
|
17317
|
+
}
|
|
17318
|
+
|
|
17319
|
+
dialog[open] {
|
|
17320
|
+
display: flex;
|
|
17321
|
+
}
|
|
17322
|
+
|
|
17323
|
+
header {
|
|
17324
|
+
min-height: 48px;
|
|
17325
|
+
padding: 24px 24px 0px 24px;
|
|
17326
|
+
flex: none;
|
|
17327
|
+
display: flex;
|
|
17328
|
+
flex-direction: column;
|
|
17329
|
+
gap: ${smallPadding};
|
|
17330
|
+
}
|
|
17331
|
+
|
|
17332
|
+
:host([header-hidden]) header {
|
|
17333
|
+
${
|
|
17334
|
+
/**
|
|
17335
|
+
* Hide content visually while keeping it screen reader-accessible.
|
|
17336
|
+
* Source: https://webaim.org/techniques/css/invisiblecontent/#techniques
|
|
17337
|
+
* See discussion here: https://github.com/microsoft/fast/issues/5740#issuecomment-1068195035
|
|
17338
|
+
*/
|
|
17339
|
+
''}
|
|
17340
|
+
display: inline-block;
|
|
17341
|
+
height: 1px;
|
|
17342
|
+
width: 1px;
|
|
17343
|
+
position: absolute;
|
|
17344
|
+
margin: -1px;
|
|
17345
|
+
clip: rect(1px, 1px, 1px, 1px);
|
|
17346
|
+
clip-path: inset(50%);
|
|
17347
|
+
overflow: hidden;
|
|
17348
|
+
padding: 0;
|
|
17349
|
+
}
|
|
17350
|
+
|
|
17351
|
+
.title {
|
|
17352
|
+
font: ${titlePlus1Font};
|
|
17353
|
+
color: ${titlePlus1FontColor};
|
|
17354
|
+
overflow: hidden;
|
|
17355
|
+
text-overflow: ellipsis;
|
|
17356
|
+
white-space: nowrap;
|
|
17357
|
+
}
|
|
17358
|
+
|
|
17359
|
+
.subtitle {
|
|
17360
|
+
font: ${subtitleFont};
|
|
17361
|
+
color: ${subtitleFontColor};
|
|
17362
|
+
}
|
|
17363
|
+
|
|
17364
|
+
section {
|
|
17365
|
+
flex: auto;
|
|
17366
|
+
overflow-y: auto;
|
|
17367
|
+
font: ${bodyFont};
|
|
17368
|
+
color: ${bodyFontColor};
|
|
17369
|
+
display: flex;
|
|
17370
|
+
flex-direction: column;
|
|
17371
|
+
gap: ${standardPadding};
|
|
17372
|
+
|
|
17373
|
+
${
|
|
17374
|
+
/**
|
|
17375
|
+
* Use padding on all sides except the top because the padding is within
|
|
17376
|
+
* the scrollable area. The whole scrollable area, including the top of
|
|
17377
|
+
* the scrollbar, should be 24px away from the header, so use a margin
|
|
17378
|
+
* instead of padding for the top.
|
|
17379
|
+
*/
|
|
17380
|
+
''}
|
|
17381
|
+
padding: 0px 24px 24px 24px;
|
|
17382
|
+
margin-top: 24px;
|
|
17383
|
+
}
|
|
17384
|
+
|
|
17385
|
+
footer {
|
|
17386
|
+
border-top: 2px solid rgba(${actionRgbPartialColor}, 0.1);
|
|
17387
|
+
padding: 24px;
|
|
17388
|
+
flex: none;
|
|
17389
|
+
display: flex;
|
|
17390
|
+
justify-content: flex-end;
|
|
17391
|
+
gap: ${standardPadding};
|
|
17392
|
+
}
|
|
17393
|
+
|
|
17394
|
+
footer.empty {
|
|
17395
|
+
padding: 0px;
|
|
17396
|
+
height: 72px;
|
|
17397
|
+
border-top: none;
|
|
17398
|
+
}
|
|
17399
|
+
|
|
17400
|
+
:host([footer-hidden]) footer {
|
|
17401
|
+
display: none;
|
|
17314
17402
|
}
|
|
17315
17403
|
`.withBehaviors(
|
|
17316
17404
|
/*
|
|
@@ -17335,11 +17423,27 @@
|
|
|
17335
17423
|
<template>
|
|
17336
17424
|
<dialog
|
|
17337
17425
|
${ref('dialogElement')}
|
|
17338
|
-
role="
|
|
17339
|
-
aria-label="${x => x.ariaLabel}"
|
|
17426
|
+
role="dialog"
|
|
17340
17427
|
@cancel="${(x, c) => x.cancelHandler(c.event)}"
|
|
17428
|
+
aria-labelledby="header"
|
|
17341
17429
|
>
|
|
17342
|
-
<
|
|
17430
|
+
<header id="header">
|
|
17431
|
+
<div class="title">
|
|
17432
|
+
<slot name="title"></slot>
|
|
17433
|
+
</div>
|
|
17434
|
+
<div class="subtitle">
|
|
17435
|
+
<slot name="subtitle"></slot>
|
|
17436
|
+
</div>
|
|
17437
|
+
</header>
|
|
17438
|
+
<section>
|
|
17439
|
+
<slot></slot>
|
|
17440
|
+
</section>
|
|
17441
|
+
<footer class="${x => (x.footerIsEmpty ? 'empty' : '')}">
|
|
17442
|
+
<slot
|
|
17443
|
+
name="footer"
|
|
17444
|
+
${slotted({ property: 'slottedFooterElements' })}
|
|
17445
|
+
></slot>
|
|
17446
|
+
</footer>
|
|
17343
17447
|
</dialog>
|
|
17344
17448
|
</template>
|
|
17345
17449
|
`;
|
|
@@ -17357,6 +17461,20 @@
|
|
|
17357
17461
|
* Prevents dismissing the dialog via the Escape key
|
|
17358
17462
|
*/
|
|
17359
17463
|
this.preventDismiss = false;
|
|
17464
|
+
/**
|
|
17465
|
+
* @public
|
|
17466
|
+
* @description
|
|
17467
|
+
* Hides the header of the dialog.
|
|
17468
|
+
*/
|
|
17469
|
+
this.headerHidden = false;
|
|
17470
|
+
/**
|
|
17471
|
+
* @public
|
|
17472
|
+
* @description
|
|
17473
|
+
* Hides the footer of the dialog.
|
|
17474
|
+
*/
|
|
17475
|
+
this.footerHidden = false;
|
|
17476
|
+
/** @internal */
|
|
17477
|
+
this.footerIsEmpty = true;
|
|
17360
17478
|
}
|
|
17361
17479
|
/**
|
|
17362
17480
|
* True if the dialog is open/showing, false otherwise
|
|
@@ -17389,6 +17507,9 @@
|
|
|
17389
17507
|
this.resolveShow(reason);
|
|
17390
17508
|
this.resolveShow = undefined;
|
|
17391
17509
|
}
|
|
17510
|
+
slottedFooterElementsChanged(_prev, next) {
|
|
17511
|
+
this.footerIsEmpty = !next?.length;
|
|
17512
|
+
}
|
|
17392
17513
|
/**
|
|
17393
17514
|
* @internal
|
|
17394
17515
|
*/
|
|
@@ -17409,6 +17530,18 @@
|
|
|
17409
17530
|
__decorate([
|
|
17410
17531
|
attr({ attribute: 'prevent-dismiss', mode: 'boolean' })
|
|
17411
17532
|
], Dialog.prototype, "preventDismiss", void 0);
|
|
17533
|
+
__decorate([
|
|
17534
|
+
attr({ attribute: 'header-hidden', mode: 'boolean' })
|
|
17535
|
+
], Dialog.prototype, "headerHidden", void 0);
|
|
17536
|
+
__decorate([
|
|
17537
|
+
attr({ attribute: 'footer-hidden', mode: 'boolean' })
|
|
17538
|
+
], Dialog.prototype, "footerHidden", void 0);
|
|
17539
|
+
__decorate([
|
|
17540
|
+
observable
|
|
17541
|
+
], Dialog.prototype, "footerIsEmpty", void 0);
|
|
17542
|
+
__decorate([
|
|
17543
|
+
observable
|
|
17544
|
+
], Dialog.prototype, "slottedFooterElements", void 0);
|
|
17412
17545
|
applyMixins(Dialog, ARIAGlobalStatesAndProperties);
|
|
17413
17546
|
const nimbleDialog = Dialog.compose({
|
|
17414
17547
|
baseName: 'dialog',
|
|
@@ -20129,16 +20262,16 @@
|
|
|
20129
20262
|
/**
|
|
20130
20263
|
* A nimble-styled radio button
|
|
20131
20264
|
*/
|
|
20132
|
-
class
|
|
20265
|
+
class Radio extends Radio$1 {
|
|
20133
20266
|
}
|
|
20134
|
-
const
|
|
20135
|
-
baseName: 'radio
|
|
20136
|
-
baseClass: Radio,
|
|
20267
|
+
const nimbleRadio = Radio.compose({
|
|
20268
|
+
baseName: 'radio',
|
|
20269
|
+
baseClass: Radio$1,
|
|
20137
20270
|
template: radioTemplate,
|
|
20138
20271
|
styles: styles$d,
|
|
20139
20272
|
checkedIndicator: circleFilled16X16.data
|
|
20140
20273
|
});
|
|
20141
|
-
DesignSystem.getOrCreate().withPrefix('nimble').register(
|
|
20274
|
+
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadio());
|
|
20142
20275
|
|
|
20143
20276
|
const styles$c = css `
|
|
20144
20277
|
${display('inline-block')}
|