@payglocal_ui/flux-ui 0.2.3 → 0.2.5
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 +189 -81
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +73 -3
- package/dist/index.d.ts +73 -3
- package/dist/index.js +200 -92
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/data-table.tsx +253 -29
- package/src/dropdown-menu.tsx +4 -1
- package/src/index.ts +2 -1
- package/src/select.tsx +20 -3
package/dist/index.d.cts
CHANGED
|
@@ -600,7 +600,19 @@ declare function DropdownMenuShortcut({ className, ...props }: React$1.HTMLAttri
|
|
|
600
600
|
declare const Select: React$1.FC<SelectPrimitive.SelectProps>;
|
|
601
601
|
declare const SelectGroup: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
602
602
|
declare const SelectValue: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React$1.RefAttributes<HTMLSpanElement>>;
|
|
603
|
-
|
|
603
|
+
/**
|
|
604
|
+
* `md` (default) is the form-field trigger. `sm` is for dense furniture — a
|
|
605
|
+
* rows-per-page picker in a table footer, a control inside a toolbar — where
|
|
606
|
+
* the full-height field towers over everything beside it.
|
|
607
|
+
*
|
|
608
|
+
* This is a size prop rather than a job for `className` because the base sets
|
|
609
|
+
* `min-h-11`, which beats an `h-8` utility: every caller wanting a short
|
|
610
|
+
* trigger had to override min-height, padding, gap and text size together.
|
|
611
|
+
*/
|
|
612
|
+
type SelectTriggerSize = "sm" | "md";
|
|
613
|
+
declare const SelectTrigger: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
614
|
+
size?: SelectTriggerSize;
|
|
615
|
+
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
604
616
|
declare const SelectScrollUpButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
605
617
|
declare const SelectScrollDownButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
606
618
|
declare const SelectContent: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -742,6 +754,37 @@ declare function ChartSkeleton({ height }: {
|
|
|
742
754
|
type DataTableDensity = "default" | "comfortable" | "compact";
|
|
743
755
|
type DataTableHeaderStyle = "surface" | "minimal";
|
|
744
756
|
type DataTableFooterSummary = "range" | "count";
|
|
757
|
+
/**
|
|
758
|
+
* Row expansion: a disclosure column plus a full-width panel rendered directly
|
|
759
|
+
* beneath the expanded row. Use it when the detail belongs *with* the row in
|
|
760
|
+
* the flow of the table (a request's headers, a payload, a breakdown) rather
|
|
761
|
+
* than in a drawer that covers it.
|
|
762
|
+
*
|
|
763
|
+
* Leave `expandedKeys` unset for uncontrolled behaviour (the table remembers
|
|
764
|
+
* which rows are open). Pass `expandedKeys` + `onExpandedChange` to drive it
|
|
765
|
+
* from outside — needed when opening a row triggers a fetch.
|
|
766
|
+
*/
|
|
767
|
+
type DataTableExpandable<T> = {
|
|
768
|
+
/** The panel shown under an expanded row. */
|
|
769
|
+
render: (row: T, index: number) => ReactNode;
|
|
770
|
+
/**
|
|
771
|
+
* Which rows can open at all. Rows that cannot get no toggle and no chevron,
|
|
772
|
+
* keeping the column's width without implying an affordance that isn't there.
|
|
773
|
+
* Defaults to every row.
|
|
774
|
+
*/
|
|
775
|
+
isExpandable?: (row: T, index: number) => boolean;
|
|
776
|
+
/** Controlled open rows, as `rowKey` values. Omit for uncontrolled. */
|
|
777
|
+
expandedKeys?: string[];
|
|
778
|
+
/** Fires on every open/close in controlled mode. */
|
|
779
|
+
onExpandedChange?: (keys: string[]) => void;
|
|
780
|
+
/**
|
|
781
|
+
* Fires only when a row opens, in both modes — the hook for lazily fetching
|
|
782
|
+
* that row's detail. Not called on close.
|
|
783
|
+
*/
|
|
784
|
+
onExpand?: (row: T, index: number) => void;
|
|
785
|
+
/** Accessible name for the toggle. Default "Toggle row details". */
|
|
786
|
+
toggleLabel?: string;
|
|
787
|
+
};
|
|
745
788
|
type Column<T> = {
|
|
746
789
|
key: string;
|
|
747
790
|
header: ReactNode;
|
|
@@ -789,6 +832,22 @@ interface DataTableProps<T> {
|
|
|
789
832
|
* flush with nothing trailing it. Takes precedence over `rowCta`.
|
|
790
833
|
*/
|
|
791
834
|
rowAction?: ReactNode | ((row: T, index: number) => ReactNode);
|
|
835
|
+
/**
|
|
836
|
+
* Makes the whole row a click target — the row itself opens a drawer, a
|
|
837
|
+
* detail page, whatever the table drills into — instead of that living in a
|
|
838
|
+
* per-cell wrapper or a hover-revealed button.
|
|
839
|
+
*
|
|
840
|
+
* The handler sits on the `<tr>`, so the entire row including cell padding
|
|
841
|
+
* and the empty space between columns is clickable, and the row gets
|
|
842
|
+
* `cursor-pointer` plus keyboard access (focusable, Enter / Space).
|
|
843
|
+
*
|
|
844
|
+
* Clicks that originate inside something interactive — a `<button>`, `<a>`,
|
|
845
|
+
* a form control, a Radix trigger, or anything marked
|
|
846
|
+
* `data-row-click-ignore` — do NOT fire this. Copy buttons, per-row menus
|
|
847
|
+
* and the `rowAction` overlay therefore keep doing only their own job
|
|
848
|
+
* without each having to stop propagation.
|
|
849
|
+
*/
|
|
850
|
+
onRowClick?: (row: T, index: number) => void;
|
|
792
851
|
/** Row / cell vertical rhythm and horizontal gutters */
|
|
793
852
|
density?: DataTableDensity;
|
|
794
853
|
/**
|
|
@@ -813,8 +872,19 @@ interface DataTableProps<T> {
|
|
|
813
872
|
};
|
|
814
873
|
/** With `density="compact"`, use tighter cell gutters (`pl-1.5 pr-2.5` vs `px-3`). Footer keeps normal horizontal padding. */
|
|
815
874
|
snug?: boolean;
|
|
875
|
+
/**
|
|
876
|
+
* Extra control at the far left of the built-in footer, before the
|
|
877
|
+
* "Showing x–y of N" summary — a rows-per-page picker, typically.
|
|
878
|
+
*
|
|
879
|
+
* Without it a grid that needs a page-size control has to abandon the
|
|
880
|
+
* built-in footer and hand-roll one, which is how two different pagers end up
|
|
881
|
+
* in the same app.
|
|
882
|
+
*/
|
|
883
|
+
footerLeading?: ReactNode;
|
|
884
|
+
/** Per-row disclosure panel rendered beneath the row. See `DataTableExpandable`. */
|
|
885
|
+
expandable?: DataTableExpandable<T>;
|
|
816
886
|
}
|
|
817
|
-
declare function DataTable<T>({ columns, data, isLoading, skeletonRows, emptyTitle, emptyDescription, pageSize, page: controlledPage, onPageChange, totalRows, className, rowKey, rowCta, rowAction, density, tableLayout, theadClassName, headerStyle, footerSummary, footerCountLabels, snug, }: DataTableProps<T>): React$1.JSX.Element;
|
|
887
|
+
declare function DataTable<T>({ columns, data, isLoading, skeletonRows, emptyTitle, emptyDescription, pageSize, page: controlledPage, onPageChange, totalRows, className, rowKey, rowCta, rowAction, onRowClick, density, tableLayout, theadClassName, headerStyle, footerSummary, footerCountLabels, snug, expandable, footerLeading, }: DataTableProps<T>): React$1.JSX.Element;
|
|
818
888
|
|
|
819
889
|
interface EmptyStateProps {
|
|
820
890
|
icon?: LucideIcon;
|
|
@@ -1263,4 +1333,4 @@ interface VisuallyHiddenProps extends React$1.HTMLAttributes<HTMLElement> {
|
|
|
1263
1333
|
}
|
|
1264
1334
|
declare const VisuallyHidden: React$1.ForwardRefExoticComponent<VisuallyHiddenProps & React$1.RefAttributes<HTMLElement>>;
|
|
1265
1335
|
|
|
1266
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, type AlertProps, AlertTitle, type AttentionListItem, AttentionListTemplate, type AttentionListTemplateProps, Avatar, AvatarFallback, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, AvatarImage, AvatarTag, type AvatarTagProps, type AvatarTagSize, Badge, type BadgeProps, type BadgeTrailIcon, type BadgeVariant, Banner, type BannerProps, Blanket, type BlanketProps, Box, type BoxProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, type Breakpoint, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, COUNTRIES, Calendar, CalendarDayButton, type CalendarProps, Callout, CalloutIcon, type CalloutProps, CalloutText, CalloutTitle, type CalloutVariant, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CategoryBarChartTemplate, type CategoryBarChartTemplateProps, type CategoryBarPoint, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartSkeleton, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, type CheckboxProps, CheckboxSelect, type CheckboxSelectOption, type CheckboxSelectProps, Code, CodeBlock, type CodeBlockProps, type CodeProps, type Column, Command, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, type CommandProps, CommandSeparator, type CommandSeparatorProps, CommandShortcut, type CommandShortcutProps, type Country, CountrySelect, type CountrySelectProps, CurrencyAmountInput, type DashboardAreaChartPoint, DashboardAreaChartTemplate, type DashboardAreaChartTemplateProps, DataTable, type DataTableDensity, type DataTableFooterSummary, type DataTableHeaderStyle, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, Field, type FieldConfig, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, type FieldsConfig, Flag, type FlagAction, FlagGroup, type FlagGroupPosition, type FlagGroupProps, type FlagProps, type FlagVariant, Flex, type FlexAlign, type FlexDirection, type FlexJustify, type FlexProps, type FlexWrap, Form, FormControl, FormDescription, FormError, type FormErrors, FormField, type FormFieldProps, FormItem, FormLabel, type FormProps, type FormValues, Grid, type GridCols, type GridFlow, type GridProps, GroupedBarChartTemplate, type GroupedBarChartTemplateProps, type GroupedBarSeries, Heading, type HeadingProps, Hide, type HideProps, IconButton, type IconButtonProps, Inline, InlineDialog, InlineDialogContent, type InlineDialogContentProps, type InlineDialogProps, InlineDialogTrigger, InlineEdit, type InlineEditProps, type InlineProps, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Label, type LayoutSpacing, Link, type LinkProps, Lozenge, type LozengeProps, Menu, MenuDivider, MenuItem, type MenuItemProps, type MenuProps, MenuSection, type MenuSectionProps, MetricSparklineCard, type MetricSparklineCardProps, type MetricSparklinePoint, MetricText, type MetricTextProps, MiniSparklineChartCard, type MiniSparklineChartCardProps, type MiniSparklinePoint, type MiniSparklineStat, OtpInput, type OtpInputProps, PageHeader, Pagination, PaginationContent, type PaginationContentProps, PaginationEllipsis, type PaginationEllipsisProps, PaginationItem, type PaginationItemProps, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationPrevious, type PaginationPreviousProps, type PaginationProps, PasswordInput, type PasswordInputProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, ProgressIndicator, type ProgressIndicatorProps, type ProgressProps, ProgressTracker, type ProgressTrackerProps, type ProgressTrackerStep, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RankedBarItem, RankedBarListTemplate, type RankedBarListTemplateProps, type RegisterResult, type ResponsiveCols, ScrollArea, ScrollBar, SectionMessage, SectionMessageActions, SectionMessageContent, type SectionMessageProps, SectionMessageTitle, type SectionMessageVariant, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Shimmer, Show, type ShowProps, SideNav, SideNavFooter, SideNavHeader, SideNavItem, type SideNavItemProps, type SideNavProps, SideNavSection, Slider, type SliderProps, Spinner, type SpinnerProps, SplitButton, SplitButtonItem, type SplitButtonItemProps, type SplitButtonProps, Spotlight, SpotlightCard, type SpotlightCardProps, type SpotlightProps, type SpotlightStep, Stack, type StackProps, StatCardSkeleton, StatusBadge, type StatusBadgeProps, Switch, type SwitchProps, TableRowSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TagGroup, type TagGroupProps, type TagProps, Text, type TextProps, Textarea, TimePicker, type TimePickerProps, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UseBreakpointReturn, type UseFlagGroupReturn, type UseFormReturn, type UseSpotlightReturn, type ValidatorRule, VisuallyHidden, type VisuallyHiddenProps, cn, useBreakpoint, useFlagGroup, useForm, useSpotlight };
|
|
1336
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, type AlertProps, AlertTitle, type AttentionListItem, AttentionListTemplate, type AttentionListTemplateProps, Avatar, AvatarFallback, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, AvatarImage, AvatarTag, type AvatarTagProps, type AvatarTagSize, Badge, type BadgeProps, type BadgeTrailIcon, type BadgeVariant, Banner, type BannerProps, Blanket, type BlanketProps, Box, type BoxProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, type Breakpoint, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, COUNTRIES, Calendar, CalendarDayButton, type CalendarProps, Callout, CalloutIcon, type CalloutProps, CalloutText, CalloutTitle, type CalloutVariant, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CategoryBarChartTemplate, type CategoryBarChartTemplateProps, type CategoryBarPoint, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartSkeleton, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, type CheckboxProps, CheckboxSelect, type CheckboxSelectOption, type CheckboxSelectProps, Code, CodeBlock, type CodeBlockProps, type CodeProps, type Column, Command, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, type CommandProps, CommandSeparator, type CommandSeparatorProps, CommandShortcut, type CommandShortcutProps, type Country, CountrySelect, type CountrySelectProps, CurrencyAmountInput, type DashboardAreaChartPoint, DashboardAreaChartTemplate, type DashboardAreaChartTemplateProps, DataTable, type DataTableDensity, type DataTableExpandable, type DataTableFooterSummary, type DataTableHeaderStyle, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, Field, type FieldConfig, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, type FieldsConfig, Flag, type FlagAction, FlagGroup, type FlagGroupPosition, type FlagGroupProps, type FlagProps, type FlagVariant, Flex, type FlexAlign, type FlexDirection, type FlexJustify, type FlexProps, type FlexWrap, Form, FormControl, FormDescription, FormError, type FormErrors, FormField, type FormFieldProps, FormItem, FormLabel, type FormProps, type FormValues, Grid, type GridCols, type GridFlow, type GridProps, GroupedBarChartTemplate, type GroupedBarChartTemplateProps, type GroupedBarSeries, Heading, type HeadingProps, Hide, type HideProps, IconButton, type IconButtonProps, Inline, InlineDialog, InlineDialogContent, type InlineDialogContentProps, type InlineDialogProps, InlineDialogTrigger, InlineEdit, type InlineEditProps, type InlineProps, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Label, type LayoutSpacing, Link, type LinkProps, Lozenge, type LozengeProps, Menu, MenuDivider, MenuItem, type MenuItemProps, type MenuProps, MenuSection, type MenuSectionProps, MetricSparklineCard, type MetricSparklineCardProps, type MetricSparklinePoint, MetricText, type MetricTextProps, MiniSparklineChartCard, type MiniSparklineChartCardProps, type MiniSparklinePoint, type MiniSparklineStat, OtpInput, type OtpInputProps, PageHeader, Pagination, PaginationContent, type PaginationContentProps, PaginationEllipsis, type PaginationEllipsisProps, PaginationItem, type PaginationItemProps, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationPrevious, type PaginationPreviousProps, type PaginationProps, PasswordInput, type PasswordInputProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, ProgressIndicator, type ProgressIndicatorProps, type ProgressProps, ProgressTracker, type ProgressTrackerProps, type ProgressTrackerStep, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RankedBarItem, RankedBarListTemplate, type RankedBarListTemplateProps, type RegisterResult, type ResponsiveCols, ScrollArea, ScrollBar, SectionMessage, SectionMessageActions, SectionMessageContent, type SectionMessageProps, SectionMessageTitle, type SectionMessageVariant, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerSize, SelectValue, Separator, Shimmer, Show, type ShowProps, SideNav, SideNavFooter, SideNavHeader, SideNavItem, type SideNavItemProps, type SideNavProps, SideNavSection, Slider, type SliderProps, Spinner, type SpinnerProps, SplitButton, SplitButtonItem, type SplitButtonItemProps, type SplitButtonProps, Spotlight, SpotlightCard, type SpotlightCardProps, type SpotlightProps, type SpotlightStep, Stack, type StackProps, StatCardSkeleton, StatusBadge, type StatusBadgeProps, Switch, type SwitchProps, TableRowSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TagGroup, type TagGroupProps, type TagProps, Text, type TextProps, Textarea, TimePicker, type TimePickerProps, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UseBreakpointReturn, type UseFlagGroupReturn, type UseFormReturn, type UseSpotlightReturn, type ValidatorRule, VisuallyHidden, type VisuallyHiddenProps, cn, useBreakpoint, useFlagGroup, useForm, useSpotlight };
|
package/dist/index.d.ts
CHANGED
|
@@ -600,7 +600,19 @@ declare function DropdownMenuShortcut({ className, ...props }: React$1.HTMLAttri
|
|
|
600
600
|
declare const Select: React$1.FC<SelectPrimitive.SelectProps>;
|
|
601
601
|
declare const SelectGroup: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
602
602
|
declare const SelectValue: React$1.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React$1.RefAttributes<HTMLSpanElement>>;
|
|
603
|
-
|
|
603
|
+
/**
|
|
604
|
+
* `md` (default) is the form-field trigger. `sm` is for dense furniture — a
|
|
605
|
+
* rows-per-page picker in a table footer, a control inside a toolbar — where
|
|
606
|
+
* the full-height field towers over everything beside it.
|
|
607
|
+
*
|
|
608
|
+
* This is a size prop rather than a job for `className` because the base sets
|
|
609
|
+
* `min-h-11`, which beats an `h-8` utility: every caller wanting a short
|
|
610
|
+
* trigger had to override min-height, padding, gap and text size together.
|
|
611
|
+
*/
|
|
612
|
+
type SelectTriggerSize = "sm" | "md";
|
|
613
|
+
declare const SelectTrigger: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
614
|
+
size?: SelectTriggerSize;
|
|
615
|
+
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
604
616
|
declare const SelectScrollUpButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
605
617
|
declare const SelectScrollDownButton: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
606
618
|
declare const SelectContent: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -742,6 +754,37 @@ declare function ChartSkeleton({ height }: {
|
|
|
742
754
|
type DataTableDensity = "default" | "comfortable" | "compact";
|
|
743
755
|
type DataTableHeaderStyle = "surface" | "minimal";
|
|
744
756
|
type DataTableFooterSummary = "range" | "count";
|
|
757
|
+
/**
|
|
758
|
+
* Row expansion: a disclosure column plus a full-width panel rendered directly
|
|
759
|
+
* beneath the expanded row. Use it when the detail belongs *with* the row in
|
|
760
|
+
* the flow of the table (a request's headers, a payload, a breakdown) rather
|
|
761
|
+
* than in a drawer that covers it.
|
|
762
|
+
*
|
|
763
|
+
* Leave `expandedKeys` unset for uncontrolled behaviour (the table remembers
|
|
764
|
+
* which rows are open). Pass `expandedKeys` + `onExpandedChange` to drive it
|
|
765
|
+
* from outside — needed when opening a row triggers a fetch.
|
|
766
|
+
*/
|
|
767
|
+
type DataTableExpandable<T> = {
|
|
768
|
+
/** The panel shown under an expanded row. */
|
|
769
|
+
render: (row: T, index: number) => ReactNode;
|
|
770
|
+
/**
|
|
771
|
+
* Which rows can open at all. Rows that cannot get no toggle and no chevron,
|
|
772
|
+
* keeping the column's width without implying an affordance that isn't there.
|
|
773
|
+
* Defaults to every row.
|
|
774
|
+
*/
|
|
775
|
+
isExpandable?: (row: T, index: number) => boolean;
|
|
776
|
+
/** Controlled open rows, as `rowKey` values. Omit for uncontrolled. */
|
|
777
|
+
expandedKeys?: string[];
|
|
778
|
+
/** Fires on every open/close in controlled mode. */
|
|
779
|
+
onExpandedChange?: (keys: string[]) => void;
|
|
780
|
+
/**
|
|
781
|
+
* Fires only when a row opens, in both modes — the hook for lazily fetching
|
|
782
|
+
* that row's detail. Not called on close.
|
|
783
|
+
*/
|
|
784
|
+
onExpand?: (row: T, index: number) => void;
|
|
785
|
+
/** Accessible name for the toggle. Default "Toggle row details". */
|
|
786
|
+
toggleLabel?: string;
|
|
787
|
+
};
|
|
745
788
|
type Column<T> = {
|
|
746
789
|
key: string;
|
|
747
790
|
header: ReactNode;
|
|
@@ -789,6 +832,22 @@ interface DataTableProps<T> {
|
|
|
789
832
|
* flush with nothing trailing it. Takes precedence over `rowCta`.
|
|
790
833
|
*/
|
|
791
834
|
rowAction?: ReactNode | ((row: T, index: number) => ReactNode);
|
|
835
|
+
/**
|
|
836
|
+
* Makes the whole row a click target — the row itself opens a drawer, a
|
|
837
|
+
* detail page, whatever the table drills into — instead of that living in a
|
|
838
|
+
* per-cell wrapper or a hover-revealed button.
|
|
839
|
+
*
|
|
840
|
+
* The handler sits on the `<tr>`, so the entire row including cell padding
|
|
841
|
+
* and the empty space between columns is clickable, and the row gets
|
|
842
|
+
* `cursor-pointer` plus keyboard access (focusable, Enter / Space).
|
|
843
|
+
*
|
|
844
|
+
* Clicks that originate inside something interactive — a `<button>`, `<a>`,
|
|
845
|
+
* a form control, a Radix trigger, or anything marked
|
|
846
|
+
* `data-row-click-ignore` — do NOT fire this. Copy buttons, per-row menus
|
|
847
|
+
* and the `rowAction` overlay therefore keep doing only their own job
|
|
848
|
+
* without each having to stop propagation.
|
|
849
|
+
*/
|
|
850
|
+
onRowClick?: (row: T, index: number) => void;
|
|
792
851
|
/** Row / cell vertical rhythm and horizontal gutters */
|
|
793
852
|
density?: DataTableDensity;
|
|
794
853
|
/**
|
|
@@ -813,8 +872,19 @@ interface DataTableProps<T> {
|
|
|
813
872
|
};
|
|
814
873
|
/** With `density="compact"`, use tighter cell gutters (`pl-1.5 pr-2.5` vs `px-3`). Footer keeps normal horizontal padding. */
|
|
815
874
|
snug?: boolean;
|
|
875
|
+
/**
|
|
876
|
+
* Extra control at the far left of the built-in footer, before the
|
|
877
|
+
* "Showing x–y of N" summary — a rows-per-page picker, typically.
|
|
878
|
+
*
|
|
879
|
+
* Without it a grid that needs a page-size control has to abandon the
|
|
880
|
+
* built-in footer and hand-roll one, which is how two different pagers end up
|
|
881
|
+
* in the same app.
|
|
882
|
+
*/
|
|
883
|
+
footerLeading?: ReactNode;
|
|
884
|
+
/** Per-row disclosure panel rendered beneath the row. See `DataTableExpandable`. */
|
|
885
|
+
expandable?: DataTableExpandable<T>;
|
|
816
886
|
}
|
|
817
|
-
declare function DataTable<T>({ columns, data, isLoading, skeletonRows, emptyTitle, emptyDescription, pageSize, page: controlledPage, onPageChange, totalRows, className, rowKey, rowCta, rowAction, density, tableLayout, theadClassName, headerStyle, footerSummary, footerCountLabels, snug, }: DataTableProps<T>): React$1.JSX.Element;
|
|
887
|
+
declare function DataTable<T>({ columns, data, isLoading, skeletonRows, emptyTitle, emptyDescription, pageSize, page: controlledPage, onPageChange, totalRows, className, rowKey, rowCta, rowAction, onRowClick, density, tableLayout, theadClassName, headerStyle, footerSummary, footerCountLabels, snug, expandable, footerLeading, }: DataTableProps<T>): React$1.JSX.Element;
|
|
818
888
|
|
|
819
889
|
interface EmptyStateProps {
|
|
820
890
|
icon?: LucideIcon;
|
|
@@ -1263,4 +1333,4 @@ interface VisuallyHiddenProps extends React$1.HTMLAttributes<HTMLElement> {
|
|
|
1263
1333
|
}
|
|
1264
1334
|
declare const VisuallyHidden: React$1.ForwardRefExoticComponent<VisuallyHiddenProps & React$1.RefAttributes<HTMLElement>>;
|
|
1265
1335
|
|
|
1266
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, type AlertProps, AlertTitle, type AttentionListItem, AttentionListTemplate, type AttentionListTemplateProps, Avatar, AvatarFallback, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, AvatarImage, AvatarTag, type AvatarTagProps, type AvatarTagSize, Badge, type BadgeProps, type BadgeTrailIcon, type BadgeVariant, Banner, type BannerProps, Blanket, type BlanketProps, Box, type BoxProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, type Breakpoint, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, COUNTRIES, Calendar, CalendarDayButton, type CalendarProps, Callout, CalloutIcon, type CalloutProps, CalloutText, CalloutTitle, type CalloutVariant, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CategoryBarChartTemplate, type CategoryBarChartTemplateProps, type CategoryBarPoint, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartSkeleton, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, type CheckboxProps, CheckboxSelect, type CheckboxSelectOption, type CheckboxSelectProps, Code, CodeBlock, type CodeBlockProps, type CodeProps, type Column, Command, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, type CommandProps, CommandSeparator, type CommandSeparatorProps, CommandShortcut, type CommandShortcutProps, type Country, CountrySelect, type CountrySelectProps, CurrencyAmountInput, type DashboardAreaChartPoint, DashboardAreaChartTemplate, type DashboardAreaChartTemplateProps, DataTable, type DataTableDensity, type DataTableFooterSummary, type DataTableHeaderStyle, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, Field, type FieldConfig, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, type FieldsConfig, Flag, type FlagAction, FlagGroup, type FlagGroupPosition, type FlagGroupProps, type FlagProps, type FlagVariant, Flex, type FlexAlign, type FlexDirection, type FlexJustify, type FlexProps, type FlexWrap, Form, FormControl, FormDescription, FormError, type FormErrors, FormField, type FormFieldProps, FormItem, FormLabel, type FormProps, type FormValues, Grid, type GridCols, type GridFlow, type GridProps, GroupedBarChartTemplate, type GroupedBarChartTemplateProps, type GroupedBarSeries, Heading, type HeadingProps, Hide, type HideProps, IconButton, type IconButtonProps, Inline, InlineDialog, InlineDialogContent, type InlineDialogContentProps, type InlineDialogProps, InlineDialogTrigger, InlineEdit, type InlineEditProps, type InlineProps, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Label, type LayoutSpacing, Link, type LinkProps, Lozenge, type LozengeProps, Menu, MenuDivider, MenuItem, type MenuItemProps, type MenuProps, MenuSection, type MenuSectionProps, MetricSparklineCard, type MetricSparklineCardProps, type MetricSparklinePoint, MetricText, type MetricTextProps, MiniSparklineChartCard, type MiniSparklineChartCardProps, type MiniSparklinePoint, type MiniSparklineStat, OtpInput, type OtpInputProps, PageHeader, Pagination, PaginationContent, type PaginationContentProps, PaginationEllipsis, type PaginationEllipsisProps, PaginationItem, type PaginationItemProps, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationPrevious, type PaginationPreviousProps, type PaginationProps, PasswordInput, type PasswordInputProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, ProgressIndicator, type ProgressIndicatorProps, type ProgressProps, ProgressTracker, type ProgressTrackerProps, type ProgressTrackerStep, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RankedBarItem, RankedBarListTemplate, type RankedBarListTemplateProps, type RegisterResult, type ResponsiveCols, ScrollArea, ScrollBar, SectionMessage, SectionMessageActions, SectionMessageContent, type SectionMessageProps, SectionMessageTitle, type SectionMessageVariant, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Shimmer, Show, type ShowProps, SideNav, SideNavFooter, SideNavHeader, SideNavItem, type SideNavItemProps, type SideNavProps, SideNavSection, Slider, type SliderProps, Spinner, type SpinnerProps, SplitButton, SplitButtonItem, type SplitButtonItemProps, type SplitButtonProps, Spotlight, SpotlightCard, type SpotlightCardProps, type SpotlightProps, type SpotlightStep, Stack, type StackProps, StatCardSkeleton, StatusBadge, type StatusBadgeProps, Switch, type SwitchProps, TableRowSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TagGroup, type TagGroupProps, type TagProps, Text, type TextProps, Textarea, TimePicker, type TimePickerProps, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UseBreakpointReturn, type UseFlagGroupReturn, type UseFormReturn, type UseSpotlightReturn, type ValidatorRule, VisuallyHidden, type VisuallyHiddenProps, cn, useBreakpoint, useFlagGroup, useForm, useSpotlight };
|
|
1336
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, type AlertProps, AlertTitle, type AttentionListItem, AttentionListTemplate, type AttentionListTemplateProps, Avatar, AvatarFallback, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, AvatarImage, AvatarTag, type AvatarTagProps, type AvatarTagSize, Badge, type BadgeProps, type BadgeTrailIcon, type BadgeVariant, Banner, type BannerProps, Blanket, type BlanketProps, Box, type BoxProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, type Breakpoint, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, COUNTRIES, Calendar, CalendarDayButton, type CalendarProps, Callout, CalloutIcon, type CalloutProps, CalloutText, CalloutTitle, type CalloutVariant, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CategoryBarChartTemplate, type CategoryBarChartTemplateProps, type CategoryBarPoint, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartSkeleton, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, type CheckboxProps, CheckboxSelect, type CheckboxSelectOption, type CheckboxSelectProps, Code, CodeBlock, type CodeBlockProps, type CodeProps, type Column, Command, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, type CommandProps, CommandSeparator, type CommandSeparatorProps, CommandShortcut, type CommandShortcutProps, type Country, CountrySelect, type CountrySelectProps, CurrencyAmountInput, type DashboardAreaChartPoint, DashboardAreaChartTemplate, type DashboardAreaChartTemplateProps, DataTable, type DataTableDensity, type DataTableExpandable, type DataTableFooterSummary, type DataTableHeaderStyle, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, Field, type FieldConfig, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, type FieldsConfig, Flag, type FlagAction, FlagGroup, type FlagGroupPosition, type FlagGroupProps, type FlagProps, type FlagVariant, Flex, type FlexAlign, type FlexDirection, type FlexJustify, type FlexProps, type FlexWrap, Form, FormControl, FormDescription, FormError, type FormErrors, FormField, type FormFieldProps, FormItem, FormLabel, type FormProps, type FormValues, Grid, type GridCols, type GridFlow, type GridProps, GroupedBarChartTemplate, type GroupedBarChartTemplateProps, type GroupedBarSeries, Heading, type HeadingProps, Hide, type HideProps, IconButton, type IconButtonProps, Inline, InlineDialog, InlineDialogContent, type InlineDialogContentProps, type InlineDialogProps, InlineDialogTrigger, InlineEdit, type InlineEditProps, type InlineProps, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Label, type LayoutSpacing, Link, type LinkProps, Lozenge, type LozengeProps, Menu, MenuDivider, MenuItem, type MenuItemProps, type MenuProps, MenuSection, type MenuSectionProps, MetricSparklineCard, type MetricSparklineCardProps, type MetricSparklinePoint, MetricText, type MetricTextProps, MiniSparklineChartCard, type MiniSparklineChartCardProps, type MiniSparklinePoint, type MiniSparklineStat, OtpInput, type OtpInputProps, PageHeader, Pagination, PaginationContent, type PaginationContentProps, PaginationEllipsis, type PaginationEllipsisProps, PaginationItem, type PaginationItemProps, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationPrevious, type PaginationPreviousProps, type PaginationProps, PasswordInput, type PasswordInputProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, ProgressIndicator, type ProgressIndicatorProps, type ProgressProps, ProgressTracker, type ProgressTrackerProps, type ProgressTrackerStep, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RankedBarItem, RankedBarListTemplate, type RankedBarListTemplateProps, type RegisterResult, type ResponsiveCols, ScrollArea, ScrollBar, SectionMessage, SectionMessageActions, SectionMessageContent, type SectionMessageProps, SectionMessageTitle, type SectionMessageVariant, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerSize, SelectValue, Separator, Shimmer, Show, type ShowProps, SideNav, SideNavFooter, SideNavHeader, SideNavItem, type SideNavItemProps, type SideNavProps, SideNavSection, Slider, type SliderProps, Spinner, type SpinnerProps, SplitButton, SplitButtonItem, type SplitButtonItemProps, type SplitButtonProps, Spotlight, SpotlightCard, type SpotlightCardProps, type SpotlightProps, type SpotlightStep, Stack, type StackProps, StatCardSkeleton, StatusBadge, type StatusBadgeProps, Switch, type SwitchProps, TableRowSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TagGroup, type TagGroupProps, type TagProps, Text, type TextProps, Textarea, TimePicker, type TimePickerProps, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UseBreakpointReturn, type UseFlagGroupReturn, type UseFormReturn, type UseSpotlightReturn, type ValidatorRule, VisuallyHidden, type VisuallyHiddenProps, cn, useBreakpoint, useFlagGroup, useForm, useSpotlight };
|