@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.cjs +13 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/data-table.tsx +13 -2
- package/src/dropdown-menu.tsx +9 -3
package/dist/index.cjs
CHANGED
|
@@ -3099,7 +3099,9 @@ var DropdownMenuSubTrigger = React27.forwardRef(({ className, inset, children, .
|
|
|
3099
3099
|
{
|
|
3100
3100
|
ref,
|
|
3101
3101
|
className: cn(
|
|
3102
|
-
|
|
3102
|
+
// Matches DropdownMenuItem: a submenu row sits in the same list as the
|
|
3103
|
+
// plain rows, so it cannot be a different size from them.
|
|
3104
|
+
"flex cursor-default select-none items-center gap-2 rounded-lg px-2.5 py-1.5 text-[13px] outline-none",
|
|
3103
3105
|
"focus:bg-muted data-[state=open]:bg-muted",
|
|
3104
3106
|
inset && "pl-8",
|
|
3105
3107
|
className
|
|
@@ -3161,7 +3163,9 @@ var DropdownMenuCheckboxItem = React27.forwardRef(({ className, children, checke
|
|
|
3161
3163
|
{
|
|
3162
3164
|
ref,
|
|
3163
3165
|
className: cn(
|
|
3164
|
-
|
|
3166
|
+
// Matches DropdownMenuItem. `pl-8` stays: that gutter is the check /
|
|
3167
|
+
// dot indicator's, not padding.
|
|
3168
|
+
"relative flex cursor-default select-none items-center rounded-lg py-1.5 pl-8 pr-2.5 text-[13px] outline-none transition-colors",
|
|
3165
3169
|
"focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
3166
3170
|
className
|
|
3167
3171
|
),
|
|
@@ -3179,7 +3183,9 @@ var DropdownMenuRadioItem = React27.forwardRef(({ className, children, ...props
|
|
|
3179
3183
|
{
|
|
3180
3184
|
ref,
|
|
3181
3185
|
className: cn(
|
|
3182
|
-
|
|
3186
|
+
// Matches DropdownMenuItem. `pl-8` stays: that gutter is the check /
|
|
3187
|
+
// dot indicator's, not padding.
|
|
3188
|
+
"relative flex cursor-default select-none items-center rounded-lg py-1.5 pl-8 pr-2.5 text-[13px] outline-none transition-colors",
|
|
3183
3189
|
"focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
3184
3190
|
className
|
|
3185
3191
|
),
|
|
@@ -3904,6 +3910,7 @@ function DataTable({
|
|
|
3904
3910
|
seenKeys.set(base, seen + 1);
|
|
3905
3911
|
return seen === 0 ? base : `${base}__${seen}`;
|
|
3906
3912
|
});
|
|
3913
|
+
const isEmpty = !isLoading && paginated.length === 0;
|
|
3907
3914
|
const comfortable = density === "comfortable";
|
|
3908
3915
|
const compact = density === "compact";
|
|
3909
3916
|
const compactCellPad = compact ? snug ? "pl-1.5 pr-2.5 py-2.5" : "px-3 py-2.5" : "px-4 py-3.5";
|
|
@@ -3951,7 +3958,7 @@ function DataTable({
|
|
|
3951
3958
|
width: "100%"
|
|
3952
3959
|
},
|
|
3953
3960
|
children: [
|
|
3954
|
-
tableLayout === "fixed" && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("colgroup", { children: [
|
|
3961
|
+
tableLayout === "fixed" && !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("colgroup", { children: [
|
|
3955
3962
|
hasExpand ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("col", { style: { width: 40 } }) : null,
|
|
3956
3963
|
columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3957
3964
|
"col",
|
|
@@ -3991,7 +3998,8 @@ function DataTable({
|
|
|
3991
3998
|
headText,
|
|
3992
3999
|
"whitespace-nowrap align-middle",
|
|
3993
4000
|
col.align === "right" ? "text-right" : col.align === "center" ? "text-center" : "text-left",
|
|
3994
|
-
|
|
4001
|
+
// Width hints live in `cellClassName`; see `isEmpty`.
|
|
4002
|
+
!isEmpty && col.cellClassName
|
|
3995
4003
|
),
|
|
3996
4004
|
children: col.header
|
|
3997
4005
|
},
|