laif-ds 0.2.60 → 0.2.62

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 (29) hide show
  1. package/dist/_virtual/index3.js +5 -5
  2. package/dist/_virtual/index4.js +5 -5
  3. package/dist/_virtual/index5.js +4 -4
  4. package/dist/_virtual/index6.js +2 -2
  5. package/dist/_virtual/index7.js +2 -2
  6. package/dist/agent-docs/components/AppDialog.md +271 -0
  7. package/dist/agent-docs/components/DataTable.md +73 -2
  8. package/dist/agent-docs/components-list.md +9 -0
  9. package/dist/components/ui/app-dialog.js +123 -0
  10. package/dist/components/ui/app-select.js +36 -34
  11. package/dist/components/ui/async-select.js +12 -11
  12. package/dist/components/ui/dialog.js +50 -46
  13. package/dist/components/ui/tables/data-table/components/data-table-advanced-filter.js +87 -87
  14. package/dist/components/ui/tables/data-table/components/data-table-column-visibility.js +82 -77
  15. package/dist/components/ui/tables/data-table/components/data-table-filters.js +16 -16
  16. package/dist/components/ui/tables/data-table/components/data-table-sorting.js +14 -14
  17. package/dist/components/ui/tables/data-table/data-table.js +293 -288
  18. package/dist/components/ui/tables/data-table/data-table.service.js +43 -43
  19. package/dist/components/ui/tables/data-table/data-table.utils.js +95 -88
  20. package/dist/index.d.ts +68 -19
  21. package/dist/index.js +291 -288
  22. package/dist/node_modules/eventemitter3/index.js +1 -1
  23. package/dist/node_modules/eventemitter3/index2.js +1 -1
  24. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
  25. package/dist/node_modules/recharts/es6/util/Events.js +1 -1
  26. package/dist/node_modules/style-to-object/cjs/index.js +1 -1
  27. package/dist/node_modules/unified/lib/index.js +1 -1
  28. package/dist/styles.v3.css +1 -1
  29. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -14,6 +14,7 @@ import { ControllerProps } from 'react-hook-form';
14
14
  import { DayPicker } from 'react-day-picker';
15
15
  import { default as default_2 } from 'react';
16
16
  import { default as default_3 } from 'embla-carousel-react';
17
+ import { DialogContentProps } from '@radix-ui/react-dialog';
17
18
  import * as DialogPrimitive from '@radix-ui/react-dialog';
18
19
  import { Drawer as Drawer_2 } from 'vaul';
