@mantine/core 7.0.2 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/cjs/components/AppShell/AppShell.js.map +1 -1
  2. package/cjs/components/AppShell/AppShellMediaStyles/get-base-size/get-base-size.js.map +1 -1
  3. package/cjs/components/AppShell/AppShellMediaStyles/is-primitive-size/is-primitive-size.js.map +1 -1
  4. package/cjs/components/AppShell/AppShellMediaStyles/is-responsive-size/is-responsive-size.js.map +1 -1
  5. package/cjs/components/Collapse/use-collapse.js.map +1 -1
  6. package/cjs/components/MultiSelect/MultiSelect.js +14 -3
  7. package/cjs/components/MultiSelect/MultiSelect.js.map +1 -1
  8. package/cjs/components/PinInput/PinInput.js +5 -3
  9. package/cjs/components/PinInput/PinInput.js.map +1 -1
  10. package/cjs/components/Select/Select.js +14 -3
  11. package/cjs/components/Select/Select.js.map +1 -1
  12. package/cjs/components/Slider/RangeSlider/RangeSlider.js +5 -3
  13. package/cjs/components/Slider/RangeSlider/RangeSlider.js.map +1 -1
  14. package/cjs/components/Slider/Slider/Slider.js +5 -3
  15. package/cjs/components/Slider/Slider/Slider.js.map +1 -1
  16. package/cjs/components/TagsInput/TagsInput.js +14 -3
  17. package/cjs/components/TagsInput/TagsInput.js.map +1 -1
  18. package/cjs/core/Box/Box.js +41 -21
  19. package/cjs/core/Box/Box.js.map +1 -1
  20. package/cjs/core/factory/create-polymorphic-component.js.map +1 -1
  21. package/cjs/index.css +11 -7170
  22. package/esm/components/AppShell/AppShell.mjs.map +1 -1
  23. package/esm/components/AppShell/AppShellMediaStyles/get-base-size/get-base-size.mjs.map +1 -1
  24. package/esm/components/AppShell/AppShellMediaStyles/is-primitive-size/is-primitive-size.mjs.map +1 -1
  25. package/esm/components/AppShell/AppShellMediaStyles/is-responsive-size/is-responsive-size.mjs.map +1 -1
  26. package/esm/components/Collapse/use-collapse.mjs.map +1 -1
  27. package/esm/components/MultiSelect/MultiSelect.mjs +14 -3
  28. package/esm/components/MultiSelect/MultiSelect.mjs.map +1 -1
  29. package/esm/components/PinInput/PinInput.mjs +5 -3
  30. package/esm/components/PinInput/PinInput.mjs.map +1 -1
  31. package/esm/components/Select/Select.mjs +14 -3
  32. package/esm/components/Select/Select.mjs.map +1 -1
  33. package/esm/components/Slider/RangeSlider/RangeSlider.mjs +5 -3
  34. package/esm/components/Slider/RangeSlider/RangeSlider.mjs.map +1 -1
  35. package/esm/components/Slider/Slider/Slider.mjs +5 -3
  36. package/esm/components/Slider/Slider/Slider.mjs.map +1 -1
  37. package/esm/components/TagsInput/TagsInput.mjs +14 -3
  38. package/esm/components/TagsInput/TagsInput.mjs.map +1 -1
  39. package/esm/core/Box/Box.mjs +41 -21
  40. package/esm/core/Box/Box.mjs.map +1 -1
  41. package/esm/core/factory/create-polymorphic-component.mjs.map +1 -1
  42. package/esm/index.css +11 -7170
  43. package/esm/index.layer.css +11 -0
  44. package/esm/styles/Accordion.layer.css +1 -0
  45. package/esm/styles/ActionIcon.layer.css +1 -0
  46. package/esm/styles/Affix.layer.css +1 -0
  47. package/esm/styles/Alert.layer.css +1 -0
  48. package/esm/styles/Anchor.layer.css +1 -0
  49. package/esm/styles/AppShell.layer.css +7 -0
  50. package/esm/styles/AspectRatio.layer.css +1 -0
  51. package/esm/styles/Avatar.layer.css +1 -0
  52. package/esm/styles/BackgroundImage.layer.css +1 -0
  53. package/esm/styles/Badge.layer.css +1 -0
  54. package/esm/styles/Blockquote.layer.css +1 -0
  55. package/esm/styles/Breadcrumbs.layer.css +1 -0
  56. package/esm/styles/Burger.layer.css +1 -0
  57. package/esm/styles/Button.layer.css +1 -0
  58. package/esm/styles/Card.layer.css +1 -0
  59. package/esm/styles/Center.layer.css +1 -0
  60. package/esm/styles/Checkbox.layer.css +1 -0
  61. package/esm/styles/Chip.layer.css +1 -0
  62. package/esm/styles/CloseButton.layer.css +1 -0
  63. package/esm/styles/Code.layer.css +1 -0
  64. package/esm/styles/ColorInput.layer.css +1 -0
  65. package/esm/styles/ColorPicker.layer.css +1 -0
  66. package/esm/styles/ColorSwatch.layer.css +1 -0
  67. package/esm/styles/Combobox.layer.css +1 -0
  68. package/esm/styles/Container.layer.css +1 -0
  69. package/esm/styles/Dialog.layer.css +1 -0
  70. package/esm/styles/Divider.layer.css +1 -0
  71. package/esm/styles/Drawer.layer.css +1 -0
  72. package/esm/styles/Fieldset.layer.css +1 -0
  73. package/esm/styles/Flex.layer.css +1 -0
  74. package/esm/styles/Grid.layer.css +1 -0
  75. package/esm/styles/Group.layer.css +1 -0
  76. package/esm/styles/Image.layer.css +1 -0
  77. package/esm/styles/Indicator.layer.css +1 -0
  78. package/esm/styles/InlineInput.layer.css +1 -0
  79. package/esm/styles/Input.layer.css +5 -0
  80. package/esm/styles/Kbd.layer.css +1 -0
  81. package/esm/styles/List.layer.css +1 -0
  82. package/esm/styles/Loader.layer.css +1 -0
  83. package/esm/styles/LoadingOverlay.layer.css +1 -0
  84. package/esm/styles/Mark.layer.css +1 -0
  85. package/esm/styles/Menu.layer.css +1 -0
  86. package/esm/styles/Modal.layer.css +1 -0
  87. package/esm/styles/ModalBase.layer.css +1 -0
  88. package/esm/styles/NavLink.layer.css +1 -0
  89. package/esm/styles/Notification.layer.css +1 -0
  90. package/esm/styles/NumberInput.layer.css +1 -0
  91. package/esm/styles/Overlay.layer.css +1 -0
  92. package/esm/styles/Pagination.layer.css +1 -0
  93. package/esm/styles/Paper.layer.css +1 -0
  94. package/esm/styles/PasswordInput.layer.css +1 -0
  95. package/esm/styles/Pill.layer.css +1 -0
  96. package/esm/styles/PillsInput.layer.css +1 -0
  97. package/esm/styles/PinInput.layer.css +1 -0
  98. package/esm/styles/Popover.layer.css +1 -0
  99. package/esm/styles/Progress.layer.css +1 -0
  100. package/esm/styles/Radio.layer.css +1 -0
  101. package/esm/styles/Rating.layer.css +1 -0
  102. package/esm/styles/RingProgress.layer.css +1 -0
  103. package/esm/styles/ScrollArea.layer.css +1 -0
  104. package/esm/styles/SegmentedControl.layer.css +1 -0
  105. package/esm/styles/SimpleGrid.layer.css +1 -0
  106. package/esm/styles/Skeleton.layer.css +1 -0
  107. package/esm/styles/Slider.layer.css +1 -0
  108. package/esm/styles/Spoiler.layer.css +1 -0
  109. package/esm/styles/Stack.layer.css +1 -0
  110. package/esm/styles/Stepper.layer.css +1 -0
  111. package/esm/styles/Switch.layer.css +1 -0
  112. package/esm/styles/Table.layer.css +1 -0
  113. package/esm/styles/Tabs.layer.css +1 -0
  114. package/esm/styles/Text.layer.css +1 -0
  115. package/esm/styles/ThemeIcon.layer.css +1 -0
  116. package/esm/styles/Timeline.layer.css +1 -0
  117. package/esm/styles/Title.layer.css +1 -0
  118. package/esm/styles/Tooltip.layer.css +1 -0
  119. package/esm/styles/TypographyStylesProvider.layer.css +1 -0
  120. package/esm/styles/UnstyledButton.layer.css +1 -0
  121. package/esm/styles/VisuallyHidden.layer.css +1 -0
  122. package/esm/styles/global.layer.css +1 -0
  123. package/lib/components/ActionIcon/ActionIcon.d.ts +2 -0
  124. package/lib/components/Anchor/Anchor.d.ts +2 -0
  125. package/lib/components/AppShell/AppShell.d.ts +12 -43
  126. package/lib/components/AppShell/AppShell.types.d.ts +37 -0
  127. package/lib/components/AppShell/AppShellMediaStyles/get-base-size/get-base-size.d.ts +1 -1
  128. package/lib/components/AppShell/AppShellMediaStyles/is-primitive-size/is-primitive-size.d.ts +1 -1
  129. package/lib/components/AppShell/AppShellMediaStyles/is-responsive-size/is-responsive-size.d.ts +1 -1
  130. package/lib/components/AppShell/AppShellSection/AppShellSection.d.ts +2 -0
  131. package/lib/components/AppShell/index.d.ts +2 -1
  132. package/lib/components/Avatar/Avatar.d.ts +2 -0
  133. package/lib/components/BackgroundImage/BackgroundImage.d.ts +2 -0
  134. package/lib/components/Badge/Badge.d.ts +3 -1
  135. package/lib/components/Button/Button.d.ts +2 -0
  136. package/lib/components/Card/Card.d.ts +2 -0
  137. package/lib/components/Card/CardSection/CardSection.d.ts +2 -0
  138. package/lib/components/Center/Center.d.ts +2 -0
  139. package/lib/components/CloseButton/CloseButton.d.ts +2 -0
  140. package/lib/components/Collapse/use-collapse.d.ts +2 -1
  141. package/lib/components/ColorSwatch/ColorSwatch.d.ts +2 -0
  142. package/lib/components/Highlight/Highlight.d.ts +2 -0
  143. package/lib/components/Image/Image.d.ts +2 -0
  144. package/lib/components/Input/Input.d.ts +2 -0
  145. package/lib/components/Input/use-input-props.d.ts +2 -2
  146. package/lib/components/InputBase/InputBase.d.ts +2 -0
  147. package/lib/components/Menu/Menu.d.ts +2 -0
  148. package/lib/components/Menu/MenuItem/MenuItem.d.ts +2 -0
  149. package/lib/components/MultiSelect/MultiSelect.d.ts +2 -0
  150. package/lib/components/NavLink/NavLink.d.ts +2 -0
  151. package/lib/components/Overlay/Overlay.d.ts +2 -0
  152. package/lib/components/Pagination/PaginationEdges/PaginationEdges.d.ts +10 -0
  153. package/lib/components/Paper/Paper.d.ts +2 -0
  154. package/lib/components/PinInput/PinInput.d.ts +2 -0
  155. package/lib/components/Select/Select.d.ts +2 -0
  156. package/lib/components/Slider/RangeSlider/RangeSlider.d.ts +2 -0
  157. package/lib/components/Slider/Slider/Slider.d.ts +2 -0
  158. package/lib/components/TagsInput/TagsInput.d.ts +3 -0
  159. package/lib/components/Text/Text.d.ts +2 -0
  160. package/lib/components/UnstyledButton/UnstyledButton.d.ts +2 -0
  161. package/lib/core/Box/Box.d.ts +2 -0
  162. package/lib/core/Box/Box.types.d.ts +4 -1
  163. package/lib/core/factory/create-polymorphic-component.d.ts +4 -0
  164. package/lib/core/factory/polymorphic-factory.d.ts +2 -0
  165. package/package.json +3 -2
