@fluentui/react-drawer 9.0.0-beta.26 → 9.0.0-beta.29
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.json +172 -1
- package/CHANGELOG.md +50 -2
- package/dist/index.d.ts +8 -11
- 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 +1 -1
- package/lib/components/DrawerFooter/DrawerFooter.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/useDrawerHeaderStyles.styles.js +3 -17
- package/lib/components/DrawerHeader/useDrawerHeaderStyles.styles.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/useDrawerHeaderTitle.js +4 -5
- package/lib/components/DrawerHeaderTitle/useDrawerHeaderTitle.js.map +1 -1
- package/lib/components/DrawerInline/useDrawerInline.js +2 -7
- package/lib/components/DrawerInline/useDrawerInline.js.map +1 -1
- package/lib/components/DrawerInline/useDrawerInlineStyles.styles.js +6 -10
- package/lib/components/DrawerInline/useDrawerInlineStyles.styles.js.map +1 -1
- package/lib/components/DrawerOverlay/DrawerOverlay.types.js.map +1 -1
- package/lib/components/DrawerOverlay/renderDrawerOverlay.js +2 -4
- package/lib/components/DrawerOverlay/renderDrawerOverlay.js.map +1 -1
- package/lib/components/DrawerOverlay/useDrawerOverlay.js +17 -14
- package/lib/components/DrawerOverlay/useDrawerOverlay.js.map +1 -1
- package/lib/components/DrawerOverlay/useDrawerOverlayStyles.styles.js +25 -2
- package/lib/components/DrawerOverlay/useDrawerOverlayStyles.styles.js.map +1 -1
- package/lib/shared/DrawerBase.types.js.map +1 -1
- package/lib/shared/useDrawerBaseStyles.styles.js +23 -30
- package/lib/shared/useDrawerBaseStyles.styles.js.map +1 -1
- package/lib/shared/useDrawerDefaultProps.js +2 -3
- package/lib/shared/useDrawerDefaultProps.js.map +1 -1
- package/lib-commonjs/components/DrawerBody/useDrawerBodyStyles.styles.js +9 -64
- package/lib-commonjs/components/DrawerBody/useDrawerBodyStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DrawerFooter/DrawerFooter.js.map +1 -1
- package/lib-commonjs/components/DrawerFooter/useDrawerFooterStyles.styles.js +5 -30
- package/lib-commonjs/components/DrawerFooter/useDrawerFooterStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DrawerHeader/useDrawerHeaderStyles.styles.js +5 -32
- package/lib-commonjs/components/DrawerHeader/useDrawerHeaderStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.js +5 -24
- package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitle.js +3 -4
- package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitle.js.map +1 -1
- package/lib-commonjs/components/DrawerInline/useDrawerInline.js +1 -6
- package/lib-commonjs/components/DrawerInline/useDrawerInline.js.map +1 -1
- package/lib-commonjs/components/DrawerInline/useDrawerInlineStyles.styles.js +6 -11
- package/lib-commonjs/components/DrawerInline/useDrawerInlineStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DrawerOverlay/renderDrawerOverlay.js +2 -4
- package/lib-commonjs/components/DrawerOverlay/renderDrawerOverlay.js.map +1 -1
- package/lib-commonjs/components/DrawerOverlay/useDrawerOverlay.js +15 -12
- package/lib-commonjs/components/DrawerOverlay/useDrawerOverlay.js.map +1 -1
- package/lib-commonjs/components/DrawerOverlay/useDrawerOverlayStyles.styles.js +70 -0
- package/lib-commonjs/components/DrawerOverlay/useDrawerOverlayStyles.styles.js.map +1 -1
- package/lib-commonjs/shared/useDrawerBaseStyles.styles.js +23 -77
- package/lib-commonjs/shared/useDrawerBaseStyles.styles.js.map +1 -1
- package/lib-commonjs/shared/useDrawerDefaultProps.js +2 -3
- package/lib-commonjs/shared/useDrawerDefaultProps.js.map +1 -1
- package/package.json +7 -7
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { __styles, mergeClasses, shorthands } from '@griffel/react';
|
|
2
|
+
import { __resetStyles, __styles, mergeClasses, shorthands } from '@griffel/react';
|
|
3
3
|
import { tokens } from '@fluentui/react-theme';
|
|
4
|
-
import { drawerCSSVars, useDrawerBaseClassNames } from '../../shared/useDrawerBaseStyles.styles';
|
|
4
|
+
import { drawerCSSVars, drawerDefaultStyles, useDrawerBaseClassNames } from '../../shared/useDrawerBaseStyles.styles';
|
|
5
5
|
export const drawerInlineClassNames = {
|
|
6
6
|
root: 'fui-DrawerInline'
|
|
7
7
|
};
|
|
8
|
+
const useDrawerResetStyles = /*#__PURE__*/__resetStyles("r1aiwccr", "rzg5lxf", [".r1aiwccr{padding-top:0;padding-right:0;padding-bottom:0;padding-left:0;overflow-x:hidden;overflow-y:hidden;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:0;border-top-left-radius:0;border-top-width:0;border-right-width:0;border-bottom-width:0;border-left-width:0;width:var(--fui-Drawer--size);max-width:100vw;height:auto;box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;background-color:var(--colorNeutralBackground1);position:relative;opacity:0;transition-property:opacity,transform;will-change:opacity,transform;}", ".rzg5lxf{padding-top:0;padding-left:0;padding-bottom:0;padding-right:0;overflow-x:hidden;overflow-y:hidden;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:0;border-top-right-radius:0;border-top-width:0;border-left-width:0;border-bottom-width:0;border-right-width:0;width:var(--fui-Drawer--size);max-width:100vw;height:auto;box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;background-color:var(--colorNeutralBackground1);position:relative;opacity:0;transition-property:opacity,transform;will-change:opacity,transform;}"]);
|
|
8
9
|
/**
|
|
9
10
|
* Styles for the root slot
|
|
10
11
|
*/
|
|
11
12
|
const separatorValues = ['1px', 'solid', tokens.colorNeutralBackground3];
|
|
12
13
|
const useDrawerRootStyles = /*#__PURE__*/__styles({
|
|
13
|
-
root: {
|
|
14
|
-
qhf8xq: "f10pi13n",
|
|
15
|
-
abs64n: "fk73vx1",
|
|
16
|
-
Bmy1vo4: "f15rjlgw",
|
|
17
|
-
Es3by: "f1blt7p"
|
|
18
|
-
},
|
|
19
14
|
separatorStart: {
|
|
20
15
|
Bekrc4i: ["f1hqa2wf", "finvdd3"],
|
|
21
16
|
vrafjx: ["fcdblym", "fjik90z"],
|
|
@@ -37,12 +32,13 @@ const useDrawerRootStyles = /*#__PURE__*/__styles({
|
|
|
37
32
|
Bz10aip: "f87uvqx"
|
|
38
33
|
}
|
|
39
34
|
}, {
|
|
40
|
-
d: [".
|
|
35
|
+
d: [".f1hqa2wf{border-right-width:1px;}", ".finvdd3{border-left-width:1px;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fa8zu9y{border-right-color:var(--colorNeutralBackground3);}", ".f17e9lqh{border-left-color:var(--colorNeutralBackground3);}", ".f1d8gkik{transform:translate3D(calc(var(--fui-Drawer--size) * -1), 0, 0);}", ".f1h1g6jt{transform:translate3D(var(--fui-Drawer--size), 0, 0);}", ".f5p0z4x{opacity:1;}", ".f87uvqx{transform:translate3D(0, 0, 0);}"]
|
|
41
36
|
});
|
|
42
37
|
/**
|
|
43
38
|
* Apply styling to the DrawerInline slots based on the state
|
|
44
39
|
*/
|
|
45
40
|
export const useDrawerInlineStyles_unstable = state => {
|
|
41
|
+
const resetStyles = useDrawerResetStyles();
|
|
46
42
|
const baseClassNames = useDrawerBaseClassNames(state);
|
|
47
43
|
const rootStyles = useDrawerRootStyles();
|
|
48
44
|
const separatorClass = React.useMemo(() => {
|
|
@@ -51,7 +47,7 @@ export const useDrawerInlineStyles_unstable = state => {
|
|
|
51
47
|
}
|
|
52
48
|
return state.position === 'start' ? rootStyles.separatorStart : rootStyles.separatorEnd;
|
|
53
49
|
}, [state.position, state.separator, rootStyles.separatorEnd, rootStyles.separatorStart]);
|
|
54
|
-
state.root.className = mergeClasses(drawerInlineClassNames.root,
|
|
50
|
+
state.root.className = mergeClasses(drawerInlineClassNames.root, resetStyles, baseClassNames, separatorClass, rootStyles[state.position], state.motion.active && rootStyles.visible, state.root.className);
|
|
55
51
|
return state;
|
|
56
52
|
};
|
|
57
53
|
//# sourceMappingURL=useDrawerInlineStyles.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","__styles","mergeClasses","shorthands","tokens","drawerCSSVars","useDrawerBaseClassNames","drawerInlineClassNames","root","separatorValues","colorNeutralBackground3","useDrawerRootStyles","
|
|
1
|
+
{"version":3,"names":["React","__resetStyles","__styles","mergeClasses","shorthands","tokens","drawerCSSVars","drawerDefaultStyles","useDrawerBaseClassNames","drawerInlineClassNames","root","useDrawerResetStyles","separatorValues","colorNeutralBackground3","useDrawerRootStyles","separatorStart","Bekrc4i","vrafjx","h3c5rm","separatorEnd","ibv6hh","wvpqe5","zhjwy3","start","Bz10aip","end","visible","abs64n","d","useDrawerInlineStyles_unstable","state","resetStyles","baseClassNames","rootStyles","separatorClass","useMemo","separator","undefined","position","className","motion","active"],"sources":["useDrawerInlineStyles.styles.js"],"sourcesContent":["import * as React from 'react';\nimport { makeResetStyles, makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { drawerCSSVars, drawerDefaultStyles, useDrawerBaseClassNames } from '../../shared/useDrawerBaseStyles.styles';\nexport const drawerInlineClassNames = {\n root: 'fui-DrawerInline'\n};\nconst useDrawerResetStyles = makeResetStyles({\n ...drawerDefaultStyles,\n position: 'relative',\n opacity: 0,\n transitionProperty: 'opacity, transform',\n willChange: 'opacity, transform'\n});\n/**\n * Styles for the root slot\n */ const separatorValues = [\n '1px',\n 'solid',\n tokens.colorNeutralBackground3\n];\nconst useDrawerRootStyles = makeStyles({\n /* Separator */ separatorStart: {\n ...shorthands.borderRight(...separatorValues)\n },\n separatorEnd: {\n ...shorthands.borderLeft(...separatorValues)\n },\n /* Positioning */ start: {\n transform: `translate3D(calc(var(${drawerCSSVars.drawerSizeVar}) * -1), 0, 0)`\n },\n end: {\n transform: `translate3D(var(${drawerCSSVars.drawerSizeVar}), 0, 0)`\n },\n /* Visible */ visible: {\n opacity: 1,\n transform: `translate3D(0, 0, 0)`\n }\n});\n/**\n * Apply styling to the DrawerInline slots based on the state\n */ export const useDrawerInlineStyles_unstable = (state)=>{\n const resetStyles = useDrawerResetStyles();\n const baseClassNames = useDrawerBaseClassNames(state);\n const rootStyles = useDrawerRootStyles();\n const separatorClass = React.useMemo(()=>{\n if (!state.separator) {\n return undefined;\n }\n return state.position === 'start' ? rootStyles.separatorStart : rootStyles.separatorEnd;\n }, [\n state.position,\n state.separator,\n rootStyles.separatorEnd,\n rootStyles.separatorStart\n ]);\n state.root.className = mergeClasses(drawerInlineClassNames.root, resetStyles, baseClassNames, separatorClass, rootStyles[state.position], state.motion.active && rootStyles.visible, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAAAC,aAAA,EAAAC,QAAA,EAAsCC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACtF,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,aAAa,EAAEC,mBAAmB,EAAEC,uBAAuB,QAAQ,yCAAyC;AACrH,OAAO,MAAMC,sBAAsB,GAAG;EAClCC,IAAI,EAAE;AACV,CAAC;AACD,MAAMC,oBAAoB,gBAAGV,aAAA,+tCAM5B,CAAC;AACF;AACA;AACA;AAAI,MAAMW,eAAe,GAAG,CACxB,KAAK,EACL,OAAO,EACPP,MAAM,CAACQ,uBAAuB,CACjC;AACD,MAAMC,mBAAmB,gBAAGZ,QAAA;EAAAa,cAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,YAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,KAAA;IAAAC,OAAA;EAAA;EAAAC,GAAA;IAAAD,OAAA;EAAA;EAAAE,OAAA;IAAAC,MAAA;IAAAH,OAAA;EAAA;AAAA;EAAAI,CAAA;AAAA,CAiB3B,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,8BAA8B,GAAIC,KAAK,IAAG;EACvD,MAAMC,WAAW,GAAGpB,oBAAoB,CAAC,CAAC;EAC1C,MAAMqB,cAAc,GAAGxB,uBAAuB,CAACsB,KAAK,CAAC;EACrD,MAAMG,UAAU,GAAGnB,mBAAmB,CAAC,CAAC;EACxC,MAAMoB,cAAc,GAAGlC,KAAK,CAACmC,OAAO,CAAC,MAAI;IACrC,IAAI,CAACL,KAAK,CAACM,SAAS,EAAE;MAClB,OAAOC,SAAS;IACpB;IACA,OAAOP,KAAK,CAACQ,QAAQ,KAAK,OAAO,GAAGL,UAAU,CAAClB,cAAc,GAAGkB,UAAU,CAACd,YAAY;EAC3F,CAAC,EAAE,CACCW,KAAK,CAACQ,QAAQ,EACdR,KAAK,CAACM,SAAS,EACfH,UAAU,CAACd,YAAY,EACvBc,UAAU,CAAClB,cAAc,CAC5B,CAAC;EACFe,KAAK,CAACpB,IAAI,CAAC6B,SAAS,GAAGpC,YAAY,CAACM,sBAAsB,CAACC,IAAI,EAAEqB,WAAW,EAAEC,cAAc,EAAEE,cAAc,EAAED,UAAU,CAACH,KAAK,CAACQ,QAAQ,CAAC,EAAER,KAAK,CAACU,MAAM,CAACC,MAAM,IAAIR,UAAU,CAACP,OAAO,EAAEI,KAAK,CAACpB,IAAI,CAAC6B,SAAS,CAAC;EAC1M,OAAOT,KAAK;AAChB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DrawerOverlay.types.ts"],"sourcesContent":["import { DialogProps, DialogSurfaceProps, DialogSurfaceSlots } from '@fluentui/react-dialog';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { MotionState } from '@fluentui/react-motion-preview';\n\nimport type { DrawerBaseProps, DrawerBaseState } from '../../shared/DrawerBase.types';\n\nexport type DrawerOverlaySlots = DialogSurfaceSlots & {\n root: Slot<DialogSurfaceProps>;\n};\n\n/**\n * DrawerOverlay Props\n */\nexport type DrawerOverlayProps = ComponentProps<DrawerOverlaySlots> &\n
|
|
1
|
+
{"version":3,"sources":["DrawerOverlay.types.ts"],"sourcesContent":["import { DialogProps, DialogSurfaceProps, DialogSurfaceSlots } from '@fluentui/react-dialog';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { MotionState } from '@fluentui/react-motion-preview';\n\nimport type { DrawerBaseProps, DrawerBaseState } from '../../shared/DrawerBase.types';\n\nexport type DrawerOverlaySlots = DialogSurfaceSlots & {\n root: Slot<DialogSurfaceProps>;\n\n /**\n * Slot for the dialog component that wraps the drawer.\n */\n dialog?: Slot<DialogProps>;\n};\n\n/**\n * DrawerOverlay Props\n */\nexport type DrawerOverlayProps = ComponentProps<DrawerOverlaySlots> &\n Pick<DialogProps, 'modalType' | 'onOpenChange' | 'inertTrapFocus' | 'defaultOpen'> &\n DrawerBaseProps;\n\n/**\n * State used in rendering DrawerOverlay\n */\nexport type DrawerOverlayState = Omit<ComponentState<DrawerOverlaySlots>, 'backdrop'> &\n Required<\n DrawerBaseState & {\n backdropMotion: MotionState<HTMLDivElement>;\n }\n >;\n"],"names":[],"mappings":"AAAA,WA8BI"}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
2
|
import { assertSlots } from '@fluentui/react-utilities';
|
|
3
|
-
import { Dialog } from '@fluentui/react-dialog';
|
|
4
3
|
/**
|
|
5
4
|
* Render the final JSX of DrawerOverlay
|
|
6
5
|
*/ export const renderDrawerOverlay_unstable = (state)=>{
|
|
7
|
-
if (!state.motion.canRender) {
|
|
6
|
+
if (!state.dialog || !state.motion.canRender) {
|
|
8
7
|
return null;
|
|
9
8
|
}
|
|
10
9
|
assertSlots(state);
|
|
11
|
-
return /*#__PURE__*/ _jsx(
|
|
12
|
-
...state.dialog,
|
|
10
|
+
return /*#__PURE__*/ _jsx(state.dialog, {
|
|
13
11
|
children: /*#__PURE__*/ _jsx(state.root, {})
|
|
14
12
|
});
|
|
15
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderDrawerOverlay.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\
|
|
1
|
+
{"version":3,"sources":["renderDrawerOverlay.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\n\nimport type { DrawerOverlayState, DrawerOverlaySlots } from './DrawerOverlay.types';\n\n/**\n * Render the final JSX of DrawerOverlay\n */\nexport const renderDrawerOverlay_unstable = (state: DrawerOverlayState) => {\n if (!state.dialog || !state.motion.canRender) {\n return null;\n }\n\n assertSlots<DrawerOverlaySlots>(state);\n\n return (\n <state.dialog>\n <state.root />\n </state.dialog>\n );\n};\n"],"names":["assertSlots","renderDrawerOverlay_unstable","state","dialog","motion","canRender","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,+BAA+B,CAACC;IAC3C,IAAI,CAACA,MAAMC,MAAM,IAAI,CAACD,MAAME,MAAM,CAACC,SAAS,EAAE;QAC5C,OAAO;IACT;IAEAL,YAAgCE;IAEhC,qBACE,KAACA,MAAMC,MAAM;kBACX,cAAA,KAACD,MAAMI,IAAI;;AAGjB,EAAE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { DialogSurface } from '@fluentui/react-dialog';
|
|
2
|
+
import { slot, useMergedRefs } from '@fluentui/react-utilities';
|
|
3
|
+
import { Dialog, DialogSurface } from '@fluentui/react-dialog';
|
|
4
4
|
import { useMotion } from '@fluentui/react-motion-preview';
|
|
5
5
|
import { useDrawerDefaultProps } from '../../shared/useDrawerDefaultProps';
|
|
6
6
|
/**
|
|
@@ -12,15 +12,15 @@ import { useDrawerDefaultProps } from '../../shared/useDrawerDefaultProps';
|
|
|
12
12
|
* @param props - props from this instance of DrawerOverlay
|
|
13
13
|
* @param ref - reference to root HTMLDivElement of DrawerOverlay
|
|
14
14
|
*/ export const useDrawerOverlay_unstable = (props, ref)=>{
|
|
15
|
-
const { open,
|
|
16
|
-
const { modalType = 'modal', inertTrapFocus, onOpenChange } = props;
|
|
15
|
+
const { open, size, position } = useDrawerDefaultProps(props);
|
|
16
|
+
const { modalType = 'modal', inertTrapFocus, defaultOpen = false, onOpenChange } = props;
|
|
17
17
|
const drawerMotion = useMotion(open);
|
|
18
18
|
const backdropMotion = useMotion(open);
|
|
19
19
|
const hasCustomBackdrop = modalType !== 'non-modal' && props.backdrop !== null;
|
|
20
|
-
const root = slot.always(
|
|
20
|
+
const root = slot.always({
|
|
21
21
|
...props,
|
|
22
22
|
ref: useMergedRefs(ref, drawerMotion.ref)
|
|
23
|
-
}
|
|
23
|
+
}, {
|
|
24
24
|
elementType: DialogSurface,
|
|
25
25
|
defaultProps: {
|
|
26
26
|
backdrop: slot.optional(props.backdrop, {
|
|
@@ -32,18 +32,21 @@ import { useDrawerDefaultProps } from '../../shared/useDrawerDefaultProps';
|
|
|
32
32
|
})
|
|
33
33
|
}
|
|
34
34
|
});
|
|
35
|
-
const dialog = slot.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
const dialog = slot.optional(props.dialog, {
|
|
36
|
+
elementType: Dialog,
|
|
37
|
+
renderByDefault: true,
|
|
38
|
+
defaultProps: {
|
|
39
|
+
open: true,
|
|
40
|
+
defaultOpen,
|
|
41
|
+
onOpenChange,
|
|
42
|
+
inertTrapFocus,
|
|
43
|
+
modalType
|
|
44
|
+
}
|
|
43
45
|
});
|
|
44
46
|
return {
|
|
45
47
|
components: {
|
|
46
48
|
root: DialogSurface,
|
|
49
|
+
dialog: Dialog,
|
|
47
50
|
backdrop: 'div'
|
|
48
51
|
},
|
|
49
52
|
root,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDrawerOverlay.ts"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["useDrawerOverlay.ts"],"sourcesContent":["import * as React from 'react';\nimport { slot, useMergedRefs } from '@fluentui/react-utilities';\nimport { Dialog, DialogSurface } from '@fluentui/react-dialog';\nimport { useMotion } from '@fluentui/react-motion-preview';\n\nimport { useDrawerDefaultProps } from '../../shared/useDrawerDefaultProps';\nimport type { DrawerOverlayProps, DrawerOverlayState } from './DrawerOverlay.types';\n\n/**\n * Create the state required to render DrawerOverlay.\n *\n * The returned state can be modified with hooks such as useDrawerOverlayStyles_unstable,\n * before being passed to renderDrawerOverlay_unstable.\n *\n * @param props - props from this instance of DrawerOverlay\n * @param ref - reference to root HTMLDivElement of DrawerOverlay\n */\nexport const useDrawerOverlay_unstable = (\n props: DrawerOverlayProps,\n ref: React.Ref<HTMLDivElement>,\n): DrawerOverlayState => {\n const { open, size, position } = useDrawerDefaultProps(props);\n const { modalType = 'modal', inertTrapFocus, defaultOpen = false, onOpenChange } = props;\n\n const drawerMotion = useMotion<HTMLDivElement>(open);\n const backdropMotion = useMotion<HTMLDivElement>(open);\n\n const hasCustomBackdrop = modalType !== 'non-modal' && props.backdrop !== null;\n\n const root = slot.always(\n {\n ...props,\n ref: useMergedRefs(ref, drawerMotion.ref),\n },\n {\n elementType: DialogSurface,\n defaultProps: {\n backdrop: slot.optional(props.backdrop, {\n elementType: 'div',\n renderByDefault: hasCustomBackdrop,\n defaultProps: {\n ref: backdropMotion.ref,\n },\n }),\n },\n },\n );\n\n const dialog = slot.optional(props.dialog, {\n elementType: Dialog,\n renderByDefault: true,\n defaultProps: {\n open: true,\n defaultOpen,\n onOpenChange,\n inertTrapFocus,\n modalType,\n },\n });\n\n return {\n components: {\n root: DialogSurface,\n dialog: Dialog,\n backdrop: 'div',\n },\n\n root,\n dialog,\n\n size,\n position,\n motion: drawerMotion,\n backdropMotion,\n };\n};\n"],"names":["React","slot","useMergedRefs","Dialog","DialogSurface","useMotion","useDrawerDefaultProps","useDrawerOverlay_unstable","props","ref","open","size","position","modalType","inertTrapFocus","defaultOpen","onOpenChange","drawerMotion","backdropMotion","hasCustomBackdrop","backdrop","root","always","elementType","defaultProps","optional","renderByDefault","dialog","components","motion"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,IAAI,EAAEC,aAAa,QAAQ,4BAA4B;AAChE,SAASC,MAAM,EAAEC,aAAa,QAAQ,yBAAyB;AAC/D,SAASC,SAAS,QAAQ,iCAAiC;AAE3D,SAASC,qBAAqB,QAAQ,qCAAqC;AAG3E;;;;;;;;CAQC,GACD,OAAO,MAAMC,4BAA4B,CACvCC,OACAC;IAEA,MAAM,EAAEC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,EAAE,GAAGN,sBAAsBE;IACvD,MAAM,EAAEK,YAAY,OAAO,EAAEC,cAAc,EAAEC,cAAc,KAAK,EAAEC,YAAY,EAAE,GAAGR;IAEnF,MAAMS,eAAeZ,UAA0BK;IAC/C,MAAMQ,iBAAiBb,UAA0BK;IAEjD,MAAMS,oBAAoBN,cAAc,eAAeL,MAAMY,QAAQ,KAAK;IAE1E,MAAMC,OAAOpB,KAAKqB,MAAM,CACtB;QACE,GAAGd,KAAK;QACRC,KAAKP,cAAcO,KAAKQ,aAAaR,GAAG;IAC1C,GACA;QACEc,aAAanB;QACboB,cAAc;YACZJ,UAAUnB,KAAKwB,QAAQ,CAACjB,MAAMY,QAAQ,EAAE;gBACtCG,aAAa;gBACbG,iBAAiBP;gBACjBK,cAAc;oBACZf,KAAKS,eAAeT,GAAG;gBACzB;YACF;QACF;IACF;IAGF,MAAMkB,SAAS1B,KAAKwB,QAAQ,CAACjB,MAAMmB,MAAM,EAAE;QACzCJ,aAAapB;QACbuB,iBAAiB;QACjBF,cAAc;YACZd,MAAM;YACNK;YACAC;YACAF;YACAD;QACF;IACF;IAEA,OAAO;QACLe,YAAY;YACVP,MAAMjB;YACNuB,QAAQxB;YACRiB,UAAU;QACZ;QAEAC;QACAM;QAEAhB;QACAC;QACAiB,QAAQZ;QACRC;IACF;AACF,EAAE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { __styles, mergeClasses } from '@griffel/react';
|
|
3
3
|
import { tokens } from '@fluentui/react-theme';
|
|
4
|
-
import { drawerCSSVars, useDrawerBaseClassNames, useDrawerDurationStyles } from '../../shared/useDrawerBaseStyles.styles';
|
|
4
|
+
import { drawerCSSVars, drawerDefaultStyles, useDrawerBaseClassNames, useDrawerDurationStyles } from '../../shared/useDrawerBaseStyles.styles';
|
|
5
5
|
export const drawerOverlayClassNames = {
|
|
6
6
|
root: 'fui-DrawerOverlay',
|
|
7
7
|
backdrop: 'fui-DrawerOverlay__backdrop'
|
|
@@ -11,6 +11,29 @@ export const drawerOverlayClassNames = {
|
|
|
11
11
|
*/
|
|
12
12
|
const useDrawerRootStyles = /*#__PURE__*/__styles({
|
|
13
13
|
root: {
|
|
14
|
+
z8tnut: "f1g0x7ka",
|
|
15
|
+
z189sj: ["fhxju0i", "f1cnd47f"],
|
|
16
|
+
Byoj8tv: "f1qch9an",
|
|
17
|
+
uwmqm3: ["f1cnd47f", "fhxju0i"],
|
|
18
|
+
B68tc82: "f1p9o1ba",
|
|
19
|
+
Bmxbyg5: "f1sil6mw",
|
|
20
|
+
Bbmb7ep: ["f1krrbdw", "f1deotkl"],
|
|
21
|
+
Beyfa6y: ["f1deotkl", "f1krrbdw"],
|
|
22
|
+
B7oj6ja: ["f10ostut", "f1ozlkrg"],
|
|
23
|
+
Btl43ni: ["f1ozlkrg", "f10ostut"],
|
|
24
|
+
B4j52fo: "fre7gi1",
|
|
25
|
+
Bekrc4i: ["f1358rze", "f1rvrf73"],
|
|
26
|
+
Bn0qgzm: "fqdk4by",
|
|
27
|
+
ibv6hh: ["f1rvrf73", "f1358rze"],
|
|
28
|
+
a9b677: "f3rx6dk",
|
|
29
|
+
B2u0y6b: "f1w39fev",
|
|
30
|
+
Bqenvij: "f11ysow2",
|
|
31
|
+
B7ck84d: "f1ewtqcl",
|
|
32
|
+
mc9l5x: "f22iagw",
|
|
33
|
+
Beiy3e4: "f1vx9l62",
|
|
34
|
+
Bt984gj: "f6jr5hl",
|
|
35
|
+
Brf1p80: "fbhxue7",
|
|
36
|
+
De3pzq: "fxugw4r",
|
|
14
37
|
qhf8xq: "f19dog8a",
|
|
15
38
|
Bhzewxz: "f15twtuk",
|
|
16
39
|
B5kzvoi: "f1yab3r1",
|
|
@@ -31,7 +54,7 @@ const useDrawerRootStyles = /*#__PURE__*/__styles({
|
|
|
31
54
|
E5pizo: "f10nrhrw"
|
|
32
55
|
}
|
|
33
56
|
}, {
|
|
34
|
-
d: [".f19dog8a{position:fixed;}", ".f15twtuk{top:0;}", ".f1yab3r1{bottom:0;}", ".fk73vx1{opacity:0;}", ".fliqkoi{box-shadow:0px transparent;}", ".f1neo61{transition-property:transform,box-shadow,opacity;}", ".f1ytgekk{will-change:transform,box-shadow,opacity;}", ".f1d8gkik{transform:translate3D(calc(var(--fui-Drawer--size) * -1), 0, 0);}", ".f1g0pcr8{transform:translate3D(calc(var(--fui-Drawer--size) * 1), 0, 0);}", ".f5p0z4x{opacity:1;}", ".f87uvqx{transform:translate3D(0, 0, 0);}", ".f10nrhrw{box-shadow:var(--shadow64);}"]
|
|
57
|
+
d: [".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f1krrbdw{border-bottom-right-radius:0;}", ".f1deotkl{border-bottom-left-radius:0;}", ".f10ostut{border-top-right-radius:0;}", ".f1ozlkrg{border-top-left-radius:0;}", ".fre7gi1{border-top-width:0;}", ".f1358rze{border-right-width:0;}", ".f1rvrf73{border-left-width:0;}", ".fqdk4by{border-bottom-width:0;}", ".f3rx6dk{width:var(--fui-Drawer--size);}", ".f1w39fev{max-width:100vw;}", ".f11ysow2{height:auto;}", ".f1ewtqcl{box-sizing:border-box;}", ".f22iagw{display:flex;}", ".f1vx9l62{flex-direction:column;}", ".f6jr5hl{align-items:flex-start;}", ".fbhxue7{justify-content:flex-start;}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f19dog8a{position:fixed;}", ".f15twtuk{top:0;}", ".f1yab3r1{bottom:0;}", ".fk73vx1{opacity:0;}", ".fliqkoi{box-shadow:0px transparent;}", ".f1neo61{transition-property:transform,box-shadow,opacity;}", ".f1ytgekk{will-change:transform,box-shadow,opacity;}", ".f1d8gkik{transform:translate3D(calc(var(--fui-Drawer--size) * -1), 0, 0);}", ".f1g0pcr8{transform:translate3D(calc(var(--fui-Drawer--size) * 1), 0, 0);}", ".f5p0z4x{opacity:1;}", ".f87uvqx{transform:translate3D(0, 0, 0);}", ".f10nrhrw{box-shadow:var(--shadow64);}"]
|
|
35
58
|
});
|
|
36
59
|
/**
|
|
37
60
|
* Styles for the backdrop slot
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","__styles","mergeClasses","tokens","drawerCSSVars","useDrawerBaseClassNames","useDrawerDurationStyles","drawerOverlayClassNames","root","backdrop","useDrawerRootStyles","qhf8xq","Bhzewxz","B5kzvoi","abs64n","E5pizo","Bmy1vo4","Es3by","start","Bz10aip","end","visible","d","useBackdropMotionStyles","Bkqvd7p","useDrawerOverlayStyles_unstable","state","baseClassNames","rootStyles","backdropMotionStyles","durationStyles","className","position","motion","active","size","backdropMotion"],"sources":["useDrawerOverlayStyles.styles.js"],"sourcesContent":["import * as React from 'react';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { drawerCSSVars, useDrawerBaseClassNames, useDrawerDurationStyles } from '../../shared/useDrawerBaseStyles.styles';\nexport const drawerOverlayClassNames = {\n root: 'fui-DrawerOverlay',\n backdrop: 'fui-DrawerOverlay__backdrop'\n};\n/**\n * Styles for the root slot\n */ const useDrawerRootStyles = makeStyles({\n root: {\n position: 'fixed',\n top: 0,\n bottom: 0,\n opacity: 0,\n boxShadow: '0px transparent',\n transitionProperty: 'transform, box-shadow, opacity',\n willChange: 'transform, box-shadow, opacity'\n },\n /* Positioning */ start: {\n transform: `translate3D(calc(var(${drawerCSSVars.drawerSizeVar}) * -1), 0, 0)`\n },\n end: {\n transform: `translate3D(calc(var(${drawerCSSVars.drawerSizeVar}) * 1), 0, 0)`\n },\n /* Visible */ visible: {\n opacity: 1,\n transform: 'translate3D(0, 0, 0)',\n boxShadow: tokens.shadow64\n }\n});\n/**\n * Styles for the backdrop slot\n */ const useBackdropMotionStyles = makeStyles({\n backdrop: {\n opacity: 0,\n transitionProperty: 'opacity',\n transitionTimingFunction: tokens.curveEasyEase,\n willChange: 'opacity'\n },\n visible: {\n opacity: 1\n }\n});\n/**\n * Apply styling to the DrawerOverlay slots based on the state\n */ export const useDrawerOverlayStyles_unstable = (state)=>{\n const baseClassNames = useDrawerBaseClassNames(state);\n const rootStyles = useDrawerRootStyles();\n const backdropMotionStyles = useBackdropMotionStyles();\n const durationStyles = useDrawerDurationStyles();\n const backdrop = state.root.backdrop;\n state.root.className = mergeClasses(drawerOverlayClassNames.root, baseClassNames, rootStyles.root, rootStyles[state.position], state.motion.active && rootStyles.visible, state.root.className);\n if (backdrop) {\n backdrop.className = mergeClasses(drawerOverlayClassNames.backdrop, backdropMotionStyles.backdrop, durationStyles[state.size], state.backdropMotion.active && backdropMotionStyles.visible, backdrop.className);\n }\n return state;\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAAAC,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,aAAa,EAAEC,uBAAuB,EAAEC,uBAAuB,QAAQ,yCAAyC;
|
|
1
|
+
{"version":3,"names":["React","__styles","mergeClasses","tokens","drawerCSSVars","drawerDefaultStyles","useDrawerBaseClassNames","useDrawerDurationStyles","drawerOverlayClassNames","root","backdrop","useDrawerRootStyles","z8tnut","z189sj","Byoj8tv","uwmqm3","B68tc82","Bmxbyg5","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","a9b677","B2u0y6b","Bqenvij","B7ck84d","mc9l5x","Beiy3e4","Bt984gj","Brf1p80","De3pzq","qhf8xq","Bhzewxz","B5kzvoi","abs64n","E5pizo","Bmy1vo4","Es3by","start","Bz10aip","end","visible","d","useBackdropMotionStyles","Bkqvd7p","useDrawerOverlayStyles_unstable","state","baseClassNames","rootStyles","backdropMotionStyles","durationStyles","className","position","motion","active","size","backdropMotion"],"sources":["useDrawerOverlayStyles.styles.js"],"sourcesContent":["import * as React from 'react';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { drawerCSSVars, drawerDefaultStyles, useDrawerBaseClassNames, useDrawerDurationStyles } from '../../shared/useDrawerBaseStyles.styles';\nexport const drawerOverlayClassNames = {\n root: 'fui-DrawerOverlay',\n backdrop: 'fui-DrawerOverlay__backdrop'\n};\n/**\n * Styles for the root slot\n */ const useDrawerRootStyles = makeStyles({\n root: {\n ...drawerDefaultStyles,\n position: 'fixed',\n top: 0,\n bottom: 0,\n opacity: 0,\n boxShadow: '0px transparent',\n transitionProperty: 'transform, box-shadow, opacity',\n willChange: 'transform, box-shadow, opacity'\n },\n /* Positioning */ start: {\n transform: `translate3D(calc(var(${drawerCSSVars.drawerSizeVar}) * -1), 0, 0)`\n },\n end: {\n transform: `translate3D(calc(var(${drawerCSSVars.drawerSizeVar}) * 1), 0, 0)`\n },\n /* Visible */ visible: {\n opacity: 1,\n transform: 'translate3D(0, 0, 0)',\n boxShadow: tokens.shadow64\n }\n});\n/**\n * Styles for the backdrop slot\n */ const useBackdropMotionStyles = makeStyles({\n backdrop: {\n opacity: 0,\n transitionProperty: 'opacity',\n transitionTimingFunction: tokens.curveEasyEase,\n willChange: 'opacity'\n },\n visible: {\n opacity: 1\n }\n});\n/**\n * Apply styling to the DrawerOverlay slots based on the state\n */ export const useDrawerOverlayStyles_unstable = (state)=>{\n const baseClassNames = useDrawerBaseClassNames(state);\n const rootStyles = useDrawerRootStyles();\n const backdropMotionStyles = useBackdropMotionStyles();\n const durationStyles = useDrawerDurationStyles();\n const backdrop = state.root.backdrop;\n state.root.className = mergeClasses(drawerOverlayClassNames.root, baseClassNames, rootStyles.root, rootStyles[state.position], state.motion.active && rootStyles.visible, state.root.className);\n if (backdrop) {\n backdrop.className = mergeClasses(drawerOverlayClassNames.backdrop, backdropMotionStyles.backdrop, durationStyles[state.size], state.backdropMotion.active && backdropMotionStyles.visible, backdrop.className);\n }\n return state;\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAAAC,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,aAAa,EAAEC,mBAAmB,EAAEC,uBAAuB,EAAEC,uBAAuB,QAAQ,yCAAyC;AAC9I,OAAO,MAAMC,uBAAuB,GAAG;EACnCC,IAAI,EAAE,mBAAmB;EACzBC,QAAQ,EAAE;AACd,CAAC;AACD;AACA;AACA;AAAI,MAAMC,mBAAmB,gBAAGV,QAAA;EAAAQ,IAAA;IAAAG,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,KAAA;EAAA;EAAAC,KAAA;IAAAC,OAAA;EAAA;EAAAC,GAAA;IAAAD,OAAA;EAAA;EAAAE,OAAA;IAAAP,MAAA;IAAAK,OAAA;IAAAJ,MAAA;EAAA;AAAA;EAAAO,CAAA;AAAA,CAsB/B,CAAC;AACF;AACA;AACA;AAAI,MAAMC,uBAAuB,gBAAG9C,QAAA;EAAAS,QAAA;IAAA4B,MAAA;IAAAE,OAAA;IAAAQ,OAAA;IAAAP,KAAA;EAAA;EAAAI,OAAA;IAAAP,MAAA;EAAA;AAAA;EAAAQ,CAAA;AAAA,CAUnC,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMG,+BAA+B,GAAIC,KAAK,IAAG;EACxD,MAAMC,cAAc,GAAG7C,uBAAuB,CAAC4C,KAAK,CAAC;EACrD,MAAME,UAAU,GAAGzC,mBAAmB,CAAC,CAAC;EACxC,MAAM0C,oBAAoB,GAAGN,uBAAuB,CAAC,CAAC;EACtD,MAAMO,cAAc,GAAG/C,uBAAuB,CAAC,CAAC;EAChD,MAAMG,QAAQ,GAAGwC,KAAK,CAACzC,IAAI,CAACC,QAAQ;EACpCwC,KAAK,CAACzC,IAAI,CAAC8C,SAAS,GAAGrD,YAAY,CAACM,uBAAuB,CAACC,IAAI,EAAE0C,cAAc,EAAEC,UAAU,CAAC3C,IAAI,EAAE2C,UAAU,CAACF,KAAK,CAACM,QAAQ,CAAC,EAAEN,KAAK,CAACO,MAAM,CAACC,MAAM,IAAIN,UAAU,CAACP,OAAO,EAAEK,KAAK,CAACzC,IAAI,CAAC8C,SAAS,CAAC;EAC/L,IAAI7C,QAAQ,EAAE;IACVA,QAAQ,CAAC6C,SAAS,GAAGrD,YAAY,CAACM,uBAAuB,CAACE,QAAQ,EAAE2C,oBAAoB,CAAC3C,QAAQ,EAAE4C,cAAc,CAACJ,KAAK,CAACS,IAAI,CAAC,EAAET,KAAK,CAACU,cAAc,CAACF,MAAM,IAAIL,oBAAoB,CAACR,OAAO,EAAEnC,QAAQ,CAAC6C,SAAS,CAAC;EACnN;EACA,OAAOL,KAAK;AAChB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DrawerBase.types.ts"],"sourcesContent":["import { MotionShorthand, MotionState } from '@fluentui/react-motion-preview';\n\nexport type DrawerBaseProps = {\n /**\n * Position of the drawer.\n *\n * @default 'start'\n */\n position?: 'start' | 'end';\n\n /**\n * Size of the drawer.\n *\n * - 'small' - Drawer is 320px wide.\n * - 'medium' - Drawer is 592px wide.\n * - 'large' - Drawer is 940px wide.\n * - 'full' - Drawer is 100vw wide.\n *\n * @default 'small'\n */\n size?: 'small' | 'medium' | 'large' | 'full';\n\n /**\n * Controls the open state of the Drawer\n *\n * @default false\n */\n open?: MotionShorthand<HTMLDivElement>;\n
|
|
1
|
+
{"version":3,"sources":["DrawerBase.types.ts"],"sourcesContent":["import { MotionShorthand, MotionState } from '@fluentui/react-motion-preview';\n\nexport type DrawerBaseProps = {\n /**\n * Position of the drawer.\n *\n * @default 'start'\n */\n position?: 'start' | 'end';\n\n /**\n * Size of the drawer.\n *\n * - 'small' - Drawer is 320px wide.\n * - 'medium' - Drawer is 592px wide.\n * - 'large' - Drawer is 940px wide.\n * - 'full' - Drawer is 100vw wide.\n *\n * @default 'small'\n */\n size?: 'small' | 'medium' | 'large' | 'full';\n\n /**\n * Controls the open state of the Drawer\n *\n * @default false\n */\n open?: MotionShorthand<HTMLDivElement>;\n};\n\nexport type DrawerBaseState = Required<Pick<DrawerBaseProps, 'position' | 'size'>> & {\n motion: MotionState<HTMLDivElement>;\n};\n"],"names":[],"mappings":"AAAA,WAgCE"}
|
|
@@ -7,34 +7,27 @@ export const drawerCSSVars = {
|
|
|
7
7
|
drawerSizeVar: '--fui-Drawer--size'
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Default shared styles for the Drawer component
|
|
11
11
|
*/
|
|
12
|
-
export const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
B7ck84d: "f1ewtqcl",
|
|
32
|
-
mc9l5x: "f22iagw",
|
|
33
|
-
Beiy3e4: "f1vx9l62",
|
|
34
|
-
Bt984gj: "f6jr5hl",
|
|
35
|
-
Brf1p80: "fbhxue7",
|
|
36
|
-
De3pzq: "fxugw4r"
|
|
37
|
-
},
|
|
12
|
+
export const drawerDefaultStyles = {
|
|
13
|
+
... /*#__PURE__*/shorthands.padding(0),
|
|
14
|
+
... /*#__PURE__*/shorthands.overflow('hidden'),
|
|
15
|
+
... /*#__PURE__*/shorthands.borderRadius(0),
|
|
16
|
+
... /*#__PURE__*/shorthands.border(0),
|
|
17
|
+
width: `var(${drawerCSSVars.drawerSizeVar})`,
|
|
18
|
+
maxWidth: '100vw',
|
|
19
|
+
height: 'auto',
|
|
20
|
+
boxSizing: 'border-box',
|
|
21
|
+
display: 'flex',
|
|
22
|
+
flexDirection: 'column',
|
|
23
|
+
alignItems: 'flex-start',
|
|
24
|
+
justifyContent: 'flex-start',
|
|
25
|
+
backgroundColor: tokens.colorNeutralBackground1
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Shared dynamic styles for the Drawer component
|
|
29
|
+
*/
|
|
30
|
+
const useDrawerStyles = /*#__PURE__*/__styles({
|
|
38
31
|
entering: {
|
|
39
32
|
Bkqvd7p: "f18ad807"
|
|
40
33
|
},
|
|
@@ -65,7 +58,7 @@ export const useDrawerBaseStyles = /*#__PURE__*/__styles({
|
|
|
65
58
|
Bjr0ffy: "fsdmzs6"
|
|
66
59
|
}
|
|
67
60
|
}, {
|
|
68
|
-
d: [".
|
|
61
|
+
d: [".f18ad807{transition-timing-function:var(--curveDecelerateMid);}", ".f1mfizis{transition-timing-function:var(--curveAccelerateMin);}", ".f1vgc2s3{left:0;}", ".f1e31b4d{right:0;}", ".fvfyk4{right:auto;}", ".frppm18{left:auto;}", ".f1exhnwo{--fui-Drawer--size:320px;}", ".fqofjzu{--fui-Drawer--size:592px;}", ".fce6y3m{--fui-Drawer--size:940px;}", ".fsdmzs6{--fui-Drawer--size:100vw;}"],
|
|
69
62
|
m: [["@media screen and (prefers-reduced-motion: reduce){.f5e8c63{transition-duration:0.001ms;}}", {
|
|
70
63
|
m: "screen and (prefers-reduced-motion: reduce)"
|
|
71
64
|
}]]
|
|
@@ -91,8 +84,8 @@ export const useDrawerBaseClassNames = ({
|
|
|
91
84
|
size,
|
|
92
85
|
motion
|
|
93
86
|
}) => {
|
|
94
|
-
const baseStyles =
|
|
87
|
+
const baseStyles = useDrawerStyles();
|
|
95
88
|
const durationStyles = useDrawerDurationStyles();
|
|
96
|
-
return mergeClasses(baseStyles
|
|
89
|
+
return mergeClasses(baseStyles[position], durationStyles[size], baseStyles[size], baseStyles.reducedMotion, motion.type === 'entering' && baseStyles.entering, motion.type === 'exiting' && baseStyles.exiting);
|
|
97
90
|
};
|
|
98
91
|
//# sourceMappingURL=useDrawerBaseStyles.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__styles","mergeClasses","shorthands","tokens","drawerCSSVars","drawerSizeVar","
|
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","shorthands","tokens","drawerCSSVars","drawerSizeVar","drawerDefaultStyles","padding","overflow","borderRadius","border","width","maxWidth","height","boxSizing","display","flexDirection","alignItems","justifyContent","backgroundColor","colorNeutralBackground1","useDrawerStyles","entering","Bkqvd7p","exiting","reducedMotion","Hwfdqs","start","oyh7mz","j35jbq","end","small","Bjr0ffy","medium","large","full","d","m","useDrawerDurationStyles","B3o57yi","useDrawerBaseClassNames","position","size","motion","baseStyles","durationStyles","type"],"sources":["useDrawerBaseStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\n/**\n * CSS variable names used internally for uniform styling in Drawer.\n */ export const drawerCSSVars = {\n drawerSizeVar: '--fui-Drawer--size'\n};\n/**\n * Default shared styles for the Drawer component\n */ export const drawerDefaultStyles = {\n ...shorthands.padding(0),\n ...shorthands.overflow('hidden'),\n ...shorthands.borderRadius(0),\n ...shorthands.border(0),\n width: `var(${drawerCSSVars.drawerSizeVar})`,\n maxWidth: '100vw',\n height: 'auto',\n boxSizing: 'border-box',\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-start',\n justifyContent: 'flex-start',\n backgroundColor: tokens.colorNeutralBackground1\n};\n/**\n * Shared dynamic styles for the Drawer component\n */ const useDrawerStyles = makeStyles({\n /* Motion */ entering: {\n transitionTimingFunction: tokens.curveDecelerateMid\n },\n exiting: {\n transitionTimingFunction: tokens.curveAccelerateMin\n },\n reducedMotion: {\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.001ms'\n }\n },\n /* Positioning */ start: {\n left: 0,\n right: 'auto'\n },\n end: {\n right: 0,\n left: 'auto'\n },\n /* Sizes */ small: {\n [drawerCSSVars.drawerSizeVar]: '320px'\n },\n medium: {\n [drawerCSSVars.drawerSizeVar]: '592px'\n },\n large: {\n [drawerCSSVars.drawerSizeVar]: '940px'\n },\n full: {\n [drawerCSSVars.drawerSizeVar]: '100vw'\n }\n});\nexport const useDrawerDurationStyles = makeStyles({\n small: {\n transitionDuration: tokens.durationGentle\n },\n medium: {\n transitionDuration: tokens.durationSlow\n },\n large: {\n transitionDuration: tokens.durationSlower\n },\n full: {\n transitionDuration: tokens.durationUltraSlow\n }\n});\nexport const useDrawerBaseClassNames = ({ position, size, motion })=>{\n const baseStyles = useDrawerStyles();\n const durationStyles = useDrawerDurationStyles();\n return mergeClasses(baseStyles[position], durationStyles[size], baseStyles[size], baseStyles.reducedMotion, motion.type === 'entering' && baseStyles.entering, motion.type === 'exiting' && baseStyles.exiting);\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,QAAQ,uBAAuB;AAC9C;AACA;AACA;AAAI,OAAO,MAAMC,aAAa,GAAG;EAC7BC,aAAa,EAAE;AACnB,CAAC;AACD;AACA;AACA;AAAI,OAAO,MAAMC,mBAAmB,GAAG;EACnC,iBAAGJ,UAAU,CAACK,OAAO,CAAC,CAAC,CAAC;EACxB,iBAAGL,UAAU,CAACM,QAAQ,CAAC,QAAQ,CAAC;EAChC,iBAAGN,UAAU,CAACO,YAAY,CAAC,CAAC,CAAC;EAC7B,iBAAGP,UAAU,CAACQ,MAAM,CAAC,CAAC,CAAC;EACvBC,KAAK,EAAG,OAAMP,aAAa,CAACC,aAAc,GAAE;EAC5CO,QAAQ,EAAE,OAAO;EACjBC,MAAM,EAAE,MAAM;EACdC,SAAS,EAAE,YAAY;EACvBC,OAAO,EAAE,MAAM;EACfC,aAAa,EAAE,QAAQ;EACvBC,UAAU,EAAE,YAAY;EACxBC,cAAc,EAAE,YAAY;EAC5BC,eAAe,EAAEhB,MAAM,CAACiB;AAC5B,CAAC;AACD;AACA;AACA;AAAI,MAAMC,eAAe,gBAAGrB,QAAA;EAAAsB,QAAA;IAAAC,OAAA;EAAA;EAAAC,OAAA;IAAAD,OAAA;EAAA;EAAAE,aAAA;IAAAC,MAAA;EAAA;EAAAC,KAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,GAAA;IAAAD,MAAA;IAAAD,MAAA;EAAA;EAAAG,KAAA;IAAAC,OAAA;EAAA;EAAAC,MAAA;IAAAD,OAAA;EAAA;EAAAE,KAAA;IAAAF,OAAA;EAAA;EAAAG,IAAA;IAAAH,OAAA;EAAA;AAAA;EAAAI,CAAA;EAAAC,CAAA;IAAAA,CAAA;EAAA;AAAA,CAgC3B,CAAC;AACF,OAAO,MAAMC,uBAAuB,gBAAGtC,QAAA;EAAA+B,KAAA;IAAAQ,OAAA;EAAA;EAAAN,MAAA;IAAAM,OAAA;EAAA;EAAAL,KAAA;IAAAK,OAAA;EAAA;EAAAJ,IAAA;IAAAI,OAAA;EAAA;AAAA;EAAAH,CAAA;AAAA,CAatC,CAAC;AACF,OAAO,MAAMI,uBAAuB,GAAGA,CAAC;EAAEC,QAAQ;EAAEC,IAAI;EAAEC;AAAO,CAAC,KAAG;EACjE,MAAMC,UAAU,GAAGvB,eAAe,CAAC,CAAC;EACpC,MAAMwB,cAAc,GAAGP,uBAAuB,CAAC,CAAC;EAChD,OAAOrC,YAAY,CAAC2C,UAAU,CAACH,QAAQ,CAAC,EAAEI,cAAc,CAACH,IAAI,CAAC,EAAEE,UAAU,CAACF,IAAI,CAAC,EAAEE,UAAU,CAACnB,aAAa,EAAEkB,MAAM,CAACG,IAAI,KAAK,UAAU,IAAIF,UAAU,CAACtB,QAAQ,EAAEqB,MAAM,CAACG,IAAI,KAAK,SAAS,IAAIF,UAAU,CAACpB,OAAO,CAAC;AACnN,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
export function useDrawerDefaultProps(props) {
|
|
2
|
-
const { open = false,
|
|
2
|
+
const { open = false, size = 'small', position = 'start' } = props;
|
|
3
3
|
return {
|
|
4
4
|
size,
|
|
5
5
|
position,
|
|
6
|
-
open
|
|
7
|
-
defaultOpen
|
|
6
|
+
open
|
|
8
7
|
};
|
|
9
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDrawerDefaultProps.ts"],"sourcesContent":["import { DrawerBaseProps } from './DrawerBase.types';\n\nexport function useDrawerDefaultProps(props: DrawerBaseProps) {\n const { open = false,
|
|
1
|
+
{"version":3,"sources":["useDrawerDefaultProps.ts"],"sourcesContent":["import { DrawerBaseProps } from './DrawerBase.types';\n\nexport function useDrawerDefaultProps(props: DrawerBaseProps) {\n const { open = false, size = 'small', position = 'start' } = props;\n\n return {\n size,\n position,\n open,\n };\n}\n"],"names":["useDrawerDefaultProps","props","open","size","position"],"mappings":"AAEA,OAAO,SAASA,sBAAsBC,KAAsB;IAC1D,MAAM,EAAEC,OAAO,KAAK,EAAEC,OAAO,OAAO,EAAEC,WAAW,OAAO,EAAE,GAAGH;IAE7D,OAAO;QACLE;QACAC;QACAF;IACF;AACF"}
|
|
@@ -22,71 +22,16 @@ const drawerBodyClassNames = {
|
|
|
22
22
|
};
|
|
23
23
|
/**
|
|
24
24
|
* Styles for the root slot
|
|
25
|
-
*/ const useStyles = /*#__PURE__*/ (0, _react.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
Frg6f3: [
|
|
34
|
-
"f1tyq0we",
|
|
35
|
-
"f11qmguv"
|
|
36
|
-
],
|
|
37
|
-
z8tnut: "f1sl3k7w",
|
|
38
|
-
z189sj: [
|
|
39
|
-
"fnbas0t",
|
|
40
|
-
"f1mswpri"
|
|
41
|
-
],
|
|
42
|
-
Byoj8tv: "f1brlhvm",
|
|
43
|
-
uwmqm3: [
|
|
44
|
-
"f1mswpri",
|
|
45
|
-
"fnbas0t"
|
|
46
|
-
],
|
|
47
|
-
B68tc82: "f1oy3dpc",
|
|
48
|
-
Bmxbyg5: "f5zp4f",
|
|
49
|
-
Bh6795r: "fqerorx",
|
|
50
|
-
Bnnss6s: "f1neuvcm",
|
|
51
|
-
xawz: "f1pztt34",
|
|
52
|
-
qb2dma: "f1ub7u0d",
|
|
53
|
-
Bcmaq0h: "f1igvcbx",
|
|
54
|
-
B676am1: "f1fofb6i",
|
|
55
|
-
e5kdtc: "fo6xqva",
|
|
56
|
-
De3pzq: "fxugw4r",
|
|
57
|
-
Bkjc3bi: "fcre6b6",
|
|
58
|
-
Bgh53k4: "f1besv5s",
|
|
59
|
-
Bcx2cba: "f1pqm9hp",
|
|
60
|
-
gonrqn: "f2c46kh"
|
|
61
|
-
}
|
|
62
|
-
}, {
|
|
63
|
-
d: [
|
|
64
|
-
".fkrn0sh{margin-top:-1px;}",
|
|
65
|
-
".f11qmguv{margin-right:0;}",
|
|
66
|
-
".f1tyq0we{margin-left:0;}",
|
|
67
|
-
".fmxx68s{margin-bottom:-1px;}",
|
|
68
|
-
".f1sl3k7w{padding-top:1px;}",
|
|
69
|
-
".fnbas0t{padding-right:var(--spacingHorizontalXXL);}",
|
|
70
|
-
".f1mswpri{padding-left:var(--spacingHorizontalXXL);}",
|
|
71
|
-
".f1brlhvm{padding-bottom:1px;}",
|
|
72
|
-
".f1oy3dpc{overflow-x:auto;}",
|
|
73
|
-
".f5zp4f{overflow-y:auto;}",
|
|
74
|
-
".fqerorx{flex-grow:1;}",
|
|
75
|
-
".f1neuvcm{flex-shrink:1;}",
|
|
76
|
-
".f1pztt34{flex-basis:0;}",
|
|
77
|
-
".f1ub7u0d{align-self:stretch;}",
|
|
78
|
-
".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));}",
|
|
79
|
-
".f1fofb6i{-webkit-background-position:bottom center,top center,bottom center,top center;background-position:bottom center,top center,bottom center,top center;}",
|
|
80
|
-
".fo6xqva{background-repeat:no-repeat;}",
|
|
81
|
-
".fxugw4r{background-color:var(--colorNeutralBackground1);}",
|
|
82
|
-
".fcre6b6{background-size:100% 2px,100% 2px,100% 1px,100% 1px;}",
|
|
83
|
-
".f1besv5s{background-attachment:local,local,scroll,scroll;}",
|
|
84
|
-
".f1pqm9hp:last-child{padding-bottom:calc(var(--spacingHorizontalXXL) + 1px);}",
|
|
85
|
-
".f2c46kh:first-child{padding-top:calc(var(--spacingHorizontalXXL) + 1px);}"
|
|
86
|
-
]
|
|
87
|
-
});
|
|
25
|
+
*/ const useStyles = /*#__PURE__*/ (0, _react.__resetStyles)("r10z3gsy", "r1ppc5ap", [
|
|
26
|
+
".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;}",
|
|
27
|
+
".r10z3gsy:last-child{padding-bottom:calc(var(--spacingHorizontalXXL) + 1px);}",
|
|
28
|
+
".r10z3gsy:first-child{padding-top:calc(var(--spacingHorizontalXXL) + 1px);}",
|
|
29
|
+
".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;}",
|
|
30
|
+
".r1ppc5ap:last-child{padding-bottom:calc(var(--spacingHorizontalXXL) + 1px);}",
|
|
31
|
+
".r1ppc5ap:first-child{padding-top:calc(var(--spacingHorizontalXXL) + 1px);}"
|
|
32
|
+
]);
|
|
88
33
|
const useDrawerBodyStyles_unstable = (state)=>{
|
|
89
34
|
const styles = useStyles();
|
|
90
|
-
state.root.className = (0, _react.mergeClasses)(drawerBodyClassNames.root, styles
|
|
35
|
+
state.root.className = (0, _react.mergeClasses)(drawerBodyClassNames.root, styles, state.root.className);
|
|
91
36
|
return state;
|
|
92
37
|
}; //# sourceMappingURL=useDrawerBodyStyles.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDrawerBodyStyles.styles.js"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["useDrawerBodyStyles.styles.js"],"sourcesContent":["import { __resetStyles, 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 */\nconst 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);}\"]);\n/**\n * Apply styling to the DrawerBody slots based on the state\n */\nexport const useDrawerBodyStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(drawerBodyClassNames.root, styles, state.root.className);\n return state;\n};\n//# sourceMappingURL=useDrawerBodyStyles.styles.js.map"],"names":["drawerBodyClassNames","useDrawerBodyStyles_unstable","root","useStyles","__resetStyles","state","styles","className","mergeClasses"],"mappings":";;;;;;;;;;;IAEaA,oBAAoB;eAApBA;;IAUAC,4BAA4B;eAA5BA;;;uBAZ2C;AAEjD,MAAMD,uBAAuB;IAClCE,MAAM;AACR;AACA;;CAEC,GACD,MAAMC,YAAY,WAAW,GAAEC,IAAAA,oBAAa,EAAC,YAAY,YAAY;IAAC;IAA+8B;IAAiF;IAA+E;IAA+8B;IAAiF;CAA8E;AAI5xE,MAAMH,+BAA+BI,CAAAA;IAC1C,MAAMC,SAASH;IACfE,MAAMH,IAAI,CAACK,SAAS,GAAGC,IAAAA,mBAAY,EAACR,qBAAqBE,IAAI,EAAEI,QAAQD,MAAMH,IAAI,CAACK,SAAS;IAC3F,OAAOF;AACT,GACA,sDAAsD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DrawerFooter.js"],"sourcesContent":["import * as React from 'react';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { useDrawerFooter_unstable } from './useDrawerFooter';\nimport { renderDrawerFooter_unstable } from './renderDrawerFooter';\nimport { useDrawerFooterStyles_unstable } from './useDrawerFooterStyles.styles';\n/**\n * DrawerFooter
|
|
1
|
+
{"version":3,"sources":["DrawerFooter.js"],"sourcesContent":["import * as React from 'react';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { useDrawerFooter_unstable } from './useDrawerFooter';\nimport { renderDrawerFooter_unstable } from './renderDrawerFooter';\nimport { useDrawerFooterStyles_unstable } from './useDrawerFooterStyles.styles';\n/**\n * DrawerFooter provides a structured footer for the drawer component.\n */ export const DrawerFooter = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useDrawerFooter_unstable(props, ref);\n useDrawerFooterStyles_unstable(state);\n useCustomStyleHook_unstable('useDrawerFooterStyles_unstable')(state);\n return renderDrawerFooter_unstable(state);\n});\nDrawerFooter.displayName = 'DrawerFooter';\n"],"names":["DrawerFooter","React","forwardRef","props","ref","state","useDrawerFooter_unstable","useDrawerFooterStyles_unstable","useCustomStyleHook_unstable","renderDrawerFooter_unstable","displayName"],"mappings":";;;;+BAOiBA;;;eAAAA;;;;iEAPM;qCACqB;iCACH;oCACG;6CACG;AAGpC,MAAMA,eAAe,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACnE,MAAMC,QAAQC,IAAAA,yCAAwB,EAACH,OAAOC;IAC9CG,IAAAA,2DAA8B,EAACF;IAC/BG,IAAAA,gDAA2B,EAAC,kCAAkCH;IAC9D,OAAOI,IAAAA,+CAA2B,EAACJ;AACvC;AACAL,aAAaU,WAAW,GAAG"}
|
|
@@ -22,37 +22,12 @@ const drawerFooterClassNames = {
|
|
|
22
22
|
};
|
|
23
23
|
/**
|
|
24
24
|
* Styles for the root slot
|
|
25
|
-
*/ const useStyles = /*#__PURE__*/ (0, _react.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"fnbas0t",
|
|
30
|
-
"f1mswpri"
|
|
31
|
-
],
|
|
32
|
-
Byoj8tv: "fz66xbh",
|
|
33
|
-
uwmqm3: [
|
|
34
|
-
"f1mswpri",
|
|
35
|
-
"fnbas0t"
|
|
36
|
-
],
|
|
37
|
-
mc9l5x: "f22iagw",
|
|
38
|
-
Brf1p80: "fbhxue7",
|
|
39
|
-
Bt984gj: "f122n59",
|
|
40
|
-
i8kkvl: "fsnqrgy"
|
|
41
|
-
}
|
|
42
|
-
}, {
|
|
43
|
-
d: [
|
|
44
|
-
".fikn0iw{padding-top:var(--spacingVerticalL);}",
|
|
45
|
-
".fnbas0t{padding-right:var(--spacingHorizontalXXL);}",
|
|
46
|
-
".f1mswpri{padding-left:var(--spacingHorizontalXXL);}",
|
|
47
|
-
".fz66xbh{padding-bottom:var(--spacingVerticalXXL);}",
|
|
48
|
-
".f22iagw{display:flex;}",
|
|
49
|
-
".fbhxue7{justify-content:flex-start;}",
|
|
50
|
-
".f122n59{align-items:center;}",
|
|
51
|
-
".fsnqrgy{column-gap:var(--spacingHorizontalS);}"
|
|
52
|
-
]
|
|
53
|
-
});
|
|
25
|
+
*/ const useStyles = /*#__PURE__*/ (0, _react.__resetStyles)("rli1cm2", "r1xlf3nx", [
|
|
26
|
+
".rli1cm2{padding-top:var(--spacingVerticalL);padding-right:var(--spacingHorizontalXXL);padding-bottom:var(--spacingVerticalXXL);padding-left:var(--spacingHorizontalXXL);display:flex;justify-content:flex-start;align-items:center;column-gap:var(--spacingHorizontalS);}",
|
|
27
|
+
".r1xlf3nx{padding-top:var(--spacingVerticalL);padding-left:var(--spacingHorizontalXXL);padding-bottom:var(--spacingVerticalXXL);padding-right:var(--spacingHorizontalXXL);display:flex;justify-content:flex-start;align-items:center;column-gap:var(--spacingHorizontalS);}"
|
|
28
|
+
]);
|
|
54
29
|
const useDrawerFooterStyles_unstable = (state)=>{
|
|
55
30
|
const styles = useStyles();
|
|
56
|
-
state.root.className = (0, _react.mergeClasses)(drawerFooterClassNames.root, styles
|
|
31
|
+
state.root.className = (0, _react.mergeClasses)(drawerFooterClassNames.root, styles, state.root.className);
|
|
57
32
|
return state;
|
|
58
33
|
}; //# sourceMappingURL=useDrawerFooterStyles.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDrawerFooterStyles.styles.js"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["useDrawerFooterStyles.styles.js"],"sourcesContent":["import { __resetStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const drawerFooterClassNames = {\n root: 'fui-DrawerFooter'\n};\n/**\n * Styles for the root slot\n */\nconst useStyles = /*#__PURE__*/__resetStyles(\"rli1cm2\", \"r1xlf3nx\", [\".rli1cm2{padding-top:var(--spacingVerticalL);padding-right:var(--spacingHorizontalXXL);padding-bottom:var(--spacingVerticalXXL);padding-left:var(--spacingHorizontalXXL);display:flex;justify-content:flex-start;align-items:center;column-gap:var(--spacingHorizontalS);}\", \".r1xlf3nx{padding-top:var(--spacingVerticalL);padding-left:var(--spacingHorizontalXXL);padding-bottom:var(--spacingVerticalXXL);padding-right:var(--spacingHorizontalXXL);display:flex;justify-content:flex-start;align-items:center;column-gap:var(--spacingHorizontalS);}\"]);\n/**\n * Apply styling to the DrawerFooter slots based on the state\n */\nexport const useDrawerFooterStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(drawerFooterClassNames.root, styles, state.root.className);\n return state;\n};\n//# sourceMappingURL=useDrawerFooterStyles.styles.js.map"],"names":["drawerFooterClassNames","useDrawerFooterStyles_unstable","root","useStyles","__resetStyles","state","styles","className","mergeClasses"],"mappings":";;;;;;;;;;;IAEaA,sBAAsB;eAAtBA;;IAUAC,8BAA8B;eAA9BA;;;uBAZ2C;AAEjD,MAAMD,yBAAyB;IACpCE,MAAM;AACR;AACA;;CAEC,GACD,MAAMC,YAAY,WAAW,GAAEC,IAAAA,oBAAa,EAAC,WAAW,YAAY;IAAC;IAA8Q;CAA8Q;AAI1lB,MAAMH,iCAAiCI,CAAAA;IAC5C,MAAMC,SAASH;IACfE,MAAMH,IAAI,CAACK,SAAS,GAAGC,IAAAA,mBAAY,EAACR,uBAAuBE,IAAI,EAAEI,QAAQD,MAAMH,IAAI,CAACK,SAAS;IAC7F,OAAOF;AACT,GACA,wDAAwD"}
|