@ni/nimble-components 19.1.1 → 19.1.3
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 +249 -187
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +901 -893
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/combobox/index.d.ts +15 -0
- package/dist/esm/combobox/index.js +46 -2
- 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/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 Thu, 01 Jun 2023 14:26:24 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
|
*/
|
|
@@ -20603,6 +20531,25 @@
|
|
|
20603
20531
|
this.errorVisible = false;
|
|
20604
20532
|
this.valueUpdatedByInput = false;
|
|
20605
20533
|
}
|
|
20534
|
+
get value() {
|
|
20535
|
+
return super.value;
|
|
20536
|
+
}
|
|
20537
|
+
// This override is to work around an issue in FAST where an old filter value
|
|
20538
|
+
// is used after programmatically setting the value property.
|
|
20539
|
+
// See: https://github.com/microsoft/fast/issues/6749
|
|
20540
|
+
set value(next) {
|
|
20541
|
+
super.value = next;
|
|
20542
|
+
if (!this.valueUpdatedByInput) {
|
|
20543
|
+
// Workaround using index notation to manipulate private member
|
|
20544
|
+
// Can remove when following resolved: https://github.com/microsoft/fast/issues/6749
|
|
20545
|
+
// eslint-disable-next-line @typescript-eslint/dot-notation
|
|
20546
|
+
this['filter'] = '';
|
|
20547
|
+
this.filterOptions();
|
|
20548
|
+
this.selectedIndex = this.options
|
|
20549
|
+
.map(option => option.text)
|
|
20550
|
+
.indexOf(this.value);
|
|
20551
|
+
}
|
|
20552
|
+
}
|
|
20606
20553
|
// Workaround for https://github.com/microsoft/fast/issues/5123
|
|
20607
20554
|
setPositioning() {
|
|
20608
20555
|
if (!this.$fastController.isConnected) {
|
|
@@ -20663,8 +20610,8 @@
|
|
|
20663
20610
|
if (!this.valueUpdatedByInput) {
|
|
20664
20611
|
this.valueBeforeTextUpdate = this.value;
|
|
20665
20612
|
}
|
|
20666
|
-
this.value = this.control.value;
|
|
20667
20613
|
this.valueUpdatedByInput = true;
|
|
20614
|
+
this.value = this.control.value;
|
|
20668
20615
|
return returnValue;
|
|
20669
20616
|
}
|
|
20670
20617
|
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
@@ -20701,10 +20648,28 @@
|
|
|
20701
20648
|
this.dropdownButton.checked = this.open;
|
|
20702
20649
|
}
|
|
20703
20650
|
}
|
|
20651
|
+
regionChanged(_prev, _next) {
|
|
20652
|
+
if (this.region && this.controlWrapper) {
|
|
20653
|
+
this.region.anchorElement = this.controlWrapper;
|
|
20654
|
+
}
|
|
20655
|
+
}
|
|
20656
|
+
controlWrapperChanged(_prev, _next) {
|
|
20657
|
+
if (this.region && this.controlWrapper) {
|
|
20658
|
+
this.region.anchorElement = this.controlWrapper;
|
|
20659
|
+
}
|
|
20660
|
+
}
|
|
20704
20661
|
// Workaround for https://github.com/microsoft/fast/issues/6041.
|
|
20705
20662
|
ariaLabelChanged(_oldValue, _newValue) {
|
|
20706
20663
|
this.updateInputAriaLabel();
|
|
20707
20664
|
}
|
|
20665
|
+
maxHeightChanged() {
|
|
20666
|
+
this.updateListboxMaxHeightCssVariable();
|
|
20667
|
+
}
|
|
20668
|
+
updateListboxMaxHeightCssVariable() {
|
|
20669
|
+
if (this.listbox) {
|
|
20670
|
+
this.listbox.style.setProperty('--ni-private-select-max-height', `${this.maxHeight}px`);
|
|
20671
|
+
}
|
|
20672
|
+
}
|
|
20708
20673
|
updateInputAriaLabel() {
|
|
20709
20674
|
const inputElement = this.shadowRoot?.querySelector('.selected-value');
|
|
20710
20675
|
if (this.ariaLabel) {
|
|
@@ -20745,10 +20710,16 @@
|
|
|
20745
20710
|
__decorate$1([
|
|
20746
20711
|
attr({ attribute: 'error-visible', mode: 'boolean' })
|
|
20747
20712
|
], Combobox.prototype, "errorVisible", void 0);
|
|
20713
|
+
__decorate$1([
|
|
20714
|
+
observable
|
|
20715
|
+
], Combobox.prototype, "region", void 0);
|
|
20716
|
+
__decorate$1([
|
|
20717
|
+
observable
|
|
20718
|
+
], Combobox.prototype, "controlWrapper", void 0);
|
|
20748
20719
|
const nimbleCombobox = Combobox.compose({
|
|
20749
20720
|
baseName: 'combobox',
|
|
20750
20721
|
baseClass: Combobox$1,
|
|
20751
|
-
template:
|
|
20722
|
+
template: template$k,
|
|
20752
20723
|
styles: styles$v,
|
|
20753
20724
|
shadowOptions: {
|
|
20754
20725
|
delegatesFocus: true
|
|
@@ -20910,7 +20881,7 @@
|
|
|
20910
20881
|
}
|
|
20911
20882
|
`));
|
|
20912
20883
|
|
|
20913
|
-
const template$
|
|
20884
|
+
const template$j = html `
|
|
20914
20885
|
<template>
|
|
20915
20886
|
<dialog
|
|
20916
20887
|
${ref('dialogElement')}
|
|
@@ -21036,7 +21007,7 @@
|
|
|
21036
21007
|
applyMixins(Dialog, ARIAGlobalStatesAndProperties);
|
|
21037
21008
|
const nimbleDialog = Dialog.compose({
|
|
21038
21009
|
baseName: 'dialog',
|
|
21039
|
-
template: template$
|
|
21010
|
+
template: template$j,
|
|
21040
21011
|
styles: styles$u,
|
|
21041
21012
|
baseClass: Dialog
|
|
21042
21013
|
});
|
|
@@ -21196,7 +21167,7 @@
|
|
|
21196
21167
|
}
|
|
21197
21168
|
`));
|
|
21198
21169
|
|
|
21199
|
-
const template$
|
|
21170
|
+
const template$i = html `
|
|
21200
21171
|
<dialog
|
|
21201
21172
|
${ref('dialog')}
|
|
21202
21173
|
aria-label="${x => x.ariaLabel}"
|
|
@@ -21310,7 +21281,7 @@
|
|
|
21310
21281
|
applyMixins(Drawer, ARIAGlobalStatesAndProperties);
|
|
21311
21282
|
const nimbleDrawer = Drawer.compose({
|
|
21312
21283
|
baseName: 'drawer',
|
|
21313
|
-
template: template$
|
|
21284
|
+
template: template$i,
|
|
21314
21285
|
styles: styles$t
|
|
21315
21286
|
});
|
|
21316
21287
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDrawer());
|
|
@@ -23328,7 +23299,7 @@
|
|
|
23328
23299
|
`;
|
|
23329
23300
|
|
|
23330
23301
|
// prettier-ignore
|
|
23331
|
-
const template$
|
|
23302
|
+
const template$h = html `
|
|
23332
23303
|
<template
|
|
23333
23304
|
?open="${x => x.open}"
|
|
23334
23305
|
@focusout="${(x, c) => x.focusoutHandler(c.event)}"
|
|
@@ -23583,7 +23554,7 @@
|
|
|
23583
23554
|
], MenuButton.prototype, "slottedMenus", void 0);
|
|
23584
23555
|
const nimbleMenuButton = MenuButton.compose({
|
|
23585
23556
|
baseName: 'menu-button',
|
|
23586
|
-
template: template$
|
|
23557
|
+
template: template$h,
|
|
23587
23558
|
styles: styles$q,
|
|
23588
23559
|
shadowOptions: {
|
|
23589
23560
|
delegatesFocus: true
|
|
@@ -24142,6 +24113,84 @@
|
|
|
24142
24113
|
}
|
|
24143
24114
|
`));
|
|
24144
24115
|
|
|
24116
|
+
// prettier-ignore
|
|
24117
|
+
const template$g = (context, definition) => html `
|
|
24118
|
+
<template
|
|
24119
|
+
class="${x => [
|
|
24120
|
+
x.collapsible && 'collapsible',
|
|
24121
|
+
x.collapsible && x.open && 'open',
|
|
24122
|
+
x.disabled && 'disabled',
|
|
24123
|
+
x.collapsible && x.position,
|
|
24124
|
+
]
|
|
24125
|
+
.filter(Boolean)
|
|
24126
|
+
.join(' ')}"
|
|
24127
|
+
aria-activedescendant="${x => x.ariaActiveDescendant}"
|
|
24128
|
+
aria-controls="${x => x.ariaControls}"
|
|
24129
|
+
aria-disabled="${x => x.ariaDisabled}"
|
|
24130
|
+
aria-expanded="${x => x.ariaExpanded}"
|
|
24131
|
+
aria-haspopup="${x => (x.collapsible ? 'listbox' : null)}"
|
|
24132
|
+
aria-multiselectable="${x => x.ariaMultiSelectable}"
|
|
24133
|
+
?open="${x => x.open}"
|
|
24134
|
+
role="combobox"
|
|
24135
|
+
tabindex="${x => (!x.disabled ? '0' : null)}"
|
|
24136
|
+
@click="${(x, c) => x.clickHandler(c.event)}"
|
|
24137
|
+
@focusin="${(x, c) => x.focusinHandler(c.event)}"
|
|
24138
|
+
@focusout="${(x, c) => x.focusoutHandler(c.event)}"
|
|
24139
|
+
@keydown="${(x, c) => x.keydownHandler(c.event)}"
|
|
24140
|
+
@mousedown="${(x, c) => x.mousedownHandler(c.event)}"
|
|
24141
|
+
>
|
|
24142
|
+
${when(x => x.collapsible, html `
|
|
24143
|
+
<div
|
|
24144
|
+
class="control"
|
|
24145
|
+
part="control"
|
|
24146
|
+
?disabled="${x => x.disabled}"
|
|
24147
|
+
${ref('control')}
|
|
24148
|
+
>
|
|
24149
|
+
${startSlotTemplate(context, definition)}
|
|
24150
|
+
<slot name="button-container">
|
|
24151
|
+
<div class="selected-value" part="selected-value">
|
|
24152
|
+
<slot name="selected-value">${x => x.displayValue}</slot>
|
|
24153
|
+
</div>
|
|
24154
|
+
<div aria-hidden="true" class="indicator" part="indicator">
|
|
24155
|
+
<slot name="indicator">
|
|
24156
|
+
${definition.indicator || ''}
|
|
24157
|
+
</slot>
|
|
24158
|
+
</div>
|
|
24159
|
+
</slot>
|
|
24160
|
+
${endSlotTemplate(context, definition)}
|
|
24161
|
+
</div>
|
|
24162
|
+
`)}
|
|
24163
|
+
<${anchoredRegionTag}
|
|
24164
|
+
${ref('region')}
|
|
24165
|
+
class="anchored-region"
|
|
24166
|
+
fixed-placement
|
|
24167
|
+
auto-update-mode="auto"
|
|
24168
|
+
vertical-default-position="${x => (x.positionAttribute === DropdownPosition.above ? 'top' : 'bottom')}"
|
|
24169
|
+
vertical-positioning-mode="${x => (!x.positionAttribute ? 'dynamic' : 'locktodefault')}"
|
|
24170
|
+
horizontal-default-position="center"
|
|
24171
|
+
horizontal-positioning-mode="locktodefault"
|
|
24172
|
+
horizontal-scaling="anchor"
|
|
24173
|
+
?hidden="${x => (x.collapsible ? !x.open : false)}">
|
|
24174
|
+
<div
|
|
24175
|
+
class="listbox"
|
|
24176
|
+
id="${x => x.listboxId}"
|
|
24177
|
+
part="listbox"
|
|
24178
|
+
role="listbox"
|
|
24179
|
+
?disabled="${x => x.disabled}"
|
|
24180
|
+
${ref('listbox')}
|
|
24181
|
+
>
|
|
24182
|
+
<slot
|
|
24183
|
+
${slotted({
|
|
24184
|
+
filter: (n) => n instanceof HTMLElement && Listbox.slottedOptionFilter(n),
|
|
24185
|
+
flatten: true,
|
|
24186
|
+
property: 'slottedOptions',
|
|
24187
|
+
})}
|
|
24188
|
+
></slot>
|
|
24189
|
+
</div>
|
|
24190
|
+
</${anchoredRegionTag}>
|
|
24191
|
+
</template>
|
|
24192
|
+
`;
|
|
24193
|
+
|
|
24145
24194
|
/**
|
|
24146
24195
|
* A nimble-styled HTML select
|
|
24147
24196
|
*/
|
|
@@ -24169,6 +24218,16 @@
|
|
|
24169
24218
|
this.value = value;
|
|
24170
24219
|
}
|
|
24171
24220
|
}
|
|
24221
|
+
regionChanged(_prev, _next) {
|
|
24222
|
+
if (this.region && this.control) {
|
|
24223
|
+
this.region.anchorElement = this.control;
|
|
24224
|
+
}
|
|
24225
|
+
}
|
|
24226
|
+
controlChanged(_prev, _next) {
|
|
24227
|
+
if (this.region && this.control) {
|
|
24228
|
+
this.region.anchorElement = this.control;
|
|
24229
|
+
}
|
|
24230
|
+
}
|
|
24172
24231
|
maxHeightChanged() {
|
|
24173
24232
|
this.updateListboxMaxHeightCssVariable();
|
|
24174
24233
|
}
|
|
@@ -24187,10 +24246,13 @@
|
|
|
24187
24246
|
__decorate$1([
|
|
24188
24247
|
attr({ attribute: 'error-visible', mode: 'boolean' })
|
|
24189
24248
|
], Select.prototype, "errorVisible", void 0);
|
|
24249
|
+
__decorate$1([
|
|
24250
|
+
observable
|
|
24251
|
+
], Select.prototype, "region", void 0);
|
|
24190
24252
|
const nimbleSelect = Select.compose({
|
|
24191
24253
|
baseName: 'select',
|
|
24192
24254
|
baseClass: Select$1,
|
|
24193
|
-
template:
|
|
24255
|
+
template: template$g,
|
|
24194
24256
|
styles: styles$l,
|
|
24195
24257
|
indicator: arrowExpanderDown16X16.data,
|
|
24196
24258
|
end: html `
|