@ni/nimble-components 19.1.0 → 19.1.2
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 +263 -214
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +900 -893
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/combobox/index.d.ts +13 -0
- package/dist/esm/combobox/index.js +26 -1
- package/dist/esm/combobox/index.js.map +1 -1
- package/dist/esm/combobox/template.d.ts +4 -0
- package/dist/esm/combobox/template.js +76 -0
- package/dist/esm/combobox/template.js.map +1 -0
- package/dist/esm/patterns/dropdown/styles.js +9 -23
- package/dist/esm/patterns/dropdown/styles.js.map +1 -1
- package/dist/esm/select/index.d.ts +7 -1
- package/dist/esm/select/index.js +16 -2
- package/dist/esm/select/index.js.map +1 -1
- package/dist/esm/select/template.d.ts +4 -0
- package/dist/esm/select/template.js +82 -0
- package/dist/esm/select/template.js.map +1 -0
- package/dist/esm/table-column/anchor/index.d.ts +3 -2
- package/dist/esm/table-column/anchor/index.js +8 -5
- package/dist/esm/table-column/anchor/index.js.map +1 -1
- package/dist/esm/table-column/base/index.d.ts +8 -8
- package/dist/esm/table-column/base/index.js +15 -18
- package/dist/esm/table-column/base/index.js.map +1 -1
- package/dist/esm/table-column/base/models/column-internals.d.ts +5 -1
- package/dist/esm/table-column/base/models/column-internals.js +7 -0
- package/dist/esm/table-column/base/models/column-internals.js.map +1 -1
- package/dist/esm/table-column/text/index.d.ts +2 -1
- package/dist/esm/table-column/text/index.js +5 -5
- package/dist/esm/table-column/text/index.js.map +1 -1
- package/dist/esm/table-column/text-base/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -8918,70 +8918,6 @@
|
|
|
8918
8918
|
applyMixins(DelegatesARIACombobox, DelegatesARIAListbox);
|
|
8919
8919
|
applyMixins(Combobox$1, StartEnd, DelegatesARIACombobox);
|
|
8920
8920
|
|
|
8921
|
-
/**
|
|
8922
|
-
* The template for the {@link @microsoft/fast-foundation#(Combobox:class)} component.
|
|
8923
|
-
* @public
|
|
8924
|
-
*/
|
|
8925
|
-
const comboboxTemplate = (context, definition) => html `
|
|
8926
|
-
<template
|
|
8927
|
-
aria-disabled="${x => x.ariaDisabled}"
|
|
8928
|
-
autocomplete="${x => x.autocomplete}"
|
|
8929
|
-
class="${x => (x.open ? "open" : "")} ${x => x.disabled ? "disabled" : ""} ${x => x.position}"
|
|
8930
|
-
?open="${x => x.open}"
|
|
8931
|
-
tabindex="${x => (!x.disabled ? "0" : null)}"
|
|
8932
|
-
@click="${(x, c) => x.clickHandler(c.event)}"
|
|
8933
|
-
@focusout="${(x, c) => x.focusoutHandler(c.event)}"
|
|
8934
|
-
@keydown="${(x, c) => x.keydownHandler(c.event)}"
|
|
8935
|
-
>
|
|
8936
|
-
<div class="control" part="control">
|
|
8937
|
-
${startSlotTemplate(context, definition)}
|
|
8938
|
-
<slot name="control">
|
|
8939
|
-
<input
|
|
8940
|
-
aria-activedescendant="${x => x.open ? x.ariaActiveDescendant : null}"
|
|
8941
|
-
aria-autocomplete="${x => x.ariaAutoComplete}"
|
|
8942
|
-
aria-controls="${x => x.ariaControls}"
|
|
8943
|
-
aria-disabled="${x => x.ariaDisabled}"
|
|
8944
|
-
aria-expanded="${x => x.ariaExpanded}"
|
|
8945
|
-
aria-haspopup="listbox"
|
|
8946
|
-
class="selected-value"
|
|
8947
|
-
part="selected-value"
|
|
8948
|
-
placeholder="${x => x.placeholder}"
|
|
8949
|
-
role="combobox"
|
|
8950
|
-
type="text"
|
|
8951
|
-
?disabled="${x => x.disabled}"
|
|
8952
|
-
:value="${x => x.value}"
|
|
8953
|
-
@input="${(x, c) => x.inputHandler(c.event)}"
|
|
8954
|
-
@keyup="${(x, c) => x.keyupHandler(c.event)}"
|
|
8955
|
-
${ref("control")}
|
|
8956
|
-
/>
|
|
8957
|
-
<div class="indicator" part="indicator" aria-hidden="true">
|
|
8958
|
-
<slot name="indicator">
|
|
8959
|
-
${definition.indicator || ""}
|
|
8960
|
-
</slot>
|
|
8961
|
-
</div>
|
|
8962
|
-
</slot>
|
|
8963
|
-
${endSlotTemplate(context, definition)}
|
|
8964
|
-
</div>
|
|
8965
|
-
<div
|
|
8966
|
-
class="listbox"
|
|
8967
|
-
id="${x => x.listboxId}"
|
|
8968
|
-
part="listbox"
|
|
8969
|
-
role="listbox"
|
|
8970
|
-
?disabled="${x => x.disabled}"
|
|
8971
|
-
?hidden="${x => !x.open}"
|
|
8972
|
-
${ref("listbox")}
|
|
8973
|
-
>
|
|
8974
|
-
<slot
|
|
8975
|
-
${slotted({
|
|
8976
|
-
filter: Listbox.slottedOptionFilter,
|
|
8977
|
-
flatten: true,
|
|
8978
|
-
property: "slottedOptions",
|
|
8979
|
-
})}
|
|
8980
|
-
></slot>
|
|
8981
|
-
</div>
|
|
8982
|
-
</template>
|
|
8983
|
-
`;
|
|
8984
|
-
|
|
8985
8921
|
/**
|
|
8986
8922
|
* Retrieves the "composed parent" element of a node, ignoring DOM tree boundaries.
|
|
8987
8923
|
* When the parent of a node is a shadow-root, it will return the host
|
|
@@ -13065,76 +13001,6 @@
|
|
|
13065
13001
|
applyMixins(DelegatesARIASelect, DelegatesARIAListbox);
|
|
13066
13002
|
applyMixins(Select$1, StartEnd, DelegatesARIASelect);
|
|
13067
13003
|
|
|
13068
|
-
/**
|
|
13069
|
-
* The template for the {@link @microsoft/fast-foundation#(Select:class)} component.
|
|
13070
|
-
* @public
|
|
13071
|
-
*/
|
|
13072
|
-
const selectTemplate = (context, definition) => html `
|
|
13073
|
-
<template
|
|
13074
|
-
class="${x => [
|
|
13075
|
-
x.collapsible && "collapsible",
|
|
13076
|
-
x.collapsible && x.open && "open",
|
|
13077
|
-
x.disabled && "disabled",
|
|
13078
|
-
x.collapsible && x.position,
|
|
13079
|
-
]
|
|
13080
|
-
.filter(Boolean)
|
|
13081
|
-
.join(" ")}"
|
|
13082
|
-
aria-activedescendant="${x => x.ariaActiveDescendant}"
|
|
13083
|
-
aria-controls="${x => x.ariaControls}"
|
|
13084
|
-
aria-disabled="${x => x.ariaDisabled}"
|
|
13085
|
-
aria-expanded="${x => x.ariaExpanded}"
|
|
13086
|
-
aria-haspopup="${x => (x.collapsible ? "listbox" : null)}"
|
|
13087
|
-
aria-multiselectable="${x => x.ariaMultiSelectable}"
|
|
13088
|
-
?open="${x => x.open}"
|
|
13089
|
-
role="combobox"
|
|
13090
|
-
tabindex="${x => (!x.disabled ? "0" : null)}"
|
|
13091
|
-
@click="${(x, c) => x.clickHandler(c.event)}"
|
|
13092
|
-
@focusin="${(x, c) => x.focusinHandler(c.event)}"
|
|
13093
|
-
@focusout="${(x, c) => x.focusoutHandler(c.event)}"
|
|
13094
|
-
@keydown="${(x, c) => x.keydownHandler(c.event)}"
|
|
13095
|
-
@mousedown="${(x, c) => x.mousedownHandler(c.event)}"
|
|
13096
|
-
>
|
|
13097
|
-
${when(x => x.collapsible, html `
|
|
13098
|
-
<div
|
|
13099
|
-
class="control"
|
|
13100
|
-
part="control"
|
|
13101
|
-
?disabled="${x => x.disabled}"
|
|
13102
|
-
${ref("control")}
|
|
13103
|
-
>
|
|
13104
|
-
${startSlotTemplate(context, definition)}
|
|
13105
|
-
<slot name="button-container">
|
|
13106
|
-
<div class="selected-value" part="selected-value">
|
|
13107
|
-
<slot name="selected-value">${x => x.displayValue}</slot>
|
|
13108
|
-
</div>
|
|
13109
|
-
<div aria-hidden="true" class="indicator" part="indicator">
|
|
13110
|
-
<slot name="indicator">
|
|
13111
|
-
${definition.indicator || ""}
|
|
13112
|
-
</slot>
|
|
13113
|
-
</div>
|
|
13114
|
-
</slot>
|
|
13115
|
-
${endSlotTemplate(context, definition)}
|
|
13116
|
-
</div>
|
|
13117
|
-
`)}
|
|
13118
|
-
<div
|
|
13119
|
-
class="listbox"
|
|
13120
|
-
id="${x => x.listboxId}"
|
|
13121
|
-
part="listbox"
|
|
13122
|
-
role="listbox"
|
|
13123
|
-
?disabled="${x => x.disabled}"
|
|
13124
|
-
?hidden="${x => (x.collapsible ? !x.open : false)}"
|
|
13125
|
-
${ref("listbox")}
|
|
13126
|
-
>
|
|
13127
|
-
<slot
|
|
13128
|
-
${slotted({
|
|
13129
|
-
filter: Listbox.slottedOptionFilter,
|
|
13130
|
-
flatten: true,
|
|
13131
|
-
property: "slottedOptions",
|
|
13132
|
-
})}
|
|
13133
|
-
></slot>
|
|
13134
|
-
</div>
|
|
13135
|
-
</template>
|
|
13136
|
-
`;
|
|
13137
|
-
|
|
13138
13004
|
class _Switch extends FoundationElement {
|
|
13139
13005
|
}
|
|
13140
13006
|
/**
|
|
@@ -16366,7 +16232,7 @@
|
|
|
16366
16232
|
|
|
16367
16233
|
/**
|
|
16368
16234
|
* Do not edit directly
|
|
16369
|
-
* Generated on
|
|
16235
|
+
* Generated on Tue, 23 May 2023 20:04:01 GMT
|
|
16370
16236
|
*/
|
|
16371
16237
|
const Information100DarkUi = "#a46eff";
|
|
16372
16238
|
const Information100LightUi = "#804ad9";
|
|
@@ -16737,7 +16603,7 @@
|
|
|
16737
16603
|
return `${prefix}${uniqueIdCounter++}`;
|
|
16738
16604
|
}
|
|
16739
16605
|
|
|
16740
|
-
const template$
|
|
16606
|
+
const template$u = html `<slot></slot>`;
|
|
16741
16607
|
|
|
16742
16608
|
const styles$P = css `
|
|
16743
16609
|
:host {
|
|
@@ -16796,7 +16662,7 @@
|
|
|
16796
16662
|
const nimbleDesignSystemProvider = ThemeProvider.compose({
|
|
16797
16663
|
baseName: 'theme-provider',
|
|
16798
16664
|
styles: styles$P,
|
|
16799
|
-
template: template$
|
|
16665
|
+
template: template$u
|
|
16800
16666
|
});
|
|
16801
16667
|
DesignSystem.getOrCreate()
|
|
16802
16668
|
.withPrefix('nimble')
|
|
@@ -17063,7 +16929,7 @@
|
|
|
17063
16929
|
`;
|
|
17064
16930
|
|
|
17065
16931
|
// prettier-ignore
|
|
17066
|
-
const template$
|
|
16932
|
+
const template$t = (context, definition) => html `
|
|
17067
16933
|
<a
|
|
17068
16934
|
class="control"
|
|
17069
16935
|
part="control"
|
|
@@ -17137,7 +17003,7 @@
|
|
|
17137
17003
|
const nimbleAnchor = Anchor.compose({
|
|
17138
17004
|
baseName: 'anchor',
|
|
17139
17005
|
baseClass: Anchor$1,
|
|
17140
|
-
template: template$
|
|
17006
|
+
template: template$t,
|
|
17141
17007
|
styles: styles$O,
|
|
17142
17008
|
shadowOptions: {
|
|
17143
17009
|
delegatesFocus: true
|
|
@@ -17514,7 +17380,7 @@
|
|
|
17514
17380
|
}
|
|
17515
17381
|
`;
|
|
17516
17382
|
|
|
17517
|
-
const template$
|
|
17383
|
+
const template$s = (context, definition) => html `
|
|
17518
17384
|
<a
|
|
17519
17385
|
class="control"
|
|
17520
17386
|
part="control"
|
|
@@ -17596,7 +17462,7 @@
|
|
|
17596
17462
|
], AnchorButton.prototype, "disabled", void 0);
|
|
17597
17463
|
const nimbleAnchorButton = AnchorButton.compose({
|
|
17598
17464
|
baseName: 'anchor-button',
|
|
17599
|
-
template: template$
|
|
17465
|
+
template: template$s,
|
|
17600
17466
|
styles: styles$M,
|
|
17601
17467
|
shadowOptions: {
|
|
17602
17468
|
delegatesFocus: true
|
|
@@ -17682,7 +17548,7 @@
|
|
|
17682
17548
|
}
|
|
17683
17549
|
`;
|
|
17684
17550
|
|
|
17685
|
-
const template$
|
|
17551
|
+
const template$r = (context, definition) => html `
|
|
17686
17552
|
<template
|
|
17687
17553
|
role="menuitem"
|
|
17688
17554
|
class="${x => (typeof x.startColumnCount === 'number'
|
|
@@ -17788,7 +17654,7 @@
|
|
|
17788
17654
|
// FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
|
|
17789
17655
|
const nimbleAnchorMenuItem = AnchorMenuItem.compose({
|
|
17790
17656
|
baseName: 'anchor-menu-item',
|
|
17791
|
-
template: template$
|
|
17657
|
+
template: template$r,
|
|
17792
17658
|
styles: styles$L,
|
|
17793
17659
|
shadowOptions: {
|
|
17794
17660
|
delegatesFocus: true
|
|
@@ -17938,7 +17804,7 @@
|
|
|
17938
17804
|
}
|
|
17939
17805
|
`;
|
|
17940
17806
|
|
|
17941
|
-
const template$
|
|
17807
|
+
const template$q = (context, definition) => html `
|
|
17942
17808
|
<template slot="anchortab" role="tab" aria-disabled="${x => x.disabled}">
|
|
17943
17809
|
<a
|
|
17944
17810
|
download="${x => x.download}"
|
|
@@ -17991,7 +17857,7 @@
|
|
|
17991
17857
|
// FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
|
|
17992
17858
|
const nimbleAnchorTab = AnchorTab.compose({
|
|
17993
17859
|
baseName: 'anchor-tab',
|
|
17994
|
-
template: template$
|
|
17860
|
+
template: template$q,
|
|
17995
17861
|
styles: styles$J
|
|
17996
17862
|
});
|
|
17997
17863
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleAnchorTab());
|
|
@@ -18015,7 +17881,7 @@
|
|
|
18015
17881
|
}
|
|
18016
17882
|
`;
|
|
18017
17883
|
|
|
18018
|
-
const template$
|
|
17884
|
+
const template$p = (context, definition) => html `
|
|
18019
17885
|
${startSlotTemplate(context, definition)}
|
|
18020
17886
|
<div ${ref('tablist')} class="tablist" part="tablist" role="tablist">
|
|
18021
17887
|
<slot name="anchortab" ${slotted('tabs')}></slot>
|
|
@@ -18212,7 +18078,7 @@
|
|
|
18212
18078
|
applyMixins(AnchorTabs, StartEnd);
|
|
18213
18079
|
const nimbleAnchorTabs = AnchorTabs.compose({
|
|
18214
18080
|
baseName: 'anchor-tabs',
|
|
18215
|
-
template: template$
|
|
18081
|
+
template: template$p,
|
|
18216
18082
|
styles: styles$I,
|
|
18217
18083
|
shadowOptions: {
|
|
18218
18084
|
delegatesFocus: false
|
|
@@ -18334,7 +18200,7 @@
|
|
|
18334
18200
|
}
|
|
18335
18201
|
`;
|
|
18336
18202
|
|
|
18337
|
-
const template$
|
|
18203
|
+
const template$o = (context, definition) => html `
|
|
18338
18204
|
<template
|
|
18339
18205
|
role="treeitem"
|
|
18340
18206
|
slot="${x => (x.isNestedItem() ? 'item' : null)}"
|
|
@@ -18471,7 +18337,7 @@
|
|
|
18471
18337
|
// FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
|
|
18472
18338
|
const nimbleAnchorTreeItem = AnchorTreeItem.compose({
|
|
18473
18339
|
baseName: 'anchor-tree-item',
|
|
18474
|
-
template: template$
|
|
18340
|
+
template: template$o,
|
|
18475
18341
|
styles: styles$H,
|
|
18476
18342
|
shadowOptions: {
|
|
18477
18343
|
delegatesFocus: true
|
|
@@ -19433,7 +19299,7 @@
|
|
|
19433
19299
|
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>`
|
|
19434
19300
|
};
|
|
19435
19301
|
|
|
19436
|
-
const template$
|
|
19302
|
+
const template$n = html `
|
|
19437
19303
|
<template>
|
|
19438
19304
|
<div class="icon" :innerHTML=${x => x.icon.data}></div>
|
|
19439
19305
|
</template
|
|
@@ -19492,7 +19358,7 @@
|
|
|
19492
19358
|
const registerIcon = (baseName, iconClass) => {
|
|
19493
19359
|
const composedIcon = iconClass.compose({
|
|
19494
19360
|
baseName,
|
|
19495
|
-
template: template$
|
|
19361
|
+
template: template$n,
|
|
19496
19362
|
styles: styles$D,
|
|
19497
19363
|
baseClass: iconClass
|
|
19498
19364
|
});
|
|
@@ -19559,7 +19425,7 @@
|
|
|
19559
19425
|
};
|
|
19560
19426
|
|
|
19561
19427
|
// prettier-ignore
|
|
19562
|
-
const template$
|
|
19428
|
+
const template$m = html `
|
|
19563
19429
|
<div class="container"
|
|
19564
19430
|
role="status"
|
|
19565
19431
|
aria-atomic="${x => x.ariaAtomic}"
|
|
@@ -19678,7 +19544,7 @@
|
|
|
19678
19544
|
applyMixins(Banner, ARIAGlobalStatesAndProperties);
|
|
19679
19545
|
const nimbleBanner = Banner.compose({
|
|
19680
19546
|
baseName: 'banner',
|
|
19681
|
-
template: template$
|
|
19547
|
+
template: template$m,
|
|
19682
19548
|
styles: styles$F
|
|
19683
19549
|
});
|
|
19684
19550
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBanner());
|
|
@@ -20133,7 +19999,7 @@
|
|
|
20133
19999
|
}
|
|
20134
20000
|
`;
|
|
20135
20001
|
|
|
20136
|
-
const template$
|
|
20002
|
+
const template$l = (context, definition) => html `
|
|
20137
20003
|
<div
|
|
20138
20004
|
role="button"
|
|
20139
20005
|
part="control"
|
|
@@ -20208,7 +20074,7 @@
|
|
|
20208
20074
|
applyMixins(ToggleButton, StartEnd, DelegatesARIAButton);
|
|
20209
20075
|
const nimbleToggleButton = ToggleButton.compose({
|
|
20210
20076
|
baseName: 'toggle-button',
|
|
20211
|
-
template: template$
|
|
20077
|
+
template: template$l,
|
|
20212
20078
|
styles: styles$y,
|
|
20213
20079
|
shadowOptions: {
|
|
20214
20080
|
delegatesFocus: true
|
|
@@ -20235,6 +20101,10 @@
|
|
|
20235
20101
|
registerIcon('icon-arrow-expander-down', IconArrowExpanderDown);
|
|
20236
20102
|
const iconArrowExpanderDownTag = DesignSystem.tagFor(IconArrowExpanderDown);
|
|
20237
20103
|
|
|
20104
|
+
const DropdownPosition = {
|
|
20105
|
+
above: 'above',
|
|
20106
|
+
below: 'below'
|
|
20107
|
+
};
|
|
20238
20108
|
const DropdownAppearance = {
|
|
20239
20109
|
underline: 'underline',
|
|
20240
20110
|
outline: 'outline',
|
|
@@ -20345,19 +20215,19 @@
|
|
|
20345
20215
|
border-bottom-color: ${failColor};
|
|
20346
20216
|
}
|
|
20347
20217
|
|
|
20218
|
+
.anchored-region[hidden] {
|
|
20219
|
+
visibility: hidden;
|
|
20220
|
+
}
|
|
20221
|
+
|
|
20348
20222
|
.listbox {
|
|
20349
20223
|
box-sizing: border-box;
|
|
20350
20224
|
display: inline-flex;
|
|
20351
20225
|
flex-direction: column;
|
|
20352
20226
|
left: 0;
|
|
20353
20227
|
overflow-y: auto;
|
|
20354
|
-
position: absolute;
|
|
20355
20228
|
width: 100%;
|
|
20356
20229
|
--ni-private-listbox-padding: ${smallPadding};
|
|
20357
|
-
max-height: calc(
|
|
20358
|
-
var(--ni-private-select-max-height) - 2 *
|
|
20359
|
-
var(--ni-private-listbox-padding)
|
|
20360
|
-
);
|
|
20230
|
+
max-height: calc(var(--ni-private-select-max-height) - ${smallPadding});
|
|
20361
20231
|
z-index: 1;
|
|
20362
20232
|
box-shadow: ${elevation2BoxShadow};
|
|
20363
20233
|
border: 1px solid ${popupBorderColor};
|
|
@@ -20370,10 +20240,6 @@
|
|
|
20370
20240
|
padding: var(--ni-private-listbox-padding);
|
|
20371
20241
|
}
|
|
20372
20242
|
|
|
20373
|
-
.listbox[hidden] {
|
|
20374
|
-
display: none;
|
|
20375
|
-
}
|
|
20376
|
-
|
|
20377
20243
|
:host([open][position='above']) .listbox {
|
|
20378
20244
|
border-bottom-left-radius: 0;
|
|
20379
20245
|
border-bottom-right-radius: 0;
|
|
@@ -20384,12 +20250,12 @@
|
|
|
20384
20250
|
border-top-right-radius: 0;
|
|
20385
20251
|
}
|
|
20386
20252
|
|
|
20387
|
-
:host([open][position='above']) .
|
|
20388
|
-
bottom: ${
|
|
20253
|
+
:host([open][position='above']) .anchored-region {
|
|
20254
|
+
padding-bottom: ${smallPadding};
|
|
20389
20255
|
}
|
|
20390
20256
|
|
|
20391
|
-
:host([open][position='below']) .
|
|
20392
|
-
top:
|
|
20257
|
+
:host([open][position='below']) .anchored-region {
|
|
20258
|
+
padding-top: ${smallPadding};
|
|
20393
20259
|
}
|
|
20394
20260
|
|
|
20395
20261
|
.selected-value {
|
|
@@ -20426,16 +20292,6 @@
|
|
|
20426
20292
|
fill: ${bodyDisabledFontColor};
|
|
20427
20293
|
}
|
|
20428
20294
|
|
|
20429
|
-
slot[name='listbox'] {
|
|
20430
|
-
display: none;
|
|
20431
|
-
width: 100%;
|
|
20432
|
-
}
|
|
20433
|
-
|
|
20434
|
-
:host([open]) slot[name='listbox'] {
|
|
20435
|
-
display: flex;
|
|
20436
|
-
position: absolute;
|
|
20437
|
-
}
|
|
20438
|
-
|
|
20439
20295
|
.end {
|
|
20440
20296
|
margin-inline-start: auto;
|
|
20441
20297
|
}
|
|
@@ -20593,6 +20449,78 @@
|
|
|
20593
20449
|
}
|
|
20594
20450
|
`));
|
|
20595
20451
|
|
|
20452
|
+
// prettier-ignore
|
|
20453
|
+
const template$k = (context, definition) => html `
|
|
20454
|
+
<template
|
|
20455
|
+
aria-disabled="${x => x.ariaDisabled}"
|
|
20456
|
+
autocomplete="${x => x.autocomplete}"
|
|
20457
|
+
class="${x => (x.open ? 'open' : '')} ${x => (x.disabled ? 'disabled' : '')} ${x => x.position}"
|
|
20458
|
+
?open="${x => x.open}"
|
|
20459
|
+
tabindex="${x => (!x.disabled ? '0' : null)}"
|
|
20460
|
+
@click="${(x, c) => x.clickHandler(c.event)}"
|
|
20461
|
+
@focusout="${(x, c) => x.focusoutHandler(c.event)}"
|
|
20462
|
+
@keydown="${(x, c) => x.keydownHandler(c.event)}"
|
|
20463
|
+
>
|
|
20464
|
+
<div class="control" part="control" ${ref('controlWrapper')}>
|
|
20465
|
+
${startSlotTemplate(context, definition)}
|
|
20466
|
+
<slot name="control">
|
|
20467
|
+
<input
|
|
20468
|
+
aria-activedescendant="${x => (x.open ? x.ariaActiveDescendant : null)}"
|
|
20469
|
+
aria-autocomplete="${x => x.ariaAutoComplete}"
|
|
20470
|
+
aria-controls="${x => x.ariaControls}"
|
|
20471
|
+
aria-disabled="${x => x.ariaDisabled}"
|
|
20472
|
+
aria-expanded="${x => x.ariaExpanded}"
|
|
20473
|
+
aria-haspopup="listbox"
|
|
20474
|
+
class="selected-value"
|
|
20475
|
+
part="selected-value"
|
|
20476
|
+
placeholder="${x => x.placeholder}"
|
|
20477
|
+
role="combobox"
|
|
20478
|
+
type="text"
|
|
20479
|
+
?disabled="${x => x.disabled}"
|
|
20480
|
+
:value="${x => x.value}"
|
|
20481
|
+
@input="${(x, c) => x.inputHandler(c.event)}"
|
|
20482
|
+
@keyup="${(x, c) => x.keyupHandler(c.event)}"
|
|
20483
|
+
${ref('control')}
|
|
20484
|
+
/>
|
|
20485
|
+
<div class="indicator" part="indicator" aria-hidden="true">
|
|
20486
|
+
<slot name="indicator">
|
|
20487
|
+
${definition.indicator || ''}
|
|
20488
|
+
</slot>
|
|
20489
|
+
</div>
|
|
20490
|
+
</slot>
|
|
20491
|
+
${endSlotTemplate(context, definition)}
|
|
20492
|
+
</div>
|
|
20493
|
+
<${anchoredRegionTag}
|
|
20494
|
+
${ref('region')}
|
|
20495
|
+
class="anchored-region"
|
|
20496
|
+
fixed-placement
|
|
20497
|
+
auto-update-mode="auto"
|
|
20498
|
+
vertical-default-position="${x => (x.positionAttribute === DropdownPosition.above ? 'top' : 'bottom')}"
|
|
20499
|
+
vertical-positioning-mode="${x => (!x.positionAttribute ? 'dynamic' : 'locktodefault')}"
|
|
20500
|
+
horizontal-default-position="center"
|
|
20501
|
+
horizontal-positioning-mode="locktodefault"
|
|
20502
|
+
horizontal-scaling="anchor"
|
|
20503
|
+
?hidden="${x => !x.open}">
|
|
20504
|
+
<div
|
|
20505
|
+
class="listbox"
|
|
20506
|
+
id="${x => x.listboxId}"
|
|
20507
|
+
part="listbox"
|
|
20508
|
+
role="listbox"
|
|
20509
|
+
?disabled="${x => x.disabled}"
|
|
20510
|
+
${ref('listbox')}
|
|
20511
|
+
>
|
|
20512
|
+
<slot
|
|
20513
|
+
${slotted({
|
|
20514
|
+
filter: (n) => n instanceof HTMLElement && Listbox.slottedOptionFilter(n),
|
|
20515
|
+
flatten: true,
|
|
20516
|
+
property: 'slottedOptions',
|
|
20517
|
+
})}
|
|
20518
|
+
></slot>
|
|
20519
|
+
</div>
|
|
20520
|
+
</${anchoredRegionTag}>
|
|
20521
|
+
</template>
|
|
20522
|
+
`;
|
|
20523
|
+
|
|
20596
20524
|
/**
|
|
20597
20525
|
* A nimble-styed HTML combobox
|
|
20598
20526
|
*/
|
|
@@ -20701,10 +20629,28 @@
|
|
|
20701
20629
|
this.dropdownButton.checked = this.open;
|
|
20702
20630
|
}
|
|
20703
20631
|
}
|
|
20632
|
+
regionChanged(_prev, _next) {
|
|
20633
|
+
if (this.region && this.controlWrapper) {
|
|
20634
|
+
this.region.anchorElement = this.controlWrapper;
|
|
20635
|
+
}
|
|
20636
|
+
}
|
|
20637
|
+
controlWrapperChanged(_prev, _next) {
|
|
20638
|
+
if (this.region && this.controlWrapper) {
|
|
20639
|
+
this.region.anchorElement = this.controlWrapper;
|
|
20640
|
+
}
|
|
20641
|
+
}
|
|
20704
20642
|
// Workaround for https://github.com/microsoft/fast/issues/6041.
|
|
20705
20643
|
ariaLabelChanged(_oldValue, _newValue) {
|
|
20706
20644
|
this.updateInputAriaLabel();
|
|
20707
20645
|
}
|
|
20646
|
+
maxHeightChanged() {
|
|
20647
|
+
this.updateListboxMaxHeightCssVariable();
|
|
20648
|
+
}
|
|
20649
|
+
updateListboxMaxHeightCssVariable() {
|
|
20650
|
+
if (this.listbox) {
|
|
20651
|
+
this.listbox.style.setProperty('--ni-private-select-max-height', `${this.maxHeight}px`);
|
|
20652
|
+
}
|
|
20653
|
+
}
|
|
20708
20654
|
updateInputAriaLabel() {
|
|
20709
20655
|
const inputElement = this.shadowRoot?.querySelector('.selected-value');
|
|
20710
20656
|
if (this.ariaLabel) {
|
|
@@ -20745,10 +20691,16 @@
|
|
|
20745
20691
|
__decorate$1([
|
|
20746
20692
|
attr({ attribute: 'error-visible', mode: 'boolean' })
|
|
20747
20693
|
], Combobox.prototype, "errorVisible", void 0);
|
|
20694
|
+
__decorate$1([
|
|
20695
|
+
observable
|
|
20696
|
+
], Combobox.prototype, "region", void 0);
|
|
20697
|
+
__decorate$1([
|
|
20698
|
+
observable
|
|
20699
|
+
], Combobox.prototype, "controlWrapper", void 0);
|
|
20748
20700
|
const nimbleCombobox = Combobox.compose({
|
|
20749
20701
|
baseName: 'combobox',
|
|
20750
20702
|
baseClass: Combobox$1,
|
|
20751
|
-
template:
|
|
20703
|
+
template: template$k,
|
|
20752
20704
|
styles: styles$v,
|
|
20753
20705
|
shadowOptions: {
|
|
20754
20706
|
delegatesFocus: true
|
|
@@ -20910,7 +20862,7 @@
|
|
|
20910
20862
|
}
|
|
20911
20863
|
`));
|
|
20912
20864
|
|
|
20913
|
-
const template$
|
|
20865
|
+
const template$j = html `
|
|
20914
20866
|
<template>
|
|
20915
20867
|
<dialog
|
|
20916
20868
|
${ref('dialogElement')}
|
|
@@ -21036,7 +20988,7 @@
|
|
|
21036
20988
|
applyMixins(Dialog, ARIAGlobalStatesAndProperties);
|
|
21037
20989
|
const nimbleDialog = Dialog.compose({
|
|
21038
20990
|
baseName: 'dialog',
|
|
21039
|
-
template: template$
|
|
20991
|
+
template: template$j,
|
|
21040
20992
|
styles: styles$u,
|
|
21041
20993
|
baseClass: Dialog
|
|
21042
20994
|
});
|
|
@@ -21196,7 +21148,7 @@
|
|
|
21196
21148
|
}
|
|
21197
21149
|
`));
|
|
21198
21150
|
|
|
21199
|
-
const template$
|
|
21151
|
+
const template$i = html `
|
|
21200
21152
|
<dialog
|
|
21201
21153
|
${ref('dialog')}
|
|
21202
21154
|
aria-label="${x => x.ariaLabel}"
|
|
@@ -21310,7 +21262,7 @@
|
|
|
21310
21262
|
applyMixins(Drawer, ARIAGlobalStatesAndProperties);
|
|
21311
21263
|
const nimbleDrawer = Drawer.compose({
|
|
21312
21264
|
baseName: 'drawer',
|
|
21313
|
-
template: template$
|
|
21265
|
+
template: template$i,
|
|
21314
21266
|
styles: styles$t
|
|
21315
21267
|
});
|
|
21316
21268
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDrawer());
|
|
@@ -23328,7 +23280,7 @@
|
|
|
23328
23280
|
`;
|
|
23329
23281
|
|
|
23330
23282
|
// prettier-ignore
|
|
23331
|
-
const template$
|
|
23283
|
+
const template$h = html `
|
|
23332
23284
|
<template
|
|
23333
23285
|
?open="${x => x.open}"
|
|
23334
23286
|
@focusout="${(x, c) => x.focusoutHandler(c.event)}"
|
|
@@ -23583,7 +23535,7 @@
|
|
|
23583
23535
|
], MenuButton.prototype, "slottedMenus", void 0);
|
|
23584
23536
|
const nimbleMenuButton = MenuButton.compose({
|
|
23585
23537
|
baseName: 'menu-button',
|
|
23586
|
-
template: template$
|
|
23538
|
+
template: template$h,
|
|
23587
23539
|
styles: styles$q,
|
|
23588
23540
|
shadowOptions: {
|
|
23589
23541
|
delegatesFocus: true
|
|
@@ -24142,6 +24094,84 @@
|
|
|
24142
24094
|
}
|
|
24143
24095
|
`));
|
|
24144
24096
|
|
|
24097
|
+
// prettier-ignore
|
|
24098
|
+
const template$g = (context, definition) => html `
|
|
24099
|
+
<template
|
|
24100
|
+
class="${x => [
|
|
24101
|
+
x.collapsible && 'collapsible',
|
|
24102
|
+
x.collapsible && x.open && 'open',
|
|
24103
|
+
x.disabled && 'disabled',
|
|
24104
|
+
x.collapsible && x.position,
|
|
24105
|
+
]
|
|
24106
|
+
.filter(Boolean)
|
|
24107
|
+
.join(' ')}"
|
|
24108
|
+
aria-activedescendant="${x => x.ariaActiveDescendant}"
|
|
24109
|
+
aria-controls="${x => x.ariaControls}"
|
|
24110
|
+
aria-disabled="${x => x.ariaDisabled}"
|
|
24111
|
+
aria-expanded="${x => x.ariaExpanded}"
|
|
24112
|
+
aria-haspopup="${x => (x.collapsible ? 'listbox' : null)}"
|
|
24113
|
+
aria-multiselectable="${x => x.ariaMultiSelectable}"
|
|
24114
|
+
?open="${x => x.open}"
|
|
24115
|
+
role="combobox"
|
|
24116
|
+
tabindex="${x => (!x.disabled ? '0' : null)}"
|
|
24117
|
+
@click="${(x, c) => x.clickHandler(c.event)}"
|
|
24118
|
+
@focusin="${(x, c) => x.focusinHandler(c.event)}"
|
|
24119
|
+
@focusout="${(x, c) => x.focusoutHandler(c.event)}"
|
|
24120
|
+
@keydown="${(x, c) => x.keydownHandler(c.event)}"
|
|
24121
|
+
@mousedown="${(x, c) => x.mousedownHandler(c.event)}"
|
|
24122
|
+
>
|
|
24123
|
+
${when(x => x.collapsible, html `
|
|
24124
|
+
<div
|
|
24125
|
+
class="control"
|
|
24126
|
+
part="control"
|
|
24127
|
+
?disabled="${x => x.disabled}"
|
|
24128
|
+
${ref('control')}
|
|
24129
|
+
>
|
|
24130
|
+
${startSlotTemplate(context, definition)}
|
|
24131
|
+
<slot name="button-container">
|
|
24132
|
+
<div class="selected-value" part="selected-value">
|
|
24133
|
+
<slot name="selected-value">${x => x.displayValue}</slot>
|
|
24134
|
+
</div>
|
|
24135
|
+
<div aria-hidden="true" class="indicator" part="indicator">
|
|
24136
|
+
<slot name="indicator">
|
|
24137
|
+
${definition.indicator || ''}
|
|
24138
|
+
</slot>
|
|
24139
|
+
</div>
|
|
24140
|
+
</slot>
|
|
24141
|
+
${endSlotTemplate(context, definition)}
|
|
24142
|
+
</div>
|
|
24143
|
+
`)}
|
|
24144
|
+
<${anchoredRegionTag}
|
|
24145
|
+
${ref('region')}
|
|
24146
|
+
class="anchored-region"
|
|
24147
|
+
fixed-placement
|
|
24148
|
+
auto-update-mode="auto"
|
|
24149
|
+
vertical-default-position="${x => (x.positionAttribute === DropdownPosition.above ? 'top' : 'bottom')}"
|
|
24150
|
+
vertical-positioning-mode="${x => (!x.positionAttribute ? 'dynamic' : 'locktodefault')}"
|
|
24151
|
+
horizontal-default-position="center"
|
|
24152
|
+
horizontal-positioning-mode="locktodefault"
|
|
24153
|
+
horizontal-scaling="anchor"
|
|
24154
|
+
?hidden="${x => (x.collapsible ? !x.open : false)}">
|
|
24155
|
+
<div
|
|
24156
|
+
class="listbox"
|
|
24157
|
+
id="${x => x.listboxId}"
|
|
24158
|
+
part="listbox"
|
|
24159
|
+
role="listbox"
|
|
24160
|
+
?disabled="${x => x.disabled}"
|
|
24161
|
+
${ref('listbox')}
|
|
24162
|
+
>
|
|
24163
|
+
<slot
|
|
24164
|
+
${slotted({
|
|
24165
|
+
filter: (n) => n instanceof HTMLElement && Listbox.slottedOptionFilter(n),
|
|
24166
|
+
flatten: true,
|
|
24167
|
+
property: 'slottedOptions',
|
|
24168
|
+
})}
|
|
24169
|
+
></slot>
|
|
24170
|
+
</div>
|
|
24171
|
+
</${anchoredRegionTag}>
|
|
24172
|
+
</template>
|
|
24173
|
+
`;
|
|
24174
|
+
|
|
24145
24175
|
/**
|
|
24146
24176
|
* A nimble-styled HTML select
|
|
24147
24177
|
*/
|
|
@@ -24169,6 +24199,16 @@
|
|
|
24169
24199
|
this.value = value;
|
|
24170
24200
|
}
|
|
24171
24201
|
}
|
|
24202
|
+
regionChanged(_prev, _next) {
|
|
24203
|
+
if (this.region && this.control) {
|
|
24204
|
+
this.region.anchorElement = this.control;
|
|
24205
|
+
}
|
|
24206
|
+
}
|
|
24207
|
+
controlChanged(_prev, _next) {
|
|
24208
|
+
if (this.region && this.control) {
|
|
24209
|
+
this.region.anchorElement = this.control;
|
|
24210
|
+
}
|
|
24211
|
+
}
|
|
24172
24212
|
maxHeightChanged() {
|
|
24173
24213
|
this.updateListboxMaxHeightCssVariable();
|
|
24174
24214
|
}
|
|
@@ -24187,10 +24227,13 @@
|
|
|
24187
24227
|
__decorate$1([
|
|
24188
24228
|
attr({ attribute: 'error-visible', mode: 'boolean' })
|
|
24189
24229
|
], Select.prototype, "errorVisible", void 0);
|
|
24230
|
+
__decorate$1([
|
|
24231
|
+
observable
|
|
24232
|
+
], Select.prototype, "region", void 0);
|
|
24190
24233
|
const nimbleSelect = Select.compose({
|
|
24191
24234
|
baseName: 'select',
|
|
24192
24235
|
baseClass: Select$1,
|
|
24193
|
-
template:
|
|
24236
|
+
template: template$g,
|
|
24194
24237
|
styles: styles$l,
|
|
24195
24238
|
indicator: arrowExpanderDown16X16.data,
|
|
24196
24239
|
end: html `
|
|
@@ -28038,10 +28081,16 @@
|
|
|
28038
28081
|
* the resolved value of the fractionalWidth after updates programmatic or interactive updates.
|
|
28039
28082
|
*/
|
|
28040
28083
|
this.currentFractionalWidth = defaultFractionalWidth;
|
|
28084
|
+
/**
|
|
28085
|
+
* @internal Do not write to this value directly. It is used by the Table in order to store
|
|
28086
|
+
* the resolved value of the sortDirection after programmatic or interactive updates.
|
|
28087
|
+
*/
|
|
28088
|
+
this.currentSortDirection = TableColumnSortDirection.none;
|
|
28041
28089
|
this.cellRecordFieldNames = options.cellRecordFieldNames;
|
|
28042
28090
|
this.cellViewTemplate = createCellViewTemplate(options.cellViewTag);
|
|
28043
28091
|
this.groupHeaderViewTemplate = createGroupHeaderViewTemplate(options.groupHeaderViewTag);
|
|
28044
28092
|
this.delegatedEvents = options.delegatedEvents;
|
|
28093
|
+
this.sortOperation = options.sortOperation ?? TableColumnSortOperation.basic;
|
|
28045
28094
|
}
|
|
28046
28095
|
fractionalWidthChanged() {
|
|
28047
28096
|
this.currentFractionalWidth = this.fractionalWidth;
|
|
@@ -28097,17 +28146,17 @@
|
|
|
28097
28146
|
* The base class for table columns
|
|
28098
28147
|
*/
|
|
28099
28148
|
class TableColumn extends FoundationElement {
|
|
28100
|
-
constructor(
|
|
28101
|
-
super();
|
|
28149
|
+
constructor() {
|
|
28150
|
+
super(...arguments);
|
|
28151
|
+
/**
|
|
28152
|
+
* @internal
|
|
28153
|
+
*
|
|
28154
|
+
* Column properties configurable by plugin authors
|
|
28155
|
+
*/
|
|
28156
|
+
this.columnInternals = new ColumnInternals(this.getColumnInternalsOptions());
|
|
28102
28157
|
this.columnHidden = false;
|
|
28103
28158
|
this.sortDirection = TableColumnSortDirection.none;
|
|
28104
28159
|
this.sortingDisabled = false;
|
|
28105
|
-
if (!options) {
|
|
28106
|
-
throw new Error('ColumnInternalsOptions must be provided to constructor');
|
|
28107
|
-
}
|
|
28108
|
-
this.columnInternals = new ColumnInternals(options);
|
|
28109
|
-
this.columnInternals.currentSortDirection = this.sortDirection;
|
|
28110
|
-
this.columnInternals.currentSortIndex = this.sortIndex;
|
|
28111
28160
|
}
|
|
28112
28161
|
checkValidity() {
|
|
28113
28162
|
return this.columnInternals.validConfiguration;
|
|
@@ -28126,16 +28175,13 @@
|
|
|
28126
28175
|
}
|
|
28127
28176
|
}
|
|
28128
28177
|
sortingDisabledChanged() {
|
|
28129
|
-
|
|
28130
|
-
|
|
28131
|
-
|
|
28132
|
-
|
|
28133
|
-
|
|
28134
|
-
|
|
28135
|
-
|
|
28136
|
-
this.columnInternals.currentSortDirection = this.sortDirection;
|
|
28137
|
-
this.columnInternals.currentSortIndex = this.sortIndex;
|
|
28138
|
-
}
|
|
28178
|
+
if (this.sortingDisabled) {
|
|
28179
|
+
this.columnInternals.currentSortDirection = TableColumnSortDirection.none;
|
|
28180
|
+
this.columnInternals.currentSortIndex = undefined;
|
|
28181
|
+
}
|
|
28182
|
+
else {
|
|
28183
|
+
this.columnInternals.currentSortDirection = this.sortDirection;
|
|
28184
|
+
this.columnInternals.currentSortIndex = this.sortIndex;
|
|
28139
28185
|
}
|
|
28140
28186
|
}
|
|
28141
28187
|
}
|
|
@@ -31429,14 +31475,17 @@
|
|
|
31429
31475
|
*/
|
|
31430
31476
|
class TableColumnAnchor extends mixinGroupableColumnAPI(mixinFractionalWidthColumnAPI((TableColumn))) {
|
|
31431
31477
|
constructor() {
|
|
31432
|
-
super(
|
|
31478
|
+
super(...arguments);
|
|
31479
|
+
this.underlineHidden = false;
|
|
31480
|
+
}
|
|
31481
|
+
getColumnInternalsOptions() {
|
|
31482
|
+
return {
|
|
31433
31483
|
cellRecordFieldNames: ['label', 'href'],
|
|
31434
31484
|
cellViewTag: tableColumnAnchorCellViewTag,
|
|
31435
31485
|
groupHeaderViewTag: tableColumnTextGroupHeaderTag,
|
|
31436
|
-
delegatedEvents: ['click']
|
|
31437
|
-
|
|
31438
|
-
|
|
31439
|
-
this.columnInternals.sortOperation = TableColumnSortOperation.localeAwareCaseSensitive;
|
|
31486
|
+
delegatedEvents: ['click'],
|
|
31487
|
+
sortOperation: TableColumnSortOperation.localeAwareCaseSensitive
|
|
31488
|
+
};
|
|
31440
31489
|
}
|
|
31441
31490
|
labelFieldNameChanged() {
|
|
31442
31491
|
this.columnInternals.dataRecordFieldNames = [
|
|
@@ -31639,14 +31688,14 @@
|
|
|
31639
31688
|
* The table column for displaying string fields as text.
|
|
31640
31689
|
*/
|
|
31641
31690
|
class TableColumnText extends TableColumnTextBase {
|
|
31642
|
-
|
|
31643
|
-
|
|
31691
|
+
getColumnInternalsOptions() {
|
|
31692
|
+
return {
|
|
31644
31693
|
cellRecordFieldNames: ['value'],
|
|
31645
31694
|
cellViewTag: tableColumnTextCellViewTag,
|
|
31646
31695
|
groupHeaderViewTag: tableColumnTextGroupHeaderTag,
|
|
31647
|
-
delegatedEvents: []
|
|
31648
|
-
|
|
31649
|
-
|
|
31696
|
+
delegatedEvents: [],
|
|
31697
|
+
sortOperation: TableColumnSortOperation.localeAwareCaseSensitive
|
|
31698
|
+
};
|
|
31650
31699
|
}
|
|
31651
31700
|
}
|
|
31652
31701
|
const nimbleTableColumnText = TableColumnText.compose({
|