@ioca/react 1.5.19 → 1.5.20

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 (38) hide show
  1. package/lib/cjs/components/datagrid/virtual.js +129 -102
  2. package/lib/cjs/components/datagrid/virtual.js.map +1 -1
  3. package/lib/cjs/components/form/useForm.js +1 -1
  4. package/lib/cjs/components/form/useForm.js.map +1 -1
  5. package/lib/cjs/components/tabs/tabs.js +8 -17
  6. package/lib/cjs/components/tabs/tabs.js.map +1 -1
  7. package/lib/cjs/components/tree/item.js +44 -56
  8. package/lib/cjs/components/tree/item.js.map +1 -1
  9. package/lib/cjs/components/tree/tree.js +121 -18
  10. package/lib/cjs/components/tree/tree.js.map +1 -1
  11. package/lib/cjs/components/tree/virtual.js +52 -0
  12. package/lib/cjs/components/tree/virtual.js.map +1 -0
  13. package/lib/cjs/js/usePreview/content.js +3 -3
  14. package/lib/cjs/js/usePreview/content.js.map +1 -1
  15. package/lib/cjs/js/usePreview/type.js.map +1 -1
  16. package/lib/css/index.css +1 -1
  17. package/lib/css/index.css.map +1 -1
  18. package/lib/css/input.css +0 -4
  19. package/lib/es/components/datagrid/virtual.js +130 -103
  20. package/lib/es/components/datagrid/virtual.js.map +1 -1
  21. package/lib/es/components/form/useForm.js +1 -1
  22. package/lib/es/components/form/useForm.js.map +1 -1
  23. package/lib/es/components/tabs/tabs.js +8 -17
  24. package/lib/es/components/tabs/tabs.js.map +1 -1
  25. package/lib/es/components/tree/item.js +44 -57
  26. package/lib/es/components/tree/item.js.map +1 -1
  27. package/lib/es/components/tree/tree.js +122 -19
  28. package/lib/es/components/tree/tree.js.map +1 -1
  29. package/lib/es/components/tree/virtual.js +44 -0
  30. package/lib/es/components/tree/virtual.js.map +1 -0
  31. package/lib/es/js/usePreview/content.js +3 -3
  32. package/lib/es/js/usePreview/content.js.map +1 -1
  33. package/lib/es/js/usePreview/type.js.map +1 -1
  34. package/lib/index.js +338 -197
  35. package/lib/types/components/tabs/type.d.ts +1 -1
  36. package/lib/types/components/tree/type.d.ts +8 -5
  37. package/lib/types/js/usePreview/type.d.ts +1 -1
  38. package/package.json +6 -5
@@ -14,7 +14,7 @@ interface ITabs {
14
14
  ref?: Ref<RefTabs>;
15
15
  active?: string;
16
16
  tabs?: ITabItem[] | string[];
17
- type?: "default" | "line" | "pane";
17
+ type?: "default" | "pane";
18
18
  prepend?: ReactNode;
19
19
  append?: ReactNode;
20
20
  vertical?: boolean;
@@ -8,18 +8,20 @@ interface ITreeItem {
8
8
  title: string | ReactNode;
9
9
  icon?: ReactNode;
10
10
  href?: string;
11
- children?: ITreeItem[];
11
+ children?: ITreeItem[] | Promise<ITreeItem[]>;
12
12
  expanded?: boolean;
13
13
  disabled?: boolean;
14
14
  checked?: boolean;
15
15
  parent?: ITreeItem;
16
16
  [key: string]: any;
17
17
  }
18
+ interface TVirtual {
19
+ rowHeight: number;
20
+ threshold?: number;
21
+ }
18
22
  interface ITree {
19
23
  data: ITreeItem[];
20
- parent?: ITreeItem;
21
24
  ref?: RefObject<RefTree | null>;
22
- depth?: number;
23
25
  nodeProps?: {
24
26
  key?: string;
25
27
  title?: string;
@@ -30,8 +32,9 @@ interface ITree {
30
32
  checkable?: boolean;
31
33
  checked?: string[];
32
34
  disabledRelated?: boolean;
33
- partofs?: Record<string, boolean>;
34
35
  round?: boolean;
36
+ height?: number | string;
37
+ useVirtual?: TVirtual;
35
38
  style?: CSSProperties;
36
39
  className?: string;
37
40
  renderExtra?: (item: ITreeItem) => ReactNode;
@@ -45,4 +48,4 @@ interface RefTree {
45
48
  getPartofs: () => [string[], ITreeItem[]];
46
49
  }
47
50
 
48
- export type { ITree, ITreeItem, RefTree };
51
+ export type { ITree, ITreeItem, RefTree, TVirtual };
@@ -14,7 +14,7 @@ type TPreviewItem = {
14
14
  interface IPreview {
15
15
  items: (TPreviewItem | string)[];
16
16
  initial?: number;
17
- controls?: boolean;
17
+ hideControl?: boolean;
18
18
  loop?: boolean;
19
19
  className?: string;
20
20
  style?: CSSProperties;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ioca/react",
3
- "version": "1.5.19",
3
+ "version": "1.5.20",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -17,10 +17,11 @@
17
17
  "highlight-words-core": "^1.2.3",
18
18
  "pubsub-js": "^1.9.5",
19
19
  "radash": "^12.1.0",
20
- "react": ">=16.8.0",
21
- "react-dom": ">=16.8.0",
20
+ "react": "^19.0.0",
21
+ "react-dom": "^19.0.0",
22
22
  "react-easy-sort": "^1.6.0",
23
23
  "react-router": "^7.1.1",
24
+ "tslib": "^2.8.1",
24
25
  "react-window": "^2.2.7",
25
26
  "xss": "^1.0.15"
26
27
  },
@@ -48,8 +49,8 @@
48
49
  "vite-plugin-dynamic-import": "^1.6.0"
49
50
  },
50
51
  "peerDependencies": {
51
- "react": ">=16.8.0",
52
- "react-dom": ">=16.8.0"
52
+ "react": "^19.0.0",
53
+ "react-dom": "^19.0.0"
53
54
  },
54
55
  "main": "lib/cjs/index.js",
55
56
  "module": "lib/es/index.js",