infinity-ui-elements 1.8.16 → 1.8.18

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.esm.js CHANGED
@@ -1621,7 +1621,7 @@ const Checkbox = React.forwardRef(({ label, errorText, size = "medium", validati
1621
1621
  },
1622
1622
  large: {
1623
1623
  gap: "gap-3",
1624
- labelSize: "text-body-large-regular",
1624
+ labelSize: "text-body-medium-regular",
1625
1625
  iconSize: 14,
1626
1626
  },
1627
1627
  };
@@ -3677,7 +3677,7 @@ const switchVariants = cva("relative inline-flex items-center shrink-0 cursor-po
3677
3677
  isDisabled: false,
3678
3678
  },
3679
3679
  });
3680
- const switchThumbVariants = cva("inline-block rounded-full bg-neutral-00 shadow-sm transition-transform duration-200", {
3680
+ const switchThumbVariants = cva("inline-block rounded-full bg-white shadow-sm transition-transform duration-200", {
3681
3681
  variants: {
3682
3682
  size: {
3683
3683
  small: "h-[8px] w-[8px]",
@@ -3762,11 +3762,11 @@ const Switch = React.forwardRef(({ label, size = "medium", isDisabled = false, c
3762
3762
  },
3763
3763
  medium: {
3764
3764
  gap: "gap-2.5",
3765
- labelSize: "text-body-medium-regular",
3765
+ labelSize: "text-body-small-regular",
3766
3766
  },
3767
3767
  large: {
3768
3768
  gap: "gap-3",
3769
- labelSize: "text-body-large-regular",
3769
+ labelSize: "text-body-medium-regular",
3770
3770
  },
3771
3771
  };
3772
3772
  const config = sizeConfig[size];
@@ -3794,6 +3794,7 @@ const tableVariants = cva("w-full border-collapse", {
3794
3794
  small: "text-body-small-medium",
3795
3795
  medium: "text-body-medium-medium",
3796
3796
  large: "text-body-large-medium",
3797
+ auto: "text-body-medium-medium",
3797
3798
  },
3798
3799
  },
3799
3800
  defaultVariants: {
@@ -3801,24 +3802,26 @@ const tableVariants = cva("w-full border-collapse", {
3801
3802
  size: "medium",
3802
3803
  },
3803
3804
  });
3804
- const tableHeaderVariants = cva("text-body-medium-regular text-left text-surface-ink-neutral-normal border-b border-surface-outline-neutral-muted", {
3805
+ const tableHeaderVariants = cva("text-body-medium-regular text-left text-surface-ink-neutral-normal border-b border-surface-outline-neutral-muted box-border", {
3805
3806
  variants: {
3806
3807
  size: {
3807
3808
  small: "px-3 py-2 h-[32px]",
3808
3809
  medium: "px-4 py-3 h-[40px]",
3809
3810
  large: "px-6 py-4 h-[48px]",
3811
+ auto: "px-4 py-3 h-[56px]",
3810
3812
  },
3811
3813
  },
3812
3814
  defaultVariants: {
3813
3815
  size: "medium",
3814
3816
  },
3815
3817
  });
3816
- const tableCellVariants = cva("text-body-medium-regular border-b border-surface-outline-neutral-muted text-surface-ink-neutral-normal transition-colors duration-150", {
3818
+ const tableCellVariants = cva("text-body-medium-regular border-b border-surface-outline-neutral-muted text-surface-ink-neutral-normal transition-colors duration-150 box-border", {
3817
3819
  variants: {
3818
3820
  size: {
3819
3821
  small: "px-3 py-2 h-[40px]",
3820
3822
  medium: "px-4 py-3 h-[72px]",
3821
3823
  large: "px-6 py-4 h-[56px]",
3824
+ auto: "px-4 py-3",
3822
3825
  },
3823
3826
  state: {
3824
3827
  default: "",
@@ -3838,6 +3841,7 @@ function TableHeader({ headerGroups, enableRowSelection, enableSelectAll, showHe
3838
3841
  small: 32,
3839
3842
  medium: 40,
3840
3843
  large: 48,
3844
+ auto: 56,
3841
3845
  }[size] ?? 40;
3842
3846
  return (jsx("thead", { className: cn(showHeaderBackground ? "bg-surface-fill-neutral-moderate" : "bg-white", stickyHeader && "sticky top-0 z-10"), children: headerGroups.map((headerGroup, groupIndex) => {
3843
3847
  const stickyTop = stickyHeader ? groupIndex * headerHeight : undefined;
@@ -3939,6 +3943,7 @@ function TableComponent({ className, wrapperClassName, containerClassName, varia
3939
3943
  small: 16,
3940
3944
  medium: 20,
3941
3945
  large: 24,
3946
+ auto: "auto",
3942
3947
  };
3943
3948
  const skeletonCellHeight = normalizeSizeValue(loadingSkeletonHeight ?? skeletonHeightMap[sizeKey]);
3944
3949
  const selectionSkeletonSize = sizeKey === "small" ? 14 : sizeKey === "large" ? 20 : 16;
@@ -3987,7 +3992,7 @@ function TableComponent({ className, wrapperClassName, containerClassName, varia
3987
3992
  return renderDefaultEmptyState({ colSpan: table.getAllColumns().length });
3988
3993
  };
3989
3994
  // ==================== Render ====================
3990
- return (jsx("div", { ref: ref, className: cn("w-full", wrapperClassName), ...props, children: jsx("div", { className: cn("relative", enableHorizontalScroll ? "overflow-x-auto" : "overflow-x-hidden", maxHeight && "overflow-y-auto", containerClassName), style: containerStyle, children: jsxs("table", { className: cn(tableVariants({ variant, size }), className), children: [jsx(TableHeader, { headerGroups: headerGroups, enableRowSelection: enableRowSelection, enableSelectAll: enableSelectAll, showHeaderBackground: showHeaderBackground, stickyHeader: stickyHeader, size: size || "medium", headerClassName: headerClassName, onToggleAllRows: (e) => table.getToggleAllRowsSelectedHandler()(e), isAllRowsSelected: table.getIsAllRowsSelected(), isSomeRowsSelected: table.getIsSomeRowsSelected(), getColumnStyle: getColumnStyle }), resolvedLoading ? (jsx("tbody", { children: renderLoadingContent() })) : !hasData ? (jsx("tbody", { children: renderEmptyState() })) : (jsx(TableBody, { rows: table.getRowModel().rows, enableRowSelection: enableRowSelection, size: size || "medium", variant: variant || "default", showRowHover: showRowHover, cellClassName: cellClassName, onRowClick: onRowClick, getRowClassName: getRowClassName, handleRowClick: handleRowClickInternal, getColumnStyle: getColumnStyle }))] }) }) }));
3995
+ return (jsx("div", { ref: ref, className: cn("w-full", wrapperClassName), ...props, children: jsx("div", { className: cn("relative", enableHorizontalScroll ? "overflow-x-auto" : "overflow-x-hidden", maxHeight && "overflow-y-auto", containerClassName), style: containerStyle, children: jsxs("table", { className: cn(tableVariants({ variant, size }), className), children: [jsx(TableHeader, { headerGroups: headerGroups, enableRowSelection: enableRowSelection, enableSelectAll: enableSelectAll, showHeaderBackground: showHeaderBackground, stickyHeader: stickyHeader, size: size, headerClassName: headerClassName, onToggleAllRows: (e) => table.getToggleAllRowsSelectedHandler()(e), isAllRowsSelected: table.getIsAllRowsSelected(), isSomeRowsSelected: table.getIsSomeRowsSelected(), getColumnStyle: getColumnStyle }), resolvedLoading ? (jsx("tbody", { children: renderLoadingContent() })) : !hasData ? (jsx("tbody", { children: renderEmptyState() })) : (jsx(TableBody, { rows: table.getRowModel().rows, enableRowSelection: enableRowSelection, size: size || "medium", variant: variant || "default", showRowHover: showRowHover, cellClassName: cellClassName, onRowClick: onRowClick, getRowClassName: getRowClassName, handleRowClick: handleRowClickInternal, getColumnStyle: getColumnStyle }))] }) }) }));
3991
3996
  }
3992
3997
  // ==================== Export ====================
3993
3998
  const Table = React.forwardRef(TableComponent);