@sarunyu/system-one 4.0.2 → 4.0.3

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
@@ -3957,7 +3957,7 @@ const TableCell = forwardRef(function TableCell2({
3957
3957
  textStyle = "default",
3958
3958
  selected,
3959
3959
  hovered,
3960
- label = "Text label",
3960
+ label,
3961
3961
  description = "Text Description",
3962
3962
  imageSrc,
3963
3963
  tagText = "Tag",
@@ -3968,6 +3968,7 @@ const TableCell = forwardRef(function TableCell2({
3968
3968
  fixedOffset = 0,
3969
3969
  fixedShadow,
3970
3970
  style: styleProp,
3971
+ children,
3971
3972
  ...props
3972
3973
  }, ref) {
3973
3974
  const { hasLeftOverflow, hasRightOverflow } = useContext(TableScrollShadowContext);
@@ -3982,6 +3983,7 @@ const TableCell = forwardRef(function TableCell2({
3982
3983
  const fixedStyle = fixed === "left" ? { left: fixedOffset } : fixed === "right" ? { right: fixedOffset } : void 0;
3983
3984
  const shadowDirection = resolveStickyShadowDirection(fixed, fixedShadow);
3984
3985
  const shouldShowShadow = shadowDirection === "right" ? hasLeftOverflow : shadowDirection === "left" ? hasRightOverflow : false;
3986
+ const primaryContent = children ?? label ?? "Text label";
3985
3987
  return /* @__PURE__ */ jsxs(
3986
3988
  "td",
3987
3989
  {
@@ -3999,13 +4001,13 @@ const TableCell = forwardRef(function TableCell2({
3999
4001
  children: [
4000
4002
  shadowDirection && shouldShowShadow && /* @__PURE__ */ jsx(StickyShadowEdge, { direction: shadowDirection }),
4001
4003
  type === "default" && /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col", children: [
4002
- /* @__PURE__ */ jsx("span", { className: cn("text-sm leading-5", primaryTextClass), children: label }),
4004
+ /* @__PURE__ */ jsx("span", { className: cn("text-sm leading-5", primaryTextClass), children: primaryContent }),
4003
4005
  hasDescription && /* @__PURE__ */ jsx("span", { className: "text-xs leading-4 font-normal text-subtle-text", children: description })
4004
4006
  ] }),
4005
4007
  type === "text-icon" && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
4006
4008
  icon ?? /* @__PURE__ */ jsx(Circle, { size: iconSize, weight: "regular", className: "shrink-0 text-subtle-text" }),
4007
4009
  /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col", children: [
4008
- /* @__PURE__ */ jsx("span", { className: cn("text-sm leading-5", primaryTextClass), children: label }),
4010
+ /* @__PURE__ */ jsx("span", { className: cn("text-sm leading-5", primaryTextClass), children: primaryContent }),
4009
4011
  hasDescription && /* @__PURE__ */ jsx("span", { className: "text-xs leading-4 font-normal text-subtle-text", children: description })
4010
4012
  ] })
4011
4013
  ] }),
@@ -4019,7 +4021,7 @@ const TableCell = forwardRef(function TableCell2({
4019
4021
  }
4020
4022
  ) : /* @__PURE__ */ jsx("div", { className: "size-full bg-hover-bg" }) }),
4021
4023
  /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col", children: [
4022
- /* @__PURE__ */ jsx("span", { className: cn("text-sm leading-5", primaryTextClass), children: label }),
4024
+ /* @__PURE__ */ jsx("span", { className: cn("text-sm leading-5", primaryTextClass), children: primaryContent }),
4023
4025
  hasDescription && /* @__PURE__ */ jsx("span", { className: "text-xs leading-4 font-normal text-subtle-text", children: description })
4024
4026
  ] })
4025
4027
  ] }),