@mantine/core 3.3.1 → 3.3.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/components/Popper/Popper.js +1 -1
- package/cjs/components/Popper/Popper.js.map +1 -1
- package/cjs/components/Select/SelectDropdown/SelectDropdown.js +9 -5
- package/cjs/components/Select/SelectDropdown/SelectDropdown.js.map +1 -1
- package/cjs/components/Select/SelectDropdown/SelectDropdown.styles.js +1 -1
- package/cjs/components/Select/SelectDropdown/SelectDropdown.styles.js.map +1 -1
- package/cjs/components/Select/SelectScrollArea/SelectScrollArea.js +1 -1
- package/cjs/components/Select/SelectScrollArea/SelectScrollArea.js.map +1 -1
- package/esm/components/Popper/Popper.js +1 -1
- package/esm/components/Popper/Popper.js.map +1 -1
- package/esm/components/Select/SelectDropdown/SelectDropdown.js +9 -5
- package/esm/components/Select/SelectDropdown/SelectDropdown.js.map +1 -1
- package/esm/components/Select/SelectDropdown/SelectDropdown.styles.js +1 -1
- package/esm/components/Select/SelectDropdown/SelectDropdown.styles.js.map +1 -1
- package/esm/components/Select/SelectScrollArea/SelectScrollArea.js +1 -1
- package/esm/components/Select/SelectScrollArea/SelectScrollArea.js.map +1 -1
- package/lib/components/Select/SelectDropdown/SelectDropdown.d.ts.map +1 -1
- package/lib/components/Select/SelectScrollArea/SelectScrollArea.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -76,7 +76,7 @@ function Popper({
|
|
|
76
76
|
typeof forceUpdate === "function" && forceUpdate();
|
|
77
77
|
}, forceUpdateDependencies);
|
|
78
78
|
return /* @__PURE__ */ React__default.createElement(Transition.Transition, {
|
|
79
|
-
mounted,
|
|
79
|
+
mounted: mounted && !!referenceElement,
|
|
80
80
|
duration: transitionDuration,
|
|
81
81
|
transition,
|
|
82
82
|
timingFunction: transitionTimingFunction,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popper.js","sources":["../../../src/components/Popper/Popper.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { usePopper, StrictModifier } from 'react-popper';\nimport { getDefaultZIndex } from '@mantine/styles';\nimport type { Placement } from '@popperjs/core';\nimport { useDidUpdate } from '@mantine/hooks';\nimport { Transition, MantineTransition } from '../Transition';\nimport { parsePopperPosition } from './parse-popper-position/parse-popper-position';\nimport { PopperContainer } from './PopperContainer/PopperContainer';\nimport useStyles from './Popper.styles';\n\nexport interface SharedPopperProps {\n /** Position relative to reference element */\n position?: 'top' | 'left' | 'bottom' | 'right';\n\n /** Placement relative to reference element */\n placement?: 'start' | 'center' | 'end';\n\n /** Spacing between element and popper in px */\n gutter?: number;\n\n /** Arrow size in px */\n arrowSize?: number;\n\n /** Renders arrow if true */\n withArrow?: boolean;\n\n /** Popper z-index */\n zIndex?: number;\n\n /** Customize mount/unmount transition */\n transition?: MantineTransition;\n\n /** Mount/unmount transition duration in ms */\n transitionDuration?: number;\n\n /** Mount/unmount transition timing function, defaults to theme.transitionTimingFunction */\n transitionTimingFunction?: string;\n}\n\nexport interface PopperProps<T extends HTMLElement> extends SharedPopperProps {\n /** Element at which popper should be attached */\n referenceElement: T;\n\n /** Popper content */\n children: React.ReactNode;\n\n /** True to show popper, false to hide */\n mounted: boolean;\n\n /** Arrow class name */\n arrowClassName?: string;\n\n /** Arrow inline styles */\n arrowStyle?: React.CSSProperties;\n\n /** useEffect dependencies to force update popper position */\n forceUpdateDependencies?: any[];\n\n /** Called when transition ends */\n onTransitionEnd?(): void;\n\n /** Popperjs modifiers array */\n modifiers?: StrictModifier[];\n\n /** Whether to render the target element in a Portal */\n withinPortal?: boolean;\n}\n\nexport function Popper<T extends HTMLElement = HTMLDivElement>({\n position = 'top',\n placement = 'center',\n gutter = 5,\n arrowSize = 2,\n withArrow = false,\n referenceElement,\n children,\n mounted,\n transition = 'pop-top-left',\n transitionDuration,\n transitionTimingFunction,\n arrowClassName,\n arrowStyle,\n zIndex = getDefaultZIndex('popover'),\n forceUpdateDependencies = [],\n modifiers = [],\n onTransitionEnd,\n withinPortal = true,\n}: PopperProps<T>) {\n const padding = withArrow ? gutter + arrowSize : gutter;\n const { classes, cx } = useStyles({ arrowSize }, { name: 'Popper' });\n const [popperElement, setPopperElement] = useState(null);\n\n const initialPlacement: Placement =\n placement === 'center' ? position : `${position}-${placement}`;\n\n const { styles, attributes, forceUpdate } = usePopper(referenceElement, popperElement, {\n placement: initialPlacement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, padding],\n },\n },\n ...modifiers,\n ],\n });\n\n const parsedAttributes = parsePopperPosition(attributes.popper?.['data-popper-placement']);\n\n useDidUpdate(() => {\n typeof forceUpdate === 'function' && forceUpdate();\n }, forceUpdateDependencies);\n\n return (\n <Transition\n mounted={mounted}\n duration={transitionDuration}\n transition={transition}\n timingFunction={transitionTimingFunction}\n onExited={onTransitionEnd}\n >\n {(transitionStyles) => (\n <div>\n <PopperContainer withinPortal={withinPortal} zIndex={zIndex}>\n <div\n ref={setPopperElement}\n style={{ ...styles.popper, pointerEvents: 'none' }}\n {...attributes.popper}\n >\n <div style={transitionStyles}>\n {children}\n {withArrow && (\n <div\n style={arrowStyle}\n className={cx(\n classes.arrow,\n classes[parsedAttributes.placement],\n classes[parsedAttributes.position],\n arrowClassName\n )}\n />\n )}\n </div>\n </div>\n </PopperContainer>\n </div>\n )}\n </Transition>\n );\n}\n\nPopper.displayName = '@mantine/core/Popper';\n"],"names":["getDefaultZIndex","useStyles","useState","usePopper","parsePopperPosition","useDidUpdate","React","Transition","PopperContainer"],"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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,MAAM,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,uBAAuB,CAAC,CAAC,CAAC;AACxH,EAAEC,kBAAY,CAAC,MAAM;AACrB,IAAI,OAAO,WAAW,KAAK,UAAU,IAAI,WAAW,EAAE,CAAC;AACvD,GAAG,EAAE,uBAAuB,CAAC,CAAC;AAC9B,EAAE,uBAAuBC,cAAK,CAAC,aAAa,CAACC,qBAAU,EAAE;AACzD,IAAI,OAAO;
|
|
1
|
+
{"version":3,"file":"Popper.js","sources":["../../../src/components/Popper/Popper.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { usePopper, StrictModifier } from 'react-popper';\nimport { getDefaultZIndex } from '@mantine/styles';\nimport type { Placement } from '@popperjs/core';\nimport { useDidUpdate } from '@mantine/hooks';\nimport { Transition, MantineTransition } from '../Transition';\nimport { parsePopperPosition } from './parse-popper-position/parse-popper-position';\nimport { PopperContainer } from './PopperContainer/PopperContainer';\nimport useStyles from './Popper.styles';\n\nexport interface SharedPopperProps {\n /** Position relative to reference element */\n position?: 'top' | 'left' | 'bottom' | 'right';\n\n /** Placement relative to reference element */\n placement?: 'start' | 'center' | 'end';\n\n /** Spacing between element and popper in px */\n gutter?: number;\n\n /** Arrow size in px */\n arrowSize?: number;\n\n /** Renders arrow if true */\n withArrow?: boolean;\n\n /** Popper z-index */\n zIndex?: number;\n\n /** Customize mount/unmount transition */\n transition?: MantineTransition;\n\n /** Mount/unmount transition duration in ms */\n transitionDuration?: number;\n\n /** Mount/unmount transition timing function, defaults to theme.transitionTimingFunction */\n transitionTimingFunction?: string;\n}\n\nexport interface PopperProps<T extends HTMLElement> extends SharedPopperProps {\n /** Element at which popper should be attached */\n referenceElement: T;\n\n /** Popper content */\n children: React.ReactNode;\n\n /** True to show popper, false to hide */\n mounted: boolean;\n\n /** Arrow class name */\n arrowClassName?: string;\n\n /** Arrow inline styles */\n arrowStyle?: React.CSSProperties;\n\n /** useEffect dependencies to force update popper position */\n forceUpdateDependencies?: any[];\n\n /** Called when transition ends */\n onTransitionEnd?(): void;\n\n /** Popperjs modifiers array */\n modifiers?: StrictModifier[];\n\n /** Whether to render the target element in a Portal */\n withinPortal?: boolean;\n}\n\nexport function Popper<T extends HTMLElement = HTMLDivElement>({\n position = 'top',\n placement = 'center',\n gutter = 5,\n arrowSize = 2,\n withArrow = false,\n referenceElement,\n children,\n mounted,\n transition = 'pop-top-left',\n transitionDuration,\n transitionTimingFunction,\n arrowClassName,\n arrowStyle,\n zIndex = getDefaultZIndex('popover'),\n forceUpdateDependencies = [],\n modifiers = [],\n onTransitionEnd,\n withinPortal = true,\n}: PopperProps<T>) {\n const padding = withArrow ? gutter + arrowSize : gutter;\n const { classes, cx } = useStyles({ arrowSize }, { name: 'Popper' });\n const [popperElement, setPopperElement] = useState(null);\n\n const initialPlacement: Placement =\n placement === 'center' ? position : `${position}-${placement}`;\n\n const { styles, attributes, forceUpdate } = usePopper(referenceElement, popperElement, {\n placement: initialPlacement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, padding],\n },\n },\n ...modifiers,\n ],\n });\n\n const parsedAttributes = parsePopperPosition(attributes.popper?.['data-popper-placement']);\n\n useDidUpdate(() => {\n typeof forceUpdate === 'function' && forceUpdate();\n }, forceUpdateDependencies);\n\n return (\n <Transition\n mounted={mounted && !!referenceElement}\n duration={transitionDuration}\n transition={transition}\n timingFunction={transitionTimingFunction}\n onExited={onTransitionEnd}\n >\n {(transitionStyles) => (\n <div>\n <PopperContainer withinPortal={withinPortal} zIndex={zIndex}>\n <div\n ref={setPopperElement}\n style={{ ...styles.popper, pointerEvents: 'none' }}\n {...attributes.popper}\n >\n <div style={transitionStyles}>\n {children}\n {withArrow && (\n <div\n style={arrowStyle}\n className={cx(\n classes.arrow,\n classes[parsedAttributes.placement],\n classes[parsedAttributes.position],\n arrowClassName\n )}\n />\n )}\n </div>\n </div>\n </PopperContainer>\n </div>\n )}\n </Transition>\n );\n}\n\nPopper.displayName = '@mantine/core/Popper';\n"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U,CAAC,MAAM,CAAC,kBAAkBA,cAAK,CAAC,aAAa,CAAC,KAAK,EAAE;AACpE,IAAI,KAAK,EAAE,gBAAgB;AAC3B,GAAG,EAAE,QAAQ,EAAE,SAAS,oBAAoBA,cAAK,CAAC,aAAa,CAAC,KAAK,EAAE;AACvE,IAAI,KAAK,EAAE,UAAU;AACrB,IAAI,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,gBAAgB,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC;AACzH,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACV,CAAC;AACD,MAAM,CAAC,WAAW,GAAG,sBAAsB;;;;"}
|
|
@@ -44,6 +44,10 @@ const SelectDropdown = React.forwardRef(({
|
|
|
44
44
|
placementFallbacks: ["top"],
|
|
45
45
|
zIndex,
|
|
46
46
|
modifiers: [
|
|
47
|
+
{
|
|
48
|
+
name: "preventOverflow",
|
|
49
|
+
enabled: false
|
|
50
|
+
},
|
|
47
51
|
{
|
|
48
52
|
name: "sameWidth",
|
|
49
53
|
enabled: true,
|
|
@@ -71,6 +75,8 @@ const SelectDropdown = React.forwardRef(({
|
|
|
71
75
|
}
|
|
72
76
|
}
|
|
73
77
|
]
|
|
78
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
79
|
+
style: { maxHeight: maxDropdownHeight, display: "flex" }
|
|
74
80
|
}, /* @__PURE__ */ React__default.createElement(Paper.Paper, {
|
|
75
81
|
component: dropdownComponent || "div",
|
|
76
82
|
id: `${uuid}-items`,
|
|
@@ -79,12 +85,10 @@ const SelectDropdown = React.forwardRef(({
|
|
|
79
85
|
className: classes.dropdown,
|
|
80
86
|
shadow,
|
|
81
87
|
ref,
|
|
82
|
-
style: {
|
|
83
|
-
maxHeight: maxDropdownHeight,
|
|
84
|
-
flexDirection: direction
|
|
85
|
-
},
|
|
86
88
|
onMouseDown: (event) => event.preventDefault()
|
|
87
|
-
},
|
|
89
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
90
|
+
style: { display: "flex", flexDirection: direction }
|
|
91
|
+
}, children))));
|
|
88
92
|
});
|
|
89
93
|
SelectDropdown.displayName = "@mantine/core/SelectDropdown";
|
|
90
94
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectDropdown.js","sources":["../../../../src/components/Select/SelectDropdown/SelectDropdown.tsx"],"sourcesContent":["import React, { forwardRef, useRef } from 'react';\nimport { DefaultProps, MantineShadow, ClassNames, getDefaultZIndex } from '@mantine/styles';\nimport type { Placement } from '@popperjs/core';\nimport { MantineTransition } from '../../Transition';\nimport { Paper } from '../../Paper';\nimport useStyles from './SelectDropdown.styles';\nimport { Popper } from '../../Popper';\n\nexport type SelectDropdownStylesNames = ClassNames<typeof useStyles>;\n\ninterface SelectDropdownProps extends DefaultProps<SelectDropdownStylesNames> {\n mounted: boolean;\n transition: MantineTransition;\n transitionDuration: number;\n transitionTimingFunction: string;\n uuid: string;\n shadow: MantineShadow;\n maxDropdownHeight?: number | string;\n withinPortal?: boolean;\n children: React.ReactNode;\n __staticSelector: string;\n dropdownComponent?: React.FC<any>;\n referenceElement?: HTMLElement;\n direction?: React.CSSProperties['flexDirection'];\n onDirectionChange?: (direction: React.CSSProperties['flexDirection']) => void;\n zIndex?: number;\n}\n\nexport const SelectDropdown = forwardRef<HTMLDivElement, SelectDropdownProps>(\n (\n {\n mounted,\n transition,\n transitionDuration,\n transitionTimingFunction,\n uuid,\n shadow,\n maxDropdownHeight,\n withinPortal = true,\n children,\n classNames,\n styles,\n dropdownComponent,\n referenceElement,\n direction = 'column',\n onDirectionChange,\n zIndex = getDefaultZIndex('popover'),\n __staticSelector,\n }: SelectDropdownProps,\n ref\n ) => {\n const { classes } = useStyles(null, { classNames, styles, name: __staticSelector });\n\n const previousPlacement = useRef<Placement>('bottom');\n\n return (\n <Popper\n referenceElement={referenceElement}\n mounted={mounted}\n transition={transition}\n transitionDuration={transitionDuration}\n transitionTimingFunction={transitionTimingFunction}\n position=\"bottom\"\n withinPortal={withinPortal}\n placementFallbacks={['top']}\n zIndex={zIndex}\n modifiers={[\n {\n // @ts-ignore\n name: 'sameWidth',\n enabled: true,\n phase: 'beforeWrite',\n requires: ['computeStyles'],\n fn: ({ state }) => {\n // eslint-disable-next-line no-param-reassign\n state.styles.popper.width = `${state.rects.reference.width}px`;\n },\n effect: ({ state }) => {\n // eslint-disable-next-line no-param-reassign\n state.elements.popper.style.width = `${state.elements.reference.offsetWidth}px`;\n },\n },\n {\n // @ts-ignore\n name: 'directionControl',\n enabled: true,\n phase: 'main',\n fn: ({ state }) => {\n if (previousPlacement.current !== state.placement) {\n previousPlacement.current = state.placement;\n\n const nextDirection = state.placement === 'top' ? 'column-reverse' : 'column';\n\n if (direction !== nextDirection) {\n onDirectionChange && onDirectionChange(nextDirection);\n }\n }\n },\n },\n ]}\n >\n <Paper<'div'>\n
|
|
1
|
+
{"version":3,"file":"SelectDropdown.js","sources":["../../../../src/components/Select/SelectDropdown/SelectDropdown.tsx"],"sourcesContent":["import React, { forwardRef, useRef } from 'react';\nimport { DefaultProps, MantineShadow, ClassNames, getDefaultZIndex } from '@mantine/styles';\nimport type { Placement } from '@popperjs/core';\nimport { MantineTransition } from '../../Transition';\nimport { Paper } from '../../Paper';\nimport useStyles from './SelectDropdown.styles';\nimport { Popper } from '../../Popper';\n\nexport type SelectDropdownStylesNames = ClassNames<typeof useStyles>;\n\ninterface SelectDropdownProps extends DefaultProps<SelectDropdownStylesNames> {\n mounted: boolean;\n transition: MantineTransition;\n transitionDuration: number;\n transitionTimingFunction: string;\n uuid: string;\n shadow: MantineShadow;\n maxDropdownHeight?: number | string;\n withinPortal?: boolean;\n children: React.ReactNode;\n __staticSelector: string;\n dropdownComponent?: React.FC<any>;\n referenceElement?: HTMLElement;\n direction?: React.CSSProperties['flexDirection'];\n onDirectionChange?: (direction: React.CSSProperties['flexDirection']) => void;\n zIndex?: number;\n}\n\nexport const SelectDropdown = forwardRef<HTMLDivElement, SelectDropdownProps>(\n (\n {\n mounted,\n transition,\n transitionDuration,\n transitionTimingFunction,\n uuid,\n shadow,\n maxDropdownHeight,\n withinPortal = true,\n children,\n classNames,\n styles,\n dropdownComponent,\n referenceElement,\n direction = 'column',\n onDirectionChange,\n zIndex = getDefaultZIndex('popover'),\n __staticSelector,\n }: SelectDropdownProps,\n ref\n ) => {\n const { classes } = useStyles(null, { classNames, styles, name: __staticSelector });\n\n const previousPlacement = useRef<Placement>('bottom');\n\n return (\n <Popper\n referenceElement={referenceElement}\n mounted={mounted}\n transition={transition}\n transitionDuration={transitionDuration}\n transitionTimingFunction={transitionTimingFunction}\n position=\"bottom\"\n withinPortal={withinPortal}\n placementFallbacks={['top']}\n zIndex={zIndex}\n modifiers={[\n {\n name: 'preventOverflow',\n enabled: false,\n },\n {\n // @ts-ignore\n name: 'sameWidth',\n enabled: true,\n phase: 'beforeWrite',\n requires: ['computeStyles'],\n fn: ({ state }) => {\n // eslint-disable-next-line no-param-reassign\n state.styles.popper.width = `${state.rects.reference.width}px`;\n },\n effect: ({ state }) => {\n // eslint-disable-next-line no-param-reassign\n state.elements.popper.style.width = `${state.elements.reference.offsetWidth}px`;\n },\n },\n {\n // @ts-ignore\n name: 'directionControl',\n enabled: true,\n phase: 'main',\n fn: ({ state }) => {\n if (previousPlacement.current !== state.placement) {\n previousPlacement.current = state.placement;\n\n const nextDirection = state.placement === 'top' ? 'column-reverse' : 'column';\n\n if (direction !== nextDirection) {\n onDirectionChange && onDirectionChange(nextDirection);\n }\n }\n },\n },\n ]}\n >\n <div style={{ maxHeight: maxDropdownHeight, display: 'flex' }}>\n <Paper<'div'>\n component={(dropdownComponent || 'div') as any}\n id={`${uuid}-items`}\n aria-labelledby={`${uuid}-label`}\n role=\"listbox\"\n className={classes.dropdown}\n shadow={shadow}\n ref={ref}\n onMouseDown={(event) => event.preventDefault()}\n >\n <div style={{ display: 'flex', flexDirection: direction }}>{children}</div>\n </Paper>\n </div>\n </Popper>\n );\n }\n);\n\nSelectDropdown.displayName = '@mantine/core/SelectDropdown';\n"],"names":["forwardRef","styles","getDefaultZIndex","useStyles","useRef","React","Popper","Paper"],"mappings":";;;;;;;;;;;;;;AAKY,MAAC,cAAc,GAAGA,gBAAU,CAAC,CAAC;AAC1C,EAAE,OAAO;AACT,EAAE,UAAU;AACZ,EAAE,kBAAkB;AACpB,EAAE,wBAAwB;AAC1B,EAAE,IAAI;AACN,EAAE,MAAM;AACR,EAAE,iBAAiB;AACnB,EAAE,YAAY,GAAG,IAAI;AACrB,EAAE,QAAQ;AACV,EAAE,UAAU;AACZ,UAAEC,QAAM;AACR,EAAE,iBAAiB;AACnB,EAAE,gBAAgB;AAClB,EAAE,SAAS,GAAG,QAAQ;AACtB,EAAE,iBAAiB;AACnB,EAAE,MAAM,GAAGC,uBAAgB,CAAC,SAAS,CAAC;AACtC,EAAE,gBAAgB;AAClB,CAAC,EAAE,GAAG,KAAK;AACX,EAAE,MAAM,EAAE,OAAO,EAAE,GAAGC,gCAAS,CAAC,IAAI,EAAE,EAAE,UAAU,UAAEF,QAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC,CAAC;AACtF,EAAE,MAAM,iBAAiB,GAAGG,YAAM,CAAC,QAAQ,CAAC,CAAC;AAC7C,EAAE,uBAAuBC,cAAK,CAAC,aAAa,CAACC,aAAM,EAAE;AACrD,IAAI,gBAAgB;AACpB,IAAI,OAAO;AACX,IAAI,UAAU;AACd,IAAI,kBAAkB;AACtB,IAAI,wBAAwB;AAC5B,IAAI,QAAQ,EAAE,QAAQ;AACtB,IAAI,YAAY;AAChB,IAAI,kBAAkB,EAAE,CAAC,KAAK,CAAC;AAC/B,IAAI,MAAM;AACV,IAAI,SAAS,EAAE;AACf,MAAM;AACN,QAAQ,IAAI,EAAE,iBAAiB;AAC/B,QAAQ,OAAO,EAAE,KAAK;AACtB,OAAO;AACP,MAAM;AACN,QA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AAO,EAAE,MAAM,EAAE;AAC5D,GAAG,kBAAkBA,cAAK,CAAC,aAAa,CAACE,WAAK,EAAE;AAChD,IAAI,SAAS,EAAE,iBAAiB,IAAI,KAAK;AACzC,IAAI,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC;AACvB,IAAI,iBAAiB,EAAE,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC;AACtC,IAAI,IAAI,EAAE,SAAS;AACnB,IAAI,SAAS,EAAE,OAAO,CAAC,QAAQ;AAC/B,IAAI,MAAM;AACV,IAAI,GAAG;AACP,IAAI,WAAW,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,cAAc,EAAE;AAClD,GAAG,kBAAkBF,cAAK,CAAC,aAAa,CAAC,KAAK,EAAE;AAChD,IAAI,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE;AACxD,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,EAAE;AACH,cAAc,CAAC,WAAW,GAAG,8BAA8B;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectDropdown.styles.js","sources":["../../../../src/components/Select/SelectDropdown/SelectDropdown.styles.ts"],"sourcesContent":["import { createStyles } from '@mantine/styles';\n\nexport default createStyles((theme) => ({\n dropdown: {\n ...theme.fn.fontStyles(),\n boxSizing: 'border-box',\n pointerEvents: 'auto',\n backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.white,\n border: `1px solid ${\n theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.colors.gray[2]\n }`,\n padding: 4,\n overflowY: 'auto',\n
|
|
1
|
+
{"version":3,"file":"SelectDropdown.styles.js","sources":["../../../../src/components/Select/SelectDropdown/SelectDropdown.styles.ts"],"sourcesContent":["import { createStyles } from '@mantine/styles';\n\nexport default createStyles((theme) => ({\n dropdown: {\n ...theme.fn.fontStyles(),\n boxSizing: 'border-box',\n pointerEvents: 'auto',\n backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.white,\n border: `1px solid ${\n theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.colors.gray[2]\n }`,\n padding: 4,\n overflowY: 'auto',\n width: '100%',\n },\n}));\n"],"names":["createStyles"],"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;AAElE,gBAAeA,mBAAY,CAAC,CAAC,KAAK,MAAM;AACxC,EAAE,QAAQ,EAAE,aAAa,CAAC,cAAc,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC,EAAE;AACrE,IAAI,SAAS,EAAE,YAAY;AAC3B,IAAI,aAAa,EAAE,MAAM;AACzB,IAAI,eAAe,EAAE,KAAK,CAAC,WAAW,KAAK,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK;AACtF,IAAI,MAAM,EAAE,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;AACrG,IAAI,OAAO,EAAE,CAAC;AACd,IAAI,SAAS,EAAE,MAAM;AACrB,IAAI,KAAK,EAAE,MAAM;AACjB,GAAG,CAAC;AACJ,CAAC,CAAC,CAAC;;;;"}
|
|
@@ -43,7 +43,7 @@ var __objRest = (source, exclude) => {
|
|
|
43
43
|
const SelectScrollArea = React.forwardRef((_a, ref) => {
|
|
44
44
|
var _b = _a, { style } = _b, others = __objRest(_b, ["style"]);
|
|
45
45
|
return /* @__PURE__ */ React__default.createElement(ScrollArea.ScrollArea, __spreadProps(__spreadValues({}, others), {
|
|
46
|
-
style: __spreadValues({
|
|
46
|
+
style: __spreadValues({ width: "100%" }, style),
|
|
47
47
|
viewportRef: ref
|
|
48
48
|
}), others.children);
|
|
49
49
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectScrollArea.js","sources":["../../../../src/components/Select/SelectScrollArea/SelectScrollArea.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { ScrollArea, ScrollAreaProps } from '../../ScrollArea';\n\nexport const SelectScrollArea = forwardRef<HTMLDivElement, ScrollAreaProps>(\n ({ style, ...others }: ScrollAreaProps, ref) => (\n <ScrollArea
|
|
1
|
+
{"version":3,"file":"SelectScrollArea.js","sources":["../../../../src/components/Select/SelectScrollArea/SelectScrollArea.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { ScrollArea, ScrollAreaProps } from '../../ScrollArea';\n\nexport const SelectScrollArea = forwardRef<HTMLDivElement, ScrollAreaProps>(\n ({ style, ...others }: ScrollAreaProps, ref) => (\n <ScrollArea {...others} style={{ width: '100%', ...style }} viewportRef={ref}>\n {others.children}\n </ScrollArea>\n )\n);\n\nSelectScrollArea.displayName = '@mantine/core/SelectScrollArea';\n"],"names":["forwardRef","React","ScrollArea"],"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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CAAC,EAAE;AAClD,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC;AACtE,QAAQ,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;AACpC,KAAK;AACL,EAAE,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAGU,MAAC,gBAAgB,GAAGA,gBAAU,CAAC,CAAC,EAAE,EAAE,GAAG,KAAK;AACxD,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;AACjE,EAAE,uBAAuBC,cAAK,CAAC,aAAa,CAACC,qBAAU,EAAE,aAAa,CAAC,cAAc,CAAC,EAAE,EAAE,MAAM,CAAC,EAAE;AACnG,IAAI,KAAK,EAAE,cAAc,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC;AACnD,IAAI,WAAW,EAAE,GAAG;AACpB,GAAG,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;AACvB,CAAC,EAAE;AACH,gBAAgB,CAAC,WAAW,GAAG,gCAAgC;;;;"}
|
|
@@ -68,7 +68,7 @@ function Popper({
|
|
|
68
68
|
typeof forceUpdate === "function" && forceUpdate();
|
|
69
69
|
}, forceUpdateDependencies);
|
|
70
70
|
return /* @__PURE__ */ React.createElement(Transition, {
|
|
71
|
-
mounted,
|
|
71
|
+
mounted: mounted && !!referenceElement,
|
|
72
72
|
duration: transitionDuration,
|
|
73
73
|
transition,
|
|
74
74
|
timingFunction: transitionTimingFunction,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popper.js","sources":["../../../src/components/Popper/Popper.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { usePopper, StrictModifier } from 'react-popper';\nimport { getDefaultZIndex } from '@mantine/styles';\nimport type { Placement } from '@popperjs/core';\nimport { useDidUpdate } from '@mantine/hooks';\nimport { Transition, MantineTransition } from '../Transition';\nimport { parsePopperPosition } from './parse-popper-position/parse-popper-position';\nimport { PopperContainer } from './PopperContainer/PopperContainer';\nimport useStyles from './Popper.styles';\n\nexport interface SharedPopperProps {\n /** Position relative to reference element */\n position?: 'top' | 'left' | 'bottom' | 'right';\n\n /** Placement relative to reference element */\n placement?: 'start' | 'center' | 'end';\n\n /** Spacing between element and popper in px */\n gutter?: number;\n\n /** Arrow size in px */\n arrowSize?: number;\n\n /** Renders arrow if true */\n withArrow?: boolean;\n\n /** Popper z-index */\n zIndex?: number;\n\n /** Customize mount/unmount transition */\n transition?: MantineTransition;\n\n /** Mount/unmount transition duration in ms */\n transitionDuration?: number;\n\n /** Mount/unmount transition timing function, defaults to theme.transitionTimingFunction */\n transitionTimingFunction?: string;\n}\n\nexport interface PopperProps<T extends HTMLElement> extends SharedPopperProps {\n /** Element at which popper should be attached */\n referenceElement: T;\n\n /** Popper content */\n children: React.ReactNode;\n\n /** True to show popper, false to hide */\n mounted: boolean;\n\n /** Arrow class name */\n arrowClassName?: string;\n\n /** Arrow inline styles */\n arrowStyle?: React.CSSProperties;\n\n /** useEffect dependencies to force update popper position */\n forceUpdateDependencies?: any[];\n\n /** Called when transition ends */\n onTransitionEnd?(): void;\n\n /** Popperjs modifiers array */\n modifiers?: StrictModifier[];\n\n /** Whether to render the target element in a Portal */\n withinPortal?: boolean;\n}\n\nexport function Popper<T extends HTMLElement = HTMLDivElement>({\n position = 'top',\n placement = 'center',\n gutter = 5,\n arrowSize = 2,\n withArrow = false,\n referenceElement,\n children,\n mounted,\n transition = 'pop-top-left',\n transitionDuration,\n transitionTimingFunction,\n arrowClassName,\n arrowStyle,\n zIndex = getDefaultZIndex('popover'),\n forceUpdateDependencies = [],\n modifiers = [],\n onTransitionEnd,\n withinPortal = true,\n}: PopperProps<T>) {\n const padding = withArrow ? gutter + arrowSize : gutter;\n const { classes, cx } = useStyles({ arrowSize }, { name: 'Popper' });\n const [popperElement, setPopperElement] = useState(null);\n\n const initialPlacement: Placement =\n placement === 'center' ? position : `${position}-${placement}`;\n\n const { styles, attributes, forceUpdate } = usePopper(referenceElement, popperElement, {\n placement: initialPlacement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, padding],\n },\n },\n ...modifiers,\n ],\n });\n\n const parsedAttributes = parsePopperPosition(attributes.popper?.['data-popper-placement']);\n\n useDidUpdate(() => {\n typeof forceUpdate === 'function' && forceUpdate();\n }, forceUpdateDependencies);\n\n return (\n <Transition\n mounted={mounted}\n duration={transitionDuration}\n transition={transition}\n timingFunction={transitionTimingFunction}\n onExited={onTransitionEnd}\n >\n {(transitionStyles) => (\n <div>\n <PopperContainer withinPortal={withinPortal} zIndex={zIndex}>\n <div\n ref={setPopperElement}\n style={{ ...styles.popper, pointerEvents: 'none' }}\n {...attributes.popper}\n >\n <div style={transitionStyles}>\n {children}\n {withArrow && (\n <div\n style={arrowStyle}\n className={cx(\n classes.arrow,\n classes[parsedAttributes.placement],\n classes[parsedAttributes.position],\n arrowClassName\n )}\n />\n )}\n </div>\n </div>\n </PopperContainer>\n </div>\n )}\n </Transition>\n );\n}\n\nPopper.displayName = '@mantine/core/Popper';\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,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AW,KAAK,UAAU,IAAI,WAAW,EAAE,CAAC;AACvD,GAAG,EAAE,uBAAuB,CAAC,CAAC;AAC9B,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,UAAU,EAAE;AACzD,IAAI,OAAO;
|
|
1
|
+
{"version":3,"file":"Popper.js","sources":["../../../src/components/Popper/Popper.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { usePopper, StrictModifier } from 'react-popper';\nimport { getDefaultZIndex } from '@mantine/styles';\nimport type { Placement } from '@popperjs/core';\nimport { useDidUpdate } from '@mantine/hooks';\nimport { Transition, MantineTransition } from '../Transition';\nimport { parsePopperPosition } from './parse-popper-position/parse-popper-position';\nimport { PopperContainer } from './PopperContainer/PopperContainer';\nimport useStyles from './Popper.styles';\n\nexport interface SharedPopperProps {\n /** Position relative to reference element */\n position?: 'top' | 'left' | 'bottom' | 'right';\n\n /** Placement relative to reference element */\n placement?: 'start' | 'center' | 'end';\n\n /** Spacing between element and popper in px */\n gutter?: number;\n\n /** Arrow size in px */\n arrowSize?: number;\n\n /** Renders arrow if true */\n withArrow?: boolean;\n\n /** Popper z-index */\n zIndex?: number;\n\n /** Customize mount/unmount transition */\n transition?: MantineTransition;\n\n /** Mount/unmount transition duration in ms */\n transitionDuration?: number;\n\n /** Mount/unmount transition timing function, defaults to theme.transitionTimingFunction */\n transitionTimingFunction?: string;\n}\n\nexport interface PopperProps<T extends HTMLElement> extends SharedPopperProps {\n /** Element at which popper should be attached */\n referenceElement: T;\n\n /** Popper content */\n children: React.ReactNode;\n\n /** True to show popper, false to hide */\n mounted: boolean;\n\n /** Arrow class name */\n arrowClassName?: string;\n\n /** Arrow inline styles */\n arrowStyle?: React.CSSProperties;\n\n /** useEffect dependencies to force update popper position */\n forceUpdateDependencies?: any[];\n\n /** Called when transition ends */\n onTransitionEnd?(): void;\n\n /** Popperjs modifiers array */\n modifiers?: StrictModifier[];\n\n /** Whether to render the target element in a Portal */\n withinPortal?: boolean;\n}\n\nexport function Popper<T extends HTMLElement = HTMLDivElement>({\n position = 'top',\n placement = 'center',\n gutter = 5,\n arrowSize = 2,\n withArrow = false,\n referenceElement,\n children,\n mounted,\n transition = 'pop-top-left',\n transitionDuration,\n transitionTimingFunction,\n arrowClassName,\n arrowStyle,\n zIndex = getDefaultZIndex('popover'),\n forceUpdateDependencies = [],\n modifiers = [],\n onTransitionEnd,\n withinPortal = true,\n}: PopperProps<T>) {\n const padding = withArrow ? gutter + arrowSize : gutter;\n const { classes, cx } = useStyles({ arrowSize }, { name: 'Popper' });\n const [popperElement, setPopperElement] = useState(null);\n\n const initialPlacement: Placement =\n placement === 'center' ? position : `${position}-${placement}`;\n\n const { styles, attributes, forceUpdate } = usePopper(referenceElement, popperElement, {\n placement: initialPlacement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, padding],\n },\n },\n ...modifiers,\n ],\n });\n\n const parsedAttributes = parsePopperPosition(attributes.popper?.['data-popper-placement']);\n\n useDidUpdate(() => {\n typeof forceUpdate === 'function' && forceUpdate();\n }, forceUpdateDependencies);\n\n return (\n <Transition\n mounted={mounted && !!referenceElement}\n duration={transitionDuration}\n transition={transition}\n timingFunction={transitionTimingFunction}\n onExited={onTransitionEnd}\n >\n {(transitionStyles) => (\n <div>\n <PopperContainer withinPortal={withinPortal} zIndex={zIndex}>\n <div\n ref={setPopperElement}\n style={{ ...styles.popper, pointerEvents: 'none' }}\n {...attributes.popper}\n >\n <div style={transitionStyles}>\n {children}\n {withArrow && (\n <div\n style={arrowStyle}\n className={cx(\n classes.arrow,\n classes[parsedAttributes.placement],\n classes[parsedAttributes.position],\n arrowClassName\n )}\n />\n )}\n </div>\n </div>\n </PopperContainer>\n </div>\n )}\n </Transition>\n );\n}\n\nPopper.displayName = '@mantine/core/Popper';\n"],"names":[],"mappings":";;;;;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,UAAU,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACzC,IAAI,iB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EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,gBAAgB,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC;AACzH,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACV,CAAC;AACD,MAAM,CAAC,WAAW,GAAG,sBAAsB;;;;"}
|
|
@@ -36,6 +36,10 @@ const SelectDropdown = forwardRef(({
|
|
|
36
36
|
placementFallbacks: ["top"],
|
|
37
37
|
zIndex,
|
|
38
38
|
modifiers: [
|
|
39
|
+
{
|
|
40
|
+
name: "preventOverflow",
|
|
41
|
+
enabled: false
|
|
42
|
+
},
|
|
39
43
|
{
|
|
40
44
|
name: "sameWidth",
|
|
41
45
|
enabled: true,
|
|
@@ -63,6 +67,8 @@ const SelectDropdown = forwardRef(({
|
|
|
63
67
|
}
|
|
64
68
|
}
|
|
65
69
|
]
|
|
70
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
71
|
+
style: { maxHeight: maxDropdownHeight, display: "flex" }
|
|
66
72
|
}, /* @__PURE__ */ React.createElement(Paper, {
|
|
67
73
|
component: dropdownComponent || "div",
|
|
68
74
|
id: `${uuid}-items`,
|
|
@@ -71,12 +77,10 @@ const SelectDropdown = forwardRef(({
|
|
|
71
77
|
className: classes.dropdown,
|
|
72
78
|
shadow,
|
|
73
79
|
ref,
|
|
74
|
-
style: {
|
|
75
|
-
maxHeight: maxDropdownHeight,
|
|
76
|
-
flexDirection: direction
|
|
77
|
-
},
|
|
78
80
|
onMouseDown: (event) => event.preventDefault()
|
|
79
|
-
},
|
|
81
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
82
|
+
style: { display: "flex", flexDirection: direction }
|
|
83
|
+
}, children))));
|
|
80
84
|
});
|
|
81
85
|
SelectDropdown.displayName = "@mantine/core/SelectDropdown";
|
|
82
86
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectDropdown.js","sources":["../../../../src/components/Select/SelectDropdown/SelectDropdown.tsx"],"sourcesContent":["import React, { forwardRef, useRef } from 'react';\nimport { DefaultProps, MantineShadow, ClassNames, getDefaultZIndex } from '@mantine/styles';\nimport type { Placement } from '@popperjs/core';\nimport { MantineTransition } from '../../Transition';\nimport { Paper } from '../../Paper';\nimport useStyles from './SelectDropdown.styles';\nimport { Popper } from '../../Popper';\n\nexport type SelectDropdownStylesNames = ClassNames<typeof useStyles>;\n\ninterface SelectDropdownProps extends DefaultProps<SelectDropdownStylesNames> {\n mounted: boolean;\n transition: MantineTransition;\n transitionDuration: number;\n transitionTimingFunction: string;\n uuid: string;\n shadow: MantineShadow;\n maxDropdownHeight?: number | string;\n withinPortal?: boolean;\n children: React.ReactNode;\n __staticSelector: string;\n dropdownComponent?: React.FC<any>;\n referenceElement?: HTMLElement;\n direction?: React.CSSProperties['flexDirection'];\n onDirectionChange?: (direction: React.CSSProperties['flexDirection']) => void;\n zIndex?: number;\n}\n\nexport const SelectDropdown = forwardRef<HTMLDivElement, SelectDropdownProps>(\n (\n {\n mounted,\n transition,\n transitionDuration,\n transitionTimingFunction,\n uuid,\n shadow,\n maxDropdownHeight,\n withinPortal = true,\n children,\n classNames,\n styles,\n dropdownComponent,\n referenceElement,\n direction = 'column',\n onDirectionChange,\n zIndex = getDefaultZIndex('popover'),\n __staticSelector,\n }: SelectDropdownProps,\n ref\n ) => {\n const { classes } = useStyles(null, { classNames, styles, name: __staticSelector });\n\n const previousPlacement = useRef<Placement>('bottom');\n\n return (\n <Popper\n referenceElement={referenceElement}\n mounted={mounted}\n transition={transition}\n transitionDuration={transitionDuration}\n transitionTimingFunction={transitionTimingFunction}\n position=\"bottom\"\n withinPortal={withinPortal}\n placementFallbacks={['top']}\n zIndex={zIndex}\n modifiers={[\n {\n // @ts-ignore\n name: 'sameWidth',\n enabled: true,\n phase: 'beforeWrite',\n requires: ['computeStyles'],\n fn: ({ state }) => {\n // eslint-disable-next-line no-param-reassign\n state.styles.popper.width = `${state.rects.reference.width}px`;\n },\n effect: ({ state }) => {\n // eslint-disable-next-line no-param-reassign\n state.elements.popper.style.width = `${state.elements.reference.offsetWidth}px`;\n },\n },\n {\n // @ts-ignore\n name: 'directionControl',\n enabled: true,\n phase: 'main',\n fn: ({ state }) => {\n if (previousPlacement.current !== state.placement) {\n previousPlacement.current = state.placement;\n\n const nextDirection = state.placement === 'top' ? 'column-reverse' : 'column';\n\n if (direction !== nextDirection) {\n onDirectionChange && onDirectionChange(nextDirection);\n }\n }\n },\n },\n ]}\n >\n <Paper<'div'>\n
|
|
1
|
+
{"version":3,"file":"SelectDropdown.js","sources":["../../../../src/components/Select/SelectDropdown/SelectDropdown.tsx"],"sourcesContent":["import React, { forwardRef, useRef } from 'react';\nimport { DefaultProps, MantineShadow, ClassNames, getDefaultZIndex } from '@mantine/styles';\nimport type { Placement } from '@popperjs/core';\nimport { MantineTransition } from '../../Transition';\nimport { Paper } from '../../Paper';\nimport useStyles from './SelectDropdown.styles';\nimport { Popper } from '../../Popper';\n\nexport type SelectDropdownStylesNames = ClassNames<typeof useStyles>;\n\ninterface SelectDropdownProps extends DefaultProps<SelectDropdownStylesNames> {\n mounted: boolean;\n transition: MantineTransition;\n transitionDuration: number;\n transitionTimingFunction: string;\n uuid: string;\n shadow: MantineShadow;\n maxDropdownHeight?: number | string;\n withinPortal?: boolean;\n children: React.ReactNode;\n __staticSelector: string;\n dropdownComponent?: React.FC<any>;\n referenceElement?: HTMLElement;\n direction?: React.CSSProperties['flexDirection'];\n onDirectionChange?: (direction: React.CSSProperties['flexDirection']) => void;\n zIndex?: number;\n}\n\nexport const SelectDropdown = forwardRef<HTMLDivElement, SelectDropdownProps>(\n (\n {\n mounted,\n transition,\n transitionDuration,\n transitionTimingFunction,\n uuid,\n shadow,\n maxDropdownHeight,\n withinPortal = true,\n children,\n classNames,\n styles,\n dropdownComponent,\n referenceElement,\n direction = 'column',\n onDirectionChange,\n zIndex = getDefaultZIndex('popover'),\n __staticSelector,\n }: SelectDropdownProps,\n ref\n ) => {\n const { classes } = useStyles(null, { classNames, styles, name: __staticSelector });\n\n const previousPlacement = useRef<Placement>('bottom');\n\n return (\n <Popper\n referenceElement={referenceElement}\n mounted={mounted}\n transition={transition}\n transitionDuration={transitionDuration}\n transitionTimingFunction={transitionTimingFunction}\n position=\"bottom\"\n withinPortal={withinPortal}\n placementFallbacks={['top']}\n zIndex={zIndex}\n modifiers={[\n {\n name: 'preventOverflow',\n enabled: false,\n },\n {\n // @ts-ignore\n name: 'sameWidth',\n enabled: true,\n phase: 'beforeWrite',\n requires: ['computeStyles'],\n fn: ({ state }) => {\n // eslint-disable-next-line no-param-reassign\n state.styles.popper.width = `${state.rects.reference.width}px`;\n },\n effect: ({ state }) => {\n // eslint-disable-next-line no-param-reassign\n state.elements.popper.style.width = `${state.elements.reference.offsetWidth}px`;\n },\n },\n {\n // @ts-ignore\n name: 'directionControl',\n enabled: true,\n phase: 'main',\n fn: ({ state }) => {\n if (previousPlacement.current !== state.placement) {\n previousPlacement.current = state.placement;\n\n const nextDirection = state.placement === 'top' ? 'column-reverse' : 'column';\n\n if (direction !== nextDirection) {\n onDirectionChange && onDirectionChange(nextDirection);\n }\n }\n },\n },\n ]}\n >\n <div style={{ maxHeight: maxDropdownHeight, display: 'flex' }}>\n <Paper<'div'>\n component={(dropdownComponent || 'div') as any}\n id={`${uuid}-items`}\n aria-labelledby={`${uuid}-label`}\n role=\"listbox\"\n className={classes.dropdown}\n shadow={shadow}\n ref={ref}\n onMouseDown={(event) => event.preventDefault()}\n >\n <div style={{ display: 'flex', flexDirection: direction }}>{children}</div>\n </Paper>\n </div>\n </Popper>\n );\n }\n);\n\nSelectDropdown.displayName = '@mantine/core/SelectDropdown';\n"],"names":[],"mappings":";;;;;;AAKY,MAAC,cAAc,GAAG,UAAU,CAAC,CAAC;AAC1C,EAAE,OAAO;AACT,EAAE,UAAU;AACZ,EAAE,kBAAkB;AACpB,EAAE,wBAAwB;AAC1B,EAA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Q;AAC/B,IAAI,MAAM;AACV,IAAI,GAAG;AACP,IAAI,WAAW,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,cAAc,EAAE;AAClD,GAAG,kBAAkB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE;AAChD,IAAI,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE;AACxD,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,EAAE;AACH,cAAc,CAAC,WAAW,GAAG,8BAA8B;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectDropdown.styles.js","sources":["../../../../src/components/Select/SelectDropdown/SelectDropdown.styles.ts"],"sourcesContent":["import { createStyles } from '@mantine/styles';\n\nexport default createStyles((theme) => ({\n dropdown: {\n ...theme.fn.fontStyles(),\n boxSizing: 'border-box',\n pointerEvents: 'auto',\n backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.white,\n border: `1px solid ${\n theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.colors.gray[2]\n }`,\n padding: 4,\n overflowY: 'auto',\n
|
|
1
|
+
{"version":3,"file":"SelectDropdown.styles.js","sources":["../../../../src/components/Select/SelectDropdown/SelectDropdown.styles.ts"],"sourcesContent":["import { createStyles } from '@mantine/styles';\n\nexport default createStyles((theme) => ({\n dropdown: {\n ...theme.fn.fontStyles(),\n boxSizing: 'border-box',\n pointerEvents: 'auto',\n backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.white,\n border: `1px solid ${\n theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.colors.gray[2]\n }`,\n padding: 4,\n overflowY: 'auto',\n width: '100%',\n },\n}));\n"],"names":[],"mappings":";;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,UAAU,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACzC,IAAI,iBAAiB,GA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,QAAQ,EAAE,aAAa,CAAC,cAAc,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC,EAAE;AACrE,IAAI,SAAS,EAAE,YAAY;AAC3B,IAAI,aAAa,EAAE,MAAM;AACzB,IAAI,eAAe,EAAE,KAAK,CAAC,WAAW,KAAK,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK;AACtF,IAAI,MAAM,EAAE,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;AACrG,IAAI,OAAO,EAAE,CAAC;AACd,IAAI,SAAS,EAAE,MAAM;AACrB,IAAI,KAAK,EAAE,MAAM;AACjB,GAAG,CAAC;AACJ,CAAC,CAAC,CAAC;;;;"}
|
|
@@ -35,7 +35,7 @@ var __objRest = (source, exclude) => {
|
|
|
35
35
|
const SelectScrollArea = forwardRef((_a, ref) => {
|
|
36
36
|
var _b = _a, { style } = _b, others = __objRest(_b, ["style"]);
|
|
37
37
|
return /* @__PURE__ */ React.createElement(ScrollArea, __spreadProps(__spreadValues({}, others), {
|
|
38
|
-
style: __spreadValues({
|
|
38
|
+
style: __spreadValues({ width: "100%" }, style),
|
|
39
39
|
viewportRef: ref
|
|
40
40
|
}), others.children);
|
|
41
41
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectScrollArea.js","sources":["../../../../src/components/Select/SelectScrollArea/SelectScrollArea.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { ScrollArea, ScrollAreaProps } from '../../ScrollArea';\n\nexport const SelectScrollArea = forwardRef<HTMLDivElement, ScrollAreaProps>(\n ({ style, ...others }: ScrollAreaProps, ref) => (\n <ScrollArea
|
|
1
|
+
{"version":3,"file":"SelectScrollArea.js","sources":["../../../../src/components/Select/SelectScrollArea/SelectScrollArea.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { ScrollArea, ScrollAreaProps } from '../../ScrollArea';\n\nexport const SelectScrollArea = forwardRef<HTMLDivElement, ScrollAreaProps>(\n ({ style, ...others }: ScrollAreaProps, ref) => (\n <ScrollArea {...others} style={{ width: '100%', ...style }} viewportRef={ref}>\n {others.children}\n </ScrollArea>\n )\n);\n\nSelectScrollArea.displayName = '@mantine/core/SelectScrollArea';\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;AACx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,CAAC,EAAE,WAAW,CAAC;IAC/B,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;IACjD,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,cAAc,4FA8F1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectScrollArea.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/SelectScrollArea/SelectScrollArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAc,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAE/D,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"SelectScrollArea.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/SelectScrollArea/SelectScrollArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAc,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAE/D,eAAO,MAAM,gBAAgB,wFAM5B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mantine/core",
|
|
3
3
|
"description": "React components library focused on usability, accessibility and developer experience",
|
|
4
|
-
"version": "3.3.
|
|
4
|
+
"version": "3.3.2",
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
"directory": "src/mantine-core"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"@mantine/hooks": "3.3.
|
|
18
|
+
"@mantine/hooks": "3.3.2",
|
|
19
19
|
"react": ">=16.8.0",
|
|
20
20
|
"react-dom": ">=16.8.0"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@mantine/styles": "3.3.
|
|
23
|
+
"@mantine/styles": "3.3.2",
|
|
24
24
|
"@radix-ui/react-scroll-area": "^0.1.1",
|
|
25
25
|
"clsx": "^1.1.1",
|
|
26
26
|
"react-textarea-autosize": "^8.3.2",
|