@fluentui/web-components 3.0.0-rc.13 → 3.0.0-rc.15
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/CHANGELOG.md +21 -2
- package/custom-elements.json +48 -89
- package/dist/esm/accordion/accordion.d.ts +5 -0
- package/dist/esm/accordion/accordion.js +28 -27
- package/dist/esm/accordion/accordion.js.map +1 -1
- package/dist/esm/accordion-item/accordion-item.base.d.ts +0 -8
- package/dist/esm/accordion-item/accordion-item.base.js +3 -12
- package/dist/esm/accordion-item/accordion-item.base.js.map +1 -1
- package/dist/esm/accordion-item/accordion-item.template.js +5 -5
- package/dist/esm/accordion-item/accordion-item.template.js.map +1 -1
- package/dist/esm/drawer/drawer.js +0 -1
- package/dist/esm/drawer/drawer.js.map +1 -1
- package/dist/esm/dropdown/dropdown.base.d.ts +5 -0
- package/dist/esm/dropdown/dropdown.base.js +23 -10
- package/dist/esm/dropdown/dropdown.base.js.map +1 -1
- package/dist/esm/dropdown/dropdown.styles.js +1 -0
- package/dist/esm/dropdown/dropdown.styles.js.map +1 -1
- package/dist/esm/menu/menu.d.ts +25 -16
- package/dist/esm/menu/menu.js +61 -67
- package/dist/esm/menu/menu.js.map +1 -1
- package/dist/esm/tablist/tablist.base.js +3 -3
- package/dist/esm/tablist/tablist.base.js.map +1 -1
- package/dist/esm/utils/request-idle-callback.d.ts +15 -0
- package/dist/esm/utils/request-idle-callback.js +8 -2
- package/dist/esm/utils/request-idle-callback.js.map +1 -1
- package/dist/web-components.d.ts +35 -23
- package/dist/web-components.js +147 -112
- package/dist/web-components.min.js +117 -117
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,31 @@
|
|
|
1
1
|
# Change Log - @fluentui/web-components
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 01 May 2026 04:08:33 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [3.0.0-rc.15](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-rc.15)
|
|
8
|
+
|
|
9
|
+
Fri, 01 May 2026 04:08:33 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-rc.14..@fluentui/web-components_v3.0.0-rc.15)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- fix: remove unnecessary id property mappings in accordion-item ([PR #36060](https://github.com/microsoft/fluentui/pull/36060) by 863023+radium-v@users.noreply.github.com)
|
|
15
|
+
- fix: remove errant preventDefault causing element interactions to be blocked inside drawer ([PR #36032](https://github.com/microsoft/fluentui/pull/36032) by 13071055+chrisdholt@users.noreply.github.com)
|
|
16
|
+
|
|
17
|
+
## [3.0.0-rc.14](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-rc.14)
|
|
18
|
+
|
|
19
|
+
Wed, 29 Apr 2026 19:07:13 GMT
|
|
20
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-rc.13..@fluentui/web-components_v3.0.0-rc.14)
|
|
21
|
+
|
|
22
|
+
### Changes
|
|
23
|
+
|
|
24
|
+
- fix: improve SSR compatibility and component lifecycle management for Menu, Accordion, Dropdown, Tablist, and waitForConnectedDescendants ([PR #36018](https://github.com/microsoft/fluentui/pull/36018) by 863023+radium-v@users.noreply.github.com)
|
|
25
|
+
|
|
7
26
|
## [3.0.0-rc.13](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-rc.13)
|
|
8
27
|
|
|
9
|
-
Thu, 09 Apr 2026 04:07:
|
|
28
|
+
Thu, 09 Apr 2026 04:07:27 GMT
|
|
10
29
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-rc.12..@fluentui/web-components_v3.0.0-rc.13)
|
|
11
30
|
|
|
12
31
|
### Changes
|
package/custom-elements.json
CHANGED
|
@@ -995,50 +995,6 @@
|
|
|
995
995
|
"declarations": [],
|
|
996
996
|
"exports": []
|
|
997
997
|
},
|
|
998
|
-
{
|
|
999
|
-
"kind": "javascript-module",
|
|
1000
|
-
"path": "src/utils/element-internals.ts",
|
|
1001
|
-
"declarations": [
|
|
1002
|
-
{
|
|
1003
|
-
"kind": "function",
|
|
1004
|
-
"name": "stateSelector",
|
|
1005
|
-
"return": {
|
|
1006
|
-
"type": {
|
|
1007
|
-
"text": ""
|
|
1008
|
-
}
|
|
1009
|
-
},
|
|
1010
|
-
"parameters": [
|
|
1011
|
-
{
|
|
1012
|
-
"name": "state",
|
|
1013
|
-
"type": {
|
|
1014
|
-
"text": "S"
|
|
1015
|
-
},
|
|
1016
|
-
"description": "the state value."
|
|
1017
|
-
}
|
|
1018
|
-
],
|
|
1019
|
-
"description": "Returns a string that represents a CSS custom state selector.",
|
|
1020
|
-
"privacy": "public"
|
|
1021
|
-
}
|
|
1022
|
-
],
|
|
1023
|
-
"exports": [
|
|
1024
|
-
{
|
|
1025
|
-
"kind": "js",
|
|
1026
|
-
"name": "CustomStatesSetSupported",
|
|
1027
|
-
"declaration": {
|
|
1028
|
-
"name": "CustomStatesSetSupported",
|
|
1029
|
-
"module": "src/utils/element-internals.ts"
|
|
1030
|
-
}
|
|
1031
|
-
},
|
|
1032
|
-
{
|
|
1033
|
-
"kind": "js",
|
|
1034
|
-
"name": "stateSelector",
|
|
1035
|
-
"declaration": {
|
|
1036
|
-
"name": "stateSelector",
|
|
1037
|
-
"module": "src/utils/element-internals.ts"
|
|
1038
|
-
}
|
|
1039
|
-
}
|
|
1040
|
-
]
|
|
1041
|
-
},
|
|
1042
998
|
{
|
|
1043
999
|
"kind": "javascript-module",
|
|
1044
1000
|
"path": "./dist/esm/accordion-item/accordion-item.base.js",
|
|
@@ -1113,15 +1069,6 @@
|
|
|
1113
1069
|
"privacy": "public",
|
|
1114
1070
|
"default": "false",
|
|
1115
1071
|
"description": "Disables an accordion item"
|
|
1116
|
-
},
|
|
1117
|
-
{
|
|
1118
|
-
"kind": "field",
|
|
1119
|
-
"name": "id",
|
|
1120
|
-
"type": {
|
|
1121
|
-
"text": "string"
|
|
1122
|
-
},
|
|
1123
|
-
"privacy": "public",
|
|
1124
|
-
"description": "The item ID"
|
|
1125
1072
|
}
|
|
1126
1073
|
],
|
|
1127
1074
|
"attributes": [
|
|
@@ -1151,14 +1098,6 @@
|
|
|
1151
1098
|
"default": "false",
|
|
1152
1099
|
"description": "Disables an accordion item",
|
|
1153
1100
|
"fieldName": "disabled"
|
|
1154
|
-
},
|
|
1155
|
-
{
|
|
1156
|
-
"name": "id",
|
|
1157
|
-
"type": {
|
|
1158
|
-
"text": "string"
|
|
1159
|
-
},
|
|
1160
|
-
"description": "The item ID",
|
|
1161
|
-
"fieldName": "id"
|
|
1162
1101
|
}
|
|
1163
1102
|
],
|
|
1164
1103
|
"superclass": {
|
|
@@ -1265,19 +1204,6 @@
|
|
|
1265
1204
|
"name": "BaseAccordionItem",
|
|
1266
1205
|
"module": "src/accordion-item/accordion-item.base.ts"
|
|
1267
1206
|
}
|
|
1268
|
-
},
|
|
1269
|
-
{
|
|
1270
|
-
"kind": "field",
|
|
1271
|
-
"name": "id",
|
|
1272
|
-
"type": {
|
|
1273
|
-
"text": "string"
|
|
1274
|
-
},
|
|
1275
|
-
"privacy": "public",
|
|
1276
|
-
"description": "The item ID",
|
|
1277
|
-
"inheritedFrom": {
|
|
1278
|
-
"name": "BaseAccordionItem",
|
|
1279
|
-
"module": "src/accordion-item/accordion-item.base.ts"
|
|
1280
|
-
}
|
|
1281
1207
|
}
|
|
1282
1208
|
],
|
|
1283
1209
|
"attributes": [
|
|
@@ -1350,18 +1276,6 @@
|
|
|
1350
1276
|
"name": "BaseAccordionItem",
|
|
1351
1277
|
"module": "src/accordion-item/accordion-item.base.ts"
|
|
1352
1278
|
}
|
|
1353
|
-
},
|
|
1354
|
-
{
|
|
1355
|
-
"name": "id",
|
|
1356
|
-
"type": {
|
|
1357
|
-
"text": "string"
|
|
1358
|
-
},
|
|
1359
|
-
"description": "The item ID",
|
|
1360
|
-
"fieldName": "id",
|
|
1361
|
-
"inheritedFrom": {
|
|
1362
|
-
"name": "BaseAccordionItem",
|
|
1363
|
-
"module": "src/accordion-item/accordion-item.base.ts"
|
|
1364
|
-
}
|
|
1365
1279
|
}
|
|
1366
1280
|
],
|
|
1367
1281
|
"superclass": {
|
|
@@ -9950,7 +9864,7 @@
|
|
|
9950
9864
|
"name": "options",
|
|
9951
9865
|
"optional": true,
|
|
9952
9866
|
"type": {
|
|
9953
|
-
"text": "{ shallow?: boolean
|
|
9867
|
+
"text": "{\n /**\n * Whether to only check direct children of the target element, rather than all descendants.\n * @defaultValue `false`\n */\n shallow?: boolean;\n /**\n * The maximum time to wait for each idle callback before rechecking for connected descendants, in milliseconds.\n * @defaultValue `50`\n */\n timeout?: number;\n /**\n * Whether to call the callback on the next idle period after descendants are connected, rather than immediately.\n * This can be used to defer work until after the browser has had a chance to perform any necessary updates\n * following the connection of the descendants.\n * @defaultValue `false`\n */\n idleCallback?: boolean;\n }"
|
|
9954
9868
|
},
|
|
9955
9869
|
"description": "Options object that may contain a timeout property for the idle callback."
|
|
9956
9870
|
}
|
|
@@ -10167,6 +10081,50 @@
|
|
|
10167
10081
|
}
|
|
10168
10082
|
]
|
|
10169
10083
|
},
|
|
10084
|
+
{
|
|
10085
|
+
"kind": "javascript-module",
|
|
10086
|
+
"path": "src/utils/element-internals.ts",
|
|
10087
|
+
"declarations": [
|
|
10088
|
+
{
|
|
10089
|
+
"kind": "function",
|
|
10090
|
+
"name": "stateSelector",
|
|
10091
|
+
"return": {
|
|
10092
|
+
"type": {
|
|
10093
|
+
"text": ""
|
|
10094
|
+
}
|
|
10095
|
+
},
|
|
10096
|
+
"parameters": [
|
|
10097
|
+
{
|
|
10098
|
+
"name": "state",
|
|
10099
|
+
"type": {
|
|
10100
|
+
"text": "S"
|
|
10101
|
+
},
|
|
10102
|
+
"description": "the state value."
|
|
10103
|
+
}
|
|
10104
|
+
],
|
|
10105
|
+
"description": "Returns a string that represents a CSS custom state selector.",
|
|
10106
|
+
"privacy": "public"
|
|
10107
|
+
}
|
|
10108
|
+
],
|
|
10109
|
+
"exports": [
|
|
10110
|
+
{
|
|
10111
|
+
"kind": "js",
|
|
10112
|
+
"name": "CustomStatesSetSupported",
|
|
10113
|
+
"declaration": {
|
|
10114
|
+
"name": "CustomStatesSetSupported",
|
|
10115
|
+
"module": "src/utils/element-internals.ts"
|
|
10116
|
+
}
|
|
10117
|
+
},
|
|
10118
|
+
{
|
|
10119
|
+
"kind": "js",
|
|
10120
|
+
"name": "stateSelector",
|
|
10121
|
+
"declaration": {
|
|
10122
|
+
"name": "stateSelector",
|
|
10123
|
+
"module": "src/utils/element-internals.ts"
|
|
10124
|
+
}
|
|
10125
|
+
}
|
|
10126
|
+
]
|
|
10127
|
+
},
|
|
10170
10128
|
{
|
|
10171
10129
|
"kind": "javascript-module",
|
|
10172
10130
|
"path": "./dist/esm/button/button.base.js",
|
|
@@ -19350,7 +19308,7 @@
|
|
|
19350
19308
|
"kind": "field",
|
|
19351
19309
|
"name": "slottedMenuList",
|
|
19352
19310
|
"type": {
|
|
19353
|
-
"text": "
|
|
19311
|
+
"text": "HTMLElement[]"
|
|
19354
19312
|
},
|
|
19355
19313
|
"privacy": "public",
|
|
19356
19314
|
"description": "Holds the slotted menu list."
|
|
@@ -19382,7 +19340,8 @@
|
|
|
19382
19340
|
"text": "void"
|
|
19383
19341
|
}
|
|
19384
19342
|
},
|
|
19385
|
-
"description": "Sets the component
|
|
19343
|
+
"description": "Sets the component.",
|
|
19344
|
+
"deprecated": "This method is no longer used. Trigger and menu-list listeners are now\nmanaged by their respective slot-changed callbacks."
|
|
19386
19345
|
},
|
|
19387
19346
|
{
|
|
19388
19347
|
"kind": "field",
|
|
@@ -34,6 +34,11 @@ export declare class Accordion extends FASTElement {
|
|
|
34
34
|
* @internal
|
|
35
35
|
*/
|
|
36
36
|
slottedAccordionItemsChanged(oldValue: HTMLElement[], newValue: HTMLElement[]): void;
|
|
37
|
+
/**
|
|
38
|
+
* Guard flag to prevent re-entrant calls to setSingleExpandMode.
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
private _isAdjusting;
|
|
37
42
|
/**
|
|
38
43
|
* Watch for changes to the slotted accordion items `disabled` and `expanded` attributes
|
|
39
44
|
* @internal
|
|
@@ -17,6 +17,11 @@ import { AccordionExpandMode } from './accordion.options.js';
|
|
|
17
17
|
export class Accordion extends FASTElement {
|
|
18
18
|
constructor() {
|
|
19
19
|
super(...arguments);
|
|
20
|
+
/**
|
|
21
|
+
* Guard flag to prevent re-entrant calls to setSingleExpandMode.
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
this._isAdjusting = false;
|
|
20
25
|
this.activeItemIndex = 0;
|
|
21
26
|
/**
|
|
22
27
|
* Resets event listeners and sets the `accordionItems` property
|
|
@@ -90,15 +95,13 @@ export class Accordion extends FASTElement {
|
|
|
90
95
|
return;
|
|
91
96
|
}
|
|
92
97
|
// Clean up single expand mode behavior
|
|
93
|
-
expandedItem?.expandbutton
|
|
98
|
+
expandedItem?.expandbutton?.removeAttribute('aria-disabled');
|
|
94
99
|
}
|
|
95
100
|
/**
|
|
96
101
|
* @internal
|
|
97
102
|
*/
|
|
98
103
|
slottedAccordionItemsChanged(oldValue, newValue) {
|
|
99
|
-
|
|
100
|
-
this.setItems();
|
|
101
|
-
}
|
|
104
|
+
this.setItems();
|
|
102
105
|
}
|
|
103
106
|
/**
|
|
104
107
|
* Watch for changes to the slotted accordion items `disabled` and `expanded` attributes
|
|
@@ -111,8 +114,10 @@ export class Accordion extends FASTElement {
|
|
|
111
114
|
else if (propertyName === 'expanded') {
|
|
112
115
|
// we only need to manage single expanded instances
|
|
113
116
|
// such as scenarios where a child is programatically expanded
|
|
114
|
-
if (source.expanded && this.isSingleExpandMode()) {
|
|
117
|
+
if (source.expanded && this.isSingleExpandMode() && !this._isAdjusting) {
|
|
118
|
+
this._isAdjusting = true;
|
|
115
119
|
this.setSingleExpandMode(source);
|
|
120
|
+
this._isAdjusting = false;
|
|
116
121
|
}
|
|
117
122
|
}
|
|
118
123
|
}
|
|
@@ -140,34 +145,30 @@ export class Accordion extends FASTElement {
|
|
|
140
145
|
* @returns {void}
|
|
141
146
|
*/
|
|
142
147
|
setSingleExpandMode(expandedItem) {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
if (
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
item.expandbutton.removeAttribute('aria-disabled');
|
|
159
|
-
}
|
|
148
|
+
if (this.accordionItems.length === 0) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
const currentItems = Array.from(this.accordionItems);
|
|
152
|
+
this.activeItemIndex = currentItems.indexOf(expandedItem);
|
|
153
|
+
currentItems.forEach((item, index) => {
|
|
154
|
+
if (isAccordionItem(item)) {
|
|
155
|
+
if (this.activeItemIndex === index) {
|
|
156
|
+
item.expanded = true;
|
|
157
|
+
item.expandbutton?.setAttribute('aria-disabled', 'true');
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
item.expanded = false;
|
|
161
|
+
if (!item.hasAttribute('disabled')) {
|
|
162
|
+
item.expandbutton?.removeAttribute('aria-disabled');
|
|
160
163
|
}
|
|
161
164
|
}
|
|
162
|
-
}
|
|
165
|
+
}
|
|
163
166
|
});
|
|
164
167
|
}
|
|
165
168
|
connectedCallback() {
|
|
166
169
|
super.connectedCallback();
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
this.setItems();
|
|
170
|
-
});
|
|
170
|
+
this.expandmode = this.expandmode || AccordionExpandMode.multi;
|
|
171
|
+
this.setItems();
|
|
171
172
|
}
|
|
172
173
|
}
|
|
173
174
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.js","sourceRoot":"","sources":["../../../src/accordion/accordion.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAW,MAAM,yBAAyB,CAAC;AAE7F,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D;;;;;;;;;;GAUG;AACH,MAAM,OAAO,SAAU,SAAQ,WAAW;IAA1C;;
|
|
1
|
+
{"version":3,"file":"accordion.js","sourceRoot":"","sources":["../../../src/accordion/accordion.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAW,MAAM,yBAAyB,CAAC;AAE7F,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D;;;;;;;;;;GAUG;AACH,MAAM,OAAO,SAAU,SAAQ,WAAW;IAA1C;;QAiDE;;;WAGG;QACK,iBAAY,GAAY,KAAK,CAAC;QAoB9B,oBAAe,GAAW,CAAC,CAAC;QAiBpC;;;;WAIG;QACK,aAAQ,GAAG,GAAS,EAAE;YAC5B,2BAA2B,CAAC,IAAI,EAAE,GAAG,EAAE;gBACrC,IAAI,IAAI,CAAC,qBAAqB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;oBAC5C,OAAO;gBACT,CAAC;gBAED,uDAAuD;gBACvD,MAAM,QAAQ,GAAc,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACtD,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;gBA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E;YACpD,IAAI,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC1B,IAAI,IAAI,CAAC,eAAe,KAAK,KAAK,EAAE,CAAC;oBACnC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;oBACrB,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;gBAC3D,CAAC;qBAAM,CAAC;oBACN,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;oBAEtB,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,EAAE,CAAC;wBACnC,IAAI,CAAC,YAAY,EAAE,eAAe,CAAC,eAAe,CAAC,CAAC;oBACtD,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAmCD,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAE1B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,mBAAmB,CAAC,KAAK,CAAC;QAC/D,IAAI,CAAC,QAAQ,EAAE,CAAC;IAClB,CAAC;CACF;AA5LQ;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;6CACK;AAyBjC;IADN,UAAU;wDACkC"}
|
|
@@ -44,14 +44,6 @@ export declare class BaseAccordionItem extends FASTElement {
|
|
|
44
44
|
* HTML attribute: disabled
|
|
45
45
|
*/
|
|
46
46
|
disabled: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* The item ID
|
|
49
|
-
*
|
|
50
|
-
* @public
|
|
51
|
-
* @remarks
|
|
52
|
-
* HTML Attribute: id
|
|
53
|
-
*/
|
|
54
|
-
id: string;
|
|
55
47
|
/**
|
|
56
48
|
* @internal
|
|
57
49
|
*/
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { attr, FASTElement, nullableNumberConverter } from '@microsoft/fast-element';
|
|
3
|
-
import { uniqueId } from '@microsoft/fast-web-utilities';
|
|
2
|
+
import { attr, FASTElement, nullableNumberConverter, observable } from '@microsoft/fast-element';
|
|
4
3
|
/**
|
|
5
4
|
*
|
|
6
5
|
* @slot start - Content positioned before heading in the collapsed state
|
|
@@ -48,14 +47,6 @@ export class BaseAccordionItem extends FASTElement {
|
|
|
48
47
|
* HTML attribute: disabled
|
|
49
48
|
*/
|
|
50
49
|
this.disabled = false;
|
|
51
|
-
/**
|
|
52
|
-
* The item ID
|
|
53
|
-
*
|
|
54
|
-
* @public
|
|
55
|
-
* @remarks
|
|
56
|
-
* HTML Attribute: id
|
|
57
|
-
*/
|
|
58
|
-
this.id = uniqueId('accordion-');
|
|
59
50
|
}
|
|
60
51
|
}
|
|
61
52
|
__decorate([
|
|
@@ -72,6 +63,6 @@ __decorate([
|
|
|
72
63
|
attr({ mode: 'boolean' })
|
|
73
64
|
], BaseAccordionItem.prototype, "disabled", void 0);
|
|
74
65
|
__decorate([
|
|
75
|
-
|
|
76
|
-
], BaseAccordionItem.prototype, "
|
|
66
|
+
observable
|
|
67
|
+
], BaseAccordionItem.prototype, "expandbutton", void 0);
|
|
77
68
|
//# sourceMappingURL=accordion-item.base.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion-item.base.js","sourceRoot":"","sources":["../../../src/accordion-item/accordion-item.base.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,uBAAuB,EAAE,
|
|
1
|
+
{"version":3,"file":"accordion-item.base.js","sourceRoot":"","sources":["../../../src/accordion-item/accordion-item.base.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEjG;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,iBAAkB,SAAQ,WAAW;IAAlD;;QACE;;;;WAIG;QACI,qBAAgB,GAAqB,IAAI,CAAC,eAAe,EAAE,CAAC;QAEnE;;;;;;;WAOG;QAMI,iBAAY,GAA0B,CAAC,CAAC;QAE/C;;;;;;WAMG;QAEI,aAAQ,GAAY,KAAK,CAAC;QAEjC;;;;;;WAMG;QAEI,aAAQ,GAAY,KAAK,CAAC;IAOnC,CAAC;CAAA;AA3BQ;IALN,IAAI,CAAC;QACJ,SAAS,EAAE,eAAe;QAC1B,IAAI,EAAE,UAAU;QAChB,SAAS,EAAE,uBAAuB;KACnC,CAAC;uDAC6C;AAUxC;IADN,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;mDACO;AAU1B;IADN,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;mDACO;AAM1B;IADN,UAAU;uDACuB"}
|
|
@@ -35,11 +35,11 @@ export function accordionItemTemplate(options = {}) {
|
|
|
35
35
|
<button
|
|
36
36
|
class="button"
|
|
37
37
|
part="button"
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
id="control"
|
|
39
|
+
aria-controls="panel"
|
|
40
40
|
aria-expanded="${x => x.expanded}"
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
?disabled="${x => x.disabled}"
|
|
42
|
+
${ref('expandbutton')}
|
|
43
43
|
>
|
|
44
44
|
<slot name="heading"></slot>
|
|
45
45
|
</button>
|
|
@@ -47,7 +47,7 @@ export function accordionItemTemplate(options = {}) {
|
|
|
47
47
|
<slot name="marker-expanded"> ${staticallyCompose(options.expandedIcon)} </slot>
|
|
48
48
|
<slot name="marker-collapsed"> ${staticallyCompose(options.collapsedIcon)} </slot>
|
|
49
49
|
</div>
|
|
50
|
-
<div class="content" part="content" id="
|
|
50
|
+
<div class="content" part="content" id="panel" role="region" aria-labelledby="control">
|
|
51
51
|
<slot></slot>
|
|
52
52
|
</div>
|
|
53
53
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion-item.template.js","sourceRoot":"","sources":["../../../src/accordion-item/accordion-item.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,IAAI,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAGtD,MAAM,oBAAoB,GAAG,IAAI,CAAC,OAAO,CAAC;;;;;;;;;;;;;OAanC,CAAC,CAAC;AAET,MAAM,mBAAmB,GAAG,IAAI,CAAC,OAAO,CAAC;;;;;;;;;;;;;OAalC,CAAC,CAAC;AAET,MAAM,UAAU,qBAAqB,CACnC,UAAgC,EAAE;IAElC,OAAO,IAAI,CAAG;qEACqD,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY
|
|
1
|
+
{"version":3,"file":"accordion-item.template.js","sourceRoot":"","sources":["../../../src/accordion-item/accordion-item.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,IAAI,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAGtD,MAAM,oBAAoB,GAAG,IAAI,CAAC,OAAO,CAAC;;;;;;;;;;;;;OAanC,CAAC,CAAC;AAET,MAAM,mBAAmB,GAAG,IAAI,CAAC,OAAO,CAAC;;;;;;;;;;;;;OAalC,CAAC,CAAC;AAET,MAAM,UAAU,qBAAqB,CACnC,UAAgC,EAAE;IAElC,OAAO,IAAI,CAAG;qEACqD,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY;;;;;;yBAM/D,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ;qBACnB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ;UAC1B,GAAG,CAAC,cAAc,CAAC;;;;QAIrB,iBAAiB,CAAC,OAAO,CAAC;sCACI,iBAAiB,CAAC,OAAO,CAAC,YAAY,CAAC;uCACtC,iBAAiB,CAAC,OA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,SAAS,EAAE,MAAM,EAAE,CAAC;oCACgB;AAQrC;IADN,UAAU;sCACuB"}
|
|
@@ -418,6 +418,11 @@ export declare class BaseDropdown extends FASTElement {
|
|
|
418
418
|
* @public
|
|
419
419
|
*/
|
|
420
420
|
inputHandler(e: InputEvent): boolean | void;
|
|
421
|
+
/**
|
|
422
|
+
* Guard flag to prevent reentrant calls to `insertControl`.
|
|
423
|
+
* @internal
|
|
424
|
+
*/
|
|
425
|
+
private _insertingControl;
|
|
421
426
|
/**
|
|
422
427
|
* Inserts the control element based on the dropdown type.
|
|
423
428
|
*
|
|
@@ -129,7 +129,7 @@ export class BaseDropdown extends FASTElement {
|
|
|
129
129
|
const notifier = Observable.getNotifier(this);
|
|
130
130
|
notifier.subscribe(next);
|
|
131
131
|
notifier.notify('multiple');
|
|
132
|
-
|
|
132
|
+
waitForConnectedDescendants(next, () => {
|
|
133
133
|
this.options.forEach(option => {
|
|
134
134
|
option.disabled = option.disabledAttribute || this.disabled;
|
|
135
135
|
option.name = this.name;
|
|
@@ -140,7 +140,7 @@ export class BaseDropdown extends FASTElement {
|
|
|
140
140
|
x.selected = this.multiple || i === 0;
|
|
141
141
|
});
|
|
142
142
|
this.setValidity();
|
|
143
|
-
});
|
|
143
|
+
}, { idleCallback: true });
|
|
144
144
|
if (AnchorPositioningCSSSupported) {
|
|
145
145
|
// The `anchor-name` property seems to not be isolated between instances in Safari Technology Preview 220 (18.4).
|
|
146
146
|
// It's unclear if the spec requires the `anchor-name` to be unique when styled on the `:host`.
|
|
@@ -468,6 +468,11 @@ export class BaseDropdown extends FASTElement {
|
|
|
468
468
|
* @internal
|
|
469
469
|
*/
|
|
470
470
|
this.elementInternals = this.attachInternals();
|
|
471
|
+
/**
|
|
472
|
+
* Guard flag to prevent reentrant calls to `insertControl`.
|
|
473
|
+
* @internal
|
|
474
|
+
*/
|
|
475
|
+
this._insertingControl = false;
|
|
471
476
|
this.elementInternals.role = 'presentation';
|
|
472
477
|
}
|
|
473
478
|
/**
|
|
@@ -568,12 +573,17 @@ export class BaseDropdown extends FASTElement {
|
|
|
568
573
|
* This method can be overridden in derived classes to provide custom control elements, though this is not recommended.
|
|
569
574
|
*/
|
|
570
575
|
insertControl() {
|
|
576
|
+
if (this._insertingControl) {
|
|
577
|
+
return;
|
|
578
|
+
}
|
|
579
|
+
this._insertingControl = true;
|
|
571
580
|
this.controlSlot?.assignedNodes().forEach(x => this.removeChild(x));
|
|
572
581
|
if (this.type === DropdownType.combobox) {
|
|
573
582
|
dropdownInputTemplate.render(this, this);
|
|
574
583
|
return;
|
|
575
584
|
}
|
|
576
585
|
dropdownButtonTemplate.render(this, this);
|
|
586
|
+
this._insertingControl = false;
|
|
577
587
|
}
|
|
578
588
|
/**
|
|
579
589
|
* Handles the keydown events for the dropdown.
|
|
@@ -667,7 +677,9 @@ export class BaseDropdown extends FASTElement {
|
|
|
667
677
|
*/
|
|
668
678
|
selectOption(index = this.selectedIndex, shouldEmit = false) {
|
|
669
679
|
this.listbox.selectOption(index);
|
|
670
|
-
this.control
|
|
680
|
+
if (this.control) {
|
|
681
|
+
this.control.value = this.displayValue;
|
|
682
|
+
}
|
|
671
683
|
this.setValidity();
|
|
672
684
|
this.updateFreeformOption();
|
|
673
685
|
if (shouldEmit) {
|
|
@@ -684,14 +696,15 @@ export class BaseDropdown extends FASTElement {
|
|
|
684
696
|
* @internal
|
|
685
697
|
*/
|
|
686
698
|
setValidity(flags, message, anchor) {
|
|
687
|
-
if (this
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
this.elementInternals.setValidity({ valueMissing, ...flags }, message ?? this.validationMessage, anchor ?? this.control);
|
|
699
|
+
if (!this.elementInternals) {
|
|
700
|
+
return;
|
|
701
|
+
}
|
|
702
|
+
if (this.disabled || !this.required) {
|
|
703
|
+
this.elementInternals.setValidity({});
|
|
704
|
+
return;
|
|
694
705
|
}
|
|
706
|
+
const valueMissing = this.required && this.listbox.selectedOptions.length === 0;
|
|
707
|
+
this.elementInternals.setValidity({ valueMissing, ...flags }, message ?? this.validationMessage, anchor ?? this.control);
|
|
695
708
|
}
|
|
696
709
|
/**
|
|
697
710
|
* Handles the `slotchange` event for the dropdown.
|