@fluentui/react-drawer 9.0.0-beta.3 → 9.0.0-beta.31

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 (196) hide show
  1. package/CHANGELOG.json +933 -4
  2. package/CHANGELOG.md +338 -5
  3. package/dist/index.d.ts +31 -33
  4. package/lib/components/Drawer/Drawer.js +1 -1
  5. package/lib/components/Drawer/Drawer.js.map +1 -1
  6. package/lib/components/Drawer/Drawer.types.js.map +1 -1
  7. package/lib/components/Drawer/renderDrawer.js +4 -4
  8. package/lib/components/Drawer/renderDrawer.js.map +1 -1
  9. package/lib/components/Drawer/useDrawer.js +11 -10
  10. package/lib/components/Drawer/useDrawer.js.map +1 -1
  11. package/lib/components/DrawerBody/DrawerBody.js +1 -1
  12. package/lib/components/DrawerBody/DrawerBody.js.map +1 -1
  13. package/lib/components/DrawerBody/renderDrawerBody.js +4 -4
  14. package/lib/components/DrawerBody/renderDrawerBody.js.map +1 -1
  15. package/lib/components/DrawerBody/useDrawerBody.js +4 -2
  16. package/lib/components/DrawerBody/useDrawerBody.js.map +1 -1
  17. package/lib/components/DrawerBody/useDrawerBodyStyles.styles.js +3 -30
  18. package/lib/components/DrawerBody/useDrawerBodyStyles.styles.js.map +1 -1
  19. package/lib/components/DrawerFooter/DrawerFooter.js +3 -1
  20. package/lib/components/DrawerFooter/DrawerFooter.js.map +1 -1
  21. package/lib/components/DrawerFooter/renderDrawerFooter.js +4 -4
  22. package/lib/components/DrawerFooter/renderDrawerFooter.js.map +1 -1
  23. package/lib/components/DrawerFooter/useDrawerFooter.js +4 -2
  24. package/lib/components/DrawerFooter/useDrawerFooter.js.map +1 -1
  25. package/lib/components/DrawerFooter/useDrawerFooterStyles.styles.js +3 -16
  26. package/lib/components/DrawerFooter/useDrawerFooterStyles.styles.js.map +1 -1
  27. package/lib/components/DrawerHeader/DrawerHeader.js +1 -1
  28. package/lib/components/DrawerHeader/DrawerHeader.js.map +1 -1
  29. package/lib/components/DrawerHeader/renderDrawerHeader.js +4 -4
  30. package/lib/components/DrawerHeader/renderDrawerHeader.js.map +1 -1
  31. package/lib/components/DrawerHeader/useDrawerHeader.js +4 -2
  32. package/lib/components/DrawerHeader/useDrawerHeader.js.map +1 -1
  33. package/lib/components/DrawerHeader/useDrawerHeaderStyles.styles.js +3 -17
  34. package/lib/components/DrawerHeader/useDrawerHeaderStyles.styles.js.map +1 -1
  35. package/lib/components/DrawerHeaderNavigation/DrawerHeaderNavigation.js +1 -1
  36. package/lib/components/DrawerHeaderNavigation/DrawerHeaderNavigation.js.map +1 -1
  37. package/lib/components/DrawerHeaderNavigation/renderDrawerHeaderNavigation.js +4 -4
  38. package/lib/components/DrawerHeaderNavigation/renderDrawerHeaderNavigation.js.map +1 -1
  39. package/lib/components/DrawerHeaderNavigation/useDrawerHeaderNavigation.js +4 -2
  40. package/lib/components/DrawerHeaderNavigation/useDrawerHeaderNavigation.js.map +1 -1
  41. package/lib/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.js +3 -13
  42. package/lib/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.js.map +1 -1
  43. package/lib/components/DrawerHeaderTitle/DrawerHeaderTitle.js +1 -1
  44. package/lib/components/DrawerHeaderTitle/DrawerHeaderTitle.js.map +1 -1
  45. package/lib/components/DrawerHeaderTitle/DrawerHeaderTitle.types.js +1 -1
  46. package/lib/components/DrawerHeaderTitle/DrawerHeaderTitle.types.js.map +1 -1
  47. package/lib/components/DrawerHeaderTitle/renderDrawerHeaderTitle.js +9 -4
  48. package/lib/components/DrawerHeaderTitle/renderDrawerHeaderTitle.js.map +1 -1
  49. package/lib/components/DrawerHeaderTitle/useDrawerHeaderTitle.js +26 -15
  50. package/lib/components/DrawerHeaderTitle/useDrawerHeaderTitle.js.map +1 -1
  51. package/lib/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.js +1 -1
  52. package/lib/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.js.map +1 -1
  53. package/lib/components/DrawerInline/DrawerInline.js +3 -1
  54. package/lib/components/DrawerInline/DrawerInline.js.map +1 -1
  55. package/lib/components/DrawerInline/DrawerInline.types.js.map +1 -1
  56. package/lib/components/DrawerInline/renderDrawerInline.js +5 -5
  57. package/lib/components/DrawerInline/renderDrawerInline.js.map +1 -1
  58. package/lib/components/DrawerInline/useDrawerInline.js +13 -14
  59. package/lib/components/DrawerInline/useDrawerInline.js.map +1 -1
  60. package/lib/components/DrawerInline/useDrawerInlineStyles.styles.js +24 -14
  61. package/lib/components/DrawerInline/useDrawerInlineStyles.styles.js.map +1 -1
  62. package/lib/components/DrawerOverlay/DrawerOverlay.js +2 -0
  63. package/lib/components/DrawerOverlay/DrawerOverlay.js.map +1 -1
  64. package/lib/components/DrawerOverlay/DrawerOverlay.types.js.map +1 -1
  65. package/lib/components/DrawerOverlay/renderDrawerOverlay.js +9 -5
  66. package/lib/components/DrawerOverlay/renderDrawerOverlay.js.map +1 -1
  67. package/lib/components/DrawerOverlay/useDrawerOverlay.js +42 -18
  68. package/lib/components/DrawerOverlay/useDrawerOverlay.js.map +1 -1
  69. package/lib/components/DrawerOverlay/useDrawerOverlayStyles.styles.js +66 -9
  70. package/lib/components/DrawerOverlay/useDrawerOverlayStyles.styles.js.map +1 -1
  71. package/lib/e2e/DrawerShared.js +108 -0
  72. package/lib/e2e/DrawerShared.js.map +1 -0
  73. package/lib/shared/DrawerBase.types.js.map +1 -0
  74. package/lib/shared/useDrawerBaseStyles.styles.js +91 -0
  75. package/lib/shared/useDrawerBaseStyles.styles.js.map +1 -0
  76. package/lib/shared/useDrawerDefaultProps.js +8 -0
  77. package/lib/shared/useDrawerDefaultProps.js.map +1 -0
  78. package/lib-commonjs/Drawer.js +2 -2
  79. package/lib-commonjs/Drawer.js.map +1 -1
  80. package/lib-commonjs/DrawerBody.js +2 -2
  81. package/lib-commonjs/DrawerBody.js.map +1 -1
  82. package/lib-commonjs/DrawerFooter.js +2 -2
  83. package/lib-commonjs/DrawerFooter.js.map +1 -1
  84. package/lib-commonjs/DrawerHeader.js +2 -2
  85. package/lib-commonjs/DrawerHeader.js.map +1 -1
  86. package/lib-commonjs/DrawerHeaderNavigation.js +2 -2
  87. package/lib-commonjs/DrawerHeaderNavigation.js.map +1 -1
  88. package/lib-commonjs/DrawerHeaderTitle.js +2 -2
  89. package/lib-commonjs/DrawerHeaderTitle.js.map +1 -1
  90. package/lib-commonjs/DrawerInline.js +2 -2
  91. package/lib-commonjs/DrawerInline.js.map +1 -1
  92. package/lib-commonjs/DrawerOverlay.js +2 -2
  93. package/lib-commonjs/DrawerOverlay.js.map +1 -1
  94. package/lib-commonjs/components/Drawer/Drawer.js +9 -7
  95. package/lib-commonjs/components/Drawer/Drawer.js.map +1 -1
  96. package/lib-commonjs/components/Drawer/index.js +6 -6
  97. package/lib-commonjs/components/Drawer/index.js.map +1 -1
  98. package/lib-commonjs/components/Drawer/renderDrawer.js +8 -6
  99. package/lib-commonjs/components/Drawer/renderDrawer.js.map +1 -1
  100. package/lib-commonjs/components/Drawer/useDrawer.js +16 -13
  101. package/lib-commonjs/components/Drawer/useDrawer.js.map +1 -1
  102. package/lib-commonjs/components/Drawer/useDrawerStyles.styles.js +6 -2
  103. package/lib-commonjs/components/Drawer/useDrawerStyles.styles.js.map +1 -1
  104. package/lib-commonjs/components/DrawerBody/DrawerBody.js +9 -7
  105. package/lib-commonjs/components/DrawerBody/DrawerBody.js.map +1 -1
  106. package/lib-commonjs/components/DrawerBody/index.js +6 -6
  107. package/lib-commonjs/components/DrawerBody/index.js.map +1 -1
  108. package/lib-commonjs/components/DrawerBody/renderDrawerBody.js +7 -6
  109. package/lib-commonjs/components/DrawerBody/renderDrawerBody.js.map +1 -1
  110. package/lib-commonjs/components/DrawerBody/useDrawerBody.js +9 -5
  111. package/lib-commonjs/components/DrawerBody/useDrawerBody.js.map +1 -1
  112. package/lib-commonjs/components/DrawerBody/useDrawerBodyStyles.styles.js +15 -66
  113. package/lib-commonjs/components/DrawerBody/useDrawerBodyStyles.styles.js.map +1 -1
  114. package/lib-commonjs/components/DrawerFooter/DrawerFooter.js +9 -5
  115. package/lib-commonjs/components/DrawerFooter/DrawerFooter.js.map +1 -1
  116. package/lib-commonjs/components/DrawerFooter/index.js +6 -6
  117. package/lib-commonjs/components/DrawerFooter/index.js.map +1 -1
  118. package/lib-commonjs/components/DrawerFooter/renderDrawerFooter.js +7 -6
  119. package/lib-commonjs/components/DrawerFooter/renderDrawerFooter.js.map +1 -1
  120. package/lib-commonjs/components/DrawerFooter/useDrawerFooter.js +9 -5
  121. package/lib-commonjs/components/DrawerFooter/useDrawerFooter.js.map +1 -1
  122. package/lib-commonjs/components/DrawerFooter/useDrawerFooterStyles.styles.js +11 -32
  123. package/lib-commonjs/components/DrawerFooter/useDrawerFooterStyles.styles.js.map +1 -1
  124. package/lib-commonjs/components/DrawerHeader/DrawerHeader.js +9 -7
  125. package/lib-commonjs/components/DrawerHeader/DrawerHeader.js.map +1 -1
  126. package/lib-commonjs/components/DrawerHeader/index.js +6 -6
  127. package/lib-commonjs/components/DrawerHeader/index.js.map +1 -1
  128. package/lib-commonjs/components/DrawerHeader/renderDrawerHeader.js +7 -6
  129. package/lib-commonjs/components/DrawerHeader/renderDrawerHeader.js.map +1 -1
  130. package/lib-commonjs/components/DrawerHeader/useDrawerHeader.js +9 -5
  131. package/lib-commonjs/components/DrawerHeader/useDrawerHeader.js.map +1 -1
  132. package/lib-commonjs/components/DrawerHeader/useDrawerHeaderStyles.styles.js +11 -34
  133. package/lib-commonjs/components/DrawerHeader/useDrawerHeaderStyles.styles.js.map +1 -1
  134. package/lib-commonjs/components/DrawerHeaderNavigation/DrawerHeaderNavigation.js +9 -7
  135. package/lib-commonjs/components/DrawerHeaderNavigation/DrawerHeaderNavigation.js.map +1 -1
  136. package/lib-commonjs/components/DrawerHeaderNavigation/index.js +6 -6
  137. package/lib-commonjs/components/DrawerHeaderNavigation/index.js.map +1 -1
  138. package/lib-commonjs/components/DrawerHeaderNavigation/renderDrawerHeaderNavigation.js +7 -6
  139. package/lib-commonjs/components/DrawerHeaderNavigation/renderDrawerHeaderNavigation.js.map +1 -1
  140. package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigation.js +9 -5
  141. package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigation.js.map +1 -1
  142. package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.js +11 -26
  143. package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.js.map +1 -1
  144. package/lib-commonjs/components/DrawerHeaderTitle/DrawerHeaderTitle.js +9 -7
  145. package/lib-commonjs/components/DrawerHeaderTitle/DrawerHeaderTitle.js.map +1 -1
  146. package/lib-commonjs/components/DrawerHeaderTitle/DrawerHeaderTitle.types.js +0 -2
  147. package/lib-commonjs/components/DrawerHeaderTitle/DrawerHeaderTitle.types.js.map +1 -1
  148. package/lib-commonjs/components/DrawerHeaderTitle/index.js +6 -6
  149. package/lib-commonjs/components/DrawerHeaderTitle/index.js.map +1 -1
  150. package/lib-commonjs/components/DrawerHeaderTitle/renderDrawerHeaderTitle.js +12 -6
  151. package/lib-commonjs/components/DrawerHeaderTitle/renderDrawerHeaderTitle.js.map +1 -1
  152. package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitle.js +31 -18
  153. package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitle.js.map +1 -1
  154. package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.js +14 -10
  155. package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.js.map +1 -1
  156. package/lib-commonjs/components/DrawerInline/DrawerInline.js +9 -5
  157. package/lib-commonjs/components/DrawerInline/DrawerInline.js.map +1 -1
  158. package/lib-commonjs/components/DrawerInline/index.js +6 -6
  159. package/lib-commonjs/components/DrawerInline/index.js.map +1 -1
  160. package/lib-commonjs/components/DrawerInline/renderDrawerInline.js +8 -7
  161. package/lib-commonjs/components/DrawerInline/renderDrawerInline.js.map +1 -1
  162. package/lib-commonjs/components/DrawerInline/useDrawerInline.js +18 -17
  163. package/lib-commonjs/components/DrawerInline/useDrawerInline.js.map +1 -1
  164. package/lib-commonjs/components/DrawerInline/useDrawerInlineStyles.styles.js +44 -19
  165. package/lib-commonjs/components/DrawerInline/useDrawerInlineStyles.styles.js.map +1 -1
  166. package/lib-commonjs/components/DrawerOverlay/DrawerOverlay.js +9 -5
  167. package/lib-commonjs/components/DrawerOverlay/DrawerOverlay.js.map +1 -1
  168. package/lib-commonjs/components/DrawerOverlay/index.js +6 -6
  169. package/lib-commonjs/components/DrawerOverlay/index.js.map +1 -1
  170. package/lib-commonjs/components/DrawerOverlay/renderDrawerOverlay.js +12 -7
  171. package/lib-commonjs/components/DrawerOverlay/renderDrawerOverlay.js.map +1 -1
  172. package/lib-commonjs/components/DrawerOverlay/useDrawerOverlay.js +46 -20
  173. package/lib-commonjs/components/DrawerOverlay/useDrawerOverlay.js.map +1 -1
  174. package/lib-commonjs/components/DrawerOverlay/useDrawerOverlayStyles.styles.js +134 -13
  175. package/lib-commonjs/components/DrawerOverlay/useDrawerOverlayStyles.styles.js.map +1 -1
  176. package/lib-commonjs/e2e/DrawerShared.js +119 -0
  177. package/lib-commonjs/e2e/DrawerShared.js.map +1 -0
  178. package/lib-commonjs/index.js +122 -46
  179. package/lib-commonjs/index.js.map +1 -1
  180. package/lib-commonjs/shared/useDrawerBaseStyles.styles.js +136 -0
  181. package/lib-commonjs/shared/useDrawerBaseStyles.styles.js.map +1 -0
  182. package/lib-commonjs/shared/useDrawerDefaultProps.js +18 -0
  183. package/lib-commonjs/shared/useDrawerDefaultProps.js.map +1 -0
  184. package/package.json +14 -13
  185. package/lib/util/DrawerBase.types.js.map +0 -1
  186. package/lib/util/getDefaultDrawerProps.js +0 -9
  187. package/lib/util/getDefaultDrawerProps.js.map +0 -1
  188. package/lib/util/useDrawerBaseStyles.styles.js +0 -55
  189. package/lib/util/useDrawerBaseStyles.styles.js.map +0 -1
  190. package/lib-commonjs/util/getDefaultDrawerProps.js +0 -17
  191. package/lib-commonjs/util/getDefaultDrawerProps.js.map +0 -1
  192. package/lib-commonjs/util/useDrawerBaseStyles.styles.js +0 -125
  193. package/lib-commonjs/util/useDrawerBaseStyles.styles.js.map +0 -1
  194. /package/lib/{util → shared}/DrawerBase.types.js +0 -0
  195. /package/lib-commonjs/{util → shared}/DrawerBase.types.js +0 -0
  196. /package/lib-commonjs/{util → shared}/DrawerBase.types.js.map +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["DrawerHeaderTitle.types.ts"],"sourcesContent":["import { DialogTitleSlots } from '@fluentui/react-dialog';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport * as React from 'react';\n\nexport type DrawerHeaderTitleSlots = {\n root: Slot<'div'>;\n\n /**\n * By default this is a h2, but can be any heading or div.\n * If `div` is provided do not forget to also provide proper `role=\"heading\"` and `aria-level` attributes\n */\n heading?: DialogTitleSlots['root'];\n\n /**\n * Action slot for the close button\n */\n action?: DialogTitleSlots['action'];\n};\n\n/**\n * DrawerHeaderTitle Props\n */\nexport type DrawerHeaderTitleProps = ComponentProps<DrawerHeaderTitleSlots> & {\n /**\n * Content of the DrawerHeaderTitle\n * Children is mandatory because DrawerHeaderTitle is a wrapper component\n */\n children: React.ReactNode | undefined;\n};\n\n/**\n * State used in rendering DrawerHeaderTitle\n */\nexport type DrawerHeaderTitleState = ComponentState<DrawerHeaderTitleSlots>;\n"],"names":["React"],"mappings":"AAEA,YAAYA,WAAW,QAAQ"}
