@mantine/core 7.10.2 → 7.11.1

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 (154) hide show
  1. package/cjs/components/Avatar/Avatar.cjs +11 -6
  2. package/cjs/components/Avatar/Avatar.cjs.map +1 -1
  3. package/cjs/components/Avatar/get-initials/get-initials.cjs +13 -0
  4. package/cjs/components/Avatar/get-initials/get-initials.cjs.map +1 -0
  5. package/cjs/components/Avatar/get-initials-color/get-initials-color.cjs +35 -0
  6. package/cjs/components/Avatar/get-initials-color/get-initials-color.cjs.map +1 -0
  7. package/cjs/components/Burger/Burger.cjs +3 -1
  8. package/cjs/components/Burger/Burger.cjs.map +1 -1
  9. package/cjs/components/Floating/FloatingArrow/get-arrow-position-styles.cjs +4 -17
  10. package/cjs/components/Floating/FloatingArrow/get-arrow-position-styles.cjs.map +1 -1
  11. package/cjs/components/ModalBase/ModalBase.cjs +22 -13
  12. package/cjs/components/ModalBase/ModalBase.cjs.map +1 -1
  13. package/cjs/components/MultiSelect/MultiSelect.cjs +1 -1
  14. package/cjs/components/MultiSelect/MultiSelect.cjs.map +1 -1
  15. package/cjs/components/NumberInput/NumberInput.cjs +3 -1
  16. package/cjs/components/NumberInput/NumberInput.cjs.map +1 -1
  17. package/cjs/components/Pagination/Pagination.cjs +2 -1
  18. package/cjs/components/Pagination/Pagination.cjs.map +1 -1
  19. package/cjs/components/PinInput/PinInput.cjs +1 -0
  20. package/cjs/components/PinInput/PinInput.cjs.map +1 -1
  21. package/cjs/components/Popover/Popover.cjs +2 -1
  22. package/cjs/components/Popover/Popover.cjs.map +1 -1
  23. package/cjs/components/Popover/Popover.context.cjs.map +1 -1
  24. package/cjs/components/Popover/PopoverDropdown/PopoverDropdown.cjs +1 -0
  25. package/cjs/components/Popover/PopoverDropdown/PopoverDropdown.cjs.map +1 -1
  26. package/cjs/components/Select/Select.cjs +2 -2
  27. package/cjs/components/Select/Select.cjs.map +1 -1
  28. package/cjs/components/Spoiler/Spoiler.cjs +10 -3
  29. package/cjs/components/Spoiler/Spoiler.cjs.map +1 -1
  30. package/cjs/components/TagsInput/TagsInput.cjs +28 -10
  31. package/cjs/components/TagsInput/TagsInput.cjs.map +1 -1
  32. package/cjs/components/Tooltip/Tooltip.cjs +3 -0
  33. package/cjs/components/Tooltip/Tooltip.cjs.map +1 -1
  34. package/cjs/components/Tooltip/TooltipFloating/TooltipFloating.cjs +4 -1
  35. package/cjs/components/Tooltip/TooltipFloating/TooltipFloating.cjs.map +1 -1
  36. package/cjs/components/Tooltip/TooltipFloating/use-floating-tooltip.cjs +3 -2
  37. package/cjs/components/Tooltip/TooltipFloating/use-floating-tooltip.cjs.map +1 -1
  38. package/cjs/components/Tooltip/use-tooltip.cjs +1 -1
  39. package/cjs/components/Tooltip/use-tooltip.cjs.map +1 -1
  40. package/cjs/components/Transition/Transition.cjs +6 -2
  41. package/cjs/components/Transition/Transition.cjs.map +1 -1
  42. package/cjs/components/Transition/use-transition.cjs +23 -6
  43. package/cjs/components/Transition/use-transition.cjs.map +1 -1
  44. package/cjs/components/Tree/Tree.cjs +1 -0
  45. package/cjs/components/Tree/Tree.cjs.map +1 -1
  46. package/cjs/core/MantineProvider/convert-css-variables/convert-css-variables.cjs +2 -2
  47. package/cjs/core/MantineProvider/convert-css-variables/convert-css-variables.cjs.map +1 -1
  48. package/cjs/core/factory/factory.cjs +7 -0
  49. package/cjs/core/factory/factory.cjs.map +1 -1
  50. package/cjs/core/factory/polymorphic-factory.cjs +7 -0
  51. package/cjs/core/factory/polymorphic-factory.cjs.map +1 -1
  52. package/esm/components/Avatar/Avatar.mjs +11 -6
  53. package/esm/components/Avatar/Avatar.mjs.map +1 -1
  54. package/esm/components/Avatar/get-initials/get-initials.mjs +11 -0
  55. package/esm/components/Avatar/get-initials/get-initials.mjs.map +1 -0
  56. package/esm/components/Avatar/get-initials-color/get-initials-color.mjs +33 -0
  57. package/esm/components/Avatar/get-initials-color/get-initials-color.mjs.map +1 -0
  58. package/esm/components/Burger/Burger.mjs +3 -1
  59. package/esm/components/Burger/Burger.mjs.map +1 -1
  60. package/esm/components/Floating/FloatingArrow/get-arrow-position-styles.mjs +4 -17
  61. package/esm/components/Floating/FloatingArrow/get-arrow-position-styles.mjs.map +1 -1
  62. package/esm/components/ModalBase/ModalBase.mjs +22 -13
  63. package/esm/components/ModalBase/ModalBase.mjs.map +1 -1
  64. package/esm/components/MultiSelect/MultiSelect.mjs +1 -1
  65. package/esm/components/MultiSelect/MultiSelect.mjs.map +1 -1
  66. package/esm/components/NumberInput/NumberInput.mjs +3 -1
  67. package/esm/components/NumberInput/NumberInput.mjs.map +1 -1
  68. package/esm/components/Pagination/Pagination.mjs +2 -1
  69. package/esm/components/Pagination/Pagination.mjs.map +1 -1
  70. package/esm/components/PinInput/PinInput.mjs +1 -0
  71. package/esm/components/PinInput/PinInput.mjs.map +1 -1
  72. package/esm/components/Popover/Popover.context.mjs.map +1 -1
  73. package/esm/components/Popover/Popover.mjs +2 -1
  74. package/esm/components/Popover/Popover.mjs.map +1 -1
  75. package/esm/components/Popover/PopoverDropdown/PopoverDropdown.mjs +1 -0
  76. package/esm/components/Popover/PopoverDropdown/PopoverDropdown.mjs.map +1 -1
  77. package/esm/components/Select/Select.mjs +2 -2
  78. package/esm/components/Select/Select.mjs.map +1 -1
  79. package/esm/components/Spoiler/Spoiler.mjs +11 -4
  80. package/esm/components/Spoiler/Spoiler.mjs.map +1 -1
  81. package/esm/components/TagsInput/TagsInput.mjs +29 -11
  82. package/esm/components/TagsInput/TagsInput.mjs.map +1 -1
  83. package/esm/components/Tooltip/Tooltip.mjs +3 -0
  84. package/esm/components/Tooltip/Tooltip.mjs.map +1 -1
  85. package/esm/components/Tooltip/TooltipFloating/TooltipFloating.mjs +4 -1
  86. package/esm/components/Tooltip/TooltipFloating/TooltipFloating.mjs.map +1 -1
  87. package/esm/components/Tooltip/TooltipFloating/use-floating-tooltip.mjs +3 -2
  88. package/esm/components/Tooltip/TooltipFloating/use-floating-tooltip.mjs.map +1 -1
  89. package/esm/components/Tooltip/use-tooltip.mjs +1 -1
  90. package/esm/components/Tooltip/use-tooltip.mjs.map +1 -1
  91. package/esm/components/Transition/Transition.mjs +6 -2
  92. package/esm/components/Transition/Transition.mjs.map +1 -1
  93. package/esm/components/Transition/use-transition.mjs +23 -6
  94. package/esm/components/Transition/use-transition.mjs.map +1 -1
  95. package/esm/components/Tree/Tree.mjs +1 -0
  96. package/esm/components/Tree/Tree.mjs.map +1 -1
  97. package/esm/core/MantineProvider/convert-css-variables/convert-css-variables.mjs +2 -2
  98. package/esm/core/MantineProvider/convert-css-variables/convert-css-variables.mjs.map +1 -1
  99. package/esm/core/factory/factory.mjs +7 -0
  100. package/esm/core/factory/factory.mjs.map +1 -1
  101. package/esm/core/factory/polymorphic-factory.mjs +7 -0
  102. package/esm/core/factory/polymorphic-factory.mjs.map +1 -1
  103. package/lib/components/ActionIcon/ActionIcon.d.ts +10 -0
  104. package/lib/components/Anchor/Anchor.d.ts +7 -0
  105. package/lib/components/AppShell/AppShellSection/AppShellSection.d.ts +6 -0
  106. package/lib/components/Avatar/Avatar.d.ts +15 -1
  107. package/lib/components/Avatar/get-initials/get-initials.d.ts +1 -0
  108. package/lib/components/Avatar/get-initials-color/get-initials-color.d.ts +2 -0
  109. package/lib/components/BackgroundImage/BackgroundImage.d.ts +6 -0
  110. package/lib/components/Badge/Badge.d.ts +7 -0
  111. package/lib/components/Burger/Burger.d.ts +3 -1
  112. package/lib/components/Button/Button.d.ts +10 -0
  113. package/lib/components/Card/Card.d.ts +9 -0
  114. package/lib/components/Card/CardSection/CardSection.d.ts +6 -0
  115. package/lib/components/Center/Center.d.ts +5 -0
  116. package/lib/components/CloseButton/CloseButton.d.ts +7 -0
  117. package/lib/components/ColorSwatch/ColorSwatch.d.ts +6 -0
  118. package/lib/components/Flex/Flex.d.ts +5 -0
  119. package/lib/components/Highlight/Highlight.d.ts +6 -0
  120. package/lib/components/Image/Image.d.ts +6 -0
  121. package/lib/components/Input/Input.d.ts +15 -0
  122. package/lib/components/InputBase/InputBase.d.ts +6 -0
  123. package/lib/components/Menu/Menu.d.ts +6 -0
  124. package/lib/components/Menu/MenuItem/MenuItem.d.ts +6 -0
  125. package/lib/components/MultiSelect/MultiSelect.d.ts +1 -1
  126. package/lib/components/NavLink/NavLink.d.ts +7 -0
  127. package/lib/components/Overlay/Overlay.d.ts +6 -0
  128. package/lib/components/Pagination/Pagination.d.ts +2 -0
  129. package/lib/components/Paper/Paper.d.ts +6 -0
  130. package/lib/components/Popover/Popover.context.d.ts +2 -1
  131. package/lib/components/Select/Select.d.ts +1 -1
  132. package/lib/components/Spoiler/Spoiler.d.ts +4 -0
  133. package/lib/components/TagsInput/TagsInput.d.ts +2 -0
  134. package/lib/components/Text/Text.d.ts +7 -0
  135. package/lib/components/Tooltip/Tooltip.d.ts +2 -0
  136. package/lib/components/Tooltip/TooltipFloating/TooltipFloating.d.ts +2 -0
  137. package/lib/components/Tooltip/TooltipFloating/use-floating-tooltip.d.ts +4 -3
  138. package/lib/components/Tooltip/use-tooltip.d.ts +1 -0
  139. package/lib/components/Transition/Transition.d.ts +5 -1
  140. package/lib/components/Transition/use-transition.d.ts +3 -1
  141. package/lib/components/UnstyledButton/UnstyledButton.d.ts +5 -0
  142. package/lib/core/Box/style-props/style-props.types.d.ts +41 -0
  143. package/lib/core/factory/factory.d.ts +7 -1
  144. package/lib/core/factory/index.d.ts +1 -1
  145. package/lib/core/factory/polymorphic-factory.d.ts +4 -1
  146. package/package.json +3 -3
  147. package/styles/ActionIcon.css +2 -2
  148. package/styles/ActionIcon.layer.css +2 -2
  149. package/styles/Burger.css +2 -1
  150. package/styles/Burger.layer.css +2 -1
  151. package/styles/Popover.css +4 -0
  152. package/styles/Popover.layer.css +4 -0
  153. package/styles.css +8 -3
  154. package/styles.layer.css +8 -3
