diff --git a/packages/ui/package.json b/packages/ui/package.json index 761730f6..89204b88 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -2,7 +2,7 @@ "name": "@eqtylab/equality", "description": "EQTYLab's component and token-based design system", "homepage": "https://equality.eqtylab.io/", - "version": "1.1.2", + "version": "1.1.3", "license": "Apache-2.0", "keywords": [ "component library", diff --git a/packages/ui/src/components/checkbox/checkbox.tsx b/packages/ui/src/components/checkbox/checkbox.tsx index 168630b7..cf023c25 100644 --- a/packages/ui/src/components/checkbox/checkbox.tsx +++ b/packages/ui/src/components/checkbox/checkbox.tsx @@ -20,7 +20,7 @@ const Checkbox = React.forwardRef - + {Icon ? : } ) diff --git a/packages/ui/src/components/control-status-badge/control-status-badge.tsx b/packages/ui/src/components/control-status-badge/control-status-badge.tsx index 5257f03a..b683f44b 100644 --- a/packages/ui/src/components/control-status-badge/control-status-badge.tsx +++ b/packages/ui/src/components/control-status-badge/control-status-badge.tsx @@ -102,6 +102,7 @@ export { ControlStatusBadge }; const MessageCircleCheckIcon = ({ className }: { className?: string }) => { return ( ; -const XIcon = X as React.ComponentType<{ className?: string }>; const ChevronLeftIcon = ChevronLeft as React.ComponentType<{ className?: string }>; const ChevronRightIcon = ChevronRight as React.ComponentType<{ className?: string }>; diff --git a/packages/ui/src/components/display-field/display-field.tsx b/packages/ui/src/components/display-field/display-field.tsx index 64b0b146..f5402d91 100644 --- a/packages/ui/src/components/display-field/display-field.tsx +++ b/packages/ui/src/components/display-field/display-field.tsx @@ -151,4 +151,4 @@ function DisplayField({ ); } -export { DisplayField, displayFieldVariants }; +export { DisplayField }; diff --git a/packages/ui/src/components/drawer/drawer.tsx b/packages/ui/src/components/drawer/drawer.tsx index daa3a3a6..5058096a 100644 --- a/packages/ui/src/components/drawer/drawer.tsx +++ b/packages/ui/src/components/drawer/drawer.tsx @@ -63,7 +63,7 @@ const DrawerHeaderActions = React.forwardRef<
); diff --git a/packages/ui/src/components/icon-button/icon-button.tsx b/packages/ui/src/components/icon-button/icon-button.tsx index 3ddcaaee..78237b80 100644 --- a/packages/ui/src/components/icon-button/icon-button.tsx +++ b/packages/ui/src/components/icon-button/icon-button.tsx @@ -91,4 +91,4 @@ function IconButton({ ); } -export { IconButton, iconButtonVariants }; +export { IconButton }; diff --git a/packages/ui/src/components/table/table-components.tsx b/packages/ui/src/components/table/table-components.tsx index 93b483ff..def0c2cb 100644 --- a/packages/ui/src/components/table/table-components.tsx +++ b/packages/ui/src/components/table/table-components.tsx @@ -11,7 +11,7 @@ const TableContainer = React.forwardRef< HTMLTableElement, React.HTMLAttributes & VariantProps >(({ className, elevation = ELEVATION.RAISED, ...props }, ref) => ( -
+
)); @@ -59,22 +59,24 @@ TableHead.displayName = 'TableHead'; const TableCell = React.forwardRef< HTMLTableCellElement, React.TdHTMLAttributes ->(({ className, ...props }, ref) =>
); +>(({ className, ...props }, ref) => ( + +)); TableCell.displayName = 'TableCell'; const TableCaption = React.forwardRef< HTMLTableCaptionElement, React.HTMLAttributes >(({ className, ...props }, ref) => ( -
+ )); TableCaption.displayName = 'TableCaption'; export { - TableContainer, TableBody, TableCaption, TableCell, + TableContainer, TableFooter, TableHead, TableHeader, diff --git a/packages/ui/src/components/table/table.module.css b/packages/ui/src/components/table/table.module.css index b58d1b96..f665c0dd 100644 --- a/packages/ui/src/components/table/table.module.css +++ b/packages/ui/src/components/table/table.module.css @@ -53,3 +53,11 @@ .table--floating.table-border { @apply border-border-floating; } + +.table-row-expandable:hover { + @apply bg-transparent; +} + +.table-cell-expandable { + @apply border-none !p-0; +} diff --git a/packages/ui/src/components/table/table.tsx b/packages/ui/src/components/table/table.tsx index 668676af..0b7eff35 100644 --- a/packages/ui/src/components/table/table.tsx +++ b/packages/ui/src/components/table/table.tsx @@ -1,6 +1,7 @@ import * as React from 'react'; import { VariantProps } from 'class-variance-authority'; +import { MotionCollapsibleContent } from '@/components/motion-collapsible/motion-collapsible'; import { TableBody, TableCell, @@ -25,6 +26,10 @@ type TableRowData = { cells: TableCellData[]; onClick?: () => void; className?: string; + expandable?: { + isOpen: boolean; + content: React.ReactNode; + }; }; type TableCellData = { @@ -70,17 +75,27 @@ const Table = ({ {rows.map((row) => ( - - {row.cells.map((cell) => ( - - {cell.content} - - ))} - + + + {row.cells.map((cell) => ( + + {cell.content} + + ))} + + {row.expandable && ( + + + + {row.expandable.content} + + + + )} + ))} diff --git a/packages/ui/src/components/toast/toast.tsx b/packages/ui/src/components/toast/toast.tsx index 5dfaf8c2..060922d1 100644 --- a/packages/ui/src/components/toast/toast.tsx +++ b/packages/ui/src/components/toast/toast.tsx @@ -15,7 +15,7 @@ interface ToastProps { } const Toast = ({ toast }: ToastProps) => { - const { id, title, description, action, icon, variant, ...props } = toast; + const { title, description, action, icon, variant, ...props } = toast; // Default icons based on variant const getDefaultIcon = () => {