@coderabbitai/carrot-ui 0.1.22 → 0.1.23

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.
Files changed (3) hide show
  1. package/dist/index.d.ts +46 -1
  2. package/dist/index.js +1000 -959
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -339,6 +339,8 @@ export declare const Card: ReturnType<typeof forwardRef<HTMLDivElement, CardProp
339
339
  Section: typeof CardSection;
340
340
  };
341
341
 
342
+ declare function Card_2({ value, title, description, icon, disabled, className, }: RadioGroupCardProps): JSX.Element;
343
+
342
344
  declare const CardBody: ForwardRefExoticComponent<CardBodyProps & RefAttributes<HTMLDivElement>>;
343
345
 
344
346
  export declare interface CardBodyProps {
@@ -604,7 +606,7 @@ export declare const createTooltipHandle: typeof Tooltip_2.createHandle;
604
606
  * For simple static tables, use `Table` directly. Use `DataTable` when you
605
607
  * need interactive features.
606
608
  */
607
- export declare function DataTable<TData>({ columns, data, sortable, paginated, pageSize, pageSizeOptions, selectable, rowSelection: controlledRowSelection, onRowSelectionChange, onRowClick, emptyMessage, className, tableOptions, }: DataTableProps<TData>): JSX.Element;
609
+ export declare function DataTable<TData>({ columns, data, sortable, paginated, pageSize, pageSizeOptions, selectable, rowSelection: controlledRowSelection, onRowSelectionChange, onRowClick, loading, loadingRows, emptyMessage, className, tableOptions, }: DataTableProps<TData>): JSX.Element;
608
610
 
609
611
  /**
610
612
  * A faceted filter button for DataTable, inspired by shadcn's Tasks example.
@@ -664,6 +666,10 @@ export declare interface DataTableProps<TData> {
664
666
  onRowSelectionChange?: (selection: RowSelectionState) => void;
665
667
  /** Called when a row is clicked */
666
668
  onRowClick?: (row: Row<TData>) => void;
669
+ /** Show skeleton loading state. Default false. */
670
+ loading?: boolean;
671
+ /** Number of skeleton rows to show when loading. Default 5. */
672
+ loadingRows?: number;
667
673
  /** Message shown when data is empty. Default "No results." */
668
674
  emptyMessage?: string | ReactNode;
669
675
  /** Additional class on the outer wrapper */
@@ -1285,8 +1291,23 @@ export declare interface PopoverTriggerProps extends ComponentProps<typeof Popov
1285
1291
  export declare const RadioGroup: {
1286
1292
  Root: ForwardRefExoticComponent<Omit<RadioGroupRootProps, "ref"> & RefAttributes<HTMLDivElement>>;
1287
1293
  Item: ForwardRefExoticComponent<Omit<RadioGroupItemProps, "ref"> & RefAttributes<HTMLSpanElement>>;
1294
+ Card: typeof Card_2;
1288
1295
  };
1289
1296
 
1297
+ declare interface RadioGroupCardProps {
1298
+ /** Unique value identifying this card */
1299
+ readonly value: string;
1300
+ /** Card title */
1301
+ readonly title: string;
1302
+ /** Optional description below the title */
1303
+ readonly description?: string;
1304
+ /** Optional icon rendered to the left of the text */
1305
+ readonly icon?: ReactNode;
1306
+ /** Disable this card */
1307
+ readonly disabled?: boolean;
1308
+ readonly className?: string;
1309
+ }
1310
+
1290
1311
  export declare interface RadioGroupItemProps extends ComponentProps<typeof Radio.Root> {
1291
1312
  /** Size of the radio indicator */
1292
1313
  size?: RadioGroupItemSize;
@@ -1297,6 +1318,8 @@ export declare interface RadioGroupItemProps extends ComponentProps<typeof Radio
1297
1318
  export declare type RadioGroupItemSize = keyof typeof sizeStyles_10;
1298
1319
 
1299
1320
  export declare interface RadioGroupRootProps extends ComponentProps<typeof RadioGroup_2> {
1321
+ /** Layout direction. Default "vertical". */
1322
+ orientation?: "horizontal" | "vertical";
1300
1323
  }
1301
1324
 
1302
1325
  export { Row }
@@ -1873,6 +1896,7 @@ export declare const Table: ReturnType<typeof forwardRef<HTMLDivElement, TablePr
1873
1896
  Row: typeof TableRow;
1874
1897
  HeaderCell: typeof TableHeaderCell;
1875
1898
  Cell: typeof TableCell;
1899
+ Skeleton: typeof TableSkeleton;
1876
1900
  };
1877
1901
 
1878
1902
  declare const TableBody: ForwardRefExoticComponent<TableBodyProps & RefAttributes<HTMLTableSectionElement>>;
@@ -1925,6 +1949,27 @@ export declare interface TableRowProps extends Omit<ComponentProps<"tr">, "child
1925
1949
  children: ReactNode;
1926
1950
  }
1927
1951
 
1952
+ /**
1953
+ * Skeleton loading rows for the Table.
1954
+ * Renders inside a `<tbody>` with the specified number of rows and columns.
1955
+ *
1956
+ * ```tsx
1957
+ * <Table>
1958
+ * <Table.Header>...</Table.Header>
1959
+ * {loading ? <Table.Skeleton columns={3} /> : <Table.Body>...</Table.Body>}
1960
+ * </Table>
1961
+ * ```
1962
+ */
1963
+ declare function TableSkeleton({ columns, rows, className }: TableSkeletonProps): JSX.Element;
1964
+
1965
+ declare interface TableSkeletonProps {
1966
+ /** Number of columns to render */
1967
+ readonly columns: number;
1968
+ /** Number of skeleton rows. Default 5. */
1969
+ readonly rows?: number;
1970
+ readonly className?: string;
1971
+ }
1972
+
1928
1973
  export declare const Tabs: {
1929
1974
  Root: ForwardRefExoticComponent<Omit<TabsRootProps, "ref"> & RefAttributes<HTMLDivElement>>;
1930
1975
  List: ForwardRefExoticComponent<Omit<TabsListProps, "ref"> & RefAttributes<HTMLDivElement>>;