eai-frontend-components 2.0.70 → 2.0.72
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.ts +8 -8
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -105,7 +105,7 @@ declare const BreadcrumbEllipsis: {
|
|
|
105
105
|
};
|
|
106
106
|
|
|
107
107
|
declare const buttonVariants: (props?: ({
|
|
108
|
-
variant?: "
|
|
108
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | "link" | "primary" | "ghost" | null | undefined;
|
|
109
109
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
110
110
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
111
111
|
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
@@ -208,7 +208,7 @@ declare const Command: React$1.ForwardRefExoticComponent<Omit<{
|
|
|
208
208
|
ref?: React$1.Ref<HTMLDivElement>;
|
|
209
209
|
} & {
|
|
210
210
|
asChild?: boolean;
|
|
211
|
-
}, "key" | keyof React$1.HTMLAttributes<HTMLDivElement
|
|
211
|
+
}, "key" | "asChild" | keyof React$1.HTMLAttributes<HTMLDivElement>> & {
|
|
212
212
|
label?: string;
|
|
213
213
|
shouldFilter?: boolean;
|
|
214
214
|
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
@@ -224,7 +224,7 @@ declare const CommandInput: React$1.ForwardRefExoticComponent<Omit<Omit<Pick<Pic
|
|
|
224
224
|
ref?: React$1.Ref<HTMLInputElement>;
|
|
225
225
|
} & {
|
|
226
226
|
asChild?: boolean;
|
|
227
|
-
}, "key" | "asChild" | keyof React$1.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "
|
|
227
|
+
}, "key" | "asChild" | keyof React$1.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "type" | "value"> & {
|
|
228
228
|
value?: string;
|
|
229
229
|
onValueChange?: (search: string) => void;
|
|
230
230
|
} & React$1.RefAttributes<HTMLInputElement>, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
@@ -234,7 +234,7 @@ declare const CommandList: React$1.ForwardRefExoticComponent<Omit<{
|
|
|
234
234
|
ref?: React$1.Ref<HTMLDivElement>;
|
|
235
235
|
} & {
|
|
236
236
|
asChild?: boolean;
|
|
237
|
-
}, "key" | keyof React$1.HTMLAttributes<HTMLDivElement
|
|
237
|
+
}, "key" | "asChild" | keyof React$1.HTMLAttributes<HTMLDivElement>> & {
|
|
238
238
|
label?: string;
|
|
239
239
|
} & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
240
240
|
declare const CommandEmpty: React$1.ForwardRefExoticComponent<Omit<{
|
|
@@ -243,14 +243,14 @@ declare const CommandEmpty: React$1.ForwardRefExoticComponent<Omit<{
|
|
|
243
243
|
ref?: React$1.Ref<HTMLDivElement>;
|
|
244
244
|
} & {
|
|
245
245
|
asChild?: boolean;
|
|
246
|
-
}, "key" | keyof React$1.HTMLAttributes<HTMLDivElement
|
|
246
|
+
}, "key" | "asChild" | keyof React$1.HTMLAttributes<HTMLDivElement>> & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
247
247
|
declare const CommandGroup: React$1.ForwardRefExoticComponent<Omit<{
|
|
248
248
|
children?: React$1.ReactNode;
|
|
249
249
|
} & Omit<Pick<Pick<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React$1.HTMLAttributes<HTMLDivElement>> & {
|
|
250
250
|
ref?: React$1.Ref<HTMLDivElement>;
|
|
251
251
|
} & {
|
|
252
252
|
asChild?: boolean;
|
|
253
|
-
}, "key" | keyof React$1.HTMLAttributes<HTMLDivElement
|
|
253
|
+
}, "key" | "asChild" | keyof React$1.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
|
|
254
254
|
heading?: React$1.ReactNode;
|
|
255
255
|
value?: string;
|
|
256
256
|
forceMount?: boolean;
|
|
@@ -259,7 +259,7 @@ declare const CommandSeparator: React$1.ForwardRefExoticComponent<Omit<Pick<Pick
|
|
|
259
259
|
ref?: React$1.Ref<HTMLDivElement>;
|
|
260
260
|
} & {
|
|
261
261
|
asChild?: boolean;
|
|
262
|
-
}, "key" | keyof React$1.HTMLAttributes<HTMLDivElement
|
|
262
|
+
}, "key" | "asChild" | keyof React$1.HTMLAttributes<HTMLDivElement>> & {
|
|
263
263
|
alwaysRender?: boolean;
|
|
264
264
|
} & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
265
265
|
declare const CommandItem: React$1.ForwardRefExoticComponent<Omit<{
|
|
@@ -268,7 +268,7 @@ declare const CommandItem: React$1.ForwardRefExoticComponent<Omit<{
|
|
|
268
268
|
ref?: React$1.Ref<HTMLDivElement>;
|
|
269
269
|
} & {
|
|
270
270
|
asChild?: boolean;
|
|
271
|
-
}, "key" | keyof React$1.HTMLAttributes<HTMLDivElement
|
|
271
|
+
}, "key" | "asChild" | keyof React$1.HTMLAttributes<HTMLDivElement>>, "onSelect" | "value" | "disabled"> & {
|
|
272
272
|
disabled?: boolean;
|
|
273
273
|
onSelect?: (value: string) => void;
|
|
274
274
|
value?: string;
|
package/dist/index.esm.js
CHANGED
|
@@ -10278,7 +10278,7 @@ const NavSubmenuCollapsible = ({ item, selectedRoute, onClick }) => {
|
|
|
10278
10278
|
if (!open)
|
|
10279
10279
|
toggleSidebar();
|
|
10280
10280
|
};
|
|
10281
|
-
return (jsx(SidebarMenu, { children: jsx(Collapsible, { asChild: true, defaultOpen: isOpen(), children: jsxs(SidebarMenuItem, { children: [jsx(CollapsibleTrigger, { asChild: true, className: 'group/collapsible', children: jsxs(SidebarMenuButton, { tooltip: item.title, className: 'px-2 py-5 gap-3', onClick: () => handleToggleSidebar(), children: [item.icon, jsx("span", { children: item.title }), jsx(ChevronRight, { className: 'ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90' })] }) }), jsx(CollapsibleContent, { children: jsx(SidebarMenuSub, { children: item.subMenuItems?.map((subItem) => (jsx(SidebarMenuSubItem, { children: jsx(SidebarMenuSubButton, { asChild: true, onClick: () => onClick(subItem.path), "aria-disabled": subItem.disabled, children: jsx("div", { className: cn('cursor-pointer px-2 py-1 items-center self-stretch', selectedRoute
|
|
10281
|
+
return (jsx(SidebarMenu, { children: jsx(Collapsible, { asChild: true, defaultOpen: isOpen(), children: jsxs(SidebarMenuItem, { children: [jsx(CollapsibleTrigger, { asChild: true, className: 'group/collapsible', children: jsxs(SidebarMenuButton, { tooltip: item.title, className: 'px-2 py-5 gap-3', onClick: () => handleToggleSidebar(), children: [item.icon, jsx("span", { children: item.title }), jsx(ChevronRight, { className: 'ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90' })] }) }), jsx(CollapsibleContent, { children: jsx(SidebarMenuSub, { children: item.subMenuItems?.map((subItem) => (jsx(SidebarMenuSubItem, { children: jsx(SidebarMenuSubButton, { asChild: true, onClick: () => onClick(subItem.path), "aria-disabled": subItem.disabled, children: jsx("div", { className: cn('cursor-pointer px-2 py-1 items-center self-stretch', selectedRoute?.includes(subItem.path) ? 'bg-sidebar-accent' : ''), children: jsx("span", { children: subItem.label }) }) }) }, subItem.label))) }) })] }) }, item.title) }));
|
|
10282
10282
|
};
|
|
10283
10283
|
|
|
10284
10284
|
const NavSubmenuDropdown = ({ cols, item, selectedRoute, onClick }) => {
|
|
@@ -10565,7 +10565,7 @@ function DataTable({ columns, data, className, title, rowsPage, actions, actions
|
|
|
10565
10565
|
setPagination({ ...pagination, pageIndex: index });
|
|
10566
10566
|
}
|
|
10567
10567
|
};
|
|
10568
|
-
return (jsxs("div", { className: 'flex flex-col flex-1', children: [(!hideFilterField || filtersActions || customFilters || actions) && (jsxs("div", { className: 'flex items-end justify-between mb-4 space-x-6', children: [jsxs("div", { className: 'flex items-center gap-x-4', children: [(!hideFilterField || customFilters) && (jsxs("div", { className: 'flex gap-x-4', children: [!hideFilterField && (jsxs("div", { className: 'flex bg-background items-center border border-slate-300 rounded-sm w-[350px] overflow-hidden focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 group', children: [jsx("div", { className: 'pl-3.5 transform transition-transform duration-300 group-hover:-translate-x-1', children: jsx(Search, { size: 18, className: 'w-5 h-5 stroke-zinc-500 dark:stroke-default' }) }), jsx("input", { placeholder: 'Buscar',
|
|
10568
|
+
return (jsxs("div", { className: 'flex flex-col flex-1', children: [(!hideFilterField || filtersActions || customFilters || actions) && (jsxs("div", { className: 'flex items-end justify-between mb-4 space-x-6', children: [jsxs("div", { className: 'flex items-center gap-x-4', children: [(!hideFilterField || customFilters) && (jsxs("div", { className: 'flex gap-x-4', children: [!hideFilterField && (jsxs("div", { className: 'flex bg-background items-center border border-slate-300 rounded-sm w-[350px] overflow-hidden focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 group', children: [jsx("div", { className: 'pl-3.5 transform transition-transform duration-300 group-hover:-translate-x-1', children: jsx(Search, { size: 18, className: 'w-5 h-5 stroke-zinc-500 dark:stroke-default' }) }), jsx("input", { placeholder: 'Buscar', onChange: (event) => {
|
|
10569
10569
|
handleSearchChange(event);
|
|
10570
10570
|
}, className: 'w-full bg-background text-default border-none focus:ring-0 focus:outline-none px-3 py-2 transform transition-transform duration-300 group-hover:-translate-x-1 ' })] })), customFilters] })), filtersActions && (jsxs(Sheet, { open: filtersActions.filterOpen, onOpenChange: filtersActions.setFilterOpen, children: [jsx(SheetTrigger, { asChild: true, children: jsxs(Button, { variant: 'secondary', type: 'button', children: [jsx(Filter, { size: 20, className: 'h-4 w-4' }), " Filtros", filtersActions.countFilters > 0 && (jsx("div", { className: 'bg-background-primary text-white rounded-full h-5 w-5 flex items-center justify-center text-sm placeholder:text-muted-foreground', children: filtersActions.countFilters }))] }) }), jsxs(SheetContent, { children: [jsxs(SheetHeader, { children: [jsx(SheetTitle, { children: "Filtros" }), jsx(SheetDescription, {})] }), jsx("div", { className: 'flex flex-col py-6', children: filtersActions.fields })] })] }))] }), jsx("div", { className: 'flex space-x-4 content-end', children: actions?.map((action, index) => (jsx("div", { children: jsxs(Button, { type: 'button', onClick: () => action.onClick?.(selectedIds, selectedRows), className: cn(action.className, action.hideUnselectedRows && selectedRows.length === 0 ? 'hidden' : ''), variant: action.variant || 'default', disabled: action.disabled, children: [jsx("div", { className: '[&_svg]:size-5', children: action.icon }), action.label] }) }, `action-table-${index}`))) })] })), jsxs("div", { className: `flex-1 flex flex-col rounded-md border ${className}`, children: [jsx("div", { className: 'flex items-center justify-between', children: title && jsx("div", { className: 'text-h4 p-4', children: title }) }), jsx("div", { id: 'data-table', ref: tableContainerRef, style: fixedHeight ? { height: fixedHeight } : { height: tableHeight }, className: 'flex flex-col justify-between rounded-md overflow-x-auto overflow-y-auto', children: jsxs(Table, { children: [jsx(DataTableHeader, { table: table, canActionsRow: actionsRow && actionsRow.length > 0, enableMultiRowSelection: enableMultiRowSelection }), jsx(TableBody, { className: 'bg-background', children: jsx(DataTableRows, { table: table, columns: columns, isLoading: isLoading, actionsRow: actionsRow, textNoRecords: textNoRecords, enableMultiRowSelection: enableMultiRowSelection }) })] }) })] }), jsx(DataTableFooter, { hidePagination: hidePagination, disablePagination: disablePagination, isLoading: isLoading, totalRows: totalRows, totalPages: totalPages, currentPage: currentPage, pagination: pagination, handlePageSize: handlePageSize, handlePage: handlePage, previousPage: { action: () => table.previousPage(), disabled: !table.getCanPreviousPage() }, nextPage: { action: () => table.nextPage(), disabled: !table.getCanNextPage() }, exportData: exportData })] }));
|
|
10571
10571
|
}
|