19
20
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
@@ -131,6 +132,46 @@ declare const alertVariants: (props?: ({
131
132
 
132
133
  declare type Animation_2 = VariantProps<typeof chatBubbleVariants>["animation"];
133
134
 
135
+ export declare function AppDialog({ children, trigger, title, description, footer, size, open, defaultOpen, onOpenChange, triggerClassName, headerClassName, bodyClassName, footerClassName, disabled, asChild, preventClose, ...contentProps }: Readonly<AppDialogProps>): JSX.Element;
136
+
137
+ export declare interface AppDialogProps extends Omit<DialogContentProps, "title"> {
138
+ /** Element that triggers the dialog on click */
139
+ trigger?: React_2.ReactNode;
140
+ /** Dialog title displayed in the header */
141
+ title: string | React_2.ReactNode;
142
+ /** Dialog description displayed below the title */
143
+ description?: string | React_2.ReactNode;
144
+ /** Footer content (typically action buttons) */
145
+ footer?: React_2.ReactNode;
146
+ /** Size variant of the dialog */
147
+ size?: "sm" | "default" | "lg" | "xl" | "full";
148
+ /** Whether the dialog can be closed by clicking the overlay */
149
+ closeOnOverlay?: boolean;
150
+ /** Controlled open state */
151
+ open?: boolean;
152
+ /** Default open state for uncontrolled usage */
153
+ defaultOpen?: boolean;
154
+ /** Callback when open state changes */
155
+ onOpenChange?: (open: boolean) => void;
156
+ /** Additional className for the dialog */
157
+ className?: string;
158
+ /** Additional className for the trigger wrapper */
159
+ triggerClassName?: string;
160
+ /** Additional className for the dialog content */
161
+ contentClassName?: string;
162
+ /** Additional className for the dialog's header */
163
+ headerClassName?: string;
164
+ /** Additional className for the dialog's body */
165
+ bodyClassName?: string;
166
+ /** Additional className for the dialog's footer */
167
+ footerClassName?: string;
168
+ /** Whether to disable the trigger */
169
+ disabled?: boolean;
170
+ /** Whether to use asChild pattern for trigger (for custom elements) */
171
+ asChild?: boolean;
172
+ preventClose?: "overlay" | "all";
173
+ }
174
+
134
175
  export declare function AppEditor({ defaultValue, onMarkdownEdit, plugins, toolbars, placeholder, onlyMarkdown, className, }: AppEditorProps): JSX.Element;
135
176
 
136
177
  declare type AppEditorPlugin = "clear" | "counter";
@@ -442,22 +483,15 @@ export declare const badgeVariants: (props?: ({
442
483
 
443
484
  declare type BarItemDataType = RepeatDataType | NoRepeatDataType;
444
485
 
445
- /**
446
- * Base configuration for all column types
447
- * - accessorKey: optional, type-safe key from TData (supports nested paths like "user.name")
448
- * - id: optional, auto-generated if not provided (allows multiple columns with same accessor)
449
- * - cell: can receive either value (if accessorKey provided) or just row (if no accessorKey)
450
- */
451
- declare interface BaseColumnConfig<TData> {
486
+ export declare type BaseColumnConfig<TData> = {
452
487
  id?: string;
453
488
  accessorKey?: DeepKeys<TData>;
454
- header: string;
455
489
  sortable?: boolean;
456
490
  filterable?: boolean;
457
491
  searchable?: boolean;
458
492
  pinned?: "left" | "right";
459
493
  cell?: (value: any, row: TData, tableRow: Row<TData>) => React.ReactNode;
460
- }
494
+ } & HeaderConfig;
461
495
 
462
496
  declare type BaseProps = {
463
497
  options: AppSelectOption[];
@@ -886,10 +920,9 @@ declare type CopyButtonProps = {
886
920
  */
887
921
  export declare function createActionColumn<TData>(config: {
888
922
  id: string;
889
- header: string;
890
923
  pinned?: "left" | "right";
891
924
  cell: (row: TData) => React.ReactNode;
892
- }): ColumnDef<TData>;
925
+ } & HeaderConfig): ColumnDef<TData>;
893
926
 
894
927
  /**
895
928
  * Creates a boolean column with sensible defaults
@@ -925,14 +958,13 @@ export declare function createBooleanFilter(columnId: string, columnAccessorKey:
925
958
  */
926
959
  export declare function createComputedColumn<TData>(config: {
927
960
  id?: string;
928
- header: string;
929
961
  type: "string" | "number" | "boolean" | "date" | "datetime";
930
962
  cell: (row: TData) => React.ReactNode;
931
963
  pinned?: "left" | "right";
932
964
  sortable?: boolean;
933
965
  filterable?: boolean;
934
966
  searchable?: boolean;
935
- }): ColumnDef<TData>;
967
+ } & HeaderConfig): ColumnDef<TData>;
936
968
 
937
969
  /**
938
970
  * Creates a date column with sensible defaults
@@ -992,11 +1024,10 @@ export declare function createDateTimeFilter(columnId: string, columnAccessorKey
992
1024
  */
993
1025
  export declare function createDisplayColumn<TData>(config: {
994
1026
  id?: string;
995
- header: string;
996
1027
  cell: (row: TData) => React.ReactNode;
997
1028
  pinned?: "left" | "right";
998
1029
  searchable?: boolean;
999
- }): ColumnDef<TData>;
1030
+ } & HeaderConfig): ColumnDef<TData>;
1000
1031
 
1001
1032
  /**
1002
1033
  * Creates a filter badge with auto-generated ID
@@ -1260,7 +1291,7 @@ export declare enum DataRepeatTypes {
1260
1291
  MONTH = "MONTH"
1261
1292
  }
1262
1293
 
1263
- export declare function DataTable<TData, TValue>({ columns, data, loading, emptyComponent, className, rowSelection, onRowSelectionChange, checkable, onCheckedRowsChange, actions, customComponentsLeft, customComponentsRight, hidePagination, hideActionsRow, i18n, maxSortedColumns, initialState, serverMode: isServerSide, serverConfig: resolvedServerConfig, disableAutoPageSize, }: DataTableProps<TData, TValue>): JSX.Element;
1294
+ export declare function DataTable<TData, TValue>({ columns, data, loading, emptyComponent, className, rowSelection, onRowSelectionChange, checkable, onCheckedRowsChange, actions, customComponentsLeft, customComponentsRight, hidePagination, hideActionsRow, i18n, maxSortedColumns, initialState, serverMode, serverConfig, disableAutoPageSize, }: DataTableProps<TData, TValue>): JSX.Element;
1264
1295
 
1265
1296
  export declare interface DataTableActions {
1266
1297
  label: string;
@@ -1502,9 +1533,12 @@ declare type DeepKeys<T> = T extends object ? {
1502
1533
 
1503
1534
  export declare function Dialog({ ...props }: React_2.ComponentProps<typeof DialogPrimitive.Root>): JSX.Element;
1504
1535
 
1505
- export declare function DialogContent({ className, children, size, closeOnOverlay, ...props }: React_2.ComponentProps<typeof DialogPrimitive.Content> & {
1536
+ export declare function DialogClose({ ...props }: React_2.ComponentProps<typeof DialogPrimitive.Close>): JSX.Element;
1537
+
1538
+ export declare function DialogContent({ className, children, size, closeOnOverlay, showCloseButton, ...props }: React_2.ComponentProps<typeof DialogPrimitive.Content> & {
1506
1539
  size?: "sm" | "default" | "lg" | "xl";
1507
1540
  closeOnOverlay?: boolean;
1541
+ showCloseButton?: boolean;
1508
1542
  }): JSX.Element;
1509
1543
 
1510
1544
  export declare function DialogDescription({ className, ...props }: React_2.ComponentProps<typeof DialogPrimitive.Description>): JSX.Element;
@@ -1699,6 +1733,20 @@ declare type GanttProps = {
1699
1733
  */
1700
1734
  export declare function getColumnIds<TData>(columns: ColumnDef<TData>[]): string[];
1701
1735
 
1736
+ /**
1737
+ * Base configuration for all column types
1738
+ * - accessorKey: optional, type-safe key from TData (supports nested paths like "user.name")
1739
+ * - id: optional, auto-generated if not provided (allows multiple columns with same accessor)
1740
+ * - cell: can receive either value (if accessorKey provided) or just row (if no accessorKey)
1741
+ */
1742
+ export declare type HeaderConfig = {
1743
+ header: string;
1744
+ headerLabel?: string;
1745
+ } | {
1746
+ header: React.ReactNode;
1747
+ headerLabel: string;
1748
+ };
1749
+
1702
1750
  export declare const hexContrast: (hex: string) => string;
1703
1751
 
1704
1752
  export declare const hexToRgba: (hex: string, alpha: number) => string;
@@ -1866,9 +1914,9 @@ declare type KanbanBoardCardMetaItem = {
1866
1914
 
1867
1915
  export declare function Label({ className, ...props }: React_2.ComponentProps<typeof LabelPrimitive.Root>): JSX.Element;
1868
1916
 
1869
- declare interface ListColumnConfig<TData> extends BaseColumnConfig<TData> {
1917
+ export declare type ListColumnConfig<TData> = BaseColumnConfig<TData> & {
1870
1918
  options: string[] | AppSelectOption[];
1871
- }
1919
+ };
1872
1920
 
1873
1921
  declare type LogicalOperator = "AND" | "OR";
1874
1922
 
@@ -2774,6 +2822,7 @@ export { }
2774
2822
  declare module "@tanstack/react-table" {
2775
2823
  interface ColumnMeta<TData extends unknown, TValue> {
2776
2824
  type: IColumnType;
2825
+ headerLabel?: string;
2777
2826
  sortable?: boolean;
2778
2827
  filterable?: boolean;
2779
2828
  searchable?: boolean;