@sikka/hawa 0.14.3-next → 0.14.5-next
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.d.mts +22 -3
- package/dist/index.d.ts +22 -3
- package/dist/index.js +75 -14
- package/dist/index.mjs +43 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -68,6 +68,21 @@ type PricingCardTypes = {
|
|
|
68
68
|
};
|
|
69
69
|
declare const PricingCard: FC<PricingCardTypes>;
|
|
70
70
|
|
|
71
|
+
declare const DropdownMenuRoot: React$1.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
72
|
+
declare const DropdownMenuTrigger: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
73
|
+
declare const DropdownMenuSubTrigger: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
74
|
+
inset?: boolean | undefined;
|
|
75
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
76
|
+
declare const DropdownMenuContent: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
77
|
+
declare const DropdownMenuItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
78
|
+
inset?: boolean | undefined;
|
|
79
|
+
end?: any;
|
|
80
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
81
|
+
declare const DropdownMenuCheckboxItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
82
|
+
declare const DropdownMenuLabel: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
83
|
+
inset?: boolean | undefined;
|
|
84
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
85
|
+
declare const DropdownMenuSeparator: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
71
86
|
type ExtendedDropdownMenuContentProps = Partial<React$1.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>> & {};
|
|
72
87
|
type ExtendedDropdownMenuTriggerProps = Partial<React$1.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Trigger>> & {};
|
|
73
88
|
type SubItem$1 = {
|
|
@@ -500,15 +515,19 @@ declare const SortButton: React__default.FC<SortButtonProps>;
|
|
|
500
515
|
type DataTableProps<DataProps = {}> = {
|
|
501
516
|
direction?: DirectionType;
|
|
502
517
|
columns: ColumnDef<DataProps>[];
|
|
518
|
+
enableSearch?: boolean;
|
|
519
|
+
enableHideColumns?: boolean;
|
|
520
|
+
enableGoTo?: boolean;
|
|
503
521
|
data: DataProps[];
|
|
504
522
|
itemsPerPage?: any[];
|
|
505
523
|
showCount?: boolean;
|
|
506
524
|
paginationPosition?: "top" | "bottom";
|
|
507
525
|
condensed?: boolean;
|
|
508
526
|
isLoading?: boolean;
|
|
509
|
-
enableGoTo?: boolean;
|
|
510
527
|
defaultSort?: string;
|
|
528
|
+
translateFn?: any;
|
|
511
529
|
texts?: {
|
|
530
|
+
columns?: string;
|
|
512
531
|
searchPlaceholder?: string;
|
|
513
532
|
item?: string;
|
|
514
533
|
noData?: any;
|
|
@@ -524,7 +543,7 @@ declare module "@tanstack/table-core" {
|
|
|
524
543
|
sortable: any;
|
|
525
544
|
}
|
|
526
545
|
}
|
|
527
|
-
declare const DataTable: <DataProps extends {}>({ columns, data, paginationPosition, ...props }: DataTableProps<DataProps>) => React$1.JSX.Element;
|
|
546
|
+
declare const DataTable: <DataProps extends {}>({ columns, data, paginationPosition, translateFn, enableHideColumns, enableSearch, enableGoTo, ...props }: DataTableProps<DataProps>) => React$1.JSX.Element;
|
|
528
547
|
|
|
529
548
|
type DataProps = {};
|
|
530
549
|
type SimpleTableProps = {
|
|
@@ -1677,4 +1696,4 @@ declare function useTabs(initialTab?: string): {
|
|
|
1677
1696
|
handleTabChange: (index: any) => void;
|
|
1678
1697
|
};
|
|
1679
1698
|
|
|
1680
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionRoot, AccordionTrigger, ActionCard, AdCard, Alert, Announcement, AppLanding, AppLayout, AppLayoutSidebarItemProps, AppStores, AppTopbar, BackToTop, Badge, BadgedComponent, Breadcrumb, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CheckEmail, Checkbox, Chip, ChipColors, ChipTypes, CodeBlock, CodeConfirmation, ColorPicker, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ComparingPlans, Copyrights, Count, DataTable, DestroyableCard, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DocsLayout, DocsSidebar, DropdownMenu, EmptyState, FeedbackEmoji, FeedbackForm, FeedbackRating, FileDropzone, HorizontalPricing, Input, InterfaceSettings, ItemCard, Label, LabelProps, LandingCard, LeadGenerator, LegalTexts, Loading, LoginForm, Logos, MenuItemType, NavMenuItem, Navbar, NavigationMenu, NavigationMenuLink, NewPasswordForm, NoPermission, NotFound, PhoneInput, PinInput, Popover, PopoverContent, PopoverTrigger, PricingCard, PricingPlans, Progress, ProgressCircle, Radio, RadioOptionsTypes, RegisterForm, ResetPasswordForm, ScrollArea, ScrollBar, ScrollIndicator, Select, SelectOptionProps, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarGroup, SidebarItem, SimpleTable, Skeleton, Slider, SortButton, SplitButton, Stats, StopPropagationWrapper, SubItem$1 as SubItem, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Testimonial, Textarea, TextareaProps, Toast$1 as Toast, ToastAction, ToastActionElement, ToastClose, ToastDescription, ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, Usage, UseFocusWithinOptions, UseMediaQueryOptions, UserReferralSource, buttonVariants, reducer, toast, useBreakpoint, useClipboard, useFocusWithin, useMediaQuery, useTabs, useToast, useWindowSize };
|
|
1699
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionRoot, AccordionTrigger, ActionCard, AdCard, Alert, Announcement, AppLanding, AppLayout, AppLayoutSidebarItemProps, AppStores, AppTopbar, BackToTop, Badge, BadgedComponent, Breadcrumb, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CheckEmail, Checkbox, Chip, ChipColors, ChipTypes, CodeBlock, CodeConfirmation, ColorPicker, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ComparingPlans, Copyrights, Count, DataTable, DestroyableCard, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DocsLayout, DocsSidebar, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, FeedbackEmoji, FeedbackForm, FeedbackRating, FileDropzone, HorizontalPricing, Input, InterfaceSettings, ItemCard, Label, LabelProps, LandingCard, LeadGenerator, LegalTexts, Loading, LoginForm, Logos, MenuItemType, NavMenuItem, Navbar, NavigationMenu, NavigationMenuLink, NewPasswordForm, NoPermission, NotFound, PhoneInput, PinInput, Popover, PopoverContent, PopoverTrigger, PricingCard, PricingPlans, Progress, ProgressCircle, Radio, RadioOptionsTypes, RegisterForm, ResetPasswordForm, ScrollArea, ScrollBar, ScrollIndicator, Select, SelectOptionProps, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarGroup, SidebarItem, SimpleTable, Skeleton, Slider, SortButton, SplitButton, Stats, StopPropagationWrapper, SubItem$1 as SubItem, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Testimonial, Textarea, TextareaProps, Toast$1 as Toast, ToastAction, ToastActionElement, ToastClose, ToastDescription, ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, Usage, UseFocusWithinOptions, UseMediaQueryOptions, UserReferralSource, buttonVariants, reducer, toast, useBreakpoint, useClipboard, useFocusWithin, useMediaQuery, useTabs, useToast, useWindowSize };
|
package/dist/index.d.ts
CHANGED
|
@@ -68,6 +68,21 @@ type PricingCardTypes = {
|
|
|
68
68
|
};
|
|
69
69
|
declare const PricingCard: FC<PricingCardTypes>;
|
|
70
70
|
|
|
71
|
+
declare const DropdownMenuRoot: React$1.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
72
|
+
declare const DropdownMenuTrigger: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
73
|
+
declare const DropdownMenuSubTrigger: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
74
|
+
inset?: boolean | undefined;
|
|
75
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
76
|
+
declare const DropdownMenuContent: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
77
|
+
declare const DropdownMenuItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
78
|
+
inset?: boolean | undefined;
|
|
79
|
+
end?: any;
|
|
80
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
81
|
+
declare const DropdownMenuCheckboxItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
82
|
+
declare const DropdownMenuLabel: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
83
|
+
inset?: boolean | undefined;
|
|
84
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
85
|
+
declare const DropdownMenuSeparator: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
71
86
|
type ExtendedDropdownMenuContentProps = Partial<React$1.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>> & {};
|
|
72
87
|
type ExtendedDropdownMenuTriggerProps = Partial<React$1.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Trigger>> & {};
|
|
73
88
|
type SubItem$1 = {
|
|
@@ -500,15 +515,19 @@ declare const SortButton: React__default.FC<SortButtonProps>;
|
|
|
500
515
|
type DataTableProps<DataProps = {}> = {
|
|
501
516
|
direction?: DirectionType;
|
|
502
517
|
columns: ColumnDef<DataProps>[];
|
|
518
|
+
enableSearch?: boolean;
|
|
519
|
+
enableHideColumns?: boolean;
|
|
520
|
+
enableGoTo?: boolean;
|
|
503
521
|
data: DataProps[];
|
|
504
522
|
itemsPerPage?: any[];
|
|
505
523
|
showCount?: boolean;
|
|
506
524
|
paginationPosition?: "top" | "bottom";
|
|
507
525
|
condensed?: boolean;
|
|
508
526
|
isLoading?: boolean;
|
|
509
|
-
enableGoTo?: boolean;
|
|
510
527
|
defaultSort?: string;
|
|
528
|
+
translateFn?: any;
|
|
511
529
|
texts?: {
|
|
530
|
+
columns?: string;
|
|
512
531
|
searchPlaceholder?: string;
|
|
513
532
|
item?: string;
|
|
514
533
|
noData?: any;
|
|
@@ -524,7 +543,7 @@ declare module "@tanstack/table-core" {
|
|
|
524
543
|
sortable: any;
|
|
525
544
|
}
|
|
526
545
|
}
|
|
527
|
-
declare const DataTable: <DataProps extends {}>({ columns, data, paginationPosition, ...props }: DataTableProps<DataProps>) => React$1.JSX.Element;
|
|
546
|
+
declare const DataTable: <DataProps extends {}>({ columns, data, paginationPosition, translateFn, enableHideColumns, enableSearch, enableGoTo, ...props }: DataTableProps<DataProps>) => React$1.JSX.Element;
|
|
528
547
|
|
|
529
548
|
type DataProps = {};
|
|
530
549
|
type SimpleTableProps = {
|
|
@@ -1677,4 +1696,4 @@ declare function useTabs(initialTab?: string): {
|
|
|
1677
1696
|
handleTabChange: (index: any) => void;
|
|
1678
1697
|
};
|
|
1679
1698
|
|
|
1680
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionRoot, AccordionTrigger, ActionCard, AdCard, Alert, Announcement, AppLanding, AppLayout, AppLayoutSidebarItemProps, AppStores, AppTopbar, BackToTop, Badge, BadgedComponent, Breadcrumb, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CheckEmail, Checkbox, Chip, ChipColors, ChipTypes, CodeBlock, CodeConfirmation, ColorPicker, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ComparingPlans, Copyrights, Count, DataTable, DestroyableCard, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DocsLayout, DocsSidebar, DropdownMenu, EmptyState, FeedbackEmoji, FeedbackForm, FeedbackRating, FileDropzone, HorizontalPricing, Input, InterfaceSettings, ItemCard, Label, LabelProps, LandingCard, LeadGenerator, LegalTexts, Loading, LoginForm, Logos, MenuItemType, NavMenuItem, Navbar, NavigationMenu, NavigationMenuLink, NewPasswordForm, NoPermission, NotFound, PhoneInput, PinInput, Popover, PopoverContent, PopoverTrigger, PricingCard, PricingPlans, Progress, ProgressCircle, Radio, RadioOptionsTypes, RegisterForm, ResetPasswordForm, ScrollArea, ScrollBar, ScrollIndicator, Select, SelectOptionProps, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarGroup, SidebarItem, SimpleTable, Skeleton, Slider, SortButton, SplitButton, Stats, StopPropagationWrapper, SubItem$1 as SubItem, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Testimonial, Textarea, TextareaProps, Toast$1 as Toast, ToastAction, ToastActionElement, ToastClose, ToastDescription, ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, Usage, UseFocusWithinOptions, UseMediaQueryOptions, UserReferralSource, buttonVariants, reducer, toast, useBreakpoint, useClipboard, useFocusWithin, useMediaQuery, useTabs, useToast, useWindowSize };
|
|
1699
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionRoot, AccordionTrigger, ActionCard, AdCard, Alert, Announcement, AppLanding, AppLayout, AppLayoutSidebarItemProps, AppStores, AppTopbar, BackToTop, Badge, BadgedComponent, Breadcrumb, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CheckEmail, Checkbox, Chip, ChipColors, ChipTypes, CodeBlock, CodeConfirmation, ColorPicker, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ComparingPlans, Copyrights, Count, DataTable, DestroyableCard, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DocsLayout, DocsSidebar, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, FeedbackEmoji, FeedbackForm, FeedbackRating, FileDropzone, HorizontalPricing, Input, InterfaceSettings, ItemCard, Label, LabelProps, LandingCard, LeadGenerator, LegalTexts, Loading, LoginForm, Logos, MenuItemType, NavMenuItem, Navbar, NavigationMenu, NavigationMenuLink, NewPasswordForm, NoPermission, NotFound, PhoneInput, PinInput, Popover, PopoverContent, PopoverTrigger, PricingCard, PricingPlans, Progress, ProgressCircle, Radio, RadioOptionsTypes, RegisterForm, ResetPasswordForm, ScrollArea, ScrollBar, ScrollIndicator, Select, SelectOptionProps, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarGroup, SidebarItem, SimpleTable, Skeleton, Slider, SortButton, SplitButton, Stats, StopPropagationWrapper, SubItem$1 as SubItem, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Testimonial, Textarea, TextareaProps, Toast$1 as Toast, ToastAction, ToastActionElement, ToastClose, ToastDescription, ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, Usage, UseFocusWithinOptions, UseMediaQueryOptions, UserReferralSource, buttonVariants, reducer, toast, useBreakpoint, useClipboard, useFocusWithin, useMediaQuery, useTabs, useToast, useWindowSize };
|
package/dist/index.js
CHANGED
|
@@ -514,6 +514,30 @@ __export(components_exports, {
|
|
|
514
514
|
DropdownMenu: function() {
|
|
515
515
|
return DropdownMenu;
|
|
516
516
|
},
|
|
517
|
+
DropdownMenuCheckboxItem: function() {
|
|
518
|
+
return DropdownMenuCheckboxItem;
|
|
519
|
+
},
|
|
520
|
+
DropdownMenuContent: function() {
|
|
521
|
+
return DropdownMenuContent;
|
|
522
|
+
},
|
|
523
|
+
DropdownMenuItem: function() {
|
|
524
|
+
return DropdownMenuItem;
|
|
525
|
+
},
|
|
526
|
+
DropdownMenuLabel: function() {
|
|
527
|
+
return DropdownMenuLabel;
|
|
528
|
+
},
|
|
529
|
+
DropdownMenuRoot: function() {
|
|
530
|
+
return DropdownMenuRoot;
|
|
531
|
+
},
|
|
532
|
+
DropdownMenuSeparator: function() {
|
|
533
|
+
return DropdownMenuSeparator;
|
|
534
|
+
},
|
|
535
|
+
DropdownMenuSubTrigger: function() {
|
|
536
|
+
return DropdownMenuSubTrigger;
|
|
537
|
+
},
|
|
538
|
+
DropdownMenuTrigger: function() {
|
|
539
|
+
return DropdownMenuTrigger;
|
|
540
|
+
},
|
|
517
541
|
EmptyState: function() {
|
|
518
542
|
return EmptyState;
|
|
519
543
|
},
|
|
@@ -5313,12 +5337,16 @@ var Input = function(_param) {
|
|
|
5313
5337
|
};
|
|
5314
5338
|
// components/elements/DataTable.tsx
|
|
5315
5339
|
var DataTable = function(_param) {
|
|
5316
|
-
var columns = _param.columns, data = _param.data, _param_paginationPosition = _param.paginationPosition, paginationPosition = _param_paginationPosition === void 0 ? "bottom" : _param_paginationPosition, props = _object_without_properties(_param, [
|
|
5340
|
+
var columns = _param.columns, data = _param.data, _param_paginationPosition = _param.paginationPosition, paginationPosition = _param_paginationPosition === void 0 ? "bottom" : _param_paginationPosition, translateFn = _param.translateFn, enableHideColumns = _param.enableHideColumns, enableSearch = _param.enableSearch, enableGoTo = _param.enableGoTo, props = _object_without_properties(_param, [
|
|
5317
5341
|
"columns",
|
|
5318
5342
|
"data",
|
|
5319
|
-
"paginationPosition"
|
|
5343
|
+
"paginationPosition",
|
|
5344
|
+
"translateFn",
|
|
5345
|
+
"enableHideColumns",
|
|
5346
|
+
"enableSearch",
|
|
5347
|
+
"enableGoTo"
|
|
5320
5348
|
]);
|
|
5321
|
-
var _props_texts, _props_itemsPerPage, _props_texts1,
|
|
5349
|
+
var _props_texts, _props_itemsPerPage, _props_texts1, _props_texts2, _table_getRowModel_rows, _props_texts3, _props_texts4, _props_texts5, _props_texts6, _props_texts7, _props_texts8;
|
|
5322
5350
|
var _React40_useState = _sliced_to_array(React40.useState([
|
|
5323
5351
|
{
|
|
5324
5352
|
id: props.defaultSort || "",
|
|
@@ -5362,9 +5390,9 @@ var DataTable = function(_param) {
|
|
|
5362
5390
|
});
|
|
5363
5391
|
return /* @__PURE__ */ React40.createElement("div", {
|
|
5364
5392
|
className: "hawa-flex hawa-w-full hawa-flex-col hawa-gap-4"
|
|
5365
|
-
}, /* @__PURE__ */ React40.createElement("div", {
|
|
5366
|
-
className: "hawa-flex hawa-items-center"
|
|
5367
|
-
}, /* @__PURE__ */ React40.createElement(Input, {
|
|
5393
|
+
}, enableSearch || enableHideColumns && /* @__PURE__ */ React40.createElement("div", {
|
|
5394
|
+
className: "hawa-flex hawa-items-center hawa-flex-row hawa-gap-4"
|
|
5395
|
+
}, enableSearch && /* @__PURE__ */ React40.createElement(Input, {
|
|
5368
5396
|
forceHideHelperText: true,
|
|
5369
5397
|
placeholder: (_props_texts1 = props.texts) === null || _props_texts1 === void 0 ? void 0 : _props_texts1.searchPlaceholder,
|
|
5370
5398
|
value: globalFilter !== null && globalFilter !== void 0 ? globalFilter : "",
|
|
@@ -5373,7 +5401,32 @@ var DataTable = function(_param) {
|
|
|
5373
5401
|
},
|
|
5374
5402
|
margin: "none",
|
|
5375
5403
|
className: "hawa-w-full md:hawa-max-w-sm"
|
|
5376
|
-
})
|
|
5404
|
+
}), enableHideColumns && /* @__PURE__ */ React40.createElement(DropdownMenuRoot, null, /* @__PURE__ */ React40.createElement(DropdownMenuTrigger, {
|
|
5405
|
+
asChild: true
|
|
5406
|
+
}, /* @__PURE__ */ React40.createElement(Button, {
|
|
5407
|
+
variant: "outline",
|
|
5408
|
+
className: "hawa-flex hawa-flex-row hawa-gap-2"
|
|
5409
|
+
}, ((_props_texts2 = props.texts) === null || _props_texts2 === void 0 ? void 0 : _props_texts2.columns) || "Columns", /* @__PURE__ */ React40.createElement("svg", {
|
|
5410
|
+
"aria-label": "Chevron down Icon",
|
|
5411
|
+
stroke: "currentColor",
|
|
5412
|
+
fill: "currentColor",
|
|
5413
|
+
viewBox: "0 0 16 16",
|
|
5414
|
+
className: "hawa-h-3 hawa-w-3 hawa-rotate-90 hawa-shrink-0 hawa-transition-transform hawa-duration-200 "
|
|
5415
|
+
}, /* @__PURE__ */ React40.createElement("path", {
|
|
5416
|
+
d: "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"
|
|
5417
|
+
})))), /* @__PURE__ */ React40.createElement(DropdownMenuContent, {
|
|
5418
|
+
align: "end"
|
|
5419
|
+
}, table.getAllColumns().filter(function(column) {
|
|
5420
|
+
return column.getCanHide();
|
|
5421
|
+
}).map(function(column) {
|
|
5422
|
+
return /* @__PURE__ */ React40.createElement(DropdownMenuCheckboxItem, {
|
|
5423
|
+
key: column.id,
|
|
5424
|
+
checked: column.getIsVisible(),
|
|
5425
|
+
onCheckedChange: function(value) {
|
|
5426
|
+
return column.toggleVisibility(!!value);
|
|
5427
|
+
}
|
|
5428
|
+
}, translateFn ? translateFn(column.id) : column.id);
|
|
5429
|
+
})))), props.isLoading ? /* @__PURE__ */ React40.createElement(Skeleton, {
|
|
5377
5430
|
className: "hawa-h-[130px] hawa-w-full"
|
|
5378
5431
|
}) : /* @__PURE__ */ React40.createElement("div", {
|
|
5379
5432
|
className: cn("hawa-flex hawa-w-full hawa-gap-4", paginationPosition === "top" ? "hawa-flex-col-reverse" : "hawa-flex-col")
|
|
@@ -5406,20 +5459,20 @@ var DataTable = function(_param) {
|
|
|
5406
5459
|
}) : /* @__PURE__ */ React40.createElement(TableRow, null, /* @__PURE__ */ React40.createElement(TableCell, {
|
|
5407
5460
|
colSpan: columns.length,
|
|
5408
5461
|
className: "hawa-h-24 hawa-text-center"
|
|
5409
|
-
}, (
|
|
5462
|
+
}, (_props_texts3 = props.texts) === null || _props_texts3 === void 0 ? void 0 : _props_texts3.noData))))), /* @__PURE__ */ React40.createElement("div", {
|
|
5410
5463
|
className: "hawa-flex hawa-items-center hawa-justify-between"
|
|
5411
5464
|
}, !props.showCount && /* @__PURE__ */ React40.createElement("div", {
|
|
5412
5465
|
className: "hawa-flex hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm hawa-text-muted-foreground"
|
|
5413
5466
|
}), props.showCount && /* @__PURE__ */ React40.createElement("div", {
|
|
5414
5467
|
className: "text-sm text-muted-foreground",
|
|
5415
5468
|
dir: props.direction
|
|
5416
|
-
}, /* @__PURE__ */ React40.createElement("span", null, (
|
|
5469
|
+
}, /* @__PURE__ */ React40.createElement("span", null, (_props_texts4 = props.texts) === null || _props_texts4 === void 0 ? void 0 : _props_texts4.total), " ", /* @__PURE__ */ React40.createElement("span", null, table.getFilteredRowModel().rows.length.toLocaleString())), table.getPageCount() !== 0 && /* @__PURE__ */ React40.createElement("div", {
|
|
5417
5470
|
className: "hawa-flex hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 "
|
|
5418
|
-
},
|
|
5471
|
+
}, enableGoTo && /* @__PURE__ */ React40.createElement("div", {
|
|
5419
5472
|
className: "hawa-flex hawa-flex-row hawa-justify-center hawa-items-center hawa-gap-2"
|
|
5420
5473
|
}, /* @__PURE__ */ React40.createElement("span", {
|
|
5421
5474
|
className: "hawa-text-sm"
|
|
5422
|
-
}, (
|
|
5475
|
+
}, (_props_texts5 = props.texts) === null || _props_texts5 === void 0 ? void 0 : _props_texts5.goTo), /* @__PURE__ */ React40.createElement("input", {
|
|
5423
5476
|
max: table.getPageCount(),
|
|
5424
5477
|
min: 0,
|
|
5425
5478
|
type: "number",
|
|
@@ -5463,7 +5516,7 @@ var DataTable = function(_param) {
|
|
|
5463
5516
|
variant: "outline",
|
|
5464
5517
|
size: "icon",
|
|
5465
5518
|
className: "hawa-h-fit hawa-w-fit hawa-p-0 hawa-px-2 hawa-py-1 "
|
|
5466
|
-
}, "".concat(table.getState().pagination.pageSize, " / ").concat((
|
|
5519
|
+
}, "".concat(table.getState().pagination.pageSize, " / ").concat((_props_texts6 = props.texts) === null || _props_texts6 === void 0 ? void 0 : _props_texts6.page)),
|
|
5467
5520
|
onItemSelect: function(e) {
|
|
5468
5521
|
return table.setPageSize(Number(e));
|
|
5469
5522
|
}
|
|
@@ -5471,11 +5524,11 @@ var DataTable = function(_param) {
|
|
|
5471
5524
|
className: "hawa-flex hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm "
|
|
5472
5525
|
}, /* @__PURE__ */ React40.createElement("span", {
|
|
5473
5526
|
className: "hawa-flex hawa-items-center hawa-gap-1"
|
|
5474
|
-
}, /* @__PURE__ */ React40.createElement("div", null, (
|
|
5527
|
+
}, /* @__PURE__ */ React40.createElement("div", null, (_props_texts7 = props.texts) === null || _props_texts7 === void 0 ? void 0 : _props_texts7.page), /* @__PURE__ */ React40.createElement("div", {
|
|
5475
5528
|
className: "hawa-flex hawa-flex-row hawa-gap-1"
|
|
5476
5529
|
}, /* @__PURE__ */ React40.createElement("span", {
|
|
5477
5530
|
className: "hawa-font-bold"
|
|
5478
|
-
}, table.getState().pagination.pageIndex + 1), /* @__PURE__ */ React40.createElement("span", null, (
|
|
5531
|
+
}, table.getState().pagination.pageIndex + 1), /* @__PURE__ */ React40.createElement("span", null, (_props_texts8 = props.texts) === null || _props_texts8 === void 0 ? void 0 : _props_texts8.of), /* @__PURE__ */ React40.createElement("span", {
|
|
5479
5532
|
className: "hawa-font-bold"
|
|
5480
5533
|
}, table.getPageCount())))), /* @__PURE__ */ React40.createElement(Button, {
|
|
5481
5534
|
"aria-label": "Previous Table Page",
|
|
@@ -9720,6 +9773,14 @@ function useTabs() {
|
|
|
9720
9773
|
DocsLayout: DocsLayout,
|
|
9721
9774
|
DocsSidebar: DocsSidebar,
|
|
9722
9775
|
DropdownMenu: DropdownMenu,
|
|
9776
|
+
DropdownMenuCheckboxItem: DropdownMenuCheckboxItem,
|
|
9777
|
+
DropdownMenuContent: DropdownMenuContent,
|
|
9778
|
+
DropdownMenuItem: DropdownMenuItem,
|
|
9779
|
+
DropdownMenuLabel: DropdownMenuLabel,
|
|
9780
|
+
DropdownMenuRoot: DropdownMenuRoot,
|
|
9781
|
+
DropdownMenuSeparator: DropdownMenuSeparator,
|
|
9782
|
+
DropdownMenuSubTrigger: DropdownMenuSubTrigger,
|
|
9783
|
+
DropdownMenuTrigger: DropdownMenuTrigger,
|
|
9723
9784
|
EmptyState: EmptyState,
|
|
9724
9785
|
FeedbackEmoji: FeedbackEmoji,
|
|
9725
9786
|
FeedbackForm: FeedbackForm,
|
package/dist/index.mjs
CHANGED
|
@@ -5029,6 +5029,10 @@ var DataTable = ({
|
|
|
5029
5029
|
columns,
|
|
5030
5030
|
data,
|
|
5031
5031
|
paginationPosition = "bottom",
|
|
5032
|
+
translateFn,
|
|
5033
|
+
enableHideColumns,
|
|
5034
|
+
enableSearch,
|
|
5035
|
+
enableGoTo,
|
|
5032
5036
|
...props
|
|
5033
5037
|
}) => {
|
|
5034
5038
|
const [sorting, setSorting] = React40.useState([
|
|
@@ -5069,7 +5073,7 @@ var DataTable = ({
|
|
|
5069
5073
|
label: `${item} / ${pageText}`,
|
|
5070
5074
|
value: item
|
|
5071
5075
|
}));
|
|
5072
|
-
return /* @__PURE__ */ React40.createElement("div", { className: "hawa-flex hawa-w-full hawa-flex-col hawa-gap-4" }, /* @__PURE__ */ React40.createElement("div", { className: "hawa-flex hawa-items-center" }, /* @__PURE__ */ React40.createElement(
|
|
5076
|
+
return /* @__PURE__ */ React40.createElement("div", { className: "hawa-flex hawa-w-full hawa-flex-col hawa-gap-4" }, enableSearch || enableHideColumns && /* @__PURE__ */ React40.createElement("div", { className: "hawa-flex hawa-items-center hawa-flex-row hawa-gap-4" }, enableSearch && /* @__PURE__ */ React40.createElement(
|
|
5073
5077
|
Input,
|
|
5074
5078
|
{
|
|
5075
5079
|
forceHideHelperText: true,
|
|
@@ -5079,7 +5083,35 @@ var DataTable = ({
|
|
|
5079
5083
|
margin: "none",
|
|
5080
5084
|
className: "hawa-w-full md:hawa-max-w-sm"
|
|
5081
5085
|
}
|
|
5082
|
-
)
|
|
5086
|
+
), enableHideColumns && /* @__PURE__ */ React40.createElement(DropdownMenuRoot, null, /* @__PURE__ */ React40.createElement(DropdownMenuTrigger, { asChild: true }, /* @__PURE__ */ React40.createElement(
|
|
5087
|
+
Button,
|
|
5088
|
+
{
|
|
5089
|
+
variant: "outline",
|
|
5090
|
+
className: "hawa-flex hawa-flex-row hawa-gap-2"
|
|
5091
|
+
},
|
|
5092
|
+
props.texts?.columns || "Columns",
|
|
5093
|
+
/* @__PURE__ */ React40.createElement(
|
|
5094
|
+
"svg",
|
|
5095
|
+
{
|
|
5096
|
+
"aria-label": "Chevron down Icon",
|
|
5097
|
+
stroke: "currentColor",
|
|
5098
|
+
fill: "currentColor",
|
|
5099
|
+
viewBox: "0 0 16 16",
|
|
5100
|
+
className: "hawa-h-3 hawa-w-3 hawa-rotate-90 hawa-shrink-0 hawa-transition-transform hawa-duration-200 "
|
|
5101
|
+
},
|
|
5102
|
+
/* @__PURE__ */ React40.createElement("path", { d: "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z" })
|
|
5103
|
+
)
|
|
5104
|
+
)), /* @__PURE__ */ React40.createElement(DropdownMenuContent, { align: "end" }, table.getAllColumns().filter((column) => column.getCanHide()).map((column) => {
|
|
5105
|
+
return /* @__PURE__ */ React40.createElement(
|
|
5106
|
+
DropdownMenuCheckboxItem,
|
|
5107
|
+
{
|
|
5108
|
+
key: column.id,
|
|
5109
|
+
checked: column.getIsVisible(),
|
|
5110
|
+
onCheckedChange: (value) => column.toggleVisibility(!!value)
|
|
5111
|
+
},
|
|
5112
|
+
translateFn ? translateFn(column.id) : column.id
|
|
5113
|
+
);
|
|
5114
|
+
})))), props.isLoading ? /* @__PURE__ */ React40.createElement(Skeleton, { className: "hawa-h-[130px] hawa-w-full" }) : /* @__PURE__ */ React40.createElement(
|
|
5083
5115
|
"div",
|
|
5084
5116
|
{
|
|
5085
5117
|
className: cn(
|
|
@@ -5137,7 +5169,7 @@ var DataTable = ({
|
|
|
5137
5169
|
/* @__PURE__ */ React40.createElement("span", null, props.texts?.total),
|
|
5138
5170
|
" ",
|
|
5139
5171
|
/* @__PURE__ */ React40.createElement("span", null, table.getFilteredRowModel().rows.length.toLocaleString())
|
|
5140
|
-
), table.getPageCount() !== 0 && /* @__PURE__ */ React40.createElement("div", { className: "hawa-flex hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 " },
|
|
5172
|
+
), table.getPageCount() !== 0 && /* @__PURE__ */ React40.createElement("div", { className: "hawa-flex hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 " }, enableGoTo && /* @__PURE__ */ React40.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-center hawa-items-center hawa-gap-2" }, /* @__PURE__ */ React40.createElement("span", { className: "hawa-text-sm" }, props.texts?.goTo), /* @__PURE__ */ React40.createElement(
|
|
5141
5173
|
"input",
|
|
5142
5174
|
{
|
|
5143
5175
|
max: table.getPageCount(),
|
|
@@ -9765,6 +9797,14 @@ export {
|
|
|
9765
9797
|
DocsLayout,
|
|
9766
9798
|
DocsSidebar,
|
|
9767
9799
|
DropdownMenu,
|
|
9800
|
+
DropdownMenuCheckboxItem,
|
|
9801
|
+
DropdownMenuContent,
|
|
9802
|
+
DropdownMenuItem,
|
|
9803
|
+
DropdownMenuLabel,
|
|
9804
|
+
DropdownMenuRoot,
|
|
9805
|
+
DropdownMenuSeparator,
|
|
9806
|
+
DropdownMenuSubTrigger,
|
|
9807
|
+
DropdownMenuTrigger,
|
|
9768
9808
|
EmptyState,
|
|
9769
9809
|
FeedbackEmoji,
|
|
9770
9810
|
FeedbackForm,
|