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.js CHANGED
@@ -1642,7 +1642,7 @@ const Checkbox = React__namespace.forwardRef(({ label, errorText, size = "medium
1642
1642
  },
1643
1643
  large: {
1644
1644
  gap: "gap-3",
1645
- labelSize: "text-body-large-regular",
1645
+ labelSize: "text-body-medium-regular",
1646
1646
  iconSize: 14,
1647
1647
  },
1648
1648
  };
@@ -3698,7 +3698,7 @@ const switchVariants = classVarianceAuthority.cva("relative inline-flex items-ce
3698
3698
  isDisabled: false,
3699
3699
  },
3700
3700
  });
3701
- const switchThumbVariants = classVarianceAuthority.cva("inline-block rounded-full bg-neutral-00 shadow-sm transition-transform duration-200", {
3701
+ const switchThumbVariants = classVarianceAuthority.cva("inline-block rounded-full bg-white shadow-sm transition-transform duration-200", {
3702
3702
  variants: {
3703
3703
  size: {
3704
3704
  small: "h-[8px] w-[8px]",
@@ -3783,11 +3783,11 @@ const Switch = React__namespace.forwardRef(({ label, size = "medium", isDisabled
3783
3783
  },
3784
3784
  medium: {
3785
3785
  gap: "gap-2.5",
3786
- labelSize: "text-body-medium-regular",
3786
+ labelSize: "text-body-small-regular",
3787
3787
  },
3788
3788
  large: {
3789
3789
  gap: "gap-3",
3790
- labelSize: "text-body-large-regular",
3790
+ labelSize: "text-body-medium-regular",
3791
3791
  },
3792
3792
  };
3793
3793
  const config = sizeConfig[size];
@@ -3815,6 +3815,7 @@ const tableVariants = classVarianceAuthority.cva("w-full border-collapse", {
3815
3815
  small: "text-body-small-medium",
3816
3816
  medium: "text-body-medium-medium",
3817
3817
  large: "text-body-large-medium",
3818
+ auto: "text-body-medium-medium",
3818
3819
  },
3819
3820
  },
3820
3821
  defaultVariants: {
@@ -3822,24 +3823,26 @@ const tableVariants = classVarianceAuthority.cva("w-full border-collapse", {
3822
3823
  size: "medium",
3823
3824
  },
3824
3825
  });
3825
- const tableHeaderVariants = classVarianceAuthority.cva("text-body-medium-regular text-left text-surface-ink-neutral-normal border-b border-surface-outline-neutral-muted", {
3826
+ const tableHeaderVariants = classVarianceAuthority.cva("text-body-medium-regular text-left text-surface-ink-neutral-normal border-b border-surface-outline-neutral-muted box-border", {
3826
3827
  variants: {
3827
3828
  size: {
3828
3829
  small: "px-3 py-2 h-[32px]",
3829
3830
  medium: "px-4 py-3 h-[40px]",
3830
3831
  large: "px-6 py-4 h-[48px]",
3832
+ auto: "px-4 py-3 h-[56px]",
3831
3833
  },
3832
3834
  },
3833
3835
  defaultVariants: {
3834
3836
  size: "medium",
3835
3837
  },
3836
3838
  });
3837
- const tableCellVariants = classVarianceAuthority.cva("text-body-medium-regular border-b border-surface-outline-neutral-muted text-surface-ink-neutral-normal transition-colors duration-150", {
3839
+ const tableCellVariants = classVarianceAuthority.cva("text-body-medium-regular border-b border-surface-outline-neutral-muted text-surface-ink-neutral-normal transition-colors duration-150 box-border", {
3838
3840
  variants: {
3839
3841
  size: {
3840
3842
  small: "px-3 py-2 h-[40px]",
3841
3843
  medium: "px-4 py-3 h-[72px]",
3842
3844
  large: "px-6 py-4 h-[56px]",
3845
+ auto: "px-4 py-3",
3843
3846
  },
3844
3847
  state: {
3845
3848
  default: "",
@@ -3859,6 +3862,7 @@ function TableHeader({ headerGroups, enableRowSelection, enableSelectAll, showHe
3859
3862
  small: 32,
3860
3863
  medium: 40,
3861
3864
  large: 48,
3865
+ auto: 56,
3862
3866
  }[size] ?? 40;
3863
3867
  return (jsxRuntime.jsx("thead", { className: cn(showHeaderBackground ? "bg-surface-fill-neutral-moderate" : "bg-white", stickyHeader && "sticky top-0 z-10"), children: headerGroups.map((headerGroup, groupIndex) => {
3864
3868
  const stickyTop = stickyHeader ? groupIndex * headerHeight : undefined;
@@ -3960,6 +3964,7 @@ function TableComponent({ className, wrapperClassName, containerClassName, varia
3960
3964
  small: 16,
3961
3965
  medium: 20,
3962
3966
  large: 24,
3967
+ auto: "auto",
3963
3968
  };
3964
3969
  const skeletonCellHeight = normalizeSizeValue(loadingSkeletonHeight ?? skeletonHeightMap[sizeKey]);
3965
3970
  const selectionSkeletonSize = sizeKey === "small" ? 14 : sizeKey === "large" ? 20 : 16;
@@ -4008,7 +4013,7 @@ function TableComponent({ className, wrapperClassName, containerClassName, varia
4008
4013
  return renderDefaultEmptyState({ colSpan: table.getAllColumns().length });
4009
4014
  };
4010
4015
  // ==================== Render ====================
4011
- return (jsxRuntime.jsx("div", { ref: ref, className: cn("w-full", wrapperClassName), ...props, children: jsxRuntime.jsx("div", { className: cn("relative", enableHorizontalScroll ? "overflow-x-auto" : "overflow-x-hidden", maxHeight && "overflow-y-auto", containerClassName), style: containerStyle, children: jsxRuntime.jsxs("table", { className: cn(tableVariants({ variant, size }), className), children: [jsxRuntime.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 ? (jsxRuntime.jsx("tbody", { children: renderLoadingContent() })) : !hasData ? (jsxRuntime.jsx("tbody", { children: renderEmptyState() })) : (jsxRuntime.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 }))] }) }) }));
4016
+ return (jsxRuntime.jsx("div", { ref: ref, className: cn("w-full", wrapperClassName), ...props, children: jsxRuntime.jsx("div", { className: cn("relative", enableHorizontalScroll ? "overflow-x-auto" : "overflow-x-hidden", maxHeight && "overflow-y-auto", containerClassName), style: containerStyle, children: jsxRuntime.jsxs("table", { className: cn(tableVariants({ variant, size }), className), children: [jsxRuntime.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 ? (jsxRuntime.jsx("tbody", { children: renderLoadingContent() })) : !hasData ? (jsxRuntime.jsx("tbody", { children: renderEmptyState() })) : (jsxRuntime.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 }))] }) }) }));
4012
4017
  }
4013
4018
  // ==================== Export ====================
4014
4019
  const Table = React__namespace.forwardRef(TableComponent);