@mantine/core 4.1.0 → 4.1.3
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/ActionIcon/ActionIcon.js.map +1 -1
- package/cjs/components/Anchor/Anchor.js.map +1 -1
- package/cjs/components/AppShell/HorizontalSection/Section/Section.js.map +1 -1
- package/cjs/components/Autocomplete/Autocomplete.js +10 -3
- package/cjs/components/Autocomplete/Autocomplete.js.map +1 -1
- package/cjs/components/Avatar/Avatar.js.map +1 -1
- package/cjs/components/Badge/Badge.js.map +1 -1
- package/cjs/components/Box/Box.js.map +1 -1
- package/cjs/components/Burger/Burger.js +2 -4
- package/cjs/components/Burger/Burger.js.map +1 -1
- package/cjs/components/Burger/Burger.styles.js +6 -27
- package/cjs/components/Burger/Burger.styles.js.map +1 -1
- package/cjs/components/Button/Button.js.map +1 -1
- package/cjs/components/Button/UnstyledButton/UnstyledButton.js +3 -3
- package/cjs/components/Button/UnstyledButton/UnstyledButton.js.map +1 -1
- package/cjs/components/Button/UnstyledButton/UnstyledButton.styles.js +2 -1
- package/cjs/components/Button/UnstyledButton/UnstyledButton.styles.js.map +1 -1
- package/cjs/components/Card/Card.js +1 -1
- package/cjs/components/Card/Card.js.map +1 -1
- package/cjs/components/Card/CardSection/CardSection.js.map +1 -1
- package/cjs/components/Center/Center.js.map +1 -1
- package/cjs/components/Checkbox/Checkbox.styles.js +0 -1
- package/cjs/components/Checkbox/Checkbox.styles.js.map +1 -1
- package/cjs/components/ColorSwatch/ColorSwatch.js.map +1 -1
- package/cjs/components/Grid/Col/Col.js +3 -2
- package/cjs/components/Grid/Col/Col.js.map +1 -1
- package/cjs/components/Grid/Grid.js +1 -8
- package/cjs/components/Grid/Grid.js.map +1 -1
- package/cjs/components/Highlight/Highlight.js.map +1 -1
- package/cjs/components/Image/BackgroundImage/BackgroundImage.js.map +1 -1
- package/cjs/components/Input/Input.js.map +1 -1
- package/cjs/components/InputWrapper/InputWrapper.styles.js +2 -2
- package/cjs/components/InputWrapper/InputWrapper.styles.js.map +1 -1
- package/cjs/components/MultiSelect/MultiSelect.js +5 -2
- package/cjs/components/MultiSelect/MultiSelect.js.map +1 -1
- package/cjs/components/Overlay/Overlay.js.map +1 -1
- package/cjs/components/Paper/Paper.js.map +1 -1
- package/cjs/components/PasswordInput/PasswordInput.js +0 -1
- package/cjs/components/PasswordInput/PasswordInput.js.map +1 -1
- package/cjs/components/Select/Select.js +23 -17
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Select/Select.styles.js +4 -1
- package/cjs/components/Select/Select.styles.js.map +1 -1
- package/cjs/components/Select/SelectItems/SelectItems.js +1 -1
- package/cjs/components/Select/SelectItems/SelectItems.js.map +1 -1
- package/cjs/components/Select/filter-data/filter-data.js +13 -1
- package/cjs/components/Select/filter-data/filter-data.js.map +1 -1
- package/cjs/components/Slider/RangeSlider/RangeSlider.js +2 -1
- package/cjs/components/Slider/RangeSlider/RangeSlider.js.map +1 -1
- package/cjs/components/Slider/Track/Track.js +5 -3
- package/cjs/components/Slider/Track/Track.js.map +1 -1
- package/cjs/components/Text/Text.js.map +1 -1
- package/esm/components/ActionIcon/ActionIcon.js.map +1 -1
- package/esm/components/Anchor/Anchor.js.map +1 -1
- package/esm/components/AppShell/HorizontalSection/Section/Section.js.map +1 -1
- package/esm/components/Autocomplete/Autocomplete.js +10 -3
- package/esm/components/Autocomplete/Autocomplete.js.map +1 -1
- package/esm/components/Avatar/Avatar.js.map +1 -1
- package/esm/components/Badge/Badge.js.map +1 -1
- package/esm/components/Box/Box.js.map +1 -1
- package/esm/components/Burger/Burger.js +2 -4
- package/esm/components/Burger/Burger.js.map +1 -1
- package/esm/components/Burger/Burger.styles.js +6 -27
- package/esm/components/Burger/Burger.styles.js.map +1 -1
- package/esm/components/Button/Button.js.map +1 -1
- package/esm/components/Button/UnstyledButton/UnstyledButton.js +3 -3
- package/esm/components/Button/UnstyledButton/UnstyledButton.js.map +1 -1
- package/esm/components/Button/UnstyledButton/UnstyledButton.styles.js +2 -1
- package/esm/components/Button/UnstyledButton/UnstyledButton.styles.js.map +1 -1
- package/esm/components/Card/Card.js +1 -1
- package/esm/components/Card/Card.js.map +1 -1
- package/esm/components/Card/CardSection/CardSection.js.map +1 -1
- package/esm/components/Center/Center.js.map +1 -1
- package/esm/components/Checkbox/Checkbox.styles.js +0 -1
- package/esm/components/Checkbox/Checkbox.styles.js.map +1 -1
- package/esm/components/ColorSwatch/ColorSwatch.js.map +1 -1
- package/esm/components/Grid/Col/Col.js +3 -2
- package/esm/components/Grid/Col/Col.js.map +1 -1
- package/esm/components/Grid/Grid.js +2 -9
- package/esm/components/Grid/Grid.js.map +1 -1
- package/esm/components/Highlight/Highlight.js.map +1 -1
- package/esm/components/Image/BackgroundImage/BackgroundImage.js.map +1 -1
- package/esm/components/Input/Input.js.map +1 -1
- package/esm/components/InputWrapper/InputWrapper.styles.js +2 -2
- package/esm/components/InputWrapper/InputWrapper.styles.js.map +1 -1
- package/esm/components/MultiSelect/MultiSelect.js +5 -2
- package/esm/components/MultiSelect/MultiSelect.js.map +1 -1
- package/esm/components/Overlay/Overlay.js.map +1 -1
- package/esm/components/Paper/Paper.js.map +1 -1
- package/esm/components/PasswordInput/PasswordInput.js +0 -1
- package/esm/components/PasswordInput/PasswordInput.js.map +1 -1
- package/esm/components/Select/Select.js +23 -17
- package/esm/components/Select/Select.js.map +1 -1
- package/esm/components/Select/Select.styles.js +4 -1
- package/esm/components/Select/Select.styles.js.map +1 -1
- package/esm/components/Select/SelectItems/SelectItems.js +1 -1
- package/esm/components/Select/SelectItems/SelectItems.js.map +1 -1
- package/esm/components/Select/filter-data/filter-data.js +13 -1
- package/esm/components/Select/filter-data/filter-data.js.map +1 -1
- package/esm/components/Slider/RangeSlider/RangeSlider.js +2 -1
- package/esm/components/Slider/RangeSlider/RangeSlider.js.map +1 -1
- package/esm/components/Slider/Track/Track.js +5 -3
- package/esm/components/Slider/Track/Track.js.map +1 -1
- package/esm/components/Text/Text.js.map +1 -1
- package/lib/components/ActionIcon/ActionIcon.d.ts.map +1 -1
- package/lib/components/ActionIcon/CloseButton/CloseButton.d.ts +1 -1
- package/lib/components/Anchor/Anchor.d.ts.map +1 -1
- package/lib/components/AppShell/HorizontalSection/Section/Section.d.ts.map +1 -1
- package/lib/components/Autocomplete/Autocomplete.d.ts +4 -0
- package/lib/components/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/lib/components/Avatar/Avatar.d.ts.map +1 -1
- package/lib/components/Badge/Badge.d.ts.map +1 -1
- package/lib/components/Box/Box.d.ts.map +1 -1
- package/lib/components/Burger/Burger.d.ts.map +1 -1
- package/lib/components/Burger/Burger.styles.d.ts.map +1 -1
- package/lib/components/Button/Button.d.ts.map +1 -1
- package/lib/components/Button/Button.styles.d.ts +2 -2
- package/lib/components/Button/UnstyledButton/UnstyledButton.d.ts +8 -3
- package/lib/components/Button/UnstyledButton/UnstyledButton.d.ts.map +1 -1
- package/lib/components/Button/UnstyledButton/UnstyledButton.styles.d.ts.map +1 -1
- package/lib/components/Card/CardSection/CardSection.d.ts.map +1 -1
- package/lib/components/Center/Center.d.ts.map +1 -1
- package/lib/components/Checkbox/Checkbox.styles.d.ts.map +1 -1
- package/lib/components/ColorSwatch/ColorSwatch.d.ts +4 -2
- package/lib/components/ColorSwatch/ColorSwatch.d.ts.map +1 -1
- package/lib/components/ColorSwatch/index.d.ts +1 -1
- package/lib/components/ColorSwatch/index.d.ts.map +1 -1
- package/lib/components/Grid/Col/Col.d.ts.map +1 -1
- package/lib/components/Grid/Grid.d.ts.map +1 -1
- package/lib/components/Highlight/Highlight.d.ts.map +1 -1
- package/lib/components/Image/BackgroundImage/BackgroundImage.d.ts.map +1 -1
- package/lib/components/Input/Input.d.ts.map +1 -1
- package/lib/components/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/lib/components/Overlay/Overlay.d.ts.map +1 -1
- package/lib/components/Paper/Paper.d.ts.map +1 -1
- package/lib/components/PasswordInput/PasswordInput.d.ts.map +1 -1
- package/lib/components/Popover/Popover.styles.d.ts +2 -2
- package/lib/components/Select/Select.d.ts +2 -0
- package/lib/components/Select/Select.d.ts.map +1 -1
- package/lib/components/Select/Select.styles.d.ts.map +1 -1
- package/lib/components/Select/filter-data/filter-data.d.ts +3 -1
- package/lib/components/Select/filter-data/filter-data.d.ts.map +1 -1
- package/lib/components/Slider/RangeSlider/RangeSlider.d.ts.map +1 -1
- package/lib/components/Slider/Track/Track.d.ts +3 -2
- package/lib/components/Slider/Track/Track.d.ts.map +1 -1
- package/lib/components/Tabs/TabControl/TabControl.d.ts +1 -1
- package/lib/components/Text/Text.d.ts.map +1 -1
- package/package.json +3 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Section.js","sources":["../../../../../src/components/AppShell/HorizontalSection/Section/Section.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { DefaultProps, PolymorphicComponentProps, PolymorphicRef } from '@mantine/styles';\nimport { Box } from '../../../Box';\n\ninterface _SectionProps extends DefaultProps {\n /** Section children */\n children: React.ReactNode;\n\n /** Force section to take all available height */\n grow?: boolean;\n}\n\nexport type SectionProps<C> = PolymorphicComponentProps<C, _SectionProps>;\n\ntype SectionComponent = <C = 'div'>(props: SectionProps<C>) => React.ReactElement;\n\nexport const Section: SectionComponent & { displayName?: string } = forwardRef(\n
|
|
1
|
+
{"version":3,"file":"Section.js","sources":["../../../../../src/components/AppShell/HorizontalSection/Section/Section.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { DefaultProps, PolymorphicComponentProps, PolymorphicRef } from '@mantine/styles';\nimport { Box } from '../../../Box';\n\ninterface _SectionProps extends DefaultProps {\n /** Section children */\n children: React.ReactNode;\n\n /** Force section to take all available height */\n grow?: boolean;\n}\n\nexport type SectionProps<C> = PolymorphicComponentProps<C, _SectionProps>;\n\ntype SectionComponent = <C = 'div'>(props: SectionProps<C>) => React.ReactElement;\n\nexport const Section: SectionComponent & { displayName?: string } = forwardRef(\n (\n { component, children, grow = false, sx, ...others }: SectionProps<'div'>,\n ref: PolymorphicRef<'div'>\n ) => (\n <Box\n component={component || 'div'}\n ref={ref}\n sx={[{ flex: grow ? 1 : 0, boxSizing: 'border-box' }, ...(Array.isArray(sx) ? sx : [sx])]}\n {...others}\n >\n {children}\n </Box>\n )\n) as any;\n\nSection.displayName = '@mantine/core/Section';\n"],"names":[],"mappings":";;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAChK,IAAI,cAAc,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK;AAC/B,EAAE,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;AAChC,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AAClC,MAAM,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACxC,EAAE,IAAI,mBAAmB;AACzB,IAAI,KAAK,IAAI,IAAI,IAAI,mBAAmB,CAAC,CAAC,CAAC,EAAE;AAC7C,MAAM,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AACpC,QAAQ,eAAe,CAAC,CAAC,EAAE,IAAI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AACP,IAAI,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,GAAG,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;AAC3F,GAAG,EAAE,MAAM,CAAC,EAAE,QAAQ,CAAC,CAAC;AACxB,CAAC,EAAE;AACH,OAAO,CAAC,WAAW,GAAG,uBAAuB;;;;"}
|
|
@@ -4,6 +4,7 @@ import { getDefaultZIndex, useMantineDefaultProps, extractSystemStyles } from '@
|
|
|
4
4
|
import { SelectDropdown } from '../Select/SelectDropdown/SelectDropdown.js';
|
|
5
5
|
import { SelectItems } from '../Select/SelectItems/SelectItems.js';
|
|
6
6
|
import { DefaultItem } from '../Select/DefaultItem/DefaultItem.js';
|
|
7
|
+
import { SelectScrollArea } from '../Select/SelectScrollArea/SelectScrollArea.js';
|
|
7
8
|
import { filterData } from './filter-data/filter-data.js';
|
|
8
9
|
import useStyles from './Autocomplete.styles.js';
|
|
9
10
|
import { InputWrapper } from '../InputWrapper/InputWrapper.js';
|
|
@@ -55,7 +56,8 @@ const defaultProps = {
|
|
|
55
56
|
filter: defaultFilter,
|
|
56
57
|
switchDirectionOnFlip: false,
|
|
57
58
|
zIndex: getDefaultZIndex("popover"),
|
|
58
|
-
dropdownPosition: "
|
|
59
|
+
dropdownPosition: "flip",
|
|
60
|
+
maxDropdownHeight: "auto"
|
|
59
61
|
};
|
|
60
62
|
const Autocomplete = forwardRef((props, ref) => {
|
|
61
63
|
const _a = useMantineDefaultProps("Autocomplete", defaultProps, props), {
|
|
@@ -94,7 +96,9 @@ const Autocomplete = forwardRef((props, ref) => {
|
|
|
94
96
|
withinPortal,
|
|
95
97
|
switchDirectionOnFlip = false,
|
|
96
98
|
zIndex = getDefaultZIndex("popover"),
|
|
97
|
-
dropdownPosition
|
|
99
|
+
dropdownPosition,
|
|
100
|
+
maxDropdownHeight,
|
|
101
|
+
dropdownComponent,
|
|
98
102
|
errorProps,
|
|
99
103
|
labelProps,
|
|
100
104
|
descriptionProps
|
|
@@ -135,6 +139,8 @@ const Autocomplete = forwardRef((props, ref) => {
|
|
|
135
139
|
"switchDirectionOnFlip",
|
|
136
140
|
"zIndex",
|
|
137
141
|
"dropdownPosition",
|
|
142
|
+
"maxDropdownHeight",
|
|
143
|
+
"dropdownComponent",
|
|
138
144
|
"errorProps",
|
|
139
145
|
"labelProps",
|
|
140
146
|
"descriptionProps"
|
|
@@ -276,7 +282,8 @@ const Autocomplete = forwardRef((props, ref) => {
|
|
|
276
282
|
transitionTimingFunction,
|
|
277
283
|
uuid,
|
|
278
284
|
shadow,
|
|
279
|
-
maxDropdownHeight
|
|
285
|
+
maxDropdownHeight,
|
|
286
|
+
dropdownComponent: dropdownComponent || SelectScrollArea,
|
|
280
287
|
classNames,
|
|
281
288
|
styles,
|
|
282
289
|
__staticSelector: "Autocomplete",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Autocomplete.js","sources":["../../../src/components/Autocomplete/Autocomplete.tsx"],"sourcesContent":["import React, { useState, forwardRef, useRef } from 'react';\nimport { useUncontrolled, useDidUpdate, useMergedRef, useUuid } from '@mantine/hooks';\nimport {\n DefaultProps,\n ClassNames,\n extractSystemStyles,\n getDefaultZIndex,\n useMantineDefaultProps,\n} from '@mantine/styles';\nimport { InputWrapper, InputWrapperBaseProps, InputWrapperStylesNames } from '../InputWrapper';\nimport { Input, InputBaseProps, InputStylesNames } from '../Input';\nimport { SelectDropdown, SelectDropdownStylesNames } from '../Select/SelectDropdown/SelectDropdown';\nimport { SelectItems } from '../Select/SelectItems/SelectItems';\nimport { DefaultItem } from '../Select/DefaultItem/DefaultItem';\nimport { filterData } from './filter-data/filter-data';\nimport useStyles from './Autocomplete.styles';\nimport { SelectSharedProps } from '../Select/Select';\n\nexport type AutocompleteStylesNames =\n | InputStylesNames\n | InputWrapperStylesNames\n | SelectDropdownStylesNames\n | ClassNames<typeof useStyles>;\n\nexport interface AutocompleteItem {\n value: string;\n [key: string]: any;\n}\n\nexport interface AutocompleteProps\n extends DefaultProps<AutocompleteStylesNames>,\n InputBaseProps,\n InputWrapperBaseProps,\n SelectSharedProps<AutocompleteItem, string>,\n Omit<React.ComponentPropsWithoutRef<'input'>, 'size' | 'onChange' | 'value' | 'defaultValue'> {\n /** Called when item from dropdown was selected */\n onItemSubmit?(item: AutocompleteItem): void;\n}\n\nexport function defaultFilter(value: string, item: AutocompleteItem) {\n return item.value.toLowerCase().trim().includes(value.toLowerCase().trim());\n}\n\nconst defaultProps: Partial<AutocompleteProps> = {\n required: false,\n size: 'sm',\n shadow: 'sm',\n limit: 5,\n itemComponent: DefaultItem,\n transition: 'pop',\n transitionDuration: 0,\n initiallyOpened: false,\n filter: defaultFilter,\n switchDirectionOnFlip: false,\n zIndex: getDefaultZIndex('popover'),\n dropdownPosition: 'bottom',\n};\n\nexport const Autocomplete = forwardRef<HTMLInputElement, AutocompleteProps>(\n (props: AutocompleteProps, ref) => {\n const {\n className,\n style,\n sx,\n required = false,\n label,\n id,\n error,\n description,\n size = 'sm',\n shadow = 'sm',\n data,\n limit = 5,\n value,\n defaultValue,\n onChange,\n itemComponent = DefaultItem,\n onItemSubmit,\n onKeyDown,\n onFocus,\n onBlur,\n onClick,\n transition = 'skew-up',\n transitionDuration = 0,\n initiallyOpened = false,\n transitionTimingFunction,\n wrapperProps,\n classNames,\n styles,\n filter = defaultFilter,\n nothingFound,\n onDropdownClose,\n onDropdownOpen,\n withinPortal,\n switchDirectionOnFlip = false,\n zIndex = getDefaultZIndex('popover'),\n dropdownPosition = 'bottom',\n errorProps,\n labelProps,\n descriptionProps,\n ...others\n } = useMantineDefaultProps('Autocomplete', defaultProps, props);\n const { classes } = useStyles({ size }, { classNames, styles, name: 'Autocomplete' });\n const { systemStyles, rest } = extractSystemStyles(others);\n const [dropdownOpened, _setDropdownOpened] = useState(initiallyOpened);\n const [hovered, setHovered] = useState(-1);\n const [direction, setDirection] = useState<React.CSSProperties['flexDirection']>('column');\n const inputRef = useRef<HTMLInputElement>(null);\n const uuid = useUuid(id);\n const [_value, handleChange] = useUncontrolled({\n value,\n defaultValue,\n finalValue: '',\n onChange,\n rule: (val) => typeof val === 'string',\n });\n\n const setDropdownOpened = (opened: boolean) => {\n _setDropdownOpened(opened);\n const handler = opened ? onDropdownOpen : onDropdownClose;\n typeof handler === 'function' && handler();\n };\n\n useDidUpdate(() => {\n setHovered(0);\n }, [_value]);\n\n const handleItemClick = (item: AutocompleteItem) => {\n handleChange(item.value);\n typeof onItemSubmit === 'function' && onItemSubmit(item);\n setDropdownOpened(false);\n };\n\n const formattedData = data.map((item) => (typeof item === 'string' ? { value: item } : item));\n const filteredData = filterData({ data: formattedData, value: _value, limit, filter });\n\n const handleInputKeydown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n typeof onKeyDown === 'function' && onKeyDown(event);\n\n const isColumn = direction === 'column';\n\n const handleNext = () => {\n setHovered((current) => (current < filteredData.length - 1 ? current + 1 : current));\n };\n\n const handlePrevious = () => {\n setHovered((current) => (current > 0 ? current - 1 : current));\n };\n\n switch (event.nativeEvent.code) {\n case 'ArrowUp': {\n event.preventDefault();\n isColumn ? handlePrevious() : handleNext();\n break;\n }\n\n case 'ArrowDown': {\n event.preventDefault();\n isColumn ? handleNext() : handlePrevious();\n break;\n }\n\n case 'Enter': {\n if (dropdownOpened) {\n event.preventDefault();\n }\n\n if (filteredData[hovered] && dropdownOpened) {\n handleChange(filteredData[hovered].value);\n typeof onItemSubmit === 'function' && onItemSubmit(filteredData[hovered]);\n setDropdownOpened(false);\n }\n break;\n }\n\n case 'Escape': {\n if (dropdownOpened) {\n event.preventDefault();\n setDropdownOpened(false);\n }\n }\n }\n };\n\n const handleInputFocus = (event: React.FocusEvent<HTMLInputElement>) => {\n typeof onFocus === 'function' && onFocus(event);\n setDropdownOpened(true);\n };\n\n const handleInputBlur = (event: React.FocusEvent<HTMLInputElement>) => {\n typeof onBlur === 'function' && onBlur(event);\n setDropdownOpened(false);\n };\n\n const handleInputClick = (event: React.MouseEvent<HTMLInputElement, MouseEvent>) => {\n typeof onClick === 'function' && onClick(event);\n setDropdownOpened(true);\n };\n\n const shouldRenderDropdown =\n dropdownOpened && (filteredData.length > 0 || (filteredData.length === 0 && !!nothingFound));\n\n return (\n <InputWrapper\n required={required}\n id={uuid}\n label={label}\n error={error}\n description={description}\n size={size}\n className={className}\n classNames={classNames}\n styles={styles}\n __staticSelector=\"Autocomplete\"\n sx={sx}\n style={style}\n errorProps={errorProps}\n descriptionProps={descriptionProps}\n labelProps={labelProps}\n {...systemStyles}\n {...wrapperProps}\n >\n <div\n className={classes.wrapper}\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-owns={`${uuid}-items`}\n aria-controls={uuid}\n aria-expanded={shouldRenderDropdown}\n onMouseLeave={() => setHovered(-1)}\n tabIndex={-1}\n >\n <Input<'input'>\n {...rest}\n data-mantine-stop-propagation={dropdownOpened}\n required={required}\n ref={useMergedRef(ref, inputRef)}\n id={uuid}\n type=\"string\"\n invalid={!!error}\n size={size}\n onKeyDown={handleInputKeydown}\n classNames={classNames}\n styles={styles}\n __staticSelector=\"Autocomplete\"\n value={_value}\n onChange={(event) => {\n handleChange(event.currentTarget.value);\n setDropdownOpened(true);\n }}\n onFocus={handleInputFocus}\n onBlur={handleInputBlur}\n onClick={handleInputClick}\n autoComplete=\"nope\"\n aria-autocomplete=\"list\"\n aria-controls={shouldRenderDropdown ? `${uuid}-items` : null}\n aria-activedescendant={hovered !== -1 ? `${uuid}-${hovered}` : null}\n />\n\n <SelectDropdown\n mounted={shouldRenderDropdown}\n transition={transition}\n transitionDuration={transitionDuration}\n transitionTimingFunction={transitionTimingFunction}\n uuid={uuid}\n shadow={shadow}\n maxDropdownHeight=\"auto\"\n classNames={classNames}\n styles={styles}\n __staticSelector=\"Autocomplete\"\n direction={direction}\n onDirectionChange={setDirection}\n switchDirectionOnFlip={switchDirectionOnFlip}\n referenceElement={inputRef.current}\n withinPortal={withinPortal}\n zIndex={zIndex}\n dropdownPosition={dropdownPosition}\n >\n <SelectItems\n data={filteredData}\n hovered={hovered}\n classNames={classNames}\n styles={styles}\n uuid={uuid}\n __staticSelector=\"Autocomplete\"\n onItemHover={setHovered}\n onItemSelect={handleItemClick}\n itemComponent={itemComponent}\n size={size}\n nothingFound={nothingFound}\n />\n </SelectDropdown>\n </div>\n </InputWrapper>\n );\n }\n);\n\nAutocomplete.displayName = '@mantine/core/Autocomplete';\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,CA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BAAgB;AACpB,GAAG,kBAAkB,KAAK,CAAC,aAAa,CAAC,WAAW,EAAE;AACtD,IAAI,IAAI,EAAE,YAAY;AACtB,IAAI,OAAO;AACX,IAAI,UAAU;AACd,IAAI,MAAM;AACV,IAAI,IAAI;AACR,IAAI,gBAAgB,EAAE,cAAc;AACpC,IAAI,WAAW,EAAE,UAAU;AAC3B,IAAI,YAAY,EAAE,eAAe;AACjC,IAAI,aAAa;AACjB,IAAI,IAAI;AACR,IAAI,YAAY;AAChB,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACR,CAAC,EAAE;AACH,YAAY,CAAC,WAAW,GAAG,4BAA4B;;;;"}
|
|
1
|
+
{"version":3,"file":"Autocomplete.js","sources":["../../../src/components/Autocomplete/Autocomplete.tsx"],"sourcesContent":["import React, { useState, forwardRef, useRef } from 'react';\nimport { useUncontrolled, useDidUpdate, useMergedRef, useUuid } from '@mantine/hooks';\nimport {\n DefaultProps,\n ClassNames,\n extractSystemStyles,\n getDefaultZIndex,\n useMantineDefaultProps,\n} from '@mantine/styles';\nimport { InputWrapper, InputWrapperBaseProps, InputWrapperStylesNames } from '../InputWrapper';\nimport { Input, InputBaseProps, InputStylesNames } from '../Input';\nimport { SelectDropdown, SelectDropdownStylesNames } from '../Select/SelectDropdown/SelectDropdown';\nimport { SelectItems } from '../Select/SelectItems/SelectItems';\nimport { DefaultItem } from '../Select/DefaultItem/DefaultItem';\nimport { SelectScrollArea } from '../Select/SelectScrollArea/SelectScrollArea';\nimport { filterData } from './filter-data/filter-data';\nimport useStyles from './Autocomplete.styles';\nimport { SelectSharedProps } from '../Select/Select';\n\nexport type AutocompleteStylesNames =\n | InputStylesNames\n | InputWrapperStylesNames\n | SelectDropdownStylesNames\n | ClassNames<typeof useStyles>;\n\nexport interface AutocompleteItem {\n value: string;\n [key: string]: any;\n}\n\nexport interface AutocompleteProps\n extends DefaultProps<AutocompleteStylesNames>,\n InputBaseProps,\n InputWrapperBaseProps,\n SelectSharedProps<AutocompleteItem, string>,\n Omit<React.ComponentPropsWithoutRef<'input'>, 'size' | 'onChange' | 'value' | 'defaultValue'> {\n /** Maximum dropdown height */\n maxDropdownHeight?: number | string;\n\n /** Change dropdown component, can be used to add native scrollbars */\n dropdownComponent?: any;\n\n /** Called when item from dropdown was selected */\n onItemSubmit?(item: AutocompleteItem): void;\n}\n\nexport function defaultFilter(value: string, item: AutocompleteItem) {\n return item.value.toLowerCase().trim().includes(value.toLowerCase().trim());\n}\n\nconst defaultProps: Partial<AutocompleteProps> = {\n required: false,\n size: 'sm',\n shadow: 'sm',\n limit: 5,\n itemComponent: DefaultItem,\n transition: 'pop',\n transitionDuration: 0,\n initiallyOpened: false,\n filter: defaultFilter,\n switchDirectionOnFlip: false,\n zIndex: getDefaultZIndex('popover'),\n dropdownPosition: 'flip',\n maxDropdownHeight: 'auto',\n};\n\nexport const Autocomplete = forwardRef<HTMLInputElement, AutocompleteProps>(\n (props: AutocompleteProps, ref) => {\n const {\n className,\n style,\n sx,\n required = false,\n label,\n id,\n error,\n description,\n size = 'sm',\n shadow = 'sm',\n data,\n limit = 5,\n value,\n defaultValue,\n onChange,\n itemComponent = DefaultItem,\n onItemSubmit,\n onKeyDown,\n onFocus,\n onBlur,\n onClick,\n transition = 'skew-up',\n transitionDuration = 0,\n initiallyOpened = false,\n transitionTimingFunction,\n wrapperProps,\n classNames,\n styles,\n filter = defaultFilter,\n nothingFound,\n onDropdownClose,\n onDropdownOpen,\n withinPortal,\n switchDirectionOnFlip = false,\n zIndex = getDefaultZIndex('popover'),\n dropdownPosition,\n maxDropdownHeight,\n dropdownComponent,\n errorProps,\n labelProps,\n descriptionProps,\n ...others\n } = useMantineDefaultProps('Autocomplete', defaultProps, props);\n const { classes } = useStyles({ size }, { classNames, styles, name: 'Autocomplete' });\n const { systemStyles, rest } = extractSystemStyles(others);\n const [dropdownOpened, _setDropdownOpened] = useState(initiallyOpened);\n const [hovered, setHovered] = useState(-1);\n const [direction, setDirection] = useState<React.CSSProperties['flexDirection']>('column');\n const inputRef = useRef<HTMLInputElement>(null);\n const uuid = useUuid(id);\n const [_value, handleChange] = useUncontrolled({\n value,\n defaultValue,\n finalValue: '',\n onChange,\n rule: (val) => typeof val === 'string',\n });\n\n const setDropdownOpened = (opened: boolean) => {\n _setDropdownOpened(opened);\n const handler = opened ? onDropdownOpen : onDropdownClose;\n typeof handler === 'function' && handler();\n };\n\n useDidUpdate(() => {\n setHovered(0);\n }, [_value]);\n\n const handleItemClick = (item: AutocompleteItem) => {\n handleChange(item.value);\n typeof onItemSubmit === 'function' && onItemSubmit(item);\n setDropdownOpened(false);\n };\n\n const formattedData = data.map((item) => (typeof item === 'string' ? { value: item } : item));\n const filteredData = filterData({ data: formattedData, value: _value, limit, filter });\n\n const handleInputKeydown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n typeof onKeyDown === 'function' && onKeyDown(event);\n\n const isColumn = direction === 'column';\n\n const handleNext = () => {\n setHovered((current) => (current < filteredData.length - 1 ? current + 1 : current));\n };\n\n const handlePrevious = () => {\n setHovered((current) => (current > 0 ? current - 1 : current));\n };\n\n switch (event.nativeEvent.code) {\n case 'ArrowUp': {\n event.preventDefault();\n isColumn ? handlePrevious() : handleNext();\n break;\n }\n\n case 'ArrowDown': {\n event.preventDefault();\n isColumn ? handleNext() : handlePrevious();\n break;\n }\n\n case 'Enter': {\n if (dropdownOpened) {\n event.preventDefault();\n }\n\n if (filteredData[hovered] && dropdownOpened) {\n handleChange(filteredData[hovered].value);\n typeof onItemSubmit === 'function' && onItemSubmit(filteredData[hovered]);\n setDropdownOpened(false);\n }\n break;\n }\n\n case 'Escape': {\n if (dropdownOpened) {\n event.preventDefault();\n setDropdownOpened(false);\n }\n }\n }\n };\n\n const handleInputFocus = (event: React.FocusEvent<HTMLInputElement>) => {\n typeof onFocus === 'function' && onFocus(event);\n setDropdownOpened(true);\n };\n\n const handleInputBlur = (event: React.FocusEvent<HTMLInputElement>) => {\n typeof onBlur === 'function' && onBlur(event);\n setDropdownOpened(false);\n };\n\n const handleInputClick = (event: React.MouseEvent<HTMLInputElement, MouseEvent>) => {\n typeof onClick === 'function' && onClick(event);\n setDropdownOpened(true);\n };\n\n const shouldRenderDropdown =\n dropdownOpened && (filteredData.length > 0 || (filteredData.length === 0 && !!nothingFound));\n\n return (\n <InputWrapper\n required={required}\n id={uuid}\n label={label}\n error={error}\n description={description}\n size={size}\n className={className}\n classNames={classNames}\n styles={styles}\n __staticSelector=\"Autocomplete\"\n sx={sx}\n style={style}\n errorProps={errorProps}\n descriptionProps={descriptionProps}\n labelProps={labelProps}\n {...systemStyles}\n {...wrapperProps}\n >\n <div\n className={classes.wrapper}\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-owns={`${uuid}-items`}\n aria-controls={uuid}\n aria-expanded={shouldRenderDropdown}\n onMouseLeave={() => setHovered(-1)}\n tabIndex={-1}\n >\n <Input<'input'>\n {...rest}\n data-mantine-stop-propagation={dropdownOpened}\n required={required}\n ref={useMergedRef(ref, inputRef)}\n id={uuid}\n type=\"string\"\n invalid={!!error}\n size={size}\n onKeyDown={handleInputKeydown}\n classNames={classNames}\n styles={styles}\n __staticSelector=\"Autocomplete\"\n value={_value}\n onChange={(event) => {\n handleChange(event.currentTarget.value);\n setDropdownOpened(true);\n }}\n onFocus={handleInputFocus}\n onBlur={handleInputBlur}\n onClick={handleInputClick}\n autoComplete=\"nope\"\n aria-autocomplete=\"list\"\n aria-controls={shouldRenderDropdown ? `${uuid}-items` : null}\n aria-activedescendant={hovered !== -1 ? `${uuid}-${hovered}` : null}\n />\n\n <SelectDropdown\n mounted={shouldRenderDropdown}\n transition={transition}\n transitionDuration={transitionDuration}\n transitionTimingFunction={transitionTimingFunction}\n uuid={uuid}\n shadow={shadow}\n maxDropdownHeight={maxDropdownHeight}\n dropdownComponent={dropdownComponent || SelectScrollArea}\n classNames={classNames}\n styles={styles}\n __staticSelector=\"Autocomplete\"\n direction={direction}\n onDirectionChange={setDirection}\n switchDirectionOnFlip={switchDirectionOnFlip}\n referenceElement={inputRef.current}\n withinPortal={withinPortal}\n zIndex={zIndex}\n dropdownPosition={dropdownPosition}\n >\n <SelectItems\n data={filteredData}\n hovered={hovered}\n classNames={classNames}\n styles={styles}\n uuid={uuid}\n __staticSelector=\"Autocomplete\"\n onItemHover={setHovered}\n onItemSelect={handleItemClick}\n itemComponent={itemComponent}\n size={size}\n nothingFound={nothingFound}\n />\n </SelectDropdown>\n </div>\n </InputWrapper>\n );\n }\n);\n\nAutocomplete.displayName = '@mantine/core/Autocomplete';\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,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iBAAiB,EAAE,YAAY;AACnC,IAAI,qBAAqB;AACzB,IAAI,gBAAgB,EAAE,QAAQ,CAAC,OAAO;AACtC,IAAI,YAAY;AAChB,IAAI,MAAM;AACV,IAAI,gBAAgB;AACpB,GAAG,kBAAkB,KAAK,CAAC,aAAa,CAAC,WAAW,EAAE;AACtD,IAAI,IAAI,EAAE,YAAY;AACtB,IAAI,OAAO;AACX,IAAI,UAAU;AACd,IAAI,MAAM;AACV,IAAI,IAAI;AACR,IAAI,gBAAgB,EAAE,cAAc;AACpC,IAAI,WAAW,EAAE,UAAU;AAC3B,IAAI,YAAY,EAAE,eAAe;AACjC,IAAI,aAAa;AACjB,IAAI,IAAI;AACR,IAAI,YAAY;AAChB,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACR,CAAC,EAAE;AACH,YAAY,CAAC,WAAW,GAAG,4BAA4B;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.js","sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["import React, { useEffect, useState, forwardRef } from 'react';\nimport {\n DefaultProps,\n MantineNumberSize,\n MantineColor,\n ClassNames,\n PolymorphicComponentProps,\n PolymorphicRef,\n useMantineDefaultProps,\n} from '@mantine/styles';\nimport { Box } from '../Box';\nimport { AvatarPlaceholderIcon } from './AvatarPlaceholderIcon';\nimport useStyles from './Avatar.styles';\n\nexport type AvatarStylesNames = ClassNames<typeof useStyles>;\n\ninterface _AvatarProps extends DefaultProps<AvatarStylesNames> {\n /** Image url */\n src?: string | null;\n\n /** Image alt text or title for placeholder variant */\n alt?: string;\n\n /** Avatar width and height */\n size?: MantineNumberSize;\n\n /** Value from theme.radius or number to set border-radius in px */\n radius?: MantineNumberSize;\n\n /** Color from theme.colors used for letter and icon placeholders */\n color?: MantineColor;\n\n /** `img` element attributes */\n imageProps?: React.ComponentPropsWithoutRef<'img'>;\n\n /** Custom placeholder */\n children?: React.ReactNode;\n}\n\nexport type AvatarProps<C> = PolymorphicComponentProps<C, _AvatarProps>;\n\ntype AvatarComponent = (<C = 'div'>(props: AvatarProps<C>) => React.ReactElement) & {\n displayName?: string;\n};\n\nconst defaultProps: Partial<AvatarProps<any>> = {\n size: 'md',\n color: 'gray',\n};\n\nexport const Avatar: AvatarComponent = forwardRef(\n
|
|
1
|
+
{"version":3,"file":"Avatar.js","sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["import React, { useEffect, useState, forwardRef } from 'react';\nimport {\n DefaultProps,\n MantineNumberSize,\n MantineColor,\n ClassNames,\n PolymorphicComponentProps,\n PolymorphicRef,\n useMantineDefaultProps,\n} from '@mantine/styles';\nimport { Box } from '../Box';\nimport { AvatarPlaceholderIcon } from './AvatarPlaceholderIcon';\nimport useStyles from './Avatar.styles';\n\nexport type AvatarStylesNames = ClassNames<typeof useStyles>;\n\ninterface _AvatarProps extends DefaultProps<AvatarStylesNames> {\n /** Image url */\n src?: string | null;\n\n /** Image alt text or title for placeholder variant */\n alt?: string;\n\n /** Avatar width and height */\n size?: MantineNumberSize;\n\n /** Value from theme.radius or number to set border-radius in px */\n radius?: MantineNumberSize;\n\n /** Color from theme.colors used for letter and icon placeholders */\n color?: MantineColor;\n\n /** `img` element attributes */\n imageProps?: React.ComponentPropsWithoutRef<'img'>;\n\n /** Custom placeholder */\n children?: React.ReactNode;\n}\n\nexport type AvatarProps<C> = PolymorphicComponentProps<C, _AvatarProps>;\n\ntype AvatarComponent = (<C = 'div'>(props: AvatarProps<C>) => React.ReactElement) & {\n displayName?: string;\n};\n\nconst defaultProps: Partial<AvatarProps<any>> = {\n size: 'md',\n color: 'gray',\n};\n\nexport const Avatar: AvatarComponent = forwardRef(\n (props: AvatarProps<'div'>, ref: PolymorphicRef<'div'>) => {\n const {\n component,\n className,\n size,\n src,\n alt,\n radius,\n children,\n color,\n classNames,\n styles,\n imageProps,\n ...others\n } = useMantineDefaultProps('Avatar', defaultProps, props);\n const { classes, cx } = useStyles(\n { color, radius, size },\n { classNames, styles, name: 'Avatar' }\n );\n const [error, setError] = useState(!src);\n\n useEffect(() => {\n !src ? setError(true) : setError(false);\n }, [src]);\n\n return (\n <Box\n component={component || 'div'}\n className={cx(classes.root, className)}\n ref={ref}\n {...others}\n >\n {error ? (\n <div className={classes.placeholder} title={alt}>\n {children || <AvatarPlaceholderIcon className={classes.placeholderIcon} />}\n </div>\n ) : (\n <img\n {...imageProps}\n className={classes.image}\n src={src}\n alt={alt}\n onError={() => setError(true)}\n />\n )}\n </Box>\n );\n }\n) as any;\n\nAvatar.displayName = '@mantine/core/Avatar';\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,I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C,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC;AAC1C,IAAI,GAAG;AACP,GAAG,EAAE,MAAM,CAAC,EAAE,KAAK,mBAAmB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE;AACjE,IAAI,SAAS,EAAE,OAAO,CAAC,WAAW;AAClC,IAAI,KAAK,EAAE,GAAG;AACd,GAAG,EAAE,QAAQ,oBAAoB,KAAK,CAAC,aAAa,CAAC,qBAAqB,EAAE;AAC5E,IAAI,SAAS,EAAE,OAAO,CAAC,eAAe;AACtC,GAAG,CAAC,CAAC,mBAAmB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,aAAa,CAAC,cAAc,CAAC,EAAE,EAAE,UAAU,CAAC,EAAE;AACjG,IAAI,SAAS,EAAE,OAAO,CAAC,KAAK;AAC5B,IAAI,GAAG;AACP,IAAI,GAAG;AACP,IAAI,OAAO,EAAE,MAAM,QAAQ,CAAC,IAAI,CAAC;AACjC,GAAG,CAAC,CAAC,CAAC,CAAC;AACP,CAAC,EAAE;AACH,MAAM,CAAC,WAAW,GAAG,sBAAsB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport {\n DefaultProps,\n MantineSize,\n MantineNumberSize,\n MantineGradient,\n MantineColor,\n ClassNames,\n PolymorphicComponentProps,\n PolymorphicRef,\n useMantineDefaultProps,\n} from '@mantine/styles';\nimport { Box } from '../Box';\nimport useStyles from './Badge.styles';\n\nexport type BadgeVariant = 'light' | 'filled' | 'outline' | 'dot' | 'gradient';\nexport type BadgeStylesNames = ClassNames<typeof useStyles>;\n\ninterface _BadgeProps extends DefaultProps<BadgeStylesNames> {\n /** Badge color from theme */\n color?: MantineColor;\n\n /** Controls badge background, color and border styles */\n variant?: BadgeVariant;\n\n /** Controls gradient settings in gradient variant only */\n gradient?: MantineGradient;\n\n /** Defines badge height and font-size */\n size?: MantineSize;\n\n /** Predefined border-radius value from theme.radius or number for border-radius in px */\n radius?: MantineNumberSize;\n\n /** Sets badge width to 100% of parent element, hides overflow text with text-overflow: ellipsis */\n fullWidth?: boolean;\n\n /** Section rendered on the left side of label */\n leftSection?: React.ReactNode;\n\n /** Section rendered on the right side of label */\n rightSection?: React.ReactNode;\n\n /** Badge label */\n children?: React.ReactNode;\n}\n\nexport type BadgeProps<C> = PolymorphicComponentProps<C, _BadgeProps>;\n\ntype BadgeComponent = (<C = 'div'>(props: BadgeProps<C>) => React.ReactElement) & {\n displayName?: string;\n};\n\nconst defaultProps: Partial<BadgeProps<any>> = {\n variant: 'light',\n size: 'md',\n radius: 'xl',\n gradient: { from: 'blue', to: 'cyan', deg: 45 },\n};\n\nexport const Badge: BadgeComponent = forwardRef(\n
|
|
1
|
+
{"version":3,"file":"Badge.js","sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport {\n DefaultProps,\n MantineSize,\n MantineNumberSize,\n MantineGradient,\n MantineColor,\n ClassNames,\n PolymorphicComponentProps,\n PolymorphicRef,\n useMantineDefaultProps,\n} from '@mantine/styles';\nimport { Box } from '../Box';\nimport useStyles from './Badge.styles';\n\nexport type BadgeVariant = 'light' | 'filled' | 'outline' | 'dot' | 'gradient';\nexport type BadgeStylesNames = ClassNames<typeof useStyles>;\n\ninterface _BadgeProps extends DefaultProps<BadgeStylesNames> {\n /** Badge color from theme */\n color?: MantineColor;\n\n /** Controls badge background, color and border styles */\n variant?: BadgeVariant;\n\n /** Controls gradient settings in gradient variant only */\n gradient?: MantineGradient;\n\n /** Defines badge height and font-size */\n size?: MantineSize;\n\n /** Predefined border-radius value from theme.radius or number for border-radius in px */\n radius?: MantineNumberSize;\n\n /** Sets badge width to 100% of parent element, hides overflow text with text-overflow: ellipsis */\n fullWidth?: boolean;\n\n /** Section rendered on the left side of label */\n leftSection?: React.ReactNode;\n\n /** Section rendered on the right side of label */\n rightSection?: React.ReactNode;\n\n /** Badge label */\n children?: React.ReactNode;\n}\n\nexport type BadgeProps<C> = PolymorphicComponentProps<C, _BadgeProps>;\n\ntype BadgeComponent = (<C = 'div'>(props: BadgeProps<C>) => React.ReactElement) & {\n displayName?: string;\n};\n\nconst defaultProps: Partial<BadgeProps<any>> = {\n variant: 'light',\n size: 'md',\n radius: 'xl',\n gradient: { from: 'blue', to: 'cyan', deg: 45 },\n};\n\nexport const Badge: BadgeComponent = forwardRef(\n (props: BadgeProps<'div'>, ref: PolymorphicRef<'div'>) => {\n const {\n component,\n className,\n color,\n variant,\n fullWidth,\n children,\n size,\n leftSection,\n rightSection,\n radius,\n gradient,\n classNames,\n styles,\n ...others\n } = useMantineDefaultProps('Badge', defaultProps, props);\n\n const { classes, cx } = useStyles(\n {\n size,\n fullWidth,\n color,\n radius,\n gradientFrom: gradient.from,\n gradientTo: gradient.to,\n gradientDeg: gradient.deg,\n },\n { classNames, styles, name: 'Badge' }\n );\n\n return (\n <Box\n component={component || 'div'}\n className={cx(classes[variant], classes.root, className)}\n ref={ref}\n {...others}\n >\n {leftSection && <span className={classes.leftSection}>{leftSection}</span>}\n <span className={classes.inner}>{children}</span>\n {rightSection && <span className={classes.rightSection}>{rightSection}</span>}\n </Box>\n );\n }\n) as any;\n\nBadge.displayName = '@mantine/core/Badge';\n"],"names":[],"mappings":";;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE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,QAAQ,CAAC,IAAI;AAC/B,IAAI,UAAU,EAAE,QAAQ,CAAC,EAAE;AAC3B,IAAI,WAAW,EAAE,QAAQ,CAAC,GAAG;AAC7B,GAAG,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;AAC5C,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE,cAAc,CAAC;AACjE,IAAI,SAAS,EAAE,SAAS,IAAI,KAAK;AACjC,IAAI,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC;AAC5D,IAAI,GAAG;AACP,GAAG,EAAE,MAAM,CAAC,EAAE,WAAW,oBAAoB,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE;AACzE,IAAI,SAAS,EAAE,OAAO,CAAC,WAAW;AAClC,GAAG,EAAE,WAAW,CAAC,kBAAkB,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE;AAC/D,IAAI,SAAS,EAAE,OAAO,CAAC,KAAK;AAC5B,GAAG,EAAE,QAAQ,CAAC,EAAE,YAAY,oBAAoB,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE;AAC5E,IAAI,SAAS,EAAE,OAAO,CAAC,YAAY;AACnC,GAAG,EAAE,YAAY,CAAC,CAAC,CAAC;AACpB,CAAC,EAAE;AACH,KAAK,CAAC,WAAW,GAAG,qBAAqB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.js","sources":["../../../src/components/Box/Box.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport {\n DefaultProps,\n PolymorphicComponentProps,\n PolymorphicRef,\n extractSystemStyles,\n} from '@mantine/styles';\nimport { useSx, BoxSx } from './use-sx/use-sx';\n\ninterface _BoxProps extends Omit<DefaultProps, 'sx'> {\n sx?: BoxSx;\n}\n\nexport type BoxProps<C> = PolymorphicComponentProps<C, _BoxProps>;\n\ntype BoxComponent = (<C = 'div'>(props: BoxProps<C>) => React.ReactElement) & {\n displayName?: string;\n};\n\nexport const Box: BoxComponent = forwardRef(\n
|
|
1
|
+
{"version":3,"file":"Box.js","sources":["../../../src/components/Box/Box.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport {\n DefaultProps,\n PolymorphicComponentProps,\n PolymorphicRef,\n extractSystemStyles,\n} from '@mantine/styles';\nimport { useSx, BoxSx } from './use-sx/use-sx';\n\ninterface _BoxProps extends Omit<DefaultProps, 'sx'> {\n sx?: BoxSx;\n}\n\nexport type BoxProps<C> = PolymorphicComponentProps<C, _BoxProps>;\n\ntype BoxComponent = (<C = 'div'>(props: BoxProps<C>) => React.ReactElement) & {\n displayName?: string;\n};\n\nexport const Box: BoxComponent = forwardRef(\n ({ className, component, style, sx, ...others }: BoxProps<'div'>, ref: PolymorphicRef<'div'>) => {\n const { systemStyles, rest } = extractSystemStyles(others);\n const Element = component || 'div';\n return (\n <Element ref={ref} className={useSx(sx, systemStyles, className)} style={style} {...rest} />\n );\n }\n) as any;\n\nBox.displayName = '@mantine/core/Box';\n"],"names":[],"mappings":";;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAChK,IAAI,cAAc,GAAG,CAA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AM,CAAC;AAChB,CAAC,CAAC;AAMU,MAAC,GAAG,GAAG,UAAU,CAAC,CAAC,EAAE,EAAE,GAAG,KAAK;AAC3C,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC,EAAE,EAAE,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;AAC3H,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAC7D,EAAE,MAAM,OAAO,GAAG,SAAS,IAAI,KAAK,CAAC;AACrC,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,OAAO,EAAE,cAAc,CAAC;AACrE,IAAI,GAAG;AACP,IAAI,SAAS,EAAE,KAAK,CAAC,EAAE,EAAE,YAAY,EAAE,SAAS,CAAC;AACjD,IAAI,KAAK;AACT,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;AACZ,CAAC,EAAE;AACH,GAAG,CAAC,WAAW,GAAG,mBAAmB;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import { useMantineDefaultProps, useMantineTheme } from '@mantine/styles';
|
|
3
3
|
import useStyles from './Burger.styles.js';
|
|
4
|
-
import {
|
|
4
|
+
import { UnstyledButton } from '../Button/UnstyledButton/UnstyledButton.js';
|
|
5
5
|
|
|
6
6
|
var __defProp = Object.defineProperty;
|
|
7
7
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
@@ -53,9 +53,7 @@ const Burger = forwardRef((props, ref) => {
|
|
|
53
53
|
const theme = useMantineTheme();
|
|
54
54
|
const _color = color || (theme.colorScheme === "dark" ? theme.white : theme.black);
|
|
55
55
|
const { classes, cx } = useStyles({ color: _color, size }, { classNames, styles, name: "Burger" });
|
|
56
|
-
return /* @__PURE__ */ React.createElement(
|
|
57
|
-
component: "button",
|
|
58
|
-
type: "button",
|
|
56
|
+
return /* @__PURE__ */ React.createElement(UnstyledButton, __spreadValues({
|
|
59
57
|
className: cx(classes.root, className),
|
|
60
58
|
ref
|
|
61
59
|
}, others), /* @__PURE__ */ React.createElement("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Burger.js","sources":["../../../src/components/Burger/Burger.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport {\n useMantineTheme,\n DefaultProps,\n MantineNumberSize,\n MantineColor,\n ClassNames,\n useMantineDefaultProps,\n} from '@mantine/styles';\nimport {
|
|
1
|
+
{"version":3,"file":"Burger.js","sources":["../../../src/components/Burger/Burger.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport {\n useMantineTheme,\n DefaultProps,\n MantineNumberSize,\n MantineColor,\n ClassNames,\n useMantineDefaultProps,\n} from '@mantine/styles';\nimport { UnstyledButton } from '../Button';\nimport useStyles from './Burger.styles';\n\nexport type BurgerStylesNames = Exclude<ClassNames<typeof useStyles>, 'opened'>;\n\nexport interface BurgerProps\n extends DefaultProps<BurgerStylesNames>,\n React.ComponentPropsWithoutRef<'button'> {\n /** Burger state: true for cross, false for burger */\n opened: boolean;\n\n /** Burger color value, not connected to theme.colors, defaults to theme.black with light color scheme and theme.white with dark */\n color?: MantineColor;\n\n /** Predefined burger size or number to set width and height in px */\n size?: MantineNumberSize;\n}\n\nconst defaultProps: Partial<BurgerProps> = {\n size: 'md',\n};\n\nexport const Burger = forwardRef<HTMLButtonElement, BurgerProps>((props: BurgerProps, ref) => {\n const {\n className,\n opened,\n color,\n size = 'md',\n classNames,\n styles,\n ...others\n } = useMantineDefaultProps('Burger', defaultProps, props);\n const theme = useMantineTheme();\n const _color = color || (theme.colorScheme === 'dark' ? theme.white : theme.black);\n const { classes, cx } = useStyles(\n { color: _color, size },\n { classNames, styles, name: 'Burger' }\n );\n\n return (\n <UnstyledButton className={cx(classes.root, className)} ref={ref} {...others}>\n <div className={cx(classes.burger, { [classes.opened]: opened })} />\n </UnstyledButton>\n );\n});\n\nBurger.displayName = '@mantine/core/Burger';\n"],"names":[],"mappings":";;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAChK,IAAI,cAAc,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK;AAC/B,EAAE,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;AAChC,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AAClC,MAAM,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACxC,EAAE,IAAI,mBAAmB;AACzB,IAAI,KAAK,IAAI,IAAI,IAAI,mBAAmB,CAAC,CAAC,CAAC,EAAE;AAC7C,MAAM,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AACpC,QAAQ,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1C,KAAK;AACL,EAAE,OAAO,CAAC,CAAC;AACX,CAAC,CAAC;AACF,IAAI,SAAS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,MAAM,KAAK,GAAG,eAAe,EAAE,CAAC;AAClC,EAAE,MAAM,MAAM,GAAG,KAAK,KAAK,KAAK,CAAC,WAAW,KAAK,MAAM,GAAG,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;AACrF,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,SAAS,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;AACrG,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,cAAc,EAAE,cAAc,CAAC;AAC5E,IAAI,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC;AAC1C,IAAI,GAAG;AACP,GAAG,EAAE,MAAM,CAAC,kBAAkB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE;AACzD,IAAI,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC;AAC/D,GAAG,CAAC,CAAC,CAAC;AACN,CAAC,EAAE;AACH,MAAM,CAAC,WAAW,GAAG,sBAAsB;;;;"}
|
|
@@ -1,24 +1,5 @@
|
|
|
1
1
|
import { createStyles } from '@mantine/styles';
|
|
2
2
|
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __defProps = Object.defineProperties;
|
|
5
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
-
var __spreadValues = (a, b) => {
|
|
11
|
-
for (var prop in b || (b = {}))
|
|
12
|
-
if (__hasOwnProp.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
if (__getOwnPropSymbols)
|
|
15
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
-
if (__propIsEnum.call(b, prop))
|
|
17
|
-
__defNormalProp(a, prop, b[prop]);
|
|
18
|
-
}
|
|
19
|
-
return a;
|
|
20
|
-
};
|
|
21
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
22
3
|
const sizes = {
|
|
23
4
|
xs: 12,
|
|
24
5
|
sm: 18,
|
|
@@ -28,19 +9,17 @@ const sizes = {
|
|
|
28
9
|
};
|
|
29
10
|
var useStyles = createStyles((theme, { size, color }, getRef) => {
|
|
30
11
|
const sizeValue = theme.fn.size({ size, sizes });
|
|
31
|
-
const opened = { ref: getRef("opened") };
|
|
32
12
|
return {
|
|
33
|
-
opened
|
|
34
|
-
|
|
35
|
-
|
|
13
|
+
opened: {
|
|
14
|
+
ref: getRef("opened")
|
|
15
|
+
},
|
|
16
|
+
root: {
|
|
36
17
|
borderRadius: theme.radius.sm,
|
|
37
18
|
width: sizeValue + theme.spacing.xs,
|
|
38
19
|
height: sizeValue + theme.spacing.xs,
|
|
39
20
|
padding: theme.spacing.xs / 2,
|
|
40
|
-
backgroundColor: "transparent",
|
|
41
|
-
border: 0,
|
|
42
21
|
cursor: "pointer"
|
|
43
|
-
}
|
|
22
|
+
},
|
|
44
23
|
burger: {
|
|
45
24
|
position: "relative",
|
|
46
25
|
userSelect: "none",
|
|
@@ -68,7 +47,7 @@ var useStyles = createStyles((theme, { size, color }, getRef) => {
|
|
|
68
47
|
"&:after": {
|
|
69
48
|
top: sizeValue / 3
|
|
70
49
|
},
|
|
71
|
-
[`&.${opened
|
|
50
|
+
[`&.${getRef("opened")}`]: {
|
|
72
51
|
backgroundColor: "transparent",
|
|
73
52
|
"&:before": {
|
|
74
53
|
transform: `translateY(${sizeValue / 3}px) rotate(45deg)`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Burger.styles.js","sources":["../../../src/components/Burger/Burger.styles.ts"],"sourcesContent":["import { createStyles, MantineNumberSize, MantineColor } from '@mantine/styles';\n\nexport interface BurgerStylesParams {\n size: MantineNumberSize;\n color: MantineColor;\n}\n\nexport const sizes = {\n xs: 12,\n sm: 18,\n md: 24,\n lg: 34,\n xl: 42,\n};\n\nexport default createStyles((theme, { size, color }: BurgerStylesParams, getRef) => {\n const sizeValue = theme.fn.size({ size, sizes });\n
|
|
1
|
+
{"version":3,"file":"Burger.styles.js","sources":["../../../src/components/Burger/Burger.styles.ts"],"sourcesContent":["import { createStyles, MantineNumberSize, MantineColor } from '@mantine/styles';\n\nexport interface BurgerStylesParams {\n size: MantineNumberSize;\n color: MantineColor;\n}\n\nexport const sizes = {\n xs: 12,\n sm: 18,\n md: 24,\n lg: 34,\n xl: 42,\n};\n\nexport default createStyles((theme, { size, color }: BurgerStylesParams, getRef) => {\n const sizeValue = theme.fn.size({ size, sizes });\n\n return {\n opened: {\n ref: getRef('opened'),\n },\n\n root: {\n borderRadius: theme.radius.sm,\n width: sizeValue + theme.spacing.xs,\n height: sizeValue + theme.spacing.xs,\n padding: theme.spacing.xs / 2,\n cursor: 'pointer',\n },\n\n burger: {\n position: 'relative',\n userSelect: 'none',\n boxSizing: 'border-box',\n\n '&, &:before, &:after': {\n display: 'block',\n width: sizeValue,\n height: Math.ceil(sizeValue / 12),\n backgroundColor: color,\n outline: '1px solid transparent',\n transitionProperty: 'background-color, transform',\n transitionDuration: '300ms',\n\n '@media (prefers-reduced-motion)': {\n transitionDuration: '0ms',\n },\n },\n\n '&:before, &:after': {\n position: 'absolute',\n content: '\"\"',\n left: 0,\n },\n\n '&:before': {\n top: (sizeValue / 3) * -1,\n },\n\n '&:after': {\n top: sizeValue / 3,\n },\n\n [`&.${getRef('opened')}`]: {\n backgroundColor: 'transparent',\n\n '&:before': {\n transform: `translateY(${sizeValue / 3}px) rotate(45deg)`,\n },\n\n '&:after': {\n transform: `translateY(-${sizeValue / 3}px) rotate(-45deg)`,\n },\n },\n },\n };\n});\n"],"names":[],"mappings":";;AACY,MAAC,KAAK,GAAG;AACrB,EAAE,EAAE,EAAE,EAAE;AACR,EAAE,EAAE,EAAE,EAAE;AACR,EAAE,EAAE,EAAE,EAAE;AACR,EAAE,EAAE,EAAE,EAAE;AACR,EAAE,EAAE,EAAE,EAAE;AACR,EAAE;AACF,gBAAe,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,MAAM,KAAK;AAChE,EAAE,MAAM,SAAS,GAAG,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;AACnD,EAAE,OAAO;AACT,IAAI,MAAM,EAAE;AACZ,MAAM,GAAG,EAAE,MAAM,CAAC,QAAQ,CAAC;AAC3B,KAAK;AACL,IAAI,IAAI,EAAE;AACV,MAAM,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE;AACnC,MAAM,KAAK,EAAE,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,EAAE;AACzC,MAAM,MAAM,EAAE,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,EAAE;AAC1C,MAAM,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC;AACnC,MAAM,MAAM,EAAE,SAAS;AACvB,KAAK;AACL,IAAI,MAAM,EAAE;AACZ,MAAM,QAAQ,EAAE,UAAU;AAC1B,MAAM,UAAU,EAAE,MAAM;AACxB,MAAM,SAAS,EAAE,YAAY;AAC7B,MAAM,sBAAsB,EAAE;AAC9B,QAAQ,OAAO,EAAE,OAAO;AACxB,QAAQ,KAAK,EAAE,SAAS;AACxB,QAAQ,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;AACzC,QAAQ,eAAe,EAAE,KAAK;AAC9B,QAAQ,OAAO,EAAE,uBAAuB;AACxC,QAAQ,kBAAkB,EAAE,6BAA6B;AACzD,QAAQ,kBAAkB,EAAE,OAAO;AACnC,QAAQ,iCAAiC,EAAE;AAC3C,UAAU,kBAAkB,EAAE,KAAK;AACnC,SAAS;AACT,OAAO;AACP,MAAM,mBAAmB,EAAE;AAC3B,QAAQ,QAAQ,EAAE,UAAU;AAC5B,QAAQ,OAAO,EAAE,IAAI;AACrB,QAAQ,IAAI,EAAE,CAAC;AACf,OAAO;AACP,MAAM,UAAU,EAAE;AAClB,QAAQ,GAAG,EAAE,SAAS,GAAG,CAAC,GAAG,CAAC,CAAC;AAC/B,OAAO;AACP,MAAM,SAAS,EAAE;AACjB,QAAQ,GAAG,EAAE,SAAS,GAAG,CAAC;AAC1B,OAAO;AACP,MAAM,CAAC,CAAC,EAAE,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG;AACjC,QAAQ,eAAe,EAAE,aAAa;AACtC,QAAQ,UAAU,EAAE;AACpB,UAAU,SAAS,EAAE,CAAC,WAAW,EAAE,SAAS,GAAG,CAAC,CAAC,iBAAiB,CAAC;AACnE,SAAS;AACT,QAAQ,SAAS,EAAE;AACnB,UAAU,SAAS,EAAE,CAAC,YAAY,EAAE,SAAS,GAAG,CAAC,CAAC,kBAAkB,CAAC;AACrE,SAAS;AACT,OAAO;AACP,KAAK;AACL,GAAG,CAAC;AACJ,CAAC,CAAC;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport {\n DefaultProps,\n MantineSize,\n MantineNumberSize,\n getSharedColorScheme,\n MantineGradient,\n MantineColor,\n ClassNames,\n PolymorphicComponentProps,\n PolymorphicRef,\n useMantineDefaultProps,\n} from '@mantine/styles';\nimport { Box } from '../Box';\nimport useStyles, { heights, ButtonVariant } from './Button.styles';\nimport { Loader, LoaderProps } from '../Loader';\n\nexport type ButtonStylesNames = ClassNames<typeof useStyles>;\n\nexport interface SharedButtonProps extends DefaultProps<ButtonStylesNames> {\n /** Predefined button size */\n size?: MantineSize;\n\n /** Button type attribute */\n type?: 'submit' | 'button' | 'reset';\n\n /** Button color from theme */\n color?: MantineColor;\n\n /** Adds icon before button label */\n leftIcon?: React.ReactNode;\n\n /** Adds icon after button label */\n rightIcon?: React.ReactNode;\n\n /** Sets button width to 100% of parent element */\n fullWidth?: boolean;\n\n /** Button border-radius from theme or number to set border-radius in px */\n radius?: MantineNumberSize;\n\n /** Controls button appearance */\n variant?: ButtonVariant;\n\n /** Controls gradient settings in gradient variant only */\n gradient?: MantineGradient;\n\n /** Set text-transform to uppercase */\n uppercase?: boolean;\n\n /** Reduces vertical and horizontal spacing */\n compact?: boolean;\n\n /** Indicate loading state */\n loading?: boolean;\n\n /** Props spread to Loader component */\n loaderProps?: LoaderProps;\n\n /** Loader position relative to button label */\n loaderPosition?: 'left' | 'right';\n\n /** Button label */\n children?: React.ReactNode;\n\n /** Disabled state */\n disabled?: boolean;\n}\n\nexport type ButtonProps<C> = PolymorphicComponentProps<C, SharedButtonProps>;\n\ntype ButtonComponent = (<C = 'button'>(props: ButtonProps<C>) => React.ReactElement) & {\n displayName?: string;\n};\n\nconst defaultProps: Partial<ButtonProps<any>> = {\n size: 'sm',\n type: 'button',\n variant: 'filled',\n loaderPosition: 'left',\n gradient: { from: 'blue', to: 'cyan', deg: 45 },\n};\n\nexport const Button: ButtonComponent = forwardRef(\n
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport {\n DefaultProps,\n MantineSize,\n MantineNumberSize,\n getSharedColorScheme,\n MantineGradient,\n MantineColor,\n ClassNames,\n PolymorphicComponentProps,\n PolymorphicRef,\n useMantineDefaultProps,\n} from '@mantine/styles';\nimport { Box } from '../Box';\nimport useStyles, { heights, ButtonVariant } from './Button.styles';\nimport { Loader, LoaderProps } from '../Loader';\n\nexport type ButtonStylesNames = ClassNames<typeof useStyles>;\n\nexport interface SharedButtonProps extends DefaultProps<ButtonStylesNames> {\n /** Predefined button size */\n size?: MantineSize;\n\n /** Button type attribute */\n type?: 'submit' | 'button' | 'reset';\n\n /** Button color from theme */\n color?: MantineColor;\n\n /** Adds icon before button label */\n leftIcon?: React.ReactNode;\n\n /** Adds icon after button label */\n rightIcon?: React.ReactNode;\n\n /** Sets button width to 100% of parent element */\n fullWidth?: boolean;\n\n /** Button border-radius from theme or number to set border-radius in px */\n radius?: MantineNumberSize;\n\n /** Controls button appearance */\n variant?: ButtonVariant;\n\n /** Controls gradient settings in gradient variant only */\n gradient?: MantineGradient;\n\n /** Set text-transform to uppercase */\n uppercase?: boolean;\n\n /** Reduces vertical and horizontal spacing */\n compact?: boolean;\n\n /** Indicate loading state */\n loading?: boolean;\n\n /** Props spread to Loader component */\n loaderProps?: LoaderProps;\n\n /** Loader position relative to button label */\n loaderPosition?: 'left' | 'right';\n\n /** Button label */\n children?: React.ReactNode;\n\n /** Disabled state */\n disabled?: boolean;\n}\n\nexport type ButtonProps<C> = PolymorphicComponentProps<C, SharedButtonProps>;\n\ntype ButtonComponent = (<C = 'button'>(props: ButtonProps<C>) => React.ReactElement) & {\n displayName?: string;\n};\n\nconst defaultProps: Partial<ButtonProps<any>> = {\n size: 'sm',\n type: 'button',\n variant: 'filled',\n loaderPosition: 'left',\n gradient: { from: 'blue', to: 'cyan', deg: 45 },\n};\n\nexport const Button: ButtonComponent = forwardRef(\n (props: ButtonProps<'button'>, ref: PolymorphicRef<'button'>) => {\n const {\n className,\n size,\n color,\n type,\n disabled,\n children,\n leftIcon,\n rightIcon,\n fullWidth,\n variant,\n radius,\n component,\n uppercase,\n compact,\n loading,\n loaderPosition,\n loaderProps,\n gradient,\n classNames,\n styles,\n ...others\n } = useMantineDefaultProps('Button', defaultProps, props);\n\n const { classes, cx, theme } = useStyles(\n {\n radius,\n color,\n size,\n fullWidth,\n compact,\n gradientFrom: gradient.from,\n gradientTo: gradient.to,\n gradientDeg: gradient.deg,\n },\n { classNames, styles, name: 'Button' }\n );\n const colors = getSharedColorScheme({ color, theme, variant });\n const loader = (\n <Loader\n color={colors.color}\n size={theme.fn.size({ size, sizes: heights }) / 2}\n {...loaderProps}\n />\n );\n\n return (\n <Box\n component={component || 'button'}\n className={cx(classes[variant], { [classes.loading]: loading }, classes.root, className)}\n type={type}\n disabled={disabled || loading}\n ref={ref}\n onTouchStart={() => {}}\n {...others}\n >\n <div className={classes.inner}>\n {(leftIcon || (loading && loaderPosition === 'left')) && (\n <span className={cx(classes.icon, classes.leftIcon)}>\n {loading && loaderPosition === 'left' ? loader : leftIcon}\n </span>\n )}\n\n <span\n className={classes.label}\n style={{ textTransform: uppercase ? 'uppercase' : undefined }}\n >\n {children}\n </span>\n\n {(rightIcon || (loading && loaderPosition === 'right')) && (\n <span className={cx(classes.icon, classes.rightIcon)}>\n {loading && loaderPosition === 'right' ? loader : rightIcon}\n </span>\n )}\n </div>\n </Box>\n );\n }\n) as any;\n\nButton.displayName = '@mantine/core/Button';\n"],"names":[],"mappings":";;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAChK,IAA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CAAC,KAAK,EAAE;AACzD,IAAI,SAAS,EAAE,OAAO,CAAC,KAAK;AAC5B,GAAG,EAAE,CAAC,QAAQ,IAAI,OAAO,IAAI,cAAc,KAAK,MAAM,qBAAqB,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE;AACvG,IAAI,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC;AACjD,GAAG,EAAE,OAAO,IAAI,cAAc,KAAK,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC,kBAAkB,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE;AAC5G,IAAI,SAAS,EAAE,OAAO,CAAC,KAAK;AAC5B,IAAI,KAAK,EAAE,EAAE,aAAa,EAAE,SAAS,GAAG,WAAW,GAAG,KAAK,CAAC,EAAE;AAC9D,GAAG,EAAE,QAAQ,CAAC,EAAE,CAAC,SAAS,IAAI,OAAO,IAAI,cAAc,KAAK,OAAO,qBAAqB,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE;AACpH,IAAI,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC;AAClD,GAAG,EAAE,OAAO,IAAI,cAAc,KAAK,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AACnE,CAAC,EAAE;AACH,MAAM,CAAC,WAAW,GAAG,sBAAsB;;;;"}
|
|
@@ -31,13 +31,13 @@ var __objRest = (source, exclude) => {
|
|
|
31
31
|
return target;
|
|
32
32
|
};
|
|
33
33
|
const UnstyledButton = forwardRef((_a, ref) => {
|
|
34
|
-
var _b = _a, { className } = _b, others = __objRest(_b, ["className"]);
|
|
34
|
+
var _b = _a, { className, component = "button" } = _b, others = __objRest(_b, ["className", "component"]);
|
|
35
35
|
const { classes, cx } = useStyles(null, { name: "UnstyledButton" });
|
|
36
36
|
return /* @__PURE__ */ React.createElement(Box, __spreadValues({
|
|
37
|
-
component
|
|
37
|
+
component,
|
|
38
38
|
ref,
|
|
39
39
|
className: cx(classes.root, className),
|
|
40
|
-
type: "button"
|
|
40
|
+
type: component === "button" ? "button" : void 0
|
|
41
41
|
}, others));
|
|
42
42
|
});
|
|
43
43
|
UnstyledButton.displayName = "@mantine/core/UnstyledButton";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnstyledButton.js","sources":["../../../../src/components/Button/UnstyledButton/UnstyledButton.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { DefaultProps } from '@mantine/styles';\nimport { Box } from '../../Box';\nimport useStyles from './UnstyledButton.styles';\n\
|
|
1
|
+
{"version":3,"file":"UnstyledButton.js","sources":["../../../../src/components/Button/UnstyledButton/UnstyledButton.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { DefaultProps, PolymorphicComponentProps, PolymorphicRef } from '@mantine/styles';\nimport { Box } from '../../Box';\nimport useStyles from './UnstyledButton.styles';\n\ninterface _UnstyledButtonProps extends DefaultProps {}\n\nexport type UnstyledButtonProps<C> = PolymorphicComponentProps<C, _UnstyledButtonProps>;\n\ntype UnstyledButtonComponent = (<C = 'button'>(\n props: UnstyledButtonProps<C>\n) => React.ReactElement) & {\n displayName?: string;\n};\n\nexport const UnstyledButton: UnstyledButtonComponent = forwardRef(\n (\n { className, component = 'button', ...others }: UnstyledButtonProps<'button'>,\n ref: PolymorphicRef<'button'>\n ) => {\n const { classes, cx } = useStyles(null, { name: 'UnstyledButton' });\n return (\n <Box<any>\n component={component}\n ref={ref}\n className={cx(classes.root, className)}\n type={component === 'button' ? 'button' : undefined}\n {...others}\n />\n );\n }\n) as any;\n\nUnstyledButton.displayName = '@mantine/core/UnstyledButton';\n"],"names":[],"mappings":";;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,C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
30
30
|
textAlign: "left",
|
|
31
|
-
color: theme.colorScheme === "dark" ? theme.colors.dark[0] : theme.black
|
|
31
|
+
color: theme.colorScheme === "dark" ? theme.colors.dark[0] : theme.black,
|
|
32
|
+
textDecoration: "none"
|
|
32
33
|
})
|
|
33
34
|
}));
|
|
34
35
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnstyledButton.styles.js","sources":["../../../../src/components/Button/UnstyledButton/UnstyledButton.styles.ts"],"sourcesContent":["import { createStyles } from '@mantine/styles';\n\nexport default createStyles((theme) => ({\n root: {\n ...theme.fn.focusStyles(),\n ...theme.fn.fontStyles(),\n cursor: 'pointer',\n border: 0,\n padding: 0,\n appearance: 'none',\n fontSize: theme.fontSizes.md,\n backgroundColor: 'transparent',\n textAlign: 'left',\n color: theme.colorScheme === 'dark' ? theme.colors.dark[0] : theme.black,\n },\n}));\n"],"names":[],"mappings":";;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,UAAU,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACzC,IAAI,iBAAiB,GAAG,MAAM,CAAC,yBAAyB,CAAC;AACzD,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAChK,IAAI,cAAc,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK;AAC/B,EA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;AACJ,CAAC,CAAC,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"UnstyledButton.styles.js","sources":["../../../../src/components/Button/UnstyledButton/UnstyledButton.styles.ts"],"sourcesContent":["import { createStyles } from '@mantine/styles';\n\nexport default createStyles((theme) => ({\n root: {\n ...theme.fn.focusStyles(),\n ...theme.fn.fontStyles(),\n cursor: 'pointer',\n border: 0,\n padding: 0,\n appearance: 'none',\n fontSize: theme.fontSizes.md,\n backgroundColor: 'transparent',\n textAlign: 'left',\n color: theme.colorScheme === 'dark' ? theme.colors.dark[0] : theme.black,\n textDecoration: 'none',\n },\n}));\n"],"names":[],"mappings":";;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,UAAU,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACzC,IAAI,iBAAiB,GAAG,MAAM,CAAC,yBAAyB,CAAC;AACzD,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAChK,IAAI,cAAc,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK;AAC/B,EAAE,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;AAChC,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AAClC,MAAM,eAAe,CAAC,CAAC,EAAE,I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, forwardRef } from 'react';\nimport { PolymorphicComponentProps, PolymorphicRef, useMantineDefaultProps } from '@mantine/styles';\nimport { Paper, SharedPaperProps } from '../Paper/Paper';\nimport { CardSection } from './CardSection/CardSection';\nimport useStyles from './Card.styles';\n\ninterface _CardProps extends SharedPaperProps {\n /** Card content */\n children: React.ReactNode;\n}\n\nexport type CardProps<C> = PolymorphicComponentProps<C, _CardProps>;\n\ntype CardComponent = (<C = 'div'>(props: CardProps<C>) => React.ReactElement) & {\n displayName?: string;\n Section: typeof CardSection;\n};\n\nconst defaultProps: Partial<CardProps<any>> = {\n p: 'md',\n};\n\nexport const Card: CardComponent = forwardRef(\n
|
|
1
|
+
{"version":3,"file":"Card.js","sources":["../../../src/components/Card/Card.tsx"],"sourcesContent":["import React, { Children, cloneElement, forwardRef } from 'react';\nimport { PolymorphicComponentProps, PolymorphicRef, useMantineDefaultProps } from '@mantine/styles';\nimport { Paper, SharedPaperProps } from '../Paper/Paper';\nimport { CardSection } from './CardSection/CardSection';\nimport useStyles from './Card.styles';\n\ninterface _CardProps extends SharedPaperProps {\n /** Card content */\n children: React.ReactNode;\n}\n\nexport type CardProps<C> = PolymorphicComponentProps<C, _CardProps>;\n\ntype CardComponent = (<C = 'div'>(props: CardProps<C>) => React.ReactElement) & {\n displayName?: string;\n Section: typeof CardSection;\n};\n\nconst defaultProps: Partial<CardProps<any>> = {\n p: 'md',\n};\n\nexport const Card: CardComponent = forwardRef(\n (props: CardProps<'div'>, ref: PolymorphicRef<'div'>) => {\n const { component, className, p, radius, children, classNames, styles, ...others } =\n useMantineDefaultProps('Card', defaultProps, props);\n const { classes, cx } = useStyles(null, { name: 'Card', classNames, styles });\n const _children = Children.toArray(children);\n\n const content = _children.map((child, index) => {\n if (typeof child === 'object' && child && 'type' in child && child.type === CardSection) {\n return cloneElement(child, {\n padding: p,\n first: index === 0,\n last: index === _children.length - 1,\n });\n }\n\n return child;\n });\n\n return (\n <Paper\n className={cx(classes.root, className)}\n radius={radius}\n p={p}\n component={component || 'div'}\n ref={ref}\n {...others}\n >\n {content}\n </Paper>\n );\n }\n) as any;\n\nCard.Section = CardSection;\nCard.displayName = '@mantine/core/Card';\n"],"names":[],"mappings":";;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAChK,IAAI,cAAc,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK;AAC/B,EAAE,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;AAChC,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AAClC,MAAM,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACxC,EAAE,IAAI,mBAAmB;AACzB,IAAI,KAAK,IAAI,IAAI,IAAI,mBAAmB,CAAC,CAAC,CAAC,EAAE;AAC7C,MAAM,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AACpC,QAAQ,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1C,KAAK;AACL,EAAE,OAAO,CAAC,CAAC;AACX,CAAC,CAAC;AACF,IAAI,SAAS,GAAG,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EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,CAAC;AAChF,EAAE,MAAM,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC/C,EAAE,MAAM,OAAO,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK;AAClD,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,IAAI,MAAM,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,WAAW,EAAE;AAC7F,MAAM,OAAO,YAAY,CAAC,KAAK,EAAE;AACjC,QAAQ,OAAO,EAAE,CAAC;AAClB,QAAQ,KAAK,EAAE,KAAK,KAAK,CAAC;AAC1B,QAAQ,IAAI,EAAE,KAAK,KAAK,SAAS,CAAC,MAAM,GAAG,CAAC;AAC5C,OAAO,CAAC,CAAC;AACT,KAAK;AACL,IAAI,OAAO,KAAK,CAAC;AACjB,GAAG,CAAC,CAAC;AACL,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,cAAc,CAAC;AACnE,IAAI,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC;AAC1C,IAAI,MAAM;AACV,IAAI,CAAC;AACL,IAAI,SAAS,EAAE,SAAS,IAAI,KAAK;AACjC,IAAI,GAAG;AACP,GAAG,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC;AACvB,CAAC,EAAE;AACH,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC;AAC3B,IAAI,CAAC,WAAW,GAAG,oBAAoB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardSection.js","sources":["../../../../src/components/Card/CardSection/CardSection.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport {\n DefaultProps,\n MantineNumberSize,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '@mantine/styles';\nimport { Box } from '../../Box';\nimport useStyles from './CardSection.styles';\n\nexport interface _CardSectionProps extends DefaultProps {\n padding?: MantineNumberSize;\n first?: boolean;\n last?: boolean;\n}\n\nexport type CardSectionProps<C> = PolymorphicComponentProps<C, _CardSectionProps>;\n\ntype CardSectionComponent = (<C = 'div'>(props: CardSectionProps<C>) => React.ReactElement) & {\n displayName?: string;\n};\n\nexport const CardSection: CardSectionComponent = forwardRef(\n
|
|
1
|
+
{"version":3,"file":"CardSection.js","sources":["../../../../src/components/Card/CardSection/CardSection.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport {\n DefaultProps,\n MantineNumberSize,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '@mantine/styles';\nimport { Box } from '../../Box';\nimport useStyles from './CardSection.styles';\n\nexport interface _CardSectionProps extends DefaultProps {\n padding?: MantineNumberSize;\n first?: boolean;\n last?: boolean;\n}\n\nexport type CardSectionProps<C> = PolymorphicComponentProps<C, _CardSectionProps>;\n\ntype CardSectionComponent = (<C = 'div'>(props: CardSectionProps<C>) => React.ReactElement) & {\n displayName?: string;\n};\n\nexport const CardSection: CardSectionComponent = forwardRef(\n (\n { className, padding = 0, component, first, last, ...others }: CardSectionProps<'div'>,\n ref: PolymorphicRef<'div'>\n ) => {\n const { classes, cx } = useStyles({ padding, first, last }, { name: 'Card' });\n return (\n <Box\n component={component || 'div'}\n className={cx(classes.cardSection, className)}\n ref={ref}\n {...others}\n />\n );\n }\n) as any;\n\nCardSection.displayName = '@mantine/core/CardSection';\n"],"names":[],"mappings":";;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAA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AAC,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;AAIU,MAAC,WAAW,GAAG,UAAU,CAAC,CAAC,EAAE,EAAE,GAAG,KAAK;AACnD,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE,OAAO,GAAG,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC,EAAE,EAAE,CAAC,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AACvJ,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,SAAS,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;AAChF,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE,cAAc,CAAC;AACjE,IAAI,SAAS,EAAE,SAAS,IAAI,KAAK;AACjC,IAAI,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,SAAS,CAAC;AACjD,IAAI,GAAG;AACP,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;AACd,CAAC,EAAE;AACH,WAAW,CAAC,WAAW,GAAG,2BAA2B;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Center.js","sources":["../../../src/components/Center/Center.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport {\n DefaultProps,\n PolymorphicComponentProps,\n PolymorphicRef,\n useMantineDefaultProps,\n} from '@mantine/styles';\nimport { Box } from '../Box';\n\nexport interface _CenterProps extends DefaultProps {\n /** Content that should be centered vertically and horizontally */\n children: React.ReactNode;\n\n /** Set to true to use inline-flex instead of flex */\n inline?: boolean;\n}\n\nexport type CenterProps<C> = PolymorphicComponentProps<C, _CenterProps>;\n\ntype CenterComponent = (<C = 'div'>(props: CenterProps<C>) => React.ReactElement) & {\n displayName?: string;\n};\n\nexport const Center: CenterComponent = forwardRef(\n
|
|
1
|
+
{"version":3,"file":"Center.js","sources":["../../../src/components/Center/Center.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport {\n DefaultProps,\n PolymorphicComponentProps,\n PolymorphicRef,\n useMantineDefaultProps,\n} from '@mantine/styles';\nimport { Box } from '../Box';\n\nexport interface _CenterProps extends DefaultProps {\n /** Content that should be centered vertically and horizontally */\n children: React.ReactNode;\n\n /** Set to true to use inline-flex instead of flex */\n inline?: boolean;\n}\n\nexport type CenterProps<C> = PolymorphicComponentProps<C, _CenterProps>;\n\ntype CenterComponent = (<C = 'div'>(props: CenterProps<C>) => React.ReactElement) & {\n displayName?: string;\n};\n\nexport const Center: CenterComponent = forwardRef(\n (props: CenterProps<'div'>, ref: PolymorphicRef<'div'>) => {\n const { inline, sx, ...others } = useMantineDefaultProps('Center', {}, props);\n return (\n <Box\n ref={ref}\n sx={[\n {\n display: inline ? 'inline-flex' : 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n ...(Array.isArray(sx) ? sx : [sx]),\n ]}\n {...others}\n />\n );\n }\n) as any;\n\nCenter.displayName = '@mantine/core/Center';\n"],"names":[],"mappings":";;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,C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AAI,IAAI,IAAI,mBAAmB,CAAC,MAAM,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;AAMU,MAAC,MAAM,GAAG,UAAU,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK;AACjD,EAAE,MAAM,EAAE,GAAG,sBAAsB,CAAC,QAAQ,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC,EAAE,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;AACxH,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE,cAAc,CAAC;AACjE,IAAI,GAAG;AACP,IAAI,EAAE,EAAE;AACR,MAAM;AACN,QAAQ,OAAO,EAAE,MAAM,GAAG,aAAa,GAAG,MAAM;AAChD,QAAQ,UAAU,EAAE,QAAQ;AAC5B,QAAQ,cAAc,EAAE,QAAQ;AAChC,OAAO;AACP,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;AACtC,KAAK;AACL,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;AACd,CAAC,EAAE;AACH,MAAM,CAAC,WAAW,GAAG,sBAAsB;;;;"}
|
|
@@ -81,7 +81,6 @@ var useStyles = createStyles((theme, { size, radius, color, transitionDuration }
|
|
|
81
81
|
height: _size,
|
|
82
82
|
borderRadius: theme.fn.radius(radius),
|
|
83
83
|
padding: 0,
|
|
84
|
-
outline: 0,
|
|
85
84
|
display: "block",
|
|
86
85
|
margin: 0,
|
|
87
86
|
transition: `border-color ${transitionDuration}ms ease, background-color ${transitionDuration}ms ease`,
|