@mantine/core 6.0.0-alpha.1 → 6.0.0-alpha.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/Box/style-system-props/system-props/system-props.js +20 -20
- package/cjs/Box/style-system-props/system-props/system-props.js.map +1 -1
- package/cjs/Box/style-system-props/value-getters/get-default-value.js +6 -2
- package/cjs/Box/style-system-props/value-getters/get-default-value.js.map +1 -1
- package/cjs/Box/style-system-props/value-getters/value-getters.js +2 -1
- package/cjs/Box/style-system-props/value-getters/value-getters.js.map +1 -1
- package/cjs/Drawer/Drawer.js.map +1 -1
- package/cjs/Flex/flex-props.js +4 -4
- package/cjs/Flex/flex-props.js.map +1 -1
- package/cjs/Modal/Modal.js.map +1 -1
- package/cjs/ModalBase/ModalBase.context.js.map +1 -1
- package/cjs/ModalBase/ModalBase.js +55 -5
- package/cjs/ModalBase/ModalBase.js.map +1 -1
- package/cjs/ModalBase/ModalBase.styles.js +12 -0
- package/cjs/ModalBase/ModalBase.styles.js.map +1 -0
- package/esm/Box/style-system-props/system-props/system-props.js +20 -20
- package/esm/Box/style-system-props/system-props/system-props.js.map +1 -1
- package/esm/Box/style-system-props/value-getters/get-default-value.js +5 -2
- package/esm/Box/style-system-props/value-getters/get-default-value.js.map +1 -1
- package/esm/Box/style-system-props/value-getters/value-getters.js +3 -2
- package/esm/Box/style-system-props/value-getters/value-getters.js.map +1 -1
- package/esm/Drawer/Drawer.js.map +1 -1
- package/esm/Flex/flex-props.js +4 -4
- package/esm/Flex/flex-props.js.map +1 -1
- package/esm/Modal/Modal.js.map +1 -1
- package/esm/ModalBase/ModalBase.context.js.map +1 -1
- package/esm/ModalBase/ModalBase.js +55 -5
- package/esm/ModalBase/ModalBase.js.map +1 -1
- package/esm/ModalBase/ModalBase.styles.js +8 -0
- package/esm/ModalBase/ModalBase.styles.js.map +1 -0
- package/lib/AppShell/HorizontalSection/HorizontalSection.d.ts +1 -1
- package/lib/Box/style-system-props/value-getters/get-default-value.d.ts +2 -1
- package/lib/Box/style-system-props/value-getters/get-default-value.d.ts.map +1 -1
- package/lib/Box/style-system-props/value-getters/value-getters.d.ts +3 -2
- package/lib/Box/style-system-props/value-getters/value-getters.d.ts.map +1 -1
- package/lib/Drawer/Drawer.d.ts +1 -1
- package/lib/Drawer/Drawer.d.ts.map +1 -1
- package/lib/Highlight/Highlight.d.ts +1 -1
- package/lib/Modal/Modal.d.ts +1 -1
- package/lib/Modal/Modal.d.ts.map +1 -1
- package/lib/ModalBase/ModalBase.context.d.ts +1 -0
- package/lib/ModalBase/ModalBase.context.d.ts.map +1 -1
- package/lib/ModalBase/ModalBase.d.ts +5 -3
- package/lib/ModalBase/ModalBase.d.ts.map +1 -1
- package/lib/ModalBase/ModalBase.styles.d.ts +9 -0
- package/lib/ModalBase/ModalBase.styles.d.ts.map +1 -0
- package/lib/ScrollArea/ScrollArea.d.ts +1 -1
- package/lib/Select/SelectScrollArea/SelectScrollArea.d.ts +1 -1
- package/package.json +4 -4
- package/cjs/TagInput/DefaultValue/DefaultValue.js +0 -88
- package/cjs/TagInput/DefaultValue/DefaultValue.js.map +0 -1
- package/cjs/TagInput/DefaultValue/DefaultValue.styles.js +0 -50
- package/cjs/TagInput/DefaultValue/DefaultValue.styles.js.map +0 -1
- package/cjs/TagInput/TagInput.js +0 -335
- package/cjs/TagInput/TagInput.js.map +0 -1
- package/cjs/TagInput/TagInput.styles.js +0 -65
- package/cjs/TagInput/TagInput.styles.js.map +0 -1
- package/cjs/Transition/GroupedTransition.js +0 -55
- package/cjs/Transition/GroupedTransition.js.map +0 -1
- package/esm/TagInput/DefaultValue/DefaultValue.js +0 -80
- package/esm/TagInput/DefaultValue/DefaultValue.js.map +0 -1
- package/esm/TagInput/DefaultValue/DefaultValue.styles.js +0 -46
- package/esm/TagInput/DefaultValue/DefaultValue.styles.js.map +0 -1
- package/esm/TagInput/TagInput.js +0 -327
- package/esm/TagInput/TagInput.js.map +0 -1
- package/esm/TagInput/TagInput.styles.js +0 -61
- package/esm/TagInput/TagInput.styles.js.map +0 -1
- package/esm/Transition/GroupedTransition.js +0 -47
- package/esm/Transition/GroupedTransition.js.map +0 -1
- package/lib/TagInput/DefaultValue/DefaultValue.d.ts +0 -16
- package/lib/TagInput/DefaultValue/DefaultValue.d.ts.map +0 -1
- package/lib/TagInput/DefaultValue/DefaultValue.styles.d.ts +0 -17
- package/lib/TagInput/DefaultValue/DefaultValue.styles.d.ts.map +0 -1
- package/lib/TagInput/TagInput.d.ts +0 -44
- package/lib/TagInput/TagInput.d.ts.map +0 -1
- package/lib/TagInput/TagInput.styles.d.ts +0 -28
- package/lib/TagInput/TagInput.styles.d.ts.map +0 -1
- package/lib/TagInput/index.d.ts +0 -3
- package/lib/TagInput/index.d.ts.map +0 -1
- package/lib/Transition/GroupedTransition.d.ts +0 -35
- package/lib/Transition/GroupedTransition.d.ts.map +0 -1
|
@@ -19,33 +19,33 @@ const SYSTEM_PROPS = {
|
|
|
19
19
|
py: { type: "spacing", property: ["paddingTop", "paddingBottom"] },
|
|
20
20
|
bg: { type: "color", property: "background" },
|
|
21
21
|
c: { type: "color", property: "color" },
|
|
22
|
-
opacity: { type: "
|
|
23
|
-
ff: { type: "
|
|
22
|
+
opacity: { type: "identity", property: "opacity" },
|
|
23
|
+
ff: { type: "identity", property: "fontFamily" },
|
|
24
24
|
fz: { type: "fontSize", property: "fontSize" },
|
|
25
|
-
fw: { type: "
|
|
26
|
-
lts: { type: "
|
|
27
|
-
ta: { type: "
|
|
28
|
-
lh: { type: "
|
|
29
|
-
fs: { type: "
|
|
30
|
-
tt: { type: "
|
|
31
|
-
td: { type: "
|
|
25
|
+
fw: { type: "identity", property: "fontWeight" },
|
|
26
|
+
lts: { type: "size", property: "letterSpacing" },
|
|
27
|
+
ta: { type: "identity", property: "textAlign" },
|
|
28
|
+
lh: { type: "identity", property: "lineHeight" },
|
|
29
|
+
fs: { type: "identity", property: "fontStyle" },
|
|
30
|
+
tt: { type: "identity", property: "textTransform" },
|
|
31
|
+
td: { type: "identity", property: "textDecoration" },
|
|
32
32
|
w: { type: "spacing", property: "width" },
|
|
33
33
|
miw: { type: "spacing", property: "minWidth" },
|
|
34
34
|
maw: { type: "spacing", property: "maxWidth" },
|
|
35
35
|
h: { type: "spacing", property: "height" },
|
|
36
36
|
mih: { type: "spacing", property: "minHeight" },
|
|
37
37
|
mah: { type: "spacing", property: "maxHeight" },
|
|
38
|
-
bgsz: { type: "
|
|
39
|
-
bgp: { type: "
|
|
40
|
-
bgr: { type: "
|
|
41
|
-
bga: { type: "
|
|
42
|
-
pos: { type: "
|
|
43
|
-
top: { type: "
|
|
44
|
-
left: { type: "
|
|
45
|
-
bottom: { type: "
|
|
46
|
-
right: { type: "
|
|
47
|
-
inset: { type: "
|
|
48
|
-
display: { type: "
|
|
38
|
+
bgsz: { type: "size", property: "background-size" },
|
|
39
|
+
bgp: { type: "identity", property: "background-position" },
|
|
40
|
+
bgr: { type: "identity", property: "background-repeat" },
|
|
41
|
+
bga: { type: "identity", property: "background-attachment" },
|
|
42
|
+
pos: { type: "identity", property: "position" },
|
|
43
|
+
top: { type: "identity", property: "top" },
|
|
44
|
+
left: { type: "size", property: "left" },
|
|
45
|
+
bottom: { type: "size", property: "bottom" },
|
|
46
|
+
right: { type: "size", property: "right" },
|
|
47
|
+
inset: { type: "size", property: "inset" },
|
|
48
|
+
display: { type: "identity", property: "display" }
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
exports.SYSTEM_PROPS = SYSTEM_PROPS;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-props.js","sources":["../../../../src/Box/style-system-props/system-props/system-props.ts"],"sourcesContent":["import type { StyleProperty } from '../get-responsive-value/get-responsive-value';\nimport type { SystemValueType } from '../value-getters/value-getters';\n\nexport interface SystemPropData {\n type: SystemValueType;\n property: StyleProperty;\n}\n\nexport const SYSTEM_PROPS: Record<string, SystemPropData> = {\n m: { type: 'spacing', property: 'margin' },\n mt: { type: 'spacing', property: 'marginTop' },\n mb: { type: 'spacing', property: 'marginBottom' },\n ml: { type: 'spacing', property: 'marginLeft' },\n mr: { type: 'spacing', property: 'marginRight' },\n mx: { type: 'spacing', property: ['marginRight', 'marginLeft'] },\n my: { type: 'spacing', property: ['marginTop', 'marginBottom'] },\n\n p: { type: 'spacing', property: 'padding' },\n pt: { type: 'spacing', property: 'paddingTop' },\n pb: { type: 'spacing', property: 'paddingBottom' },\n pl: { type: 'spacing', property: 'paddingLeft' },\n pr: { type: 'spacing', property: 'paddingRight' },\n px: { type: 'spacing', property: ['paddingRight', 'paddingLeft'] },\n py: { type: 'spacing', property: ['paddingTop', 'paddingBottom'] },\n\n bg: { type: 'color', property: 'background' },\n c: { type: 'color', property: 'color' },\n opacity: { type: '
|
|
1
|
+
{"version":3,"file":"system-props.js","sources":["../../../../src/Box/style-system-props/system-props/system-props.ts"],"sourcesContent":["import type { StyleProperty } from '../get-responsive-value/get-responsive-value';\nimport type { SystemValueType } from '../value-getters/value-getters';\n\nexport interface SystemPropData {\n type: SystemValueType;\n property: StyleProperty;\n}\n\nexport const SYSTEM_PROPS: Record<string, SystemPropData> = {\n m: { type: 'spacing', property: 'margin' },\n mt: { type: 'spacing', property: 'marginTop' },\n mb: { type: 'spacing', property: 'marginBottom' },\n ml: { type: 'spacing', property: 'marginLeft' },\n mr: { type: 'spacing', property: 'marginRight' },\n mx: { type: 'spacing', property: ['marginRight', 'marginLeft'] },\n my: { type: 'spacing', property: ['marginTop', 'marginBottom'] },\n\n p: { type: 'spacing', property: 'padding' },\n pt: { type: 'spacing', property: 'paddingTop' },\n pb: { type: 'spacing', property: 'paddingBottom' },\n pl: { type: 'spacing', property: 'paddingLeft' },\n pr: { type: 'spacing', property: 'paddingRight' },\n px: { type: 'spacing', property: ['paddingRight', 'paddingLeft'] },\n py: { type: 'spacing', property: ['paddingTop', 'paddingBottom'] },\n\n bg: { type: 'color', property: 'background' },\n c: { type: 'color', property: 'color' },\n opacity: { type: 'identity', property: 'opacity' },\n\n ff: { type: 'identity', property: 'fontFamily' },\n fz: { type: 'fontSize', property: 'fontSize' },\n fw: { type: 'identity', property: 'fontWeight' },\n lts: { type: 'size', property: 'letterSpacing' },\n ta: { type: 'identity', property: 'textAlign' },\n lh: { type: 'identity', property: 'lineHeight' },\n fs: { type: 'identity', property: 'fontStyle' },\n tt: { type: 'identity', property: 'textTransform' },\n td: { type: 'identity', property: 'textDecoration' },\n\n w: { type: 'spacing', property: 'width' },\n miw: { type: 'spacing', property: 'minWidth' },\n maw: { type: 'spacing', property: 'maxWidth' },\n h: { type: 'spacing', property: 'height' },\n mih: { type: 'spacing', property: 'minHeight' },\n mah: { type: 'spacing', property: 'maxHeight' },\n\n bgsz: { type: 'size', property: 'background-size' },\n bgp: { type: 'identity', property: 'background-position' },\n bgr: { type: 'identity', property: 'background-repeat' },\n bga: { type: 'identity', property: 'background-attachment' },\n\n pos: { type: 'identity', property: 'position' },\n top: { type: 'identity', property: 'top' },\n left: { type: 'size', property: 'left' },\n bottom: { type: 'size', property: 'bottom' },\n right: { type: 'size', property: 'right' },\n inset: { type: 'size', property: 'inset' },\n\n display: { type: 'identity', property: 'display' },\n};\n"],"names":[],"mappings":";;;;AAAY,MAAC,YAAY,GAAG;AAC5B,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE;AAC5C,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE;AAChD,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAE;AACnD,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE;AACjD,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE;AAClD,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QA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EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,uBAAuB,EAAE;AAC9D,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE;AACjD,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE;AAC5C,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE;AAC1C,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE;AAC9C,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE;AAC5C,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE;AAC5C,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE;AACpD;;;;"}
|
|
@@ -4,9 +4,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var styles = require('@mantine/styles');
|
|
6
6
|
|
|
7
|
-
function
|
|
7
|
+
function getSizeValue(value) {
|
|
8
8
|
return styles.rem(value);
|
|
9
9
|
}
|
|
10
|
+
function identity(value) {
|
|
11
|
+
return value;
|
|
12
|
+
}
|
|
10
13
|
|
|
11
|
-
exports.
|
|
14
|
+
exports.getSizeValue = getSizeValue;
|
|
15
|
+
exports.identity = identity;
|
|
12
16
|
//# sourceMappingURL=get-default-value.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-default-value.js","sources":["../../../../src/Box/style-system-props/value-getters/get-default-value.ts"],"sourcesContent":["import { rem } from '@mantine/styles';\n\nexport function
|
|
1
|
+
{"version":3,"file":"get-default-value.js","sources":["../../../../src/Box/style-system-props/value-getters/get-default-value.ts"],"sourcesContent":["import { rem } from '@mantine/styles';\n\nexport function getSizeValue<T>(value: T) {\n return rem(value);\n}\n\nexport function identity<T>(value: T) {\n return value;\n}\n"],"names":["rem"],"mappings":";;;;;;AACO,SAAS,YAAY,CAAC,KAAK,EAAE;AACpC,EAAE,OAAOA,UAAG,CAAC,KAAK,CAAC,CAAC;AACpB,CAAC;AACM,SAAS,QAAQ,CAAC,KAAK,EAAE;AAChC,EAAE,OAAO,KAAK,CAAC;AACf;;;;;"}
|
|
@@ -8,8 +8,9 @@ var getFontSizeValue = require('./get-font-size-value.js');
|
|
|
8
8
|
var getSpacingValue = require('./get-spacing-value.js');
|
|
9
9
|
|
|
10
10
|
const valueGetters = {
|
|
11
|
+
identity: getDefaultValue.identity,
|
|
11
12
|
color: getColorValue.getColorValue,
|
|
12
|
-
|
|
13
|
+
size: getDefaultValue.getSizeValue,
|
|
13
14
|
fontSize: getFontSizeValue.getFontSizeValue,
|
|
14
15
|
spacing: getSpacingValue.getSpacingValue
|
|
15
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"value-getters.js","sources":["../../../../src/Box/style-system-props/value-getters/value-getters.ts"],"sourcesContent":["import { getColorValue } from './get-color-value';\nimport {
|
|
1
|
+
{"version":3,"file":"value-getters.js","sources":["../../../../src/Box/style-system-props/value-getters/value-getters.ts"],"sourcesContent":["import { getColorValue } from './get-color-value';\nimport { getSizeValue, identity } from './get-default-value';\nimport { getFontSizeValue } from './get-font-size-value';\nimport { getSpacingValue } from './get-spacing-value';\n\nexport const valueGetters = {\n identity,\n color: getColorValue,\n size: getSizeValue,\n fontSize: getFontSizeValue,\n spacing: getSpacingValue,\n};\n\nexport type SystemValueType = keyof typeof valueGetters;\n"],"names":["identity","getColorValue","getSizeValue","getFontSizeValue","getSpacingValue"],"mappings":";;;;;;;;;AAIY,MAAC,YAAY,GAAG;AAC5B,YAAEA,wBAAQ;AACV,EAAE,KAAK,EAAEC,2BAAa;AACtB,EAAE,IAAI,EAAEC,4BAAY;AACpB,EAAE,QAAQ,EAAEC,iCAAgB;AAC5B,EAAE,OAAO,EAAEC,+BAAe;AAC1B;;;;"}
|
package/cjs/Drawer/Drawer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.js","sources":["../../src/Drawer/Drawer.tsx"],"sourcesContent":["import React from 'react';\nimport { useComponentDefaultProps } from '@mantine/styles';\nimport {\n ModalBase,\n ModalBaseDefaultProps,\n ModalBaseOverlayProps,\n ModalBaseCloseButtonProps,\n} from '../ModalBase';\nimport { DrawerRoot, DrawerRootProps } from './DrawerRoot/DrawerRoot';\nimport { DrawerContent } from './DrawerContent/DrawerContent';\n\nexport interface DrawerProps extends DrawerRootProps {\n /** Modal title */\n title?: React.ReactNode;\n\n /** Determines whether overlay should be rendered, true by default */\n withOverlay?: boolean;\n\n /** Props added to Overlay component, use configure opacity, background color, styles and other properties */\n overlayProps?: ModalBaseOverlayProps;\n\n /** Modal content */\n children?: React.ReactNode;\n\n /** Determines whether close button should be rendered, true by default */\n withCloseButton?: boolean;\n\n /** Props added to close button */\n closeButtonProps?: ModalBaseCloseButtonProps;\n}\n\nconst defaultProps: Partial<DrawerProps> = {\n ...ModalBaseDefaultProps,\n withOverlay: true,\n withCloseButton: true,\n};\n\nexport function Drawer(props: DrawerProps) {\n const {\n title,\n withOverlay,\n overlayProps,\n withCloseButton,\n closeButtonProps,\n children,\n ...others\n } = useComponentDefaultProps('Drawer', defaultProps, props);\n\n const hasHeader = !!title || withCloseButton;\n\n return (\n <DrawerRoot {...others}>\n {withOverlay && <ModalBase.Overlay {...overlayProps} />}\n <DrawerContent>\n {hasHeader && (\n <ModalBase.Header>\n {title && <ModalBase.Title>{title}</ModalBase.Title>}\n {withCloseButton && <ModalBase.CloseButton {...closeButtonProps} />}\n </ModalBase.Header>\n )}\n\n <ModalBase.Body>{children}</ModalBase.Body>\n </DrawerContent>\n </DrawerRoot>\n );\n}\n\nDrawer.Root = DrawerRoot;\nDrawer.CloseButton = ModalBase.CloseButton;\nDrawer.Overlay = ModalBase.Overlay;\nDrawer.Content = DrawerContent;\nDrawer.Header = ModalBase.Header;\nDrawer.Title = ModalBase.Title;\nDrawer.Body = ModalBase.Body;\nDrawer.NativeScrollArea = ModalBase.NativeScrollArea;\n"],"names":["ModalBaseDefaultProps","useComponentDefaultProps","React","DrawerRoot","ModalBase","DrawerContent"],"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,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C3C,MAAM,CAAC,OAAO,GAAGA,mBAAS,CAAC,OAAO,CAAC;AACnC,MAAM,CAAC,OAAO,GAAGC,2BAAa,CAAC;AAC/B,MAAM,CAAC,MAAM,GAAGD,mBAAS,CAAC,MAAM,CAAC;AACjC,MAAM,CAAC,KAAK,GAAGA,mBAAS,CAAC,KAAK,CAAC;AAC/B,MAAM,CAAC,IAAI,GAAGA,mBAAS,CAAC,IAAI,CAAC;AAC7B,MAAM,CAAC,gBAAgB,GAAGA,mBAAS,CAAC,gBAAgB;;;;"}
|
|
1
|
+
{"version":3,"file":"Drawer.js","sources":["../../src/Drawer/Drawer.tsx"],"sourcesContent":["import React from 'react';\nimport { useComponentDefaultProps } from '@mantine/styles';\nimport {\n ModalBase,\n ModalBaseDefaultProps,\n ModalBaseOverlayProps,\n ModalBaseCloseButtonProps,\n} from '../ModalBase';\nimport { DrawerRoot, DrawerRootProps } from './DrawerRoot/DrawerRoot';\nimport { DrawerContent } from './DrawerContent/DrawerContent';\n\nexport interface DrawerProps extends Omit<DrawerRootProps, 'title'> {\n /** Modal title */\n title?: React.ReactNode;\n\n /** Determines whether overlay should be rendered, true by default */\n withOverlay?: boolean;\n\n /** Props added to Overlay component, use configure opacity, background color, styles and other properties */\n overlayProps?: ModalBaseOverlayProps;\n\n /** Modal content */\n children?: React.ReactNode;\n\n /** Determines whether close button should be rendered, true by default */\n withCloseButton?: boolean;\n\n /** Props added to close button */\n closeButtonProps?: ModalBaseCloseButtonProps;\n}\n\nconst defaultProps: Partial<DrawerProps> = {\n ...ModalBaseDefaultProps,\n withOverlay: true,\n withCloseButton: true,\n};\n\nexport function Drawer(props: DrawerProps) {\n const {\n title,\n withOverlay,\n overlayProps,\n withCloseButton,\n closeButtonProps,\n children,\n ...others\n } = useComponentDefaultProps('Drawer', defaultProps, props);\n\n const hasHeader = !!title || withCloseButton;\n\n return (\n <DrawerRoot {...others}>\n {withOverlay && <ModalBase.Overlay {...overlayProps} />}\n <DrawerContent>\n {hasHeader && (\n <ModalBase.Header>\n {title && <ModalBase.Title>{title}</ModalBase.Title>}\n {withCloseButton && <ModalBase.CloseButton {...closeButtonProps} />}\n </ModalBase.Header>\n )}\n\n <ModalBase.Body>{children}</ModalBase.Body>\n </DrawerContent>\n </DrawerRoot>\n );\n}\n\nDrawer.Root = DrawerRoot;\nDrawer.CloseButton = ModalBase.CloseButton;\nDrawer.Overlay = ModalBase.Overlay;\nDrawer.Content = DrawerContent;\nDrawer.Header = ModalBase.Header;\nDrawer.Title = ModalBase.Title;\nDrawer.Body = ModalBase.Body;\nDrawer.NativeScrollArea = ModalBase.NativeScrollArea;\n"],"names":["ModalBaseDefaultProps","useComponentDefaultProps","React","DrawerRoot","ModalBase","DrawerContent"],"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,IA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C,kBAAkBF,cAAK,CAAC,aAAa,CAACE,mBAAS,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;AACxkB,CAAC;AACD,MAAM,CAAC,IAAI,GAAGD,qBAAU,CAAC;AACzB,MAAM,CAAC,WAAW,GAAGC,mBAAS,CAAC,WAAW,CAAC;AAC3C,MAAM,CAAC,OAAO,GAAGA,mBAAS,CAAC,OAAO,CAAC;AACnC,MAAM,CAAC,OAAO,GAAGC,2BAAa,CAAC;AAC/B,MAAM,CAAC,MAAM,GAAGD,mBAAS,CAAC,MAAM,CAAC;AACjC,MAAM,CAAC,KAAK,GAAGA,mBAAS,CAAC,KAAK,CAAC;AAC/B,MAAM,CAAC,IAAI,GAAGA,mBAAS,CAAC,IAAI,CAAC;AAC7B,MAAM,CAAC,gBAAgB,GAAGA,mBAAS,CAAC,gBAAgB;;;;"}
|
package/cjs/Flex/flex-props.js
CHANGED
|
@@ -6,10 +6,10 @@ const FLEX_SYSTEM_PROPS = {
|
|
|
6
6
|
gap: { type: "spacing", property: "gap" },
|
|
7
7
|
rowGap: { type: "spacing", property: "rowGap" },
|
|
8
8
|
columnGap: { type: "spacing", property: "columnGap" },
|
|
9
|
-
align: { type: "
|
|
10
|
-
justify: { type: "
|
|
11
|
-
wrap: { type: "
|
|
12
|
-
direction: { type: "
|
|
9
|
+
align: { type: "identity", property: "alignItems" },
|
|
10
|
+
justify: { type: "identity", property: "justifyContent" },
|
|
11
|
+
wrap: { type: "identity", property: "flexWrap" },
|
|
12
|
+
direction: { type: "identity", property: "flexDirection" }
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
exports.FLEX_SYSTEM_PROPS = FLEX_SYSTEM_PROPS;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flex-props.js","sources":["../../src/Flex/flex-props.ts"],"sourcesContent":["import type { SystemPropData } from '../Box';\n\nexport const FLEX_SYSTEM_PROPS: Record<string, SystemPropData> = {\n gap: { type: 'spacing', property: 'gap' },\n rowGap: { type: 'spacing', property: 'rowGap' },\n columnGap: { type: 'spacing', property: 'columnGap' },\n\n align: { type: '
|
|
1
|
+
{"version":3,"file":"flex-props.js","sources":["../../src/Flex/flex-props.ts"],"sourcesContent":["import type { SystemPropData } from '../Box';\n\nexport const FLEX_SYSTEM_PROPS: Record<string, SystemPropData> = {\n gap: { type: 'spacing', property: 'gap' },\n rowGap: { type: 'spacing', property: 'rowGap' },\n columnGap: { type: 'spacing', property: 'columnGap' },\n\n align: { type: 'identity', property: 'alignItems' },\n justify: { type: 'identity', property: 'justifyContent' },\n wrap: { type: 'identity', property: 'flexWrap' },\n direction: { type: 'identity', property: 'flexDirection' },\n};\n"],"names":[],"mappings":";;;;AAAY,MAAC,iBAAiB,GAAG;AACjC,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE;AAC3C,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE;AACjD,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE;AACvD,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE;AACrD,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAE;AAC3D,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE;AAClD,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,eAAe,EAAE;AAC5D;;;;"}
|
package/cjs/Modal/Modal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sources":["../../src/Modal/Modal.tsx"],"sourcesContent":["import React from 'react';\nimport { useComponentDefaultProps } from '@mantine/styles';\nimport {\n ModalBase,\n ModalBaseDefaultProps,\n ModalBaseOverlayProps,\n ModalBaseCloseButtonProps,\n} from '../ModalBase';\nimport { ModalRoot, ModalRootProps } from './ModalRoot/ModalRoot';\nimport { ModalContent } from './ModalContent/ModalContent';\n\nexport interface ModalProps extends ModalRootProps {\n /** Modal title */\n title?: React.ReactNode;\n\n /** Determines whether overlay should be rendered, true by default */\n withOverlay?: boolean;\n\n /** Props added to Overlay component, use configure opacity, background color, styles and other properties */\n overlayProps?: ModalBaseOverlayProps;\n\n /** Modal content */\n children?: React.ReactNode;\n\n /** Determines whether close button should be rendered, true by default */\n withCloseButton?: boolean;\n\n /** Props added to close button */\n closeButtonProps?: ModalBaseCloseButtonProps;\n}\n\nconst defaultProps: Partial<ModalProps> = {\n ...ModalBaseDefaultProps,\n transitionProps: { duration: 200, transition: 'pop' },\n withOverlay: true,\n withCloseButton: true,\n};\n\nexport function Modal(props: ModalProps) {\n const {\n title,\n withOverlay,\n overlayProps,\n withCloseButton,\n closeButtonProps,\n children,\n ...others\n } = useComponentDefaultProps('Modal', defaultProps, props);\n\n const hasHeader = !!title || withCloseButton;\n\n return (\n <ModalRoot {...others}>\n {withOverlay && <ModalBase.Overlay {...overlayProps} />}\n <ModalContent>\n {hasHeader && (\n <ModalBase.Header>\n {title && <ModalBase.Title>{title}</ModalBase.Title>}\n {withCloseButton && <ModalBase.CloseButton {...closeButtonProps} />}\n </ModalBase.Header>\n )}\n\n <ModalBase.Body>{children}</ModalBase.Body>\n </ModalContent>\n </ModalRoot>\n );\n}\n\nModal.Root = ModalRoot;\nModal.CloseButton = ModalBase.CloseButton;\nModal.Overlay = ModalBase.Overlay;\nModal.Content = ModalContent;\nModal.Header = ModalBase.Header;\nModal.Title = ModalBase.Title;\nModal.Body = ModalBase.Body;\nModal.NativeScrollArea = ModalBase.NativeScrollArea;\n"],"names":["ModalBaseDefaultProps","useComponentDefaultProps","React","ModalRoot","ModalBase","ModalContent"],"mappings":";;;;;;;;;;;;;;AAAA,IAAI,SAA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BAAS,CAAC,KAAK,CAAC;AAC9B,KAAK,CAAC,IAAI,GAAGA,mBAAS,CAAC,IAAI,CAAC;AAC5B,KAAK,CAAC,gBAAgB,GAAGA,mBAAS,CAAC,gBAAgB;;;;"}
|
|
1
|
+
{"version":3,"file":"Modal.js","sources":["../../src/Modal/Modal.tsx"],"sourcesContent":["import React from 'react';\nimport { useComponentDefaultProps } from '@mantine/styles';\nimport {\n ModalBase,\n ModalBaseDefaultProps,\n ModalBaseOverlayProps,\n ModalBaseCloseButtonProps,\n} from '../ModalBase';\nimport { ModalRoot, ModalRootProps } from './ModalRoot/ModalRoot';\nimport { ModalContent } from './ModalContent/ModalContent';\n\nexport interface ModalProps extends Omit<ModalRootProps, 'title'> {\n /** Modal title */\n title?: React.ReactNode;\n\n /** Determines whether overlay should be rendered, true by default */\n withOverlay?: boolean;\n\n /** Props added to Overlay component, use configure opacity, background color, styles and other properties */\n overlayProps?: ModalBaseOverlayProps;\n\n /** Modal content */\n children?: React.ReactNode;\n\n /** Determines whether close button should be rendered, true by default */\n withCloseButton?: boolean;\n\n /** Props added to close button */\n closeButtonProps?: ModalBaseCloseButtonProps;\n}\n\nconst defaultProps: Partial<ModalProps> = {\n ...ModalBaseDefaultProps,\n transitionProps: { duration: 200, transition: 'pop' },\n withOverlay: true,\n withCloseButton: true,\n};\n\nexport function Modal(props: ModalProps) {\n const {\n title,\n withOverlay,\n overlayProps,\n withCloseButton,\n closeButtonProps,\n children,\n ...others\n } = useComponentDefaultProps('Modal', defaultProps, props);\n\n const hasHeader = !!title || withCloseButton;\n\n return (\n <ModalRoot {...others}>\n {withOverlay && <ModalBase.Overlay {...overlayProps} />}\n <ModalContent>\n {hasHeader && (\n <ModalBase.Header>\n {title && <ModalBase.Title>{title}</ModalBase.Title>}\n {withCloseButton && <ModalBase.CloseButton {...closeButtonProps} />}\n </ModalBase.Header>\n )}\n\n <ModalBase.Body>{children}</ModalBase.Body>\n </ModalContent>\n </ModalRoot>\n );\n}\n\nModal.Root = ModalRoot;\nModal.CloseButton = ModalBase.CloseButton;\nModal.Overlay = ModalBase.Overlay;\nModal.Content = ModalContent;\nModal.Header = ModalBase.Header;\nModal.Title = ModalBase.Title;\nModal.Body = ModalBase.Body;\nModal.NativeScrollArea = ModalBase.NativeScrollArea;\n"],"names":["ModalBaseDefaultProps","useComponentDefaultProps","React","ModalRoot","ModalBase","ModalContent"],"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,EA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AC,IAAI,GAAGD,mBAAS,CAAC;AACvB,KAAK,CAAC,WAAW,GAAGC,mBAAS,CAAC,WAAW,CAAC;AAC1C,KAAK,CAAC,OAAO,GAAGA,mBAAS,CAAC,OAAO,CAAC;AAClC,KAAK,CAAC,OAAO,GAAGC,yBAAY,CAAC;AAC7B,KAAK,CAAC,MAAM,GAAGD,mBAAS,CAAC,MAAM,CAAC;AAChC,KAAK,CAAC,KAAK,GAAGA,mBAAS,CAAC,KAAK,CAAC;AAC9B,KAAK,CAAC,IAAI,GAAGA,mBAAS,CAAC,IAAI,CAAC;AAC5B,KAAK,CAAC,gBAAgB,GAAGA,mBAAS,CAAC,gBAAgB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalBase.context.js","sources":["../../src/ModalBase/ModalBase.context.ts"],"sourcesContent":["import { ClassNames, MantineNumberSize, MantineShadow, Styles } from '@mantine/styles';\nimport { createSafeContext } from '@mantine/utils';\nimport { TransitionOverride } from '../Transition';\nimport type { ModalBaseStylesNames } from './ModalBase';\n\ninterface ModalBaseContext {\n __staticSelector: string;\n opened: boolean;\n onClose(): void;\n closeOnClickOutside: boolean;\n transitionProps: TransitionOverride;\n zIndex: number;\n padding: MantineNumberSize;\n id: string;\n getTitleId(): string;\n getBodyId(): string;\n titleMounted: boolean;\n bodyMounted: boolean;\n setTitleMounted(mounted: boolean): void;\n setBodyMounted(mounted: boolean): void;\n trapFocus: boolean;\n closeOnEscape: boolean;\n shadow: MantineShadow;\n stylesApi: {\n name: string;\n size: MantineNumberSize;\n variant: string;\n classNames: ClassNames<ModalBaseStylesNames>;\n styles: Styles<ModalBaseStylesNames>;\n };\n}\n\nexport const [ModalBaseProvider, useModalBaseContext] = createSafeContext<ModalBaseContext>(\n 'ModalBase component was not found in tree'\n);\n"],"names":["createSafeContext"],"mappings":";;;;;;AACY,MAAC,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,GAAGA,uBAAiB,CAAC,2CAA2C;;;;;"}
|
|
1
|
+
{"version":3,"file":"ModalBase.context.js","sources":["../../src/ModalBase/ModalBase.context.ts"],"sourcesContent":["import { ClassNames, MantineNumberSize, MantineShadow, Styles } from '@mantine/styles';\nimport { createSafeContext } from '@mantine/utils';\nimport { TransitionOverride } from '../Transition';\nimport type { ModalBaseStylesNames } from './ModalBase';\n\ninterface ModalBaseContext {\n __staticSelector: string;\n opened: boolean;\n onClose(): void;\n closeOnClickOutside: boolean;\n transitionProps: TransitionOverride;\n zIndex: number;\n padding: MantineNumberSize;\n id: string;\n getTitleId(): string;\n getBodyId(): string;\n titleMounted: boolean;\n bodyMounted: boolean;\n setTitleMounted(mounted: boolean): void;\n setBodyMounted(mounted: boolean): void;\n trapFocus: boolean;\n closeOnEscape: boolean;\n shadow: MantineShadow;\n stylesApi: {\n name: string;\n size: MantineNumberSize;\n variant: string;\n classNames: ClassNames<ModalBaseStylesNames>;\n styles: Styles<ModalBaseStylesNames>;\n unstyled: boolean;\n };\n}\n\nexport const [ModalBaseProvider, useModalBaseContext] = createSafeContext<ModalBaseContext>(\n 'ModalBase component was not found in tree'\n);\n"],"names":["createSafeContext"],"mappings":";;;;;;AACY,MAAC,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,GAAGA,uBAAiB,CAAC,2CAA2C;;;;;"}
|
|
@@ -15,6 +15,7 @@ var ModalBaseTitle = require('./ModalBaseTitle/ModalBaseTitle.js');
|
|
|
15
15
|
var ModalBaseBody = require('./ModalBaseBody/ModalBaseBody.js');
|
|
16
16
|
var NativeScrollArea = require('./NativeScrollArea/NativeScrollArea.js');
|
|
17
17
|
var useLockScroll = require('./use-lock-scroll.js');
|
|
18
|
+
var ModalBase_styles = require('./ModalBase.styles.js');
|
|
18
19
|
var OptionalPortal = require('../Portal/OptionalPortal.js');
|
|
19
20
|
|
|
20
21
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; }
|
|
@@ -40,6 +41,18 @@ var __spreadValues = (a, b) => {
|
|
|
40
41
|
return a;
|
|
41
42
|
};
|
|
42
43
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
44
|
+
var __objRest = (source, exclude) => {
|
|
45
|
+
var target = {};
|
|
46
|
+
for (var prop in source)
|
|
47
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
48
|
+
target[prop] = source[prop];
|
|
49
|
+
if (source != null && __getOwnPropSymbols)
|
|
50
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
51
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
52
|
+
target[prop] = source[prop];
|
|
53
|
+
}
|
|
54
|
+
return target;
|
|
55
|
+
};
|
|
43
56
|
const ModalBaseDefaultProps = {
|
|
44
57
|
closeOnClickOutside: true,
|
|
45
58
|
withinPortal: true,
|
|
@@ -54,7 +67,7 @@ const ModalBaseDefaultProps = {
|
|
|
54
67
|
shadow: "xl"
|
|
55
68
|
};
|
|
56
69
|
function ModalBase(props) {
|
|
57
|
-
const {
|
|
70
|
+
const _a = styles.useComponentDefaultProps(props.__staticSelector, ModalBaseDefaultProps, props), {
|
|
58
71
|
opened,
|
|
59
72
|
onClose,
|
|
60
73
|
children,
|
|
@@ -75,8 +88,42 @@ function ModalBase(props) {
|
|
|
75
88
|
size,
|
|
76
89
|
variant,
|
|
77
90
|
classNames,
|
|
78
|
-
|
|
79
|
-
|
|
91
|
+
unstyled,
|
|
92
|
+
styles: styles$1,
|
|
93
|
+
className
|
|
94
|
+
} = _a, others = __objRest(_a, [
|
|
95
|
+
"opened",
|
|
96
|
+
"onClose",
|
|
97
|
+
"children",
|
|
98
|
+
"closeOnClickOutside",
|
|
99
|
+
"__staticSelector",
|
|
100
|
+
"transitionProps",
|
|
101
|
+
"withinPortal",
|
|
102
|
+
"keepMounted",
|
|
103
|
+
"target",
|
|
104
|
+
"zIndex",
|
|
105
|
+
"lockScroll",
|
|
106
|
+
"trapFocus",
|
|
107
|
+
"closeOnEscape",
|
|
108
|
+
"returnFocus",
|
|
109
|
+
"padding",
|
|
110
|
+
"shadow",
|
|
111
|
+
"id",
|
|
112
|
+
"size",
|
|
113
|
+
"variant",
|
|
114
|
+
"classNames",
|
|
115
|
+
"unstyled",
|
|
116
|
+
"styles",
|
|
117
|
+
"className"
|
|
118
|
+
]);
|
|
119
|
+
const { classes, cx } = ModalBase_styles['default'](null, {
|
|
120
|
+
name: __staticSelector,
|
|
121
|
+
classNames,
|
|
122
|
+
styles: styles$1,
|
|
123
|
+
unstyled,
|
|
124
|
+
variant,
|
|
125
|
+
size
|
|
126
|
+
});
|
|
80
127
|
const _id = hooks.useId(id);
|
|
81
128
|
const [titleMounted, setTitleMounted] = React.useState(false);
|
|
82
129
|
const [bodyMounted, setBodyMounted] = React.useState(false);
|
|
@@ -115,12 +162,15 @@ function ModalBase(props) {
|
|
|
115
162
|
size,
|
|
116
163
|
variant,
|
|
117
164
|
classNames,
|
|
118
|
-
styles: styles$1
|
|
165
|
+
styles: styles$1,
|
|
166
|
+
unstyled
|
|
119
167
|
}
|
|
120
168
|
}
|
|
121
169
|
}, /* @__PURE__ */ React__default.createElement(reactRemoveScroll.RemoveScroll, {
|
|
122
170
|
enabled: shouldLockScroll && lockScroll
|
|
123
|
-
},
|
|
171
|
+
}, /* @__PURE__ */ React__default.createElement("div", __spreadValues({
|
|
172
|
+
className: cx(classes.root, className)
|
|
173
|
+
}, others), children))));
|
|
124
174
|
}
|
|
125
175
|
ModalBase.CloseButton = ModalBaseCloseButton.ModalBaseCloseButton;
|
|
126
176
|
ModalBase.Overlay = ModalBaseOverlay.ModalBaseOverlay;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalBase.js","sources":["../../src/ModalBase/ModalBase.tsx"],"sourcesContent":["/* eslint-disable react/no-unused-prop-types */\nimport React, { useState } from 'react';\nimport { RemoveScroll } from 'react-remove-scroll';\nimport { useId, useWindowEvent, useFocusReturn } from '@mantine/hooks';\nimport {\n getDefaultZIndex,\n MantineNumberSize,\n useComponentDefaultProps,\n ClassNames,\n Styles,\n MantineShadow,\n} from '@mantine/styles';\nimport { OptionalPortal } from '../Portal';\nimport { TransitionOverride } from '../Transition';\nimport { ModalBaseProvider } from './ModalBase.context';\nimport {\n ModalBaseCloseButton,\n ModalBaseCloseButtonStylesNames,\n} from './ModalBaseCloseButton/ModalBaseCloseButton';\nimport { ModalBaseOverlay, ModalBaseOverlayStylesNames } from './ModalBaseOverlay/ModalBaseOverlay';\nimport { ModalBaseContent, ModalBaseContentStylesNames } from './ModalBaseContent/ModalBaseContent';\nimport { ModalBaseHeader, ModalBaseHeaderStylesNames } from './ModalBaseHeader/ModalBaseHeader';\nimport { ModalBaseTitle, ModalBaseTitleStylesNames } from './ModalBaseTitle/ModalBaseTitle';\nimport { ModalBaseBody, ModalBaseBodyStylesNames } from './ModalBaseBody/ModalBaseBody';\nimport { NativeScrollArea } from './NativeScrollArea/NativeScrollArea';\nimport { useLockScroll } from './use-lock-scroll';\n\nexport type ModalBaseStylesNames =\n | ModalBaseCloseButtonStylesNames\n | ModalBaseOverlayStylesNames\n | ModalBaseContentStylesNames\n | ModalBaseHeaderStylesNames\n | ModalBaseTitleStylesNames\n | ModalBaseBodyStylesNames;\n\nexport interface ModalBaseSettings {\n variant?: string;\n classNames?: ClassNames<ModalBaseStylesNames>;\n styles?: Styles<ModalBaseStylesNames>;\n\n /** If set modal/drawer will not be unmounted from the DOM when it is hidden, display: none styles will be added instead */\n keepMounted?: boolean;\n\n /** Determines whether modal/drawer is opened */\n opened: boolean;\n\n /** Called when modal/drawer is closed */\n onClose(): void;\n\n /** Child component */\n children?: React.ReactNode;\n\n /** Determines whether the modal/drawer should be closed when user clicks on the overlay, true by default */\n closeOnClickOutside?: boolean;\n\n /** Transition duration in ms */\n transitionDuration?: number;\n\n /** Props added to Transition component that used to animate overlay and body, use to configure duration and animation type, { duration: 200, transition: 'pop' } by default */\n transitionProps?: TransitionOverride;\n\n /** Determines whether component should be rendered inside Portal, true by default */\n withinPortal?: boolean;\n\n /** Target element or selector where Portal should be rendered, by default new element is created and appended to the document.body */\n target?: HTMLElement | string;\n\n /** Determines whether scroll should be locked when opened={true}, defaults to true */\n lockScroll?: boolean;\n\n /** Determines whether focus should be trapped, true by default */\n trapFocus?: boolean;\n\n /** z-index CSS property of root element, 200 by default */\n zIndex?: number;\n\n /** Key of theme.spacing or any valid CSS value to set content, header and footer padding, 'md' by default */\n padding?: MantineNumberSize;\n\n /** Id used to connect modal/drawer with body and title */\n id?: string;\n\n /** Determines whether focus should be returned to the last active element onClose is called, true by default */\n returnFocus?: boolean;\n\n /** Determines whether onClose should be called when user presses escape key, true by default */\n closeOnEscape?: boolean;\n\n /** Controls content width, 'md' by default */\n size?: MantineNumberSize;\n\n /** Key of theme.shadows or any valid css box-shadow value, 'xl' by default */\n shadow?: MantineShadow;\n}\n\nexport interface ModalBaseProps extends ModalBaseSettings {\n /** Base component name for styles and components default props */\n __staticSelector: string;\n}\n\nexport const ModalBaseDefaultProps: Partial<ModalBaseProps> = {\n closeOnClickOutside: true,\n withinPortal: true,\n lockScroll: true,\n trapFocus: true,\n returnFocus: true,\n closeOnEscape: true,\n keepMounted: false,\n zIndex: getDefaultZIndex('modal'),\n padding: 'md',\n size: 'md',\n shadow: 'xl',\n};\n\nexport function ModalBase(props: ModalBaseProps) {\n const {\n opened,\n onClose,\n children,\n closeOnClickOutside,\n __staticSelector,\n transitionProps,\n withinPortal,\n keepMounted,\n target,\n zIndex,\n lockScroll,\n trapFocus,\n closeOnEscape,\n returnFocus,\n padding,\n shadow,\n id,\n size,\n variant,\n classNames,\n styles,\n } = useComponentDefaultProps(props.__staticSelector, ModalBaseDefaultProps, props);\n\n const _id = useId(id);\n const [titleMounted, setTitleMounted] = useState(false);\n const [bodyMounted, setBodyMounted] = useState(false);\n\n const transitionDuration =\n typeof transitionProps?.duration === 'number' ? transitionProps?.duration : 200;\n\n const shouldLockScroll = useLockScroll({ opened, transitionDuration });\n\n useWindowEvent('keydown', (event) => {\n if (!trapFocus && event.key === 'Escape' && closeOnEscape) {\n onClose();\n }\n });\n\n useFocusReturn({ opened, shouldReturnFocus: trapFocus && returnFocus });\n\n return (\n <OptionalPortal withinPortal={withinPortal} target={target}>\n <ModalBaseProvider\n value={{\n __staticSelector,\n opened,\n onClose,\n closeOnClickOutside,\n transitionProps: { ...transitionProps, duration: transitionDuration, keepMounted },\n zIndex,\n padding,\n id: _id,\n getTitleId: () => `${_id}-title`,\n getBodyId: () => `${_id}-body`,\n titleMounted,\n bodyMounted,\n setTitleMounted,\n setBodyMounted,\n trapFocus,\n closeOnEscape,\n shadow,\n stylesApi: {\n name: __staticSelector,\n size,\n variant,\n classNames,\n styles,\n },\n }}\n >\n <RemoveScroll enabled={shouldLockScroll && lockScroll}>{children}</RemoveScroll>\n </ModalBaseProvider>\n </OptionalPortal>\n );\n}\n\nModalBase.CloseButton = ModalBaseCloseButton;\nModalBase.Overlay = ModalBaseOverlay;\nModalBase.Content = ModalBaseContent;\nModalBase.Header = ModalBaseHeader;\nModalBase.Title = ModalBaseTitle;\nModalBase.Body = ModalBaseBody;\nModalBase.NativeScrollArea = NativeScrollArea;\n"],"names":["getDefaultZIndex","styles","useComponentDefaultProps","useId","useState","useLockScroll","useWindowEvent","useFocusReturn","React","OptionalPortal","ModalBaseProvider","RemoveScroll","ModalBaseCloseButton","ModalBaseOverlay","ModalBaseContent","ModalBaseHeader","ModalBaseTitle","ModalBaseBody","NativeScrollArea"],"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,GA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,EAAE,gBAAgB,IAAI,UAAU;AAC3C,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC;AACD,SAAS,CAAC,WAAW,GAAGC,yCAAoB,CAAC;AAC7C,SAAS,CAAC,OAAO,GAAGC,iCAAgB,CAAC;AACrC,SAAS,CAAC,OAAO,GAAGC,iCAAgB,CAAC;AACrC,SAAS,CAAC,MAAM,GAAGC,+BAAe,CAAC;AACnC,SAAS,CAAC,KAAK,GAAGC,6BAAc,CAAC;AACjC,SAAS,CAAC,IAAI,GAAGC,2BAAa,CAAC;AAC/B,SAAS,CAAC,gBAAgB,GAAGC,iCAAgB;;;;;"}
|
|
1
|
+
{"version":3,"file":"ModalBase.js","sources":["../../src/ModalBase/ModalBase.tsx"],"sourcesContent":["/* eslint-disable react/no-unused-prop-types */\nimport React, { useState } from 'react';\nimport { RemoveScroll } from 'react-remove-scroll';\nimport { useId, useWindowEvent, useFocusReturn } from '@mantine/hooks';\nimport {\n getDefaultZIndex,\n MantineNumberSize,\n useComponentDefaultProps,\n ClassNames,\n Styles,\n MantineShadow,\n Selectors,\n} from '@mantine/styles';\nimport { OptionalPortal } from '../Portal';\nimport { TransitionOverride } from '../Transition';\nimport { ModalBaseProvider } from './ModalBase.context';\nimport {\n ModalBaseCloseButton,\n ModalBaseCloseButtonStylesNames,\n} from './ModalBaseCloseButton/ModalBaseCloseButton';\nimport { ModalBaseOverlay, ModalBaseOverlayStylesNames } from './ModalBaseOverlay/ModalBaseOverlay';\nimport { ModalBaseContent, ModalBaseContentStylesNames } from './ModalBaseContent/ModalBaseContent';\nimport { ModalBaseHeader, ModalBaseHeaderStylesNames } from './ModalBaseHeader/ModalBaseHeader';\nimport { ModalBaseTitle, ModalBaseTitleStylesNames } from './ModalBaseTitle/ModalBaseTitle';\nimport { ModalBaseBody, ModalBaseBodyStylesNames } from './ModalBaseBody/ModalBaseBody';\nimport { NativeScrollArea } from './NativeScrollArea/NativeScrollArea';\nimport { useLockScroll } from './use-lock-scroll';\nimport useStyles from './ModalBase.styles';\n\nexport type ModalBaseStylesNames =\n | Selectors<typeof useStyles>\n | ModalBaseCloseButtonStylesNames\n | ModalBaseOverlayStylesNames\n | ModalBaseContentStylesNames\n | ModalBaseHeaderStylesNames\n | ModalBaseTitleStylesNames\n | ModalBaseBodyStylesNames;\n\nexport interface ModalBaseSettings extends React.ComponentPropsWithoutRef<'div'> {\n variant?: string;\n classNames?: ClassNames<ModalBaseStylesNames>;\n styles?: Styles<ModalBaseStylesNames>;\n unstyled?: boolean;\n\n /** If set modal/drawer will not be unmounted from the DOM when it is hidden, display: none styles will be added instead */\n keepMounted?: boolean;\n\n /** Determines whether modal/drawer is opened */\n opened: boolean;\n\n /** Called when modal/drawer is closed */\n onClose(): void;\n\n /** Child component */\n children?: React.ReactNode;\n\n /** Determines whether the modal/drawer should be closed when user clicks on the overlay, true by default */\n closeOnClickOutside?: boolean;\n\n /** Transition duration in ms */\n transitionDuration?: number;\n\n /** Props added to Transition component that used to animate overlay and body, use to configure duration and animation type, { duration: 200, transition: 'pop' } by default */\n transitionProps?: TransitionOverride;\n\n /** Determines whether component should be rendered inside Portal, true by default */\n withinPortal?: boolean;\n\n /** Target element or selector where Portal should be rendered, by default new element is created and appended to the document.body */\n target?: HTMLElement | string;\n\n /** Determines whether scroll should be locked when opened={true}, defaults to true */\n lockScroll?: boolean;\n\n /** Determines whether focus should be trapped, true by default */\n trapFocus?: boolean;\n\n /** z-index CSS property of root element, 200 by default */\n zIndex?: number;\n\n /** Key of theme.spacing or any valid CSS value to set content, header and footer padding, 'md' by default */\n padding?: MantineNumberSize;\n\n /** Id used to connect modal/drawer with body and title */\n id?: string;\n\n /** Determines whether focus should be returned to the last active element onClose is called, true by default */\n returnFocus?: boolean;\n\n /** Determines whether onClose should be called when user presses escape key, true by default */\n closeOnEscape?: boolean;\n\n /** Controls content width, 'md' by default */\n size?: MantineNumberSize;\n\n /** Key of theme.shadows or any valid css box-shadow value, 'xl' by default */\n shadow?: MantineShadow;\n}\n\nexport interface ModalBaseProps extends ModalBaseSettings {\n /** Base component name for styles and components default props */\n __staticSelector: string;\n}\n\nexport const ModalBaseDefaultProps: Partial<ModalBaseProps> = {\n closeOnClickOutside: true,\n withinPortal: true,\n lockScroll: true,\n trapFocus: true,\n returnFocus: true,\n closeOnEscape: true,\n keepMounted: false,\n zIndex: getDefaultZIndex('modal'),\n padding: 'md',\n size: 'md',\n shadow: 'xl',\n};\n\nexport function ModalBase(props: ModalBaseProps) {\n const {\n opened,\n onClose,\n children,\n closeOnClickOutside,\n __staticSelector,\n transitionProps,\n withinPortal,\n keepMounted,\n target,\n zIndex,\n lockScroll,\n trapFocus,\n closeOnEscape,\n returnFocus,\n padding,\n shadow,\n id,\n size,\n variant,\n classNames,\n unstyled,\n styles,\n className,\n ...others\n } = useComponentDefaultProps(props.__staticSelector, ModalBaseDefaultProps, props);\n\n const { classes, cx } = useStyles(null, {\n name: __staticSelector,\n classNames,\n styles,\n unstyled,\n variant,\n size,\n });\n\n const _id = useId(id);\n const [titleMounted, setTitleMounted] = useState(false);\n const [bodyMounted, setBodyMounted] = useState(false);\n\n const transitionDuration =\n typeof transitionProps?.duration === 'number' ? transitionProps?.duration : 200;\n\n const shouldLockScroll = useLockScroll({ opened, transitionDuration });\n\n useWindowEvent('keydown', (event) => {\n if (!trapFocus && event.key === 'Escape' && closeOnEscape) {\n onClose();\n }\n });\n\n useFocusReturn({ opened, shouldReturnFocus: trapFocus && returnFocus });\n\n return (\n <OptionalPortal withinPortal={withinPortal} target={target}>\n <ModalBaseProvider\n value={{\n __staticSelector,\n opened,\n onClose,\n closeOnClickOutside,\n transitionProps: { ...transitionProps, duration: transitionDuration, keepMounted },\n zIndex,\n padding,\n id: _id,\n getTitleId: () => `${_id}-title`,\n getBodyId: () => `${_id}-body`,\n titleMounted,\n bodyMounted,\n setTitleMounted,\n setBodyMounted,\n trapFocus,\n closeOnEscape,\n shadow,\n stylesApi: {\n name: __staticSelector,\n size,\n variant,\n classNames,\n styles,\n unstyled,\n },\n }}\n >\n <RemoveScroll enabled={shouldLockScroll && lockScroll}>\n <div className={cx(classes.root, className)} {...others}>\n {children}\n </div>\n </RemoveScroll>\n </ModalBaseProvider>\n </OptionalPortal>\n );\n}\n\nModalBase.CloseButton = ModalBaseCloseButton;\nModalBase.Overlay = ModalBaseOverlay;\nModalBase.Content = ModalBaseContent;\nModalBase.Header = ModalBaseHeader;\nModalBase.Title = ModalBaseTitle;\nModalBase.Body = ModalBaseBody;\nModalBase.NativeScrollArea = NativeScrollArea;\n"],"names":["getDefaultZIndex","useComponentDefaultProps","styles","useStyles","useId","useState","useLockScroll","useWindowEvent","useFocusReturn","React","OptionalPortal","ModalBaseProvider","RemoveScroll","ModalBaseCloseButton","ModalBaseOverlay","ModalBaseContent","ModalBaseHeader","ModalBaseTitle","ModalBaseBody","NativeScrollArea"],"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,E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E,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC;AAC1C,GAAG,EAAE,MAAM,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3B,CAAC;AACD,SAAS,CAAC,WAAW,GAAGI,yCAAoB,CAAC;AAC7C,SAAS,CAAC,OAAO,GAAGC,iCAAgB,CAAC;AACrC,SAAS,CAAC,OAAO,GAAGC,iCAAgB,CAAC;AACrC,SAAS,CAAC,MAAM,GAAGC,+BAAe,CAAC;AACnC,SAAS,CAAC,KAAK,GAAGC,6BAAc,CAAC;AACjC,SAAS,CAAC,IAAI,GAAGC,2BAAa,CAAC;AAC/B,SAAS,CAAC,gBAAgB,GAAGC,iCAAgB;;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var styles = require('@mantine/styles');
|
|
6
|
+
|
|
7
|
+
var useStyles = styles.createStyles(() => ({
|
|
8
|
+
root: {}
|
|
9
|
+
}));
|
|
10
|
+
|
|
11
|
+
exports.default = useStyles;
|
|
12
|
+
//# sourceMappingURL=ModalBase.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalBase.styles.js","sources":["../../src/ModalBase/ModalBase.styles.ts"],"sourcesContent":["import { createStyles } from '@mantine/styles';\n\nexport default createStyles(() => ({\n root: {},\n}));\n"],"names":["createStyles"],"mappings":";;;;;;AACA,gBAAeA,mBAAY,CAAC,OAAO;AACnC,EAAE,IAAI,EAAE,EAAE;AACV,CAAC,CAAC,CAAC;;;;"}
|
|
@@ -15,33 +15,33 @@ const SYSTEM_PROPS = {
|
|
|
15
15
|
py: { type: "spacing", property: ["paddingTop", "paddingBottom"] },
|
|
16
16
|
bg: { type: "color", property: "background" },
|
|
17
17
|
c: { type: "color", property: "color" },
|
|
18
|
-
opacity: { type: "
|
|
19
|
-
ff: { type: "
|
|
18
|
+
opacity: { type: "identity", property: "opacity" },
|
|
19
|
+
ff: { type: "identity", property: "fontFamily" },
|
|
20
20
|
fz: { type: "fontSize", property: "fontSize" },
|
|
21
|
-
fw: { type: "
|
|
22
|
-
lts: { type: "
|
|
23
|
-
ta: { type: "
|
|
24
|
-
lh: { type: "
|
|
25
|
-
fs: { type: "
|
|
26
|
-
tt: { type: "
|
|
27
|
-
td: { type: "
|
|
21
|
+
fw: { type: "identity", property: "fontWeight" },
|
|
22
|
+
lts: { type: "size", property: "letterSpacing" },
|
|
23
|
+
ta: { type: "identity", property: "textAlign" },
|
|
24
|
+
lh: { type: "identity", property: "lineHeight" },
|
|
25
|
+
fs: { type: "identity", property: "fontStyle" },
|
|
26
|
+
tt: { type: "identity", property: "textTransform" },
|
|
27
|
+
td: { type: "identity", property: "textDecoration" },
|
|
28
28
|
w: { type: "spacing", property: "width" },
|
|
29
29
|
miw: { type: "spacing", property: "minWidth" },
|
|
30
30
|
maw: { type: "spacing", property: "maxWidth" },
|
|
31
31
|
h: { type: "spacing", property: "height" },
|
|
32
32
|
mih: { type: "spacing", property: "minHeight" },
|
|
33
33
|
mah: { type: "spacing", property: "maxHeight" },
|
|
34
|
-
bgsz: { type: "
|
|
35
|
-
bgp: { type: "
|
|
36
|
-
bgr: { type: "
|
|
37
|
-
bga: { type: "
|
|
38
|
-
pos: { type: "
|
|
39
|
-
top: { type: "
|
|
40
|
-
left: { type: "
|
|
41
|
-
bottom: { type: "
|
|
42
|
-
right: { type: "
|
|
43
|
-
inset: { type: "
|
|
44
|
-
display: { type: "
|
|
34
|
+
bgsz: { type: "size", property: "background-size" },
|
|
35
|
+
bgp: { type: "identity", property: "background-position" },
|
|
36
|
+
bgr: { type: "identity", property: "background-repeat" },
|
|
37
|
+
bga: { type: "identity", property: "background-attachment" },
|
|
38
|
+
pos: { type: "identity", property: "position" },
|
|
39
|
+
top: { type: "identity", property: "top" },
|
|
40
|
+
left: { type: "size", property: "left" },
|
|
41
|
+
bottom: { type: "size", property: "bottom" },
|
|
42
|
+
right: { type: "size", property: "right" },
|
|
43
|
+
inset: { type: "size", property: "inset" },
|
|
44
|
+
display: { type: "identity", property: "display" }
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
export { SYSTEM_PROPS };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-props.js","sources":["../../../../src/Box/style-system-props/system-props/system-props.ts"],"sourcesContent":["import type { StyleProperty } from '../get-responsive-value/get-responsive-value';\nimport type { SystemValueType } from '../value-getters/value-getters';\n\nexport interface SystemPropData {\n type: SystemValueType;\n property: StyleProperty;\n}\n\nexport const SYSTEM_PROPS: Record<string, SystemPropData> = {\n m: { type: 'spacing', property: 'margin' },\n mt: { type: 'spacing', property: 'marginTop' },\n mb: { type: 'spacing', property: 'marginBottom' },\n ml: { type: 'spacing', property: 'marginLeft' },\n mr: { type: 'spacing', property: 'marginRight' },\n mx: { type: 'spacing', property: ['marginRight', 'marginLeft'] },\n my: { type: 'spacing', property: ['marginTop', 'marginBottom'] },\n\n p: { type: 'spacing', property: 'padding' },\n pt: { type: 'spacing', property: 'paddingTop' },\n pb: { type: 'spacing', property: 'paddingBottom' },\n pl: { type: 'spacing', property: 'paddingLeft' },\n pr: { type: 'spacing', property: 'paddingRight' },\n px: { type: 'spacing', property: ['paddingRight', 'paddingLeft'] },\n py: { type: 'spacing', property: ['paddingTop', 'paddingBottom'] },\n\n bg: { type: 'color', property: 'background' },\n c: { type: 'color', property: 'color' },\n opacity: { type: '
|
|
1
|
+
{"version":3,"file":"system-props.js","sources":["../../../../src/Box/style-system-props/system-props/system-props.ts"],"sourcesContent":["import type { StyleProperty } from '../get-responsive-value/get-responsive-value';\nimport type { SystemValueType } from '../value-getters/value-getters';\n\nexport interface SystemPropData {\n type: SystemValueType;\n property: StyleProperty;\n}\n\nexport const SYSTEM_PROPS: Record<string, SystemPropData> = {\n m: { type: 'spacing', property: 'margin' },\n mt: { type: 'spacing', property: 'marginTop' },\n mb: { type: 'spacing', property: 'marginBottom' },\n ml: { type: 'spacing', property: 'marginLeft' },\n mr: { type: 'spacing', property: 'marginRight' },\n mx: { type: 'spacing', property: ['marginRight', 'marginLeft'] },\n my: { type: 'spacing', property: ['marginTop', 'marginBottom'] },\n\n p: { type: 'spacing', property: 'padding' },\n pt: { type: 'spacing', property: 'paddingTop' },\n pb: { type: 'spacing', property: 'paddingBottom' },\n pl: { type: 'spacing', property: 'paddingLeft' },\n pr: { type: 'spacing', property: 'paddingRight' },\n px: { type: 'spacing', property: ['paddingRight', 'paddingLeft'] },\n py: { type: 'spacing', property: ['paddingTop', 'paddingBottom'] },\n\n bg: { type: 'color', property: 'background' },\n c: { type: 'color', property: 'color' },\n opacity: { type: 'identity', property: 'opacity' },\n\n ff: { type: 'identity', property: 'fontFamily' },\n fz: { type: 'fontSize', property: 'fontSize' },\n fw: { type: 'identity', property: 'fontWeight' },\n lts: { type: 'size', property: 'letterSpacing' },\n ta: { type: 'identity', property: 'textAlign' },\n lh: { type: 'identity', property: 'lineHeight' },\n fs: { type: 'identity', property: 'fontStyle' },\n tt: { type: 'identity', property: 'textTransform' },\n td: { type: 'identity', property: 'textDecoration' },\n\n w: { type: 'spacing', property: 'width' },\n miw: { type: 'spacing', property: 'minWidth' },\n maw: { type: 'spacing', property: 'maxWidth' },\n h: { type: 'spacing', property: 'height' },\n mih: { type: 'spacing', property: 'minHeight' },\n mah: { type: 'spacing', property: 'maxHeight' },\n\n bgsz: { type: 'size', property: 'background-size' },\n bgp: { type: 'identity', property: 'background-position' },\n bgr: { type: 'identity', property: 'background-repeat' },\n bga: { type: 'identity', property: 'background-attachment' },\n\n pos: { type: 'identity', property: 'position' },\n top: { type: 'identity', property: 'top' },\n left: { type: 'size', property: 'left' },\n bottom: { type: 'size', property: 'bottom' },\n right: { type: 'size', property: 'right' },\n inset: { type: 'size', property: 'inset' },\n\n display: { type: 'identity', property: 'display' },\n};\n"],"names":[],"mappings":"AAAY,MAAC,YAAY,GA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5
5
|
}
|
|
6
|
+
function identity(value) {
|
|
7
|
+
return value;
|
|
8
|
+
}
|
|
6
9
|
|
|
7
|
-
export {
|
|
10
|
+
export { getSizeValue, identity };
|
|
8
11
|
//# sourceMappingURL=get-default-value.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-default-value.js","sources":["../../../../src/Box/style-system-props/value-getters/get-default-value.ts"],"sourcesContent":["import { rem } from '@mantine/styles';\n\nexport function
|
|
1
|
+
{"version":3,"file":"get-default-value.js","sources":["../../../../src/Box/style-system-props/value-getters/get-default-value.ts"],"sourcesContent":["import { rem } from '@mantine/styles';\n\nexport function getSizeValue<T>(value: T) {\n return rem(value);\n}\n\nexport function identity<T>(value: T) {\n return value;\n}\n"],"names":[],"mappings":";;AACO,SAAS,YAAY,CAAC,KAAK,EAAE;AACpC,EAAE,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC;AACpB,CAAC;AACM,SAAS,QAAQ,CAAC,KAAK,EAAE;AAChC,EAAE,OAAO,KAAK,CAAC;AACf;;;;"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { getColorValue } from './get-color-value.js';
|
|
2
|
-
import {
|
|
2
|
+
import { identity, getSizeValue } from './get-default-value.js';
|
|
3
3
|
import { getFontSizeValue } from './get-font-size-value.js';
|
|
4
4
|
import { getSpacingValue } from './get-spacing-value.js';
|
|
5
5
|
|
|
6
6
|
const valueGetters = {
|
|
7
|
+
identity,
|
|
7
8
|
color: getColorValue,
|
|
8
|
-
|
|
9
|
+
size: getSizeValue,
|
|
9
10
|
fontSize: getFontSizeValue,
|
|
10
11
|
spacing: getSpacingValue
|
|
11
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"value-getters.js","sources":["../../../../src/Box/style-system-props/value-getters/value-getters.ts"],"sourcesContent":["import { getColorValue } from './get-color-value';\nimport {
|
|
1
|
+
{"version":3,"file":"value-getters.js","sources":["../../../../src/Box/style-system-props/value-getters/value-getters.ts"],"sourcesContent":["import { getColorValue } from './get-color-value';\nimport { getSizeValue, identity } from './get-default-value';\nimport { getFontSizeValue } from './get-font-size-value';\nimport { getSpacingValue } from './get-spacing-value';\n\nexport const valueGetters = {\n identity,\n color: getColorValue,\n size: getSizeValue,\n fontSize: getFontSizeValue,\n spacing: getSpacingValue,\n};\n\nexport type SystemValueType = keyof typeof valueGetters;\n"],"names":[],"mappings":";;;;;AAIY,MAAC,YAAY,GAAG;AAC5B,EAAE,QAAQ;AACV,EAAE,KAAK,EAAE,aAAa;AACtB,EAAE,IAAI,EAAE,YAAY;AACpB,EAAE,QAAQ,EAAE,gBAAgB;AAC5B,EAAE,OAAO,EAAE,eAAe;AAC1B;;;;"}
|
package/esm/Drawer/Drawer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.js","sources":["../../src/Drawer/Drawer.tsx"],"sourcesContent":["import React from 'react';\nimport { useComponentDefaultProps } from '@mantine/styles';\nimport {\n ModalBase,\n ModalBaseDefaultProps,\n ModalBaseOverlayProps,\n ModalBaseCloseButtonProps,\n} from '../ModalBase';\nimport { DrawerRoot, DrawerRootProps } from './DrawerRoot/DrawerRoot';\nimport { DrawerContent } from './DrawerContent/DrawerContent';\n\nexport interface DrawerProps extends DrawerRootProps {\n /** Modal title */\n title?: React.ReactNode;\n\n /** Determines whether overlay should be rendered, true by default */\n withOverlay?: boolean;\n\n /** Props added to Overlay component, use configure opacity, background color, styles and other properties */\n overlayProps?: ModalBaseOverlayProps;\n\n /** Modal content */\n children?: React.ReactNode;\n\n /** Determines whether close button should be rendered, true by default */\n withCloseButton?: boolean;\n\n /** Props added to close button */\n closeButtonProps?: ModalBaseCloseButtonProps;\n}\n\nconst defaultProps: Partial<DrawerProps> = {\n ...ModalBaseDefaultProps,\n withOverlay: true,\n withCloseButton: true,\n};\n\nexport function Drawer(props: DrawerProps) {\n const {\n title,\n withOverlay,\n overlayProps,\n withCloseButton,\n closeButtonProps,\n children,\n ...others\n } = useComponentDefaultProps('Drawer', defaultProps, props);\n\n const hasHeader = !!title || withCloseButton;\n\n return (\n <DrawerRoot {...others}>\n {withOverlay && <ModalBase.Overlay {...overlayProps} />}\n <DrawerContent>\n {hasHeader && (\n <ModalBase.Header>\n {title && <ModalBase.Title>{title}</ModalBase.Title>}\n {withCloseButton && <ModalBase.CloseButton {...closeButtonProps} />}\n </ModalBase.Header>\n )}\n\n <ModalBase.Body>{children}</ModalBase.Body>\n </DrawerContent>\n </DrawerRoot>\n );\n}\n\nDrawer.Root = DrawerRoot;\nDrawer.CloseButton = ModalBase.CloseButton;\nDrawer.Overlay = ModalBase.Overlay;\nDrawer.Content = DrawerContent;\nDrawer.Header = ModalBase.Header;\nDrawer.Title = ModalBase.Title;\nDrawer.Body = ModalBase.Body;\nDrawer.NativeScrollArea = ModalBase.NativeScrollArea;\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,IA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,CAAC,WAAW,EAAE,cAAc,CAAC,EAAE,EAAE,gBAAgB,CAAC,CAAC,CAAC,kBAAkB,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;AACxkB,CAAC;AACD,MAAM,CAAC,IAAI,GAAG,UAAU,CAAC;AACzB,MAAM,CAAC,WAAW,GAAG,SAAS,CAAC,WAAW,CAAC;AAC3C,MAAM,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;AACnC,MAAM,CAAC,OAAO,GAAG,aAAa,CAAC;AAC/B,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC;AACjC,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC;AAC/B,MAAM,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC;AAC7B,MAAM,CAAC,gBAAgB,GAAG,SAAS,CAAC,gBAAgB;;;;"}
|
|
1
|
+
{"version":3,"file":"Drawer.js","sources":["../../src/Drawer/Drawer.tsx"],"sourcesContent":["import React from 'react';\nimport { useComponentDefaultProps } from '@mantine/styles';\nimport {\n ModalBase,\n ModalBaseDefaultProps,\n ModalBaseOverlayProps,\n ModalBaseCloseButtonProps,\n} from '../ModalBase';\nimport { DrawerRoot, DrawerRootProps } from './DrawerRoot/DrawerRoot';\nimport { DrawerContent } from './DrawerContent/DrawerContent';\n\nexport interface DrawerProps extends Omit<DrawerRootProps, 'title'> {\n /** Modal title */\n title?: React.ReactNode;\n\n /** Determines whether overlay should be rendered, true by default */\n withOverlay?: boolean;\n\n /** Props added to Overlay component, use configure opacity, background color, styles and other properties */\n overlayProps?: ModalBaseOverlayProps;\n\n /** Modal content */\n children?: React.ReactNode;\n\n /** Determines whether close button should be rendered, true by default */\n withCloseButton?: boolean;\n\n /** Props added to close button */\n closeButtonProps?: ModalBaseCloseButtonProps;\n}\n\nconst defaultProps: Partial<DrawerProps> = {\n ...ModalBaseDefaultProps,\n withOverlay: true,\n withCloseButton: true,\n};\n\nexport function Drawer(props: DrawerProps) {\n const {\n title,\n withOverlay,\n overlayProps,\n withCloseButton,\n closeButtonProps,\n children,\n ...others\n } = useComponentDefaultProps('Drawer', defaultProps, props);\n\n const hasHeader = !!title || withCloseButton;\n\n return (\n <DrawerRoot {...others}>\n {withOverlay && <ModalBase.Overlay {...overlayProps} />}\n <DrawerContent>\n {hasHeader && (\n <ModalBase.Header>\n {title && <ModalBase.Title>{title}</ModalBase.Title>}\n {withCloseButton && <ModalBase.CloseButton {...closeButtonProps} />}\n </ModalBase.Header>\n )}\n\n <ModalBase.Body>{children}</ModalBase.Body>\n </DrawerContent>\n </DrawerRoot>\n );\n}\n\nDrawer.Root = DrawerRoot;\nDrawer.CloseButton = ModalBase.CloseButton;\nDrawer.Overlay = ModalBase.Overlay;\nDrawer.Content = DrawerContent;\nDrawer.Header = ModalBase.Header;\nDrawer.Title = ModalBase.Title;\nDrawer.Body = ModalBase.Body;\nDrawer.NativeScrollArea = ModalBase.NativeScrollArea;\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,GA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CAAC,aAAa,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,eAAe,oBAAoB,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,WAAW,EAAE,cAAc,CAAC,EAAE,EAAE,gBAAgB,CAAC,CAAC,CAAC,kBAAkB,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;AACxkB,CAAC;AACD,MAAM,CAAC,IAAI,GAAG,UAAU,CAAC;AACzB,MAAM,CAAC,WAAW,GAAG,SAAS,CAAC,WAAW,CAAC;AAC3C,MAAM,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;AACnC,MAAM,CAAC,OAAO,GAAG,aAAa,CAAC;AAC/B,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC;AACjC,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC;AAC/B,MAAM,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC;AAC7B,MAAM,CAAC,gBAAgB,GAAG,SAAS,CAAC,gBAAgB;;;;"}
|
package/esm/Flex/flex-props.js
CHANGED
|
@@ -2,10 +2,10 @@ const FLEX_SYSTEM_PROPS = {
|
|
|
2
2
|
gap: { type: "spacing", property: "gap" },
|
|
3
3
|
rowGap: { type: "spacing", property: "rowGap" },
|
|
4
4
|
columnGap: { type: "spacing", property: "columnGap" },
|
|
5
|
-
align: { type: "
|
|
6
|
-
justify: { type: "
|
|
7
|
-
wrap: { type: "
|
|
8
|
-
direction: { type: "
|
|
5
|
+
align: { type: "identity", property: "alignItems" },
|
|
6
|
+
justify: { type: "identity", property: "justifyContent" },
|
|
7
|
+
wrap: { type: "identity", property: "flexWrap" },
|
|
8
|
+
direction: { type: "identity", property: "flexDirection" }
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { FLEX_SYSTEM_PROPS };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flex-props.js","sources":["../../src/Flex/flex-props.ts"],"sourcesContent":["import type { SystemPropData } from '../Box';\n\nexport const FLEX_SYSTEM_PROPS: Record<string, SystemPropData> = {\n gap: { type: 'spacing', property: 'gap' },\n rowGap: { type: 'spacing', property: 'rowGap' },\n columnGap: { type: 'spacing', property: 'columnGap' },\n\n align: { type: '
|
|
1
|
+
{"version":3,"file":"flex-props.js","sources":["../../src/Flex/flex-props.ts"],"sourcesContent":["import type { SystemPropData } from '../Box';\n\nexport const FLEX_SYSTEM_PROPS: Record<string, SystemPropData> = {\n gap: { type: 'spacing', property: 'gap' },\n rowGap: { type: 'spacing', property: 'rowGap' },\n columnGap: { type: 'spacing', property: 'columnGap' },\n\n align: { type: 'identity', property: 'alignItems' },\n justify: { type: 'identity', property: 'justifyContent' },\n wrap: { type: 'identity', property: 'flexWrap' },\n direction: { type: 'identity', property: 'flexDirection' },\n};\n"],"names":[],"mappings":"AAAY,MAAC,iBAAiB,GAAG;AACjC,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE;AAC3C,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE;AACjD,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE;AACvD,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE;AACrD,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAE;AAC3D,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE;AAClD,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,eAAe,EAAE;AAC5D;;;;"}
|