@enonic/ui 0.20.4 → 0.21.0

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.
@@ -2,7 +2,7 @@ import { LucideIcon } from '../../types';
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  import { ComponentPropsWithoutRef } from 'react';
4
4
  declare const buttonVariants: (props?: ({
5
- variant?: "text" | "outline" | "filled" | "solid" | null | undefined;
5
+ variant?: "text" | "filled" | "solid" | "outline" | null | undefined;
6
6
  size?: "sm" | "md" | "lg" | null | undefined;
7
7
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
8
  export type ButtonVariantsProps = VariantProps<typeof buttonVariants>;
@@ -1,3 +1,5 @@
1
+ import { IconButtonProps } from '..';
2
+ import { LucideIcon } from '../../types';
1
3
  import { ComponentPropsWithoutRef, ReactElement, ReactNode } from 'react';
2
4
  export type TreeListProps<T extends TreeNode = TreeNode> = {
3
5
  className?: string;
@@ -40,7 +42,8 @@ type TreeListRowLevelSpacerProps = {
40
42
  } & ComponentPropsWithoutRef<'div'>;
41
43
  type TreeListRowExpandControlProps = {
42
44
  data: TreeNode;
43
- } & ComponentPropsWithoutRef<'div'>;
45
+ icon?: LucideIcon;
46
+ } & Omit<IconButtonProps, 'icon'>;
44
47
  type TreeListRowContentProps = {
45
48
  children?: ReactNode;
46
49
  className?: string;
@@ -53,12 +56,12 @@ type TreeListRowProps<T extends TreeNode> = {
53
56
  item: T;
54
57
  children: ReactNode;
55
58
  className?: string;
56
- };
59
+ } & ComponentPropsWithoutRef<'div'>;
57
60
  export type TreeListLoadingRowProps = {
58
61
  item: TreeNode;
59
62
  children?: ReactNode;
60
63
  intersectionProps?: IntersectionObserverInit;
61
- };
64
+ } & ComponentPropsWithoutRef<'div'>;
62
65
  export declare const TreeListRoot: <T extends TreeNode = TreeNode>({ className, items: controlledItems, setItems: setItemsControlled, fetchChildren, selection: controlledSelection, expanded: controlledExpanded, onSelectionChange, onExpandedChange, active: controlledActive, defaultActive, setActive, selectionMode, isItemSelectable, children, ...props }: TreeListProps<T>) => ReactElement;
63
66
  export type TreeNode = {
64
67
  id: string;
@@ -79,11 +82,11 @@ export declare const TreeList: (<T extends TreeNode = TreeNode>({ className, ite
79
82
  displayName: string;
80
83
  };
81
84
  Row: {
82
- <T extends TreeNode>({ item, children, className }: TreeListRowProps<T>): ReactElement;
85
+ <T extends TreeNode>({ item, children, className, ...props }: TreeListRowProps<T>): ReactElement;
83
86
  displayName: string;
84
87
  };
85
88
  LoadingRow: {
86
- ({ item, children, intersectionProps }: TreeListLoadingRowProps): ReactElement;
89
+ ({ item, children, intersectionProps, ...props }: TreeListLoadingRowProps): ReactElement;
87
90
  displayName: string;
88
91
  };
89
92
  RowLeft: {
@@ -95,11 +98,11 @@ export declare const TreeList: (<T extends TreeNode = TreeNode>({ className, ite
95
98
  displayName: string;
96
99
  };
97
100
  RowLevelSpacer: {
98
- ({ level, className, }: TreeListRowLevelSpacerProps): ReactElement<TreeListRowLeftProps> | undefined;
101
+ ({ level, className, ...props }: TreeListRowLevelSpacerProps): ReactElement<TreeListRowLeftProps> | undefined;
99
102
  displayName: string;
100
103
  };
101
104
  RowExpandControl: {
102
- ({ data }: TreeListRowExpandControlProps): ReactElement<TreeListRowLeftProps>;
105
+ ({ data, icon, className, ...props }: TreeListRowExpandControlProps): ReactElement<TreeListRowExpandControlProps>;
103
106
  displayName: string;
104
107
  };
105
108
  RowContent: {
@@ -107,7 +110,7 @@ export declare const TreeList: (<T extends TreeNode = TreeNode>({ className, ite
107
110
  displayName: string;
108
111
  };
109
112
  RowSelectionControl: {
110
- ({ data, className }: TreeListRowSelectionControlProps): ReactElement;
113
+ ({ data, className, ...props }: TreeListRowSelectionControlProps): ReactElement;
111
114
  displayName: string;
112
115
  };
113
116
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enonic/ui",
3
- "version": "0.20.4",
3
+ "version": "0.21.0",
4
4
  "description": "Enonic UI Component Library",
5
5
  "author": "Enonic",
6
6
  "license": "MIT",