80 lines
4.3 KiB
JavaScript
80 lines
4.3 KiB
JavaScript
'use client';
|
|
"use strict";
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
function _export(target, all) {
|
|
for(var name in all)Object.defineProperty(target, name, {
|
|
enumerable: true,
|
|
get: all[name]
|
|
});
|
|
}
|
|
_export(exports, {
|
|
overlayDrawerClassNames: function() {
|
|
return overlayDrawerClassNames;
|
|
},
|
|
useOverlayDrawerStyles_unstable: function() {
|
|
return useOverlayDrawerStyles_unstable;
|
|
}
|
|
});
|
|
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
const _react1 = require("@griffel/react");
|
|
const _useDrawerBaseStylesstyles = require("../../shared/useDrawerBaseStyles.styles");
|
|
const overlayDrawerClassNames = {
|
|
root: 'fui-OverlayDrawer',
|
|
backdrop: 'fui-OverlayDrawer__backdrop'
|
|
};
|
|
/**
|
|
* Styles for the root slot
|
|
*/ const useDrawerResetStyles = /*#__PURE__*/ (0, _react1.__resetStyles)("r7dfyj8", "rmx02j7", {
|
|
r: [
|
|
".r7dfyj8{overflow:hidden;width:var(--fui-Drawer--size);max-width:100vw;height:auto;max-height:100vh;box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;background-color:var(--colorNeutralBackground1);color:var(--colorNeutralForeground1);position:fixed;top:0;bottom:0;}",
|
|
".r7dfyj8:focus{outline-style:none;}",
|
|
".r7dfyj8:focus-visible{outline-style:none;}",
|
|
".r7dfyj8[data-fui-focus-visible]{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}",
|
|
".r7dfyj8[data-fui-focus-visible]::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border:2px solid var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);top:calc(2px * -1);right:calc(2px * -1);bottom:calc(2px * -1);left:calc(2px * -1);}",
|
|
".rmx02j7{overflow:hidden;width:var(--fui-Drawer--size);max-width:100vw;height:auto;max-height:100vh;box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;background-color:var(--colorNeutralBackground1);color:var(--colorNeutralForeground1);position:fixed;top:0;bottom:0;}",
|
|
".rmx02j7:focus{outline-style:none;}",
|
|
".rmx02j7:focus-visible{outline-style:none;}",
|
|
".rmx02j7[data-fui-focus-visible]{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}",
|
|
".rmx02j7[data-fui-focus-visible]::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border:2px solid var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);top:calc(2px * -1);left:calc(2px * -1);bottom:calc(2px * -1);right:calc(2px * -1);}"
|
|
],
|
|
s: [
|
|
"@media (forced-colors: active){.r7dfyj8[data-fui-focus-visible]::after{border-top-color:Highlight;border-right-color:Highlight;border-bottom-color:Highlight;border-left-color:Highlight;}}",
|
|
"@media (forced-colors: active){.rmx02j7[data-fui-focus-visible]::after{border-top-color:Highlight;border-left-color:Highlight;border-bottom-color:Highlight;border-right-color:Highlight;}}"
|
|
]
|
|
});
|
|
const useDrawerRootStyles = /*#__PURE__*/ (0, _react1.__styles)({
|
|
start: {},
|
|
end: {},
|
|
bottom: {
|
|
Bhzewxz: "f198g47y",
|
|
Bqenvij: "fub80nq",
|
|
a9b677: "fr97h3j"
|
|
},
|
|
absolute: {
|
|
qhf8xq: "f1euv43f"
|
|
}
|
|
}, {
|
|
d: [
|
|
".f198g47y{top:auto;}",
|
|
".fub80nq{height:var(--fui-Drawer--size);}",
|
|
".fr97h3j{width:100vw;}",
|
|
".f1euv43f{position:absolute;}"
|
|
]
|
|
});
|
|
const useOverlayDrawerStyles_unstable = (state)=>{
|
|
'use no memo';
|
|
const baseClassNames = (0, _useDrawerBaseStylesstyles.useDrawerBaseClassNames)(state);
|
|
const resetStyles = useDrawerResetStyles();
|
|
const rootStyles = useDrawerRootStyles();
|
|
const absoluteStyles = state.hasMountNodeElement && rootStyles.absolute;
|
|
const backdrop = state.root.backdrop;
|
|
state.root.className = (0, _react1.mergeClasses)(overlayDrawerClassNames.root, baseClassNames, resetStyles, rootStyles[state.position], absoluteStyles, state.root.className);
|
|
if (backdrop) {
|
|
backdrop.className = (0, _react1.mergeClasses)(overlayDrawerClassNames.backdrop, absoluteStyles, backdrop.className);
|
|
}
|
|
return state;
|
|
};
|