@mantine/core 7.10.2 → 7.11.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.
- package/cjs/components/Avatar/Avatar.cjs +11 -6
- package/cjs/components/Avatar/Avatar.cjs.map +1 -1
- package/cjs/components/Avatar/get-initials/get-initials.cjs +13 -0
- package/cjs/components/Avatar/get-initials/get-initials.cjs.map +1 -0
- package/cjs/components/Avatar/get-initials-color/get-initials-color.cjs +35 -0
- package/cjs/components/Avatar/get-initials-color/get-initials-color.cjs.map +1 -0
- package/cjs/components/Burger/Burger.cjs +3 -1
- package/cjs/components/Burger/Burger.cjs.map +1 -1
- package/cjs/components/Pagination/Pagination.cjs +2 -1
- package/cjs/components/Pagination/Pagination.cjs.map +1 -1
- package/cjs/components/Spoiler/Spoiler.cjs +10 -3
- package/cjs/components/Spoiler/Spoiler.cjs.map +1 -1
- package/cjs/components/TagsInput/TagsInput.cjs +17 -11
- package/cjs/components/TagsInput/TagsInput.cjs.map +1 -1
- package/cjs/components/Transition/Transition.cjs +6 -2
- package/cjs/components/Transition/Transition.cjs.map +1 -1
- package/cjs/components/Transition/use-transition.cjs +23 -6
- package/cjs/components/Transition/use-transition.cjs.map +1 -1
- package/cjs/core/factory/factory.cjs +7 -0
- package/cjs/core/factory/factory.cjs.map +1 -1
- package/cjs/core/factory/polymorphic-factory.cjs +7 -0
- package/cjs/core/factory/polymorphic-factory.cjs.map +1 -1
- package/esm/components/Avatar/Avatar.mjs +11 -6
- package/esm/components/Avatar/Avatar.mjs.map +1 -1
- package/esm/components/Avatar/get-initials/get-initials.mjs +11 -0
- package/esm/components/Avatar/get-initials/get-initials.mjs.map +1 -0
- package/esm/components/Avatar/get-initials-color/get-initials-color.mjs +33 -0
- package/esm/components/Avatar/get-initials-color/get-initials-color.mjs.map +1 -0
- package/esm/components/Burger/Burger.mjs +3 -1
- package/esm/components/Burger/Burger.mjs.map +1 -1
- package/esm/components/Pagination/Pagination.mjs +2 -1
- package/esm/components/Pagination/Pagination.mjs.map +1 -1
- package/esm/components/Spoiler/Spoiler.mjs +11 -4
- package/esm/components/Spoiler/Spoiler.mjs.map +1 -1
- package/esm/components/TagsInput/TagsInput.mjs +17 -11
- package/esm/components/TagsInput/TagsInput.mjs.map +1 -1
- package/esm/components/Transition/Transition.mjs +6 -2
- package/esm/components/Transition/Transition.mjs.map +1 -1
- package/esm/components/Transition/use-transition.mjs +23 -6
- package/esm/components/Transition/use-transition.mjs.map +1 -1
- package/esm/core/factory/factory.mjs +7 -0
- package/esm/core/factory/factory.mjs.map +1 -1
- package/esm/core/factory/polymorphic-factory.mjs +7 -0
- package/esm/core/factory/polymorphic-factory.mjs.map +1 -1
- package/lib/components/ActionIcon/ActionIcon.d.ts +10 -0
- package/lib/components/Anchor/Anchor.d.ts +7 -0
- package/lib/components/AppShell/AppShellSection/AppShellSection.d.ts +6 -0
- package/lib/components/Avatar/Avatar.d.ts +15 -1
- package/lib/components/Avatar/get-initials/get-initials.d.ts +1 -0
- package/lib/components/Avatar/get-initials-color/get-initials-color.d.ts +2 -0
- package/lib/components/BackgroundImage/BackgroundImage.d.ts +6 -0
- package/lib/components/Badge/Badge.d.ts +7 -0
- package/lib/components/Burger/Burger.d.ts +3 -1
- package/lib/components/Button/Button.d.ts +10 -0
- package/lib/components/Card/Card.d.ts +9 -0
- package/lib/components/Card/CardSection/CardSection.d.ts +6 -0
- package/lib/components/Center/Center.d.ts +5 -0
- package/lib/components/CloseButton/CloseButton.d.ts +7 -0
- package/lib/components/ColorSwatch/ColorSwatch.d.ts +6 -0
- package/lib/components/Flex/Flex.d.ts +5 -0
- package/lib/components/Highlight/Highlight.d.ts +6 -0
- package/lib/components/Image/Image.d.ts +6 -0
- package/lib/components/Input/Input.d.ts +15 -0
- package/lib/components/InputBase/InputBase.d.ts +6 -0
- package/lib/components/Menu/Menu.d.ts +6 -0
- package/lib/components/Menu/MenuItem/MenuItem.d.ts +6 -0
- package/lib/components/NavLink/NavLink.d.ts +7 -0
- package/lib/components/Overlay/Overlay.d.ts +6 -0
- package/lib/components/Pagination/Pagination.d.ts +2 -0
- package/lib/components/Paper/Paper.d.ts +6 -0
- package/lib/components/Spoiler/Spoiler.d.ts +4 -0
- package/lib/components/TagsInput/TagsInput.d.ts +2 -0
- package/lib/components/Text/Text.d.ts +7 -0
- package/lib/components/Transition/Transition.d.ts +5 -1
- package/lib/components/Transition/use-transition.d.ts +3 -1
- package/lib/components/UnstyledButton/UnstyledButton.d.ts +5 -0
- package/lib/core/factory/factory.d.ts +7 -1
- package/lib/core/factory/index.d.ts +1 -1
- package/lib/core/factory/polymorphic-factory.d.ts +4 -1
- package/package.json +3 -3
- package/styles/Burger.css +2 -1
- package/styles/Burger.layer.css +2 -1
- package/styles.css +2 -1
- package/styles.layer.css +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getInitials(name: string, limit?: number): string;
|
|
@@ -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>;
|
|
@@ -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>;
|
|
@@ -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 {};
|
|
@@ -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>;
|
|
@@ -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.
|
|
3
|
+
"version": "7.11.0",
|
|
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.
|
|
46
|
+
"@mantine/hooks": "7.11.0",
|
|
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.
|
|
60
|
+
"@mantine/hooks": "7.11.0"
|
|
61
61
|
}
|
|
62
62
|
}
|
package/styles/Burger.css
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
--burger-size-xl: 42px;
|
|
7
7
|
|
|
8
8
|
--burger-size: var(--burger-size-md);
|
|
9
|
+
--burger-line-size: calc(var(--burger-size) / 12);
|
|
9
10
|
|
|
10
11
|
width: calc(var(--burger-size) + var(--mantine-spacing-xs));
|
|
11
12
|
height: calc(var(--burger-size) + var(--mantine-spacing-xs));
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
.m_d4fb9cad::after {
|
|
32
33
|
display: block;
|
|
33
34
|
width: var(--burger-size);
|
|
34
|
-
height:
|
|
35
|
+
height: var(--burger-line-size);
|
|
35
36
|
background-color: var(--burger-color);
|
|
36
37
|
outline: 1px solid transparent;
|
|
37
38
|
transition-property: background-color, transform;
|
package/styles/Burger.layer.css
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
--burger-size-xl: 42px;
|
|
7
7
|
|
|
8
8
|
--burger-size: var(--burger-size-md);
|
|
9
|
+
--burger-line-size: calc(var(--burger-size) / 12);
|
|
9
10
|
|
|
10
11
|
width: calc(var(--burger-size) + var(--mantine-spacing-xs));
|
|
11
12
|
height: calc(var(--burger-size) + var(--mantine-spacing-xs));
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
.m_d4fb9cad::after {
|
|
32
33
|
display: block;
|
|
33
34
|
width: var(--burger-size);
|
|
34
|
-
height:
|
|
35
|
+
height: var(--burger-line-size);
|
|
35
36
|
background-color: var(--burger-color);
|
|
36
37
|
outline: 1px solid transparent;
|
|
37
38
|
transition-property: background-color, transform;
|
package/styles.css
CHANGED
|
@@ -2825,6 +2825,7 @@ fieldset:disabled .m_d3ea56bb,
|
|
|
2825
2825
|
--burger-size-xl: calc(2.625rem * var(--mantine-scale));
|
|
2826
2826
|
|
|
2827
2827
|
--burger-size: var(--burger-size-md);
|
|
2828
|
+
--burger-line-size: calc(var(--burger-size) / 12);
|
|
2828
2829
|
|
|
2829
2830
|
width: calc(var(--burger-size) + var(--mantine-spacing-xs));
|
|
2830
2831
|
height: calc(var(--burger-size) + var(--mantine-spacing-xs));
|
|
@@ -2850,7 +2851,7 @@ fieldset:disabled .m_d3ea56bb,
|
|
|
2850
2851
|
.m_d4fb9cad::after {
|
|
2851
2852
|
display: block;
|
|
2852
2853
|
width: var(--burger-size);
|
|
2853
|
-
height:
|
|
2854
|
+
height: var(--burger-line-size);
|
|
2854
2855
|
background-color: var(--burger-color);
|
|
2855
2856
|
outline: calc(0.0625rem * var(--mantine-scale)) solid transparent;
|
|
2856
2857
|
transition-property: background-color, transform;
|
package/styles.layer.css
CHANGED
|
@@ -2825,6 +2825,7 @@ fieldset:disabled .m_d3ea56bb,
|
|
|
2825
2825
|
--burger-size-xl: calc(2.625rem * var(--mantine-scale));
|
|
2826
2826
|
|
|
2827
2827
|
--burger-size: var(--burger-size-md);
|
|
2828
|
+
--burger-line-size: calc(var(--burger-size) / 12);
|
|
2828
2829
|
|
|
2829
2830
|
width: calc(var(--burger-size) + var(--mantine-spacing-xs));
|
|
2830
2831
|
height: calc(var(--burger-size) + var(--mantine-spacing-xs));
|
|
@@ -2850,7 +2851,7 @@ fieldset:disabled .m_d3ea56bb,
|
|
|
2850
2851
|
.m_d4fb9cad::after {
|
|
2851
2852
|
display: block;
|
|
2852
2853
|
width: var(--burger-size);
|
|
2853
|
-
height:
|
|
2854
|
+
height: var(--burger-line-size);
|
|
2854
2855
|
background-color: var(--burger-color);
|
|
2855
2856
|
outline: calc(0.0625rem * var(--mantine-scale)) solid transparent;
|
|
2856
2857
|
transition-property: background-color, transform;
|