@fluentui/react-drawer 9.11.6 → 9.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -2
- package/dist/index.d.ts +9 -1
- package/lib/InlineDrawer.js +1 -1
- package/lib/InlineDrawer.js.map +1 -1
- package/lib/components/Drawer/renderDrawer.js.map +1 -1
- package/lib/components/Drawer/useDrawer.js +0 -1
- package/lib/components/Drawer/useDrawer.js.map +1 -1
- package/lib/components/DrawerBody/useDrawerBody.js +1 -0
- package/lib/components/DrawerBody/useDrawerBody.js.map +1 -1
- package/lib/components/DrawerBody/useDrawerBodyStyles.styles.js +1 -0
- package/lib/components/DrawerBody/useDrawerBodyStyles.styles.js.map +1 -1
- package/lib/components/DrawerBody/useDrawerBodyStyles.styles.raw.js +1 -0
- package/lib/components/DrawerBody/useDrawerBodyStyles.styles.raw.js.map +1 -1
- package/lib/components/DrawerFooter/DrawerFooter.types.js.map +1 -1
- package/lib/components/DrawerFooter/useDrawerFooter.js +0 -1
- package/lib/components/DrawerFooter/useDrawerFooter.js.map +1 -1
- package/lib/components/DrawerFooter/useDrawerFooterStyles.styles.js +1 -0
- package/lib/components/DrawerFooter/useDrawerFooterStyles.styles.js.map +1 -1
- package/lib/components/DrawerFooter/useDrawerFooterStyles.styles.raw.js +1 -0
- package/lib/components/DrawerFooter/useDrawerFooterStyles.styles.raw.js.map +1 -1
- package/lib/components/DrawerHeader/DrawerHeader.types.js.map +1 -1
- package/lib/components/DrawerHeader/useDrawerHeader.js +0 -1
- package/lib/components/DrawerHeader/useDrawerHeader.js.map +1 -1
- package/lib/components/DrawerHeader/useDrawerHeaderStyles.styles.js +1 -0
- package/lib/components/DrawerHeader/useDrawerHeaderStyles.styles.js.map +1 -1
- package/lib/components/DrawerHeader/useDrawerHeaderStyles.styles.raw.js +1 -0
- package/lib/components/DrawerHeader/useDrawerHeaderStyles.styles.raw.js.map +1 -1
- package/lib/components/DrawerHeaderNavigation/useDrawerHeaderNavigation.js +0 -1
- package/lib/components/DrawerHeaderNavigation/useDrawerHeaderNavigation.js.map +1 -1
- package/lib/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.js +1 -0
- package/lib/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.js.map +1 -1
- package/lib/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.raw.js +1 -0
- package/lib/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.raw.js.map +1 -1
- package/lib/components/DrawerHeaderTitle/useDrawerHeaderTitle.js +0 -1
- package/lib/components/DrawerHeaderTitle/useDrawerHeaderTitle.js.map +1 -1
- package/lib/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.js +3 -0
- package/lib/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.js.map +1 -1
- package/lib/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.raw.js +3 -0
- package/lib/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.raw.js.map +1 -1
- package/lib/components/InlineDrawer/InlineDrawer.types.js +1 -3
- package/lib/components/InlineDrawer/InlineDrawer.types.js.map +1 -1
- package/lib/components/InlineDrawer/index.js +1 -1
- package/lib/components/InlineDrawer/index.js.map +1 -1
- package/lib/components/InlineDrawer/renderInlineDrawer.js +2 -2
- package/lib/components/InlineDrawer/renderInlineDrawer.js.map +1 -1
- package/lib/components/InlineDrawer/useInlineDrawer.js +23 -12
- package/lib/components/InlineDrawer/useInlineDrawer.js.map +1 -1
- package/lib/components/InlineDrawer/useInlineDrawerStyles.styles.js +1 -0
- package/lib/components/InlineDrawer/useInlineDrawerStyles.styles.js.map +1 -1
- package/lib/components/InlineDrawer/useInlineDrawerStyles.styles.raw.js +1 -0
- package/lib/components/InlineDrawer/useInlineDrawerStyles.styles.raw.js.map +1 -1
- package/lib/components/OverlayDrawer/OverlayDrawerSurface/useOverlayDrawerSurfaceStyles.styles.js +1 -0
- package/lib/components/OverlayDrawer/OverlayDrawerSurface/useOverlayDrawerSurfaceStyles.styles.js.map +1 -1
- package/lib/components/OverlayDrawer/OverlayDrawerSurface/useOverlayDrawerSurfaceStyles.styles.raw.js +1 -0
- package/lib/components/OverlayDrawer/OverlayDrawerSurface/useOverlayDrawerSurfaceStyles.styles.raw.js.map +1 -1
- package/lib/components/OverlayDrawer/renderOverlayDrawer.js.map +1 -1
- package/lib/components/OverlayDrawer/useOverlayDrawerStyles.styles.js +2 -1
- package/lib/components/OverlayDrawer/useOverlayDrawerStyles.styles.js.map +1 -1
- package/lib/components/OverlayDrawer/useOverlayDrawerStyles.styles.raw.js +2 -1
- package/lib/components/OverlayDrawer/useOverlayDrawerStyles.styles.raw.js.map +1 -1
- package/lib/contexts/drawerContext.js.map +1 -1
- package/lib/e2e/DrawerShared.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/shared/DrawerBase.types.js +1 -1
- package/lib/shared/DrawerBase.types.js.map +1 -1
- package/lib/shared/drawerMotionUtils.js.map +1 -1
- package/lib/shared/drawerMotions.js.map +1 -1
- package/lib/shared/drawerSeparatorStyles.js.map +1 -1
- package/lib/shared/useDrawerBaseStyles.styles.raw.js.map +1 -1
- package/lib/shared/useDrawerDefaultProps.js.map +1 -1
- package/lib-commonjs/InlineDrawer.js +3 -0
- package/lib-commonjs/InlineDrawer.js.map +1 -1
- package/lib-commonjs/components/Drawer/renderDrawer.js.map +1 -1
- package/lib-commonjs/components/Drawer/useDrawer.js +0 -2
- package/lib-commonjs/components/Drawer/useDrawer.js.map +1 -1
- package/lib-commonjs/components/DrawerBody/useDrawerBody.js +1 -0
- package/lib-commonjs/components/DrawerBody/useDrawerBody.js.map +1 -1
- package/lib-commonjs/components/DrawerBody/useDrawerBodyStyles.styles.js +1 -0
- package/lib-commonjs/components/DrawerBody/useDrawerBodyStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DrawerBody/useDrawerBodyStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/DrawerBody/useDrawerBodyStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DrawerFooter/DrawerFooter.types.js.map +1 -1
- package/lib-commonjs/components/DrawerFooter/useDrawerFooter.js +0 -2
- package/lib-commonjs/components/DrawerFooter/useDrawerFooter.js.map +1 -1
- package/lib-commonjs/components/DrawerFooter/useDrawerFooterStyles.styles.js +1 -0
- package/lib-commonjs/components/DrawerFooter/useDrawerFooterStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DrawerFooter/useDrawerFooterStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/DrawerFooter/useDrawerFooterStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DrawerHeader/DrawerHeader.types.js.map +1 -1
- package/lib-commonjs/components/DrawerHeader/useDrawerHeader.js +0 -2
- package/lib-commonjs/components/DrawerHeader/useDrawerHeader.js.map +1 -1
- package/lib-commonjs/components/DrawerHeader/useDrawerHeaderStyles.styles.js +1 -0
- package/lib-commonjs/components/DrawerHeader/useDrawerHeaderStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DrawerHeader/useDrawerHeaderStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/DrawerHeader/useDrawerHeaderStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigation.js +0 -2
- package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigation.js.map +1 -1
- package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.js +1 -0
- package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitle.js +0 -2
- package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitle.js.map +1 -1
- package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.js +3 -0
- package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.raw.js +3 -0
- package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/InlineDrawer/InlineDrawer.types.js +1 -3
- package/lib-commonjs/components/InlineDrawer/InlineDrawer.types.js.map +1 -1
- package/lib-commonjs/components/InlineDrawer/index.js +3 -0
- package/lib-commonjs/components/InlineDrawer/index.js.map +1 -1
- package/lib-commonjs/components/InlineDrawer/renderInlineDrawer.js +2 -2
- package/lib-commonjs/components/InlineDrawer/renderInlineDrawer.js.map +1 -1
- package/lib-commonjs/components/InlineDrawer/useInlineDrawer.js +34 -15
- package/lib-commonjs/components/InlineDrawer/useInlineDrawer.js.map +1 -1
- package/lib-commonjs/components/InlineDrawer/useInlineDrawerStyles.styles.js +1 -0
- package/lib-commonjs/components/InlineDrawer/useInlineDrawerStyles.styles.js.map +1 -1
- package/lib-commonjs/components/InlineDrawer/useInlineDrawerStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/InlineDrawer/useInlineDrawerStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/useOverlayDrawerSurfaceStyles.styles.js +1 -0
- package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/useOverlayDrawerSurfaceStyles.styles.js.map +1 -1
- package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/useOverlayDrawerSurfaceStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/useOverlayDrawerSurfaceStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/OverlayDrawer/renderOverlayDrawer.js.map +1 -1
- package/lib-commonjs/components/OverlayDrawer/useOverlayDrawerStyles.styles.js +7 -7
- package/lib-commonjs/components/OverlayDrawer/useOverlayDrawerStyles.styles.js.map +1 -1
- package/lib-commonjs/components/OverlayDrawer/useOverlayDrawerStyles.styles.raw.js +7 -7
- package/lib-commonjs/components/OverlayDrawer/useOverlayDrawerStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/contexts/drawerContext.js.map +1 -1
- package/lib-commonjs/e2e/DrawerShared.js.map +1 -1
- package/lib-commonjs/index.js +3 -0
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/shared/DrawerBase.types.js +0 -2
- package/lib-commonjs/shared/DrawerBase.types.js.map +1 -1
- package/lib-commonjs/shared/drawerMotionUtils.js.map +1 -1
- package/lib-commonjs/shared/drawerMotions.js.map +1 -1
- package/lib-commonjs/shared/drawerSeparatorStyles.js.map +1 -1
- package/lib-commonjs/shared/useDrawerBaseStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/shared/useDrawerDefaultProps.js.map +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Drawer/useDrawer.ts"],"sourcesContent":["import * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\n\nimport type { DrawerProps, DrawerState } from './Drawer.types';\nimport { OverlayDrawer, type OverlayDrawerProps } from '../OverlayDrawer';\nimport { InlineDrawer, type InlineDrawerProps } from '../InlineDrawer';\n\n/**\n * Create the state required to render Drawer.\n *\n * The returned state can be modified with hooks such as useDrawerStyles_unstable,\n * before being passed to renderDrawer_unstable.\n *\n * @param props - props from this instance of Drawer\n * @param ref - reference to root HTMLElement of Drawer\n */\nexport const useDrawer_unstable = (props: DrawerProps, ref: React.Ref<HTMLElement>): DrawerState => {\n // casting here to convert a union of functions to a single function with the union of parameters\n const elementType = (props.type === 'inline' ? InlineDrawer : OverlayDrawer) as React.FC<\n InlineDrawerProps | OverlayDrawerProps\n >;\n const root: InlineDrawerProps | OverlayDrawerProps = slot.always({ ref, ...props }, { elementType });\n\n return {\n components: { root: elementType },\n root,\n };\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["../src/components/Drawer/useDrawer.ts"],"sourcesContent":["import type * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\n\nimport type { DrawerProps, DrawerState } from './Drawer.types';\nimport { OverlayDrawer, type OverlayDrawerProps } from '../OverlayDrawer';\nimport { InlineDrawer, type InlineDrawerProps } from '../InlineDrawer';\n\n/**\n * Create the state required to render Drawer.\n *\n * The returned state can be modified with hooks such as useDrawerStyles_unstable,\n * before being passed to renderDrawer_unstable.\n *\n * @param props - props from this instance of Drawer\n * @param ref - reference to root HTMLElement of Drawer\n */\nexport const useDrawer_unstable = (props: DrawerProps, ref: React.Ref<HTMLElement>): DrawerState => {\n // casting here to convert a union of functions to a single function with the union of parameters\n const elementType = (props.type === 'inline' ? InlineDrawer : OverlayDrawer) as React.FC<\n InlineDrawerProps | OverlayDrawerProps\n >;\n const root: InlineDrawerProps | OverlayDrawerProps = slot.always({ ref, ...props }, { elementType });\n\n return {\n components: { root: elementType },\n root,\n };\n};\n"],"names":["slot","OverlayDrawer","InlineDrawer","useDrawer_unstable","props","ref","elementType","type","root","always","components"],"mappings":";;;;+BAgBaG;;;;;;gCAfQ,4BAA4B;+BAGM,mBAAmB;8BACrB,kBAAkB;AAWhE,2BAA2B,CAACC,OAAoBC;IACrD,iGAAiG;IACjG,MAAMC,cAAeF,MAAMG,IAAI,KAAK,WAAWL,0BAAAA,GAAeD,4BAAAA;IAG9D,MAAMO,OAA+CR,oBAAAA,CAAKS,MAAM,CAAC;QAAEJ;QAAK,GAAGD,KAAK;IAAC,GAAG;QAAEE;IAAY;IAElG,OAAO;QACLI,YAAY;YAAEF,MAAMF;QAAY;QAChCE;IACF;AACF,EAAE"}
|
|
@@ -84,6 +84,7 @@ const useDrawerBody_unstable = (props, ref)=>{
|
|
|
84
84
|
root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)('div', {
|
|
85
85
|
ref: mergedRef,
|
|
86
86
|
...props,
|
|
87
|
+
// eslint-disable-next-line react-hooks/refs
|
|
87
88
|
onScroll: (0, _reactutilities.mergeCallbacks)(props.onScroll, onScroll)
|
|
88
89
|
}), {
|
|
89
90
|
elementType: 'div'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/DrawerBody/useDrawerBody.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport {\n mergeCallbacks,\n slot,\n useAnimationFrame,\n useMergedRefs,\n useIsomorphicLayoutEffect,\n getIntrinsicElementProps,\n} from '@fluentui/react-utilities';\n\nimport { useDrawerContext_unstable } from '../../contexts/drawerContext';\nimport { DrawerScrollState } from '../../shared/DrawerBase.types';\n\nimport type { DrawerBodyProps, DrawerBodyState } from './DrawerBody.types';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n\n/**\n * Get the current scroll state of the DrawerBody.\n *\n * @internal\n * @param element - HTMLElement to check scroll state of\n */\nconst getScrollState = ({ scrollTop, scrollHeight, clientHeight }: HTMLElement): DrawerScrollState => {\n if (scrollHeight <= clientHeight) {\n return 'none';\n }\n\n if (scrollTop === 0) {\n return 'top';\n }\n\n if (scrollTop + clientHeight === scrollHeight) {\n return 'bottom';\n }\n\n return 'middle';\n};\n\n/**\n * Create the state required to render DrawerBody.\n *\n * The returned state can be modified with hooks such as useDrawerBodyStyles_unstable,\n * before being passed to renderDrawerBody_unstable.\n *\n * @param props - props from this instance of DrawerBody\n * @param ref - reference to root HTMLElement of DrawerBody\n */\nexport const useDrawerBody_unstable = (props: DrawerBodyProps, ref: React.Ref<HTMLElement>): DrawerBodyState => {\n const { targetDocument } = useFluent();\n const win = targetDocument?.defaultView;\n\n const { setScrollState } = useDrawerContext_unstable();\n\n const scrollRef = React.useRef<HTMLDivElement | null>(null);\n const mergedRef = useMergedRefs(ref, scrollRef);\n\n const [setScrollAnimationFrame, cancelScrollAnimationFrame] = useAnimationFrame();\n const [setResizeAnimationFrame, cancelResizeAnimationFrame] = useAnimationFrame();\n\n const updateScrollState = React.useCallback(() => {\n if (!scrollRef.current) {\n return;\n }\n\n setScrollState(getScrollState(scrollRef.current));\n }, [setScrollState]);\n\n const onScroll = React.useCallback(() => {\n cancelScrollAnimationFrame();\n setScrollAnimationFrame(updateScrollState);\n }, [cancelScrollAnimationFrame, setScrollAnimationFrame, updateScrollState]);\n\n // Update scroll state on children change\n useIsomorphicLayoutEffect(updateScrollState, [props.children, updateScrollState]);\n\n // Update scroll state on mount and when resize occurs\n useIsomorphicLayoutEffect(() => {\n if (!scrollRef.current || !win?.ResizeObserver) {\n return;\n }\n\n const observer = new win.ResizeObserver(() => setResizeAnimationFrame(updateScrollState));\n\n observer.observe(scrollRef.current);\n\n return () => {\n observer.disconnect();\n cancelResizeAnimationFrame();\n };\n }, [setResizeAnimationFrame, cancelResizeAnimationFrame, updateScrollState, win]);\n\n return {\n components: {\n root: 'div',\n },\n\n root: slot.always(\n getIntrinsicElementProps<DrawerBodyProps>('div', {\n ref: mergedRef,\n ...props,\n onScroll: mergeCallbacks(props.onScroll, onScroll),\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["React","mergeCallbacks","slot","useAnimationFrame","useMergedRefs","useIsomorphicLayoutEffect","getIntrinsicElementProps","useDrawerContext_unstable","useFluent_unstable","useFluent","getScrollState","scrollTop","scrollHeight","clientHeight","useDrawerBody_unstable","props","ref","targetDocument","win","defaultView","setScrollState","scrollRef","useRef","mergedRef","setScrollAnimationFrame","cancelScrollAnimationFrame","setResizeAnimationFrame","cancelResizeAnimationFrame","updateScrollState","useCallback","current","onScroll","children","ResizeObserver","observer","observe","disconnect","components","root","always","elementType"],"mappings":"AAAA;;;;;;;;eAiDac;;;;iEA/CU,QAAQ;gCAQxB,4BAA4B;+BAEO,+BAA+B;qCAIzB,kCAAkC;AAElF;;;;;CAKC,GACD,MAAMJ,iBAAiB,CAAC,EAAEC,SAAS,EAAEC,YAAY,EAAEC,YAAY,EAAe;IAC5E,IAAID,gBAAgBC,cAAc;QAChC,OAAO;IACT;IAEA,IAAIF,cAAc,GAAG;QACnB,OAAO;IACT;IAEA,IAAIA,YAAYE,iBAAiBD,cAAc;QAC7C,OAAO;IACT;IAEA,OAAO;AACT;AAWO,+BAA+B,CAACG,OAAwBC;IAC7D,MAAM,EAAEC,cAAc,EAAE,OAAGR,uCAAAA;IAC3B,MAAMS,MAAMD,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAgBE,WAAW;IAEvC,MAAM,EAAEC,cAAc,EAAE,OAAGb,wCAAAA;IAE3B,MAAMc,YAAYrB,OAAMsB,MAAM,CAAwB;IACtD,MAAMC,gBAAYnB,6BAAAA,EAAcY,KAAKK;IAErC,MAAM,CAACG,yBAAyBC,2BAA2B,OAAGtB,iCAAAA;IAC9D,MAAM,CAACuB,yBAAyBC,2BAA2B,OAAGxB,iCAAAA;IAE9D,MAAMyB,oBAAoB5B,OAAM6B,WAAW,CAAC;QAC1C,IAAI,CAACR,UAAUS,OAAO,EAAE;YACtB;QACF;QAEAV,eAAeV,eAAeW,UAAUS,OAAO;IACjD,GAAG;QAACV;KAAe;IAEnB,MAAMW,WAAW/B,OAAM6B,WAAW,CAAC;QACjCJ;QACAD,wBAAwBI;IAC1B,GAAG;QAACH;QAA4BD;QAAyBI;KAAkB;IAE3E,yCAAyC;QACzCvB,yCAAAA,EAA0BuB,mBAAmB;QAACb,MAAMiB,QAAQ;QAAEJ;KAAkB;IAEhF,sDAAsD;QACtDvB,yCAAAA,EAA0B;QACxB,IAAI,CAACgB,UAAUS,OAAO,IAAI,EAACZ,QAAAA,QAAAA,QAAAA,KAAAA,IAAAA,KAAAA,IAAAA,IAAKe,cAAAA,AAAc,GAAE;YAC9C;QACF;QAEA,MAAMC,WAAW,IAAIhB,IAAIe,cAAc,CAAC,IAAMP,wBAAwBE;QAEtEM,SAASC,OAAO,CAACd,UAAUS,OAAO;QAElC,OAAO;YACLI,SAASE,UAAU;YACnBT;QACF;IACF,GAAG;QAACD;QAAyBC;QAA4BC;QAAmBV;KAAI;IAEhF,OAAO;QACLmB,YAAY;YACVC,MAAM;QACR;QAEAA,MAAMpC,oBAAAA,CAAKqC,MAAM,KACfjC,wCAAAA,EAA0C,OAAO;YAC/CU,KAAKO;YACL,GAAGR,KAAK;
|
|
1
|
+
{"version":3,"sources":["../src/components/DrawerBody/useDrawerBody.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport {\n mergeCallbacks,\n slot,\n useAnimationFrame,\n useMergedRefs,\n useIsomorphicLayoutEffect,\n getIntrinsicElementProps,\n} from '@fluentui/react-utilities';\n\nimport { useDrawerContext_unstable } from '../../contexts/drawerContext';\nimport type { DrawerScrollState } from '../../shared/DrawerBase.types';\n\nimport type { DrawerBodyProps, DrawerBodyState } from './DrawerBody.types';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n\n/**\n * Get the current scroll state of the DrawerBody.\n *\n * @internal\n * @param element - HTMLElement to check scroll state of\n */\nconst getScrollState = ({ scrollTop, scrollHeight, clientHeight }: HTMLElement): DrawerScrollState => {\n if (scrollHeight <= clientHeight) {\n return 'none';\n }\n\n if (scrollTop === 0) {\n return 'top';\n }\n\n if (scrollTop + clientHeight === scrollHeight) {\n return 'bottom';\n }\n\n return 'middle';\n};\n\n/**\n * Create the state required to render DrawerBody.\n *\n * The returned state can be modified with hooks such as useDrawerBodyStyles_unstable,\n * before being passed to renderDrawerBody_unstable.\n *\n * @param props - props from this instance of DrawerBody\n * @param ref - reference to root HTMLElement of DrawerBody\n */\nexport const useDrawerBody_unstable = (props: DrawerBodyProps, ref: React.Ref<HTMLElement>): DrawerBodyState => {\n const { targetDocument } = useFluent();\n const win = targetDocument?.defaultView;\n\n const { setScrollState } = useDrawerContext_unstable();\n\n const scrollRef = React.useRef<HTMLDivElement | null>(null);\n const mergedRef = useMergedRefs(ref, scrollRef);\n\n const [setScrollAnimationFrame, cancelScrollAnimationFrame] = useAnimationFrame();\n const [setResizeAnimationFrame, cancelResizeAnimationFrame] = useAnimationFrame();\n\n const updateScrollState = React.useCallback(() => {\n if (!scrollRef.current) {\n return;\n }\n\n setScrollState(getScrollState(scrollRef.current));\n }, [setScrollState]);\n\n const onScroll = React.useCallback(() => {\n cancelScrollAnimationFrame();\n setScrollAnimationFrame(updateScrollState);\n }, [cancelScrollAnimationFrame, setScrollAnimationFrame, updateScrollState]);\n\n // Update scroll state on children change\n useIsomorphicLayoutEffect(updateScrollState, [props.children, updateScrollState]);\n\n // Update scroll state on mount and when resize occurs\n useIsomorphicLayoutEffect(() => {\n if (!scrollRef.current || !win?.ResizeObserver) {\n return;\n }\n\n const observer = new win.ResizeObserver(() => setResizeAnimationFrame(updateScrollState));\n\n observer.observe(scrollRef.current);\n\n return () => {\n observer.disconnect();\n cancelResizeAnimationFrame();\n };\n }, [setResizeAnimationFrame, cancelResizeAnimationFrame, updateScrollState, win]);\n\n return {\n components: {\n root: 'div',\n },\n\n root: slot.always(\n getIntrinsicElementProps<DrawerBodyProps>('div', {\n ref: mergedRef,\n ...props,\n // eslint-disable-next-line react-hooks/refs\n onScroll: mergeCallbacks(props.onScroll, onScroll),\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["React","mergeCallbacks","slot","useAnimationFrame","useMergedRefs","useIsomorphicLayoutEffect","getIntrinsicElementProps","useDrawerContext_unstable","useFluent_unstable","useFluent","getScrollState","scrollTop","scrollHeight","clientHeight","useDrawerBody_unstable","props","ref","targetDocument","win","defaultView","setScrollState","scrollRef","useRef","mergedRef","setScrollAnimationFrame","cancelScrollAnimationFrame","setResizeAnimationFrame","cancelResizeAnimationFrame","updateScrollState","useCallback","current","onScroll","children","ResizeObserver","observer","observe","disconnect","components","root","always","elementType"],"mappings":"AAAA;;;;;;;;eAiDac;;;;iEA/CU,QAAQ;gCAQxB,4BAA4B;+BAEO,+BAA+B;qCAIzB,kCAAkC;AAElF;;;;;CAKC,GACD,MAAMJ,iBAAiB,CAAC,EAAEC,SAAS,EAAEC,YAAY,EAAEC,YAAY,EAAe;IAC5E,IAAID,gBAAgBC,cAAc;QAChC,OAAO;IACT;IAEA,IAAIF,cAAc,GAAG;QACnB,OAAO;IACT;IAEA,IAAIA,YAAYE,iBAAiBD,cAAc;QAC7C,OAAO;IACT;IAEA,OAAO;AACT;AAWO,+BAA+B,CAACG,OAAwBC;IAC7D,MAAM,EAAEC,cAAc,EAAE,OAAGR,uCAAAA;IAC3B,MAAMS,MAAMD,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAgBE,WAAW;IAEvC,MAAM,EAAEC,cAAc,EAAE,OAAGb,wCAAAA;IAE3B,MAAMc,YAAYrB,OAAMsB,MAAM,CAAwB;IACtD,MAAMC,gBAAYnB,6BAAAA,EAAcY,KAAKK;IAErC,MAAM,CAACG,yBAAyBC,2BAA2B,OAAGtB,iCAAAA;IAC9D,MAAM,CAACuB,yBAAyBC,2BAA2B,OAAGxB,iCAAAA;IAE9D,MAAMyB,oBAAoB5B,OAAM6B,WAAW,CAAC;QAC1C,IAAI,CAACR,UAAUS,OAAO,EAAE;YACtB;QACF;QAEAV,eAAeV,eAAeW,UAAUS,OAAO;IACjD,GAAG;QAACV;KAAe;IAEnB,MAAMW,WAAW/B,OAAM6B,WAAW,CAAC;QACjCJ;QACAD,wBAAwBI;IAC1B,GAAG;QAACH;QAA4BD;QAAyBI;KAAkB;IAE3E,yCAAyC;QACzCvB,yCAAAA,EAA0BuB,mBAAmB;QAACb,MAAMiB,QAAQ;QAAEJ;KAAkB;IAEhF,sDAAsD;QACtDvB,yCAAAA,EAA0B;QACxB,IAAI,CAACgB,UAAUS,OAAO,IAAI,EAACZ,QAAAA,QAAAA,QAAAA,KAAAA,IAAAA,KAAAA,IAAAA,IAAKe,cAAAA,AAAc,GAAE;YAC9C;QACF;QAEA,MAAMC,WAAW,IAAIhB,IAAIe,cAAc,CAAC,IAAMP,wBAAwBE;QAEtEM,SAASC,OAAO,CAACd,UAAUS,OAAO;QAElC,OAAO;YACLI,SAASE,UAAU;YACnBT;QACF;IACF,GAAG;QAACD;QAAyBC;QAA4BC;QAAmBV;KAAI;IAEhF,OAAO;QACLmB,YAAY;YACVC,MAAM;QACR;QAEAA,MAAMpC,oBAAAA,CAAKqC,MAAM,KACfjC,wCAAAA,EAA0C,OAAO;YAC/CU,KAAKO;YACL,GAAGR,KAAK;YACR,4CAA4C;YAC5CgB,cAAU9B,8BAAAA,EAAec,MAAMgB,QAAQ,EAAEA;QAC3C,IACA;YAAES,aAAa;QAAM;IAEzB;AACF,EAAE"}
|
|
@@ -31,6 +31,7 @@ const drawerBodyClassNames = {
|
|
|
31
31
|
const useDrawerBodyStyles_unstable = (state)=>{
|
|
32
32
|
'use no memo';
|
|
33
33
|
const styles = useStyles();
|
|
34
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
34
35
|
state.root.className = (0, _react.mergeClasses)(drawerBodyClassNames.root, styles, state.root.className);
|
|
35
36
|
return state;
|
|
36
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDrawerBodyStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const drawerBodyClassNames = {\n root: 'fui-DrawerBody'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeResetStyles({\n padding: `0 ${tokens.spacingHorizontalXXL}`,\n flex: 1,\n alignSelf: 'stretch',\n position: 'relative',\n zIndex: 1,\n overflow: 'auto',\n ':last-child': {\n paddingBottom: `calc(${tokens.spacingHorizontalXXL} + 1px)`\n },\n ':first-child': {\n paddingTop: `calc(${tokens.spacingHorizontalXXL} + 1px)`\n }\n});\n/**\n * Apply styling to the DrawerBody slots based on the state\n */ export const useDrawerBodyStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n state.root.className = mergeClasses(drawerBodyClassNames.root, styles, state.root.className);\n return state;\n};\n"],"names":["__resetStyles","mergeClasses","tokens","drawerBodyClassNames","root","useStyles","useDrawerBodyStyles_unstable","state","styles","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;wBAGqB;;;gCAqBY;;;;uBAvBC,gBAAgB;AAEvD,MAAMG,uBAAuB;IAChCC,IAAI,EAAE;AACV,CAAC;AACD;;CAEA,GAAI,MAAMC,SAAS,GAAA,WAAA,OAAGL,oBAAA,EAAA,WAAA,MAAA;IAAA;IAAA;IAAA;CAarB,CAAC;AAGS,MAAMM,gCAAgCC,KAAK,IAAG;IACrD,aAAa;IACb,MAAMC,MAAM,GAAGH,SAAS,CAAC,CAAC;
|
|
1
|
+
{"version":3,"sources":["useDrawerBodyStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const drawerBodyClassNames = {\n root: 'fui-DrawerBody'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeResetStyles({\n padding: `0 ${tokens.spacingHorizontalXXL}`,\n flex: 1,\n alignSelf: 'stretch',\n position: 'relative',\n zIndex: 1,\n overflow: 'auto',\n ':last-child': {\n paddingBottom: `calc(${tokens.spacingHorizontalXXL} + 1px)`\n },\n ':first-child': {\n paddingTop: `calc(${tokens.spacingHorizontalXXL} + 1px)`\n }\n});\n/**\n * Apply styling to the DrawerBody slots based on the state\n */ export const useDrawerBodyStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(drawerBodyClassNames.root, styles, state.root.className);\n return state;\n};\n"],"names":["__resetStyles","mergeClasses","tokens","drawerBodyClassNames","root","useStyles","useDrawerBodyStyles_unstable","state","styles","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;wBAGqB;;;gCAqBY;;;;uBAvBC,gBAAgB;AAEvD,MAAMG,uBAAuB;IAChCC,IAAI,EAAE;AACV,CAAC;AACD;;CAEA,GAAI,MAAMC,SAAS,GAAA,WAAA,OAAGL,oBAAA,EAAA,WAAA,MAAA;IAAA;IAAA;IAAA;CAarB,CAAC;AAGS,MAAMM,gCAAgCC,KAAK,IAAG;IACrD,aAAa;IACb,MAAMC,MAAM,GAAGH,SAAS,CAAC,CAAC;IAC1B,oDAAA;IACAE,KAAK,CAACH,IAAI,CAACK,SAAS,OAAGR,mBAAY,EAACE,oBAAoB,CAACC,IAAI,EAAEI,MAAM,EAAED,KAAK,CAACH,IAAI,CAACK,SAAS,CAAC;IAC5F,OAAOF,KAAK;AAChB,CAAC"}
|
|
@@ -41,6 +41,7 @@ const drawerBodyClassNames = {
|
|
|
41
41
|
const useDrawerBodyStyles_unstable = (state)=>{
|
|
42
42
|
'use no memo';
|
|
43
43
|
const styles = useStyles();
|
|
44
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
44
45
|
state.root.className = (0, _react.mergeClasses)(drawerBodyClassNames.root, styles, state.root.className);
|
|
45
46
|
return state;
|
|
46
47
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/DrawerBody/useDrawerBodyStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nimport type { DrawerBodySlots, DrawerBodyState } from './DrawerBody.types';\n\nexport const drawerBodyClassNames: SlotClassNames<DrawerBodySlots> = {\n root: 'fui-DrawerBody',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeResetStyles({\n padding: `0 ${tokens.spacingHorizontalXXL}`,\n flex: 1,\n alignSelf: 'stretch',\n position: 'relative',\n zIndex: 1,\n overflow: 'auto',\n\n ':last-child': {\n paddingBottom: `calc(${tokens.spacingHorizontalXXL} + 1px)`,\n },\n\n ':first-child': {\n paddingTop: `calc(${tokens.spacingHorizontalXXL} + 1px)`,\n },\n});\n\n/**\n * Apply styling to the DrawerBody slots based on the state\n */\nexport const useDrawerBodyStyles_unstable = (state: DrawerBodyState): DrawerBodyState => {\n 'use no memo';\n\n const styles = useStyles();\n\n state.root.className = mergeClasses(drawerBodyClassNames.root, styles, state.root.className);\n\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","tokens","drawerBodyClassNames","root","useStyles","padding","spacingHorizontalXXL","flex","alignSelf","position","zIndex","overflow","paddingBottom","paddingTop","useDrawerBodyStyles_unstable","state","styles","className"],"mappings":"AAAA;;;;;;;;;;;;IAQaG,oBAAAA;;;gCA2BAY;;;;uBAjCiC,iBAAiB;4BACxC,wBAAwB;AAKxC,6BAA8D;IACnEX,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,gBAAYL,sBAAAA,EAAgB;IAChCM,SAAS,CAAC,EAAE,EAAEJ,kBAAAA,CAAOK,oBAAoB,EAAE;IAC3CC,MAAM;IACNC,WAAW;IACXC,UAAU;IACVC,QAAQ;IACRC,UAAU;IAEV,eAAe;QACbC,eAAe,CAAC,KAAK,EAAEX,kBAAAA,CAAOK,oBAAoB,CAAC,OAAO,CAAC;IAC7D;IAEA,gBAAgB;QACdO,YAAY,CAAC,KAAK,EAAEZ,kBAAAA,CAAOK,oBAAoB,CAAC,OAAO,CAAC;IAC1D;AACF;AAKO,MAAMQ,+BAA+B,CAACC;IAC3C;IAEA,MAAMC,SAASZ;
|
|
1
|
+
{"version":3,"sources":["../src/components/DrawerBody/useDrawerBodyStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nimport type { DrawerBodySlots, DrawerBodyState } from './DrawerBody.types';\n\nexport const drawerBodyClassNames: SlotClassNames<DrawerBodySlots> = {\n root: 'fui-DrawerBody',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeResetStyles({\n padding: `0 ${tokens.spacingHorizontalXXL}`,\n flex: 1,\n alignSelf: 'stretch',\n position: 'relative',\n zIndex: 1,\n overflow: 'auto',\n\n ':last-child': {\n paddingBottom: `calc(${tokens.spacingHorizontalXXL} + 1px)`,\n },\n\n ':first-child': {\n paddingTop: `calc(${tokens.spacingHorizontalXXL} + 1px)`,\n },\n});\n\n/**\n * Apply styling to the DrawerBody slots based on the state\n */\nexport const useDrawerBodyStyles_unstable = (state: DrawerBodyState): DrawerBodyState => {\n 'use no memo';\n\n const styles = useStyles();\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(drawerBodyClassNames.root, styles, state.root.className);\n\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","tokens","drawerBodyClassNames","root","useStyles","padding","spacingHorizontalXXL","flex","alignSelf","position","zIndex","overflow","paddingBottom","paddingTop","useDrawerBodyStyles_unstable","state","styles","className"],"mappings":"AAAA;;;;;;;;;;;;IAQaG,oBAAAA;;;gCA2BAY;;;;uBAjCiC,iBAAiB;4BACxC,wBAAwB;AAKxC,6BAA8D;IACnEX,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,gBAAYL,sBAAAA,EAAgB;IAChCM,SAAS,CAAC,EAAE,EAAEJ,kBAAAA,CAAOK,oBAAoB,EAAE;IAC3CC,MAAM;IACNC,WAAW;IACXC,UAAU;IACVC,QAAQ;IACRC,UAAU;IAEV,eAAe;QACbC,eAAe,CAAC,KAAK,EAAEX,kBAAAA,CAAOK,oBAAoB,CAAC,OAAO,CAAC;IAC7D;IAEA,gBAAgB;QACdO,YAAY,CAAC,KAAK,EAAEZ,kBAAAA,CAAOK,oBAAoB,CAAC,OAAO,CAAC;IAC1D;AACF;AAKO,MAAMQ,+BAA+B,CAACC;IAC3C;IAEA,MAAMC,SAASZ;IAEf,oDAAoD;IACpDW,MAAMZ,IAAI,CAACc,SAAS,OAAGjB,mBAAAA,EAAaE,qBAAqBC,IAAI,EAAEa,QAAQD,MAAMZ,IAAI,CAACc,SAAS;IAE3F,OAAOF;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/DrawerFooter/DrawerFooter.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { DrawerScrollState } from '../../shared/DrawerBase.types';\n\nexport type DrawerFooterSlots = {\n root: Slot<'footer'>;\n};\n\n/**\n * DrawerFooter Props\n */\nexport type DrawerFooterProps = ComponentProps<DrawerFooterSlots>;\n\n/**\n * State used in rendering DrawerFooter\n */\nexport type DrawerFooterState = ComponentState<DrawerFooterSlots> & {\n scrollState: DrawerScrollState;\n};\n"],"names":[],"mappings":"AAYA;;CAEC,GACD,WAEE"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DrawerFooter/DrawerFooter.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { DrawerScrollState } from '../../shared/DrawerBase.types';\n\nexport type DrawerFooterSlots = {\n root: Slot<'footer'>;\n};\n\n/**\n * DrawerFooter Props\n */\nexport type DrawerFooterProps = ComponentProps<DrawerFooterSlots>;\n\n/**\n * State used in rendering DrawerFooter\n */\nexport type DrawerFooterState = ComponentState<DrawerFooterSlots> & {\n scrollState: DrawerScrollState;\n};\n"],"names":[],"mappings":"AAYA;;CAEC,GACD,WAEE"}
|
|
@@ -9,8 +9,6 @@ Object.defineProperty(exports, "useDrawerFooter_unstable", {
|
|
|
9
9
|
return useDrawerFooter_unstable;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
13
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
14
12
|
const _reactutilities = require("@fluentui/react-utilities");
|
|
15
13
|
const _drawerContext = require("../../contexts/drawerContext");
|
|
16
14
|
const useDrawerFooter_unstable = (props, ref)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/DrawerFooter/useDrawerFooter.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\n\nimport type { DrawerFooterProps, DrawerFooterState } from './DrawerFooter.types';\nimport { useDrawerContext_unstable } from '../../contexts/drawerContext';\n\n/**\n * Create the state required to render DrawerFooter.\n *\n * The returned state can be modified with hooks such as useDrawerFooterStyles_unstable,\n * before being passed to renderDrawerFooter_unstable.\n *\n * @param props - props from this instance of DrawerFooter\n * @param ref - reference to root HTMLElement of DrawerFooter\n */\nexport const useDrawerFooter_unstable = (props: DrawerFooterProps, ref: React.Ref<HTMLElement>): DrawerFooterState => {\n const { scrollState } = useDrawerContext_unstable();\n\n return {\n components: {\n root: 'footer',\n },\n\n root: slot.always(\n getIntrinsicElementProps('footer', {\n ref,\n role: 'none', // until header and footer elements can be scoped to a dialog, this is needed\n ...props,\n }),\n { elementType: 'footer' },\n ),\n\n scrollState,\n };\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["../src/components/DrawerFooter/useDrawerFooter.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\n\nimport type { DrawerFooterProps, DrawerFooterState } from './DrawerFooter.types';\nimport { useDrawerContext_unstable } from '../../contexts/drawerContext';\n\n/**\n * Create the state required to render DrawerFooter.\n *\n * The returned state can be modified with hooks such as useDrawerFooterStyles_unstable,\n * before being passed to renderDrawerFooter_unstable.\n *\n * @param props - props from this instance of DrawerFooter\n * @param ref - reference to root HTMLElement of DrawerFooter\n */\nexport const useDrawerFooter_unstable = (props: DrawerFooterProps, ref: React.Ref<HTMLElement>): DrawerFooterState => {\n const { scrollState } = useDrawerContext_unstable();\n\n return {\n components: {\n root: 'footer',\n },\n\n root: slot.always(\n getIntrinsicElementProps('footer', {\n ref,\n role: 'none', // until header and footer elements can be scoped to a dialog, this is needed\n ...props,\n }),\n { elementType: 'footer' },\n ),\n\n scrollState,\n };\n};\n"],"names":["getIntrinsicElementProps","slot","useDrawerContext_unstable","useDrawerFooter_unstable","props","ref","scrollState","components","root","always","role","elementType"],"mappings":"AAAA;;;;;;;;;;;gCAG+C,4BAA4B;+BAGjC,+BAA+B;AAWlE,MAAMG,2BAA2B,CAACC,OAA0BC;IACjE,MAAM,EAAEC,WAAW,EAAE,OAAGJ,wCAAAA;IAExB,OAAO;QACLK,YAAY;YACVC,MAAM;QACR;QAEAA,MAAMP,oBAAAA,CAAKQ,MAAM,KACfT,wCAAAA,EAAyB,UAAU;YACjCK;YACAK,MAAM;YACN,GAAGN,KAAK;QACV,IACA;YAAEO,aAAa;QAAS;QAG1BL;IACF;AACF,EAAE"}
|
|
@@ -69,6 +69,7 @@ const useDrawerFooterStyles_unstable = (state)=>{
|
|
|
69
69
|
'use no memo';
|
|
70
70
|
const styles = useStyles();
|
|
71
71
|
const rootStyles = useDrawerFooterStyles();
|
|
72
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
72
73
|
state.root.className = (0, _react.mergeClasses)(drawerFooterClassNames.root, styles, state.scrollState !== 'none' && rootStyles.separator, [
|
|
73
74
|
'middle',
|
|
74
75
|
'top'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDrawerFooterStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { drawerSeparatorStyles } from '../../shared/drawerSeparatorStyles';\nexport const drawerFooterClassNames = {\n root: 'fui-DrawerFooter'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeResetStyles({\n width: '100%',\n maxWidth: '100%',\n padding: `${tokens.spacingVerticalL} ${tokens.spacingHorizontalXXL} ${tokens.spacingVerticalXXL}`,\n display: 'flex',\n justifyContent: 'flex-start',\n alignItems: 'center',\n columnGap: tokens.spacingHorizontalS,\n boxSizing: 'border-box',\n position: 'relative',\n zIndex: 2\n});\nconst useDrawerFooterStyles = makeStyles({\n separator: {\n '::before': {\n ...drawerSeparatorStyles,\n top: 0\n }\n },\n separatorVisible: {\n '::before': {\n opacity: 1\n }\n }\n});\n/**\n * Apply styling to the DrawerFooter slots based on the state\n */ export const useDrawerFooterStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n const rootStyles = useDrawerFooterStyles();\n state.root.className = mergeClasses(drawerFooterClassNames.root, styles, state.scrollState !== 'none' && rootStyles.separator, [\n 'middle',\n 'top'\n ].includes(state.scrollState) && rootStyles.separatorVisible, state.root.className);\n return state;\n};\n"],"names":["__resetStyles","__styles","mergeClasses","tokens","drawerSeparatorStyles","drawerFooterClassNames","root","useStyles","useDrawerFooterStyles","separator","Baz25je","Brfgrao","mdwyqc","Fbdkly","vz82u","cmx5o7","h7gv66","B8bqphf","wjn42g","Ftih45","Bciustq","separatorVisible","d","useDrawerFooterStyles_unstable","state","styles","rootStyles","className","scrollState","includes"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAICK,sBAAsB;;;kCAgCY;;;;uBAnCW,gBAAgB;AAGnE,+BAA+B;IAClCC,IAAI,EAAE;AACV,CAAC;AACD;;CAEA,GAAI,MAAMC,SAAS,GAAA,WAAA,OAAGP,oBAAA,EAAA,YAAA,MAAA;IAAA;CAWrB,CAAC;AACF,MAAMQ,qBAAqB,GAAA,WAAA,OAAGP,eAAA,EAAA;IAAAQ,SAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;YAAA;YAAA;SAAA;QAAAC,MAAA,EAAA;YAAA;YAAA;SAAA;QAAAC,KAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;IAAAC,gBAAA,EAAA;QAAAP,KAAA,EAAA;IAAA;AAAA,GAAA;IAAAQ,CAAA,EAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA,CAY7B,CAAC;AAGS,MAAMC,kCAAkCC,KAAK,IAAG;IACvD,aAAa;IACb,MAAMC,MAAM,GAAGlB,SAAS,CAAC,CAAC;IAC1B,MAAMmB,UAAU,GAAGlB,qBAAqB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"sources":["useDrawerFooterStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { drawerSeparatorStyles } from '../../shared/drawerSeparatorStyles';\nexport const drawerFooterClassNames = {\n root: 'fui-DrawerFooter'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeResetStyles({\n width: '100%',\n maxWidth: '100%',\n padding: `${tokens.spacingVerticalL} ${tokens.spacingHorizontalXXL} ${tokens.spacingVerticalXXL}`,\n display: 'flex',\n justifyContent: 'flex-start',\n alignItems: 'center',\n columnGap: tokens.spacingHorizontalS,\n boxSizing: 'border-box',\n position: 'relative',\n zIndex: 2\n});\nconst useDrawerFooterStyles = makeStyles({\n separator: {\n '::before': {\n ...drawerSeparatorStyles,\n top: 0\n }\n },\n separatorVisible: {\n '::before': {\n opacity: 1\n }\n }\n});\n/**\n * Apply styling to the DrawerFooter slots based on the state\n */ export const useDrawerFooterStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n const rootStyles = useDrawerFooterStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(drawerFooterClassNames.root, styles, state.scrollState !== 'none' && rootStyles.separator, [\n 'middle',\n 'top'\n ].includes(state.scrollState) && rootStyles.separatorVisible, state.root.className);\n return state;\n};\n"],"names":["__resetStyles","__styles","mergeClasses","tokens","drawerSeparatorStyles","drawerFooterClassNames","root","useStyles","useDrawerFooterStyles","separator","Baz25je","Brfgrao","mdwyqc","Fbdkly","vz82u","cmx5o7","h7gv66","B8bqphf","wjn42g","Ftih45","Bciustq","separatorVisible","d","useDrawerFooterStyles_unstable","state","styles","rootStyles","className","scrollState","includes"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAICK,sBAAsB;;;kCAgCY;;;;uBAnCW,gBAAgB;AAGnE,+BAA+B;IAClCC,IAAI,EAAE;AACV,CAAC;AACD;;CAEA,GAAI,MAAMC,SAAS,GAAA,WAAA,OAAGP,oBAAA,EAAA,YAAA,MAAA;IAAA;CAWrB,CAAC;AACF,MAAMQ,qBAAqB,GAAA,WAAA,OAAGP,eAAA,EAAA;IAAAQ,SAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;YAAA;YAAA;SAAA;QAAAC,MAAA,EAAA;YAAA;YAAA;SAAA;QAAAC,KAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;IAAAC,gBAAA,EAAA;QAAAP,KAAA,EAAA;IAAA;AAAA,GAAA;IAAAQ,CAAA,EAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA,CAY7B,CAAC;AAGS,MAAMC,kCAAkCC,KAAK,IAAG;IACvD,aAAa;IACb,MAAMC,MAAM,GAAGlB,SAAS,CAAC,CAAC;IAC1B,MAAMmB,UAAU,GAAGlB,qBAAqB,CAAC,CAAC;IAC1C,oDAAA;IACAgB,KAAK,CAAClB,IAAI,CAACqB,SAAS,OAAGzB,mBAAY,EAACG,sBAAsB,CAACC,IAAI,EAAEmB,MAAM,EAAED,KAAK,CAACI,WAAW,KAAK,MAAM,IAAIF,UAAU,CAACjB,SAAS,EAAE;QAC3H,QAAQ;QACR,KAAK;KACR,CAACoB,QAAQ,CAACL,KAAK,CAACI,WAAW,CAAC,IAAIF,UAAU,CAACL,gBAAgB,EAAEG,KAAK,CAAClB,IAAI,CAACqB,SAAS,CAAC;IACnF,OAAOH,KAAK;AAChB,CAAC"}
|
|
@@ -54,6 +54,7 @@ const useDrawerFooterStyles_unstable = (state)=>{
|
|
|
54
54
|
'use no memo';
|
|
55
55
|
const styles = useStyles();
|
|
56
56
|
const rootStyles = useDrawerFooterStyles();
|
|
57
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
57
58
|
state.root.className = (0, _react.mergeClasses)(drawerFooterClassNames.root, styles, state.scrollState !== 'none' && rootStyles.separator, [
|
|
58
59
|
'middle',
|
|
59
60
|
'top'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/DrawerFooter/useDrawerFooterStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nimport { drawerSeparatorStyles } from '../../shared/drawerSeparatorStyles';\n\nimport type { DrawerFooterSlots, DrawerFooterState } from './DrawerFooter.types';\n\nexport const drawerFooterClassNames: SlotClassNames<DrawerFooterSlots> = {\n root: 'fui-DrawerFooter',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeResetStyles({\n width: '100%',\n maxWidth: '100%',\n padding: `${tokens.spacingVerticalL} ${tokens.spacingHorizontalXXL} ${tokens.spacingVerticalXXL}`,\n display: 'flex',\n justifyContent: 'flex-start',\n alignItems: 'center',\n columnGap: tokens.spacingHorizontalS,\n boxSizing: 'border-box',\n position: 'relative',\n zIndex: 2,\n});\n\nconst useDrawerFooterStyles = makeStyles({\n separator: {\n '::before': {\n ...drawerSeparatorStyles,\n top: 0,\n },\n },\n\n separatorVisible: {\n '::before': {\n opacity: 1,\n },\n },\n});\n\n/**\n * Apply styling to the DrawerFooter slots based on the state\n */\nexport const useDrawerFooterStyles_unstable = (state: DrawerFooterState): DrawerFooterState => {\n 'use no memo';\n\n const styles = useStyles();\n const rootStyles = useDrawerFooterStyles();\n\n state.root.className = mergeClasses(\n drawerFooterClassNames.root,\n styles,\n state.scrollState !== 'none' && rootStyles.separator,\n ['middle', 'top'].includes(state.scrollState) && rootStyles.separatorVisible,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","tokens","drawerSeparatorStyles","drawerFooterClassNames","root","useStyles","width","maxWidth","padding","spacingVerticalL","spacingHorizontalXXL","spacingVerticalXXL","display","justifyContent","alignItems","columnGap","spacingHorizontalS","boxSizing","position","zIndex","useDrawerFooterStyles","separator","top","separatorVisible","opacity","useDrawerFooterStyles_unstable","state","styles","rootStyles","className","scrollState","includes"],"mappings":"AAAA;;;;;;;;;;;;IAUaK,sBAAAA;;;kCAsCAsB;;;;uBA9C6C,iBAAiB;4BACpD,wBAAwB;uCAGT,qCAAqC;AAIpE,+BAAkE;IACvErB,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,gBAAYP,sBAAAA,EAAgB;IAChCQ,OAAO;IACPC,UAAU;IACVC,SAAS,GAAGP,kBAAAA,CAAOQ,gBAAgB,CAAC,CAAC,EAAER,kBAAAA,CAAOS,oBAAoB,CAAC,CAAC,EAAET,kBAAAA,CAAOU,kBAAkB,EAAE;IACjGC,SAAS;IACTC,gBAAgB;IAChBC,YAAY;IACZC,WAAWd,kBAAAA,CAAOe,kBAAkB;IACpCC,WAAW;IACXC,UAAU;IACVC,QAAQ;AACV;AAEA,MAAMC,4BAAwBrB,iBAAAA,EAAW;IACvCsB,WAAW;QACT,YAAY;YACV,GAAGnB,4CAAqB;YACxBoB,KAAK;QACP;IACF;IAEAC,kBAAkB;QAChB,YAAY;YACVC,SAAS;QACX;IACF;AACF;AAKO,MAAMC,iCAAiC,CAACC;IAC7C;IAEA,MAAMC,SAAStB;IACf,MAAMuB,aAAaR;
|
|
1
|
+
{"version":3,"sources":["../src/components/DrawerFooter/useDrawerFooterStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nimport { drawerSeparatorStyles } from '../../shared/drawerSeparatorStyles';\n\nimport type { DrawerFooterSlots, DrawerFooterState } from './DrawerFooter.types';\n\nexport const drawerFooterClassNames: SlotClassNames<DrawerFooterSlots> = {\n root: 'fui-DrawerFooter',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeResetStyles({\n width: '100%',\n maxWidth: '100%',\n padding: `${tokens.spacingVerticalL} ${tokens.spacingHorizontalXXL} ${tokens.spacingVerticalXXL}`,\n display: 'flex',\n justifyContent: 'flex-start',\n alignItems: 'center',\n columnGap: tokens.spacingHorizontalS,\n boxSizing: 'border-box',\n position: 'relative',\n zIndex: 2,\n});\n\nconst useDrawerFooterStyles = makeStyles({\n separator: {\n '::before': {\n ...drawerSeparatorStyles,\n top: 0,\n },\n },\n\n separatorVisible: {\n '::before': {\n opacity: 1,\n },\n },\n});\n\n/**\n * Apply styling to the DrawerFooter slots based on the state\n */\nexport const useDrawerFooterStyles_unstable = (state: DrawerFooterState): DrawerFooterState => {\n 'use no memo';\n\n const styles = useStyles();\n const rootStyles = useDrawerFooterStyles();\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n drawerFooterClassNames.root,\n styles,\n state.scrollState !== 'none' && rootStyles.separator,\n ['middle', 'top'].includes(state.scrollState) && rootStyles.separatorVisible,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","tokens","drawerSeparatorStyles","drawerFooterClassNames","root","useStyles","width","maxWidth","padding","spacingVerticalL","spacingHorizontalXXL","spacingVerticalXXL","display","justifyContent","alignItems","columnGap","spacingHorizontalS","boxSizing","position","zIndex","useDrawerFooterStyles","separator","top","separatorVisible","opacity","useDrawerFooterStyles_unstable","state","styles","rootStyles","className","scrollState","includes"],"mappings":"AAAA;;;;;;;;;;;;IAUaK,sBAAAA;;;kCAsCAsB;;;;uBA9C6C,iBAAiB;4BACpD,wBAAwB;uCAGT,qCAAqC;AAIpE,+BAAkE;IACvErB,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,gBAAYP,sBAAAA,EAAgB;IAChCQ,OAAO;IACPC,UAAU;IACVC,SAAS,GAAGP,kBAAAA,CAAOQ,gBAAgB,CAAC,CAAC,EAAER,kBAAAA,CAAOS,oBAAoB,CAAC,CAAC,EAAET,kBAAAA,CAAOU,kBAAkB,EAAE;IACjGC,SAAS;IACTC,gBAAgB;IAChBC,YAAY;IACZC,WAAWd,kBAAAA,CAAOe,kBAAkB;IACpCC,WAAW;IACXC,UAAU;IACVC,QAAQ;AACV;AAEA,MAAMC,4BAAwBrB,iBAAAA,EAAW;IACvCsB,WAAW;QACT,YAAY;YACV,GAAGnB,4CAAqB;YACxBoB,KAAK;QACP;IACF;IAEAC,kBAAkB;QAChB,YAAY;YACVC,SAAS;QACX;IACF;AACF;AAKO,MAAMC,iCAAiC,CAACC;IAC7C;IAEA,MAAMC,SAAStB;IACf,MAAMuB,aAAaR;IAEnB,oDAAoD;IACpDM,MAAMtB,IAAI,CAACyB,SAAS,GAAG7B,uBAAAA,EACrBG,uBAAuBC,IAAI,EAC3BuB,QACAD,MAAMI,WAAW,KAAK,UAAUF,WAAWP,SAAS,EACpD;QAAC;QAAU;KAAM,CAACU,QAAQ,CAACL,MAAMI,WAAW,KAAKF,WAAWL,gBAAgB,EAC5EG,MAAMtB,IAAI,CAACyB,SAAS;IAGtB,OAAOH;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/DrawerHeader/DrawerHeader.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nimport { DrawerScrollState } from '../../shared/DrawerBase.types';\n\nexport type DrawerHeaderSlots = {\n /**\n * The root of the DrawerHeader.\n */\n root: Slot<'header'>;\n};\n\n/**\n * DrawerHeader Props\n */\nexport type DrawerHeaderProps = ComponentProps<DrawerHeaderSlots>;\n\n/**\n * State used in rendering DrawerHeader\n */\nexport type DrawerHeaderState = ComponentState<DrawerHeaderSlots> & {\n scrollState: DrawerScrollState;\n};\n"],"names":[],"mappings":"AAgBA;;CAEC,GACD,WAEE"}
|
|
1
|
+
{"version":3,"sources":["../src/components/DrawerHeader/DrawerHeader.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nimport type { DrawerScrollState } from '../../shared/DrawerBase.types';\n\nexport type DrawerHeaderSlots = {\n /**\n * The root of the DrawerHeader.\n */\n root: Slot<'header'>;\n};\n\n/**\n * DrawerHeader Props\n */\nexport type DrawerHeaderProps = ComponentProps<DrawerHeaderSlots>;\n\n/**\n * State used in rendering DrawerHeader\n */\nexport type DrawerHeaderState = ComponentState<DrawerHeaderSlots> & {\n scrollState: DrawerScrollState;\n};\n"],"names":[],"mappings":"AAgBA;;CAEC,GACD,WAEE"}
|
|
@@ -9,8 +9,6 @@ Object.defineProperty(exports, "useDrawerHeader_unstable", {
|
|
|
9
9
|
return useDrawerHeader_unstable;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
13
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
14
12
|
const _reactutilities = require("@fluentui/react-utilities");
|
|
15
13
|
const _drawerContext = require("../../contexts/drawerContext");
|
|
16
14
|
const useDrawerHeader_unstable = (props, ref)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/DrawerHeader/useDrawerHeader.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\n\nimport { useDrawerContext_unstable } from '../../contexts/drawerContext';\n\nimport type { DrawerHeaderProps, DrawerHeaderState } from './DrawerHeader.types';\n\n/**\n * Create the state required to render DrawerHeader.\n *\n * The returned state can be modified with hooks such as useDrawerHeaderStyles_unstable,\n * before being passed to renderDrawerHeader_unstable.\n *\n * @param props - props from this instance of DrawerHeader\n * @param ref - reference to root HTMLElement of DrawerHeader\n */\nexport const useDrawerHeader_unstable = (props: DrawerHeaderProps, ref: React.Ref<HTMLElement>): DrawerHeaderState => {\n const { scrollState } = useDrawerContext_unstable();\n\n return {\n components: {\n root: 'header',\n },\n\n root: slot.always(\n getIntrinsicElementProps('header', {\n ref,\n role: 'none', // until header and footer elements can be scoped to a dialog, this is needed\n ...props,\n }),\n { elementType: 'header' },\n ),\n\n scrollState,\n };\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["../src/components/DrawerHeader/useDrawerHeader.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\n\nimport { useDrawerContext_unstable } from '../../contexts/drawerContext';\n\nimport type { DrawerHeaderProps, DrawerHeaderState } from './DrawerHeader.types';\n\n/**\n * Create the state required to render DrawerHeader.\n *\n * The returned state can be modified with hooks such as useDrawerHeaderStyles_unstable,\n * before being passed to renderDrawerHeader_unstable.\n *\n * @param props - props from this instance of DrawerHeader\n * @param ref - reference to root HTMLElement of DrawerHeader\n */\nexport const useDrawerHeader_unstable = (props: DrawerHeaderProps, ref: React.Ref<HTMLElement>): DrawerHeaderState => {\n const { scrollState } = useDrawerContext_unstable();\n\n return {\n components: {\n root: 'header',\n },\n\n root: slot.always(\n getIntrinsicElementProps('header', {\n ref,\n role: 'none', // until header and footer elements can be scoped to a dialog, this is needed\n ...props,\n }),\n { elementType: 'header' },\n ),\n\n scrollState,\n };\n};\n"],"names":["getIntrinsicElementProps","slot","useDrawerContext_unstable","useDrawerHeader_unstable","props","ref","scrollState","components","root","always","role","elementType"],"mappings":"AAAA;;;;;;;;;;;gCAG+C,4BAA4B;+BAEjC,+BAA+B;AAalE,MAAMG,2BAA2B,CAACC,OAA0BC;IACjE,MAAM,EAAEC,WAAW,EAAE,OAAGJ,wCAAAA;IAExB,OAAO;QACLK,YAAY;YACVC,MAAM;QACR;QAEAA,MAAMP,oBAAAA,CAAKQ,MAAM,KACfT,wCAAAA,EAAyB,UAAU;YACjCK;YACAK,MAAM;YACN,GAAGN,KAAK;QACV,IACA;YAAEO,aAAa;QAAS;QAG1BL;IACF;AACF,EAAE"}
|
|
@@ -69,6 +69,7 @@ const useDrawerHeaderStyles_unstable = (state)=>{
|
|
|
69
69
|
'use no memo';
|
|
70
70
|
const styles = useStyles();
|
|
71
71
|
const rootStyles = useDrawerHeaderStyles();
|
|
72
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
72
73
|
state.root.className = (0, _react.mergeClasses)(drawerHeaderClassNames.root, styles, state.scrollState !== 'none' && rootStyles.separator, [
|
|
73
74
|
'middle',
|
|
74
75
|
'bottom'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDrawerHeaderStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { drawerSeparatorStyles } from '../../shared/drawerSeparatorStyles';\nexport const drawerHeaderClassNames = {\n root: 'fui-DrawerHeader'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeResetStyles({\n width: '100%',\n maxWidth: '100%',\n padding: `${tokens.spacingVerticalXXL} ${tokens.spacingHorizontalXXL} ${tokens.spacingVerticalS}`,\n gap: tokens.spacingHorizontalS,\n alignSelf: 'stretch',\n display: 'flex',\n flexDirection: 'column',\n boxSizing: 'border-box',\n position: 'relative',\n zIndex: 2\n});\nconst useDrawerHeaderStyles = makeStyles({\n separator: {\n '::after': {\n ...drawerSeparatorStyles,\n bottom: 0\n }\n },\n separatorVisible: {\n '::after': {\n opacity: 1\n }\n }\n});\n/**\n * Apply styling to the DrawerHeader slots based on the state\n */ export const useDrawerHeaderStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n const rootStyles = useDrawerHeaderStyles();\n state.root.className = mergeClasses(drawerHeaderClassNames.root, styles, state.scrollState !== 'none' && rootStyles.separator, [\n 'middle',\n 'bottom'\n ].includes(state.scrollState) && rootStyles.separatorVisible, state.root.className);\n return state;\n};\n"],"names":["__resetStyles","__styles","mergeClasses","tokens","drawerSeparatorStyles","drawerHeaderClassNames","root","useStyles","useDrawerHeaderStyles","separator","Dlnsje","E3zdtr","B1piin3","Eqx8gd","Bp15pi3","Bjyk6c5","F2fol1","Ba2ppi3","B1dyfl9","Bsft5z2","By385i5","separatorVisible","d","useDrawerHeaderStyles_unstable","state","styles","rootStyles","className","scrollState","includes"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAICK,sBAAsB;;;kCAgCY;;;;uBAnCW,gBAAgB;AAGnE,+BAA+B;IAClCC,IAAI,EAAE;AACV,CAAC;AACD;;CAEA,GAAI,MAAMC,SAAS,GAAA,WAAA,OAAGP,oBAAA,EAAA,WAAA,MAAA;IAAA;CAWrB,CAAC;AACF,MAAMQ,qBAAqB,GAAA,WAAA,OAAGP,eAAA,EAAA;IAAAQ,SAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;YAAA;YAAA;SAAA;QAAAC,MAAA,EAAA;YAAA;YAAA;SAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;IAAAC,gBAAA,EAAA;QAAAP,OAAA,EAAA;IAAA;AAAA,GAAA;IAAAQ,CAAA,EAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA,CAY7B,CAAC;AAGS,MAAMC,kCAAkCC,KAAK,IAAG;IACvD,aAAa;IACb,MAAMC,MAAM,GAAGlB,SAAS,CAAC,CAAC;IAC1B,MAAMmB,UAAU,GAAGlB,qBAAqB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"sources":["useDrawerHeaderStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { drawerSeparatorStyles } from '../../shared/drawerSeparatorStyles';\nexport const drawerHeaderClassNames = {\n root: 'fui-DrawerHeader'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeResetStyles({\n width: '100%',\n maxWidth: '100%',\n padding: `${tokens.spacingVerticalXXL} ${tokens.spacingHorizontalXXL} ${tokens.spacingVerticalS}`,\n gap: tokens.spacingHorizontalS,\n alignSelf: 'stretch',\n display: 'flex',\n flexDirection: 'column',\n boxSizing: 'border-box',\n position: 'relative',\n zIndex: 2\n});\nconst useDrawerHeaderStyles = makeStyles({\n separator: {\n '::after': {\n ...drawerSeparatorStyles,\n bottom: 0\n }\n },\n separatorVisible: {\n '::after': {\n opacity: 1\n }\n }\n});\n/**\n * Apply styling to the DrawerHeader slots based on the state\n */ export const useDrawerHeaderStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n const rootStyles = useDrawerHeaderStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(drawerHeaderClassNames.root, styles, state.scrollState !== 'none' && rootStyles.separator, [\n 'middle',\n 'bottom'\n ].includes(state.scrollState) && rootStyles.separatorVisible, state.root.className);\n return state;\n};\n"],"names":["__resetStyles","__styles","mergeClasses","tokens","drawerSeparatorStyles","drawerHeaderClassNames","root","useStyles","useDrawerHeaderStyles","separator","Dlnsje","E3zdtr","B1piin3","Eqx8gd","Bp15pi3","Bjyk6c5","F2fol1","Ba2ppi3","B1dyfl9","Bsft5z2","By385i5","separatorVisible","d","useDrawerHeaderStyles_unstable","state","styles","rootStyles","className","scrollState","includes"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAICK,sBAAsB;;;kCAgCY;;;;uBAnCW,gBAAgB;AAGnE,+BAA+B;IAClCC,IAAI,EAAE;AACV,CAAC;AACD;;CAEA,GAAI,MAAMC,SAAS,GAAA,WAAA,OAAGP,oBAAA,EAAA,WAAA,MAAA;IAAA;CAWrB,CAAC;AACF,MAAMQ,qBAAqB,GAAA,WAAA,OAAGP,eAAA,EAAA;IAAAQ,SAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;YAAA;YAAA;SAAA;QAAAC,MAAA,EAAA;YAAA;YAAA;SAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;IAAAC,gBAAA,EAAA;QAAAP,OAAA,EAAA;IAAA;AAAA,GAAA;IAAAQ,CAAA,EAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA,CAY7B,CAAC;AAGS,MAAMC,kCAAkCC,KAAK,IAAG;IACvD,aAAa;IACb,MAAMC,MAAM,GAAGlB,SAAS,CAAC,CAAC;IAC1B,MAAMmB,UAAU,GAAGlB,qBAAqB,CAAC,CAAC;IAC1C,oDAAA;IACAgB,KAAK,CAAClB,IAAI,CAACqB,SAAS,OAAGzB,mBAAY,EAACG,sBAAsB,CAACC,IAAI,EAAEmB,MAAM,EAAED,KAAK,CAACI,WAAW,KAAK,MAAM,IAAIF,UAAU,CAACjB,SAAS,EAAE;QAC3H,QAAQ;QACR,QAAQ;KACX,CAACoB,QAAQ,CAACL,KAAK,CAACI,WAAW,CAAC,IAAIF,UAAU,CAACL,gBAAgB,EAAEG,KAAK,CAAClB,IAAI,CAACqB,SAAS,CAAC;IACnF,OAAOH,KAAK;AAChB,CAAC"}
|
|
@@ -54,6 +54,7 @@ const useDrawerHeaderStyles_unstable = (state)=>{
|
|
|
54
54
|
'use no memo';
|
|
55
55
|
const styles = useStyles();
|
|
56
56
|
const rootStyles = useDrawerHeaderStyles();
|
|
57
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
57
58
|
state.root.className = (0, _react.mergeClasses)(drawerHeaderClassNames.root, styles, state.scrollState !== 'none' && rootStyles.separator, [
|
|
58
59
|
'middle',
|
|
59
60
|
'bottom'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/DrawerHeader/useDrawerHeaderStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nimport { drawerSeparatorStyles } from '../../shared/drawerSeparatorStyles';\n\nimport type { DrawerHeaderSlots, DrawerHeaderState } from './DrawerHeader.types';\n\nexport const drawerHeaderClassNames: SlotClassNames<DrawerHeaderSlots> = {\n root: 'fui-DrawerHeader',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeResetStyles({\n width: '100%',\n maxWidth: '100%',\n padding: `${tokens.spacingVerticalXXL} ${tokens.spacingHorizontalXXL} ${tokens.spacingVerticalS}`,\n gap: tokens.spacingHorizontalS,\n alignSelf: 'stretch',\n display: 'flex',\n flexDirection: 'column',\n boxSizing: 'border-box',\n position: 'relative',\n zIndex: 2,\n});\n\nconst useDrawerHeaderStyles = makeStyles({\n separator: {\n '::after': {\n ...drawerSeparatorStyles,\n bottom: 0,\n },\n },\n\n separatorVisible: {\n '::after': {\n opacity: 1,\n },\n },\n});\n\n/**\n * Apply styling to the DrawerHeader slots based on the state\n */\nexport const useDrawerHeaderStyles_unstable = (state: DrawerHeaderState): DrawerHeaderState => {\n 'use no memo';\n\n const styles = useStyles();\n const rootStyles = useDrawerHeaderStyles();\n\n state.root.className = mergeClasses(\n drawerHeaderClassNames.root,\n styles,\n state.scrollState !== 'none' && rootStyles.separator,\n ['middle', 'bottom'].includes(state.scrollState) && rootStyles.separatorVisible,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","tokens","drawerSeparatorStyles","drawerHeaderClassNames","root","useStyles","width","maxWidth","padding","spacingVerticalXXL","spacingHorizontalXXL","spacingVerticalS","gap","spacingHorizontalS","alignSelf","display","flexDirection","boxSizing","position","zIndex","useDrawerHeaderStyles","separator","bottom","separatorVisible","opacity","useDrawerHeaderStyles_unstable","state","styles","rootStyles","className","scrollState","includes"],"mappings":"AAAA;;;;;;;;;;;;IAUaK,sBAAAA;;;kCAsCAsB;;;;uBA9C6C,iBAAiB;4BACpD,wBAAwB;uCAGT,qCAAqC;AAIpE,+BAAkE;IACvErB,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,gBAAYP,sBAAAA,EAAgB;IAChCQ,OAAO;IACPC,UAAU;IACVC,SAAS,GAAGP,kBAAAA,CAAOQ,kBAAkB,CAAC,CAAC,EAAER,kBAAAA,CAAOS,oBAAoB,CAAC,CAAC,EAAET,kBAAAA,CAAOU,gBAAgB,EAAE;IACjGC,KAAKX,kBAAAA,CAAOY,kBAAkB;IAC9BC,WAAW;IACXC,SAAS;IACTC,eAAe;IACfC,WAAW;IACXC,UAAU;IACVC,QAAQ;AACV;AAEA,MAAMC,4BAAwBrB,iBAAAA,EAAW;IACvCsB,WAAW;QACT,WAAW;YACT,GAAGnB,4CAAqB;YACxBoB,QAAQ;QACV;IACF;IAEAC,kBAAkB;QAChB,WAAW;YACTC,SAAS;QACX;IACF;AACF;AAKO,MAAMC,iCAAiC,CAACC;IAC7C;IAEA,MAAMC,SAAStB;IACf,MAAMuB,aAAaR;
|
|
1
|
+
{"version":3,"sources":["../src/components/DrawerHeader/useDrawerHeaderStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nimport { drawerSeparatorStyles } from '../../shared/drawerSeparatorStyles';\n\nimport type { DrawerHeaderSlots, DrawerHeaderState } from './DrawerHeader.types';\n\nexport const drawerHeaderClassNames: SlotClassNames<DrawerHeaderSlots> = {\n root: 'fui-DrawerHeader',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeResetStyles({\n width: '100%',\n maxWidth: '100%',\n padding: `${tokens.spacingVerticalXXL} ${tokens.spacingHorizontalXXL} ${tokens.spacingVerticalS}`,\n gap: tokens.spacingHorizontalS,\n alignSelf: 'stretch',\n display: 'flex',\n flexDirection: 'column',\n boxSizing: 'border-box',\n position: 'relative',\n zIndex: 2,\n});\n\nconst useDrawerHeaderStyles = makeStyles({\n separator: {\n '::after': {\n ...drawerSeparatorStyles,\n bottom: 0,\n },\n },\n\n separatorVisible: {\n '::after': {\n opacity: 1,\n },\n },\n});\n\n/**\n * Apply styling to the DrawerHeader slots based on the state\n */\nexport const useDrawerHeaderStyles_unstable = (state: DrawerHeaderState): DrawerHeaderState => {\n 'use no memo';\n\n const styles = useStyles();\n const rootStyles = useDrawerHeaderStyles();\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n drawerHeaderClassNames.root,\n styles,\n state.scrollState !== 'none' && rootStyles.separator,\n ['middle', 'bottom'].includes(state.scrollState) && rootStyles.separatorVisible,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","tokens","drawerSeparatorStyles","drawerHeaderClassNames","root","useStyles","width","maxWidth","padding","spacingVerticalXXL","spacingHorizontalXXL","spacingVerticalS","gap","spacingHorizontalS","alignSelf","display","flexDirection","boxSizing","position","zIndex","useDrawerHeaderStyles","separator","bottom","separatorVisible","opacity","useDrawerHeaderStyles_unstable","state","styles","rootStyles","className","scrollState","includes"],"mappings":"AAAA;;;;;;;;;;;;IAUaK,sBAAAA;;;kCAsCAsB;;;;uBA9C6C,iBAAiB;4BACpD,wBAAwB;uCAGT,qCAAqC;AAIpE,+BAAkE;IACvErB,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,gBAAYP,sBAAAA,EAAgB;IAChCQ,OAAO;IACPC,UAAU;IACVC,SAAS,GAAGP,kBAAAA,CAAOQ,kBAAkB,CAAC,CAAC,EAAER,kBAAAA,CAAOS,oBAAoB,CAAC,CAAC,EAAET,kBAAAA,CAAOU,gBAAgB,EAAE;IACjGC,KAAKX,kBAAAA,CAAOY,kBAAkB;IAC9BC,WAAW;IACXC,SAAS;IACTC,eAAe;IACfC,WAAW;IACXC,UAAU;IACVC,QAAQ;AACV;AAEA,MAAMC,4BAAwBrB,iBAAAA,EAAW;IACvCsB,WAAW;QACT,WAAW;YACT,GAAGnB,4CAAqB;YACxBoB,QAAQ;QACV;IACF;IAEAC,kBAAkB;QAChB,WAAW;YACTC,SAAS;QACX;IACF;AACF;AAKO,MAAMC,iCAAiC,CAACC;IAC7C;IAEA,MAAMC,SAAStB;IACf,MAAMuB,aAAaR;IAEnB,oDAAoD;IACpDM,MAAMtB,IAAI,CAACyB,SAAS,GAAG7B,uBAAAA,EACrBG,uBAAuBC,IAAI,EAC3BuB,QACAD,MAAMI,WAAW,KAAK,UAAUF,WAAWP,SAAS,EACpD;QAAC;QAAU;KAAS,CAACU,QAAQ,CAACL,MAAMI,WAAW,KAAKF,WAAWL,gBAAgB,EAC/EG,MAAMtB,IAAI,CAACyB,SAAS;IAGtB,OAAOH;AACT,EAAE"}
|
|
@@ -8,8 +8,6 @@ Object.defineProperty(exports, "useDrawerHeaderNavigation_unstable", {
|
|
|
8
8
|
return useDrawerHeaderNavigation_unstable;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
11
|
const _reactutilities = require("@fluentui/react-utilities");
|
|
14
12
|
const useDrawerHeaderNavigation_unstable = (props, ref)=>{
|
|
15
13
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/DrawerHeaderNavigation/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":["
|
|
1
|
+
{"version":3,"sources":["../src/components/DrawerHeaderNavigation/useDrawerHeaderNavigation.ts"],"sourcesContent":["import type * 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":["getIntrinsicElementProps","slot","useDrawerHeaderNavigation_unstable","props","ref","components","root","always","elementType"],"mappings":";;;;+BAcaE;;;;;;gCAbkC,4BAA4B;AAapE,2CAA2C,CAChDC,OACAC;IAEA,OAAO;QACLC,YAAY;YACVC,MAAM;QACR;QAEAA,MAAML,oBAAAA,CAAKM,MAAM,KACfP,wCAAAA,EAAyB,OAAO;YAC9BI;YACA,GAAGD,KAAK;QACV,IACA;YAAEK,aAAa;QAAM;IAEzB;AACF,EAAE"}
|
package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.js
CHANGED
|
@@ -29,6 +29,7 @@ const drawerHeaderNavigationClassNames = {
|
|
|
29
29
|
const useDrawerHeaderNavigationStyles_unstable = (state)=>{
|
|
30
30
|
'use no memo';
|
|
31
31
|
const styles = useStyles();
|
|
32
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
32
33
|
state.root.className = (0, _react.mergeClasses)(drawerHeaderNavigationClassNames.root, styles, state.root.className);
|
|
33
34
|
return state;
|
|
34
35
|
};
|
package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDrawerHeaderNavigationStyles.styles.js"],"sourcesContent":["'use client';\nimport { 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":["__resetStyles","mergeClasses","tokens","drawerHeaderNavigationClassNames","root","useStyles","useDrawerHeaderNavigationStyles_unstable","state","styles","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;oCAGiC;;;4CAUY;;;;uBAZX,gBAAgB;AAEvD,MAAMG,mCAAmC;IAC5CC,IAAI,EAAE;AACV,CAAC;AACD;;CAEA,GAAI,MAAMC,SAAS,GAAA,WAAA,OAAGL,oBAAA,EAAA,YAAA,MAAA;IAAA;CAErB,CAAC;AAGS,MAAMM,4CAA4CC,KAAK,IAAG;IACjE,aAAa;IACb,MAAMC,MAAM,GAAGH,SAAS,CAAC,CAAC;
|
|
1
|
+
{"version":3,"sources":["useDrawerHeaderNavigationStyles.styles.js"],"sourcesContent":["'use client';\nimport { 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 // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(drawerHeaderNavigationClassNames.root, styles, state.root.className);\n return state;\n};\n"],"names":["__resetStyles","mergeClasses","tokens","drawerHeaderNavigationClassNames","root","useStyles","useDrawerHeaderNavigationStyles_unstable","state","styles","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;oCAGiC;;;4CAUY;;;;uBAZX,gBAAgB;AAEvD,MAAMG,mCAAmC;IAC5CC,IAAI,EAAE;AACV,CAAC;AACD;;CAEA,GAAI,MAAMC,SAAS,GAAA,WAAA,OAAGL,oBAAA,EAAA,YAAA,MAAA;IAAA;CAErB,CAAC;AAGS,MAAMM,4CAA4CC,KAAK,IAAG;IACjE,aAAa;IACb,MAAMC,MAAM,GAAGH,SAAS,CAAC,CAAC;IAC1B,oDAAA;IACAE,KAAK,CAACH,IAAI,CAACK,SAAS,OAAGR,mBAAY,EAACE,gCAAgC,CAACC,IAAI,EAAEI,MAAM,EAAED,KAAK,CAACH,IAAI,CAACK,SAAS,CAAC;IACxG,OAAOF,KAAK;AAChB,CAAC"}
|
package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.raw.js
CHANGED
|
@@ -30,6 +30,7 @@ const drawerHeaderNavigationClassNames = {
|
|
|
30
30
|
const useDrawerHeaderNavigationStyles_unstable = (state)=>{
|
|
31
31
|
'use no memo';
|
|
32
32
|
const styles = useStyles();
|
|
33
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
33
34
|
state.root.className = (0, _react.mergeClasses)(drawerHeaderNavigationClassNames.root, styles, state.root.className);
|
|
34
35
|
return state;
|
|
35
36
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nimport type { DrawerHeaderNavigationSlots, DrawerHeaderNavigationState } from './DrawerHeaderNavigation.types';\n\nexport const drawerHeaderNavigationClassNames: SlotClassNames<DrawerHeaderNavigationSlots> = {\n root: 'fui-DrawerHeaderNavigation',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeResetStyles({\n margin: `calc(${tokens.spacingVerticalS} * -1) calc(${tokens.spacingHorizontalL} * -1)`,\n});\n\n/**\n * Apply styling to the DrawerHeaderNavigation slots based on the state\n */\nexport const useDrawerHeaderNavigationStyles_unstable = (\n state: DrawerHeaderNavigationState,\n): DrawerHeaderNavigationState => {\n 'use no memo';\n\n const styles = useStyles();\n\n state.root.className = mergeClasses(drawerHeaderNavigationClassNames.root, styles, state.root.className);\n\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","tokens","drawerHeaderNavigationClassNames","root","useStyles","margin","spacingVerticalS","spacingHorizontalL","useDrawerHeaderNavigationStyles_unstable","state","styles","className"],"mappings":"AAAA;;;;;;;;;;;;IAQaG,gCAAAA;;;IAcAM,wCAAAA;;;;uBApBiC,iBAAiB;4BACxC,wBAAwB;AAKxC,yCAAsF;IAC3FL,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYL,0BAAAA,EAAgB;IAChCM,QAAQ,CAAC,KAAK,EAAEJ,kBAAAA,CAAOK,gBAAgB,CAAC,YAAY,EAAEL,kBAAAA,CAAOM,kBAAkB,CAAC,MAAM,CAAC;AACzF;AAKO,iDAAiD,CACtDE;IAEA;IAEA,MAAMC,SAASN;
|
|
1
|
+
{"version":3,"sources":["../src/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nimport type { DrawerHeaderNavigationSlots, DrawerHeaderNavigationState } from './DrawerHeaderNavigation.types';\n\nexport const drawerHeaderNavigationClassNames: SlotClassNames<DrawerHeaderNavigationSlots> = {\n root: 'fui-DrawerHeaderNavigation',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeResetStyles({\n margin: `calc(${tokens.spacingVerticalS} * -1) calc(${tokens.spacingHorizontalL} * -1)`,\n});\n\n/**\n * Apply styling to the DrawerHeaderNavigation slots based on the state\n */\nexport const useDrawerHeaderNavigationStyles_unstable = (\n state: DrawerHeaderNavigationState,\n): DrawerHeaderNavigationState => {\n 'use no memo';\n\n const styles = useStyles();\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(drawerHeaderNavigationClassNames.root, styles, state.root.className);\n\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","tokens","drawerHeaderNavigationClassNames","root","useStyles","margin","spacingVerticalS","spacingHorizontalL","useDrawerHeaderNavigationStyles_unstable","state","styles","className"],"mappings":"AAAA;;;;;;;;;;;;IAQaG,gCAAAA;;;IAcAM,wCAAAA;;;;uBApBiC,iBAAiB;4BACxC,wBAAwB;AAKxC,yCAAsF;IAC3FL,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYL,0BAAAA,EAAgB;IAChCM,QAAQ,CAAC,KAAK,EAAEJ,kBAAAA,CAAOK,gBAAgB,CAAC,YAAY,EAAEL,kBAAAA,CAAOM,kBAAkB,CAAC,MAAM,CAAC;AACzF;AAKO,iDAAiD,CACtDE;IAEA;IAEA,MAAMC,SAASN;IAEf,oDAAoD;IACpDK,MAAMN,IAAI,CAACQ,SAAS,OAAGX,mBAAAA,EAAaE,iCAAiCC,IAAI,EAAEO,QAAQD,MAAMN,IAAI,CAACQ,SAAS;IAEvG,OAAOF;AACT,EAAE"}
|
|
@@ -9,8 +9,6 @@ Object.defineProperty(exports, "useDrawerHeaderTitle_unstable", {
|
|
|
9
9
|
return useDrawerHeaderTitle_unstable;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
13
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
14
12
|
const _reactutilities = require("@fluentui/react-utilities");
|
|
15
13
|
const _reactdialog = require("@fluentui/react-dialog");
|
|
16
14
|
const useDrawerHeaderTitle_unstable = (props, ref)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/DrawerHeaderTitle/useDrawerHeaderTitle.ts"],"sourcesContent":["'use client';\n\nimport * 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":["
|
|
1
|
+
{"version":3,"sources":["../src/components/DrawerHeaderTitle/useDrawerHeaderTitle.ts"],"sourcesContent":["'use client';\n\nimport type * 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":["getIntrinsicElementProps","slot","useDialogContext_unstable","useDrawerHeaderTitle_unstable","props","ref","children","heading","headingId","ctx","dialogTitleId","components","root","action","always","elementType","optional","defaultProps","id","renderByDefault"],"mappings":"AAAA;;;;;+BAiBaG;;;;;;gCAdkC,4BAA4B;6BACjC,yBAAyB;AAa5D,sCAAsC,CAC3CC,OACAC;IAEA,MAAM,EAAEC,QAAQ,EAAEC,OAAO,EAAE,GAAGH;IAC9B,MAAMI,gBAAYN,sCAAAA,EAA0BO,CAAAA,MAAOA,IAAIC,aAAa;IAEpE,OAAO;QACLC,YAAY;YACVC,MAAM;YACNL,SAAS;YACTM,QAAQ;QACV;QAEAD,MAAMX,oBAAAA,CAAKa,MAAM,KACfd,wCAAAA,EAAyB,OAAO;YAC9BK;YACA,GAAGD,KAAK;QACV,IACA;YAAEW,aAAa;QAAM;QAEvBR,SAASN,oBAAAA,CAAKe,QAAQ,CAACT,SAAS;YAC9BU,cAAc;gBACZC,IAAIV;gBACJF;YACF;YACAa,iBAAiB;YACjBJ,aAAa;QACf;QACAF,QAAQZ,oBAAAA,CAAKe,QAAQ,CAACZ,MAAMS,MAAM,EAAE;YAClCE,aAAa;QACf;IACF;AACF,EAAE"}
|
|
@@ -66,11 +66,14 @@ const useDrawerHeaderTitleStyles_unstable = (state)=>{
|
|
|
66
66
|
root,
|
|
67
67
|
action
|
|
68
68
|
});
|
|
69
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
69
70
|
state.root.className = (0, _react.mergeClasses)(drawerHeaderTitleClassNames.root, styles.root, state.root.className);
|
|
70
71
|
if (state.heading) {
|
|
72
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
71
73
|
state.heading.className = (0, _react.mergeClasses)(drawerHeaderTitleClassNames.heading, state.heading.className);
|
|
72
74
|
}
|
|
73
75
|
if (state.action) {
|
|
76
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
74
77
|
state.action.className = (0, _react.mergeClasses)(drawerHeaderTitleClassNames.action, styles.action, state.action.className);
|
|
75
78
|
}
|
|
76
79
|
return state;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDrawerHeaderTitleStyles.styles.js"],"sourcesContent":["'use client';\nimport { 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, // We should not use components to pass along the base element type of a slot\n // but there's no way to retrieve the element type of a slot from the slot definition\n // right now without using SLOT_ELEMENT_TYPE_SYMBOL\n // TODO: create a method to retrieve the element type of a slot\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n 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":["__styles","mergeClasses","useDialogTitleStyles_unstable","tokens","drawerHeaderTitleClassNames","root","heading","action","useStyles","mc9l5x","Brf1p80","Bt984gj","i8kkvl","t21cq0","d","useDrawerHeaderTitleStyles_unstable","state","styles","components","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAICI,2BAA2B;;;uCAoBY;eAAnCW;;;uBAvBwB,gBAAgB;6BACX,wBAAwB;AAE/D,oCAAoC;IACvCV,IAAI,EAAE,uBAAuB;IAC7BC,OAAO,EAAE,gCAAgC;IACzCC,MAAM,EAAE;AACZ,CAAC;AACD;;CAEA,GAAI,MAAMC,SAAS,GAAA,WAAA,OAAGR,eAAA,EAAA;IAAAK,IAAA,EAAA;QAAAI,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;IAAA;IAAAL,MAAA,EAAA;QAAAM,MAAA,EAAA;YAAA;YAAA;SAAA;IAAA;AAAA,GAAA;IAAAC,CAAA,EAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA,CAUrB,CAAC;AAGS,6CAA6CE,KAAK,IAAG;IAC5D,aAAa;IACb,MAAMC,MAAM,GAAGT,SAAS,CAAC,CAAC;IAC1B,MAAM,EAAEF,OAAO,EAAED,IAAI,GAAG,CAAC,CAAC,EAAEE,MAAM,EAAE,6EAAA;IACpC,qFAAA;IACA,mDAAA;IACA,+DAAA;IACA,4DAAA;IACAW,UAAAA,EAAY,GAAGF,KAAK;QACpBd,0CAA6B,EAAC;QAC1BgB,UAAU,EAAE;YACRb,IAAI,EAAEa,UAAU,CAACZ,OAAO;YACxBC,MAAM,EAAEW,UAAU,CAACX,MAAAA;QACvB,CAAC;QACDF,IAAI;QACJE;IACJ,CAAC,CAAC;
|
|
1
|
+
{"version":3,"sources":["useDrawerHeaderTitleStyles.styles.js"],"sourcesContent":["'use client';\nimport { 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, // We should not use components to pass along the base element type of a slot\n // but there's no way to retrieve the element type of a slot from the slot definition\n // right now without using SLOT_ELEMENT_TYPE_SYMBOL\n // TODO: create a method to retrieve the element type of a slot\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n components } = state;\n useDialogTitleStyles_unstable({\n components: {\n root: components.heading,\n action: components.action\n },\n root,\n action\n });\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(drawerHeaderTitleClassNames.root, styles.root, state.root.className);\n if (state.heading) {\n // eslint-disable-next-line react-hooks/immutability\n state.heading.className = mergeClasses(drawerHeaderTitleClassNames.heading, state.heading.className);\n }\n if (state.action) {\n // eslint-disable-next-line react-hooks/immutability\n state.action.className = mergeClasses(drawerHeaderTitleClassNames.action, styles.action, state.action.className);\n }\n return state;\n};\n"],"names":["__styles","mergeClasses","useDialogTitleStyles_unstable","tokens","drawerHeaderTitleClassNames","root","heading","action","useStyles","mc9l5x","Brf1p80","Bt984gj","i8kkvl","t21cq0","d","useDrawerHeaderTitleStyles_unstable","state","styles","components","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAICI,2BAA2B;;;uCAoBY;eAAnCW;;;uBAvBwB,gBAAgB;6BACX,wBAAwB;AAE/D,oCAAoC;IACvCV,IAAI,EAAE,uBAAuB;IAC7BC,OAAO,EAAE,gCAAgC;IACzCC,MAAM,EAAE;AACZ,CAAC;AACD;;CAEA,GAAI,MAAMC,SAAS,GAAA,WAAA,OAAGR,eAAA,EAAA;IAAAK,IAAA,EAAA;QAAAI,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;IAAA;IAAAL,MAAA,EAAA;QAAAM,MAAA,EAAA;YAAA;YAAA;SAAA;IAAA;AAAA,GAAA;IAAAC,CAAA,EAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA,CAUrB,CAAC;AAGS,6CAA6CE,KAAK,IAAG;IAC5D,aAAa;IACb,MAAMC,MAAM,GAAGT,SAAS,CAAC,CAAC;IAC1B,MAAM,EAAEF,OAAO,EAAED,IAAI,GAAG,CAAC,CAAC,EAAEE,MAAM,EAAE,6EAAA;IACpC,qFAAA;IACA,mDAAA;IACA,+DAAA;IACA,4DAAA;IACAW,UAAAA,EAAY,GAAGF,KAAK;QACpBd,0CAA6B,EAAC;QAC1BgB,UAAU,EAAE;YACRb,IAAI,EAAEa,UAAU,CAACZ,OAAO;YACxBC,MAAM,EAAEW,UAAU,CAACX,MAAAA;QACvB,CAAC;QACDF,IAAI;QACJE;IACJ,CAAC,CAAC;IACF,oDAAA;IACAS,KAAK,CAACX,IAAI,CAACc,SAAS,OAAGlB,mBAAY,EAACG,2BAA2B,CAACC,IAAI,EAAEY,MAAM,CAACZ,IAAI,EAAEW,KAAK,CAACX,IAAI,CAACc,SAAS,CAAC;IACxG,IAAIH,KAAK,CAACV,OAAO,EAAE;QACf,oDAAA;QACAU,KAAK,CAACV,OAAO,CAACa,SAAS,OAAGlB,mBAAY,EAACG,2BAA2B,CAACE,OAAO,EAAEU,KAAK,CAACV,OAAO,CAACa,SAAS,CAAC;IACxG;IACA,IAAIH,KAAK,CAACT,MAAM,EAAE;QACd,oDAAA;QACAS,KAAK,CAACT,MAAM,CAACY,SAAS,OAAGlB,mBAAY,EAACG,2BAA2B,CAACG,MAAM,EAAEU,MAAM,CAACV,MAAM,EAAES,KAAK,CAACT,MAAM,CAACY,SAAS,CAAC;IACpH;IACA,OAAOH,KAAK;AAChB,CAAC"}
|
|
@@ -54,11 +54,14 @@ const useDrawerHeaderTitleStyles_unstable = (state)=>{
|
|
|
54
54
|
root,
|
|
55
55
|
action
|
|
56
56
|
});
|
|
57
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
57
58
|
state.root.className = (0, _react.mergeClasses)(drawerHeaderTitleClassNames.root, styles.root, state.root.className);
|
|
58
59
|
if (state.heading) {
|
|
60
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
59
61
|
state.heading.className = (0, _react.mergeClasses)(drawerHeaderTitleClassNames.heading, state.heading.className);
|
|
60
62
|
}
|
|
61
63
|
if (state.action) {
|
|
64
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
62
65
|
state.action.className = (0, _react.mergeClasses)(drawerHeaderTitleClassNames.action, styles.action, state.action.className);
|
|
63
66
|
}
|
|
64
67
|
return state;
|
package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.raw.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { useDialogTitleStyles_unstable } from '@fluentui/react-dialog';\nimport { tokens } from '@fluentui/react-theme';\n\nimport type { DrawerHeaderTitleSlots, DrawerHeaderTitleState } from './DrawerHeaderTitle.types';\n\nexport const drawerHeaderTitleClassNames: SlotClassNames<DrawerHeaderTitleSlots> = {\n root: 'fui-DrawerHeaderTitle',\n heading: 'fui-DrawerHeaderTitle__heading',\n action: 'fui-DrawerHeaderTitle__action',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n columnGap: tokens.spacingHorizontalS,\n },\n\n action: {\n marginRight: `calc(${tokens.spacingHorizontalS} * -1)`,\n },\n});\n\n/**\n * Apply styling to the DrawerHeaderTitle slots based on the state\n */\nexport const useDrawerHeaderTitleStyles_unstable = (state: DrawerHeaderTitleState): DrawerHeaderTitleState => {\n 'use no memo';\n\n const styles = useStyles();\n\n const {\n heading: root = {},\n action,\n // We should not use components to pass along the base element type of a slot\n // but there's no way to retrieve the element type of a slot from the slot definition\n // right now without using SLOT_ELEMENT_TYPE_SYMBOL\n // TODO: create a method to retrieve the element type of a slot\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n components,\n } = state;\n\n useDialogTitleStyles_unstable({\n components: {\n root: components.heading,\n action: components.action,\n },\n root,\n action,\n });\n\n state.root.className = mergeClasses(drawerHeaderTitleClassNames.root, styles.root, state.root.className);\n\n if (state.heading) {\n state.heading.className = mergeClasses(drawerHeaderTitleClassNames.heading, state.heading.className);\n }\n\n if (state.action) {\n state.action.className = mergeClasses(drawerHeaderTitleClassNames.action, styles.action, state.action.className);\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","useDialogTitleStyles_unstable","tokens","drawerHeaderTitleClassNames","root","heading","action","useStyles","display","justifyContent","alignItems","columnGap","spacingHorizontalS","marginRight","useDrawerHeaderTitleStyles_unstable","state","styles","components","className"],"mappings":"AAAA;;;;;;;;;;;;IASaI,2BAAAA;;;uCAyBAW;eAAAA;;;uBAhC4B,iBAAiB;6BAEZ,yBAAyB;4BAChD,wBAAwB;AAIxC,oCAA4E;IACjFV,MAAM;IACNC,SAAS;IACTC,QAAQ;AACV,EAAE;AAEF;;CAEC,GACD,MAAMC,
|
|
1
|
+
{"version":3,"sources":["../src/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { useDialogTitleStyles_unstable } from '@fluentui/react-dialog';\nimport { tokens } from '@fluentui/react-theme';\n\nimport type { DrawerHeaderTitleSlots, DrawerHeaderTitleState } from './DrawerHeaderTitle.types';\n\nexport const drawerHeaderTitleClassNames: SlotClassNames<DrawerHeaderTitleSlots> = {\n root: 'fui-DrawerHeaderTitle',\n heading: 'fui-DrawerHeaderTitle__heading',\n action: 'fui-DrawerHeaderTitle__action',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n columnGap: tokens.spacingHorizontalS,\n },\n\n action: {\n marginRight: `calc(${tokens.spacingHorizontalS} * -1)`,\n },\n});\n\n/**\n * Apply styling to the DrawerHeaderTitle slots based on the state\n */\nexport const useDrawerHeaderTitleStyles_unstable = (state: DrawerHeaderTitleState): DrawerHeaderTitleState => {\n 'use no memo';\n\n const styles = useStyles();\n\n const {\n heading: root = {},\n action,\n // We should not use components to pass along the base element type of a slot\n // but there's no way to retrieve the element type of a slot from the slot definition\n // right now without using SLOT_ELEMENT_TYPE_SYMBOL\n // TODO: create a method to retrieve the element type of a slot\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n components,\n } = state;\n\n useDialogTitleStyles_unstable({\n components: {\n root: components.heading,\n action: components.action,\n },\n root,\n action,\n });\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(drawerHeaderTitleClassNames.root, styles.root, state.root.className);\n\n if (state.heading) {\n // eslint-disable-next-line react-hooks/immutability\n state.heading.className = mergeClasses(drawerHeaderTitleClassNames.heading, state.heading.className);\n }\n\n if (state.action) {\n // eslint-disable-next-line react-hooks/immutability\n state.action.className = mergeClasses(drawerHeaderTitleClassNames.action, styles.action, state.action.className);\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","useDialogTitleStyles_unstable","tokens","drawerHeaderTitleClassNames","root","heading","action","useStyles","display","justifyContent","alignItems","columnGap","spacingHorizontalS","marginRight","useDrawerHeaderTitleStyles_unstable","state","styles","components","className"],"mappings":"AAAA;;;;;;;;;;;;IASaI,2BAAAA;;;uCAyBAW;eAAAA;;;uBAhC4B,iBAAiB;6BAEZ,yBAAyB;4BAChD,wBAAwB;AAIxC,oCAA4E;IACjFV,MAAM;IACNC,SAAS;IACTC,QAAQ;AACV,EAAE;AAEF;;CAEC,GACD,MAAMC,gBAAYR,iBAAAA,EAAW;IAC3BK,MAAM;QACJI,SAAS;QACTC,gBAAgB;QAChBC,YAAY;QACZC,WAAWT,kBAAAA,CAAOU,kBAAkB;IACtC;IAEAN,QAAQ;QACNO,aAAa,CAAC,KAAK,EAAEX,kBAAAA,CAAOU,kBAAkB,CAAC,MAAM,CAAC;IACxD;AACF;AAKO,4CAA4C,CAACG;IAClD;IAEA,MAAMC,SAAST;IAEf,MAAM,EACJF,SAASD,OAAO,CAAC,CAAC,EAClBE,MAAM,EACN,AACA,6EAD6E,QACQ;IACrF,mDAAmD;IACnD,+DAA+D;IAC/D,4DAA4D;IAC5DW,UAAU,EACX,GAAGF;QAEJd,0CAAAA,EAA8B;QAC5BgB,YAAY;YACVb,MAAMa,WAAWZ,OAAO;YACxBC,QAAQW,WAAWX,MAAM;QAC3B;QACAF;QACAE;IACF;IAEA,oDAAoD;IACpDS,MAAMX,IAAI,CAACc,SAAS,OAAGlB,mBAAAA,EAAaG,4BAA4BC,IAAI,EAAEY,OAAOZ,IAAI,EAAEW,MAAMX,IAAI,CAACc,SAAS;IAEvG,IAAIH,MAAMV,OAAO,EAAE;QACjB,oDAAoD;QACpDU,MAAMV,OAAO,CAACa,SAAS,OAAGlB,mBAAAA,EAAaG,4BAA4BE,OAAO,EAAEU,MAAMV,OAAO,CAACa,SAAS;IACrG;IAEA,IAAIH,MAAMT,MAAM,EAAE;QAChB,oDAAoD;QACpDS,MAAMT,MAAM,CAACY,SAAS,OAAGlB,mBAAAA,EAAaG,4BAA4BG,MAAM,EAAEU,OAAOV,MAAM,EAAES,MAAMT,MAAM,CAACY,SAAS;IACjH;IAEA,OAAOH;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/InlineDrawer/InlineDrawer.types.ts"],"sourcesContent":["import type { PresenceDirection, PresenceMotionSlotProps } from '@fluentui/react-motion';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nimport type { DrawerMotionParams } from '../../shared/drawerMotions';\nimport type { DrawerBaseProps, DrawerBaseState } from '../../shared/DrawerBase.types';\n\nexport type SurfaceMotionSlotProps = PresenceMotionSlotProps<DrawerMotionParams>;\n\nexport type InlineDrawerSlots = {\n root: Slot<'div', 'aside'>;\n surfaceMotion?: Slot<SurfaceMotionSlotProps>;\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<NonNullable<InlineDrawerSlots>> &\n DrawerBaseState &\n Pick<InlineDrawerProps, 'separator'> & {\n animationDirection: PresenceDirection;\n }\n>;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/components/InlineDrawer/InlineDrawer.types.ts"],"sourcesContent":["import type { PresenceDirection, PresenceMotionSlotProps } from '@fluentui/react-motion';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nimport type { DrawerMotionParams } from '../../shared/drawerMotions';\nimport type { DrawerBaseProps, DrawerBaseState } from '../../shared/DrawerBase.types';\n\nexport type SurfaceMotionSlotProps = PresenceMotionSlotProps<DrawerMotionParams>;\n\nexport type InlineDrawerSlots = {\n root: Slot<'div', 'aside'>;\n surfaceMotion?: Slot<SurfaceMotionSlotProps>;\n};\n\nexport type InlineDrawerBaseSlots = Omit<InlineDrawerSlots, 'surfaceMotion'>;\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\nexport type InlineDrawerBaseProps = ComponentProps<InlineDrawerBaseSlots> & Omit<DrawerBaseProps, 'size'>;\n\n/**\n * State used in rendering InlineDrawer\n */\nexport type InlineDrawerState = Required<\n ComponentState<NonNullable<InlineDrawerSlots>> &\n DrawerBaseState &\n Pick<InlineDrawerProps, 'separator'> & {\n animationDirection: PresenceDirection;\n }\n>;\n\nexport type InlineDrawerBaseState = Required<\n ComponentState<InlineDrawerBaseSlots> & Omit<DrawerBaseState, 'size' | 'motion'>\n>;\n"],"names":[],"mappings":""}
|
|
@@ -18,6 +18,9 @@ _export(exports, {
|
|
|
18
18
|
renderInlineDrawer_unstable: function() {
|
|
19
19
|
return _renderInlineDrawer.renderInlineDrawer_unstable;
|
|
20
20
|
},
|
|
21
|
+
useInlineDrawerBase_unstable: function() {
|
|
22
|
+
return _useInlineDrawer.useInlineDrawerBase_unstable;
|
|
23
|
+
},
|
|
21
24
|
useInlineDrawerStyles_unstable: function() {
|
|
22
25
|
return _useInlineDrawerStylesstyles.useInlineDrawerStyles_unstable;
|
|
23
26
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/InlineDrawer/index.ts"],"sourcesContent":["export { InlineDrawer } from './InlineDrawer';\nexport type {\n InlineDrawerProps,\n InlineDrawerSlots,\n InlineDrawerState,\n SurfaceMotionSlotProps,\n} from './InlineDrawer.types';\nexport { renderInlineDrawer_unstable } from './renderInlineDrawer';\nexport { useInlineDrawer_unstable } from './useInlineDrawer';\nexport { inlineDrawerClassNames, useInlineDrawerStyles_unstable } from './useInlineDrawerStyles.styles';\n"],"names":["InlineDrawer","renderInlineDrawer_unstable","useInlineDrawer_unstable","inlineDrawerClassNames","useInlineDrawerStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,0BAAY;;;
|
|
1
|
+
{"version":3,"sources":["../src/components/InlineDrawer/index.ts"],"sourcesContent":["export { InlineDrawer } from './InlineDrawer';\nexport type {\n InlineDrawerProps,\n InlineDrawerSlots,\n InlineDrawerState,\n InlineDrawerBaseProps,\n InlineDrawerBaseState,\n SurfaceMotionSlotProps,\n} from './InlineDrawer.types';\nexport { renderInlineDrawer_unstable } from './renderInlineDrawer';\nexport { useInlineDrawer_unstable, useInlineDrawerBase_unstable } from './useInlineDrawer';\nexport { inlineDrawerClassNames, useInlineDrawerStyles_unstable } from './useInlineDrawerStyles.styles';\n"],"names":["InlineDrawer","renderInlineDrawer_unstable","useInlineDrawer_unstable","useInlineDrawerBase_unstable","inlineDrawerClassNames","useInlineDrawerStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,0BAAY;;;eAWZI,mDAAsB;;;eAFtBH,+CAA2B;;;eACDE,6CAA4B;;;eAC9BE,2DAA8B;;;eADtDH,yCAAwB;;;8BAVJ,iBAAiB;oCASF,uBAAuB;iCACI,oBAAoB;6CACpB,iCAAiC"}
|
|
@@ -15,8 +15,8 @@ const renderInlineDrawer_unstable = (state, contextValue)=>{
|
|
|
15
15
|
(0, _reactutilities.assertSlots)(state);
|
|
16
16
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_drawerContext.DrawerProvider, {
|
|
17
17
|
value: contextValue,
|
|
18
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.surfaceMotion, {
|
|
18
|
+
children: state.surfaceMotion ? /*#__PURE__*/ (0, _jsxruntime.jsx)(state.surfaceMotion, {
|
|
19
19
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {})
|
|
20
|
-
})
|
|
20
|
+
}) : /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {})
|
|
21
21
|
});
|
|
22
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/InlineDrawer/renderInlineDrawer.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { DrawerContextValue
|
|
1
|
+
{"version":3,"sources":["../src/components/InlineDrawer/renderInlineDrawer.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { DrawerContextValue } from '../../contexts/drawerContext';\nimport { 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): JSXElement => {\n assertSlots<InlineDrawerSlots>(state);\n\n return (\n <DrawerProvider value={contextValue}>\n {state.surfaceMotion ? (\n <state.surfaceMotion>\n <state.root />\n </state.surfaceMotion>\n ) : (\n <state.root />\n )}\n </DrawerProvider>\n );\n};\n"],"names":["assertSlots","DrawerProvider","renderInlineDrawer_unstable","state","contextValue","value","surfaceMotion","root"],"mappings":";;;;+BAYaE;;;;;;4BAXb,gDAAiD;gCACrB,4BAA4B;+BAGzB,+BAA+B;AAOvD,oCAAoC,CAACC,OAA0BC;QACpEJ,2BAAAA,EAA+BG;IAE/B,OAAA,WAAA,OACE,eAAA,EAACF,6BAAAA,EAAAA;QAAeI,OAAOD;kBACpBD,MAAMG,aAAa,GAAA,WAAA,OAClB,eAAA,EAACH,MAAMG,aAAa,EAAA;sBAClB,WAAA,OAAA,eAAA,EAACH,MAAMI,IAAI,EAAA,CAAA;+BAGb,eAAA,EAACJ,MAAMI,IAAI,EAAA,CAAA;;AAInB,EAAE"}
|