@mantine/core 5.9.1 → 5.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/AppShell/AppShell.js +0 -1
- package/cjs/AppShell/AppShell.js.map +1 -1
- package/cjs/AppShell/Aside/Aside.js +0 -1
- package/cjs/AppShell/Aside/Aside.js.map +1 -1
- package/cjs/AppShell/Footer/Footer.js +1 -2
- package/cjs/AppShell/Footer/Footer.js.map +1 -1
- package/cjs/AppShell/Header/Header.js +1 -2
- package/cjs/AppShell/Header/Header.js.map +1 -1
- package/cjs/AppShell/HorizontalSection/HorizontalSection.js +2 -2
- package/cjs/AppShell/HorizontalSection/HorizontalSection.js.map +1 -1
- package/cjs/AppShell/Navbar/Navbar.js +0 -1
- package/cjs/AppShell/Navbar/Navbar.js.map +1 -1
- package/cjs/AppShell/VerticalSection/VerticalSection.js +2 -2
- package/cjs/AppShell/VerticalSection/VerticalSection.js.map +1 -1
- package/cjs/Collapse/Collapse.js +4 -8
- package/cjs/Collapse/Collapse.js.map +1 -1
- package/cjs/Collapse/use-collapse.js +19 -74
- package/cjs/Collapse/use-collapse.js.map +1 -1
- package/cjs/ScrollArea/ScrollArea.styles.js +4 -1
- package/cjs/ScrollArea/ScrollArea.styles.js.map +1 -1
- package/esm/AppShell/AppShell.js +1 -2
- package/esm/AppShell/AppShell.js.map +1 -1
- package/esm/AppShell/Aside/Aside.js +1 -2
- package/esm/AppShell/Aside/Aside.js.map +1 -1
- package/esm/AppShell/Footer/Footer.js +2 -3
- package/esm/AppShell/Footer/Footer.js.map +1 -1
- package/esm/AppShell/Header/Header.js +2 -3
- package/esm/AppShell/Header/Header.js.map +1 -1
- package/esm/AppShell/HorizontalSection/HorizontalSection.js +2 -2
- package/esm/AppShell/HorizontalSection/HorizontalSection.js.map +1 -1
- package/esm/AppShell/Navbar/Navbar.js +1 -2
- package/esm/AppShell/Navbar/Navbar.js.map +1 -1
- package/esm/AppShell/VerticalSection/VerticalSection.js +2 -2
- package/esm/AppShell/VerticalSection/VerticalSection.js.map +1 -1
- package/esm/Collapse/Collapse.js +4 -8
- package/esm/Collapse/Collapse.js.map +1 -1
- package/esm/Collapse/use-collapse.js +21 -75
- package/esm/Collapse/use-collapse.js.map +1 -1
- package/esm/ScrollArea/ScrollArea.styles.js +4 -1
- package/esm/ScrollArea/ScrollArea.styles.js.map +1 -1
- package/lib/AppShell/AppShell.d.ts.map +1 -1
- package/lib/AppShell/Aside/Aside.d.ts.map +1 -1
- package/lib/AppShell/Footer/Footer.d.ts.map +1 -1
- package/lib/AppShell/Header/Header.d.ts.map +1 -1
- package/lib/AppShell/Navbar/Navbar.d.ts.map +1 -1
- package/lib/Collapse/Collapse.d.ts +0 -2
- package/lib/Collapse/Collapse.d.ts.map +1 -1
- package/lib/Collapse/use-collapse.d.ts +1 -7
- package/lib/Collapse/use-collapse.d.ts.map +1 -1
- package/lib/ScrollArea/ScrollArea.styles.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.js","sources":["../../src/AppShell/AppShell.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport {\n MantineNumberSize,\n DefaultProps,\n Selectors,\n MantineStyleSystemSize,\n
|
|
1
|
+
{"version":3,"file":"AppShell.js","sources":["../../src/AppShell/AppShell.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport {\n MantineNumberSize,\n DefaultProps,\n Selectors,\n MantineStyleSystemSize,\n useComponentDefaultProps,\n} from '@mantine/styles';\nimport { Box } from '../Box';\nimport { AppShellProvider } from './AppShell.context';\nimport useStyles from './AppShell.styles';\n\nexport type AppShellStylesNames = Selectors<typeof useStyles>;\n\nexport interface AppShellProps\n extends Omit<DefaultProps<AppShellStylesNames>, MantineStyleSystemSize> {\n /** Determines how Navbar and Aside components are positioned relative to Header and Footer components */\n layout?: 'default' | 'alt';\n\n /** <Navbar /> component */\n navbar?: React.ReactElement;\n\n /** <Aside /> component */\n aside?: React.ReactElement;\n\n /** <Header /> component */\n header?: React.ReactElement;\n\n /** <Footer /> component */\n footer?: React.ReactElement;\n\n /** zIndex prop passed to Navbar and Header components */\n zIndex?: React.CSSProperties['zIndex'];\n\n /** true to switch from static layout to fixed */\n fixed?: boolean;\n\n /** true to hide all AppShell parts and render only children */\n hidden?: boolean;\n\n /** AppShell content */\n children: React.ReactNode;\n\n /** Content padding */\n padding?: MantineNumberSize;\n\n /** Breakpoint at which Navbar component should no longer be offset with padding-left, applicable only for fixed position */\n navbarOffsetBreakpoint?: MantineNumberSize;\n\n /** Breakpoint at which Aside component should no longer be offset with padding-right, applicable only for fixed position */\n asideOffsetBreakpoint?: MantineNumberSize;\n}\n\nconst defaultProps: Partial<AppShellProps> = {\n fixed: true,\n padding: 'md',\n};\n\nexport const AppShell = forwardRef<HTMLDivElement, AppShellProps>((props: AppShellProps, ref) => {\n const {\n children,\n navbar,\n header,\n footer,\n aside,\n fixed,\n zIndex,\n padding,\n navbarOffsetBreakpoint,\n asideOffsetBreakpoint,\n className,\n styles,\n classNames,\n unstyled,\n hidden,\n layout,\n ...others\n } = useComponentDefaultProps('AppShell', defaultProps, props);\n\n const { classes, cx } = useStyles(\n { padding, fixed, navbarOffsetBreakpoint, asideOffsetBreakpoint },\n { styles, classNames, unstyled, name: 'AppShell' }\n );\n\n if (hidden) {\n return <>{children}</>;\n }\n\n return (\n <AppShellProvider value={{ fixed, zIndex, layout }}>\n <Box className={cx(classes.root, className)} ref={ref} {...others}>\n {header}\n\n <div className={classes.body}>\n {navbar}\n <main className={classes.main}>{children}</main>\n {aside}\n </div>\n\n {footer}\n </Box>\n </AppShellProvider>\n );\n});\n\nAppShell.displayName = '@mantine/core/AppShell';\n"],"names":[],"mappings":";;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC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'@mantine/styles';
|
|
3
3
|
import { HorizontalSection } from '../HorizontalSection/HorizontalSection.js';
|
|
4
4
|
import { Section } from '../HorizontalSection/Section/Section.js';
|
|
5
5
|
|
|
@@ -22,7 +22,6 @@ var __spreadValues = (a, b) => {
|
|
|
22
22
|
const defaultProps = {
|
|
23
23
|
fixed: false,
|
|
24
24
|
position: { top: 0, right: 0 },
|
|
25
|
-
zIndex: getDefaultZIndex("app"),
|
|
26
25
|
hiddenBreakpoint: "md",
|
|
27
26
|
hidden: false
|
|
28
27
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Aside.js","sources":["../../../src/AppShell/Aside/Aside.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport {
|
|
1
|
+
{"version":3,"file":"Aside.js","sources":["../../../src/AppShell/Aside/Aside.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { useComponentDefaultProps } from '@mantine/styles';\nimport { ForwardRefWithStaticComponents } from '@mantine/utils';\nimport {\n HorizontalSection,\n HorizontalSectionSharedProps,\n} from '../HorizontalSection/HorizontalSection';\nimport { Section } from '../HorizontalSection/Section/Section';\n\nexport interface AsideProps\n extends HorizontalSectionSharedProps,\n React.ComponentPropsWithRef<'nav'> {\n /** Aside content */\n children: React.ReactNode;\n}\n\ntype AsideComponent = ForwardRefWithStaticComponents<AsideProps, { Section: typeof Section }>;\n\nconst defaultProps: Partial<AsideProps> = {\n fixed: false,\n position: { top: 0, right: 0 },\n hiddenBreakpoint: 'md',\n hidden: false,\n};\n\nexport const Aside: AsideComponent = forwardRef<HTMLElement, AsideProps>(\n (props: AsideProps, ref) => {\n const _props = useComponentDefaultProps('Aside', defaultProps, props);\n return <HorizontalSection section=\"aside\" __staticSelector=\"Aside\" ref={ref} {..._props} />;\n }\n) as any;\n\nAside.Section = Section;\nAside.displayName = '@mantine/core/Aside';\n"],"names":[],"mappings":";;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC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,CAAC;AACU,MAAC,KAAK,GAAG,UAAU,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK;AAChD,EAAE,MAAM,MAAM,GAAG,wBAAwB,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;AACxE,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,iBAAiB,EAAE,cAAc,CAAC;AAC/E,IAAI,OAAO,EAAE,OAAO;AACpB,IAAI,gBAAgB,EAAE,OAAO;AAC7B,IAAI,GAAG;AACP,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;AACd,CAAC,EAAE;AACH,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;AACxB,KAAK,CAAC,WAAW,GAAG,qBAAqB;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useComponentDefaultProps } from '@mantine/styles';
|
|
3
3
|
import { VerticalSection } from '../VerticalSection/VerticalSection.js';
|
|
4
4
|
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -23,8 +23,7 @@ var __spreadValues = (a, b) => {
|
|
|
23
23
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
24
|
const defaultProps = {
|
|
25
25
|
fixed: false,
|
|
26
|
-
position: { bottom: 0, left: 0, right: 0 }
|
|
27
|
-
zIndex: getDefaultZIndex("app")
|
|
26
|
+
position: { bottom: 0, left: 0, right: 0 }
|
|
28
27
|
};
|
|
29
28
|
const Footer = forwardRef((props, ref) => {
|
|
30
29
|
const _props = useComponentDefaultProps("Footer", defaultProps, props);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Footer.js","sources":["../../../src/AppShell/Footer/Footer.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport {
|
|
1
|
+
{"version":3,"file":"Footer.js","sources":["../../../src/AppShell/Footer/Footer.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { useComponentDefaultProps } from '@mantine/styles';\nimport { VerticalSection, VerticalSectionSharedProps } from '../VerticalSection/VerticalSection';\n\nexport interface FooterProps\n extends VerticalSectionSharedProps,\n React.ComponentPropsWithoutRef<'nav'> {\n /** Footer content */\n children: React.ReactNode;\n}\n\nconst defaultProps: Partial<FooterProps> = {\n fixed: false,\n position: { bottom: 0, left: 0, right: 0 },\n};\n\nexport const Footer = forwardRef<HTMLElement, FooterProps>((props: FooterProps, ref) => {\n const _props = useComponentDefaultProps('Footer', defaultProps, props);\n return <VerticalSection section=\"footer\" __staticSelector=\"Footer\" {..._props} ref={ref} />;\n});\n\nFooter.displayName = '@mantine/core/Footer';\n"],"names":[],"mappings":";;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,UAAU,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACzC,IAAI,iBAAiB,GAAG,MAAM,CAAC,yBAAyB,CAAC;AACzD,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAChK,IAAI,cAAc,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK;AAC/B,EAAE,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;AAChC,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AAClC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styles';
|
|
3
3
|
import { VerticalSection } from '../VerticalSection/VerticalSection.js';
|
|
4
4
|
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -23,8 +23,7 @@ var __spreadValues = (a, b) => {
|
|
|
23
23
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
24
|
const defaultProps = {
|
|
25
25
|
fixed: false,
|
|
26
|
-
position: { top: 0, left: 0, right: 0 }
|
|
27
|
-
zIndex: getDefaultZIndex("app")
|
|
26
|
+
position: { top: 0, left: 0, right: 0 }
|
|
28
27
|
};
|
|
29
28
|
const Header = forwardRef((props, ref) => {
|
|
30
29
|
const _props = useComponentDefaultProps("Header", defaultProps, props);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sources":["../../../src/AppShell/Header/Header.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport {
|
|
1
|
+
{"version":3,"file":"Header.js","sources":["../../../src/AppShell/Header/Header.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { useComponentDefaultProps } from '@mantine/styles';\nimport { VerticalSection, VerticalSectionSharedProps } from '../VerticalSection/VerticalSection';\n\nexport interface HeaderProps\n extends VerticalSectionSharedProps,\n React.ComponentPropsWithoutRef<'nav'> {\n /** Header content */\n children: React.ReactNode;\n}\n\nconst defaultProps: Partial<HeaderProps> = {\n fixed: false,\n position: { top: 0, left: 0, right: 0 },\n};\n\nexport const Header = forwardRef<HTMLElement, HeaderProps>((props: HeaderProps, ref) => {\n const _props = useComponentDefaultProps('Header', defaultProps, props);\n return <VerticalSection section=\"header\" __staticSelector=\"Header\" {..._props} ref={ref} />;\n});\n\nHeader.displayName = '@mantine/core/Header';\n"],"names":[],"mappings":";;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,UAAU,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACzC,IAAI,iBAAiB,GAAG,MAAM,CAAC,yBAAyB,CAAC;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,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE;AACzC,CAAC,CAAC;AACU,MAAC,MAAM,GAAG,UAAU,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK;AACjD,EAAE,MAAM,MAAM,GAAG,wBAAwB,CAAC,QAAQ,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;AACzE,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,eAAe,EAAE,aAAa,CAAC,cAAc,CAAC;AAC3F,IAAI,OAAO,EAAE,QAAQ;AACrB,IAAI,gBAAgB,EAAE,QAAQ;AAC9B,GAAG,EAAE,MAAM,CAAC,EAAE;AACd,IAAI,GAAG;AACP,GAAG,CAAC,CAAC,CAAC;AACN,CAAC,EAAE;AACH,MAAM,CAAC,WAAW,GAAG,sBAAsB;;;;"}
|
|
@@ -39,7 +39,7 @@ const HorizontalSection = forwardRef((_a, ref) => {
|
|
|
39
39
|
height,
|
|
40
40
|
fixed = false,
|
|
41
41
|
position,
|
|
42
|
-
zIndex
|
|
42
|
+
zIndex,
|
|
43
43
|
hiddenBreakpoint = "md",
|
|
44
44
|
hidden = false,
|
|
45
45
|
withBorder = true,
|
|
@@ -74,7 +74,7 @@ const HorizontalSection = forwardRef((_a, ref) => {
|
|
|
74
74
|
fixed: ctx.fixed || fixed,
|
|
75
75
|
position,
|
|
76
76
|
hiddenBreakpoint,
|
|
77
|
-
zIndex: ctx.zIndex ||
|
|
77
|
+
zIndex: zIndex || ctx.zIndex || getDefaultZIndex("app"),
|
|
78
78
|
section,
|
|
79
79
|
withBorder,
|
|
80
80
|
layout: ctx.layout
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HorizontalSection.js","sources":["../../../src/AppShell/HorizontalSection/HorizontalSection.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { DefaultProps, MantineNumberSize, getDefaultZIndex, Global } from '@mantine/styles';\nimport { Box } from '../../Box';\nimport { useAppShellContext } from '../AppShell.context';\nimport { getSortedBreakpoints } from './get-sorted-breakpoints/get-sorted-breakpoints';\nimport useStyles, {\n HorizontalSectionPosition,\n HorizontalSectionWidth,\n} from './HorizontalSection.styles';\n\nexport interface HorizontalSectionSharedProps extends DefaultProps {\n /** Component width with breakpoints */\n width?: HorizontalSectionWidth;\n\n /** Component height */\n height?: string | number;\n\n /** HorizontalSection content */\n children: React.ReactNode;\n\n /** Determines whether the element should have border */\n withBorder?: boolean;\n\n /** Set position to fixed */\n fixed?: boolean;\n\n /** Position for fixed variant */\n position?: HorizontalSectionPosition;\n\n /** Breakpoint at which component will be hidden if hidden prop is true */\n hiddenBreakpoint?: MantineNumberSize;\n\n /** Set to true to hide component at hiddenBreakpoint */\n hidden?: boolean;\n\n /** z-index */\n zIndex?: React.CSSProperties['zIndex'];\n}\n\nexport interface HorizontalSectionProps\n extends HorizontalSectionSharedProps,\n Omit<React.ComponentPropsWithRef<'nav'>, 'children'> {\n section: 'navbar' | 'aside';\n __staticSelector: string;\n}\n\nexport const HorizontalSection = forwardRef<HTMLElement, HorizontalSectionProps>(\n (\n {\n width,\n height,\n fixed = false,\n position,\n zIndex
|
|
1
|
+
{"version":3,"file":"HorizontalSection.js","sources":["../../../src/AppShell/HorizontalSection/HorizontalSection.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { DefaultProps, MantineNumberSize, getDefaultZIndex, Global } from '@mantine/styles';\nimport { Box } from '../../Box';\nimport { useAppShellContext } from '../AppShell.context';\nimport { getSortedBreakpoints } from './get-sorted-breakpoints/get-sorted-breakpoints';\nimport useStyles, {\n HorizontalSectionPosition,\n HorizontalSectionWidth,\n} from './HorizontalSection.styles';\n\nexport interface HorizontalSectionSharedProps extends DefaultProps {\n /** Component width with breakpoints */\n width?: HorizontalSectionWidth;\n\n /** Component height */\n height?: string | number;\n\n /** HorizontalSection content */\n children: React.ReactNode;\n\n /** Determines whether the element should have border */\n withBorder?: boolean;\n\n /** Set position to fixed */\n fixed?: boolean;\n\n /** Position for fixed variant */\n position?: HorizontalSectionPosition;\n\n /** Breakpoint at which component will be hidden if hidden prop is true */\n hiddenBreakpoint?: MantineNumberSize;\n\n /** Set to true to hide component at hiddenBreakpoint */\n hidden?: boolean;\n\n /** z-index */\n zIndex?: React.CSSProperties['zIndex'];\n}\n\nexport interface HorizontalSectionProps\n extends HorizontalSectionSharedProps,\n Omit<React.ComponentPropsWithRef<'nav'>, 'children'> {\n section: 'navbar' | 'aside';\n __staticSelector: string;\n}\n\nexport const HorizontalSection = forwardRef<HTMLElement, HorizontalSectionProps>(\n (\n {\n width,\n height,\n fixed = false,\n position,\n zIndex,\n hiddenBreakpoint = 'md',\n hidden = false,\n withBorder = true,\n className,\n classNames,\n styles,\n children,\n section,\n __staticSelector,\n unstyled,\n ...others\n }: HorizontalSectionProps,\n ref\n ) => {\n const ctx = useAppShellContext();\n\n const { classes, cx, theme } = useStyles(\n {\n width,\n height,\n fixed: ctx.fixed || fixed,\n position,\n hiddenBreakpoint,\n zIndex: zIndex || ctx.zIndex || getDefaultZIndex('app'),\n section,\n withBorder,\n layout: ctx.layout,\n },\n { classNames, styles, name: __staticSelector, unstyled }\n );\n\n const breakpoints = getSortedBreakpoints(width, theme).reduce(\n (acc, [breakpoint, breakpointSize]) => {\n acc[`@media (min-width: ${breakpoint}px)`] = {\n [`--mantine-${section}-width`]: `${breakpointSize}px`,\n };\n\n return acc;\n },\n {}\n );\n\n return (\n <Box\n component={section === 'navbar' ? 'nav' : 'aside'}\n ref={ref}\n data-hidden={hidden || undefined}\n className={cx(classes.root, className)}\n {...others}\n >\n {children}\n\n <Global\n styles={() => ({\n ':root': {\n [`--mantine-${section}-width`]: width?.base ? `${width.base}px` : '0px',\n ...breakpoints,\n },\n })}\n />\n </Box>\n );\n }\n);\n\nHorizontalSection.displayName = '@mantine/core/HorizontalSection';\n"],"names":[],"mappings":";;;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,m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EAAE,SAAS,CAAC;AAC1C,GAAG,EAAE,MAAM,CAAC,EAAE,QAAQ,kBAAkB,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE;AACpE,IAAI,MAAM,EAAE,OAAO;AACnB,MAAM,OAAO,EAAE,cAAc,CAAC;AAC9B,QAAQ,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,IAAI,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,KAAK;AACzG,OAAO,EAAE,WAAW,CAAC;AACrB,KAAK,CAAC;AACN,GAAG,CAAC,CAAC,CAAC;AACN,CAAC,EAAE;AACH,iBAAiB,CAAC,WAAW,GAAG,iCAAiC;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useComponentDefaultProps } from '@mantine/styles';
|
|
3
3
|
import { HorizontalSection } from '../HorizontalSection/HorizontalSection.js';
|
|
4
4
|
import { Section } from '../HorizontalSection/Section/Section.js';
|
|
5
5
|
|
|
@@ -22,7 +22,6 @@ var __spreadValues = (a, b) => {
|
|
|
22
22
|
const defaultProps = {
|
|
23
23
|
fixed: false,
|
|
24
24
|
position: { top: 0, left: 0 },
|
|
25
|
-
zIndex: getDefaultZIndex("app"),
|
|
26
25
|
hiddenBreakpoint: "md",
|
|
27
26
|
hidden: false
|
|
28
27
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Navbar.js","sources":["../../../src/AppShell/Navbar/Navbar.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport {
|
|
1
|
+
{"version":3,"file":"Navbar.js","sources":["../../../src/AppShell/Navbar/Navbar.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { useComponentDefaultProps } from '@mantine/styles';\nimport { ForwardRefWithStaticComponents } from '@mantine/utils';\nimport {\n HorizontalSection,\n HorizontalSectionSharedProps,\n} from '../HorizontalSection/HorizontalSection';\nimport { Section } from '../HorizontalSection/Section/Section';\n\nexport interface NavbarProps\n extends HorizontalSectionSharedProps,\n React.ComponentPropsWithRef<'nav'> {\n /** Navbar content */\n children: React.ReactNode;\n}\n\ntype NavbarComponent = ForwardRefWithStaticComponents<NavbarProps, { Section: typeof Section }>;\n\nconst defaultProps: Partial<NavbarProps> = {\n fixed: false,\n position: { top: 0, left: 0 },\n hiddenBreakpoint: 'md',\n hidden: false,\n};\n\nexport const Navbar: NavbarComponent = forwardRef<HTMLElement, NavbarProps>(\n (props: NavbarProps, ref) => {\n const _props = useComponentDefaultProps('Navbar', defaultProps, props);\n return <HorizontalSection section=\"navbar\" __staticSelector=\"Navbar\" ref={ref} {..._props} />;\n }\n) as any;\n\nNavbar.Section = Section;\nNavbar.displayName = '@mantine/core/Navbar';\n"],"names":[],"mappings":";;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAChK,IAAI,cAAc,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK;AAC/B,EAAE,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;AAChC,IAAI,IAAI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Index
|
|
46
|
+
zIndex,
|
|
47
47
|
section,
|
|
48
48
|
unstyled,
|
|
49
49
|
__staticSelector
|
|
@@ -62,7 +62,7 @@ const VerticalSection = forwardRef((_a, ref) => {
|
|
|
62
62
|
"__staticSelector"
|
|
63
63
|
]);
|
|
64
64
|
const ctx = useAppShellContext();
|
|
65
|
-
const _zIndex = ctx.zIndex ||
|
|
65
|
+
const _zIndex = zIndex || ctx.zIndex || getDefaultZIndex("app");
|
|
66
66
|
const { classes, cx, theme } = useStyles({
|
|
67
67
|
height,
|
|
68
68
|
fixed: ctx.fixed || fixed,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerticalSection.js","sources":["../../../src/AppShell/VerticalSection/VerticalSection.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { DefaultProps, getDefaultZIndex, Global } from '@mantine/styles';\nimport { Box } from '../../Box';\nimport { useAppShellContext } from '../AppShell.context';\nimport useStyles, {\n VerticalSectionHeight,\n VerticalSectionPosition,\n} from './VerticalSection.styles';\nimport { getSortedBreakpoints } from '../HorizontalSection/get-sorted-breakpoints/get-sorted-breakpoints';\n\nexport interface VerticalSectionSharedProps extends DefaultProps {\n /** Section content */\n children: React.ReactNode;\n\n /** Component height with breakpoints */\n height: VerticalSectionHeight;\n\n /** Determines whether the element should have border */\n withBorder?: boolean;\n\n /** Changes position to fixed, controlled by AppShell component if rendered inside */\n fixed?: boolean;\n\n /** Control top, left, right or bottom position values, controlled by AppShell component if rendered inside */\n position?: VerticalSectionPosition;\n\n /** z-index */\n zIndex?: React.CSSProperties['zIndex'];\n}\n\ninterface VerticalSectionProps\n extends VerticalSectionSharedProps,\n Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {\n section: 'header' | 'footer';\n __staticSelector: string;\n}\n\nexport const VerticalSection = forwardRef<HTMLElement, VerticalSectionProps>(\n (\n {\n children,\n className,\n classNames,\n styles,\n height,\n fixed = false,\n withBorder = true,\n position,\n zIndex
|
|
1
|
+
{"version":3,"file":"VerticalSection.js","sources":["../../../src/AppShell/VerticalSection/VerticalSection.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { DefaultProps, getDefaultZIndex, Global } from '@mantine/styles';\nimport { Box } from '../../Box';\nimport { useAppShellContext } from '../AppShell.context';\nimport useStyles, {\n VerticalSectionHeight,\n VerticalSectionPosition,\n} from './VerticalSection.styles';\nimport { getSortedBreakpoints } from '../HorizontalSection/get-sorted-breakpoints/get-sorted-breakpoints';\n\nexport interface VerticalSectionSharedProps extends DefaultProps {\n /** Section content */\n children: React.ReactNode;\n\n /** Component height with breakpoints */\n height: VerticalSectionHeight;\n\n /** Determines whether the element should have border */\n withBorder?: boolean;\n\n /** Changes position to fixed, controlled by AppShell component if rendered inside */\n fixed?: boolean;\n\n /** Control top, left, right or bottom position values, controlled by AppShell component if rendered inside */\n position?: VerticalSectionPosition;\n\n /** z-index */\n zIndex?: React.CSSProperties['zIndex'];\n}\n\ninterface VerticalSectionProps\n extends VerticalSectionSharedProps,\n Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {\n section: 'header' | 'footer';\n __staticSelector: string;\n}\n\nexport const VerticalSection = forwardRef<HTMLElement, VerticalSectionProps>(\n (\n {\n children,\n className,\n classNames,\n styles,\n height,\n fixed = false,\n withBorder = true,\n position,\n zIndex,\n section,\n unstyled,\n __staticSelector,\n ...others\n }: VerticalSectionProps,\n ref\n ) => {\n const ctx = useAppShellContext();\n const _zIndex = zIndex || ctx.zIndex || getDefaultZIndex('app');\n\n const { classes, cx, theme } = useStyles(\n {\n height,\n fixed: ctx.fixed || fixed,\n position,\n zIndex: typeof _zIndex === 'number' && ctx.layout === 'default' ? _zIndex + 1 : _zIndex,\n layout: ctx.layout,\n borderPosition: withBorder ? (section === 'header' ? 'bottom' : 'top') : 'none',\n },\n { name: __staticSelector, classNames, styles, unstyled }\n );\n const breakpoints =\n typeof height === 'object' && height !== null\n ? getSortedBreakpoints(height, theme).reduce((acc, [breakpoint, breakpointSize]) => {\n acc[`@media (min-width: ${breakpoint}px)`] = {\n [`--mantine-${section}-height`]: `${breakpointSize}px`,\n };\n\n return acc;\n }, {})\n : null;\n\n return (\n <Box\n component={section === 'header' ? 'header' : 'footer'}\n className={cx(classes.root, className)}\n ref={ref}\n {...others}\n >\n {children}\n <Global\n styles={() => ({\n ':root': {\n [`--mantine-${section}-height`]:\n typeof height === 'object' ? `${height?.base}px` || '100%' : `${height}px`,\n ...breakpoints,\n },\n })}\n />\n </Box>\n );\n }\n);\n\nVerticalSection.displayName = '@mantine/core/VerticalSection';\n"],"names":[],"mappings":";;;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAChK,IAAI,cAAc,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK;AAC/B,EAAE,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;AAChC,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AAClC,MAAM,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACxC,EAAE,IAAI,mBAAmB;AACzB,IAAI,KAAK,IAAI,IAAI,IAAI,mBAAmB,CAAC,CAAC,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,GAAG,CAAC,CAAC,mBAAmB,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG;AACjD,MAAM,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,cAAc,CAAC,EAAE,CAAC;AAC5D,KAAK,CAAC;AACN,IAAI,OAAO,GAAG,CAAC;AACf,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC;AAChB,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE,cAAc,CAAC;AACjE,IAAI,SAAS,EAAE,OAAO,KAAK,QAAQ,GAAG,QAAQ,GAAG,QAAQ;AACzD,IAAI,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC;AAC1C,IAAI,GAAG;AACP,GAAG,EAAE,MAAM,CAAC,EAAE,QAAQ,kBAAkB,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE;AACpE,IAAI,MAAM,EAAE,OAAO;AACnB,MAAM,OAAO,EAAE,cAAc,CAAC;AAC9B,QAAQ,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,MAAM,KAAK,QAAQ,GAAG,CAAC,EAAE,MAAM,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,MAAM,GAAG,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC;AAC5I,OAAO,EAAE,WAAW,CAAC;AACrB,KAAK,CAAC;AACN,GAAG,CAAC,CAAC,CAAC;AACN,CAAC,EAAE;AACH,eAAe,CAAC,WAAW,GAAG,+BAA+B;;;;"}
|
package/esm/Collapse/Collapse.js
CHANGED
|
@@ -36,8 +36,7 @@ var __objRest = (source, exclude) => {
|
|
|
36
36
|
const defaultProps = {
|
|
37
37
|
transitionDuration: 200,
|
|
38
38
|
transitionTimingFunction: "ease",
|
|
39
|
-
animateOpacity: true
|
|
40
|
-
axis: "y"
|
|
39
|
+
animateOpacity: true
|
|
41
40
|
};
|
|
42
41
|
const Collapse = forwardRef((props, ref) => {
|
|
43
42
|
const _a = useComponentDefaultProps("Collapse", defaultProps, props), {
|
|
@@ -47,8 +46,7 @@ const Collapse = forwardRef((props, ref) => {
|
|
|
47
46
|
transitionTimingFunction,
|
|
48
47
|
style,
|
|
49
48
|
onTransitionEnd,
|
|
50
|
-
animateOpacity
|
|
51
|
-
axis
|
|
49
|
+
animateOpacity
|
|
52
50
|
} = _a, others = __objRest(_a, [
|
|
53
51
|
"children",
|
|
54
52
|
"in",
|
|
@@ -56,8 +54,7 @@ const Collapse = forwardRef((props, ref) => {
|
|
|
56
54
|
"transitionTimingFunction",
|
|
57
55
|
"style",
|
|
58
56
|
"onTransitionEnd",
|
|
59
|
-
"animateOpacity"
|
|
60
|
-
"axis"
|
|
57
|
+
"animateOpacity"
|
|
61
58
|
]);
|
|
62
59
|
const theme = useMantineTheme();
|
|
63
60
|
const shouldReduceMotion = useReducedMotion();
|
|
@@ -68,8 +65,7 @@ const Collapse = forwardRef((props, ref) => {
|
|
|
68
65
|
opened,
|
|
69
66
|
transitionDuration: duration,
|
|
70
67
|
transitionTimingFunction,
|
|
71
|
-
onTransitionEnd
|
|
72
|
-
axis
|
|
68
|
+
onTransitionEnd
|
|
73
69
|
});
|
|
74
70
|
if (duration === 0) {
|
|
75
71
|
return opened ? /* @__PURE__ */ React.createElement(Box, __spreadValues({}, rest), children) : null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Collapse.js","sources":["../../src/Collapse/Collapse.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { useReducedMotion } from '@mantine/hooks';\nimport { DefaultProps, useComponentDefaultProps, useMantineTheme } from '@mantine/styles';\nimport { Box, extractSystemStyles } from '../Box';\nimport { useCollapse } from './use-collapse';\n\nexport interface CollapseProps extends DefaultProps, React.ComponentPropsWithoutRef<'div'> {\n /** Content that should be collapsed */\n children: React.ReactNode;\n\n /** Opened state */\n in: boolean;\n\n /** Called each time transition ends */\n onTransitionEnd?: () => void;\n\n /** Transition duration in ms */\n transitionDuration?: number;\n\n /** Transition timing function */\n transitionTimingFunction?: string;\n\n /** Should opacity be animated */\n animateOpacity?: boolean;\n
|
|
1
|
+
{"version":3,"file":"Collapse.js","sources":["../../src/Collapse/Collapse.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { useReducedMotion } from '@mantine/hooks';\nimport { DefaultProps, useComponentDefaultProps, useMantineTheme } from '@mantine/styles';\nimport { Box, extractSystemStyles } from '../Box';\nimport { useCollapse } from './use-collapse';\n\nexport interface CollapseProps extends DefaultProps, React.ComponentPropsWithoutRef<'div'> {\n /** Content that should be collapsed */\n children: React.ReactNode;\n\n /** Opened state */\n in: boolean;\n\n /** Called each time transition ends */\n onTransitionEnd?: () => void;\n\n /** Transition duration in ms */\n transitionDuration?: number;\n\n /** Transition timing function */\n transitionTimingFunction?: string;\n\n /** Should opacity be animated */\n animateOpacity?: boolean;\n}\n\nconst defaultProps: Partial<CollapseProps> = {\n transitionDuration: 200,\n transitionTimingFunction: 'ease',\n animateOpacity: true,\n};\n\nexport const Collapse = forwardRef<HTMLDivElement, CollapseProps>((props, ref) => {\n const {\n children,\n in: opened,\n transitionDuration,\n transitionTimingFunction,\n style,\n onTransitionEnd,\n animateOpacity,\n ...others\n } = useComponentDefaultProps('Collapse', defaultProps, props);\n const theme = useMantineTheme();\n\n const shouldReduceMotion = useReducedMotion();\n const reduceMotion = theme.respectReducedMotion ? shouldReduceMotion : false;\n\n const duration = reduceMotion ? 0 : transitionDuration;\n const { systemStyles, rest } = extractSystemStyles(others);\n const getCollapseProps = useCollapse({\n opened,\n transitionDuration: duration,\n transitionTimingFunction,\n onTransitionEnd,\n });\n\n if (duration === 0) {\n return opened ? <Box {...rest}>{children}</Box> : null;\n }\n\n return (\n <Box {...getCollapseProps({ style, ref, ...rest, ...systemStyles })}>\n <div\n style={{\n opacity: opened || !animateOpacity ? 1 : 0,\n transition: animateOpacity ? `opacity ${duration}ms ${transitionTimingFunction}` : 'none',\n }}\n >\n {children}\n </div>\n </Box>\n );\n});\n\nCollapse.displayName = '@mantine/core/Collapse';\n"],"names":[],"mappings":";;;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAChK,IAAI,cAAc,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK;AAC/B,EAAE,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;AAChC,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AAClC,MAAM,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACxC,EAAE,IAAI,mBAAmB;AACzB,IAAI,KAAK,IAAI,IAAI,IAAI,mBAAmB,CAAC,CAAC,CAAC,EAAE;AAC7C,MAAM,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AACpC,QAAQ,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1C,KAAK;AACL,EAAE,OAAO,CAAC,CAAC;AACX,CAAC,CAAC;AACF,IAAI,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AAwB,CAAC,CAAC,GAAG,MAAM;AAC/F,KAAK;AACL,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;AAChB,CAAC,EAAE;AACH,QAAQ,CAAC,WAAW,GAAG,wBAAwB;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useRef, useState
|
|
1
|
+
import { useRef, useState } from 'react';
|
|
2
2
|
import { flushSync } from 'react-dom';
|
|
3
3
|
import { mergeRefs, useDidUpdate } from '@mantine/hooks';
|
|
4
4
|
|
|
@@ -43,21 +43,22 @@ function getAutoHeightDuration(height) {
|
|
|
43
43
|
function getElementHeight(el) {
|
|
44
44
|
return (el == null ? void 0 : el.current) ? el.current.scrollHeight : "auto";
|
|
45
45
|
}
|
|
46
|
-
function getElementWidth(el) {
|
|
47
|
-
return (el == null ? void 0 : el.current) ? el.current.scrollWidth : "auto";
|
|
48
|
-
}
|
|
49
46
|
const raf = typeof window !== "undefined" && window.requestAnimationFrame;
|
|
50
47
|
function useCollapse({
|
|
51
48
|
transitionDuration,
|
|
52
49
|
transitionTimingFunction = "ease",
|
|
53
50
|
onTransitionEnd = () => {
|
|
54
51
|
},
|
|
55
|
-
opened
|
|
56
|
-
axis
|
|
52
|
+
opened
|
|
57
53
|
}) {
|
|
58
54
|
const el = useRef(null);
|
|
59
55
|
const collapsedHeight = "0px";
|
|
60
|
-
const
|
|
56
|
+
const collapsedStyles = {
|
|
57
|
+
display: "none",
|
|
58
|
+
height: "0px",
|
|
59
|
+
overflow: "hidden"
|
|
60
|
+
};
|
|
61
|
+
const [styles, setStylesRaw] = useState(opened ? {} : collapsedStyles);
|
|
61
62
|
const setStyles = (newStyles) => {
|
|
62
63
|
flushSync(() => setStylesRaw(newStyles));
|
|
63
64
|
};
|
|
@@ -67,38 +68,10 @@ function useCollapse({
|
|
|
67
68
|
function getTransitionStyles(height) {
|
|
68
69
|
const _duration = transitionDuration || getAutoHeightDuration(height);
|
|
69
70
|
return {
|
|
70
|
-
|
|
71
|
-
transitionDuration: `${_duration}ms`,
|
|
72
|
-
transitionTimingFunction: `${transitionTimingFunction}`
|
|
71
|
+
transition: `height ${_duration}ms ${transitionTimingFunction}`
|
|
73
72
|
};
|
|
74
73
|
}
|
|
75
|
-
const getDefaultSizes = () => {
|
|
76
|
-
const oldStyles = styles;
|
|
77
|
-
setStyles({});
|
|
78
|
-
const sizes = { width: getElementWidth(el), height: getElementHeight(el) };
|
|
79
|
-
setStyles(oldStyles);
|
|
80
|
-
return sizes;
|
|
81
|
-
};
|
|
82
|
-
const getCollapsedStyles = () => {
|
|
83
|
-
const { height } = getDefaultSizes();
|
|
84
|
-
return {
|
|
85
|
-
x: { height, width: "0px", overflow: "hidden" },
|
|
86
|
-
y: { display: "none", height: "0px", overflow: "hidden" }
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
useEffect(() => {
|
|
90
|
-
raf(() => {
|
|
91
|
-
const { x, y } = getCollapsedStyles();
|
|
92
|
-
if (axis === "x" && !opened) {
|
|
93
|
-
setStyles(__spreadValues({}, x));
|
|
94
|
-
} else if (axis === "y" && !opened) {
|
|
95
|
-
setStyles(__spreadValues({}, y));
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
}, []);
|
|
99
74
|
useDidUpdate(() => {
|
|
100
|
-
if (axis === "x")
|
|
101
|
-
return;
|
|
102
75
|
if (opened) {
|
|
103
76
|
raf(() => {
|
|
104
77
|
mergeStyles({ willChange: "height", display: "block", overflow: "hidden" });
|
|
@@ -115,48 +88,21 @@ function useCollapse({
|
|
|
115
88
|
});
|
|
116
89
|
}
|
|
117
90
|
}, [opened]);
|
|
118
|
-
useDidUpdate(() => {
|
|
119
|
-
if (axis === "y")
|
|
120
|
-
return;
|
|
121
|
-
if (opened) {
|
|
122
|
-
raf(() => {
|
|
123
|
-
const { width } = getDefaultSizes();
|
|
124
|
-
mergeStyles({
|
|
125
|
-
display: "block",
|
|
126
|
-
overflow: "hidden",
|
|
127
|
-
willChange: "width",
|
|
128
|
-
flexShrink: 0
|
|
129
|
-
});
|
|
130
|
-
raf(() => {
|
|
131
|
-
mergeStyles(__spreadProps(__spreadValues({}, getTransitionStyles(width)), { width }));
|
|
132
|
-
});
|
|
133
|
-
});
|
|
134
|
-
} else {
|
|
135
|
-
raf(() => {
|
|
136
|
-
const { width, height } = getDefaultSizes();
|
|
137
|
-
mergeStyles(__spreadProps(__spreadValues({}, getTransitionStyles(width)), {
|
|
138
|
-
flexShrink: 0,
|
|
139
|
-
willChange: "width",
|
|
140
|
-
width,
|
|
141
|
-
height
|
|
142
|
-
}));
|
|
143
|
-
raf(() => mergeStyles({ width: "0px", overflow: "hidden" }));
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
}, [opened]);
|
|
147
91
|
const handleTransitionEnd = (e) => {
|
|
148
|
-
if (e.target !== el.current ||
|
|
92
|
+
if (e.target !== el.current || e.propertyName !== "height") {
|
|
149
93
|
return;
|
|
150
94
|
}
|
|
151
|
-
onTransitionEnd();
|
|
152
95
|
if (opened) {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
96
|
+
const height = getElementHeight(el);
|
|
97
|
+
if (height === styles.height) {
|
|
98
|
+
setStyles({});
|
|
99
|
+
} else {
|
|
100
|
+
mergeStyles({ height });
|
|
101
|
+
}
|
|
102
|
+
onTransitionEnd();
|
|
103
|
+
} else if (styles.height === collapsedHeight) {
|
|
104
|
+
setStyles(collapsedStyles);
|
|
105
|
+
onTransitionEnd();
|
|
160
106
|
}
|
|
161
107
|
};
|
|
162
108
|
function getCollapseProps(_a = {}) {
|
|
@@ -173,5 +119,5 @@ function useCollapse({
|
|
|
173
119
|
return getCollapseProps;
|
|
174
120
|
}
|
|
175
121
|
|
|
176
|
-
export { getElementHeight,
|
|
122
|
+
export { getElementHeight, useCollapse };
|
|
177
123
|
//# sourceMappingURL=use-collapse.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-collapse.js","sources":["../../src/Collapse/use-collapse.ts"],"sourcesContent":["import React, { useState, useRef, useEffect } from 'react';\nimport { flushSync } from 'react-dom';\nimport { useDidUpdate, mergeRefs } from '@mantine/hooks';\n\nfunction getAutoHeightDuration(height: number | string) {\n if (!height || typeof height === 'string') {\n return 0;\n }\n const constant = height / 36;\n return Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10);\n}\n\nexport function getElementHeight(\n el: React.RefObject<HTMLElement> | { current?: { scrollHeight: number } }\n) {\n return el?.current ? el.current.scrollHeight : 'auto';\n}\n\nexport function getElementWidth(\n el: React.RefObject<HTMLElement> | { current?: { scrollWidth: number } }\n) {\n return el?.current ? el.current.scrollWidth : 'auto';\n}\n\nconst raf = typeof window !== 'undefined' && window.requestAnimationFrame;\n\ninterface UseCollapse {\n axis: 'x' | 'y';\n opened: boolean;\n transitionDuration?: number;\n transitionTimingFunction?: string;\n onTransitionEnd?: () => void;\n}\n\ninterface GetCollapseProps {\n [key: string]: unknown;\n style?: React.CSSProperties;\n onTransitionEnd?: (e: TransitionEvent) => void;\n refKey?: string;\n ref?: React.MutableRefObject<HTMLDivElement> | ((node: HTMLDivElement) => void);\n}\n\nexport function useCollapse({\n transitionDuration,\n transitionTimingFunction = 'ease',\n onTransitionEnd = () => {},\n opened,\n axis,\n}: UseCollapse): (props: GetCollapseProps) => Record<string, any> {\n const el = useRef<HTMLElement | null>(null);\n const collapsedHeight = '0px';\n const [styles, setStylesRaw] = useState<React.CSSProperties>({});\n\n const setStyles = (newStyles: {} | ((oldStyles: {}) => {})): void => {\n flushSync(() => setStylesRaw(newStyles));\n };\n\n const mergeStyles = (newStyles: {}): void => {\n setStyles((oldStyles) => ({ ...oldStyles, ...newStyles }));\n };\n\n function getTransitionStyles(height: number | string): {\n transition?: string;\n transitionProperty?: string;\n transitionDuration?: string;\n transitionTimingFunction?: string;\n } {\n const _duration = transitionDuration || getAutoHeightDuration(height);\n return {\n transitionProperty: `${axis === 'x' ? 'width' : 'height'}`,\n transitionDuration: `${_duration}ms`,\n transitionTimingFunction: `${transitionTimingFunction}`,\n };\n }\n\n const getDefaultSizes = () => {\n const oldStyles = styles;\n setStyles({});\n const sizes = { width: getElementWidth(el), height: getElementHeight(el) };\n setStyles(oldStyles);\n return sizes;\n };\n\n const getCollapsedStyles = () => {\n const { height } = getDefaultSizes();\n return {\n x: { height, width: '0px', overflow: 'hidden' },\n y: { display: 'none', height: '0px', overflow: 'hidden' },\n };\n };\n\n useEffect(() => {\n raf(() => {\n const { x, y } = getCollapsedStyles();\n if (axis === 'x' && !opened) {\n setStyles({ ...x });\n } else if (axis === 'y' && !opened) {\n setStyles({ ...y });\n }\n });\n }, []);\n\n // y axis\n useDidUpdate(() => {\n if (axis === 'x') return;\n\n if (opened) {\n raf(() => {\n mergeStyles({ willChange: 'height', display: 'block', overflow: 'hidden' });\n raf(() => {\n const height = getElementHeight(el);\n mergeStyles({ ...getTransitionStyles(height), height });\n });\n });\n } else {\n raf(() => {\n const height = getElementHeight(el);\n mergeStyles({ ...getTransitionStyles(height), willChange: 'height', height });\n raf(() => mergeStyles({ height: collapsedHeight, overflow: 'hidden' }));\n });\n }\n }, [opened]);\n\n // x axis\n useDidUpdate(() => {\n if (axis === 'y') return;\n\n if (opened) {\n raf(() => {\n const { width } = getDefaultSizes();\n mergeStyles({\n display: 'block',\n overflow: 'hidden',\n willChange: 'width',\n flexShrink: 0,\n });\n raf(() => {\n mergeStyles({ ...getTransitionStyles(width), width });\n });\n });\n } else {\n raf(() => {\n const { width, height } = getDefaultSizes();\n mergeStyles({\n ...getTransitionStyles(width),\n flexShrink: 0,\n willChange: 'width',\n width,\n height,\n });\n raf(() => mergeStyles({ width: '0px', overflow: 'hidden' }));\n });\n }\n }, [opened]);\n\n const handleTransitionEnd = (e: React.TransitionEvent): void => {\n if (e.target !== el.current || !(e.propertyName === 'width' || 'height')) {\n return;\n }\n\n onTransitionEnd();\n if (opened) {\n setStyles({});\n } else {\n const { x, y } = getCollapsedStyles();\n if (axis === 'x') setStyles(x);\n else setStyles(y);\n }\n };\n\n function getCollapseProps({ style = {}, refKey = 'ref', ...rest }: GetCollapseProps = {}) {\n const theirRef: any = rest[refKey];\n\n return {\n 'aria-hidden': !opened,\n ...rest,\n [refKey]: mergeRefs(el, theirRef),\n onTransitionEnd: handleTransitionEnd,\n style: { boxSizing: 'border-box', ...style, ...styles },\n };\n }\n\n return getCollapseProps;\n}\n"],"names":[],"mappings":";;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,UAAU,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACzC,IAAI,iBAAiB,GAAG,MAAM,CAAC,yBAAyB,CAAC;AACzD,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAChK,IAAI,cAAc,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK;AAC/B,EAAE,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;AAChC,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AAClC,MAAM,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACxC,EAAE,IAAI,mBAAmB;AACzB,IAAI,KAAK,IAAI,IAAI,IAAI,mB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SAAS,EAAE,YAAY,EAAE,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC;AACvF,KAAK,CAAC,CAAC;AACP,GAAG;AACH,EAAE,OAAO,gBAAgB,CAAC;AAC1B;;;;"}
|
|
1
|
+
{"version":3,"file":"use-collapse.js","sources":["../../src/Collapse/use-collapse.ts"],"sourcesContent":["import React, { useState, useRef } from 'react';\nimport { flushSync } from 'react-dom';\nimport { useDidUpdate, mergeRefs } from '@mantine/hooks';\n\nfunction getAutoHeightDuration(height: number | string) {\n if (!height || typeof height === 'string') {\n return 0;\n }\n const constant = height / 36;\n return Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10);\n}\n\nexport function getElementHeight(\n el: React.RefObject<HTMLElement> | { current?: { scrollHeight: number } }\n) {\n return el?.current ? el.current.scrollHeight : 'auto';\n}\n\nconst raf = typeof window !== 'undefined' && window.requestAnimationFrame;\n\ninterface UseCollapse {\n opened: boolean;\n transitionDuration?: number;\n transitionTimingFunction?: string;\n onTransitionEnd?: () => void;\n}\n\ninterface GetCollapseProps {\n [key: string]: unknown;\n style?: React.CSSProperties;\n onTransitionEnd?: (e: TransitionEvent) => void;\n refKey?: string;\n ref?: React.MutableRefObject<HTMLDivElement> | ((node: HTMLDivElement) => void);\n}\n\nexport function useCollapse({\n transitionDuration,\n transitionTimingFunction = 'ease',\n onTransitionEnd = () => {},\n opened,\n}: UseCollapse): (props: GetCollapseProps) => Record<string, any> {\n const el = useRef<HTMLElement | null>(null);\n const collapsedHeight = '0px';\n const collapsedStyles = {\n display: 'none',\n height: '0px',\n overflow: 'hidden',\n };\n const [styles, setStylesRaw] = useState<React.CSSProperties>(opened ? {} : collapsedStyles);\n const setStyles = (newStyles: {} | ((oldStyles: {}) => {})): void => {\n flushSync(() => setStylesRaw(newStyles));\n };\n\n const mergeStyles = (newStyles: {}): void => {\n setStyles((oldStyles) => ({ ...oldStyles, ...newStyles }));\n };\n\n function getTransitionStyles(height: number | string): {\n transition: string;\n } {\n const _duration = transitionDuration || getAutoHeightDuration(height);\n return {\n transition: `height ${_duration}ms ${transitionTimingFunction}`,\n };\n }\n\n useDidUpdate(() => {\n if (opened) {\n raf(() => {\n mergeStyles({ willChange: 'height', display: 'block', overflow: 'hidden' });\n raf(() => {\n const height = getElementHeight(el);\n mergeStyles({ ...getTransitionStyles(height), height });\n });\n });\n } else {\n raf(() => {\n const height = getElementHeight(el);\n mergeStyles({ ...getTransitionStyles(height), willChange: 'height', height });\n raf(() => mergeStyles({ height: collapsedHeight, overflow: 'hidden' }));\n });\n }\n }, [opened]);\n\n const handleTransitionEnd = (e: React.TransitionEvent): void => {\n if (e.target !== el.current || e.propertyName !== 'height') {\n return;\n }\n\n if (opened) {\n const height = getElementHeight(el);\n\n if (height === styles.height) {\n setStyles({});\n } else {\n mergeStyles({ height });\n }\n\n onTransitionEnd();\n } else if (styles.height === collapsedHeight) {\n setStyles(collapsedStyles);\n onTransitionEnd();\n }\n };\n\n function getCollapseProps({ style = {}, refKey = 'ref', ...rest }: GetCollapseProps = {}) {\n const theirRef: any = rest[refKey];\n return {\n 'aria-hidden': !opened,\n ...rest,\n [refKey]: mergeRefs(el, theirRef),\n onTransitionEnd: handleTransitionEnd,\n style: { boxSizing: 'border-box', ...style, ...styles },\n };\n }\n\n return getCollapseProps;\n}\n"],"names":[],"mappings":";;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,UAAU,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACzC,IAAI,iBAAiB,GAAG,MAAM,CAAC,yBAAyB,CAAC;AACzD,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GA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AAC,EAAE,GAAG,EAAE,EAAE;AACrC,IAAI,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,GAAG,EAAE,EAAE,MAAM,GAAG,KAAK,EAAE,GAAG,EAAE,EAAE,IAAI,GAAG,SAAS,CAAC,EAAE,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;AAChG,IAAI,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;AAClC,IAAI,OAAO,aAAa,CAAC,cAAc,CAAC;AACxC,MAAM,aAAa,EAAE,CAAC,MAAM;AAC5B,KAAK,EAAE,IAAI,CAAC,EAAE;AACd,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,EAAE,QAAQ,CAAC;AACvC,MAAM,eAAe,EAAE,mBAAmB;AAC1C,MAAM,KAAK,EAAE,cAAc,CAAC,cAAc,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC;AACvF,KAAK,CAAC,CAAC;AACP,GAAG;AACH,EAAE,OAAO,gBAAgB,CAAC;AAC1B;;;;"}
|
|
@@ -43,6 +43,7 @@ var useStyles = createStyles((theme, { scrollbarSize, offsetScrollbars, scrollba
|
|
|
43
43
|
position: "relative",
|
|
44
44
|
transition: "background-color 150ms ease",
|
|
45
45
|
display: hidden ? "none" : void 0,
|
|
46
|
+
overflow: "hidden",
|
|
46
47
|
"&::before": {
|
|
47
48
|
content: '""',
|
|
48
49
|
position: "absolute",
|
|
@@ -50,7 +51,9 @@ var useStyles = createStyles((theme, { scrollbarSize, offsetScrollbars, scrollba
|
|
|
50
51
|
left: "50%",
|
|
51
52
|
transform: "translate(-50%, -50%)",
|
|
52
53
|
width: "100%",
|
|
53
|
-
height: "100%"
|
|
54
|
+
height: "100%",
|
|
55
|
+
minWidth: 44,
|
|
56
|
+
minHeight: 44
|
|
54
57
|
}
|
|
55
58
|
},
|
|
56
59
|
corner: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollArea.styles.js","sources":["../../src/ScrollArea/ScrollArea.styles.ts"],"sourcesContent":["import { createStyles } from '@mantine/styles';\n\nexport interface ScrollAreaStylesParams {\n scrollbarSize: number;\n offsetScrollbars: boolean;\n scrollbarHovered: boolean;\n hidden: boolean;\n}\n\nexport default createStyles(\n (\n theme,\n { scrollbarSize, offsetScrollbars, scrollbarHovered, hidden }: ScrollAreaStylesParams,\n getRef\n ) => ({\n root: {\n overflow: 'hidden',\n },\n\n viewport: {\n width: '100%',\n height: '100%',\n paddingRight: offsetScrollbars ? scrollbarSize : undefined,\n paddingBottom: offsetScrollbars ? scrollbarSize : undefined,\n },\n\n scrollbar: {\n display: hidden ? 'none' : 'flex',\n userSelect: 'none',\n touchAction: 'none',\n boxSizing: 'border-box',\n padding: scrollbarSize / 5,\n transition: 'background-color 150ms ease, opacity 150ms ease',\n\n '&:hover': {\n backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[8] : theme.colors.gray[0],\n [`& .${getRef('thumb')}`]: {\n backgroundColor:\n theme.colorScheme === 'dark'\n ? theme.fn.rgba(theme.white, 0.5)\n : theme.fn.rgba(theme.black, 0.5),\n },\n },\n\n '&[data-orientation=\"vertical\"]': {\n width: scrollbarSize,\n },\n\n '&[data-orientation=\"horizontal\"]': {\n flexDirection: 'column',\n height: scrollbarSize,\n },\n\n '&[data-state=\"hidden\"]': {\n display: 'none',\n opacity: 0,\n },\n },\n\n thumb: {\n ref: getRef('thumb'),\n flex: 1,\n backgroundColor:\n theme.colorScheme === 'dark'\n ? theme.fn.rgba(theme.white, 0.4)\n : theme.fn.rgba(theme.black, 0.4),\n borderRadius: scrollbarSize,\n position: 'relative',\n transition: 'background-color 150ms ease',\n display: hidden ? 'none' : undefined,\n\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n width: '100%',\n height: '100%',\n },\n },\n\n corner: {\n backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.colors.gray[0],\n transition: 'opacity 150ms ease',\n opacity: scrollbarHovered ? 1 : 0,\n display: hidden ? 'none' : undefined,\n },\n })\n);\n"],"names":[],"mappings":";;AACA,gBAAe,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,EAAE,EAAE,MAAM,MAAM;AAC/G,EAAE,IAAI,EAAE;AACR,IAAI,QAAQ,EAAE,QAAQ;AACtB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,KAAK,EAAE,MAAM;AACjB,IAAI,MAAM,EAAE,MAAM;AAClB,IAAI,YAAY,EAAE,gBAAgB,GAAG,aAAa,GAAG,KAAK,CAAC;AAC3D,IAAI,aAAa,EAAE,gBAAgB,GAAG,aAAa,GAAG,KAAK,CAAC;AAC5D,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM;AACrC,IAAI,UAAU,EAAE,MAAM;AACtB,IAAI,WAAW,EAAE,MAAM;AACvB,IAAI,SAAS,EAAE,YAAY;AAC3B,IAAI,OAAO,EAAE,aAAa,GAAG,CAAC;AAC9B,IAAI,UAAU,EAAE,iDAAiD;AACjE,IAAI,SAAS,EAAE;AACf,MAAM,eAAe,EAAE,KAAK,CAAC,WAAW,KAAK,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AACjG,MAAM,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG;AACjC,QAAQ,eAAe,EAAE,KAAK,CAAC,WAAW,KAAK,MAAM,GAAG,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,K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AAC,CAAC,CAAC;AAC/F,IAAI,UAAU,EAAE,oBAAoB;AACpC,IAAI,OAAO,EAAE,gBAAgB,GAAG,CAAC,GAAG,CAAC;AACrC,IAAI,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC;AACrC,GAAG;AACH,CAAC,CAAC,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"ScrollArea.styles.js","sources":["../../src/ScrollArea/ScrollArea.styles.ts"],"sourcesContent":["import { createStyles } from '@mantine/styles';\n\nexport interface ScrollAreaStylesParams {\n scrollbarSize: number;\n offsetScrollbars: boolean;\n scrollbarHovered: boolean;\n hidden: boolean;\n}\n\nexport default createStyles(\n (\n theme,\n { scrollbarSize, offsetScrollbars, scrollbarHovered, hidden }: ScrollAreaStylesParams,\n getRef\n ) => ({\n root: {\n overflow: 'hidden',\n },\n\n viewport: {\n width: '100%',\n height: '100%',\n paddingRight: offsetScrollbars ? scrollbarSize : undefined,\n paddingBottom: offsetScrollbars ? scrollbarSize : undefined,\n },\n\n scrollbar: {\n display: hidden ? 'none' : 'flex',\n userSelect: 'none',\n touchAction: 'none',\n boxSizing: 'border-box',\n padding: scrollbarSize / 5,\n transition: 'background-color 150ms ease, opacity 150ms ease',\n\n '&:hover': {\n backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[8] : theme.colors.gray[0],\n [`& .${getRef('thumb')}`]: {\n backgroundColor:\n theme.colorScheme === 'dark'\n ? theme.fn.rgba(theme.white, 0.5)\n : theme.fn.rgba(theme.black, 0.5),\n },\n },\n\n '&[data-orientation=\"vertical\"]': {\n width: scrollbarSize,\n },\n\n '&[data-orientation=\"horizontal\"]': {\n flexDirection: 'column',\n height: scrollbarSize,\n },\n\n '&[data-state=\"hidden\"]': {\n display: 'none',\n opacity: 0,\n },\n },\n\n thumb: {\n ref: getRef('thumb'),\n flex: 1,\n backgroundColor:\n theme.colorScheme === 'dark'\n ? theme.fn.rgba(theme.white, 0.4)\n : theme.fn.rgba(theme.black, 0.4),\n borderRadius: scrollbarSize,\n position: 'relative',\n transition: 'background-color 150ms ease',\n display: hidden ? 'none' : undefined,\n overflow: 'hidden',\n\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n width: '100%',\n height: '100%',\n minWidth: 44,\n minHeight: 44,\n },\n },\n\n corner: {\n backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.colors.gray[0],\n transition: 'opacity 150ms ease',\n opacity: scrollbarHovered ? 1 : 0,\n display: hidden ? 'none' : undefined,\n },\n })\n);\n"],"names":[],"mappings":";;AACA,gBAAe,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,EAAE,EAAE,MAAM,MAAM;AAC/G,EAAE,IAAI,EAAE;AACR,IAAI,QAAQ,EAAE,QAAQ;AACtB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,KAAK,EAAE,MAAM;AACjB,IAAI,MAAM,EAAE,MAAM;AAClB,IAAI,YAAY,EAAE,gBAAgB,GAAG,aAAa,GAAG,KAAK,CAAC;AAC3D,IAAI,aAAa,EAAE,gBAAgB,GAAG,aAAa,GAAG,KAAK,CAAC;AAC5D,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM;AACrC,IAAI,UAAU,EAAE,MAAM;AACtB,IAAI,WAAW,EAAE,MAAM;AACvB,IAAI,SAAS,EAAE,YAAY;AAC3B,IAAI,OAAO,EAAE,aAAa,GAAG,CAAC;AAC9B,IAAI,UAAU,EAAE,iDAAiD;AACjE,IAAI,SAAS,EAAE;AACf,MAAM,eAAe,EAAE,KAAK,CAAC,WAAW,KAAK,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AACjG,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ACjB,MAAM,SAAS,EAAE,uBAAuB;AACxC,MAAM,KAAK,EAAE,MAAM;AACnB,MAAM,MAAM,EAAE,MAAM;AACpB,MAAM,QAAQ,EAAE,EAAE;AAClB,MAAM,SAAS,EAAE,EAAE;AACnB,KAAK;AACL,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,eAAe,EAAE,KAAK,CAAC,WAAW,KAAK,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAC/F,IAAI,UAAU,EAAE,oBAAoB;AACpC,IAAI,OAAO,EAAE,gBAAgB,GAAG,CAAC,GAAG,CAAC;AACrC,IAAI,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC;AACrC,GAAG;AACH,CAAC,CAAC,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../src/AppShell/AppShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,sBAAsB,
|
|
1
|
+
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../src/AppShell/AppShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,sBAAsB,EAEvB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAE1C,oBAAY,mBAAmB,GAAG,SAAS,CAAC,OAAO,SAAS,CAAC,CAAC;AAE9D,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,YAAY,CAAC,mBAAmB,CAAC,EAAE,sBAAsB,CAAC;IACvE,yGAAyG;IACzG,MAAM,CAAC,EAAE,SAAS,GAAG,KAAK,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U,EAAE;IAAE,OAAO,EAAE,OAAO,OAAO,CAAA;CAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"Aside.d.ts","sourceRoot":"","sources":["../../../src/AppShell/Aside/Aside.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAEL,4BAA4B,EAC7B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAE/D,MAAM,WAAW,UACf,SAAQ,4BAA4B,EAClC,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC;IACpC,oBAAoB;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,aAAK,cAAc,GAAG,8BAA8B,CAAC,UAAU,EAAE;IAAE,OAAO,EAAE,OAAO,OAAO,CAAA;CAAE,CAAC,CAAC;AAS9F,eAAO,MAAM,KAAK,EAAE,cAKZ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../../../src/AppShell/Footer/Footer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAmB,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAEjG,MAAM,WAAW,WACf,SAAQ,0BAA0B,EAChC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IACvC,qBAAqB;IACrB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;
|
|
1
|
+
{"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../../../src/AppShell/Footer/Footer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAmB,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAEjG,MAAM,WAAW,WACf,SAAQ,0BAA0B,EAChC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IACvC,qBAAqB;IACrB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAOD,eAAO,MAAM,MAAM,iFAGjB,CAAC"}
|