@ni/nimble-components 18.9.0 → 18.10.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 +522 -197
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +1619 -1452
- 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/anchor/index.js +1 -0
- package/dist/esm/anchor/index.js.map +1 -1
- package/dist/esm/anchor-menu-item/index.d.ts +1 -3
- package/dist/esm/anchor-menu-item/index.js +2 -2
- package/dist/esm/anchor-menu-item/index.js.map +1 -1
- package/dist/esm/anchor-tab/index.js +1 -0
- package/dist/esm/anchor-tab/index.js.map +1 -1
- package/dist/esm/anchor-tab/styles.js +8 -0
- package/dist/esm/anchor-tab/styles.js.map +1 -1
- package/dist/esm/anchor-tab/template.d.ts +1 -1
- package/dist/esm/anchor-tab/template.js +4 -1
- package/dist/esm/anchor-tab/template.js.map +1 -1
- package/dist/esm/anchor-tree-item/index.d.ts +57 -0
- package/dist/esm/anchor-tree-item/index.js +117 -0
- package/dist/esm/anchor-tree-item/index.js.map +1 -0
- package/dist/esm/anchor-tree-item/styles.d.ts +1 -0
- package/dist/esm/anchor-tree-item/styles.js +108 -0
- package/dist/esm/anchor-tree-item/styles.js.map +1 -0
- package/dist/esm/anchor-tree-item/template.d.ts +4 -0
- package/dist/esm/anchor-tree-item/template.js +41 -0
- package/dist/esm/anchor-tree-item/template.js.map +1 -0
- package/dist/esm/table/components/cell/index.d.ts +4 -13
- package/dist/esm/table/components/cell/index.js +4 -35
- package/dist/esm/table/components/cell/index.js.map +1 -1
- package/dist/esm/table/components/cell/styles.js +1 -1
- package/dist/esm/table/components/cell/template.d.ts +3 -1
- package/dist/esm/table/components/cell/template.js +7 -3
- package/dist/esm/table/components/cell/template.js.map +1 -1
- package/dist/esm/table/components/row/index.d.ts +1 -0
- package/dist/esm/table/components/row/index.js +9 -0
- package/dist/esm/table/components/row/index.js.map +1 -1
- package/dist/esm/table/components/row/template.js +1 -2
- package/dist/esm/table/components/row/template.js.map +1 -1
- package/dist/esm/table/index.d.ts +9 -0
- package/dist/esm/table/index.js +10 -0
- package/dist/esm/table/index.js.map +1 -1
- package/dist/esm/table/models/virtualizer.d.ts +1 -0
- package/dist/esm/table/models/virtualizer.js +21 -0
- package/dist/esm/table/models/virtualizer.js.map +1 -1
- package/dist/esm/table/template.js +1 -1
- package/dist/esm/table/template.js.map +1 -1
- package/dist/esm/table-column/base/cell-view/index.d.ts +16 -0
- package/dist/esm/table-column/base/cell-view/index.js +22 -0
- package/dist/esm/table-column/base/cell-view/index.js.map +1 -0
- package/dist/esm/table-column/base/index.d.ts +10 -13
- package/dist/esm/table-column/base/index.js +12 -0
- package/dist/esm/table-column/base/index.js.map +1 -1
- package/dist/esm/table-column/text/cell-view/index.d.ts +18 -0
- package/dist/esm/table-column/text/cell-view/index.js +35 -0
- package/dist/esm/table-column/text/cell-view/index.js.map +1 -0
- package/dist/esm/table-column/text/cell-view/styles.d.ts +1 -0
- package/dist/esm/table-column/text/{styles.js → cell-view/styles.js} +2 -2
- package/dist/esm/table-column/text/cell-view/styles.js.map +1 -0
- package/dist/esm/table-column/text/cell-view/template.d.ts +2 -0
- package/dist/esm/table-column/text/cell-view/template.js +17 -0
- package/dist/esm/table-column/text/cell-view/template.js.map +1 -0
- package/dist/esm/table-column/text/index.d.ts +2 -3
- package/dist/esm/table-column/text/index.js +2 -4
- package/dist/esm/table-column/text/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/esm/table-column/text/styles.d.ts +0 -1
- package/dist/esm/table-column/text/styles.js.map +0 -1
- package/dist/esm/table-column/text/template.d.ts +0 -3
- package/dist/esm/table-column/text/template.js +0 -24
- package/dist/esm/table-column/text/template.js.map +0 -1
|
@@ -16744,9 +16744,9 @@
|
|
|
16744
16744
|
return `${prefix}${uniqueIdCounter++}`;
|
|
16745
16745
|
}
|
|
16746
16746
|
|
|
16747
|
-
const template$
|
|
16747
|
+
const template$o = html `<slot></slot>`;
|
|
16748
16748
|
|
|
16749
|
-
const styles$
|
|
16749
|
+
const styles$M = css `
|
|
16750
16750
|
:host {
|
|
16751
16751
|
display: contents;
|
|
16752
16752
|
}
|
|
@@ -16802,8 +16802,8 @@
|
|
|
16802
16802
|
], ThemeProvider.prototype, "theme", void 0);
|
|
16803
16803
|
const nimbleDesignSystemProvider = ThemeProvider.compose({
|
|
16804
16804
|
baseName: 'theme-provider',
|
|
16805
|
-
styles: styles$
|
|
16806
|
-
template: template$
|
|
16805
|
+
styles: styles$M,
|
|
16806
|
+
template: template$o
|
|
16807
16807
|
});
|
|
16808
16808
|
DesignSystem.getOrCreate()
|
|
16809
16809
|
.withPrefix('nimble')
|
|
@@ -16987,7 +16987,7 @@
|
|
|
16987
16987
|
}
|
|
16988
16988
|
}
|
|
16989
16989
|
|
|
16990
|
-
const styles$
|
|
16990
|
+
const styles$L = css `
|
|
16991
16991
|
${display('inline')}
|
|
16992
16992
|
|
|
16993
16993
|
:host {
|
|
@@ -17070,7 +17070,7 @@
|
|
|
17070
17070
|
`;
|
|
17071
17071
|
|
|
17072
17072
|
// prettier-ignore
|
|
17073
|
-
const template$
|
|
17073
|
+
const template$n = (context, definition) => html `
|
|
17074
17074
|
<a
|
|
17075
17075
|
class="control"
|
|
17076
17076
|
part="control"
|
|
@@ -17140,11 +17140,12 @@
|
|
|
17140
17140
|
__decorate$1([
|
|
17141
17141
|
attr
|
|
17142
17142
|
], Anchor.prototype, "appearance", void 0);
|
|
17143
|
+
// FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
|
|
17143
17144
|
const nimbleAnchor = Anchor.compose({
|
|
17144
17145
|
baseName: 'anchor',
|
|
17145
17146
|
baseClass: Anchor$1,
|
|
17146
|
-
template: template$
|
|
17147
|
-
styles: styles$
|
|
17147
|
+
template: template$n,
|
|
17148
|
+
styles: styles$L,
|
|
17148
17149
|
shadowOptions: {
|
|
17149
17150
|
delegatesFocus: true
|
|
17150
17151
|
}
|
|
@@ -17230,7 +17231,7 @@
|
|
|
17230
17231
|
return new MultivaluePropertyStyleSheetBehavior('appearance', value, styles);
|
|
17231
17232
|
}
|
|
17232
17233
|
|
|
17233
|
-
const styles$
|
|
17234
|
+
const styles$K = css `
|
|
17234
17235
|
${display('inline-flex')}
|
|
17235
17236
|
|
|
17236
17237
|
:host {
|
|
@@ -17511,8 +17512,8 @@
|
|
|
17511
17512
|
}
|
|
17512
17513
|
`));
|
|
17513
17514
|
|
|
17514
|
-
const styles$
|
|
17515
|
-
${styles$
|
|
17515
|
+
const styles$J = css `
|
|
17516
|
+
${styles$K}
|
|
17516
17517
|
${buttonAppearanceVariantStyles}
|
|
17517
17518
|
|
|
17518
17519
|
.control {
|
|
@@ -17520,7 +17521,7 @@
|
|
|
17520
17521
|
}
|
|
17521
17522
|
`;
|
|
17522
17523
|
|
|
17523
|
-
const template$
|
|
17524
|
+
const template$m = (context, definition) => html `
|
|
17524
17525
|
<a
|
|
17525
17526
|
class="control"
|
|
17526
17527
|
part="control"
|
|
@@ -17602,8 +17603,8 @@
|
|
|
17602
17603
|
], AnchorButton.prototype, "disabled", void 0);
|
|
17603
17604
|
const nimbleAnchorButton = AnchorButton.compose({
|
|
17604
17605
|
baseName: 'anchor-button',
|
|
17605
|
-
template: template$
|
|
17606
|
-
styles: styles$
|
|
17606
|
+
template: template$m,
|
|
17607
|
+
styles: styles$J,
|
|
17607
17608
|
shadowOptions: {
|
|
17608
17609
|
delegatesFocus: true
|
|
17609
17610
|
}
|
|
@@ -17611,7 +17612,7 @@
|
|
|
17611
17612
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorButton());
|
|
17612
17613
|
DesignSystem.tagFor(AnchorButton);
|
|
17613
17614
|
|
|
17614
|
-
const styles$
|
|
17615
|
+
const styles$I = css `
|
|
17615
17616
|
${display('grid')}
|
|
17616
17617
|
|
|
17617
17618
|
:host {
|
|
@@ -17688,7 +17689,7 @@
|
|
|
17688
17689
|
}
|
|
17689
17690
|
`;
|
|
17690
17691
|
|
|
17691
|
-
const template$
|
|
17692
|
+
const template$l = (context, definition) => html `
|
|
17692
17693
|
<template
|
|
17693
17694
|
role="menuitem"
|
|
17694
17695
|
class="${x => (typeof x.startColumnCount === 'number'
|
|
@@ -17791,15 +17792,15 @@
|
|
|
17791
17792
|
__decorate$1([
|
|
17792
17793
|
observable
|
|
17793
17794
|
], AnchorMenuItem.prototype, "startColumnCount", void 0);
|
|
17795
|
+
// FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
|
|
17794
17796
|
const nimbleAnchorMenuItem = AnchorMenuItem.compose({
|
|
17795
17797
|
baseName: 'anchor-menu-item',
|
|
17796
|
-
template: template$
|
|
17797
|
-
styles: styles$
|
|
17798
|
+
template: template$l,
|
|
17799
|
+
styles: styles$I,
|
|
17798
17800
|
shadowOptions: {
|
|
17799
17801
|
delegatesFocus: true
|
|
17800
17802
|
}
|
|
17801
17803
|
});
|
|
17802
|
-
applyMixins(AnchorMenuItem, StartEnd);
|
|
17803
17804
|
DesignSystem.getOrCreate()
|
|
17804
17805
|
.withPrefix('nimble')
|
|
17805
17806
|
.register(nimbleAnchorMenuItem());
|
|
@@ -17819,7 +17820,7 @@
|
|
|
17819
17820
|
}
|
|
17820
17821
|
});
|
|
17821
17822
|
|
|
17822
|
-
const styles$
|
|
17823
|
+
const styles$H = css `
|
|
17823
17824
|
${display('inline-flex')}
|
|
17824
17825
|
|
|
17825
17826
|
:host {
|
|
@@ -17925,8 +17926,8 @@
|
|
|
17925
17926
|
}
|
|
17926
17927
|
`;
|
|
17927
17928
|
|
|
17928
|
-
const styles$
|
|
17929
|
-
${styles$
|
|
17929
|
+
const styles$G = css `
|
|
17930
|
+
${styles$H}
|
|
17930
17931
|
|
|
17931
17932
|
a {
|
|
17932
17933
|
text-decoration: none;
|
|
@@ -17934,9 +17935,17 @@
|
|
|
17934
17935
|
cursor: inherit;
|
|
17935
17936
|
outline: none;
|
|
17936
17937
|
}
|
|
17938
|
+
|
|
17939
|
+
[part='start'] {
|
|
17940
|
+
display: none;
|
|
17941
|
+
}
|
|
17942
|
+
|
|
17943
|
+
[part='end'] {
|
|
17944
|
+
display: none;
|
|
17945
|
+
}
|
|
17937
17946
|
`;
|
|
17938
17947
|
|
|
17939
|
-
const template$
|
|
17948
|
+
const template$k = (context, definition) => html `
|
|
17940
17949
|
<template slot="anchortab" role="tab" aria-disabled="${x => x.disabled}">
|
|
17941
17950
|
<a
|
|
17942
17951
|
download="${x => x.download}"
|
|
@@ -17949,7 +17958,9 @@
|
|
|
17949
17958
|
type="${x => x.type}"
|
|
17950
17959
|
tabindex="-1"
|
|
17951
17960
|
>
|
|
17961
|
+
${startSlotTemplate(context, definition)}
|
|
17952
17962
|
<slot></slot>
|
|
17963
|
+
${endSlotTemplate(context, definition)}
|
|
17953
17964
|
</a>
|
|
17954
17965
|
</template>
|
|
17955
17966
|
`;
|
|
@@ -17972,15 +17983,16 @@
|
|
|
17972
17983
|
__decorate$1([
|
|
17973
17984
|
attr({ mode: 'boolean' })
|
|
17974
17985
|
], AnchorTab.prototype, "disabled", void 0);
|
|
17986
|
+
// FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
|
|
17975
17987
|
const nimbleAnchorTab = AnchorTab.compose({
|
|
17976
17988
|
baseName: 'anchor-tab',
|
|
17977
|
-
template: template$
|
|
17978
|
-
styles: styles$
|
|
17989
|
+
template: template$k,
|
|
17990
|
+
styles: styles$G
|
|
17979
17991
|
});
|
|
17980
17992
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTab());
|
|
17981
17993
|
DesignSystem.tagFor(AnchorTab);
|
|
17982
17994
|
|
|
17983
|
-
const styles$
|
|
17995
|
+
const styles$F = css `
|
|
17984
17996
|
${display('grid')}
|
|
17985
17997
|
|
|
17986
17998
|
:host {
|
|
@@ -17998,7 +18010,7 @@
|
|
|
17998
18010
|
}
|
|
17999
18011
|
`;
|
|
18000
18012
|
|
|
18001
|
-
const template$
|
|
18013
|
+
const template$j = (context, definition) => html `
|
|
18002
18014
|
${startSlotTemplate(context, definition)}
|
|
18003
18015
|
<div ${ref('tablist')} class="tablist" part="tablist" role="tablist">
|
|
18004
18016
|
<slot name="anchortab" ${slotted('tabs')}></slot>
|
|
@@ -18195,8 +18207,8 @@
|
|
|
18195
18207
|
applyMixins(AnchorTabs, StartEnd);
|
|
18196
18208
|
const nimbleAnchorTabs = AnchorTabs.compose({
|
|
18197
18209
|
baseName: 'anchor-tabs',
|
|
18198
|
-
template: template$
|
|
18199
|
-
styles: styles$
|
|
18210
|
+
template: template$j,
|
|
18211
|
+
styles: styles$F,
|
|
18200
18212
|
shadowOptions: {
|
|
18201
18213
|
delegatesFocus: false
|
|
18202
18214
|
}
|
|
@@ -18204,7 +18216,259 @@
|
|
|
18204
18216
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTabs());
|
|
18205
18217
|
DesignSystem.tagFor(AnchorTabs);
|
|
18206
18218
|
|
|
18207
|
-
const styles$
|
|
18219
|
+
const styles$E = css `
|
|
18220
|
+
${display('block')}
|
|
18221
|
+
|
|
18222
|
+
:host {
|
|
18223
|
+
${
|
|
18224
|
+
/* don't set font-size here or else it overrides what we set on .items */ ''}
|
|
18225
|
+
font-family: ${bodyFontFamily};
|
|
18226
|
+
font-weight: ${bodyFontWeight};
|
|
18227
|
+
contain: content;
|
|
18228
|
+
position: relative;
|
|
18229
|
+
outline: none;
|
|
18230
|
+
color: ${bodyFontColor};
|
|
18231
|
+
cursor: pointer;
|
|
18232
|
+
--ni-private-tree-item-nested-width: 0;
|
|
18233
|
+
}
|
|
18234
|
+
|
|
18235
|
+
.control {
|
|
18236
|
+
display: flex;
|
|
18237
|
+
text-decoration: none;
|
|
18238
|
+
color: ${bodyFontColor};
|
|
18239
|
+
}
|
|
18240
|
+
|
|
18241
|
+
.control${focusVisible} {
|
|
18242
|
+
box-shadow: 0px 0px 0px ${borderWidth} ${borderHoverColor} inset;
|
|
18243
|
+
outline: ${borderWidth} solid ${borderHoverColor};
|
|
18244
|
+
outline-offset: -2px;
|
|
18245
|
+
}
|
|
18246
|
+
|
|
18247
|
+
:host([disabled]) .control {
|
|
18248
|
+
cursor: not-allowed;
|
|
18249
|
+
}
|
|
18250
|
+
|
|
18251
|
+
.positioning-region {
|
|
18252
|
+
display: flex;
|
|
18253
|
+
position: relative;
|
|
18254
|
+
box-sizing: border-box;
|
|
18255
|
+
height: calc(${iconSize} * 2);
|
|
18256
|
+
width: 100%;
|
|
18257
|
+
}
|
|
18258
|
+
|
|
18259
|
+
.positioning-region:hover {
|
|
18260
|
+
background: ${fillHoverColor};
|
|
18261
|
+
}
|
|
18262
|
+
|
|
18263
|
+
:host([selected]) .positioning-region {
|
|
18264
|
+
background: ${fillSelectedColor};
|
|
18265
|
+
}
|
|
18266
|
+
|
|
18267
|
+
:host([selected]) .positioning-region:hover {
|
|
18268
|
+
background: ${fillHoverSelectedColor};
|
|
18269
|
+
}
|
|
18270
|
+
|
|
18271
|
+
.positioning-region::before {
|
|
18272
|
+
content: '';
|
|
18273
|
+
display: block;
|
|
18274
|
+
width: var(--ni-private-tree-item-nested-width);
|
|
18275
|
+
flex-shrink: 0;
|
|
18276
|
+
}
|
|
18277
|
+
|
|
18278
|
+
.content-region {
|
|
18279
|
+
display: inline-flex;
|
|
18280
|
+
align-items: center;
|
|
18281
|
+
white-space: nowrap;
|
|
18282
|
+
width: 100%;
|
|
18283
|
+
padding-left: 10px;
|
|
18284
|
+
font: inherit;
|
|
18285
|
+
font-size: ${bodyFontSize};
|
|
18286
|
+
user-select: none;
|
|
18287
|
+
position: relative;
|
|
18288
|
+
margin-inline-start: ${iconSize};
|
|
18289
|
+
}
|
|
18290
|
+
|
|
18291
|
+
:host([disabled]) .content-region {
|
|
18292
|
+
opacity: 0.5;
|
|
18293
|
+
cursor: not-allowed;
|
|
18294
|
+
}
|
|
18295
|
+
|
|
18296
|
+
${
|
|
18297
|
+
/* this rule keeps children without an icon text aligned with parents */ ''}
|
|
18298
|
+
span[part="start"] {
|
|
18299
|
+
width: ${iconSize};
|
|
18300
|
+
}
|
|
18301
|
+
|
|
18302
|
+
${ /* the start class is applied when the corresponding slot is filled */''}
|
|
18303
|
+
.start {
|
|
18304
|
+
display: flex;
|
|
18305
|
+
fill: currentcolor;
|
|
18306
|
+
margin-inline-start: ${iconSize};
|
|
18307
|
+
margin-inline-end: ${iconSize};
|
|
18308
|
+
}
|
|
18309
|
+
|
|
18310
|
+
slot[name='start']::slotted(*) {
|
|
18311
|
+
width: ${iconSize};
|
|
18312
|
+
height: ${iconSize};
|
|
18313
|
+
}
|
|
18314
|
+
|
|
18315
|
+
${ /* the end class is applied when the corresponding slot is filled */''}
|
|
18316
|
+
.end {
|
|
18317
|
+
display: flex;
|
|
18318
|
+
fill: currentcolor;
|
|
18319
|
+
margin-inline-start: ${iconSize};
|
|
18320
|
+
}
|
|
18321
|
+
`;
|
|
18322
|
+
|
|
18323
|
+
const template$i = (context, definition) => html `
|
|
18324
|
+
<template
|
|
18325
|
+
role="treeitem"
|
|
18326
|
+
slot="${x => (x.isNestedItem() ? 'item' : null)}"
|
|
18327
|
+
tabindex="-1"
|
|
18328
|
+
aria-disabled="${x => x.disabled}"
|
|
18329
|
+
aria-selected="${x => x.selected}"
|
|
18330
|
+
@focusin="${(x, c) => x.handleFocus(c.event)}"
|
|
18331
|
+
@focusout="${(x, c) => x.handleBlur(c.event)}"
|
|
18332
|
+
@keydown="${(x, c) => x.keydownHandler(c.event)}"
|
|
18333
|
+
@click="${(x, c) => x.clickHandler(c.event)}"
|
|
18334
|
+
>
|
|
18335
|
+
<a
|
|
18336
|
+
class="control"
|
|
18337
|
+
part="control"
|
|
18338
|
+
tabindex="0"
|
|
18339
|
+
download="${x => x.download}"
|
|
18340
|
+
href=${x => (x.disabled ? null : x.href)}
|
|
18341
|
+
hreflang="${x => x.hreflang}"
|
|
18342
|
+
ping="${x => x.ping}"
|
|
18343
|
+
referrerpolicy="${x => x.referrerpolicy}"
|
|
18344
|
+
rel="${x => x.rel}"
|
|
18345
|
+
target="${x => x.target}"
|
|
18346
|
+
type="${x => x.type}"
|
|
18347
|
+
${ref('control')}
|
|
18348
|
+
>
|
|
18349
|
+
<div class="positioning-region" part="positioning-region">
|
|
18350
|
+
<div class="content-region" part="content-region">
|
|
18351
|
+
${startSlotTemplate(context, definition)}
|
|
18352
|
+
<span class="content" part="content">
|
|
18353
|
+
<slot></slot>
|
|
18354
|
+
</span>
|
|
18355
|
+
${endSlotTemplate(context, definition)}
|
|
18356
|
+
</div>
|
|
18357
|
+
</div>
|
|
18358
|
+
</a>
|
|
18359
|
+
</template>
|
|
18360
|
+
`;
|
|
18361
|
+
|
|
18362
|
+
/**
|
|
18363
|
+
* A nimble-styled anchor tree item
|
|
18364
|
+
*/
|
|
18365
|
+
class AnchorTreeItem extends AnchorBase {
|
|
18366
|
+
constructor() {
|
|
18367
|
+
super(...arguments);
|
|
18368
|
+
/**
|
|
18369
|
+
* When true, the control will appear selected by user interaction.
|
|
18370
|
+
* @public
|
|
18371
|
+
* @remarks
|
|
18372
|
+
* HTML Attribute: selected
|
|
18373
|
+
*/
|
|
18374
|
+
this.selected = false;
|
|
18375
|
+
/**
|
|
18376
|
+
* When true, the control will be immutable by user interaction. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled | disabled HTML attribute} for more information.
|
|
18377
|
+
* @public
|
|
18378
|
+
* @remarks
|
|
18379
|
+
* HTML Attribute: disabled
|
|
18380
|
+
*/
|
|
18381
|
+
this.disabled = false;
|
|
18382
|
+
}
|
|
18383
|
+
/**
|
|
18384
|
+
* Whether the tree is nested
|
|
18385
|
+
*
|
|
18386
|
+
* @public
|
|
18387
|
+
*/
|
|
18388
|
+
isNestedItem() {
|
|
18389
|
+
return isTreeItemElement(this.parentElement);
|
|
18390
|
+
}
|
|
18391
|
+
/**
|
|
18392
|
+
* Handle focus events
|
|
18393
|
+
*
|
|
18394
|
+
* @internal
|
|
18395
|
+
*/
|
|
18396
|
+
handleFocus(_e) {
|
|
18397
|
+
this.setAttribute('tabindex', '0');
|
|
18398
|
+
}
|
|
18399
|
+
/**
|
|
18400
|
+
* Handle blur events
|
|
18401
|
+
*
|
|
18402
|
+
* @internal
|
|
18403
|
+
*/
|
|
18404
|
+
handleBlur(_e) {
|
|
18405
|
+
this.setAttribute('tabindex', '-1');
|
|
18406
|
+
}
|
|
18407
|
+
/**
|
|
18408
|
+
* @internal
|
|
18409
|
+
*/
|
|
18410
|
+
keydownHandler(e) {
|
|
18411
|
+
if (e.defaultPrevented) {
|
|
18412
|
+
return false;
|
|
18413
|
+
}
|
|
18414
|
+
switch (e.key) {
|
|
18415
|
+
case keyEnter:
|
|
18416
|
+
// Do not let the event bubble up to the FAST tree, or it will
|
|
18417
|
+
// prevent the default action.
|
|
18418
|
+
e.stopPropagation();
|
|
18419
|
+
break;
|
|
18420
|
+
case keyArrowLeft:
|
|
18421
|
+
// For FAST tree items, the FAST tree view handles this navigation,
|
|
18422
|
+
// but since our anchor tree item is not "instanceof FASTTreeItem",
|
|
18423
|
+
// the FAST tree view won't do this for us. We do it ourselves.
|
|
18424
|
+
if (this.parentElement && this.isNestedItem()) {
|
|
18425
|
+
TreeItem$1.focusItem(this.parentElement);
|
|
18426
|
+
}
|
|
18427
|
+
break;
|
|
18428
|
+
}
|
|
18429
|
+
return true;
|
|
18430
|
+
}
|
|
18431
|
+
/**
|
|
18432
|
+
* Activating the anchor by pressing the Enter key results in a click event.
|
|
18433
|
+
* This bubbles up to the Nimble tree-view's click handler, causing the tree item
|
|
18434
|
+
* to be selected. We don't want that for anchor tree items. We'll stop propagation
|
|
18435
|
+
* of the event to prevent that.
|
|
18436
|
+
* @internal
|
|
18437
|
+
*/
|
|
18438
|
+
clickHandler(e) {
|
|
18439
|
+
if (e.defaultPrevented) {
|
|
18440
|
+
return false;
|
|
18441
|
+
}
|
|
18442
|
+
e.stopPropagation();
|
|
18443
|
+
return true;
|
|
18444
|
+
}
|
|
18445
|
+
selectedChanged(_prev, _next) {
|
|
18446
|
+
if (this.$fastController.isConnected) {
|
|
18447
|
+
this.$emit('selected-change', this);
|
|
18448
|
+
}
|
|
18449
|
+
}
|
|
18450
|
+
}
|
|
18451
|
+
__decorate$1([
|
|
18452
|
+
attr({ mode: 'boolean' })
|
|
18453
|
+
], AnchorTreeItem.prototype, "selected", void 0);
|
|
18454
|
+
__decorate$1([
|
|
18455
|
+
attr({ mode: 'boolean' })
|
|
18456
|
+
], AnchorTreeItem.prototype, "disabled", void 0);
|
|
18457
|
+
// FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
|
|
18458
|
+
const nimbleAnchorTreeItem = AnchorTreeItem.compose({
|
|
18459
|
+
baseName: 'anchor-tree-item',
|
|
18460
|
+
template: template$i,
|
|
18461
|
+
styles: styles$E,
|
|
18462
|
+
shadowOptions: {
|
|
18463
|
+
delegatesFocus: true
|
|
18464
|
+
}
|
|
18465
|
+
});
|
|
18466
|
+
DesignSystem.getOrCreate()
|
|
18467
|
+
.withPrefix('nimble')
|
|
18468
|
+
.register(nimbleAnchorTreeItem());
|
|
18469
|
+
DesignSystem.tagFor(AnchorTreeItem);
|
|
18470
|
+
|
|
18471
|
+
const styles$D = css `
|
|
18208
18472
|
:host {
|
|
18209
18473
|
contain: layout;
|
|
18210
18474
|
display: block;
|
|
@@ -18228,7 +18492,7 @@
|
|
|
18228
18492
|
baseName: 'anchored-region',
|
|
18229
18493
|
baseClass: AnchoredRegion$1,
|
|
18230
18494
|
template: anchoredRegionTemplate,
|
|
18231
|
-
styles: styles$
|
|
18495
|
+
styles: styles$D
|
|
18232
18496
|
});
|
|
18233
18497
|
DesignSystem.getOrCreate()
|
|
18234
18498
|
.withPrefix('nimble')
|
|
@@ -18308,7 +18572,7 @@
|
|
|
18308
18572
|
*/
|
|
18309
18573
|
const themeBehavior = (theme, styles) => new ThemeStyleSheetBehavior(theme, styles);
|
|
18310
18574
|
|
|
18311
|
-
const styles$
|
|
18575
|
+
const styles$C = css `
|
|
18312
18576
|
${display('flex')}
|
|
18313
18577
|
|
|
18314
18578
|
:host {
|
|
@@ -18466,8 +18730,8 @@
|
|
|
18466
18730
|
}
|
|
18467
18731
|
`));
|
|
18468
18732
|
|
|
18469
|
-
const styles$
|
|
18470
|
-
${styles$
|
|
18733
|
+
const styles$B = css `
|
|
18734
|
+
${styles$K}
|
|
18471
18735
|
${buttonAppearanceVariantStyles}
|
|
18472
18736
|
`;
|
|
18473
18737
|
|
|
@@ -18513,7 +18777,7 @@
|
|
|
18513
18777
|
baseName: 'button',
|
|
18514
18778
|
baseClass: Button$1,
|
|
18515
18779
|
template: buttonTemplate,
|
|
18516
|
-
styles: styles$
|
|
18780
|
+
styles: styles$B,
|
|
18517
18781
|
shadowOptions: {
|
|
18518
18782
|
delegatesFocus: true
|
|
18519
18783
|
}
|
|
@@ -19135,13 +19399,13 @@
|
|
|
19135
19399
|
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>`
|
|
19136
19400
|
};
|
|
19137
19401
|
|
|
19138
|
-
const template$
|
|
19402
|
+
const template$h = html `
|
|
19139
19403
|
<template>
|
|
19140
19404
|
<div class="icon" :innerHTML=${x => x.icon.data}></div>
|
|
19141
19405
|
</template
|
|
19142
19406
|
`;
|
|
19143
19407
|
|
|
19144
|
-
const styles$
|
|
19408
|
+
const styles$A = css `
|
|
19145
19409
|
${display('inline-flex')}
|
|
19146
19410
|
|
|
19147
19411
|
:host {
|
|
@@ -19194,8 +19458,8 @@
|
|
|
19194
19458
|
const registerIcon = (baseName, iconClass) => {
|
|
19195
19459
|
const composedIcon = iconClass.compose({
|
|
19196
19460
|
baseName,
|
|
19197
|
-
template: template$
|
|
19198
|
-
styles: styles$
|
|
19461
|
+
template: template$h,
|
|
19462
|
+
styles: styles$A,
|
|
19199
19463
|
baseClass: iconClass
|
|
19200
19464
|
});
|
|
19201
19465
|
DesignSystem.getOrCreate().withPrefix('nimble').register(composedIcon());
|
|
@@ -19261,7 +19525,7 @@
|
|
|
19261
19525
|
};
|
|
19262
19526
|
|
|
19263
19527
|
// prettier-ignore
|
|
19264
|
-
const template$
|
|
19528
|
+
const template$g = html `
|
|
19265
19529
|
<div class="container"
|
|
19266
19530
|
role="status"
|
|
19267
19531
|
aria-atomic="${x => x.ariaAtomic}"
|
|
@@ -19380,13 +19644,13 @@
|
|
|
19380
19644
|
applyMixins(Banner, ARIAGlobalStatesAndProperties);
|
|
19381
19645
|
const nimbleBanner = Banner.compose({
|
|
19382
19646
|
baseName: 'banner',
|
|
19383
|
-
template: template$
|
|
19384
|
-
styles: styles$
|
|
19647
|
+
template: template$g,
|
|
19648
|
+
styles: styles$C
|
|
19385
19649
|
});
|
|
19386
19650
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBanner());
|
|
19387
19651
|
DesignSystem.tagFor(Banner);
|
|
19388
19652
|
|
|
19389
|
-
const styles$
|
|
19653
|
+
const styles$z = css `
|
|
19390
19654
|
${display('inline-block')}
|
|
19391
19655
|
|
|
19392
19656
|
:host {
|
|
@@ -19427,12 +19691,12 @@
|
|
|
19427
19691
|
baseName: 'breadcrumb',
|
|
19428
19692
|
baseClass: Breadcrumb$1,
|
|
19429
19693
|
template: breadcrumbTemplate,
|
|
19430
|
-
styles: styles$
|
|
19694
|
+
styles: styles$z
|
|
19431
19695
|
});
|
|
19432
19696
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBreadcrumb());
|
|
19433
19697
|
DesignSystem.tagFor(Breadcrumb);
|
|
19434
19698
|
|
|
19435
|
-
const styles$
|
|
19699
|
+
const styles$y = css `
|
|
19436
19700
|
${display('inline-flex')}
|
|
19437
19701
|
|
|
19438
19702
|
:host {
|
|
@@ -19508,7 +19772,7 @@
|
|
|
19508
19772
|
baseName: 'breadcrumb-item',
|
|
19509
19773
|
baseClass: BreadcrumbItem$1,
|
|
19510
19774
|
template: breadcrumbItemTemplate,
|
|
19511
|
-
styles: styles$
|
|
19775
|
+
styles: styles$y,
|
|
19512
19776
|
separator: forwardSlash16X16.data
|
|
19513
19777
|
});
|
|
19514
19778
|
DesignSystem.getOrCreate()
|
|
@@ -19516,7 +19780,7 @@
|
|
|
19516
19780
|
.register(nimbleBreadcrumbItem());
|
|
19517
19781
|
DesignSystem.tagFor(BreadcrumbItem);
|
|
19518
19782
|
|
|
19519
|
-
const styles$
|
|
19783
|
+
const styles$x = css `
|
|
19520
19784
|
${display('inline-flex')}
|
|
19521
19785
|
|
|
19522
19786
|
:host {
|
|
@@ -19675,7 +19939,7 @@
|
|
|
19675
19939
|
const nimbleCardButton = CardButton.compose({
|
|
19676
19940
|
baseName: 'card-button',
|
|
19677
19941
|
template: buttonTemplate,
|
|
19678
|
-
styles: styles$
|
|
19942
|
+
styles: styles$x,
|
|
19679
19943
|
shadowOptions: {
|
|
19680
19944
|
delegatesFocus: true
|
|
19681
19945
|
}
|
|
@@ -19683,7 +19947,7 @@
|
|
|
19683
19947
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCardButton());
|
|
19684
19948
|
DesignSystem.tagFor(CardButton);
|
|
19685
19949
|
|
|
19686
|
-
const styles$
|
|
19950
|
+
const styles$w = css `
|
|
19687
19951
|
${display('inline-flex')}
|
|
19688
19952
|
|
|
19689
19953
|
:host {
|
|
@@ -19801,15 +20065,15 @@
|
|
|
19801
20065
|
baseName: 'checkbox',
|
|
19802
20066
|
baseClass: Checkbox$1,
|
|
19803
20067
|
template: checkboxTemplate,
|
|
19804
|
-
styles: styles$
|
|
20068
|
+
styles: styles$w,
|
|
19805
20069
|
checkedIndicator: check16X16.data,
|
|
19806
20070
|
indeterminateIndicator: minus16X16.data
|
|
19807
20071
|
});
|
|
19808
20072
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCheckbox());
|
|
19809
20073
|
DesignSystem.tagFor(Checkbox);
|
|
19810
20074
|
|
|
19811
|
-
const styles$
|
|
19812
|
-
${styles$
|
|
20075
|
+
const styles$v = css `
|
|
20076
|
+
${styles$K}
|
|
19813
20077
|
|
|
19814
20078
|
.control[aria-pressed='true'] {
|
|
19815
20079
|
background-color: ${fillSelectedColor};
|
|
@@ -19835,7 +20099,7 @@
|
|
|
19835
20099
|
}
|
|
19836
20100
|
`;
|
|
19837
20101
|
|
|
19838
|
-
const template$
|
|
20102
|
+
const template$f = (context, definition) => html `
|
|
19839
20103
|
<div
|
|
19840
20104
|
role="button"
|
|
19841
20105
|
part="control"
|
|
@@ -19910,8 +20174,8 @@
|
|
|
19910
20174
|
applyMixins(ToggleButton, StartEnd, DelegatesARIAButton);
|
|
19911
20175
|
const nimbleToggleButton = ToggleButton.compose({
|
|
19912
20176
|
baseName: 'toggle-button',
|
|
19913
|
-
template: template$
|
|
19914
|
-
styles: styles$
|
|
20177
|
+
template: template$f,
|
|
20178
|
+
styles: styles$v,
|
|
19915
20179
|
shadowOptions: {
|
|
19916
20180
|
delegatesFocus: true
|
|
19917
20181
|
}
|
|
@@ -19943,7 +20207,7 @@
|
|
|
19943
20207
|
block: 'block'
|
|
19944
20208
|
};
|
|
19945
20209
|
|
|
19946
|
-
const styles$
|
|
20210
|
+
const styles$u = css `
|
|
19947
20211
|
${display('inline-flex')}
|
|
19948
20212
|
|
|
19949
20213
|
:host {
|
|
@@ -20179,7 +20443,7 @@
|
|
|
20179
20443
|
}
|
|
20180
20444
|
`));
|
|
20181
20445
|
|
|
20182
|
-
const styles$
|
|
20446
|
+
const styles$t = css `
|
|
20183
20447
|
.error-icon {
|
|
20184
20448
|
display: none;
|
|
20185
20449
|
}
|
|
@@ -20213,9 +20477,9 @@
|
|
|
20213
20477
|
}
|
|
20214
20478
|
`;
|
|
20215
20479
|
|
|
20216
|
-
const styles$
|
|
20480
|
+
const styles$s = css `
|
|
20481
|
+
${styles$u}
|
|
20217
20482
|
${styles$t}
|
|
20218
|
-
${styles$s}
|
|
20219
20483
|
|
|
20220
20484
|
:host {
|
|
20221
20485
|
--ni-private-hover-bottom-border-width: 2px;
|
|
@@ -20451,7 +20715,7 @@
|
|
|
20451
20715
|
baseName: 'combobox',
|
|
20452
20716
|
baseClass: Combobox$1,
|
|
20453
20717
|
template: comboboxTemplate,
|
|
20454
|
-
styles: styles$
|
|
20718
|
+
styles: styles$s,
|
|
20455
20719
|
shadowOptions: {
|
|
20456
20720
|
delegatesFocus: true
|
|
20457
20721
|
},
|
|
@@ -20496,7 +20760,7 @@
|
|
|
20496
20760
|
*/
|
|
20497
20761
|
const UserDismissed = Symbol('user dismissed');
|
|
20498
20762
|
|
|
20499
|
-
const styles$
|
|
20763
|
+
const styles$r = css `
|
|
20500
20764
|
${display('grid')}
|
|
20501
20765
|
|
|
20502
20766
|
dialog {
|
|
@@ -20612,7 +20876,7 @@
|
|
|
20612
20876
|
}
|
|
20613
20877
|
`));
|
|
20614
20878
|
|
|
20615
|
-
const template$
|
|
20879
|
+
const template$e = html `
|
|
20616
20880
|
<template>
|
|
20617
20881
|
<dialog
|
|
20618
20882
|
${ref('dialogElement')}
|
|
@@ -20738,14 +21002,14 @@
|
|
|
20738
21002
|
applyMixins(Dialog, ARIAGlobalStatesAndProperties);
|
|
20739
21003
|
const nimbleDialog = Dialog.compose({
|
|
20740
21004
|
baseName: 'dialog',
|
|
20741
|
-
template: template$
|
|
20742
|
-
styles: styles$
|
|
21005
|
+
template: template$e,
|
|
21006
|
+
styles: styles$r,
|
|
20743
21007
|
baseClass: Dialog
|
|
20744
21008
|
});
|
|
20745
21009
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDialog());
|
|
20746
21010
|
DesignSystem.tagFor(Dialog);
|
|
20747
21011
|
|
|
20748
|
-
const styles$
|
|
21012
|
+
const styles$q = css `
|
|
20749
21013
|
${display('block')}
|
|
20750
21014
|
|
|
20751
21015
|
:host {
|
|
@@ -20898,7 +21162,7 @@
|
|
|
20898
21162
|
}
|
|
20899
21163
|
`));
|
|
20900
21164
|
|
|
20901
|
-
const template$
|
|
21165
|
+
const template$d = html `
|
|
20902
21166
|
<dialog
|
|
20903
21167
|
${ref('dialog')}
|
|
20904
21168
|
aria-label="${x => x.ariaLabel}"
|
|
@@ -21012,8 +21276,8 @@
|
|
|
21012
21276
|
applyMixins(Drawer, ARIAGlobalStatesAndProperties);
|
|
21013
21277
|
const nimbleDrawer = Drawer.compose({
|
|
21014
21278
|
baseName: 'drawer',
|
|
21015
|
-
template: template$
|
|
21016
|
-
styles: styles$
|
|
21279
|
+
template: template$d,
|
|
21280
|
+
styles: styles$q
|
|
21017
21281
|
});
|
|
21018
21282
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDrawer());
|
|
21019
21283
|
DesignSystem.tagFor(Drawer);
|
|
@@ -22794,7 +23058,7 @@
|
|
|
22794
23058
|
registerIcon('icon-xmark-check', IconXmarkCheck);
|
|
22795
23059
|
DesignSystem.tagFor(IconXmarkCheck);
|
|
22796
23060
|
|
|
22797
|
-
const styles$
|
|
23061
|
+
const styles$p = css `
|
|
22798
23062
|
${display('flex')}
|
|
22799
23063
|
|
|
22800
23064
|
:host {
|
|
@@ -22874,12 +23138,12 @@
|
|
|
22874
23138
|
baseName: 'list-option',
|
|
22875
23139
|
baseClass: ListboxOption,
|
|
22876
23140
|
template: listboxOptionTemplate,
|
|
22877
|
-
styles: styles$
|
|
23141
|
+
styles: styles$p
|
|
22878
23142
|
});
|
|
22879
23143
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleListOption());
|
|
22880
23144
|
DesignSystem.tagFor(ListOption);
|
|
22881
23145
|
|
|
22882
|
-
const styles$
|
|
23146
|
+
const styles$o = css `
|
|
22883
23147
|
${display('grid')}
|
|
22884
23148
|
|
|
22885
23149
|
:host {
|
|
@@ -22946,12 +23210,12 @@
|
|
|
22946
23210
|
baseName: 'menu',
|
|
22947
23211
|
baseClass: Menu$1,
|
|
22948
23212
|
template: menuTemplate,
|
|
22949
|
-
styles: styles$
|
|
23213
|
+
styles: styles$o
|
|
22950
23214
|
});
|
|
22951
23215
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenu());
|
|
22952
23216
|
DesignSystem.tagFor(Menu);
|
|
22953
23217
|
|
|
22954
|
-
const styles$
|
|
23218
|
+
const styles$n = css `
|
|
22955
23219
|
${display('inline-block')}
|
|
22956
23220
|
|
|
22957
23221
|
:host {
|
|
@@ -22970,7 +23234,7 @@
|
|
|
22970
23234
|
`;
|
|
22971
23235
|
|
|
22972
23236
|
// prettier-ignore
|
|
22973
|
-
const template$
|
|
23237
|
+
const template$c = html `
|
|
22974
23238
|
<template
|
|
22975
23239
|
?open="${x => x.open}"
|
|
22976
23240
|
@focusout="${(x, c) => x.focusoutHandler(c.event)}"
|
|
@@ -23225,8 +23489,8 @@
|
|
|
23225
23489
|
], MenuButton.prototype, "slottedMenus", void 0);
|
|
23226
23490
|
const nimbleMenuButton = MenuButton.compose({
|
|
23227
23491
|
baseName: 'menu-button',
|
|
23228
|
-
template: template$
|
|
23229
|
-
styles: styles$
|
|
23492
|
+
template: template$c,
|
|
23493
|
+
styles: styles$n,
|
|
23230
23494
|
shadowOptions: {
|
|
23231
23495
|
delegatesFocus: true
|
|
23232
23496
|
}
|
|
@@ -23234,7 +23498,7 @@
|
|
|
23234
23498
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuButton());
|
|
23235
23499
|
const menuButtonTag = DesignSystem.tagFor(MenuButton);
|
|
23236
23500
|
|
|
23237
|
-
const styles$
|
|
23501
|
+
const styles$m = css `
|
|
23238
23502
|
${display('grid')}
|
|
23239
23503
|
|
|
23240
23504
|
:host {
|
|
@@ -23332,7 +23596,7 @@
|
|
|
23332
23596
|
baseName: 'menu-item',
|
|
23333
23597
|
baseClass: MenuItem$1,
|
|
23334
23598
|
template: menuItemTemplate,
|
|
23335
|
-
styles: styles$
|
|
23599
|
+
styles: styles$m,
|
|
23336
23600
|
expandCollapseGlyph: arrowExpanderRight16X16.data
|
|
23337
23601
|
});
|
|
23338
23602
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuItem());
|
|
@@ -23347,9 +23611,9 @@
|
|
|
23347
23611
|
block: 'block'
|
|
23348
23612
|
};
|
|
23349
23613
|
|
|
23350
|
-
const styles$
|
|
23614
|
+
const styles$l = css `
|
|
23351
23615
|
${display('inline-block')}
|
|
23352
|
-
${styles$
|
|
23616
|
+
${styles$t}
|
|
23353
23617
|
|
|
23354
23618
|
:host {
|
|
23355
23619
|
font: ${bodyFont};
|
|
@@ -23563,7 +23827,7 @@
|
|
|
23563
23827
|
baseName: 'number-field',
|
|
23564
23828
|
baseClass: NumberField$1,
|
|
23565
23829
|
template: numberFieldTemplate,
|
|
23566
|
-
styles: styles$
|
|
23830
|
+
styles: styles$l,
|
|
23567
23831
|
shadowOptions: {
|
|
23568
23832
|
delegatesFocus: true
|
|
23569
23833
|
},
|
|
@@ -23605,7 +23869,7 @@
|
|
|
23605
23869
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleNumberField());
|
|
23606
23870
|
DesignSystem.tagFor(NumberField);
|
|
23607
23871
|
|
|
23608
|
-
const styles$
|
|
23872
|
+
const styles$k = css `
|
|
23609
23873
|
${display('inline-flex')}
|
|
23610
23874
|
|
|
23611
23875
|
:host {
|
|
@@ -23705,13 +23969,13 @@
|
|
|
23705
23969
|
baseName: 'radio',
|
|
23706
23970
|
baseClass: Radio$1,
|
|
23707
23971
|
template: radioTemplate,
|
|
23708
|
-
styles: styles$
|
|
23972
|
+
styles: styles$k,
|
|
23709
23973
|
checkedIndicator: circleFilled16X16.data
|
|
23710
23974
|
});
|
|
23711
23975
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadio());
|
|
23712
23976
|
DesignSystem.tagFor(Radio);
|
|
23713
23977
|
|
|
23714
|
-
const styles$
|
|
23978
|
+
const styles$j = css `
|
|
23715
23979
|
${display('inline-block')}
|
|
23716
23980
|
|
|
23717
23981
|
.positioning-region {
|
|
@@ -23746,7 +24010,7 @@
|
|
|
23746
24010
|
baseName: 'radio-group',
|
|
23747
24011
|
baseClass: RadioGroup$1,
|
|
23748
24012
|
template: radioGroupTemplate,
|
|
23749
|
-
styles: styles$
|
|
24013
|
+
styles: styles$j,
|
|
23750
24014
|
shadowOptions: {
|
|
23751
24015
|
delegatesFocus: true
|
|
23752
24016
|
}
|
|
@@ -23754,9 +24018,9 @@
|
|
|
23754
24018
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadioGroup());
|
|
23755
24019
|
DesignSystem.tagFor(RadioGroup);
|
|
23756
24020
|
|
|
23757
|
-
const styles$
|
|
24021
|
+
const styles$i = css `
|
|
24022
|
+
${styles$u}
|
|
23758
24023
|
${styles$t}
|
|
23759
|
-
${styles$s}
|
|
23760
24024
|
|
|
23761
24025
|
${
|
|
23762
24026
|
/* We are using flex `order` to define the visual ordering of the selected value,
|
|
@@ -23832,7 +24096,7 @@
|
|
|
23832
24096
|
baseName: 'select',
|
|
23833
24097
|
baseClass: Select$1,
|
|
23834
24098
|
template: selectTemplate,
|
|
23835
|
-
styles: styles$
|
|
24099
|
+
styles: styles$i,
|
|
23836
24100
|
indicator: arrowExpanderDown16X16.data,
|
|
23837
24101
|
end: html `
|
|
23838
24102
|
<${iconExclamationMarkTag}
|
|
@@ -23845,7 +24109,7 @@
|
|
|
23845
24109
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSelect());
|
|
23846
24110
|
DesignSystem.tagFor(Select);
|
|
23847
24111
|
|
|
23848
|
-
const styles$
|
|
24112
|
+
const styles$h = css `
|
|
23849
24113
|
${display('inline-flex')}
|
|
23850
24114
|
|
|
23851
24115
|
:host {
|
|
@@ -23989,7 +24253,7 @@
|
|
|
23989
24253
|
}
|
|
23990
24254
|
`));
|
|
23991
24255
|
|
|
23992
|
-
const template$
|
|
24256
|
+
const template$b = html `
|
|
23993
24257
|
<template role="progressbar">
|
|
23994
24258
|
<div class="container">
|
|
23995
24259
|
<div class="bit1"></div>
|
|
@@ -24006,13 +24270,13 @@
|
|
|
24006
24270
|
}
|
|
24007
24271
|
const nimbleSpinner = Spinner.compose({
|
|
24008
24272
|
baseName: 'spinner',
|
|
24009
|
-
template: template$
|
|
24010
|
-
styles: styles$
|
|
24273
|
+
template: template$b,
|
|
24274
|
+
styles: styles$h
|
|
24011
24275
|
});
|
|
24012
24276
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSpinner());
|
|
24013
24277
|
DesignSystem.tagFor(Spinner);
|
|
24014
24278
|
|
|
24015
|
-
const styles$
|
|
24279
|
+
const styles$g = css `
|
|
24016
24280
|
${display('inline-flex')}
|
|
24017
24281
|
|
|
24018
24282
|
:host {
|
|
@@ -24175,7 +24439,7 @@
|
|
|
24175
24439
|
`));
|
|
24176
24440
|
|
|
24177
24441
|
// prettier-ignore
|
|
24178
|
-
const template$
|
|
24442
|
+
const template$a = html `
|
|
24179
24443
|
<template
|
|
24180
24444
|
role="switch"
|
|
24181
24445
|
aria-checked="${x => x.checked}"
|
|
@@ -24219,8 +24483,8 @@
|
|
|
24219
24483
|
const nimbleSwitch = Switch.compose({
|
|
24220
24484
|
baseClass: Switch$1,
|
|
24221
24485
|
baseName: 'switch',
|
|
24222
|
-
template: template$
|
|
24223
|
-
styles: styles$
|
|
24486
|
+
template: template$a,
|
|
24487
|
+
styles: styles$g
|
|
24224
24488
|
});
|
|
24225
24489
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSwitch());
|
|
24226
24490
|
DesignSystem.tagFor(Switch);
|
|
@@ -24234,12 +24498,12 @@
|
|
|
24234
24498
|
baseName: 'tab',
|
|
24235
24499
|
baseClass: Tab$1,
|
|
24236
24500
|
template: tabTemplate,
|
|
24237
|
-
styles: styles$
|
|
24501
|
+
styles: styles$H
|
|
24238
24502
|
});
|
|
24239
24503
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTab());
|
|
24240
24504
|
DesignSystem.tagFor(Tab);
|
|
24241
24505
|
|
|
24242
|
-
const styles$
|
|
24506
|
+
const styles$f = css `
|
|
24243
24507
|
${display('block')}
|
|
24244
24508
|
|
|
24245
24509
|
:host {
|
|
@@ -24259,7 +24523,7 @@
|
|
|
24259
24523
|
baseName: 'tab-panel',
|
|
24260
24524
|
baseClass: TabPanel$1,
|
|
24261
24525
|
template: tabPanelTemplate,
|
|
24262
|
-
styles: styles$
|
|
24526
|
+
styles: styles$f
|
|
24263
24527
|
});
|
|
24264
24528
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTabPanel());
|
|
24265
24529
|
DesignSystem.tagFor(TabPanel);
|
|
@@ -27293,6 +27557,31 @@
|
|
|
27293
27557
|
});
|
|
27294
27558
|
}
|
|
27295
27559
|
|
|
27560
|
+
// prettier-ignore
|
|
27561
|
+
const template$9 = html `
|
|
27562
|
+
<template role="cell">
|
|
27563
|
+
${x => x.cellViewTemplate}
|
|
27564
|
+
${when(x => x.hasActionMenu, html `
|
|
27565
|
+
<${menuButtonTag} ${ref('actionMenuButton')}
|
|
27566
|
+
content-hidden
|
|
27567
|
+
appearance="${ButtonAppearance.ghost}"
|
|
27568
|
+
@beforetoggle="${(x, c) => x.onActionMenuBeforeToggle(c.event)}"
|
|
27569
|
+
@toggle="${(x, c) => x.onActionMenuToggle(c.event)}"
|
|
27570
|
+
class="action-menu"
|
|
27571
|
+
>
|
|
27572
|
+
<${iconThreeDotsLineTag} slot="start"></${iconThreeDotsLineTag}>
|
|
27573
|
+
${x => x.actionMenuLabel}
|
|
27574
|
+
<slot name="cellActionMenu" slot="menu"></slot>
|
|
27575
|
+
</${menuButtonTag}>
|
|
27576
|
+
`)}
|
|
27577
|
+
</template>
|
|
27578
|
+
`;
|
|
27579
|
+
const createCellViewTemplate = (cellViewTag) => html `<${cellViewTag} class="cell-view"
|
|
27580
|
+
:cellRecord="${y => y.cellState?.cellRecord}"
|
|
27581
|
+
:columnConfig="${y => y.cellState?.columnConfig}"
|
|
27582
|
+
>
|
|
27583
|
+
</${cellViewTag}>`;
|
|
27584
|
+
|
|
27296
27585
|
/**
|
|
27297
27586
|
* The possible directions a table column can be sorted in.
|
|
27298
27587
|
*/
|
|
@@ -27366,6 +27655,11 @@
|
|
|
27366
27655
|
super.connectedCallback();
|
|
27367
27656
|
this.setAttribute('slot', this.internalUniqueId);
|
|
27368
27657
|
}
|
|
27658
|
+
cellViewTagChanged() {
|
|
27659
|
+
this.currentCellViewTemplate = this.cellViewTag
|
|
27660
|
+
? createCellViewTemplate(this.cellViewTag)
|
|
27661
|
+
: undefined;
|
|
27662
|
+
}
|
|
27369
27663
|
internalFractionalWidthChanged() {
|
|
27370
27664
|
this.currentFractionalWidth = this.internalFractionalWidth;
|
|
27371
27665
|
}
|
|
@@ -27406,6 +27700,12 @@
|
|
|
27406
27700
|
__decorate$1([
|
|
27407
27701
|
observable
|
|
27408
27702
|
], TableColumn.prototype, "internalMinPixelWidth", void 0);
|
|
27703
|
+
__decorate$1([
|
|
27704
|
+
observable
|
|
27705
|
+
], TableColumn.prototype, "cellViewTag", void 0);
|
|
27706
|
+
__decorate$1([
|
|
27707
|
+
observable
|
|
27708
|
+
], TableColumn.prototype, "currentCellViewTemplate", void 0);
|
|
27409
27709
|
__decorate$1([
|
|
27410
27710
|
observable
|
|
27411
27711
|
], TableColumn.prototype, "dataRecordFieldNames", void 0);
|
|
@@ -27506,7 +27806,7 @@
|
|
|
27506
27806
|
}
|
|
27507
27807
|
}
|
|
27508
27808
|
|
|
27509
|
-
const styles$
|
|
27809
|
+
const styles$e = css `
|
|
27510
27810
|
${display('flex')}
|
|
27511
27811
|
|
|
27512
27812
|
:host {
|
|
@@ -27602,7 +27902,7 @@
|
|
|
27602
27902
|
}
|
|
27603
27903
|
`));
|
|
27604
27904
|
|
|
27605
|
-
const styles$
|
|
27905
|
+
const styles$d = css `
|
|
27606
27906
|
${display('flex')}
|
|
27607
27907
|
|
|
27608
27908
|
:host {
|
|
@@ -27672,12 +27972,12 @@
|
|
|
27672
27972
|
const nimbleTableHeader = TableHeader.compose({
|
|
27673
27973
|
baseName: 'table-header',
|
|
27674
27974
|
template: template$8,
|
|
27675
|
-
styles: styles$
|
|
27975
|
+
styles: styles$d
|
|
27676
27976
|
});
|
|
27677
27977
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableHeader());
|
|
27678
27978
|
const tableHeaderTag = DesignSystem.tagFor(TableHeader);
|
|
27679
27979
|
|
|
27680
|
-
const styles$
|
|
27980
|
+
const styles$c = css `
|
|
27681
27981
|
${display('grid')}
|
|
27682
27982
|
|
|
27683
27983
|
:host {
|
|
@@ -27703,7 +28003,7 @@
|
|
|
27703
28003
|
}
|
|
27704
28004
|
`;
|
|
27705
28005
|
|
|
27706
|
-
const styles$
|
|
28006
|
+
const styles$b = css `
|
|
27707
28007
|
${display('grid')}
|
|
27708
28008
|
|
|
27709
28009
|
:host {
|
|
@@ -27715,7 +28015,7 @@
|
|
|
27715
28015
|
--ni-private-table-cell-action-menu-display: block;
|
|
27716
28016
|
}
|
|
27717
28017
|
|
|
27718
|
-
.cell-
|
|
28018
|
+
.cell-view {
|
|
27719
28019
|
overflow: hidden;
|
|
27720
28020
|
display: flex;
|
|
27721
28021
|
align-items: center;
|
|
@@ -27726,27 +28026,6 @@
|
|
|
27726
28026
|
}
|
|
27727
28027
|
`;
|
|
27728
28028
|
|
|
27729
|
-
// prettier-ignore
|
|
27730
|
-
const template$7 = html `
|
|
27731
|
-
<template role="cell">
|
|
27732
|
-
<div ${ref('cellContentContainer')} class="cell-content-container"></div>
|
|
27733
|
-
|
|
27734
|
-
${when(x => x.hasActionMenu, html `
|
|
27735
|
-
<${menuButtonTag}
|
|
27736
|
-
content-hidden
|
|
27737
|
-
appearance="${ButtonAppearance.ghost}"
|
|
27738
|
-
@beforetoggle="${(x, c) => x.onActionMenuBeforeToggle(c.event)}"
|
|
27739
|
-
@toggle="${(x, c) => x.onActionMenuToggle(c.event)}"
|
|
27740
|
-
class="action-menu"
|
|
27741
|
-
>
|
|
27742
|
-
<${iconThreeDotsLineTag} slot="start"></${iconThreeDotsLineTag}>
|
|
27743
|
-
${x => x.actionMenuLabel}
|
|
27744
|
-
<slot name="cellActionMenu" slot="menu"></slot>
|
|
27745
|
-
</${menuButtonTag}>
|
|
27746
|
-
`)}
|
|
27747
|
-
</template>
|
|
27748
|
-
`;
|
|
27749
|
-
|
|
27750
28029
|
/**
|
|
27751
28030
|
* A styled cell that is used within the nimble-table-row.
|
|
27752
28031
|
* @internal
|
|
@@ -27756,18 +28035,6 @@
|
|
|
27756
28035
|
super(...arguments);
|
|
27757
28036
|
this.hasActionMenu = false;
|
|
27758
28037
|
this.menuOpen = false;
|
|
27759
|
-
this.customCellView = undefined;
|
|
27760
|
-
}
|
|
27761
|
-
connectedCallback() {
|
|
27762
|
-
super.connectedCallback();
|
|
27763
|
-
this.customCellView = this.cellTemplate?.render(this.cellState, this.cellContentContainer);
|
|
27764
|
-
}
|
|
27765
|
-
disconnectedCallback() {
|
|
27766
|
-
super.disconnectedCallback();
|
|
27767
|
-
if (this.customCellView) {
|
|
27768
|
-
this.customCellView.dispose();
|
|
27769
|
-
this.customCellView = undefined;
|
|
27770
|
-
}
|
|
27771
28038
|
}
|
|
27772
28039
|
onActionMenuBeforeToggle(event) {
|
|
27773
28040
|
this.$emit('cell-action-menu-beforetoggle', event.detail);
|
|
@@ -27776,32 +28043,10 @@
|
|
|
27776
28043
|
this.menuOpen = event.detail.newState;
|
|
27777
28044
|
this.$emit('cell-action-menu-toggle', event.detail);
|
|
27778
28045
|
}
|
|
27779
|
-
cellStateChanged() {
|
|
27780
|
-
this.customCellView?.bind(this.cellState, defaultExecutionContext);
|
|
27781
|
-
}
|
|
27782
|
-
cellTemplateChanged() {
|
|
27783
|
-
if (this.$fastController.isConnected) {
|
|
27784
|
-
this.customCellView = this.cellTemplate?.render(this.cellState, this.cellContentContainer);
|
|
27785
|
-
}
|
|
27786
|
-
}
|
|
27787
|
-
cellStylesChanged(prev, next) {
|
|
27788
|
-
if (prev) {
|
|
27789
|
-
this.$fastController.removeStyles(prev);
|
|
27790
|
-
}
|
|
27791
|
-
if (next) {
|
|
27792
|
-
this.$fastController.addStyles(next);
|
|
27793
|
-
}
|
|
27794
|
-
}
|
|
27795
28046
|
}
|
|
27796
28047
|
__decorate$1([
|
|
27797
28048
|
observable
|
|
27798
28049
|
], TableCell.prototype, "cellState", void 0);
|
|
27799
|
-
__decorate$1([
|
|
27800
|
-
observable
|
|
27801
|
-
], TableCell.prototype, "cellTemplate", void 0);
|
|
27802
|
-
__decorate$1([
|
|
27803
|
-
observable
|
|
27804
|
-
], TableCell.prototype, "cellStyles", void 0);
|
|
27805
28050
|
__decorate$1([
|
|
27806
28051
|
attr({ attribute: 'has-action-menu', mode: 'boolean' })
|
|
27807
28052
|
], TableCell.prototype, "hasActionMenu", void 0);
|
|
@@ -27811,24 +28056,26 @@
|
|
|
27811
28056
|
__decorate$1([
|
|
27812
28057
|
attr({ attribute: 'action-menu-label' })
|
|
27813
28058
|
], TableCell.prototype, "actionMenuLabel", void 0);
|
|
28059
|
+
__decorate$1([
|
|
28060
|
+
observable
|
|
28061
|
+
], TableCell.prototype, "cellViewTemplate", void 0);
|
|
27814
28062
|
const nimbleTableCell = TableCell.compose({
|
|
27815
28063
|
baseName: 'table-cell',
|
|
27816
|
-
template: template$
|
|
27817
|
-
styles: styles$
|
|
28064
|
+
template: template$9,
|
|
28065
|
+
styles: styles$b
|
|
27818
28066
|
});
|
|
27819
28067
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableCell());
|
|
27820
28068
|
const tableCellTag = DesignSystem.tagFor(TableCell);
|
|
27821
28069
|
|
|
27822
28070
|
// prettier-ignore
|
|
27823
|
-
const template$
|
|
28071
|
+
const template$7 = html `
|
|
27824
28072
|
<template role="row">
|
|
27825
28073
|
${repeat(x => x.columnStates, html `
|
|
27826
28074
|
${when(x => !x.column.columnHidden, html `
|
|
27827
28075
|
<${tableCellTag}
|
|
27828
28076
|
class="cell"
|
|
27829
|
-
:cellTemplate="${x => x.column.cellTemplate}"
|
|
27830
|
-
:cellStyles="${x => x.column.cellStyles}"
|
|
27831
28077
|
:cellState="${x => x.cellState}"
|
|
28078
|
+
:cellViewTemplate="${x => x.column.currentCellViewTemplate}"
|
|
27832
28079
|
?has-action-menu="${x => !!x.column.actionMenuSlot}"
|
|
27833
28080
|
action-menu-label="${x => x.column.actionMenuLabel}"
|
|
27834
28081
|
@cell-action-menu-beforetoggle="${(x, c) => c.parent.onCellActionMenuBeforeToggle(c.event, x.column)}"
|
|
@@ -27887,6 +28134,14 @@
|
|
|
27887
28134
|
this.menuOpen = event.detail.newState;
|
|
27888
28135
|
this.emitToggleEvent('row-action-menu-toggle', event.detail, column);
|
|
27889
28136
|
}
|
|
28137
|
+
closeOpenActionMenus() {
|
|
28138
|
+
if (this.menuOpen) {
|
|
28139
|
+
const cellWithMenuOpen = Array.from(this.shadowRoot.children).find(c => c instanceof TableCell && c.menuOpen);
|
|
28140
|
+
if (cellWithMenuOpen?.actionMenuButton?.open) {
|
|
28141
|
+
cellWithMenuOpen.actionMenuButton.toggleButton.control.click();
|
|
28142
|
+
}
|
|
28143
|
+
}
|
|
28144
|
+
}
|
|
27890
28145
|
emitToggleEvent(eventType, menuButtonEventDetail, column) {
|
|
27891
28146
|
const detail = {
|
|
27892
28147
|
newState: menuButtonEventDetail.newState,
|
|
@@ -27920,14 +28175,14 @@
|
|
|
27920
28175
|
], TableRow.prototype, "columnStates", null);
|
|
27921
28176
|
const nimbleTableRow = TableRow.compose({
|
|
27922
28177
|
baseName: 'table-row',
|
|
27923
|
-
template: template$
|
|
27924
|
-
styles: styles$
|
|
28178
|
+
template: template$7,
|
|
28179
|
+
styles: styles$c
|
|
27925
28180
|
});
|
|
27926
28181
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableRow());
|
|
27927
28182
|
const tableRowTag = DesignSystem.tagFor(TableRow);
|
|
27928
28183
|
|
|
27929
28184
|
// prettier-ignore
|
|
27930
|
-
const template$
|
|
28185
|
+
const template$6 = html `
|
|
27931
28186
|
<template role="table" ${children$1({ property: 'childItems', filter: elements() })}>
|
|
27932
28187
|
<div class="table-container" style="
|
|
27933
28188
|
--ni-private-table-scroll-x: -${x => x.scrollX}px;
|
|
@@ -27954,7 +28209,7 @@
|
|
|
27954
28209
|
</div>
|
|
27955
28210
|
<div class="table-viewport" ${ref('viewport')}>
|
|
27956
28211
|
<div class="table-scroll"></div>
|
|
27957
|
-
<div class="table-row-container"
|
|
28212
|
+
<div class="table-row-container" ${children$1({ property: 'rowElements', filter: elements(tableRowTag) })}
|
|
27958
28213
|
role="rowgroup">
|
|
27959
28214
|
${when(x => x.columns.length > 0 && x.canRenderRows, html `
|
|
27960
28215
|
${repeat(x => x.virtualizer.visibleItems, html `
|
|
@@ -28608,6 +28863,25 @@
|
|
|
28608
28863
|
};
|
|
28609
28864
|
}
|
|
28610
28865
|
|
|
28866
|
+
/**
|
|
28867
|
+
* Base class for table cell views, which are used within the nimble-table-cell.
|
|
28868
|
+
* Each TableColumn type has a corresponding TableCellView type (linked via TableColumn.cellViewTag).
|
|
28869
|
+
*/
|
|
28870
|
+
class TableCellView extends FoundationElement {
|
|
28871
|
+
/**
|
|
28872
|
+
* Called if an element inside this cell view has focus, and this row/cell is being recycled.
|
|
28873
|
+
* Expected implementation is to commit changes as needed, and blur the focusable element (or close
|
|
28874
|
+
* the menu/popup/etc).
|
|
28875
|
+
*/
|
|
28876
|
+
focusedRecycleCallback() { }
|
|
28877
|
+
}
|
|
28878
|
+
__decorate$1([
|
|
28879
|
+
observable
|
|
28880
|
+
], TableCellView.prototype, "cellRecord", void 0);
|
|
28881
|
+
__decorate$1([
|
|
28882
|
+
observable
|
|
28883
|
+
], TableCellView.prototype, "columnConfig", void 0);
|
|
28884
|
+
|
|
28611
28885
|
/**
|
|
28612
28886
|
* Helper class for the nimble-table for row virtualization.
|
|
28613
28887
|
*
|
|
@@ -28672,6 +28946,7 @@
|
|
|
28672
28946
|
};
|
|
28673
28947
|
}
|
|
28674
28948
|
handleVirtualizerChange() {
|
|
28949
|
+
this.notifyFocusedCellRecycling();
|
|
28675
28950
|
const virtualizer = this.virtualizer;
|
|
28676
28951
|
this.visibleItems = virtualizer.getVirtualItems();
|
|
28677
28952
|
this.allRowsHeight = virtualizer.getTotalSize();
|
|
@@ -28686,6 +28961,25 @@
|
|
|
28686
28961
|
}
|
|
28687
28962
|
this.rowContainerYOffset = rowContainerYOffset;
|
|
28688
28963
|
}
|
|
28964
|
+
notifyFocusedCellRecycling() {
|
|
28965
|
+
let tableFocusedElement = this.table.shadowRoot.activeElement;
|
|
28966
|
+
while (tableFocusedElement !== null
|
|
28967
|
+
&& !(tableFocusedElement instanceof TableCellView)) {
|
|
28968
|
+
if (tableFocusedElement.shadowRoot) {
|
|
28969
|
+
tableFocusedElement = tableFocusedElement.shadowRoot.activeElement;
|
|
28970
|
+
}
|
|
28971
|
+
else {
|
|
28972
|
+
break;
|
|
28973
|
+
}
|
|
28974
|
+
}
|
|
28975
|
+
if (tableFocusedElement instanceof TableCellView) {
|
|
28976
|
+
tableFocusedElement.focusedRecycleCallback();
|
|
28977
|
+
}
|
|
28978
|
+
if (this.table.openActionMenuRecordId !== undefined) {
|
|
28979
|
+
const activeRow = this.table.rowElements.find(row => row.recordId === this.table.openActionMenuRecordId);
|
|
28980
|
+
activeRow?.closeOpenActionMenus();
|
|
28981
|
+
}
|
|
28982
|
+
}
|
|
28689
28983
|
}
|
|
28690
28984
|
__decorate$1([
|
|
28691
28985
|
observable
|
|
@@ -28881,6 +29175,10 @@
|
|
|
28881
29175
|
* @internal
|
|
28882
29176
|
*/
|
|
28883
29177
|
this.childItems = [];
|
|
29178
|
+
/**
|
|
29179
|
+
* @internal
|
|
29180
|
+
*/
|
|
29181
|
+
this.rowElements = [];
|
|
28884
29182
|
/**
|
|
28885
29183
|
* @internal
|
|
28886
29184
|
*/
|
|
@@ -28955,6 +29253,9 @@
|
|
|
28955
29253
|
}
|
|
28956
29254
|
onRowActionMenuToggle(event) {
|
|
28957
29255
|
this.$emit('action-menu-toggle', event.detail);
|
|
29256
|
+
if (!event.detail.newState) {
|
|
29257
|
+
this.openActionMenuRecordId = undefined;
|
|
29258
|
+
}
|
|
28958
29259
|
}
|
|
28959
29260
|
/**
|
|
28960
29261
|
* @internal
|
|
@@ -29126,6 +29427,9 @@
|
|
|
29126
29427
|
__decorate$1([
|
|
29127
29428
|
observable
|
|
29128
29429
|
], Table.prototype, "childItems", void 0);
|
|
29430
|
+
__decorate$1([
|
|
29431
|
+
observable
|
|
29432
|
+
], Table.prototype, "rowElements", void 0);
|
|
29129
29433
|
__decorate$1([
|
|
29130
29434
|
observable
|
|
29131
29435
|
], Table.prototype, "actionMenuSlots", void 0);
|
|
@@ -29146,13 +29450,13 @@
|
|
|
29146
29450
|
], Table.prototype, "firstSortedColumn", void 0);
|
|
29147
29451
|
const nimbleTable = Table.compose({
|
|
29148
29452
|
baseName: 'table',
|
|
29149
|
-
template: template$
|
|
29150
|
-
styles: styles$
|
|
29453
|
+
template: template$6,
|
|
29454
|
+
styles: styles$e
|
|
29151
29455
|
});
|
|
29152
29456
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTable());
|
|
29153
29457
|
DesignSystem.tagFor(Table);
|
|
29154
29458
|
|
|
29155
|
-
const styles$
|
|
29459
|
+
const styles$a = css `
|
|
29156
29460
|
:host {
|
|
29157
29461
|
display: contents;
|
|
29158
29462
|
}
|
|
@@ -29164,7 +29468,7 @@
|
|
|
29164
29468
|
}
|
|
29165
29469
|
`;
|
|
29166
29470
|
|
|
29167
|
-
const template$
|
|
29471
|
+
const template$5 = html `
|
|
29168
29472
|
<template>
|
|
29169
29473
|
<span class="header-content">
|
|
29170
29474
|
<slot></slot>
|
|
@@ -29211,7 +29515,7 @@
|
|
|
29211
29515
|
return FractionalWidthColumn;
|
|
29212
29516
|
}
|
|
29213
29517
|
|
|
29214
|
-
const
|
|
29518
|
+
const styles$9 = css `
|
|
29215
29519
|
span {
|
|
29216
29520
|
font: ${bodyFont};
|
|
29217
29521
|
color: ${bodyFontColor};
|
|
@@ -29225,29 +29529,51 @@
|
|
|
29225
29529
|
}
|
|
29226
29530
|
`;
|
|
29227
29531
|
|
|
29228
|
-
const
|
|
29229
|
-
return typeof cellState.cellRecord.value === 'string'
|
|
29230
|
-
? cellState.cellRecord.value
|
|
29231
|
-
: cellState.columnConfig.placeholder;
|
|
29232
|
-
};
|
|
29233
|
-
const setTitleWhenOverflow = (span, title) => {
|
|
29234
|
-
if (title && span.offsetWidth < span.scrollWidth) {
|
|
29235
|
-
span.setAttribute('title', title);
|
|
29236
|
-
}
|
|
29237
|
-
};
|
|
29238
|
-
const removeTitle = (span) => {
|
|
29239
|
-
span.removeAttribute('title');
|
|
29240
|
-
};
|
|
29241
|
-
const cellTemplate = html `
|
|
29532
|
+
const template$4 = html `
|
|
29242
29533
|
<span
|
|
29534
|
+
${ref('textSpan')}
|
|
29243
29535
|
class="${x => (typeof x.cellRecord.value === 'string' ? '' : 'placeholder')}"
|
|
29244
|
-
@mouseover="${
|
|
29245
|
-
|
|
29536
|
+
@mouseover="${x => {
|
|
29537
|
+
x.isValidContentAndHasOverflow = !!x.content && x.textSpan.offsetWidth < x.textSpan.scrollWidth;
|
|
29538
|
+
}}"
|
|
29539
|
+
@mouseout="${x => {
|
|
29540
|
+
x.isValidContentAndHasOverflow = false;
|
|
29541
|
+
}}"
|
|
29542
|
+
title=${x => (x.isValidContentAndHasOverflow ? x.content : null)}
|
|
29246
29543
|
>
|
|
29247
|
-
${x =>
|
|
29544
|
+
${x => x.content}
|
|
29248
29545
|
</span>
|
|
29249
29546
|
`;
|
|
29250
29547
|
|
|
29548
|
+
/**
|
|
29549
|
+
* A cell view for displaying strings
|
|
29550
|
+
*/
|
|
29551
|
+
class TableColumnTextCellView extends TableCellView {
|
|
29552
|
+
constructor() {
|
|
29553
|
+
super(...arguments);
|
|
29554
|
+
/** @internal */
|
|
29555
|
+
this.isValidContentAndHasOverflow = false;
|
|
29556
|
+
}
|
|
29557
|
+
get content() {
|
|
29558
|
+
return typeof this.cellRecord.value === 'string'
|
|
29559
|
+
? this.cellRecord.value
|
|
29560
|
+
: this.columnConfig.placeholder;
|
|
29561
|
+
}
|
|
29562
|
+
}
|
|
29563
|
+
__decorate$1([
|
|
29564
|
+
observable
|
|
29565
|
+
], TableColumnTextCellView.prototype, "isValidContentAndHasOverflow", void 0);
|
|
29566
|
+
__decorate$1([
|
|
29567
|
+
volatile
|
|
29568
|
+
], TableColumnTextCellView.prototype, "content", null);
|
|
29569
|
+
const textCellView = TableColumnTextCellView.compose({
|
|
29570
|
+
baseName: 'table-column-text-cell-view',
|
|
29571
|
+
template: template$4,
|
|
29572
|
+
styles: styles$9
|
|
29573
|
+
});
|
|
29574
|
+
DesignSystem.getOrCreate().withPrefix('nimble').register(textCellView());
|
|
29575
|
+
const tableColumnTextCellViewTag = DesignSystem.tagFor(TableColumnTextCellView);
|
|
29576
|
+
|
|
29251
29577
|
/**
|
|
29252
29578
|
* The base class for a table column for displaying strings.
|
|
29253
29579
|
*/
|
|
@@ -29255,8 +29581,7 @@
|
|
|
29255
29581
|
constructor() {
|
|
29256
29582
|
super();
|
|
29257
29583
|
this.cellRecordFieldNames = ['value'];
|
|
29258
|
-
this.
|
|
29259
|
-
this.cellTemplate = cellTemplate;
|
|
29584
|
+
this.cellViewTag = tableColumnTextCellViewTag;
|
|
29260
29585
|
this.sortOperation = TableColumnSortOperation.localeAwareCaseSensitive;
|
|
29261
29586
|
}
|
|
29262
29587
|
fieldNameChanged() {
|
|
@@ -29280,8 +29605,8 @@
|
|
|
29280
29605
|
}
|
|
29281
29606
|
const nimbleTableColumnText = TableColumnText.compose({
|
|
29282
29607
|
baseName: 'table-column-text',
|
|
29283
|
-
template: template$
|
|
29284
|
-
styles: styles$
|
|
29608
|
+
template: template$5,
|
|
29609
|
+
styles: styles$a
|
|
29285
29610
|
});
|
|
29286
29611
|
DesignSystem.getOrCreate()
|
|
29287
29612
|
.withPrefix('nimble')
|
|
@@ -29379,7 +29704,7 @@
|
|
|
29379
29704
|
|
|
29380
29705
|
const styles$6 = css `
|
|
29381
29706
|
${display('inline-flex')}
|
|
29382
|
-
${styles$
|
|
29707
|
+
${styles$t}
|
|
29383
29708
|
|
|
29384
29709
|
:host {
|
|
29385
29710
|
font: ${bodyFont};
|
|
@@ -29725,7 +30050,7 @@
|
|
|
29725
30050
|
|
|
29726
30051
|
const styles$5 = css `
|
|
29727
30052
|
${display('inline-block')}
|
|
29728
|
-
${styles$
|
|
30053
|
+
${styles$t}
|
|
29729
30054
|
|
|
29730
30055
|
:host {
|
|
29731
30056
|
font: ${bodyFont};
|