@mantine/core 5.8.4 → 5.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/Accordion/AccordionControl/AccordionControl.js +3 -18
- package/cjs/Accordion/AccordionControl/AccordionControl.js.map +1 -1
- package/cjs/Accordion/AccordionItem/AccordionItem.js +3 -2
- package/cjs/Accordion/AccordionItem/AccordionItem.js.map +1 -1
- package/cjs/Accordion/AccordionPanel/AccordionPanel.js +3 -2
- package/cjs/Accordion/AccordionPanel/AccordionPanel.js.map +1 -1
- package/cjs/AppShell/AppShell.context.js +5 -1
- package/cjs/AppShell/AppShell.context.js.map +1 -1
- package/cjs/AppShell/AppShell.js +5 -3
- package/cjs/AppShell/AppShell.js.map +1 -1
- package/cjs/AppShell/HorizontalSection/HorizontalSection.js +2 -1
- package/cjs/AppShell/HorizontalSection/HorizontalSection.js.map +1 -1
- package/cjs/AppShell/HorizontalSection/HorizontalSection.styles.js +4 -3
- package/cjs/AppShell/HorizontalSection/HorizontalSection.styles.js.map +1 -1
- package/cjs/AppShell/VerticalSection/VerticalSection.js +3 -1
- package/cjs/AppShell/VerticalSection/VerticalSection.js.map +1 -1
- package/cjs/AppShell/VerticalSection/VerticalSection.styles.js +3 -1
- package/cjs/AppShell/VerticalSection/VerticalSection.styles.js.map +1 -1
- package/cjs/Card/CardSection/CardSection.js +7 -2
- package/cjs/Card/CardSection/CardSection.js.map +1 -1
- package/cjs/ColorInput/ColorInput.js +41 -5
- package/cjs/ColorInput/ColorInput.js.map +1 -1
- package/cjs/ColorInput/EyeDropperIcon.js +68 -0
- package/cjs/ColorInput/EyeDropperIcon.js.map +1 -0
- package/cjs/FileInput/FileInput.js +1 -1
- package/cjs/FileInput/FileInput.js.map +1 -1
- package/cjs/FileInput/FileInput.styles.js +2 -4
- package/cjs/FileInput/FileInput.styles.js.map +1 -1
- package/cjs/Grid/Col/Col.js +8 -6
- package/cjs/Grid/Col/Col.js.map +1 -1
- package/cjs/Grid/Col/Col.styles.js +11 -2
- package/cjs/Grid/Col/Col.styles.js.map +1 -1
- package/cjs/Grid/Grid.context.js +2 -4
- package/cjs/Grid/Grid.context.js.map +1 -1
- package/cjs/Grid/Grid.js +33 -3
- package/cjs/Grid/Grid.js.map +1 -1
- package/cjs/Grid/Grid.styles.js +29 -3
- package/cjs/Grid/Grid.styles.js.map +1 -1
- package/cjs/HoverCard/HoverCardDropdown/HoverCardDropdown.js +4 -10
- package/cjs/HoverCard/HoverCardDropdown/HoverCardDropdown.js.map +1 -1
- package/cjs/HoverCard/HoverCardTarget/HoverCardTarget.js +6 -2
- package/cjs/HoverCard/HoverCardTarget/HoverCardTarget.js.map +1 -1
- package/cjs/Input/Input.js +2 -0
- package/cjs/Input/Input.js.map +1 -1
- package/cjs/Input/Input.styles.js +3 -5
- package/cjs/Input/Input.styles.js.map +1 -1
- package/cjs/Input/InputDescription/InputDescription.js +7 -3
- package/cjs/Input/InputDescription/InputDescription.js.map +1 -1
- package/cjs/Input/InputError/InputError.js +7 -3
- package/cjs/Input/InputError/InputError.js.map +1 -1
- package/cjs/Input/InputLabel/InputLabel.js +12 -7
- package/cjs/Input/InputLabel/InputLabel.js.map +1 -1
- package/cjs/Input/InputPlaceholder/InputPlaceholder.js +54 -0
- package/cjs/Input/InputPlaceholder/InputPlaceholder.js.map +1 -0
- package/cjs/List/List.context.js +3 -6
- package/cjs/List/List.context.js.map +1 -1
- package/cjs/List/List.js +1 -1
- package/cjs/List/List.js.map +1 -1
- package/cjs/List/ListItem/ListItem.js +6 -4
- package/cjs/List/ListItem/ListItem.js.map +1 -1
- package/cjs/Menu/MenuDivider/MenuDivider.js +6 -4
- package/cjs/Menu/MenuDivider/MenuDivider.js.map +1 -1
- package/cjs/Menu/MenuDropdown/MenuDropdown.js +4 -10
- package/cjs/Menu/MenuDropdown/MenuDropdown.js.map +1 -1
- package/cjs/Menu/MenuItem/MenuItem.js +3 -2
- package/cjs/Menu/MenuItem/MenuItem.js.map +1 -1
- package/cjs/Menu/MenuLabel/MenuLabel.js +6 -4
- package/cjs/Menu/MenuLabel/MenuLabel.js.map +1 -1
- package/cjs/Menu/MenuTarget/MenuTarget.js +6 -2
- package/cjs/Menu/MenuTarget/MenuTarget.js.map +1 -1
- package/cjs/PasswordInput/PasswordInput.styles.js +3 -5
- package/cjs/PasswordInput/PasswordInput.styles.js.map +1 -1
- package/cjs/Popover/PopoverDropdown/PopoverDropdown.js +5 -14
- package/cjs/Popover/PopoverDropdown/PopoverDropdown.js.map +1 -1
- package/cjs/Popover/PopoverTarget/PopoverTarget.js +6 -2
- package/cjs/Popover/PopoverTarget/PopoverTarget.js.map +1 -1
- package/cjs/Select/SelectRightSection/get-select-right-section-props.js.map +1 -1
- package/cjs/Slider/RangeSlider/RangeSlider.js +8 -0
- package/cjs/Slider/RangeSlider/RangeSlider.js.map +1 -1
- package/cjs/Stepper/Step/Step.js +20 -11
- package/cjs/Stepper/Step/Step.js.map +1 -1
- package/cjs/Stepper/Step/Step.styles.js +5 -1
- package/cjs/Stepper/Step/Step.styles.js.map +1 -1
- package/cjs/Stepper/Stepper.styles.js +5 -1
- package/cjs/Stepper/Stepper.styles.js.map +1 -1
- package/cjs/Tabs/Tab/Tab.js +3 -2
- package/cjs/Tabs/Tab/Tab.js.map +1 -1
- package/cjs/Tabs/TabsList/TabsList.js +6 -2
- package/cjs/Tabs/TabsList/TabsList.js.map +1 -1
- package/cjs/Tabs/TabsPanel/TabsPanel.js +3 -2
- package/cjs/Tabs/TabsPanel/TabsPanel.js.map +1 -1
- package/cjs/Timeline/TimelineItem/TimelineItem.js +19 -11
- package/cjs/Timeline/TimelineItem/TimelineItem.js.map +1 -1
- package/esm/Accordion/AccordionControl/AccordionControl.js +4 -19
- package/esm/Accordion/AccordionControl/AccordionControl.js.map +1 -1
- package/esm/Accordion/AccordionItem/AccordionItem.js +4 -3
- package/esm/Accordion/AccordionItem/AccordionItem.js.map +1 -1
- package/esm/Accordion/AccordionPanel/AccordionPanel.js +4 -3
- package/esm/Accordion/AccordionPanel/AccordionPanel.js.map +1 -1
- package/esm/AppShell/AppShell.context.js +5 -1
- package/esm/AppShell/AppShell.context.js.map +1 -1
- package/esm/AppShell/AppShell.js +5 -3
- package/esm/AppShell/AppShell.js.map +1 -1
- package/esm/AppShell/HorizontalSection/HorizontalSection.js +2 -1
- package/esm/AppShell/HorizontalSection/HorizontalSection.js.map +1 -1
- package/esm/AppShell/HorizontalSection/HorizontalSection.styles.js +4 -3
- package/esm/AppShell/HorizontalSection/HorizontalSection.styles.js.map +1 -1
- package/esm/AppShell/VerticalSection/VerticalSection.js +3 -1
- package/esm/AppShell/VerticalSection/VerticalSection.js.map +1 -1
- package/esm/AppShell/VerticalSection/VerticalSection.styles.js +3 -1
- package/esm/AppShell/VerticalSection/VerticalSection.styles.js.map +1 -1
- package/esm/Card/CardSection/CardSection.js +7 -2
- package/esm/Card/CardSection/CardSection.js.map +1 -1
- package/esm/ColorInput/ColorInput.js +42 -6
- package/esm/ColorInput/ColorInput.js.map +1 -1
- package/esm/ColorInput/EyeDropperIcon.js +60 -0
- package/esm/ColorInput/EyeDropperIcon.js.map +1 -0
- package/esm/FileInput/FileInput.js +1 -1
- package/esm/FileInput/FileInput.js.map +1 -1
- package/esm/FileInput/FileInput.styles.js +2 -4
- package/esm/FileInput/FileInput.styles.js.map +1 -1
- package/esm/Grid/Col/Col.js +8 -6
- package/esm/Grid/Col/Col.js.map +1 -1
- package/esm/Grid/Col/Col.styles.js +11 -2
- package/esm/Grid/Col/Col.styles.js.map +1 -1
- package/esm/Grid/Grid.context.js +2 -4
- package/esm/Grid/Grid.context.js.map +1 -1
- package/esm/Grid/Grid.js +33 -3
- package/esm/Grid/Grid.js.map +1 -1
- package/esm/Grid/Grid.styles.js +30 -4
- package/esm/Grid/Grid.styles.js.map +1 -1
- package/esm/HoverCard/HoverCardDropdown/HoverCardDropdown.js +4 -10
- package/esm/HoverCard/HoverCardDropdown/HoverCardDropdown.js.map +1 -1
- package/esm/HoverCard/HoverCardTarget/HoverCardTarget.js +6 -2
- package/esm/HoverCard/HoverCardTarget/HoverCardTarget.js.map +1 -1
- package/esm/Input/Input.js +2 -0
- package/esm/Input/Input.js.map +1 -1
- package/esm/Input/Input.styles.js +3 -5
- package/esm/Input/Input.styles.js.map +1 -1
- package/esm/Input/InputDescription/InputDescription.js +6 -2
- package/esm/Input/InputDescription/InputDescription.js.map +1 -1
- package/esm/Input/InputError/InputError.js +6 -2
- package/esm/Input/InputError/InputError.js.map +1 -1
- package/esm/Input/InputLabel/InputLabel.js +10 -5
- package/esm/Input/InputLabel/InputLabel.js.map +1 -1
- package/esm/Input/InputPlaceholder/InputPlaceholder.js +46 -0
- package/esm/Input/InputPlaceholder/InputPlaceholder.js.map +1 -0
- package/esm/List/List.context.js +3 -6
- package/esm/List/List.context.js.map +1 -1
- package/esm/List/List.js +2 -2
- package/esm/List/List.js.map +1 -1
- package/esm/List/ListItem/ListItem.js +8 -6
- package/esm/List/ListItem/ListItem.js.map +1 -1
- package/esm/Menu/MenuDivider/MenuDivider.js +8 -6
- package/esm/Menu/MenuDivider/MenuDivider.js.map +1 -1
- package/esm/Menu/MenuDropdown/MenuDropdown.js +4 -10
- package/esm/Menu/MenuDropdown/MenuDropdown.js.map +1 -1
- package/esm/Menu/MenuItem/MenuItem.js +4 -3
- package/esm/Menu/MenuItem/MenuItem.js.map +1 -1
- package/esm/Menu/MenuLabel/MenuLabel.js +8 -6
- package/esm/Menu/MenuLabel/MenuLabel.js.map +1 -1
- package/esm/Menu/MenuTarget/MenuTarget.js +6 -2
- package/esm/Menu/MenuTarget/MenuTarget.js.map +1 -1
- package/esm/PasswordInput/PasswordInput.styles.js +3 -5
- package/esm/PasswordInput/PasswordInput.styles.js.map +1 -1
- package/esm/Popover/PopoverDropdown/PopoverDropdown.js +6 -15
- package/esm/Popover/PopoverDropdown/PopoverDropdown.js.map +1 -1
- package/esm/Popover/PopoverTarget/PopoverTarget.js +7 -3
- package/esm/Popover/PopoverTarget/PopoverTarget.js.map +1 -1
- package/esm/Select/SelectRightSection/get-select-right-section-props.js.map +1 -1
- package/esm/Slider/RangeSlider/RangeSlider.js +8 -0
- package/esm/Slider/RangeSlider/RangeSlider.js.map +1 -1
- package/esm/Stepper/Step/Step.js +18 -9
- package/esm/Stepper/Step/Step.js.map +1 -1
- package/esm/Stepper/Step/Step.styles.js +5 -1
- package/esm/Stepper/Step/Step.styles.js.map +1 -1
- package/esm/Stepper/Stepper.styles.js +5 -1
- package/esm/Stepper/Stepper.styles.js.map +1 -1
- package/esm/Tabs/Tab/Tab.js +4 -3
- package/esm/Tabs/Tab/Tab.js.map +1 -1
- package/esm/Tabs/TabsList/TabsList.js +7 -3
- package/esm/Tabs/TabsList/TabsList.js.map +1 -1
- package/esm/Tabs/TabsPanel/TabsPanel.js +4 -3
- package/esm/Tabs/TabsPanel/TabsPanel.js.map +1 -1
- package/esm/Timeline/TimelineItem/TimelineItem.js +18 -10
- package/esm/Timeline/TimelineItem/TimelineItem.js.map +1 -1
- package/lib/Accordion/AccordionControl/AccordionControl.d.ts.map +1 -1
- package/lib/Accordion/AccordionItem/AccordionItem.d.ts.map +1 -1
- package/lib/Accordion/AccordionPanel/AccordionPanel.d.ts +1 -1
- package/lib/Accordion/AccordionPanel/AccordionPanel.d.ts.map +1 -1
- package/lib/AppShell/AppShell.context.d.ts +3 -2
- package/lib/AppShell/AppShell.context.d.ts.map +1 -1
- package/lib/AppShell/AppShell.d.ts +2 -0
- package/lib/AppShell/AppShell.d.ts.map +1 -1
- package/lib/AppShell/HorizontalSection/HorizontalSection.d.ts.map +1 -1
- package/lib/AppShell/HorizontalSection/HorizontalSection.styles.d.ts +1 -0
- package/lib/AppShell/HorizontalSection/HorizontalSection.styles.d.ts.map +1 -1
- package/lib/AppShell/VerticalSection/VerticalSection.d.ts.map +1 -1
- package/lib/AppShell/VerticalSection/VerticalSection.styles.d.ts +1 -0
- package/lib/AppShell/VerticalSection/VerticalSection.styles.d.ts.map +1 -1
- package/lib/Card/CardSection/CardSection.d.ts.map +1 -1
- package/lib/ColorInput/ColorInput.d.ts +4 -0
- package/lib/ColorInput/ColorInput.d.ts.map +1 -1
- package/lib/ColorInput/EyeDropperIcon.d.ts +5 -0
- package/lib/ColorInput/EyeDropperIcon.d.ts.map +1 -0
- package/lib/FileInput/FileInput.styles.d.ts.map +1 -1
- package/lib/Grid/Col/Col.d.ts.map +1 -1
- package/lib/Grid/Col/Col.styles.d.ts +7 -2
- package/lib/Grid/Col/Col.styles.d.ts.map +1 -1
- package/lib/Grid/Grid.context.d.ts +9 -3
- package/lib/Grid/Grid.context.d.ts.map +1 -1
- package/lib/Grid/Grid.d.ts +11 -1
- package/lib/Grid/Grid.d.ts.map +1 -1
- package/lib/Grid/Grid.styles.d.ts +7 -2
- package/lib/Grid/Grid.styles.d.ts.map +1 -1
- package/lib/HoverCard/HoverCardDropdown/HoverCardDropdown.d.ts +1 -1
- package/lib/HoverCard/HoverCardDropdown/HoverCardDropdown.d.ts.map +1 -1
- package/lib/HoverCard/HoverCardTarget/HoverCardTarget.d.ts.map +1 -1
- package/lib/InlineInput/InlineInput.styles.d.ts +2 -2
- package/lib/Input/Input.d.ts +4 -2
- package/lib/Input/Input.d.ts.map +1 -1
- package/lib/Input/Input.styles.d.ts +2 -2
- package/lib/Input/Input.styles.d.ts.map +1 -1
- package/lib/Input/InputDescription/InputDescription.d.ts.map +1 -1
- package/lib/Input/InputError/InputError.d.ts.map +1 -1
- package/lib/Input/InputLabel/InputLabel.d.ts.map +1 -1
- package/lib/Input/InputPlaceholder/InputPlaceholder.d.ts +6 -0
- package/lib/Input/InputPlaceholder/InputPlaceholder.d.ts.map +1 -0
- package/lib/List/List.context.d.ts +4 -2
- package/lib/List/List.context.d.ts.map +1 -1
- package/lib/List/ListItem/ListItem.d.ts +1 -4
- package/lib/List/ListItem/ListItem.d.ts.map +1 -1
- package/lib/Menu/Menu.d.ts +4 -4
- package/lib/Menu/Menu.d.ts.map +1 -1
- package/lib/Menu/MenuDivider/MenuDivider.d.ts +1 -4
- package/lib/Menu/MenuDivider/MenuDivider.d.ts.map +1 -1
- package/lib/Menu/MenuDropdown/MenuDropdown.d.ts +1 -1
- package/lib/Menu/MenuDropdown/MenuDropdown.d.ts.map +1 -1
- package/lib/Menu/MenuItem/MenuItem.d.ts.map +1 -1
- package/lib/Menu/MenuLabel/MenuLabel.d.ts +1 -4
- package/lib/Menu/MenuLabel/MenuLabel.d.ts.map +1 -1
- package/lib/Menu/MenuTarget/MenuTarget.d.ts.map +1 -1
- package/lib/NavLink/NavLink.styles.d.ts +2 -2
- package/lib/Notification/Notification.styles.d.ts +2 -2
- package/lib/PasswordInput/PasswordInput.styles.d.ts.map +1 -1
- package/lib/Popover/PopoverDropdown/PopoverDropdown.d.ts +1 -1
- package/lib/Popover/PopoverDropdown/PopoverDropdown.d.ts.map +1 -1
- package/lib/Popover/PopoverTarget/PopoverTarget.d.ts.map +1 -1
- package/lib/Select/SelectRightSection/get-select-right-section-props.d.ts +3 -3
- package/lib/Select/SelectRightSection/get-select-right-section-props.d.ts.map +1 -1
- package/lib/Slider/RangeSlider/RangeSlider.d.ts +2 -0
- package/lib/Slider/RangeSlider/RangeSlider.d.ts.map +1 -1
- package/lib/Stepper/Step/Step.d.ts.map +1 -1
- package/lib/Stepper/Step/Step.styles.d.ts.map +1 -1
- package/lib/Stepper/Stepper.styles.d.ts.map +1 -1
- package/lib/Tabs/Tab/Tab.d.ts.map +1 -1
- package/lib/Tabs/TabsList/TabsList.d.ts.map +1 -1
- package/lib/Tabs/TabsPanel/TabsPanel.d.ts.map +1 -1
- package/lib/Timeline/TimelineItem/TimelineItem.d.ts +1 -4
- package/lib/Timeline/TimelineItem/TimelineItem.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionItem.js","sources":["../../../src/Accordion/AccordionItem/AccordionItem.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport {
|
|
1
|
+
{"version":3,"file":"AccordionItem.js","sources":["../../../src/Accordion/AccordionItem/AccordionItem.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport {\n DefaultProps,\n Selectors,\n useContextStylesApi,\n useComponentDefaultProps,\n} from '@mantine/styles';\nimport { Box } from '../../Box';\nimport { AccordionItemContextProvider } from '../AccordionItem.context';\nimport useStyles from './AccordionItem.styles';\nimport { useAccordionContext } from '../Accordion.context';\n\nexport type AccordionItemStylesNames = Selectors<typeof useStyles>;\n\nexport interface AccordionItemProps\n extends DefaultProps<AccordionItemStylesNames>,\n React.ComponentPropsWithoutRef<'div'> {\n /** Value that is used to manage accordion state */\n value: string;\n}\n\nconst defaultProps: Partial<DefaultProps> = {};\n\nexport const AccordionItem = forwardRef<HTMLDivElement, AccordionItemProps>((props, ref) => {\n const { children, className, value, ...others } = useComponentDefaultProps(\n 'AccordionItem',\n defaultProps,\n props\n );\n\n const { classNames, styles, unstyled } = useContextStylesApi();\n const ctx = useAccordionContext();\n const { classes, cx } = useStyles(\n { variant: ctx.variant, radius: ctx.radius },\n { name: 'Accordion', classNames, styles, unstyled }\n );\n\n return (\n <AccordionItemContextProvider value={{ value }}>\n <Box\n ref={ref}\n className={cx(classes.item, className)}\n data-active={ctx.isItemActive(value) || undefined}\n {...others}\n >\n {children}\n </Box>\n </AccordionItemContextProvider>\n );\n});\n\nAccordionItem.displayName = '@mantine/core/AccordionItem';\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,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,KAAK,CAAC,IAAI,KAAK,CAAC;AACpD,GAAG,EAAE,MAAM,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;AACzB,CAAC,EAAE;AACH,aAAa,CAAC,WAAW,GAAG,6BAA6B;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useContextStylesApi } from '@mantine/styles';
|
|
2
|
+
import { useComponentDefaultProps, useContextStylesApi } from '@mantine/styles';
|
|
3
3
|
import { useAccordionContext } from '../Accordion.context.js';
|
|
4
4
|
import { useAccordionItemContext } from '../AccordionItem.context.js';
|
|
5
5
|
import useStyles from './AccordionPanel.styles.js';
|
|
@@ -36,8 +36,9 @@ var __objRest = (source, exclude) => {
|
|
|
36
36
|
}
|
|
37
37
|
return target;
|
|
38
38
|
};
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
const defaultProps = {};
|
|
40
|
+
function AccordionPanel(props) {
|
|
41
|
+
const _a = useComponentDefaultProps("AccordionPanel", defaultProps, props), { children, className } = _a, others = __objRest(_a, ["children", "className"]);
|
|
41
42
|
const ctx = useAccordionContext();
|
|
42
43
|
const { value } = useAccordionItemContext();
|
|
43
44
|
const { classNames, styles, unstyled } = useContextStylesApi();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionPanel.js","sources":["../../../src/Accordion/AccordionPanel/AccordionPanel.tsx"],"sourcesContent":["import React from 'react';\nimport {
|
|
1
|
+
{"version":3,"file":"AccordionPanel.js","sources":["../../../src/Accordion/AccordionPanel/AccordionPanel.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Selectors,\n DefaultProps,\n useContextStylesApi,\n useComponentDefaultProps,\n} from '@mantine/styles';\nimport { Collapse } from '../../Collapse';\nimport { useAccordionContext } from '../Accordion.context';\nimport { useAccordionItemContext } from '../AccordionItem.context';\nimport useStyles from './AccordionPanel.styles';\n\nexport type AccordionPanelStylesNames = Selectors<typeof useStyles>;\n\nexport interface AccordionPanelProps\n extends DefaultProps,\n Omit<React.ComponentPropsWithoutRef<'div'>, 'onTransitionEnd'> {\n /** Panel content */\n children?: React.ReactNode;\n}\n\nconst defaultProps: Partial<AccordionPanelProps> = {};\n\nexport function AccordionPanel(props: AccordionPanelProps) {\n const { children, className, ...others } = useComponentDefaultProps(\n 'AccordionPanel',\n defaultProps,\n props\n );\n\n const ctx = useAccordionContext();\n const { value } = useAccordionItemContext();\n const { classNames, styles, unstyled } = useContextStylesApi();\n const { classes, cx } = useStyles(\n { variant: ctx.variant, radius: ctx.radius },\n { name: 'Accordion', classNames, styles, unstyled }\n );\n\n return (\n <Collapse\n {...others}\n className={cx(classes.panel, className)}\n in={ctx.isItemActive(value)}\n transitionDuration={ctx.transitionDuration}\n role=\"region\"\n id={ctx.getRegionId(value)}\n aria-labelledby={ctx.getControlId(value)}\n >\n <div className={classes.content}>{children}</div>\n </Collapse>\n );\n}\n\nAccordionPanel.displayName = '@mantine/core/AccordionPanel';\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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,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC;AAC9B,IAAI,iBAAiB,EAAE,GAAG,CAAC,YAAY,CAAC,KAAK,CAAC;AAC9C,GAAG,CAAC,kBAAkB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE;AACjD,IAAI,SAAS,EAAE,OAAO,CAAC,OAAO;AAC9B,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;AAChB,CAAC;AACD,cAAc,CAAC,WAAW,GAAG,8BAA8B;;;;"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { createContext, useContext } from 'react';
|
|
2
2
|
|
|
3
|
-
const AppShellContext = createContext({
|
|
3
|
+
const AppShellContext = createContext({
|
|
4
|
+
zIndex: 1e3,
|
|
5
|
+
fixed: false,
|
|
6
|
+
layout: "default"
|
|
7
|
+
});
|
|
4
8
|
const AppShellProvider = AppShellContext.Provider;
|
|
5
9
|
function useAppShellContext() {
|
|
6
10
|
return useContext(AppShellContext);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.context.js","sources":["../../src/AppShell/AppShell.context.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\n\ninterface AppShellContextValue {\n zIndex
|
|
1
|
+
{"version":3,"file":"AppShell.context.js","sources":["../../src/AppShell/AppShell.context.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\n\ninterface AppShellContextValue {\n zIndex: React.CSSProperties['zIndex'];\n fixed: boolean;\n layout: 'default' | 'alt';\n}\n\nconst AppShellContext = createContext<AppShellContextValue>({\n zIndex: 1000,\n fixed: false,\n layout: 'default',\n});\n\nexport const AppShellProvider = AppShellContext.Provider;\n\nexport function useAppShellContext() {\n return useContext(AppShellContext);\n}\n"],"names":[],"mappings":";;AACA,MAAM,eAAe,GAAG,aAAa,CAAC;AACtC,EAAE,MAAM,EAAE,GAAG;AACb,EAAE,KAAK,EAAE,KAAK;AACd,EAAE,MAAM,EAAE,SAAS;AACnB,CAAC,CAAC,CAAC;AACS,MAAC,gBAAgB,GAAG,eAAe,CAAC,SAAS;AAClD,SAAS,kBAAkB,GAAG;AACrC,EAAE,OAAO,UAAU,CAAC,eAAe,CAAC,CAAC;AACrC;;;;"}
|
package/esm/AppShell/AppShell.js
CHANGED
|
@@ -53,7 +53,8 @@ const AppShell = forwardRef((props, ref) => {
|
|
|
53
53
|
styles,
|
|
54
54
|
classNames,
|
|
55
55
|
unstyled,
|
|
56
|
-
hidden
|
|
56
|
+
hidden,
|
|
57
|
+
layout
|
|
57
58
|
} = _a, others = __objRest(_a, [
|
|
58
59
|
"children",
|
|
59
60
|
"navbar",
|
|
@@ -69,14 +70,15 @@ const AppShell = forwardRef((props, ref) => {
|
|
|
69
70
|
"styles",
|
|
70
71
|
"classNames",
|
|
71
72
|
"unstyled",
|
|
72
|
-
"hidden"
|
|
73
|
+
"hidden",
|
|
74
|
+
"layout"
|
|
73
75
|
]);
|
|
74
76
|
const { classes, cx } = useStyles({ padding, fixed, navbarOffsetBreakpoint, asideOffsetBreakpoint }, { styles, classNames, unstyled, name: "AppShell" });
|
|
75
77
|
if (hidden) {
|
|
76
78
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, children);
|
|
77
79
|
}
|
|
78
80
|
return /* @__PURE__ */ React.createElement(AppShellProvider, {
|
|
79
|
-
value: { fixed, zIndex }
|
|
81
|
+
value: { fixed, zIndex, layout }
|
|
80
82
|
}, /* @__PURE__ */ React.createElement(Box, __spreadValues({
|
|
81
83
|
className: cx(classes.root, className),
|
|
82
84
|
ref
|
|
@@ -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 getDefaultZIndex,\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 /** <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 zIndex: getDefaultZIndex('app'),\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 ...others\n } = useComponentDefaultProps('AppShell', defaultProps, props);\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 }}>\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":";;;;;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I,QAAQ;AACZ,IAAI,QAAQ;AACZ,IAAI,OAAO;AACX,IAAI,OAAO;AACX,IAAI,QAAQ;AACZ,IAAI,SAAS;AACb,IAAI,wBAAwB;AAC5B,IAAI,uBAAuB;AAC3B,IAAI,WAAW;AACf,IAAI,QAAQ;AACZ,IAAI,YAAY;AAChB,IAAI,UAAU;AACd,IAAI,QAAQ;AACZ,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,SAAS,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;AAC3J,EAAE,IAAI,MAAM,EAAE;AACd,IAAI,uBAAuB,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC/E,GAAG;AACH,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,gBAAgB,EAAE;AAC/D,IAAI,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;
|
|
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 getDefaultZIndex,\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 zIndex: getDefaultZIndex('app'),\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,SAAS,CAAC,cAAc,CAAC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oint,
|
|
77
77
|
zIndex: ctx.zIndex || zIndex,
|
|
78
78
|
section,
|
|
79
|
-
withBorder
|
|
79
|
+
withBorder,
|
|
80
|
+
layout: ctx.layout
|
|
80
81
|
}, { classNames, styles, name: __staticSelector, unstyled });
|
|
81
82
|
const breakpoints = getSortedBreakpoints(width, theme).reduce((acc, [breakpoint, breakpointSize]) => {
|
|
82
83
|
acc[`@media (min-width: ${breakpoint}px)`] = {
|
|
@@ -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 /** 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 = getDefaultZIndex('app'),\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: ctx.zIndex || zIndex,\n section,\n withBorder,\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,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,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AAG,iCAAiC;;;;"}
|
|
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 /** 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 = getDefaultZIndex('app'),\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: ctx.zIndex || zIndex,\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,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;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= typeof width === "object" && width !== null ? getSortedBreakpoints(width, theme).reduce((acc, [breakpoint, breakpointSize]) => {
|
|
34
35
|
acc[`@media (min-width: ${breakpoint}px)`] = {
|
|
@@ -42,10 +43,10 @@ var useStyles = createStyles((theme, {
|
|
|
42
43
|
} : {};
|
|
43
44
|
return {
|
|
44
45
|
root: __spreadProps(__spreadValues(__spreadValues(__spreadProps(__spreadValues(__spreadValues({}, theme.fn.fontStyles()), position), {
|
|
45
|
-
top: (position == null ? void 0 : position.top) || "var(--mantine-header-height)",
|
|
46
|
+
top: layout === "alt" ? 0 : (position == null ? void 0 : position.top) || "var(--mantine-header-height)",
|
|
46
47
|
bottom: 0,
|
|
47
48
|
zIndex,
|
|
48
|
-
height: height || "calc(100vh - var(--mantine-header-height, 0px) - var(--mantine-footer-height, 0px))",
|
|
49
|
+
height: height || (layout === "alt" ? "auto" : "calc(100vh - var(--mantine-header-height, 0px) - var(--mantine-footer-height, 0px))"),
|
|
49
50
|
width: (width == null ? void 0 : width.base) || "100%",
|
|
50
51
|
position: fixed ? "fixed" : "static",
|
|
51
52
|
boxSizing: "border-box",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HorizontalSection.styles.js","sources":["../../../src/AppShell/HorizontalSection/HorizontalSection.styles.ts"],"sourcesContent":["import { createStyles, MantineNumberSize } from '@mantine/styles';\nimport { getSortedBreakpoints } from './get-sorted-breakpoints/get-sorted-breakpoints';\n\nexport type HorizontalSectionWidth = Partial<Record<string, string | number>>;\n\nexport interface HorizontalSectionPosition {\n top?: number;\n left?: number;\n bottom?: number;\n right?: number;\n}\n\ninterface HorizontalSectionStyles {\n width: Partial<Record<string, string | number>>;\n height: string | number;\n position: HorizontalSectionPosition;\n hiddenBreakpoint: MantineNumberSize;\n fixed: boolean;\n zIndex: React.CSSProperties['zIndex'];\n section: 'navbar' | 'aside';\n withBorder: boolean;\n}\n\nexport default createStyles(\n (\n theme,\n {\n height,\n width,\n fixed,\n position,\n hiddenBreakpoint,\n zIndex,\n section,\n withBorder,\n }: HorizontalSectionStyles\n ) => {\n const breakpoints =\n typeof width === 'object' && width !== null\n ? getSortedBreakpoints(width, theme).reduce((acc, [breakpoint, breakpointSize]) => {\n acc[`@media (min-width: ${breakpoint}px)`] = {\n width: breakpointSize,\n minWidth: breakpointSize,\n };\n\n return acc;\n }, {})\n : null;\n\n const borderStyles = withBorder\n ? {\n [section === 'navbar' ? 'borderRight' : 'borderLeft']: `1px solid ${\n theme.colorScheme === 'dark' ? theme.colors.dark[5] : theme.colors.gray[2]\n }`,\n }\n : {};\n\n return {\n root: {\n ...theme.fn.fontStyles(),\n ...position,\n top: position?.top || 'var(--mantine-header-height)',\n bottom: 0,\n zIndex,\n height:\n height ||\n 'calc(100vh - var(--mantine-header-height, 0px) - var(--mantine-footer-height, 0px))',\n width: width?.base || '100%',\n position: fixed ? 'fixed' : 'static',\n boxSizing: 'border-box',\n display: 'flex',\n flexDirection: 'column',\n backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[7] : theme.white,\n ...borderStyles,\n ...breakpoints,\n\n '&[data-hidden]': {\n [`@media (max-width: ${\n theme.fn.size({\n size: hiddenBreakpoint,\n sizes: theme.breakpoints,\n }) - 1\n }px)`]: {\n display: 'none',\n },\n },\n },\n };\n }\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,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GAAG,EAAE,CAAC,UAAU,EAAE,cAAc,CAAC,KAAK;AACrJ,IAAI,GAAG,CAAC,CAAC,mBAAmB,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG;AACjD,MAAM,KAAK,EAAE,cAAc;AAC3B,MAAM,QAAQ,EAAE,cAAc;AAC9B,KAAK,CAAC;AACN,IAAI,OAAO,GAAG,CAAC;AACf,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC;AAChB,EAAE,MAAM,YAAY,GAAG,UAAU,GAAG;AACpC,IAAI,CAAC,OAAO,KAAK,QAAQ,GAAG,aAAa,GAAG,YAAY,GAAG,CAAC,UAAU,EAAE,KAAK,CAAC,WAAW,KAAK,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACpJ,GAAG,GAAG,EAAE,CAAC;AACT,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,aAAa,CAAC,cAAc,CAAC,cAAc,CAAC,aAAa,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC,EAAE,QAAQ,CAAC,EAAE;AACzI,MAAM,GAAG,EAAE,CAAC,QAAQ,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,QAAQ,CAAC,GAAG,KAAK,8BAA8B;
|
|
1
|
+
{"version":3,"file":"HorizontalSection.styles.js","sources":["../../../src/AppShell/HorizontalSection/HorizontalSection.styles.ts"],"sourcesContent":["import { createStyles, MantineNumberSize } from '@mantine/styles';\nimport { getSortedBreakpoints } from './get-sorted-breakpoints/get-sorted-breakpoints';\n\nexport type HorizontalSectionWidth = Partial<Record<string, string | number>>;\n\nexport interface HorizontalSectionPosition {\n top?: number;\n left?: number;\n bottom?: number;\n right?: number;\n}\n\ninterface HorizontalSectionStyles {\n width: Partial<Record<string, string | number>>;\n height: string | number;\n position: HorizontalSectionPosition;\n hiddenBreakpoint: MantineNumberSize;\n fixed: boolean;\n zIndex: React.CSSProperties['zIndex'];\n section: 'navbar' | 'aside';\n layout: 'default' | 'alt';\n withBorder: boolean;\n}\n\nexport default createStyles(\n (\n theme,\n {\n height,\n width,\n fixed,\n position,\n hiddenBreakpoint,\n zIndex,\n section,\n withBorder,\n layout,\n }: HorizontalSectionStyles\n ) => {\n const breakpoints =\n typeof width === 'object' && width !== null\n ? getSortedBreakpoints(width, theme).reduce((acc, [breakpoint, breakpointSize]) => {\n acc[`@media (min-width: ${breakpoint}px)`] = {\n width: breakpointSize,\n minWidth: breakpointSize,\n };\n\n return acc;\n }, {})\n : null;\n\n const borderStyles = withBorder\n ? {\n [section === 'navbar' ? 'borderRight' : 'borderLeft']: `1px solid ${\n theme.colorScheme === 'dark' ? theme.colors.dark[5] : theme.colors.gray[2]\n }`,\n }\n : {};\n\n return {\n root: {\n ...theme.fn.fontStyles(),\n ...position,\n top: layout === 'alt' ? 0 : position?.top || 'var(--mantine-header-height)',\n bottom: 0,\n zIndex,\n height:\n height ||\n (layout === 'alt'\n ? 'auto'\n : 'calc(100vh - var(--mantine-header-height, 0px) - var(--mantine-footer-height, 0px))'),\n width: width?.base || '100%',\n position: fixed ? 'fixed' : 'static',\n boxSizing: 'border-box',\n display: 'flex',\n flexDirection: 'column',\n backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[7] : theme.white,\n ...borderStyles,\n ...breakpoints,\n\n '&[data-hidden]': {\n [`@media (max-width: ${\n theme.fn.size({\n size: hiddenBreakpoint,\n sizes: theme.breakpoints,\n }) - 1\n }px)`]: {\n display: 'none',\n },\n },\n },\n };\n }\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,m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AACf,MAAM,MAAM;AACZ,MAAM,MAAM,EAAE,MAAM,KAAK,MAAM,KAAK,KAAK,GAAG,MAAM,GAAG,qFAAqF,CAAC;AAC3I,MAAM,KAAK,EAAE,CAAC,KAAK,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,KAAK,MAAM;AAC5D,MAAM,QAAQ,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ;AAC1C,MAAM,SAAS,EAAE,YAAY;AAC7B,MAAM,OAAO,EAAE,MAAM;AACrB,MAAM,aAAa,EAAE,QAAQ;AAC7B,MAAM,eAAe,EAAE,KAAK,CAAC,WAAW,KAAK,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK;AACxF,KAAK,CAAC,EAAE,YAAY,CAAC,EAAE,WAAW,CAAC,EAAE;AACrC,MAAM,gBAAgB,EAAE;AACxB,QAAQ,CAAC,CAAC,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC;AAC7C,UAAU,IAAI,EAAE,gBAAgB;AAChC,UAAU,KAAK,EAAE,KAAK,CAAC,WAAW;AAClC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG;AACtB,UAAU,OAAO,EAAE,MAAM;AACzB,SAAS;AACT,OAAO;AACP,KAAK,CAAC;AACN,GAAG,CAAC;AACJ,CAAC,CAAC;;;;"}
|
|
@@ -62,11 +62,13 @@ const VerticalSection = forwardRef((_a, ref) => {
|
|
|
62
62
|
"__staticSelector"
|
|
63
63
|
]);
|
|
64
64
|
const ctx = useAppShellContext();
|
|
65
|
+
const _zIndex = ctx.zIndex || zIndex;
|
|
65
66
|
const { classes, cx, theme } = useStyles({
|
|
66
67
|
height,
|
|
67
68
|
fixed: ctx.fixed || fixed,
|
|
68
69
|
position,
|
|
69
|
-
zIndex: ctx.
|
|
70
|
+
zIndex: typeof _zIndex === "number" && ctx.layout === "default" ? _zIndex + 1 : _zIndex,
|
|
71
|
+
layout: ctx.layout,
|
|
70
72
|
borderPosition: withBorder ? section === "header" ? "bottom" : "top" : "none"
|
|
71
73
|
}, { name: __staticSelector, classNames, styles, unstyled });
|
|
72
74
|
const breakpoints = typeof height === "object" && height !== null ? getSortedBreakpoints(height, theme).reduce((acc, [breakpoint, breakpointSize]) => {
|
|
@@ -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 /** 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 = getDefaultZIndex('app'),\n section,\n unstyled,\n __staticSelector,\n ...others\n }: VerticalSectionProps,\n ref\n ) => {\n const ctx = useAppShellContext();\n\n const { classes, cx, theme } = useStyles(\n {\n height,\n fixed: ctx.fixed || fixed,\n position,\n zIndex: ctx.
|
|
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 /** 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 = getDefaultZIndex('app'),\n section,\n unstyled,\n __staticSelector,\n ...others\n }: VerticalSectionProps,\n ref\n ) => {\n const ctx = useAppShellContext();\n const _zIndex = ctx.zIndex || zIndex;\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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AI,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;;;;"}
|
|
@@ -20,7 +20,7 @@ var __spreadValues = (a, b) => {
|
|
|
20
20
|
return a;
|
|
21
21
|
};
|
|
22
22
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
-
var useStyles = createStyles((theme, { height, fixed, position, zIndex, borderPosition }) => {
|
|
23
|
+
var useStyles = createStyles((theme, { height, fixed, position, zIndex, borderPosition, layout }) => {
|
|
24
24
|
const breakpoints = typeof height === "object" && height !== null ? getSortedBreakpoints(height, theme).reduce((acc, [breakpoint, breakpointSize]) => {
|
|
25
25
|
acc[`@media (min-width: ${breakpoint}px)`] = {
|
|
26
26
|
height: breakpointSize,
|
|
@@ -31,6 +31,8 @@ var useStyles = createStyles((theme, { height, fixed, position, zIndex, borderPo
|
|
|
31
31
|
return {
|
|
32
32
|
root: __spreadProps(__spreadValues(__spreadProps(__spreadValues(__spreadValues({}, theme.fn.fontStyles()), position), {
|
|
33
33
|
zIndex,
|
|
34
|
+
left: layout === "alt" ? "var(--mantine-navbar-width, 0)" : 0,
|
|
35
|
+
right: layout === "alt" ? "var(--mantine-aside-width, 0)" : 0,
|
|
34
36
|
height: typeof height === "object" ? (height == null ? void 0 : height.base) || "100%" : height,
|
|
35
37
|
maxHeight: typeof height === "object" ? (height == null ? void 0 : height.base) || "100%" : height,
|
|
36
38
|
position: fixed ? "fixed" : "static",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerticalSection.styles.js","sources":["../../../src/AppShell/VerticalSection/VerticalSection.styles.ts"],"sourcesContent":["import { createStyles } from '@mantine/styles';\nimport { getSortedBreakpoints } from '../HorizontalSection/get-sorted-breakpoints/get-sorted-breakpoints';\n\nexport type VerticalSectionHeight = number | string | Partial<Record<string, string | number>>;\n\nexport interface VerticalSectionPosition {\n top?: number;\n left?: number;\n bottom?: number;\n right?: number;\n}\n\ninterface VerticalSectionStyles {\n height: VerticalSectionHeight;\n fixed: boolean;\n position: VerticalSectionPosition;\n zIndex: React.CSSProperties['zIndex'];\n borderPosition: 'top' | 'bottom' | 'none';\n}\n\nexport default createStyles(\n (theme, { height, fixed, position, zIndex, borderPosition }: VerticalSectionStyles) => {\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 height: breakpointSize,\n minHeight: breakpointSize,\n };\n\n return acc;\n }, {})\n : null;\n return {\n root: {\n ...theme.fn.fontStyles(),\n ...position,\n zIndex,\n height: typeof height === 'object' ? height?.base || '100%' : height,\n maxHeight: typeof height === 'object' ? height?.base || '100%' : height,\n position: fixed ? 'fixed' : 'static',\n boxSizing: 'border-box',\n backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[7] : theme.white,\n ...breakpoints,\n borderBottom:\n borderPosition === 'bottom'\n ? `1px solid ${\n theme.colorScheme === 'dark' ? theme.colors.dark[5] : theme.colors.gray[2]\n }`\n : undefined,\n borderTop:\n borderPosition === 'top'\n ? `1px solid ${\n theme.colorScheme === 'dark' ? theme.colors.dark[5] : theme.colors.gray[2]\n }`\n : undefined,\n },\n };\n }\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,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,aAAa,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,UAAU,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;AAGlE,gBAAe,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK;
|
|
1
|
+
{"version":3,"file":"VerticalSection.styles.js","sources":["../../../src/AppShell/VerticalSection/VerticalSection.styles.ts"],"sourcesContent":["import { createStyles } from '@mantine/styles';\nimport { getSortedBreakpoints } from '../HorizontalSection/get-sorted-breakpoints/get-sorted-breakpoints';\n\nexport type VerticalSectionHeight = number | string | Partial<Record<string, string | number>>;\n\nexport interface VerticalSectionPosition {\n top?: number;\n left?: number;\n bottom?: number;\n right?: number;\n}\n\ninterface VerticalSectionStyles {\n height: VerticalSectionHeight;\n fixed: boolean;\n position: VerticalSectionPosition;\n zIndex: React.CSSProperties['zIndex'];\n borderPosition: 'top' | 'bottom' | 'none';\n layout: 'default' | 'alt';\n}\n\nexport default createStyles(\n (theme, { height, fixed, position, zIndex, borderPosition, layout }: VerticalSectionStyles) => {\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 height: breakpointSize,\n minHeight: breakpointSize,\n };\n\n return acc;\n }, {})\n : null;\n return {\n root: {\n ...theme.fn.fontStyles(),\n ...position,\n zIndex,\n left: layout === 'alt' ? 'var(--mantine-navbar-width, 0)' : 0,\n right: layout === 'alt' ? 'var(--mantine-aside-width, 0)' : 0,\n height: typeof height === 'object' ? height?.base || '100%' : height,\n maxHeight: typeof height === 'object' ? height?.base || '100%' : height,\n position: fixed ? 'fixed' : 'static',\n boxSizing: 'border-box',\n backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[7] : theme.white,\n ...breakpoints,\n borderBottom:\n borderPosition === 'bottom'\n ? `1px solid ${\n theme.colorScheme === 'dark' ? theme.colors.dark[5] : theme.colors.gray[2]\n }`\n : undefined,\n borderTop:\n borderPosition === 'top'\n ? `1px solid ${\n theme.colorScheme === 'dark' ? theme.colors.dark[5] : theme.colors.gray[2]\n }`\n : undefined,\n },\n };\n }\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,KAA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AM,SAAS,EAAE,cAAc,KAAK,KAAK,GAAG,CAAC,UAAU,EAAE,KAAK,CAAC,WAAW,KAAK,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;AAC9I,KAAK,CAAC;AACN,GAAG,CAAC;AACJ,CAAC,CAAC;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
|
+
import { useComponentDefaultProps } from '@mantine/styles';
|
|
2
3
|
import { createPolymorphicComponent } from '@mantine/utils';
|
|
3
4
|
import { useCardPadding } from '../Card.context.js';
|
|
4
5
|
import useStyles from './CardSection.styles.js';
|
|
@@ -32,8 +33,12 @@ var __objRest = (source, exclude) => {
|
|
|
32
33
|
}
|
|
33
34
|
return target;
|
|
34
35
|
};
|
|
35
|
-
const
|
|
36
|
-
|
|
36
|
+
const defaultProps = {
|
|
37
|
+
withBorder: false,
|
|
38
|
+
inheritPadding: false
|
|
39
|
+
};
|
|
40
|
+
const _CardSection = forwardRef((props, ref) => {
|
|
41
|
+
const _a = useComponentDefaultProps("CardSection", defaultProps, props), { className, withBorder, inheritPadding, unstyled } = _a, others = __objRest(_a, ["className", "withBorder", "inheritPadding", "unstyled"]);
|
|
37
42
|
const { classes, cx } = useStyles({ padding: useCardPadding(), withBorder, inheritPadding }, { name: "Card", unstyled });
|
|
38
43
|
return /* @__PURE__ */ React.createElement(Box, __spreadValues({
|
|
39
44
|
className: cx(classes.cardSection, className),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardSection.js","sources":["../../../src/Card/CardSection/CardSection.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { DefaultProps } from '@mantine/styles';\nimport { createPolymorphicComponent } from '@mantine/utils';\nimport { useCardPadding } from '../Card.context';\nimport { Box } from '../../Box';\nimport useStyles from './CardSection.styles';\n\nexport interface CardSectionProps extends DefaultProps {\n /** Determines whether section should have border */\n withBorder?: boolean;\n\n /** Determines whether section from inherit padding from Card */\n inheritPadding?: boolean;\n}\n\nexport const _CardSection = forwardRef<HTMLDivElement, CardSectionProps>(\n
|
|
1
|
+
{"version":3,"file":"CardSection.js","sources":["../../../src/Card/CardSection/CardSection.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { DefaultProps, useComponentDefaultProps } from '@mantine/styles';\nimport { createPolymorphicComponent } from '@mantine/utils';\nimport { useCardPadding } from '../Card.context';\nimport { Box } from '../../Box';\nimport useStyles from './CardSection.styles';\n\nexport interface CardSectionProps extends DefaultProps {\n /** Determines whether section should have border */\n withBorder?: boolean;\n\n /** Determines whether section from inherit padding from Card */\n inheritPadding?: boolean;\n}\n\nconst defaultProps: Partial<CardSectionProps> = {\n withBorder: false,\n inheritPadding: false,\n};\n\nexport const _CardSection = forwardRef<HTMLDivElement, CardSectionProps>((props, ref) => {\n const { className, withBorder, inheritPadding, unstyled, ...others } = useComponentDefaultProps(\n 'CardSection',\n defaultProps,\n props\n );\n\n const { classes, cx } = useStyles(\n { padding: useCardPadding(), withBorder, inheritPadding },\n { name: 'Card', unstyled }\n );\n\n return <Box className={cx(classes.cardSection, className)} ref={ref} {...others} />;\n});\n\n_CardSection.displayName = '@mantine/core/CardSection';\n\nexport const CardSection = createPolymorphicComponent<'div', CardSectionProps>(_CardSection);\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,S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'react';
|
|
2
|
-
import { useUncontrolled, useDidUpdate } from '@mantine/hooks';
|
|
2
|
+
import { useUncontrolled, useEyeDropper, useDidUpdate } from '@mantine/hooks';
|
|
3
3
|
import { getDefaultZIndex, useMantineTheme } from '@mantine/styles';
|
|
4
|
+
import { noop } from '@mantine/utils';
|
|
4
5
|
import { ColorPicker } from '../ColorPicker/ColorPicker.js';
|
|
6
|
+
import { EyeDropperIcon } from './EyeDropperIcon.js';
|
|
5
7
|
import { useInputProps } from '../Input/use-input-props.js';
|
|
6
|
-
import {
|
|
8
|
+
import { ActionIcon } from '../ActionIcon/ActionIcon.js';
|
|
7
9
|
import { convertHsvaTo } from '../ColorPicker/converters/converters.js';
|
|
10
|
+
import { parseColor, isColorValid } from '../ColorPicker/converters/parsers.js';
|
|
8
11
|
import { Input } from '../Input/Input.js';
|
|
9
12
|
import { Popover } from '../Popover/Popover.js';
|
|
10
13
|
import { ColorSwatch } from '../ColorSwatch/ColorSwatch.js';
|
|
@@ -47,6 +50,20 @@ const SWATCH_SIZES = {
|
|
|
47
50
|
lg: 28,
|
|
48
51
|
xl: 36
|
|
49
52
|
};
|
|
53
|
+
const EYE_DROPPER_SIZES = {
|
|
54
|
+
xs: 14,
|
|
55
|
+
sm: 16,
|
|
56
|
+
md: 18,
|
|
57
|
+
lg: 20,
|
|
58
|
+
xl: 22
|
|
59
|
+
};
|
|
60
|
+
const RIGHT_SECTION_WIDTH = {
|
|
61
|
+
xs: 28,
|
|
62
|
+
sm: 32,
|
|
63
|
+
md: 38,
|
|
64
|
+
lg: 44,
|
|
65
|
+
xl: 58
|
|
66
|
+
};
|
|
50
67
|
const defaultProps = {
|
|
51
68
|
size: "sm",
|
|
52
69
|
format: "hex",
|
|
@@ -58,7 +75,8 @@ const defaultProps = {
|
|
|
58
75
|
dropdownZIndex: getDefaultZIndex("popover"),
|
|
59
76
|
transitionDuration: 0,
|
|
60
77
|
withinPortal: true,
|
|
61
|
-
shadow: "md"
|
|
78
|
+
shadow: "md",
|
|
79
|
+
withEyeDropper: false
|
|
62
80
|
};
|
|
63
81
|
const ColorInput = forwardRef((props, ref) => {
|
|
64
82
|
const _a = useInputProps("ColorInput", defaultProps, props), {
|
|
@@ -87,7 +105,11 @@ const ColorInput = forwardRef((props, ref) => {
|
|
|
87
105
|
classNames,
|
|
88
106
|
styles,
|
|
89
107
|
unstyled,
|
|
90
|
-
readOnly
|
|
108
|
+
readOnly,
|
|
109
|
+
withEyeDropper,
|
|
110
|
+
eyeDropperIcon,
|
|
111
|
+
rightSection,
|
|
112
|
+
rightSectionWidth
|
|
91
113
|
} = _a, others = __objRest(_a, [
|
|
92
114
|
"wrapperProps",
|
|
93
115
|
"inputProps",
|
|
@@ -114,7 +136,11 @@ const ColorInput = forwardRef((props, ref) => {
|
|
|
114
136
|
"classNames",
|
|
115
137
|
"styles",
|
|
116
138
|
"unstyled",
|
|
117
|
-
"readOnly"
|
|
139
|
+
"readOnly",
|
|
140
|
+
"withEyeDropper",
|
|
141
|
+
"eyeDropperIcon",
|
|
142
|
+
"rightSection",
|
|
143
|
+
"rightSectionWidth"
|
|
118
144
|
]);
|
|
119
145
|
const theme = useMantineTheme();
|
|
120
146
|
const [dropdownOpened, setDropdownOpened] = useState(false);
|
|
@@ -125,6 +151,14 @@ const ColorInput = forwardRef((props, ref) => {
|
|
|
125
151
|
finalValue: "",
|
|
126
152
|
onChange
|
|
127
153
|
});
|
|
154
|
+
const { supported: eyeDropperSupported, open: openEyeDropper } = useEyeDropper();
|
|
155
|
+
const eyeDropper = /* @__PURE__ */ React.createElement(ActionIcon, {
|
|
156
|
+
sx: { color: theme.colorScheme === "dark" ? theme.colors.dark[0] : theme.black },
|
|
157
|
+
size: inputProps.size,
|
|
158
|
+
onClick: () => openEyeDropper().then(({ sRGBHex }) => setValue(convertHsvaTo(format, parseColor(sRGBHex)))).catch(noop)
|
|
159
|
+
}, eyeDropperIcon || /* @__PURE__ */ React.createElement(EyeDropperIcon, {
|
|
160
|
+
size: theme.fn.size({ size: inputProps.size, sizes: EYE_DROPPER_SIZES })
|
|
161
|
+
}));
|
|
128
162
|
const handleInputFocus = (event) => {
|
|
129
163
|
typeof onFocus === "function" && onFocus(event);
|
|
130
164
|
setDropdownOpened(true);
|
|
@@ -184,7 +218,9 @@ const ColorInput = forwardRef((props, ref) => {
|
|
|
184
218
|
sx: { cursor: disallowInput ? "pointer" : void 0 },
|
|
185
219
|
unstyled,
|
|
186
220
|
classNames,
|
|
187
|
-
styles
|
|
221
|
+
styles,
|
|
222
|
+
rightSection: rightSection || (eyeDropperSupported ? eyeDropper : null),
|
|
223
|
+
rightSectionWidth: rightSectionWidth != null ? rightSectionWidth : theme.fn.size({ size: inputProps.size, sizes: RIGHT_SECTION_WIDTH })
|
|
188
224
|
})))), /* @__PURE__ */ React.createElement(Popover.Dropdown, {
|
|
189
225
|
onMouseDown: (event) => event.preventDefault(),
|
|
190
226
|
p: inputProps.size
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorInput.js","sources":["../../src/ColorInput/ColorInput.tsx"],"sourcesContent":["import React, { useState, useEffect, forwardRef } from 'react';\nimport { useUncontrolled, useDidUpdate } from '@mantine/hooks';\nimport { DefaultProps, getDefaultZIndex, MantineShadow, useMantineTheme } from '@mantine/styles';\nimport {\n InputWrapperBaseProps,\n InputWrapperStylesNames,\n Input,\n InputSharedProps,\n InputStylesNames,\n useInputProps,\n} from '../Input';\nimport { ColorSwatch } from '../ColorSwatch';\nimport { Popover, PopoverStylesNames } from '../Popover';\nimport { MantineTransition } from '../Transition';\nimport {\n ColorPicker,\n ColorPickerBaseProps,\n ColorPickerStylesNames,\n} from '../ColorPicker/ColorPicker';\nimport { convertHsvaTo, isColorValid, parseColor } from '../ColorPicker/converters';\n\nexport type ColorInputStylesNames =\n | InputWrapperStylesNames\n | InputStylesNames\n | ColorPickerStylesNames\n | PopoverStylesNames;\n\nexport interface ColorInputProps\n extends InputWrapperBaseProps,\n InputSharedProps,\n ColorPickerBaseProps,\n DefaultProps<ColorInputStylesNames>,\n Omit<React.ComponentPropsWithoutRef<'input'>, 'size' | 'onChange' | 'defaultValue' | 'value'> {\n /** Disallow free input */\n disallowInput?: boolean;\n\n /** call onChange with last valid value onBlur */\n fixOnBlur?: boolean;\n\n /** Dropdown element z-index */\n dropdownZIndex?: number;\n\n /** Display swatch with color preview on the left side of input */\n withPreview?: boolean;\n\n /** Dropdown transition name or object */\n transition?: MantineTransition;\n\n /** Dropdown appear/disappear transition duration in ms */\n transitionDuration?: number;\n\n /** Dropdown transition timing function, defaults to theme.transitionTimingFunction */\n transitionTimingFunction?: string;\n\n /** Whether to render the dropdown in a Portal */\n withinPortal?: boolean;\n\n /** Dropdown box-shadow, key of theme.shadows */\n shadow?: MantineShadow;\n}\n\nconst SWATCH_SIZES = {\n xs: 16,\n sm: 18,\n md: 22,\n lg: 28,\n xl: 36,\n};\n\nconst defaultProps: Partial<ColorInputProps> = {\n size: 'sm',\n format: 'hex',\n fixOnBlur: true,\n withPreview: true,\n swatchesPerRow: 10,\n withPicker: true,\n transition: 'pop-top-left',\n dropdownZIndex: getDefaultZIndex('popover'),\n transitionDuration: 0,\n withinPortal: true,\n shadow: 'md',\n};\n\nexport const ColorInput = forwardRef<HTMLInputElement, ColorInputProps>(\n (props: ColorInputProps, ref) => {\n const {\n wrapperProps,\n inputProps,\n format,\n onChange,\n onChangeEnd,\n onFocus,\n onBlur,\n value,\n defaultValue,\n disallowInput,\n fixOnBlur,\n withPreview,\n swatchesPerRow,\n withPicker,\n icon,\n transition,\n dropdownZIndex,\n transitionDuration,\n transitionTimingFunction,\n withinPortal,\n swatches,\n shadow,\n classNames,\n styles,\n unstyled,\n readOnly,\n ...others\n } = useInputProps('ColorInput', defaultProps, props);\n\n const theme = useMantineTheme();\n const [dropdownOpened, setDropdownOpened] = useState(false);\n const [lastValidValue, setLastValidValue] = useState('');\n const [_value, setValue] = useUncontrolled({\n value,\n defaultValue,\n finalValue: '',\n onChange,\n });\n\n const handleInputFocus = (event: React.FocusEvent<HTMLInputElement>) => {\n typeof onFocus === 'function' && onFocus(event);\n setDropdownOpened(true);\n };\n\n const handleInputBlur = (event: React.FocusEvent<HTMLInputElement>) => {\n typeof onBlur === 'function' && onBlur(event);\n setDropdownOpened(false);\n fixOnBlur && setValue(lastValidValue);\n };\n\n useEffect(() => {\n if (isColorValid(_value) || _value.trim() === '') {\n setLastValidValue(_value);\n }\n }, [_value]);\n\n useDidUpdate(() => {\n if (isColorValid(_value)) {\n setValue(convertHsvaTo(format, parseColor(_value)));\n }\n }, [format]);\n\n return (\n <Input.Wrapper {...wrapperProps} __staticSelector=\"ColorInput\">\n <Popover\n __staticSelector=\"ColorInput\"\n position=\"bottom-start\"\n offset={5}\n zIndex={dropdownZIndex}\n withinPortal={withinPortal}\n transitionDuration={transitionDuration}\n transition={transition}\n opened={dropdownOpened}\n shadow={shadow}\n classNames={classNames}\n styles={styles}\n unstyled={unstyled}\n disabled={\n readOnly ||\n (withPicker === false && (!Array.isArray(swatches) || swatches.length === 0))\n }\n >\n <Popover.Target>\n <div>\n <Input<'input'>\n autoComplete=\"nope\"\n {...others}\n {...inputProps}\n ref={ref}\n __staticSelector=\"ColorInput\"\n onFocus={handleInputFocus}\n onBlur={handleInputBlur}\n spellCheck={false}\n value={_value}\n onChange={(event) => {\n const inputValue = event.currentTarget.value;\n setValue(inputValue);\n if (isColorValid(inputValue)) {\n onChangeEnd?.(convertHsvaTo(format, parseColor(inputValue)));\n }\n }}\n icon={\n icon ||\n (withPreview ? (\n <ColorSwatch\n color={isColorValid(_value) ? _value : '#fff'}\n size={theme.fn.size({ size: inputProps.size, sizes: SWATCH_SIZES })}\n />\n ) : null)\n }\n readOnly={disallowInput || readOnly}\n sx={{ cursor: disallowInput ? 'pointer' : undefined }}\n unstyled={unstyled}\n classNames={classNames}\n styles={styles}\n />\n </div>\n </Popover.Target>\n\n <Popover.Dropdown onMouseDown={(event) => event.preventDefault()} p={inputProps.size}>\n <ColorPicker\n __staticSelector=\"ColorInput\"\n value={_value}\n onChange={setValue}\n onChangeEnd={onChangeEnd}\n format={format}\n swatches={swatches}\n swatchesPerRow={swatchesPerRow}\n withPicker={withPicker}\n size={inputProps.size}\n focusable={false}\n unstyled={unstyled}\n styles={styles}\n classNames={classNames}\n />\n </Popover.Dropdown>\n </Popover>\n </Input.Wrapper>\n );\n }\n);\n\nColorInput.displayName = '@mantine/core/ColorInput';\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,mBAAmB,CAAC,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AE;AAC/D,IAAI,WAAW,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,cAAc,EAAE;AAClD,IAAI,CAAC,EAAE,UAAU,CAAC,IAAI;AACtB,GAAG,kBAAkB,KAAK,CAAC,aAAa,CAAC,WAAW,EAAE;AACtD,IAAI,gBAAgB,EAAE,YAAY;AAClC,IAAI,KAAK,EAAE,MAAM;AACjB,IAAI,QAAQ,EAAE,QAAQ;AACtB,IAAI,WAAW;AACf,IAAI,MAAM;AACV,IAAI,QAAQ;AACZ,IAAI,cAAc;AAClB,IAAI,UAAU;AACd,IAAI,IAAI,EAAE,UAAU,CAAC,IAAI;AACzB,IAAI,SAAS,EAAE,KAAK;AACpB,IAAI,QAAQ;AACZ,IAAI,MAAM;AACV,IAAI,UAAU;AACd,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACR,CAAC,EAAE;AACH,UAAU,CAAC,WAAW,GAAG,0BAA0B;;;;"}
|
|
1
|
+
{"version":3,"file":"ColorInput.js","sources":["../../src/ColorInput/ColorInput.tsx"],"sourcesContent":["import React, { useState, useEffect, forwardRef } from 'react';\nimport { useUncontrolled, useDidUpdate, useEyeDropper } from '@mantine/hooks';\nimport { DefaultProps, getDefaultZIndex, MantineShadow, useMantineTheme } from '@mantine/styles';\nimport { noop } from '@mantine/utils';\nimport {\n InputWrapperBaseProps,\n InputWrapperStylesNames,\n Input,\n InputSharedProps,\n InputStylesNames,\n useInputProps,\n} from '../Input';\nimport { ColorSwatch } from '../ColorSwatch';\nimport { ActionIcon } from '../ActionIcon';\nimport { Popover, PopoverStylesNames } from '../Popover';\nimport { MantineTransition } from '../Transition';\nimport {\n ColorPicker,\n ColorPickerBaseProps,\n ColorPickerStylesNames,\n} from '../ColorPicker/ColorPicker';\nimport { convertHsvaTo, isColorValid, parseColor } from '../ColorPicker/converters';\nimport { EyeDropperIcon } from './EyeDropperIcon';\n\nexport type ColorInputStylesNames =\n | InputWrapperStylesNames\n | InputStylesNames\n | ColorPickerStylesNames\n | PopoverStylesNames;\n\nexport interface ColorInputProps\n extends InputWrapperBaseProps,\n InputSharedProps,\n ColorPickerBaseProps,\n DefaultProps<ColorInputStylesNames>,\n Omit<React.ComponentPropsWithoutRef<'input'>, 'size' | 'onChange' | 'defaultValue' | 'value'> {\n /** Disallow free input */\n disallowInput?: boolean;\n\n /** call onChange with last valid value onBlur */\n fixOnBlur?: boolean;\n\n /** Dropdown element z-index */\n dropdownZIndex?: number;\n\n /** Display swatch with color preview on the left side of input */\n withPreview?: boolean;\n\n /** Dropdown transition name or object */\n transition?: MantineTransition;\n\n /** Dropdown appear/disappear transition duration in ms */\n transitionDuration?: number;\n\n /** Dropdown transition timing function, defaults to theme.transitionTimingFunction */\n transitionTimingFunction?: string;\n\n /** Whether to render the dropdown in a Portal */\n withinPortal?: boolean;\n\n /** Dropdown box-shadow, key of theme.shadows */\n shadow?: MantineShadow;\n\n /** Determines whether eye dropper button should be displayed in the right section */\n withEyeDropper?: boolean;\n\n /** Replaces default eye dropper icon */\n eyeDropperIcon?: React.ReactNode;\n}\n\nconst SWATCH_SIZES = {\n xs: 16,\n sm: 18,\n md: 22,\n lg: 28,\n xl: 36,\n};\n\nconst EYE_DROPPER_SIZES = {\n xs: 14,\n sm: 16,\n md: 18,\n lg: 20,\n xl: 22,\n};\n\nconst RIGHT_SECTION_WIDTH = {\n xs: 28,\n sm: 32,\n md: 38,\n lg: 44,\n xl: 58,\n};\n\nconst defaultProps: Partial<ColorInputProps> = {\n size: 'sm',\n format: 'hex',\n fixOnBlur: true,\n withPreview: true,\n swatchesPerRow: 10,\n withPicker: true,\n transition: 'pop-top-left',\n dropdownZIndex: getDefaultZIndex('popover'),\n transitionDuration: 0,\n withinPortal: true,\n shadow: 'md',\n withEyeDropper: false,\n};\n\nexport const ColorInput = forwardRef<HTMLInputElement, ColorInputProps>((props, ref) => {\n const {\n wrapperProps,\n inputProps,\n format,\n onChange,\n onChangeEnd,\n onFocus,\n onBlur,\n value,\n defaultValue,\n disallowInput,\n fixOnBlur,\n withPreview,\n swatchesPerRow,\n withPicker,\n icon,\n transition,\n dropdownZIndex,\n transitionDuration,\n transitionTimingFunction,\n withinPortal,\n swatches,\n shadow,\n classNames,\n styles,\n unstyled,\n readOnly,\n withEyeDropper,\n eyeDropperIcon,\n rightSection,\n rightSectionWidth,\n ...others\n } = useInputProps('ColorInput', defaultProps, props);\n\n const theme = useMantineTheme();\n const [dropdownOpened, setDropdownOpened] = useState(false);\n const [lastValidValue, setLastValidValue] = useState('');\n const [_value, setValue] = useUncontrolled({\n value,\n defaultValue,\n finalValue: '',\n onChange,\n });\n\n const { supported: eyeDropperSupported, open: openEyeDropper } = useEyeDropper();\n\n const eyeDropper = (\n <ActionIcon\n sx={{ color: theme.colorScheme === 'dark' ? theme.colors.dark[0] : theme.black }}\n size={inputProps.size}\n onClick={() =>\n openEyeDropper()\n .then(({ sRGBHex }) => setValue(convertHsvaTo(format, parseColor(sRGBHex))))\n .catch(noop)\n }\n >\n {eyeDropperIcon || (\n <EyeDropperIcon size={theme.fn.size({ size: inputProps.size, sizes: EYE_DROPPER_SIZES })} />\n )}\n </ActionIcon>\n );\n\n const handleInputFocus = (event: React.FocusEvent<HTMLInputElement>) => {\n typeof onFocus === 'function' && onFocus(event);\n setDropdownOpened(true);\n };\n\n const handleInputBlur = (event: React.FocusEvent<HTMLInputElement>) => {\n typeof onBlur === 'function' && onBlur(event);\n setDropdownOpened(false);\n fixOnBlur && setValue(lastValidValue);\n };\n\n useEffect(() => {\n if (isColorValid(_value) || _value.trim() === '') {\n setLastValidValue(_value);\n }\n }, [_value]);\n\n useDidUpdate(() => {\n if (isColorValid(_value)) {\n setValue(convertHsvaTo(format, parseColor(_value)));\n }\n }, [format]);\n\n return (\n <Input.Wrapper {...wrapperProps} __staticSelector=\"ColorInput\">\n <Popover\n __staticSelector=\"ColorInput\"\n position=\"bottom-start\"\n offset={5}\n zIndex={dropdownZIndex}\n withinPortal={withinPortal}\n transitionDuration={transitionDuration}\n transition={transition}\n opened={dropdownOpened}\n shadow={shadow}\n classNames={classNames}\n styles={styles}\n unstyled={unstyled}\n disabled={\n readOnly || (withPicker === false && (!Array.isArray(swatches) || swatches.length === 0))\n }\n >\n <Popover.Target>\n <div>\n <Input<'input'>\n autoComplete=\"nope\"\n {...others}\n {...inputProps}\n ref={ref}\n __staticSelector=\"ColorInput\"\n onFocus={handleInputFocus}\n onBlur={handleInputBlur}\n spellCheck={false}\n value={_value}\n onChange={(event) => {\n const inputValue = event.currentTarget.value;\n setValue(inputValue);\n if (isColorValid(inputValue)) {\n onChangeEnd?.(convertHsvaTo(format, parseColor(inputValue)));\n }\n }}\n icon={\n icon ||\n (withPreview ? (\n <ColorSwatch\n color={isColorValid(_value) ? _value : '#fff'}\n size={theme.fn.size({ size: inputProps.size, sizes: SWATCH_SIZES })}\n />\n ) : null)\n }\n readOnly={disallowInput || readOnly}\n sx={{ cursor: disallowInput ? 'pointer' : undefined }}\n unstyled={unstyled}\n classNames={classNames}\n styles={styles}\n rightSection={rightSection || (eyeDropperSupported ? eyeDropper : null)}\n rightSectionWidth={\n rightSectionWidth ??\n theme.fn.size({ size: inputProps.size, sizes: RIGHT_SECTION_WIDTH })\n }\n />\n </div>\n </Popover.Target>\n\n <Popover.Dropdown onMouseDown={(event) => event.preventDefault()} p={inputProps.size}>\n <ColorPicker\n __staticSelector=\"ColorInput\"\n value={_value}\n onChange={setValue}\n onChangeEnd={onChangeEnd}\n format={format}\n swatches={swatches}\n swatchesPerRow={swatchesPerRow}\n withPicker={withPicker}\n size={inputProps.size}\n focusable={false}\n unstyled={unstyled}\n styles={styles}\n classNames={classNames}\n />\n </Popover.Dropdown>\n </Popover>\n </Input.Wrapper>\n );\n});\n\nColorInput.displayName = '@mantine/core/ColorInput';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,UAAU,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACzC,IAAI,iBAAi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