@ni/nimble-components 11.6.0 → 11.7.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 +137 -49
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +903 -826
- 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/icon-base/styles.js +5 -1
- package/dist/esm/icon-base/styles.js.map +1 -1
- package/dist/esm/icon-base/types.d.ts +1 -0
- package/dist/esm/icon-base/types.js +2 -1
- package/dist/esm/icon-base/types.js.map +1 -1
- package/dist/esm/list-option/styles.js +2 -1
- package/dist/esm/list-option/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 +5 -1
- package/dist/esm/theme-provider/design-tokens.js.map +1 -1
- package/dist/esm/tooltip/index.js +2 -1
- package/dist/esm/tooltip/index.js.map +1 -1
- package/dist/esm/tooltip/styles.js +79 -5
- package/dist/esm/tooltip/styles.js.map +1 -1
- package/dist/esm/tooltip/template.d.ts +4 -0
- package/dist/esm/tooltip/template.js +35 -0
- package/dist/esm/tooltip/template.js.map +1 -0
- package/dist/esm/tooltip/types.d.ts +10 -0
- package/dist/esm/tooltip/types.js +10 -0
- package/dist/esm/tooltip/types.js.map +1 -0
- package/dist/tokens-internal.scss +6 -0
- package/dist/tokens.scss +3 -0
- package/package.json +1 -1
|
@@ -13138,37 +13138,6 @@
|
|
|
13138
13138
|
applyMixins(DelegatesARIAToolbar, ARIAGlobalStatesAndProperties);
|
|
13139
13139
|
applyMixins(Toolbar$1, StartEnd, DelegatesARIAToolbar);
|
|
13140
13140
|
|
|
13141
|
-
/**
|
|
13142
|
-
* Creates a template for the {@link @microsoft/fast-foundation#(Tooltip:class)} component using the provided prefix.
|
|
13143
|
-
* @public
|
|
13144
|
-
*/
|
|
13145
|
-
const tooltipTemplate = (context, definition) => {
|
|
13146
|
-
return html `
|
|
13147
|
-
${when(x => x.tooltipVisible, html `
|
|
13148
|
-
<${context.tagFor(AnchoredRegion$1)}
|
|
13149
|
-
fixed-placement="true"
|
|
13150
|
-
auto-update-mode="${x => x.autoUpdateMode}"
|
|
13151
|
-
vertical-positioning-mode="${x => x.verticalPositioningMode}"
|
|
13152
|
-
vertical-default-position="${x => x.verticalDefaultPosition}"
|
|
13153
|
-
vertical-inset="${x => x.verticalInset}"
|
|
13154
|
-
vertical-scaling="${x => x.verticalScaling}"
|
|
13155
|
-
horizontal-positioning-mode="${x => x.horizontalPositioningMode}"
|
|
13156
|
-
horizontal-default-position="${x => x.horizontalDefaultPosition}"
|
|
13157
|
-
horizontal-scaling="${x => x.horizontalScaling}"
|
|
13158
|
-
horizontal-inset="${x => x.horizontalInset}"
|
|
13159
|
-
vertical-viewport-lock="${x => x.horizontalViewportLock}"
|
|
13160
|
-
horizontal-viewport-lock="${x => x.verticalViewportLock}"
|
|
13161
|
-
dir="${x => x.currentDirection}"
|
|
13162
|
-
${ref("region")}
|
|
13163
|
-
>
|
|
13164
|
-
<div class="tooltip" part="tooltip" role="tooltip">
|
|
13165
|
-
<slot></slot>
|
|
13166
|
-
</div>
|
|
13167
|
-
</${context.tagFor(AnchoredRegion$1)}>
|
|
13168
|
-
`)}
|
|
13169
|
-
`;
|
|
13170
|
-
};
|
|
13171
|
-
|
|
13172
13141
|
/**
|
|
13173
13142
|
* Enumerates possible tooltip positions
|
|
13174
13143
|
*
|
|
@@ -14327,6 +14296,8 @@
|
|
|
14327
14296
|
* Do not edit directly
|
|
14328
14297
|
* Generated on Thu, 26 May 2022 18:20:05 GMT
|
|
14329
14298
|
*/
|
|
14299
|
+
const Information100DarkUi = "#a46eff";
|
|
14300
|
+
const Information100LightUi = "#804ad9";
|
|
14330
14301
|
const Warning100DarkUi = "#ff8126";
|
|
14331
14302
|
const Pass100LightUi = "#009921";
|
|
14332
14303
|
const Pass100DarkUi = "#00c12b";
|
|
@@ -14342,6 +14313,7 @@
|
|
|
14342
14313
|
const Black91 = "#161617";
|
|
14343
14314
|
const ForestGreen = "#074023";
|
|
14344
14315
|
const DigitalGreenLight = "#009b65";
|
|
14316
|
+
const BannerFail100DarkUi = "#d63434";
|
|
14345
14317
|
const Warning100LightUi = "#ff4b00";
|
|
14346
14318
|
const DigitalGreenDark = "#006b46";
|
|
14347
14319
|
const PowerGreen = "#32eb96";
|
|
@@ -14484,6 +14456,7 @@
|
|
|
14484
14456
|
failColor: 'fail-color',
|
|
14485
14457
|
warningColor: 'warning-color',
|
|
14486
14458
|
passColor: 'pass-color',
|
|
14459
|
+
informationColor: 'information-color',
|
|
14487
14460
|
borderHoverColor: 'border-hover-color',
|
|
14488
14461
|
iconColor: 'icon-color',
|
|
14489
14462
|
popupBoxShadowColor: 'popup-box-shadow-color',
|
|
@@ -14654,7 +14627,7 @@
|
|
|
14654
14627
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14655
14628
|
}
|
|
14656
14629
|
|
|
14657
|
-
const template$
|
|
14630
|
+
const template$6 = html `<slot></slot>`;
|
|
14658
14631
|
|
|
14659
14632
|
const styles$s = css `
|
|
14660
14633
|
:host {
|
|
@@ -14713,7 +14686,7 @@
|
|
|
14713
14686
|
const nimbleDesignSystemProvider = ThemeProvider.compose({
|
|
14714
14687
|
baseName: 'theme-provider',
|
|
14715
14688
|
styles: styles$s,
|
|
14716
|
-
template: template$
|
|
14689
|
+
template: template$6
|
|
14717
14690
|
});
|
|
14718
14691
|
DesignSystem.getOrCreate()
|
|
14719
14692
|
.withPrefix('nimble')
|
|
@@ -14747,12 +14720,13 @@
|
|
|
14747
14720
|
const failColor = DesignToken.create(styleNameFromTokenName(tokenNames.failColor)).withDefault((element) => getFailColorForTheme(element));
|
|
14748
14721
|
const warningColor = DesignToken.create(styleNameFromTokenName(tokenNames.warningColor)).withDefault((element) => getWarningColorForTheme(element));
|
|
14749
14722
|
const passColor = DesignToken.create(styleNameFromTokenName(tokenNames.passColor)).withDefault((element) => getPassColorForTheme(element));
|
|
14723
|
+
const informationColor = DesignToken.create(styleNameFromTokenName(tokenNames.informationColor)).withDefault((element) => getInformationColorForTheme(element));
|
|
14750
14724
|
const borderHoverColor = DesignToken.create(styleNameFromTokenName(tokenNames.borderHoverColor)).withDefault((element) => getColorForTheme(element, DigitalGreenLight, DigitalGreenLight, White));
|
|
14751
14725
|
// Component Color Tokens
|
|
14752
14726
|
const iconColor = DesignToken.create(styleNameFromTokenName(tokenNames.iconColor)).withDefault((element) => getColorForTheme(element, Black91, Black15, White));
|
|
14753
14727
|
const popupBoxShadowColor = DesignToken.create(styleNameFromTokenName(tokenNames.popupBoxShadowColor)).withDefault((element) => hexToRgbaCssColor(getColorForTheme(element, Black75, Black85, Black85), 0.3));
|
|
14754
14728
|
const popupBorderColor = DesignToken.create(styleNameFromTokenName(tokenNames.popupBorderColor)).withDefault((element) => hexToRgbaCssColor(getColorForTheme(element, Black91, Black15, White), 0.3));
|
|
14755
|
-
|
|
14729
|
+
DesignToken.create(styleNameFromTokenName(tokenNames.tooltipBackgroundColor)).withDefault((element) => getColorForTheme(element, Black15, Black85, ForestGreen));
|
|
14756
14730
|
// Component Sizing Tokens
|
|
14757
14731
|
const controlHeight = DesignToken.create(styleNameFromTokenName(tokenNames.controlHeight)).withDefault('32px');
|
|
14758
14732
|
const smallPadding = DesignToken.create(styleNameFromTokenName(tokenNames.smallPadding)).withDefault('4px');
|
|
@@ -14843,6 +14817,9 @@
|
|
|
14843
14817
|
function getPassColorForTheme(element) {
|
|
14844
14818
|
return getColorForTheme(element, Pass100LightUi, Pass100DarkUi, White);
|
|
14845
14819
|
}
|
|
14820
|
+
function getInformationColorForTheme(element) {
|
|
14821
|
+
return getColorForTheme(element, Information100LightUi, Information100DarkUi, White);
|
|
14822
|
+
}
|
|
14846
14823
|
function getDefaultLineColorForTheme(element) {
|
|
14847
14824
|
return getColorForTheme(element, Black91, Black15, White);
|
|
14848
14825
|
}
|
|
@@ -16180,7 +16157,7 @@
|
|
|
16180
16157
|
</div>
|
|
16181
16158
|
`;
|
|
16182
16159
|
|
|
16183
|
-
const template$
|
|
16160
|
+
const template$5 = html `
|
|
16184
16161
|
<template>
|
|
16185
16162
|
<div class="icon" :innerHTML=${x => x.icon.data}></div>
|
|
16186
16163
|
</template
|
|
@@ -16213,6 +16190,10 @@
|
|
|
16213
16190
|
${iconColor.cssCustomProperty}: ${passColor};
|
|
16214
16191
|
}
|
|
16215
16192
|
|
|
16193
|
+
:host(.information) {
|
|
16194
|
+
${iconColor.cssCustomProperty}: ${informationColor};
|
|
16195
|
+
}
|
|
16196
|
+
|
|
16216
16197
|
.icon svg {
|
|
16217
16198
|
fill: ${iconColor};
|
|
16218
16199
|
width: 100%;
|
|
@@ -16232,7 +16213,7 @@
|
|
|
16232
16213
|
const registerIcon = (baseName, iconClass) => {
|
|
16233
16214
|
const composedIcon = iconClass.compose({
|
|
16234
16215
|
baseName,
|
|
16235
|
-
template: template$
|
|
16216
|
+
template: template$5,
|
|
16236
16217
|
styles: styles$m,
|
|
16237
16218
|
baseClass: iconClass
|
|
16238
16219
|
});
|
|
@@ -16504,6 +16485,10 @@
|
|
|
16504
16485
|
bottom-border-width: var(--ni-private-bottom-border-width);
|
|
16505
16486
|
}
|
|
16506
16487
|
|
|
16488
|
+
.control:focus-within {
|
|
16489
|
+
border-bottom-color: ${borderHoverColor};
|
|
16490
|
+
}
|
|
16491
|
+
|
|
16507
16492
|
:host(.invalid) .control {
|
|
16508
16493
|
border-bottom: var(--ni-private-bottom-border-width) solid ${failColor};
|
|
16509
16494
|
}
|
|
@@ -19647,6 +19632,7 @@
|
|
|
19647
19632
|
font: ${bodyFont};
|
|
19648
19633
|
cursor: pointer;
|
|
19649
19634
|
justify-content: left;
|
|
19635
|
+
height: ${controlHeight};
|
|
19650
19636
|
}
|
|
19651
19637
|
|
|
19652
19638
|
.content {
|
|
@@ -19827,7 +19813,7 @@
|
|
|
19827
19813
|
}
|
|
19828
19814
|
`;
|
|
19829
19815
|
|
|
19830
|
-
const template$
|
|
19816
|
+
const template$4 = (context, definition) => html `
|
|
19831
19817
|
<div
|
|
19832
19818
|
role="button"
|
|
19833
19819
|
part="control"
|
|
@@ -19902,7 +19888,7 @@
|
|
|
19902
19888
|
applyMixins(ToggleButton, StartEnd, DelegatesARIAButton);
|
|
19903
19889
|
const nimbleToggleButton = ToggleButton.compose({
|
|
19904
19890
|
baseName: 'toggle-button',
|
|
19905
|
-
template: template$
|
|
19891
|
+
template: template$4,
|
|
19906
19892
|
styles: styles$e,
|
|
19907
19893
|
shadowOptions: {
|
|
19908
19894
|
delegatesFocus: true
|
|
@@ -19911,7 +19897,7 @@
|
|
|
19911
19897
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleToggleButton());
|
|
19912
19898
|
|
|
19913
19899
|
// prettier-ignore
|
|
19914
|
-
const template$
|
|
19900
|
+
const template$3 = context => html `
|
|
19915
19901
|
<template
|
|
19916
19902
|
?open="${x => x.open}"
|
|
19917
19903
|
@focusout="${(x, c) => x.focusoutHandler(c.event)}"
|
|
@@ -20119,7 +20105,7 @@
|
|
|
20119
20105
|
], MenuButton.prototype, "slottedMenus", void 0);
|
|
20120
20106
|
const nimbleMenuButton = MenuButton.compose({
|
|
20121
20107
|
baseName: 'menu-button',
|
|
20122
|
-
template: template$
|
|
20108
|
+
template: template$3,
|
|
20123
20109
|
styles: styles$f,
|
|
20124
20110
|
shadowOptions: {
|
|
20125
20111
|
delegatesFocus: true
|
|
@@ -20751,7 +20737,7 @@
|
|
|
20751
20737
|
`));
|
|
20752
20738
|
|
|
20753
20739
|
// prettier-ignore
|
|
20754
|
-
const template$
|
|
20740
|
+
const template$2 = html `
|
|
20755
20741
|
<template
|
|
20756
20742
|
role="switch"
|
|
20757
20743
|
aria-checked="${x => x.checked}"
|
|
@@ -20795,7 +20781,7 @@
|
|
|
20795
20781
|
const nimbleSwitch = Switch.compose({
|
|
20796
20782
|
baseClass: Switch$1,
|
|
20797
20783
|
baseName: 'switch',
|
|
20798
|
-
template: template$
|
|
20784
|
+
template: template$2,
|
|
20799
20785
|
styles: styles$a
|
|
20800
20786
|
});
|
|
20801
20787
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSwitch());
|
|
@@ -20994,7 +20980,7 @@
|
|
|
20994
20980
|
}
|
|
20995
20981
|
`;
|
|
20996
20982
|
|
|
20997
|
-
const template = html `
|
|
20983
|
+
const template$1 = html `
|
|
20998
20984
|
<template slot="end">
|
|
20999
20985
|
<div class="separator"></div>
|
|
21000
20986
|
<slot></slot>
|
|
@@ -21008,7 +20994,7 @@
|
|
|
21008
20994
|
}
|
|
21009
20995
|
const nimbleTabsToolbar = TabsToolbar.compose({
|
|
21010
20996
|
baseName: 'tabs-toolbar',
|
|
21011
|
-
template,
|
|
20997
|
+
template: template$1,
|
|
21012
20998
|
styles: styles$6
|
|
21013
20999
|
});
|
|
21014
21000
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTabsToolbar());
|
|
@@ -21514,22 +21500,124 @@
|
|
|
21514
21500
|
font: ${tooltipCaptionFont};
|
|
21515
21501
|
color: ${tooltipCaptionFontColor};
|
|
21516
21502
|
text-align: left;
|
|
21503
|
+
--ni-private-tooltip-border-color: ${hexToRgbaCssColor(Black91, 0.3)};
|
|
21504
|
+
--ni-private-tooltip-background-color: ${Black15};
|
|
21517
21505
|
}
|
|
21518
21506
|
|
|
21519
21507
|
.tooltip {
|
|
21520
21508
|
box-sizing: border-box;
|
|
21521
21509
|
flex-shrink: 0;
|
|
21522
21510
|
max-width: 440px;
|
|
21523
|
-
border: ${borderWidth} solid rgba(${borderRgbPartialColor}, 0.3);
|
|
21524
21511
|
box-shadow: 0px 3px 4px ${popupBoxShadowColor};
|
|
21525
|
-
|
|
21512
|
+
display: inline-flex;
|
|
21513
|
+
border: ${borderWidth} solid var(--ni-private-tooltip-border-color);
|
|
21514
|
+
background-color: var(--ni-private-tooltip-background-color);
|
|
21526
21515
|
padding-bottom: 6px;
|
|
21527
21516
|
padding-left: calc(${standardPadding} / 2);
|
|
21528
21517
|
padding-right: calc(${standardPadding} / 2);
|
|
21529
21518
|
padding-top: ${smallPadding};
|
|
21530
|
-
display: inline-flex;
|
|
21531
21519
|
}
|
|
21532
|
-
|
|
21520
|
+
|
|
21521
|
+
.status-icon {
|
|
21522
|
+
display: none;
|
|
21523
|
+
width: 14px;
|
|
21524
|
+
height: 14px;
|
|
21525
|
+
padding-right: 8px;
|
|
21526
|
+
}
|
|
21527
|
+
|
|
21528
|
+
:host(.fail.icon-visible) .fail {
|
|
21529
|
+
display: flex;
|
|
21530
|
+
flex: 0 0 auto;
|
|
21531
|
+
}
|
|
21532
|
+
|
|
21533
|
+
:host(.information.icon-visible) .information {
|
|
21534
|
+
display: flex;
|
|
21535
|
+
flex: 0 0 auto;
|
|
21536
|
+
}
|
|
21537
|
+
`.withBehaviors(
|
|
21538
|
+
/* Local Theme Behaviors for tooltip borders and backgrounds */
|
|
21539
|
+
themeBehavior(
|
|
21540
|
+
// Light Theme
|
|
21541
|
+
css `
|
|
21542
|
+
:host(.fail) {
|
|
21543
|
+
--ni-private-tooltip-border-color: ${BannerFail100DarkUi};
|
|
21544
|
+
--ni-private-tooltip-background-color: ${White};
|
|
21545
|
+
}
|
|
21546
|
+
|
|
21547
|
+
:host(.information) {
|
|
21548
|
+
--ni-private-tooltip-border-color: ${Information100LightUi};
|
|
21549
|
+
--ni-private-tooltip-background-color: ${White};
|
|
21550
|
+
}
|
|
21551
|
+
`,
|
|
21552
|
+
// Dark Theme
|
|
21553
|
+
css `
|
|
21554
|
+
:host {
|
|
21555
|
+
--ni-private-tooltip-border-color: ${hexToRgbaCssColor(Black15, 0.3)};
|
|
21556
|
+
--ni-private-tooltip-background-color: ${Black85};
|
|
21557
|
+
}
|
|
21558
|
+
|
|
21559
|
+
:host(.information) {
|
|
21560
|
+
--ni-private-tooltip-border-color: ${Information100DarkUi};
|
|
21561
|
+
}
|
|
21562
|
+
|
|
21563
|
+
:host(.fail) {
|
|
21564
|
+
--ni-private-tooltip-border-color: ${BannerFail100DarkUi};
|
|
21565
|
+
}
|
|
21566
|
+
`,
|
|
21567
|
+
// Color Theme
|
|
21568
|
+
css `
|
|
21569
|
+
.anchored-region {
|
|
21570
|
+
background-color: ${ForestGreen};
|
|
21571
|
+
}
|
|
21572
|
+
|
|
21573
|
+
:host {
|
|
21574
|
+
--ni-private-tooltip-border-color: ${hexToRgbaCssColor(White, 0.3)};
|
|
21575
|
+
--ni-private-tooltip-background-color: ${hexToRgbaCssColor(White, 0.15)};
|
|
21576
|
+
}
|
|
21577
|
+
|
|
21578
|
+
:host(.fail) {
|
|
21579
|
+
--ni-private-tooltip-border-color: ${White};
|
|
21580
|
+
}
|
|
21581
|
+
|
|
21582
|
+
:host(.information) {
|
|
21583
|
+
--ni-private-tooltip-border-color: ${White};
|
|
21584
|
+
}
|
|
21585
|
+
|
|
21586
|
+
.status-icon {
|
|
21587
|
+
opacity: 0.6;
|
|
21588
|
+
}
|
|
21589
|
+
`));
|
|
21590
|
+
|
|
21591
|
+
// prettier-ignore
|
|
21592
|
+
const template = context => {
|
|
21593
|
+
return html `
|
|
21594
|
+
${when(x => x.tooltipVisible, html `
|
|
21595
|
+
<${context.tagFor(AnchoredRegion)}
|
|
21596
|
+
class="anchored-region"
|
|
21597
|
+
fixed-placement="true"
|
|
21598
|
+
auto-update-mode="${x => x.autoUpdateMode}"
|
|
21599
|
+
vertical-positioning-mode="${x => x.verticalPositioningMode}"
|
|
21600
|
+
vertical-default-position="${x => x.verticalDefaultPosition}"
|
|
21601
|
+
vertical-inset="${x => x.verticalInset}"
|
|
21602
|
+
vertical-scaling="${x => x.verticalScaling}"
|
|
21603
|
+
horizontal-positioning-mode="${x => x.horizontalPositioningMode}"
|
|
21604
|
+
horizontal-default-position="${x => x.horizontalDefaultPosition}"
|
|
21605
|
+
horizontal-scaling="${x => x.horizontalScaling}"
|
|
21606
|
+
horizontal-inset="${x => x.horizontalInset}"
|
|
21607
|
+
vertical-viewport-lock="${x => x.horizontalViewportLock}"
|
|
21608
|
+
horizontal-viewport-lock="${x => x.verticalViewportLock}"
|
|
21609
|
+
dir="${x => x.currentDirection}"
|
|
21610
|
+
${ref('region')}
|
|
21611
|
+
>
|
|
21612
|
+
<div class="tooltip" part="tooltip" role="tooltip">
|
|
21613
|
+
<${context.tagFor(IconExclamationMark)} class="fail status-icon"></${context.tagFor(IconExclamationMark)}>
|
|
21614
|
+
<${context.tagFor(IconInfo)} class="information status-icon"></${context.tagFor(IconInfo)}>
|
|
21615
|
+
<slot></slot>
|
|
21616
|
+
</div>
|
|
21617
|
+
</${context.tagFor(AnchoredRegion)}>
|
|
21618
|
+
`)}
|
|
21619
|
+
`;
|
|
21620
|
+
};
|
|
21533
21621
|
|
|
21534
21622
|
/**
|
|
21535
21623
|
* A nimble-styled tooltip control.
|
|
@@ -21539,7 +21627,7 @@
|
|
|
21539
21627
|
const nimbleTooltip = Tooltip.compose({
|
|
21540
21628
|
baseName: 'tooltip',
|
|
21541
21629
|
baseClass: Tooltip$1,
|
|
21542
|
-
template
|
|
21630
|
+
template,
|
|
21543
21631
|
styles: styles$2
|
|
21544
21632
|
});
|
|
21545
21633
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTooltip());
|