@mui-treasury/layout
Advanced tools
Comparing version 5.0.0-alpha.6 to 5.0.0-alpha.7
@@ -1,9 +0,10 @@ | ||
import React from "react"; | ||
declare const ContentRoot: import("@material-ui/core/styles/experimentalStyled").StyledComponent<{ | ||
theme?: import("@material-ui/core/styles").Theme | undefined; | ||
as?: "symbol" | "object" | "big" | "link" | "small" | "sub" | "sup" | "track" | "progress" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "label" | "legend" | "li" | "main" | "map" | "mark" | "menu" | "meta" | "meter" | "nav" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "script" | "section" | "select" | "slot" | "source" | "span" | "strong" | "style" | "summary" | "table" | "tbody" | "td" | "template" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "u" | "ul" | "var" | "video" | "wbr" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "svg" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | "menuitem" | "keygen" | "noindex" | "webview" | "animate" | "animateMotion" | "animateTransform" | "feDropShadow" | "mpath" | React.ComponentClass<any, any> | React.FunctionComponent<any> | undefined; | ||
sx?: import("@material-ui/system").SystemCssProperties<import("@material-ui/core/styles").Theme> | import("@material-ui/system").CSSPseudoSelectorProps<import("@material-ui/core/styles").Theme> | import("@material-ui/system").CSSSelectorObject<import("@material-ui/core/styles").Theme> | null | undefined; | ||
}, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "hidden" | "dir" | "slot" | "style" | "title" | "color" | "translate" | "prefix" | "children" | "ref" | "key" | "className" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture">, {}>; | ||
declare type ContentProps = Parameters<typeof ContentRoot>[0]; | ||
export declare const Content: (props: ContentProps) => JSX.Element; | ||
import { Theme } from "@material-ui/core/styles"; | ||
import { SxProps } from "@material-ui/system"; | ||
import { PropsWithFunctionChildren } from "../Root/Root"; | ||
declare type MainProps = JSX.IntrinsicElements["main"]; | ||
export declare type ContentClassKey = "root"; | ||
export interface ContentProps extends MainProps { | ||
sx?: SxProps<Theme>; | ||
} | ||
export declare const Content: ({ children, ...inProps }: PropsWithFunctionChildren<ContentProps>) => JSX.Element; | ||
export {}; |
@@ -24,13 +24,35 @@ "use strict"; | ||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
var ContentRoot = (0, _styles.experimentalStyled)("main", {}, { | ||
name: "Content", | ||
slot: "Root" | ||
})(); | ||
name: "AppContent", | ||
slot: "Root", | ||
overridesResolver: function overridesResolver(props, styles) { | ||
return styles.root; | ||
} | ||
})(function (_ref) { | ||
var styleProps = _ref.styleProps; | ||
return _extends({ | ||
transition: _constant.CSS_TRANSITION | ||
}, styleProps.isFullscreen && { | ||
flexGrow: 1, | ||
minHeight: "0px", | ||
display: "flex" | ||
}); | ||
}); | ||
var Content = function Content(props) { | ||
var _useLayoutCtx = (0, _Root.useLayoutCtx)(), | ||
builder = _useLayoutCtx.builder; | ||
var Content = function Content(_ref2) { | ||
var children = _ref2.children, | ||
inProps = _objectWithoutProperties(_ref2, ["children"]); | ||
var props = (0, _styles.unstable_useThemeProps)({ | ||
props: inProps, | ||
name: "AppContent" | ||
}); | ||
var ctx = (0, _Root.useLayoutCtx)(); | ||
var builder = ctx.builder; | ||
var sxProps = (0, _getContentSxProps.getContentSxProps)(builder, _constant.CONTENT_ID); | ||
@@ -40,12 +62,13 @@ var isFullscreen = (0, _FullscreenContext.useFullscreenCtx)(); | ||
className: (0, _clsx["default"])("Content", props.className), | ||
sx: _extends({ | ||
transition: _constant.CSS_TRANSITION | ||
}, isFullscreen && { | ||
sx: _extends({}, isFullscreen && { | ||
flexGrow: 1, | ||
minHeight: 0, | ||
display: "flex" | ||
}, props.sx, sxProps) | ||
})); | ||
}, props.sx, sxProps), | ||
styleProps: { | ||
isFullscreen: isFullscreen | ||
} | ||
}), typeof children === "function" ? children(ctx) : children); | ||
}; | ||
exports.Content = Content; |
@@ -1,9 +0,9 @@ | ||
import React from "react"; | ||
declare const SidebarContentRoot: import("@material-ui/core/styles/experimentalStyled").StyledComponent<{ | ||
theme?: import("@material-ui/core/styles").Theme | undefined; | ||
as?: "symbol" | "object" | "big" | "link" | "small" | "sub" | "sup" | "track" | "progress" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "label" | "legend" | "li" | "main" | "map" | "mark" | "menu" | "meta" | "meter" | "nav" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "script" | "section" | "select" | "slot" | "source" | "span" | "strong" | "style" | "summary" | "table" | "tbody" | "td" | "template" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "u" | "ul" | "var" | "video" | "wbr" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "svg" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | "menuitem" | "keygen" | "noindex" | "webview" | "animate" | "animateMotion" | "animateTransform" | "feDropShadow" | "mpath" | React.ComponentClass<any, any> | React.FunctionComponent<any> | undefined; | ||
sx?: import("@material-ui/system").SystemCssProperties<import("@material-ui/core/styles").Theme> | import("@material-ui/system").CSSPseudoSelectorProps<import("@material-ui/core/styles").Theme> | import("@material-ui/system").CSSSelectorObject<import("@material-ui/core/styles").Theme> | null | undefined; | ||
}, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "hidden" | "dir" | "slot" | "style" | "title" | "color" | "translate" | "prefix" | "children" | "ref" | "key" | "className" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture">, {}>; | ||
declare type SidebarContentProps = Parameters<typeof SidebarContentRoot>[0]; | ||
import { Theme } from "@material-ui/core/styles"; | ||
import { SxProps } from "@material-ui/system"; | ||
declare type Props = JSX.IntrinsicElements["div"]; | ||
export declare type SidebarContentClassKey = "root"; | ||
export interface SidebarContentProps extends Props { | ||
sx?: SxProps<Theme>; | ||
} | ||
export declare const SidebarContent: (props: SidebarContentProps) => JSX.Element; | ||
export {}; |
@@ -10,24 +10,24 @@ "use strict"; | ||
var _clsx = _interopRequireDefault(require("clsx")); | ||
var _styles = require("@material-ui/core/styles"); | ||
var _templateObject; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } | ||
var SidebarContentRoot = (0, _styles.experimentalStyled)("div", {}, { | ||
name: "SidebarContent" | ||
})(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n min-height: 0;\n flex-grow: 1;\n overflow: auto;\n"]))); | ||
name: "AppSidebarContent", | ||
slot: "Root", | ||
overridesResolver: function overridesResolver(props, styles) { | ||
return styles.root; | ||
} | ||
})({ | ||
minHeight: 0, | ||
flexGrow: 1, | ||
overflow: "auto", | ||
display: "flex", | ||
flexDirection: "column" | ||
}); | ||
var SidebarContent = function SidebarContent(props) { | ||
return /*#__PURE__*/_react["default"].createElement(SidebarContentRoot, _extends({}, props, { | ||
className: (0, _clsx["default"])("SidebarContent", props.className) | ||
})); | ||
return /*#__PURE__*/_react["default"].createElement(SidebarContentRoot, props); | ||
}; | ||
exports.SidebarContent = SidebarContent; |
@@ -33,3 +33,3 @@ "use strict"; | ||
slot: "Root" | ||
})(); | ||
})({}); | ||
@@ -36,0 +36,0 @@ var EdgeOffset = function EdgeOffset(_ref) { |
import React from "react"; | ||
import { DrawerProps } from "@material-ui/core/Drawer"; | ||
import { PropsWithFunctionChildren } from "../Root/Root"; | ||
import { DrawerAnchor } from "./EdgeSidebarBuilder"; | ||
import { EDGE_SIDEBAR_ID } from "../utils/constant"; | ||
export declare type EdgeSidebarProps = { | ||
export declare type EdgeSidebarClassKey = "root"; | ||
export interface EdgeSidebarProps extends Omit<DrawerProps, "anchor" | "variant"> { | ||
anchor: "left" | "right"; | ||
} & Omit<DrawerProps, "anchor" | "variant">; | ||
} | ||
export declare const SidebarContext: React.Context<{ | ||
@@ -26,2 +28,2 @@ id: EDGE_SIDEBAR_ID; | ||
} | undefined; | ||
export declare const EdgeSidebar: ({ anchor, children, ...props }: EdgeSidebarProps) => JSX.Element | null; | ||
export declare const EdgeSidebar: ({ children, ...inProps }: PropsWithFunctionChildren<EdgeSidebarProps>) => JSX.Element | null; |
@@ -12,7 +12,5 @@ "use strict"; | ||
var _clsx = _interopRequireDefault(require("clsx")); | ||
var _styles = require("@material-ui/core/styles"); | ||
var _Drawer = _interopRequireDefault(require("@material-ui/core/Drawer")); | ||
var _Drawer = _interopRequireWildcard(require("@material-ui/core/Drawer")); | ||
@@ -33,4 +31,2 @@ var _Root = require("../Root/Root"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
@@ -40,4 +36,2 @@ | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } | ||
@@ -59,2 +53,6 @@ | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
var SidebarContext = /*#__PURE__*/_react["default"].createContext(undefined); | ||
@@ -86,9 +84,31 @@ | ||
var EdgeSidebar = function EdgeSidebar(_ref) { | ||
var _layoutState$sidebarI, _iDocument$body, _props$ModalProps, _props$PaperProps3, _props$PaperProps4, _props$PaperProps5, _builder$sidebarId; | ||
var EdgeSidebarRoot = (0, _styles.experimentalStyled)(_Drawer["default"], {}, { | ||
name: "AppEdgeSidebar", | ||
slot: "Root", | ||
overridesResolver: function overridesResolver(props, styles) { | ||
return styles.root; | ||
} | ||
})(function (_ref) { | ||
var styleProps = _ref.styleProps; | ||
return _extends({}, (styleProps.entered || styleProps.variant === "permanent" || styleProps.variant === "persistent") && _defineProperty({}, "& .".concat(_Drawer.drawerClasses.paper), { | ||
transition: "".concat(_constant.CSS_TRANSITION, " !important"), | ||
transitionProperty: "all !important" | ||
})); | ||
}); | ||
var anchor = _ref.anchor, | ||
children = _ref.children, | ||
props = _objectWithoutProperties(_ref, ["anchor", "children"]); | ||
var EdgeSidebar = function EdgeSidebar(_ref3) { | ||
var _layoutState$sidebarI, _iDocument$body, _props$ModalProps, _props$PaperProps3, _props$PaperProps4, _builder$sidebarId; | ||
var children = _ref3.children, | ||
inProps = _objectWithoutProperties(_ref3, ["children"]); | ||
var _useThemeProps = (0, _styles.unstable_useThemeProps)({ | ||
props: inProps, | ||
name: "AppEdgeSidebar" | ||
}), | ||
theme = _useThemeProps.theme, | ||
props = _objectWithoutProperties(_useThemeProps, ["theme"]); | ||
var anchor = props.anchor; | ||
if (!anchor) { | ||
@@ -98,3 +118,2 @@ throw new Error('Missing prop "anchor" on EdgeSidebar component'); | ||
var theme = (0, _styles.useTheme)(); | ||
var screen = (0, _useScreen.useScreen)(); | ||
@@ -105,7 +124,6 @@ | ||
var _useLayoutCtx = (0, _Root.useLayoutCtx)(), | ||
builder = _useLayoutCtx.builder, | ||
layoutState = _useLayoutCtx.state, | ||
setOpen = _useLayoutCtx.setOpen; | ||
var ctx = (0, _Root.useLayoutCtx)(); | ||
var builder = ctx.builder, | ||
layoutState = ctx.state, | ||
setOpen = ctx.setOpen; | ||
var sidebarId = "".concat(anchor, "EdgeSidebar"); | ||
@@ -182,5 +200,4 @@ var edgeSidebar = builder[sidebarId]; | ||
} | ||
}, [sidebarState === null || sidebarState === void 0 ? void 0 : sidebarState.collapsed]); // auto-expanded feature | ||
}, [sidebarState === null || sidebarState === void 0 ? void 0 : sidebarState.collapsed]); | ||
if (!screen) return null; | ||
@@ -201,8 +218,14 @@ if (!edgeSidebar || !edgeSidebar.id) return null; | ||
var styleProps = _extends({}, props, { | ||
entered: entered, | ||
variant: variant | ||
}); | ||
return /*#__PURE__*/_react["default"].createElement(SidebarContext.Provider, { | ||
value: sidebarValue | ||
}, /*#__PURE__*/_react["default"].createElement(_Drawer["default"], _extends({}, props, { | ||
}, /*#__PURE__*/_react["default"].createElement(EdgeSidebarRoot, _extends({}, props, { | ||
open: (_layoutState$sidebarI = layoutState[sidebarId]) === null || _layoutState$sidebarI === void 0 ? void 0 : _layoutState$sidebarI.open, | ||
anchor: anchor, | ||
variant: variant, | ||
styleProps: styleProps, | ||
onClose: function onClose() { | ||
@@ -226,4 +249,3 @@ var _props$onClose; | ||
PaperProps: _extends({}, props.PaperProps, { | ||
className: (0, _clsx["default"])("EdgeSidebar-paper", (_props$PaperProps3 = props.PaperProps) === null || _props$PaperProps3 === void 0 ? void 0 : _props$PaperProps3.className), | ||
style: _extends({}, (_props$PaperProps4 = props.PaperProps) === null || _props$PaperProps4 === void 0 ? void 0 : _props$PaperProps4.style, expanded && { | ||
style: _extends({}, (_props$PaperProps3 = props.PaperProps) === null || _props$PaperProps3 === void 0 ? void 0 : _props$PaperProps3.style, expanded && { | ||
width: config === null || config === void 0 ? void 0 : config.width | ||
@@ -233,15 +255,9 @@ }), | ||
onMouseLeave: onMouseLeave, | ||
sx: _extends({}, (_props$PaperProps5 = props.PaperProps) === null || _props$PaperProps5 === void 0 ? void 0 : _props$PaperProps5.sx, (entered || variant === "permanent") && { | ||
transition: theme.transitions.create(["all"], { | ||
easing: theme.transitions.easing.easeOut, | ||
duration: theme.transitions.duration.leavingScreen | ||
}), | ||
transitionProperty: "all !important" | ||
}, (_builder$sidebarId = builder[sidebarId]) === null || _builder$sidebarId === void 0 ? void 0 : _builder$sidebarId.getSxProps()) | ||
sx: _extends({}, (_props$PaperProps4 = props.PaperProps) === null || _props$PaperProps4 === void 0 ? void 0 : _props$PaperProps4.sx, (_builder$sidebarId = builder[sidebarId]) === null || _builder$sidebarId === void 0 ? void 0 : _builder$sidebarId.getSxProps()) | ||
}) | ||
}), variant && variant !== "temporary" && /*#__PURE__*/_react["default"].createElement(_EdgeOffset.EdgeOffset, { | ||
sidebarId: sidebarId | ||
}), children)); | ||
}), typeof children === "function" ? children(ctx) : children)); | ||
}; | ||
exports.EdgeSidebar = EdgeSidebar; |
@@ -7,2 +7,3 @@ import React, { ReactNode } from "react"; | ||
sx?: import("@material-ui/system").SystemCssProperties<import("@material-ui/core/styles").Theme> | import("@material-ui/system").CSSPseudoSelectorProps<import("@material-ui/core/styles").Theme> | import("@material-ui/system").CSSSelectorObject<import("@material-ui/core/styles").Theme> | null | undefined; | ||
styleProps?: Record<string, unknown> | undefined; | ||
}, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "hidden" | "dir" | "slot" | "style" | "title" | "color" | "translate" | "prefix" | "children" | "ref" | "key" | "className" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture">, {}>; | ||
@@ -9,0 +10,0 @@ export declare type EdgeTriggerProps = Parameters<typeof EdgeTriggerRoot>[0] & { |
@@ -24,3 +24,3 @@ "use strict"; | ||
name: "EdgeTrigger" | ||
})(); | ||
})({}); | ||
@@ -27,0 +27,0 @@ var EdgeTrigger = function EdgeTrigger(_ref) { |
@@ -0,1 +1,5 @@ | ||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
@@ -5,3 +9,3 @@ | ||
import cx from "clsx"; | ||
import { experimentalStyled } from "@material-ui/core/styles"; | ||
import { experimentalStyled, unstable_useThemeProps as useThemeProps } from "@material-ui/core/styles"; | ||
import { useLayoutCtx } from "../Root/Root"; | ||
@@ -12,9 +16,27 @@ import { getContentSxProps } from "./getContentSxProps"; | ||
var ContentRoot = experimentalStyled("main", {}, { | ||
name: "Content", | ||
slot: "Root" | ||
})(); | ||
export var Content = function Content(props) { | ||
var _useLayoutCtx = useLayoutCtx(), | ||
builder = _useLayoutCtx.builder; | ||
name: "AppContent", | ||
slot: "Root", | ||
overridesResolver: function overridesResolver(props, styles) { | ||
return styles.root; | ||
} | ||
})(function (_ref) { | ||
var styleProps = _ref.styleProps; | ||
return _extends({ | ||
transition: CSS_TRANSITION | ||
}, styleProps.isFullscreen && { | ||
flexGrow: 1, | ||
minHeight: "0px", | ||
display: "flex" | ||
}); | ||
}); | ||
export var Content = function Content(_ref2) { | ||
var children = _ref2.children, | ||
inProps = _objectWithoutProperties(_ref2, ["children"]); | ||
var props = useThemeProps({ | ||
props: inProps, | ||
name: "AppContent" | ||
}); | ||
var ctx = useLayoutCtx(); | ||
var builder = ctx.builder; | ||
var sxProps = getContentSxProps(builder, CONTENT_ID); | ||
@@ -24,10 +46,11 @@ var isFullscreen = useFullscreenCtx(); | ||
className: cx("Content", props.className), | ||
sx: _extends({ | ||
transition: CSS_TRANSITION | ||
}, isFullscreen && { | ||
sx: _extends({}, isFullscreen && { | ||
flexGrow: 1, | ||
minHeight: 0, | ||
display: "flex" | ||
}, props.sx, sxProps) | ||
})); | ||
}, props.sx, sxProps), | ||
styleProps: { | ||
isFullscreen: isFullscreen | ||
} | ||
}), typeof children === "function" ? children(ctx) : children); | ||
}; |
@@ -1,17 +0,18 @@ | ||
var _templateObject; | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } | ||
import React from "react"; | ||
import cx from "clsx"; | ||
import { experimentalStyled } from "@material-ui/core/styles"; | ||
var SidebarContentRoot = experimentalStyled("div", {}, { | ||
name: "SidebarContent" | ||
})(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n min-height: 0;\n flex-grow: 1;\n overflow: auto;\n"]))); | ||
name: "AppSidebarContent", | ||
slot: "Root", | ||
overridesResolver: function overridesResolver(props, styles) { | ||
return styles.root; | ||
} | ||
})({ | ||
minHeight: 0, | ||
flexGrow: 1, | ||
overflow: "auto", | ||
display: "flex", | ||
flexDirection: "column" | ||
}); | ||
export var SidebarContent = function SidebarContent(props) { | ||
return /*#__PURE__*/React.createElement(SidebarContentRoot, _extends({}, props, { | ||
className: cx("SidebarContent", props.className) | ||
})); | ||
return /*#__PURE__*/React.createElement(SidebarContentRoot, props); | ||
}; |
@@ -15,3 +15,3 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
slot: "Root" | ||
})(); | ||
})({}); | ||
export var EdgeOffset = function EdgeOffset(_ref) { | ||
@@ -18,0 +18,0 @@ var sidebarId = _ref.sidebarId; |
@@ -1,3 +0,1 @@ | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } | ||
@@ -19,6 +17,9 @@ | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
import React, { useContext } from "react"; | ||
import cx from "clsx"; | ||
import { useTheme } from "@material-ui/core/styles"; | ||
import Drawer from "@material-ui/core/Drawer"; | ||
import { experimentalStyled, unstable_useThemeProps as useThemeProps } from "@material-ui/core/styles"; | ||
import Drawer, { drawerClasses } from "@material-ui/core/Drawer"; | ||
import { useLayoutCtx } from "../Root/Root"; | ||
@@ -28,3 +29,3 @@ import { useScreen } from "../hooks/useScreen"; | ||
import { useSidebarAutoCollapse } from "../hooks/useSidebarAutoCollapse"; | ||
import { EDGE_SIDEBAR_EXPAND_DELAY } from "../utils/constant"; | ||
import { EDGE_SIDEBAR_EXPAND_DELAY, CSS_TRANSITION } from "../utils/constant"; | ||
import { EdgeOffset } from "./EdgeOffset"; | ||
@@ -50,9 +51,30 @@ import { useWindowCtx } from "../WindowContext"; | ||
export var EdgeSidebar = function EdgeSidebar(_ref) { | ||
var _layoutState$sidebarI, _iDocument$body, _props$ModalProps, _props$PaperProps3, _props$PaperProps4, _props$PaperProps5, _builder$sidebarId; | ||
var EdgeSidebarRoot = experimentalStyled(Drawer, {}, { | ||
name: "AppEdgeSidebar", | ||
slot: "Root", | ||
overridesResolver: function overridesResolver(props, styles) { | ||
return styles.root; | ||
} | ||
})(function (_ref) { | ||
var styleProps = _ref.styleProps; | ||
return _extends({}, (styleProps.entered || styleProps.variant === "permanent" || styleProps.variant === "persistent") && _defineProperty({}, "& .".concat(drawerClasses.paper), { | ||
transition: "".concat(CSS_TRANSITION, " !important"), | ||
transitionProperty: "all !important" | ||
})); | ||
}); | ||
export var EdgeSidebar = function EdgeSidebar(_ref3) { | ||
var _layoutState$sidebarI, _iDocument$body, _props$ModalProps, _props$PaperProps3, _props$PaperProps4, _builder$sidebarId; | ||
var anchor = _ref.anchor, | ||
children = _ref.children, | ||
props = _objectWithoutProperties(_ref, ["anchor", "children"]); | ||
var children = _ref3.children, | ||
inProps = _objectWithoutProperties(_ref3, ["children"]); | ||
var _useThemeProps = useThemeProps({ | ||
props: inProps, | ||
name: "AppEdgeSidebar" | ||
}), | ||
theme = _useThemeProps.theme, | ||
props = _objectWithoutProperties(_useThemeProps, ["theme"]); | ||
var anchor = props.anchor; | ||
if (!anchor) { | ||
@@ -62,3 +84,2 @@ throw new Error('Missing prop "anchor" on EdgeSidebar component'); | ||
var theme = useTheme(); | ||
var screen = useScreen(); | ||
@@ -69,7 +90,6 @@ | ||
var _useLayoutCtx = useLayoutCtx(), | ||
builder = _useLayoutCtx.builder, | ||
layoutState = _useLayoutCtx.state, | ||
setOpen = _useLayoutCtx.setOpen; | ||
var ctx = useLayoutCtx(); | ||
var builder = ctx.builder, | ||
layoutState = ctx.state, | ||
setOpen = ctx.setOpen; | ||
var sidebarId = "".concat(anchor, "EdgeSidebar"); | ||
@@ -145,4 +165,3 @@ var edgeSidebar = builder[sidebarId]; | ||
} | ||
}, [sidebarState === null || sidebarState === void 0 ? void 0 : sidebarState.collapsed]); // auto-expanded feature | ||
}, [sidebarState === null || sidebarState === void 0 ? void 0 : sidebarState.collapsed]); | ||
if (!screen) return null; | ||
@@ -161,8 +180,15 @@ if (!edgeSidebar || !edgeSidebar.id) return null; | ||
}, [sidebarId, anchor, expanded, setExpanded]); | ||
var styleProps = _extends({}, props, { | ||
entered: entered, | ||
variant: variant | ||
}); | ||
return /*#__PURE__*/React.createElement(SidebarContext.Provider, { | ||
value: sidebarValue | ||
}, /*#__PURE__*/React.createElement(Drawer, _extends({}, props, { | ||
}, /*#__PURE__*/React.createElement(EdgeSidebarRoot, _extends({}, props, { | ||
open: (_layoutState$sidebarI = layoutState[sidebarId]) === null || _layoutState$sidebarI === void 0 ? void 0 : _layoutState$sidebarI.open, | ||
anchor: anchor, | ||
variant: variant, | ||
styleProps: styleProps, | ||
onClose: function onClose() { | ||
@@ -186,4 +212,3 @@ var _props$onClose; | ||
PaperProps: _extends({}, props.PaperProps, { | ||
className: cx("EdgeSidebar-paper", (_props$PaperProps3 = props.PaperProps) === null || _props$PaperProps3 === void 0 ? void 0 : _props$PaperProps3.className), | ||
style: _extends({}, (_props$PaperProps4 = props.PaperProps) === null || _props$PaperProps4 === void 0 ? void 0 : _props$PaperProps4.style, expanded && { | ||
style: _extends({}, (_props$PaperProps3 = props.PaperProps) === null || _props$PaperProps3 === void 0 ? void 0 : _props$PaperProps3.style, expanded && { | ||
width: config === null || config === void 0 ? void 0 : config.width | ||
@@ -193,13 +218,7 @@ }), | ||
onMouseLeave: onMouseLeave, | ||
sx: _extends({}, (_props$PaperProps5 = props.PaperProps) === null || _props$PaperProps5 === void 0 ? void 0 : _props$PaperProps5.sx, (entered || variant === "permanent") && { | ||
transition: theme.transitions.create(["all"], { | ||
easing: theme.transitions.easing.easeOut, | ||
duration: theme.transitions.duration.leavingScreen | ||
}), | ||
transitionProperty: "all !important" | ||
}, (_builder$sidebarId = builder[sidebarId]) === null || _builder$sidebarId === void 0 ? void 0 : _builder$sidebarId.getSxProps()) | ||
sx: _extends({}, (_props$PaperProps4 = props.PaperProps) === null || _props$PaperProps4 === void 0 ? void 0 : _props$PaperProps4.sx, (_builder$sidebarId = builder[sidebarId]) === null || _builder$sidebarId === void 0 ? void 0 : _builder$sidebarId.getSxProps()) | ||
}) | ||
}), variant && variant !== "temporary" && /*#__PURE__*/React.createElement(EdgeOffset, { | ||
sidebarId: sidebarId | ||
}), children)); | ||
}), typeof children === "function" ? children(ctx) : children)); | ||
}; |
@@ -12,3 +12,3 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
name: "EdgeTrigger" | ||
})(); | ||
})({}); | ||
export var EdgeTrigger = function EdgeTrigger(_ref) { | ||
@@ -15,0 +15,0 @@ var _state$field; |
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
import React from "react"; | ||
import cx from "clsx"; | ||
import { experimentalStyled } from "@material-ui/core/styles"; | ||
import { useLayoutCtx } from "../Root/Root"; | ||
import { getContentSxProps } from "../Content/getContentSxProps"; | ||
import { FOOTER_ID } from "../utils/constant"; | ||
import { CSS_TRANSITION, FOOTER_ID } from "../utils/constant"; | ||
var FooterRoot = experimentalStyled("footer", {}, { | ||
name: "Footer", | ||
slot: "Root" | ||
})(); | ||
export var Footer = function Footer(props) { | ||
var _useLayoutCtx = useLayoutCtx(), | ||
builder = _useLayoutCtx.builder; | ||
name: "AppFooter", | ||
slot: "Root", | ||
overridesResolver: function overridesResolver(props, styles) { | ||
return styles.root; | ||
} | ||
})({ | ||
transition: CSS_TRANSITION | ||
}); | ||
export var Footer = function Footer(_ref) { | ||
var children = _ref.children, | ||
props = _objectWithoutProperties(_ref, ["children"]); | ||
var ctx = useLayoutCtx(); | ||
var builder = ctx.builder; | ||
var sxProps = getContentSxProps(builder, FOOTER_ID); | ||
return /*#__PURE__*/React.createElement(FooterRoot, _extends({}, props, { | ||
className: cx("Footer", props.className), | ||
sx: _extends({ | ||
transition: "all 225ms" | ||
}, props.sx, sxProps) | ||
})); | ||
sx: _extends({}, props.sx, sxProps) | ||
}), typeof children === "function" ? children(ctx) : children); | ||
}; |
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
import React from "react"; | ||
import cx from "clsx"; | ||
import AppBar from "@material-ui/core/AppBar"; | ||
import { experimentalStyled } from "@material-ui/core/styles"; | ||
import { experimentalStyled, unstable_useThemeProps as useThemeProps } from "@material-ui/core/styles"; | ||
import { useLayoutCtx } from "../Root/Root"; | ||
import { CSS_TRANSITION } from "../utils/constant"; | ||
var Div = experimentalStyled("div")(); | ||
var OffsetRoot = experimentalStyled("div", {}, { | ||
name: "HeaderOffset", | ||
slot: "Root" | ||
})(); | ||
var OffsetRoot = experimentalStyled("div")({ | ||
flexShrink: 0 | ||
}); | ||
@@ -26,4 +27,3 @@ var Offset = function Offset(_ref) { | ||
sx: { | ||
height: (_builder$element = builder[element]) === null || _builder$element === void 0 ? void 0 : _builder$element.getOffsetHeight(), | ||
flexShrink: 0 | ||
height: (_builder$element = builder[element]) === null || _builder$element === void 0 ? void 0 : _builder$element.getOffsetHeight() | ||
} | ||
@@ -33,49 +33,87 @@ }); | ||
export var TopHeader = function TopHeader(props) { | ||
var TopHeaderRoot = experimentalStyled("div", {}, { | ||
name: "AppTopHeader", | ||
slot: "Root", | ||
overridesResolver: function overridesResolver(props, styles) { | ||
return styles.root; | ||
} | ||
})({ | ||
zIndex: 1, | ||
transition: CSS_TRANSITION | ||
}); | ||
export var TopHeader = function TopHeader(_ref2) { | ||
var _builder$topHeader; | ||
var _useLayoutCtx2 = useLayoutCtx(), | ||
builder = _useLayoutCtx2.builder; | ||
var children = _ref2.children, | ||
inProps = _objectWithoutProperties(_ref2, ["children"]); | ||
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Div, _extends({}, props, { | ||
className: cx("TopHeader", props.className), | ||
sx: _extends({ | ||
transition: CSS_TRANSITION | ||
}, props.sx, (_builder$topHeader = builder.topHeader) === null || _builder$topHeader === void 0 ? void 0 : _builder$topHeader.getSxProps()) | ||
})), /*#__PURE__*/React.createElement(Offset, { | ||
var props = useThemeProps({ | ||
props: inProps, | ||
name: "AppTopHeader" | ||
}); | ||
var ctx = useLayoutCtx(); | ||
var builder = ctx.builder; | ||
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TopHeaderRoot, _extends({}, props, { | ||
sx: _extends({}, props.sx, (_builder$topHeader = builder.topHeader) === null || _builder$topHeader === void 0 ? void 0 : _builder$topHeader.getSxProps()) | ||
}), typeof children === "function" ? children(ctx) : children), /*#__PURE__*/React.createElement(Offset, { | ||
element: "topHeader" | ||
})); | ||
}; | ||
export var Subheader = function Subheader(props) { | ||
var SubheaderRoot = experimentalStyled("div", {}, { | ||
name: "AppSubheader", | ||
slot: "Root", | ||
overridesResolver: function overridesResolver(props, styles) { | ||
return styles.root; | ||
} | ||
})({ | ||
zIndex: 1, | ||
transition: CSS_TRANSITION | ||
}); | ||
export var Subheader = function Subheader(_ref3) { | ||
var _builder$subheader; | ||
var _useLayoutCtx3 = useLayoutCtx(), | ||
builder = _useLayoutCtx3.builder; | ||
var children = _ref3.children, | ||
inProps = _objectWithoutProperties(_ref3, ["children"]); | ||
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Div, _extends({}, props, { | ||
className: cx("Subheader", props.className), | ||
sx: _extends({ | ||
transition: CSS_TRANSITION | ||
}, props.sx, (_builder$subheader = builder.subheader) === null || _builder$subheader === void 0 ? void 0 : _builder$subheader.getSxProps()) | ||
})), /*#__PURE__*/React.createElement(Offset, { | ||
var props = useThemeProps({ | ||
props: inProps, | ||
name: "AppSubheader" | ||
}); | ||
var ctx = useLayoutCtx(); | ||
var builder = ctx.builder; | ||
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SubheaderRoot, _extends({}, props, { | ||
sx: _extends({}, props.sx, (_builder$subheader = builder.subheader) === null || _builder$subheader === void 0 ? void 0 : _builder$subheader.getSxProps()) | ||
}), typeof children === "function" ? children(ctx) : children), /*#__PURE__*/React.createElement(Offset, { | ||
element: "subheader" | ||
})); | ||
}; | ||
export var Header = function Header(props) { | ||
var HeaderRoot = experimentalStyled(AppBar, {}, { | ||
name: "AppHeader", | ||
slot: "Root", | ||
overridesResolver: function overridesResolver(props, styles) { | ||
return styles.root; | ||
} | ||
})({ | ||
transition: CSS_TRANSITION | ||
}); | ||
export var Header = function Header(_ref4) { | ||
var _builder$header; | ||
var _useLayoutCtx4 = useLayoutCtx(), | ||
builder = _useLayoutCtx4.builder; | ||
var children = _ref4.children, | ||
inProps = _objectWithoutProperties(_ref4, ["children"]); | ||
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AppBar, _extends({ | ||
var props = useThemeProps({ | ||
props: inProps, | ||
name: "AppHeader" | ||
}); | ||
var ctx = useLayoutCtx(); | ||
var builder = ctx.builder; | ||
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(HeaderRoot, _extends({ | ||
color: "default", | ||
elevation: 0 | ||
}, props, { | ||
className: cx("Header", props.className), | ||
sx: _extends({ | ||
transition: CSS_TRANSITION | ||
}, props.sx, (_builder$header = builder.header) === null || _builder$header === void 0 ? void 0 : _builder$header.getSxProps()) | ||
})), /*#__PURE__*/React.createElement(Offset, { | ||
sx: _extends({}, props.sx, (_builder$header = builder.header) === null || _builder$header === void 0 ? void 0 : _builder$header.getSxProps()) | ||
}), typeof children === "function" ? children(ctx) : children), /*#__PURE__*/React.createElement(Offset, { | ||
element: "header" | ||
})); | ||
}; |
@@ -9,5 +9,5 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
import Container from "@material-ui/core/Container"; | ||
import { experimentalStyled } from "@material-ui/core/styles"; | ||
import { useFullscreenCtx } from "../Fullscreen/FullscreenContext"; | ||
import { experimentalStyled } from "@material-ui/core"; | ||
var Div = experimentalStyled("div")({ | ||
var FullscreenWrapperRoot = experimentalStyled("div")({ | ||
overflow: "auto", | ||
@@ -21,17 +21,18 @@ flexGrow: 1 | ||
_ref$FullscreenWrappe = _ref.FullscreenWrapper, | ||
FullscreenWrapper = _ref$FullscreenWrappe === void 0 ? Div : _ref$FullscreenWrappe, | ||
props = _objectWithoutProperties(_ref, ["children", "leftSidebar", "rightSidebar", "FullscreenWrapper"]); | ||
FullscreenWrapper = _ref$FullscreenWrappe === void 0 ? FullscreenWrapperRoot : _ref$FullscreenWrappe, | ||
FullscreenWrapperProps = _ref.FullscreenWrapperProps, | ||
props = _objectWithoutProperties(_ref, ["children", "leftSidebar", "rightSidebar", "FullscreenWrapper", "FullscreenWrapperProps"]); | ||
var isFullscreen = useFullscreenCtx(); | ||
return /*#__PURE__*/React.createElement(Container, _extends({}, props, { | ||
sx: { | ||
sx: _extends({ | ||
display: "flex", | ||
flexFlow: "row nowrap", | ||
flexGrow: 1 | ||
} | ||
}, props.sx) | ||
}), leftSidebar && /*#__PURE__*/React.cloneElement(leftSidebar, { | ||
anchor: "left" | ||
}), isFullscreen ? /*#__PURE__*/React.createElement(FullscreenWrapper, null, children) : children, rightSidebar && /*#__PURE__*/React.cloneElement(rightSidebar, { | ||
}), isFullscreen ? /*#__PURE__*/React.createElement(FullscreenWrapper, FullscreenWrapperProps, children) : children, rightSidebar && /*#__PURE__*/React.cloneElement(rightSidebar, { | ||
anchor: "right" | ||
})); | ||
}; |
@@ -11,3 +11,3 @@ import React from "react"; | ||
slot: "Root" | ||
})(); | ||
})({}); | ||
export var InsetOffset = function InsetOffset(_ref) { | ||
@@ -14,0 +14,0 @@ var headerMagnetEnabled = _ref.headerMagnetEnabled; |
@@ -12,4 +12,19 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
import { InsetOffset } from "./InsetOffset"; | ||
var InsetSidebarRoot = experimentalStyled("div")(); | ||
var InsetSidebarBody = experimentalStyled("div")(); | ||
var InsetSidebarRoot = experimentalStyled("div", {}, { | ||
name: "AppInsetSidebar", | ||
slot: "Root", | ||
overridesResolver: function overridesResolver(props, styles) { | ||
return styles.root; | ||
} | ||
})({ | ||
position: "relative", | ||
flexShrink: 0 | ||
}); | ||
var InsetSidebarBody = experimentalStyled("div", {}, { | ||
name: "AppInsetSidebar", | ||
slot: "Body", | ||
overridesResolver: function overridesResolver(props, styles) { | ||
return styles.body; | ||
} | ||
})({}); | ||
export var InsetSidebar = function InsetSidebar(_ref) { | ||
@@ -22,21 +37,15 @@ var anchor = _ref.anchor, | ||
var _useLayoutCtx = useLayoutCtx(), | ||
builder = _useLayoutCtx.builder; // anchor should be injected via InsetContainer | ||
var ctx = useLayoutCtx(); | ||
var builder = ctx.builder; // anchor should be injected via InsetContainer | ||
var sidebar = builder["".concat(anchor, "InsetSidebar")]; | ||
return /*#__PURE__*/React.createElement(InsetSidebarRoot, _extends({}, props, { | ||
className: cx("InsetSidebar-root", props === null || props === void 0 ? void 0 : props.className, classes === null || classes === void 0 ? void 0 : classes.root), | ||
sx: _extends({ | ||
position: "relative", | ||
flexShrink: 0 | ||
}, props === null || props === void 0 ? void 0 : props.sx, sidebar === null || sidebar === void 0 ? void 0 : sidebar.getSxRoot()) | ||
className: cx(props === null || props === void 0 ? void 0 : props.className, classes === null || classes === void 0 ? void 0 : classes.root), | ||
sx: _extends({}, props === null || props === void 0 ? void 0 : props.sx, sidebar === null || sidebar === void 0 ? void 0 : sidebar.getSxRoot()) | ||
}), /*#__PURE__*/React.createElement(InsetSidebarBody, _extends({}, BodyProps, { | ||
className: cx("InsetSidebar-body", BodyProps === null || BodyProps === void 0 ? void 0 : BodyProps.className, classes === null || classes === void 0 ? void 0 : classes.paper), | ||
sx: _extends({ | ||
backgroundColor: "background.paper" | ||
}, BodyProps === null || BodyProps === void 0 ? void 0 : BodyProps.sx, sidebar === null || sidebar === void 0 ? void 0 : sidebar.getSxBody()) | ||
className: cx(BodyProps === null || BodyProps === void 0 ? void 0 : BodyProps.className, classes === null || classes === void 0 ? void 0 : classes.paper), | ||
sx: _extends({}, BodyProps === null || BodyProps === void 0 ? void 0 : BodyProps.sx, sidebar === null || sidebar === void 0 ? void 0 : sidebar.getSxBody()) | ||
}), (sidebar === null || sidebar === void 0 ? void 0 : sidebar.config.position) === "fixed" && /*#__PURE__*/React.createElement(InsetOffset, { | ||
headerMagnetEnabled: sidebar.config.headerMagnetEnabled | ||
}), children)); | ||
}), typeof children === "function" ? children(ctx) : children)); | ||
}; |
@@ -46,4 +46,2 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
width: "100%", | ||
padding: "unset", | ||
margin: "unset", | ||
overflow: "auto", | ||
@@ -65,3 +63,2 @@ height: this.effectedBy.header ? this.effectedBy.header.generateSxWithHidden({ | ||
top: top, | ||
width: "auto", | ||
height: "100%", | ||
@@ -85,6 +82,3 @@ overflowY: "auto" | ||
position: "sticky", | ||
top: top, | ||
margin: "unset", | ||
padding: "unset", | ||
height: "auto" | ||
top: top | ||
}; | ||
@@ -91,0 +85,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import { createMuiTheme } from "@material-ui/core/styles"; | ||
import { createTheme } from "@material-ui/core/styles"; | ||
export var HEADER_ID = "header"; | ||
@@ -8,3 +8,3 @@ export var CONTENT_ID = "content"; | ||
export var EDGE_SIDEBAR_EXPAND_DELAY = 350; | ||
export var CSS_TRANSITION = "all 300ms cubic-bezier(0.0, 0, 0.2, 1) 0ms, color 0s"; | ||
export var DEFAULT_THEME = createMuiTheme(); | ||
export var CSS_TRANSITION = "all 225ms cubic-bezier(0.0, 0, 0.2, 1) 0ms, color 0s"; | ||
export var DEFAULT_THEME = createTheme(); |
@@ -1,9 +0,10 @@ | ||
import React from "react"; | ||
declare const FooterRoot: import("@material-ui/core/styles/experimentalStyled").StyledComponent<{ | ||
theme?: import("@material-ui/core/styles").Theme | undefined; | ||
as?: "symbol" | "object" | "big" | "link" | "small" | "sub" | "sup" | "track" | "progress" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "label" | "legend" | "li" | "main" | "map" | "mark" | "menu" | "meta" | "meter" | "nav" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "script" | "section" | "select" | "slot" | "source" | "span" | "strong" | "style" | "summary" | "table" | "tbody" | "td" | "template" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "u" | "ul" | "var" | "video" | "wbr" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "svg" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | "menuitem" | "keygen" | "noindex" | "webview" | "animate" | "animateMotion" | "animateTransform" | "feDropShadow" | "mpath" | React.ComponentClass<any, any> | React.FunctionComponent<any> | undefined; | ||
sx?: import("@material-ui/system").SystemCssProperties<import("@material-ui/core/styles").Theme> | import("@material-ui/system").CSSPseudoSelectorProps<import("@material-ui/core/styles").Theme> | import("@material-ui/system").CSSSelectorObject<import("@material-ui/core/styles").Theme> | null | undefined; | ||
}, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "hidden" | "dir" | "slot" | "style" | "title" | "color" | "translate" | "prefix" | "children" | "ref" | "key" | "className" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture">, {}>; | ||
declare type FooterProps = Parameters<typeof FooterRoot>[0]; | ||
export declare const Footer: (props: FooterProps) => JSX.Element; | ||
import { Theme } from "@material-ui/core/styles"; | ||
import { SxProps } from "@material-ui/system"; | ||
import { PropsWithFunctionChildren } from "../Root/Root"; | ||
declare type Props = JSX.IntrinsicElements["footer"]; | ||
export declare type FooterClassKey = "root"; | ||
export interface FooterProps extends Props { | ||
sx?: SxProps<Theme>; | ||
} | ||
export declare const Footer: ({ children, ...props }: PropsWithFunctionChildren<FooterProps>) => JSX.Element; | ||
export {}; |
@@ -10,4 +10,2 @@ "use strict"; | ||
var _clsx = _interopRequireDefault(require("clsx")); | ||
var _styles = require("@material-ui/core/styles"); | ||
@@ -25,20 +23,28 @@ | ||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
var FooterRoot = (0, _styles.experimentalStyled)("footer", {}, { | ||
name: "Footer", | ||
slot: "Root" | ||
})(); | ||
name: "AppFooter", | ||
slot: "Root", | ||
overridesResolver: function overridesResolver(props, styles) { | ||
return styles.root; | ||
} | ||
})({ | ||
transition: _constant.CSS_TRANSITION | ||
}); | ||
var Footer = function Footer(props) { | ||
var _useLayoutCtx = (0, _Root.useLayoutCtx)(), | ||
builder = _useLayoutCtx.builder; | ||
var Footer = function Footer(_ref) { | ||
var children = _ref.children, | ||
props = _objectWithoutProperties(_ref, ["children"]); | ||
var ctx = (0, _Root.useLayoutCtx)(); | ||
var builder = ctx.builder; | ||
var sxProps = (0, _getContentSxProps.getContentSxProps)(builder, _constant.FOOTER_ID); | ||
return /*#__PURE__*/_react["default"].createElement(FooterRoot, _extends({}, props, { | ||
className: (0, _clsx["default"])("Footer", props.className), | ||
sx: _extends({ | ||
transition: "all 225ms" | ||
}, props.sx, sxProps) | ||
})); | ||
sx: _extends({}, props.sx, sxProps) | ||
}), typeof children === "function" ? children(ctx) : children); | ||
}; | ||
exports.Footer = Footer; |
@@ -6,2 +6,3 @@ import React from "react"; | ||
sx?: import("@material-ui/system").SystemCssProperties<import("@material-ui/core/styles").Theme> | import("@material-ui/system").CSSPseudoSelectorProps<import("@material-ui/core/styles").Theme> | import("@material-ui/system").CSSSelectorObject<import("@material-ui/core/styles").Theme> | null | undefined; | ||
styleProps?: Record<string, unknown> | undefined; | ||
}, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "hidden" | "dir" | "slot" | "style" | "title" | "color" | "translate" | "prefix" | "children" | "ref" | "key" | "className" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture">, {}>; | ||
@@ -8,0 +9,0 @@ export declare type FullscreenProps = Parameters<typeof FullscreenRoot>[0]; |
@@ -1,11 +0,20 @@ | ||
import React from "react"; | ||
import { AppBarProps } from "@material-ui/core/AppBar"; | ||
declare const Div: import("@material-ui/core/styles/experimentalStyled").StyledComponent<{ | ||
theme?: import("@material-ui/core/styles").Theme | undefined; | ||
as?: "symbol" | "object" | "big" | "link" | "small" | "sub" | "sup" | "track" | "progress" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "label" | "legend" | "li" | "main" | "map" | "mark" | "menu" | "meta" | "meter" | "nav" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "script" | "section" | "select" | "slot" | "source" | "span" | "strong" | "style" | "summary" | "table" | "tbody" | "td" | "template" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "u" | "ul" | "var" | "video" | "wbr" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "svg" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | "menuitem" | "keygen" | "noindex" | "webview" | "animate" | "animateMotion" | "animateTransform" | "feDropShadow" | "mpath" | React.ComponentClass<any, any> | React.FunctionComponent<any> | undefined; | ||
sx?: import("@material-ui/system").SystemCssProperties<import("@material-ui/core/styles").Theme> | import("@material-ui/system").CSSPseudoSelectorProps<import("@material-ui/core/styles").Theme> | import("@material-ui/system").CSSSelectorObject<import("@material-ui/core/styles").Theme> | null | undefined; | ||
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>; | ||
export declare const TopHeader: (props: Parameters<typeof Div>[0]) => JSX.Element; | ||
export declare const Subheader: (props: Parameters<typeof Div>[0]) => JSX.Element; | ||
export declare const Header: (props: AppBarProps) => JSX.Element; | ||
import { Theme } from "@material-ui/core/styles"; | ||
import { SxProps } from "@material-ui/system"; | ||
import { PropsWithFunctionChildren } from "../Root/Root"; | ||
declare type DivProps = JSX.IntrinsicElements["div"]; | ||
export interface TopHeaderProps extends DivProps { | ||
sx?: SxProps<Theme>; | ||
} | ||
export declare type TopHeaderClassKey = "root"; | ||
export declare const TopHeader: ({ children, ...inProps }: PropsWithFunctionChildren<TopHeaderProps>) => JSX.Element; | ||
export interface SubheaderProps extends DivProps { | ||
sx?: SxProps<Theme>; | ||
} | ||
export declare type SubheaderClassKey = "root"; | ||
export declare const Subheader: ({ children, ...inProps }: PropsWithFunctionChildren<SubheaderProps>) => JSX.Element; | ||
export interface HeaderProps extends AppBarProps { | ||
} | ||
export declare type HeaderClassKey = "root"; | ||
export declare const Header: ({ children, ...inProps }: PropsWithFunctionChildren<HeaderProps>) => JSX.Element; | ||
export {}; |
@@ -10,4 +10,2 @@ "use strict"; | ||
var _clsx = _interopRequireDefault(require("clsx")); | ||
var _AppBar = _interopRequireDefault(require("@material-ui/core/AppBar")); | ||
@@ -25,8 +23,10 @@ | ||
var Div = (0, _styles.experimentalStyled)("div")(); | ||
var OffsetRoot = (0, _styles.experimentalStyled)("div", {}, { | ||
name: "HeaderOffset", | ||
slot: "Root" | ||
})(); | ||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
var OffsetRoot = (0, _styles.experimentalStyled)("div")({ | ||
flexShrink: 0 | ||
}); | ||
var Offset = function Offset(_ref) { | ||
@@ -43,4 +43,3 @@ var _builder$element; | ||
sx: { | ||
height: (_builder$element = builder[element]) === null || _builder$element === void 0 ? void 0 : _builder$element.getOffsetHeight(), | ||
flexShrink: 0 | ||
height: (_builder$element = builder[element]) === null || _builder$element === void 0 ? void 0 : _builder$element.getOffsetHeight() | ||
} | ||
@@ -50,14 +49,28 @@ }); | ||
var TopHeader = function TopHeader(props) { | ||
var TopHeaderRoot = (0, _styles.experimentalStyled)("div", {}, { | ||
name: "AppTopHeader", | ||
slot: "Root", | ||
overridesResolver: function overridesResolver(props, styles) { | ||
return styles.root; | ||
} | ||
})({ | ||
zIndex: 1, | ||
transition: _constant.CSS_TRANSITION | ||
}); | ||
var TopHeader = function TopHeader(_ref2) { | ||
var _builder$topHeader; | ||
var _useLayoutCtx2 = (0, _Root.useLayoutCtx)(), | ||
builder = _useLayoutCtx2.builder; | ||
var children = _ref2.children, | ||
inProps = _objectWithoutProperties(_ref2, ["children"]); | ||
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(Div, _extends({}, props, { | ||
className: (0, _clsx["default"])("TopHeader", props.className), | ||
sx: _extends({ | ||
transition: _constant.CSS_TRANSITION | ||
}, props.sx, (_builder$topHeader = builder.topHeader) === null || _builder$topHeader === void 0 ? void 0 : _builder$topHeader.getSxProps()) | ||
})), /*#__PURE__*/_react["default"].createElement(Offset, { | ||
var props = (0, _styles.unstable_useThemeProps)({ | ||
props: inProps, | ||
name: "AppTopHeader" | ||
}); | ||
var ctx = (0, _Root.useLayoutCtx)(); | ||
var builder = ctx.builder; | ||
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(TopHeaderRoot, _extends({}, props, { | ||
sx: _extends({}, props.sx, (_builder$topHeader = builder.topHeader) === null || _builder$topHeader === void 0 ? void 0 : _builder$topHeader.getSxProps()) | ||
}), typeof children === "function" ? children(ctx) : children), /*#__PURE__*/_react["default"].createElement(Offset, { | ||
element: "topHeader" | ||
@@ -68,15 +81,28 @@ })); | ||
exports.TopHeader = TopHeader; | ||
var SubheaderRoot = (0, _styles.experimentalStyled)("div", {}, { | ||
name: "AppSubheader", | ||
slot: "Root", | ||
overridesResolver: function overridesResolver(props, styles) { | ||
return styles.root; | ||
} | ||
})({ | ||
zIndex: 1, | ||
transition: _constant.CSS_TRANSITION | ||
}); | ||
var Subheader = function Subheader(props) { | ||
var Subheader = function Subheader(_ref3) { | ||
var _builder$subheader; | ||
var _useLayoutCtx3 = (0, _Root.useLayoutCtx)(), | ||
builder = _useLayoutCtx3.builder; | ||
var children = _ref3.children, | ||
inProps = _objectWithoutProperties(_ref3, ["children"]); | ||
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(Div, _extends({}, props, { | ||
className: (0, _clsx["default"])("Subheader", props.className), | ||
sx: _extends({ | ||
transition: _constant.CSS_TRANSITION | ||
}, props.sx, (_builder$subheader = builder.subheader) === null || _builder$subheader === void 0 ? void 0 : _builder$subheader.getSxProps()) | ||
})), /*#__PURE__*/_react["default"].createElement(Offset, { | ||
var props = (0, _styles.unstable_useThemeProps)({ | ||
props: inProps, | ||
name: "AppSubheader" | ||
}); | ||
var ctx = (0, _Root.useLayoutCtx)(); | ||
var builder = ctx.builder; | ||
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(SubheaderRoot, _extends({}, props, { | ||
sx: _extends({}, props.sx, (_builder$subheader = builder.subheader) === null || _builder$subheader === void 0 ? void 0 : _builder$subheader.getSxProps()) | ||
}), typeof children === "function" ? children(ctx) : children), /*#__PURE__*/_react["default"].createElement(Offset, { | ||
element: "subheader" | ||
@@ -87,18 +113,30 @@ })); | ||
exports.Subheader = Subheader; | ||
var HeaderRoot = (0, _styles.experimentalStyled)(_AppBar["default"], {}, { | ||
name: "AppHeader", | ||
slot: "Root", | ||
overridesResolver: function overridesResolver(props, styles) { | ||
return styles.root; | ||
} | ||
})({ | ||
transition: _constant.CSS_TRANSITION | ||
}); | ||
var Header = function Header(props) { | ||
var Header = function Header(_ref4) { | ||
var _builder$header; | ||
var _useLayoutCtx4 = (0, _Root.useLayoutCtx)(), | ||
builder = _useLayoutCtx4.builder; | ||
var children = _ref4.children, | ||
inProps = _objectWithoutProperties(_ref4, ["children"]); | ||
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_AppBar["default"], _extends({ | ||
var props = (0, _styles.unstable_useThemeProps)({ | ||
props: inProps, | ||
name: "AppHeader" | ||
}); | ||
var ctx = (0, _Root.useLayoutCtx)(); | ||
var builder = ctx.builder; | ||
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(HeaderRoot, _extends({ | ||
color: "default", | ||
elevation: 0 | ||
}, props, { | ||
className: (0, _clsx["default"])("Header", props.className), | ||
sx: _extends({ | ||
transition: _constant.CSS_TRANSITION | ||
}, props.sx, (_builder$header = builder.header) === null || _builder$header === void 0 ? void 0 : _builder$header.getSxProps()) | ||
})), /*#__PURE__*/_react["default"].createElement(Offset, { | ||
sx: _extends({}, props.sx, (_builder$header = builder.header) === null || _builder$header === void 0 ? void 0 : _builder$header.getSxProps()) | ||
}), typeof children === "function" ? children(ctx) : children), /*#__PURE__*/_react["default"].createElement(Offset, { | ||
element: "header" | ||
@@ -105,0 +143,0 @@ })); |
@@ -6,2 +6,3 @@ import React from "react"; | ||
sx?: import("@material-ui/system").SystemCssProperties<import("@material-ui/core/styles").Theme> | import("@material-ui/system").CSSPseudoSelectorProps<import("@material-ui/core/styles").Theme> | import("@material-ui/system").CSSSelectorObject<import("@material-ui/core/styles").Theme> | null | undefined; | ||
styleProps?: Record<string, unknown> | undefined; | ||
}, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "hidden" | "dir" | "slot" | "style" | "title" | "color" | "translate" | "prefix" | "children" | "ref" | "key" | "className" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture">, {}>; | ||
@@ -8,0 +9,0 @@ export declare type InsetAvoidingViewProps = Parameters<typeof InsetAvoidingViewRoot>[0]; |
import React from "react"; | ||
import { ContainerProps } from "@material-ui/core/Container"; | ||
declare const Div: import("@material-ui/core/styles/experimentalStyled").StyledComponent<{ | ||
theme?: import("@material-ui/core").Theme | undefined; | ||
as?: "symbol" | "object" | "big" | "link" | "small" | "sub" | "sup" | "track" | "progress" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "label" | "legend" | "li" | "main" | "map" | "mark" | "menu" | "meta" | "meter" | "nav" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "script" | "section" | "select" | "slot" | "source" | "span" | "strong" | "style" | "summary" | "table" | "tbody" | "td" | "template" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "u" | "ul" | "var" | "video" | "wbr" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "svg" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | "menuitem" | "keygen" | "noindex" | "webview" | "animate" | "animateMotion" | "animateTransform" | "feDropShadow" | "mpath" | React.ComponentClass<any, any> | React.FunctionComponent<any> | undefined; | ||
sx?: import("@material-ui/system").SystemCssProperties<import("@material-ui/core").Theme> | import("@material-ui/system").CSSPseudoSelectorProps<import("@material-ui/core").Theme> | import("@material-ui/system").CSSSelectorObject<import("@material-ui/core").Theme> | null | undefined; | ||
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>; | ||
export declare type DivProps = Parameters<typeof Div>[0]; | ||
import { Theme } from "@material-ui/core/styles"; | ||
import { SxProps } from "@material-ui/system"; | ||
export declare type DivProps = JSX.IntrinsicElements["div"]; | ||
export declare type InsetContainerProps = { | ||
@@ -13,4 +10,6 @@ leftSidebar?: React.ReactElement; | ||
FullscreenWrapper?: React.ElementType; | ||
FullscreenWrapperProps?: DivProps & { | ||
sx?: SxProps<Theme>; | ||
}; | ||
} & ContainerProps; | ||
export declare const InsetContainer: ({ children, leftSidebar, rightSidebar, FullscreenWrapper, ...props }: InsetContainerProps) => JSX.Element; | ||
export {}; | ||
export declare const InsetContainer: ({ children, leftSidebar, rightSidebar, FullscreenWrapper, FullscreenWrapperProps, ...props }: InsetContainerProps) => JSX.Element; |
@@ -12,6 +12,6 @@ "use strict"; | ||
var _styles = require("@material-ui/core/styles"); | ||
var _FullscreenContext = require("../Fullscreen/FullscreenContext"); | ||
var _core = require("@material-ui/core"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
@@ -25,3 +25,3 @@ | ||
var Div = (0, _core.experimentalStyled)("div")({ | ||
var FullscreenWrapperRoot = (0, _styles.experimentalStyled)("div")({ | ||
overflow: "auto", | ||
@@ -36,15 +36,16 @@ flexGrow: 1 | ||
_ref$FullscreenWrappe = _ref.FullscreenWrapper, | ||
FullscreenWrapper = _ref$FullscreenWrappe === void 0 ? Div : _ref$FullscreenWrappe, | ||
props = _objectWithoutProperties(_ref, ["children", "leftSidebar", "rightSidebar", "FullscreenWrapper"]); | ||
FullscreenWrapper = _ref$FullscreenWrappe === void 0 ? FullscreenWrapperRoot : _ref$FullscreenWrappe, | ||
FullscreenWrapperProps = _ref.FullscreenWrapperProps, | ||
props = _objectWithoutProperties(_ref, ["children", "leftSidebar", "rightSidebar", "FullscreenWrapper", "FullscreenWrapperProps"]); | ||
var isFullscreen = (0, _FullscreenContext.useFullscreenCtx)(); | ||
return /*#__PURE__*/_react["default"].createElement(_Container["default"], _extends({}, props, { | ||
sx: { | ||
sx: _extends({ | ||
display: "flex", | ||
flexFlow: "row nowrap", | ||
flexGrow: 1 | ||
} | ||
}, props.sx) | ||
}), leftSidebar && /*#__PURE__*/_react["default"].cloneElement(leftSidebar, { | ||
anchor: "left" | ||
}), isFullscreen ? /*#__PURE__*/_react["default"].createElement(FullscreenWrapper, null, children) : children, rightSidebar && /*#__PURE__*/_react["default"].cloneElement(rightSidebar, { | ||
}), isFullscreen ? /*#__PURE__*/_react["default"].createElement(FullscreenWrapper, FullscreenWrapperProps, children) : children, rightSidebar && /*#__PURE__*/_react["default"].cloneElement(rightSidebar, { | ||
anchor: "right" | ||
@@ -51,0 +52,0 @@ })); |
@@ -27,3 +27,3 @@ "use strict"; | ||
slot: "Root" | ||
})(); | ||
})({}); | ||
@@ -30,0 +30,0 @@ var InsetOffset = function InsetOffset(_ref) { |
@@ -1,16 +0,12 @@ | ||
import React, { PropsWithChildren } from "react"; | ||
import { Theme } from "@material-ui/core/styles"; | ||
import { SxProps } from "@material-ui/system"; | ||
import { PropsWithFunctionChildren } from "../Root/Root"; | ||
import { DrawerAnchor } from "./InsetSidebarBuilder"; | ||
declare const InsetSidebarRoot: import("@material-ui/core/styles/experimentalStyled").StyledComponent<{ | ||
theme?: import("@material-ui/core/styles").Theme | undefined; | ||
as?: "symbol" | "object" | "big" | "link" | "small" | "sub" | "sup" | "track" | "progress" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "label" | "legend" | "li" | "main" | "map" | "mark" | "menu" | "meta" | "meter" | "nav" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "script" | "section" | "select" | "slot" | "source" | "span" | "strong" | "style" | "summary" | "table" | "tbody" | "td" | "template" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "u" | "ul" | "var" | "video" | "wbr" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "svg" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | "menuitem" | "keygen" | "noindex" | "webview" | "animate" | "animateMotion" | "animateTransform" | "feDropShadow" | "mpath" | React.ComponentClass<any, any> | React.FunctionComponent<any> | undefined; | ||
sx?: import("@material-ui/system").SystemCssProperties<import("@material-ui/core/styles").Theme> | import("@material-ui/system").CSSPseudoSelectorProps<import("@material-ui/core/styles").Theme> | import("@material-ui/system").CSSSelectorObject<import("@material-ui/core/styles").Theme> | null | undefined; | ||
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>; | ||
declare const InsetSidebarBody: import("@material-ui/core/styles/experimentalStyled").StyledComponent<{ | ||
theme?: import("@material-ui/core/styles").Theme | undefined; | ||
as?: "symbol" | "object" | "big" | "link" | "small" | "sub" | "sup" | "track" | "progress" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "label" | "legend" | "li" | "main" | "map" | "mark" | "menu" | "meta" | "meter" | "nav" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "script" | "section" | "select" | "slot" | "source" | "span" | "strong" | "style" | "summary" | "table" | "tbody" | "td" | "template" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "u" | "ul" | "var" | "video" | "wbr" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "svg" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | "menuitem" | "keygen" | "noindex" | "webview" | "animate" | "animateMotion" | "animateTransform" | "feDropShadow" | "mpath" | React.ComponentClass<any, any> | React.FunctionComponent<any> | undefined; | ||
sx?: import("@material-ui/system").SystemCssProperties<import("@material-ui/core/styles").Theme> | import("@material-ui/system").CSSPseudoSelectorProps<import("@material-ui/core/styles").Theme> | import("@material-ui/system").CSSSelectorObject<import("@material-ui/core/styles").Theme> | null | undefined; | ||
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>; | ||
export declare type InsetSidebarProps = { | ||
declare type DivProps = JSX.IntrinsicElements["div"]; | ||
export declare type InsetSidebarClassKey = "root" | "body"; | ||
export interface InsetSidebarProps extends DivProps { | ||
anchor?: DrawerAnchor; | ||
BodyProps?: Parameters<typeof InsetSidebarBody>[0]; | ||
BodyProps?: DivProps & { | ||
sx?: SxProps<Theme>; | ||
}; | ||
classes?: { | ||
@@ -20,4 +16,5 @@ root?: string; | ||
}; | ||
} & Parameters<typeof InsetSidebarRoot>[0]; | ||
export declare const InsetSidebar: ({ anchor, children, classes, BodyProps, ...props }: PropsWithChildren<InsetSidebarProps>) => JSX.Element; | ||
sx?: SxProps<Theme>; | ||
} | ||
export declare const InsetSidebar: ({ anchor, children, classes, BodyProps, ...props }: PropsWithFunctionChildren<InsetSidebarProps>) => JSX.Element; | ||
export {}; |
@@ -26,4 +26,19 @@ "use strict"; | ||
var InsetSidebarRoot = (0, _styles.experimentalStyled)("div")(); | ||
var InsetSidebarBody = (0, _styles.experimentalStyled)("div")(); | ||
var InsetSidebarRoot = (0, _styles.experimentalStyled)("div", {}, { | ||
name: "AppInsetSidebar", | ||
slot: "Root", | ||
overridesResolver: function overridesResolver(props, styles) { | ||
return styles.root; | ||
} | ||
})({ | ||
position: "relative", | ||
flexShrink: 0 | ||
}); | ||
var InsetSidebarBody = (0, _styles.experimentalStyled)("div", {}, { | ||
name: "AppInsetSidebar", | ||
slot: "Body", | ||
overridesResolver: function overridesResolver(props, styles) { | ||
return styles.body; | ||
} | ||
})({}); | ||
@@ -37,23 +52,17 @@ var InsetSidebar = function InsetSidebar(_ref) { | ||
var _useLayoutCtx = (0, _Root.useLayoutCtx)(), | ||
builder = _useLayoutCtx.builder; // anchor should be injected via InsetContainer | ||
var ctx = (0, _Root.useLayoutCtx)(); | ||
var builder = ctx.builder; // anchor should be injected via InsetContainer | ||
var sidebar = builder["".concat(anchor, "InsetSidebar")]; | ||
return /*#__PURE__*/_react["default"].createElement(InsetSidebarRoot, _extends({}, props, { | ||
className: (0, _clsx["default"])("InsetSidebar-root", props === null || props === void 0 ? void 0 : props.className, classes === null || classes === void 0 ? void 0 : classes.root), | ||
sx: _extends({ | ||
position: "relative", | ||
flexShrink: 0 | ||
}, props === null || props === void 0 ? void 0 : props.sx, sidebar === null || sidebar === void 0 ? void 0 : sidebar.getSxRoot()) | ||
className: (0, _clsx["default"])(props === null || props === void 0 ? void 0 : props.className, classes === null || classes === void 0 ? void 0 : classes.root), | ||
sx: _extends({}, props === null || props === void 0 ? void 0 : props.sx, sidebar === null || sidebar === void 0 ? void 0 : sidebar.getSxRoot()) | ||
}), /*#__PURE__*/_react["default"].createElement(InsetSidebarBody, _extends({}, BodyProps, { | ||
className: (0, _clsx["default"])("InsetSidebar-body", BodyProps === null || BodyProps === void 0 ? void 0 : BodyProps.className, classes === null || classes === void 0 ? void 0 : classes.paper), | ||
sx: _extends({ | ||
backgroundColor: "background.paper" | ||
}, BodyProps === null || BodyProps === void 0 ? void 0 : BodyProps.sx, sidebar === null || sidebar === void 0 ? void 0 : sidebar.getSxBody()) | ||
className: (0, _clsx["default"])(BodyProps === null || BodyProps === void 0 ? void 0 : BodyProps.className, classes === null || classes === void 0 ? void 0 : classes.paper), | ||
sx: _extends({}, BodyProps === null || BodyProps === void 0 ? void 0 : BodyProps.sx, sidebar === null || sidebar === void 0 ? void 0 : sidebar.getSxBody()) | ||
}), (sidebar === null || sidebar === void 0 ? void 0 : sidebar.config.position) === "fixed" && /*#__PURE__*/_react["default"].createElement(_InsetOffset.InsetOffset, { | ||
headerMagnetEnabled: sidebar.config.headerMagnetEnabled | ||
}), children)); | ||
}), typeof children === "function" ? children(ctx) : children)); | ||
}; | ||
exports.InsetSidebar = InsetSidebar; |
@@ -56,4 +56,2 @@ "use strict"; | ||
width: "100%", | ||
padding: "unset", | ||
margin: "unset", | ||
overflow: "auto", | ||
@@ -75,3 +73,2 @@ height: this.effectedBy.header ? this.effectedBy.header.generateSxWithHidden({ | ||
top: top, | ||
width: "auto", | ||
height: "100%", | ||
@@ -95,6 +92,3 @@ overflowY: "auto" | ||
position: "sticky", | ||
top: top, | ||
margin: "unset", | ||
padding: "unset", | ||
height: "auto" | ||
top: top | ||
}; | ||
@@ -101,0 +95,0 @@ } |
{ | ||
"name": "@mui-treasury/layout", | ||
"version": "5.0.0-alpha.6", | ||
"version": "5.0.0-alpha.7", | ||
"description": "mui-treasury | layout-core", | ||
@@ -23,4 +23,4 @@ "author": "siriwatknp <siriwatkunaporn@gmail.com>", | ||
"build": "yarn clean && yarn build:cjs && yarn build:esm && yarn build:types", | ||
"build:cjs": "cross-env NODE_ENV=production BABEL_ENV=cjs babel --config-file ../../babel-config.js --extensions \".js,.ts,.tsx\" ./src --out-dir ./dist --ignore \"**/*.test.ts,**/*.test.tsx\"", | ||
"build:esm": "cross-env NODE_ENV=production BABEL_ENV=esm babel --config-file ../../babel-config.js --extensions \".js,.ts,.tsx\" ./src --out-dir ./dist/esm --ignore \"**/*.test.ts,**/*.test.tsx\"", | ||
"build:cjs": "cross-env NODE_ENV=production BABEL_ENV=cjs babel --config-file ../../babel-config.js --extensions \".js,.ts,.tsx\" ./src --out-dir ./dist --ignore \"**/*.test.ts,**/*.test.tsx,**/*.stories.tsx\"", | ||
"build:esm": "cross-env NODE_ENV=production BABEL_ENV=esm babel --config-file ../../babel-config.js --extensions \".js,.ts,.tsx\" ./src --out-dir ./dist/esm --ignore \"**/*.test.ts,**/*.test.tsx,**/*.stories.tsx\"", | ||
"build:types": "tsc -p tsconfig.build.json", | ||
@@ -36,3 +36,3 @@ "prepare-dist": "ts-node ../../scripts/prerelease.ts layout", | ||
}, | ||
"gitHead": "d9e4d9b35ed017177b345a1ebbd56ce922122058" | ||
"gitHead": "bb7d0ae2692ac6fff561215919afd04cccf2d564" | ||
} |
@@ -1,2 +0,2 @@ | ||
import React, { ReactNode } from "react"; | ||
import React from "react"; | ||
import { EdgeSidebarBuilder, EdgeSidebarSetupParams } from "../EdgeSidebar/EdgeSidebarBuilder"; | ||
@@ -33,3 +33,5 @@ import { HeaderBuilder, HeaderSetupParams } from "../Header/HeaderBuilder"; | ||
}; | ||
declare type FunctionChildren = React.ReactNode | ((ctx: ContextValue) => React.ReactNode); | ||
export declare type PropsWithFunctionChildren<Props = any, Params = ContextValue> = Omit<Props, "children"> & { | ||
children?: React.ReactNode | ((ctx: Params) => React.ReactNode); | ||
}; | ||
export declare const useLayoutCtx: () => ContextValue; | ||
@@ -50,5 +52,3 @@ export declare const LayoutConsumer: React.Consumer<ContextValue | undefined>; | ||
}; | ||
export declare const Root: ({ initialState: controlledInitialState, scheme, children, }: RootProps & { | ||
children?: ReactNode | FunctionChildren; | ||
}) => JSX.Element; | ||
export declare const Root: ({ initialState: controlledInitialState, scheme, children, }: PropsWithFunctionChildren<RootProps>) => JSX.Element; | ||
export {}; |
@@ -13,3 +13,3 @@ export declare const HEADER_ID = "header"; | ||
export declare const EDGE_SIDEBAR_EXPAND_DELAY = 350; | ||
export declare const CSS_TRANSITION = "all 300ms cubic-bezier(0.0, 0, 0.2, 1) 0ms, color 0s"; | ||
export declare const CSS_TRANSITION = "all 225ms cubic-bezier(0.0, 0, 0.2, 1) 0ms, color 0s"; | ||
export declare const DEFAULT_THEME: import("@material-ui/core/styles").Theme; |
@@ -22,5 +22,5 @@ "use strict"; | ||
exports.EDGE_SIDEBAR_EXPAND_DELAY = EDGE_SIDEBAR_EXPAND_DELAY; | ||
var CSS_TRANSITION = "all 300ms cubic-bezier(0.0, 0, 0.2, 1) 0ms, color 0s"; | ||
var CSS_TRANSITION = "all 225ms cubic-bezier(0.0, 0, 0.2, 1) 0ms, color 0s"; | ||
exports.CSS_TRANSITION = CSS_TRANSITION; | ||
var DEFAULT_THEME = (0, _styles.createMuiTheme)(); | ||
var DEFAULT_THEME = (0, _styles.createTheme)(); | ||
exports.DEFAULT_THEME = DEFAULT_THEME; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
142
5584
314681