@@ -36,4 +36,10 @@ export declare const BackgroundImage: (<C = "div">(props: import("../../core").P
36
36
  defaultComponent: 'div';
37
37
  stylesNames: BackgroundImageStylesNames;
38
38
  vars: BackgroundImageCssVariables;
39
+ }> & import("../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
40
+ props: BackgroundImageProps;
41
+ defaultRef: HTMLDivElement;
42
+ defaultComponent: 'div';
43
+ stylesNames: BackgroundImageStylesNames;
44
+ vars: BackgroundImageCssVariables;
39
45
  }> & Record<string, never>;
@@ -56,4 +56,11 @@ export declare const Badge: (<C = "div">(props: import("../../core").Polymorphic
56
56
  stylesNames: BadgeStylesNames;
57
57
  vars: BadgeCssVariables;
58
58
  variant: BadgeVariant;
59
+ }> & import("../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
60
+ props: BadgeProps;
61
+ defaultRef: HTMLDivElement;
62
+ defaultComponent: 'div';
63
+ stylesNames: BadgeStylesNames;
64
+ vars: BadgeCssVariables;
65
+ variant: BadgeVariant;
59
66
  }> & Record<string, never>;
@@ -1,11 +1,13 @@
1
1
  import { BoxProps, ElementProps, Factory, MantineColor, MantineSize, StylesApiProps } from '../../core';
2
2
  export type BurgerStylesNames = 'root' | 'burger';
3
3
  export type BurgerCssVariables = {
4
- root: '--burger-color' | '--burger-size' | '--burger-transition-duration' | '--burger-transition-timing-function';
4
+ root: '--burger-color' | '--burger-size' | '--burger-line-size' | '--burger-transition-duration' | '--burger-transition-timing-function';
5
5
  };
6
6
  export interface BurgerProps extends BoxProps, StylesApiProps<BurgerFactory>, ElementProps<'button'> {
7
7
  /** Controls burger `width` and `height`, numbers are converted to rem, `'md'` by default */
8
8
  size?: MantineSize | (string & {}) | number;
9
+ /** Controls height of lines, by default calculated based on `size` prop */
10
+ lineSize?: string | number;
9
11
  /** Key of `theme.colors` of any valid CSS value, by default `theme.white` in dark color scheme and `theme.black` in light */
10
12
  color?: MantineColor;
11
13
  /** State of the burger, when `true` burger is transformed into X, `false` by default */
@@ -74,6 +74,16 @@ export declare const Button: (<C = "button">(props: import("../../core").Polymor
74
74
  staticComponents: {
75
75
  Group: typeof ButtonGroup;
76
76
  };
77
+ }> & import("../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
78
+ props: ButtonProps;
79
+ defaultRef: HTMLButtonElement;
80
+ defaultComponent: 'button';
81
+ stylesNames: ButtonStylesNames;
82
+ vars: ButtonCssVariables;
83
+ variant: ButtonVariant;
84
+ staticComponents: {
85
+ Group: typeof ButtonGroup;
86
+ };
77
87
  }> & {
78
88
  Group: typeof ButtonGroup;
79
89
  };
@@ -52,6 +52,15 @@ export declare const Card: (<C = "div">(props: import("../../core").PolymorphicC
52
52
  staticComponents: {
53
53
  Section: typeof CardSection;
54
54
  };
55
+ }> & import("../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
56
+ props: CardProps;
57
+ defaultRef: HTMLDivElement;
58
+ defaultComponent: 'div';
59
+ stylesNames: CardStylesNames;
60
+ vars: CardCssVariables;
61
+ staticComponents: {
62
+ Section: typeof CardSection;
63
+ };
55
64
  }> & {
56
65
  Section: typeof CardSection;
57
66
  };
@@ -33,4 +33,10 @@ export declare const CardSection: (<C = "div">(props: import("../../../core").Po
33
33
  defaultComponent: 'div';
34
34
  stylesNames: CardSectionStylesNames;
35
35
  compound: true;
36
+ }> & import("../../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
37
+ props: CardSectionProps;
38
+ defaultRef: HTMLDivElement;
39
+ defaultComponent: 'div';
40
+ stylesNames: CardSectionStylesNames;
41
+ compound: true;
36
42
  }> & Record<string, never>;
@@ -30,4 +30,9 @@ export declare const Center: (<C = "div">(props: import("../../core").Polymorphi
30
30
  defaultRef: HTMLDivElement;
31
31
  defaultComponent: 'div';
32
32
  stylesNames: CenterStylesNames;
33
+ }> & import("../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
34
+ props: CenterProps;
35
+ defaultRef: HTMLDivElement;
36
+ defaultComponent: 'div';
37
+ stylesNames: CenterStylesNames;
33
38
  }> & Record<string, never>;
@@ -51,4 +51,11 @@ export declare const CloseButton: (<C = "button">(props: import("../../core").Po
51
51
  stylesNames: CloseButtonStylesNames;
52
52
  variant: CloseButtonVariant;
53
53
  vars: CloseButtonCssVariables;
54
+ }> & import("../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
55
+ props: CloseButtonProps;
56
+ defaultComponent: 'button';
57
+ defaultRef: HTMLButtonElement;
58
+ stylesNames: CloseButtonStylesNames;
59
+ variant: CloseButtonVariant;
60
+ vars: CloseButtonCssVariables;
54
61
  }> & Record<string, never>;
@@ -42,4 +42,10 @@ export declare const ColorSwatch: (<C = "div">(props: import("../../core").Polym
42
42
  defaultComponent: 'div';
43
43
  stylesNames: ColorSwatchStylesNames;
44
44
  vars: ColorSwatchCssVariables;
45
+ }> & import("../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
46
+ props: ColorSwatchProps;
47
+ defaultRef: HTMLDivElement;
48
+ defaultComponent: 'div';
49
+ stylesNames: ColorSwatchStylesNames;
50
+ vars: ColorSwatchCssVariables;
45
51
  }> & Record<string, never>;
@@ -40,4 +40,9 @@ export declare const Flex: (<C = "div">(props: import("../../core").PolymorphicC
40
40
  defaultRef: HTMLDivElement;
41
41
  defaultComponent: 'div';
42
42
  stylesNames: FlexStylesNames;
43
+ }> & import("../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
44
+ props: FlexProps;
45
+ defaultRef: HTMLDivElement;
46
+ defaultComponent: 'div';
47
+ stylesNames: FlexStylesNames;
43
48
  }> & Record<string, never>;
@@ -37,4 +37,10 @@ export declare const Highlight: (<C = "div">(props: import("../../core").Polymor
37
37
  defaultComponent: 'div';
38
38
  stylesNames: TextStylesNames;
39
39
  variant: TextVariant;
40
+ }> & import("../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
41
+ props: HighlightProps;
42
+ defaultRef: HTMLDivElement;
43
+ defaultComponent: 'div';
44
+ stylesNames: TextStylesNames;
45
+ variant: TextVariant;
40
46
  }> & Record<string, never>;
@@ -42,4 +42,10 @@ export declare const Image: (<C = "img">(props: import("../../core").Polymorphic
42
42
  defaultComponent: 'img';
43
43
  stylesNames: ImageStylesNames;
44
44
  vars: ImageCssVariables;
45
+ }> & import("../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
46
+ props: ImageProps;
47
+ defaultRef: HTMLImageElement;
48
+ defaultComponent: 'img';
49
+ stylesNames: ImageStylesNames;
50
+ vars: ImageCssVariables;
45
51
  }> & Record<string, never>;
@@ -119,6 +119,21 @@ export declare const Input: (<C = "input">(props: import("../../core").Polymorph
119
119
  Placeholder: typeof InputPlaceholder;
120
120
  Wrapper: typeof InputWrapper;
121
121
  };
122
+ }> & import("../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
123
+ props: InputProps;
124
+ defaultRef: HTMLInputElement;
125
+ defaultComponent: 'input';
126
+ stylesNames: InputStylesNames;
127
+ variant: InputVariant;
128
+ vars: InputCssVariables;
129
+ ctx: InputStylesCtx;
130
+ staticComponents: {
131
+ Label: typeof InputLabel;
132
+ Error: typeof InputError;
133
+ Description: typeof InputDescription;
134
+ Placeholder: typeof InputPlaceholder;
135
+ Wrapper: typeof InputWrapper;
136
+ };
122
137
  }> & {
123
138
  Label: typeof InputLabel;
124
139
  Error: typeof InputError;
@@ -37,4 +37,10 @@ export declare const InputBase: (<C = "input">(props: import("../../core").Polym
37
37
  defaultComponent: 'input';
38
38
  stylesNames: __InputStylesNames;
39
39
  variant: InputVariant;
40
+ }> & import("../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
41
+ props: InputBaseProps;
42
+ defaultRef: HTMLInputElement;
43
+ defaultComponent: 'input';
44
+ stylesNames: __InputStylesNames;
45
+ variant: InputVariant;
40
46
  }> & Record<string, never>;
@@ -76,6 +76,12 @@ export declare namespace Menu {
76
76
  defaultComponent: "button";
77
77
  stylesNames: import("./MenuItem/MenuItem").MenuItemStylesNames;
78
78
  compound: true;
79
+ }> & import("../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
80
+ props: import("./MenuItem/MenuItem").MenuItemProps;
81
+ defaultRef: HTMLButtonElement;
82
+ defaultComponent: "button";
83
+ stylesNames: import("./MenuItem/MenuItem").MenuItemStylesNames;
84
+ compound: true;
79
85
  }> & Record<string, never>;
80
86
  var Label: import("../../core").MantineComponent<{
81
87
  props: import("./MenuLabel/MenuLabel").MenuLabelProps;
@@ -42,4 +42,10 @@ export declare const MenuItem: (<C = "button">(props: import("../../../core").Po
42
42
  defaultComponent: 'button';
43
43
  stylesNames: MenuItemStylesNames;
44
44
  compound: true;
45
+ }> & import("../../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
46
+ props: MenuItemProps;
47
+ defaultRef: HTMLButtonElement;
48
+ defaultComponent: 'button';
49
+ stylesNames: MenuItemStylesNames;
50
+ compound: true;
45
51
  }> & Record<string, never>;
@@ -25,7 +25,7 @@ export interface MultiSelectProps extends BoxProps, __BaseInputProps, ComboboxLi
25
25
  maxValues?: number;
26
26
  /** Determines whether the select should be searchable, `false` by default */
27
27
  searchable?: boolean;
28
- /** Message displayed when no option matched current search query, only applicable when `searchable` prop is set */
28
+ /** Message displayed when no option matches the current search query while the `searchable` prop is set or there is no data */
29
29
  nothingFoundMessage?: React.ReactNode;
30
30
  /** Determines whether check icon should be displayed near the selected option label, `true` by default */
31
31
  withCheckIcon?: boolean;
@@ -71,4 +71,11 @@ export declare const NavLink: (<C = "a">(props: import("../../core").Polymorphic
71
71
  stylesNames: NavLinkStylesNames;
72
72
  vars: NavLinkCssVariables;
73
73
  variant: NavLinkVariant;
74
+ }> & import("../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
75
+ props: NavLinkProps;
76
+ defaultRef: HTMLAnchorElement;
77
+ defaultComponent: 'a';
78
+ stylesNames: NavLinkStylesNames;
79
+ vars: NavLinkCssVariables;
80
+ variant: NavLinkVariant;
74
81
  }> & Record<string, never>;
@@ -50,4 +50,10 @@ export declare const Overlay: (<C = "div">(props: import("../../core").Polymorph
50
50
  defaultComponent: 'div';
51
51
  stylesNames: OverlayStylesNames;
52
52
  vars: OverlayCssVariables;
53
+ }> & import("../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
54
+ props: OverlayProps;
55
+ defaultRef: HTMLDivElement;
56
+ defaultComponent: 'div';
57
+ stylesNames: OverlayStylesNames;
58
+ vars: OverlayCssVariables;
53
59
  }> & Record<string, never>;
@@ -26,6 +26,8 @@ export interface PaginationProps extends PaginationRootProps {
26
26
  dotsIcon?: PaginationIcon;
27
27
  /** Key of `theme.spacing`, gap between controls, `8` by default */
28
28
  gap?: MantineSize | (string & {}) | number;
29
+ /** Determines whether the pagination should be hidden when only one page is available (`total={1}`), `false` by default */
30
+ hideWithOnePage?: boolean;
29
31
  }
30
32
  export type PaginationFactory = Factory<{
31
33
  props: PaginationProps;
@@ -40,4 +40,10 @@ export declare const Paper: (<C = "div">(props: import("../../core").Polymorphic
40
40
  defaultRef: HTMLDivElement;
41
41
  stylesNames: PaperStylesNames;
42
42
  vars: PaperCssVariables;
43
+ }> & import("../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
44
+ props: PaperProps;
45
+ defaultComponent: 'div';
46
+ defaultRef: HTMLDivElement;
47
+ stylesNames: PaperStylesNames;
48
+ vars: PaperCssVariables;
43
49
  }> & Record<string, never>;
@@ -1,5 +1,5 @@
1
1
  import { ClassNames, GetStylesApi, MantineRadius, MantineShadow, Styles } from '../../core';
2
- import { ArrowPosition, FloatingPosition } from '../Floating';
2
+ import { ArrowPosition, FloatingPosition, FloatingStrategy } from '../Floating';
3
3
  import { PortalProps } from '../Portal';
4
4
  import { TransitionOverride } from '../Transition';
5
5
  import type { PopoverFactory } from './Popover';
@@ -44,6 +44,7 @@ interface PopoverContext {
44
44
  variant: string | undefined;
45
45
  keepMounted: boolean | undefined;
46
46
  getStyles: GetStylesApi<PopoverFactory>;
47
+ floatingStrategy: FloatingStrategy | undefined;
47
48
  }
48
49
  export declare const PopoverContextProvider: ({ children, value }: {
49
50
  value: PopoverContext;
@@ -19,7 +19,7 @@ export interface SelectProps extends BoxProps, __BaseInputProps, ComboboxLikePro
19
19
  withCheckIcon?: boolean;
20
20
  /** Position of the check icon relative to the option label, `'left'` by default */
21
21
  checkIconPosition?: 'left' | 'right';
22
- /** Message displayed when no option matched current search query, only applicable when `searchable` prop is set */
22
+ /** Message displayed when no option matches the current search query while the `searchable` prop is set or there is no data */
23
23
  nothingFoundMessage?: React.ReactNode;
24
24
  /** Controlled search value */
25
25
  searchValue?: string;
@@ -14,6 +14,10 @@ export interface SpoilerProps extends BoxProps, StylesApiProps<SpoilerFactory>,
14
14
  controlRef?: React.ForwardedRef<HTMLButtonElement>;
15
15
  /** Initial spoiler state, true to wrap content in spoiler, false to show content without spoiler, opened state is updated on mount */
16
16
  initialState?: boolean;
17
+ /** Controlled expanded state value */
18
+ expanded?: boolean;
19
+ /** Called when expanded state changes (when spoiler visibility is toggled by the user) */
20
+ onExpandedChange?: (expanded: boolean) => void;
17
21
  /** Spoiler reveal transition duration in ms, set 0 or null to turn off animation, `200` by default */
18
22
  transitionDuration?: number;
19
23
  }
@@ -43,6 +43,8 @@ export interface TagsInputProps extends BoxProps, __BaseInputProps, Omit<Combobo
43
43
  renderOption?: (input: ComboboxLikeRenderOptionInput<ComboboxStringItem>) => React.ReactNode;
44
44
  /** Props passed down to the underlying `ScrollArea` component in the dropdown */
45
45
  scrollAreaProps?: ScrollAreaProps;
46
+ /** Determines whether the value typed in by the user but not submitted should be accepted when the input is blurred, `true` by default */
47
+ acceptValueOnBlur?: boolean;
46
48
  }
47
49
  export type TagsInputFactory = Factory<{
48
50
  props: TagsInputProps;
@@ -54,5 +54,12 @@ export declare const Text: (<C = "p">(props: import("../../core").PolymorphicCom
54
54
  stylesNames: TextStylesNames;
55
55
  vars: TextCssVariables;
56
56
  variant: TextVariant;
57
+ }> & import("../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
58
+ props: TextProps;
59
+ defaultComponent: 'p';
60
+ defaultRef: HTMLParagraphElement;
61
+ stylesNames: TextStylesNames;
62
+ vars: TextCssVariables;
63
+ variant: TextVariant;
57
64
  }> & Record<string, never>;
58
65
  export {};
@@ -13,6 +13,8 @@ export interface TooltipProps extends TooltipBaseProps {
13
13
  closeDelay?: number;
14
14
  /** Controlled opened state */
15
15
  opened?: boolean;
16
+ /** Uncontrolled tooltip initial opened state */
17
+ defaultOpened?: boolean;
16
18
  /** Space between target element and tooltip in px, `5` by default */
17
19
  offset?: number | FloatingAxesOffsets;
18
20
  /** Determines whether the tooltip should have an arrow, `false` by default */
@@ -3,6 +3,8 @@ import { TooltipBaseProps, TooltipCssVariables, TooltipStylesNames } from '../To
3
3
  export interface TooltipFloatingProps extends TooltipBaseProps {
4
4
  /** Offset from mouse in px, `10` by default */
5
5
  offset?: number;
6
+ /** Uncontrolled tooltip initial opened state */
7
+ defaultOpened?: boolean;
6
8
  }
7
9
  export type TooltipFloatingFactory = Factory<{
8
10
  props: TooltipFloatingProps;
@@ -2,13 +2,14 @@ import { FloatingPosition } from '../../Floating';
2
2
  interface UseFloatingTooltip {
3
3
  offset: number;
4
4
  position: FloatingPosition;
5
+ defaultOpened?: boolean;
5
6
  }
6
- export declare function useFloatingTooltip<T extends HTMLElement = any>({ offset, position, }: UseFloatingTooltip): {
7
+ export declare function useFloatingTooltip<T extends HTMLElement = any>({ offset, position, defaultOpened, }: UseFloatingTooltip): {
7
8
  handleMouseMove: ({ clientX, clientY }: MouseEvent | React.MouseEvent<T, MouseEvent>) => void;
8
9
  x: number;
9
10
  y: number;
10
- opened: boolean;
11
- setOpened: import("react").Dispatch<import("react").SetStateAction<boolean>>;
11
+ opened: boolean | undefined;
12
+ setOpened: import("react").Dispatch<import("react").SetStateAction<boolean | undefined>>;
12
13
  boundaryRef: import("react").MutableRefObject<T | undefined>;
13
14
  floating: ((node: HTMLElement | null) => void) & ((node: HTMLElement | null) => void);
14
15
  };
@@ -5,6 +5,7 @@ interface UseTooltip {
5
5
  openDelay?: number;
6
6
  onPositionChange?: (position: FloatingPosition) => void;
7
7
  opened?: boolean;
8
+ defaultOpened?: boolean;
8
9
  offset: number | FloatingAxesOffsets;
9
10
  arrowRef?: React.RefObject<HTMLDivElement>;
10
11
  arrowOffset?: number;
@@ -22,9 +22,13 @@ export interface TransitionProps {
22
22
  onEnter?: () => void;
23
23
  /** Called when enter transition ends */
24
24
  onEntered?: () => void;
25
+ /** Delay in ms before enter transition starts */
26
+ enterDelay?: number;
27
+ /** Delay in ms before exit transition starts */
28
+ exitDelay?: number;
25
29
  }
26
30
  export type TransitionOverride = Partial<Omit<TransitionProps, 'mounted'>>;
27
- export declare function Transition({ keepMounted, transition, duration, exitDuration, mounted, children, timingFunction, onExit, onEntered, onEnter, onExited, }: TransitionProps): import("react/jsx-runtime").JSX.Element | null;
31
+ export declare function Transition({ keepMounted, transition, duration, exitDuration, mounted, children, timingFunction, onExit, onEntered, onEnter, onExited, enterDelay, exitDelay, }: TransitionProps): import("react/jsx-runtime").JSX.Element | null;
28
32
  export declare namespace Transition {
29
33
  var displayName: string;
30
34
  }
@@ -8,8 +8,10 @@ interface UseTransition {
8
8
  onExit?: () => void;
9
9
  onEntered?: () => void;
10
10
  onExited?: () => void;
11
+ enterDelay?: number;
12
+ exitDelay?: number;
11
13
  }
12
- export declare function useTransition({ duration, exitDuration, timingFunction, mounted, onEnter, onExit, onEntered, onExited, }: UseTransition): {
14
+ export declare function useTransition({ duration, exitDuration, timingFunction, mounted, onEnter, onExit, onEntered, onExited, enterDelay, exitDelay, }: UseTransition): {
13
15
  transitionDuration: number;
14
16
  transitionStatus: TransitionStatus;
15
17
  transitionTimingFunction: string;
@@ -27,4 +27,9 @@ export declare const UnstyledButton: (<C = "button">(props: import("../../core")
27
27
  stylesNames: UnstyledButtonStylesNames;
28
28
  defaultComponent: 'button';
29
29
  defaultRef: HTMLButtonElement;
30
+ }> & import("../../core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
31
+ props: UnstyledButtonProps;
32
+ stylesNames: UnstyledButtonStylesNames;
33
+ defaultComponent: 'button';
34
+ defaultRef: HTMLButtonElement;
30
35
  }> & Record<string, never>;
@@ -1,47 +1,88 @@
1
1
  import type { MantineBreakpoint, MantineColor, MantineFontSize, MantineLineHeight, MantineSpacing } from '../../MantineProvider';
2
2
  export type StyleProp<Value> = Value | Partial<Record<MantineBreakpoint | (string & {}), Value>>;
3
3
  export interface MantineStyleProps {
4
+ /** margin, theme key: theme.spacing */
4
5
  m?: StyleProp<MantineSpacing>;
6
+ /** marginBlock, theme key: theme.spacing */
5
7
  my?: StyleProp<MantineSpacing>;
8
+ /** marginInline, theme key: theme.spacing */
6
9
  mx?: StyleProp<MantineSpacing>;
10
+ /** marginTop, theme key: theme.spacing */
7
11
  mt?: StyleProp<MantineSpacing>;
12
+ /** marginBottom, theme key: theme.spacing */
8
13
  mb?: StyleProp<MantineSpacing>;
14
+ /** marginInlineStart, theme key: theme.spacing */
9
15
  ms?: StyleProp<MantineSpacing>;
16
+ /** marginInlineEnd, theme key: theme.spacing */
10
17
  me?: StyleProp<MantineSpacing>;
18
+ /** marginLeft, theme key: theme.spacing */
11
19
  ml?: StyleProp<MantineSpacing>;
20
+ /** marginRight, theme key: theme.spacing */
12
21
  mr?: StyleProp<MantineSpacing>;
22
+ /** padding, theme key: theme.spacing */
13
23
  p?: StyleProp<MantineSpacing>;
24
+ /** paddingBlock, theme key: theme.spacing */
14
25
  py?: StyleProp<MantineSpacing>;
26
+ /** paddingInline, theme key: theme.spacing */
15
27
  px?: StyleProp<MantineSpacing>;
28
+ /** paddingTop, theme key: theme.spacing */
16
29
  pt?: StyleProp<MantineSpacing>;
30
+ /** paddingBottom, theme key: theme.spacing */
17
31
  pb?: StyleProp<MantineSpacing>;
32
+ /** paddingInlineStart, theme key: theme.spacing */
18
33
  ps?: StyleProp<MantineSpacing>;
34
+ /** paddingInlineEnd, theme key: theme.spacing */
19
35
  pe?: StyleProp<MantineSpacing>;
36
+ /** paddingLeft, theme key: theme.spacing */
20
37
  pl?: StyleProp<MantineSpacing>;
38
+ /** paddingRight, theme key: theme.spacing */
21
39
  pr?: StyleProp<MantineSpacing>;
40
+ /** border */
22
41
  bd?: StyleProp<React.CSSProperties['border']>;
42
+ /** background, theme key: theme.colors */
23
43
  bg?: StyleProp<MantineColor>;
44
+ /** color */
24
45
  c?: StyleProp<MantineColor>;
25
46
  opacity?: StyleProp<React.CSSProperties['opacity']>;
47
+ /** fontFamily */
26
48
  ff?: StyleProp<'monospace' | 'text' | 'heading' | (string & {})>;
49
+ /** fontSize, theme key: theme.fontSizes */
27
50
  fz?: StyleProp<MantineFontSize | `h${1 | 2 | 3 | 4 | 5 | 6}` | number | (string & {})>;
51
+ /** fontWeight */
28
52
  fw?: StyleProp<React.CSSProperties['fontWeight']>;
53
+ /** letterSpacing */
29
54
  lts?: StyleProp<React.CSSProperties['letterSpacing']>;
55
+ /** textAlign */
30
56
  ta?: StyleProp<React.CSSProperties['textAlign']>;
57
+ /** lineHeight, theme key: lineHeights */
31
58
  lh?: StyleProp<MantineLineHeight | `h${1 | 2 | 3 | 4 | 5 | 6}` | number | (string & {})>;
59
+ /** fontStyle */
32
60
  fs?: StyleProp<React.CSSProperties['fontStyle']>;
61
+ /** textTransform */
33
62
  tt?: StyleProp<React.CSSProperties['textTransform']>;
63
+ /** textDecoration */
34
64
  td?: StyleProp<React.CSSProperties['textDecoration']>;
65
+ /** width, theme key: theme.spacing */
35
66
  w?: StyleProp<React.CSSProperties['width']>;
67
+ /** minWidth, theme key: theme.spacing*/
36
68
  miw?: StyleProp<React.CSSProperties['minWidth']>;
69
+ /** maxWidth, theme key: theme.spacing */
37
70
  maw?: StyleProp<React.CSSProperties['maxWidth']>;
71
+ /** height, theme key: theme.spacing */
38
72
  h?: StyleProp<React.CSSProperties['height']>;
73
+ /** minHeight, theme key: theme.spacing */
39
74
  mih?: StyleProp<React.CSSProperties['minHeight']>;
75
+ /** maxHeight, theme key: theme.spacing */
40
76
  mah?: StyleProp<React.CSSProperties['maxHeight']>;
77
+ /** backgroundSize */
41
78
  bgsz?: StyleProp<React.CSSProperties['backgroundSize']>;
79
+ /** backgroundPosition */
42
80
  bgp?: StyleProp<React.CSSProperties['backgroundPosition']>;
81
+ /** backgroundRepeat */
43
82
  bgr?: StyleProp<React.CSSProperties['backgroundRepeat']>;
83
+ /** backgroundAttachment */
44
84
  bga?: StyleProp<React.CSSProperties['backgroundAttachment']>;
85
+ /** position */
45
86
  pos?: StyleProp<React.CSSProperties['position']>;
46
87
  top?: StyleProp<React.CSSProperties['top']>;
47
88
  left?: StyleProp<React.CSSProperties['left']>;
@@ -28,7 +28,13 @@ export interface ThemeExtend<Payload extends FactoryPayload> {
28
28
  export type ComponentClasses<Payload extends FactoryPayload> = {
29
29
  classes: Payload['stylesNames'] extends string ? Record<string, string> : never;
30
30
  };
31
- export type MantineComponentStaticProperties<Payload extends FactoryPayload> = ThemeExtend<Payload> & ComponentClasses<Payload> & StaticComponents<Payload['staticComponents']>;
31
+ export type MantineComponentStaticProperties<Payload extends FactoryPayload> = ThemeExtend<Payload> & ComponentClasses<Payload> & StaticComponents<Payload['staticComponents']> & FactoryComponentWithProps<Payload>;
32
+ export type FactoryComponentWithProps<Payload extends FactoryPayload> = {
33
+ withProps: (props: Payload['props']) => React.ForwardRefExoticComponent<Payload['props'] & React.RefAttributes<Payload['ref']> & {
34
+ component?: any;
35
+ renderRoot?: (props: Record<string, any>) => React.ReactNode;
36
+ }>;
37
+ };
32
38
  export type MantineComponent<Payload extends FactoryPayload> = React.ForwardRefExoticComponent<Payload['props'] & React.RefAttributes<Payload['ref']> & {
33
39
  component?: any;
34
40
  renderRoot?: (props: Record<string, any>) => React.ReactNode;
@@ -1,6 +1,6 @@
1
1
  export { factory } from './factory';
2
2
  export { polymorphicFactory } from './polymorphic-factory';
3
3
  export { createPolymorphicComponent } from './create-polymorphic-component';
4
- export type { FactoryPayload, ExtendComponent, MantineComponent, MantineComponentStaticProperties, } from './factory';
4
+ export type { FactoryPayload, ExtendComponent, MantineComponent, MantineComponentStaticProperties, FactoryComponentWithProps, } from './factory';
5
5
  export type { PolymorphicComponentProps, PolymorphicRef } from './create-polymorphic-component';
6
6
  export type { Factory, PolymorphicFactory } from './create-factory';
@@ -4,6 +4,9 @@ export interface PolymorphicFactoryPayload extends FactoryPayload {
4
4
  defaultComponent: any;
5
5
  defaultRef: any;
6
6
  }
7
+ export type PolymorphicComponentWithProps<Payload extends PolymorphicFactoryPayload> = {
8
+ withProps: <C = Payload['defaultComponent']>(fixedProps: PolymorphicComponentProps<C, Payload['props']>) => <L = C>(props: PolymorphicComponentProps<L, Payload['props']>) => React.ReactElement;
9
+ };
7
10
  export declare function polymorphicFactory<Payload extends PolymorphicFactoryPayload>(ui: React.ForwardRefRenderFunction<Payload['defaultRef'], Payload['props']>): (<C = Payload["defaultComponent"]>(props: PolymorphicComponentProps<C, Payload["props"]>) => React.ReactElement) & Omit<import("react").FunctionComponent<(Payload["props"] & {
8
11
  component?: any;
9
12
  } & Omit<Omit<any, "ref">, "component" | keyof Payload["props"]> & {
@@ -12,4 +15,4 @@ export declare function polymorphicFactory<Payload extends PolymorphicFactoryPay
12
15
  }) | (Payload["props"] & {
13
16
  component: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>;
14
17
  renderRoot?: ((props: Record<string, any>) => any) | undefined;
15
- })>, never> & ThemeExtend<Payload> & ComponentClasses<Payload> & StaticComponents<Payload["staticComponents"]>;
18
+ })>, never> & ThemeExtend<Payload> & ComponentClasses<Payload> & PolymorphicComponentWithProps<Payload> & StaticComponents<Payload["staticComponents"]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mantine/core",
3
- "version": "7.10.2",
3
+ "version": "7.11.1",
4
4
  "description": "React components library focused on usability, accessibility and developer experience",
5
5
  "homepage": "https://mantine.dev/",
6
6
  "license": "MIT",
@@ -43,7 +43,7 @@
43
43
  "directory": "packages/@mantine/core"
44
44
  },
45
45
  "peerDependencies": {
46
- "@mantine/hooks": "7.10.2",
46
+ "@mantine/hooks": "7.11.1",
47
47
  "react": "^18.2.0",
48
48
  "react-dom": "^18.2.0"
49
49
  },
@@ -57,6 +57,6 @@
57
57
  },
58
58
  "devDependencies": {
59
59
  "@mantine-tests/core": "1.1.0",
60
- "@mantine/hooks": "7.10.2"
60
+ "@mantine/hooks": "7.11.1"
61
61
  }
62
62
  }
@@ -85,11 +85,11 @@
85
85
  }
86
86
 
87
87
  :where([data-mantine-color-scheme='light']) .m_302b9fb1 {
88
- background-color: rgba(255, 255, 255, 0.35);
88
+ background-color: rgba(255, 255, 255, 0.15);
89
89
  }
90
90
 
91
91
  :where([data-mantine-color-scheme='dark']) .m_302b9fb1 {
92
- background-color: rgba(0, 0, 0, 0.35);
92
+ background-color: rgba(0, 0, 0, 0.15);
93
93
  }
94
94
 
95
95
  .m_1a0f1b21 {
@@ -85,11 +85,11 @@
85
85
  }
86
86
 
87
87
  :where([data-mantine-color-scheme='light']) .m_302b9fb1 {
88
- background-color: rgba(255, 255, 255, 0.35);
88
+ background-color: rgba(255, 255, 255, 0.15);
89
89
  }
90
90
 
91
91
  :where([data-mantine-color-scheme='dark']) .m_302b9fb1 {
92
- background-color: rgba(0, 0, 0, 0.35);
92
+ background-color: rgba(0, 0, 0, 0.15);
93
93
  }
94
94
 
95
95
  .m_1a0f1b21 {