@ni/nimble-components 18.8.4 → 18.9.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 +472 -285
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +570 -507
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/patterns/error/styles.js +2 -6
- package/dist/esm/patterns/error/styles.js.map +1 -1
- 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/dist/esm/text-area/index.d.ts +48 -1
- package/dist/esm/text-area/index.js +84 -2
- package/dist/esm/text-area/index.js.map +1 -1
- package/dist/esm/text-area/styles.js +72 -18
- package/dist/esm/text-area/styles.js.map +1 -1
- package/dist/esm/text-area/template.d.ts +4 -0
- package/dist/esm/text-area/template.js +62 -0
- package/dist/esm/text-area/template.js.map +1 -0
- 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
|
@@ -13821,69 +13821,6 @@
|
|
|
13821
13821
|
], TextArea$1.prototype, "defaultSlottedNodes", void 0);
|
|
13822
13822
|
applyMixins(TextArea$1, DelegatesARIATextbox);
|
|
13823
13823
|
|
|
13824
|
-
/**
|
|
13825
|
-
* The template for the {@link @microsoft/fast-foundation#(TextArea:class)} component.
|
|
13826
|
-
* @public
|
|
13827
|
-
*/
|
|
13828
|
-
const textAreaTemplate = (context, definition) => html `
|
|
13829
|
-
<template
|
|
13830
|
-
class="
|
|
13831
|
-
${x => (x.readOnly ? "readonly" : "")}
|
|
13832
|
-
${x => (x.resize !== TextAreaResize.none ? `resize-${x.resize}` : "")}"
|
|
13833
|
-
>
|
|
13834
|
-
<label
|
|
13835
|
-
part="label"
|
|
13836
|
-
for="control"
|
|
13837
|
-
class="${x => x.defaultSlottedNodes && x.defaultSlottedNodes.length
|
|
13838
|
-
? "label"
|
|
13839
|
-
: "label label__hidden"}"
|
|
13840
|
-
>
|
|
13841
|
-
<slot ${slotted("defaultSlottedNodes")}></slot>
|
|
13842
|
-
</label>
|
|
13843
|
-
<textarea
|
|
13844
|
-
part="control"
|
|
13845
|
-
class="control"
|
|
13846
|
-
id="control"
|
|
13847
|
-
?autofocus="${x => x.autofocus}"
|
|
13848
|
-
cols="${x => x.cols}"
|
|
13849
|
-
?disabled="${x => x.disabled}"
|
|
13850
|
-
form="${x => x.form}"
|
|
13851
|
-
list="${x => x.list}"
|
|
13852
|
-
maxlength="${x => x.maxlength}"
|
|
13853
|
-
minlength="${x => x.minlength}"
|
|
13854
|
-
name="${x => x.name}"
|
|
13855
|
-
placeholder="${x => x.placeholder}"
|
|
13856
|
-
?readonly="${x => x.readOnly}"
|
|
13857
|
-
?required="${x => x.required}"
|
|
13858
|
-
rows="${x => x.rows}"
|
|
13859
|
-
?spellcheck="${x => x.spellcheck}"
|
|
13860
|
-
:value="${x => x.value}"
|
|
13861
|
-
aria-atomic="${x => x.ariaAtomic}"
|
|
13862
|
-
aria-busy="${x => x.ariaBusy}"
|
|
13863
|
-
aria-controls="${x => x.ariaControls}"
|
|
13864
|
-
aria-current="${x => x.ariaCurrent}"
|
|
13865
|
-
aria-describedby="${x => x.ariaDescribedby}"
|
|
13866
|
-
aria-details="${x => x.ariaDetails}"
|
|
13867
|
-
aria-disabled="${x => x.ariaDisabled}"
|
|
13868
|
-
aria-errormessage="${x => x.ariaErrormessage}"
|
|
13869
|
-
aria-flowto="${x => x.ariaFlowto}"
|
|
13870
|
-
aria-haspopup="${x => x.ariaHaspopup}"
|
|
13871
|
-
aria-hidden="${x => x.ariaHidden}"
|
|
13872
|
-
aria-invalid="${x => x.ariaInvalid}"
|
|
13873
|
-
aria-keyshortcuts="${x => x.ariaKeyshortcuts}"
|
|
13874
|
-
aria-label="${x => x.ariaLabel}"
|
|
13875
|
-
aria-labelledby="${x => x.ariaLabelledby}"
|
|
13876
|
-
aria-live="${x => x.ariaLive}"
|
|
13877
|
-
aria-owns="${x => x.ariaOwns}"
|
|
13878
|
-
aria-relevant="${x => x.ariaRelevant}"
|
|
13879
|
-
aria-roledescription="${x => x.ariaRoledescription}"
|
|
13880
|
-
@input="${(x, c) => x.handleTextInput()}"
|
|
13881
|
-
@change="${x => x.handleChange()}"
|
|
13882
|
-
${ref("control")}
|
|
13883
|
-
></textarea>
|
|
13884
|
-
</template>
|
|
13885
|
-
`;
|
|
13886
|
-
|
|
13887
13824
|
/**
|
|
13888
13825
|
* The template for the {@link @microsoft/fast-foundation#(TextField:class)} component.
|
|
13889
13826
|
* @public
|
|
@@ -16807,9 +16744,9 @@
|
|
|
16807
16744
|
return `${prefix}${uniqueIdCounter++}`;
|
|
16808
16745
|
}
|
|
16809
16746
|
|
|
16810
|
-
const template$
|
|
16747
|
+
const template$n = html `<slot></slot>`;
|
|
16811
16748
|
|
|
16812
|
-
const styles$
|
|
16749
|
+
const styles$L = css `
|
|
16813
16750
|
:host {
|
|
16814
16751
|
display: contents;
|
|
16815
16752
|
}
|
|
@@ -16865,8 +16802,8 @@
|
|
|
16865
16802
|
], ThemeProvider.prototype, "theme", void 0);
|
|
16866
16803
|
const nimbleDesignSystemProvider = ThemeProvider.compose({
|
|
16867
16804
|
baseName: 'theme-provider',
|
|
16868
|
-
styles: styles$
|
|
16869
|
-
template: template$
|
|
16805
|
+
styles: styles$L,
|
|
16806
|
+
template: template$n
|
|
16870
16807
|
});
|
|
16871
16808
|
DesignSystem.getOrCreate()
|
|
16872
16809
|
.withPrefix('nimble')
|
|
@@ -17050,7 +16987,7 @@
|
|
|
17050
16987
|
}
|
|
17051
16988
|
}
|
|
17052
16989
|
|
|
17053
|
-
const styles$
|
|
16990
|
+
const styles$K = css `
|
|
17054
16991
|
${display('inline')}
|
|
17055
16992
|
|
|
17056
16993
|
:host {
|
|
@@ -17133,7 +17070,7 @@
|
|
|
17133
17070
|
`;
|
|
17134
17071
|
|
|
17135
17072
|
// prettier-ignore
|
|
17136
|
-
const template$
|
|
17073
|
+
const template$m = (context, definition) => html `
|
|
17137
17074
|
<a
|
|
17138
17075
|
class="control"
|
|
17139
17076
|
part="control"
|
|
@@ -17206,8 +17143,8 @@
|
|
|
17206
17143
|
const nimbleAnchor = Anchor.compose({
|
|
17207
17144
|
baseName: 'anchor',
|
|
17208
17145
|
baseClass: Anchor$1,
|
|
17209
|
-
template: template$
|
|
17210
|
-
styles: styles$
|
|
17146
|
+
template: template$m,
|
|
17147
|
+
styles: styles$K,
|
|
17211
17148
|
shadowOptions: {
|
|
17212
17149
|
delegatesFocus: true
|
|
17213
17150
|
}
|
|
@@ -17293,7 +17230,7 @@
|
|
|
17293
17230
|
return new MultivaluePropertyStyleSheetBehavior('appearance', value, styles);
|
|
17294
17231
|
}
|
|
17295
17232
|
|
|
17296
|
-
const styles$
|
|
17233
|
+
const styles$J = css `
|
|
17297
17234
|
${display('inline-flex')}
|
|
17298
17235
|
|
|
17299
17236
|
:host {
|
|
@@ -17574,8 +17511,8 @@
|
|
|
17574
17511
|
}
|
|
17575
17512
|
`));
|
|
17576
17513
|
|
|
17577
|
-
const styles$
|
|
17578
|
-
${styles$
|
|
17514
|
+
const styles$I = css `
|
|
17515
|
+
${styles$J}
|
|
17579
17516
|
${buttonAppearanceVariantStyles}
|
|
17580
17517
|
|
|
17581
17518
|
.control {
|
|
@@ -17583,7 +17520,7 @@
|
|
|
17583
17520
|
}
|
|
17584
17521
|
`;
|
|
17585
17522
|
|
|
17586
|
-
const template$
|
|
17523
|
+
const template$l = (context, definition) => html `
|
|
17587
17524
|
<a
|
|
17588
17525
|
class="control"
|
|
17589
17526
|
part="control"
|
|
@@ -17665,8 +17602,8 @@
|
|
|
17665
17602
|
], AnchorButton.prototype, "disabled", void 0);
|
|
17666
17603
|
const nimbleAnchorButton = AnchorButton.compose({
|
|
17667
17604
|
baseName: 'anchor-button',
|
|
17668
|
-
template: template$
|
|
17669
|
-
styles: styles$
|
|
17605
|
+
template: template$l,
|
|
17606
|
+
styles: styles$I,
|
|
17670
17607
|
shadowOptions: {
|
|
17671
17608
|
delegatesFocus: true
|
|
17672
17609
|
}
|
|
@@ -17674,7 +17611,7 @@
|
|
|
17674
17611
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorButton());
|
|
17675
17612
|
DesignSystem.tagFor(AnchorButton);
|
|
17676
17613
|
|
|
17677
|
-
const styles$
|
|
17614
|
+
const styles$H = css `
|
|
17678
17615
|
${display('grid')}
|
|
17679
17616
|
|
|
17680
17617
|
:host {
|
|
@@ -17751,7 +17688,7 @@
|
|
|
17751
17688
|
}
|
|
17752
17689
|
`;
|
|
17753
17690
|
|
|
17754
|
-
const template$
|
|
17691
|
+
const template$k = (context, definition) => html `
|
|
17755
17692
|
<template
|
|
17756
17693
|
role="menuitem"
|
|
17757
17694
|
class="${x => (typeof x.startColumnCount === 'number'
|
|
@@ -17856,8 +17793,8 @@
|
|
|
17856
17793
|
], AnchorMenuItem.prototype, "startColumnCount", void 0);
|
|
17857
17794
|
const nimbleAnchorMenuItem = AnchorMenuItem.compose({
|
|
17858
17795
|
baseName: 'anchor-menu-item',
|
|
17859
|
-
template: template$
|
|
17860
|
-
styles: styles$
|
|
17796
|
+
template: template$k,
|
|
17797
|
+
styles: styles$H,
|
|
17861
17798
|
shadowOptions: {
|
|
17862
17799
|
delegatesFocus: true
|
|
17863
17800
|
}
|
|
@@ -17882,7 +17819,7 @@
|
|
|
17882
17819
|
}
|
|
17883
17820
|
});
|
|
17884
17821
|
|
|
17885
|
-
const styles$
|
|
17822
|
+
const styles$G = css `
|
|
17886
17823
|
${display('inline-flex')}
|
|
17887
17824
|
|
|
17888
17825
|
:host {
|
|
@@ -17988,8 +17925,8 @@
|
|
|
17988
17925
|
}
|
|
17989
17926
|
`;
|
|
17990
17927
|
|
|
17991
|
-
const styles$
|
|
17992
|
-
${styles$
|
|
17928
|
+
const styles$F = css `
|
|
17929
|
+
${styles$G}
|
|
17993
17930
|
|
|
17994
17931
|
a {
|
|
17995
17932
|
text-decoration: none;
|
|
@@ -17999,7 +17936,7 @@
|
|
|
17999
17936
|
}
|
|
18000
17937
|
`;
|
|
18001
17938
|
|
|
18002
|
-
const template$
|
|
17939
|
+
const template$j = () => html `
|
|
18003
17940
|
<template slot="anchortab" role="tab" aria-disabled="${x => x.disabled}">
|
|
18004
17941
|
<a
|
|
18005
17942
|
download="${x => x.download}"
|
|
@@ -18037,13 +17974,13 @@
|
|
|
18037
17974
|
], AnchorTab.prototype, "disabled", void 0);
|
|
18038
17975
|
const nimbleAnchorTab = AnchorTab.compose({
|
|
18039
17976
|
baseName: 'anchor-tab',
|
|
18040
|
-
template: template$
|
|
18041
|
-
styles: styles$
|
|
17977
|
+
template: template$j,
|
|
17978
|
+
styles: styles$F
|
|
18042
17979
|
});
|
|
18043
17980
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTab());
|
|
18044
17981
|
DesignSystem.tagFor(AnchorTab);
|
|
18045
17982
|
|
|
18046
|
-
const styles$
|
|
17983
|
+
const styles$E = css `
|
|
18047
17984
|
${display('grid')}
|
|
18048
17985
|
|
|
18049
17986
|
:host {
|
|
@@ -18061,7 +17998,7 @@
|
|
|
18061
17998
|
}
|
|
18062
17999
|
`;
|
|
18063
18000
|
|
|
18064
|
-
const template$
|
|
18001
|
+
const template$i = (context, definition) => html `
|
|
18065
18002
|
${startSlotTemplate(context, definition)}
|
|
18066
18003
|
<div ${ref('tablist')} class="tablist" part="tablist" role="tablist">
|
|
18067
18004
|
<slot name="anchortab" ${slotted('tabs')}></slot>
|
|
@@ -18258,8 +18195,8 @@
|
|
|
18258
18195
|
applyMixins(AnchorTabs, StartEnd);
|
|
18259
18196
|
const nimbleAnchorTabs = AnchorTabs.compose({
|
|
18260
18197
|
baseName: 'anchor-tabs',
|
|
18261
|
-
template: template$
|
|
18262
|
-
styles: styles$
|
|
18198
|
+
template: template$i,
|
|
18199
|
+
styles: styles$E,
|
|
18263
18200
|
shadowOptions: {
|
|
18264
18201
|
delegatesFocus: false
|
|
18265
18202
|
}
|
|
@@ -18267,7 +18204,7 @@
|
|
|
18267
18204
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTabs());
|
|
18268
18205
|
DesignSystem.tagFor(AnchorTabs);
|
|
18269
18206
|
|
|
18270
|
-
const styles$
|
|
18207
|
+
const styles$D = css `
|
|
18271
18208
|
:host {
|
|
18272
18209
|
contain: layout;
|
|
18273
18210
|
display: block;
|
|
@@ -18291,7 +18228,7 @@
|
|
|
18291
18228
|
baseName: 'anchored-region',
|
|
18292
18229
|
baseClass: AnchoredRegion$1,
|
|
18293
18230
|
template: anchoredRegionTemplate,
|
|
18294
|
-
styles: styles$
|
|
18231
|
+
styles: styles$D
|
|
18295
18232
|
});
|
|
18296
18233
|
DesignSystem.getOrCreate()
|
|
18297
18234
|
.withPrefix('nimble')
|
|
@@ -18371,7 +18308,7 @@
|
|
|
18371
18308
|
*/
|
|
18372
18309
|
const themeBehavior = (theme, styles) => new ThemeStyleSheetBehavior(theme, styles);
|
|
18373
18310
|
|
|
18374
|
-
const styles$
|
|
18311
|
+
const styles$C = css `
|
|
18375
18312
|
${display('flex')}
|
|
18376
18313
|
|
|
18377
18314
|
:host {
|
|
@@ -18529,8 +18466,8 @@
|
|
|
18529
18466
|
}
|
|
18530
18467
|
`));
|
|
18531
18468
|
|
|
18532
|
-
const styles$
|
|
18533
|
-
${styles$
|
|
18469
|
+
const styles$B = css `
|
|
18470
|
+
${styles$J}
|
|
18534
18471
|
${buttonAppearanceVariantStyles}
|
|
18535
18472
|
`;
|
|
18536
18473
|
|
|
@@ -18576,7 +18513,7 @@
|
|
|
18576
18513
|
baseName: 'button',
|
|
18577
18514
|
baseClass: Button$1,
|
|
18578
18515
|
template: buttonTemplate,
|
|
18579
|
-
styles: styles$
|
|
18516
|
+
styles: styles$B,
|
|
18580
18517
|
shadowOptions: {
|
|
18581
18518
|
delegatesFocus: true
|
|
18582
18519
|
}
|
|
@@ -19198,13 +19135,13 @@
|
|
|
19198
19135
|
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>`
|
|
19199
19136
|
};
|
|
19200
19137
|
|
|
19201
|
-
const template$
|
|
19138
|
+
const template$h = html `
|
|
19202
19139
|
<template>
|
|
19203
19140
|
<div class="icon" :innerHTML=${x => x.icon.data}></div>
|
|
19204
19141
|
</template
|
|
19205
19142
|
`;
|
|
19206
19143
|
|
|
19207
|
-
const styles$
|
|
19144
|
+
const styles$A = css `
|
|
19208
19145
|
${display('inline-flex')}
|
|
19209
19146
|
|
|
19210
19147
|
:host {
|
|
@@ -19257,8 +19194,8 @@
|
|
|
19257
19194
|
const registerIcon = (baseName, iconClass) => {
|
|
19258
19195
|
const composedIcon = iconClass.compose({
|
|
19259
19196
|
baseName,
|
|
19260
|
-
template: template$
|
|
19261
|
-
styles: styles$
|
|
19197
|
+
template: template$h,
|
|
19198
|
+
styles: styles$A,
|
|
19262
19199
|
baseClass: iconClass
|
|
19263
19200
|
});
|
|
19264
19201
|
DesignSystem.getOrCreate().withPrefix('nimble').register(composedIcon());
|
|
@@ -19324,7 +19261,7 @@
|
|
|
19324
19261
|
};
|
|
19325
19262
|
|
|
19326
19263
|
// prettier-ignore
|
|
19327
|
-
const template$
|
|
19264
|
+
const template$g = html `
|
|
19328
19265
|
<div class="container"
|
|
19329
19266
|
role="status"
|
|
19330
19267
|
aria-atomic="${x => x.ariaAtomic}"
|
|
@@ -19443,13 +19380,13 @@
|
|
|
19443
19380
|
applyMixins(Banner, ARIAGlobalStatesAndProperties);
|
|
19444
19381
|
const nimbleBanner = Banner.compose({
|
|
19445
19382
|
baseName: 'banner',
|
|
19446
|
-
template: template$
|
|
19447
|
-
styles: styles$
|
|
19383
|
+
template: template$g,
|
|
19384
|
+
styles: styles$C
|
|
19448
19385
|
});
|
|
19449
19386
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBanner());
|
|
19450
19387
|
DesignSystem.tagFor(Banner);
|
|
19451
19388
|
|
|
19452
|
-
const styles$
|
|
19389
|
+
const styles$z = css `
|
|
19453
19390
|
${display('inline-block')}
|
|
19454
19391
|
|
|
19455
19392
|
:host {
|
|
@@ -19490,12 +19427,12 @@
|
|
|
19490
19427
|
baseName: 'breadcrumb',
|
|
19491
19428
|
baseClass: Breadcrumb$1,
|
|
19492
19429
|
template: breadcrumbTemplate,
|
|
19493
|
-
styles: styles$
|
|
19430
|
+
styles: styles$z
|
|
19494
19431
|
});
|
|
19495
19432
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBreadcrumb());
|
|
19496
19433
|
DesignSystem.tagFor(Breadcrumb);
|
|
19497
19434
|
|
|
19498
|
-
const styles$
|
|
19435
|
+
const styles$y = css `
|
|
19499
19436
|
${display('inline-flex')}
|
|
19500
19437
|
|
|
19501
19438
|
:host {
|
|
@@ -19571,7 +19508,7 @@
|
|
|
19571
19508
|
baseName: 'breadcrumb-item',
|
|
19572
19509
|
baseClass: BreadcrumbItem$1,
|
|
19573
19510
|
template: breadcrumbItemTemplate,
|
|
19574
|
-
styles: styles$
|
|
19511
|
+
styles: styles$y,
|
|
19575
19512
|
separator: forwardSlash16X16.data
|
|
19576
19513
|
});
|
|
19577
19514
|
DesignSystem.getOrCreate()
|
|
@@ -19579,7 +19516,7 @@
|
|
|
19579
19516
|
.register(nimbleBreadcrumbItem());
|
|
19580
19517
|
DesignSystem.tagFor(BreadcrumbItem);
|
|
19581
19518
|
|
|
19582
|
-
const styles$
|
|
19519
|
+
const styles$x = css `
|
|
19583
19520
|
${display('inline-flex')}
|
|
19584
19521
|
|
|
19585
19522
|
:host {
|
|
@@ -19738,7 +19675,7 @@
|
|
|
19738
19675
|
const nimbleCardButton = CardButton.compose({
|
|
19739
19676
|
baseName: 'card-button',
|
|
19740
19677
|
template: buttonTemplate,
|
|
19741
|
-
styles: styles$
|
|
19678
|
+
styles: styles$x,
|
|
19742
19679
|
shadowOptions: {
|
|
19743
19680
|
delegatesFocus: true
|
|
19744
19681
|
}
|
|
@@ -19746,7 +19683,7 @@
|
|
|
19746
19683
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCardButton());
|
|
19747
19684
|
DesignSystem.tagFor(CardButton);
|
|
19748
19685
|
|
|
19749
|
-
const styles$
|
|
19686
|
+
const styles$w = css `
|
|
19750
19687
|
${display('inline-flex')}
|
|
19751
19688
|
|
|
19752
19689
|
:host {
|
|
@@ -19864,15 +19801,15 @@
|
|
|
19864
19801
|
baseName: 'checkbox',
|
|
19865
19802
|
baseClass: Checkbox$1,
|
|
19866
19803
|
template: checkboxTemplate,
|
|
19867
|
-
styles: styles$
|
|
19804
|
+
styles: styles$w,
|
|
19868
19805
|
checkedIndicator: check16X16.data,
|
|
19869
19806
|
indeterminateIndicator: minus16X16.data
|
|
19870
19807
|
});
|
|
19871
19808
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCheckbox());
|
|
19872
19809
|
DesignSystem.tagFor(Checkbox);
|
|
19873
19810
|
|
|
19874
|
-
const styles$
|
|
19875
|
-
${styles$
|
|
19811
|
+
const styles$v = css `
|
|
19812
|
+
${styles$J}
|
|
19876
19813
|
|
|
19877
19814
|
.control[aria-pressed='true'] {
|
|
19878
19815
|
background-color: ${fillSelectedColor};
|
|
@@ -19898,7 +19835,7 @@
|
|
|
19898
19835
|
}
|
|
19899
19836
|
`;
|
|
19900
19837
|
|
|
19901
|
-
const template$
|
|
19838
|
+
const template$f = (context, definition) => html `
|
|
19902
19839
|
<div
|
|
19903
19840
|
role="button"
|
|
19904
19841
|
part="control"
|
|
@@ -19973,8 +19910,8 @@
|
|
|
19973
19910
|
applyMixins(ToggleButton, StartEnd, DelegatesARIAButton);
|
|
19974
19911
|
const nimbleToggleButton = ToggleButton.compose({
|
|
19975
19912
|
baseName: 'toggle-button',
|
|
19976
|
-
template: template$
|
|
19977
|
-
styles: styles$
|
|
19913
|
+
template: template$f,
|
|
19914
|
+
styles: styles$v,
|
|
19978
19915
|
shadowOptions: {
|
|
19979
19916
|
delegatesFocus: true
|
|
19980
19917
|
}
|
|
@@ -20006,7 +19943,7 @@
|
|
|
20006
19943
|
block: 'block'
|
|
20007
19944
|
};
|
|
20008
19945
|
|
|
20009
|
-
const styles$
|
|
19946
|
+
const styles$u = css `
|
|
20010
19947
|
${display('inline-flex')}
|
|
20011
19948
|
|
|
20012
19949
|
:host {
|
|
@@ -20242,7 +20179,7 @@
|
|
|
20242
20179
|
}
|
|
20243
20180
|
`));
|
|
20244
20181
|
|
|
20245
|
-
const styles$
|
|
20182
|
+
const styles$t = css `
|
|
20246
20183
|
.error-icon {
|
|
20247
20184
|
display: none;
|
|
20248
20185
|
}
|
|
@@ -20264,25 +20201,21 @@
|
|
|
20264
20201
|
color: ${failColor};
|
|
20265
20202
|
width: 100%;
|
|
20266
20203
|
position: absolute;
|
|
20267
|
-
|
|
20204
|
+
bottom: calc(-1 * ${errorTextFontLineHeight});
|
|
20268
20205
|
left: 0px;
|
|
20269
20206
|
overflow: hidden;
|
|
20270
20207
|
text-overflow: ellipsis;
|
|
20271
20208
|
white-space: nowrap;
|
|
20272
20209
|
}
|
|
20273
20210
|
|
|
20274
|
-
:host([error-visible][readonly]:not([disabled])) .error-text {
|
|
20275
|
-
top: calc(${controlHeight} - ${borderWidth});
|
|
20276
|
-
}
|
|
20277
|
-
|
|
20278
20211
|
:host([error-visible]) .error-text:empty {
|
|
20279
20212
|
display: none;
|
|
20280
20213
|
}
|
|
20281
20214
|
`;
|
|
20282
20215
|
|
|
20283
|
-
const styles$
|
|
20216
|
+
const styles$s = css `
|
|
20217
|
+
${styles$u}
|
|
20284
20218
|
${styles$t}
|
|
20285
|
-
${styles$s}
|
|
20286
20219
|
|
|
20287
20220
|
:host {
|
|
20288
20221
|
--ni-private-hover-bottom-border-width: 2px;
|
|
@@ -20518,7 +20451,7 @@
|
|
|
20518
20451
|
baseName: 'combobox',
|
|
20519
20452
|
baseClass: Combobox$1,
|
|
20520
20453
|
template: comboboxTemplate,
|
|
20521
|
-
styles: styles$
|
|
20454
|
+
styles: styles$s,
|
|
20522
20455
|
shadowOptions: {
|
|
20523
20456
|
delegatesFocus: true
|
|
20524
20457
|
},
|
|
@@ -20563,7 +20496,7 @@
|
|
|
20563
20496
|
*/
|
|
20564
20497
|
const UserDismissed = Symbol('user dismissed');
|
|
20565
20498
|
|
|
20566
|
-
const styles$
|
|
20499
|
+
const styles$r = css `
|
|
20567
20500
|
${display('grid')}
|
|
20568
20501
|
|
|
20569
20502
|
dialog {
|
|
@@ -20679,7 +20612,7 @@
|
|
|
20679
20612
|
}
|
|
20680
20613
|
`));
|
|
20681
20614
|
|
|
20682
|
-
const template$
|
|
20615
|
+
const template$e = html `
|
|
20683
20616
|
<template>
|
|
20684
20617
|
<dialog
|
|
20685
20618
|
${ref('dialogElement')}
|
|
@@ -20805,14 +20738,14 @@
|
|
|
20805
20738
|
applyMixins(Dialog, ARIAGlobalStatesAndProperties);
|
|
20806
20739
|
const nimbleDialog = Dialog.compose({
|
|
20807
20740
|
baseName: 'dialog',
|
|
20808
|
-
template: template$
|
|
20809
|
-
styles: styles$
|
|
20741
|
+
template: template$e,
|
|
20742
|
+
styles: styles$r,
|
|
20810
20743
|
baseClass: Dialog
|
|
20811
20744
|
});
|
|
20812
20745
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDialog());
|
|
20813
20746
|
DesignSystem.tagFor(Dialog);
|
|
20814
20747
|
|
|
20815
|
-
const styles$
|
|
20748
|
+
const styles$q = css `
|
|
20816
20749
|
${display('block')}
|
|
20817
20750
|
|
|
20818
20751
|
:host {
|
|
@@ -20965,7 +20898,7 @@
|
|
|
20965
20898
|
}
|
|
20966
20899
|
`));
|
|
20967
20900
|
|
|
20968
|
-
const template$
|
|
20901
|
+
const template$d = html `
|
|
20969
20902
|
<dialog
|
|
20970
20903
|
${ref('dialog')}
|
|
20971
20904
|
aria-label="${x => x.ariaLabel}"
|
|
@@ -21079,8 +21012,8 @@
|
|
|
21079
21012
|
applyMixins(Drawer, ARIAGlobalStatesAndProperties);
|
|
21080
21013
|
const nimbleDrawer = Drawer.compose({
|
|
21081
21014
|
baseName: 'drawer',
|
|
21082
|
-
template: template$
|
|
21083
|
-
styles: styles$
|
|
21015
|
+
template: template$d,
|
|
21016
|
+
styles: styles$q
|
|
21084
21017
|
});
|
|
21085
21018
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDrawer());
|
|
21086
21019
|
DesignSystem.tagFor(Drawer);
|
|
@@ -22861,7 +22794,7 @@
|
|
|
22861
22794
|
registerIcon('icon-xmark-check', IconXmarkCheck);
|
|
22862
22795
|
DesignSystem.tagFor(IconXmarkCheck);
|
|
22863
22796
|
|
|
22864
|
-
const styles$
|
|
22797
|
+
const styles$p = css `
|
|
22865
22798
|
${display('flex')}
|
|
22866
22799
|
|
|
22867
22800
|
:host {
|
|
@@ -22941,12 +22874,12 @@
|
|
|
22941
22874
|
baseName: 'list-option',
|
|
22942
22875
|
baseClass: ListboxOption,
|
|
22943
22876
|
template: listboxOptionTemplate,
|
|
22944
|
-
styles: styles$
|
|
22877
|
+
styles: styles$p
|
|
22945
22878
|
});
|
|
22946
22879
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleListOption());
|
|
22947
22880
|
DesignSystem.tagFor(ListOption);
|
|
22948
22881
|
|
|
22949
|
-
const styles$
|
|
22882
|
+
const styles$o = css `
|
|
22950
22883
|
${display('grid')}
|
|
22951
22884
|
|
|
22952
22885
|
:host {
|
|
@@ -23013,12 +22946,12 @@
|
|
|
23013
22946
|
baseName: 'menu',
|
|
23014
22947
|
baseClass: Menu$1,
|
|
23015
22948
|
template: menuTemplate,
|
|
23016
|
-
styles: styles$
|
|
22949
|
+
styles: styles$o
|
|
23017
22950
|
});
|
|
23018
22951
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenu());
|
|
23019
22952
|
DesignSystem.tagFor(Menu);
|
|
23020
22953
|
|
|
23021
|
-
const styles$
|
|
22954
|
+
const styles$n = css `
|
|
23022
22955
|
${display('inline-block')}
|
|
23023
22956
|
|
|
23024
22957
|
:host {
|
|
@@ -23037,7 +22970,7 @@
|
|
|
23037
22970
|
`;
|
|
23038
22971
|
|
|
23039
22972
|
// prettier-ignore
|
|
23040
|
-
const template$
|
|
22973
|
+
const template$c = html `
|
|
23041
22974
|
<template
|
|
23042
22975
|
?open="${x => x.open}"
|
|
23043
22976
|
@focusout="${(x, c) => x.focusoutHandler(c.event)}"
|
|
@@ -23292,8 +23225,8 @@
|
|
|
23292
23225
|
], MenuButton.prototype, "slottedMenus", void 0);
|
|
23293
23226
|
const nimbleMenuButton = MenuButton.compose({
|
|
23294
23227
|
baseName: 'menu-button',
|
|
23295
|
-
template: template$
|
|
23296
|
-
styles: styles$
|
|
23228
|
+
template: template$c,
|
|
23229
|
+
styles: styles$n,
|
|
23297
23230
|
shadowOptions: {
|
|
23298
23231
|
delegatesFocus: true
|
|
23299
23232
|
}
|
|
@@ -23301,7 +23234,7 @@
|
|
|
23301
23234
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuButton());
|
|
23302
23235
|
const menuButtonTag = DesignSystem.tagFor(MenuButton);
|
|
23303
23236
|
|
|
23304
|
-
const styles$
|
|
23237
|
+
const styles$m = css `
|
|
23305
23238
|
${display('grid')}
|
|
23306
23239
|
|
|
23307
23240
|
:host {
|
|
@@ -23399,7 +23332,7 @@
|
|
|
23399
23332
|
baseName: 'menu-item',
|
|
23400
23333
|
baseClass: MenuItem$1,
|
|
23401
23334
|
template: menuItemTemplate,
|
|
23402
|
-
styles: styles$
|
|
23335
|
+
styles: styles$m,
|
|
23403
23336
|
expandCollapseGlyph: arrowExpanderRight16X16.data
|
|
23404
23337
|
});
|
|
23405
23338
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuItem());
|
|
@@ -23414,9 +23347,9 @@
|
|
|
23414
23347
|
block: 'block'
|
|
23415
23348
|
};
|
|
23416
23349
|
|
|
23417
|
-
const styles$
|
|
23350
|
+
const styles$l = css `
|
|
23418
23351
|
${display('inline-block')}
|
|
23419
|
-
${styles$
|
|
23352
|
+
${styles$t}
|
|
23420
23353
|
|
|
23421
23354
|
:host {
|
|
23422
23355
|
font: ${bodyFont};
|
|
@@ -23630,7 +23563,7 @@
|
|
|
23630
23563
|
baseName: 'number-field',
|
|
23631
23564
|
baseClass: NumberField$1,
|
|
23632
23565
|
template: numberFieldTemplate,
|
|
23633
|
-
styles: styles$
|
|
23566
|
+
styles: styles$l,
|
|
23634
23567
|
shadowOptions: {
|
|
23635
23568
|
delegatesFocus: true
|
|
23636
23569
|
},
|
|
@@ -23672,7 +23605,7 @@
|
|
|
23672
23605
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleNumberField());
|
|
23673
23606
|
DesignSystem.tagFor(NumberField);
|
|
23674
23607
|
|
|
23675
|
-
const styles$
|
|
23608
|
+
const styles$k = css `
|
|
23676
23609
|
${display('inline-flex')}
|
|
23677
23610
|
|
|
23678
23611
|
:host {
|
|
@@ -23772,13 +23705,13 @@
|
|
|
23772
23705
|
baseName: 'radio',
|
|
23773
23706
|
baseClass: Radio$1,
|
|
23774
23707
|
template: radioTemplate,
|
|
23775
|
-
styles: styles$
|
|
23708
|
+
styles: styles$k,
|
|
23776
23709
|
checkedIndicator: circleFilled16X16.data
|
|
23777
23710
|
});
|
|
23778
23711
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadio());
|
|
23779
23712
|
DesignSystem.tagFor(Radio);
|
|
23780
23713
|
|
|
23781
|
-
const styles$
|
|
23714
|
+
const styles$j = css `
|
|
23782
23715
|
${display('inline-block')}
|
|
23783
23716
|
|
|
23784
23717
|
.positioning-region {
|
|
@@ -23813,7 +23746,7 @@
|
|
|
23813
23746
|
baseName: 'radio-group',
|
|
23814
23747
|
baseClass: RadioGroup$1,
|
|
23815
23748
|
template: radioGroupTemplate,
|
|
23816
|
-
styles: styles$
|
|
23749
|
+
styles: styles$j,
|
|
23817
23750
|
shadowOptions: {
|
|
23818
23751
|
delegatesFocus: true
|
|
23819
23752
|
}
|
|
@@ -23821,9 +23754,9 @@
|
|
|
23821
23754
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleRadioGroup());
|
|
23822
23755
|
DesignSystem.tagFor(RadioGroup);
|
|
23823
23756
|
|
|
23824
|
-
const styles$
|
|
23757
|
+
const styles$i = css `
|
|
23758
|
+
${styles$u}
|
|
23825
23759
|
${styles$t}
|
|
23826
|
-
${styles$s}
|
|
23827
23760
|
|
|
23828
23761
|
${
|
|
23829
23762
|
/* We are using flex `order` to define the visual ordering of the selected value,
|
|
@@ -23899,7 +23832,7 @@
|
|
|
23899
23832
|
baseName: 'select',
|
|
23900
23833
|
baseClass: Select$1,
|
|
23901
23834
|
template: selectTemplate,
|
|
23902
|
-
styles: styles$
|
|
23835
|
+
styles: styles$i,
|
|
23903
23836
|
indicator: arrowExpanderDown16X16.data,
|
|
23904
23837
|
end: html `
|
|
23905
23838
|
<${iconExclamationMarkTag}
|
|
@@ -23912,7 +23845,7 @@
|
|
|
23912
23845
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSelect());
|
|
23913
23846
|
DesignSystem.tagFor(Select);
|
|
23914
23847
|
|
|
23915
|
-
const styles$
|
|
23848
|
+
const styles$h = css `
|
|
23916
23849
|
${display('inline-flex')}
|
|
23917
23850
|
|
|
23918
23851
|
:host {
|
|
@@ -24056,7 +23989,7 @@
|
|
|
24056
23989
|
}
|
|
24057
23990
|
`));
|
|
24058
23991
|
|
|
24059
|
-
const template$
|
|
23992
|
+
const template$b = html `
|
|
24060
23993
|
<template role="progressbar">
|
|
24061
23994
|
<div class="container">
|
|
24062
23995
|
<div class="bit1"></div>
|
|
@@ -24073,13 +24006,13 @@
|
|
|
24073
24006
|
}
|
|
24074
24007
|
const nimbleSpinner = Spinner.compose({
|
|
24075
24008
|
baseName: 'spinner',
|
|
24076
|
-
template: template$
|
|
24077
|
-
styles: styles$
|
|
24009
|
+
template: template$b,
|
|
24010
|
+
styles: styles$h
|
|
24078
24011
|
});
|
|
24079
24012
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSpinner());
|
|
24080
24013
|
DesignSystem.tagFor(Spinner);
|
|
24081
24014
|
|
|
24082
|
-
const styles$
|
|
24015
|
+
const styles$g = css `
|
|
24083
24016
|
${display('inline-flex')}
|
|
24084
24017
|
|
|
24085
24018
|
:host {
|
|
@@ -24242,7 +24175,7 @@
|
|
|
24242
24175
|
`));
|
|
24243
24176
|
|
|
24244
24177
|
// prettier-ignore
|
|
24245
|
-
const template$
|
|
24178
|
+
const template$a = html `
|
|
24246
24179
|
<template
|
|
24247
24180
|
role="switch"
|
|
24248
24181
|
aria-checked="${x => x.checked}"
|
|
@@ -24286,8 +24219,8 @@
|
|
|
24286
24219
|
const nimbleSwitch = Switch.compose({
|
|
24287
24220
|
baseClass: Switch$1,
|
|
24288
24221
|
baseName: 'switch',
|
|
24289
|
-
template: template$
|
|
24290
|
-
styles: styles$
|
|
24222
|
+
template: template$a,
|
|
24223
|
+
styles: styles$g
|
|
24291
24224
|
});
|
|
24292
24225
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSwitch());
|
|
24293
24226
|
DesignSystem.tagFor(Switch);
|
|
@@ -24301,12 +24234,12 @@
|
|
|
24301
24234
|
baseName: 'tab',
|
|
24302
24235
|
baseClass: Tab$1,
|
|
24303
24236
|
template: tabTemplate,
|
|
24304
|
-
styles: styles$
|
|
24237
|
+
styles: styles$G
|
|
24305
24238
|
});
|
|
24306
24239
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTab());
|
|
24307
24240
|
DesignSystem.tagFor(Tab);
|
|
24308
24241
|
|
|
24309
|
-
const styles$
|
|
24242
|
+
const styles$f = css `
|
|
24310
24243
|
${display('block')}
|
|
24311
24244
|
|
|
24312
24245
|
:host {
|
|
@@ -24326,7 +24259,7 @@
|
|
|
24326
24259
|
baseName: 'tab-panel',
|
|
24327
24260
|
baseClass: TabPanel$1,
|
|
24328
24261
|
template: tabPanelTemplate,
|
|
24329
|
-
styles: styles$
|
|
24262
|
+
styles: styles$f
|
|
24330
24263
|
});
|
|
24331
24264
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTabPanel());
|
|
24332
24265
|
DesignSystem.tagFor(TabPanel);
|
|
@@ -27360,6 +27293,31 @@
|
|
|
27360
27293
|
});
|
|
27361
27294
|
}
|
|
27362
27295
|
|
|
27296
|
+
// prettier-ignore
|
|
27297
|
+
const template$9 = html `
|
|
27298
|
+
<template role="cell">
|
|
27299
|
+
${x => x.cellViewTemplate}
|
|
27300
|
+
${when(x => x.hasActionMenu, html `
|
|
27301
|
+
<${menuButtonTag} ${ref('actionMenuButton')}
|
|
27302
|
+
content-hidden
|
|
27303
|
+
appearance="${ButtonAppearance.ghost}"
|
|
27304
|
+
@beforetoggle="${(x, c) => x.onActionMenuBeforeToggle(c.event)}"
|
|
27305
|
+
@toggle="${(x, c) => x.onActionMenuToggle(c.event)}"
|
|
27306
|
+
class="action-menu"
|
|
27307
|
+
>
|
|
27308
|
+
<${iconThreeDotsLineTag} slot="start"></${iconThreeDotsLineTag}>
|
|
27309
|
+
${x => x.actionMenuLabel}
|
|
27310
|
+
<slot name="cellActionMenu" slot="menu"></slot>
|
|
27311
|
+
</${menuButtonTag}>
|
|
27312
|
+
`)}
|
|
27313
|
+
</template>
|
|
27314
|
+
`;
|
|
27315
|
+
const createCellViewTemplate = (cellViewTag) => html `<${cellViewTag} class="cell-view"
|
|
27316
|
+
:cellRecord="${y => y.cellState?.cellRecord}"
|
|
27317
|
+
:columnConfig="${y => y.cellState?.columnConfig}"
|
|
27318
|
+
>
|
|
27319
|
+
</${cellViewTag}>`;
|
|
27320
|
+
|
|
27363
27321
|
/**
|
|
27364
27322
|
* The possible directions a table column can be sorted in.
|
|
27365
27323
|
*/
|
|
@@ -27433,6 +27391,11 @@
|
|
|
27433
27391
|
super.connectedCallback();
|
|
27434
27392
|
this.setAttribute('slot', this.internalUniqueId);
|
|
27435
27393
|
}
|
|
27394
|
+
cellViewTagChanged() {
|
|
27395
|
+
this.currentCellViewTemplate = this.cellViewTag
|
|
27396
|
+
? createCellViewTemplate(this.cellViewTag)
|
|
27397
|
+
: undefined;
|
|
27398
|
+
}
|
|
27436
27399
|
internalFractionalWidthChanged() {
|
|
27437
27400
|
this.currentFractionalWidth = this.internalFractionalWidth;
|
|
27438
27401
|
}
|
|
@@ -27473,6 +27436,12 @@
|
|
|
27473
27436
|
__decorate$1([
|
|
27474
27437
|
observable
|
|
27475
27438
|
], TableColumn.prototype, "internalMinPixelWidth", void 0);
|
|
27439
|
+
__decorate$1([
|
|
27440
|
+
observable
|
|
27441
|
+
], TableColumn.prototype, "cellViewTag", void 0);
|
|
27442
|
+
__decorate$1([
|
|
27443
|
+
observable
|
|
27444
|
+
], TableColumn.prototype, "currentCellViewTemplate", void 0);
|
|
27476
27445
|
__decorate$1([
|
|
27477
27446
|
observable
|
|
27478
27447
|
], TableColumn.prototype, "dataRecordFieldNames", void 0);
|
|
@@ -27573,7 +27542,7 @@
|
|
|
27573
27542
|
}
|
|
27574
27543
|
}
|
|
27575
27544
|
|
|
27576
|
-
const styles$
|
|
27545
|
+
const styles$e = css `
|
|
27577
27546
|
${display('flex')}
|
|
27578
27547
|
|
|
27579
27548
|
:host {
|
|
@@ -27669,7 +27638,7 @@
|
|
|
27669
27638
|
}
|
|
27670
27639
|
`));
|
|
27671
27640
|
|
|
27672
|
-
const styles$
|
|
27641
|
+
const styles$d = css `
|
|
27673
27642
|
${display('flex')}
|
|
27674
27643
|
|
|
27675
27644
|
:host {
|
|
@@ -27688,7 +27657,7 @@
|
|
|
27688
27657
|
`;
|
|
27689
27658
|
|
|
27690
27659
|
// prettier-ignore
|
|
27691
|
-
const template$
|
|
27660
|
+
const template$8 = html `
|
|
27692
27661
|
<template role="columnheader" aria-sort="${x => x.ariaSort}">
|
|
27693
27662
|
<slot></slot>
|
|
27694
27663
|
|
|
@@ -27738,13 +27707,13 @@
|
|
|
27738
27707
|
], TableHeader.prototype, "firstSortedColumn", void 0);
|
|
27739
27708
|
const nimbleTableHeader = TableHeader.compose({
|
|
27740
27709
|
baseName: 'table-header',
|
|
27741
|
-
template: template$
|
|
27742
|
-
styles: styles$
|
|
27710
|
+
template: template$8,
|
|
27711
|
+
styles: styles$d
|
|
27743
27712
|
});
|
|
27744
27713
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableHeader());
|
|
27745
27714
|
const tableHeaderTag = DesignSystem.tagFor(TableHeader);
|
|
27746
27715
|
|
|
27747
|
-
const styles$
|
|
27716
|
+
const styles$c = css `
|
|
27748
27717
|
${display('grid')}
|
|
27749
27718
|
|
|
27750
27719
|
:host {
|
|
@@ -27770,7 +27739,7 @@
|
|
|
27770
27739
|
}
|
|
27771
27740
|
`;
|
|
27772
27741
|
|
|
27773
|
-
const styles$
|
|
27742
|
+
const styles$b = css `
|
|
27774
27743
|
${display('grid')}
|
|
27775
27744
|
|
|
27776
27745
|
:host {
|
|
@@ -27782,7 +27751,7 @@
|
|
|
27782
27751
|
--ni-private-table-cell-action-menu-display: block;
|
|
27783
27752
|
}
|
|
27784
27753
|
|
|
27785
|
-
.cell-
|
|
27754
|
+
.cell-view {
|
|
27786
27755
|
overflow: hidden;
|
|
27787
27756
|
display: flex;
|
|
27788
27757
|
align-items: center;
|
|
@@ -27793,27 +27762,6 @@
|
|
|
27793
27762
|
}
|
|
27794
27763
|
`;
|
|
27795
27764
|
|
|
27796
|
-
// prettier-ignore
|
|
27797
|
-
const template$6 = html `
|
|
27798
|
-
<template role="cell">
|
|
27799
|
-
<div ${ref('cellContentContainer')} class="cell-content-container"></div>
|
|
27800
|
-
|
|
27801
|
-
${when(x => x.hasActionMenu, html `
|
|
27802
|
-
<${menuButtonTag}
|
|
27803
|
-
content-hidden
|
|
27804
|
-
appearance="${ButtonAppearance.ghost}"
|
|
27805
|
-
@beforetoggle="${(x, c) => x.onActionMenuBeforeToggle(c.event)}"
|
|
27806
|
-
@toggle="${(x, c) => x.onActionMenuToggle(c.event)}"
|
|
27807
|
-
class="action-menu"
|
|
27808
|
-
>
|
|
27809
|
-
<${iconThreeDotsLineTag} slot="start"></${iconThreeDotsLineTag}>
|
|
27810
|
-
${x => x.actionMenuLabel}
|
|
27811
|
-
<slot name="cellActionMenu" slot="menu"></slot>
|
|
27812
|
-
</${menuButtonTag}>
|
|
27813
|
-
`)}
|
|
27814
|
-
</template>
|
|
27815
|
-
`;
|
|
27816
|
-
|
|
27817
27765
|
/**
|
|
27818
27766
|
* A styled cell that is used within the nimble-table-row.
|
|
27819
27767
|
* @internal
|
|
@@ -27823,18 +27771,6 @@
|
|
|
27823
27771
|
super(...arguments);
|
|
27824
27772
|
this.hasActionMenu = false;
|
|
27825
27773
|
this.menuOpen = false;
|
|
27826
|
-
this.customCellView = undefined;
|
|
27827
|
-
}
|
|
27828
|
-
connectedCallback() {
|
|
27829
|
-
super.connectedCallback();
|
|
27830
|
-
this.customCellView = this.cellTemplate?.render(this.cellState, this.cellContentContainer);
|
|
27831
|
-
}
|
|
27832
|
-
disconnectedCallback() {
|
|
27833
|
-
super.disconnectedCallback();
|
|
27834
|
-
if (this.customCellView) {
|
|
27835
|
-
this.customCellView.dispose();
|
|
27836
|
-
this.customCellView = undefined;
|
|
27837
|
-
}
|
|
27838
27774
|
}
|
|
27839
27775
|
onActionMenuBeforeToggle(event) {
|
|
27840
27776
|
this.$emit('cell-action-menu-beforetoggle', event.detail);
|
|
@@ -27843,32 +27779,10 @@
|
|
|
27843
27779
|
this.menuOpen = event.detail.newState;
|
|
27844
27780
|
this.$emit('cell-action-menu-toggle', event.detail);
|
|
27845
27781
|
}
|
|
27846
|
-
cellStateChanged() {
|
|
27847
|
-
this.customCellView?.bind(this.cellState, defaultExecutionContext);
|
|
27848
|
-
}
|
|
27849
|
-
cellTemplateChanged() {
|
|
27850
|
-
if (this.$fastController.isConnected) {
|
|
27851
|
-
this.customCellView = this.cellTemplate?.render(this.cellState, this.cellContentContainer);
|
|
27852
|
-
}
|
|
27853
|
-
}
|
|
27854
|
-
cellStylesChanged(prev, next) {
|
|
27855
|
-
if (prev) {
|
|
27856
|
-
this.$fastController.removeStyles(prev);
|
|
27857
|
-
}
|
|
27858
|
-
if (next) {
|
|
27859
|
-
this.$fastController.addStyles(next);
|
|
27860
|
-
}
|
|
27861
|
-
}
|
|
27862
27782
|
}
|
|
27863
27783
|
__decorate$1([
|
|
27864
27784
|
observable
|
|
27865
27785
|
], TableCell.prototype, "cellState", void 0);
|
|
27866
|
-
__decorate$1([
|
|
27867
|
-
observable
|
|
27868
|
-
], TableCell.prototype, "cellTemplate", void 0);
|
|
27869
|
-
__decorate$1([
|
|
27870
|
-
observable
|
|
27871
|
-
], TableCell.prototype, "cellStyles", void 0);
|
|
27872
27786
|
__decorate$1([
|
|
27873
27787
|
attr({ attribute: 'has-action-menu', mode: 'boolean' })
|
|
27874
27788
|
], TableCell.prototype, "hasActionMenu", void 0);
|
|
@@ -27878,24 +27792,26 @@
|
|
|
27878
27792
|
__decorate$1([
|
|
27879
27793
|
attr({ attribute: 'action-menu-label' })
|
|
27880
27794
|
], TableCell.prototype, "actionMenuLabel", void 0);
|
|
27795
|
+
__decorate$1([
|
|
27796
|
+
observable
|
|
27797
|
+
], TableCell.prototype, "cellViewTemplate", void 0);
|
|
27881
27798
|
const nimbleTableCell = TableCell.compose({
|
|
27882
27799
|
baseName: 'table-cell',
|
|
27883
|
-
template: template$
|
|
27884
|
-
styles: styles$
|
|
27800
|
+
template: template$9,
|
|
27801
|
+
styles: styles$b
|
|
27885
27802
|
});
|
|
27886
27803
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableCell());
|
|
27887
27804
|
const tableCellTag = DesignSystem.tagFor(TableCell);
|
|
27888
27805
|
|
|
27889
27806
|
// prettier-ignore
|
|
27890
|
-
const template$
|
|
27807
|
+
const template$7 = html `
|
|
27891
27808
|
<template role="row">
|
|
27892
27809
|
${repeat(x => x.columnStates, html `
|
|
27893
27810
|
${when(x => !x.column.columnHidden, html `
|
|
27894
27811
|
<${tableCellTag}
|
|
27895
27812
|
class="cell"
|
|
27896
|
-
:cellTemplate="${x => x.column.cellTemplate}"
|
|
27897
|
-
:cellStyles="${x => x.column.cellStyles}"
|
|
27898
27813
|
:cellState="${x => x.cellState}"
|
|
27814
|
+
:cellViewTemplate="${x => x.column.currentCellViewTemplate}"
|
|
27899
27815
|
?has-action-menu="${x => !!x.column.actionMenuSlot}"
|
|
27900
27816
|
action-menu-label="${x => x.column.actionMenuLabel}"
|
|
27901
27817
|
@cell-action-menu-beforetoggle="${(x, c) => c.parent.onCellActionMenuBeforeToggle(c.event, x.column)}"
|
|
@@ -27954,6 +27870,14 @@
|
|
|
27954
27870
|
this.menuOpen = event.detail.newState;
|
|
27955
27871
|
this.emitToggleEvent('row-action-menu-toggle', event.detail, column);
|
|
27956
27872
|
}
|
|
27873
|
+
closeOpenActionMenus() {
|
|
27874
|
+
if (this.menuOpen) {
|
|
27875
|
+
const cellWithMenuOpen = Array.from(this.shadowRoot.children).find(c => c instanceof TableCell && c.menuOpen);
|
|
27876
|
+
if (cellWithMenuOpen?.actionMenuButton?.open) {
|
|
27877
|
+
cellWithMenuOpen.actionMenuButton.toggleButton.control.click();
|
|
27878
|
+
}
|
|
27879
|
+
}
|
|
27880
|
+
}
|
|
27957
27881
|
emitToggleEvent(eventType, menuButtonEventDetail, column) {
|
|
27958
27882
|
const detail = {
|
|
27959
27883
|
newState: menuButtonEventDetail.newState,
|
|
@@ -27987,14 +27911,14 @@
|
|
|
27987
27911
|
], TableRow.prototype, "columnStates", null);
|
|
27988
27912
|
const nimbleTableRow = TableRow.compose({
|
|
27989
27913
|
baseName: 'table-row',
|
|
27990
|
-
template: template$
|
|
27991
|
-
styles: styles$
|
|
27914
|
+
template: template$7,
|
|
27915
|
+
styles: styles$c
|
|
27992
27916
|
});
|
|
27993
27917
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTableRow());
|
|
27994
27918
|
const tableRowTag = DesignSystem.tagFor(TableRow);
|
|
27995
27919
|
|
|
27996
27920
|
// prettier-ignore
|
|
27997
|
-
const template$
|
|
27921
|
+
const template$6 = html `
|
|
27998
27922
|
<template role="table" ${children$1({ property: 'childItems', filter: elements() })}>
|
|
27999
27923
|
<div class="table-container" style="
|
|
28000
27924
|
--ni-private-table-scroll-x: -${x => x.scrollX}px;
|
|
@@ -28021,7 +27945,7 @@
|
|
|
28021
27945
|
</div>
|
|
28022
27946
|
<div class="table-viewport" ${ref('viewport')}>
|
|
28023
27947
|
<div class="table-scroll"></div>
|
|
28024
|
-
<div class="table-row-container"
|
|
27948
|
+
<div class="table-row-container" ${children$1({ property: 'rowElements', filter: elements(tableRowTag) })}
|
|
28025
27949
|
role="rowgroup">
|
|
28026
27950
|
${when(x => x.columns.length > 0 && x.canRenderRows, html `
|
|
28027
27951
|
${repeat(x => x.virtualizer.visibleItems, html `
|
|
@@ -28675,6 +28599,25 @@
|
|
|
28675
28599
|
};
|
|
28676
28600
|
}
|
|
28677
28601
|
|
|
28602
|
+
/**
|
|
28603
|
+
* Base class for table cell views, which are used within the nimble-table-cell.
|
|
28604
|
+
* Each TableColumn type has a corresponding TableCellView type (linked via TableColumn.cellViewTag).
|
|
28605
|
+
*/
|
|
28606
|
+
class TableCellView extends FoundationElement {
|
|
28607
|
+
/**
|
|
28608
|
+
* Called if an element inside this cell view has focus, and this row/cell is being recycled.
|
|
28609
|
+
* Expected implementation is to commit changes as needed, and blur the focusable element (or close
|
|
28610
|
+
* the menu/popup/etc).
|
|
28611
|
+
*/
|
|
28612
|
+
focusedRecycleCallback() { }
|
|
28613
|
+
}
|
|
28614
|
+
__decorate$1([
|
|
28615
|
+
observable
|
|
28616
|
+
], TableCellView.prototype, "cellRecord", void 0);
|
|
28617
|
+
__decorate$1([
|
|
28618
|
+
observable
|
|
28619
|
+
], TableCellView.prototype, "columnConfig", void 0);
|
|
28620
|
+
|
|
28678
28621
|
/**
|
|
28679
28622
|
* Helper class for the nimble-table for row virtualization.
|
|
28680
28623
|
*
|
|
@@ -28739,6 +28682,7 @@
|
|
|
28739
28682
|
};
|
|
28740
28683
|
}
|
|
28741
28684
|
handleVirtualizerChange() {
|
|
28685
|
+
this.notifyFocusedCellRecycling();
|
|
28742
28686
|
const virtualizer = this.virtualizer;
|
|
28743
28687
|
this.visibleItems = virtualizer.getVirtualItems();
|
|
28744
28688
|
this.allRowsHeight = virtualizer.getTotalSize();
|
|
@@ -28753,6 +28697,25 @@
|
|
|
28753
28697
|
}
|
|
28754
28698
|
this.rowContainerYOffset = rowContainerYOffset;
|
|
28755
28699
|
}
|
|
28700
|
+
notifyFocusedCellRecycling() {
|
|
28701
|
+
let tableFocusedElement = this.table.shadowRoot.activeElement;
|
|
28702
|
+
while (tableFocusedElement !== null
|
|
28703
|
+
&& !(tableFocusedElement instanceof TableCellView)) {
|
|
28704
|
+
if (tableFocusedElement.shadowRoot) {
|
|
28705
|
+
tableFocusedElement = tableFocusedElement.shadowRoot.activeElement;
|
|
28706
|
+
}
|
|
28707
|
+
else {
|
|
28708
|
+
break;
|
|
28709
|
+
}
|
|
28710
|
+
}
|
|
28711
|
+
if (tableFocusedElement instanceof TableCellView) {
|
|
28712
|
+
tableFocusedElement.focusedRecycleCallback();
|
|
28713
|
+
}
|
|
28714
|
+
if (this.table.openActionMenuRecordId !== undefined) {
|
|
28715
|
+
const activeRow = this.table.rowElements.find(row => row.recordId === this.table.openActionMenuRecordId);
|
|
28716
|
+
activeRow?.closeOpenActionMenus();
|
|
28717
|
+
}
|
|
28718
|
+
}
|
|
28756
28719
|
}
|
|
28757
28720
|
__decorate$1([
|
|
28758
28721
|
observable
|
|
@@ -28948,6 +28911,10 @@
|
|
|
28948
28911
|
* @internal
|
|
28949
28912
|
*/
|
|
28950
28913
|
this.childItems = [];
|
|
28914
|
+
/**
|
|
28915
|
+
* @internal
|
|
28916
|
+
*/
|
|
28917
|
+
this.rowElements = [];
|
|
28951
28918
|
/**
|
|
28952
28919
|
* @internal
|
|
28953
28920
|
*/
|
|
@@ -29022,6 +28989,9 @@
|
|
|
29022
28989
|
}
|
|
29023
28990
|
onRowActionMenuToggle(event) {
|
|
29024
28991
|
this.$emit('action-menu-toggle', event.detail);
|
|
28992
|
+
if (!event.detail.newState) {
|
|
28993
|
+
this.openActionMenuRecordId = undefined;
|
|
28994
|
+
}
|
|
29025
28995
|
}
|
|
29026
28996
|
/**
|
|
29027
28997
|
* @internal
|
|
@@ -29193,6 +29163,9 @@
|
|
|
29193
29163
|
__decorate$1([
|
|
29194
29164
|
observable
|
|
29195
29165
|
], Table.prototype, "childItems", void 0);
|
|
29166
|
+
__decorate$1([
|
|
29167
|
+
observable
|
|
29168
|
+
], Table.prototype, "rowElements", void 0);
|
|
29196
29169
|
__decorate$1([
|
|
29197
29170
|
observable
|
|
29198
29171
|
], Table.prototype, "actionMenuSlots", void 0);
|
|
@@ -29213,13 +29186,13 @@
|
|
|
29213
29186
|
], Table.prototype, "firstSortedColumn", void 0);
|
|
29214
29187
|
const nimbleTable = Table.compose({
|
|
29215
29188
|
baseName: 'table',
|
|
29216
|
-
template: template$
|
|
29217
|
-
styles: styles$
|
|
29189
|
+
template: template$6,
|
|
29190
|
+
styles: styles$e
|
|
29218
29191
|
});
|
|
29219
29192
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTable());
|
|
29220
29193
|
DesignSystem.tagFor(Table);
|
|
29221
29194
|
|
|
29222
|
-
const styles$
|
|
29195
|
+
const styles$a = css `
|
|
29223
29196
|
:host {
|
|
29224
29197
|
display: contents;
|
|
29225
29198
|
}
|
|
@@ -29231,7 +29204,7 @@
|
|
|
29231
29204
|
}
|
|
29232
29205
|
`;
|
|
29233
29206
|
|
|
29234
|
-
const template$
|
|
29207
|
+
const template$5 = html `
|
|
29235
29208
|
<template>
|
|
29236
29209
|
<span class="header-content">
|
|
29237
29210
|
<slot></slot>
|
|
@@ -29278,7 +29251,7 @@
|
|
|
29278
29251
|
return FractionalWidthColumn;
|
|
29279
29252
|
}
|
|
29280
29253
|
|
|
29281
|
-
const
|
|
29254
|
+
const styles$9 = css `
|
|
29282
29255
|
span {
|
|
29283
29256
|
font: ${bodyFont};
|
|
29284
29257
|
color: ${bodyFontColor};
|
|
@@ -29292,29 +29265,51 @@
|
|
|
29292
29265
|
}
|
|
29293
29266
|
`;
|
|
29294
29267
|
|
|
29295
|
-
const
|
|
29296
|
-
return typeof cellState.cellRecord.value === 'string'
|
|
29297
|
-
? cellState.cellRecord.value
|
|
29298
|
-
: cellState.columnConfig.placeholder;
|
|
29299
|
-
};
|
|
29300
|
-
const setTitleWhenOverflow = (span, title) => {
|
|
29301
|
-
if (title && span.offsetWidth < span.scrollWidth) {
|
|
29302
|
-
span.setAttribute('title', title);
|
|
29303
|
-
}
|
|
29304
|
-
};
|
|
29305
|
-
const removeTitle = (span) => {
|
|
29306
|
-
span.removeAttribute('title');
|
|
29307
|
-
};
|
|
29308
|
-
const cellTemplate = html `
|
|
29268
|
+
const template$4 = html `
|
|
29309
29269
|
<span
|
|
29270
|
+
${ref('textSpan')}
|
|
29310
29271
|
class="${x => (typeof x.cellRecord.value === 'string' ? '' : 'placeholder')}"
|
|
29311
|
-
@mouseover="${
|
|
29312
|
-
|
|
29272
|
+
@mouseover="${x => {
|
|
29273
|
+
x.isValidContentAndHasOverflow = !!x.content && x.textSpan.offsetWidth < x.textSpan.scrollWidth;
|
|
29274
|
+
}}"
|
|
29275
|
+
@mouseout="${x => {
|
|
29276
|
+
x.isValidContentAndHasOverflow = false;
|
|
29277
|
+
}}"
|
|
29278
|
+
title=${x => (x.isValidContentAndHasOverflow ? x.content : null)}
|
|
29313
29279
|
>
|
|
29314
|
-
${x =>
|
|
29280
|
+
${x => x.content}
|
|
29315
29281
|
</span>
|
|
29316
29282
|
`;
|
|
29317
29283
|
|
|
29284
|
+
/**
|
|
29285
|
+
* A cell view for displaying strings
|
|
29286
|
+
*/
|
|
29287
|
+
class TableColumnTextCellView extends TableCellView {
|
|
29288
|
+
constructor() {
|
|
29289
|
+
super(...arguments);
|
|
29290
|
+
/** @internal */
|
|
29291
|
+
this.isValidContentAndHasOverflow = false;
|
|
29292
|
+
}
|
|
29293
|
+
get content() {
|
|
29294
|
+
return typeof this.cellRecord.value === 'string'
|
|
29295
|
+
? this.cellRecord.value
|
|
29296
|
+
: this.columnConfig.placeholder;
|
|
29297
|
+
}
|
|
29298
|
+
}
|
|
29299
|
+
__decorate$1([
|
|
29300
|
+
observable
|
|
29301
|
+
], TableColumnTextCellView.prototype, "isValidContentAndHasOverflow", void 0);
|
|
29302
|
+
__decorate$1([
|
|
29303
|
+
volatile
|
|
29304
|
+
], TableColumnTextCellView.prototype, "content", null);
|
|
29305
|
+
const textCellView = TableColumnTextCellView.compose({
|
|
29306
|
+
baseName: 'table-column-text-cell-view',
|
|
29307
|
+
template: template$4,
|
|
29308
|
+
styles: styles$9
|
|
29309
|
+
});
|
|
29310
|
+
DesignSystem.getOrCreate().withPrefix('nimble').register(textCellView());
|
|
29311
|
+
const tableColumnTextCellViewTag = DesignSystem.tagFor(TableColumnTextCellView);
|
|
29312
|
+
|
|
29318
29313
|
/**
|
|
29319
29314
|
* The base class for a table column for displaying strings.
|
|
29320
29315
|
*/
|
|
@@ -29322,8 +29317,7 @@
|
|
|
29322
29317
|
constructor() {
|
|
29323
29318
|
super();
|
|
29324
29319
|
this.cellRecordFieldNames = ['value'];
|
|
29325
|
-
this.
|
|
29326
|
-
this.cellTemplate = cellTemplate;
|
|
29320
|
+
this.cellViewTag = tableColumnTextCellViewTag;
|
|
29327
29321
|
this.sortOperation = TableColumnSortOperation.localeAwareCaseSensitive;
|
|
29328
29322
|
}
|
|
29329
29323
|
fieldNameChanged() {
|
|
@@ -29347,8 +29341,8 @@
|
|
|
29347
29341
|
}
|
|
29348
29342
|
const nimbleTableColumnText = TableColumnText.compose({
|
|
29349
29343
|
baseName: 'table-column-text',
|
|
29350
|
-
template: template$
|
|
29351
|
-
styles: styles$
|
|
29344
|
+
template: template$5,
|
|
29345
|
+
styles: styles$a
|
|
29352
29346
|
});
|
|
29353
29347
|
DesignSystem.getOrCreate()
|
|
29354
29348
|
.withPrefix('nimble')
|
|
@@ -29419,7 +29413,7 @@
|
|
|
29419
29413
|
}
|
|
29420
29414
|
`;
|
|
29421
29415
|
|
|
29422
|
-
const template$
|
|
29416
|
+
const template$3 = html `
|
|
29423
29417
|
<template slot="end">
|
|
29424
29418
|
<div class="separator"></div>
|
|
29425
29419
|
<slot></slot>
|
|
@@ -29433,7 +29427,7 @@
|
|
|
29433
29427
|
}
|
|
29434
29428
|
const nimbleTabsToolbar = TabsToolbar.compose({
|
|
29435
29429
|
baseName: 'tabs-toolbar',
|
|
29436
|
-
template: template$
|
|
29430
|
+
template: template$3,
|
|
29437
29431
|
styles: styles$7
|
|
29438
29432
|
});
|
|
29439
29433
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTabsToolbar());
|
|
@@ -29446,6 +29440,7 @@
|
|
|
29446
29440
|
|
|
29447
29441
|
const styles$6 = css `
|
|
29448
29442
|
${display('inline-flex')}
|
|
29443
|
+
${styles$t}
|
|
29449
29444
|
|
|
29450
29445
|
:host {
|
|
29451
29446
|
font: ${bodyFont};
|
|
@@ -29454,6 +29449,7 @@
|
|
|
29454
29449
|
color: ${bodyFontColor};
|
|
29455
29450
|
flex-direction: column;
|
|
29456
29451
|
vertical-align: top;
|
|
29452
|
+
--ni-private-hover-indicator-width: calc(${borderWidth} + 1px);
|
|
29457
29453
|
}
|
|
29458
29454
|
|
|
29459
29455
|
:host([disabled]) {
|
|
@@ -29470,10 +29466,47 @@
|
|
|
29470
29466
|
color: ${controlLabelDisabledFontColor};
|
|
29471
29467
|
}
|
|
29472
29468
|
|
|
29469
|
+
.container {
|
|
29470
|
+
display: flex;
|
|
29471
|
+
justify-content: center;
|
|
29472
|
+
position: relative;
|
|
29473
|
+
height: 100%;
|
|
29474
|
+
width: 100%;
|
|
29475
|
+
}
|
|
29476
|
+
|
|
29477
|
+
.container::after {
|
|
29478
|
+
content: ' ';
|
|
29479
|
+
position: absolute;
|
|
29480
|
+
bottom: calc(-1 * ${borderWidth});
|
|
29481
|
+
width: 0px;
|
|
29482
|
+
height: 0px;
|
|
29483
|
+
border-bottom: ${borderHoverColor}
|
|
29484
|
+
var(--ni-private-hover-indicator-width) solid;
|
|
29485
|
+
transition: width ${smallDelay} ease-in;
|
|
29486
|
+
}
|
|
29487
|
+
|
|
29488
|
+
@media (prefers-reduced-motion) {
|
|
29489
|
+
.container::after {
|
|
29490
|
+
transition-duration: 0s;
|
|
29491
|
+
}
|
|
29492
|
+
}
|
|
29493
|
+
|
|
29494
|
+
:host([error-visible]) .container::after {
|
|
29495
|
+
border-bottom-color: ${failColor};
|
|
29496
|
+
}
|
|
29497
|
+
|
|
29498
|
+
:host(:hover) .container::after {
|
|
29499
|
+
width: 100%;
|
|
29500
|
+
}
|
|
29501
|
+
|
|
29502
|
+
:host([disabled]:hover) .container::after,
|
|
29503
|
+
:host([readonly]:hover) .container::after {
|
|
29504
|
+
width: 0px;
|
|
29505
|
+
}
|
|
29506
|
+
|
|
29473
29507
|
.control {
|
|
29474
29508
|
-webkit-appearance: none;
|
|
29475
29509
|
font: inherit;
|
|
29476
|
-
width: 100%;
|
|
29477
29510
|
flex-grow: 1;
|
|
29478
29511
|
outline: none;
|
|
29479
29512
|
box-sizing: border-box;
|
|
@@ -29482,8 +29515,13 @@
|
|
|
29482
29515
|
border-radius: 0px;
|
|
29483
29516
|
align-items: flex-end;
|
|
29484
29517
|
border: ${borderWidth} solid transparent;
|
|
29518
|
+
min-width: 100px;
|
|
29519
|
+
min-height: calc(${iconSize} + ${standardPadding});
|
|
29485
29520
|
padding: 8px;
|
|
29486
|
-
|
|
29521
|
+
${
|
|
29522
|
+
/* This padding ensures that showing/hiding the error icon doesn't affect text layout */ ''}
|
|
29523
|
+
padding-right: calc(${iconSize});
|
|
29524
|
+
margin: 0px;
|
|
29487
29525
|
resize: none;
|
|
29488
29526
|
}
|
|
29489
29527
|
|
|
@@ -29493,13 +29531,8 @@
|
|
|
29493
29531
|
}
|
|
29494
29532
|
}
|
|
29495
29533
|
|
|
29496
|
-
.control:hover {
|
|
29497
|
-
border-color: ${borderHoverColor};
|
|
29498
|
-
box-shadow: 0px 0px 0px 1px ${borderHoverColor};
|
|
29499
|
-
}
|
|
29500
|
-
|
|
29501
29534
|
.control:focus-within {
|
|
29502
|
-
border-color: ${borderHoverColor};
|
|
29535
|
+
border-bottom-color: ${borderHoverColor};
|
|
29503
29536
|
}
|
|
29504
29537
|
|
|
29505
29538
|
.control[readonly],
|
|
@@ -29508,23 +29541,22 @@
|
|
|
29508
29541
|
.control[disabled],
|
|
29509
29542
|
.control[disabled]:hover {
|
|
29510
29543
|
border-color: rgba(${borderRgbPartialColor}, 0.1);
|
|
29511
|
-
box-shadow: none;
|
|
29512
29544
|
}
|
|
29513
29545
|
|
|
29514
|
-
.control
|
|
29515
|
-
color: ${
|
|
29546
|
+
:host([error-visible]) .control {
|
|
29547
|
+
border-bottom-color: ${failColor};
|
|
29516
29548
|
}
|
|
29517
29549
|
|
|
29518
|
-
.control[
|
|
29519
|
-
color: ${
|
|
29550
|
+
:host([error-visible]) .control[readonly]:hover:focus-within {
|
|
29551
|
+
border-bottom-color: ${failColor};
|
|
29520
29552
|
}
|
|
29521
29553
|
|
|
29522
|
-
|
|
29523
|
-
|
|
29554
|
+
.control::placeholder {
|
|
29555
|
+
color: ${controlLabelFontColor};
|
|
29524
29556
|
}
|
|
29525
29557
|
|
|
29526
|
-
|
|
29527
|
-
|
|
29558
|
+
.control[disabled]::placeholder {
|
|
29559
|
+
color: ${controlLabelDisabledFontColor};
|
|
29528
29560
|
}
|
|
29529
29561
|
|
|
29530
29562
|
:host([resize='both']) .control {
|
|
@@ -29536,6 +29568,17 @@
|
|
|
29536
29568
|
:host([resize='vertical']) .control {
|
|
29537
29569
|
resize: vertical;
|
|
29538
29570
|
}
|
|
29571
|
+
|
|
29572
|
+
:host([error-visible]) .error-icon {
|
|
29573
|
+
display: none;
|
|
29574
|
+
}
|
|
29575
|
+
|
|
29576
|
+
:host([error-visible]) .error-icon.scrollbar-width-calculated {
|
|
29577
|
+
display: inline-flex;
|
|
29578
|
+
position: absolute;
|
|
29579
|
+
top: calc(${standardPadding} / 2);
|
|
29580
|
+
right: var(--ni-private-scrollbar-width);
|
|
29581
|
+
}
|
|
29539
29582
|
`.withBehaviors(appearanceBehavior(TextAreaAppearance.outline, css `
|
|
29540
29583
|
.control {
|
|
29541
29584
|
border-color: rgba(${borderRgbPartialColor}, 0.3);
|
|
@@ -29554,8 +29597,71 @@
|
|
|
29554
29597
|
border-color: transparent;
|
|
29555
29598
|
background-color: rgba(${borderRgbPartialColor}, 0.1);
|
|
29556
29599
|
}
|
|
29600
|
+
|
|
29601
|
+
:host([error-visible][disabled]) .control {
|
|
29602
|
+
border-bottom-color: ${failColor};
|
|
29603
|
+
}
|
|
29557
29604
|
`));
|
|
29558
29605
|
|
|
29606
|
+
const template$2 = () => html `
|
|
29607
|
+
<label
|
|
29608
|
+
part="label"
|
|
29609
|
+
for="control"
|
|
29610
|
+
class="${x => (x.defaultSlottedNodes?.length ? 'label' : 'label label__hidden')}"
|
|
29611
|
+
>
|
|
29612
|
+
<slot ${slotted('defaultSlottedNodes')}></slot>
|
|
29613
|
+
</label>
|
|
29614
|
+
<div class="container">
|
|
29615
|
+
<textarea
|
|
29616
|
+
part="control"
|
|
29617
|
+
class="control"
|
|
29618
|
+
id="control"
|
|
29619
|
+
?autofocus="${x => x.autofocus}"
|
|
29620
|
+
cols="${x => x.cols}"
|
|
29621
|
+
?disabled="${x => x.disabled}"
|
|
29622
|
+
form="${x => x.form}"
|
|
29623
|
+
list="${x => x.list}"
|
|
29624
|
+
maxlength="${x => x.maxlength}"
|
|
29625
|
+
minlength="${x => x.minlength}"
|
|
29626
|
+
name="${x => x.name}"
|
|
29627
|
+
placeholder="${x => x.placeholder}"
|
|
29628
|
+
?readonly="${x => x.readOnly}"
|
|
29629
|
+
?required="${x => x.required}"
|
|
29630
|
+
rows="${x => x.rows}"
|
|
29631
|
+
?spellcheck="${x => x.spellcheck}"
|
|
29632
|
+
:value="${x => x.value}"
|
|
29633
|
+
aria-atomic="${x => x.ariaAtomic}"
|
|
29634
|
+
aria-busy="${x => x.ariaBusy}"
|
|
29635
|
+
aria-controls="${x => x.ariaControls}"
|
|
29636
|
+
aria-current="${x => x.ariaCurrent}"
|
|
29637
|
+
aria-describedby="${x => x.ariaDescribedby}"
|
|
29638
|
+
aria-details="${x => x.ariaDetails}"
|
|
29639
|
+
aria-disabled="${x => x.ariaDisabled}"
|
|
29640
|
+
aria-errormessage="${x => x.ariaErrormessage}"
|
|
29641
|
+
aria-flowto="${x => x.ariaFlowto}"
|
|
29642
|
+
aria-haspopup="${x => x.ariaHaspopup}"
|
|
29643
|
+
aria-hidden="${x => x.ariaHidden}"
|
|
29644
|
+
aria-invalid="${x => x.ariaInvalid}"
|
|
29645
|
+
aria-keyshortcuts="${x => x.ariaKeyshortcuts}"
|
|
29646
|
+
aria-label="${x => x.ariaLabel}"
|
|
29647
|
+
aria-labelledby="${x => x.ariaLabelledby}"
|
|
29648
|
+
aria-live="${x => x.ariaLive}"
|
|
29649
|
+
aria-owns="${x => x.ariaOwns}"
|
|
29650
|
+
aria-relevant="${x => x.ariaRelevant}"
|
|
29651
|
+
aria-roledescription="${x => x.ariaRoledescription}"
|
|
29652
|
+
@input="${x => x.onTextAreaInput()}"
|
|
29653
|
+
@change="${x => x.handleChange()}"
|
|
29654
|
+
${ref('control')}
|
|
29655
|
+
></textarea>
|
|
29656
|
+
<${iconExclamationMarkTag}
|
|
29657
|
+
severity="error"
|
|
29658
|
+
class="error-icon ${x => (x.scrollbarWidth >= 0 ? 'scrollbar-width-calculated' : '')}"
|
|
29659
|
+
style="--ni-private-scrollbar-width: ${x => x.scrollbarWidth}px;"
|
|
29660
|
+
></${iconExclamationMarkTag}>
|
|
29661
|
+
${errorTextTemplate}
|
|
29662
|
+
</div>
|
|
29663
|
+
`;
|
|
29664
|
+
|
|
29559
29665
|
/**
|
|
29560
29666
|
* A nimble-styed HTML text area
|
|
29561
29667
|
*/
|
|
@@ -29570,15 +29676,96 @@
|
|
|
29570
29676
|
* HTML Attribute: appearance
|
|
29571
29677
|
*/
|
|
29572
29678
|
this.appearance = TextAreaAppearance.outline;
|
|
29679
|
+
/**
|
|
29680
|
+
* Whether to display the error state.
|
|
29681
|
+
*
|
|
29682
|
+
* @public
|
|
29683
|
+
* @remarks
|
|
29684
|
+
* HTML Attribute: error-visible
|
|
29685
|
+
*/
|
|
29686
|
+
this.errorVisible = false;
|
|
29687
|
+
/**
|
|
29688
|
+
* The width of the vertical scrollbar, if displayed.
|
|
29689
|
+
* @internal
|
|
29690
|
+
*/
|
|
29691
|
+
this.scrollbarWidth = -1;
|
|
29692
|
+
this.updateScrollbarWidthQueued = false;
|
|
29693
|
+
}
|
|
29694
|
+
/**
|
|
29695
|
+
* @internal
|
|
29696
|
+
*/
|
|
29697
|
+
connectedCallback() {
|
|
29698
|
+
super.connectedCallback();
|
|
29699
|
+
this.resizeObserver = new ResizeObserver(() => this.onResize());
|
|
29700
|
+
this.resizeObserver.observe(this);
|
|
29701
|
+
}
|
|
29702
|
+
/**
|
|
29703
|
+
* @internal
|
|
29704
|
+
*/
|
|
29705
|
+
disconnectedCallback() {
|
|
29706
|
+
this.resizeObserver?.disconnect();
|
|
29707
|
+
}
|
|
29708
|
+
/**
|
|
29709
|
+
* @internal
|
|
29710
|
+
*/
|
|
29711
|
+
onTextAreaInput() {
|
|
29712
|
+
this.handleTextInput();
|
|
29713
|
+
this.queueUpdateScrollbarWidth();
|
|
29714
|
+
}
|
|
29715
|
+
// If a property can affect whether a scrollbar is visible, we need to
|
|
29716
|
+
// call queueUpdateScrollbarWidth() when it changes. The exceptions are
|
|
29717
|
+
// properties that affect size (e.g. height, width, cols, rows), because
|
|
29718
|
+
// we already have a ResizeObserver handling those changes. Also,
|
|
29719
|
+
// a change to errorVisible cannot cause scrollbar visibility to change,
|
|
29720
|
+
// because we always reserve space for the error icon.
|
|
29721
|
+
/**
|
|
29722
|
+
* @internal
|
|
29723
|
+
*/
|
|
29724
|
+
placeholderChanged() {
|
|
29725
|
+
this.queueUpdateScrollbarWidth();
|
|
29726
|
+
}
|
|
29727
|
+
/**
|
|
29728
|
+
* @internal
|
|
29729
|
+
*/
|
|
29730
|
+
valueChanged(previous, next) {
|
|
29731
|
+
super.valueChanged(previous, next);
|
|
29732
|
+
this.queueUpdateScrollbarWidth();
|
|
29733
|
+
}
|
|
29734
|
+
onResize() {
|
|
29735
|
+
// Do this directly instead of calling updateScrollbarWidth, b/c we don't want to
|
|
29736
|
+
// interfere with queue.
|
|
29737
|
+
this.scrollbarWidth = this.control.offsetWidth - this.control.clientWidth;
|
|
29738
|
+
}
|
|
29739
|
+
queueUpdateScrollbarWidth() {
|
|
29740
|
+
if (!this.$fastController.isConnected) {
|
|
29741
|
+
return;
|
|
29742
|
+
}
|
|
29743
|
+
if (!this.updateScrollbarWidthQueued) {
|
|
29744
|
+
this.updateScrollbarWidthQueued = true;
|
|
29745
|
+
DOM.queueUpdate(() => this.updateScrollbarWidth());
|
|
29746
|
+
}
|
|
29747
|
+
}
|
|
29748
|
+
updateScrollbarWidth() {
|
|
29749
|
+
this.updateScrollbarWidthQueued = false;
|
|
29750
|
+
this.scrollbarWidth = this.control.offsetWidth - this.control.clientWidth;
|
|
29573
29751
|
}
|
|
29574
29752
|
}
|
|
29575
29753
|
__decorate$1([
|
|
29576
29754
|
attr
|
|
29577
29755
|
], TextArea.prototype, "appearance", void 0);
|
|
29756
|
+
__decorate$1([
|
|
29757
|
+
attr({ attribute: 'error-text' })
|
|
29758
|
+
], TextArea.prototype, "errorText", void 0);
|
|
29759
|
+
__decorate$1([
|
|
29760
|
+
attr({ attribute: 'error-visible', mode: 'boolean' })
|
|
29761
|
+
], TextArea.prototype, "errorVisible", void 0);
|
|
29762
|
+
__decorate$1([
|
|
29763
|
+
observable
|
|
29764
|
+
], TextArea.prototype, "scrollbarWidth", void 0);
|
|
29578
29765
|
const nimbleTextArea = TextArea.compose({
|
|
29579
29766
|
baseName: 'text-area',
|
|
29580
29767
|
baseClass: TextArea$1,
|
|
29581
|
-
template:
|
|
29768
|
+
template: template$2,
|
|
29582
29769
|
styles: styles$6,
|
|
29583
29770
|
shadowOptions: {
|
|
29584
29771
|
delegatesFocus: true
|
|
@@ -29599,7 +29786,7 @@
|
|
|
29599
29786
|
|
|
29600
29787
|
const styles$5 = css `
|
|
29601
29788
|
${display('inline-block')}
|
|
29602
|
-
${styles$
|
|
29789
|
+
${styles$t}
|
|
29603
29790
|
|
|
29604
29791
|
:host {
|
|
29605
29792
|
font: ${bodyFont};
|