@@ -1,60 +1,29 @@
1
1
  import React from 'react';
2
- import { BoxProps, StylesApiProps, ElementProps, Factory, MantineBreakpoint, MantineSpacing } from '../../core';
2
+ import { BoxProps, StylesApiProps, ElementProps, Factory, MantineSpacing } from '../../core';
3
3
  import { AppShellNavbar } from './AppShellNavbar/AppShellNavbar';
4
4
  import { AppShellHeader } from './AppShellHeader/AppShellHeader';
5
5
  import { AppShellFooter } from './AppShellFooter/AppShellFooter';
6
6
  import { AppShellAside } from './AppShellAside/AppShellAside';
7
7
  import { AppShellMain } from './AppShellMain/AppShellMain';
8
8
  import { AppShellSection } from './AppShellSection/AppShellSection';
9
+ import { AppShellAsideConfiguration, AppShellHeaderConfiguration, AppShellNavbarConfiguration, AppShellFooterConfiguration, AppShellResponsiveSize } from './AppShell.types';
9
10
  export type AppShellStylesNames = 'root' | 'navbar' | 'main' | 'header' | 'footer' | 'aside' | 'section';
10
11
  export type AppShellCssVariables = {
11
12
  root: '--app-shell-transition-duration' | '--app-shell-transition-timing-function';
12
13
  };
