@fluentui/react-accordion 0.0.0-nightly-20231214-0405.1 → 0.0.0-nightly-20231215-0405.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -13
- package/lib/components/AccordionHeader/useAccordionHeader.js +24 -27
- package/lib/components/AccordionHeader/useAccordionHeader.js.map +1 -1
- package/lib-commonjs/components/AccordionHeader/useAccordionHeader.js +22 -25
- package/lib-commonjs/components/AccordionHeader/useAccordionHeader.js.map +1 -1
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,26 +1,40 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-accordion
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 15 Dec 2023 04:19:49 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [0.0.0-nightly-
|
|
7
|
+
## [0.0.0-nightly-20231215-0405.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-accordion_v0.0.0-nightly-20231215-0405.1)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-accordion_v9.3.
|
|
9
|
+
Fri, 15 Dec 2023 04:19:49 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-accordion_v9.3.31..@fluentui/react-accordion_v0.0.0-nightly-20231215-0405.1)
|
|
11
11
|
|
|
12
12
|
### Changes
|
|
13
13
|
|
|
14
14
|
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
|
|
15
|
-
- Bump @fluentui/react-aria to v0.0.0-nightly-
|
|
16
|
-
- Bump @fluentui/react-context-selector to v0.0.0-nightly-
|
|
17
|
-
- Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-
|
|
18
|
-
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-
|
|
19
|
-
- Bump @fluentui/react-tabster to v0.0.0-nightly-
|
|
20
|
-
- Bump @fluentui/react-theme to v0.0.0-nightly-
|
|
21
|
-
- Bump @fluentui/react-utilities to v0.0.0-nightly-
|
|
22
|
-
- Bump @fluentui/react-conformance to v0.0.0-nightly-
|
|
23
|
-
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
|
15
|
+
- Bump @fluentui/react-aria to v0.0.0-nightly-20231215-0405.1 ([commit](https://github.com/microsoft/fluentui/commit/1bab419c8163ed0ac9b7f0ebff30e764b0048331) by beachball)
|
|
16
|
+
- Bump @fluentui/react-context-selector to v0.0.0-nightly-20231215-0405.1 ([commit](https://github.com/microsoft/fluentui/commit/1bab419c8163ed0ac9b7f0ebff30e764b0048331) by beachball)
|
|
17
|
+
- Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20231215-0405.1 ([commit](https://github.com/microsoft/fluentui/commit/1bab419c8163ed0ac9b7f0ebff30e764b0048331) by beachball)
|
|
18
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20231215-0405.1 ([commit](https://github.com/microsoft/fluentui/commit/1bab419c8163ed0ac9b7f0ebff30e764b0048331) by beachball)
|
|
19
|
+
- Bump @fluentui/react-tabster to v0.0.0-nightly-20231215-0405.1 ([commit](https://github.com/microsoft/fluentui/commit/1bab419c8163ed0ac9b7f0ebff30e764b0048331) by beachball)
|
|
20
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20231215-0405.1 ([commit](https://github.com/microsoft/fluentui/commit/1bab419c8163ed0ac9b7f0ebff30e764b0048331) by beachball)
|
|
21
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20231215-0405.1 ([commit](https://github.com/microsoft/fluentui/commit/1bab419c8163ed0ac9b7f0ebff30e764b0048331) by beachball)
|
|
22
|
+
- Bump @fluentui/react-conformance to v0.0.0-nightly-20231215-0405.1 ([commit](https://github.com/microsoft/fluentui/commit/1bab419c8163ed0ac9b7f0ebff30e764b0048331) by beachball)
|
|
23
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20231215-0405.1 ([commit](https://github.com/microsoft/fluentui/commit/1bab419c8163ed0ac9b7f0ebff30e764b0048331) by beachball)
|
|
24
|
+
|
|
25
|
+
## [9.3.31](https://github.com/microsoft/fluentui/tree/@fluentui/react-accordion_v9.3.31)
|
|
26
|
+
|
|
27
|
+
Thu, 14 Dec 2023 09:58:46 GMT
|
|
28
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-accordion_v9.3.30..@fluentui/react-accordion_v9.3.31)
|
|
29
|
+
|
|
30
|
+
### Patches
|
|
31
|
+
|
|
32
|
+
- Bump @fluentui/react-aria to v9.5.0 ([PR #30056](https://github.com/microsoft/fluentui/pull/30056) by beachball)
|
|
33
|
+
- Bump @fluentui/react-context-selector to v9.1.43 ([PR #30056](https://github.com/microsoft/fluentui/pull/30056) by beachball)
|
|
34
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.21 ([PR #30056](https://github.com/microsoft/fluentui/pull/30056) by beachball)
|
|
35
|
+
- Bump @fluentui/react-shared-contexts to v9.13.1 ([PR #30056](https://github.com/microsoft/fluentui/pull/30056) by beachball)
|
|
36
|
+
- Bump @fluentui/react-tabster to v9.15.1 ([PR #30056](https://github.com/microsoft/fluentui/pull/30056) by beachball)
|
|
37
|
+
- Bump @fluentui/react-utilities to v9.15.3 ([PR #30056](https://github.com/microsoft/fluentui/pull/30056) by beachball)
|
|
24
38
|
|
|
25
39
|
## [9.3.30](https://github.com/microsoft/fluentui/tree/@fluentui/react-accordion_v9.3.30)
|
|
26
40
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { getIntrinsicElementProps,
|
|
3
|
-
import {
|
|
2
|
+
import { getIntrinsicElementProps, useEventCallback, slot, isResolvedShorthand } from '@fluentui/react-utilities';
|
|
3
|
+
import { useARIAButtonProps } from '@fluentui/react-aria';
|
|
4
4
|
import { useAccordionContext_unstable } from '../../contexts/accordion';
|
|
5
5
|
import { ChevronRightRegular } from '@fluentui/react-icons';
|
|
6
6
|
import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';
|
|
@@ -27,6 +27,27 @@ import { useAccordionItemContext_unstable } from '../../contexts/accordionItem';
|
|
|
27
27
|
// Otherwise, the chevron points down [v] when open, and right [>] (or left [<] in RTL) when closed
|
|
28
28
|
expandIconRotation = open ? 90 : dir !== 'rtl' ? 0 : 180;
|
|
29
29
|
}
|
|
30
|
+
const buttonSlot = slot.always(button, {
|
|
31
|
+
elementType: 'button',
|
|
32
|
+
defaultProps: {
|
|
33
|
+
disabled,
|
|
34
|
+
disabledFocusable,
|
|
35
|
+
'aria-expanded': open,
|
|
36
|
+
type: 'button'
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
buttonSlot.onClick = useEventCallback((event)=>{
|
|
40
|
+
if (isResolvedShorthand(button)) {
|
|
41
|
+
var _button_onClick;
|
|
42
|
+
(_button_onClick = button.onClick) === null || _button_onClick === void 0 ? void 0 : _button_onClick.call(button, event);
|
|
43
|
+
}
|
|
44
|
+
if (!event.defaultPrevented) {
|
|
45
|
+
requestToggle({
|
|
46
|
+
value,
|
|
47
|
+
event
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
});
|
|
30
51
|
return {
|
|
31
52
|
disabled,
|
|
32
53
|
open,
|
|
@@ -63,30 +84,6 @@ import { useAccordionItemContext_unstable } from '../../contexts/accordionItem';
|
|
|
63
84
|
},
|
|
64
85
|
elementType: 'span'
|
|
65
86
|
}),
|
|
66
|
-
button:
|
|
67
|
-
...useARIAButtonShorthand(button, {
|
|
68
|
-
required: true,
|
|
69
|
-
defaultProps: {
|
|
70
|
-
disabled,
|
|
71
|
-
disabledFocusable,
|
|
72
|
-
'aria-expanded': open,
|
|
73
|
-
type: 'button'
|
|
74
|
-
}
|
|
75
|
-
}),
|
|
76
|
-
onClick: useEventCallback((event)=>{
|
|
77
|
-
if (isResolvedShorthand(button)) {
|
|
78
|
-
var _button_onClick;
|
|
79
|
-
(_button_onClick = button.onClick) === null || _button_onClick === void 0 ? void 0 : _button_onClick.call(button, event);
|
|
80
|
-
}
|
|
81
|
-
if (!event.defaultPrevented) {
|
|
82
|
-
requestToggle({
|
|
83
|
-
value,
|
|
84
|
-
event
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
})
|
|
88
|
-
}, {
|
|
89
|
-
elementType: 'button'
|
|
90
|
-
})
|
|
87
|
+
button: useARIAButtonProps(buttonSlot.as, buttonSlot)
|
|
91
88
|
};
|
|
92
89
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAccordionHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps,
|
|
1
|
+
{"version":3,"sources":["useAccordionHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useEventCallback, slot, isResolvedShorthand } from '@fluentui/react-utilities';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\nimport type { AccordionHeaderProps, AccordionHeaderState } from './AccordionHeader.types';\nimport { useAccordionContext_unstable } from '../../contexts/accordion';\nimport { ChevronRightRegular } from '@fluentui/react-icons';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { useAccordionItemContext_unstable } from '../../contexts/accordionItem';\n\n/**\n * Returns the props and state required to render the component\n * @param props - AccordionHeader properties\n * @param ref - reference to root HTMLElement of AccordionHeader\n */\nexport const useAccordionHeader_unstable = (\n props: AccordionHeaderProps,\n ref: React.Ref<HTMLElement>,\n): AccordionHeaderState => {\n const { icon, button, expandIcon, inline = false, size = 'medium', expandIconPosition = 'start' } = props;\n const { value, disabled, open } = useAccordionItemContext_unstable();\n const requestToggle = useAccordionContext_unstable(ctx => ctx.requestToggle);\n\n /**\n * force disabled state on button if accordion isn't collapsible\n * and this is the only item opened\n */\n const disabledFocusable = useAccordionContext_unstable(ctx => !ctx.collapsible && ctx.openItems.length === 1 && open);\n\n const { dir } = useFluent();\n\n // Calculate how to rotate the expand icon [>] (ChevronRightRegular)\n let expandIconRotation: 0 | 90 | -90 | 180;\n if (expandIconPosition === 'end') {\n // If expand icon is at the end, the chevron points up [^] when open, and down [v] when closed\n expandIconRotation = open ? -90 : 90;\n } else {\n // Otherwise, the chevron points down [v] when open, and right [>] (or left [<] in RTL) when closed\n expandIconRotation = open ? 90 : dir !== 'rtl' ? 0 : 180;\n }\n\n const buttonSlot = slot.always(button, {\n elementType: 'button',\n defaultProps: {\n disabled,\n disabledFocusable,\n 'aria-expanded': open,\n type: 'button',\n },\n });\n\n buttonSlot.onClick = useEventCallback(event => {\n if (isResolvedShorthand(button)) {\n button.onClick?.(event);\n }\n if (!event.defaultPrevented) {\n requestToggle({ value, event });\n }\n });\n\n return {\n disabled,\n open,\n size,\n inline,\n expandIconPosition,\n components: {\n root: 'div',\n button: 'button',\n expandIcon: 'span',\n icon: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n ...props,\n }),\n { elementType: 'div' },\n ),\n icon: slot.optional(icon, { elementType: 'div' }),\n expandIcon: slot.optional(expandIcon, {\n renderByDefault: true,\n defaultProps: {\n children: <ChevronRightRegular style={{ transform: `rotate(${expandIconRotation}deg)` }} />,\n 'aria-hidden': true,\n },\n elementType: 'span',\n }),\n button: useARIAButtonProps(buttonSlot.as, buttonSlot),\n };\n};\n"],"names":["React","getIntrinsicElementProps","useEventCallback","slot","isResolvedShorthand","useARIAButtonProps","useAccordionContext_unstable","ChevronRightRegular","useFluent_unstable","useFluent","useAccordionItemContext_unstable","useAccordionHeader_unstable","props","ref","icon","button","expandIcon","inline","size","expandIconPosition","value","disabled","open","requestToggle","ctx","disabledFocusable","collapsible","openItems","length","dir","expandIconRotation","buttonSlot","always","elementType","defaultProps","type","onClick","event","defaultPrevented","components","root","optional","renderByDefault","children","style","transform","as"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,gBAAgB,EAAEC,IAAI,EAAEC,mBAAmB,QAAQ,4BAA4B;AAClH,SAASC,kBAAkB,QAAQ,uBAAuB;AAE1D,SAASC,4BAA4B,QAAQ,2BAA2B;AACxE,SAASC,mBAAmB,QAAQ,wBAAwB;AAC5D,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAClF,SAASC,gCAAgC,QAAQ,+BAA+B;AAEhF;;;;CAIC,GACD,OAAO,MAAMC,8BAA8B,CACzCC,OACAC;IAEA,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAEC,UAAU,EAAEC,SAAS,KAAK,EAAEC,OAAO,QAAQ,EAAEC,qBAAqB,OAAO,EAAE,GAAGP;IACpG,MAAM,EAAEQ,KAAK,EAAEC,QAAQ,EAAEC,IAAI,EAAE,GAAGZ;IAClC,MAAMa,gBAAgBjB,6BAA6BkB,CAAAA,MAAOA,IAAID,aAAa;IAE3E;;;GAGC,GACD,MAAME,oBAAoBnB,6BAA6BkB,CAAAA,MAAO,CAACA,IAAIE,WAAW,IAAIF,IAAIG,SAAS,CAACC,MAAM,KAAK,KAAKN;IAEhH,MAAM,EAAEO,GAAG,EAAE,GAAGpB;IAEhB,oEAAoE;IACpE,IAAIqB;IACJ,IAAIX,uBAAuB,OAAO;QAChC,8FAA8F;QAC9FW,qBAAqBR,OAAO,CAAC,KAAK;IACpC,OAAO;QACL,mGAAmG;QACnGQ,qBAAqBR,OAAO,KAAKO,QAAQ,QAAQ,IAAI;IACvD;IAEA,MAAME,aAAa5B,KAAK6B,MAAM,CAACjB,QAAQ;QACrCkB,aAAa;QACbC,cAAc;YACZb;YACAI;YACA,iBAAiBH;YACjBa,MAAM;QACR;IACF;IAEAJ,WAAWK,OAAO,GAAGlC,iBAAiBmC,CAAAA;QACpC,IAAIjC,oBAAoBW,SAAS;gBAC/BA;aAAAA,kBAAAA,OAAOqB,OAAO,cAAdrB,sCAAAA,qBAAAA,QAAiBsB;QACnB;QACA,IAAI,CAACA,MAAMC,gBAAgB,EAAE;YAC3Bf,cAAc;gBAAEH;gBAAOiB;YAAM;QAC/B;IACF;IAEA,OAAO;QACLhB;QACAC;QACAJ;QACAD;QACAE;QACAoB,YAAY;YACVC,MAAM;YACNzB,QAAQ;YACRC,YAAY;YACZF,MAAM;QACR;QACA0B,MAAMrC,KAAK6B,MAAM,CACf/B,yBAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FY,KAAKA;YACL,GAAGD,KAAK;QACV,IACA;YAAEqB,aAAa;QAAM;QAEvBnB,MAAMX,KAAKsC,QAAQ,CAAC3B,MAAM;YAAEmB,aAAa;QAAM;QAC/CjB,YAAYb,KAAKsC,QAAQ,CAACzB,YAAY;YACpC0B,iBAAiB;YACjBR,cAAc;gBACZS,wBAAU,oBAACpC;oBAAoBqC,OAAO;wBAAEC,WAAW,CAAC,OAAO,EAAEf,mBAAmB,IAAI,CAAC;oBAAC;;gBACtF,eAAe;YACjB;YACAG,aAAa;QACf;QACAlB,QAAQV,mBAAmB0B,WAAWe,EAAE,EAAEf;IAC5C;AACF,EAAE"}
|
|
@@ -34,6 +34,27 @@ const useAccordionHeader_unstable = (props, ref)=>{
|
|
|
34
34
|
// Otherwise, the chevron points down [v] when open, and right [>] (or left [<] in RTL) when closed
|
|
35
35
|
expandIconRotation = open ? 90 : dir !== 'rtl' ? 0 : 180;
|
|
36
36
|
}
|
|
37
|
+
const buttonSlot = _reactutilities.slot.always(button, {
|
|
38
|
+
elementType: 'button',
|
|
39
|
+
defaultProps: {
|
|
40
|
+
disabled,
|
|
41
|
+
disabledFocusable,
|
|
42
|
+
'aria-expanded': open,
|
|
43
|
+
type: 'button'
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
buttonSlot.onClick = (0, _reactutilities.useEventCallback)((event)=>{
|
|
47
|
+
if ((0, _reactutilities.isResolvedShorthand)(button)) {
|
|
48
|
+
var _button_onClick;
|
|
49
|
+
(_button_onClick = button.onClick) === null || _button_onClick === void 0 ? void 0 : _button_onClick.call(button, event);
|
|
50
|
+
}
|
|
51
|
+
if (!event.defaultPrevented) {
|
|
52
|
+
requestToggle({
|
|
53
|
+
value,
|
|
54
|
+
event
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
});
|
|
37
58
|
return {
|
|
38
59
|
disabled,
|
|
39
60
|
open,
|
|
@@ -70,30 +91,6 @@ const useAccordionHeader_unstable = (props, ref)=>{
|
|
|
70
91
|
},
|
|
71
92
|
elementType: 'span'
|
|
72
93
|
}),
|
|
73
|
-
button:
|
|
74
|
-
...(0, _reactaria.useARIAButtonShorthand)(button, {
|
|
75
|
-
required: true,
|
|
76
|
-
defaultProps: {
|
|
77
|
-
disabled,
|
|
78
|
-
disabledFocusable,
|
|
79
|
-
'aria-expanded': open,
|
|
80
|
-
type: 'button'
|
|
81
|
-
}
|
|
82
|
-
}),
|
|
83
|
-
onClick: (0, _reactutilities.useEventCallback)((event)=>{
|
|
84
|
-
if ((0, _reactutilities.isResolvedShorthand)(button)) {
|
|
85
|
-
var _button_onClick;
|
|
86
|
-
(_button_onClick = button.onClick) === null || _button_onClick === void 0 ? void 0 : _button_onClick.call(button, event);
|
|
87
|
-
}
|
|
88
|
-
if (!event.defaultPrevented) {
|
|
89
|
-
requestToggle({
|
|
90
|
-
value,
|
|
91
|
-
event
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
})
|
|
95
|
-
}, {
|
|
96
|
-
elementType: 'button'
|
|
97
|
-
})
|
|
94
|
+
button: (0, _reactaria.useARIAButtonProps)(buttonSlot.as, buttonSlot)
|
|
98
95
|
};
|
|
99
96
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAccordionHeader.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps,
|
|
1
|
+
{"version":3,"sources":["useAccordionHeader.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useEventCallback, slot, isResolvedShorthand } from '@fluentui/react-utilities';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\nimport { useAccordionContext_unstable } from '../../contexts/accordion';\nimport { ChevronRightRegular } from '@fluentui/react-icons';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { useAccordionItemContext_unstable } from '../../contexts/accordionItem';\n/**\n * Returns the props and state required to render the component\n * @param props - AccordionHeader properties\n * @param ref - reference to root HTMLElement of AccordionHeader\n */ export const useAccordionHeader_unstable = (props, ref)=>{\n const { icon, button, expandIcon, inline = false, size = 'medium', expandIconPosition = 'start' } = props;\n const { value, disabled, open } = useAccordionItemContext_unstable();\n const requestToggle = useAccordionContext_unstable((ctx)=>ctx.requestToggle);\n /**\n * force disabled state on button if accordion isn't collapsible\n * and this is the only item opened\n */ const disabledFocusable = useAccordionContext_unstable((ctx)=>!ctx.collapsible && ctx.openItems.length === 1 && open);\n const { dir } = useFluent();\n // Calculate how to rotate the expand icon [>] (ChevronRightRegular)\n let expandIconRotation;\n if (expandIconPosition === 'end') {\n // If expand icon is at the end, the chevron points up [^] when open, and down [v] when closed\n expandIconRotation = open ? -90 : 90;\n } else {\n // Otherwise, the chevron points down [v] when open, and right [>] (or left [<] in RTL) when closed\n expandIconRotation = open ? 90 : dir !== 'rtl' ? 0 : 180;\n }\n const buttonSlot = slot.always(button, {\n elementType: 'button',\n defaultProps: {\n disabled,\n disabledFocusable,\n 'aria-expanded': open,\n type: 'button'\n }\n });\n buttonSlot.onClick = useEventCallback((event)=>{\n if (isResolvedShorthand(button)) {\n var _button_onClick;\n (_button_onClick = button.onClick) === null || _button_onClick === void 0 ? void 0 : _button_onClick.call(button, event);\n }\n if (!event.defaultPrevented) {\n requestToggle({\n value,\n event\n });\n }\n });\n return {\n disabled,\n open,\n size,\n inline,\n expandIconPosition,\n components: {\n root: 'div',\n button: 'button',\n expandIcon: 'span',\n icon: 'div'\n },\n root: slot.always(getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref,\n ...props\n }), {\n elementType: 'div'\n }),\n icon: slot.optional(icon, {\n elementType: 'div'\n }),\n expandIcon: slot.optional(expandIcon, {\n renderByDefault: true,\n defaultProps: {\n children: /*#__PURE__*/ React.createElement(ChevronRightRegular, {\n style: {\n transform: `rotate(${expandIconRotation}deg)`\n }\n }),\n 'aria-hidden': true\n },\n elementType: 'span'\n }),\n button: useARIAButtonProps(buttonSlot.as, buttonSlot)\n };\n};\n"],"names":["useAccordionHeader_unstable","props","ref","icon","button","expandIcon","inline","size","expandIconPosition","value","disabled","open","useAccordionItemContext_unstable","requestToggle","useAccordionContext_unstable","ctx","disabledFocusable","collapsible","openItems","length","dir","useFluent","expandIconRotation","buttonSlot","slot","always","elementType","defaultProps","type","onClick","useEventCallback","event","isResolvedShorthand","_button_onClick","call","defaultPrevented","components","root","getIntrinsicElementProps","optional","renderByDefault","children","React","createElement","ChevronRightRegular","style","transform","useARIAButtonProps","as"],"mappings":";;;;+BAWiBA;;;eAAAA;;;;iEAXM;gCAC+D;2BACnD;2BACU;4BACT;qCACY;+BACC;AAKtC,MAAMA,8BAA8B,CAACC,OAAOC;IACnD,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAEC,UAAU,EAAEC,SAAS,KAAK,EAAEC,OAAO,QAAQ,EAAEC,qBAAqB,OAAO,EAAE,GAAGP;IACpG,MAAM,EAAEQ,KAAK,EAAEC,QAAQ,EAAEC,IAAI,EAAE,GAAGC,IAAAA,+CAAgC;IAClE,MAAMC,gBAAgBC,IAAAA,uCAA4B,EAAC,CAACC,MAAMA,IAAIF,aAAa;IAC3E;;;GAGD,GAAG,MAAMG,oBAAoBF,IAAAA,uCAA4B,EAAC,CAACC,MAAM,CAACA,IAAIE,WAAW,IAAIF,IAAIG,SAAS,CAACC,MAAM,KAAK,KAAKR;IAClH,MAAM,EAAES,GAAG,EAAE,GAAGC,IAAAA,uCAAS;IACzB,oEAAoE;IACpE,IAAIC;IACJ,IAAId,uBAAuB,OAAO;QAC9B,8FAA8F;QAC9Fc,qBAAqBX,OAAO,CAAC,KAAK;IACtC,OAAO;QACH,mGAAmG;QACnGW,qBAAqBX,OAAO,KAAKS,QAAQ,QAAQ,IAAI;IACzD;IACA,MAAMG,aAAaC,oBAAI,CAACC,MAAM,CAACrB,QAAQ;QACnCsB,aAAa;QACbC,cAAc;YACVjB;YACAM;YACA,iBAAiBL;YACjBiB,MAAM;QACV;IACJ;IACAL,WAAWM,OAAO,GAAGC,IAAAA,gCAAgB,EAAC,CAACC;QACnC,IAAIC,IAAAA,mCAAmB,EAAC5B,SAAS;YAC7B,IAAI6B;YACHA,CAAAA,kBAAkB7B,OAAOyB,OAAO,AAAD,MAAO,QAAQI,oBAAoB,KAAK,IAAI,KAAK,IAAIA,gBAAgBC,IAAI,CAAC9B,QAAQ2B;QACtH;QACA,IAAI,CAACA,MAAMI,gBAAgB,EAAE;YACzBtB,cAAc;gBACVJ;gBACAsB;YACJ;QACJ;IACJ;IACA,OAAO;QACHrB;QACAC;QACAJ;QACAD;QACAE;QACA4B,YAAY;YACRC,MAAM;YACNjC,QAAQ;YACRC,YAAY;YACZF,MAAM;QACV;QACAkC,MAAMb,oBAAI,CAACC,MAAM,CAACa,IAAAA,wCAAwB,EAAC,OAAO;YAC9C,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FpC,KAAKA;YACL,GAAGD,KAAK;QACZ,IAAI;YACAyB,aAAa;QACjB;QACAvB,MAAMqB,oBAAI,CAACe,QAAQ,CAACpC,MAAM;YACtBuB,aAAa;QACjB;QACArB,YAAYmB,oBAAI,CAACe,QAAQ,CAAClC,YAAY;YAClCmC,iBAAiB;YACjBb,cAAc;gBACVc,UAAU,WAAW,GAAGC,OAAMC,aAAa,CAACC,+BAAmB,EAAE;oBAC7DC,OAAO;wBACHC,WAAW,CAAC,OAAO,EAAExB,mBAAmB,IAAI,CAAC;oBACjD;gBACJ;gBACA,eAAe;YACnB;YACAI,aAAa;QACjB;QACAtB,QAAQ2C,IAAAA,6BAAkB,EAACxB,WAAWyB,EAAE,EAAEzB;IAC9C;AACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-accordion",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20231215-0405.1",
|
|
4
4
|
"description": "Fluent UI accordion component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -27,20 +27,20 @@
|
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@fluentui/eslint-plugin": "*",
|
|
30
|
-
"@fluentui/react-conformance": "0.0.0-nightly-
|
|
31
|
-
"@fluentui/react-conformance-griffel": "0.0.0-nightly-
|
|
30
|
+
"@fluentui/react-conformance": "0.0.0-nightly-20231215-0405.1",
|
|
31
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20231215-0405.1",
|
|
32
32
|
"@fluentui/scripts-api-extractor": "*",
|
|
33
33
|
"@fluentui/scripts-tasks": "*"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@fluentui/react-aria": "0.0.0-nightly-
|
|
37
|
-
"@fluentui/react-context-selector": "0.0.0-nightly-
|
|
36
|
+
"@fluentui/react-aria": "0.0.0-nightly-20231215-0405.1",
|
|
37
|
+
"@fluentui/react-context-selector": "0.0.0-nightly-20231215-0405.1",
|
|
38
38
|
"@fluentui/react-icons": "^2.0.217",
|
|
39
|
-
"@fluentui/react-jsx-runtime": "0.0.0-nightly-
|
|
40
|
-
"@fluentui/react-shared-contexts": "0.0.0-nightly-
|
|
41
|
-
"@fluentui/react-tabster": "0.0.0-nightly-
|
|
42
|
-
"@fluentui/react-theme": "0.0.0-nightly-
|
|
43
|
-
"@fluentui/react-utilities": "0.0.0-nightly-
|
|
39
|
+
"@fluentui/react-jsx-runtime": "0.0.0-nightly-20231215-0405.1",
|
|
40
|
+
"@fluentui/react-shared-contexts": "0.0.0-nightly-20231215-0405.1",
|
|
41
|
+
"@fluentui/react-tabster": "0.0.0-nightly-20231215-0405.1",
|
|
42
|
+
"@fluentui/react-theme": "0.0.0-nightly-20231215-0405.1",
|
|
43
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20231215-0405.1",
|
|
44
44
|
"@griffel/react": "^1.5.14",
|
|
45
45
|
"@swc/helpers": "^0.5.1"
|
|
46
46
|
},
|