@mantine/core 7.1.7 → 7.2.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/ActionIcon/ActionIcon.js +1 -0
- package/cjs/components/ActionIcon/ActionIcon.js.map +1 -1
- package/cjs/components/Button/Button.js +2 -1
- package/cjs/components/Button/Button.js.map +1 -1
- package/cjs/components/Checkbox/Checkbox.js +15 -10
- package/cjs/components/Checkbox/Checkbox.js.map +1 -1
- package/cjs/components/Chip/Chip.js.map +1 -1
- package/cjs/components/Chip/ChipGroup/ChipGroup.js.map +1 -1
- package/cjs/components/ColorInput/ColorInput.js +1 -1
- package/cjs/components/ColorInput/ColorInput.js.map +1 -1
- package/cjs/components/FileInput/FileInput.js.map +1 -1
- package/cjs/components/Flex/Flex.js +2 -2
- package/cjs/components/Flex/Flex.js.map +1 -1
- package/cjs/components/Input/Input.js.map +1 -1
- package/cjs/components/Loader/Loader.js +7 -2
- package/cjs/components/Loader/Loader.js.map +1 -1
- package/cjs/components/NativeSelect/NativeSelect.js.map +1 -1
- package/cjs/components/NumberFormatter/NumberFormatter.js +56 -0
- package/cjs/components/NumberFormatter/NumberFormatter.js.map +1 -0
- package/cjs/components/PasswordInput/PasswordInput.js +5 -6
- package/cjs/components/PasswordInput/PasswordInput.js.map +1 -1
- package/cjs/components/PillsInput/PillsInput.js.map +1 -1
- package/cjs/components/Radio/Radio.js +14 -10
- package/cjs/components/Radio/Radio.js.map +1 -1
- package/cjs/components/Table/Table.components.js +4 -1
- package/cjs/components/Table/Table.components.js.map +1 -1
- package/cjs/components/Table/Table.context.js.map +1 -1
- package/cjs/components/Table/Table.js +21 -5
- package/cjs/components/Table/Table.js.map +1 -1
- package/cjs/components/Table/Table.module.css.js +1 -1
- package/cjs/components/Table/TableDataRenderer.js +19 -0
- package/cjs/components/Table/TableDataRenderer.js.map +1 -0
- package/cjs/components/TextInput/TextInput.js.map +1 -1
- package/cjs/components/Textarea/Textarea.js.map +1 -1
- package/cjs/core/Box/Box.js +6 -0
- package/cjs/core/Box/Box.js.map +1 -1
- package/cjs/core/Box/style-props/extract-style-props/extract-style-props.js +9 -3
- package/cjs/core/Box/style-props/extract-style-props/extract-style-props.js.map +1 -1
- package/cjs/core/MantineProvider/color-functions/default-variant-colors-resolver/default-variant-colors-resolver.js.map +1 -1
- package/cjs/index.css +2 -2
- package/cjs/index.js +2 -0
- package/cjs/index.js.map +1 -1
- package/esm/components/ActionIcon/ActionIcon.mjs +1 -0
- package/esm/components/ActionIcon/ActionIcon.mjs.map +1 -1
- package/esm/components/Button/Button.mjs +2 -1
- package/esm/components/Button/Button.mjs.map +1 -1
- package/esm/components/Checkbox/Checkbox.mjs +15 -10
- package/esm/components/Checkbox/Checkbox.mjs.map +1 -1
- package/esm/components/Chip/Chip.mjs.map +1 -1
- package/esm/components/Chip/ChipGroup/ChipGroup.mjs.map +1 -1
- package/esm/components/ColorInput/ColorInput.mjs +1 -1
- package/esm/components/ColorInput/ColorInput.mjs.map +1 -1
- package/esm/components/FileInput/FileInput.mjs.map +1 -1
- package/esm/components/Flex/Flex.mjs +2 -2
- package/esm/components/Flex/Flex.mjs.map +1 -1
- package/esm/components/Input/Input.mjs.map +1 -1
- package/esm/components/Loader/Loader.mjs +7 -2
- package/esm/components/Loader/Loader.mjs.map +1 -1
- package/esm/components/NativeSelect/NativeSelect.mjs.map +1 -1
- package/esm/components/NumberFormatter/NumberFormatter.mjs +48 -0
- package/esm/components/NumberFormatter/NumberFormatter.mjs.map +1 -0
- package/esm/components/PasswordInput/PasswordInput.mjs +5 -6
- package/esm/components/PasswordInput/PasswordInput.mjs.map +1 -1
- package/esm/components/PillsInput/PillsInput.mjs.map +1 -1
- package/esm/components/Radio/Radio.mjs +14 -10
- package/esm/components/Radio/Radio.mjs.map +1 -1
- package/esm/components/Table/Table.components.mjs +4 -1
- package/esm/components/Table/Table.components.mjs.map +1 -1
- package/esm/components/Table/Table.context.mjs.map +1 -1
- package/esm/components/Table/Table.mjs +21 -5
- package/esm/components/Table/Table.mjs.map +1 -1
- package/esm/components/Table/Table.module.mjs +1 -1
- package/esm/components/Table/TableDataRenderer.mjs +11 -0
- package/esm/components/Table/TableDataRenderer.mjs.map +1 -0
- package/esm/components/TextInput/TextInput.mjs.map +1 -1
- package/esm/components/Textarea/Textarea.mjs.map +1 -1
- package/esm/core/Box/Box.mjs +6 -0
- package/esm/core/Box/Box.mjs.map +1 -1
- package/esm/core/Box/style-props/extract-style-props/extract-style-props.mjs +9 -3
- package/esm/core/Box/style-props/extract-style-props/extract-style-props.mjs.map +1 -1
- package/esm/core/MantineProvider/color-functions/default-variant-colors-resolver/default-variant-colors-resolver.mjs.map +1 -1
- package/esm/index.css +2 -2
- package/esm/index.layer.css +2 -2
- package/esm/index.mjs +1 -0
- package/esm/index.mjs.map +1 -1
- package/esm/styles/ActionIcon.css +1 -1
- package/esm/styles/ActionIcon.layer.css +1 -1
- package/esm/styles/Button.css +1 -1
- package/esm/styles/Button.layer.css +1 -1
- package/esm/styles/Checkbox.css +1 -1
- package/esm/styles/Checkbox.layer.css +1 -1
- package/esm/styles/ColorPicker.css +1 -1
- package/esm/styles/ColorPicker.layer.css +1 -1
- package/esm/styles/Radio.css +1 -1
- package/esm/styles/Radio.layer.css +1 -1
- package/esm/styles/Rating.css +1 -1
- package/esm/styles/Rating.layer.css +1 -1
- package/esm/styles/Table.css +1 -1
- package/esm/styles/Table.layer.css +1 -1
- package/esm/styles/global.css +1 -1
- package/esm/styles/global.layer.css +1 -1
- package/lib/components/ActionIcon/ActionIcon.d.ts +1 -1
- package/lib/components/Button/Button.d.ts +1 -1
- package/lib/components/Checkbox/Checkbox.d.ts +4 -2
- package/lib/components/Chip/Chip.d.ts +4 -4
- package/lib/components/Chip/ChipGroup/ChipGroup.d.ts +2 -2
- package/lib/components/FileInput/FileInput.d.ts +3 -4
- package/lib/components/Flex/Flex.d.ts +24 -9
- package/lib/components/Input/Input.d.ts +3 -1
- package/lib/components/Loader/Loader.d.ts +2 -0
- package/lib/components/NativeSelect/NativeSelect.d.ts +3 -4
- package/lib/components/NumberFormatter/NumberFormatter.d.ts +34 -0
- package/lib/components/NumberFormatter/index.d.ts +2 -0
- package/lib/components/PasswordInput/PasswordInput.d.ts +3 -4
- package/lib/components/PillsInput/PillsInput.d.ts +6 -4
- package/lib/components/Radio/Radio.d.ts +3 -1
- package/lib/components/Table/Table.components.d.ts +1 -0
- package/lib/components/Table/Table.context.d.ts +1 -0
- package/lib/components/Table/Table.d.ts +16 -1
- package/lib/components/Table/TableDataRenderer.d.ts +8 -0
- package/lib/components/Table/index.d.ts +1 -1
- package/lib/components/TextInput/TextInput.d.ts +3 -4
- package/lib/components/Textarea/Textarea.d.ts +4 -4
- package/lib/components/index.d.ts +1 -0
- package/lib/core/Box/Box.d.ts +4 -0
- package/lib/core/MantineProvider/color-functions/default-variant-colors-resolver/default-variant-colors-resolver.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ElementProps, Factory } from '../../core';
|
|
3
|
-
import { __InputStylesNames, InputVariant } from '../Input';
|
|
4
|
-
|
|
5
|
-
export interface FileInputProps<Multiple = false> extends InputBaseProps, ElementProps<'button', 'value' | 'defaultValue' | 'onChange'> {
|
|
2
|
+
import { ElementProps, Factory, BoxProps, StylesApiProps } from '../../core';
|
|
3
|
+
import { __InputStylesNames, InputVariant, __BaseInputProps } from '../Input';
|
|
4
|
+
export interface FileInputProps<Multiple = false> extends BoxProps, __BaseInputProps, StylesApiProps<FileInputFactory>, ElementProps<'button', 'value' | 'defaultValue' | 'onChange'> {
|
|
6
5
|
/** Called when value changes */
|
|
7
6
|
onChange?: (payload: Multiple extends true ? File[] : File | null) => void;
|
|
8
7
|
/** Controlled component value */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { BoxProps, StylesApiProps, ElementProps,
|
|
2
|
+
import { BoxProps, StylesApiProps, ElementProps, StyleProp, MantineSize, PolymorphicFactory } from '../../core';
|
|
3
3
|
export type FlexStylesNames = 'root';
|
|
4
4
|
export interface FlexProps extends BoxProps, StylesApiProps<FlexFactory>, ElementProps<'div'> {
|
|
5
5
|
/** `gap` CSS property */
|
|
@@ -10,20 +10,35 @@ export interface FlexProps extends BoxProps, StylesApiProps<FlexFactory>, Elemen
|
|
|
10
10
|
columnGap?: StyleProp<MantineSize | (string & {}) | number>;
|
|
11
11
|
/** `align-items` CSS property */
|
|
12
12
|
align?: StyleProp<React.CSSProperties['alignItems']>;
|
|
13
|
-
/** justify-content CSS property */
|
|
13
|
+
/** `justify-content` CSS property */
|
|
14
14
|
justify?: StyleProp<React.CSSProperties['justifyContent']>;
|
|
15
|
-
/** flex-wrap CSS property */
|
|
15
|
+
/** `flex-wrap` CSS property */
|
|
16
16
|
wrap?: StyleProp<React.CSSProperties['flexWrap']>;
|
|
17
|
-
/** flex-direction CSS property */
|
|
17
|
+
/** `flex-direction` CSS property */
|
|
18
18
|
direction?: StyleProp<React.CSSProperties['flexDirection']>;
|
|
19
19
|
}
|
|
20
|
-
export type FlexFactory =
|
|
20
|
+
export type FlexFactory = PolymorphicFactory<{
|
|
21
21
|
props: FlexProps;
|
|
22
|
-
|
|
22
|
+
defaultRef: HTMLDivElement;
|
|
23
|
+
defaultComponent: 'div';
|
|
23
24
|
stylesNames: FlexStylesNames;
|
|
24
25
|
}>;
|
|
25
|
-
export declare const Flex: import("../../core").
|
|
26
|
+
export declare const Flex: (<C = "div">(props: import("../../core/factory/create-polymorphic-component").PolymorphicComponentProps<C, FlexProps>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & Omit<React.FunctionComponent<(FlexProps & {
|
|
27
|
+
component?: any;
|
|
28
|
+
} & Omit<Omit<any, "ref">, "component" | keyof FlexProps> & {
|
|
29
|
+
ref?: any;
|
|
30
|
+
renderRoot?: ((props: any) => any) | undefined;
|
|
31
|
+
}) | (FlexProps & {
|
|
32
|
+
component: React.ElementType<any>;
|
|
33
|
+
renderRoot?: ((props: Record<string, any>) => any) | undefined;
|
|
34
|
+
})>, never> & import("../../core/factory/factory").ThemeExtend<{
|
|
26
35
|
props: FlexProps;
|
|
27
|
-
|
|
36
|
+
defaultRef: HTMLDivElement;
|
|
37
|
+
defaultComponent: 'div';
|
|
28
38
|
stylesNames: FlexStylesNames;
|
|
29
|
-
}
|
|
39
|
+
}> & import("../../core/factory/factory").ComponentClasses<{
|
|
40
|
+
props: FlexProps;
|
|
41
|
+
defaultRef: HTMLDivElement;
|
|
42
|
+
defaultComponent: 'div';
|
|
43
|
+
stylesNames: FlexStylesNames;
|
|
44
|
+
}> & Record<string, never>;
|
|
@@ -5,7 +5,9 @@ import { InputError } from './InputError/InputError';
|
|
|
5
5
|
import { InputDescription } from './InputDescription/InputDescription';
|
|
6
6
|
import { InputPlaceholder } from './InputPlaceholder/InputPlaceholder';
|
|
7
7
|
import { InputWrapper, __InputWrapperProps, InputWrapperStylesNames } from './InputWrapper/InputWrapper';
|
|
8
|
-
export interface __BaseInputProps extends __InputWrapperProps, __InputProps {
|
|
8
|
+
export interface __BaseInputProps extends __InputWrapperProps, Omit<__InputProps, 'wrapperProps'> {
|
|
9
|
+
/** Props passed down to the root element */
|
|
10
|
+
wrapperProps?: Record<string, any>;
|
|
9
11
|
}
|
|
10
12
|
export type __InputStylesNames = InputStylesNames | InputWrapperStylesNames;
|
|
11
13
|
export type InputStylesNames = 'input' | 'wrapper' | 'section';
|
|
@@ -14,6 +14,8 @@ export interface LoaderProps extends BoxProps, StylesApiProps<LoaderFactory>, Om
|
|
|
14
14
|
type?: MantineLoader;
|
|
15
15
|
/** Object of loaders components, can be customized via default props or inline. Default value contains `bars`, `oval` and `dots` */
|
|
16
16
|
loaders?: MantineLoadersRecord;
|
|
17
|
+
/** Overrides default loader with given content */
|
|
18
|
+
children?: React.ReactNode;
|
|
17
19
|
}
|
|
18
20
|
export type LoaderFactory = Factory<{
|
|
19
21
|
props: LoaderProps;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ElementProps, Factory } from '../../core';
|
|
2
|
-
import {
|
|
3
|
-
import { __InputStylesNames } from '../Input';
|
|
1
|
+
import { ElementProps, Factory, BoxProps, StylesApiProps } from '../../core';
|
|
2
|
+
import { __InputStylesNames, __BaseInputProps } from '../Input';
|
|
4
3
|
import { ComboboxData } from '../Combobox';
|
|
5
|
-
export interface NativeSelectProps extends
|
|
4
|
+
export interface NativeSelectProps extends BoxProps, __BaseInputProps, StylesApiProps<NativeSelectFactory>, ElementProps<'select', 'size'> {
|
|
6
5
|
/** Data used to render options, can be replaced with `children` */
|
|
7
6
|
data?: ComboboxData;
|
|
8
7
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Factory, MantineThemeComponent } from '../../core';
|
|
3
|
+
export interface NumberFormatterProps extends React.ComponentPropsWithoutRef<'span'> {
|
|
4
|
+
/** Value to format */
|
|
5
|
+
value?: number | string;
|
|
6
|
+
/** Determines whether negative values are allowed, `true` by default */
|
|
7
|
+
allowNegative?: boolean;
|
|
8
|
+
/** Limits the number of digits that are displayed after the decimal point, by default there is no limit */
|
|
9
|
+
decimalScale?: number;
|
|
10
|
+
/** Character used as a decimal separator, `'.'` by default */
|
|
11
|
+
decimalSeparator?: string;
|
|
12
|
+
/** If set, 0s are added after `decimalSeparator` to match given `decimalScale`. `false` by default */
|
|
13
|
+
fixedDecimalScale?: boolean;
|
|
14
|
+
/** Prefix added before the value */
|
|
15
|
+
prefix?: string;
|
|
16
|
+
/** Suffix added after the value */
|
|
17
|
+
suffix?: string;
|
|
18
|
+
/** Defines the thousand grouping style */
|
|
19
|
+
thousandsGroupStyle?: 'thousand' | 'lakh' | 'wan' | 'none';
|
|
20
|
+
/** A character used to separate thousands, `','` by default */
|
|
21
|
+
thousandSeparator?: string | boolean;
|
|
22
|
+
}
|
|
23
|
+
export type NumberFormatterFactory = Factory<{
|
|
24
|
+
props: NumberFormatterProps;
|
|
25
|
+
ref: HTMLDivElement;
|
|
26
|
+
}>;
|
|
27
|
+
export declare function NumberFormatter(_props: NumberFormatterProps): import("react/jsx-runtime").JSX.Element | null;
|
|
28
|
+
export declare namespace NumberFormatter {
|
|
29
|
+
var extend: (c: import("../../core/factory/factory").ExtendsRootComponent<{
|
|
30
|
+
props: NumberFormatterProps;
|
|
31
|
+
ref: HTMLDivElement;
|
|
32
|
+
}>) => MantineThemeComponent;
|
|
33
|
+
var displayName: string;
|
|
34
|
+
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { StylesApiProps, ElementProps, Factory } from '../../core';
|
|
3
|
-
import {
|
|
4
|
-
import { InputVariant, __InputStylesNames } from '../Input';
|
|
2
|
+
import { StylesApiProps, ElementProps, Factory, BoxProps } from '../../core';
|
|
3
|
+
import { InputVariant, __InputStylesNames, __BaseInputProps } from '../Input';
|
|
5
4
|
export type PasswordInputStylesNames = 'root' | 'visibilityToggle' | 'innerInput' | __InputStylesNames;
|
|
6
5
|
export type PasswordInputCssVariables = {
|
|
7
6
|
root: '--psi-icon-size' | '--psi-button-size';
|
|
8
7
|
};
|
|
9
|
-
export interface PasswordInputProps extends
|
|
8
|
+
export interface PasswordInputProps extends BoxProps, __BaseInputProps, StylesApiProps<PasswordInputFactory>, ElementProps<'input', 'size'> {
|
|
10
9
|
/** Custom visibility toggle icon */
|
|
11
10
|
visibilityToggleIcon?: React.FC<{
|
|
12
11
|
reveal: boolean;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { ElementProps, Factory } from '../../core';
|
|
2
|
-
import { __InputStylesNames } from '../Input';
|
|
3
|
-
import { InputBaseProps } from '../InputBase';
|
|
1
|
+
import { ElementProps, Factory, BoxProps, StylesApiProps } from '../../core';
|
|
2
|
+
import { __InputStylesNames, __BaseInputProps } from '../Input';
|
|
4
3
|
import { PillsInputField } from './PillsInputField/PillsInputField';
|
|
5
|
-
export interface PillsInputProps extends
|
|
4
|
+
export interface PillsInputProps extends BoxProps, __BaseInputProps, StylesApiProps<PillsInputFactory>, ElementProps<'div', 'size'> {
|
|
5
|
+
__stylesApiProps?: Record<string, any>;
|
|
6
|
+
__staticSelector?: string;
|
|
7
|
+
multiline?: boolean;
|
|
6
8
|
}
|
|
7
9
|
export type PillsInputFactory = Factory<{
|
|
8
10
|
props: PillsInputProps;
|
|
@@ -5,7 +5,7 @@ import { RadioIconProps } from './RadioIcon';
|
|
|
5
5
|
import { RadioGroup } from './RadioGroup/RadioGroup';
|
|
6
6
|
export type RadioStylesNames = InlineInputStylesNames | 'inner' | 'radio' | 'icon';
|
|
7
7
|
export type RadioCssVariables = {
|
|
8
|
-
root: '--radio-size' | '--radio-radius' | '--radio-color';
|
|
8
|
+
root: '--radio-size' | '--radio-radius' | '--radio-color' | '--radio-icon-color';
|
|
9
9
|
};
|
|
10
10
|
export interface RadioProps extends BoxProps, StylesApiProps<RadioFactory>, ElementProps<'input', 'size'> {
|
|
11
11
|
/** Radio label */
|
|
@@ -28,6 +28,8 @@ export interface RadioProps extends BoxProps, StylesApiProps<RadioFactory>, Elem
|
|
|
28
28
|
radius?: MantineRadius;
|
|
29
29
|
/** Assigns ref of the root element, can be used with `Tooltip` and other similar components */
|
|
30
30
|
rootRef?: React.ForwardedRef<HTMLDivElement>;
|
|
31
|
+
/** Key of `theme.colors` or any valid CSS color to set icon color, `theme.white` by default */
|
|
32
|
+
iconColor?: MantineColor;
|
|
31
33
|
}
|
|
32
34
|
export type RadioFactory = Factory<{
|
|
33
35
|
props: RadioProps;
|
|
@@ -66,6 +66,7 @@ interface TableElementOptions {
|
|
|
66
66
|
striped?: true;
|
|
67
67
|
highlightOnHover?: true;
|
|
68
68
|
captionSide?: true;
|
|
69
|
+
stickyHeader?: true;
|
|
69
70
|
}
|
|
70
71
|
export declare function tableElement<Factory extends FactoryPayload>(element: 'th' | 'td' | 'tr' | 'thead' | 'tbody' | 'tfoot' | 'caption', options?: TableElementOptions): import("../../core").MantineComponent<Factory>;
|
|
71
72
|
export declare const TableTh: import("../../core").MantineComponent<{
|
|
@@ -3,6 +3,7 @@ import { GetStylesApi } from '../../core';
|
|
|
3
3
|
import type { TableFactory } from './Table';
|
|
4
4
|
export interface TableContextValue {
|
|
5
5
|
getStyles: GetStylesApi<TableFactory>;
|
|
6
|
+
stickyHeader: boolean | undefined;
|
|
6
7
|
striped: 'odd' | 'even' | undefined;
|
|
7
8
|
highlightOnHover: boolean | undefined;
|
|
8
9
|
withColumnBorders: boolean | undefined;
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BoxProps, StylesApiProps, ElementProps, MantineColor, MantineSpacing, Factory } from '../../core';
|
|
3
3
|
import { TableCaption, TableTbody, TableTd, TableTfoot, TableTh, TableTr, TableThead } from './Table.components';
|
|
4
|
+
import { TableDataRenderer } from './TableDataRenderer';
|
|
4
5
|
import { TableScrollContainer } from './TableScrollContainer';
|
|
5
6
|
export type TableStylesNames = 'table' | 'thead' | 'tbody' | 'tfoot' | 'tr' | 'th' | 'td' | 'caption';
|
|
6
7
|
export type TableCssVariables = {
|
|
7
|
-
table: '--table-layout' | '--table-border-color' | '--table-caption-side' | '--table-horizontal-spacing' | '--table-vertical-spacing' | '--table-striped-color' | '--table-highlight-on-hover-color';
|
|
8
|
+
table: '--table-layout' | '--table-border-color' | '--table-caption-side' | '--table-horizontal-spacing' | '--table-vertical-spacing' | '--table-striped-color' | '--table-highlight-on-hover-color' | '--table-sticky-header-offset';
|
|
8
9
|
};
|
|
10
|
+
export interface TableData {
|
|
11
|
+
head?: React.ReactNode[];
|
|
12
|
+
body?: React.ReactNode[][];
|
|
13
|
+
foot?: React.ReactNode[];
|
|
14
|
+
caption?: string;
|
|
15
|
+
}
|
|
9
16
|
export interface TableProps extends BoxProps, StylesApiProps<TableFactory>, ElementProps<'table'> {
|
|
10
17
|
/** Value of `table-layout` style, `auto` by default */
|
|
11
18
|
layout?: React.CSSProperties['tableLayout'];
|
|
@@ -31,6 +38,12 @@ export interface TableProps extends BoxProps, StylesApiProps<TableFactory>, Elem
|
|
|
31
38
|
highlightOnHover?: boolean;
|
|
32
39
|
/** Background color of table rows when hovered, key of `theme.colors` or any valid CSS color */
|
|
33
40
|
highlightOnHoverColor?: MantineColor;
|
|
41
|
+
/** Data that should be used to generate table, ignored if `children` prop is set */
|
|
42
|
+
data?: TableData;
|
|
43
|
+
/** Determines whether `Table.Thead` should be sticky, `false` by default */
|
|
44
|
+
stickyHeader?: boolean;
|
|
45
|
+
/** Offset from top at which `Table.Thead` should become sticky, `0` by default */
|
|
46
|
+
stickyHeaderOffset?: number | string;
|
|
34
47
|
}
|
|
35
48
|
export type TableFactory = Factory<{
|
|
36
49
|
props: TableProps;
|
|
@@ -46,6 +59,7 @@ export type TableFactory = Factory<{
|
|
|
46
59
|
Tr: typeof TableTr;
|
|
47
60
|
Caption: typeof TableCaption;
|
|
48
61
|
ScrollContainer: typeof TableScrollContainer;
|
|
62
|
+
DataRenderer: typeof TableDataRenderer;
|
|
49
63
|
};
|
|
50
64
|
}>;
|
|
51
65
|
export declare const Table: import("../../core").MantineComponent<{
|
|
@@ -62,5 +76,6 @@ export declare const Table: import("../../core").MantineComponent<{
|
|
|
62
76
|
Tr: typeof TableTr;
|
|
63
77
|
Caption: typeof TableCaption;
|
|
64
78
|
ScrollContainer: typeof TableScrollContainer;
|
|
79
|
+
DataRenderer: typeof TableDataRenderer;
|
|
65
80
|
};
|
|
66
81
|
}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TableData } from './Table';
|
|
2
|
+
export interface TableDataRendererProps {
|
|
3
|
+
data: TableData;
|
|
4
|
+
}
|
|
5
|
+
export declare function TableDataRenderer({ data }: TableDataRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare namespace TableDataRenderer {
|
|
7
|
+
var displayName: string;
|
|
8
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Table } from './Table';
|
|
2
2
|
export { TableCaption, TableTbody, TableTd, TableTfoot, TableTr, TableTh, TableThead, } from './Table.components';
|
|
3
3
|
export { TableScrollContainer } from './TableScrollContainer';
|
|
4
|
-
export type { TableProps, TableStylesNames, TableCssVariables, TableFactory } from './Table';
|
|
4
|
+
export type { TableProps, TableStylesNames, TableCssVariables, TableFactory, TableData, } from './Table';
|
|
5
5
|
export type { TableTbodyProps, TableTdProps, TableThProps, TableTrProps, TableCaptionProps, TableTfootProps, TableTheadProps, } from './Table.components';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { ElementProps, Factory } from '../../core';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export interface TextInputProps extends InputBaseProps, ElementProps<'input', 'size'> {
|
|
1
|
+
import { ElementProps, Factory, BoxProps, StylesApiProps } from '../../core';
|
|
2
|
+
import { __InputStylesNames, __BaseInputProps } from '../Input';
|
|
3
|
+
export interface TextInputProps extends BoxProps, __BaseInputProps, StylesApiProps<TextInputFactory>, ElementProps<'input', 'size'> {
|
|
5
4
|
}
|
|
6
5
|
export type TextInputFactory = Factory<{
|
|
7
6
|
props: TextInputProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ElementProps, Factory } from '../../core';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { ElementProps, Factory, BoxProps, StylesApiProps } from '../../core';
|
|
2
|
+
import { __BaseInputProps, __InputStylesNames } from '../Input';
|
|
3
|
+
export interface TextareaProps extends BoxProps, __BaseInputProps, StylesApiProps<TextareaFactory>, ElementProps<'textarea', 'size'> {
|
|
4
|
+
__staticSelector?: string;
|
|
5
5
|
/** Determines whether the textarea height should grow with its content, `false` by default */
|
|
6
6
|
autosize?: boolean;
|
|
7
7
|
/** Maximum rows for autosize textarea to grow, ignored if `autosize` prop is not set */
|
|
@@ -62,6 +62,7 @@ export * from './MultiSelect';
|
|
|
62
62
|
export * from './NativeSelect';
|
|
63
63
|
export * from './NavLink';
|
|
64
64
|
export * from './Notification';
|
|
65
|
+
export * from './NumberFormatter';
|
|
65
66
|
export * from './NumberInput';
|
|
66
67
|
export * from './Pagination';
|
|
67
68
|
export * from './PasswordInput';
|
package/lib/core/Box/Box.d.ts
CHANGED
|
@@ -15,6 +15,10 @@ export interface BoxProps extends MantineStyleProps {
|
|
|
15
15
|
hiddenFrom?: MantineBreakpoint;
|
|
16
16
|
/** Breakpoint below which the component is hidden with `display: none` */
|
|
17
17
|
visibleFrom?: MantineBreakpoint;
|
|
18
|
+
/** Determines whether component should be hidden in light color scheme with `display: none` */
|
|
19
|
+
lightHidden?: boolean;
|
|
20
|
+
/** Determines whether component should be hidden in dark color scheme with `display: none` */
|
|
21
|
+
darkHidden?: boolean;
|
|
18
22
|
}
|
|
19
23
|
export type ElementProps<ElementType extends React.ElementType, PropsToOmit extends string = never> = Omit<React.ComponentPropsWithoutRef<ElementType>, 'style' | PropsToOmit>;
|
|
20
24
|
export interface BoxComponentProps extends BoxProps {
|
|
@@ -10,6 +10,7 @@ export interface VariantColorResolverResult {
|
|
|
10
10
|
hover: string;
|
|
11
11
|
color: string;
|
|
12
12
|
border: string;
|
|
13
|
+
hoverColor?: string;
|
|
13
14
|
}
|
|
14
15
|
export type VariantColorsResolver = (input: VariantColorsResolverInput) => VariantColorResolverResult;
|
|
15
16
|
export declare const defaultVariantColorsResolver: VariantColorsResolver;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mantine/core",
|
|
3
3
|
"description": "React components library focused on usability, accessibility and developer experience",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.2.0",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
7
7
|
"module": "./esm/index.mjs",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"design"
|
|
44
44
|
],
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@mantine/hooks": "7.
|
|
46
|
+
"@mantine/hooks": "7.2.0",
|
|
47
47
|
"react": "^18.2.0",
|
|
48
48
|
"react-dom": "^18.2.0"
|
|
49
49
|
},
|