13
- export type AppShellSize = number | (string & {});
14
- export interface AppShellResponsiveSize {
15
- base?: AppShellSize;
16
- xs?: AppShellSize;
17
- sm?: AppShellSize;
18
- md?: AppShellSize;
19
- lg?: AppShellSize;
20
- xl?: AppShellSize;
21
- [key: string]: AppShellSize | undefined;
22
- }
23
14
  export interface AppShellProps extends BoxProps, StylesApiProps<AppShellFactory>, ElementProps<'div'> {
24
15
  /** Determines whether associated components should have a border, `true` by default */
25
16
  withBorder?: boolean;
26
- /** Main content section padding, `0` by default */
17
+ /** Controls padding of the main section, `0` by default. !important!: use `padding` prop instead of `p`. */
27
18
  padding?: MantineSpacing | AppShellResponsiveSize;
28
- /** Navbar configuration */
29
- navbar?: {
30
- width: AppShellSize | AppShellResponsiveSize;
31
- breakpoint: MantineBreakpoint | (string & {}) | number;
32
- collapsed?: {
33
- desktop?: boolean;
34
- mobile?: boolean;
35
- };
36
- };
37
- /** Aside configuration */
38
- aside?: {
39
- width: AppShellSize | AppShellResponsiveSize;
40
- breakpoint: MantineBreakpoint | (string & {}) | number;
41
- collapsed?: {
42
- desktop?: boolean;
43
- mobile?: boolean;
44
- };
45
- };
46
- /** Header configuration */
47
- header?: {
48
- height: AppShellSize | AppShellResponsiveSize;
49
- collapsed?: boolean;
50
- offset?: boolean;
51
- };
52
- /** Footer configuration */
53
- footer?: {
54
- height: AppShellSize | AppShellResponsiveSize;
55
- collapsed?: boolean;
56
- offset?: boolean;
57
- };
19
+ /** AppShell.Navbar configuration, controls width, breakpoints and collapsed state. Required if you use AppShell.Navbar component. */
20
+ navbar?: AppShellNavbarConfiguration;
21
+ /** AppShell.Aside configuration, controls width, breakpoints and collapsed state. Required if you use AppShell.Aside component. */
22
+ aside?: AppShellAsideConfiguration;
23
+ /** AppShell.Header configuration, controls height, offset and collapsed state. Required if you use AppShell.Header component. */
24
+ header?: AppShellHeaderConfiguration;
25
+ /** AppShell.Footer configuration, controls height, offset and collapsed state. Required if you use AppShell.Footer component. */
26
+ footer?: AppShellFooterConfiguration;
58
27
  /** Duration of all transitions in ms, `200` by default */
59
28
  transitionDuration?: number;
60
29
  /** Timing function of all transitions, `ease` by default */
@@ -63,7 +32,7 @@ export interface AppShellProps extends BoxProps, StylesApiProps<AppShellFactory>
63
32
  zIndex?: string | number;
64
33
  /** Determines how Navbar/Aside are arranged relative to Header/Footer, `default` by default */
65
34
  layout?: 'default' | 'alt';
66
- /** If set, Navbar, Aside, Header and Footer components will not be rendered */
35
+ /** If set, Navbar, Aside, Header and Footer components be hidden */
67
36
  disabled?: boolean;
68
37
  }
