Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
# Change Log

# unreleased
# 1.3.0

### Added
- Added `tableProps` and `tabularNums` props to `Table` #587 by @AnnMarieW
- Added `TableScrollContainer` component #587 by @AnnMarieW
-
### Fixed
- Fixed issue for components as props for timeline, stepper, codehighlight and segmentedcontrol.
- Fixed issue for components as props for `Timeline`, `Stepper`, `CodeHighlight` and `SegmentedControl`. #555 by @BSd3v
- Removed unused async files #587 by @AnnMarieW


### Changed
- Upgraded to latest Mantine (7.17.7)


# 1.2.0

Expand Down
1 change: 0 additions & 1 deletion dash_mantine_components/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@

# Add shared chunks here.
shared_chunks = [
f"{__name__}-shared",
f"{__name__}-charts-shared",
]

Expand Down
130 changes: 65 additions & 65 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dash_mantine_components",
"version": "1.2.0",
"version": "1.3.0",
"description": "Plotly Dash Components based on Mantine",
"main": "index.ts",
"repository": {
Expand Down Expand Up @@ -44,16 +44,16 @@
"author": "Snehil Vijay <snehilvj@outlook.com>",
"license": "MIT",
"dependencies": {
"@mantine/carousel": "7.17.4",
"@mantine/charts": "7.17.4",
"@mantine/code-highlight": "7.17.4",
"@mantine/core": "7.17.4",
"@mantine/dates": "7.17.4",
"@mantine/hooks": "7.17.4",
"@mantine/notifications": "7.17.4",
"@mantine/nprogress": "7.17.4",
"@mantine/spotlight": "7.17.4",
"@mantine/tiptap": "7.17.4",
"@mantine/carousel": "7.17.7",
"@mantine/charts": "7.17.7",
"@mantine/code-highlight": "7.17.7",
"@mantine/core": "7.17.7",
"@mantine/dates": "7.17.7",
"@mantine/hooks": "7.17.7",
"@mantine/notifications": "7.17.7",
"@mantine/nprogress": "7.17.7",
"@mantine/spotlight": "7.17.7",
"@mantine/tiptap": "7.17.7",
"@plotly/dash-component-plugins": "^1.2.0",
"@tiptap/extension-highlight": "2.9.1",
"@tiptap/extension-link": "2.9.1",
Expand Down
4 changes: 4 additions & 0 deletions src/ts/components/core/table/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ interface Props extends BoxProps, StylesApiProps, DashBaseProps {
stickyHeaderOffset?: number | string;
/** Headers, rows and footer */
children?: React.ReactNode;
/** variant 'default' | 'vertical' */
variant?: 'default' | 'vertical'
/** Determines whether `font-variant-numeric: tabular-nums` style should be set, `false` by default */
tabularNums?: boolean;
}

/** Table */
Expand Down
4 changes: 2 additions & 2 deletions src/ts/components/core/table/TableCaption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { TableElementProps } from "props/table";
import React from "react";

const TableCaption = (props: TableElementProps) => {
const { setProps, children, ...others } = props;
const { setProps, tableProps, children, ...others } = props;

return <Table.Caption {...others}>{children}</Table.Caption>;
return <Table.Caption {...others} {...tableProps}>{children}</Table.Caption>;
};

export default TableCaption;
43 changes: 43 additions & 0 deletions src/ts/components/core/table/TableScrollContainer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { Table } from "@mantine/core";
import { BoxProps } from "props/box";
import { DashBaseProps } from "props/dash";
import { ScrollAreaProps } from "props/scrollarea"
import React from "react";


interface Props extends BoxProps, DashBaseProps {
/** `min-width` of the `Table` at which it should become scrollable */
minWidth: React.CSSProperties['minWidth'];
/** `max-height` of the `Table` at which it should become scrollable */
maxHeight?: React.CSSProperties['maxHeight'];
/** Type of the scroll container, `native` to use native scrollbars, `scrollarea` to use `ScrollArea` component, `scrollarea` by default */
type?: 'native' | 'scrollarea';
/** Props passed down to `ScrollArea` component, not applicable with `type="native"` */
scrollAreaProps?: ScrollAreaProps;
/** Content rendered inside the scroll container */
children?: React.ReactNode;
}



/** Table ScrollArea */
const TableScrollContainer = (props: Props) => {
const { setProps, children, ...others } = props;


return (
<Table.ScrollContainer
{...others}
>
{children}
</Table.ScrollContainer>
);


};

export default TableScrollContainer;




4 changes: 2 additions & 2 deletions src/ts/components/core/table/TableTbody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { TableElementProps } from "props/table";
import React from "react";

const TableTbody = (props: TableElementProps) => {
const { setProps, children, ...others } = props;
const { setProps, tableProps, children, ...others } = props;

return <Table.Tbody {...others}>{children}</Table.Tbody>;
return <Table.Tbody {...others} {...tableProps}>{children}</Table.Tbody>;
};

export default TableTbody;
4 changes: 2 additions & 2 deletions src/ts/components/core/table/TableTd.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { TableElementProps } from "props/table";
import React from "react";

const TableTd = (props: TableElementProps) => {
const { setProps, children, ...others } = props;
const { setProps, children, tableProps, ...others } = props;

return <Table.Td {...others}>{children}</Table.Td>;
return <Table.Td {...others} {...tableProps}>{children}</Table.Td>;
};

export default TableTd;
Loading