@ni/nimble-components 18.3.7 → 18.4.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 +748 -329
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +1840 -1574
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/all-components.d.ts +1 -0
- package/dist/esm/all-components.js +1 -0
- package/dist/esm/all-components.js.map +1 -1
- package/dist/esm/banner/index.d.ts +52 -0
- package/dist/esm/banner/index.js +73 -0
- package/dist/esm/banner/index.js.map +1 -0
- package/dist/esm/banner/styles.d.ts +1 -0
- package/dist/esm/banner/styles.js +165 -0
- package/dist/esm/banner/styles.js.map +1 -0
- package/dist/esm/banner/template.d.ts +2 -0
- package/dist/esm/banner/template.js +62 -0
- package/dist/esm/banner/template.js.map +1 -0
- package/dist/esm/banner/types.d.ts +11 -0
- package/dist/esm/banner/types.js +11 -0
- package/dist/esm/banner/types.js.map +1 -0
- package/dist/esm/table/components/cell/index.d.ts +6 -0
- package/dist/esm/table/components/cell/index.js +19 -1
- package/dist/esm/table/components/cell/index.js.map +1 -1
- package/dist/esm/table/components/cell/styles.js +7 -0
- package/dist/esm/table/components/cell/styles.js.map +1 -1
- package/dist/esm/table/components/cell/template.js +19 -1
- package/dist/esm/table/components/cell/template.js.map +1 -1
- package/dist/esm/table/components/row/index.d.ts +6 -0
- package/dist/esm/table/components/row/index.js +24 -0
- package/dist/esm/table/components/row/index.js.map +1 -1
- package/dist/esm/table/components/row/styles.js +13 -0
- package/dist/esm/table/components/row/styles.js.map +1 -1
- package/dist/esm/table/components/row/template.js +12 -1
- package/dist/esm/table/components/row/template.js.map +1 -1
- package/dist/esm/table/index.d.ts +11 -1
- package/dist/esm/table/index.js +24 -0
- package/dist/esm/table/index.js.map +1 -1
- package/dist/esm/table/models/virtualizer.js +4 -6
- package/dist/esm/table/models/virtualizer.js.map +1 -1
- package/dist/esm/table/styles.js +2 -3
- package/dist/esm/table/styles.js.map +1 -1
- package/dist/esm/table/template.js +11 -1
- package/dist/esm/table/template.js.map +1 -1
- package/dist/esm/table/types.d.ts +6 -0
- package/dist/esm/table-column/base/index.d.ts +3 -1
- package/dist/esm/table-column/base/index.js +6 -0
- package/dist/esm/table-column/base/index.js.map +1 -1
- package/dist/esm/theme-provider/design-token-comments.js +2 -0
- package/dist/esm/theme-provider/design-token-comments.js.map +1 -1
- package/dist/esm/theme-provider/design-token-names.js +2 -0
- package/dist/esm/theme-provider/design-token-names.js.map +1 -1
- package/dist/esm/theme-provider/design-tokens.d.ts +2 -0
- package/dist/esm/theme-provider/design-tokens.js +3 -1
- package/dist/esm/theme-provider/design-tokens.js.map +1 -1
- package/dist/tokens-internal.scss +12 -0
- package/dist/tokens.scss +6 -0
- package/package.json +1 -1
|
@@ -16446,6 +16446,7 @@
|
|
|
16446
16446
|
const Pass100DarkUi = "#00c12b";
|
|
16447
16447
|
const Fail100LightUi = "#c4000c";
|
|
16448
16448
|
const Fail100DarkUi = "#ff4646";
|
|
16449
|
+
const Black75 = "#818386";
|
|
16449
16450
|
const Black15 = "#f1f1f2";
|
|
16450
16451
|
const Black7 = "#f5f5f5";
|
|
16451
16452
|
const White = "#ffffff";
|
|
@@ -16585,6 +16586,7 @@
|
|
|
16585
16586
|
modalBackdropColor: 'modal-backdrop-color',
|
|
16586
16587
|
popupBorderColor: 'popup-border-color',
|
|
16587
16588
|
controlHeight: 'control-height',
|
|
16589
|
+
controlSlimHeight: 'control-slim-height',
|
|
16588
16590
|
smallPadding: 'small-padding',
|
|
16589
16591
|
standardPadding: 'standard-padding',
|
|
16590
16592
|
labelHeight: 'label-height',
|
|
@@ -16592,6 +16594,7 @@
|
|
|
16592
16594
|
iconSize: 'icon-size',
|
|
16593
16595
|
groupHeaderTextTransform: 'group-header-text-transform',
|
|
16594
16596
|
drawerWidth: 'drawer-width',
|
|
16597
|
+
bannerGapSize: 'banner-gap-size',
|
|
16595
16598
|
spinnerSmallHeight: 'spinner-small-height',
|
|
16596
16599
|
spinnerMediumHeight: 'spinner-medium-height',
|
|
16597
16600
|
spinnerLargeHeight: 'spinner-large-height',
|
|
@@ -16804,9 +16807,9 @@
|
|
|
16804
16807
|
return `${prefix}${uniqueIdCounter++}`;
|
|
16805
16808
|
}
|
|
16806
16809
|
|
|
16807
|
-
const template$
|
|
16810
|
+
const template$k = html `<slot></slot>`;
|
|
16808
16811
|
|
|
16809
|
-
const styles$
|
|
16812
|
+
const styles$J = css `
|
|
16810
16813
|
:host {
|
|
16811
16814
|
display: contents;
|
|
16812
16815
|
}
|
|
@@ -16862,8 +16865,8 @@
|
|
|
16862
16865
|
], ThemeProvider.prototype, "theme", void 0);
|
|
16863
16866
|
const nimbleDesignSystemProvider = ThemeProvider.compose({
|
|
16864
16867
|
baseName: 'theme-provider',
|
|
16865
|
-
styles: styles$
|
|
16866
|
-
template: template$
|
|
16868
|
+
styles: styles$J,
|
|
16869
|
+
template: template$k
|
|
16867
16870
|
});
|
|
16868
16871
|
DesignSystem.getOrCreate()
|
|
16869
16872
|
.withPrefix('nimble')
|
|
@@ -16895,12 +16898,14 @@
|
|
|
16895
16898
|
const tableRowBorderColor = DesignToken.create(styleNameFromTokenName(tokenNames.tableRowBorderColor)).withDefault((element) => getColorForTheme(element, Black15, Black88, ForestGreen));
|
|
16896
16899
|
// Component Sizing Tokens
|
|
16897
16900
|
const controlHeight = DesignToken.create(styleNameFromTokenName(tokenNames.controlHeight)).withDefault('32px');
|
|
16901
|
+
const controlSlimHeight = DesignToken.create(styleNameFromTokenName(tokenNames.controlSlimHeight)).withDefault('24px');
|
|
16898
16902
|
const smallPadding = DesignToken.create(styleNameFromTokenName(tokenNames.smallPadding)).withDefault('4px');
|
|
16899
16903
|
const standardPadding = DesignToken.create(styleNameFromTokenName(tokenNames.standardPadding)).withDefault('16px');
|
|
16900
16904
|
DesignToken.create(styleNameFromTokenName(tokenNames.labelHeight)).withDefault('16px');
|
|
16901
16905
|
const borderWidth = DesignToken.create(styleNameFromTokenName(tokenNames.borderWidth)).withDefault('1px');
|
|
16902
16906
|
const iconSize = DesignToken.create(styleNameFromTokenName(tokenNames.iconSize)).withDefault('16px');
|
|
16903
16907
|
const drawerWidth = DesignToken.create(styleNameFromTokenName(tokenNames.drawerWidth)).withDefault('784px');
|
|
16908
|
+
DesignToken.create(styleNameFromTokenName(tokenNames.bannerGapSize)).withDefault('1px');
|
|
16904
16909
|
const spinnerSmallHeight = DesignToken.create(styleNameFromTokenName(tokenNames.spinnerSmallHeight)).withDefault('16px');
|
|
16905
16910
|
DesignToken.create(styleNameFromTokenName(tokenNames.spinnerMediumHeight)).withDefault('32px');
|
|
16906
16911
|
DesignToken.create(styleNameFromTokenName(tokenNames.spinnerLargeHeight)).withDefault('64px');
|
|
@@ -17025,7 +17030,7 @@
|
|
|
17025
17030
|
}
|
|
17026
17031
|
}
|
|
17027
17032
|
|
|
17028
|
-
const styles$
|
|
17033
|
+
const styles$I = css `
|
|
17029
17034
|
${display('inline')}
|
|
17030
17035
|
|
|
17031
17036
|
:host {
|
|
@@ -17108,7 +17113,7 @@
|
|
|
17108
17113
|
`;
|
|
17109
17114
|
|
|
17110
17115
|
// prettier-ignore
|
|
17111
|
-
const template$
|
|
17116
|
+
const template$j = (context, definition) => html `
|
|
17112
17117
|
<a
|
|
17113
17118
|
class="control"
|
|
17114
17119
|
part="control"
|
|
@@ -17181,8 +17186,8 @@
|
|
|
17181
17186
|
const nimbleAnchor = Anchor.compose({
|
|
17182
17187
|
baseName: 'anchor',
|
|
17183
17188
|
baseClass: Anchor$1,
|
|
17184
|
-
template: template$
|
|
17185
|
-
styles: styles$
|
|
17189
|
+
template: template$j,
|
|
17190
|
+
styles: styles$I,
|
|
17186
17191
|
shadowOptions: {
|
|
17187
17192
|
delegatesFocus: true
|
|
17188
17193
|
}
|
|
@@ -17267,7 +17272,7 @@
|
|
|
17267
17272
|
return new MultivaluePropertyStyleSheetBehavior('appearance', value, styles);
|
|
17268
17273
|
}
|
|
17269
17274
|
|
|
17270
|
-
const styles$
|
|
17275
|
+
const styles$H = css `
|
|
17271
17276
|
${display('inline-flex')}
|
|
17272
17277
|
|
|
17273
17278
|
:host {
|
|
@@ -17548,8 +17553,8 @@
|
|
|
17548
17553
|
}
|
|
17549
17554
|
`));
|
|
17550
17555
|
|
|
17551
|
-
const styles$
|
|
17552
|
-
${styles$
|
|
17556
|
+
const styles$G = css `
|
|
17557
|
+
${styles$H}
|
|
17553
17558
|
${buttonAppearanceVariantStyles}
|
|
17554
17559
|
|
|
17555
17560
|
.control {
|
|
@@ -17557,7 +17562,7 @@
|
|
|
17557
17562
|
}
|
|
17558
17563
|
`;
|
|
17559
17564
|
|
|
17560
|
-
const template$
|
|
17565
|
+
const template$i = (context, definition) => html `
|
|
17561
17566
|
<a
|
|
17562
17567
|
class="control"
|
|
17563
17568
|
part="control"
|
|
@@ -17639,15 +17644,15 @@
|
|
|
17639
17644
|
], AnchorButton.prototype, "disabled", void 0);
|
|
17640
17645
|
const nimbleAnchorButton = AnchorButton.compose({
|
|
17641
17646
|
baseName: 'anchor-button',
|
|
17642
|
-
template: template$
|
|
17643
|
-
styles: styles$
|
|
17647
|
+
template: template$i,
|
|
17648
|
+
styles: styles$G,
|
|
17644
17649
|
shadowOptions: {
|
|
17645
17650
|
delegatesFocus: true
|
|
17646
17651
|
}
|
|
17647
17652
|
});
|
|
17648
17653
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorButton());
|
|
17649
17654
|
|
|
17650
|
-
const styles$
|
|
17655
|
+
const styles$F = css `
|
|
17651
17656
|
${display('inline-flex')}
|
|
17652
17657
|
|
|
17653
17658
|
:host {
|
|
@@ -17753,8 +17758,8 @@
|
|
|
17753
17758
|
}
|
|
17754
17759
|
`;
|
|
17755
17760
|
|
|
17756
|
-
const styles$
|
|
17757
|
-
${styles$
|
|
17761
|
+
const styles$E = css `
|
|
17762
|
+
${styles$F}
|
|
17758
17763
|
|
|
17759
17764
|
a {
|
|
17760
17765
|
text-decoration: none;
|
|
@@ -17764,7 +17769,7 @@
|
|
|
17764
17769
|
}
|
|
17765
17770
|
`;
|
|
17766
17771
|
|
|
17767
|
-
const template$
|
|
17772
|
+
const template$h = () => html `
|
|
17768
17773
|
<template slot="anchortab" role="tab" aria-disabled="${x => x.disabled}">
|
|
17769
17774
|
<a
|
|
17770
17775
|
download="${x => x.download}"
|
|
@@ -17802,12 +17807,12 @@
|
|
|
17802
17807
|
], AnchorTab.prototype, "disabled", void 0);
|
|
17803
17808
|
const nimbleAnchorTab = AnchorTab.compose({
|
|
17804
17809
|
baseName: 'anchor-tab',
|
|
17805
|
-
template: template$
|
|
17806
|
-
styles: styles$
|
|
17810
|
+
template: template$h,
|
|
17811
|
+
styles: styles$E
|
|
17807
17812
|
});
|
|
17808
17813
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTab());
|
|
17809
17814
|
|
|
17810
|
-
const styles$
|
|
17815
|
+
const styles$D = css `
|
|
17811
17816
|
${display('grid')}
|
|
17812
17817
|
|
|
17813
17818
|
:host {
|
|
@@ -17825,7 +17830,7 @@
|
|
|
17825
17830
|
}
|
|
17826
17831
|
`;
|
|
17827
17832
|
|
|
17828
|
-
const template$
|
|
17833
|
+
const template$g = (context, definition) => html `
|
|
17829
17834
|
${startSlotTemplate(context, definition)}
|
|
17830
17835
|
<div ${ref('tablist')} class="tablist" part="tablist" role="tablist">
|
|
17831
17836
|
<slot name="anchortab" ${slotted('tabs')}></slot>
|
|
@@ -18022,15 +18027,15 @@
|
|
|
18022
18027
|
applyMixins(AnchorTabs, StartEnd);
|
|
18023
18028
|
const nimbleAnchorTabs = AnchorTabs.compose({
|
|
18024
18029
|
baseName: 'anchor-tabs',
|
|
18025
|
-
template: template$
|
|
18026
|
-
styles: styles$
|
|
18030
|
+
template: template$g,
|
|
18031
|
+
styles: styles$D,
|
|
18027
18032
|
shadowOptions: {
|
|
18028
18033
|
delegatesFocus: false
|
|
18029
18034
|
}
|
|
18030
18035
|
});
|
|
18031
18036
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTabs());
|
|
18032
18037
|
|
|
18033
|
-
const styles$
|
|
18038
|
+
const styles$C = css `
|
|
18034
18039
|
:host {
|
|
18035
18040
|
contain: layout;
|
|
18036
18041
|
display: block;
|
|
@@ -18054,56 +18059,296 @@
|
|
|
18054
18059
|
baseName: 'anchored-region',
|
|
18055
18060
|
baseClass: AnchoredRegion$1,
|
|
18056
18061
|
template: anchoredRegionTemplate,
|
|
18057
|
-
styles: styles$
|
|
18062
|
+
styles: styles$C
|
|
18058
18063
|
});
|
|
18059
18064
|
DesignSystem.getOrCreate()
|
|
18060
18065
|
.withPrefix('nimble')
|
|
18061
18066
|
.register(nimbleAnchoredRegion());
|
|
18062
18067
|
|
|
18063
|
-
|
|
18064
|
-
|
|
18068
|
+
/**
|
|
18069
|
+
* Subscription for {@link ThemeStyleSheetBehavior}
|
|
18070
|
+
*/
|
|
18071
|
+
class ThemeStyleSheetBehaviorSubscription {
|
|
18072
|
+
constructor(value, styles, source) {
|
|
18073
|
+
this.value = value;
|
|
18074
|
+
this.styles = styles;
|
|
18075
|
+
this.source = source;
|
|
18076
|
+
}
|
|
18077
|
+
handleChange() {
|
|
18078
|
+
const theme$1 = theme.getValueFor(this.source);
|
|
18079
|
+
if (Array.isArray(this.value)
|
|
18080
|
+
? this.value.includes(theme$1)
|
|
18081
|
+
: this.value === theme$1) {
|
|
18082
|
+
this.source.$fastController.addStyles(this.styles);
|
|
18083
|
+
}
|
|
18084
|
+
else {
|
|
18085
|
+
this.source.$fastController.removeStyles(this.styles);
|
|
18086
|
+
}
|
|
18087
|
+
}
|
|
18088
|
+
}
|
|
18089
|
+
/**
|
|
18090
|
+
* Behavior to conditionally apply theme-based stylesheets.
|
|
18091
|
+
*/
|
|
18092
|
+
class ThemeStyleSheetBehavior {
|
|
18093
|
+
constructor(theme, styles) {
|
|
18094
|
+
this.theme = theme;
|
|
18095
|
+
this.styles = styles;
|
|
18096
|
+
this.cache = new WeakMap();
|
|
18097
|
+
}
|
|
18098
|
+
/**
|
|
18099
|
+
* @internal
|
|
18100
|
+
*/
|
|
18101
|
+
bind(source) {
|
|
18102
|
+
const subscriber = this.cache.get(source)
|
|
18103
|
+
|| new ThemeStyleSheetBehaviorSubscription(this.theme, this.styles, source);
|
|
18104
|
+
// Currently subscriber from cache may have gone through unbind
|
|
18105
|
+
// but still be in cache so always resubscribe
|
|
18106
|
+
// See: https://github.com/microsoft/fast/issues/3246#issuecomment-1030424876
|
|
18107
|
+
theme.subscribe(subscriber, source);
|
|
18108
|
+
subscriber.handleChange();
|
|
18109
|
+
this.cache.set(source, subscriber);
|
|
18110
|
+
}
|
|
18111
|
+
/**
|
|
18112
|
+
* @internal
|
|
18113
|
+
*/
|
|
18114
|
+
unbind(source) {
|
|
18115
|
+
const subscriber = this.cache.get(source);
|
|
18116
|
+
if (subscriber) {
|
|
18117
|
+
theme.unsubscribe(subscriber);
|
|
18118
|
+
}
|
|
18119
|
+
// Currently does not evict subscriber from cache
|
|
18120
|
+
// See: https://github.com/microsoft/fast/issues/3246#issuecomment-1030424876
|
|
18121
|
+
}
|
|
18122
|
+
}
|
|
18123
|
+
/**
|
|
18124
|
+
* Behavior to conditionally apply theme-based stylesheets. To determine which to apply,
|
|
18125
|
+
* the behavior will use the nearest ThemeProvider's 'theme' design system value.
|
|
18126
|
+
*
|
|
18127
|
+
* @public
|
|
18128
|
+
* @example
|
|
18129
|
+
* ```ts
|
|
18130
|
+
* css`
|
|
18131
|
+
* // ...
|
|
18132
|
+
* `.withBehaviors(
|
|
18133
|
+
* themeBehavior(Theme.light, css` ... `),
|
|
18134
|
+
* // Apply style for both dark and color theme
|
|
18135
|
+
* themeBehavior([Theme.dark, Theme.color], css` ... `)
|
|
18136
|
+
* )
|
|
18137
|
+
* ```
|
|
18138
|
+
*/
|
|
18139
|
+
const themeBehavior = (theme, styles) => new ThemeStyleSheetBehavior(theme, styles);
|
|
18140
|
+
|
|
18141
|
+
const styles$B = css `
|
|
18142
|
+
${display('flex')}
|
|
18065
18143
|
|
|
18066
18144
|
:host {
|
|
18067
|
-
|
|
18068
|
-
font:
|
|
18069
|
-
|
|
18070
|
-
|
|
18145
|
+
font: ${bodyFont};
|
|
18146
|
+
font-size: 12.8px;
|
|
18147
|
+
align-items: top;
|
|
18148
|
+
overflow: hidden;
|
|
18149
|
+
color: ${White};
|
|
18150
|
+
${iconColor.cssCustomProperty}: ${hexToRgbaCssColor(White, 0.6)};
|
|
18071
18151
|
}
|
|
18072
18152
|
|
|
18073
|
-
:host([
|
|
18074
|
-
|
|
18075
|
-
--ni-private-breadcrumb-link-active-font-color: ${linkActiveProminentFontColor};
|
|
18153
|
+
:host(:not([open])) {
|
|
18154
|
+
display: none;
|
|
18076
18155
|
}
|
|
18077
18156
|
|
|
18078
|
-
.
|
|
18157
|
+
.container {
|
|
18079
18158
|
display: flex;
|
|
18080
|
-
|
|
18159
|
+
width: 100%;
|
|
18081
18160
|
}
|
|
18082
18161
|
|
|
18083
|
-
|
|
18084
|
-
|
|
18162
|
+
.icon {
|
|
18163
|
+
width: 48px;
|
|
18164
|
+
display: flex;
|
|
18165
|
+
justify-content: center;
|
|
18166
|
+
margin-top: 8px;
|
|
18167
|
+
flex: 0 0 auto;
|
|
18085
18168
|
}
|
|
18086
18169
|
|
|
18087
|
-
|
|
18088
|
-
|
|
18170
|
+
.text {
|
|
18171
|
+
display: inline;
|
|
18172
|
+
margin-top: 7px;
|
|
18173
|
+
margin-bottom: 7px;
|
|
18174
|
+
}
|
|
18175
|
+
|
|
18176
|
+
slot[name='title'] {
|
|
18177
|
+
display: inline;
|
|
18178
|
+
font-weight: bold;
|
|
18179
|
+
padding-right: 8px;
|
|
18180
|
+
white-space: nowrap;
|
|
18181
|
+
}
|
|
18182
|
+
|
|
18183
|
+
:host([title-hidden]) slot[name='title'] {
|
|
18184
|
+
${
|
|
18185
|
+
/**
|
|
18186
|
+
* Hide content visually while keeping it screen reader-accessible.
|
|
18187
|
+
* Source: https://webaim.org/techniques/css/invisiblecontent/#techniques
|
|
18188
|
+
* See discussion here: https://github.com/microsoft/fast/issues/5740#issuecomment-1068195035
|
|
18189
|
+
*/
|
|
18190
|
+
''}
|
|
18191
|
+
display: inline-block;
|
|
18192
|
+
height: 1px;
|
|
18193
|
+
width: 1px;
|
|
18194
|
+
position: absolute;
|
|
18195
|
+
margin: -1px;
|
|
18196
|
+
clip: rect(1px, 1px, 1px, 1px);
|
|
18197
|
+
clip-path: inset(50%);
|
|
18198
|
+
overflow: hidden;
|
|
18199
|
+
padding: 0;
|
|
18200
|
+
}
|
|
18201
|
+
|
|
18202
|
+
.controls {
|
|
18203
|
+
height: ${controlHeight};
|
|
18204
|
+
margin-left: auto;
|
|
18205
|
+
display: flex;
|
|
18206
|
+
align-items: center;
|
|
18207
|
+
justify-content: center;
|
|
18208
|
+
align-self: flex-start;
|
|
18209
|
+
}
|
|
18210
|
+
|
|
18211
|
+
slot[name='action'] {
|
|
18212
|
+
display: flex;
|
|
18213
|
+
align-content: center;
|
|
18214
|
+
margin-left: ${standardPadding};
|
|
18215
|
+
white-space: nowrap;
|
|
18216
|
+
}
|
|
18217
|
+
|
|
18218
|
+
slot[name='action']::slotted(nimble-anchor) {
|
|
18219
|
+
${linkFontColor.cssCustomProperty}: ${White};
|
|
18220
|
+
${linkDisabledFontColor.cssCustomProperty}: ${White};
|
|
18221
|
+
${linkActiveFontColor.cssCustomProperty}: ${hexToRgbaCssColor(White, 0.6)};
|
|
18222
|
+
font-size: 12.8px;
|
|
18223
|
+
}
|
|
18224
|
+
|
|
18225
|
+
slot[name='action']::slotted(nimble-button) {
|
|
18226
|
+
${controlHeight.cssCustomProperty}: ${controlSlimHeight};
|
|
18227
|
+
${buttonLabelFontColor.cssCustomProperty}: ${White};
|
|
18228
|
+
${fillSelectedColor.cssCustomProperty}: ${hexToRgbaCssColor(White, 0.2)};
|
|
18229
|
+
${borderHoverColor.cssCustomProperty}: ${White};
|
|
18230
|
+
}
|
|
18231
|
+
|
|
18232
|
+
slot[name='action']::slotted(nimble-button[appearance='outline']) {
|
|
18233
|
+
${actionRgbPartialColor.cssCustomProperty}: ${White}
|
|
18234
|
+
}
|
|
18235
|
+
|
|
18236
|
+
.dismiss {
|
|
18237
|
+
width: 48px;
|
|
18238
|
+
display: flex;
|
|
18239
|
+
justify-content: center;
|
|
18240
|
+
}
|
|
18241
|
+
|
|
18242
|
+
.dismiss nimble-button {
|
|
18243
|
+
${controlHeight.cssCustomProperty}: 16px;
|
|
18244
|
+
${iconSize.cssCustomProperty}: 14px;
|
|
18245
|
+
${buttonLabelFontColor.cssCustomProperty}: ${White};
|
|
18246
|
+
${borderHoverColor.cssCustomProperty}: transparent;
|
|
18247
|
+
${fillSelectedColor.cssCustomProperty}: ${hexToRgbaCssColor(White, 0.2)};
|
|
18248
|
+
}
|
|
18249
|
+
|
|
18250
|
+
.dismiss nimble-button:focus-within {
|
|
18251
|
+
outline: 2px solid ${White};
|
|
18252
|
+
}
|
|
18253
|
+
|
|
18254
|
+
.dismiss nimble-button:hover {
|
|
18255
|
+
background: ${hexToRgbaCssColor(White, 0.2)};
|
|
18089
18256
|
}
|
|
18257
|
+
`.withBehaviors(themeBehavior(Theme.light, css `
|
|
18258
|
+
:host {
|
|
18259
|
+
background: ${Black75};
|
|
18260
|
+
}
|
|
18261
|
+
|
|
18262
|
+
:host([severity='error']) {
|
|
18263
|
+
background: ${Fail100LightUi};
|
|
18264
|
+
}
|
|
18265
|
+
|
|
18266
|
+
:host([severity='warning']) {
|
|
18267
|
+
background: ${Warning100LightUi};
|
|
18268
|
+
}
|
|
18269
|
+
|
|
18270
|
+
:host([severity='information']) {
|
|
18271
|
+
background: ${Information100LightUi};
|
|
18272
|
+
}
|
|
18273
|
+
`), themeBehavior(Theme.dark, css `
|
|
18274
|
+
:host {
|
|
18275
|
+
background: ${Black75};
|
|
18276
|
+
}
|
|
18277
|
+
|
|
18278
|
+
:host([severity='error']) {
|
|
18279
|
+
background: ${BannerFail100DarkUi};
|
|
18280
|
+
}
|
|
18281
|
+
|
|
18282
|
+
:host([severity='warning']) {
|
|
18283
|
+
background: ${Warning100DarkUi};
|
|
18284
|
+
}
|
|
18285
|
+
|
|
18286
|
+
:host([severity='information']) {
|
|
18287
|
+
background: ${Information100DarkUi};
|
|
18288
|
+
}
|
|
18289
|
+
`), themeBehavior(Theme.color, css `
|
|
18290
|
+
:host {
|
|
18291
|
+
background: ${applicationBackgroundColor};
|
|
18292
|
+
}
|
|
18293
|
+
|
|
18294
|
+
.container {
|
|
18295
|
+
background: ${hexToRgbaCssColor(White, 0.3)};
|
|
18296
|
+
}
|
|
18297
|
+
`));
|
|
18298
|
+
|
|
18299
|
+
const styles$A = css `
|
|
18300
|
+
${styles$H}
|
|
18301
|
+
${buttonAppearanceVariantStyles}
|
|
18090
18302
|
`;
|
|
18091
18303
|
|
|
18092
18304
|
/**
|
|
18093
|
-
* A nimble-styled
|
|
18305
|
+
* A nimble-styled HTML button
|
|
18094
18306
|
*/
|
|
18095
|
-
class
|
|
18307
|
+
class Button extends Button$1 {
|
|
18308
|
+
constructor() {
|
|
18309
|
+
super(...arguments);
|
|
18310
|
+
/**
|
|
18311
|
+
* @public
|
|
18312
|
+
* @remarks
|
|
18313
|
+
* HTML Attribute: appearance
|
|
18314
|
+
*/
|
|
18315
|
+
this.appearance = ButtonAppearance.outline;
|
|
18316
|
+
/**
|
|
18317
|
+
* @public
|
|
18318
|
+
* @remarks
|
|
18319
|
+
* HTML Attribute: content-hidden
|
|
18320
|
+
*/
|
|
18321
|
+
this.contentHidden = false;
|
|
18322
|
+
}
|
|
18096
18323
|
}
|
|
18097
18324
|
__decorate$1([
|
|
18098
18325
|
attr
|
|
18099
|
-
],
|
|
18100
|
-
|
|
18101
|
-
|
|
18102
|
-
|
|
18103
|
-
|
|
18104
|
-
|
|
18326
|
+
], Button.prototype, "appearance", void 0);
|
|
18327
|
+
__decorate$1([
|
|
18328
|
+
attr({ attribute: 'appearance-variant' })
|
|
18329
|
+
], Button.prototype, "appearanceVariant", void 0);
|
|
18330
|
+
__decorate$1([
|
|
18331
|
+
attr({ attribute: 'content-hidden', mode: 'boolean' })
|
|
18332
|
+
], Button.prototype, "contentHidden", void 0);
|
|
18333
|
+
/**
|
|
18334
|
+
* A function that returns a nimble-button registration for configuring the component with a DesignSystem.
|
|
18335
|
+
* Implements {@link @microsoft/fast-foundation#buttonTemplate}
|
|
18336
|
+
*
|
|
18337
|
+
* @public
|
|
18338
|
+
* @remarks
|
|
18339
|
+
* Generates HTML Element: \<nimble-button\>
|
|
18340
|
+
*
|
|
18341
|
+
*/
|
|
18342
|
+
const nimbleButton = Button.compose({
|
|
18343
|
+
baseName: 'button',
|
|
18344
|
+
baseClass: Button$1,
|
|
18345
|
+
template: buttonTemplate,
|
|
18346
|
+
styles: styles$A,
|
|
18347
|
+
shadowOptions: {
|
|
18348
|
+
delegatesFocus: true
|
|
18349
|
+
}
|
|
18105
18350
|
});
|
|
18106
|
-
DesignSystem.getOrCreate().withPrefix('nimble').register(
|
|
18351
|
+
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleButton());
|
|
18107
18352
|
|
|
18108
18353
|
/* 🤖 this file was generated by svg-to-ts */
|
|
18109
18354
|
const add16X16 = {
|
|
@@ -18719,9 +18964,296 @@
|
|
|
18719
18964
|
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path class="cls-1" d="M8.033 14.026 4.9 10.866 6.277 9.53l1.744 1.81 4.562-4.507 1.307 1.363Zm1.155-10.68-1.321-1.32-2.312 2.311-2.311-2.311-1.321 1.32 2.311 2.312L1.923 7.97l1.32 1.32 2.312-2.31 2.312 2.31 1.32-1.32-2.31-2.312Z"/></svg>`
|
|
18720
18965
|
};
|
|
18721
18966
|
|
|
18967
|
+
const template$f = html `
|
|
18968
|
+
<template>
|
|
18969
|
+
<div class="icon" :innerHTML=${x => x.icon.data}></div>
|
|
18970
|
+
</template
|
|
18971
|
+
`;
|
|
18972
|
+
|
|
18722
18973
|
const styles$z = css `
|
|
18723
18974
|
${display('inline-flex')}
|
|
18724
18975
|
|
|
18976
|
+
:host {
|
|
18977
|
+
align-items: center;
|
|
18978
|
+
user-select: none;
|
|
18979
|
+
width: ${iconSize};
|
|
18980
|
+
height: ${iconSize};
|
|
18981
|
+
}
|
|
18982
|
+
|
|
18983
|
+
.icon {
|
|
18984
|
+
width: 100%;
|
|
18985
|
+
height: 100%;
|
|
18986
|
+
}
|
|
18987
|
+
|
|
18988
|
+
:host([severity='error']) {
|
|
18989
|
+
${iconColor.cssCustomProperty}: ${failColor};
|
|
18990
|
+
}
|
|
18991
|
+
|
|
18992
|
+
:host([severity='warning']) {
|
|
18993
|
+
${iconColor.cssCustomProperty}: ${warningColor};
|
|
18994
|
+
}
|
|
18995
|
+
|
|
18996
|
+
:host([severity='success']) {
|
|
18997
|
+
${iconColor.cssCustomProperty}: ${passColor};
|
|
18998
|
+
}
|
|
18999
|
+
|
|
19000
|
+
:host([severity='information']) {
|
|
19001
|
+
${iconColor.cssCustomProperty}: ${informationColor};
|
|
19002
|
+
}
|
|
19003
|
+
|
|
19004
|
+
.icon svg {
|
|
19005
|
+
fill: ${iconColor};
|
|
19006
|
+
width: 100%;
|
|
19007
|
+
height: 100%;
|
|
19008
|
+
}
|
|
19009
|
+
`;
|
|
19010
|
+
|
|
19011
|
+
/**
|
|
19012
|
+
* The base class for icon components
|
|
19013
|
+
*/
|
|
19014
|
+
class Icon extends FoundationElement {
|
|
19015
|
+
constructor(/** @internal */ icon) {
|
|
19016
|
+
super();
|
|
19017
|
+
this.icon = icon;
|
|
19018
|
+
}
|
|
19019
|
+
}
|
|
19020
|
+
__decorate$1([
|
|
19021
|
+
attr
|
|
19022
|
+
], Icon.prototype, "severity", void 0);
|
|
19023
|
+
const registerIcon = (baseName, iconClass) => {
|
|
19024
|
+
const composedIcon = iconClass.compose({
|
|
19025
|
+
baseName,
|
|
19026
|
+
template: template$f,
|
|
19027
|
+
styles: styles$z,
|
|
19028
|
+
baseClass: iconClass
|
|
19029
|
+
});
|
|
19030
|
+
DesignSystem.getOrCreate().withPrefix('nimble').register(composedIcon());
|
|
19031
|
+
};
|
|
19032
|
+
|
|
19033
|
+
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
19034
|
+
/**
|
|
19035
|
+
* The icon component for the 'exclamationMark' icon
|
|
19036
|
+
*/
|
|
19037
|
+
class IconExclamationMark extends Icon {
|
|
19038
|
+
constructor() {
|
|
19039
|
+
super(exclamationMark16X16);
|
|
19040
|
+
}
|
|
19041
|
+
}
|
|
19042
|
+
registerIcon('icon-exclamation-mark', IconExclamationMark);
|
|
19043
|
+
|
|
19044
|
+
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
19045
|
+
/**
|
|
19046
|
+
* The icon component for the 'info' icon
|
|
19047
|
+
*/
|
|
19048
|
+
class IconInfo extends Icon {
|
|
19049
|
+
constructor() {
|
|
19050
|
+
super(info16X16);
|
|
19051
|
+
}
|
|
19052
|
+
}
|
|
19053
|
+
registerIcon('icon-info', IconInfo);
|
|
19054
|
+
|
|
19055
|
+
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
19056
|
+
/**
|
|
19057
|
+
* The icon component for the 'triangleFilled' icon
|
|
19058
|
+
*/
|
|
19059
|
+
class IconTriangleFilled extends Icon {
|
|
19060
|
+
constructor() {
|
|
19061
|
+
super(triangleFilled16X16);
|
|
19062
|
+
}
|
|
19063
|
+
}
|
|
19064
|
+
registerIcon('icon-triangle-filled', IconTriangleFilled);
|
|
19065
|
+
|
|
19066
|
+
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
19067
|
+
/**
|
|
19068
|
+
* The icon component for the 'xmark' icon
|
|
19069
|
+
*/
|
|
19070
|
+
class IconXmark extends Icon {
|
|
19071
|
+
constructor() {
|
|
19072
|
+
super(xmark16X16);
|
|
19073
|
+
}
|
|
19074
|
+
}
|
|
19075
|
+
registerIcon('icon-xmark', IconXmark);
|
|
19076
|
+
|
|
19077
|
+
/**
|
|
19078
|
+
* Severities of banners.
|
|
19079
|
+
* @public
|
|
19080
|
+
*/
|
|
19081
|
+
const BannerSeverity = {
|
|
19082
|
+
default: undefined,
|
|
19083
|
+
error: 'error',
|
|
19084
|
+
warning: 'warning',
|
|
19085
|
+
information: 'information'
|
|
19086
|
+
};
|
|
19087
|
+
|
|
19088
|
+
// prettier-ignore
|
|
19089
|
+
const template$e = html `
|
|
19090
|
+
<div class="container"
|
|
19091
|
+
role="status"
|
|
19092
|
+
aria-atomic="${x => x.ariaAtomic}"
|
|
19093
|
+
aria-busy="${x => x.ariaBusy}"
|
|
19094
|
+
aria-controls="${x => x.ariaControls}"
|
|
19095
|
+
aria-current="${x => x.ariaCurrent}"
|
|
19096
|
+
aria-describedby="${x => x.ariaDescribedby}"
|
|
19097
|
+
aria-details="${x => x.ariaDetails}"
|
|
19098
|
+
aria-disabled="${x => x.ariaDisabled}"
|
|
19099
|
+
aria-errormessage="${x => x.ariaErrormessage}"
|
|
19100
|
+
aria-expanded="${x => x.ariaExpanded}"
|
|
19101
|
+
aria-flowto="${x => x.ariaFlowto}"
|
|
19102
|
+
aria-haspopup="${x => x.ariaHaspopup}"
|
|
19103
|
+
aria-hidden="${x => x.ariaHidden}"
|
|
19104
|
+
aria-invalid="${x => x.ariaInvalid}"
|
|
19105
|
+
aria-keyshortcuts="${x => x.ariaKeyshortcuts}"
|
|
19106
|
+
aria-label="${x => x.ariaLabel}"
|
|
19107
|
+
aria-labelledby="titleSlot"
|
|
19108
|
+
aria-live="${x => x.ariaLive}"
|
|
19109
|
+
aria-owns="${x => x.ariaOwns}"
|
|
19110
|
+
aria-relevant="${x => x.ariaRelevant}"
|
|
19111
|
+
aria-roledescription="${x => x.ariaRoledescription}"
|
|
19112
|
+
>
|
|
19113
|
+
<div class="icon">
|
|
19114
|
+
${when(x => x.severity === BannerSeverity.error, html `
|
|
19115
|
+
<${DesignSystem.tagFor(IconExclamationMark)}></${DesignSystem.tagFor(IconExclamationMark)}>
|
|
19116
|
+
`)}
|
|
19117
|
+
${when(x => x.severity === BannerSeverity.warning, html `
|
|
19118
|
+
<${DesignSystem.tagFor(IconTriangleFilled)}></${DesignSystem.tagFor(IconTriangleFilled)}>
|
|
19119
|
+
`)}
|
|
19120
|
+
${when(x => x.severity === BannerSeverity.information, html `
|
|
19121
|
+
<${DesignSystem.tagFor(IconInfo)}></${DesignSystem.tagFor(IconInfo)}>
|
|
19122
|
+
`)}
|
|
19123
|
+
</div>
|
|
19124
|
+
<div class="text">
|
|
19125
|
+
<slot name="title" id="titleSlot"></slot>
|
|
19126
|
+
<slot></slot>
|
|
19127
|
+
</div>
|
|
19128
|
+
<div class="controls">
|
|
19129
|
+
<slot name="action"></slot>
|
|
19130
|
+
<div class="dismiss">
|
|
19131
|
+
${when(x => !x.preventDismiss, html `
|
|
19132
|
+
<${DesignSystem.tagFor(Button)} appearance="ghost" content-hidden @click="${x => x.dismissBanner()}">
|
|
19133
|
+
<${DesignSystem.tagFor(IconXmark)} slot="start"></${DesignSystem.tagFor(IconXmark)}>
|
|
19134
|
+
${x => x.dismissButtonLabel ?? 'Close'}
|
|
19135
|
+
</${DesignSystem.tagFor(Button)}>
|
|
19136
|
+
`)}
|
|
19137
|
+
</div>
|
|
19138
|
+
</div>
|
|
19139
|
+
</div>
|
|
19140
|
+
`;
|
|
19141
|
+
|
|
19142
|
+
/**
|
|
19143
|
+
* A nimble-styled notification banner for persistent messages.
|
|
19144
|
+
*/
|
|
19145
|
+
class Banner extends FoundationElement {
|
|
19146
|
+
constructor() {
|
|
19147
|
+
super(...arguments);
|
|
19148
|
+
/**
|
|
19149
|
+
* @public
|
|
19150
|
+
* @description
|
|
19151
|
+
* Whether the banner is visible or not
|
|
19152
|
+
*/
|
|
19153
|
+
this.open = false;
|
|
19154
|
+
/**
|
|
19155
|
+
* @public
|
|
19156
|
+
* @description
|
|
19157
|
+
* Severity of the banner's message
|
|
19158
|
+
*/
|
|
19159
|
+
this.severity = BannerSeverity.default;
|
|
19160
|
+
/**
|
|
19161
|
+
* @public
|
|
19162
|
+
* @description
|
|
19163
|
+
* Whether the banner title is hidden
|
|
19164
|
+
*/
|
|
19165
|
+
this.titleHidden = false;
|
|
19166
|
+
/**
|
|
19167
|
+
* @public
|
|
19168
|
+
* @description
|
|
19169
|
+
* Hides the dismiss button
|
|
19170
|
+
*/
|
|
19171
|
+
this.preventDismiss = false;
|
|
19172
|
+
}
|
|
19173
|
+
/**
|
|
19174
|
+
* @internal
|
|
19175
|
+
*/
|
|
19176
|
+
openChanged() {
|
|
19177
|
+
this.$emit('toggle', { oldState: !this.open, newState: this.open });
|
|
19178
|
+
}
|
|
19179
|
+
/**
|
|
19180
|
+
* @internal
|
|
19181
|
+
*/
|
|
19182
|
+
dismissBanner() {
|
|
19183
|
+
this.open = false;
|
|
19184
|
+
}
|
|
19185
|
+
}
|
|
19186
|
+
__decorate$1([
|
|
19187
|
+
attr({ mode: 'boolean' })
|
|
19188
|
+
], Banner.prototype, "open", void 0);
|
|
19189
|
+
__decorate$1([
|
|
19190
|
+
attr()
|
|
19191
|
+
], Banner.prototype, "severity", void 0);
|
|
19192
|
+
__decorate$1([
|
|
19193
|
+
attr({ attribute: 'title-hidden', mode: 'boolean' })
|
|
19194
|
+
], Banner.prototype, "titleHidden", void 0);
|
|
19195
|
+
__decorate$1([
|
|
19196
|
+
attr({ attribute: 'prevent-dismiss', mode: 'boolean' })
|
|
19197
|
+
], Banner.prototype, "preventDismiss", void 0);
|
|
19198
|
+
__decorate$1([
|
|
19199
|
+
attr({ attribute: 'dismiss-button-label' })
|
|
19200
|
+
], Banner.prototype, "dismissButtonLabel", void 0);
|
|
19201
|
+
applyMixins(Banner, ARIAGlobalStatesAndProperties);
|
|
19202
|
+
const nimbleBanner = Banner.compose({
|
|
19203
|
+
baseName: 'banner',
|
|
19204
|
+
template: template$e,
|
|
19205
|
+
styles: styles$B
|
|
19206
|
+
});
|
|
19207
|
+
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBanner());
|
|
19208
|
+
|
|
19209
|
+
const styles$y = css `
|
|
19210
|
+
${display('inline-block')}
|
|
19211
|
+
|
|
19212
|
+
:host {
|
|
19213
|
+
box-sizing: border-box;
|
|
19214
|
+
font: ${linkFont};
|
|
19215
|
+
--ni-private-breadcrumb-link-font-color: ${linkFontColor};
|
|
19216
|
+
--ni-private-breadcrumb-link-active-font-color: ${linkActiveFontColor};
|
|
19217
|
+
}
|
|
19218
|
+
|
|
19219
|
+
:host([appearance='prominent']) {
|
|
19220
|
+
--ni-private-breadcrumb-link-font-color: ${linkProminentFontColor};
|
|
19221
|
+
--ni-private-breadcrumb-link-active-font-color: ${linkActiveProminentFontColor};
|
|
19222
|
+
}
|
|
19223
|
+
|
|
19224
|
+
.list {
|
|
19225
|
+
display: flex;
|
|
19226
|
+
flex-wrap: wrap;
|
|
19227
|
+
}
|
|
19228
|
+
|
|
19229
|
+
::slotted(*:first-child) {
|
|
19230
|
+
padding-left: 0px;
|
|
19231
|
+
}
|
|
19232
|
+
|
|
19233
|
+
::slotted(*:not([href]):last-child) {
|
|
19234
|
+
font: ${bodyEmphasizedFont};
|
|
19235
|
+
}
|
|
19236
|
+
`;
|
|
19237
|
+
|
|
19238
|
+
/**
|
|
19239
|
+
* A nimble-styled breadcrumb
|
|
19240
|
+
*/
|
|
19241
|
+
class Breadcrumb extends Breadcrumb$1 {
|
|
19242
|
+
}
|
|
19243
|
+
__decorate$1([
|
|
19244
|
+
attr
|
|
19245
|
+
], Breadcrumb.prototype, "appearance", void 0);
|
|
19246
|
+
const nimbleBreadcrumb = Breadcrumb.compose({
|
|
19247
|
+
baseName: 'breadcrumb',
|
|
19248
|
+
baseClass: Breadcrumb$1,
|
|
19249
|
+
template: breadcrumbTemplate,
|
|
19250
|
+
styles: styles$y
|
|
19251
|
+
});
|
|
19252
|
+
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBreadcrumb());
|
|
19253
|
+
|
|
19254
|
+
const styles$x = css `
|
|
19255
|
+
${display('inline-flex')}
|
|
19256
|
+
|
|
18725
19257
|
:host {
|
|
18726
19258
|
height: ${controlHeight};
|
|
18727
19259
|
box-sizing: border-box;
|
|
@@ -18774,162 +19306,35 @@
|
|
|
18774
19306
|
margin-inline-end: 4px;
|
|
18775
19307
|
}
|
|
18776
19308
|
|
|
18777
|
-
slot[name='separator'] {
|
|
18778
|
-
display: flex;
|
|
18779
|
-
align-items: center;
|
|
18780
|
-
}
|
|
18781
|
-
|
|
18782
|
-
slot[name='separator'] svg {
|
|
18783
|
-
width: ${iconSize};
|
|
18784
|
-
height: ${iconSize};
|
|
18785
|
-
fill: ${placeholderFontColor};
|
|
18786
|
-
}
|
|
18787
|
-
`;
|
|
18788
|
-
|
|
18789
|
-
/**
|
|
18790
|
-
* A nimble-styled breadcrumb item
|
|
18791
|
-
*/
|
|
18792
|
-
class BreadcrumbItem extends BreadcrumbItem$1 {
|
|
18793
|
-
}
|
|
18794
|
-
const nimbleBreadcrumbItem = BreadcrumbItem.compose({
|
|
18795
|
-
baseName: 'breadcrumb-item',
|
|
18796
|
-
baseClass: BreadcrumbItem$1,
|
|
18797
|
-
template: breadcrumbItemTemplate,
|
|
18798
|
-
styles: styles$z,
|
|
18799
|
-
separator: forwardSlash16X16.data
|
|
18800
|
-
});
|
|
18801
|
-
DesignSystem.getOrCreate()
|
|
18802
|
-
.withPrefix('nimble')
|
|
18803
|
-
.register(nimbleBreadcrumbItem());
|
|
18804
|
-
|
|
18805
|
-
const styles$y = css `
|
|
18806
|
-
${styles$G}
|
|
18807
|
-
${buttonAppearanceVariantStyles}
|
|
18808
|
-
`;
|
|
18809
|
-
|
|
18810
|
-
/**
|
|
18811
|
-
* A nimble-styled HTML button
|
|
18812
|
-
*/
|
|
18813
|
-
class Button extends Button$1 {
|
|
18814
|
-
constructor() {
|
|
18815
|
-
super(...arguments);
|
|
18816
|
-
/**
|
|
18817
|
-
* @public
|
|
18818
|
-
* @remarks
|
|
18819
|
-
* HTML Attribute: appearance
|
|
18820
|
-
*/
|
|
18821
|
-
this.appearance = ButtonAppearance.outline;
|
|
18822
|
-
/**
|
|
18823
|
-
* @public
|
|
18824
|
-
* @remarks
|
|
18825
|
-
* HTML Attribute: content-hidden
|
|
18826
|
-
*/
|
|
18827
|
-
this.contentHidden = false;
|
|
18828
|
-
}
|
|
18829
|
-
}
|
|
18830
|
-
__decorate$1([
|
|
18831
|
-
attr
|
|
18832
|
-
], Button.prototype, "appearance", void 0);
|
|
18833
|
-
__decorate$1([
|
|
18834
|
-
attr({ attribute: 'appearance-variant' })
|
|
18835
|
-
], Button.prototype, "appearanceVariant", void 0);
|
|
18836
|
-
__decorate$1([
|
|
18837
|
-
attr({ attribute: 'content-hidden', mode: 'boolean' })
|
|
18838
|
-
], Button.prototype, "contentHidden", void 0);
|
|
18839
|
-
/**
|
|
18840
|
-
* A function that returns a nimble-button registration for configuring the component with a DesignSystem.
|
|
18841
|
-
* Implements {@link @microsoft/fast-foundation#buttonTemplate}
|
|
18842
|
-
*
|
|
18843
|
-
* @public
|
|
18844
|
-
* @remarks
|
|
18845
|
-
* Generates HTML Element: \<nimble-button\>
|
|
18846
|
-
*
|
|
18847
|
-
*/
|
|
18848
|
-
const nimbleButton = Button.compose({
|
|
18849
|
-
baseName: 'button',
|
|
18850
|
-
baseClass: Button$1,
|
|
18851
|
-
template: buttonTemplate,
|
|
18852
|
-
styles: styles$y,
|
|
18853
|
-
shadowOptions: {
|
|
18854
|
-
delegatesFocus: true
|
|
18855
|
-
}
|
|
18856
|
-
});
|
|
18857
|
-
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleButton());
|
|
18858
|
-
|
|
18859
|
-
/**
|
|
18860
|
-
* Subscription for {@link ThemeStyleSheetBehavior}
|
|
18861
|
-
*/
|
|
18862
|
-
class ThemeStyleSheetBehaviorSubscription {
|
|
18863
|
-
constructor(value, styles, source) {
|
|
18864
|
-
this.value = value;
|
|
18865
|
-
this.styles = styles;
|
|
18866
|
-
this.source = source;
|
|
18867
|
-
}
|
|
18868
|
-
handleChange() {
|
|
18869
|
-
const theme$1 = theme.getValueFor(this.source);
|
|
18870
|
-
if (Array.isArray(this.value)
|
|
18871
|
-
? this.value.includes(theme$1)
|
|
18872
|
-
: this.value === theme$1) {
|
|
18873
|
-
this.source.$fastController.addStyles(this.styles);
|
|
18874
|
-
}
|
|
18875
|
-
else {
|
|
18876
|
-
this.source.$fastController.removeStyles(this.styles);
|
|
18877
|
-
}
|
|
18878
|
-
}
|
|
19309
|
+
slot[name='separator'] {
|
|
19310
|
+
display: flex;
|
|
19311
|
+
align-items: center;
|
|
18879
19312
|
}
|
|
18880
|
-
|
|
18881
|
-
|
|
18882
|
-
|
|
18883
|
-
|
|
18884
|
-
|
|
18885
|
-
this.theme = theme;
|
|
18886
|
-
this.styles = styles;
|
|
18887
|
-
this.cache = new WeakMap();
|
|
18888
|
-
}
|
|
18889
|
-
/**
|
|
18890
|
-
* @internal
|
|
18891
|
-
*/
|
|
18892
|
-
bind(source) {
|
|
18893
|
-
const subscriber = this.cache.get(source)
|
|
18894
|
-
|| new ThemeStyleSheetBehaviorSubscription(this.theme, this.styles, source);
|
|
18895
|
-
// Currently subscriber from cache may have gone through unbind
|
|
18896
|
-
// but still be in cache so always resubscribe
|
|
18897
|
-
// See: https://github.com/microsoft/fast/issues/3246#issuecomment-1030424876
|
|
18898
|
-
theme.subscribe(subscriber, source);
|
|
18899
|
-
subscriber.handleChange();
|
|
18900
|
-
this.cache.set(source, subscriber);
|
|
18901
|
-
}
|
|
18902
|
-
/**
|
|
18903
|
-
* @internal
|
|
18904
|
-
*/
|
|
18905
|
-
unbind(source) {
|
|
18906
|
-
const subscriber = this.cache.get(source);
|
|
18907
|
-
if (subscriber) {
|
|
18908
|
-
theme.unsubscribe(subscriber);
|
|
18909
|
-
}
|
|
18910
|
-
// Currently does not evict subscriber from cache
|
|
18911
|
-
// See: https://github.com/microsoft/fast/issues/3246#issuecomment-1030424876
|
|
18912
|
-
}
|
|
19313
|
+
|
|
19314
|
+
slot[name='separator'] svg {
|
|
19315
|
+
width: ${iconSize};
|
|
19316
|
+
height: ${iconSize};
|
|
19317
|
+
fill: ${placeholderFontColor};
|
|
18913
19318
|
}
|
|
19319
|
+
`;
|
|
19320
|
+
|
|
18914
19321
|
/**
|
|
18915
|
-
*
|
|
18916
|
-
* the behavior will use the nearest ThemeProvider's 'theme' design system value.
|
|
18917
|
-
*
|
|
18918
|
-
* @public
|
|
18919
|
-
* @example
|
|
18920
|
-
* ```ts
|
|
18921
|
-
* css`
|
|
18922
|
-
* // ...
|
|
18923
|
-
* `.withBehaviors(
|
|
18924
|
-
* themeBehavior(Theme.light, css` ... `),
|
|
18925
|
-
* // Apply style for both dark and color theme
|
|
18926
|
-
* themeBehavior([Theme.dark, Theme.color], css` ... `)
|
|
18927
|
-
* )
|
|
18928
|
-
* ```
|
|
19322
|
+
* A nimble-styled breadcrumb item
|
|
18929
19323
|
*/
|
|
18930
|
-
|
|
19324
|
+
class BreadcrumbItem extends BreadcrumbItem$1 {
|
|
19325
|
+
}
|
|
19326
|
+
const nimbleBreadcrumbItem = BreadcrumbItem.compose({
|
|
19327
|
+
baseName: 'breadcrumb-item',
|
|
19328
|
+
baseClass: BreadcrumbItem$1,
|
|
19329
|
+
template: breadcrumbItemTemplate,
|
|
19330
|
+
styles: styles$x,
|
|
19331
|
+
separator: forwardSlash16X16.data
|
|
19332
|
+
});
|
|
19333
|
+
DesignSystem.getOrCreate()
|
|
19334
|
+
.withPrefix('nimble')
|
|
19335
|
+
.register(nimbleBreadcrumbItem());
|
|
18931
19336
|
|
|
18932
|
-
const styles$
|
|
19337
|
+
const styles$w = css `
|
|
18933
19338
|
${display('inline-flex')}
|
|
18934
19339
|
|
|
18935
19340
|
:host {
|
|
@@ -19088,14 +19493,14 @@
|
|
|
19088
19493
|
const nimbleCardButton = CardButton.compose({
|
|
19089
19494
|
baseName: 'card-button',
|
|
19090
19495
|
template: buttonTemplate,
|
|
19091
|
-
styles: styles$
|
|
19496
|
+
styles: styles$w,
|
|
19092
19497
|
shadowOptions: {
|
|
19093
19498
|
delegatesFocus: true
|
|
19094
19499
|
}
|
|
19095
19500
|
});
|
|
19096
19501
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCardButton());
|
|
19097
19502
|
|
|
19098
|
-
const styles$
|
|
19503
|
+
const styles$v = css `
|
|
19099
19504
|
${display('inline-flex')}
|
|
19100
19505
|
|
|
19101
19506
|
:host {
|
|
@@ -19213,14 +19618,14 @@
|
|
|
19213
19618
|
baseName: 'checkbox',
|
|
19214
19619
|
baseClass: Checkbox$1,
|
|
19215
19620
|
template: checkboxTemplate,
|
|
19216
|
-
styles: styles$
|
|
19621
|
+
styles: styles$v,
|
|
19217
19622
|
checkedIndicator: check16X16.data,
|
|
19218
19623
|
indeterminateIndicator: minus16X16.data
|
|
19219
19624
|
});
|
|
19220
19625
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCheckbox());
|
|
19221
19626
|
|
|
19222
|
-
const styles$
|
|
19223
|
-
${styles$
|
|
19627
|
+
const styles$u = css `
|
|
19628
|
+
${styles$H}
|
|
19224
19629
|
|
|
19225
19630
|
.control[aria-pressed='true'] {
|
|
19226
19631
|
background-color: ${fillSelectedColor};
|
|
@@ -19246,7 +19651,7 @@
|
|
|
19246
19651
|
}
|
|
19247
19652
|
`;
|
|
19248
19653
|
|
|
19249
|
-
const template$
|
|
19654
|
+
const template$d = (context, definition) => html `
|
|
19250
19655
|
<div
|
|
19251
19656
|
role="button"
|
|
19252
19657
|
part="control"
|
|
@@ -19321,8 +19726,8 @@
|
|
|
19321
19726
|
applyMixins(ToggleButton, StartEnd, DelegatesARIAButton);
|
|
19322
19727
|
const nimbleToggleButton = ToggleButton.compose({
|
|
19323
19728
|
baseName: 'toggle-button',
|
|
19324
|
-
template: template$
|
|
19325
|
-
styles: styles$
|
|
19729
|
+
template: template$d,
|
|
19730
|
+
styles: styles$u,
|
|
19326
19731
|
shadowOptions: {
|
|
19327
19732
|
delegatesFocus: true
|
|
19328
19733
|
}
|
|
@@ -19335,72 +19740,6 @@
|
|
|
19335
19740
|
</div>
|
|
19336
19741
|
`;
|
|
19337
19742
|
|
|
19338
|
-
const template$d = html `
|
|
19339
|
-
<template>
|
|
19340
|
-
<div class="icon" :innerHTML=${x => x.icon.data}></div>
|
|
19341
|
-
</template
|
|
19342
|
-
`;
|
|
19343
|
-
|
|
19344
|
-
const styles$u = css `
|
|
19345
|
-
${display('inline-flex')}
|
|
19346
|
-
|
|
19347
|
-
:host {
|
|
19348
|
-
align-items: center;
|
|
19349
|
-
user-select: none;
|
|
19350
|
-
width: ${iconSize};
|
|
19351
|
-
height: ${iconSize};
|
|
19352
|
-
}
|
|
19353
|
-
|
|
19354
|
-
.icon {
|
|
19355
|
-
width: 100%;
|
|
19356
|
-
height: 100%;
|
|
19357
|
-
}
|
|
19358
|
-
|
|
19359
|
-
:host([severity='error']) {
|
|
19360
|
-
${iconColor.cssCustomProperty}: ${failColor};
|
|
19361
|
-
}
|
|
19362
|
-
|
|
19363
|
-
:host([severity='warning']) {
|
|
19364
|
-
${iconColor.cssCustomProperty}: ${warningColor};
|
|
19365
|
-
}
|
|
19366
|
-
|
|
19367
|
-
:host([severity='success']) {
|
|
19368
|
-
${iconColor.cssCustomProperty}: ${passColor};
|
|
19369
|
-
}
|
|
19370
|
-
|
|
19371
|
-
:host([severity='information']) {
|
|
19372
|
-
${iconColor.cssCustomProperty}: ${informationColor};
|
|
19373
|
-
}
|
|
19374
|
-
|
|
19375
|
-
.icon svg {
|
|
19376
|
-
fill: ${iconColor};
|
|
19377
|
-
width: 100%;
|
|
19378
|
-
height: 100%;
|
|
19379
|
-
}
|
|
19380
|
-
`;
|
|
19381
|
-
|
|
19382
|
-
/**
|
|
19383
|
-
* The base class for icon components
|
|
19384
|
-
*/
|
|
19385
|
-
class Icon extends FoundationElement {
|
|
19386
|
-
constructor(/** @internal */ icon) {
|
|
19387
|
-
super();
|
|
19388
|
-
this.icon = icon;
|
|
19389
|
-
}
|
|
19390
|
-
}
|
|
19391
|
-
__decorate$1([
|
|
19392
|
-
attr
|
|
19393
|
-
], Icon.prototype, "severity", void 0);
|
|
19394
|
-
const registerIcon = (baseName, iconClass) => {
|
|
19395
|
-
const composedIcon = iconClass.compose({
|
|
19396
|
-
baseName,
|
|
19397
|
-
template: template$d,
|
|
19398
|
-
styles: styles$u,
|
|
19399
|
-
baseClass: iconClass
|
|
19400
|
-
});
|
|
19401
|
-
DesignSystem.getOrCreate().withPrefix('nimble').register(composedIcon());
|
|
19402
|
-
};
|
|
19403
|
-
|
|
19404
19743
|
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
19405
19744
|
/**
|
|
19406
19745
|
* The icon component for the 'arrowExpanderDown' icon
|
|
@@ -19412,17 +19751,6 @@
|
|
|
19412
19751
|
}
|
|
19413
19752
|
registerIcon('icon-arrow-expander-down', IconArrowExpanderDown);
|
|
19414
19753
|
|
|
19415
|
-
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
19416
|
-
/**
|
|
19417
|
-
* The icon component for the 'exclamationMark' icon
|
|
19418
|
-
*/
|
|
19419
|
-
class IconExclamationMark extends Icon {
|
|
19420
|
-
constructor() {
|
|
19421
|
-
super(exclamationMark16X16);
|
|
19422
|
-
}
|
|
19423
|
-
}
|
|
19424
|
-
registerIcon('icon-exclamation-mark', IconExclamationMark);
|
|
19425
|
-
|
|
19426
19754
|
const DropdownAppearance = {
|
|
19427
19755
|
underline: 'underline',
|
|
19428
19756
|
outline: 'outline',
|
|
@@ -21484,17 +21812,6 @@
|
|
|
21484
21812
|
}
|
|
21485
21813
|
registerIcon('icon-indeterminant-checkbox', IconIndeterminantCheckbox);
|
|
21486
21814
|
|
|
21487
|
-
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
21488
|
-
/**
|
|
21489
|
-
* The icon component for the 'info' icon
|
|
21490
|
-
*/
|
|
21491
|
-
class IconInfo extends Icon {
|
|
21492
|
-
constructor() {
|
|
21493
|
-
super(info16X16);
|
|
21494
|
-
}
|
|
21495
|
-
}
|
|
21496
|
-
registerIcon('icon-info', IconInfo);
|
|
21497
|
-
|
|
21498
21815
|
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
21499
21816
|
/**
|
|
21500
21817
|
* The icon component for the 'infoCircle' icon
|
|
@@ -22001,17 +22318,6 @@
|
|
|
22001
22318
|
}
|
|
22002
22319
|
registerIcon('icon-triangle', IconTriangle);
|
|
22003
22320
|
|
|
22004
|
-
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
22005
|
-
/**
|
|
22006
|
-
* The icon component for the 'triangleFilled' icon
|
|
22007
|
-
*/
|
|
22008
|
-
class IconTriangleFilled extends Icon {
|
|
22009
|
-
constructor() {
|
|
22010
|
-
super(triangleFilled16X16);
|
|
22011
|
-
}
|
|
22012
|
-
}
|
|
22013
|
-
registerIcon('icon-triangle-filled', IconTriangleFilled);
|
|
22014
|
-
|
|
22015
22321
|
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
22016
22322
|
/**
|
|
22017
22323
|
* The icon component for the 'trueFalseRectangle' icon
|
|
@@ -22144,17 +22450,6 @@
|
|
|
22144
22450
|
}
|
|
22145
22451
|
registerIcon('icon-wrench-hammer', IconWrenchHammer);
|
|
22146
22452
|
|
|
22147
|
-
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
22148
|
-
/**
|
|
22149
|
-
* The icon component for the 'xmark' icon
|
|
22150
|
-
*/
|
|
22151
|
-
class IconXmark extends Icon {
|
|
22152
|
-
constructor() {
|
|
22153
|
-
super(xmark16X16);
|
|
22154
|
-
}
|
|
22155
|
-
}
|
|
22156
|
-
registerIcon('icon-xmark', IconXmark);
|
|
22157
|
-
|
|
22158
22453
|
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
22159
22454
|
/**
|
|
22160
22455
|
* The icon component for the 'xmarkCheck' icon
|
|
@@ -23596,7 +23891,7 @@
|
|
|
23596
23891
|
baseName: 'tab',
|
|
23597
23892
|
baseClass: Tab$1,
|
|
23598
23893
|
template: tabTemplate,
|
|
23599
|
-
styles: styles$
|
|
23894
|
+
styles: styles$F
|
|
23600
23895
|
});
|
|
23601
23896
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTab());
|
|
23602
23897
|
|
|
@@ -26580,6 +26875,12 @@
|
|
|
26580
26875
|
__decorate$1([
|
|
26581
26876
|
attr({ attribute: 'column-id' })
|
|
26582
26877
|
], TableColumn.prototype, "columnId", void 0);
|
|
26878
|
+
__decorate$1([
|
|
26879
|
+
attr({ attribute: 'action-menu-slot' })
|
|
26880
|
+
], TableColumn.prototype, "actionMenuSlot", void 0);
|
|
26881
|
+
__decorate$1([
|
|
26882
|
+
attr({ attribute: 'action-menu-label' })
|
|
26883
|
+
], TableColumn.prototype, "actionMenuLabel", void 0);
|
|
26583
26884
|
|
|
26584
26885
|
/**
|
|
26585
26886
|
* Helper class for the nimble-table to validate that the table's configuration
|
|
@@ -26686,9 +26987,7 @@
|
|
|
26686
26987
|
|
|
26687
26988
|
.table-row-container {
|
|
26688
26989
|
width: 100%;
|
|
26689
|
-
position:
|
|
26690
|
-
overflow: hidden;
|
|
26691
|
-
top: 0px;
|
|
26990
|
+
position: relative;
|
|
26692
26991
|
}
|
|
26693
26992
|
|
|
26694
26993
|
.header-container {
|
|
@@ -26710,6 +27009,7 @@
|
|
|
26710
27009
|
.row {
|
|
26711
27010
|
background: ${applicationBackgroundColor};
|
|
26712
27011
|
position: relative;
|
|
27012
|
+
box-sizing: border-box;
|
|
26713
27013
|
}
|
|
26714
27014
|
|
|
26715
27015
|
.row::before {
|
|
@@ -26785,6 +27085,19 @@
|
|
|
26785
27085
|
grid-auto-flow: column;
|
|
26786
27086
|
grid-auto-columns: 1fr;
|
|
26787
27087
|
}
|
|
27088
|
+
|
|
27089
|
+
nimble-table-cell {
|
|
27090
|
+
--ni-private-table-cell-action-menu-display: none;
|
|
27091
|
+
}
|
|
27092
|
+
|
|
27093
|
+
nimble-table-cell[menu-open] {
|
|
27094
|
+
--ni-private-table-cell-action-menu-display: block;
|
|
27095
|
+
}
|
|
27096
|
+
|
|
27097
|
+
:host(.hover) nimble-table-cell,
|
|
27098
|
+
:host(:hover) nimble-table-cell {
|
|
27099
|
+
--ni-private-table-cell-action-menu-display: block;
|
|
27100
|
+
}
|
|
26788
27101
|
`;
|
|
26789
27102
|
|
|
26790
27103
|
const styles$a = css `
|
|
@@ -26794,6 +27107,9 @@
|
|
|
26794
27107
|
padding: 0px calc(${standardPadding} / 2);
|
|
26795
27108
|
align-self: center;
|
|
26796
27109
|
height: 100%;
|
|
27110
|
+
grid-template-columns: 1fr auto;
|
|
27111
|
+
/* A default value that will be overridden by the row */
|
|
27112
|
+
--ni-private-table-cell-action-menu-display: block;
|
|
26797
27113
|
}
|
|
26798
27114
|
|
|
26799
27115
|
.cell-content-container {
|
|
@@ -26801,12 +27117,30 @@
|
|
|
26801
27117
|
display: flex;
|
|
26802
27118
|
align-items: center;
|
|
26803
27119
|
}
|
|
27120
|
+
|
|
27121
|
+
.action-menu {
|
|
27122
|
+
display: var(--ni-private-table-cell-action-menu-display);
|
|
27123
|
+
}
|
|
26804
27124
|
`;
|
|
26805
27125
|
|
|
26806
27126
|
// prettier-ignore
|
|
26807
27127
|
const template$6 = html `
|
|
26808
27128
|
<template role="cell">
|
|
26809
27129
|
<div ${ref('cellContentContainer')} class="cell-content-container"></div>
|
|
27130
|
+
|
|
27131
|
+
${when(x => x.hasActionMenu, html `
|
|
27132
|
+
<${DesignSystem.tagFor(MenuButton)}
|
|
27133
|
+
content-hidden
|
|
27134
|
+
appearance="${ButtonAppearance.ghost}"
|
|
27135
|
+
@beforetoggle="${(x, c) => x.onActionMenuBeforeToggle(c.event)}"
|
|
27136
|
+
@toggle="${(x, c) => x.onActionMenuToggle(c.event)}"
|
|
27137
|
+
class="action-menu"
|
|
27138
|
+
>
|
|
27139
|
+
<${DesignSystem.tagFor(IconThreeDotsLine)} slot="start"></${DesignSystem.tagFor(IconThreeDotsLine)}>
|
|
27140
|
+
${x => x.actionMenuLabel}
|
|
27141
|
+
<slot name="cellActionMenu" slot="menu"></slot>
|
|
27142
|
+
</${DesignSystem.tagFor(MenuButton)}>
|
|
27143
|
+
`)}
|
|
26810
27144
|
</template>
|
|
26811
27145
|
`;
|
|
26812
27146
|
|
|
@@ -26817,6 +27151,8 @@
|
|
|
26817
27151
|
class TableCell extends FoundationElement {
|
|
26818
27152
|
constructor() {
|
|
26819
27153
|
super(...arguments);
|
|
27154
|
+
this.hasActionMenu = false;
|
|
27155
|
+
this.menuOpen = false;
|
|
26820
27156
|
this.customCellView = undefined;
|
|
26821
27157
|
}
|
|
26822
27158
|
connectedCallback() {
|
|
@@ -26830,6 +27166,13 @@
|
|
|
26830
27166
|
this.customCellView = undefined;
|
|
26831
27167
|
}
|
|
26832
27168
|
}
|
|
27169
|
+
onActionMenuBeforeToggle(event) {
|
|
27170
|
+
this.$emit('cell-action-menu-beforetoggle', event.detail);
|
|
27171
|
+
}
|
|
27172
|
+
onActionMenuToggle(event) {
|
|
27173
|
+
this.menuOpen = event.detail.newState;
|
|
27174
|
+
this.$emit('cell-action-menu-toggle', event.detail);
|
|
27175
|
+
}
|
|
26833
27176
|
cellStateChanged() {
|
|
26834
27177
|
this.customCellView?.bind(this.cellState, defaultExecutionContext);
|
|
26835
27178
|
}
|
|
@@ -26856,6 +27199,15 @@
|
|
|
26856
27199
|
__decorate$1([
|
|
26857
27200
|
observable
|
|
26858
27201
|
], TableCell.prototype, "cellStyles", void 0);
|
|
27202
|
+
__decorate$1([
|
|
27203
|
+
attr({ attribute: 'has-action-menu', mode: 'boolean' })
|
|
27204
|
+
], TableCell.prototype, "hasActionMenu", void 0);
|
|
27205
|
+
__decorate$1([
|
|
27206
|
+
attr({ attribute: 'menu-open', mode: 'boolean' })
|
|
27207
|
+
], TableCell.prototype, "menuOpen", void 0);
|
|
27208
|
+
__decorate$1([
|
|
27209
|
+
attr({ attribute: 'action-menu-label' })
|
|
27210
|
+
], TableCell.prototype, "actionMenuLabel", void 0);
|
|
26859
27211
|
const nimbleTableCell = TableCell.compose({
|
|
26860
27212
|
baseName: 'table-cell',
|
|
26861
27213
|
template: template$6,
|
|
@@ -26872,7 +27224,18 @@
|
|
|
26872
27224
|
:cellTemplate="${x => x.column.cellTemplate}"
|
|
26873
27225
|
:cellStyles="${x => x.column.cellStyles}"
|
|
26874
27226
|
:cellState="${x => x.cellState}"
|
|
27227
|
+
?has-action-menu="${x => !!x.column.actionMenuSlot}"
|
|
27228
|
+
action-menu-label="${x => x.column.actionMenuLabel}"
|
|
27229
|
+
@cell-action-menu-beforetoggle="${(x, c) => c.parent.onCellActionMenuBeforeToggle(c.event, x.column)}"
|
|
27230
|
+
@cell-action-menu-toggle="${(x, c) => c.parent.onCellActionMenuToggle(c.event, x.column)}"
|
|
26875
27231
|
>
|
|
27232
|
+
|
|
27233
|
+
${when((x, c) => (c.parent.currentActionMenuColumn === x.column) && x.column.actionMenuSlot, html `
|
|
27234
|
+
<slot
|
|
27235
|
+
name="${x => `row-action-menu-${x.column.actionMenuSlot}`}"
|
|
27236
|
+
slot="cellActionMenu"
|
|
27237
|
+
></slot>
|
|
27238
|
+
`)}
|
|
26876
27239
|
</${DesignSystem.tagFor(TableCell)}>
|
|
26877
27240
|
`)}
|
|
26878
27241
|
</template>
|
|
@@ -26886,6 +27249,7 @@
|
|
|
26886
27249
|
constructor() {
|
|
26887
27250
|
super(...arguments);
|
|
26888
27251
|
this.columns = [];
|
|
27252
|
+
this.menuOpen = false;
|
|
26889
27253
|
}
|
|
26890
27254
|
get columnStates() {
|
|
26891
27255
|
return this.columns.map(column => {
|
|
@@ -26909,6 +27273,23 @@
|
|
|
26909
27273
|
return { column, cellState };
|
|
26910
27274
|
});
|
|
26911
27275
|
}
|
|
27276
|
+
onCellActionMenuBeforeToggle(event, column) {
|
|
27277
|
+
this.currentActionMenuColumn = column;
|
|
27278
|
+
this.emitToggleEvent('row-action-menu-beforetoggle', event.detail, column);
|
|
27279
|
+
}
|
|
27280
|
+
onCellActionMenuToggle(event, column) {
|
|
27281
|
+
this.menuOpen = event.detail.newState;
|
|
27282
|
+
this.emitToggleEvent('row-action-menu-toggle', event.detail, column);
|
|
27283
|
+
}
|
|
27284
|
+
emitToggleEvent(eventType, menuButtonEventDetail, column) {
|
|
27285
|
+
const detail = {
|
|
27286
|
+
newState: menuButtonEventDetail.newState,
|
|
27287
|
+
oldState: menuButtonEventDetail.oldState,
|
|
27288
|
+
recordIds: [this.recordId],
|
|
27289
|
+
columnId: column.columnId
|
|
27290
|
+
};
|
|
27291
|
+
this.$emit(eventType, detail);
|
|
27292
|
+
}
|
|
26912
27293
|
hasValidFieldNames(keys) {
|
|
26913
27294
|
return keys.every(key => key !== undefined);
|
|
26914
27295
|
}
|
|
@@ -26922,6 +27303,12 @@
|
|
|
26922
27303
|
__decorate$1([
|
|
26923
27304
|
observable
|
|
26924
27305
|
], TableRow.prototype, "columns", void 0);
|
|
27306
|
+
__decorate$1([
|
|
27307
|
+
observable
|
|
27308
|
+
], TableRow.prototype, "currentActionMenuColumn", void 0);
|
|
27309
|
+
__decorate$1([
|
|
27310
|
+
attr({ attribute: 'menu-open', mode: 'boolean' })
|
|
27311
|
+
], TableRow.prototype, "menuOpen", void 0);
|
|
26925
27312
|
__decorate$1([
|
|
26926
27313
|
volatile
|
|
26927
27314
|
], TableRow.prototype, "columnStates", null);
|
|
@@ -26948,7 +27335,7 @@
|
|
|
26948
27335
|
</div>
|
|
26949
27336
|
<div class="table-viewport" ${ref('viewport')}>
|
|
26950
27337
|
<div class="table-scroll" style="height: ${x => x.virtualizer.allRowsHeight}px;"></div>
|
|
26951
|
-
<div class="table-row-container" role="rowgroup" style="
|
|
27338
|
+
<div class="table-row-container" role="rowgroup" style="top: ${x => `${x.virtualizer.rowContainerYOffset}px;`}">
|
|
26952
27339
|
${when(x => x.columns.length > 0 && x.canRenderRows, html `
|
|
26953
27340
|
${repeat(x => x.virtualizer.visibleItems, html `
|
|
26954
27341
|
<${DesignSystem.tagFor(TableRow)}
|
|
@@ -26956,8 +27343,18 @@
|
|
|
26956
27343
|
record-id="${(x, c) => c.parent.tableData[x.index]?.id}"
|
|
26957
27344
|
:dataRecord="${(x, c) => c.parent.tableData[x.index]?.record}"
|
|
26958
27345
|
:columns="${(_, c) => c.parent.columns}"
|
|
27346
|
+
@row-action-menu-beforetoggle="${(_, c) => c.parent.onRowActionMenuBeforeToggle(c.event)}"
|
|
27347
|
+
@row-action-menu-toggle="${(_, c) => c.parent.onRowActionMenuToggle(c.event)}"
|
|
26959
27348
|
style="height: ${x => x.size}px;"
|
|
26960
27349
|
>
|
|
27350
|
+
${when((x, c) => c.parent.openActionMenuRecordId === c.parent.tableData[x.index]?.id, html `
|
|
27351
|
+
${repeat((_, c) => c.parent.actionMenuSlots, html `
|
|
27352
|
+
<slot
|
|
27353
|
+
name="${x => x}"
|
|
27354
|
+
slot="${x => `row-action-menu-${x}`}">
|
|
27355
|
+
</slot>
|
|
27356
|
+
`)}
|
|
27357
|
+
`)}
|
|
26961
27358
|
</${DesignSystem.tagFor(TableRow)}>
|
|
26962
27359
|
`)}
|
|
26963
27360
|
`)}
|
|
@@ -27638,7 +28035,8 @@
|
|
|
27638
28035
|
this.handleVirtualizerChange();
|
|
27639
28036
|
}
|
|
27640
28037
|
createVirtualizerOptions() {
|
|
27641
|
-
const rowHeight = parseFloat(controlHeight.getValueFor(this.table))
|
|
28038
|
+
const rowHeight = parseFloat(controlHeight.getValueFor(this.table))
|
|
28039
|
+
+ 2 * parseFloat(borderWidth.getValueFor(this.table));
|
|
27642
28040
|
return {
|
|
27643
28041
|
count: this.table.tableData.length,
|
|
27644
28042
|
getScrollElement: () => {
|
|
@@ -27665,10 +28063,7 @@
|
|
|
27665
28063
|
let rowContainerYOffset = 0;
|
|
27666
28064
|
if (this.visibleItems.length > 0) {
|
|
27667
28065
|
const firstItem = this.visibleItems[0];
|
|
27668
|
-
|
|
27669
|
-
if (lastItem.end < this.allRowsHeight) {
|
|
27670
|
-
rowContainerYOffset = firstItem.start - virtualizer.scrollOffset;
|
|
27671
|
-
}
|
|
28066
|
+
rowContainerYOffset = firstItem.start;
|
|
27672
28067
|
}
|
|
27673
28068
|
this.rowContainerYOffset = rowContainerYOffset;
|
|
27674
28069
|
}
|
|
@@ -27704,6 +28099,10 @@
|
|
|
27704
28099
|
* @internal
|
|
27705
28100
|
*/
|
|
27706
28101
|
this.childItems = [];
|
|
28102
|
+
/**
|
|
28103
|
+
* @internal
|
|
28104
|
+
*/
|
|
28105
|
+
this.actionMenuSlots = [];
|
|
27707
28106
|
/**
|
|
27708
28107
|
* @internal
|
|
27709
28108
|
*/
|
|
@@ -27769,6 +28168,13 @@
|
|
|
27769
28168
|
}
|
|
27770
28169
|
}
|
|
27771
28170
|
}
|
|
28171
|
+
onRowActionMenuBeforeToggle(event) {
|
|
28172
|
+
this.openActionMenuRecordId = event.detail.recordIds[0];
|
|
28173
|
+
this.$emit('action-menu-beforetoggle', event.detail);
|
|
28174
|
+
}
|
|
28175
|
+
onRowActionMenuToggle(event) {
|
|
28176
|
+
this.$emit('action-menu-toggle', event.detail);
|
|
28177
|
+
}
|
|
27772
28178
|
childItemsChanged() {
|
|
27773
28179
|
void this.updateColumnsFromChildItems();
|
|
27774
28180
|
}
|
|
@@ -27782,6 +28188,13 @@
|
|
|
27782
28188
|
return;
|
|
27783
28189
|
}
|
|
27784
28190
|
this.validateAndObserveColumns();
|
|
28191
|
+
const slots = new Set();
|
|
28192
|
+
for (const column of this.columns) {
|
|
28193
|
+
if (column.actionMenuSlot) {
|
|
28194
|
+
slots.add(column.actionMenuSlot);
|
|
28195
|
+
}
|
|
28196
|
+
}
|
|
28197
|
+
this.actionMenuSlots = Array.from(slots);
|
|
27785
28198
|
}
|
|
27786
28199
|
removeColumnObservers() {
|
|
27787
28200
|
this.columnNotifiers.forEach(notifier => {
|
|
@@ -27870,6 +28283,12 @@
|
|
|
27870
28283
|
__decorate$1([
|
|
27871
28284
|
observable
|
|
27872
28285
|
], Table.prototype, "childItems", void 0);
|
|
28286
|
+
__decorate$1([
|
|
28287
|
+
observable
|
|
28288
|
+
], Table.prototype, "actionMenuSlots", void 0);
|
|
28289
|
+
__decorate$1([
|
|
28290
|
+
observable
|
|
28291
|
+
], Table.prototype, "openActionMenuRecordId", void 0);
|
|
27873
28292
|
__decorate$1([
|
|
27874
28293
|
observable
|
|
27875
28294
|
], Table.prototype, "canRenderRows", void 0);
|