1
+ {"version":3,"sources":["DrawerHeaderTitle.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type DrawerHeaderTitleSlots = {\n root: Slot<'div'>;\n\n /**\n * By default this is a h2, but can be any heading or div.\n * If `div` is provided do not forget to also provide proper `role=\"heading\"` and `aria-level` attributes\n */\n heading?: Slot<'h2', 'h1' | 'h3' | 'h4' | 'h5' | 'h6' | 'div'>;\n\n /**\n * Action slot for the close button\n */\n action?: Slot<'div'>;\n};\n\n/**\n * DrawerHeaderTitle Props\n */\nexport type DrawerHeaderTitleProps = ComponentProps<DrawerHeaderTitleSlots>;\n\n/**\n * State used in rendering DrawerHeaderTitle\n */\nexport type DrawerHeaderTitleState = ComponentState<DrawerHeaderTitleSlots>;\n"],"names":[],"mappings":"AAAA,WAyB4E"}
@@ -1,8 +1,13 @@
1
- import * as React from 'react';
2
- import { getSlots } from '@fluentui/react-utilities';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { assertSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Render the final JSX of DrawerHeaderTitle
5
5
  */ export const renderDrawerHeaderTitle_unstable = (state)=>{
6
- const { slots , slotProps } = getSlots(state);
7
- return /*#__PURE__*/ React.createElement(slots.root, slotProps.root, slots.heading && /*#__PURE__*/ React.createElement(slots.heading, slotProps.heading), slots.action && /*#__PURE__*/ React.createElement(slots.action, slotProps.action));
6
+ assertSlots(state);
7
+ return /*#__PURE__*/ _jsxs(state.root, {
8
+ children: [
9
+ state.heading && /*#__PURE__*/ _jsx(state.heading, {}),
10
+ state.action && /*#__PURE__*/ _jsx(state.action, {})
11
+ ]
12
+ });
8
13
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderDrawerHeaderTitle.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { DrawerHeaderTitleState, DrawerHeaderTitleSlots } from './DrawerHeaderTitle.types';\n\n/**\n * Render the final JSX of DrawerHeaderTitle\n */\nexport const renderDrawerHeaderTitle_unstable = (state: DrawerHeaderTitleState) => {\n const { slots, slotProps } = getSlots<DrawerHeaderTitleSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slots.heading && <slots.heading {...slotProps.heading} />}\n {slots.action && <slots.action {...slotProps.action} />}\n </slots.root>\n );\n};\n"],"names":["React","getSlots","renderDrawerHeaderTitle_unstable","state","slots","slotProps","root","heading","action"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,QAAQ,QAAQ,4BAA4B;AAGrD;;CAEC,GACD,OAAO,MAAMC,mCAAmC,CAACC,QAAkC;IACjF,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGJ,SAAiCE;IAE9D,qBACE,oBAACC,MAAME,IAAI,EAAKD,UAAUC,IAAI,EAC3BF,MAAMG,OAAO,kBAAI,oBAACH,MAAMG,OAAO,EAAKF,UAAUE,OAAO,GACrDH,MAAMI,MAAM,kBAAI,oBAACJ,MAAMI,MAAM,EAAKH,UAAUG,MAAM;AAGzD,EAAE"}
1
+ {"version":3,"sources":["renderDrawerHeaderTitle.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\n\nimport type { DrawerHeaderTitleState, DrawerHeaderTitleSlots } from './DrawerHeaderTitle.types';\n\n/**\n * Render the final JSX of DrawerHeaderTitle\n */\nexport const renderDrawerHeaderTitle_unstable = (state: DrawerHeaderTitleState) => {\n assertSlots<DrawerHeaderTitleSlots>(state);\n\n return (\n <state.root>\n {state.heading && <state.heading />}\n {state.action && <state.action />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderDrawerHeaderTitle_unstable","state","root","heading","action"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,mCAAmC,CAACC;IAC/CF,YAAoCE;IAEpC,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,OAAO,kBAAI,KAACF,MAAME,OAAO;YAC/BF,MAAMG,MAAM,kBAAI,KAACH,MAAMG,MAAM;;;AAGpC,EAAE"}
@@ -1,6 +1,21 @@
1
1
  import * as React from 'react';
2
- import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';
3
- import { useDialogTitle_unstable } from '@fluentui/react-dialog';
2
+ import { getNativeElementProps, slot } from '@fluentui/react-utilities';
3
+ import { useDialogContext_unstable } from '@fluentui/react-dialog';
4
+ /**
5
+ * @internal
6
+ * Create the shorthand for the heading element.
7
+ * @param props - props from this instance of DrawerHeaderTitle
8
+ */ const useHeadingProps = ({ children, heading })=>{
9
+ const id = useDialogContext_unstable((ctx)=>ctx.dialogTitleId);
10
+ return slot.optional(heading, {
11
+ defaultProps: {
12
+ id,
13
+ children
14
+ },
15
+ renderByDefault: true,
16
+ elementType: 'h2'
17
+ });
18
+ };
4
19
  /**
5
20
  * Create the state required to render DrawerHeaderTitle.
6
21
  *
@@ -10,26 +25,22 @@ import { useDialogTitle_unstable } from '@fluentui/react-dialog';
10
25
  * @param props - props from this instance of DrawerHeaderTitle
11
26
  * @param ref - reference to root HTMLElement of DrawerHeaderTitle
12
27
  */ export const useDrawerHeaderTitle_unstable = (props, ref)=>{
13
- const { root: heading , action , components: titleComponents } = useDialogTitle_unstable(props, ref);
28
+ const headingProps = useHeadingProps(props);
14
29
  return {
15
30
  components: {
16
31
  root: 'div',
17
- heading: titleComponents.root,
18
- action: titleComponents.action
32
+ heading: 'h2',
33
+ action: 'div'
19
34
  },
20
- root: getNativeElementProps('div', {
35
+ root: slot.always(getNativeElementProps('div', {
21
36
  ref,
22
37
  ...props
38
+ }), {
39
+ elementType: 'div'
23
40
  }),
24
- heading: resolveShorthand(props.heading, {
25
- required: true,
26
- defaultProps: {
27
- ...heading,
28
- className: undefined
29
- }
30
- }),
31
- action: resolveShorthand(props.action, {
32
- defaultProps: action
41
+ heading: headingProps,
42
+ action: slot.optional(props.action, {
43
+ elementType: 'div'
33
44
  })
34
45
  };
35
46
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["useDrawerHeaderTitle.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport type { DrawerHeaderTitleProps, DrawerHeaderTitleState } from './DrawerHeaderTitle.types';\nimport { useDialogTitle_unstable } from '@fluentui/react-dialog';\n\n/**\n * Create the state required to render DrawerHeaderTitle.\n *\n * The returned state can be modified with hooks such as useDrawerHeaderTitleStyles_unstable,\n * before being passed to renderDrawerHeaderTitle_unstable.\n *\n * @param props - props from this instance of DrawerHeaderTitle\n * @param ref - reference to root HTMLElement of DrawerHeaderTitle\n */\nexport const useDrawerHeaderTitle_unstable = (\n props: DrawerHeaderTitleProps,\n ref: React.Ref<HTMLDivElement>,\n): DrawerHeaderTitleState => {\n const { root: heading, action, components: titleComponents } = useDialogTitle_unstable(props, ref);\n\n return {\n components: {\n root: 'div',\n heading: titleComponents.root,\n action: titleComponents.action,\n },\n\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n heading: resolveShorthand(props.heading, {\n required: true,\n defaultProps: {\n ...heading,\n className: undefined, // remove className from heading\n },\n }),\n action: resolveShorthand(props.action, {\n defaultProps: action,\n }),\n };\n};\n"],"names":["React","getNativeElementProps","resolveShorthand","useDialogTitle_unstable","useDrawerHeaderTitle_unstable","props","ref","root","heading","action","components","titleComponents","required","defaultProps","className","undefined"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,gBAAgB,QAAQ,4BAA4B;AAEpF,SAASC,uBAAuB,QAAQ,yBAAyB;AAEjE;;;;;;;;CAQC,GACD,OAAO,MAAMC,gCAAgC,CAC3CC,OACAC,MAC2B;IAC3B,MAAM,EAAEC,MAAMC,QAAO,EAAEC,OAAM,EAAEC,YAAYC,gBAAe,EAAE,GAAGR,wBAAwBE,OAAOC;IAE9F,OAAO;QACLI,YAAY;YACVH,MAAM;YACNC,SAASG,gBAAgBJ,IAAI;YAC7BE,QAAQE,gBAAgBF,MAAM;QAChC;QAEAF,MAAMN,sBAAsB,OAAO;YACjCK;YACA,GAAGD,KAAK;QACV;QACAG,SAASN,iBAAiBG,MAAMG,OAAO,EAAE;YACvCI,UAAU,IAAI;YACdC,cAAc;gBACZ,GAAGL,OAAO;gBACVM,WAAWC;YACb;QACF;QACAN,QAAQP,iBAAiBG,MAAMI,MAAM,EAAE;YACrCI,cAAcJ;QAChB;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["useDrawerHeaderTitle.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport { useDialogContext_unstable } from '@fluentui/react-dialog';\n\nimport type { DrawerHeaderTitleProps, DrawerHeaderTitleState } from './DrawerHeaderTitle.types';\n\n/**\n * @internal\n * Create the shorthand for the heading element.\n * @param props - props from this instance of DrawerHeaderTitle\n */\nconst useHeadingProps = ({ children, heading }: DrawerHeaderTitleProps) => {\n const id = useDialogContext_unstable(ctx => ctx.dialogTitleId);\n\n return slot.optional(heading, {\n defaultProps: {\n id,\n children,\n },\n renderByDefault: true,\n elementType: 'h2',\n });\n};\n\n/**\n * Create the state required to render DrawerHeaderTitle.\n *\n * The returned state can be modified with hooks such as useDrawerHeaderTitleStyles_unstable,\n * before being passed to renderDrawerHeaderTitle_unstable.\n *\n * @param props - props from this instance of DrawerHeaderTitle\n * @param ref - reference to root HTMLElement of DrawerHeaderTitle\n */\nexport const useDrawerHeaderTitle_unstable = (\n props: DrawerHeaderTitleProps,\n ref: React.Ref<HTMLDivElement>,\n): DrawerHeaderTitleState => {\n const headingProps = useHeadingProps(props);\n\n return {\n components: {\n root: 'div',\n heading: 'h2',\n action: 'div',\n },\n\n root: slot.always(\n getNativeElementProps('div', {\n ref,\n ...props,\n }),\n { elementType: 'div' },\n ),\n heading: headingProps,\n action: slot.optional(props.action, {\n elementType: 'div',\n }),\n };\n};\n"],"names":["React","getNativeElementProps","slot","useDialogContext_unstable","useHeadingProps","children","heading","id","ctx","dialogTitleId","optional","defaultProps","renderByDefault","elementType","useDrawerHeaderTitle_unstable","props","ref","headingProps","components","root","action","always"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,IAAI,QAAQ,4BAA4B;AACxE,SAASC,yBAAyB,QAAQ,yBAAyB;AAInE;;;;CAIC,GACD,MAAMC,kBAAkB,CAAC,EAAEC,QAAQ,EAAEC,OAAO,EAA0B;IACpE,MAAMC,KAAKJ,0BAA0BK,CAAAA,MAAOA,IAAIC,aAAa;IAE7D,OAAOP,KAAKQ,QAAQ,CAACJ,SAAS;QAC5BK,cAAc;YACZJ;YACAF;QACF;QACAO,iBAAiB;QACjBC,aAAa;IACf;AACF;AAEA;;;;;;;;CAQC,GACD,OAAO,MAAMC,gCAAgC,CAC3CC,OACAC;IAEA,MAAMC,eAAeb,gBAAgBW;IAErC,OAAO;QACLG,YAAY;YACVC,MAAM;YACNb,SAAS;YACTc,QAAQ;QACV;QAEAD,MAAMjB,KAAKmB,MAAM,CACfpB,sBAAsB,OAAO;YAC3Be;YACA,GAAGD,KAAK;QACV,IACA;YAAEF,aAAa;QAAM;QAEvBP,SAASW;QACTG,QAAQlB,KAAKQ,QAAQ,CAACK,MAAMK,MAAM,EAAE;YAClCP,aAAa;QACf;IACF;AACF,EAAE"}
@@ -20,7 +20,7 @@ const useStyles = /*#__PURE__*/__styles({
20
20
  t21cq0: ["faqnl2i", "fd75udd"]
21
21
  }
22
22
  }, {
23
- d: [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1869bpl{-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fsnqrgy{-webkit-column-gap:var(--spacingHorizontalS);column-gap:var(--spacingHorizontalS);}", ".faqnl2i{margin-right:calc(var(--spacingHorizontalS) * -1);}", ".fd75udd{margin-left:calc(var(--spacingHorizontalS) * -1);}"]
23
+ d: [".f22iagw{display:flex;}", ".f1869bpl{justify-content:space-between;}", ".f122n59{align-items:center;}", ".fsnqrgy{column-gap:var(--spacingHorizontalS);}", ".faqnl2i{margin-right:calc(var(--spacingHorizontalS) * -1);}", ".fd75udd{margin-left:calc(var(--spacingHorizontalS) * -1);}"]
24
24
  });
25
25
  /**
26
26
  * Apply styling to the DrawerHeaderTitle slots based on the state
@@ -1 +1 @@
1
- {"version":3,"names":["__styles","mergeClasses","useDialogTitleStyles_unstable","tokens","drawerHeaderTitleClassNames","root","heading","action","useStyles","mc9l5x","Brf1p80","Bt984gj","i8kkvl","t21cq0","d","useDrawerHeaderTitleStyles_unstable","state","styles","components","className"],"sources":["useDrawerHeaderTitleStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { useDialogTitleStyles_unstable } from '@fluentui/react-dialog';\nimport { tokens } from '@fluentui/react-theme';\nexport const drawerHeaderTitleClassNames = {\n root: 'fui-DrawerHeaderTitle',\n heading: 'fui-DrawerHeaderTitle__heading',\n action: 'fui-DrawerHeaderTitle__action'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n columnGap: tokens.spacingHorizontalS\n },\n action: {\n marginRight: `calc(${tokens.spacingHorizontalS} * -1)`\n }\n});\n/**\n * Apply styling to the DrawerHeaderTitle slots based on the state\n */ export const useDrawerHeaderTitleStyles_unstable = (state)=>{\n const styles = useStyles();\n const { heading: root = {} , action , components } = state;\n useDialogTitleStyles_unstable({\n components: {\n root: components.heading,\n action: components.action\n },\n root,\n action\n });\n state.root.className = mergeClasses(drawerHeaderTitleClassNames.root, styles.root, state.root.className);\n if (state.heading) {\n state.heading.className = mergeClasses(drawerHeaderTitleClassNames.heading, state.heading.className);\n }\n if (state.action) {\n state.action.className = mergeClasses(drawerHeaderTitleClassNames.action, styles.action, state.action.className);\n }\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,6BAA6B,QAAQ,wBAAwB;AACtE,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,OAAO,MAAMC,2BAA2B,GAAG;EACvCC,IAAI,EAAE,uBAAuB;EAC7BC,OAAO,EAAE,gCAAgC;EACzCC,MAAM,EAAE;AACZ,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGR,QAAA;EAAAK,IAAA;IAAAI,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAL,MAAA;IAAAM,MAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,CAUrB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,mCAAmC,GAAIC,KAAK,IAAG;EAC5D,MAAMC,MAAM,GAAGT,SAAS,CAAC,CAAC;EAC1B,MAAM;IAAEF,OAAO,EAAED,IAAI,GAAG,CAAC,CAAC;IAAGE,MAAM;IAAGW;EAAY,CAAC,GAAGF,KAAK;EAC3Dd,6BAA6B,CAAC;IAC1BgB,UAAU,EAAE;MACRb,IAAI,EAAEa,UAAU,CAACZ,OAAO;MACxBC,MAAM,EAAEW,UAAU,CAACX;IACvB,CAAC;IACDF,IAAI;IACJE;EACJ,CAAC,CAAC;EACFS,KAAK,CAACX,IAAI,CAACc,SAAS,GAAGlB,YAAY,CAACG,2BAA2B,CAACC,IAAI,EAAEY,MAAM,CAACZ,IAAI,EAAEW,KAAK,CAACX,IAAI,CAACc,SAAS,CAAC;EACxG,IAAIH,KAAK,CAACV,OAAO,EAAE;IACfU,KAAK,CAACV,OAAO,CAACa,SAAS,GAAGlB,YAAY,CAACG,2BAA2B,CAACE,OAAO,EAAEU,KAAK,CAACV,OAAO,CAACa,SAAS,CAAC;EACxG;EACA,IAAIH,KAAK,CAACT,MAAM,EAAE;IACdS,KAAK,CAACT,MAAM,CAACY,SAAS,GAAGlB,YAAY,CAACG,2BAA2B,CAACG,MAAM,EAAEU,MAAM,CAACV,MAAM,EAAES,KAAK,CAACT,MAAM,CAACY,SAAS,CAAC;EACpH;EACA,OAAOH,KAAK;AAChB,CAAC"}
1
+ {"version":3,"names":["__styles","mergeClasses","useDialogTitleStyles_unstable","tokens","drawerHeaderTitleClassNames","root","heading","action","useStyles","mc9l5x","Brf1p80","Bt984gj","i8kkvl","t21cq0","d","useDrawerHeaderTitleStyles_unstable","state","styles","components","className"],"sources":["useDrawerHeaderTitleStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { useDialogTitleStyles_unstable } from '@fluentui/react-dialog';\nimport { tokens } from '@fluentui/react-theme';\nexport const drawerHeaderTitleClassNames = {\n root: 'fui-DrawerHeaderTitle',\n heading: 'fui-DrawerHeaderTitle__heading',\n action: 'fui-DrawerHeaderTitle__action'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n columnGap: tokens.spacingHorizontalS\n },\n action: {\n marginRight: `calc(${tokens.spacingHorizontalS} * -1)`\n }\n});\n/**\n * Apply styling to the DrawerHeaderTitle slots based on the state\n */ export const useDrawerHeaderTitleStyles_unstable = (state)=>{\n const styles = useStyles();\n const { heading: root = {}, action, components } = state;\n useDialogTitleStyles_unstable({\n components: {\n root: components.heading,\n action: components.action\n },\n root,\n action\n });\n state.root.className = mergeClasses(drawerHeaderTitleClassNames.root, styles.root, state.root.className);\n if (state.heading) {\n state.heading.className = mergeClasses(drawerHeaderTitleClassNames.heading, state.heading.className);\n }\n if (state.action) {\n state.action.className = mergeClasses(drawerHeaderTitleClassNames.action, styles.action, state.action.className);\n }\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,6BAA6B,QAAQ,wBAAwB;AACtE,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,OAAO,MAAMC,2BAA2B,GAAG;EACvCC,IAAI,EAAE,uBAAuB;EAC7BC,OAAO,EAAE,gCAAgC;EACzCC,MAAM,EAAE;AACZ,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGR,QAAA;EAAAK,IAAA;IAAAI,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAL,MAAA;IAAAM,MAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,CAUrB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,mCAAmC,GAAIC,KAAK,IAAG;EAC5D,MAAMC,MAAM,GAAGT,SAAS,CAAC,CAAC;EAC1B,MAAM;IAAEF,OAAO,EAAED,IAAI,GAAG,CAAC,CAAC;IAAEE,MAAM;IAAEW;EAAW,CAAC,GAAGF,KAAK;EACxDd,6BAA6B,CAAC;IAC1BgB,UAAU,EAAE;MACRb,IAAI,EAAEa,UAAU,CAACZ,OAAO;MACxBC,MAAM,EAAEW,UAAU,CAACX;IACvB,CAAC;IACDF,IAAI;IACJE;EACJ,CAAC,CAAC;EACFS,KAAK,CAACX,IAAI,CAACc,SAAS,GAAGlB,YAAY,CAACG,2BAA2B,CAACC,IAAI,EAAEY,MAAM,CAACZ,IAAI,EAAEW,KAAK,CAACX,IAAI,CAACc,SAAS,CAAC;EACxG,IAAIH,KAAK,CAACV,OAAO,EAAE;IACfU,KAAK,CAACV,OAAO,CAACa,SAAS,GAAGlB,YAAY,CAACG,2BAA2B,CAACE,OAAO,EAAEU,KAAK,CAACV,OAAO,CAACa,SAAS,CAAC;EACxG;EACA,IAAIH,KAAK,CAACT,MAAM,EAAE;IACdS,KAAK,CAACT,MAAM,CAACY,SAAS,GAAGlB,YAAY,CAACG,2BAA2B,CAACG,MAAM,EAAEU,MAAM,CAACV,MAAM,EAAES,KAAK,CAACT,MAAM,CAACY,SAAS,CAAC;EACpH;EACA,OAAOH,KAAK;AAChB,CAAC"}
@@ -1,13 +1,15 @@
1
1
  import * as React from 'react';
2
+ import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
2
3
  import { useDrawerInline_unstable } from './useDrawerInline';
3
4
  import { renderDrawerInline_unstable } from './renderDrawerInline';
4
5
  import { useDrawerInlineStyles_unstable } from './useDrawerInlineStyles.styles';
5
6
  /**
6
- * DrawerInline is often used for navigation that is not dissmissable. As it is on the same level as
7
+ * DrawerInline is often used for navigation that is not dismissible. As it is on the same level as
7
8
  * the main surface, users can still interact with other UI elements.
8
9
  */ export const DrawerInline = /*#__PURE__*/ React.forwardRef((props, ref)=>{
9
10
  const state = useDrawerInline_unstable(props, ref);
10
11
  useDrawerInlineStyles_unstable(state);
12
+ useCustomStyleHook_unstable('useDrawerInlineStyles_unstable')(state);
11
13
  return renderDrawerInline_unstable(state);
12
14
  });
13
15
  DrawerInline.displayName = 'DrawerInline';
@@ -1 +1 @@
1
- {"version":3,"sources":["DrawerInline.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDrawerInline_unstable } from './useDrawerInline';\nimport { renderDrawerInline_unstable } from './renderDrawerInline';\nimport { useDrawerInlineStyles_unstable } from './useDrawerInlineStyles.styles';\nimport type { DrawerInlineProps } from './DrawerInline.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * DrawerInline is often used for navigation that is not dissmissable. As it is on the same level as\n * the main surface, users can still interact with other UI elements.\n */\nexport const DrawerInline: ForwardRefComponent<DrawerInlineProps> = React.forwardRef((props, ref) => {\n const state = useDrawerInline_unstable(props, ref);\n\n useDrawerInlineStyles_unstable(state);\n return renderDrawerInline_unstable(state);\n});\n\nDrawerInline.displayName = 'DrawerInline';\n"],"names":["React","useDrawerInline_unstable","renderDrawerInline_unstable","useDrawerInlineStyles_unstable","DrawerInline","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,8BAA8B,QAAQ,iCAAiC;AAIhF;;;CAGC,GACD,OAAO,MAAMC,6BAAuDJ,MAAMK,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACnG,MAAMC,QAAQP,yBAAyBK,OAAOC;IAE9CJ,+BAA+BK;IAC/B,OAAON,4BAA4BM;AACrC,GAAG;AAEHJ,aAAaK,WAAW,GAAG"}
1
+ {"version":3,"sources":["DrawerInline.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\nimport type { DrawerInlineProps } from './DrawerInline.types';\nimport { useDrawerInline_unstable } from './useDrawerInline';\nimport { renderDrawerInline_unstable } from './renderDrawerInline';\nimport { useDrawerInlineStyles_unstable } from './useDrawerInlineStyles.styles';\n\n/**\n * DrawerInline is often used for navigation that is not dismissible. As it is on the same level as\n * the main surface, users can still interact with other UI elements.\n */\nexport const DrawerInline: ForwardRefComponent<DrawerInlineProps> = React.forwardRef((props, ref) => {\n const state = useDrawerInline_unstable(props, ref);\n\n useDrawerInlineStyles_unstable(state);\n useCustomStyleHook_unstable('useDrawerInlineStyles_unstable')(state);\n\n return renderDrawerInline_unstable(state);\n});\n\nDrawerInline.displayName = 'DrawerInline';\n"],"names":["React","useCustomStyleHook_unstable","useDrawerInline_unstable","renderDrawerInline_unstable","useDrawerInlineStyles_unstable","DrawerInline","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,kCAAkC;AAG9E,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,8BAA8B,QAAQ,iCAAiC;AAEhF;;;CAGC,GACD,OAAO,MAAMC,6BAAuDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC3F,MAAMC,QAAQP,yBAAyBK,OAAOC;IAE9CJ,+BAA+BK;IAC/BR,4BAA4B,kCAAkCQ;IAE9D,OAAON,4BAA4BM;AACrC,GAAG;AAEHJ,aAAaK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["DrawerInline.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { DrawerBaseProps } from '../../util/DrawerBase.types';\n\nexport type DrawerInlineSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * DrawerInline Props\n */\nexport type DrawerInlineProps = ComponentProps<DrawerInlineSlots> &\n DrawerBaseProps & {\n /**\n * Whether the drawer has a separator line.\n *\n * @default false\n */\n separator?: boolean;\n };\n\n/**\n * State used in rendering DrawerInline\n */\nexport type DrawerInlineState = ComponentState<DrawerInlineSlots> & DrawerInlineProps;\n"],"names":[],"mappings":"AAAA,WAuBsF"}
1
+ {"version":3,"sources":["DrawerInline.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nimport { DrawerBaseProps, DrawerBaseState } from '../../shared/DrawerBase.types';\n\nexport type DrawerInlineSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * DrawerInline Props\n */\nexport type DrawerInlineProps = ComponentProps<DrawerInlineSlots> &\n DrawerBaseProps & {\n /**\n * Whether the drawer has a separator line.\n *\n * @default false\n */\n separator?: boolean;\n };\n\n/**\n * State used in rendering DrawerInline\n */\nexport type DrawerInlineState = Required<\n ComponentState<DrawerInlineSlots> & DrawerBaseState & Pick<DrawerInlineProps, 'separator'>\n>;\n"],"names":[],"mappings":"AAAA,WA0BE"}
@@ -1,11 +1,11 @@
1
- import * as React from 'react';
2
- import { getSlots } from '@fluentui/react-utilities';
1
+ import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { assertSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Render the final JSX of DrawerInline
5
5
  */ export const renderDrawerInline_unstable = (state)=>{
6
- const { slots , slotProps } = getSlots(state);
7
- if (!state.open) {
6
+ if (!state.motion.canRender) {
8
7
  return null;
9
8
  }
10
- return /*#__PURE__*/ React.createElement(slots.root, slotProps.root);
9
+ assertSlots(state);
10
+ return /*#__PURE__*/ _jsx(state.root, {});
11
11
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderDrawerInline.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { DrawerInlineState, DrawerInlineSlots } from './DrawerInline.types';\n\n/**\n * Render the final JSX of DrawerInline\n */\nexport const renderDrawerInline_unstable = (state: DrawerInlineState) => {\n const { slots, slotProps } = getSlots<DrawerInlineSlots>(state);\n\n if (!state.open) {\n return null;\n }\n\n return <slots.root {...slotProps.root} />;\n};\n"],"names":["React","getSlots","renderDrawerInline_unstable","state","slots","slotProps","open","root"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,QAAQ,QAAQ,4BAA4B;AAGrD;;CAEC,GACD,OAAO,MAAMC,8BAA8B,CAACC,QAA6B;IACvE,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGJ,SAA4BE;IAEzD,IAAI,CAACA,MAAMG,IAAI,EAAE;QACf,OAAO,IAAI;IACb,CAAC;IAED,qBAAO,oBAACF,MAAMG,IAAI,EAAKF,UAAUE,IAAI;AACvC,EAAE"}
1
+ {"version":3,"sources":["renderDrawerInline.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\n\nimport type { DrawerInlineState, DrawerInlineSlots } from './DrawerInline.types';\n\n/**\n * Render the final JSX of DrawerInline\n */\nexport const renderDrawerInline_unstable = (state: DrawerInlineState) => {\n if (!state.motion.canRender) {\n return null;\n }\n\n assertSlots<DrawerInlineSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderDrawerInline_unstable","state","motion","canRender","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,8BAA8B,CAACC;IAC1C,IAAI,CAACA,MAAMC,MAAM,CAACC,SAAS,EAAE;QAC3B,OAAO;IACT;IAEAJ,YAA+BE;IAE/B,qBAAO,KAACA,MAAMG,IAAI;AACpB,EAAE"}
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
- import { getNativeElementProps, useControllableState } from '@fluentui/react-utilities';
3
- import { getDefaultDrawerProps } from '../../util/getDefaultDrawerProps';
2
+ import { getNativeElementProps, slot, useMergedRefs } from '@fluentui/react-utilities';
3
+ import { useMotion } from '@fluentui/react-motion-preview';
4
+ import { useDrawerDefaultProps } from '../../shared/useDrawerDefaultProps';
4
5
  /**
5
6
  * Create the state required to render DrawerInline.
6
7
  *
@@ -10,24 +11,22 @@ import { getDefaultDrawerProps } from '../../util/getDefaultDrawerProps';
10
11
  * @param props - props from this instance of DrawerInline
11
12
  * @param ref - reference to root HTMLElement of DrawerInline
12
13
  */ export const useDrawerInline_unstable = (props, ref)=>{
13
- const { open: initialOpen , defaultOpen , size , position } = getDefaultDrawerProps(props);
14
- const { separator =false } = props;
15
- const [open] = useControllableState({
16
- state: initialOpen,
17
- defaultState: defaultOpen,
18
- initialState: false
19
- });
14
+ const { size, position, open } = useDrawerDefaultProps(props);
15
+ const { separator = false } = props;
16
+ const motion = useMotion(open);
20
17
  return {
21
18
  components: {
22
19
  root: 'div'
23
20
  },
24
- root: getNativeElementProps('div', {
25
- ref,
26
- ...props
21
+ root: slot.always(getNativeElementProps('div', {
22
+ ...props,
23
+ ref: useMergedRefs(ref, motion.ref)
24
+ }), {
25
+ elementType: 'div'
27
26
  }),
28
27
  size,
29
28
  position,
30
- open,
31
- separator
29
+ separator,
30
+ motion
32
31
  };
33
32
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["useDrawerInline.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useControllableState } from '@fluentui/react-utilities';\nimport type { DrawerInlineProps, DrawerInlineState } from './DrawerInline.types';\nimport { getDefaultDrawerProps } from '../../util/getDefaultDrawerProps';\n\n/**\n * Create the state required to render DrawerInline.\n *\n * The returned state can be modified with hooks such as useDrawerInlineStyles_unstable,\n * before being passed to renderDrawerInline_unstable.\n *\n * @param props - props from this instance of DrawerInline\n * @param ref - reference to root HTMLElement of DrawerInline\n */\nexport const useDrawerInline_unstable = (props: DrawerInlineProps, ref: React.Ref<HTMLElement>): DrawerInlineState => {\n const { open: initialOpen, defaultOpen, size, position } = getDefaultDrawerProps(props);\n const { separator = false } = props;\n\n const [open] = useControllableState({\n state: initialOpen,\n defaultState: defaultOpen,\n initialState: false,\n });\n\n return {\n components: {\n root: 'div',\n },\n\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n\n size,\n position,\n open,\n separator,\n };\n};\n"],"names":["React","getNativeElementProps","useControllableState","getDefaultDrawerProps","useDrawerInline_unstable","props","ref","open","initialOpen","defaultOpen","size","position","separator","state","defaultState","initialState","components","root"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,oBAAoB,QAAQ,4BAA4B;AAExF,SAASC,qBAAqB,QAAQ,mCAAmC;AAEzE;;;;;;;;CAQC,GACD,OAAO,MAAMC,2BAA2B,CAACC,OAA0BC,MAAmD;IACpH,MAAM,EAAEC,MAAMC,YAAW,EAAEC,YAAW,EAAEC,KAAI,EAAEC,SAAQ,EAAE,GAAGR,sBAAsBE;IACjF,MAAM,EAAEO,WAAY,KAAK,CAAA,EAAE,GAAGP;IAE9B,MAAM,CAACE,KAAK,GAAGL,qBAAqB;QAClCW,OAAOL;QACPM,cAAcL;QACdM,cAAc,KAAK;IACrB;IAEA,OAAO;QACLC,YAAY;YACVC,MAAM;QACR;QAEAA,MAAMhB,sBAAsB,OAAO;YACjCK;YACA,GAAGD,KAAK;QACV;QAEAK;QACAC;QACAJ;QACAK;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["useDrawerInline.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, slot, useMergedRefs } from '@fluentui/react-utilities';\nimport { useMotion } from '@fluentui/react-motion-preview';\n\nimport type { DrawerInlineProps, DrawerInlineState } from './DrawerInline.types';\nimport { useDrawerDefaultProps } from '../../shared/useDrawerDefaultProps';\n\n/**\n * Create the state required to render DrawerInline.\n *\n * The returned state can be modified with hooks such as useDrawerInlineStyles_unstable,\n * before being passed to renderDrawerInline_unstable.\n *\n * @param props - props from this instance of DrawerInline\n * @param ref - reference to root HTMLElement of DrawerInline\n */\nexport const useDrawerInline_unstable = (\n props: DrawerInlineProps,\n ref: React.Ref<HTMLDivElement>,\n): DrawerInlineState => {\n const { size, position, open } = useDrawerDefaultProps(props);\n const { separator = false } = props;\n\n const motion = useMotion<HTMLDivElement>(open);\n\n return {\n components: {\n root: 'div',\n },\n\n root: slot.always(\n getNativeElementProps('div', {\n ...props,\n ref: useMergedRefs(ref, motion.ref),\n }),\n { elementType: 'div' },\n ),\n\n size,\n position,\n separator,\n motion,\n };\n};\n"],"names":["React","getNativeElementProps","slot","useMergedRefs","useMotion","useDrawerDefaultProps","useDrawerInline_unstable","props","ref","size","position","open","separator","motion","components","root","always","elementType"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,IAAI,EAAEC,aAAa,QAAQ,4BAA4B;AACvF,SAASC,SAAS,QAAQ,iCAAiC;AAG3D,SAASC,qBAAqB,QAAQ,qCAAqC;AAE3E;;;;;;;;CAQC,GACD,OAAO,MAAMC,2BAA2B,CACtCC,OACAC;IAEA,MAAM,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,IAAI,EAAE,GAAGN,sBAAsBE;IACvD,MAAM,EAAEK,YAAY,KAAK,EAAE,GAAGL;IAE9B,MAAMM,SAAST,UAA0BO;IAEzC,OAAO;QACLG,YAAY;YACVC,MAAM;QACR;QAEAA,MAAMb,KAAKc,MAAM,CACff,sBAAsB,OAAO;YAC3B,GAAGM,KAAK;YACRC,KAAKL,cAAcK,KAAKK,OAAOL,GAAG;QACpC,IACA;YAAES,aAAa;QAAM;QAGvBR;QACAC;QACAE;QACAC;IACF;AACF,EAAE"}
@@ -1,43 +1,53 @@
1
1
  import * as React from 'react';
2
- import { __styles, mergeClasses, shorthands } from '@griffel/react';
3
- import { useDrawerBaseStyles } from '../../util/useDrawerBaseStyles.styles';
2
+ import { __resetStyles, __styles, mergeClasses, shorthands } from '@griffel/react';
4
3
  import { tokens } from '@fluentui/react-theme';
4
+ import { drawerCSSVars, drawerDefaultStyles, useDrawerBaseClassNames } from '../../shared/useDrawerBaseStyles.styles';
5
5
  export const drawerInlineClassNames = {
6
6
  root: 'fui-DrawerInline'
7
7
  };
8
+ const useDrawerResetStyles = /*#__PURE__*/__resetStyles("r1aiwccr", "rzg5lxf", [".r1aiwccr{padding-top:0;padding-right:0;padding-bottom:0;padding-left:0;overflow-x:hidden;overflow-y:hidden;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:0;border-top-left-radius:0;border-top-width:0;border-right-width:0;border-bottom-width:0;border-left-width:0;width:var(--fui-Drawer--size);max-width:100vw;height:auto;box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;background-color:var(--colorNeutralBackground1);position:relative;opacity:0;transition-property:opacity,transform;will-change:opacity,transform;}", ".rzg5lxf{padding-top:0;padding-left:0;padding-bottom:0;padding-right:0;overflow-x:hidden;overflow-y:hidden;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:0;border-top-right-radius:0;border-top-width:0;border-left-width:0;border-bottom-width:0;border-right-width:0;width:var(--fui-Drawer--size);max-width:100vw;height:auto;box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;background-color:var(--colorNeutralBackground1);position:relative;opacity:0;transition-property:opacity,transform;will-change:opacity,transform;}"]);
8
9
  /**
9
10
  * Styles for the root slot
10
11
  */
11
- const useStyles = /*#__PURE__*/__styles({
12
- root: {
13
- qhf8xq: "f10pi13n"
14
- },
15
- separatorLeft: {
12
+ const separatorValues = ['1px', 'solid', tokens.colorNeutralBackground3];
13
+ const useDrawerRootStyles = /*#__PURE__*/__styles({
14
+ separatorStart: {
16
15
  Bekrc4i: ["f1hqa2wf", "finvdd3"],
17
16
  vrafjx: ["fcdblym", "fjik90z"],
18
17
  h3c5rm: ["fa8zu9y", "f17e9lqh"]
19
18
  },
20
- separatorRight: {
19
+ separatorEnd: {
21
20
  ibv6hh: ["finvdd3", "f1hqa2wf"],
22
21
  wvpqe5: ["fjik90z", "fcdblym"],
23
22
  zhjwy3: ["f17e9lqh", "fa8zu9y"]
23
+ },
24
+ start: {
25
+ Bz10aip: "f1d8gkik"
26
+ },
27
+ end: {
28
+ Bz10aip: "f1h1g6jt"
29
+ },
30
+ visible: {
31
+ abs64n: "f5p0z4x",
32
+ Bz10aip: "f87uvqx"
24
33
  }
25
34
  }, {
26
- d: [".f10pi13n{position:relative;}", ".f1hqa2wf{border-right-width:1px;}", ".finvdd3{border-left-width:1px;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fa8zu9y{border-right-color:var(--colorNeutralBackground3);}", ".f17e9lqh{border-left-color:var(--colorNeutralBackground3);}"]
35
+ d: [".f1hqa2wf{border-right-width:1px;}", ".finvdd3{border-left-width:1px;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fa8zu9y{border-right-color:var(--colorNeutralBackground3);}", ".f17e9lqh{border-left-color:var(--colorNeutralBackground3);}", ".f1d8gkik{transform:translate3D(calc(var(--fui-Drawer--size) * -1), 0, 0);}", ".f1h1g6jt{transform:translate3D(var(--fui-Drawer--size), 0, 0);}", ".f5p0z4x{opacity:1;}", ".f87uvqx{transform:translate3D(0, 0, 0);}"]
27
36
  });
28
37
  /**
29
38
  * Apply styling to the DrawerInline slots based on the state
30
39
  */
31
40
  export const useDrawerInlineStyles_unstable = state => {
32
- const baseStyles = useDrawerBaseStyles();
33
- const styles = useStyles();
41
+ const resetStyles = useDrawerResetStyles();
42
+ const baseClassNames = useDrawerBaseClassNames(state);
43
+ const rootStyles = useDrawerRootStyles();
34
44
  const separatorClass = React.useMemo(() => {
35
45
  if (!state.separator) {
36
46
  return undefined;
37
47
  }
38
- return state.position === 'left' ? styles.separatorLeft : styles.separatorRight;
39
- }, [state.position, state.separator, styles.separatorRight, styles.separatorLeft]);
40
- state.root.className = mergeClasses(drawerInlineClassNames.root, baseStyles.root, styles.root, state.size && baseStyles[state.size], state.position && baseStyles[state.position], separatorClass, state.root.className);
48
+ return state.position === 'start' ? rootStyles.separatorStart : rootStyles.separatorEnd;
49
+ }, [state.position, state.separator, rootStyles.separatorEnd, rootStyles.separatorStart]);
50
+ state.root.className = mergeClasses(drawerInlineClassNames.root, resetStyles, baseClassNames, separatorClass, rootStyles[state.position], state.motion.active && rootStyles.visible, state.root.className);
41
51
  return state;
42
52
  };
43
53
  //# sourceMappingURL=useDrawerInlineStyles.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","__styles","mergeClasses","shorthands","useDrawerBaseStyles","tokens","drawerInlineClassNames","root","useStyles","qhf8xq","separatorLeft","Bekrc4i","vrafjx","h3c5rm","separatorRight","ibv6hh","wvpqe5","zhjwy3","d","useDrawerInlineStyles_unstable","state","baseStyles","styles","separatorClass","useMemo","separator","undefined","position","className","size"],"sources":["useDrawerInlineStyles.styles.js"],"sourcesContent":["import * as React from 'react';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { useDrawerBaseStyles } from '../../util/useDrawerBaseStyles.styles';\nimport { tokens } from '@fluentui/react-theme';\nexport const drawerInlineClassNames = {\n root: 'fui-DrawerInline'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n position: 'relative'\n },\n /* Separator */ separatorLeft: {\n ...shorthands.borderRight('1px', 'solid', tokens.colorNeutralBackground3)\n },\n separatorRight: {\n ...shorthands.borderLeft('1px', 'solid', tokens.colorNeutralBackground3)\n }\n});\n/**\n * Apply styling to the DrawerInline slots based on the state\n */ export const useDrawerInlineStyles_unstable = (state)=>{\n const baseStyles = useDrawerBaseStyles();\n const styles = useStyles();\n const separatorClass = React.useMemo(()=>{\n if (!state.separator) {\n return undefined;\n }\n return state.position === 'left' ? styles.separatorLeft : styles.separatorRight;\n }, [\n state.position,\n state.separator,\n styles.separatorRight,\n styles.separatorLeft\n ]);\n state.root.className = mergeClasses(drawerInlineClassNames.root, baseStyles.root, styles.root, state.size && baseStyles[state.size], state.position && baseStyles[state.position], separatorClass, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAAAC,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,mBAAmB,QAAQ,uCAAuC;AAC3E,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,OAAO,MAAMC,sBAAsB,GAAG;EAClCC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGP,QAAA;EAAAM,IAAA;IAAAE,MAAA;EAAA;EAAAC,aAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,cAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,CAUrB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,8BAA8B,GAAIC,KAAK,IAAG;EACvD,MAAMC,UAAU,GAAGjB,mBAAmB,CAAC,CAAC;EACxC,MAAMkB,MAAM,GAAGd,SAAS,CAAC,CAAC;EAC1B,MAAMe,cAAc,GAAGvB,KAAK,CAACwB,OAAO,CAAC,MAAI;IACrC,IAAI,CAACJ,KAAK,CAACK,SAAS,EAAE;MAClB,OAAOC,SAAS;IACpB;IACA,OAAON,KAAK,CAACO,QAAQ,KAAK,MAAM,GAAGL,MAAM,CAACZ,aAAa,GAAGY,MAAM,CAACR,cAAc;EACnF,CAAC,EAAE,CACCM,KAAK,CAACO,QAAQ,EACdP,KAAK,CAACK,SAAS,EACfH,MAAM,CAACR,cAAc,EACrBQ,MAAM,CAACZ,aAAa,CACvB,CAAC;EACFU,KAAK,CAACb,IAAI,CAACqB,SAAS,GAAG1B,YAAY,CAACI,sBAAsB,CAACC,IAAI,EAAEc,UAAU,CAACd,IAAI,EAAEe,MAAM,CAACf,IAAI,EAAEa,KAAK,CAACS,IAAI,IAAIR,UAAU,CAACD,KAAK,CAACS,IAAI,CAAC,EAAET,KAAK,CAACO,QAAQ,IAAIN,UAAU,CAACD,KAAK,CAACO,QAAQ,CAAC,EAAEJ,cAAc,EAAEH,KAAK,CAACb,IAAI,CAACqB,SAAS,CAAC;EACxN,OAAOR,KAAK;AAChB,CAAC"}
1
+ {"version":3,"names":["React","__resetStyles","__styles","mergeClasses","shorthands","tokens","drawerCSSVars","drawerDefaultStyles","useDrawerBaseClassNames","drawerInlineClassNames","root","useDrawerResetStyles","separatorValues","colorNeutralBackground3","useDrawerRootStyles","separatorStart","Bekrc4i","vrafjx","h3c5rm","separatorEnd","ibv6hh","wvpqe5","zhjwy3","start","Bz10aip","end","visible","abs64n","d","useDrawerInlineStyles_unstable","state","resetStyles","baseClassNames","rootStyles","separatorClass","useMemo","separator","undefined","position","className","motion","active"],"sources":["useDrawerInlineStyles.styles.js"],"sourcesContent":["import * as React from 'react';\nimport { makeResetStyles, makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { drawerCSSVars, drawerDefaultStyles, useDrawerBaseClassNames } from '../../shared/useDrawerBaseStyles.styles';\nexport const drawerInlineClassNames = {\n root: 'fui-DrawerInline'\n};\nconst useDrawerResetStyles = makeResetStyles({\n ...drawerDefaultStyles,\n position: 'relative',\n opacity: 0,\n transitionProperty: 'opacity, transform',\n willChange: 'opacity, transform'\n});\n/**\n * Styles for the root slot\n */ const separatorValues = [\n '1px',\n 'solid',\n tokens.colorNeutralBackground3\n];\nconst useDrawerRootStyles = makeStyles({\n /* Separator */ separatorStart: {\n ...shorthands.borderRight(...separatorValues)\n },\n separatorEnd: {\n ...shorthands.borderLeft(...separatorValues)\n },\n /* Positioning */ start: {\n transform: `translate3D(calc(var(${drawerCSSVars.drawerSizeVar}) * -1), 0, 0)`\n },\n end: {\n transform: `translate3D(var(${drawerCSSVars.drawerSizeVar}), 0, 0)`\n },\n /* Visible */ visible: {\n opacity: 1,\n transform: `translate3D(0, 0, 0)`\n }\n});\n/**\n * Apply styling to the DrawerInline slots based on the state\n */ export const useDrawerInlineStyles_unstable = (state)=>{\n const resetStyles = useDrawerResetStyles();\n const baseClassNames = useDrawerBaseClassNames(state);\n const rootStyles = useDrawerRootStyles();\n const separatorClass = React.useMemo(()=>{\n if (!state.separator) {\n return undefined;\n }\n return state.position === 'start' ? rootStyles.separatorStart : rootStyles.separatorEnd;\n }, [\n state.position,\n state.separator,\n rootStyles.separatorEnd,\n rootStyles.separatorStart\n ]);\n state.root.className = mergeClasses(drawerInlineClassNames.root, resetStyles, baseClassNames, separatorClass, rootStyles[state.position], state.motion.active && rootStyles.visible, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAAAC,aAAA,EAAAC,QAAA,EAAsCC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACtF,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,aAAa,EAAEC,mBAAmB,EAAEC,uBAAuB,QAAQ,yCAAyC;AACrH,OAAO,MAAMC,sBAAsB,GAAG;EAClCC,IAAI,EAAE;AACV,CAAC;AACD,MAAMC,oBAAoB,gBAAGV,aAAA,+tCAM5B,CAAC;AACF;AACA;AACA;AAAI,MAAMW,eAAe,GAAG,CACxB,KAAK,EACL,OAAO,EACPP,MAAM,CAACQ,uBAAuB,CACjC;AACD,MAAMC,mBAAmB,gBAAGZ,QAAA;EAAAa,cAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,YAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,KAAA;IAAAC,OAAA;EAAA;EAAAC,GAAA;IAAAD,OAAA;EAAA;EAAAE,OAAA;IAAAC,MAAA;IAAAH,OAAA;EAAA;AAAA;EAAAI,CAAA;AAAA,CAiB3B,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,8BAA8B,GAAIC,KAAK,IAAG;EACvD,MAAMC,WAAW,GAAGpB,oBAAoB,CAAC,CAAC;EAC1C,MAAMqB,cAAc,GAAGxB,uBAAuB,CAACsB,KAAK,CAAC;EACrD,MAAMG,UAAU,GAAGnB,mBAAmB,CAAC,CAAC;EACxC,MAAMoB,cAAc,GAAGlC,KAAK,CAACmC,OAAO,CAAC,MAAI;IACrC,IAAI,CAACL,KAAK,CAACM,SAAS,EAAE;MAClB,OAAOC,SAAS;IACpB;IACA,OAAOP,KAAK,CAACQ,QAAQ,KAAK,OAAO,GAAGL,UAAU,CAAClB,cAAc,GAAGkB,UAAU,CAACd,YAAY;EAC3F,CAAC,EAAE,CACCW,KAAK,CAACQ,QAAQ,EACdR,KAAK,CAACM,SAAS,EACfH,UAAU,CAACd,YAAY,EACvBc,UAAU,CAAClB,cAAc,CAC5B,CAAC;EACFe,KAAK,CAACpB,IAAI,CAAC6B,SAAS,GAAGpC,YAAY,CAACM,sBAAsB,CAACC,IAAI,EAAEqB,WAAW,EAAEC,cAAc,EAAEE,cAAc,EAAED,UAAU,CAACH,KAAK,CAACQ,QAAQ,CAAC,EAAER,KAAK,CAACU,MAAM,CAACC,MAAM,IAAIR,UAAU,CAACP,OAAO,EAAEI,KAAK,CAACpB,IAAI,CAAC6B,SAAS,CAAC;EAC1M,OAAOT,KAAK;AAChB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
2
3
  import { useDrawerOverlay_unstable } from './useDrawerOverlay';
3
4
  import { renderDrawerOverlay_unstable } from './renderDrawerOverlay';
4
5
  import { useDrawerOverlayStyles_unstable } from './useDrawerOverlayStyles.styles';
@@ -7,6 +8,7 @@ import { useDrawerOverlayStyles_unstable } from './useDrawerOverlayStyles.styles
7
8
  */ export const DrawerOverlay = /*#__PURE__*/ React.forwardRef((props, ref)=>{
8
9
  const state = useDrawerOverlay_unstable(props, ref);
9
10
  useDrawerOverlayStyles_unstable(state);
11
+ useCustomStyleHook_unstable('useDrawerOverlayStyles_unstable')(state);
10
12
  return renderDrawerOverlay_unstable(state);
11
13
  });
12
14
  DrawerOverlay.displayName = 'DrawerOverlay';
@@ -1 +1 @@
1
- {"version":3,"sources":["DrawerOverlay.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDrawerOverlay_unstable } from './useDrawerOverlay';\nimport { renderDrawerOverlay_unstable } from './renderDrawerOverlay';\nimport { useDrawerOverlayStyles_unstable } from './useDrawerOverlayStyles.styles';\nimport type { DrawerOverlayProps } from './DrawerOverlay.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * DrawerOverlay contains supplementary content and are used for complex creation, edit, or management experiences.\n */\nexport const DrawerOverlay: ForwardRefComponent<DrawerOverlayProps> = React.forwardRef((props, ref) => {\n const state = useDrawerOverlay_unstable(props, ref);\n\n useDrawerOverlayStyles_unstable(state);\n\n return renderDrawerOverlay_unstable(state);\n});\n\nDrawerOverlay.displayName = 'DrawerOverlay';\n"],"names":["React","useDrawerOverlay_unstable","renderDrawerOverlay_unstable","useDrawerOverlayStyles_unstable","DrawerOverlay","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,wBAAwB;AACrE,SAASC,+BAA+B,QAAQ,kCAAkC;AAIlF;;CAEC,GACD,OAAO,MAAMC,8BAAyDJ,MAAMK,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACrG,MAAMC,QAAQP,0BAA0BK,OAAOC;IAE/CJ,gCAAgCK;IAEhC,OAAON,6BAA6BM;AACtC,GAAG;AAEHJ,cAAcK,WAAW,GAAG"}
1
+ {"version":3,"sources":["DrawerOverlay.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\nimport { useDrawerOverlay_unstable } from './useDrawerOverlay';\nimport { renderDrawerOverlay_unstable } from './renderDrawerOverlay';\nimport { useDrawerOverlayStyles_unstable } from './useDrawerOverlayStyles.styles';\nimport type { DrawerOverlayProps } from './DrawerOverlay.types';\n\n/**\n * DrawerOverlay contains supplementary content and are used for complex creation, edit, or management experiences.\n */\nexport const DrawerOverlay: ForwardRefComponent<DrawerOverlayProps> = React.forwardRef((props, ref) => {\n const state = useDrawerOverlay_unstable(props, ref);\n\n useDrawerOverlayStyles_unstable(state);\n useCustomStyleHook_unstable('useDrawerOverlayStyles_unstable')(state);\n\n return renderDrawerOverlay_unstable(state);\n});\n\nDrawerOverlay.displayName = 'DrawerOverlay';\n"],"names":["React","useCustomStyleHook_unstable","useDrawerOverlay_unstable","renderDrawerOverlay_unstable","useDrawerOverlayStyles_unstable","DrawerOverlay","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,wBAAwB;AACrE,SAASC,+BAA+B,QAAQ,kCAAkC;AAGlF;;CAEC,GACD,OAAO,MAAMC,8BAAyDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQP,0BAA0BK,OAAOC;IAE/CJ,gCAAgCK;IAChCR,4BAA4B,mCAAmCQ;IAE/D,OAAON,6BAA6BM;AACtC,GAAG;AAEHJ,cAAcK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["DrawerOverlay.types.ts"],"sourcesContent":["import { DialogProps, DialogSurfaceProps, DialogSurfaceSlots } from '@fluentui/react-dialog';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { DrawerBaseProps } from '../../util/DrawerBase.types';\n\nexport type DrawerOverlaySlots = DialogSurfaceSlots & {\n root: Slot<DialogSurfaceProps>;\n};\n\n/**\n * DrawerOverlay Props\n */\nexport type DrawerOverlayProps = ComponentProps<DrawerOverlaySlots> &\n DrawerBaseProps &\n Pick<DialogProps, 'modalType' | 'onOpenChange' | 'inertTrapFocus'>;\n\n/**\n * State used in rendering DrawerOverlay\n */\nexport type DrawerOverlayState = ComponentState<DrawerOverlaySlots> &\n DrawerBaseProps & {\n dialog: DialogProps;\n };\n"],"names":[],"mappings":"AAAA,WAqBI"}
1
+ {"version":3,"sources":["DrawerOverlay.types.ts"],"sourcesContent":["import { DialogProps, DialogSurfaceProps, DialogSurfaceSlots } from '@fluentui/react-dialog';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { MotionState } from '@fluentui/react-motion-preview';\n\nimport type { DrawerBaseProps, DrawerBaseState } from '../../shared/DrawerBase.types';\n\nexport type DrawerOverlaySlots = DialogSurfaceSlots & {\n root: Slot<DialogSurfaceProps>;\n\n /**\n * Slot for the dialog component that wraps the drawer.\n */\n dialog?: Slot<DialogProps>;\n};\n\n/**\n * DrawerOverlay Props\n */\nexport type DrawerOverlayProps = ComponentProps<DrawerOverlaySlots> &\n Pick<DialogProps, 'modalType' | 'onOpenChange' | 'inertTrapFocus' | 'defaultOpen'> &\n DrawerBaseProps;\n\n/**\n * State used in rendering DrawerOverlay\n */\nexport type DrawerOverlayState = Omit<ComponentState<DrawerOverlaySlots>, 'backdrop'> &\n Required<\n DrawerBaseState & {\n backdropMotion: MotionState<HTMLDivElement>;\n }\n >;\n"],"names":[],"mappings":"AAAA,WA8BI"}
@@ -1,9 +1,13 @@
1
- import * as React from 'react';
2
- import { getSlots } from '@fluentui/react-utilities';
3
- import { Dialog } from '@fluentui/react-dialog';
1
+ import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { assertSlots } from '@fluentui/react-utilities';
4
3
  /**
5
4
  * Render the final JSX of DrawerOverlay
6
5
  */ export const renderDrawerOverlay_unstable = (state)=>{
7
- const { slots , slotProps } = getSlots(state);
8
- return /*#__PURE__*/ React.createElement(Dialog, state.dialog, /*#__PURE__*/ React.createElement(slots.root, slotProps.root));
6
+ if (!state.dialog || !state.motion.canRender) {
7
+ return null;
8
+ }
9
+ assertSlots(state);
10
+ return /*#__PURE__*/ _jsx(state.dialog, {
11
+ children: /*#__PURE__*/ _jsx(state.root, {})
12
+ });
9
13
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderDrawerOverlay.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { DrawerOverlayState, DrawerOverlaySlots } from './DrawerOverlay.types';\nimport { Dialog } from '@fluentui/react-dialog';\n\n/**\n * Render the final JSX of DrawerOverlay\n */\nexport const renderDrawerOverlay_unstable = (state: DrawerOverlayState) => {\n const { slots, slotProps } = getSlots<DrawerOverlaySlots>(state);\n\n return (\n <Dialog {...state.dialog}>\n <slots.root {...slotProps.root} />\n </Dialog>\n );\n};\n"],"names":["React","getSlots","Dialog","renderDrawerOverlay_unstable","state","slots","slotProps","dialog","root"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,QAAQ,QAAQ,4BAA4B;AAErD,SAASC,MAAM,QAAQ,yBAAyB;AAEhD;;CAEC,GACD,OAAO,MAAMC,+BAA+B,CAACC,QAA8B;IACzE,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGL,SAA6BG;IAE1D,qBACE,oBAACF,QAAWE,MAAMG,MAAM,gBACtB,oBAACF,MAAMG,IAAI,EAAKF,UAAUE,IAAI;AAGpC,EAAE"}
1
+ {"version":3,"sources":["renderDrawerOverlay.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\n\nimport type { DrawerOverlayState, DrawerOverlaySlots } from './DrawerOverlay.types';\n\n/**\n * Render the final JSX of DrawerOverlay\n */\nexport const renderDrawerOverlay_unstable = (state: DrawerOverlayState) => {\n if (!state.dialog || !state.motion.canRender) {\n return null;\n }\n\n assertSlots<DrawerOverlaySlots>(state);\n\n return (\n <state.dialog>\n <state.root />\n </state.dialog>\n );\n};\n"],"names":["assertSlots","renderDrawerOverlay_unstable","state","dialog","motion","canRender","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,+BAA+B,CAACC;IAC3C,IAAI,CAACA,MAAMC,MAAM,IAAI,CAACD,MAAME,MAAM,CAACC,SAAS,EAAE;QAC5C,OAAO;IACT;IAEAL,YAAgCE;IAEhC,qBACE,KAACA,MAAMC,MAAM;kBACX,cAAA,KAACD,MAAMI,IAAI;;AAGjB,EAAE"}
@@ -1,7 +1,8 @@
1
1
  import * as React from 'react';
2
- import { getNativeElementProps } from '@fluentui/react-utilities';
3
- import { DialogSurface } from '@fluentui/react-dialog';
4
- import { getDefaultDrawerProps } from '../../util/getDefaultDrawerProps';
2
+ import { slot, useMergedRefs } from '@fluentui/react-utilities';
3
+ import { Dialog, DialogSurface } from '@fluentui/react-dialog';
4
+ import { useMotion } from '@fluentui/react-motion-preview';
5
+ import { useDrawerDefaultProps } from '../../shared/useDrawerDefaultProps';
5
6
  /**
6
7
  * Create the state required to render DrawerOverlay.
7
8
  *
@@ -9,27 +10,50 @@ import { getDefaultDrawerProps } from '../../util/getDefaultDrawerProps';
9
10
  * before being passed to renderDrawerOverlay_unstable.
10
11
  *
11
12
  * @param props - props from this instance of DrawerOverlay
12
- * @param ref - reference to root HTMLElement of DrawerOverlay
13
+ * @param ref - reference to root HTMLDivElement of DrawerOverlay
13
14
  */ export const useDrawerOverlay_unstable = (props, ref)=>{
14
- const { open , defaultOpen , size , position } = getDefaultDrawerProps(props);
15
- const { modalType ='modal' , inertTrapFocus , onOpenChange } = props;
16
- return {
17
- components: {
18
- root: DialogSurface,
19
- backdrop: 'div'
20
- },
21
- root: getNativeElementProps('div', {
22
- ref,
23
- ...props
24
- }),
25
- dialog: {
26
- open,
15
+ const { open, size, position } = useDrawerDefaultProps(props);
16
+ const { modalType = 'modal', inertTrapFocus, defaultOpen = false, onOpenChange } = props;
17
+ const drawerMotion = useMotion(open);
18
+ const backdropMotion = useMotion(open);
19
+ const hasCustomBackdrop = modalType !== 'non-modal' && props.backdrop !== null;
20
+ const root = slot.always({
21
+ ...props,
22
+ ref: useMergedRefs(ref, drawerMotion.ref)
23
+ }, {
24
+ elementType: DialogSurface,
25
+ defaultProps: {
26
+ backdrop: slot.optional(props.backdrop, {
27
+ elementType: 'div',
28
+ renderByDefault: hasCustomBackdrop,
29
+ defaultProps: {
30
+ ref: backdropMotion.ref
31
+ }
32
+ })
33
+ }
34
+ });
35
+ const dialog = slot.optional(props.dialog, {
36
+ elementType: Dialog,
37
+ renderByDefault: true,
38
+ defaultProps: {
39
+ open: true,
27
40
  defaultOpen,
28
41
  onOpenChange,
29
42
  inertTrapFocus,
30
43
  modalType
44
+ }
45
+ });
46
+ return {
47
+ components: {
48
+ root: DialogSurface,
49
+ dialog: Dialog,
50
+ backdrop: 'div'
31
51
  },
52
+ root,
53
+ dialog,
32
54
  size,
33
- position
55
+ position,
56
+ motion: drawerMotion,
57
+ backdropMotion
34
58
  };
35
59
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["useDrawerOverlay.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { DrawerOverlayProps, DrawerOverlayState } from './DrawerOverlay.types';\nimport { DialogProps, DialogSurface } from '@fluentui/react-dialog';\nimport { getDefaultDrawerProps } from '../../util/getDefaultDrawerProps';\n\n/**\n * Create the state required to render DrawerOverlay.\n *\n * The returned state can be modified with hooks such as useDrawerOverlayStyles_unstable,\n * before being passed to renderDrawerOverlay_unstable.\n *\n * @param props - props from this instance of DrawerOverlay\n * @param ref - reference to root HTMLElement of DrawerOverlay\n */\nexport const useDrawerOverlay_unstable = (\n props: DrawerOverlayProps,\n ref: React.Ref<HTMLElement>,\n): DrawerOverlayState => {\n const { open, defaultOpen, size, position } = getDefaultDrawerProps(props);\n const { modalType = 'modal', inertTrapFocus, onOpenChange } = props;\n\n return {\n components: {\n root: DialogSurface,\n backdrop: 'div',\n },\n\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n dialog: {\n open,\n defaultOpen,\n onOpenChange,\n inertTrapFocus,\n modalType,\n } as DialogProps,\n\n size,\n position,\n };\n};\n"],"names":["React","getNativeElementProps","DialogSurface","getDefaultDrawerProps","useDrawerOverlay_unstable","props","ref","open","defaultOpen","size","position","modalType","inertTrapFocus","onOpenChange","components","root","backdrop","dialog"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,4BAA4B;AAElE,SAAsBC,aAAa,QAAQ,yBAAyB;AACpE,SAASC,qBAAqB,QAAQ,mCAAmC;AAEzE;;;;;;;;CAQC,GACD,OAAO,MAAMC,4BAA4B,CACvCC,OACAC,MACuB;IACvB,MAAM,EAAEC,KAAI,EAAEC,YAAW,EAAEC,KAAI,EAAEC,SAAQ,EAAE,GAAGP,sBAAsBE;IACpE,MAAM,EAAEM,WAAY,QAAO,EAAEC,eAAc,EAAEC,aAAY,EAAE,GAAGR;IAE9D,OAAO;QACLS,YAAY;YACVC,MAAMb;YACNc,UAAU;QACZ;QAEAD,MAAMd,sBAAsB,OAAO;YACjCK;YACA,GAAGD,KAAK;QACV;QACAY,QAAQ;YACNV;YACAC;YACAK;YACAD;YACAD;QACF;QAEAF;QACAC;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["useDrawerOverlay.ts"],"sourcesContent":["import * as React from 'react';\nimport { slot, useMergedRefs } from '@fluentui/react-utilities';\nimport { Dialog, DialogSurface } from '@fluentui/react-dialog';\nimport { useMotion } from '@fluentui/react-motion-preview';\n\nimport { useDrawerDefaultProps } from '../../shared/useDrawerDefaultProps';\nimport type { DrawerOverlayProps, DrawerOverlayState } from './DrawerOverlay.types';\n\n/**\n * Create the state required to render DrawerOverlay.\n *\n * The returned state can be modified with hooks such as useDrawerOverlayStyles_unstable,\n * before being passed to renderDrawerOverlay_unstable.\n *\n * @param props - props from this instance of DrawerOverlay\n * @param ref - reference to root HTMLDivElement of DrawerOverlay\n */\nexport const useDrawerOverlay_unstable = (\n props: DrawerOverlayProps,\n ref: React.Ref<HTMLDivElement>,\n): DrawerOverlayState => {\n const { open, size, position } = useDrawerDefaultProps(props);\n const { modalType = 'modal', inertTrapFocus, defaultOpen = false, onOpenChange } = props;\n\n const drawerMotion = useMotion<HTMLDivElement>(open);\n const backdropMotion = useMotion<HTMLDivElement>(open);\n\n const hasCustomBackdrop = modalType !== 'non-modal' && props.backdrop !== null;\n\n const root = slot.always(\n {\n ...props,\n ref: useMergedRefs(ref, drawerMotion.ref),\n },\n {\n elementType: DialogSurface,\n defaultProps: {\n backdrop: slot.optional(props.backdrop, {\n elementType: 'div',\n renderByDefault: hasCustomBackdrop,\n defaultProps: {\n ref: backdropMotion.ref,\n },\n }),\n },\n },\n );\n\n const dialog = slot.optional(props.dialog, {\n elementType: Dialog,\n renderByDefault: true,\n defaultProps: {\n open: true,\n defaultOpen,\n onOpenChange,\n inertTrapFocus,\n modalType,\n },\n });\n\n return {\n components: {\n root: DialogSurface,\n dialog: Dialog,\n backdrop: 'div',\n },\n\n root,\n dialog,\n\n size,\n position,\n motion: drawerMotion,\n backdropMotion,\n };\n};\n"],"names":["React","slot","useMergedRefs","Dialog","DialogSurface","useMotion","useDrawerDefaultProps","useDrawerOverlay_unstable","props","ref","open","size","position","modalType","inertTrapFocus","defaultOpen","onOpenChange","drawerMotion","backdropMotion","hasCustomBackdrop","backdrop","root","always","elementType","defaultProps","optional","renderByDefault","dialog","components","motion"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,IAAI,EAAEC,aAAa,QAAQ,4BAA4B;AAChE,SAASC,MAAM,EAAEC,aAAa,QAAQ,yBAAyB;AAC/D,SAASC,SAAS,QAAQ,iCAAiC;AAE3D,SAASC,qBAAqB,QAAQ,qCAAqC;AAG3E;;;;;;;;CAQC,GACD,OAAO,MAAMC,4BAA4B,CACvCC,OACAC;IAEA,MAAM,EAAEC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,EAAE,GAAGN,sBAAsBE;IACvD,MAAM,EAAEK,YAAY,OAAO,EAAEC,cAAc,EAAEC,cAAc,KAAK,EAAEC,YAAY,EAAE,GAAGR;IAEnF,MAAMS,eAAeZ,UAA0BK;IAC/C,MAAMQ,iBAAiBb,UAA0BK;IAEjD,MAAMS,oBAAoBN,cAAc,eAAeL,MAAMY,QAAQ,KAAK;IAE1E,MAAMC,OAAOpB,KAAKqB,MAAM,CACtB;QACE,GAAGd,KAAK;QACRC,KAAKP,cAAcO,KAAKQ,aAAaR,GAAG;IAC1C,GACA;QACEc,aAAanB;QACboB,cAAc;YACZJ,UAAUnB,KAAKwB,QAAQ,CAACjB,MAAMY,QAAQ,EAAE;gBACtCG,aAAa;gBACbG,iBAAiBP;gBACjBK,cAAc;oBACZf,KAAKS,eAAeT,GAAG;gBACzB;YACF;QACF;IACF;IAGF,MAAMkB,SAAS1B,KAAKwB,QAAQ,CAACjB,MAAMmB,MAAM,EAAE;QACzCJ,aAAapB;QACbuB,iBAAiB;QACjBF,cAAc;YACZd,MAAM;YACNK;YACAC;YACAF;YACAD;QACF;IACF;IAEA,OAAO;QACLe,YAAY;YACVP,MAAMjB;YACNuB,QAAQxB;YACRiB,UAAU;QACZ;QAEAC;QACAM;QAEAhB;QACAC;QACAiB,QAAQZ;QACRC;IACF;AACF,EAAE"}