@fluentui/react-drawer 9.75.1-experimental.css-modules.20261103-d6c85ee2a9.0 → 9.75.2-experimental.css-modules.20261113-ba13c87438.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 +13 -13
- package/README.md +1 -1
- package/lib/components/DrawerBody/DrawerBody.module.css +13 -14
- package/lib/components/DrawerBody/useDrawerBody.js +14 -2
- package/lib/components/DrawerBody/useDrawerBody.js.map +1 -1
- package/lib/components/DrawerFooter/DrawerFooter.module.css +30 -31
- package/lib/components/DrawerHeader/DrawerHeader.module.css +30 -31
- package/lib/components/DrawerHeaderNavigation/DrawerHeaderNavigation.module.css +3 -4
- package/lib/components/DrawerHeaderTitle/DrawerHeaderTitle.module.css +8 -10
- package/lib/components/InlineDrawer/InlineDrawer.module.css +24 -25
- package/lib/components/OverlayDrawer/OverlayDrawer.module.css +31 -32
- package/lib/components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.module.css +11 -12
- package/lib/shared/DrawerBase.module.css +51 -53
- package/lib-commonjs/components/DrawerBody/DrawerBody.module.css +13 -14
- package/lib-commonjs/components/DrawerBody/useDrawerBody.cjs +14 -2
- package/lib-commonjs/components/DrawerBody/useDrawerBody.cjs.map +1 -1
- package/lib-commonjs/components/DrawerFooter/DrawerFooter.module.css +30 -31
- package/lib-commonjs/components/DrawerHeader/DrawerHeader.module.css +30 -31
- package/lib-commonjs/components/DrawerHeaderNavigation/DrawerHeaderNavigation.module.css +3 -4
- package/lib-commonjs/components/DrawerHeaderTitle/DrawerHeaderTitle.module.css +8 -10
- package/lib-commonjs/components/InlineDrawer/InlineDrawer.module.css +24 -25
- package/lib-commonjs/components/OverlayDrawer/OverlayDrawer.module.css +31 -32
- package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.module.css +11 -12
- package/lib-commonjs/shared/DrawerBase.module.css +51 -53
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-drawer
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on
|
|
3
|
+
<!-- This log was last generated on Fri, 13 Nov 2026 20:37:13 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [9.75.
|
|
7
|
+
## [9.75.2-experimental.css-modules.20261113-ba13c87438.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-drawer_v9.75.2-experimental.css-modules.20261113-ba13c87438.0)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Fri, 13 Nov 2026 20:37:13 GMT
|
|
10
10
|
|
|
11
11
|
### Changes
|
|
12
12
|
|
|
13
|
-
- Release 9.75.
|
|
14
|
-
- Bump @fluentui/react-dialog to v9.75.
|
|
15
|
-
- Bump @fluentui/react-jsx-runtime to v9.75.
|
|
16
|
-
- Bump @fluentui/react-motion to v9.75.
|
|
17
|
-
- Bump @fluentui/react-motion-components-preview to v9.75.
|
|
18
|
-
- Bump @fluentui/react-portal to v9.75.
|
|
19
|
-
- Bump @fluentui/react-shared-contexts to v9.75.
|
|
20
|
-
- Bump @fluentui/react-tabster to v9.75.
|
|
21
|
-
- Bump @fluentui/react-theme to v9.75.
|
|
22
|
-
- Bump @fluentui/react-utilities to v9.75.
|
|
13
|
+
- Release 9.75.2-experimental.css-modules.20261113-ba13c87438 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by 257645319+office-ogx-auth-helper[bot]@users.noreply.github.com)
|
|
14
|
+
- Bump @fluentui/react-dialog to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
15
|
+
- Bump @fluentui/react-jsx-runtime to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
16
|
+
- Bump @fluentui/react-motion to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
17
|
+
- Bump @fluentui/react-motion-components-preview to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
18
|
+
- Bump @fluentui/react-portal to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
19
|
+
- Bump @fluentui/react-shared-contexts to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
20
|
+
- Bump @fluentui/react-tabster to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
21
|
+
- Bump @fluentui/react-theme to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
22
|
+
- Bump @fluentui/react-utilities to v9.75.2-experimental.css-modules.20261113-ba13c87438.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
23
23
|
|
|
24
24
|
## [9.13.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-drawer_v9.13.5)
|
|
25
25
|
|
package/README.md
CHANGED
|
@@ -68,7 +68,7 @@ Drawer, DrawerBody, DrawerFooter, DrawerHeader, DrawerHeaderNavigation, DrawerHe
|
|
|
68
68
|
The default components continue to use Griffel. An opt-in bundler resolver can replace
|
|
69
69
|
`use<Component>Styles.styles.js` with `use<Component>Styles.styles.css.js`
|
|
70
70
|
(and the corresponding `.ts` source modules). Keep the emitted CSS assets and process
|
|
71
|
-
their CSS Modules imports;
|
|
71
|
+
their CSS Modules imports; rules are unlayered, like Griffel's. Apply the same selection
|
|
72
72
|
to client and server bundles. Within-package composed alternatives import their CSS
|
|
73
73
|
base hook explicitly. These alternatives do not make composed external components
|
|
74
74
|
Griffel-free. Browser, forced-colors, SSR, and full VRT parity require separate validation.
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
@
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
1
|
+
/* @griffel-buckets reset: .root */
|
|
2
|
+
.root {
|
|
3
|
+
padding: 0 var(--spacingHorizontalXXL);
|
|
4
|
+
flex: 1;
|
|
5
|
+
align-self: stretch;
|
|
6
|
+
position: relative;
|
|
7
|
+
z-index: 1;
|
|
8
|
+
overflow: auto;
|
|
9
|
+
&:last-child {
|
|
10
|
+
padding-bottom: calc(var(--spacingHorizontalXXL) + var(--strokeWidthThin));
|
|
11
|
+
}
|
|
12
|
+
&:first-child {
|
|
13
|
+
padding-top: calc(var(--spacingHorizontalXXL) + var(--strokeWidthThin));
|
|
15
14
|
}
|
|
16
15
|
}
|
|
@@ -3,19 +3,31 @@ import * as React from "react";
|
|
|
3
3
|
import { mergeCallbacks, slot, useAnimationFrame, useMergedRefs, useIsomorphicLayoutEffect, getIntrinsicElementProps } from "@fluentui/react-utilities";
|
|
4
4
|
import { useDrawerContext_unstable } from "../../contexts/drawerContext.js";
|
|
5
5
|
import { useFluent_unstable as useFluent } from "@fluentui/react-shared-contexts";
|
|
6
|
+
/**
|
|
7
|
+
* `clientHeight` and `scrollHeight` are rounded to integers while `scrollTop` is fractional, so
|
|
8
|
+
* scroll positions have to be compared with a tolerance instead of for exact equality. Without it
|
|
9
|
+
* a fully scrolled body reports `middle` whenever the browser zoom is not a whole number.
|
|
10
|
+
*
|
|
11
|
+
* A non-scrollable element can report up to 1px of overflow that it cannot actually scroll, and
|
|
12
|
+
* both values are integers, so a single pixel is enough here.
|
|
13
|
+
*/ const OVERFLOW_TOLERANCE = 1;
|
|
14
|
+
/**
|
|
15
|
+
* A fully scrolled element can sit short of its own maximum scroll offset because `scrollTop` is
|
|
16
|
+
* fractional while the values it is compared against are rounded.
|
|
17
|
+
*/ const SCROLL_BOTTOM_TOLERANCE = 2;
|
|
6
18
|
/**
|
|
7
19
|
* Get the current scroll state of the DrawerBody.
|
|
8
20
|
*
|
|
9
21
|
* @internal
|
|
10
22
|
* @param element - HTMLElement to check scroll state of
|
|
11
23
|
*/ const getScrollState = ({ scrollTop, scrollHeight, clientHeight })=>{
|
|
12
|
-
if (scrollHeight <=
|
|
24
|
+
if (scrollHeight - clientHeight <= OVERFLOW_TOLERANCE) {
|
|
13
25
|
return 'none';
|
|
14
26
|
}
|
|
15
27
|
if (scrollTop === 0) {
|
|
16
28
|
return 'top';
|
|
17
29
|
}
|
|
18
|
-
if (
|
|
30
|
+
if (scrollHeight - clientHeight - scrollTop <= SCROLL_BOTTOM_TOLERANCE) {
|
|
19
31
|
return 'bottom';
|
|
20
32
|
}
|
|
21
33
|
return 'middle';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/DrawerBody/useDrawerBody.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport {\n mergeCallbacks,\n slot,\n useAnimationFrame,\n useMergedRefs,\n useIsomorphicLayoutEffect,\n getIntrinsicElementProps,\n} from '@fluentui/react-utilities';\n\nimport { useDrawerContext_unstable } from '../../contexts/drawerContext';\nimport type { DrawerScrollState } from '../../shared/DrawerBase.types';\n\nimport type { DrawerBodyProps, DrawerBodyState } from './DrawerBody.types';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n\n/**\n * Get the current scroll state of the DrawerBody.\n *\n * @internal\n * @param element - HTMLElement to check scroll state of\n */\nconst getScrollState = ({ scrollTop, scrollHeight, clientHeight }: HTMLElement): DrawerScrollState => {\n if (scrollHeight <=
|
|
1
|
+
{"version":3,"sources":["../../../src/components/DrawerBody/useDrawerBody.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport {\n mergeCallbacks,\n slot,\n useAnimationFrame,\n useMergedRefs,\n useIsomorphicLayoutEffect,\n getIntrinsicElementProps,\n} from '@fluentui/react-utilities';\n\nimport { useDrawerContext_unstable } from '../../contexts/drawerContext';\nimport type { DrawerScrollState } from '../../shared/DrawerBase.types';\n\nimport type { DrawerBodyProps, DrawerBodyState } from './DrawerBody.types';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n\n/**\n * `clientHeight` and `scrollHeight` are rounded to integers while `scrollTop` is fractional, so\n * scroll positions have to be compared with a tolerance instead of for exact equality. Without it\n * a fully scrolled body reports `middle` whenever the browser zoom is not a whole number.\n *\n * A non-scrollable element can report up to 1px of overflow that it cannot actually scroll, and\n * both values are integers, so a single pixel is enough here.\n */\nconst OVERFLOW_TOLERANCE = 1;\n\n/**\n * A fully scrolled element can sit short of its own maximum scroll offset because `scrollTop` is\n * fractional while the values it is compared against are rounded.\n */\nconst SCROLL_BOTTOM_TOLERANCE = 2;\n\n/**\n * Get the current scroll state of the DrawerBody.\n *\n * @internal\n * @param element - HTMLElement to check scroll state of\n */\nconst getScrollState = ({ scrollTop, scrollHeight, clientHeight }: HTMLElement): DrawerScrollState => {\n if (scrollHeight - clientHeight <= OVERFLOW_TOLERANCE) {\n return 'none';\n }\n\n if (scrollTop === 0) {\n return 'top';\n }\n\n if (scrollHeight - clientHeight - scrollTop <= SCROLL_BOTTOM_TOLERANCE) {\n return 'bottom';\n }\n\n return 'middle';\n};\n\n/**\n * Create the state required to render DrawerBody.\n *\n * The returned state can be modified with hooks such as useDrawerBodyStyles_unstable,\n * before being passed to renderDrawerBody_unstable.\n *\n * @param props - props from this instance of DrawerBody\n * @param ref - reference to root HTMLElement of DrawerBody\n */\nexport const useDrawerBody_unstable = (props: DrawerBodyProps, ref: React.Ref<HTMLElement>): DrawerBodyState => {\n const { targetDocument } = useFluent();\n const win = targetDocument?.defaultView;\n\n const { setScrollState } = useDrawerContext_unstable();\n\n const scrollRef = React.useRef<HTMLDivElement | null>(null);\n const mergedRef = useMergedRefs(ref, scrollRef);\n\n const [setScrollAnimationFrame, cancelScrollAnimationFrame] = useAnimationFrame();\n const [setResizeAnimationFrame, cancelResizeAnimationFrame] = useAnimationFrame();\n\n const updateScrollState = React.useCallback(() => {\n if (!scrollRef.current) {\n return;\n }\n\n setScrollState(getScrollState(scrollRef.current));\n }, [setScrollState]);\n\n const onScroll = React.useCallback(() => {\n cancelScrollAnimationFrame();\n setScrollAnimationFrame(updateScrollState);\n }, [cancelScrollAnimationFrame, setScrollAnimationFrame, updateScrollState]);\n\n // Update scroll state on children change\n useIsomorphicLayoutEffect(updateScrollState, [props.children, updateScrollState]);\n\n // Update scroll state on mount and when resize occurs\n useIsomorphicLayoutEffect(() => {\n if (!scrollRef.current || !win?.ResizeObserver) {\n return;\n }\n\n const observer = new win.ResizeObserver(() => setResizeAnimationFrame(updateScrollState));\n\n observer.observe(scrollRef.current);\n\n return () => {\n observer.disconnect();\n cancelResizeAnimationFrame();\n };\n }, [setResizeAnimationFrame, cancelResizeAnimationFrame, updateScrollState, win]);\n\n return {\n components: {\n root: 'div',\n },\n\n root: slot.always(\n getIntrinsicElementProps<DrawerBodyProps>('div', {\n ref: mergedRef,\n ...props,\n // eslint-disable-next-line react-hooks/refs\n onScroll: mergeCallbacks(props.onScroll, onScroll),\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["React","mergeCallbacks","slot","useAnimationFrame","useMergedRefs","useIsomorphicLayoutEffect","getIntrinsicElementProps","useDrawerContext_unstable","useFluent_unstable","useFluent","OVERFLOW_TOLERANCE","SCROLL_BOTTOM_TOLERANCE","getScrollState","scrollTop","scrollHeight","clientHeight","useDrawerBody_unstable","props","ref","targetDocument","win","defaultView","setScrollState","scrollRef","useRef","mergedRef","setScrollAnimationFrame","cancelScrollAnimationFrame","setResizeAnimationFrame","cancelResizeAnimationFrame","updateScrollState","useCallback","current","onScroll","children","ResizeObserver","observer","observe","disconnect","components","root","always","elementType"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,cAAc,EACdC,IAAI,EACJC,iBAAiB,EACjBC,aAAa,EACbC,yBAAyB,EACzBC,wBAAwB,QACnB,4BAA4B;AAEnC,SAASC,yBAAyB,QAAQ,kCAA+B;AAIzE,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAElF;;;;;;;CAOC,GACD,MAAMC,qBAAqB;AAE3B;;;CAGC,GACD,MAAMC,0BAA0B;AAEhC;;;;;CAKC,GACD,MAAMC,iBAAiB,CAAC,EAAEC,SAAS,EAAEC,YAAY,EAAEC,YAAY,EAAe;IAC5E,IAAID,eAAeC,gBAAgBL,oBAAoB;QACrD,OAAO;IACT;IAEA,IAAIG,cAAc,GAAG;QACnB,OAAO;IACT;IAEA,IAAIC,eAAeC,eAAeF,aAAaF,yBAAyB;QACtE,OAAO;IACT;IAEA,OAAO;AACT;AAEA;;;;;;;;CAQC,GACD,OAAO,MAAMK,yBAAyB,CAACC,OAAwBC;IAC7D,MAAM,EAAEC,cAAc,EAAE,GAAGV;IAC3B,MAAMW,MAAMD,2BAAAA,qCAAAA,eAAgBE,WAAW;IAEvC,MAAM,EAAEC,cAAc,EAAE,GAAGf;IAE3B,MAAMgB,YAAYvB,MAAMwB,MAAM,CAAwB;IACtD,MAAMC,YAAYrB,cAAcc,KAAKK;IAErC,MAAM,CAACG,yBAAyBC,2BAA2B,GAAGxB;IAC9D,MAAM,CAACyB,yBAAyBC,2BAA2B,GAAG1B;IAE9D,MAAM2B,oBAAoB9B,MAAM+B,WAAW,CAAC;QAC1C,IAAI,CAACR,UAAUS,OAAO,EAAE;YACtB;QACF;QAEAV,eAAeV,eAAeW,UAAUS,OAAO;IACjD,GAAG;QAACV;KAAe;IAEnB,MAAMW,WAAWjC,MAAM+B,WAAW,CAAC;QACjCJ;QACAD,wBAAwBI;IAC1B,GAAG;QAACH;QAA4BD;QAAyBI;KAAkB;IAE3E,yCAAyC;IACzCzB,0BAA0ByB,mBAAmB;QAACb,MAAMiB,QAAQ;QAAEJ;KAAkB;IAEhF,sDAAsD;IACtDzB,0BAA0B;QACxB,IAAI,CAACkB,UAAUS,OAAO,IAAI,EAACZ,gBAAAA,0BAAAA,IAAKe,cAAc,GAAE;YAC9C;QACF;QAEA,MAAMC,WAAW,IAAIhB,IAAIe,cAAc,CAAC,IAAMP,wBAAwBE;QAEtEM,SAASC,OAAO,CAACd,UAAUS,OAAO;QAElC,OAAO;YACLI,SAASE,UAAU;YACnBT;QACF;IACF,GAAG;QAACD;QAAyBC;QAA4BC;QAAmBV;KAAI;IAEhF,OAAO;QACLmB,YAAY;YACVC,MAAM;QACR;QAEAA,MAAMtC,KAAKuC,MAAM,CACfnC,yBAA0C,OAAO;YAC/CY,KAAKO;YACL,GAAGR,KAAK;YACR,4CAA4C;YAC5CgB,UAAUhC,eAAegB,MAAMgB,QAAQ,EAAEA;QAC3C,IACA;YAAES,aAAa;QAAM;IAEzB;AACF,EAAE"}
|
|
@@ -1,36 +1,35 @@
|
|
|
1
|
-
@
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
/* @griffel-buckets reset: .root */
|
|
2
|
+
.root {
|
|
3
|
+
width: 100%;
|
|
4
|
+
max-width: 100%;
|
|
5
|
+
padding: var(--spacingVerticalL) var(--spacingHorizontalXXL) var(--spacingVerticalXXL);
|
|
6
|
+
display: flex;
|
|
7
|
+
justify-content: flex-start;
|
|
8
|
+
align-items: center;
|
|
9
|
+
column-gap: var(--spacingHorizontalS);
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
position: relative;
|
|
12
|
+
z-index: 2;
|
|
13
|
+
}
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
15
|
+
.root:where(:not(.none)) {
|
|
16
|
+
&::before {
|
|
17
|
+
height: var(--strokeWidthThin);
|
|
18
|
+
position: absolute;
|
|
19
|
+
inset-inline-end: 0;
|
|
20
|
+
inset-inline-start: 0;
|
|
21
|
+
opacity: 0;
|
|
22
|
+
background-color: var(--colorNeutralStroke1);
|
|
23
|
+
transition-duration: var(--durationNormal);
|
|
24
|
+
transition-property: opacity;
|
|
25
|
+
transition-timing-function: var(--curveEasyEase);
|
|
26
|
+
content: '';
|
|
27
|
+
top: 0;
|
|
29
28
|
}
|
|
29
|
+
}
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
31
|
+
.root:where(.middle, .top) {
|
|
32
|
+
&::before {
|
|
33
|
+
opacity: 1;
|
|
35
34
|
}
|
|
36
35
|
}
|
|
@@ -1,36 +1,35 @@
|
|
|
1
|
-
@
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
/* @griffel-buckets reset: .root */
|
|
2
|
+
.root {
|
|
3
|
+
width: 100%;
|
|
4
|
+
max-width: 100%;
|
|
5
|
+
padding: var(--spacingVerticalXXL) var(--spacingHorizontalXXL) var(--spacingVerticalS);
|
|
6
|
+
gap: var(--spacingHorizontalS);
|
|
7
|
+
align-self: stretch;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
position: relative;
|
|
12
|
+
z-index: 2;
|
|
13
|
+
}
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
15
|
+
.root:where(:not(.none)) {
|
|
16
|
+
&::after {
|
|
17
|
+
height: var(--strokeWidthThin);
|
|
18
|
+
position: absolute;
|
|
19
|
+
inset-inline-end: 0;
|
|
20
|
+
inset-inline-start: 0;
|
|
21
|
+
opacity: 0;
|
|
22
|
+
background-color: var(--colorNeutralStroke1);
|
|
23
|
+
transition-duration: var(--durationNormal);
|
|
24
|
+
transition-property: opacity;
|
|
25
|
+
transition-timing-function: var(--curveEasyEase);
|
|
26
|
+
content: '';
|
|
27
|
+
bottom: 0;
|
|
29
28
|
}
|
|
29
|
+
}
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
31
|
+
.root:where(.middle, .bottom) {
|
|
32
|
+
&::after {
|
|
33
|
+
opacity: 1;
|
|
35
34
|
}
|
|
36
35
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
1
|
+
.root {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: space-between;
|
|
4
|
+
align-items: center;
|
|
5
|
+
column-gap: var(--spacingHorizontalS);
|
|
6
|
+
}
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
8
|
+
.action {
|
|
9
|
+
margin-inline-end: calc(var(--spacingHorizontalS) * -1);
|
|
12
10
|
}
|
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
@
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/* @griffel-buckets reset: .root */
|
|
2
|
+
.root {
|
|
3
|
+
position: relative;
|
|
4
|
+
}
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
.bottom {
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: var(--fui-Drawer--size);
|
|
9
|
+
}
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
.separator:where(.start) {
|
|
12
|
+
border-inline-end: var(--strokeWidthThin) solid var(--colorNeutralBackground3);
|
|
13
|
+
}
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
.separator:where(.end) {
|
|
16
|
+
border-inline-start: var(--strokeWidthThin) solid var(--colorNeutralBackground3);
|
|
17
|
+
}
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
.separator:where(.bottom) {
|
|
20
|
+
border-top: var(--strokeWidthThin) solid var(--colorNeutralBackground3);
|
|
21
|
+
}
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
.exit:where(.start, .end) {
|
|
24
|
+
width: 0;
|
|
25
|
+
border: none;
|
|
26
|
+
}
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
28
|
+
.exit:where(.bottom) {
|
|
29
|
+
height: 0;
|
|
30
|
+
border: none;
|
|
32
31
|
}
|
|
@@ -1,40 +1,39 @@
|
|
|
1
|
-
@
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
/* @griffel-buckets reset: .root */
|
|
2
|
+
.root {
|
|
3
|
+
&:focus {
|
|
4
|
+
outline-style: none;
|
|
5
|
+
}
|
|
6
|
+
&:focus-visible {
|
|
7
|
+
outline-style: none;
|
|
8
|
+
}
|
|
9
|
+
&[data-fui-focus-visible] {
|
|
10
|
+
border-color: transparent;
|
|
11
|
+
&::after {
|
|
12
|
+
content: '';
|
|
13
|
+
position: absolute;
|
|
14
|
+
pointer-events: none;
|
|
15
|
+
z-index: 1;
|
|
16
|
+
border: 2px solid var(--colorStrokeFocus2);
|
|
17
|
+
border-radius: var(--borderRadiusMedium);
|
|
18
|
+
inset: -2px;
|
|
8
19
|
}
|
|
9
|
-
|
|
10
|
-
border-color: transparent;
|
|
20
|
+
@media (forced-colors: active) {
|
|
11
21
|
&::after {
|
|
12
|
-
|
|
13
|
-
position: absolute;
|
|
14
|
-
pointer-events: none;
|
|
15
|
-
z-index: 1;
|
|
16
|
-
border: 2px solid var(--colorStrokeFocus2);
|
|
17
|
-
border-radius: var(--borderRadiusMedium);
|
|
18
|
-
inset: -2px;
|
|
19
|
-
}
|
|
20
|
-
@media (forced-colors: active) {
|
|
21
|
-
&::after {
|
|
22
|
-
border-color: Highlight;
|
|
23
|
-
}
|
|
22
|
+
border-color: Highlight;
|
|
24
23
|
}
|
|
25
24
|
}
|
|
26
|
-
position: fixed;
|
|
27
|
-
top: 0;
|
|
28
|
-
bottom: 0;
|
|
29
25
|
}
|
|
26
|
+
position: fixed;
|
|
27
|
+
top: 0;
|
|
28
|
+
bottom: 0;
|
|
29
|
+
}
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
.bottom {
|
|
32
|
+
top: auto;
|
|
33
|
+
height: var(--fui-Drawer--size);
|
|
34
|
+
width: 100vw;
|
|
35
|
+
}
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
37
|
+
.absolute {
|
|
38
|
+
position: absolute;
|
|
40
39
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
@
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/* @griffel-buckets reset: .backdrop */
|
|
2
|
+
.backdrop {
|
|
3
|
+
inset: 0px;
|
|
4
|
+
position: fixed;
|
|
5
|
+
background-color: var(--colorBackgroundOverlay);
|
|
6
|
+
}
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
.nested {
|
|
9
|
+
background-color: var(--colorTransparentBackground);
|
|
10
|
+
}
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
12
|
+
.hidden {
|
|
13
|
+
pointer-events: none;
|
|
15
14
|
}
|
|
@@ -1,54 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
--fui-Drawer--size: 100%;
|
|
53
|
-
}
|
|
1
|
+
.root {
|
|
2
|
+
overflow: hidden;
|
|
3
|
+
width: var(--fui-Drawer--size);
|
|
4
|
+
max-width: 100vw;
|
|
5
|
+
height: auto;
|
|
6
|
+
max-height: 100vh;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
align-items: flex-start;
|
|
11
|
+
justify-content: flex-start;
|
|
12
|
+
background-color: var(--colorNeutralBackground1);
|
|
13
|
+
color: var(--colorNeutralForeground1);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.start {
|
|
17
|
+
border-inline-end: var(--strokeWidthThin) solid var(--colorTransparentStroke);
|
|
18
|
+
inset-inline-start: 0;
|
|
19
|
+
inset-inline-end: auto;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.end {
|
|
23
|
+
border-inline-start: var(--strokeWidthThin) solid var(--colorTransparentStroke);
|
|
24
|
+
inset-inline-end: 0;
|
|
25
|
+
inset-inline-start: auto;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.bottom {
|
|
29
|
+
bottom: 0;
|
|
30
|
+
top: auto;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.small {
|
|
34
|
+
--fui-Drawer--size: 320px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.medium {
|
|
38
|
+
--fui-Drawer--size: 592px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.large {
|
|
42
|
+
--fui-Drawer--size: 940px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.full {
|
|
46
|
+
--fui-Drawer--size: 100vw;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.full:where(.bottom),
|
|
50
|
+
.bottom-full {
|
|
51
|
+
--fui-Drawer--size: 100%;
|
|
54
52
|
}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
@
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
1
|
+
/* @griffel-buckets reset: .root */
|
|
2
|
+
.root {
|
|
3
|
+
padding: 0 var(--spacingHorizontalXXL);
|
|
4
|
+
flex: 1;
|
|
5
|
+
align-self: stretch;
|
|
6
|
+
position: relative;
|
|
7
|
+
z-index: 1;
|
|
8
|
+
overflow: auto;
|
|
9
|
+
&:last-child {
|
|
10
|
+
padding-bottom: calc(var(--spacingHorizontalXXL) + var(--strokeWidthThin));
|
|
11
|
+
}
|
|
12
|
+
&:first-child {
|
|
13
|
+
padding-top: calc(var(--spacingHorizontalXXL) + var(--strokeWidthThin));
|
|
15
14
|
}
|
|
16
15
|
}
|
|
@@ -14,19 +14,31 @@ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
|
14
14
|
const _reactutilities = require("@fluentui/react-utilities");
|
|
15
15
|
const _drawerContext = require("../../contexts/drawerContext.cjs");
|
|
16
16
|
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
|
|
17
|
+
/**
|
|
18
|
+
* `clientHeight` and `scrollHeight` are rounded to integers while `scrollTop` is fractional, so
|
|
19
|
+
* scroll positions have to be compared with a tolerance instead of for exact equality. Without it
|
|
20
|
+
* a fully scrolled body reports `middle` whenever the browser zoom is not a whole number.
|
|
21
|
+
*
|
|
22
|
+
* A non-scrollable element can report up to 1px of overflow that it cannot actually scroll, and
|
|
23
|
+
* both values are integers, so a single pixel is enough here.
|
|
24
|
+
*/ const OVERFLOW_TOLERANCE = 1;
|
|
25
|
+
/**
|
|
26
|
+
* A fully scrolled element can sit short of its own maximum scroll offset because `scrollTop` is
|
|
27
|
+
* fractional while the values it is compared against are rounded.
|
|
28
|
+
*/ const SCROLL_BOTTOM_TOLERANCE = 2;
|
|
17
29
|
/**
|
|
18
30
|
* Get the current scroll state of the DrawerBody.
|
|
19
31
|
*
|
|
20
32
|
* @internal
|
|
21
33
|
* @param element - HTMLElement to check scroll state of
|
|
22
34
|
*/ const getScrollState = ({ scrollTop, scrollHeight, clientHeight })=>{
|
|
23
|
-
if (scrollHeight <=
|
|
35
|
+
if (scrollHeight - clientHeight <= OVERFLOW_TOLERANCE) {
|
|
24
36
|
return 'none';
|
|
25
37
|
}
|
|
26
38
|
if (scrollTop === 0) {
|
|
27
39
|
return 'top';
|
|
28
40
|
}
|
|
29
|
-
if (
|
|
41
|
+
if (scrollHeight - clientHeight - scrollTop <= SCROLL_BOTTOM_TOLERANCE) {
|
|
30
42
|
return 'bottom';
|
|
31
43
|
}
|
|
32
44
|
return 'middle';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/DrawerBody/useDrawerBody.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport {\n mergeCallbacks,\n slot,\n useAnimationFrame,\n useMergedRefs,\n useIsomorphicLayoutEffect,\n getIntrinsicElementProps,\n} from '@fluentui/react-utilities';\n\nimport { useDrawerContext_unstable } from '../../contexts/drawerContext';\nimport type { DrawerScrollState } from '../../shared/DrawerBase.types';\n\nimport type { DrawerBodyProps, DrawerBodyState } from './DrawerBody.types';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n\n/**\n * Get the current scroll state of the DrawerBody.\n *\n * @internal\n * @param element - HTMLElement to check scroll state of\n */\nconst getScrollState = ({ scrollTop, scrollHeight, clientHeight }: HTMLElement): DrawerScrollState => {\n if (scrollHeight <=
|
|
1
|
+
{"version":3,"sources":["../../../src/components/DrawerBody/useDrawerBody.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport {\n mergeCallbacks,\n slot,\n useAnimationFrame,\n useMergedRefs,\n useIsomorphicLayoutEffect,\n getIntrinsicElementProps,\n} from '@fluentui/react-utilities';\n\nimport { useDrawerContext_unstable } from '../../contexts/drawerContext';\nimport type { DrawerScrollState } from '../../shared/DrawerBase.types';\n\nimport type { DrawerBodyProps, DrawerBodyState } from './DrawerBody.types';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n\n/**\n * `clientHeight` and `scrollHeight` are rounded to integers while `scrollTop` is fractional, so\n * scroll positions have to be compared with a tolerance instead of for exact equality. Without it\n * a fully scrolled body reports `middle` whenever the browser zoom is not a whole number.\n *\n * A non-scrollable element can report up to 1px of overflow that it cannot actually scroll, and\n * both values are integers, so a single pixel is enough here.\n */\nconst OVERFLOW_TOLERANCE = 1;\n\n/**\n * A fully scrolled element can sit short of its own maximum scroll offset because `scrollTop` is\n * fractional while the values it is compared against are rounded.\n */\nconst SCROLL_BOTTOM_TOLERANCE = 2;\n\n/**\n * Get the current scroll state of the DrawerBody.\n *\n * @internal\n * @param element - HTMLElement to check scroll state of\n */\nconst getScrollState = ({ scrollTop, scrollHeight, clientHeight }: HTMLElement): DrawerScrollState => {\n if (scrollHeight - clientHeight <= OVERFLOW_TOLERANCE) {\n return 'none';\n }\n\n if (scrollTop === 0) {\n return 'top';\n }\n\n if (scrollHeight - clientHeight - scrollTop <= SCROLL_BOTTOM_TOLERANCE) {\n return 'bottom';\n }\n\n return 'middle';\n};\n\n/**\n * Create the state required to render DrawerBody.\n *\n * The returned state can be modified with hooks such as useDrawerBodyStyles_unstable,\n * before being passed to renderDrawerBody_unstable.\n *\n * @param props - props from this instance of DrawerBody\n * @param ref - reference to root HTMLElement of DrawerBody\n */\nexport const useDrawerBody_unstable = (props: DrawerBodyProps, ref: React.Ref<HTMLElement>): DrawerBodyState => {\n const { targetDocument } = useFluent();\n const win = targetDocument?.defaultView;\n\n const { setScrollState } = useDrawerContext_unstable();\n\n const scrollRef = React.useRef<HTMLDivElement | null>(null);\n const mergedRef = useMergedRefs(ref, scrollRef);\n\n const [setScrollAnimationFrame, cancelScrollAnimationFrame] = useAnimationFrame();\n const [setResizeAnimationFrame, cancelResizeAnimationFrame] = useAnimationFrame();\n\n const updateScrollState = React.useCallback(() => {\n if (!scrollRef.current) {\n return;\n }\n\n setScrollState(getScrollState(scrollRef.current));\n }, [setScrollState]);\n\n const onScroll = React.useCallback(() => {\n cancelScrollAnimationFrame();\n setScrollAnimationFrame(updateScrollState);\n }, [cancelScrollAnimationFrame, setScrollAnimationFrame, updateScrollState]);\n\n // Update scroll state on children change\n useIsomorphicLayoutEffect(updateScrollState, [props.children, updateScrollState]);\n\n // Update scroll state on mount and when resize occurs\n useIsomorphicLayoutEffect(() => {\n if (!scrollRef.current || !win?.ResizeObserver) {\n return;\n }\n\n const observer = new win.ResizeObserver(() => setResizeAnimationFrame(updateScrollState));\n\n observer.observe(scrollRef.current);\n\n return () => {\n observer.disconnect();\n cancelResizeAnimationFrame();\n };\n }, [setResizeAnimationFrame, cancelResizeAnimationFrame, updateScrollState, win]);\n\n return {\n components: {\n root: 'div',\n },\n\n root: slot.always(\n getIntrinsicElementProps<DrawerBodyProps>('div', {\n ref: mergedRef,\n ...props,\n // eslint-disable-next-line react-hooks/refs\n onScroll: mergeCallbacks(props.onScroll, onScroll),\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["React","mergeCallbacks","slot","useAnimationFrame","useMergedRefs","useIsomorphicLayoutEffect","getIntrinsicElementProps","useDrawerContext_unstable","useFluent_unstable","useFluent","OVERFLOW_TOLERANCE","SCROLL_BOTTOM_TOLERANCE","getScrollState","scrollTop","scrollHeight","clientHeight","useDrawerBody_unstable","props","ref","targetDocument","win","defaultView","setScrollState","scrollRef","useRef","mergedRef","setScrollAnimationFrame","cancelScrollAnimationFrame","setResizeAnimationFrame","cancelResizeAnimationFrame","updateScrollState","useCallback","current","onScroll","children","ResizeObserver","observer","observe","disconnect","components","root","always","elementType"],"mappings":"AAAA;;;;;;;;eAiEagB;;;;iEA/DU,QAAQ;gCAQxB,4BAA4B;+BAEO,kCAA+B;qCAIzB,kCAAkC;AAElF;;;;;;;CAOC,GACD,MAAMN,qBAAqB;AAE3B;;;CAGC,GACD,MAAMC,0BAA0B;AAEhC;;;;;CAKC,GACD,MAAMC,iBAAiB,CAAC,EAAEC,SAAS,EAAEC,YAAY,EAAEC,YAAY,EAAe;IAC5E,IAAID,eAAeC,gBAAgBL,oBAAoB;QACrD,OAAO;IACT;IAEA,IAAIG,cAAc,GAAG;QACnB,OAAO;IACT;IAEA,IAAIC,eAAeC,eAAeF,aAAaF,yBAAyB;QACtE,OAAO;IACT;IAEA,OAAO;AACT;AAWO,+BAA+B,CAACM,OAAwBC;IAC7D,MAAM,EAAEC,cAAc,EAAE,OAAGV,uCAAAA;IAC3B,MAAMW,MAAMD,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAgBE,WAAW;IAEvC,MAAM,EAAEC,cAAc,EAAE,OAAGf,wCAAAA;IAE3B,MAAMgB,YAAYvB,OAAMwB,MAAM,CAAwB;IACtD,MAAMC,gBAAYrB,6BAAAA,EAAcc,KAAKK;IAErC,MAAM,CAACG,yBAAyBC,2BAA2B,OAAGxB,iCAAAA;IAC9D,MAAM,CAACyB,yBAAyBC,2BAA2B,OAAG1B,iCAAAA;IAE9D,MAAM2B,oBAAoB9B,OAAM+B,WAAW,CAAC;QAC1C,IAAI,CAACR,UAAUS,OAAO,EAAE;YACtB;QACF;QAEAV,eAAeV,eAAeW,UAAUS,OAAO;IACjD,GAAG;QAACV;KAAe;IAEnB,MAAMW,WAAWjC,OAAM+B,WAAW,CAAC;QACjCJ;QACAD,wBAAwBI;IAC1B,GAAG;QAACH;QAA4BD;QAAyBI;KAAkB;IAE3E,yCAAyC;QACzCzB,yCAAAA,EAA0ByB,mBAAmB;QAACb,MAAMiB,QAAQ;QAAEJ;KAAkB;IAEhF,sDAAsD;QACtDzB,yCAAAA,EAA0B;QACxB,IAAI,CAACkB,UAAUS,OAAO,IAAI,EAACZ,QAAAA,QAAAA,QAAAA,KAAAA,IAAAA,KAAAA,IAAAA,IAAKe,cAAAA,AAAc,GAAE;YAC9C;QACF;QAEA,MAAMC,WAAW,IAAIhB,IAAIe,cAAc,CAAC,IAAMP,wBAAwBE;QAEtEM,SAASC,OAAO,CAACd,UAAUS,OAAO;QAElC,OAAO;YACLI,SAASE,UAAU;YACnBT;QACF;IACF,GAAG;QAACD;QAAyBC;QAA4BC;QAAmBV;KAAI;IAEhF,OAAO;QACLmB,YAAY;YACVC,MAAM;QACR;QAEAA,MAAMtC,oBAAAA,CAAKuC,MAAM,KACfnC,wCAAAA,EAA0C,OAAO;YAC/CY,KAAKO;YACL,GAAGR,KAAK;YACR,4CAA4C;YAC5CgB,cAAUhC,8BAAAA,EAAegB,MAAMgB,QAAQ,EAAEA;QAC3C,IACA;YAAES,aAAa;QAAM;IAEzB;AACF,EAAE"}
|
|
@@ -1,36 +1,35 @@
|
|
|
1
|
-
@
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
/* @griffel-buckets reset: .root */
|
|
2
|
+
.root {
|
|
3
|
+
width: 100%;
|
|
4
|
+
max-width: 100%;
|
|
5
|
+
padding: var(--spacingVerticalL) var(--spacingHorizontalXXL) var(--spacingVerticalXXL);
|
|
6
|
+
display: flex;
|
|
7
|
+
justify-content: flex-start;
|
|
8
|
+
align-items: center;
|
|
9
|
+
column-gap: var(--spacingHorizontalS);
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
position: relative;
|
|
12
|
+
z-index: 2;
|
|
13
|
+
}
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
15
|
+
.root:where(:not(.none)) {
|
|
16
|
+
&::before {
|
|
17
|
+
height: var(--strokeWidthThin);
|
|
18
|
+
position: absolute;
|
|
19
|
+
inset-inline-end: 0;
|
|
20
|
+
inset-inline-start: 0;
|
|
21
|
+
opacity: 0;
|
|
22
|
+
background-color: var(--colorNeutralStroke1);
|
|
23
|
+
transition-duration: var(--durationNormal);
|
|
24
|
+
transition-property: opacity;
|
|
25
|
+
transition-timing-function: var(--curveEasyEase);
|
|
26
|
+
content: '';
|
|
27
|
+
top: 0;
|
|
29
28
|
}
|
|
29
|
+
}
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
31
|
+
.root:where(.middle, .top) {
|
|
32
|
+
&::before {
|
|
33
|
+
opacity: 1;
|
|
35
34
|
}
|
|
36
35
|
}
|
|
@@ -1,36 +1,35 @@
|
|
|
1
|
-
@
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
/* @griffel-buckets reset: .root */
|
|
2
|
+
.root {
|
|
3
|
+
width: 100%;
|
|
4
|
+
max-width: 100%;
|
|
5
|
+
padding: var(--spacingVerticalXXL) var(--spacingHorizontalXXL) var(--spacingVerticalS);
|
|
6
|
+
gap: var(--spacingHorizontalS);
|
|
7
|
+
align-self: stretch;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
position: relative;
|
|
12
|
+
z-index: 2;
|
|
13
|
+
}
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
15
|
+
.root:where(:not(.none)) {
|
|
16
|
+
&::after {
|
|
17
|
+
height: var(--strokeWidthThin);
|
|
18
|
+
position: absolute;
|
|
19
|
+
inset-inline-end: 0;
|
|
20
|
+
inset-inline-start: 0;
|
|
21
|
+
opacity: 0;
|
|
22
|
+
background-color: var(--colorNeutralStroke1);
|
|
23
|
+
transition-duration: var(--durationNormal);
|
|
24
|
+
transition-property: opacity;
|
|
25
|
+
transition-timing-function: var(--curveEasyEase);
|
|
26
|
+
content: '';
|
|
27
|
+
bottom: 0;
|
|
29
28
|
}
|
|
29
|
+
}
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
31
|
+
.root:where(.middle, .bottom) {
|
|
32
|
+
&::after {
|
|
33
|
+
opacity: 1;
|
|
35
34
|
}
|
|
36
35
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
1
|
+
.root {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: space-between;
|
|
4
|
+
align-items: center;
|
|
5
|
+
column-gap: var(--spacingHorizontalS);
|
|
6
|
+
}
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
8
|
+
.action {
|
|
9
|
+
margin-inline-end: calc(var(--spacingHorizontalS) * -1);
|
|
12
10
|
}
|
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
@
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/* @griffel-buckets reset: .root */
|
|
2
|
+
.root {
|
|
3
|
+
position: relative;
|
|
4
|
+
}
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
.bottom {
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: var(--fui-Drawer--size);
|
|
9
|
+
}
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
.separator:where(.start) {
|
|
12
|
+
border-inline-end: var(--strokeWidthThin) solid var(--colorNeutralBackground3);
|
|
13
|
+
}
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
.separator:where(.end) {
|
|
16
|
+
border-inline-start: var(--strokeWidthThin) solid var(--colorNeutralBackground3);
|
|
17
|
+
}
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
.separator:where(.bottom) {
|
|
20
|
+
border-top: var(--strokeWidthThin) solid var(--colorNeutralBackground3);
|
|
21
|
+
}
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
.exit:where(.start, .end) {
|
|
24
|
+
width: 0;
|
|
25
|
+
border: none;
|
|
26
|
+
}
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
28
|
+
.exit:where(.bottom) {
|
|
29
|
+
height: 0;
|
|
30
|
+
border: none;
|
|
32
31
|
}
|
|
@@ -1,40 +1,39 @@
|
|
|
1
|
-
@
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
/* @griffel-buckets reset: .root */
|
|
2
|
+
.root {
|
|
3
|
+
&:focus {
|
|
4
|
+
outline-style: none;
|
|
5
|
+
}
|
|
6
|
+
&:focus-visible {
|
|
7
|
+
outline-style: none;
|
|
8
|
+
}
|
|
9
|
+
&[data-fui-focus-visible] {
|
|
10
|
+
border-color: transparent;
|
|
11
|
+
&::after {
|
|
12
|
+
content: '';
|
|
13
|
+
position: absolute;
|
|
14
|
+
pointer-events: none;
|
|
15
|
+
z-index: 1;
|
|
16
|
+
border: 2px solid var(--colorStrokeFocus2);
|
|
17
|
+
border-radius: var(--borderRadiusMedium);
|
|
18
|
+
inset: -2px;
|
|
8
19
|
}
|
|
9
|
-
|
|
10
|
-
border-color: transparent;
|
|
20
|
+
@media (forced-colors: active) {
|
|
11
21
|
&::after {
|
|
12
|
-
|
|
13
|
-
position: absolute;
|
|
14
|
-
pointer-events: none;
|
|
15
|
-
z-index: 1;
|
|
16
|
-
border: 2px solid var(--colorStrokeFocus2);
|
|
17
|
-
border-radius: var(--borderRadiusMedium);
|
|
18
|
-
inset: -2px;
|
|
19
|
-
}
|
|
20
|
-
@media (forced-colors: active) {
|
|
21
|
-
&::after {
|
|
22
|
-
border-color: Highlight;
|
|
23
|
-
}
|
|
22
|
+
border-color: Highlight;
|
|
24
23
|
}
|
|
25
24
|
}
|
|
26
|
-
position: fixed;
|
|
27
|
-
top: 0;
|
|
28
|
-
bottom: 0;
|
|
29
25
|
}
|
|
26
|
+
position: fixed;
|
|
27
|
+
top: 0;
|
|
28
|
+
bottom: 0;
|
|
29
|
+
}
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
.bottom {
|
|
32
|
+
top: auto;
|
|
33
|
+
height: var(--fui-Drawer--size);
|
|
34
|
+
width: 100vw;
|
|
35
|
+
}
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
37
|
+
.absolute {
|
|
38
|
+
position: absolute;
|
|
40
39
|
}
|
package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.module.css
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
@
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/* @griffel-buckets reset: .backdrop */
|
|
2
|
+
.backdrop {
|
|
3
|
+
inset: 0px;
|
|
4
|
+
position: fixed;
|
|
5
|
+
background-color: var(--colorBackgroundOverlay);
|
|
6
|
+
}
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
.nested {
|
|
9
|
+
background-color: var(--colorTransparentBackground);
|
|
10
|
+
}
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
12
|
+
.hidden {
|
|
13
|
+
pointer-events: none;
|
|
15
14
|
}
|
|
@@ -1,54 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
--fui-Drawer--size: 100%;
|
|
53
|
-
}
|
|
1
|
+
.root {
|
|
2
|
+
overflow: hidden;
|
|
3
|
+
width: var(--fui-Drawer--size);
|
|
4
|
+
max-width: 100vw;
|
|
5
|
+
height: auto;
|
|
6
|
+
max-height: 100vh;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
align-items: flex-start;
|
|
11
|
+
justify-content: flex-start;
|
|
12
|
+
background-color: var(--colorNeutralBackground1);
|
|
13
|
+
color: var(--colorNeutralForeground1);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.start {
|
|
17
|
+
border-inline-end: var(--strokeWidthThin) solid var(--colorTransparentStroke);
|
|
18
|
+
inset-inline-start: 0;
|
|
19
|
+
inset-inline-end: auto;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.end {
|
|
23
|
+
border-inline-start: var(--strokeWidthThin) solid var(--colorTransparentStroke);
|
|
24
|
+
inset-inline-end: 0;
|
|
25
|
+
inset-inline-start: auto;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.bottom {
|
|
29
|
+
bottom: 0;
|
|
30
|
+
top: auto;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.small {
|
|
34
|
+
--fui-Drawer--size: 320px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.medium {
|
|
38
|
+
--fui-Drawer--size: 592px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.large {
|
|
42
|
+
--fui-Drawer--size: 940px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.full {
|
|
46
|
+
--fui-Drawer--size: 100vw;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.full:where(.bottom),
|
|
50
|
+
.bottom-full {
|
|
51
|
+
--fui-Drawer--size: 100%;
|
|
54
52
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-drawer",
|
|
3
|
-
"version": "9.75.
|
|
3
|
+
"version": "9.75.2-experimental.css-modules.20261113-ba13c87438.0",
|
|
4
4
|
"description": "Drawer components for Fluent UI React",
|
|
5
5
|
"main": "lib-commonjs/index.cjs",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
},
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@fluentui/react-dialog": "9.75.
|
|
18
|
-
"@fluentui/react-jsx-runtime": "9.75.
|
|
19
|
-
"@fluentui/react-motion": "9.75.
|
|
20
|
-
"@fluentui/react-motion-components-preview": "9.75.
|
|
21
|
-
"@fluentui/react-portal": "9.75.
|
|
22
|
-
"@fluentui/react-shared-contexts": "9.75.
|
|
23
|
-
"@fluentui/react-tabster": "9.75.
|
|
24
|
-
"@fluentui/react-theme": "9.75.
|
|
25
|
-
"@fluentui/react-utilities": "9.75.
|
|
17
|
+
"@fluentui/react-dialog": "9.75.2-experimental.css-modules.20261113-ba13c87438.0",
|
|
18
|
+
"@fluentui/react-jsx-runtime": "9.75.2-experimental.css-modules.20261113-ba13c87438.0",
|
|
19
|
+
"@fluentui/react-motion": "9.75.2-experimental.css-modules.20261113-ba13c87438.0",
|
|
20
|
+
"@fluentui/react-motion-components-preview": "9.75.2-experimental.css-modules.20261113-ba13c87438.0",
|
|
21
|
+
"@fluentui/react-portal": "9.75.2-experimental.css-modules.20261113-ba13c87438.0",
|
|
22
|
+
"@fluentui/react-shared-contexts": "9.75.2-experimental.css-modules.20261113-ba13c87438.0",
|
|
23
|
+
"@fluentui/react-tabster": "9.75.2-experimental.css-modules.20261113-ba13c87438.0",
|
|
24
|
+
"@fluentui/react-theme": "9.75.2-experimental.css-modules.20261113-ba13c87438.0",
|
|
25
|
+
"@fluentui/react-utilities": "9.75.2-experimental.css-modules.20261113-ba13c87438.0",
|
|
26
26
|
"@griffel/react": "^1.5.32",
|
|
27
27
|
"@swc/helpers": "^0.5.1",
|
|
28
28
|
"clsx": "^2.1.1"
|