@mantine/core 7.14.0 → 7.14.2-alpha.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/AngleSlider/AngleSlider.cjs +3 -1
- package/cjs/components/AngleSlider/AngleSlider.cjs.map +1 -1
- package/cjs/components/Combobox/use-combobox-target-props/use-combobox-target-props.cjs +1 -1
- package/cjs/components/Combobox/use-combobox-target-props/use-combobox-target-props.cjs.map +1 -1
- package/cjs/components/FileInput/FileInput.cjs +2 -1
- package/cjs/components/FileInput/FileInput.cjs.map +1 -1
- package/cjs/components/NavLink/NavLink.cjs +1 -1
- package/cjs/components/NavLink/NavLink.cjs.map +1 -1
- package/cjs/components/NumberInput/NumberInput.cjs +22 -6
- package/cjs/components/NumberInput/NumberInput.cjs.map +1 -1
- package/cjs/components/Popover/Popover.cjs +4 -1
- package/cjs/components/Popover/Popover.cjs.map +1 -1
- package/cjs/components/Popover/Popover.context.cjs.map +1 -1
- package/cjs/components/Popover/PopoverDropdown/PopoverDropdown.cjs +2 -0
- package/cjs/components/Popover/PopoverDropdown/PopoverDropdown.cjs.map +1 -1
- package/cjs/components/Popover/use-popover.cjs +9 -5
- package/cjs/components/Popover/use-popover.cjs.map +1 -1
- package/cjs/components/RingProgress/RingProgress.cjs +10 -6
- package/cjs/components/RingProgress/RingProgress.cjs.map +1 -1
- package/cjs/components/TagsInput/TagsInput.cjs +3 -2
- package/cjs/components/TagsInput/TagsInput.cjs.map +1 -1
- package/cjs/core/Box/style-props/style-props-data.cjs +1 -1
- package/cjs/core/Box/style-props/style-props-data.cjs.map +1 -1
- package/esm/components/AngleSlider/AngleSlider.mjs +3 -1
- package/esm/components/AngleSlider/AngleSlider.mjs.map +1 -1
- package/esm/components/Combobox/use-combobox-target-props/use-combobox-target-props.mjs +1 -1
- package/esm/components/Combobox/use-combobox-target-props/use-combobox-target-props.mjs.map +1 -1
- package/esm/components/FileInput/FileInput.mjs +2 -1
- package/esm/components/FileInput/FileInput.mjs.map +1 -1
- package/esm/components/NavLink/NavLink.mjs +1 -1
- package/esm/components/NavLink/NavLink.mjs.map +1 -1
- package/esm/components/NumberInput/NumberInput.mjs +22 -6
- package/esm/components/NumberInput/NumberInput.mjs.map +1 -1
- package/esm/components/Popover/Popover.context.mjs.map +1 -1
- package/esm/components/Popover/Popover.mjs +4 -1
- package/esm/components/Popover/Popover.mjs.map +1 -1
- package/esm/components/Popover/PopoverDropdown/PopoverDropdown.mjs +2 -0
- package/esm/components/Popover/PopoverDropdown/PopoverDropdown.mjs.map +1 -1
- package/esm/components/Popover/use-popover.mjs +9 -5
- package/esm/components/Popover/use-popover.mjs.map +1 -1
- package/esm/components/RingProgress/RingProgress.mjs +10 -6
- package/esm/components/RingProgress/RingProgress.mjs.map +1 -1
- package/esm/components/TagsInput/TagsInput.mjs +3 -2
- package/esm/components/TagsInput/TagsInput.mjs.map +1 -1
- package/esm/core/Box/style-props/style-props-data.mjs +1 -1
- package/esm/core/Box/style-props/style-props-data.mjs.map +1 -1
- package/lib/components/Combobox/use-combobox-target-props/use-combobox-target-props.d.ts +1 -1
- package/lib/components/FileInput/FileInput.d.ts +1 -0
- package/lib/components/Input/use-input-props.d.ts +4 -4
- package/lib/components/Popover/Popover.context.d.ts +1 -0
- package/lib/components/RingProgress/RingProgress.d.ts +3 -1
- package/lib/core/Box/Box.d.ts +1 -1
- package/lib/core/MantineProvider/color-functions/get-contrast-color/get-contrast-color.d.ts +2 -2
- package/lib/core/types.d.ts +3 -0
- package/package.json +2 -2
- package/styles/RingProgress.css +5 -0
- package/styles/RingProgress.layer.css +5 -0
- package/styles/baseline.css +36 -0
- package/styles/baseline.layer.css +37 -0
- package/styles/default-css-variables.css +499 -0
- package/styles/default-css-variables.layer.css +500 -0
- package/styles.css +5 -0
- package/styles.layer.css +5 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BoxProps, ElementProps, Factory, StylesApiProps } from '../../core';
|
|
2
2
|
import { __BaseInputProps, __InputStylesNames, InputVariant } from '../Input';
|
|
3
3
|
export interface FileInputProps<Multiple = false> extends BoxProps, __BaseInputProps, StylesApiProps<FileInputFactory>, ElementProps<'button', 'value' | 'defaultValue' | 'onChange' | 'placeholder'> {
|
|
4
|
+
component?: any;
|
|
4
5
|
/** Called when value changes */
|
|
5
6
|
onChange?: (payload: Multiple extends true ? File[] : File | null) => void;
|
|
6
7
|
/** Controlled component value */
|
|
@@ -8,7 +8,7 @@ interface BaseProps extends __BaseInputProps, BoxProps, StylesApiProps<{
|
|
|
8
8
|
__stylesApiProps?: Record<string, any>;
|
|
9
9
|
id?: string;
|
|
10
10
|
}
|
|
11
|
-
export declare function useInputProps<T extends BaseProps, U extends Partial<T>>(component: string, defaultProps: U, _props: T): Omit<T & { [Key in Extract<keyof T, never>]-?: {}[Key] | NonNullable<T[Key]>; }, "
|
|
11
|
+
export declare function useInputProps<T extends BaseProps, U extends Partial<T>>(component: string, defaultProps: U, _props: T): Omit<T & { [Key in Extract<keyof T, never>]-?: {}[Key] | NonNullable<T[Key]>; }, "style" | "label" | "className" | "id" | "mod" | "unstyled" | "variant" | "classNames" | "styles" | "vars" | "size" | "required" | "wrapperProps" | "description" | "error" | "withAsterisk" | "labelProps" | "descriptionProps" | "errorProps" | "inputContainer" | "inputWrapperOrder" | "__staticSelector" | "__stylesApiProps"> & {
|
|
12
12
|
classNames: Partial<Record<string, string>> | ((theme: import("../../core").MantineTheme, props: any, ctx: unknown) => Partial<Record<string, string>>) | undefined;
|
|
13
13
|
styles: Partial<Record<string, import("../../core").CSSProperties>> | ((theme: import("../../core").MantineTheme, props: any, ctx: unknown) => Partial<Record<string, import("../../core").CSSProperties>>) | undefined;
|
|
14
14
|
unstyled: boolean | undefined;
|
|
@@ -26,10 +26,10 @@ export declare function useInputProps<T extends BaseProps, U extends Partial<T>>
|
|
|
26
26
|
descriptionProps: Record<string, any> | undefined;
|
|
27
27
|
unstyled: boolean | undefined;
|
|
28
28
|
styles: Partial<Record<string, import("../../core").CSSProperties>> | ((theme: import("../../core").MantineTheme, props: any, ctx: unknown) => Partial<Record<string, import("../../core").CSSProperties>>) | undefined;
|
|
29
|
-
size:
|
|
29
|
+
size: import("../../core").MantineSize | (string & {}) | undefined;
|
|
30
30
|
style: import("../../core").MantineStyleProp;
|
|
31
31
|
inputContainer: ((children: React.ReactNode) => React.ReactNode) | undefined;
|
|
32
|
-
inputWrapperOrder: ("input" | "label" | "
|
|
32
|
+
inputWrapperOrder: ("input" | "label" | "description" | "error")[] | undefined;
|
|
33
33
|
withAsterisk: boolean | undefined;
|
|
34
34
|
variant: string | undefined;
|
|
35
35
|
id: string | 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("../../core").CSSProperties>> | ((theme: import("../../core").MantineTheme, props: any, ctx: unknown) => Partial<Record<string, import("../../core").CSSProperties>>) | undefined;
|
|
42
42
|
unstyled: boolean | undefined;
|
|
43
|
-
size:
|
|
43
|
+
size: import("../../core").MantineSize | (string & {}) | undefined;
|
|
44
44
|
__staticSelector: string | undefined;
|
|
45
45
|
__stylesApiProps: Record<string, any>;
|
|
46
46
|
error: import("react").ReactNode;
|
|
@@ -44,6 +44,7 @@ interface PopoverContext {
|
|
|
44
44
|
variant: string | undefined;
|
|
45
45
|
keepMounted: boolean | undefined;
|
|
46
46
|
getStyles: GetStylesApi<PopoverFactory>;
|
|
47
|
+
resolvedStyles: Record<string, any>;
|
|
47
48
|
floatingStrategy: FloatingStrategy | undefined;
|
|
48
49
|
}
|
|
49
50
|
export declare const PopoverContextProvider: ({ children, value }: {
|
|
@@ -6,7 +6,7 @@ interface RingProgressSection extends React.ComponentPropsWithRef<'circle'> {
|
|
|
6
6
|
}
|
|
7
7
|
export type RingProgressStylesNames = 'root' | 'svg' | 'label' | 'curve';
|
|
8
8
|
export type RingProgressCssVariables = {
|
|
9
|
-
root: '--rp-size' | '--rp-label-offset';
|
|
9
|
+
root: '--rp-size' | '--rp-label-offset' | '--rp-transition-duration';
|
|
10
10
|
};
|
|
11
11
|
export interface RingProgressProps extends BoxProps, StylesApiProps<RingProgressFactory>, ElementProps<'div'> {
|
|
12
12
|
/** Label displayed in the center of the ring */
|
|
@@ -21,6 +21,8 @@ export interface RingProgressProps extends BoxProps, StylesApiProps<RingProgress
|
|
|
21
21
|
sections: RingProgressSection[];
|
|
22
22
|
/** Color of the root section, key of theme.colors or CSS color value */
|
|
23
23
|
rootColor?: MantineColor;
|
|
24
|
+
/** Transition duration of filled section styles changes in ms, `0` by default */
|
|
25
|
+
transitionDuration?: number;
|
|
24
26
|
}
|
|
25
27
|
export type RingProgressFactory = Factory<{
|
|
26
28
|
props: RingProgressProps;
|
package/lib/core/Box/Box.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export interface BoxComponentProps extends BoxProps {
|
|
|
32
32
|
}
|
|
33
33
|
export declare const Box: (<C = "div">(props: import("../factory").PolymorphicComponentProps<C, BoxComponentProps>) => React.ReactElement) & Omit<import("react").FunctionComponent<(BoxComponentProps & {
|
|
34
34
|
component?: any;
|
|
35
|
-
} & Omit<Omit<any, "ref">, "component"
|
|
35
|
+
} & Omit<Omit<any, "ref">, keyof BoxComponentProps | "component"> & {
|
|
36
36
|
ref?: any;
|
|
37
37
|
renderRoot?: (props: any) => any;
|
|
38
38
|
}) | (BoxComponentProps & {
|
|
@@ -4,6 +4,6 @@ interface GetContrastColorInput {
|
|
|
4
4
|
theme: MantineTheme;
|
|
5
5
|
autoContrast?: boolean | undefined | null;
|
|
6
6
|
}
|
|
7
|
-
export declare function getContrastColor({ color, theme, autoContrast }: GetContrastColorInput): "var(--mantine-color-
|
|
8
|
-
export declare function getPrimaryContrastColor(theme: MantineTheme, colorScheme: 'light' | 'dark'): "var(--mantine-color-
|
|
7
|
+
export declare function getContrastColor({ color, theme, autoContrast }: GetContrastColorInput): "var(--mantine-color-white)" | "var(--mantine-color-black)";
|
|
8
|
+
export declare function getPrimaryContrastColor(theme: MantineTheme, colorScheme: 'light' | 'dark'): "var(--mantine-color-white)" | "var(--mantine-color-black)";
|
|
9
9
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mantine/core",
|
|
3
|
-
"version": "7.14.0",
|
|
3
|
+
"version": "7.14.2-alpha.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.14.0",
|
|
46
|
+
"@mantine/hooks": "7.14.2-alpha.0",
|
|
47
47
|
"react": "^18.x || ^19.x",
|
|
48
48
|
"react-dom": "^18.x || ^19.x"
|
|
49
49
|
},
|
package/styles/RingProgress.css
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
height: var(--rp-size);
|
|
5
5
|
min-width: var(--rp-size);
|
|
6
6
|
min-height: var(--rp-size);
|
|
7
|
+
--rp-transition-duration: 0ms;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
.m_d43b5134 {
|
|
@@ -16,6 +17,10 @@
|
|
|
16
17
|
|
|
17
18
|
.m_b1ca1fbf {
|
|
18
19
|
stroke: var(--curve-color, var(--rp-curve-root-color));
|
|
20
|
+
transition:
|
|
21
|
+
stroke-dashoffset var(--rp-transition-duration) ease,
|
|
22
|
+
stroke-dasharray var(--rp-transition-duration) ease,
|
|
23
|
+
stroke var(--rp-transition-duration);
|
|
19
24
|
}
|
|
20
25
|
|
|
21
26
|
[data-mantine-color-scheme='light'] .m_b1ca1fbf {
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
height: var(--rp-size);
|
|
5
5
|
min-width: var(--rp-size);
|
|
6
6
|
min-height: var(--rp-size);
|
|
7
|
+
--rp-transition-duration: 0ms;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
.m_d43b5134 {
|
|
@@ -16,6 +17,10 @@
|
|
|
16
17
|
|
|
17
18
|
.m_b1ca1fbf {
|
|
18
19
|
stroke: var(--curve-color, var(--rp-curve-root-color));
|
|
20
|
+
transition:
|
|
21
|
+
stroke-dashoffset var(--rp-transition-duration) ease,
|
|
22
|
+
stroke-dasharray var(--rp-transition-duration) ease,
|
|
23
|
+
stroke var(--rp-transition-duration);
|
|
19
24
|
}
|
|
20
25
|
|
|
21
26
|
[data-mantine-color-scheme='light'] .m_b1ca1fbf {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
*,
|
|
2
|
+
*::before,
|
|
3
|
+
*::after {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
input,
|
|
8
|
+
button,
|
|
9
|
+
textarea,
|
|
10
|
+
select {
|
|
11
|
+
font: inherit;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
button,
|
|
15
|
+
select {
|
|
16
|
+
text-transform: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
body {
|
|
20
|
+
margin: 0;
|
|
21
|
+
font-family: var(--mantine-font-family);
|
|
22
|
+
font-size: var(--mantine-font-size-md);
|
|
23
|
+
line-height: var(--mantine-line-height);
|
|
24
|
+
background-color: var(--mantine-color-body);
|
|
25
|
+
color: var(--mantine-color-text);
|
|
26
|
+
|
|
27
|
+
-webkit-font-smoothing: var(--mantine-webkit-font-smoothing);
|
|
28
|
+
-moz-osx-font-smoothing: var(--mantine-moz-font-smoothing);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@media screen and (max-device-width: 31.25em) {
|
|
32
|
+
|
|
33
|
+
body {
|
|
34
|
+
-webkit-text-size-adjust: 100%
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
@layer mantine {*,
|
|
2
|
+
*::before,
|
|
3
|
+
*::after {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
input,
|
|
8
|
+
button,
|
|
9
|
+
textarea,
|
|
10
|
+
select {
|
|
11
|
+
font: inherit;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
button,
|
|
15
|
+
select {
|
|
16
|
+
text-transform: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
body {
|
|
20
|
+
margin: 0;
|
|
21
|
+
font-family: var(--mantine-font-family);
|
|
22
|
+
font-size: var(--mantine-font-size-md);
|
|
23
|
+
line-height: var(--mantine-line-height);
|
|
24
|
+
background-color: var(--mantine-color-body);
|
|
25
|
+
color: var(--mantine-color-text);
|
|
26
|
+
|
|
27
|
+
-webkit-font-smoothing: var(--mantine-webkit-font-smoothing);
|
|
28
|
+
-moz-osx-font-smoothing: var(--mantine-moz-font-smoothing);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@media screen and (max-device-width: 31.25em) {
|
|
32
|
+
|
|
33
|
+
body {
|
|
34
|
+
-webkit-text-size-adjust: 100%
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|