@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
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
display: flex;
|
|
10
10
|
align-items: center;
|
|
11
11
|
width: max-content;
|
|
12
|
+
--tw-numeric-spacing: tabular-nums;
|
|
13
|
+
font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);
|
|
12
14
|
}
|
|
13
15
|
.badge--md {
|
|
14
16
|
padding-inline: calc(0.25rem * 2);
|
|
@@ -186,3 +188,23 @@
|
|
|
186
188
|
syntax: "*";
|
|
187
189
|
inherits: false;
|
|
188
190
|
}
|
|
191
|
+
@property --tw-ordinal {
|
|
192
|
+
syntax: "*";
|
|
193
|
+
inherits: false;
|
|
194
|
+
}
|
|
195
|
+
@property --tw-slashed-zero {
|
|
196
|
+
syntax: "*";
|
|
197
|
+
inherits: false;
|
|
198
|
+
}
|
|
199
|
+
@property --tw-numeric-figure {
|
|
200
|
+
syntax: "*";
|
|
201
|
+
inherits: false;
|
|
202
|
+
}
|
|
203
|
+
@property --tw-numeric-spacing {
|
|
204
|
+
syntax: "*";
|
|
205
|
+
inherits: false;
|
|
206
|
+
}
|
|
207
|
+
@property --tw-numeric-fraction {
|
|
208
|
+
syntax: "*";
|
|
209
|
+
inherits: false;
|
|
210
|
+
}
|
package/dist/index.cjs
CHANGED
|
@@ -2804,21 +2804,67 @@ function SortButton({
|
|
|
2804
2804
|
] });
|
|
2805
2805
|
}
|
|
2806
2806
|
var tableElevationVariants = generateElevationVariants(styles50__default.default, "table", ELEVATION.RAISED);
|
|
2807
|
-
var TableContainer = React15__namespace.forwardRef(({ className, elevation = ELEVATION.RAISED, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2807
|
+
var TableContainer = React15__namespace.forwardRef(({ className, style, elevation = ELEVATION.RAISED, tableLayout, border, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2808
|
+
"div",
|
|
2809
|
+
{
|
|
2810
|
+
className: cn(
|
|
2811
|
+
styles50__default.default["table"],
|
|
2812
|
+
tableElevationVariants({ elevation }),
|
|
2813
|
+
border && styles50__default.default["table-border"],
|
|
2814
|
+
className
|
|
2815
|
+
),
|
|
2816
|
+
style,
|
|
2817
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2818
|
+
"table",
|
|
2819
|
+
{
|
|
2820
|
+
ref,
|
|
2821
|
+
className: styles50__default.default["table-inner"],
|
|
2822
|
+
style: tableLayout ? { tableLayout } : void 0,
|
|
2823
|
+
...props
|
|
2824
|
+
}
|
|
2825
|
+
)
|
|
2826
|
+
}
|
|
2827
|
+
));
|
|
2808
2828
|
TableContainer.displayName = "Table";
|
|
2809
|
-
var TableHeader = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2829
|
+
var TableHeader = React15__namespace.forwardRef(({ className, sticky, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2830
|
+
"thead",
|
|
2831
|
+
{
|
|
2832
|
+
ref,
|
|
2833
|
+
className: cn(styles50__default.default["table-header"], sticky && styles50__default.default["table-header--sticky"], className),
|
|
2834
|
+
...props
|
|
2835
|
+
}
|
|
2836
|
+
));
|
|
2810
2837
|
TableHeader.displayName = "TableHeader";
|
|
2811
2838
|
var TableBody = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("tbody", { ref, className: cn(styles50__default.default["table-body"], className), ...props }));
|
|
2812
2839
|
TableBody.displayName = "TableBody";
|
|
2813
2840
|
var TableFooter = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("tfoot", { ref, className: cn(styles50__default.default["table-footer"], className), ...props }));
|
|
2814
2841
|
TableFooter.displayName = "TableFooter";
|
|
2815
|
-
var TableRow = React15__namespace.forwardRef(
|
|
2816
|
-
|
|
2817
|
-
|
|
2842
|
+
var TableRow = React15__namespace.forwardRef(({ className, clickable, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2843
|
+
"tr",
|
|
2844
|
+
{
|
|
2845
|
+
ref,
|
|
2846
|
+
className: cn(styles50__default.default["table-row"], clickable && styles50__default.default["table-row--clickable"], className),
|
|
2847
|
+
...props
|
|
2848
|
+
}
|
|
2849
|
+
));
|
|
2818
2850
|
TableRow.displayName = "TableRow";
|
|
2819
|
-
var TableHead = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2851
|
+
var TableHead = React15__namespace.forwardRef(({ className, truncate, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2852
|
+
"th",
|
|
2853
|
+
{
|
|
2854
|
+
ref,
|
|
2855
|
+
className: cn(styles50__default.default["table-head"], truncate && styles50__default.default["table-head--truncate"], className),
|
|
2856
|
+
...props
|
|
2857
|
+
}
|
|
2858
|
+
));
|
|
2820
2859
|
TableHead.displayName = "TableHead";
|
|
2821
|
-
var TableCell = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2860
|
+
var TableCell = React15__namespace.forwardRef(({ className, truncate, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2861
|
+
"td",
|
|
2862
|
+
{
|
|
2863
|
+
ref,
|
|
2864
|
+
className: cn(styles50__default.default["table-cell"], truncate && styles50__default.default["table-cell--truncate"], className),
|
|
2865
|
+
...props
|
|
2866
|
+
}
|
|
2867
|
+
));
|
|
2822
2868
|
TableCell.displayName = "TableCell";
|
|
2823
2869
|
var TableCaption = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("caption", { ref, className: cn(styles50__default.default["table-caption"], className), ...props }));
|
|
2824
2870
|
TableCaption.displayName = "TableCaption";
|
|
@@ -2829,7 +2875,8 @@ var Table = ({
|
|
|
2829
2875
|
className,
|
|
2830
2876
|
border = false,
|
|
2831
2877
|
elevation = ELEVATION.BASE,
|
|
2832
|
-
emptyState
|
|
2878
|
+
emptyState,
|
|
2879
|
+
tableLayout
|
|
2833
2880
|
}) => {
|
|
2834
2881
|
const isEmpty = rows.length === 0;
|
|
2835
2882
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2841,12 +2888,13 @@ var Table = ({
|
|
|
2841
2888
|
tableElevationVariants2({ elevation }),
|
|
2842
2889
|
className
|
|
2843
2890
|
),
|
|
2844
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(TableContainer, { elevation, children: [
|
|
2891
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(TableContainer, { elevation, tableLayout, children: [
|
|
2845
2892
|
/* @__PURE__ */ jsxRuntime.jsx(TableHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(TableRow, { children: columns.map((column) => /* @__PURE__ */ jsxRuntime.jsx(TableHead, { className: column.className, children: column.content }, column.key)) }) }),
|
|
2846
2893
|
isEmpty && emptyState ? /* @__PURE__ */ jsxRuntime.jsx(TableBody, { children: /* @__PURE__ */ jsxRuntime.jsx(TableRow, { children: /* @__PURE__ */ jsxRuntime.jsx(TableCell, { colSpan: columns.length, className: styles51__default.default["table-empty-state"], children: emptyState }) }) }) : /* @__PURE__ */ jsxRuntime.jsx(TableBody, { children: rows.map((row) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2847
2894
|
TableRow,
|
|
2848
2895
|
{
|
|
2849
|
-
className:
|
|
2896
|
+
className: row.className,
|
|
2897
|
+
clickable: !!row.onClick,
|
|
2850
2898
|
onClick: row.onClick,
|
|
2851
2899
|
children: row.cells.map((cell) => /* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: cell.className, children: cell.content }, cell.key))
|
|
2852
2900
|
},
|