@axos-web-dev/shared-components 0.0.24 → 0.0.25
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/dist/Table/Table.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CellProps, RowProps, TableContainerProps, TableProps } from './Table.interface';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
3
|
|
|
4
|
-
export declare const TableContainer: ({ tableTitle, tableBody, tableFooter, tableType, tableDescription, }: TableContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const TableContainer: ({ tableTitle, tableBody, tableFooter, tableType, tableDescription, internalName, id, }: TableContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export declare const Table: ({ variant, children, highlight, tableType, alternateColorRows, }: TableProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export declare const TableRow: ({ children, ...props }: RowProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export declare const TableHead: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -14,10 +14,12 @@ export interface TableProps extends PropsWithChildren {
|
|
|
14
14
|
alternateColorRows?: boolean;
|
|
15
15
|
}
|
|
16
16
|
export interface TableContainerProps extends PropsWithChildren {
|
|
17
|
+
id?: string;
|
|
17
18
|
variant: string;
|
|
18
19
|
tableTitle: ReactNode | string;
|
|
19
20
|
tableBody?: ReactNode | string;
|
|
20
21
|
tableFooter: ReactNode | string;
|
|
21
22
|
tableType?: string;
|
|
22
23
|
tableDescription?: ReactNode | string;
|
|
24
|
+
internalName?: string;
|
|
23
25
|
}
|
package/dist/Table/Table.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getVariant } from "../utils/getVariant.js";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { createElement } from "react";
|
|
@@ -8,9 +8,11 @@ const TableContainer = ({
|
|
|
8
8
|
tableBody,
|
|
9
9
|
tableFooter,
|
|
10
10
|
tableType = "Standard",
|
|
11
|
-
tableDescription
|
|
11
|
+
tableDescription,
|
|
12
|
+
internalName,
|
|
13
|
+
id
|
|
12
14
|
}) => {
|
|
13
|
-
return /* @__PURE__ */ jsxs(
|
|
15
|
+
return /* @__PURE__ */ jsx("section", { id: internalName == null ? void 0 : internalName.replace(/ /g, "-"), children: /* @__PURE__ */ jsxs(
|
|
14
16
|
"div",
|
|
15
17
|
{
|
|
16
18
|
className: clsx(
|
|
@@ -24,7 +26,7 @@ const TableContainer = ({
|
|
|
24
26
|
tableFooter && /* @__PURE__ */ jsx("div", { className: clsx(table_container_text, "push_up_24"), children: tableFooter })
|
|
25
27
|
]
|
|
26
28
|
}
|
|
27
|
-
);
|
|
29
|
+
) }, id);
|
|
28
30
|
};
|
|
29
31
|
const Table = ({
|
|
30
32
|
variant = "primary",
|