69
38
  export type AppShellFactory = Factory<{
@@ -0,0 +1,37 @@
1
+ import type { MantineBreakpoint } from '../../core';
2
+ export type AppShellSize = number | (string & {});
3
+ export interface AppShellResponsiveSize {
4
+ base?: AppShellSize;
5
+ xs?: AppShellSize;
6
+ sm?: AppShellSize;
7
+ md?: AppShellSize;
8
+ lg?: AppShellSize;
9
+ xl?: AppShellSize;
10
+ [key: string]: AppShellSize | undefined;
11
+ }
12
+ export interface AppShellNavbarConfiguration {
13
+ width: AppShellSize | AppShellResponsiveSize;
14
+ breakpoint: MantineBreakpoint | (string & {}) | number;
15
+ collapsed?: {
16
+ desktop?: boolean;
17
+ mobile?: boolean;
18
+ };
19
+ }
20
+ export interface AppShellAsideConfiguration {
21
+ width: AppShellSize | AppShellResponsiveSize;
22
+ breakpoint: MantineBreakpoint | (string & {}) | number;
23
+ collapsed?: {
24
+ desktop?: boolean;
25
+ mobile?: boolean;
26
+ };
27
+ }
28
+ export interface AppShellHeaderConfiguration {
29
+ height: AppShellSize | AppShellResponsiveSize;
30
+ collapsed?: boolean;
31
+ offset?: boolean;
32
+ }
33
+ export interface AppShellFooterConfiguration {
34
+ height: AppShellSize | AppShellResponsiveSize;
35
+ collapsed?: boolean;
36
+ offset?: boolean;
37
+ }
@@ -1,2 +1,2 @@
1
- import type { AppShellSize, AppShellResponsiveSize } from '../../AppShell';
1
+ import type { AppShellSize, AppShellResponsiveSize } from '../../AppShell.types';
2
2
  export declare function getBaseSize(size: AppShellSize | AppShellResponsiveSize): AppShellSize | undefined;
@@ -1,2 +1,2 @@
1
- import type { AppShellSize, AppShellResponsiveSize } from '../../AppShell';
1
+ import type { AppShellSize, AppShellResponsiveSize } from '../../AppShell.types';
2
2
  export declare function isPrimitiveSize(size: AppShellSize | AppShellResponsiveSize | undefined): size is AppShellSize | AppShellResponsiveSize;
@@ -1,2 +1,2 @@
1
- import type { AppShellSize, AppShellResponsiveSize } from '../../AppShell';
1
+ import type { AppShellSize, AppShellResponsiveSize } from '../../AppShell.types';
2
2
  export declare function isResponsiveSize(size: AppShellSize | AppShellResponsiveSize | undefined): size is AppShellResponsiveSize;
@@ -16,8 +16,10 @@ export declare const AppShellSection: (<C = "div">(props: import("../../../core/
16
16
  component?: any;
17
17
  } & Omit<Omit<any, "ref">, "component" | keyof AppShellSectionProps> & {
18
18
  ref?: any;
19
+ renderRoot?(props: any): any;
19
20
  }) | (AppShellSectionProps & {
20
21
  component: React.ElementType<any>;
22
+ renderRoot?(props: Record<string, any>): any;
21
23
  })>, never> & import("../../../core/factory/factory").ThemeExtend<{
22
24
  props: AppShellSectionProps;
23
25
  defaultRef: HTMLDivElement;
@@ -5,7 +5,8 @@ export { AppShellHeader } from './AppShellHeader/AppShellHeader';
5
5
  export { AppShellNavbar } from './AppShellNavbar/AppShellNavbar';
6
6
  export { AppShellSection } from './AppShellSection/AppShellSection';
7
7
  export { AppShellMain } from './AppShellMain/AppShellMain';
8
- export type { AppShellProps, AppShellCssVariables, AppShellFactory, AppShellResponsiveSize, AppShellSize, AppShellStylesNames, } from './AppShell';
8
+ export type { AppShellAsideConfiguration, AppShellHeaderConfiguration, AppShellNavbarConfiguration, AppShellFooterConfiguration, AppShellResponsiveSize, } from './AppShell.types';
9
+ export type { AppShellProps, AppShellCssVariables, AppShellFactory, AppShellStylesNames, } from './AppShell';
9
10
  export type { AppShellAsideProps } from './AppShellAside/AppShellAside';
10
11
  export type { AppShellFooterProps } from './AppShellFooter/AppShellFooter';
11
12
  export type { AppShellHeaderProps } from './AppShellHeader/AppShellHeader';
@@ -39,8 +39,10 @@ export declare const Avatar: (<C = "div">(props: import("../../core/factory/crea
39
39
  component?: any;
40
40
  } & Omit<Omit<any, "ref">, "component" | keyof AvatarProps> & {
41
41
  ref?: any;
42
+ renderRoot?(props: any): any;
42
43
  }) | (AvatarProps & {
43
44
  component: React.ElementType<any>;
45
+ renderRoot?(props: Record<string, any>): any;
44
46
  })>, never> & import("../../core/factory/factory").ThemeExtend<{
45
47
  props: AvatarProps;
46
48
  defaultRef: HTMLDivElement;
@@ -21,8 +21,10 @@ export declare const BackgroundImage: (<C = "div">(props: import("../../core/fac
21
21
  component?: any;
22
22
  } & Omit<Omit<any, "ref">, "component" | keyof BackgroundImageProps> & {
23
23
  ref?: any;
24
+ renderRoot?(props: any): any;
24
25
  }) | (BackgroundImageProps & {
25
26
  component: React.ElementType<any>;
27
+ renderRoot?(props: Record<string, any>): any;
26
28
  })>, never> & import("../../core/factory/factory").ThemeExtend<{
27
29
  props: BackgroundImageProps;
28
30
  defaultRef: HTMLDivElement;
@@ -35,8 +35,10 @@ export declare const Badge: (<C = "div">(props: import("../../core/factory/creat
35
35
  component?: any;
36
36
  } & Omit<Omit<any, "ref">, "component" | keyof BadgeProps> & {
37
37
  ref?: any;
38
+ renderRoot?(props: any): any;
38
39
  }) | (BadgeProps & {
39
- component: React.ElementType<any>;
40
+ component: React.ElementType<any>; /** Controls `font-size`, `height` and horizontal `padding`, `'md'` by default */
41
+ renderRoot?(props: Record<string, any>): any;
40
42
  })>, never> & import("../../core/factory/factory").ThemeExtend<{
41
43
  props: BadgeProps;
42
44
  defaultRef: HTMLDivElement;
@@ -49,8 +49,10 @@ export declare const Button: (<C = "button">(props: import("../../core/factory/c
49
49
  component?: any;
50
50
  } & Omit<Omit<any, "ref">, "component" | keyof ButtonProps> & {
51
51
  ref?: any;
52
+ renderRoot?(props: any): any;
52
53
  }) | (ButtonProps & {
53
54
  component: React.ElementType<any>;
55
+ renderRoot?(props: Record<string, any>): any;
54
56
  })>, never> & import("../../core/factory/factory").ThemeExtend<{
55
57
  props: ButtonProps;
56
58
  defaultRef: HTMLButtonElement;
@@ -31,8 +31,10 @@ export declare const Card: (<C = "div">(props: import("../../core/factory/create
31
31
  component?: any;
32
32
  } & Omit<Omit<any, "ref">, "component" | keyof CardProps> & {
33
33
  ref?: any;
34
+ renderRoot?(props: any): any;
34
35
  }) | (CardProps & {
35
36
  component: React.ElementType<any>;
37
+ renderRoot?(props: Record<string, any>): any;
36
38
  })>, never> & import("../../core/factory/factory").ThemeExtend<{
37
39
  props: CardProps;
38
40
  defaultRef: HTMLDivElement;
@@ -18,8 +18,10 @@ export declare const CardSection: (<C = "div">(props: import("../../../core/fact
18
18
  component?: any;
19
19
  } & Omit<Omit<any, "ref">, "component" | keyof CardSectionProps> & {
20
20
  ref?: any;
21
+ renderRoot?(props: any): any;
21
22
  }) | (CardSectionProps & {
22
23
  component: React.ElementType<any>;
24
+ renderRoot?(props: Record<string, any>): any;
23
25
  })>, never> & import("../../../core/factory/factory").ThemeExtend<{
24
26
  props: CardSectionProps;
25
27
  defaultRef: HTMLDivElement;
@@ -17,8 +17,10 @@ export declare const Center: (<C = "div">(props: import("../../core/factory/crea
17
17
  component?: any;
18
18
  } & Omit<Omit<any, "ref">, "component" | keyof CenterProps> & {
19
19
  ref?: any;
20
+ renderRoot?(props: any): any;
20
21
  }) | (CenterProps & {
21
22
  component: React.ElementType<any>;
23
+ renderRoot?(props: Record<string, any>): any;
22
24
  })>, never> & import("../../core/factory/factory").ThemeExtend<{
23
25
  props: CenterProps;
24
26
  defaultRef: HTMLDivElement;
@@ -32,8 +32,10 @@ export declare const CloseButton: (<C = "button">(props: import("../../core/fact
32
32
  component?: any;
33
33
  } & Omit<Omit<any, "ref">, "component" | keyof CloseButtonProps> & {
34
34
  ref?: any;
35
+ renderRoot?(props: any): any;
35
36
  }) | (CloseButtonProps & {
36
37
  component: React.ElementType<any>;
38
+ renderRoot?(props: Record<string, any>): any;
37
39
  })>, never> & import("../../core/factory/factory").ThemeExtend<{
38
40
  props: CloseButtonProps;
39
41
  defaultComponent: 'button';
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { CSSProperties } from '../../core';
2
3
  export declare function getElementHeight(el: React.RefObject<HTMLElement> | {
3
4
  current?: {
4
5
  scrollHeight: number;
@@ -12,7 +13,7 @@ interface UseCollapse {
12
13
  }
13
14
  interface GetCollapseProps {
14
15
  [key: string]: unknown;
15
- style?: React.CSSProperties;
16
+ style?: CSSProperties;
16
17
  onTransitionEnd?: (e: TransitionEvent) => void;
17
18
  refKey?: string;
18
19
  ref?: React.ForwardedRef<HTMLDivElement>;
@@ -27,8 +27,10 @@ export declare const ColorSwatch: (<C = "div">(props: import("../../core/factory
27
27
  component?: any;
28
28
  } & Omit<Omit<any, "ref">, "component" | keyof ColorSwatchProps> & {
29
29
  ref?: any;
30
+ renderRoot?(props: any): any;
30
31
  }) | (ColorSwatchProps & {
31
32
  component: React.ElementType<any>;
33
+ renderRoot?(props: Record<string, any>): any;
32
34
  })>, never> & import("../../core/factory/factory").ThemeExtend<{
33
35
  props: ColorSwatchProps;
34
36
  defaultRef: HTMLDivElement;
@@ -22,8 +22,10 @@ export declare const Highlight: (<C = "div">(props: import("../../core/factory/c
22
22
  component?: any;
23
23
  } & Omit<Omit<any, "ref">, "component" | keyof HighlightProps> & {
24
24
  ref?: any;
25
+ renderRoot?(props: any): any;
25
26
  }) | (HighlightProps & {
26
27
  component: React.ElementType<any>;
28
+ renderRoot?(props: Record<string, any>): any;
27
29
  })>, never> & import("../../core/factory/factory").ThemeExtend<{
28
30
  props: HighlightProps;
29
31
  defaultRef: HTMLDivElement;
@@ -27,8 +27,10 @@ export declare const Image: (<C = "img">(props: import("../../core/factory/creat
27
27
  component?: any;
28
28
  } & Omit<Omit<any, "ref">, "component" | keyof ImageProps> & {
29
29
  ref?: any;
30
+ renderRoot?(props: any): any;
30
31
  }) | (ImageProps & {
31
32
  component: React.ElementType<any>;
33
+ renderRoot?(props: Record<string, any>): any;
32
34
  })>, never> & import("../../core/factory/factory").ThemeExtend<{
33
35
  props: ImageProps;
34
36
  defaultRef: HTMLImageElement;
@@ -82,8 +82,10 @@ export declare const Input: (<C = "input">(props: import("../../core/factory/cre
82
82
  component?: any;
83
83
  } & Omit<Omit<any, "ref">, "component" | keyof InputProps> & {
84
84
  ref?: any;
85
+ renderRoot?(props: any): any;
85
86
  }) | (InputProps & {
86
87
  component: React.ElementType<any>;
88
+ renderRoot?(props: Record<string, any>): any;
87
89
  })>, never> & import("../../core/factory/factory").ThemeExtend<{
88
90
  props: InputProps;
89
91
  defaultRef: HTMLInputElement;
@@ -27,7 +27,7 @@ export declare function useInputProps<T extends BaseProps, U extends Partial<T>>
27
27
  descriptionProps: Record<string, any> | undefined;
28
28
  unstyled: boolean | undefined;
29
29
  styles: Partial<Record<string, import("react").CSSProperties>> | ((theme: import("../../core").MantineTheme, props: any, ctx: unknown) => Partial<Record<string, import("react").CSSProperties>>) | undefined;
30
- size: import("../../core").MantineSize | (string & {}) | undefined;
30
+ size: (string & {}) | import("../../core").MantineSize | undefined;
31
31
  style: import("../../core").MantineStyleProp;
32
32
  inputContainer: ((children: import("react").ReactNode) => import("react").ReactNode) | undefined;
33
33
  inputWrapperOrder: ("input" | "label" | "error" | "description")[] | undefined;
@@ -40,7 +40,7 @@ export declare function useInputProps<T extends BaseProps, U extends Partial<T>>
40
40
  classNames: Partial<Record<string, string>> | ((theme: import("../../core").MantineTheme, props: any, ctx: unknown) => Partial<Record<string, string>>) | undefined;
41
41
  styles: Partial<Record<string, import("react").CSSProperties>> | ((theme: import("../../core").MantineTheme, props: any, ctx: unknown) => Partial<Record<string, import("react").CSSProperties>>) | undefined;
42
42
  unstyled: boolean | undefined;
43
- size: import("../../core").MantineSize | (string & {}) | undefined;
43
+ size: (string & {}) | import("../../core").MantineSize | undefined;
44
44
  __staticSelector: string | undefined;
45
45
  __stylesApiProps: Record<string, any>;
46
46
  error: import("react").ReactNode;
@@ -22,8 +22,10 @@ export declare const InputBase: (<C = "input">(props: import("../../core/factory
22
22
  component?: any;
23
23
  } & Omit<Omit<any, "ref">, "component" | keyof InputBaseProps> & {
24
24
  ref?: any;
25
+ renderRoot?(props: any): any;
25
26
  }) | (InputBaseProps & {
26
27
  component: React.ElementType<any>;
28
+ renderRoot?(props: Record<string, any>): any;
27
29
  })>, never> & import("../../core/factory/factory").ThemeExtend<{
28
30
  props: InputBaseProps;
29
31
  defaultRef: HTMLInputElement;
@@ -57,8 +57,10 @@ export declare namespace Menu {
57
57
  component?: any;
58
58
  } & Omit<Omit<any, "ref">, "component" | keyof import("./MenuItem/MenuItem").MenuItemProps> & {
59
59
  ref?: any;
60
+ renderRoot?(props: any): any;
60
61
  }) | (import("./MenuItem/MenuItem").MenuItemProps & {
61
62
  component: React.ElementType<any>;
63
+ renderRoot?(props: Record<string, any>): any;
62
64
  })>, never> & import("../../core/factory/factory").ThemeExtend<{
63
65
  props: import("./MenuItem/MenuItem").MenuItemProps;
64
66
  defaultRef: HTMLButtonElement;
@@ -26,8 +26,10 @@ export declare const MenuItem: (<C = "button">(props: import("../../../core/fact
26
26
  component?: any;
27
27
  } & Omit<Omit<any, "ref">, "component" | keyof MenuItemProps> & {
28
28
  ref?: any;
29
+ renderRoot?(props: any): any;
29
30
  }) | (MenuItemProps & {
30
31
  component: React.ElementType<any>;
32
+ renderRoot?(props: Record<string, any>): any;
31
33
  })>, never> & import("../../../core/factory/factory").ThemeExtend<{
32
34
  props: MenuItemProps;
33
35
  defaultRef: HTMLButtonElement;
@@ -33,6 +33,8 @@ export interface MultiSelectProps extends BoxProps, __BaseInputProps, ComboboxLi
33
33
  clearable?: boolean;
34
34
  /** Props passed down to the clear button */
35
35
  clearButtonProps?: __CloseButtonProps & ElementProps<'button'>;
36
+ /** Props passed down to the hidden input */
37
+ hiddenInputProps?: React.ComponentPropsWithoutRef<'input'>;
36
38
  }
37
39
  export type MultiSelectFactory = Factory<{
38
40
  props: MultiSelectProps;
@@ -50,8 +50,10 @@ export declare const NavLink: (<C = "a">(props: import("../../core/factory/creat
50
50
  component?: any;
51
51
  } & Omit<Omit<any, "ref">, "component" | keyof NavLinkProps> & {
52
52
  ref?: any;
53
+ renderRoot?(props: any): any;
53
54
  }) | (NavLinkProps & {
54
55
  component: React.ElementType<any>;
56
+ renderRoot?(props: Record<string, any>): any;
55
57
  })>, never> & import("../../core/factory/factory").ThemeExtend<{
56
58
  props: NavLinkProps;
57
59
  defaultRef: HTMLAnchorElement;
@@ -35,8 +35,10 @@ export declare const Overlay: (<C = "div">(props: import("../../core/factory/cre
35
35
  component?: any;
36
36
  } & Omit<Omit<any, "ref">, "component" | keyof OverlayProps> & {
37
37
  ref?: any;
38
+ renderRoot?(props: any): any;
38
39
  }) | (OverlayProps & {
39
40
  component: React.ElementType<any>;
41
+ renderRoot?(props: Record<string, any>): any;
40
42
  })>, never> & import("../../core/factory/factory").ThemeExtend<{
41
43
  props: OverlayProps;
42
44
  defaultRef: HTMLDivElement;
@@ -14,34 +14,44 @@ export declare function createEdgeComponent({ icon, name, action, type }: Create
14
14
  component?: any;
15
15
  } & Omit<Omit<any, "ref">, "component" | keyof PaginationEdgeProps> & {
16
16
  ref?: any;
17
+ renderRoot?(props: any): any;
17
18
  }) | (PaginationEdgeProps & {
18
19
  component: React.ElementType<any>;
20
+ renderRoot?(props: Record<string, any>): any;
19
21
  })>, never> & Record<string, never>;
20
22
  export declare const PaginationNext: (<C = "button">(props: import("../../../core/factory/create-polymorphic-component").PolymorphicComponentProps<C, PaginationEdgeProps>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & Omit<React.FunctionComponent<(PaginationEdgeProps & {
21
23
  component?: any;
22
24
  } & Omit<Omit<any, "ref">, "component" | keyof PaginationEdgeProps> & {
23
25
  ref?: any;
26
+ renderRoot?(props: any): any;
24
27
  }) | (PaginationEdgeProps & {
25
28
  component: React.ElementType<any>;
29
+ renderRoot?(props: Record<string, any>): any;
26
30
  })>, never> & Record<string, never>;
27
31
  export declare const PaginationPrevious: (<C = "button">(props: import("../../../core/factory/create-polymorphic-component").PolymorphicComponentProps<C, PaginationEdgeProps>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & Omit<React.FunctionComponent<(PaginationEdgeProps & {
28
32
  component?: any;
29
33
  } & Omit<Omit<any, "ref">, "component" | keyof PaginationEdgeProps> & {
30
34
  ref?: any;
35
+ renderRoot?(props: any): any;
31
36
  }) | (PaginationEdgeProps & {
32
37
  component: React.ElementType<any>;
38
+ renderRoot?(props: Record<string, any>): any;
33
39
  })>, never> & Record<string, never>;
34
40
  export declare const PaginationFirst: (<C = "button">(props: import("../../../core/factory/create-polymorphic-component").PolymorphicComponentProps<C, PaginationEdgeProps>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & Omit<React.FunctionComponent<(PaginationEdgeProps & {
35
41
  component?: any;
36
42
  } & Omit<Omit<any, "ref">, "component" | keyof PaginationEdgeProps> & {
37
43
  ref?: any;
44
+ renderRoot?(props: any): any;
38
45
  }) | (PaginationEdgeProps & {
39
46
  component: React.ElementType<any>;
47
+ renderRoot?(props: Record<string, any>): any;
40
48
  })>, never> & Record<string, never>;
41
49
  export declare const PaginationLast: (<C = "button">(props: import("../../../core/factory/create-polymorphic-component").PolymorphicComponentProps<C, PaginationEdgeProps>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & Omit<React.FunctionComponent<(PaginationEdgeProps & {
42
50
  component?: any;
43
51
  } & Omit<Omit<any, "ref">, "component" | keyof PaginationEdgeProps> & {
44
52
  ref?: any;
53
+ renderRoot?(props: any): any;
45
54
  }) | (PaginationEdgeProps & {
46
55
  component: React.ElementType<any>;
56
+ renderRoot?(props: Record<string, any>): any;
47
57
  })>, never> & Record<string, never>;
@@ -25,8 +25,10 @@ export declare const Paper: (<C = "div">(props: import("../../core/factory/creat
25
25
  component?: any;
26
26
  } & Omit<Omit<any, "ref">, "component" | keyof PaperProps> & {
27
27
  ref?: any;
28
+ renderRoot?(props: any): any;
28
29
  }) | (PaperProps & {
29
30
  component: React.ElementType<any>;
31
+ renderRoot?(props: Record<string, any>): any;
30
32
  })>, never> & import("../../core/factory/factory").ThemeExtend<{
31
33
  props: PaperProps;
32
34
  defaultComponent: 'div';
@@ -51,6 +51,8 @@ export interface PinInputProps extends BoxProps, StylesApiProps<PinInputFactory>
51
51
  inputMode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search' | undefined;
52
52
  /** `aria-label` for the inputs */
53
53
  ariaLabel?: string;
54
+ /** Props passed down to the hidden input */
55
+ hiddenInputProps?: React.ComponentPropsWithoutRef<'input'>;
54
56
  }
55
57
  export type PinInputFactory = Factory<{
56
58
  props: PinInputProps;
@@ -31,6 +31,8 @@ export interface SelectProps extends BoxProps, __BaseInputProps, ComboboxLikePro
31
31
  clearable?: boolean;
32
32
  /** Props passed down to the clear button */
33
33
  clearButtonProps?: __CloseButtonProps & ElementProps<'button'>;
34
+ /** Props passed down to the hidden input */
35
+ hiddenInputProps?: React.ComponentPropsWithoutRef<'input'>;
34
36
  }
35
37
  export type SelectFactory = Factory<{
36
38
  props: SelectProps;
@@ -59,6 +59,8 @@ export interface RangeSliderProps extends BoxProps, StylesApiProps<RangeSliderFa
59
59
  thumbFromLabel?: string;
60
60
  /** Second thumb `aria-label` */
61
61
  thumbToLabel?: string;
62
+ /** Props passed down to the hidden input */
63
+ hiddenInputProps?: React.ComponentPropsWithoutRef<'input'>;
62
64
  }
63
65
  export type RangeSliderFactory = Factory<{
64
66
  props: RangeSliderProps;
@@ -52,6 +52,8 @@ export interface SliderProps extends BoxProps, StylesApiProps<SliderFactory>, El
52
52
  scale?(value: number): number;
53
53
  /** Determines whether track value representation should be inverted, `false` by default */
54
54
  inverted?: boolean;
55
+ /** Props passed down to the hidden input */
56
+ hiddenInputProps?: React.ComponentPropsWithoutRef<'input'>;
55
57
  }
56
58
  export type SliderFactory = Factory<{
57
59
  props: SliderProps;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { BoxProps, StylesApiProps, ElementProps, Factory } from '../../core';
2
3
  import { ComboboxLikeProps, ComboboxLikeStylesNames } from '../Combobox';
3
4
  import { __BaseInputProps, __InputStylesNames } from '../Input';
@@ -28,6 +29,8 @@ export interface TagsInputProps extends BoxProps, __BaseInputProps, ComboboxLike
28
29
  clearable?: boolean;
29
30
  /** Props passed down to the clear button */
30
31
  clearButtonProps?: __CloseButtonProps & ElementProps<'button'>;
32
+ /** Props passed down to the hidden input */
33
+ hiddenInputProps?: React.ComponentPropsWithoutRef<'input'>;
31
34
  }
32
35
  export type TagsInputFactory = Factory<{
33
36
  props: TagsInputProps;
@@ -38,8 +38,10 @@ export declare const Text: (<C = "p">(props: import("../../core/factory/create-p
38
38
  component?: any;
39
39
  } & Omit<Omit<any, "ref">, "component" | keyof TextProps> & {
40
40
  ref?: any;
41
+ renderRoot?(props: any): any;
41
42
  }) | (TextProps & {
42
43
  component: React.ElementType<any>;
44
+ renderRoot?(props: Record<string, any>): any;
43
45
  })>, never> & import("../../core/factory/factory").ThemeExtend<{
44
46
  props: TextProps;
45
47
  defaultComponent: 'p';
@@ -14,8 +14,10 @@ export declare const UnstyledButton: (<C = "button">(props: import("../../core/f
14
14
  component?: any;
15
15
  } & Omit<Omit<any, "ref">, "component" | keyof UnstyledButtonProps> & {
16
16
  ref?: any;
17
+ renderRoot?(props: any): any;
17
18
  }) | (UnstyledButtonProps & {
18
19
  component: React.ElementType<any>;
20
+ renderRoot?(props: Record<string, any>): any;
19
21
  })>, never> & import("../../core/factory/factory").ThemeExtend<{
20
22
  props: UnstyledButtonProps;
21
23
  stylesNames: UnstyledButtonStylesNames;
@@ -29,6 +29,8 @@ export declare const Box: (<C = "div">(props: import("../factory/create-polymorp
29
29
  component?: any;
30
30
  } & Omit<Omit<any, "ref">, "component" | keyof BoxComponentProps> & {
31
31
  ref?: any;
32
+ renderRoot?(props: any): any;
32
33
  }) | (BoxComponentProps & {
33
34
  component: React.ElementType<any>;
35
+ renderRoot?(props: Record<string, any>): any;
34
36
  })>, never> & Record<string, never>;
@@ -1,6 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import type { MantineTheme } from '../MantineProvider';
3
- type MantineStyle = React.CSSProperties | ((theme: MantineTheme) => React.CSSProperties);
3
+ export interface CSSProperties extends React.CSSProperties {
4
+ [key: string]: any;
5
+ }
6
+ type MantineStyle = CSSProperties | ((theme: MantineTheme) => CSSProperties);
4
7
  export type MantineStyleProp = MantineStyle | MantineStyle[] | MantineStyleProp[] | undefined;
5
8
  export type CssVariable = `--${string}`;
6
9
  export type CssVariables<Variable extends string = CssVariable> = Partial<Record<Variable, string>>;
@@ -9,12 +9,16 @@ type InheritedProps<C extends ElementType, Props = {}> = ExtendedProps<PropsOf<C
9
9
  export type PolymorphicRef<C> = C extends React.ElementType ? React.ComponentPropsWithRef<C>['ref'] : never;
10
10
  export type PolymorphicComponentProps<C, Props = {}> = C extends React.ElementType ? InheritedProps<C, Props & ComponentProp<C>> & {
11
11
  ref?: PolymorphicRef<C>;
12
+ renderRoot?(props: any): any;
12
13
  } : Props & {
13
14
  component: React.ElementType;
15
+ renderRoot?(props: Record<string, any>): any;
14
16
  };
15
17
  export declare function createPolymorphicComponent<ComponentDefaultType, Props, StaticComponents = Record<string, never>>(component: any): (<C = ComponentDefaultType>(props: PolymorphicComponentProps<C, Props>) => React.ReactElement) & Omit<React.FunctionComponent<(Props & ComponentProp<any> & Omit<Omit<any, "ref">, "component" | keyof Props> & {
16
18
  ref?: any;
19
+ renderRoot?(props: any): any;
17
20
  }) | (Props & {
18
21
  component: React.ElementType<any>;
22
+ renderRoot?(props: Record<string, any>): any;
19
23
  })>, never> & StaticComponents;
20
24
  export {};
@@ -9,6 +9,8 @@ export declare function polymorphicFactory<Payload extends PolymorphicFactoryPay
9
9
  component?: any;
10
10
  } & Omit<Omit<any, "ref">, "component" | keyof Payload["props"]> & {
11
11
  ref?: any;
12
+ renderRoot?(props: any): any;
12
13
  }) | (Payload["props"] & {
13
14
  component: import("react").ElementType<any>;
15
+ renderRoot?(props: Record<string, any>): any;
14
16
  })>, never> & ThemeExtend<Payload> & ComponentClasses<Payload> & StaticComponents<Payload["staticComponents"]>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mantine/core",
3
3
  "description": "React components library focused on usability, accessibility and developer experience",
4
- "version": "7.0.2",
4
+ "version": "7.1.0",
5
5
  "main": "./cjs/index.js",
6
6
  "types": "./lib/index.d.ts",
7
7
  "module": "./esm/index.mjs",
@@ -17,6 +17,7 @@
17
17
  }
18
18
  },
19
19
  "./styles.css": "./esm/index.css",
20
+ "./styles.layer.css": "./esm/index.layer.css",
20
21
  "./styles/*": "./esm/styles/*"
21
22
  },
22
23
  "license": "MIT",
@@ -42,7 +43,7 @@
42
43
  "design"
43
44
  ],
44
45
  "peerDependencies": {
45
- "@mantine/hooks": "7.0.2",
46
+ "@mantine/hooks": "7.1.0",
46
47
  "react": "^18.2.0",
47
48
  "react-dom": "^18.2.0"
48
49
  },