@fluentui/react-drawer 9.5.3 → 9.5.5

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 (151) hide show
  1. package/CHANGELOG.md +26 -2
  2. package/lib/Drawer.js.map +1 -1
  3. package/lib/DrawerBody.js.map +1 -1
  4. package/lib/DrawerFooter.js.map +1 -1
  5. package/lib/DrawerHeader.js.map +1 -1
  6. package/lib/DrawerHeaderNavigation.js.map +1 -1
  7. package/lib/DrawerHeaderTitle.js.map +1 -1
  8. package/lib/InlineDrawer.js.map +1 -1
  9. package/lib/OverlayDrawer.js.map +1 -1
  10. package/lib/components/Drawer/Drawer.js.map +1 -1
  11. package/lib/components/Drawer/Drawer.types.js +3 -1
  12. package/lib/components/Drawer/Drawer.types.js.map +1 -1
  13. package/lib/components/Drawer/index.js.map +1 -1
  14. package/lib/components/Drawer/renderDrawer.js.map +1 -1
  15. package/lib/components/Drawer/useDrawer.js.map +1 -1
  16. package/lib/components/DrawerBody/DrawerBody.js.map +1 -1
  17. package/lib/components/DrawerBody/DrawerBody.types.js +3 -1
  18. package/lib/components/DrawerBody/DrawerBody.types.js.map +1 -1
  19. package/lib/components/DrawerBody/index.js.map +1 -1
  20. package/lib/components/DrawerBody/renderDrawerBody.js.map +1 -1
  21. package/lib/components/DrawerBody/useDrawerBody.js.map +1 -1
  22. package/lib/components/DrawerFooter/DrawerFooter.js.map +1 -1
  23. package/lib/components/DrawerFooter/DrawerFooter.types.js +3 -1
  24. package/lib/components/DrawerFooter/DrawerFooter.types.js.map +1 -1
  25. package/lib/components/DrawerFooter/index.js.map +1 -1
  26. package/lib/components/DrawerFooter/renderDrawerFooter.js.map +1 -1
  27. package/lib/components/DrawerFooter/useDrawerFooter.js.map +1 -1
  28. package/lib/components/DrawerHeader/DrawerHeader.js.map +1 -1
  29. package/lib/components/DrawerHeader/DrawerHeader.types.js +3 -1
  30. package/lib/components/DrawerHeader/DrawerHeader.types.js.map +1 -1
  31. package/lib/components/DrawerHeader/index.js.map +1 -1
  32. package/lib/components/DrawerHeader/renderDrawerHeader.js.map +1 -1
  33. package/lib/components/DrawerHeader/useDrawerHeader.js.map +1 -1
  34. package/lib/components/DrawerHeaderNavigation/DrawerHeaderNavigation.js.map +1 -1
  35. package/lib/components/DrawerHeaderNavigation/DrawerHeaderNavigation.types.js +3 -1
  36. package/lib/components/DrawerHeaderNavigation/DrawerHeaderNavigation.types.js.map +1 -1
  37. package/lib/components/DrawerHeaderNavigation/index.js.map +1 -1
  38. package/lib/components/DrawerHeaderNavigation/renderDrawerHeaderNavigation.js.map +1 -1
  39. package/lib/components/DrawerHeaderNavigation/useDrawerHeaderNavigation.js.map +1 -1
  40. package/lib/components/DrawerHeaderTitle/DrawerHeaderTitle.js.map +1 -1
  41. package/lib/components/DrawerHeaderTitle/DrawerHeaderTitle.types.js +3 -1
  42. package/lib/components/DrawerHeaderTitle/DrawerHeaderTitle.types.js.map +1 -1
  43. package/lib/components/DrawerHeaderTitle/index.js.map +1 -1
  44. package/lib/components/DrawerHeaderTitle/renderDrawerHeaderTitle.js.map +1 -1
  45. package/lib/components/DrawerHeaderTitle/useDrawerHeaderTitle.js.map +1 -1
  46. package/lib/components/InlineDrawer/InlineDrawer.js.map +1 -1
  47. package/lib/components/InlineDrawer/InlineDrawer.types.js +3 -1
  48. package/lib/components/InlineDrawer/InlineDrawer.types.js.map +1 -1
  49. package/lib/components/InlineDrawer/index.js.map +1 -1
  50. package/lib/components/InlineDrawer/renderInlineDrawer.js.map +1 -1
  51. package/lib/components/InlineDrawer/useInlineDrawer.js.map +1 -1
  52. package/lib/components/OverlayDrawer/OverlayDrawer.js.map +1 -1
  53. package/lib/components/OverlayDrawer/OverlayDrawer.types.js +3 -1
  54. package/lib/components/OverlayDrawer/OverlayDrawer.types.js.map +1 -1
  55. package/lib/components/OverlayDrawer/OverlayDrawerDialog.js.map +1 -1
  56. package/lib/components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.js.map +1 -1
  57. package/lib/components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.types.js +3 -1
  58. package/lib/components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.types.js.map +1 -1
  59. package/lib/components/OverlayDrawer/OverlayDrawerSurface/index.js.map +1 -1
  60. package/lib/components/OverlayDrawer/index.js.map +1 -1
  61. package/lib/components/OverlayDrawer/renderOverlayDrawer.js.map +1 -1
  62. package/lib/components/OverlayDrawer/useOverlayDrawer.js.map +1 -1
  63. package/lib/contexts/drawerContext.js.map +1 -1
  64. package/lib/contexts/index.js.map +1 -1
  65. package/lib/e2e/DrawerShared.js.map +1 -1
  66. package/lib/index.js.map +1 -1
  67. package/lib/shared/DrawerBase.types.js.map +1 -1
  68. package/lib/shared/drawerSeparatorStyles.js.map +1 -1
  69. package/lib/shared/useDrawerDefaultProps.js.map +1 -1
  70. package/lib-commonjs/Drawer.js.map +1 -1
  71. package/lib-commonjs/DrawerBody.js.map +1 -1
  72. package/lib-commonjs/DrawerFooter.js.map +1 -1
  73. package/lib-commonjs/DrawerHeader.js.map +1 -1
  74. package/lib-commonjs/DrawerHeaderNavigation.js.map +1 -1
  75. package/lib-commonjs/DrawerHeaderTitle.js.map +1 -1
  76. package/lib-commonjs/InlineDrawer.js.map +1 -1
  77. package/lib-commonjs/OverlayDrawer.js.map +1 -1
  78. package/lib-commonjs/components/Drawer/Drawer.js.map +1 -1
  79. package/lib-commonjs/components/Drawer/Drawer.types.js +3 -1
  80. package/lib-commonjs/components/Drawer/Drawer.types.js.map +1 -1
  81. package/lib-commonjs/components/Drawer/index.js.map +1 -1
  82. package/lib-commonjs/components/Drawer/renderDrawer.js.map +1 -1
  83. package/lib-commonjs/components/Drawer/useDrawer.js.map +1 -1
  84. package/lib-commonjs/components/Drawer/useDrawerStyles.styles.js.map +1 -1
  85. package/lib-commonjs/components/DrawerBody/DrawerBody.js.map +1 -1
  86. package/lib-commonjs/components/DrawerBody/DrawerBody.types.js +3 -1
  87. package/lib-commonjs/components/DrawerBody/DrawerBody.types.js.map +1 -1
  88. package/lib-commonjs/components/DrawerBody/index.js.map +1 -1
  89. package/lib-commonjs/components/DrawerBody/renderDrawerBody.js.map +1 -1
  90. package/lib-commonjs/components/DrawerBody/useDrawerBody.js.map +1 -1
  91. package/lib-commonjs/components/DrawerBody/useDrawerBodyStyles.styles.js.map +1 -1
  92. package/lib-commonjs/components/DrawerFooter/DrawerFooter.js.map +1 -1
  93. package/lib-commonjs/components/DrawerFooter/DrawerFooter.types.js +3 -1
  94. package/lib-commonjs/components/DrawerFooter/DrawerFooter.types.js.map +1 -1
  95. package/lib-commonjs/components/DrawerFooter/index.js.map +1 -1
  96. package/lib-commonjs/components/DrawerFooter/renderDrawerFooter.js.map +1 -1
  97. package/lib-commonjs/components/DrawerFooter/useDrawerFooter.js.map +1 -1
  98. package/lib-commonjs/components/DrawerFooter/useDrawerFooterStyles.styles.js.map +1 -1
  99. package/lib-commonjs/components/DrawerHeader/DrawerHeader.js.map +1 -1
  100. package/lib-commonjs/components/DrawerHeader/DrawerHeader.types.js +3 -1
  101. package/lib-commonjs/components/DrawerHeader/DrawerHeader.types.js.map +1 -1
  102. package/lib-commonjs/components/DrawerHeader/index.js.map +1 -1
  103. package/lib-commonjs/components/DrawerHeader/renderDrawerHeader.js.map +1 -1
  104. package/lib-commonjs/components/DrawerHeader/useDrawerHeader.js.map +1 -1
  105. package/lib-commonjs/components/DrawerHeader/useDrawerHeaderStyles.styles.js.map +1 -1
  106. package/lib-commonjs/components/DrawerHeaderNavigation/DrawerHeaderNavigation.js.map +1 -1
  107. package/lib-commonjs/components/DrawerHeaderNavigation/DrawerHeaderNavigation.types.js +3 -1
  108. package/lib-commonjs/components/DrawerHeaderNavigation/DrawerHeaderNavigation.types.js.map +1 -1
  109. package/lib-commonjs/components/DrawerHeaderNavigation/index.js.map +1 -1
  110. package/lib-commonjs/components/DrawerHeaderNavigation/renderDrawerHeaderNavigation.js.map +1 -1
  111. package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigation.js.map +1 -1
  112. package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.js.map +1 -1
  113. package/lib-commonjs/components/DrawerHeaderTitle/DrawerHeaderTitle.js.map +1 -1
  114. package/lib-commonjs/components/DrawerHeaderTitle/DrawerHeaderTitle.types.js +3 -1
  115. package/lib-commonjs/components/DrawerHeaderTitle/DrawerHeaderTitle.types.js.map +1 -1
  116. package/lib-commonjs/components/DrawerHeaderTitle/index.js.map +1 -1
  117. package/lib-commonjs/components/DrawerHeaderTitle/renderDrawerHeaderTitle.js.map +1 -1
  118. package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitle.js.map +1 -1
  119. package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.js.map +1 -1
  120. package/lib-commonjs/components/InlineDrawer/InlineDrawer.js.map +1 -1
  121. package/lib-commonjs/components/InlineDrawer/InlineDrawer.types.js +3 -1
  122. package/lib-commonjs/components/InlineDrawer/InlineDrawer.types.js.map +1 -1
  123. package/lib-commonjs/components/InlineDrawer/index.js.map +1 -1
  124. package/lib-commonjs/components/InlineDrawer/renderInlineDrawer.js.map +1 -1
  125. package/lib-commonjs/components/InlineDrawer/useInlineDrawer.js.map +1 -1
  126. package/lib-commonjs/components/InlineDrawer/useInlineDrawerStyles.styles.js.map +1 -1
  127. package/lib-commonjs/components/OverlayDrawer/OverlayDrawer.js.map +1 -1
  128. package/lib-commonjs/components/OverlayDrawer/OverlayDrawer.types.js +3 -1
  129. package/lib-commonjs/components/OverlayDrawer/OverlayDrawer.types.js.map +1 -1
  130. package/lib-commonjs/components/OverlayDrawer/OverlayDrawerDialog.js.map +1 -1
  131. package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.js.map +1 -1
  132. package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.types.js +3 -1
  133. package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.types.js.map +1 -1
  134. package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/index.js.map +1 -1
  135. package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/useOverlayDrawerSurfaceStyles.styles.js.map +1 -1
  136. package/lib-commonjs/components/OverlayDrawer/index.js.map +1 -1
  137. package/lib-commonjs/components/OverlayDrawer/renderOverlayDrawer.js.map +1 -1
  138. package/lib-commonjs/components/OverlayDrawer/useOverlayDrawer.js.map +1 -1
  139. package/lib-commonjs/components/OverlayDrawer/useOverlayDrawerStyles.styles.js.map +1 -1
  140. package/lib-commonjs/contexts/drawerContext.js +5 -5
  141. package/lib-commonjs/contexts/drawerContext.js.map +1 -1
  142. package/lib-commonjs/contexts/index.js.map +1 -1
  143. package/lib-commonjs/e2e/DrawerShared.js.map +1 -1
  144. package/lib-commonjs/index.js +76 -76
  145. package/lib-commonjs/index.js.map +1 -1
  146. package/lib-commonjs/shared/DrawerBase.types.js.map +1 -1
  147. package/lib-commonjs/shared/drawerSeparatorStyles.js.map +1 -1
  148. package/lib-commonjs/shared/useDrawerBaseStyles.styles.js +3 -3
  149. package/lib-commonjs/shared/useDrawerBaseStyles.styles.js.map +1 -1
  150. package/lib-commonjs/shared/useDrawerDefaultProps.js.map +1 -1
  151. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"sources":["renderDrawerHeaderNavigation.js"],"sourcesContent":[" import { jsx as _jsx } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of DrawerHeaderNavigation\n */ export const renderDrawerHeaderNavigation_unstable = (state)=>{\n assertSlots(state);\n return /*#__PURE__*/ _jsx(state.root, {});\n};\n"],"names":["renderDrawerHeaderNavigation_unstable","state","assertSlots","_jsx","root"],"mappings":";;;;+BAIiBA;;;eAAAA;;;4BAJa;gCACF;AAGjB,MAAMA,wCAAwC,CAACC;IACtDC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,eAAI,EAACF,MAAMG,IAAI,EAAE,CAAC;AAC3C"}
