@eqtylab/equality 1.4.1 → 1.5.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/badge.module.module.css.module.css +22 -0
- package/dist/index.cjs +58 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -9
- package/dist/index.d.ts +22 -9
- package/dist/index.js +58 -10
- package/dist/index.js.map +1 -1
- package/dist/table-components.module.module.css.module.css +68 -0
- package/dist/table.module.module.css.module.css +0 -38
- package/dist/theme.module.module.css.module.css +3 -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;
|
|
@@ -166,7 +166,7 @@ declare const BgGradient: ({ theme, placement, }: {
|
|
|
166
166
|
}) => react_jsx_runtime.JSX.Element;
|
|
167
167
|
|
|
168
168
|
declare const buttonVariants: (props?: ({
|
|
169
|
-
variant?: "
|
|
169
|
+
variant?: "danger" | "link" | "navigation" | "primary" | "secondary" | "tertiary" | null | undefined;
|
|
170
170
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
171
171
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
172
172
|
type ButtonBaseProps = Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, 'prefix'>;
|
|
@@ -665,13 +665,24 @@ declare function SortButton<T extends string>({ field, children, icon, sortField
|
|
|
665
665
|
|
|
666
666
|
declare const TableContainer: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableElement> & VariantProps<(props?: ({
|
|
667
667
|
elevation?: string | number | null | undefined;
|
|
668
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string> &
|
|
669
|
-
|
|
668
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
669
|
+
tableLayout?: "auto" | "fixed";
|
|
670
|
+
border?: boolean;
|
|
671
|
+
} & React$1.RefAttributes<HTMLTableElement>>;
|
|
672
|
+
declare const TableHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & {
|
|
673
|
+
sticky?: boolean;
|
|
674
|
+
} & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
670
675
|
declare const TableBody: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
671
676
|
declare const TableFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
672
|
-
declare const TableRow: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableRowElement> &
|
|
673
|
-
|
|
674
|
-
|
|
677
|
+
declare const TableRow: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableRowElement> & {
|
|
678
|
+
clickable?: boolean;
|
|
679
|
+
} & React$1.RefAttributes<HTMLTableRowElement>>;
|
|
680
|
+
declare const TableHead: React$1.ForwardRefExoticComponent<React$1.ThHTMLAttributes<HTMLTableCellElement> & {
|
|
681
|
+
truncate?: boolean;
|
|
682
|
+
} & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
683
|
+
declare const TableCell: React$1.ForwardRefExoticComponent<React$1.TdHTMLAttributes<HTMLTableCellElement> & {
|
|
684
|
+
truncate?: boolean;
|
|
685
|
+
} & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
675
686
|
declare const TableCaption: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableCaptionElement> & React$1.RefAttributes<HTMLTableCaptionElement>>;
|
|
676
687
|
|
|
677
688
|
type TableColumn = {
|
|
@@ -696,11 +707,13 @@ interface TableProps extends VariantProps<typeof tableElevationVariants> {
|
|
|
696
707
|
className?: string;
|
|
697
708
|
border?: boolean;
|
|
698
709
|
emptyState?: React$1.ReactNode;
|
|
710
|
+
tableLayout?: 'auto' | 'fixed';
|
|
699
711
|
}
|
|
700
712
|
declare const tableElevationVariants: (props?: ({
|
|
701
713
|
elevation?: string | number | null | undefined;
|
|
702
714
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
703
|
-
|
|
715
|
+
/** @deprecated Use the compositional table primitives (`TableContainer`, `TableHeader`, `TableBody`, `TableRow`, `TableHead`, `TableCell`) instead. */
|
|
716
|
+
declare const Table: ({ columns, rows, className, border, elevation, emptyState, tableLayout, }: TableProps) => react_jsx_runtime.JSX.Element;
|
|
704
717
|
|
|
705
718
|
declare const TabsContainer: React$1.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
706
719
|
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;
|
|
@@ -166,7 +166,7 @@ declare const BgGradient: ({ theme, placement, }: {
|
|
|
166
166
|
}) => react_jsx_runtime.JSX.Element;
|
|
167
167
|
|
|
168
168
|
declare const buttonVariants: (props?: ({
|
|
169
|
-
variant?: "
|
|
169
|
+
variant?: "danger" | "link" | "navigation" | "primary" | "secondary" | "tertiary" | null | undefined;
|
|
170
170
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
171
171
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
172
172
|
type ButtonBaseProps = Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, 'prefix'>;
|
|
@@ -665,13 +665,24 @@ declare function SortButton<T extends string>({ field, children, icon, sortField
|
|
|
665
665
|
|
|
666
666
|
declare const TableContainer: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableElement> & VariantProps<(props?: ({
|
|
667
667
|
elevation?: string | number | null | undefined;
|
|
668
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string> &
|
|
669
|
-
|
|
668
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
669
|
+
tableLayout?: "auto" | "fixed";
|
|
670
|
+
border?: boolean;
|
|
671
|
+
} & React$1.RefAttributes<HTMLTableElement>>;
|
|
672
|
+
declare const TableHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & {
|
|
673
|
+
sticky?: boolean;
|
|
674
|
+
} & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
670
675
|
declare const TableBody: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
671
676
|
declare const TableFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
672
|
-
declare const TableRow: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableRowElement> &
|
|
673
|
-
|
|
674
|
-
|
|
677
|
+
declare const TableRow: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableRowElement> & {
|
|
678
|
+
clickable?: boolean;
|
|
679
|
+
} & React$1.RefAttributes<HTMLTableRowElement>>;
|
|
680
|
+
declare const TableHead: React$1.ForwardRefExoticComponent<React$1.ThHTMLAttributes<HTMLTableCellElement> & {
|
|
681
|
+
truncate?: boolean;
|
|
682
|
+
} & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
683
|
+
declare const TableCell: React$1.ForwardRefExoticComponent<React$1.TdHTMLAttributes<HTMLTableCellElement> & {
|
|
684
|
+
truncate?: boolean;
|
|
685
|
+
} & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
675
686
|
declare const TableCaption: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableCaptionElement> & React$1.RefAttributes<HTMLTableCaptionElement>>;
|
|
676
687
|
|
|
677
688
|
type TableColumn = {
|
|
@@ -696,11 +707,13 @@ interface TableProps extends VariantProps<typeof tableElevationVariants> {
|
|
|
696
707
|
className?: string;
|
|
697
708
|
border?: boolean;
|
|
698
709
|
emptyState?: React$1.ReactNode;
|
|
710
|
+
tableLayout?: 'auto' | 'fixed';
|
|
699
711
|
}
|
|
700
712
|
declare const tableElevationVariants: (props?: ({
|
|
701
713
|
elevation?: string | number | null | undefined;
|
|
702
714
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
703
|
-
|
|
715
|
+
/** @deprecated Use the compositional table primitives (`TableContainer`, `TableHeader`, `TableBody`, `TableRow`, `TableHead`, `TableCell`) instead. */
|
|
716
|
+
declare const Table: ({ columns, rows, className, border, elevation, emptyState, tableLayout, }: TableProps) => react_jsx_runtime.JSX.Element;
|
|
704
717
|
|
|
705
718
|
declare const TabsContainer: React$1.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
706
719
|
declare const TabsList: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
package/dist/index.js
CHANGED
|
@@ -2702,21 +2702,67 @@ function SortButton({
|
|
|
2702
2702
|
] });
|
|
2703
2703
|
}
|
|
2704
2704
|
var tableElevationVariants = generateElevationVariants(styles50, "table", ELEVATION.RAISED);
|
|
2705
|
-
var TableContainer = React15.forwardRef(({ className, elevation = ELEVATION.RAISED, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2705
|
+
var TableContainer = React15.forwardRef(({ className, style, elevation = ELEVATION.RAISED, tableLayout, border, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2706
|
+
"div",
|
|
2707
|
+
{
|
|
2708
|
+
className: cn(
|
|
2709
|
+
styles50["table"],
|
|
2710
|
+
tableElevationVariants({ elevation }),
|
|
2711
|
+
border && styles50["table-border"],
|
|
2712
|
+
className
|
|
2713
|
+
),
|
|
2714
|
+
style,
|
|
2715
|
+
children: /* @__PURE__ */ jsx(
|
|
2716
|
+
"table",
|
|
2717
|
+
{
|
|
2718
|
+
ref,
|
|
2719
|
+
className: styles50["table-inner"],
|
|
2720
|
+
style: tableLayout ? { tableLayout } : void 0,
|
|
2721
|
+
...props
|
|
2722
|
+
}
|
|
2723
|
+
)
|
|
2724
|
+
}
|
|
2725
|
+
));
|
|
2706
2726
|
TableContainer.displayName = "Table";
|
|
2707
|
-
var TableHeader = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2727
|
+
var TableHeader = React15.forwardRef(({ className, sticky, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2728
|
+
"thead",
|
|
2729
|
+
{
|
|
2730
|
+
ref,
|
|
2731
|
+
className: cn(styles50["table-header"], sticky && styles50["table-header--sticky"], className),
|
|
2732
|
+
...props
|
|
2733
|
+
}
|
|
2734
|
+
));
|
|
2708
2735
|
TableHeader.displayName = "TableHeader";
|
|
2709
2736
|
var TableBody = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tbody", { ref, className: cn(styles50["table-body"], className), ...props }));
|
|
2710
2737
|
TableBody.displayName = "TableBody";
|
|
2711
2738
|
var TableFooter = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tfoot", { ref, className: cn(styles50["table-footer"], className), ...props }));
|
|
2712
2739
|
TableFooter.displayName = "TableFooter";
|
|
2713
|
-
var TableRow = React15.forwardRef(
|
|
2714
|
-
|
|
2715
|
-
|
|
2740
|
+
var TableRow = React15.forwardRef(({ className, clickable, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2741
|
+
"tr",
|
|
2742
|
+
{
|
|
2743
|
+
ref,
|
|
2744
|
+
className: cn(styles50["table-row"], clickable && styles50["table-row--clickable"], className),
|
|
2745
|
+
...props
|
|
2746
|
+
}
|
|
2747
|
+
));
|
|
2716
2748
|
TableRow.displayName = "TableRow";
|
|
2717
|
-
var TableHead = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2749
|
+
var TableHead = React15.forwardRef(({ className, truncate, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2750
|
+
"th",
|
|
2751
|
+
{
|
|
2752
|
+
ref,
|
|
2753
|
+
className: cn(styles50["table-head"], truncate && styles50["table-head--truncate"], className),
|
|
2754
|
+
...props
|
|
2755
|
+
}
|
|
2756
|
+
));
|
|
2718
2757
|
TableHead.displayName = "TableHead";
|
|
2719
|
-
var TableCell = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2758
|
+
var TableCell = React15.forwardRef(({ className, truncate, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2759
|
+
"td",
|
|
2760
|
+
{
|
|
2761
|
+
ref,
|
|
2762
|
+
className: cn(styles50["table-cell"], truncate && styles50["table-cell--truncate"], className),
|
|
2763
|
+
...props
|
|
2764
|
+
}
|
|
2765
|
+
));
|
|
2720
2766
|
TableCell.displayName = "TableCell";
|
|
2721
2767
|
var TableCaption = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("caption", { ref, className: cn(styles50["table-caption"], className), ...props }));
|
|
2722
2768
|
TableCaption.displayName = "TableCaption";
|
|
@@ -2727,7 +2773,8 @@ var Table = ({
|
|
|
2727
2773
|
className,
|
|
2728
2774
|
border = false,
|
|
2729
2775
|
elevation = ELEVATION.BASE,
|
|
2730
|
-
emptyState
|
|
2776
|
+
emptyState,
|
|
2777
|
+
tableLayout
|
|
2731
2778
|
}) => {
|
|
2732
2779
|
const isEmpty = rows.length === 0;
|
|
2733
2780
|
return /* @__PURE__ */ jsx(
|
|
@@ -2739,12 +2786,13 @@ var Table = ({
|
|
|
2739
2786
|
tableElevationVariants2({ elevation }),
|
|
2740
2787
|
className
|
|
2741
2788
|
),
|
|
2742
|
-
children: /* @__PURE__ */ jsxs(TableContainer, { elevation, children: [
|
|
2789
|
+
children: /* @__PURE__ */ jsxs(TableContainer, { elevation, tableLayout, children: [
|
|
2743
2790
|
/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsx(TableRow, { children: columns.map((column) => /* @__PURE__ */ jsx(TableHead, { className: column.className, children: column.content }, column.key)) }) }),
|
|
2744
2791
|
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(
|
|
2745
2792
|
TableRow,
|
|
2746
2793
|
{
|
|
2747
|
-
className:
|
|
2794
|
+
className: row.className,
|
|
2795
|
+
clickable: !!row.onClick,
|
|
2748
2796
|
onClick: row.onClick,
|
|
2749
2797
|
children: row.cells.map((cell) => /* @__PURE__ */ jsx(TableCell, { className: cell.className, children: cell.content }, cell.key))
|
|
2750
2798
|
},
|