@eqtylab/equality 1.2.0 → 1.2.1
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/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/table.module.module.css.module.css +5 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -51,14 +51,14 @@ declare const AlertDialogFooter: {
|
|
|
51
51
|
declare const AlertDialogTitle: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
52
52
|
declare const AlertDialogDescription: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
53
53
|
declare const AlertDialogAction: React$1.ForwardRefExoticComponent<Omit<Omit<AlertDialogPrimitive.AlertDialogActionProps & React$1.RefAttributes<HTMLButtonElement>, "ref">, "prefix"> & VariantProps<(props?: ({
|
|
54
|
-
variant?: "
|
|
54
|
+
variant?: "danger" | "link" | "navigation" | "primary" | "secondary" | "tertiary" | null | undefined;
|
|
55
55
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
56
56
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
57
57
|
prefix?: React$1.ReactNode;
|
|
58
58
|
suffix?: React$1.ReactNode;
|
|
59
59
|
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
60
60
|
declare const AlertDialogCancel: React$1.ForwardRefExoticComponent<Omit<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React$1.RefAttributes<HTMLButtonElement>, "ref">, "prefix"> & VariantProps<(props?: ({
|
|
61
|
-
variant?: "
|
|
61
|
+
variant?: "danger" | "link" | "navigation" | "primary" | "secondary" | "tertiary" | null | undefined;
|
|
62
62
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
63
63
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
64
64
|
prefix?: React$1.ReactNode;
|
|
@@ -163,7 +163,7 @@ declare const BgGradient: ({ theme, placement, }: {
|
|
|
163
163
|
}) => react_jsx_runtime.JSX.Element;
|
|
164
164
|
|
|
165
165
|
declare const buttonVariants: (props?: ({
|
|
166
|
-
variant?: "
|
|
166
|
+
variant?: "danger" | "link" | "navigation" | "primary" | "secondary" | "tertiary" | null | undefined;
|
|
167
167
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
168
168
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
169
169
|
type ButtonBaseProps = Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, 'prefix'>;
|
|
@@ -693,11 +693,12 @@ interface TableProps extends VariantProps<typeof tableElevationVariants> {
|
|
|
693
693
|
rows: TableRowData[];
|
|
694
694
|
className?: string;
|
|
695
695
|
border?: boolean;
|
|
696
|
+
emptyState?: React$1.ReactNode;
|
|
696
697
|
}
|
|
697
698
|
declare const tableElevationVariants: (props?: ({
|
|
698
699
|
elevation?: string | number | null | undefined;
|
|
699
700
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
700
|
-
declare const Table: ({ columns, rows, className, border, elevation, }: TableProps) => react_jsx_runtime.JSX.Element;
|
|
701
|
+
declare const Table: ({ columns, rows, className, border, elevation, emptyState, }: TableProps) => react_jsx_runtime.JSX.Element;
|
|
701
702
|
|
|
702
703
|
declare const TabsContainer: React$1.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
703
704
|
declare const TabsList: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -51,14 +51,14 @@ declare const AlertDialogFooter: {
|
|
|
51
51
|
declare const AlertDialogTitle: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
52
52
|
declare const AlertDialogDescription: React$1.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
53
53
|
declare const AlertDialogAction: React$1.ForwardRefExoticComponent<Omit<Omit<AlertDialogPrimitive.AlertDialogActionProps & React$1.RefAttributes<HTMLButtonElement>, "ref">, "prefix"> & VariantProps<(props?: ({
|
|
54
|
-
variant?: "
|
|
54
|
+
variant?: "danger" | "link" | "navigation" | "primary" | "secondary" | "tertiary" | null | undefined;
|
|
55
55
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
56
56
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
57
57
|
prefix?: React$1.ReactNode;
|
|
58
58
|
suffix?: React$1.ReactNode;
|
|
59
59
|
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
60
60
|
declare const AlertDialogCancel: React$1.ForwardRefExoticComponent<Omit<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React$1.RefAttributes<HTMLButtonElement>, "ref">, "prefix"> & VariantProps<(props?: ({
|
|
61
|
-
variant?: "
|
|
61
|
+
variant?: "danger" | "link" | "navigation" | "primary" | "secondary" | "tertiary" | null | undefined;
|
|
62
62
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
63
63
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
64
64
|
prefix?: React$1.ReactNode;
|
|
@@ -163,7 +163,7 @@ declare const BgGradient: ({ theme, placement, }: {
|
|
|
163
163
|
}) => react_jsx_runtime.JSX.Element;
|
|
164
164
|
|
|
165
165
|
declare const buttonVariants: (props?: ({
|
|
166
|
-
variant?: "
|
|
166
|
+
variant?: "danger" | "link" | "navigation" | "primary" | "secondary" | "tertiary" | null | undefined;
|
|
167
167
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
168
168
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
169
169
|
type ButtonBaseProps = Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, 'prefix'>;
|
|
@@ -693,11 +693,12 @@ interface TableProps extends VariantProps<typeof tableElevationVariants> {
|
|
|
693
693
|
rows: TableRowData[];
|
|
694
694
|
className?: string;
|
|
695
695
|
border?: boolean;
|
|
696
|
+
emptyState?: React$1.ReactNode;
|
|
696
697
|
}
|
|
697
698
|
declare const tableElevationVariants: (props?: ({
|
|
698
699
|
elevation?: string | number | null | undefined;
|
|
699
700
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
700
|
-
declare const Table: ({ columns, rows, className, border, elevation, }: TableProps) => react_jsx_runtime.JSX.Element;
|
|
701
|
+
declare const Table: ({ columns, rows, className, border, elevation, emptyState, }: TableProps) => react_jsx_runtime.JSX.Element;
|
|
701
702
|
|
|
702
703
|
declare const TabsContainer: React$1.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
703
704
|
declare const TabsList: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
package/dist/index.js
CHANGED
|
@@ -2708,8 +2708,10 @@ var Table = ({
|
|
|
2708
2708
|
rows,
|
|
2709
2709
|
className,
|
|
2710
2710
|
border = false,
|
|
2711
|
-
elevation = ELEVATION.BASE
|
|
2711
|
+
elevation = ELEVATION.BASE,
|
|
2712
|
+
emptyState
|
|
2712
2713
|
}) => {
|
|
2714
|
+
const isEmpty = rows.length === 0;
|
|
2713
2715
|
return /* @__PURE__ */ jsx(
|
|
2714
2716
|
"div",
|
|
2715
2717
|
{
|
|
@@ -2721,7 +2723,7 @@ var Table = ({
|
|
|
2721
2723
|
),
|
|
2722
2724
|
children: /* @__PURE__ */ jsxs(TableContainer, { elevation, children: [
|
|
2723
2725
|
/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsx(TableRow, { children: columns.map((column) => /* @__PURE__ */ jsx(TableHead, { className: column.className, children: column.content }, column.key)) }) }),
|
|
2724
|
-
/* @__PURE__ */ jsx(TableBody, { children: rows.map((row) => /* @__PURE__ */ jsx(
|
|
2726
|
+
isEmpty && emptyState ? /* @__PURE__ */ jsx(TableBody, { children: /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, { colSpan: columns.length, className: styles51["table-empty-state"], children: emptyState }) }) }) : /* @__PURE__ */ jsx(TableBody, { children: rows.map((row) => /* @__PURE__ */ jsx(
|
|
2725
2727
|
TableRow,
|
|
2726
2728
|
{
|
|
2727
2729
|
className: cn(row.className, row.onClick && styles51["table-row-clickable"]),
|