@eqtylab/equality 1.4.0 → 1.5.0

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.
@@ -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,62 @@ 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("div", { className: cn(styles50__default.default["table"], tableElevationVariants({ elevation }), className), children: /* @__PURE__ */ jsxRuntime.jsx("table", { ref, className: styles50__default.default["table-inner"], ...props }) }));
2807
+ var TableContainer = React15__namespace.forwardRef(({ className, style, elevation = ELEVATION.RAISED, tableLayout, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
2808
+ "div",
2809
+ {
2810
+ className: cn(styles50__default.default["table"], tableElevationVariants({ elevation }), className),
2811
+ style,
2812
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2813
+ "table",
2814
+ {
2815
+ ref,
2816
+ className: styles50__default.default["table-inner"],
2817
+ style: tableLayout ? { tableLayout } : void 0,
2818
+ ...props
2819
+ }
2820
+ )
2821
+ }
2822
+ ));
2808
2823
  TableContainer.displayName = "Table";
2809
- var TableHeader = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className: cn(styles50__default.default["table-header"], className), ...props }));
2824
+ var TableHeader = React15__namespace.forwardRef(({ className, sticky, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
2825
+ "thead",
2826
+ {
2827
+ ref,
2828
+ className: cn(styles50__default.default["table-header"], sticky && styles50__default.default["table-header--sticky"], className),
2829
+ ...props
2830
+ }
2831
+ ));
2810
2832
  TableHeader.displayName = "TableHeader";
2811
2833
  var TableBody = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("tbody", { ref, className: cn(styles50__default.default["table-body"], className), ...props }));
2812
2834
  TableBody.displayName = "TableBody";
2813
2835
  var TableFooter = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("tfoot", { ref, className: cn(styles50__default.default["table-footer"], className), ...props }));
2814
2836
  TableFooter.displayName = "TableFooter";
2815
- var TableRow = React15__namespace.forwardRef(
2816
- ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("tr", { ref, className: cn(styles50__default.default["table-row"], className), ...props })
2817
- );
2837
+ var TableRow = React15__namespace.forwardRef(({ className, clickable, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
2838
+ "tr",
2839
+ {
2840
+ ref,
2841
+ className: cn(styles50__default.default["table-row"], clickable && styles50__default.default["table-row--clickable"], className),
2842
+ ...props
2843
+ }
2844
+ ));
2818
2845
  TableRow.displayName = "TableRow";
2819
- var TableHead = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("th", { ref, className: cn(styles50__default.default["table-head"], className), ...props }));
2846
+ var TableHead = React15__namespace.forwardRef(({ className, truncate, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
2847
+ "th",
2848
+ {
2849
+ ref,
2850
+ className: cn(styles50__default.default["table-head"], truncate && styles50__default.default["table-head--truncate"], className),
2851
+ ...props
2852
+ }
2853
+ ));
2820
2854
  TableHead.displayName = "TableHead";
2821
- var TableCell = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("td", { ref, className: cn(styles50__default.default["table-cell"], className), ...props }));
2855
+ var TableCell = React15__namespace.forwardRef(({ className, truncate, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
2856
+ "td",
2857
+ {
2858
+ ref,
2859
+ className: cn(styles50__default.default["table-cell"], truncate && styles50__default.default["table-cell--truncate"], className),
2860
+ ...props
2861
+ }
2862
+ ));
2822
2863
  TableCell.displayName = "TableCell";
2823
2864
  var TableCaption = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("caption", { ref, className: cn(styles50__default.default["table-caption"], className), ...props }));
2824
2865
  TableCaption.displayName = "TableCaption";
@@ -2829,7 +2870,8 @@ var Table = ({
2829
2870
  className,
2830
2871
  border = false,
2831
2872
  elevation = ELEVATION.BASE,
2832
- emptyState
2873
+ emptyState,
2874
+ tableLayout
2833
2875
  }) => {
2834
2876
  const isEmpty = rows.length === 0;
2835
2877
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -2841,12 +2883,13 @@ var Table = ({
2841
2883
  tableElevationVariants2({ elevation }),
2842
2884
  className
2843
2885
  ),
2844
- children: /* @__PURE__ */ jsxRuntime.jsxs(TableContainer, { elevation, children: [
2886
+ children: /* @__PURE__ */ jsxRuntime.jsxs(TableContainer, { elevation, tableLayout, children: [
2845
2887
  /* @__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
2888
  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
2889
  TableRow,
2848
2890
  {
2849
- className: cn(row.className, row.onClick && styles51__default.default["table-row-clickable"]),
2891
+ className: row.className,
2892
+ clickable: !!row.onClick,
2850
2893
  onClick: row.onClick,
2851
2894
  children: row.cells.map((cell) => /* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: cell.className, children: cell.content }, cell.key))
2852
2895
  },