@payglocal_ui/flux-ui 0.2.5 → 0.2.6

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
@@ -2851,7 +2851,9 @@ var DropdownMenuSubTrigger = React27.forwardRef(({ className, inset, children, .
2851
2851
  {
2852
2852
  ref,
2853
2853
  className: cn(
2854
- "flex cursor-default select-none items-center gap-2 rounded-lg px-3 py-2.5 text-[15px] outline-none",
2854
+ // Matches DropdownMenuItem: a submenu row sits in the same list as the
2855
+ // plain rows, so it cannot be a different size from them.
2856
+ "flex cursor-default select-none items-center gap-2 rounded-lg px-2.5 py-1.5 text-[13px] outline-none",
2855
2857
  "focus:bg-muted data-[state=open]:bg-muted",
2856
2858
  inset && "pl-8",
2857
2859
  className
@@ -2913,7 +2915,9 @@ var DropdownMenuCheckboxItem = React27.forwardRef(({ className, children, checke
2913
2915
  {
2914
2916
  ref,
2915
2917
  className: cn(
2916
- "relative flex cursor-default select-none items-center rounded-lg py-2 pl-8 pr-2 text-sm outline-none transition-colors",
2918
+ // Matches DropdownMenuItem. `pl-8` stays: that gutter is the check /
2919
+ // dot indicator's, not padding.
2920
+ "relative flex cursor-default select-none items-center rounded-lg py-1.5 pl-8 pr-2.5 text-[13px] outline-none transition-colors",
2917
2921
  "focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
2918
2922
  className
2919
2923
  ),
@@ -2931,7 +2935,9 @@ var DropdownMenuRadioItem = React27.forwardRef(({ className, children, ...props
2931
2935
  {
2932
2936
  ref,
2933
2937
  className: cn(
2934
- "relative flex cursor-default select-none items-center rounded-lg py-2 pl-8 pr-2 text-sm outline-none transition-colors",
2938
+ // Matches DropdownMenuItem. `pl-8` stays: that gutter is the check /
2939
+ // dot indicator's, not padding.
2940
+ "relative flex cursor-default select-none items-center rounded-lg py-1.5 pl-8 pr-2.5 text-[13px] outline-none transition-colors",
2935
2941
  "focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
2936
2942
  className
2937
2943
  ),
@@ -3656,6 +3662,7 @@ function DataTable({
3656
3662
  seenKeys.set(base, seen + 1);
3657
3663
  return seen === 0 ? base : `${base}__${seen}`;
3658
3664
  });
3665
+ const isEmpty = !isLoading && paginated.length === 0;
3659
3666
  const comfortable = density === "comfortable";
3660
3667
  const compact = density === "compact";
3661
3668
  const compactCellPad = compact ? snug ? "pl-1.5 pr-2.5 py-2.5" : "px-3 py-2.5" : "px-4 py-3.5";
@@ -3703,7 +3710,7 @@ function DataTable({
3703
3710
  width: "100%"
3704
3711
  },
3705
3712
  children: [
3706
- tableLayout === "fixed" && /* @__PURE__ */ jsxs30("colgroup", { children: [
3713
+ tableLayout === "fixed" && !isEmpty && /* @__PURE__ */ jsxs30("colgroup", { children: [
3707
3714
  hasExpand ? /* @__PURE__ */ jsx49("col", { style: { width: 40 } }) : null,
3708
3715
  columns.map((col) => /* @__PURE__ */ jsx49(
3709
3716
  "col",
@@ -3743,7 +3750,8 @@ function DataTable({
3743
3750
  headText,
3744
3751
  "whitespace-nowrap align-middle",
3745
3752
  col.align === "right" ? "text-right" : col.align === "center" ? "text-center" : "text-left",
3746
- col.cellClassName
3753
+ // Width hints live in `cellClassName`; see `isEmpty`.
3754
+ !isEmpty && col.cellClassName
3747
3755
  ),
3748
3756
  children: col.header
3749
3757
  },