@fluentui/web-components 3.0.0-rc.11 → 3.0.0-rc.12
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 +11 -2
- package/custom-elements.json +116 -116
- package/dist/esm/accordion/accordion.d.ts +2 -1
- package/dist/esm/accordion/accordion.js +52 -49
- package/dist/esm/accordion/accordion.js.map +1 -1
- package/dist/esm/accordion-item/accordion-item.options.d.ts +11 -1
- package/dist/esm/accordion-item/accordion-item.options.js +12 -0
- package/dist/esm/accordion-item/accordion-item.options.js.map +1 -1
- package/dist/web-components.d.ts +2 -1
- package/dist/web-components.js +75 -61
- package/dist/web-components.min.js +150 -150
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
# Change Log - @fluentui/web-components
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 07 Apr 2026 20:44:43 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [3.0.0-rc.12](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-rc.12)
|
|
8
|
+
|
|
9
|
+
Tue, 07 Apr 2026 20:44:43 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-rc.11..@fluentui/web-components_v3.0.0-rc.12)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- feat: enhance Accordion component with improved item handling and lifecycle management ([PR #35954](https://github.com/microsoft/fluentui/pull/35954) by 863023+radium-v@users.noreply.github.com)
|
|
15
|
+
|
|
7
16
|
## [3.0.0-rc.11](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-rc.11)
|
|
8
17
|
|
|
9
|
-
Mon, 06 Apr 2026 22:24:
|
|
18
|
+
Mon, 06 Apr 2026 22:24:42 GMT
|
|
10
19
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-rc.10..@fluentui/web-components_v3.0.0-rc.11)
|
|
11
20
|
|
|
12
21
|
### Changes
|
package/custom-elements.json
CHANGED
|
@@ -9871,6 +9871,121 @@
|
|
|
9871
9871
|
}
|
|
9872
9872
|
]
|
|
9873
9873
|
},
|
|
9874
|
+
{
|
|
9875
|
+
"kind": "javascript-module",
|
|
9876
|
+
"path": "src/utils/request-idle-callback.ts",
|
|
9877
|
+
"declarations": [
|
|
9878
|
+
{
|
|
9879
|
+
"kind": "function",
|
|
9880
|
+
"name": "requestIdleCallback",
|
|
9881
|
+
"return": {
|
|
9882
|
+
"type": {
|
|
9883
|
+
"text": ""
|
|
9884
|
+
}
|
|
9885
|
+
},
|
|
9886
|
+
"parameters": [
|
|
9887
|
+
{
|
|
9888
|
+
"name": "callback",
|
|
9889
|
+
"type": {
|
|
9890
|
+
"text": "(deadline: IdleDeadline) => void"
|
|
9891
|
+
},
|
|
9892
|
+
"description": "The function to call when the browser is idle."
|
|
9893
|
+
},
|
|
9894
|
+
{
|
|
9895
|
+
"name": "options",
|
|
9896
|
+
"optional": true,
|
|
9897
|
+
"type": {
|
|
9898
|
+
"text": "{ timeout: number }"
|
|
9899
|
+
},
|
|
9900
|
+
"description": "Options object that may contain a timeout property."
|
|
9901
|
+
}
|
|
9902
|
+
],
|
|
9903
|
+
"description": "A ponyfill for requestIdleCallback that falls back to setTimeout.\nUses the native requestIdleCallback when available.",
|
|
9904
|
+
"privacy": "public"
|
|
9905
|
+
},
|
|
9906
|
+
{
|
|
9907
|
+
"kind": "function",
|
|
9908
|
+
"name": "cancelIdleCallback",
|
|
9909
|
+
"return": {
|
|
9910
|
+
"type": {
|
|
9911
|
+
"text": "void"
|
|
9912
|
+
}
|
|
9913
|
+
},
|
|
9914
|
+
"parameters": [
|
|
9915
|
+
{
|
|
9916
|
+
"name": "id",
|
|
9917
|
+
"type": {
|
|
9918
|
+
"text": "ReturnType<typeof globalThis.requestIdleCallback | typeof setTimeout>"
|
|
9919
|
+
},
|
|
9920
|
+
"description": "The ID of the callback to cancel."
|
|
9921
|
+
}
|
|
9922
|
+
],
|
|
9923
|
+
"description": "A ponyfill for cancelIdleCallback that falls back to clearTimeout.\nUses the native cancelIdleCallback when available.",
|
|
9924
|
+
"privacy": "public"
|
|
9925
|
+
},
|
|
9926
|
+
{
|
|
9927
|
+
"kind": "function",
|
|
9928
|
+
"name": "waitForConnectedDescendants",
|
|
9929
|
+
"return": {
|
|
9930
|
+
"type": {
|
|
9931
|
+
"text": "void"
|
|
9932
|
+
}
|
|
9933
|
+
},
|
|
9934
|
+
"parameters": [
|
|
9935
|
+
{
|
|
9936
|
+
"name": "target",
|
|
9937
|
+
"type": {
|
|
9938
|
+
"text": "HTMLElement"
|
|
9939
|
+
},
|
|
9940
|
+
"description": "The target element to observe."
|
|
9941
|
+
},
|
|
9942
|
+
{
|
|
9943
|
+
"name": "callback",
|
|
9944
|
+
"type": {
|
|
9945
|
+
"text": "() => void"
|
|
9946
|
+
},
|
|
9947
|
+
"description": "The function to call when all custom element descendants are connected."
|
|
9948
|
+
},
|
|
9949
|
+
{
|
|
9950
|
+
"name": "options",
|
|
9951
|
+
"optional": true,
|
|
9952
|
+
"type": {
|
|
9953
|
+
"text": "{ shallow?: boolean; timeout?: number }"
|
|
9954
|
+
},
|
|
9955
|
+
"description": "Options object that may contain a timeout property for the idle callback."
|
|
9956
|
+
}
|
|
9957
|
+
],
|
|
9958
|
+
"description": "Waits for all custom element descendants of a target element to be connected.",
|
|
9959
|
+
"privacy": "public"
|
|
9960
|
+
}
|
|
9961
|
+
],
|
|
9962
|
+
"exports": [
|
|
9963
|
+
{
|
|
9964
|
+
"kind": "js",
|
|
9965
|
+
"name": "requestIdleCallback",
|
|
9966
|
+
"declaration": {
|
|
9967
|
+
"name": "requestIdleCallback",
|
|
9968
|
+
"module": "src/utils/request-idle-callback.ts"
|
|
9969
|
+
}
|
|
9970
|
+
},
|
|
9971
|
+
{
|
|
9972
|
+
"kind": "js",
|
|
9973
|
+
"name": "cancelIdleCallback",
|
|
9974
|
+
"declaration": {
|
|
9975
|
+
"name": "cancelIdleCallback",
|
|
9976
|
+
"module": "src/utils/request-idle-callback.ts"
|
|
9977
|
+
}
|
|
9978
|
+
},
|
|
9979
|
+
{
|
|
9980
|
+
"kind": "js",
|
|
9981
|
+
"name": "waitForConnectedDescendants",
|
|
9982
|
+
"declaration": {
|
|
9983
|
+
"name": "waitForConnectedDescendants",
|
|
9984
|
+
"module": "src/utils/request-idle-callback.ts"
|
|
9985
|
+
}
|
|
9986
|
+
}
|
|
9987
|
+
]
|
|
9988
|
+
},
|
|
9874
9989
|
{
|
|
9875
9990
|
"kind": "javascript-module",
|
|
9876
9991
|
"path": "./dist/esm/accordion/accordion.js",
|
|
@@ -9906,7 +10021,7 @@
|
|
|
9906
10021
|
{
|
|
9907
10022
|
"name": "prev",
|
|
9908
10023
|
"type": {
|
|
9909
|
-
"text": "AccordionExpandMode"
|
|
10024
|
+
"text": "AccordionExpandMode | undefined"
|
|
9910
10025
|
}
|
|
9911
10026
|
},
|
|
9912
10027
|
{
|
|
@@ -15411,121 +15526,6 @@
|
|
|
15411
15526
|
}
|
|
15412
15527
|
]
|
|
15413
15528
|
},
|
|
15414
|
-
{
|
|
15415
|
-
"kind": "javascript-module",
|
|
15416
|
-
"path": "src/utils/request-idle-callback.ts",
|
|
15417
|
-
"declarations": [
|
|
15418
|
-
{
|
|
15419
|
-
"kind": "function",
|
|
15420
|
-
"name": "requestIdleCallback",
|
|
15421
|
-
"return": {
|
|
15422
|
-
"type": {
|
|
15423
|
-
"text": ""
|
|
15424
|
-
}
|
|
15425
|
-
},
|
|
15426
|
-
"parameters": [
|
|
15427
|
-
{
|
|
15428
|
-
"name": "callback",
|
|
15429
|
-
"type": {
|
|
15430
|
-
"text": "(deadline: IdleDeadline) => void"
|
|
15431
|
-
},
|
|
15432
|
-
"description": "The function to call when the browser is idle."
|
|
15433
|
-
},
|
|
15434
|
-
{
|
|
15435
|
-
"name": "options",
|
|
15436
|
-
"optional": true,
|
|
15437
|
-
"type": {
|
|
15438
|
-
"text": "{ timeout: number }"
|
|
15439
|
-
},
|
|
15440
|
-
"description": "Options object that may contain a timeout property."
|
|
15441
|
-
}
|
|
15442
|
-
],
|
|
15443
|
-
"description": "A ponyfill for requestIdleCallback that falls back to setTimeout.\nUses the native requestIdleCallback when available.",
|
|
15444
|
-
"privacy": "public"
|
|
15445
|
-
},
|
|
15446
|
-
{
|
|
15447
|
-
"kind": "function",
|
|
15448
|
-
"name": "cancelIdleCallback",
|
|
15449
|
-
"return": {
|
|
15450
|
-
"type": {
|
|
15451
|
-
"text": "void"
|
|
15452
|
-
}
|
|
15453
|
-
},
|
|
15454
|
-
"parameters": [
|
|
15455
|
-
{
|
|
15456
|
-
"name": "id",
|
|
15457
|
-
"type": {
|
|
15458
|
-
"text": "ReturnType<typeof globalThis.requestIdleCallback | typeof setTimeout>"
|
|
15459
|
-
},
|
|
15460
|
-
"description": "The ID of the callback to cancel."
|
|
15461
|
-
}
|
|
15462
|
-
],
|
|
15463
|
-
"description": "A ponyfill for cancelIdleCallback that falls back to clearTimeout.\nUses the native cancelIdleCallback when available.",
|
|
15464
|
-
"privacy": "public"
|
|
15465
|
-
},
|
|
15466
|
-
{
|
|
15467
|
-
"kind": "function",
|
|
15468
|
-
"name": "waitForConnectedDescendants",
|
|
15469
|
-
"return": {
|
|
15470
|
-
"type": {
|
|
15471
|
-
"text": "void"
|
|
15472
|
-
}
|
|
15473
|
-
},
|
|
15474
|
-
"parameters": [
|
|
15475
|
-
{
|
|
15476
|
-
"name": "target",
|
|
15477
|
-
"type": {
|
|
15478
|
-
"text": "HTMLElement"
|
|
15479
|
-
},
|
|
15480
|
-
"description": "The target element to observe."
|
|
15481
|
-
},
|
|
15482
|
-
{
|
|
15483
|
-
"name": "callback",
|
|
15484
|
-
"type": {
|
|
15485
|
-
"text": "() => void"
|
|
15486
|
-
},
|
|
15487
|
-
"description": "The function to call when all custom element descendants are connected."
|
|
15488
|
-
},
|
|
15489
|
-
{
|
|
15490
|
-
"name": "options",
|
|
15491
|
-
"optional": true,
|
|
15492
|
-
"type": {
|
|
15493
|
-
"text": "{ shallow?: boolean; timeout?: number }"
|
|
15494
|
-
},
|
|
15495
|
-
"description": "Options object that may contain a timeout property for the idle callback."
|
|
15496
|
-
}
|
|
15497
|
-
],
|
|
15498
|
-
"description": "Waits for all custom element descendants of a target element to be connected.",
|
|
15499
|
-
"privacy": "public"
|
|
15500
|
-
}
|
|
15501
|
-
],
|
|
15502
|
-
"exports": [
|
|
15503
|
-
{
|
|
15504
|
-
"kind": "js",
|
|
15505
|
-
"name": "requestIdleCallback",
|
|
15506
|
-
"declaration": {
|
|
15507
|
-
"name": "requestIdleCallback",
|
|
15508
|
-
"module": "src/utils/request-idle-callback.ts"
|
|
15509
|
-
}
|
|
15510
|
-
},
|
|
15511
|
-
{
|
|
15512
|
-
"kind": "js",
|
|
15513
|
-
"name": "cancelIdleCallback",
|
|
15514
|
-
"declaration": {
|
|
15515
|
-
"name": "cancelIdleCallback",
|
|
15516
|
-
"module": "src/utils/request-idle-callback.ts"
|
|
15517
|
-
}
|
|
15518
|
-
},
|
|
15519
|
-
{
|
|
15520
|
-
"kind": "js",
|
|
15521
|
-
"name": "waitForConnectedDescendants",
|
|
15522
|
-
"declaration": {
|
|
15523
|
-
"name": "waitForConnectedDescendants",
|
|
15524
|
-
"module": "src/utils/request-idle-callback.ts"
|
|
15525
|
-
}
|
|
15526
|
-
}
|
|
15527
|
-
]
|
|
15528
|
-
},
|
|
15529
15529
|
{
|
|
15530
15530
|
"kind": "javascript-module",
|
|
15531
15531
|
"path": "./dist/esm/listbox/listbox.js",
|
|
@@ -21,7 +21,7 @@ export declare class Accordion extends FASTElement {
|
|
|
21
21
|
* HTML attribute: expand-mode
|
|
22
22
|
*/
|
|
23
23
|
expandmode: AccordionExpandMode;
|
|
24
|
-
expandmodeChanged(prev: AccordionExpandMode, next: AccordionExpandMode): void;
|
|
24
|
+
expandmodeChanged(prev: AccordionExpandMode | undefined, next: AccordionExpandMode): void;
|
|
25
25
|
/**
|
|
26
26
|
* @internal
|
|
27
27
|
*/
|
|
@@ -73,4 +73,5 @@ export declare class Accordion extends FASTElement {
|
|
|
73
73
|
* @returns
|
|
74
74
|
*/
|
|
75
75
|
private expandedChangedHandler;
|
|
76
|
+
connectedCallback(): void;
|
|
76
77
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { Observable } from '@microsoft/fast-element';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { attr, FASTElement, Observable, observable } from '@microsoft/fast-element';
|
|
3
|
+
import { waitForConnectedDescendants } from '../utils/request-idle-callback.js';
|
|
4
|
+
import { isAccordionItem } from '../accordion-item/accordion-item.options.js';
|
|
5
5
|
import { AccordionExpandMode } from './accordion.options.js';
|
|
6
6
|
/**
|
|
7
7
|
* An Accordion Custom HTML Element
|
|
@@ -17,15 +17,6 @@ import { AccordionExpandMode } from './accordion.options.js';
|
|
|
17
17
|
export class Accordion extends FASTElement {
|
|
18
18
|
constructor() {
|
|
19
19
|
super(...arguments);
|
|
20
|
-
/**
|
|
21
|
-
* Controls the expand mode of the Accordion, either allowing
|
|
22
|
-
* single or multiple item expansion.
|
|
23
|
-
* @public
|
|
24
|
-
*
|
|
25
|
-
* @remarks
|
|
26
|
-
* HTML attribute: expand-mode
|
|
27
|
-
*/
|
|
28
|
-
this.expandmode = AccordionExpandMode.multi;
|
|
29
20
|
this.activeItemIndex = 0;
|
|
30
21
|
/**
|
|
31
22
|
* Resets event listeners and sets the `accordionItems` property
|
|
@@ -33,25 +24,27 @@ export class Accordion extends FASTElement {
|
|
|
33
24
|
* @returns {void}
|
|
34
25
|
*/
|
|
35
26
|
this.setItems = () => {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
27
|
+
waitForConnectedDescendants(this, () => {
|
|
28
|
+
if (this.slottedAccordionItems.length === 0) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
// Get all existing children and remove event listeners
|
|
32
|
+
const children = Array.from(this.children);
|
|
33
|
+
this.removeItemListeners(children);
|
|
34
|
+
// Resubscribe to the `disabled` attribute of all children
|
|
35
|
+
children.forEach((child) => Observable.getNotifier(child).subscribe(this, 'disabled'));
|
|
36
|
+
// Add event listeners to each non-disabled AccordionItem
|
|
37
|
+
this.accordionItems = children.filter(child => !child.hasAttribute('disabled'));
|
|
38
|
+
this.accordionItems.forEach((item, index) => {
|
|
39
|
+
item.addEventListener('click', this.expandedChangedHandler);
|
|
40
|
+
// Subscribe to the expanded attribute of the item
|
|
41
|
+
Observable.getNotifier(item).subscribe(this, 'expanded');
|
|
42
|
+
});
|
|
43
|
+
if (this.isSingleExpandMode()) {
|
|
44
|
+
const expandedItem = this.findExpandedItem();
|
|
45
|
+
this.setSingleExpandMode(expandedItem);
|
|
46
|
+
}
|
|
50
47
|
});
|
|
51
|
-
if (this.isSingleExpandMode()) {
|
|
52
|
-
const expandedItem = this.findExpandedItem();
|
|
53
|
-
this.setSingleExpandMode(expandedItem);
|
|
54
|
-
}
|
|
55
48
|
};
|
|
56
49
|
/**
|
|
57
50
|
* Removes event listeners from the previous accordion items
|
|
@@ -71,7 +64,7 @@ export class Accordion extends FASTElement {
|
|
|
71
64
|
*/
|
|
72
65
|
this.expandedChangedHandler = (evt) => {
|
|
73
66
|
const item = evt.target;
|
|
74
|
-
if (item
|
|
67
|
+
if (isAccordionItem(item)) {
|
|
75
68
|
if (!this.isSingleExpandMode()) {
|
|
76
69
|
item.expanded = !item.expanded;
|
|
77
70
|
// setSingleExpandMode sets activeItemIndex on its own
|
|
@@ -128,10 +121,11 @@ export class Accordion extends FASTElement {
|
|
|
128
121
|
* @returns {void}
|
|
129
122
|
*/
|
|
130
123
|
findExpandedItem() {
|
|
131
|
-
if (this.accordionItems.length === 0) {
|
|
124
|
+
if (!this.accordionItems || this.accordionItems?.length === 0) {
|
|
132
125
|
return null;
|
|
133
126
|
}
|
|
134
|
-
return (this.accordionItems.find((item) => item
|
|
127
|
+
return (this.accordionItems.find((item) => isAccordionItem(item) && item.expanded) ??
|
|
128
|
+
this.accordionItems[0]);
|
|
135
129
|
}
|
|
136
130
|
/**
|
|
137
131
|
* Checks if the accordion is in single expand mode
|
|
@@ -146,24 +140,33 @@ export class Accordion extends FASTElement {
|
|
|
146
140
|
* @returns {void}
|
|
147
141
|
*/
|
|
148
142
|
setSingleExpandMode(expandedItem) {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
if (
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
item.
|
|
143
|
+
requestAnimationFrame(() => {
|
|
144
|
+
if (this.accordionItems.length === 0) {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
const currentItems = Array.from(this.accordionItems);
|
|
148
|
+
this.activeItemIndex = currentItems.indexOf(expandedItem);
|
|
149
|
+
currentItems.forEach((item, index) => {
|
|
150
|
+
if (isAccordionItem(item)) {
|
|
151
|
+
if (this.activeItemIndex === index) {
|
|
152
|
+
item.expanded = true;
|
|
153
|
+
item.expandbutton.setAttribute('aria-disabled', 'true');
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
item.expanded = false;
|
|
157
|
+
if (!item.hasAttribute('disabled')) {
|
|
158
|
+
item.expandbutton.removeAttribute('aria-disabled');
|
|
159
|
+
}
|
|
164
160
|
}
|
|
165
161
|
}
|
|
166
|
-
}
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
connectedCallback() {
|
|
166
|
+
super.connectedCallback();
|
|
167
|
+
requestAnimationFrame(() => {
|
|
168
|
+
this.expandmode = this.expandmode || AccordionExpandMode.multi;
|
|
169
|
+
this.setItems();
|
|
167
170
|
});
|
|
168
171
|
}
|
|
169
172
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.js","sourceRoot":"","sources":["../../../src/accordion/accordion.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;
|
|
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;;QAmEU,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;gBAEnC,0DAA0D;gBAC1D,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAc,EAAE,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,SAAS,CAA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AC;wBACrB,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;oBAC1D,CAAC;yBAAM,CAAC;wBACN,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;wBAEtB,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,EAAE,CAAC;4BACnC,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC;wBACrD,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAmCD,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAE1B,qBAAqB,CAAC,GAAG,EAAE;YACzB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,mBAAmB,CAAC,KAAK,CAAC;YAC/D,IAAI,CAAC,QAAQ,EAAE,CAAC;QAClB,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AA1LQ;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;6CACK;AAyBjC;IADN,UAAU;wDACkC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ValuesOf } from '../utils/typings.js';
|
|
2
|
+
import type { BaseAccordionItem } from './accordion-item.base.js';
|
|
2
3
|
/**
|
|
3
4
|
* An Accordion Item header font size can be small, medium, large, and extra-large
|
|
4
5
|
*/
|
|
@@ -25,3 +26,12 @@ export declare const AccordionItemMarkerPosition: {
|
|
|
25
26
|
* @public
|
|
26
27
|
*/
|
|
27
28
|
export type AccordionItemMarkerPosition = ValuesOf<typeof AccordionItemMarkerPosition>;
|
|
29
|
+
/**
|
|
30
|
+
* Predicate function that determines if the element should be considered an accordion item element.
|
|
31
|
+
*
|
|
32
|
+
* @param element - The element to check.
|
|
33
|
+
* @param tagName - The tag name to check against, defaults to '-accordion-item'.
|
|
34
|
+
* @returns True if the element is an accordion item element, false otherwise.
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
export declare function isAccordionItem(element?: Node | null, tagName?: string): element is BaseAccordionItem;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isCustomElement } from '../utils/typings.js';
|
|
1
2
|
/**
|
|
2
3
|
* An Accordion Item header font size can be small, medium, large, and extra-large
|
|
3
4
|
*/
|
|
@@ -14,4 +15,15 @@ export const AccordionItemMarkerPosition = {
|
|
|
14
15
|
start: 'start',
|
|
15
16
|
end: 'end',
|
|
16
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* Predicate function that determines if the element should be considered an accordion item element.
|
|
20
|
+
*
|
|
21
|
+
* @param element - The element to check.
|
|
22
|
+
* @param tagName - The tag name to check against, defaults to '-accordion-item'.
|
|
23
|
+
* @returns True if the element is an accordion item element, false otherwise.
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export function isAccordionItem(element, tagName = '-accordion-item') {
|
|
27
|
+
return isCustomElement(tagName)(element);
|
|
28
|
+
}
|
|
17
29
|
//# sourceMappingURL=accordion-item.options.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion-item.options.js","sourceRoot":"","sources":["../../../src/accordion-item/accordion-item.options.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"accordion-item.options.js","sourceRoot":"","sources":["../../../src/accordion-item/accordion-item.options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAiB,MAAM,qBAAqB,CAAC;AAGrE;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,UAAU,EAAE,aAAa;CACjB,CAAC;AAQX;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,KAAK,EAAE,OAAO;IACd,GAAG,EAAE,KAAK;CACF,CAAC;AAQX;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAC7B,OAAqB,EACrB,UAAkB,iBAAiB;IAEnC,OAAO,eAAe,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;AAC3C,CAAC"}
|
package/dist/web-components.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export declare class Accordion extends FASTElement {
|
|
|
33
33
|
* HTML attribute: expand-mode
|
|
34
34
|
*/
|
|
35
35
|
expandmode: AccordionExpandMode;
|
|
36
|
-
expandmodeChanged(prev: AccordionExpandMode, next: AccordionExpandMode): void;
|
|
36
|
+
expandmodeChanged(prev: AccordionExpandMode | undefined, next: AccordionExpandMode): void;
|
|
37
37
|
/**
|
|
38
38
|
* @internal
|
|
39
39
|
*/
|
|
@@ -85,6 +85,7 @@ export declare class Accordion extends FASTElement {
|
|
|
85
85
|
* @returns
|
|
86
86
|
*/
|
|
87
87
|
private expandedChangedHandler;
|
|
88
|
+
connectedCallback(): void;
|
|
88
89
|
}
|
|
89
90
|
|
|
90
91
|
/**
|