@fluentui/react-drawer 9.0.0-beta.8 → 9.0.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 +426 -2
- package/README.md +5 -4
- package/dist/index.d.ts +128 -78
- package/lib/InlineDrawer.js +1 -0
- package/lib/InlineDrawer.js.map +1 -0
- package/lib/OverlayDrawer.js +1 -0
- package/lib/OverlayDrawer.js.map +1 -0
- package/lib/components/Drawer/Drawer.js +1 -1
- package/lib/components/Drawer/Drawer.js.map +1 -1
- package/lib/components/Drawer/Drawer.types.js.map +1 -1
- package/lib/components/Drawer/renderDrawer.js +4 -4
- package/lib/components/Drawer/renderDrawer.js.map +1 -1
- package/lib/components/Drawer/useDrawer.js +10 -10
- package/lib/components/Drawer/useDrawer.js.map +1 -1
- package/lib/components/DrawerBody/DrawerBody.js +1 -1
- package/lib/components/DrawerBody/DrawerBody.js.map +1 -1
- package/lib/components/DrawerBody/renderDrawerBody.js +4 -4
- package/lib/components/DrawerBody/renderDrawerBody.js.map +1 -1
- package/lib/components/DrawerBody/useDrawerBody.js +8 -3
- package/lib/components/DrawerBody/useDrawerBody.js.map +1 -1
- package/lib/components/DrawerBody/useDrawerBodyStyles.styles.js +3 -30
- package/lib/components/DrawerBody/useDrawerBodyStyles.styles.js.map +1 -1
- package/lib/components/DrawerFooter/DrawerFooter.js +3 -1
- package/lib/components/DrawerFooter/DrawerFooter.js.map +1 -1
- package/lib/components/DrawerFooter/renderDrawerFooter.js +4 -4
- package/lib/components/DrawerFooter/renderDrawerFooter.js.map +1 -1
- package/lib/components/DrawerFooter/useDrawerFooter.js +4 -2
- package/lib/components/DrawerFooter/useDrawerFooter.js.map +1 -1
- package/lib/components/DrawerFooter/useDrawerFooterStyles.styles.js +3 -16
- package/lib/components/DrawerFooter/useDrawerFooterStyles.styles.js.map +1 -1
- package/lib/components/DrawerHeader/DrawerHeader.js +1 -1
- package/lib/components/DrawerHeader/DrawerHeader.js.map +1 -1
- package/lib/components/DrawerHeader/renderDrawerHeader.js +4 -4
- package/lib/components/DrawerHeader/renderDrawerHeader.js.map +1 -1
- package/lib/components/DrawerHeader/useDrawerHeader.js +4 -2
- package/lib/components/DrawerHeader/useDrawerHeader.js.map +1 -1
- package/lib/components/DrawerHeader/useDrawerHeaderStyles.styles.js +3 -17
- package/lib/components/DrawerHeader/useDrawerHeaderStyles.styles.js.map +1 -1
- package/lib/components/DrawerHeaderNavigation/DrawerHeaderNavigation.js +1 -1
- package/lib/components/DrawerHeaderNavigation/DrawerHeaderNavigation.js.map +1 -1
- package/lib/components/DrawerHeaderNavigation/renderDrawerHeaderNavigation.js +4 -4
- package/lib/components/DrawerHeaderNavigation/renderDrawerHeaderNavigation.js.map +1 -1
- package/lib/components/DrawerHeaderNavigation/useDrawerHeaderNavigation.js +4 -2
- package/lib/components/DrawerHeaderNavigation/useDrawerHeaderNavigation.js.map +1 -1
- package/lib/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.js +3 -13
- package/lib/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.js.map +1 -1
- package/lib/components/DrawerHeaderTitle/DrawerHeaderTitle.js +1 -1
- package/lib/components/DrawerHeaderTitle/DrawerHeaderTitle.js.map +1 -1
- package/lib/components/DrawerHeaderTitle/DrawerHeaderTitle.types.js +1 -1
- package/lib/components/DrawerHeaderTitle/DrawerHeaderTitle.types.js.map +1 -1
- package/lib/components/DrawerHeaderTitle/renderDrawerHeaderTitle.js +9 -4
- package/lib/components/DrawerHeaderTitle/renderDrawerHeaderTitle.js.map +1 -1
- package/lib/components/DrawerHeaderTitle/useDrawerHeaderTitle.js +26 -15
- package/lib/components/DrawerHeaderTitle/useDrawerHeaderTitle.js.map +1 -1
- package/lib/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.js +1 -1
- package/lib/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.js.map +1 -1
- package/lib/components/InlineDrawer/InlineDrawer.js +16 -0
- package/lib/components/InlineDrawer/InlineDrawer.js.map +1 -0
- package/lib/components/InlineDrawer/InlineDrawer.types.js.map +1 -0
- package/lib/components/InlineDrawer/index.js +5 -0
- package/lib/components/InlineDrawer/index.js.map +1 -0
- package/lib/components/InlineDrawer/renderInlineDrawer.js +11 -0
- package/lib/components/InlineDrawer/renderInlineDrawer.js.map +1 -0
- package/lib/components/InlineDrawer/useInlineDrawer.js +32 -0
- package/lib/components/InlineDrawer/useInlineDrawer.js.map +1 -0
- package/lib/components/InlineDrawer/useInlineDrawerStyles.styles.js +64 -0
- package/lib/components/InlineDrawer/useInlineDrawerStyles.styles.js.map +1 -0
- package/lib/components/OverlayDrawer/OverlayDrawer.js +15 -0
- package/lib/components/OverlayDrawer/OverlayDrawer.js.map +1 -0
- package/lib/components/OverlayDrawer/OverlayDrawer.types.js.map +1 -0
- package/lib/components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.js +13 -0
- package/lib/components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.js.map +1 -0
- package/lib/components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.types.js.map +1 -0
- package/lib/components/OverlayDrawer/OverlayDrawerSurface/index.js +2 -0
- package/lib/components/OverlayDrawer/OverlayDrawerSurface/index.js.map +1 -0
- package/lib/components/OverlayDrawer/OverlayDrawerSurface/useOverlayDrawerSurfaceStyles.styles.js +29 -0
- package/lib/components/OverlayDrawer/OverlayDrawerSurface/useOverlayDrawerSurfaceStyles.styles.js.map +1 -0
- package/lib/components/OverlayDrawer/index.js +5 -0
- package/lib/components/OverlayDrawer/index.js.map +1 -0
- package/lib/components/OverlayDrawer/renderOverlayDrawer.js +13 -0
- package/lib/components/OverlayDrawer/renderOverlayDrawer.js.map +1 -0
- package/lib/components/OverlayDrawer/useOverlayDrawer.js +56 -0
- package/lib/components/OverlayDrawer/useOverlayDrawer.js.map +1 -0
- package/lib/components/OverlayDrawer/useOverlayDrawerStyles.styles.js +73 -0
- package/lib/components/OverlayDrawer/useOverlayDrawerStyles.styles.js.map +1 -0
- package/lib/e2e/DrawerShared.js +108 -0
- package/lib/e2e/DrawerShared.js.map +1 -0
- package/lib/index.js +3 -3
- package/lib/index.js.map +1 -1
- package/lib/shared/DrawerBase.types.js +1 -0
- package/lib/shared/DrawerBase.types.js.map +1 -0
- package/lib/shared/useDrawerBaseStyles.styles.js +96 -0
- package/lib/shared/useDrawerBaseStyles.styles.js.map +1 -0
- package/lib/shared/useDrawerDefaultProps.js +8 -0
- package/lib/shared/useDrawerDefaultProps.js.map +1 -0
- package/lib-commonjs/Drawer.js +2 -2
- package/lib-commonjs/Drawer.js.map +1 -1
- package/lib-commonjs/DrawerBody.js +2 -2
- package/lib-commonjs/DrawerBody.js.map +1 -1
- package/lib-commonjs/DrawerFooter.js +2 -2
- package/lib-commonjs/DrawerFooter.js.map +1 -1
- package/lib-commonjs/DrawerHeader.js +2 -2
- package/lib-commonjs/DrawerHeader.js.map +1 -1
- package/lib-commonjs/DrawerHeaderNavigation.js +2 -2
- package/lib-commonjs/DrawerHeaderNavigation.js.map +1 -1
- package/lib-commonjs/DrawerHeaderTitle.js +2 -2
- package/lib-commonjs/DrawerHeaderTitle.js.map +1 -1
- package/lib-commonjs/InlineDrawer.js +6 -0
- package/lib-commonjs/InlineDrawer.js.map +1 -0
- package/lib-commonjs/OverlayDrawer.js +6 -0
- package/lib-commonjs/OverlayDrawer.js.map +1 -0
- package/lib-commonjs/components/Drawer/Drawer.js +9 -7
- package/lib-commonjs/components/Drawer/Drawer.js.map +1 -1
- package/lib-commonjs/components/Drawer/index.js +6 -6
- package/lib-commonjs/components/Drawer/index.js.map +1 -1
- package/lib-commonjs/components/Drawer/renderDrawer.js +8 -6
- package/lib-commonjs/components/Drawer/renderDrawer.js.map +1 -1
- package/lib-commonjs/components/Drawer/useDrawer.js +15 -13
- package/lib-commonjs/components/Drawer/useDrawer.js.map +1 -1
- package/lib-commonjs/components/Drawer/useDrawerStyles.styles.js +6 -2
- package/lib-commonjs/components/Drawer/useDrawerStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DrawerBody/DrawerBody.js +9 -7
- package/lib-commonjs/components/DrawerBody/DrawerBody.js.map +1 -1
- package/lib-commonjs/components/DrawerBody/index.js +6 -6
- package/lib-commonjs/components/DrawerBody/index.js.map +1 -1
- package/lib-commonjs/components/DrawerBody/renderDrawerBody.js +7 -6
- package/lib-commonjs/components/DrawerBody/renderDrawerBody.js.map +1 -1
- package/lib-commonjs/components/DrawerBody/useDrawerBody.js +13 -6
- package/lib-commonjs/components/DrawerBody/useDrawerBody.js.map +1 -1
- package/lib-commonjs/components/DrawerBody/useDrawerBodyStyles.styles.js +15 -66
- package/lib-commonjs/components/DrawerBody/useDrawerBodyStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DrawerFooter/DrawerFooter.js +9 -5
- package/lib-commonjs/components/DrawerFooter/DrawerFooter.js.map +1 -1
- package/lib-commonjs/components/DrawerFooter/index.js +6 -6
- package/lib-commonjs/components/DrawerFooter/index.js.map +1 -1
- package/lib-commonjs/components/DrawerFooter/renderDrawerFooter.js +7 -6
- package/lib-commonjs/components/DrawerFooter/renderDrawerFooter.js.map +1 -1
- package/lib-commonjs/components/DrawerFooter/useDrawerFooter.js +9 -5
- package/lib-commonjs/components/DrawerFooter/useDrawerFooter.js.map +1 -1
- package/lib-commonjs/components/DrawerFooter/useDrawerFooterStyles.styles.js +11 -32
- package/lib-commonjs/components/DrawerFooter/useDrawerFooterStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DrawerHeader/DrawerHeader.js +9 -7
- package/lib-commonjs/components/DrawerHeader/DrawerHeader.js.map +1 -1
- package/lib-commonjs/components/DrawerHeader/index.js +6 -6
- package/lib-commonjs/components/DrawerHeader/index.js.map +1 -1
- package/lib-commonjs/components/DrawerHeader/renderDrawerHeader.js +7 -6
- package/lib-commonjs/components/DrawerHeader/renderDrawerHeader.js.map +1 -1
- package/lib-commonjs/components/DrawerHeader/useDrawerHeader.js +9 -5
- package/lib-commonjs/components/DrawerHeader/useDrawerHeader.js.map +1 -1
- package/lib-commonjs/components/DrawerHeader/useDrawerHeaderStyles.styles.js +11 -34
- package/lib-commonjs/components/DrawerHeader/useDrawerHeaderStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DrawerHeaderNavigation/DrawerHeaderNavigation.js +9 -7
- package/lib-commonjs/components/DrawerHeaderNavigation/DrawerHeaderNavigation.js.map +1 -1
- package/lib-commonjs/components/DrawerHeaderNavigation/index.js +6 -6
- package/lib-commonjs/components/DrawerHeaderNavigation/index.js.map +1 -1
- package/lib-commonjs/components/DrawerHeaderNavigation/renderDrawerHeaderNavigation.js +7 -6
- package/lib-commonjs/components/DrawerHeaderNavigation/renderDrawerHeaderNavigation.js.map +1 -1
- package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigation.js +9 -5
- package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigation.js.map +1 -1
- package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.js +11 -26
- package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DrawerHeaderTitle/DrawerHeaderTitle.js +9 -7
- package/lib-commonjs/components/DrawerHeaderTitle/DrawerHeaderTitle.js.map +1 -1
- package/lib-commonjs/components/DrawerHeaderTitle/DrawerHeaderTitle.types.js +0 -2
- package/lib-commonjs/components/DrawerHeaderTitle/DrawerHeaderTitle.types.js.map +1 -1
- package/lib-commonjs/components/DrawerHeaderTitle/index.js +6 -6
- package/lib-commonjs/components/DrawerHeaderTitle/index.js.map +1 -1
- package/lib-commonjs/components/DrawerHeaderTitle/renderDrawerHeaderTitle.js +12 -6
- package/lib-commonjs/components/DrawerHeaderTitle/renderDrawerHeaderTitle.js.map +1 -1
- package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitle.js +31 -18
- package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitle.js.map +1 -1
- package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.js +14 -10
- package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.js.map +1 -1
- package/lib-commonjs/components/InlineDrawer/InlineDrawer.js +24 -0
- package/lib-commonjs/components/InlineDrawer/InlineDrawer.js.map +1 -0
- package/lib-commonjs/components/InlineDrawer/index.js +10 -0
- package/lib-commonjs/components/InlineDrawer/index.js.map +1 -0
- package/lib-commonjs/components/InlineDrawer/renderInlineDrawer.js +19 -0
- package/lib-commonjs/components/InlineDrawer/renderInlineDrawer.js.map +1 -0
- package/lib-commonjs/components/InlineDrawer/useInlineDrawer.js +35 -0
- package/lib-commonjs/components/InlineDrawer/useInlineDrawer.js.map +1 -0
- package/lib-commonjs/components/InlineDrawer/useInlineDrawerStyles.styles.js +122 -0
- package/lib-commonjs/components/InlineDrawer/useInlineDrawerStyles.styles.js.map +1 -0
- package/lib-commonjs/components/OverlayDrawer/OverlayDrawer.js +24 -0
- package/lib-commonjs/components/OverlayDrawer/OverlayDrawer.js.map +1 -0
- package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.js +21 -0
- package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.js.map +1 -0
- package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/index.js +7 -0
- package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/index.js.map +1 -0
- package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/useOverlayDrawerSurfaceStyles.styles.js +46 -0
- package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/useOverlayDrawerSurfaceStyles.styles.js.map +1 -0
- package/lib-commonjs/components/OverlayDrawer/index.js +10 -0
- package/lib-commonjs/components/OverlayDrawer/index.js.map +1 -0
- package/lib-commonjs/components/OverlayDrawer/renderOverlayDrawer.js +21 -0
- package/lib-commonjs/components/OverlayDrawer/renderOverlayDrawer.js.map +1 -0
- package/lib-commonjs/components/OverlayDrawer/useOverlayDrawer.js +59 -0
- package/lib-commonjs/components/OverlayDrawer/useOverlayDrawer.js.map +1 -0
- package/lib-commonjs/components/OverlayDrawer/useOverlayDrawerStyles.styles.js +112 -0
- package/lib-commonjs/components/OverlayDrawer/useOverlayDrawerStyles.styles.js.map +1 -0
- package/lib-commonjs/e2e/DrawerShared.js +119 -0
- package/lib-commonjs/e2e/DrawerShared.js.map +1 -0
- package/lib-commonjs/index.js +125 -46
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/shared/DrawerBase.types.js +6 -0
- package/lib-commonjs/shared/DrawerBase.types.js.map +1 -0
- package/lib-commonjs/shared/useDrawerBaseStyles.styles.js +165 -0
- package/lib-commonjs/shared/useDrawerBaseStyles.styles.js.map +1 -0
- package/lib-commonjs/shared/useDrawerDefaultProps.js +18 -0
- package/lib-commonjs/shared/useDrawerDefaultProps.js.map +1 -0
- package/package.json +23 -16
- package/CHANGELOG.json +0 -267
- package/lib/DrawerInline.js +0 -1
- package/lib/DrawerInline.js.map +0 -1
- package/lib/DrawerOverlay.js +0 -1
- package/lib/DrawerOverlay.js.map +0 -1
- package/lib/components/DrawerInline/DrawerInline.js +0 -13
- package/lib/components/DrawerInline/DrawerInline.js.map +0 -1
- package/lib/components/DrawerInline/DrawerInline.types.js.map +0 -1
- package/lib/components/DrawerInline/index.js +0 -5
- package/lib/components/DrawerInline/index.js.map +0 -1
- package/lib/components/DrawerInline/renderDrawerInline.js +0 -11
- package/lib/components/DrawerInline/renderDrawerInline.js.map +0 -1
- package/lib/components/DrawerInline/useDrawerInline.js +0 -33
- package/lib/components/DrawerInline/useDrawerInline.js.map +0 -1
- package/lib/components/DrawerInline/useDrawerInlineStyles.styles.js +0 -43
- package/lib/components/DrawerInline/useDrawerInlineStyles.styles.js.map +0 -1
- package/lib/components/DrawerOverlay/DrawerOverlay.js +0 -12
- package/lib/components/DrawerOverlay/DrawerOverlay.js.map +0 -1
- package/lib/components/DrawerOverlay/DrawerOverlay.types.js.map +0 -1
- package/lib/components/DrawerOverlay/index.js +0 -5
- package/lib/components/DrawerOverlay/index.js.map +0 -1
- package/lib/components/DrawerOverlay/renderDrawerOverlay.js +0 -9
- package/lib/components/DrawerOverlay/renderDrawerOverlay.js.map +0 -1
- package/lib/components/DrawerOverlay/useDrawerOverlay.js +0 -35
- package/lib/components/DrawerOverlay/useDrawerOverlay.js.map +0 -1
- package/lib/components/DrawerOverlay/useDrawerOverlayStyles.styles.js +0 -33
- package/lib/components/DrawerOverlay/useDrawerOverlayStyles.styles.js.map +0 -1
- package/lib/util/DrawerBase.types.js.map +0 -1
- package/lib/util/getDefaultDrawerProps.js +0 -9
- package/lib/util/getDefaultDrawerProps.js.map +0 -1
- package/lib/util/useDrawerBaseStyles.styles.js +0 -55
- package/lib/util/useDrawerBaseStyles.styles.js.map +0 -1
- package/lib-commonjs/DrawerInline.js +0 -6
- package/lib-commonjs/DrawerInline.js.map +0 -1
- package/lib-commonjs/DrawerOverlay.js +0 -6
- package/lib-commonjs/DrawerOverlay.js.map +0 -1
- package/lib-commonjs/components/DrawerInline/DrawerInline.js +0 -19
- package/lib-commonjs/components/DrawerInline/DrawerInline.js.map +0 -1
- package/lib-commonjs/components/DrawerInline/index.js +0 -10
- package/lib-commonjs/components/DrawerInline/index.js.map +0 -1
- package/lib-commonjs/components/DrawerInline/renderDrawerInline.js +0 -18
- package/lib-commonjs/components/DrawerInline/renderDrawerInline.js.map +0 -1
- package/lib-commonjs/components/DrawerInline/useDrawerInline.js +0 -34
- package/lib-commonjs/components/DrawerInline/useDrawerInline.js.map +0 -1
- package/lib-commonjs/components/DrawerInline/useDrawerInlineStyles.styles.js +0 -83
- package/lib-commonjs/components/DrawerInline/useDrawerInlineStyles.styles.js.map +0 -1
- package/lib-commonjs/components/DrawerOverlay/DrawerOverlay.js +0 -19
- package/lib-commonjs/components/DrawerOverlay/DrawerOverlay.js.map +0 -1
- package/lib-commonjs/components/DrawerOverlay/index.js +0 -10
- package/lib-commonjs/components/DrawerOverlay/index.js.map +0 -1
- package/lib-commonjs/components/DrawerOverlay/renderDrawerOverlay.js +0 -16
- package/lib-commonjs/components/DrawerOverlay/renderDrawerOverlay.js.map +0 -1
- package/lib-commonjs/components/DrawerOverlay/useDrawerOverlay.js +0 -36
- package/lib-commonjs/components/DrawerOverlay/useDrawerOverlay.js.map +0 -1
- package/lib-commonjs/components/DrawerOverlay/useDrawerOverlayStyles.styles.js +0 -47
- package/lib-commonjs/components/DrawerOverlay/useDrawerOverlayStyles.styles.js.map +0 -1
- package/lib-commonjs/util/getDefaultDrawerProps.js +0 -17
- package/lib-commonjs/util/getDefaultDrawerProps.js.map +0 -1
- package/lib-commonjs/util/useDrawerBaseStyles.styles.js +0 -125
- package/lib-commonjs/util/useDrawerBaseStyles.styles.js.map +0 -1
- /package/lib/components/{DrawerInline/DrawerInline.types.js → InlineDrawer/InlineDrawer.types.js} +0 -0
- /package/lib/components/{DrawerOverlay/DrawerOverlay.types.js → OverlayDrawer/OverlayDrawer.types.js} +0 -0
- /package/lib/{util/DrawerBase.types.js → components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.types.js} +0 -0
- /package/lib-commonjs/components/{DrawerInline/DrawerInline.types.js → InlineDrawer/InlineDrawer.types.js} +0 -0
- /package/lib-commonjs/components/{DrawerInline/DrawerInline.types.js.map → InlineDrawer/InlineDrawer.types.js.map} +0 -0
- /package/lib-commonjs/components/{DrawerOverlay/DrawerOverlay.types.js → OverlayDrawer/OverlayDrawer.types.js} +0 -0
- /package/lib-commonjs/components/{DrawerOverlay/DrawerOverlay.types.js.map → OverlayDrawer/OverlayDrawer.types.js.map} +0 -0
- /package/lib-commonjs/{util/DrawerBase.types.js → components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.types.js} +0 -0
- /package/lib-commonjs/{util/DrawerBase.types.js.map → components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.types.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import type { ComponentProps } from '@fluentui/react-utilities';
|
|
4
4
|
import type { ComponentState } from '@fluentui/react-utilities';
|
|
5
|
-
import { DialogProps } from '@fluentui/react-dialog';
|
|
6
|
-
import {
|
|
7
|
-
import { DialogSurfaceSlots } from '@fluentui/react-dialog';
|
|
8
|
-
import { DialogTitleSlots } from '@fluentui/react-dialog';
|
|
5
|
+
import type { DialogProps } from '@fluentui/react-dialog';
|
|
6
|
+
import type { DialogSurfaceSlots } from '@fluentui/react-dialog';
|
|
9
7
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
|
10
8
|
import * as React_2 from 'react';
|
|
11
9
|
import type { Slot } from '@fluentui/react-utilities';
|
|
@@ -20,9 +18,9 @@ declare type DrawerBaseProps = {
|
|
|
20
18
|
/**
|
|
21
19
|
* Position of the drawer.
|
|
22
20
|
*
|
|
23
|
-
* @default '
|
|
21
|
+
* @default 'start'
|
|
24
22
|
*/
|
|
25
|
-
position?: '
|
|
23
|
+
position?: 'start' | 'end';
|
|
26
24
|
/**
|
|
27
25
|
* Size of the drawer.
|
|
28
26
|
*
|
|
@@ -40,12 +38,10 @@ declare type DrawerBaseProps = {
|
|
|
40
38
|
* @default false
|
|
41
39
|
*/
|
|
42
40
|
open?: boolean;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
*/
|
|
48
|
-
defaultOpen?: boolean;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
declare type DrawerBaseState = Required<Pick<DrawerBaseProps, 'position' | 'size'>> & {
|
|
44
|
+
motion: MotionState<HTMLDivElement>;
|
|
49
45
|
};
|
|
50
46
|
|
|
51
47
|
/**
|
|
@@ -70,7 +66,7 @@ export declare type DrawerBodySlots = {
|
|
|
70
66
|
export declare type DrawerBodyState = ComponentState<DrawerBodySlots>;
|
|
71
67
|
|
|
72
68
|
/**
|
|
73
|
-
* DrawerFooter
|
|
69
|
+
* DrawerFooter provides a structured footer for the drawer component.
|
|
74
70
|
*/
|
|
75
71
|
export declare const DrawerFooter: ForwardRefComponent<DrawerFooterProps>;
|
|
76
72
|
|
|
@@ -145,13 +141,7 @@ export declare const drawerHeaderTitleClassNames: SlotClassNames<DrawerHeaderTit
|
|
|
145
141
|
/**
|
|
146
142
|
* DrawerHeaderTitle Props
|
|
147
143
|
*/
|
|
148
|
-
export declare type DrawerHeaderTitleProps = ComponentProps<DrawerHeaderTitleSlots
|
|
149
|
-
/**
|
|
150
|
-
* Content of the DrawerHeaderTitle
|
|
151
|
-
* Children is mandatory because DrawerHeaderTitle is a wrapper component
|
|
152
|
-
*/
|
|
153
|
-
children: React_2.ReactNode | undefined;
|
|
154
|
-
};
|
|
144
|
+
export declare type DrawerHeaderTitleProps = ComponentProps<DrawerHeaderTitleSlots>;
|
|
155
145
|
|
|
156
146
|
export declare type DrawerHeaderTitleSlots = {
|
|
157
147
|
root: Slot<'div'>;
|
|
@@ -159,11 +149,11 @@ export declare type DrawerHeaderTitleSlots = {
|
|
|
159
149
|
* By default this is a h2, but can be any heading or div.
|
|
160
150
|
* If `div` is provided do not forget to also provide proper `role="heading"` and `aria-level` attributes
|
|
161
151
|
*/
|
|
162
|
-
heading?:
|
|
152
|
+
heading?: Slot<'h2', 'h1' | 'h3' | 'h4' | 'h5' | 'h6' | 'div'>;
|
|
163
153
|
/**
|
|
164
154
|
* Action slot for the close button
|
|
165
155
|
*/
|
|
166
|
-
action?:
|
|
156
|
+
action?: Slot<'div'>;
|
|
167
157
|
};
|
|
168
158
|
|
|
169
159
|
/**
|
|
@@ -172,17 +162,44 @@ export declare type DrawerHeaderTitleSlots = {
|
|
|
172
162
|
export declare type DrawerHeaderTitleState = ComponentState<DrawerHeaderTitleSlots>;
|
|
173
163
|
|
|
174
164
|
/**
|
|
175
|
-
*
|
|
165
|
+
* Drawer Props
|
|
166
|
+
*/
|
|
167
|
+
export declare type DrawerProps = ComponentProps<DrawerSlots> & {
|
|
168
|
+
/**
|
|
169
|
+
* Type of the drawer.
|
|
170
|
+
*
|
|
171
|
+
* - 'overlay' - Drawer is hidden by default and can be opened by clicking on the trigger.
|
|
172
|
+
* - 'inline' - Drawer is stacked with the content
|
|
173
|
+
*
|
|
174
|
+
* @default overlay
|
|
175
|
+
*/
|
|
176
|
+
type?: 'inline' | 'overlay';
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
export declare type DrawerSlots = {
|
|
180
|
+
/**
|
|
181
|
+
* Root slot of the Drawer.
|
|
182
|
+
*/
|
|
183
|
+
root: Slot<OverlayDrawerProps | InlineDrawerProps>;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* State used in rendering Drawer
|
|
188
|
+
*/
|
|
189
|
+
export declare type DrawerState = ComponentState<DrawerSlots>;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* InlineDrawer is often used for navigation that is not dismissible. As it is on the same level as
|
|
176
193
|
* the main surface, users can still interact with other UI elements.
|
|
177
194
|
*/
|
|
178
|
-
export declare const
|
|
195
|
+
export declare const InlineDrawer: ForwardRefComponent<InlineDrawerProps>;
|
|
179
196
|
|
|
180
|
-
export declare const
|
|
197
|
+
export declare const inlineDrawerClassNames: SlotClassNames<InlineDrawerSlots>;
|
|
181
198
|
|
|
182
199
|
/**
|
|
183
|
-
*
|
|
200
|
+
* InlineDrawer Props
|
|
184
201
|
*/
|
|
185
|
-
export declare type
|
|
202
|
+
export declare type InlineDrawerProps = ComponentProps<InlineDrawerSlots> & DrawerBaseProps & {
|
|
186
203
|
/**
|
|
187
204
|
* Whether the drawer has a separator line.
|
|
188
205
|
*
|
|
@@ -191,63 +208,91 @@ export declare type DrawerInlineProps = ComponentProps<DrawerInlineSlots> & Draw
|
|
|
191
208
|
separator?: boolean;
|
|
192
209
|
};
|
|
193
210
|
|
|
194
|
-
export declare type
|
|
211
|
+
export declare type InlineDrawerSlots = {
|
|
195
212
|
root: Slot<'div'>;
|
|
196
213
|
};
|
|
197
214
|
|
|
198
215
|
/**
|
|
199
|
-
* State used in rendering
|
|
216
|
+
* State used in rendering InlineDrawer
|
|
200
217
|
*/
|
|
201
|
-
export declare type
|
|
218
|
+
export declare type InlineDrawerState = Required<ComponentState<InlineDrawerSlots> & DrawerBaseState & Pick<InlineDrawerProps, 'separator'>>;
|
|
219
|
+
|
|
220
|
+
declare type MotionState<Element extends HTMLElement = HTMLElement> = {
|
|
221
|
+
/**
|
|
222
|
+
* Ref to the element.
|
|
223
|
+
*/
|
|
224
|
+
ref: React_2.Ref<Element>;
|
|
225
|
+
/**
|
|
226
|
+
* Current state of the element.
|
|
227
|
+
*
|
|
228
|
+
* - `unmounted` - The element is not yet rendered or can be safely removed from the DOM.
|
|
229
|
+
* - `entering` - The element is performing enter animation.
|
|
230
|
+
* - `entered` - The element has finished enter animation.
|
|
231
|
+
* - `idle` - The element is currently not animating, but rendered on screen.
|
|
232
|
+
* - `exiting` - The element is performing exit animation.
|
|
233
|
+
* - `exited` - The element has finished exit animation.
|
|
234
|
+
*/
|
|
235
|
+
type: MotionType;
|
|
236
|
+
/**
|
|
237
|
+
* Indicates whether the component can be rendered.
|
|
238
|
+
* Useful to render the element before animating it or to remove it from the DOM after exit animation.
|
|
239
|
+
*/
|
|
240
|
+
canRender: boolean;
|
|
241
|
+
/**
|
|
242
|
+
* Indicates whether the component is ready to receive a CSS transition className.
|
|
243
|
+
* Useful to apply CSS transitions when the element is mounted and ready to be animated.
|
|
244
|
+
*/
|
|
245
|
+
active: boolean;
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
declare type MotionType = 'entering' | 'entered' | 'idle' | 'exiting' | 'exited' | 'unmounted';
|
|
202
249
|
|
|
203
250
|
/**
|
|
204
|
-
*
|
|
251
|
+
* OverlayDrawer contains supplementary content and are used for complex creation, edit, or management experiences.
|
|
205
252
|
*/
|
|
206
|
-
export declare const
|
|
253
|
+
export declare const OverlayDrawer: ForwardRefComponent<OverlayDrawerProps>;
|
|
207
254
|
|
|
208
|
-
export declare const
|
|
255
|
+
export declare const overlayDrawerClassNames: SlotClassNames<OverlayDrawerSurfaceSlots>;
|
|
209
256
|
|
|
210
257
|
/**
|
|
211
|
-
*
|
|
258
|
+
* OverlayDrawer internal slots for when using with composition API
|
|
212
259
|
*/
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
260
|
+
declare type OverlayDrawerInternalSlots = OverlayDrawerSlots & {
|
|
261
|
+
/**
|
|
262
|
+
* Slot for the dialog component that wraps the drawer.
|
|
263
|
+
*/
|
|
264
|
+
dialog: Slot<DialogProps>;
|
|
217
265
|
};
|
|
218
266
|
|
|
219
267
|
/**
|
|
220
|
-
*
|
|
268
|
+
* OverlayDrawer Props
|
|
221
269
|
*/
|
|
222
|
-
export declare type
|
|
223
|
-
dialog: DialogProps;
|
|
224
|
-
};
|
|
270
|
+
export declare type OverlayDrawerProps = ComponentProps<OverlayDrawerSlots> & Pick<DialogProps, 'modalType' | 'onOpenChange' | 'inertTrapFocus' | 'defaultOpen'> & DrawerBaseProps;
|
|
225
271
|
|
|
226
272
|
/**
|
|
227
|
-
*
|
|
273
|
+
* OverlayDrawer slots
|
|
228
274
|
*/
|
|
229
|
-
export declare type
|
|
275
|
+
export declare type OverlayDrawerSlots = {
|
|
230
276
|
/**
|
|
231
|
-
*
|
|
232
|
-
* @default overlay
|
|
233
|
-
*
|
|
234
|
-
* - 'overlay' - Drawer is hidden by default and can be opened by clicking on the trigger.
|
|
235
|
-
* - 'inline' - Drawer is stacked with the content
|
|
277
|
+
* Slot for the root element.
|
|
236
278
|
*/
|
|
237
|
-
|
|
279
|
+
root: Slot<OverlayDrawerSurfaceProps>;
|
|
238
280
|
};
|
|
239
281
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
root: Slot<DrawerOverlayProps | DrawerInlineProps>;
|
|
245
|
-
};
|
|
282
|
+
/**
|
|
283
|
+
* State used in rendering OverlayDrawer
|
|
284
|
+
*/
|
|
285
|
+
export declare type OverlayDrawerState = Omit<ComponentState<OverlayDrawerInternalSlots>, 'backdrop'> & Required<DrawerBaseState>;
|
|
246
286
|
|
|
247
287
|
/**
|
|
248
|
-
*
|
|
288
|
+
* OverlayDrawerSurface Props
|
|
249
289
|
*/
|
|
250
|
-
|
|
290
|
+
declare type OverlayDrawerSurfaceProps = ComponentProps<OverlayDrawerSurfaceSlots>;
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* OverlayDrawerSurface slots
|
|
294
|
+
*/
|
|
295
|
+
declare type OverlayDrawerSurfaceSlots = DialogSurfaceSlots;
|
|
251
296
|
|
|
252
297
|
/**
|
|
253
298
|
* Render the final JSX of Drawer
|
|
@@ -280,14 +325,14 @@ export declare const renderDrawerHeaderNavigation_unstable: (state: DrawerHeader
|
|
|
280
325
|
export declare const renderDrawerHeaderTitle_unstable: (state: DrawerHeaderTitleState) => JSX.Element;
|
|
281
326
|
|
|
282
327
|
/**
|
|
283
|
-
* Render the final JSX of
|
|
328
|
+
* Render the final JSX of InlineDrawer
|
|
284
329
|
*/
|
|
285
|
-
export declare const
|
|
330
|
+
export declare const renderInlineDrawer_unstable: (state: InlineDrawerState) => JSX.Element | null;
|
|
286
331
|
|
|
287
332
|
/**
|
|
288
|
-
* Render the final JSX of
|
|
333
|
+
* Render the final JSX of OverlayDrawer
|
|
289
334
|
*/
|
|
290
|
-
export declare const
|
|
335
|
+
export declare const renderOverlayDrawer_unstable: (state: OverlayDrawerState) => JSX.Element | null;
|
|
291
336
|
|
|
292
337
|
/**
|
|
293
338
|
* Create the state required to render Drawer.
|
|
@@ -381,35 +426,40 @@ export declare const useDrawerHeaderTitle_unstable: (props: DrawerHeaderTitlePro
|
|
|
381
426
|
export declare const useDrawerHeaderTitleStyles_unstable: (state: DrawerHeaderTitleState) => DrawerHeaderTitleState;
|
|
382
427
|
|
|
383
428
|
/**
|
|
384
|
-
*
|
|
429
|
+
* Apply styling to the Drawer slots based on the state
|
|
430
|
+
*/
|
|
431
|
+
export declare const useDrawerStyles_unstable: (state: DrawerState) => DrawerState;
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Create the state required to render InlineDrawer.
|
|
385
435
|
*
|
|
386
|
-
* The returned state can be modified with hooks such as
|
|
387
|
-
* before being passed to
|
|
436
|
+
* The returned state can be modified with hooks such as useInlineDrawerStyles_unstable,
|
|
437
|
+
* before being passed to renderInlineDrawer_unstable.
|
|
388
438
|
*
|
|
389
|
-
* @param props - props from this instance of
|
|
390
|
-
* @param ref - reference to root HTMLElement of
|
|
439
|
+
* @param props - props from this instance of InlineDrawer
|
|
440
|
+
* @param ref - reference to root HTMLElement of InlineDrawer
|
|
391
441
|
*/
|
|
392
|
-
export declare const
|
|
442
|
+
export declare const useInlineDrawer_unstable: (props: InlineDrawerProps, ref: React_2.Ref<HTMLDivElement>) => InlineDrawerState;
|
|
393
443
|
|
|
394
444
|
/**
|
|
395
|
-
* Apply styling to the
|
|
445
|
+
* Apply styling to the InlineDrawer slots based on the state
|
|
396
446
|
*/
|
|
397
|
-
export declare const
|
|
447
|
+
export declare const useInlineDrawerStyles_unstable: (state: InlineDrawerState) => InlineDrawerState;
|
|
398
448
|
|
|
399
449
|
/**
|
|
400
|
-
* Create the state required to render
|
|
450
|
+
* Create the state required to render OverlayDrawer.
|
|
401
451
|
*
|
|
402
|
-
* The returned state can be modified with hooks such as
|
|
403
|
-
* before being passed to
|
|
452
|
+
* The returned state can be modified with hooks such as useOverlayDrawerStyles_unstable,
|
|
453
|
+
* before being passed to renderOverlayDrawer_unstable.
|
|
404
454
|
*
|
|
405
|
-
* @param props - props from this instance of
|
|
406
|
-
* @param ref - reference to root
|
|
455
|
+
* @param props - props from this instance of OverlayDrawer
|
|
456
|
+
* @param ref - reference to root HTMLDivElement of OverlayDrawer
|
|
407
457
|
*/
|
|
408
|
-
export declare const
|
|
458
|
+
export declare const useOverlayDrawer_unstable: (props: OverlayDrawerProps, ref: React_2.Ref<HTMLDivElement>) => OverlayDrawerState;
|
|
409
459
|
|
|
410
460
|
/**
|
|
411
|
-
* Apply styling to the
|
|
461
|
+
* Apply styling to the OverlayDrawer slots based on the state
|
|
412
462
|
*/
|
|
413
|
-
export declare const
|
|
463
|
+
export declare const useOverlayDrawerStyles_unstable: (state: OverlayDrawerState) => OverlayDrawerState;
|
|
414
464
|
|
|
415
465
|
export { }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/InlineDrawer/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["InlineDrawer.ts"],"sourcesContent":["export * from './components/InlineDrawer/index';\n"],"names":[],"mappings":"AAAA,cAAc,kCAAkC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/OverlayDrawer/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["OverlayDrawer.ts"],"sourcesContent":["export * from './components/OverlayDrawer/index';\n"],"names":[],"mappings":"AAAA,cAAc,mCAAmC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
2
3
|
import { useDrawer_unstable } from './useDrawer';
|
|
3
4
|
import { renderDrawer_unstable } from './renderDrawer';
|
|
4
5
|
import { useDrawerStyles_unstable } from './useDrawerStyles.styles';
|
|
5
|
-
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
6
6
|
/**
|
|
7
7
|
* Drawer contains supplementary content and are used for complex creation, edit, or management experiences.
|
|
8
8
|
*/ export const Drawer = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Drawer.tsx"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["Drawer.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\nimport { useDrawer_unstable } from './useDrawer';\nimport { renderDrawer_unstable } from './renderDrawer';\nimport { useDrawerStyles_unstable } from './useDrawerStyles.styles';\nimport type { DrawerProps } from './Drawer.types';\n\n/**\n * Drawer contains supplementary content and are used for complex creation, edit, or management experiences.\n */\nexport const Drawer: ForwardRefComponent<DrawerProps> = React.forwardRef((props, ref) => {\n const state = useDrawer_unstable(props, ref);\n\n useDrawerStyles_unstable(state);\n useCustomStyleHook_unstable('useDrawerStyles_unstable')(state);\n\n return renderDrawer_unstable(state);\n});\n\nDrawer.displayName = 'Drawer';\n"],"names":["React","useCustomStyleHook_unstable","useDrawer_unstable","renderDrawer_unstable","useDrawerStyles_unstable","Drawer","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E,SAASC,kBAAkB,QAAQ,cAAc;AACjD,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SAASC,wBAAwB,QAAQ,2BAA2B;AAGpE;;CAEC,GACD,OAAO,MAAMC,uBAA2CL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC/E,MAAMC,QAAQP,mBAAmBK,OAAOC;IAExCJ,yBAAyBK;IACzBR,4BAA4B,4BAA4BQ;IAExD,OAAON,sBAAsBM;AAC/B,GAAG;AAEHJ,OAAOK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Drawer.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport {
|
|
1
|
+
{"version":3,"sources":["Drawer.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nimport type { OverlayDrawerProps } from '../OverlayDrawer';\nimport type { InlineDrawerProps } from '../InlineDrawer';\n\nexport type DrawerSlots = {\n /**\n * Root slot of the Drawer.\n */\n root: Slot<OverlayDrawerProps | InlineDrawerProps>;\n};\n\n/**\n * Drawer Props\n */\nexport type DrawerProps = ComponentProps<DrawerSlots> & {\n /**\n * Type of the drawer.\n *\n * - 'overlay' - Drawer is hidden by default and can be opened by clicking on the trigger.\n * - 'inline' - Drawer is stacked with the content\n *\n * @default overlay\n */\n type?: 'inline' | 'overlay';\n};\n\n/**\n * State used in rendering Drawer\n */\nexport type DrawerState = ComponentState<DrawerSlots>;\n"],"names":[],"mappings":"AAAA,WA8BsD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
+
import { assertSlots } from '@fluentui/react-utilities';
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of Drawer
|
|
5
5
|
*/ export const renderDrawer_unstable = (state)=>{
|
|
6
|
-
|
|
7
|
-
return /*#__PURE__*/
|
|
6
|
+
assertSlots(state);
|
|
7
|
+
return /*#__PURE__*/ _jsx(state.root, {});
|
|
8
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderDrawer.tsx"],"sourcesContent":["/** @jsxRuntime
|
|
1
|
+
{"version":3,"sources":["renderDrawer.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\n\nimport type { DrawerState, DrawerSlots } from './Drawer.types';\n\n/**\n * Render the final JSX of Drawer\n */\nexport const renderDrawer_unstable = (state: DrawerState) => {\n assertSlots<DrawerSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderDrawer_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,wBAAwB,CAACC;IACpCF,YAAyBE;IAEzB,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { slot } from '@fluentui/react-utilities';
|
|
3
|
+
import { OverlayDrawer } from '../OverlayDrawer';
|
|
4
|
+
import { InlineDrawer } from '../InlineDrawer';
|
|
5
5
|
/**
|
|
6
6
|
* Create the state required to render Drawer.
|
|
7
7
|
*
|
|
@@ -11,16 +11,16 @@ import { DrawerInline } from '../DrawerInline/DrawerInline';
|
|
|
11
11
|
* @param props - props from this instance of Drawer
|
|
12
12
|
* @param ref - reference to root HTMLElement of Drawer
|
|
13
13
|
*/ export const useDrawer_unstable = (props, ref)=>{
|
|
14
|
-
const
|
|
14
|
+
const elementType = props.type === 'inline' ? InlineDrawer : OverlayDrawer;
|
|
15
15
|
return {
|
|
16
16
|
components: {
|
|
17
|
-
root:
|
|
17
|
+
root: elementType
|
|
18
18
|
},
|
|
19
|
-
root: resolveShorthand(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
root: slot.always(slot.resolveShorthand({
|
|
20
|
+
ref,
|
|
21
|
+
...props
|
|
22
|
+
}), {
|
|
23
|
+
elementType
|
|
24
24
|
})
|
|
25
25
|
};
|
|
26
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDrawer.ts"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["useDrawer.ts"],"sourcesContent":["import * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\n\nimport type { DrawerProps, DrawerState } from './Drawer.types';\nimport { OverlayDrawer } from '../OverlayDrawer';\nimport { InlineDrawer } 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 const elementType = props.type === 'inline' ? InlineDrawer : OverlayDrawer;\n\n return {\n components: {\n root: elementType,\n },\n\n root: slot.always<DrawerProps>(\n slot.resolveShorthand({\n ref,\n ...props,\n }),\n {\n elementType,\n },\n ),\n };\n};\n"],"names":["React","slot","OverlayDrawer","InlineDrawer","useDrawer_unstable","props","ref","elementType","type","components","root","always","resolveShorthand"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,IAAI,QAAQ,4BAA4B;AAGjD,SAASC,aAAa,QAAQ,mBAAmB;AACjD,SAASC,YAAY,QAAQ,kBAAkB;AAE/C;;;;;;;;CAQC,GACD,OAAO,MAAMC,qBAAqB,CAACC,OAAoBC;IACrD,MAAMC,cAAcF,MAAMG,IAAI,KAAK,WAAWL,eAAeD;IAE7D,OAAO;QACLO,YAAY;YACVC,MAAMH;QACR;QAEAG,MAAMT,KAAKU,MAAM,CACfV,KAAKW,gBAAgB,CAAC;YACpBN;YACA,GAAGD,KAAK;QACV,IACA;YACEE;QACF;IAEJ;AACF,EAAE"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
2
3
|
import { useDrawerBody_unstable } from './useDrawerBody';
|
|
3
4
|
import { renderDrawerBody_unstable } from './renderDrawerBody';
|
|
4
5
|
import { useDrawerBodyStyles_unstable } from './useDrawerBodyStyles.styles';
|
|
5
|
-
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
6
6
|
/**
|
|
7
7
|
* DrawerBody provides with a container for the main content of a Drawer.
|
|
8
8
|
*/ export const DrawerBody = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DrawerBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["DrawerBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\nimport { useDrawerBody_unstable } from './useDrawerBody';\nimport { renderDrawerBody_unstable } from './renderDrawerBody';\nimport { useDrawerBodyStyles_unstable } from './useDrawerBodyStyles.styles';\nimport type { DrawerBodyProps } from './DrawerBody.types';\n\n/**\n * DrawerBody provides with a container for the main content of a Drawer.\n */\nexport const DrawerBody: ForwardRefComponent<DrawerBodyProps> = React.forwardRef((props, ref) => {\n const state = useDrawerBody_unstable(props, ref);\n\n useDrawerBodyStyles_unstable(state);\n useCustomStyleHook_unstable('useDrawerBodyStyles_unstable')(state);\n\n return renderDrawerBody_unstable(state);\n});\n\nDrawerBody.displayName = 'DrawerBody';\n"],"names":["React","useCustomStyleHook_unstable","useDrawerBody_unstable","renderDrawerBody_unstable","useDrawerBodyStyles_unstable","DrawerBody","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,+BAA+B;AAG5E;;CAEC,GACD,OAAO,MAAMC,2BAAmDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,QAAQP,uBAAuBK,OAAOC;IAE5CJ,6BAA6BK;IAC7BR,4BAA4B,gCAAgCQ;IAE5D,OAAON,0BAA0BM;AACnC,GAAG;AAEHJ,WAAWK,WAAW,GAAG"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
+
import { assertSlots } from '@fluentui/react-utilities';
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of DrawerBody
|
|
5
5
|
*/ export const renderDrawerBody_unstable = (state)=>{
|
|
6
|
-
|
|
7
|
-
return /*#__PURE__*/
|
|
6
|
+
assertSlots(state);
|
|
7
|
+
return /*#__PURE__*/ _jsx(state.root, {});
|
|
8
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderDrawerBody.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["renderDrawerBody.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\n\nimport type { DrawerBodySlots, DrawerBodyState } from './DrawerBody.types';\n\n/**\n * Render the final JSX of DrawerBody\n */\nexport const renderDrawerBody_unstable = (state: DrawerBodyState) => {\n assertSlots<DrawerBodySlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderDrawerBody_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,4BAA4B,CAACC;IACxCF,YAA6BE;IAE7B,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
|
|
3
3
|
/**
|
|
4
4
|
* Create the state required to render DrawerBody.
|
|
5
5
|
*
|
|
@@ -13,9 +13,14 @@ import { getNativeElementProps } from '@fluentui/react-utilities';
|
|
|
13
13
|
components: {
|
|
14
14
|
root: 'div'
|
|
15
15
|
},
|
|
16
|
-
root:
|
|
17
|
-
|
|
16
|
+
root: slot.always(getIntrinsicElementProps('div', {
|
|
17
|
+
// FIXME:
|
|
18
|
+
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
|
|
19
|
+
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
|
|
20
|
+
ref: ref,
|
|
18
21
|
...props
|
|
22
|
+
}), {
|
|
23
|
+
elementType: 'div'
|
|
19
24
|
})
|
|
20
25
|
};
|
|
21
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDrawerBody.ts"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["useDrawerBody.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\n\nimport type { DrawerBodyProps, DrawerBodyState } from './DrawerBody.types';\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 return {\n components: {\n root: 'div',\n },\n\n root: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useDrawerBody_unstable","props","ref","components","root","always","elementType"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAI3E;;;;;;;;CAQC,GACD,OAAO,MAAMC,yBAAyB,CAACC,OAAwBC;IAC7D,OAAO;QACLC,YAAY;YACVC,MAAM;QACR;QAEAA,MAAML,KAAKM,MAAM,CACfP,yBAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FI,KAAKA;YACL,GAAGD,KAAK;QACV,IACA;YAAEK,aAAa;QAAM;IAEzB;AACF,EAAE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __resetStyles, mergeClasses, shorthands } from '@griffel/react';
|
|
2
2
|
import { tokens } from '@fluentui/react-theme';
|
|
3
3
|
export const drawerBodyClassNames = {
|
|
4
4
|
root: 'fui-DrawerBody'
|
|
@@ -6,40 +6,13 @@ export const drawerBodyClassNames = {
|
|
|
6
6
|
/**
|
|
7
7
|
* Styles for the root slot
|
|
8
8
|
*/
|
|
9
|
-
const useStyles = /*#__PURE__*/
|
|
10
|
-
root: {
|
|
11
|
-
B6of3ja: "fkrn0sh",
|
|
12
|
-
t21cq0: ["f11qmguv", "f1tyq0we"],
|
|
13
|
-
jrapky: "fmxx68s",
|
|
14
|
-
Frg6f3: ["f1tyq0we", "f11qmguv"],
|
|
15
|
-
z8tnut: "f1sl3k7w",
|
|
16
|
-
z189sj: ["fnbas0t", "f1mswpri"],
|
|
17
|
-
Byoj8tv: "f1brlhvm",
|
|
18
|
-
uwmqm3: ["f1mswpri", "fnbas0t"],
|
|
19
|
-
B68tc82: "f1oy3dpc",
|
|
20
|
-
Bmxbyg5: "f5zp4f",
|
|
21
|
-
Bh6795r: "fqerorx",
|
|
22
|
-
Bnnss6s: "f1neuvcm",
|
|
23
|
-
xawz: "f1pztt34",
|
|
24
|
-
qb2dma: "f1ub7u0d",
|
|
25
|
-
Bcmaq0h: "f1igvcbx",
|
|
26
|
-
B676am1: "f1fofb6i",
|
|
27
|
-
e5kdtc: "fo6xqva",
|
|
28
|
-
De3pzq: "fxugw4r",
|
|
29
|
-
Bkjc3bi: "fcre6b6",
|
|
30
|
-
Bgh53k4: "f1besv5s",
|
|
31
|
-
Bcx2cba: "f1pqm9hp",
|
|
32
|
-
gonrqn: "f2c46kh"
|
|
33
|
-
}
|
|
34
|
-
}, {
|
|
35
|
-
d: [".fkrn0sh{margin-top:-1px;}", ".f11qmguv{margin-right:0;}", ".f1tyq0we{margin-left:0;}", ".fmxx68s{margin-bottom:-1px;}", ".f1sl3k7w{padding-top:1px;}", ".fnbas0t{padding-right:var(--spacingHorizontalXXL);}", ".f1mswpri{padding-left:var(--spacingHorizontalXXL);}", ".f1brlhvm{padding-bottom:1px;}", ".f1oy3dpc{overflow-x:auto;}", ".f5zp4f{overflow-y:auto;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f1neuvcm{-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;}", ".f1pztt34{-webkit-flex-basis:0;-ms-flex-preferred-size:0;flex-basis:0;}", ".f1ub7u0d{-webkit-align-self:stretch;-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;align-self:stretch;}", ".f1igvcbx{background-image:linear-gradient(to top, var(--colorNeutralBackground1), var(--colorNeutralBackground1)),linear-gradient(to top, var(--colorNeutralBackground1), var(--colorNeutralBackground1)),linear-gradient(to top, var(--colorNeutralStroke1), var(--colorNeutralBackground1)),linear-gradient(to bottom, var(--colorNeutralStroke1), var(--colorNeutralBackground1));}", ".f1fofb6i{-webkit-background-position:bottom center,top center,bottom center,top center;background-position:bottom center,top center,bottom center,top center;}", ".fo6xqva{background-repeat:no-repeat;}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".fcre6b6{-webkit-background-size:100% 2px,100% 2px,100% 1px,100% 1px;background-size:100% 2px,100% 2px,100% 1px,100% 1px;}", ".f1besv5s{background-attachment:local,local,scroll,scroll;}", ".f1pqm9hp:last-child{padding-bottom:calc(var(--spacingHorizontalXXL) + 1px);}", ".f2c46kh:first-child{padding-top:calc(var(--spacingHorizontalXXL) + 1px);}"]
|
|
36
|
-
});
|
|
9
|
+
const useStyles = /*#__PURE__*/__resetStyles("r10z3gsy", "r1ppc5ap", [".r10z3gsy{margin-top:-1px;margin-right:0;margin-bottom:-1px;margin-left:0;padding-top:1px;padding-right:var(--spacingHorizontalXXL);padding-bottom:1px;padding-left:var(--spacingHorizontalXXL);overflow-x:auto;overflow-y:auto;flex-grow:1;flex-shrink:1;flex-basis:0;align-self:stretch;background-image:linear-gradient(to top, var(--colorNeutralBackground1), var(--colorNeutralBackground1)),linear-gradient(to top, var(--colorNeutralBackground1), var(--colorNeutralBackground1)),linear-gradient(to top, var(--colorNeutralStroke1), var(--colorNeutralBackground1)),linear-gradient(to bottom, var(--colorNeutralStroke1), var(--colorNeutralBackground1));-webkit-background-position:bottom center,top center,bottom center,top center;background-position:bottom center,top center,bottom center,top center;background-repeat:no-repeat;background-color:var(--colorNeutralBackground1);background-size:100% 2px,100% 2px,100% 1px,100% 1px;background-attachment:local,local,scroll,scroll;}", ".r10z3gsy:last-child{padding-bottom:calc(var(--spacingHorizontalXXL) + 1px);}", ".r10z3gsy:first-child{padding-top:calc(var(--spacingHorizontalXXL) + 1px);}", ".r1ppc5ap{margin-top:-1px;margin-left:0;margin-bottom:-1px;margin-right:0;padding-top:1px;padding-left:var(--spacingHorizontalXXL);padding-bottom:1px;padding-right:var(--spacingHorizontalXXL);overflow-x:auto;overflow-y:auto;flex-grow:1;flex-shrink:1;flex-basis:0;align-self:stretch;background-image:linear-gradient(to top, var(--colorNeutralBackground1), var(--colorNeutralBackground1)),linear-gradient(to top, var(--colorNeutralBackground1), var(--colorNeutralBackground1)),linear-gradient(to top, var(--colorNeutralStroke1), var(--colorNeutralBackground1)),linear-gradient(to bottom, var(--colorNeutralStroke1), var(--colorNeutralBackground1));-webkit-background-position:bottom center,top center,bottom center,top center;background-position:bottom center,top center,bottom center,top center;background-repeat:no-repeat;background-color:var(--colorNeutralBackground1);background-size:100% 2px,100% 2px,100% 1px,100% 1px;background-attachment:local,local,scroll,scroll;}", ".r1ppc5ap:last-child{padding-bottom:calc(var(--spacingHorizontalXXL) + 1px);}", ".r1ppc5ap:first-child{padding-top:calc(var(--spacingHorizontalXXL) + 1px);}"]);
|
|
37
10
|
/**
|
|
38
11
|
* Apply styling to the DrawerBody slots based on the state
|
|
39
12
|
*/
|
|
40
13
|
export const useDrawerBodyStyles_unstable = state => {
|
|
41
14
|
const styles = useStyles();
|
|
42
|
-
state.root.className = mergeClasses(drawerBodyClassNames.root, styles
|
|
15
|
+
state.root.className = mergeClasses(drawerBodyClassNames.root, styles, state.root.className);
|
|
43
16
|
return state;
|
|
44
17
|
};
|
|
45
18
|
//# sourceMappingURL=useDrawerBodyStyles.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["__resetStyles","mergeClasses","shorthands","tokens","drawerBodyClassNames","root","useStyles","useDrawerBodyStyles_unstable","state","styles","className"],"sources":["useDrawerBodyStyles.styles.js"],"sourcesContent":["import { makeResetStyles, mergeClasses, shorthands } 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 ...shorthands.margin('-1px', 0),\n ...shorthands.padding('1px', tokens.spacingHorizontalXXL),\n ...shorthands.overflow('auto'),\n ...shorthands.flex(1),\n alignSelf: 'stretch',\n // A \"good hack\" to display top and bottom borders based on the scroll position\n backgroundImage: `linear-gradient(to top, ${tokens.colorNeutralBackground1}, ${tokens.colorNeutralBackground1}),\n linear-gradient(to top, ${tokens.colorNeutralBackground1}, ${tokens.colorNeutralBackground1}),\n linear-gradient(to top, ${tokens.colorNeutralStroke1}, ${tokens.colorNeutralBackground1}),\n linear-gradient(to bottom, ${tokens.colorNeutralStroke1}, ${tokens.colorNeutralBackground1})`,\n 'background-position': 'bottom center, top center, bottom center, top center',\n backgroundRepeat: 'no-repeat',\n backgroundColor: tokens.colorNeutralBackground1,\n backgroundSize: '100% 2px, 100% 2px, 100% 1px, 100% 1px',\n backgroundAttachment: 'local, local, scroll, scroll',\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 const styles = useStyles();\n state.root.className = mergeClasses(drawerBodyClassNames.root, styles, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,SAAAA,aAAA,EAA0BC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AAC1E,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,OAAO,MAAMC,oBAAoB,GAAG;EAChCC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGN,aAAA,uvEAsBrB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMO,4BAA4B,GAAIC,KAAK,IAAG;EACrD,MAAMC,MAAM,GAAGH,SAAS,CAAC,CAAC;EAC1BE,KAAK,CAACH,IAAI,CAACK,SAAS,GAAGT,YAAY,CAACG,oBAAoB,CAACC,IAAI,EAAEI,MAAM,EAAED,KAAK,CAACH,IAAI,CAACK,SAAS,CAAC;EAC5F,OAAOF,KAAK;AAChB,CAAC"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
2
3
|
import { useDrawerFooter_unstable } from './useDrawerFooter';
|
|
3
4
|
import { renderDrawerFooter_unstable } from './renderDrawerFooter';
|
|
4
5
|
import { useDrawerFooterStyles_unstable } from './useDrawerFooterStyles.styles';
|
|
5
6
|
/**
|
|
6
|
-
* DrawerFooter
|
|
7
|
+
* DrawerFooter provides a structured footer for the drawer component.
|
|
7
8
|
*/ export const DrawerFooter = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
8
9
|
const state = useDrawerFooter_unstable(props, ref);
|
|
9
10
|
useDrawerFooterStyles_unstable(state);
|
|
11
|
+
useCustomStyleHook_unstable('useDrawerFooterStyles_unstable')(state);
|
|
10
12
|
return renderDrawerFooter_unstable(state);
|
|
11
13
|
});
|
|
12
14
|
DrawerFooter.displayName = 'DrawerFooter';
|