@payglocal_ui/flux-ui 0.2.4 → 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 +195 -101
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +57 -3
- package/dist/index.d.ts +57 -3
- package/dist/index.js +206 -112
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/data-table.tsx +194 -31
- package/src/dropdown-menu.tsx +13 -4
- package/src/index.ts +2 -1
- package/src/select.tsx +20 -3
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
|
-
|
|
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
|
|
@@ -2896,7 +2898,10 @@ var DropdownMenuItem = React27.forwardRef(({ className, inset, ...props }, ref)
|
|
|
2896
2898
|
{
|
|
2897
2899
|
ref,
|
|
2898
2900
|
className: cn(
|
|
2899
|
-
|
|
2901
|
+
// 13px / tighter padding: a menu drops out of a toolbar button or a
|
|
2902
|
+
// compact table control, and at 15px with 10px vertical padding it read
|
|
2903
|
+
// as a larger, separate UI than the control that opened it.
|
|
2904
|
+
"relative flex cursor-default select-none items-center gap-2 rounded-lg px-2.5 py-1.5 text-[13px] outline-none transition-colors",
|
|
2900
2905
|
"focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
2901
2906
|
inset && "pl-8",
|
|
2902
2907
|
className
|
|
@@ -2910,7 +2915,9 @@ var DropdownMenuCheckboxItem = React27.forwardRef(({ className, children, checke
|
|
|
2910
2915
|
{
|
|
2911
2916
|
ref,
|
|
2912
2917
|
className: cn(
|
|
2913
|
-
|
|
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",
|
|
2914
2921
|
"focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
2915
2922
|
className
|
|
2916
2923
|
),
|
|
@@ -2928,7 +2935,9 @@ var DropdownMenuRadioItem = React27.forwardRef(({ className, children, ...props
|
|
|
2928
2935
|
{
|
|
2929
2936
|
ref,
|
|
2930
2937
|
className: cn(
|
|
2931
|
-
|
|
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",
|
|
2932
2941
|
"focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
2933
2942
|
className
|
|
2934
2943
|
),
|
|
@@ -2963,12 +2972,17 @@ import { jsx as jsx38, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
|
2963
2972
|
var Select = SelectPrimitive.Root;
|
|
2964
2973
|
var SelectGroup = SelectPrimitive.Group;
|
|
2965
2974
|
var SelectValue = SelectPrimitive.Value;
|
|
2966
|
-
var
|
|
2975
|
+
var selectTriggerSizes = {
|
|
2976
|
+
md: "h-11 min-h-11 gap-2.5 px-4 py-2 text-[15px]",
|
|
2977
|
+
sm: "h-7 min-h-7 w-auto gap-1 px-2 py-0 text-[12px]"
|
|
2978
|
+
};
|
|
2979
|
+
var SelectTrigger = React28.forwardRef(({ className, children, size = "md", ...props }, ref) => /* @__PURE__ */ jsxs21(
|
|
2967
2980
|
SelectPrimitive.Trigger,
|
|
2968
2981
|
{
|
|
2969
2982
|
ref,
|
|
2970
2983
|
className: cn(
|
|
2971
|
-
"flex
|
|
2984
|
+
"flex w-full items-center justify-between rounded-lg border border-border bg-card text-foreground shadow-sm outline-none",
|
|
2985
|
+
selectTriggerSizes[size],
|
|
2972
2986
|
"ring-ring/50 focus-visible:ring-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
2973
2987
|
"[&>span]:line-clamp-1",
|
|
2974
2988
|
className
|
|
@@ -3579,7 +3593,7 @@ function EmptyState({
|
|
|
3579
3593
|
}
|
|
3580
3594
|
|
|
3581
3595
|
// src/data-table.tsx
|
|
3582
|
-
import { ChevronLeft as ChevronLeft3, ChevronRight as ChevronRight5 } from "lucide-react";
|
|
3596
|
+
import { ChevronDown as ChevronDown6, ChevronLeft as ChevronLeft3, ChevronRight as ChevronRight5 } from "lucide-react";
|
|
3583
3597
|
import { useState as useState6 } from "react";
|
|
3584
3598
|
import { jsx as jsx49, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3585
3599
|
function getPageRange(current, total) {
|
|
@@ -3615,7 +3629,9 @@ function DataTable({
|
|
|
3615
3629
|
headerStyle = "surface",
|
|
3616
3630
|
footerSummary = "range",
|
|
3617
3631
|
footerCountLabels = { singular: "item", plural: "items" },
|
|
3618
|
-
snug = false
|
|
3632
|
+
snug = false,
|
|
3633
|
+
expandable,
|
|
3634
|
+
footerLeading
|
|
3619
3635
|
}) {
|
|
3620
3636
|
const isControlled = controlledPage !== void 0;
|
|
3621
3637
|
const [internalPage, setInternalPage] = useState6(1);
|
|
@@ -3623,6 +3639,19 @@ function DataTable({
|
|
|
3623
3639
|
const setPage = isControlled ? (p) => onPageChange?.(p) : (p) => setInternalPage(p);
|
|
3624
3640
|
const hasAction = rowAction != null || rowCta != null;
|
|
3625
3641
|
const hasSpacer = tableLayout === "content";
|
|
3642
|
+
const [internalExpanded, setInternalExpanded] = useState6([]);
|
|
3643
|
+
const isExpandControlled = expandable?.expandedKeys !== void 0;
|
|
3644
|
+
const expandedKeys = isExpandControlled ? expandable.expandedKeys : internalExpanded;
|
|
3645
|
+
const hasExpand = expandable != null;
|
|
3646
|
+
const totalColSpan = columns.length + (hasExpand ? 1 : 0) + (hasSpacer ? 1 : 0) + (hasAction ? 1 : 0);
|
|
3647
|
+
const rowExpanded = (row, index) => hasExpand && (expandable.isExpandable?.(row, index) ?? true) && expandedKeys.includes(rowKeys[index]);
|
|
3648
|
+
const toggleExpanded = (key, row, index) => {
|
|
3649
|
+
const isOpen = expandedKeys.includes(key);
|
|
3650
|
+
const next = isOpen ? expandedKeys.filter((k) => k !== key) : [...expandedKeys, key];
|
|
3651
|
+
if (isExpandControlled) expandable.onExpandedChange?.(next);
|
|
3652
|
+
else setInternalExpanded(next);
|
|
3653
|
+
if (!isOpen) expandable.onExpand?.(row, index);
|
|
3654
|
+
};
|
|
3626
3655
|
const total = totalRows ?? data.length;
|
|
3627
3656
|
const totalPages = Math.ceil(total / pageSize);
|
|
3628
3657
|
const paginated = isControlled ? data : data.slice((page - 1) * pageSize, page * pageSize);
|
|
@@ -3633,6 +3662,7 @@ function DataTable({
|
|
|
3633
3662
|
seenKeys.set(base, seen + 1);
|
|
3634
3663
|
return seen === 0 ? base : `${base}__${seen}`;
|
|
3635
3664
|
});
|
|
3665
|
+
const isEmpty = !isLoading && paginated.length === 0;
|
|
3636
3666
|
const comfortable = density === "comfortable";
|
|
3637
3667
|
const compact = density === "compact";
|
|
3638
3668
|
const compactCellPad = compact ? snug ? "pl-1.5 pr-2.5 py-2.5" : "px-3 py-2.5" : "px-4 py-3.5";
|
|
@@ -3640,6 +3670,9 @@ function DataTable({
|
|
|
3640
3670
|
const headPad = comfortable ? "px-5 py-4" : compactCellPad;
|
|
3641
3671
|
const footerPad = comfortable ? "px-5 py-4" : compact ? "px-4 py-2.5" : "px-4 py-3.5";
|
|
3642
3672
|
const headText = comfortable ? "text-[12px] font-medium text-muted-foreground tracking-normal" : compact ? "text-[11px] font-semibold text-muted-foreground" : "text-[11px] font-semibold text-foreground/75 dark:text-foreground/85";
|
|
3673
|
+
const cellPadLeft = comfortable ? 20 : compact ? snug ? 6 : 12 : 16;
|
|
3674
|
+
const expandIndent = 40 + cellPadLeft;
|
|
3675
|
+
const expandGuideLeft = cellPadLeft + 10;
|
|
3643
3676
|
const actionGutter = comfortable ? 20 : compact ? 12 : 16;
|
|
3644
3677
|
const ROW_CLICK_IGNORE = 'button, a, input, select, textarea, label, [role="button"], [role="link"], [role="checkbox"], [role="menuitem"], [role="menu"], [role="dialog"], [data-row-click-ignore]';
|
|
3645
3678
|
const isRowClickTarget = (target, rowEl) => {
|
|
@@ -3677,7 +3710,8 @@ function DataTable({
|
|
|
3677
3710
|
width: "100%"
|
|
3678
3711
|
},
|
|
3679
3712
|
children: [
|
|
3680
|
-
tableLayout === "fixed" && /* @__PURE__ */ jsxs30("colgroup", { children: [
|
|
3713
|
+
tableLayout === "fixed" && !isEmpty && /* @__PURE__ */ jsxs30("colgroup", { children: [
|
|
3714
|
+
hasExpand ? /* @__PURE__ */ jsx49("col", { style: { width: 40 } }) : null,
|
|
3681
3715
|
columns.map((col) => /* @__PURE__ */ jsx49(
|
|
3682
3716
|
"col",
|
|
3683
3717
|
{
|
|
@@ -3707,6 +3741,7 @@ function DataTable({
|
|
|
3707
3741
|
headerStyle === "surface" ? "border-border" : "border-border/70"
|
|
3708
3742
|
),
|
|
3709
3743
|
children: [
|
|
3744
|
+
hasExpand ? /* @__PURE__ */ jsx49("th", { className: cn(headPad, "w-10 p-0"), "aria-hidden": true }) : null,
|
|
3710
3745
|
columns.map((col) => /* @__PURE__ */ jsx49(
|
|
3711
3746
|
"th",
|
|
3712
3747
|
{
|
|
@@ -3715,7 +3750,8 @@ function DataTable({
|
|
|
3715
3750
|
headText,
|
|
3716
3751
|
"whitespace-nowrap align-middle",
|
|
3717
3752
|
col.align === "right" ? "text-right" : col.align === "center" ? "text-center" : "text-left",
|
|
3718
|
-
|
|
3753
|
+
// Width hints live in `cellClassName`; see `isEmpty`.
|
|
3754
|
+
!isEmpty && col.cellClassName
|
|
3719
3755
|
),
|
|
3720
3756
|
children: col.header
|
|
3721
3757
|
},
|
|
@@ -3731,89 +3767,144 @@ function DataTable({
|
|
|
3731
3767
|
/* @__PURE__ */ jsx49("tbody", { children: isLoading ? Array.from({ length: skeletonRows }).map((_, i) => /* @__PURE__ */ jsx49(
|
|
3732
3768
|
TableRowSkeleton,
|
|
3733
3769
|
{
|
|
3734
|
-
cols: columns.length,
|
|
3770
|
+
cols: columns.length + (hasExpand ? 1 : 0),
|
|
3735
3771
|
density,
|
|
3736
3772
|
snug
|
|
3737
3773
|
},
|
|
3738
3774
|
i
|
|
3739
|
-
)) : paginated.length === 0 ? /* @__PURE__ */ jsx49("tr", { children: /* @__PURE__ */ jsx49("td", { colSpan:
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
e
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
"
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
) : compact ? cn(
|
|
3775
|
-
"text-[13px] leading-tight",
|
|
3776
|
-
!col.wrap && "whitespace-nowrap",
|
|
3777
|
-
"overflow-hidden"
|
|
3778
|
-
) : "whitespace-nowrap overflow-hidden",
|
|
3779
|
-
col.align === "right" ? "text-right" : col.align === "center" ? "text-center" : "text-left",
|
|
3780
|
-
col.cellClassName
|
|
3781
|
-
),
|
|
3782
|
-
children: col.render(row, i)
|
|
3783
|
-
},
|
|
3784
|
-
col.key
|
|
3785
|
-
)),
|
|
3786
|
-
hasSpacer ? /* @__PURE__ */ jsx49("td", { className: "p-0", "aria-hidden": true }) : null,
|
|
3787
|
-
hasAction ? (
|
|
3788
|
-
// Zero-width sticky cell pinned to the right edge of the
|
|
3789
|
-
// viewport. Its children are positioned absolutely so they
|
|
3790
|
-
// float over the row (out of the 0-width cell) — the action
|
|
3791
|
-
// stays in view while scrolling and nothing trails the last
|
|
3792
|
-
// data column. Everything is revealed on hover only.
|
|
3793
|
-
/* @__PURE__ */ jsx49("td", { className: "sticky right-0 z-[1] w-0 p-0 align-middle", children: /* @__PURE__ */ jsx49(
|
|
3794
|
-
"span",
|
|
3775
|
+
)) : paginated.length === 0 ? /* @__PURE__ */ jsx49("tr", { children: /* @__PURE__ */ jsx49("td", { colSpan: totalColSpan, children: /* @__PURE__ */ jsx49(EmptyState, { title: emptyTitle, description: emptyDescription }) }) }) : paginated.flatMap((row, i) => [
|
|
3776
|
+
/* @__PURE__ */ jsxs30(
|
|
3777
|
+
"tr",
|
|
3778
|
+
{
|
|
3779
|
+
className: cn(
|
|
3780
|
+
"group transition-colors duration-150 border-b border-border/60 last:border-b-0",
|
|
3781
|
+
comfortable && "min-h-[56px]",
|
|
3782
|
+
compact && "min-h-[44px]",
|
|
3783
|
+
"hover:bg-muted/40 dark:hover:bg-muted/25",
|
|
3784
|
+
hasAction && "hover:shadow-[0_1px_0_rgba(0,0,0,0.04)] dark:hover:shadow-none",
|
|
3785
|
+
// Clickable rows read as clickable, and show a focus ring
|
|
3786
|
+
// when reached by keyboard. `focus-visible` only, so a
|
|
3787
|
+
// mouse click does not leave a ring behind on the row.
|
|
3788
|
+
onRowClick && "cursor-pointer focus-visible:outline-none focus-visible:bg-muted/40 dark:focus-visible:bg-muted/25",
|
|
3789
|
+
// An open row takes its panel's background and drops the
|
|
3790
|
+
// divider beneath it, so the row and its detail read as one
|
|
3791
|
+
// block. Hover is pinned to the same value, or moving the
|
|
3792
|
+
// mouse over an open row would make it flicker away from
|
|
3793
|
+
// the panel it belongs to.
|
|
3794
|
+
rowExpanded(row, i) && "border-b-0 bg-muted/40 hover:bg-muted/40 dark:bg-muted/25 dark:hover:bg-muted/25"
|
|
3795
|
+
),
|
|
3796
|
+
tabIndex: onRowClick ? 0 : void 0,
|
|
3797
|
+
onClick: onRowClick ? (e) => {
|
|
3798
|
+
if (!isRowClickTarget(e.target, e.currentTarget)) return;
|
|
3799
|
+
onRowClick(row, i);
|
|
3800
|
+
} : void 0,
|
|
3801
|
+
onKeyDown: onRowClick ? (e) => {
|
|
3802
|
+
if (e.key !== "Enter" && e.key !== " ") return;
|
|
3803
|
+
if (e.target !== e.currentTarget) return;
|
|
3804
|
+
e.preventDefault();
|
|
3805
|
+
onRowClick(row, i);
|
|
3806
|
+
} : void 0,
|
|
3807
|
+
children: [
|
|
3808
|
+
hasExpand ? /* @__PURE__ */ jsx49("td", { className: cn(cellPad, "w-10 align-middle"), children: expandable.isExpandable?.(row, i) ?? true ? /* @__PURE__ */ jsx49(
|
|
3809
|
+
"button",
|
|
3795
3810
|
{
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3811
|
+
type: "button",
|
|
3812
|
+
"aria-expanded": rowExpanded(row, i),
|
|
3813
|
+
"aria-label": expandable.toggleLabel ?? "Toggle row details",
|
|
3814
|
+
onClick: () => toggleExpanded(rowKeys[i], row, i),
|
|
3815
|
+
className: "inline-flex h-5 w-5 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
3816
|
+
children: /* @__PURE__ */ jsx49(
|
|
3817
|
+
ChevronDown6,
|
|
3800
3818
|
{
|
|
3801
|
-
type: "button",
|
|
3802
|
-
onClick: () => rowCta?.onClick?.(row),
|
|
3803
3819
|
className: cn(
|
|
3804
|
-
"
|
|
3805
|
-
|
|
3806
|
-
)
|
|
3807
|
-
children: rowCta?.label
|
|
3820
|
+
"h-3.5 w-3.5 transition-transform duration-150",
|
|
3821
|
+
rowExpanded(row, i) && "rotate-180"
|
|
3822
|
+
)
|
|
3808
3823
|
}
|
|
3809
3824
|
)
|
|
3810
3825
|
}
|
|
3811
|
-
) })
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3826
|
+
) : null }) : null,
|
|
3827
|
+
columns.map((col) => /* @__PURE__ */ jsx49(
|
|
3828
|
+
"td",
|
|
3829
|
+
{
|
|
3830
|
+
className: cn(
|
|
3831
|
+
cellPad,
|
|
3832
|
+
"align-middle",
|
|
3833
|
+
comfortable ? cn(
|
|
3834
|
+
"text-[13px] leading-snug",
|
|
3835
|
+
!col.wrap && "whitespace-nowrap"
|
|
3836
|
+
) : compact ? cn(
|
|
3837
|
+
"text-[13px] leading-tight",
|
|
3838
|
+
!col.wrap && "whitespace-nowrap",
|
|
3839
|
+
"overflow-hidden"
|
|
3840
|
+
) : "whitespace-nowrap overflow-hidden",
|
|
3841
|
+
col.align === "right" ? "text-right" : col.align === "center" ? "text-center" : "text-left",
|
|
3842
|
+
col.cellClassName
|
|
3843
|
+
),
|
|
3844
|
+
children: col.render(row, i)
|
|
3845
|
+
},
|
|
3846
|
+
col.key
|
|
3847
|
+
)),
|
|
3848
|
+
hasSpacer ? /* @__PURE__ */ jsx49("td", { className: "p-0", "aria-hidden": true }) : null,
|
|
3849
|
+
hasAction ? (
|
|
3850
|
+
// Zero-width sticky cell pinned to the right edge of the
|
|
3851
|
+
// viewport. Its children are positioned absolutely so they
|
|
3852
|
+
// float over the row (out of the 0-width cell) — the action
|
|
3853
|
+
// stays in view while scrolling and nothing trails the last
|
|
3854
|
+
// data column. Everything is revealed on hover only.
|
|
3855
|
+
/* @__PURE__ */ jsx49("td", { className: "sticky right-0 z-[1] w-0 p-0 align-middle", children: /* @__PURE__ */ jsx49(
|
|
3856
|
+
"span",
|
|
3857
|
+
{
|
|
3858
|
+
className: "absolute top-1/2 -translate-y-1/2 z-[1] inline-flex items-center opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100",
|
|
3859
|
+
style: { right: actionGutter },
|
|
3860
|
+
children: rowAction != null ? typeof rowAction === "function" ? rowAction(row, i) : rowAction : /* @__PURE__ */ jsx49(
|
|
3861
|
+
"button",
|
|
3862
|
+
{
|
|
3863
|
+
type: "button",
|
|
3864
|
+
onClick: () => rowCta?.onClick?.(row),
|
|
3865
|
+
className: cn(
|
|
3866
|
+
"inline-flex items-center font-medium text-foreground bg-card rounded-lg border border-border hover:border-muted-foreground/50 whitespace-nowrap shadow-sm",
|
|
3867
|
+
compact ? "px-2.5 py-1 text-[11px]" : "px-3 py-1.5 text-[12px]"
|
|
3868
|
+
),
|
|
3869
|
+
children: rowCta?.label
|
|
3870
|
+
}
|
|
3871
|
+
)
|
|
3872
|
+
}
|
|
3873
|
+
) })
|
|
3874
|
+
) : null
|
|
3875
|
+
]
|
|
3876
|
+
},
|
|
3877
|
+
rowKeys[i]
|
|
3878
|
+
),
|
|
3879
|
+
// The panel spans every column, including the toggle, spacer and
|
|
3880
|
+
// action cells, so it reads as one band under its row rather
|
|
3881
|
+
// than as a cell inside the grid.
|
|
3882
|
+
rowExpanded(row, i) ? /* @__PURE__ */ jsx49(
|
|
3883
|
+
"tr",
|
|
3884
|
+
{
|
|
3885
|
+
className: "border-b border-border/60 bg-muted/40 last:border-b-0 dark:bg-muted/25",
|
|
3886
|
+
children: /* @__PURE__ */ jsx49("td", { colSpan: totalColSpan, className: "p-0 align-top", children: /* @__PURE__ */ jsxs30(
|
|
3887
|
+
"div",
|
|
3888
|
+
{
|
|
3889
|
+
className: "relative",
|
|
3890
|
+
style: { paddingLeft: expandIndent, paddingRight: cellPadLeft },
|
|
3891
|
+
children: [
|
|
3892
|
+
/* @__PURE__ */ jsx49(
|
|
3893
|
+
"span",
|
|
3894
|
+
{
|
|
3895
|
+
"aria-hidden": true,
|
|
3896
|
+
className: "absolute top-0 bottom-4 w-px bg-border",
|
|
3897
|
+
style: { left: expandGuideLeft }
|
|
3898
|
+
}
|
|
3899
|
+
),
|
|
3900
|
+
expandable.render(row, i)
|
|
3901
|
+
]
|
|
3902
|
+
}
|
|
3903
|
+
) })
|
|
3904
|
+
},
|
|
3905
|
+
`${rowKeys[i]}__panel`
|
|
3906
|
+
) : null
|
|
3907
|
+
]) })
|
|
3817
3908
|
]
|
|
3818
3909
|
}
|
|
3819
3910
|
)
|
|
@@ -3825,27 +3916,30 @@ function DataTable({
|
|
|
3825
3916
|
className: cn(
|
|
3826
3917
|
"flex items-center gap-4 flex-wrap border-t border-border",
|
|
3827
3918
|
footerPad,
|
|
3828
|
-
footerSummary === "count" && totalPages <= 1 ? "justify-start" : "justify-between"
|
|
3919
|
+
footerSummary === "count" && totalPages <= 1 && !footerLeading ? "justify-start" : "justify-between"
|
|
3829
3920
|
),
|
|
3830
3921
|
children: [
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
" ",
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
" ",
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
"
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3922
|
+
/* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-3", children: [
|
|
3923
|
+
footerLeading,
|
|
3924
|
+
footerSummary === "count" ? /* @__PURE__ */ jsxs30("span", { className: "text-[12px] text-muted-foreground tabular-nums", children: [
|
|
3925
|
+
/* @__PURE__ */ jsx49("span", { className: "font-medium text-foreground", children: total }),
|
|
3926
|
+
" ",
|
|
3927
|
+
total === 1 ? footerCountLabels.singular : footerCountLabels.plural
|
|
3928
|
+
] }) : /* @__PURE__ */ jsxs30("span", { className: "text-[12px] text-muted-foreground tabular-nums", children: [
|
|
3929
|
+
"Showing",
|
|
3930
|
+
" ",
|
|
3931
|
+
/* @__PURE__ */ jsxs30("span", { className: "text-foreground font-medium", children: [
|
|
3932
|
+
Math.min((page - 1) * pageSize + 1, total),
|
|
3933
|
+
"\u2013",
|
|
3934
|
+
Math.min(page * pageSize, total)
|
|
3935
|
+
] }),
|
|
3936
|
+
" ",
|
|
3937
|
+
"of",
|
|
3938
|
+
" ",
|
|
3939
|
+
/* @__PURE__ */ jsx49("span", { className: "text-foreground font-medium", children: total.toLocaleString() }),
|
|
3940
|
+
" ",
|
|
3941
|
+
total !== 1 ? "results" : "result"
|
|
3942
|
+
] })
|
|
3849
3943
|
] }),
|
|
3850
3944
|
(footerSummary === "range" || footerSummary === "count") && totalPages > 1 && /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-1", children: [
|
|
3851
3945
|
/* @__PURE__ */ jsx49(
|
|
@@ -4221,7 +4315,7 @@ AvatarTag.displayName = "AvatarTag";
|
|
|
4221
4315
|
|
|
4222
4316
|
// src/calendar.tsx
|
|
4223
4317
|
import * as React40 from "react";
|
|
4224
|
-
import { ChevronDown as
|
|
4318
|
+
import { ChevronDown as ChevronDown7, ChevronLeft as ChevronLeft4, ChevronRight as ChevronRight6 } from "lucide-react";
|
|
4225
4319
|
import {
|
|
4226
4320
|
DayPicker,
|
|
4227
4321
|
getDefaultClassNames
|
|
@@ -4371,7 +4465,7 @@ function Calendar({
|
|
|
4371
4465
|
if (orientation === "right") {
|
|
4372
4466
|
return /* @__PURE__ */ jsx55(ChevronRight6, { className: cn("size-4", chClass), ...chProps });
|
|
4373
4467
|
}
|
|
4374
|
-
return /* @__PURE__ */ jsx55(
|
|
4468
|
+
return /* @__PURE__ */ jsx55(ChevronDown7, { className: cn("size-4", chClass), ...chProps });
|
|
4375
4469
|
},
|
|
4376
4470
|
DayButton: CalendarDayButton,
|
|
4377
4471
|
WeekNumber: ({ children, ...weekProps }) => /* @__PURE__ */ jsx55("th", { ...weekProps, children: /* @__PURE__ */ jsx55("div", { className: "flex h-[var(--cell-size)] w-[var(--cell-size)] min-h-[var(--cell-size)] min-w-[var(--cell-size)] items-center justify-center text-center text-xs tabular-nums", children }) }),
|
|
@@ -4418,7 +4512,7 @@ function CalendarDayButton({
|
|
|
4418
4512
|
// src/date-picker.tsx
|
|
4419
4513
|
import { useState as useState8, useRef as useRef4, useEffect as useEffect3 } from "react";
|
|
4420
4514
|
import { createPortal } from "react-dom";
|
|
4421
|
-
import { ChevronLeft as ChevronLeft5, ChevronRight as ChevronRight7, ChevronDown as
|
|
4515
|
+
import { ChevronLeft as ChevronLeft5, ChevronRight as ChevronRight7, ChevronDown as ChevronDown8, CalendarDays } from "lucide-react";
|
|
4422
4516
|
import { AnimatePresence, motion } from "framer-motion";
|
|
4423
4517
|
import { jsx as jsx56, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
4424
4518
|
var MONTHS = [
|
|
@@ -4597,7 +4691,7 @@ function DatePicker({ value, onChange, placeholder = "Select date", className, m
|
|
|
4597
4691
|
className: "flex items-center gap-1 px-2 py-1 rounded-lg text-[14px] font-semibold text-gray-900 hover:bg-gray-100 transition-colors",
|
|
4598
4692
|
children: [
|
|
4599
4693
|
MONTHS[viewMonth].slice(0, 3),
|
|
4600
|
-
/* @__PURE__ */ jsx56(
|
|
4694
|
+
/* @__PURE__ */ jsx56(ChevronDown8, { className: "w-3 h-3 text-gray-400" })
|
|
4601
4695
|
]
|
|
4602
4696
|
}
|
|
4603
4697
|
),
|
|
@@ -4636,7 +4730,7 @@ function DatePicker({ value, onChange, placeholder = "Select date", className, m
|
|
|
4636
4730
|
className: "flex items-center gap-1 px-2 py-1 rounded-lg text-[14px] font-semibold text-gray-900 hover:bg-gray-100 transition-colors",
|
|
4637
4731
|
children: [
|
|
4638
4732
|
viewYear,
|
|
4639
|
-
/* @__PURE__ */ jsx56(
|
|
4733
|
+
/* @__PURE__ */ jsx56(ChevronDown8, { className: "w-3 h-3 text-gray-400" })
|
|
4640
4734
|
]
|
|
4641
4735
|
}
|
|
4642
4736
|
),
|
|
@@ -4730,7 +4824,7 @@ function DatePicker({ value, onChange, placeholder = "Select date", className, m
|
|
|
4730
4824
|
children: [
|
|
4731
4825
|
/* @__PURE__ */ jsx56(CalendarDays, { className: "size-[1.125rem] shrink-0 text-muted-foreground" }),
|
|
4732
4826
|
/* @__PURE__ */ jsx56("span", { className: cn("flex-1", value ? "text-foreground" : "text-muted-foreground"), children: value ? displayDate(value) : placeholder }),
|
|
4733
|
-
/* @__PURE__ */ jsx56(
|
|
4827
|
+
/* @__PURE__ */ jsx56(ChevronDown8, { className: cn("size-[1.125rem] shrink-0 text-muted-foreground transition-transform", open && "rotate-180") })
|
|
4734
4828
|
]
|
|
4735
4829
|
}
|
|
4736
4830
|
),
|
|
@@ -6037,7 +6131,7 @@ function useBreakpoint() {
|
|
|
6037
6131
|
// src/country-select.tsx
|
|
6038
6132
|
import * as React47 from "react";
|
|
6039
6133
|
import * as PopoverPrimitive4 from "@radix-ui/react-popover";
|
|
6040
|
-
import { Check as Check10, ChevronDown as
|
|
6134
|
+
import { Check as Check10, ChevronDown as ChevronDown9, Search as Search3 } from "lucide-react";
|
|
6041
6135
|
import { Fragment as Fragment9, jsx as jsx64, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
6042
6136
|
var COUNTRIES = [
|
|
6043
6137
|
{ code: "US", name: "United States", flag: "\u{1F1FA}\u{1F1F8}", dialCode: "+1" },
|
|
@@ -6126,7 +6220,7 @@ var CountrySelect = React47.forwardRef(
|
|
|
6126
6220
|
showDialCode && /* @__PURE__ */ jsx64("span", { className: "shrink-0 text-muted-foreground", children: selected.dialCode })
|
|
6127
6221
|
] }) : /* @__PURE__ */ jsx64("span", { children: placeholder }) }),
|
|
6128
6222
|
/* @__PURE__ */ jsx64(
|
|
6129
|
-
|
|
6223
|
+
ChevronDown9,
|
|
6130
6224
|
{
|
|
6131
6225
|
className: cn(
|
|
6132
6226
|
"h-4 w-4 shrink-0 text-muted-foreground opacity-70 transition-transform duration-pg-fast ease-pg-standard",
|
|
@@ -6299,7 +6393,7 @@ IconButton.displayName = "IconButton";
|
|
|
6299
6393
|
// src/time-picker.tsx
|
|
6300
6394
|
import * as React48 from "react";
|
|
6301
6395
|
import { createPortal as createPortal2 } from "react-dom";
|
|
6302
|
-
import { Clock as Clock2, ChevronDown as
|
|
6396
|
+
import { Clock as Clock2, ChevronDown as ChevronDown10, X as X11 } from "lucide-react";
|
|
6303
6397
|
import { Fragment as Fragment10, jsx as jsx66, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
6304
6398
|
function pad(n) {
|
|
6305
6399
|
return String(n).padStart(2, "0");
|
|
@@ -6635,7 +6729,7 @@ var TimePicker = React48.forwardRef(
|
|
|
6635
6729
|
onClick: handleClear
|
|
6636
6730
|
}
|
|
6637
6731
|
) : /* @__PURE__ */ jsx66(
|
|
6638
|
-
|
|
6732
|
+
ChevronDown10,
|
|
6639
6733
|
{
|
|
6640
6734
|
className: cn(
|
|
6641
6735
|
"size-[1.0625rem] shrink-0 text-muted-foreground transition-transform duration-150",
|