@mantine/core 8.0.0-alpha.1 → 8.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/components/AppShell/AppShell.cjs.map +1 -1
- package/cjs/components/Autocomplete/Autocomplete.cjs +7 -3
- package/cjs/components/Autocomplete/Autocomplete.cjs.map +1 -1
- package/cjs/components/Checkbox/Checkbox.cjs +9 -2
- package/cjs/components/Checkbox/Checkbox.cjs.map +1 -1
- package/cjs/components/ColorInput/EyeDropperIcon.cjs +6 -2
- package/cjs/components/ColorInput/EyeDropperIcon.cjs.map +1 -1
- package/cjs/components/Flex/Flex.cjs.map +1 -1
- package/cjs/components/Input/InputDescription/InputDescription.cjs.map +1 -1
- package/cjs/components/Input/InputError/InputError.cjs.map +1 -1
- package/cjs/components/Input/InputLabel/InputLabel.cjs.map +1 -1
- package/cjs/components/Input/InputWrapper/InputWrapper.cjs.map +1 -1
- package/cjs/components/Menu/Menu.cjs +2 -0
- package/cjs/components/Menu/Menu.cjs.map +1 -1
- package/cjs/components/ModalBase/use-modal.cjs +1 -1
- package/cjs/components/ModalBase/use-modal.cjs.map +1 -1
- package/cjs/components/MultiSelect/MultiSelect.cjs +9 -6
- package/cjs/components/MultiSelect/MultiSelect.cjs.map +1 -1
- package/cjs/components/NavLink/NavLink.cjs.map +1 -1
- package/cjs/components/Notification/Notification.cjs +4 -2
- package/cjs/components/Notification/Notification.cjs.map +1 -1
- package/cjs/components/Pagination/Pagination.cjs.map +1 -1
- package/cjs/components/Pill/Pill.cjs.map +1 -1
- package/cjs/components/PillsInput/PillsInput.cjs.map +1 -1
- package/cjs/components/ScrollArea/ScrollArea.cjs +26 -3
- package/cjs/components/ScrollArea/ScrollArea.cjs.map +1 -1
- package/cjs/components/SegmentedControl/SegmentedControl.cjs +6 -1
- package/cjs/components/SegmentedControl/SegmentedControl.cjs.map +1 -1
- package/cjs/components/Select/Select.cjs +11 -7
- package/cjs/components/Select/Select.cjs.map +1 -1
- package/cjs/components/Slider/RangeSlider/RangeSlider.cjs +91 -74
- package/cjs/components/Slider/RangeSlider/RangeSlider.cjs.map +1 -1
- package/cjs/components/Slider/Slider/Slider.cjs +32 -22
- package/cjs/components/Slider/Slider/Slider.cjs.map +1 -1
- package/cjs/components/Table/TableScrollContainer.cjs +11 -7
- package/cjs/components/Table/TableScrollContainer.cjs.map +1 -1
- package/cjs/components/TagsInput/TagsInput.cjs +10 -7
- package/cjs/components/TagsInput/TagsInput.cjs.map +1 -1
- package/cjs/components/Text/Text.cjs.map +1 -1
- package/cjs/components/Title/Title.cjs.map +1 -1
- package/cjs/components/Tooltip/Tooltip.cjs +2 -2
- package/cjs/components/Tooltip/Tooltip.cjs.map +1 -1
- package/cjs/components/Transition/get-transition-styles/get-transition-styles.cjs +2 -0
- package/cjs/components/Transition/get-transition-styles/get-transition-styles.cjs.map +1 -1
- package/esm/components/AppShell/AppShell.mjs.map +1 -1
- package/esm/components/Autocomplete/Autocomplete.mjs +7 -3
- package/esm/components/Autocomplete/Autocomplete.mjs.map +1 -1
- package/esm/components/Checkbox/Checkbox.mjs +9 -2
- package/esm/components/Checkbox/Checkbox.mjs.map +1 -1
- package/esm/components/ColorInput/EyeDropperIcon.mjs +6 -2
- package/esm/components/ColorInput/EyeDropperIcon.mjs.map +1 -1
- package/esm/components/Flex/Flex.mjs.map +1 -1
- package/esm/components/Input/InputDescription/InputDescription.mjs.map +1 -1
- package/esm/components/Input/InputError/InputError.mjs.map +1 -1
- package/esm/components/Input/InputLabel/InputLabel.mjs.map +1 -1
- package/esm/components/Input/InputWrapper/InputWrapper.mjs.map +1 -1
- package/esm/components/Menu/Menu.mjs +2 -0
- package/esm/components/Menu/Menu.mjs.map +1 -1
- package/esm/components/ModalBase/use-modal.mjs +1 -1
- package/esm/components/ModalBase/use-modal.mjs.map +1 -1
- package/esm/components/MultiSelect/MultiSelect.mjs +9 -6
- package/esm/components/MultiSelect/MultiSelect.mjs.map +1 -1
- package/esm/components/NavLink/NavLink.mjs.map +1 -1
- package/esm/components/Notification/Notification.mjs +4 -2
- package/esm/components/Notification/Notification.mjs.map +1 -1
- package/esm/components/Pagination/Pagination.mjs.map +1 -1
- package/esm/components/Pill/Pill.mjs.map +1 -1
- package/esm/components/PillsInput/PillsInput.mjs.map +1 -1
- package/esm/components/ScrollArea/ScrollArea.mjs +27 -4
- package/esm/components/ScrollArea/ScrollArea.mjs.map +1 -1
- package/esm/components/SegmentedControl/SegmentedControl.mjs +7 -2
- package/esm/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
- package/esm/components/Select/Select.mjs +11 -7
- package/esm/components/Select/Select.mjs.map +1 -1
- package/esm/components/Slider/RangeSlider/RangeSlider.mjs +92 -75
- package/esm/components/Slider/RangeSlider/RangeSlider.mjs.map +1 -1
- package/esm/components/Slider/Slider/Slider.mjs +33 -23
- package/esm/components/Slider/Slider/Slider.mjs.map +1 -1
- package/esm/components/Table/TableScrollContainer.mjs +11 -7
- package/esm/components/Table/TableScrollContainer.mjs.map +1 -1
- package/esm/components/TagsInput/TagsInput.mjs +10 -7
- package/esm/components/TagsInput/TagsInput.mjs.map +1 -1
- package/esm/components/Text/Text.mjs.map +1 -1
- package/esm/components/Title/Title.mjs.map +1 -1
- package/esm/components/Tooltip/Tooltip.mjs +2 -2
- package/esm/components/Tooltip/Tooltip.mjs.map +1 -1
- package/esm/components/Transition/get-transition-styles/get-transition-styles.mjs +2 -0
- package/esm/components/Transition/get-transition-styles/get-transition-styles.mjs.map +1 -1
- package/lib/components/AppShell/AppShell.d.ts +1 -1
- package/lib/components/Flex/Flex.d.ts +4 -4
- package/lib/components/Input/InputDescription/InputDescription.d.ts +2 -2
- package/lib/components/Input/InputError/InputError.d.ts +2 -2
- package/lib/components/Input/InputLabel/InputLabel.d.ts +2 -2
- package/lib/components/Input/InputWrapper/InputWrapper.d.ts +2 -2
- package/lib/components/Input/use-input-props.d.ts +22 -22
- package/lib/components/Menu/Menu.d.ts +1 -0
- package/lib/components/NavLink/NavLink.d.ts +2 -2
- package/lib/components/Notification/Notification.d.ts +3 -0
- package/lib/components/Pagination/Pagination.d.ts +2 -2
- package/lib/components/Pill/Pill.d.ts +2 -1
- package/lib/components/PillsInput/PillsInput.d.ts +0 -1
- package/lib/components/ScrollArea/ScrollArea.d.ts +1 -1
- package/lib/components/Table/TableScrollContainer.d.ts +3 -1
- package/lib/components/Text/Text.d.ts +2 -2
- package/lib/components/Title/Title.d.ts +2 -2
- package/lib/core/MantineProvider/theme.types.d.ts +30 -12
- package/lib/core/MantineProvider/use-mantine-color-scheme/use-computed-color-scheme.d.ts +1 -1
- package/package.json +2 -2
- package/styles/AppShell.css +2 -0
- package/styles/AppShell.layer.css +2 -0
- package/styles/Input.css +0 -8
- package/styles/Input.layer.css +0 -8
- package/styles/Notification.css +0 -4
- package/styles/Notification.layer.css +0 -4
- package/styles/Paper.css +8 -4
- package/styles/Paper.layer.css +8 -4
- package/styles/ScrollArea.css +33 -8
- package/styles/ScrollArea.layer.css +33 -8
- package/styles/Table.css +11 -1
- package/styles/Table.layer.css +11 -1
- package/styles/TypographyStylesProvider.css +1 -0
- package/styles/TypographyStylesProvider.layer.css +1 -0
- package/styles.css +54 -24
- package/styles.layer.css +54 -24
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BoxProps, ElementProps, Factory,
|
|
1
|
+
import { BoxProps, ElementProps, Factory, MantineFontSize, StylesApiProps } from '../../../core';
|
|
2
2
|
export type InputDescriptionStylesNames = 'description';
|
|
3
3
|
export type InputDescriptionCssVariables = {
|
|
4
4
|
description: '--input-description-size';
|
|
@@ -7,7 +7,7 @@ export interface InputDescriptionProps extends BoxProps, StylesApiProps<InputDes
|
|
|
7
7
|
__staticSelector?: string;
|
|
8
8
|
__inheritStyles?: boolean;
|
|
9
9
|
/** Controls description `font-size`, `'sm'` by default */
|
|
10
|
-
size?:
|
|
10
|
+
size?: MantineFontSize;
|
|
11
11
|
}
|
|
12
12
|
export type InputDescriptionFactory = Factory<{
|
|
13
13
|
props: InputDescriptionProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BoxProps, ElementProps, Factory,
|
|
1
|
+
import { BoxProps, ElementProps, Factory, MantineFontSize, StylesApiProps } from '../../../core';
|
|
2
2
|
export type InputErrorStylesNames = 'error';
|
|
3
3
|
export type InputErrorCssVariables = {
|
|
4
4
|
error: '--input-error-size';
|
|
@@ -7,7 +7,7 @@ export interface InputErrorProps extends BoxProps, StylesApiProps<InputErrorFact
|
|
|
7
7
|
__staticSelector?: string;
|
|
8
8
|
__inheritStyles?: boolean;
|
|
9
9
|
/** Controls error `font-size`, `'sm'` by default */
|
|
10
|
-
size?:
|
|
10
|
+
size?: MantineFontSize;
|
|
11
11
|
}
|
|
12
12
|
export type InputErrorFactory = Factory<{
|
|
13
13
|
props: InputErrorProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BoxProps, ElementProps, Factory,
|
|
1
|
+
import { BoxProps, ElementProps, Factory, MantineFontSize, StylesApiProps } from '../../../core';
|
|
2
2
|
export type InputLabelStylesNames = 'label' | 'required';
|
|
3
3
|
export type InputLabelCssVariables = {
|
|
4
4
|
label: '--input-asterisk-color' | '--input-label-size';
|
|
@@ -8,7 +8,7 @@ export interface InputLabelProps extends BoxProps, StylesApiProps<InputLabelFact
|
|
|
8
8
|
/** Determines whether the required asterisk should be displayed */
|
|
9
9
|
required?: boolean;
|
|
10
10
|
/** Controls label `font-size`, `'sm'` by default */
|
|
11
|
-
size?:
|
|
11
|
+
size?: MantineFontSize;
|
|
12
12
|
/** Root element of the label, `'label'` by default */
|
|
13
13
|
labelElement?: 'label' | 'div';
|
|
14
14
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BoxProps, ElementProps, Factory,
|
|
1
|
+
import { BoxProps, ElementProps, Factory, MantineFontSize, StylesApiProps } from '../../../core';
|
|
2
2
|
import { InputDescriptionCssVariables, InputDescriptionStylesNames } from '../InputDescription/InputDescription';
|
|
3
3
|
import { InputErrorCssVariables, InputErrorStylesNames } from '../InputError/InputError';
|
|
4
4
|
import { InputLabelCssVariables, InputLabelStylesNames } from '../InputLabel/InputLabel';
|
|
@@ -33,7 +33,7 @@ export interface InputWrapperProps extends __InputWrapperProps, BoxProps, Styles
|
|
|
33
33
|
/** Static id used as base to generate `aria-` attributes, by default generates random id */
|
|
34
34
|
id?: string;
|
|
35
35
|
/** Controls size of `Input.Label`, `Input.Description` and `Input.Error` components */
|
|
36
|
-
size?:
|
|
36
|
+
size?: MantineFontSize;
|
|
37
37
|
/** `Input.Label` root element, `'label'` by default */
|
|
38
38
|
labelElement?: 'label' | 'div';
|
|
39
39
|
}
|
|
@@ -8,19 +8,18 @@ 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]>; }, "variant" | "style" | "size" | "label" | "required" | "className" | "id" | "description" | "error" | "__staticSelector" | "__stylesApiProps" | "withAsterisk" | "labelProps" | "descriptionProps" | "errorProps" | "inputContainer" | "inputWrapperOrder" | "mod" | "unstyled" | "classNames" | "styles" | "vars" | "wrapperProps"> & {
|
|
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;
|
|
15
15
|
wrapperProps: {
|
|
16
|
-
hidden?: boolean | undefined;
|
|
17
16
|
color?: string | undefined;
|
|
18
|
-
|
|
17
|
+
children?: import("react").ReactNode | undefined;
|
|
19
18
|
style: import("react").CSSProperties | ((theme: import("../../core").MantineTheme) => import("../../core").CSSProperties) | import("../../core").MantineStyleProp[] | undefined;
|
|
20
|
-
translate?: "yes" | "no" | undefined;
|
|
21
19
|
slot?: string | undefined;
|
|
22
20
|
title?: string | undefined;
|
|
23
21
|
key?: import("react").Key | null | undefined;
|
|
22
|
+
onChange?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
24
23
|
defaultChecked?: boolean | undefined;
|
|
25
24
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
26
25
|
suppressContentEditableWarning?: boolean | undefined;
|
|
@@ -29,19 +28,22 @@ export declare function useInputProps<T extends BaseProps, U extends Partial<T>>
|
|
|
29
28
|
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
|
|
30
29
|
autoFocus?: boolean | undefined;
|
|
31
30
|
className: string | undefined;
|
|
32
|
-
contentEditable?: (boolean | "
|
|
31
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
33
32
|
contextMenu?: string | undefined;
|
|
34
33
|
dir?: string | undefined;
|
|
35
|
-
draggable?: (boolean | "
|
|
34
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
36
35
|
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
36
|
+
hidden?: boolean | undefined;
|
|
37
37
|
id: string | undefined;
|
|
38
38
|
lang?: string | undefined;
|
|
39
39
|
nonce?: string | undefined;
|
|
40
|
-
spellCheck?: (boolean | "
|
|
40
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
41
41
|
tabIndex?: number | undefined;
|
|
42
|
+
translate?: "yes" | "no" | undefined;
|
|
42
43
|
radioGroup?: string | undefined;
|
|
43
44
|
role?: import("react").AriaRole | undefined;
|
|
44
45
|
about?: string | undefined;
|
|
46
|
+
content?: string | undefined;
|
|
45
47
|
datatype?: string | undefined;
|
|
46
48
|
inlist?: any;
|
|
47
49
|
prefix?: string | undefined;
|
|
@@ -68,11 +70,11 @@ export declare function useInputProps<T extends BaseProps, U extends Partial<T>>
|
|
|
68
70
|
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
69
71
|
is?: string | undefined;
|
|
70
72
|
"aria-activedescendant"?: string | undefined;
|
|
71
|
-
"aria-atomic"?: (boolean | "
|
|
73
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
72
74
|
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
73
75
|
"aria-braillelabel"?: string | undefined;
|
|
74
76
|
"aria-brailleroledescription"?: string | undefined;
|
|
75
|
-
"aria-busy"?: (boolean | "
|
|
77
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
76
78
|
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
77
79
|
"aria-colcount"?: number | undefined;
|
|
78
80
|
"aria-colindex"?: number | undefined;
|
|
@@ -83,44 +85,43 @@ export declare function useInputProps<T extends BaseProps, U extends Partial<T>>
|
|
|
83
85
|
"aria-describedby"?: string | undefined;
|
|
84
86
|
"aria-description"?: string | undefined;
|
|
85
87
|
"aria-details"?: string | undefined;
|
|
86
|
-
"aria-disabled"?: (boolean | "
|
|
88
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
87
89
|
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
|
88
90
|
"aria-errormessage"?: string | undefined;
|
|
89
|
-
"aria-expanded"?: (boolean | "
|
|
91
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
90
92
|
"aria-flowto"?: string | undefined;
|
|
91
|
-
"aria-grabbed"?: (boolean | "
|
|
93
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
92
94
|
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
|
93
|
-
"aria-hidden"?: (boolean | "
|
|
95
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
94
96
|
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
95
97
|
"aria-keyshortcuts"?: string | undefined;
|
|
96
98
|
"aria-label"?: string | undefined;
|
|
97
99
|
"aria-labelledby"?: string | undefined;
|
|
98
100
|
"aria-level"?: number | undefined;
|
|
99
101
|
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
100
|
-
"aria-modal"?: (boolean | "
|
|
101
|
-
"aria-multiline"?: (boolean | "
|
|
102
|
-
"aria-multiselectable"?: (boolean | "
|
|
102
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
103
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
104
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
103
105
|
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
104
106
|
"aria-owns"?: string | undefined;
|
|
105
107
|
"aria-placeholder"?: string | undefined;
|
|
106
108
|
"aria-posinset"?: number | undefined;
|
|
107
109
|
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
108
|
-
"aria-readonly"?: (boolean | "
|
|
110
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
109
111
|
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
|
|
110
|
-
"aria-required"?: (boolean | "
|
|
112
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
111
113
|
"aria-roledescription"?: string | undefined;
|
|
112
114
|
"aria-rowcount"?: number | undefined;
|
|
113
115
|
"aria-rowindex"?: number | undefined;
|
|
114
116
|
"aria-rowindextext"?: string | undefined;
|
|
115
117
|
"aria-rowspan"?: number | undefined;
|
|
116
|
-
"aria-selected"?: (boolean | "
|
|
118
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
117
119
|
"aria-setsize"?: number | undefined;
|
|
118
120
|
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
119
121
|
"aria-valuemax"?: number | undefined;
|
|
120
122
|
"aria-valuemin"?: number | undefined;
|
|
121
123
|
"aria-valuenow"?: number | undefined;
|
|
122
124
|
"aria-valuetext"?: string | undefined;
|
|
123
|
-
children?: import("react").ReactNode | undefined;
|
|
124
125
|
dangerouslySetInnerHTML?: {
|
|
125
126
|
__html: string | TrustedHTML;
|
|
126
127
|
} | undefined;
|
|
@@ -140,7 +141,6 @@ export declare function useInputProps<T extends BaseProps, U extends Partial<T>>
|
|
|
140
141
|
onFocusCapture?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
141
142
|
onBlur?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
142
143
|
onBlurCapture?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
143
|
-
onChange?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
144
144
|
onChangeCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
145
145
|
onBeforeInput?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
146
146
|
onBeforeInputCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
@@ -306,7 +306,7 @@ export declare function useInputProps<T extends BaseProps, U extends Partial<T>>
|
|
|
306
306
|
styles: Partial<Record<string, import("../../core").CSSProperties>> | ((theme: import("../../core").MantineTheme, props: any, ctx: unknown) => Partial<Record<string, import("../../core").CSSProperties>>) | undefined;
|
|
307
307
|
size: (string & {}) | import("../../core").MantineSize | undefined;
|
|
308
308
|
inputContainer: ((children: React.ReactNode) => React.ReactNode) | undefined;
|
|
309
|
-
inputWrapperOrder: ("input" | "label" | "
|
|
309
|
+
inputWrapperOrder: ("input" | "label" | "description" | "error")[] | undefined;
|
|
310
310
|
withAsterisk: boolean | undefined;
|
|
311
311
|
variant: string | undefined;
|
|
312
312
|
mod: import("../../core").BoxMod | undefined;
|
|
@@ -51,6 +51,7 @@ export declare namespace Menu {
|
|
|
51
51
|
props: MenuProps;
|
|
52
52
|
stylesNames: MenuStylesNames;
|
|
53
53
|
}>;
|
|
54
|
+
var withProps: (props: Partial<MenuProps>) => MenuProps;
|
|
54
55
|
var classes: Record<string, string>;
|
|
55
56
|
var displayName: string;
|
|
56
57
|
var Item: (<C = "button">(props: import("../../core").PolymorphicComponentProps<C, import("./MenuItem/MenuItem").MenuItemProps>) => React.ReactElement) & Omit<import("react").FunctionComponent<(import("./MenuItem/MenuItem").MenuItemProps & {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BoxProps, MantineColor,
|
|
1
|
+
import { BoxProps, MantineColor, MantineSpacing, PolymorphicFactory, StylesApiProps } from '../../core';
|
|
2
2
|
export type NavLinkStylesNames = 'root' | 'section' | 'body' | 'label' | 'description' | 'chevron' | 'collapse' | 'children';
|
|
3
3
|
export type NavLinkVariant = 'filled' | 'light' | 'subtle';
|
|
4
4
|
export type NavLinkCssVariables = {
|
|
@@ -31,7 +31,7 @@ export interface NavLinkProps extends BoxProps, StylesApiProps<NavLinkFactory> {
|
|
|
31
31
|
/** If set, right section will not be rotated when collapse is opened, `false` by default */
|
|
32
32
|
disableRightSectionRotation?: boolean;
|
|
33
33
|
/** Key of `theme.spacing` or any valid CSS value to set collapsed links `padding-left`, `'lg'` by default */
|
|
34
|
-
childrenOffset?:
|
|
34
|
+
childrenOffset?: MantineSpacing;
|
|
35
35
|
/** If set, disabled styles will be added to the root element, `false` by default */
|
|
36
36
|
disabled?: boolean;
|
|
37
37
|
/** Called when the link is clicked */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BoxProps, ElementProps, Factory, MantineColor, MantineRadius, StylesApiProps } from '../../core';
|
|
2
|
+
import { LoaderProps } from '../Loader';
|
|
2
3
|
export type NotificationStylesNames = 'root' | 'icon' | 'loader' | 'body' | 'title' | 'description' | 'closeButton';
|
|
3
4
|
export type NotificationCssVariables = {
|
|
4
5
|
root: '--notification-radius' | '--notification-color';
|
|
@@ -25,6 +26,8 @@ export interface NotificationProps extends BoxProps, StylesApiProps<Notification
|
|
|
25
26
|
withCloseButton?: boolean;
|
|
26
27
|
/** Props passed down to the close button */
|
|
27
28
|
closeButtonProps?: Record<string, any>;
|
|
29
|
+
/** Props passed down to `Loader` component */
|
|
30
|
+
loaderProps?: LoaderProps;
|
|
28
31
|
}
|
|
29
32
|
export type NotificationFactory = Factory<{
|
|
30
33
|
props: NotificationProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Factory,
|
|
1
|
+
import { Factory, MantineSpacing } from '../../core';
|
|
2
2
|
import { PaginationIcon } from './Pagination.icons';
|
|
3
3
|
import { PaginationControl } from './PaginationControl/PaginationControl';
|
|
4
4
|
import { PaginationDots } from './PaginationDots/PaginationDots';
|
|
@@ -25,7 +25,7 @@ export interface PaginationProps extends PaginationRootProps {
|
|
|
25
25
|
/** Dots icon component */
|
|
26
26
|
dotsIcon?: PaginationIcon;
|
|
27
27
|
/** Key of `theme.spacing`, gap between controls, `8` by default */
|
|
28
|
-
gap?:
|
|
28
|
+
gap?: MantineSpacing;
|
|
29
29
|
/** Determines whether the pagination should be hidden when only one page is available (`total={1}`), `false` by default */
|
|
30
30
|
hideWithOnePage?: boolean;
|
|
31
31
|
/** Determines whether pages controls should be displayed, `true` by default */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BoxProps, ElementProps, Factory, MantineRadius, MantineSize, StylesApiProps } from '../../core';
|
|
2
|
+
import { CloseButtonProps } from '../CloseButton';
|
|
2
3
|
import { PillGroup } from './PillGroup/PillGroup';
|
|
3
4
|
export type PillStylesNames = 'root' | 'label' | 'remove';
|
|
4
5
|
export type PillVariant = 'default' | 'contrast';
|
|
@@ -13,7 +14,7 @@ export interface PillProps extends BoxProps, StylesApiProps<PillFactory>, Elemen
|
|
|
13
14
|
/** Called when the remove button is clicked */
|
|
14
15
|
onRemove?: () => void;
|
|
15
16
|
/** Props passed down to the remove button */
|
|
16
|
-
removeButtonProps?: React.ComponentPropsWithoutRef<'button'>;
|
|
17
|
+
removeButtonProps?: CloseButtonProps & React.ComponentPropsWithoutRef<'button'>;
|
|
17
18
|
/** Key of `theme.radius` or any valid CSS value to set border-radius. Numbers are converted to rem. `'xl'` by default. */
|
|
18
19
|
radius?: MantineRadius;
|
|
19
20
|
/** If pill is disabled it has higher contrast to be visible on the disabled input background and the remove button is hidden */
|
|
@@ -4,7 +4,6 @@ import { PillsInputField } from './PillsInputField/PillsInputField';
|
|
|
4
4
|
export interface PillsInputProps extends BoxProps, __BaseInputProps, StylesApiProps<PillsInputFactory>, ElementProps<'div', 'size'> {
|
|
5
5
|
__stylesApiProps?: Record<string, any>;
|
|
6
6
|
__staticSelector?: string;
|
|
7
|
-
multiline?: boolean;
|
|
8
7
|
}
|
|
9
8
|
export type PillsInputFactory = Factory<{
|
|
10
9
|
props: PillsInputProps;
|
|
@@ -20,7 +20,7 @@ export interface ScrollAreaProps extends BoxProps, StylesApiProps<ScrollAreaFact
|
|
|
20
20
|
/** Axis at which scrollbars must be rendered, `'xy'` by default */
|
|
21
21
|
scrollbars?: 'x' | 'y' | 'xy' | false;
|
|
22
22
|
/** Determines whether scrollbars should be offset with padding on given axis, `false` by default */
|
|
23
|
-
offsetScrollbars?: boolean | 'x' | 'y';
|
|
23
|
+
offsetScrollbars?: boolean | 'x' | 'y' | 'present';
|
|
24
24
|
/** Assigns viewport element (scrollable container) ref */
|
|
25
25
|
viewportRef?: React.ForwardedRef<HTMLDivElement>;
|
|
26
26
|
/** Props passed down to the viewport element */
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { BoxProps, ElementProps, Factory, StylesApiProps } from '../../core';
|
|
2
2
|
export type TableScrollContainerStylesNames = 'scrollContainer' | 'scrollContainerInner';
|
|
3
3
|
export type TableScrollContainerCssVariables = {
|
|
4
|
-
scrollContainer: '--table-min-width' | '--table-overflow';
|
|
4
|
+
scrollContainer: '--table-min-width' | '--table-max-height' | '--table-overflow';
|
|
5
5
|
};
|
|
6
6
|
export interface TableScrollContainerProps extends BoxProps, StylesApiProps<TableScrollContainerFactory>, ElementProps<'div'> {
|
|
7
7
|
/** `min-width` of the `Table` at which it should become scrollable */
|
|
8
8
|
minWidth: React.CSSProperties['minWidth'];
|
|
9
|
+
/** `max-height` of the `Table` at which it should become scrollable */
|
|
10
|
+
maxHeight?: React.CSSProperties['maxHeight'];
|
|
9
11
|
/** Type of the scroll container, `native` to use native scrollbars, `scrollarea` to use `ScrollArea` component, `scrollarea` by default */
|
|
10
12
|
type?: 'native' | 'scrollarea';
|
|
11
13
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BoxProps, MantineColor, MantineGradient,
|
|
1
|
+
import { BoxProps, MantineColor, MantineFontSize, MantineGradient, MantineLineHeight, PolymorphicFactory, StylesApiProps } from '../../core';
|
|
2
2
|
type TextTruncate = 'end' | 'start' | boolean;
|
|
3
3
|
export type TextStylesNames = 'root';
|
|
4
4
|
export type TextVariant = 'text' | 'gradient';
|
|
@@ -8,7 +8,7 @@ export type TextCssVariables = {
|
|
|
8
8
|
export interface TextProps extends BoxProps, StylesApiProps<TextFactory> {
|
|
9
9
|
__staticSelector?: string;
|
|
10
10
|
/** Controls `font-size` and `line-height`, `'md'` by default */
|
|
11
|
-
size?:
|
|
11
|
+
size?: MantineFontSize & MantineLineHeight;
|
|
12
12
|
/** Number of lines after which Text will be truncated */
|
|
13
13
|
lineClamp?: number;
|
|
14
14
|
/** Side on which Text must be truncated, if `true`, text is truncated from the start */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BoxProps, ElementProps, Factory,
|
|
1
|
+
import { BoxProps, ElementProps, Factory, MantineFontSize, StylesApiProps } from '../../core';
|
|
2
2
|
export type TitleOrder = 1 | 2 | 3 | 4 | 5 | 6;
|
|
3
|
-
export type TitleSize = `h${TitleOrder}` | React.CSSProperties['fontSize'] |
|
|
3
|
+
export type TitleSize = `h${TitleOrder}` | React.CSSProperties['fontSize'] | MantineFontSize;
|
|
4
4
|
export type TitleStylesNames = 'root';
|
|
5
5
|
export type TitleCssVariables = {
|
|
6
6
|
root: '--title-fw' | '--title-lh' | '--title-fz' | '--title-line-clamp' | '--title-text-wrap';
|
|
@@ -119,18 +119,35 @@ export interface HeadingStyle {
|
|
|
119
119
|
lineHeight: string;
|
|
120
120
|
}
|
|
121
121
|
export type MantineSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
122
|
-
export type
|
|
123
|
-
export
|
|
124
|
-
|
|
125
|
-
export type
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
export type
|
|
129
|
-
export type MantineFontSize =
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
export type
|
|
133
|
-
|
|
122
|
+
export type DefaultMantineSize = MantineSize;
|
|
123
|
+
export interface MantineThemeSizesOverride {
|
|
124
|
+
}
|
|
125
|
+
export type MantineBreakpoint = (MantineThemeSizesOverride extends {
|
|
126
|
+
breakpoints: Record<infer CustomBreakpoints, string>;
|
|
127
|
+
} ? CustomBreakpoints : MantineSize) | (string & {});
|
|
128
|
+
export type MantineBreakpointsValues = Record<MantineBreakpoint, string>;
|
|
129
|
+
export type MantineFontSize = (MantineThemeSizesOverride extends {
|
|
130
|
+
fontSizes: Record<infer CustomFontSizes, string>;
|
|
131
|
+
} ? CustomFontSizes : MantineSize) | (string & {});
|
|
132
|
+
export type MantineFontSizesValues = Record<MantineFontSize, string>;
|
|
133
|
+
type _MantineRadius = (MantineThemeSizesOverride extends {
|
|
134
|
+
radius: Record<infer CustomRadius, string>;
|
|
135
|
+
} ? CustomRadius : MantineSize) | (string & {});
|
|
136
|
+
export type MantineRadius = _MantineRadius | number;
|
|
137
|
+
export type MantineRadiusValues = Record<_MantineRadius, string>;
|
|
138
|
+
type _MantineSpacing = (MantineThemeSizesOverride extends {
|
|
139
|
+
spacing: Record<infer CustomSpacing, string>;
|
|
140
|
+
} ? CustomSpacing : MantineSize) | (string & {});
|
|
141
|
+
export type MantineSpacing = _MantineSpacing | number;
|
|
142
|
+
export type MantineSpacingValues = Record<MantineSpacing, string>;
|
|
143
|
+
export type MantineShadow = (MantineThemeSizesOverride extends {
|
|
144
|
+
shadows: Record<infer CustomShadow, string>;
|
|
145
|
+
} ? CustomShadow : MantineSize) | (string & {});
|
|
146
|
+
export type MantineShadowsValues = Record<MantineShadow, string>;
|
|
147
|
+
export type MantineLineHeight = (MantineThemeSizesOverride extends {
|
|
148
|
+
lineHeights: Record<infer CustomLineHeight, string>;
|
|
149
|
+
} ? CustomLineHeight : MantineSize) | (string & {});
|
|
150
|
+
export type MantineLineHeightValues = Record<MantineLineHeight, string>;
|
|
134
151
|
export interface MantineThemeOther {
|
|
135
152
|
[key: string]: any;
|
|
136
153
|
}
|
|
@@ -164,3 +181,4 @@ export type MantineThemeColors = MantineThemeColorsOverride extends {
|
|
|
164
181
|
colors: Record<infer CustomColors, MantineColorsTuple>;
|
|
165
182
|
} ? Record<CustomColors, MantineColorsTuple> : Record<DefaultMantineColor, MantineColorsTuple>;
|
|
166
183
|
export type MantineColor = keyof MantineThemeColors;
|
|
184
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { UseMediaQueryOptions } from '@mantine/hooks';
|
|
2
|
-
export declare function useComputedColorScheme(defaultValue?: 'light' | 'dark', options?: UseMediaQueryOptions): "
|
|
2
|
+
export declare function useComputedColorScheme(defaultValue?: 'light' | 'dark', options?: UseMediaQueryOptions): "dark" | "light";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mantine/core",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.3",
|
|
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": "8.0.0-alpha.
|
|
46
|
+
"@mantine/hooks": "8.0.0-alpha.3",
|
|
47
47
|
"react": "^18.x || ^19.x",
|
|
48
48
|
"react-dom": "^18.x || ^19.x"
|
|
49
49
|
},
|
package/styles/AppShell.css
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
.m_89ab340[data-disabled] {
|
|
5
5
|
--app-shell-header-offset: 0rem !important;
|
|
6
6
|
--app-shell-navbar-offset: 0rem !important;
|
|
7
|
+
--app-shell-aside-offset: 0rem !important;
|
|
8
|
+
--app-shell-footer-offset: 0rem !important;
|
|
7
9
|
}
|
|
8
10
|
[data-mantine-color-scheme='light'] .m_89ab340 {
|
|
9
11
|
--app-shell-border-color: var(--mantine-color-gray-3);
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
.m_89ab340[data-disabled] {
|
|
5
5
|
--app-shell-header-offset: 0rem !important;
|
|
6
6
|
--app-shell-navbar-offset: 0rem !important;
|
|
7
|
+
--app-shell-aside-offset: 0rem !important;
|
|
8
|
+
--app-shell-footer-offset: 0rem !important;
|
|
7
9
|
}
|
|
8
10
|
[data-mantine-color-scheme='light'] .m_89ab340 {
|
|
9
11
|
--app-shell-border-color: var(--mantine-color-gray-3);
|
package/styles/Input.css
CHANGED
|
@@ -222,14 +222,6 @@
|
|
|
222
222
|
color: var(--input-disabled-color);
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
/* Fixes odd Firefox behavior in Select – https://github.com/mantinedev/mantine/issues/7476 */
|
|
226
|
-
|
|
227
|
-
@supports (-moz-appearance: none) {
|
|
228
|
-
.m_8fb7ebe7[readonly][aria-haspopup] {
|
|
229
|
-
pointer-events: none;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
225
|
.m_82577fc2 {
|
|
234
226
|
pointer-events: var(--section-pointer-events);
|
|
235
227
|
position: absolute;
|
package/styles/Input.layer.css
CHANGED
|
@@ -222,14 +222,6 @@
|
|
|
222
222
|
color: var(--input-disabled-color);
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
/* Fixes odd Firefox behavior in Select – https://github.com/mantinedev/mantine/issues/7476 */
|
|
226
|
-
|
|
227
|
-
@supports (-moz-appearance: none) {
|
|
228
|
-
.m_8fb7ebe7[readonly][aria-haspopup] {
|
|
229
|
-
pointer-events: none;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
225
|
.m_82577fc2 {
|
|
234
226
|
pointer-events: var(--section-pointer-events);
|
|
235
227
|
position: absolute;
|
package/styles/Notification.css
CHANGED
package/styles/Paper.css
CHANGED
|
@@ -11,10 +11,14 @@
|
|
|
11
11
|
background-color: var(--mantine-color-body);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
[data-mantine-color-scheme='light'] .m_1b7284a3 {
|
|
15
|
+
--paper-border-color: var(--mantine-color-gray-3);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
[data-mantine-color-scheme='dark'] .m_1b7284a3 {
|
|
19
|
+
--paper-border-color: var(--mantine-color-dark-4);
|
|
20
20
|
}
|
|
21
|
+
|
|
22
|
+
.m_1b7284a3:where([data-with-border]) {
|
|
23
|
+
border: calc(0.0625rem * var(--mantine-scale)) solid var(--paper-border-color);
|
|
24
|
+
}
|
package/styles/Paper.layer.css
CHANGED
|
@@ -11,11 +11,15 @@
|
|
|
11
11
|
background-color: var(--mantine-color-body);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
[data-mantine-color-scheme='light'] .m_1b7284a3 {
|
|
15
|
+
--paper-border-color: var(--mantine-color-gray-3);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
[data-mantine-color-scheme='dark'] .m_1b7284a3 {
|
|
19
|
+
--paper-border-color: var(--mantine-color-dark-4);
|
|
20
20
|
}
|
|
21
|
+
|
|
22
|
+
.m_1b7284a3:where([data-with-border]) {
|
|
23
|
+
border: calc(0.0625rem * var(--mantine-scale)) solid var(--paper-border-color);
|
|
24
|
+
}
|
|
21
25
|
}
|
package/styles/ScrollArea.css
CHANGED
|
@@ -18,14 +18,39 @@
|
|
|
18
18
|
display: none;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.m_c0783ff9:where([data-scrollbars='xy'], [data-scrollbars='y']):where(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
.m_c0783ff9:where([data-scrollbars='xy'], [data-scrollbars='y']):where(
|
|
22
|
+
[data-offset-scrollbars='xy'],
|
|
23
|
+
[data-offset-scrollbars='y'],
|
|
24
|
+
[data-offset-scrollbars='present']
|
|
25
|
+
):where([data-vertical-hidden]) {
|
|
26
|
+
padding-inline-end: 0;
|
|
27
|
+
padding-inline-start: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.m_c0783ff9:where([data-scrollbars='xy'], [data-scrollbars='y']):where(
|
|
31
|
+
[data-offset-scrollbars='xy'],
|
|
32
|
+
[data-offset-scrollbars='y'],
|
|
33
|
+
[data-offset-scrollbars='present']
|
|
34
|
+
):not([data-vertical-hidden]) {
|
|
35
|
+
padding-inline-end: var(--scrollarea-scrollbar-size);
|
|
36
|
+
padding-inline-start: unset;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.m_c0783ff9:where([data-scrollbars='xy'], [data-scrollbars='x']):where(
|
|
40
|
+
[data-offset-scrollbars='xy'],
|
|
41
|
+
[data-offset-scrollbars='x'],
|
|
42
|
+
[data-offset-scrollbars='present']
|
|
43
|
+
):where([data-horizontal-hidden]) {
|
|
44
|
+
padding-bottom: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.m_c0783ff9:where([data-scrollbars='xy'], [data-scrollbars='x']):where(
|
|
48
|
+
[data-offset-scrollbars='xy'],
|
|
49
|
+
[data-offset-scrollbars='x'],
|
|
50
|
+
[data-offset-scrollbars='present']
|
|
51
|
+
):not([data-horizontal-hidden]) {
|
|
52
|
+
padding-bottom: var(--scrollarea-scrollbar-size);
|
|
53
|
+
}
|
|
29
54
|
|
|
30
55
|
.m_f8f631dd {
|
|
31
56
|
min-width: 100%;
|