@eqtylab/equality 1.9.0 → 1.9.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 +29 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +29 -7
- package/dist/index.js.map +1 -1
- package/dist/table-components.module.module.css.module.css +34 -14
- package/dist/theme.module.module.css.module.css +11 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -744,6 +744,8 @@ declare const TableBody: React$1.ForwardRefExoticComponent<React$1.HTMLAttribute
|
|
|
744
744
|
declare const TableFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
745
745
|
declare const TableRow: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableRowElement> & {
|
|
746
746
|
clickable?: boolean;
|
|
747
|
+
href?: string;
|
|
748
|
+
hrefLabel?: string;
|
|
747
749
|
} & React$1.RefAttributes<HTMLTableRowElement>>;
|
|
748
750
|
declare const TableHead: React$1.ForwardRefExoticComponent<React$1.ThHTMLAttributes<HTMLTableCellElement> & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
749
751
|
declare const TableCell: React$1.ForwardRefExoticComponent<React$1.TdHTMLAttributes<HTMLTableCellElement> & React$1.RefAttributes<HTMLTableCellElement>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -744,6 +744,8 @@ declare const TableBody: React$1.ForwardRefExoticComponent<React$1.HTMLAttribute
|
|
|
744
744
|
declare const TableFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
745
745
|
declare const TableRow: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableRowElement> & {
|
|
746
746
|
clickable?: boolean;
|
|
747
|
+
href?: string;
|
|
748
|
+
hrefLabel?: string;
|
|
747
749
|
} & React$1.RefAttributes<HTMLTableRowElement>>;
|
|
748
750
|
declare const TableHead: React$1.ForwardRefExoticComponent<React$1.ThHTMLAttributes<HTMLTableCellElement> & React$1.RefAttributes<HTMLTableCellElement>>;
|
|
749
751
|
declare const TableCell: React$1.ForwardRefExoticComponent<React$1.TdHTMLAttributes<HTMLTableCellElement> & React$1.RefAttributes<HTMLTableCellElement>>;
|
package/dist/index.js
CHANGED
|
@@ -3004,14 +3004,36 @@ var TableBody = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
3004
3004
|
TableBody.displayName = "TableBody";
|
|
3005
3005
|
var TableFooter = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tfoot", { ref, className: cn(styles52["table-footer"], className), ...props }));
|
|
3006
3006
|
TableFooter.displayName = "TableFooter";
|
|
3007
|
-
var TableRow = React16.forwardRef(
|
|
3008
|
-
"
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3007
|
+
var TableRow = React16.forwardRef(
|
|
3008
|
+
({ className, clickable, href, hrefLabel = "View details", children, onClick, ...props }, ref) => {
|
|
3009
|
+
const isClickable = clickable || !!href;
|
|
3010
|
+
const handleClick = (e) => {
|
|
3011
|
+
const target = e.target;
|
|
3012
|
+
if (target.closest("button, a:not([data-table-row-link])")) {
|
|
3013
|
+
return;
|
|
3014
|
+
}
|
|
3015
|
+
onClick?.(e);
|
|
3016
|
+
};
|
|
3017
|
+
return /* @__PURE__ */ jsxs(
|
|
3018
|
+
"tr",
|
|
3019
|
+
{
|
|
3020
|
+
ref,
|
|
3021
|
+
className: cn(
|
|
3022
|
+
styles52["table-row"],
|
|
3023
|
+
isClickable && styles52["table-row--clickable"],
|
|
3024
|
+
href && styles52["table-row--linked"],
|
|
3025
|
+
className
|
|
3026
|
+
),
|
|
3027
|
+
onClick: onClick ? handleClick : void 0,
|
|
3028
|
+
...props,
|
|
3029
|
+
children: [
|
|
3030
|
+
href && /* @__PURE__ */ jsx("a", { href, className: styles52["table-row-link"], "data-table-row-link": true, children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: hrefLabel }) }),
|
|
3031
|
+
children
|
|
3032
|
+
]
|
|
3033
|
+
}
|
|
3034
|
+
);
|
|
3013
3035
|
}
|
|
3014
|
-
)
|
|
3036
|
+
);
|
|
3015
3037
|
TableRow.displayName = "TableRow";
|
|
3016
3038
|
var TableHead = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("th", { ref, className: cn(styles52["table-head"], className), ...props }));
|
|
3017
3039
|
TableHead.displayName = "TableHead";
|