@fluentui/react-accordion 0.0.0-nightly-20230804-0415.1 → 0.0.0-nightly-20230808-0415.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.
Files changed (35) hide show
  1. package/CHANGELOG.json +78 -21
  2. package/CHANGELOG.md +29 -13
  3. package/lib/components/Accordion/renderAccordion.js +4 -4
  4. package/lib/components/Accordion/renderAccordion.js.map +1 -1
  5. package/lib/components/Accordion/useAccordion.js +4 -2
  6. package/lib/components/Accordion/useAccordion.js.map +1 -1
  7. package/lib/components/AccordionHeader/renderAccordionHeader.js +3 -3
  8. package/lib/components/AccordionHeader/renderAccordionHeader.js.map +1 -1
  9. package/lib/components/AccordionHeader/useAccordionHeader.js +13 -8
  10. package/lib/components/AccordionHeader/useAccordionHeader.js.map +1 -1
  11. package/lib/components/AccordionItem/renderAccordionItem.js +4 -4
  12. package/lib/components/AccordionItem/renderAccordionItem.js.map +1 -1
  13. package/lib/components/AccordionItem/useAccordionItem.js +4 -2
  14. package/lib/components/AccordionItem/useAccordionItem.js.map +1 -1
  15. package/lib/components/AccordionPanel/renderAccordionPanel.js +3 -3
  16. package/lib/components/AccordionPanel/renderAccordionPanel.js.map +1 -1
  17. package/lib/components/AccordionPanel/useAccordionPanel.js +4 -2
  18. package/lib/components/AccordionPanel/useAccordionPanel.js.map +1 -1
  19. package/lib-commonjs/components/Accordion/renderAccordion.js +3 -3
  20. package/lib-commonjs/components/Accordion/renderAccordion.js.map +1 -1
  21. package/lib-commonjs/components/Accordion/useAccordion.js +3 -1
  22. package/lib-commonjs/components/Accordion/useAccordion.js.map +1 -1
  23. package/lib-commonjs/components/AccordionHeader/renderAccordionHeader.js +2 -2
  24. package/lib-commonjs/components/AccordionHeader/renderAccordionHeader.js.map +1 -1
  25. package/lib-commonjs/components/AccordionHeader/useAccordionHeader.js +12 -7
  26. package/lib-commonjs/components/AccordionHeader/useAccordionHeader.js.map +1 -1
  27. package/lib-commonjs/components/AccordionItem/renderAccordionItem.js +3 -3
  28. package/lib-commonjs/components/AccordionItem/renderAccordionItem.js.map +1 -1
  29. package/lib-commonjs/components/AccordionItem/useAccordionItem.js +3 -1
  30. package/lib-commonjs/components/AccordionItem/useAccordionItem.js.map +1 -1
  31. package/lib-commonjs/components/AccordionPanel/renderAccordionPanel.js +2 -2
  32. package/lib-commonjs/components/AccordionPanel/renderAccordionPanel.js.map +1 -1
  33. package/lib-commonjs/components/AccordionPanel/useAccordionPanel.js +3 -1
  34. package/lib-commonjs/components/AccordionPanel/useAccordionPanel.js.map +1 -1
  35. package/package.json +10 -10
package/CHANGELOG.json CHANGED
@@ -2,9 +2,9 @@
2
2
  "name": "@fluentui/react-accordion",
