@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":"ActionIcon.js","sources":["../../../src/components/ActionIcon/ActionIcon.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport {\n DefaultProps,\n MantineNumberSize,\n getSharedColorScheme,\n MantineColor,\n PolymorphicComponentProps,\n PolymorphicRef,\n ClassNames,\n useMantineDefaultProps,\n} from '@mantine/styles';\nimport { Box } from '../Box';\nimport useStyles, { sizes, ActionIconVariant } from './ActionIcon.styles';\nimport { Loader, LoaderProps } from '../Loader';\n\nexport type ActionIconStylesNames = ClassNames<typeof useStyles>;\n\ninterface _ActionIconProps extends DefaultProps<ActionIconStylesNames> {\n /** Icon rendered inside button */\n children?: React.ReactNode;\n\n /** Controls appearance */\n variant?: ActionIconVariant;\n\n /** Button hover, active and icon colors from theme, defaults to gray */\n color?: MantineColor;\n\n /** Button border-radius from theme or number to set border-radius in px */\n radius?: MantineNumberSize;\n\n /** Predefined icon size or number to set width and height in px */\n size?: MantineNumberSize;\n\n /** Props spread to Loader component */\n loaderProps?: LoaderProps;\n\n /** Indicate loading state */\n loading?: boolean;\n}\n\nexport type ActionIconProps<C> = PolymorphicComponentProps<C, _ActionIconProps>;\n\ntype ActionIconComponent = (<C = 'button'>(props: ActionIconProps<C>) => React.ReactElement) & {\n displayName?: string;\n};\n\nconst defaultProps: Partial<ActionIconProps<any>> = {\n color: 'gray',\n size: 'md',\n variant: 'hover',\n disabled: false,\n loading: false,\n};\n\nexport const ActionIcon: ActionIconComponent = forwardRef(\n
|
|
1
|
+
{"version":3,"file":"ActionIcon.js","sources":["../../../src/components/ActionIcon/ActionIcon.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport {\n DefaultProps,\n MantineNumberSize,\n getSharedColorScheme,\n MantineColor,\n PolymorphicComponentProps,\n PolymorphicRef,\n ClassNames,\n useMantineDefaultProps,\n} from '@mantine/styles';\nimport { Box } from '../Box';\nimport useStyles, { sizes, ActionIconVariant } from './ActionIcon.styles';\nimport { Loader, LoaderProps } from '../Loader';\n\nexport type ActionIconStylesNames = ClassNames<typeof useStyles>;\n\ninterface _ActionIconProps extends DefaultProps<ActionIconStylesNames> {\n /** Icon rendered inside button */\n children?: React.ReactNode;\n\n /** Controls appearance */\n variant?: ActionIconVariant;\n\n /** Button hover, active and icon colors from theme, defaults to gray */\n color?: MantineColor;\n\n /** Button border-radius from theme or number to set border-radius in px */\n radius?: MantineNumberSize;\n\n /** Predefined icon size or number to set width and height in px */\n size?: MantineNumberSize;\n\n /** Props spread to Loader component */\n loaderProps?: LoaderProps;\n\n /** Indicate loading state */\n loading?: boolean;\n}\n\nexport type ActionIconProps<C> = PolymorphicComponentProps<C, _ActionIconProps>;\n\ntype ActionIconComponent = (<C = 'button'>(props: ActionIconProps<C>) => React.ReactElement) & {\n displayName?: string;\n};\n\nconst defaultProps: Partial<ActionIconProps<any>> = {\n color: 'gray',\n size: 'md',\n variant: 'hover',\n disabled: false,\n loading: false,\n};\n\nexport const ActionIcon: ActionIconComponent = forwardRef(\n (props: ActionIconProps<'button'>, ref: PolymorphicRef<'button'>) => {\n const {\n className,\n color,\n children,\n radius,\n size,\n variant,\n disabled,\n loaderProps,\n loading,\n component,\n styles,\n classNames,\n ...others\n } = useMantineDefaultProps('ActionIcon', defaultProps, props);\n\n const { classes, cx, theme } = useStyles(\n { size, radius, color },\n { name: 'ActionIcon', classNames, styles }\n );\n const colors = getSharedColorScheme({ color, theme, variant: 'light' });\n\n const loader = (\n <Loader color={colors.color} size={theme.fn.size({ size, sizes }) - 12} {...loaderProps} />\n );\n\n return (\n <Box<any>\n component={component || 'button'}\n className={cx(classes[variant], classes.root, { [classes.loading]: loading }, className)}\n type=\"button\"\n ref={ref}\n disabled={disabled || loading}\n {...others}\n >\n {loading ? loader : children}\n </Box>\n );\n }\n) as any;\n\nActionIcon.displayName = '@mantine/core/ActionIcon';\n"],"names":["forwardRef","useMantineDefaultProps","styles","useStyles","getSharedColorScheme","React","Loader","sizes","Box"],"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,mBA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Aa,CAACG,OAAG,EAAE,cAAc,CAAC;AACjE,IAAI,SAAS,EAAE,SAAS,IAAI,QAAQ;AACpC,IAAI,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,GAAG,OAAO,EAAE,EAAE,SAAS,CAAC;AAC5F,IAAI,IAAI,EAAE,QAAQ;AAClB,IAAI,GAAG;AACP,IAAI,QAAQ,EAAE,QAAQ,IAAI,OAAO;AACjC,GAAG,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC,CAAC;AAC3C,CAAC,EAAE;AACH,UAAU,CAAC,WAAW,GAAG,0BAA0B;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Anchor.js","sources":["../../../src/components/Anchor/Anchor.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { PolymorphicComponentProps, PolymorphicRef, useMantineDefaultProps } from '@mantine/styles';\nimport { Text, SharedTextProps } from '../Text/Text';\nimport useStyles from './Anchor.styles';\n\nexport type AnchorProps<C> = PolymorphicComponentProps<C, SharedTextProps>;\n\ntype AnchorComponent = (<C = 'a'>(props: AnchorProps<C>) => React.ReactElement) & {\n displayName?: string;\n};\n\nconst defaultProps: Partial<AnchorProps<any>> = {};\n\nexport const Anchor: AnchorComponent = forwardRef(\n
|
|
1
|
+
{"version":3,"file":"Anchor.js","sources":["../../../src/components/Anchor/Anchor.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { PolymorphicComponentProps, PolymorphicRef, useMantineDefaultProps } from '@mantine/styles';\nimport { Text, SharedTextProps } from '../Text/Text';\nimport useStyles from './Anchor.styles';\n\nexport type AnchorProps<C> = PolymorphicComponentProps<C, SharedTextProps>;\n\ntype AnchorComponent = (<C = 'a'>(props: AnchorProps<C>) => React.ReactElement) & {\n displayName?: string;\n};\n\nconst defaultProps: Partial<AnchorProps<any>> = {};\n\nexport const Anchor: AnchorComponent = forwardRef(\n (props: AnchorProps<'a'>, ref: PolymorphicRef<'a'>) => {\n const { component, className, classNames, styles, ...others } = useMantineDefaultProps(\n 'Anchor',\n defaultProps,\n props\n );\n const { classes, cx } = useStyles(null, { name: 'Anchor', classNames, styles });\n const buttonProps = component === 'button' ? { type: 'button' } : null;\n\n return (\n <Text\n component={component || 'a'}\n variant=\"link\"\n ref={ref}\n className={cx(classes.root, className)}\n {...buttonProps}\n {...others}\n />\n );\n }\n) as any;\n\nAnchor.displayName = '@mantine/core/Anchor';\n"],"names":["forwardRef","useMantineDefaultProps","styles","useStyles","React","Text"],"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,IA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AE,EAAE,MAAM,GAAG,SAAS,CAAC,EAAE,EAAE,CAAC,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC;AAClM,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,GAAGC,wBAAS,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,UAAED,QAAM,EAAE,CAAC,CAAC;AAClF,EAAE,MAAM,WAAW,GAAG,SAAS,KAAK,QAAQ,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;AACzE,EAAE,uBAAuBE,cAAK,CAAC,aAAa,CAACC,SAAI,EAAE,cAAc,CAAC,cAAc,CAAC;AACjF,IAAI,SAAS,EAAE,SAAS,IAAI,GAAG;AAC/B,IAAI,OAAO,EAAE,MAAM;AACnB,IAAI,GAAG;AACP,IAAI,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC;AAC1C,GAAG,EAAE,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;AAC5B,CAAC,EAAE;AACH,MAAM,CAAC,WAAW,GAAG,sBAAsB;;;;"}
|
|
@@ -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":["forwardRef","React","Box"],"mappings":";;;;;;;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAChK,IAAI,cAAc,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK;AAC/B,EAAE,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;AAChC,IAAI,IAAI,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AE,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,GAAG,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC,EAAE,EAAE,CAAC,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;AAC/H,EAAE,uBAAuBC,cAAK,CAAC,aAAa,CAACC,OAAG,EAAE,cAAc,CAAC;AACjE,IAAI,SAAS,EAAE,SAAS,IAAI,KAAK;AACjC,IAAI,GAAG;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;;;;"}
|
|
@@ -8,6 +8,7 @@ var styles = require('@mantine/styles');
|
|
|
8
8
|
var SelectDropdown = require('../Select/SelectDropdown/SelectDropdown.js');
|
|
9
9
|
var SelectItems = require('../Select/SelectItems/SelectItems.js');
|
|
10
10
|
var DefaultItem = require('../Select/DefaultItem/DefaultItem.js');
|
|
11
|
+
var SelectScrollArea = require('../Select/SelectScrollArea/SelectScrollArea.js');
|
|
11
12
|
var filterData = require('./filter-data/filter-data.js');
|
|
12
13
|
var Autocomplete_styles = require('./Autocomplete.styles.js');
|
|
13
14
|
var InputWrapper = require('../InputWrapper/InputWrapper.js');
|
|
@@ -63,7 +64,8 @@ const defaultProps = {
|
|
|
63
64
|
filter: defaultFilter,
|
|
64
65
|
switchDirectionOnFlip: false,
|
|
65
66
|
zIndex: styles.getDefaultZIndex("popover"),
|
|
66
|
-
dropdownPosition: "
|
|
67
|
+
dropdownPosition: "flip",
|
|
68
|
+
maxDropdownHeight: "auto"
|
|
67
69
|
};
|
|
68
70
|
const Autocomplete = React.forwardRef((props, ref) => {
|
|
69
71
|
const _a = styles.useMantineDefaultProps("Autocomplete", defaultProps, props), {
|
|
@@ -102,7 +104,9 @@ const Autocomplete = React.forwardRef((props, ref) => {
|
|
|
102
104
|
withinPortal,
|
|
103
105
|
switchDirectionOnFlip = false,
|
|
104
106
|
zIndex = styles.getDefaultZIndex("popover"),
|
|
105
|
-
dropdownPosition
|
|
107
|
+
dropdownPosition,
|
|
108
|
+
maxDropdownHeight,
|
|
109
|
+
dropdownComponent,
|
|
106
110
|
errorProps,
|
|
107
111
|
labelProps,
|
|
108
112
|
descriptionProps
|
|
@@ -143,6 +147,8 @@ const Autocomplete = React.forwardRef((props, ref) => {
|
|
|
143
147
|
"switchDirectionOnFlip",
|
|
144
148
|
"zIndex",
|
|
145
149
|
"dropdownPosition",
|
|
150
|
+
"maxDropdownHeight",
|
|
151
|
+
"dropdownComponent",
|
|
146
152
|
"errorProps",
|
|
147
153
|
"labelProps",
|
|
148
154
|
"descriptionProps"
|
|
@@ -284,7 +290,8 @@ const Autocomplete = React.forwardRef((props, ref) => {
|
|
|
284
290
|
transitionTimingFunction,
|
|
285
291
|
uuid,
|
|
286
292
|
shadow,
|
|
287
|
-
maxDropdownHeight
|
|
293
|
+
maxDropdownHeight,
|
|
294
|
+
dropdownComponent: dropdownComponent || SelectScrollArea.SelectScrollArea,
|
|
288
295
|
classNames,
|
|
289
296
|
styles: styles$1,
|
|
290
297
|
__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":["DefaultItem","getDefaultZIndex","forwardRef","useMantineDefaultProps","styles","useStyles","extractSystemStyles","useState","useRef","useUuid","useUncontrolled","useDidUpdate","filterData","React","InputWrapper","Input","useMergedRef","SelectDropdown","SelectItems"],"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,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CAAC,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,GAAG,IAAI;AACzE,GAAG,CAAC,CAAC,kBAAkBS,cAAK,CAAC,aAAa,CAACI,6BAAc,EAAE;AAC3D,IAAI,OAAO,EAAE,oBAAoB;AACjC,IAAI,UAAU;AACd,IAAI,kBAAkB;AACtB,IAAI,wBAAwB;AAC5B,IAAI,IAAI;AACR,IAAI,MAAM;AACV,IAAI,iBAAiB,EAAE,MAAM;AAC7B,IAAI,UAAU;AACd,YAAIb,QAAM;AACV,IAAI,gBAAgB,EAAE,cAAc;AACpC,IAAI,SAAS;AACb,IAAI,iBAAiB,EAAE,YAAY;AACnC,IAAI,qBAAqB;AACzB,IAAI,gBAAgB,EAAE,QAAQ,CAAC,OAAO;AACtC,IAAI,YAAY;AAChB,IAAI,MAAM;AACV,IAAI,gBAAgB;AACpB,GAAG,kBAAkBS,cAAK,CAAC,aAAa,CAACK,uBAAW,EAAE;AACtD,IAAI,IAAI,EAAE,YAAY;AACtB,IAAI,OAAO;AACX,IAAI,UAAU;AACd,YAAId,QAAM;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":["DefaultItem","getDefaultZIndex","forwardRef","useMantineDefaultProps","styles","useStyles","extractSystemStyles","useState","useRef","useUuid","useUncontrolled","useDidUpdate","filterData","React","InputWrapper","Input","useMergedRef","SelectDropdown","SelectScrollArea","SelectItems"],"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,IAA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C,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":["forwardRef","useMantineDefaultProps","styles","useStyles","useState","useEffect","React","Box","AvatarPlaceholderIcon"],"mappings":";;;;;;;;;;;;;;AAAA,IAAI,SAAS,GAAG,M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AK,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":["forwardRef","useMantineDefaultProps","styles","useStyles","React","Box"],"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,CA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E,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC;AAC5D,IAAI,GAAG;AACP,GAAG,EAAE,MAAM,CAAC,EAAE,WAAW,oBAAoBD,cAAK,CAAC,aAAa,CAAC,MAAM,EAAE;AACzE,IAAI,SAAS,EAAE,OAAO,CAAC,WAAW;AAClC,GAAG,EAAE,WAAW,CAAC,kBAAkBA,cAAK,CAAC,aAAa,CAAC,MAAM,EAAE;AAC/D,IAAI,SAAS,EAAE,OAAO,CAAC,KAAK;AAC5B,GAAG,EAAE,QAAQ,CAAC,EAAE,YAAY,oBAAoBA,cAAK,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":["forwardRef","extractSystemStyles","React","useSx"],"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,I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CAAC,CAAC,CAAC;AAC3H,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,GAAGC,0BAAmB,CAAC,MAAM,CAAC,CAAC;AAC7D,EAAE,MAAM,OAAO,GAAG,SAAS,IAAI,KAAK,CAAC;AACrC,EAAE,uBAAuBC,cAAK,CAAC,aAAa,CAAC,OAAO,EAAE,cAAc,CAAC;AACrE,IAAI,GAAG;AACP,IAAI,SAAS,EAAEC,WAAK,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;;;;"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var styles = require('@mantine/styles');
|
|
7
7
|
var Burger_styles = require('./Burger.styles.js');
|
|
8
|
-
var
|
|
8
|
+
var UnstyledButton = require('../Button/UnstyledButton/UnstyledButton.js');
|
|
9
9
|
|
|
10
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; }
|
|
11
11
|
|
|
@@ -61,9 +61,7 @@ const Burger = React.forwardRef((props, ref) => {
|
|
|
61
61
|
const theme = styles.useMantineTheme();
|
|
62
62
|
const _color = color || (theme.colorScheme === "dark" ? theme.white : theme.black);
|
|
63
63
|
const { classes, cx } = Burger_styles['default']({ color: _color, size }, { classNames, styles: styles$1, name: "Burger" });
|
|
64
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
65
|
-
component: "button",
|
|
66
|
-
type: "button",
|
|
64
|
+
return /* @__PURE__ */ React__default.createElement(UnstyledButton.UnstyledButton, __spreadValues({
|
|
67
65
|
className: cx(classes.root, className),
|
|
68
66
|
ref
|
|
69
67
|
}, others), /* @__PURE__ */ React__default.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":["forwardRef","useMantineDefaultProps","styles","useMantineTheme","useStyles","React","UnstyledButton"],"mappings":";;;;;;;;;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,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AAM,EAAE,OAAO,EAAE,EAAE,EAAE,GAAGC,wBAAS,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,UAAEF,QAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;AACrG,EAAE,uBAAuBG,cAAK,CAAC,aAAa,CAACC,6BAAc,EAAE,cAAc,CAAC;AAC5E,IAAI,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC;AAC1C,IAAI,GAAG;AACP,GAAG,EAAE,MAAM,CAAC,kBAAkBD,cAAK,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;;;;"}
|
|
@@ -4,25 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var styles = require('@mantine/styles');
|
|
6
6
|
|
|
7
|
-
var __defProp = Object.defineProperty;
|
|
8
|
-
var __defProps = Object.defineProperties;
|
|
9
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
10
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
11
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
13
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
14
|
-
var __spreadValues = (a, b) => {
|
|
15
|
-
for (var prop in b || (b = {}))
|
|
16
|
-
if (__hasOwnProp.call(b, prop))
|
|
17
|
-
__defNormalProp(a, prop, b[prop]);
|
|
18
|
-
if (__getOwnPropSymbols)
|
|
19
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
20
|
-
if (__propIsEnum.call(b, prop))
|
|
21
|
-
__defNormalProp(a, prop, b[prop]);
|
|
22
|
-
}
|
|
23
|
-
return a;
|
|
24
|
-
};
|
|
25
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
26
7
|
const sizes = {
|
|
27
8
|
xs: 12,
|
|
28
9
|
sm: 18,
|
|
@@ -32,19 +13,17 @@ const sizes = {
|
|
|
32
13
|
};
|
|
33
14
|
var useStyles = styles.createStyles((theme, { size, color }, getRef) => {
|
|
34
15
|
const sizeValue = theme.fn.size({ size, sizes });
|
|
35
|
-
const opened = { ref: getRef("opened") };
|
|
36
16
|
return {
|
|
37
|
-
opened
|
|
38
|
-
|
|
39
|
-
|
|
17
|
+
opened: {
|
|
18
|
+
ref: getRef("opened")
|
|
19
|
+
},
|
|
20
|
+
root: {
|
|
40
21
|
borderRadius: theme.radius.sm,
|
|
41
22
|
width: sizeValue + theme.spacing.xs,
|
|
42
23
|
height: sizeValue + theme.spacing.xs,
|
|
43
24
|
padding: theme.spacing.xs / 2,
|
|
44
|
-
backgroundColor: "transparent",
|
|
45
|
-
border: 0,
|
|
46
25
|
cursor: "pointer"
|
|
47
|
-
}
|
|
26
|
+
},
|
|
48
27
|
burger: {
|
|
49
28
|
position: "relative",
|
|
50
29
|
userSelect: "none",
|
|
@@ -72,7 +51,7 @@ var useStyles = styles.createStyles((theme, { size, color }, getRef) => {
|
|
|
72
51
|
"&:after": {
|
|
73
52
|
top: sizeValue / 3
|
|
74
53
|
},
|
|
75
|
-
[`&.${opened
|
|
54
|
+
[`&.${getRef("opened")}`]: {
|
|
76
55
|
backgroundColor: "transparent",
|
|
77
56
|
"&:before": {
|
|
78
57
|
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":["createStyles"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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":["forwardRef","useMantineDefaultProps","styles","useStyles","getSharedColorScheme","React","Loader","heights","Box"],"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,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AAE,OAAO,CAAC,KAAK;AAC5B,GAAG,EAAE,CAAC,QAAQ,IAAI,OAAO,IAAI,cAAc,KAAK,MAAM,qBAAqBA,cAAK,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,kBAAkBA,cAAK,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,qBAAqBA,cAAK,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;;;;"}
|
|
@@ -39,13 +39,13 @@ var __objRest = (source, exclude) => {
|
|
|
39
39
|
return target;
|
|
40
40
|
};
|
|
41
41
|
const UnstyledButton = React.forwardRef((_a, ref) => {
|
|
42
|
-
var _b = _a, { className } = _b, others = __objRest(_b, ["className"]);
|
|
42
|
+
var _b = _a, { className, component = "button" } = _b, others = __objRest(_b, ["className", "component"]);
|
|
43
43
|
const { classes, cx } = UnstyledButton_styles['default'](null, { name: "UnstyledButton" });
|
|
44
44
|
return /* @__PURE__ */ React__default.createElement(Box.Box, __spreadValues({
|
|
45
|
-
component
|
|
45
|
+
component,
|
|
46
46
|
ref,
|
|
47
47
|
className: cx(classes.root, className),
|
|
48
|
-
type: "button"
|
|
48
|
+
type: component === "button" ? "button" : void 0
|
|
49
49
|
}, others));
|
|
50
50
|
});
|
|
51
51
|
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":["forwardRef","useStyles","React","Box"],"mappings":";;;;;;;;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS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33
|
backgroundColor: "transparent",
|
|
34
34
|
textAlign: "left",
|
|
35
|
-
color: theme.colorScheme === "dark" ? theme.colors.dark[0] : theme.black
|
|
35
|
+
color: theme.colorScheme === "dark" ? theme.colors.dark[0] : theme.black,
|
|
36
|
+
textDecoration: "none"
|
|
36
37
|
})
|
|
37
38
|
}));
|
|
38
39
|
|
|
@@ -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":["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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,KAAK,CAAC,KAAK;AAC5E,GAAG,CAAC;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":["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,I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