1
+ {"version":3,"sources":["renderDrawerHeaderNavigation.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\n\nimport type { DrawerHeaderNavigationSlots, DrawerHeaderNavigationState } from './DrawerHeaderNavigation.types';\n\n/**\n * Render the final JSX of DrawerHeaderNavigation\n */\nexport const renderDrawerHeaderNavigation_unstable = (state: DrawerHeaderNavigationState) => {\n assertSlots<DrawerHeaderNavigationSlots>(state);\n\n return <state.root />;\n};\n"],"names":["renderDrawerHeaderNavigation_unstable","state","assertSlots","_jsx","root"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;gCAC4B;AAOrB,MAAMA,wCAAwC,CAACC;IACpDC,IAAAA,2BAAAA,EAAyCD;IAEzC,OAAA,WAAA,GAAOE,IAAAA,eAAA,EAACF,MAAMG,IAAI,EAAA,CAAA;AACpB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useDrawerHeaderNavigation.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\n/**\n * Create the state required to render DrawerHeaderNavigation.\n *\n * The returned state can be modified with hooks such as useDrawerHeaderNavigationStyles_unstable,\n * before being passed to renderDrawerHeaderNavigation_unstable.\n *\n * @param props - props from this instance of DrawerHeaderNavigation\n * @param ref - reference to root HTMLElement of DrawerHeaderNavigation\n */ export const useDrawerHeaderNavigation_unstable = (props, ref)=>{\n return {\n components: {\n root: 'nav'\n },\n root: slot.always(getIntrinsicElementProps('nav', {\n ref,\n ...props\n }), {\n elementType: 'nav'\n })\n };\n};\n"],"names":["useDrawerHeaderNavigation_unstable","props","ref","components","root","slot","always","getIntrinsicElementProps","elementType"],"mappings":";;;;+BAUiBA;;;eAAAA;;;;iEAVM;gCACwB;AASpC,MAAMA,qCAAqC,CAACC,OAAOC;IAC1D,OAAO;QACHC,YAAY;YACRC,MAAM;QACV;QACAA,MAAMC,oBAAI,CAACC,MAAM,CAACC,IAAAA,wCAAwB,EAAC,OAAO;YAC9CL;YACA,GAAGD,KAAK;QACZ,IAAI;YACAO,aAAa;QACjB;IACJ;AACJ"}
1
+ {"version":3,"sources":["useDrawerHeaderNavigation.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\n\nimport type { DrawerHeaderNavigationProps, DrawerHeaderNavigationState } from './DrawerHeaderNavigation.types';\n\n/**\n * Create the state required to render DrawerHeaderNavigation.\n *\n * The returned state can be modified with hooks such as useDrawerHeaderNavigationStyles_unstable,\n * before being passed to renderDrawerHeaderNavigation_unstable.\n *\n * @param props - props from this instance of DrawerHeaderNavigation\n * @param ref - reference to root HTMLElement of DrawerHeaderNavigation\n */\nexport const useDrawerHeaderNavigation_unstable = (\n props: DrawerHeaderNavigationProps,\n ref: React.Ref<HTMLElement>,\n): DrawerHeaderNavigationState => {\n return {\n components: {\n root: 'nav',\n },\n\n root: slot.always(\n getIntrinsicElementProps('nav', {\n ref,\n ...props,\n }),\n { elementType: 'nav' },\n ),\n };\n};\n"],"names":["useDrawerHeaderNavigation_unstable","props","ref","components","root","slot","always","getIntrinsicElementProps","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAcaA;;;eAAAA;;;;iEAdU;gCACwB;AAaxC,MAAMA,qCAAqC,CAChDC,OACAC;IAEA,OAAO;QACLC,YAAY;YACVC,MAAM;QACR;QAEAA,MAAMC,oBAAAA,CAAKC,MAAM,CACfC,IAAAA,wCAAAA,EAAyB,OAAO;YAC9BL;YACA,GAAGD,KAAK;QACV,IACA;YAAEO,aAAa;QAAM;IAEzB;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useDrawerHeaderNavigationStyles.styles.js"],"sourcesContent":["import { __resetStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const drawerHeaderNavigationClassNames = {\n root: 'fui-DrawerHeaderNavigation'\n};\n/**\n * Styles for the root slot\n */\nconst useStyles = /*#__PURE__*/__resetStyles(\"r1ig4pwh\", null, [\".r1ig4pwh{margin:calc(var(--spacingVerticalS) * -1) calc(var(--spacingHorizontalL) * -1);}\"]);\n/**\n * Apply styling to the DrawerHeaderNavigation slots based on the state\n */\nexport const useDrawerHeaderNavigationStyles_unstable = state => {\n 'use no memo';\n\n const styles = useStyles();\n state.root.className = mergeClasses(drawerHeaderNavigationClassNames.root, styles, state.root.className);\n return state;\n};\n//# sourceMappingURL=useDrawerHeaderNavigationStyles.styles.js.map"],"names":["drawerHeaderNavigationClassNames","useDrawerHeaderNavigationStyles_unstable","root","useStyles","__resetStyles","state","styles","className","mergeClasses"],"mappings":";;;;;;;;;;;IAEaA,gCAAgC;eAAhCA;;IAUAC,wCAAwC;eAAxCA;;;uBAZ+B;AAErC,MAAMD,mCAAmC;IAC9CE,MAAM;AACR;AACA;;CAEC,GACD,MAAMC,YAAY,WAAW,GAAEC,IAAAA,oBAAa,EAAC,YAAY,MAAM;IAAC;CAA6F;AAItJ,MAAMH,2CAA2CI,CAAAA;IACtD;IAEA,MAAMC,SAASH;IACfE,MAAMH,IAAI,CAACK,SAAS,GAAGC,IAAAA,mBAAY,EAACR,iCAAiCE,IAAI,EAAEI,QAAQD,MAAMH,IAAI,CAACK,SAAS;IACvG,OAAOF;AACT,GACA,kEAAkE"}
1
+ {"version":3,"sources":["useDrawerHeaderNavigationStyles.styles.js"],"sourcesContent":["import { makeResetStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const drawerHeaderNavigationClassNames = {\n root: 'fui-DrawerHeaderNavigation'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeResetStyles({\n margin: `calc(${tokens.spacingVerticalS} * -1) calc(${tokens.spacingHorizontalL} * -1)`\n});\n/**\n * Apply styling to the DrawerHeaderNavigation slots based on the state\n */ export const useDrawerHeaderNavigationStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n state.root.className = mergeClasses(drawerHeaderNavigationClassNames.root, styles, state.root.className);\n return state;\n};\n"],"names":["drawerHeaderNavigationClassNames","useDrawerHeaderNavigationStyles_unstable","root","useStyles","__resetStyles","state","styles","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,gCAAgC;eAAhCA;;IAUIC,wCAAwC;eAAxCA;;;uBAZ6B;AAEvC,MAAMD,mCAAmC;IAC5CE,MAAM;AACV;AACA;;CAEA,GAAI,MAAMC,YAAS,WAAA,GAAGC,IAAAA,oBAAA,EAAA,YAAA,MAAA;IAAA;CAErB;AAGU,MAAMH,2CAA4CI,CAAAA;IACzD;IACA,MAAMC,SAASH;IACfE,MAAMH,IAAI,CAACK,SAAS,GAAGC,IAAAA,mBAAY,EAACR,iCAAiCE,IAAI,EAAEI,QAAQD,MAAMH,IAAI,CAACK,SAAS;IACvG,OAAOF;AACX"}
@@ -1 +1 @@
1
- {"version":3,"sources":["DrawerHeaderTitle.js"],"sourcesContent":["import * as React from 'react';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { useDrawerHeaderTitle_unstable } from './useDrawerHeaderTitle';\nimport { renderDrawerHeaderTitle_unstable } from './renderDrawerHeaderTitle';\nimport { useDrawerHeaderTitleStyles_unstable } from './useDrawerHeaderTitleStyles.styles';\n/**\n * DrawerHeader provides a structured header for the drawer component.\n */ export const DrawerHeaderTitle = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useDrawerHeaderTitle_unstable(props, ref);\n useDrawerHeaderTitleStyles_unstable(state);\n useCustomStyleHook_unstable('useDrawerHeaderTitleStyles_unstable')(state);\n return renderDrawerHeaderTitle_unstable(state);\n});\nDrawerHeaderTitle.displayName = 'DrawerHeaderTitle';\n"],"names":["DrawerHeaderTitle","React","forwardRef","props","ref","state","useDrawerHeaderTitle_unstable","useDrawerHeaderTitleStyles_unstable","useCustomStyleHook_unstable","renderDrawerHeaderTitle_unstable","displayName"],"mappings":";;;;+BAOiBA;;;eAAAA;;;;iEAPM;qCACqB;sCACE;yCACG;kDACG;AAGzC,MAAMA,oBAAoB,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACxE,MAAMC,QAAQC,IAAAA,mDAA6B,EAACH,OAAOC;IACnDG,IAAAA,qEAAmC,EAACF;IACpCG,IAAAA,gDAA2B,EAAC,uCAAuCH;IACnE,OAAOI,IAAAA,yDAAgC,EAACJ;AAC5C;AACAL,kBAAkBU,WAAW,GAAG"}
1
+ {"version":3,"sources":["DrawerHeaderTitle.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\nimport { useDrawerHeaderTitle_unstable } from './useDrawerHeaderTitle';\nimport { renderDrawerHeaderTitle_unstable } from './renderDrawerHeaderTitle';\nimport { useDrawerHeaderTitleStyles_unstable } from './useDrawerHeaderTitleStyles.styles';\nimport type { DrawerHeaderTitleProps } from './DrawerHeaderTitle.types';\n\n/**\n * DrawerHeader provides a structured header for the drawer component.\n */\nexport const DrawerHeaderTitle: ForwardRefComponent<DrawerHeaderTitleProps> = React.forwardRef((props, ref) => {\n const state = useDrawerHeaderTitle_unstable(props, ref);\n\n useDrawerHeaderTitleStyles_unstable(state);\n useCustomStyleHook_unstable('useDrawerHeaderTitleStyles_unstable')(state);\n\n return renderDrawerHeaderTitle_unstable(state);\n});\n\nDrawerHeaderTitle.displayName = 'DrawerHeaderTitle';\n"],"names":["DrawerHeaderTitle","React","forwardRef","props","ref","state","useDrawerHeaderTitle_unstable","useDrawerHeaderTitleStyles_unstable","useCustomStyleHook_unstable","renderDrawerHeaderTitle_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;;iEAZU;qCAEqB;sCAEE;yCACG;kDACG;AAM7C,MAAMA,oBAAAA,WAAAA,GAAiEC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACrG,MAAMC,QAAQC,IAAAA,mDAAAA,EAA8BH,OAAOC;IAEnDG,IAAAA,qEAAAA,EAAoCF;IACpCG,IAAAA,gDAAAA,EAA4B,uCAAuCH;IAEnE,OAAOI,IAAAA,yDAAAA,EAAiCJ;AAC1C;AAEAL,kBAAkBU,WAAW,GAAG"}
@@ -1,4 +1,6 @@
1
- "use strict";
1
+ /**
2
+ * State used in rendering DrawerHeaderTitle
3
+ */ "use strict";
2
4
  Object.defineProperty(exports, "__esModule", {
3
5
  value: true
4
6
  });
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":""}
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":[],"rangeMappings":";;","mappings":"AAsBA;;CAEC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './DrawerHeaderTitle';\nexport * from './DrawerHeaderTitle.types';\nexport * from './renderDrawerHeaderTitle';\nexport * from './useDrawerHeaderTitle';\nexport * from './useDrawerHeaderTitleStyles.styles';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './DrawerHeaderTitle';\nexport * from './DrawerHeaderTitle.types';\nexport * from './renderDrawerHeaderTitle';\nexport * from './useDrawerHeaderTitle';\nexport * from './useDrawerHeaderTitleStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["renderDrawerHeaderTitle.js"],"sourcesContent":[" import { jsx as _jsx, jsxs as _jsxs } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of DrawerHeaderTitle\n */ export const renderDrawerHeaderTitle_unstable = (state)=>{\n assertSlots(state);\n return /*#__PURE__*/ _jsxs(state.root, {\n children: [\n state.heading && /*#__PURE__*/ _jsx(state.heading, {}),\n state.action && /*#__PURE__*/ _jsx(state.action, {})\n ]\n });\n};\n"],"names":["renderDrawerHeaderTitle_unstable","state","assertSlots","_jsxs","root","children","heading","_jsx","action"],"mappings":";;;;+BAIiBA;;;eAAAA;;;4BAJ4B;gCACjB;AAGjB,MAAMA,mCAAmC,CAACC;IACjDC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,gBAAK,EAACF,MAAMG,IAAI,EAAE;QACnCC,UAAU;YACNJ,MAAMK,OAAO,IAAI,WAAW,GAAGC,IAAAA,eAAI,EAACN,MAAMK,OAAO,EAAE,CAAC;YACpDL,MAAMO,MAAM,IAAI,WAAW,GAAGD,IAAAA,eAAI,EAACN,MAAMO,MAAM,EAAE,CAAC;SACrD;IACL;AACJ"}
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":["renderDrawerHeaderTitle_unstable","state","assertSlots","_jsxs","root","heading","_jsx","action"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;gCAC4B;AAOrB,MAAMA,mCAAmC,CAACC;IAC/CC,IAAAA,2BAAAA,EAAoCD;IAEpC,OAAA,WAAA,GACEE,IAAAA,gBAAA,EAACF,MAAMG,IAAI,EAAA;;YACRH,MAAMI,OAAO,IAAA,WAAA,GAAIC,IAAAA,eAAA,EAACL,MAAMI,OAAO,EAAA,CAAA;YAC/BJ,MAAMM,MAAM,IAAA,WAAA,GAAID,IAAAA,eAAA,EAACL,MAAMM,MAAM,EAAA,CAAA;;;AAGpC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useDrawerHeaderTitle.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport { useDialogContext_unstable } from '@fluentui/react-dialog';\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 */ export const useDrawerHeaderTitle_unstable = (props, ref)=>{\n const { children, heading } = props;\n const headingId = useDialogContext_unstable((ctx)=>ctx.dialogTitleId);\n return {\n components: {\n root: 'div',\n heading: 'h2',\n action: 'div'\n },\n root: slot.always(getIntrinsicElementProps('div', {\n ref,\n ...props\n }), {\n elementType: 'div'\n }),\n heading: slot.optional(heading, {\n defaultProps: {\n id: headingId,\n children\n },\n renderByDefault: true,\n elementType: 'h2'\n }),\n action: slot.optional(props.action, {\n elementType: 'div'\n })\n };\n};\n"],"names":["useDrawerHeaderTitle_unstable","props","ref","children","heading","headingId","useDialogContext_unstable","ctx","dialogTitleId","components","root","action","slot","always","getIntrinsicElementProps","elementType","optional","defaultProps","id","renderByDefault"],"mappings":";;;;+BAWiBA;;;eAAAA;;;;iEAXM;gCACwB;6BACL;AAS/B,MAAMA,gCAAgC,CAACC,OAAOC;IACrD,MAAM,EAAEC,QAAQ,EAAEC,OAAO,EAAE,GAAGH;IAC9B,MAAMI,YAAYC,IAAAA,sCAAyB,EAAC,CAACC,MAAMA,IAAIC,aAAa;IACpE,OAAO;QACHC,YAAY;YACRC,MAAM;YACNN,SAAS;YACTO,QAAQ;QACZ;QACAD,MAAME,oBAAI,CAACC,MAAM,CAACC,IAAAA,wCAAwB,EAAC,OAAO;YAC9CZ;YACA,GAAGD,KAAK;QACZ,IAAI;YACAc,aAAa;QACjB;QACAX,SAASQ,oBAAI,CAACI,QAAQ,CAACZ,SAAS;YAC5Ba,cAAc;gBACVC,IAAIb;gBACJF;YACJ;YACAgB,iBAAiB;YACjBJ,aAAa;QACjB;QACAJ,QAAQC,oBAAI,CAACI,QAAQ,CAACf,MAAMU,MAAM,EAAE;YAChCI,aAAa;QACjB;IACJ;AACJ"}
1
+ {"version":3,"sources":["useDrawerHeaderTitle.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport { useDialogContext_unstable } from '@fluentui/react-dialog';\n\nimport type { DrawerHeaderTitleProps, DrawerHeaderTitleState } from './DrawerHeaderTitle.types';\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 { children, heading } = props;\n const headingId = useDialogContext_unstable(ctx => ctx.dialogTitleId);\n\n return {\n components: {\n root: 'div',\n heading: 'h2',\n action: 'div',\n },\n\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n ...props,\n }),\n { elementType: 'div' },\n ),\n heading: slot.optional(heading, {\n defaultProps: {\n id: headingId,\n children,\n },\n renderByDefault: true,\n elementType: 'h2',\n }),\n action: slot.optional(props.action, {\n elementType: 'div',\n }),\n };\n};\n"],"names":["useDrawerHeaderTitle_unstable","props","ref","children","heading","headingId","useDialogContext_unstable","ctx","dialogTitleId","components","root","action","slot","always","getIntrinsicElementProps","elementType","optional","defaultProps","id","renderByDefault"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAeaA;;;eAAAA;;;;iEAfU;gCACwB;6BACL;AAanC,MAAMA,gCAAgC,CAC3CC,OACAC;IAEA,MAAM,EAAEC,QAAQ,EAAEC,OAAO,EAAE,GAAGH;IAC9B,MAAMI,YAAYC,IAAAA,sCAAAA,EAA0BC,CAAAA,MAAOA,IAAIC,aAAa;IAEpE,OAAO;QACLC,YAAY;YACVC,MAAM;YACNN,SAAS;YACTO,QAAQ;QACV;QAEAD,MAAME,oBAAAA,CAAKC,MAAM,CACfC,IAAAA,wCAAAA,EAAyB,OAAO;YAC9BZ;YACA,GAAGD,KAAK;QACV,IACA;YAAEc,aAAa;QAAM;QAEvBX,SAASQ,oBAAAA,CAAKI,QAAQ,CAACZ,SAAS;YAC9Ba,cAAc;gBACZC,IAAIb;gBACJF;YACF;YACAgB,iBAAiB;YACjBJ,aAAa;QACf;QACAJ,QAAQC,oBAAAA,CAAKI,QAAQ,CAACf,MAAMU,MAAM,EAAE;YAClCI,aAAa;QACf;IACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useDrawerHeaderTitleStyles.styles.js"],"sourcesContent":["import { __styles, 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 */\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n mc9l5x: \"f22iagw\",\n Brf1p80: \"f1869bpl\",\n Bt984gj: \"f122n59\",\n i8kkvl: \"fsnqrgy\"\n },\n action: {\n t21cq0: [\"faqnl2i\", \"fd75udd\"]\n }\n}, {\n 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);}\"]\n});\n/**\n * Apply styling to the DrawerHeaderTitle slots based on the state\n */\nexport const useDrawerHeaderTitleStyles_unstable = state => {\n 'use no memo';\n\n const styles = useStyles();\n const {\n heading: root = {},\n action,\n components\n } = 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//# sourceMappingURL=useDrawerHeaderTitleStyles.styles.js.map"],"names":["drawerHeaderTitleClassNames","useDrawerHeaderTitleStyles_unstable","root","heading","action","useStyles","__styles","mc9l5x","Brf1p80","Bt984gj","i8kkvl","t21cq0","d","state","styles","components","useDialogTitleStyles_unstable","className","mergeClasses"],"mappings":";;;;;;;;;;;IAGaA,2BAA2B;eAA3BA;;IAwBAC,mCAAmC;eAAnCA;;;uBA3B0B;6BACO;AAEvC,MAAMD,8BAA8B;IACzCE,MAAM;IACNC,SAAS;IACTC,QAAQ;AACV;AACA;;CAEC,GACD,MAAMC,YAAY,WAAW,GAAEC,IAAAA,eAAQ,EAAC;IACtCJ,MAAM;QACJK,QAAQ;QACRC,SAAS;QACTC,SAAS;QACTC,QAAQ;IACV;IACAN,QAAQ;QACNO,QAAQ;YAAC;YAAW;SAAU;IAChC;AACF,GAAG;IACDC,GAAG;QAAC;QAA2B;QAA6C;QAAiC;QAAmD;QAAgE;KAA8D;AAChS;AAIO,MAAMX,sCAAsCY,CAAAA;IACjD;IAEA,MAAMC,SAAST;IACf,MAAM,EACJF,SAASD,OAAO,CAAC,CAAC,EAClBE,MAAM,EACNW,UAAU,EACX,GAAGF;IACJG,IAAAA,0CAA6B,EAAC;QAC5BD,YAAY;YACVb,MAAMa,WAAWZ,OAAO;YACxBC,QAAQW,WAAWX,MAAM;QAC3B;QACAF;QACAE;IACF;IACAS,MAAMX,IAAI,CAACe,SAAS,GAAGC,IAAAA,mBAAY,EAAClB,4BAA4BE,IAAI,EAAEY,OAAOZ,IAAI,EAAEW,MAAMX,IAAI,CAACe,SAAS;IACvG,IAAIJ,MAAMV,OAAO,EAAE;QACjBU,MAAMV,OAAO,CAACc,SAAS,GAAGC,IAAAA,mBAAY,EAAClB,4BAA4BG,OAAO,EAAEU,MAAMV,OAAO,CAACc,SAAS;IACrG;IACA,IAAIJ,MAAMT,MAAM,EAAE;QAChBS,MAAMT,MAAM,CAACa,SAAS,GAAGC,IAAAA,mBAAY,EAAClB,4BAA4BI,MAAM,EAAEU,OAAOV,MAAM,EAAES,MAAMT,MAAM,CAACa,SAAS;IACjH;IACA,OAAOJ;AACT,GACA,6DAA6D"}
1
+ {"version":3,"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 'use no memo';\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"],"names":["drawerHeaderTitleClassNames","useDrawerHeaderTitleStyles_unstable","root","heading","action","useStyles","__styles","mc9l5x","Brf1p80","Bt984gj","i8kkvl","t21cq0","d","state","styles","components","useDialogTitleStyles_unstable","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAGaA,2BAA2B;eAA3BA;;IAoBIC,mCAAmC;eAAnCA;;;uBAvBwB;6BACK;AAEvC,MAAMD,8BAA8B;IACvCE,MAAM;IACNC,SAAS;IACTC,QAAQ;AACZ;AACA;;CAEA,GAAI,MAAMC,YAAS,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAJ,MAAA;QAAAK,QAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;IAAA;IAAAN,QAAA;QAAAO,QAAA;YAAA;YAAA;SAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA;AAaX,MAAMX,sCAAuCY,CAAAA;IACpD;IACA,MAAMC,SAAST;IACf,MAAM,EAAEF,SAASD,OAAO,CAAC,CAAC,EAAEE,MAAM,EAAEW,UAAAA,EAAY,GAAGF;IACnDG,IAAAA,0CAA6B,EAAC;QAC1BD,YAAY;YACRb,MAAMa,WAAWZ,OAAO;YACxBC,QAAQW,WAAWX,MAAAA;QACvB;QACAF;QACAE;IACJ;IACAS,MAAMX,IAAI,CAACe,SAAS,GAAGC,IAAAA,mBAAY,EAAClB,4BAA4BE,IAAI,EAAEY,OAAOZ,IAAI,EAAEW,MAAMX,IAAI,CAACe,SAAS;IACvG,IAAIJ,MAAMV,OAAO,EAAE;QACfU,MAAMV,OAAO,CAACc,SAAS,GAAGC,IAAAA,mBAAY,EAAClB,4BAA4BG,OAAO,EAAEU,MAAMV,OAAO,CAACc,SAAS;IACvG;IACA,IAAIJ,MAAMT,MAAM,EAAE;QACdS,MAAMT,MAAM,CAACa,SAAS,GAAGC,IAAAA,mBAAY,EAAClB,4BAA4BI,MAAM,EAAEU,OAAOV,MAAM,EAAES,MAAMT,MAAM,CAACa,SAAS;IACnH;IACA,OAAOJ;AACX"}
@@ -1 +1 @@
1
- {"version":3,"sources":["InlineDrawer.js"],"sourcesContent":["import * as React from 'react';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { useDrawerContextValue } from '../../contexts/drawerContext';\nimport { useInlineDrawer_unstable } from './useInlineDrawer';\nimport { renderInlineDrawer_unstable } from './renderInlineDrawer';\nimport { useInlineDrawerStyles_unstable } from './useInlineDrawerStyles.styles';\n/**\n * InlineDrawer 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 */ export const InlineDrawer = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useInlineDrawer_unstable(props, ref);\n const contextValue = useDrawerContextValue();\n useInlineDrawerStyles_unstable(state);\n useCustomStyleHook_unstable('useDrawerInlineStyles_unstable')(state);\n useCustomStyleHook_unstable('useInlineDrawerStyles_unstable')(state);\n return renderInlineDrawer_unstable(state, contextValue);\n});\nInlineDrawer.displayName = 'InlineDrawer';\n"],"names":["InlineDrawer","React","forwardRef","props","ref","state","useInlineDrawer_unstable","contextValue","useDrawerContextValue","useInlineDrawerStyles_unstable","useCustomStyleHook_unstable","renderInlineDrawer_unstable","displayName"],"mappings":";;;;+BASiBA;;;eAAAA;;;;iEATM;qCACqB;+BACN;iCACG;oCACG;6CACG;AAIpC,MAAMA,eAAe,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACnE,MAAMC,QAAQC,IAAAA,yCAAwB,EAACH,OAAOC;IAC9C,MAAMG,eAAeC,IAAAA,oCAAqB;IAC1CC,IAAAA,2DAA8B,EAACJ;IAC/BK,IAAAA,gDAA2B,EAAC,kCAAkCL;IAC9DK,IAAAA,gDAA2B,EAAC,kCAAkCL;IAC9D,OAAOM,IAAAA,+CAA2B,EAACN,OAAOE;AAC9C;AACAP,aAAaY,WAAW,GAAG"}
1
+ {"version":3,"sources":["InlineDrawer.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\nimport { useDrawerContextValue } from '../../contexts/drawerContext';\n\nimport type { InlineDrawerProps } from './InlineDrawer.types';\nimport { useInlineDrawer_unstable } from './useInlineDrawer';\nimport { renderInlineDrawer_unstable } from './renderInlineDrawer';\nimport { useInlineDrawerStyles_unstable } from './useInlineDrawerStyles.styles';\n\n/**\n * InlineDrawer 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 InlineDrawer: ForwardRefComponent<InlineDrawerProps> = React.forwardRef((props, ref) => {\n const state = useInlineDrawer_unstable(props, ref);\n const contextValue = useDrawerContextValue();\n\n useInlineDrawerStyles_unstable(state);\n useCustomStyleHook_unstable('useDrawerInlineStyles_unstable')(state);\n useCustomStyleHook_unstable('useInlineDrawerStyles_unstable')(state);\n\n return renderInlineDrawer_unstable(state, contextValue);\n});\n\nInlineDrawer.displayName = 'InlineDrawer';\n"],"names":["InlineDrawer","React","forwardRef","props","ref","state","useInlineDrawer_unstable","contextValue","useDrawerContextValue","useInlineDrawerStyles_unstable","useCustomStyleHook_unstable","renderInlineDrawer_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAeaA;;;eAAAA;;;;iEAfU;qCAEqB;+BAEN;iCAGG;oCACG;6CACG;AAMxC,MAAMA,eAAAA,WAAAA,GAAuDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC3F,MAAMC,QAAQC,IAAAA,yCAAAA,EAAyBH,OAAOC;IAC9C,MAAMG,eAAeC,IAAAA,oCAAAA;IAErBC,IAAAA,2DAAAA,EAA+BJ;IAC/BK,IAAAA,gDAAAA,EAA4B,kCAAkCL;IAC9DK,IAAAA,gDAAAA,EAA4B,kCAAkCL;IAE9D,OAAOM,IAAAA,+CAAAA,EAA4BN,OAAOE;AAC5C;AAEAP,aAAaY,WAAW,GAAG"}
@@ -1,4 +1,6 @@
1
- "use strict";
1
+ /**
2
+ * State used in rendering InlineDrawer
3
+ */ "use strict";
2
4
  Object.defineProperty(exports, "__esModule", {
3
5
  value: true
4
6
  });
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":""}
1
+ {"version":3,"sources":["InlineDrawer.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nimport { DrawerBaseProps, DrawerBaseState } from '../../shared/DrawerBase.types';\n\nexport type InlineDrawerSlots = {\n root: Slot<'div', 'aside'>;\n};\n\n/**\n * InlineDrawer Props\n */\nexport type InlineDrawerProps = ComponentProps<InlineDrawerSlots> &\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 InlineDrawer\n */\nexport type InlineDrawerState = Required<\n ComponentState<InlineDrawerSlots> & DrawerBaseState & Pick<InlineDrawerProps, 'separator'>\n>;\n"],"names":[],"rangeMappings":";;","mappings":"AAqBA;;CAEC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './InlineDrawer';\nexport * from './InlineDrawer.types';\nexport * from './renderInlineDrawer';\nexport * from './useInlineDrawer';\nexport * from './useInlineDrawerStyles.styles';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './InlineDrawer';\nexport * from './InlineDrawer.types';\nexport * from './renderInlineDrawer';\nexport * from './useInlineDrawer';\nexport * from './useInlineDrawerStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["renderInlineDrawer.js"],"sourcesContent":[" import { jsx as _jsx } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { DrawerProvider } from '../../contexts/drawerContext';\n/**\n * Render the final JSX of InlineDrawer\n */ export const renderInlineDrawer_unstable = (state, contextValue)=>{\n if (!state.motion.canRender) {\n return null;\n }\n assertSlots(state);\n return /*#__PURE__*/ _jsx(DrawerProvider, {\n value: contextValue,\n children: /*#__PURE__*/ _jsx(state.root, {})\n });\n};\n"],"names":["renderInlineDrawer_unstable","state","contextValue","motion","canRender","assertSlots","_jsx","DrawerProvider","value","children","root"],"mappings":";;;;+BAKiBA;;;eAAAA;;;4BALa;gCACF;+BACG;AAGpB,MAAMA,8BAA8B,CAACC,OAAOC;IACnD,IAAI,CAACD,MAAME,MAAM,CAACC,SAAS,EAAE;QACzB,OAAO;IACX;IACAC,IAAAA,2BAAW,EAACJ;IACZ,OAAO,WAAW,GAAGK,IAAAA,eAAI,EAACC,6BAAc,EAAE;QACtCC,OAAON;QACPO,UAAU,WAAW,GAAGH,IAAAA,eAAI,EAACL,MAAMS,IAAI,EAAE,CAAC;IAC9C;AACJ"}
1
+ {"version":3,"sources":["renderInlineDrawer.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { DrawerContextValue, DrawerProvider } from '../../contexts/drawerContext';\n\nimport type { InlineDrawerState, InlineDrawerSlots } from './InlineDrawer.types';\n\n/**\n * Render the final JSX of InlineDrawer\n */\nexport const renderInlineDrawer_unstable = (state: InlineDrawerState, contextValue: DrawerContextValue) => {\n if (!state.motion.canRender) {\n return null;\n }\n\n assertSlots<InlineDrawerSlots>(state);\n\n return (\n <DrawerProvider value={contextValue}>\n <state.root />\n </DrawerProvider>\n );\n};\n"],"names":["renderInlineDrawer_unstable","state","contextValue","motion","canRender","assertSlots","_jsx","DrawerProvider","value","root"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAUaA;;;eAAAA;;;4BATb;gCAC4B;+BACuB;AAO5C,MAAMA,8BAA8B,CAACC,OAA0BC;IACpE,IAAI,CAACD,MAAME,MAAM,CAACC,SAAS,EAAE;QAC3B,OAAO;IACT;IAEAC,IAAAA,2BAAAA,EAA+BJ;IAE/B,OAAA,WAAA,GACEK,IAAAA,eAAA,EAACC,6BAAAA,EAAAA;QAAeC,OAAON;kBACrB,WAAA,GAAAI,IAAAA,eAAA,EAACL,MAAMQ,IAAI,EAAA,CAAA;;AAGjB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useInlineDrawer.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot, useMergedRefs } from '@fluentui/react-utilities';\nimport { useMotion } from '@fluentui/react-motion-preview';\nimport { useDrawerDefaultProps } from '../../shared/useDrawerDefaultProps';\n/**\n * Create the state required to render InlineDrawer.\n *\n * The returned state can be modified with hooks such as useInlineDrawerStyles_unstable,\n * before being passed to renderInlineDrawer_unstable.\n *\n * @param props - props from this instance of InlineDrawer\n * @param ref - reference to root HTMLElement of InlineDrawer\n */ export const useInlineDrawer_unstable = (props, ref)=>{\n const { size, position, open } = useDrawerDefaultProps(props);\n const { separator = false } = props;\n const motion = useMotion(open);\n return {\n components: {\n root: 'div'\n },\n root: slot.always(getIntrinsicElementProps('div', {\n ...props,\n ref: useMergedRefs(ref, motion.ref)\n }), {\n elementType: 'div'\n }),\n size,\n position,\n separator,\n motion\n };\n};\n"],"names":["useInlineDrawer_unstable","props","ref","size","position","open","useDrawerDefaultProps","separator","motion","useMotion","components","root","slot","always","getIntrinsicElementProps","useMergedRefs","elementType"],"mappings":";;;;+BAYiBA;;;eAAAA;;;;iEAZM;gCACuC;oCACpC;uCACY;AAS3B,MAAMA,2BAA2B,CAACC,OAAOC;IAChD,MAAM,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,IAAI,EAAE,GAAGC,IAAAA,4CAAqB,EAACL;IACvD,MAAM,EAAEM,YAAY,KAAK,EAAE,GAAGN;IAC9B,MAAMO,SAASC,IAAAA,6BAAS,EAACJ;IACzB,OAAO;QACHK,YAAY;YACRC,MAAM;QACV;QACAA,MAAMC,oBAAI,CAACC,MAAM,CAACC,IAAAA,wCAAwB,EAAC,OAAO;YAC9C,GAAGb,KAAK;YACRC,KAAKa,IAAAA,6BAAa,EAACb,KAAKM,OAAON,GAAG;QACtC,IAAI;YACAc,aAAa;QACjB;QACAb;QACAC;QACAG;QACAC;IACJ;AACJ"}
1
+ {"version":3,"sources":["useInlineDrawer.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot, useMergedRefs } from '@fluentui/react-utilities';\nimport { useMotion } from '@fluentui/react-motion-preview';\n\nimport type { InlineDrawerProps, InlineDrawerState } from './InlineDrawer.types';\nimport { useDrawerDefaultProps } from '../../shared/useDrawerDefaultProps';\n\n/**\n * Create the state required to render InlineDrawer.\n *\n * The returned state can be modified with hooks such as useInlineDrawerStyles_unstable,\n * before being passed to renderInlineDrawer_unstable.\n *\n * @param props - props from this instance of InlineDrawer\n * @param ref - reference to root HTMLElement of InlineDrawer\n */\nexport const useInlineDrawer_unstable = (props: InlineDrawerProps, ref: React.Ref<HTMLElement>): InlineDrawerState => {\n const { size, position, open } = useDrawerDefaultProps(props);\n const { separator = false } = props;\n\n const motion = useMotion<HTMLElement>(open);\n\n return {\n components: {\n root: 'div',\n },\n\n root: slot.always(\n getIntrinsicElementProps('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":["useInlineDrawer_unstable","props","ref","size","position","open","useDrawerDefaultProps","separator","motion","useMotion","components","root","slot","always","getIntrinsicElementProps","useMergedRefs","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAgBaA;;;eAAAA;;;;iEAhBU;gCACuC;oCACpC;uCAGY;AAW/B,MAAMA,2BAA2B,CAACC,OAA0BC;IACjE,MAAM,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,IAAI,EAAE,GAAGC,IAAAA,4CAAAA,EAAsBL;IACvD,MAAM,EAAEM,YAAY,KAAK,EAAE,GAAGN;IAE9B,MAAMO,SAASC,IAAAA,6BAAAA,EAAuBJ;IAEtC,OAAO;QACLK,YAAY;YACVC,MAAM;QACR;QAEAA,MAAMC,oBAAAA,CAAKC,MAAM,CACfC,IAAAA,wCAAAA,EAAyB,OAAO;YAC9B,GAAGb,KAAK;YACRC,KAAKa,IAAAA,6BAAAA,EAAcb,KAAKM,OAAON,GAAG;QACpC,IACA;YAAEc,aAAa;QAAM;QAGvBb;QACAC;QACAG;QACAC;IACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useInlineDrawerStyles.styles.js"],"sourcesContent":["import { __resetStyles, __styles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { drawerCSSVars, drawerDefaultStyles, useDrawerBaseClassNames } from '../../shared/useDrawerBaseStyles.styles';\nimport { useMotionClassNames } from '@fluentui/react-motion-preview';\nexport const inlineDrawerClassNames = {\n root: 'fui-InlineDrawer'\n};\nconst useDrawerResetStyles = /*#__PURE__*/__resetStyles(\"rkjj3x6\", null, [\".rkjj3x6{overflow:hidden;width:var(--fui-Drawer--size);max-width:100vw;height:auto;max-height:100vh;box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;background-color:var(--colorNeutralBackground1);color:var(--colorNeutralForeground1);position:relative;}\"]);\n/**\n * Styles for the root slot\n */\nconst borderValue = `1px solid ${tokens.colorNeutralBackground3}`;\nconst useDrawerRootStyles = /*#__PURE__*/__styles({\n separatorStart: {\n h3c5rm: 0,\n vrafjx: 0,\n Bekrc4i: 0,\n u1mtju: [\"f1cxmi7i\", \"f1j970fk\"]\n },\n separatorEnd: {\n zhjwy3: 0,\n wvpqe5: 0,\n ibv6hh: 0,\n B4g9neb: [\"f1j970fk\", \"f1cxmi7i\"]\n },\n separatorBottom: {\n g2u3we: 0,\n icvyot: 0,\n B4j52fo: 0,\n i8vvqc: \"f1n3kblk\"\n },\n start: {\n Bz10aip: \"f1d8gkik\"\n },\n end: {\n Bz10aip: \"f1h1g6jt\"\n },\n bottom: {\n Bz10aip: \"f1rdfgt8\",\n a9b677: \"fly5x3f\",\n Bqenvij: \"fub80nq\"\n }\n}, {\n d: [[\".f1cxmi7i{border-right:1px solid var(--colorNeutralBackground3);}\", {\n p: -1\n }], [\".f1j970fk{border-left:1px solid var(--colorNeutralBackground3);}\", {\n p: -1\n }], [\".f1j970fk{border-left:1px solid var(--colorNeutralBackground3);}\", {\n p: -1\n }], [\".f1cxmi7i{border-right:1px solid var(--colorNeutralBackground3);}\", {\n p: -1\n }], [\".f1n3kblk{border-top:1px solid var(--colorNeutralBackground3);}\", {\n p: -1\n }], \".f1d8gkik{transform:translate3D(calc(var(--fui-Drawer--size) * -1), 0, 0);}\", \".f1h1g6jt{transform:translate3D(var(--fui-Drawer--size), 0, 0);}\", \".f1rdfgt8{transform:translate3D(0, var(--fui-Drawer--size), 0);}\", \".fly5x3f{width:100%;}\", \".fub80nq{height:var(--fui-Drawer--size);}\"]\n});\nconst useDrawerMotionStyles = /*#__PURE__*/__styles({\n \"default\": {\n abs64n: \"fk73vx1\",\n Bmy1vo4: \"f15rjlgw\",\n Es3by: \"f1blt7p\"\n },\n enter: {\n abs64n: \"f5p0z4x\",\n Bz10aip: \"f87uvqx\"\n }\n}, {\n d: [\".fk73vx1{opacity:0;}\", \".f15rjlgw{transition-property:opacity,transform;}\", \".f1blt7p{will-change:opacity,transform;}\", \".f5p0z4x{opacity:1;}\", \".f87uvqx{transform:translate3D(0, 0, 0);}\"]\n});\nfunction getSeparatorClass(state, classNames) {\n if (!state.separator) {\n return undefined;\n }\n switch (state.position) {\n case 'start':\n return classNames.separatorStart;\n case 'end':\n return classNames.separatorEnd;\n case 'bottom':\n return classNames.separatorBottom;\n default:\n return undefined;\n }\n}\n/**\n * Apply styling to the InlineDrawer slots based on the state\n */\nexport const useInlineDrawerStyles_unstable = state => {\n 'use no memo';\n\n const resetStyles = useDrawerResetStyles();\n const baseClassNames = useDrawerBaseClassNames(state);\n const rootStyles = useDrawerRootStyles();\n const motionClassNames = useMotionClassNames(state.motion, useDrawerMotionStyles());\n state.root.className = mergeClasses(inlineDrawerClassNames.root, resetStyles, baseClassNames, getSeparatorClass(state, rootStyles), rootStyles[state.position], motionClassNames, state.root.className);\n return state;\n};\n//# sourceMappingURL=useInlineDrawerStyles.styles.js.map"],"names":["inlineDrawerClassNames","useInlineDrawerStyles_unstable","root","useDrawerResetStyles","__resetStyles","borderValue","tokens","colorNeutralBackground3","useDrawerRootStyles","__styles","separatorStart","h3c5rm","vrafjx","Bekrc4i","u1mtju","separatorEnd","zhjwy3","wvpqe5","ibv6hh","B4g9neb","separatorBottom","g2u3we","icvyot","B4j52fo","i8vvqc","start","Bz10aip","end","bottom","a9b677","Bqenvij","d","p","useDrawerMotionStyles","abs64n","Bmy1vo4","Es3by","enter","getSeparatorClass","state","classNames","separator","undefined","position","resetStyles","baseClassNames","useDrawerBaseClassNames","rootStyles","motionClassNames","useMotionClassNames","motion","className","mergeClasses"],"mappings":";;;;;;;;;;;IAIaA,sBAAsB;eAAtBA;;IAkFAC,8BAA8B;eAA9BA;;;uBAtFyC;4BAC/B;2CACqD;oCACxC;AAC7B,MAAMD,yBAAyB;IACpCE,MAAM;AACR;AACA,MAAMC,uBAAuB,WAAW,GAAEC,IAAAA,oBAAa,EAAC,WAAW,MAAM;IAAC;CAA0T;AACpY;;CAEC,GACD,MAAMC,cAAc,CAAC,UAAU,EAAEC,kBAAM,CAACC,uBAAuB,CAAC,CAAC;AACjE,MAAMC,sBAAsB,WAAW,GAAEC,IAAAA,eAAQ,EAAC;IAChDC,gBAAgB;QACdC,QAAQ;QACRC,QAAQ;QACRC,SAAS;QACTC,QAAQ;YAAC;YAAY;SAAW;IAClC;IACAC,cAAc;QACZC,QAAQ;QACRC,QAAQ;QACRC,QAAQ;QACRC,SAAS;YAAC;YAAY;SAAW;IACnC;IACAC,iBAAiB;QACfC,QAAQ;QACRC,QAAQ;QACRC,SAAS;QACTC,QAAQ;IACV;IACAC,OAAO;QACLC,SAAS;IACX;IACAC,KAAK;QACHD,SAAS;IACX;IACAE,QAAQ;QACNF,SAAS;QACTG,QAAQ;QACRC,SAAS;IACX;AACF,GAAG;IACDC,GAAG;QAAC;YAAC;YAAqE;gBACxEC,GAAG,CAAC;YACN;SAAE;QAAE;YAAC;YAAoE;gBACvEA,GAAG,CAAC;YACN;SAAE;QAAE;YAAC;YAAoE;gBACvEA,GAAG,CAAC;YACN;SAAE;QAAE;YAAC;YAAqE;gBACxEA,GAAG,CAAC;YACN;SAAE;QAAE;YAAC;YAAmE;gBACtEA,GAAG,CAAC;YACN;SAAE;QAAE;QAA+E;QAAoE;QAAoE;QAAyB;KAA4C;AAClS;AACA,MAAMC,wBAAwB,WAAW,GAAExB,IAAAA,eAAQ,EAAC;IAClD,WAAW;QACTyB,QAAQ;QACRC,SAAS;QACTC,OAAO;IACT;IACAC,OAAO;QACLH,QAAQ;QACRR,SAAS;IACX;AACF,GAAG;IACDK,GAAG;QAAC;QAAwB;QAAqD;QAA4C;QAAwB;KAA4C;AACnM;AACA,SAASO,kBAAkBC,KAAK,EAAEC,UAAU;IAC1C,IAAI,CAACD,MAAME,SAAS,EAAE;QACpB,OAAOC;IACT;IACA,OAAQH,MAAMI,QAAQ;QACpB,KAAK;YACH,OAAOH,WAAW9B,cAAc;QAClC,KAAK;YACH,OAAO8B,WAAWzB,YAAY;QAChC,KAAK;YACH,OAAOyB,WAAWpB,eAAe;QACnC;YACE,OAAOsB;IACX;AACF;AAIO,MAAMzC,iCAAiCsC,CAAAA;IAC5C;IAEA,MAAMK,cAAczC;IACpB,MAAM0C,iBAAiBC,IAAAA,kDAAuB,EAACP;IAC/C,MAAMQ,aAAavC;IACnB,MAAMwC,mBAAmBC,IAAAA,uCAAmB,EAACV,MAAMW,MAAM,EAAEjB;IAC3DM,MAAMrC,IAAI,CAACiD,SAAS,GAAGC,IAAAA,mBAAY,EAACpD,uBAAuBE,IAAI,EAAE0C,aAAaC,gBAAgBP,kBAAkBC,OAAOQ,aAAaA,UAAU,CAACR,MAAMI,QAAQ,CAAC,EAAEK,kBAAkBT,MAAMrC,IAAI,CAACiD,SAAS;IACtM,OAAOZ;AACT,GACA,wDAAwD"}
1
+ {"version":3,"sources":["useInlineDrawerStyles.styles.js"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { drawerCSSVars, drawerDefaultStyles, useDrawerBaseClassNames } from '../../shared/useDrawerBaseStyles.styles';\nimport { useMotionClassNames } from '@fluentui/react-motion-preview';\nexport const inlineDrawerClassNames = {\n root: 'fui-InlineDrawer'\n};\nconst useDrawerResetStyles = makeResetStyles({\n ...drawerDefaultStyles,\n position: 'relative'\n});\n/**\n * Styles for the root slot\n */ const borderValue = `1px solid ${tokens.colorNeutralBackground3}`;\nconst useDrawerRootStyles = makeStyles({\n /* Separator */ separatorStart: {\n borderRight: borderValue\n },\n separatorEnd: {\n borderLeft: borderValue\n },\n separatorBottom: {\n borderTop: borderValue\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 bottom: {\n transform: `translate3D(0, var(${drawerCSSVars.drawerSizeVar}), 0)`,\n width: '100%',\n height: `var(${drawerCSSVars.drawerSizeVar})`\n }\n});\nconst useDrawerMotionStyles = makeStyles({\n default: {\n opacity: 0,\n transitionProperty: 'opacity, transform',\n willChange: 'opacity, transform'\n },\n enter: {\n opacity: 1,\n transform: 'translate3D(0, 0, 0)'\n }\n});\nfunction getSeparatorClass(state, classNames) {\n if (!state.separator) {\n return undefined;\n }\n switch(state.position){\n case 'start':\n return classNames.separatorStart;\n case 'end':\n return classNames.separatorEnd;\n case 'bottom':\n return classNames.separatorBottom;\n default:\n return undefined;\n }\n}\n/**\n * Apply styling to the InlineDrawer slots based on the state\n */ export const useInlineDrawerStyles_unstable = (state)=>{\n 'use no memo';\n const resetStyles = useDrawerResetStyles();\n const baseClassNames = useDrawerBaseClassNames(state);\n const rootStyles = useDrawerRootStyles();\n const motionClassNames = useMotionClassNames(state.motion, useDrawerMotionStyles());\n state.root.className = mergeClasses(inlineDrawerClassNames.root, resetStyles, baseClassNames, getSeparatorClass(state, rootStyles), rootStyles[state.position], motionClassNames, state.root.className);\n return state;\n};\n"],"names":["inlineDrawerClassNames","useInlineDrawerStyles_unstable","root","useDrawerResetStyles","__resetStyles","borderValue","tokens","colorNeutralBackground3","useDrawerRootStyles","__styles","separatorStart","h3c5rm","vrafjx","Bekrc4i","u1mtju","separatorEnd","zhjwy3","wvpqe5","ibv6hh","B4g9neb","separatorBottom","g2u3we","icvyot","B4j52fo","i8vvqc","start","Bz10aip","end","bottom","a9b677","Bqenvij","d","p","useDrawerMotionStyles","abs64n","Bmy1vo4","Es3by","enter","getSeparatorClass","state","classNames","separator","undefined","position","resetStyles","baseClassNames","useDrawerBaseClassNames","rootStyles","motionClassNames","useMotionClassNames","motion","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,sBAAsB;eAAtBA;;IA4DIC,8BAA8B;eAA9BA;;;uBAhEyC;4BACnC;2CACqD;oCACxC;AAC7B,MAAMD,yBAAyB;IAClCE,MAAM;AACV;AACA,MAAMC,uBAAoB,WAAA,GAAGC,IAAAA,oBAAA,EAAA,WAAA,MAAA;IAAA;CAG5B;AACD;;CAEA,GAAI,MAAMC,cAAc,CAAA,UAAA,EAAaC,kBAAM,CAACC,uBAAuB,CAAA,CAAE;AACrE,MAAMC,sBAAmB,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAC,gBAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,QAAA;YAAA;YAAA;SAAA;IAAA;IAAAC,cAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,SAAA;YAAA;YAAA;SAAA;IAAA;IAAAC,iBAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,QAAA;IAAA;IAAAC,OAAA;QAAAC,SAAA;IAAA;IAAAC,KAAA;QAAAD,SAAA;IAAA;IAAAE,QAAA;QAAAF,SAAA;QAAAG,QAAA;QAAAC,SAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;YAAA;YAAA;gBAAAC,GAAA,CAAA;YAAA;SAAA;QAAA;YAAA;YAAA;gBAAAA,GAAA,CAAA;YAAA;SAAA;QAAA;YAAA;YAAA;gBAAAA,GAAA,CAAA;YAAA;SAAA;QAAA;YAAA;YAAA;gBAAAA,GAAA,CAAA;YAAA;SAAA;QAAA;YAAA;YAAA;gBAAAA,GAAA,CAAA;YAAA;SAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA;AAsB5B,MAAMC,wBAAqB,WAAA,GAAGxB,IAAAA,eAAA,EAAA;IAAA,WAAA;QAAAyB,QAAA;QAAAC,SAAA;QAAAC,OAAA;IAAA;IAAAC,OAAA;QAAAH,QAAA;QAAAR,SAAA;IAAA;AAAA,GAAA;IAAAK,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA;AAW9B,SAASO,kBAAkBC,KAAK,EAAEC,UAAU;IACxC,IAAI,CAACD,MAAME,SAAS,EAAE;QAClB,OAAOC;IACX;IACA,OAAOH,MAAMI,QAAQ;QACjB,KAAK;YACD,OAAOH,WAAW9B,cAAc;QACpC,KAAK;YACD,OAAO8B,WAAWzB,YAAY;QAClC,KAAK;YACD,OAAOyB,WAAWpB,eAAe;QACrC;YACI,OAAOsB;IACf;AACJ;AAGW,MAAMzC,iCAAkCsC,CAAAA;IAC/C;IACA,MAAMK,cAAczC;IACpB,MAAM0C,iBAAiBC,IAAAA,kDAAuB,EAACP;IAC/C,MAAMQ,aAAavC;IACnB,MAAMwC,mBAAmBC,IAAAA,uCAAmB,EAACV,MAAMW,MAAM,EAAEjB;IAC3DM,MAAMrC,IAAI,CAACiD,SAAS,GAAGC,IAAAA,mBAAY,EAACpD,uBAAuBE,IAAI,EAAE0C,aAAaC,gBAAgBP,kBAAkBC,OAAOQ,aAAaA,UAAU,CAACR,MAAMI,QAAQ,CAAC,EAAEK,kBAAkBT,MAAMrC,IAAI,CAACiD,SAAS;IACtM,OAAOZ;AACX"}
@@ -1 +1 @@
1
- {"version":3,"sources":["OverlayDrawer.js"],"sourcesContent":["import * as React from 'react';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { useDrawerContextValue } from '../../contexts/drawerContext';\nimport { useOverlayDrawer_unstable } from './useOverlayDrawer';\nimport { renderOverlayDrawer_unstable } from './renderOverlayDrawer';\nimport { useOverlayDrawerStyles_unstable } from './useOverlayDrawerStyles.styles';\n/**\n * OverlayDrawer contains supplementary content and are used for complex creation, edit, or management experiences.\n */ export const OverlayDrawer = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useOverlayDrawer_unstable(props, ref);\n const contextValue = useDrawerContextValue();\n useOverlayDrawerStyles_unstable(state);\n useCustomStyleHook_unstable('useDrawerOverlayStyles_unstable')(state);\n useCustomStyleHook_unstable('useOverlayDrawerStyles_unstable')(state);\n return renderOverlayDrawer_unstable(state, contextValue);\n});\nOverlayDrawer.displayName = 'OverlayDrawer';\n"],"names":["OverlayDrawer","React","forwardRef","props","ref","state","useOverlayDrawer_unstable","contextValue","useDrawerContextValue","useOverlayDrawerStyles_unstable","useCustomStyleHook_unstable","renderOverlayDrawer_unstable","displayName"],"mappings":";;;;+BAQiBA;;;eAAAA;;;;iEARM;qCACqB;+BACN;kCACI;qCACG;8CACG;AAGrC,MAAMA,gBAAgB,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACpE,MAAMC,QAAQC,IAAAA,2CAAyB,EAACH,OAAOC;IAC/C,MAAMG,eAAeC,IAAAA,oCAAqB;IAC1CC,IAAAA,6DAA+B,EAACJ;IAChCK,IAAAA,gDAA2B,EAAC,mCAAmCL;IAC/DK,IAAAA,gDAA2B,EAAC,mCAAmCL;IAC/D,OAAOM,IAAAA,iDAA4B,EAACN,OAAOE;AAC/C;AACAP,cAAcY,WAAW,GAAG"}
1
+ {"version":3,"sources":["OverlayDrawer.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\nimport { useDrawerContextValue } from '../../contexts/drawerContext';\n\nimport { useOverlayDrawer_unstable } from './useOverlayDrawer';\nimport { renderOverlayDrawer_unstable } from './renderOverlayDrawer';\nimport { useOverlayDrawerStyles_unstable } from './useOverlayDrawerStyles.styles';\nimport type { OverlayDrawerProps } from './OverlayDrawer.types';\n\n/**\n * OverlayDrawer contains supplementary content and are used for complex creation, edit, or management experiences.\n */\nexport const OverlayDrawer: ForwardRefComponent<OverlayDrawerProps> = React.forwardRef((props, ref) => {\n const state = useOverlayDrawer_unstable(props, ref);\n const contextValue = useDrawerContextValue();\n\n useOverlayDrawerStyles_unstable(state);\n useCustomStyleHook_unstable('useDrawerOverlayStyles_unstable')(state);\n useCustomStyleHook_unstable('useOverlayDrawerStyles_unstable')(state);\n\n return renderOverlayDrawer_unstable(state, contextValue);\n});\n\nOverlayDrawer.displayName = 'OverlayDrawer';\n"],"names":["OverlayDrawer","React","forwardRef","props","ref","state","useOverlayDrawer_unstable","contextValue","useDrawerContextValue","useOverlayDrawerStyles_unstable","useCustomStyleHook_unstable","renderOverlayDrawer_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAcaA;;;eAAAA;;;;iEAdU;qCAEqB;+BAEN;kCAEI;qCACG;8CACG;AAMzC,MAAMA,gBAAAA,WAAAA,GAAyDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQC,IAAAA,2CAAAA,EAA0BH,OAAOC;IAC/C,MAAMG,eAAeC,IAAAA,oCAAAA;IAErBC,IAAAA,6DAAAA,EAAgCJ;IAChCK,IAAAA,gDAAAA,EAA4B,mCAAmCL;IAC/DK,IAAAA,gDAAAA,EAA4B,mCAAmCL;IAE/D,OAAOM,IAAAA,iDAAAA,EAA6BN,OAAOE;AAC7C;AAEAP,cAAcY,WAAW,GAAG"}
@@ -1,4 +1,6 @@
1
- "use strict";
1
+ /**
2
+ * State used in rendering OverlayDrawer
3
+ */ "use strict";
2
4
  Object.defineProperty(exports, "__esModule", {
3
5
  value: true
4
6
  });
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":""}
1
+ {"version":3,"sources":["OverlayDrawer.types.ts"],"sourcesContent":["import type { DialogProps } from '@fluentui/react-dialog';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nimport type { DrawerBaseProps, DrawerBaseState } from '../../shared/DrawerBase.types';\nimport { OverlayDrawerSurfaceProps } from './OverlayDrawerSurface';\n\n/**\n * OverlayDrawer slots\n */\nexport type OverlayDrawerSlots = {\n /**\n * Slot for the root element.\n */\n root: Slot<OverlayDrawerSurfaceProps>;\n};\n\n/**\n * OverlayDrawer internal slots for when using with composition API\n */\nexport type OverlayDrawerInternalSlots = OverlayDrawerSlots & {\n /**\n * Slot for the dialog component that wraps the drawer.\n */\n dialog: Slot<DialogProps>;\n};\n\n/**\n * OverlayDrawer Props\n */\nexport type OverlayDrawerProps = ComponentProps<OverlayDrawerSlots> &\n Pick<DialogProps, 'modalType' | 'onOpenChange' | 'inertTrapFocus'> &\n DrawerBaseProps & {\n /**\n * @deprecated OverlayDrawer can work only as a controlled component\n * and does not support uncontrolled mode i.e. defaultOpen prop\n */\n defaultOpen?: boolean;\n };\n\n/**\n * State used in rendering OverlayDrawer\n */\nexport type OverlayDrawerState = ComponentState<OverlayDrawerInternalSlots> & Required<DrawerBaseState>;\n"],"names":[],"rangeMappings":";;","mappings":"AAuCA;;CAEC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["OverlayDrawerDialog.js"],"sourcesContent":["import * as React from 'react';\nimport { DialogProvider, DialogSurfaceProvider, useDialog_unstable, useDialogContextValues_unstable } from '@fluentui/react-dialog';\n// eslint-disable-next-line @typescript-eslint/naming-convention\nconst renderOverlayDrawerDialog_unstable = (state, contextValues)=>{\n const { content, trigger } = state;\n return /*#__PURE__*/ React.createElement(DialogProvider, {\n value: contextValues.dialog\n }, /*#__PURE__*/ React.createElement(DialogSurfaceProvider, {\n value: contextValues.dialogSurface\n }, trigger, content));\n};\n/**\n * Temporary component to render Dialog without built-in motion as Drawer has own motion implementation.\n *\n * @todo Remove after https://github.com/microsoft/fluentui/issues/30700.\n * @internal\n */ export const OverlayDrawerDialog = /*#__PURE__*/ React.memo((props)=>{\n const state = useDialog_unstable(props);\n const contextValues = useDialogContextValues_unstable(state);\n return renderOverlayDrawerDialog_unstable(state, contextValues);\n});\nOverlayDrawerDialog.displayName = 'OverlayDrawerDialog';\n"],"names":["OverlayDrawerDialog","renderOverlayDrawerDialog_unstable","state","contextValues","content","trigger","React","createElement","DialogProvider","value","dialog","DialogSurfaceProvider","dialogSurface","memo","props","useDialog_unstable","useDialogContextValues_unstable","displayName"],"mappings":";;;;+BAgBiBA;;;eAAAA;;;;iEAhBM;6BACoF;AAC3G,gEAAgE;AAChE,MAAMC,qCAAqC,CAACC,OAAOC;IAC/C,MAAM,EAAEC,OAAO,EAAEC,OAAO,EAAE,GAAGH;IAC7B,OAAO,WAAW,GAAGI,OAAMC,aAAa,CAACC,2BAAc,EAAE;QACrDC,OAAON,cAAcO,MAAM;IAC/B,GAAG,WAAW,GAAGJ,OAAMC,aAAa,CAACI,kCAAqB,EAAE;QACxDF,OAAON,cAAcS,aAAa;IACtC,GAAGP,SAASD;AAChB;AAMW,MAAMJ,sBAAsB,WAAW,GAAGM,OAAMO,IAAI,CAAC,CAACC;IAC7D,MAAMZ,QAAQa,IAAAA,+BAAkB,EAACD;IACjC,MAAMX,gBAAgBa,IAAAA,4CAA+B,EAACd;IACtD,OAAOD,mCAAmCC,OAAOC;AACrD;AACAH,oBAAoBiB,WAAW,GAAG"}
1
+ {"version":3,"sources":["OverlayDrawerDialog.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n type DialogContextValues,\n type DialogProps,\n DialogProvider,\n type DialogState,\n DialogSurfaceProvider,\n useDialog_unstable,\n useDialogContextValues_unstable,\n} from '@fluentui/react-dialog';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nconst renderOverlayDrawerDialog_unstable = (state: DialogState, contextValues: DialogContextValues) => {\n const { content, trigger } = state;\n\n return (\n <DialogProvider value={contextValues.dialog}>\n <DialogSurfaceProvider value={contextValues.dialogSurface}>\n {trigger}\n {content}\n </DialogSurfaceProvider>\n </DialogProvider>\n );\n};\n\n/**\n * Temporary component to render Dialog without built-in motion as Drawer has own motion implementation.\n *\n * @todo Remove after https://github.com/microsoft/fluentui/issues/30700.\n * @internal\n */\nexport const OverlayDrawerDialog: React.FC<DialogProps> = React.memo(props => {\n const state = useDialog_unstable(props);\n const contextValues = useDialogContextValues_unstable(state);\n\n return renderOverlayDrawerDialog_unstable(state, contextValues);\n});\n\nOverlayDrawerDialog.displayName = 'OverlayDrawerDialog';\n"],"names":["OverlayDrawerDialog","renderOverlayDrawerDialog_unstable","state","contextValues","content","trigger","React","createElement","DialogProvider","value","dialog","DialogSurfaceProvider","dialogSurface","memo","props","useDialog_unstable","useDialogContextValues_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BA+BaA;;;eAAAA;;;;iEA/BU;6BAShB;AAEP,gEAAgE;AAChE,MAAMC,qCAAqC,CAACC,OAAoBC;IAC9D,MAAM,EAAEC,OAAO,EAAEC,OAAO,EAAE,GAAGH;IAE7B,OAAA,WAAA,GACEI,OAAAC,aAAA,CAACC,2BAAAA,EAAAA;QAAeC,OAAON,cAAcO,MAAM;qBACzCJ,OAAAC,aAAA,CAACI,kCAAAA,EAAAA;QAAsBF,OAAON,cAAcS,aAAa;OACtDP,SACAD;AAIT;AAQO,MAAMJ,sBAAAA,WAAAA,GAA6CM,OAAMO,IAAI,CAACC,CAAAA;IACnE,MAAMZ,QAAQa,IAAAA,+BAAAA,EAAmBD;IACjC,MAAMX,gBAAgBa,IAAAA,4CAAAA,EAAgCd;IAEtD,OAAOD,mCAAmCC,OAAOC;AACnD;AAEAH,oBAAoBiB,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["OverlayDrawerSurface.js"],"sourcesContent":["import * as React from 'react';\nimport { useDialogSurface_unstable, useDialogSurfaceContextValues_unstable, renderDialogSurface_unstable } from '@fluentui/react-dialog';\nimport { useOverlayDrawerSurfaceStyles_unstable } from './useOverlayDrawerSurfaceStyles.styles';\n/**\n * @internal\n * OverlayDrawerSurface is a proxy for DialogSurface as is only meant to be used internally for Drawer.\n */ export const OverlayDrawerSurface = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const dialogSurfaceState = useDialogSurface_unstable({\n ...props,\n /**\n * Drawer accepts a `div` or `aside` element type, but Dialog only accepts a `div` element type.\n * We need to cast the ref to a `div` element type to not break Dialog's ref type.\n *\n * FIXME: Evaluate the possibility to remove this cast when Dialog is refactored to accept `aside` elements.\n */ as: props.as\n }, ref);\n const dialogSurfaceContextValues = useDialogSurfaceContextValues_unstable(dialogSurfaceState);\n useOverlayDrawerSurfaceStyles_unstable(dialogSurfaceState);\n return renderDialogSurface_unstable(dialogSurfaceState, dialogSurfaceContextValues);\n});\nOverlayDrawerSurface.displayName = 'OverlayDrawerSurface';\n"],"names":["OverlayDrawerSurface","React","forwardRef","props","ref","dialogSurfaceState","useDialogSurface_unstable","as","dialogSurfaceContextValues","useDialogSurfaceContextValues_unstable","useOverlayDrawerSurfaceStyles_unstable","renderDialogSurface_unstable","displayName"],"mappings":";;;;+BAMiBA;;;eAAAA;;;;iEANM;6BACyF;qDACzD;AAI5C,MAAMA,uBAAuB,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC3E,MAAMC,qBAAqBC,IAAAA,sCAAyB,EAAC;QACjD,GAAGH,KAAK;QACR;;;;;OAKD,GAAGI,IAAIJ,MAAMI,EAAE;IAClB,GAAGH;IACH,MAAMI,6BAA6BC,IAAAA,mDAAsC,EAACJ;IAC1EK,IAAAA,2EAAsC,EAACL;IACvC,OAAOM,IAAAA,yCAA4B,EAACN,oBAAoBG;AAC5D;AACAR,qBAAqBY,WAAW,GAAG"}
1
+ {"version":3,"sources":["OverlayDrawerSurface.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport {\n useDialogSurface_unstable,\n useDialogSurfaceContextValues_unstable,\n renderDialogSurface_unstable,\n} from '@fluentui/react-dialog';\n\nimport { useOverlayDrawerSurfaceStyles_unstable } from './useOverlayDrawerSurfaceStyles.styles';\nimport type { OverlayDrawerSurfaceProps } from './OverlayDrawerSurface.types';\n\n/**\n * @internal\n * OverlayDrawerSurface is a proxy for DialogSurface as is only meant to be used internally for Drawer.\n */\nexport const OverlayDrawerSurface: ForwardRefComponent<OverlayDrawerSurfaceProps> = React.forwardRef((props, ref) => {\n const dialogSurfaceState = useDialogSurface_unstable(\n {\n ...props,\n /**\n * Drawer accepts a `div` or `aside` element type, but Dialog only accepts a `div` element type.\n * We need to cast the ref to a `div` element type to not break Dialog's ref type.\n *\n * FIXME: Evaluate the possibility to remove this cast when Dialog is refactored to accept `aside` elements.\n */\n as: props.as as 'div',\n },\n ref,\n );\n const dialogSurfaceContextValues = useDialogSurfaceContextValues_unstable(dialogSurfaceState);\n\n useOverlayDrawerSurfaceStyles_unstable(dialogSurfaceState);\n\n return renderDialogSurface_unstable(dialogSurfaceState, dialogSurfaceContextValues);\n});\n\nOverlayDrawerSurface.displayName = 'OverlayDrawerSurface';\n"],"names":["OverlayDrawerSurface","React","forwardRef","props","ref","dialogSurfaceState","useDialogSurface_unstable","as","dialogSurfaceContextValues","useDialogSurfaceContextValues_unstable","useOverlayDrawerSurfaceStyles_unstable","renderDialogSurface_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAeaA;;;eAAAA;;;;iEAfU;6BAMhB;qDAEgD;AAOhD,MAAMA,uBAAAA,WAAAA,GAAuEC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC3G,MAAMC,qBAAqBC,IAAAA,sCAAAA,EACzB;QACE,GAAGH,KAAK;QACR;;;;;OAKC,GACDI,IAAIJ,MAAMI,EAAE;IACd,GACAH;IAEF,MAAMI,6BAA6BC,IAAAA,mDAAAA,EAAuCJ;IAE1EK,IAAAA,2EAAAA,EAAuCL;IAEvC,OAAOM,IAAAA,yCAAAA,EAA6BN,oBAAoBG;AAC1D;AAEAR,qBAAqBY,WAAW,GAAG"}
@@ -1,4 +1,6 @@
1
- "use strict";
1
+ /**
2
+ * OverlayDrawerSurface Props
3
+ */ "use strict";
2
4
  Object.defineProperty(exports, "__esModule", {
3
5
  value: true
4
6
  });
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":""}
1
+ {"version":3,"sources":["OverlayDrawerSurface.types.ts"],"sourcesContent":["import type { DialogSurfaceProps, DialogSurfaceSlots } from '@fluentui/react-dialog';\nimport type { ComponentProps, Slot } from '@fluentui/react-utilities';\n\n/**\n * OverlayDrawerSurface slots\n */\nexport type OverlayDrawerSurfaceSlots = Pick<DialogSurfaceSlots, 'backdrop'> & {\n root: Slot<'div', 'aside'>;\n};\n\n/**\n * OverlayDrawerSurface Props\n */\nexport type OverlayDrawerSurfaceProps = ComponentProps<OverlayDrawerSurfaceSlots> &\n Pick<DialogSurfaceProps, 'mountNode'>;\n"],"names":[],"rangeMappings":";;","mappings":"AAUA;;CAEC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './OverlayDrawerSurface';\nexport * from './OverlayDrawerSurface.types';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './OverlayDrawerSurface';\nexport * from './OverlayDrawerSurface.types';\n"],"names":[],"rangeMappings":";;;;;;","mappings":";;;;;uBAAc;uBACA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useOverlayDrawerSurfaceStyles.styles.js"],"sourcesContent":["import { __resetStyles, __styles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const OverlayDrawerSurfaceClassNames = {\n root: 'fui-OverlayDrawerSurface',\n backdrop: 'fui-OverlayDrawerSurface__backdrop'\n};\n/**\n * Styles for the backdrop slot\n */\nconst useBackdropResetStyles = /*#__PURE__*/__resetStyles(\"rmnljus\", null, [\".rmnljus{inset:0px;position:fixed;background-color:rgba(0, 0, 0, 0.4);}\"]);\nconst useBackdropStyles = /*#__PURE__*/__styles({\n nested: {\n De3pzq: \"f1c21dwh\"\n }\n}, {\n d: [\".f1c21dwh{background-color:var(--colorTransparentBackground);}\"]\n});\n/**\n * Apply styling to the OverlayDrawerSurface slots based on the state\n */\nexport const useOverlayDrawerSurfaceStyles_unstable = state => {\n 'use no memo';\n\n const backdropResetStyles = useBackdropResetStyles();\n const backdropStyles = useBackdropStyles();\n if (state.backdrop) {\n state.backdrop.className = mergeClasses(backdropResetStyles, state.isNestedDialog && backdropStyles.nested, state.backdrop.className);\n }\n return state;\n};\n//# sourceMappingURL=useOverlayDrawerSurfaceStyles.styles.js.map"],"names":["OverlayDrawerSurfaceClassNames","useOverlayDrawerSurfaceStyles_unstable","root","backdrop","useBackdropResetStyles","__resetStyles","useBackdropStyles","__styles","nested","De3pzq","d","state","backdropResetStyles","backdropStyles","className","mergeClasses","isNestedDialog"],"mappings":";;;;;;;;;;;IAEaA,8BAA8B;eAA9BA;;IAkBAC,sCAAsC;eAAtCA;;;uBApByC;AAE/C,MAAMD,iCAAiC;IAC5CE,MAAM;IACNC,UAAU;AACZ;AACA;;CAEC,GACD,MAAMC,yBAAyB,WAAW,GAAEC,IAAAA,oBAAa,EAAC,WAAW,MAAM;IAAC;CAA0E;AACtJ,MAAMC,oBAAoB,WAAW,GAAEC,IAAAA,eAAQ,EAAC;IAC9CC,QAAQ;QACNC,QAAQ;IACV;AACF,GAAG;IACDC,GAAG;QAAC;KAAiE;AACvE;AAIO,MAAMT,yCAAyCU,CAAAA;IACpD;IAEA,MAAMC,sBAAsBR;IAC5B,MAAMS,iBAAiBP;IACvB,IAAIK,MAAMR,QAAQ,EAAE;QAClBQ,MAAMR,QAAQ,CAACW,SAAS,GAAGC,IAAAA,mBAAY,EAACH,qBAAqBD,MAAMK,cAAc,IAAIH,eAAeL,MAAM,EAAEG,MAAMR,QAAQ,CAACW,SAAS;IACtI;IACA,OAAOH;AACT,GACA,gEAAgE"}
1
+ {"version":3,"sources":["useOverlayDrawerSurfaceStyles.styles.js"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const OverlayDrawerSurfaceClassNames = {\n root: 'fui-OverlayDrawerSurface',\n backdrop: 'fui-OverlayDrawerSurface__backdrop'\n};\n/**\n * Styles for the backdrop slot\n */ const useBackdropResetStyles = makeResetStyles({\n inset: '0px',\n position: 'fixed',\n backgroundColor: 'rgba(0, 0, 0, 0.4)'\n});\nconst useBackdropStyles = makeStyles({\n nested: {\n backgroundColor: tokens.colorTransparentBackground\n }\n});\n/**\n * Apply styling to the OverlayDrawerSurface slots based on the state\n */ export const useOverlayDrawerSurfaceStyles_unstable = (state)=>{\n 'use no memo';\n const backdropResetStyles = useBackdropResetStyles();\n const backdropStyles = useBackdropStyles();\n if (state.backdrop) {\n state.backdrop.className = mergeClasses(backdropResetStyles, state.isNestedDialog && backdropStyles.nested, state.backdrop.className);\n }\n return state;\n};\n"],"names":["OverlayDrawerSurfaceClassNames","useOverlayDrawerSurfaceStyles_unstable","root","backdrop","useBackdropResetStyles","__resetStyles","useBackdropStyles","__styles","nested","De3pzq","d","state","backdropResetStyles","backdropStyles","className","mergeClasses","isNestedDialog"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,8BAA8B;eAA9BA;;IAkBIC,sCAAsC;eAAtCA;;;uBApByC;AAEnD,MAAMD,iCAAiC;IAC1CE,MAAM;IACNC,UAAU;AACd;AACA;;CAEA,GAAI,MAAMC,yBAAsB,WAAA,GAAGC,IAAAA,oBAAA,EAAA,WAAA,MAAA;IAAA;CAIlC;AACD,MAAMC,oBAAiB,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAC,QAAA;QAAAC,QAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;KAAA;AAAA;AAOf,MAAMT,yCAA0CU,CAAAA;IACvD;IACA,MAAMC,sBAAsBR;IAC5B,MAAMS,iBAAiBP;IACvB,IAAIK,MAAMR,QAAQ,EAAE;QAChBQ,MAAMR,QAAQ,CAACW,SAAS,GAAGC,IAAAA,mBAAY,EAACH,qBAAqBD,MAAMK,cAAc,IAAIH,eAAeL,MAAM,EAAEG,MAAMR,QAAQ,CAACW,SAAS;IACxI;IACA,OAAOH;AACX"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './OverlayDrawer';\nexport * from './OverlayDrawer.types';\nexport * from './renderOverlayDrawer';\nexport * from './useOverlayDrawer';\nexport * from './useOverlayDrawerStyles.styles';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './OverlayDrawer';\nexport * from './OverlayDrawer.types';\nexport * from './renderOverlayDrawer';\nexport * from './useOverlayDrawer';\nexport * from './useOverlayDrawerStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["renderOverlayDrawer.js"],"sourcesContent":[" import { jsx as _jsx } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { DrawerProvider } from '../../contexts/drawerContext';\n/**\n * Render the final JSX of OverlayDrawer\n */ export const renderOverlayDrawer_unstable = (state, contextValue)=>{\n if (!state.motion.canRender) {\n return null;\n }\n assertSlots(state);\n return /*#__PURE__*/ _jsx(DrawerProvider, {\n value: contextValue,\n children: /*#__PURE__*/ _jsx(state.dialog, {\n children: /*#__PURE__*/ _jsx(state.root, {})\n })\n });\n};\n"],"names":["renderOverlayDrawer_unstable","state","contextValue","motion","canRender","assertSlots","_jsx","DrawerProvider","value","children","dialog","root"],"mappings":";;;;+BAKiBA;;;eAAAA;;;4BALa;gCACF;+BACG;AAGpB,MAAMA,+BAA+B,CAACC,OAAOC;IACpD,IAAI,CAACD,MAAME,MAAM,CAACC,SAAS,EAAE;QACzB,OAAO;IACX;IACAC,IAAAA,2BAAW,EAACJ;IACZ,OAAO,WAAW,GAAGK,IAAAA,eAAI,EAACC,6BAAc,EAAE;QACtCC,OAAON;QACPO,UAAU,WAAW,GAAGH,IAAAA,eAAI,EAACL,MAAMS,MAAM,EAAE;YACvCD,UAAU,WAAW,GAAGH,IAAAA,eAAI,EAACL,MAAMU,IAAI,EAAE,CAAC;QAC9C;IACJ;AACJ"}
1
+ {"version":3,"sources":["renderOverlayDrawer.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { DrawerContextValue, DrawerProvider } from '../../contexts/drawerContext';\n\nimport type { OverlayDrawerState, OverlayDrawerInternalSlots } from './OverlayDrawer.types';\n\n/**\n * Render the final JSX of OverlayDrawer\n */\nexport const renderOverlayDrawer_unstable = (state: OverlayDrawerState, contextValue: DrawerContextValue) => {\n if (!state.motion.canRender) {\n return null;\n }\n\n assertSlots<OverlayDrawerInternalSlots>(state);\n\n return (\n <DrawerProvider value={contextValue}>\n <state.dialog>\n <state.root />\n </state.dialog>\n </DrawerProvider>\n );\n};\n"],"names":["renderOverlayDrawer_unstable","state","contextValue","motion","canRender","assertSlots","_jsx","DrawerProvider","value","dialog","root"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAUaA;;;eAAAA;;;4BATb;gCAC4B;+BACuB;AAO5C,MAAMA,+BAA+B,CAACC,OAA2BC;IACtE,IAAI,CAACD,MAAME,MAAM,CAACC,SAAS,EAAE;QAC3B,OAAO;IACT;IAEAC,IAAAA,2BAAAA,EAAwCJ;IAExC,OAAA,WAAA,GACEK,IAAAA,eAAA,EAACC,6BAAAA,EAAAA;QAAeC,OAAON;kBACrB,WAAA,GAAAI,IAAAA,eAAA,EAACL,MAAMQ,MAAM,EAAA;sBACX,WAAA,GAAAH,IAAAA,eAAA,EAACL,MAAMS,IAAI,EAAA,CAAA;;;AAInB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useOverlayDrawer.js"],"sourcesContent":["import * as React from 'react';\nimport { slot, useMergedRefs } from '@fluentui/react-utilities';\nimport { useMotion } from '@fluentui/react-motion-preview';\nimport { useDrawerDefaultProps } from '../../shared/useDrawerDefaultProps';\nimport { OverlayDrawerDialog } from './OverlayDrawerDialog';\nimport { OverlayDrawerSurface } from './OverlayDrawerSurface';\n/**\n * Create the state required to render OverlayDrawer.\n *\n * The returned state can be modified with hooks such as useOverlayDrawerStyles_unstable,\n * before being passed to renderOverlayDrawer_unstable.\n *\n * @param props - props from this instance of OverlayDrawer\n * @param ref - reference to root HTMLElement of OverlayDrawer\n */ export const useOverlayDrawer_unstable = (props, ref)=>{\n const { open, size, position } = useDrawerDefaultProps(props);\n const { modalType = 'modal', inertTrapFocus, onOpenChange } = props;\n const motion = useMotion(open);\n const backdropProps = slot.resolveShorthand(props.backdrop);\n const hasCustomBackdrop = modalType !== 'non-modal' && backdropProps !== null;\n const root = slot.always({\n ...props,\n ref: useMergedRefs(ref, motion.ref),\n backdrop: hasCustomBackdrop ? {\n ...backdropProps\n } : null\n }, {\n /**\n * Drawer accepts a `div` or `aside` element type, but Dialog only accepts a `div` element type.\n * We need to cast the ref to a `div` element type to not break Dialog's ref type.\n */ elementType: OverlayDrawerSurface\n });\n const dialog = slot.always({\n open,\n onOpenChange,\n inertTrapFocus,\n modalType,\n /**\n * children is not needed here because we construct the children in the render function,\n * but it's required by DialogProps\n */ children: null\n }, {\n elementType: OverlayDrawerDialog\n });\n return {\n components: {\n root: OverlayDrawerSurface,\n dialog: OverlayDrawerDialog\n },\n root,\n dialog,\n size,\n position,\n motion\n };\n};\n"],"names":["useOverlayDrawer_unstable","props","ref","open","size","position","useDrawerDefaultProps","modalType","inertTrapFocus","onOpenChange","motion","useMotion","backdropProps","slot","resolveShorthand","backdrop","hasCustomBackdrop","root","always","useMergedRefs","elementType","OverlayDrawerSurface","dialog","children","OverlayDrawerDialog","components"],"mappings":";;;;+BAciBA;;;eAAAA;;;;iEAdM;gCACa;oCACV;uCACY;qCACF;sCACC;AAS1B,MAAMA,4BAA4B,CAACC,OAAOC;IACjD,MAAM,EAAEC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,EAAE,GAAGC,IAAAA,4CAAqB,EAACL;IACvD,MAAM,EAAEM,YAAY,OAAO,EAAEC,cAAc,EAAEC,YAAY,EAAE,GAAGR;IAC9D,MAAMS,SAASC,IAAAA,6BAAS,EAACR;IACzB,MAAMS,gBAAgBC,oBAAI,CAACC,gBAAgB,CAACb,MAAMc,QAAQ;IAC1D,MAAMC,oBAAoBT,cAAc,eAAeK,kBAAkB;IACzE,MAAMK,OAAOJ,oBAAI,CAACK,MAAM,CAAC;QACrB,GAAGjB,KAAK;QACRC,KAAKiB,IAAAA,6BAAa,EAACjB,KAAKQ,OAAOR,GAAG;QAClCa,UAAUC,oBAAoB;YAC1B,GAAGJ,aAAa;QACpB,IAAI;IACR,GAAG;QACC;;;OAGD,GAAGQ,aAAaC,0CAAoB;IACvC;IACA,MAAMC,SAAST,oBAAI,CAACK,MAAM,CAAC;QACvBf;QACAM;QACAD;QACAD;QACA;;;OAGD,GAAGgB,UAAU;IAChB,GAAG;QACCH,aAAaI,wCAAmB;IACpC;IACA,OAAO;QACHC,YAAY;YACRR,MAAMI,0CAAoB;YAC1BC,QAAQE,wCAAmB;QAC/B;QACAP;QACAK;QACAlB;QACAC;QACAK;IACJ;AACJ"}
1
+ {"version":3,"sources":["useOverlayDrawer.ts"],"sourcesContent":["import * as React from 'react';\nimport { slot, useMergedRefs } from '@fluentui/react-utilities';\nimport { useMotion } from '@fluentui/react-motion-preview';\n\nimport { useDrawerDefaultProps } from '../../shared/useDrawerDefaultProps';\nimport type { OverlayDrawerProps, OverlayDrawerState } from './OverlayDrawer.types';\nimport { OverlayDrawerDialog } from './OverlayDrawerDialog';\nimport { OverlayDrawerSurface } from './OverlayDrawerSurface';\n\n/**\n * Create the state required to render OverlayDrawer.\n *\n * The returned state can be modified with hooks such as useOverlayDrawerStyles_unstable,\n * before being passed to renderOverlayDrawer_unstable.\n *\n * @param props - props from this instance of OverlayDrawer\n * @param ref - reference to root HTMLElement of OverlayDrawer\n */\nexport const useOverlayDrawer_unstable = (\n props: OverlayDrawerProps,\n ref: React.Ref<HTMLElement>,\n): OverlayDrawerState => {\n const { open, size, position } = useDrawerDefaultProps(props);\n const { modalType = 'modal', inertTrapFocus, onOpenChange } = props;\n\n const motion = useMotion<HTMLElement>(open);\n\n const backdropProps = slot.resolveShorthand(props.backdrop);\n const hasCustomBackdrop = modalType !== 'non-modal' && backdropProps !== null;\n\n const root = slot.always(\n {\n ...props,\n ref: useMergedRefs(ref, motion.ref),\n backdrop: hasCustomBackdrop ? { ...backdropProps } : null,\n },\n {\n /**\n * Drawer accepts a `div` or `aside` element type, but Dialog only accepts a `div` element type.\n * We need to cast the ref to a `div` element type to not break Dialog's ref type.\n */\n elementType: OverlayDrawerSurface as unknown as 'div',\n },\n );\n\n const dialog = slot.always(\n {\n open,\n onOpenChange,\n inertTrapFocus,\n modalType,\n /**\n * children is not needed here because we construct the children in the render function,\n * but it's required by DialogProps\n */\n children: null as unknown as JSX.Element,\n },\n {\n elementType: OverlayDrawerDialog,\n },\n );\n\n return {\n components: {\n root: OverlayDrawerSurface,\n dialog: OverlayDrawerDialog,\n },\n\n root,\n dialog,\n\n size,\n position,\n motion,\n };\n};\n"],"names":["useOverlayDrawer_unstable","props","ref","open","size","position","useDrawerDefaultProps","modalType","inertTrapFocus","onOpenChange","motion","useMotion","backdropProps","slot","resolveShorthand","backdrop","hasCustomBackdrop","root","always","useMergedRefs","elementType","OverlayDrawerSurface","dialog","children","OverlayDrawerDialog","components"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAkBaA;;;eAAAA;;;;iEAlBU;gCACa;oCACV;uCAEY;qCAEF;sCACC;AAW9B,MAAMA,4BAA4B,CACvCC,OACAC;IAEA,MAAM,EAAEC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,EAAE,GAAGC,IAAAA,4CAAAA,EAAsBL;IACvD,MAAM,EAAEM,YAAY,OAAO,EAAEC,cAAc,EAAEC,YAAY,EAAE,GAAGR;IAE9D,MAAMS,SAASC,IAAAA,6BAAAA,EAAuBR;IAEtC,MAAMS,gBAAgBC,oBAAAA,CAAKC,gBAAgB,CAACb,MAAMc,QAAQ;IAC1D,MAAMC,oBAAoBT,cAAc,eAAeK,kBAAkB;IAEzE,MAAMK,OAAOJ,oBAAAA,CAAKK,MAAM,CACtB;QACE,GAAGjB,KAAK;QACRC,KAAKiB,IAAAA,6BAAAA,EAAcjB,KAAKQ,OAAOR,GAAG;QAClCa,UAAUC,oBAAoB;YAAE,GAAGJ,aAAa;QAAC,IAAI;IACvD,GACA;QACE;;;OAGC,GACDQ,aAAaC,0CAAAA;IACf;IAGF,MAAMC,SAAST,oBAAAA,CAAKK,MAAM,CACxB;QACEf;QACAM;QACAD;QACAD;QACA;;;OAGC,GACDgB,UAAU;IACZ,GACA;QACEH,aAAaI,wCAAAA;IACf;IAGF,OAAO;QACLC,YAAY;YACVR,MAAMI,0CAAAA;YACNC,QAAQE,wCAAAA;QACV;QAEAP;QACAK;QAEAlB;QACAC;QACAK;IACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useOverlayDrawerStyles.styles.js"],"sourcesContent":["import * as React from 'react';\nimport { __resetStyles, __styles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { drawerCSSVars, drawerDefaultStyles, useDrawerBaseClassNames, useDrawerDurationStyles } from '../../shared/useDrawerBaseStyles.styles';\nimport { useMotionClassNames } from '@fluentui/react-motion-preview';\nexport const overlayDrawerClassNames = {\n root: 'fui-OverlayDrawer',\n backdrop: 'fui-OverlayDrawer__backdrop'\n};\n/**\n * Styles for the root slot\n */\nconst useDrawerResetStyles = /*#__PURE__*/__resetStyles(\"r7dfyj8\", \"rmx02j7\", {\n r: [\".r7dfyj8{overflow:hidden;width:var(--fui-Drawer--size);max-width:100vw;height:auto;max-height:100vh;box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;background-color:var(--colorNeutralBackground1);color:var(--colorNeutralForeground1);position:fixed;top:0;bottom:0;}\", \".r7dfyj8:focus{outline-style:none;}\", \".r7dfyj8:focus-visible{outline-style:none;}\", \".r7dfyj8[data-fui-focus-visible]{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}\", \".r7dfyj8[data-fui-focus-visible]::after{content:\\\"\\\";position:absolute;pointer-events:none;z-index:1;border:2px solid var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);top:calc(2px * -1);right:calc(2px * -1);bottom:calc(2px * -1);left:calc(2px * -1);}\", \".rmx02j7{overflow:hidden;width:var(--fui-Drawer--size);max-width:100vw;height:auto;max-height:100vh;box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;background-color:var(--colorNeutralBackground1);color:var(--colorNeutralForeground1);position:fixed;top:0;bottom:0;}\", \".rmx02j7:focus{outline-style:none;}\", \".rmx02j7:focus-visible{outline-style:none;}\", \".rmx02j7[data-fui-focus-visible]{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}\", \".rmx02j7[data-fui-focus-visible]::after{content:\\\"\\\";position:absolute;pointer-events:none;z-index:1;border:2px solid var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);top:calc(2px * -1);left:calc(2px * -1);bottom:calc(2px * -1);right:calc(2px * -1);}\"],\n s: [\"@media (forced-colors: active){.r7dfyj8[data-fui-focus-visible]::after{border-top-color:Highlight;border-right-color:Highlight;border-bottom-color:Highlight;border-left-color:Highlight;}}\", \"@media (forced-colors: active){.rmx02j7[data-fui-focus-visible]::after{border-top-color:Highlight;border-left-color:Highlight;border-bottom-color:Highlight;border-right-color:Highlight;}}\"]\n});\nconst useDrawerRootStyles = /*#__PURE__*/__styles({\n start: {\n Bz10aip: \"f1d8gkik\"\n },\n end: {\n Bz10aip: \"f1g0pcr8\"\n },\n bottom: {\n Bz10aip: \"fip488n\",\n Bhzewxz: \"f198g47y\",\n Bqenvij: \"fub80nq\",\n a9b677: \"fr97h3j\"\n }\n}, {\n d: [\".f1d8gkik{transform:translate3D(calc(var(--fui-Drawer--size) * -1), 0, 0);}\", \".f1g0pcr8{transform:translate3D(calc(var(--fui-Drawer--size) * 1), 0, 0);}\", \".fip488n{transform:translate3D(0, calc(var(--fui-Drawer--size) * 1), 0);}\", \".f198g47y{top:auto;}\", \".fub80nq{height:var(--fui-Drawer--size);}\", \".fr97h3j{width:100vw;}\"]\n});\nconst useDrawerMotionStyles = /*#__PURE__*/__styles({\n \"default\": {\n abs64n: \"fk73vx1\",\n E5pizo: \"ff88big\",\n Bmy1vo4: \"f1neo61\",\n Es3by: \"f1ytgekk\"\n },\n enter: {\n abs64n: \"f5p0z4x\",\n Bz10aip: \"f87uvqx\",\n E5pizo: \"f10nrhrw\"\n }\n}, {\n d: [\".fk73vx1{opacity:0;}\", \".ff88big{box-shadow:0px var(--colorTransparentBackground);}\", \".f1neo61{transition-property:transform,box-shadow,opacity;}\", \".f1ytgekk{will-change:transform,box-shadow,opacity;}\", \".f5p0z4x{opacity:1;}\", \".f87uvqx{transform:translate3D(0, 0, 0);}\", \".f10nrhrw{box-shadow:var(--shadow64);}\"]\n});\n/**\n * Styles for the backdrop slot\n */\nconst useBackdropMotionStyles = /*#__PURE__*/__styles({\n \"default\": {\n abs64n: \"fk73vx1\",\n Bmy1vo4: \"f13u1uyl\",\n Bkqvd7p: \"f17wnm97\",\n Es3by: \"f1gqqdtu\"\n },\n enter: {\n abs64n: \"f5p0z4x\"\n }\n}, {\n d: [\".fk73vx1{opacity:0;}\", \".f13u1uyl{transition-property:opacity;}\", \".f17wnm97{transition-timing-function:var(--curveEasyEase);}\", \".f1gqqdtu{will-change:opacity;}\", \".f5p0z4x{opacity:1;}\"]\n});\n/**\n * Apply styling to the OverlayDrawer slots based on the state\n */\nexport const useOverlayDrawerStyles_unstable = state => {\n 'use no memo';\n\n const baseClassNames = useDrawerBaseClassNames(state);\n const resetStyles = useDrawerResetStyles();\n const rootStyles = useDrawerRootStyles();\n const durationStyles = useDrawerDurationStyles();\n const drawerMotionClassNames = useMotionClassNames(state.motion, useDrawerMotionStyles());\n const backdropMotionClassNames = useMotionClassNames(state.motion, useBackdropMotionStyles());\n const backdrop = state.root.backdrop;\n state.root.className = mergeClasses(overlayDrawerClassNames.root, baseClassNames, resetStyles, rootStyles[state.position], drawerMotionClassNames, state.root.className);\n if (backdrop) {\n backdrop.className = mergeClasses(overlayDrawerClassNames.backdrop, backdropMotionClassNames, durationStyles[state.size], backdrop.className);\n }\n return state;\n};\n//# sourceMappingURL=useOverlayDrawerStyles.styles.js.map"],"names":["overlayDrawerClassNames","useOverlayDrawerStyles_unstable","root","backdrop","useDrawerResetStyles","__resetStyles","r","s","useDrawerRootStyles","__styles","start","Bz10aip","end","bottom","Bhzewxz","Bqenvij","a9b677","d","useDrawerMotionStyles","abs64n","E5pizo","Bmy1vo4","Es3by","enter","useBackdropMotionStyles","Bkqvd7p","state","baseClassNames","useDrawerBaseClassNames","resetStyles","rootStyles","durationStyles","useDrawerDurationStyles","drawerMotionClassNames","useMotionClassNames","motion","backdropMotionClassNames","className","mergeClasses","position","size"],"mappings":";;;;;;;;;;;IAMaA,uBAAuB;eAAvBA;;IA6DAC,+BAA+B;eAA/BA;;;;iEAnEU;wBAC+B;2CAG+C;oCACjE;AAC7B,MAAMD,0BAA0B;IACrCE,MAAM;IACNC,UAAU;AACZ;AACA;;CAEC,GACD,MAAMC,uBAAuB,WAAW,GAAEC,IAAAA,qBAAa,EAAC,WAAW,WAAW;IAC5EC,GAAG;QAAC;QAAuU;QAAuC;QAA+C;QAAgK;QAA8Q;QAAuU;QAAuC;QAA+C;QAAgK;KAA6Q;IACzpDC,GAAG;QAAC;QAA+L;KAA8L;AACnY;AACA,MAAMC,sBAAsB,WAAW,GAAEC,IAAAA,gBAAQ,EAAC;IAChDC,OAAO;QACLC,SAAS;IACX;IACAC,KAAK;QACHD,SAAS;IACX;IACAE,QAAQ;QACNF,SAAS;QACTG,SAAS;QACTC,SAAS;QACTC,QAAQ;IACV;AACF,GAAG;IACDC,GAAG;QAAC;QAA+E;QAA8E;QAA6E;QAAwB;QAA6C;KAAyB;AAC9U;AACA,MAAMC,wBAAwB,WAAW,GAAET,IAAAA,gBAAQ,EAAC;IAClD,WAAW;QACTU,QAAQ;QACRC,QAAQ;QACRC,SAAS;QACTC,OAAO;IACT;IACAC,OAAO;QACLJ,QAAQ;QACRR,SAAS;QACTS,QAAQ;IACV;AACF,GAAG;IACDH,GAAG;QAAC;QAAwB;QAA+D;QAA+D;QAAwD;QAAwB;QAA6C;KAAyC;AAClU;AACA;;CAEC,GACD,MAAMO,0BAA0B,WAAW,GAAEf,IAAAA,gBAAQ,EAAC;IACpD,WAAW;QACTU,QAAQ;QACRE,SAAS;QACTI,SAAS;QACTH,OAAO;IACT;IACAC,OAAO;QACLJ,QAAQ;IACV;AACF,GAAG;IACDF,GAAG;QAAC;QAAwB;QAA2C;QAA+D;QAAmC;KAAuB;AAClM;AAIO,MAAMhB,kCAAkCyB,CAAAA;IAC7C;IAEA,MAAMC,iBAAiBC,IAAAA,kDAAuB,EAACF;IAC/C,MAAMG,cAAczB;IACpB,MAAM0B,aAAatB;IACnB,MAAMuB,iBAAiBC,IAAAA,kDAAuB;IAC9C,MAAMC,yBAAyBC,IAAAA,uCAAmB,EAACR,MAAMS,MAAM,EAAEjB;IACjE,MAAMkB,2BAA2BF,IAAAA,uCAAmB,EAACR,MAAMS,MAAM,EAAEX;IACnE,MAAMrB,WAAWuB,MAAMxB,IAAI,CAACC,QAAQ;IACpCuB,MAAMxB,IAAI,CAACmC,SAAS,GAAGC,IAAAA,oBAAY,EAACtC,wBAAwBE,IAAI,EAAEyB,gBAAgBE,aAAaC,UAAU,CAACJ,MAAMa,QAAQ,CAAC,EAAEN,wBAAwBP,MAAMxB,IAAI,CAACmC,SAAS;IACvK,IAAIlC,UAAU;QACZA,SAASkC,SAAS,GAAGC,IAAAA,oBAAY,EAACtC,wBAAwBG,QAAQ,EAAEiC,0BAA0BL,cAAc,CAACL,MAAMc,IAAI,CAAC,EAAErC,SAASkC,SAAS;IAC9I;IACA,OAAOX;AACT,GACA,yDAAyD"}
1
+ {"version":3,"sources":["useOverlayDrawerStyles.styles.js"],"sourcesContent":["import * as React from 'react';\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { drawerCSSVars, drawerDefaultStyles, useDrawerBaseClassNames, useDrawerDurationStyles } from '../../shared/useDrawerBaseStyles.styles';\nimport { useMotionClassNames } from '@fluentui/react-motion-preview';\nexport const overlayDrawerClassNames = {\n root: 'fui-OverlayDrawer',\n backdrop: 'fui-OverlayDrawer__backdrop'\n};\n/**\n * Styles for the root slot\n */ const useDrawerResetStyles = makeResetStyles({\n ...createFocusOutlineStyle(),\n ...drawerDefaultStyles,\n position: 'fixed',\n top: 0,\n bottom: 0\n});\nconst useDrawerRootStyles = makeStyles({\n /* Positioning */ start: {\n transform: `translate3D(calc(var(${drawerCSSVars.drawerSizeVar}) * -1), 0, 0)`\n },\n end: {\n transform: `translate3D(calc(var(${drawerCSSVars.drawerSizeVar}) * 1), 0, 0)`\n },\n bottom: {\n transform: `translate3D(0, calc(var(${drawerCSSVars.drawerSizeVar}) * 1), 0)`,\n top: 'auto',\n height: `var(${drawerCSSVars.drawerSizeVar})`,\n width: '100vw'\n }\n});\nconst useDrawerMotionStyles = makeStyles({\n default: {\n opacity: 0,\n boxShadow: `0px ${tokens.colorTransparentBackground}`,\n transitionProperty: 'transform, box-shadow, opacity',\n willChange: 'transform, box-shadow, opacity'\n },\n enter: {\n opacity: 1,\n transform: 'translate3D(0, 0, 0)',\n boxShadow: tokens.shadow64\n }\n});\n/**\n * Styles for the backdrop slot\n */ const useBackdropMotionStyles = makeStyles({\n default: {\n opacity: 0,\n transitionProperty: 'opacity',\n transitionTimingFunction: tokens.curveEasyEase,\n willChange: 'opacity'\n },\n enter: {\n opacity: 1\n }\n});\n/**\n * Apply styling to the OverlayDrawer slots based on the state\n */ export const useOverlayDrawerStyles_unstable = (state)=>{\n 'use no memo';\n const baseClassNames = useDrawerBaseClassNames(state);\n const resetStyles = useDrawerResetStyles();\n const rootStyles = useDrawerRootStyles();\n const durationStyles = useDrawerDurationStyles();\n const drawerMotionClassNames = useMotionClassNames(state.motion, useDrawerMotionStyles());\n const backdropMotionClassNames = useMotionClassNames(state.motion, useBackdropMotionStyles());\n const backdrop = state.root.backdrop;\n state.root.className = mergeClasses(overlayDrawerClassNames.root, baseClassNames, resetStyles, rootStyles[state.position], drawerMotionClassNames, state.root.className);\n if (backdrop) {\n backdrop.className = mergeClasses(overlayDrawerClassNames.backdrop, backdropMotionClassNames, durationStyles[state.size], backdrop.className);\n }\n return state;\n};\n"],"names":["overlayDrawerClassNames","useOverlayDrawerStyles_unstable","root","backdrop","useDrawerResetStyles","__resetStyles","r","s","useDrawerRootStyles","__styles","start","Bz10aip","end","bottom","Bhzewxz","Bqenvij","a9b677","d","useDrawerMotionStyles","abs64n","E5pizo","Bmy1vo4","Es3by","enter","useBackdropMotionStyles","Bkqvd7p","state","baseClassNames","useDrawerBaseClassNames","resetStyles","rootStyles","durationStyles","useDrawerDurationStyles","drawerMotionClassNames","useMotionClassNames","motion","backdropMotionClassNames","className","mergeClasses","position","size"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAMaA,uBAAuB;eAAvBA;;IAuDIC,+BAA+B;eAA/BA;;;;iEA7DM;wBACmC;2CAG2C;oCACjE;AAC7B,MAAMD,0BAA0B;IACnCE,MAAM;IACNC,UAAU;AACd;AACA;;CAEA,GAAI,MAAMC,uBAAoB,WAAA,GAAGC,IAAAA,qBAAA,EAAA,WAAA,WAAA;IAAAC,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;IAAAC,GAAA;QAAA;QAAA;KAAA;AAAA;AAOjC,MAAMC,sBAAmB,WAAA,GAAGC,IAAAA,gBAAA,EAAA;IAAAC,OAAA;QAAAC,SAAA;IAAA;IAAAC,KAAA;QAAAD,SAAA;IAAA;IAAAE,QAAA;QAAAF,SAAA;QAAAG,SAAA;QAAAC,SAAA;QAAAC,QAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA;AAc5B,MAAMC,wBAAqB,WAAA,GAAGT,IAAAA,gBAAA,EAAA;IAAA,WAAA;QAAAU,QAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,OAAA;IAAA;IAAAC,OAAA;QAAAJ,QAAA;QAAAR,SAAA;QAAAS,QAAA;IAAA;AAAA,GAAA;IAAAH,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA;AAa9B;;CAEA,GAAI,MAAMO,0BAAuB,WAAA,GAAGf,IAAAA,gBAAA,EAAA;IAAA,WAAA;QAAAU,QAAA;QAAAE,SAAA;QAAAI,SAAA;QAAAH,OAAA;IAAA;IAAAC,OAAA;QAAAJ,QAAA;IAAA;AAAA,GAAA;IAAAF,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA;AAazB,MAAMhB,kCAAmCyB,CAAAA;IAChD;IACA,MAAMC,iBAAiBC,IAAAA,kDAAuB,EAACF;IAC/C,MAAMG,cAAczB;IACpB,MAAM0B,aAAatB;IACnB,MAAMuB,iBAAiBC,IAAAA,kDAAuB;IAC9C,MAAMC,yBAAyBC,IAAAA,uCAAmB,EAACR,MAAMS,MAAM,EAAEjB;IACjE,MAAMkB,2BAA2BF,IAAAA,uCAAmB,EAACR,MAAMS,MAAM,EAAEX;IACnE,MAAMrB,WAAWuB,MAAMxB,IAAI,CAACC,QAAQ;IACpCuB,MAAMxB,IAAI,CAACmC,SAAS,GAAGC,IAAAA,oBAAY,EAACtC,wBAAwBE,IAAI,EAAEyB,gBAAgBE,aAAaC,UAAU,CAACJ,MAAMa,QAAQ,CAAC,EAAEN,wBAAwBP,MAAMxB,IAAI,CAACmC,SAAS;IACvK,IAAIlC,UAAU;QACVA,SAASkC,SAAS,GAAGC,IAAAA,oBAAY,EAACtC,wBAAwBG,QAAQ,EAAEiC,0BAA0BL,cAAc,CAACL,MAAMc,IAAI,CAAC,EAAErC,SAASkC,SAAS;IAChJ;IACA,OAAOX;AACX"}
@@ -9,17 +9,17 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- drawerContext: function() {
13
- return drawerContext;
14
- },
15
12
  DrawerProvider: function() {
16
13
  return DrawerProvider;
17
14
  },
18
- useDrawerContext_unstable: function() {
19
- return useDrawerContext_unstable;
15
+ drawerContext: function() {
16
+ return drawerContext;
20
17
  },
21
18
  useDrawerContextValue: function() {
22
19
  return useDrawerContextValue;
20
+ },
21
+ useDrawerContext_unstable: function() {
22
+ return useDrawerContext_unstable;
23
23
  }
24
24
  });
25
25
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
@@ -1 +1 @@
1
- {"version":3,"sources":["drawerContext.js"],"sourcesContent":["import * as React from 'react';\nconst defaultContextValue = {\n scrollState: 'none',\n setScrollState: ()=>({})\n};\nexport const drawerContext = React.createContext(undefined);\nexport const DrawerProvider = drawerContext.Provider;\nexport const useDrawerContext_unstable = ()=>{\n var _React_useContext;\n return (_React_useContext = React.useContext(drawerContext)) !== null && _React_useContext !== void 0 ? _React_useContext : defaultContextValue;\n};\nexport const useDrawerContextValue = ()=>{\n const [scrollState, setScrollState] = React.useState('none');\n return {\n setScrollState,\n scrollState\n };\n};\n"],"names":["drawerContext","DrawerProvider","useDrawerContext_unstable","useDrawerContextValue","defaultContextValue","scrollState","setScrollState","React","createContext","undefined","Provider","_React_useContext","useContext","useState"],"mappings":";;;;;;;;;;;IAKaA,aAAa;eAAbA;;IACAC,cAAc;eAAdA;;IACAC,yBAAyB;eAAzBA;;IAIAC,qBAAqB;eAArBA;;;;iEAXU;AACvB,MAAMC,sBAAsB;IACxBC,aAAa;IACbC,gBAAgB,IAAK,CAAA,CAAC,CAAA;AAC1B;AACO,MAAMN,8BAAgBO,OAAMC,aAAa,CAACC;AAC1C,MAAMR,iBAAiBD,cAAcU,QAAQ;AAC7C,MAAMR,4BAA4B;IACrC,IAAIS;IACJ,OAAO,AAACA,CAAAA,oBAAoBJ,OAAMK,UAAU,CAACZ,cAAa,MAAO,QAAQW,sBAAsB,KAAK,IAAIA,oBAAoBP;AAChI;AACO,MAAMD,wBAAwB;IACjC,MAAM,CAACE,aAAaC,eAAe,GAAGC,OAAMM,QAAQ,CAAC;IACrD,OAAO;QACHP;QACAD;IACJ;AACJ"}
1
+ {"version":3,"sources":["drawerContext.ts"],"sourcesContent":["import * as React from 'react';\n\nimport { DrawerScrollState } from '../shared/DrawerBase.types';\n\nexport type DrawerContextValue = {\n scrollState: DrawerScrollState;\n setScrollState: (scrollState: DrawerScrollState) => void;\n};\n\nconst defaultContextValue: DrawerContextValue = {\n scrollState: 'none',\n setScrollState: () => ({}),\n};\n\nexport const drawerContext = React.createContext<DrawerContextValue | undefined>(undefined);\nexport const DrawerProvider = drawerContext.Provider;\nexport const useDrawerContext_unstable = () => React.useContext(drawerContext) ?? defaultContextValue;\n\nexport const useDrawerContextValue = (): DrawerContextValue => {\n const [scrollState, setScrollState] = React.useState<DrawerScrollState>('none');\n\n return {\n setScrollState,\n scrollState,\n };\n};\n"],"names":["DrawerProvider","drawerContext","useDrawerContextValue","useDrawerContext_unstable","defaultContextValue","scrollState","setScrollState","React","createContext","undefined","Provider","useContext","useState"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAeaA,cAAAA;eAAAA;;IADAC,aAAAA;eAAAA;;IAIAC,qBAAAA;eAAAA;;IAFAC,yBAAAA;eAAAA;;;;iEAhBU;AASvB,MAAMC,sBAA0C;IAC9CC,aAAa;IACbC,gBAAgB,IAAO,CAAA,CAAC,CAAA;AAC1B;AAEO,MAAML,8BAAgBM,OAAMC,aAAa,CAAiCC;AAC1E,MAAMT,iBAAiBC,cAAcS,QAAQ;AAC7C,MAAMP,4BAA4B;QAAMI;WAAAA,CAAAA,oBAAAA,OAAMI,UAAU,CAACV,cAAAA,MAAAA,QAAjBM,sBAAAA,KAAAA,IAAAA,oBAAmCH;AAAkB;AAE7F,MAAMF,wBAAwB;IACnC,MAAM,CAACG,aAAaC,eAAe,GAAGC,OAAMK,QAAQ,CAAoB;IAExE,OAAO;QACLN;QACAD;IACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './drawerContext';\n"],"names":[],"mappings":";;;;;uBAAc"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './drawerContext';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
@@ -1 +1 @@
1
- {"version":3,"sources":["DrawerShared.js"],"sourcesContent":["import * as React from 'react';\nimport { mount } from '@cypress/react';\nimport { FluentProvider } from '@fluentui/react-provider';\nimport { webLightTheme } from '@fluentui/react-theme';\nconst mountFluent = (element)=>{\n mount(/*#__PURE__*/ React.createElement(FluentProvider, {\n theme: webLightTheme\n }, element));\n};\nexport function testDrawerBaseScenarios(Component) {\n describe('basic functionality', ()=>{\n it('should not render any element when closed', ()=>{\n mountFluent(/*#__PURE__*/ React.createElement(Component, {\n id: \"drawer\"\n }));\n cy.get('#drawer').should('not.exist');\n });\n it('should render an element when opened', ()=>{\n mountFluent(/*#__PURE__*/ React.createElement(Component, {\n id: \"drawer\",\n open: true\n }));\n cy.get('#drawer').should('exist');\n });\n it('should render children content', ()=>{\n const content = 'Test the renderization';\n mountFluent(/*#__PURE__*/ React.createElement(Component, {\n id: \"drawer\",\n open: true\n }, content));\n cy.get('#drawer').contains(content);\n });\n it('should toggle visibility on open prop change', ()=>{\n const ExampleDrawer = ()=>{\n const [open, setOpen] = React.useState(false);\n return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(Component, {\n id: \"drawer\",\n open: open\n }), /*#__PURE__*/ React.createElement(\"button\", {\n id: \"button\",\n onClick: ()=>setOpen(true)\n }, \"Open\"));\n };\n mountFluent(/*#__PURE__*/ React.createElement(ExampleDrawer, null));\n cy.get('#drawer').should('not.exist');\n cy.get('#button').click();\n cy.get('#drawer').should('exist');\n });\n });\n describe('size prop', ()=>{\n const sizes = {\n small: 320,\n medium: 592,\n large: 940,\n full: 1000\n };\n Object.entries(sizes).forEach(([size, width])=>{\n const sizeProp = size;\n it(`should have correct size when size is ${size}`, ()=>{\n mountFluent(/*#__PURE__*/ React.createElement(Component, {\n size: sizeProp,\n id: \"drawer\",\n open: true\n }));\n cy.viewport(1000, 1000);\n cy.get('#drawer').should('have.css', 'width', width + 'px');\n cy.get('#drawer').invoke('outerWidth').should('equal', width);\n });\n });\n it('width should not be bigger than viewport', ()=>{\n mountFluent(/*#__PURE__*/ React.createElement(Component, {\n id: \"drawer\",\n open: true\n }));\n cy.viewport(319, 319);\n cy.get('#drawer').should('have.css', 'width', '319px');\n cy.get('#drawer').invoke('outerWidth').should('equal', 319);\n });\n it('should have custom size', ()=>{\n mountFluent(/*#__PURE__*/ React.createElement(Component, {\n id: \"drawer\",\n open: true,\n style: {\n width: '200px'\n }\n }));\n cy.get('#drawer').should('have.css', 'width', '200px');\n cy.get('#drawer').invoke('outerWidth').should('equal', 200);\n });\n });\n describe('position prop', ()=>{\n const positions = {\n start: 'left',\n end: 'right',\n bottom: 'bottom'\n };\n Object.entries(positions).forEach(([position, side])=>{\n const positionProp = position;\n it(`should have correct position when position is ${position}`, ()=>{\n mountFluent(/*#__PURE__*/ React.createElement(Component, {\n position: positionProp,\n id: \"drawer\",\n open: true\n }));\n cy.get('#drawer').should('have.css', side, '0px');\n });\n });\n });\n}\n"],"names":["testDrawerBaseScenarios","mountFluent","element","mount","React","createElement","FluentProvider","theme","webLightTheme","Component","describe","it","id","cy","get","should","open","content","contains","ExampleDrawer","setOpen","useState","Fragment","onClick","click","sizes","small","medium","large","full","Object","entries","forEach","size","width","sizeProp","viewport","invoke","style","positions","start","end","bottom","position","side","positionProp"],"mappings":"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"}
1
+ {"version":3,"sources":["DrawerShared.tsx"],"sourcesContent":["import * as React from 'react';\nimport { mount } from '@cypress/react';\nimport { FluentProvider } from '@fluentui/react-provider';\nimport { webLightTheme } from '@fluentui/react-theme';\n\nimport type { DrawerProps } from '../Drawer';\n\nconst mountFluent = (element: JSX.Element) => {\n mount(<FluentProvider theme={webLightTheme}>{element}</FluentProvider>);\n};\n\nexport function testDrawerBaseScenarios(Component: React.ComponentType<DrawerProps>) {\n describe('basic functionality', () => {\n it('should not render any element when closed', () => {\n mountFluent(<Component id=\"drawer\" />);\n\n cy.get('#drawer').should('not.exist');\n });\n\n it('should render an element when opened', () => {\n mountFluent(<Component id=\"drawer\" open />);\n\n cy.get('#drawer').should('exist');\n });\n\n it('should render children content', () => {\n const content = 'Test the renderization';\n mountFluent(\n <Component id=\"drawer\" open>\n {content}\n </Component>,\n );\n\n cy.get('#drawer').contains(content);\n });\n\n it('should toggle visibility on open prop change', () => {\n const ExampleDrawer = () => {\n const [open, setOpen] = React.useState(false);\n\n return (\n <>\n <Component id=\"drawer\" open={open} />\n <button id=\"button\" onClick={() => setOpen(true)}>\n Open\n </button>\n </>\n );\n };\n\n mountFluent(<ExampleDrawer />);\n\n cy.get('#drawer').should('not.exist');\n cy.get('#button').click();\n cy.get('#drawer').should('exist');\n });\n });\n\n describe('size prop', () => {\n const sizes = {\n small: 320,\n medium: 592,\n large: 940,\n full: 1000,\n };\n\n Object.entries(sizes).forEach(([size, width]) => {\n const sizeProp = size as DrawerProps['size'];\n\n it(`should have correct size when size is ${size}`, () => {\n mountFluent(<Component size={sizeProp} id=\"drawer\" open />);\n\n cy.viewport(1000, 1000);\n cy.get('#drawer').should('have.css', 'width', width + 'px');\n cy.get('#drawer').invoke('outerWidth').should('equal', width);\n });\n });\n\n it('width should not be bigger than viewport', () => {\n mountFluent(<Component id=\"drawer\" open />);\n\n cy.viewport(319, 319);\n cy.get('#drawer').should('have.css', 'width', '319px');\n cy.get('#drawer').invoke('outerWidth').should('equal', 319);\n });\n\n it('should have custom size', () => {\n mountFluent(<Component id=\"drawer\" open style={{ width: '200px' }} />);\n\n cy.get('#drawer').should('have.css', 'width', '200px');\n cy.get('#drawer').invoke('outerWidth').should('equal', 200);\n });\n });\n\n describe('position prop', () => {\n const positions = {\n start: 'left',\n end: 'right',\n bottom: 'bottom',\n };\n\n Object.entries(positions).forEach(([position, side]) => {\n const positionProp = position as DrawerProps['position'];\n\n it(`should have correct position when position is ${position}`, () => {\n mountFluent(<Component position={positionProp} id=\"drawer\" open />);\n\n cy.get('#drawer').should('have.css', side, '0px');\n });\n });\n });\n}\n"],"names":["testDrawerBaseScenarios","mountFluent","element","mount","React","createElement","FluentProvider","theme","webLightTheme","Component","describe","it","id","cy","get","should","open","content","contains","ExampleDrawer","setOpen","useState","Fragment","button","onClick","click","sizes","small","medium","large","full","Object","entries","forEach","size","width","sizeProp","viewport","invoke","style","positions","start","end","bottom","position","side","positionProp"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWgBA;;;eAAAA;;;;iEAXO;wBACD;+BACS;4BACD;AAI9B,MAAMC,cAAc,CAACC;IACnBC,IAAAA,aAAAA,EAAAA,WAAAA,GAAMC,OAAAC,aAAA,CAACC,6BAAAA,EAAAA;QAAeC,OAAOC,yBAAAA;OAAgBN;AAC/C;AAEO,SAASF,wBAAwBS,SAA2C;IACjFC,SAAS,uBAAuB;QAC9BC,GAAG,6CAA6C;YAC9CV,YAAAA,WAAAA,GAAYG,OAAAC,aAAA,CAACI,WAAAA;gBAAUG,IAAG;;YAE1BC,GAAGC,GAAG,CAAC,WAAWC,MAAM,CAAC;QAC3B;QAEAJ,GAAG,wCAAwC;YACzCV,YAAAA,WAAAA,GAAYG,OAAAC,aAAA,CAACI,WAAAA;gBAAUG,IAAG;gBAASI,MAAAA;;YAEnCH,GAAGC,GAAG,CAAC,WAAWC,MAAM,CAAC;QAC3B;QAEAJ,GAAG,kCAAkC;YACnC,MAAMM,UAAU;YAChBhB,YAAAA,WAAAA,GACEG,OAAAC,aAAA,CAACI,WAAAA;gBAAUG,IAAG;gBAASI,MAAAA;eACpBC;YAILJ,GAAGC,GAAG,CAAC,WAAWI,QAAQ,CAACD;QAC7B;QAEAN,GAAG,gDAAgD;YACjD,MAAMQ,gBAAgB;gBACpB,MAAM,CAACH,MAAMI,QAAQ,GAAGhB,OAAMiB,QAAQ,CAAC;gBAEvC,OAAA,WAAA,GACEjB,OAAAC,aAAA,CAAAD,OAAAkB,QAAA,EAAA,MAAA,WAAA,GACElB,OAAAC,aAAA,CAACI,WAAAA;oBAAUG,IAAG;oBAASI,MAAMA;kCAC7BZ,OAAAC,aAAA,CAACkB,UAAAA;oBAAOX,IAAG;oBAASY,SAAS,IAAMJ,QAAQ;mBAAO;YAKxD;YAEAnB,YAAAA,WAAAA,GAAYG,OAAAC,aAAA,CAACc,eAAAA;YAEbN,GAAGC,GAAG,CAAC,WAAWC,MAAM,CAAC;YACzBF,GAAGC,GAAG,CAAC,WAAWW,KAAK;YACvBZ,GAAGC,GAAG,CAAC,WAAWC,MAAM,CAAC;QAC3B;IACF;IAEAL,SAAS,aAAa;QACpB,MAAMgB,QAAQ;YACZC,OAAO;YACPC,QAAQ;YACRC,OAAO;YACPC,MAAM;QACR;QAEAC,OAAOC,OAAO,CAACN,OAAOO,OAAO,CAAC,CAAC,CAACC,MAAMC,MAAM;YAC1C,MAAMC,WAAWF;YAEjBvB,GAAG,CAAC,sCAAsC,EAAEuB,KAAK,CAAC,EAAE;gBAClDjC,YAAAA,WAAAA,GAAYG,OAAAC,aAAA,CAACI,WAAAA;oBAAUyB,MAAME;oBAAUxB,IAAG;oBAASI,MAAAA;;gBAEnDH,GAAGwB,QAAQ,CAAC,MAAM;gBAClBxB,GAAGC,GAAG,CAAC,WAAWC,MAAM,CAAC,YAAY,SAASoB,QAAQ;gBACtDtB,GAAGC,GAAG,CAAC,WAAWwB,MAAM,CAAC,cAAcvB,MAAM,CAAC,SAASoB;YACzD;QACF;QAEAxB,GAAG,4CAA4C;YAC7CV,YAAAA,WAAAA,GAAYG,OAAAC,aAAA,CAACI,WAAAA;gBAAUG,IAAG;gBAASI,MAAAA;;YAEnCH,GAAGwB,QAAQ,CAAC,KAAK;YACjBxB,GAAGC,GAAG,CAAC,WAAWC,MAAM,CAAC,YAAY,SAAS;YAC9CF,GAAGC,GAAG,CAAC,WAAWwB,MAAM,CAAC,cAAcvB,MAAM,CAAC,SAAS;QACzD;QAEAJ,GAAG,2BAA2B;YAC5BV,YAAAA,WAAAA,GAAYG,OAAAC,aAAA,CAACI,WAAAA;gBAAUG,IAAG;gBAASI,MAAAA;gBAAKuB,OAAO;oBAAEJ,OAAO;gBAAQ;;YAEhEtB,GAAGC,GAAG,CAAC,WAAWC,MAAM,CAAC,YAAY,SAAS;YAC9CF,GAAGC,GAAG,CAAC,WAAWwB,MAAM,CAAC,cAAcvB,MAAM,CAAC,SAAS;QACzD;IACF;IAEAL,SAAS,iBAAiB;QACxB,MAAM8B,YAAY;YAChBC,OAAO;YACPC,KAAK;YACLC,QAAQ;QACV;QAEAZ,OAAOC,OAAO,CAACQ,WAAWP,OAAO,CAAC,CAAC,CAACW,UAAUC,KAAK;YACjD,MAAMC,eAAeF;YAErBjC,GAAG,CAAC,8CAA8C,EAAEiC,SAAS,CAAC,EAAE;gBAC9D3C,YAAAA,WAAAA,GAAYG,OAAAC,aAAA,CAACI,WAAAA;oBAAUmC,UAAUE;oBAAclC,IAAG;oBAASI,MAAAA;;gBAE3DH,GAAGC,GAAG,CAAC,WAAWC,MAAM,CAAC,YAAY8B,MAAM;YAC7C;QACF;IACF;AACF"}