3
3
  "entries": [
4
4
  {
5
- "date": "Fri, 04 Aug 2023 04:21:47 GMT",
6
- "tag": "@fluentui/react-accordion_v0.0.0-nightly-20230804-0415.1",
7
- "version": "0.0.0-nightly-20230804-0415.1",
5
+ "date": "Tue, 08 Aug 2023 04:22:16 GMT",
6
+ "tag": "@fluentui/react-accordion_v0.0.0-nightly-20230808-0415.1",
7
+ "version": "0.0.0-nightly-20230808-0415.1",
8
8
  "comments": {
9
9
  "prerelease": [
10
10
  {
@@ -16,56 +16,113 @@
16
16
  {
17
17
  "author": "beachball",
18
18
  "package": "@fluentui/react-accordion",
19
- "comment": "Bump @fluentui/react-aria to v0.0.0-nightly-20230804-0415.1",
20
- "commit": "ad95d1723b836488f78769eb56b64caf31baab57"
19
+ "comment": "Bump @fluentui/react-aria to v0.0.0-nightly-20230808-0415.1",
20
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
21
21
  },
22
22
  {
23
23
  "author": "beachball",
24
24
  "package": "@fluentui/react-accordion",
25
- "comment": "Bump @fluentui/react-context-selector to v0.0.0-nightly-20230804-0415.1",
26
- "commit": "ad95d1723b836488f78769eb56b64caf31baab57"
25
+ "comment": "Bump @fluentui/react-context-selector to v0.0.0-nightly-20230808-0415.1",
26
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
27
27
  },
28
28
  {
29
29
  "author": "beachball",
30
30
  "package": "@fluentui/react-accordion",
31
- "comment": "Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230804-0415.1",
32
- "commit": "ad95d1723b836488f78769eb56b64caf31baab57"
31
+ "comment": "Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230808-0415.1",
32
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
33
33
  },
34
34
  {
35
35
  "author": "beachball",
36
36
  "package": "@fluentui/react-accordion",
37
- "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230804-0415.1",
38
- "commit": "ad95d1723b836488f78769eb56b64caf31baab57"
37
+ "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230808-0415.1",
38
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
39
39
  },
40
40
  {
41
41
  "author": "beachball",
42
42
  "package": "@fluentui/react-accordion",
43
- "comment": "Bump @fluentui/react-tabster to v0.0.0-nightly-20230804-0415.1",
44
- "commit": "ad95d1723b836488f78769eb56b64caf31baab57"
43
+ "comment": "Bump @fluentui/react-tabster to v0.0.0-nightly-20230808-0415.1",
44
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
45
45
  },
46
46
  {
47
47
  "author": "beachball",
48
48
  "package": "@fluentui/react-accordion",
49
- "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230804-0415.1",
50
- "commit": "ad95d1723b836488f78769eb56b64caf31baab57"
49
+ "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230808-0415.1",
50
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
51
51
  },
52
52
  {
53
53
  "author": "beachball",
54
54
  "package": "@fluentui/react-accordion",
55
- "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230804-0415.1",
56
- "commit": "ad95d1723b836488f78769eb56b64caf31baab57"
55
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230808-0415.1",
56
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
57
57
  },
58
58
  {
59
59
  "author": "beachball",
60
60
  "package": "@fluentui/react-accordion",
61
- "comment": "Bump @fluentui/react-conformance to v0.0.0-nightly-20230804-0415.1",
62
- "commit": "ad95d1723b836488f78769eb56b64caf31baab57"
61
+ "comment": "Bump @fluentui/react-conformance to v0.0.0-nightly-20230808-0415.1",
62
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
63
63
  },
64
64
  {
65
65
  "author": "beachball",
66
66
  "package": "@fluentui/react-accordion",
67
- "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230804-0415.1",
68
- "commit": "ad95d1723b836488f78769eb56b64caf31baab57"
67
+ "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230808-0415.1",
68
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
69
+ }
70
+ ]
71
+ }
72
+ },
73
+ {
74
+ "date": "Fri, 04 Aug 2023 08:52:55 GMT",
75
+ "tag": "@fluentui/react-accordion_v9.3.0",
76
+ "version": "9.3.0",
77
+ "comments": {
78
+ "minor": [
79
+ {
80
+ "author": "bernardo.sunderhus@gmail.com",
81
+ "package": "@fluentui/react-accordion",
82
+ "commit": "192666b54cb365f4c958f46c3e097b597ebd94fc",
83
+ "comment": "feat: make AccordionItemValue generic"
84
+ },
85
+ {
86
+ "author": "beachball",
87
+ "package": "@fluentui/react-accordion",
88
+ "comment": "Bump @fluentui/react-aria to v9.3.28",
89
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
90
+ },
91
+ {
92
+ "author": "beachball",
93
+ "package": "@fluentui/react-accordion",
94
+ "comment": "Bump @fluentui/react-context-selector to v9.1.27",
95
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
96
+ },
97
+ {
98
+ "author": "beachball",
99
+ "package": "@fluentui/react-accordion",
100
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.13",
101
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
102
+ },
103
+ {
104
+ "author": "beachball",
105
+ "package": "@fluentui/react-accordion",
106
+ "comment": "Bump @fluentui/react-shared-contexts to v9.7.1",
107
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
108
+ },
109
+ {
110
+ "author": "beachball",
111
+ "package": "@fluentui/react-accordion",
112
+ "comment": "Bump @fluentui/react-tabster to v9.12.0",
113
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
114
+ },
115
+ {
116
+ "author": "beachball",
117
+ "package": "@fluentui/react-accordion",
118
+ "comment": "Bump @fluentui/react-theme to v9.1.10",
119
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
120
+ },
121
+ {
122
+ "author": "beachball",
123
+ "package": "@fluentui/react-accordion",
124
+ "comment": "Bump @fluentui/react-utilities to v9.11.0",
125
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
69
126
  }
70
127
  ]
71
128
  }
package/CHANGELOG.md CHANGED
@@ -1,26 +1,42 @@
1
1
  # Change Log - @fluentui/react-accordion
2
2
 
3
- This log was last generated on Fri, 04 Aug 2023 04:21:47 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 08 Aug 2023 04:22:16 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20230804-0415.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-accordion_v0.0.0-nightly-20230804-0415.1)
7
+ ## [0.0.0-nightly-20230808-0415.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-accordion_v0.0.0-nightly-20230808-0415.1)
8
8
 
9
- Fri, 04 Aug 2023 04:21:47 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-accordion_v9.2.0..@fluentui/react-accordion_v0.0.0-nightly-20230804-0415.1)
9
+ Tue, 08 Aug 2023 04:22:16 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-accordion_v9.3.0..@fluentui/react-accordion_v0.0.0-nightly-20230808-0415.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-20230804-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/ad95d1723b836488f78769eb56b64caf31baab57) by beachball)
16
- - Bump @fluentui/react-context-selector to v0.0.0-nightly-20230804-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/ad95d1723b836488f78769eb56b64caf31baab57) by beachball)
17
- - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230804-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/ad95d1723b836488f78769eb56b64caf31baab57) by beachball)
18
- - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230804-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/ad95d1723b836488f78769eb56b64caf31baab57) by beachball)
19
- - Bump @fluentui/react-tabster to v0.0.0-nightly-20230804-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/ad95d1723b836488f78769eb56b64caf31baab57) by beachball)
20
- - Bump @fluentui/react-theme to v0.0.0-nightly-20230804-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/ad95d1723b836488f78769eb56b64caf31baab57) by beachball)
21
- - Bump @fluentui/react-utilities to v0.0.0-nightly-20230804-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/ad95d1723b836488f78769eb56b64caf31baab57) by beachball)
22
- - Bump @fluentui/react-conformance to v0.0.0-nightly-20230804-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/ad95d1723b836488f78769eb56b64caf31baab57) by beachball)
23
- - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230804-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/ad95d1723b836488f78769eb56b64caf31baab57) by beachball)
15
+ - Bump @fluentui/react-aria to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
16
+ - Bump @fluentui/react-context-selector to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
17
+ - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
18
+ - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
19
+ - Bump @fluentui/react-tabster to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
20
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
21
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
22
+ - Bump @fluentui/react-conformance to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
23
+ - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
24
+
25
+ ## [9.3.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-accordion_v9.3.0)
26
+
27
+ Fri, 04 Aug 2023 08:52:55 GMT
28
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-accordion_v9.2.0..@fluentui/react-accordion_v9.3.0)
29
+
30
+ ### Minor changes
31
+
32
+ - feat: make AccordionItemValue generic ([PR #28665](https://github.com/microsoft/fluentui/pull/28665) by bernardo.sunderhus@gmail.com)
33
+ - Bump @fluentui/react-aria to v9.3.28 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
34
+ - Bump @fluentui/react-context-selector to v9.1.27 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
35
+ - Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.13 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
36
+ - Bump @fluentui/react-shared-contexts to v9.7.1 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
37
+ - Bump @fluentui/react-tabster to v9.12.0 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
38
+ - Bump @fluentui/react-theme to v9.1.10 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
39
+ - Bump @fluentui/react-utilities to v9.11.0 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
24
40
 
25
41
  ## [9.2.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-accordion_v9.2.0)
26
42
 
@@ -1,11 +1,11 @@
1
1
  /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
2
- import { getSlotsNext } from '@fluentui/react-utilities';
2
+ import { assertSlots } from '@fluentui/react-utilities';
3
3
  import { AccordionProvider } from '../../contexts/accordion';
4
4
  /**
5
5
  * Function that renders the final JSX of the component
6
6
  */ export const renderAccordion_unstable = (state, contextValues)=>{
7
- const { slots , slotProps } = getSlotsNext(state);
8
- return /*#__PURE__*/ createElement(slots.root, slotProps.root, /*#__PURE__*/ createElement(AccordionProvider, {
7
+ assertSlots(state);
8
+ return /*#__PURE__*/ createElement(state.root, null, /*#__PURE__*/ createElement(AccordionProvider, {
9
9
  value: contextValues.accordion
10
- }, slotProps.root.children));
10
+ }, state.root.children));
11
11
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderAccordion.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } from '@fluentui/react-utilities';\n\nimport type { AccordionState, AccordionSlots, AccordionContextValues } from './Accordion.types';\nimport { AccordionProvider } from '../../contexts/accordion';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderAccordion_unstable = (state: AccordionState, contextValues: AccordionContextValues) => {\n const { slots, slotProps } = getSlotsNext<AccordionSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n <AccordionProvider value={contextValues.accordion}>{slotProps.root.children}</AccordionProvider>\n </slots.root>\n );\n};\n"],"names":["createElement","getSlotsNext","AccordionProvider","renderAccordion_unstable","state","contextValues","slots","slotProps","root","value","accordion","children"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,YAAY,QAAQ,4BAA4B;AAGzD,SAASC,iBAAiB,QAAQ,2BAA2B;AAE7D;;CAEC,GACD,OAAO,MAAMC,2BAA2B,CAACC,OAAuBC,gBAA0C;IACxG,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGN,aAA6BG;IAE1D,qBACE,AAhBJ,cAgBKE,MAAME,IAAI,EAAKD,UAAUC,IAAI,gBAC5B,AAjBN,cAiBON;QAAkBO,OAAOJ,cAAcK,SAAS;OAAGH,UAAUC,IAAI,CAACG,QAAQ;AAGjF,EAAE"}
1
+ {"version":3,"sources":["renderAccordion.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { assertSlots } from '@fluentui/react-utilities';\n\nimport type { AccordionState, AccordionSlots, AccordionContextValues } from './Accordion.types';\nimport { AccordionProvider } from '../../contexts/accordion';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderAccordion_unstable = (state: AccordionState, contextValues: AccordionContextValues) => {\n assertSlots<AccordionSlots>(state);\n\n return (\n <state.root>\n <AccordionProvider value={contextValues.accordion}>{state.root.children}</AccordionProvider>\n </state.root>\n );\n};\n"],"names":["createElement","assertSlots","AccordionProvider","renderAccordion_unstable","state","contextValues","root","value","accordion","children"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,WAAW,QAAQ,4BAA4B;AAGxD,SAASC,iBAAiB,QAAQ,2BAA2B;AAE7D;;CAEC,GACD,OAAO,MAAMC,2BAA2B,CAACC,OAAuBC,gBAA0C;IACxGJ,YAA4BG;IAE5B,qBACE,AAhBJ,cAgBKA,MAAME,IAAI,sBACT,AAjBN,cAiBOJ;QAAkBK,OAAOF,cAAcG,SAAS;OAAGJ,MAAME,IAAI,CAACG,QAAQ;AAG7E,EAAE"}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { getNativeElementProps, useControllableState, useEventCallback } from '@fluentui/react-utilities';
2
+ import { getNativeElementProps, useControllableState, useEventCallback, slot } from '@fluentui/react-utilities';
3
3
  import { useArrowNavigationGroup } from '@fluentui/react-tabster';
4
4
  /**
5
5
  * Returns the props and state required to render the component
@@ -38,10 +38,12 @@ import { useArrowNavigationGroup } from '@fluentui/react-tabster';
38
38
  components: {
39
39
  root: 'div'
40
40
  },
41
- root: getNativeElementProps('div', {
41
+ root: slot.always(getNativeElementProps('div', {
42
42
  ...props,
43
43
  ...navigation ? arrowNavigationProps : undefined,
44
44
  ref
45
+ }), {
46
+ elementType: 'div'
45
47
  })
46
48
  };
47
49
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["useAccordion.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useControllableState, useEventCallback } from '@fluentui/react-utilities';\nimport type { AccordionProps, AccordionState } from './Accordion.types';\nimport type { AccordionItemValue } from '../AccordionItem/AccordionItem.types';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport { AccordionRequestToggleData } from '../../contexts/accordion';\n\n/**\n * Returns the props and state required to render the component\n * @param props - Accordion properties\n * @param ref - reference to root HTMLElement of Accordion\n */\nexport const useAccordion_unstable = <Value = AccordionItemValue>(\n props: AccordionProps<Value>,\n ref: React.Ref<HTMLElement>,\n): AccordionState<Value> => {\n const {\n openItems: controlledOpenItems,\n defaultOpenItems,\n multiple = false,\n collapsible = false,\n onToggle,\n navigation,\n } = props;\n const [openItems, setOpenItems] = useControllableState({\n state: React.useMemo(() => normalizeValues(controlledOpenItems), [controlledOpenItems]),\n defaultState: () => initializeUncontrolledOpenItems({ defaultOpenItems, multiple }),\n initialState: [],\n });\n\n const arrowNavigationProps = useArrowNavigationGroup({\n circular: navigation === 'circular',\n tabbable: true,\n });\n\n const requestToggle = useEventCallback((data: AccordionRequestToggleData<Value>) => {\n const nextOpenItems = updateOpenItems(data.value, openItems, multiple, collapsible);\n onToggle?.(data.event, { value: data.value, openItems: nextOpenItems });\n setOpenItems(nextOpenItems);\n });\n\n return {\n collapsible,\n multiple,\n navigation,\n openItems,\n requestToggle,\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ...props,\n ...(navigation ? arrowNavigationProps : undefined),\n ref,\n }),\n };\n};\n\n/**\n * Initial value for the uncontrolled case of the list of open indexes\n */\nfunction initializeUncontrolledOpenItems<Value = AccordionItemValue>({\n defaultOpenItems,\n multiple,\n}: Pick<AccordionProps<Value>, 'defaultOpenItems' | 'multiple'>): Value[] {\n if (defaultOpenItems !== undefined) {\n if (Array.isArray(defaultOpenItems)) {\n return multiple ? defaultOpenItems : [defaultOpenItems[0]];\n }\n return [defaultOpenItems];\n }\n return [];\n}\n\n/**\n * Updates the list of open indexes based on an index that changes\n * @param value - the index that will change\n * @param previousOpenItems - list of current open indexes\n * @param multiple - if Accordion support multiple Panels opened at the same time\n * @param collapsible - if Accordion support multiple Panels closed at the same time\n */\nfunction updateOpenItems<Value = AccordionItemValue>(\n value: Value,\n previousOpenItems: Value[],\n multiple: boolean,\n collapsible: boolean,\n) {\n if (multiple) {\n if (previousOpenItems.includes(value)) {\n if (previousOpenItems.length > 1 || collapsible) {\n return previousOpenItems.filter(i => i !== value);\n }\n } else {\n return [...previousOpenItems, value].sort();\n }\n } else {\n return previousOpenItems[0] === value && collapsible ? [] : [value];\n }\n return previousOpenItems;\n}\n\n/**\n * Normalizes Accordion index into an array of indexes\n */\nfunction normalizeValues<Value = AccordionItemValue>(index?: Value | Value[]): Value[] | undefined {\n if (index === undefined) {\n return undefined;\n }\n return Array.isArray(index) ? index : [index];\n}\n"],"names":["React","getNativeElementProps","useControllableState","useEventCallback","useArrowNavigationGroup","useAccordion_unstable","props","ref","openItems","controlledOpenItems","defaultOpenItems","multiple","collapsible","onToggle","navigation","setOpenItems","state","useMemo","normalizeValues","defaultState","initializeUncontrolledOpenItems","initialState","arrowNavigationProps","circular","tabbable","requestToggle","data","nextOpenItems","updateOpenItems","value","event","components","root","undefined","Array","isArray","previousOpenItems","includes","length","filter","i","sort","index"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,oBAAoB,EAAEC,gBAAgB,QAAQ,4BAA4B;AAG1G,SAASC,uBAAuB,QAAQ,0BAA0B;AAGlE;;;;CAIC,GACD,OAAO,MAAMC,wBAAwB,CACnCC,OACAC,MAC0B;IAC1B,MAAM,EACJC,WAAWC,oBAAmB,EAC9BC,iBAAgB,EAChBC,UAAW,KAAK,CAAA,EAChBC,aAAc,KAAK,CAAA,EACnBC,SAAQ,EACRC,WAAU,EACX,GAAGR;IACJ,MAAM,CAACE,WAAWO,aAAa,GAAGb,qBAAqB;QACrDc,OAAOhB,MAAMiB,OAAO,CAAC,IAAMC,gBAAgBT,sBAAsB;YAACA;SAAoB;QACtFU,cAAc,IAAMC,gCAAgC;gBAAEV;gBAAkBC;YAAS;QACjFU,cAAc,EAAE;IAClB;IAEA,MAAMC,uBAAuBlB,wBAAwB;QACnDmB,UAAUT,eAAe;QACzBU,UAAU,IAAI;IAChB;IAEA,MAAMC,gBAAgBtB,iBAAiB,CAACuB,OAA4C;QAClF,MAAMC,gBAAgBC,gBAAgBF,KAAKG,KAAK,EAAErB,WAAWG,UAAUC;QACvEC,qBAAAA,sBAAAA,KAAAA,IAAAA,SAAWa,KAAKI,KAAK,EAAE;YAAED,OAAOH,KAAKG,KAAK;YAAErB,WAAWmB;QAAc;QACrEZ,aAAaY;IACf;IAEA,OAAO;QACLf;QACAD;QACAG;QACAN;QACAiB;QACAM,YAAY;YACVC,MAAM;QACR;QACAA,MAAM/B,sBAAsB,OAAO;YACjC,GAAGK,KAAK;YACR,GAAIQ,aAAaQ,uBAAuBW,SAAS;YACjD1B;QACF;IACF;AACF,EAAE;AAEF;;CAEC,GACD,SAASa,gCAA4D,EACnEV,iBAAgB,EAChBC,SAAQ,EACqD,EAAW;IACxE,IAAID,qBAAqBuB,WAAW;QAClC,IAAIC,MAAMC,OAAO,CAACzB,mBAAmB;YACnC,OAAOC,WAAWD,mBAAmB;gBAACA,gBAAgB,CAAC,EAAE;aAAC;QAC5D,CAAC;QACD,OAAO;YAACA;SAAiB;IAC3B,CAAC;IACD,OAAO,EAAE;AACX;AAEA;;;;;;CAMC,GACD,SAASkB,gBACPC,KAAY,EACZO,iBAA0B,EAC1BzB,QAAiB,EACjBC,WAAoB,EACpB;IACA,IAAID,UAAU;QACZ,IAAIyB,kBAAkBC,QAAQ,CAACR,QAAQ;YACrC,IAAIO,kBAAkBE,MAAM,GAAG,KAAK1B,aAAa;gBAC/C,OAAOwB,kBAAkBG,MAAM,CAACC,CAAAA,IAAKA,MAAMX;YAC7C,CAAC;QACH,OAAO;YACL,OAAO;mBAAIO;gBAAmBP;aAAM,CAACY,IAAI;QAC3C,CAAC;IACH,OAAO;QACL,OAAOL,iBAAiB,CAAC,EAAE,KAAKP,SAASjB,cAAc,EAAE,GAAG;YAACiB;SAAM;IACrE,CAAC;IACD,OAAOO;AACT;AAEA;;CAEC,GACD,SAASlB,gBAA4CwB,KAAuB,EAAuB;IACjG,IAAIA,UAAUT,WAAW;QACvB,OAAOA;IACT,CAAC;IACD,OAAOC,MAAMC,OAAO,CAACO,SAASA,QAAQ;QAACA;KAAM;AAC/C"}
1
+ {"version":3,"sources":["useAccordion.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useControllableState, useEventCallback, slot } from '@fluentui/react-utilities';\nimport type { AccordionProps, AccordionState } from './Accordion.types';\nimport type { AccordionItemValue } from '../AccordionItem/AccordionItem.types';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport { AccordionRequestToggleData } from '../../contexts/accordion';\n\n/**\n * Returns the props and state required to render the component\n * @param props - Accordion properties\n * @param ref - reference to root HTMLElement of Accordion\n */\nexport const useAccordion_unstable = <Value = AccordionItemValue>(\n props: AccordionProps<Value>,\n ref: React.Ref<HTMLElement>,\n): AccordionState<Value> => {\n const {\n openItems: controlledOpenItems,\n defaultOpenItems,\n multiple = false,\n collapsible = false,\n onToggle,\n navigation,\n } = props;\n const [openItems, setOpenItems] = useControllableState({\n state: React.useMemo(() => normalizeValues(controlledOpenItems), [controlledOpenItems]),\n defaultState: () => initializeUncontrolledOpenItems({ defaultOpenItems, multiple }),\n initialState: [],\n });\n\n const arrowNavigationProps = useArrowNavigationGroup({\n circular: navigation === 'circular',\n tabbable: true,\n });\n\n const requestToggle = useEventCallback((data: AccordionRequestToggleData<Value>) => {\n const nextOpenItems = updateOpenItems(data.value, openItems, multiple, collapsible);\n onToggle?.(data.event, { value: data.value, openItems: nextOpenItems });\n setOpenItems(nextOpenItems);\n });\n\n return {\n collapsible,\n multiple,\n navigation,\n openItems,\n requestToggle,\n components: {\n root: 'div',\n },\n root: slot.always(\n getNativeElementProps('div', {\n ...props,\n ...(navigation ? arrowNavigationProps : undefined),\n ref,\n }),\n { elementType: 'div' },\n ),\n };\n};\n\n/**\n * Initial value for the uncontrolled case of the list of open indexes\n */\nfunction initializeUncontrolledOpenItems<Value = AccordionItemValue>({\n defaultOpenItems,\n multiple,\n}: Pick<AccordionProps<Value>, 'defaultOpenItems' | 'multiple'>): Value[] {\n if (defaultOpenItems !== undefined) {\n if (Array.isArray(defaultOpenItems)) {\n return multiple ? defaultOpenItems : [defaultOpenItems[0]];\n }\n return [defaultOpenItems];\n }\n return [];\n}\n\n/**\n * Updates the list of open indexes based on an index that changes\n * @param value - the index that will change\n * @param previousOpenItems - list of current open indexes\n * @param multiple - if Accordion support multiple Panels opened at the same time\n * @param collapsible - if Accordion support multiple Panels closed at the same time\n */\nfunction updateOpenItems<Value = AccordionItemValue>(\n value: Value,\n previousOpenItems: Value[],\n multiple: boolean,\n collapsible: boolean,\n) {\n if (multiple) {\n if (previousOpenItems.includes(value)) {\n if (previousOpenItems.length > 1 || collapsible) {\n return previousOpenItems.filter(i => i !== value);\n }\n } else {\n return [...previousOpenItems, value].sort();\n }\n } else {\n return previousOpenItems[0] === value && collapsible ? [] : [value];\n }\n return previousOpenItems;\n}\n\n/**\n * Normalizes Accordion index into an array of indexes\n */\nfunction normalizeValues<Value = AccordionItemValue>(index?: Value | Value[]): Value[] | undefined {\n if (index === undefined) {\n return undefined;\n }\n return Array.isArray(index) ? index : [index];\n}\n"],"names":["React","getNativeElementProps","useControllableState","useEventCallback","slot","useArrowNavigationGroup","useAccordion_unstable","props","ref","openItems","controlledOpenItems","defaultOpenItems","multiple","collapsible","onToggle","navigation","setOpenItems","state","useMemo","normalizeValues","defaultState","initializeUncontrolledOpenItems","initialState","arrowNavigationProps","circular","tabbable","requestToggle","data","nextOpenItems","updateOpenItems","value","event","components","root","always","undefined","elementType","Array","isArray","previousOpenItems","includes","length","filter","i","sort","index"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,oBAAoB,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,4BAA4B;AAGhH,SAASC,uBAAuB,QAAQ,0BAA0B;AAGlE;;;;CAIC,GACD,OAAO,MAAMC,wBAAwB,CACnCC,OACAC,MAC0B;IAC1B,MAAM,EACJC,WAAWC,oBAAmB,EAC9BC,iBAAgB,EAChBC,UAAW,KAAK,CAAA,EAChBC,aAAc,KAAK,CAAA,EACnBC,SAAQ,EACRC,WAAU,EACX,GAAGR;IACJ,MAAM,CAACE,WAAWO,aAAa,GAAGd,qBAAqB;QACrDe,OAAOjB,MAAMkB,OAAO,CAAC,IAAMC,gBAAgBT,sBAAsB;YAACA;SAAoB;QACtFU,cAAc,IAAMC,gCAAgC;gBAAEV;gBAAkBC;YAAS;QACjFU,cAAc,EAAE;IAClB;IAEA,MAAMC,uBAAuBlB,wBAAwB;QACnDmB,UAAUT,eAAe;QACzBU,UAAU,IAAI;IAChB;IAEA,MAAMC,gBAAgBvB,iBAAiB,CAACwB,OAA4C;QAClF,MAAMC,gBAAgBC,gBAAgBF,KAAKG,KAAK,EAAErB,WAAWG,UAAUC;QACvEC,qBAAAA,sBAAAA,KAAAA,IAAAA,SAAWa,KAAKI,KAAK,EAAE;YAAED,OAAOH,KAAKG,KAAK;YAAErB,WAAWmB;QAAc;QACrEZ,aAAaY;IACf;IAEA,OAAO;QACLf;QACAD;QACAG;QACAN;QACAiB;QACAM,YAAY;YACVC,MAAM;QACR;QACAA,MAAM7B,KAAK8B,MAAM,CACfjC,sBAAsB,OAAO;YAC3B,GAAGM,KAAK;YACR,GAAIQ,aAAaQ,uBAAuBY,SAAS;YACjD3B;QACF,IACA;YAAE4B,aAAa;QAAM;IAEzB;AACF,EAAE;AAEF;;CAEC,GACD,SAASf,gCAA4D,EACnEV,iBAAgB,EAChBC,SAAQ,EACqD,EAAW;IACxE,IAAID,qBAAqBwB,WAAW;QAClC,IAAIE,MAAMC,OAAO,CAAC3B,mBAAmB;YACnC,OAAOC,WAAWD,mBAAmB;gBAACA,gBAAgB,CAAC,EAAE;aAAC;QAC5D,CAAC;QACD,OAAO;YAACA;SAAiB;IAC3B,CAAC;IACD,OAAO,EAAE;AACX;AAEA;;;;;;CAMC,GACD,SAASkB,gBACPC,KAAY,EACZS,iBAA0B,EAC1B3B,QAAiB,EACjBC,WAAoB,EACpB;IACA,IAAID,UAAU;QACZ,IAAI2B,kBAAkBC,QAAQ,CAACV,QAAQ;YACrC,IAAIS,kBAAkBE,MAAM,GAAG,KAAK5B,aAAa;gBAC/C,OAAO0B,kBAAkBG,MAAM,CAACC,CAAAA,IAAKA,MAAMb;YAC7C,CAAC;QACH,OAAO;YACL,OAAO;mBAAIS;gBAAmBT;aAAM,CAACc,IAAI;QAC3C,CAAC;IACH,OAAO;QACL,OAAOL,iBAAiB,CAAC,EAAE,KAAKT,SAASjB,cAAc,EAAE,GAAG;YAACiB;SAAM;IACrE,CAAC;IACD,OAAOS;AACT;AAEA;;CAEC,GACD,SAASpB,gBAA4C0B,KAAuB,EAAuB;IACjG,IAAIA,UAAUV,WAAW;QACvB,OAAOA;IACT,CAAC;IACD,OAAOE,MAAMC,OAAO,CAACO,SAASA,QAAQ;QAACA;KAAM;AAC/C"}
@@ -1,11 +1,11 @@
1
1
  /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
2
- import { getSlotsNext } from '@fluentui/react-utilities';
2
+ import { assertSlots } from '@fluentui/react-utilities';
3
3
  import { AccordionHeaderProvider } from '../../contexts/accordionHeader';
4
4
  /**
5
5
  * Function that renders the final JSX of the component
6
6
  */ export const renderAccordionHeader_unstable = (state, contextValues)=>{
7
- const { slots , slotProps } = getSlotsNext(state);
7
+ assertSlots(state);
8
8
  return /*#__PURE__*/ createElement(AccordionHeaderProvider, {
9
9
  value: contextValues.accordionHeader
10
- }, /*#__PURE__*/ createElement(slots.root, slotProps.root, /*#__PURE__*/ createElement(slots.button, slotProps.button, state.expandIconPosition === 'start' && slots.expandIcon && /*#__PURE__*/ createElement(slots.expandIcon, slotProps.expandIcon), slots.icon && /*#__PURE__*/ createElement(slots.icon, slotProps.icon), slotProps.root.children, state.expandIconPosition === 'end' && slots.expandIcon && /*#__PURE__*/ createElement(slots.expandIcon, slotProps.expandIcon))));
10
+ }, /*#__PURE__*/ createElement(state.root, null, /*#__PURE__*/ createElement(state.button, null, state.expandIconPosition === 'start' && state.expandIcon && /*#__PURE__*/ createElement(state.expandIcon, null), state.icon && /*#__PURE__*/ createElement(state.icon, null), state.root.children, state.expandIconPosition === 'end' && state.expandIcon && /*#__PURE__*/ createElement(state.expandIcon, null))));
11
11
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderAccordionHeader.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport type { AccordionHeaderState, AccordionHeaderSlots, AccordionHeaderContextValues } from './AccordionHeader.types';\nimport { AccordionHeaderProvider } from '../../contexts/accordionHeader';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderAccordionHeader_unstable = (\n state: AccordionHeaderState,\n contextValues: AccordionHeaderContextValues,\n) => {\n const { slots, slotProps } = getSlotsNext<AccordionHeaderSlots>(state);\n\n return (\n <AccordionHeaderProvider value={contextValues.accordionHeader}>\n <slots.root {...slotProps.root}>\n <slots.button {...slotProps.button}>\n {state.expandIconPosition === 'start' && slots.expandIcon && <slots.expandIcon {...slotProps.expandIcon} />}\n {slots.icon && <slots.icon {...slotProps.icon} />}\n {slotProps.root.children}\n {state.expandIconPosition === 'end' && slots.expandIcon && <slots.expandIcon {...slotProps.expandIcon} />}\n </slots.button>\n </slots.root>\n </AccordionHeaderProvider>\n );\n};\n"],"names":["createElement","getSlotsNext","AccordionHeaderProvider","renderAccordionHeader_unstable","state","contextValues","slots","slotProps","value","accordionHeader","root","button","expandIconPosition","expandIcon","icon","children"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,YAAY,QAAQ,4BAA4B;AAEzD,SAASC,uBAAuB,QAAQ,iCAAiC;AAEzE;;CAEC,GACD,OAAO,MAAMC,iCAAiC,CAC5CC,OACAC,gBACG;IACH,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGN,aAAmCG;IAEhE,qBACE,AAlBJ,cAkBKF;QAAwBM,OAAOH,cAAcI,eAAe;qBAC3D,AAnBN,cAmBOH,MAAMI,IAAI,EAAKH,UAAUG,IAAI,gBAC5B,AApBR,cAoBSJ,MAAMK,MAAM,EAAKJ,UAAUI,MAAM,EAC/BP,MAAMQ,kBAAkB,KAAK,WAAWN,MAAMO,UAAU,kBAAI,AArBvE,cAqBwEP,MAAMO,UAAU,EAAKN,UAAUM,UAAU,GACtGP,MAAMQ,IAAI,kBAAI,AAtBzB,cAsB0BR,MAAMQ,IAAI,EAAKP,UAAUO,IAAI,GAC5CP,UAAUG,IAAI,CAACK,QAAQ,EACvBX,MAAMQ,kBAAkB,KAAK,SAASN,MAAMO,UAAU,kBAAI,AAxBrE,cAwBsEP,MAAMO,UAAU,EAAKN,UAAUM,UAAU;AAK/G,EAAE"}
1
+ {"version":3,"sources":["renderAccordionHeader.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { AccordionHeaderState, AccordionHeaderSlots, AccordionHeaderContextValues } from './AccordionHeader.types';\nimport { AccordionHeaderProvider } from '../../contexts/accordionHeader';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderAccordionHeader_unstable = (\n state: AccordionHeaderState,\n contextValues: AccordionHeaderContextValues,\n) => {\n assertSlots<AccordionHeaderSlots>(state);\n\n return (\n <AccordionHeaderProvider value={contextValues.accordionHeader}>\n <state.root>\n <state.button>\n {state.expandIconPosition === 'start' && state.expandIcon && <state.expandIcon />}\n {state.icon && <state.icon />}\n {state.root.children}\n {state.expandIconPosition === 'end' && state.expandIcon && <state.expandIcon />}\n </state.button>\n </state.root>\n </AccordionHeaderProvider>\n );\n};\n"],"names":["createElement","assertSlots","AccordionHeaderProvider","renderAccordionHeader_unstable","state","contextValues","value","accordionHeader","root","button","expandIconPosition","expandIcon","icon","children"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,WAAW,QAAQ,4BAA4B;AAExD,SAASC,uBAAuB,QAAQ,iCAAiC;AAEzE;;CAEC,GACD,OAAO,MAAMC,iCAAiC,CAC5CC,OACAC,gBACG;IACHJ,YAAkCG;IAElC,qBACE,AAlBJ,cAkBKF;QAAwBI,OAAOD,cAAcE,eAAe;qBAC3D,AAnBN,cAmBOH,MAAMI,IAAI,sBACT,AApBR,cAoBSJ,MAAMK,MAAM,QACVL,MAAMM,kBAAkB,KAAK,WAAWN,MAAMO,UAAU,kBAAI,AArBvE,cAqBwEP,MAAMO,UAAU,SAC7EP,MAAMQ,IAAI,kBAAI,AAtBzB,cAsB0BR,MAAMQ,IAAI,SACzBR,MAAMI,IAAI,CAACK,QAAQ,EACnBT,MAAMM,kBAAkB,KAAK,SAASN,MAAMO,UAAU,kBAAI,AAxBrE,cAwBsEP,MAAMO,UAAU;AAKtF,EAAE"}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { getNativeElementProps, isResolvedShorthand, resolveShorthand, useEventCallback } from '@fluentui/react-utilities';
2
+ import { getNativeElementProps, isResolvedShorthand, useEventCallback, slot } from '@fluentui/react-utilities';
3
3
  import { useARIAButtonShorthand } from '@fluentui/react-aria';
4
4
  import { useAccordionContext_unstable } from '../../contexts/accordion';
5
5
  import { ChevronRightRegular } from '@fluentui/react-icons';
@@ -39,13 +39,17 @@ import { useAccordionItemContext_unstable } from '../../contexts/accordionItem';
39
39
  expandIcon: 'span',
40
40
  icon: 'div'
41
41
  },
42
- root: getNativeElementProps(as || 'div', {
42
+ root: slot.always(getNativeElementProps(as || 'div', {
43
43
  ref,
44
44
  ...props
45
+ }), {
46
+ elementType: 'div'
45
47
  }),
46
- icon: resolveShorthand(icon),
47
- expandIcon: resolveShorthand(expandIcon, {
48
- required: true,
48
+ icon: slot.optional(icon, {
49
+ elementType: 'div'
50
+ }),
51
+ expandIcon: slot.optional(expandIcon, {
52
+ renderByDefault: true,
49
53
  defaultProps: {
50
54
  children: /*#__PURE__*/ React.createElement(ChevronRightRegular, {
51
55
  style: {
@@ -53,9 +57,10 @@ import { useAccordionItemContext_unstable } from '../../contexts/accordionItem';
53
57
  }
54
58
  }),
55
59
  'aria-hidden': true
56
- }
60
+ },
61
+ elementType: 'span'
57
62
  }),
58
- button: resolveShorthand({
63
+ button: slot.always({
59
64
  ...useARIAButtonShorthand(button, {
60
65
  required: true,
61
66
  defaultProps: {
@@ -78,7 +83,7 @@ import { useAccordionItemContext_unstable } from '../../contexts/accordionItem';
78
83
  }
79
84
  })
80
85
  }, {
81
- required: true
86
+ elementType: 'button'
82
87
  })
83
88
  };
84
89
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["useAccordionHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n getNativeElementProps,\n isResolvedShorthand,\n resolveShorthand,\n useEventCallback,\n} from '@fluentui/react-utilities';\nimport { ARIAButtonSlotProps, useARIAButtonShorthand } 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 { as, 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 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: getNativeElementProps(as || 'div', {\n ref,\n ...props,\n }),\n icon: resolveShorthand(icon),\n expandIcon: resolveShorthand(expandIcon, {\n required: true,\n defaultProps: {\n children: <ChevronRightRegular style={{ transform: `rotate(${expandIconRotation}deg)` }} />,\n 'aria-hidden': true,\n },\n }),\n button: resolveShorthand<ARIAButtonSlotProps<'a'>>(\n {\n ...useARIAButtonShorthand(button, {\n required: true,\n defaultProps: {\n disabled,\n disabledFocusable,\n 'aria-expanded': open,\n type: 'button',\n },\n }),\n onClick: useEventCallback(event => {\n if (isResolvedShorthand(button)) {\n button.onClick?.(event);\n }\n if (!event.defaultPrevented) {\n requestToggle({ value, event });\n }\n }),\n },\n { required: true },\n ),\n };\n};\n"],"names":["React","getNativeElementProps","isResolvedShorthand","resolveShorthand","useEventCallback","useARIAButtonShorthand","useAccordionContext_unstable","ChevronRightRegular","useFluent_unstable","useFluent","useAccordionItemContext_unstable","useAccordionHeader_unstable","props","ref","as","icon","button","expandIcon","inline","size","expandIconPosition","value","disabled","open","requestToggle","ctx","disabledFocusable","collapsible","openItems","length","dir","expandIconRotation","components","root","required","defaultProps","children","style","transform","type","onClick","event","defaultPrevented"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,qBAAqB,EACrBC,mBAAmB,EACnBC,gBAAgB,EAChBC,gBAAgB,QACX,4BAA4B;AACnC,SAA8BC,sBAAsB,QAAQ,uBAAuB;AAEnF,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,MACyB;IACzB,MAAM,EAAEC,GAAE,EAAEC,KAAI,EAAEC,OAAM,EAAEC,WAAU,EAAEC,QAAS,KAAK,CAAA,EAAEC,MAAO,SAAQ,EAAEC,oBAAqB,QAAO,EAAE,GAAGR;IACxG,MAAM,EAAES,MAAK,EAAEC,SAAQ,EAAEC,KAAI,EAAE,GAAGb;IAClC,MAAMc,gBAAgBlB,6BAA6BmB,CAAAA,MAAOA,IAAID,aAAa;IAE3E;;;GAGC,GACD,MAAME,oBAAoBpB,6BAA6BmB,CAAAA,MAAO,CAACA,IAAIE,WAAW,IAAIF,IAAIG,SAAS,CAACC,MAAM,KAAK,KAAKN;IAEhH,MAAM,EAAEO,IAAG,EAAE,GAAGrB;IAEhB,oEAAoE;IACpE,IAAIsB;IACJ,IAAIX,uBAAuB,OAAO;QAChC,8FAA8F;QAC9FW,qBAAqBR,OAAO,CAAC,KAAK,EAAE;IACtC,OAAO;QACL,mGAAmG;QACnGQ,qBAAqBR,OAAO,KAAKO,QAAQ,QAAQ,IAAI,GAAG;IAC1D,CAAC;IAED,OAAO;QACLR;QACAC;QACAJ;QACAD;QACAE;QACAY,YAAY;YACVC,MAAM;YACNjB,QAAQ;YACRC,YAAY;YACZF,MAAM;QACR;QACAkB,MAAMhC,sBAAsBa,MAAM,OAAO;YACvCD;YACA,GAAGD,KAAK;QACV;QACAG,MAAMZ,iBAAiBY;QACvBE,YAAYd,iBAAiBc,YAAY;YACvCiB,UAAU,IAAI;YACdC,cAAc;gBACZC,wBAAU,oBAAC7B;oBAAoB8B,OAAO;wBAAEC,WAAW,CAAC,OAAO,EAAEP,mBAAmB,IAAI,CAAC;oBAAC;;gBACtF,eAAe,IAAI;YACrB;QACF;QACAf,QAAQb,iBACN;YACE,GAAGE,uBAAuBW,QAAQ;gBAChCkB,UAAU,IAAI;gBACdC,cAAc;oBACZb;oBACAI;oBACA,iBAAiBH;oBACjBgB,MAAM;gBACR;YACF,EAAE;YACFC,SAASpC,iBAAiBqC,CAAAA,QAAS;gBACjC,IAAIvC,oBAAoBc,SAAS;wBAC/BA;oBAAAA,CAAAA,kBAAAA,OAAOwB,OAAO,cAAdxB,6BAAAA,KAAAA,IAAAA,gBAAAA,KAAAA,QAAiByB;gBACnB,CAAC;gBACD,IAAI,CAACA,MAAMC,gBAAgB,EAAE;oBAC3BlB,cAAc;wBAAEH;wBAAOoB;oBAAM;gBAC/B,CAAC;YACH;QACF,GACA;YAAEP,UAAU,IAAI;QAAC;IAErB;AACF,EAAE"}
1
+ {"version":3,"sources":["useAccordionHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, isResolvedShorthand, useEventCallback, slot } from '@fluentui/react-utilities';\nimport { ARIAButtonSlotProps, useARIAButtonShorthand } 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 { as, 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 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 getNativeElementProps(as || 'div', {\n ref,\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: slot.always<ARIAButtonSlotProps<'a'>>(\n {\n ...useARIAButtonShorthand(button, {\n required: true,\n defaultProps: {\n disabled,\n disabledFocusable,\n 'aria-expanded': open,\n type: 'button',\n },\n }),\n onClick: useEventCallback(event => {\n if (isResolvedShorthand(button)) {\n button.onClick?.(event);\n }\n if (!event.defaultPrevented) {\n requestToggle({ value, event });\n }\n }),\n },\n { elementType: 'button' },\n ),\n };\n};\n"],"names":["React","getNativeElementProps","isResolvedShorthand","useEventCallback","slot","useARIAButtonShorthand","useAccordionContext_unstable","ChevronRightRegular","useFluent_unstable","useFluent","useAccordionItemContext_unstable","useAccordionHeader_unstable","props","ref","as","icon","button","expandIcon","inline","size","expandIconPosition","value","disabled","open","requestToggle","ctx","disabledFocusable","collapsible","openItems","length","dir","expandIconRotation","components","root","always","elementType","optional","renderByDefault","defaultProps","children","style","transform","required","type","onClick","event","defaultPrevented"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,mBAAmB,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,4BAA4B;AAC/G,SAA8BC,sBAAsB,QAAQ,uBAAuB;AAEnF,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,MACyB;IACzB,MAAM,EAAEC,GAAE,EAAEC,KAAI,EAAEC,OAAM,EAAEC,WAAU,EAAEC,QAAS,KAAK,CAAA,EAAEC,MAAO,SAAQ,EAAEC,oBAAqB,QAAO,EAAE,GAAGR;IACxG,MAAM,EAAES,MAAK,EAAEC,SAAQ,EAAEC,KAAI,EAAE,GAAGb;IAClC,MAAMc,gBAAgBlB,6BAA6BmB,CAAAA,MAAOA,IAAID,aAAa;IAE3E;;;GAGC,GACD,MAAME,oBAAoBpB,6BAA6BmB,CAAAA,MAAO,CAACA,IAAIE,WAAW,IAAIF,IAAIG,SAAS,CAACC,MAAM,KAAK,KAAKN;IAEhH,MAAM,EAAEO,IAAG,EAAE,GAAGrB;IAEhB,oEAAoE;IACpE,IAAIsB;IACJ,IAAIX,uBAAuB,OAAO;QAChC,8FAA8F;QAC9FW,qBAAqBR,OAAO,CAAC,KAAK,EAAE;IACtC,OAAO;QACL,mGAAmG;QACnGQ,qBAAqBR,OAAO,KAAKO,QAAQ,QAAQ,IAAI,GAAG;IAC1D,CAAC;IAED,OAAO;QACLR;QACAC;QACAJ;QACAD;QACAE;QACAY,YAAY;YACVC,MAAM;YACNjB,QAAQ;YACRC,YAAY;YACZF,MAAM;QACR;QACAkB,MAAM7B,KAAK8B,MAAM,CACfjC,sBAAsBa,MAAM,OAAO;YACjCD;YACA,GAAGD,KAAK;QACV,IACA;YAAEuB,aAAa;QAAM;QAEvBpB,MAAMX,KAAKgC,QAAQ,CAACrB,MAAM;YAAEoB,aAAa;QAAM;QAC/ClB,YAAYb,KAAKgC,QAAQ,CAACnB,YAAY;YACpCoB,iBAAiB,IAAI;YACrBC,cAAc;gBACZC,wBAAU,oBAAChC;oBAAoBiC,OAAO;wBAAEC,WAAW,CAAC,OAAO,EAAEV,mBAAmB,IAAI,CAAC;oBAAC;;gBACtF,eAAe,IAAI;YACrB;YACAI,aAAa;QACf;QACAnB,QAAQZ,KAAK8B,MAAM,CACjB;YACE,GAAG7B,uBAAuBW,QAAQ;gBAChC0B,UAAU,IAAI;gBACdJ,cAAc;oBACZhB;oBACAI;oBACA,iBAAiBH;oBACjBoB,MAAM;gBACR;YACF,EAAE;YACFC,SAASzC,iBAAiB0C,CAAAA,QAAS;gBACjC,IAAI3C,oBAAoBc,SAAS;wBAC/BA;oBAAAA,CAAAA,kBAAAA,OAAO4B,OAAO,cAAd5B,6BAAAA,KAAAA,IAAAA,gBAAAA,KAAAA,QAAiB6B;gBACnB,CAAC;gBACD,IAAI,CAACA,MAAMC,gBAAgB,EAAE;oBAC3BtB,cAAc;wBAAEH;wBAAOwB;oBAAM;gBAC/B,CAAC;YACH;QACF,GACA;YAAEV,aAAa;QAAS;IAE5B;AACF,EAAE"}
@@ -1,11 +1,11 @@
1
1
  /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
2
- import { getSlotsNext } from '@fluentui/react-utilities';
2
+ import { assertSlots } from '@fluentui/react-utilities';
3
3
  import { AccordionItemProvider } from '../../contexts/accordionItem';
4
4
  /**
5
5
  * Function that renders the final JSX of the component
6
6
  */ export const renderAccordionItem_unstable = (state, contextValues)=>{
7
- const { slots , slotProps } = getSlotsNext(state);
8
- return /*#__PURE__*/ createElement(slots.root, slotProps.root, /*#__PURE__*/ createElement(AccordionItemProvider, {
7
+ assertSlots(state);
8
+ return /*#__PURE__*/ createElement(state.root, null, /*#__PURE__*/ createElement(AccordionItemProvider, {
9
9
  value: contextValues.accordionItem
10
- }, slotProps.root.children));
10
+ }, state.root.children));
11
11
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderAccordionItem.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport type { AccordionItemState, AccordionItemSlots, AccordionItemContextValues } from './AccordionItem.types';\nimport { AccordionItemProvider } from '../../contexts/accordionItem';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderAccordionItem_unstable = (state: AccordionItemState, contextValues: AccordionItemContextValues) => {\n const { slots, slotProps } = getSlotsNext<AccordionItemSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n <AccordionItemProvider value={contextValues.accordionItem}>{slotProps.root.children}</AccordionItemProvider>\n </slots.root>\n );\n};\n"],"names":["createElement","getSlotsNext","AccordionItemProvider","renderAccordionItem_unstable","state","contextValues","slots","slotProps","root","value","accordionItem","children"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,YAAY,QAAQ,4BAA4B;AAEzD,SAASC,qBAAqB,QAAQ,+BAA+B;AAErE;;CAEC,GACD,OAAO,MAAMC,+BAA+B,CAACC,OAA2BC,gBAA8C;IACpH,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGN,aAAiCG;IAE9D,qBACE,AAfJ,cAeKE,MAAME,IAAI,EAAKD,UAAUC,IAAI,gBAC5B,AAhBN,cAgBON;QAAsBO,OAAOJ,cAAcK,aAAa;OAAGH,UAAUC,IAAI,CAACG,QAAQ;AAGzF,EAAE"}
1
+ {"version":3,"sources":["renderAccordionItem.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { AccordionItemState, AccordionItemSlots, AccordionItemContextValues } from './AccordionItem.types';\nimport { AccordionItemProvider } from '../../contexts/accordionItem';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderAccordionItem_unstable = (state: AccordionItemState, contextValues: AccordionItemContextValues) => {\n assertSlots<AccordionItemSlots>(state);\n\n return (\n <state.root>\n <AccordionItemProvider value={contextValues.accordionItem}>{state.root.children}</AccordionItemProvider>\n </state.root>\n );\n};\n"],"names":["createElement","assertSlots","AccordionItemProvider","renderAccordionItem_unstable","state","contextValues","root","value","accordionItem","children"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,WAAW,QAAQ,4BAA4B;AAExD,SAASC,qBAAqB,QAAQ,+BAA+B;AAErE;;CAEC,GACD,OAAO,MAAMC,+BAA+B,CAACC,OAA2BC,gBAA8C;IACpHJ,YAAgCG;IAEhC,qBACE,AAfJ,cAeKA,MAAME,IAAI,sBACT,AAhBN,cAgBOJ;QAAsBK,OAAOF,cAAcG,aAAa;OAAGJ,MAAME,IAAI,CAACG,QAAQ;AAGrF,EAAE"}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { getNativeElementProps } from '@fluentui/react-utilities';
2
+ import { getNativeElementProps, slot } from '@fluentui/react-utilities';
3
3
  import { useAccordionContext_unstable } from '../../contexts/accordion';
4
4
  /**
5
5
  * Returns the props and state required to render the component
@@ -15,9 +15,11 @@ import { useAccordionContext_unstable } from '../../contexts/accordion';
15
15
  components: {
16
16
  root: 'div'
17
17
  },
18
- root: getNativeElementProps('div', {
18
+ root: slot.always(getNativeElementProps('div', {
19
19
  ref,
20
20
  ...props
21
+ }), {
22
+ elementType: 'div'
21
23
  })
22
24
  };
23
25
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["useAccordionItem.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { useAccordionContext_unstable } from '../../contexts/accordion';\nimport type { AccordionItemProps, AccordionItemState } from './AccordionItem.types';\n\n/**\n * Returns the props and state required to render the component\n * @param props - AccordionItem properties\n * @param ref - reference to root HTMLElement of AccordionItem\n */\nexport const useAccordionItem_unstable = (\n props: AccordionItemProps,\n ref: React.Ref<HTMLElement>,\n): AccordionItemState => {\n const { value, disabled = false } = props;\n\n const open = useAccordionContext_unstable(ctx => ctx.openItems.includes(value));\n\n return {\n open,\n value,\n disabled,\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', { ref, ...props }),\n };\n};\n"],"names":["React","getNativeElementProps","useAccordionContext_unstable","useAccordionItem_unstable","props","ref","value","disabled","open","ctx","openItems","includes","components","root"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,4BAA4B;AAClE,SAASC,4BAA4B,QAAQ,2BAA2B;AAGxE;;;;CAIC,GACD,OAAO,MAAMC,4BAA4B,CACvCC,OACAC,MACuB;IACvB,MAAM,EAAEC,MAAK,EAAEC,UAAW,KAAK,CAAA,EAAE,GAAGH;IAEpC,MAAMI,OAAON,6BAA6BO,CAAAA,MAAOA,IAAIC,SAAS,CAACC,QAAQ,CAACL;IAExE,OAAO;QACLE;QACAF;QACAC;QACAK,YAAY;YACVC,MAAM;QACR;QACAA,MAAMZ,sBAAsB,OAAO;YAAEI;YAAK,GAAGD,KAAK;QAAC;IACrD;AACF,EAAE"}
1
+ {"version":3,"sources":["useAccordionItem.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport { useAccordionContext_unstable } from '../../contexts/accordion';\nimport type { AccordionItemProps, AccordionItemState } from './AccordionItem.types';\n\n/**\n * Returns the props and state required to render the component\n * @param props - AccordionItem properties\n * @param ref - reference to root HTMLElement of AccordionItem\n */\nexport const useAccordionItem_unstable = (\n props: AccordionItemProps,\n ref: React.Ref<HTMLElement>,\n): AccordionItemState => {\n const { value, disabled = false } = props;\n\n const open = useAccordionContext_unstable(ctx => ctx.openItems.includes(value));\n\n return {\n open,\n value,\n disabled,\n components: {\n root: 'div',\n },\n root: slot.always(getNativeElementProps('div', { ref, ...props }), { elementType: 'div' }),\n };\n};\n"],"names":["React","getNativeElementProps","slot","useAccordionContext_unstable","useAccordionItem_unstable","props","ref","value","disabled","open","ctx","openItems","includes","components","root","always","elementType"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,IAAI,QAAQ,4BAA4B;AACxE,SAASC,4BAA4B,QAAQ,2BAA2B;AAGxE;;;;CAIC,GACD,OAAO,MAAMC,4BAA4B,CACvCC,OACAC,MACuB;IACvB,MAAM,EAAEC,MAAK,EAAEC,UAAW,KAAK,CAAA,EAAE,GAAGH;IAEpC,MAAMI,OAAON,6BAA6BO,CAAAA,MAAOA,IAAIC,SAAS,CAACC,QAAQ,CAACL;IAExE,OAAO;QACLE;QACAF;QACAC;QACAK,YAAY;YACVC,MAAM;QACR;QACAA,MAAMZ,KAAKa,MAAM,CAACd,sBAAsB,OAAO;YAAEK;YAAK,GAAGD,KAAK;QAAC,IAAI;YAAEW,aAAa;QAAM;IAC1F;AACF,EAAE"}
@@ -1,8 +1,8 @@
1
1
  /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
2
- import { getSlotsNext } from '@fluentui/react-utilities';
2
+ import { assertSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Function that renders the final JSX of the component
5
5
  */ export const renderAccordionPanel_unstable = (state)=>{
6
- const { slots , slotProps } = getSlotsNext(state);
7
- return state.open ? /*#__PURE__*/ createElement(slots.root, slotProps.root, slotProps.root.children) : null;
6
+ assertSlots(state);
7
+ return state.open ? /*#__PURE__*/ createElement(state.root, null, state.root.children) : null;
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderAccordionPanel.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport type { AccordionPanelState, AccordionPanelSlots } from './AccordionPanel.types';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderAccordionPanel_unstable = (state: AccordionPanelState) => {\n const { slots, slotProps } = getSlotsNext<AccordionPanelSlots>(state);\n return state.open ? <slots.root {...slotProps.root}>{slotProps.root.children}</slots.root> : null;\n};\n"],"names":["createElement","getSlotsNext","renderAccordionPanel_unstable","state","slots","slotProps","open","root","children"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,YAAY,QAAQ,4BAA4B;AAGzD;;CAEC,GACD,OAAO,MAAMC,gCAAgC,CAACC,QAA+B;IAC3E,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGJ,aAAkCE;IAC/D,OAAOA,MAAMG,IAAI,iBAAG,AAZtB,cAYuBF,MAAMG,IAAI,EAAKF,UAAUE,IAAI,EAAGF,UAAUE,IAAI,CAACC,QAAQ,IAAiB,IAAI;AACnG,EAAE"}
1
+ {"version":3,"sources":["renderAccordionPanel.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { AccordionPanelState, AccordionPanelSlots } from './AccordionPanel.types';\n\n/**\n * Function that renders the final JSX of the component\n */\nexport const renderAccordionPanel_unstable = (state: AccordionPanelState) => {\n assertSlots<AccordionPanelSlots>(state);\n return state.open ? <state.root>{state.root.children}</state.root> : null;\n};\n"],"names":["createElement","assertSlots","renderAccordionPanel_unstable","state","open","root","children"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,gCAAgC,CAACC,QAA+B;IAC3EF,YAAiCE;IACjC,OAAOA,MAAMC,IAAI,iBAAG,AAZtB,cAYuBD,MAAME,IAAI,QAAEF,MAAME,IAAI,CAACC,QAAQ,IAAiB,IAAI;AAC3E,EAAE"}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { getNativeElementProps } from '@fluentui/react-utilities';
2
+ import { getNativeElementProps, slot } from '@fluentui/react-utilities';
3
3
  import { useTabsterAttributes } from '@fluentui/react-tabster';
4
4
  import { useAccordionContext_unstable } from '../../contexts/accordion';
5
5
  import { useAccordionItemContext_unstable } from '../../contexts/accordionItem';
@@ -20,10 +20,12 @@ import { useAccordionItemContext_unstable } from '../../contexts/accordionItem';
20
20
  components: {
21
21
  root: 'div'
22
22
  },
23
- root: getNativeElementProps('div', {
23
+ root: slot.always(getNativeElementProps('div', {
24
24
  ref,
25
25
  ...props,
26
26
  ...navigation && focusableProps
27
+ }), {
28
+ elementType: 'div'
27
29
  })
28
30
  };
29
31
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["useAccordionPanel.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { useTabsterAttributes } from '@fluentui/react-tabster';\nimport { useAccordionContext_unstable } from '../../contexts/accordion';\nimport type { AccordionPanelProps, AccordionPanelState } from './AccordionPanel.types';\nimport { useAccordionItemContext_unstable } from '../../contexts/accordionItem';\n\n/**\n * Returns the props and state required to render the component\n * @param props - AccordionPanel properties\n * @param ref - reference to root HTMLElement of AccordionPanel\n */\nexport const useAccordionPanel_unstable = (\n props: AccordionPanelProps,\n ref: React.Ref<HTMLElement>,\n): AccordionPanelState => {\n const { open } = useAccordionItemContext_unstable();\n const focusableProps = useTabsterAttributes({ focusable: { excludeFromMover: true } });\n const navigation = useAccordionContext_unstable(ctx => ctx.navigation);\n\n return {\n open,\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref,\n ...props,\n ...(navigation && focusableProps),\n }),\n };\n};\n"],"names":["React","getNativeElementProps","useTabsterAttributes","useAccordionContext_unstable","useAccordionItemContext_unstable","useAccordionPanel_unstable","props","ref","open","focusableProps","focusable","excludeFromMover","navigation","ctx","components","root"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,4BAA4B;AAClE,SAASC,oBAAoB,QAAQ,0BAA0B;AAC/D,SAASC,4BAA4B,QAAQ,2BAA2B;AAExE,SAASC,gCAAgC,QAAQ,+BAA+B;AAEhF;;;;CAIC,GACD,OAAO,MAAMC,6BAA6B,CACxCC,OACAC,MACwB;IACxB,MAAM,EAAEC,KAAI,EAAE,GAAGJ;IACjB,MAAMK,iBAAiBP,qBAAqB;QAAEQ,WAAW;YAAEC,kBAAkB,IAAI;QAAC;IAAE;IACpF,MAAMC,aAAaT,6BAA6BU,CAAAA,MAAOA,IAAID,UAAU;IAErE,OAAO;QACLJ;QACAM,YAAY;YACVC,MAAM;QACR;QACAA,MAAMd,sBAAsB,OAAO;YACjCM;YACA,GAAGD,KAAK;YACR,GAAIM,cAAcH,cAAc;QAClC;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["useAccordionPanel.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport { useTabsterAttributes } from '@fluentui/react-tabster';\nimport { useAccordionContext_unstable } from '../../contexts/accordion';\nimport type { AccordionPanelProps, AccordionPanelState } from './AccordionPanel.types';\nimport { useAccordionItemContext_unstable } from '../../contexts/accordionItem';\n\n/**\n * Returns the props and state required to render the component\n * @param props - AccordionPanel properties\n * @param ref - reference to root HTMLElement of AccordionPanel\n */\nexport const useAccordionPanel_unstable = (\n props: AccordionPanelProps,\n ref: React.Ref<HTMLElement>,\n): AccordionPanelState => {\n const { open } = useAccordionItemContext_unstable();\n const focusableProps = useTabsterAttributes({ focusable: { excludeFromMover: true } });\n const navigation = useAccordionContext_unstable(ctx => ctx.navigation);\n\n return {\n open,\n components: {\n root: 'div',\n },\n root: slot.always(\n getNativeElementProps('div', {\n ref,\n ...props,\n ...(navigation && focusableProps),\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["React","getNativeElementProps","slot","useTabsterAttributes","useAccordionContext_unstable","useAccordionItemContext_unstable","useAccordionPanel_unstable","props","ref","open","focusableProps","focusable","excludeFromMover","navigation","ctx","components","root","always","elementType"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,IAAI,QAAQ,4BAA4B;AACxE,SAASC,oBAAoB,QAAQ,0BAA0B;AAC/D,SAASC,4BAA4B,QAAQ,2BAA2B;AAExE,SAASC,gCAAgC,QAAQ,+BAA+B;AAEhF;;;;CAIC,GACD,OAAO,MAAMC,6BAA6B,CACxCC,OACAC,MACwB;IACxB,MAAM,EAAEC,KAAI,EAAE,GAAGJ;IACjB,MAAMK,iBAAiBP,qBAAqB;QAAEQ,WAAW;YAAEC,kBAAkB,IAAI;QAAC;IAAE;IACpF,MAAMC,aAAaT,6BAA6BU,CAAAA,MAAOA,IAAID,UAAU;IAErE,OAAO;QACLJ;QACAM,YAAY;YACVC,MAAM;QACR;QACAA,MAAMd,KAAKe,MAAM,CACfhB,sBAAsB,OAAO;YAC3BO;YACA,GAAGD,KAAK;YACR,GAAIM,cAAcH,cAAc;QAClC,IACA;YAAEQ,aAAa;QAAM;IAEzB;AACF,EAAE"}
@@ -10,8 +10,8 @@ const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
10
10
  const _reactUtilities = require("@fluentui/react-utilities");
11
11
  const _accordion = require("../../contexts/accordion");
12
12
  const renderAccordion_unstable = (state, contextValues)=>{
13
- const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
14
- return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_accordion.AccordionProvider, {
13
+ (0, _reactUtilities.assertSlots)(state);
14
+ return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.root, null, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_accordion.AccordionProvider, {
15
15
  value: contextValues.accordion
16
- }, slotProps.root.children));
16
+ }, state.root.children));
17
17
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderAccordion.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport { AccordionProvider } from '../../contexts/accordion';\n/**\n * Function that renders the final JSX of the component\n */ export const renderAccordion_unstable = (state, contextValues)=>{\n const { slots , slotProps } = getSlotsNext(state);\n return /*#__PURE__*/ createElement(slots.root, slotProps.root, /*#__PURE__*/ createElement(AccordionProvider, {\n value: contextValues.accordion\n }, slotProps.root.children));\n};\n"],"names":["renderAccordion_unstable","state","contextValues","slots","slotProps","getSlotsNext","createElement","root","AccordionProvider","value","accordion","children"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKjCA;;aAAAA;;iCALkE;gCACtD;2BACK;AAGvB,MAAMA,2BAA2B,CAACC,OAAOC,gBAAgB;IAChE,MAAM,EAAEC,MAAK,EAAGC,UAAS,EAAG,GAAGC,IAAAA,4BAAY,EAACJ;IAC5C,OAAO,WAAW,GAAGK,IAAAA,8BAAa,EAACH,MAAMI,IAAI,EAAEH,UAAUG,IAAI,EAAE,WAAW,GAAGD,IAAAA,8BAAa,EAACE,4BAAiB,EAAE;QAC1GC,OAAOP,cAAcQ,SAAS;IAClC,GAAGN,UAAUG,IAAI,CAACI,QAAQ;AAC9B"}
1
+ {"version":3,"sources":["renderAccordion.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { AccordionProvider } from '../../contexts/accordion';\n/**\n * Function that renders the final JSX of the component\n */ export const renderAccordion_unstable = (state, contextValues)=>{\n assertSlots(state);\n return /*#__PURE__*/ createElement(state.root, null, /*#__PURE__*/ createElement(AccordionProvider, {\n value: contextValues.accordion\n }, state.root.children));\n};\n"],"names":["renderAccordion_unstable","state","contextValues","assertSlots","createElement","root","AccordionProvider","value","accordion","children"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKjCA;;aAAAA;;iCALkE;gCACvD;2BACM;AAGvB,MAAMA,2BAA2B,CAACC,OAAOC,gBAAgB;IAChEC,IAAAA,2BAAW,EAACF;IACZ,OAAO,WAAW,GAAGG,IAAAA,8BAAa,EAACH,MAAMI,IAAI,EAAE,IAAI,EAAE,WAAW,GAAGD,IAAAA,8BAAa,EAACE,4BAAiB,EAAE;QAChGC,OAAOL,cAAcM,SAAS;IAClC,GAAGP,MAAMI,IAAI,CAACI,QAAQ;AAC1B"}
@@ -43,10 +43,12 @@ const useAccordion_unstable = (props, ref)=>{
43
43
  components: {
44
44
  root: 'div'
45
45
  },
46
- root: (0, _reactUtilities.getNativeElementProps)('div', {
46
+ root: _reactUtilities.slot.always((0, _reactUtilities.getNativeElementProps)('div', {
47
47
  ...props,
48
48
  ...navigation ? arrowNavigationProps : undefined,
49
49
  ref
50
+ }), {
51
+ elementType: 'div'
50
52
  })
51
53
  };
52
54
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["useAccordion.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useControllableState, useEventCallback } from '@fluentui/react-utilities';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\n/**\n * Returns the props and state required to render the component\n * @param props - Accordion properties\n * @param ref - reference to root HTMLElement of Accordion\n */ export const useAccordion_unstable = (props, ref)=>{\n const { openItems: controlledOpenItems , defaultOpenItems , multiple =false , collapsible =false , onToggle , navigation } = props;\n const [openItems, setOpenItems] = useControllableState({\n state: React.useMemo(()=>normalizeValues(controlledOpenItems), [\n controlledOpenItems\n ]),\n defaultState: ()=>initializeUncontrolledOpenItems({\n defaultOpenItems,\n multiple\n }),\n initialState: []\n });\n const arrowNavigationProps = useArrowNavigationGroup({\n circular: navigation === 'circular',\n tabbable: true\n });\n const requestToggle = useEventCallback((data)=>{\n const nextOpenItems = updateOpenItems(data.value, openItems, multiple, collapsible);\n onToggle === null || onToggle === void 0 ? void 0 : onToggle(data.event, {\n value: data.value,\n openItems: nextOpenItems\n });\n setOpenItems(nextOpenItems);\n });\n return {\n collapsible,\n multiple,\n navigation,\n openItems,\n requestToggle,\n components: {\n root: 'div'\n },\n root: getNativeElementProps('div', {\n ...props,\n ...navigation ? arrowNavigationProps : undefined,\n ref\n })\n };\n};\n/**\n * Initial value for the uncontrolled case of the list of open indexes\n */ function initializeUncontrolledOpenItems({ defaultOpenItems , multiple }) {\n if (defaultOpenItems !== undefined) {\n if (Array.isArray(defaultOpenItems)) {\n return multiple ? defaultOpenItems : [\n defaultOpenItems[0]\n ];\n }\n return [\n defaultOpenItems\n ];\n }\n return [];\n}\n/**\n * Updates the list of open indexes based on an index that changes\n * @param value - the index that will change\n * @param previousOpenItems - list of current open indexes\n * @param multiple - if Accordion support multiple Panels opened at the same time\n * @param collapsible - if Accordion support multiple Panels closed at the same time\n */ function updateOpenItems(value, previousOpenItems, multiple, collapsible) {\n if (multiple) {\n if (previousOpenItems.includes(value)) {\n if (previousOpenItems.length > 1 || collapsible) {\n return previousOpenItems.filter((i)=>i !== value);\n }\n } else {\n return [\n ...previousOpenItems,\n value\n ].sort();\n }\n } else {\n return previousOpenItems[0] === value && collapsible ? [] : [\n value\n ];\n }\n return previousOpenItems;\n}\n/**\n * Normalizes Accordion index into an array of indexes\n */ function normalizeValues(index) {\n if (index === undefined) {\n return undefined;\n }\n return Array.isArray(index) ? index : [\n index\n ];\n}\n"],"names":["useAccordion_unstable","props","ref","openItems","controlledOpenItems","defaultOpenItems","multiple","collapsible","onToggle","navigation","setOpenItems","useControllableState","state","React","useMemo","normalizeValues","defaultState","initializeUncontrolledOpenItems","initialState","arrowNavigationProps","useArrowNavigationGroup","circular","tabbable","requestToggle","useEventCallback","data","nextOpenItems","updateOpenItems","value","event","components","root","getNativeElementProps","undefined","Array","isArray","previousOpenItems","includes","length","filter","i","sort","index"],"mappings":";;;;+BAOiBA;;aAAAA;;;6DAPM;gCACuD;8BACtC;AAK7B,MAAMA,wBAAwB,CAACC,OAAOC,MAAM;IACnD,MAAM,EAAEC,WAAWC,oBAAmB,EAAGC,iBAAgB,EAAGC,UAAU,KAAK,CAAA,EAAGC,aAAa,KAAK,CAAA,EAAGC,SAAQ,EAAGC,WAAU,EAAG,GAAGR;IAC9H,MAAM,CAACE,WAAWO,aAAa,GAAGC,IAAAA,oCAAoB,EAAC;QACnDC,OAAOC,OAAMC,OAAO,CAAC,IAAIC,gBAAgBX,sBAAsB;YAC3DA;SACH;QACDY,cAAc,IAAIC,gCAAgC;gBAC1CZ;gBACAC;YACJ;QACJY,cAAc,EAAE;IACpB;IACA,MAAMC,uBAAuBC,IAAAA,qCAAuB,EAAC;QACjDC,UAAUZ,eAAe;QACzBa,UAAU,IAAI;IAClB;IACA,MAAMC,gBAAgBC,IAAAA,gCAAgB,EAAC,CAACC,OAAO;QAC3C,MAAMC,gBAAgBC,gBAAgBF,KAAKG,KAAK,EAAEzB,WAAWG,UAAUC;QACvEC,aAAa,IAAI,IAAIA,aAAa,KAAK,IAAI,KAAK,IAAIA,SAASiB,KAAKI,KAAK,EAAE;YACrED,OAAOH,KAAKG,KAAK;YACjBzB,WAAWuB;QACf,EAAE;QACFhB,aAAagB;IACjB;IACA,OAAO;QACHnB;QACAD;QACAG;QACAN;QACAoB;QACAO,YAAY;YACRC,MAAM;QACV;QACAA,MAAMC,IAAAA,qCAAqB,EAAC,OAAO;YAC/B,GAAG/B,KAAK;YACR,GAAGQ,aAAaU,uBAAuBc,SAAS;YAChD/B;QACJ;IACJ;AACJ;AACA;;CAEC,GAAG,SAASe,gCAAgC,EAAEZ,iBAAgB,EAAGC,SAAQ,EAAG,EAAE;IAC3E,IAAID,qBAAqB4B,WAAW;QAChC,IAAIC,MAAMC,OAAO,CAAC9B,mBAAmB;YACjC,OAAOC,WAAWD,mBAAmB;gBACjCA,gBAAgB,CAAC,EAAE;aACtB;QACL,CAAC;QACD,OAAO;YACHA;SACH;IACL,CAAC;IACD,OAAO,EAAE;AACb;AACA;;;;;;CAMC,GAAG,SAASsB,gBAAgBC,KAAK,EAAEQ,iBAAiB,EAAE9B,QAAQ,EAAEC,WAAW,EAAE;IAC1E,IAAID,UAAU;QACV,IAAI8B,kBAAkBC,QAAQ,CAACT,QAAQ;YACnC,IAAIQ,kBAAkBE,MAAM,GAAG,KAAK/B,aAAa;gBAC7C,OAAO6B,kBAAkBG,MAAM,CAAC,CAACC,IAAIA,MAAMZ;YAC/C,CAAC;QACL,OAAO;YACH,OAAO;mBACAQ;gBACHR;aACH,CAACa,IAAI;QACV,CAAC;IACL,OAAO;QACH,OAAOL,iBAAiB,CAAC,EAAE,KAAKR,SAASrB,cAAc,EAAE,GAAG;YACxDqB;SACH;IACL,CAAC;IACD,OAAOQ;AACX;AACA;;CAEC,GAAG,SAASrB,gBAAgB2B,KAAK,EAAE;IAChC,IAAIA,UAAUT,WAAW;QACrB,OAAOA;IACX,CAAC;IACD,OAAOC,MAAMC,OAAO,CAACO,SAASA,QAAQ;QAClCA;KACH;AACL"}
1
+ {"version":3,"sources":["useAccordion.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useControllableState, useEventCallback, slot } from '@fluentui/react-utilities';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\n/**\n * Returns the props and state required to render the component\n * @param props - Accordion properties\n * @param ref - reference to root HTMLElement of Accordion\n */ export const useAccordion_unstable = (props, ref)=>{\n const { openItems: controlledOpenItems , defaultOpenItems , multiple =false , collapsible =false , onToggle , navigation } = props;\n const [openItems, setOpenItems] = useControllableState({\n state: React.useMemo(()=>normalizeValues(controlledOpenItems), [\n controlledOpenItems\n ]),\n defaultState: ()=>initializeUncontrolledOpenItems({\n defaultOpenItems,\n multiple\n }),\n initialState: []\n });\n const arrowNavigationProps = useArrowNavigationGroup({\n circular: navigation === 'circular',\n tabbable: true\n });\n const requestToggle = useEventCallback((data)=>{\n const nextOpenItems = updateOpenItems(data.value, openItems, multiple, collapsible);\n onToggle === null || onToggle === void 0 ? void 0 : onToggle(data.event, {\n value: data.value,\n openItems: nextOpenItems\n });\n setOpenItems(nextOpenItems);\n });\n return {\n collapsible,\n multiple,\n navigation,\n openItems,\n requestToggle,\n components: {\n root: 'div'\n },\n root: slot.always(getNativeElementProps('div', {\n ...props,\n ...navigation ? arrowNavigationProps : undefined,\n ref\n }), {\n elementType: 'div'\n })\n };\n};\n/**\n * Initial value for the uncontrolled case of the list of open indexes\n */ function initializeUncontrolledOpenItems({ defaultOpenItems , multiple }) {\n if (defaultOpenItems !== undefined) {\n if (Array.isArray(defaultOpenItems)) {\n return multiple ? defaultOpenItems : [\n defaultOpenItems[0]\n ];\n }\n return [\n defaultOpenItems\n ];\n }\n return [];\n}\n/**\n * Updates the list of open indexes based on an index that changes\n * @param value - the index that will change\n * @param previousOpenItems - list of current open indexes\n * @param multiple - if Accordion support multiple Panels opened at the same time\n * @param collapsible - if Accordion support multiple Panels closed at the same time\n */ function updateOpenItems(value, previousOpenItems, multiple, collapsible) {\n if (multiple) {\n if (previousOpenItems.includes(value)) {\n if (previousOpenItems.length > 1 || collapsible) {\n return previousOpenItems.filter((i)=>i !== value);\n }\n } else {\n return [\n ...previousOpenItems,\n value\n ].sort();\n }\n } else {\n return previousOpenItems[0] === value && collapsible ? [] : [\n value\n ];\n }\n return previousOpenItems;\n}\n/**\n * Normalizes Accordion index into an array of indexes\n */ function normalizeValues(index) {\n if (index === undefined) {\n return undefined;\n }\n return Array.isArray(index) ? index : [\n index\n ];\n}\n"],"names":["useAccordion_unstable","props","ref","openItems","controlledOpenItems","defaultOpenItems","multiple","collapsible","onToggle","navigation","setOpenItems","useControllableState","state","React","useMemo","normalizeValues","defaultState","initializeUncontrolledOpenItems","initialState","arrowNavigationProps","useArrowNavigationGroup","circular","tabbable","requestToggle","useEventCallback","data","nextOpenItems","updateOpenItems","value","event","components","root","slot","always","getNativeElementProps","undefined","elementType","Array","isArray","previousOpenItems","includes","length","filter","i","sort","index"],"mappings":";;;;+BAOiBA;;aAAAA;;;6DAPM;gCAC6D;8BAC5C;AAK7B,MAAMA,wBAAwB,CAACC,OAAOC,MAAM;IACnD,MAAM,EAAEC,WAAWC,oBAAmB,EAAGC,iBAAgB,EAAGC,UAAU,KAAK,CAAA,EAAGC,aAAa,KAAK,CAAA,EAAGC,SAAQ,EAAGC,WAAU,EAAG,GAAGR;IAC9H,MAAM,CAACE,WAAWO,aAAa,GAAGC,IAAAA,oCAAoB,EAAC;QACnDC,OAAOC,OAAMC,OAAO,CAAC,IAAIC,gBAAgBX,sBAAsB;YAC3DA;SACH;QACDY,cAAc,IAAIC,gCAAgC;gBAC1CZ;gBACAC;YACJ;QACJY,cAAc,EAAE;IACpB;IACA,MAAMC,uBAAuBC,IAAAA,qCAAuB,EAAC;QACjDC,UAAUZ,eAAe;QACzBa,UAAU,IAAI;IAClB;IACA,MAAMC,gBAAgBC,IAAAA,gCAAgB,EAAC,CAACC,OAAO;QAC3C,MAAMC,gBAAgBC,gBAAgBF,KAAKG,KAAK,EAAEzB,WAAWG,UAAUC;QACvEC,aAAa,IAAI,IAAIA,aAAa,KAAK,IAAI,KAAK,IAAIA,SAASiB,KAAKI,KAAK,EAAE;YACrED,OAAOH,KAAKG,KAAK;YACjBzB,WAAWuB;QACf,EAAE;QACFhB,aAAagB;IACjB;IACA,OAAO;QACHnB;QACAD;QACAG;QACAN;QACAoB;QACAO,YAAY;YACRC,MAAM;QACV;QACAA,MAAMC,oBAAI,CAACC,MAAM,CAACC,IAAAA,qCAAqB,EAAC,OAAO;YAC3C,GAAGjC,KAAK;YACR,GAAGQ,aAAaU,uBAAuBgB,SAAS;YAChDjC;QACJ,IAAI;YACAkC,aAAa;QACjB;IACJ;AACJ;AACA;;CAEC,GAAG,SAASnB,gCAAgC,EAAEZ,iBAAgB,EAAGC,SAAQ,EAAG,EAAE;IAC3E,IAAID,qBAAqB8B,WAAW;QAChC,IAAIE,MAAMC,OAAO,CAACjC,mBAAmB;YACjC,OAAOC,WAAWD,mBAAmB;gBACjCA,gBAAgB,CAAC,EAAE;aACtB;QACL,CAAC;QACD,OAAO;YACHA;SACH;IACL,CAAC;IACD,OAAO,EAAE;AACb;AACA;;;;;;CAMC,GAAG,SAASsB,gBAAgBC,KAAK,EAAEW,iBAAiB,EAAEjC,QAAQ,EAAEC,WAAW,EAAE;IAC1E,IAAID,UAAU;QACV,IAAIiC,kBAAkBC,QAAQ,CAACZ,QAAQ;YACnC,IAAIW,kBAAkBE,MAAM,GAAG,KAAKlC,aAAa;gBAC7C,OAAOgC,kBAAkBG,MAAM,CAAC,CAACC,IAAIA,MAAMf;YAC/C,CAAC;QACL,OAAO;YACH,OAAO;mBACAW;gBACHX;aACH,CAACgB,IAAI;QACV,CAAC;IACL,OAAO;QACH,OAAOL,iBAAiB,CAAC,EAAE,KAAKX,SAASrB,cAAc,EAAE,GAAG;YACxDqB;SACH;IACL,CAAC;IACD,OAAOW;AACX;AACA;;CAEC,GAAG,SAASxB,gBAAgB8B,KAAK,EAAE;IAChC,IAAIA,UAAUV,WAAW;QACrB,OAAOA;IACX,CAAC;IACD,OAAOE,MAAMC,OAAO,CAACO,SAASA,QAAQ;QAClCA;KACH;AACL"}
@@ -10,8 +10,8 @@ const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
10
10
  const _reactUtilities = require("@fluentui/react-utilities");
11
11
  const _accordionHeader = require("../../contexts/accordionHeader");
12
12
  const renderAccordionHeader_unstable = (state, contextValues)=>{
13
- const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
13
+ (0, _reactUtilities.assertSlots)(state);
14
14
  return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_accordionHeader.AccordionHeaderProvider, {
15
15
  value: contextValues.accordionHeader
16
- }, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.button, slotProps.button, state.expandIconPosition === 'start' && slots.expandIcon && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.expandIcon, slotProps.expandIcon), slots.icon && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.icon, slotProps.icon), slotProps.root.children, state.expandIconPosition === 'end' && slots.expandIcon && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.expandIcon, slotProps.expandIcon))));
16
+ }, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.root, null, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.button, null, state.expandIconPosition === 'start' && state.expandIcon && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.expandIcon, null), state.icon && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.icon, null), state.root.children, state.expandIconPosition === 'end' && state.expandIcon && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.expandIcon, null))));
17
17
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderAccordionHeader.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport { AccordionHeaderProvider } from '../../contexts/accordionHeader';\n/**\n * Function that renders the final JSX of the component\n */ export const renderAccordionHeader_unstable = (state, contextValues)=>{\n const { slots , slotProps } = getSlotsNext(state);\n return /*#__PURE__*/ createElement(AccordionHeaderProvider, {\n value: contextValues.accordionHeader\n }, /*#__PURE__*/ createElement(slots.root, slotProps.root, /*#__PURE__*/ createElement(slots.button, slotProps.button, state.expandIconPosition === 'start' && slots.expandIcon && /*#__PURE__*/ createElement(slots.expandIcon, slotProps.expandIcon), slots.icon && /*#__PURE__*/ createElement(slots.icon, slotProps.icon), slotProps.root.children, state.expandIconPosition === 'end' && slots.expandIcon && /*#__PURE__*/ createElement(slots.expandIcon, slotProps.expandIcon))));\n};\n"],"names":["renderAccordionHeader_unstable","state","contextValues","slots","slotProps","getSlotsNext","createElement","AccordionHeaderProvider","value","accordionHeader","root","button","expandIconPosition","expandIcon","icon","children"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKjCA;;aAAAA;;iCALkE;gCACtD;iCACW;AAG7B,MAAMA,iCAAiC,CAACC,OAAOC,gBAAgB;IACtE,MAAM,EAAEC,MAAK,EAAGC,UAAS,EAAG,GAAGC,IAAAA,4BAAY,EAACJ;IAC5C,OAAO,WAAW,GAAGK,IAAAA,8BAAa,EAACC,wCAAuB,EAAE;QACxDC,OAAON,cAAcO,eAAe;IACxC,GAAG,WAAW,GAAGH,IAAAA,8BAAa,EAACH,MAAMO,IAAI,EAAEN,UAAUM,IAAI,EAAE,WAAW,GAAGJ,IAAAA,8BAAa,EAACH,MAAMQ,MAAM,EAAEP,UAAUO,MAAM,EAAEV,MAAMW,kBAAkB,KAAK,WAAWT,MAAMU,UAAU,IAAI,WAAW,GAAGP,IAAAA,8BAAa,EAACH,MAAMU,UAAU,EAAET,UAAUS,UAAU,GAAGV,MAAMW,IAAI,IAAI,WAAW,GAAGR,IAAAA,8BAAa,EAACH,MAAMW,IAAI,EAAEV,UAAUU,IAAI,GAAGV,UAAUM,IAAI,CAACK,QAAQ,EAAEd,MAAMW,kBAAkB,KAAK,SAAST,MAAMU,UAAU,IAAI,WAAW,GAAGP,IAAAA,8BAAa,EAACH,MAAMU,UAAU,EAAET,UAAUS,UAAU;AACxd"}
1
+ {"version":3,"sources":["renderAccordionHeader.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { AccordionHeaderProvider } from '../../contexts/accordionHeader';\n/**\n * Function that renders the final JSX of the component\n */ export const renderAccordionHeader_unstable = (state, contextValues)=>{\n assertSlots(state);\n return /*#__PURE__*/ createElement(AccordionHeaderProvider, {\n value: contextValues.accordionHeader\n }, /*#__PURE__*/ createElement(state.root, null, /*#__PURE__*/ createElement(state.button, null, state.expandIconPosition === 'start' && state.expandIcon && /*#__PURE__*/ createElement(state.expandIcon, null), state.icon && /*#__PURE__*/ createElement(state.icon, null), state.root.children, state.expandIconPosition === 'end' && state.expandIcon && /*#__PURE__*/ createElement(state.expandIcon, null))));\n};\n"],"names":["renderAccordionHeader_unstable","state","contextValues","assertSlots","createElement","AccordionHeaderProvider","value","accordionHeader","root","button","expandIconPosition","expandIcon","icon","children"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKjCA;;aAAAA;;iCALkE;gCACvD;iCACY;AAG7B,MAAMA,iCAAiC,CAACC,OAAOC,gBAAgB;IACtEC,IAAAA,2BAAW,EAACF;IACZ,OAAO,WAAW,GAAGG,IAAAA,8BAAa,EAACC,wCAAuB,EAAE;QACxDC,OAAOJ,cAAcK,eAAe;IACxC,GAAG,WAAW,GAAGH,IAAAA,8BAAa,EAACH,MAAMO,IAAI,EAAE,IAAI,EAAE,WAAW,GAAGJ,IAAAA,8BAAa,EAACH,MAAMQ,MAAM,EAAE,IAAI,EAAER,MAAMS,kBAAkB,KAAK,WAAWT,MAAMU,UAAU,IAAI,WAAW,GAAGP,IAAAA,8BAAa,EAACH,MAAMU,UAAU,EAAE,IAAI,GAAGV,MAAMW,IAAI,IAAI,WAAW,GAAGR,IAAAA,8BAAa,EAACH,MAAMW,IAAI,EAAE,IAAI,GAAGX,MAAMO,IAAI,CAACK,QAAQ,EAAEZ,MAAMS,kBAAkB,KAAK,SAAST,MAAMU,UAAU,IAAI,WAAW,GAAGP,IAAAA,8BAAa,EAACH,MAAMU,UAAU,EAAE,IAAI;AACpZ"}
@@ -44,13 +44,17 @@ const useAccordionHeader_unstable = (props, ref)=>{
44
44
  expandIcon: 'span',
45
45
  icon: 'div'
46
46
  },
47
- root: (0, _reactUtilities.getNativeElementProps)(as || 'div', {
47
+ root: _reactUtilities.slot.always((0, _reactUtilities.getNativeElementProps)(as || 'div', {
48
48
  ref,
49
49
  ...props
50
+ }), {
51
+ elementType: 'div'
50
52
  }),
51
- icon: (0, _reactUtilities.resolveShorthand)(icon),
52
- expandIcon: (0, _reactUtilities.resolveShorthand)(expandIcon, {
53
- required: true,
53
+ icon: _reactUtilities.slot.optional(icon, {
54
+ elementType: 'div'
55
+ }),
56
+ expandIcon: _reactUtilities.slot.optional(expandIcon, {
57
+ renderByDefault: true,
54
58
  defaultProps: {
55
59
  children: /*#__PURE__*/ _react.createElement(_reactIcons.ChevronRightRegular, {
56
60
  style: {
@@ -58,9 +62,10 @@ const useAccordionHeader_unstable = (props, ref)=>{
58
62
  }
59
63
  }),
60
64
  'aria-hidden': true
61
- }
65
+ },
66
+ elementType: 'span'
62
67
  }),
63
- button: (0, _reactUtilities.resolveShorthand)({
68
+ button: _reactUtilities.slot.always({
64
69
  ...(0, _reactAria.useARIAButtonShorthand)(button, {
65
70
  required: true,
66
71
  defaultProps: {
@@ -83,7 +88,7 @@ const useAccordionHeader_unstable = (props, ref)=>{
83
88
  }
84
89
  })
85
90
  }, {
86
- required: true
91
+ elementType: 'button'
87
92
  })
88
93
  };
89
94
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["useAccordionHeader.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, isResolvedShorthand, resolveShorthand, useEventCallback } from '@fluentui/react-utilities';\nimport { useARIAButtonShorthand } 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 { as , 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 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: getNativeElementProps(as || 'div', {\n ref,\n ...props\n }),\n icon: resolveShorthand(icon),\n expandIcon: resolveShorthand(expandIcon, {\n required: true,\n defaultProps: {\n children: /*#__PURE__*/ React.createElement(ChevronRightRegular, {\n style: {\n transform: `rotate(${expandIconRotation}deg)`\n }\n }),\n 'aria-hidden': true\n }\n }),\n button: resolveShorthand({\n ...useARIAButtonShorthand(button, {\n required: true,\n defaultProps: {\n disabled,\n disabledFocusable,\n 'aria-expanded': open,\n type: 'button'\n }\n }),\n 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 }, {\n required: true\n })\n };\n};\n"],"names":["useAccordionHeader_unstable","props","ref","as","icon","button","expandIcon","inline","size","expandIconPosition","value","disabled","open","useAccordionItemContext_unstable","requestToggle","useAccordionContext_unstable","ctx","disabledFocusable","collapsible","openItems","length","dir","useFluent","expandIconRotation","components","root","getNativeElementProps","resolveShorthand","required","defaultProps","children","React","createElement","ChevronRightRegular","style","transform","useARIAButtonShorthand","type","onClick","useEventCallback","event","isResolvedShorthand","_button_onClick","call","defaultPrevented"],"mappings":";;;;+BAWiBA;;aAAAA;;;6DAXM;gCACwE;2BACxD;2BACM;4BACT;qCACY;+BACC;AAKtC,MAAMA,8BAA8B,CAACC,OAAOC,MAAM;IACzD,MAAM,EAAEC,GAAE,EAAGC,KAAI,EAAGC,OAAM,EAAGC,WAAU,EAAGC,QAAQ,KAAK,CAAA,EAAGC,MAAM,SAAQ,EAAGC,oBAAoB,QAAO,EAAG,GAAGR;IAC5G,MAAM,EAAES,MAAK,EAAGC,SAAQ,EAAGC,KAAI,EAAG,GAAGC,IAAAA,+CAAgC;IACrE,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,IAAG,EAAG,GAAGC,IAAAA,uCAAS;IAC1B,oEAAoE;IACpE,IAAIC;IACJ,IAAId,uBAAuB,OAAO;QAC9B,8FAA8F;QAC9Fc,qBAAqBX,OAAO,CAAC,KAAK,EAAE;IACxC,OAAO;QACH,mGAAmG;QACnGW,qBAAqBX,OAAO,KAAKS,QAAQ,QAAQ,IAAI,GAAG;IAC5D,CAAC;IACD,OAAO;QACHV;QACAC;QACAJ;QACAD;QACAE;QACAe,YAAY;YACRC,MAAM;YACNpB,QAAQ;YACRC,YAAY;YACZF,MAAM;QACV;QACAqB,MAAMC,IAAAA,qCAAqB,EAACvB,MAAM,OAAO;YACrCD;YACA,GAAGD,KAAK;QACZ;QACAG,MAAMuB,IAAAA,gCAAgB,EAACvB;QACvBE,YAAYqB,IAAAA,gCAAgB,EAACrB,YAAY;YACrCsB,UAAU,IAAI;YACdC,cAAc;gBACVC,UAAU,WAAW,GAAGC,OAAMC,aAAa,CAACC,+BAAmB,EAAE;oBAC7DC,OAAO;wBACHC,WAAW,CAAC,OAAO,EAAEZ,mBAAmB,IAAI,CAAC;oBACjD;gBACJ;gBACA,eAAe,IAAI;YACvB;QACJ;QACAlB,QAAQsB,IAAAA,gCAAgB,EAAC;YACrB,GAAGS,IAAAA,iCAAsB,EAAC/B,QAAQ;gBAC9BuB,UAAU,IAAI;gBACdC,cAAc;oBACVlB;oBACAM;oBACA,iBAAiBL;oBACjByB,MAAM;gBACV;YACJ,EAAE;YACFC,SAASC,IAAAA,gCAAgB,EAAC,CAACC,QAAQ;gBAC/B,IAAIC,IAAAA,mCAAmB,EAACpC,SAAS;oBAC7B,IAAIqC;oBACHA,CAAAA,kBAAkBrC,OAAOiC,OAAO,AAAD,MAAO,IAAI,IAAII,oBAAoB,KAAK,IAAI,KAAK,IAAIA,gBAAgBC,IAAI,CAACtC,QAAQmC,MAAM;gBAC5H,CAAC;gBACD,IAAI,CAACA,MAAMI,gBAAgB,EAAE;oBACzB9B,cAAc;wBACVJ;wBACA8B;oBACJ;gBACJ,CAAC;YACL;QACJ,GAAG;YACCZ,UAAU,IAAI;QAClB;IACJ;AACJ"}
1
+ {"version":3,"sources":["useAccordionHeader.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, isResolvedShorthand, useEventCallback, slot } from '@fluentui/react-utilities';\nimport { useARIAButtonShorthand } 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 { as , 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 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(getNativeElementProps(as || 'div', {\n 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: slot.always({\n ...useARIAButtonShorthand(button, {\n required: true,\n defaultProps: {\n disabled,\n disabledFocusable,\n 'aria-expanded': open,\n type: 'button'\n }\n }),\n 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 }, {\n elementType: 'button'\n })\n };\n};\n"],"names":["useAccordionHeader_unstable","props","ref","as","icon","button","expandIcon","inline","size","expandIconPosition","value","disabled","open","useAccordionItemContext_unstable","requestToggle","useAccordionContext_unstable","ctx","disabledFocusable","collapsible","openItems","length","dir","useFluent","expandIconRotation","components","root","slot","always","getNativeElementProps","elementType","optional","renderByDefault","defaultProps","children","React","createElement","ChevronRightRegular","style","transform","useARIAButtonShorthand","required","type","onClick","useEventCallback","event","isResolvedShorthand","_button_onClick","call","defaultPrevented"],"mappings":";;;;+BAWiBA;;aAAAA;;;6DAXM;gCAC4D;2BAC5C;2BACM;4BACT;qCACY;+BACC;AAKtC,MAAMA,8BAA8B,CAACC,OAAOC,MAAM;IACzD,MAAM,EAAEC,GAAE,EAAGC,KAAI,EAAGC,OAAM,EAAGC,WAAU,EAAGC,QAAQ,KAAK,CAAA,EAAGC,MAAM,SAAQ,EAAGC,oBAAoB,QAAO,EAAG,GAAGR;IAC5G,MAAM,EAAES,MAAK,EAAGC,SAAQ,EAAGC,KAAI,EAAG,GAAGC,IAAAA,+CAAgC;IACrE,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,IAAG,EAAG,GAAGC,IAAAA,uCAAS;IAC1B,oEAAoE;IACpE,IAAIC;IACJ,IAAId,uBAAuB,OAAO;QAC9B,8FAA8F;QAC9Fc,qBAAqBX,OAAO,CAAC,KAAK,EAAE;IACxC,OAAO;QACH,mGAAmG;QACnGW,qBAAqBX,OAAO,KAAKS,QAAQ,QAAQ,IAAI,GAAG;IAC5D,CAAC;IACD,OAAO;QACHV;QACAC;QACAJ;QACAD;QACAE;QACAe,YAAY;YACRC,MAAM;YACNpB,QAAQ;YACRC,YAAY;YACZF,MAAM;QACV;QACAqB,MAAMC,oBAAI,CAACC,MAAM,CAACC,IAAAA,qCAAqB,EAACzB,MAAM,OAAO;YACjDD;YACA,GAAGD,KAAK;QACZ,IAAI;YACA4B,aAAa;QACjB;QACAzB,MAAMsB,oBAAI,CAACI,QAAQ,CAAC1B,MAAM;YACtByB,aAAa;QACjB;QACAvB,YAAYoB,oBAAI,CAACI,QAAQ,CAACxB,YAAY;YAClCyB,iBAAiB,IAAI;YACrBC,cAAc;gBACVC,UAAU,WAAW,GAAGC,OAAMC,aAAa,CAACC,+BAAmB,EAAE;oBAC7DC,OAAO;wBACHC,WAAW,CAAC,OAAO,EAAEf,mBAAmB,IAAI,CAAC;oBACjD;gBACJ;gBACA,eAAe,IAAI;YACvB;YACAM,aAAa;QACjB;QACAxB,QAAQqB,oBAAI,CAACC,MAAM,CAAC;YAChB,GAAGY,IAAAA,iCAAsB,EAAClC,QAAQ;gBAC9BmC,UAAU,IAAI;gBACdR,cAAc;oBACVrB;oBACAM;oBACA,iBAAiBL;oBACjB6B,MAAM;gBACV;YACJ,EAAE;YACFC,SAASC,IAAAA,gCAAgB,EAAC,CAACC,QAAQ;gBAC/B,IAAIC,IAAAA,mCAAmB,EAACxC,SAAS;oBAC7B,IAAIyC;oBACHA,CAAAA,kBAAkBzC,OAAOqC,OAAO,AAAD,MAAO,IAAI,IAAII,oBAAoB,KAAK,IAAI,KAAK,IAAIA,gBAAgBC,IAAI,CAAC1C,QAAQuC,MAAM;gBAC5H,CAAC;gBACD,IAAI,CAACA,MAAMI,gBAAgB,EAAE;oBACzBlC,cAAc;wBACVJ;wBACAkC;oBACJ;gBACJ,CAAC;YACL;QACJ,GAAG;YACCf,aAAa;QACjB;IACJ;AACJ"}
@@ -10,8 +10,8 @@ const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
10
10
  const _reactUtilities = require("@fluentui/react-utilities");
11
11
  const _accordionItem = require("../../contexts/accordionItem");
12
12
  const renderAccordionItem_unstable = (state, contextValues)=>{
13
- const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
14
- return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_accordionItem.AccordionItemProvider, {
13
+ (0, _reactUtilities.assertSlots)(state);
14
+ return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.root, null, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_accordionItem.AccordionItemProvider, {
15
15
  value: contextValues.accordionItem
16
- }, slotProps.root.children));
16
+ }, state.root.children));
17
17
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderAccordionItem.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport { AccordionItemProvider } from '../../contexts/accordionItem';\n/**\n * Function that renders the final JSX of the component\n */ export const renderAccordionItem_unstable = (state, contextValues)=>{\n const { slots , slotProps } = getSlotsNext(state);\n return /*#__PURE__*/ createElement(slots.root, slotProps.root, /*#__PURE__*/ createElement(AccordionItemProvider, {\n value: contextValues.accordionItem\n }, slotProps.root.children));\n};\n"],"names":["renderAccordionItem_unstable","state","contextValues","slots","slotProps","getSlotsNext","createElement","root","AccordionItemProvider","value","accordionItem","children"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKjCA;;aAAAA;;iCALkE;gCACtD;+BACS;AAG3B,MAAMA,+BAA+B,CAACC,OAAOC,gBAAgB;IACpE,MAAM,EAAEC,MAAK,EAAGC,UAAS,EAAG,GAAGC,IAAAA,4BAAY,EAACJ;IAC5C,OAAO,WAAW,GAAGK,IAAAA,8BAAa,EAACH,MAAMI,IAAI,EAAEH,UAAUG,IAAI,EAAE,WAAW,GAAGD,IAAAA,8BAAa,EAACE,oCAAqB,EAAE;QAC9GC,OAAOP,cAAcQ,aAAa;IACtC,GAAGN,UAAUG,IAAI,CAACI,QAAQ;AAC9B"}
1
+ {"version":3,"sources":["renderAccordionItem.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { AccordionItemProvider } from '../../contexts/accordionItem';\n/**\n * Function that renders the final JSX of the component\n */ export const renderAccordionItem_unstable = (state, contextValues)=>{\n assertSlots(state);\n return /*#__PURE__*/ createElement(state.root, null, /*#__PURE__*/ createElement(AccordionItemProvider, {\n value: contextValues.accordionItem\n }, state.root.children));\n};\n"],"names":["renderAccordionItem_unstable","state","contextValues","assertSlots","createElement","root","AccordionItemProvider","value","accordionItem","children"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKjCA;;aAAAA;;iCALkE;gCACvD;+BACU;AAG3B,MAAMA,+BAA+B,CAACC,OAAOC,gBAAgB;IACpEC,IAAAA,2BAAW,EAACF;IACZ,OAAO,WAAW,GAAGG,IAAAA,8BAAa,EAACH,MAAMI,IAAI,EAAE,IAAI,EAAE,WAAW,GAAGD,IAAAA,8BAAa,EAACE,oCAAqB,EAAE;QACpGC,OAAOL,cAAcM,aAAa;IACtC,GAAGP,MAAMI,IAAI,CAACI,QAAQ;AAC1B"}
@@ -20,9 +20,11 @@ const useAccordionItem_unstable = (props, ref)=>{
20
20
  components: {
21
21
  root: 'div'
22
22
  },
23
- root: (0, _reactUtilities.getNativeElementProps)('div', {
23
+ root: _reactUtilities.slot.always((0, _reactUtilities.getNativeElementProps)('div', {
24
24
  ref,
25
25
  ...props
26
+ }), {
27
+ elementType: 'div'
26
28
  })
27
29
  };
28
30
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["useAccordionItem.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { useAccordionContext_unstable } from '../../contexts/accordion';\n/**\n * Returns the props and state required to render the component\n * @param props - AccordionItem properties\n * @param ref - reference to root HTMLElement of AccordionItem\n */ export const useAccordionItem_unstable = (props, ref)=>{\n const { value , disabled =false } = props;\n const open = useAccordionContext_unstable((ctx)=>ctx.openItems.includes(value));\n return {\n open,\n value,\n disabled,\n components: {\n root: 'div'\n },\n root: getNativeElementProps('div', {\n ref,\n ...props\n })\n };\n};\n"],"names":["useAccordionItem_unstable","props","ref","value","disabled","open","useAccordionContext_unstable","ctx","openItems","includes","components","root","getNativeElementProps"],"mappings":";;;;+BAOiBA;;aAAAA;;;6DAPM;gCACe;2BACO;AAKlC,MAAMA,4BAA4B,CAACC,OAAOC,MAAM;IACvD,MAAM,EAAEC,MAAK,EAAGC,UAAU,KAAK,CAAA,EAAG,GAAGH;IACrC,MAAMI,OAAOC,IAAAA,uCAA4B,EAAC,CAACC,MAAMA,IAAIC,SAAS,CAACC,QAAQ,CAACN;IACxE,OAAO;QACHE;QACAF;QACAC;QACAM,YAAY;YACRC,MAAM;QACV;QACAA,MAAMC,IAAAA,qCAAqB,EAAC,OAAO;YAC/BV;YACA,GAAGD,KAAK;QACZ;IACJ;AACJ"}
1
+ {"version":3,"sources":["useAccordionItem.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport { useAccordionContext_unstable } from '../../contexts/accordion';\n/**\n * Returns the props and state required to render the component\n * @param props - AccordionItem properties\n * @param ref - reference to root HTMLElement of AccordionItem\n */ export const useAccordionItem_unstable = (props, ref)=>{\n const { value , disabled =false } = props;\n const open = useAccordionContext_unstable((ctx)=>ctx.openItems.includes(value));\n return {\n open,\n value,\n disabled,\n components: {\n root: 'div'\n },\n root: slot.always(getNativeElementProps('div', {\n ref,\n ...props\n }), {\n elementType: 'div'\n })\n };\n};\n"],"names":["useAccordionItem_unstable","props","ref","value","disabled","open","useAccordionContext_unstable","ctx","openItems","includes","components","root","slot","always","getNativeElementProps","elementType"],"mappings":";;;;+BAOiBA;;aAAAA;;;6DAPM;gCACqB;2BACC;AAKlC,MAAMA,4BAA4B,CAACC,OAAOC,MAAM;IACvD,MAAM,EAAEC,MAAK,EAAGC,UAAU,KAAK,CAAA,EAAG,GAAGH;IACrC,MAAMI,OAAOC,IAAAA,uCAA4B,EAAC,CAACC,MAAMA,IAAIC,SAAS,CAACC,QAAQ,CAACN;IACxE,OAAO;QACHE;QACAF;QACAC;QACAM,YAAY;YACRC,MAAM;QACV;QACAA,MAAMC,oBAAI,CAACC,MAAM,CAACC,IAAAA,qCAAqB,EAAC,OAAO;YAC3CZ;YACA,GAAGD,KAAK;QACZ,IAAI;YACAc,aAAa;QACjB;IACJ;AACJ"}
@@ -9,6 +9,6 @@ Object.defineProperty(exports, "renderAccordionPanel_unstable", {
9
9
  const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
10
10
  const _reactUtilities = require("@fluentui/react-utilities");
11
11
  const renderAccordionPanel_unstable = (state)=>{
12
- const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
13
- return state.open ? /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root, slotProps.root.children) : null;
12
+ (0, _reactUtilities.assertSlots)(state);
13
+ return state.open ? /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.root, null, state.root.children) : null;
14
14
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderAccordionPanel.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Function that renders the final JSX of the component\n */ export const renderAccordionPanel_unstable = (state)=>{\n const { slots , slotProps } = getSlotsNext(state);\n return state.open ? /*#__PURE__*/ createElement(slots.root, slotProps.root, slotProps.root.children) : null;\n};\n"],"names":["renderAccordionPanel_unstable","state","slots","slotProps","getSlotsNext","open","createElement","root","children"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAIjCA;;aAAAA;;iCAJkE;gCACtD;AAGlB,MAAMA,gCAAgC,CAACC,QAAQ;IACtD,MAAM,EAAEC,MAAK,EAAGC,UAAS,EAAG,GAAGC,IAAAA,4BAAY,EAACH;IAC5C,OAAOA,MAAMI,IAAI,GAAG,WAAW,GAAGC,IAAAA,8BAAa,EAACJ,MAAMK,IAAI,EAAEJ,UAAUI,IAAI,EAAEJ,UAAUI,IAAI,CAACC,QAAQ,IAAI,IAAI;AAC/G"}
1
+ {"version":3,"sources":["renderAccordionPanel.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Function that renders the final JSX of the component\n */ export const renderAccordionPanel_unstable = (state)=>{\n assertSlots(state);\n return state.open ? /*#__PURE__*/ createElement(state.root, null, state.root.children) : null;\n};\n"],"names":["renderAccordionPanel_unstable","state","assertSlots","open","createElement","root","children"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAIjCA;;aAAAA;;iCAJkE;gCACvD;AAGjB,MAAMA,gCAAgC,CAACC,QAAQ;IACtDC,IAAAA,2BAAW,EAACD;IACZ,OAAOA,MAAME,IAAI,GAAG,WAAW,GAAGC,IAAAA,8BAAa,EAACH,MAAMI,IAAI,EAAE,IAAI,EAAEJ,MAAMI,IAAI,CAACC,QAAQ,IAAI,IAAI;AACjG"}
@@ -25,10 +25,12 @@ const useAccordionPanel_unstable = (props, ref)=>{
25
25
  components: {
26
26
  root: 'div'
27
27
  },
28
- root: (0, _reactUtilities.getNativeElementProps)('div', {
28
+ root: _reactUtilities.slot.always((0, _reactUtilities.getNativeElementProps)('div', {
29
29
  ref,
30
30
  ...props,
31
31
  ...navigation && focusableProps
32
+ }), {
33
+ elementType: 'div'
32
34
  })
33
35
  };
34
36
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["useAccordionPanel.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { useTabsterAttributes } from '@fluentui/react-tabster';\nimport { useAccordionContext_unstable } from '../../contexts/accordion';\nimport { useAccordionItemContext_unstable } from '../../contexts/accordionItem';\n/**\n * Returns the props and state required to render the component\n * @param props - AccordionPanel properties\n * @param ref - reference to root HTMLElement of AccordionPanel\n */ export const useAccordionPanel_unstable = (props, ref)=>{\n const { open } = useAccordionItemContext_unstable();\n const focusableProps = useTabsterAttributes({\n focusable: {\n excludeFromMover: true\n }\n });\n const navigation = useAccordionContext_unstable((ctx)=>ctx.navigation);\n return {\n open,\n components: {\n root: 'div'\n },\n root: getNativeElementProps('div', {\n ref,\n ...props,\n ...navigation && focusableProps\n })\n };\n};\n"],"names":["useAccordionPanel_unstable","props","ref","open","useAccordionItemContext_unstable","focusableProps","useTabsterAttributes","focusable","excludeFromMover","navigation","useAccordionContext_unstable","ctx","components","root","getNativeElementProps"],"mappings":";;;;+BASiBA;;aAAAA;;;6DATM;gCACe;8BACD;2BACQ;+BACI;AAKtC,MAAMA,6BAA6B,CAACC,OAAOC,MAAM;IACxD,MAAM,EAAEC,KAAI,EAAG,GAAGC,IAAAA,+CAAgC;IAClD,MAAMC,iBAAiBC,IAAAA,kCAAoB,EAAC;QACxCC,WAAW;YACPC,kBAAkB,IAAI;QAC1B;IACJ;IACA,MAAMC,aAAaC,IAAAA,uCAA4B,EAAC,CAACC,MAAMA,IAAIF,UAAU;IACrE,OAAO;QACHN;QACAS,YAAY;YACRC,MAAM;QACV;QACAA,MAAMC,IAAAA,qCAAqB,EAAC,OAAO;YAC/BZ;YACA,GAAGD,KAAK;YACR,GAAGQ,cAAcJ,cAAc;QACnC;IACJ;AACJ"}
1
+ {"version":3,"sources":["useAccordionPanel.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport { useTabsterAttributes } from '@fluentui/react-tabster';\nimport { useAccordionContext_unstable } from '../../contexts/accordion';\nimport { useAccordionItemContext_unstable } from '../../contexts/accordionItem';\n/**\n * Returns the props and state required to render the component\n * @param props - AccordionPanel properties\n * @param ref - reference to root HTMLElement of AccordionPanel\n */ export const useAccordionPanel_unstable = (props, ref)=>{\n const { open } = useAccordionItemContext_unstable();\n const focusableProps = useTabsterAttributes({\n focusable: {\n excludeFromMover: true\n }\n });\n const navigation = useAccordionContext_unstable((ctx)=>ctx.navigation);\n return {\n open,\n components: {\n root: 'div'\n },\n root: slot.always(getNativeElementProps('div', {\n ref,\n ...props,\n ...navigation && focusableProps\n }), {\n elementType: 'div'\n })\n };\n};\n"],"names":["useAccordionPanel_unstable","props","ref","open","useAccordionItemContext_unstable","focusableProps","useTabsterAttributes","focusable","excludeFromMover","navigation","useAccordionContext_unstable","ctx","components","root","slot","always","getNativeElementProps","elementType"],"mappings":";;;;+BASiBA;;aAAAA;;;6DATM;gCACqB;8BACP;2BACQ;+BACI;AAKtC,MAAMA,6BAA6B,CAACC,OAAOC,MAAM;IACxD,MAAM,EAAEC,KAAI,EAAG,GAAGC,IAAAA,+CAAgC;IAClD,MAAMC,iBAAiBC,IAAAA,kCAAoB,EAAC;QACxCC,WAAW;YACPC,kBAAkB,IAAI;QAC1B;IACJ;IACA,MAAMC,aAAaC,IAAAA,uCAA4B,EAAC,CAACC,MAAMA,IAAIF,UAAU;IACrE,OAAO;QACHN;QACAS,YAAY;YACRC,MAAM;QACV;QACAA,MAAMC,oBAAI,CAACC,MAAM,CAACC,IAAAA,qCAAqB,EAAC,OAAO;YAC3Cd;YACA,GAAGD,KAAK;YACR,GAAGQ,cAAcJ,cAAc;QACnC,IAAI;YACAY,aAAa;QACjB;IACJ;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-accordion",
3
- "version": "0.0.0-nightly-20230804-0415.1",
3
+ "version": "0.0.0-nightly-20230808-0415.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-20230804-0415.1",
31
- "@fluentui/react-conformance-griffel": "0.0.0-nightly-20230804-0415.1",
30
+ "@fluentui/react-conformance": "0.0.0-nightly-20230808-0415.1",
31
+ "@fluentui/react-conformance-griffel": "0.0.0-nightly-20230808-0415.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-20230804-0415.1",
37
- "@fluentui/react-context-selector": "0.0.0-nightly-20230804-0415.1",
36
+ "@fluentui/react-aria": "0.0.0-nightly-20230808-0415.1",
37
+ "@fluentui/react-context-selector": "0.0.0-nightly-20230808-0415.1",
38
38
  "@fluentui/react-icons": "^2.0.207",
39
- "@fluentui/react-jsx-runtime": "0.0.0-nightly-20230804-0415.1",
40
- "@fluentui/react-shared-contexts": "0.0.0-nightly-20230804-0415.1",
41
- "@fluentui/react-tabster": "0.0.0-nightly-20230804-0415.1",
42
- "@fluentui/react-theme": "0.0.0-nightly-20230804-0415.1",
43
- "@fluentui/react-utilities": "0.0.0-nightly-20230804-0415.1",
39
+ "@fluentui/react-jsx-runtime": "0.0.0-nightly-20230808-0415.1",
40
+ "@fluentui/react-shared-contexts": "0.0.0-nightly-20230808-0415.1",
41
+ "@fluentui/react-tabster": "0.0.0-nightly-20230808-0415.1",
42
+ "@fluentui/react-theme": "0.0.0-nightly-20230808-0415.1",
43
+ "@fluentui/react-utilities": "0.0.0-nightly-20230808-0415.1",
44
44
  "@griffel/react": "^1.5.7",
45
45
  "@swc/helpers": "^0.4.14"
46
46
  },